diff --git a/.vscode/settings.json b/.vscode/settings.json index 59e0fb04..019958ab 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,5 @@ { - "prettier.documentSelectors": [ - "**/*.svelte" - ], + "prettier.documentSelectors": ["**/*.svelte"], "tailwindCSS.classAttributes": [ "class", "accent", @@ -118,4 +116,4 @@ "zIndex" ], "explorer.fileNesting.enabled": false -} \ No newline at end of file +} diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index cd42adaf..82804732 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -3,111 +3,140 @@ This document outlines the overall architecture and key technologies used in the Aether SvelteKit frontend project. ## 1. Project Overview + The Aether project is a Svelte and SvelteKit based application, utilizing Tailwind CSS and Skeleton for styling and UI elements. It serves as the frontend UI/UX for the Aether system, which interacts with a Python FastAPI backend. ## 2. Core Technologies -* **Frontend Framework:** Svelte 5 and SvelteKit v2 - * **Routing:** SvelteKit's file-system based routing. -* **Styling:** Tailwind CSS 3.x (with plans to upgrade to 4.x when ShadCN is ready) -* **UI Component Libraries:** - * Skeleton (Design System, Tailwind Components, Functional Components - with plans to upgrade to v3) - * Flowbite (Tailwind Components) - * **Note:** ShadCN is currently used but is planned for removal. -* **Text/Code Editors:** - * CodeMirror 6.x (primary text and code editor, planned for rich text editing) - * Edra (TipTap based Rich Text Editor) - * **Note:** ShadEditor TipTap is present but marked for removal, with CodeMirror being the preferred solution for all text editing needs. -* **Icons:** Lucide Icons (SVG Icons) -* **Markdown Parsing:** `marked` library -* **State Management:** Svelte stores, potentially with `liveQuery` from Dexie for reactive IndexedDB interactions. + +- **Frontend Framework:** Svelte 5 and SvelteKit v2 + - **Routing:** SvelteKit's file-system based routing. +- **Styling:** Tailwind CSS 3.x (with plans to upgrade to 4.x when ShadCN is ready) +- **UI Component Libraries:** + - Skeleton (Design System, Tailwind Components, Functional Components - with plans to upgrade to v3) + - Flowbite (Tailwind Components) + - **Note:** ShadCN is currently used but is planned for removal. +- **Text/Code Editors:** + - CodeMirror 6.x (primary text and code editor, planned for rich text editing) + - Edra (TipTap based Rich Text Editor) + - **Note:** ShadEditor TipTap is present but marked for removal, with CodeMirror being the preferred solution for all text editing needs. +- **Icons:** Lucide Icons (SVG Icons) +- **Markdown Parsing:** `marked` library +- **State Management:** Svelte stores, potentially with `liveQuery` from Dexie for reactive IndexedDB interactions. ## 3. Module Structure + The Aether project is organized into several modules, categorized as Core, Extended, and Custom. ### 3.1. Official Modules + #### Core Modules + These are foundational modules essential for the application's basic functionality. -* **Accounts:** Minimal implementation. -* **Files:** Manages hosted files. -* **People:** Minimal implementation for person records. -* **Sites:** Minimal implementation for site configurations. -* **Users:** Minimal implementation for user management. + +- **Accounts:** Minimal implementation. +- **Files:** Manages hosted files. +- **People:** Minimal implementation for person records. +- **Sites:** Minimal implementation for site configurations. +- **Users:** Minimal implementation for user management. #### Extended Modules + These modules provide additional features and functionalities. -* **Archives:** Minimal implementation. -* **Events:** Includes features for Badges and Presentation Management. -* **Posts:** Minimal implementation. -* **Journals:** Manages journal entries. + +- **Archives:** Minimal implementation. +- **Events:** Includes features for Badges and Presentation Management. +- **Posts:** Minimal implementation. +- **Journals:** Manages journal entries. #### Custom Modules + These modules are tailored for specific client needs. -* **IDAA:** Includes Archives, Bulletin Board (BB), and Recovery Meetings functionalities. + +- **IDAA:** Includes Archives, Bulletin Board (BB), and Recovery Meetings functionalities. ## 4. Data Storage Mechanisms + ### 4.1. Local Storage + Used for client-side persistence of various application states and configurations. -* `api`: API-related settings. -* `app`: Global application settings. -* `core`: Settings and data specific to core modules. -* ``: Settings and data specific to extended modules. -* ``: Settings and data specific to custom modules. + +- `api`: API-related settings. +- `app`: Global application settings. +- `core`: Settings and data specific to core modules. +- ``: Settings and data specific to extended modules. +- ``: Settings and data specific to custom modules. ### 4.2. IndexedDB (Dexie.js) + Used for more structured client-side data storage, often for caching and offline capabilities. -* `ae_core_db`: Core database instance. -* ``: Module-specific database instances. -* ``: Custom module-specific database instances (none currently defined). + +- `ae_core_db`: Core database instance. +- ``: Module-specific database instances. +- ``: Custom module-specific database instances (none currently defined). ## 5. Data Sorting + Standardized sorting orders are applied across various data lists. -* **Default/General:** `group > priority > sort > updated_on/created_on` -* **Specific (e.g., Events):** `type > start_date/time > code or name` + +- **Default/General:** `group > priority > sort > updated_on/created_on` +- **Specific (e.g., Events):** `type > start_date/time > code or name` ## 6. Object Properties and Fields + A set of standardized field names and types are used across Aether objects. ### 6.1. Core Standard Fields + These fields are expected to be present in most Aether objects. -* `id`: Primary key for an object (internal use, often a UUID). -* `id_random`: Randomly generated ID for an object (often used for external exposure or URL parameters). -* `_id_random`: Specific random ID for an object (e.g., `person_id_random`). -* `code`: Short, unique identifier. -* `name`: Display name. -* `enable`: Boolean for active/inactive status. -* `hide`: Boolean for visibility. -* `priority`: Numeric value for ordering. -* `sort`: Numeric value for ordering. -* `group`: Categorization string. -* `notes`: General notes/comments. -* `created_on`: Timestamp of creation. -* `updated_on`: Timestamp of last update. + +- `id`: Primary key for an object (internal use, often a UUID). +- `id_random`: Randomly generated ID for an object (often used for external exposure or URL parameters). +- `_id_random`: Specific random ID for an object (e.g., `person_id_random`). +- `code`: Short, unique identifier. +- `name`: Display name. +- `enable`: Boolean for active/inactive status. +- `hide`: Boolean for visibility. +- `priority`: Numeric value for ordering. +- `sort`: Numeric value for ordering. +- `group`: Categorization string. +- `notes`: General notes/comments. +- `created_on`: Timestamp of creation. +- `updated_on`: Timestamp of last update. ### 6.2. Special Use Fields + Fields with specific purposes or conditional usage. -* `for_type`: Indicates the type of object this object is linked to. -* `for_id`: The ID of the object this object is linked to. -* `archive_on`: Timestamp for archiving. -* `passcode`: Password or access code. -* `external_id`: ID from an external system. + +- `for_type`: Indicates the type of object this object is linked to. +- `for_id`: The ID of the object this object is linked to. +- `archive_on`: Timestamp for archiving. +- `passcode`: Password or access code. +- `external_id`: ID from an external system. ### 6.3. Configuration and JSON Fields + Fields designed to store JSON data. -* `cfg_json`: Configuration data in JSON format. -* `data_json`: General data in JSON format. -* `linked_li_json`: List of linked items in JSON format. + +- `cfg_json`: Configuration data in JSON format. +- `data_json`: General data in JSON format. +- `linked_li_json`: List of linked items in JSON format. ### 6.4. Special Generated Fields (Client-side) + Fields generated on the client-side, primarily for sorting or UI logic. -* `tmp_sort_1` -* `tmp_sort_2` -* `tmp_sort_3` + +- `tmp_sort_1` +- `tmp_sort_2` +- `tmp_sort_3` ### 6.5. Future Standard Fields + A list of potential future standard fields, often prefixed with `obj_`. These are currently conceptual and not yet fully integrated. -* `obj_id`, `obj_ext_uid`, `obj_ext_id`, `obj_import_id`, `obj_code`, `obj_account_id`, `obj_passcode`, `obj_type`, `obj_type_ver_id`, `obj_name`, `obj_summary`, `obj_outline`, `obj_description`, `obj_enable`, `obj_enable_on`, `obj_archive_on`, `obj_hide`, `obj_priority`, `obj_sort`, `obj_group`, `obj_cfg_json`, `obj_notes`, `obj_created_on`, `obj_updated_on`. + +- `obj_id`, `obj_ext_uid`, `obj_ext_id`, `obj_import_id`, `obj_code`, `obj_account_id`, `obj_passcode`, `obj_type`, `obj_type_ver_id`, `obj_name`, `obj_summary`, `obj_outline`, `obj_description`, `obj_enable`, `obj_enable_on`, `obj_archive_on`, `obj_hide`, `obj_priority`, `obj_sort`, `obj_group`, `obj_cfg_json`, `obj_notes`, `obj_created_on`, `obj_updated_on`. ## 7. IndexedDB LiveQuery Usage -* `lq__xyz_obj`: Used for general read-only access to liveQuery results. -* `lqw__xyz_obj`: Used for forms and binding values, representing a writable snapshot of liveQuery results. - * **Note:** Care must be taken when binding to `lqw__xyz_obj` to manage updates and potential conflicts with the underlying liveQuery. + +- `lq__xyz_obj`: Used for general read-only access to liveQuery results. +- `lqw__xyz_obj`: Used for forms and binding values, representing a writable snapshot of liveQuery results. + - **Note:** Care must be taken when binding to `lqw__xyz_obj` to manage updates and potential conflicts with the underlying liveQuery. diff --git a/COMPONENTS.md b/COMPONENTS.md index 232aa4f8..4bc2f67c 100644 --- a/COMPONENTS.md +++ b/COMPONENTS.md @@ -5,128 +5,144 @@ This document details the various UI components used throughout the Aether Svelt ## 1. Aether Components (UI/UX) ### 1.1. System Components + These components are part of the core application shell and provide global functionalities. -* **`header`**: Application-wide header. -* **`main/module`s**: Main content area for modules. -* **`footer`**: Application-wide footer. -* **`app`**: Provides global application functionalities such as: - * Refresh application state. - * Clear IndexedDB. - * Clear local storage (settings). - * Toggle iframe visibility (also updates URL parameter). - * Copy current URL. - * Generate and display QR codes. -* **`menu`**: Various menus for different purposes: - * **`mode`**: Edit mode toggle, more options (all or details). - * **`access_type`**: Passcode input, clear access. - * **`user`**: Sign in/out, reset password, email link, change username and email. - * **`theme`**: Mode (light/dark), name (theme list). -* **`debug`**: Developer-facing tools: - * Toggle debug mode (also updates URL parameter). - * Show core and module storages. - * Manually set initial timestamp. -* **`scroll_to`**: Navigation controls for scrolling: - * Scroll to top of the page. - * Scroll page up. - * Scroll page down. - * Scroll to bottom of the page. + +- **`header`**: Application-wide header. +- **`main/module`s**: Main content area for modules. +- **`footer`**: Application-wide footer. +- **`app`**: Provides global application functionalities such as: + - Refresh application state. + - Clear IndexedDB. + - Clear local storage (settings). + - Toggle iframe visibility (also updates URL parameter). + - Copy current URL. + - Generate and display QR codes. +- **`menu`**: Various menus for different purposes: + - **`mode`**: Edit mode toggle, more options (all or details). + - **`access_type`**: Passcode input, clear access. + - **`user`**: Sign in/out, reset password, email link, change username and email. + - **`theme`**: Mode (light/dark), name (theme list). +- **`debug`**: Developer-facing tools: + - Toggle debug mode (also updates URL parameter). + - Show core and module storages. + - Manually set initial timestamp. +- **`scroll_to`**: Navigation controls for scrolling: + - Scroll to top of the page. + - Scroll page up. + - Scroll page down. + - Scroll to bottom of the page. ### 1.2. Core Components + These are reusable components that provide common functionalities across different modules. -* **`copy_btn`**: A button to copy content to the clipboard. - * Properties: `clipboard`, `bind:value`, `btn_text`, `btn_html`. -* **`txt_editor`**: A basic text area editor. -* **`md_editor`**: Markdown editor. - * Uses CodeMirror (planned for rich text editing). - * **Note:** ShadEditor TipTap is present but marked for removal. ShadCN components are also being phased out in favor of CodeMirror for text editing. -* **`html_editor`**: HTML editor. -* **`media_player`**: Component for playing media files. - * Properties: `hosted_file`, `archive_content`, `media_player`. - * Bindings: `bind:host_id`, `bind:media_type`. - * Status: `stopped`, `paused`, `playing`. -* **`hosted_file_li`**: Manages a list of hosted files, making them available for selection. -* **`hosted_file_link_to`**: Lists links per object, with bindings to add/remove links. -* **`upload_to_host`**: Component for uploading files to the host. - * Handles multiple files. - * Properties: `link_type`, `link_id`, `inner fragment` (label html). - * Bindings: `bind:trigger`, `bind:show_spinner`, `bind:show_percent`. - * Status: `started`, `uploading`, `finished`. -* **`upload_file_tbl`**: Table for uploaded files, includes checks for duplicate file hashes and removal from the list. -* **`download_from_host`**: Component for downloading files from the host. - * Bindings: `bind:host_file_id`, `bind:filename`, `bind:file_ext`. - * Properties: `btn inner fragment`. - * Bindings: `bind:trigger`, `bind:show_spinner`, `bind:show_percent`. - * Status: `started`, `downloading`, `finished`. -* **`data_store`**: Component for interacting with data stores. -* **`ae_crud`**: Generic CRUD (Create, Read, Update, Delete) component. - * **Note:** Needs simplification. - * Properties: `obj`, `prop`, `current_value`. - * Bindings: `bind:value`, `bind:trigger`, `inner fragment`. -* **`ae_obj_prop_val`**: A wrapper for a function to manage object property values. - * Bindings: `bind:obj_type`, `bind:obj_id`, `bind:obj_prop`, `bind:obj_value`, `bind:obj_new_value`, `bind:trigger`, `bind:show_spinner`, `bind:show_percent`. - * Status: `status`, `result`. -* **`sql_qry`**: Component for executing SQL queries. -* **`obj_tbl`**: Object SQL results table or similar. -* **`qr_scanner`**: Component for scanning QR codes. -* **`websocket`**: Component for WebSocket communication. + +- **`copy_btn`**: A button to copy content to the clipboard. + - Properties: `clipboard`, `bind:value`, `btn_text`, `btn_html`. +- **`txt_editor`**: A basic text area editor. +- **`md_editor`**: Markdown editor. + - Uses CodeMirror (planned for rich text editing). + - **Note:** ShadEditor TipTap is present but marked for removal. ShadCN components are also being phased out in favor of CodeMirror for text editing. +- **`html_editor`**: HTML editor. +- **`media_player`**: Component for playing media files. + - Properties: `hosted_file`, `archive_content`, `media_player`. + - Bindings: `bind:host_id`, `bind:media_type`. + - Status: `stopped`, `paused`, `playing`. +- **`hosted_file_li`**: Manages a list of hosted files, making them available for selection. +- **`hosted_file_link_to`**: Lists links per object, with bindings to add/remove links. +- **`upload_to_host`**: Component for uploading files to the host. + - Handles multiple files. + - Properties: `link_type`, `link_id`, `inner fragment` (label html). + - Bindings: `bind:trigger`, `bind:show_spinner`, `bind:show_percent`. + - Status: `started`, `uploading`, `finished`. +- **`upload_file_tbl`**: Table for uploaded files, includes checks for duplicate file hashes and removal from the list. +- **`download_from_host`**: Component for downloading files from the host. + - Bindings: `bind:host_file_id`, `bind:filename`, `bind:file_ext`. + - Properties: `btn inner fragment`. + - Bindings: `bind:trigger`, `bind:show_spinner`, `bind:show_percent`. + - Status: `started`, `downloading`, `finished`. +- **`data_store`**: Component for interacting with data stores. +- **`ae_crud`**: Generic CRUD (Create, Read, Update, Delete) component. + - **Note:** Needs simplification. + - Properties: `obj`, `prop`, `current_value`. + - Bindings: `bind:value`, `bind:trigger`, `inner fragment`. +- **`ae_obj_prop_val`**: A wrapper for a function to manage object property values. + - Bindings: `bind:obj_type`, `bind:obj_id`, `bind:obj_prop`, `bind:obj_value`, `bind:obj_new_value`, `bind:trigger`, `bind:show_spinner`, `bind:show_percent`. + - Status: `status`, `result`. +- **`sql_qry`**: Component for executing SQL queries. +- **`obj_tbl`**: Object SQL results table or similar. +- **`qr_scanner`**: Component for scanning QR codes. +- **`websocket`**: Component for WebSocket communication. ### 1.3. Main / Module Components + These are components specific to main application sections or individual modules. -* **`menu`**: - * **`options`**: Various settings, show/hide content and options, limit, sorting options. - * **`actions`**: Various actions, sign in/out, email. + +- **`menu`**: + - **`options`**: Various settings, show/hide content and options, limit, sorting options. + - **`actions`**: Various actions, sign in/out, email. ### 1.4. Object Menu + A standardized menu for interacting with objects. -* **Properties Displayed:** `id`, `name`, `group`, `priority`, `sort`, `alert`, `hide`, `enable`, `note`. -* **Future Properties:** `ext_id`, `ext_sys_id`, `code` (not yet ready). -* **Actions:** `create`, `view`, `edit`, `update`, `hide`, `disable`, `delete`, `alert` (message), `archive` (not yet ready). -* **Future Actions:** `copy`, `import`. -* **Sort Options:** - * `[default]`: `group > priority > sort (ASC/DESC) > alert > name` - * `[sort_updated]`: `group > priority > sort (ASC/DESC) > alert > updated_on > created_on` - * `[priority_updated]`: `group > priority > updated_on (ASC/DESC) > created_on` - * `[priority_name]`: `group > priority > name (ASC/DESC) > sort > alert > updated_on > created_on` - * `[name]`: `priority > name (ASC/DESC) > sort > alert > updated_on > created_on` - * `[created_on]`: `priority > created_on (ASC/DESC)` - * `[updated_on]`: `priority > updated_on (ASC/DESC) > created_on` + +- **Properties Displayed:** `id`, `name`, `group`, `priority`, `sort`, `alert`, `hide`, `enable`, `note`. +- **Future Properties:** `ext_id`, `ext_sys_id`, `code` (not yet ready). +- **Actions:** `create`, `view`, `edit`, `update`, `hide`, `disable`, `delete`, `alert` (message), `archive` (not yet ready). +- **Future Actions:** `copy`, `import`. +- **Sort Options:** + - `[default]`: `group > priority > sort (ASC/DESC) > alert > name` + - `[sort_updated]`: `group > priority > sort (ASC/DESC) > alert > updated_on > created_on` + - `[priority_updated]`: `group > priority > updated_on (ASC/DESC) > created_on` + - `[priority_name]`: `group > priority > name (ASC/DESC) > sort > alert > updated_on > created_on` + - `[name]`: `priority > name (ASC/DESC) > sort > alert > updated_on > created_on` + - `[created_on]`: `priority > created_on (ASC/DESC)` + - `[updated_on]`: `priority > updated_on (ASC/DESC) > created_on` ## 2. Pop-ups + Standardized structure for various types of pop-up elements. -* **`modal_header`**: - * `title` - * `close` button -* **`modal_main`**: Main content area of the modal. -* **`modal_meta`**: Meta-information section. -* **`modal_footer`**: - * `close` button -* **`Pop-up Modal (blocking)`**: A modal that blocks interaction with the rest of the page. - * `modal position` -* **`Pop-up Modal Inline`**: A modal that appears inline with content. - * `inline`, `inline-block`, `block` display options. -* **`Pop-up Dialog`**: A dialog box. - * `dialog position` + +- **`modal_header`**: + - `title` + - `close` button +- **`modal_main`**: Main content area of the modal. +- **`modal_meta`**: Meta-information section. +- **`modal_footer`**: + - `close` button +- **`Pop-up Modal (blocking)`**: A modal that blocks interaction with the rest of the page. + - `modal position` +- **`Pop-up Modal Inline`**: A modal that appears inline with content. + - `inline`, `inline-block`, `block` display options. +- **`Pop-up Dialog`**: A dialog box. + - `dialog position` ## 3. Containers + Generic container types used for layout and grouping. + ### 3.1. Navigation -* `link` -* `download` + +- `link` +- `download` ### 3.2. Forms -* `save` button/action -* `clear value` action -* `set null value` action + +- `save` button/action +- `clear value` action +- `set null value` action ### 3.3. Other Containers -* `help`: Blue themed container. -* `info`: Blue themed container. -* `alert`: Yellow themed container. -* `warning`: Orange themed container. -* `error`: Red themed container. -* `message`: Green themed container. + +- `help`: Blue themed container. +- `info`: Blue themed container. +- `alert`: Yellow themed container. +- `warning`: Orange themed container. +- `error`: Red themed container. +- `message`: Green themed container. ## 4. CSS Styling for UI Elements -* **Warning/Hide Buttons:** `variant-soft-warning hover:variant-filled-warning` -* **Error/Delete/Disable Buttons:** `variant-soft-error hover:variant-filled-error` -* **Submenu:** `flex flex-row items-center justify-center gap-1` + +- **Warning/Hide Buttons:** `variant-soft-warning hover:variant-filled-warning` +- **Error/Delete/Disable Buttons:** `variant-soft-error hover:variant-filled-error` +- **Submenu:** `flex flex-row items-center justify-center gap-1` diff --git a/DATA_STRUCTURES.md b/DATA_STRUCTURES.md index 65e2a5ab..34c3165a 100644 --- a/DATA_STRUCTURES.md +++ b/DATA_STRUCTURES.md @@ -5,68 +5,86 @@ This document outlines the key data structures and their properties used within ## 1. Object Properties and Fields ### 1.1. Core Standard Fields + These fields are expected to be present in most Aether objects, providing a consistent base structure. -* `id`: Primary key for an object (internal use, often a UUID). -* `id_random`: Randomly generated ID for an object (often used for external exposure or URL parameters). -* `_id_random`: Specific random ID for an object (e.g., `person_id_random`). -* `code`: Short, unique identifier. -* `name`: Display name. -* `enable`: Boolean for active/inactive status. -* `hide`: Boolean for visibility. -* `priority`: Numeric value for ordering. -* `sort`: Numeric value for ordering. -* `group`: Categorization string. -* `notes`: General notes/comments. -* `created_on`: Timestamp of creation. -* `updated_on`: Timestamp of last update. + +- `id`: Primary key for an object (internal use, often a UUID). +- `id_random`: Randomly generated ID for an object (often used for external exposure or URL parameters). +- `_id_random`: Specific random ID for an object (e.g., `person_id_random`). +- `code`: Short, unique identifier. +- `name`: Display name. +- `enable`: Boolean for active/inactive status. +- `hide`: Boolean for visibility. +- `priority`: Numeric value for ordering. +- `sort`: Numeric value for ordering. +- `group`: Categorization string. +- `notes`: General notes/comments. +- `created_on`: Timestamp of creation. +- `updated_on`: Timestamp of last update. ### 1.2. Special Use Fields + Fields with specific purposes or conditional usage across different object types. -* `for_type`: Indicates the type of object this object is linked to (e.g., 'account', 'event'). -* `for_id`: The ID of the object this object is linked to. -* `archive_on`: Timestamp indicating when an object was archived. -* `passcode`: A password or access code associated with an object. -* `external_id`: An identifier from an external system. + +- `for_type`: Indicates the type of object this object is linked to (e.g., 'account', 'event'). +- `for_id`: The ID of the object this object is linked to. +- `archive_on`: Timestamp indicating when an object was archived. +- `passcode`: A password or access code associated with an object. +- `external_id`: An identifier from an external system. ### 1.3. Configuration and JSON Fields + Fields designed to store structured data in JSON format. -* `cfg_json`: Configuration data for an object, stored as a JSON string. -* `data_json`: General purpose data for an object, stored as a JSON string. -* `linked_li_json`: A list of linked items, stored as a JSON string. + +- `cfg_json`: Configuration data for an object, stored as a JSON string. +- `data_json`: General purpose data for an object, stored as a JSON string. +- `linked_li_json`: A list of linked items, stored as a JSON string. ### 1.4. Special Generated Fields (Client-side) + These fields are generated on the client-side, primarily for facilitating UI logic, such as sorting. They are not typically stored in the backend database. -* `tmp_sort_1`: Temporary sort field 1. -* `tmp_sort_2`: Temporary sort field 2. -* `tmp_sort_3`: Temporary sort field 3. + +- `tmp_sort_1`: Temporary sort field 1. +- `tmp_sort_2`: Temporary sort field 2. +- `tmp_sort_3`: Temporary sort field 3. ### 1.5. Future Standard Fields + A list of potential future standard fields, often prefixed with `obj_`. These are conceptual and represent planned expansions to the data model. -* `obj_id`, `obj_ext_uid`, `obj_ext_id`, `obj_import_id`, `obj_code`, `obj_account_id`, `obj_passcode`, `obj_type`, `obj_type_ver_id`, `obj_name`, `obj_summary`, `obj_outline`, `obj_description`, `obj_enable`, `obj_enable_on`, `obj_archive_on`, `obj_hide`, `obj_priority`, `obj_sort`, `obj_group`, `obj_cfg_json`, `obj_notes`, `obj_created_on`, `obj_updated_on`. + +- `obj_id`, `obj_ext_uid`, `obj_ext_id`, `obj_import_id`, `obj_code`, `obj_account_id`, `obj_passcode`, `obj_type`, `obj_type_ver_id`, `obj_name`, `obj_summary`, `obj_outline`, `obj_description`, `obj_enable`, `obj_enable_on`, `obj_archive_on`, `obj_hide`, `obj_priority`, `obj_sort`, `obj_group`, `obj_cfg_json`, `obj_notes`, `obj_created_on`, `obj_updated_on`. ## 2. Data Sorting + Standardized sorting orders are applied across various data lists to ensure consistent presentation. -* **Default/General Sorting:** `group > priority > sort > updated_on/created_on` -* **Specific Sorting (e.g., for time-based events):** `type > start_date/time > code or name` + +- **Default/General Sorting:** `group > priority > sort > updated_on/created_on` +- **Specific Sorting (e.g., for time-based events):** `type > start_date/time > code or name` ## 3. Data Storage Mechanisms ### 3.1. Local Storage + Used for client-side persistence of various application states and configurations. -* `api`: Stores API-related settings and tokens. -* `app`: Stores global application settings and preferences. -* `core`: Stores settings and data specific to core modules. -* ``: Stores settings and data specific to extended modules (e.g., `journals`, `events`). -* ``: Stores settings and data specific to custom modules (e.g., `idaa`). + +- `api`: Stores API-related settings and tokens. +- `app`: Stores global application settings and preferences. +- `core`: Stores settings and data specific to core modules. +- ``: Stores settings and data specific to extended modules (e.g., `journals`, `events`). +- ``: Stores settings and data specific to custom modules (e.g., `idaa`). ### 3.2. IndexedDB (Dexie.js) + Used for more structured client-side data storage, often for caching, offline capabilities, and larger datasets. -* `ae_core_db`: The primary Dexie database instance for core application data. -* ``: Module-specific database instances (e.g., `db_journals` for journal data). -* ``: Custom module-specific database instances (none currently defined, but reserved for future use). + +- `ae_core_db`: The primary Dexie database instance for core application data. +- ``: Module-specific database instances (e.g., `db_journals` for journal data). +- ``: Custom module-specific database instances (none currently defined, but reserved for future use). ### 3.3. IndexedDB LiveQuery Usage + Dexie's `liveQuery` is used to provide reactive data streams from IndexedDB. -* `lq__xyz_obj`: Represents a read-only liveQuery result for a single object. -* `lqw__xyz_obj`: Represents a writable liveQuery result, typically used for forms and data binding. - * **Note:** When using `lqw__xyz_obj`, developers must carefully manage updates to avoid conflicts with the underlying liveQuery and ensure data integrity. + +- `lq__xyz_obj`: Represents a read-only liveQuery result for a single object. +- `lqw__xyz_obj`: Represents a writable liveQuery result, typically used for forms and data binding. + - **Note:** When using `lqw__xyz_obj`, developers must carefully manage updates to avoid conflicts with the underlying liveQuery and ensure data integrity. diff --git a/GEMINI.md b/GEMINI.md index 2b4ed17a..592dabfd 100644 --- a/GEMINI.md +++ b/GEMINI.md @@ -3,31 +3,35 @@ This project is a Svelte and SvelteKit based application, part of the Aether (AE) system. It uses Tailwind CSS and Skeleton for styling and some elements. This is the frontend UI/UX. The backend API uses Python FastAPI. Core Aether modules -* accounts - client account, not user account -* hosted_files -* people -* users -* sites and site_domains + +- accounts - client account, not user account +- hosted_files +- people +- users +- sites and site_domains Additional Aether modules -* events - * presentation management - import the program data (events, session, presentations, presenters, event files, locations/rooms, devices) - * launcher - Technically this is used with presentation management. It is part of the native app that uses Electron. One of the libraries is for functions that only work when the site is opened in an Electron app. For example the regular browser can not move files around on the local computer or run local commands. - * badge printing - * lead retrieval - attendee tracking; QR codes -* journals - journal, documentation, notes, diary, blog, etc -* idaa - One of my clients + +- events + - presentation management - import the program data (events, session, presentations, presenters, event files, locations/rooms, devices) + - launcher - Technically this is used with presentation management. It is part of the native app that uses Electron. One of the libraries is for functions that only work when the site is opened in an Electron app. For example the regular browser can not move files around on the local computer or run local commands. + - badge printing + - lead retrieval - attendee tracking; QR codes +- journals - journal, documentation, notes, diary, blog, etc +- idaa - One of my clients ## Documentation -* TODO.md -* Svelte - Introducing runes - https://svelte.dev/blog/runes -* Svelte - Breaking changes in runes mode - https://svelte.dev/docs/svelte/v5-migration-guide#Breaking-changes-in-runes-mode -* Dexie.js - Getting Started - https://dexie.org/docs/Tutorial/Getting-started -* Dexie.js - API Quick Reference - https://dexie.org/docs/API-Reference#quick-reference + +- TODO.md +- Svelte - Introducing runes - https://svelte.dev/blog/runes +- Svelte - Breaking changes in runes mode - https://svelte.dev/docs/svelte/v5-migration-guide#Breaking-changes-in-runes-mode +- Dexie.js - Getting Started - https://dexie.org/docs/Tutorial/Getting-started +- Dexie.js - API Quick Reference - https://dexie.org/docs/API-Reference#quick-reference ## Ignored Directories The following directories are ignored for various operations (e.g., search, file listing) to focus on relevant source code: + - `build` - `node_modules` - `tests` @@ -44,16 +48,16 @@ The refactoring strategy involved creating a local, non-exported `_process_gener **Key aspects of the refactoring:** -* **In-file Generic Helper (`_process_generic_props`):** This function handles common data transformations: - * **`*_random` ID Aliasing:** It automatically iterates over object keys and creates a non-suffixed alias for any key ending in `_random` (e.g., `person_id_random` becomes `person_id`). This is crucial for client-side logic that expects standard ID fields. - * **`tmp_sort` Field Generation:** It creates a set of basic `tmp_sort` fields for client-side sorting. +- **In-file Generic Helper (`_process_generic_props`):** This function handles common data transformations: + - **`*_random` ID Aliasing:** It automatically iterates over object keys and creates a non-suffixed alias for any key ending in `_random` (e.g., `person_id_random` becomes `person_id`). This is crucial for client-side logic that expects standard ID fields. + - **`tmp_sort` Field Generation:** It creates a set of basic `tmp_sort` fields for client-side sorting. -* **`specific_processor` Callback:** Module-specific logic is handled by a `specific_processor` callback function passed to the `_process_generic_props` helper. This allows for: - * **Unique `tmp_sort` Logic:** Modules can override the default `tmp_sort` fields with their own specific sorting requirements. - * **Content Processing:** Asynchronous operations like Markdown parsing (using `marked.parse`) are handled within the `specific_processor` for the relevant modules (e.g., `ae_journals__journal_entry.ts`). - * **Other Special Cases:** Any other module-specific data transformations are handled in this callback. +- **`specific_processor` Callback:** Module-specific logic is handled by a `specific_processor` callback function passed to the `_process_generic_props` helper. This allows for: + - **Unique `tmp_sort` Logic:** Modules can override the default `tmp_sort` fields with their own specific sorting requirements. + - **Content Processing:** Asynchronous operations like Markdown parsing (using `marked.parse`) are handled within the `specific_processor` for the relevant modules (e.g., `ae_journals__journal_entry.ts`). + - **Other Special Cases:** Any other module-specific data transformations are handled in this callback. -* **`core__crud_generic.ts` Cleanup:** The generic CRUD functions in `src/lib/ae_core/core__crud_generic.ts` were simplified: - * The `process_ae_obj__props` function in this file was deprecated. - * All calls to `process_ae_obj__props` and `db_save_ae_obj_li__ae_obj` were removed from the generic CRUD functions (`load_ae_obj_id`, `load_ae_obj_li`, etc.). - * These functions are now responsible only for API interaction, delegating all data processing and caching to the module-specific functions that call them. This enforces a cleaner separation of concerns. +- **`core__crud_generic.ts` Cleanup:** The generic CRUD functions in `src/lib/ae_core/core__crud_generic.ts` were simplified: + - The `process_ae_obj__props` function in this file was deprecated. + - All calls to `process_ae_obj__props` and `db_save_ae_obj_li__ae_obj` were removed from the generic CRUD functions (`load_ae_obj_id`, `load_ae_obj_li`, etc.). + - These functions are now responsible only for API interaction, delegating all data processing and caching to the module-specific functions that call them. This enforces a cleaner separation of concerns. diff --git a/NAMING_CONVENTIONS.md b/NAMING_CONVENTIONS.md index dbb2fcda..1ee2abda 100644 --- a/NAMING_CONVENTIONS.md +++ b/NAMING_CONVENTIONS.md @@ -1,83 +1,93 @@ # Aether Project Naming Conventions ## 1. General Principles -* **Clarity:** Names should clearly convey their purpose and meaning. -* **Consistency:** Adhere strictly to these guidelines across the entire codebase. -* **Readability:** Prioritize names that are easy to read and understand. -* **Conciseness:** Avoid unnecessary verbosity, but not at the expense of clarity. + +- **Clarity:** Names should clearly convey their purpose and meaning. +- **Consistency:** Adhere strictly to these guidelines across the entire codebase. +- **Readability:** Prioritize names that are easy to read and understand. +- **Conciseness:** Avoid unnecessary verbosity, but not at the expense of clarity. ## 2. File Naming -* **Logic/Service Files:** `ae___.ts` (e.g., `ae_core__account.ts`, `ae_events__event.ts`) -* **Database Definition Files:** `db_.ts` (e.g., `db_core.ts`, `db_journals.ts`) -* **Svelte Store Files:** `ae__stores.ts` (e.g., `ae_core_stores.ts`, `ae_journals_stores.ts`) -* **Svelte Components:** - * **Module-specific components:** `ae_comp____.svelte` (e.g., `ae_comp__events__event_card.svelte`) - * **Generic/reusable components:** `element_.svelte` (e.g., `element_input_file.svelte`, `element_qr_scanner_v2.svelte`) -* **SvelteKit Routes:** Follow SvelteKit's standard routing conventions (e.g., `+page.svelte`, `+layout.svelte`, `[id]/+page.svelte`). -* **CSS Files:** `ae--.css` (e.g., `ae-c-idaa-light.css`, `ae-osit-default.css`) + +- **Logic/Service Files:** `ae___.ts` (e.g., `ae_core__account.ts`, `ae_events__event.ts`) +- **Database Definition Files:** `db_.ts` (e.g., `db_core.ts`, `db_journals.ts`) +- **Svelte Store Files:** `ae__stores.ts` (e.g., `ae_core_stores.ts`, `ae_journals_stores.ts`) +- **Svelte Components:** + - **Module-specific components:** `ae_comp____.svelte` (e.g., `ae_comp__events__event_card.svelte`) + - **Generic/reusable components:** `element_.svelte` (e.g., `element_input_file.svelte`, `element_qr_scanner_v2.svelte`) +- **SvelteKit Routes:** Follow SvelteKit's standard routing conventions (e.g., `+page.svelte`, `+layout.svelte`, `[id]/+page.svelte`). +- **CSS Files:** `ae--.css` (e.g., `ae-c-idaa-light.css`, `ae-osit-default.css`) ## 3. Function and Variable Naming -* **Style:** Strictly `snake_case` for all function and variable names. - * **Deprecated:** `camelCase` should be refactored to `snake_case`. -* **Prefixes:** - * `load_ae_obj_id__`: For loading a single Aether object by ID. - * `load_ae_obj_li__`: For loading a list of Aether objects. - * `create_ae_obj__`: For creating an Aether object. - * `update_ae_obj__`: For updating an Aether object. - * `delete_ae_obj_id__`: For deleting an Aether object by ID. - * `db_save_ae_obj_li__`: For saving a list of Aether objects to IndexedDB. - * `db_update_ae_obj_id__`: For updating an Aether object in IndexedDB. - * `process_ae_obj___props`: For module-specific data transformation functions. - * **Deprecated:** Ambiguous `handle_` prefixes should be replaced with more descriptive `snake_case` names (e.g., `handle_submit_form` -> `submit_form`). + +- **Style:** Strictly `snake_case` for all function and variable names. + - **Deprecated:** `camelCase` should be refactored to `snake_case`. +- **Prefixes:** + - `load_ae_obj_id__`: For loading a single Aether object by ID. + - `load_ae_obj_li__`: For loading a list of Aether objects. + - `create_ae_obj__`: For creating an Aether object. + - `update_ae_obj__`: For updating an Aether object. + - `delete_ae_obj_id__`: For deleting an Aether object by ID. + - `db_save_ae_obj_li__`: For saving a list of Aether objects to IndexedDB. + - `db_update_ae_obj_id__`: For updating an Aether object in IndexedDB. + - `process_ae_obj___props`: For module-specific data transformation functions. + - **Deprecated:** Ambiguous `handle_` prefixes should be replaced with more descriptive `snake_case` names (e.g., `handle_submit_form` -> `submit_form`). ## 4. Object and Property Naming -* **Singularity:** Use singular nouns for objects and properties (e.g., `example.id`, not `examples.id`). -* **IDs:** - * `id`: Primary key for an object (internal use, often a UUID). - * `_id`: Specific ID for an object (e.g., `person_id`). - * `_id_random`: Randomly generated ID for an object (often used for external exposure or URL parameters). - * `account_id`, `site_id`, `user_id`, etc.: Foreign keys. -* **Common Properties:** - * `code`: Short, unique identifier. - * `name`: Display name. - * `description`: Longer text description. - * `enable`: Boolean for active/inactive status. - * `hide`: Boolean for visibility. - * `priority`: Numeric value for ordering. - * `sort`: Numeric value for ordering. - * `group`: Categorization string. - * `notes`: General notes/comments. - * `created_on`: Timestamp of creation. - * `updated_on`: Timestamp of last update. -* **Special Use Properties:** `for_type`, `for_id`, `archive_on`, `passcode`, `external_id`. -* **Config/JSON Properties:** `cfg_json`, `data_json`, `linked_li_json`. -* **Special Generated Fields (Client-side):** `tmp_sort_1`, `tmp_sort_2`, `tmp_sort_3` (for client-side sorting). + +- **Singularity:** Use singular nouns for objects and properties (e.g., `example.id`, not `examples.id`). +- **IDs:** + - `id`: Primary key for an object (internal use, often a UUID). + - `_id`: Specific ID for an object (e.g., `person_id`). + - `_id_random`: Randomly generated ID for an object (often used for external exposure or URL parameters). + - `account_id`, `site_id`, `user_id`, etc.: Foreign keys. +- **Common Properties:** + - `code`: Short, unique identifier. + - `name`: Display name. + - `description`: Longer text description. + - `enable`: Boolean for active/inactive status. + - `hide`: Boolean for visibility. + - `priority`: Numeric value for ordering. + - `sort`: Numeric value for ordering. + - `group`: Categorization string. + - `notes`: General notes/comments. + - `created_on`: Timestamp of creation. + - `updated_on`: Timestamp of last update. +- **Special Use Properties:** `for_type`, `for_id`, `archive_on`, `passcode`, `external_id`. +- **Config/JSON Properties:** `cfg_json`, `data_json`, `linked_li_json`. +- **Special Generated Fields (Client-side):** `tmp_sort_1`, `tmp_sort_2`, `tmp_sort_3` (for client-side sorting). ## 5. List Suffixes -* **Simple Arrays:** Use `_li` suffix for simple, unordered arrays (e.g., `user_li`, `hosted_file_id_li`). -* **Key-Value Maps/Objects:** Use `_kv` suffix for key-value objects/maps (e.g., `user_kv`, `hosted_file_obj_kv`). + +- **Simple Arrays:** Use `_li` suffix for simple, unordered arrays (e.g., `user_li`, `hosted_file_id_li`). +- **Key-Value Maps/Objects:** Use `_kv` suffix for key-value objects/maps (e.g., `user_kv`, `hosted_file_obj_kv`). ## 6. Interface and Type Naming -* **Style:** Use `PascalCase` for interface and type names (e.g., `Account`, `HostedFile`, `GenericCrudArgs`). + +- **Style:** Use `PascalCase` for interface and type names (e.g., `Account`, `HostedFile`, `GenericCrudArgs`). ## 7. Constants -* **Style:** Use `SCREAMING_SNAKE_CASE` for constants (e.g., `MAX_RETRIES`, `DEFAULT_TIMEOUT`). + +- **Style:** Use `SCREAMING_SNAKE_CASE` for constants (e.g., `MAX_RETRIES`, `DEFAULT_TIMEOUT`). ## 8. CSS Classes and IDs -* **Style:** Use `kebab-case` for CSS classes and IDs (e.g., `my-component-class`, `main-header-id`). + +- **Style:** Use `kebab-case` for CSS classes and IDs (e.g., `my-component-class`, `main-header-id`). ## 9. Data Sorting -* **Standard Order:** `group > priority > sort > updated_on/created_on` -* **Specific Order:** `type > start_date/time > code or name` + +- **Standard Order:** `group > priority > sort > updated_on/created_on` +- **Specific Order:** `type > start_date/time > code or name` ## 10. Local Storage and IndexedDB Keys -* **Local Storage:** - * `api` - * `app` (global) - * `core` (core modules) - * `` (extended modules) - * `` (custom modules) -* **IndexedDB:** - * `ae_core_db` - * `` - * `` + +- **Local Storage:** + - `api` + - `app` (global) + - `core` (core modules) + - `` (extended modules) + - `` (custom modules) +- **IndexedDB:** + - `ae_core_db` + - `` + - `` diff --git a/OLD_README_guidelines_ui_ux.md b/OLD_README_guidelines_ui_ux.md index 4e583877..61470890 100644 --- a/OLD_README_guidelines_ui_ux.md +++ b/OLD_README_guidelines_ui_ux.md @@ -1,120 +1,137 @@ # AE UI Components, Layout, and Style Standards (HTML/CSS) ## Aether Components + ### System Components -* [header] -* [main/module]s -* [footer] -* [app] refresh, clear IDB, clear local storage (settings), iframe toggle (also updates URL param), copy URL, generate and show QR -* [menu][mode] edit, more (all or details) -* [menu][access_type] passcode input, clear -* [menu][user] sign in/out, reset password, email link, change username and email -* [menu][theme] mode (light/dark), name (theme list) -* [debug] toggle (also updates URL param), show core and module storages, manually set init timestamp -* [scroll_to] top, page up, page down, bottom + +- [header] +- [main/module]s +- [footer] +- [app] refresh, clear IDB, clear local storage (settings), iframe toggle (also updates URL param), copy URL, generate and show QR +- [menu][mode] edit, more (all or details) +- [menu][access_type] passcode input, clear +- [menu][user] sign in/out, reset password, email link, change username and email +- [menu][theme] mode (light/dark), name (theme list) +- [debug] toggle (also updates URL param), show core and module storages, manually set init timestamp +- [scroll_to] top, page up, page down, bottom ### Core Components -* [copy_btn] clipboard, bind:value, btn_text, btn_html -* [txt_editor] textarea -* [md_editor] CodeMirror, ShadEditor TipTap (need to remove) -* [html_editor] -* [media_player] - * hosted_file archive_content media_player, - * bind:host_id, - * bind:media_type - * status - stopped, paused, playing -* [hosted_file_li] manage_hosted_file_li, make available for selection -* [hosted_file_link_to] list links per object, bind:add link, bind:remove link -* [upload_to_host] - input_hosted_file; needs to handle multiple files - * link_type, - * link_id, - * inner fragment - label html - * bind:trigger - * bind:show_spinner - * bind:show_percent - * status - * result - started, uploading, finished -* [upload_file_tbl] input_hosted_file_tbl, check for dup file hash, remove from list -* [download_from_host] - * bind:host_file_id - * bind:filename - * bind:file_ext - * btn inner fragment - * bind:trigger - * bind:show_spinner - * bind:show_percent - * status - * result - started, downloading, finished -* [data_store] -* [ae_crud] need to simplify! obj, prop, current_value, bind:value, bind:trigger, inner fragment -* [ae_obj_prop_val] - essentially a wrapper for the function - * bind:obj_type - * bind:obj_id - * bind:obj_prop - * bind:obj_value - * bind:obj_new_value - * bind:trigger - * bind:show_spinner - * bind:show_percent - * status - * result -* [sql_qry] -* [obj_tbl] obj sql results tbl or similar -* [qr_scanner] -* [websocket] + +- [copy_btn] clipboard, bind:value, btn_text, btn_html +- [txt_editor] textarea +- [md_editor] CodeMirror, ShadEditor TipTap (need to remove) +- [html_editor] +- [media_player] + - hosted_file archive_content media_player, + - bind:host_id, + - bind:media_type + - status - stopped, paused, playing +- [hosted_file_li] manage_hosted_file_li, make available for selection +- [hosted_file_link_to] list links per object, bind:add link, bind:remove link +- [upload_to_host] - input_hosted_file; needs to handle multiple files + - link_type, + - link_id, + - inner fragment - label html + - bind:trigger + - bind:show_spinner + - bind:show_percent + - status + - result - started, uploading, finished +- [upload_file_tbl] input_hosted_file_tbl, check for dup file hash, remove from list +- [download_from_host] + - bind:host_file_id + - bind:filename + - bind:file_ext + - btn inner fragment + - bind:trigger + - bind:show_spinner + - bind:show_percent + - status + - result - started, downloading, finished +- [data_store] +- [ae_crud] need to simplify! obj, prop, current_value, bind:value, bind:trigger, inner fragment +- [ae_obj_prop_val] - essentially a wrapper for the function + - bind:obj_type + - bind:obj_id + - bind:obj_prop + - bind:obj_value + - bind:obj_new_value + - bind:trigger + - bind:show_spinner + - bind:show_percent + - status + - result +- [sql_qry] +- [obj_tbl] obj sql results tbl or similar +- [qr_scanner] +- [websocket] ### Main / Module Components -* [menu][options] various settings, show/hide content and options, limit, sorting options, etc -* [menu][actions] various actions, sign in/out, email + +- [menu][options] various settings, show/hide content and options, limit, sorting options, etc +- [menu][actions] various actions, sign in/out, email ### Object Menu -* properties: id, name, group, priority, sort, alert, hide, enable, note -* future properties: ext_id (not ready yet), ext_sys_id (not ready yet), code (not ready yet) -* actions: create, view, edit, update, hide, disable, delete, alert (message), archive (not ready yet) -* future actions: copy, import -* sort options: - * [default] group > priority > sort (ASC/DESC) > alert > name - * [sort_updated] group > priority > sort (ASC/DESC) > alert > updated_on > created_on - * [priority_updated] group > priority > updated_on (ASC/DESC) > created_on - * [priority_name] group > priority > name (ASC/DESC) > sort > alert > updated_on > created_on - * [name] priority > name (ASC/DESC) > sort > alert > updated_on > created_on - * [created_on] priority > created_on (ASC/DESC) - * [updated_on] priority > updated_on (ASC/DESC) > created_on + +- properties: id, name, group, priority, sort, alert, hide, enable, note +- future properties: ext_id (not ready yet), ext_sys_id (not ready yet), code (not ready yet) +- actions: create, view, edit, update, hide, disable, delete, alert (message), archive (not ready yet) +- future actions: copy, import +- sort options: + - [default] group > priority > sort (ASC/DESC) > alert > name + - [sort_updated] group > priority > sort (ASC/DESC) > alert > updated_on > created_on + - [priority_updated] group > priority > updated_on (ASC/DESC) > created_on + - [priority_name] group > priority > name (ASC/DESC) > sort > alert > updated_on > created_on + - [name] priority > name (ASC/DESC) > sort > alert > updated_on > created_on + - [created_on] priority > created_on (ASC/DESC) + - [updated_on] priority > updated_on (ASC/DESC) > created_on ### Pop-ups: -* modal_header - * title - * close -* modal_main -* modal_meta -* modal_footer - * close + +- modal_header + - title + - close +- modal_main +- modal_meta +- modal_footer + - close + #### Pop-up Modal (blocking) -* modal position + +- modal position + #### Pop-up Modal Inline -* inline, inline-block, block + +- inline, inline-block, block + #### Pop-up Dialog -* dialog position + +- dialog position ## Containers + ### Navigation -* link -* download + +- link +- download ### Forms -* save -* clear value -* set null value + +- save +- clear value +- set null value ### Other Containers -* help - blue -* info - blue -* alert - yellow -* warning - orange -* error - red -* message - green + +- help - blue +- info - blue +- alert - yellow +- warning - orange +- error - red +- message - green --- ## Need to organize: -* lu: id, account_id, for_obj_id, code, name, description, group, sort, priority, enable, perm_level \ No newline at end of file + +- lu: id, account_id, for_obj_id, code, name, description, group, sort, priority, enable, perm_level diff --git a/OLD_README_guidelines_v1.md b/OLD_README_guidelines_v1.md index bd23a3e5..82f4192b 100644 --- a/OLD_README_guidelines_v1.md +++ b/OLD_README_guidelines_v1.md @@ -1,13 +1,17 @@ # One Sky IT's Aether App - UI and UX Guidelines and Rules - ## General + ### Events + #### layout header + #### layout footer ### Journals + #### buttons + ##### alert ##### info @@ -15,52 +19,62 @@ ##### priority, flag ##### warning, hide + ```css variant-soft-warning hover:variant-filled-warning ``` + ##### error, delete, disable + ```css variant-soft-error hover:variant-filled-error ``` + #### new root layout header + #### submenu + ```css flex flex-row items-center justify-center gap-1 ``` -#### new layout footer +#### new layout footer ## Svelte 5 and SvelteKit v2 (framework and routing) - ## Tailwind 3.x CSS (styles) -Waiting to upgrade to 4.x when ShadCN is ready. ShadCN is still being worked on as of late March 2025. -* https://ui.shadcn.com/docs/tailwind-v4 +Waiting to upgrade to 4.x when ShadCN is ready. ShadCN is still being worked on as of late March 2025. + +- https://ui.shadcn.com/docs/tailwind-v4 ## CodeMirror 6.x (text and code editor) -* https://codemirror.net + +- https://codemirror.net ## ShadCN (Tailwind Components) -* https://ui.shadcn.com/docs -* https://github.com/shadcn-ui/ui +- https://ui.shadcn.com/docs +- https://github.com/shadcn-ui/ui ## Skeleton (Design System, Tailwind Components, Functional Components) + Waiting to upgrade to Skeleton v3. Mostly because of the Tailwind 4.x upgrade needed for ShadCN. -* https://www.skeleton.dev/docs/get-started/migrate-from-v2 + +- https://www.skeleton.dev/docs/get-started/migrate-from-v2 ## Flowbite (Tailwind Components) - ## Lucide Icons (SVG Icons) -* https://lucide.dev/icons/ +- https://lucide.dev/icons/ ## Markdown -Using marked for Markdown parsing. -* https://marked.js.org/ +Using marked for Markdown parsing. + +- https://marked.js.org/ ## Edra (TipTap based Rich Text Editor) -* https://edra.tsuzat.com/ + +- https://edra.tsuzat.com/ diff --git a/OLD_README_guidelines_v2.md b/OLD_README_guidelines_v2.md index 31ac200b..ad854e47 100644 --- a/OLD_README_guidelines_v2.md +++ b/OLD_README_guidelines_v2.md @@ -1,68 +1,86 @@ # AE Svelte and SvelteKit Technical Standards ## Official Modules + ### Core -* Accounts - Minimal -* Files -* People - Minimal -* Sites - Minimal -* Users - Minimal + +- Accounts - Minimal +- Files +- People - Minimal +- Sites - Minimal +- Users - Minimal + ### Extended + Archives - Minimal, Events - Badges, Events - Presentation Management, Posts - Minimal, Journals + ### Custom + IDAA - Archives, IDAA - BB, IDAA - Recovery Meetings --- ## localStorage: -* api -* app - global -* core - core modules -* [module] - extended modules -* [custom] - custom modules + +- api +- app - global +- core - core modules +- [module] - extended modules +- [custom] - custom modules --- ## Indexed DB -* ae_core_db -* [module] -* [custom] - custom modules: none currently + +- ae_core_db +- [module] +- [custom] - custom modules: none currently --- ## Data Sorting -* group > priority > sort > updated/created on -* type > start date/time > code or name + +- group > priority > sort > updated/created on +- type > start date/time > code or name --- ## Objects + ### Function - Obj Prop Update -* obj_type -* obj_id -* obj_prop -* obj_value + +- obj_type +- obj_id +- obj_prop +- obj_value + ### Core + ### Extended + ### Custom --- ## Object Properties or Fields + ### Core -Expected standard field names: id, id_random, [obj-type]_id_random, code, name, enable, hide, priority, sort, group, notes, created_on, updated_on + +Expected standard field names: id, id_random, [obj-type]\_id_random, code, name, enable, hide, priority, sort, group, notes, created_on, updated_on Special use field names: for_type, for_id, archive_on, passcode, external_id ### Configs and Fields with JSON -* cfg_json -* data_json -* linked_li_json + +- cfg_json +- data_json +- linked_li_json ### Special Generated Fields + tmp_sort_1, tmp_sort_2, - ### Future standard fields!!! + obj_id?: null|string; obj_ext_uid?: null|string; // Probably not needed for journals obj_ext_id?: null|string; // Probably not needed for journals @@ -89,59 +107,65 @@ obj_created_on?: Date; obj_updated_on?: null|Date; ## Dixie IDB liveQuery with Select Objects (slct) and Lists of Objects (slct_x_li) -Use this method below to create a read/write snapshot of the current liveQuery results. This allows you to use it as part of a form and binding values. It might make since to call this something like "lqw__x_obj" and "lqw__x_obj_li". lqw = liveQuery writable -lq__xyz_obj - Use for general read only -lqw__xyz_obj - Use for forms and binding values. What happens if the actual LQ obj is updated after the bind? +Use this method below to create a read/write snapshot of the current liveQuery results. This allows you to use it as part of a form and binding values. It might make since to call this something like "lqw**x_obj" and "lqw**x_obj_li". lqw = liveQuery writable + +lq**xyz_obj - Use for general read only +lqw**xyz_obj - Use for forms and binding values. What happens if the actual LQ obj is updated after the bind? $slct or $lqw ? - -Sort of related.... more permission/security though: Create a new table that will be attached to every v_ view in the DB. This new table would be a field permission list. It could work similar to the data_store table and related view. This seems like a good idea????? 2025-08-11 +Sort of related.... more permission/security though: Create a new table that will be attached to every v\_ view in the DB. This new table would be a field permission list. It could work similar to the data_store table and related view. This seems like a good idea????? 2025-08-11 ```ts -let lq__post_obj = $derived(liveQuery(async () => { - if (log_lvl) { - console.log(`lq__post_obj: post_id = ${$idaa_slct?.post_id}`); - } - let results = await db_posts.post - .get($idaa_slct.post_id ?? ''); // null or undefined does not reset things like '' does +let lq__post_obj = $derived( + liveQuery(async () => { + if (log_lvl) { + console.log(`lq__post_obj: post_id = ${$idaa_slct?.post_id}`); + } + let results = await db_posts.post.get($idaa_slct.post_id ?? ''); // null or undefined does not reset things like '' does - // Check if results are different than the current $idaa_slct.post_obj - if ($idaa_slct.post_obj && results) { - if (JSON.stringify($idaa_slct.post_obj) !== JSON.stringify(results)) { - $idaa_slct.post_obj = { ...results}; - if (log_lvl) { - console.log(`$idaa_slct.post_obj = `, $idaa_slct.post_obj); - } - } else { - if (log_lvl) { - console.log(`Post object has not changed for post_id: ${$idaa_slct.post_id}`); - } - } - } + // Check if results are different than the current $idaa_slct.post_obj + if ($idaa_slct.post_obj && results) { + if (JSON.stringify($idaa_slct.post_obj) !== JSON.stringify(results)) { + $idaa_slct.post_obj = { ...results }; + if (log_lvl) { + console.log(`$idaa_slct.post_obj = `, $idaa_slct.post_obj); + } + } else { + if (log_lvl) { + console.log(`Post object has not changed for post_id: ${$idaa_slct.post_id}`); + } + } + } - return results; -})); + return results; + }) +); -let lq__post_comment_obj_li = $derived(liveQuery(async () => { - let results = await db_posts.comment - .where('post_id') - .equals($idaa_slct.post_id ?? '') // null or undefined does not reset things like '' does - .reverse() - .sortBy('updated_on'); - // .sortBy('title'); +let lq__post_comment_obj_li = $derived( + liveQuery(async () => { + let results = await db_posts.comment + .where('post_id') + .equals($idaa_slct.post_id ?? '') // null or undefined does not reset things like '' does + .reverse() + .sortBy('updated_on'); + // .sortBy('title'); - if ($idaa_slct.post_comment_obj_li && JSON.stringify($idaa_slct.post_comment_obj_li) !== JSON.stringify(results)) { - $idaa_slct.post_comment_obj_li = [...results]; - if (log_lvl) { - console.log(`$idaa_slct.post_comment_obj_li = `, $idaa_slct.post_comment_obj_li); - } - } else { - if (log_lvl) { - console.log(`Post comment object list has not changed for post_id: ${$idaa_slct.post_id}`); - } - } + if ( + $idaa_slct.post_comment_obj_li && + JSON.stringify($idaa_slct.post_comment_obj_li) !== JSON.stringify(results) + ) { + $idaa_slct.post_comment_obj_li = [...results]; + if (log_lvl) { + console.log(`$idaa_slct.post_comment_obj_li = `, $idaa_slct.post_comment_obj_li); + } + } else { + if (log_lvl) { + console.log(`Post comment object list has not changed for post_id: ${$idaa_slct.post_id}`); + } + } - return results; -})); -``` \ No newline at end of file + return results; + }) +); +``` diff --git a/README.md b/README.md index 28644708..9152a35b 100644 --- a/README.md +++ b/README.md @@ -2,38 +2,46 @@ This uses SvelteKit version 2.x with Svelte version 5.x, TailwindCSS 4.1, and Skelton. - # Current Modules ## AE Events - Speakers (/events_speakers) + ### Components -* +page.svelte - The main page for the Events - Speakers module -* 10_edit_modal__event_presenter_obj.svelte - The modal for editing a presenter -* 10_list__event_presenter_obj.svelte - The list of presenters/speakers -* 10_view_modal__event_presenter_obj.svelte - The modal for viewing a presenter + +- +page.svelte - The main page for the Events - Speakers module +- 10_edit_modal\_\_event_presenter_obj.svelte - The modal for editing a presenter +- 10_list\_\_event_presenter_obj.svelte - The list of presenters/speakers +- 10_view_modal\_\_event_presenter_obj.svelte - The modal for viewing a presenter + ### Path [slug] -* +page.svelte - The main page for the presenter ID [slug] + +- +page.svelte - The main page for the presenter ID [slug] ## AE Sponsorships (/sponsorships) -* +page.svelte - The main page for the Sponsorships module -* 10_edit_modal__sponsorship_obj.svelte - The modal for editing a sponsorship -* 10_list__sponsorship_obj.svelte - The list of sponsorships -* 10_view_modal__sponsorship_obj.svelte - The modal for viewing a sponsorship -### Path [slug] -* +page.svelte - The main page for the sponsorship ID [slug] +- +page.svelte - The main page for the Sponsorships module +- 10_edit_modal\_\_sponsorship_obj.svelte - The modal for editing a sponsorship +- 10_list\_\_sponsorship_obj.svelte - The list of sponsorships +- 10_view_modal\_\_sponsorship_obj.svelte - The modal for viewing a sponsorship + +### Path [slug] + +- +page.svelte - The main page for the sponsorship ID [slug] # Future Modules + ## AE Events - Badges (/events_badges) -* +page.svelte - The main page for the Events - Badges module -* 10_list__event_badge_obj.svelte - The list of badges -* 10_view_modal__event_badge_obj.svelte - The modal for viewing a badge + +- +page.svelte - The main page for the Events - Badges module +- 10_list\_\_event_badge_obj.svelte - The list of badges +- 10_view_modal\_\_event_badge_obj.svelte - The modal for viewing a badge ## AE Events - Exhibit Leads (/events_exhibit_leads) + ## AE Events - Presentation Management (/events_pres_mgmt) - # How to build and deploy SvelteKit: + Copy the contents of the "build" directory to ./npm_deploy/build/ ```bash @@ -41,6 +49,7 @@ npm run build ``` If this is just a quick build update then only the build directory needs to be copied (rsync). + ```bash rsync -vhrz --exclude 'node_modules' ~/OSIT_dev/ae_app_svelte_tailwind_skeleton/build/ ~/OSIT_dev/ae_env_node_app/npm_deploy/build/ --delete @@ -50,6 +59,7 @@ rsync -vhrz ~/OSIT_dev/ae_env_node_app/npm_deploy/build/ scott@linode.oneskyit.c If this includes package updates (not development) we need to copy the new package.json. Manually copy the new package.json file to ./npm_deploy/. This also needs to be copied to the server. Copy the package.json even though not really used. Run the --omit dev to clear out the node_modules directory. Copy the root node_modules directory to ./npm_deploy/build/node_modules/ after running te omit dev command. + ```bash npm ci --omit dev @@ -63,10 +73,10 @@ npm install Everything should be ready to run on the development server and production server. - # Rebuild the node_modules directory and manually install extra Svelte packages Run the npm update to fix the node_modules directory and package.json + ```bash npm list npm outdated @@ -77,6 +87,7 @@ npm list Other installs?: Are both still needed? I know at least one of these is. 2024-07-23 + ```bash npm install --save-dev svelte-highlight npm install --save-dev typescript-svelte-plugin @@ -96,13 +107,15 @@ npm install flowbite flowbite-svelte tailwind-merge @popperjs/core I am slowly switching from Font-Awesome to Lucide ## Tiptap Editor -* Eventually use Edra? https://edra.tsuzat.com/ - * Best Rich Text Editor, made for Svelte Developers with Tiptap - * ShadEditor is "evolving" to be Edra. -* ShadCN is still stuck on Tailwind 3. Waiting to upgrade to Tailwind 4.x. Tailwind 4.x was released in late January 2025. ShadCN is still being worked on as of late March 2025. -* [https://github.com/huntabyte/shadcn-svelte/issues/1643](https://github.com/huntabyte/shadcn-svelte/issues/1643) + +- Eventually use Edra? https://edra.tsuzat.com/ + - Best Rich Text Editor, made for Svelte Developers with Tiptap + - ShadEditor is "evolving" to be Edra. +- ShadCN is still stuck on Tailwind 3. Waiting to upgrade to Tailwind 4.x. Tailwind 4.x was released in late January 2025. ShadCN is still being worked on as of late March 2025. +- [https://github.com/huntabyte/shadcn-svelte/issues/1643](https://github.com/huntabyte/shadcn-svelte/issues/1643) Need to install ShadCN and Lucide for the Tiptap editor. + ```bash npm install shadcn-svelte npm install lucide-svelte @@ -110,6 +123,7 @@ npm install mode-watcher ``` Now we initialize the ShadCN and ShadEditor packages. Follow the command line instructions. + ```bash npx shadcn-svelte@next init npx shadcn-svelte@next add dropdown-menu button tooltip input popover separator @@ -117,6 +131,7 @@ npx shadeditor init ``` More packages related to the Tiptap editor??? + ```bash npm install @tiptap/extension-link @tiptap/extension-bullet-list @tiptap/extension-history @tiptap/extension-typography @tiptap/extension-underline ``` @@ -124,23 +139,31 @@ npm install @tiptap/extension-link @tiptap/extension-bullet-list @tiptap/extensi ## Build ## Environment file + ### ".env" + This is the default used if others are not found when when "npm run dev" or "npm run build" is run. ### ".env.local" + This is used when "npm run dev" is run. This is not used in the production build. ### ".env.production" + This is used when "npm run build" is run. This is not used in the development build. ### ".env:prod" + This is modified to allow for a staging environment and production environment built. ### ".env:staging" + This is modified to allow for a staging environment and production environment built. ### Example Important Values when running in dev: + Note: Environment values need to be updated when our home IP address changes. Be sure to check the Aether Container Environment and Aether Node App (SvelteKit) Environment files for the correct IP address. The Node Docker environment needs to be updated here and in the .env file that Docker will read. This needs to be improved later... + ```bash DOCKER_AE_API_DEV_SERVER_EXTRA_HOST=dev-api.oneskyit.com:108.48.200.147 @@ -150,7 +173,6 @@ PUBLIC_AE_API_SERVER=api.oneskyit.com PUBLIC_AE_API_BAK_SERVER=bak-api.oneskyit.com ``` - # create-svelte Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). diff --git a/SVELTE_DEXIE_GUIDE.md b/SVELTE_DEXIE_GUIDE.md index 6b9c0160..0ed74f2c 100644 --- a/SVELTE_DEXIE_GUIDE.md +++ b/SVELTE_DEXIE_GUIDE.md @@ -8,11 +8,11 @@ Svelte 5 introduces "runes" as a new way to manage reactivity. This is a major c ### Key Breaking Changes -* **`let` is no longer reactive:** In Svelte 4, any `let` variable declared in the top-level scope of a component was automatically reactive. In Svelte 5, you must explicitly declare reactive state using the `$state` rune. -* **`$:` is replaced by `$derived` and `$effect`:** The `$` label is no longer used for reactive statements. Instead, you should use the `$derived` rune for computed values and the `$effect` rune for side effects. -* **`export let` is replaced by `$props`:** Component props are now declared using the `$props` rune, which provides a more flexible and explicit way to define component APIs. -* **Event handling:** The `on:` directive is replaced by event attributes (e.g., `onclick`). Component events are now handled using callback props instead of `createEventDispatcher`. -* **Slots are replaced by snippets:** The `` element is replaced by the `{#snippet ...}` block, which provides a more powerful and flexible way to pass content to components. +- **`let` is no longer reactive:** In Svelte 4, any `let` variable declared in the top-level scope of a component was automatically reactive. In Svelte 5, you must explicitly declare reactive state using the `$state` rune. +- **`$:` is replaced by `$derived` and `$effect`:** The `$` label is no longer used for reactive statements. Instead, you should use the `$derived` rune for computed values and the `$effect` rune for side effects. +- **`export let` is replaced by `$props`:** Component props are now declared using the `$props` rune, which provides a more flexible and explicit way to define component APIs. +- **Event handling:** The `on:` directive is replaced by event attributes (e.g., `onclick`). Component events are now handled using callback props instead of `createEventDispatcher`. +- **Slots are replaced by snippets:** The `` element is replaced by the `{#snippet ...}` block, which provides a more powerful and flexible way to pass content to components. For a complete list of breaking changes, refer to the [Svelte 5 migration guide](https://svelte.dev/docs/svelte/v5-migration-guide). @@ -22,24 +22,24 @@ Dexie.js is a lightweight, minimalistic wrapper for IndexedDB that makes it easi ### Key Classes and Methods -* **`Dexie`:** The main class for creating and managing IndexedDB databases. - * `new Dexie(databaseName)`: Creates a new database instance. - * `version(versionNumber).stores({ ... })`: Defines the database schema. -* **`Table`:** Represents an object store (table) in the database. - * `add(item)`: Adds a new item to the table. - * `put(item)`: Adds or updates an item in the table. - * `update(key, changes)`: Updates an existing item. - * `delete(key)`: Deletes an item by its primary key. - * `get(key)`: Retrieves an item by its primary key. - * `where(index)`: Starts a query using an index. - * `toArray()`: Retrieves all items from the table as an array. -* **`Collection`:** Represents a collection of items resulting from a query. - * `toArray()`: Retrieves all items in the collection as an array. - * `first()`: Retrieves the first item in the collection. - * `last()`: Retrieves the last item in the collection. - * `each(callback)`: Iterates over each item in the collection. - * `modify(changes)`: Updates all items in the collection. - * `delete()`: Deletes all items in the collection. +- **`Dexie`:** The main class for creating and managing IndexedDB databases. + - `new Dexie(databaseName)`: Creates a new database instance. + - `version(versionNumber).stores({ ... })`: Defines the database schema. +- **`Table`:** Represents an object store (table) in the database. + - `add(item)`: Adds a new item to the table. + - `put(item)`: Adds or updates an item in the table. + - `update(key, changes)`: Updates an existing item. + - `delete(key)`: Deletes an item by its primary key. + - `get(key)`: Retrieves an item by its primary key. + - `where(index)`: Starts a query using an index. + - `toArray()`: Retrieves all items from the table as an array. +- **`Collection`:** Represents a collection of items resulting from a query. + - `toArray()`: Retrieves all items in the collection as an array. + - `first()`: Retrieves the first item in the collection. + - `last()`: Retrieves the last item in the collection. + - `each(callback)`: Iterates over each item in the collection. + - `modify(changes)`: Updates all items in the collection. + - `delete()`: Deletes all items in the collection. For a complete list of API methods, refer to the [Dexie.js API Reference](https://dexie.org/docs/API-Reference). @@ -63,13 +63,13 @@ import { readable } from 'svelte/store'; import { db } from './db'; // Your Dexie database instance export function createLiveQueryStore(query: () => T | Promise) { - return readable(undefined, (set) => { - const subscription = liveQuery(query).subscribe({ - next: (result) => set(result), - error: (error) => console.error(error), - }); - return () => subscription.unsubscribe(); - }); + return readable(undefined, (set) => { + const subscription = liveQuery(query).subscribe({ + next: (result) => set(result), + error: (error) => console.error(error) + }); + return () => subscription.unsubscribe(); + }); } ``` @@ -77,18 +77,16 @@ export function createLiveQueryStore(query: () => T | Promise) { ```html
    - {#if $friends} - {#each $friends as friend} -
  • {friend.name}
  • - {/each} - {/if} + {#if $friends} {#each $friends as friend} +
  • {friend.name}
  • + {/each} {/if}
``` diff --git a/TODO.md b/TODO.md index 1e619005..574c7090 100644 --- a/TODO.md +++ b/TODO.md @@ -4,17 +4,30 @@ This is a list of tasks to be completed before the next event/show/conference. --- +## Recent Accomplishments + +- [x] **Refactoring:** Standardized data processing in `events`, `archives`, `posts`, and `sponsorships` modules using a new generic pattern. +- [x] **Bug Fix:** Corrected data fetching logic for session-related presentations and files that were not displaying correctly due to `id` vs `id_random` issues. +- [x] **Core:** Defined `Account`, `Site`, and `Site_Domain` interfaces in new files under `src/lib/ae_core/`. +- [x] **Journals:** Improve the empty state message in `src/routes/journals/+page.svelte`. +- [x] **Journals:** Add a loading indicator to the main journals page. +- [x] **IDAA:** Add a loading indicator to the archives page (`src/routes/idaa/(idaa)/archives/+page.svelte`). +- [x] **Events:** Add pagination to the main event list in `src/routes/events/+page.svelte`. + +--- + ## Big Picture Goals -* Able to cache data and mostly work offline. -* The new Events Launcher must be able to work offline and query the API for changes to data. -* The new Events Launcher must be able to run inside an Electron app and have access to local files and commands. This includes loading a special library that only works in Electron. +- Able to cache data and mostly work offline. +- The new Events Launcher must be able to work offline and query the API for changes to data. +- The new Events Launcher must be able to run inside an Electron app and have access to local files and commands. This includes loading a special library that only works in Electron. --- ## Codebase Standardization ### 1. Naming Conventions + - [ ] **Goal:** Enforce a single, consistent naming standard across the entire codebase. - [ ] **Files:** - Logic: `ae___.ts` @@ -35,6 +48,7 @@ This is a list of tasks to be completed before the next event/show/conference. - **Update 2025-11-13:** `ae_core_functions.ts` has been temporarily restored to resolve a critical issue. The refactoring of `process_ae_obj__*_props()` functions will now proceed module by module, ensuring stability at each step. ### 2. Component Standardization + - [ ] **CodeMirror Migration:** Plan and execute the replacement of the `shad-editor` and potentially other text editors (like Tiptap) with `CodeMirror` to standardize rich text editing. - [ ] **Component Review:** Audit third-party components to understand their conventions and isolate them from internal standards. @@ -42,11 +56,7 @@ This is a list of tasks to be completed before the next event/show/conference. ## Priority Tasks (Easy & Quick) -- [x] **Core:** Define `Account`, `Site`, and `Site_Domain` interfaces in new files under `src/lib/ae_core/`. -- [x] **Journals:** Improve the empty state message in `src/routes/journals/+page.svelte`. -- [x] **Journals:** Add a loading indicator to the main journals page. -- [x] **IDAA:** Add a loading indicator to the archives page (`src/routes/idaa/(idaa)/archives/+page.svelte`). -- [x] **Events:** Add pagination to the main event list in `src/routes/events/+page.svelte`. +- [ ] **Formatting:** Run `npm run format` to fix code style issues across the project. --- @@ -55,21 +65,21 @@ This is a list of tasks to be completed before the next event/show/conference. These functions are frequently used and critical to the application's data flow. Reviewing and cleaning them up will significantly improve the codebase. 1. **`get_ae_obj_li_for_obj_id_crud_v2()`** (from `src/lib/ae_api/api_get__crud_obj_li_v2.ts`) - - **Why:** This is the main function for fetching lists of data from the backend, used extensively across all modules. - - **Cleanup:** Review parameters and return types for consistency, improve error handling, and add more detailed logging for debugging. + - **Why:** This is the main function for fetching lists of data from the backend, used extensively across all modules. + - **Cleanup:** Review parameters and return types for consistency, improve error handling, and add more detailed logging for debugging. 2. **`db_save_ae_obj_li__ae_obj()`** (from `src/lib/ae_core/core__idb_dexie.ts`) - - **Why:** This function is the single point of entry for saving data to the local Dexie database, critical for performance and reliability. - - **Cleanup:** Optimize for bulk operations, add robust error handling and logging, and ensure correct handling of updates to existing objects. + - **Why:** This function is the single point of entry for saving data to the local Dexie database, critical for performance and reliability. + - **Cleanup:** Optimize for bulk operations, add robust error handling and logging, and ensure correct handling of updates to existing objects. 3. **The `process_ae_obj__*_props()` family of functions** (e.g., `process_ae_obj__journal_props()` from `src/lib/ae_journals/ae_journals__journal.ts`) - - **Why:** These functions transform API data for the frontend and are a common source of bugs and inconsistencies. - - **Cleanup:** Standardize their structure across all modules, ensure they are pure functions, and add unit tests for correctness. - - **Update 2025-11-13 (Temporary Rollback):** The previous refactoring of these functions has been temporarily rolled back due to an `InternalError`. `ae_core_functions.ts` has been restored. The new plan is to refactor these functions module by module, ensuring stability at each step. The generic CRUD functions in `core__crud_generic.ts` were simplified to remove data processing and caching, delegating those responsibilities to the module-specific functions. The deprecated `process_ae_obj__props` function in that file was left in place but is no longer used by the generic CRUD functions. + - **Why:** These functions transform API data for the frontend and are a common source of bugs and inconsistencies. + - **Cleanup:** Standardize their structure across all modules, ensure they are pure functions, and add unit tests for correctness. + - **Update 2025-11-13 (Temporary Rollback):** The previous refactoring of these functions has been temporarily rolled back due to an `InternalError`. `ae_core_functions.ts` has been restored. The new plan is to refactor these functions module by module, ensuring stability at each step. The generic CRUD functions in `core__crud_generic.ts` were simplified to remove data processing and caching, delegating those responsibilities to the module-specific functions. The deprecated `process_ae_obj__props` function in that file was left in place but is no longer used by the generic CRUD functions. 4. **Usage of `liveQuery` from Dexie** - - **Why:** `liveQuery` is powerful for reactive UIs, but current usage suggests complexity and potential issues. - - **Cleanup:** Review `liveQuery` usage throughout the application, simplify queries, and investigate reactivity issues. Consider wrapping `liveQuery` in a custom Svelte store for a more predictable interface. + - **Why:** `liveQuery` is powerful for reactive UIs, but current usage suggests complexity and potential issues. + - **Cleanup:** Review `liveQuery` usage throughout the application, simplify queries, and investigate reactivity issues. Consider wrapping `liveQuery` in a custom Svelte store for a more predictable interface. --- @@ -80,9 +90,11 @@ These functions are frequently used and critical to the application's data flow. ## Core Module Improvements ### 1. Core Module Dashboard + - [ ] Create a central dashboard at `/core` to provide an overview and links to all core data management pages. ### 2. Account Management + - [ ] **Route:** Create a new route at `/core/accounts`. - [ ] **Data:** Define the `Account` interface in a new file `src/lib/ae_core/core__account.ts`. - [ ] **API:** Implement functions in `core__account.ts` for CRUD operations on accounts. @@ -91,6 +103,7 @@ These functions are frequently used and critical to the application's data flow. - [ ] Create a `[account_id]` dynamic route to view and edit account details. ### 3. Site & Domain Management + - [ ] **Route:** Create a new route at `/core/sites`. - [ ] **Data:** Define `Site` and `Site_Domain` interfaces in a new file `src/lib/ae_core/core__site.ts`. - [ ] **API:** Implement functions in `core__site.ts` for CRUD operations on sites and domains. @@ -99,12 +112,14 @@ These functions are frequently used and critical to the application's data flow. - [ ] Create a `[site_id]` dynamic route to view and edit site details and manage associated domains. ### 4. Person Management + - [ ] **Enhance:** Improve the existing person management components under `/core/person`. - [ ] **UI:** - [ ] Create a dedicated page for creating new person records. - [ ] Add search and filtering capabilities to the person list. ### 5. User Management + - [ ] **Route:** Create a new route at `/core/users`. - [ ] **UI:** - [ ] Create a `+page.svelte` to list all users. @@ -112,6 +127,7 @@ These functions are frequently used and critical to the application's data flow. - [ ] Implement a component to link users to person records. ### 6. Hosted File Management + - [ ] **Route:** Create a new route at `/core/hosted_files`. - [ ] **UI:** - [ ] Create a `+page.svelte` to list all hosted files with filters (e.g., by file type, uploader). @@ -119,6 +135,7 @@ These functions are frequently used and critical to the application's data flow. - [ ] Add functionality to upload new files and associate them with other objects (e.g., a person, a journal entry). ### 7. Shared Lookup Lists + - [ ] **Route:** Create a new route at `/core/lookups`. - [ ] **UI:** - [ ] Create a simple UI to view and manage the shared lookup lists (e.g., `countries`, `time_zones`). @@ -128,6 +145,7 @@ These functions are frequently used and critical to the application's data flow. ## Journals Module Improvements ### Code Cleanup & Refactoring + - [ ] **Consolidate Data Functions:** Refactor `ae_journals__journal.ts` and `ae_journals__journal_entry.ts` to reduce code duplication, especially in data loading and processing functions. - [ ] **Remove Dead Code:** Clean up commented-out code blocks and unused variables across the module. - [ ] **Logging:** Implement a more structured logging solution to replace the widespread use of `console.log`. @@ -135,6 +153,7 @@ These functions are frequently used and critical to the application's data flow. - [ ] **Type Safety:** Replace `any` types with more specific interfaces, particularly in function parameters and API responses. ### Features & Enhancements + - [ ] **Offline Support:** Improve offline capabilities by pre-fetching and caching more data. Review the current Dexie implementation for optimizations. - [ ] **Search & Filtering:** Enhance the UI with more advanced search and filtering options for journals and entries (e.g., by date range, content, tags). - [ ] **User Experience (UX):** @@ -145,6 +164,7 @@ These functions are frequently used and critical to the application's data flow. - [ ] **Templates:** Fully implement and document the "templates" feature for creating new journals and entries. ### Bug Fixes & Potential Issues + - [ ] **Reactivity:** Investigate potential reactivity issues between Svelte stores and Dexie's `liveQuery`. - [ ] **Data Sync:** Add logic to handle data synchronization conflicts between the local database and the server. - [ ] **Performance:** Profile the application with a large number of journals and entries to identify and address any performance bottlenecks. @@ -154,10 +174,12 @@ These functions are frequently used and critical to the application's data flow. ## IDAA Modules Improvements ### General + - [ ] **Component Refactoring:** Audit the `ae_idaa_comp__` components and refactor them to be more generic and reusable where possible. - [ ] **State Management:** Simplify state management by reducing the number of stores and triggers, and relying more on derived state and component props. ### Archives Module (`/idaa/archives`) + - [ ] **UI/UX:** - [ ] Add a loading indicator while archives are being fetched. - [ ] Implement a more engaging "empty state" when no archives are available. @@ -165,6 +187,7 @@ These functions are frequently used and critical to the application's data flow. - [ ] Implement pagination or infinite scrolling for the archive list. ### Bulletin Board Module (`/idaa/bb`) + - [ ] **UI/UX:** - [ ] Improve the UI for creating and editing posts and comments. - [ ] Add a rich text editor for a better writing experience. @@ -172,6 +195,7 @@ These functions are frequently used and critical to the application's data flow. - [ ] Implement user-specific features, such as editing their own posts and comments. ### Recovery Meetings Module (`/idaa/recovery_meetings`) + - [ ] **Refactoring:** - [ ] Simplify the search and filtering logic. The current implementation with `setInterval` is complex and could be replaced with a more modern approach using debouncing or reactive statements. - [ ] **UI/UX:** @@ -185,11 +209,13 @@ These functions are frequently used and critical to the application's data flow. ## Aether Events Module Improvements ### General + - [ ] **Dashboard:** Create a central dashboard for each event at `/events/[event_id]` that provides an overview of the event and links to all the management pages. - [ ] **Component Refactoring:** The module has a large number of `ae_comp__` components. Audit and refactor them to be more modular and reusable. - [ ] **UI/UX Consistency:** Ensure a consistent look and feel across all the different event management pages. ### Core Event Management + - [ ] **Event List (`/events`):** - [ ] Add search and filtering capabilities to the main event list. - [ ] Implement pagination for the event list. @@ -197,6 +223,7 @@ These functions are frequently used and critical to the application's data flow. - [ ] Create a dedicated page or modal for creating and editing events. ### Sub-modules (`/events/[event_id]/...`) + - [ ] **Sessions, Presentations, Presenters, etc.:** - [ ] For each sub-module (sessions, presentations, etc.), implement a consistent set of features: - [ ] List view with search and filtering. @@ -206,14 +233,15 @@ These functions are frequently used and critical to the application's data flow. - [ ] **File Management:** - [ ] Improve the file upload component (`ae_comp__event_files_upload.svelte`) with features like drag-and-drop and progress bars. - [ ] Enhance the file list view with more details and actions. -- [ ] **Launcher (`/events/[event_id]/launcher`): +- [ ] \*\*Launcher (`/events/[event_id]/launcher`): - [ ] Add documentation to explain the purpose and usage of the launcher. - [ ] Improve the UI to make it more intuitive for users. -- [ ] **Badges (`/events/[event_id]/badges`): +- [ ] \*\*Badges (`/events/[event_id]/badges`): - [ ] Enhance the badge printing interface with more customization options. - [ ] Add a preview of the badge before printing. ### Performance + - [ ] **Live Queries:** Review the use of `liveQuery` throughout the module and optimize for performance, especially on pages with a large amount of data. - [ ] **Data Loading:** Implement more efficient data loading strategies to avoid fetching unnecessary data. diff --git a/ae_app_svelte_tailwind_skeleton.code-workspace b/ae_app_svelte_tailwind_skeleton.code-workspace index 2115605a..74cd3988 100644 --- a/ae_app_svelte_tailwind_skeleton.code-workspace +++ b/ae_app_svelte_tailwind_skeleton.code-workspace @@ -5,10 +5,8 @@ } ], "settings": { - "cSpell.words": [ - "filelist" - ], + "cSpell.words": ["filelist"], "git.autofetch": true, "editor.defaultFormatter": "svelte.svelte-vscode" } -} \ No newline at end of file +} diff --git a/eslint.config.cjs b/eslint.config.cjs new file mode 100644 index 00000000..881552ac --- /dev/null +++ b/eslint.config.cjs @@ -0,0 +1,71 @@ +const { defineConfig, globalIgnores } = require('eslint/config'); + +const tsParser = require('@typescript-eslint/parser'); +const typescriptEslint = require('@typescript-eslint/eslint-plugin'); +const globals = require('globals'); +const parser = require('svelte-eslint-parser'); +const js = require('@eslint/js'); + +const { FlatCompat } = require('@eslint/eslintrc'); + +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +module.exports = defineConfig([ + { + extends: compat.extends( + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'prettier' + ), + + languageOptions: { + parser: tsParser, + sourceType: 'module', + ecmaVersion: 2020, + + parserOptions: { + extraFileExtensions: ['.svelte'] + }, + + globals: { + ...globals.browser, + ...globals.node + } + }, + + plugins: { + '@typescript-eslint': typescriptEslint + }, + rules: { + '@typescript-eslint/no-unused-vars': 'warn' + } + }, + { + files: ['**/*.svelte'], + + languageOptions: { + parser: parser, + + parserOptions: { + parser: '@typescript-eslint/parser' + } + } + }, + globalIgnores([ + '**/.DS_Store', + '**/node_modules', + 'build', + '.svelte-kit', + 'package', + '**/.env', + '**/.env.*', + '!**/.env.example', + '**/pnpm-lock.yaml', + '**/package-lock.json', + '**/yarn.lock' + ]) +]); diff --git a/jsconfig.json b/jsconfig.json index 403855cb..b3606c19 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,7 +1,7 @@ { - "compilerOptions": { - "paths": { - "$lib/*": ["./src/lib/*"] - } - } -} \ No newline at end of file + "compilerOptions": { + "paths": { + "$lib/*": ["./src/lib/*"] + } + } +} diff --git a/package-lock.json b/package-lock.json index a1d56a52..e72bcc52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8997 +1,9000 @@ { - "name": "osit-aether-app-svelte", - "version": "3.9.6", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "osit-aether-app-svelte", - "version": "3.9.6", - "dependencies": { - "@codemirror/commands": "^6.8.1", - "@codemirror/gutter": "^0.19.9", - "@codemirror/lang-css": "^6.3.1", - "@codemirror/lang-html": "^6.4.9", - "@codemirror/lang-javascript": "^6.2.3", - "@codemirror/lang-json": "^6.0.1", - "@codemirror/lang-markdown": "^6.3.2", - "@codemirror/language": "^6.11.0", - "@codemirror/language-data": "^6.5.1", - "@codemirror/theme-one-dark": "^6.1.2", - "@codemirror/view": "^6.36.8", - "@floating-ui/dom": "^1.6.0", - "@lucide/svelte": "0.*.0", - "@popperjs/core": "^2.11.0", - "@tailwindcss/vite": "^4.1.10", - "@tiptap/extension-bullet-list": "^2.10.2", - "@tiptap/extension-document": "^2.10.2", - "@tiptap/extension-history": "^2.10.2", - "@tiptap/extension-paragraph": "^2.10.2", - "axios": "^1.7.0", - "codemirror": "^6.0.1", - "dayjs": "^1.11.10", - "dexie": "^4.0.0", - "flowbite-svelte": "^1.7.0", - "html5-qrcode": "^2.3.8", - "lucide-svelte": "0.*.0", - "marked": "^16.0.0", - "openai": "^5.20.1", - "qrcode": "^1.5.4", - "shadcn-svelte": "^1.0.0", - "svelte-persisted-store": "^0.12.0" - }, - "devDependencies": { - "@playwright/test": "^1.28.1", - "@skeletonlabs/skeleton": "^3.1.3", - "@skeletonlabs/skeleton-svelte": "^1.2.3", - "@sveltejs/adapter-auto": "^6.0.0", - "@sveltejs/adapter-node": "^5.0.0", - "@sveltejs/adapter-static": "^3.0.1", - "@sveltejs/kit": "^2.5.0", - "@sveltejs/vite-plugin-svelte": "^5.0.0", - "@tailwindcss/forms": "^0.5.7", - "@tailwindcss/typography": "^0.5.10", - "@tiptap/core": "^2.10.3", - "@tiptap/extension-bubble-menu": "^2.10.3", - "@tiptap/extension-code-block-lowlight": "^2.10.3", - "@tiptap/extension-color": "^2.10.3", - "@tiptap/extension-highlight": "^2.10.3", - "@tiptap/extension-image": "^2.10.3", - "@tiptap/extension-link": "^2.10.3", - "@tiptap/extension-subscript": "^2.10.3", - "@tiptap/extension-superscript": "^2.10.3", - "@tiptap/extension-table": "^2.10.3", - "@tiptap/extension-table-cell": "^2.10.3", - "@tiptap/extension-table-header": "^2.10.3", - "@tiptap/extension-table-row": "^2.10.3", - "@tiptap/extension-task-item": "^2.10.3", - "@tiptap/extension-task-list": "^2.10.3", - "@tiptap/extension-text": "^2.10.3", - "@tiptap/extension-text-align": "^2.10.3", - "@tiptap/extension-text-style": "^2.10.3", - "@tiptap/extension-typography": "^2.10.3", - "@tiptap/extension-underline": "^2.10.3", - "@tiptap/pm": "^2.10.3", - "@tiptap/starter-kit": "^2.10.3", - "@types/eslint": "^9.0.0", - "@types/node": "^24.0.0", - "@types/qrcode": "^1.5.5", - "@typescript-eslint/eslint-plugin": "^8.0.0", - "@typescript-eslint/parser": "^8.0.0", - "bits-ui": "^2.0.0", - "clsx": "^2.1.1", - "eslint": "^9.0.0", - "eslint-config-prettier": "^10.0.0", - "eslint-plugin-svelte": "^3.0.0", - "flowbite": "^3.0.0", - "highlight.js": "^11.10.0", - "lowlight": "^3.2.0", - "mode-watcher": "^1.0.0", - "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", - "sass-embedded": "^1.81.0", - "svelte": "^5.0.0", - "svelte-awesome-color-picker": "^4.0.0", - "svelte-check": "^4.0.0", - "svelte-highlight": "^7.8.4", - "svelte-idle": "^3.0.1", - "svelte-tiptap": "^2.1.0", - "tailwind-merge": "^3.0.0", - "tailwind-variants": "^2.1.0", - "tailwindcss": "^4.1.10", - "tailwindcss-animate": "^1.0.7", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "typescript-svelte-plugin": "^0.3.50", - "vite": "^6.0.0", - "vitest": "^3.0.0" - } - }, - "node_modules/@bufbuild/protobuf": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.10.1.tgz", - "integrity": "sha512-ckS3+vyJb5qGpEYv/s1OebUHDi/xSNtfgw1wqKZo7MR9F2z+qXr0q5XagafAG/9O0QPVIUfST0smluYSTpYFkg==", - "devOptional": true, - "license": "(Apache-2.0 AND BSD-3-Clause)" - }, - "node_modules/@codemirror/autocomplete": { - "version": "6.19.1", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.19.1.tgz", - "integrity": "sha512-q6NenYkEy2fn9+JyjIxMWcNjzTL/IhwqfzOut1/G3PrIFkrbl4AL7Wkse5tLrQUUyqGoAKU5+Pi5jnnXxH5HGw==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.17.0", - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@codemirror/commands": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.10.0.tgz", - "integrity": "sha512-2xUIc5mHXQzT16JnyOFkh8PvfeXuIut3pslWGfsGOhxP/lpgRm9HOl/mpzLErgt5mXDovqA0d11P21gofRLb9w==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.4.0", - "@codemirror/view": "^6.27.0", - "@lezer/common": "^1.1.0" - } - }, - "node_modules/@codemirror/gutter": { - "version": "0.19.9", - "resolved": "https://registry.npmjs.org/@codemirror/gutter/-/gutter-0.19.9.tgz", - "integrity": "sha512-PFrtmilahin1g6uL27aG5tM/rqR9DZzZYZsIrCXA5Uc2OFTFqx4owuhoU9hqfYxHp5ovfvBwQ+txFzqS4vog6Q==", - "deprecated": "As of 0.20.0, this package has been merged into @codemirror/view", - "license": "MIT", - "dependencies": { - "@codemirror/rangeset": "^0.19.0", - "@codemirror/state": "^0.19.0", - "@codemirror/view": "^0.19.23" - } - }, - "node_modules/@codemirror/gutter/node_modules/@codemirror/state": { - "version": "0.19.9", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-0.19.9.tgz", - "integrity": "sha512-psOzDolKTZkx4CgUqhBQ8T8gBc0xN5z4gzed109aF6x7D7umpDRoimacI/O6d9UGuyl4eYuDCZmDFr2Rq7aGOw==", - "license": "MIT", - "dependencies": { - "@codemirror/text": "^0.19.0" - } - }, - "node_modules/@codemirror/gutter/node_modules/@codemirror/view": { - "version": "0.19.48", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-0.19.48.tgz", - "integrity": "sha512-0eg7D2Nz4S8/caetCTz61rK0tkHI17V/d15Jy0kLOT8dTLGGNJUponDnW28h2B6bERmPlVHKh8MJIr5OCp1nGw==", - "license": "MIT", - "dependencies": { - "@codemirror/rangeset": "^0.19.5", - "@codemirror/state": "^0.19.3", - "@codemirror/text": "^0.19.0", - "style-mod": "^4.0.0", - "w3c-keyname": "^2.2.4" - } - }, - "node_modules/@codemirror/lang-angular": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@codemirror/lang-angular/-/lang-angular-0.1.4.tgz", - "integrity": "sha512-oap+gsltb/fzdlTQWD6BFF4bSLKcDnlxDsLdePiJpCVNKWXSTAbiiQeYI3UmES+BLAdkmIC1WjyztC1pi/bX4g==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/lang-javascript": "^6.1.2", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.3" - } - }, - "node_modules/@codemirror/lang-cpp": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@codemirror/lang-cpp/-/lang-cpp-6.0.3.tgz", - "integrity": "sha512-URM26M3vunFFn9/sm6rzqrBzDgfWuDixp85uTY49wKudToc2jTHUrKIGGKs+QWND+YLofNNZpxcNGRynFJfvgA==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/cpp": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-css": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.1.tgz", - "integrity": "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.2", - "@lezer/css": "^1.1.7" - } - }, - "node_modules/@codemirror/lang-go": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-go/-/lang-go-6.0.1.tgz", - "integrity": "sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.6.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/go": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-html": { - "version": "6.4.11", - "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.11.tgz", - "integrity": "sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/lang-css": "^6.0.0", - "@codemirror/lang-javascript": "^6.0.0", - "@codemirror/language": "^6.4.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.17.0", - "@lezer/common": "^1.0.0", - "@lezer/css": "^1.1.0", - "@lezer/html": "^1.3.12" - } - }, - "node_modules/@codemirror/lang-java": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-java/-/lang-java-6.0.2.tgz", - "integrity": "sha512-m5Nt1mQ/cznJY7tMfQTJchmrjdjQ71IDs+55d1GAa8DGaB8JXWsVCkVT284C3RTASaY43YknrK2X3hPO/J3MOQ==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/java": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-javascript": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.4.tgz", - "integrity": "sha512-0WVmhp1QOqZ4Rt6GlVGwKJN3KW7Xh4H2q8ZZNGZaP6lRdxXJzmjm4FqvmOojVj6khWJHIb9sp7U/72W7xQgqAA==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.6.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.17.0", - "@lezer/common": "^1.0.0", - "@lezer/javascript": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-jinja": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-jinja/-/lang-jinja-6.0.0.tgz", - "integrity": "sha512-47MFmRcR8UAxd8DReVgj7WJN1WSAMT7OJnewwugZM4XiHWkOjgJQqvEM1NpMj9ALMPyxmlziEI1opH9IaEvmaw==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.2.0", - "@lezer/lr": "^1.4.0" - } - }, - "node_modules/@codemirror/lang-json": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz", - "integrity": "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/json": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-less": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-less/-/lang-less-6.0.2.tgz", - "integrity": "sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-css": "^6.2.0", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-liquid": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-liquid/-/lang-liquid-6.3.0.tgz", - "integrity": "sha512-fY1YsUExcieXRTsCiwX/bQ9+PbCTA/Fumv7C7mTUZHoFkibfESnaXwpr2aKH6zZVwysEunsHHkaIpM/pl3xETQ==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.1" - } - }, - "node_modules/@codemirror/lang-markdown": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.5.0.tgz", - "integrity": "sha512-0K40bZ35jpHya6FriukbgaleaqzBLZfOh7HuzqbMxBXkbYMJDxfF39c23xOgxFezR+3G+tR2/Mup+Xk865OMvw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.7.1", - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.3.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.2.1", - "@lezer/markdown": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-php": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-php/-/lang-php-6.0.2.tgz", - "integrity": "sha512-ZKy2v1n8Fc8oEXj0Th0PUMXzQJ0AIR6TaZU+PbDHExFwdu+guzOA4jmCHS1Nz4vbFezwD7LyBdDnddSJeScMCA==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/php": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-python": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.2.1.tgz", - "integrity": "sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.3.2", - "@codemirror/language": "^6.8.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.2.1", - "@lezer/python": "^1.1.4" - } - }, - "node_modules/@codemirror/lang-rust": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-rust/-/lang-rust-6.0.2.tgz", - "integrity": "sha512-EZaGjCUegtiU7kSMvOfEZpaCReowEf3yNidYu7+vfuGTm9ow4mthAparY5hisJqOHmJowVH3Upu+eJlUji6qqA==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/rust": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-sass": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-sass/-/lang-sass-6.0.2.tgz", - "integrity": "sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-css": "^6.2.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.0.2", - "@lezer/sass": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-sql": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-sql/-/lang-sql-6.10.0.tgz", - "integrity": "sha512-6ayPkEd/yRw0XKBx5uAiToSgGECo/GY2NoJIHXIIQh1EVwLuKoU8BP/qK0qH5NLXAbtJRLuT73hx7P9X34iO4w==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-vue": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@codemirror/lang-vue/-/lang-vue-0.1.3.tgz", - "integrity": "sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-html": "^6.0.0", - "@codemirror/lang-javascript": "^6.1.2", - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.1" - } - }, - "node_modules/@codemirror/lang-wast": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-wast/-/lang-wast-6.0.2.tgz", - "integrity": "sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-xml": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz", - "integrity": "sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.4.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/xml": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-yaml": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-yaml/-/lang-yaml-6.1.2.tgz", - "integrity": "sha512-dxrfG8w5Ce/QbT7YID7mWZFKhdhsaTNOYjOkSIMt1qmC4VQnXSDSYVHHHn8k6kJUfIhtLo8t1JJgltlxWdsITw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.2.0", - "@lezer/lr": "^1.0.0", - "@lezer/yaml": "^1.0.0" - } - }, - "node_modules/@codemirror/language": { - "version": "6.11.3", - "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.11.3.tgz", - "integrity": "sha512-9HBM2XnwDj7fnu0551HkGdrUrrqmYq/WC5iv6nbY2WdicXdGbhR/gfbZOH73Aqj4351alY1+aoG9rCNfiwS1RA==", - "license": "MIT", - "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.23.0", - "@lezer/common": "^1.1.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0", - "style-mod": "^4.0.0" - } - }, - "node_modules/@codemirror/language-data": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/@codemirror/language-data/-/language-data-6.5.2.tgz", - "integrity": "sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==", - "license": "MIT", - "dependencies": { - "@codemirror/lang-angular": "^0.1.0", - "@codemirror/lang-cpp": "^6.0.0", - "@codemirror/lang-css": "^6.0.0", - "@codemirror/lang-go": "^6.0.0", - "@codemirror/lang-html": "^6.0.0", - "@codemirror/lang-java": "^6.0.0", - "@codemirror/lang-javascript": "^6.0.0", - "@codemirror/lang-jinja": "^6.0.0", - "@codemirror/lang-json": "^6.0.0", - "@codemirror/lang-less": "^6.0.0", - "@codemirror/lang-liquid": "^6.0.0", - "@codemirror/lang-markdown": "^6.0.0", - "@codemirror/lang-php": "^6.0.0", - "@codemirror/lang-python": "^6.0.0", - "@codemirror/lang-rust": "^6.0.0", - "@codemirror/lang-sass": "^6.0.0", - "@codemirror/lang-sql": "^6.0.0", - "@codemirror/lang-vue": "^0.1.1", - "@codemirror/lang-wast": "^6.0.0", - "@codemirror/lang-xml": "^6.0.0", - "@codemirror/lang-yaml": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/legacy-modes": "^6.4.0" - } - }, - "node_modules/@codemirror/legacy-modes": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/@codemirror/legacy-modes/-/legacy-modes-6.5.2.tgz", - "integrity": "sha512-/jJbwSTazlQEDOQw2FJ8LEEKVS72pU0lx6oM54kGpL8t/NJ2Jda3CZ4pcltiKTdqYSRk3ug1B3pil1gsjA6+8Q==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0" - } - }, - "node_modules/@codemirror/lint": { - "version": "6.9.2", - "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.2.tgz", - "integrity": "sha512-sv3DylBiIyi+xKwRCJAAsBZZZWo82shJ/RTMymLabAdtbkV5cSKwWDeCgtUq3v8flTaXS2y1kKkICuRYtUswyQ==", - "license": "MIT", - "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.35.0", - "crelt": "^1.0.5" - } - }, - "node_modules/@codemirror/rangeset": { - "version": "0.19.9", - "resolved": "https://registry.npmjs.org/@codemirror/rangeset/-/rangeset-0.19.9.tgz", - "integrity": "sha512-V8YUuOvK+ew87Xem+71nKcqu1SXd5QROMRLMS/ljT5/3MCxtgrRie1Cvild0G/Z2f1fpWxzX78V0U4jjXBorBQ==", - "deprecated": "As of 0.20.0, this package has been merged into @codemirror/state", - "license": "MIT", - "dependencies": { - "@codemirror/state": "^0.19.0" - } - }, - "node_modules/@codemirror/rangeset/node_modules/@codemirror/state": { - "version": "0.19.9", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-0.19.9.tgz", - "integrity": "sha512-psOzDolKTZkx4CgUqhBQ8T8gBc0xN5z4gzed109aF6x7D7umpDRoimacI/O6d9UGuyl4eYuDCZmDFr2Rq7aGOw==", - "license": "MIT", - "dependencies": { - "@codemirror/text": "^0.19.0" - } - }, - "node_modules/@codemirror/search": { - "version": "6.5.11", - "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.11.tgz", - "integrity": "sha512-KmWepDE6jUdL6n8cAAqIpRmLPBZ5ZKnicE8oGU/s3QrAVID+0VhLFrzUucVKHG5035/BSykhExDL/Xm7dHthiA==", - "license": "MIT", - "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "crelt": "^1.0.5" - } - }, - "node_modules/@codemirror/state": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.5.2.tgz", - "integrity": "sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==", - "license": "MIT", - "dependencies": { - "@marijn/find-cluster-break": "^1.0.0" - } - }, - "node_modules/@codemirror/text": { - "version": "0.19.6", - "resolved": "https://registry.npmjs.org/@codemirror/text/-/text-0.19.6.tgz", - "integrity": "sha512-T9jnREMIygx+TPC1bOuepz18maGq/92q2a+n4qTqObKwvNMg+8cMTslb8yxeEDEq7S3kpgGWxgO1UWbQRij0dA==", - "deprecated": "As of 0.20.0, this package has been merged into @codemirror/state", - "license": "MIT" - }, - "node_modules/@codemirror/theme-one-dark": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/@codemirror/theme-one-dark/-/theme-one-dark-6.1.3.tgz", - "integrity": "sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA==", - "license": "MIT", - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/highlight": "^1.0.0" - } - }, - "node_modules/@codemirror/view": { - "version": "6.38.6", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.38.6.tgz", - "integrity": "sha512-qiS0z1bKs5WOvHIAC0Cybmv4AJSkAXgX5aD6Mqd2epSLlVJsQl8NG23jCVouIgkh4All/mrbdsf2UOLFnJw0tw==", - "license": "MIT", - "dependencies": { - "@codemirror/state": "^6.5.0", - "crelt": "^1.0.6", - "style-mod": "^4.1.0", - "w3c-keyname": "^2.2.4" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", - "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", - "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", - "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", - "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", - "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", - "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", - "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", - "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", - "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", - "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", - "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", - "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", - "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", - "cpu": [ - "mips64el" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", - "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", - "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", - "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", - "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", - "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", - "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", - "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", - "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", - "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", - "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", - "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", - "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", - "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", - "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/object-schema": "^2.1.7", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", - "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.17.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", - "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@eslint/eslintrc/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/@eslint/js": { - "version": "9.39.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", - "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", - "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", - "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@eslint/core": "^0.17.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@floating-ui/core": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz", - "integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==", - "license": "MIT", - "dependencies": { - "@floating-ui/utils": "^0.2.10" - } - }, - "node_modules/@floating-ui/dom": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.4.tgz", - "integrity": "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==", - "license": "MIT", - "dependencies": { - "@floating-ui/core": "^1.7.3", - "@floating-ui/utils": "^0.2.10" - } - }, - "node_modules/@floating-ui/utils": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz", - "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==", - "license": "MIT" - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@internationalized/date": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.10.0.tgz", - "integrity": "sha512-oxDR/NTEJ1k+UFVQElaNIk65E/Z83HK1z1WI3lQyhTtnNg4R5oVXaPzK3jcpKG8UHKDVuDQHzn+wsxSz8RP3aw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@swc/helpers": "^0.5.0" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/remapping": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", - "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@lezer/common": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.3.0.tgz", - "integrity": "sha512-L9X8uHCYU310o99L3/MpJKYxPzXPOS7S0NmBaM7UO/x2Kb2WbmMLSkfvdr1KxRIFYOpbY0Jhn7CfLSUDzL8arQ==", - "license": "MIT" - }, - "node_modules/@lezer/cpp": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@lezer/cpp/-/cpp-1.1.3.tgz", - "integrity": "sha512-ykYvuFQKGsRi6IcE+/hCSGUhb/I4WPjd3ELhEblm2wS2cOznDFzO+ubK2c+ioysOnlZ3EduV+MVQFCPzAIoY3w==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/css": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.0.tgz", - "integrity": "sha512-pBL7hup88KbI7hXnZV3PQsn43DHy6TWyzuyk2AO9UyoXcDltvIdqWKE1dLL/45JVZ+YZkHe1WVHqO6wugZZWcw==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.0" - } - }, - "node_modules/@lezer/go": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@lezer/go/-/go-1.0.1.tgz", - "integrity": "sha512-xToRsYxwsgJNHTgNdStpcvmbVuKxTapV0dM0wey1geMMRc9aggoVyKgzYp41D2/vVOx+Ii4hmE206kvxIXBVXQ==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.3.0" - } - }, - "node_modules/@lezer/highlight": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz", - "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.3.0" - } - }, - "node_modules/@lezer/html": { - "version": "1.3.12", - "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.12.tgz", - "integrity": "sha512-RJ7eRWdaJe3bsiiLLHjCFT1JMk8m1YP9kaUbvu2rMLEoOnke9mcTVDyfOslsln0LtujdWespjJ39w6zo+RsQYw==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/java": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@lezer/java/-/java-1.1.3.tgz", - "integrity": "sha512-yHquUfujwg6Yu4Fd1GNHCvidIvJwi/1Xu2DaKl/pfWIA2c1oXkVvawH3NyXhCaFx4OdlYBVX5wvz2f7Aoa/4Xw==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/javascript": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.4.tgz", - "integrity": "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.1.3", - "@lezer/lr": "^1.3.0" - } - }, - "node_modules/@lezer/json": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.3.tgz", - "integrity": "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/lr": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.3.tgz", - "integrity": "sha512-yenN5SqAxAPv/qMnpWW0AT7l+SxVrgG+u0tNsRQWqbrz66HIl8DnEbBObvy21J5K7+I1v7gsAnlE2VQ5yYVSeA==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@lezer/markdown": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.6.0.tgz", - "integrity": "sha512-AXb98u3M6BEzTnreBnGtQaF7xFTiMA92Dsy5tqEjpacbjRxDSFdN4bKJo9uvU4cEEOS7D2B9MT7kvDgOEIzJSw==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0" - } - }, - "node_modules/@lezer/php": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@lezer/php/-/php-1.0.5.tgz", - "integrity": "sha512-W7asp9DhM6q0W6DYNwIkLSKOvxlXRrif+UXBMxzsJUuqmhE7oVU+gS3THO4S/Puh7Xzgm858UNaFi6dxTP8dJA==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.1.0" - } - }, - "node_modules/@lezer/python": { - "version": "1.1.18", - "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.18.tgz", - "integrity": "sha512-31FiUrU7z9+d/ElGQLJFXl+dKOdx0jALlP3KEOsGTex8mvj+SoE1FgItcHWK/axkxCHGUSpqIHt6JAWfWu9Rhg==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/rust": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@lezer/rust/-/rust-1.0.2.tgz", - "integrity": "sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/sass": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@lezer/sass/-/sass-1.1.0.tgz", - "integrity": "sha512-3mMGdCTUZ/84ArHOuXWQr37pnf7f+Nw9ycPUeKX+wu19b7pSMcZGLbaXwvD2APMBDOGxPmpK/O6S1v1EvLoqgQ==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/xml": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@lezer/xml/-/xml-1.0.6.tgz", - "integrity": "sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" - } - }, - "node_modules/@lezer/yaml": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@lezer/yaml/-/yaml-1.0.3.tgz", - "integrity": "sha512-GuBLekbw9jDBDhGur82nuwkxKQ+a3W5H0GfaAthDXcAu+XdpS43VlnxA9E9hllkpSP5ellRDKjLLj7Lu9Wr6xA==", - "license": "MIT", - "dependencies": { - "@lezer/common": "^1.2.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.4.0" - } - }, - "node_modules/@lucide/svelte": { - "version": "0.553.0", - "resolved": "https://registry.npmjs.org/@lucide/svelte/-/svelte-0.553.0.tgz", - "integrity": "sha512-uudJd5NF1zrsO0C2dmCo5lzctqGWNxQKUxM+HErUKyG2oCI2rSGllcsSjn6JfLaHUVy+sPESKa5Dsctm4mZHOQ==", - "license": "ISC", - "peerDependencies": { - "svelte": "^5" - } - }, - "node_modules/@marijn/find-cluster-break": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz", - "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==", - "license": "MIT" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@parcel/watcher": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", - "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "detect-libc": "^1.0.3", - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^7.0.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "@parcel/watcher-android-arm64": "2.5.1", - "@parcel/watcher-darwin-arm64": "2.5.1", - "@parcel/watcher-darwin-x64": "2.5.1", - "@parcel/watcher-freebsd-x64": "2.5.1", - "@parcel/watcher-linux-arm-glibc": "2.5.1", - "@parcel/watcher-linux-arm-musl": "2.5.1", - "@parcel/watcher-linux-arm64-glibc": "2.5.1", - "@parcel/watcher-linux-arm64-musl": "2.5.1", - "@parcel/watcher-linux-x64-glibc": "2.5.1", - "@parcel/watcher-linux-x64-musl": "2.5.1", - "@parcel/watcher-win32-arm64": "2.5.1", - "@parcel/watcher-win32-ia32": "2.5.1", - "@parcel/watcher-win32-x64": "2.5.1" - } - }, - "node_modules/@parcel/watcher-android-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", - "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", - "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-darwin-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", - "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-freebsd-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", - "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", - "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", - "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", - "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-arm64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", - "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-glibc": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", - "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-linux-x64-musl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", - "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-arm64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", - "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-ia32": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", - "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher-win32-x64": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", - "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@parcel/watcher/node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "license": "Apache-2.0", - "optional": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/@playwright/test": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz", - "integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright": "1.56.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@polka/url": { - "version": "1.0.0-next.29", - "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", - "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", - "dev": true, - "license": "MIT" - }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, - "node_modules/@remirror/core-constants": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@remirror/core-constants/-/core-constants-3.0.0.tgz", - "integrity": "sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==", - "license": "MIT" - }, - "node_modules/@rollup/plugin-commonjs": { - "version": "28.0.9", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.9.tgz", - "integrity": "sha512-PIR4/OHZ79romx0BVVll/PkwWpJ7e5lsqFa3gFfcrFPWwLXLV39JVUzQV9RKjWerE7B845Hqjj9VYlQeieZ2dA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "commondir": "^1.0.1", - "estree-walker": "^2.0.2", - "fdir": "^6.2.0", - "is-reference": "1.2.1", - "magic-string": "^0.30.3", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=16.0.0 || 14 >= 14.17" - }, - "peerDependencies": { - "rollup": "^2.68.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-json": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", - "integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.1.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", - "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/pluginutils": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", - "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^2.0.2", - "picomatch": "^4.0.2" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz", - "integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz", - "integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz", - "integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz", - "integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz", - "integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz", - "integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz", - "integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz", - "integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz", - "integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz", - "integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz", - "integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==", - "cpu": [ - "loong64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz", - "integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==", - "cpu": [ - "ppc64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz", - "integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz", - "integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz", - "integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==", - "cpu": [ - "s390x" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz", - "integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz", - "integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz", - "integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz", - "integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz", - "integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz", - "integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz", - "integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@skeletonlabs/skeleton": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@skeletonlabs/skeleton/-/skeleton-3.2.2.tgz", - "integrity": "sha512-dAunBAWqRMcNTGAvCKUgpADJdbtqL65eNEb7pDIKQZ6bI6qsxakR6MuF2E4B3jmUEpcaxaggDp0UdnUjlkAZ1Q==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "tailwindcss": "^4.0.0" - } - }, - "node_modules/@skeletonlabs/skeleton-svelte": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@skeletonlabs/skeleton-svelte/-/skeleton-svelte-1.5.3.tgz", - "integrity": "sha512-YFSJbaK6QPhrTyzlNy3fA3lSOg7hB7D/qkLAJDVlqwu5E2cz6WWS+/J3Tu9qOBO50PuSsgdOaFPc+QQ5+vQZHA==", - "dev": true, - "dependencies": { - "@zag-js/accordion": "1.18.3", - "@zag-js/avatar": "1.18.3", - "@zag-js/combobox": "1.18.3", - "@zag-js/dialog": "1.18.3", - "@zag-js/file-upload": "1.18.3", - "@zag-js/pagination": "1.18.3", - "@zag-js/popover": "1.18.3", - "@zag-js/progress": "1.18.3", - "@zag-js/radio-group": "1.18.3", - "@zag-js/rating-group": "1.18.3", - "@zag-js/slider": "1.18.3", - "@zag-js/svelte": "1.18.3", - "@zag-js/switch": "1.18.3", - "@zag-js/tabs": "1.18.3", - "@zag-js/tags-input": "1.18.3", - "@zag-js/toast": "1.18.3", - "@zag-js/tooltip": "1.18.3" - }, - "peerDependencies": { - "svelte": "^5.20.0" - } - }, - "node_modules/@standard-schema/spec": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", - "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@sveltejs/acorn-typescript": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.6.tgz", - "integrity": "sha512-4awhxtMh4cx9blePWl10HRHj8Iivtqj+2QdDCSMDzxG+XKa9+VCNupQuCuvzEhYPzZSrX+0gC+0lHA/0fFKKQQ==", - "license": "MIT", - "peerDependencies": { - "acorn": "^8.9.0" - } - }, - "node_modules/@sveltejs/adapter-auto": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-6.1.1.tgz", - "integrity": "sha512-cBNt4jgH4KuaNO5gRSB2CZKkGtz+OCZ8lPjRQGjhvVUD4akotnj2weUia6imLl2v07K3IgsQRyM36909miSwoQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@sveltejs/kit": "^2.0.0" - } - }, - "node_modules/@sveltejs/adapter-node": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-node/-/adapter-node-5.4.0.tgz", - "integrity": "sha512-NMsrwGVPEn+J73zH83Uhss/hYYZN6zT3u31R3IHAn3MiKC3h8fjmIAhLfTSOeNHr5wPYfjjMg8E+1gyFgyrEcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/plugin-commonjs": "^28.0.1", - "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^16.0.0", - "rollup": "^4.9.5" - }, - "peerDependencies": { - "@sveltejs/kit": "^2.4.0" - } - }, - "node_modules/@sveltejs/adapter-static": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-3.0.10.tgz", - "integrity": "sha512-7D9lYFWJmB7zxZyTE/qxjksvMqzMuYrrsyh1f4AlZqeZeACPRySjbC3aFiY55wb1tWUaKOQG9PVbm74JcN2Iew==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@sveltejs/kit": "^2.0.0" - } - }, - "node_modules/@sveltejs/kit": { - "version": "2.48.4", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.48.4.tgz", - "integrity": "sha512-TGFX1pZUt9qqY20Cv5NyYvy0iLWHf2jXi8s+eCGsig7jQMdwZWKUFMR6TbvFNhfDSUpc1sH/Y5EHv20g3HHA3g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@standard-schema/spec": "^1.0.0", - "@sveltejs/acorn-typescript": "^1.0.5", - "@types/cookie": "^0.6.0", - "acorn": "^8.14.1", - "cookie": "^0.6.0", - "devalue": "^5.3.2", - "esm-env": "^1.2.2", - "kleur": "^4.1.5", - "magic-string": "^0.30.5", - "mrmime": "^2.0.0", - "sade": "^1.8.1", - "set-cookie-parser": "^2.6.0", - "sirv": "^3.0.0" - }, - "bin": { - "svelte-kit": "svelte-kit.js" - }, - "engines": { - "node": ">=18.13" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0", - "svelte": "^4.0.0 || ^5.0.0-next.0", - "vite": "^5.0.3 || ^6.0.0 || ^7.0.0-beta.0" - }, - "peerDependenciesMeta": { - "@opentelemetry/api": { - "optional": true - } - } - }, - "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-5.1.1.tgz", - "integrity": "sha512-Y1Cs7hhTc+a5E9Va/xwKlAJoariQyHY+5zBgCZg4PFWNYQ1nMN9sjK1zhw1gK69DuqVP++sht/1GZg1aRwmAXQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@sveltejs/vite-plugin-svelte-inspector": "^4.0.1", - "debug": "^4.4.1", - "deepmerge": "^4.3.1", - "kleur": "^4.1.5", - "magic-string": "^0.30.17", - "vitefu": "^1.0.6" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22" - }, - "peerDependencies": { - "svelte": "^5.0.0", - "vite": "^6.0.0" - } - }, - "node_modules/@sveltejs/vite-plugin-svelte-inspector": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-4.0.1.tgz", - "integrity": "sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.7" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22" - }, - "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^5.0.0", - "svelte": "^5.0.0", - "vite": "^6.0.0" - } - }, - "node_modules/@svgdotjs/svg.draggable.js": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@svgdotjs/svg.draggable.js/-/svg.draggable.js-3.0.6.tgz", - "integrity": "sha512-7iJFm9lL3C40HQcqzEfezK2l+dW2CpoVY3b77KQGqc8GXWa6LhhmX5Ckv7alQfUXBuZbjpICZ+Dvq1czlGx7gA==", - "license": "MIT", - "peerDependencies": { - "@svgdotjs/svg.js": "^3.2.4" - } - }, - "node_modules/@svgdotjs/svg.filter.js": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/@svgdotjs/svg.filter.js/-/svg.filter.js-3.0.9.tgz", - "integrity": "sha512-/69XMRCDoam2HgC4ldHIaDgeQf1ViHIsa0Ld4uWgiXtZ+E24DWHe/9Ib6kbNiZ7WRIdlVokUDR1Fg0kjIpkfbw==", - "license": "MIT", - "dependencies": { - "@svgdotjs/svg.js": "^3.2.4" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/@svgdotjs/svg.js": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@svgdotjs/svg.js/-/svg.js-3.2.5.tgz", - "integrity": "sha512-/VNHWYhNu+BS7ktbYoVGrCmsXDh+chFMaONMwGNdIBcFHrWqk2jY8fNyr3DLdtQUIalvkPfM554ZSFa3dm3nxQ==", - "license": "MIT", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Fuzzyma" - } - }, - "node_modules/@svgdotjs/svg.resize.js": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@svgdotjs/svg.resize.js/-/svg.resize.js-2.0.5.tgz", - "integrity": "sha512-4heRW4B1QrJeENfi7326lUPYBCevj78FJs8kfeDxn5st0IYPIRXoTtOSYvTzFWgaWWXd3YCDE6ao4fmv91RthA==", - "license": "MIT", - "engines": { - "node": ">= 14.18" - }, - "peerDependencies": { - "@svgdotjs/svg.js": "^3.2.4", - "@svgdotjs/svg.select.js": "^4.0.1" - } - }, - "node_modules/@svgdotjs/svg.select.js": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@svgdotjs/svg.select.js/-/svg.select.js-4.0.3.tgz", - "integrity": "sha512-qkMgso1sd2hXKd1FZ1weO7ANq12sNmQJeGDjs46QwDVsxSRcHmvWKL2NDF7Yimpwf3sl5esOLkPqtV2bQ3v/Jg==", - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 14.18" - }, - "peerDependencies": { - "@svgdotjs/svg.js": "^3.2.4" - } - }, - "node_modules/@swc/helpers": { - "version": "0.5.17", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", - "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.8.0" - } - }, - "node_modules/@tailwindcss/forms": { - "version": "0.5.10", - "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.10.tgz", - "integrity": "sha512-utI1ONF6uf/pPNO68kmN1b8rEwNXv3czukalo8VtJH8ksIkZXr3Q3VYudZLkCsDd4Wku120uF02hYK25XGPorw==", - "dev": true, - "license": "MIT", - "dependencies": { - "mini-svg-data-uri": "^1.2.3" - }, - "peerDependencies": { - "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1" - } - }, - "node_modules/@tailwindcss/node": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.17.tgz", - "integrity": "sha512-csIkHIgLb3JisEFQ0vxr2Y57GUNYh447C8xzwj89U/8fdW8LhProdxvnVH6U8M2Y73QKiTIH+LWbK3V2BBZsAg==", - "license": "MIT", - "dependencies": { - "@jridgewell/remapping": "^2.3.4", - "enhanced-resolve": "^5.18.3", - "jiti": "^2.6.1", - "lightningcss": "1.30.2", - "magic-string": "^0.30.21", - "source-map-js": "^1.2.1", - "tailwindcss": "4.1.17" - } - }, - "node_modules/@tailwindcss/oxide": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.17.tgz", - "integrity": "sha512-F0F7d01fmkQhsTjXezGBLdrl1KresJTcI3DB8EkScCldyKp3Msz4hub4uyYaVnk88BAS1g5DQjjF6F5qczheLA==", - "license": "MIT", - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@tailwindcss/oxide-android-arm64": "4.1.17", - "@tailwindcss/oxide-darwin-arm64": "4.1.17", - "@tailwindcss/oxide-darwin-x64": "4.1.17", - "@tailwindcss/oxide-freebsd-x64": "4.1.17", - "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.17", - "@tailwindcss/oxide-linux-arm64-gnu": "4.1.17", - "@tailwindcss/oxide-linux-arm64-musl": "4.1.17", - "@tailwindcss/oxide-linux-x64-gnu": "4.1.17", - "@tailwindcss/oxide-linux-x64-musl": "4.1.17", - "@tailwindcss/oxide-wasm32-wasi": "4.1.17", - "@tailwindcss/oxide-win32-arm64-msvc": "4.1.17", - "@tailwindcss/oxide-win32-x64-msvc": "4.1.17" - } - }, - "node_modules/@tailwindcss/oxide-android-arm64": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.17.tgz", - "integrity": "sha512-BMqpkJHgOZ5z78qqiGE6ZIRExyaHyuxjgrJ6eBO5+hfrfGkuya0lYfw8fRHG77gdTjWkNWEEm+qeG2cDMxArLQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-arm64": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.17.tgz", - "integrity": "sha512-EquyumkQweUBNk1zGEU/wfZo2qkp/nQKRZM8bUYO0J+Lums5+wl2CcG1f9BgAjn/u9pJzdYddHWBiFXJTcxmOg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-darwin-x64": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.17.tgz", - "integrity": "sha512-gdhEPLzke2Pog8s12oADwYu0IAw04Y2tlmgVzIN0+046ytcgx8uZmCzEg4VcQh+AHKiS7xaL8kGo/QTiNEGRog==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-freebsd-x64": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.17.tgz", - "integrity": "sha512-hxGS81KskMxML9DXsaXT1H0DyA+ZBIbyG/sSAjWNe2EDl7TkPOBI42GBV3u38itzGUOmFfCzk1iAjDXds8Oh0g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.17.tgz", - "integrity": "sha512-k7jWk5E3ldAdw0cNglhjSgv501u7yrMf8oeZ0cElhxU6Y2o7f8yqelOp3fhf7evjIS6ujTI3U8pKUXV2I4iXHQ==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.17.tgz", - "integrity": "sha512-HVDOm/mxK6+TbARwdW17WrgDYEGzmoYayrCgmLEw7FxTPLcp/glBisuyWkFz/jb7ZfiAXAXUACfyItn+nTgsdQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-arm64-musl": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.17.tgz", - "integrity": "sha512-HvZLfGr42i5anKtIeQzxdkw/wPqIbpeZqe7vd3V9vI3RQxe3xU1fLjss0TjyhxWcBaipk7NYwSrwTwK1hJARMg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-gnu": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.17.tgz", - "integrity": "sha512-M3XZuORCGB7VPOEDH+nzpJ21XPvK5PyjlkSFkFziNHGLc5d6g3di2McAAblmaSUNl8IOmzYwLx9NsE7bplNkwQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-linux-x64-musl": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.17.tgz", - "integrity": "sha512-k7f+pf9eXLEey4pBlw+8dgfJHY4PZ5qOUFDyNf7SI6lHjQ9Zt7+NcscjpwdCEbYi6FI5c2KDTDWyf2iHcCSyyQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-wasm32-wasi": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.17.tgz", - "integrity": "sha512-cEytGqSSoy7zK4JRWiTCx43FsKP/zGr0CsuMawhH67ONlH+T79VteQeJQRO/X7L0juEUA8ZyuYikcRBf0vsxhg==", - "bundleDependencies": [ - "@napi-rs/wasm-runtime", - "@emnapi/core", - "@emnapi/runtime", - "@tybys/wasm-util", - "@emnapi/wasi-threads", - "tslib" - ], - "cpu": [ - "wasm32" - ], - "license": "MIT", - "optional": true, - "dependencies": { - "@emnapi/core": "^1.6.0", - "@emnapi/runtime": "^1.6.0", - "@emnapi/wasi-threads": "^1.1.0", - "@napi-rs/wasm-runtime": "^1.0.7", - "@tybys/wasm-util": "^0.10.1", - "tslib": "^2.4.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.17.tgz", - "integrity": "sha512-JU5AHr7gKbZlOGvMdb4722/0aYbU+tN6lv1kONx0JK2cGsh7g148zVWLM0IKR3NeKLv+L90chBVYcJ8uJWbC9A==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/oxide-win32-x64-msvc": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.17.tgz", - "integrity": "sha512-SKWM4waLuqx0IH+FMDUw6R66Hu4OuTALFgnleKbqhgGU30DY20NORZMZUKgLRjQXNN2TLzKvh48QXTig4h4bGw==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@tailwindcss/typography": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz", - "integrity": "sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-selector-parser": "6.0.10" - }, - "peerDependencies": { - "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" - } - }, - "node_modules/@tailwindcss/vite": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.1.17.tgz", - "integrity": "sha512-4+9w8ZHOiGnpcGI6z1TVVfWaX/koK7fKeSYF3qlYg2xpBtbteP2ddBxiarL+HVgfSJGeK5RIxRQmKm4rTJJAwA==", - "license": "MIT", - "dependencies": { - "@tailwindcss/node": "4.1.17", - "@tailwindcss/oxide": "4.1.17", - "tailwindcss": "4.1.17" - }, - "peerDependencies": { - "vite": "^5.2.0 || ^6 || ^7" - } - }, - "node_modules/@tiptap/core": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.27.1.tgz", - "integrity": "sha512-nkerkl8syHj44ZzAB7oA2GPmmZINKBKCa79FuNvmGJrJ4qyZwlkDzszud23YteFZEytbc87kVd/fP76ROS6sLg==", - "license": "MIT", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-blockquote": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.27.1.tgz", - "integrity": "sha512-QrUX3muElDrNjKM3nqCSAtm3H3pT33c6ON8kwRiQboOAjT/9D57Cs7XEVY7r6rMaJPeKztrRUrNVF9w/w/6B0A==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-bold": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.27.1.tgz", - "integrity": "sha512-g4l4p892x/r7mhea8syp3fNYODxsDrimgouQ+q4DKXIgQmm5+uNhyuEPexP3I8TFNXqQ4DlMNFoM9yCqk97etQ==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-bubble-menu": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.27.1.tgz", - "integrity": "sha512-ki1R27VsSvY2tT9Q2DIlcATwLOoEjf5DsN+5sExarQ8S/ZxT/tvIjRxB8Dx7lb2a818W5f/NER26YchGtmHfpg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "tippy.js": "^6.3.7" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-bullet-list": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.27.1.tgz", - "integrity": "sha512-5FmnfXkJ76wN4EbJNzBhAlmQxho8yEMIJLchTGmXdsD/n/tsyVVtewnQYaIOj/Z7naaGySTGDmjVtLgTuQ+Sxw==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-code": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.27.1.tgz", - "integrity": "sha512-i65wUGJevzBTIIUBHBc1ggVa27bgemvGl/tY1/89fEuS/0Xmre+OQjw8rCtSLevoHSiYYLgLRlvjtUSUhE4kgg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-code-block": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.27.1.tgz", - "integrity": "sha512-wCI5VIOfSAdkenCWFvh4m8FFCJ51EOK+CUmOC/PWUjyo2Dgn8QC8HMi015q8XF7886T0KvYVVoqxmxJSUDAYNg==", - "dev": true, - "license": "MIT", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-code-block-lowlight": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-2.27.1.tgz", - "integrity": "sha512-Ijg9724uX/l4LXLELEeztZIgg+bDE/jJCkgS1+mavkRA/qtidpQkHo7L/Ry22fmj/ktCtZLjPXE5JAPAoRU6zA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/extension-code-block": "^2.7.0", - "@tiptap/pm": "^2.7.0", - "highlight.js": "^11", - "lowlight": "^2 || ^3" - } - }, - "node_modules/@tiptap/extension-color": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-color/-/extension-color-2.27.1.tgz", - "integrity": "sha512-raYRsdG2tZvVvY1LV/VTZnDG44Y0xRBwo5CZEat0OUqdx34dfvCtYm8HIOTyWBwr7OOW+yR4O1Vc2zFkmfthZw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/extension-text-style": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-document": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.27.1.tgz", - "integrity": "sha512-NtJzJY7Q/6XWjpOm5OXKrnEaofrcc1XOTYlo/SaTwl8k2bZo918Vl0IDBWhPVDsUN7kx767uHwbtuQZ+9I82hA==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-dropcursor": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.27.1.tgz", - "integrity": "sha512-3MBQRGHHZ0by3OT0CWbLKS7J3PH9PpobrXjmIR7kr0nde7+bHqxXiVNuuIf501oKU9rnEUSedipSHkLYGkmfsA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-floating-menu": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.27.1.tgz", - "integrity": "sha512-nUk/8DbiXO69l6FDwkWso94BTf52IBoWALo+YGWT6o+FO6cI9LbUGghEX2CdmQYXCvSvwvISF2jXeLQWNZvPZQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "tippy.js": "^6.3.7" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-gapcursor": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.27.1.tgz", - "integrity": "sha512-A9e1jr+jGhDWzNSXtIO6PYVYhf5j/udjbZwMja+wCE/3KvZU9V3IrnGKz1xNW+2Q2BDOe1QO7j5uVL9ElR6nTA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-hard-break": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.27.1.tgz", - "integrity": "sha512-W4hHa4Io6QCTwpyTlN6UAvqMIQ7t56kIUByZhyY9EWrg/+JpbfpxE1kXFLPB4ZGgwBknFOw+e4bJ1j3oAbTJFw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-heading": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.27.1.tgz", - "integrity": "sha512-6xoC7igZlW1EmnQ5WVH9IL7P1nCQb3bBUaIDLvk7LbweEogcTUECI4Xg1vxMOVmj9tlDe1I4BsgfcKpB5KEsZw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-highlight": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-highlight/-/extension-highlight-2.27.1.tgz", - "integrity": "sha512-ntuYX09tvHQE/R/8WbTOxbFuQhRr2jhTkKz/gLwDD2o8IhccSy3f0nm+mVmVamKQnbsBBbLohojd5IGOnX9f1A==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-history": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.27.1.tgz", - "integrity": "sha512-K8PHC9gegSAt0wzSlsd4aUpoEyIJYOmVVeyniHr1P1mIblW1KYEDbRGbDlrLALTyUEfMcBhdIm8zrB9X2Nihvg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-horizontal-rule": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.27.1.tgz", - "integrity": "sha512-WxXWGEEsqDmGIF2o9av+3r9Qje4CKrqrpeQY6aRO5bxvWX9AabQCfasepayBok6uwtvNzh3Xpsn9zbbSk09dNA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-image": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.27.1.tgz", - "integrity": "sha512-wu3vMKDYWJwKS6Hrw5PPCKBO2RxyHNeFLiA/uDErEV7axzNpievK/U9DyaDXmtK3K/h1XzJAJz19X+2d/pY68w==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-italic": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.27.1.tgz", - "integrity": "sha512-rcm0GyniWW0UhcNI9+1eIK64GqWQLyIIrWGINslvqSUoBc+WkfocLvv4CMpRkzKlfsAxwVIBuH2eLxHKDtAREA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-link": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-2.27.1.tgz", - "integrity": "sha512-cCwWPZsnVh9MXnGOqSIRXPPuUixRDK8eMN2TvqwbxUBb1TU7b/HtNvfMU4tAOqAuMRJ0aJkFuf3eB0Gi8LVb1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "linkifyjs": "^4.3.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-list-item": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.27.1.tgz", - "integrity": "sha512-dtsxvtzxfwOJP6dKGf0vb2MJAoDF2NxoiWzpq0XTvo7NGGYUHfuHjX07Zp0dYqb4seaDXjwsi5BIQUOp3+WMFQ==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-ordered-list": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.27.1.tgz", - "integrity": "sha512-U1/sWxc2TciozQsZjH35temyidYUjvroHj3PUPzPyh19w2fwKh1NSbFybWuoYs6jS3XnMSwnM2vF52tOwvfEmA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-paragraph": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.27.1.tgz", - "integrity": "sha512-R3QdrHcUdFAsdsn2UAIvhY0yWyHjqGyP/Rv8RRdN0OyFiTKtwTPqreKMHKJOflgX4sMJl/OpHTpNG1Kaf7Lo2A==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-strike": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.27.1.tgz", - "integrity": "sha512-S9I//K8KPgfFTC5I5lorClzXk0g4lrAv9y5qHzHO5EOWt7AFl0YTg2oN8NKSIBK4bHRnPIrjJJKv+dDFnUp5jQ==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-subscript": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-subscript/-/extension-subscript-2.27.1.tgz", - "integrity": "sha512-n2jTaYriewwz3ES1o6Wt/OwREvPwi97n+yEsJ7i31wiuxGTdCP31eAuppC6DvixEvDt3/rZMZcNp8Ah9crlbnw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-superscript": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-superscript/-/extension-superscript-2.27.1.tgz", - "integrity": "sha512-zTYOD7k3txm21rjeYHsf/VIpBe9IvVfNHSNayyY/JOgyQ/fW40cgX0gADNoT2ayAtRes4TvpcUYdgF9vC5bkJw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-table": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-2.27.1.tgz", - "integrity": "sha512-iOoOo0vYFzAogAZlw36DgmFfNM5vOkLqnApm81soO/YWpqtKAvBn+TMY4ss4OMDsOefUzBa6xqOJ0gJR5ZygjA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-table-cell": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-2.27.1.tgz", - "integrity": "sha512-VowNmz1kub2qfntWkU8jGA6DoCl9xjJBWSypuQIeiN/IRId3BMrJodT26pTNJ3ChDMtYaanWaUvYqckRxgTC2A==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-table-header": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-2.27.1.tgz", - "integrity": "sha512-lSbGB6kBp/sTVzAWl4v7v7ztL5XU3aTdlS7FhfGjpdsxd4zPKYG8kx+Uxgq25W9/BlCbnqHnO0poAMfOlspDQw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-table-row": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-2.27.1.tgz", - "integrity": "sha512-3xtlmZ6NWDi5a42gK0qQQTeBUpJ2j1o7qyXTFkhQaJAeIFEqsemgSRhgXZxbwSmQQZsPJ/86KWBNVkT0FaRFDw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-task-item": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-2.27.1.tgz", - "integrity": "sha512-vaEtdos+9jApD6yRfD6F/xShikiZFHi7I0nswAmGKT/kE1wmHCUxme8OFMe7642e2OK0lqgHsUaOLxP/0nZJ5A==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0", - "@tiptap/pm": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-task-list": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-2.27.1.tgz", - "integrity": "sha512-KRlYOZ6kdURvAspUrLVsC7mLkVW2DYhpj+7QxH7gVDZuAuoPUEmpJVcBVPq7GhPF9PccaRLru+n1Ege5VqvZ+Q==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-text": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.27.1.tgz", - "integrity": "sha512-a4GCT+GZ9tUwl82F4CEum9/+WsuW0/De9Be/NqrMmi7eNfAwbUTbLCTFU0gEvv25WMHCoUzaeNk/qGmzeVPJ1Q==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-text-align": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.27.1.tgz", - "integrity": "sha512-D7dLPk7y5mDn9ZNANQ4K2gCq4vy+Emm5AdeWOGzNeqJsYrBotiQYXd9rb1QYjdup2kzAoKduMTUXV92ujo5cEg==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-text-style": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-text-style/-/extension-text-style-2.27.1.tgz", - "integrity": "sha512-NagQ9qLk0Ril83gfrk+C65SvTqPjL3WVnLF2arsEVnCrxcx3uDOvdJW67f/K5HEwEHsoqJ4Zq9Irco/koXrOXA==", - "dev": true, - "license": "MIT", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-typography": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-typography/-/extension-typography-2.27.1.tgz", - "integrity": "sha512-jAZU5IuWH9CtZlolQ1gRhV+bT75s19SXjadQwkk18gMMiapcaIVVTxUDWY6ycv9ge4cjRoaP3lqBviW3cGqhOA==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/extension-underline": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.27.1.tgz", - "integrity": "sha512-fPTmfJFAQWg1O/os1pYSPVdtvly6eW/w5sDofG7pre+bdQUN+8s1cZYelSuj/ltNVioRaB2Ws7tvNgnHL0aAJQ==", - "dev": true, - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - }, - "peerDependencies": { - "@tiptap/core": "^2.7.0" - } - }, - "node_modules/@tiptap/pm": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.27.1.tgz", - "integrity": "sha512-ijKo3+kIjALthYsnBmkRXAuw2Tswd9gd7BUR5OMfIcjGp8v576vKxOxrRfuYiUM78GPt//P0sVc1WV82H5N0PQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "prosemirror-changeset": "^2.3.0", - "prosemirror-collab": "^1.3.1", - "prosemirror-commands": "^1.6.2", - "prosemirror-dropcursor": "^1.8.1", - "prosemirror-gapcursor": "^1.3.2", - "prosemirror-history": "^1.4.1", - "prosemirror-inputrules": "^1.4.0", - "prosemirror-keymap": "^1.2.2", - "prosemirror-markdown": "^1.13.1", - "prosemirror-menu": "^1.2.4", - "prosemirror-model": "^1.23.0", - "prosemirror-schema-basic": "^1.2.3", - "prosemirror-schema-list": "^1.4.1", - "prosemirror-state": "^1.4.3", - "prosemirror-tables": "^1.6.4", - "prosemirror-trailing-node": "^3.0.0", - "prosemirror-transform": "^1.10.2", - "prosemirror-view": "^1.37.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - } - }, - "node_modules/@tiptap/starter-kit": { - "version": "2.27.1", - "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.27.1.tgz", - "integrity": "sha512-uQQlP0Nmn9eq19qm8YoOeloEfmcGbPpB1cujq54Q6nPgxaBozR7rE7tXbFTinxRW2+Hr7XyNWhpjB7DMNkdU2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tiptap/core": "^2.27.1", - "@tiptap/extension-blockquote": "^2.27.1", - "@tiptap/extension-bold": "^2.27.1", - "@tiptap/extension-bullet-list": "^2.27.1", - "@tiptap/extension-code": "^2.27.1", - "@tiptap/extension-code-block": "^2.27.1", - "@tiptap/extension-document": "^2.27.1", - "@tiptap/extension-dropcursor": "^2.27.1", - "@tiptap/extension-gapcursor": "^2.27.1", - "@tiptap/extension-hard-break": "^2.27.1", - "@tiptap/extension-heading": "^2.27.1", - "@tiptap/extension-history": "^2.27.1", - "@tiptap/extension-horizontal-rule": "^2.27.1", - "@tiptap/extension-italic": "^2.27.1", - "@tiptap/extension-list-item": "^2.27.1", - "@tiptap/extension-ordered-list": "^2.27.1", - "@tiptap/extension-paragraph": "^2.27.1", - "@tiptap/extension-strike": "^2.27.1", - "@tiptap/extension-text": "^2.27.1", - "@tiptap/extension-text-style": "^2.27.1", - "@tiptap/pm": "^2.27.1" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/ueberdosis" - } - }, - "node_modules/@types/chai": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/deep-eql": "*", - "assertion-error": "^2.0.1" - } - }, - "node_modules/@types/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/eslint": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", - "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "license": "MIT" - }, - "node_modules/@types/hast": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", - "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/unist": "*" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", - "license": "MIT" - }, - "node_modules/@types/markdown-it": { - "version": "14.1.2", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", - "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", - "license": "MIT", - "dependencies": { - "@types/linkify-it": "^5", - "@types/mdurl": "^2" - } - }, - "node_modules/@types/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", - "license": "MIT" - }, - "node_modules/@types/node": { - "version": "24.10.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", - "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.16.0" - } - }, - "node_modules/@types/qrcode": { - "version": "1.5.6", - "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.6.tgz", - "integrity": "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/resolve": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", - "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", - "license": "MIT" - }, - "node_modules/@types/unist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", - "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.4.tgz", - "integrity": "sha512-R48VhmTJqplNyDxCyqqVkFSZIx1qX6PzwqgcXn1olLrzxcSBDlOsbtcnQuQhNtnNiJ4Xe5gREI1foajYaYU2Vg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.46.4", - "@typescript-eslint/type-utils": "8.46.4", - "@typescript-eslint/utils": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4", - "graphemer": "^1.4.0", - "ignore": "^7.0.0", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.46.4", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.4.tgz", - "integrity": "sha512-tK3GPFWbirvNgsNKto+UmB/cRtn6TZfyw0D6IKrW55n6Vbs7KJoZtI//kpTKzE/DUmmnAFD8/Ca46s7Obs92/w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/scope-manager": "8.46.4", - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/typescript-estree": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.4.tgz", - "integrity": "sha512-nPiRSKuvtTN+no/2N1kt2tUh/HoFzeEgOm9fQ6XQk4/ApGqjx0zFIIaLJ6wooR1HIoozvj2j6vTi/1fgAz7UYQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.46.4", - "@typescript-eslint/types": "^8.46.4", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.4.tgz", - "integrity": "sha512-tMDbLGXb1wC+McN1M6QeDx7P7c0UWO5z9CXqp7J8E+xGcJuUuevWKxuG8j41FoweS3+L41SkyKKkia16jpX7CA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.4.tgz", - "integrity": "sha512-+/XqaZPIAk6Cjg7NWgSGe27X4zMGqrFqZ8atJsX3CWxH/jACqWnrWI68h7nHQld0y+k9eTTjb9r+KU4twLoo9A==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.4.tgz", - "integrity": "sha512-V4QC8h3fdT5Wro6vANk6eojqfbv5bpwHuMsBcJUJkqs2z5XnYhJzyz9Y02eUmF9u3PgXEUiOt4w4KHR3P+z0PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/typescript-estree": "8.46.4", - "@typescript-eslint/utils": "8.46.4", - "debug": "^4.3.4", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.4.tgz", - "integrity": "sha512-USjyxm3gQEePdUwJBFjjGNG18xY9A2grDVGuk7/9AkjIF1L+ZrVnwR5VAU5JXtUnBL/Nwt3H31KlRDaksnM7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.4.tgz", - "integrity": "sha512-7oV2qEOr1d4NWNmpXLR35LvCfOkTNymY9oyW+lUHkmCno7aOmIf/hMaydnJBUTBMRCOGZh8YjkFOc8dadEoNGA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.46.4", - "@typescript-eslint/tsconfig-utils": "8.46.4", - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/visitor-keys": "8.46.4", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.4.tgz", - "integrity": "sha512-AbSv11fklGXV6T28dp2Me04Uw90R2iJ30g2bgLz529Koehrmkbs1r7paFqr1vPCZi7hHwYxYtxfyQMRC8QaVSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.46.4", - "@typescript-eslint/types": "8.46.4", - "@typescript-eslint/typescript-estree": "8.46.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.46.4", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.4.tgz", - "integrity": "sha512-/++5CYLQqsO9HFGLI7APrxBJYo+5OCMpViuhV8q5/Qa3o5mMrF//eQHks+PXcsAVaLdn817fMuS7zqoXNNZGaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.46.4", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@vitest/expect": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", - "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/mocker": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", - "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/spy": "3.2.4", - "estree-walker": "^3.0.3", - "magic-string": "^0.30.17" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } - } - }, - "node_modules/@vitest/mocker/node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, - "node_modules/@vitest/pretty-format": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", - "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/runner": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", - "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/utils": "3.2.4", - "pathe": "^2.0.3", - "strip-literal": "^3.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/snapshot": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", - "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.2.4", - "magic-string": "^0.30.17", - "pathe": "^2.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/spy": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", - "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tinyspy": "^4.0.3" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@vitest/utils": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", - "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@vitest/pretty-format": "3.2.4", - "loupe": "^3.1.4", - "tinyrainbow": "^2.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/@yr/monotone-cubic-spline": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@yr/monotone-cubic-spline/-/monotone-cubic-spline-1.0.3.tgz", - "integrity": "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA==", - "license": "MIT" - }, - "node_modules/@zag-js/accordion": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/accordion/-/accordion-1.18.3.tgz", - "integrity": "sha512-h+Qw9uLZXlSL3vx+pe6sCHLK4pZAzKdj+2CuH3lIAp8GdOcO6MUfcfo905jl0vM0mUyWpELxRypzplcFioIVkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/anatomy": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/anatomy/-/anatomy-1.18.3.tgz", - "integrity": "sha512-D1Qaxq1NS+Wud9KEdnO1bQE1Yb1pLxi78iqj007pr+gmFfo2Br3QLJNcMm2x/IWLBCdETwgDhq6nvHTrCjmiwg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@zag-js/aria-hidden": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/aria-hidden/-/aria-hidden-1.18.3.tgz", - "integrity": "sha512-CQ4BkawuNfL8yezXjT5zsdFNGKCudz+p13TVW2eP8hHGuMQilK32h4fNd2536U9SRQNi0BjF/e9Qgfl8G2ipDg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@zag-js/auto-resize": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/auto-resize/-/auto-resize-1.18.3.tgz", - "integrity": "sha512-r+eP3R51fFPTd4TYJnjDf62o9Rr4EltuhWEEx+jDahP0hFfK74SDvb0HYMu1j9WQIb2O84JlBma+PNsZSsJasQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.18.3" - } - }, - "node_modules/@zag-js/avatar": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/avatar/-/avatar-1.18.3.tgz", - "integrity": "sha512-2yaWSMDG73/2J0NxDtdaAKoto/jg/W/mJ7QGR+1Ay7bNcHnnCaYJcVKPdx/v4k46Swhtt/GKkIqavnRXT6brAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/collection": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/collection/-/collection-1.18.3.tgz", - "integrity": "sha512-0IS4nKgFP6s0XwIBdhNrEtPghlIa+cxl4emkppQS0Q/bGEytA+0tE73ZcIY2i/PN15DRdlLmOWX8g0IWFm8R3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/combobox": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/combobox/-/combobox-1.18.3.tgz", - "integrity": "sha512-RnJUb67Dv/erKjNv1x+wZvEiHoToBQv8xNh5WOhsLD5TNZEHF7zYsYnKbywR+RlAUysDb8HWfV4OfeFKUWxV3A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/aria-hidden": "1.18.3", - "@zag-js/collection": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dismissable": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/popper": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/core": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/core/-/core-1.18.3.tgz", - "integrity": "sha512-FuB4ClNyob6Fqx57mEWbPui59uU1x9I6MvTyJunnPjJMWr1M0bxsgrqkePoEzt+osel8qLMyaa1oHaxszSNxKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/dialog": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/dialog/-/dialog-1.18.3.tgz", - "integrity": "sha512-gLWYKYpUyp3IyLr0BX/c6izvX59rCugwv4ClGpojL+chv6KlmgPX6qKj6XVoyWlYsnxvIL3mF2SX+lgUz+SOrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/aria-hidden": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dismissable": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/focus-trap": "1.18.3", - "@zag-js/remove-scroll": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/dismissable": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/dismissable/-/dismissable-1.18.3.tgz", - "integrity": "sha512-6q8OlX/W+TvP73r7tDcsLbTZEipczO4TNZnDHGFra+tP8CPslZZ39SZYomhrtRWqOKWu5R3UX+Vgl4gO1wtykA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.18.3", - "@zag-js/interact-outside": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/dom-query": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/dom-query/-/dom-query-1.18.3.tgz", - "integrity": "sha512-mPj2xvjxXyB++aGoIIZZ0cCbMu+nfLvks/Q2fe6SgfSaTdGw8jvJtp4F5Qs3Q+MOHbIZRnAqYyBLv56qav3AeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/types": "1.18.3" - } - }, - "node_modules/@zag-js/file-upload": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/file-upload/-/file-upload-1.18.3.tgz", - "integrity": "sha512-Noq/DaNwuoDK7klyqy86IJOmxQIKaUY15PBiU7u2sU+VMqKWcWLm1hSlRLpnhkJrhRGJRXxKd8rGuCO/i8t1Xg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/file-utils": "1.18.3", - "@zag-js/i18n-utils": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/file-utils": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/file-utils/-/file-utils-1.18.3.tgz", - "integrity": "sha512-JoQJsP3OWJTP/mGzKD/N7RKXdnigaT4ExKQPQaHF+jT/uQtHs+8J088Td/WVkfLTHIyW/s3t09pLk7z6ufZJkA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/i18n-utils": "1.18.3" - } - }, - "node_modules/@zag-js/focus-trap": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/focus-trap/-/focus-trap-1.18.3.tgz", - "integrity": "sha512-EhAJb7xIHaUYP+WxlmN2SKEvsqTWih0FUX4Jf+rh2xr4v/dd/09ki+/yQjtTxVrKshCGe4LxCGeiws7mTkOZrA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.18.3" - } - }, - "node_modules/@zag-js/focus-visible": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/focus-visible/-/focus-visible-1.18.3.tgz", - "integrity": "sha512-od0TDV0oCwldqyIOLyfLcLlQlsAnlsO03Je2TrL1/48vxbnPaYQRQK8HUjIFnPcr/rPDKojoRjmNi4OryD2/4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.18.3" - } - }, - "node_modules/@zag-js/i18n-utils": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/i18n-utils/-/i18n-utils-1.18.3.tgz", - "integrity": "sha512-7ihl4sJEyTL4LHwLgmRcSn9nGBEbbRkN6W552dFjeV5rAIgRGvrdKvEHGdkSQkrDHNlVU2zEHlN50vEdfsG4Vw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.18.3" - } - }, - "node_modules/@zag-js/interact-outside": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/interact-outside/-/interact-outside-1.18.3.tgz", - "integrity": "sha512-DDcFBOZRjJ2a4qxQ2QU/37mIRCJivnVV87bKy8i/Zu+ea4URerBAsLp23/UC1aqEnDK+QXWRMQsK02SySR/RiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/live-region": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/live-region/-/live-region-1.18.3.tgz", - "integrity": "sha512-n3kKr4a+RWwBdkaZc+EZXBMb7joHg1lyxK95oP0/9l+Aeltut5gpjA+VQP49pLagakUnMzt1KbkHekO8FKeX3A==", - "dev": true, - "license": "MIT" - }, - "node_modules/@zag-js/pagination": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/pagination/-/pagination-1.18.3.tgz", - "integrity": "sha512-n6+BVIR1MtBLu0w2CftbNpmWEL7F1RO/MgltQTI0MVUNUEqWEErn44m6oTckIGpF43B42IVbr5MIZrQyBmjhUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/popover": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/popover/-/popover-1.18.3.tgz", - "integrity": "sha512-60kMLotCgPBKvMmPkQTJpSRWQpIPOvxD3ZhbD2q9ZgvxH0tyLX9YpjDrCFoMCm90gsBeRbXObLcCnMfRecn4EA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/aria-hidden": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dismissable": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/focus-trap": "1.18.3", - "@zag-js/popper": "1.18.3", - "@zag-js/remove-scroll": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/popper": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/popper/-/popper-1.18.3.tgz", - "integrity": "sha512-g8qH1fzT3xPYsLfj/07fiNPintf3xr/VkAZ7btW8uO9fjJGe++1Dmk1qze1gFYReMGrSGg/6eB53QN5QxNYLtw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@floating-ui/dom": "1.7.2", - "@zag-js/dom-query": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/popper/node_modules/@floating-ui/dom": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.2.tgz", - "integrity": "sha512-7cfaOQuCS27HD7DX+6ib2OrnW+b4ZBwDNnCcT0uTyidcmyWb03FnQqJybDBoCnpdxwBSfA94UAYlRCt7mV+TbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@floating-ui/core": "^1.7.2", - "@floating-ui/utils": "^0.2.10" - } - }, - "node_modules/@zag-js/progress": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/progress/-/progress-1.18.3.tgz", - "integrity": "sha512-M37PpfL9ihiVUpeHMXbmm/88WO8RMPVXi5Dd4CJcc0pw5sh53b5SgxFbjm5ICrEqPRoxOIZ7Rg6yCgNMHMvaQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/radio-group": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/radio-group/-/radio-group-1.18.3.tgz", - "integrity": "sha512-LwsO1tgSYjQksWN3l9wLA8qisP+tLl/bex6hAGhaH1SFAbbr51xS+f1Sfyxiqv6Fk9P78ONW1Rb3eoIkTeZmUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/focus-visible": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/rating-group": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/rating-group/-/rating-group-1.18.3.tgz", - "integrity": "sha512-+2tqw7XwXf3Gv2uYBxYYIHfwQtuf7C/LjsakngtNxMfAyYwoldux/EKlm7Y7wEruKK7WqifsTbFxEdCvLrc3cw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/remove-scroll": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/remove-scroll/-/remove-scroll-1.18.3.tgz", - "integrity": "sha512-cqWdN2uCRHiuXxLQq/HPTOLddHwp0UzGk/9fySox3kbZ2bsHtG1FXza2nrG99PlSrgorp3FIOsM8cT97cJfhCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/dom-query": "1.18.3" - } - }, - "node_modules/@zag-js/slider": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/slider/-/slider-1.18.3.tgz", - "integrity": "sha512-H85nDzQBl/Ab9ZCSqG3gHPyf/0TbFLKVdsPGLBVkbhZRhdcsOCwHQIcBIzbb7if6XM4zuOFClHJhDm3WaFfMEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/store": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/store/-/store-1.18.3.tgz", - "integrity": "sha512-9Df5Zr1pi9B7+2/OFdhyVDOkUaFUWLqgyKYx+DGaHh1LC6QbPJKoOsQ1zr23Q8G4//Dh1vNnES1SXojJA5+Nlg==", - "dev": true, - "license": "MIT", - "dependencies": { - "proxy-compare": "3.0.1" - } - }, - "node_modules/@zag-js/svelte": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/svelte/-/svelte-1.18.3.tgz", - "integrity": "sha512-eGtlAtw2eQHASMs4wmJBpK6uGwFNibIQ+5Zw4TLPrvms0ZOOcZm4//DYqEdOhsunm95y8lYFRhaeDyVagrabtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/core": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - }, - "peerDependencies": { - "svelte": "^5.0.0-next.1" - } - }, - "node_modules/@zag-js/switch": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/switch/-/switch-1.18.3.tgz", - "integrity": "sha512-JpdJR9pWMqfQWy3jcYwlNO2Av4UfY6ZvVnScOMU72bg8DWiv32SVZrdhBghhAPngWO8B181mJ30y9bUNths0tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/focus-visible": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/tabs": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/tabs/-/tabs-1.18.3.tgz", - "integrity": "sha512-Bo+V5w0Lh2uVEyY8la7t8A0RxljyVwZmii+SzhWmsuSRBBvQ1y82Gyk0CbwuranARryIFHwWFl8c4sp4fSZvqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/tags-input": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/tags-input/-/tags-input-1.18.3.tgz", - "integrity": "sha512-gqC8r5m8Cp6B0wfGwivxl2gEQuiezua1nlonQSGgt/AQqPnILTqvziwkPurRKuG8S7e0M12pDTcJjSnsdZb2Nw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/auto-resize": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/interact-outside": "1.18.3", - "@zag-js/live-region": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/toast": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/toast/-/toast-1.18.3.tgz", - "integrity": "sha512-q+dH7Z8uUBezxWlJWdUqCDxkuIXQw9KN3AtNbCvM2ZFbJFHzvzvYwSiU3VBuML0cLxmNjXO3EpenKyPAla/VyA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dismissable": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/tooltip": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/tooltip/-/tooltip-1.18.3.tgz", - "integrity": "sha512-FzG2epZX/ZmnrK9G1u9f3nmYLC1/a6mrp9BI2elaqO00cQNg7+WH+jhmrRofv2YrfpCgFYeo4yzAOcX6OkOiKA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@zag-js/anatomy": "1.18.3", - "@zag-js/core": "1.18.3", - "@zag-js/dom-query": "1.18.3", - "@zag-js/focus-visible": "1.18.3", - "@zag-js/popper": "1.18.3", - "@zag-js/store": "1.18.3", - "@zag-js/types": "1.18.3", - "@zag-js/utils": "1.18.3" - } - }, - "node_modules/@zag-js/types": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/types/-/types-1.18.3.tgz", - "integrity": "sha512-M99ji5nha2/C2IQFkTkIA4SMR5w9rE0havAN55P8qpVtFzbcncCkSUZ4O0J2I4pA+NnJpCF5TcT1t7WnsyWlZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "csstype": "3.1.3" - } - }, - "node_modules/@zag-js/utils": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/@zag-js/utils/-/utils-1.18.3.tgz", - "integrity": "sha512-yS8M286qUp6gf4d4tnnsNehdGIlI0Feuug9QiWkWSTbAUNmGJyh5cmjNxNSuLWVCPMREC89BIIWq09s113zPig==", - "dev": true, - "license": "MIT" - }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "license": "MIT", - "peer": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/apexcharts": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-5.3.6.tgz", - "integrity": "sha512-sVEPw+J0Gp0IHQabKu8cfdsxlfME0e36Wid7RIaPclGM2OUt+O7O4+6mfAmTUYhy5bDk8cNHzEhPfVtLCIXEJA==", - "license": "SEE LICENSE IN LICENSE", - "dependencies": { - "@svgdotjs/svg.draggable.js": "^3.0.4", - "@svgdotjs/svg.filter.js": "^3.0.8", - "@svgdotjs/svg.js": "^3.2.4", - "@svgdotjs/svg.resize.js": "^2.0.2", - "@svgdotjs/svg.select.js": "^4.0.1", - "@yr/monotone-cubic-spline": "^1.0.3" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "license": "Python-2.0" - }, - "node_modules/aria-query": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", - "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/axios": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", - "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/axobject-query": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", - "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", - "license": "Apache-2.0", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/bits-ui": { - "version": "2.14.3", - "resolved": "https://registry.npmjs.org/bits-ui/-/bits-ui-2.14.3.tgz", - "integrity": "sha512-Dkpenu6F5WUfdDJn5D8ALkTaAM+7sUCszKjzav5TWAzsq1fj2tcqKYJcUm82OS+JlgcolI7LOkrqIXzKnt56RA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@floating-ui/core": "^1.7.1", - "@floating-ui/dom": "^1.7.1", - "esm-env": "^1.1.2", - "runed": "^0.35.1", - "svelte-toolbelt": "^0.10.6", - "tabbable": "^6.2.0" - }, - "engines": { - "node": ">=20" - }, - "funding": { - "url": "https://github.com/sponsors/huntabyte" - }, - "peerDependencies": { - "@internationalized/date": "^3.8.1", - "svelte": "^5.33.0" - } - }, - "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer-builder": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/buffer-builder/-/buffer-builder-0.2.0.tgz", - "integrity": "sha512-7VPMEPuYznPSoR21NE1zvd2Xna6c/CloiZCfcMXR1Jny6PjX0N4Nsa38zcBFo/FMK+BlA+FLKbJCQ0i2yxp+Xg==", - "devOptional": true, - "license": "MIT/X11" - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/chai": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", - "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^2.0.1", - "check-error": "^2.1.1", - "deep-eql": "^5.0.1", - "loupe": "^3.1.0", - "pathval": "^2.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/check-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", - "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 16" - } - }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/codemirror": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz", - "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==", - "license": "MIT", - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/commands": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/search": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT" - }, - "node_modules/colord": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", - "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/colorjs.io": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/colorjs.io/-/colorjs.io-0.5.2.tgz", - "integrity": "sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "14.0.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz", - "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==", - "license": "MIT", - "engines": { - "node": ">=20" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true, - "license": "MIT" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/crelt": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", - "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", - "license": "MIT" - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "license": "MIT", - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true, - "license": "MIT" - }, - "node_modules/date-fns": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", - "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", - "license": "MIT", - "funding": { - "type": "github", - "url": "https://github.com/sponsors/kossnocorp" - } - }, - "node_modules/dayjs": { - "version": "1.11.19", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", - "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", - "license": "MIT" - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dedent-js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz", - "integrity": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/deep-eql": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", - "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, - "node_modules/devalue": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.5.0.tgz", - "integrity": "sha512-69sM5yrHfFLJt0AZ9QqZXGCPfJ7fQjvpln3Rq5+PS03LD32Ost1Q9N+eEnaQwGRIriKkMImXD56ocjQmfjbV3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/devlop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", - "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", - "dev": true, - "license": "MIT", - "dependencies": { - "dequal": "^2.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/dexie": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/dexie/-/dexie-4.2.1.tgz", - "integrity": "sha512-Ckej0NS6jxQ4Po3OrSQBFddayRhTCic2DoCAG5zacOfOVB9P2Q5Xc5uL/nVa7ZVs+HdMnvUPzLFCB/JwpB6Csg==", - "license": "Apache-2.0" - }, - "node_modules/dijkstrajs": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", - "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", - "license": "MIT" - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/enhanced-resolve": { - "version": "5.18.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", - "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", - "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", - "dev": true, - "license": "MIT" - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/esbuild": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", - "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.12", - "@esbuild/android-arm": "0.25.12", - "@esbuild/android-arm64": "0.25.12", - "@esbuild/android-x64": "0.25.12", - "@esbuild/darwin-arm64": "0.25.12", - "@esbuild/darwin-x64": "0.25.12", - "@esbuild/freebsd-arm64": "0.25.12", - "@esbuild/freebsd-x64": "0.25.12", - "@esbuild/linux-arm": "0.25.12", - "@esbuild/linux-arm64": "0.25.12", - "@esbuild/linux-ia32": "0.25.12", - "@esbuild/linux-loong64": "0.25.12", - "@esbuild/linux-mips64el": "0.25.12", - "@esbuild/linux-ppc64": "0.25.12", - "@esbuild/linux-riscv64": "0.25.12", - "@esbuild/linux-s390x": "0.25.12", - "@esbuild/linux-x64": "0.25.12", - "@esbuild/netbsd-arm64": "0.25.12", - "@esbuild/netbsd-x64": "0.25.12", - "@esbuild/openbsd-arm64": "0.25.12", - "@esbuild/openbsd-x64": "0.25.12", - "@esbuild/openharmony-arm64": "0.25.12", - "@esbuild/sunos-x64": "0.25.12", - "@esbuild/win32-arm64": "0.25.12", - "@esbuild/win32-ia32": "0.25.12", - "@esbuild/win32-x64": "0.25.12" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.39.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", - "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.1", - "@eslint/config-helpers": "^0.4.2", - "@eslint/core": "^0.17.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.39.1", - "@eslint/plugin-kit": "^0.4.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.4.0", - "eslint-visitor-keys": "^4.2.1", - "espree": "^10.4.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-config-prettier": { - "version": "10.1.8", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", - "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", - "dev": true, - "license": "MIT", - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "funding": { - "url": "https://opencollective.com/eslint-config-prettier" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-svelte": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-3.13.0.tgz", - "integrity": "sha512-2ohCCQJJTNbIpQCSDSTWj+FN0OVfPmSO03lmSNT7ytqMaWF6kpT86LdzDqtm4sh7TVPl/OEWJ/d7R87bXP2Vjg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.6.1", - "@jridgewell/sourcemap-codec": "^1.5.0", - "esutils": "^2.0.3", - "globals": "^16.0.0", - "known-css-properties": "^0.37.0", - "postcss": "^8.4.49", - "postcss-load-config": "^3.1.4", - "postcss-safe-parser": "^7.0.0", - "semver": "^7.6.3", - "svelte-eslint-parser": "^1.4.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://github.com/sponsors/ota-meshi" - }, - "peerDependencies": { - "eslint": "^8.57.1 || ^9.0.0", - "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "svelte": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-svelte/node_modules/globals": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", - "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint-scope": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", - "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/esm-env": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", - "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", - "license": "MIT" - }, - "node_modules/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrap": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.1.2.tgz", - "integrity": "sha512-DgvlIQeowRNyvLPWW4PT7Gu13WznY288Du086E751mwwbsgr29ytBiYeLzAGIo0qk3Ujob0SDk8TiSaM5WQzNg==", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "license": "MIT" - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expect-type": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", - "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT" - }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "license": "ISC" - }, - "node_modules/flowbite": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/flowbite/-/flowbite-3.1.2.tgz", - "integrity": "sha512-MkwSgbbybCYgMC+go6Da5idEKUFfMqc/AmSjm/2ZbdmvoKf5frLPq/eIhXc9P+rC8t9boZtUXzHDgt5whZ6A/Q==", - "license": "MIT", - "dependencies": { - "@popperjs/core": "^2.9.3", - "flowbite-datepicker": "^1.3.1", - "mini-svg-data-uri": "^1.4.3", - "postcss": "^8.5.1" - } - }, - "node_modules/flowbite-datepicker": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/flowbite-datepicker/-/flowbite-datepicker-1.3.2.tgz", - "integrity": "sha512-6Nfm0MCVX3mpaR7YSCjmEO2GO8CDt6CX8ZpQnGdeu03WUCWtEPQ/uy0PUiNtIJjJZWnX0Cm3H55MOhbD1g+E/g==", - "license": "MIT", - "dependencies": { - "@rollup/plugin-node-resolve": "^15.2.3", - "flowbite": "^2.0.0" - } - }, - "node_modules/flowbite-datepicker/node_modules/@rollup/plugin-node-resolve": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz", - "integrity": "sha512-tgg6b91pAybXHJQMAAwW9VuWBO6Thi+q7BCNARLwSqlmsHz0XYURtGvh/AuwSADXSI4h/2uHbs7s4FzlZDGSGA==", - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^5.0.1", - "@types/resolve": "1.20.2", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.22.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^2.78.0||^3.0.0||^4.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, - "node_modules/flowbite-datepicker/node_modules/flowbite": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/flowbite/-/flowbite-2.5.2.tgz", - "integrity": "sha512-kwFD3n8/YW4EG8GlY3Od9IoKND97kitO+/ejISHSqpn3vw2i5K/+ZI8Jm2V+KC4fGdnfi0XZ+TzYqQb4Q1LshA==", - "license": "MIT", - "dependencies": { - "@popperjs/core": "^2.9.3", - "flowbite-datepicker": "^1.3.0", - "mini-svg-data-uri": "^1.4.3" - } - }, - "node_modules/flowbite-svelte": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/flowbite-svelte/-/flowbite-svelte-1.28.0.tgz", - "integrity": "sha512-3nrXBNbbJJ11PqcTLJg6a/3tNXBPnnhXC/Nf2isuABhWdGdTgKPQcX+ZjkYwi40hWFPmCgjFP8SO2OGdwZNaZA==", - "license": "MIT", - "dependencies": { - "@floating-ui/dom": "^1.7.4", - "@floating-ui/utils": "^0.2.10", - "apexcharts": "^5.3.5", - "clsx": "^2.1.1", - "date-fns": "^4.1.0", - "esm-env": "^1.2.2", - "flowbite": "^3.1.2", - "tailwind-merge": "^3.3.1", - "tailwind-variants": "^3.1.1" - }, - "peerDependencies": { - "svelte": "^5.29.0", - "tailwindcss": "^4.1.4" - } - }, - "node_modules/flowbite-svelte/node_modules/tailwind-variants": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tailwind-variants/-/tailwind-variants-3.1.1.tgz", - "integrity": "sha512-ftLXe3krnqkMHsuBTEmaVUXYovXtPyTK7ckEfDRXS8PBZx0bAUas+A0jYxuKA5b8qg++wvQ3d2MQ7l/xeZxbZQ==", - "license": "MIT", - "engines": { - "node": ">=16.x", - "pnpm": ">=7.x" - }, - "peerDependencies": { - "tailwind-merge": ">=3.0.0", - "tailwindcss": "*" - }, - "peerDependenciesMeta": { - "tailwind-merge": { - "optional": true - } - } - }, - "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", - "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/highlight.js": { - "version": "11.11.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", - "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/html5-qrcode": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/html5-qrcode/-/html5-qrcode-2.3.8.tgz", - "integrity": "sha512-jsr4vafJhwoLVEDW3n1KvPnCCXWaQfRng0/EEYk1vNcQGcG/htAdhJX0be8YyqMoSz7+hZvOZSTAepsabiuhiQ==", - "license": "Apache-2.0" - }, - "node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/immutable": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.4.tgz", - "integrity": "sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inline-style-parser": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.6.tgz", - "integrity": "sha512-gtGXVaBdl5mAes3rPcMedEBm12ibjt1kDMFfheul1wUAOVEJW60voNdMVzVkfLN06O7ZaD/rxhfKgtlgtTbMjg==", - "dev": true, - "license": "MIT" - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "license": "MIT" - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/jiti": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", - "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", - "license": "MIT", - "bin": { - "jiti": "lib/jiti-cli.mjs" - } - }, - "node_modules/js-tokens": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", - "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/known-css-properties": { - "version": "0.37.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.37.0.tgz", - "integrity": "sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lightningcss": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.2.tgz", - "integrity": "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==", - "license": "MPL-2.0", - "dependencies": { - "detect-libc": "^2.0.3" - }, - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.30.2", - "lightningcss-darwin-arm64": "1.30.2", - "lightningcss-darwin-x64": "1.30.2", - "lightningcss-freebsd-x64": "1.30.2", - "lightningcss-linux-arm-gnueabihf": "1.30.2", - "lightningcss-linux-arm64-gnu": "1.30.2", - "lightningcss-linux-arm64-musl": "1.30.2", - "lightningcss-linux-x64-gnu": "1.30.2", - "lightningcss-linux-x64-musl": "1.30.2", - "lightningcss-win32-arm64-msvc": "1.30.2", - "lightningcss-win32-x64-msvc": "1.30.2" - } - }, - "node_modules/lightningcss-android-arm64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.30.2.tgz", - "integrity": "sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.2.tgz", - "integrity": "sha512-ylTcDJBN3Hp21TdhRT5zBOIi73P6/W0qwvlFEk22fkdXchtNTOU4Qc37SkzV+EKYxLouZ6M4LG9NfZ1qkhhBWA==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.2.tgz", - "integrity": "sha512-oBZgKchomuDYxr7ilwLcyms6BCyLn0z8J0+ZZmfpjwg9fRVZIR5/GMXd7r9RH94iDhld3UmSjBM6nXWM2TfZTQ==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.2.tgz", - "integrity": "sha512-c2bH6xTrf4BDpK8MoGG4Bd6zAMZDAXS569UxCAGcA7IKbHNMlhGQ89eRmvpIUGfKWNVdbhSbkQaWhEoMGmGslA==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.2.tgz", - "integrity": "sha512-eVdpxh4wYcm0PofJIZVuYuLiqBIakQ9uFZmipf6LF/HRj5Bgm0eb3qL/mr1smyXIS1twwOxNWndd8z0E374hiA==", - "cpu": [ - "arm" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.2.tgz", - "integrity": "sha512-UK65WJAbwIJbiBFXpxrbTNArtfuznvxAJw4Q2ZGlU8kPeDIWEX1dg3rn2veBVUylA2Ezg89ktszWbaQnxD/e3A==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.2.tgz", - "integrity": "sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.2.tgz", - "integrity": "sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.2.tgz", - "integrity": "sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.2.tgz", - "integrity": "sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==", - "cpu": [ - "arm64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.30.2", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.2.tgz", - "integrity": "sha512-5g1yc73p+iAkid5phb4oVFMB45417DkRevRbt/El/gKXJk4jid+vPFF/AXbxn05Aky8PapwzZrdJShv5C0avjw==", - "cpu": [ - "x64" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", - "license": "MIT", - "dependencies": { - "uc.micro": "^2.0.0" - } - }, - "node_modules/linkifyjs": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.3.2.tgz", - "integrity": "sha512-NT1CJtq3hHIreOianA8aSXn6Cw0JzYOuDQbOrSPe7gqFnCpKP++MQe3ODgO3oh2GJFORkAAdqredOa60z63GbA==", - "dev": true, - "license": "MIT" - }, - "node_modules/locate-character": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", - "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", - "license": "MIT" - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/loupe": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", - "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/lowlight": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz", - "integrity": "sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/hast": "^3.0.0", - "devlop": "^1.0.0", - "highlight.js": "~11.11.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/wooorm" - } - }, - "node_modules/lucide-svelte": { - "version": "0.553.0", - "resolved": "https://registry.npmjs.org/lucide-svelte/-/lucide-svelte-0.553.0.tgz", - "integrity": "sha512-pOqzFX+RfcNyvjF0+nGVnSmprd+4NQ6mvpLOLEmhTyZGOad8+OtCl65822E7Rx9qE7rfKw84ODKI2v318JZ/7g==", - "license": "ISC", - "peerDependencies": { - "svelte": "^3 || ^4 || ^5.0.0-next.42" - } - }, - "node_modules/lz-string": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", - "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", - "dev": true, - "license": "MIT", - "bin": { - "lz-string": "bin/bin.js" - } - }, - "node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, - "node_modules/markdown-it": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.0", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" - }, - "bin": { - "markdown-it": "bin/markdown-it.mjs" - } - }, - "node_modules/marked": { - "version": "16.4.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", - "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mini-svg-data-uri": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", - "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", - "license": "MIT", - "bin": { - "mini-svg-data-uri": "cli.js" - } - }, - "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/mode-watcher": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mode-watcher/-/mode-watcher-1.1.0.tgz", - "integrity": "sha512-mUT9RRGPDYenk59qJauN1rhsIMKBmWA3xMF+uRwE8MW/tjhaDSCCARqkSuDTq8vr4/2KcAxIGVjACxTjdk5C3g==", - "dev": true, - "license": "MIT", - "dependencies": { - "runed": "^0.25.0", - "svelte-toolbelt": "^0.7.1" - }, - "peerDependencies": { - "svelte": "^5.27.0" - } - }, - "node_modules/mode-watcher/node_modules/runed": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/runed/-/runed-0.25.0.tgz", - "integrity": "sha512-7+ma4AG9FT2sWQEA0Egf6mb7PBT2vHyuHail1ie8ropfSjvZGtEAx8YTmUjv/APCsdRRxEVvArNjALk9zFSOrg==", - "dev": true, - "funding": [ - "https://github.com/sponsors/huntabyte", - "https://github.com/sponsors/tglide" - ], - "dependencies": { - "esm-env": "^1.0.0" - }, - "peerDependencies": { - "svelte": "^5.7.0" - } - }, - "node_modules/mode-watcher/node_modules/svelte-toolbelt": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/svelte-toolbelt/-/svelte-toolbelt-0.7.1.tgz", - "integrity": "sha512-HcBOcR17Vx9bjaOceUvxkY3nGmbBmCBBbuWLLEWO6jtmWH8f/QoWmbyUfQZrpDINH39en1b8mptfPQT9VKQ1xQ==", - "dev": true, - "funding": [ - "https://github.com/sponsors/huntabyte" - ], - "dependencies": { - "clsx": "^2.1.1", - "runed": "^0.23.2", - "style-to-object": "^1.0.8" - }, - "engines": { - "node": ">=18", - "pnpm": ">=8.7.0" - }, - "peerDependencies": { - "svelte": "^5.0.0" - } - }, - "node_modules/mode-watcher/node_modules/svelte-toolbelt/node_modules/runed": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/runed/-/runed-0.23.4.tgz", - "integrity": "sha512-9q8oUiBYeXIDLWNK5DfCWlkL0EW3oGbk845VdKlPeia28l751VpfesaB/+7pI6rnbx1I6rqoZ2fZxptOJLxILA==", - "dev": true, - "funding": [ - "https://github.com/sponsors/huntabyte", - "https://github.com/sponsors/tglide" - ], - "dependencies": { - "esm-env": "^1.0.0" - }, - "peerDependencies": { - "svelte": "^5.7.0" - } - }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/mrmime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", - "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/nanoid": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", - "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "license": "MIT", - "optional": true - }, - "node_modules/node-fetch-native": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", - "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", - "license": "MIT" - }, - "node_modules/openai": { - "version": "5.23.2", - "resolved": "https://registry.npmjs.org/openai/-/openai-5.23.2.tgz", - "integrity": "sha512-MQBzmTulj+MM5O8SKEk/gL8a7s5mktS9zUtAkU257WjvobGc9nKcBuVwjyEEcb9SI8a8Y2G/mzn3vm9n1Jlleg==", - "license": "Apache-2.0", - "bin": { - "openai": "bin/cli" - }, - "peerDependencies": { - "ws": "^8.18.0", - "zod": "^3.23.8" - }, - "peerDependenciesMeta": { - "ws": { - "optional": true - }, - "zod": { - "optional": true - } - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/orderedmap": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.1.1.tgz", - "integrity": "sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==", - "license": "MIT" - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "license": "MIT" - }, - "node_modules/pathe": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", - "dev": true, - "license": "MIT" - }, - "node_modules/pathval": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", - "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.16" - } - }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/playwright": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", - "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.56.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", - "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/pngjs": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", - "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/postcss": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", - "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "nanoid": "^3.3.11", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-load-config": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", - "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", - "dev": true, - "license": "MIT", - "dependencies": { - "lilconfig": "^2.0.5", - "yaml": "^1.10.2" - }, - "engines": { - "node": ">= 10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - "peerDependencies": { - "postcss": ">=8.0.9", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/postcss-load-config/node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">= 6" - } - }, - "node_modules/postcss-safe-parser": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.1.tgz", - "integrity": "sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss-safe-parser" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "engines": { - "node": ">=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-scss": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", - "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss-scss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "engines": { - "node": ">=12.0" - }, - "peerDependencies": { - "postcss": "^8.4.29" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.10", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", - "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-plugin-svelte": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.4.0.tgz", - "integrity": "sha512-pn1ra/0mPObzqoIQn/vUTR3ZZI6UuZ0sHqMK5x2jMLGrs53h0sXhkVuDcrlssHwIMk7FYrMjHBPoUSyyEEDlBQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "prettier": "^3.0.0", - "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" - } - }, - "node_modules/prosemirror-changeset": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prosemirror-changeset/-/prosemirror-changeset-2.3.1.tgz", - "integrity": "sha512-j0kORIBm8ayJNl3zQvD1TTPHJX3g042et6y/KQhZhnPrruO8exkTgG8X+NRpj7kIyMMEx74Xb3DyMIBtO0IKkQ==", - "license": "MIT", - "dependencies": { - "prosemirror-transform": "^1.0.0" - } - }, - "node_modules/prosemirror-collab": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/prosemirror-collab/-/prosemirror-collab-1.3.1.tgz", - "integrity": "sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0" - } - }, - "node_modules/prosemirror-commands": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.7.1.tgz", - "integrity": "sha512-rT7qZnQtx5c0/y/KlYaGvtG411S97UaL6gdp6RIZ23DLHanMYLyfGBV5DtSnZdthQql7W+lEVbpSfwtO8T+L2w==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.0.0", - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.10.2" - } - }, - "node_modules/prosemirror-dropcursor": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.8.2.tgz", - "integrity": "sha512-CCk6Gyx9+Tt2sbYk5NK0nB1ukHi2ryaRgadV/LvyNuO3ena1payM2z6Cg0vO1ebK8cxbzo41ku2DE5Axj1Zuiw==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.1.0", - "prosemirror-view": "^1.1.0" - } - }, - "node_modules/prosemirror-gapcursor": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.4.0.tgz", - "integrity": "sha512-z00qvurSdCEWUIulij/isHaqu4uLS8r/Fi61IbjdIPJEonQgggbJsLnstW7Lgdk4zQ68/yr6B6bf7sJXowIgdQ==", - "license": "MIT", - "dependencies": { - "prosemirror-keymap": "^1.0.0", - "prosemirror-model": "^1.0.0", - "prosemirror-state": "^1.0.0", - "prosemirror-view": "^1.0.0" - } - }, - "node_modules/prosemirror-history": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.5.0.tgz", - "integrity": "sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.2.2", - "prosemirror-transform": "^1.0.0", - "prosemirror-view": "^1.31.0", - "rope-sequence": "^1.3.0" - } - }, - "node_modules/prosemirror-inputrules": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.5.1.tgz", - "integrity": "sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.0.0" - } - }, - "node_modules/prosemirror-keymap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.3.tgz", - "integrity": "sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==", - "license": "MIT", - "dependencies": { - "prosemirror-state": "^1.0.0", - "w3c-keyname": "^2.2.0" - } - }, - "node_modules/prosemirror-markdown": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.13.2.tgz", - "integrity": "sha512-FPD9rHPdA9fqzNmIIDhhnYQ6WgNoSWX9StUZ8LEKapaXU9i6XgykaHKhp6XMyXlOWetmaFgGDS/nu/w9/vUc5g==", - "license": "MIT", - "dependencies": { - "@types/markdown-it": "^14.0.0", - "markdown-it": "^14.0.0", - "prosemirror-model": "^1.25.0" - } - }, - "node_modules/prosemirror-menu": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/prosemirror-menu/-/prosemirror-menu-1.2.5.tgz", - "integrity": "sha512-qwXzynnpBIeg1D7BAtjOusR+81xCp53j7iWu/IargiRZqRjGIlQuu1f3jFi+ehrHhWMLoyOQTSRx/IWZJqOYtQ==", - "license": "MIT", - "dependencies": { - "crelt": "^1.0.0", - "prosemirror-commands": "^1.0.0", - "prosemirror-history": "^1.0.0", - "prosemirror-state": "^1.0.0" - } - }, - "node_modules/prosemirror-model": { - "version": "1.25.4", - "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.4.tgz", - "integrity": "sha512-PIM7E43PBxKce8OQeezAs9j4TP+5yDpZVbuurd1h5phUxEKIu+G2a+EUZzIC5nS1mJktDJWzbqS23n1tsAf5QA==", - "license": "MIT", - "peer": true, - "dependencies": { - "orderedmap": "^2.0.0" - } - }, - "node_modules/prosemirror-schema-basic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.4.tgz", - "integrity": "sha512-ELxP4TlX3yr2v5rM7Sb70SqStq5NvI15c0j9j/gjsrO5vaw+fnnpovCLEGIcpeGfifkuqJwl4fon6b+KdrODYQ==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.25.0" - } - }, - "node_modules/prosemirror-schema-list": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.5.1.tgz", - "integrity": "sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.0.0", - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.7.3" - } - }, - "node_modules/prosemirror-state": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.4.tgz", - "integrity": "sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==", - "license": "MIT", - "peer": true, - "dependencies": { - "prosemirror-model": "^1.0.0", - "prosemirror-transform": "^1.0.0", - "prosemirror-view": "^1.27.0" - } - }, - "node_modules/prosemirror-tables": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.8.1.tgz", - "integrity": "sha512-DAgDoUYHCcc6tOGpLVPSU1k84kCUWTWnfWX3UDy2Delv4ryH0KqTD6RBI6k4yi9j9I8gl3j8MkPpRD/vWPZbug==", - "license": "MIT", - "dependencies": { - "prosemirror-keymap": "^1.2.2", - "prosemirror-model": "^1.25.0", - "prosemirror-state": "^1.4.3", - "prosemirror-transform": "^1.10.3", - "prosemirror-view": "^1.39.1" - } - }, - "node_modules/prosemirror-trailing-node": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/prosemirror-trailing-node/-/prosemirror-trailing-node-3.0.0.tgz", - "integrity": "sha512-xiun5/3q0w5eRnGYfNlW1uU9W6x5MoFKWwq/0TIRgt09lv7Hcser2QYV8t4muXbEr+Fwo0geYn79Xs4GKywrRQ==", - "license": "MIT", - "dependencies": { - "@remirror/core-constants": "3.0.0", - "escape-string-regexp": "^4.0.0" - }, - "peerDependencies": { - "prosemirror-model": "^1.22.1", - "prosemirror-state": "^1.4.2", - "prosemirror-view": "^1.33.8" - } - }, - "node_modules/prosemirror-transform": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.10.5.tgz", - "integrity": "sha512-RPDQCxIDhIBb1o36xxwsaeAvivO8VLJcgBtzmOwQ64bMtsVFh5SSuJ6dWSxO1UsHTiTXPCgQm3PDJt7p6IOLbw==", - "license": "MIT", - "dependencies": { - "prosemirror-model": "^1.21.0" - } - }, - "node_modules/prosemirror-view": { - "version": "1.41.3", - "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.41.3.tgz", - "integrity": "sha512-SqMiYMUQNNBP9kfPhLO8WXEk/fon47vc52FQsUiJzTBuyjKgEcoAwMyF04eQ4WZ2ArMn7+ReypYL60aKngbACQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "prosemirror-model": "^1.20.0", - "prosemirror-state": "^1.0.0", - "prosemirror-transform": "^1.1.0" - } - }, - "node_modules/proxy-compare": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/proxy-compare/-/proxy-compare-3.0.1.tgz", - "integrity": "sha512-V9plBAt3qjMlS1+nC8771KNf6oJ12gExvaxnNzN/9yVRLdTv/lc+oJlnSzrdYDAvBfTStPCoiaCOTmTs0adv7Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/punycode.js": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", - "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/qrcode": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", - "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", - "license": "MIT", - "dependencies": { - "dijkstrajs": "^1.0.1", - "pngjs": "^5.0.0", - "yargs": "^15.3.1" - }, - "bin": { - "qrcode": "bin/qrcode" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "license": "ISC" - }, - "node_modules/resolve": { - "version": "1.22.11", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", - "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz", - "integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==", - "license": "MIT", - "peer": true, - "dependencies": { - "@types/estree": "1.0.8" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.53.2", - "@rollup/rollup-android-arm64": "4.53.2", - "@rollup/rollup-darwin-arm64": "4.53.2", - "@rollup/rollup-darwin-x64": "4.53.2", - "@rollup/rollup-freebsd-arm64": "4.53.2", - "@rollup/rollup-freebsd-x64": "4.53.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.53.2", - "@rollup/rollup-linux-arm-musleabihf": "4.53.2", - "@rollup/rollup-linux-arm64-gnu": "4.53.2", - "@rollup/rollup-linux-arm64-musl": "4.53.2", - "@rollup/rollup-linux-loong64-gnu": "4.53.2", - "@rollup/rollup-linux-ppc64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-musl": "4.53.2", - "@rollup/rollup-linux-s390x-gnu": "4.53.2", - "@rollup/rollup-linux-x64-gnu": "4.53.2", - "@rollup/rollup-linux-x64-musl": "4.53.2", - "@rollup/rollup-openharmony-arm64": "4.53.2", - "@rollup/rollup-win32-arm64-msvc": "4.53.2", - "@rollup/rollup-win32-ia32-msvc": "4.53.2", - "@rollup/rollup-win32-x64-gnu": "4.53.2", - "@rollup/rollup-win32-x64-msvc": "4.53.2", - "fsevents": "~2.3.2" - } - }, - "node_modules/rope-sequence": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.4.tgz", - "integrity": "sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==", - "license": "MIT" - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/runed": { - "version": "0.35.1", - "resolved": "https://registry.npmjs.org/runed/-/runed-0.35.1.tgz", - "integrity": "sha512-2F4Q/FZzbeJTFdIS/PuOoPRSm92sA2LhzTnv6FXhCoENb3huf5+fDuNOg1LNvGOouy3u/225qxmuJvcV3IZK5Q==", - "dev": true, - "funding": [ - "https://github.com/sponsors/huntabyte", - "https://github.com/sponsors/tglide" - ], - "license": "MIT", - "dependencies": { - "dequal": "^2.0.3", - "esm-env": "^1.0.0", - "lz-string": "^1.5.0" - }, - "peerDependencies": { - "@sveltejs/kit": "^2.21.0", - "svelte": "^5.7.0" - }, - "peerDependenciesMeta": { - "@sveltejs/kit": { - "optional": true - } - } - }, - "node_modules/rxjs": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", - "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", - "devOptional": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.1.0" - } - }, - "node_modules/sade": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", - "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "mri": "^1.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/sass": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.93.3.tgz", - "integrity": "sha512-elOcIZRTM76dvxNAjqYrucTSI0teAF/L2Lv0s6f6b7FOwcwIuA357bIE871580AjHJuSvLIRUosgV+lIWx6Rgg==", - "license": "MIT", - "optional": true, - "dependencies": { - "chokidar": "^4.0.0", - "immutable": "^5.0.2", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - }, - "optionalDependencies": { - "@parcel/watcher": "^2.4.1" - } - }, - "node_modules/sass-embedded": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.93.3.tgz", - "integrity": "sha512-+VUy01yfDqNmIVMd/LLKl2TTtY0ovZN0rTonh+FhKr65mFwIYgU9WzgIZKS7U9/SPCQvWTsTGx9jyt+qRm/XFw==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "@bufbuild/protobuf": "^2.5.0", - "buffer-builder": "^0.2.0", - "colorjs.io": "^0.5.0", - "immutable": "^5.0.2", - "rxjs": "^7.4.0", - "supports-color": "^8.1.1", - "sync-child-process": "^1.0.2", - "varint": "^6.0.0" - }, - "bin": { - "sass": "dist/bin/sass.js" - }, - "engines": { - "node": ">=16.0.0" - }, - "optionalDependencies": { - "sass-embedded-all-unknown": "1.93.3", - "sass-embedded-android-arm": "1.93.3", - "sass-embedded-android-arm64": "1.93.3", - "sass-embedded-android-riscv64": "1.93.3", - "sass-embedded-android-x64": "1.93.3", - "sass-embedded-darwin-arm64": "1.93.3", - "sass-embedded-darwin-x64": "1.93.3", - "sass-embedded-linux-arm": "1.93.3", - "sass-embedded-linux-arm64": "1.93.3", - "sass-embedded-linux-musl-arm": "1.93.3", - "sass-embedded-linux-musl-arm64": "1.93.3", - "sass-embedded-linux-musl-riscv64": "1.93.3", - "sass-embedded-linux-musl-x64": "1.93.3", - "sass-embedded-linux-riscv64": "1.93.3", - "sass-embedded-linux-x64": "1.93.3", - "sass-embedded-unknown-all": "1.93.3", - "sass-embedded-win32-arm64": "1.93.3", - "sass-embedded-win32-x64": "1.93.3" - } - }, - "node_modules/sass-embedded-all-unknown": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-all-unknown/-/sass-embedded-all-unknown-1.93.3.tgz", - "integrity": "sha512-3okGgnE41eg+CPLtAPletu6nQ4N0ij7AeW+Sl5Km4j29XcmqZQeFwYjHe1AlKTEgLi/UAONk1O8i8/lupeKMbw==", - "cpu": [ - "!arm", - "!arm64", - "!riscv64", - "!x64" - ], - "license": "MIT", - "optional": true, - "dependencies": { - "sass": "1.93.3" - } - }, - "node_modules/sass-embedded-android-arm": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-android-arm/-/sass-embedded-android-arm-1.93.3.tgz", - "integrity": "sha512-8xOw9bywfOD6Wv24BgCmgjkk6tMrsOTTHcb28KDxeJtFtoxiUyMbxo0vChpPAfp2Hyg2tFFKS60s0s4JYk+Raw==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-android-arm64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.93.3.tgz", - "integrity": "sha512-uqUl3Kt1IqdGVAcAdbmC+NwuUJy8tM+2ZnB7/zrt6WxWVShVCRdFnWR9LT8HJr7eJN7AU8kSXxaVX/gedanPsg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-android-riscv64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.93.3.tgz", - "integrity": "sha512-2jNJDmo+3qLocjWqYbXiBDnfgwrUeZgZFHJIwAefU7Fn66Ot7rsXl+XPwlokaCbTpj7eMFIqsRAZ/uDueXNCJg==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-android-x64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-android-x64/-/sass-embedded-android-x64-1.93.3.tgz", - "integrity": "sha512-y0RoAU6ZenQFcjM9PjQd3cRqRTjqwSbtWLL/p68y2oFyh0QGN0+LQ826fc0ZvU/AbqCsAizkqjzOn6cRZJxTTQ==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-darwin-arm64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.93.3.tgz", - "integrity": "sha512-7zb/hpdMOdKteK17BOyyypemglVURd1Hdz6QGsggy60aUFfptTLQftLRg8r/xh1RbQAUKWFbYTNaM47J9yPxYg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-darwin-x64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.93.3.tgz", - "integrity": "sha512-Ek1Vp8ZDQEe327Lz0b7h3hjvWH3u9XjJiQzveq74RPpJQ2q6d9LfWpjiRRohM4qK6o4XOHw1X10OMWPXJtdtWg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-arm": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.93.3.tgz", - "integrity": "sha512-yeiv2y+dp8B4wNpd3+JsHYD0mvpXSfov7IGyQ1tMIR40qv+ROkRqYiqQvAOXf76Qwh4Y9OaYZtLpnsPjfeq6mA==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-arm64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.93.3.tgz", - "integrity": "sha512-RBrHWgfd8Dd8w4fbmdRVXRrhh8oBAPyeWDTKAWw8ZEmuXfVl4ytjDuyxaVilh6rR1xTRTNpbaA/YWApBlLrrNw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-musl-arm": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.93.3.tgz", - "integrity": "sha512-fU0fwAwbp7sBE3h5DVU5UPzvaLg7a4yONfFWkkcCp6ZrOiPuGRHXXYriWQ0TUnWy4wE+svsVuWhwWgvlb/tkKg==", - "cpu": [ - "arm" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-musl-arm64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.93.3.tgz", - "integrity": "sha512-PS829l+eUng+9W4PFclXGb4uA2+965NHV3/Sa5U7qTywjeeUUYTZg70dJHSqvhrBEfCc2XJABeW3adLJbyQYkw==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-musl-riscv64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.93.3.tgz", - "integrity": "sha512-cK1oBY+FWQquaIGEeQ5H74KTO8cWsSWwXb/WaildOO9U6wmUypTgUYKQ0o5o/29nZbWWlM1PHuwVYTSnT23Jjg==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-musl-x64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.93.3.tgz", - "integrity": "sha512-A7wkrsHu2/I4Zpa0NMuPGkWDVV7QGGytxGyUq3opSXgAexHo/vBPlGoDXoRlSdex0cV+aTMRPjoGIfdmNlHwyg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-riscv64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-riscv64/-/sass-embedded-linux-riscv64-1.93.3.tgz", - "integrity": "sha512-vWkW1+HTF5qcaHa6hO80gx/QfB6GGjJUP0xLbnAoY4pwEnw5ulGv6RM8qYr8IDhWfVt/KH+lhJ2ZFxnJareisQ==", - "cpu": [ - "riscv64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-linux-x64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.93.3.tgz", - "integrity": "sha512-k6uFxs+e5jSuk1Y0niCwuq42F9ZC5UEP7P+RIOurIm8w/5QFa0+YqeW+BPWEW5M1FqVOsNZH3qGn4ahqvAEjPA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-unknown-all": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-unknown-all/-/sass-embedded-unknown-all-1.93.3.tgz", - "integrity": "sha512-o5wj2rLpXH0C+GJKt/VpWp6AnMsCCbfFmnMAttcrsa+U3yrs/guhZ3x55KAqqUsE8F47e3frbsDL+1OuQM5DAA==", - "license": "MIT", - "optional": true, - "os": [ - "!android", - "!darwin", - "!linux", - "!win32" - ], - "dependencies": { - "sass": "1.93.3" - } - }, - "node_modules/sass-embedded-win32-arm64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-win32-arm64/-/sass-embedded-win32-arm64-1.93.3.tgz", - "integrity": "sha512-0dOfT9moy9YmBolodwYYXtLwNr4jL4HQC9rBfv6mVrD7ud8ue2kDbn+GVzj1hEJxvEexVSmDCf7MHUTLcGs9xQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded-win32-x64": { - "version": "1.93.3", - "resolved": "https://registry.npmjs.org/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.93.3.tgz", - "integrity": "sha512-wHFVfxiS9hU/sNk7KReD+lJWRp3R0SLQEX4zfOnRP2zlvI2X4IQR5aZr9GNcuMP6TmNpX0nQPZTegS8+h9RrEg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sass-embedded/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/scule": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", - "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==", - "dev": true, - "license": "MIT" - }, - "node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "license": "ISC" - }, - "node_modules/set-cookie-parser": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", - "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", - "dev": true, - "license": "MIT" - }, - "node_modules/shadcn-svelte": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/shadcn-svelte/-/shadcn-svelte-1.0.11.tgz", - "integrity": "sha512-PzY8Ssnn63SIerYC2+WECsho6QhYbao5NKNXzRrau5AU2mpQdpa4wYc5soi0sqN9W7Af4btaH9+6yANxEtU1YA==", - "license": "MIT", - "dependencies": { - "commander": "^14.0.0", - "node-fetch-native": "^1.6.4", - "postcss": "^8.5.5" - }, - "bin": { - "shadcn-svelte": "dist/index.js" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/siginfo": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", - "dev": true, - "license": "ISC" - }, - "node_modules/sirv": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", - "integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@polka/url": "^1.0.0-next.24", - "mrmime": "^2.0.0", - "totalist": "^3.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/stackback": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", - "dev": true, - "license": "MIT" - }, - "node_modules/std-env": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", - "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-literal": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz", - "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^9.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/style-mod": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz", - "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==", - "license": "MIT" - }, - "node_modules/style-to-object": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.12.tgz", - "integrity": "sha512-ddJqYnoT4t97QvN2C95bCgt+m7AAgXjVnkk/jxAfmp7EAB8nnqqZYEbMd3em7/vEomDb2LAQKAy1RFfv41mdNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "inline-style-parser": "0.2.6" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/svelte": { - "version": "5.43.6", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.43.6.tgz", - "integrity": "sha512-RnyO9VXI85Bmsf4b8AuQFBKFYL3LKUl+ZrifOjvlrQoboAROj5IITVLK1yOXBjwUWUn2BI5cfmurktgCzuZ5QA==", - "license": "MIT", - "peer": true, - "dependencies": { - "@jridgewell/remapping": "^2.3.4", - "@jridgewell/sourcemap-codec": "^1.5.0", - "@sveltejs/acorn-typescript": "^1.0.5", - "@types/estree": "^1.0.5", - "acorn": "^8.12.1", - "aria-query": "^5.3.1", - "axobject-query": "^4.1.0", - "clsx": "^2.1.1", - "esm-env": "^1.2.1", - "esrap": "^2.1.0", - "is-reference": "^3.0.3", - "locate-character": "^3.0.0", - "magic-string": "^0.30.11", - "zimmerframe": "^1.1.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/svelte-awesome-color-picker": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/svelte-awesome-color-picker/-/svelte-awesome-color-picker-4.1.0.tgz", - "integrity": "sha512-afiSB3eTBlqu96f4+rjBvqG3eCaLwuneNYHe587Wr4Ien6yQWeztGZunPT0FmiI7wFFBVNUlJQLYutII8LfQUg==", - "dev": true, - "license": "MIT", - "dependencies": { - "colord": "^2.9.3", - "svelte-awesome-slider": "2.0.0" - }, - "peerDependencies": { - "svelte": "^5.0.0" - } - }, - "node_modules/svelte-awesome-slider": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/svelte-awesome-slider/-/svelte-awesome-slider-2.0.0.tgz", - "integrity": "sha512-YBkOdYm1Feaqsn2JkJBRs+Kc/X3Qy/3GuVmI7GmoYDjBaHkjx9uH4khTuED22z57Hg3gGWeDhp/clIjWDdLNaw==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "svelte": "^5.0.0" - } - }, - "node_modules/svelte-check": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.3.4.tgz", - "integrity": "sha512-DVWvxhBrDsd+0hHWKfjP99lsSXASeOhHJYyuKOFYJcP7ThfSCKgjVarE8XfuMWpS5JV3AlDf+iK1YGGo2TACdw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.25", - "chokidar": "^4.0.1", - "fdir": "^6.2.0", - "picocolors": "^1.0.0", - "sade": "^1.7.4" - }, - "bin": { - "svelte-check": "bin/svelte-check" - }, - "engines": { - "node": ">= 18.0.0" - }, - "peerDependencies": { - "svelte": "^4.0.0 || ^5.0.0-next.0", - "typescript": ">=5.0.0" - } - }, - "node_modules/svelte-eslint-parser": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-1.4.0.tgz", - "integrity": "sha512-fjPzOfipR5S7gQ/JvI9r2H8y9gMGXO3JtmrylHLLyahEMquXI0lrebcjT+9/hNgDej0H7abTyox5HpHmW1PSWA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-scope": "^8.2.0", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.0.0", - "postcss": "^8.4.49", - "postcss-scss": "^4.0.9", - "postcss-selector-parser": "^7.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0", - "pnpm": "10.18.3" - }, - "funding": { - "url": "https://github.com/sponsors/ota-meshi" - }, - "peerDependencies": { - "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "svelte": { - "optional": true - } - } - }, - "node_modules/svelte-eslint-parser/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/svelte-eslint-parser/node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/svelte-highlight": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/svelte-highlight/-/svelte-highlight-7.9.0.tgz", - "integrity": "sha512-226LBTtvTnM2L2JkQq8mZeKEeMfPLYyta7VxZatFT4UPX5zdHEerKeMTvrfbxm7MVTWc7TPThsNoVdhWC177KQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "highlight.js": "11.11.1" - } - }, - "node_modules/svelte-idle": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/svelte-idle/-/svelte-idle-3.0.1.tgz", - "integrity": "sha512-B0OfHwcwxuAVcKQSybToIry6g06e9CBZqxBiAU8FhOXILngtXvi1HwzUvEwpZelDrw1hVLJdfDcwBxTFZQNruw==", - "dev": true, - "license": "MIT" - }, - "node_modules/svelte-persisted-store": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/svelte-persisted-store/-/svelte-persisted-store-0.12.0.tgz", - "integrity": "sha512-BdBQr2SGSJ+rDWH8/aEV5GthBJDapVP0GP3fuUCA7TjYG5ctcB+O9Mj9ZC0+Jo1oJMfZUd1y9H68NFRR5MyIJA==", - "license": "MIT", - "engines": { - "node": ">=0.14" - }, - "peerDependencies": { - "svelte": "^3.48.0 || ^4 || ^5" - } - }, - "node_modules/svelte-tiptap": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/svelte-tiptap/-/svelte-tiptap-2.2.0.tgz", - "integrity": "sha512-6i8RRk7lot0zwobkhHNcW3yqdbC6xXrigwLZ1fERtVDq8nVhiaLzvF4HUboFNoxSTOxx7S8YGy4C6x0e+OPA1w==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "peerDependencies": { - "@tiptap/core": "^2.11.5", - "@tiptap/extension-bubble-menu": "^2.11.5", - "@tiptap/extension-floating-menu": "^2.11.5", - "@tiptap/pm": "^2.11.5", - "svelte": "^5.0.0" - } - }, - "node_modules/svelte-toolbelt": { - "version": "0.10.6", - "resolved": "https://registry.npmjs.org/svelte-toolbelt/-/svelte-toolbelt-0.10.6.tgz", - "integrity": "sha512-YWuX+RE+CnWYx09yseAe4ZVMM7e7GRFZM6OYWpBKOb++s+SQ8RBIMMe+Bs/CznBMc0QPLjr+vDBxTAkozXsFXQ==", - "dev": true, - "funding": [ - "https://github.com/sponsors/huntabyte" - ], - "dependencies": { - "clsx": "^2.1.1", - "runed": "^0.35.1", - "style-to-object": "^1.0.8" - }, - "engines": { - "node": ">=18", - "pnpm": ">=8.7.0" - }, - "peerDependencies": { - "svelte": "^5.30.2" - } - }, - "node_modules/svelte/node_modules/is-reference": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", - "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.6" - } - }, - "node_modules/svelte2tsx": { - "version": "0.7.45", - "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.7.45.tgz", - "integrity": "sha512-cSci+mYGygYBHIZLHlm/jYlEc1acjAHqaQaDFHdEBpUueM9kSTnPpvPtSl5VkJOU1qSJ7h1K+6F/LIUYiqC8VA==", - "dev": true, - "license": "MIT", - "dependencies": { - "dedent-js": "^1.0.1", - "scule": "^1.3.0" - }, - "peerDependencies": { - "svelte": "^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0", - "typescript": "^4.9.4 || ^5.0.0" - } - }, - "node_modules/sync-child-process": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/sync-child-process/-/sync-child-process-1.0.2.tgz", - "integrity": "sha512-8lD+t2KrrScJ/7KXCSyfhT3/hRq78rC0wBFqNJXv3mZyn6hW2ypM05JmlSvtqRbeq6jqA94oHbxAr2vYsJ8vDA==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "sync-message-port": "^1.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/sync-message-port": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sync-message-port/-/sync-message-port-1.1.3.tgz", - "integrity": "sha512-GTt8rSKje5FilG+wEdfCkOcLL7LWqpMlr2c3LRuKt/YXxcJ52aGSbGBAdI4L3aaqfrBt6y711El53ItyH1NWzg==", - "devOptional": true, - "license": "MIT", - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/tabbable": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.3.0.tgz", - "integrity": "sha512-EIHvdY5bPLuWForiR/AN2Bxngzpuwn1is4asboytXtpTgsArc+WmSJKVLlhdh71u7jFcryDqB2A8lQvj78MkyQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/tailwind-merge": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz", - "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==", - "license": "MIT", - "peer": true, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/dcastil" - } - }, - "node_modules/tailwind-variants": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tailwind-variants/-/tailwind-variants-2.1.0.tgz", - "integrity": "sha512-82m0eRex0z6A3GpvfoTCpHr+wWJmbecfVZfP3mqLoDxeya5tN4mYJQZwa5Aw1hRZTedwpu1D2JizYenoEdyD8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16.x", - "pnpm": ">=7.x" - }, - "peerDependencies": { - "tailwind-merge": ">=3.0.0", - "tailwindcss": "*" - }, - "peerDependenciesMeta": { - "tailwind-merge": { - "optional": true - } - } - }, - "node_modules/tailwindcss": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz", - "integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==", - "license": "MIT", - "peer": true - }, - "node_modules/tailwindcss-animate": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz", - "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "tailwindcss": ">=3.0.0 || insiders" - } - }, - "node_modules/tapable": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", - "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/tinybench": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyexec": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", - "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", - "dev": true, - "license": "MIT" - }, - "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", - "license": "MIT", - "dependencies": { - "fdir": "^6.5.0", - "picomatch": "^4.0.3" - }, - "engines": { - "node": ">=12.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/SuperchupuDev" - } - }, - "node_modules/tinypool": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", - "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.0.0 || >=20.0.0" - } - }, - "node_modules/tinyrainbow": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", - "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tinyspy": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz", - "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/tippy.js": { - "version": "6.3.7", - "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.7.tgz", - "integrity": "sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@popperjs/core": "^2.9.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/totalist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", - "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "devOptional": true, - "license": "0BSD" - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-svelte-plugin": { - "version": "0.3.50", - "resolved": "https://registry.npmjs.org/typescript-svelte-plugin/-/typescript-svelte-plugin-0.3.50.tgz", - "integrity": "sha512-CD6jMNAYJwqCyQ5zZBDRuveeJvAgIogLwXMf5eXAl4K36wD8W+Npw49h6j5fXnpd7SKcG3uptGpeCGETED6WSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0", - "svelte2tsx": "~0.7.35" - } - }, - "node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "license": "MIT" - }, - "node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true, - "license": "MIT" - }, - "node_modules/varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/vite": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", - "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", - "license": "MIT", - "peer": true, - "dependencies": { - "esbuild": "^0.25.0", - "fdir": "^6.4.4", - "picomatch": "^4.0.2", - "postcss": "^8.5.3", - "rollup": "^4.34.9", - "tinyglobby": "^0.2.13" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "jiti": ">=1.21.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "sass-embedded": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.16.0", - "tsx": "^4.8.1", - "yaml": "^2.4.2" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "jiti": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "sass-embedded": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - }, - "tsx": { - "optional": true - }, - "yaml": { - "optional": true - } - } - }, - "node_modules/vite-node": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", - "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cac": "^6.7.14", - "debug": "^4.4.1", - "es-module-lexer": "^1.7.0", - "pathe": "^2.0.3", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" - }, - "bin": { - "vite-node": "vite-node.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - } - }, - "node_modules/vite/node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/vitefu": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.1.tgz", - "integrity": "sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ==", - "dev": true, - "license": "MIT", - "workspaces": [ - "tests/deps/*", - "tests/projects/*", - "tests/projects/workspace/packages/*" - ], - "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" - }, - "peerDependenciesMeta": { - "vite": { - "optional": true - } - } - }, - "node_modules/vitest": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", - "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "^5.2.2", - "@vitest/expect": "3.2.4", - "@vitest/mocker": "3.2.4", - "@vitest/pretty-format": "^3.2.4", - "@vitest/runner": "3.2.4", - "@vitest/snapshot": "3.2.4", - "@vitest/spy": "3.2.4", - "@vitest/utils": "3.2.4", - "chai": "^5.2.0", - "debug": "^4.4.1", - "expect-type": "^1.2.1", - "magic-string": "^0.30.17", - "pathe": "^2.0.3", - "picomatch": "^4.0.2", - "std-env": "^3.9.0", - "tinybench": "^2.9.0", - "tinyexec": "^0.3.2", - "tinyglobby": "^0.2.14", - "tinypool": "^1.1.1", - "tinyrainbow": "^2.0.0", - "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", - "vite-node": "3.2.4", - "why-is-node-running": "^2.3.0" - }, - "bin": { - "vitest": "vitest.mjs" - }, - "engines": { - "node": "^18.0.0 || ^20.0.0 || >=22.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "@edge-runtime/vm": "*", - "@types/debug": "^4.1.12", - "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", - "@vitest/browser": "3.2.4", - "@vitest/ui": "3.2.4", - "happy-dom": "*", - "jsdom": "*" - }, - "peerDependenciesMeta": { - "@edge-runtime/vm": { - "optional": true - }, - "@types/debug": { - "optional": true - }, - "@types/node": { - "optional": true - }, - "@vitest/browser": { - "optional": true - }, - "@vitest/ui": { - "optional": true - }, - "happy-dom": { - "optional": true - }, - "jsdom": { - "optional": true - } - } - }, - "node_modules/w3c-keyname": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", - "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", - "license": "MIT" - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "license": "ISC" - }, - "node_modules/why-is-node-running": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", - "dev": true, - "license": "MIT", - "dependencies": { - "siginfo": "^2.0.0", - "stackback": "0.0.2" - }, - "bin": { - "why-is-node-running": "cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "license": "ISC" - }, - "node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "license": "MIT", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/zimmerframe": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.4.tgz", - "integrity": "sha512-B58NGBEoc8Y9MWWCQGl/gq9xBCe4IiKM0a2x7GZdQKOW5Exr8S1W24J6OgM1njK8xCRGvAJIL/MxXHf6SkmQKQ==", - "license": "MIT" - } - } + "name": "osit-aether-app-svelte", + "version": "3.9.6", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "osit-aether-app-svelte", + "version": "3.9.6", + "dependencies": { + "@codemirror/commands": "^6.8.1", + "@codemirror/gutter": "^0.19.9", + "@codemirror/lang-css": "^6.3.1", + "@codemirror/lang-html": "^6.4.9", + "@codemirror/lang-javascript": "^6.2.3", + "@codemirror/lang-json": "^6.0.1", + "@codemirror/lang-markdown": "^6.3.2", + "@codemirror/language": "^6.11.0", + "@codemirror/language-data": "^6.5.1", + "@codemirror/theme-one-dark": "^6.1.2", + "@codemirror/view": "^6.36.8", + "@floating-ui/dom": "^1.6.0", + "@lucide/svelte": "0.*.0", + "@popperjs/core": "^2.11.0", + "@tailwindcss/vite": "^4.1.10", + "@tiptap/extension-bullet-list": "^2.10.2", + "@tiptap/extension-document": "^2.10.2", + "@tiptap/extension-history": "^2.10.2", + "@tiptap/extension-paragraph": "^2.10.2", + "axios": "^1.7.0", + "codemirror": "^6.0.1", + "dayjs": "^1.11.10", + "dexie": "^4.0.0", + "flowbite-svelte": "^1.7.0", + "html5-qrcode": "^2.3.8", + "lucide-svelte": "0.*.0", + "marked": "^16.0.0", + "openai": "^5.20.1", + "qrcode": "^1.5.4", + "shadcn-svelte": "^1.0.0", + "svelte-persisted-store": "^0.12.0" + }, + "devDependencies": { + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "^9.39.1", + "@playwright/test": "^1.28.1", + "@skeletonlabs/skeleton": "^3.1.3", + "@skeletonlabs/skeleton-svelte": "^1.2.3", + "@sveltejs/adapter-auto": "^6.0.0", + "@sveltejs/adapter-node": "^5.0.0", + "@sveltejs/adapter-static": "^3.0.1", + "@sveltejs/kit": "^2.5.0", + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "@tailwindcss/forms": "^0.5.7", + "@tailwindcss/typography": "^0.5.10", + "@tiptap/core": "^2.10.3", + "@tiptap/extension-bubble-menu": "^2.10.3", + "@tiptap/extension-code-block-lowlight": "^2.10.3", + "@tiptap/extension-color": "^2.10.3", + "@tiptap/extension-highlight": "^2.10.3", + "@tiptap/extension-image": "^2.10.3", + "@tiptap/extension-link": "^2.10.3", + "@tiptap/extension-subscript": "^2.10.3", + "@tiptap/extension-superscript": "^2.10.3", + "@tiptap/extension-table": "^2.10.3", + "@tiptap/extension-table-cell": "^2.10.3", + "@tiptap/extension-table-header": "^2.10.3", + "@tiptap/extension-table-row": "^2.10.3", + "@tiptap/extension-task-item": "^2.10.3", + "@tiptap/extension-task-list": "^2.10.3", + "@tiptap/extension-text": "^2.10.3", + "@tiptap/extension-text-align": "^2.10.3", + "@tiptap/extension-text-style": "^2.10.3", + "@tiptap/extension-typography": "^2.10.3", + "@tiptap/extension-underline": "^2.10.3", + "@tiptap/pm": "^2.10.3", + "@tiptap/starter-kit": "^2.10.3", + "@types/eslint": "^9.0.0", + "@types/node": "^24.0.0", + "@types/qrcode": "^1.5.5", + "@typescript-eslint/eslint-plugin": "^8.0.0", + "@typescript-eslint/parser": "^8.0.0", + "bits-ui": "^2.0.0", + "clsx": "^2.1.1", + "eslint": "^9.0.0", + "eslint-config-prettier": "^10.0.0", + "eslint-plugin-svelte": "^3.0.0", + "flowbite": "^3.0.0", + "globals": "^16.5.0", + "highlight.js": "^11.10.0", + "lowlight": "^3.2.0", + "mode-watcher": "^1.0.0", + "prettier": "^3.1.1", + "prettier-plugin-svelte": "^3.1.2", + "sass-embedded": "^1.81.0", + "svelte": "^5.0.0", + "svelte-awesome-color-picker": "^4.0.0", + "svelte-check": "^4.0.0", + "svelte-highlight": "^7.8.4", + "svelte-idle": "^3.0.1", + "svelte-tiptap": "^2.1.0", + "tailwind-merge": "^3.0.0", + "tailwind-variants": "^2.1.0", + "tailwindcss": "^4.1.10", + "tailwindcss-animate": "^1.0.7", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "typescript-svelte-plugin": "^0.3.50", + "vite": "^6.0.0", + "vitest": "^3.0.0" + } + }, + "node_modules/@bufbuild/protobuf": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.10.1.tgz", + "integrity": "sha512-ckS3+vyJb5qGpEYv/s1OebUHDi/xSNtfgw1wqKZo7MR9F2z+qXr0q5XagafAG/9O0QPVIUfST0smluYSTpYFkg==", + "devOptional": true, + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@codemirror/autocomplete": { + "version": "6.19.1", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.19.1.tgz", + "integrity": "sha512-q6NenYkEy2fn9+JyjIxMWcNjzTL/IhwqfzOut1/G3PrIFkrbl4AL7Wkse5tLrQUUyqGoAKU5+Pi5jnnXxH5HGw==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@codemirror/commands": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.10.0.tgz", + "integrity": "sha512-2xUIc5mHXQzT16JnyOFkh8PvfeXuIut3pslWGfsGOhxP/lpgRm9HOl/mpzLErgt5mXDovqA0d11P21gofRLb9w==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.4.0", + "@codemirror/view": "^6.27.0", + "@lezer/common": "^1.1.0" + } + }, + "node_modules/@codemirror/gutter": { + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@codemirror/gutter/-/gutter-0.19.9.tgz", + "integrity": "sha512-PFrtmilahin1g6uL27aG5tM/rqR9DZzZYZsIrCXA5Uc2OFTFqx4owuhoU9hqfYxHp5ovfvBwQ+txFzqS4vog6Q==", + "deprecated": "As of 0.20.0, this package has been merged into @codemirror/view", + "license": "MIT", + "dependencies": { + "@codemirror/rangeset": "^0.19.0", + "@codemirror/state": "^0.19.0", + "@codemirror/view": "^0.19.23" + } + }, + "node_modules/@codemirror/gutter/node_modules/@codemirror/state": { + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-0.19.9.tgz", + "integrity": "sha512-psOzDolKTZkx4CgUqhBQ8T8gBc0xN5z4gzed109aF6x7D7umpDRoimacI/O6d9UGuyl4eYuDCZmDFr2Rq7aGOw==", + "license": "MIT", + "dependencies": { + "@codemirror/text": "^0.19.0" + } + }, + "node_modules/@codemirror/gutter/node_modules/@codemirror/view": { + "version": "0.19.48", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-0.19.48.tgz", + "integrity": "sha512-0eg7D2Nz4S8/caetCTz61rK0tkHI17V/d15Jy0kLOT8dTLGGNJUponDnW28h2B6bERmPlVHKh8MJIr5OCp1nGw==", + "license": "MIT", + "dependencies": { + "@codemirror/rangeset": "^0.19.5", + "@codemirror/state": "^0.19.3", + "@codemirror/text": "^0.19.0", + "style-mod": "^4.0.0", + "w3c-keyname": "^2.2.4" + } + }, + "node_modules/@codemirror/lang-angular": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@codemirror/lang-angular/-/lang-angular-0.1.4.tgz", + "integrity": "sha512-oap+gsltb/fzdlTQWD6BFF4bSLKcDnlxDsLdePiJpCVNKWXSTAbiiQeYI3UmES+BLAdkmIC1WjyztC1pi/bX4g==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/lang-javascript": "^6.1.2", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.3" + } + }, + "node_modules/@codemirror/lang-cpp": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-cpp/-/lang-cpp-6.0.3.tgz", + "integrity": "sha512-URM26M3vunFFn9/sm6rzqrBzDgfWuDixp85uTY49wKudToc2jTHUrKIGGKs+QWND+YLofNNZpxcNGRynFJfvgA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/cpp": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-css": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.1.tgz", + "integrity": "sha512-kr5fwBGiGtmz6l0LSJIbno9QrifNMUusivHbnA1H6Dmqy4HZFte3UAICix1VuKo0lMPKQr2rqB+0BkKi/S3Ejg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.2", + "@lezer/css": "^1.1.7" + } + }, + "node_modules/@codemirror/lang-go": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-go/-/lang-go-6.0.1.tgz", + "integrity": "sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.6.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/go": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-html": { + "version": "6.4.11", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.11.tgz", + "integrity": "sha512-9NsXp7Nwp891pQchI7gPdTwBuSuT3K65NGTHWHNJ55HjYcHLllr0rbIZNdOzas9ztc1EUVBlHou85FFZS4BNnw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/lang-css": "^6.0.0", + "@codemirror/lang-javascript": "^6.0.0", + "@codemirror/language": "^6.4.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/css": "^1.1.0", + "@lezer/html": "^1.3.12" + } + }, + "node_modules/@codemirror/lang-java": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-java/-/lang-java-6.0.2.tgz", + "integrity": "sha512-m5Nt1mQ/cznJY7tMfQTJchmrjdjQ71IDs+55d1GAa8DGaB8JXWsVCkVT284C3RTASaY43YknrK2X3hPO/J3MOQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/java": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-javascript": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.4.tgz", + "integrity": "sha512-0WVmhp1QOqZ4Rt6GlVGwKJN3KW7Xh4H2q8ZZNGZaP6lRdxXJzmjm4FqvmOojVj6khWJHIb9sp7U/72W7xQgqAA==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.6.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.17.0", + "@lezer/common": "^1.0.0", + "@lezer/javascript": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-jinja": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-jinja/-/lang-jinja-6.0.0.tgz", + "integrity": "sha512-47MFmRcR8UAxd8DReVgj7WJN1WSAMT7OJnewwugZM4XiHWkOjgJQqvEM1NpMj9ALMPyxmlziEI1opH9IaEvmaw==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.2.0", + "@lezer/lr": "^1.4.0" + } + }, + "node_modules/@codemirror/lang-json": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz", + "integrity": "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/json": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-less": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-less/-/lang-less-6.0.2.tgz", + "integrity": "sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-css": "^6.2.0", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-liquid": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-liquid/-/lang-liquid-6.3.0.tgz", + "integrity": "sha512-fY1YsUExcieXRTsCiwX/bQ9+PbCTA/Fumv7C7mTUZHoFkibfESnaXwpr2aKH6zZVwysEunsHHkaIpM/pl3xETQ==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.1" + } + }, + "node_modules/@codemirror/lang-markdown": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.5.0.tgz", + "integrity": "sha512-0K40bZ35jpHya6FriukbgaleaqzBLZfOh7HuzqbMxBXkbYMJDxfF39c23xOgxFezR+3G+tR2/Mup+Xk865OMvw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.7.1", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.3.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.2.1", + "@lezer/markdown": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-php": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-php/-/lang-php-6.0.2.tgz", + "integrity": "sha512-ZKy2v1n8Fc8oEXj0Th0PUMXzQJ0AIR6TaZU+PbDHExFwdu+guzOA4jmCHS1Nz4vbFezwD7LyBdDnddSJeScMCA==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/php": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-python": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.2.1.tgz", + "integrity": "sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.3.2", + "@codemirror/language": "^6.8.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.1", + "@lezer/python": "^1.1.4" + } + }, + "node_modules/@codemirror/lang-rust": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-rust/-/lang-rust-6.0.2.tgz", + "integrity": "sha512-EZaGjCUegtiU7kSMvOfEZpaCReowEf3yNidYu7+vfuGTm9ow4mthAparY5hisJqOHmJowVH3Upu+eJlUji6qqA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/rust": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-sass": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-sass/-/lang-sass-6.0.2.tgz", + "integrity": "sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-css": "^6.2.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.0.2", + "@lezer/sass": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-sql": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-sql/-/lang-sql-6.10.0.tgz", + "integrity": "sha512-6ayPkEd/yRw0XKBx5uAiToSgGECo/GY2NoJIHXIIQh1EVwLuKoU8BP/qK0qH5NLXAbtJRLuT73hx7P9X34iO4w==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-vue": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-vue/-/lang-vue-0.1.3.tgz", + "integrity": "sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-html": "^6.0.0", + "@codemirror/lang-javascript": "^6.1.2", + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.1" + } + }, + "node_modules/@codemirror/lang-wast": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-wast/-/lang-wast-6.0.2.tgz", + "integrity": "sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-xml": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz", + "integrity": "sha512-3z0blhicHLfwi2UgkZYRPioSgVTo9PV5GP5ducFH6FaHy0IAJRg+ixj5gTR1gnT/glAIC8xv4w2VL1LoZfs+Jg==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.4.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/common": "^1.0.0", + "@lezer/xml": "^1.0.0" + } + }, + "node_modules/@codemirror/lang-yaml": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@codemirror/lang-yaml/-/lang-yaml-6.1.2.tgz", + "integrity": "sha512-dxrfG8w5Ce/QbT7YID7mWZFKhdhsaTNOYjOkSIMt1qmC4VQnXSDSYVHHHn8k6kJUfIhtLo8t1JJgltlxWdsITw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.2.0", + "@lezer/lr": "^1.0.0", + "@lezer/yaml": "^1.0.0" + } + }, + "node_modules/@codemirror/language": { + "version": "6.11.3", + "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.11.3.tgz", + "integrity": "sha512-9HBM2XnwDj7fnu0551HkGdrUrrqmYq/WC5iv6nbY2WdicXdGbhR/gfbZOH73Aqj4351alY1+aoG9rCNfiwS1RA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.23.0", + "@lezer/common": "^1.1.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0", + "style-mod": "^4.0.0" + } + }, + "node_modules/@codemirror/language-data": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@codemirror/language-data/-/language-data-6.5.2.tgz", + "integrity": "sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-angular": "^0.1.0", + "@codemirror/lang-cpp": "^6.0.0", + "@codemirror/lang-css": "^6.0.0", + "@codemirror/lang-go": "^6.0.0", + "@codemirror/lang-html": "^6.0.0", + "@codemirror/lang-java": "^6.0.0", + "@codemirror/lang-javascript": "^6.0.0", + "@codemirror/lang-jinja": "^6.0.0", + "@codemirror/lang-json": "^6.0.0", + "@codemirror/lang-less": "^6.0.0", + "@codemirror/lang-liquid": "^6.0.0", + "@codemirror/lang-markdown": "^6.0.0", + "@codemirror/lang-php": "^6.0.0", + "@codemirror/lang-python": "^6.0.0", + "@codemirror/lang-rust": "^6.0.0", + "@codemirror/lang-sass": "^6.0.0", + "@codemirror/lang-sql": "^6.0.0", + "@codemirror/lang-vue": "^0.1.1", + "@codemirror/lang-wast": "^6.0.0", + "@codemirror/lang-xml": "^6.0.0", + "@codemirror/lang-yaml": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/legacy-modes": "^6.4.0" + } + }, + "node_modules/@codemirror/legacy-modes": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@codemirror/legacy-modes/-/legacy-modes-6.5.2.tgz", + "integrity": "sha512-/jJbwSTazlQEDOQw2FJ8LEEKVS72pU0lx6oM54kGpL8t/NJ2Jda3CZ4pcltiKTdqYSRk3ug1B3pil1gsjA6+8Q==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0" + } + }, + "node_modules/@codemirror/lint": { + "version": "6.9.2", + "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.2.tgz", + "integrity": "sha512-sv3DylBiIyi+xKwRCJAAsBZZZWo82shJ/RTMymLabAdtbkV5cSKwWDeCgtUq3v8flTaXS2y1kKkICuRYtUswyQ==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.35.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/rangeset": { + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@codemirror/rangeset/-/rangeset-0.19.9.tgz", + "integrity": "sha512-V8YUuOvK+ew87Xem+71nKcqu1SXd5QROMRLMS/ljT5/3MCxtgrRie1Cvild0G/Z2f1fpWxzX78V0U4jjXBorBQ==", + "deprecated": "As of 0.20.0, this package has been merged into @codemirror/state", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^0.19.0" + } + }, + "node_modules/@codemirror/rangeset/node_modules/@codemirror/state": { + "version": "0.19.9", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-0.19.9.tgz", + "integrity": "sha512-psOzDolKTZkx4CgUqhBQ8T8gBc0xN5z4gzed109aF6x7D7umpDRoimacI/O6d9UGuyl4eYuDCZmDFr2Rq7aGOw==", + "license": "MIT", + "dependencies": { + "@codemirror/text": "^0.19.0" + } + }, + "node_modules/@codemirror/search": { + "version": "6.5.11", + "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.5.11.tgz", + "integrity": "sha512-KmWepDE6jUdL6n8cAAqIpRmLPBZ5ZKnicE8oGU/s3QrAVID+0VhLFrzUucVKHG5035/BSykhExDL/Xm7dHthiA==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "crelt": "^1.0.5" + } + }, + "node_modules/@codemirror/state": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.5.2.tgz", + "integrity": "sha512-FVqsPqtPWKVVL3dPSxy8wEF/ymIEuVzF1PK3VbUgrxXpJUSHQWWZz4JMToquRxnkw+36LTamCZG2iua2Ptq0fA==", + "license": "MIT", + "dependencies": { + "@marijn/find-cluster-break": "^1.0.0" + } + }, + "node_modules/@codemirror/text": { + "version": "0.19.6", + "resolved": "https://registry.npmjs.org/@codemirror/text/-/text-0.19.6.tgz", + "integrity": "sha512-T9jnREMIygx+TPC1bOuepz18maGq/92q2a+n4qTqObKwvNMg+8cMTslb8yxeEDEq7S3kpgGWxgO1UWbQRij0dA==", + "deprecated": "As of 0.20.0, this package has been merged into @codemirror/state", + "license": "MIT" + }, + "node_modules/@codemirror/theme-one-dark": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@codemirror/theme-one-dark/-/theme-one-dark-6.1.3.tgz", + "integrity": "sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA==", + "license": "MIT", + "dependencies": { + "@codemirror/language": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0", + "@lezer/highlight": "^1.0.0" + } + }, + "node_modules/@codemirror/view": { + "version": "6.38.6", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.38.6.tgz", + "integrity": "sha512-qiS0z1bKs5WOvHIAC0Cybmv4AJSkAXgX5aD6Mqd2epSLlVJsQl8NG23jCVouIgkh4All/mrbdsf2UOLFnJw0tw==", + "license": "MIT", + "dependencies": { + "@codemirror/state": "^6.5.0", + "crelt": "^1.0.6", + "style-mod": "^4.1.0", + "w3c-keyname": "^2.2.4" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", + "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz", + "integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.10" + } + }, + "node_modules/@floating-ui/dom": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.4.tgz", + "integrity": "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==", + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.7.3", + "@floating-ui/utils": "^0.2.10" + } + }, + "node_modules/@floating-ui/utils": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz", + "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==", + "license": "MIT" + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@internationalized/date": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.10.0.tgz", + "integrity": "sha512-oxDR/NTEJ1k+UFVQElaNIk65E/Z83HK1z1WI3lQyhTtnNg4R5oVXaPzK3jcpKG8UHKDVuDQHzn+wsxSz8RP3aw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@lezer/common": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.3.0.tgz", + "integrity": "sha512-L9X8uHCYU310o99L3/MpJKYxPzXPOS7S0NmBaM7UO/x2Kb2WbmMLSkfvdr1KxRIFYOpbY0Jhn7CfLSUDzL8arQ==", + "license": "MIT" + }, + "node_modules/@lezer/cpp": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@lezer/cpp/-/cpp-1.1.3.tgz", + "integrity": "sha512-ykYvuFQKGsRi6IcE+/hCSGUhb/I4WPjd3ELhEblm2wS2cOznDFzO+ubK2c+ioysOnlZ3EduV+MVQFCPzAIoY3w==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/css": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.0.tgz", + "integrity": "sha512-pBL7hup88KbI7hXnZV3PQsn43DHy6TWyzuyk2AO9UyoXcDltvIdqWKE1dLL/45JVZ+YZkHe1WVHqO6wugZZWcw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/go": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@lezer/go/-/go-1.0.1.tgz", + "integrity": "sha512-xToRsYxwsgJNHTgNdStpcvmbVuKxTapV0dM0wey1geMMRc9aggoVyKgzYp41D2/vVOx+Ii4hmE206kvxIXBVXQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/highlight": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz", + "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.3.0" + } + }, + "node_modules/@lezer/html": { + "version": "1.3.12", + "resolved": "https://registry.npmjs.org/@lezer/html/-/html-1.3.12.tgz", + "integrity": "sha512-RJ7eRWdaJe3bsiiLLHjCFT1JMk8m1YP9kaUbvu2rMLEoOnke9mcTVDyfOslsln0LtujdWespjJ39w6zo+RsQYw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/java": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@lezer/java/-/java-1.1.3.tgz", + "integrity": "sha512-yHquUfujwg6Yu4Fd1GNHCvidIvJwi/1Xu2DaKl/pfWIA2c1oXkVvawH3NyXhCaFx4OdlYBVX5wvz2f7Aoa/4Xw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/javascript": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.4.tgz", + "integrity": "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.1.3", + "@lezer/lr": "^1.3.0" + } + }, + "node_modules/@lezer/json": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.3.tgz", + "integrity": "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/lr": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.3.tgz", + "integrity": "sha512-yenN5SqAxAPv/qMnpWW0AT7l+SxVrgG+u0tNsRQWqbrz66HIl8DnEbBObvy21J5K7+I1v7gsAnlE2VQ5yYVSeA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0" + } + }, + "node_modules/@lezer/markdown": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@lezer/markdown/-/markdown-1.6.0.tgz", + "integrity": "sha512-AXb98u3M6BEzTnreBnGtQaF7xFTiMA92Dsy5tqEjpacbjRxDSFdN4bKJo9uvU4cEEOS7D2B9MT7kvDgOEIzJSw==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.0.0", + "@lezer/highlight": "^1.0.0" + } + }, + "node_modules/@lezer/php": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@lezer/php/-/php-1.0.5.tgz", + "integrity": "sha512-W7asp9DhM6q0W6DYNwIkLSKOvxlXRrif+UXBMxzsJUuqmhE7oVU+gS3THO4S/Puh7Xzgm858UNaFi6dxTP8dJA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.1.0" + } + }, + "node_modules/@lezer/python": { + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.18.tgz", + "integrity": "sha512-31FiUrU7z9+d/ElGQLJFXl+dKOdx0jALlP3KEOsGTex8mvj+SoE1FgItcHWK/axkxCHGUSpqIHt6JAWfWu9Rhg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/rust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@lezer/rust/-/rust-1.0.2.tgz", + "integrity": "sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/sass": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@lezer/sass/-/sass-1.1.0.tgz", + "integrity": "sha512-3mMGdCTUZ/84ArHOuXWQr37pnf7f+Nw9ycPUeKX+wu19b7pSMcZGLbaXwvD2APMBDOGxPmpK/O6S1v1EvLoqgQ==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/xml": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@lezer/xml/-/xml-1.0.6.tgz", + "integrity": "sha512-CdDwirL0OEaStFue/66ZmFSeppuL6Dwjlk8qk153mSQwiSH/Dlri4GNymrNWnUmPl2Um7QfV1FO9KFUyX3Twww==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + } + }, + "node_modules/@lezer/yaml": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@lezer/yaml/-/yaml-1.0.3.tgz", + "integrity": "sha512-GuBLekbw9jDBDhGur82nuwkxKQ+a3W5H0GfaAthDXcAu+XdpS43VlnxA9E9hllkpSP5ellRDKjLLj7Lu9Wr6xA==", + "license": "MIT", + "dependencies": { + "@lezer/common": "^1.2.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.4.0" + } + }, + "node_modules/@lucide/svelte": { + "version": "0.553.0", + "resolved": "https://registry.npmjs.org/@lucide/svelte/-/svelte-0.553.0.tgz", + "integrity": "sha512-uudJd5NF1zrsO0C2dmCo5lzctqGWNxQKUxM+HErUKyG2oCI2rSGllcsSjn6JfLaHUVy+sPESKa5Dsctm4mZHOQ==", + "license": "ISC", + "peerDependencies": { + "svelte": "^5" + } + }, + "node_modules/@marijn/find-cluster-break": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz", + "integrity": "sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==", + "license": "MIT" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz", + "integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^1.0.3", + "is-glob": "^4.0.3", + "micromatch": "^4.0.5", + "node-addon-api": "^7.0.0" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.5.1", + "@parcel/watcher-darwin-arm64": "2.5.1", + "@parcel/watcher-darwin-x64": "2.5.1", + "@parcel/watcher-freebsd-x64": "2.5.1", + "@parcel/watcher-linux-arm-glibc": "2.5.1", + "@parcel/watcher-linux-arm-musl": "2.5.1", + "@parcel/watcher-linux-arm64-glibc": "2.5.1", + "@parcel/watcher-linux-arm64-musl": "2.5.1", + "@parcel/watcher-linux-x64-glibc": "2.5.1", + "@parcel/watcher-linux-x64-musl": "2.5.1", + "@parcel/watcher-win32-arm64": "2.5.1", + "@parcel/watcher-win32-ia32": "2.5.1", + "@parcel/watcher-win32-x64": "2.5.1" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz", + "integrity": "sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.5.1.tgz", + "integrity": "sha512-eAzPv5osDmZyBhou8PoF4i6RQXAfeKL9tjb3QzYuccXFMQU0ruIc/POh30ePnaOyD1UXdlKguHBmsTs53tVoPw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.5.1.tgz", + "integrity": "sha512-1ZXDthrnNmwv10A0/3AJNZ9JGlzrF82i3gNQcWOzd7nJ8aj+ILyW1MTxVk35Db0u91oD5Nlk9MBiujMlwmeXZg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.5.1.tgz", + "integrity": "sha512-SI4eljM7Flp9yPuKi8W0ird8TI/JK6CSxju3NojVI6BjHsTyK7zxA9urjVjEKJ5MBYC+bLmMcbAWlZ+rFkLpJQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.5.1.tgz", + "integrity": "sha512-RCdZlEyTs8geyBkkcnPWvtXLY44BCeZKmGYRtSgtwwnHR4dxfHRG3gR99XdMEdQ7KeiDdasJwwvNSF5jKtDwdA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.5.1.tgz", + "integrity": "sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.5.1.tgz", + "integrity": "sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.5.1.tgz", + "integrity": "sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.1.tgz", + "integrity": "sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz", + "integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.5.1.tgz", + "integrity": "sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-ia32": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.5.1.tgz", + "integrity": "sha512-c2KkcVN+NJmuA7CGlaGD1qJh1cLfDnQsHjE89E60vUEMlqduHGCdCLJCID5geFVM0dOtA3ZiIO8BoEQmzQVfpQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.5.1.tgz", + "integrity": "sha512-9lHBdJITeNR++EvSQVUcaZoWupyHfXe1jZvGZ06O/5MflPcuPLtEphScIBL+AiCWBO46tDSHzWyD0uDmmZqsgA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher/node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "license": "Apache-2.0", + "optional": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/@playwright/test": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.56.1.tgz", + "integrity": "sha512-vSMYtL/zOcFpvJCW71Q/OEGQb7KYBPAdKh35WNSkaZA75JlAO8ED8UN6GUNTm3drWomcbcqRPFqQbLae8yBTdg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.56.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.29", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", + "integrity": "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==", + "dev": true, + "license": "MIT" + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@remirror/core-constants": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@remirror/core-constants/-/core-constants-3.0.0.tgz", + "integrity": "sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==", + "license": "MIT" + }, + "node_modules/@rollup/plugin-commonjs": { + "version": "28.0.9", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.9.tgz", + "integrity": "sha512-PIR4/OHZ79romx0BVVll/PkwWpJ7e5lsqFa3gFfcrFPWwLXLV39JVUzQV9RKjWerE7B845Hqjj9VYlQeieZ2dA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "fdir": "^6.2.0", + "is-reference": "1.2.1", + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0 || 14 >= 14.17" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-json": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", + "integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.1.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", + "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", + "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz", + "integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz", + "integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz", + "integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz", + "integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz", + "integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz", + "integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz", + "integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz", + "integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz", + "integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz", + "integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz", + "integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz", + "integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz", + "integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz", + "integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz", + "integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz", + "integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz", + "integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz", + "integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz", + "integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz", + "integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz", + "integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz", + "integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@skeletonlabs/skeleton": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@skeletonlabs/skeleton/-/skeleton-3.2.2.tgz", + "integrity": "sha512-dAunBAWqRMcNTGAvCKUgpADJdbtqL65eNEb7pDIKQZ6bI6qsxakR6MuF2E4B3jmUEpcaxaggDp0UdnUjlkAZ1Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "tailwindcss": "^4.0.0" + } + }, + "node_modules/@skeletonlabs/skeleton-svelte": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@skeletonlabs/skeleton-svelte/-/skeleton-svelte-1.5.3.tgz", + "integrity": "sha512-YFSJbaK6QPhrTyzlNy3fA3lSOg7hB7D/qkLAJDVlqwu5E2cz6WWS+/J3Tu9qOBO50PuSsgdOaFPc+QQ5+vQZHA==", + "dev": true, + "dependencies": { + "@zag-js/accordion": "1.18.3", + "@zag-js/avatar": "1.18.3", + "@zag-js/combobox": "1.18.3", + "@zag-js/dialog": "1.18.3", + "@zag-js/file-upload": "1.18.3", + "@zag-js/pagination": "1.18.3", + "@zag-js/popover": "1.18.3", + "@zag-js/progress": "1.18.3", + "@zag-js/radio-group": "1.18.3", + "@zag-js/rating-group": "1.18.3", + "@zag-js/slider": "1.18.3", + "@zag-js/svelte": "1.18.3", + "@zag-js/switch": "1.18.3", + "@zag-js/tabs": "1.18.3", + "@zag-js/tags-input": "1.18.3", + "@zag-js/toast": "1.18.3", + "@zag-js/tooltip": "1.18.3" + }, + "peerDependencies": { + "svelte": "^5.20.0" + } + }, + "node_modules/@standard-schema/spec": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", + "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sveltejs/acorn-typescript": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.6.tgz", + "integrity": "sha512-4awhxtMh4cx9blePWl10HRHj8Iivtqj+2QdDCSMDzxG+XKa9+VCNupQuCuvzEhYPzZSrX+0gC+0lHA/0fFKKQQ==", + "license": "MIT", + "peerDependencies": { + "acorn": "^8.9.0" + } + }, + "node_modules/@sveltejs/adapter-auto": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-6.1.1.tgz", + "integrity": "sha512-cBNt4jgH4KuaNO5gRSB2CZKkGtz+OCZ8lPjRQGjhvVUD4akotnj2weUia6imLl2v07K3IgsQRyM36909miSwoQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + } + }, + "node_modules/@sveltejs/adapter-node": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-node/-/adapter-node-5.4.0.tgz", + "integrity": "sha512-NMsrwGVPEn+J73zH83Uhss/hYYZN6zT3u31R3IHAn3MiKC3h8fjmIAhLfTSOeNHr5wPYfjjMg8E+1gyFgyrEcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/plugin-commonjs": "^28.0.1", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^16.0.0", + "rollup": "^4.9.5" + }, + "peerDependencies": { + "@sveltejs/kit": "^2.4.0" + } + }, + "node_modules/@sveltejs/adapter-static": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-3.0.10.tgz", + "integrity": "sha512-7D9lYFWJmB7zxZyTE/qxjksvMqzMuYrrsyh1f4AlZqeZeACPRySjbC3aFiY55wb1tWUaKOQG9PVbm74JcN2Iew==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@sveltejs/kit": "^2.0.0" + } + }, + "node_modules/@sveltejs/kit": { + "version": "2.48.4", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.48.4.tgz", + "integrity": "sha512-TGFX1pZUt9qqY20Cv5NyYvy0iLWHf2jXi8s+eCGsig7jQMdwZWKUFMR6TbvFNhfDSUpc1sH/Y5EHv20g3HHA3g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "@sveltejs/acorn-typescript": "^1.0.5", + "@types/cookie": "^0.6.0", + "acorn": "^8.14.1", + "cookie": "^0.6.0", + "devalue": "^5.3.2", + "esm-env": "^1.2.2", + "kleur": "^4.1.5", + "magic-string": "^0.30.5", + "mrmime": "^2.0.0", + "sade": "^1.8.1", + "set-cookie-parser": "^2.6.0", + "sirv": "^3.0.0" + }, + "bin": { + "svelte-kit": "svelte-kit.js" + }, + "engines": { + "node": ">=18.13" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0 || ^6.0.0-next.0", + "svelte": "^4.0.0 || ^5.0.0-next.0", + "vite": "^5.0.3 || ^6.0.0 || ^7.0.0-beta.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + } + } + }, + "node_modules/@sveltejs/vite-plugin-svelte": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-5.1.1.tgz", + "integrity": "sha512-Y1Cs7hhTc+a5E9Va/xwKlAJoariQyHY+5zBgCZg4PFWNYQ1nMN9sjK1zhw1gK69DuqVP++sht/1GZg1aRwmAXQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@sveltejs/vite-plugin-svelte-inspector": "^4.0.1", + "debug": "^4.4.1", + "deepmerge": "^4.3.1", + "kleur": "^4.1.5", + "magic-string": "^0.30.17", + "vitefu": "^1.0.6" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22" + }, + "peerDependencies": { + "svelte": "^5.0.0", + "vite": "^6.0.0" + } + }, + "node_modules/@sveltejs/vite-plugin-svelte-inspector": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-4.0.1.tgz", + "integrity": "sha512-J/Nmb2Q2y7mck2hyCX4ckVHcR5tu2J+MtBEQqpDrrgELZ2uvraQcK/ioCV61AqkdXFgriksOKIceDcQmqnGhVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.7" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "svelte": "^5.0.0", + "vite": "^6.0.0" + } + }, + "node_modules/@svgdotjs/svg.draggable.js": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.draggable.js/-/svg.draggable.js-3.0.6.tgz", + "integrity": "sha512-7iJFm9lL3C40HQcqzEfezK2l+dW2CpoVY3b77KQGqc8GXWa6LhhmX5Ckv7alQfUXBuZbjpICZ+Dvq1czlGx7gA==", + "license": "MIT", + "peerDependencies": { + "@svgdotjs/svg.js": "^3.2.4" + } + }, + "node_modules/@svgdotjs/svg.filter.js": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.filter.js/-/svg.filter.js-3.0.9.tgz", + "integrity": "sha512-/69XMRCDoam2HgC4ldHIaDgeQf1ViHIsa0Ld4uWgiXtZ+E24DWHe/9Ib6kbNiZ7WRIdlVokUDR1Fg0kjIpkfbw==", + "license": "MIT", + "dependencies": { + "@svgdotjs/svg.js": "^3.2.4" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/@svgdotjs/svg.js": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.js/-/svg.js-3.2.5.tgz", + "integrity": "sha512-/VNHWYhNu+BS7ktbYoVGrCmsXDh+chFMaONMwGNdIBcFHrWqk2jY8fNyr3DLdtQUIalvkPfM554ZSFa3dm3nxQ==", + "license": "MIT", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Fuzzyma" + } + }, + "node_modules/@svgdotjs/svg.resize.js": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.resize.js/-/svg.resize.js-2.0.5.tgz", + "integrity": "sha512-4heRW4B1QrJeENfi7326lUPYBCevj78FJs8kfeDxn5st0IYPIRXoTtOSYvTzFWgaWWXd3YCDE6ao4fmv91RthA==", + "license": "MIT", + "engines": { + "node": ">= 14.18" + }, + "peerDependencies": { + "@svgdotjs/svg.js": "^3.2.4", + "@svgdotjs/svg.select.js": "^4.0.1" + } + }, + "node_modules/@svgdotjs/svg.select.js": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@svgdotjs/svg.select.js/-/svg.select.js-4.0.3.tgz", + "integrity": "sha512-qkMgso1sd2hXKd1FZ1weO7ANq12sNmQJeGDjs46QwDVsxSRcHmvWKL2NDF7Yimpwf3sl5esOLkPqtV2bQ3v/Jg==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 14.18" + }, + "peerDependencies": { + "@svgdotjs/svg.js": "^3.2.4" + } + }, + "node_modules/@swc/helpers": { + "version": "0.5.17", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.17.tgz", + "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@tailwindcss/forms": { + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.10.tgz", + "integrity": "sha512-utI1ONF6uf/pPNO68kmN1b8rEwNXv3czukalo8VtJH8ksIkZXr3Q3VYudZLkCsDd4Wku120uF02hYK25XGPorw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mini-svg-data-uri": "^1.2.3" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1 || >= 4.0.0-alpha.20 || >= 4.0.0-beta.1" + } + }, + "node_modules/@tailwindcss/node": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.1.17.tgz", + "integrity": "sha512-csIkHIgLb3JisEFQ0vxr2Y57GUNYh447C8xzwj89U/8fdW8LhProdxvnVH6U8M2Y73QKiTIH+LWbK3V2BBZsAg==", + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.4", + "enhanced-resolve": "^5.18.3", + "jiti": "^2.6.1", + "lightningcss": "1.30.2", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.1.17" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.1.17.tgz", + "integrity": "sha512-F0F7d01fmkQhsTjXezGBLdrl1KresJTcI3DB8EkScCldyKp3Msz4hub4uyYaVnk88BAS1g5DQjjF6F5qczheLA==", + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.1.17", + "@tailwindcss/oxide-darwin-arm64": "4.1.17", + "@tailwindcss/oxide-darwin-x64": "4.1.17", + "@tailwindcss/oxide-freebsd-x64": "4.1.17", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.17", + "@tailwindcss/oxide-linux-arm64-gnu": "4.1.17", + "@tailwindcss/oxide-linux-arm64-musl": "4.1.17", + "@tailwindcss/oxide-linux-x64-gnu": "4.1.17", + "@tailwindcss/oxide-linux-x64-musl": "4.1.17", + "@tailwindcss/oxide-wasm32-wasi": "4.1.17", + "@tailwindcss/oxide-win32-arm64-msvc": "4.1.17", + "@tailwindcss/oxide-win32-x64-msvc": "4.1.17" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.1.17.tgz", + "integrity": "sha512-BMqpkJHgOZ5z78qqiGE6ZIRExyaHyuxjgrJ6eBO5+hfrfGkuya0lYfw8fRHG77gdTjWkNWEEm+qeG2cDMxArLQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.1.17.tgz", + "integrity": "sha512-EquyumkQweUBNk1zGEU/wfZo2qkp/nQKRZM8bUYO0J+Lums5+wl2CcG1f9BgAjn/u9pJzdYddHWBiFXJTcxmOg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.1.17.tgz", + "integrity": "sha512-gdhEPLzke2Pog8s12oADwYu0IAw04Y2tlmgVzIN0+046ytcgx8uZmCzEg4VcQh+AHKiS7xaL8kGo/QTiNEGRog==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.1.17.tgz", + "integrity": "sha512-hxGS81KskMxML9DXsaXT1H0DyA+ZBIbyG/sSAjWNe2EDl7TkPOBI42GBV3u38itzGUOmFfCzk1iAjDXds8Oh0g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.1.17.tgz", + "integrity": "sha512-k7jWk5E3ldAdw0cNglhjSgv501u7yrMf8oeZ0cElhxU6Y2o7f8yqelOp3fhf7evjIS6ujTI3U8pKUXV2I4iXHQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.1.17.tgz", + "integrity": "sha512-HVDOm/mxK6+TbARwdW17WrgDYEGzmoYayrCgmLEw7FxTPLcp/glBisuyWkFz/jb7ZfiAXAXUACfyItn+nTgsdQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.1.17.tgz", + "integrity": "sha512-HvZLfGr42i5anKtIeQzxdkw/wPqIbpeZqe7vd3V9vI3RQxe3xU1fLjss0TjyhxWcBaipk7NYwSrwTwK1hJARMg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.1.17.tgz", + "integrity": "sha512-M3XZuORCGB7VPOEDH+nzpJ21XPvK5PyjlkSFkFziNHGLc5d6g3di2McAAblmaSUNl8IOmzYwLx9NsE7bplNkwQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.1.17.tgz", + "integrity": "sha512-k7f+pf9eXLEey4pBlw+8dgfJHY4PZ5qOUFDyNf7SI6lHjQ9Zt7+NcscjpwdCEbYi6FI5c2KDTDWyf2iHcCSyyQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.1.17.tgz", + "integrity": "sha512-cEytGqSSoy7zK4JRWiTCx43FsKP/zGr0CsuMawhH67ONlH+T79VteQeJQRO/X7L0juEUA8ZyuYikcRBf0vsxhg==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.6.0", + "@emnapi/runtime": "^1.6.0", + "@emnapi/wasi-threads": "^1.1.0", + "@napi-rs/wasm-runtime": "^1.0.7", + "@tybys/wasm-util": "^0.10.1", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.1.17.tgz", + "integrity": "sha512-JU5AHr7gKbZlOGvMdb4722/0aYbU+tN6lv1kONx0JK2cGsh7g148zVWLM0IKR3NeKLv+L90chBVYcJ8uJWbC9A==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.1.17.tgz", + "integrity": "sha512-SKWM4waLuqx0IH+FMDUw6R66Hu4OuTALFgnleKbqhgGU30DY20NORZMZUKgLRjQXNN2TLzKvh48QXTig4h4bGw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tailwindcss/typography": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz", + "integrity": "sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "6.0.10" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.1.17.tgz", + "integrity": "sha512-4+9w8ZHOiGnpcGI6z1TVVfWaX/koK7fKeSYF3qlYg2xpBtbteP2ddBxiarL+HVgfSJGeK5RIxRQmKm4rTJJAwA==", + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.1.17", + "@tailwindcss/oxide": "4.1.17", + "tailwindcss": "4.1.17" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7" + } + }, + "node_modules/@tiptap/core": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.27.1.tgz", + "integrity": "sha512-nkerkl8syHj44ZzAB7oA2GPmmZINKBKCa79FuNvmGJrJ4qyZwlkDzszud23YteFZEytbc87kVd/fP76ROS6sLg==", + "license": "MIT", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-blockquote": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.27.1.tgz", + "integrity": "sha512-QrUX3muElDrNjKM3nqCSAtm3H3pT33c6ON8kwRiQboOAjT/9D57Cs7XEVY7r6rMaJPeKztrRUrNVF9w/w/6B0A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-bold": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.27.1.tgz", + "integrity": "sha512-g4l4p892x/r7mhea8syp3fNYODxsDrimgouQ+q4DKXIgQmm5+uNhyuEPexP3I8TFNXqQ4DlMNFoM9yCqk97etQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-bubble-menu": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.27.1.tgz", + "integrity": "sha512-ki1R27VsSvY2tT9Q2DIlcATwLOoEjf5DsN+5sExarQ8S/ZxT/tvIjRxB8Dx7lb2a818W5f/NER26YchGtmHfpg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "tippy.js": "^6.3.7" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-bullet-list": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.27.1.tgz", + "integrity": "sha512-5FmnfXkJ76wN4EbJNzBhAlmQxho8yEMIJLchTGmXdsD/n/tsyVVtewnQYaIOj/Z7naaGySTGDmjVtLgTuQ+Sxw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-code": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.27.1.tgz", + "integrity": "sha512-i65wUGJevzBTIIUBHBc1ggVa27bgemvGl/tY1/89fEuS/0Xmre+OQjw8rCtSLevoHSiYYLgLRlvjtUSUhE4kgg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-code-block": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.27.1.tgz", + "integrity": "sha512-wCI5VIOfSAdkenCWFvh4m8FFCJ51EOK+CUmOC/PWUjyo2Dgn8QC8HMi015q8XF7886T0KvYVVoqxmxJSUDAYNg==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-code-block-lowlight": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-code-block-lowlight/-/extension-code-block-lowlight-2.27.1.tgz", + "integrity": "sha512-Ijg9724uX/l4LXLELEeztZIgg+bDE/jJCkgS1+mavkRA/qtidpQkHo7L/Ry22fmj/ktCtZLjPXE5JAPAoRU6zA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/extension-code-block": "^2.7.0", + "@tiptap/pm": "^2.7.0", + "highlight.js": "^11", + "lowlight": "^2 || ^3" + } + }, + "node_modules/@tiptap/extension-color": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-color/-/extension-color-2.27.1.tgz", + "integrity": "sha512-raYRsdG2tZvVvY1LV/VTZnDG44Y0xRBwo5CZEat0OUqdx34dfvCtYm8HIOTyWBwr7OOW+yR4O1Vc2zFkmfthZw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/extension-text-style": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-document": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.27.1.tgz", + "integrity": "sha512-NtJzJY7Q/6XWjpOm5OXKrnEaofrcc1XOTYlo/SaTwl8k2bZo918Vl0IDBWhPVDsUN7kx767uHwbtuQZ+9I82hA==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-dropcursor": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.27.1.tgz", + "integrity": "sha512-3MBQRGHHZ0by3OT0CWbLKS7J3PH9PpobrXjmIR7kr0nde7+bHqxXiVNuuIf501oKU9rnEUSedipSHkLYGkmfsA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-floating-menu": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-floating-menu/-/extension-floating-menu-2.27.1.tgz", + "integrity": "sha512-nUk/8DbiXO69l6FDwkWso94BTf52IBoWALo+YGWT6o+FO6cI9LbUGghEX2CdmQYXCvSvwvISF2jXeLQWNZvPZQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "tippy.js": "^6.3.7" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-gapcursor": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.27.1.tgz", + "integrity": "sha512-A9e1jr+jGhDWzNSXtIO6PYVYhf5j/udjbZwMja+wCE/3KvZU9V3IrnGKz1xNW+2Q2BDOe1QO7j5uVL9ElR6nTA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-hard-break": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.27.1.tgz", + "integrity": "sha512-W4hHa4Io6QCTwpyTlN6UAvqMIQ7t56kIUByZhyY9EWrg/+JpbfpxE1kXFLPB4ZGgwBknFOw+e4bJ1j3oAbTJFw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-heading": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.27.1.tgz", + "integrity": "sha512-6xoC7igZlW1EmnQ5WVH9IL7P1nCQb3bBUaIDLvk7LbweEogcTUECI4Xg1vxMOVmj9tlDe1I4BsgfcKpB5KEsZw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-highlight": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-highlight/-/extension-highlight-2.27.1.tgz", + "integrity": "sha512-ntuYX09tvHQE/R/8WbTOxbFuQhRr2jhTkKz/gLwDD2o8IhccSy3f0nm+mVmVamKQnbsBBbLohojd5IGOnX9f1A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-history": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.27.1.tgz", + "integrity": "sha512-K8PHC9gegSAt0wzSlsd4aUpoEyIJYOmVVeyniHr1P1mIblW1KYEDbRGbDlrLALTyUEfMcBhdIm8zrB9X2Nihvg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-horizontal-rule": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.27.1.tgz", + "integrity": "sha512-WxXWGEEsqDmGIF2o9av+3r9Qje4CKrqrpeQY6aRO5bxvWX9AabQCfasepayBok6uwtvNzh3Xpsn9zbbSk09dNA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-image": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-image/-/extension-image-2.27.1.tgz", + "integrity": "sha512-wu3vMKDYWJwKS6Hrw5PPCKBO2RxyHNeFLiA/uDErEV7axzNpievK/U9DyaDXmtK3K/h1XzJAJz19X+2d/pY68w==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-italic": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.27.1.tgz", + "integrity": "sha512-rcm0GyniWW0UhcNI9+1eIK64GqWQLyIIrWGINslvqSUoBc+WkfocLvv4CMpRkzKlfsAxwVIBuH2eLxHKDtAREA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-link": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-link/-/extension-link-2.27.1.tgz", + "integrity": "sha512-cCwWPZsnVh9MXnGOqSIRXPPuUixRDK8eMN2TvqwbxUBb1TU7b/HtNvfMU4tAOqAuMRJ0aJkFuf3eB0Gi8LVb1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "linkifyjs": "^4.3.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-list-item": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.27.1.tgz", + "integrity": "sha512-dtsxvtzxfwOJP6dKGf0vb2MJAoDF2NxoiWzpq0XTvo7NGGYUHfuHjX07Zp0dYqb4seaDXjwsi5BIQUOp3+WMFQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-ordered-list": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.27.1.tgz", + "integrity": "sha512-U1/sWxc2TciozQsZjH35temyidYUjvroHj3PUPzPyh19w2fwKh1NSbFybWuoYs6jS3XnMSwnM2vF52tOwvfEmA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-paragraph": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.27.1.tgz", + "integrity": "sha512-R3QdrHcUdFAsdsn2UAIvhY0yWyHjqGyP/Rv8RRdN0OyFiTKtwTPqreKMHKJOflgX4sMJl/OpHTpNG1Kaf7Lo2A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-strike": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.27.1.tgz", + "integrity": "sha512-S9I//K8KPgfFTC5I5lorClzXk0g4lrAv9y5qHzHO5EOWt7AFl0YTg2oN8NKSIBK4bHRnPIrjJJKv+dDFnUp5jQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-subscript": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-subscript/-/extension-subscript-2.27.1.tgz", + "integrity": "sha512-n2jTaYriewwz3ES1o6Wt/OwREvPwi97n+yEsJ7i31wiuxGTdCP31eAuppC6DvixEvDt3/rZMZcNp8Ah9crlbnw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-superscript": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-superscript/-/extension-superscript-2.27.1.tgz", + "integrity": "sha512-zTYOD7k3txm21rjeYHsf/VIpBe9IvVfNHSNayyY/JOgyQ/fW40cgX0gADNoT2ayAtRes4TvpcUYdgF9vC5bkJw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-table": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-2.27.1.tgz", + "integrity": "sha512-iOoOo0vYFzAogAZlw36DgmFfNM5vOkLqnApm81soO/YWpqtKAvBn+TMY4ss4OMDsOefUzBa6xqOJ0gJR5ZygjA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-table-cell": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-2.27.1.tgz", + "integrity": "sha512-VowNmz1kub2qfntWkU8jGA6DoCl9xjJBWSypuQIeiN/IRId3BMrJodT26pTNJ3ChDMtYaanWaUvYqckRxgTC2A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-table-header": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-2.27.1.tgz", + "integrity": "sha512-lSbGB6kBp/sTVzAWl4v7v7ztL5XU3aTdlS7FhfGjpdsxd4zPKYG8kx+Uxgq25W9/BlCbnqHnO0poAMfOlspDQw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-table-row": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-2.27.1.tgz", + "integrity": "sha512-3xtlmZ6NWDi5a42gK0qQQTeBUpJ2j1o7qyXTFkhQaJAeIFEqsemgSRhgXZxbwSmQQZsPJ/86KWBNVkT0FaRFDw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-task-item": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-2.27.1.tgz", + "integrity": "sha512-vaEtdos+9jApD6yRfD6F/xShikiZFHi7I0nswAmGKT/kE1wmHCUxme8OFMe7642e2OK0lqgHsUaOLxP/0nZJ5A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0", + "@tiptap/pm": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-task-list": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-2.27.1.tgz", + "integrity": "sha512-KRlYOZ6kdURvAspUrLVsC7mLkVW2DYhpj+7QxH7gVDZuAuoPUEmpJVcBVPq7GhPF9PccaRLru+n1Ege5VqvZ+Q==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-text": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.27.1.tgz", + "integrity": "sha512-a4GCT+GZ9tUwl82F4CEum9/+WsuW0/De9Be/NqrMmi7eNfAwbUTbLCTFU0gEvv25WMHCoUzaeNk/qGmzeVPJ1Q==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-text-align": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.27.1.tgz", + "integrity": "sha512-D7dLPk7y5mDn9ZNANQ4K2gCq4vy+Emm5AdeWOGzNeqJsYrBotiQYXd9rb1QYjdup2kzAoKduMTUXV92ujo5cEg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-text-style": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-text-style/-/extension-text-style-2.27.1.tgz", + "integrity": "sha512-NagQ9qLk0Ril83gfrk+C65SvTqPjL3WVnLF2arsEVnCrxcx3uDOvdJW67f/K5HEwEHsoqJ4Zq9Irco/koXrOXA==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-typography": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-typography/-/extension-typography-2.27.1.tgz", + "integrity": "sha512-jAZU5IuWH9CtZlolQ1gRhV+bT75s19SXjadQwkk18gMMiapcaIVVTxUDWY6ycv9ge4cjRoaP3lqBviW3cGqhOA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/extension-underline": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.27.1.tgz", + "integrity": "sha512-fPTmfJFAQWg1O/os1pYSPVdtvly6eW/w5sDofG7pre+bdQUN+8s1cZYelSuj/ltNVioRaB2Ws7tvNgnHL0aAJQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + }, + "peerDependencies": { + "@tiptap/core": "^2.7.0" + } + }, + "node_modules/@tiptap/pm": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/pm/-/pm-2.27.1.tgz", + "integrity": "sha512-ijKo3+kIjALthYsnBmkRXAuw2Tswd9gd7BUR5OMfIcjGp8v576vKxOxrRfuYiUM78GPt//P0sVc1WV82H5N0PQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "prosemirror-changeset": "^2.3.0", + "prosemirror-collab": "^1.3.1", + "prosemirror-commands": "^1.6.2", + "prosemirror-dropcursor": "^1.8.1", + "prosemirror-gapcursor": "^1.3.2", + "prosemirror-history": "^1.4.1", + "prosemirror-inputrules": "^1.4.0", + "prosemirror-keymap": "^1.2.2", + "prosemirror-markdown": "^1.13.1", + "prosemirror-menu": "^1.2.4", + "prosemirror-model": "^1.23.0", + "prosemirror-schema-basic": "^1.2.3", + "prosemirror-schema-list": "^1.4.1", + "prosemirror-state": "^1.4.3", + "prosemirror-tables": "^1.6.4", + "prosemirror-trailing-node": "^3.0.0", + "prosemirror-transform": "^1.10.2", + "prosemirror-view": "^1.37.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + } + }, + "node_modules/@tiptap/starter-kit": { + "version": "2.27.1", + "resolved": "https://registry.npmjs.org/@tiptap/starter-kit/-/starter-kit-2.27.1.tgz", + "integrity": "sha512-uQQlP0Nmn9eq19qm8YoOeloEfmcGbPpB1cujq54Q6nPgxaBozR7rE7tXbFTinxRW2+Hr7XyNWhpjB7DMNkdU2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tiptap/core": "^2.27.1", + "@tiptap/extension-blockquote": "^2.27.1", + "@tiptap/extension-bold": "^2.27.1", + "@tiptap/extension-bullet-list": "^2.27.1", + "@tiptap/extension-code": "^2.27.1", + "@tiptap/extension-code-block": "^2.27.1", + "@tiptap/extension-document": "^2.27.1", + "@tiptap/extension-dropcursor": "^2.27.1", + "@tiptap/extension-gapcursor": "^2.27.1", + "@tiptap/extension-hard-break": "^2.27.1", + "@tiptap/extension-heading": "^2.27.1", + "@tiptap/extension-history": "^2.27.1", + "@tiptap/extension-horizontal-rule": "^2.27.1", + "@tiptap/extension-italic": "^2.27.1", + "@tiptap/extension-list-item": "^2.27.1", + "@tiptap/extension-ordered-list": "^2.27.1", + "@tiptap/extension-paragraph": "^2.27.1", + "@tiptap/extension-strike": "^2.27.1", + "@tiptap/extension-text": "^2.27.1", + "@tiptap/extension-text-style": "^2.27.1", + "@tiptap/pm": "^2.27.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/ueberdosis" + } + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "license": "MIT" + }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", + "license": "MIT" + }, + "node_modules/@types/markdown-it": { + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", + "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", + "license": "MIT", + "dependencies": { + "@types/linkify-it": "^5", + "@types/mdurl": "^2" + } + }, + "node_modules/@types/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "24.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/@types/qrcode": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.6.tgz", + "integrity": "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "license": "MIT" + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.4.tgz", + "integrity": "sha512-R48VhmTJqplNyDxCyqqVkFSZIx1qX6PzwqgcXn1olLrzxcSBDlOsbtcnQuQhNtnNiJ4Xe5gREI1foajYaYU2Vg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/type-utils": "8.46.4", + "@typescript-eslint/utils": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.46.4", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.4.tgz", + "integrity": "sha512-tK3GPFWbirvNgsNKto+UmB/cRtn6TZfyw0D6IKrW55n6Vbs7KJoZtI//kpTKzE/DUmmnAFD8/Ca46s7Obs92/w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.4.tgz", + "integrity": "sha512-nPiRSKuvtTN+no/2N1kt2tUh/HoFzeEgOm9fQ6XQk4/ApGqjx0zFIIaLJ6wooR1HIoozvj2j6vTi/1fgAz7UYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.46.4", + "@typescript-eslint/types": "^8.46.4", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.4.tgz", + "integrity": "sha512-tMDbLGXb1wC+McN1M6QeDx7P7c0UWO5z9CXqp7J8E+xGcJuUuevWKxuG8j41FoweS3+L41SkyKKkia16jpX7CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.4.tgz", + "integrity": "sha512-+/XqaZPIAk6Cjg7NWgSGe27X4zMGqrFqZ8atJsX3CWxH/jACqWnrWI68h7nHQld0y+k9eTTjb9r+KU4twLoo9A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.4.tgz", + "integrity": "sha512-V4QC8h3fdT5Wro6vANk6eojqfbv5bpwHuMsBcJUJkqs2z5XnYhJzyz9Y02eUmF9u3PgXEUiOt4w4KHR3P+z0PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4", + "@typescript-eslint/utils": "8.46.4", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.4.tgz", + "integrity": "sha512-USjyxm3gQEePdUwJBFjjGNG18xY9A2grDVGuk7/9AkjIF1L+ZrVnwR5VAU5JXtUnBL/Nwt3H31KlRDaksnM7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.4.tgz", + "integrity": "sha512-7oV2qEOr1d4NWNmpXLR35LvCfOkTNymY9oyW+lUHkmCno7aOmIf/hMaydnJBUTBMRCOGZh8YjkFOc8dadEoNGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.46.4", + "@typescript-eslint/tsconfig-utils": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.4.tgz", + "integrity": "sha512-AbSv11fklGXV6T28dp2Me04Uw90R2iJ30g2bgLz529Koehrmkbs1r7paFqr1vPCZi7hHwYxYtxfyQMRC8QaVSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.4.tgz", + "integrity": "sha512-/++5CYLQqsO9HFGLI7APrxBJYo+5OCMpViuhV8q5/Qa3o5mMrF//eQHks+PXcsAVaLdn817fMuS7zqoXNNZGaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@vitest/expect": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", + "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz", + "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.4", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/mocker/node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", + "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz", + "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.2.4", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz", + "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", + "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^4.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz", + "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.4", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@yr/monotone-cubic-spline": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@yr/monotone-cubic-spline/-/monotone-cubic-spline-1.0.3.tgz", + "integrity": "sha512-FQXkOta0XBSUPHndIKON2Y9JeQz5ZeMqLYZVVK93FliNBFm7LNMIZmY6FrMEB9XPcDbE2bekMbZD6kzDkxwYjA==", + "license": "MIT" + }, + "node_modules/@zag-js/accordion": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/accordion/-/accordion-1.18.3.tgz", + "integrity": "sha512-h+Qw9uLZXlSL3vx+pe6sCHLK4pZAzKdj+2CuH3lIAp8GdOcO6MUfcfo905jl0vM0mUyWpELxRypzplcFioIVkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/anatomy": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/anatomy/-/anatomy-1.18.3.tgz", + "integrity": "sha512-D1Qaxq1NS+Wud9KEdnO1bQE1Yb1pLxi78iqj007pr+gmFfo2Br3QLJNcMm2x/IWLBCdETwgDhq6nvHTrCjmiwg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@zag-js/aria-hidden": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/aria-hidden/-/aria-hidden-1.18.3.tgz", + "integrity": "sha512-CQ4BkawuNfL8yezXjT5zsdFNGKCudz+p13TVW2eP8hHGuMQilK32h4fNd2536U9SRQNi0BjF/e9Qgfl8G2ipDg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@zag-js/auto-resize": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/auto-resize/-/auto-resize-1.18.3.tgz", + "integrity": "sha512-r+eP3R51fFPTd4TYJnjDf62o9Rr4EltuhWEEx+jDahP0hFfK74SDvb0HYMu1j9WQIb2O84JlBma+PNsZSsJasQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.18.3" + } + }, + "node_modules/@zag-js/avatar": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/avatar/-/avatar-1.18.3.tgz", + "integrity": "sha512-2yaWSMDG73/2J0NxDtdaAKoto/jg/W/mJ7QGR+1Ay7bNcHnnCaYJcVKPdx/v4k46Swhtt/GKkIqavnRXT6brAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/collection": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/collection/-/collection-1.18.3.tgz", + "integrity": "sha512-0IS4nKgFP6s0XwIBdhNrEtPghlIa+cxl4emkppQS0Q/bGEytA+0tE73ZcIY2i/PN15DRdlLmOWX8g0IWFm8R3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/combobox": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/combobox/-/combobox-1.18.3.tgz", + "integrity": "sha512-RnJUb67Dv/erKjNv1x+wZvEiHoToBQv8xNh5WOhsLD5TNZEHF7zYsYnKbywR+RlAUysDb8HWfV4OfeFKUWxV3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/aria-hidden": "1.18.3", + "@zag-js/collection": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dismissable": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/popper": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/core": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/core/-/core-1.18.3.tgz", + "integrity": "sha512-FuB4ClNyob6Fqx57mEWbPui59uU1x9I6MvTyJunnPjJMWr1M0bxsgrqkePoEzt+osel8qLMyaa1oHaxszSNxKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/dialog": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/dialog/-/dialog-1.18.3.tgz", + "integrity": "sha512-gLWYKYpUyp3IyLr0BX/c6izvX59rCugwv4ClGpojL+chv6KlmgPX6qKj6XVoyWlYsnxvIL3mF2SX+lgUz+SOrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/aria-hidden": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dismissable": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/focus-trap": "1.18.3", + "@zag-js/remove-scroll": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/dismissable": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/dismissable/-/dismissable-1.18.3.tgz", + "integrity": "sha512-6q8OlX/W+TvP73r7tDcsLbTZEipczO4TNZnDHGFra+tP8CPslZZ39SZYomhrtRWqOKWu5R3UX+Vgl4gO1wtykA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.18.3", + "@zag-js/interact-outside": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/dom-query": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/dom-query/-/dom-query-1.18.3.tgz", + "integrity": "sha512-mPj2xvjxXyB++aGoIIZZ0cCbMu+nfLvks/Q2fe6SgfSaTdGw8jvJtp4F5Qs3Q+MOHbIZRnAqYyBLv56qav3AeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/types": "1.18.3" + } + }, + "node_modules/@zag-js/file-upload": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/file-upload/-/file-upload-1.18.3.tgz", + "integrity": "sha512-Noq/DaNwuoDK7klyqy86IJOmxQIKaUY15PBiU7u2sU+VMqKWcWLm1hSlRLpnhkJrhRGJRXxKd8rGuCO/i8t1Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/file-utils": "1.18.3", + "@zag-js/i18n-utils": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/file-utils": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/file-utils/-/file-utils-1.18.3.tgz", + "integrity": "sha512-JoQJsP3OWJTP/mGzKD/N7RKXdnigaT4ExKQPQaHF+jT/uQtHs+8J088Td/WVkfLTHIyW/s3t09pLk7z6ufZJkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/i18n-utils": "1.18.3" + } + }, + "node_modules/@zag-js/focus-trap": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/focus-trap/-/focus-trap-1.18.3.tgz", + "integrity": "sha512-EhAJb7xIHaUYP+WxlmN2SKEvsqTWih0FUX4Jf+rh2xr4v/dd/09ki+/yQjtTxVrKshCGe4LxCGeiws7mTkOZrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.18.3" + } + }, + "node_modules/@zag-js/focus-visible": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/focus-visible/-/focus-visible-1.18.3.tgz", + "integrity": "sha512-od0TDV0oCwldqyIOLyfLcLlQlsAnlsO03Je2TrL1/48vxbnPaYQRQK8HUjIFnPcr/rPDKojoRjmNi4OryD2/4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.18.3" + } + }, + "node_modules/@zag-js/i18n-utils": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/i18n-utils/-/i18n-utils-1.18.3.tgz", + "integrity": "sha512-7ihl4sJEyTL4LHwLgmRcSn9nGBEbbRkN6W552dFjeV5rAIgRGvrdKvEHGdkSQkrDHNlVU2zEHlN50vEdfsG4Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.18.3" + } + }, + "node_modules/@zag-js/interact-outside": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/interact-outside/-/interact-outside-1.18.3.tgz", + "integrity": "sha512-DDcFBOZRjJ2a4qxQ2QU/37mIRCJivnVV87bKy8i/Zu+ea4URerBAsLp23/UC1aqEnDK+QXWRMQsK02SySR/RiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/live-region": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/live-region/-/live-region-1.18.3.tgz", + "integrity": "sha512-n3kKr4a+RWwBdkaZc+EZXBMb7joHg1lyxK95oP0/9l+Aeltut5gpjA+VQP49pLagakUnMzt1KbkHekO8FKeX3A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@zag-js/pagination": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/pagination/-/pagination-1.18.3.tgz", + "integrity": "sha512-n6+BVIR1MtBLu0w2CftbNpmWEL7F1RO/MgltQTI0MVUNUEqWEErn44m6oTckIGpF43B42IVbr5MIZrQyBmjhUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/popover": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/popover/-/popover-1.18.3.tgz", + "integrity": "sha512-60kMLotCgPBKvMmPkQTJpSRWQpIPOvxD3ZhbD2q9ZgvxH0tyLX9YpjDrCFoMCm90gsBeRbXObLcCnMfRecn4EA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/aria-hidden": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dismissable": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/focus-trap": "1.18.3", + "@zag-js/popper": "1.18.3", + "@zag-js/remove-scroll": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/popper": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/popper/-/popper-1.18.3.tgz", + "integrity": "sha512-g8qH1fzT3xPYsLfj/07fiNPintf3xr/VkAZ7btW8uO9fjJGe++1Dmk1qze1gFYReMGrSGg/6eB53QN5QxNYLtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "1.7.2", + "@zag-js/dom-query": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/popper/node_modules/@floating-ui/dom": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.2.tgz", + "integrity": "sha512-7cfaOQuCS27HD7DX+6ib2OrnW+b4ZBwDNnCcT0uTyidcmyWb03FnQqJybDBoCnpdxwBSfA94UAYlRCt7mV+TbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.7.2", + "@floating-ui/utils": "^0.2.10" + } + }, + "node_modules/@zag-js/progress": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/progress/-/progress-1.18.3.tgz", + "integrity": "sha512-M37PpfL9ihiVUpeHMXbmm/88WO8RMPVXi5Dd4CJcc0pw5sh53b5SgxFbjm5ICrEqPRoxOIZ7Rg6yCgNMHMvaQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/radio-group": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/radio-group/-/radio-group-1.18.3.tgz", + "integrity": "sha512-LwsO1tgSYjQksWN3l9wLA8qisP+tLl/bex6hAGhaH1SFAbbr51xS+f1Sfyxiqv6Fk9P78ONW1Rb3eoIkTeZmUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/focus-visible": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/rating-group": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/rating-group/-/rating-group-1.18.3.tgz", + "integrity": "sha512-+2tqw7XwXf3Gv2uYBxYYIHfwQtuf7C/LjsakngtNxMfAyYwoldux/EKlm7Y7wEruKK7WqifsTbFxEdCvLrc3cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/remove-scroll": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/remove-scroll/-/remove-scroll-1.18.3.tgz", + "integrity": "sha512-cqWdN2uCRHiuXxLQq/HPTOLddHwp0UzGk/9fySox3kbZ2bsHtG1FXza2nrG99PlSrgorp3FIOsM8cT97cJfhCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/dom-query": "1.18.3" + } + }, + "node_modules/@zag-js/slider": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/slider/-/slider-1.18.3.tgz", + "integrity": "sha512-H85nDzQBl/Ab9ZCSqG3gHPyf/0TbFLKVdsPGLBVkbhZRhdcsOCwHQIcBIzbb7if6XM4zuOFClHJhDm3WaFfMEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/store": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/store/-/store-1.18.3.tgz", + "integrity": "sha512-9Df5Zr1pi9B7+2/OFdhyVDOkUaFUWLqgyKYx+DGaHh1LC6QbPJKoOsQ1zr23Q8G4//Dh1vNnES1SXojJA5+Nlg==", + "dev": true, + "license": "MIT", + "dependencies": { + "proxy-compare": "3.0.1" + } + }, + "node_modules/@zag-js/svelte": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/svelte/-/svelte-1.18.3.tgz", + "integrity": "sha512-eGtlAtw2eQHASMs4wmJBpK6uGwFNibIQ+5Zw4TLPrvms0ZOOcZm4//DYqEdOhsunm95y8lYFRhaeDyVagrabtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/core": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + }, + "peerDependencies": { + "svelte": "^5.0.0-next.1" + } + }, + "node_modules/@zag-js/switch": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/switch/-/switch-1.18.3.tgz", + "integrity": "sha512-JpdJR9pWMqfQWy3jcYwlNO2Av4UfY6ZvVnScOMU72bg8DWiv32SVZrdhBghhAPngWO8B181mJ30y9bUNths0tg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/focus-visible": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/tabs": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/tabs/-/tabs-1.18.3.tgz", + "integrity": "sha512-Bo+V5w0Lh2uVEyY8la7t8A0RxljyVwZmii+SzhWmsuSRBBvQ1y82Gyk0CbwuranARryIFHwWFl8c4sp4fSZvqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/tags-input": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/tags-input/-/tags-input-1.18.3.tgz", + "integrity": "sha512-gqC8r5m8Cp6B0wfGwivxl2gEQuiezua1nlonQSGgt/AQqPnILTqvziwkPurRKuG8S7e0M12pDTcJjSnsdZb2Nw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/auto-resize": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/interact-outside": "1.18.3", + "@zag-js/live-region": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/toast": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/toast/-/toast-1.18.3.tgz", + "integrity": "sha512-q+dH7Z8uUBezxWlJWdUqCDxkuIXQw9KN3AtNbCvM2ZFbJFHzvzvYwSiU3VBuML0cLxmNjXO3EpenKyPAla/VyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dismissable": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/tooltip": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/tooltip/-/tooltip-1.18.3.tgz", + "integrity": "sha512-FzG2epZX/ZmnrK9G1u9f3nmYLC1/a6mrp9BI2elaqO00cQNg7+WH+jhmrRofv2YrfpCgFYeo4yzAOcX6OkOiKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@zag-js/anatomy": "1.18.3", + "@zag-js/core": "1.18.3", + "@zag-js/dom-query": "1.18.3", + "@zag-js/focus-visible": "1.18.3", + "@zag-js/popper": "1.18.3", + "@zag-js/store": "1.18.3", + "@zag-js/types": "1.18.3", + "@zag-js/utils": "1.18.3" + } + }, + "node_modules/@zag-js/types": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/types/-/types-1.18.3.tgz", + "integrity": "sha512-M99ji5nha2/C2IQFkTkIA4SMR5w9rE0havAN55P8qpVtFzbcncCkSUZ4O0J2I4pA+NnJpCF5TcT1t7WnsyWlZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "3.1.3" + } + }, + "node_modules/@zag-js/utils": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@zag-js/utils/-/utils-1.18.3.tgz", + "integrity": "sha512-yS8M286qUp6gf4d4tnnsNehdGIlI0Feuug9QiWkWSTbAUNmGJyh5cmjNxNSuLWVCPMREC89BIIWq09s113zPig==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/apexcharts": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-5.3.6.tgz", + "integrity": "sha512-sVEPw+J0Gp0IHQabKu8cfdsxlfME0e36Wid7RIaPclGM2OUt+O7O4+6mfAmTUYhy5bDk8cNHzEhPfVtLCIXEJA==", + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "@svgdotjs/svg.draggable.js": "^3.0.4", + "@svgdotjs/svg.filter.js": "^3.0.8", + "@svgdotjs/svg.js": "^3.2.4", + "@svgdotjs/svg.resize.js": "^2.0.2", + "@svgdotjs/svg.select.js": "^4.0.1", + "@yr/monotone-cubic-spline": "^1.0.3" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/aria-query": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz", + "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", + "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axobject-query": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", + "integrity": "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==", + "license": "Apache-2.0", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bits-ui": { + "version": "2.14.3", + "resolved": "https://registry.npmjs.org/bits-ui/-/bits-ui-2.14.3.tgz", + "integrity": "sha512-Dkpenu6F5WUfdDJn5D8ALkTaAM+7sUCszKjzav5TWAzsq1fj2tcqKYJcUm82OS+JlgcolI7LOkrqIXzKnt56RA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@floating-ui/core": "^1.7.1", + "@floating-ui/dom": "^1.7.1", + "esm-env": "^1.1.2", + "runed": "^0.35.1", + "svelte-toolbelt": "^0.10.6", + "tabbable": "^6.2.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/huntabyte" + }, + "peerDependencies": { + "@internationalized/date": "^3.8.1", + "svelte": "^5.33.0" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-builder": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/buffer-builder/-/buffer-builder-0.2.0.tgz", + "integrity": "sha512-7VPMEPuYznPSoR21NE1zvd2Xna6c/CloiZCfcMXR1Jny6PjX0N4Nsa38zcBFo/FMK+BlA+FLKbJCQ0i2yxp+Xg==", + "devOptional": true, + "license": "MIT/X11" + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chai": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/codemirror": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz", + "integrity": "sha512-VhydHotNW5w1UGK0Qj96BwSk/Zqbp9WbnyK2W/eVMv4QyF41INRGpjUhFJY7/uDNuudSc33a/PKr4iDqRduvHw==", + "license": "MIT", + "dependencies": { + "@codemirror/autocomplete": "^6.0.0", + "@codemirror/commands": "^6.0.0", + "@codemirror/language": "^6.0.0", + "@codemirror/lint": "^6.0.0", + "@codemirror/search": "^6.0.0", + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/colord": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", + "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/colorjs.io": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/colorjs.io/-/colorjs.io-0.5.2.tgz", + "integrity": "sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.2.tgz", + "integrity": "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ==", + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cookie": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/crelt": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", + "integrity": "sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==", + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/date-fns": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-4.1.0.tgz", + "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, + "node_modules/dayjs": { + "version": "1.11.19", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", + "integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent-js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dedent-js/-/dedent-js-1.0.1.tgz", + "integrity": "sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devalue": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.5.0.tgz", + "integrity": "sha512-69sM5yrHfFLJt0AZ9QqZXGCPfJ7fQjvpln3Rq5+PS03LD32Ost1Q9N+eEnaQwGRIriKkMImXD56ocjQmfjbV3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/devlop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/devlop/-/devlop-1.1.0.tgz", + "integrity": "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "dequal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/dexie": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/dexie/-/dexie-4.2.1.tgz", + "integrity": "sha512-Ckej0NS6jxQ4Po3OrSQBFddayRhTCic2DoCAG5zacOfOVB9P2Q5Xc5uL/nVa7ZVs+HdMnvUPzLFCB/JwpB6Csg==", + "license": "Apache-2.0" + }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", + "license": "MIT" + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/enhanced-resolve": { + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.39.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", + "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.1", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-config-prettier": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-svelte": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-3.13.0.tgz", + "integrity": "sha512-2ohCCQJJTNbIpQCSDSTWj+FN0OVfPmSO03lmSNT7ytqMaWF6kpT86LdzDqtm4sh7TVPl/OEWJ/d7R87bXP2Vjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.6.1", + "@jridgewell/sourcemap-codec": "^1.5.0", + "esutils": "^2.0.3", + "globals": "^16.0.0", + "known-css-properties": "^0.37.0", + "postcss": "^8.4.49", + "postcss-load-config": "^3.1.4", + "postcss-safe-parser": "^7.0.0", + "semver": "^7.6.3", + "svelte-eslint-parser": "^1.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + }, + "peerDependencies": { + "eslint": "^8.57.1 || ^9.0.0", + "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "svelte": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/esm-env": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", + "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", + "license": "MIT" + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrap": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.1.2.tgz", + "integrity": "sha512-DgvlIQeowRNyvLPWW4PT7Gu13WznY288Du086E751mwwbsgr29ytBiYeLzAGIo0qk3Ujob0SDk8TiSaM5WQzNg==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "license": "MIT" + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expect-type": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz", + "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/flowbite": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/flowbite/-/flowbite-3.1.2.tgz", + "integrity": "sha512-MkwSgbbybCYgMC+go6Da5idEKUFfMqc/AmSjm/2ZbdmvoKf5frLPq/eIhXc9P+rC8t9boZtUXzHDgt5whZ6A/Q==", + "license": "MIT", + "dependencies": { + "@popperjs/core": "^2.9.3", + "flowbite-datepicker": "^1.3.1", + "mini-svg-data-uri": "^1.4.3", + "postcss": "^8.5.1" + } + }, + "node_modules/flowbite-datepicker": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/flowbite-datepicker/-/flowbite-datepicker-1.3.2.tgz", + "integrity": "sha512-6Nfm0MCVX3mpaR7YSCjmEO2GO8CDt6CX8ZpQnGdeu03WUCWtEPQ/uy0PUiNtIJjJZWnX0Cm3H55MOhbD1g+E/g==", + "license": "MIT", + "dependencies": { + "@rollup/plugin-node-resolve": "^15.2.3", + "flowbite": "^2.0.0" + } + }, + "node_modules/flowbite-datepicker/node_modules/@rollup/plugin-node-resolve": { + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz", + "integrity": "sha512-tgg6b91pAybXHJQMAAwW9VuWBO6Thi+q7BCNARLwSqlmsHz0XYURtGvh/AuwSADXSI4h/2uHbs7s4FzlZDGSGA==", + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/flowbite-datepicker/node_modules/flowbite": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/flowbite/-/flowbite-2.5.2.tgz", + "integrity": "sha512-kwFD3n8/YW4EG8GlY3Od9IoKND97kitO+/ejISHSqpn3vw2i5K/+ZI8Jm2V+KC4fGdnfi0XZ+TzYqQb4Q1LshA==", + "license": "MIT", + "dependencies": { + "@popperjs/core": "^2.9.3", + "flowbite-datepicker": "^1.3.0", + "mini-svg-data-uri": "^1.4.3" + } + }, + "node_modules/flowbite-svelte": { + "version": "1.28.0", + "resolved": "https://registry.npmjs.org/flowbite-svelte/-/flowbite-svelte-1.28.0.tgz", + "integrity": "sha512-3nrXBNbbJJ11PqcTLJg6a/3tNXBPnnhXC/Nf2isuABhWdGdTgKPQcX+ZjkYwi40hWFPmCgjFP8SO2OGdwZNaZA==", + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.7.4", + "@floating-ui/utils": "^0.2.10", + "apexcharts": "^5.3.5", + "clsx": "^2.1.1", + "date-fns": "^4.1.0", + "esm-env": "^1.2.2", + "flowbite": "^3.1.2", + "tailwind-merge": "^3.3.1", + "tailwind-variants": "^3.1.1" + }, + "peerDependencies": { + "svelte": "^5.29.0", + "tailwindcss": "^4.1.4" + } + }, + "node_modules/flowbite-svelte/node_modules/tailwind-variants": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tailwind-variants/-/tailwind-variants-3.1.1.tgz", + "integrity": "sha512-ftLXe3krnqkMHsuBTEmaVUXYovXtPyTK7ckEfDRXS8PBZx0bAUas+A0jYxuKA5b8qg++wvQ3d2MQ7l/xeZxbZQ==", + "license": "MIT", + "engines": { + "node": ">=16.x", + "pnpm": ">=7.x" + }, + "peerDependencies": { + "tailwind-merge": ">=3.0.0", + "tailwindcss": "*" + }, + "peerDependenciesMeta": { + "tailwind-merge": { + "optional": true + } + } + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", + "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/highlight.js": { + "version": "11.11.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz", + "integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/html5-qrcode": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/html5-qrcode/-/html5-qrcode-2.3.8.tgz", + "integrity": "sha512-jsr4vafJhwoLVEDW3n1KvPnCCXWaQfRng0/EEYk1vNcQGcG/htAdhJX0be8YyqMoSz7+hZvOZSTAepsabiuhiQ==", + "license": "Apache-2.0" + }, + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.4.tgz", + "integrity": "sha512-p6u1bG3YSnINT5RQmx/yRZBpenIl30kVxkTLDyHLIMk0gict704Q9n+thfDI7lTRm9vXdDYutVzXhzcThxTnXA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inline-style-parser": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.6.tgz", + "integrity": "sha512-gtGXVaBdl5mAes3rPcMedEBm12ibjt1kDMFfheul1wUAOVEJW60voNdMVzVkfLN06O7ZaD/rxhfKgtlgtTbMjg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "license": "MIT" + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/known-css-properties": { + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.37.0.tgz", + "integrity": "sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lightningcss": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.30.2.tgz", + "integrity": "sha512-utfs7Pr5uJyyvDETitgsaqSyjCb2qNRAtuqUeWIAKztsOYdcACf2KtARYXg2pSvhkt+9NfoaNY7fxjl6nuMjIQ==", + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.30.2", + "lightningcss-darwin-arm64": "1.30.2", + "lightningcss-darwin-x64": "1.30.2", + "lightningcss-freebsd-x64": "1.30.2", + "lightningcss-linux-arm-gnueabihf": "1.30.2", + "lightningcss-linux-arm64-gnu": "1.30.2", + "lightningcss-linux-arm64-musl": "1.30.2", + "lightningcss-linux-x64-gnu": "1.30.2", + "lightningcss-linux-x64-musl": "1.30.2", + "lightningcss-win32-arm64-msvc": "1.30.2", + "lightningcss-win32-x64-msvc": "1.30.2" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.30.2.tgz", + "integrity": "sha512-BH9sEdOCahSgmkVhBLeU7Hc9DWeZ1Eb6wNS6Da8igvUwAe0sqROHddIlvU06q3WyXVEOYDZ6ykBZQnjTbmo4+A==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.30.2.tgz", + "integrity": "sha512-ylTcDJBN3Hp21TdhRT5zBOIi73P6/W0qwvlFEk22fkdXchtNTOU4Qc37SkzV+EKYxLouZ6M4LG9NfZ1qkhhBWA==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.30.2.tgz", + "integrity": "sha512-oBZgKchomuDYxr7ilwLcyms6BCyLn0z8J0+ZZmfpjwg9fRVZIR5/GMXd7r9RH94iDhld3UmSjBM6nXWM2TfZTQ==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.30.2.tgz", + "integrity": "sha512-c2bH6xTrf4BDpK8MoGG4Bd6zAMZDAXS569UxCAGcA7IKbHNMlhGQ89eRmvpIUGfKWNVdbhSbkQaWhEoMGmGslA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.30.2.tgz", + "integrity": "sha512-eVdpxh4wYcm0PofJIZVuYuLiqBIakQ9uFZmipf6LF/HRj5Bgm0eb3qL/mr1smyXIS1twwOxNWndd8z0E374hiA==", + "cpu": [ + "arm" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.30.2.tgz", + "integrity": "sha512-UK65WJAbwIJbiBFXpxrbTNArtfuznvxAJw4Q2ZGlU8kPeDIWEX1dg3rn2veBVUylA2Ezg89ktszWbaQnxD/e3A==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.30.2.tgz", + "integrity": "sha512-5Vh9dGeblpTxWHpOx8iauV02popZDsCYMPIgiuw97OJ5uaDsL86cnqSFs5LZkG3ghHoX5isLgWzMs+eD1YzrnA==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.30.2.tgz", + "integrity": "sha512-Cfd46gdmj1vQ+lR6VRTTadNHu6ALuw2pKR9lYq4FnhvgBc4zWY1EtZcAc6EffShbb1MFrIPfLDXD6Xprbnni4w==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.30.2.tgz", + "integrity": "sha512-XJaLUUFXb6/QG2lGIW6aIk6jKdtjtcffUT0NKvIqhSBY3hh9Ch+1LCeH80dR9q9LBjG3ewbDjnumefsLsP6aiA==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.30.2.tgz", + "integrity": "sha512-FZn+vaj7zLv//D/192WFFVA0RgHawIcHqLX9xuWiQt7P0PtdFEVaxgF9rjM/IRYHQXNnk61/H/gb2Ei+kUQ4xQ==", + "cpu": [ + "arm64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.30.2", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.30.2.tgz", + "integrity": "sha512-5g1yc73p+iAkid5phb4oVFMB45417DkRevRbt/El/gKXJk4jid+vPFF/AXbxn05Aky8PapwzZrdJShv5C0avjw==", + "cpu": [ + "x64" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, + "node_modules/linkifyjs": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.3.2.tgz", + "integrity": "sha512-NT1CJtq3hHIreOianA8aSXn6Cw0JzYOuDQbOrSPe7gqFnCpKP++MQe3ODgO3oh2GJFORkAAdqredOa60z63GbA==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-character": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", + "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/loupe": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lowlight": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz", + "integrity": "sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/hast": "^3.0.0", + "devlop": "^1.0.0", + "highlight.js": "~11.11.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/lucide-svelte": { + "version": "0.553.0", + "resolved": "https://registry.npmjs.org/lucide-svelte/-/lucide-svelte-0.553.0.tgz", + "integrity": "sha512-pOqzFX+RfcNyvjF0+nGVnSmprd+4NQ6mvpLOLEmhTyZGOad8+OtCl65822E7Rx9qE7rfKw84ODKI2v318JZ/7g==", + "license": "ISC", + "peerDependencies": { + "svelte": "^3 || ^4 || ^5.0.0-next.42" + } + }, + "node_modules/lz-string": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz", + "integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==", + "dev": true, + "license": "MIT", + "bin": { + "lz-string": "bin/bin.js" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/marked": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", + "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mini-svg-data-uri": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", + "integrity": "sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==", + "license": "MIT", + "bin": { + "mini-svg-data-uri": "cli.js" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mode-watcher": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mode-watcher/-/mode-watcher-1.1.0.tgz", + "integrity": "sha512-mUT9RRGPDYenk59qJauN1rhsIMKBmWA3xMF+uRwE8MW/tjhaDSCCARqkSuDTq8vr4/2KcAxIGVjACxTjdk5C3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "runed": "^0.25.0", + "svelte-toolbelt": "^0.7.1" + }, + "peerDependencies": { + "svelte": "^5.27.0" + } + }, + "node_modules/mode-watcher/node_modules/runed": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/runed/-/runed-0.25.0.tgz", + "integrity": "sha512-7+ma4AG9FT2sWQEA0Egf6mb7PBT2vHyuHail1ie8ropfSjvZGtEAx8YTmUjv/APCsdRRxEVvArNjALk9zFSOrg==", + "dev": true, + "funding": [ + "https://github.com/sponsors/huntabyte", + "https://github.com/sponsors/tglide" + ], + "dependencies": { + "esm-env": "^1.0.0" + }, + "peerDependencies": { + "svelte": "^5.7.0" + } + }, + "node_modules/mode-watcher/node_modules/svelte-toolbelt": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/svelte-toolbelt/-/svelte-toolbelt-0.7.1.tgz", + "integrity": "sha512-HcBOcR17Vx9bjaOceUvxkY3nGmbBmCBBbuWLLEWO6jtmWH8f/QoWmbyUfQZrpDINH39en1b8mptfPQT9VKQ1xQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/huntabyte" + ], + "dependencies": { + "clsx": "^2.1.1", + "runed": "^0.23.2", + "style-to-object": "^1.0.8" + }, + "engines": { + "node": ">=18", + "pnpm": ">=8.7.0" + }, + "peerDependencies": { + "svelte": "^5.0.0" + } + }, + "node_modules/mode-watcher/node_modules/svelte-toolbelt/node_modules/runed": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/runed/-/runed-0.23.4.tgz", + "integrity": "sha512-9q8oUiBYeXIDLWNK5DfCWlkL0EW3oGbk845VdKlPeia28l751VpfesaB/+7pI6rnbx1I6rqoZ2fZxptOJLxILA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/huntabyte", + "https://github.com/sponsors/tglide" + ], + "dependencies": { + "esm-env": "^1.0.0" + }, + "peerDependencies": { + "svelte": "^5.7.0" + } + }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/mrmime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", + "integrity": "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT", + "optional": true + }, + "node_modules/node-fetch-native": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", + "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", + "license": "MIT" + }, + "node_modules/openai": { + "version": "5.23.2", + "resolved": "https://registry.npmjs.org/openai/-/openai-5.23.2.tgz", + "integrity": "sha512-MQBzmTulj+MM5O8SKEk/gL8a7s5mktS9zUtAkU257WjvobGc9nKcBuVwjyEEcb9SI8a8Y2G/mzn3vm9n1Jlleg==", + "license": "Apache-2.0", + "bin": { + "openai": "bin/cli" + }, + "peerDependencies": { + "ws": "^8.18.0", + "zod": "^3.23.8" + }, + "peerDependenciesMeta": { + "ws": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/orderedmap": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/orderedmap/-/orderedmap-2.1.1.tgz", + "integrity": "sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==", + "license": "MIT" + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/playwright": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.56.1.tgz", + "integrity": "sha512-aFi5B0WovBHTEvpM3DzXTUaeN6eN0qWnTkKx4NQaH4Wvcmc153PdaY2UBdSYKaGYw+UyWXSVyxDUg5DoPEttjw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.56.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.56.1.tgz", + "integrity": "sha512-hutraynyn31F+Bifme+Ps9Vq59hKuUCz7H1kDOcBs+2oGguKkWTU50bBWrtz34OUWmIwpBTWDxaRPXrIXkgvmQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-load-config": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz", + "integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-load-config/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/postcss-safe-parser": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.1.tgz", + "integrity": "sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-safe-parser" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "engines": { + "node": ">=18.0" + }, + "peerDependencies": { + "postcss": "^8.4.31" + } + }, + "node_modules/postcss-scss": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.9.tgz", + "integrity": "sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss-scss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "engines": { + "node": ">=12.0" + }, + "peerDependencies": { + "postcss": "^8.4.29" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-svelte": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-svelte/-/prettier-plugin-svelte-3.4.0.tgz", + "integrity": "sha512-pn1ra/0mPObzqoIQn/vUTR3ZZI6UuZ0sHqMK5x2jMLGrs53h0sXhkVuDcrlssHwIMk7FYrMjHBPoUSyyEEDlBQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "prettier": "^3.0.0", + "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0" + } + }, + "node_modules/prosemirror-changeset": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/prosemirror-changeset/-/prosemirror-changeset-2.3.1.tgz", + "integrity": "sha512-j0kORIBm8ayJNl3zQvD1TTPHJX3g042et6y/KQhZhnPrruO8exkTgG8X+NRpj7kIyMMEx74Xb3DyMIBtO0IKkQ==", + "license": "MIT", + "dependencies": { + "prosemirror-transform": "^1.0.0" + } + }, + "node_modules/prosemirror-collab": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/prosemirror-collab/-/prosemirror-collab-1.3.1.tgz", + "integrity": "sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==", + "license": "MIT", + "dependencies": { + "prosemirror-state": "^1.0.0" + } + }, + "node_modules/prosemirror-commands": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/prosemirror-commands/-/prosemirror-commands-1.7.1.tgz", + "integrity": "sha512-rT7qZnQtx5c0/y/KlYaGvtG411S97UaL6gdp6RIZ23DLHanMYLyfGBV5DtSnZdthQql7W+lEVbpSfwtO8T+L2w==", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.10.2" + } + }, + "node_modules/prosemirror-dropcursor": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/prosemirror-dropcursor/-/prosemirror-dropcursor-1.8.2.tgz", + "integrity": "sha512-CCk6Gyx9+Tt2sbYk5NK0nB1ukHi2ryaRgadV/LvyNuO3ena1payM2z6Cg0vO1ebK8cxbzo41ku2DE5Axj1Zuiw==", + "license": "MIT", + "dependencies": { + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.1.0", + "prosemirror-view": "^1.1.0" + } + }, + "node_modules/prosemirror-gapcursor": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/prosemirror-gapcursor/-/prosemirror-gapcursor-1.4.0.tgz", + "integrity": "sha512-z00qvurSdCEWUIulij/isHaqu4uLS8r/Fi61IbjdIPJEonQgggbJsLnstW7Lgdk4zQ68/yr6B6bf7sJXowIgdQ==", + "license": "MIT", + "dependencies": { + "prosemirror-keymap": "^1.0.0", + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-view": "^1.0.0" + } + }, + "node_modules/prosemirror-history": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/prosemirror-history/-/prosemirror-history-1.5.0.tgz", + "integrity": "sha512-zlzTiH01eKA55UAf1MEjtssJeHnGxO0j4K4Dpx+gnmX9n+SHNlDqI2oO1Kv1iPN5B1dm5fsljCfqKF9nFL6HRg==", + "license": "MIT", + "dependencies": { + "prosemirror-state": "^1.2.2", + "prosemirror-transform": "^1.0.0", + "prosemirror-view": "^1.31.0", + "rope-sequence": "^1.3.0" + } + }, + "node_modules/prosemirror-inputrules": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/prosemirror-inputrules/-/prosemirror-inputrules-1.5.1.tgz", + "integrity": "sha512-7wj4uMjKaXWAQ1CDgxNzNtR9AlsuwzHfdFH1ygEHA2KHF2DOEaXl1CJfNPAKCg9qNEh4rum975QLaCiQPyY6Fw==", + "license": "MIT", + "dependencies": { + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.0.0" + } + }, + "node_modules/prosemirror-keymap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/prosemirror-keymap/-/prosemirror-keymap-1.2.3.tgz", + "integrity": "sha512-4HucRlpiLd1IPQQXNqeo81BGtkY8Ai5smHhKW9jjPKRc2wQIxksg7Hl1tTI2IfT2B/LgX6bfYvXxEpJl7aKYKw==", + "license": "MIT", + "dependencies": { + "prosemirror-state": "^1.0.0", + "w3c-keyname": "^2.2.0" + } + }, + "node_modules/prosemirror-markdown": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/prosemirror-markdown/-/prosemirror-markdown-1.13.2.tgz", + "integrity": "sha512-FPD9rHPdA9fqzNmIIDhhnYQ6WgNoSWX9StUZ8LEKapaXU9i6XgykaHKhp6XMyXlOWetmaFgGDS/nu/w9/vUc5g==", + "license": "MIT", + "dependencies": { + "@types/markdown-it": "^14.0.0", + "markdown-it": "^14.0.0", + "prosemirror-model": "^1.25.0" + } + }, + "node_modules/prosemirror-menu": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/prosemirror-menu/-/prosemirror-menu-1.2.5.tgz", + "integrity": "sha512-qwXzynnpBIeg1D7BAtjOusR+81xCp53j7iWu/IargiRZqRjGIlQuu1f3jFi+ehrHhWMLoyOQTSRx/IWZJqOYtQ==", + "license": "MIT", + "dependencies": { + "crelt": "^1.0.0", + "prosemirror-commands": "^1.0.0", + "prosemirror-history": "^1.0.0", + "prosemirror-state": "^1.0.0" + } + }, + "node_modules/prosemirror-model": { + "version": "1.25.4", + "resolved": "https://registry.npmjs.org/prosemirror-model/-/prosemirror-model-1.25.4.tgz", + "integrity": "sha512-PIM7E43PBxKce8OQeezAs9j4TP+5yDpZVbuurd1h5phUxEKIu+G2a+EUZzIC5nS1mJktDJWzbqS23n1tsAf5QA==", + "license": "MIT", + "peer": true, + "dependencies": { + "orderedmap": "^2.0.0" + } + }, + "node_modules/prosemirror-schema-basic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.4.tgz", + "integrity": "sha512-ELxP4TlX3yr2v5rM7Sb70SqStq5NvI15c0j9j/gjsrO5vaw+fnnpovCLEGIcpeGfifkuqJwl4fon6b+KdrODYQ==", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.25.0" + } + }, + "node_modules/prosemirror-schema-list": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/prosemirror-schema-list/-/prosemirror-schema-list-1.5.1.tgz", + "integrity": "sha512-927lFx/uwyQaGwJxLWCZRkjXG0p48KpMj6ueoYiu4JX05GGuGcgzAy62dfiV8eFZftgyBUvLx76RsMe20fJl+Q==", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.0.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.7.3" + } + }, + "node_modules/prosemirror-state": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/prosemirror-state/-/prosemirror-state-1.4.4.tgz", + "integrity": "sha512-6jiYHH2CIGbCfnxdHbXZ12gySFY/fz/ulZE333G6bPqIZ4F+TXo9ifiR86nAHpWnfoNjOb3o5ESi7J8Uz1jXHw==", + "license": "MIT", + "peer": true, + "dependencies": { + "prosemirror-model": "^1.0.0", + "prosemirror-transform": "^1.0.0", + "prosemirror-view": "^1.27.0" + } + }, + "node_modules/prosemirror-tables": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/prosemirror-tables/-/prosemirror-tables-1.8.1.tgz", + "integrity": "sha512-DAgDoUYHCcc6tOGpLVPSU1k84kCUWTWnfWX3UDy2Delv4ryH0KqTD6RBI6k4yi9j9I8gl3j8MkPpRD/vWPZbug==", + "license": "MIT", + "dependencies": { + "prosemirror-keymap": "^1.2.2", + "prosemirror-model": "^1.25.0", + "prosemirror-state": "^1.4.3", + "prosemirror-transform": "^1.10.3", + "prosemirror-view": "^1.39.1" + } + }, + "node_modules/prosemirror-trailing-node": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/prosemirror-trailing-node/-/prosemirror-trailing-node-3.0.0.tgz", + "integrity": "sha512-xiun5/3q0w5eRnGYfNlW1uU9W6x5MoFKWwq/0TIRgt09lv7Hcser2QYV8t4muXbEr+Fwo0geYn79Xs4GKywrRQ==", + "license": "MIT", + "dependencies": { + "@remirror/core-constants": "3.0.0", + "escape-string-regexp": "^4.0.0" + }, + "peerDependencies": { + "prosemirror-model": "^1.22.1", + "prosemirror-state": "^1.4.2", + "prosemirror-view": "^1.33.8" + } + }, + "node_modules/prosemirror-transform": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/prosemirror-transform/-/prosemirror-transform-1.10.5.tgz", + "integrity": "sha512-RPDQCxIDhIBb1o36xxwsaeAvivO8VLJcgBtzmOwQ64bMtsVFh5SSuJ6dWSxO1UsHTiTXPCgQm3PDJt7p6IOLbw==", + "license": "MIT", + "dependencies": { + "prosemirror-model": "^1.21.0" + } + }, + "node_modules/prosemirror-view": { + "version": "1.41.3", + "resolved": "https://registry.npmjs.org/prosemirror-view/-/prosemirror-view-1.41.3.tgz", + "integrity": "sha512-SqMiYMUQNNBP9kfPhLO8WXEk/fon47vc52FQsUiJzTBuyjKgEcoAwMyF04eQ4WZ2ArMn7+ReypYL60aKngbACQ==", + "license": "MIT", + "peer": true, + "dependencies": { + "prosemirror-model": "^1.20.0", + "prosemirror-state": "^1.0.0", + "prosemirror-transform": "^1.1.0" + } + }, + "node_modules/proxy-compare": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/proxy-compare/-/proxy-compare-3.0.1.tgz", + "integrity": "sha512-V9plBAt3qjMlS1+nC8771KNf6oJ12gExvaxnNzN/9yVRLdTv/lc+oJlnSzrdYDAvBfTStPCoiaCOTmTs0adv7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "license": "MIT", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.53.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz", + "integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==", + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.53.2", + "@rollup/rollup-android-arm64": "4.53.2", + "@rollup/rollup-darwin-arm64": "4.53.2", + "@rollup/rollup-darwin-x64": "4.53.2", + "@rollup/rollup-freebsd-arm64": "4.53.2", + "@rollup/rollup-freebsd-x64": "4.53.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.53.2", + "@rollup/rollup-linux-arm-musleabihf": "4.53.2", + "@rollup/rollup-linux-arm64-gnu": "4.53.2", + "@rollup/rollup-linux-arm64-musl": "4.53.2", + "@rollup/rollup-linux-loong64-gnu": "4.53.2", + "@rollup/rollup-linux-ppc64-gnu": "4.53.2", + "@rollup/rollup-linux-riscv64-gnu": "4.53.2", + "@rollup/rollup-linux-riscv64-musl": "4.53.2", + "@rollup/rollup-linux-s390x-gnu": "4.53.2", + "@rollup/rollup-linux-x64-gnu": "4.53.2", + "@rollup/rollup-linux-x64-musl": "4.53.2", + "@rollup/rollup-openharmony-arm64": "4.53.2", + "@rollup/rollup-win32-arm64-msvc": "4.53.2", + "@rollup/rollup-win32-ia32-msvc": "4.53.2", + "@rollup/rollup-win32-x64-gnu": "4.53.2", + "@rollup/rollup-win32-x64-msvc": "4.53.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/rope-sequence": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/rope-sequence/-/rope-sequence-1.3.4.tgz", + "integrity": "sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==", + "license": "MIT" + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/runed": { + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/runed/-/runed-0.35.1.tgz", + "integrity": "sha512-2F4Q/FZzbeJTFdIS/PuOoPRSm92sA2LhzTnv6FXhCoENb3huf5+fDuNOg1LNvGOouy3u/225qxmuJvcV3IZK5Q==", + "dev": true, + "funding": [ + "https://github.com/sponsors/huntabyte", + "https://github.com/sponsors/tglide" + ], + "license": "MIT", + "dependencies": { + "dequal": "^2.0.3", + "esm-env": "^1.0.0", + "lz-string": "^1.5.0" + }, + "peerDependencies": { + "@sveltejs/kit": "^2.21.0", + "svelte": "^5.7.0" + }, + "peerDependenciesMeta": { + "@sveltejs/kit": { + "optional": true + } + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/sade": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", + "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/sass": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.93.3.tgz", + "integrity": "sha512-elOcIZRTM76dvxNAjqYrucTSI0teAF/L2Lv0s6f6b7FOwcwIuA357bIE871580AjHJuSvLIRUosgV+lIWx6Rgg==", + "license": "MIT", + "optional": true, + "dependencies": { + "chokidar": "^4.0.0", + "immutable": "^5.0.2", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "optionalDependencies": { + "@parcel/watcher": "^2.4.1" + } + }, + "node_modules/sass-embedded": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.93.3.tgz", + "integrity": "sha512-+VUy01yfDqNmIVMd/LLKl2TTtY0ovZN0rTonh+FhKr65mFwIYgU9WzgIZKS7U9/SPCQvWTsTGx9jyt+qRm/XFw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@bufbuild/protobuf": "^2.5.0", + "buffer-builder": "^0.2.0", + "colorjs.io": "^0.5.0", + "immutable": "^5.0.2", + "rxjs": "^7.4.0", + "supports-color": "^8.1.1", + "sync-child-process": "^1.0.2", + "varint": "^6.0.0" + }, + "bin": { + "sass": "dist/bin/sass.js" + }, + "engines": { + "node": ">=16.0.0" + }, + "optionalDependencies": { + "sass-embedded-all-unknown": "1.93.3", + "sass-embedded-android-arm": "1.93.3", + "sass-embedded-android-arm64": "1.93.3", + "sass-embedded-android-riscv64": "1.93.3", + "sass-embedded-android-x64": "1.93.3", + "sass-embedded-darwin-arm64": "1.93.3", + "sass-embedded-darwin-x64": "1.93.3", + "sass-embedded-linux-arm": "1.93.3", + "sass-embedded-linux-arm64": "1.93.3", + "sass-embedded-linux-musl-arm": "1.93.3", + "sass-embedded-linux-musl-arm64": "1.93.3", + "sass-embedded-linux-musl-riscv64": "1.93.3", + "sass-embedded-linux-musl-x64": "1.93.3", + "sass-embedded-linux-riscv64": "1.93.3", + "sass-embedded-linux-x64": "1.93.3", + "sass-embedded-unknown-all": "1.93.3", + "sass-embedded-win32-arm64": "1.93.3", + "sass-embedded-win32-x64": "1.93.3" + } + }, + "node_modules/sass-embedded-all-unknown": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-all-unknown/-/sass-embedded-all-unknown-1.93.3.tgz", + "integrity": "sha512-3okGgnE41eg+CPLtAPletu6nQ4N0ij7AeW+Sl5Km4j29XcmqZQeFwYjHe1AlKTEgLi/UAONk1O8i8/lupeKMbw==", + "cpu": [ + "!arm", + "!arm64", + "!riscv64", + "!x64" + ], + "license": "MIT", + "optional": true, + "dependencies": { + "sass": "1.93.3" + } + }, + "node_modules/sass-embedded-android-arm": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-android-arm/-/sass-embedded-android-arm-1.93.3.tgz", + "integrity": "sha512-8xOw9bywfOD6Wv24BgCmgjkk6tMrsOTTHcb28KDxeJtFtoxiUyMbxo0vChpPAfp2Hyg2tFFKS60s0s4JYk+Raw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-android-arm64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-android-arm64/-/sass-embedded-android-arm64-1.93.3.tgz", + "integrity": "sha512-uqUl3Kt1IqdGVAcAdbmC+NwuUJy8tM+2ZnB7/zrt6WxWVShVCRdFnWR9LT8HJr7eJN7AU8kSXxaVX/gedanPsg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-android-riscv64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-android-riscv64/-/sass-embedded-android-riscv64-1.93.3.tgz", + "integrity": "sha512-2jNJDmo+3qLocjWqYbXiBDnfgwrUeZgZFHJIwAefU7Fn66Ot7rsXl+XPwlokaCbTpj7eMFIqsRAZ/uDueXNCJg==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-android-x64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-android-x64/-/sass-embedded-android-x64-1.93.3.tgz", + "integrity": "sha512-y0RoAU6ZenQFcjM9PjQd3cRqRTjqwSbtWLL/p68y2oFyh0QGN0+LQ826fc0ZvU/AbqCsAizkqjzOn6cRZJxTTQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-darwin-arm64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-darwin-arm64/-/sass-embedded-darwin-arm64-1.93.3.tgz", + "integrity": "sha512-7zb/hpdMOdKteK17BOyyypemglVURd1Hdz6QGsggy60aUFfptTLQftLRg8r/xh1RbQAUKWFbYTNaM47J9yPxYg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-darwin-x64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-darwin-x64/-/sass-embedded-darwin-x64-1.93.3.tgz", + "integrity": "sha512-Ek1Vp8ZDQEe327Lz0b7h3hjvWH3u9XjJiQzveq74RPpJQ2q6d9LfWpjiRRohM4qK6o4XOHw1X10OMWPXJtdtWg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-arm": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm/-/sass-embedded-linux-arm-1.93.3.tgz", + "integrity": "sha512-yeiv2y+dp8B4wNpd3+JsHYD0mvpXSfov7IGyQ1tMIR40qv+ROkRqYiqQvAOXf76Qwh4Y9OaYZtLpnsPjfeq6mA==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-arm64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-arm64/-/sass-embedded-linux-arm64-1.93.3.tgz", + "integrity": "sha512-RBrHWgfd8Dd8w4fbmdRVXRrhh8oBAPyeWDTKAWw8ZEmuXfVl4ytjDuyxaVilh6rR1xTRTNpbaA/YWApBlLrrNw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-musl-arm": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm/-/sass-embedded-linux-musl-arm-1.93.3.tgz", + "integrity": "sha512-fU0fwAwbp7sBE3h5DVU5UPzvaLg7a4yONfFWkkcCp6ZrOiPuGRHXXYriWQ0TUnWy4wE+svsVuWhwWgvlb/tkKg==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-musl-arm64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-arm64/-/sass-embedded-linux-musl-arm64-1.93.3.tgz", + "integrity": "sha512-PS829l+eUng+9W4PFclXGb4uA2+965NHV3/Sa5U7qTywjeeUUYTZg70dJHSqvhrBEfCc2XJABeW3adLJbyQYkw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-musl-riscv64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-riscv64/-/sass-embedded-linux-musl-riscv64-1.93.3.tgz", + "integrity": "sha512-cK1oBY+FWQquaIGEeQ5H74KTO8cWsSWwXb/WaildOO9U6wmUypTgUYKQ0o5o/29nZbWWlM1PHuwVYTSnT23Jjg==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-musl-x64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-musl-x64/-/sass-embedded-linux-musl-x64-1.93.3.tgz", + "integrity": "sha512-A7wkrsHu2/I4Zpa0NMuPGkWDVV7QGGytxGyUq3opSXgAexHo/vBPlGoDXoRlSdex0cV+aTMRPjoGIfdmNlHwyg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-riscv64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-riscv64/-/sass-embedded-linux-riscv64-1.93.3.tgz", + "integrity": "sha512-vWkW1+HTF5qcaHa6hO80gx/QfB6GGjJUP0xLbnAoY4pwEnw5ulGv6RM8qYr8IDhWfVt/KH+lhJ2ZFxnJareisQ==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-linux-x64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-linux-x64/-/sass-embedded-linux-x64-1.93.3.tgz", + "integrity": "sha512-k6uFxs+e5jSuk1Y0niCwuq42F9ZC5UEP7P+RIOurIm8w/5QFa0+YqeW+BPWEW5M1FqVOsNZH3qGn4ahqvAEjPA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-unknown-all": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-unknown-all/-/sass-embedded-unknown-all-1.93.3.tgz", + "integrity": "sha512-o5wj2rLpXH0C+GJKt/VpWp6AnMsCCbfFmnMAttcrsa+U3yrs/guhZ3x55KAqqUsE8F47e3frbsDL+1OuQM5DAA==", + "license": "MIT", + "optional": true, + "os": [ + "!android", + "!darwin", + "!linux", + "!win32" + ], + "dependencies": { + "sass": "1.93.3" + } + }, + "node_modules/sass-embedded-win32-arm64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-win32-arm64/-/sass-embedded-win32-arm64-1.93.3.tgz", + "integrity": "sha512-0dOfT9moy9YmBolodwYYXtLwNr4jL4HQC9rBfv6mVrD7ud8ue2kDbn+GVzj1hEJxvEexVSmDCf7MHUTLcGs9xQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded-win32-x64": { + "version": "1.93.3", + "resolved": "https://registry.npmjs.org/sass-embedded-win32-x64/-/sass-embedded-win32-x64-1.93.3.tgz", + "integrity": "sha512-wHFVfxiS9hU/sNk7KReD+lJWRp3R0SLQEX4zfOnRP2zlvI2X4IQR5aZr9GNcuMP6TmNpX0nQPZTegS8+h9RrEg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/sass-embedded/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/scule": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", + "integrity": "sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, + "node_modules/set-cookie-parser": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", + "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", + "dev": true, + "license": "MIT" + }, + "node_modules/shadcn-svelte": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/shadcn-svelte/-/shadcn-svelte-1.0.11.tgz", + "integrity": "sha512-PzY8Ssnn63SIerYC2+WECsho6QhYbao5NKNXzRrau5AU2mpQdpa4wYc5soi0sqN9W7Af4btaH9+6yANxEtU1YA==", + "license": "MIT", + "dependencies": { + "commander": "^14.0.0", + "node-fetch-native": "^1.6.4", + "postcss": "^8.5.5" + }, + "bin": { + "shadcn-svelte": "dist/index.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/sirv": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.2.tgz", + "integrity": "sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-literal": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz", + "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/style-mod": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz", + "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==", + "license": "MIT" + }, + "node_modules/style-to-object": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-1.0.12.tgz", + "integrity": "sha512-ddJqYnoT4t97QvN2C95bCgt+m7AAgXjVnkk/jxAfmp7EAB8nnqqZYEbMd3em7/vEomDb2LAQKAy1RFfv41mdNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "inline-style-parser": "0.2.6" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svelte": { + "version": "5.43.6", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.43.6.tgz", + "integrity": "sha512-RnyO9VXI85Bmsf4b8AuQFBKFYL3LKUl+ZrifOjvlrQoboAROj5IITVLK1yOXBjwUWUn2BI5cfmurktgCzuZ5QA==", + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/remapping": "^2.3.4", + "@jridgewell/sourcemap-codec": "^1.5.0", + "@sveltejs/acorn-typescript": "^1.0.5", + "@types/estree": "^1.0.5", + "acorn": "^8.12.1", + "aria-query": "^5.3.1", + "axobject-query": "^4.1.0", + "clsx": "^2.1.1", + "esm-env": "^1.2.1", + "esrap": "^2.1.0", + "is-reference": "^3.0.3", + "locate-character": "^3.0.0", + "magic-string": "^0.30.11", + "zimmerframe": "^1.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/svelte-awesome-color-picker": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/svelte-awesome-color-picker/-/svelte-awesome-color-picker-4.1.0.tgz", + "integrity": "sha512-afiSB3eTBlqu96f4+rjBvqG3eCaLwuneNYHe587Wr4Ien6yQWeztGZunPT0FmiI7wFFBVNUlJQLYutII8LfQUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "colord": "^2.9.3", + "svelte-awesome-slider": "2.0.0" + }, + "peerDependencies": { + "svelte": "^5.0.0" + } + }, + "node_modules/svelte-awesome-slider": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/svelte-awesome-slider/-/svelte-awesome-slider-2.0.0.tgz", + "integrity": "sha512-YBkOdYm1Feaqsn2JkJBRs+Kc/X3Qy/3GuVmI7GmoYDjBaHkjx9uH4khTuED22z57Hg3gGWeDhp/clIjWDdLNaw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "svelte": "^5.0.0" + } + }, + "node_modules/svelte-check": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-4.3.4.tgz", + "integrity": "sha512-DVWvxhBrDsd+0hHWKfjP99lsSXASeOhHJYyuKOFYJcP7ThfSCKgjVarE8XfuMWpS5JV3AlDf+iK1YGGo2TACdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "chokidar": "^4.0.1", + "fdir": "^6.2.0", + "picocolors": "^1.0.0", + "sade": "^1.7.4" + }, + "bin": { + "svelte-check": "bin/svelte-check" + }, + "engines": { + "node": ">= 18.0.0" + }, + "peerDependencies": { + "svelte": "^4.0.0 || ^5.0.0-next.0", + "typescript": ">=5.0.0" + } + }, + "node_modules/svelte-eslint-parser": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-1.4.0.tgz", + "integrity": "sha512-fjPzOfipR5S7gQ/JvI9r2H8y9gMGXO3JtmrylHLLyahEMquXI0lrebcjT+9/hNgDej0H7abTyox5HpHmW1PSWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.0.0", + "postcss": "^8.4.49", + "postcss-scss": "^4.0.9", + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0", + "pnpm": "10.18.3" + }, + "funding": { + "url": "https://github.com/sponsors/ota-meshi" + }, + "peerDependencies": { + "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "svelte": { + "optional": true + } + } + }, + "node_modules/svelte-eslint-parser/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/svelte-eslint-parser/node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/svelte-highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/svelte-highlight/-/svelte-highlight-7.9.0.tgz", + "integrity": "sha512-226LBTtvTnM2L2JkQq8mZeKEeMfPLYyta7VxZatFT4UPX5zdHEerKeMTvrfbxm7MVTWc7TPThsNoVdhWC177KQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "highlight.js": "11.11.1" + } + }, + "node_modules/svelte-idle": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/svelte-idle/-/svelte-idle-3.0.1.tgz", + "integrity": "sha512-B0OfHwcwxuAVcKQSybToIry6g06e9CBZqxBiAU8FhOXILngtXvi1HwzUvEwpZelDrw1hVLJdfDcwBxTFZQNruw==", + "dev": true, + "license": "MIT" + }, + "node_modules/svelte-persisted-store": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/svelte-persisted-store/-/svelte-persisted-store-0.12.0.tgz", + "integrity": "sha512-BdBQr2SGSJ+rDWH8/aEV5GthBJDapVP0GP3fuUCA7TjYG5ctcB+O9Mj9ZC0+Jo1oJMfZUd1y9H68NFRR5MyIJA==", + "license": "MIT", + "engines": { + "node": ">=0.14" + }, + "peerDependencies": { + "svelte": "^3.48.0 || ^4 || ^5" + } + }, + "node_modules/svelte-tiptap": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/svelte-tiptap/-/svelte-tiptap-2.2.0.tgz", + "integrity": "sha512-6i8RRk7lot0zwobkhHNcW3yqdbC6xXrigwLZ1fERtVDq8nVhiaLzvF4HUboFNoxSTOxx7S8YGy4C6x0e+OPA1w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "peerDependencies": { + "@tiptap/core": "^2.11.5", + "@tiptap/extension-bubble-menu": "^2.11.5", + "@tiptap/extension-floating-menu": "^2.11.5", + "@tiptap/pm": "^2.11.5", + "svelte": "^5.0.0" + } + }, + "node_modules/svelte-toolbelt": { + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/svelte-toolbelt/-/svelte-toolbelt-0.10.6.tgz", + "integrity": "sha512-YWuX+RE+CnWYx09yseAe4ZVMM7e7GRFZM6OYWpBKOb++s+SQ8RBIMMe+Bs/CznBMc0QPLjr+vDBxTAkozXsFXQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/huntabyte" + ], + "dependencies": { + "clsx": "^2.1.1", + "runed": "^0.35.1", + "style-to-object": "^1.0.8" + }, + "engines": { + "node": ">=18", + "pnpm": ">=8.7.0" + }, + "peerDependencies": { + "svelte": "^5.30.2" + } + }, + "node_modules/svelte/node_modules/is-reference": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", + "integrity": "sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.6" + } + }, + "node_modules/svelte2tsx": { + "version": "0.7.45", + "resolved": "https://registry.npmjs.org/svelte2tsx/-/svelte2tsx-0.7.45.tgz", + "integrity": "sha512-cSci+mYGygYBHIZLHlm/jYlEc1acjAHqaQaDFHdEBpUueM9kSTnPpvPtSl5VkJOU1qSJ7h1K+6F/LIUYiqC8VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "dedent-js": "^1.0.1", + "scule": "^1.3.0" + }, + "peerDependencies": { + "svelte": "^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0", + "typescript": "^4.9.4 || ^5.0.0" + } + }, + "node_modules/sync-child-process": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/sync-child-process/-/sync-child-process-1.0.2.tgz", + "integrity": "sha512-8lD+t2KrrScJ/7KXCSyfhT3/hRq78rC0wBFqNJXv3mZyn6hW2ypM05JmlSvtqRbeq6jqA94oHbxAr2vYsJ8vDA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "sync-message-port": "^1.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/sync-message-port": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sync-message-port/-/sync-message-port-1.1.3.tgz", + "integrity": "sha512-GTt8rSKje5FilG+wEdfCkOcLL7LWqpMlr2c3LRuKt/YXxcJ52aGSbGBAdI4L3aaqfrBt6y711El53ItyH1NWzg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/tabbable": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.3.0.tgz", + "integrity": "sha512-EIHvdY5bPLuWForiR/AN2Bxngzpuwn1is4asboytXtpTgsArc+WmSJKVLlhdh71u7jFcryDqB2A8lQvj78MkyQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tailwind-merge": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-3.4.0.tgz", + "integrity": "sha512-uSaO4gnW+b3Y2aWoWfFpX62vn2sR3skfhbjsEnaBI81WD1wBLlHZe5sWf0AqjksNdYTbGBEd0UasQMT3SNV15g==", + "license": "MIT", + "peer": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, + "node_modules/tailwind-variants": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tailwind-variants/-/tailwind-variants-2.1.0.tgz", + "integrity": "sha512-82m0eRex0z6A3GpvfoTCpHr+wWJmbecfVZfP3mqLoDxeya5tN4mYJQZwa5Aw1hRZTedwpu1D2JizYenoEdyD8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.x", + "pnpm": ">=7.x" + }, + "peerDependencies": { + "tailwind-merge": ">=3.0.0", + "tailwindcss": "*" + }, + "peerDependenciesMeta": { + "tailwind-merge": { + "optional": true + } + } + }, + "node_modules/tailwindcss": { + "version": "4.1.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.17.tgz", + "integrity": "sha512-j9Ee2YjuQqYT9bbRTfTZht9W/ytp5H+jJpZKiYdP/bpnXARAuELt9ofP0lPnmHjbga7SNQIxdTAXCmtKVYjN+Q==", + "license": "MIT", + "peer": true + }, + "node_modules/tailwindcss-animate": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/tailwindcss-animate/-/tailwindcss-animate-1.0.7.tgz", + "integrity": "sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders" + } + }, + "node_modules/tapable": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz", + "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tippy.js": { + "version": "6.3.7", + "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.7.tgz", + "integrity": "sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@popperjs/core": "^2.9.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "devOptional": true, + "license": "0BSD" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-svelte-plugin": { + "version": "0.3.50", + "resolved": "https://registry.npmjs.org/typescript-svelte-plugin/-/typescript-svelte-plugin-0.3.50.tgz", + "integrity": "sha512-CD6jMNAYJwqCyQ5zZBDRuveeJvAgIogLwXMf5eXAl4K36wD8W+Npw49h6j5fXnpd7SKcG3uptGpeCGETED6WSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "svelte2tsx": "~0.7.35" + } + }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/varint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", + "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", + "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", + "license": "MIT", + "peer": true, + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vite/node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/vitefu": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.1.tgz", + "integrity": "sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ==", + "dev": true, + "license": "MIT", + "workspaces": [ + "tests/deps/*", + "tests/projects/*", + "tests/projects/workspace/packages/*" + ], + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", + "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.4", + "@vitest/mocker": "3.2.4", + "@vitest/pretty-format": "^3.2.4", + "@vitest/runner": "3.2.4", + "@vitest/snapshot": "3.2.4", + "@vitest/spy": "3.2.4", + "@vitest/utils": "3.2.4", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.4", + "@vitest/ui": "3.2.4", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/w3c-keyname": { + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz", + "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yargs/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zimmerframe": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.4.tgz", + "integrity": "sha512-B58NGBEoc8Y9MWWCQGl/gq9xBCe4IiKM0a2x7GZdQKOW5Exr8S1W24J6OgM1njK8xCRGvAJIL/MxXHf6SkmQKQ==", + "license": "MIT" + } + } } diff --git a/package.json b/package.json index c35b2e6d..57affc9f 100644 --- a/package.json +++ b/package.json @@ -1,124 +1,129 @@ { - "name": "osit-aether-app-svelte", - "version": "3.9.6", - "description": "One Sky IT's Aether App created with Svelte, SvelteKit, Tailwind CSS, Lucide, Font Awesome, and Skeleton UI. -Scott Idem", - "homepage": "https://oneskyit.com/", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "build:prod": "cp .env.prod .env.production && vite build", - "build:staging": "cp .env.staging .env.production && vite build", - "preview": "vite preview", - "test": "npm run test:integration && npm run test:unit", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "prettier --check . && eslint .", - "format": "prettier --write .", - "test:integration": "playwright test", - "test:unit": "vitest" - }, - "devDependencies": { - "@playwright/test": "^1.28.1", - "@skeletonlabs/skeleton": "^3.1.3", - "@skeletonlabs/skeleton-svelte": "^1.2.3", - "@sveltejs/adapter-auto": "^6.0.0", - "@sveltejs/adapter-node": "^5.0.0", - "@sveltejs/adapter-static": "^3.0.1", - "@sveltejs/kit": "^2.5.0", - "@sveltejs/vite-plugin-svelte": "^5.0.0", - "@tailwindcss/forms": "^0.5.7", - "@tailwindcss/typography": "^0.5.10", - "@tiptap/core": "^2.10.3", - "@tiptap/extension-bubble-menu": "^2.10.3", - "@tiptap/extension-code-block-lowlight": "^2.10.3", - "@tiptap/extension-color": "^2.10.3", - "@tiptap/extension-highlight": "^2.10.3", - "@tiptap/extension-image": "^2.10.3", - "@tiptap/extension-link": "^2.10.3", - "@tiptap/extension-subscript": "^2.10.3", - "@tiptap/extension-superscript": "^2.10.3", - "@tiptap/extension-table": "^2.10.3", - "@tiptap/extension-table-cell": "^2.10.3", - "@tiptap/extension-table-header": "^2.10.3", - "@tiptap/extension-table-row": "^2.10.3", - "@tiptap/extension-task-item": "^2.10.3", - "@tiptap/extension-task-list": "^2.10.3", - "@tiptap/extension-text": "^2.10.3", - "@tiptap/extension-text-align": "^2.10.3", - "@tiptap/extension-text-style": "^2.10.3", - "@tiptap/extension-typography": "^2.10.3", - "@tiptap/extension-underline": "^2.10.3", - "@tiptap/pm": "^2.10.3", - "@tiptap/starter-kit": "^2.10.3", - "@types/eslint": "^9.0.0", - "@types/node": "^24.0.0", - "@types/qrcode": "^1.5.5", - "@typescript-eslint/eslint-plugin": "^8.0.0", - "@typescript-eslint/parser": "^8.0.0", - "bits-ui": "^2.0.0", - "clsx": "^2.1.1", - "eslint": "^9.0.0", - "eslint-config-prettier": "^10.0.0", - "eslint-plugin-svelte": "^3.0.0", - "flowbite": "^3.0.0", - "highlight.js": "^11.10.0", - "lowlight": "^3.2.0", - "mode-watcher": "^1.0.0", - "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", - "sass-embedded": "^1.81.0", - "svelte": "^5.0.0", - "svelte-awesome-color-picker": "^4.0.0", - "svelte-check": "^4.0.0", - "svelte-highlight": "^7.8.4", - "svelte-idle": "^3.0.1", - "svelte-tiptap": "^2.1.0", - "tailwind-merge": "^3.0.0", - "tailwind-variants": "^2.1.0", - "tailwindcss": "^4.1.10", - "tailwindcss-animate": "^1.0.7", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "typescript-svelte-plugin": "^0.3.50", - "vite": "^6.0.0", - "vitest": "^3.0.0" - }, - "vitest": { - "exclude": ["tests"] - }, - "type": "module", - "dependencies": { - "@codemirror/commands": "^6.8.1", - "@codemirror/gutter": "^0.19.9", - "@codemirror/lang-css": "^6.3.1", - "@codemirror/lang-html": "^6.4.9", - "@codemirror/lang-javascript": "^6.2.3", - "@codemirror/lang-json": "^6.0.1", - "@codemirror/lang-markdown": "^6.3.2", - "@codemirror/language": "^6.11.0", - "@codemirror/language-data": "^6.5.1", - "@codemirror/theme-one-dark": "^6.1.2", - "@codemirror/view": "^6.36.8", - "@floating-ui/dom": "^1.6.0", - "@lucide/svelte": "0.*.0", - "@popperjs/core": "^2.11.0", - "@tailwindcss/vite": "^4.1.10", - "@tiptap/extension-bullet-list": "^2.10.2", - "@tiptap/extension-document": "^2.10.2", - "@tiptap/extension-history": "^2.10.2", - "@tiptap/extension-paragraph": "^2.10.2", - "axios": "^1.7.0", - "codemirror": "^6.0.1", - "dayjs": "^1.11.10", - "dexie": "^4.0.0", - "flowbite-svelte": "^1.7.0", - "html5-qrcode": "^2.3.8", - "lucide-svelte": "0.*.0", - "marked": "^16.0.0", - "openai": "^5.20.1", - "qrcode": "^1.5.4", - "shadcn-svelte": "^1.0.0", - "svelte-persisted-store": "^0.12.0" - } + "name": "osit-aether-app-svelte", + "version": "3.9.6", + "description": "One Sky IT's Aether App created with Svelte, SvelteKit, Tailwind CSS, Lucide, Font Awesome, and Skeleton UI. -Scott Idem", + "homepage": "https://oneskyit.com/", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "build:prod": "cp .env.prod .env.production && vite build", + "build:staging": "cp .env.staging .env.production && vite build", + "preview": "vite preview", + "test": "npm run test:integration && npm run test:unit", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --check . && eslint .", + "format": "prettier --write .", + "test:integration": "playwright test", + "test:unit": "vitest" + }, + "devDependencies": { + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "^9.39.1", + "@playwright/test": "^1.28.1", + "@skeletonlabs/skeleton": "^3.1.3", + "@skeletonlabs/skeleton-svelte": "^1.2.3", + "@sveltejs/adapter-auto": "^6.0.0", + "@sveltejs/adapter-node": "^5.0.0", + "@sveltejs/adapter-static": "^3.0.1", + "@sveltejs/kit": "^2.5.0", + "@sveltejs/vite-plugin-svelte": "^5.0.0", + "@tailwindcss/forms": "^0.5.7", + "@tailwindcss/typography": "^0.5.10", + "@tiptap/core": "^2.10.3", + "@tiptap/extension-bubble-menu": "^2.10.3", + "@tiptap/extension-code-block-lowlight": "^2.10.3", + "@tiptap/extension-color": "^2.10.3", + "@tiptap/extension-highlight": "^2.10.3", + "@tiptap/extension-image": "^2.10.3", + "@tiptap/extension-link": "^2.10.3", + "@tiptap/extension-subscript": "^2.10.3", + "@tiptap/extension-superscript": "^2.10.3", + "@tiptap/extension-table": "^2.10.3", + "@tiptap/extension-table-cell": "^2.10.3", + "@tiptap/extension-table-header": "^2.10.3", + "@tiptap/extension-table-row": "^2.10.3", + "@tiptap/extension-task-item": "^2.10.3", + "@tiptap/extension-task-list": "^2.10.3", + "@tiptap/extension-text": "^2.10.3", + "@tiptap/extension-text-align": "^2.10.3", + "@tiptap/extension-text-style": "^2.10.3", + "@tiptap/extension-typography": "^2.10.3", + "@tiptap/extension-underline": "^2.10.3", + "@tiptap/pm": "^2.10.3", + "@tiptap/starter-kit": "^2.10.3", + "@types/eslint": "^9.0.0", + "@types/node": "^24.0.0", + "@types/qrcode": "^1.5.5", + "@typescript-eslint/eslint-plugin": "^8.0.0", + "@typescript-eslint/parser": "^8.0.0", + "bits-ui": "^2.0.0", + "clsx": "^2.1.1", + "eslint": "^9.0.0", + "eslint-config-prettier": "^10.0.0", + "eslint-plugin-svelte": "^3.0.0", + "flowbite": "^3.0.0", + "globals": "^16.5.0", + "highlight.js": "^11.10.0", + "lowlight": "^3.2.0", + "mode-watcher": "^1.0.0", + "prettier": "^3.1.1", + "prettier-plugin-svelte": "^3.1.2", + "sass-embedded": "^1.81.0", + "svelte": "^5.0.0", + "svelte-awesome-color-picker": "^4.0.0", + "svelte-check": "^4.0.0", + "svelte-highlight": "^7.8.4", + "svelte-idle": "^3.0.1", + "svelte-tiptap": "^2.1.0", + "tailwind-merge": "^3.0.0", + "tailwind-variants": "^2.1.0", + "tailwindcss": "^4.1.10", + "tailwindcss-animate": "^1.0.7", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "typescript-svelte-plugin": "^0.3.50", + "vite": "^6.0.0", + "vitest": "^3.0.0" + }, + "vitest": { + "exclude": [ + "tests" + ] + }, + "type": "module", + "dependencies": { + "@codemirror/commands": "^6.8.1", + "@codemirror/gutter": "^0.19.9", + "@codemirror/lang-css": "^6.3.1", + "@codemirror/lang-html": "^6.4.9", + "@codemirror/lang-javascript": "^6.2.3", + "@codemirror/lang-json": "^6.0.1", + "@codemirror/lang-markdown": "^6.3.2", + "@codemirror/language": "^6.11.0", + "@codemirror/language-data": "^6.5.1", + "@codemirror/theme-one-dark": "^6.1.2", + "@codemirror/view": "^6.36.8", + "@floating-ui/dom": "^1.6.0", + "@lucide/svelte": "0.*.0", + "@popperjs/core": "^2.11.0", + "@tailwindcss/vite": "^4.1.10", + "@tiptap/extension-bullet-list": "^2.10.2", + "@tiptap/extension-document": "^2.10.2", + "@tiptap/extension-history": "^2.10.2", + "@tiptap/extension-paragraph": "^2.10.2", + "axios": "^1.7.0", + "codemirror": "^6.0.1", + "dayjs": "^1.11.10", + "dexie": "^4.0.0", + "flowbite-svelte": "^1.7.0", + "html5-qrcode": "^2.3.8", + "lucide-svelte": "0.*.0", + "marked": "^16.0.0", + "openai": "^5.20.1", + "qrcode": "^1.5.4", + "shadcn-svelte": "^1.0.0", + "svelte-persisted-store": "^0.12.0" + } } diff --git a/playwright.config.ts b/playwright.config.ts index beef3648..0942826d 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -3,7 +3,7 @@ import type { PlaywrightTestConfig } from '@playwright/test'; const config: PlaywrightTestConfig = { webServer: { command: 'npm run build && npm run preview', - port: 4173, + port: 4173 // url: 'http://scott.localhost:5173', // reuseExistingServer: true, // stderr: 'pipe', @@ -14,8 +14,8 @@ const config: PlaywrightTestConfig = { reporter: 'list', use: { // Collect trace when retrying the failed test. - trace: 'on-first-retry', - }, + trace: 'on-first-retry' + } // grep: /@node_modules/, // grepInverse: /@node_modules/, }; diff --git a/src/ae-c-idaa-light.css b/src/ae-c-idaa-light.css index a4719264..2bc5b5d5 100644 --- a/src/ae-c-idaa-light.css +++ b/src/ae-c-idaa-light.css @@ -48,10 +48,6 @@ --color-primary-contrast-light: var(--color-primary-50); - - - - --color-primary-contrast-500: var(--color-primary-contrast-light); --color-primary-contrast-600: var(--color-primary-contrast-light); --color-primary-contrast-700: var(--color-primary-contrast-light); @@ -72,11 +68,6 @@ --color-secondary-contrast-light: var(--color-secondary-50); - - - - - --color-secondary-contrast-600: var(--color-secondary-contrast-light); --color-secondary-contrast-700: var(--color-secondary-contrast-light); --color-secondary-contrast-800: var(--color-secondary-contrast-light); @@ -96,13 +87,6 @@ --color-tertiary-contrast-light: var(--color-tertiary-50); - - - - - - - --color-tertiary-contrast-800: var(--color-tertiary-contrast-light); --color-tertiary-contrast-900: var(--color-tertiary-contrast-light); --color-tertiary-contrast-950: var(--color-tertiary-contrast-light); @@ -120,13 +104,6 @@ --color-success-contrast-light: var(--color-success-50); - - - - - - - --color-success-contrast-800: var(--color-success-contrast-light); --color-success-contrast-900: var(--color-success-contrast-light); --color-success-contrast-950: var(--color-success-contrast-light); @@ -144,13 +121,6 @@ --color-warning-contrast-light: var(--color-warning-50); - - - - - - - --color-warning-contrast-800: var(--color-warning-contrast-light); --color-warning-contrast-900: var(--color-warning-contrast-light); --color-warning-contrast-950: var(--color-warning-contrast-light); @@ -168,9 +138,6 @@ --color-error-contrast-light: var(--color-error-50); - - - --color-error-contrast-400: var(--color-error-contrast-light); --color-error-contrast-500: var(--color-error-contrast-light); --color-error-contrast-600: var(--color-error-contrast-light); @@ -192,14 +159,8 @@ --color-surface-contrast-light: var(--color-surface-50); - - - - - - --color-surface-contrast-700: var(--color-surface-contrast-light); --color-surface-contrast-800: var(--color-surface-contrast-light); --color-surface-contrast-900: var(--color-surface-contrast-light); --color-surface-contrast-950: var(--color-surface-contrast-light); -} \ No newline at end of file +} diff --git a/src/ae-c-lci.css b/src/ae-c-lci.css index 921aab6a..8a6ff3f5 100644 --- a/src/ae-c-lci.css +++ b/src/ae-c-lci.css @@ -202,4 +202,4 @@ --color-surface-contrast-800: var(--color-surface-contrast-dark); --color-surface-contrast-900: var(--color-surface-contrast-light); --color-surface-contrast-950: var(--color-surface-contrast-light); -} \ No newline at end of file +} diff --git a/src/ae-osit-default.css b/src/ae-osit-default.css index 87fdaeb1..2001656c 100644 --- a/src/ae-osit-default.css +++ b/src/ae-osit-default.css @@ -202,4 +202,4 @@ --color-surface-contrast-800: var(--color-surface-contrast-light); --color-surface-contrast-900: var(--color-surface-contrast-light); --color-surface-contrast-950: var(--color-surface-contrast-light); -} \ No newline at end of file +} diff --git a/src/aeclci_v1.css b/src/aeclci_v1.css index eae30d0c..ac608b21 100644 --- a/src/aeclci_v1.css +++ b/src/aeclci_v1.css @@ -202,4 +202,4 @@ --color-surface-contrast-800: var(--color-surface-contrast-dark); --color-surface-contrast-900: var(--color-surface-contrast-light); --color-surface-contrast-950: var(--color-surface-contrast-light); -} \ No newline at end of file +} diff --git a/src/app.css b/src/app.css index 0cdcd0b6..106d71a4 100644 --- a/src/app.css +++ b/src/app.css @@ -1,7 +1,7 @@ @import 'tailwindcss'; -@import "@skeletonlabs/skeleton"; -@import "@skeletonlabs/skeleton/optional/presets"; +@import '@skeletonlabs/skeleton'; +@import '@skeletonlabs/skeleton/optional/presets'; /* Register Preset Themes */ /* @import '@skeletonlabs/skeleton/themes/{theme-name}'; */ @@ -23,18 +23,15 @@ @source '../node_modules/@skeletonlabs/skeleton-svelte/dist'; - /* Add your theme import for your theme: "osit-custom-theme" here */ /* @plugin '@tailwindcss/forms'; */ /* @plugin '@tailwindcss/typography'; */ - /* @import "tailwindcss/theme.css" layer(theme); */ /* @import "tailwindcss/preflight"; */ -@import "tailwindcss/utilities.css" layer(utilities); +@import 'tailwindcss/utilities.css' layer(utilities); /*@tailwind utilities;*/ - /* Register a Custom Themes */ /* Make sure to resolve the relative path. */ /* Note the .css extension is optional. */ @@ -45,40 +42,39 @@ /* https://www.skeleton.dev/docs/guides/cookbook/light-switch */ /* @custom-variant dark (&:where([data-mode="dark"], [data-mode="dark"] *)); */ - @layer base { - :root { - --background: 0 0% 100%; - --foreground: 224 71.4% 4.1%; - --muted: 220 14.3% 95.9%; - --muted-foreground: 220 8.9% 46.1%; - --popover: 0 0% 100%; - --popover-foreground: 224 71.4% 4.1%; - --card: 0 0% 100%; - --card-foreground: 224 71.4% 4.1%; - --border: 220 13% 91%; - --input: 220 13% 91%; - --primary: 220.9 39.3% 11%; - --primary-foreground: 210 20% 98%; - --secondary: 220 14.3% 95.9%; - --secondary-foreground: 220.9 39.3% 11%; - --accent: 220 14.3% 95.9%; - --accent-foreground: 220.9 39.3% 11%; - --destructive: 0 72.2% 50.6%; - --destructive-foreground: 210 20% 98%; - --ring: 224 71.4% 4.1%; - --radius: 0.5rem; - --sidebar-background: 0 0% 98%; - --sidebar-foreground: 240 5.3% 26.1%; - --sidebar-primary: 240 5.9% 10%; - --sidebar-primary-foreground: 0 0% 98%; - --sidebar-accent: 240 4.8% 95.9%; - --sidebar-accent-foreground: 240 5.9% 10%; - --sidebar-border: 220 13% 91%; - --sidebar-ring: 217.2 91.2% 59.8%; - } + :root { + --background: 0 0% 100%; + --foreground: 224 71.4% 4.1%; + --muted: 220 14.3% 95.9%; + --muted-foreground: 220 8.9% 46.1%; + --popover: 0 0% 100%; + --popover-foreground: 224 71.4% 4.1%; + --card: 0 0% 100%; + --card-foreground: 224 71.4% 4.1%; + --border: 220 13% 91%; + --input: 220 13% 91%; + --primary: 220.9 39.3% 11%; + --primary-foreground: 210 20% 98%; + --secondary: 220 14.3% 95.9%; + --secondary-foreground: 220.9 39.3% 11%; + --accent: 220 14.3% 95.9%; + --accent-foreground: 220.9 39.3% 11%; + --destructive: 0 72.2% 50.6%; + --destructive-foreground: 210 20% 98%; + --ring: 224 71.4% 4.1%; + --radius: 0.5rem; + --sidebar-background: 0 0% 98%; + --sidebar-foreground: 240 5.3% 26.1%; + --sidebar-primary: 240 5.9% 10%; + --sidebar-primary-foreground: 0 0% 98%; + --sidebar-accent: 240 4.8% 95.9%; + --sidebar-accent-foreground: 240 5.9% 10%; + --sidebar-border: 220 13% 91%; + --sidebar-ring: 217.2 91.2% 59.8%; + } - /* .dark { + /* .dark { --background: 224 71.4% 4.1%; --foreground: 210 20% 98%; --muted: 215 27.9% 16.9%; @@ -110,40 +106,37 @@ } @layer base { - * { - border-color: hsl(var(--border)); - } - body { - background-color: hsl(var(--background)); - color: hsl(var(--foreground)); - } + * { + border-color: hsl(var(--border)); + } + body { + background-color: hsl(var(--background)); + color: hsl(var(--foreground)); + } } - - - /* There are no more Tailwind layers. */ html, body { - @apply h-full overflow-hidden; + @apply h-full overflow-hidden; - /* font-family: 'Liberation Sans', sans-serif; */ - /* font-family: 'Noto Sans', sans-serif; */ + /* font-family: 'Liberation Sans', sans-serif; */ + /* font-family: 'Noto Sans', sans-serif; */ } html.super_access #appShell { - background-color: hsla(0, 100%, 50%, 0.5); + background-color: hsla(0, 100%, 50%, 0.5); } html.manager_access #appShell { - background-color: hsla(0, 50%, 75%, 0.5); + background-color: hsla(0, 50%, 75%, 0.5); } html.administrator_access #appShell { - background-color: hsla(40, 50%, 85%, 0.25); + background-color: hsla(40, 50%, 85%, 0.25); } html.trusted_access #appShell { - background-color: hsla(20, 50%, 85%, 0.25); + background-color: hsla(20, 50%, 85%, 0.25); } /* default theme */ @@ -157,17 +150,17 @@ html.trusted_access #appShell { /* modern theme */ @font-face { - font-family: 'Quicksand'; - src: url('/fonts/Quicksand.ttf'); - font-display: swap; + font-family: 'Quicksand'; + src: url('/fonts/Quicksand.ttf'); + font-display: swap; } /* :root [data-theme='modern'] { */ - /* --theme-rounded-base: 20px; +/* --theme-rounded-base: 20px; --theme-rounded-container: 4px; */ - /* --theme-font-family-base: 'Liberation Sans', sans-serif; */ - /* --theme-font-family-heading: 'Liberation Sans', sans-serif; */ +/* --theme-font-family-base: 'Liberation Sans', sans-serif; */ +/* --theme-font-family-heading: 'Liberation Sans', sans-serif; */ /* } */ /* Using Skeleton Tailwind Presets */ @@ -281,116 +274,114 @@ html.trusted_access #appShell { /* Buttons default to the tonal presets */ /* Buttons based on Skeleton Tailwind preset classes */ .ae_btn_neutral { - @apply preset-tonal hover:preset-outlined border transition-all; + @apply preset-tonal hover:preset-outlined border transition-all; } .ae_btn_primary { - @apply preset-tonal-primary border border-primary-500 transition-all; + @apply preset-tonal-primary border border-primary-500 transition-all; } .ae_btn_secondary { - @apply preset-tonal-secondary border border-secondary-500 transition-all; - /* hover:preset-filled-secondary-500 */ + @apply preset-tonal-secondary border border-secondary-500 transition-all; + /* hover:preset-filled-secondary-500 */ } .ae_btn_tertiary { - @apply preset-tonal-tertiary border border-tertiary-500 transition-all; + @apply preset-tonal-tertiary border border-tertiary-500 transition-all; } .ae_btn_success { - @apply preset-tonal-success border border-success-500 transition-all; + @apply preset-tonal-success border border-success-500 transition-all; } .ae_btn_warning { - @apply preset-tonal-warning border border-warning-500 text-warning-950-50 transition-all; + @apply preset-tonal-warning border border-warning-500 text-warning-950-50 transition-all; } .ae_btn_error { - @apply preset-tonal-error border border-error-500 transition-all; + @apply preset-tonal-error border border-error-500 transition-all; } .ae_btn_surface { - @apply preset-tonal-surface border border-surface-500 transition-all; + @apply preset-tonal-surface border border-surface-500 transition-all; } /* Buttons customized for Aether using Skeleton Tailwind preset classes */ .ae_btn_info { - @apply border text-cyan-950 dark:text-cyan-50 bg-cyan-50 dark:bg-cyan-950 border-cyan-100 dark:border-cyan-900 hover:bg-cyan-200 hover:dark:bg-cyan-800 transition-all; + @apply border text-cyan-950 dark:text-cyan-50 bg-cyan-50 dark:bg-cyan-950 border-cyan-100 dark:border-cyan-900 hover:bg-cyan-200 hover:dark:bg-cyan-800 transition-all; } /* Buttons are for filled and outlined presets */ .ae_btn_secondary_filled { - @apply preset-filled-secondary-200-800 border border-secondary-500 transition-all; - /* hover:preset-filled-secondary-500 */ + @apply preset-filled-secondary-200-800 border border-secondary-500 transition-all; + /* hover:preset-filled-secondary-500 */ } .ae_btn_secondary_outlined { - @apply preset-outlined-secondary-200-800 hover:preset-filled-secondary-400-600 text-secondary-950-50 transition-all; + @apply preset-outlined-secondary-200-800 hover:preset-filled-secondary-400-600 text-secondary-950-50 transition-all; } .ae_btn_success_filled { - @apply preset-filled-success-200-800 border border-success-500 transition-all; + @apply preset-filled-success-200-800 border border-success-500 transition-all; } .ae_btn_success_outlined { - @apply preset-outlined-success-200-800 hover:preset-filled-success-400-600 text-success-950-50 transition-all; + @apply preset-outlined-success-200-800 hover:preset-filled-success-400-600 text-success-950-50 transition-all; } .ae_btn_warning_filled { - @apply preset-filled-warning-200-800 border border-warning-500 transition-all; + @apply preset-filled-warning-200-800 border border-warning-500 transition-all; } .ae_btn_warning_outlined { - @apply preset-outlined-warning-200-800 hover:preset-filled-warning-400-600 text-warning-950-50 transition-all; + @apply preset-outlined-warning-200-800 hover:preset-filled-warning-400-600 text-warning-950-50 transition-all; } .ae_btn_surface_filled { - @apply preset-filled-surface-200-800 border border-surface-500 transition-all; + @apply preset-filled-surface-200-800 border border-surface-500 transition-all; } .ae_btn_surface_outlined { - @apply preset-outlined-surface-200-800 hover:preset-filled-surface-400-600 text-surface-950-50 transition-all; + @apply preset-outlined-surface-200-800 hover:preset-filled-surface-400-600 text-surface-950-50 transition-all; } .ae_btn_error_outlined { - @apply preset-outlined-error-200-800 hover:preset-filled-error-400-600 text-error-950-50 transition-all; + @apply preset-outlined-error-200-800 hover:preset-filled-error-400-600 text-error-950-50 transition-all; } .ae_btn_info_filled { - @apply border text-cyan-950 dark:text-cyan-50 bg-cyan-200 dark:bg-cyan-800 border-cyan-200 dark:border-cyan-800 transition-all; + @apply border text-cyan-950 dark:text-cyan-50 bg-cyan-200 dark:bg-cyan-800 border-cyan-200 dark:border-cyan-800 transition-all; } .ae_btn_info_outlined { - @apply border text-cyan-950 dark:text-cyan-50 bg-cyan-50 dark:bg-cyan-950 border-cyan-200 dark:border-cyan-800 transition-all; + @apply border text-cyan-950 dark:text-cyan-50 bg-cyan-50 dark:bg-cyan-950 border-cyan-200 dark:border-cyan-800 transition-all; } - /* Containers customized for Aether using Skeleton Tailwind preset classes */ .ae_container_system_menu { - @apply container; + @apply container; } .ae_container_system_options { - @apply container; + @apply container; } .ae_container_system_help { - @apply container; + @apply container; } .ae_container_module { - @apply container; - /* @apply container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8; */ + @apply container; + /* @apply container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8; */ } /* .ae_container_module_main { @apply container; } */ .ae_module_header { - /* LCI request 3a5997 */ - /* bg-gray-300 */ - @apply preset-tonal-surface rounded-md flex flex-col md:flex-row flex-wrap gap-0.25 items-center justify-between w-full max-w-7xl p-1 px-2; + /* LCI request 3a5997 */ + /* bg-gray-300 */ + @apply preset-tonal-surface rounded-md flex flex-col md:flex-row flex-wrap gap-0.25 items-center justify-between w-full max-w-7xl p-1 px-2; } [data-theme='AE_c_LCI'] .ae_module_header { - /* LCI request 3a5997 */ - /* bg-gray-300 */ - @apply preset-tonal-primary; + /* LCI request 3a5997 */ + /* bg-gray-300 */ + @apply preset-tonal-primary; } [data-theme='AE_c_LCI'] .ae_obj__event_presenter { - @apply preset-filled-success-500; - /* --color-success-500; */ + @apply preset-filled-success-500; + /* --color-success-500; */ } .ae_container_module_content { - @apply container; + @apply container; } .ae_container_module_menu { - @apply w-full max-w-7xl flex flex-col items-center justify-center gap-1 p-1 + @apply w-full max-w-7xl flex flex-col items-center justify-center gap-1 p-1 border rounded-md border-gray-200 dark:border-gray-800 hover:bg-gray-100 dark:hover:bg-gray-900 transition-all duration-700 hover:duration-300; } .ae_container_module_options { - @apply - text-cyan-950 dark:text-cyan-50 + @apply text-cyan-950 dark:text-cyan-50 bg-cyan-50 dark:bg-cyan-950 hover:bg-cyan-100 dark:hover:bg-cyan-900 border border-cyan-200 dark:border-cyan-800 hover:border-cyan-400 dark:hover:border-cyan-600 rounded-md @@ -400,53 +391,50 @@ html.trusted_access #appShell { transition-all; } .ae_container_module_help { - @apply - text-yellow-950 dark:text-yellow-50 + @apply text-yellow-950 dark:text-yellow-50 bg-yellow-50 dark:bg-yellow-950 hover:bg-yellow-100 dark:hover:bg-yellow-900 border border-yellow-200 dark:border-yellow-800 hover:border-yellow-400 dark:hover:border-yellow-600 rounded-md w-lg max-w-full p-2 transition-all; - /* bg-yellow-100 border border-yellow-400 p-2 rounded-md max-w-xl */ + /* bg-yellow-100 border border-yellow-400 p-2 rounded-md max-w-xl */ } .ae_container_actions { - @apply container preset-tonal-success border border-success-500 rounded-md flex flex-row items-center my-2 p-2; + @apply container preset-tonal-success border border-success-500 rounded-md flex flex-row items-center my-2 p-2; } .ae_container_results { - @apply container; + @apply container; } .ae_container_content { - @apply container; + @apply container; } .ae_container_content_header { - @apply container; + @apply container; } .ae_container_content_content { - @apply container; + @apply container; } .ae_container_content_footer { - @apply container; + @apply container; } .ae_container_alert { - @apply container; + @apply container; } .ae_container_help { - @apply - text-yellow-950 dark:text-yellow-50 + @apply text-yellow-950 dark:text-yellow-50 bg-yellow-50 dark:bg-yellow-950 hover:bg-yellow-100 dark:hover:bg-yellow-900 border border-yellow-200 dark:border-yellow-800 hover:border-yellow-400 dark:hover:border-yellow-600 rounded-md max-w-full p-2 transition-all; - /* bg-yellow-100 border border-yellow-400 p-2 rounded-md max-w-xl */ + /* bg-yellow-100 border border-yellow-400 p-2 rounded-md max-w-xl */ } .ae_container_info { - @apply - text-cyan-950 dark:text-cyan-50 + @apply text-cyan-950 dark:text-cyan-50 bg-cyan-50 dark:bg-cyan-950 hover:bg-cyan-100 dark:hover:bg-cyan-900 border border-cyan-200 dark:border-cyan-800 hover:border-cyan-400 dark:hover:border-cyan-600 rounded-md @@ -455,29 +443,28 @@ html.trusted_access #appShell { transition-all; } .ae_container_msg { - @apply container; + @apply container; } .ae_container_warning { - @apply container; + @apply container; } .ae_container_tag { - @apply container; + @apply container; } .ae_container_modal { - @apply container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8; + @apply container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8; } .ae_container_modal_header { - @apply container; + @apply container; } .ae_container_modal_content { - @apply container; + @apply container; } .ae_container_modal_footer { - @apply container; + @apply container; } - /* Standard Aether object properties: * - id * - name @@ -489,95 +476,89 @@ html.trusted_access #appShell { * - notes */ - - - .card-footer { - border-top: 1px solid hsla(0, 0%, 0%, 0.5); - margin-top: 1em; - padding-top: 1em; + border-top: 1px solid hsla(0, 0%, 0%, 0.5); + margin-top: 1em; + padding-top: 1em; - opacity: .5; + opacity: 0.5; } - /* Tailwind: This "fixes" Tailwind's default group button styles that do not seem to allow hiding buttons. */ -.btn-group a.hidden, .btn-group button.hidden { - display: none; +.btn-group a.hidden, +.btn-group button.hidden { + display: none; } - .ae_d_none { - display: none; + display: none; } - /* Allow content to scroll horizontal if too wide */ .ae_h_scrollfix { - max-width: 100%; - overflow-x: auto; + max-width: 100%; + overflow-x: auto; } /* These helps with the Skeleton Tailwind modal utility. */ .ae_modal_scrollfix { - /* Allow modal content to scroll if it's too long */ - overflow-y: auto; - max-height: 96vh; - /* max-height: 99%; */ - + /* Allow modal content to scroll if it's too long */ + overflow-y: auto; + max-height: 96vh; + /* max-height: 99%; */ } .ae_debug { - /* A darker pink outline */ - outline: thin dashed; - outline-color: hsla(0, 100%, 50%, 0.15); - /* A light pink background color */ - background-color: hsla(0, 100%, 50%, 0.15); + /* A darker pink outline */ + outline: thin dashed; + outline-color: hsla(0, 100%, 50%, 0.15); + /* A light pink background color */ + background-color: hsla(0, 100%, 50%, 0.15); } .ae_debug:hover { - /* A darker pink outline */ - outline-color: hsla(0, 100%, 50%, 0.50); - /* A light pink background color */ - background-color: hsla(0, 100%, 50%, 0.40); + /* A darker pink outline */ + outline-color: hsla(0, 100%, 50%, 0.5); + /* A light pink background color */ + background-color: hsla(0, 100%, 50%, 0.4); } - /* Deal with being in an iframe */ #appShell #shell-header.iframe { - display: none; + display: none; } #appShell #shell-footer.iframe { - display: none; + display: none; } -.iframe .module_header, .iframe .module_footer{ - display: none; +.iframe .module_header, +.iframe .module_footer { + display: none; } /* Remove the background from the body in all cases */ /* body[data-theme] { */ - /* background: none; */ - /* background-image: none; */ +/* background: none; */ +/* background-image: none; */ /* } */ /* Remove the background from the body if using iframes */ /* body[data-theme]:has(#page.iframe) { */ - /* background: none; */ - /* background-image: none; */ - /* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */ - /* background-size: cover; */ +/* background: none; */ +/* background-image: none; */ +/* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */ +/* background-size: cover; */ /* } */ main { - /* background: none; + /* background: none; background-color: hsla(0, 0%, 100%, 0.92); */ } -main>section { - background: none; - background-color: hsla(0, 0%, 100%, 0.92); - padding: .5em; +main > section { + background: none; + background-color: hsla(0, 0%, 100%, 0.92); + padding: 0.5em; } /* @media (min-width: 640px) { @@ -595,37 +576,36 @@ main>section { } */ .ae_sponsorships { - /* background: none; */ - /* background-color: hsla(0, 0%, 100%, 0.92); */ - /* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */ - /* background-size: cover; */ + /* background: none; */ + /* background-color: hsla(0, 0%, 100%, 0.92); */ + /* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */ + /* background-size: cover; */ } pre.pre_wrap { - white-space: pre-wrap; - word-break: normal; - word-wrap: normal; + white-space: pre-wrap; + word-break: normal; + word-wrap: normal; - border: none; + border: none; - max-width: 100%; - overflow-x: auto; + max-width: 100%; + overflow-x: auto; } - input.required { - /* border-right: solid medium var(--color-warning-500); */ - /* color: var(--color-warning-500); */ + /* border-right: solid medium var(--color-warning-500); */ + /* color: var(--color-warning-500); */ } input:required { - /* background-color: var(--alert-color-lightest); */ - /* border: solid 2px red; */ - /* outline: dashed thin var(--alert-color-lighter); */ + /* background-color: var(--alert-color-lightest); */ + /* border: solid 2px red; */ + /* outline: dashed thin var(--alert-color-lighter); */ - /* border-right: solid medium var(--alert-color-mid); */ - /* border-right: solid medium var(--warning-color-mid); */ - /* border-right: solid medium var(--error-color-mid); */ + /* border-right: solid medium var(--alert-color-mid); */ + /* border-right: solid medium var(--warning-color-mid); */ + /* border-right: solid medium var(--error-color-mid); */ } /* input:required:hover { background-color: var(--alert-color-lighter); @@ -643,22 +623,22 @@ input:required { } */ .input_required::after { - content: '*'; - color: rgb(var(--color-error-500) / 0.9); + content: '*'; + color: rgb(var(--color-error-500) / 0.9); - position: relative; - /* top: 0em; */ - left: .25em; + position: relative; + /* top: 0em; */ + left: 0.25em; } /* Make the group a flex row by default */ /* div.btn-group { */ - /* display: flex; */ - /* gap: 0; */ - /* flex-direction: row; */ - /* justify-content: space-around; */ - /* align-items: center; */ - /* margin: 0; +/* display: flex; */ +/* gap: 0; */ +/* flex-direction: row; */ +/* justify-content: space-around; */ +/* align-items: center; */ +/* margin: 0; padding: 0; */ /* } */ @@ -666,8 +646,8 @@ input:required { /* Make all button elements except for the fhe last button element not rounded on the right. */ /* These helps with the Skeleton (Tailwind?) button group element. */ .btn-group button { - border-radius: 0; - border: none; + border-radius: 0; + border: none; } /* .md:btn-group button, @@ -686,179 +666,172 @@ div.btn-group button:last-child { } */ .ae_obj_prop .label { - } .ae_obj_prop .value { - font-weight: bold; + font-weight: bold; } - .ae_md_hide { - /* outline: medium dashed green; */ - /* display: none; */ - + /* outline: medium dashed green; */ + /* display: none; */ } @media (max-width: 767px) { - .ae_md_hide { - /* outline: medium dashed red; */ - display: none; - } + .ae_md_hide { + /* outline: medium dashed red; */ + display: none; + } } @media (min-width: 768px) { - .ae_lg_hide { - /* outline: medium dashed blue; */ - display: none; - } + .ae_lg_hide { + /* outline: medium dashed blue; */ + display: none; + } } - - - /* Use the div.ae_quick_modal_container to block background clicks when using the section.ae_quick_popover. */ div.ae_quick_modal_container { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 100; - background-color: hsla(0, 0%, 0%, .5); + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 100; + background-color: hsla(0, 0%, 0%, 0.5); } /* The section.ae_quick_popover should be above the rest of the content and centered on the page. */ section.ae_quick_popover { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 100; - background-color: hsla(0, 0%, 100%, .95); - padding: 1rem; - border-radius: .5rem; - box-shadow: 0 0 1rem hsla(0, 0%, 0%, .5); + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 100; + background-color: hsla(0, 0%, 100%, 0.95); + padding: 1rem; + border-radius: 0.5rem; + box-shadow: 0 0 1rem hsla(0, 0%, 0%, 0.5); - min-height: 98%; - min-width: 98%; + min-height: 98%; + min-width: 98%; } section.ae_quick_popover_small { - position: fixed; - top: 1em; - left: 50%; - transform: translate(-50%, 0%); - z-index: 100; - background-color: hsla(0, 0%, 100%, .95); - padding: 1rem; - border-radius: .5rem; - box-shadow: 0 0 1rem hsla(0, 0%, 0%, .5); + position: fixed; + top: 1em; + left: 50%; + transform: translate(-50%, 0%); + z-index: 100; + background-color: hsla(0, 0%, 100%, 0.95); + padding: 1rem; + border-radius: 0.5rem; + box-shadow: 0 0 1rem hsla(0, 0%, 0%, 0.5); - min-height: 24rem; - max-height: 95%; - min-width: 50%; - max-width: 95%; + min-height: 24rem; + max-height: 95%; + min-width: 50%; + max-width: 95%; } - .fade_50 { - opacity: 0.5; + opacity: 0.5; } .fade_50:hover { - opacity: 1; + opacity: 1; } - .auth_view_only { - display: none; + display: none; } .ae_root--auth_access .auth_view_only { - display: initial; + display: initial; } - - img.qr_code { - /* outline: solid thin hsla(30, 100%, 50%, .1); */ - /* width: 1.50in; */ + /* outline: solid thin hsla(30, 100%, 50%, .1); */ + /* width: 1.50in; */ } img.qr_code:hover { - /* outline: solid thin green; */ - /* width: 2.50in; */ + /* outline: solid thin green; */ + /* width: 2.50in; */ } img.qr_code:focus { - /* outline: solid thin red; */ - /* width: 2.50in; */ + /* outline: solid thin red; */ + /* width: 2.50in; */ } - .dim { - opacity: 0.5; - color: hsla(0, 0%, 50%, .95); + opacity: 0.5; + color: hsla(0, 0%, 50%, 0.95); } .dim_warning { - opacity: 0.5; - /* color: hsla(0, 100%, 50%, .95); */ - /* background should be hash marks */ - background-image: repeating-linear-gradient(-45deg, hsla(0, 100%, 50%, .25), hsla(0, 100%, 50%, .25) 10px, transparent 10px, transparent 20px); + opacity: 0.5; + /* color: hsla(0, 100%, 50%, .95); */ + /* background should be hash marks */ + background-image: repeating-linear-gradient( + -45deg, + hsla(0, 100%, 50%, 0.25), + hsla(0, 100%, 50%, 0.25) 10px, + transparent 10px, + transparent 20px + ); } .alert { - /* background-color: hsla(0, 100%, 50%, .1); */ - outline: dashed thin hsla(0, 100%, 50%, .5); + /* background-color: hsla(0, 100%, 50%, .1); */ + outline: dashed thin hsla(0, 100%, 50%, 0.5); } - @media (max-width: 767px) { - .sk_header.hide_sm { - display: none; - } - .sk_header.show_sm { - display: initial; - } - .sk_header.show_md { - display: none; - } + .sk_header.hide_sm { + display: none; + } + .sk_header.show_sm { + display: initial; + } + .sk_header.show_md { + display: none; + } } @media (min-width: 768px) { - .sk_header.hide_md { - display: none; - } - .sk_header.show_md { - display: initial; - } - .sk_header.show_sm { - display: none; - } + .sk_header.hide_md { + display: none; + } + .sk_header.show_md { + display: initial; + } + .sk_header.show_sm { + display: none; + } } /* We need to reset many of the styles for the reset_css class. */ .reset_css p { - margin: .75em 0; + margin: 0.75em 0; } .reset_css ol { - list-style-type: decimal; + list-style-type: decimal; } .reset_css ul { - list-style-type: disc; + list-style-type: disc; } .reset_css li { - margin-left: 1.5em; + margin-left: 1.5em; } /* Reset anchor tags to the default color and underline. */ .reset_css a { - color: hsla(210, 100%, 50%, 1); - text-decoration: underline; + color: hsla(210, 100%, 50%, 1); + text-decoration: underline; } .reset_css a:hover { - color: hsla(210, 100%, 50%, .75); - text-decoration: none; + color: hsla(210, 100%, 50%, 0.75); + text-decoration: none; } - /* .ae_btn.btn-danger, .ae_btn.btn-info, .ae_btn.btn-warning { @@ -883,94 +856,86 @@ img.qr_code:focus { /* BEGIN: Overrides and fixes specific to Novi and IDAA */ .iframe .novi_btn { - border-radius: 60px; - /* border-color: hsla(0, 0%, 50%, .5); */ - /* border-color: hsla(0, 0%, 0%, .15); */ - - + border-radius: 60px; + /* border-color: hsla(0, 0%, 50%, .5); */ + /* border-color: hsla(0, 0%, 0%, .15); */ } .iframe .novi_m0 { - margin: 0; + margin: 0; } .iframe .novi_p0 { - padding: 0; + padding: 0; } .iframe .dark .novi_label { - color: white; + color: white; } .iframe .dark .novi_black { - color: black; + color: black; } .iframe .dark .novi_white { - color: white; + color: white; } .iframe .dark .novi_bg_black { - background-color: black; + background-color: black; } .iframe .dark .novi_bg_white { - background-color: white; + background-color: white; } .iframe .dark .novi_bg_gray { - background-color: hsla(0, 0%, 50%, 1); + background-color: hsla(0, 0%, 50%, 1); } .iframe .dark .novi_bg_light_gray { - background-color: hsla(0, 0%, 95%, 1); + background-color: hsla(0, 0%, 95%, 1); } .iframe .dark .novi_bg_dark_gray { - background-color: hsla(0, 0%, 20%, 1); + background-color: hsla(0, 0%, 20%, 1); } - - .iframe .novi_bg_light { - background-color: hsla(0, 0%, 0%, .15); - color: hsla(0, 0%, 20%, 1); + background-color: hsla(0, 0%, 0%, 0.15); + color: hsla(0, 0%, 20%, 1); } .iframe .novi_bg_dark { - background-color: hsla(0, 0%, 0%, .25); - color: hsla(0, 0%, 95%, 1); + background-color: hsla(0, 0%, 0%, 0.25); + color: hsla(0, 0%, 95%, 1); } - - .iframe .novi_margin_sm { - /* margin: 0.5em; */ + /* margin: 0.5em; */ } .iframe .novi_text_wrap { - /* white-space: normal; */ - white-space: pre-wrap; - word-break: break-word; + /* white-space: normal; */ + white-space: pre-wrap; + word-break: break-word; } /* END: Overrides and fixes specific to Novi and IDAA */ .iframe button.ae_normal, .iframe .btn.ae_normal { - /* font: normal 1em sans-serif; */ - font-size: 1rem; + /* font: normal 1em sans-serif; */ + font-size: 1rem; } .iframe button.ae_smaller, .iframe .btn.ae_smaller, .iframe button.novi_smaller, -.iframe .btn.novi_smaller -{ - font-size: 0.8rem; +.iframe .btn.novi_smaller { + font-size: 0.8rem; } .iframe button.ae_smallest, .iframe .btn.ae_smallest, .iframe button.novi_smallest, -.iframe .btn.novi_smallest -{ - font-size: 0.65rem; +.iframe .btn.novi_smallest { + font-size: 0.65rem; } diff --git a/src/app.html b/src/app.html index 290fdb5b..2ffb48ec 100644 --- a/src/app.html +++ b/src/app.html @@ -1,30 +1,43 @@ - + - - + + - - + + - + - - - - - + + + + + - + - + - %sveltekit.head% - - - - - -
%sveltekit.body%
- - + %sveltekit.head% + + + + +
%sveltekit.body%
+ diff --git a/src/hold_app.postcss b/src/hold_app.postcss deleted file mode 100644 index 75ec7c20..00000000 --- a/src/hold_app.postcss +++ /dev/null @@ -1,546 +0,0 @@ -@import "tailwindcss/preflight"; -@tailwind utilities; - -@layer base { - :root { - --background: 0 0% 100%; - --foreground: 224 71.4% 4.1%; - --muted: 220 14.3% 95.9%; - --muted-foreground: 220 8.9% 46.1%; - --popover: 0 0% 100%; - --popover-foreground: 224 71.4% 4.1%; - --card: 0 0% 100%; - --card-foreground: 224 71.4% 4.1%; - --border: 220 13% 91%; - --input: 220 13% 91%; - --primary: 220.9 39.3% 11%; - --primary-foreground: 210 20% 98%; - --secondary: 220 14.3% 95.9%; - --secondary-foreground: 220.9 39.3% 11%; - --accent: 220 14.3% 95.9%; - --accent-foreground: 220.9 39.3% 11%; - --destructive: 0 72.2% 50.6%; - --destructive-foreground: 210 20% 98%; - --ring: 224 71.4% 4.1%; - --radius: 0.5rem; - --sidebar-background: 0 0% 98%; - --sidebar-foreground: 240 5.3% 26.1%; - --sidebar-primary: 240 5.9% 10%; - --sidebar-primary-foreground: 0 0% 98%; - --sidebar-accent: 240 4.8% 95.9%; - --sidebar-accent-foreground: 240 5.9% 10%; - --sidebar-border: 220 13% 91%; - --sidebar-ring: 217.2 91.2% 59.8%; - } - - .dark { - --background: 224 71.4% 4.1%; - --foreground: 210 20% 98%; - --muted: 215 27.9% 16.9%; - --muted-foreground: 217.9 10.6% 64.9%; - --popover: 224 71.4% 4.1%; - --popover-foreground: 210 20% 98%; - --card: 224 71.4% 4.1%; - --card-foreground: 210 20% 98%; - --border: 215 27.9% 16.9%; - --input: 215 27.9% 16.9%; - --primary: 210 20% 98%; - --primary-foreground: 220.9 39.3% 11%; - --secondary: 215 27.9% 16.9%; - --secondary-foreground: 210 20% 98%; - --accent: 215 27.9% 16.9%; - --accent-foreground: 210 20% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 20% 98%; - --ring: 216 12.2% 83.9%; - --sidebar-background: 240 5.9% 10%; - --sidebar-foreground: 240 4.8% 95.9%; - --sidebar-primary: 224.3 76.3% 48%; - --sidebar-primary-foreground: 0 0% 100%; - --sidebar-accent: 240 3.7% 15.9%; - --sidebar-accent-foreground: 240 4.8% 95.9%; - --sidebar-border: 240 3.7% 15.9%; - --sidebar-ring: 217.2 91.2% 59.8%; - } -} - -@layer base { - * { - border-color: hsl(var(--border)); - } - body { - background-color: hsl(var(--background)); - color: hsl(var(--foreground)); - } -} - - - - -/* There are no more Tailwind layers. */ - -html, -body { - @apply h-full overflow-hidden; - - /* font-family: 'Liberation Sans', sans-serif; */ - /* font-family: 'Noto Sans', sans-serif; */ -} - -html.super_access #appShell { - background-color: hsla(0, 100%, 50%, 0.5); -} - -html.manager_access #appShell { - background-color: hsla(0, 50%, 75%, 0.5); -} -html.administrator_access #appShell { - background-color: hsla(40, 50%, 85%, 0.25); -} -html.trusted_access #appShell { - background-color: hsla(20, 50%, 85%, 0.25); -} - -/* default theme */ -/* @font-face { - font-family: 'Liberation Sans', sans-serif; - font-family: 'Noto Sans', sans-serif; - src: url('/fonts/liberation/LiberationSans-Regular.ttf'); - src: url('/fonts/noto/NotoSans-Regular.ttf'); - font-display: swap; -} */ - -/* modern theme */ -@font-face { - font-family: 'Quicksand'; - src: url('/fonts/Quicksand.ttf'); - font-display: swap; -} - -/* :root [data-theme='modern'] { */ - /* --theme-rounded-base: 20px; - --theme-rounded-container: 4px; */ - - /* --theme-font-family-base: 'Liberation Sans', sans-serif; */ - /* --theme-font-family-heading: 'Liberation Sans', sans-serif; */ -/* } */ - -.card-footer { - border-top: 1px solid hsla(0, 0%, 0%, 0.5); - margin-top: 1em; - padding-top: 1em; - - opacity: .5; -} - - -/* Tailwind: This "fixes" Tailwind's default group button styles that do not seem to allow hiding buttons. */ -.btn-group a.hidden, .btn-group button.hidden { - display: none; -} - - -.ae_d_none { - display: none; -} - - -/* Allow content to scroll horizontal if too wide */ -.ae_h_scrollfix { - max-width: 100%; - overflow-x: auto; -} - -/* These helps with the Skeleton Tailwind modal utility. */ -.ae_modal_scrollfix { - /* Allow modal content to scroll if it's too long */ - overflow-y: auto; - max-height: 96vh; - /* max-height: 99%; */ - -} - -.ae_debug { - /* A darker pink outline */ - outline: thin dashed; - outline-color: hsla(0, 100%, 50%, 0.15); - /* A light pink background color */ - background-color: hsla(0, 100%, 50%, 0.15); -} -.ae_debug:hover { - /* A darker pink outline */ - outline-color: hsla(0, 100%, 50%, 0.50); - /* A light pink background color */ - background-color: hsla(0, 100%, 50%, 0.40); -} - - -/* Deal with being in an iframe */ -#appShell #shell-header.iframe { - display: none; -} - -#appShell #shell-footer.iframe { - display: none; -} - -/* Remove the background from the body in all cases */ -/* body[data-theme] { */ - /* background: none; */ - /* background-image: none; */ -/* } */ - -/* Remove the background from the body if using iframes */ -/* body[data-theme]:has(#page.iframe) { */ - /* background: none; */ - /* background-image: none; */ - /* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */ - /* background-size: cover; */ -/* } */ - -main { - /* background: none; - background-color: hsla(0, 0%, 100%, 0.92); */ -} - -main>section { - background: none; - background-color: hsla(0, 0%, 100%, 0.92); - padding: .5em; -} - -/* @media (min-width: 640px) { - main>div, main>section { - padding: 0; - max-width: 100%; - } -} */ - -/* @media (min-width: 768px) { - main>div, main>section { - padding: 0; - max-width: 100%; - } -} */ - -.ae_sponsorships { - /* background: none; */ - /* background-color: hsla(0, 0%, 100%, 0.92); */ - /* background-image: url('https://static.oneskyit.com/c/CHOW/images/CHOW_2024_yellow_background.png'); */ - /* background-size: cover; */ -} - -pre.pre_wrap { - white-space: pre-wrap; - word-break: normal; - word-wrap: normal; - - border: none; - - max-width: 100%; - overflow-x: auto; -} - - -input.required { - /* border-right: solid medium var(--color-warning-500); */ - /* color: var(--color-warning-500); */ -} - -input:required { - /* background-color: var(--alert-color-lightest); */ - /* border: solid 2px red; */ - /* outline: dashed thin var(--alert-color-lighter); */ - - /* border-right: solid medium var(--alert-color-mid); */ - /* border-right: solid medium var(--warning-color-mid); */ - /* border-right: solid medium var(--error-color-mid); */ -} -/* input:required:hover { - background-color: var(--alert-color-lighter); - border-right: solid thick var(--alert-color-darker); -} */ - -/* input:required::before { - display: block; - - content: '*'; - color: var(--warning-color-darker); - - top: 5px; - left: 5px; -} */ - -.input_required::after { - content: '*'; - color: rgb(var(--color-error-500) / 0.9); - - position: relative; - /* top: 0em; */ - left: .25em; -} - -/* Make the group a flex row by default */ -/* div.btn-group { */ - /* display: flex; */ - /* gap: 0; */ - /* flex-direction: row; */ - /* justify-content: space-around; */ - /* align-items: center; */ - /* margin: 0; - padding: 0; */ - -/* } */ -/* Make all button elements except for the the first button element not rounded on the left. */ -/* Make all button elements except for the fhe last button element not rounded on the right. */ -/* These helps with the Skeleton (Tailwind?) button group element. */ -.btn-group button { - border-radius: 0; - border: none; -} - -/* .md:btn-group button, -.lg:btn-group button { - border-radius: 0; - border: none; -} */ - -/* div.btn-group button:first-child { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; -} -div.btn-group button:last-child { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; -} */ - -.ae_obj_prop .label { - -} - -.ae_obj_prop .value { - font-weight: bold; -} - - -.ae_md_hide { - /* outline: medium dashed green; */ - /* display: none; */ - -} - -@media (max-width: 767px) { - .ae_md_hide { - /* outline: medium dashed red; */ - display: none; - } -} -@media (min-width: 768px) { - .ae_lg_hide { - /* outline: medium dashed blue; */ - display: none; - } -} - - - - -/* Use the div.ae_quick_modal_container to block background clicks when using the section.ae_quick_popover. */ -div.ae_quick_modal_container { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 100; - background-color: hsla(0, 0%, 0%, .5); -} - -/* The section.ae_quick_popover should be above the rest of the content and centered on the page. */ -section.ae_quick_popover { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 100; - background-color: hsla(0, 0%, 100%, .95); - padding: 1rem; - border-radius: .5rem; - box-shadow: 0 0 1rem hsla(0, 0%, 0%, .5); - - min-height: 98%; - min-width: 98%; -} - -section.ae_quick_popover_small { - position: fixed; - top: 1em; - left: 50%; - transform: translate(-50%, 0%); - z-index: 100; - background-color: hsla(0, 0%, 100%, .95); - padding: 1rem; - border-radius: .5rem; - box-shadow: 0 0 1rem hsla(0, 0%, 0%, .5); - - min-height: 24rem; - max-height: 95%; - min-width: 50%; - max-width: 95%; -} - - -.fade_50 { - opacity: 0.5; -} -.fade_50:hover { - opacity: 1; -} - - -.auth_view_only { - display: none; -} -.ae_root--auth_access .auth_view_only { - display: initial; -} - - - -img.qr_code { - /* outline: solid thin hsla(30, 100%, 50%, .1); */ - /* width: 1.50in; */ -} - -img.qr_code:hover { - /* outline: solid thin green; */ - /* width: 2.50in; */ -} - -img.qr_code:focus { - /* outline: solid thin red; */ - /* width: 2.50in; */ -} - - -.dim { - opacity: 0.5; - color: hsla(0, 0%, 50%, .95); -} -.dim_warning { - opacity: 0.5; - /* color: hsla(0, 100%, 50%, .95); */ - /* background should be hash marks */ - background-image: repeating-linear-gradient(-45deg, hsla(0, 100%, 50%, .25), hsla(0, 100%, 50%, .25) 10px, transparent 10px, transparent 20px); -} - - -@media (max-width: 767px) { - .sk_header.hide_sm { - display: none; - } - .sk_header.show_sm { - display: initial; - } - .sk_header.show_md { - display: none; - } -} - -@media (min-width: 768px) { - .sk_header.hide_md { - display: none; - } - .sk_header.show_md { - display: initial; - } - .sk_header.show_sm { - display: none; - } -} - -/* We need to reset many of the styles for the reset_css class. */ -.reset_css p { - margin: .75em 0; -} -.reset_css ol { - list-style-type: decimal; -} -.reset_css ul { - list-style-type: disc; -} -.reset_css li { - margin-left: 1.5em; -} -/* Reset anchor tags to the default color and underline. */ -.reset_css a { - color: hsla(210, 100%, 50%, 1); - text-decoration: underline; -} -.reset_css a:hover { - color: hsla(210, 100%, 50%, .75); - text-decoration: none; -} - - -/* .ae_btn.btn-danger, -.ae_btn.btn-info, -.ae_btn.btn-warning { - border-radius: 60px; -} */ - -/* .ae_margin_xs { - margin: 0.25em; -} -.ae_margin_sm { - margin: 0.5em; -} -.ae_margin_md { - margin: 0.75em; -} -.ae_margin_lg { - margin: 1em; -} -.ae_margin_lg { - margin: 1.25em; -} */ - -/* BEGIN: Overrides and fixes specific to Novi and IDAA */ -.iframe .novi_btn { - border-radius: 60px; - border-color: hsla(0, 0%, 50%, .5); -} - -.iframe .novi_margin_sm { - /* margin: 0.5em; */ -} - -.iframe .novi_text_wrap { - /* white-space: normal; */ - white-space: pre-wrap; - word-break: break-word; -} - -/* END: Overrides and fixes specific to Novi and IDAA */ - -.iframe button.ae_normal, -.iframe .btn.ae_normal { - /* font: normal 1em sans-serif; */ - font-size: 1rem; -} - -.iframe button.ae_smaller, -.iframe .btn.ae_smaller, -.iframe button.novi_smaller, -.iframe .btn.novi_smaller -{ - font-size: 0.8rem; -} - -.iframe button.ae_smallest, -.iframe .btn.ae_smallest, -.iframe button.novi_smallest, -.iframe .btn.novi_smallest -{ - font-size: 0.65rem; -} diff --git a/src/lib/ae_api/api_delete_object.ts b/src/lib/ae_api/api_delete_object.ts index 9d5cc64b..b5d6f3d2 100644 --- a/src/lib/ae_api/api_delete_object.ts +++ b/src/lib/ae_api/api_delete_object.ts @@ -1,133 +1,130 @@ // import axios from 'axios'; // Updated 2024-05-23 -export let delete_object = async function delete_object( - { - api_cfg = null, - endpoint = '', - params = {}, - data = {}, - return_meta = false, - log_lvl = 0, - retry_count = 5 // Number of retry attempts - }: { - api_cfg: any, - endpoint: string, - params?: any, - data?: any, - return_meta?: boolean, - log_lvl?: number, - retry_count?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_object() *** Endpoint: ${endpoint}`); - console.log('Params:', params); - if (log_lvl > 1) { - console.log('Data:', data); - } - } +export const delete_object = async function delete_object({ + api_cfg = null, + endpoint = '', + params = {}, + data = {}, + return_meta = false, + log_lvl = 0, + retry_count = 5 // Number of retry attempts +}: { + api_cfg: any; + endpoint: string; + params?: any; + data?: any; + return_meta?: boolean; + log_lvl?: number; + retry_count?: number; +}) { + if (log_lvl) { + console.log(`*** delete_object() *** Endpoint: ${endpoint}`); + console.log('Params:', params); + if (log_lvl > 1) { + console.log('Data:', data); + } + } - if (!api_cfg) { - console.error('No API Config was provided. Returning false.'); - return false; - } + if (!api_cfg) { + console.error('No API Config was provided. Returning false.'); + return false; + } - // Construct the URL with query parameters - const url = new URL(endpoint, api_cfg['base_url']); - Object.keys(params).forEach(key => url.searchParams.append(key, params[key])); + // Construct the URL with query parameters + const url = new URL(endpoint, api_cfg['base_url']); + Object.keys(params).forEach((key) => url.searchParams.append(key, params[key])); - // Clean the headers - let headers_cleaned: Record = {}; - for (const prop in api_cfg['headers']) { - let prop_cleaned = prop.replaceAll('_', '-'); - headers_cleaned[prop_cleaned] = api_cfg['headers'][prop]; - } + // Clean the headers + const headers_cleaned: Record = {}; + for (const prop in api_cfg['headers']) { + const prop_cleaned = prop.replaceAll('_', '-'); + headers_cleaned[prop_cleaned] = api_cfg['headers'][prop]; + } - if (log_lvl > 1) { - console.log('Cleaned Headers:', headers_cleaned); - } + if (log_lvl > 1) { + console.log('Cleaned Headers:', headers_cleaned); + } - const fetchOptions: RequestInit = { - method: 'DELETE', - headers: { - ...headers_cleaned, - 'Content-Type': 'application/json' - }, - body: JSON.stringify(data) - }; + const fetchOptions: RequestInit = { + method: 'DELETE', + headers: { + ...headers_cleaned, + 'Content-Type': 'application/json' + }, + body: JSON.stringify(data) + }; - if (log_lvl > 1) { - console.log('Fetch Options:', fetchOptions); - } + if (log_lvl > 1) { + console.log('Fetch Options:', fetchOptions); + } - for (let attempt = 1; attempt <= retry_count; attempt++) { - try { - const response = await fetch(url.toString(), fetchOptions); + for (let attempt = 1; attempt <= retry_count; attempt++) { + try { + const response = await fetch(url.toString(), fetchOptions); - if (log_lvl) { - console.log(`Response: status=${response.status} attempt=${attempt}`); - } + if (log_lvl) { + console.log(`Response: status=${response.status} attempt=${attempt}`); + } - if (!response.ok) { - if (response.status === 404) { - console.warn('404 Not Found. Returning null.'); - return null; // Returning null since there were no results - } - throw new Error(`HTTP error! status: ${response.status}`); - } + if (!response.ok) { + if (response.status === 404) { + console.warn('404 Not Found. Returning null.'); + return null; // Returning null since there were no results + } + throw new Error(`HTTP error! status: ${response.status}`); + } - const json = await response.json(); + const json = await response.json(); - if (log_lvl > 1) { - console.log('Response JSON:', json); - } + if (log_lvl > 1) { + console.log('Response JSON:', json); + } - // Return the response data or metadata - return return_meta ? json : json.data; - } catch (error) { - console.error(`API DELETE error on attempt ${attempt}:`, error); + // Return the response data or metadata + return return_meta ? json : json.data; + } catch (error) { + console.error(`API DELETE error on attempt ${attempt}:`, error); - // If this is the last attempt, return false - if (attempt === retry_count) { - console.error('Max retry attempts reached. Returning false.'); - return false; - } + // If this is the last attempt, return false + if (attempt === retry_count) { + console.error('Max retry attempts reached. Returning false.'); + return false; + } - // Log retry information - if (log_lvl) { - console.log(`Retrying... (${attempt}/${retry_count})`); - } - } - } + // Log retry information + if (log_lvl) { + console.log(`Retrying... (${attempt}/${retry_count})`); + } + } + } + // https://stackoverflow.com/questions/51069552/axios-delete-request-with-body-and-headers - // https://stackoverflow.com/questions/51069552/axios-delete-request-with-body-and-headers + // let axios_api = axios.create({ + // baseURL: api_cfg['base_url'], + // // timeout: 2000, + // /* other custom settings */ + // }); + // axios_api.defaults.headers = api_cfg['headers']; - // let axios_api = axios.create({ - // baseURL: api_cfg['base_url'], - // // timeout: 2000, - // /* other custom settings */ - // }); - // axios_api.defaults.headers = api_cfg['headers']; + // //OLD: axios_api.delete(endpoint, { 'data': data }) + // let response_data = await axios_api.delete(endpoint, { params: params, 'data': data }) + // .then(function (response) { + // console.log(response.data); + // return response.data; + // }) + // .catch(function (error: any) { + // if (error.response && error.response.status === 404) { + // return null; // Returning null since there were no results + // } + // console.log(error); + // return false; // Returning false since something may have gone wrong. Also more in line with what the API returns. + // // return error; + // }); - // //OLD: axios_api.delete(endpoint, { 'data': data }) - // let response_data = await axios_api.delete(endpoint, { params: params, 'data': data }) - // .then(function (response) { - // console.log(response.data); - // return response.data; - // }) - // .catch(function (error: any) { - // if (error.response && error.response.status === 404) { - // return null; // Returning null since there were no results - // } - // console.log(error); - // return false; // Returning false since something may have gone wrong. Also more in line with what the API returns. - // // return error; - // }); - - // if (log_lvl > 1) { - // console.log(response_data); - // } - // return response_data; -} + // if (log_lvl > 1) { + // console.log(response_data); + // } + // return response_data; +}; diff --git a/src/lib/ae_api/api_get__crud_obj_id.ts b/src/lib/ae_api/api_get__crud_obj_id.ts index c7022af7..3ad74174 100644 --- a/src/lib/ae_api/api_get__crud_obj_id.ts +++ b/src/lib/ae_api/api_get__crud_obj_id.ts @@ -2,174 +2,171 @@ import type { key_val } from '$lib/stores/ae_stores'; import { get_object } from './api_get_object'; // Updated 2023-12-01 -export async function get_ae_obj_id_crud( - { - api_cfg, - no_account_id = false, - obj_type, - obj_id, - use_alt_table = false, - use_alt_base = false, - inc = {}, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 999999, - offset = 0, - data = {}, - // key, - // jwt = null, - headers = {}, - params = {}, - timeout = 25000, - return_meta = false, - log_lvl = 0 - }: { - api_cfg: any, - no_account_id?: boolean, - obj_type: string, - obj_id: string, - use_alt_table?: boolean, - use_alt_base?: boolean, - inc?: any, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - data?: any, - // key: string, - // jwt?: string, - headers?: any, - params?: key_val, - timeout?: number, - return_meta?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log('*** get_ae_obj_id_crud() ***'); - } +export async function get_ae_obj_id_crud({ + api_cfg, + no_account_id = false, + obj_type, + obj_id, + use_alt_table = false, + use_alt_base = false, + inc = {}, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 999999, + offset = 0, + data = {}, + // key, + // jwt = null, + headers = {}, + params = {}, + timeout = 25000, + return_meta = false, + log_lvl = 0 +}: { + api_cfg: any; + no_account_id?: boolean; + obj_type: string; + obj_id: string; + use_alt_table?: boolean; + use_alt_base?: boolean; + inc?: any; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + data?: any; + // key: string, + // jwt?: string, + headers?: any; + params?: key_val; + timeout?: number; + return_meta?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log('*** get_ae_obj_id_crud() ***'); + } - // data = {}; - // data['super_key'] = key; - // data['jwt'] = jwt; - // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST + // data = {}; + // data['super_key'] = key; + // data['jwt'] = jwt; + // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST - let endpoint = ''; - if (obj_type == 'account') { - endpoint = `/crud/account/${obj_id}`; - } else if (obj_type == 'address') { - endpoint = `/crud/address/${obj_id}`; - } else if (obj_type == 'archive') { - endpoint = `/crud/archive/${obj_id}`; - } else if (obj_type == 'archive_content') { - endpoint = `/crud/archive/content/${obj_id}`; - } else if (obj_type == 'contact') { - endpoint = `/crud/contact/${obj_id}`; - } else if (obj_type == 'data_store') { - endpoint = `/crud/data_store/${obj_id}`; - } else if (obj_type == 'event') { - endpoint = `/crud/event/${obj_id}`; - } else if (obj_type == 'event_abstract') { - endpoint = `/crud/event/abstract/${obj_id}`; - } else if (obj_type == 'event_badge') { - endpoint = `/crud/event/badge/${obj_id}`; - } else if (obj_type == 'event_device') { - endpoint = `/crud/event/device/${obj_id}`; - } else if (obj_type == 'event_exhibit') { - endpoint = `/crud/event/exhibit/${obj_id}`; - } else if (obj_type == 'event_exhibit_tracking') { - endpoint = `/crud/event/exhibit/tracking/${obj_id}`; - } else if (obj_type == 'event_file') { - endpoint = `/crud/event/file/${obj_id}`; - } else if (obj_type == 'event_location') { - endpoint = `/crud/event/location/${obj_id}`; - } else if (obj_type == 'event_person') { - endpoint = `/crud/event/person/${obj_id}`; - } else if (obj_type == 'event_presentation') { - endpoint = `/crud/event/presentation/${obj_id}`; - } else if (obj_type == 'event_presenter') { - endpoint = `/crud/event/presenter/${obj_id}`; - } else if (obj_type == 'event_session') { - endpoint = `/crud/event/session/${obj_id}`; - } else if (obj_type == 'event_track') { - endpoint = `/crud/event/track/${obj_id}`; - } else if (obj_type == 'grant') { - endpoint = `/crud/grant/${obj_id}`; - } else if (obj_type == 'hosted_file') { - endpoint = `/crud/hosted_file/${obj_id}`; - } else if (obj_type == 'journal') { - endpoint = `/crud/journal/${obj_id}`; - } else if (obj_type == 'journal_entry') { - endpoint = `/crud/journal/entry/${obj_id}`; - } else if (obj_type == 'order') { - endpoint = `/crud/order/${obj_id}`; - } else if (obj_type == 'order_line') { - endpoint = `/crud/order/line/${obj_id}`; - } else if (obj_type == 'page') { - endpoint = `/crud/page/${obj_id}`; - } else if (obj_type == 'person') { - endpoint = `/crud/person/${obj_id}`; - } else if (obj_type == 'post') { - endpoint = `/crud/post/${obj_id}`; - } else if (obj_type == 'post_comment') { - endpoint = `/crud/post/comment/${obj_id}`; - } else if (obj_type == 'site') { - endpoint = `/crud/site/${obj_id}`; - } else if (obj_type == 'site_domain') { - endpoint = `/crud/site/domain/${obj_id}`; - } else if (obj_type == 'sponsorship_cfg') { - endpoint = `/crud/sponsorship/cfg/${obj_id}`; - } else if (obj_type == 'sponsorship') { - endpoint = `/crud/sponsorship/${obj_id}`; - // } else if (obj_type == 'user') { - // endpoint = `/crud/user/${obj_id}`; - } else { - console.log(`Unknown object type: ${obj_type}`); - return false; - } - if (log_lvl) { - console.log('Endpoint:', endpoint); - } + let endpoint = ''; + if (obj_type == 'account') { + endpoint = `/crud/account/${obj_id}`; + } else if (obj_type == 'address') { + endpoint = `/crud/address/${obj_id}`; + } else if (obj_type == 'archive') { + endpoint = `/crud/archive/${obj_id}`; + } else if (obj_type == 'archive_content') { + endpoint = `/crud/archive/content/${obj_id}`; + } else if (obj_type == 'contact') { + endpoint = `/crud/contact/${obj_id}`; + } else if (obj_type == 'data_store') { + endpoint = `/crud/data_store/${obj_id}`; + } else if (obj_type == 'event') { + endpoint = `/crud/event/${obj_id}`; + } else if (obj_type == 'event_abstract') { + endpoint = `/crud/event/abstract/${obj_id}`; + } else if (obj_type == 'event_badge') { + endpoint = `/crud/event/badge/${obj_id}`; + } else if (obj_type == 'event_device') { + endpoint = `/crud/event/device/${obj_id}`; + } else if (obj_type == 'event_exhibit') { + endpoint = `/crud/event/exhibit/${obj_id}`; + } else if (obj_type == 'event_exhibit_tracking') { + endpoint = `/crud/event/exhibit/tracking/${obj_id}`; + } else if (obj_type == 'event_file') { + endpoint = `/crud/event/file/${obj_id}`; + } else if (obj_type == 'event_location') { + endpoint = `/crud/event/location/${obj_id}`; + } else if (obj_type == 'event_person') { + endpoint = `/crud/event/person/${obj_id}`; + } else if (obj_type == 'event_presentation') { + endpoint = `/crud/event/presentation/${obj_id}`; + } else if (obj_type == 'event_presenter') { + endpoint = `/crud/event/presenter/${obj_id}`; + } else if (obj_type == 'event_session') { + endpoint = `/crud/event/session/${obj_id}`; + } else if (obj_type == 'event_track') { + endpoint = `/crud/event/track/${obj_id}`; + } else if (obj_type == 'grant') { + endpoint = `/crud/grant/${obj_id}`; + } else if (obj_type == 'hosted_file') { + endpoint = `/crud/hosted_file/${obj_id}`; + } else if (obj_type == 'journal') { + endpoint = `/crud/journal/${obj_id}`; + } else if (obj_type == 'journal_entry') { + endpoint = `/crud/journal/entry/${obj_id}`; + } else if (obj_type == 'order') { + endpoint = `/crud/order/${obj_id}`; + } else if (obj_type == 'order_line') { + endpoint = `/crud/order/line/${obj_id}`; + } else if (obj_type == 'page') { + endpoint = `/crud/page/${obj_id}`; + } else if (obj_type == 'person') { + endpoint = `/crud/person/${obj_id}`; + } else if (obj_type == 'post') { + endpoint = `/crud/post/${obj_id}`; + } else if (obj_type == 'post_comment') { + endpoint = `/crud/post/comment/${obj_id}`; + } else if (obj_type == 'site') { + endpoint = `/crud/site/${obj_id}`; + } else if (obj_type == 'site_domain') { + endpoint = `/crud/site/domain/${obj_id}`; + } else if (obj_type == 'sponsorship_cfg') { + endpoint = `/crud/sponsorship/cfg/${obj_id}`; + } else if (obj_type == 'sponsorship') { + endpoint = `/crud/sponsorship/${obj_id}`; + // } else if (obj_type == 'user') { + // endpoint = `/crud/user/${obj_id}`; + } else { + console.log(`Unknown object type: ${obj_type}`); + return false; + } + if (log_lvl) { + console.log('Endpoint:', endpoint); + } - params['use_alt_table'] = use_alt_table; - params['use_alt_base'] = use_alt_base; + params['use_alt_table'] = use_alt_table; + params['use_alt_base'] = use_alt_base; - if (log_lvl) { - console.log('Params:', params); - } + if (log_lvl) { + console.log('Params:', params); + } - if (no_account_id) { - headers['x-no-account-id'] = 'Nothing to See Here'; - delete headers['x-account-id']; - delete api_cfg['headers']['x-account-id']; - // headers['x-account-id'] = null; - // headers['x-account-id'] = '_XY7DXtc9Mxx'; - // params['x_no_account_id_token'] = 'Nothing to See Here'; + if (no_account_id) { + headers['x-no-account-id'] = 'Nothing to See Here'; + delete headers['x-account-id']; + delete api_cfg['headers']['x-account-id']; + // headers['x-account-id'] = null; + // headers['x-account-id'] = '_XY7DXtc9Mxx'; + // params['x_no_account_id_token'] = 'Nothing to See Here'; - // Remove the x-account-id header - // if (headers['x-account-id']) { - // delete headers['x-account-id']; - // } + // Remove the x-account-id header + // if (headers['x-account-id']) { + // delete headers['x-account-id']; + // } - // headers['x-account-id'] = null; - // headers['x-no-account-id-token'] = 'Nothing to See Here'; // get_object() will fix the underscores to dashes - } + // headers['x-account-id'] = null; + // headers['x-no-account-id-token'] = 'Nothing to See Here'; // get_object() will fix the underscores to dashes + } - let object_obj_get_promise = await get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - headers: headers, - params: params, - timeout: timeout, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('API GET CRUD object ID request failed.', error); - }); + const object_obj_get_promise = await get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + headers: headers, + params: params, + timeout: timeout, + log_lvl: log_lvl + }).catch(function (error: any) { + console.log('API GET CRUD object ID request failed.', error); + }); - if (log_lvl > 1) { - console.log('GET Object result =', object_obj_get_promise); - } + if (log_lvl > 1) { + console.log('GET Object result =', object_obj_get_promise); + } - return object_obj_get_promise; -} \ No newline at end of file + return object_obj_get_promise; +} diff --git a/src/lib/ae_api/api_get__crud_obj_li_v1.ts b/src/lib/ae_api/api_get__crud_obj_li_v1.ts index 71dec90c..29acb609 100644 --- a/src/lib/ae_api/api_get__crud_obj_li_v1.ts +++ b/src/lib/ae_api/api_get__crud_obj_li_v1.ts @@ -3,227 +3,227 @@ import { get_object } from './api_get_object'; // The lookup "obj_type" should broken out into a separate function. - 2024-08-07 // Updated 2023-11-15 -export async function get_ae_obj_li_for_obj_id_crud( - { - api_cfg, - obj_type, - for_obj_type, - for_obj_id, // NOTE: Changed 2023-12-06 to no longer required - use_alt_table = false, - use_alt_base = false, - // inc = {}, - enabled = 'enabled', - hidden = 'not_hidden', - order_by_li = null, - limit = 999999, - offset = 0, - // key, - // jwt = null, - headers = {}, - params_json = null, // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the API endpoint. Example: { "fulltext_search": { "default_qry_str": "Search string for default", "address_default_qry_str": "Search string for address", "contact_1_default_qry_str": "Search string for contact_1" } } - // json_obj = null, // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the search endpoint. - params = {}, - return_meta = false, - log_lvl = 0 - }: { - api_cfg: any, - obj_type: string, - for_obj_type: null|string, - for_obj_id?: string, - use_alt_table?: boolean, - use_alt_base?: boolean, - // inc?: key_val - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - order_by_li?: any, - limit?: number, - offset?: number, - // key: string, - // jwt?: string, - headers?: any, - params_json?: any, - // json_obj?: any, - params?: key_val, - return_meta?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** get_ae_obj_li_for_obj_id_crud() *** [${obj_type}]`); - } +export async function get_ae_obj_li_for_obj_id_crud({ + api_cfg, + obj_type, + for_obj_type, + for_obj_id, // NOTE: Changed 2023-12-06 to no longer required + use_alt_table = false, + use_alt_base = false, + // inc = {}, + enabled = 'enabled', + hidden = 'not_hidden', + order_by_li = null, + limit = 999999, + offset = 0, + // key, + // jwt = null, + headers = {}, + params_json = null, // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the API endpoint. Example: { "fulltext_search": { "default_qry_str": "Search string for default", "address_default_qry_str": "Search string for address", "contact_1_default_qry_str": "Search string for contact_1" } } + // json_obj = null, // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the search endpoint. + params = {}, + return_meta = false, + log_lvl = 0 +}: { + api_cfg: any; + obj_type: string; + for_obj_type: null | string; + for_obj_id?: string; + use_alt_table?: boolean; + use_alt_base?: boolean; + // inc?: key_val + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + order_by_li?: any; + limit?: number; + offset?: number; + // key: string, + // jwt?: string, + headers?: any; + params_json?: any; + // json_obj?: any, + params?: key_val; + return_meta?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** get_ae_obj_li_for_obj_id_crud() *** [${obj_type}]`); + } - // data = {}; - // data['super_key'] = key; - // data['jwt'] = jwt; - // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST + // data = {}; + // data['super_key'] = key; + // data['jwt'] = jwt; + // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST - // const endpoint = `/crud/${obj_type}/list`; + // const endpoint = `/crud/${obj_type}/list`; - let endpoint = ''; - if (obj_type == 'account') { - endpoint = `/crud/account/list`; - } else if (obj_type == 'address') { - endpoint = `/crud/address/list`; - } else if (obj_type == 'archive') { - endpoint = `/crud/archive/list`; - } else if (obj_type == 'archive_content') { - endpoint = `/crud/archive/content/list`; - } else if (obj_type == 'contact') { - endpoint = `/crud/contact/list`; - } else if (obj_type == 'data_store') { - endpoint = `/crud/data_store/list`; - } else if (obj_type == 'event') { - endpoint = `/crud/event/list`; - } else if (obj_type == 'event_abstract') { - endpoint = `/crud/event/abstract/list`; - } else if (obj_type == 'event_badge') { - endpoint = `/crud/event/badge/list`; - } else if (obj_type == 'event_device') { - endpoint = `/crud/event/device/list`; - } else if (obj_type == 'event_exhibit') { - endpoint = `/crud/event/exhibit/list`; - } else if (obj_type == 'event_exhibit_tracking') { - endpoint = `/crud/event/exhibit/tracking/list`; - } else if (obj_type == 'event_file') { - endpoint = `/crud/event/file/list`; - } else if (obj_type == 'event_location') { - endpoint = `/crud/event/location/list`; - } else if (obj_type == 'event_person') { - endpoint = `/crud/event/person/list`; - } else if (obj_type == 'event_presentation') { - endpoint = `/crud/event/presentation/list`; - } else if (obj_type == 'event_presenter') { - endpoint = `/crud/event/presenter/list`; - } else if (obj_type == 'event_session') { - endpoint = `/crud/event/session/list`; - } else if (obj_type == 'event_track') { - endpoint = `/crud/event/track/list`; - } else if (obj_type == 'grant') { - endpoint = `/crud/grant/list`; - } else if (obj_type == 'hosted_file') { - endpoint = `/crud/hosted_file/list`; - } else if (obj_type == 'journal') { - endpoint = `/crud/journal/list`; - } else if (obj_type == 'journal_entry') { - endpoint = `/crud/journal/entry/list`; - } else if (obj_type == 'order') { - endpoint = `/crud/order/list`; - } else if (obj_type == 'order_line') { - endpoint = `/crud/order/line/list`; - } else if (obj_type == 'page') { - endpoint = `/crud/page/list`; - } else if (obj_type == 'person') { - endpoint = `/crud/person/list`; - } else if (obj_type == 'post') { - endpoint = `/crud/post/list`; - } else if (obj_type == 'post_comment') { - endpoint = `/crud/post/comment/list`; - } else if (obj_type == 'site') { - endpoint = `/crud/site/list`; - } else if (obj_type == 'sponsorship_cfg') { - endpoint = `/crud/sponsorship/cfg/list`; - } else if (obj_type == 'sponsorship') { - endpoint = `/crud/sponsorship/list`; - // } else if (obj_type == 'user') { - // endpoint = `/crud/user/list`; - } else if (obj_type == 'lu' && for_obj_type == 'country_subdivision') { - endpoint = `/crud/lu/country_subdivision/list`; - for_obj_type = null; - } else if (obj_type == 'lu' && for_obj_type == 'country') { - endpoint = `/crud/lu/country/list`; - for_obj_type = null; - } else if (obj_type == 'lu' && for_obj_type == 'time_zone') { - endpoint = `/crud/lu/time_zone/list`; - for_obj_type = null; - } else { - console.log(`Unknown object type: ${obj_type}`); - return false; - } - if (log_lvl) { - console.log('Endpoint:', endpoint); - } + let endpoint = ''; + if (obj_type == 'account') { + endpoint = `/crud/account/list`; + } else if (obj_type == 'address') { + endpoint = `/crud/address/list`; + } else if (obj_type == 'archive') { + endpoint = `/crud/archive/list`; + } else if (obj_type == 'archive_content') { + endpoint = `/crud/archive/content/list`; + } else if (obj_type == 'contact') { + endpoint = `/crud/contact/list`; + } else if (obj_type == 'data_store') { + endpoint = `/crud/data_store/list`; + } else if (obj_type == 'event') { + endpoint = `/crud/event/list`; + } else if (obj_type == 'event_abstract') { + endpoint = `/crud/event/abstract/list`; + } else if (obj_type == 'event_badge') { + endpoint = `/crud/event/badge/list`; + } else if (obj_type == 'event_device') { + endpoint = `/crud/event/device/list`; + } else if (obj_type == 'event_exhibit') { + endpoint = `/crud/event/exhibit/list`; + } else if (obj_type == 'event_exhibit_tracking') { + endpoint = `/crud/event/exhibit/tracking/list`; + } else if (obj_type == 'event_file') { + endpoint = `/crud/event/file/list`; + } else if (obj_type == 'event_location') { + endpoint = `/crud/event/location/list`; + } else if (obj_type == 'event_person') { + endpoint = `/crud/event/person/list`; + } else if (obj_type == 'event_presentation') { + endpoint = `/crud/event/presentation/list`; + } else if (obj_type == 'event_presenter') { + endpoint = `/crud/event/presenter/list`; + } else if (obj_type == 'event_session') { + endpoint = `/crud/event/session/list`; + } else if (obj_type == 'event_track') { + endpoint = `/crud/event/track/list`; + } else if (obj_type == 'grant') { + endpoint = `/crud/grant/list`; + } else if (obj_type == 'hosted_file') { + endpoint = `/crud/hosted_file/list`; + } else if (obj_type == 'journal') { + endpoint = `/crud/journal/list`; + } else if (obj_type == 'journal_entry') { + endpoint = `/crud/journal/entry/list`; + } else if (obj_type == 'order') { + endpoint = `/crud/order/list`; + } else if (obj_type == 'order_line') { + endpoint = `/crud/order/line/list`; + } else if (obj_type == 'page') { + endpoint = `/crud/page/list`; + } else if (obj_type == 'person') { + endpoint = `/crud/person/list`; + } else if (obj_type == 'post') { + endpoint = `/crud/post/list`; + } else if (obj_type == 'post_comment') { + endpoint = `/crud/post/comment/list`; + } else if (obj_type == 'site') { + endpoint = `/crud/site/list`; + } else if (obj_type == 'sponsorship_cfg') { + endpoint = `/crud/sponsorship/cfg/list`; + } else if (obj_type == 'sponsorship') { + endpoint = `/crud/sponsorship/list`; + // } else if (obj_type == 'user') { + // endpoint = `/crud/user/list`; + } else if (obj_type == 'lu' && for_obj_type == 'country_subdivision') { + endpoint = `/crud/lu/country_subdivision/list`; + for_obj_type = null; + } else if (obj_type == 'lu' && for_obj_type == 'country') { + endpoint = `/crud/lu/country/list`; + for_obj_type = null; + } else if (obj_type == 'lu' && for_obj_type == 'time_zone') { + endpoint = `/crud/lu/time_zone/list`; + for_obj_type = null; + } else { + console.log(`Unknown object type: ${obj_type}`); + return false; + } + if (log_lvl) { + console.log('Endpoint:', endpoint); + } - if (for_obj_type) { - params['for_obj_type'] = for_obj_type; - } - if (for_obj_id) { - params['for_obj_id'] = for_obj_id; - } + if (for_obj_type) { + params['for_obj_type'] = for_obj_type; + } + if (for_obj_id) { + params['for_obj_id'] = for_obj_id; + } - params['use_alt_table'] = use_alt_table; - params['use_alt_base'] = use_alt_base; + params['use_alt_table'] = use_alt_table; + params['use_alt_base'] = use_alt_base; - /* Need to deal with inc params here */ + /* Need to deal with inc params here */ - let allowed_enabled_list = ['all', 'enabled', 'not_enabled'] - if (allowed_enabled_list.includes(enabled) ) { - params['enabled'] = enabled; - } + const allowed_enabled_list = ['all', 'enabled', 'not_enabled']; + if (allowed_enabled_list.includes(enabled)) { + params['enabled'] = enabled; + } - let allowed_hidden_list = ['all', 'hidden', 'not_hidden']; - if (allowed_hidden_list.includes(hidden) ) { - params['hidden'] = hidden; - } + const allowed_hidden_list = ['all', 'hidden', 'not_hidden']; + if (allowed_hidden_list.includes(hidden)) { + params['hidden'] = hidden; + } - // NOTE: The order_by_li variable is in the "headers" because if is a the URL GET params do not handle multiple values very well. Maybe base64 encore in the future or something? Reminder that GET requests should not have a body (no JSON). - // NOTE: The order_by_li should be a key value pair of the property/DB field to sort and how to sort (ASC or DESC) - if (order_by_li) { - if (log_lvl) { - console.log('Order By:', order_by_li); - } - headers['order_by_li'] = order_by_li; - } + // NOTE: The order_by_li variable is in the "headers" because if is a the URL GET params do not handle multiple values very well. Maybe base64 encore in the future or something? Reminder that GET requests should not have a body (no JSON). + // NOTE: The order_by_li should be a key value pair of the property/DB field to sort and how to sort (ASC or DESC) + if (order_by_li) { + if (log_lvl) { + console.log('Order By:', order_by_li); + } + headers['order_by_li'] = order_by_li; + } - if (limit >= 0) { - params['limit'] = limit; - } + if (limit >= 0) { + params['limit'] = limit; + } - if (offset >= 0) { - params['offset'] = offset; - } + if (offset >= 0) { + params['offset'] = offset; + } - if (params_json) { - // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the search endpoint. - // Max characters for a GET request is 2083. This is a limitation of the browser (Microsoft IE and Edge). - if (log_lvl) { - console.log('JSON Object:', params_json); - console.log(JSON.stringify(params_json)); - } - // NOTE: "jp" stands for "JSON Params" - params['jp'] = encodeURIComponent(JSON.stringify(params_json)); - if (params['jp'].length > 2083) { - console.log(`The JSON object is too large to be used as a GET parameter. The overall max URL length is 2083 characters. Please use the POST endpoint instead. Length = ${params['jp'].length} [THIS DOES NOT EXIST YET]`); - return false; - } - } + if (params_json) { + // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the search endpoint. + // Max characters for a GET request is 2083. This is a limitation of the browser (Microsoft IE and Edge). + if (log_lvl) { + console.log('JSON Object:', params_json); + console.log(JSON.stringify(params_json)); + } + // NOTE: "jp" stands for "JSON Params" + params['jp'] = encodeURIComponent(JSON.stringify(params_json)); + if (params['jp'].length > 2083) { + console.log( + `The JSON object is too large to be used as a GET parameter. The overall max URL length is 2083 characters. Please use the POST endpoint instead. Length = ${params['jp'].length} [THIS DOES NOT EXIST YET]` + ); + return false; + } + } - // if (json_obj) { - // // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the search endpoint. - // // Max characters for a GET request is 2083. This is a limitation of the browser (Microsoft IE and Edge). - // console.log('JSON Object:', json_obj); - // params['json_str'] = encodeURIComponent(JSON.stringify(json_obj)); - // if (params['json_str'].length > 2083) { - // console.log(`The JSON object is too large to be used as a GET parameter. The overall max URL length is 2083 characters. Please use the POST endpoint instead. Length = ${params['json_str'].length} [THIS DOES NOT EXIST YET]`); - // return false; - // } - // } + // if (json_obj) { + // // NOTE: This is a JSON object that needs to be safely converted to a string for the params. This is used for the search endpoint. + // // Max characters for a GET request is 2083. This is a limitation of the browser (Microsoft IE and Edge). + // console.log('JSON Object:', json_obj); + // params['json_str'] = encodeURIComponent(JSON.stringify(json_obj)); + // if (params['json_str'].length > 2083) { + // console.log(`The JSON object is too large to be used as a GET parameter. The overall max URL length is 2083 characters. Please use the POST endpoint instead. Length = ${params['json_str'].length} [THIS DOES NOT EXIST YET]`); + // return false; + // } + // } - if (log_lvl) { - console.log('Params:', params); - } + if (log_lvl) { + console.log('Params:', params); + } - let object_li_get_promise = await get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - headers: headers, - params: params, - return_meta: return_meta, - log_lvl: log_lvl - }); + const object_li_get_promise = await get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + headers: headers, + params: params, + return_meta: return_meta, + log_lvl: log_lvl + }); - if (log_lvl > 1) { - console.log(object_li_get_promise); - } + if (log_lvl > 1) { + console.log(object_li_get_promise); + } - return object_li_get_promise; -} \ No newline at end of file + return object_li_get_promise; +} diff --git a/src/lib/ae_api/api_get_object.ts b/src/lib/ae_api/api_get_object.ts index 94fcbaaf..2b7c799c 100644 --- a/src/lib/ae_api/api_get_object.ts +++ b/src/lib/ae_api/api_get_object.ts @@ -1,213 +1,236 @@ import type { key_val } from '$lib/stores/ae_stores'; export let temp_get_blob_percent_completed = 0; -export let get_blob_percent_completed = temp_get_blob_percent_completed; +export const get_blob_percent_completed = temp_get_blob_percent_completed; -export let temp_get_object_percent_completed = 0; -export let get_object_percent_completed = temp_get_object_percent_completed; +export const temp_get_object_percent_completed = 0; +export const get_object_percent_completed = temp_get_object_percent_completed; -export let get_object = async function get_object( - { - api_cfg = null, - endpoint = '', - headers = {}, - params = {}, - data = {}, - timeout = 60000, - return_meta = false, - return_blob = false, - filename = '', - auto_download = false, - as_list = false, // Is this still really needed? - // The task_id value should be a random string that is unique to the task. This is used to identify the task in the message event. - task_id = crypto.randomUUID(), - log_lvl = 0, - retry_count = 5 // Number of retry attempts - }: { - api_cfg: any, - endpoint: string, - headers?: any, - params?: any, - data?: any, - timeout?: number, - return_meta?: boolean, - return_blob?: boolean, - filename?: null | string, - auto_download?: boolean, - as_list?: boolean, - task_id?: string, - log_lvl?: number, - retry_count?: number - } -) { - if (log_lvl) { - console.log(`*** get_object() *** Endpoint: ${endpoint} AE Task ID: ${task_id}`); - console.log('Params:', params); - if (log_lvl > 1) { - console.log('Data:', data); - } - } +export const get_object = async function get_object({ + api_cfg = null, + endpoint = '', + headers = {}, + params = {}, + data = {}, + timeout = 60000, + return_meta = false, + return_blob = false, + filename = '', + auto_download = false, + as_list = false, // Is this still really needed? + // The task_id value should be a random string that is unique to the task. This is used to identify the task in the message event. + task_id = crypto.randomUUID(), + log_lvl = 0, + retry_count = 5 // Number of retry attempts +}: { + api_cfg: any; + endpoint: string; + headers?: any; + params?: any; + data?: any; + timeout?: number; + return_meta?: boolean; + return_blob?: boolean; + filename?: null | string; + auto_download?: boolean; + as_list?: boolean; + task_id?: string; + log_lvl?: number; + retry_count?: number; +}) { + if (log_lvl) { + console.log(`*** get_object() *** Endpoint: ${endpoint} AE Task ID: ${task_id}`); + console.log('Params:', params); + if (log_lvl > 1) { + console.log('Data:', data); + } + } - if (!api_cfg) { - console.log('No API Config was provided. Returning false.'); - return false; - } + if (!api_cfg) { + console.log('No API Config was provided. Returning false.'); + return false; + } - const url = new URL(endpoint, api_cfg['base_url']); - Object.keys(params).forEach(key => url.searchParams.append(key, params[key])); + const url = new URL(endpoint, api_cfg['base_url']); + Object.keys(params).forEach((key) => url.searchParams.append(key, params[key])); - const controller = new AbortController(); - const timeoutId = setTimeout(() => controller.abort(), timeout); + const controller = new AbortController(); + const timeoutId = setTimeout(() => controller.abort(), timeout); - // Remove a header parameter if it is set to null - if (api_cfg['headers'].hasOwnProperty('x-no-account-id') && api_cfg['headers']['x-no-account-id'] === null) { - delete api_cfg['headers']['x-no-account-id']; - } + // Remove a header parameter if it is set to null + if ( + api_cfg['headers'].hasOwnProperty('x-no-account-id') && + api_cfg['headers']['x-no-account-id'] === null + ) { + delete api_cfg['headers']['x-no-account-id']; + } - // Clean the headers - let headers_cleaned: key_val = {}; - for (const prop in headers) { - let prop_cleaned = prop.replaceAll('_', '-'); - if (typeof headers[prop] != 'string') { - headers[prop] = JSON.stringify(headers[prop]); - } - headers_cleaned[prop_cleaned] = headers[prop]; - if (log_lvl > 1) { - console.log(`${prop_cleaned}: ${headers_cleaned[prop_cleaned]}`); - } - } - headers = headers_cleaned; - if (log_lvl > 1) { - console.log('All headers cleaned:', headers); - } + // Clean the headers + const headers_cleaned: key_val = {}; + for (const prop in headers) { + const prop_cleaned = prop.replaceAll('_', '-'); + if (typeof headers[prop] != 'string') { + headers[prop] = JSON.stringify(headers[prop]); + } + headers_cleaned[prop_cleaned] = headers[prop]; + if (log_lvl > 1) { + console.log(`${prop_cleaned}: ${headers_cleaned[prop_cleaned]}`); + } + } + headers = headers_cleaned; + if (log_lvl > 1) { + console.log('All headers cleaned:', headers); + } - const fetchOptions: RequestInit = { - method: 'GET', - headers: { - ...api_cfg['headers'], - ...headers - }, - signal: controller.signal - }; + const fetchOptions: RequestInit = { + method: 'GET', + headers: { + ...api_cfg['headers'], + ...headers + }, + signal: controller.signal + }; - if (log_lvl > 1) { - console.log('Fetch options:', fetchOptions); - } + if (log_lvl > 1) { + console.log('Fetch options:', fetchOptions); + } - let fetch_method: any = fetch; - if (api_cfg.fetch) { - if (log_lvl > 1) { - console.log('Using custom fetch function from api_cfg!!!'); - } - fetch_method = api_cfg.fetch; - } + let fetch_method: any = fetch; + if (api_cfg.fetch) { + if (log_lvl > 1) { + console.log('Using custom fetch function from api_cfg!!!'); + } + fetch_method = api_cfg.fetch; + } - for (let attempt = 1; attempt <= retry_count; attempt++) { - try { - const response = await fetch_method(url.toString(), fetchOptions) - .catch(function (error: any) { - console.log('API GET Object *fetch* request was aborted or failed in an unexpected way.', error); - }); - clearTimeout(timeoutId); + for (let attempt = 1; attempt <= retry_count; attempt++) { + try { + const response = await fetch_method(url.toString(), fetchOptions).catch(function ( + error: any + ) { + console.log( + 'API GET Object *fetch* request was aborted or failed in an unexpected way.', + error + ); + }); + clearTimeout(timeoutId); - if (!response) { - if (log_lvl > 1) { - console.log('API GET Object: Something went wrong with *fetch* request. Returning false? Throwing an error!'); - } - throw new Error(`HTTP fetch request was aborted or failed in an unexpected way! URL = ${url.toString()}`); // This will allow it to retry - // return false; // This will stop the retries - } + if (!response) { + if (log_lvl > 1) { + console.log( + 'API GET Object: Something went wrong with *fetch* request. Returning false? Throwing an error!' + ); + } + throw new Error( + `HTTP fetch request was aborted or failed in an unexpected way! URL = ${url.toString()}` + ); // This will allow it to retry + // return false; // This will stop the retries + } - if (log_lvl) { - console.log(`Response: status=${response.status} statusText=${response.statusText} url=${response.url} attempt=${attempt}`); - } - if (log_lvl > 1) { - console.log('Response:', response); - } + if (log_lvl) { + console.log( + `Response: status=${response.status} statusText=${response.statusText} url=${response.url} attempt=${attempt}` + ); + } + if (log_lvl > 1) { + console.log('Response:', response); + } - if (!response.ok) { - if (response.status === 404) { - if (log_lvl) { - console.log('The response was a 404 not found "error". Returning null.'); - } - return null; - } - console.log('The response was not ok. Throwing an error!'); - throw new Error(`HTTP error! status: ${response.status}`); - } + if (!response.ok) { + if (response.status === 404) { + if (log_lvl) { + console.log('The response was a 404 not found "error". Returning null.'); + } + return null; + } + console.log('The response was not ok. Throwing an error!'); + throw new Error(`HTTP error! status: ${response.status}`); + } - if (!return_blob) { - const json = await response.json(); - if (log_lvl > 1) { - console.log('Response JSON:', json); - } - if (!Array.isArray(json.data) && as_list) { - return [json.data]; - } - return json.data || json; - } else { - const reader = response.body?.getReader(); - const contentLength = +response.headers.get('Content-Length')!; - let receivedLength = 0; - const chunks = []; + if (!return_blob) { + const json = await response.json(); + if (log_lvl > 1) { + console.log('Response JSON:', json); + } + if (!Array.isArray(json.data) && as_list) { + return [json.data]; + } + return json.data || json; + } else { + const reader = response.body?.getReader(); + const contentLength = +response.headers.get('Content-Length')!; + let receivedLength = 0; + const chunks = []; - while (true) { - const { done, value } = await reader!.read(); - if (done) break; - chunks.push(value); - receivedLength += value.length; + while (true) { + const { done, value } = await reader!.read(); + if (done) break; + chunks.push(value); + receivedLength += value.length; - const percent_completed = Math.round((receivedLength * 100) / contentLength); - if (log_lvl > 1) { - console.log('GET Blob Progress:', percent_completed, 'Total:', contentLength, 'Loaded:', receivedLength, 'Percent Completed', percent_completed); - } + const percent_completed = Math.round((receivedLength * 100) / contentLength); + if (log_lvl > 1) { + console.log( + 'GET Blob Progress:', + percent_completed, + 'Total:', + contentLength, + 'Loaded:', + receivedLength, + 'Percent Completed', + percent_completed + ); + } - temp_get_blob_percent_completed = percent_completed; + temp_get_blob_percent_completed = percent_completed; - try { - if (typeof window !== 'undefined') { - window.postMessage({ - type: 'api_download_blob', - status: 'downloading', - task_id: task_id, - endpoint: endpoint, - filename: filename, - size_total: contentLength, - size_loaded: receivedLength, - percent_completed: percent_completed - }, '*'); - } - } catch (e) { - console.error('Error posting message:', e); - } - } + try { + if (typeof window !== 'undefined') { + window.postMessage( + { + type: 'api_download_blob', + status: 'downloading', + task_id: task_id, + endpoint: endpoint, + filename: filename, + size_total: contentLength, + size_loaded: receivedLength, + percent_completed: percent_completed + }, + '*' + ); + } + } catch (e) { + console.error('Error posting message:', e); + } + } - const blob = new Blob(chunks); - if (auto_download) { - const downloadUrl = window.URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = downloadUrl; - link.setAttribute('download', filename || 'download'); - document.body.appendChild(link); - link.click(); - link.remove(); - return true; - } else { - return blob; - } - } - } catch (error) { - console.log(`API GET object request *fetch* error on attempt ${attempt}:`, error); + const blob = new Blob(chunks); + if (auto_download) { + const downloadUrl = window.URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = downloadUrl; + link.setAttribute('download', filename || 'download'); + document.body.appendChild(link); + link.click(); + link.remove(); + return true; + } else { + return blob; + } + } + } catch (error) { + console.log(`API GET object request *fetch* error on attempt ${attempt}:`, error); - if (attempt === retry_count) { - console.log('Max retry attempts reached. Returning false.'); - return false; - } + if (attempt === retry_count) { + console.log('Max retry attempts reached. Returning false.'); + return false; + } - // Log retry information - if (log_lvl) { - console.log(`Retrying... (${attempt}/${retry_count})`); - } - } - } -}; \ No newline at end of file + // Log retry information + if (log_lvl) { + console.log(`Retrying... (${attempt}/${retry_count})`); + } + } + } +}; diff --git a/src/lib/ae_api/api_get_object_v1.ts b/src/lib/ae_api/api_get_object_v1.ts index 2ff91613..5dd5e705 100644 --- a/src/lib/ae_api/api_get_object_v1.ts +++ b/src/lib/ae_api/api_get_object_v1.ts @@ -4,493 +4,517 @@ import type { key_val } from '$lib/stores/ae_stores'; export let temp_get_blob_percent_completed = 0; // export let get_blob_percent_completed = readable(temp_get_blob_percent_completed); -export let get_blob_percent_completed = temp_get_blob_percent_completed; +export const get_blob_percent_completed = temp_get_blob_percent_completed; export let temp_get_object_percent_completed = 0; // export let get_object_percent_completed = readable(temp_get_object_percent_completed); -export let get_object_percent_completed = temp_get_object_percent_completed; +export const get_object_percent_completed = temp_get_object_percent_completed; // Updated 2024-05-23 -export let get_object = async function get_object( - { - api_cfg=null, - endpoint='', - headers={}, - params={}, - data={}, - timeout=60000, - return_meta=false, - return_blob=false, - filename='', - auto_download=false, - as_list=false, - // The task_id value should be a random string that is unique to the task. This is used to identify the task in the message event. - task_id=crypto.randomUUID(), - log_lvl=0 - }: { - api_cfg: any, - endpoint: string, - headers?: any, - params?: any, - data?: any, - timeout?: number, - return_meta?: boolean, - return_blob?: boolean, - filename?: null|string, - auto_download?: boolean, - as_list?: boolean, - task_id?: string, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** get_object() *** Endpoint: ${endpoint} AE Task ID: ${task_id}`); - console.log('Params:', params); - if (log_lvl > 1) { - console.log('Data:', data); - console.log(`Base URL: ${api_cfg['base_url']}; Timeout: ${timeout}`); - console.log('API Config:', api_cfg); - } - if (log_lvl > 2) { - console.log(`Return Meta: ${return_meta}; Return Blob: ${return_blob}; Filename: ${filename}; Auto Download: ${auto_download}`); - } - } +export const get_object = async function get_object({ + api_cfg = null, + endpoint = '', + headers = {}, + params = {}, + data = {}, + timeout = 60000, + return_meta = false, + return_blob = false, + filename = '', + auto_download = false, + as_list = false, + // The task_id value should be a random string that is unique to the task. This is used to identify the task in the message event. + task_id = crypto.randomUUID(), + log_lvl = 0 +}: { + api_cfg: any; + endpoint: string; + headers?: any; + params?: any; + data?: any; + timeout?: number; + return_meta?: boolean; + return_blob?: boolean; + filename?: null | string; + auto_download?: boolean; + as_list?: boolean; + task_id?: string; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** get_object() *** Endpoint: ${endpoint} AE Task ID: ${task_id}`); + console.log('Params:', params); + if (log_lvl > 1) { + console.log('Data:', data); + console.log(`Base URL: ${api_cfg['base_url']}; Timeout: ${timeout}`); + console.log('API Config:', api_cfg); + } + if (log_lvl > 2) { + console.log( + `Return Meta: ${return_meta}; Return Blob: ${return_blob}; Filename: ${filename}; Auto Download: ${auto_download}` + ); + } + } - if (!api_cfg) { - console.log('No API Config was provided. Returning false.'); - return false; - } + if (!api_cfg) { + console.log('No API Config was provided. Returning false.'); + return false; + } - let axios_api = axios.create({ - baseURL: api_cfg['base_url'], - timeout: timeout, // in milliseconds; 60000 = 60 seconds - /* other custom settings */ - }); - axios_api.defaults.headers = api_cfg['headers']; - if (log_lvl) { - console.log('axios_api.defaults.headers:', axios_api.defaults.headers); - console.log('Additional headers:', headers); - } + const axios_api = axios.create({ + baseURL: api_cfg['base_url'], + timeout: timeout // in milliseconds; 60000 = 60 seconds + /* other custom settings */ + }); + axios_api.defaults.headers = api_cfg['headers']; + if (log_lvl) { + console.log('axios_api.defaults.headers:', axios_api.defaults.headers); + console.log('Additional headers:', headers); + } - // console.log('Clean the headers. No _underscores_!') - let headers_cleaned: key_val = {}; - for (const prop in headers) { - // No underscores allowed in the header parameters! - let prop_cleaned = prop.replaceAll('_', '-'); + // console.log('Clean the headers. No _underscores_!') + const headers_cleaned: key_val = {}; + for (const prop in headers) { + // No underscores allowed in the header parameters! + const prop_cleaned = prop.replaceAll('_', '-'); - // The value must be a string for the header! - if (typeof headers[prop] != 'string') { - headers[prop] = JSON.stringify(headers[prop]); - } + // The value must be a string for the header! + if (typeof headers[prop] != 'string') { + headers[prop] = JSON.stringify(headers[prop]); + } - headers_cleaned[prop_cleaned] = headers[prop]; + headers_cleaned[prop_cleaned] = headers[prop]; - if (log_lvl) { - console.log(`${prop_cleaned}: ${headers_cleaned[prop_cleaned]}`); - } - } - headers = headers_cleaned; - if (log_lvl) { - console.log('All headers cleaned:', headers); - } + if (log_lvl) { + console.log(`${prop_cleaned}: ${headers_cleaned[prop_cleaned]}`); + } + } + headers = headers_cleaned; + if (log_lvl) { + console.log('All headers cleaned:', headers); + } - if (log_lvl) { - console.log('URL params:'); - } - for (const prop in params) { - if (log_lvl > 1) { - console.log(`URL param: ${prop}: ${params[prop]}`); - } - if (params[prop] === null ) { - params[prop] = 'null'; - } - } + if (log_lvl) { + console.log('URL params:'); + } + for (const prop in params) { + if (log_lvl > 1) { + console.log(`URL param: ${prop}: ${params[prop]}`); + } + if (params[prop] === null) { + params[prop] = 'null'; + } + } - // Handle the case where there is no Blob expected to be returned. Mainly JSON and text data. - if (!return_blob) { - let response_data_promise = await axios_api.get( - endpoint, - { - headers: headers, - params: params, - onDownloadProgress: (progressEvent) => { - let percent_completed = Math.round( - (progressEvent.loaded * 100) / progressEvent.total - ); - if (log_lvl > 1) { - console.log('GET Data Progress:', progressEvent.progress, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed); - } + // Handle the case where there is no Blob expected to be returned. Mainly JSON and text data. + if (!return_blob) { + const response_data_promise = await axios_api + .get(endpoint, { + headers: headers, + params: params, + onDownloadProgress: (progressEvent) => { + const percent_completed = Math.round((progressEvent.loaded * 100) / progressEvent.total); + if (log_lvl > 1) { + console.log( + 'GET Data Progress:', + progressEvent.progress, + 'Total:', + progressEvent.total, + 'Loaded:', + progressEvent.loaded, + 'Percent Completed', + percent_completed + ); + } - temp_get_object_percent_completed = percent_completed; + temp_get_object_percent_completed = percent_completed; - // WARNING: This needs to be tied to an object type and ID. This is a temporary solution. - try { - // Check if window is defined. This is to prevent errors in SvelteKit. - if (typeof window !== 'undefined') { - window.postMessage({ - type: 'api_download_data', - status: 'downloading', - task_id: task_id, - endpoint: endpoint, - filename: filename, - size_total: progressEvent.total, - size_loaded: progressEvent.loaded, - percent_completed: percent_completed, - }, - '*' - ); - } - } catch (error) { - console.log('Error posting message to window:', error); - } - } - } - ) - .then(function (response) { - if (log_lvl) { - console.log(`GET Response: status=${response.status} statusText=${response.statusText} baseURL=${response.config.baseURL} url=${response.config.url} method=${response.config.method} headers=${response.config.headers} params=${JSON.stringify(response.config.params)}`); - } - if (log_lvl > 1) { - console.log('GET Response:', response); - } + // WARNING: This needs to be tied to an object type and ID. This is a temporary solution. + try { + // Check if window is defined. This is to prevent errors in SvelteKit. + if (typeof window !== 'undefined') { + window.postMessage( + { + type: 'api_download_data', + status: 'downloading', + task_id: task_id, + endpoint: endpoint, + filename: filename, + size_total: progressEvent.total, + size_loaded: progressEvent.loaded, + percent_completed: percent_completed + }, + '*' + ); + } + } catch (error) { + console.log('Error posting message to window:', error); + } + } + }) + .then(function (response) { + if (log_lvl) { + console.log( + `GET Response: status=${response.status} statusText=${response.statusText} baseURL=${response.config.baseURL} url=${response.config.url} method=${response.config.method} headers=${response.config.headers} params=${JSON.stringify(response.config.params)}` + ); + } + if (log_lvl > 1) { + console.log('GET Response:', response); + } - // Post file download message - try { - if (typeof window !== 'undefined') { - window.postMessage({ - type: 'api_download_data', - status: 'complete', - task_id: task_id, - endpoint: endpoint, - filename: filename, - size_total: 0, - size_loaded: 0, - percent_completed: 100, - }, - '*' - ); - } - } catch (error) { - console.log('Error posting message to window:', error); - } + // Post file download message + try { + if (typeof window !== 'undefined') { + window.postMessage( + { + type: 'api_download_data', + status: 'complete', + task_id: task_id, + endpoint: endpoint, + filename: filename, + size_total: 0, + size_loaded: 0, + percent_completed: 100 + }, + '*' + ); + } + } catch (error) { + console.log('Error posting message to window:', error); + } - if (!Array.isArray(response.data['data']) && as_list) { - if (log_lvl) { - console.log('Data result is a dictionary/object, not an array/list. Forcing return as an array/list'); - } - let return_data = []; - return_data.push(response.data['data']); - return return_data; - } else if (response.data['data']) { - let return_data = response.data['data']; - if (log_lvl) { - if (Array.isArray(return_data)) { - console.log(`Data result is an array/list. Array length: ${return_data.length}`); - } else { - console.log(`Data result is a dictionary/object, not an array/list.`); - } - } - return return_data; - } else { - let return_data = response.data; - if (log_lvl) { - if (Array.isArray(return_data)) { - console.log(`Not a standard response from Aether's API. Data result is an array/list. Array length: ${return_data.length}`); - } else { - console.log(`Not a standard response from Aether's API. Data result is a dictionary/object, not an array/list.`); - } - } - return return_data; - } - }) - .catch(function (error: any) { - // Handle the common and expected 404 "error" first - if (error.response && error.response.status === 404) { - if (log_lvl) { - console.log('The response was a 404 not found "error". Returning null.'); - } - if (log_lvl > 1) { - console.log(error.response); - } - if (log_lvl > 2) { - console.log(error); - } + if (!Array.isArray(response.data['data']) && as_list) { + if (log_lvl) { + console.log( + 'Data result is a dictionary/object, not an array/list. Forcing return as an array/list' + ); + } + const return_data = []; + return_data.push(response.data['data']); + return return_data; + } else if (response.data['data']) { + const return_data = response.data['data']; + if (log_lvl) { + if (Array.isArray(return_data)) { + console.log(`Data result is an array/list. Array length: ${return_data.length}`); + } else { + console.log(`Data result is a dictionary/object, not an array/list.`); + } + } + return return_data; + } else { + const return_data = response.data; + if (log_lvl) { + if (Array.isArray(return_data)) { + console.log( + `Not a standard response from Aether's API. Data result is an array/list. Array length: ${return_data.length}` + ); + } else { + console.log( + `Not a standard response from Aether's API. Data result is a dictionary/object, not an array/list.` + ); + } + } + return return_data; + } + }) + .catch(function (error: any) { + // Handle the common and expected 404 "error" first + if (error.response && error.response.status === 404) { + if (log_lvl) { + console.log('The response was a 404 not found "error". Returning null.'); + } + if (log_lvl > 1) { + console.log(error.response); + } + if (log_lvl > 2) { + console.log(error); + } - // Post file download message - try { - if (typeof window !== 'undefined') { - window.postMessage({ - type: 'api_download_data', - status: 'complete', - task_id: task_id, - endpoint: endpoint, - filename: filename, - size_total: 0, - size_loaded: 0, - percent_completed: 0, - }, - '*' - ); - } - } catch (error) { - console.log('Error posting message to window:', error); - } - return null; // Returning null since there were no results - } + // Post file download message + try { + if (typeof window !== 'undefined') { + window.postMessage( + { + type: 'api_download_data', + status: 'complete', + task_id: task_id, + endpoint: endpoint, + filename: filename, + size_total: 0, + size_loaded: 0, + percent_completed: 0 + }, + '*' + ); + } + } catch (error) { + console.log('Error posting message to window:', error); + } + return null; // Returning null since there were no results + } - if (log_lvl) { - console.log(`Base URL: ${api_cfg['base_url']} | Endpoint: ${endpoint}`); - console.log('Error Message:', error.message); // Is this needed here or below in the in the else portion??? + if (log_lvl) { + console.log(`Base URL: ${api_cfg['base_url']} | Endpoint: ${endpoint}`); + console.log('Error Message:', error.message); // Is this needed here or below in the in the else portion??? - if (error.response) { - // The request was made and the server responded with a status code that falls out of the range of 2xx - console.log('Error Response Data', error.response.data); - console.log('Error Response Status', error.response.status); - console.log('Error Response Headers', error.response.headers); - } else if (error.request) { - // The request was made but no response was received `error.request` is an instance of XMLHttpRequest in the browser and an instance of http.ClientRequest in node.js - if (log_lvl > 1) { - console.log('Error Request', error.request); - } - } else { - // Something happened in setting up the request that triggered an Error - console.log('Error Message', error.message); - } - } - if (log_lvl > 2) { - console.log('Error:', error); - console.log(error.config); - } + if (error.response) { + // The request was made and the server responded with a status code that falls out of the range of 2xx + console.log('Error Response Data', error.response.data); + console.log('Error Response Status', error.response.status); + console.log('Error Response Headers', error.response.headers); + } else if (error.request) { + // The request was made but no response was received `error.request` is an instance of XMLHttpRequest in the browser and an instance of http.ClientRequest in node.js + if (log_lvl > 1) { + console.log('Error Request', error.request); + } + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error Message', error.message); + } + } + if (log_lvl > 2) { + console.log('Error:', error); + console.log(error.config); + } - if (error.code === 'ECONNABORTED') { - // Timeout Error (You can implement retry here where suitable) - console.log('Timeout Error: ', error.message); - } - if (log_lvl) { - console.log('The response was an error. Returning false.'); - } + if (error.code === 'ECONNABORTED') { + // Timeout Error (You can implement retry here where suitable) + console.log('Timeout Error: ', error.message); + } + if (log_lvl) { + console.log('The response was an error. Returning false.'); + } - return false; // Returning false since something may have gone wrong. This includes timeouts. Also more in line with what the API returns. - // return error; - }); + return false; // Returning false since something may have gone wrong. This includes timeouts. Also more in line with what the API returns. + // return error; + }); - if (log_lvl > 1) { - // console.log(`Response Data: ${response_data_promise}`); - console.log(`Response Data:`, response_data_promise); - // console.log(response_data_promise); - } - if (response_data_promise) { - // The most common and expected response. - // console.log('Returning result. This is generally expected.'); - return response_data_promise; - } else if (response_data_promise === null) { - // Less common, but expected response if no results were returned. - if (log_lvl) { - console.log('Returning null. This is expected if no results were found. (404)'); - } - return response_data_promise; - } else if (response_data_promise === false) { - // Not common, but expected response if the request to the API had an issue. - console.log('Returning false. There may have been an issue with this request.'); - return response_data_promise; - } else { - // This generally should not happen. It likely means the query was bad or an API issue. - console.log('Returning (JSON/text) unknown. This should not happen in most cases.'); - Promise.reject(new Error('fail')).then(resolved, rejected); - } + if (log_lvl > 1) { + // console.log(`Response Data: ${response_data_promise}`); + console.log(`Response Data:`, response_data_promise); + // console.log(response_data_promise); + } + if (response_data_promise) { + // The most common and expected response. + // console.log('Returning result. This is generally expected.'); + return response_data_promise; + } else if (response_data_promise === null) { + // Less common, but expected response if no results were returned. + if (log_lvl) { + console.log('Returning null. This is expected if no results were found. (404)'); + } + return response_data_promise; + } else if (response_data_promise === false) { + // Not common, but expected response if the request to the API had an issue. + console.log('Returning false. There may have been an issue with this request.'); + return response_data_promise; + } else { + // This generally should not happen. It likely means the query was bad or an API issue. + console.log('Returning (JSON/text) unknown. This should not happen in most cases.'); + Promise.reject(new Error('fail')).then(resolved, rejected); + } - // Handle the case where a Blob is expected to be returned. - } else { + // Handle the case where a Blob is expected to be returned. + } else { + // console.log('Expecting a Blob to be returned...'); - // console.log('Expecting a Blob to be returned...'); + const response_data_promise = await axios_api + .get(endpoint, { + params: params, + responseType: 'blob', + onDownloadProgress: (progressEvent) => { + const percent_completed = Math.round((progressEvent.loaded * 100) / progressEvent.total); + console.log( + 'GET Blob Progress:', + progressEvent.progress, + 'Total:', + progressEvent.total, + 'Loaded:', + progressEvent.loaded, + 'Percent Completed', + percent_completed + ); - let response_data_promise = await axios_api.get( - endpoint, - { - params: params, - responseType: 'blob', - onDownloadProgress: (progressEvent) => { - let percent_completed = Math.round( - (progressEvent.loaded * 100) / progressEvent.total - ); - console.log('GET Blob Progress:', progressEvent.progress, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed); + temp_get_blob_percent_completed = percent_completed; - temp_get_blob_percent_completed = percent_completed; + // WARNING: This needs to be tied to an object type and ID. This is a temporary solution. + try { + if (typeof window !== 'undefined') { + window.postMessage( + { + type: 'api_download_blob', + status: 'downloading', + task_id: task_id, + endpoint: endpoint, + filename: filename, + size_total: progressEvent.total, + size_loaded: progressEvent.loaded, + percent_completed: percent_completed + }, + '*' + ); + } + } catch (error) { + console.log('Error posting message to window:', error); + } + } + }) + .then(function (response) { + if (log_lvl) { + console.log( + `GET (blob) Response: status=${response.status} statusText=${response.statusText} baseURL=${response.config.baseURL} url=${response.config.url} method=${response.config.method} headers=${response.config.headers} params=${response.config.params}` + ); + } + if (log_lvl > 1) { + console.log('GET (blob) Response:', response); + } - // WARNING: This needs to be tied to an object type and ID. This is a temporary solution. - try { - if (typeof window !== 'undefined') { - window.postMessage({ - type: 'api_download_blob', - status: 'downloading', - task_id: task_id, - endpoint: endpoint, - filename: filename, - size_total: progressEvent.total, - size_loaded: progressEvent.loaded, - percent_completed: percent_completed, - }, - '*' - ); - } - } catch (error) { - console.log('Error posting message to window:', error); - } - } - } - ) - .then(function (response) { - if (log_lvl) { - console.log(`GET (blob) Response: status=${response.status} statusText=${response.statusText} baseURL=${response.config.baseURL} url=${response.config.url} method=${response.config.method} headers=${response.config.headers} params=${response.config.params}`); - } - if (log_lvl > 1) { - console.log('GET (blob) Response:', response); - } + const { data, headers } = response; - const { data, headers } = response; + // Careful if this download filename needs to be changed to a different file extension. The browser/client may not know how to handle it. + if (filename) { + } else if (headers['content-disposition']) { + filename = headers['content-disposition'].replace(/\w+;filename=(.*)/, '$1'); + } else { + filename = 'unknown_file.ext'; + } - // Careful if this download filename needs to be changed to a different file extension. The browser/client may not know how to handle it. - if (filename) { - } else if (headers['content-disposition']) { - filename = headers['content-disposition'].replace(/\w+;filename=(.*)/, '$1'); - } else { - filename = 'unknown_file.ext'; - } + // WARNING: This needs to be tied to an object type and ID. This is a temporary solution. + try { + if (typeof window !== 'undefined') { + window.postMessage( + { + type: 'api_download_blob', + status: 'complete', + task_id: task_id, + endpoint: endpoint, + filename: filename, + size_total: 0, + size_loaded: 0, + percent_completed: 100 + }, + '*' + ); + } + } catch (error) { + console.log('Error posting message to window:', error); + } - // WARNING: This needs to be tied to an object type and ID. This is a temporary solution. - try { - if (typeof window !== 'undefined') { - window.postMessage({ - type: 'api_download_blob', - status: 'complete', - task_id: task_id, - endpoint: endpoint, - filename: filename, - size_total: 0, - size_loaded: 0, - percent_completed: 100, - }, - '*' - ); - } - } catch (error) { - console.log('Error posting message to window:', error); - } + if (auto_download) { + if (log_lvl) { + console.log(`Auto Download: ${filename}`); + } + const url = window.URL.createObjectURL(new Blob([response.data])); + const link = document.createElement('a'); + link.href = url; + link.setAttribute('download', filename); + document.body.appendChild(link); + link.click(); + return true; + } else { + return response; + } + }) + .catch(function (error: any) { + // Handle the common and expected 404 "error" first + if (error.response && error.response.status === 404) { + if (log_lvl) { + console.log('The response was a 404 not found "error". Returning null.'); + } + if (log_lvl > 1) { + console.log(error.response); + } + if (log_lvl > 2) { + console.log(error); + } - if (auto_download) { - if (log_lvl) { - console.log(`Auto Download: ${filename}`); - } - const url = window.URL.createObjectURL(new Blob([response.data])); - const link = document.createElement('a'); - link.href = url; - link.setAttribute('download', filename); - document.body.appendChild(link); - link.click(); - return true; - } else { - return response; - } - }) - .catch(function (error: any) { - // Handle the common and expected 404 "error" first - if (error.response && error.response.status === 404) { - if (log_lvl) { - console.log('The response was a 404 not found "error". Returning null.'); - } - if (log_lvl > 1) { - console.log(error.response); - } - if (log_lvl > 2) { - console.log(error); - } + // Post file download message + try { + if (typeof window !== 'undefined') { + window.postMessage( + { + type: 'api_download_blob', + status: 'complete', + task_id: task_id, + endpoint: endpoint, + filename: filename, + size_total: 0, + size_loaded: 0, + percent_completed: 0 + }, + '*' + ); + } + } catch (error) { + console.log('Error posting message to window:', error); + } + return null; // Returning null since there were no results + } - // Post file download message - try { - if (typeof window !== 'undefined') { - window.postMessage({ - type: 'api_download_blob', - status: 'complete', - task_id: task_id, - endpoint: endpoint, - filename: filename, - size_total: 0, - size_loaded: 0, - percent_completed: 0, - }, - '*' - ); - } - } catch (error) { - console.log('Error posting message to window:', error); - } - return null; // Returning null since there were no results - } + if (log_lvl) { + console.log(`Base URL: ${api_cfg['base_url']} | Endpoint: ${endpoint}`); + console.log('Error Message:', error.message); // Is this needed here or below in the in the else portion??? - if (log_lvl) { - console.log(`Base URL: ${api_cfg['base_url']} | Endpoint: ${endpoint}`); - console.log('Error Message:', error.message); // Is this needed here or below in the in the else portion??? + if (error.response) { + // The request was made and the server responded with a status code that falls out of the range of 2xx + console.log('Error Response Data', error.response.data); + console.log('Error Response Status', error.response.status); + console.log('Error Response Headers', error.response.headers); + } else if (error.request) { + // The request was made but no response was received `error.request` is an instance of XMLHttpRequest in the browser and an instance of http.ClientRequest in node.js + if (log_lvl > 1) { + console.log('Error Request', error.request); + } + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error Message', error.message); + } + } - if (error.response) { - // The request was made and the server responded with a status code that falls out of the range of 2xx - console.log('Error Response Data', error.response.data); - console.log('Error Response Status', error.response.status); - console.log('Error Response Headers', error.response.headers); - } else if (error.request) { - // The request was made but no response was received `error.request` is an instance of XMLHttpRequest in the browser and an instance of http.ClientRequest in node.js - if (log_lvl > 1) { - console.log('Error Request', error.request); - } - } else { - // Something happened in setting up the request that triggered an Error - console.log('Error Message', error.message); - } - } + if (error.code === 'ECONNABORTED') { + // Timeout Error (You can implement retry here where suitable) + console.log('Timeout Error: ', error.message); + } - if (error.code === 'ECONNABORTED') { - // Timeout Error (You can implement retry here where suitable) - console.log('Timeout Error: ', error.message); - } + if (log_lvl) { + console.log('The response was an error. Returning false.'); + } - if (log_lvl) { - console.log('The response was an error. Returning false.'); - } - - return false; // Returning false since something may have gone wrong. This includes timeouts. Also more in line with what the API returns. - // return error; - }); - - if (response_data_promise) { - // The most common and expected response. - // console.log('Returning result. This is generally expected.'); - // let test_blob = new Blob([response_data_promise.data]); - // console.log(test_blob); - // return test_blob; - // console.log(response_data_promise.blob()); - return response_data_promise; - } else if (response_data_promise === null) { - // Less common, but expected response if no results were returned. - if (log_lvl) { - console.log('Returning null. This is expected if no results were found. (404)'); - } - return response_data_promise; - } else if (response_data_promise === false) { - // Not common, but expected response if the request to the API had an issue. - console.log('Returning false. There may have been an issue with this request.'); - return response_data_promise; - } else { - // This generally should not happen. It likely means the query was bad or an API issue. - console.log('Returning (blob) unknown. This should not happen in most cases.'); - Promise.reject(new Error('fail')).then(resolved, rejected); - } - } -} + return false; // Returning false since something may have gone wrong. This includes timeouts. Also more in line with what the API returns. + // return error; + }); + if (response_data_promise) { + // The most common and expected response. + // console.log('Returning result. This is generally expected.'); + // let test_blob = new Blob([response_data_promise.data]); + // console.log(test_blob); + // return test_blob; + // console.log(response_data_promise.blob()); + return response_data_promise; + } else if (response_data_promise === null) { + // Less common, but expected response if no results were returned. + if (log_lvl) { + console.log('Returning null. This is expected if no results were found. (404)'); + } + return response_data_promise; + } else if (response_data_promise === false) { + // Not common, but expected response if the request to the API had an issue. + console.log('Returning false. There may have been an issue with this request.'); + return response_data_promise; + } else { + // This generally should not happen. It likely means the query was bad or an API issue. + console.log('Returning (blob) unknown. This should not happen in most cases.'); + Promise.reject(new Error('fail')).then(resolved, rejected); + } + } +}; function resolved(result: any) { - console.log('Resolved'); + console.log('Resolved'); } function rejected(result: any) { - console.error(result); -} \ No newline at end of file + console.error(result); +} diff --git a/src/lib/ae_api/api_patch_object.ts b/src/lib/ae_api/api_patch_object.ts index 3f8b18c9..17789fcb 100644 --- a/src/lib/ae_api/api_patch_object.ts +++ b/src/lib/ae_api/api_patch_object.ts @@ -1,149 +1,144 @@ // import axios from 'axios'; // Updated 2024-05-23 -export let patch_object = async function patch_object( - { - api_cfg = null, - endpoint = '', - params = {}, - data = {}, - return_meta = false, - log_lvl = 0, - retry_count = 5 // Number of retry attempts - }: { - api_cfg: any, - endpoint: string, - params?: any, - data?: any, - return_meta?: boolean, - log_lvl?: number, - retry_count?: number - } -) { - if (log_lvl) { - console.log(`*** patch_object() *** Endpoint: ${endpoint}`); - console.log('Params:', params); - if (log_lvl > 1) { - console.log('Data:', data); - } - } +export const patch_object = async function patch_object({ + api_cfg = null, + endpoint = '', + params = {}, + data = {}, + return_meta = false, + log_lvl = 0, + retry_count = 5 // Number of retry attempts +}: { + api_cfg: any; + endpoint: string; + params?: any; + data?: any; + return_meta?: boolean; + log_lvl?: number; + retry_count?: number; +}) { + if (log_lvl) { + console.log(`*** patch_object() *** Endpoint: ${endpoint}`); + console.log('Params:', params); + if (log_lvl > 1) { + console.log('Data:', data); + } + } - if (!api_cfg) { - console.error('No API Config was provided. Returning false.'); - return false; - } + if (!api_cfg) { + console.error('No API Config was provided. Returning false.'); + return false; + } - // Construct the URL with query parameters - const url = new URL(endpoint, api_cfg['base_url']); - Object.keys(params).forEach(key => url.searchParams.append(key, params[key])); + // Construct the URL with query parameters + const url = new URL(endpoint, api_cfg['base_url']); + Object.keys(params).forEach((key) => url.searchParams.append(key, params[key])); - // Clean the headers - let headers_cleaned: Record = {}; - for (const prop in api_cfg['headers']) { - let prop_cleaned = prop.replaceAll('_', '-'); - headers_cleaned[prop_cleaned] = api_cfg['headers'][prop]; - } + // Clean the headers + const headers_cleaned: Record = {}; + for (const prop in api_cfg['headers']) { + const prop_cleaned = prop.replaceAll('_', '-'); + headers_cleaned[prop_cleaned] = api_cfg['headers'][prop]; + } - if (log_lvl > 1) { - console.log('Cleaned Headers:', headers_cleaned); - } + if (log_lvl > 1) { + console.log('Cleaned Headers:', headers_cleaned); + } - const fetchOptions: RequestInit = { - method: 'PATCH', - headers: { - ...headers_cleaned, - 'Content-Type': 'application/json' - }, - body: JSON.stringify(data) - }; + const fetchOptions: RequestInit = { + method: 'PATCH', + headers: { + ...headers_cleaned, + 'Content-Type': 'application/json' + }, + body: JSON.stringify(data) + }; - if (log_lvl > 1) { - console.log('Fetch Options:', fetchOptions); - } + if (log_lvl > 1) { + console.log('Fetch Options:', fetchOptions); + } - for (let attempt = 1; attempt <= retry_count; attempt++) { - try { - const response = await fetch(url.toString(), fetchOptions); + for (let attempt = 1; attempt <= retry_count; attempt++) { + try { + const response = await fetch(url.toString(), fetchOptions); - if (log_lvl) { - console.log(`Response: status=${response.status} attempt=${attempt}`); - } + if (log_lvl) { + console.log(`Response: status=${response.status} attempt=${attempt}`); + } - if (!response.ok) { - if (response.status === 404) { - console.warn('404 Not Found. Returning null.'); - return null; // Returning null since there were no results - } - throw new Error(`HTTP error! status: ${response.status}`); - } + if (!response.ok) { + if (response.status === 404) { + console.warn('404 Not Found. Returning null.'); + return null; // Returning null since there were no results + } + throw new Error(`HTTP error! status: ${response.status}`); + } - const json = await response.json(); + const json = await response.json(); - if (log_lvl > 1) { - console.log('Response JSON:', json); - } + if (log_lvl > 1) { + console.log('Response JSON:', json); + } - // Return the response data or metadata - return return_meta ? json : json.data; - } catch (error) { - console.error(`API PATCH error on attempt ${attempt}:`, error); + // Return the response data or metadata + return return_meta ? json : json.data; + } catch (error) { + console.error(`API PATCH error on attempt ${attempt}:`, error); - // If this is the last attempt, return false - if (attempt === retry_count) { - console.error('Max retry attempts reached. Returning false.'); - return false; - } + // If this is the last attempt, return false + if (attempt === retry_count) { + console.error('Max retry attempts reached. Returning false.'); + return false; + } - // Log retry information - if (log_lvl) { - console.log(`Retrying... (${attempt}/${retry_count})`); - } - } - } + // Log retry information + if (log_lvl) { + console.log(`Retrying... (${attempt}/${retry_count})`); + } + } + } + // let axios_api = axios.create({ + // baseURL: api_cfg['base_url'], + // /* other custom settings */ + // }); + // axios_api.defaults.headers = api_cfg['headers']; + // for (let attempt = 1; attempt <= retry_count; attempt++) { + // try { + // const response = await axios_api.patch(endpoint, data, { params: params }); + // if (log_lvl) { + // console.log(`Response: status=${response.status} attempt=${attempt}`); + // } + // if (log_lvl > 1) { + // console.log('Response Data:', response.data); + // } - // let axios_api = axios.create({ - // baseURL: api_cfg['base_url'], - // /* other custom settings */ - // }); - // axios_api.defaults.headers = api_cfg['headers']; + // // Return the response data + // return response.data['data']; + // } catch (error) { + // if (log_lvl) { + // console.error(`Error on attempt ${attempt}:`, error); + // } - // for (let attempt = 1; attempt <= retry_count; attempt++) { - // try { - // const response = await axios_api.patch(endpoint, data, { params: params }); - // if (log_lvl) { - // console.log(`Response: status=${response.status} attempt=${attempt}`); - // } - // if (log_lvl > 1) { - // console.log('Response Data:', response.data); - // } + // // Handle specific errors (e.g., 404) + // if (error.response && error.response.status === 404) { + // console.warn('404 Not Found. Returning null.'); + // return null; // Returning null since there were no results + // } - // // Return the response data - // return response.data['data']; - // } catch (error) { - // if (log_lvl) { - // console.error(`Error on attempt ${attempt}:`, error); - // } - - // // Handle specific errors (e.g., 404) - // if (error.response && error.response.status === 404) { - // console.warn('404 Not Found. Returning null.'); - // return null; // Returning null since there were no results - // } - - // // If this is the last attempt, return false - // if (attempt === retry_count) { - // console.error('Max retry attempts reached. Returning false.'); - // return false; - // } - - // // Log retry information - // if (log_lvl) { - // console.log(`Retrying... (${attempt}/${retry_count})`); - // } - // } - // } - // return response_data; -} + // // If this is the last attempt, return false + // if (attempt === retry_count) { + // console.error('Max retry attempts reached. Returning false.'); + // return false; + // } + // // Log retry information + // if (log_lvl) { + // console.log(`Retrying... (${attempt}/${retry_count})`); + // } + // } + // } + // return response_data; +}; diff --git a/src/lib/ae_api/api_post_object.ts b/src/lib/ae_api/api_post_object.ts index d24aaf8f..9911fdef 100644 --- a/src/lib/ae_api/api_post_object.ts +++ b/src/lib/ae_api/api_post_object.ts @@ -1,350 +1,346 @@ // import axios from 'axios'; -export let temp_post_blob_percent_completed = 0; -export let post_blob_percent_completed = temp_post_blob_percent_completed; -export let temp_post_object_percent_completed = 0; -export let post_object_percent_completed = temp_post_object_percent_completed; +export const temp_post_blob_percent_completed = 0; +export const post_blob_percent_completed = temp_post_blob_percent_completed; +export const temp_post_object_percent_completed = 0; +export const post_object_percent_completed = temp_post_object_percent_completed; // Updated 2024-05-23 -export let post_object = async function post_object( - { - api_cfg = null, - endpoint = '', - params = {}, - data = {}, - form_data = null, - return_meta = false, - return_blob = false, - filename = '', - auto_download = false, - // The task_id value should be a random string that is unique to the task. This is used to identify the task in the message event. - task_id = crypto.randomUUID(), - log_lvl = 0, - retry_count = 5 - }: { - api_cfg: any, - endpoint: string, - params?: any, - data?: any, - form_data?: any, - return_meta?: boolean, - return_blob?: boolean, - filename?: string, - auto_download?: boolean, - task_id?: string, - log_lvl?: number, - retry_count?: number - } - ) { +export const post_object = async function post_object({ + api_cfg = null, + endpoint = '', + params = {}, + data = {}, + form_data = null, + return_meta = false, + return_blob = false, + filename = '', + auto_download = false, + // The task_id value should be a random string that is unique to the task. This is used to identify the task in the message event. + task_id = crypto.randomUUID(), + log_lvl = 0, + retry_count = 5 +}: { + api_cfg: any; + endpoint: string; + params?: any; + data?: any; + form_data?: any; + return_meta?: boolean; + return_blob?: boolean; + filename?: string; + auto_download?: boolean; + task_id?: string; + log_lvl?: number; + retry_count?: number; +}) { + if (log_lvl) { + console.log(`*** post_object() *** Endpoint: ${endpoint} Task ID: ${task_id}`); + console.log('Params:', params); + if (log_lvl > 1) { + console.log('Data:', data); + console.log(typeof data); + console.log(`Base URL: ${api_cfg['base_url']}`); + console.log('API Config:', api_cfg); + } + if (log_lvl > 2) { + console.log(`Return Meta: ${return_meta}`); + console.log(`Return Blob: ${return_blob}`); + console.log(`Filename: ${filename}`); + console.log(`Auto Download: ${auto_download}`); + } + } - if (log_lvl) { - console.log(`*** post_object() *** Endpoint: ${endpoint} Task ID: ${task_id}`); - console.log('Params:', params); - if (log_lvl > 1) { - console.log('Data:', data); - console.log(typeof data); - console.log(`Base URL: ${api_cfg['base_url']}`); - console.log('API Config:', api_cfg); - } - if (log_lvl > 2) { - console.log(`Return Meta: ${return_meta}`); - console.log(`Return Blob: ${return_blob}`); - console.log(`Filename: ${filename}`); - console.log(`Auto Download: ${auto_download}`); - } - } + // console.log('HERE!! API POST 0'); - // console.log('HERE!! API POST 0'); + if (!api_cfg) { + console.error('No API Config was provided. Returning false.'); + return false; + } - if (!api_cfg) { - console.error('No API Config was provided. Returning false.'); - return false; - } + // console.log('HERE!! API POST 1'); - // console.log('HERE!! API POST 1'); + // Construct the URL with query parameters + const url = new URL(endpoint, api_cfg['base_url']); + if (params) { + Object.keys(params).forEach((key) => url.searchParams.append(key, params[key])); + } - // Construct the URL with query parameters - const url = new URL(endpoint, api_cfg['base_url']); - if (params) { - Object.keys(params).forEach(key => url.searchParams.append(key, params[key])); - } + // console.log('HERE!! API POST 2'); - // console.log('HERE!! API POST 2'); + // Clean the headers + const headers_cleaned: Record = {}; + for (const prop in api_cfg['headers']) { + const prop_cleaned = prop.replaceAll('_', '-'); + headers_cleaned[prop_cleaned] = api_cfg['headers'][prop]; + } - // Clean the headers - let headers_cleaned: Record = {}; - for (const prop in api_cfg['headers']) { - let prop_cleaned = prop.replaceAll('_', '-'); - headers_cleaned[prop_cleaned] = api_cfg['headers'][prop]; - } + // console.log('HERE!! API POST 3'); - // console.log('HERE!! API POST 3'); + if (form_data) { + // headers_cleaned['Content-Type'] = 'multipart/form-data'; + delete headers_cleaned['Content-Type']; + delete headers_cleaned['content-type']; // Just in case + delete headers_cleaned['Content-type']; // Just in case + console.log('Form Data:', form_data); + } else { + headers_cleaned['Content-Type'] = 'application/json'; + } - if (form_data) { - // headers_cleaned['Content-Type'] = 'multipart/form-data'; - delete headers_cleaned['Content-Type']; - delete headers_cleaned['content-type']; // Just in case - delete headers_cleaned['Content-type']; // Just in case - console.log('Form Data:', form_data); - } else { - headers_cleaned['Content-Type'] = 'application/json'; - } + if (log_lvl > 1) { + console.log('Cleaned Headers:', headers_cleaned); + } - if (log_lvl > 1) { - console.log('Cleaned Headers:', headers_cleaned); - } + // console.log('HERE!! API POST 4'); - // console.log('HERE!! API POST 4'); + for (let attempt = 1; attempt <= retry_count; attempt++) { + try { + const controller = new AbortController(); + const fetchOptions: RequestInit = { + method: 'POST', + headers: headers_cleaned, + body: form_data ? form_data : JSON.stringify(data), + signal: controller.signal + }; - for (let attempt = 1; attempt <= retry_count; attempt++) { - try { - const controller = new AbortController(); - const fetchOptions: RequestInit = { - method: 'POST', - headers: headers_cleaned, - body: form_data ? form_data : JSON.stringify(data), - signal: controller.signal - }; + if (log_lvl > 1) { + console.log('Fetch Options:', fetchOptions); + } - if (log_lvl > 1) { - console.log('Fetch Options:', fetchOptions); - } + const response = await fetch(url.toString(), fetchOptions); - const response = await fetch(url.toString(), fetchOptions); + if (log_lvl) { + console.log(`Response: status=${response.status} attempt=${attempt}`); + } - if (log_lvl) { - console.log(`Response: status=${response.status} attempt=${attempt}`); - } + if (!response.ok) { + if (response.status === 404) { + console.warn('404 Not Found. Returning null.'); + return null; // Returning null since there were no results + } + throw new Error(`HTTP error! status: ${response.status}`); + } - if (!response.ok) { - if (response.status === 404) { - console.warn('404 Not Found. Returning null.'); - return null; // Returning null since there were no results - } - throw new Error(`HTTP error! status: ${response.status}`); - } + if (!return_blob) { + const json = await response.json(); - if (!return_blob) { - const json = await response.json(); + if (log_lvl > 1) { + console.log('Response JSON:', json); + } - if (log_lvl > 1) { - console.log('Response JSON:', json); - } + // Post a message to the window indicating the upload is complete + try { + window.postMessage( + { + type: 'api_post_json_form', + status: 'complete', + task_id: task_id, + endpoint: endpoint, + size_total: 0, + size_loaded: 0, + percent_completed: 100, + progress: 100, + rate: 0 + }, + '*' + ); + } catch (error) { + console.error('Error posting message to window:', error); + } - // Post a message to the window indicating the upload is complete - try { - window.postMessage({ - type: 'api_post_json_form', - status: 'complete', - task_id: task_id, - endpoint: endpoint, - size_total: 0, - size_loaded: 0, - percent_completed: 100, - progress: 100, - rate: 0 - }, '*'); - } catch (error) { - console.error('Error posting message to window:', error); - } + // Return the response data or metadata + return return_meta ? json : json.data; + } else { + const blob = await response.blob(); - // Return the response data or metadata - return return_meta ? json : json.data; - } else { - const blob = await response.blob(); + if (auto_download) { + const downloadUrl = window.URL.createObjectURL(blob); + const link = document.createElement('a'); + link.href = downloadUrl; + link.setAttribute('download', filename || 'download'); + document.body.appendChild(link); + link.click(); + link.remove(); + return true; + } else { + return blob; + } + } + } catch (error) { + console.error(`API POST error on attempt ${attempt}:`, error); - if (auto_download) { - const downloadUrl = window.URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = downloadUrl; - link.setAttribute('download', filename || 'download'); - document.body.appendChild(link); - link.click(); - link.remove(); - return true; - } else { - return blob; - } - } - } catch (error) { - console.error(`API POST error on attempt ${attempt}:`, error); + // If this is the last attempt, return false + if (attempt === retry_count) { + console.error('Max retry attempts reached. Returning false.'); + return false; + } - // If this is the last attempt, return false - if (attempt === retry_count) { - console.error('Max retry attempts reached. Returning false.'); - return false; - } + // Log retry information + if (log_lvl) { + console.log(`Retrying... (${attempt}/${retry_count})`); + } + } + } - // Log retry information - if (log_lvl) { - console.log(`Retrying... (${attempt}/${retry_count})`); - } - } - } + // let axios_api = axios.create({ + // baseURL: api_cfg['base_url'], + // /* other custom settings */ + // }); + // axios_api.defaults.headers = api_cfg['headers']; + // console.log('Axios API', axios_api); + // // console.log('Axios API POST', axios_api.post); + // // if (typeof data == 'FormData') { + // if (form_data) { + // axios_api.defaults.headers['content-type'] = 'multipart/form-data'; + // data = form_data; + // } else { + // axios_api.defaults.headers['content-type'] = 'application/json'; + // } + // if (!return_blob) { + // let response_data = await axios_api.post( + // endpoint, + // data, + // { + // params: params, + // onUploadProgress: (progressEvent) => { + // let percent_completed = Math.round( + // (progressEvent.loaded * 100) / progressEvent.total + // ); + // console.log('POST Progress:', progressEvent.progress, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed); - // let axios_api = axios.create({ - // baseURL: api_cfg['base_url'], - // /* other custom settings */ - // }); - // axios_api.defaults.headers = api_cfg['headers']; - // console.log('Axios API', axios_api); - // // console.log('Axios API POST', axios_api.post); + // temp_post_object_percent_completed = percent_completed; - // // if (typeof data == 'FormData') { - // if (form_data) { - // axios_api.defaults.headers['content-type'] = 'multipart/form-data'; - // data = form_data; - // } else { - // axios_api.defaults.headers['content-type'] = 'application/json'; - // } + // try { + // window.postMessage({ + // type: 'api_post_json_form', + // status: 'uploading', + // task_id: task_id, + // endpoint: endpoint, + // size_total: progressEvent.total, + // size_loaded: progressEvent.loaded, + // percent_completed: percent_completed, + // progress: progressEvent.progress, + // rate: progressEvent.rate, + // }, + // '*' + // ); + // } catch (error) { + // console.log('Error posting message to window:', error); + // } + // } + // } + // ) + // .then(function (response) { + // console.log('POST Response Data:', response.data); + // try { + // window.postMessage({ + // type: 'api_post_json_form', + // status: 'complete', + // task_id: task_id, + // endpoint: endpoint, + // size_total: 0, + // size_loaded: 0, + // percent_completed: 100, + // progress: 100, + // rate: 0, + // }, + // '*' + // ); + // } catch (error) { + // console.log('Error posting message to window:', error); + // } + // if (response.data['data'].result === null) { + // // This should mean that the request was successful, but a result of None/null was returned from Aether API. + // // console.log('Returning null after POST'); + // return null; + // } else { + // // This should mean that the request was successful, and a result with data was returned from Aether API. + // // console.log('Returning data after POST'); + // return response.data['data']; + // } + // //return response.data; + // }) + // .catch(function (error: any) { + // if (error.response && error.response.status === 404) { + // return null; // Returning null since there were no results + // } + // console.log(error); + // return false; // Returning false since something may have gone wrong. Also more in line with what the API returns. + // // return error; + // }); - // if (!return_blob) { - // let response_data = await axios_api.post( - // endpoint, - // data, - // { - // params: params, - // onUploadProgress: (progressEvent) => { - // let percent_completed = Math.round( - // (progressEvent.loaded * 100) / progressEvent.total - // ); - // console.log('POST Progress:', progressEvent.progress, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed); + // if (log_lvl > 1) { + // console.log('Response Data:', response_data); + // } + // axios_api.defaults.headers['content-type'] = 'application/json'; + // return response_data; - // temp_post_object_percent_completed = percent_completed; + // } else { + // // console.log('Expecting a Blob to be returned...'); - // try { - // window.postMessage({ - // type: 'api_post_json_form', - // status: 'uploading', - // task_id: task_id, - // endpoint: endpoint, - // size_total: progressEvent.total, - // size_loaded: progressEvent.loaded, - // percent_completed: percent_completed, - // progress: progressEvent.progress, - // rate: progressEvent.rate, - // }, - // '*' - // ); - // } catch (error) { - // console.log('Error posting message to window:', error); - // } - // } - // } - // ) - // .then(function (response) { - // console.log('POST Response Data:', response.data); - // try { - // window.postMessage({ - // type: 'api_post_json_form', - // status: 'complete', - // task_id: task_id, - // endpoint: endpoint, - // size_total: 0, - // size_loaded: 0, - // percent_completed: 100, - // progress: 100, - // rate: 0, - // }, - // '*' - // ); - // } catch (error) { - // console.log('Error posting message to window:', error); - // } + // let response_data_promise = await axios_api.post( + // endpoint, + // data, + // { + // params: params, + // responseType: 'blob', + // onDownloadProgress: (progressEvent) => { + // let percent_completed = Math.round( + // (progressEvent.loaded * 100) / progressEvent.total + // ); + // console.log('POST Blob Progress:', progressEvent.progress, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed); - // if (response.data['data'].result === null) { - // // This should mean that the request was successful, but a result of None/null was returned from Aether API. - // // console.log('Returning null after POST'); - // return null; - // } else { - // // This should mean that the request was successful, and a result with data was returned from Aether API. - // // console.log('Returning data after POST'); - // return response.data['data']; - // } - // //return response.data; - // }) - // .catch(function (error: any) { - // if (error.response && error.response.status === 404) { - // return null; // Returning null since there were no results - // } - // console.log(error); - // return false; // Returning false since something may have gone wrong. Also more in line with what the API returns. - // // return error; - // }); + // temp_post_blob_percent_completed = percent_completed; + // } + // } + // ) + // .then(function (response) { + // if (log_lvl) { + // console.log(response); + // } - // if (log_lvl > 1) { - // console.log('Response Data:', response_data); - // } - // axios_api.defaults.headers['content-type'] = 'application/json'; - // return response_data; + // const { data, headers } = response + // console.log(headers); - // } else { - // // console.log('Expecting a Blob to be returned...'); + // if (filename) { + // } else if (headers['content-disposition']) { + // filename = headers['content-disposition'].replace(/\w+;filename=(.*)/, '$1'); + // } else { + // filename = 'unknown_file.ext'; + // } - // let response_data_promise = await axios_api.post( - // endpoint, - // data, - // { - // params: params, - // responseType: 'blob', - // onDownloadProgress: (progressEvent) => { - // let percent_completed = Math.round( - // (progressEvent.loaded * 100) / progressEvent.total - // ); - // console.log('POST Blob Progress:', progressEvent.progress, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed); - - // temp_post_blob_percent_completed = percent_completed; - // } - // } - // ) - // .then(function (response) { - // if (log_lvl) { - // console.log(response); - // } - - // const { data, headers } = response - // console.log(headers); - - // if (filename) { - // } else if (headers['content-disposition']) { - // filename = headers['content-disposition'].replace(/\w+;filename=(.*)/, '$1'); - // } else { - // filename = 'unknown_file.ext'; - // } - - // if (auto_download) { - // const url = window.URL.createObjectURL(new Blob([response.data])); - // const link = document.createElement('a'); - // link.href = url; - // // link.setAttribute('download', 'event_exhibit_tracking_export.xlsx'); //or any other extension - // link.setAttribute('download', filename); //or any other extension - // document.body.appendChild(link); - // link.click(); - // return true; - // } else { - // return response; - // } - // }); - - // if (response_data_promise) { - // // The most common and expected response. - // // console.log('Returning result. This is generally expected.'); - // // let test_blob = new Blob([response_data_promise.data]); - // // console.log(test_blob); - // // return test_blob; - // // console.log(response_data_promise.blob()); - // return response_data_promise; - // } else { - // // This generally should not happen. It likely means the query was bad or an API issue. - // console.log('Returning unknown. This should not happen in most cases.'); - // Promise.reject(new Error('fail')).then(resolved, rejected); - // } - // } -} + // if (auto_download) { + // const url = window.URL.createObjectURL(new Blob([response.data])); + // const link = document.createElement('a'); + // link.href = url; + // // link.setAttribute('download', 'event_exhibit_tracking_export.xlsx'); //or any other extension + // link.setAttribute('download', filename); //or any other extension + // document.body.appendChild(link); + // link.click(); + // return true; + // } else { + // return response; + // } + // }); + // if (response_data_promise) { + // // The most common and expected response. + // // console.log('Returning result. This is generally expected.'); + // // let test_blob = new Blob([response_data_promise.data]); + // // console.log(test_blob); + // // return test_blob; + // // console.log(response_data_promise.blob()); + // return response_data_promise; + // } else { + // // This generally should not happen. It likely means the query was bad or an API issue. + // console.log('Returning unknown. This should not happen in most cases.'); + // Promise.reject(new Error('fail')).then(resolved, rejected); + // } + // } +}; // function resolved(result: any) { // console.log('Resolved'); @@ -352,4 +348,4 @@ export let post_object = async function post_object( // function rejected(result: any) { // console.error(result); -// } \ No newline at end of file +// } diff --git a/src/lib/ae_archives/ae_archives__archive.ts b/src/lib/ae_archives/ae_archives__archive.ts index 8b55f8e0..e710c09b 100644 --- a/src/lib/ae_archives/ae_archives__archive.ts +++ b/src/lib/ae_archives/ae_archives__archive.ts @@ -1,620 +1,616 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_archives } from "$lib/ae_archives/db_archives"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_archives } from '$lib/ae_archives/db_archives'; -import { load_ae_obj_li__archive_content } from "$lib/ae_archives/ae_archives__archive_content"; - -let ae_promises: key_val = {}; +import { load_ae_obj_li__archive_content } from '$lib/ae_archives/ae_archives__archive_content'; +const ae_promises: key_val = {}; // Updated 2024-09-25 -export async function load_ae_obj_id__archive( - { - api_cfg, - archive_id, - inc_content_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - archive_id: string, - inc_content_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__archive() *** archive_id=${archive_id}`); - } +export async function load_ae_obj_id__archive({ + api_cfg, + archive_id, + inc_content_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + archive_id: string; + inc_content_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__archive() *** archive_id=${archive_id}`); + } - ae_promises.load__archive_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'archive', - obj_id: archive_id, - use_alt_table: true, - use_alt_base: false, - params: params, - log_lvl: log_lvl - }) - .then(async function (archive_obj_get_result) { - if (archive_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__archive_props({ - obj_li: [archive_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_archives, - table_name: 'archive', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__archive_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'archive', + obj_id: archive_id, + use_alt_table: true, + use_alt_base: false, + params: params, + log_lvl: log_lvl + }) + .then(async function (archive_obj_get_result) { + if (archive_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__archive_props({ + obj_li: [archive_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_archives, + table_name: 'archive', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__archive({ - // obj_type: 'archive', - // obj_li: [archive_obj_get_result] - // }); - } - return archive_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // // This is expecting a list + // db_save_ae_obj_li__archive({ + // obj_type: 'archive', + // obj_li: [archive_obj_get_result] + // }); + } + return archive_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__archive_obj:', ae_promises.load__archive_obj); - } + if (log_lvl) { + console.log('ae_promises.load__archive_obj:', ae_promises.load__archive_obj); + } - if (inc_content_li) { - // Load the contents for the archive - if (log_lvl) { - console.log(`Need to load the content list for the archive now`); - } - let load_archive_content_obj_li = load_ae_obj_li__archive_content({ - api_cfg: api_cfg, - for_obj_type: 'archive', - for_obj_id: archive_id, - enabled: enabled, // all, disabled, enabled - hidden: hidden, // all, hidden, not_hidden - limit: limit, // Limit for the comments - offset: offset, - params: params, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((archive_content_obj_li) => { - if (log_lvl) { - console.log(`archive_content_obj_li = `, archive_content_obj_li); - } - return archive_content_obj_li; - }); + if (inc_content_li) { + // Load the contents for the archive + if (log_lvl) { + console.log(`Need to load the content list for the archive now`); + } + const load_archive_content_obj_li = load_ae_obj_li__archive_content({ + api_cfg: api_cfg, + for_obj_type: 'archive', + for_obj_id: archive_id, + enabled: enabled, // all, disabled, enabled + hidden: hidden, // all, hidden, not_hidden + limit: limit, // Limit for the comments + offset: offset, + params: params, + try_cache: try_cache, + log_lvl: log_lvl + }).then((archive_content_obj_li) => { + if (log_lvl) { + console.log(`archive_content_obj_li = `, archive_content_obj_li); + } + return archive_content_obj_li; + }); - if (log_lvl) { - console.log(`archive_content_obj_li = `, load_archive_content_obj_li); - } - ae_promises.load__archive_obj.archive_content_li = load_archive_content_obj_li; - } + if (log_lvl) { + console.log(`archive_content_obj_li = `, load_archive_content_obj_li); + } + ae_promises.load__archive_obj.archive_content_li = load_archive_content_obj_li; + } - return ae_promises.load__archive_obj; + return ae_promises.load__archive_obj; } - // Updated 2024-11-20 -export async function load_ae_obj_li__archive( - { - api_cfg, - for_obj_type = 'account', - for_obj_id, - inc_content_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - inc_content_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__archive() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__archive({ + api_cfg, + for_obj_type = 'account', + for_obj_id, + inc_content_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + inc_content_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__archive() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - ae_promises.load__archive_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'archive', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: false, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (archive_obj_li_get_result) { - if (archive_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__archive_props({ - obj_li: archive_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_archives, - table_name: 'archive', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__archive_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'archive', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: false, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (archive_obj_li_get_result) { + if (archive_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__archive_props({ + obj_li: archive_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_archives, + table_name: 'archive', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__archive({ - // obj_type: 'archive', - // obj_li: archive_obj_li_get_result - // }); - } - return archive_obj_li_get_result; - } else { - return []; - } - }); + // db_save_ae_obj_li__archive({ + // obj_type: 'archive', + // obj_li: archive_obj_li_get_result + // }); + } + return archive_obj_li_get_result; + } else { + return []; + } + }); - if (log_lvl) { - console.log('ae_promises.load__archive_obj_li:', ae_promises.load__archive_obj_li); - } + if (log_lvl) { + console.log('ae_promises.load__archive_obj_li:', ae_promises.load__archive_obj_li); + } - if (inc_content_li) { - // Load the contents for the archives - if (log_lvl) { - console.log(`Need to load the content list for each archive now`); - } - for (let i = 0; i < ae_promises.load__archive_obj_li.length; i++) { - let archive_obj = ae_promises.load__archive_obj_li[i]; - let archive_id = archive_obj.archive_id_random; + if (inc_content_li) { + // Load the contents for the archives + if (log_lvl) { + console.log(`Need to load the content list for each archive now`); + } + for (let i = 0; i < ae_promises.load__archive_obj_li.length; i++) { + const archive_obj = ae_promises.load__archive_obj_li[i]; + const archive_id = archive_obj.archive_id_random; - let load_archive_content_obj_li = load_ae_obj_li__archive_content({ - api_cfg: api_cfg, - for_obj_type: 'archive', - for_obj_id: archive_id, - enabled: enabled, // all, disabled, enabled - hidden: hidden, // all, hidden, not_hidden - limit: limit, // Limit for the comments - offset: offset, - params: params, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((archive_content_obj_li) => { - if (log_lvl) { - console.log(`archive_content_obj_li = `, archive_content_obj_li); - } + const load_archive_content_obj_li = load_ae_obj_li__archive_content({ + api_cfg: api_cfg, + for_obj_type: 'archive', + for_obj_id: archive_id, + enabled: enabled, // all, disabled, enabled + hidden: hidden, // all, hidden, not_hidden + limit: limit, // Limit for the comments + offset: offset, + params: params, + try_cache: try_cache, + log_lvl: log_lvl + }).then((archive_content_obj_li) => { + if (log_lvl) { + console.log(`archive_content_obj_li = `, archive_content_obj_li); + } - return archive_content_obj_li; - }); + return archive_content_obj_li; + }); - if (log_lvl) { - console.log(`load_archive_content_obj_li = `, load_archive_content_obj_li); - } + if (log_lvl) { + console.log(`load_archive_content_obj_li = `, load_archive_content_obj_li); + } - if (load_archive_content_obj_li) { - ae_promises.load__archive_obj_li[i].archive_content_obj_li = load_archive_content_obj_li; - } - } - } + if (load_archive_content_obj_li) { + ae_promises.load__archive_obj_li[i].archive_content_obj_li = load_archive_content_obj_li; + } + } + } - return ae_promises.load__archive_obj_li; + return ae_promises.load__archive_obj_li; } - // Updated 2025-06-23 -export async function create_ae_obj__archive( - { - api_cfg, - account_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__archive() *** account_id=${account_id}`); - } +export async function create_ae_obj__archive({ + api_cfg, + account_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__archive() *** account_id=${account_id}`); + } - if (!account_id) { - console.log(`ERROR: Archives - Archive - account_id required to create`); - return false; - } + if (!account_id) { + console.log(`ERROR: Archives - Archive - account_id required to create`); + return false; + } - ae_promises.create__archive = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'archive', - fields: { - account_id_random: account_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (archive_obj_create_result) { - if (archive_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__archive_props({ - obj_li: [archive_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_archives, - table_name: 'archive', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__archive = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'archive', + fields: { + account_id_random: account_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (archive_obj_create_result) { + if (archive_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__archive_props({ + obj_li: [archive_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_archives, + table_name: 'archive', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__archive( - // { - // obj_type: 'archive', - // obj_li: [archive_obj_create_result] - // }); - } - return archive_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // db_save_ae_obj_li__archive( + // { + // obj_type: 'archive', + // obj_li: [archive_obj_create_result] + // }); + } + return archive_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.create__archive:', ae_promises.create__archive); - } - return ae_promises.create__archive; + if (log_lvl) { + console.log('ae_promises.create__archive:', ae_promises.create__archive); + } + return ae_promises.create__archive; } - // Updated 2024-11-08 -export async function delete_ae_obj_id__archive( - { - api_cfg, - archive_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - archive_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__archive() *** archive_id=${archive_id}`); - } +export async function delete_ae_obj_id__archive({ + api_cfg, + archive_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + archive_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__archive() *** archive_id=${archive_id}`); + } - ae_promises.delete__archive_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'archive', - obj_id: archive_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for archive_id=${archive_id}`); - } - db_archives.content.delete(archive_id); // Delete from the DB no matter what. - } - }); + ae_promises.delete__archive_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'archive', + obj_id: archive_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for archive_id=${archive_id}`); + } + db_archives.content.delete(archive_id); // Delete from the DB no matter what. + } + }); - if (log_lvl) { - console.log('ae_promises.delete__archive_obj:', ae_promises.delete__archive_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__archive_obj:', ae_promises.delete__archive_obj); + } - return ae_promises.delete__archive_obj; + return ae_promises.delete__archive_obj; } - // Updated 2025-06-23 -export async function update_ae_obj__archive( - { - api_cfg, - archive_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - archive_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__archive() *** archive_id=${archive_id}`, data_kv); - } +export async function update_ae_obj__archive({ + api_cfg, + archive_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + archive_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** update_ae_obj__archive() *** archive_id=${archive_id}`, data_kv); + } - // Perform the API update - const result = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'archive', - obj_id: archive_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }); + // Perform the API update + const result = await api.update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'archive', + obj_id: archive_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }); - // Handle the result - if (result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__archive_props({ - obj_li: [result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_archives, - table_name: 'archive', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // Handle the result + if (result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__archive_props({ + obj_li: [result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_archives, + table_name: 'archive', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__archive({ - // obj_type: 'archive', - // obj_li: [result], - // log_lvl: log_lvl, - // }); - } - return result; - } else { - console.error('Failed to update archive.'); - return null; - } + // await db_save_ae_obj_li__archive({ + // obj_type: 'archive', + // obj_li: [result], + // log_lvl: log_lvl, + // }); + } + return result; + } else { + console.error('Failed to update archive.'); + return null; + } } - // This new function is using CRUD v2. This should allow for more flexibility in the queries. // Updated 2024-09-25 -export async function qry__archive( - { - api_cfg, - archive_id, - qry_str, - qry_files, - qry_start_datetime, // Example greater than: '2024-10-24' - enabled = 'enabled', - hidden = 'not_hidden', - limit = 50, - offset = 0, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - archive_id: any, - qry_str?: string, - qry_files?: null|boolean, - qry_start_datetime?: null|string, // Greater than this datetime - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, - offset?: number, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - console.log(`*** qry__archive() *** archive_id=${archive_id} qry_str=${qry_str}`); +export async function qry__archive({ + api_cfg, + archive_id, + qry_str, + qry_files, + qry_start_datetime, // Example greater than: '2024-10-24' + enabled = 'enabled', + hidden = 'not_hidden', + limit = 50, + offset = 0, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + archive_id: any; + qry_str?: string; + qry_files?: null | boolean; + qry_start_datetime?: null | string; // Greater than this datetime + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; + offset?: number; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + console.log(`*** qry__archive() *** archive_id=${archive_id} qry_str=${qry_str}`); - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 25); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 25); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // if (qry_str && qry_str.length > 2) { - // params_json['ft_qry'] = {}; - // params_json['ft_qry']['default_qry_str'] = qry_str; - // } + // if (qry_str && qry_str.length > 2) { + // params_json['ft_qry'] = {}; + // params_json['ft_qry']['default_qry_str'] = qry_str; + // } - params_json['qry'] = []; + params_json['qry'] = []; - if (qry_files === true) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: ">", - value: 0 - }; - params_json['qry'].push(qry_param); - } else if (qry_files === false) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: "IS", - value: null - }; - params_json['qry'].push(qry_param); - } + if (qry_files === true) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: '>', + value: 0 + }; + params_json['qry'].push(qry_param); + } else if (qry_files === false) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: 'IS', + value: null + }; + params_json['qry'].push(qry_param); + } - if (qry_start_datetime) { - let qry_param = - { - type: "AND", - field: "start_datetime", - operator: ">", - value: qry_start_datetime - }; - params_json['qry'].push(qry_param); - } + if (qry_start_datetime) { + const qry_param = { + type: 'AND', + field: 'start_datetime', + operator: '>', + value: qry_start_datetime + }; + params_json['qry'].push(qry_param); + } - let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}; + const order_by_li = { + priority: 'DESC', + sort: 'DESC', + start_datetime: 'ASC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }; - ae_promises.load__archive_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'archive', - for_obj_type: 'event', - for_obj_id: archive_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for archive searching - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (archive_obj_li_get_result) { - if (archive_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__archive_props({ - obj_li: archive_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_archives, - table_name: 'archive', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return archive_obj_li_get_result; - } else { - return []; - } - }); + ae_promises.load__archive_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'archive', + for_obj_type: 'event', + for_obj_id: archive_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for archive searching + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (archive_obj_li_get_result) { + if (archive_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__archive_props({ + obj_li: archive_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_archives, + table_name: 'archive', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return archive_obj_li_get_result; + } else { + return []; + } + }); - if (log_lvl) { - console.log('ae_promises.load__archive_obj_li:', ae_promises.load__archive_obj_li); - } - return ae_promises.load__archive_obj_li; + if (log_lvl) { + console.log('ae_promises.load__archive_obj_li:', ae_promises.load__archive_obj_li); + } + return ae_promises.load__archive_obj_li; } - // // Updated 2024-09-25 // export async function search__archive( // { @@ -751,60 +747,55 @@ export async function qry__archive( // return ae_promises.load__archive_obj_li; // } - - - - // Updated 2025-06-04 export const properties_to_save = [ - 'id', - 'archive_id', - // 'archive_id_random', + 'id', + 'archive_id', + // 'archive_id_random', - 'code', + 'code', - 'account_id', - // 'account_id_random', + 'account_id', + // 'account_id_random', - 'name', - 'description', + 'name', + 'description', - 'original_datetime', - 'original_timezone', - 'original_location', + 'original_datetime', + 'original_timezone', + 'original_location', - 'original_url', - 'original_url_text', + 'original_url', + 'original_url_text', - 'sort_by', - 'sort_by_desc', + 'sort_by', + 'sort_by_desc', - 'cfg_json', + 'cfg_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2' + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - // 'archive_content_count', + // From SQL view + // 'archive_content_count', - // A key value list of the contents - // 'archive_content_kv', - // 'archive_content_li', + // A key value list of the contents + // 'archive_content_kv', + // 'archive_content_li', ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -873,7 +864,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-06-04 export async function process_ae_obj__archive_props({ obj_li, @@ -898,4 +888,4 @@ export async function process_ae_obj__archive_props({ return obj; } }); -} \ No newline at end of file +} diff --git a/src/lib/ae_archives/ae_archives__archive_content.ts b/src/lib/ae_archives/ae_archives__archive_content.ts index b71a07ac..7833120d 100644 --- a/src/lib/ae_archives/ae_archives__archive_content.ts +++ b/src/lib/ae_archives/ae_archives__archive_content.ts @@ -1,475 +1,482 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_archives } from "$lib/ae_archives/db_archives"; - -let ae_promises: key_val = {}; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_archives } from '$lib/ae_archives/db_archives'; +const ae_promises: key_val = {}; // TESTING NOTE: I changed these to all use async and await. Not sure if this helps or hurts things. Mainly this is related to the Dexie DB changes. 2024-11-08 - // Updated 2024-09-25 -export async function load_ae_obj_id__archive_content( - { - api_cfg, - archive_content_id, - // enabled = 'enabled', - // hidden = 'not_hidden', - // limit = 99, - // offset = 0, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - archive_content_id: string, - // enabled?: "enabled" | "all" | "not_enabled" | undefined, - // hidden?: "hidden" | "all" | "not_hidden" | undefined, - // limit?: number, - // offset?: number, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__archive_content() *** archive_content_id=${archive_content_id}`); - } +export async function load_ae_obj_id__archive_content({ + api_cfg, + archive_content_id, + // enabled = 'enabled', + // hidden = 'not_hidden', + // limit = 99, + // offset = 0, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + archive_content_id: string; + // enabled?: "enabled" | "all" | "not_enabled" | undefined, + // hidden?: "hidden" | "all" | "not_hidden" | undefined, + // limit?: number, + // offset?: number, + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_id__archive_content() *** archive_content_id=${archive_content_id}` + ); + } - ae_promises.load__archive_content_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'archive_content', - obj_id: archive_content_id, - use_alt_table: false, - use_alt_base: false, - params: params, - log_lvl: log_lvl - }) - .then(async function (archive_content_obj_get_result) { - if (archive_content_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__archive_content_props({ - obj_li: [archive_content_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_archives, - table_name: 'content', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__archive_content_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'archive_content', + obj_id: archive_content_id, + use_alt_table: false, + use_alt_base: false, + params: params, + log_lvl: log_lvl + }) + .then(async function (archive_content_obj_get_result) { + if (archive_content_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__archive_content_props({ + obj_li: [archive_content_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_archives, + table_name: 'content', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // await db_save_ae_obj_li__archive_content({ - // obj_type: 'archive_content', - // obj_li: [archive_content_obj_get_result] + // // This is expecting a list + // await db_save_ae_obj_li__archive_content({ + // obj_type: 'archive_content', + // obj_li: [archive_content_obj_get_result] - // }); - } - return archive_content_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // }); + } + return archive_content_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - return ae_promises.load__archive_content_obj; + return ae_promises.load__archive_content_obj; } - // Updated 2024-11-20 -export async function load_ae_obj_li__archive_content( - { - api_cfg, - for_obj_type = 'archive', - for_obj_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'original_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__archive_content() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__archive_content({ + api_cfg, + for_obj_type = 'archive', + for_obj_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + original_datetime: 'ASC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__archive_content() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - // console('params_json:', params_json); + // console('params_json:', params_json); - ae_promises.load__archive_content_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'archive_content', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: false, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (archive_content_obj_li_get_result) { - if (archive_content_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__archive_content_props({ - obj_li: archive_content_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_archives, - table_name: 'content', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__archive_content_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'archive_content', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: false, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (archive_content_obj_li_get_result) { + if (archive_content_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__archive_content_props({ + obj_li: archive_content_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_archives, + table_name: 'content', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__archive_content({ - // obj_type: 'archive_content', obj_li: archive_content_obj_li_get_result - // }); - } - return archive_content_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // await db_save_ae_obj_li__archive_content({ + // obj_type: 'archive_content', obj_li: archive_content_obj_li_get_result + // }); + } + return archive_content_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__archive_content_obj_li:', ae_promises.load__archive_content_obj_li); - } + if (log_lvl) { + console.log( + 'ae_promises.load__archive_content_obj_li:', + ae_promises.load__archive_content_obj_li + ); + } - return ae_promises.load__archive_content_obj_li; + return ae_promises.load__archive_content_obj_li; } - // Updated 2025-06-23 -export async function create_ae_obj__archive_content( - { - api_cfg, - archive_id, - data_kv, - params={}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - archive_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__archive_content() *** archive_id=${archive_id}`); - } +export async function create_ae_obj__archive_content({ + api_cfg, + archive_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + archive_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__archive_content() *** archive_id=${archive_id}`); + } - if (!archive_id) { - console.log(`ERROR: Archives - Content - archive_id required to create`); - return false; - } + if (!archive_id) { + console.log(`ERROR: Archives - Content - archive_id required to create`); + return false; + } - ae_promises.create__archive_content = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'archive_content', - fields: { - archive_id_random: archive_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (archive_content_obj_create_result) { - if (archive_content_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__archive_content_props({ - obj_li: [archive_content_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_archives, - table_name: 'content', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__archive_content = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'archive_content', + fields: { + archive_id_random: archive_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (archive_content_obj_create_result) { + if (archive_content_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__archive_content_props({ + obj_li: [archive_content_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_archives, + table_name: 'content', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__archive_content( - // { - // obj_type: 'archive_content', - // obj_li: [archive_content_obj_create_result] - // }); - } - return archive_content_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // await db_save_ae_obj_li__archive_content( + // { + // obj_type: 'archive_content', + // obj_li: [archive_content_obj_create_result] + // }); + } + return archive_content_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.create__archive_content:', ae_promises.create__archive_content); - } - return ae_promises.create__archive_content; + if (log_lvl) { + console.log('ae_promises.create__archive_content:', ae_promises.create__archive_content); + } + return ae_promises.create__archive_content; } - // Updated 2024-11-08 -export async function delete_ae_obj_id__archive_content( - { - api_cfg, - archive_content_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - archive_content_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__archive_content() *** archive_content_id=${archive_content_id}`); - } +export async function delete_ae_obj_id__archive_content({ + api_cfg, + archive_content_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + archive_content_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** delete_ae_obj_id__archive_content() *** archive_content_id=${archive_content_id}` + ); + } - ae_promises.delete__archive_content_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'archive_content', - obj_id: archive_content_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for archive_content_id=${archive_content_id}`); - } - db_archives.content.delete(archive_content_id); // Delete from the DB no matter what. - } - }); + ae_promises.delete__archive_content_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'archive_content', + obj_id: archive_content_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log( + `Attempting to remove IDB entry for archive_content_id=${archive_content_id}` + ); + } + db_archives.content.delete(archive_content_id); // Delete from the DB no matter what. + } + }); - if (log_lvl) { - console.log('ae_promises.delete__archive_content_obj:', ae_promises.delete__archive_content_obj); - } + if (log_lvl) { + console.log( + 'ae_promises.delete__archive_content_obj:', + ae_promises.delete__archive_content_obj + ); + } - return ae_promises.delete__archive_content_obj; + return ae_promises.delete__archive_content_obj; } - // Updated 2025-06-23 -export async function update_ae_obj__archive_content( - { - api_cfg, - archive_content_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - archive_content_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__archive_content() *** archive_content_id=${archive_content_id}`, data_kv); - } +export async function update_ae_obj__archive_content({ + api_cfg, + archive_content_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + archive_content_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj__archive_content() *** archive_content_id=${archive_content_id}`, + data_kv + ); + } - // Perform the API update - const result = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'archive_content', - obj_id: archive_content_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl, - }); + // Perform the API update + const result = await api.update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'archive_content', + obj_id: archive_content_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }); - // Handle the result - if (result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__archive_content_props({ - obj_li: [result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_archives, - table_name: 'content', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // Handle the result + if (result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__archive_content_props({ + obj_li: [result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_archives, + table_name: 'content', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__archive_content({ - // obj_type: 'archive_content', - // obj_li: [result], - // log_lvl: log_lvl, - // }); - } - return result; - } else { - console.error('Failed to update archive content.'); - return null; - } + // await db_save_ae_obj_li__archive_content({ + // obj_type: 'archive_content', + // obj_li: [result], + // log_lvl: log_lvl, + // }); + } + return result; + } else { + console.error('Failed to update archive content.'); + return null; + } } - - - - // Updated 2025-06-04 export const properties_to_save = [ - 'id', - 'archive_content_id', - // 'archive_content_id_random', + 'id', + 'archive_content_id', + // 'archive_content_id_random', - 'archive_id', - // 'archive_id_random', + 'archive_id', + // 'archive_id_random', - 'archive_content_type', + 'archive_content_type', - 'name', - 'description', + 'name', + 'description', - 'content_html', - 'content_json', + 'content_html', + 'content_json', - 'url', - 'url_text', + 'url', + 'url_text', - 'hosted_file_id', - 'hosted_file_id_random', + 'hosted_file_id', + 'hosted_file_id_random', - 'file_path', + 'file_path', - 'filename', - 'file_extension', + 'filename', + 'file_extension', - 'original_datetime', - 'original_timezone', - 'original_location', - 'original_url', - 'original_url_text', + 'original_datetime', + 'original_timezone', + 'original_location', + 'original_url', + 'original_url_text', - 'enable_for_public', + 'enable_for_public', - 'cfg_json', + 'cfg_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - 'archive_code', - 'archive_name', + // From SQL view + 'archive_code', + 'archive_name', - 'hash_sha256' + 'hash_sha256' ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -538,7 +545,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-06-04 export async function process_ae_obj__archive_content_props({ obj_li, @@ -557,9 +563,11 @@ export async function process_ae_obj__archive_content_props({ obj.sort?.toString().padStart(3, '0') ?? '' }_${obj.original_datetime ?? ''}`; obj.tmp_sort_2 = `${obj.group ?? ''}_${obj.original_datetime ?? ''}_${ - obj.priority ? '1' : '0'}_${obj.sort?.toString().padStart(3, '0') ?? ''}`; + obj.priority ? '1' : '0' + }_${obj.sort?.toString().padStart(3, '0') ?? ''}`; obj.tmp_sort_3 = `${obj.original_datetime ?? ''}_${obj.group ?? ''}_${ - obj.priority ? '1' : '0'}_${obj.sort?.toString().padStart(3, '0') ?? ''}`; + obj.priority ? '1' : '0' + }_${obj.sort?.toString().padStart(3, '0') ?? ''}`; obj.hash_sha256 = obj.hosted_file_hash_sha256; diff --git a/src/lib/ae_archives/ae_archives_functions.ts b/src/lib/ae_archives/ae_archives_functions.ts index 95a42aae..cc963426 100644 --- a/src/lib/ae_archives/ae_archives_functions.ts +++ b/src/lib/ae_archives/ae_archives_functions.ts @@ -1,38 +1,32 @@ // This file is used to export all the functions that are used for Aether Posts related functions. import { - load_ae_obj_id__archive, - load_ae_obj_li__archive, - create_ae_obj__archive, - delete_ae_obj_id__archive, - update_ae_obj__archive, - -} from "$lib/ae_archives/ae_archives__archive"; - + load_ae_obj_id__archive, + load_ae_obj_li__archive, + create_ae_obj__archive, + delete_ae_obj_id__archive, + update_ae_obj__archive +} from '$lib/ae_archives/ae_archives__archive'; import { - load_ae_obj_id__archive_content, - load_ae_obj_li__archive_content, - create_ae_obj__archive_content, - delete_ae_obj_id__archive_content, - update_ae_obj__archive_content, + load_ae_obj_id__archive_content, + load_ae_obj_li__archive_content, + create_ae_obj__archive_content, + delete_ae_obj_id__archive_content, + update_ae_obj__archive_content +} from '$lib/ae_archives/ae_archives__archive_content'; -} from "$lib/ae_archives/ae_archives__archive_content"; - - -let export_obj = { - load_ae_obj_id__archive: load_ae_obj_id__archive, - load_ae_obj_li__archive: load_ae_obj_li__archive, - create_ae_obj__archive: create_ae_obj__archive, - delete_ae_obj_id__archive: delete_ae_obj_id__archive, - update_ae_obj__archive: update_ae_obj__archive, - - - load_ae_obj_id__archive_content: load_ae_obj_id__archive_content, - load_ae_obj_li__archive_content: load_ae_obj_li__archive_content, - create_ae_obj__archive_content: create_ae_obj__archive_content, - delete_ae_obj_id__archive_content: delete_ae_obj_id__archive_content, - update_ae_obj__archive_content: update_ae_obj__archive_content, +const export_obj = { + load_ae_obj_id__archive: load_ae_obj_id__archive, + load_ae_obj_li__archive: load_ae_obj_li__archive, + create_ae_obj__archive: create_ae_obj__archive, + delete_ae_obj_id__archive: delete_ae_obj_id__archive, + update_ae_obj__archive: update_ae_obj__archive, + load_ae_obj_id__archive_content: load_ae_obj_id__archive_content, + load_ae_obj_li__archive_content: load_ae_obj_li__archive_content, + create_ae_obj__archive_content: create_ae_obj__archive_content, + delete_ae_obj_id__archive_content: delete_ae_obj_id__archive_content, + update_ae_obj__archive_content: update_ae_obj__archive_content }; -export let archives_func = export_obj; \ No newline at end of file +export const archives_func = export_obj; diff --git a/src/lib/ae_archives/db_archives.ts b/src/lib/ae_archives/db_archives.ts index 2bef6ce1..e324c77a 100644 --- a/src/lib/ae_archives/db_archives.ts +++ b/src/lib/ae_archives/db_archives.ts @@ -7,136 +7,135 @@ import type { key_val } from '$lib/stores/ae_stores'; // Updated 2024-09-25 export interface Archive { - id: string; - // id_random: string; - archive_id: string; - // archive_id_random: string; + id: string; + // id_random: string; + archive_id: string; + // archive_id_random: string; - code?: null|string; + code?: null | string; - account_id: string; - // account_id_random: string; + account_id: string; + // account_id_random: string; - // archive_type: string; + // archive_type: string; - // type: string; - name: string; - // summary?: null|string; - description?: null|string; + // type: string; + name: string; + // summary?: null|string; + description?: null | string; - content_html?: null|string; - content_json?: null|string; - content_url?: null|string; - content_url_text?: null|string; + content_html?: null | string; + content_json?: null | string; + content_url?: null | string; + content_url_text?: null | string; - original_datetime?: Date; - original_timezone?: null|string; - original_location?: null|string; + original_datetime?: Date; + original_timezone?: null | string; + original_location?: null | string; - original_url?: null|string; - original_url_text?: null|string; + original_url?: null | string; + original_url_text?: null | string; - // meta_data?: null|string; - // access_key?: null|string; /// Rename this to "passcode" if used later + // meta_data?: null|string; + // access_key?: null|string; /// Rename this to "passcode" if used later - sort_by?: null|string; - sort_by_desc?: null|string; + sort_by?: null | string; + sort_by_desc?: null | string; - cfg_json?: null|key_val; + cfg_json?: null | key_val; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - // archive_content_count?: number; - // archive_content_kv?: null|key_val; - // archive_content_li?: null|[]; + // Additional fields for convenience (database views) + // archive_content_count?: number; + // archive_content_kv?: null|key_val; + // archive_content_li?: null|[]; } // Updated 2024-09-25 export interface Archive_Content { - id: string; - // id_random: string; - archive_content_id: string; - // archive_content_id_random: string; + id: string; + // id_random: string; + archive_content_id: string; + // archive_content_id_random: string; - archive_id: string; - // archive_id_random: string; + archive_id: string; + // archive_id_random: string; - archive_content_type: string; + archive_content_type: string; - name: string; - description?: null|string; + name: string; + description?: null | string; - content_html?: null|string; - content_json?: null|string; + content_html?: null | string; + content_json?: null | string; - // linked_li_json?: null|string; // For future use? linked content list instead of one content item + // linked_li_json?: null|string; // For future use? linked content list instead of one content item - url?: null|string; - url_text?: null|string; + url?: null | string; + url_text?: null | string; - hosted_file_id?: string; + hosted_file_id?: string; - file_path?: null|string; + file_path?: null | string; - filename?: null|string; - file_extension?: null|string; + filename?: null | string; + file_extension?: null | string; - original_datetime?: Date; - original_timezone?: null|string; - original_location?: null|string; - original_url?: null|string; - original_url_text?: null|string; + original_datetime?: Date; + original_timezone?: null | string; + original_location?: null | string; + original_url?: null | string; + original_url_text?: null | string; - // meta_data?: null|string; - // access_key?: null|string; /// Rename this to "passcode" if used later + // meta_data?: null|string; + // access_key?: null|string; /// Rename this to "passcode" if used later - enable_for_public?: boolean; + enable_for_public?: boolean; - cfg_json?: null|key_val; + cfg_json?: null | key_val; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - archive_code?: null|string; - archive_name?: null|string; + // Additional fields for convenience (database views) + archive_code?: null | string; + archive_name?: null | string; - hash_sha256?: null|string; + hash_sha256?: null | string; } - // Updated 2024-09-25 export class MySubClassedDexie extends Dexie { - // We just tell the typing system this is the case - archive!: Table; - content!: Table; + // We just tell the typing system this is the case + archive!: Table; + content!: Table; - constructor() { - super('ae_archives_db'); - this.version(1).stores({ - archive: ` + constructor() { + super('ae_archives_db'); + this.version(1).stores({ + archive: ` id, archive_id, code, account_id, @@ -144,7 +143,7 @@ export class MySubClassedDexie extends Dexie { original_datetime, original_timezone, original_location, tmp_sort_1, tmp_sort_2, enable, hide, priority, sort, group, notes, created_on, updated_on`, - content: ` + content: ` id, archive_content_id, archive_id, archive_content_type, @@ -153,14 +152,14 @@ export class MySubClassedDexie extends Dexie { original_datetime, original_timezone, original_location, [group+original_datetime], tmp_sort_1, tmp_sort_2, - enable, hide, priority, sort, group, notes, created_on, updated_on, [group+priority+sort+updated_on]`, - }); + enable, hide, priority, sort, group, notes, created_on, updated_on, [group+priority+sort+updated_on]` + }); - // file_path, - // filename, file_extension, - // original_datetime, original_timezone, original_location, original_url, original_url_text, - // enable_for_public, - } + // file_path, + // filename, file_extension, + // original_datetime, original_timezone, original_location, original_url, original_url_text, + // enable_for_public, + } } -export const db_archives = new MySubClassedDexie(); \ No newline at end of file +export const db_archives = new MySubClassedDexie(); diff --git a/src/lib/ae_core/ae_comp__hosted_files_clip_video.svelte b/src/lib/ae_core/ae_comp__hosted_files_clip_video.svelte index 51d41543..ef295827 100644 --- a/src/lib/ae_core/ae_comp__hosted_files_clip_video.svelte +++ b/src/lib/ae_core/ae_comp__hosted_files_clip_video.svelte @@ -1,367 +1,387 @@ - -
- - -

- {Object.entries(hosted_file_obj_kv).length}× files uploaded -

+

+ {Object.entries(hosted_file_obj_kv).length}× files uploaded +

-{#each Object.entries(hosted_file_obj_kv) as [hosted_file_id, hosted_file_obj]} -
- -
- - +
+ + - - - {ae_util.shorten_filename({filename: hosted_file_obj?.filename, max_length: 30})} - - - File ID: - - {hosted_file_obj.hosted_file_id_random} - - - Type: - - {hosted_file_obj.extension} - -
+ + {ae_util.shorten_filename({ filename: hosted_file_obj?.filename, max_length: 30 })} + + + {ae_util.shorten_filename({ filename: hosted_file_obj?.filename, max_length: 30 })} + + File ID: + {hosted_file_obj.hosted_file_id_random} + + Type: + {hosted_file_obj.extension} + +
-
- + + - + -
- New Filename: - -
+
+ New Filename: + +
-
- +
+ - + - - - Re-encode? - - - - + + Re-encode? + + + - - - Scale down? - - - - -
+ + Scale down? + + + +
- + +
- + {#await ae_promises[hosted_file_id]} + + Processing... This may take a few minutes. + {:then} + {#if ae_promises[hosted_file_id]} + Ready to download below! + {:else} + + {/if} + {/await} +
+ {/each} - {#await ae_promises[hosted_file_id]} - - Processing... This may take a few minutes. - {:then} - {#if ae_promises[hosted_file_id]} - Ready to download below! - {:else} - - {/if} - {/await} - - -{/each} - - - -
\ No newline at end of file + diff --git a/src/lib/ae_core/ae_comp__hosted_files_clip_video_li.svelte b/src/lib/ae_core/ae_comp__hosted_files_clip_video_li.svelte index cac3bc54..f1c5125f 100644 --- a/src/lib/ae_core/ae_comp__hosted_files_clip_video_li.svelte +++ b/src/lib/ae_core/ae_comp__hosted_files_clip_video_li.svelte @@ -1,88 +1,90 @@ -

{Object.entries($ae_loc.files).length}× files clipped

+ {#each Object.entries(video_clip_file_kv) as [hosted_file_id, hosted_file_obj]} + - {/each} -
\ No newline at end of file + + {ae_util.format_bytes(hosted_file_obj?.size)} + + + {/each} + diff --git a/src/lib/ae_core/ae_comp__hosted_files_clip_video_v1.svelte b/src/lib/ae_core/ae_comp__hosted_files_clip_video_v1.svelte index b6af38ab..79ce4fd4 100644 --- a/src/lib/ae_core/ae_comp__hosted_files_clip_video_v1.svelte +++ b/src/lib/ae_core/ae_comp__hosted_files_clip_video_v1.svelte @@ -1,382 +1,408 @@ -
- -
+ + + + - - + - + {#await ae_promises.upload__hosted_file_obj} +
+ + + Uploading + {#if $ae_sess.api_upload_kv[task_id]} + {$ae_sess.api_upload_kv[task_id].percent_completed}% + {/if} + +
+ {/await} - {#await ae_promises.upload__hosted_file_obj} -
- - - Uploading - {#if $ae_sess.api_upload_kv[task_id]} - {$ae_sess.api_upload_kv[task_id].percent_completed}% - {/if} - -
- {/await} + - + - + - - - - + {$ae_sess.files.processed_file_list.length == 1 + ? `${$ae_sess.files.processed_file_list.length} file` + : `${$ae_sess.files.processed_file_list.length} files`} + {:else} + No files selected + {/if} + + + {/await} + + +
-
- -{#await ae_promises.upload__hosted_file_obj} - -

Converting... This may take a few minutes.

-{:then} - {#if ae_promises.upload__hosted_file_obj} - Ready to Download - {:else} -

Fill out the form and select the video file to clip.

- {/if} -{/await} - -
\ No newline at end of file + {#await ae_promises.upload__hosted_file_obj} + +

Converting... This may take a few minutes.

+ {:then} + {#if ae_promises.upload__hosted_file_obj} + Ready to Download + {:else} +

Fill out the form and select the video file to clip.

+ {/if} + {/await} + diff --git a/src/lib/ae_core/ae_comp__hosted_files_download_button.svelte b/src/lib/ae_core/ae_comp__hosted_files_download_button.svelte index ff7382d7..4e79c016 100644 --- a/src/lib/ae_core/ae_comp__hosted_files_download_button.svelte +++ b/src/lib/ae_core/ae_comp__hosted_files_download_button.svelte @@ -1,152 +1,153 @@ - {#if hosted_file_id && hosted_file_obj} - + {#if download_complete === null} + File not found + {:else if download_complete === false} + Failed to download! + {/if} + + {ae_util.shorten_filename({ + filename: filename ?? hosted_file_obj?.filename, + max_length: max_length + })} + + {:else} - - - -{/if} \ No newline at end of file + +{/if} diff --git a/src/lib/ae_core/ae_comp__hosted_files_upload.svelte b/src/lib/ae_core/ae_comp__hosted_files_upload.svelte index 1e4ca3e3..053f482c 100644 --- a/src/lib/ae_core/ae_comp__hosted_files_upload.svelte +++ b/src/lib/ae_core/ae_comp__hosted_files_upload.svelte @@ -1,275 +1,281 @@ - -
+ + {#await ae_promises.upload__hosted_file_obj} +
+ + + Uploading + {#if $ae_sess.api_upload_kv[task_id]} + {$ae_sess.api_upload_kv[task_id].percent_completed}% + {/if} + +
+ {/await} - {#await ae_promises.upload__hosted_file_obj} -
- - - Uploading - {#if $ae_sess.api_upload_kv[task_id]} - {$ae_sess.api_upload_kv[task_id].percent_completed}% - {/if} - -
- {/await} + - - - + class:hidden={$ae_sess.files.disable_submit__hosted_file_obj} + /> - - bind:file_list_status={$ae_sess.files.status__file_list} - bind:processed_file_list={$ae_sess.files.processed_file_list} - table_class_li={table_class_li} - /> - - + {$ae_sess.files.processed_file_list.length == 1 + ? `${$ae_sess.files.processed_file_list.length} file` + : `${$ae_sess.files.processed_file_list.length} files`} + {:else} + No files selected + {/if} + + + {/await} + diff --git a/src/lib/ae_core/ae_core_functions.ts b/src/lib/ae_core/ae_core_functions.ts index c9f7f64b..73b809ec 100644 --- a/src/lib/ae_core/ae_core_functions.ts +++ b/src/lib/ae_core/ae_core_functions.ts @@ -3,356 +3,336 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; import { - load_ae_obj_id__activity_log, - load_ae_obj_li__activity_log, - create_ae_obj__activity_log, - update_ae_obj__activity_log, - // db_save_ae_obj_li__activity_log -} from "$lib/ae_core/core__activity_log"; + load_ae_obj_id__activity_log, + load_ae_obj_li__activity_log, + create_ae_obj__activity_log, + update_ae_obj__activity_log + // db_save_ae_obj_li__activity_log +} from '$lib/ae_core/core__activity_log'; import { - load_ae_obj_id__person, - load_ae_obj_li__person, - create_ae_obj__person, - delete_ae_obj_id__person, - update_ae_obj__person, - // db_save_ae_obj_li__person -} from "$lib/ae_core/core__person"; + load_ae_obj_id__person, + load_ae_obj_li__person, + create_ae_obj__person, + delete_ae_obj_id__person, + update_ae_obj__person + // db_save_ae_obj_li__person +} from '$lib/ae_core/core__person'; import { - auth_ae_obj__username_password, - auth_ae_obj__user_id_user_auth_key, - send_email_auth_ae_obj__user_id, - qry_ae_obj_li__user_email, - auth_ae_obj__user_id_change_password, - // handle_load_ae_obj_id__user, - // handle_load_ae_obj_li__user, - // handle_create_ae_obj__user, - // handle_update_ae_obj__user, - // handle_db_save_ae_obj_li__user -} from "$lib/ae_core/core__user"; + auth_ae_obj__username_password, + auth_ae_obj__user_id_user_auth_key, + send_email_auth_ae_obj__user_id, + qry_ae_obj_li__user_email, + auth_ae_obj__user_id_change_password + // handle_load_ae_obj_id__user, + // handle_load_ae_obj_li__user, + // handle_create_ae_obj__user, + // handle_update_ae_obj__user, + // handle_db_save_ae_obj_li__user +} from '$lib/ae_core/core__user'; + +import { generate_qr_code, js_generate_qr_code } from '$lib/ae_core/core__qr_code'; + +import { check_hosted_file_obj_w_hash } from '$lib/ae_core/core__check_hosted_file_obj_w_hash'; + +import { load_ae_obj_li__time_zone } from '$lib/ae_core/core__time_zones'; + +import { load_ae_obj_li__country } from '$lib/ae_core/core__countries'; + +import { load_ae_obj_li__country_subdivision } from '$lib/ae_core/core__country_subdivisions'; import { - generate_qr_code, - js_generate_qr_code, -} from "$lib/ae_core/core__qr_code"; - -import { - check_hosted_file_obj_w_hash -} from "$lib/ae_core/core__check_hosted_file_obj_w_hash"; - -import { - load_ae_obj_li__time_zone -} from "$lib/ae_core/core__time_zones"; - -import { - load_ae_obj_li__country -} from "$lib/ae_core/core__countries"; - -import { - load_ae_obj_li__country_subdivision -} from "$lib/ae_core/core__country_subdivisions"; - -import { - load_ae_obj_id__hosted_file, - load_ae_obj_li__hosted_file, - delete_ae_obj_id__hosted_file, - db_save_ae_obj_li__hosted_file, - db_update_ae_obj_id__hosted_file -} from "$lib/ae_core/core__hosted_files"; + load_ae_obj_id__hosted_file, + load_ae_obj_li__hosted_file, + delete_ae_obj_id__hosted_file, + db_save_ae_obj_li__hosted_file, + db_update_ae_obj_id__hosted_file +} from '$lib/ae_core/core__hosted_files'; // This has more generic general purpose functions that can eventually replace the custom ones per object type. -import { - db_save_ae_obj_li__ae_obj, -} from "$lib/ae_core/core__idb_dexie"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; -import { - add_url_params, - clean_headers, -} from "$lib/ae_core/core__api_helpers"; - - -let ae_promises: key_val = {}; // Promise; +import { add_url_params, clean_headers } from '$lib/ae_core/core__api_helpers'; +const ae_promises: key_val = {}; // Promise; // Updated 2024-03-29 -async function handle_load_ae_obj_id__site_domain( - { - api_cfg, - fqdn, - try_cache = false, - timeout = 7000, - log_lvl = 0 - }: { - api_cfg: any, - fqdn: string, - try_cache?: boolean, - timeout?: number, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** handle_load_ae_obj_id__site_domain() *** api.base_url=${api_cfg.base_url}, fqdn=${fqdn}, timeout=${timeout}`); - } +async function handle_load_ae_obj_id__site_domain({ + api_cfg, + fqdn, + try_cache = false, + timeout = 7000, + log_lvl = 0 +}: { + api_cfg: any; + fqdn: string; + try_cache?: boolean; + timeout?: number; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** handle_load_ae_obj_id__site_domain() *** api.base_url=${api_cfg.base_url}, fqdn=${fqdn}, timeout=${timeout}` + ); + } - let no_account_id = false; - if (!api_cfg.account_id) { - no_account_id = true; - // api_cfg.headers['x_account_id'] = 'nothing here'; - } - no_account_id = true; + let no_account_id = false; + if (!api_cfg.account_id) { + no_account_id = true; + // api_cfg.headers['x_account_id'] = 'nothing here'; + } + no_account_id = true; - let params = {}; + const params = {}; // ae_sess.hub.site_domain_id_qry_status = 'loading'; - ae_promises.load__site_domain_obj = api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - no_account_id: no_account_id, - obj_type: 'site_domain', - obj_id: fqdn, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: true, // NOTE: This will use the table_name_alt value (v_site_domain_fqdn_id) instead of the table_name value in the API config. - use_alt_base: true, // NOTE: This will use the base_name_alt value (Site_Domain_FQDN_ID_Base) instead of the base_name value in the API config. - params: params, - timeout: timeout, - log_lvl: log_lvl - }) - .then(function (site_domain_obj_get_result) { - if (site_domain_obj_get_result) { - // slct.site_domain_obj = site_domain_obj_get_result; - // console.log(`site_domain object:`, get(slct).site_domain_obj); + ae_promises.load__site_domain_obj = api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + no_account_id: no_account_id, + obj_type: 'site_domain', + obj_id: fqdn, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: true, // NOTE: This will use the table_name_alt value (v_site_domain_fqdn_id) instead of the table_name value in the API config. + use_alt_base: true, // NOTE: This will use the base_name_alt value (Site_Domain_FQDN_ID_Base) instead of the base_name value in the API config. + params: params, + timeout: timeout, + log_lvl: log_lvl + }) + .then(function (site_domain_obj_get_result) { + if (site_domain_obj_get_result) { + // slct.site_domain_obj = site_domain_obj_get_result; + // console.log(`site_domain object:`, get(slct).site_domain_obj); - // ae_loc.account_id = $slct.site_domain_obj.account_id_random; - // ae_loc.site_id = $slct.site_domain_obj.site_id_random; - // ae_loc.site_domain_id = $slct.site_domain_obj.site_domain_id_random; - return site_domain_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // ae_loc.account_id = $slct.site_domain_obj.account_id_random; + // ae_loc.site_id = $slct.site_domain_obj.site_id_random; + // ae_loc.site_domain_id = $slct.site_domain_obj.site_domain_id_random; + return site_domain_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - return ae_promises.load__site_domain_obj; + return ae_promises.load__site_domain_obj; } - // Updated 2024-03-29 -async function handle_load_ae_obj_code__data_store( - { - api_cfg, - code, - data_type = 'text', - for_type = null, - for_id = null, - try_cache = true, - save_idb = false, - timeout = 9000, - log_lvl = 0 - }: { - api_cfg: any, - code: string, - data_type?: string, - for_type?: string|null, - for_id?: string|null, - try_cache?: boolean, - save_idb?: boolean, - timeout?: number, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** handle_get_data_store_obj_w_code() *** code=${code}`); - } +async function handle_load_ae_obj_code__data_store({ + api_cfg, + code, + data_type = 'text', + for_type = null, + for_id = null, + try_cache = true, + save_idb = false, + timeout = 9000, + log_lvl = 0 +}: { + api_cfg: any; + code: string; + data_type?: string; + for_type?: string | null; + for_id?: string | null; + try_cache?: boolean; + save_idb?: boolean; + timeout?: number; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** handle_get_data_store_obj_w_code() *** code=${code}`); + } - if (!code) { - console.log(`*ae_func* No code provided!`); - return false; - } + if (!code) { + console.log(`*ae_func* No code provided!`); + return false; + } - if (!api_cfg.account_id) { - console.log(`*ae_func* No account_id found in API config!`); - return false; - } + if (!api_cfg.account_id) { + console.log(`*ae_func* No account_id found in API config!`); + return false; + } - ae_promises.load__data_store_obj = api.get_data_store_obj_w_code({ - api_cfg: api_cfg, - data_store_code: code, - data_type: data_type, - timeout: timeout, - log_lvl: log_lvl - }) - .then(function (get_ds_result) { - let return_this = null; - if (get_ds_result) { - if (log_lvl) { - console.log(`*ae_func* Got a result for code ${code}`); - } + ae_promises.load__data_store_obj = api + .get_data_store_obj_w_code({ + api_cfg: api_cfg, + data_store_code: code, + data_type: data_type, + timeout: timeout, + log_lvl: log_lvl + }) + .then(function (get_ds_result) { + let return_this = null; + if (get_ds_result) { + if (log_lvl) { + console.log(`*ae_func* Got a result for code ${code}`); + } - if (!get_ds_result.data_store_id_random) { - console.log('*ae_func* Something went wrong? No data store ID found.'); - return false; - } + if (!get_ds_result.data_store_id_random) { + console.log('*ae_func* Something went wrong? No data store ID found.'); + return false; + } - // let ae_ds_tmp: key_val = {}; - let ds_code_obj = - { - id: null, - account_id: null, - code: code, - name: null, - type: data_type, - for_type: null, // for_type - for_id: null, // for_id - access_read: null, // 'super', 'administrator', 'trusted', 'anonymous' - access_write: null, // 'super', 'administrator', 'trusted', 'anonymous' - access_delete: null, // 'super', 'administrator', 'trusted', 'anonymous' - html: null, - json: null, - md: null, - text: null, - updated_on: null, - chk_account_id: api_cfg.account_id, - loaded_on: new Date().toISOString(), - }; - let val_json: key_val; - let val_html: key_val; - let val_md: key_val; - let val_sql: key_val; - let val_text: string; + // let ae_ds_tmp: key_val = {}; + const ds_code_obj = { + id: null, + account_id: null, + code: code, + name: null, + type: data_type, + for_type: null, // for_type + for_id: null, // for_id + access_read: null, // 'super', 'administrator', 'trusted', 'anonymous' + access_write: null, // 'super', 'administrator', 'trusted', 'anonymous' + access_delete: null, // 'super', 'administrator', 'trusted', 'anonymous' + html: null, + json: null, + md: null, + text: null, + updated_on: null, + chk_account_id: api_cfg.account_id, + loaded_on: new Date().toISOString() + }; + let val_json: key_val; + let val_html: key_val; + let val_md: key_val; + let val_sql: key_val; + let val_text: string; - // Set the loaded_on datetime to the current time for reference later. This will be used to determine if the data store is stale. - // ds_code_obj.loaded_on = new Date().toISOString(); - // Set the chk_account_id as a backup check to make sure the data store belongs to the account for the current site. This should not be needed, but here we are... - // ds_code_obj.chk_account_id = api_cfg.account_id; + // Set the loaded_on datetime to the current time for reference later. This will be used to determine if the data store is stale. + // ds_code_obj.loaded_on = new Date().toISOString(); + // Set the chk_account_id as a backup check to make sure the data store belongs to the account for the current site. This should not be needed, but here we are... + // ds_code_obj.chk_account_id = api_cfg.account_id; - ds_code_obj.id = get_ds_result.data_store_id_random; - ds_code_obj.account_id = get_ds_result.account_id_random; - ds_code_obj.code = get_ds_result.code; // This will overwrite whatever was passed in. - ds_code_obj.name = get_ds_result.name; - ds_code_obj.type = get_ds_result.type; // This will overwrite whatever was passed in. - if (data_type == 'html') { - ds_code_obj.html = get_ds_result.text; - val_html = get_ds_result.text; - return_this = get_ds_result.html; - } else if (data_type == 'json') { - ds_code_obj.json = get_ds_result.json; - val_json = get_ds_result.json; - return_this = get_ds_result.json; - } else if (data_type == 'md') { - ds_code_obj.text = get_ds_result.text; - val_md = get_ds_result.text; - return_this = get_ds_result.text; - } else if (data_type == 'sql') { - ds_code_obj.text = get_ds_result.text; - val_sql = get_ds_result.text; - return_this = get_ds_result.text; - } else { - ds_code_obj.text = get_ds_result.text; - val_text = get_ds_result.text; - return_this = get_ds_result.text; - } + ds_code_obj.id = get_ds_result.data_store_id_random; + ds_code_obj.account_id = get_ds_result.account_id_random; + ds_code_obj.code = get_ds_result.code; // This will overwrite whatever was passed in. + ds_code_obj.name = get_ds_result.name; + ds_code_obj.type = get_ds_result.type; // This will overwrite whatever was passed in. + if (data_type == 'html') { + ds_code_obj.html = get_ds_result.text; + val_html = get_ds_result.text; + return_this = get_ds_result.html; + } else if (data_type == 'json') { + ds_code_obj.json = get_ds_result.json; + val_json = get_ds_result.json; + return_this = get_ds_result.json; + } else if (data_type == 'md') { + ds_code_obj.text = get_ds_result.text; + val_md = get_ds_result.text; + return_this = get_ds_result.text; + } else if (data_type == 'sql') { + ds_code_obj.text = get_ds_result.text; + val_sql = get_ds_result.text; + return_this = get_ds_result.text; + } else { + ds_code_obj.text = get_ds_result.text; + val_text = get_ds_result.text; + return_this = get_ds_result.text; + } - // if (data_type == 'text') { - // // console.log(get_ds_result.text); - // return_this = get_ds_result.text; - // } else if (data_type == 'json') { - // // console.log(get_ds_result.json); - // return_this = get_ds_result.json; - // } + // if (data_type == 'text') { + // // console.log(get_ds_result.text); + // return_this = get_ds_result.text; + // } else if (data_type == 'json') { + // // console.log(get_ds_result.json); + // return_this = get_ds_result.json; + // } - if (save_idb) { - if (browser) { - let key_prefix = 'ae_ds__'; - if (log_lvl) { - console.log(`*ae_func* localStorage key: ${code}, value:`, get_ds_result); - } - localStorage.setItem(`${key_prefix}${code}`, JSON.stringify(get_ds_result)); - } else { - if (log_lvl) { - console.log('*ae_func* No browser! Can not use localStorage to save data store object.'); - } - } - } + if (save_idb) { + if (browser) { + const key_prefix = 'ae_ds__'; + if (log_lvl) { + console.log(`*ae_func* localStorage key: ${code}, value:`, get_ds_result); + } + localStorage.setItem(`${key_prefix}${code}`, JSON.stringify(get_ds_result)); + } else { + if (log_lvl) { + console.log( + '*ae_func* No browser! Can not use localStorage to save data store object.' + ); + } + } + } + } else { + console.log('*ae_func* No results returned.'); + return_this = null; + } + return return_this; + }) + .catch(function (error: any) { + console.log('*ae_func* No results returned or failed.', error); + }); - } else { - console.log('*ae_func* No results returned.'); - return_this = null; - } - return return_this; - }) - .catch(function (error: any) { - console.log('*ae_func* No results returned or failed.', error); - }); - - return ae_promises.load__data_store_obj; + return ae_promises.load__data_store_obj; } - // Updated 2024-03-27 -async function handle_update_ae_obj_id_crud( - { - api_cfg, - object_type, - object_id, - object_reload = false, - field_name, - new_field_value, - params = {}, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - object_type: string, - object_id: string, - object_reload?: boolean, - field_name: string, - new_field_value: any, - params: any|key_val, - try_cache: boolean, - log_lvl: number - }) { +async function handle_update_ae_obj_id_crud({ + api_cfg, + object_type, + object_id, + object_reload = false, + field_name, + new_field_value, + params = {}, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + object_type: string; + object_id: string; + object_reload?: boolean; + field_name: string; + new_field_value: any; + params: any | key_val; + try_cache: boolean; + log_lvl: number; +}) { + let patch_result: any = null; - let patch_result: any = null; + ae_promises.api_update__ae_obj = api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: object_type, + obj_id: object_id, + field_name: field_name, + field_value: new_field_value, + // fields: data, + key: api_cfg.api_crud_super_key, + // jwt: null, + // params: params, + // data: patch_data, + log_lvl: log_lvl + }) + .then(function (results) { + console.log('PATCH Promise', results); - ae_promises.api_update__ae_obj = api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: object_type, - obj_id: object_id, - field_name: field_name, - field_value: new_field_value, - // fields: data, - key: api_cfg.api_crud_super_key, - // jwt: null, - // params: params, - // data: patch_data, - log_lvl: log_lvl - }) - .then(function (results) { - console.log('PATCH Promise', results); - - if (results) { - console.log(`Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}`); - patch_result = 'PATCH complete'; - } else { - console.log(`Not Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}; Account ID: ${api_cfg.account_id}`); - patch_result = 'PATCH failed'; - return false; - } - return true; - }) - .catch(function (error: any) { - console.log('Something went wrong patching the record.'); - console.log(error); - return false; - }) - .finally(function () { - console.log('PATCH Promise finally'); - }); - - return ae_promises.api_update__ae_obj; + if (results) { + console.log(`Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}`); + patch_result = 'PATCH complete'; + } else { + console.log( + `Not Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}; Account ID: ${api_cfg.account_id}` + ); + patch_result = 'PATCH failed'; + return false; + } + return true; + }) + .catch(function (error: any) { + console.log('Something went wrong patching the record.'); + console.log(error); + return false; + }) + .finally(function () { + console.log('PATCH Promise finally'); + }); + return ae_promises.api_update__ae_obj; } // Core - Already imported above @@ -360,345 +340,341 @@ async function handle_update_ae_obj_id_crud( // import { load_ae_obj_id__user } from "$lib/ae_core/core__user"; // Additional Modules -import { load_ae_obj_id__archive } from "$lib/ae_archives/ae_archives__archive"; -import { load_ae_obj_id__archive_content } from "$lib/ae_archives/ae_archives__archive_content"; +import { load_ae_obj_id__archive } from '$lib/ae_archives/ae_archives__archive'; +import { load_ae_obj_id__archive_content } from '$lib/ae_archives/ae_archives__archive_content'; -import { load_ae_obj_id__event } from "$lib/ae_events/ae_events__event"; +import { load_ae_obj_id__event } from '$lib/ae_events/ae_events__event'; // import { load_ae_obj_id__event_badge } from "$lib/ae_events/ae_events__event_badge"; -import { load_ae_obj_id__event_device } from "$lib/ae_events/ae_events__event_device"; +import { load_ae_obj_id__event_device } from '$lib/ae_events/ae_events__event_device'; // import { load_ae_obj_id__event_exhibit } from "$lib/ae_events/ae_events__event_exhibit"; -import { load_ae_obj_id__event_file } from "$lib/ae_events/ae_events__event_file"; -import { load_ae_obj_id__event_location } from "$lib/ae_events/ae_events__event_location"; -import { load_ae_obj_id__event_presentation } from "$lib/ae_events/ae_events__event_presentation"; -import { load_ae_obj_id__event_presenter } from "$lib/ae_events/ae_events__event_presenter"; -import { load_ae_obj_id__event_session } from "$lib/ae_events/ae_events__event_session"; +import { load_ae_obj_id__event_file } from '$lib/ae_events/ae_events__event_file'; +import { load_ae_obj_id__event_location } from '$lib/ae_events/ae_events__event_location'; +import { load_ae_obj_id__event_presentation } from '$lib/ae_events/ae_events__event_presentation'; +import { load_ae_obj_id__event_presenter } from '$lib/ae_events/ae_events__event_presenter'; +import { load_ae_obj_id__event_session } from '$lib/ae_events/ae_events__event_session'; -import { load_ae_obj_id__journal } from "$lib/ae_journals/ae_journals__journal"; -import { load_ae_obj_id__journal_entry } from "$lib/ae_journals/ae_journals__journal_entry"; +import { load_ae_obj_id__journal } from '$lib/ae_journals/ae_journals__journal'; +import { load_ae_obj_id__journal_entry } from '$lib/ae_journals/ae_journals__journal_entry'; -import { load_ae_obj_id__post } from "$lib/ae_posts/ae_posts__post"; -import { load_ae_obj_id__post_comment } from "$lib/ae_posts/ae_posts__post_comment"; +import { load_ae_obj_id__post } from '$lib/ae_posts/ae_posts__post'; +import { load_ae_obj_id__post_comment } from '$lib/ae_posts/ae_posts__post_comment'; // Updated 2025-09-30 -async function update_ae_obj_id_crud_v2( - { - api_cfg, - object_type, - object_id, - object_reload = false, - field_name, - new_field_value, - params = {}, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - object_type: string, - object_id: string, - object_reload?: boolean, - field_name: string, - new_field_value: any, - params?: any|key_val, - try_cache?: boolean, - log_lvl?: number - }) { - if (log_lvl) { - console.log(`*** update_ae_obj_id_crud_v2() *** object_type=${object_type}, object_id=${object_id}, object_reload=${object_reload}, field_name=${field_name}, new_field_value=`, new_field_value); - } - let patch_result: any = null; +async function update_ae_obj_id_crud_v2({ + api_cfg, + object_type, + object_id, + object_reload = false, + field_name, + new_field_value, + params = {}, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + object_type: string; + object_id: string; + object_reload?: boolean; + field_name: string; + new_field_value: any; + params?: any | key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj_id_crud_v2() *** object_type=${object_type}, object_id=${object_id}, object_reload=${object_reload}, field_name=${field_name}, new_field_value=`, + new_field_value + ); + } + let patch_result: any = null; - ae_promises.api_update__ae_obj = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: object_type, - obj_id: object_id, - field_name: field_name, - field_value: new_field_value, - // fields: data, - key: api_cfg.api_crud_super_key, - // jwt: null, - // params: params, - // data: patch_data, - log_lvl: log_lvl - }) - .then(function (results) { - console.log('PATCH Promise', results); + ae_promises.api_update__ae_obj = await api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: object_type, + obj_id: object_id, + field_name: field_name, + field_value: new_field_value, + // fields: data, + key: api_cfg.api_crud_super_key, + // jwt: null, + // params: params, + // data: patch_data, + log_lvl: log_lvl + }) + .then(function (results) { + console.log('PATCH Promise', results); - if (results) { - console.log(`Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}`); - patch_result = 'PATCH complete'; + if (results) { + console.log(`Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}`); + patch_result = 'PATCH complete'; - if (object_reload) { - if (log_lvl) { - console.log(`Reloading the object after patching...`); - } - // Reload the object to get the latest data. There is a special case for each type. - if (object_type == 'person') { - let load_person_obj = load_ae_obj_id__person({ - api_cfg: api_cfg, - person_id: object_id, - log_lvl: log_lvl - }); - return load_person_obj; - } - // if (object_type == 'user') { - // let load_user_obj = load_ae_obj_id__user({ - // api_cfg: api_cfg, - // user_id: object_id, - // log_lvl: log_lvl - // }); - // return load_user_obj; - // } + if (object_reload) { + if (log_lvl) { + console.log(`Reloading the object after patching...`); + } + // Reload the object to get the latest data. There is a special case for each type. + if (object_type == 'person') { + const load_person_obj = load_ae_obj_id__person({ + api_cfg: api_cfg, + person_id: object_id, + log_lvl: log_lvl + }); + return load_person_obj; + } + // if (object_type == 'user') { + // let load_user_obj = load_ae_obj_id__user({ + // api_cfg: api_cfg, + // user_id: object_id, + // log_lvl: log_lvl + // }); + // return load_user_obj; + // } - if (object_type == 'archive') { - let load_archive_obj = load_ae_obj_id__archive({ - api_cfg: api_cfg, - archive_id: object_id, - log_lvl: log_lvl - }); - return load_archive_obj; - } - if (object_type == 'archive_content') { - let load_archive_content_obj = load_ae_obj_id__archive_content({ - api_cfg: api_cfg, - archive_content_id: object_id, - log_lvl: log_lvl - }); - return load_archive_content_obj; - } + if (object_type == 'archive') { + const load_archive_obj = load_ae_obj_id__archive({ + api_cfg: api_cfg, + archive_id: object_id, + log_lvl: log_lvl + }); + return load_archive_obj; + } + if (object_type == 'archive_content') { + const load_archive_content_obj = load_ae_obj_id__archive_content({ + api_cfg: api_cfg, + archive_content_id: object_id, + log_lvl: log_lvl + }); + return load_archive_content_obj; + } - if (object_type == 'journal') { - let load_journal_obj = load_ae_obj_id__journal({ - api_cfg: api_cfg, - journal_id: object_id, - log_lvl: log_lvl - }); - return load_journal_obj; - } - if (object_type == 'journal_entry') { - let load_journal_entry_obj = load_ae_obj_id__journal_entry({ - api_cfg: api_cfg, - journal_entry_id: object_id, - log_lvl: log_lvl - }); - return load_journal_entry_obj; - } + if (object_type == 'journal') { + const load_journal_obj = load_ae_obj_id__journal({ + api_cfg: api_cfg, + journal_id: object_id, + log_lvl: log_lvl + }); + return load_journal_obj; + } + if (object_type == 'journal_entry') { + const load_journal_entry_obj = load_ae_obj_id__journal_entry({ + api_cfg: api_cfg, + journal_entry_id: object_id, + log_lvl: log_lvl + }); + return load_journal_entry_obj; + } - if (object_type == 'event') { - let load_event_obj = load_ae_obj_id__event({ - api_cfg: api_cfg, - event_id: object_id, - log_lvl: log_lvl - }); - return load_event_obj; - } - if (object_type == 'event_device') { - let load_event_device_obj = load_ae_obj_id__event_device({ - api_cfg: api_cfg, - event_device_id: object_id, - log_lvl: log_lvl - }); - return load_event_device_obj; - } - if (object_type == 'event_file') { - let load_event_file_obj = load_ae_obj_id__event_file({ - api_cfg: api_cfg, - event_file_id: object_id, - log_lvl: log_lvl - }); - return load_event_file_obj; - } - if (object_type == 'event_location') { - let load_event_location_obj = load_ae_obj_id__event_location({ - api_cfg: api_cfg, - event_location_id: object_id, - log_lvl: log_lvl - }); - return load_event_location_obj; - } - if (object_type == 'event_presentation') { - let load_event_presentation_obj = load_ae_obj_id__event_presentation({ - api_cfg: api_cfg, - event_presentation_id: object_id, - log_lvl: log_lvl - }); - return load_event_presentation_obj; - } - if (object_type == 'event_presenter') { - let load_event_presenter_obj = load_ae_obj_id__event_presenter({ - api_cfg: api_cfg, - event_presenter_id: object_id, - log_lvl: log_lvl - }); - return load_event_presenter_obj; - } - if (object_type == 'event_session') { - let load_event_session_obj = load_ae_obj_id__event_session({ - api_cfg: api_cfg, - event_session_id: object_id, - log_lvl: log_lvl - }); - return load_event_session_obj; - } + if (object_type == 'event') { + const load_event_obj = load_ae_obj_id__event({ + api_cfg: api_cfg, + event_id: object_id, + log_lvl: log_lvl + }); + return load_event_obj; + } + if (object_type == 'event_device') { + const load_event_device_obj = load_ae_obj_id__event_device({ + api_cfg: api_cfg, + event_device_id: object_id, + log_lvl: log_lvl + }); + return load_event_device_obj; + } + if (object_type == 'event_file') { + const load_event_file_obj = load_ae_obj_id__event_file({ + api_cfg: api_cfg, + event_file_id: object_id, + log_lvl: log_lvl + }); + return load_event_file_obj; + } + if (object_type == 'event_location') { + const load_event_location_obj = load_ae_obj_id__event_location({ + api_cfg: api_cfg, + event_location_id: object_id, + log_lvl: log_lvl + }); + return load_event_location_obj; + } + if (object_type == 'event_presentation') { + const load_event_presentation_obj = load_ae_obj_id__event_presentation({ + api_cfg: api_cfg, + event_presentation_id: object_id, + log_lvl: log_lvl + }); + return load_event_presentation_obj; + } + if (object_type == 'event_presenter') { + const load_event_presenter_obj = load_ae_obj_id__event_presenter({ + api_cfg: api_cfg, + event_presenter_id: object_id, + log_lvl: log_lvl + }); + return load_event_presenter_obj; + } + if (object_type == 'event_session') { + const load_event_session_obj = load_ae_obj_id__event_session({ + api_cfg: api_cfg, + event_session_id: object_id, + log_lvl: log_lvl + }); + return load_event_session_obj; + } - if (object_type == 'post') { - let load_post_obj = load_ae_obj_id__post({ - api_cfg: api_cfg, - post_id: object_id, - log_lvl: log_lvl - }); - return load_post_obj; - } - if (object_type == 'post_comment') { - let load_post_comment_obj = load_ae_obj_id__post_comment({ - api_cfg: api_cfg, - post_comment_id: object_id, - log_lvl: log_lvl - }); - return load_post_comment_obj; - } - - - - } - - } else { - console.log(`Not Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}; Account ID: ${api_cfg.account_id}`); - patch_result = 'PATCH failed'; - return false; - } - return true; - }) - .catch(function (error: any) { - console.log('Something went wrong patching the record.'); - console.log(error); - return false; - }) - .finally(function () { - console.log('PATCH Promise finally'); - }); - - return ae_promises.api_update__ae_obj; + if (object_type == 'post') { + const load_post_obj = load_ae_obj_id__post({ + api_cfg: api_cfg, + post_id: object_id, + log_lvl: log_lvl + }); + return load_post_obj; + } + if (object_type == 'post_comment') { + const load_post_comment_obj = load_ae_obj_id__post_comment({ + api_cfg: api_cfg, + post_comment_id: object_id, + log_lvl: log_lvl + }); + return load_post_comment_obj; + } + } + } else { + console.log( + `Not Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}; Account ID: ${api_cfg.account_id}` + ); + patch_result = 'PATCH failed'; + return false; + } + return true; + }) + .catch(function (error: any) { + console.log('Something went wrong patching the record.'); + console.log(error); + return false; + }) + .finally(function () { + console.log('PATCH Promise finally'); + }); + return ae_promises.api_update__ae_obj; } +async function handle_download_export__obj_type({ + api_cfg, + get_obj_type, // The type of object to return: event_badge, event_presenter, sponsorship, etc. + for_obj_type, // Usually for an account, event, event_exhibit, or sponsorship_cfg + for_obj_id, // The ID of the object + exp_alt = null, // Export name (idaa, other, not 'default') + file_type = 'CSV', // 'CSV' or 'Excel' + return_file = true, + filename = 'no_filename.csv', + auto_download = false, + limit = 5000, + params = {}, // key value object is expected + log_lvl = 0 +}: { + api_cfg: any; + get_obj_type: string; + for_obj_type: string; + for_obj_id: string; + exp_alt?: null | string; + file_type?: string; + return_file?: boolean; + filename?: string; + auto_download?: boolean; + limit?: number; + params?: key_val; + log_lvl?: number; +}) { + console.log('*** ae_core_functions.js: handle_download_export__obj_type() ***'); -async function handle_download_export__obj_type( - { - api_cfg, - get_obj_type, // The type of object to return: event_badge, event_presenter, sponsorship, etc. - for_obj_type, // Usually for an account, event, event_exhibit, or sponsorship_cfg - for_obj_id, // The ID of the object - exp_alt = null, // Export name (idaa, other, not 'default') - file_type = 'CSV', // 'CSV' or 'Excel' - return_file = true, - filename = 'no_filename.csv', - auto_download = false, - limit = 5000, - params = {}, // key value object is expected - log_lvl = 0 - }: { - api_cfg: any, - get_obj_type: string, - for_obj_type: string, - for_obj_id: string, - exp_alt?: null|string, - file_type?: string, - return_file?: boolean, - filename?: string, - auto_download?: boolean, - limit?: number, - params?: key_val, - log_lvl?: number - } - ) { - console.log('*** ae_core_functions.js: handle_download_export__obj_type() ***'); + const task_id = for_obj_id; - let task_id = for_obj_id; + const endpoint = `/v2/crud/${get_obj_type}/list`; + params['for_obj_type'] = for_obj_type; + params['for_obj_id'] = for_obj_id; - const endpoint = `/v2/crud/${get_obj_type}/list`; - params['for_obj_type'] = for_obj_type; - params['for_obj_id'] = for_obj_id; + if (file_type == 'CSV' || file_type == 'Excel') { + params['file_type'] = file_type; + } + params['return_file'] = true; - if (file_type == 'CSV' || file_type == 'Excel') { - params['file_type'] = file_type; - } - params['return_file'] = true; + params['mdl_alt'] = 'out'; - params['mdl_alt'] = 'out'; + if (exp_alt) { + params['exp_alt'] = exp_alt; + } - if (exp_alt) { - params['exp_alt'] = exp_alt; - } + // let clean_filename = filename.replace(/[^a-z0-9]/gi, '_'); + // let clean_filename = filename.replace(/[^a-z0-9\[\]-]/gi, '_'); + const clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-_.]/gi, '_'); + // let clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-\._ ]/gi, '_'); - // let clean_filename = filename.replace(/[^a-z0-9]/gi, '_'); - // let clean_filename = filename.replace(/[^a-z0-9\[\]-]/gi, '_'); - let clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-_.]/gi, '_'); - // let clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-\._ ]/gi, '_'); + if (limit >= 0) { + params['limit'] = limit; + } - if (limit >= 0) { - params['limit'] = limit; - } + ae_promises.download__export_file = await api.get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + timeout: 90000, // Seems to timeout sometimes with the default of 60 seconds + return_blob: return_file, + filename: clean_filename, + auto_download: auto_download, + task_id: task_id, + log_lvl: log_lvl + }); - ae_promises.download__export_file = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - timeout: 90000, // Seems to timeout sometimes with the default of 60 seconds - return_blob: return_file, - filename: clean_filename, - auto_download: auto_download, - task_id: task_id, - log_lvl: log_lvl - }); - - console.log('ae_promises.download__export_file:', ae_promises.download__export_file); - return ae_promises.download__export_file; + console.log('ae_promises.download__export_file:', ae_promises.download__export_file); + return ae_promises.download__export_file; } +const export_obj = { + check_hosted_file_obj_w_hash: check_hosted_file_obj_w_hash, -let export_obj = { - check_hosted_file_obj_w_hash: check_hosted_file_obj_w_hash, + load_ae_obj_li__time_zone: load_ae_obj_li__time_zone, - load_ae_obj_li__time_zone: load_ae_obj_li__time_zone, + load_ae_obj_li__country: load_ae_obj_li__country, + load_ae_obj_li__country_subdivision: load_ae_obj_li__country_subdivision, - load_ae_obj_li__country: load_ae_obj_li__country, - load_ae_obj_li__country_subdivision: load_ae_obj_li__country_subdivision, + load_ae_obj_id__hosted_file: load_ae_obj_id__hosted_file, + load_ae_obj_li__hosted_file: load_ae_obj_li__hosted_file, + delete_ae_obj_id__hosted_file: delete_ae_obj_id__hosted_file, + db_save_ae_obj_li__hosted_file: db_save_ae_obj_li__hosted_file, + db_update_ae_obj_id__hosted_file: db_update_ae_obj_id__hosted_file, - load_ae_obj_id__hosted_file: load_ae_obj_id__hosted_file, - load_ae_obj_li__hosted_file: load_ae_obj_li__hosted_file, - delete_ae_obj_id__hosted_file: delete_ae_obj_id__hosted_file, - db_save_ae_obj_li__hosted_file: db_save_ae_obj_li__hosted_file, - db_update_ae_obj_id__hosted_file: db_update_ae_obj_id__hosted_file, + db_save_ae_obj_li__ae_obj: db_save_ae_obj_li__ae_obj, - db_save_ae_obj_li__ae_obj: db_save_ae_obj_li__ae_obj, + add_url_params: add_url_params, + clean_headers: clean_headers, - add_url_params: add_url_params, - clean_headers: clean_headers, + handle_load_ae_obj_id__site_domain: handle_load_ae_obj_id__site_domain, + handle_load_ae_obj_code__data_store: handle_load_ae_obj_code__data_store, - handle_load_ae_obj_id__site_domain: handle_load_ae_obj_id__site_domain, - handle_load_ae_obj_code__data_store: handle_load_ae_obj_code__data_store, + load_ae_obj_id__activity_log: load_ae_obj_id__activity_log, + load_ae_obj_li__activity_log: load_ae_obj_li__activity_log, + create_ae_obj__activity_log: create_ae_obj__activity_log, + update_ae_obj__activity_log: update_ae_obj__activity_log, - load_ae_obj_id__activity_log: load_ae_obj_id__activity_log, - load_ae_obj_li__activity_log: load_ae_obj_li__activity_log, - create_ae_obj__activity_log: create_ae_obj__activity_log, - update_ae_obj__activity_log: update_ae_obj__activity_log, + load_ae_obj_id__person: load_ae_obj_id__person, + load_ae_obj_li__person: load_ae_obj_li__person, + create_ae_obj__person: create_ae_obj__person, + delete_ae_obj_id__person: delete_ae_obj_id__person, + update_ae_obj__person: update_ae_obj__person, - load_ae_obj_id__person: load_ae_obj_id__person, - load_ae_obj_li__person: load_ae_obj_li__person, - create_ae_obj__person: create_ae_obj__person, - delete_ae_obj_id__person: delete_ae_obj_id__person, - update_ae_obj__person: update_ae_obj__person, + auth_ae_obj__username_password: auth_ae_obj__username_password, + auth_ae_obj__user_id_user_auth_key: auth_ae_obj__user_id_user_auth_key, + send_email_auth_ae_obj__user_id: send_email_auth_ae_obj__user_id, + qry_ae_obj_li__user_email: qry_ae_obj_li__user_email, + auth_ae_obj__user_id_change_password: auth_ae_obj__user_id_change_password, - auth_ae_obj__username_password: auth_ae_obj__username_password, - auth_ae_obj__user_id_user_auth_key: auth_ae_obj__user_id_user_auth_key, - send_email_auth_ae_obj__user_id: send_email_auth_ae_obj__user_id, - qry_ae_obj_li__user_email: qry_ae_obj_li__user_email, - auth_ae_obj__user_id_change_password: auth_ae_obj__user_id_change_password, - - handle_update_ae_obj_id_crud: handle_update_ae_obj_id_crud, - update_ae_obj_id_crud_v2: update_ae_obj_id_crud_v2, - handle_download_export__obj_type: handle_download_export__obj_type, - generate_qr_code: generate_qr_code, - js_generate_qr_code: js_generate_qr_code, + handle_update_ae_obj_id_crud: handle_update_ae_obj_id_crud, + update_ae_obj_id_crud_v2: update_ae_obj_id_crud_v2, + handle_download_export__obj_type: handle_download_export__obj_type, + generate_qr_code: generate_qr_code, + js_generate_qr_code: js_generate_qr_code }; -export let core_func = export_obj; +export const core_func = export_obj; diff --git a/src/lib/ae_core/core__account.ts b/src/lib/ae_core/core__account.ts index 58d70a3a..6ac0cff7 100644 --- a/src/lib/ae_core/core__account.ts +++ b/src/lib/ae_core/core__account.ts @@ -1,23 +1,23 @@ export interface Account { - id: string; - // id_random: string; - account_id: string; - account_id_random: string; + id: string; + // id_random: string; + account_id: string; + account_id_random: string; - code?: string; - name: string; - short_name?: null|string; - description?: null|string; + code?: string; + name: string; + short_name?: null | string; + description?: null | string; - enable: null|boolean; - enable_from?: null|Date; - enable_to?: null|Date; + enable: null | boolean; + enable_from?: null | Date; + enable_to?: null | Date; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; -} \ No newline at end of file + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; +} diff --git a/src/lib/ae_core/core__activity_log.ts b/src/lib/ae_core/core__activity_log.ts index 14ac1b1f..8a6df108 100644 --- a/src/lib/ae_core/core__activity_log.ts +++ b/src/lib/ae_core/core__activity_log.ts @@ -1,361 +1,364 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -let ae_promises: key_val = {}; - +const ae_promises: key_val = {}; // Updated 2024-10-23 -export async function load_ae_obj_id__activity_log( - { - api_cfg, - activity_log_id, - // inc_other_li = false, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - activity_log_id: string, - // inc_other_li?: boolean, - try_cache?: boolean, - log_lvl?: number - } - ) { - console.log(`*** load_ae_obj_id__activity_log() *** activity_log_id=${activity_log_id}`); +export async function load_ae_obj_id__activity_log({ + api_cfg, + activity_log_id, + // inc_other_li = false, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + activity_log_id: string; + // inc_other_li?: boolean, + try_cache?: boolean; + log_lvl?: number; +}) { + console.log(`*** load_ae_obj_id__activity_log() *** activity_log_id=${activity_log_id}`); - let params = {}; + const params = {}; - ae_promises.load__activity_log_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'activity_log', - obj_id: activity_log_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - params: params, - log_lvl: log_lvl - }) - .then(function (activity_log_obj_get_result) { - if (activity_log_obj_get_result) { - // if (try_cache) { - // // This is expecting a list - // db_save_ae_obj_li__activity_log({ - // obj_type: 'activity_log', - // obj_li: [activity_log_obj_get_result] - // }); - // } - return activity_log_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__activity_log_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'activity_log', + obj_id: activity_log_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + params: params, + log_lvl: log_lvl + }) + .then(function (activity_log_obj_get_result) { + if (activity_log_obj_get_result) { + // if (try_cache) { + // // This is expecting a list + // db_save_ae_obj_li__activity_log({ + // obj_type: 'activity_log', + // obj_li: [activity_log_obj_get_result] + // }); + // } + return activity_log_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__activity_log_obj:', ae_promises.load__activity_log_obj); - } + if (log_lvl) { + console.log('ae_promises.load__activity_log_obj:', ae_promises.load__activity_log_obj); + } - return ae_promises.load__activity_log_obj; + return ae_promises.load__activity_log_obj; } - // Updated 2024-10-23 -export async function load_ae_obj_li__activity_log( - { - api_cfg, - for_obj_type = 'account', - for_obj_id, - // inc_other_li = false, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - // inc_other_li?: boolean, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - console.log(`*** load_ae_obj_li__activity_log() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); +export async function load_ae_obj_li__activity_log({ + api_cfg, + for_obj_type = 'account', + for_obj_id, + // inc_other_li = false, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + // inc_other_li?: boolean, + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + console.log( + `*** load_ae_obj_li__activity_log() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); - let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - let limit: number = (params.qry__limit ?? 99); // 99 - let offset: number = (params.qry__offset ?? 0); // 0 + const enabled: string = params.qry__enabled ?? 'enabled'; // all, disabled, enabled + const hidden: string = params.qry__hidden ?? 'not_hidden'; // all, hidden, not_hidden + const limit: number = params.qry__limit ?? 99; // 99 + const offset: number = params.qry__offset ?? 0; // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - ae_promises.load__activity_log_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'activity_log', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(function (activity_log_obj_li_get_result) { - if (activity_log_obj_li_get_result) { - // if (try_cache) { - // db_save_ae_obj_li__activity_log({ - // obj_type: 'activity_log', - // obj_li: activity_log_obj_li_get_result - // }); - // } - return activity_log_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__activity_log_obj_li = await api + .get_ae_obj_li_for_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'activity_log', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(function (activity_log_obj_li_get_result) { + if (activity_log_obj_li_get_result) { + // if (try_cache) { + // db_save_ae_obj_li__activity_log({ + // obj_type: 'activity_log', + // obj_li: activity_log_obj_li_get_result + // }); + // } + return activity_log_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__activity_log_obj_li:', ae_promises.load__activity_log_obj_li); - } + if (log_lvl) { + console.log('ae_promises.load__activity_log_obj_li:', ae_promises.load__activity_log_obj_li); + } - return ae_promises.load__activity_log_obj_li; + return ae_promises.load__activity_log_obj_li; } - // Updated 2024-10-23 -export async function create_ae_obj__activity_log( - { - api_cfg, - account_id, - data_kv, - params = {}, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - data_kv: key_val, - params?: key_val, - log_lvl?: number - } - ) { - console.log(`*** create_ae_obj__activity_log() *** account_id=${account_id}`); +export async function create_ae_obj__activity_log({ + api_cfg, + account_id, + data_kv, + params = {}, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + data_kv: key_val; + params?: key_val; + log_lvl?: number; +}) { + console.log(`*** create_ae_obj__activity_log() *** account_id=${account_id}`); - ae_promises.create__activity_log = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'activity_log', - fields: { - account_id_random: account_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(function (activity_log_obj_create_result) { - if (activity_log_obj_create_result) { - // db_save_ae_obj_li__activity_log( - // { - // obj_type: 'activity_log', - // obj_li: [activity_log_obj_create_result] - // }); - return activity_log_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + ae_promises.create__activity_log = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'activity_log', + fields: { + account_id_random: account_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(function (activity_log_obj_create_result) { + if (activity_log_obj_create_result) { + // db_save_ae_obj_li__activity_log( + // { + // obj_type: 'activity_log', + // obj_li: [activity_log_obj_create_result] + // }); + return activity_log_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__activity_log:', ae_promises.create__activity_log); - } - return ae_promises.create__activity_log; + if (log_lvl) { + console.log('ae_promises.create__activity_log:', ae_promises.create__activity_log); + } + return ae_promises.create__activity_log; } - // Updated 2024-10-23 -export async function update_ae_obj__activity_log( - { - api_cfg, - activity_log_id, - data_kv, - params = {}, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - activity_log_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__activity_log() *** activity_log_id=${activity_log_id}`, data_kv); - } - ae_promises.update__activity_log_obj = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'activity_log', - obj_id: activity_log_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(function (activity_log_obj_update_result) { - if (activity_log_obj_update_result) { - // if (try_cache) { - // db_save_ae_obj_li__activity_log({ - // obj_type: 'activity_log', obj_li: [activity_log_obj_update_result] - // }); - // } - return activity_log_obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); +export async function update_ae_obj__activity_log({ + api_cfg, + activity_log_id, + data_kv, + params = {}, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + activity_log_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj__activity_log() *** activity_log_id=${activity_log_id}`, + data_kv + ); + } + ae_promises.update__activity_log_obj = await api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'activity_log', + obj_id: activity_log_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(function (activity_log_obj_update_result) { + if (activity_log_obj_update_result) { + // if (try_cache) { + // db_save_ae_obj_li__activity_log({ + // obj_type: 'activity_log', obj_li: [activity_log_obj_update_result] + // }); + // } + return activity_log_obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.update__activity_log_obj:', ae_promises.update__activity_log_obj); - } - return ae_promises.update__activity_log_obj; + if (log_lvl) { + console.log('ae_promises.update__activity_log_obj:', ae_promises.update__activity_log_obj); + } + return ae_promises.update__activity_log_obj; } - // This new function is using CRUD v2. This should allow for more flexibility in the queries. // Updated 2024-10-23 -export async function qry__activity_log( - { - api_cfg, - activity_log_id, - qry_str, - qry_files, - qry_start_datetime, // Example greater than: '2024-10-24' - enabled = 'enabled', - hidden = 'not_hidden', - limit = 50, - offset = 0, - params = {}, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - activity_log_id: any, - qry_str?: string, - qry_files?: null|boolean, - qry_start_datetime?: null|string, // Greater than this datetime - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, - offset?: number, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - console.log(`*** qry__activity_log() *** activity_log_id=${activity_log_id} qry_str=${qry_str}`); +export async function qry__activity_log({ + api_cfg, + activity_log_id, + qry_str, + qry_files, + qry_start_datetime, // Example greater than: '2024-10-24' + enabled = 'enabled', + hidden = 'not_hidden', + limit = 50, + offset = 0, + params = {}, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + activity_log_id: any; + qry_str?: string; + qry_files?: null | boolean; + qry_start_datetime?: null | string; // Greater than this datetime + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; + offset?: number; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + console.log(`*** qry__activity_log() *** activity_log_id=${activity_log_id} qry_str=${qry_str}`); - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 25); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 25); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // if (qry_str && qry_str.length > 2) { - // params_json['ft_qry'] = {}; - // params_json['ft_qry']['default_qry_str'] = qry_str; - // } + // if (qry_str && qry_str.length > 2) { + // params_json['ft_qry'] = {}; + // params_json['ft_qry']['default_qry_str'] = qry_str; + // } - params_json['qry'] = []; + params_json['qry'] = []; - if (qry_files === true) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: ">", - value: 0 - }; - params_json['qry'].push(qry_param); - } else if (qry_files === false) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: "IS", - value: null - }; - params_json['qry'].push(qry_param); - } + if (qry_files === true) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: '>', + value: 0 + }; + params_json['qry'].push(qry_param); + } else if (qry_files === false) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: 'IS', + value: null + }; + params_json['qry'].push(qry_param); + } - if (qry_start_datetime) { - let qry_param = - { - type: "AND", - field: "start_datetime", - operator: ">", - value: qry_start_datetime - }; - params_json['qry'].push(qry_param); - } + if (qry_start_datetime) { + const qry_param = { + type: 'AND', + field: 'start_datetime', + operator: '>', + value: qry_start_datetime + }; + params_json['qry'].push(qry_param); + } - let order_by_li: { [key: string]: "ASC" | "DESC" }[] = [{'priority': 'DESC'}, {'sort': 'DESC'}, {'start_datetime': 'ASC'}, {'name': 'ASC'}, {'updated_on': 'DESC'}, {'created_on': 'DESC'}]; + const order_by_li: { [key: string]: 'ASC' | 'DESC' }[] = [ + { priority: 'DESC' }, + { sort: 'DESC' }, + { start_datetime: 'ASC' }, + { name: 'ASC' }, + { updated_on: 'DESC' }, + { created_on: 'DESC' } + ]; - ae_promises.load__activity_log_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'activity_log', - for_obj_type: 'account', - for_obj_id: activity_log_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for activity_log searching - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(function (activity_log_obj_li_get_result) { - if (activity_log_obj_li_get_result) { - // db_save_ae_obj_li__activity_log({ - // obj_type: 'activity_log', - // obj_li: activity_log_obj_li_get_result - // }); - return activity_log_obj_li_get_result; - } else { - return []; - } - }); + ae_promises.load__activity_log_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'activity_log', + for_obj_type: 'account', + for_obj_id: activity_log_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for activity_log searching + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(function (activity_log_obj_li_get_result) { + if (activity_log_obj_li_get_result) { + // db_save_ae_obj_li__activity_log({ + // obj_type: 'activity_log', + // obj_li: activity_log_obj_li_get_result + // }); + return activity_log_obj_li_get_result; + } else { + return []; + } + }); - if (log_lvl) { - console.log('ae_promises.load__activity_log_obj_li:', ae_promises.load__activity_log_obj_li); - } - return ae_promises.load__activity_log_obj_li; + if (log_lvl) { + console.log('ae_promises.load__activity_log_obj_li:', ae_promises.load__activity_log_obj_li); + } + return ae_promises.load__activity_log_obj_li; } diff --git a/src/lib/ae_core/core__api_helpers.ts b/src/lib/ae_core/core__api_helpers.ts index 1afe1784..59c9a550 100644 --- a/src/lib/ae_core/core__api_helpers.ts +++ b/src/lib/ae_core/core__api_helpers.ts @@ -1,69 +1,57 @@ import type { key_val } from '$lib/stores/ae_stores'; - // Updated 2025-01-28 -export function add_url_params( - { - base_url = '', - endpoint, - params, - log_lvl = 0 - }: { - base_url?: string, - endpoint: string, - params: key_val, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** add_url_params() *** base_url=${base_url} endpoint=${endpoint}`, params); - } +export function add_url_params({ + base_url = '', + endpoint, + params, + log_lvl = 0 +}: { + base_url?: string; + endpoint: string; + params: key_val; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** add_url_params() *** base_url=${base_url} endpoint=${endpoint}`, params); + } - const url_obj = new URL(endpoint, base_url); + const url_obj = new URL(endpoint, base_url); - Object.keys(params).forEach(key => url_obj.searchParams.append(key, params[key])); + Object.keys(params).forEach((key) => url_obj.searchParams.append(key, params[key])); - if (log_lvl) { - console.log('New URL:', url_obj.toString()); - } + if (log_lvl) { + console.log('New URL:', url_obj.toString()); + } - return url_obj.toString(); - // return 'test'; + return url_obj.toString(); + // return 'test'; } - // This is used to clean the header property names. Not underscores allowed in the header names. // Updated 2025-01-28 -export function clean_headers( - { - headers, - log_lvl = 0 - }: { - headers: any, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** clean_headers() ***`, headers); - } +export function clean_headers({ headers, log_lvl = 0 }: { headers: any; log_lvl?: number }) { + if (log_lvl) { + console.log(`*** clean_headers() ***`, headers); + } - let headers_cleaned: key_val = {}; - for (const prop in headers) { - let prop_cleaned = prop.replaceAll('_', '-'); - if (typeof headers[prop] != 'string') { - headers[prop] = JSON.stringify(headers[prop]); - } - headers_cleaned[prop_cleaned] = headers[prop]; - if (log_lvl > 1) { - console.log(`${prop_cleaned}: ${headers_cleaned[prop_cleaned]}`); - } - } + const headers_cleaned: key_val = {}; + for (const prop in headers) { + const prop_cleaned = prop.replaceAll('_', '-'); + if (typeof headers[prop] != 'string') { + headers[prop] = JSON.stringify(headers[prop]); + } + headers_cleaned[prop_cleaned] = headers[prop]; + if (log_lvl > 1) { + console.log(`${prop_cleaned}: ${headers_cleaned[prop_cleaned]}`); + } + } - // Object.keys(headers).forEach(key => { - // if (headers[key]) { - // headers_cleaned[key] = headers[key]; - // } - // }); + // Object.keys(headers).forEach(key => { + // if (headers[key]) { + // headers_cleaned[key] = headers[key]; + // } + // }); - return headers_cleaned; + return headers_cleaned; } diff --git a/src/lib/ae_core/core__check_hosted_file_obj_w_hash.ts b/src/lib/ae_core/core__check_hosted_file_obj_w_hash.ts index 20270a13..f43d8de3 100644 --- a/src/lib/ae_core/core__check_hosted_file_obj_w_hash.ts +++ b/src/lib/ae_core/core__check_hosted_file_obj_w_hash.ts @@ -1,37 +1,34 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; - // Updated 2024-10-02 -export async function check_hosted_file_obj_w_hash( - { - api_cfg, - hosted_file_hash, - check_for_local = true, // Forces a check on the host server for the file. - params = {}, - return_meta = false, - log_lvl = 0 - } : { - api_cfg: any, - hosted_file_hash: string, - check_for_local?: boolean, - params?: key_val, - return_meta?: boolean, - log_lvl?: number - } - ) { - console.log('*** stores_event_api.js: check_hosted_file_obj_w_hash() ***'); +export async function check_hosted_file_obj_w_hash({ + api_cfg, + hosted_file_hash, + check_for_local = true, // Forces a check on the host server for the file. + params = {}, + return_meta = false, + log_lvl = 0 +}: { + api_cfg: any; + hosted_file_hash: string; + check_for_local?: boolean; + params?: key_val; + return_meta?: boolean; + log_lvl?: number; +}) { + console.log('*** stores_event_api.js: check_hosted_file_obj_w_hash() ***'); - const endpoint = `/hosted_file/hash/${hosted_file_hash}`; - if (check_for_local) { - params['check_for_local'] = true; - } - let check_hosted_file_obj_w_hash_get_promise = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - return_meta: return_meta, - log_lvl: log_lvl - }); - return check_hosted_file_obj_w_hash_get_promise; -} \ No newline at end of file + const endpoint = `/hosted_file/hash/${hosted_file_hash}`; + if (check_for_local) { + params['check_for_local'] = true; + } + const check_hosted_file_obj_w_hash_get_promise = await api.get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + return_meta: return_meta, + log_lvl: log_lvl + }); + return check_hosted_file_obj_w_hash_get_promise; +} diff --git a/src/lib/ae_core/core__countries.ts b/src/lib/ae_core/core__countries.ts index 97387f9e..4c694b19 100644 --- a/src/lib/ae_core/core__countries.ts +++ b/src/lib/ae_core/core__countries.ts @@ -1,73 +1,71 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_core } from "$lib/ae_core/db_core"; - -let ae_promises: key_val = {}; +import { db_core } from '$lib/ae_core/db_core'; +const ae_promises: key_val = {}; // Updated 2024-10-14 -export async function load_ae_obj_li__country( - { - api_cfg, - // account_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 299, - offset = 0, - order_by_li = {'sort': 'DESC', 'english_short_name': 'ASC', 'alpha_2_code': 'ASC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - // account_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__country() ***`); - } +export async function load_ae_obj_li__country({ + api_cfg, + // account_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 299, + offset = 0, + order_by_li = { sort: 'DESC', english_short_name: 'ASC', alpha_2_code: 'ASC' }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + // account_id: string, + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_li__country() ***`); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - ae_promises.load__country_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'lu', - for_obj_type: 'country', - // for_obj_id: account_id, - use_alt_tbl: false, - use_alt_mdl: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(function (country_li_get_result) { - if (country_li_get_result) { - // handle_db_save_ae_obj_li__country({obj_type: 'country', obj_li: country_li_get_result}); - return country_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__country_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'lu', + for_obj_type: 'country', + // for_obj_id: account_id, + use_alt_tbl: false, + use_alt_mdl: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(function (country_li_get_result) { + if (country_li_get_result) { + // handle_db_save_ae_obj_li__country({obj_type: 'country', obj_li: country_li_get_result}); + return country_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - console.log('ae_promises.load__country_li:', ae_promises.load__country_li); - return ae_promises.load__country_li; + console.log('ae_promises.load__country_li:', ae_promises.load__country_li); + return ae_promises.load__country_li; } diff --git a/src/lib/ae_core/core__country_subdivisions.ts b/src/lib/ae_core/core__country_subdivisions.ts index d94162af..d92f2927 100644 --- a/src/lib/ae_core/core__country_subdivisions.ts +++ b/src/lib/ae_core/core__country_subdivisions.ts @@ -1,73 +1,74 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_core } from "$lib/ae_core/db_core"; - -let ae_promises: key_val = {}; +import { db_core } from '$lib/ae_core/db_core'; +const ae_promises: key_val = {}; // Updated 2024-10-14 -export async function load_ae_obj_li__country_subdivision( - { - api_cfg, - // account_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 399, - offset = 0, - order_by_li = {'sort': 'DESC', 'name': 'ASC', 'code': 'ASC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - // account_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__country_subdivision() ***`); - } +export async function load_ae_obj_li__country_subdivision({ + api_cfg, + // account_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 399, + offset = 0, + order_by_li = { sort: 'DESC', name: 'ASC', code: 'ASC' }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + // account_id: string, + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_li__country_subdivision() ***`); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - ae_promises.load__country_subdivision_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'lu', - for_obj_type: 'country_subdivision', - // for_obj_id: account_id, - use_alt_tbl: false, - use_alt_mdl: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(function (country_subdivision_li_get_result) { - if (country_subdivision_li_get_result) { - // handle_db_save_ae_obj_li__country_subdivision({obj_type: 'country_subdivision', obj_li: country_subdivision_li_get_result}); - return country_subdivision_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__country_subdivision_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'lu', + for_obj_type: 'country_subdivision', + // for_obj_id: account_id, + use_alt_tbl: false, + use_alt_mdl: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(function (country_subdivision_li_get_result) { + if (country_subdivision_li_get_result) { + // handle_db_save_ae_obj_li__country_subdivision({obj_type: 'country_subdivision', obj_li: country_subdivision_li_get_result}); + return country_subdivision_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - console.log('ae_promises.load__country_subdivision_li:', ae_promises.load__country_subdivision_li); - return ae_promises.load__country_subdivision_li; + console.log( + 'ae_promises.load__country_subdivision_li:', + ae_promises.load__country_subdivision_li + ); + return ae_promises.load__country_subdivision_li; } diff --git a/src/lib/ae_core/core__crud_generic.ts b/src/lib/ae_core/core__crud_generic.ts index 91d6145b..e94a166d 100644 --- a/src/lib/ae_core/core__crud_generic.ts +++ b/src/lib/ae_core/core__crud_generic.ts @@ -3,352 +3,333 @@ import { marked } from 'marked'; import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; // Define generic CRUD args export interface GenericCrudArgs { - api_cfg: any; - obj_type: string; - obj_id?: string; - for_obj_type?: string; - for_obj_id?: string; + api_cfg: any; + obj_type: string; + obj_id?: string; + for_obj_type?: string; + for_obj_id?: string; - db_instance?: any; // Optional DB instance for caching - db_field_li?: string[]; // Optional list of fields to save in DB + db_instance?: any; // Optional DB instance for caching + db_field_li?: string[]; // Optional list of fields to save in DB - // Flags to include related core object models - inc_account_li?: boolean; - inc_address_li?: boolean; - inc_contact_li?: boolean; - inc_person_li?: boolean; - inc_site_li?: boolean; - inc_site_domain_li?: boolean; - inc_user_li?: boolean; + // Flags to include related core object models + inc_account_li?: boolean; + inc_address_li?: boolean; + inc_contact_li?: boolean; + inc_person_li?: boolean; + inc_site_li?: boolean; + inc_site_domain_li?: boolean; + inc_user_li?: boolean; + // Flags to include related other object models + inc_archive_li?: boolean; + inc_archive_entry_li?: boolean; + inc_event_li?: boolean; + inc_event_session_li?: boolean; + inc_post_li?: boolean; + inc_post_comment_li?: boolean; + inc_journal_li?: boolean; + inc_journal_entry_li?: boolean; - // Flags to include related other object models - inc_archive_li?: boolean; - inc_archive_entry_li?: boolean; - inc_event_li?: boolean; - inc_event_session_li?: boolean; - inc_post_li?: boolean; - inc_post_comment_li?: boolean; - inc_journal_li?: boolean; - inc_journal_entry_li?: boolean; + inc_obj_type_li?: string[]; // Optional list of object types to include - inc_obj_type_li?: string[]; // Optional list of object types to include - - data_kv?: key_val; - enabled?: 'enabled' | 'disabled' | 'all'; - hidden?: 'not_hidden' | 'hidden' | 'all'; - limit?: number; - offset?: number; - order_by_li?: key_val; - params?: key_val; - try_cache?: boolean; - log_lvl?: number; + data_kv?: key_val; + enabled?: 'enabled' | 'disabled' | 'all'; + hidden?: 'not_hidden' | 'hidden' | 'all'; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; } // Generic function: Load single object by ID -export async function load_ae_obj_id( - args: GenericCrudArgs -): Promise { - const { api_cfg, obj_type, obj_id, log_lvl = 0 } = args; +export async function load_ae_obj_id(args: GenericCrudArgs): Promise { + const { api_cfg, obj_type, obj_id, log_lvl = 0 } = args; - if (log_lvl) { - console.log(`*** load_ae_obj_id() *** obj_type=${obj_type} obj_id=${obj_id}`); - } + if (log_lvl) { + console.log(`*** load_ae_obj_id() *** obj_type=${obj_type} obj_id=${obj_id}`); + } - let result = await api.get_ae_obj_id_crud({ - api_cfg, - obj_type, - obj_id, - params: {}, - log_lvl - }); + const result = await api.get_ae_obj_id_crud({ + api_cfg, + obj_type, + obj_id, + params: {}, + log_lvl + }); - return result; + return result; } // Generic function: Load list of objects -export async function load_ae_obj_li( - args: GenericCrudArgs -): Promise { - const { - api_cfg, - obj_type, - for_obj_type = '', - for_obj_id, - inc_obj_type_li, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {}, - params = {}, - try_cache = true, - log_lvl = 0 - } = args; +export async function load_ae_obj_li(args: GenericCrudArgs): Promise { + const { + api_cfg, + obj_type, + for_obj_type = '', + for_obj_id, + inc_obj_type_li, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = {}, + params = {}, + try_cache = true, + log_lvl = 0 + } = args; - if (log_lvl) { - console.log(`*** load_ae_obj_li() *** obj_type=${obj_type} for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } + if (log_lvl) { + console.log( + `*** load_ae_obj_li() *** obj_type=${obj_type} for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - let result = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg, - obj_type, - for_obj_type, - for_obj_id, - enabled, - hidden, - order_by_li, - limit, - offset, - params_json: {}, - params, - log_lvl - }); + const result = await api.get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg, + obj_type, + for_obj_type, + for_obj_id, + enabled, + hidden, + order_by_li, + limit, + offset, + params_json: {}, + params, + log_lvl + }); - return result; + return result; } // Generic function: Create object -export async function create_ae_obj( - args: GenericCrudArgs -): Promise { - const { api_cfg, obj_type, data_kv, log_lvl = 0 } = args; +export async function create_ae_obj(args: GenericCrudArgs): Promise { + const { api_cfg, obj_type, data_kv, log_lvl = 0 } = args; - if (log_lvl) { - console.log(`*** create_ae_obj() *** obj_type=${obj_type}`, data_kv); - } + if (log_lvl) { + console.log(`*** create_ae_obj() *** obj_type=${obj_type}`, data_kv); + } - let result = await api.create_ae_obj_crud({ - api_cfg, - obj_type, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: {}, - return_obj: true, - log_lvl - }); + const result = await api.create_ae_obj_crud({ + api_cfg, + obj_type, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: {}, + return_obj: true, + log_lvl + }); - return result; + return result; } // Generic function: Update object -export async function update_ae_obj( - args: GenericCrudArgs -): Promise { - const { api_cfg, obj_type, obj_id, data_kv, log_lvl = 0 } = args; +export async function update_ae_obj(args: GenericCrudArgs): Promise { + const { api_cfg, obj_type, obj_id, data_kv, log_lvl = 0 } = args; - if (log_lvl) { - console.log(`*** update_ae_obj() *** obj_type=${obj_type} obj_id=${obj_id}`, data_kv); - } + if (log_lvl) { + console.log(`*** update_ae_obj() *** obj_type=${obj_type} obj_id=${obj_id}`, data_kv); + } - let result = await api.update_ae_obj_id_crud({ - api_cfg, - obj_type, - obj_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: {}, - return_obj: true, - log_lvl - }); + const result = await api.update_ae_obj_id_crud({ + api_cfg, + obj_type, + obj_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: {}, + return_obj: true, + log_lvl + }); - return result; + return result; } // Generic function: Delete object -export async function delete_ae_obj_id( - args: GenericCrudArgs -): Promise { - const { api_cfg, obj_type, obj_id, method = 'delete', log_lvl = 0 } = args; +export async function delete_ae_obj_id(args: GenericCrudArgs): Promise { + const { api_cfg, obj_type, obj_id, method = 'delete', log_lvl = 0 } = args; - if (log_lvl) { - console.log(`*** delete_ae_obj_id() *** obj_type=${obj_type} obj_id=${obj_id}`); - } + if (log_lvl) { + console.log(`*** delete_ae_obj_id() *** obj_type=${obj_type} obj_id=${obj_id}`); + } - let result = await api.delete_ae_obj_id_crud({ - api_cfg, - obj_type, - obj_id, - key: api_cfg.api_crud_super_key, - params: {}, - method, - log_lvl - }); + const result = await api.delete_ae_obj_id_crud({ + api_cfg, + obj_type, + obj_id, + key: api_cfg.api_crud_super_key, + params: {}, + method, + log_lvl + }); - return result; + return result; } - - - - - - // Additional Modules that might be needed for reloads -import { load_ae_obj_id__archive } from "$lib/ae_archives/ae_archives__archive"; -import { load_ae_obj_id__archive_content } from "$lib/ae_archives/ae_archives__archive_content"; -import { load_ae_obj_id__event } from "$lib/ae_events/ae_events__event"; -import { load_ae_obj_id__event_device } from "$lib/ae_events/ae_events__event_device"; -import { load_ae_obj_id__event_file } from "$lib/ae_events/ae_events__event_file"; -import { load_ae_obj_id__event_location } from "$lib/ae_events/ae_events__event_location"; -import { load_ae_obj_id__event_presentation } from "$lib/ae_events/ae_events__event_presentation"; -import { load_ae_obj_id__event_presenter } from "$lib/ae_events/ae_events__event_presenter"; -import { load_ae_obj_id__event_session } from "$lib/ae_events/ae_events__event_session"; -import { load_ae_obj_id__journal } from "$lib/ae_journals/ae_journals__journal"; -import { load_ae_obj_id__journal_entry } from "$lib/ae_journals/ae_journals__journal_entry"; -import { load_ae_obj_id__post } from "$lib/ae_posts/ae_posts__post"; -import { load_ae_obj_id__post_comment } from "$lib/ae_posts/ae_posts__post_comment"; -import { load_ae_obj_id__person } from "$lib/ae_core/core__person"; +import { load_ae_obj_id__archive } from '$lib/ae_archives/ae_archives__archive'; +import { load_ae_obj_id__archive_content } from '$lib/ae_archives/ae_archives__archive_content'; +import { load_ae_obj_id__event } from '$lib/ae_events/ae_events__event'; +import { load_ae_obj_id__event_device } from '$lib/ae_events/ae_events__event_device'; +import { load_ae_obj_id__event_file } from '$lib/ae_events/ae_events__event_file'; +import { load_ae_obj_id__event_location } from '$lib/ae_events/ae_events__event_location'; +import { load_ae_obj_id__event_presentation } from '$lib/ae_events/ae_events__event_presentation'; +import { load_ae_obj_id__event_presenter } from '$lib/ae_events/ae_events__event_presenter'; +import { load_ae_obj_id__event_session } from '$lib/ae_events/ae_events__event_session'; +import { load_ae_obj_id__journal } from '$lib/ae_journals/ae_journals__journal'; +import { load_ae_obj_id__journal_entry } from '$lib/ae_journals/ae_journals__journal_entry'; +import { load_ae_obj_id__post } from '$lib/ae_posts/ae_posts__post'; +import { load_ae_obj_id__post_comment } from '$lib/ae_posts/ae_posts__post_comment'; +import { load_ae_obj_id__person } from '$lib/ae_core/core__person'; +export async function update_ae_obj_id_crud_v2({ + api_cfg, + object_type, + object_id, + object_reload = false, + field_name, + new_field_value, + log_lvl = 0 +}: { + api_cfg: any; + object_type: string; + object_id: string; + object_reload?: boolean; + field_name: string; + new_field_value: any; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj_id_crud_v2() *** object_type=${object_type}, object_id=${object_id}, object_reload=${object_reload}, field_name=${field_name}, new_field_value=`, + new_field_value + ); + } + try { + const results = await api.update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: object_type, + obj_id: object_id, + field_name: field_name, + field_value: new_field_value, + key: api_cfg.api_crud_super_key, + log_lvl: log_lvl + }); + if (!results) { + console.log( + `Not Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}; Account ID: ${api_cfg.account_id}` + ); + return false; + } + console.log(`Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}`); -export async function update_ae_obj_id_crud_v2( - { - api_cfg, - object_type, - object_id, - object_reload = false, - field_name, - new_field_value, - log_lvl = 0 - }: { - api_cfg: any, - object_type: string, - object_id: string, - object_reload?: boolean, - field_name: string, - new_field_value: any, - log_lvl?: number - }) { - if (log_lvl) { - console.log(`*** update_ae_obj_id_crud_v2() *** object_type=${object_type}, object_id=${object_id}, object_reload=${object_reload}, field_name=${field_name}, new_field_value=`, new_field_value); - } + if (object_reload) { + if (log_lvl) console.log(`Reloading the object after patching...`); - try { - const results = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: object_type, - obj_id: object_id, - field_name: field_name, - field_value: new_field_value, - key: api_cfg.api_crud_super_key, - log_lvl: log_lvl - }); + const reload_fns: { [key: string]: (args: any) => Promise } = { + person: load_ae_obj_id__person, + archive: load_ae_obj_id__archive, + archive_content: load_ae_obj_id__archive_content, + journal: load_ae_obj_id__journal, + journal_entry: load_ae_obj_id__journal_entry, + event: load_ae_obj_id__event, + event_device: load_ae_obj_id__event_device, + event_file: load_ae_obj_id__event_file, + event_location: load_ae_obj_id__event_location, + event_presentation: load_ae_obj_id__event_presentation, + event_presenter: load_ae_obj_id__event_presenter, + event_session: load_ae_obj_id__event_session, + post: load_ae_obj_id__post, + post_comment: load_ae_obj_id__post_comment + }; - if (!results) { - console.log(`Not Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}; Account ID: ${api_cfg.account_id}`); - return false; - } + const reload_fn = reload_fns[object_type]; + if (reload_fn) { + const id_key = `${object_type}_id`; + return await reload_fn({ api_cfg, [id_key]: object_id, log_lvl }); + } + } - console.log(`Patched - Field Name: ${field_name} with new Field Value: ${new_field_value}`); - - if (object_reload) { - if (log_lvl) console.log(`Reloading the object after patching...`); - - const reload_fns: { [key: string]: (args: any) => Promise } = { - person: load_ae_obj_id__person, - archive: load_ae_obj_id__archive, - archive_content: load_ae_obj_id__archive_content, - journal: load_ae_obj_id__journal, - journal_entry: load_ae_obj_id__journal_entry, - event: load_ae_obj_id__event, - event_device: load_ae_obj_id__event_device, - event_file: load_ae_obj_id__event_file, - event_location: load_ae_obj_id__event_location, - event_presentation: load_ae_obj_id__event_presentation, - event_presenter: load_ae_obj_id__event_presenter, - event_session: load_ae_obj_id__event_session, - post: load_ae_obj_id__post, - post_comment: load_ae_obj_id__post_comment, - }; - - const reload_fn = reload_fns[object_type]; - if (reload_fn) { - const id_key = `${object_type}_id`; - return await reload_fn({ api_cfg, [id_key]: object_id, log_lvl }); - } - } - - return true; - - } catch (error) { - console.log('Something went wrong patching the record.', error); - return false; - } + return true; + } catch (error) { + console.log('Something went wrong patching the record.', error); + return false; + } } +export async function download_export_li({ + api_cfg, + get_obj_type, + for_obj_type, + for_obj_id, + exp_alt = null, + file_type = 'CSV', + return_file = true, + filename = 'no_filename.csv', + auto_download = false, + limit = 5000, + params = {}, + log_lvl = 0 +}: { + api_cfg: any; + get_obj_type: string; + for_obj_type: string; + for_obj_id: string; + exp_alt?: null | string; + file_type?: string; + return_file?: boolean; + filename?: string; + auto_download?: boolean; + limit?: number; + params?: key_val; + log_lvl?: number; +}) { + if (log_lvl) console.log('*** download_export_li() ***'); -export async function download_export_li( - { - api_cfg, - get_obj_type, - for_obj_type, - for_obj_id, - exp_alt = null, - file_type = 'CSV', - return_file = true, - filename = 'no_filename.csv', - auto_download = false, - limit = 5000, - params = {}, - log_lvl = 0 - }: { - api_cfg: any, - get_obj_type: string, - for_obj_type: string, - for_obj_id: string, - exp_alt?: null|string, - file_type?: string, - return_file?: boolean, - filename?: string, - auto_download?: boolean, - limit?: number, - params?: key_val, - log_lvl?: number - } - ) { - if (log_lvl) console.log('*** download_export_li() ***'); + const endpoint = `/v2/crud/${get_obj_type}/list`; + params['for_obj_type'] = for_obj_type; + params['for_obj_id'] = for_obj_id; - const endpoint = `/v2/crud/${get_obj_type}/list`; - params['for_obj_type'] = for_obj_type; - params['for_obj_id'] = for_obj_id; + if (file_type === 'CSV' || file_type === 'Excel') { + params['file_type'] = file_type; + } + params['return_file'] = true; + params['mdl_alt'] = 'out'; - if (file_type === 'CSV' || file_type === 'Excel') { - params['file_type'] = file_type; - } - params['return_file'] = true; - params['mdl_alt'] = 'out'; + if (exp_alt) { + params['exp_alt'] = exp_alt; + } - if (exp_alt) { - params['exp_alt'] = exp_alt; - } + const clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-_.]/gi, '_'); - const clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-_.]/gi, '_'); + if (limit >= 0) { + params['limit'] = limit; + } - if (limit >= 0) { - params['limit'] = limit; - } + const download_result = await api.get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + timeout: 90000, + return_blob: return_file, + filename: clean_filename, + auto_download: auto_download, + task_id: for_obj_id, + log_lvl: log_lvl + }); - const download_result = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - timeout: 90000, - return_blob: return_file, - filename: clean_filename, - auto_download: auto_download, - task_id: for_obj_id, - log_lvl: log_lvl - }); - - if (log_lvl) console.log('download_result:', download_result); - return download_result; + if (log_lvl) console.log('download_result:', download_result); + return download_result; } diff --git a/src/lib/ae_core/core__data_store.ts b/src/lib/ae_core/core__data_store.ts index f61ff702..a28eaea6 100644 --- a/src/lib/ae_core/core__data_store.ts +++ b/src/lib/ae_core/core__data_store.ts @@ -3,23 +3,23 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; export interface Data_Store { - id: string; - account_id: string; - code: string; - name: string; - type: string; - for_type?: string | null; - for_id?: string | null; - access_read?: string | null; - access_write?: string | null; - access_delete?: string | null; - html?: string | null; - json?: key_val | null; - md?: string | null; - text?: string | null; - updated_on?: string | null; - chk_account_id?: string; - loaded_on?: string; + id: string; + account_id: string; + code: string; + name: string; + type: string; + for_type?: string | null; + for_id?: string | null; + access_read?: string | null; + access_write?: string | null; + access_delete?: string | null; + html?: string | null; + json?: key_val | null; + md?: string | null; + text?: string | null; + updated_on?: string | null; + chk_account_id?: string; + loaded_on?: string; } /** @@ -33,83 +33,80 @@ export interface Data_Store { * @param log_lvl - The logging level. * @returns The data from the data store (e.g., text content or JSON object). */ -export async function load_ae_obj_by_code__data_store( - { - api_cfg, - code, - data_type = 'text', - save_idb = false, - timeout = 9000, - log_lvl = 0 - }: { - api_cfg: any, - code: string, - data_type?: string, - save_idb?: boolean, - timeout?: number, - log_lvl?: number - } - ): Promise { - if (log_lvl) { - console.log(`*** load_ae_obj_by_code__data_store() *** code=${code}`); - } +export async function load_ae_obj_by_code__data_store({ + api_cfg, + code, + data_type = 'text', + save_idb = false, + timeout = 9000, + log_lvl = 0 +}: { + api_cfg: any; + code: string; + data_type?: string; + save_idb?: boolean; + timeout?: number; + log_lvl?: number; +}): Promise { + if (log_lvl) { + console.log(`*** load_ae_obj_by_code__data_store() *** code=${code}`); + } - if (!code) { - console.log(`*ae_func* No code provided!`); - return null; - } + if (!code) { + console.log(`*ae_func* No code provided!`); + return null; + } - if (!api_cfg.account_id) { - console.log(`*ae_func* No account_id found in API config!`); - return null; - } + if (!api_cfg.account_id) { + console.log(`*ae_func* No account_id found in API config!`); + return null; + } - try { - const get_ds_result = await api.get_data_store_obj_w_code({ - api_cfg: api_cfg, - data_store_code: code, - data_type: data_type, - timeout: timeout, - log_lvl: log_lvl - }); + try { + const get_ds_result = await api.get_data_store_obj_w_code({ + api_cfg: api_cfg, + data_store_code: code, + data_type: data_type, + timeout: timeout, + log_lvl: log_lvl + }); - if (!get_ds_result) { - console.log('*ae_func* No results returned.'); - return null; - } + if (!get_ds_result) { + console.log('*ae_func* No results returned.'); + return null; + } - if (log_lvl) { - console.log(`*ae_func* Got a result for code ${code}`); - } + if (log_lvl) { + console.log(`*ae_func* Got a result for code ${code}`); + } - if (!get_ds_result.data_store_id_random) { - console.log('*ae_func* Something went wrong? No data store ID found.'); - return null; - } + if (!get_ds_result.data_store_id_random) { + console.log('*ae_func* Something went wrong? No data store ID found.'); + return null; + } - let return_this: any = null; + let return_this: any = null; - // Simplified data extraction - if (data_type === 'html') { - return_this = get_ds_result.html; - } else if (data_type === 'json') { - return_this = get_ds_result.json; - } else { - return_this = get_ds_result.text; - } + // Simplified data extraction + if (data_type === 'html') { + return_this = get_ds_result.html; + } else if (data_type === 'json') { + return_this = get_ds_result.json; + } else { + return_this = get_ds_result.text; + } - if (save_idb && browser) { - const key_prefix = 'ae_ds__'; - if (log_lvl) { - console.log(`*ae_func* localStorage key: ${code}, value:`, get_ds_result); - } - localStorage.setItem(`${key_prefix}${code}`, JSON.stringify(get_ds_result)); - } + if (save_idb && browser) { + const key_prefix = 'ae_ds__'; + if (log_lvl) { + console.log(`*ae_func* localStorage key: ${code}, value:`, get_ds_result); + } + localStorage.setItem(`${key_prefix}${code}`, JSON.stringify(get_ds_result)); + } - return return_this; - - } catch (error) { - console.log('*ae_func* No results returned or failed.', error); - return null; - } + return return_this; + } catch (error) { + console.log('*ae_func* No results returned or failed.', error); + return null; + } } diff --git a/src/lib/ae_core/core__hosted_files.ts b/src/lib/ae_core/core__hosted_files.ts index cd5ce7d7..128705dd 100644 --- a/src/lib/ae_core/core__hosted_files.ts +++ b/src/lib/ae_core/core__hosted_files.ts @@ -1,357 +1,360 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_core } from "$lib/ae_core/db_core"; - -let ae_promises: key_val = {}; +import { db_core } from '$lib/ae_core/db_core'; +const ae_promises: key_val = {}; // Updated 2024-06-14 -export async function load_ae_obj_id__hosted_file( - { - api_cfg, - hosted_file_id, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - hosted_file_id: string, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__hosted_file() *** hosted_file_id=${hosted_file_id}`); - } +export async function load_ae_obj_id__hosted_file({ + api_cfg, + hosted_file_id, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + hosted_file_id: string; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__hosted_file() *** hosted_file_id=${hosted_file_id}`); + } - let params = {}; + const params = {}; - ae_promises.load__hosted_file_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'hosted_file', - obj_id: hosted_file_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value - params: params, - log_lvl: log_lvl - }) - .then(function (hosted_file_obj_get_result) { - if (hosted_file_obj_get_result) { - // This is expecting a list - db_save_ae_obj_li__hosted_file({obj_type: 'hosted_file', obj_li: [hosted_file_obj_get_result]}); - return hosted_file_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__hosted_file_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'hosted_file', + obj_id: hosted_file_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value + params: params, + log_lvl: log_lvl + }) + .then(function (hosted_file_obj_get_result) { + if (hosted_file_obj_get_result) { + // This is expecting a list + db_save_ae_obj_li__hosted_file({ + obj_type: 'hosted_file', + obj_li: [hosted_file_obj_get_result] + }); + return hosted_file_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - return ae_promises.load__hosted_file_obj; + return ae_promises.load__hosted_file_obj; } - // Updated 2024-07-03 -export async function load_ae_obj_li__hosted_file( - { - api_cfg, - for_obj_type, - for_obj_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__hosted_file() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__hosted_file({ + api_cfg, + for_obj_type, + for_obj_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { priority: 'DESC', sort: 'DESC', updated_on: 'DESC', created_on: 'DESC' }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__hosted_file() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - // Check if for_obj_type is in the list of valid Aether object types: - let valid_for_obj_types = ['account', 'archive', 'archive_content', 'event', 'event_session', 'event_presentation', 'event_presenter', 'event_location', 'journal', 'journal_entry', 'post', 'post_comment']; - if (!valid_for_obj_types.includes(for_obj_type)) { - console.log(`Invalid for_obj_type: ${for_obj_type}`); - return []; - } + // Check if for_obj_type is in the list of valid Aether object types: + const valid_for_obj_types = [ + 'account', + 'archive', + 'archive_content', + 'event', + 'event_session', + 'event_presentation', + 'event_presenter', + 'event_location', + 'journal', + 'journal_entry', + 'post', + 'post_comment' + ]; + if (!valid_for_obj_types.includes(for_obj_type)) { + console.log(`Invalid for_obj_type: ${for_obj_type}`); + return []; + } - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'all'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 99); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'all'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 99); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - ae_promises.load__hosted_file_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'hosted_file', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: false, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(function (hosted_file_obj_li_get_result) { - if (hosted_file_obj_li_get_result) { - if (try_cache) { - db_save_ae_obj_li__hosted_file({ - obj_type: 'hosted_file', - obj_li: hosted_file_obj_li_get_result, - log_lvl: log_lvl - }); - } - return hosted_file_obj_li_get_result; - } else { - console.log('No results returned.'); - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__hosted_file_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'hosted_file', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: false, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(function (hosted_file_obj_li_get_result) { + if (hosted_file_obj_li_get_result) { + if (try_cache) { + db_save_ae_obj_li__hosted_file({ + obj_type: 'hosted_file', + obj_li: hosted_file_obj_li_get_result, + log_lvl: log_lvl + }); + } + return hosted_file_obj_li_get_result; + } else { + console.log('No results returned.'); + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__hosted_file_obj_li:', ae_promises.load__hosted_file_obj_li); - } - return ae_promises.load__hosted_file_obj_li; + if (log_lvl) { + console.log('ae_promises.load__hosted_file_obj_li:', ae_promises.load__hosted_file_obj_li); + } + return ae_promises.load__hosted_file_obj_li; } - // Updated 2024-11-07 -export async function delete_ae_obj_id__hosted_file( - { - api_cfg, - hosted_file_id, - link_to_type, // Ideally this should be required... - link_to_id, // Ideally this should be required... - rm_orphan = false, - fake_delete = false, // Fake the delete result to "true" - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - hosted_file_id: string, - link_to_type: string, - link_to_id: string, - rm_orphan?: boolean, - fake_delete?: boolean, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__hosted_file() *** hosted_file_id=${hosted_file_id}`); - } +export async function delete_ae_obj_id__hosted_file({ + api_cfg, + hosted_file_id, + link_to_type, // Ideally this should be required... + link_to_id, // Ideally this should be required... + rm_orphan = false, + fake_delete = false, // Fake the delete result to "true" + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + hosted_file_id: string; + link_to_type: string; + link_to_id: string; + rm_orphan?: boolean; + fake_delete?: boolean; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__hosted_file() *** hosted_file_id=${hosted_file_id}`); + } - const endpoint = `/hosted_file/${hosted_file_id}`; + const endpoint = `/hosted_file/${hosted_file_id}`; - params['link_to_type'] = link_to_type; - params['link_to_id'] = link_to_id; - params['rm_orphan'] = rm_orphan; // This is what actually allows the hosted file to be deleted from the server. - if (log_lvl) { - console.log(`delete_ae_obj_id__hosted_file() params=`, params); - } + params['link_to_type'] = link_to_type; + params['link_to_id'] = link_to_id; + params['rm_orphan'] = rm_orphan; // This is what actually allows the hosted file to be deleted from the server. + if (log_lvl) { + console.log(`delete_ae_obj_id__hosted_file() params=`, params); + } - if (fake_delete) { - console.log(`*** FAKE DELETE!!! ***`); - ae_promises.delete__hosted_file_obj = true; - return ae_promises.delete__hosted_file_obj; - } + if (fake_delete) { + console.log(`*** FAKE DELETE!!! ***`); + ae_promises.delete__hosted_file_obj = true; + return ae_promises.delete__hosted_file_obj; + } - ae_promises.delete__hosted_file_obj = await api.delete_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - // return_meta: return_meta, - log_lvl: log_lvl - }) - .then(function (hosted_file_obj_li_get_result) { - if (hosted_file_obj_li_get_result) { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for hosted_file_id=${hosted_file_id}`); - } - db_core.file.delete(hosted_file_id); // Delete from the DB no matter what. - } - return hosted_file_obj_li_get_result; - } else { - console.log('No results returned.'); - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.delete__hosted_file_obj = await api + .delete_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + // return_meta: return_meta, + log_lvl: log_lvl + }) + .then(function (hosted_file_obj_li_get_result) { + if (hosted_file_obj_li_get_result) { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for hosted_file_id=${hosted_file_id}`); + } + db_core.file.delete(hosted_file_id); // Delete from the DB no matter what. + } + return hosted_file_obj_li_get_result; + } else { + console.log('No results returned.'); + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.delete__hosted_file_obj:', ae_promises.delete__hosted_file_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__hosted_file_obj:', ae_promises.delete__hosted_file_obj); + } - return ae_promises.delete__hosted_file_obj; + return ae_promises.delete__hosted_file_obj; } - - // This function will loop through the hosted_file_obj_li and save each one to the DB. // Updated 2025-01-07 -export function db_save_ae_obj_li__hosted_file( - { - obj_type, - obj_li, - log_lvl = 0 - }: { - obj_type: string, - obj_li: any, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** db_save_ae_obj_li__hosted_file() ***`); - } +export function db_save_ae_obj_li__hosted_file({ + obj_type, + obj_li, + log_lvl = 0 +}: { + obj_type: string; + obj_li: any; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** db_save_ae_obj_li__hosted_file() ***`); + } - if (obj_li && obj_li.length) { - obj_li.forEach(async function (obj: any) { - if (log_lvl) { - console.log(`ae_obj ${obj_type}:`, obj); - } + if (obj_li && obj_li.length) { + obj_li.forEach(async function (obj: any) { + if (log_lvl) { + console.log(`ae_obj ${obj_type}:`, obj); + } - try { - const id_random = await db_core.file.put({ - id: obj.hosted_file_id_random, - id_random: obj.hosted_file_id_random, - hosted_file_id: obj.hosted_file_id_random, - hosted_file_id_random: obj.hosted_file_id_random, + try { + const id_random = await db_core.file.put({ + id: obj.hosted_file_id_random, + id_random: obj.hosted_file_id_random, + hosted_file_id: obj.hosted_file_id_random, + hosted_file_id_random: obj.hosted_file_id_random, - hash_sha256: obj.hash_sha256, // Renamed with alias in FastAPI model + hash_sha256: obj.hash_sha256, // Renamed with alias in FastAPI model - for_type: obj.for_type, - for_id: obj.for_id_id_random, - for_id_random: obj.for_id_random, + for_type: obj.for_type, + for_id: obj.for_id_id_random, + for_id_random: obj.for_id_random, - account_id: obj.account_id_random, + account_id: obj.account_id_random, - filename: obj.filename, - extension: obj.extension, - content_type: obj.content_type, - size: obj.size, + filename: obj.filename, + extension: obj.extension, + content_type: obj.content_type, + size: obj.size, - enable: obj.enable, - hide: obj.hide, - // priority: obj.priority, - // sort: obj.sort, - group: obj.group, - notes: obj.notes, - created_on: obj.created_on, - updated_on: obj.updated_on, + enable: obj.enable, + hide: obj.hide, + // priority: obj.priority, + // sort: obj.sort, + group: obj.group, + notes: obj.notes, + created_on: obj.created_on, + updated_on: obj.updated_on, - filename_no_ext: obj.filename_no_ext, - filename_w_ext: obj.filename_w_ext, - }); - // console.log(`Put obj with ID: ${obj.hosted_file_id_random} or ${id_random}`); - } catch (error) { - let status = `Failed to put ${obj.hosted_file_id_random}: ${error}`; - console.log(status); - } + filename_no_ext: obj.filename_no_ext, + filename_w_ext: obj.filename_w_ext + }); + // console.log(`Put obj with ID: ${obj.hosted_file_id_random} or ${id_random}`); + } catch (error) { + const status = `Failed to put ${obj.hosted_file_id_random}: ${error}`; + console.log(status); + } - // const id_random = await db_core.file.put(obj); - // console.log(`Put obj with ID: ${obj.hosted_file_id_random}`); - }); + // const id_random = await db_core.file.put(obj); + // console.log(`Put obj with ID: ${obj.hosted_file_id_random}`); + }); - return true; - } - return false; + return true; + } + return false; } - // Updated 2025-01-07 -export function db_update_ae_obj_id__hosted_file( - { - obj_type, - obj_id, - data_kv, - log_lvl = 0 - }: { - obj_type: string, - obj_id: string, - data_kv: key_val, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** db_update_ae_obj_id__hosted_file() ***`); - } +export function db_update_ae_obj_id__hosted_file({ + obj_type, + obj_id, + data_kv, + log_lvl = 0 +}: { + obj_type: string; + obj_id: string; + data_kv: key_val; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** db_update_ae_obj_id__hosted_file() ***`); + } - if (obj_id) { - console.log(`ae_obj ${obj_type}:`, obj_id); + if (obj_id) { + console.log(`ae_obj ${obj_type}:`, obj_id); - try { - // db_core.file.update(obj_id, data_kv); - db_core.file.update(obj_id, - { - // for_type: data_kv.for_type, - // for_id: data_kv.for_id_id_random, - // for_id_random: data_kv.for_id_random, + try { + // db_core.file.update(obj_id, data_kv); + db_core.file.update(obj_id, { + // for_type: data_kv.for_type, + // for_id: data_kv.for_id_id_random, + // for_id_random: data_kv.for_id_random, - filename: data_kv.filename, - extension: data_kv.extension, - content_type: data_kv.content_type, - size: data_kv.size, + filename: data_kv.filename, + extension: data_kv.extension, + content_type: data_kv.content_type, + size: data_kv.size, - // enable: data_kv.enable, - // hide: data_kv.hide, - // priority: data_kv.priority, - // sort: data_kv.sort, - // group: data_kv.group, - // notes: data_kv.notes, - // created_on: data_kv.created_on, - // updated_on: data_kv.updated_on, + // enable: data_kv.enable, + // hide: data_kv.hide, + // priority: data_kv.priority, + // sort: data_kv.sort, + // group: data_kv.group, + // notes: data_kv.notes, + // created_on: data_kv.created_on, + // updated_on: data_kv.updated_on, - filename_no_ext: data_kv.filename_no_ext, - filename_w_ext: data_kv.filename_w_ext, - // hosted_file_content_type: data_kv.hosted_file_content_type, - // file_size: data_kv.file_size, - // hosted_file_size: data_kv.hosted_file_size, - } - ); + filename_no_ext: data_kv.filename_no_ext, + filename_w_ext: data_kv.filename_w_ext + // hosted_file_content_type: data_kv.hosted_file_content_type, + // file_size: data_kv.file_size, + // hosted_file_size: data_kv.hosted_file_size, + }); - console.log(`Update obj with ID: ${obj_id}`); - } catch (error) { - let status = `Failed to update ${obj_id}: ${error}`; - console.log(status); - } + console.log(`Update obj with ID: ${obj_id}`); + } catch (error) { + const status = `Failed to update ${obj_id}: ${error}`; + console.log(status); + } - // const id_random = await db_core.file.put(obj); - // console.log(`Put obj with ID: ${data_kv.hosted_file_id_random}`); - return true; - } - return false; + // const id_random = await db_core.file.put(obj); + // console.log(`Put obj with ID: ${data_kv.hosted_file_id_random}`); + return true; + } + return false; } diff --git a/src/lib/ae_core/core__idb_dexie.ts b/src/lib/ae_core/core__idb_dexie.ts index 006ef501..3d39f72e 100644 --- a/src/lib/ae_core/core__idb_dexie.ts +++ b/src/lib/ae_core/core__idb_dexie.ts @@ -7,7 +7,11 @@ import type { Dexie, Table } from 'dexie'; * @param log_lvl The logging level. * @returns The found ID, or undefined if no ID could be found. */ -function find_object_id(obj: any, table_name: string, log_lvl: number): string | number | undefined { +function find_object_id( + obj: any, + table_name: string, + log_lvl: number +): string | number | undefined { const potential_keys = ['id', `${table_name}_id`, `${table_name}_id_random`]; for (const key of potential_keys) { @@ -112,4 +116,4 @@ export async function db_save_ae_obj_li__ae_obj>({ // Re-throw the error to let the caller handle it. throw error; } -} \ No newline at end of file +} diff --git a/src/lib/ae_core/core__person.ts b/src/lib/ae_core/core__person.ts index ec7389b6..fe334ff7 100644 --- a/src/lib/ae_core/core__person.ts +++ b/src/lib/ae_core/core__person.ts @@ -1,655 +1,643 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_core } from "$lib/ae_core/db_core"; - -let ae_promises: key_val = {}; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_core } from '$lib/ae_core/db_core'; +const ae_promises: key_val = {}; // Updated 2025-06-10 -export async function load_ae_obj_id__person( - { - api_cfg, - person_id, - params = {}, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - person_id: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__person() *** person_id=${person_id}`); - } +export async function load_ae_obj_id__person({ + api_cfg, + person_id, + params = {}, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + person_id: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__person() *** person_id=${person_id}`); + } - ae_promises.load__person_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'person', - obj_id: person_id, - use_alt_table: false, - use_alt_base: false, - params: params, - log_lvl: log_lvl - }) - .then(async function (person_obj_get_result) { - if (person_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__person_props({ - obj_li: [person_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_core, - table_name: 'person', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__person_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'person', + obj_id: person_id, + use_alt_table: false, + use_alt_base: false, + params: params, + log_lvl: log_lvl + }) + .then(async function (person_obj_get_result) { + if (person_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__person_props({ + obj_li: [person_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_core, + table_name: 'person', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__person({ - // obj_type: 'person', - // obj_li: [person_obj_get_result], - // log_lvl: log_lvl - // }); - } - return person_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // // This is expecting a list + // db_save_ae_obj_li__person({ + // obj_type: 'person', + // obj_li: [person_obj_get_result], + // log_lvl: log_lvl + // }); + } + return person_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__person_obj:', ae_promises.load__person_obj); - } + if (log_lvl) { + console.log('ae_promises.load__person_obj:', ae_promises.load__person_obj); + } - return ae_promises.load__person_obj; + return ae_promises.load__person_obj; } - // Updated 2025-06-10 -export async function load_ae_obj_li__person( - { - api_cfg, - for_obj_type = 'account', - for_obj_id, - qry_email = null, - qry_user_id = null, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = [{'family_name': 'ASC'}, {'given_name': 'ASC'}, {'updated_on': 'DESC'}, {'created_on': 'DESC'}], - // params_json = {}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - qry_email?: string|null, - qry_user_id?: string|null, - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, - offset?: number, - order_by_li?: { [key: string]: "ASC" | "DESC" }[] | null, - // params_json?: null|key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__person() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id} enabled=${enabled} hidden=${hidden} limit=${limit} offset=${offset}`); - } +export async function load_ae_obj_li__person({ + api_cfg, + for_obj_type = 'account', + for_obj_id, + qry_email = null, + qry_user_id = null, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = [ + { family_name: 'ASC' }, + { given_name: 'ASC' }, + { updated_on: 'DESC' }, + { created_on: 'DESC' } + ], + // params_json = {}, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + qry_email?: string | null; + qry_user_id?: string | null; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; + offset?: number; + order_by_li?: { [key: string]: 'ASC' | 'DESC' }[] | null; + // params_json?: null|key_val, + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__person() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id} enabled=${enabled} hidden=${hidden} limit=${limit} offset=${offset}` + ); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); - if (qry_user_id) { - // params_json['and_qry'] = {}; - // params_json['and_qry']['user_id_random'] = qry_user_id; + // console.log('params_json:', params_json); + if (qry_user_id) { + // params_json['and_qry'] = {}; + // params_json['and_qry']['user_id_random'] = qry_user_id; - params_json['qry'] = [] + params_json['qry'] = []; - let qry_param = - { - type: "AND", - field: "user_id_random", - operator: "=", - value: qry_user_id - }; - params_json['qry'].push(qry_param); - } + const qry_param = { + type: 'AND', + field: 'user_id_random', + operator: '=', + value: qry_user_id + }; + params_json['qry'].push(qry_param); + } - if (log_lvl) { - console.log('params_json:', params_json); - } + if (log_lvl) { + console.log('params_json:', params_json); + } - ae_promises.load__person_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'person', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: false, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (person_obj_li_get_result) { - if (person_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__person_props({ - obj_li: person_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_core, - table_name: 'person', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__person_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'person', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: false, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (person_obj_li_get_result) { + if (person_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__person_props({ + obj_li: person_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_core, + table_name: 'person', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__person({ - // obj_type: 'person', - // obj_li: person_obj_li_get_result, - // log_lvl: log_lvl - // }); - } - return person_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // db_save_ae_obj_li__person({ + // obj_type: 'person', + // obj_li: person_obj_li_get_result, + // log_lvl: log_lvl + // }); + } + return person_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - console.log('ae_promises.load__person_obj_li:', ae_promises.load__person_obj_li); - return ae_promises.load__person_obj_li; + console.log('ae_promises.load__person_obj_li:', ae_promises.load__person_obj_li); + return ae_promises.load__person_obj_li; } - // Updated 2025-06-10 -export async function create_ae_obj__person( - { - api_cfg, - user_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - user_id?: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__person() *** user_id=${user_id}`); - } +export async function create_ae_obj__person({ + api_cfg, + user_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + user_id?: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__person() *** user_id=${user_id}`); + } - ae_promises.create__person = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'person', - fields: { - user_id_random: user_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (person_obj_create_result) { - if (person_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__person_props({ - obj_li: [person_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_core, - table_name: 'person', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__person = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'person', + fields: { + user_id_random: user_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (person_obj_create_result) { + if (person_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__person_props({ + obj_li: [person_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_core, + table_name: 'person', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__person( - // { - // obj_type: 'person', - // obj_li: [person_obj_create_result], - // log_lvl: log_lvl - // }); - } - return person_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__person( + // { + // obj_type: 'person', + // obj_li: [person_obj_create_result], + // log_lvl: log_lvl + // }); + } + return person_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__person:', ae_promises.create__person); - } - return ae_promises.create__person; + if (log_lvl) { + console.log('ae_promises.create__person:', ae_promises.create__person); + } + return ae_promises.create__person; } - // Updated 2025-05-10 -export async function delete_ae_obj_id__person( - { - api_cfg, - person_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - person_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__person() *** person_id=${person_id}`); - } +export async function delete_ae_obj_id__person({ + api_cfg, + person_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + person_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__person() *** person_id=${person_id}`); + } - ae_promises.delete__person_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'person', - obj_id: person_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(async function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for person_id=${person_id}`); - } - await db_core.person.delete(person_id); - } - }); + ae_promises.delete__person_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'person', + obj_id: person_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(async function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for person_id=${person_id}`); + } + await db_core.person.delete(person_id); + } + }); - if (log_lvl) { - console.log('ae_promises.delete__person_obj:', ae_promises.delete__person_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__person_obj:', ae_promises.delete__person_obj); + } - return ae_promises.delete__person_obj; + return ae_promises.delete__person_obj; } - // Updated 2025-06-10 -export async function update_ae_obj__person( - { - api_cfg, - person_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - person_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__person() *** person_id=${person_id}`, data_kv); - } +export async function update_ae_obj__person({ + api_cfg, + person_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + person_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** update_ae_obj__person() *** person_id=${person_id}`, data_kv); + } - // log_lvl = 1; + // log_lvl = 1; - // Perform the API update - const result = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'person', - obj_id: person_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }); + // Perform the API update + const result = await api.update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'person', + obj_id: person_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }); - // Handle the result - if (result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__person_props({ - obj_li: [result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_core, - table_name: 'person', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // Handle the result + if (result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__person_props({ + obj_li: [result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_core, + table_name: 'person', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__person({ - // obj_type: 'person', - // obj_li: [result], - // log_lvl: log_lvl, - // }); - } - return result; - } else { - console.error('Failed to update person.'); - return null; - } + // await db_save_ae_obj_li__person({ + // obj_type: 'person', + // obj_li: [result], + // log_lvl: log_lvl, + // }); + } + return result; + } else { + console.error('Failed to update person.'); + return null; + } } - // Updated 2024-06-10 -export function db_save_ae_obj_li__person( - { - obj_type, - obj_li, - log_lvl = 0 - }: { - obj_type: string, - obj_li: any, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** db_save_ae_obj_li__person() ***`); - } +export function db_save_ae_obj_li__person({ + obj_type, + obj_li, + log_lvl = 0 +}: { + obj_type: string; + obj_li: any; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** db_save_ae_obj_li__person() ***`); + } - if (obj_li && obj_li.length) { - obj_li.forEach(async function (obj: any) { - if (log_lvl) { - console.log(`ae_obj ${obj_type}:`, obj); - } + if (obj_li && obj_li.length) { + obj_li.forEach(async function (obj: any) { + if (log_lvl) { + console.log(`ae_obj ${obj_type}:`, obj); + } - let obj_record = { - id: obj.person_id_random, - // id_random: obj.person_id_random, - person_id: obj.person_id_random, - person_id_random: obj.person_id_random, + const obj_record = { + id: obj.person_id_random, + // id_random: obj.person_id_random, + person_id: obj.person_id_random, + person_id_random: obj.person_id_random, - external_id: obj.external_id, - external_sys_id: obj.external_sys_id, - code: obj.code, + external_id: obj.external_id, + external_sys_id: obj.external_sys_id, + code: obj.code, - account_id: obj.account_id_random, - account_id_random: obj.account_id_random, + account_id: obj.account_id_random, + account_id_random: obj.account_id_random, - person_profile_id: obj.person_profile_id_random, - person_profile_id_random: obj.person_profile_id_random, // The new table person_profile will be used soon... + person_profile_id: obj.person_profile_id_random, + person_profile_id_random: obj.person_profile_id_random, // The new table person_profile will be used soon... - user_id: obj.user_id_random, - user_id_random: obj.user_id_random, + user_id: obj.user_id_random, + user_id_random: obj.user_id_random, - pronouns: obj.pronouns, - informal_name: obj.informal_name, - title_names: obj.title_names, - given_name: obj.given_name, - middle_name: obj.middle_name, - family_name: obj.family_name, - designations: obj.designations, + pronouns: obj.pronouns, + informal_name: obj.informal_name, + title_names: obj.title_names, + given_name: obj.given_name, + middle_name: obj.middle_name, + family_name: obj.family_name, + designations: obj.designations, - professional_title: obj.professional_title, + professional_title: obj.professional_title, - full_name: obj.full_name, - full_name_override: obj.full_name_override, // was display_name and display_name_override + full_name: obj.full_name, + full_name_override: obj.full_name_override, // was display_name and display_name_override - affiliations: obj.affiliations, + affiliations: obj.affiliations, - primary_email: obj.primary_email, + primary_email: obj.primary_email, - biography: obj.biography, + biography: obj.biography, - agree: obj.agree, - comments: obj.comments, + agree: obj.agree, + comments: obj.comments, - allow_auth_key: obj.allow_auth_key, // For sign in without password - // auth_key: obj.auth_key, - passcode: obj.passcode, + allow_auth_key: obj.allow_auth_key, // For sign in without password + // auth_key: obj.auth_key, + passcode: obj.passcode, - data_json: obj.data_json, + data_json: obj.data_json, - enable: obj.enable, - hide: obj.hide, - priority: obj.priority, - sort: obj.sort, - group: obj.group, - notes: obj.notes, - created_on: obj.created_on, - updated_on: obj.updated_on, + enable: obj.enable, + hide: obj.hide, + priority: obj.priority, + sort: obj.sort, + group: obj.group, + notes: obj.notes, + created_on: obj.created_on, + updated_on: obj.updated_on, - // From SQL view - username: obj.username, - user_name: obj.user_name, - user_email: obj.user_email, - user_allow_auth_key: obj.user_allow_auth_key, // For sign in without password - user_super: obj.user_super, - user_manager: obj.user_manager, - user_administrator: obj.user_administrator, - user_public: obj.user_public, - }; + // From SQL view + username: obj.username, + user_name: obj.user_name, + user_email: obj.user_email, + user_allow_auth_key: obj.user_allow_auth_key, // For sign in without password + user_super: obj.user_super, + user_manager: obj.user_manager, + user_administrator: obj.user_administrator, + user_public: obj.user_public + }; - let id_random = null; + let id_random = null; - try { - id_random = await db_core.person.update(obj_record.id, obj_record); - } catch (error) { - console.log(`Error: Failed to update ${obj_record.id}: ${error}`); - } - if (!id_random) { - if (log_lvl) { - console.log(`Failed to update record with ID: ${obj_record.id}. Trying put...`); - } - try { - id_random = await db_core.person.put(obj_record); - } catch (error) { - console.log(`Error: Failed to put ${obj.person_id_random}: ${error}`); - } - } else { - if (log_lvl) { - console.log(`Updated record with ID: ${obj_record.id}`); - } - } - if (!id_random) { - console.log(`Failed to save record with ID: ${obj_record.id}`); - } else { - if (log_lvl) { - console.log(`Saved record with ID: ${obj_record.id}`); - } - } - }); + try { + id_random = await db_core.person.update(obj_record.id, obj_record); + } catch (error) { + console.log(`Error: Failed to update ${obj_record.id}: ${error}`); + } + if (!id_random) { + if (log_lvl) { + console.log(`Failed to update record with ID: ${obj_record.id}. Trying put...`); + } + try { + id_random = await db_core.person.put(obj_record); + } catch (error) { + console.log(`Error: Failed to put ${obj.person_id_random}: ${error}`); + } + } else { + if (log_lvl) { + console.log(`Updated record with ID: ${obj_record.id}`); + } + } + if (!id_random) { + console.log(`Failed to save record with ID: ${obj_record.id}`); + } else { + if (log_lvl) { + console.log(`Saved record with ID: ${obj_record.id}`); + } + } + }); - return true; - } + return true; + } } - // Updated 2025-06-10 -let properties_to_save = [ +const properties_to_save = [ + 'id', + 'person_id', + // 'person_id_random', - 'id', - 'person_id', - // 'person_id_random', + 'external_id', + 'external_sys_id', + 'code', - 'external_id', - 'external_sys_id', - 'code', + 'account_id', + // 'account_id_random', - 'account_id', - // 'account_id_random', + 'person_profile_id', + // 'person_profile_id_random', // The new table person_profile will be used soon... - 'person_profile_id', - // 'person_profile_id_random', // The new table person_profile will be used soon... + 'user_id', + // 'user_id_random', - 'user_id', - // 'user_id_random', + 'pronouns', + 'informal_name', + 'title_names', + 'given_name', + 'middle_name', + 'family_name', + 'designations', - 'pronouns', - 'informal_name', - 'title_names', - 'given_name', - 'middle_name', - 'family_name', - 'designations', + 'professional_title', - 'professional_title', + 'full_name', + 'full_name_override', // was display_name and display_name_override - 'full_name', - 'full_name_override', // was display_name and display_name_override + 'affiliations', + 'primary_email', + 'biography', + 'agree', + 'comments', - 'affiliations', - 'primary_email', - 'biography', - 'agree', - 'comments', + 'allow_auth_key', // For sign in without password + // 'auth_key', // Should this be saved locally? + 'passcode', - 'allow_auth_key', // For sign in without password - // 'auth_key', // Should this be saved locally? - 'passcode', + // 'passcode_timeout', + // 'passcode_read', // For LLM (AI) generated summary...??? + // 'passcode_read_expire', + // 'passcode_write', + // 'passcode_write_expire', + // 'private_passcode', - // 'passcode_timeout', - // 'passcode_read', // For LLM (AI) generated summary...??? - // 'passcode_read_expire', - // 'passcode_write', - // 'passcode_write_expire', - // 'private_passcode', + // 'alert', + // 'alert_msg', - // 'alert', - // 'alert_msg', + 'data_json', - 'data_json', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + 'tmp_sort_3', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - 'tmp_sort_3', + // From SQL view + 'username', + // 'user_username', // Same as username + 'user_name', + 'user_email', + 'user_allow_auth_key', // For sign in without password + 'user_super', + 'user_manager', + 'user_administrator', + 'user_public', - // From SQL view - 'username', - // 'user_username', // Same as username - 'user_name', - 'user_email', - 'user_allow_auth_key', // For sign in without password - 'user_super', - 'user_manager', - 'user_administrator', - 'user_public', + 'organization_id', + // 'organization_id_random', + 'organization_name', - 'organization_id', - // 'organization_id_random', - 'organization_name', + 'contact_id', + // 'contact_id_random', + 'contact_name', + 'contact_email', + 'contact_cc_email', + 'contact_phone_mobile', + 'contact_phone_home', + 'contact_phone_office', + 'contact_phone_land', + 'contact_phone_fax', + 'contact_phone_other', - 'contact_id', - // 'contact_id_random', - 'contact_name', - 'contact_email', - 'contact_cc_email', - 'contact_phone_mobile', - 'contact_phone_home', - 'contact_phone_office', - 'contact_phone_land', - 'contact_phone_fax', - 'contact_phone_other', - - 'address_id', - // 'address_id_random', - 'address_city', - 'address_country_alpha_2_code', // contact_address_country_alpha_2_code + 'address_id', + // 'address_id_random', + 'address_city', + 'address_country_alpha_2_code' // contact_address_country_alpha_2_code ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -718,7 +706,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-06-10 export async function process_ae_obj__person_props({ obj_li, diff --git a/src/lib/ae_core/core__qr_code.ts b/src/lib/ae_core/core__qr_code.ts index ad45c222..9a6131a7 100644 --- a/src/lib/ae_core/core__qr_code.ts +++ b/src/lib/ae_core/core__qr_code.ts @@ -1,146 +1,149 @@ -import QRCode from 'qrcode' +import QRCode from 'qrcode'; import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_core } from "$lib/ae_core/db_core"; +import { db_core } from '$lib/ae_core/db_core'; -let ae_promises: key_val = {}; +const ae_promises: key_val = {}; // I recently made significant updates to this with the help of Copilot. I think it is correct. // Updated 2025-10-03 -export async function generate_qr_code( - { - api_cfg, - account_id, - qr_type, // mecard, obj, str, vcard - qr_id, // This is essentially the filename it can be found at /qr/{account_id}/{qr_id} - qr_data, // vcard fields: - obj_type, - obj_id, - str, // For encoding a string (like a URL) into a QR code. - return_blob = true, // blob or url? - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - qr_type: string, - qr_id: string, - qr_data?: any, - obj_type?: string, - obj_id?: string, - str?: string, - return_blob?: boolean, - try_cache?: boolean, - log_lvl?: number - } -) { - if (log_lvl) { - console.log(`*** generate_qr_code() *** qr_id=${qr_id}`); - } +export async function generate_qr_code({ + api_cfg, + account_id, + qr_type, // mecard, obj, str, vcard + qr_id, // This is essentially the filename it can be found at /qr/{account_id}/{qr_id} + qr_data, // vcard fields: + obj_type, + obj_id, + str, // For encoding a string (like a URL) into a QR code. + return_blob = true, // blob or url? + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + qr_type: string; + qr_id: string; + qr_data?: any; + obj_type?: string; + obj_id?: string; + str?: string; + return_blob?: boolean; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** generate_qr_code() *** qr_id=${qr_id}`); + } - let endpoint = `/qr/${account_id}/${qr_id}`; - if (log_lvl) { - console.log('Endpoint', endpoint); - } - let params: key_val = { - 'regen': true, // Regenerate the file even if nothing has changed. - 'return_file': return_blob, - 'qr_type': qr_type, // mecard, obj, vcard - 'qr_send': return_blob - }; + const endpoint = `/qr/${account_id}/${qr_id}`; + if (log_lvl) { + console.log('Endpoint', endpoint); + } + const params: key_val = { + regen: true, // Regenerate the file even if nothing has changed. + return_file: return_blob, + qr_type: qr_type, // mecard, obj, vcard + qr_send: return_blob + }; - if (qr_type == 'vcard') { - if (qr_data.informal_name) { - params['n'] = `${qr_data.family_name};${qr_data.given_name};${qr_data.informal_name}`; - } else { - params['n'] = `${qr_data.family_name};${qr_data.given_name}`; - } - params['fn'] = qr_data.full_name_override; - if (qr_data.affiliations) { params['org'] = qr_data.affiliations; } - params['email'] = qr_data.email; - if (qr_data.phone) { params['tel'] = qr_data.phone; } - params['adr'] = qr_data.location_override; - if (qr_data.address_line_1) { params['adr_str'] = qr_data.address_line_1; } - params['adr_loc'] = qr_data.city; - params['adr_reg'] = qr_data.state_province; - params['adr_postal'] = qr_data.postal_code; - params['adr_country'] = qr_data.country; - } else if (qr_type == 'obj') { - params['obj_type'] = obj_type; - params['obj_id'] = obj_id; - } else if (qr_type == 'str') { - params['str'] = str; - } + if (qr_type == 'vcard') { + if (qr_data.informal_name) { + params['n'] = `${qr_data.family_name};${qr_data.given_name};${qr_data.informal_name}`; + } else { + params['n'] = `${qr_data.family_name};${qr_data.given_name}`; + } + params['fn'] = qr_data.full_name_override; + if (qr_data.affiliations) { + params['org'] = qr_data.affiliations; + } + params['email'] = qr_data.email; + if (qr_data.phone) { + params['tel'] = qr_data.phone; + } + params['adr'] = qr_data.location_override; + if (qr_data.address_line_1) { + params['adr_str'] = qr_data.address_line_1; + } + params['adr_loc'] = qr_data.city; + params['adr_reg'] = qr_data.state_province; + params['adr_postal'] = qr_data.postal_code; + params['adr_country'] = qr_data.country; + } else if (qr_type == 'obj') { + params['obj_type'] = obj_type; + params['obj_id'] = obj_id; + } else if (qr_type == 'str') { + params['str'] = str; + } - if (log_lvl) { - console.log('Params', params); - } + if (log_lvl) { + console.log('Params', params); + } - let filename = null; + const filename = null; - // Await the API call - ae_promises.generate_qr_code = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - return_blob: return_blob, - filename: filename, - auto_download: false, - log_lvl: log_lvl - }); + // Await the API call + ae_promises.generate_qr_code = await api.get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + return_blob: return_blob, + filename: filename, + auto_download: false, + log_lvl: log_lvl + }); - if (log_lvl) { - console.log('QR code API response:', ae_promises.generate_qr_code); - } + if (log_lvl) { + console.log('QR code API response:', ae_promises.generate_qr_code); + } - // If return_blob is true, ensure we return an object URL for use in - if (return_blob) { - let data = ae_promises.generate_qr_code.data ?? ae_promises.generate_qr_code; + // If return_blob is true, ensure we return an object URL for use in + if (return_blob) { + const data = ae_promises.generate_qr_code.data ?? ae_promises.generate_qr_code; - // If already a Blob, use it directly - if (data instanceof Blob) { - return URL.createObjectURL(data); - } + // If already a Blob, use it directly + if (data instanceof Blob) { + return URL.createObjectURL(data); + } - // If it's a Response (from fetch), convert to Blob - if (data instanceof Response) { - const blob = await data.blob(); - return URL.createObjectURL(blob); - } + // If it's a Response (from fetch), convert to Blob + if (data instanceof Response) { + const blob = await data.blob(); + return URL.createObjectURL(blob); + } - // If it's an ArrayBuffer or Uint8Array, convert to Blob - if (data instanceof ArrayBuffer || data instanceof Uint8Array) { - const blob = new Blob([data], { type: "image/png" }); - return URL.createObjectURL(blob); - } + // If it's an ArrayBuffer or Uint8Array, convert to Blob + if (data instanceof ArrayBuffer || data instanceof Uint8Array) { + const blob = new Blob([data], { type: 'image/png' }); + return URL.createObjectURL(blob); + } - // If it's a base64 string, return as data URL - if (typeof data === "string" && data.startsWith("data:image")) { - return data; - } + // If it's a base64 string, return as data URL + if (typeof data === 'string' && data.startsWith('data:image')) { + return data; + } - // If it's a raw string (base64), convert to data URL - if (typeof data === "string") { - return `data:image/png;base64,${data}`; - } + // If it's a raw string (base64), convert to data URL + if (typeof data === 'string') { + return `data:image/png;base64,${data}`; + } - // Fallback: try to create a Blob from whatever is left - try { - const blob = new Blob([data], { type: "image/png" }); - return URL.createObjectURL(blob); - } catch (e) { - if (log_lvl) console.error("Could not create QR code image blob:", e, data); - return null; - } - } + // Fallback: try to create a Blob from whatever is left + try { + const blob = new Blob([data], { type: 'image/png' }); + return URL.createObjectURL(blob); + } catch (e) { + if (log_lvl) console.error('Could not create QR code image blob:', e, data); + return null; + } + } - // If not returning a blob, return the raw API response - return ae_promises.generate_qr_code; + // If not returning a blob, return the raw API response + return ae_promises.generate_qr_code; } - // Updated 2025-10-09 /** * Generates a QR code image as a Base64 data URL based on provided parameters. @@ -156,85 +159,105 @@ export async function generate_qr_code( * @throws {Error} If the qr_type is unknown or data is missing. */ export async function js_generate_qr_code(qr_type, params = {}) { - const { - n = '', fn = '', org = '', url = '', email = '', tel = '', - adr_poa = '', adr_ext = '', adr_str = '', adr_loc = '', adr_reg = '', adr_postal = '', adr_country = '', - obj_type, obj_id, key, val, js, str - } = params; + const { + n = '', + fn = '', + org = '', + url = '', + email = '', + tel = '', + adr_poa = '', + adr_ext = '', + adr_str = '', + adr_loc = '', + adr_reg = '', + adr_postal = '', + adr_country = '', + obj_type, + obj_id, + key, + val, + js, + str + } = params; - console.log(`*** js_generate_qr_code() *** qr_type=${qr_type}`, params); + console.log(`*** js_generate_qr_code() *** qr_type=${qr_type}`, params); - let qr_data = null; + let qr_data = null; - // --- 1. Replicate Data Formatting Logic --- - switch (qr_type) { - case 'mecard': - // Format: MECARD:N:name;EMAIL:email;ADR:address;; - // Note: The original Python code had adr, but we'll use n and email as a minimum. - qr_data = `MECARD:N:${n};EMAIL:${email};;`; - // You can enhance this with other MeCard fields if needed. - break; + // --- 1. Replicate Data Formatting Logic --- + switch (qr_type) { + case 'mecard': + // Format: MECARD:N:name;EMAIL:email;ADR:address;; + // Note: The original Python code had adr, but we'll use n and email as a minimum. + qr_data = `MECARD:N:${n};EMAIL:${email};;`; + // You can enhance this with other MeCard fields if needed. + break; - case 'vcard': - // Format: BEGIN:VCARD...END:VCARD - qr_data = `BEGIN:VCARD\nVERSION:3.0\nN:${n}\nFN:${fn}\nORG:${org}\nEMAIL:${email}\n`; + case 'vcard': + // Format: BEGIN:VCARD...END:VCARD + qr_data = `BEGIN:VCARD\nVERSION:3.0\nN:${n}\nFN:${fn}\nORG:${org}\nEMAIL:${email}\n`; - if (url) { qr_data += `URL:${url}\n`; } - if (tel) { qr_data += `TEL:${tel}\n`; } - if (adr_loc) { - // ADR format: TYPE=postal:Po box;Ext;Street;Locality;Region;Postal code;Country - qr_data += `ADR:${adr_poa};${adr_ext};${adr_str};${adr_loc};${adr_reg};${adr_postal};${adr_country}\n`; - } - qrData += 'END:VCARD'; - break; + if (url) { + qr_data += `URL:${url}\n`; + } + if (tel) { + qr_data += `TEL:${tel}\n`; + } + if (adr_loc) { + // ADR format: TYPE=postal:Po box;Ext;Street;Locality;Region;Postal code;Country + qr_data += `ADR:${adr_poa};${adr_ext};${adr_str};${adr_loc};${adr_reg};${adr_postal};${adr_country}\n`; + } + qrData += 'END:VCARD'; + break; - case 'obj': - // Custom format: OBJ:ot:obj_type,oi:obj_id - if (!obj_type || !obj_id) throw new Error('Missing obj_type or obj_id for type "obj".'); - qr_data = `OBJ:ot:${obj_type},oi:${obj_id}`; - break; + case 'obj': + // Custom format: OBJ:ot:obj_type,oi:obj_id + if (!obj_type || !obj_id) throw new Error('Missing obj_type or obj_id for type "obj".'); + qr_data = `OBJ:ot:${obj_type},oi:${obj_id}`; + break; - case 'kv': - // Custom format: KV:k:"key",v:"val" - if (!key || !val) throw new Error('Missing key or val for type "kv".'); - qr_data = `KV:k:"${key}",v:"${val}"`; - break; + case 'kv': + // Custom format: KV:k:"key",v:"val" + if (!key || !val) throw new Error('Missing key or val for type "kv".'); + qr_data = `KV:k:"${key}",v:"${val}"`; + break; - case 'js': - // Assumes 'js' is a stringified JSON object - if (!js) throw new Error('Missing js string for type "js".'); - qr_data = `JS:${js}`; - break; + case 'js': + // Assumes 'js' is a stringified JSON object + if (!js) throw new Error('Missing js string for type "js".'); + qr_data = `JS:${js}`; + break; - case 'str': - // Raw string data - if (!str) throw new Error('Missing raw string data for type "str".'); - qr_data = str; - break; + case 'str': + // Raw string data + if (!str) throw new Error('Missing raw string data for type "str".'); + qr_data = str; + break; - default: - throw new Error(`Unknown QR type: ${qr_type}`); - } + default: + throw new Error(`Unknown QR type: ${qr_type}`); + } - if (!qr_data) { - throw new Error('Failed to create QR code data string.'); - } + if (!qr_data) { + throw new Error('Failed to create QR code data string.'); + } - // --- 2. Generate QR Code Image --- - try { - // Options match the Python 'qrcode' library defaults closely: - // error_correction = qrcode.constants.ERROR_CORRECT_M - // box_size = 10, border = 1 - const data_url = await QRCode.toDataURL(qr_data, { - errorCorrectionLevel: 'M', - margin: 1, // Corresponds to border - scale: 10, // Corresponds to box_size - type: 'image/png', - }); - console.log('Generated QR code data URL:', data_url); - return data_url; - } catch (error) { - console.error('Error generating QR code:', error); - throw new Error('Could not generate QR code image.'); - } -} \ No newline at end of file + // --- 2. Generate QR Code Image --- + try { + // Options match the Python 'qrcode' library defaults closely: + // error_correction = qrcode.constants.ERROR_CORRECT_M + // box_size = 10, border = 1 + const data_url = await QRCode.toDataURL(qr_data, { + errorCorrectionLevel: 'M', + margin: 1, // Corresponds to border + scale: 10, // Corresponds to box_size + type: 'image/png' + }); + console.log('Generated QR code data URL:', data_url); + return data_url; + } catch (error) { + console.error('Error generating QR code:', error); + throw new Error('Could not generate QR code image.'); + } +} diff --git a/src/lib/ae_core/core__site.ts b/src/lib/ae_core/core__site.ts index 19268899..b1502676 100644 --- a/src/lib/ae_core/core__site.ts +++ b/src/lib/ae_core/core__site.ts @@ -1,50 +1,50 @@ export interface Site { - id: string; - // id_random: string; - site_id: string; - site_id_random?: string; + id: string; + // id_random: string; + site_id: string; + site_id_random?: string; - code?: string; + code?: string; - account_id: string; - account_id_random?: string; + account_id: string; + account_id_random?: string; - name: string; - description?: null|string; + name: string; + description?: null | string; - restrict_access?: null|boolean; - access_key?: null|string; - access_code_kv_json?: null|string; + restrict_access?: null | boolean; + access_key?: null | string; + access_code_kv_json?: null | string; - logo_path?: null|string; - logo_bg_color?: null|string; // Not really used currently. - // background_image_path?: null|string; // Legacy field - // background_bg_color?: null|string; // Legacy field - title?: null|string; + logo_path?: null | string; + logo_bg_color?: null | string; // Not really used currently. + // background_image_path?: null|string; // Legacy field + // background_bg_color?: null|string; // Legacy field + title?: null | string; - // header_html?: null|string; // Legacy field - // header_css?: null|string; // Legacy field - // header_image_path?: null|string; // Legacy field - // header_image_bg_color?: null|string; // Legacy field - // body_html?: null|string; // Legacy field - tagline?: null|string; - // site_header_h1?: null|string; // Legacy field - // site_header_h2?: null|string; // Legacy field - style_href?: null|string; // Legacy field - // script_src?: null|string; // Legacy field - google_tracking_id?: null|string; + // header_html?: null|string; // Legacy field + // header_css?: null|string; // Legacy field + // header_image_path?: null|string; // Legacy field + // header_image_bg_color?: null|string; // Legacy field + // body_html?: null|string; // Legacy field + tagline?: null | string; + // site_header_h1?: null|string; // Legacy field + // site_header_h2?: null|string; // Legacy field + style_href?: null | string; // Legacy field + // script_src?: null|string; // Legacy field + google_tracking_id?: null | string; - cfg_json?: null|string; // key value config json + cfg_json?: null | string; // key value config json - enable: null|boolean; - enable_from?: null|Date; - enable_to?: null|Date; + enable: null | boolean; + enable_from?: null | Date; + enable_to?: null | Date; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; -} \ No newline at end of file + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; +} diff --git a/src/lib/ae_core/core__site_domain.ts b/src/lib/ae_core/core__site_domain.ts index 999b964a..fc5129da 100644 --- a/src/lib/ae_core/core__site_domain.ts +++ b/src/lib/ae_core/core__site_domain.ts @@ -1,76 +1,75 @@ export interface Site_Domain { - id: string; - // id_random: string; - site_id: string; - site_id_random?: string; + id: string; + // id_random: string; + site_id: string; + site_id_random?: string; - fqdn: string; - access_key?: null|string; - required_referrer?: null|string; - valid_for?: null|number; // In hours + fqdn: string; + access_key?: null | string; + required_referrer?: null | string; + valid_for?: null | number; // In hours - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; - } - - import { api } from '$lib/api/api'; - - /** - * Fetches a site_domain object by its Fully Qualified Domain Name (FQDN). - * - * @param api_cfg - The API configuration object. - * @param fqdn - The FQDN of the site domain to fetch. - * @param timeout - The request timeout in milliseconds. - * @param log_lvl - The logging level. - * @returns The site domain object or null if not found. - */ - export async function load_ae_obj_by_fqdn__site_domain( - { - api_cfg, - fqdn, - timeout = 7000, - log_lvl = 0 - }: { - api_cfg: any, - fqdn: string, - timeout?: number, - log_lvl?: number - } - ): Promise { - if (log_lvl) { - console.log(`*** load_ae_obj_by_fqdn__site_domain() *** api.base_url=${api_cfg.base_url}, fqdn=${fqdn}, timeout=${timeout}`); - } - - const params = {}; - - try { - const site_domain_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - no_account_id: true, // This seems to be a special case for this endpoint - obj_type: 'site_domain', - obj_id: fqdn, // NOTE: This is the FQDN, not the ID. - use_alt_table: true, - use_alt_base: true, - params: params, - timeout: timeout, - log_lvl: log_lvl - }); - - if (site_domain_obj) { - return site_domain_obj; - } else { - console.log('No results returned.'); - return null; - } - } catch (error) { - console.log('No results returned or failed.', error); - return null; - } - } - \ No newline at end of file + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; +} + +import { api } from '$lib/api/api'; + +/** + * Fetches a site_domain object by its Fully Qualified Domain Name (FQDN). + * + * @param api_cfg - The API configuration object. + * @param fqdn - The FQDN of the site domain to fetch. + * @param timeout - The request timeout in milliseconds. + * @param log_lvl - The logging level. + * @returns The site domain object or null if not found. + */ +export async function load_ae_obj_by_fqdn__site_domain({ + api_cfg, + fqdn, + timeout = 7000, + log_lvl = 0 +}: { + api_cfg: any; + fqdn: string; + timeout?: number; + log_lvl?: number; +}): Promise { + if (log_lvl) { + console.log( + `*** load_ae_obj_by_fqdn__site_domain() *** api.base_url=${api_cfg.base_url}, fqdn=${fqdn}, timeout=${timeout}` + ); + } + + const params = {}; + + try { + const site_domain_obj = await api.get_ae_obj_id_crud({ + api_cfg: api_cfg, + no_account_id: true, // This seems to be a special case for this endpoint + obj_type: 'site_domain', + obj_id: fqdn, // NOTE: This is the FQDN, not the ID. + use_alt_table: true, + use_alt_base: true, + params: params, + timeout: timeout, + log_lvl: log_lvl + }); + + if (site_domain_obj) { + return site_domain_obj; + } else { + console.log('No results returned.'); + return null; + } + } catch (error) { + console.log('No results returned or failed.', error); + return null; + } +} diff --git a/src/lib/ae_core/core__time_zones.ts b/src/lib/ae_core/core__time_zones.ts index b74874e1..aa163bf9 100644 --- a/src/lib/ae_core/core__time_zones.ts +++ b/src/lib/ae_core/core__time_zones.ts @@ -1,74 +1,72 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_core } from "$lib/ae_core/db_core"; - -let ae_promises: key_val = {}; +import { db_core } from '$lib/ae_core/db_core'; +const ae_promises: key_val = {}; // Updated 2024-10-14 -export async function load_ae_obj_li__time_zone( - { - api_cfg, - // account_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - // order_by_li = {'priority': 'DESC', 'group': 'ASC', 'sort': 'DESC', 'name': 'ASC'}, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - // account_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__time_zone() ***`); - } +export async function load_ae_obj_li__time_zone({ + api_cfg, + // account_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + // order_by_li = {'priority': 'DESC', 'group': 'ASC', 'sort': 'DESC', 'name': 'ASC'}, + order_by_li = { priority: 'DESC', sort: 'DESC', name: 'ASC' }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + // account_id: string, + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_li__time_zone() ***`); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - ae_promises.load__time_zone_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'lu', - for_obj_type: 'time_zone', - // for_obj_id: account_id, - use_alt_tbl: true, // NOTE: Using this with the time zones to use the view named "v_lu_time_zone_cust" - use_alt_mdl: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(function (time_zone_li_get_result) { - if (time_zone_li_get_result) { - // handle_db_save_ae_obj_li__time_zone({obj_type: 'time_zone', obj_li: time_zone_li_get_result}); - return time_zone_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__time_zone_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'lu', + for_obj_type: 'time_zone', + // for_obj_id: account_id, + use_alt_tbl: true, // NOTE: Using this with the time zones to use the view named "v_lu_time_zone_cust" + use_alt_mdl: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(function (time_zone_li_get_result) { + if (time_zone_li_get_result) { + // handle_db_save_ae_obj_li__time_zone({obj_type: 'time_zone', obj_li: time_zone_li_get_result}); + return time_zone_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - console.log('ae_promises.load__time_zone_li:', ae_promises.load__time_zone_li); - return ae_promises.load__time_zone_li; + console.log('ae_promises.load__time_zone_li:', ae_promises.load__time_zone_li); + return ae_promises.load__time_zone_li; } diff --git a/src/lib/ae_core/core__user.ts b/src/lib/ae_core/core__user.ts index 76294223..c1fd67ea 100644 --- a/src/lib/ae_core/core__user.ts +++ b/src/lib/ae_core/core__user.ts @@ -1,339 +1,335 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_core } from "$lib/ae_core/db_core"; - -let ae_promises: key_val = {}; +import { db_core } from '$lib/ae_core/db_core'; +const ae_promises: key_val = {}; // Updated 2025-04-04 -export async function auth_ae_obj__username_password( - { - api_cfg, - account_id, - null_account_id = false, - username, - password, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - null_account_id?: boolean, - username: string, - password: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** auth_ae_obj__username_password() *** account_id=${account_id} username=${username} password=${password}`); - } +export async function auth_ae_obj__username_password({ + api_cfg, + account_id, + null_account_id = false, + username, + password, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + null_account_id?: boolean; + username: string; + password: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** auth_ae_obj__username_password() *** account_id=${account_id} username=${username} password=${password}` + ); + } - let endpoint = '/user/authenticate'; + const endpoint = '/user/authenticate'; - if (null_account_id) { - params['null_account_id'] = true; - } - params['username'] = username; // Required - params['password'] = password; // Required - if (log_lvl > 1) { - console.log(`auth_ae_obj__username_password() - params:`, params); - } + if (null_account_id) { + params['null_account_id'] = true; + } + params['username'] = username; // Required + params['password'] = password; // Required + if (log_lvl > 1) { + console.log(`auth_ae_obj__username_password() - params:`, params); + } - ae_promises.auth__username_password = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - // data: {}, - log_lvl: log_lvl - }) - .then(async function (user_obj_get_result) { - if (user_obj_get_result) { - // if (try_cache) { - // // This is expecting a list - // db_save_ae_obj_li__user({ - // obj_type: 'user', - // obj_li: [user_obj_get_result], - // log_lvl: log_lvl - // }); - // } - return user_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.auth__username_password = await api + .get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + // data: {}, + log_lvl: log_lvl + }) + .then(async function (user_obj_get_result) { + if (user_obj_get_result) { + // if (try_cache) { + // // This is expecting a list + // db_save_ae_obj_li__user({ + // obj_type: 'user', + // obj_li: [user_obj_get_result], + // log_lvl: log_lvl + // }); + // } + return user_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - - - if (log_lvl) { - console.log('ae_promises.auth__username_password:', ae_promises.auth__username_password); - } - return ae_promises.auth__username_password; + if (log_lvl) { + console.log('ae_promises.auth__username_password:', ae_promises.auth__username_password); + } + return ae_promises.auth__username_password; } - // Updated 2025-04-04 -export async function auth_ae_obj__user_id_user_auth_key( - { - api_cfg, - account_id, - user_id, - user_auth_key, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - user_id: string, - user_auth_key: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** auth_ae_obj__user_id_user_auth_key() *** account_id=${account_id} user_id=${user_id}`); - } +export async function auth_ae_obj__user_id_user_auth_key({ + api_cfg, + account_id, + user_id, + user_auth_key, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + user_id: string; + user_auth_key: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** auth_ae_obj__user_id_user_auth_key() *** account_id=${account_id} user_id=${user_id}` + ); + } - let endpoint = '/user/authenticate'; + const endpoint = '/user/authenticate'; - params['user_id'] = user_id; // Required - params['auth_key'] = user_auth_key; // Required - if (log_lvl > 1) { - console.log(`auth_ae_obj__user_id_user_auth_key() - params:`, params); - } + params['user_id'] = user_id; // Required + params['auth_key'] = user_auth_key; // Required + if (log_lvl > 1) { + console.log(`auth_ae_obj__user_id_user_auth_key() - params:`, params); + } - ae_promises.auth__user_id_user_key = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - log_lvl: log_lvl - }) - .then(async function (user_obj_get_result) { - if (user_obj_get_result) { - return user_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.auth__user_id_user_key = await api + .get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + log_lvl: log_lvl + }) + .then(async function (user_obj_get_result) { + if (user_obj_get_result) { + return user_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.auth__user_id_user_key:', ae_promises.auth__user_id_user_key); - } - return ae_promises.auth__user_id_user_key; + if (log_lvl) { + console.log('ae_promises.auth__user_id_user_key:', ae_promises.auth__user_id_user_key); + } + return ae_promises.auth__user_id_user_key; } - // Send an email to the user with a new one time use authentication key. The new key must be generated and returned first. // Updated 2025-04-08 -export async function send_email_auth_ae_obj__user_id( - { - api_cfg, - account_id, - user_id, - base_url, - key_param_name = 'user_key', // API defaults to 'auth_key' - params = {}, - // try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - user_id: string, - base_url?: string, - key_param_name?: string, - params?: key_val, - // try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** send_email_auth_ae_obj__user_id() *** account_id=${account_id} user_id=${user_id}`); - } - if (log_lvl > 1) { - console.log(api_cfg); - } +export async function send_email_auth_ae_obj__user_id({ + api_cfg, + account_id, + user_id, + base_url, + key_param_name = 'user_key', // API defaults to 'auth_key' + params = {}, + // try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + user_id: string; + base_url?: string; + key_param_name?: string; + params?: key_val; + // try_cache?: boolean, + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** send_email_auth_ae_obj__user_id() *** account_id=${account_id} user_id=${user_id}` + ); + } + if (log_lvl > 1) { + console.log(api_cfg); + } - let email_auth_key_endpoint = `user/${user_id}/email_auth_key_url`; - params = { - 'root_url': base_url, - 'key_param_name': key_param_name - } - ae_promises.auth_key__send_email = await api.get_object({ - api_cfg: api_cfg, - endpoint: email_auth_key_endpoint, - params: params, - log_lvl: log_lvl - }); + const email_auth_key_endpoint = `user/${user_id}/email_auth_key_url`; + params = { + root_url: base_url, + key_param_name: key_param_name + }; + ae_promises.auth_key__send_email = await api.get_object({ + api_cfg: api_cfg, + endpoint: email_auth_key_endpoint, + params: params, + log_lvl: log_lvl + }); - return ae_promises.auth_key__send_email; + return ae_promises.auth_key__send_email; - // let endpoint = `/user/${user_id}/new_auth_key`; + // let endpoint = `/user/${user_id}/new_auth_key`; - // // params['user_id'] = user_id; // Required - // if (log_lvl > 1) { - // console.log(`send_email_auth_ae_obj__user_id() - params:`, params); - // } + // // params['user_id'] = user_id; // Required + // if (log_lvl > 1) { + // console.log(`send_email_auth_ae_obj__user_id() - params:`, params); + // } - // ae_promises.auth_key__gen_auth_key = await api.get_object({ - // api_cfg: api_cfg, - // endpoint: endpoint, - // params: params, - // log_lvl: log_lvl - // }) - // .then(async function (email_send_result) { - // if (email_send_result) { - // let email_auth_key_endpoint = `user/${user_id}/email_auth_key_url`; - // params = { - // 'root_url': 'https://test.oneskyit.com' - // } - // ae_promises.auth_key__send_email = await api.get_object({ - // api_cfg: api_cfg, - // endpoint: email_auth_key_endpoint, - // params: params, - // log_lvl: log_lvl - // }) + // ae_promises.auth_key__gen_auth_key = await api.get_object({ + // api_cfg: api_cfg, + // endpoint: endpoint, + // params: params, + // log_lvl: log_lvl + // }) + // .then(async function (email_send_result) { + // if (email_send_result) { + // let email_auth_key_endpoint = `user/${user_id}/email_auth_key_url`; + // params = { + // 'root_url': 'https://test.oneskyit.com' + // } + // ae_promises.auth_key__send_email = await api.get_object({ + // api_cfg: api_cfg, + // endpoint: email_auth_key_endpoint, + // params: params, + // log_lvl: log_lvl + // }) - // return email_send_result; - // } else { - // console.log('No results returned.'); - // return null; - // } - // }) - // .catch(function (error: any) { - // console.log('No results returned or failed.', error); - // }); + // return email_send_result; + // } else { + // console.log('No results returned.'); + // return null; + // } + // }) + // .catch(function (error: any) { + // console.log('No results returned or failed.', error); + // }); - // if (log_lvl) { - // console.log('ae_promises.send_email_auth__user_id:', ae_promises.send_email_auth__user_id); - // } - // return ae_promises.send_email_auth__user_id; + // if (log_lvl) { + // console.log('ae_promises.send_email_auth__user_id:', ae_promises.send_email_auth__user_id); + // } + // return ae_promises.send_email_auth__user_id; } // Look up user based on email address provided // Updated 2025-04-08 -export async function qry_ae_obj_li__user_email( - { - api_cfg, - account_id, - null_account_id = false, - email, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - null_account_id?: boolean, - email: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** qry_ae_obj_li__user_email() *** account_id=${account_id} email=${email}`); - } +export async function qry_ae_obj_li__user_email({ + api_cfg, + account_id, + null_account_id = false, + email, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + null_account_id?: boolean; + email: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** qry_ae_obj_li__user_email() *** account_id=${account_id} email=${email}`); + } - let endpoint = '/user/lookup_email'; + const endpoint = '/user/lookup_email'; - params['email'] = email; // Required - params['null_account_id'] = null_account_id || false; - if (log_lvl > 1) { - console.log(`qry_ae_obj_li__user_email() - params:`, params); - } + params['email'] = email; // Required + params['null_account_id'] = null_account_id || false; + if (log_lvl > 1) { + console.log(`qry_ae_obj_li__user_email() - params:`, params); + } - ae_promises.qry__user_email = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - log_lvl: log_lvl - }) - .then(async function (user_obj_get_result) { - if (user_obj_get_result) { - return user_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.qry__user_email = await api + .get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + log_lvl: log_lvl + }) + .then(async function (user_obj_get_result) { + if (user_obj_get_result) { + return user_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.qry__user_email:', ae_promises.qry__user_email); - } - return ae_promises.qry__user_email; + if (log_lvl) { + console.log('ae_promises.qry__user_email:', ae_promises.qry__user_email); + } + return ae_promises.qry__user_email; } - // Change user password // endpoint: PATCH /user/{user_id}/change_password // params: // data_kv: password (the new password) // Updated 2025-04-11 -export async function auth_ae_obj__user_id_change_password( - { - api_cfg, - account_id, - user_id, - password, - params = {}, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - user_id: string, - password: string, - params?: key_val, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** auth_ae_obj__user_id_change_password() *** account_id=${account_id} user_id=${user_id}`); - } +export async function auth_ae_obj__user_id_change_password({ + api_cfg, + account_id, + user_id, + password, + params = {}, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + user_id: string; + password: string; + params?: key_val; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** auth_ae_obj__user_id_change_password() *** account_id=${account_id} user_id=${user_id}` + ); + } - let endpoint = `/user/${user_id}/change_password`; + const endpoint = `/user/${user_id}/change_password`; - params['user_id'] = user_id; // Required - if (log_lvl > 1) { - console.log(`auth_ae_obj__user_id_change_password() - params:`, params); - } + params['user_id'] = user_id; // Required + if (log_lvl > 1) { + console.log(`auth_ae_obj__user_id_change_password() - params:`, params); + } - ae_promises.change_password__user_id = await api.patch_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - data: { password: password }, - log_lvl: log_lvl - }) - .then(async function (change_password_result) { - if (change_password_result) { - return change_password_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.change_password__user_id = await api + .patch_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + data: { password: password }, + log_lvl: log_lvl + }) + .then(async function (change_password_result) { + if (change_password_result) { + return change_password_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.change_password__user_id:', ae_promises.change_password__user_id); - } - return ae_promises.change_password__user_id; + if (log_lvl) { + console.log('ae_promises.change_password__user_id:', ae_promises.change_password__user_id); + } + return ae_promises.change_password__user_id; } diff --git a/src/lib/ae_core/db_core.ts b/src/lib/ae_core/db_core.ts index 13c2e35f..dab96de9 100644 --- a/src/lib/ae_core/db_core.ts +++ b/src/lib/ae_core/db_core.ts @@ -5,145 +5,143 @@ import Dexie, { type Table } from 'dexie'; // Updated 2025-01-07 export interface File { - id: string; - id_random: string; - hosted_file_id: string; - hosted_file_id_random: string; + id: string; + id_random: string; + hosted_file_id: string; + hosted_file_id_random: string; - hash_sha256: string; + hash_sha256: string; - for_type?: string; - for_id?: string; - for_id_random?: string; + for_type?: string; + for_id?: string; + for_id_random?: string; - account_id: string; + account_id: string; - filename: string; - extension: string; - content_type: string; - size: number; // In bytes + filename: string; + extension: string; + content_type: string; + size: number; // In bytes - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Additional fields for convenience (database views) - filename_no_ext: string; - filename_w_ext: string; + // Additional fields for convenience (database views) + filename_no_ext: string; + filename_w_ext: string; } - // Updated 2024-07-17 export interface Person { - id: string; - // id_random: string; - person_id: string; - person_id_random: string; + id: string; + // id_random: string; + person_id: string; + person_id_random: string; - external_id?: string; // This may be semi-random or unique only withing the account. - external_sys_id?: string; // Generated by an external system. Ideally this should be something like a UUID. It may be the same as the external_id if nothing given. - code?: string; // Not currently used. + external_id?: string; // This may be semi-random or unique only withing the account. + external_sys_id?: string; // Generated by an external system. Ideally this should be something like a UUID. It may be the same as the external_id if nothing given. + code?: string; // Not currently used. - account_id?: string; // Technically this is not required for global users. - account_id_random?: string; // Technically this is not required for global users. + account_id?: string; // Technically this is not required for global users. + account_id_random?: string; // Technically this is not required for global users. - person_profile_id?: null|string; - person_profile_id_random?: null|string; // The new table person_profile will be used soon... + person_profile_id?: null | string; + person_profile_id_random?: null | string; // The new table person_profile will be used soon... - user_id?: string; - user_id_random?: string; + user_id?: string; + user_id_random?: string; - pronouns?: null|string; - informal_name?: null|string; - title_names?: null|string; - given_name: string; - middle_name?: null|string; - family_name: null|string; - designations?: null|string; + pronouns?: null | string; + informal_name?: null | string; + title_names?: null | string; + given_name: string; + middle_name?: null | string; + family_name: null | string; + designations?: null | string; - professional_title?: null|string; + professional_title?: null | string; - full_name?: string; - full_name_override?: null|string; // was called display_name + full_name?: string; + full_name_override?: null | string; // was called display_name - affiliations?: null|string; + affiliations?: null | string; - primary_email?: string; + primary_email?: string; - biography?: null|string; + biography?: null | string; - agree?: null|boolean; - comments?: null|string; + agree?: null | boolean; + comments?: null | string; - allow_auth_key?: null|boolean; // For sign in without password - auth_key?: null|string; // Should this be saved locally? - passcode?: null|string; + allow_auth_key?: null | boolean; // For sign in without password + auth_key?: null | string; // Should this be saved locally? + passcode?: null | string; - data_json?: null|string; + data_json?: null | string; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; - tmp_sort_3?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; + tmp_sort_3?: null | string; - // Additional fields for convenience (database views) - username?: string; // Same as user_username - // user_username?: null|string; // Same as username - user_name?: null|string; - user_email?: null|string; - user_allow_auth_key?: null|boolean; // For sign in without password - user_super?: boolean; - user_manager?: boolean; - user_administrator?: boolean; - user_public?: boolean; + // Additional fields for convenience (database views) + username?: string; // Same as user_username + // user_username?: null|string; // Same as username + user_name?: null | string; + user_email?: null | string; + user_allow_auth_key?: null | boolean; // For sign in without password + user_super?: boolean; + user_manager?: boolean; + user_administrator?: boolean; + user_public?: boolean; - organization_id?: null|string; // The organization this person belongs to, if any. - organization_id_random?: null|string; // The random ID of the organization this person belongs to, if any. - organization_name?: null|string; + organization_id?: null | string; // The organization this person belongs to, if any. + organization_id_random?: null | string; // The random ID of the organization this person belongs to, if any. + organization_name?: null | string; - contact_id?: null|string; // The contact ID of the person, if any. - contact_id_random?: null|string; // The random ID of the contact, if any. - contact_name?: null|string; - contact_email?: null|string; - contact_cc_email?: null|string; - contact_phone_mobile?: null|string; - contact_phone_home?: null|string; - contact_phone_office?: null|string; - contact_phone_landline?: null|string; - contact_phone_fax?: null|string; - contact_phone_other?: null|string; + contact_id?: null | string; // The contact ID of the person, if any. + contact_id_random?: null | string; // The random ID of the contact, if any. + contact_name?: null | string; + contact_email?: null | string; + contact_cc_email?: null | string; + contact_phone_mobile?: null | string; + contact_phone_home?: null | string; + contact_phone_office?: null | string; + contact_phone_landline?: null | string; + contact_phone_fax?: null | string; + contact_phone_other?: null | string; - address_id?: null|string; // The address ID of the person, if any. - address_id_random?: null|string; // The random ID of the address, if any. - address_city?: null|string; - address_country_alpha_2_code?: null|string; // ISO 3166-1 alpha-2 country code + address_id?: null | string; // The address ID of the person, if any. + address_id_random?: null | string; // The random ID of the address, if any. + address_city?: null | string; + address_country_alpha_2_code?: null | string; // ISO 3166-1 alpha-2 country code } - // Updated 2025-01-07 export class MySubClassedDexie extends Dexie { - file!: Table; - person!: Table; - // user!: Table; + file!: Table; + person!: Table; + // user!: Table; - constructor() { - super('ae_core_db'); - this.version(1).stores({ - file: ` + constructor() { + super('ae_core_db'); + this.version(1).stores({ + file: ` id, id_random, hosted_file_id, hosted_file_id_random, hash_sha256, account_id, @@ -152,7 +150,7 @@ export class MySubClassedDexie extends Dexie { content_type, size, enable, hide, priority, sort, group, created_on, updated_on`, - person: ` + person: ` id, person_id, person_id_random, external_id, code, account_id, user_id, @@ -162,9 +160,9 @@ export class MySubClassedDexie extends Dexie { given_name, family_name, full_name, affiliations, email, agree, - enable, hide, priority, sort, group, created_on, updated_on`, - }); - } + enable, hide, priority, sort, group, created_on, updated_on` + }); + } } -export const db_core = new MySubClassedDexie(); \ No newline at end of file +export const db_core = new MySubClassedDexie(); diff --git a/src/lib/ae_events/ae_events__event.ts b/src/lib/ae_events/ae_events__event.ts index 6e48e848..b08f9162 100644 --- a/src/lib/ae_events/ae_events__event.ts +++ b/src/lib/ae_events/ae_events__event.ts @@ -9,1141 +9,1141 @@ import { load_ae_obj_li__event_location } from './ae_events__event_location'; import { load_ae_obj_li__event_session } from './ae_events__event_session'; import { load_ae_obj_li__event_badge_template } from '$lib/ae_events/ae_events__event_badge_template'; -let ae_promises: key_val = {}; - +const ae_promises: key_val = {}; // Updated 2025-05-22 -export async function load_ae_obj_id__event( - { - api_cfg, - event_id, - inc_device_li = false, - inc_file_li = false, - inc_location_li = false, - inc_presentation_li = false, - inc_presenter_li = false, - inc_session_li = false, - inc_badge_li = false, - inc_template_li = false, // badge templates - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - inc_device_li?: boolean, - inc_file_li?: boolean, - inc_location_li?: boolean, - inc_presentation_li?: boolean, - inc_presenter_li?: boolean, - inc_session_li?: boolean, - inc_badge_li?: boolean, - inc_template_li?: boolean, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__event() *** event_id=${event_id}`); - } +export async function load_ae_obj_id__event({ + api_cfg, + event_id, + inc_device_li = false, + inc_file_li = false, + inc_location_li = false, + inc_presentation_li = false, + inc_presenter_li = false, + inc_session_li = false, + inc_badge_li = false, + inc_template_li = false, // badge templates + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + inc_device_li?: boolean; + inc_file_li?: boolean; + inc_location_li?: boolean; + inc_presentation_li?: boolean; + inc_presenter_li?: boolean; + inc_session_li?: boolean; + inc_badge_li?: boolean; + inc_template_li?: boolean; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__event() *** event_id=${event_id}`); + } - let params = {}; + const params = {}; - ae_promises.load__event_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event', - obj_id: event_id, - use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - params: params, - log_lvl: log_lvl - }) - .then(async function (event_obj_get_result) { - if (event_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_props({ - obj_li: [event_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'event', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return event_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__event_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event', + obj_id: event_id, + use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + params: params, + log_lvl: log_lvl + }) + .then(async function (event_obj_get_result) { + if (event_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_props({ + obj_li: [event_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'event', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return event_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_obj:', ae_promises.load__event_obj); - } + if (log_lvl) { + console.log('ae_promises.load__event_obj:', ae_promises.load__event_obj); + } - if (inc_device_li) { - // Load the devices for the event - if (log_lvl) { - console.log(`Need to load the device list for the event now`); - } - let load_event_device_obj_li = load_ae_obj_li__event_device({ - api_cfg: api_cfg, - for_obj_type: 'event', - for_obj_id: event_id, - params: {qry__enabled: 'enabled', qry__limit: 49}, - try_cache: try_cache, - log_lvl: log_lvl - }).then((event_device_obj_li) => { - if (log_lvl) { - console.log(`event_device_obj_li = `, event_device_obj_li); - } - return event_device_obj_li; - }); + if (inc_device_li) { + // Load the devices for the event + if (log_lvl) { + console.log(`Need to load the device list for the event now`); + } + const load_event_device_obj_li = load_ae_obj_li__event_device({ + api_cfg: api_cfg, + for_obj_type: 'event', + for_obj_id: event_id, + params: { qry__enabled: 'enabled', qry__limit: 49 }, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_device_obj_li) => { + if (log_lvl) { + console.log(`event_device_obj_li = `, event_device_obj_li); + } + return event_device_obj_li; + }); + if (log_lvl) { + console.log(`load_event_device_obj_li = `, load_event_device_obj_li); + } + ae_promises.load__event_obj.event_device_obj_li = load_event_device_obj_li; + } - if (log_lvl) { - console.log(`load_event_device_obj_li = `, load_event_device_obj_li); - } - ae_promises.load__event_obj.event_device_obj_li = load_event_device_obj_li; - } + if (inc_location_li) { + // Load the locations for the event + if (log_lvl) { + console.log(`Need to load the location list for the event now`); + } + const load_event_location_obj_li = load_ae_obj_li__event_location({ + api_cfg: api_cfg, + for_obj_type: 'event', + for_obj_id: event_id, + enabled: 'enabled', + limit: 19, + log_lvl: log_lvl + }).then((event_location_obj_li) => { + if (log_lvl) { + console.log(`event_location_obj_li = `, event_location_obj_li); + } + return event_location_obj_li; + }); - if (inc_location_li) { - // Load the locations for the event - if (log_lvl) { - console.log(`Need to load the location list for the event now`); - } - let load_event_location_obj_li = load_ae_obj_li__event_location({ - api_cfg: api_cfg, - for_obj_type: 'event', - for_obj_id: event_id, - enabled: 'enabled', - limit: 19, - log_lvl: log_lvl - }).then((event_location_obj_li) => { - if (log_lvl) { - console.log(`event_location_obj_li = `, event_location_obj_li); - } - return event_location_obj_li; - }); + if (log_lvl) { + console.log(`load_event_location_obj_li = `, load_event_location_obj_li); + } + ae_promises.load__event_obj.event_location_obj_li = load_event_location_obj_li; + } - if (log_lvl) { - console.log(`load_event_location_obj_li = `, load_event_location_obj_li); - } - ae_promises.load__event_obj.event_location_obj_li = load_event_location_obj_li; - } + if (inc_session_li) { + // Load the sessions for the events + if (log_lvl) { + console.log(`Need to load the session list for the event now`); + } + const load_event_session_obj_li = load_ae_obj_li__event_session({ + api_cfg: api_cfg, + for_obj_type: 'event', + for_obj_id: event_id, + enabled: 'enabled', + limit: 249, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_session_obj_li) => { + if (log_lvl) { + console.log(`event_session_obj_li = `, event_session_obj_li); + } + return event_session_obj_li; + }); - if (inc_session_li) { - // Load the sessions for the events - if (log_lvl) { - console.log(`Need to load the session list for the event now`); - } - let load_event_session_obj_li = load_ae_obj_li__event_session({ - api_cfg: api_cfg, - for_obj_type: 'event', - for_obj_id: event_id, - enabled: 'enabled', - limit: 249, - try_cache: try_cache, - log_lvl: log_lvl - }).then((event_session_obj_li) => { - if (log_lvl) { - console.log(`event_session_obj_li = `, event_session_obj_li); - } - return event_session_obj_li; - }); + if (log_lvl) { + console.log(`load_event_session_obj_li = `, load_event_session_obj_li); + } + ae_promises.load__event_obj.event_session_obj_li = load_event_session_obj_li; + } - if (log_lvl) { - console.log(`load_event_session_obj_li = `, load_event_session_obj_li); - } - ae_promises.load__event_obj.event_session_obj_li = load_event_session_obj_li; - } + if (inc_template_li) { + // Load the badge templates for the event + log_lvl = 2; + if (log_lvl) { + console.log(`Need to load the badge template list for the event now`); + } + const load_event_badge_template_obj_li = load_ae_obj_li__event_badge_template({ + api_cfg: api_cfg, + // for_obj_type: 'event', + // for_obj_id: event_id, + event_id: event_id, + enabled: 'enabled', + limit: 19, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_badge_template_obj_li) => { + if (log_lvl) { + console.log(`event_badge_template_obj_li = `, event_badge_template_obj_li); + } + return event_badge_template_obj_li; + }); + if (log_lvl) { + console.log(`load_event_badge_template_obj_li = `, load_event_badge_template_obj_li); + } + ae_promises.load__event_obj.event_badge_template_obj_li = load_event_badge_template_obj_li; + } - if (inc_template_li) { - // Load the badge templates for the event - log_lvl = 2; - if (log_lvl) { - console.log(`Need to load the badge template list for the event now`); - } - let load_event_badge_template_obj_li = load_ae_obj_li__event_badge_template({ - api_cfg: api_cfg, - // for_obj_type: 'event', - // for_obj_id: event_id, - event_id: event_id, - enabled: 'enabled', - limit: 19, - try_cache: try_cache, - log_lvl: log_lvl - }).then((event_badge_template_obj_li) => { - if (log_lvl) { - console.log(`event_badge_template_obj_li = `, event_badge_template_obj_li); - } - return event_badge_template_obj_li; - }); - if (log_lvl) { - console.log(`load_event_badge_template_obj_li = `, load_event_badge_template_obj_li); - } - ae_promises.load__event_obj.event_badge_template_obj_li = load_event_badge_template_obj_li; - } - - return ae_promises.load__event_obj; + return ae_promises.load__event_obj; } - // Updated 2025-05-22 -export async function load_ae_obj_li__event( - { - api_cfg, - for_obj_type = 'account', - for_obj_id, - qry_conference = true, - qry_str = null, - inc_device_li = false, - inc_file_li = false, - inc_location_li = false, - inc_presentation_li = false, - inc_presenter_li = false, - inc_session_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'start_datetime': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params_json = null, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - qry_conference?: null|boolean, - qry_str?: null|string, - inc_device_li?: boolean, - inc_file_li?: boolean, - inc_location_li?: boolean, - inc_presentation_li?: boolean, - inc_presenter_li?: boolean, - inc_session_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params_json?: null|key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__event() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id} qry_conference=${qry_conference}`); - } +export async function load_ae_obj_li__event({ + api_cfg, + for_obj_type = 'account', + for_obj_id, + qry_conference = true, + qry_str = null, + inc_device_li = false, + inc_file_li = false, + inc_location_li = false, + inc_presentation_li = false, + inc_presenter_li = false, + inc_session_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { start_datetime: 'DESC', name: 'ASC', updated_on: 'DESC', created_on: 'DESC' }, + params_json = null, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + qry_conference?: null | boolean; + qry_str?: null | string; + inc_device_li?: boolean; + inc_file_li?: boolean; + inc_location_li?: boolean; + inc_presentation_li?: boolean; + inc_presenter_li?: boolean; + inc_session_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params_json?: null | key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__event() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id} qry_conference=${qry_conference}` + ); + } - // There is probably a better way to handle this. I don't want to just start a new object if it is not passed. However, the qry_conference and qry_str are sort of a special case. -2024-10-01 - if (!params_json) { - params_json = {}; - } + // There is probably a better way to handle this. I don't want to just start a new object if it is not passed. However, the qry_conference and qry_str are sort of a special case. -2024-10-01 + if (!params_json) { + params_json = {}; + } - if (qry_conference) { - if (!params_json['and_qry']) { - params_json['and_qry'] = {}; - } + if (qry_conference) { + if (!params_json['and_qry']) { + params_json['and_qry'] = {}; + } - params_json['and_qry']['conference'] = qry_conference; - } else if (qry_conference === false) { - if (!params_json['and_qry']) { - params_json['and_qry'] = {}; - } + params_json['and_qry']['conference'] = qry_conference; + } else if (qry_conference === false) { + if (!params_json['and_qry']) { + params_json['and_qry'] = {}; + } - if (log_lvl) { - console.log('qry_conference is false!'); - } - params_json['and_qry']['conference'] = qry_conference; - } + if (log_lvl) { + console.log('qry_conference is false!'); + } + params_json['and_qry']['conference'] = qry_conference; + } - if (qry_str) { - if (!params_json['ft_qry']) { - params_json['ft_qry'] = {}; - } + if (qry_str) { + if (!params_json['ft_qry']) { + params_json['ft_qry'] = {}; + } - params_json['ft_qry'] = {}; - params_json['ft_qry']['default_qry_str'] = qry_str; - params_json['ft_qry']['location_address_json_ext'] = qry_str; - params_json['ft_qry']['contact_li_json_ext'] = qry_str; - } + params_json['ft_qry'] = {}; + params_json['ft_qry']['default_qry_str'] = qry_str; + params_json['ft_qry']['location_address_json_ext'] = qry_str; + params_json['ft_qry']['contact_li_json_ext'] = qry_str; + } - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - ae_promises.load__event_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_obj_li_get_result) { - if (event_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_props({ - obj_li: event_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'event', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return event_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__event_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_obj_li_get_result) { + if (event_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_props({ + obj_li: event_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'event', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return event_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_obj_li:', ae_promises.load__event_obj_li); - } + if (log_lvl) { + console.log('ae_promises.load__event_obj_li:', ae_promises.load__event_obj_li); + } - if (inc_device_li) { - // Load the devices for the events - if (log_lvl) { - console.log(`Need to load the device list for each event now`); - } - for (let i = 0; i < ae_promises.load__event_obj_li.length; i++) { - let event_obj = ae_promises.load__event_obj_li[i]; - let event_id = event_obj.event_id_random; + if (inc_device_li) { + // Load the devices for the events + if (log_lvl) { + console.log(`Need to load the device list for each event now`); + } + for (let i = 0; i < ae_promises.load__event_obj_li.length; i++) { + const event_obj = ae_promises.load__event_obj_li[i]; + const event_id = event_obj.event_id_random; - let load_event_device_obj_li = load_ae_obj_li__event_device({ - api_cfg: api_cfg, - for_obj_type: 'event', - for_obj_id: event_id, - params: {qry__enabled: 'enabled', qry__limit: 49}, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_device_obj_li) => { - if (log_lvl) { - console.log(`event_device_obj_li = `, event_device_obj_li); - } + const load_event_device_obj_li = load_ae_obj_li__event_device({ + api_cfg: api_cfg, + for_obj_type: 'event', + for_obj_id: event_id, + params: { qry__enabled: 'enabled', qry__limit: 49 }, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_device_obj_li) => { + if (log_lvl) { + console.log(`event_device_obj_li = `, event_device_obj_li); + } - return event_device_obj_li; - }); + return event_device_obj_li; + }); - if (log_lvl) { - console.log(`load_event_device_obj_li = `, load_event_device_obj_li); - } + if (log_lvl) { + console.log(`load_event_device_obj_li = `, load_event_device_obj_li); + } - if (load_event_device_obj_li) { - ae_promises.load__event_obj_li[i].event_device_obj_li = load_event_device_obj_li; - } - } - } + if (load_event_device_obj_li) { + ae_promises.load__event_obj_li[i].event_device_obj_li = load_event_device_obj_li; + } + } + } - if (inc_location_li) { - // Load the locations for the events - if (log_lvl) { - console.log(`Need to load the location list for each event now`); - } - for (let i = 0; i < ae_promises.load__event_obj_li.length; i++) { - let event_obj = ae_promises.load__event_obj_li[i]; - let event_id = event_obj.event_id_random; + if (inc_location_li) { + // Load the locations for the events + if (log_lvl) { + console.log(`Need to load the location list for each event now`); + } + for (let i = 0; i < ae_promises.load__event_obj_li.length; i++) { + const event_obj = ae_promises.load__event_obj_li[i]; + const event_id = event_obj.event_id_random; - let load_event_location_obj_li = load_ae_obj_li__event_location({ - api_cfg: api_cfg, - for_obj_type: 'event', - for_obj_id: event_id, - enabled: 'enabled', - limit: 19, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_location_obj_li) => { - if (log_lvl) { - console.log(`event_location_obj_li = `, event_location_obj_li); - } + const load_event_location_obj_li = load_ae_obj_li__event_location({ + api_cfg: api_cfg, + for_obj_type: 'event', + for_obj_id: event_id, + enabled: 'enabled', + limit: 19, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_location_obj_li) => { + if (log_lvl) { + console.log(`event_location_obj_li = `, event_location_obj_li); + } - return event_location_obj_li; - }); + return event_location_obj_li; + }); - if (log_lvl) { - console.log(`load_event_location_obj_li = `, load_event_location_obj_li); - } + if (log_lvl) { + console.log(`load_event_location_obj_li = `, load_event_location_obj_li); + } - if (load_event_location_obj_li) { - ae_promises.load__event_obj_li[i].event_location_obj_li = load_event_location_obj_li; - } - } - } + if (load_event_location_obj_li) { + ae_promises.load__event_obj_li[i].event_location_obj_li = load_event_location_obj_li; + } + } + } - if (inc_session_li) { - // Load the sessions for the events - if (log_lvl) { - console.log(`Need to load the session list for each event now`); - } - for (let i = 0; i < ae_promises.load__event_obj_li.length; i++) { - let event_obj = ae_promises.load__event_obj_li[i]; - let event_id = event_obj.event_id_random; + if (inc_session_li) { + // Load the sessions for the events + if (log_lvl) { + console.log(`Need to load the session list for each event now`); + } + for (let i = 0; i < ae_promises.load__event_obj_li.length; i++) { + const event_obj = ae_promises.load__event_obj_li[i]; + const event_id = event_obj.event_id_random; - let load_event_session_obj_li = load_ae_obj_li__event_session({ - api_cfg: api_cfg, - for_obj_type: 'event', - for_obj_id: event_id, - enabled: enabled, - hidden: hidden, - limit: limit, - offset: offset, - order_by_li: order_by_li, - params: params, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_session_obj_li) => { - if (log_lvl) { - console.log(`event_session_obj_li = `, event_session_obj_li); - } + const load_event_session_obj_li = load_ae_obj_li__event_session({ + api_cfg: api_cfg, + for_obj_type: 'event', + for_obj_id: event_id, + enabled: enabled, + hidden: hidden, + limit: limit, + offset: offset, + order_by_li: order_by_li, + params: params, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_session_obj_li) => { + if (log_lvl) { + console.log(`event_session_obj_li = `, event_session_obj_li); + } - return event_session_obj_li; - }); + return event_session_obj_li; + }); - if (log_lvl) { - console.log(`load_event_session_obj_li = `, load_event_session_obj_li); - } + if (log_lvl) { + console.log(`load_event_session_obj_li = `, load_event_session_obj_li); + } - if (load_event_session_obj_li) { - ae_promises.load__event_obj_li[i].event_session_obj_li = load_event_session_obj_li; - } - } - } + if (load_event_session_obj_li) { + ae_promises.load__event_obj_li[i].event_session_obj_li = load_event_session_obj_li; + } + } + } - return ae_promises.load__event_obj_li; + return ae_promises.load__event_obj_li; } - - // The qry_ae_obj_li__event() is essentially a wrapper for the load_ae_obj_li__event() function. This should process the query strings and related before calling the load_ae_obj_li__event() function. // Updated 2024-10-01 -export async function qry_ae_obj_li__event( - { - api_cfg, - for_obj_type = 'account', - for_obj_id, - qry_conference = true, - qry_physical = null, - qry_virtual = null, - qry_type = null, - qry_str = null, - inc_file_li = false, - inc_location_li = false, - inc_presentation_li = false, - inc_presenter_li = false, - inc_session_li = false, - enabled = 'enabled', // all, disabled, enabled - hidden = 'not_hidden', // all, hidden, not_hidden - limit = 99, - offset = 0, - order_by_li = {'start_datetime': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - qry_conference?: null|boolean, - qry_physical?: null|boolean, - qry_virtual?: null|boolean, - qry_type?: null|string, - qry_str?: null|string, - inc_file_li?: boolean, - inc_location_li?: boolean, - inc_presentation_li?: boolean, - inc_presenter_li?: boolean, - inc_session_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** qry_ae_obj_li__event() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function qry_ae_obj_li__event({ + api_cfg, + for_obj_type = 'account', + for_obj_id, + qry_conference = true, + qry_physical = null, + qry_virtual = null, + qry_type = null, + qry_str = null, + inc_file_li = false, + inc_location_li = false, + inc_presentation_li = false, + inc_presenter_li = false, + inc_session_li = false, + enabled = 'enabled', // all, disabled, enabled + hidden = 'not_hidden', // all, hidden, not_hidden + limit = 99, + offset = 0, + order_by_li = { start_datetime: 'DESC', name: 'ASC', updated_on: 'DESC', created_on: 'DESC' }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + qry_conference?: null | boolean; + qry_physical?: null | boolean; + qry_virtual?: null | boolean; + qry_type?: null | string; + qry_str?: null | string; + inc_file_li?: boolean; + inc_location_li?: boolean; + inc_presentation_li?: boolean; + inc_presenter_li?: boolean; + inc_session_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** qry_ae_obj_li__event() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - // Build the params_json object. This needs to be documented better! -2024-10-01 - let params_json: key_val = {}; + // Build the params_json object. This needs to be documented better! -2024-10-01 + const params_json: key_val = {}; - params_json['and_qry'] = {}; + params_json['and_qry'] = {}; - // This is handled in the actual load_ae_obj_li__event() function. For now...? - // if (qry_conference) { - // params_json['and_qry']['conference'] = qry_conference; - // } else if (qry_conference === false) { - // console.log('qry_conference is false!'); - // params_json['and_qry']['conference'] = qry_conference; - // } + // This is handled in the actual load_ae_obj_li__event() function. For now...? + // if (qry_conference) { + // params_json['and_qry']['conference'] = qry_conference; + // } else if (qry_conference === false) { + // console.log('qry_conference is false!'); + // params_json['and_qry']['conference'] = qry_conference; + // } - if (qry_physical && qry_virtual) { - // Ignore both if both are set to true. - } else if (qry_physical || qry_virtual) { - if (qry_physical) { - params_json['and_qry']['physical'] = qry_physical; - } - if (qry_virtual) { - params_json['and_qry']['virtual'] = qry_virtual; - } - } + if (qry_physical && qry_virtual) { + // Ignore both if both are set to true. + } else if (qry_physical || qry_virtual) { + if (qry_physical) { + params_json['and_qry']['physical'] = qry_physical; + } + if (qry_virtual) { + params_json['and_qry']['virtual'] = qry_virtual; + } + } - if (qry_type) { - params_json['and_qry']['type'] = qry_type; - } + if (qry_type) { + params_json['and_qry']['type'] = qry_type; + } - if (qry_str) { - params_json['ft_qry'] = {}; - params_json['ft_qry']['default_qry_str'] = qry_str; - params_json['ft_qry']['location_address_json_ext'] = qry_str; - params_json['ft_qry']['contact_li_json_ext'] = qry_str; - } + if (qry_str) { + params_json['ft_qry'] = {}; + params_json['ft_qry']['default_qry_str'] = qry_str; + params_json['ft_qry']['location_address_json_ext'] = qry_str; + params_json['ft_qry']['contact_li_json_ext'] = qry_str; + } - if (log_lvl) { - console.log('params_json:', params_json); - } + if (log_lvl) { + console.log('params_json:', params_json); + } - ae_promises.qry__event_obj_li = await load_ae_obj_li__event({ - api_cfg: api_cfg, - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - qry_conference: qry_conference, - qry_str: qry_str, - inc_file_li: inc_file_li, - inc_location_li: inc_location_li, - inc_presentation_li: inc_presentation_li, - inc_presenter_li: inc_presenter_li, - inc_session_li: inc_session_li, - enabled: enabled, - hidden: hidden, - limit: limit, - offset: offset, - order_by_li: order_by_li, - params_json: params_json, - params: params, - try_cache: try_cache, - log_lvl: log_lvl - }); + ae_promises.qry__event_obj_li = await load_ae_obj_li__event({ + api_cfg: api_cfg, + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + qry_conference: qry_conference, + qry_str: qry_str, + inc_file_li: inc_file_li, + inc_location_li: inc_location_li, + inc_presentation_li: inc_presentation_li, + inc_presenter_li: inc_presenter_li, + inc_session_li: inc_session_li, + enabled: enabled, + hidden: hidden, + limit: limit, + offset: offset, + order_by_li: order_by_li, + params_json: params_json, + params: params, + try_cache: try_cache, + log_lvl: log_lvl + }); - return ae_promises.qry__event_obj_li; + return ae_promises.qry__event_obj_li; } - // Updated 2025-07-11 -export async function create_ae_obj__event( - { - api_cfg, - account_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__event() *** account_id=${account_id}`); - } +export async function create_ae_obj__event({ + api_cfg, + account_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__event() *** account_id=${account_id}`); + } - if (!account_id) { - console.log(`ERROR: Events - Event - account_id required to create`); - return false; - } + if (!account_id) { + console.log(`ERROR: Events - Event - account_id required to create`); + return false; + } - ae_promises.create__event = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'event', - fields: { - account_id_random: account_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_obj_create_result) { - if (event_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_props({ - obj_li: [event_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'event', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return event_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + ae_promises.create__event = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'event', + fields: { + account_id_random: account_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_obj_create_result) { + if (event_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_props({ + obj_li: [event_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'event', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return event_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__event:', ae_promises.create__event); - } - return ae_promises.create__event; + if (log_lvl) { + console.log('ae_promises.create__event:', ae_promises.create__event); + } + return ae_promises.create__event; } - // Updated 2024-11-08 -export async function delete_ae_obj_id__event( - { - api_cfg, - event_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__event() *** event_id=${event_id}`); - } +export async function delete_ae_obj_id__event({ + api_cfg, + event_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__event() *** event_id=${event_id}`); + } - ae_promises.delete__event_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event', - obj_id: event_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for event_id=${event_id}`); - } - db_events.event.delete(event_id); // Delete from the DB no matter what. - } - }); + ae_promises.delete__event_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event', + obj_id: event_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for event_id=${event_id}`); + } + db_events.event.delete(event_id); // Delete from the DB no matter what. + } + }); - if (log_lvl) { - console.log('ae_promises.delete__event_obj:', ae_promises.delete__event_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__event_obj:', ae_promises.delete__event_obj); + } - return ae_promises.delete__event_obj; + return ae_promises.delete__event_obj; } - // Updated 2024-09-25 -export async function update_ae_obj__event( - { - api_cfg, - event_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__event() *** event_id=${event_id}`, data_kv); - } - // ae_promises.update__event_obj = 'test'; - ae_promises.update__event_obj = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event', - obj_id: event_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_obj_update_result) { - if (event_obj_update_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_props({ - obj_li: [event_obj_update_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'event', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return event_obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); +export async function update_ae_obj__event({ + api_cfg, + event_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** update_ae_obj__event() *** event_id=${event_id}`, data_kv); + } + // ae_promises.update__event_obj = 'test'; + ae_promises.update__event_obj = await api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event', + obj_id: event_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_obj_update_result) { + if (event_obj_update_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_props({ + obj_li: [event_obj_update_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'event', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return event_obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.update__event_obj:', ae_promises.update__event_obj); - } - return ae_promises.update__event_obj; + if (log_lvl) { + console.log('ae_promises.update__event_obj:', ae_promises.update__event_obj); + } + return ae_promises.update__event_obj; } - // This function will loop through the event_obj_li and save each one to the DB. // Updated 2025-05-09 -export async function db_save_ae_obj_li__event( - { - obj_type, - obj_li, - log_lvl = 0 - }: { - obj_type: string, - obj_li: any, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** db_save_ae_obj_li__event() *** obj_type=${obj_type}`, obj_li); - } +export async function db_save_ae_obj_li__event({ + obj_type, + obj_li, + log_lvl = 0 +}: { + obj_type: string; + obj_li: any; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** db_save_ae_obj_li__event() *** obj_type=${obj_type}`, obj_li); + } - if (obj_li && obj_li.length) { - let obj_li_id: string[] = []; + if (obj_li && obj_li.length) { + const obj_li_id: string[] = []; - for (const obj of obj_li) { - if (log_lvl) { - console.log(`Processing ae_obj ${obj_type}:`, obj); - } + for (const obj of obj_li) { + if (log_lvl) { + console.log(`Processing ae_obj ${obj_type}:`, obj); + } - let obj_record = { - id: obj.event_id_random, - event_id: obj.event_id_random, - event_id_random: obj.event_id_random, + const obj_record = { + id: obj.event_id_random, + event_id: obj.event_id_random, + event_id_random: obj.event_id_random, - code: obj.event_code, + code: obj.event_code, - account_id: obj.account_id_random, - account_id_random: obj.account_id_random, + account_id: obj.account_id_random, + account_id_random: obj.account_id_random, - conference: obj.conference, - type: obj.type, - name: obj.name, - summary: obj.summary, - description: obj.description, + conference: obj.conference, + type: obj.type, + name: obj.name, + summary: obj.summary, + description: obj.description, - start_datetime: obj.start_datetime, - end_datetime: obj.end_datetime, - timezone: obj.timezone, - location_address_json: obj.location_address_json, - location_text: obj.location_text, + start_datetime: obj.start_datetime, + end_datetime: obj.end_datetime, + timezone: obj.timezone, + location_address_json: obj.location_address_json, + location_text: obj.location_text, - attend_json: obj.attend_json, - attend_text: obj.attend_text, + attend_json: obj.attend_json, + attend_text: obj.attend_text, - status: obj.status, // draft, active, inactive, archived, unknown; currently only used with IDAA - // review: obj.review, - // approve: obj.approve, - // ready: obj.ready, - // ready_on: obj.ready_on, - // archive: obj.archive, - // archive_on: obj.archive_on, + status: obj.status, // draft, active, inactive, archived, unknown; currently only used with IDAA + // review: obj.review, + // approve: obj.approve, + // ready: obj.ready, + // ready_on: obj.ready_on, + // archive: obj.archive, + // archive_on: obj.archive_on, - mod_abstracts_json: obj.mod_abstracts_json, - mod_badges_json: obj.mod_badges_json, - mod_exhibits_json: obj.mod_exhibits_json, - mod_meetings_json: obj.mod_meetings_json, - mod_pres_mgmt_json: obj.mod_pres_mgmt_json, - cfg_json: obj.cfg_json, + mod_abstracts_json: obj.mod_abstracts_json, + mod_badges_json: obj.mod_badges_json, + mod_exhibits_json: obj.mod_exhibits_json, + mod_meetings_json: obj.mod_meetings_json, + mod_pres_mgmt_json: obj.mod_pres_mgmt_json, + cfg_json: obj.cfg_json, - enable: obj.enable, - hide: obj.hide, - priority: obj.priority, - sort: obj.sort, - group: obj.group, - notes: obj.notes, - created_on: obj.created_on, - updated_on: obj.updated_on, + enable: obj.enable, + hide: obj.hide, + priority: obj.priority, + sort: obj.sort, + group: obj.group, + notes: obj.notes, + created_on: obj.created_on, + updated_on: obj.updated_on, - // IDAA Recovery Meetings: - // Currently only really used for IDAA - contact_li_json: obj.contact_li_json, - external_person_id: obj.external_person_id, + // IDAA Recovery Meetings: + // Currently only really used for IDAA + contact_li_json: obj.contact_li_json, + external_person_id: obj.external_person_id, - physical: obj.physical, - virtual: obj.virtual, + physical: obj.physical, + virtual: obj.virtual, - recurring: obj.recurring, - recurring_pattern: obj.recurring_pattern, - recurring_start_time: obj.recurring_start_time, - recurring_end_time: obj.recurring_end_time, - recurring_text: obj.recurring_text, + recurring: obj.recurring, + recurring_pattern: obj.recurring_pattern, + recurring_start_time: obj.recurring_start_time, + recurring_end_time: obj.recurring_end_time, + recurring_text: obj.recurring_text, - weekday_sunday: obj.weekday_sunday, - weekday_monday: obj.weekday_monday, - weekday_tuesday: obj.weekday_tuesday, - weekday_wednesday: obj.weekday_wednesday, - weekday_thursday: obj.weekday_thursday, - weekday_friday: obj.weekday_friday, - weekday_saturday: obj.weekday_saturday, + weekday_sunday: obj.weekday_sunday, + weekday_monday: obj.weekday_monday, + weekday_tuesday: obj.weekday_tuesday, + weekday_wednesday: obj.weekday_wednesday, + weekday_thursday: obj.weekday_thursday, + weekday_friday: obj.weekday_friday, + weekday_saturday: obj.weekday_saturday, - attend_url: obj.attend_url, - attend_url_text: obj.attend_url_text, - attend_url_code: obj.attend_url_code, - attend_url_passcode: obj.attend_url_passcode, - attend_phone: obj.attend_phone, - attend_phone_passcode: obj.attend_phone_passcode, + attend_url: obj.attend_url, + attend_url_text: obj.attend_url_text, + attend_url_code: obj.attend_url_code, + attend_url_passcode: obj.attend_url_passcode, + attend_phone: obj.attend_phone, + attend_phone_passcode: obj.attend_phone_passcode, - // From SQL view - file_count: obj.file_count, - file_count_all: obj.file_count_all, - internal_use_count: obj.internal_use_count, - event_file_id_li_json: obj.event_file_id_li_json, - }; + // From SQL view + file_count: obj.file_count, + file_count_all: obj.file_count_all, + internal_use_count: obj.internal_use_count, + event_file_id_li_json: obj.event_file_id_li_json + }; - let id_random = null; + let id_random = null; - try { - id_random = await db_events.event.update(obj_record.id, obj_record); - } catch (error) { - console.error(`Error: Failed to update ${obj_record.id}: ${error}`); - } + try { + id_random = await db_events.event.update(obj_record.id, obj_record); + } catch (error) { + console.error(`Error: Failed to update ${obj_record.id}: ${error}`); + } - if (!id_random) { - if (log_lvl) { - console.log(`Failed to update record with ID: ${obj_record.id}. Trying put...`); - } - try { - id_random = await db_events.event.put(obj_record); - } catch (error) { - console.error(`Error: Failed to put ${obj.event_id_random}: ${error}`); - } - } else { - if (log_lvl) { - console.log(`Updated record with ID: ${obj_record.id}`); - } - } + if (!id_random) { + if (log_lvl) { + console.log(`Failed to update record with ID: ${obj_record.id}. Trying put...`); + } + try { + id_random = await db_events.event.put(obj_record); + } catch (error) { + console.error(`Error: Failed to put ${obj.event_id_random}: ${error}`); + } + } else { + if (log_lvl) { + console.log(`Updated record with ID: ${obj_record.id}`); + } + } - if (!id_random) { - console.error(`Failed to save record with ID: ${obj_record.id}`); - } else { - if (log_lvl) { - console.log(`Saved record with ID: ${obj_record.id}`); - } - obj_li_id.push(obj_record.id); - } - } - return obj_li_id; - } + if (!id_random) { + console.error(`Failed to save record with ID: ${obj_record.id}`); + } else { + if (log_lvl) { + console.log(`Saved record with ID: ${obj_record.id}`); + } + obj_li_id.push(obj_record.id); + } + } + return obj_li_id; + } } - // This function will process the event config, specifically for presentation management. -export function sync_config__event_pres_mgmt( - { - pres_mgmt_cfg_remote, // This is the remote config that will be compared. - pres_mgmt_cfg_local, // This is the local config that will be updated. - log_lvl = 0 - }: { - pres_mgmt_cfg_remote: key_val, - pres_mgmt_cfg_local: key_val, - log_lvl?: number - } - ) { - log_lvl = 1; - if (log_lvl) { - console.log(`*** sync_config__event_pres_mgmt() *** pres_mgmt_cfg_remote:`, pres_mgmt_cfg_remote); - } +export function sync_config__event_pres_mgmt({ + pres_mgmt_cfg_remote, // This is the remote config that will be compared. + pres_mgmt_cfg_local, // This is the local config that will be updated. + log_lvl = 0 +}: { + pres_mgmt_cfg_remote: key_val; + pres_mgmt_cfg_local: key_val; + log_lvl?: number; +}) { + log_lvl = 1; + if (log_lvl) { + console.log( + `*** sync_config__event_pres_mgmt() *** pres_mgmt_cfg_remote:`, + pres_mgmt_cfg_remote + ); + } - // Deal with things that can not be overridden first: - // Labels: - pres_mgmt_cfg_local.label__person_external_id = pres_mgmt_cfg_remote?.label__person_external_id ?? 'External ID'; - pres_mgmt_cfg_local.label__presenter_external_id = pres_mgmt_cfg_remote?.label__presenter_external_id ?? 'External ID'; + // Deal with things that can not be overridden first: + // Labels: + pres_mgmt_cfg_local.label__person_external_id = + pres_mgmt_cfg_remote?.label__person_external_id ?? 'External ID'; + pres_mgmt_cfg_local.label__presenter_external_id = + pres_mgmt_cfg_remote?.label__presenter_external_id ?? 'External ID'; - pres_mgmt_cfg_local.label__session_poc_type = pres_mgmt_cfg_remote?.label__session_poc_type ?? 'poc'; - pres_mgmt_cfg_local.label__session_poc_name = pres_mgmt_cfg_remote?.label__session_poc_name_short ?? 'POC'; - pres_mgmt_cfg_local.label__session_poc_name = pres_mgmt_cfg_remote?.label__session_poc_name ?? 'Point of Contact'; + pres_mgmt_cfg_local.label__session_poc_type = + pres_mgmt_cfg_remote?.label__session_poc_type ?? 'poc'; + pres_mgmt_cfg_local.label__session_poc_name = + pres_mgmt_cfg_remote?.label__session_poc_name_short ?? 'POC'; + pres_mgmt_cfg_local.label__session_poc_name = + pres_mgmt_cfg_remote?.label__session_poc_name ?? 'Point of Contact'; - // Hide content: + // Hide content: - pres_mgmt_cfg_local.hide__session_poc = pres_mgmt_cfg_remote?.hide__session_poc ?? false; + pres_mgmt_cfg_local.hide__session_poc = pres_mgmt_cfg_remote?.hide__session_poc ?? false; - // pres_mgmt_cfg_local.hide__report_kv = pres_mgmt_cfg_remote?.hide__report_kv ?? null; + // pres_mgmt_cfg_local.hide__report_kv = pres_mgmt_cfg_remote?.hide__report_kv ?? null; - // pres_mgmt_cfg_local.limit__navigation = pres_mgmt_cfg_remote?.limit__navigation ?? false; - // pres_mgmt_cfg_local.limit__options = pres_mgmt_cfg_remote?.limit__options ?? false; + // pres_mgmt_cfg_local.limit__navigation = pres_mgmt_cfg_remote?.limit__navigation ?? false; + // pres_mgmt_cfg_local.limit__options = pres_mgmt_cfg_remote?.limit__options ?? false; - // Required fields or options (agreements): - pres_mgmt_cfg_local.require__presenter_agree = pres_mgmt_cfg_remote?.require__presenter_agree ?? false; // In use - pres_mgmt_cfg_local.require__session_agree = pres_mgmt_cfg_remote?.require__session_agree ?? false; // New and in progress + // Required fields or options (agreements): + pres_mgmt_cfg_local.require__presenter_agree = + pres_mgmt_cfg_remote?.require__presenter_agree ?? false; // In use + pres_mgmt_cfg_local.require__session_agree = + pres_mgmt_cfg_remote?.require__session_agree ?? false; // New and in progress - // Show content: - // pres_mgmt_cfg_local.show__navigation = pres_mgmt_cfg_remote?.show__navigation ?? false; + // Show content: + // pres_mgmt_cfg_local.show__navigation = pres_mgmt_cfg_remote?.show__navigation ?? false; - pres_mgmt_cfg_local.show__copy_access_link = pres_mgmt_cfg_remote?.show__copy_access_link ?? false; - pres_mgmt_cfg_local.show__email_access_link = pres_mgmt_cfg_remote?.show__email_access_link ?? false; + pres_mgmt_cfg_local.show__copy_access_link = + pres_mgmt_cfg_remote?.show__copy_access_link ?? false; + pres_mgmt_cfg_local.show__email_access_link = + pres_mgmt_cfg_remote?.show__email_access_link ?? false; - pres_mgmt_cfg_local.file_purpose_option_kv = pres_mgmt_cfg_remote?.file_purpose_option_kv ?? null; + pres_mgmt_cfg_local.file_purpose_option_kv = pres_mgmt_cfg_remote?.file_purpose_option_kv ?? null; - // Deal with things that can be overridden: + // Deal with things that can be overridden: - // Locking the config is targeted at the trusted staff level and below. It is more or less ignored at the global manager and super levels. It may be enforced at the staff admin level? - // pres_mgmt_cfg_local.lock_config = pres_mgmt_cfg_remote?.lock_config ? true : false; // This disables the sync local config button and options. - if (pres_mgmt_cfg_local.lock_config) { - console.log(`The config should be locked! Forcing the sync!`); - // This is to forcibly sync the local config with the remote config. - pres_mgmt_cfg_local.sync_local_config = true; - } else { - // Do not override the preference for syncing the local config with the remote config. - console.log(`The config is not locked. Currently set to sync? ${pres_mgmt_cfg_local.sync_local_config}`); + // Locking the config is targeted at the trusted staff level and below. It is more or less ignored at the global manager and super levels. It may be enforced at the staff admin level? + // pres_mgmt_cfg_local.lock_config = pres_mgmt_cfg_remote?.lock_config ? true : false; // This disables the sync local config button and options. + if (pres_mgmt_cfg_local.lock_config) { + console.log(`The config should be locked! Forcing the sync!`); + // This is to forcibly sync the local config with the remote config. + pres_mgmt_cfg_local.sync_local_config = true; + } else { + // Do not override the preference for syncing the local config with the remote config. + console.log( + `The config is not locked. Currently set to sync? ${pres_mgmt_cfg_local.sync_local_config}` + ); - // Check if the sync_local_config is undefined versus just false. - // if (pres_mgmt_cfg_local?.sync_local_config) { - // pres_mgmt_cfg_local.sync_local_config = true; - // } else { - // pres_mgmt_cfg_local.sync_local_config = pres_mgmt_cfg_remote?.sync_local_config ?? false; - // } - } + // Check if the sync_local_config is undefined versus just false. + // if (pres_mgmt_cfg_local?.sync_local_config) { + // pres_mgmt_cfg_local.sync_local_config = true; + // } else { + // pres_mgmt_cfg_local.sync_local_config = pres_mgmt_cfg_remote?.sync_local_config ?? false; + // } + } - if (pres_mgmt_cfg_local?.sync_local_config) { - if (log_lvl) { - console.log(`Syncing the local config with the remote config!!!`); - } - // Hide content: - pres_mgmt_cfg_local.hide__location_code = pres_mgmt_cfg_remote?.hide__location_code ?? false; + if (pres_mgmt_cfg_local?.sync_local_config) { + if (log_lvl) { + console.log(`Syncing the local config with the remote config!!!`); + } + // Hide content: + pres_mgmt_cfg_local.hide__location_code = pres_mgmt_cfg_remote?.hide__location_code ?? false; - pres_mgmt_cfg_local.hide__presentation_code = pres_mgmt_cfg_remote?.hide__presentation_code ?? false; - pres_mgmt_cfg_local.hide__presentation_datetime = pres_mgmt_cfg_remote?.hide__presentation_datetime ?? false; - pres_mgmt_cfg_local.show_content__presentation_description = pres_mgmt_cfg_remote?.show_content__presentation_description ?? false; + pres_mgmt_cfg_local.hide__presentation_code = + pres_mgmt_cfg_remote?.hide__presentation_code ?? false; + pres_mgmt_cfg_local.hide__presentation_datetime = + pres_mgmt_cfg_remote?.hide__presentation_datetime ?? false; + pres_mgmt_cfg_local.show_content__presentation_description = + pres_mgmt_cfg_remote?.show_content__presentation_description ?? false; - pres_mgmt_cfg_local.hide__presenter_code = pres_mgmt_cfg_remote?.hide__presenter_code ?? false; - pres_mgmt_cfg_local.hide__presenter_biography = pres_mgmt_cfg_remote?.hide__presenter_biography ?? false; + pres_mgmt_cfg_local.hide__presenter_code = pres_mgmt_cfg_remote?.hide__presenter_code ?? false; + pres_mgmt_cfg_local.hide__presenter_biography = + pres_mgmt_cfg_remote?.hide__presenter_biography ?? false; - pres_mgmt_cfg_local.hide__session_code = pres_mgmt_cfg_remote?.hide__session_code ?? false; - pres_mgmt_cfg_local.hide__session_description = pres_mgmt_cfg_remote?.hide__session_description ?? false; - pres_mgmt_cfg_local.hide__session_location = pres_mgmt_cfg_remote?.hide__session_location ?? false; - pres_mgmt_cfg_local.hide__session_msg = pres_mgmt_cfg_remote?.hide__session_msg ?? false; + pres_mgmt_cfg_local.hide__session_code = pres_mgmt_cfg_remote?.hide__session_code ?? false; + pres_mgmt_cfg_local.hide__session_description = + pres_mgmt_cfg_remote?.hide__session_description ?? false; + pres_mgmt_cfg_local.hide__session_location = + pres_mgmt_cfg_remote?.hide__session_location ?? false; + pres_mgmt_cfg_local.hide__session_msg = pres_mgmt_cfg_remote?.hide__session_msg ?? false; - // pres_mgmt_cfg_local.hide__session_li_poc_field = pres_mgmt_cfg_remote?.hide__session_li_poc_field ?? false; // This should still allow the POC name to be shown. - pres_mgmt_cfg_local.hide__session_poc_profile = pres_mgmt_cfg_remote?.hide__session_poc_profile ?? false; // This should still allow the POC name to be shown. - pres_mgmt_cfg_local.hide__session_poc_biography = pres_mgmt_cfg_remote?.hide__session_poc_biography ?? false; // New and in progress - pres_mgmt_cfg_local.hide__session_poc_profile_pic = pres_mgmt_cfg_remote?.hide__session_poc_profile_pic ?? false; // New and in progress + // pres_mgmt_cfg_local.hide__session_li_poc_field = pres_mgmt_cfg_remote?.hide__session_li_poc_field ?? false; // This should still allow the POC name to be shown. + pres_mgmt_cfg_local.hide__session_poc_profile = + pres_mgmt_cfg_remote?.hide__session_poc_profile ?? false; // This should still allow the POC name to be shown. + pres_mgmt_cfg_local.hide__session_poc_biography = + pres_mgmt_cfg_remote?.hide__session_poc_biography ?? false; // New and in progress + pres_mgmt_cfg_local.hide__session_poc_profile_pic = + pres_mgmt_cfg_remote?.hide__session_poc_profile_pic ?? false; // New and in progress - // pres_mgmt_cfg_local.show__copy_access_link = pres_mgmt_cfg_remote?.show__copy_access_link ?? false; - // pres_mgmt_cfg_local.show__email_access_link = pres_mgmt_cfg_remote?.show__email_access_link ?? false; - // pres_mgmt_cfg_local.show__launcher_link = pres_mgmt_cfg_remote?.show__launcher_link ?? false; - // pres_mgmt_cfg_local.show__launcher_link_legacy = pres_mgmt_cfg_remote?.show__launcher_link_legacy ?? false; + // pres_mgmt_cfg_local.show__copy_access_link = pres_mgmt_cfg_remote?.show__copy_access_link ?? false; + // pres_mgmt_cfg_local.show__email_access_link = pres_mgmt_cfg_remote?.show__email_access_link ?? false; + // pres_mgmt_cfg_local.show__launcher_link = pres_mgmt_cfg_remote?.show__launcher_link ?? false; + // pres_mgmt_cfg_local.show__launcher_link_legacy = pres_mgmt_cfg_remote?.show__launcher_link_legacy ?? false; - pres_mgmt_cfg_local.hide_launcher_link = pres_mgmt_cfg_remote?.hide_launcher_link ?? false; - pres_mgmt_cfg_local.hide_launcher_link_legacy = pres_mgmt_cfg_remote?.hide_launcher_link_legacy ?? false; - } + pres_mgmt_cfg_local.hide_launcher_link = pres_mgmt_cfg_remote?.hide_launcher_link ?? false; + pres_mgmt_cfg_local.hide_launcher_link_legacy = + pres_mgmt_cfg_remote?.hide_launcher_link_legacy ?? false; + } - if (log_lvl) { - console.log(`pres_mgmt_cfg_local:`, pres_mgmt_cfg_local); - } - return pres_mgmt_cfg_local; + if (log_lvl) { + console.log(`pres_mgmt_cfg_local:`, pres_mgmt_cfg_local); + } + return pres_mgmt_cfg_local; } - // Updated 2025-05-09 export const properties_to_save = [ - 'id', - 'event_id', - 'event_id_random', + 'id', + 'event_id', + 'event_id_random', - 'code', + 'code', - 'account_id', - 'account_id_random', + 'account_id', + 'account_id_random', - 'conference', - 'type', - 'name', - 'summary', - 'description', + 'conference', + 'type', + 'name', + 'summary', + 'description', - 'start_datetime', - 'end_datetime', - 'timezone', + 'start_datetime', + 'end_datetime', + 'timezone', - 'location_address_json', - 'location_text', + 'location_address_json', + 'location_text', - 'attend_json', - 'attend_text', + 'attend_json', + 'attend_text', - 'status', // draft, active, inactive, archived, unknown; currently only used with IDAA - // review - // approve - // ready - // ready_on - // archive - // archive_on + 'status', // draft, active, inactive, archived, unknown; currently only used with IDAA + // review + // approve + // ready + // ready_on + // archive + // archive_on - 'mod_abstracts_json', - 'mod_badges_json', - 'mod_exhibits_json', - 'mod_meetings_json', - 'mod_pres_mgmt_json', - 'cfg_json', + 'mod_abstracts_json', + 'mod_badges_json', + 'mod_exhibits_json', + 'mod_meetings_json', + 'mod_pres_mgmt_json', + 'cfg_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // IDAA Recovery Meetings: - // Currently only really used for IDAA - 'contact_li_json', - 'external_person_id', + // IDAA Recovery Meetings: + // Currently only really used for IDAA + 'contact_li_json', + 'external_person_id', - 'physical', - 'virtual', + 'physical', + 'virtual', - 'recurring', - 'recurring_pattern', - 'recurring_start_time', - 'recurring_end_time', - 'recurring_text', + 'recurring', + 'recurring_pattern', + 'recurring_start_time', + 'recurring_end_time', + 'recurring_text', - 'weekday_sunday', - 'weekday_monday', - 'weekday_tuesday', - 'weekday_wednesday', - 'weekday_thursday', - 'weekday_friday', - 'weekday_saturday', + 'weekday_sunday', + 'weekday_monday', + 'weekday_tuesday', + 'weekday_wednesday', + 'weekday_thursday', + 'weekday_friday', + 'weekday_saturday', - 'attend_url', - 'attend_url_text', - 'attend_url_code', - 'attend_url_passcode', - 'attend_phone', - 'attend_phone_passcode', + 'attend_url', + 'attend_url_text', + 'attend_url_code', + 'attend_url_passcode', + 'attend_phone', + 'attend_phone_passcode', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - 'file_count', - 'file_count_all', - 'internal_use_count', - 'event_file_id_li_json', - // 'event_session_count', - // 'event_presenter_count', - // 'event_file_count', + // From SQL view + 'file_count', + 'file_count_all', + 'internal_use_count', + 'event_file_id_li_json' + // 'event_session_count', + // 'event_presenter_count', + // 'event_file_count', - // A key value list of the others - // 'event_other_kv', - // 'event_other_li', + // A key value list of the others + // 'event_other_kv', + // 'event_other_li', ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -1212,7 +1212,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-11-13 export async function process_ae_obj__event_props({ obj_li, @@ -1234,4 +1233,3 @@ export async function process_ae_obj__event_props({ } }); } - diff --git a/src/lib/ae_events/ae_events__event_badge.ts b/src/lib/ae_events/ae_events__event_badge.ts index eb210fdb..763090ec 100644 --- a/src/lib/ae_events/ae_events__event_badge.ts +++ b/src/lib/ae_events/ae_events__event_badge.ts @@ -1,603 +1,602 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_events } from "$lib/ae_events/db_events"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_events } from '$lib/ae_events/db_events'; -import { load_ae_obj_id__event_badge_template } from "$lib/ae_events/ae_events__event_badge_template"; - -let ae_promises: key_val = {}; +import { load_ae_obj_id__event_badge_template } from '$lib/ae_events/ae_events__event_badge_template'; +const ae_promises: key_val = {}; // Updated 2025-10-06 export async function load_ae_obj_id__event_badge({ - api_cfg, - event_badge_id, - inc_template = true, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_badge_id: string, - inc_template?: boolean, - try_cache?: boolean, - log_lvl?: number - }) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__event_badge() *** event_badge_id=${event_badge_id}`); - } - let params = {}; - ae_promises.load__event_badge_obj = await api.get_ae_obj_id_crud({ - api_cfg, - obj_type: 'event_badge', - obj_id: event_badge_id, - use_alt_table: false, - use_alt_base: false, - params, - log_lvl - }) - .then(async function (badge_obj_get_result) { - if (badge_obj_get_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_props({ - obj_li: [badge_obj_get_result], - log_lvl - }); - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return badge_obj_get_result; - } else { - if (log_lvl) console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + api_cfg, + event_badge_id, + inc_template = true, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_badge_id: string; + inc_template?: boolean; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__event_badge() *** event_badge_id=${event_badge_id}`); + } + const params = {}; + ae_promises.load__event_badge_obj = await api + .get_ae_obj_id_crud({ + api_cfg, + obj_type: 'event_badge', + obj_id: event_badge_id, + use_alt_table: false, + use_alt_base: false, + params, + log_lvl + }) + .then(async function (badge_obj_get_result) { + if (badge_obj_get_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_props({ + obj_li: [badge_obj_get_result], + log_lvl + }); + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return badge_obj_get_result; + } else { + if (log_lvl) console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (inc_template) { - // Load the templates for the event badge - if (log_lvl) { - console.log(`Need to load the template for the badge now`); - } - let load_event_badge_template_obj = load_ae_obj_id__event_badge_template({ - api_cfg: api_cfg, - event_badge_template_id: ae_promises.load__event_badge_obj?.event_badge_template_id_random, - log_lvl: log_lvl - }) - .then((event_badge_template_obj_li) => { - if (log_lvl) { - console.log(`event_badge_template_obj_li = `, event_badge_template_obj_li); - } - return event_badge_template_obj_li; - }); + if (inc_template) { + // Load the templates for the event badge + if (log_lvl) { + console.log(`Need to load the template for the badge now`); + } + const load_event_badge_template_obj = load_ae_obj_id__event_badge_template({ + api_cfg: api_cfg, + event_badge_template_id: ae_promises.load__event_badge_obj?.event_badge_template_id_random, + log_lvl: log_lvl + }).then((event_badge_template_obj_li) => { + if (log_lvl) { + console.log(`event_badge_template_obj_li = `, event_badge_template_obj_li); + } + return event_badge_template_obj_li; + }); - if (log_lvl) { - console.log(`event_badge_template_obj = `, load_event_badge_template_obj); - } - ae_promises.load__event_session_obj.event_badge_template = load_event_badge_template_obj; - } + if (log_lvl) { + console.log(`event_badge_template_obj = `, load_event_badge_template_obj); + } + ae_promises.load__event_session_obj.event_badge_template = load_event_badge_template_obj; + } - return ae_promises.load__event_badge_obj; + return ae_promises.load__event_badge_obj; } - // Updated 2025-10-06 export async function load_ae_obj_li__event_badge({ - api_cfg, - event_id, - inc_template = true, // This should probably be false. - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - inc_template?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - }) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__event_badge() *** event_id=${event_id}`); - } - let params_json: key_val = {}; - // ae_promises.load__event_badge_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_badge_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_badge', - for_obj_type: 'event', - for_obj_id: event_id, - // use_alt_tbl: false, - // use_alt_mdl: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (badge_obj_li_get_result) { - if (badge_obj_li_get_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_props({ - obj_li: badge_obj_li_get_result, - log_lvl - }); - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return badge_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + api_cfg, + event_id, + inc_template = true, // This should probably be false. + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { priority: 'DESC', sort: 'DESC', updated_on: 'DESC', created_on: 'DESC' }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + inc_template?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_li__event_badge() *** event_id=${event_id}`); + } + const params_json: key_val = {}; + // ae_promises.load__event_badge_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_badge_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_badge', + for_obj_type: 'event', + for_obj_id: event_id, + // use_alt_tbl: false, + // use_alt_mdl: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (badge_obj_li_get_result) { + if (badge_obj_li_get_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_props({ + obj_li: badge_obj_li_get_result, + log_lvl + }); + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return badge_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + if (inc_template) { + // Load the template for each badge + if (log_lvl) { + console.log(`Need to load the template for each badge now`); + } + for (const badge_obj of ae_promises.load__event_badge_obj_li) { + if (log_lvl) { + console.log(`Loading template for badge_obj: `, badge_obj); + } + const load_event_badge_template_obj = await load_ae_obj_id__event_badge_template({ + api_cfg: api_cfg, + event_badge_template_id: badge_obj?.event_badge_template_id_random, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log(`event_badge_template_obj = `, load_event_badge_template_obj); + } + badge_obj.event_badge_template = load_event_badge_template_obj; + } + } - if (inc_template) { - // Load the template for each badge - if (log_lvl) { - console.log(`Need to load the template for each badge now`); - } - for (let badge_obj of ae_promises.load__event_badge_obj_li) { - if (log_lvl) { - console.log(`Loading template for badge_obj: `, badge_obj); - } - let load_event_badge_template_obj = await load_ae_obj_id__event_badge_template({ - api_cfg: api_cfg, - event_badge_template_id: badge_obj?.event_badge_template_id_random, - log_lvl: log_lvl - }); - if (log_lvl) { - console.log(`event_badge_template_obj = `, load_event_badge_template_obj); - } - badge_obj.event_badge_template = load_event_badge_template_obj; - - } - } - - return ae_promises.load__event_badge_obj_li; + return ae_promises.load__event_badge_obj_li; } - // Updated 2025-10-06 export async function create_ae_obj__event_badge({ - api_cfg, - event_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - }) { - if (log_lvl) { - console.log(`*** create_ae_obj__event_badge() *** event_id=${event_id}`); - } - ae_promises.create__event_badge = await api.create_ae_obj_crud({ - api_cfg, - obj_type: 'event_badge', - fields: { - event_id_random: event_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params, - return_obj: true, - log_lvl - }) - .then(async function (event_badge_obj_create_result) { - if (event_badge_obj_create_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_props({ - obj_li: [event_badge_obj_create_result], - log_lvl - }); - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return event_badge_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); - return ae_promises.create__event_badge; + api_cfg, + event_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__event_badge() *** event_id=${event_id}`); + } + ae_promises.create__event_badge = await api + .create_ae_obj_crud({ + api_cfg, + obj_type: 'event_badge', + fields: { + event_id_random: event_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params, + return_obj: true, + log_lvl + }) + .then(async function (event_badge_obj_create_result) { + if (event_badge_obj_create_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_props({ + obj_li: [event_badge_obj_create_result], + log_lvl + }); + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return event_badge_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + return ae_promises.create__event_badge; } - // Updated 2025-10-06 export async function delete_ae_obj_id__event_badge({ - api_cfg, - event_badge_id, - method = 'delete', - params = {}, - try_cache = true, - log_lvl = 0 + api_cfg, + event_badge_id, + method = 'delete', + params = {}, + try_cache = true, + log_lvl = 0 }: { - api_cfg: any, - event_badge_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number + api_cfg: any; + event_badge_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; }) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__event_badge() *** event_badge_id=${event_badge_id}`); - } - ae_promises.delete__event_badge_obj = await api.delete_ae_obj_id_crud({ - api_cfg, - obj_type: 'event_badge', - obj_id: event_badge_id, - key: api_cfg.api_crud_super_key, - params, - method, - log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for event_badge_id=${event_badge_id}`); - } - db_events.badge.delete(event_badge_id); - } - }); - return ae_promises.delete__event_badge_obj; + if (log_lvl) { + console.log(`*** delete_ae_obj_id__event_badge() *** event_badge_id=${event_badge_id}`); + } + ae_promises.delete__event_badge_obj = await api + .delete_ae_obj_id_crud({ + api_cfg, + obj_type: 'event_badge', + obj_id: event_badge_id, + key: api_cfg.api_crud_super_key, + params, + method, + log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for event_badge_id=${event_badge_id}`); + } + db_events.badge.delete(event_badge_id); + } + }); + return ae_promises.delete__event_badge_obj; } - // Updated 2025-10-06 export async function update_ae_obj__event_badge({ - api_cfg, - event_badge_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 + api_cfg, + event_badge_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 }: { - api_cfg: any, - event_badge_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number + api_cfg: any; + event_badge_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; }) { - if (log_lvl) { - console.log(`*** update_ae_obj__event_badge() *** event_badge_id=${event_badge_id}`); - } - ae_promises.update__event_badge_obj = await api.update_ae_obj_id_crud({ - api_cfg, - obj_type: 'event_badge', - obj_id: event_badge_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params, - return_obj: true, - log_lvl - }) - .then(async function (event_badge_obj_update_result) { - if (event_badge_obj_update_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_props({ - obj_li: [event_badge_obj_update_result], - log_lvl - }); - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return event_badge_obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); - return ae_promises.update__event_badge_obj; + if (log_lvl) { + console.log(`*** update_ae_obj__event_badge() *** event_badge_id=${event_badge_id}`); + } + ae_promises.update__event_badge_obj = await api + .update_ae_obj_id_crud({ + api_cfg, + obj_type: 'event_badge', + obj_id: event_badge_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params, + return_obj: true, + log_lvl + }) + .then(async function (event_badge_obj_update_result) { + if (event_badge_obj_update_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_props({ + obj_li: [event_badge_obj_update_result], + log_lvl + }); + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return event_badge_obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + return ae_promises.update__event_badge_obj; } - // Is this needed? // Updated 2025-10-06 export async function qry__event_badge({ - api_cfg, - event_id, - qry_str = null, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - qry_str?: null|string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - }) { - if (log_lvl) { - console.log(`*** qry__event_badge() *** event_id=${event_id}`); - } - let params_json: key_val = {}; - if (qry_str) { - params_json['ft_qry'] = { 'default_qry_str': qry_str }; - } - ae_promises.qry__event_badge_obj_li = await load_ae_obj_li__event_badge({ - api_cfg, - event_id, - enabled, - hidden, - limit, - offset, - order_by_li, - params: { ...params, ...params_json }, - try_cache, - log_lvl - }); - return ae_promises.qry__event_badge_obj_li; + api_cfg, + event_id, + qry_str = null, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { priority: 'DESC', sort: 'DESC', updated_on: 'DESC', created_on: 'DESC' }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + qry_str?: null | string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** qry__event_badge() *** event_id=${event_id}`); + } + const params_json: key_val = {}; + if (qry_str) { + params_json['ft_qry'] = { default_qry_str: qry_str }; + } + ae_promises.qry__event_badge_obj_li = await load_ae_obj_li__event_badge({ + api_cfg, + event_id, + enabled, + hidden, + limit, + offset, + order_by_li, + params: { ...params, ...params_json }, + try_cache, + log_lvl + }); + return ae_promises.qry__event_badge_obj_li; } - // Updated 2025-10-06 export async function search__event_badge({ - api_cfg, - event_id, - type_code = null, - fulltext_search_qry_str, - like_search_qry_str = null, - external_event_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 25, - offset = 0, - order_by_li = {'print_count': 'ASC', 'priority': 'DESC', 'sort': 'DESC', 'given_name': 'ASC', 'family_name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - type_code?: null|string, - external_event_id?: null|string, - fulltext_search_qry_str?: null|string, - like_search_qry_str?: null|string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - }) { - if (log_lvl) { - console.log(`*** search__event_badge() *** event_id=${event_id}`); - } + api_cfg, + event_id, + type_code = null, + fulltext_search_qry_str, + like_search_qry_str = null, + external_event_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 25, + offset = 0, + order_by_li = { + print_count: 'ASC', + priority: 'DESC', + sort: 'DESC', + given_name: 'ASC', + family_name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + type_code?: null | string; + external_event_id?: null | string; + fulltext_search_qry_str?: null | string; + like_search_qry_str?: null | string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** search__event_badge() *** event_id=${event_id}`); + } - if (!fulltext_search_qry_str && !like_search_qry_str) { - console.log('No search string provided!!!'); - return false; // Returning false instead of [] because no search was performed. - } + if (!fulltext_search_qry_str && !like_search_qry_str) { + console.log('No search string provided!!!'); + return false; // Returning false instead of [] because no search was performed. + } + const params_json: key_val = {}; + if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { + params_json['ft_qry'] = { default_qry_str: fulltext_search_qry_str }; + // 'location_address_json_ext': fulltext_search_qry_str, // JSON extracted text DB field + // 'contact_li_json_ext': fulltext_search_qry_str, // JSON extracted text DB field + } + if (like_search_qry_str && like_search_qry_str.length > 2) { + // Old Python version that needs to be in JS + // # Strip (left right) whitespace then commas then semicolons + // query_str = query_str.strip().strip(',').strip(';') + // # Replace commas, semicolons, and then spaces with % + // query_str_like = query_str.replace(',', ' ').replace(';', ' ').replace(' ', '%').replace(' ', '%') + // # data['query_str'] = f'%{query_str}%' + // log.debug(query_str_like) + // data['query_str'] = f'%{query_str_like}%' - let params_json: key_val = {}; - if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { - params_json['ft_qry'] = { 'default_qry_str': fulltext_search_qry_str }; - // 'location_address_json_ext': fulltext_search_qry_str, // JSON extracted text DB field - // 'contact_li_json_ext': fulltext_search_qry_str, // JSON extracted text DB field - } - if (like_search_qry_str && like_search_qry_str.length > 2) { - // Old Python version that needs to be in JS - // # Strip (left right) whitespace then commas then semicolons - // query_str = query_str.strip().strip(',').strip(';') - // # Replace commas, semicolons, and then spaces with % - // query_str_like = query_str.replace(',', ' ').replace(';', ' ').replace(' ', '%').replace(' ', '%') - // # data['query_str'] = f'%{query_str}%' - // log.debug(query_str_like) - // data['query_str'] = f'%{query_str_like}%' + // let like_search_qry_str_new = like_search_qry_str.trim().replace(',', ' ').replace(';', ' ').replace(' ', '%').replace(' ', '%'); + // like_search_qry_str_new = `%${like_search_qry_str_new}%`; + // console.log('like_search_qry_str_new:', like_search_qry_str_new); - // let like_search_qry_str_new = like_search_qry_str.trim().replace(',', ' ').replace(';', ' ').replace(' ', '%').replace(' ', '%'); - // like_search_qry_str_new = `%${like_search_qry_str_new}%`; - // console.log('like_search_qry_str_new:', like_search_qry_str_new); + params_json['and_like'] = { default_qry_str: like_search_qry_str }; + } - params_json['and_like'] = { 'default_qry_str': like_search_qry_str }; - } + params_json['and_qry'] = {}; + if (external_event_id) { + params_json['and_qry']['external_event_id'] = external_event_id; + } + if (type_code) { + // This is the event_badge.badge_type_code. There is also a member_type_code and registration_type_code that could be referenced in the future. + params_json['and_qry']['badge_type_code'] = type_code; + } - params_json['and_qry'] = {}; - if (external_event_id) { - params_json['and_qry']['external_event_id'] = external_event_id; - } - if (type_code) { // This is the event_badge.badge_type_code. There is also a member_type_code and registration_type_code that could be referenced in the future. - params_json['and_qry']['badge_type_code'] = type_code; - } - - // ae_promises.search__event_badge_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.search__event_badge_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg, - obj_type: 'event_badge', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_tbl: false, - use_alt_mdl: true, - enabled, - hidden, - order_by_li, - limit, - offset, - params_json, - params, - log_lvl - }) - .then(async function (badge_obj_li_get_result) { - if (badge_obj_li_get_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_props({ - obj_li: badge_obj_li_get_result, - log_lvl - }); - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return badge_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); - return ae_promises.search__event_badge_obj_li; + // ae_promises.search__event_badge_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.search__event_badge_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg, + obj_type: 'event_badge', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_tbl: false, + use_alt_mdl: true, + enabled, + hidden, + order_by_li, + limit, + offset, + params_json, + params, + log_lvl + }) + .then(async function (badge_obj_li_get_result) { + if (badge_obj_li_get_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_props({ + obj_li: badge_obj_li_get_result, + log_lvl + }); + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return badge_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + return ae_promises.search__event_badge_obj_li; } - - - - // Updated 2025-10-06 export const properties_to_save = [ - 'id', - 'event_badge_id', - // 'event_badge_id_random', + 'id', + 'event_badge_id', + // 'event_badge_id_random', - 'event_id', - // 'event_id_random', + 'event_id', + // 'event_id_random', - 'event_badge_template_id', - // 'event_badge_template_id_random', + 'event_badge_template_id', + // 'event_badge_template_id_random', - 'pronouns', - 'informal_name', - 'title_names', - 'given_name', - 'middle_name', - 'family_name', - 'designations', + 'pronouns', + 'informal_name', + 'title_names', + 'given_name', + 'middle_name', + 'family_name', + 'designations', - 'professional_title', - 'professional_title_override', + 'professional_title', + 'professional_title_override', - 'full_name', - 'full_name_override', + 'full_name', + 'full_name_override', - 'affiliations', - 'affiliations_override', + 'affiliations', + 'affiliations_override', - 'email', - 'email_override', + 'email', + 'email_override', - 'address_line_1', - 'address_line_2', - 'address_line_3', - 'city', - 'country_subdivision_code', - 'state_province', - 'state_province_abb', - 'postal_code', - 'country_alpha_2_code', - 'country', - 'full_address', - 'location', - 'location_override', + 'address_line_1', + 'address_line_2', + 'address_line_3', + 'city', + 'country_subdivision_code', + 'state_province', + 'state_province_abb', + 'postal_code', + 'country_alpha_2_code', + 'country', + 'full_address', + 'location', + 'location_override', - 'query_str', + 'query_str', - 'badge_type', - 'badge_type_code', - 'badge_type_override', - 'badge_type_code_override', - 'external_event_id', - 'external_id', - 'external_person_id', + 'badge_type', + 'badge_type_code', + 'badge_type_override', + 'badge_type_code_override', + 'external_event_id', + 'external_id', + 'external_person_id', - 'default_qry_string', + 'default_qry_string', - 'alert', + 'alert', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', - 'person_external_id', - 'person_external_sys_id', - 'person_given_name', - 'person_family_name', - 'person_full_name', - 'person_professional_title', - 'person_affiliations', - 'person_primary_email', - 'person_passcode', + 'person_external_id', + 'person_external_sys_id', + 'person_given_name', + 'person_family_name', + 'person_full_name', + 'person_professional_title', + 'person_affiliations', + 'person_primary_email', + 'person_passcode' ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -666,7 +665,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-10-06 export async function process_ae_obj__event_badge_props({ obj_li, diff --git a/src/lib/ae_events/ae_events__event_badge_template.ts b/src/lib/ae_events/ae_events__event_badge_template.ts index 1cca2233..37107117 100644 --- a/src/lib/ae_events/ae_events__event_badge_template.ts +++ b/src/lib/ae_events/ae_events__event_badge_template.ts @@ -1,87 +1,84 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_events } from "$lib/ae_events/db_events"; - -let ae_promises: key_val = {}; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_events } from '$lib/ae_events/db_events'; +const ae_promises: key_val = {}; // --- PROPERTIES TO SAVE --- export const properties_to_save = [ - 'id', - 'event_badge_template_id', - // 'event_badge_template_id_random', + 'id', + 'event_badge_template_id', + // 'event_badge_template_id_random', - 'event_id', - // 'event_id_random', + 'event_id', + // 'event_id_random', - 'name', - 'description', + 'name', + 'description', - // 'template_code', - // 'template_type', - // 'template_json', - // 'template_svg', - // 'template_css', - // 'template_html', + // 'template_code', + // 'template_type', + // 'template_json', + // 'template_svg', + // 'template_css', + // 'template_html', - 'logo_filename', - 'logo_path', + 'logo_filename', + 'logo_path', - 'header_path', - 'secondary_header_path', - 'footer_path', + 'header_path', + 'secondary_header_path', + 'footer_path', - 'header_row_1', - 'header_row_2', + 'header_row_1', + 'header_row_2', - // 'footer_title', - // 'footer_left', - // 'footer_right', - // 'header_background', - // 'footer_background', + // 'footer_title', + // 'footer_left', + // 'footer_right', + // 'header_background', + // 'footer_background', - 'badge_type_list', - 'ticket_list', + 'badge_type_list', + 'ticket_list', - 'ticket_1_text', - 'ticket_2_text', - 'ticket_3_text', - 'ticket_4_text', - 'ticket_5_text', - 'ticket_6_text', - 'ticket_7_text', - 'ticket_8_text', - // 'ticket_9_text', - // 'ticket_10_text', + 'ticket_1_text', + 'ticket_2_text', + 'ticket_3_text', + 'ticket_4_text', + 'ticket_5_text', + 'ticket_6_text', + 'ticket_7_text', + 'ticket_8_text', + // 'ticket_9_text', + // 'ticket_10_text', - 'wireless_ssid', - 'wireless_password', + 'wireless_ssid', + 'wireless_password', - 'show_qr_front', - 'show_qr_back', + 'show_qr_front', + 'show_qr_back', - 'layout', - 'style_filename', - // 'style_href', + 'layout', + 'style_filename', + // 'style_href', + // 'default', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // 'default', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', - - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2' ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -150,7 +147,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // --- PROCESS FUNCTION --- export async function process_ae_obj__event_badge_template_props({ obj_li, @@ -177,361 +173,377 @@ export async function process_ae_obj__event_badge_template_props({ }); } - - - - // --- CRUD FUNCTIONS --- export async function load_ae_obj_id__event_badge_template({ - api_cfg, - event_badge_template_id, - try_cache = true, - log_lvl = 0 + api_cfg, + event_badge_template_id, + try_cache = true, + log_lvl = 0 }: { - api_cfg: any, - event_badge_template_id: string, - try_cache?: boolean, - log_lvl?: number + api_cfg: any; + event_badge_template_id: string; + try_cache?: boolean; + log_lvl?: number; }) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__event_badge_template() *** event_badge_template_id=${event_badge_template_id}`); - } - let params = {}; - ae_promises.load__event_badge_template_obj = await api.get_ae_obj_id_crud({ - api_cfg, - obj_type: 'event_badge_template', - obj_id: event_badge_template_id, - use_alt_table: false, - use_alt_base: false, - params, - log_lvl - }) - .then(async function (obj_get_result) { - if (obj_get_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_template_props({ - obj_li: [obj_get_result], - log_lvl - }); - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge_template', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return obj_get_result; - } else { - if (log_lvl) console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); - return ae_promises.load__event_badge_template_obj; + if (log_lvl) { + console.log( + `*** load_ae_obj_id__event_badge_template() *** event_badge_template_id=${event_badge_template_id}` + ); + } + const params = {}; + ae_promises.load__event_badge_template_obj = await api + .get_ae_obj_id_crud({ + api_cfg, + obj_type: 'event_badge_template', + obj_id: event_badge_template_id, + use_alt_table: false, + use_alt_base: false, + params, + log_lvl + }) + .then(async function (obj_get_result) { + if (obj_get_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_template_props({ + obj_li: [obj_get_result], + log_lvl + }); + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge_template', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return obj_get_result; + } else { + if (log_lvl) console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + return ae_promises.load__event_badge_template_obj; } export async function load_ae_obj_li__event_badge_template({ - api_cfg, - event_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 49, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 + api_cfg, + event_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 49, + offset = 0, + order_by_li = { priority: 'DESC', sort: 'DESC', updated_on: 'DESC', created_on: 'DESC' }, + params = {}, + try_cache = true, + log_lvl = 0 }: { - api_cfg: any, - event_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number + api_cfg: any; + event_id: string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; }) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__event_badge_template() *** event_id=${event_id}`); - } - let params_json: key_val = {}; - // ae_promises.load__event_badge_template_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_badge_template_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg, - obj_type: 'event_badge_template', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_tbl: false, - use_alt_mdl: false, - enabled, - hidden, - order_by_li, - limit, - offset, - params_json, - params, - log_lvl - }) - .then(async function (obj_li_get_result) { - if (obj_li_get_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_template_props({ - obj_li: obj_li_get_result, - log_lvl - }); - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge_template', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); - return ae_promises.load__event_badge_template_obj_li; + if (log_lvl) { + console.log(`*** load_ae_obj_li__event_badge_template() *** event_id=${event_id}`); + } + const params_json: key_val = {}; + // ae_promises.load__event_badge_template_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_badge_template_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg, + obj_type: 'event_badge_template', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_tbl: false, + use_alt_mdl: false, + enabled, + hidden, + order_by_li, + limit, + offset, + params_json, + params, + log_lvl + }) + .then(async function (obj_li_get_result) { + if (obj_li_get_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_template_props({ + obj_li: obj_li_get_result, + log_lvl + }); + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge_template', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + return ae_promises.load__event_badge_template_obj_li; } export async function create_ae_obj__event_badge_template({ - api_cfg, - event_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 + api_cfg, + event_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 }: { - api_cfg: any, - event_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number + api_cfg: any; + event_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; }) { - if (log_lvl) { - console.log(`*** create_ae_obj__event_badge_template() *** event_id=${event_id}`); - } - ae_promises.create__event_badge_template = await api.create_ae_obj_crud({ - api_cfg, - obj_type: 'event_badge_template', - fields: { - event_id_random: event_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params, - return_obj: true, - log_lvl - }) - .then(async function (obj_create_result) { - if (obj_create_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_template_props({ - obj_li: [obj_create_result], - log_lvl - }); - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge_template', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); - return ae_promises.create__event_badge_template; + if (log_lvl) { + console.log(`*** create_ae_obj__event_badge_template() *** event_id=${event_id}`); + } + ae_promises.create__event_badge_template = await api + .create_ae_obj_crud({ + api_cfg, + obj_type: 'event_badge_template', + fields: { + event_id_random: event_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params, + return_obj: true, + log_lvl + }) + .then(async function (obj_create_result) { + if (obj_create_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_template_props({ + obj_li: [obj_create_result], + log_lvl + }); + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge_template', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + return ae_promises.create__event_badge_template; } export async function delete_ae_obj_id__event_badge_template({ - api_cfg, - event_badge_template_id, - method = 'delete', - params = {}, - try_cache = true, - log_lvl = 0 + api_cfg, + event_badge_template_id, + method = 'delete', + params = {}, + try_cache = true, + log_lvl = 0 }: { - api_cfg: any, - event_badge_template_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number + api_cfg: any; + event_badge_template_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; }) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__event_badge_template() *** event_badge_template_id=${event_badge_template_id}`); - } - ae_promises.delete__event_badge_template_obj = await api.delete_ae_obj_id_crud({ - api_cfg, - obj_type: 'event_badge_template', - obj_id: event_badge_template_id, - key: api_cfg.api_crud_super_key, - params, - method, - log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for event_badge_template_id=${event_badge_template_id}`); - } - db_events.badge_template.delete(event_badge_template_id); - } - }); - return ae_promises.delete__event_badge_template_obj; + if (log_lvl) { + console.log( + `*** delete_ae_obj_id__event_badge_template() *** event_badge_template_id=${event_badge_template_id}` + ); + } + ae_promises.delete__event_badge_template_obj = await api + .delete_ae_obj_id_crud({ + api_cfg, + obj_type: 'event_badge_template', + obj_id: event_badge_template_id, + key: api_cfg.api_crud_super_key, + params, + method, + log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log( + `Attempting to remove IDB entry for event_badge_template_id=${event_badge_template_id}` + ); + } + db_events.badge_template.delete(event_badge_template_id); + } + }); + return ae_promises.delete__event_badge_template_obj; } export async function update_ae_obj__event_badge_template({ - api_cfg, - event_badge_template_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 + api_cfg, + event_badge_template_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 }: { - api_cfg: any, - event_badge_template_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number + api_cfg: any; + event_badge_template_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; }) { - if (log_lvl) { - console.log(`*** update_ae_obj__event_badge_template() *** event_badge_template_id=${event_badge_template_id}`); - } - ae_promises.update__event_badge_template_obj = await api.update_ae_obj_id_crud({ - api_cfg, - obj_type: 'event_badge_template', - obj_id: event_badge_template_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params, - return_obj: true, - log_lvl - }) - .then(async function (obj_update_result) { - if (obj_update_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_template_props({ - obj_li: [obj_update_result], - log_lvl - }); - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge_template', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); - return ae_promises.update__event_badge_template_obj; + if (log_lvl) { + console.log( + `*** update_ae_obj__event_badge_template() *** event_badge_template_id=${event_badge_template_id}` + ); + } + ae_promises.update__event_badge_template_obj = await api + .update_ae_obj_id_crud({ + api_cfg, + obj_type: 'event_badge_template', + obj_id: event_badge_template_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params, + return_obj: true, + log_lvl + }) + .then(async function (obj_update_result) { + if (obj_update_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_template_props({ + obj_li: [obj_update_result], + log_lvl + }); + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge_template', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + return ae_promises.update__event_badge_template_obj; } // --- SEARCH FUNCTION --- export async function search__event_badge_template({ - api_cfg, - event_id, - fulltext_search_qry_str, - like_search_qry_str = null, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 25, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 + api_cfg, + event_id, + fulltext_search_qry_str, + like_search_qry_str = null, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 25, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 }: { - api_cfg: any, - event_id: string, - fulltext_search_qry_str?: null|string, - like_search_qry_str?: null|string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number + api_cfg: any; + event_id: string; + fulltext_search_qry_str?: null | string; + like_search_qry_str?: null | string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; }) { - if (log_lvl) { - console.log(`*** search__event_badge_template() *** event_id=${event_id}`); - } - let params_json: key_val = {}; - if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { - params_json['ft_qry'] = { 'default_qry_str': fulltext_search_qry_str }; - } - if (like_search_qry_str && like_search_qry_str.length > 2) { - params_json['and_like'] = { 'default_qry_str': like_search_qry_str }; - } - params_json['and_qry'] = {}; - // ae_promises.search__event_badge_template_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_badge_template_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg, - obj_type: 'event_badge_template', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_tbl: false, - use_alt_mdl: false, - enabled, - hidden, - order_by_li, - limit, - offset, - params_json, - params, - log_lvl - }) - .then(async function (obj_li_get_result) { - if (obj_li_get_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_badge_template_props({ - obj_li: obj_li_get_result, - log_lvl - }); - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'badge_template', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - } - return obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); - return ae_promises.search__event_badge_template_obj_li; + if (log_lvl) { + console.log(`*** search__event_badge_template() *** event_id=${event_id}`); + } + const params_json: key_val = {}; + if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { + params_json['ft_qry'] = { default_qry_str: fulltext_search_qry_str }; + } + if (like_search_qry_str && like_search_qry_str.length > 2) { + params_json['and_like'] = { default_qry_str: like_search_qry_str }; + } + params_json['and_qry'] = {}; + // ae_promises.search__event_badge_template_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_badge_template_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg, + obj_type: 'event_badge_template', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_tbl: false, + use_alt_mdl: false, + enabled, + hidden, + order_by_li, + limit, + offset, + params_json, + params, + log_lvl + }) + .then(async function (obj_li_get_result) { + if (obj_li_get_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_badge_template_props({ + obj_li: obj_li_get_result, + log_lvl + }); + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'badge_template', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + } + return obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + return ae_promises.search__event_badge_template_obj_li; } diff --git a/src/lib/ae_events/ae_events__event_device.ts b/src/lib/ae_events/ae_events__event_device.ts index 70434715..4e9e7c57 100644 --- a/src/lib/ae_events/ae_events__event_device.ts +++ b/src/lib/ae_events/ae_events__event_device.ts @@ -1,680 +1,678 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_events } from "$lib/ae_events/db_events"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_events } from '$lib/ae_events/db_events'; import { load_ae_obj_id__event_location } from './ae_events__event_location'; -let ae_promises: key_val = {}; - +const ae_promises: key_val = {}; // Updated 2025-05-23 -export async function load_ae_obj_id__event_device( - { - api_cfg, - event_device_id, - inc_location_id = false, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_device_id: string, - inc_location_id?: boolean, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__event_device() *** event_device_id=${event_device_id}`); - } +export async function load_ae_obj_id__event_device({ + api_cfg, + event_device_id, + inc_location_id = false, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_device_id: string; + inc_location_id?: boolean; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__event_device() *** event_device_id=${event_device_id}`); + } - let params = {}; + const params = {}; - ae_promises.load__event_device_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_device', - obj_id: event_device_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - params: params, - log_lvl: log_lvl - }) - .then(async function (event_device_obj_get_result) { - if (event_device_obj_get_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_device_props({ - obj_li: [event_device_obj_get_result], - log_lvl - }); - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'device', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__event_device_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_device', + obj_id: event_device_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + params: params, + log_lvl: log_lvl + }) + .then(async function (event_device_obj_get_result) { + if (event_device_obj_get_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_device_props({ + obj_li: [event_device_obj_get_result], + log_lvl + }); + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'device', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__event_device({ - // obj_type: 'event_device', - // obj_li: [event_device_obj_get_result] - // }); - } - return event_device_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // // This is expecting a list + // db_save_ae_obj_li__event_device({ + // obj_type: 'event_device', + // obj_li: [event_device_obj_get_result] + // }); + } + return event_device_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_device_obj:', ae_promises.load__event_device_obj); - } + if (log_lvl) { + console.log('ae_promises.load__event_device_obj:', ae_promises.load__event_device_obj); + } - if (inc_location_id) { - // Load the location linked to this device - if (log_lvl) { - console.log(`Need to load the location id for the device now`); - } - let load_event_location_obj_id = load_ae_obj_id__event_location({ - api_cfg: api_cfg, - event_location_id: ae_promises.load__event_device_obj.event_location_id, - try_cache: try_cache, - log_lvl: log_lvl - }); + if (inc_location_id) { + // Load the location linked to this device + if (log_lvl) { + console.log(`Need to load the location id for the device now`); + } + const load_event_location_obj_id = load_ae_obj_id__event_location({ + api_cfg: api_cfg, + event_location_id: ae_promises.load__event_device_obj.event_location_id, + try_cache: try_cache, + log_lvl: log_lvl + }); - if (log_lvl) { - console.log(`load_event_location_obj_id = `, load_event_location_obj_id); - } - ae_promises.load__event_device_obj.event_location_obj = load_event_location_obj_id; - } + if (log_lvl) { + console.log(`load_event_location_obj_id = `, load_event_location_obj_id); + } + ae_promises.load__event_device_obj.event_location_obj = load_event_location_obj_id; + } - return ae_promises.load__event_device_obj; + return ae_promises.load__event_device_obj; } - // Updated 2025-05-23 -export async function load_ae_obj_li__event_device( - { - api_cfg, - for_obj_type, - for_obj_id, - inc_location_id = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 49, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'code': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - inc_location_id?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, // 99 - offset?: number, // 0 - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__event_device() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__event_device({ + api_cfg, + for_obj_type, + for_obj_id, + inc_location_id = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 49, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + name: 'ASC', + code: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + inc_location_id?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; // 99 + offset?: number; // 0 + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__event_device() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'all'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 99); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'all'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 99); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - ae_promises.load__event_device_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_device', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: true, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_device_obj_li_get_result) { - if (event_device_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_device_props({ - obj_li: event_device_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'device', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__event_device_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_device', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: true, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_device_obj_li_get_result) { + if (event_device_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_device_props({ + obj_li: event_device_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'device', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_device({ - // obj_type: 'event_device', - // obj_li: event_device_obj_li_get_result - // }); - } - return event_device_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // db_save_ae_obj_li__event_device({ + // obj_type: 'event_device', + // obj_li: event_device_obj_li_get_result + // }); + } + return event_device_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_device_obj_li:', ae_promises.load__event_device_obj_li); - } + if (log_lvl) { + console.log('ae_promises.load__event_device_obj_li:', ae_promises.load__event_device_obj_li); + } - if (inc_location_id) { - // Load the location for the devices - if (log_lvl) { - console.log(`Need to load the location list for each device now`); - } - for (let i = 0; i < ae_promises.load__event_device_obj_li.length; i++) { - let event_device_obj = ae_promises.load__event_device_obj_li[i]; + if (inc_location_id) { + // Load the location for the devices + if (log_lvl) { + console.log(`Need to load the location list for each device now`); + } + for (let i = 0; i < ae_promises.load__event_device_obj_li.length; i++) { + const event_device_obj = ae_promises.load__event_device_obj_li[i]; - let load_event_location_obj_li = load_ae_obj_id__event_location({ - api_cfg: api_cfg, - event_location_id: event_device_obj.event_location_id, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_location_obj_li) => { - if (log_lvl) { - console.log(`event_location_obj_li = `, event_location_obj_li); - } - return event_location_obj_li; - }); + const load_event_location_obj_li = load_ae_obj_id__event_location({ + api_cfg: api_cfg, + event_location_id: event_device_obj.event_location_id, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_location_obj_li) => { + if (log_lvl) { + console.log(`event_location_obj_li = `, event_location_obj_li); + } + return event_location_obj_li; + }); - if (log_lvl) { - console.log(`load_event_location_obj_li = `, load_event_location_obj_li); - } - } - } + if (log_lvl) { + console.log(`load_event_location_obj_li = `, load_event_location_obj_li); + } + } + } - return ae_promises.load__event_device_obj_li; + return ae_promises.load__event_device_obj_li; } - // Updated 2025-05-23 -export async function create_ae_obj__event_device( - { - api_cfg, - event_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__event_device() *** event_id=${event_id}`); - } +export async function create_ae_obj__event_device({ + api_cfg, + event_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__event_device() *** event_id=${event_id}`); + } - ae_promises.create__event_device = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'event_device', - fields: { - event_id_random: event_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_device_obj_create_result) { - if (event_device_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_device_props({ - obj_li: [event_device_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'device', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__event_device = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'event_device', + fields: { + event_id_random: event_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_device_obj_create_result) { + if (event_device_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_device_props({ + obj_li: [event_device_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'device', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_device( - // { - // obj_type: 'event_device', - // obj_li: [event_device_obj_create_result] - // }); - } - return event_device_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_device( + // { + // obj_type: 'event_device', + // obj_li: [event_device_obj_create_result] + // }); + } + return event_device_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__event_device:', ae_promises.create__event_device); - } - return ae_promises.create__event_device; + if (log_lvl) { + console.log('ae_promises.create__event_device:', ae_promises.create__event_device); + } + return ae_promises.create__event_device; } - // Updated 2025-05-23 -export async function delete_ae_obj_id__event_device( - { - api_cfg, - event_device_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_device_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__event_device() *** event_device_id=${event_device_id}`); - } +export async function delete_ae_obj_id__event_device({ + api_cfg, + event_device_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_device_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__event_device() *** event_device_id=${event_device_id}`); + } - ae_promises.delete__event_device_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_device', - obj_id: event_device_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for event_device_id=${event_device_id}`); - } - db_events.device.delete(event_device_id); - } - }); + ae_promises.delete__event_device_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_device', + obj_id: event_device_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for event_device_id=${event_device_id}`); + } + db_events.device.delete(event_device_id); + } + }); - if (log_lvl) { - console.log('ae_promises.delete__event_device_obj:', ae_promises.delete__event_device_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__event_device_obj:', ae_promises.delete__event_device_obj); + } - return ae_promises.delete__event_device_obj; + return ae_promises.delete__event_device_obj; } - // Updated 2024-10-16 -export async function update_ae_obj__event_device( - { - api_cfg, - event_device_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_device_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__event_device() *** event_device_id=${event_device_id}`, data_kv); - } - ae_promises.update__event_device_obj = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_device', - obj_id: event_device_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_device_obj_update_result) { - if (event_device_obj_update_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_device_props({ - obj_li: [event_device_obj_update_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'device', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } +export async function update_ae_obj__event_device({ + api_cfg, + event_device_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_device_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj__event_device() *** event_device_id=${event_device_id}`, + data_kv + ); + } + ae_promises.update__event_device_obj = await api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_device', + obj_id: event_device_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_device_obj_update_result) { + if (event_device_obj_update_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_device_props({ + obj_li: [event_device_obj_update_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'device', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_device({ - // obj_type: 'event_device', obj_li: [event_device_obj_update_result] - // }); - } - return event_device_obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_device({ + // obj_type: 'event_device', obj_li: [event_device_obj_update_result] + // }); + } + return event_device_obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.update__event_device_obj:', ae_promises.update__event_device_obj); - } - return ae_promises.update__event_device_obj; + if (log_lvl) { + console.log('ae_promises.update__event_device_obj:', ae_promises.update__event_device_obj); + } + return ae_promises.update__event_device_obj; } - // Not yet used or tested fully! // Updated 2025-05-23 -export async function search__event_device( - { - api_cfg, - event_id, - fulltext_search_qry_str, - ft_presenter_search_qry_str, - like_search_qry_str = null, - like_presentation_search_qry_str = null, - like_presenter_search_qry_str = null, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: any, - fulltext_search_qry_str?: null|string, - ft_presenter_search_qry_str?: null|string, - like_search_qry_str?: null|string, - like_presentation_search_qry_str?: null|string, - like_presenter_search_qry_str?: null|string, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** search__event_device() *** event_id=${event_id}`); - } +export async function search__event_device({ + api_cfg, + event_id, + fulltext_search_qry_str, + ft_presenter_search_qry_str, + like_search_qry_str = null, + like_presentation_search_qry_str = null, + like_presenter_search_qry_str = null, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: any; + fulltext_search_qry_str?: null | string; + ft_presenter_search_qry_str?: null | string; + like_search_qry_str?: null | string; + like_presentation_search_qry_str?: null | string; + like_presenter_search_qry_str?: null | string; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** search__event_device() *** event_id=${event_id}`); + } - let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - let limit: number = (params.qry__limit ?? 25); // 99 - let offset: number = (params.qry__offset ?? 0); // 0 + const enabled: string = params.qry__enabled ?? 'enabled'; // all, disabled, enabled + const hidden: string = params.qry__hidden ?? 'not_hidden'; // all, hidden, not_hidden + const limit: number = params.qry__limit ?? 25; // 99 + const offset: number = params.qry__offset ?? 0; // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - if (!fulltext_search_qry_str && !like_search_qry_str) { - console.log('No search string provided!!!'); - return false; // Returning false instead of [] because no search was performed. - } + if (!fulltext_search_qry_str && !like_search_qry_str) { + console.log('No search string provided!!!'); + return false; // Returning false instead of [] because no search was performed. + } - if (fulltext_search_qry_str || ft_presenter_search_qry_str) { - params_json['ft_qry'] = {}; - if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { - params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; - } + if (fulltext_search_qry_str || ft_presenter_search_qry_str) { + params_json['ft_qry'] = {}; + if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { + params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; + } - if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2) { - params_json['ft_qry']['event_presenter_li_qry_str'] = ft_presenter_search_qry_str; - } - } + if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2) { + params_json['ft_qry']['event_presenter_li_qry_str'] = ft_presenter_search_qry_str; + } + } - // Use the AND (AND LIKE) query - // if (like_search_qry_str || like_presenter_search_qry_str) { - // params_json['and_like'] = {}; - // if (like_search_qry_str && like_search_qry_str.length > 2) { - // params_json['and_like']['default_qry_str'] = like_search_qry_str; - // } - // if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { - // params_json['and_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; - // } - // } + // Use the AND (AND LIKE) query + // if (like_search_qry_str || like_presenter_search_qry_str) { + // params_json['and_like'] = {}; + // if (like_search_qry_str && like_search_qry_str.length > 2) { + // params_json['and_like']['default_qry_str'] = like_search_qry_str; + // } + // if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { + // params_json['and_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; + // } + // } - // Use the AND (OR LIKE) query - if (like_search_qry_str || like_presentation_search_qry_str || like_presenter_search_qry_str) { - params_json['or_like'] = {}; - if (like_search_qry_str && like_search_qry_str.length > 2) { - params_json['or_like']['default_qry_str'] = like_search_qry_str; - } - if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { - params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; - } - if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { - params_json['or_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; - } - } + // Use the AND (OR LIKE) query + if (like_search_qry_str || like_presentation_search_qry_str || like_presenter_search_qry_str) { + params_json['or_like'] = {}; + if (like_search_qry_str && like_search_qry_str.length > 2) { + params_json['or_like']['default_qry_str'] = like_search_qry_str; + } + if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { + params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; + } + if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { + params_json['or_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; + } + } - params_json['and_qry'] = {}; + params_json['and_qry'] = {}; - // if (device_type_code) { - // params_json['and_qry']['device_type_code'] = device_type_code; - // } + // if (device_type_code) { + // params_json['and_qry']['device_type_code'] = device_type_code; + // } - let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}; + const order_by_li = { + priority: 'DESC', + sort: 'DESC', + start_datetime: 'ASC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }; - // ae_promises.load__event_device_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_device_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_device', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for device searching - // use_alt_mdl: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_device_obj_li_get_result) { - if (event_device_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_device_props({ - obj_li: event_device_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'device', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return event_device_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // ae_promises.load__event_device_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_device_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_device', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for device searching + // use_alt_mdl: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_device_obj_li_get_result) { + if (event_device_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_device_props({ + obj_li: event_device_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'device', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return event_device_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.load__event_device_obj_li:', ae_promises.load__event_device_obj_li); - } - return ae_promises.load__event_device_obj_li; + if (log_lvl) { + console.log('ae_promises.load__event_device_obj_li:', ae_promises.load__event_device_obj_li); + } + return ae_promises.load__event_device_obj_li; } - - - - // Updated 2025-05-23 export const properties_to_save = [ - 'id', - 'event_device_id', - // 'event_device_id_random', + 'id', + 'event_device_id', + // 'event_device_id_random', - 'event_id', - // 'event_id_random', - 'event_location_id', - // 'event_location_id_random', + 'event_id', + // 'event_id_random', + 'event_location_id', + // 'event_location_id_random', - 'code', - 'name', - 'description', + 'code', + 'name', + 'description', - 'passcode', + 'passcode', - 'local_file_cache_path', - 'host_file_temp_path', - 'recording_path', + 'local_file_cache_path', + 'host_file_temp_path', + 'recording_path', - 'record_audio', - 'record_video', + 'record_audio', + 'record_video', - 'trigger_open_file_id', - 'trigger_open_session_id', - 'trigger_recording_start', - 'trigger_recording_stop', - 'trigger_reset', - 'trigger_show_admin', - 'trigger_show_hidden', + 'trigger_open_file_id', + 'trigger_open_session_id', + 'trigger_recording_start', + 'trigger_recording_stop', + 'trigger_reset', + 'trigger_show_admin', + 'trigger_show_hidden', - 'alert', - 'alert_msg', - 'alert_on', - 'status', - 'status_msg', - 'status_on', - 'record_status', - 'record_status_msg', - 'record_status_on', - 'heartbeat', + 'alert', + 'alert_msg', + 'alert_on', + 'status', + 'status_msg', + 'status_on', + 'record_status', + 'record_status_msg', + 'record_status_on', + 'heartbeat', - 'info_hostname', - 'info_ip_list', + 'info_hostname', + 'info_ip_list', - 'meta_json', - 'other_json', + 'meta_json', + 'other_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - 'event_name', - 'event_location_code', - 'event_location_name', + // From SQL view + 'event_name', + 'event_location_code', + 'event_location_name' ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -743,7 +741,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-05-23 export async function process_ae_obj__event_device_props({ obj_li, diff --git a/src/lib/ae_events/ae_events__event_file.ts b/src/lib/ae_events/ae_events__event_file.ts index ba8f1cfa..b7e41f8e 100644 --- a/src/lib/ae_events/ae_events__event_file.ts +++ b/src/lib/ae_events/ae_events__event_file.ts @@ -1,760 +1,759 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_events } from "$lib/ae_events/db_events"; - -let ae_promises: key_val = {}; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_events } from '$lib/ae_events/db_events'; +const ae_promises: key_val = {}; // Updated 2025-07-21 -export async function load_ae_obj_id__event_file( - { - api_cfg, - event_file_id, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - event_file_id: string, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__event_file() *** event_file_id=${event_file_id}`); - } +export async function load_ae_obj_id__event_file({ + api_cfg, + event_file_id, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + event_file_id: string; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__event_file() *** event_file_id=${event_file_id}`); + } - let params = {}; + const params = {}; - ae_promises.load__event_file_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_file', - obj_id: event_file_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value - params: params, - log_lvl: log_lvl - }) - .then(async function (event_file_obj_get_result) { - if (event_file_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_file_props({ - obj_li: [event_file_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'file', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__event_file_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_file', + obj_id: event_file_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value + params: params, + log_lvl: log_lvl + }) + .then(async function (event_file_obj_get_result) { + if (event_file_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_file_props({ + obj_li: [event_file_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'file', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // This is expecting a list - // db_save_ae_obj_li__event_file({obj_type: 'event_file', obj_li: [event_file_obj_get_result]}); - } - return event_file_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // This is expecting a list + // db_save_ae_obj_li__event_file({obj_type: 'event_file', obj_li: [event_file_obj_get_result]}); + } + return event_file_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - return ae_promises.load__event_file_obj; + return ae_promises.load__event_file_obj; } - // Updated 2025-07-21 -export async function load_ae_obj_li__event_file( - { - api_cfg, - for_obj_type, - for_obj_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, // 99 - offset?: number, // 0 - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__event_file() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__event_file({ + api_cfg, + for_obj_type, + for_obj_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { priority: 'DESC', sort: 'DESC', updated_on: 'DESC', created_on: 'DESC' }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; // 99 + offset?: number; // 0 + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__event_file() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - // Check if for_obj_type is in the list of valid Aether object types: - let valid_for_obj_types = ['event', 'event_session', 'event_presentation', 'event_presenter', 'event_location', 'event_badge', 'event_device']; - if (!valid_for_obj_types.includes(for_obj_type)) { - console.log(`Invalid for_obj_type: ${for_obj_type}`); - return []; - } + // Check if for_obj_type is in the list of valid Aether object types: + const valid_for_obj_types = [ + 'event', + 'event_session', + 'event_presentation', + 'event_presenter', + 'event_location', + 'event_badge', + 'event_device' + ]; + if (!valid_for_obj_types.includes(for_obj_type)) { + console.log(`Invalid for_obj_type: ${for_obj_type}`); + return []; + } - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - ae_promises.load__event_file_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_file', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_file_obj_li_get_result) { - if (event_file_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_file_props({ - obj_li: event_file_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'file', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__event_file_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_file', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_file_obj_li_get_result) { + if (event_file_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_file_props({ + obj_li: event_file_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'file', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_file({obj_type: 'event_file', obj_li: event_file_obj_li_get_result}); - } - return event_file_obj_li_get_result; - } else { - console.log('No results returned.'); - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // db_save_ae_obj_li__event_file({obj_type: 'event_file', obj_li: event_file_obj_li_get_result}); + } + return event_file_obj_li_get_result; + } else { + console.log('No results returned.'); + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_file_obj_li:', ae_promises.load__event_file_obj_li); - } - return ae_promises.load__event_file_obj_li; + if (log_lvl) { + console.log('ae_promises.load__event_file_obj_li:', ae_promises.load__event_file_obj_li); + } + return ae_promises.load__event_file_obj_li; } - // Updated 2025-07-21 // This may need to be reviewed again??? -export async function create_event_file_obj_from_hosted_file_async( - { - api_cfg, - hosted_file_id, - params = {}, - data = {}, - return_obj = false, - inc_hosted_file = false, - return_meta = false, - log_lvl = 0 - }: { - api_cfg: any, - hosted_file_id: string, - params?: key_val, - data?: key_val, - return_obj?: boolean, - inc_hosted_file?: boolean, - return_meta?: boolean, - log_lvl?: number - } +export async function create_event_file_obj_from_hosted_file_async({ + api_cfg, + hosted_file_id, + params = {}, + data = {}, + return_obj = false, + inc_hosted_file = false, + return_meta = false, + log_lvl = 0 +}: { + api_cfg: any; + hosted_file_id: string; + params?: key_val; + data?: key_val; + return_obj?: boolean; + inc_hosted_file?: boolean; + return_meta?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** create_event_file_obj_from_hosted_file_async() *** hosted_file_id=${hosted_file_id}` + ); + } - ) { - if (log_lvl) { - console.log(`*** create_event_file_obj_from_hosted_file_async() *** hosted_file_id=${hosted_file_id}`); - } + if (!hosted_file_id) { + console.log(`ERROR: Events Launcher - Event File - hosted_file_id required to create`); + return false; + } - if (!hosted_file_id) { - console.log(`ERROR: Events Launcher - Event File - hosted_file_id required to create`); - return false; - } - - let endpoint = `/event/file/from_hosted_file/${hosted_file_id}`; - if (return_obj) { - params['return_obj'] = true; - } - if (inc_hosted_file) { - params['inc_hosted_file'] = true; - } - let event_file_obj_post_promise = await api.post_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - data: data, - // return_obj: return_obj, - return_meta: return_meta, - log_lvl: log_lvl - }) - .then(function (result) { - console.log('POST DONE create_event_file_obj_from_hosted_file'); - console.log(result); - return result; - }) - .catch(function (error: any) { - console.log(error); - return false; // Returning false since something may have gone wrong. Also more in line with what the API returns. - // return error; - }); - - // console.log(event_file_obj_post_promise); - if (return_obj) { - return event_file_obj_post_promise; - } else { - return event_file_obj_post_promise.event_file_id_random; - } + const endpoint = `/event/file/from_hosted_file/${hosted_file_id}`; + if (return_obj) { + params['return_obj'] = true; + } + if (inc_hosted_file) { + params['inc_hosted_file'] = true; + } + const event_file_obj_post_promise = await api + .post_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + data: data, + // return_obj: return_obj, + return_meta: return_meta, + log_lvl: log_lvl + }) + .then(function (result) { + console.log('POST DONE create_event_file_obj_from_hosted_file'); + console.log(result); + return result; + }) + .catch(function (error: any) { + console.log(error); + return false; // Returning false since something may have gone wrong. Also more in line with what the API returns. + // return error; + }); + // console.log(event_file_obj_post_promise); + if (return_obj) { + return event_file_obj_post_promise; + } else { + return event_file_obj_post_promise.event_file_id_random; + } } - // Updated 2025-07-21 -export async function delete_ae_obj_id__event_file( - { - api_cfg, - event_file_id, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_file_id: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__event_file() *** event_file_id=${event_file_id}`); - } +export async function delete_ae_obj_id__event_file({ + api_cfg, + event_file_id, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_file_id: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__event_file() *** event_file_id=${event_file_id}`); + } - const endpoint = `/event/file/${event_file_id}/v2`; + const endpoint = `/event/file/${event_file_id}/v2`; - params['delete_hosted_file'] = true; // This does not actually delete the hosted file from the server. - params['rm_orphan'] = true; // This is what actually allows the hosted file to be deleted from the server. + params['delete_hosted_file'] = true; // This does not actually delete the hosted file from the server. + params['rm_orphan'] = true; // This is what actually allows the hosted file to be deleted from the server. - ae_promises.delete__event_file_obj = await api.delete_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - // return_meta: return_meta, - log_lvl: log_lvl - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for event_file_id=${event_file_id}`); - } - db_events.file.delete(event_file_id); // Delete from the DB no matter what. - } - }); + ae_promises.delete__event_file_obj = await api + .delete_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + // return_meta: return_meta, + log_lvl: log_lvl + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for event_file_id=${event_file_id}`); + } + db_events.file.delete(event_file_id); // Delete from the DB no matter what. + } + }); - if (log_lvl) { - console.log('ae_promises.delete__event_file_obj:', ae_promises.delete__event_file_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__event_file_obj:', ae_promises.delete__event_file_obj); + } - return ae_promises.delete__event_file_obj; + return ae_promises.delete__event_file_obj; } - // Updated 2025-07-21 -export async function update_ae_obj__event_file( - { - api_cfg, - event_file_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_file_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__event_file() *** event_file_id=${event_file_id}`); - } +export async function update_ae_obj__event_file({ + api_cfg, + event_file_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_file_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** update_ae_obj__event_file() *** event_file_id=${event_file_id}`); + } - // Perform the API update - const result = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_file', - obj_id: event_file_id, // NOTE: This is the FQDN, not normally the ID. - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - // Handle the result - if (result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_file_props({ - obj_li: [result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'file', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // Perform the API update + const result = await api.update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_file', + obj_id: event_file_id, // NOTE: This is the FQDN, not normally the ID. + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }); + // Handle the result + if (result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_file_props({ + obj_li: [result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'file', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__event_file({ - // obj_type: 'event_file', - // obj_li: [result], - // log_lvl: log_lvl, - // }); - } - return result; - } else { - console.error('Failed to update event file.'); - return null; - } + // await db_save_ae_obj_li__event_file({ + // obj_type: 'event_file', + // obj_li: [result], + // log_lvl: log_lvl, + // }); + } + return result; + } else { + console.error('Failed to update event file.'); + return null; + } } - // This new function is using CRUD v2. This should allow for more flexibility in the queries. // Updated 2025-07-21 -export async function qry__event_file( - { - api_cfg, - event_id, - qry_created_on = null, // Example greater than: '2024-10-24' - qry_min_file_size = null, - qry_file_purpose = null, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 49, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'created_on': 'DESC', 'updated_on': 'DESC', 'filename': 'ASC', 'extension': 'ASC', 'hosted_file_size': 'ASC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: any, - qry_created_on?: null|string, - qry_min_file_size?: null|number, - qry_file_purpose?: null|string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** qry__event_file() *** event_id=${event_id}`); - } +export async function qry__event_file({ + api_cfg, + event_id, + qry_created_on = null, // Example greater than: '2024-10-24' + qry_min_file_size = null, + qry_file_purpose = null, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 49, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + created_on: 'DESC', + updated_on: 'DESC', + filename: 'ASC', + extension: 'ASC', + hosted_file_size: 'ASC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: any; + qry_created_on?: null | string; + qry_min_file_size?: null | number; + qry_file_purpose?: null | string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** qry__event_file() *** event_id=${event_id}`); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - params_json['qry'] = []; + params_json['qry'] = []; - if (qry_created_on) { - let qry_param = - { - type: "AND", - field: "created_on", - operator: ">", - value: qry_created_on - }; - params_json['qry'].push(qry_param); - } + if (qry_created_on) { + const qry_param = { + type: 'AND', + field: 'created_on', + operator: '>', + value: qry_created_on + }; + params_json['qry'].push(qry_param); + } - if (qry_min_file_size) { - // console.log('qry_min_file_size:', qry_min_file_size); - let qry_param = - { - type: "AND", - field: "hosted_file_size", - operator: ">", - value: qry_min_file_size - }; - params_json['qry'].push(qry_param); - } + if (qry_min_file_size) { + // console.log('qry_min_file_size:', qry_min_file_size); + const qry_param = { + type: 'AND', + field: 'hosted_file_size', + operator: '>', + value: qry_min_file_size + }; + params_json['qry'].push(qry_param); + } - if (qry_file_purpose) { - let qry_param = - { - type: "AND", - field: "file_purpose", - operator: "=", - value: qry_file_purpose - }; - params_json['qry'].push(qry_param); - } + if (qry_file_purpose) { + const qry_param = { + type: 'AND', + field: 'file_purpose', + operator: '=', + value: qry_file_purpose + }; + params_json['qry'].push(qry_param); + } - // if (!limit || limit <= 0) { - // limit = null; - // } + // if (!limit || limit <= 0) { + // limit = null; + // } - if (log_lvl) { - console.log('params_json:', params_json); - } + if (log_lvl) { + console.log('params_json:', params_json); + } - ae_promises.load__event_file_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_file', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for file searching? - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(function (event_file_obj_li_get_result) { - if (event_file_obj_li_get_result) { - if (try_cache) { - // Process the results first - process_ae_obj__event_file_props({ - obj_li: event_file_obj_li_get_result, - log_lvl: log_lvl, - }) - .then(async function (processed_obj_li) { - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'file', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - }); - } + ae_promises.load__event_file_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_file', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for file searching? + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(function (event_file_obj_li_get_result) { + if (event_file_obj_li_get_result) { + if (try_cache) { + // Process the results first + process_ae_obj__event_file_props({ + obj_li: event_file_obj_li_get_result, + log_lvl: log_lvl + }).then(async function (processed_obj_li) { + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'file', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + }); + } - // db_save_ae_obj_li__event_file({obj_type: 'event_file', obj_li: event_file_obj_li_get_result}); - return event_file_obj_li_get_result; - } else { - return []; - } - }); + // db_save_ae_obj_li__event_file({obj_type: 'event_file', obj_li: event_file_obj_li_get_result}); + return event_file_obj_li_get_result; + } else { + return []; + } + }); - if (log_lvl) { - console.log('ae_promises.load__event_file_obj_li:', ae_promises.load__event_file_obj_li); - } - return ae_promises.load__event_file_obj_li; + if (log_lvl) { + console.log('ae_promises.load__event_file_obj_li:', ae_promises.load__event_file_obj_li); + } + return ae_promises.load__event_file_obj_li; } - // Updated 2025-07-21 -export async function search__event_file( - { - api_cfg, - event_id, - created_on = null, - min_file_size = null, - fulltext_search_qry_str, - ft_file_search_qry_str, - like_search_qry_str = null, - like_presentation_search_qry_str = null, - like_file_search_qry_str = null, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'created_on': 'DESC', 'updated_on': 'DESC', 'filename': 'ASC', 'extension': 'ASC', 'hosted_file_size': 'ASC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: any, - created_on?: null|string, - min_file_size?: null|number, - fulltext_search_qry_str?: null|string, - ft_file_search_qry_str?: null|string, - like_search_qry_str?: null|string, - like_presentation_search_qry_str?: null|string, - like_file_search_qry_str?: null|string, - order_by_li?: key_val, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** search__event_file() *** event_id=${event_id}`); - } +export async function search__event_file({ + api_cfg, + event_id, + created_on = null, + min_file_size = null, + fulltext_search_qry_str, + ft_file_search_qry_str, + like_search_qry_str = null, + like_presentation_search_qry_str = null, + like_file_search_qry_str = null, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + created_on: 'DESC', + updated_on: 'DESC', + filename: 'ASC', + extension: 'ASC', + hosted_file_size: 'ASC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: any; + created_on?: null | string; + min_file_size?: null | number; + fulltext_search_qry_str?: null | string; + ft_file_search_qry_str?: null | string; + like_search_qry_str?: null | string; + like_presentation_search_qry_str?: null | string; + like_file_search_qry_str?: null | string; + order_by_li?: key_val; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** search__event_file() *** event_id=${event_id}`); + } - let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - let limit: number = (params.qry__limit ?? 25); // 99 - let offset: number = (params.qry__offset ?? 0); // 0 + const enabled: string = params.qry__enabled ?? 'enabled'; // all, disabled, enabled + const hidden: string = params.qry__hidden ?? 'not_hidden'; // all, hidden, not_hidden + const limit: number = params.qry__limit ?? 25; // 99 + const offset: number = params.qry__offset ?? 0; // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // if (!fulltext_search_qry_str && !like_search_qry_str) { - // console.log('No search string provided!!!'); - // return false; // Returning false instead of [] because no search was performed. - // } + // if (!fulltext_search_qry_str && !like_search_qry_str) { + // console.log('No search string provided!!!'); + // return false; // Returning false instead of [] because no search was performed. + // } - if (fulltext_search_qry_str || ft_file_search_qry_str) { - params_json['ft_qry'] = {}; - if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { - params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; - } + if (fulltext_search_qry_str || ft_file_search_qry_str) { + params_json['ft_qry'] = {}; + if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { + params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; + } - if (ft_file_search_qry_str && ft_file_search_qry_str.length > 2) { - params_json['ft_qry']['event_file_li_qry_str'] = ft_file_search_qry_str; - } - } + if (ft_file_search_qry_str && ft_file_search_qry_str.length > 2) { + params_json['ft_qry']['event_file_li_qry_str'] = ft_file_search_qry_str; + } + } - // Use the AND (AND LIKE) query - // if (like_search_qry_str || like_file_search_qry_str) { - // params_json['and_like'] = {}; - // if (like_search_qry_str && like_search_qry_str.length > 2) { - // params_json['and_like']['default_qry_str'] = like_search_qry_str; - // } - // if (like_file_search_qry_str && like_file_search_qry_str.length > 2) { - // params_json['and_like']['event_file_li_qry_str'] = like_file_search_qry_str; - // } - // } + // Use the AND (AND LIKE) query + // if (like_search_qry_str || like_file_search_qry_str) { + // params_json['and_like'] = {}; + // if (like_search_qry_str && like_search_qry_str.length > 2) { + // params_json['and_like']['default_qry_str'] = like_search_qry_str; + // } + // if (like_file_search_qry_str && like_file_search_qry_str.length > 2) { + // params_json['and_like']['event_file_li_qry_str'] = like_file_search_qry_str; + // } + // } - // Use the AND (OR LIKE) query - // if (like_search_qry_str || like_presentation_search_qry_str || like_file_search_qry_str) { - // params_json['or_like'] = {}; - // if (like_search_qry_str && like_search_qry_str.length > 2) { - // params_json['or_like']['default_qry_str'] = like_search_qry_str; - // } - // if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { - // params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; - // } - // if (like_file_search_qry_str && like_file_search_qry_str.length > 2) { - // params_json['or_like']['event_file_li_qry_str'] = like_file_search_qry_str; - // } - // } + // Use the AND (OR LIKE) query + // if (like_search_qry_str || like_presentation_search_qry_str || like_file_search_qry_str) { + // params_json['or_like'] = {}; + // if (like_search_qry_str && like_search_qry_str.length > 2) { + // params_json['or_like']['default_qry_str'] = like_search_qry_str; + // } + // if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { + // params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; + // } + // if (like_file_search_qry_str && like_file_search_qry_str.length > 2) { + // params_json['or_like']['event_file_li_qry_str'] = like_file_search_qry_str; + // } + // } - // params_json['and_qry'] = {}; + // params_json['and_qry'] = {}; - // if (created_on) { - // params_json['and_qry']['created_on'] = created_on; - // } + // if (created_on) { + // params_json['and_qry']['created_on'] = created_on; + // } - if (min_file_size) { - params_json['and_qry'] = {'hosted_file_size': {'>': min_file_size}}; - } + if (min_file_size) { + params_json['and_qry'] = { hosted_file_size: { '>': min_file_size } }; + } - ae_promises.load__event_file_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_file', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_table: true, // NOTE: We want to use the alt table for file searching? - use_alt_base: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_file_obj_li_get_result) { - if (event_file_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_file_props({ - obj_li: event_file_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'file', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__event_file_obj_li = await api + .get_ae_obj_li_for_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_file', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_table: true, // NOTE: We want to use the alt table for file searching? + use_alt_base: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_file_obj_li_get_result) { + if (event_file_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_file_props({ + obj_li: event_file_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'file', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_file({obj_type: 'event_file', obj_li: event_file_obj_li_get_result}); - } - return event_file_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_file({obj_type: 'event_file', obj_li: event_file_obj_li_get_result}); + } + return event_file_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.load__event_file_obj_li:', ae_promises.load__event_file_obj_li); - } - return ae_promises.load__event_file_obj_li; + if (log_lvl) { + console.log('ae_promises.load__event_file_obj_li:', ae_promises.load__event_file_obj_li); + } + return ae_promises.load__event_file_obj_li; } - - - - - - // Updated 2025-05-23 export const properties_to_save = [ - 'id', - // 'id_random', - 'event_file_id', - // 'event_file_id_random', + 'id', + // 'id_random', + 'event_file_id', + // 'event_file_id_random', - 'hosted_file_id', - // 'hosted_file_id_random', - 'hash_sha256', + 'hosted_file_id', + // 'hosted_file_id_random', + 'hash_sha256', - 'for_type', - 'for_id', - // 'for_id_random', + 'for_type', + 'for_id', + // 'for_id_random', - 'event_id', - // 'event_id_random', - 'event_session_id', - // 'event_session_id_random', - 'event_presentation_id', - // 'event_presentation_id_random', - 'event_presenter_id', - // 'event_presenter_id_random', - 'event_location_id', - // 'event_location_id_random', + 'event_id', + // 'event_id_random', + 'event_session_id', + // 'event_session_id_random', + 'event_presentation_id', + // 'event_presentation_id_random', + 'event_presenter_id', + // 'event_presenter_id_random', + 'event_location_id', + // 'event_location_id_random', - 'filename', - 'extension', + 'filename', + 'extension', - 'open_in_os', + 'open_in_os', - 'lu_file_purpose_id', - 'lu_event_file_purpose_name', - 'file_purpose', + 'lu_file_purpose_id', + 'lu_event_file_purpose_name', + 'file_purpose', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + // 'tmp_sort_a', + // 'tmp_sort_b', - 'filename_no_ext', - 'filename_w_ext', - 'hosted_file_content_type', - 'file_size', - 'hosted_file_size', + 'filename_no_ext', + 'filename_w_ext', + 'hosted_file_content_type', + 'file_size', + 'hosted_file_size', - 'event_location_code', - 'event_location_name', - 'event_session_code', - 'event_session_type_code', - 'event_session_name', - 'event_session_start_datetime', - 'event_session_end_datetime', - 'event_presentation_code', - 'event_presentation_type_code', - 'event_presentation_name', - 'event_presentation_start_datetime', - 'event_presentation_end_datetime', - 'event_presenter_given_name', - 'event_presenter_family_name', - 'event_presenter_full_name', - 'event_presenter_email', + 'event_location_code', + 'event_location_name', + 'event_session_code', + 'event_session_type_code', + 'event_session_name', + 'event_session_start_datetime', + 'event_session_end_datetime', + 'event_presentation_code', + 'event_presentation_type_code', + 'event_presentation_name', + 'event_presentation_start_datetime', + 'event_presentation_end_datetime', + 'event_presenter_given_name', + 'event_presenter_family_name', + 'event_presenter_full_name', + 'event_presenter_email' ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -823,7 +822,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-05-23 export async function process_ae_obj__event_file_props({ obj_li, @@ -848,4 +846,4 @@ export async function process_ae_obj__event_file_props({ return obj; } }); -} \ No newline at end of file +} diff --git a/src/lib/ae_events/ae_events__event_location.ts b/src/lib/ae_events/ae_events__event_location.ts index a24f1e93..0c7e5138 100644 --- a/src/lib/ae_events/ae_events__event_location.ts +++ b/src/lib/ae_events/ae_events__event_location.ts @@ -1,762 +1,765 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_events } from "$lib/ae_events/db_events"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_events } from '$lib/ae_events/db_events'; -import { load_ae_obj_li__event_device } from "$lib/ae_events/ae_events__event_device"; -import { load_ae_obj_li__event_file } from "$lib/ae_events/ae_events__event_file"; +import { load_ae_obj_li__event_device } from '$lib/ae_events/ae_events__event_device'; +import { load_ae_obj_li__event_file } from '$lib/ae_events/ae_events__event_file'; import { load_ae_obj_li__event_session } from './ae_events__event_session'; -let ae_promises: key_val = {}; - +const ae_promises: key_val = {}; // Updated 2025-05-23 -export async function load_ae_obj_id__event_location( - { - api_cfg, - event_location_id, - inc_file_li = false, - inc_session_li = false, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_location_id: string, - inc_file_li?: boolean, - inc_session_li?: boolean, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__event_location() *** event_location_id=${event_location_id}`); - } +export async function load_ae_obj_id__event_location({ + api_cfg, + event_location_id, + inc_file_li = false, + inc_session_li = false, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_location_id: string; + inc_file_li?: boolean; + inc_session_li?: boolean; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__event_location() *** event_location_id=${event_location_id}`); + } - let params = {}; + const params = {}; - ae_promises.load__event_location_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_location', - obj_id: event_location_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - params: params, - log_lvl: log_lvl - }) - .then(async function (event_location_obj_get_result) { - if (event_location_obj_get_result) { - if (try_cache) { - let processed_obj_li = await process_ae_obj__event_location_props({ - obj_li: [event_location_obj_get_result], - log_lvl - }); - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'location', - obj_li: processed_obj_li, - properties_to_save, - log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__event_location_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_location', + obj_id: event_location_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + params: params, + log_lvl: log_lvl + }) + .then(async function (event_location_obj_get_result) { + if (event_location_obj_get_result) { + if (try_cache) { + const processed_obj_li = await process_ae_obj__event_location_props({ + obj_li: [event_location_obj_get_result], + log_lvl + }); + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'location', + obj_li: processed_obj_li, + properties_to_save, + log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__event_location({ - // obj_type: 'event_location', - // obj_li: [event_location_obj_get_result] - // }); - } - return event_location_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // // This is expecting a list + // db_save_ae_obj_li__event_location({ + // obj_type: 'event_location', + // obj_li: [event_location_obj_get_result] + // }); + } + return event_location_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_location_obj:', ae_promises.load__event_location_obj); - } + if (log_lvl) { + console.log('ae_promises.load__event_location_obj:', ae_promises.load__event_location_obj); + } - if (ae_promises?.load__event_location_obj === null) { - console.log('No results returned.'); - return null; - } + if (ae_promises?.load__event_location_obj === null) { + console.log('No results returned.'); + return null; + } - if (inc_file_li) { - // Load the files for the location - if (log_lvl) { - console.log(`Need to load the file list for the location now`); - } - let load_event_file_obj_li = load_ae_obj_li__event_file({ - api_cfg: api_cfg, - for_obj_type: 'event_location', - for_obj_id: event_location_id, - enabled: 'all', - limit: 15, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); + if (inc_file_li) { + // Load the files for the location + if (log_lvl) { + console.log(`Need to load the file list for the location now`); + } + const load_event_file_obj_li = load_ae_obj_li__event_file({ + api_cfg: api_cfg, + for_obj_type: 'event_location', + for_obj_id: event_location_id, + enabled: 'all', + limit: 15, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); - if (log_lvl) { - console.log(`load_event_file_obj_li = `, load_event_file_obj_li); - } - ae_promises.load__event_location_obj.event_file_li = load_event_file_obj_li; - } + if (log_lvl) { + console.log(`load_event_file_obj_li = `, load_event_file_obj_li); + } + ae_promises.load__event_location_obj.event_file_li = load_event_file_obj_li; + } - if (inc_session_li) { - // Load the sessions for the location - if (log_lvl) { - console.log(`Need to load the session list for the location now`); - } - let load_event_session_obj_li = load_ae_obj_li__event_session({ - api_cfg: api_cfg, - for_obj_type: 'event_location', - for_obj_id: event_location_id, - enabled: 'all', - limit: 15, - try_cache: try_cache, - log_lvl: log_lvl - }); + if (inc_session_li) { + // Load the sessions for the location + if (log_lvl) { + console.log(`Need to load the session list for the location now`); + } + const load_event_session_obj_li = load_ae_obj_li__event_session({ + api_cfg: api_cfg, + for_obj_type: 'event_location', + for_obj_id: event_location_id, + enabled: 'all', + limit: 15, + try_cache: try_cache, + log_lvl: log_lvl + }); - if (log_lvl) { - console.log(`load_event_session_obj_li = `, load_event_session_obj_li); - } - ae_promises.load__event_location_obj.event_session_li = load_event_session_obj_li; - } + if (log_lvl) { + console.log(`load_event_session_obj_li = `, load_event_session_obj_li); + } + ae_promises.load__event_location_obj.event_session_li = load_event_session_obj_li; + } - return ae_promises.load__event_location_obj; + return ae_promises.load__event_location_obj; } - // Updated 2025-05-23 -export async function load_ae_obj_li__event_location( - { - api_cfg, - for_obj_type, - for_obj_id, - inc_device_li = false, - inc_file_li = false, - inc_session_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 29, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'code': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - inc_device_li?: boolean, - inc_file_li?: boolean, - inc_session_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, // 99 - offset?: number, // 0 - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__event_location() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__event_location({ + api_cfg, + for_obj_type, + for_obj_id, + inc_device_li = false, + inc_file_li = false, + inc_session_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 29, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + name: 'ASC', + code: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + inc_device_li?: boolean; + inc_file_li?: boolean; + inc_session_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; // 99 + offset?: number; // 0 + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__event_location() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - // ae_promises.load__event_location_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_location_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_location', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_location_obj_li_get_result) { - if (event_location_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_location_props({ - obj_li: event_location_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'location', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // ae_promises.load__event_location_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_location_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_location', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_location_obj_li_get_result) { + if (event_location_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_location_props({ + obj_li: event_location_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'location', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_location({ - // obj_type: 'event_location', - // obj_li: event_location_obj_li_get_result - // }); - } - return event_location_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // db_save_ae_obj_li__event_location({ + // obj_type: 'event_location', + // obj_li: event_location_obj_li_get_result + // }); + } + return event_location_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_location_obj_li:', ae_promises.load__event_location_obj_li); - } + if (log_lvl) { + console.log( + 'ae_promises.load__event_location_obj_li:', + ae_promises.load__event_location_obj_li + ); + } - if (inc_device_li) { - // Load the devices for the locations - if (log_lvl) { - console.log(`Need to load the device list for each location now`); - } - for (let i = 0; i < ae_promises.load__event_location_obj_li.length; i++) { - let event_location_obj = ae_promises.load__event_location_obj_li[i]; - let event_location_id = event_location_obj.event_location_id_random; + if (inc_device_li) { + // Load the devices for the locations + if (log_lvl) { + console.log(`Need to load the device list for each location now`); + } + for (let i = 0; i < ae_promises.load__event_location_obj_li.length; i++) { + const event_location_obj = ae_promises.load__event_location_obj_li[i]; + const event_location_id = event_location_obj.event_location_id_random; - let load_event_device_obj_li = load_ae_obj_li__event_device({ - api_cfg: api_cfg, - for_obj_type: 'event_location', - for_obj_id: event_location_id, - params: {qry__enabled: enabled, qry__limit: limit}, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_device_obj_li) => { - if (log_lvl) { - console.log(`event_device_obj_li = `, event_device_obj_li); - } - return event_device_obj_li; - }); + const load_event_device_obj_li = load_ae_obj_li__event_device({ + api_cfg: api_cfg, + for_obj_type: 'event_location', + for_obj_id: event_location_id, + params: { qry__enabled: enabled, qry__limit: limit }, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_device_obj_li) => { + if (log_lvl) { + console.log(`event_device_obj_li = `, event_device_obj_li); + } + return event_device_obj_li; + }); - if (log_lvl) { - console.log(`load_event_device_obj_li = `, load_event_device_obj_li); - } - } - } + if (log_lvl) { + console.log(`load_event_device_obj_li = `, load_event_device_obj_li); + } + } + } - if (inc_file_li) { - // Load the files for the locations - if (log_lvl) { - console.log(`Need to load the file list for each location now`); - } - for (let i = 0; i < ae_promises.load__event_location_obj_li.length; i++) { - let event_location_obj = ae_promises.load__event_location_obj_li[i]; - let event_location_id = event_location_obj.event_location_id_random; + if (inc_file_li) { + // Load the files for the locations + if (log_lvl) { + console.log(`Need to load the file list for each location now`); + } + for (let i = 0; i < ae_promises.load__event_location_obj_li.length; i++) { + const event_location_obj = ae_promises.load__event_location_obj_li[i]; + const event_location_id = event_location_obj.event_location_id_random; - let load_event_file_obj_li = load_ae_obj_li__event_file({ - api_cfg: api_cfg, - for_obj_type: 'event_location', - for_obj_id: event_location_id, - enabled: enabled, - limit: limit, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); + const load_event_file_obj_li = load_ae_obj_li__event_file({ + api_cfg: api_cfg, + for_obj_type: 'event_location', + for_obj_id: event_location_id, + enabled: enabled, + limit: limit, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); - if (log_lvl) { - console.log(`load_event_file_obj_li = `, load_event_file_obj_li); - } - } - } + if (log_lvl) { + console.log(`load_event_file_obj_li = `, load_event_file_obj_li); + } + } + } - if (inc_session_li) { - // Load the sessions for the locations - if (log_lvl) { - console.log(`Need to load the session list for each location now`); - } - for (let i = 0; i < ae_promises.load__event_location_obj_li.length; i++) { - let event_location_obj = ae_promises.load__event_location_obj_li[i]; - let event_location_id = event_location_obj.event_location_id_random; + if (inc_session_li) { + // Load the sessions for the locations + if (log_lvl) { + console.log(`Need to load the session list for each location now`); + } + for (let i = 0; i < ae_promises.load__event_location_obj_li.length; i++) { + const event_location_obj = ae_promises.load__event_location_obj_li[i]; + const event_location_id = event_location_obj.event_location_id_random; - let load_event_session_obj_li = load_ae_obj_li__event_session({ - api_cfg: api_cfg, - for_obj_type: 'event_location', - for_obj_id: event_location_id, - enabled: enabled, - limit: limit, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_session_obj_li) => { - if (log_lvl) { - console.log(`event_session_obj_li = `, event_session_obj_li); - } - return event_session_obj_li; - }); + const load_event_session_obj_li = load_ae_obj_li__event_session({ + api_cfg: api_cfg, + for_obj_type: 'event_location', + for_obj_id: event_location_id, + enabled: enabled, + limit: limit, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_session_obj_li) => { + if (log_lvl) { + console.log(`event_session_obj_li = `, event_session_obj_li); + } + return event_session_obj_li; + }); - if (log_lvl) { - console.log(`load_event_session_obj_li = `, load_event_session_obj_li); - } - } - } + if (log_lvl) { + console.log(`load_event_session_obj_li = `, load_event_session_obj_li); + } + } + } - return ae_promises.load__event_location_obj_li; + return ae_promises.load__event_location_obj_li; } - // Updated 2025-05-23 -export async function create_ae_obj__event_location( - { - api_cfg, - event_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__event_location() *** event_id=${event_id}`); - } +export async function create_ae_obj__event_location({ + api_cfg, + event_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__event_location() *** event_id=${event_id}`); + } - ae_promises.create__event_location = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'event_location', - fields: { - event_id_random: event_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_location_obj_create_result) { - if (event_location_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_location_props({ - obj_li: [event_location_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'location', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__event_location = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'event_location', + fields: { + event_id_random: event_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_location_obj_create_result) { + if (event_location_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_location_props({ + obj_li: [event_location_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'location', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_location( - // { - // obj_type: 'event_location', - // obj_li: [event_location_obj_create_result] - // }); - } - return event_location_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_location( + // { + // obj_type: 'event_location', + // obj_li: [event_location_obj_create_result] + // }); + } + return event_location_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__event_location:', ae_promises.create__event_location); - } - return ae_promises.create__event_location; + if (log_lvl) { + console.log('ae_promises.create__event_location:', ae_promises.create__event_location); + } + return ae_promises.create__event_location; } - // Updated 2025-05-23 -export async function delete_ae_obj_id__event_location( - { - api_cfg, - event_location_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_location_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__event_location() *** event_location_id=${event_location_id}`); - } +export async function delete_ae_obj_id__event_location({ + api_cfg, + event_location_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_location_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** delete_ae_obj_id__event_location() *** event_location_id=${event_location_id}` + ); + } - ae_promises.delete__event_location_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_location', - obj_id: event_location_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for event_location_id=${event_location_id}`); - } - db_events.location.delete(event_location_id); - } - }); + ae_promises.delete__event_location_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_location', + obj_id: event_location_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for event_location_id=${event_location_id}`); + } + db_events.location.delete(event_location_id); + } + }); - if (log_lvl) { - console.log('ae_promises.delete__event_location_obj:', ae_promises.delete__event_location_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__event_location_obj:', ae_promises.delete__event_location_obj); + } - return ae_promises.delete__event_location_obj; + return ae_promises.delete__event_location_obj; } - // Updated 2025-05-23 -export async function update_ae_obj__event_location( - { - api_cfg, - event_location_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_location_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__event_location() *** event_location_id=${event_location_id}`, data_kv); - } - ae_promises.update__event_location_obj = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_location', - obj_id: event_location_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_location_obj_update_result) { - if (event_location_obj_update_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_location_props({ - obj_li: [event_location_obj_update_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'location', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } +export async function update_ae_obj__event_location({ + api_cfg, + event_location_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_location_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj__event_location() *** event_location_id=${event_location_id}`, + data_kv + ); + } + ae_promises.update__event_location_obj = await api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_location', + obj_id: event_location_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_location_obj_update_result) { + if (event_location_obj_update_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_location_props({ + obj_li: [event_location_obj_update_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'location', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_location({ - // obj_type: 'event_location', obj_li: [event_location_obj_update_result] - // }); - } - return event_location_obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_location({ + // obj_type: 'event_location', obj_li: [event_location_obj_update_result] + // }); + } + return event_location_obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.update__event_location_obj:', ae_promises.update__event_location_obj); - } - return ae_promises.update__event_location_obj; + if (log_lvl) { + console.log('ae_promises.update__event_location_obj:', ae_promises.update__event_location_obj); + } + return ae_promises.update__event_location_obj; } - // Updated 2025-05-23 -export async function search__event_location( - { - api_cfg, - event_id, - fulltext_search_qry_str, - ft_presenter_search_qry_str, - like_search_qry_str = null, - like_presentation_search_qry_str = null, - like_presenter_search_qry_str = null, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: any, - fulltext_search_qry_str?: null|string, - ft_presenter_search_qry_str?: null|string, - like_search_qry_str?: null|string, - like_presentation_search_qry_str?: null|string, - like_presenter_search_qry_str?: null|string, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** search__event_location() *** event_id=${event_id}`); - } +export async function search__event_location({ + api_cfg, + event_id, + fulltext_search_qry_str, + ft_presenter_search_qry_str, + like_search_qry_str = null, + like_presentation_search_qry_str = null, + like_presenter_search_qry_str = null, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: any; + fulltext_search_qry_str?: null | string; + ft_presenter_search_qry_str?: null | string; + like_search_qry_str?: null | string; + like_presentation_search_qry_str?: null | string; + like_presenter_search_qry_str?: null | string; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** search__event_location() *** event_id=${event_id}`); + } - let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - let limit: number = (params.qry__limit ?? 25); // 99 - let offset: number = (params.qry__offset ?? 0); // 0 + const enabled: string = params.qry__enabled ?? 'enabled'; // all, disabled, enabled + const hidden: string = params.qry__hidden ?? 'not_hidden'; // all, hidden, not_hidden + const limit: number = params.qry__limit ?? 25; // 99 + const offset: number = params.qry__offset ?? 0; // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - if (!fulltext_search_qry_str && !like_search_qry_str) { - console.log('No search string provided!!!'); - return false; // Returning false instead of [] because no search was performed. - } + if (!fulltext_search_qry_str && !like_search_qry_str) { + console.log('No search string provided!!!'); + return false; // Returning false instead of [] because no search was performed. + } - if (fulltext_search_qry_str || ft_presenter_search_qry_str) { - params_json['ft_qry'] = {}; - if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { - params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; - } + if (fulltext_search_qry_str || ft_presenter_search_qry_str) { + params_json['ft_qry'] = {}; + if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { + params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; + } - if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2) { - params_json['ft_qry']['event_presenter_li_qry_str'] = ft_presenter_search_qry_str; - } - } + if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2) { + params_json['ft_qry']['event_presenter_li_qry_str'] = ft_presenter_search_qry_str; + } + } - // Use the AND (AND LIKE) query - // if (like_search_qry_str || like_presenter_search_qry_str) { - // params_json['and_like'] = {}; - // if (like_search_qry_str && like_search_qry_str.length > 2) { - // params_json['and_like']['default_qry_str'] = like_search_qry_str; - // } - // if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { - // params_json['and_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; - // } - // } + // Use the AND (AND LIKE) query + // if (like_search_qry_str || like_presenter_search_qry_str) { + // params_json['and_like'] = {}; + // if (like_search_qry_str && like_search_qry_str.length > 2) { + // params_json['and_like']['default_qry_str'] = like_search_qry_str; + // } + // if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { + // params_json['and_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; + // } + // } - // Use the AND (OR LIKE) query - if (like_search_qry_str || like_presentation_search_qry_str || like_presenter_search_qry_str) { - params_json['or_like'] = {}; - if (like_search_qry_str && like_search_qry_str.length > 2) { - params_json['or_like']['default_qry_str'] = like_search_qry_str; - } - if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { - params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; - } - if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { - params_json['or_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; - } - } + // Use the AND (OR LIKE) query + if (like_search_qry_str || like_presentation_search_qry_str || like_presenter_search_qry_str) { + params_json['or_like'] = {}; + if (like_search_qry_str && like_search_qry_str.length > 2) { + params_json['or_like']['default_qry_str'] = like_search_qry_str; + } + if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { + params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; + } + if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { + params_json['or_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; + } + } - params_json['and_qry'] = {}; + params_json['and_qry'] = {}; - // if (location_type_code) { - // params_json['and_qry']['location_type_code'] = location_type_code; - // } + // if (location_type_code) { + // params_json['and_qry']['location_type_code'] = location_type_code; + // } - let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}; + const order_by_li = { + priority: 'DESC', + sort: 'DESC', + start_datetime: 'ASC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }; - // ae_promises.load__event_location_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_location_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_location', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for location searching - // use_alt_mdl: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_location_obj_li_get_result) { - if (event_location_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_location_props({ - obj_li: event_location_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'location', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return event_location_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // ae_promises.load__event_location_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_location_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_location', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for location searching + // use_alt_mdl: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_location_obj_li_get_result) { + if (event_location_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_location_props({ + obj_li: event_location_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'location', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return event_location_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.load__event_location_obj_li:', ae_promises.load__event_location_obj_li); - } - return ae_promises.load__event_location_obj_li; + if (log_lvl) { + console.log( + 'ae_promises.load__event_location_obj_li:', + ae_promises.load__event_location_obj_li + ); + } + return ae_promises.load__event_location_obj_li; } - - - - // Updated 2025-05-23 export const properties_to_save = [ - 'id', - 'event_location_id', - // 'event_location_id_random', + 'id', + 'event_location_id', + // 'event_location_id_random', - 'external_id', - 'code', + 'external_id', + 'code', - 'type_code', + 'type_code', - 'event_id', - // 'event_id_random', + 'event_id', + // 'event_id_random', - 'name', - 'description', + 'name', + 'description', - 'passcode', + 'passcode', - 'hide_event_launcher', + 'hide_event_launcher', - 'alert', - 'alert_msg', + 'alert', + 'alert_msg', - 'data_json', + 'data_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - 'file_count', - 'file_count_all', - 'internal_use_count', - 'event_file_id_li_json', + // From SQL view + 'file_count', + 'file_count_all', + 'internal_use_count', + 'event_file_id_li_json', - 'event_name', + 'event_name' ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -825,7 +828,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-05-23 export async function process_ae_obj__event_location_props({ obj_li, diff --git a/src/lib/ae_events/ae_events__event_presentation.ts b/src/lib/ae_events/ae_events__event_presentation.ts index 8f9f3027..43d1b41e 100644 --- a/src/lib/ae_events/ae_events__event_presentation.ts +++ b/src/lib/ae_events/ae_events__event_presentation.ts @@ -1,628 +1,639 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_events } from "$lib/ae_events/db_events"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_events } from '$lib/ae_events/db_events'; -import { load_ae_obj_li__event_file } from "$lib/ae_events/ae_events__event_file"; -import { load_ae_obj_li__event_presenter } from "$lib/ae_events/ae_events__event_presenter"; - -let ae_promises: key_val = {}; +import { load_ae_obj_li__event_file } from '$lib/ae_events/ae_events__event_file'; +import { load_ae_obj_li__event_presenter } from '$lib/ae_events/ae_events__event_presenter'; +const ae_promises: key_val = {}; // Updated 2025-05-22 -export async function load_ae_obj_id__event_presentation( - { - api_cfg, - event_presentation_id, - inc_file_li = false, - inc_presenter_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 49, - offset = 0, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_presentation_id: string, - inc_file_li?: boolean, - inc_presenter_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__event_presentation() *** event_presentation_id=${event_presentation_id}`); - } +export async function load_ae_obj_id__event_presentation({ + api_cfg, + event_presentation_id, + inc_file_li = false, + inc_presenter_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 49, + offset = 0, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_presentation_id: string; + inc_file_li?: boolean; + inc_presenter_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_id__event_presentation() *** event_presentation_id=${event_presentation_id}` + ); + } - let params = {}; + const params = {}; - ae_promises.load__event_presentation_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_presentation', - obj_id: event_presentation_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value - params: params, - log_lvl: log_lvl - }) - .then(async function (event_presentation_obj_get_result) { - if (event_presentation_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_presentation_props({ - obj_li: [event_presentation_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presentation', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__event_presentation_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_presentation', + obj_id: event_presentation_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value + params: params, + log_lvl: log_lvl + }) + .then(async function (event_presentation_obj_get_result) { + if (event_presentation_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_presentation_props({ + obj_li: [event_presentation_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presentation', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__event_presentation({ - // obj_type: 'event_presentation', - // obj_li: [event_presentation_obj_get_result] + // // This is expecting a list + // db_save_ae_obj_li__event_presentation({ + // obj_type: 'event_presentation', + // obj_li: [event_presentation_obj_get_result] - // }); - } - return event_presentation_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // }); + } + return event_presentation_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_presentation_obj:', ae_promises.load__event_presentation_obj); - } + if (log_lvl) { + console.log( + 'ae_promises.load__event_presentation_obj:', + ae_promises.load__event_presentation_obj + ); + } - if (ae_promises?.load__event_presentation_obj === null) { - console.log('No results returned.'); - return null; - } + if (ae_promises?.load__event_presentation_obj === null) { + console.log('No results returned.'); + return null; + } - if (inc_file_li) { - // Load the files for the presentation - if (log_lvl) { - console.log(`Need to load the file list for the presentation now.`); - } - let load_event_file_obj_li = load_ae_obj_li__event_file({ - api_cfg: api_cfg, - for_obj_type: 'event_presentation', - for_obj_id: event_presentation_id, - enabled: 'all', - limit: 25, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); + if (inc_file_li) { + // Load the files for the presentation + if (log_lvl) { + console.log(`Need to load the file list for the presentation now.`); + } + const load_event_file_obj_li = load_ae_obj_li__event_file({ + api_cfg: api_cfg, + for_obj_type: 'event_presentation', + for_obj_id: event_presentation_id, + enabled: 'all', + limit: 25, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); - if (log_lvl) { - console.log(`event_file_obj_li = `, load_event_file_obj_li); - } - ae_promises.load__event_presentation_obj.event_file_li = load_event_file_obj_li; - } + if (log_lvl) { + console.log(`event_file_obj_li = `, load_event_file_obj_li); + } + ae_promises.load__event_presentation_obj.event_file_li = load_event_file_obj_li; + } - if (inc_presenter_li) { - // Load the presenters for the presentation - if (log_lvl) { - console.log(`Need to load the presenter list for the presentation now.`); - } - let load_event_presenter_obj_li = load_ae_obj_li__event_presenter({ - api_cfg: api_cfg, - for_obj_type: 'event_presentation', - for_obj_id: event_presentation_id, - inc_file_li: inc_file_li, - enabled: enabled, - hidden: hidden, - limit: limit, - offset: offset, - // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - // params: params, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_presenter_obj_li) => { - if (log_lvl) { - console.log(`event_presenter_obj_li = `, event_presenter_obj_li); - } - return event_presenter_obj_li; - }); + if (inc_presenter_li) { + // Load the presenters for the presentation + if (log_lvl) { + console.log(`Need to load the presenter list for the presentation now.`); + } + const load_event_presenter_obj_li = load_ae_obj_li__event_presenter({ + api_cfg: api_cfg, + for_obj_type: 'event_presentation', + for_obj_id: event_presentation_id, + inc_file_li: inc_file_li, + enabled: enabled, + hidden: hidden, + limit: limit, + offset: offset, + // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, + // params: params, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_presenter_obj_li) => { + if (log_lvl) { + console.log(`event_presenter_obj_li = `, event_presenter_obj_li); + } + return event_presenter_obj_li; + }); - if (log_lvl) { - console.log(`event_presenter_obj_li = `, load_event_presenter_obj_li); - } - ae_promises.load__event_presentation_obj.event_presenter_li = load_event_presenter_obj_li; - } + if (log_lvl) { + console.log(`event_presenter_obj_li = `, load_event_presenter_obj_li); + } + ae_promises.load__event_presentation_obj.event_presenter_li = load_event_presenter_obj_li; + } - return ae_promises.load__event_presentation_obj; + return ae_promises.load__event_presentation_obj; } - // Updated 2025-05-22 -export async function load_ae_obj_li__event_presentation( - { - api_cfg, - for_obj_type = 'event_session', - for_obj_id, - inc_file_li = false, - inc_presenter_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 49, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - inc_file_li?: boolean, - inc_presenter_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__event_presentation() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__event_presentation({ + api_cfg, + for_obj_type = 'event_session', + for_obj_id, + inc_file_li = false, + inc_presenter_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 49, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + start_datetime: 'ASC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + inc_file_li?: boolean; + inc_presenter_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__event_presentation() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 99); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 99); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // console('params_json:', params_json); + // console('params_json:', params_json); - // ae_promises.load__event_presentation_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_presentation_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_presentation', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_presentation_obj_li_get_result) { - if (event_presentation_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_presentation_props({ - obj_li: event_presentation_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presentation', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // ae_promises.load__event_presentation_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_presentation_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_presentation', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_presentation_obj_li_get_result) { + if (event_presentation_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_presentation_props({ + obj_li: event_presentation_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presentation', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_presentation({ - // obj_type: 'event_presentation', obj_li: event_presentation_obj_li_get_result - // }); - } - return event_presentation_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // db_save_ae_obj_li__event_presentation({ + // obj_type: 'event_presentation', obj_li: event_presentation_obj_li_get_result + // }); + } + return event_presentation_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_presentation_obj_li:', ae_promises.load__event_presentation_obj_li); - } + if (log_lvl) { + console.log( + 'ae_promises.load__event_presentation_obj_li:', + ae_promises.load__event_presentation_obj_li + ); + } - if (inc_file_li) { - // Load the files for the presentations - if (log_lvl) { - console.log(`Need to load the file list for each presentation now.`); - } - for (let i = 0; i < ae_promises.load__event_presentation_obj_li.length; i++) { - let event_presentation_obj = ae_promises.load__event_presentation_obj_li[i]; - let event_presentation_id = event_presentation_obj.event_presentation_id_random; + if (inc_file_li) { + // Load the files for the presentations + if (log_lvl) { + console.log(`Need to load the file list for each presentation now.`); + } + for (let i = 0; i < ae_promises.load__event_presentation_obj_li.length; i++) { + const event_presentation_obj = ae_promises.load__event_presentation_obj_li[i]; + const event_presentation_id = event_presentation_obj.event_presentation_id_random; - let load_event_file_obj_li = load_ae_obj_li__event_file({ - api_cfg: api_cfg, - for_obj_type: 'event_presentation', - for_obj_id: event_presentation_id, - enabled: enabled, - limit: limit, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); + const load_event_file_obj_li = load_ae_obj_li__event_file({ + api_cfg: api_cfg, + for_obj_type: 'event_presentation', + for_obj_id: event_presentation_id, + enabled: enabled, + limit: limit, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); - if (log_lvl) { - console.log(`event_file_obj_li = `, load_event_file_obj_li); - } - // ae_promises.load__event_presentation_obj.event_file_li = load_event_file_obj_li; - } - } + if (log_lvl) { + console.log(`event_file_obj_li = `, load_event_file_obj_li); + } + // ae_promises.load__event_presentation_obj.event_file_li = load_event_file_obj_li; + } + } - if (inc_presenter_li) { - // Load the presenters for the presentations - if (log_lvl) { - console.log(`Need to load the presenter list for each presentation now.`); - } - for (let i = 0; i < ae_promises.load__event_presentation_obj_li.length; i++) { - let event_presentation_obj = ae_promises.load__event_presentation_obj_li[i]; - let event_presentation_id = event_presentation_obj.event_presentation_id_random; + if (inc_presenter_li) { + // Load the presenters for the presentations + if (log_lvl) { + console.log(`Need to load the presenter list for each presentation now.`); + } + for (let i = 0; i < ae_promises.load__event_presentation_obj_li.length; i++) { + const event_presentation_obj = ae_promises.load__event_presentation_obj_li[i]; + const event_presentation_id = event_presentation_obj.event_presentation_id_random; - let load_event_presenter_obj_li = load_ae_obj_li__event_presenter({ - api_cfg: api_cfg, - for_obj_type: 'event_presentation', - for_obj_id: event_presentation_id, - inc_file_li: inc_file_li, - enabled: enabled, - hidden: hidden, - limit: limit, - offset: offset, - // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - // params: {}, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_presenter_obj_li) => { - if (log_lvl) { - console.log(`event_presenter_obj_li = `, event_presenter_obj_li); - } - return event_presenter_obj_li; - }); + const load_event_presenter_obj_li = load_ae_obj_li__event_presenter({ + api_cfg: api_cfg, + for_obj_type: 'event_presentation', + for_obj_id: event_presentation_id, + inc_file_li: inc_file_li, + enabled: enabled, + hidden: hidden, + limit: limit, + offset: offset, + // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, + // params: {}, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_presenter_obj_li) => { + if (log_lvl) { + console.log(`event_presenter_obj_li = `, event_presenter_obj_li); + } + return event_presenter_obj_li; + }); - if (log_lvl) { - console.log(`event_presenter_obj_li = `, load_event_presenter_obj_li); - } - // ae_promises.load__event_presentation_obj.event_presenter_li = load_event_presenter_obj_li; - } - } + if (log_lvl) { + console.log(`event_presenter_obj_li = `, load_event_presenter_obj_li); + } + // ae_promises.load__event_presentation_obj.event_presenter_li = load_event_presenter_obj_li; + } + } - return ae_promises.load__event_presentation_obj_li; + return ae_promises.load__event_presentation_obj_li; } - // Updated 2025-05-22 -export async function create_ae_obj__event_presentation( - { - api_cfg, - event_id, - event_session_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - event_session_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__event_presentation() *** event_id=${event_id} event_session_id=${event_session_id}`); - } +export async function create_ae_obj__event_presentation({ + api_cfg, + event_id, + event_session_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + event_session_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** create_ae_obj__event_presentation() *** event_id=${event_id} event_session_id=${event_session_id}` + ); + } - ae_promises.create__event_presentation = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'event_presentation', - fields: { - event_id_random: event_id, - event_session_id_random: event_session_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_presentation_obj_create_result) { - if (event_presentation_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_presentation_props({ - obj_li: [event_presentation_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presentation', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__event_presentation = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'event_presentation', + fields: { + event_id_random: event_id, + event_session_id_random: event_session_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_presentation_obj_create_result) { + if (event_presentation_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_presentation_props({ + obj_li: [event_presentation_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presentation', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_presentation( - // { - // obj_type: 'event_presentation', - // obj_li: [event_presentation_obj_create_result] - // }); - } - return event_presentation_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_presentation( + // { + // obj_type: 'event_presentation', + // obj_li: [event_presentation_obj_create_result] + // }); + } + return event_presentation_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__event_presentation:', ae_promises.create__event_presentation); - } - return ae_promises.create__event_presentation; + if (log_lvl) { + console.log('ae_promises.create__event_presentation:', ae_promises.create__event_presentation); + } + return ae_promises.create__event_presentation; } - // Updated 2025-05-22 -export async function delete_ae_obj_id__event_presentation( - { - api_cfg, - event_presentation_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_presentation_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__event_presentation() *** event_presentation_id=${event_presentation_id}`); - } +export async function delete_ae_obj_id__event_presentation({ + api_cfg, + event_presentation_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_presentation_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** delete_ae_obj_id__event_presentation() *** event_presentation_id=${event_presentation_id}` + ); + } - ae_promises.delete__event_presentation_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_presentation', - obj_id: event_presentation_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for event_presentation_id=${event_presentation_id}`); - } - db_events.presentation.delete(event_presentation_id); - } - }); + ae_promises.delete__event_presentation_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_presentation', + obj_id: event_presentation_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log( + `Attempting to remove IDB entry for event_presentation_id=${event_presentation_id}` + ); + } + db_events.presentation.delete(event_presentation_id); + } + }); - if (log_lvl) { - console.log('ae_promises.delete__event_presentation_obj:', ae_promises.delete__event_presentation_obj); - } + if (log_lvl) { + console.log( + 'ae_promises.delete__event_presentation_obj:', + ae_promises.delete__event_presentation_obj + ); + } - return ae_promises.delete__event_presentation_obj; + return ae_promises.delete__event_presentation_obj; } - // Updated 2025-05-22 -export async function update_ae_obj__event_presentation( - { - api_cfg, - event_presentation_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_presentation_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__event_presentation() *** event_presentation_id=${event_presentation_id}`, data_kv); - } - ae_promises.update__event_presentation_obj = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_presentation', - obj_id: event_presentation_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_presentation_obj_update_result) { - if (event_presentation_obj_update_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_presentation_props({ - obj_li: [event_presentation_obj_update_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presentation', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } +export async function update_ae_obj__event_presentation({ + api_cfg, + event_presentation_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_presentation_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj__event_presentation() *** event_presentation_id=${event_presentation_id}`, + data_kv + ); + } + ae_promises.update__event_presentation_obj = await api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_presentation', + obj_id: event_presentation_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_presentation_obj_update_result) { + if (event_presentation_obj_update_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_presentation_props({ + obj_li: [event_presentation_obj_update_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presentation', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_presentation({ - // obj_type: 'event_presentation', - // obj_li: [event_presentation_obj_update_result], - // log_lvl: log_lvl - // }); - } - return event_presentation_obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_presentation({ + // obj_type: 'event_presentation', + // obj_li: [event_presentation_obj_update_result], + // log_lvl: log_lvl + // }); + } + return event_presentation_obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.update__event_presentation_obj:', ae_promises.update__event_presentation_obj); - } - return ae_promises.update__event_presentation_obj; + if (log_lvl) { + console.log( + 'ae_promises.update__event_presentation_obj:', + ae_promises.update__event_presentation_obj + ); + } + return ae_promises.update__event_presentation_obj; } - - - - // Updated 2025-05-22 export const properties_to_save = [ - 'id', - 'event_presentation_id', - // 'event_presentation_id_random', + 'id', + 'event_presentation_id', + // 'event_presentation_id_random', - 'external_id', - 'code', + 'external_id', + 'code', - 'for_type', - 'for_id', - // 'for_id_random', + 'for_type', + 'for_id', + // 'for_id_random', - 'type_code', + 'type_code', - 'event_id', - // 'event_id_random', - 'event_session_id', - // 'event_session_id_random', - 'event_abstract_id', - // 'event_abstract_id_random', + 'event_id', + // 'event_id_random', + 'event_session_id', + // 'event_session_id_random', + 'event_abstract_id', + // 'event_abstract_id_random', - 'abstract_code', + 'abstract_code', - 'name', - 'description', + 'name', + 'description', - 'start_datetime', - 'end_datetime', + 'start_datetime', + 'end_datetime', - 'passcode', + 'passcode', - 'hide_event_launcher', + 'hide_event_launcher', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - 'event_session_code', - 'event_session_name', + // From SQL view + 'event_session_code', + 'event_session_name' - // Add more fields here if your DB save logic uses them + // Add more fields here if your DB save logic uses them ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -691,7 +702,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-05-22 export async function process_ae_obj__event_presentation_props({ obj_li, @@ -716,4 +726,4 @@ export async function process_ae_obj__event_presentation_props({ return obj; } }); -} \ No newline at end of file +} diff --git a/src/lib/ae_events/ae_events__event_presenter.ts b/src/lib/ae_events/ae_events__event_presenter.ts index 2ddfbab9..eaab5ee8 100644 --- a/src/lib/ae_events/ae_events__event_presenter.ts +++ b/src/lib/ae_events/ae_events__event_presenter.ts @@ -1,700 +1,721 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_events } from "$lib/ae_events/db_events"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_events } from '$lib/ae_events/db_events'; -import { load_ae_obj_li__event_file } from "$lib/ae_events/ae_events__event_file"; - -let ae_promises: key_val = {}; +import { load_ae_obj_li__event_file } from '$lib/ae_events/ae_events__event_file'; +const ae_promises: key_val = {}; // Updated 2024-10-08 -export async function load_ae_obj_id__event_presenter( - { - api_cfg, - event_presenter_id, - inc_file_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 19, - offset = 0, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_presenter_id: string, - inc_file_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__event_presenter() *** event_presenter_id=${event_presenter_id}`); - } +export async function load_ae_obj_id__event_presenter({ + api_cfg, + event_presenter_id, + inc_file_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 19, + offset = 0, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_presenter_id: string; + inc_file_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_id__event_presenter() *** event_presenter_id=${event_presenter_id}` + ); + } - let params = {}; + const params = {}; - ae_promises.load__event_presenter_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_presenter', - obj_id: event_presenter_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value - params: params, - log_lvl: log_lvl - }) - .then(async function (event_presenter_obj_get_result) { - if (event_presenter_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_presenter_props({ - obj_li: [event_presenter_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presenter', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__event_presenter_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_presenter', + obj_id: event_presenter_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value + params: params, + log_lvl: log_lvl + }) + .then(async function (event_presenter_obj_get_result) { + if (event_presenter_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_presenter_props({ + obj_li: [event_presenter_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presenter', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__event_presenter({ - // obj_type: 'event_presenter', - // obj_li: [event_presenter_obj_get_result] - // }); - } - return event_presenter_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // // This is expecting a list + // db_save_ae_obj_li__event_presenter({ + // obj_type: 'event_presenter', + // obj_li: [event_presenter_obj_get_result] + // }); + } + return event_presenter_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (inc_file_li) { - // Load the files for the presenter - if (log_lvl) { - console.log(`Need to load the file list for the presenter now.`); - } - let load_event_file_obj_li = load_ae_obj_li__event_file({ - api_cfg: api_cfg, - for_obj_type: 'event_presenter', - for_obj_id: event_presenter_id, - enabled: enabled, - limit: limit, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); + if (inc_file_li) { + // Load the files for the presenter + if (log_lvl) { + console.log(`Need to load the file list for the presenter now.`); + } + const load_event_file_obj_li = load_ae_obj_li__event_file({ + api_cfg: api_cfg, + for_obj_type: 'event_presenter', + for_obj_id: event_presenter_id, + enabled: enabled, + limit: limit, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); - if (log_lvl) { - console.log(`event_file_obj_li = `, load_event_file_obj_li); - } - ae_promises.load__event_presenter_obj.event_file_li = load_event_file_obj_li; - } + if (log_lvl) { + console.log(`event_file_obj_li = `, load_event_file_obj_li); + } + ae_promises.load__event_presenter_obj.event_file_li = load_event_file_obj_li; + } - return ae_promises.load__event_presenter_obj; + return ae_promises.load__event_presenter_obj; } - // Updated 2024-10-08 -export async function load_ae_obj_li__event_presenter( - { - api_cfg, - for_obj_type, - for_obj_id, - inc_file_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 19, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'given_name': 'ASC', 'family_name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - inc_file_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__event_presenter() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__event_presenter({ + api_cfg, + for_obj_type, + for_obj_id, + inc_file_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 19, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + given_name: 'ASC', + family_name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + inc_file_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__event_presenter() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 99); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 99); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - // ae_promises.load__event_presenter_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_presenter_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_presenter', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_presenter_obj_li_get_result) { - if (event_presenter_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_presenter_props({ - obj_li: event_presenter_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presenter', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // ae_promises.load__event_presenter_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_presenter_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_presenter', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_presenter_obj_li_get_result) { + if (event_presenter_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_presenter_props({ + obj_li: event_presenter_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presenter', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_presenter({ - // obj_type: 'event_presenter', - // obj_li: event_presenter_obj_li_get_result - // }); - } - return event_presenter_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // db_save_ae_obj_li__event_presenter({ + // obj_type: 'event_presenter', + // obj_li: event_presenter_obj_li_get_result + // }); + } + return event_presenter_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_presenter_obj_li:', ae_promises.load__event_presenter_obj_li); - } + if (log_lvl) { + console.log( + 'ae_promises.load__event_presenter_obj_li:', + ae_promises.load__event_presenter_obj_li + ); + } - if (inc_file_li) { - // Load the files for the presenters - if (log_lvl) { - console.log(`Need to load the file list for each presenter now.`); - } - for (let i = 0; i < ae_promises.load__event_presenter_obj_li.length; i++) { - let event_presenter_obj = ae_promises.load__event_presenter_obj_li[i]; - let event_presenter_id = event_presenter_obj.event_presenter_id_random; + if (inc_file_li) { + // Load the files for the presenters + if (log_lvl) { + console.log(`Need to load the file list for each presenter now.`); + } + for (let i = 0; i < ae_promises.load__event_presenter_obj_li.length; i++) { + const event_presenter_obj = ae_promises.load__event_presenter_obj_li[i]; + const event_presenter_id = event_presenter_obj.event_presenter_id_random; - let load_event_file_obj_li = load_ae_obj_li__event_file({ - api_cfg: api_cfg, - for_obj_type: 'event_presenter', - for_obj_id: event_presenter_id, - enabled: enabled, - limit: limit, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); + const load_event_file_obj_li = load_ae_obj_li__event_file({ + api_cfg: api_cfg, + for_obj_type: 'event_presenter', + for_obj_id: event_presenter_id, + enabled: enabled, + limit: limit, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); - if (log_lvl) { - console.log(`event_file_obj_li = `, load_event_file_obj_li); - } - // ae_promises.load__event_presenter_obj.event_file_li = load_event_file_obj_li; - } - } + if (log_lvl) { + console.log(`event_file_obj_li = `, load_event_file_obj_li); + } + // ae_promises.load__event_presenter_obj.event_file_li = load_event_file_obj_li; + } + } - return ae_promises.load__event_presenter_obj_li; + return ae_promises.load__event_presenter_obj_li; } - // Updated 2025-05-23 -export async function create_ae_obj__event_presenter( - { - api_cfg, - event_id, - event_session_id, - event_presentation_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - event_session_id: string, - event_presentation_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__event_presenter() *** event_id=${event_id} event_session_id=${event_session_id} event_presentation_id=${event_presentation_id}`); - } +export async function create_ae_obj__event_presenter({ + api_cfg, + event_id, + event_session_id, + event_presentation_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + event_session_id: string; + event_presentation_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** create_ae_obj__event_presenter() *** event_id=${event_id} event_session_id=${event_session_id} event_presentation_id=${event_presentation_id}` + ); + } - ae_promises.create__event_presenter = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'event_presenter', - fields: { - event_id_random: event_id, - event_session_id_random: event_session_id, - event_presentation_id_random: event_presentation_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_presenter_obj_create_result) { - if (event_presenter_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_presenter_props({ - obj_li: [event_presenter_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presenter', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__event_presenter = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'event_presenter', + fields: { + event_id_random: event_id, + event_session_id_random: event_session_id, + event_presentation_id_random: event_presentation_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_presenter_obj_create_result) { + if (event_presenter_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_presenter_props({ + obj_li: [event_presenter_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presenter', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_presenter( - // { - // obj_type: 'event_presenter', obj_li: [event_presenter_obj_create_result] - // }); - } - return event_presenter_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_presenter( + // { + // obj_type: 'event_presenter', obj_li: [event_presenter_obj_create_result] + // }); + } + return event_presenter_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__event_presenter:', ae_promises.create__event_presenter); - } - return ae_promises.create__event_presenter; + if (log_lvl) { + console.log('ae_promises.create__event_presenter:', ae_promises.create__event_presenter); + } + return ae_promises.create__event_presenter; } - // Updated 2025-05-23 -export async function delete_ae_obj_id__event_presenter( - { - api_cfg, - event_presenter_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_presenter_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__event_presenter() *** event_presenter_id=${event_presenter_id}`); - } +export async function delete_ae_obj_id__event_presenter({ + api_cfg, + event_presenter_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_presenter_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** delete_ae_obj_id__event_presenter() *** event_presenter_id=${event_presenter_id}` + ); + } - ae_promises.delete__event_presenter_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_presenter', - obj_id: event_presenter_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for event_presenter_id=${event_presenter_id}`); - } - db_events.presenter.delete(event_presenter_id); - } - }); + ae_promises.delete__event_presenter_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_presenter', + obj_id: event_presenter_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log( + `Attempting to remove IDB entry for event_presenter_id=${event_presenter_id}` + ); + } + db_events.presenter.delete(event_presenter_id); + } + }); - if (log_lvl) { - console.log('ae_promises.delete__event_presenter_obj:', ae_promises.delete__event_presenter_obj); - } + if (log_lvl) { + console.log( + 'ae_promises.delete__event_presenter_obj:', + ae_promises.delete__event_presenter_obj + ); + } - return ae_promises.delete__event_presenter_obj; + return ae_promises.delete__event_presenter_obj; } - // Updated 2025-05-23 -export async function update_ae_obj__event_presenter( - { - api_cfg, - event_presenter_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_presenter_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__event_presenter() *** event_presenter_id=${event_presenter_id}`, data_kv); - } +export async function update_ae_obj__event_presenter({ + api_cfg, + event_presenter_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_presenter_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj__event_presenter() *** event_presenter_id=${event_presenter_id}`, + data_kv + ); + } - ae_promises.update__event_presenter_obj = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_presenter', - obj_id: event_presenter_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_presenter_obj_update_result) { - if (event_presenter_obj_update_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_presenter_props({ - obj_li: [event_presenter_obj_update_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presenter', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.update__event_presenter_obj = await api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_presenter', + obj_id: event_presenter_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_presenter_obj_update_result) { + if (event_presenter_obj_update_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_presenter_props({ + obj_li: [event_presenter_obj_update_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presenter', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_presenter({ - // obj_type: 'event_presenter', - // obj_li: [event_presenter_obj_update_result] - // }); - } - return event_presenter_obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_presenter({ + // obj_type: 'event_presenter', + // obj_li: [event_presenter_obj_update_result] + // }); + } + return event_presenter_obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.update__event_presenter_obj:', ae_promises.update__event_presenter_obj); - } - return ae_promises.update__event_presenter_obj; + if (log_lvl) { + console.log( + 'ae_promises.update__event_presenter_obj:', + ae_promises.update__event_presenter_obj + ); + } + return ae_promises.update__event_presenter_obj; } - // Updated 2025-05-23 -export async function search__event_presenter( - { - api_cfg, - event_id, - agree = null, - biography = null, - fulltext_search_qry_str, - ft_presenter_search_qry_str, - like_search_qry_str = null, - like_presentation_search_qry_str = null, - like_presenter_search_qry_str = null, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 49, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'given_name': 'ASC', 'family_name': 'ASC', 'email': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: any, - agree?: null|boolean, - biography?: null|boolean, - fulltext_search_qry_str?: null|string, - ft_presenter_search_qry_str?: null|string, - like_search_qry_str?: null|string, - like_presentation_search_qry_str?: null|string, - like_presenter_search_qry_str?: null|string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** search__event_presenter() *** event_id=${event_id}`); - } +export async function search__event_presenter({ + api_cfg, + event_id, + agree = null, + biography = null, + fulltext_search_qry_str, + ft_presenter_search_qry_str, + like_search_qry_str = null, + like_presentation_search_qry_str = null, + like_presenter_search_qry_str = null, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 49, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + given_name: 'ASC', + family_name: 'ASC', + email: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: any; + agree?: null | boolean; + biography?: null | boolean; + fulltext_search_qry_str?: null | string; + ft_presenter_search_qry_str?: null | string; + like_search_qry_str?: null | string; + like_presentation_search_qry_str?: null | string; + like_presenter_search_qry_str?: null | string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** search__event_presenter() *** event_id=${event_id}`); + } - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 25); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 25); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // if (!fulltext_search_qry_str && !like_search_qry_str) { - // console.log('No search string provided!!!'); - // return false; // Returning false instead of [] because no search was performed. - // } + // if (!fulltext_search_qry_str && !like_search_qry_str) { + // console.log('No search string provided!!!'); + // return false; // Returning false instead of [] because no search was performed. + // } - if (fulltext_search_qry_str || ft_presenter_search_qry_str) { - params_json['ft_qry'] = {}; - if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { - params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; - } + if (fulltext_search_qry_str || ft_presenter_search_qry_str) { + params_json['ft_qry'] = {}; + if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { + params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; + } - if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2) { - params_json['ft_qry']['event_presenter_li_qry_str'] = ft_presenter_search_qry_str; - } - } + if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2) { + params_json['ft_qry']['event_presenter_li_qry_str'] = ft_presenter_search_qry_str; + } + } - // Use the AND (AND LIKE) query - // if (like_search_qry_str || like_presenter_search_qry_str) { - // params_json['and_like'] = {}; - // if (like_search_qry_str && like_search_qry_str.length > 2) { - // params_json['and_like']['default_qry_str'] = like_search_qry_str; - // } - // if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { - // params_json['and_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; - // } - // } + // Use the AND (AND LIKE) query + // if (like_search_qry_str || like_presenter_search_qry_str) { + // params_json['and_like'] = {}; + // if (like_search_qry_str && like_search_qry_str.length > 2) { + // params_json['and_like']['default_qry_str'] = like_search_qry_str; + // } + // if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { + // params_json['and_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; + // } + // } - // Use the AND (OR LIKE) query - if (like_search_qry_str || like_presentation_search_qry_str || like_presenter_search_qry_str) { - params_json['or_like'] = {}; - if (like_search_qry_str && like_search_qry_str.length > 2) { - params_json['or_like']['default_qry_str'] = like_search_qry_str; - } - if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { - params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; - } - if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { - params_json['or_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; - } - } + // Use the AND (OR LIKE) query + if (like_search_qry_str || like_presentation_search_qry_str || like_presenter_search_qry_str) { + params_json['or_like'] = {}; + if (like_search_qry_str && like_search_qry_str.length > 2) { + params_json['or_like']['default_qry_str'] = like_search_qry_str; + } + if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { + params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; + } + if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { + params_json['or_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; + } + } - params_json['and_qry'] = {}; + params_json['and_qry'] = {}; - if (agree === true || agree === false) { - params_json['and_qry']['agree'] = agree; - // if (!agree) { - // params_json['or_qry']['agree'] = null; - // } - } - // if (agree === null) { - // params_json['and_qry']['agree'] = agree; - // } + if (agree === true || agree === false) { + params_json['and_qry']['agree'] = agree; + // if (!agree) { + // params_json['or_qry']['agree'] = null; + // } + } + // if (agree === null) { + // params_json['and_qry']['agree'] = agree; + // } - if (biography) { - params_json['and_qry']['biography_check'] = biography; - } + if (biography) { + params_json['and_qry']['biography_check'] = biography; + } - // ae_promises.load__event_presenter_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_presenter_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_presenter', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for session searching - // use_alt_mdl: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_presenter_obj_li_get_result) { - if (event_presenter_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_presenter_props({ - obj_li: event_presenter_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presenter', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return event_presenter_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // ae_promises.load__event_presenter_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_presenter_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_presenter', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for session searching + // use_alt_mdl: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_presenter_obj_li_get_result) { + if (event_presenter_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_presenter_props({ + obj_li: event_presenter_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presenter', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return event_presenter_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.load__event_presenter_obj_li:', ae_promises.load__event_presenter_obj_li); - } - return ae_promises.load__event_presenter_obj_li; + if (log_lvl) { + console.log( + 'ae_promises.load__event_presenter_obj_li:', + ae_promises.load__event_presenter_obj_li + ); + } + return ae_promises.load__event_presenter_obj_li; } - - - - // Updated 2024-08-07 -export async function email_sign_in__event_presenter ( - { - api_cfg, - to_email, - to_name, - base_url, - person_id, - person_passcode, - event_id, - event_session_id, - event_presentation_id, - event_presenter_id, - session_name, - presentation_name, - log_lvl = 0 - }: { - api_cfg: any, - to_email: string, - to_name: string, - base_url: string, - person_id: string, - person_passcode: string, - event_id: string, - event_session_id: string, - event_presentation_id: string, - event_presenter_id: string, - session_name: string, - presentation_name: string, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** email_sign_in__event_presenter() *** to_email=${to_email} to_name=${to_name} person_id=${person_id} person_passcode=${person_passcode} presentation_id=${event_presentation_id} presenter_id=${event_presenter_id}`); - } +export async function email_sign_in__event_presenter({ + api_cfg, + to_email, + to_name, + base_url, + person_id, + person_passcode, + event_id, + event_session_id, + event_presentation_id, + event_presenter_id, + session_name, + presentation_name, + log_lvl = 0 +}: { + api_cfg: any; + to_email: string; + to_name: string; + base_url: string; + person_id: string; + person_passcode: string; + event_id: string; + event_session_id: string; + event_presentation_id: string; + event_presenter_id: string; + session_name: string; + presentation_name: string; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** email_sign_in__event_presenter() *** to_email=${to_email} to_name=${to_name} person_id=${person_id} person_passcode=${person_passcode} presentation_id=${event_presentation_id} presenter_id=${event_presenter_id}` + ); + } - let subject = `LCI Congress 2025 - Pres Mgmt Hub Sign In Link for ${session_name} (ID: ${event_session_id})`; + const subject = `LCI Congress 2025 - Pres Mgmt Hub Sign In Link for ${session_name} (ID: ${event_session_id})`; - let sign_in_url = encodeURI(`${base_url}/events/${event_id}/session/${event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&presentation_id=${event_presentation_id}&presenter_id=${event_presenter_id}`) + const sign_in_url = encodeURI( + `${base_url}/events/${event_id}/session/${event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&presentation_id=${event_presentation_id}&presenter_id=${event_presenter_id}` + ); - let body_html = ` + const body_html = `
${to_name},

Your link to sign into the presentation management hub for LCI Congress 2025 is below. If you did not request this, please delete and ignore this email. If you need to make any changes or updates to your submission, you may use this link again later.

@@ -711,107 +732,105 @@ export async function email_sign_in__event_presenter ( Copy and paste link: ${sign_in_url}

`; - api.send_email({ - api_cfg: api_cfg, - from_email: 'noreply+presmgmt@oneskyit.com', - from_name: 'LCI 2025 Pres Mgmt Hub', - to_email: to_email, - subject: subject, - body_html: body_html, - }); + api.send_email({ + api_cfg: api_cfg, + from_email: 'noreply+presmgmt@oneskyit.com', + from_name: 'LCI 2025 Pres Mgmt Hub', + to_email: to_email, + subject: subject, + body_html: body_html + }); } - // Updated 2025-05-23 export const properties_to_save = [ - 'id', - 'event_presenter_id', - // 'event_presenter_id_random', + 'id', + 'event_presenter_id', + // 'event_presenter_id_random', - 'external_id', - 'code', + 'external_id', + 'code', - // 'for_type', - // 'for_id', - // 'for_id_random', + // 'for_type', + // 'for_id', + // 'for_id_random', - 'event_id', - // 'event_id_random', - 'event_session_id', - // 'event_session_id_random', - 'event_presentation_id', - // 'event_presentation_id_random', - 'event_person_id', - // 'event_person_id_random', - 'person_id', - // 'person_id_random', - 'person_profile_id', - // 'person_profile_id_random', + 'event_id', + // 'event_id_random', + 'event_session_id', + // 'event_session_id_random', + 'event_presentation_id', + // 'event_presentation_id_random', + 'event_person_id', + // 'event_person_id_random', + 'person_id', + // 'person_id_random', + 'person_profile_id', + // 'person_profile_id_random', - 'pronouns', - 'informal_name', - 'title_names', - 'given_name', - 'middle_name', - 'family_name', - 'designations', + 'pronouns', + 'informal_name', + 'title_names', + 'given_name', + 'middle_name', + 'family_name', + 'designations', - 'professional_title', + 'professional_title', - 'full_name', + 'full_name', - 'affiliations', + 'affiliations', - 'email', + 'email', - 'biography', + 'biography', - 'agree', - 'comments', + 'agree', + 'comments', - 'passcode', + 'passcode', - 'hide_event_launcher', + 'hide_event_launcher', - 'data_json', + 'data_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - 'file_count', + // From SQL view + 'file_count', - 'event_session_code', - 'event_session_name', - 'event_session_start_datetime', - 'event_presentation_code', - 'event_presentation_name', - 'event_presentation_start_datetime', + 'event_session_code', + 'event_session_name', + 'event_session_start_datetime', + 'event_presentation_code', + 'event_presentation_name', + 'event_presentation_start_datetime', - 'person_external_id', - 'person_external_sys_id', - 'person_given_name', - 'person_family_name', - 'person_full_name', - 'person_professional_title', - 'person_affiliations', - 'person_primary_email', - 'person_passcode', + 'person_external_id', + 'person_external_sys_id', + 'person_given_name', + 'person_family_name', + 'person_full_name', + 'person_professional_title', + 'person_affiliations', + 'person_primary_email', + 'person_passcode' ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -880,7 +899,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-05-23 export async function process_ae_obj__event_presenter_props({ obj_li, @@ -905,4 +923,4 @@ export async function process_ae_obj__event_presenter_props({ return obj; } }); -} \ No newline at end of file +} diff --git a/src/lib/ae_events/ae_events__event_session.ts b/src/lib/ae_events/ae_events__event_session.ts index 6df2fa0e..f7d4f96c 100644 --- a/src/lib/ae_events/ae_events__event_session.ts +++ b/src/lib/ae_events/ae_events__event_session.ts @@ -1,1123 +1,1125 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_events } from "$lib/ae_events/db_events"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_events } from '$lib/ae_events/db_events'; -import { load_ae_obj_li__event_file } from "$lib/ae_events/ae_events__event_file"; -import { load_ae_obj_li__event_presentation } from "$lib/ae_events/ae_events__event_presentation"; - -let ae_promises: key_val = {}; +import { load_ae_obj_li__event_file } from '$lib/ae_events/ae_events__event_file'; +import { load_ae_obj_li__event_presentation } from '$lib/ae_events/ae_events__event_presentation'; +const ae_promises: key_val = {}; // Updated 2025-05-22 -export async function load_ae_obj_id__event_session( - { - api_cfg, - event_session_id, - inc_file_li = false, - inc_all_file_li = false, - inc_presentation_li = false, - inc_presenter_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 149, - offset = 0, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_session_id: string, - inc_file_li?: boolean, - inc_all_file_li?: boolean, - inc_presentation_li?: boolean, - inc_presenter_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__event_session() *** event_session_id=${event_session_id}`); - } +export async function load_ae_obj_id__event_session({ + api_cfg, + event_session_id, + inc_file_li = false, + inc_all_file_li = false, + inc_presentation_li = false, + inc_presenter_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 149, + offset = 0, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_session_id: string; + inc_file_li?: boolean; + inc_all_file_li?: boolean; + inc_presentation_li?: boolean; + inc_presenter_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__event_session() *** event_session_id=${event_session_id}`); + } - let params = {}; + const params = {}; - // $events_sess.badges.status_load__event_session_obj = 'loading'; - ae_promises.load__event_session_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_session', - obj_id: event_session_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - params: params, - log_lvl: log_lvl - }) - .then(async function (event_session_obj_get_result) { - if (event_session_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_session_props({ - obj_li: [event_session_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'session', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // $events_sess.badges.status_load__event_session_obj = 'loading'; + ae_promises.load__event_session_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_session', + obj_id: event_session_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + params: params, + log_lvl: log_lvl + }) + .then(async function (event_session_obj_get_result) { + if (event_session_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_session_props({ + obj_li: [event_session_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'session', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__event_session({ - // obj_type: 'event_session', - // obj_li: [event_session_obj_get_result] - // }); - } - return event_session_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // // This is expecting a list + // db_save_ae_obj_li__event_session({ + // obj_type: 'event_session', + // obj_li: [event_session_obj_get_result] + // }); + } + return event_session_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_session_obj:', ae_promises?.load__event_session_obj); - } + if (log_lvl) { + console.log('ae_promises.load__event_session_obj:', ae_promises?.load__event_session_obj); + } - if (ae_promises?.load__event_session_obj === null) { - console.log('No results returned.'); - return null; - } + if (ae_promises?.load__event_session_obj === null) { + console.log('No results returned.'); + return null; + } - if (inc_file_li) { - // Load the files for the session - if (log_lvl) { - console.log(`Need to load the file list for the session now`); - } - let load_event_file_obj_li = load_ae_obj_li__event_file({ - api_cfg: api_cfg, - for_obj_type: 'event_session', - for_obj_id: event_session_id, - enabled: enabled, - limit: 15, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); + if (inc_file_li) { + // Load the files for the session + if (log_lvl) { + console.log(`Need to load the file list for the session now`); + } + const load_event_file_obj_li = load_ae_obj_li__event_file({ + api_cfg: api_cfg, + for_obj_type: 'event_session', + for_obj_id: event_session_id, + enabled: enabled, + limit: 15, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); - if (log_lvl) { - console.log(`load_event_file_obj_li = `, load_event_file_obj_li); - } - ae_promises.load__event_session_obj.event_file_li = load_event_file_obj_li; - } + if (log_lvl) { + console.log(`load_event_file_obj_li = `, load_event_file_obj_li); + } + ae_promises.load__event_session_obj.event_file_li = load_event_file_obj_li; + } - if (inc_presentation_li) { - // Load the presentations for the session - if (log_lvl) { - console.log(`Need to load the presentation list for the session now`); - } - // NOTE: The files will only be included if inc_all_file_li is true. 2025-09-17 - let load_event_presentation_obj_li = load_ae_obj_li__event_presentation({ - api_cfg: api_cfg, - for_obj_type: 'event_session', - for_obj_id: event_session_id, - inc_file_li: inc_all_file_li, - inc_presenter_li: inc_presenter_li, - enabled: enabled, // all, disabled, enabled - hidden: hidden, // all, hidden, not_hidden - limit: limit, // 25 - offset: offset, // 0 - params: {}, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_presentation_obj_li) => { - if (log_lvl) { - console.log(`event_presentation_obj_li = `, event_presentation_obj_li); - } - return event_presentation_obj_li; - }); + if (inc_presentation_li) { + // Load the presentations for the session + if (log_lvl) { + console.log(`Need to load the presentation list for the session now`); + } + // NOTE: The files will only be included if inc_all_file_li is true. 2025-09-17 + const load_event_presentation_obj_li = load_ae_obj_li__event_presentation({ + api_cfg: api_cfg, + for_obj_type: 'event_session', + for_obj_id: event_session_id, + inc_file_li: inc_all_file_li, + inc_presenter_li: inc_presenter_li, + enabled: enabled, // all, disabled, enabled + hidden: hidden, // all, hidden, not_hidden + limit: limit, // 25 + offset: offset, // 0 + params: {}, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_presentation_obj_li) => { + if (log_lvl) { + console.log(`event_presentation_obj_li = `, event_presentation_obj_li); + } + return event_presentation_obj_li; + }); - if (log_lvl) { - console.log(`event_presentation_obj_li = `, load_event_presentation_obj_li); - } - ae_promises.load__event_session_obj.event_presentation_li = load_event_presentation_obj_li; - } + if (log_lvl) { + console.log(`event_presentation_obj_li = `, load_event_presentation_obj_li); + } + ae_promises.load__event_session_obj.event_presentation_li = load_event_presentation_obj_li; + } - return ae_promises.load__event_session_obj; + return ae_promises.load__event_session_obj; } - // Updated 2025-05-22 -export async function load_ae_obj_li__event_session( - { - api_cfg, - for_obj_type, - for_obj_id, - inc_file_li = false, - inc_all_file_li = false, - inc_presentation_li = false, - inc_presenter_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 149, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - inc_file_li?: boolean, - inc_all_file_li?: boolean, - inc_presentation_li?: boolean, - inc_presenter_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, // 99 - offset?: number, // 0 - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__event_session() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__event_session({ + api_cfg, + for_obj_type, + for_obj_id, + inc_file_li = false, + inc_all_file_li = false, + inc_presentation_li = false, + inc_presenter_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 149, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + start_datetime: 'ASC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + inc_file_li?: boolean; + inc_all_file_li?: boolean; + inc_presentation_li?: boolean; + inc_presenter_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; // 99 + offset?: number; // 0 + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__event_session() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 99); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 99); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // console.log('params_json:', params_json); + // console.log('params_json:', params_json); - // ae_promises.load__event_session_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_session_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_session', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_session_obj_li_get_result) { - if (event_session_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_session_props({ - obj_li: event_session_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'session', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // ae_promises.load__event_session_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_session_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_session', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + // use_alt_mdl: false, // NOTE: This will use the base_name_alt value instead of the base_name value + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_session_obj_li_get_result) { + if (event_session_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_session_props({ + obj_li: event_session_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'session', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_session({ - // obj_type: 'event_session', - // obj_li: event_session_obj_li_get_result - // }); - } - return event_session_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // db_save_ae_obj_li__event_session({ + // obj_type: 'event_session', + // obj_li: event_session_obj_li_get_result + // }); + } + return event_session_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__event_session_obj_li:', ae_promises.load__event_session_obj_li); - } + if (log_lvl) { + console.log('ae_promises.load__event_session_obj_li:', ae_promises.load__event_session_obj_li); + } - if (inc_file_li) { - // Load the files for the sessions - if (log_lvl) { - console.log(`Need to load the file list for each session now`); - } - for (let i = 0; i < ae_promises.load__event_session_obj_li.length; i++) { - let event_session_obj = ae_promises.load__event_session_obj_li[i]; - let event_session_id = event_session_obj.event_session_id_random; + if (inc_file_li) { + // Load the files for the sessions + if (log_lvl) { + console.log(`Need to load the file list for each session now`); + } + for (let i = 0; i < ae_promises.load__event_session_obj_li.length; i++) { + const event_session_obj = ae_promises.load__event_session_obj_li[i]; + const event_session_id = event_session_obj.event_session_id_random; - let load_event_file_obj_li = load_ae_obj_li__event_file({ - api_cfg: api_cfg, - for_obj_type: 'event_session', - for_obj_id: event_session_id, - enabled: enabled, - limit: limit, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); + const load_event_file_obj_li = load_ae_obj_li__event_file({ + api_cfg: api_cfg, + for_obj_type: 'event_session', + for_obj_id: event_session_id, + enabled: enabled, + limit: limit, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); - if (log_lvl) { - console.log(`load_event_file_obj_li = `, load_event_file_obj_li); - } - } - } + if (log_lvl) { + console.log(`load_event_file_obj_li = `, load_event_file_obj_li); + } + } + } - if (inc_presentation_li) { - // Load the presentations for the sessions - if (log_lvl) { - console.log(`Need to load the presentation list for each session now`); - } - for (let i = 0; i < ae_promises.load__event_session_obj_li.length; i++) { - let event_session_obj = ae_promises.load__event_session_obj_li[i]; - let event_session_id = event_session_obj.event_session_id_random; + if (inc_presentation_li) { + // Load the presentations for the sessions + if (log_lvl) { + console.log(`Need to load the presentation list for each session now`); + } + for (let i = 0; i < ae_promises.load__event_session_obj_li.length; i++) { + const event_session_obj = ae_promises.load__event_session_obj_li[i]; + const event_session_id = event_session_obj.event_session_id_random; - // NOTE: The files will only be included if inc_all_file_li is true. 2025-09-17 - let load_event_presentation_obj_li = load_ae_obj_li__event_presentation({ - api_cfg: api_cfg, - for_obj_type: 'event_session', - for_obj_id: event_session_id, - inc_file_li: inc_all_file_li, - inc_presenter_li: inc_presenter_li, - enabled: enabled, - hidden: hidden, - limit: limit, - offset: offset, - params: params, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((event_presentation_obj_li) => { - if (log_lvl) { - console.log(`event_presentation_obj_li = `, event_presentation_obj_li); - } - // if (try_cache) { - // console.log(`event_session_obj = `, event_session_obj); - // event_session_obj.event_presentation_li = event_presentation_obj_li; - // // Re-save the session object with the new presentation list - // db_save_ae_obj_li__event_session({ - // obj_type: 'event_session', - // obj_li: event_session_obj - // }); - // } + // NOTE: The files will only be included if inc_all_file_li is true. 2025-09-17 + const load_event_presentation_obj_li = load_ae_obj_li__event_presentation({ + api_cfg: api_cfg, + for_obj_type: 'event_session', + for_obj_id: event_session_id, + inc_file_li: inc_all_file_li, + inc_presenter_li: inc_presenter_li, + enabled: enabled, + hidden: hidden, + limit: limit, + offset: offset, + params: params, + try_cache: try_cache, + log_lvl: log_lvl + }).then((event_presentation_obj_li) => { + if (log_lvl) { + console.log(`event_presentation_obj_li = `, event_presentation_obj_li); + } + // if (try_cache) { + // console.log(`event_session_obj = `, event_session_obj); + // event_session_obj.event_presentation_li = event_presentation_obj_li; + // // Re-save the session object with the new presentation list + // db_save_ae_obj_li__event_session({ + // obj_type: 'event_session', + // obj_li: event_session_obj + // }); + // } - return event_presentation_obj_li; - }); + return event_presentation_obj_li; + }); - if (log_lvl) { - console.log(`load_event_presentation_obj_li = `, load_event_presentation_obj_li); - } - } - } + if (log_lvl) { + console.log(`load_event_presentation_obj_li = `, load_event_presentation_obj_li); + } + } + } - return ae_promises.load__event_session_obj_li; + return ae_promises.load__event_session_obj_li; } - // Updated 2025-05-22 -export async function create_ae_obj__event_session( - { - api_cfg, - event_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__event_session() *** event_id=${event_id}`); - } +export async function create_ae_obj__event_session({ + api_cfg, + event_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__event_session() *** event_id=${event_id}`); + } - ae_promises.create__event_session = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'event_session', - fields: { - event_id_random: event_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_session_obj_create_result) { - if (event_session_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_session_props({ - obj_li: [event_session_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'session', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__event_session = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'event_session', + fields: { + event_id_random: event_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_session_obj_create_result) { + if (event_session_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_session_props({ + obj_li: [event_session_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'session', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_session( - // { - // obj_type: 'event_session', - // obj_li: [event_session_obj_create_result] - // }); - } - return event_session_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_session( + // { + // obj_type: 'event_session', + // obj_li: [event_session_obj_create_result] + // }); + } + return event_session_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__event_session:', ae_promises.create__event_session); - } - return ae_promises.create__event_session; + if (log_lvl) { + console.log('ae_promises.create__event_session:', ae_promises.create__event_session); + } + return ae_promises.create__event_session; } - // Updated 2025-05-22 -export async function delete_ae_obj_id__event_session( - { - api_cfg, - event_session_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_session_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__event_session() *** event_session_id=${event_session_id}`); - } +export async function delete_ae_obj_id__event_session({ + api_cfg, + event_session_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_session_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__event_session() *** event_session_id=${event_session_id}`); + } - ae_promises.delete__event_session_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_session', - obj_id: event_session_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for event_session_id=${event_session_id}`); - } - db_events.session.delete(event_session_id); - } - }); + ae_promises.delete__event_session_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_session', + obj_id: event_session_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for event_session_id=${event_session_id}`); + } + db_events.session.delete(event_session_id); + } + }); - if (log_lvl) { - console.log('ae_promises.delete__event_session_obj:', ae_promises.delete__event_session_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__event_session_obj:', ae_promises.delete__event_session_obj); + } - return ae_promises.delete__event_session_obj; + return ae_promises.delete__event_session_obj; } - // Updated 2025-05-22 -export async function update_ae_obj__event_session( - { - api_cfg, - event_session_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_session_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__event_session() *** event_session_id=${event_session_id}`, data_kv); - } - // ae_promises.update__event_session_obj = 'test'; - ae_promises.update__event_session_obj = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_session', - obj_id: event_session_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (event_session_obj_update_result) { - if (event_session_obj_update_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_session_props({ - obj_li: [event_session_obj_update_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'session', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } +export async function update_ae_obj__event_session({ + api_cfg, + event_session_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_session_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj__event_session() *** event_session_id=${event_session_id}`, + data_kv + ); + } + // ae_promises.update__event_session_obj = 'test'; + ae_promises.update__event_session_obj = await api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_session', + obj_id: event_session_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (event_session_obj_update_result) { + if (event_session_obj_update_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_session_props({ + obj_li: [event_session_obj_update_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'session', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_session({ - // obj_type: 'event_session', obj_li: [event_session_obj_update_result] - // }); - } - return event_session_obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_session({ + // obj_type: 'event_session', obj_li: [event_session_obj_update_result] + // }); + } + return event_session_obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.update__event_session_obj:', ae_promises.update__event_session_obj); - } - return ae_promises.update__event_session_obj; + if (log_lvl) { + console.log('ae_promises.update__event_session_obj:', ae_promises.update__event_session_obj); + } + return ae_promises.update__event_session_obj; } - // This new function is using CRUD v2. This should allow for more flexibility in the queries. // Updated 2025-07-21 -export async function qry__event_session( - { - api_cfg, - event_id, - qry_str, - qry_files, - qry_start_datetime, // Example greater than: '2024-10-24' - qry_poc_agree = null, - qry_poc_kv_json, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 49, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: any, - qry_str?: string, - qry_files?: null|boolean, - qry_start_datetime?: null|string, // Greater than this datetime - qry_poc_agree?: null|boolean, - qry_poc_kv_json?: null|boolean, // Key value pairs for the point of contact - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** qry__event_session() *** event_id=${event_id} qry_str=${qry_str}`); - } +export async function qry__event_session({ + api_cfg, + event_id, + qry_str, + qry_files, + qry_start_datetime, // Example greater than: '2024-10-24' + qry_poc_agree = null, + qry_poc_kv_json, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 49, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + start_datetime: 'ASC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: any; + qry_str?: string; + qry_files?: null | boolean; + qry_start_datetime?: null | string; // Greater than this datetime + qry_poc_agree?: null | boolean; + qry_poc_kv_json?: null | boolean; // Key value pairs for the point of contact + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** qry__event_session() *** event_id=${event_id} qry_str=${qry_str}`); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - params_json['qry'] = []; + params_json['qry'] = []; - if (qry_files === true) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: ">", - value: 0 - }; - params_json['qry'].push(qry_param); - } else if (qry_files === false) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: "IS", - value: null - }; - params_json['qry'].push(qry_param); - } + if (qry_files === true) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: '>', + value: 0 + }; + params_json['qry'].push(qry_param); + } else if (qry_files === false) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: 'IS', + value: null + }; + params_json['qry'].push(qry_param); + } - if (qry_start_datetime) { - let qry_param = - { - type: "AND", - field: "start_datetime", - operator: ">", - value: qry_start_datetime - }; - params_json['qry'].push(qry_param); - } + if (qry_start_datetime) { + const qry_param = { + type: 'AND', + field: 'start_datetime', + operator: '>', + value: qry_start_datetime + }; + params_json['qry'].push(qry_param); + } - if (qry_poc_agree === true) { - let qry_param = - { - type: "AND", - field: "poc_agree", - operator: "=", - value: true - }; - params_json['qry'].push(qry_param); - } else if (qry_poc_agree === false) { - // let qry_param = - // { - // type: "AND", - // field: "poc_agree", - // operator: "IS", - // value: null - // }; - // params_json['qry'].push(qry_param); - let qry_param = - { - type: "AND", - field: "poc_agree", - operator: "=", - value: false - }; - params_json['qry'].push(qry_param); - } + if (qry_poc_agree === true) { + const qry_param = { + type: 'AND', + field: 'poc_agree', + operator: '=', + value: true + }; + params_json['qry'].push(qry_param); + } else if (qry_poc_agree === false) { + // let qry_param = + // { + // type: "AND", + // field: "poc_agree", + // operator: "IS", + // value: null + // }; + // params_json['qry'].push(qry_param); + const qry_param = { + type: 'AND', + field: 'poc_agree', + operator: '=', + value: false + }; + params_json['qry'].push(qry_param); + } + if (qry_poc_kv_json === true) { + const qry_param = { + type: 'AND', + field: 'poc_kv_json', + operator: 'IS NOT', + value: null + }; + params_json['qry'].push(qry_param); + } else if (qry_poc_kv_json === false) { + const qry_param = { + type: 'AND', + field: 'poc_kv_json', + operator: 'IS', + value: null + }; + params_json['qry'].push(qry_param); + } - if (qry_poc_kv_json === true) { - let qry_param = - { - type: "AND", - field: "poc_kv_json", - operator: "IS NOT", - value: null - }; - params_json['qry'].push(qry_param); - } else if (qry_poc_kv_json === false) { - let qry_param = - { - type: "AND", - field: "poc_kv_json", - operator: "IS", - value: null - }; - params_json['qry'].push(qry_param); - } + ae_promises.load__event_session_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_session', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for session searching + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_session_obj_li_get_result) { + if (event_session_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_session_props({ + obj_li: event_session_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'presenter', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - ae_promises.load__event_session_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_session', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for session searching - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_session_obj_li_get_result) { - if (event_session_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_session_props({ - obj_li: event_session_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'presenter', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // db_save_ae_obj_li__event_session({ + // obj_type: 'event_session', + // obj_li: event_session_obj_li_get_result + // }); + } + return event_session_obj_li_get_result; + } else { + return []; + } + }); - // db_save_ae_obj_li__event_session({ - // obj_type: 'event_session', - // obj_li: event_session_obj_li_get_result - // }); - } - return event_session_obj_li_get_result; - } else { - return []; - } - }); - - if (log_lvl) { - console.log('ae_promises.load__event_session_obj_li:', ae_promises.load__event_session_obj_li); - } - return ae_promises.load__event_session_obj_li; + if (log_lvl) { + console.log('ae_promises.load__event_session_obj_li:', ae_promises.load__event_session_obj_li); + } + return ae_promises.load__event_session_obj_li; } - // Updated 2025-05-22 -export async function search__event_session( - { - api_cfg, - event_id, - poc_agree = null, - fulltext_search_qry_str, - ft_presenter_search_qry_str, - like_search_qry_str = null, - like_presentation_search_qry_str = null, - like_presenter_search_qry_str = null, - like_poc_name_qry_str = null, - file_count = false, // If true then only show those that have a file count - location_name = null, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 49, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - event_id: any, - poc_agree?: null|boolean, - fulltext_search_qry_str?: null|string, - ft_presenter_search_qry_str?: null|string, - like_search_qry_str?: null|string, - like_presentation_search_qry_str?: null|string, - like_presenter_search_qry_str?: null|string, - like_poc_name_qry_str?: null|string, - file_count?: boolean, - location_name?: null|string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** search__event_session() *** event_id=${event_id} like_search_qry_str=${like_search_qry_str} location_name=${location_name}`); - } +export async function search__event_session({ + api_cfg, + event_id, + poc_agree = null, + fulltext_search_qry_str, + ft_presenter_search_qry_str, + like_search_qry_str = null, + like_presentation_search_qry_str = null, + like_presenter_search_qry_str = null, + like_poc_name_qry_str = null, + file_count = false, // If true then only show those that have a file count + location_name = null, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 49, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + start_datetime: 'ASC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: any; + poc_agree?: null | boolean; + fulltext_search_qry_str?: null | string; + ft_presenter_search_qry_str?: null | string; + like_search_qry_str?: null | string; + like_presentation_search_qry_str?: null | string; + like_presenter_search_qry_str?: null | string; + like_poc_name_qry_str?: null | string; + file_count?: boolean; + location_name?: null | string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** search__event_session() *** event_id=${event_id} like_search_qry_str=${like_search_qry_str} location_name=${location_name}` + ); + } - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 25); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 25); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // if (!fulltext_search_qry_str && !like_search_qry_str) { - // console.log('No search string provided!!!'); - // return false; // Returning false instead of [] because no search was performed. - // } + // if (!fulltext_search_qry_str && !like_search_qry_str) { + // console.log('No search string provided!!!'); + // return false; // Returning false instead of [] because no search was performed. + // } - if (fulltext_search_qry_str || ft_presenter_search_qry_str) { - params_json['ft_qry'] = {}; - if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { - params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; - } + if (fulltext_search_qry_str || ft_presenter_search_qry_str) { + params_json['ft_qry'] = {}; + if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { + params_json['ft_qry']['default_qry_str'] = fulltext_search_qry_str; + } - if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2) { - params_json['ft_qry']['event_presenter_li_qry_str'] = ft_presenter_search_qry_str; - } - } + if (ft_presenter_search_qry_str && ft_presenter_search_qry_str.length > 2) { + params_json['ft_qry']['event_presenter_li_qry_str'] = ft_presenter_search_qry_str; + } + } - // Use the AND (AND LIKE) query - // if (like_search_qry_str || like_presenter_search_qry_str) { - // params_json['and_like'] = {}; - // if (like_search_qry_str && like_search_qry_str.length > 2) { - // params_json['and_like']['default_qry_str'] = like_search_qry_str; - // } - // if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { - // params_json['and_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; - // } - // } + // Use the AND (AND LIKE) query + // if (like_search_qry_str || like_presenter_search_qry_str) { + // params_json['and_like'] = {}; + // if (like_search_qry_str && like_search_qry_str.length > 2) { + // params_json['and_like']['default_qry_str'] = like_search_qry_str; + // } + // if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { + // params_json['and_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; + // } + // } - // Use the AND (OR LIKE) query - if (like_search_qry_str || like_presentation_search_qry_str || like_presenter_search_qry_str || like_poc_name_qry_str) { - params_json['or_like'] = {}; - if (like_search_qry_str && like_search_qry_str.length > 2) { - params_json['or_like']['default_qry_str'] = like_search_qry_str; - } - if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { - params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; - } - if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { - params_json['or_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; - } - if (like_poc_name_qry_str && like_poc_name_qry_str.length > 2) { - params_json['or_like']['poc_person_full_name'] = like_poc_name_qry_str; - } - } + // Use the AND (OR LIKE) query + if ( + like_search_qry_str || + like_presentation_search_qry_str || + like_presenter_search_qry_str || + like_poc_name_qry_str + ) { + params_json['or_like'] = {}; + if (like_search_qry_str && like_search_qry_str.length > 2) { + params_json['or_like']['default_qry_str'] = like_search_qry_str; + } + if (like_presentation_search_qry_str && like_presentation_search_qry_str.length > 2) { + params_json['or_like']['event_presentation_li_qry_str'] = like_presentation_search_qry_str; + } + if (like_presenter_search_qry_str && like_presenter_search_qry_str.length > 2) { + params_json['or_like']['event_presenter_li_qry_str'] = like_presenter_search_qry_str; + } + if (like_poc_name_qry_str && like_poc_name_qry_str.length > 2) { + params_json['or_like']['poc_person_full_name'] = like_poc_name_qry_str; + } + } - params_json['and_qry'] = {}; + params_json['and_qry'] = {}; - if (poc_agree) { - params_json['and_qry']['poc_agree'] = poc_agree; - } + if (poc_agree) { + params_json['and_qry']['poc_agree'] = poc_agree; + } - if (file_count) { - params_json['and_qry']['file_count'] = file_count; - } + if (file_count) { + params_json['and_qry']['file_count'] = file_count; + } - // This should be using a like with surrounded by %'s - if (location_name) { - params_json['and_qry']['event_location_name'] = location_name; - } + // This should be using a like with surrounded by %'s + if (location_name) { + params_json['and_qry']['event_location_name'] = location_name; + } - // let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}; + // let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}; - // ae_promises.load__event_session_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - ae_promises.load__event_session_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'event_session', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for session searching - // use_alt_mdl: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (event_session_obj_li_get_result) { - if (event_session_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__event_session_props({ - obj_li: event_session_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'session', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // ae_promises.load__event_session_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__event_session_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'event_session', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for session searching + // use_alt_mdl: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (event_session_obj_li_get_result) { + if (event_session_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__event_session_props({ + obj_li: event_session_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'session', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__event_session({ - // obj_type: 'event_session', - // obj_li: event_session_obj_li_get_result - // }); - } - return event_session_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__event_session({ + // obj_type: 'event_session', + // obj_li: event_session_obj_li_get_result + // }); + } + return event_session_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.load__event_session_obj_li:', ae_promises.load__event_session_obj_li); - } - return ae_promises.load__event_session_obj_li; + if (log_lvl) { + console.log('ae_promises.load__event_session_obj_li:', ae_promises.load__event_session_obj_li); + } + return ae_promises.load__event_session_obj_li; } - // This function will loop through the event_session_obj_li and save each one to the DB. // Updated 2025-05-09 -export async function db_save_ae_obj_li__event_session( - { - obj_type, - obj_li, - log_lvl = 0 - }: { - obj_type: string, - obj_li: any, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** db_save_ae_obj_li__event_session() *** obj_type=${obj_type}`, obj_li); - } +export async function db_save_ae_obj_li__event_session({ + obj_type, + obj_li, + log_lvl = 0 +}: { + obj_type: string; + obj_li: any; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** db_save_ae_obj_li__event_session() *** obj_type=${obj_type}`, obj_li); + } - if (obj_li && obj_li.length) { - let obj_li_id: string[] = []; + if (obj_li && obj_li.length) { + const obj_li_id: string[] = []; - for (const obj of obj_li) { - if (log_lvl) { - console.log(`Processing ae_obj ${obj_type}:`, obj); - } + for (const obj of obj_li) { + if (log_lvl) { + console.log(`Processing ae_obj ${obj_type}:`, obj); + } - let obj_record = { - id: obj.event_session_id_random, - event_session_id: obj.event_session_id_random, - event_session_id_random: obj.event_session_id_random, + const obj_record = { + id: obj.event_session_id_random, + event_session_id: obj.event_session_id_random, + event_session_id_random: obj.event_session_id_random, - external_id: obj.external_id, - code: obj.code, + external_id: obj.external_id, + code: obj.code, - for_type: obj.for_type, - for_id: obj.for_id_id_random, - for_id_random: obj.for_id_random, + for_type: obj.for_type, + for_id: obj.for_id_id_random, + for_id_random: obj.for_id_random, - type_code: obj.type_code, + type_code: obj.type_code, - event_id: obj.event_id_random, - event_id_random: obj.event_id_random, - event_location_id: obj.event_location_id_random, - event_location_id_random: obj.event_location_id_random, + event_id: obj.event_id_random, + event_id_random: obj.event_id_random, + event_location_id: obj.event_location_id_random, + event_location_id_random: obj.event_location_id_random, - poc_person_id: obj.poc_person_id_random, - poc_person_id_random: obj.poc_person_id_random, - poc_agree: obj.poc_agree, - poc_kv_json: obj.poc_kv_json ?? {}, + poc_person_id: obj.poc_person_id_random, + poc_person_id_random: obj.poc_person_id_random, + poc_agree: obj.poc_agree, + poc_kv_json: obj.poc_kv_json ?? {}, - name: obj.name, - description: obj.description, + name: obj.name, + description: obj.description, - start_datetime: obj.start_datetime, - end_datetime: obj.end_datetime, + start_datetime: obj.start_datetime, + end_datetime: obj.end_datetime, - passcode: obj.passcode, + passcode: obj.passcode, - hide_event_launcher: obj.hide_event_launcher, + hide_event_launcher: obj.hide_event_launcher, - alert: obj.alert, - alert_msg: obj.alert_msg, + alert: obj.alert, + alert_msg: obj.alert_msg, - data_json: obj.data_json, + data_json: obj.data_json, - ux_mode: obj.ux_mode, + ux_mode: obj.ux_mode, - enable: obj.enable, - hide: obj.hide, - priority: obj.priority, - sort: obj.sort, - group: obj.group, - notes: obj.notes, - created_on: obj.created_on, - updated_on: obj.updated_on, + enable: obj.enable, + hide: obj.hide, + priority: obj.priority, + sort: obj.sort, + group: obj.group, + notes: obj.notes, + created_on: obj.created_on, + updated_on: obj.updated_on, - // From SQL view - file_count: obj.file_count, - file_count_all: obj.file_count_all, - internal_use_count: obj.internal_use_count, - event_file_id_li_json: obj.event_file_id_li_json, + // From SQL view + file_count: obj.file_count, + file_count_all: obj.file_count_all, + internal_use_count: obj.internal_use_count, + event_file_id_li_json: obj.event_file_id_li_json, - poc_person_given_name: obj.poc_person_given_name, - poc_person_family_name: obj.poc_person_family_name, - poc_person_full_name: obj.poc_person_full_name, - poc_person_primary_email: obj.poc_person_primary_email, - poc_person_passcode: obj.poc_person_passcode, + poc_person_given_name: obj.poc_person_given_name, + poc_person_family_name: obj.poc_person_family_name, + poc_person_full_name: obj.poc_person_full_name, + poc_person_primary_email: obj.poc_person_primary_email, + poc_person_passcode: obj.poc_person_passcode, - event_name: obj.event_name, + event_name: obj.event_name, - event_location_code: obj.event_location_code, - event_location_name: obj.event_location_name, + event_location_code: obj.event_location_code, + event_location_name: obj.event_location_name, - // A key value list of the presentations - event_presentation_kv: obj.event_presentation_kv, - event_presentation_li: obj.event_presentation_li, - }; + // A key value list of the presentations + event_presentation_kv: obj.event_presentation_kv, + event_presentation_li: obj.event_presentation_li + }; - let id_random = null; + let id_random = null; - try { - id_random = await db_events.session.update(obj_record.id, obj_record); - } catch (error) { - console.error(`Error: Failed to update ${obj_record.id}: ${error}`); - } + try { + id_random = await db_events.session.update(obj_record.id, obj_record); + } catch (error) { + console.error(`Error: Failed to update ${obj_record.id}: ${error}`); + } - if (!id_random) { - if (log_lvl) { - console.log(`Failed to update record with ID: ${obj_record.id}. Trying put...`); - } - try { - id_random = await db_events.session.put(obj_record); - } catch (error) { - console.error(`Error: Failed to put ${obj.event_session_id_random}: ${error}`); - } - } else { - if (log_lvl) { - console.log(`Updated record with ID: ${obj_record.id}`); - } - } + if (!id_random) { + if (log_lvl) { + console.log(`Failed to update record with ID: ${obj_record.id}. Trying put...`); + } + try { + id_random = await db_events.session.put(obj_record); + } catch (error) { + console.error(`Error: Failed to put ${obj.event_session_id_random}: ${error}`); + } + } else { + if (log_lvl) { + console.log(`Updated record with ID: ${obj_record.id}`); + } + } - if (!id_random) { - console.error(`Failed to save record with ID: ${obj_record.id}`); - } else { - if (log_lvl) { - console.log(`Saved record with ID: ${obj_record.id}`); - } - obj_li_id.push(obj_record.id); - } - } + if (!id_random) { + console.error(`Failed to save record with ID: ${obj_record.id}`); + } else { + if (log_lvl) { + console.log(`Saved record with ID: ${obj_record.id}`); + } + obj_li_id.push(obj_record.id); + } + } - return obj_li_id; - } else { - if (log_lvl) { - console.log('No objects to save.'); - } - return []; - } + return obj_li_id; + } else { + if (log_lvl) { + console.log('No objects to save.'); + } + return []; + } } - // This is intended for the Point of Contact (POC) for the session. // Updated 2024-07-01 -export async function email_sign_in__event_session ( - { - api_cfg, - to_email, - to_name, - base_url, - person_id, - person_passcode, - event_id, - event_session_id, - session_name, - }: { - api_cfg: any, - to_email: string, - to_name: string, - base_url: string, - person_id: string, - person_passcode: string, - event_id: string, - event_session_id: string, - session_name: string, - } - ) { - console.log(`*** email_sign_in__event_session() *** to_email=${to_email} to_name=${to_name} person_id=${person_id} person_passcode=${person_passcode} session_id=${event_session_id}`); +export async function email_sign_in__event_session({ + api_cfg, + to_email, + to_name, + base_url, + person_id, + person_passcode, + event_id, + event_session_id, + session_name +}: { + api_cfg: any; + to_email: string; + to_name: string; + base_url: string; + person_id: string; + person_passcode: string; + event_id: string; + event_session_id: string; + session_name: string; +}) { + console.log( + `*** email_sign_in__event_session() *** to_email=${to_email} to_name=${to_name} person_id=${person_id} person_passcode=${person_passcode} session_id=${event_session_id}` + ); - let subject = `LCI Congress 2025 - Pres Mgmt Hub Sign In Link for ${session_name} (ID: ${event_session_id})`; + const subject = `LCI Congress 2025 - Pres Mgmt Hub Sign In Link for ${session_name} (ID: ${event_session_id})`; - let sign_in_url = encodeURI(`${base_url}/events/${event_id}/session/${event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&session_id=${event_session_id}`) + const sign_in_url = encodeURI( + `${base_url}/events/${event_id}/session/${event_session_id}?person_id=${person_id}&person_pass=${person_passcode}&session_id=${event_session_id}` + ); - let body_html = ` + const body_html = `
${to_name},

Your link to sign into the presentation management hub as a session Champion for LCI Congress 2025 is below. If you did not request this, please delete and ignore this email. If you need to make any changes or updates to your submission, you may use this link again later.

@@ -1132,97 +1134,95 @@ export async function email_sign_in__event_session ( Copy and paste link: ${sign_in_url}

`; - api.send_email({ - api_cfg: api_cfg, - from_email: 'noreply+presmgmt@oneskyit.com', - from_name: 'LCI 2025 Pres Mgmt Hub', - to_email: to_email, - subject: subject, - body_html: body_html, - }); + api.send_email({ + api_cfg: api_cfg, + from_email: 'noreply+presmgmt@oneskyit.com', + from_name: 'LCI 2025 Pres Mgmt Hub', + to_email: to_email, + subject: subject, + body_html: body_html + }); } - // Updated 2025-05-09 export const properties_to_save = [ - 'id', - 'event_session_id', - // 'event_session_id_random', + 'id', + 'event_session_id', + // 'event_session_id_random', - 'external_id', - 'code', + 'external_id', + 'code', - 'for_type', - 'for_id', - // 'for_id_random', + 'for_type', + 'for_id', + // 'for_id_random', - 'type_code', + 'type_code', - 'event_id', - // 'event_id_random', - 'event_location_id', - // 'event_location_id_random', + 'event_id', + // 'event_id_random', + 'event_location_id', + // 'event_location_id_random', - 'poc_person_id', - // 'poc_person_id_random', - 'poc_agree', - 'poc_kv_json', + 'poc_person_id', + // 'poc_person_id_random', + 'poc_agree', + 'poc_kv_json', - 'name', - 'description', + 'name', + 'description', - 'start_datetime', - 'end_datetime', + 'start_datetime', + 'end_datetime', - 'passcode', + 'passcode', - 'hide_event_launcher', + 'hide_event_launcher', - 'alert', - 'alert_msg', + 'alert', + 'alert_msg', - 'data_json', + 'data_json', - 'ux_mode', + 'ux_mode', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - 'file_count', - 'file_count_all', - 'internal_use_count', - 'event_file_id_li_json', + // From SQL view + 'file_count', + 'file_count_all', + 'internal_use_count', + 'event_file_id_li_json', - 'poc_person_given_name', - 'poc_person_family_name', - 'poc_person_full_name', - 'poc_person_primary_email', - 'poc_person_passcode', + 'poc_person_given_name', + 'poc_person_family_name', + 'poc_person_full_name', + 'poc_person_primary_email', + 'poc_person_passcode', - 'event_name', + 'event_name', - 'event_location_code', - 'event_location_name', + 'event_location_code', + 'event_location_name', - // A key value list of the presentations - 'event_presentation_kv', - 'event_presentation_li', + // A key value list of the presentations + 'event_presentation_kv', + 'event_presentation_li' ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -1291,7 +1291,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-05-09 export async function process_ae_obj__event_session_props({ obj_li, @@ -1316,4 +1315,4 @@ export async function process_ae_obj__event_session_props({ return obj; } }); -} \ No newline at end of file +} diff --git a/src/lib/ae_events/ae_events__exhibit.ts b/src/lib/ae_events/ae_events__exhibit.ts index a35f73cc..ddedd58e 100644 --- a/src/lib/ae_events/ae_events__exhibit.ts +++ b/src/lib/ae_events/ae_events__exhibit.ts @@ -1,49 +1,48 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_events } from "$lib/ae_events/db_events"; +import { db_events } from '$lib/ae_events/db_events'; // --- PROPERTIES TO SAVE --- export const properties_to_save_exhibit_tracking = [ - 'id', - 'event_exhibit_tracking_id', - 'event_exhibit_id', - 'event_badge_id', - 'event_person_id', - 'external_person_id', - 'exhibitor_notes', - 'responses_json', - 'data_json', - 'event_exhibit_name', - 'event_badge_title_names', - 'event_badge_given_name', - 'event_badge_family_name', - 'event_badge_designations', - 'event_badge_full_name', - 'event_badge_full_name_override', - 'event_badge_professional_title', - 'event_badge_professional_title_override', - 'event_badge_affiliations', - 'event_badge_affiliations_override', - 'event_badge_email', - 'event_badge_email_override', - 'event_badge_location', - 'event_badge_location_override', - 'event_badge_country', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', + 'id', + 'event_exhibit_tracking_id', + 'event_exhibit_id', + 'event_badge_id', + 'event_person_id', + 'external_person_id', + 'exhibitor_notes', + 'responses_json', + 'data_json', + 'event_exhibit_name', + 'event_badge_title_names', + 'event_badge_given_name', + 'event_badge_family_name', + 'event_badge_designations', + 'event_badge_full_name', + 'event_badge_full_name_override', + 'event_badge_professional_title', + 'event_badge_professional_title_override', + 'event_badge_affiliations', + 'event_badge_affiliations_override', + 'event_badge_email', + 'event_badge_email_override', + 'event_badge_location', + 'event_badge_location_override', + 'event_badge_country', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2' ]; - // --- PROCESS FUNCTION --- export async function process_ae_obj__exhibit_tracking_props({ obj_li, @@ -70,38 +69,36 @@ export async function process_ae_obj__exhibit_tracking_props({ }); } - // --- PROPERTIES TO SAVE --- export const properties_to_save = [ - 'id', - 'event_exhibit_id', - 'event_id', - 'code', - 'name', - 'description', - 'staff_passcode', - 'data_json', - 'leads_api_access', - 'leads_custom_questions_json', - 'leads_device_sm_qty', - 'leads_device_lg_qty', - 'license_max', - 'license_li_json', - 'cfg_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', + 'id', + 'event_exhibit_id', + 'event_id', + 'code', + 'name', + 'description', + 'staff_passcode', + 'data_json', + 'leads_api_access', + 'leads_custom_questions_json', + 'leads_device_sm_qty', + 'leads_device_lg_qty', + 'license_max', + 'license_li_json', + 'cfg_json', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2' ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -170,7 +167,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // --- PROCESS FUNCTION --- export async function process_ae_obj__exhibit_props({ obj_li, @@ -197,547 +193,542 @@ export async function process_ae_obj__exhibit_props({ }); } - // Updated 2024-03 -export async function load_ae_obj_id__exhibit( - { - api_cfg, - exhibit_id, - try_cache=false, - log_lvl=0 - }: { - api_cfg: any, - exhibit_id: string, - try_cache?: boolean, - log_lvl?: number - } - ) { - console.log(`*** load_ae_obj_id__exhibit() *** exhibit_id=${exhibit_id}`); +export async function load_ae_obj_id__exhibit({ + api_cfg, + exhibit_id, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + exhibit_id: string; + try_cache?: boolean; + log_lvl?: number; +}) { + console.log(`*** load_ae_obj_id__exhibit() *** exhibit_id=${exhibit_id}`); - let params = {}; + const params = {}; - // $events_sess.exhibits.status_load__exhibit_obj = 'loading'; - ae_promises.load__exhibit_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_exhibit', - obj_id: exhibit_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - params: params, - log_lvl: log_lvl - }) - .then(async function (exhibit_obj_get_result) { - if (exhibit_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__exhibit_props({ - obj_li: [exhibit_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'exhibit', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return exhibit_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // $events_sess.exhibits.status_load__exhibit_obj = 'loading'; + ae_promises.load__exhibit_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_exhibit', + obj_id: exhibit_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + params: params, + log_lvl: log_lvl + }) + .then(async function (exhibit_obj_get_result) { + if (exhibit_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__exhibit_props({ + obj_li: [exhibit_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'exhibit', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return exhibit_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - return ae_promises.load__exhibit_obj; + return ae_promises.load__exhibit_obj; } - // Updated 2024-03-06 -export async function load_ae_obj_li__exhibit( - { - api_cfg, - event_id, - params={}, - try_cache=true, - log_lvl=0 - }: { - api_cfg: any, - event_id: any, - params: any, - try_cache?: boolean - log_lvl?: number - } - ) { - console.log(`*** load_ae_obj_li__exhibit() *** event_id=${event_id}`); +export async function load_ae_obj_li__exhibit({ + api_cfg, + event_id, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + event_id: any; + params: any; + try_cache?: boolean; + log_lvl?: number; +}) { + console.log(`*** load_ae_obj_li__exhibit() *** event_id=${event_id}`); - let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - let limit: number = (params.qry__limit ?? 99); // 99 - let offset: number = (params.qry__offset ?? 0); // 0 + const enabled: string = params.qry__enabled ?? 'enabled'; // all, disabled, enabled + const hidden: string = params.qry__hidden ?? 'not_hidden'; // all, hidden, not_hidden + const limit: number = params.qry__limit ?? 99; // 99 + const offset: number = params.qry__offset ?? 0; // 0 - let params_json: key_val = {}; - // params_json['and_qry'] = {}; - // params_json['and_qry']['license_max'] = 10; + const params_json: key_val = {}; + // params_json['and_qry'] = {}; + // params_json['and_qry']['license_max'] = 10; - params_json['and_in_li'] = { - license_max : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - }; + params_json['and_in_li'] = { + license_max: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + }; - // if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { - // params_json['ft_qry'] = { - // 'default_qry_str': fulltext_search_qry_str, - // // 'location_address_json_ext': fulltext_search_qry_str, // JSON extracted text DB field - // // 'contact_li_json_ext': fulltext_search_qry_str, // JSON extracted text DB field - // }; - // } + // if (fulltext_search_qry_str && fulltext_search_qry_str.length > 2) { + // params_json['ft_qry'] = { + // 'default_qry_str': fulltext_search_qry_str, + // // 'location_address_json_ext': fulltext_search_qry_str, // JSON extracted text DB field + // // 'contact_li_json_ext': fulltext_search_qry_str, // JSON extracted text DB field + // }; + // } - // console.log('params_json:', params_json); - // console.log(params_json); + // console.log('params_json:', params_json); + // console.log(params_json); - // $events_sess.exhibits.status_qry__search = 'loading'; - ae_promises.load__event_exhibit_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_exhibit', - for_obj_type: 'event', - for_obj_id: event_id, - use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - enabled: enabled, - hidden: hidden, - order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'created_on': 'DESC', 'updated_on': 'DESC'}, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) + // $events_sess.exhibits.status_qry__search = 'loading'; + ae_promises.load__event_exhibit_obj_li = await api + .get_ae_obj_li_for_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_exhibit', + for_obj_type: 'event', + for_obj_id: event_id, + use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + enabled: enabled, + hidden: hidden, + order_by_li: { priority: 'DESC', sort: 'DESC', updated_on: 'DESC', created_on: 'DESC' }, + // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'created_on': 'DESC', 'updated_on': 'DESC'}, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) - .then(async function (exhibit_obj_li_get_result) { - // console.log('Badge list:', exhibit_obj_li_get_result); - if (exhibit_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__exhibit_props({ - obj_li: exhibit_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'exhibit', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return exhibit_obj_li_get_result; - } else { - // $slct.exhibit_obj_li = []; - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - // $events_sess.exhibits.status_qry__search = 'done'; + .then(async function (exhibit_obj_li_get_result) { + // console.log('Badge list:', exhibit_obj_li_get_result); + if (exhibit_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__exhibit_props({ + obj_li: exhibit_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'exhibit', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return exhibit_obj_li_get_result; + } else { + // $slct.exhibit_obj_li = []; + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + // $events_sess.exhibits.status_qry__search = 'done'; + // console.log('Badge list:', exhibit_obj_li_get_result); + // return exhibit_obj_li_get_result; + }); - // console.log('Badge list:', exhibit_obj_li_get_result); - // return exhibit_obj_li_get_result; - }); - - if (log_lvl) { - console.log('ae_promises.load__event_exhibit_obj_li:', ae_promises.load__event_exhibit_obj_li); - } - return ae_promises.load__event_exhibit_obj_li; + if (log_lvl) { + console.log('ae_promises.load__event_exhibit_obj_li:', ae_promises.load__event_exhibit_obj_li); + } + return ae_promises.load__event_exhibit_obj_li; } +export async function load_ae_obj_id__exhibit_tracking({ + api_cfg, + exhibit_tracking_id, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + exhibit_tracking_id: string; + try_cache?: boolean; + log_lvl?: number; +}) { + console.log( + `*** load_ae_obj_id__exhibit_tracking() *** exhibit_tracking_id=${exhibit_tracking_id}` + ); -export async function load_ae_obj_id__exhibit_tracking( - { - api_cfg, - exhibit_tracking_id, - try_cache=false, - log_lvl=0 - }: { - api_cfg: any, - exhibit_tracking_id: string, - try_cache?: boolean, - log_lvl?: number - } - ) { - console.log(`*** load_ae_obj_id__exhibit_tracking() *** exhibit_tracking_id=${exhibit_tracking_id}`); + const params = {}; - let params = {}; + // $events_sess.exhibits.status_load__exhibit_tracking_obj = 'loading'; + ae_promises.load__event_exhibit_tracking_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_exhibit_tracking', + obj_id: exhibit_tracking_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + params: params, + log_lvl: log_lvl + }) + .then(async function (exhibit_tracking_obj_get_result) { + if (exhibit_tracking_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__exhibit_tracking_props({ + obj_li: [exhibit_tracking_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'exhibit_tracking', + obj_li: processed_obj_li, + properties_to_save: properties_to_save_exhibit_tracking, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return exhibit_tracking_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - // $events_sess.exhibits.status_load__exhibit_tracking_obj = 'loading'; - ae_promises.load__event_exhibit_tracking_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_exhibit_tracking', - obj_id: exhibit_tracking_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - params: params, - log_lvl: log_lvl - }) - .then(async function (exhibit_tracking_obj_get_result) { - if (exhibit_tracking_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__exhibit_tracking_props({ - obj_li: [exhibit_tracking_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'exhibit_tracking', - obj_li: processed_obj_li, - properties_to_save: properties_to_save_exhibit_tracking, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return exhibit_tracking_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); - - return ae_promises.load__event_exhibit_tracking_obj; + return ae_promises.load__event_exhibit_tracking_obj; } - // Updated 2024-03-19 -export async function load_ae_obj_li__exhibit_tracking( - { - api_cfg, - exhibit_id, - params={}, - try_cache=true, - log_lvl=0 - }: { - api_cfg: any, - exhibit_id: any, - params: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - console.log(`*** load_ae_obj_li__exhibit_tracking() *** exhibit_id=${exhibit_id}`); +export async function load_ae_obj_li__exhibit_tracking({ + api_cfg, + exhibit_id, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + exhibit_id: any; + params: any; + try_cache?: boolean; + log_lvl?: number; +}) { + console.log(`*** load_ae_obj_li__exhibit_tracking() *** exhibit_id=${exhibit_id}`); - let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - let hidden: string = (params.qry__hidden ?? 'all'); // all, hidden, not_hidden - let limit: number = (params.qry__limit ?? 99); // 99 - let offset: number = (params.qry__offset ?? 0); // 0 + const enabled: string = params.qry__enabled ?? 'enabled'; // all, disabled, enabled + const hidden: string = params.qry__hidden ?? 'all'; // all, hidden, not_hidden + const limit: number = params.qry__limit ?? 99; // 99 + const offset: number = params.qry__offset ?? 0; // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - ae_promises.load__event_exhibit_tracking_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_exhibit_tracking', - for_obj_type: 'event_exhibit', - for_obj_id: exhibit_id, - use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - enabled: enabled, - hidden: hidden, - order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) + ae_promises.load__event_exhibit_tracking_obj_li = await api + .get_ae_obj_li_for_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_exhibit_tracking', + for_obj_type: 'event_exhibit', + for_obj_id: exhibit_id, + use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + enabled: enabled, + hidden: hidden, + order_by_li: { priority: 'DESC', sort: 'DESC', updated_on: 'DESC', created_on: 'DESC' }, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) - .then(async function (exhibit_tracking_obj_li_get_result) { - // console.log('Exhibit tracking list:', exhibit_tracking_obj_li_get_result); - if (exhibit_tracking_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__exhibit_tracking_props({ - obj_li: exhibit_tracking_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'exhibit_tracking', - obj_li: processed_obj_li, - properties_to_save: properties_to_save_exhibit_tracking, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return exhibit_tracking_obj_li_get_result; - } else { - // $slct.exhibit_tracking_obj_li = []; - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - // console.log('Exhibit tracking list:', exhibit_tracking_obj_li_get_result); - // return exhibit_tracking_obj_li_get_result; - }); + .then(async function (exhibit_tracking_obj_li_get_result) { + // console.log('Exhibit tracking list:', exhibit_tracking_obj_li_get_result); + if (exhibit_tracking_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__exhibit_tracking_props({ + obj_li: exhibit_tracking_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'exhibit_tracking', + obj_li: processed_obj_li, + properties_to_save: properties_to_save_exhibit_tracking, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return exhibit_tracking_obj_li_get_result; + } else { + // $slct.exhibit_tracking_obj_li = []; + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + // console.log('Exhibit tracking list:', exhibit_tracking_obj_li_get_result); + // return exhibit_tracking_obj_li_get_result; + }); - if (log_lvl) { - console.log('ae_promises.load__event_exhibit_tracking_obj_li:', ae_promises.load__event_exhibit_tracking_obj_li); - } - return ae_promises.load__event_exhibit_tracking_obj_li; + if (log_lvl) { + console.log( + 'ae_promises.load__event_exhibit_tracking_obj_li:', + ae_promises.load__event_exhibit_tracking_obj_li + ); + } + return ae_promises.load__event_exhibit_tracking_obj_li; } - // Updated 2024-03-22 -export async function create_ae_obj__exhibit_tracking( - { - api_cfg, - exhibit_id, - event_badge_id, - external_person_id, - params={}, - log_lvl=0 - }: { - api_cfg: any, - exhibit_id: string, - event_badge_id: string, - external_person_id: string, - params: key_val, - log_lvl: number - } - ) { - console.log(`*** handle_create_ae_obj__exhibit_tracking() *** exhibit_id=${exhibit_id}, event_badge_id=${event_badge_id}`); +export async function create_ae_obj__exhibit_tracking({ + api_cfg, + exhibit_id, + event_badge_id, + external_person_id, + params = {}, + log_lvl = 0 +}: { + api_cfg: any; + exhibit_id: string; + event_badge_id: string; + external_person_id: string; + params: key_val; + log_lvl: number; +}) { + console.log( + `*** handle_create_ae_obj__exhibit_tracking() *** exhibit_id=${exhibit_id}, event_badge_id=${event_badge_id}` + ); - let params_json: key_val = {}; + const params_json: key_val = {}; - // $events_sess.exhibits.status_create__exhibit_tracking = 'loading'; - ae_promises.create__event_exhibit_tracking = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'event_exhibit_tracking', - fields: { - event_exhibit_id_random: exhibit_id, - event_badge_id_random: event_badge_id, - external_person_id: external_person_id, - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) + // $events_sess.exhibits.status_create__exhibit_tracking = 'loading'; + ae_promises.create__event_exhibit_tracking = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'event_exhibit_tracking', + fields: { + event_exhibit_id_random: exhibit_id, + event_badge_id_random: event_badge_id, + external_person_id: external_person_id + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) - .then(async function (exhibit_tracking_obj_create_result) { - // console.log('Exhibit tracking create:', exhibit_tracking_obj_create_result); - if (exhibit_tracking_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__exhibit_tracking_props({ - obj_li: [exhibit_tracking_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'exhibit_tracking', - obj_li: processed_obj_li, - properties_to_save: properties_to_save_exhibit_tracking, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return exhibit_tracking_obj_create_result; - } else { - // $slct.exhibit_tracking_obj = []; - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - // console.log('Exhibit tracking create:', exhibit_tracking_obj_create_result); - // return exhibit_tracking_obj_create_result; - }); + .then(async function (exhibit_tracking_obj_create_result) { + // console.log('Exhibit tracking create:', exhibit_tracking_obj_create_result); + if (exhibit_tracking_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__exhibit_tracking_props({ + obj_li: [exhibit_tracking_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'exhibit_tracking', + obj_li: processed_obj_li, + properties_to_save: properties_to_save_exhibit_tracking, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return exhibit_tracking_obj_create_result; + } else { + // $slct.exhibit_tracking_obj = []; + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + // console.log('Exhibit tracking create:', exhibit_tracking_obj_create_result); + // return exhibit_tracking_obj_create_result; + }); - if (log_lvl) { - console.log('ae_promises.create__event_exhibit_tracking:', ae_promises.create__event_exhibit_tracking); - } - return ae_promises.create__event_exhibit_tracking; + if (log_lvl) { + console.log( + 'ae_promises.create__event_exhibit_tracking:', + ae_promises.create__event_exhibit_tracking + ); + } + return ae_promises.create__event_exhibit_tracking; } - // Updated 2024-03-28 -export async function update_ae_obj__exhibit_tracking( - { - api_cfg, - exhibit_tracking_id, - data, - params={}, - log_lvl=0 - }: { - api_cfg: any, - exhibit_tracking_id: string, - data: any, - params: key_val, - log_lvl: number - } - ) { - console.log(`*** handle_update_ae_obj__exhibit_tracking() *** exhibit_tracking_id=${exhibit_tracking_id}`); +export async function update_ae_obj__exhibit_tracking({ + api_cfg, + exhibit_tracking_id, + data, + params = {}, + log_lvl = 0 +}: { + api_cfg: any; + exhibit_tracking_id: string; + data: any; + params: key_val; + log_lvl: number; +}) { + console.log( + `*** handle_update_ae_obj__exhibit_tracking() *** exhibit_tracking_id=${exhibit_tracking_id}` + ); - ae_promises.update__event_exhibit_tracking = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'event_exhibit_tracking', - obj_id: exhibit_tracking_id, - fields: data, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (exhibit_tracking_obj_update_result) { - if (exhibit_tracking_obj_update_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__exhibit_tracking_props({ - obj_li: [exhibit_tracking_obj_update_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_events, - table_name: 'exhibit_tracking', - obj_li: processed_obj_li, - properties_to_save: properties_to_save_exhibit_tracking, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return exhibit_tracking_obj_update_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + ae_promises.update__event_exhibit_tracking = await api + .update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'event_exhibit_tracking', + obj_id: exhibit_tracking_id, + fields: data, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (exhibit_tracking_obj_update_result) { + if (exhibit_tracking_obj_update_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__exhibit_tracking_props({ + obj_li: [exhibit_tracking_obj_update_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_events, + table_name: 'exhibit_tracking', + obj_li: processed_obj_li, + properties_to_save: properties_to_save_exhibit_tracking, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return exhibit_tracking_obj_update_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.update__event_exhibit_tracking:', ae_promises.update__event_exhibit_tracking); - } - return ae_promises.update__event_exhibit_tracking; + if (log_lvl) { + console.log( + 'ae_promises.update__event_exhibit_tracking:', + ae_promises.update__event_exhibit_tracking + ); + } + return ae_promises.update__event_exhibit_tracking; } +export async function download_export__event_exhibit_tracking({ + api_cfg, + exhibit_id, + file_type = 'CSV', // 'CSV' or 'Excel' + return_file = true, + filename = 'no_filename.csv', + auto_download = false, + params = {}, + log_lvl = 0 +}: { + api_cfg: any; + exhibit_id: string; + file_type?: string; + return_file?: boolean; + filename?: string; + auto_download?: boolean; + params?: key_val; + log_lvl?: number; +}) { + console.log('*** ae_events_functions.js: get_event_exhibit_tracking_export() ***'); -export async function download_export__event_exhibit_tracking( - { - api_cfg, - exhibit_id, - file_type='CSV', // 'CSV' or 'Excel' - return_file=true, - filename='no_filename.csv', - auto_download=false, - params={}, - log_lvl=0 - }: { - api_cfg: any, - exhibit_id: string, - file_type?: string, - return_file?: boolean, - filename?: string, - auto_download?: boolean, - params?: key_val, - log_lvl?: number - } - ) { - console.log('*** ae_events_functions.js: get_event_exhibit_tracking_export() ***'); + const endpoint = `/event/exhibit/${exhibit_id}/tracking/export`; + if (file_type == 'CSV' || file_type == 'Excel') { + params['file_type'] = file_type; + } + params['return_file'] = true; - const endpoint = `/event/exhibit/${exhibit_id}/tracking/export`; - if (file_type == 'CSV' || file_type == 'Excel') { - params['file_type'] = file_type; - } - params['return_file'] = true; + ae_promises.download__event_exhibit_tracking_export_file = await api.get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + return_blob: true, + filename: filename, + auto_download: auto_download, + log_lvl: log_lvl + }); - ae_promises.download__event_exhibit_tracking_export_file = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - return_blob: true, - filename: filename, - auto_download: auto_download, - log_lvl: log_lvl - }); - - if (log_lvl) { - console.log('ae_promises.download__event_exhibit_tracking_export_file:', ae_promises.download__event_exhibit_tracking_export_file); - } - return ae_promises.download__event_exhibit_tracking_export_file; + if (log_lvl) { + console.log( + 'ae_promises.download__event_exhibit_tracking_export_file:', + ae_promises.download__event_exhibit_tracking_export_file + ); + } + return ae_promises.download__event_exhibit_tracking_export_file; } - - - - - - diff --git a/src/lib/ae_events/db_events.ts b/src/lib/ae_events/db_events.ts index 6acf7f9e..cb5b4177 100644 --- a/src/lib/ae_events/db_events.ts +++ b/src/lib/ae_events/db_events.ts @@ -7,805 +7,793 @@ import type { key_val } from '$lib/stores/ae_stores'; // Updated 2024-10-16 export interface Event { - id: string; - // id_random: string; - event_id: string; - event_id_random: string; + id: string; + // id_random: string; + event_id: string; + event_id_random: string; - code: string; + code: string; - account_id: string; - account_id_random: string; + account_id: string; + account_id_random: string; - conference: boolean; - type: string; - name: string; - summary?: null|string; - description?: null|string; + conference: boolean; + type: string; + name: string; + summary?: null | string; + description?: null | string; - start_datetime?: Date; - end_datetime?: Date; - timezone?: null|string; - location_address_json?: null|string; - location_text?: null|string; + start_datetime?: Date; + end_datetime?: Date; + timezone?: null | string; + location_address_json?: null | string; + location_text?: null | string; - attend_json?: null|string; - attend_text?: null|string; + attend_json?: null | string; + attend_text?: null | string; - status?: null|string; // draft, active, inactive, archived, unknown; currently only used with IDAA - // review?: null|boolean; - // approve?: null|boolean; - // ready?: null|boolean; - // ready_on?: null|Date; - // archive?: null|boolean; - // archive_on?: null|Date; + status?: null | string; // draft, active, inactive, archived, unknown; currently only used with IDAA + // review?: null|boolean; + // approve?: null|boolean; + // ready?: null|boolean; + // ready_on?: null|Date; + // archive?: null|boolean; + // archive_on?: null|Date; - mod_abstracts_json?: null|key_val; - mod_badges_json?: null|key_val; - mod_exhibits_json?: null|key_val; - mod_meetings_json?: null|key_val; - mod_pres_mgmt_json?: null|key_val; - cfg_json?: null|key_val; + mod_abstracts_json?: null | key_val; + mod_badges_json?: null | key_val; + mod_exhibits_json?: null | key_val; + mod_meetings_json?: null | key_val; + mod_pres_mgmt_json?: null | key_val; + cfg_json?: null | key_val; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // IDAA Recovery Meetings: - // Currently only really used for IDAA - contact_li_json?: null|string[]; // full_name, email, phone_mobile, phone_home, phone_office, other_text - // contact_li_json_ext?: null|string; - external_person_id?: null|string; + // IDAA Recovery Meetings: + // Currently only really used for IDAA + contact_li_json?: null | string[]; // full_name, email, phone_mobile, phone_home, phone_office, other_text + // contact_li_json_ext?: null|string; + external_person_id?: null | string; - physical?: null|boolean; - virtual?: null|boolean; + physical?: null | boolean; + virtual?: null | boolean; - recurring?: null|boolean; - recurring_pattern?: null|string; - recurring_start_time?: null|string; - recurring_end_time?: null|string; - recurring_text?: null|string; + recurring?: null | boolean; + recurring_pattern?: null | string; + recurring_start_time?: null | string; + recurring_end_time?: null | string; + recurring_text?: null | string; - weekday_sunday?: null|boolean; - weekday_monday?: null|boolean; - weekday_tuesday?: null|boolean; - weekday_wednesday?: null|boolean; - weekday_thursday?: null|boolean; - weekday_friday?: null|boolean; - weekday_saturday?: null|boolean; + weekday_sunday?: null | boolean; + weekday_monday?: null | boolean; + weekday_tuesday?: null | boolean; + weekday_wednesday?: null | boolean; + weekday_thursday?: null | boolean; + weekday_friday?: null | boolean; + weekday_saturday?: null | boolean; - attend_url?: null|string; - attend_url_text?: null|string; - attend_url_code?: null|string; // Meeting ID, Conference ID, etc. - attend_url_passcode?: null|string; - attend_phone?: null|string; - attend_phone_passcode?: null|string; + attend_url?: null | string; + attend_url_text?: null | string; + attend_url_code?: null | string; // Meeting ID, Conference ID, etc. + attend_url_passcode?: null | string; + attend_phone?: null | string; + attend_phone_passcode?: null | string; - // Additional fields for convenience (database views) - file_count?: null|number; - file_count_all?: null|number; - internal_use_count?: null|number; - event_file_id_li_json?: null|string; + // Additional fields for convenience (database views) + file_count?: null | number; + file_count_all?: null | number; + internal_use_count?: null | number; + event_file_id_li_json?: null | string; } - // Updated 2025-10-06 export interface Badge { - id: number; - // id_random: string; - event_badge_id: string; - event_badge_id_random: string; + id: number; + // id_random: string; + event_badge_id: string; + event_badge_id_random: string; - event_id: string; - event_id_random: string; + event_id: string; + event_id_random: string; - event_badge_template_id?: null|string; - event_badge_template_id_random?: null|string; + event_badge_template_id?: null | string; + event_badge_template_id_random?: null | string; - pronouns?: null|string; - informal_name?: null|string; - title_names?: null|string; - given_name: string; - middle_name?: null|string; - family_name?: null|string; - designations?: null|string; + pronouns?: null | string; + informal_name?: null | string; + title_names?: null | string; + given_name: string; + middle_name?: null | string; + family_name?: null | string; + designations?: null | string; - professional_title?: null|string; - professional_title_override?: null|string; + professional_title?: null | string; + professional_title_override?: null | string; - full_name?: string; - full_name_override?: null|string; + full_name?: string; + full_name_override?: null | string; - affiliations?: string; - affiliations_override?: null|string; + affiliations?: string; + affiliations_override?: null | string; - email?: string; - email_override?: null|string; + email?: string; + email_override?: null | string; - address_line_1?: null|string; - address_line_2?: null|string; - address_line_3?: null|string; - city?: null|string; - country_subdivision_code?: null|string; - state_province?: null|string; - state_province_abb?: null|string; - postal_code?: null|string; - country_alpha_2_code?: null|string; - country?: null|string; - full_address?: null|string; - location?: null|string; - location_override?: null|string; + address_line_1?: null | string; + address_line_2?: null | string; + address_line_3?: null | string; + city?: null | string; + country_subdivision_code?: null | string; + state_province?: null | string; + state_province_abb?: null | string; + postal_code?: null | string; + country_alpha_2_code?: null | string; + country?: null | string; + full_address?: null | string; + location?: null | string; + location_override?: null | string; - query_str?: null|string; + query_str?: null | string; - badge_type?: string; - badge_type_code?: string; - badge_type_code_override?: null|string; - badge_type_override?: null|string; + badge_type?: string; + badge_type_code?: string; + badge_type_code_override?: null | string; + badge_type_override?: null | string; - external_event_id?: string; - external_id?: string; - external_person_id?: string; + external_event_id?: string; + external_id?: string; + external_person_id?: string; - // passcode?: null|string; + // passcode?: null|string; - // data_json?: null|string; + // data_json?: null|string; - default_qry_string?: null|string; + default_qry_string?: null | string; - alert?: null|boolean; + alert?: null | boolean; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - person_external_id?: null|string; // This may be semi-random or unique only withing the account. - person_external_sys_id?: null|string; // Generated by an external system. Ideally this should be something like a UUID. It may be the same as the external_id if nothing given. - person_given_name?: string; - person_family_name?: null|string; - person_full_name?: null|string; - person_professional_title?: null|string; - person_affiliations?: null|string; - person_primary_email?: null|string; - person_passcode?: null|string; + // Additional fields for convenience (database views) + person_external_id?: null | string; // This may be semi-random or unique only withing the account. + person_external_sys_id?: null | string; // Generated by an external system. Ideally this should be something like a UUID. It may be the same as the external_id if nothing given. + person_given_name?: string; + person_family_name?: null | string; + person_full_name?: null | string; + person_professional_title?: null | string; + person_affiliations?: null | string; + person_primary_email?: null | string; + person_passcode?: null | string; } - // Updated 2025-10-06 export interface Badge_template { - id: number; - // id_random: string; + id: number; + // id_random: string; - event_id: string; - event_id_random: string; + event_id: string; + event_id_random: string; - name: string; - description?: null|string; + name: string; + description?: null | string; - logo_filename?: null|string; - logo_path?: null|string; + logo_filename?: null | string; + logo_path?: null | string; - header_path?: null|string; - secondary_header_path?: null|string; - footer_path?: null|string; + header_path?: null | string; + secondary_header_path?: null | string; + footer_path?: null | string; - header_row_1?: null|string; - header_row_2?: null|string; + header_row_1?: null | string; + header_row_2?: null | string; - badge_type_list?: any; // This is an array of objects with code and name - badge_type_info_kv?: any; // This is a key value list with code as the key and name as the value. Use this for exhibitor, presenter, attendee, staff, vip, etc. - other_info_kv?: any; // This is a key value list with code as the key and name as the value. Use this for other custom fields. + badge_type_list?: any; // This is an array of objects with code and name + badge_type_info_kv?: any; // This is a key value list with code as the key and name as the value. Use this for exhibitor, presenter, attendee, staff, vip, etc. + other_info_kv?: any; // This is a key value list with code as the key and name as the value. Use this for other custom fields. - ticket_list?: any; // This is an array of objects with num, code, and name + ticket_list?: any; // This is an array of objects with num, code, and name - ticket_1_text?: null|string; - ticket_2_text?: null|string; - ticket_3_text?: null|string; - ticket_4_text?: null|string; - ticket_5_text?: null|string; - ticket_6_text?: null|string; - ticket_7_text?: null|string; - ticket_8_text?: null|string; + ticket_1_text?: null | string; + ticket_2_text?: null | string; + ticket_3_text?: null | string; + ticket_4_text?: null | string; + ticket_5_text?: null | string; + ticket_6_text?: null | string; + ticket_7_text?: null | string; + ticket_8_text?: null | string; - wireless_ssid?: null|string; - wireless_password?: null|string; + wireless_ssid?: null | string; + wireless_password?: null | string; - show_qr_front: boolean; - show_qr_back: boolean; + show_qr_front: boolean; + show_qr_back: boolean; - layout?: null|string; - style_filename?: null|string; + layout?: null | string; + style_filename?: null | string; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only + // Generated fields for sorting locally only - // Additional fields for convenience (database views) + // Additional fields for convenience (database views) } // Updated 2024-10-16 export interface Device { - id: number; - // id_random: string; - event_device_id: string; - // event_device_id_random: string; + id: number; + // id_random: string; + event_device_id: string; + // event_device_id_random: string; - event_id: string; - // event_id_random: string; - event_location_id?: string; - // event_location_id_random?: string; + event_id: string; + // event_id_random: string; + event_location_id?: string; + // event_location_id_random?: string; - code?: string; - name: string; - description?: null|string; + code?: string; + name: string; + description?: null | string; - passcode?: null|string; + passcode?: null | string; - local_file_cache_path?: null|string; - host_file_temp_path?: null|string; - recording_path?: null|string; + local_file_cache_path?: null | string; + host_file_temp_path?: null | string; + recording_path?: null | string; - record_audio?: null|boolean; - record_video?: null|boolean; + record_audio?: null | boolean; + record_video?: null | boolean; - trigger_open_file_id?: null|string; - trigger_open_session_id?: null|string; - trigger_recording_start?: null|boolean; - trigger_recording_stop?: null|boolean; - trigger_reset?: null|boolean; - trigger_show_admin?: null|boolean; - trigger_show_hidden?: null|boolean; + trigger_open_file_id?: null | string; + trigger_open_session_id?: null | string; + trigger_recording_start?: null | boolean; + trigger_recording_stop?: null | boolean; + trigger_reset?: null | boolean; + trigger_show_admin?: null | boolean; + trigger_show_hidden?: null | boolean; - alert?: null|boolean; - alert_msg?: null|string; - alert_on?: null|string; - status?: null|string; - status_msg?: null|string; - status_on?: null|Date; - record_status?: null|string; - record_status_msg?: null|string; - record_status_on?: null|Date; - heartbeat?: null|string; + alert?: null | boolean; + alert_msg?: null | string; + alert_on?: null | string; + status?: null | string; + status_msg?: null | string; + status_on?: null | Date; + record_status?: null | string; + record_status_msg?: null | string; + record_status_on?: null | Date; + heartbeat?: null | string; - info_hostname?: null|string; - info_ip_list?: null|string; // Semi-colon separated list of IP addresses + info_hostname?: null | string; + info_ip_list?: null | string; // Semi-colon separated list of IP addresses - meta_json?: null|string; - other_json?: null|string; + meta_json?: null | string; + other_json?: null | string; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - event_name?: string; - event_location_code?: string; - event_location_name?: string; + // Additional fields for convenience (database views) + event_name?: string; + event_location_code?: string; + event_location_name?: string; } - export interface Exhibit { - id?: number; - id_random: string; - event_exhibit_id: string; - event_exhibit_id_random: string; + id?: number; + id_random: string; + event_exhibit_id: string; + event_exhibit_id_random: string; - event_id: string; - event_id_random: string; + event_id: string; + event_id_random: string; - code: string; - name: string; - // tagline: null|string; - description: null|string; - staff_passcode: null - data_json: null|string; + code: string; + name: string; + // tagline: null|string; + description: null | string; + staff_passcode: null; + data_json: null | string; - leads_api_access: null|boolean; - leads_custom_questions_json: null|string; - leads_device_sm_qty: null|number; - leads_device_lg_qty: null|number; - license_max: number; - license_li_json: null|string; - cfg_json: string; + leads_api_access: null | boolean; + leads_custom_questions_json: null | string; + leads_device_sm_qty: null | number; + leads_device_lg_qty: null | number; + license_max: number; + license_li_json: null | string; + cfg_json: string; - enable: null|boolean; - hide: null|boolean; - priority: null|boolean - sort: null|number; - group: null|string; - notes: null|string; - created_on: Date; - updated_on: null|Date; + enable: null | boolean; + hide: null | boolean; + priority: null | boolean; + sort: null | number; + group: null | string; + notes: null | string; + created_on: Date; + updated_on: null | Date; - // Generated fields for sorting locally only - // tmp_sort_1?: null|string; - // tmp_sort_2?: null|string; + // Generated fields for sorting locally only + // tmp_sort_1?: null|string; + // tmp_sort_2?: null|string; } - export interface Exhibit_tracking { - id?: number; - id_random: string; - event_exhibit_tracking_id: string - event_exhibit_tracking_id_random: string; + id?: number; + id_random: string; + event_exhibit_tracking_id: string; + event_exhibit_tracking_id_random: string; - event_exhibit_id: string; - event_exhibit_id_random: string; - event_badge_id: string; - event_badge_id_random: string; - event_person_id: string; - event_person_id_random: null|string; // Is this needed? + event_exhibit_id: string; + event_exhibit_id_random: string; + event_badge_id: string; + event_badge_id_random: string; + event_person_id: string; + event_person_id_random: null | string; // Is this needed? - external_person_id: null|string; // This is an email address + external_person_id: null | string; // This is an email address - exhibitor_notes: null|string; + exhibitor_notes: null | string; - responses_json: null|string; - data_json: null|string; + responses_json: null | string; + data_json: null | string; - event_exhibit_name: string; // Extra field for convenience + event_exhibit_name: string; // Extra field for convenience - event_badge_title_names: null|string; - event_badge_given_name: string; - event_badge_family_name: null|string; - event_badge_designations: null|string; - event_badge_full_name: string; - event_badge_full_name_override: null|string; + event_badge_title_names: null | string; + event_badge_given_name: string; + event_badge_family_name: null | string; + event_badge_designations: null | string; + event_badge_full_name: string; + event_badge_full_name_override: null | string; - event_badge_professional_title: null|string; - event_badge_professional_title_override: null|string; + event_badge_professional_title: null | string; + event_badge_professional_title_override: null | string; - event_badge_affiliations: null|string; - event_badge_affiliations_override: null|string; + event_badge_affiliations: null | string; + event_badge_affiliations_override: null | string; - event_badge_email: null|string; - event_badge_email_override: null|string; + event_badge_email: null | string; + event_badge_email_override: null | string; - event_badge_location: null|string; - event_badge_location_override: null|string; + event_badge_location: null | string; + event_badge_location_override: null | string; - event_badge_country: null|string; + event_badge_country: null | string; - enable: null|boolean; - hide: null|boolean; - priority: null|boolean - sort: null|number; - group: null|string; - notes: null|string; - created_on: Date; - updated_on: null|Date; + enable: null | boolean; + hide: null | boolean; + priority: null | boolean; + sort: null | number; + group: null | string; + notes: null | string; + created_on: Date; + updated_on: null | Date; - // Generated fields for sorting locally only - // tmp_sort_1?: null|string; - // tmp_sort_2?: null|string; + // Generated fields for sorting locally only + // tmp_sort_1?: null|string; + // tmp_sort_2?: null|string; } - export interface File { - id: string; - id_random: string; - event_file_id: string; - event_file_id_random: string; + id: string; + id_random: string; + event_file_id: string; + event_file_id_random: string; - hosted_file_id: string; - hosted_file_id_random: string; - hash_sha256: string; + hosted_file_id: string; + hosted_file_id_random: string; + hash_sha256: string; - for_type?: string; - for_id?: string; - for_id_random?: string; + for_type?: string; + for_id?: string; + for_id_random?: string; - event_id: string; - event_id_random: string; - event_session_id?: string; - event_session_id_random?: string; - event_presentation_id?: string; - event_presentation_id_random?: string; - event_presenter_id?: string; - event_presenter_id_random?: string; - event_location_id?: string; - event_location_id_random?: string; + event_id: string; + event_id_random: string; + event_session_id?: string; + event_session_id_random?: string; + event_presentation_id?: string; + event_presentation_id_random?: string; + event_presenter_id?: string; + event_presenter_id_random?: string; + event_location_id?: string; + event_location_id_random?: string; - filename: string; - extension: string; + filename: string; + extension: string; - open_in_os?: null|string; // null, empty, 'mac', or 'win' + open_in_os?: null | string; // null, empty, 'mac', or 'win' - lu_file_purpose_id: string; - lu_event_file_purpose_name: string; - file_purpose: string; + lu_file_purpose_id: string; + lu_event_file_purpose_name: string; + file_purpose: string; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - filename_no_ext: string; - filename_w_ext: string; - hosted_file_content_type: string; - file_size: number; // In bytes - hosted_file_size?: number; // In bytes + // Additional fields for convenience (database views) + filename_no_ext: string; + filename_w_ext: string; + hosted_file_content_type: string; + file_size: number; // In bytes + hosted_file_size?: number; // In bytes - event_location_code?: null|string; - event_location_name?: null|string; - event_session_code?: null|string; - event_session_type_code?: null|string; - event_session_name?: string; - event_session_start_datetime?: null|Date; - event_session_end_datetime?: null|Date; - event_presentation_code?: null|string; - event_presentation_type_code?: null|string; - event_presentation_name?: string; - event_presentation_start_datetime?: null|Date; - event_presentation_end_datetime?: null|Date; - event_presenter_given_name?: null|string; - event_presenter_family_name?: null|string; - event_presenter_full_name?: null|string; - event_presenter_email?: null|string; + event_location_code?: null | string; + event_location_name?: null | string; + event_session_code?: null | string; + event_session_type_code?: null | string; + event_session_name?: string; + event_session_start_datetime?: null | Date; + event_session_end_datetime?: null | Date; + event_presentation_code?: null | string; + event_presentation_type_code?: null | string; + event_presentation_name?: string; + event_presentation_start_datetime?: null | Date; + event_presentation_end_datetime?: null | Date; + event_presenter_given_name?: null | string; + event_presenter_family_name?: null | string; + event_presenter_full_name?: null | string; + event_presenter_email?: null | string; } - // Updated 2024-06-25 export interface Location { - id: string; - // id_random: string; - event_location_id: string; - event_location_id_random: string; + id: string; + // id_random: string; + event_location_id: string; + event_location_id_random: string; - external_id?: null|string; - code?: null|string; + external_id?: null | string; + code?: null | string; - type_code?: string; + type_code?: string; - event_id: string; - event_id_random: string; + event_id: string; + event_id_random: string; - name: string; - description?: null|string; + name: string; + description?: null | string; - passcode?: null|string; + passcode?: null | string; - hide_event_launcher?: null|boolean; + hide_event_launcher?: null | boolean; - alert?: null|boolean; - alert_msg?: null|string; + alert?: null | boolean; + alert_msg?: null | string; - data_json?: null|string; + data_json?: null | string; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - file_count?: null|number; - file_count_all?: null|number; - internal_use_count?: null|number; - event_file_id_li_json?: null|string; + // Additional fields for convenience (database views) + file_count?: null | number; + file_count_all?: null | number; + internal_use_count?: null | number; + event_file_id_li_json?: null | string; - event_name?: null|string; + event_name?: null | string; - // A key value list of the sessions - event_session_kv?: null|key_val; - // A key value list of the files - event_file_kv?: null|key_val; + // A key value list of the sessions + event_session_kv?: null | key_val; + // A key value list of the files + event_file_kv?: null | key_val; } - // Updated 2024-06-10 export interface Presentation { - id: string; - // id_random: string; - event_presentation_id: string; - event_presentation_id_random: string; + id: string; + // id_random: string; + event_presentation_id: string; + event_presentation_id_random: string; - external_id?: null|string; - code?: null|string; + external_id?: null | string; + code?: null | string; - for_type?: string; - for_id?: string; - for_id_random?: string; + for_type?: string; + for_id?: string; + for_id_random?: string; - type_code?: string; + type_code?: string; - event_id: string; - event_id_random: string; - event_session_id: string; - event_session_id_random: string; - event_abstract_id?: null|string; - event_abstract_id_random?: null|string; + event_id: string; + event_id_random: string; + event_session_id: string; + event_session_id_random: string; + event_abstract_id?: null | string; + event_abstract_id_random?: null | string; - abstract_code?: null|string; + abstract_code?: null | string; - name: string; - description?: null|string; + name: string; + description?: null | string; - start_datetime?: null|Date; - end_datetime?: null|Date; + start_datetime?: null | Date; + end_datetime?: null | Date; - passcode?: null|string; + passcode?: null | string; - hide_event_launcher?: null|boolean; + hide_event_launcher?: null | boolean; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean; - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - // file_count: null|number; + // Additional fields for convenience (database views) + // file_count: null|number; - event_session_code?: null|string; - event_session_name?: null|string; + event_session_code?: null | string; + event_session_name?: null | string; - // A key value list of the presenters - event_presenter_kv?: null|key_val; - event_presenter_li?: null|Array; + // A key value list of the presenters + event_presenter_kv?: null | key_val; + event_presenter_li?: null | Array; } - // Updated 2024-06-10 export interface Presenter { - id: string; - // id_random: string; - event_presenter_id: string; - event_presenter_id_random: string; + id: string; + // id_random: string; + event_presenter_id: string; + event_presenter_id_random: string; - external_id?: string; - code?: string; + external_id?: string; + code?: string; - event_id: string; - event_id_random: string; - event_session_id: string; - event_session_id_random: string; - event_person_id?: null|string; - event_person_id_random?: null|string; - event_presentation_id: string; - event_presentation_id_random: string; - person_id?: null|string; - person_id_random?: null|string; - person_profile_id?: null|string; - person_profile_id_random?: null|string; // The new table person_profile will be used soon... + event_id: string; + event_id_random: string; + event_session_id: string; + event_session_id_random: string; + event_person_id?: null | string; + event_person_id_random?: null | string; + event_presentation_id: string; + event_presentation_id_random: string; + person_id?: null | string; + person_id_random?: null | string; + person_profile_id?: null | string; + person_profile_id_random?: null | string; // The new table person_profile will be used soon... - pronouns?: null|string; - informal_name?: null|string; - title_names?: null|string; - given_name: string; - middle_name?: null|string; - family_name?: null|string; - designations?: null|string; + pronouns?: null | string; + informal_name?: null | string; + title_names?: null | string; + given_name: string; + middle_name?: null | string; + family_name?: null | string; + designations?: null | string; - professional_title?: null|string; + professional_title?: null | string; - full_name?: string; - full_name_override: null|string; + full_name?: string; + full_name_override: null | string; - affiliations?: null|string; + affiliations?: null | string; - email?: string; + email?: string; - biography?: null|string; + biography?: null | string; - agree?: null|boolean; // General catchall for agreement or consent - comments?: null|string; + agree?: null | boolean; // General catchall for agreement or consent + comments?: null | string; - passcode?: null|string; + passcode?: null | string; - hide_event_launcher?: null|boolean; + hide_event_launcher?: null | boolean; - data_json?: null|string; + data_json?: null | string; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on?: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on?: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - file_count?: null|number; - // file_count_all?: null|number; - // internal_use_count?: null|number; - event_file_id_li_json?: null|string; + // Additional fields for convenience (database views) + file_count?: null | number; + // file_count_all?: null|number; + // internal_use_count?: null|number; + event_file_id_li_json?: null | string; - event_session_code?: null|string; - event_session_name?: string; - event_session_start_datetime?: null|Date; - event_presentation_code?: null|string; - event_presentation_name?: string; - event_presentation_start_datetime?: null|Date; + event_session_code?: null | string; + event_session_name?: string; + event_session_start_datetime?: null | Date; + event_presentation_code?: null | string; + event_presentation_name?: string; + event_presentation_start_datetime?: null | Date; - person_external_id?: null|string; // This may be semi-random or unique only withing the account. - person_external_sys_id?: null|string; // Generated by an external system. Ideally this should be something like a UUID. It may be the same as the external_id if nothing given. - person_given_name?: string; - person_family_name?: null|string; - person_full_name?: null|string; - person_professional_title?: null|string; - person_affiliations?: null|string; - person_primary_email?: null|string; - person_passcode?: null|string; + person_external_id?: null | string; // This may be semi-random or unique only withing the account. + person_external_sys_id?: null | string; // Generated by an external system. Ideally this should be something like a UUID. It may be the same as the external_id if nothing given. + person_given_name?: string; + person_family_name?: null | string; + person_full_name?: null | string; + person_professional_title?: null | string; + person_affiliations?: null | string; + person_primary_email?: null | string; + person_passcode?: null | string; - // A key value list of the files - event_file_kv?: null|key_val; + // A key value list of the files + event_file_kv?: null | key_val; } - - export interface Registration { - // Nothing here yet + // Nothing here yet } - // Updated 2024-06-19 export interface Session { - id: string; - // id_random: string; - event_session_id: string; - event_session_id_random: string; + id: string; + // id_random: string; + event_session_id: string; + event_session_id_random: string; - external_id: null|string; - code: null|string; + external_id: null | string; + code: null | string; - for_type: string; - for_id: string; - for_id_random: string; + for_type: string; + for_id: string; + for_id_random: string; - type_code?: string; + type_code?: string; - event_id: string; - event_id_random: string; - event_location_id?: null|string; - event_location_id_random?: null|string; + event_id: string; + event_id_random: string; + event_location_id?: null | string; + event_location_id_random?: null | string; - poc_person_id?: null|string; - poc_person_id_random?: null|string; - poc_agree?: null|boolean; // General catchall for agreement or consent by the POC - poc_kv_json?: null|key_val; // Key value list of the POC by type (examples: 'advocate', 'chair', 'champion', 'moderator', 'organizer') + poc_person_id?: null | string; + poc_person_id_random?: null | string; + poc_agree?: null | boolean; // General catchall for agreement or consent by the POC + poc_kv_json?: null | key_val; // Key value list of the POC by type (examples: 'advocate', 'chair', 'champion', 'moderator', 'organizer') - name: string; - description?: null|string; + name: string; + description?: null | string; - start_datetime?: null|Date; - end_datetime?: null|Date; + start_datetime?: null | Date; + end_datetime?: null | Date; - passcode?: null|string; + passcode?: null | string; - hide_event_launcher?: null|boolean; + hide_event_launcher?: null | boolean; - alert?: null|boolean; - alert_msg?: null|string; + alert?: null | boolean; + alert_msg?: null | string; - data_json?: null|string; + data_json?: null | string; - ux_mode?: null|string; // 'colloquium', 'lecture', 'panel', 'poster', 'symposium', 'workshop' - // colloquium - Specialists present on related topics with questions - // symposium - A discussion, less formal + ux_mode?: null | string; // 'colloquium', 'lecture', 'panel', 'poster', 'symposium', 'workshop' + // colloquium - Specialists present on related topics with questions + // symposium - A discussion, less formal - enable: null|boolean; - hide: null|boolean; - priority: null|boolean - sort: null|number; - group: null|string; - notes: null|string; - created_on: Date; - updated_on: null|Date; + enable: null | boolean; + hide: null | boolean; + priority: null | boolean; + sort: null | number; + group: null | string; + notes: null | string; + created_on: Date; + updated_on: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - file_count?: null|number; // Only files directly under a session - file_count_all?: null|number; // All files under a session - internal_use_count?: null|number; // Files marked for internal use - event_file_id_li_json?: null|string; + // Additional fields for convenience (database views) + file_count?: null | number; // Only files directly under a session + file_count_all?: null | number; // All files under a session + internal_use_count?: null | number; // Files marked for internal use + event_file_id_li_json?: null | string; - poc_person_given_name?: null|string; - poc_person_family_name?: null|string; - poc_person_full_name?: null|string; - poc_person_primary_email?: null|string; - poc_person_passcode?: null|string; + poc_person_given_name?: null | string; + poc_person_family_name?: null | string; + poc_person_full_name?: null | string; + poc_person_primary_email?: null | string; + poc_person_passcode?: null | string; - event_name?: null|string; + event_name?: null | string; - event_location_code?: null|string; - event_location_name?: null|string; + event_location_code?: null | string; + event_location_name?: null | string; - // A key value list of the presentations - event_presentation_kv?: null|key_val; - event_presentation_li?: null|[any]; - // A key value list of the files - event_file_kv?: null|key_val; - event_file_li?: null|[any]; + // A key value list of the presentations + event_presentation_kv?: null | key_val; + event_presentation_li?: null | [any]; + // A key value list of the files + event_file_kv?: null | key_val; + event_file_li?: null | [any]; } - // Updated 2024-10-16 export class MySubClassedDexie extends Dexie { - // 'badge' is added by dexie when declaring the stores() - // We just tell the typing system this is the case - event!: Table; - badge!: Table; - badge_template!: Table; - device!: Table; - exhibit!: Table; - exhibit_tracking!: Table; - file!: Table; - location!: Table; - presentation!: Table; - presenter!: Table; - session!: Table; + // 'badge' is added by dexie when declaring the stores() + // We just tell the typing system this is the case + event!: Table; + badge!: Table; + badge_template!: Table; + device!: Table; + exhibit!: Table; + exhibit_tracking!: Table; + file!: Table; + location!: Table; + presentation!: Table; + presenter!: Table; + session!: Table; - constructor() { - super('ae_events_db'); - this.version(6).stores({ - event: ` + constructor() { + super('ae_events_db'); + this.version(6).stores({ + event: ` id, event_id, event_id_random, code, account_id, account_id_random, @@ -817,8 +805,8 @@ export class MySubClassedDexie extends Dexie { tmp_sort_1, tmp_sort_2, enable, hide, priority, sort, group, notes, created_on, updated_on`, - // badge: '++id, full_name, email' // Primary key and indexed props - badge: ` + // badge: '++id, full_name, email' // Primary key and indexed props + badge: ` id, id_random, event_badge_id, event_badge_id_random, event_id, event_id_random, full_name, full_name_override, email, email_override, @@ -830,10 +818,10 @@ export class MySubClassedDexie extends Dexie { tmp_sort_1, tmp_sort_2, enable, hide, priority, sort, group, notes, created_on, updated_on`, - badge_template: ` + badge_template: ` id, event_id, event_id_random`, - device: ` + device: ` id, id_random, event_device_id_random, event_device_id, event_id, event_id_random, event_location_id, event_location_id_random, code, name, @@ -842,14 +830,14 @@ export class MySubClassedDexie extends Dexie { tmp_sort_1, tmp_sort_2, enable, hide, priority, sort, group, notes, created_on, updated_on`, - exhibit: ` + exhibit: ` id, id_random, event_exhibit_id, event_exhibit_id_random, event_id, event_id_random, code, name, description, staff_passcode, data_json, license_max, license_li_json, cfg_json, enable, hide, priority, sort, group, notes, created_on, updated_on, [priority+name]`, - exhibit_tracking: ` + exhibit_tracking: ` id, id_random, event_exhibit_tracking_id, event_exhibit_tracking_id_random, event_exhibit_id, event_exhibit_id_random, event_badge_id, event_badge_id_random, event_person_id, event_person_id_random, @@ -857,7 +845,7 @@ export class MySubClassedDexie extends Dexie { event_badge_full_name, event_badge_email, enable, hide, priority, sort, group, notes, created_on, updated_on`, - file: ` + file: ` id, id_random, event_file_id, event_file_id_random, hosted_file_id, hosted_file_id_random, hash_sha256, @@ -869,7 +857,7 @@ export class MySubClassedDexie extends Dexie { tmp_sort_1, tmp_sort_2, enable, hide, priority, sort, group, created_on, updated_on`, - location: ` + location: ` id, event_location_id, event_location_id_random, external_id, code, event_id, event_id_random, @@ -881,7 +869,7 @@ export class MySubClassedDexie extends Dexie { tmp_sort_1, tmp_sort_2, enable, hide, priority, sort, group, created_on, updated_on`, - presentation: ` + presentation: ` id, event_presentation_id, event_presentation_id_random, external_id, code, for_type, for_id, for_id_random, @@ -893,7 +881,7 @@ export class MySubClassedDexie extends Dexie { tmp_sort_1, tmp_sort_2, enable, hide, priority, sort, group, created_on, updated_on`, - presenter: ` + presenter: ` id, event_presenter_id, event_presenter_id_random, external_id, code, event_id, event_session_id, event_person_id, event_presentation_id, @@ -907,7 +895,7 @@ export class MySubClassedDexie extends Dexie { tmp_sort_1, tmp_sort_2, enable, hide, priority, sort, group, created_on, updated_on`, - session: ` + session: ` id, event_session_id, event_session_id_random, external_id, code, for_type, for_id, for_id_random, @@ -921,9 +909,9 @@ export class MySubClassedDexie extends Dexie { ux_mode, alert, tmp_sort_1, tmp_sort_2, - enable, hide, priority, sort, group, created_on, updated_on`, - }); - } + enable, hide, priority, sort, group, created_on, updated_on` + }); + } } -export const db_events = new MySubClassedDexie(); \ No newline at end of file +export const db_events = new MySubClassedDexie(); diff --git a/src/lib/ae_events_functions.ts b/src/lib/ae_events_functions.ts index 287be2b6..477563fb 100644 --- a/src/lib/ae_events_functions.ts +++ b/src/lib/ae_events_functions.ts @@ -1,131 +1,131 @@ // This file is used to export all the functions that are used for Aether Events related functions. // Import all the functions from this library: -import * as event from "$lib/ae_events/ae_events__event"; -import * as event_device from "$lib/ae_events/ae_events__event_device"; +import * as event from '$lib/ae_events/ae_events__event'; +import * as event_device from '$lib/ae_events/ae_events__event_device'; -import * as event_file from "$lib/ae_events/ae_events__event_file"; +import * as event_file from '$lib/ae_events/ae_events__event_file'; import { - load_ae_obj_id__exhibit, - load_ae_obj_li__exhibit, - load_ae_obj_id__exhibit_tracking, - load_ae_obj_li__exhibit_tracking, - create_ae_obj__exhibit_tracking, - update_ae_obj__exhibit_tracking, - download_export__event_exhibit_tracking, - // db_save_ae_obj_li__exhibitor, -} from "$lib/ae_events/ae_events__exhibit"; + load_ae_obj_id__exhibit, + load_ae_obj_li__exhibit, + load_ae_obj_id__exhibit_tracking, + load_ae_obj_li__exhibit_tracking, + create_ae_obj__exhibit_tracking, + update_ae_obj__exhibit_tracking, + download_export__event_exhibit_tracking + // db_save_ae_obj_li__exhibitor, +} from '$lib/ae_events/ae_events__exhibit'; -import * as event_location from "$lib/ae_events/ae_events__event_location"; +import * as event_location from '$lib/ae_events/ae_events__event_location'; -import * as event_session from "$lib/ae_events/ae_events__event_session"; +import * as event_session from '$lib/ae_events/ae_events__event_session'; -import * as event_presentation from "$lib/ae_events/ae_events__event_presentation"; +import * as event_presentation from '$lib/ae_events/ae_events__event_presentation'; -import * as event_presenter from "$lib/ae_events/ae_events__event_presenter"; +import * as event_presenter from '$lib/ae_events/ae_events__event_presenter'; -import * as event_badge from "$lib/ae_events/ae_events__event_badge"; +import * as event_badge from '$lib/ae_events/ae_events__event_badge'; -import * as event_badge_template from "$lib/ae_events/ae_events__event_badge_template"; +import * as event_badge_template from '$lib/ae_events/ae_events__event_badge_template'; +const export_obj = { + // Events + load_ae_obj_id__event: event.load_ae_obj_id__event, + load_ae_obj_li__event: event.load_ae_obj_li__event, + qry_ae_obj_li__event: event.qry_ae_obj_li__event, + create_ae_obj__event: event.create_ae_obj__event, + delete_ae_obj_id__event: event.delete_ae_obj_id__event, + update_ae_obj__event: event.update_ae_obj__event, + // db_save_ae_obj_li__event: event.db_save_ae_obj_li__event, + sync_config__event_pres_mgmt: event.sync_config__event_pres_mgmt, -let export_obj = { - // Events - load_ae_obj_id__event: event.load_ae_obj_id__event, - load_ae_obj_li__event: event.load_ae_obj_li__event, - qry_ae_obj_li__event: event.qry_ae_obj_li__event, - create_ae_obj__event: event.create_ae_obj__event, - delete_ae_obj_id__event: event.delete_ae_obj_id__event, - update_ae_obj__event: event.update_ae_obj__event, - // db_save_ae_obj_li__event: event.db_save_ae_obj_li__event, - sync_config__event_pres_mgmt: event.sync_config__event_pres_mgmt, + // Event Badges + load_ae_obj_id__event_badge: event_badge.load_ae_obj_id__event_badge, + load_ae_obj_li__event_badge: event_badge.load_ae_obj_li__event_badge, + create_ae_obj__event_badge: event_badge.create_ae_obj__event_badge, + delete_ae_obj_id__event_badge: event_badge.delete_ae_obj_id__event_badge, + update_ae_obj__event_badge: event_badge.update_ae_obj__event_badge, + qry__event_badge: event_badge.qry__event_badge, + search__event_badge: event_badge.search__event_badge, + // handle_load_ae_obj_id__badge: event_badge.handle_load_ae_obj_id__badge, + // handle_load_ae_obj_li__badge: event_badge.handle_load_ae_obj_li__badge, + // handle_search__event_badge: event_badge.handle_search__event_badge, + // db_save_ae_obj_li__event_badge: event_badge.db_save_ae_obj_li__event_badge, - // Event Badges - load_ae_obj_id__event_badge: event_badge.load_ae_obj_id__event_badge, - load_ae_obj_li__event_badge: event_badge.load_ae_obj_li__event_badge, - create_ae_obj__event_badge: event_badge.create_ae_obj__event_badge, - delete_ae_obj_id__event_badge: event_badge.delete_ae_obj_id__event_badge, - update_ae_obj__event_badge: event_badge.update_ae_obj__event_badge, - qry__event_badge: event_badge.qry__event_badge, - search__event_badge: event_badge.search__event_badge, - // handle_load_ae_obj_id__badge: event_badge.handle_load_ae_obj_id__badge, - // handle_load_ae_obj_li__badge: event_badge.handle_load_ae_obj_li__badge, - // handle_search__event_badge: event_badge.handle_search__event_badge, - // db_save_ae_obj_li__event_badge: event_badge.db_save_ae_obj_li__event_badge, + // Event Badge Templates + load_ae_obj_id__event_badge_template: event_badge_template.load_ae_obj_id__event_badge_template, + load_ae_obj_li__event_badge_template: event_badge_template.load_ae_obj_li__event_badge_template, + create_ae_obj__event_badge_template: event_badge_template.create_ae_obj__event_badge_template, + delete_ae_obj_id__event_badge_template: + event_badge_template.delete_ae_obj_id__event_badge_template, + update_ae_obj__event_badge_template: event_badge_template.update_ae_obj__event_badge_template, + search__event_badge_template: event_badge_template.search__event_badge_template, - // Event Badge Templates - load_ae_obj_id__event_badge_template: event_badge_template.load_ae_obj_id__event_badge_template, - load_ae_obj_li__event_badge_template: event_badge_template.load_ae_obj_li__event_badge_template, - create_ae_obj__event_badge_template: event_badge_template.create_ae_obj__event_badge_template, - delete_ae_obj_id__event_badge_template: event_badge_template.delete_ae_obj_id__event_badge_template, - update_ae_obj__event_badge_template: event_badge_template.update_ae_obj__event_badge_template, - search__event_badge_template: event_badge_template.search__event_badge_template, + // Event Devices + load_ae_obj_id__event_device: event_device.load_ae_obj_id__event_device, + load_ae_obj_li__event_device: event_device.load_ae_obj_li__event_device, + create_ae_obj__event_device: event_device.create_ae_obj__event_device, + delete_ae_obj_id__event_device: event_device.delete_ae_obj_id__event_device, + update_ae_obj__event_device: event_device.update_ae_obj__event_device, + // db_save_ae_obj_li__event_device: event_device.db_save_ae_obj_li__event_device, - // Event Devices - load_ae_obj_id__event_device: event_device.load_ae_obj_id__event_device, - load_ae_obj_li__event_device: event_device.load_ae_obj_li__event_device, - create_ae_obj__event_device: event_device.create_ae_obj__event_device, - delete_ae_obj_id__event_device: event_device.delete_ae_obj_id__event_device, - update_ae_obj__event_device: event_device.update_ae_obj__event_device, - // db_save_ae_obj_li__event_device: event_device.db_save_ae_obj_li__event_device, + // Event Exhibits + handle_load_ae_obj_id__exhibit: load_ae_obj_id__exhibit, + handle_load_ae_obj_li__exhibit: load_ae_obj_li__exhibit, + handle_load_ae_obj_id__exhibit_tracking: load_ae_obj_id__exhibit_tracking, + handle_load_ae_obj_li__exhibit_tracking: load_ae_obj_li__exhibit_tracking, + handle_create_ae_obj__exhibit_tracking: create_ae_obj__exhibit_tracking, + handle_update_ae_obj__exhibit_tracking: update_ae_obj__exhibit_tracking, + handle_download_export__event_exhibit_tracking: download_export__event_exhibit_tracking, + // handle_db_save_ae_obj_li__exhibitor: db_save_ae_obj_li__exhibitor, - // Event Exhibits - handle_load_ae_obj_id__exhibit: load_ae_obj_id__exhibit, - handle_load_ae_obj_li__exhibit: load_ae_obj_li__exhibit, - handle_load_ae_obj_id__exhibit_tracking: load_ae_obj_id__exhibit_tracking, - handle_load_ae_obj_li__exhibit_tracking: load_ae_obj_li__exhibit_tracking, - handle_create_ae_obj__exhibit_tracking: create_ae_obj__exhibit_tracking, - handle_update_ae_obj__exhibit_tracking: update_ae_obj__exhibit_tracking, - handle_download_export__event_exhibit_tracking: download_export__event_exhibit_tracking, - // handle_db_save_ae_obj_li__exhibitor: db_save_ae_obj_li__exhibitor, + // Event Files + load_ae_obj_id__event_file: event_file.load_ae_obj_id__event_file, + load_ae_obj_li__event_file: event_file.load_ae_obj_li__event_file, + create_event_file_obj_from_hosted_file_async: + event_file.create_event_file_obj_from_hosted_file_async, + delete_ae_obj_id__event_file: event_file.delete_ae_obj_id__event_file, + update_ae_obj__event_file: event_file.update_ae_obj__event_file, + qry__event_file: event_file.qry__event_file, + search__event_file: event_file.search__event_file, + // db_save_ae_obj_li__event_file: event_file.db_save_ae_obj_li__event_file, - // Event Files - load_ae_obj_id__event_file: event_file.load_ae_obj_id__event_file, - load_ae_obj_li__event_file: event_file.load_ae_obj_li__event_file, - create_event_file_obj_from_hosted_file_async: event_file.create_event_file_obj_from_hosted_file_async, - delete_ae_obj_id__event_file: event_file.delete_ae_obj_id__event_file, - update_ae_obj__event_file: event_file.update_ae_obj__event_file, - qry__event_file: event_file.qry__event_file, - search__event_file: event_file.search__event_file, - // db_save_ae_obj_li__event_file: event_file.db_save_ae_obj_li__event_file, + // Event Locations + load_ae_obj_id__event_location: event_location.load_ae_obj_id__event_location, + load_ae_obj_li__event_location: event_location.load_ae_obj_li__event_location, + create_ae_obj__event_location: event_location.create_ae_obj__event_location, + delete_ae_obj_id__event_location: event_location.delete_ae_obj_id__event_location, + update_ae_obj__event_location: event_location.update_ae_obj__event_location, + // db_save_ae_obj_li__event_location: event_location.db_save_ae_obj_li__event_location, - // Event Locations - load_ae_obj_id__event_location: event_location.load_ae_obj_id__event_location, - load_ae_obj_li__event_location: event_location.load_ae_obj_li__event_location, - create_ae_obj__event_location: event_location.create_ae_obj__event_location, - delete_ae_obj_id__event_location: event_location.delete_ae_obj_id__event_location, - update_ae_obj__event_location: event_location.update_ae_obj__event_location, - // db_save_ae_obj_li__event_location: event_location.db_save_ae_obj_li__event_location, + // Event Sessions + load_ae_obj_id__event_session: event_session.load_ae_obj_id__event_session, + load_ae_obj_li__event_session: event_session.load_ae_obj_li__event_session, + create_ae_obj__event_session: event_session.create_ae_obj__event_session, + delete_ae_obj_id__event_session: event_session.delete_ae_obj_id__event_session, + update_ae_obj__event_session: event_session.update_ae_obj__event_session, + qry__event_session: event_session.qry__event_session, + search__event_session: event_session.search__event_session, + email_sign_in__event_session: event_session.email_sign_in__event_session, + // db_save_ae_obj_li__event_session: event_session.db_save_ae_obj_li__event_session, - // Event Sessions - load_ae_obj_id__event_session: event_session.load_ae_obj_id__event_session, - load_ae_obj_li__event_session: event_session.load_ae_obj_li__event_session, - create_ae_obj__event_session: event_session.create_ae_obj__event_session, - delete_ae_obj_id__event_session: event_session.delete_ae_obj_id__event_session, - update_ae_obj__event_session: event_session.update_ae_obj__event_session, - qry__event_session: event_session.qry__event_session, - search__event_session: event_session.search__event_session, - email_sign_in__event_session: event_session.email_sign_in__event_session, - // db_save_ae_obj_li__event_session: event_session.db_save_ae_obj_li__event_session, - - // Event Presentations - load_ae_obj_id__event_presentation: event_presentation.load_ae_obj_id__event_presentation, - load_ae_obj_li__event_presentation: event_presentation.load_ae_obj_li__event_presentation, - create_ae_obj__event_presentation: event_presentation.create_ae_obj__event_presentation, - delete_ae_obj_id__event_presentation: event_presentation.delete_ae_obj_id__event_presentation, - update_ae_obj__event_presentation: event_presentation.update_ae_obj__event_presentation, - // db_save_ae_obj_li__event_presentation: event_presentation.db_save_ae_obj_li__event_presentation, - - // Event Presenters - load_ae_obj_id__event_presenter: event_presenter.load_ae_obj_id__event_presenter, - load_ae_obj_li__event_presenter: event_presenter.load_ae_obj_li__event_presenter, - create_ae_obj__event_presenter: event_presenter.create_ae_obj__event_presenter, - delete_ae_obj_id__event_presenter: event_presenter.delete_ae_obj_id__event_presenter, - update_ae_obj__event_presenter: event_presenter.update_ae_obj__event_presenter, - search__event_presenter: event_presenter.search__event_presenter, - // db_save_ae_obj_li__event_presenter: event_presenter.db_save_ae_obj_li__event_presenter, - email_sign_in__event_presenter: event_presenter.email_sign_in__event_presenter, + // Event Presentations + load_ae_obj_id__event_presentation: event_presentation.load_ae_obj_id__event_presentation, + load_ae_obj_li__event_presentation: event_presentation.load_ae_obj_li__event_presentation, + create_ae_obj__event_presentation: event_presentation.create_ae_obj__event_presentation, + delete_ae_obj_id__event_presentation: event_presentation.delete_ae_obj_id__event_presentation, + update_ae_obj__event_presentation: event_presentation.update_ae_obj__event_presentation, + // db_save_ae_obj_li__event_presentation: event_presentation.db_save_ae_obj_li__event_presentation, + // Event Presenters + load_ae_obj_id__event_presenter: event_presenter.load_ae_obj_id__event_presenter, + load_ae_obj_li__event_presenter: event_presenter.load_ae_obj_li__event_presenter, + create_ae_obj__event_presenter: event_presenter.create_ae_obj__event_presenter, + delete_ae_obj_id__event_presenter: event_presenter.delete_ae_obj_id__event_presenter, + update_ae_obj__event_presenter: event_presenter.update_ae_obj__event_presenter, + search__event_presenter: event_presenter.search__event_presenter, + // db_save_ae_obj_li__event_presenter: event_presenter.db_save_ae_obj_li__event_presenter, + email_sign_in__event_presenter: event_presenter.email_sign_in__event_presenter }; -export let events_func = export_obj; +export const events_func = export_obj; diff --git a/src/lib/ae_journals/ae_journals__journal.ts b/src/lib/ae_journals/ae_journals__journal.ts index b658777f..e2bdee35 100644 --- a/src/lib/ae_journals/ae_journals__journal.ts +++ b/src/lib/ae_journals/ae_journals__journal.ts @@ -3,651 +3,655 @@ import { marked } from 'marked'; import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_journals } from "$lib/ae_journals/db_journals"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_journals } from '$lib/ae_journals/db_journals'; -import { load_ae_obj_li__journal_entry } from "$lib/ae_journals/ae_journals__journal_entry"; - -let ae_promises: key_val = {}; +import { load_ae_obj_li__journal_entry } from '$lib/ae_journals/ae_journals__journal_entry'; +const ae_promises: key_val = {}; // Updated 2025-03-15 -export async function load_ae_obj_id__journal( - { - api_cfg, - journal_id, - inc_entry_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - journal_id: string, - inc_entry_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, - offset?: number, - order_by_li?: key_val, // Order by fields for the journal entries - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__journal() *** journal_id=${journal_id}`); - } +export async function load_ae_obj_id__journal({ + api_cfg, + journal_id, + inc_entry_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + journal_id: string; + inc_entry_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; + offset?: number; + order_by_li?: key_val; // Order by fields for the journal entries + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__journal() *** journal_id=${journal_id}`); + } - ae_promises.load__journal_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'journal', - obj_id: journal_id, - use_alt_table: true, - use_alt_base: false, - params: params, - log_lvl: log_lvl - }) - .then(async function (journal_obj_get_result) { - if (journal_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__journal_props({ - obj_li: [journal_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_journals, - table_name: 'journal', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__journal_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'journal', + obj_id: journal_id, + use_alt_table: true, + use_alt_base: false, + params: params, + log_lvl: log_lvl + }) + .then(async function (journal_obj_get_result) { + if (journal_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__journal_props({ + obj_li: [journal_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_journals, + table_name: 'journal', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__journal({ - // obj_type: 'journal', - // obj_li: [journal_obj_get_result], - // log_lvl: log_lvl - // }); - } - return journal_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // // This is expecting a list + // db_save_ae_obj_li__journal({ + // obj_type: 'journal', + // obj_li: [journal_obj_get_result], + // log_lvl: log_lvl + // }); + } + return journal_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__journal_obj:', ae_promises.load__journal_obj); - } - if (!ae_promises.load__journal_obj) { - console.log(`ERROR: Journals - Journal - The journal with ID ${journal_id} was not found.`); - return ae_promises.load__journal_obj; // Return null if the journal was not found - } + if (log_lvl) { + console.log('ae_promises.load__journal_obj:', ae_promises.load__journal_obj); + } + if (!ae_promises.load__journal_obj) { + console.log(`ERROR: Journals - Journal - The journal with ID ${journal_id} was not found.`); + return ae_promises.load__journal_obj; // Return null if the journal was not found + } - if (inc_entry_li) { - // Load the entries for the journal - if (log_lvl) { - console.log(`Need to load the entry list for the journal now`); - } - let load_journal_entry_obj_li = load_ae_obj_li__journal_entry({ - api_cfg: api_cfg, - for_obj_type: 'journal', - for_obj_id: journal_id, - enabled: enabled, // all, disabled, enabled - hidden: hidden, // all, hidden, not_hidden - limit: limit, // Limit for the entries - offset: offset, - order_by_li: order_by_li, - params: params, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((journal_entry_obj_li) => { - if (log_lvl) { - console.log(`journal_entry_obj_li = `, journal_entry_obj_li); - } - return journal_entry_obj_li; - }); + if (inc_entry_li) { + // Load the entries for the journal + if (log_lvl) { + console.log(`Need to load the entry list for the journal now`); + } + const load_journal_entry_obj_li = load_ae_obj_li__journal_entry({ + api_cfg: api_cfg, + for_obj_type: 'journal', + for_obj_id: journal_id, + enabled: enabled, // all, disabled, enabled + hidden: hidden, // all, hidden, not_hidden + limit: limit, // Limit for the entries + offset: offset, + order_by_li: order_by_li, + params: params, + try_cache: try_cache, + log_lvl: log_lvl + }).then((journal_entry_obj_li) => { + if (log_lvl) { + console.log(`journal_entry_obj_li = `, journal_entry_obj_li); + } + return journal_entry_obj_li; + }); - if (log_lvl) { - console.log(`journal_entry_obj_li = `, load_journal_entry_obj_li); - } - ae_promises.load__journal_obj.journal_entry_li = load_journal_entry_obj_li; - } + if (log_lvl) { + console.log(`journal_entry_obj_li = `, load_journal_entry_obj_li); + } + ae_promises.load__journal_obj.journal_entry_li = load_journal_entry_obj_li; + } - return ae_promises.load__journal_obj; + return ae_promises.load__journal_obj; } - // Updated 2025-03-15 -export async function load_ae_obj_li__journal( - { - api_cfg, - for_obj_type = 'account', - for_obj_id, - qry_person_id = null, - inc_entry_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - qry_person_id?: string|null, - inc_entry_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__journal() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__journal({ + api_cfg, + for_obj_type = 'account', + for_obj_id, + qry_person_id = null, + inc_entry_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + qry_person_id?: string | null; + inc_entry_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__journal() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - if (qry_person_id) { - let qry_param = - { - type: "AND", - field: "person_id_random", - operator: "=", - value: qry_person_id - }; - params_json['qry'].push(qry_param); - } + if (qry_person_id) { + const qry_param = { + type: 'AND', + field: 'person_id_random', + operator: '=', + value: qry_person_id + }; + params_json['qry'].push(qry_param); + } - if (log_lvl) { - console.log('params_json:', params_json); - } + if (log_lvl) { + console.log('params_json:', params_json); + } - ae_promises.load__journal_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'journal', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: false, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (journal_obj_li_get_result) { - if (journal_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__journal_props({ - obj_li: journal_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_journals, - table_name: 'journal', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__journal_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'journal', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: false, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (journal_obj_li_get_result) { + if (journal_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__journal_props({ + obj_li: journal_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_journals, + table_name: 'journal', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__journal({ - // obj_type: 'journal', - // obj_li: journal_obj_li_get_result, - // log_lvl: log_lvl - // }); - } - return journal_obj_li_get_result; - } else { - return []; - } - }); + // db_save_ae_obj_li__journal({ + // obj_type: 'journal', + // obj_li: journal_obj_li_get_result, + // log_lvl: log_lvl + // }); + } + return journal_obj_li_get_result; + } else { + return []; + } + }); - if (log_lvl) { - console.log('ae_promises.load__journal_obj_li:', ae_promises.load__journal_obj_li); - } + if (log_lvl) { + console.log('ae_promises.load__journal_obj_li:', ae_promises.load__journal_obj_li); + } - if (inc_entry_li) { - // Load the entries for the journals - if (log_lvl) { - console.log(`Need to load the entry list for each journal now`); - } - for (let i = 0; i < ae_promises.load__journal_obj_li.length; i++) { - let journal_obj = ae_promises.load__journal_obj_li[i]; - let journal_id = journal_obj.journal_id_random; + if (inc_entry_li) { + // Load the entries for the journals + if (log_lvl) { + console.log(`Need to load the entry list for each journal now`); + } + for (let i = 0; i < ae_promises.load__journal_obj_li.length; i++) { + const journal_obj = ae_promises.load__journal_obj_li[i]; + const journal_id = journal_obj.journal_id_random; - let load_journal_entry_obj_li = load_ae_obj_li__journal_entry({ - api_cfg: api_cfg, - for_obj_type: 'journal', - for_obj_id: journal_id, - enabled: enabled, - hidden: hidden, - limit: limit, - offset: offset, - order_by_li: order_by_li, - params: params, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((journal_entry_obj_li) => { - if (log_lvl) { - console.log(`journal_entry_obj_li = `, journal_entry_obj_li); - } + const load_journal_entry_obj_li = load_ae_obj_li__journal_entry({ + api_cfg: api_cfg, + for_obj_type: 'journal', + for_obj_id: journal_id, + enabled: enabled, + hidden: hidden, + limit: limit, + offset: offset, + order_by_li: order_by_li, + params: params, + try_cache: try_cache, + log_lvl: log_lvl + }).then((journal_entry_obj_li) => { + if (log_lvl) { + console.log(`journal_entry_obj_li = `, journal_entry_obj_li); + } - return journal_entry_obj_li; - }); + return journal_entry_obj_li; + }); - if (log_lvl) { - console.log(`load_journal_entry_obj_li = `, load_journal_entry_obj_li); - } - } - } + if (log_lvl) { + console.log(`load_journal_entry_obj_li = `, load_journal_entry_obj_li); + } + } + } - return ae_promises.load__journal_obj_li; + return ae_promises.load__journal_obj_li; } - // Updated 2025-03-24 -export async function create_ae_obj__journal( - { - api_cfg, - account_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__journal() *** account_id=${account_id}`); - } +export async function create_ae_obj__journal({ + api_cfg, + account_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__journal() *** account_id=${account_id}`); + } - if (!account_id) { - console.log(`ERROR: Journals - Journal - account_id required to create`); - return false; - } + if (!account_id) { + console.log(`ERROR: Journals - Journal - account_id required to create`); + return false; + } - ae_promises.create__journal = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'journal', - fields: { - account_id_random: account_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (journal_obj_create_result) { - if (journal_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__journal_props({ - obj_li: [journal_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_journals, - table_name: 'journal', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__journal = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'journal', + fields: { + account_id_random: account_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (journal_obj_create_result) { + if (journal_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__journal_props({ + obj_li: [journal_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_journals, + table_name: 'journal', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__journal( - // { - // obj_type: 'journal', - // obj_li: [journal_obj_create_result], - // log_lvl: log_lvl - // }); - } - return journal_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__journal( + // { + // obj_type: 'journal', + // obj_li: [journal_obj_create_result], + // log_lvl: log_lvl + // }); + } + return journal_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__journal:', ae_promises.create__journal); - } - return ae_promises.create__journal; + if (log_lvl) { + console.log('ae_promises.create__journal:', ae_promises.create__journal); + } + return ae_promises.create__journal; } - // Updated 2025-03-15 -export async function delete_ae_obj_id__journal( - { - api_cfg, - journal_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - journal_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__journal() *** journal_id=${journal_id}`); - } +export async function delete_ae_obj_id__journal({ + api_cfg, + journal_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + journal_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__journal() *** journal_id=${journal_id}`); + } - ae_promises.delete__journal_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'journal', - obj_id: journal_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(async function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for journal_id=${journal_id}`); - } - await db_journals.journal.delete(journal_id); - } - }); + ae_promises.delete__journal_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'journal', + obj_id: journal_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(async function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for journal_id=${journal_id}`); + } + await db_journals.journal.delete(journal_id); + } + }); - if (log_lvl) { - console.log('ae_promises.delete__journal_obj:', ae_promises.delete__journal_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__journal_obj:', ae_promises.delete__journal_obj); + } - return ae_promises.delete__journal_obj; + return ae_promises.delete__journal_obj; } - // Updated 2025-05-09 export async function update_ae_obj__journal({ - api_cfg, - journal_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0, - }: { - api_cfg: any; - journal_id: string; - data_kv: key_val; - params?: key_val; - try_cache?: boolean; - log_lvl?: number; - }) { - if (log_lvl) { - console.log(`*** update_ae_obj__journal() *** journal_id=${journal_id}`, data_kv); - } + api_cfg, + journal_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + journal_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** update_ae_obj__journal() *** journal_id=${journal_id}`, data_kv); + } - // log_lvl = 1; + // log_lvl = 1; - // Perform the API update - const result = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'journal', - obj_id: journal_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl, - }); + // Perform the API update + const result = await api.update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'journal', + obj_id: journal_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }); - // Handle the result - if (result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__journal_props({ - obj_li: [result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_journals, - table_name: 'journal', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // Handle the result + if (result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__journal_props({ + obj_li: [result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_journals, + table_name: 'journal', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__journal({ - // obj_type: 'journal', - // obj_li: [result], - // log_lvl: log_lvl, - // }); - } - return result; - } else { - console.error('Failed to update journal.'); - return null; - } + // await db_save_ae_obj_li__journal({ + // obj_type: 'journal', + // obj_li: [result], + // log_lvl: log_lvl, + // }); + } + return result; + } else { + console.error('Failed to update journal.'); + return null; + } } - // This new function is using CRUD v2. This should allow for more flexibility in the queries. // Updated 2025-03-15 -export async function qry__journal( - { - api_cfg, - journal_id, - qry_str, - qry_files, - qry_start_datetime, // Example greater than: '2024-10-24' - enabled = 'enabled', - hidden = 'not_hidden', - limit = 50, - offset = 0, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - journal_id: any, - qry_str?: string, - qry_files?: null|boolean, - qry_start_datetime?: null|string, // Greater than this datetime - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, - offset?: number, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** qry__journal() *** journal_id=${journal_id} enabled=${enabled} hidden=${hidden} limit=${limit} offset=${offset}`); - } +export async function qry__journal({ + api_cfg, + journal_id, + qry_str, + qry_files, + qry_start_datetime, // Example greater than: '2024-10-24' + enabled = 'enabled', + hidden = 'not_hidden', + limit = 50, + offset = 0, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + journal_id: any; + qry_str?: string; + qry_files?: null | boolean; + qry_start_datetime?: null | string; // Greater than this datetime + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; + offset?: number; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** qry__journal() *** journal_id=${journal_id} enabled=${enabled} hidden=${hidden} limit=${limit} offset=${offset}` + ); + } - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 25); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 25); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // if (qry_str && qry_str.length > 2) { - // params_json['ft_qry'] = {}; - // params_json['ft_qry']['default_qry_str'] = qry_str; - // } + // if (qry_str && qry_str.length > 2) { + // params_json['ft_qry'] = {}; + // params_json['ft_qry']['default_qry_str'] = qry_str; + // } - params_json['qry'] = []; + params_json['qry'] = []; - if (qry_files === true) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: ">", - value: 0 - }; - params_json['qry'].push(qry_param); - } else if (qry_files === false) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: "IS", - value: null - }; - params_json['qry'].push(qry_param); - } + if (qry_files === true) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: '>', + value: 0 + }; + params_json['qry'].push(qry_param); + } else if (qry_files === false) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: 'IS', + value: null + }; + params_json['qry'].push(qry_param); + } - if (qry_start_datetime) { - let qry_param = - { - type: "AND", - field: "start_datetime", - operator: ">", - value: qry_start_datetime - }; - params_json['qry'].push(qry_param); - } + if (qry_start_datetime) { + const qry_param = { + type: 'AND', + field: 'start_datetime', + operator: '>', + value: qry_start_datetime + }; + params_json['qry'].push(qry_param); + } - let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}; + const order_by_li = { + priority: 'DESC', + sort: 'DESC', + start_datetime: 'ASC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }; - ae_promises.load__journal_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'journal', - for_obj_type: 'account', - for_obj_id: journal_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for journal searching - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (journal_obj_li_get_result) { - if (journal_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__journal_props({ - obj_li: journal_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - db_save_ae_obj_li__ae_obj({ - db_instance: db_journals, - table_name: 'journal', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } + ae_promises.load__journal_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'journal', + for_obj_type: 'account', + for_obj_id: journal_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for journal searching + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (journal_obj_li_get_result) { + if (journal_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__journal_props({ + obj_li: journal_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + db_save_ae_obj_li__ae_obj({ + db_instance: db_journals, + table_name: 'journal', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } - // db_save_ae_obj_li__journal({ - // obj_type: 'journal', - // obj_li: journal_obj_li_get_result - // }); - return journal_obj_li_get_result; - } else { - return []; - } - }); + // db_save_ae_obj_li__journal({ + // obj_type: 'journal', + // obj_li: journal_obj_li_get_result + // }); + return journal_obj_li_get_result; + } else { + return []; + } + }); - if (log_lvl) { - console.log('ae_promises.load__journal_obj_li:', ae_promises.load__journal_obj_li); - } - return ae_promises.load__journal_obj_li; + if (log_lvl) { + console.log('ae_promises.load__journal_obj_li:', ae_promises.load__journal_obj_li); + } + return ae_promises.load__journal_obj_li; } - // This function will loop through the journal_obj_li and save each one to the DB. // Removed 2025-06-04 // export async function db_save_ae_obj_li__journal( @@ -798,88 +802,85 @@ export async function qry__journal( // } // } - // Updated 2025-05-09 -let properties_to_save = [ +const properties_to_save = [ + 'id', + 'journal_id', - 'id', - 'journal_id', + 'code', - 'code', + 'for_type', + 'for_id', + 'type_code', - 'for_type', - 'for_id', - 'type_code', + 'account_id', + 'person_id', - 'account_id', - 'person_id', + 'name', + 'short_name', + 'summary', + 'outline', - 'name', - 'short_name', - 'summary', - 'outline', + 'description', + 'description_md_html', // Use the markdown parser to generate HTML + 'description_html', + 'description_json', - 'description', - 'description_md_html', // Use the markdown parser to generate HTML - 'description_html', - 'description_json', + // start_datetime: obj.start_datetime, + // end_datetime: obj.end_datetime, + 'timezone', - // start_datetime: obj.start_datetime, - // end_datetime: obj.end_datetime, - 'timezone', + 'alert', + 'alert_msg', - 'alert', - 'alert_msg', + 'sort_by', + 'sort_by_desc', - 'sort_by', - 'sort_by_desc', + 'cfg_json', - 'cfg_json', + // ux_mode: obj.ux_mode, - // ux_mode: obj.ux_mode, + // This only allows for basic access to the data. + 'passcode_read', // For LLM (AI) generated summary...??? + 'passcode_read_expire', + 'passcode_write', + 'passcode_write_expire', - // This only allows for basic access to the data. - 'passcode_read', // For LLM (AI) generated summary...??? - 'passcode_read_expire', - 'passcode_write', - 'passcode_write_expire', + 'passcode', // For Journal Entry encryption password + 'passcode_timeout', - 'passcode', // For Journal Entry encryption password - 'passcode_timeout', + 'private_passcode', // Combine with Journal passcode to encrypt and decrypt Entries - 'private_passcode', // Combine with Journal passcode to encrypt and decrypt Entries + 'auth_key', // For Journal authorization without sign in - 'auth_key', // For Journal authorization without sign in + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + 'tmp_sort_3', + // tmp_sort_1: `${obj.original_datetime}_${obj.group}_${obj.priority}_${obj.sort}`, + // tmp_sort_2: `${obj.group}_${obj.original_datetime}_${obj.priority}_${obj.sort}`, + // 'tmp_sort_a', + // 'tmp_sort_b', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - 'tmp_sort_3', - // tmp_sort_1: `${obj.original_datetime}_${obj.group}_${obj.priority}_${obj.sort}`, - // tmp_sort_2: `${obj.group}_${obj.original_datetime}_${obj.priority}_${obj.sort}`, - // 'tmp_sort_a', - // 'tmp_sort_b', + 'combined_passcode', - 'combined_passcode', + // From SQL view + 'journal_entry_count' - // From SQL view - 'journal_entry_count', - - // A key value list of the others - // journal_other_kv - // journal_other_li + // A key value list of the others + // journal_other_kv + // journal_other_li ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -979,4 +980,4 @@ export async function process_ae_obj__journal_props({ return obj; } }); -} \ No newline at end of file +} diff --git a/src/lib/ae_journals/ae_journals__journal_entry.ts b/src/lib/ae_journals/ae_journals__journal_entry.ts index d20dbf25..96341a8f 100644 --- a/src/lib/ae_journals/ae_journals__journal_entry.ts +++ b/src/lib/ae_journals/ae_journals__journal_entry.ts @@ -3,466 +3,460 @@ import { marked } from 'marked'; import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; -import { db_journals } from "$lib/ae_journals/db_journals"; - - -let ae_promises: key_val = {}; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; +import { db_journals } from '$lib/ae_journals/db_journals'; +const ae_promises: key_val = {}; // Updated 2025-03-15 -export async function load_ae_obj_id__journal_entry( - { - api_cfg, - journal_entry_id, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - journal_entry_id: string, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__journal_entry() *** journal_entry_id=${journal_entry_id}`); - } +export async function load_ae_obj_id__journal_entry({ + api_cfg, + journal_entry_id, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + journal_entry_id: string; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__journal_entry() *** journal_entry_id=${journal_entry_id}`); + } - let params = {}; + const params = {}; - ae_promises.load__journal_entry_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'journal_entry', - obj_id: journal_entry_id, // NOTE: This is the FQDN, not normally the ID. - use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value - params: params, - log_lvl: log_lvl - }) - .then(async function (journal_entry_obj_get_result) { - if (journal_entry_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__journal_entry_props({ - obj_li: [journal_entry_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_journals, - table_name: 'journal_entry', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__journal_entry_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'journal_entry', + obj_id: journal_entry_id, // NOTE: This is the FQDN, not normally the ID. + use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value + params: params, + log_lvl: log_lvl + }) + .then(async function (journal_entry_obj_get_result) { + if (journal_entry_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__journal_entry_props({ + obj_li: [journal_entry_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_journals, + table_name: 'journal_entry', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__journal_entry({ - // obj_type: 'journal_entry', - // obj_li: [journal_entry_obj_get_result], - // log_lvl: log_lvl - // }); - } - return journal_entry_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // // This is expecting a list + // db_save_ae_obj_li__journal_entry({ + // obj_type: 'journal_entry', + // obj_li: [journal_entry_obj_get_result], + // log_lvl: log_lvl + // }); + } + return journal_entry_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - return ae_promises.load__journal_entry_obj; + return ae_promises.load__journal_entry_obj; } - // Updated 2025-03-15 -export async function load_ae_obj_li__journal_entry( - { - api_cfg, - for_obj_type = 'journal', - for_obj_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__journal_entry() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__journal_entry({ + api_cfg, + for_obj_type = 'journal', + for_obj_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__journal_entry() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 99); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 99); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // console('params_json:', params_json); + // console('params_json:', params_json); - ae_promises.load__journal_entry_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'journal_entry', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: false, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (journal_entry_obj_li_get_result) { - if (journal_entry_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__journal_entry_props({ - obj_li: journal_entry_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_journals, - table_name: 'journal_entry', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__journal_entry_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'journal_entry', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: false, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (journal_entry_obj_li_get_result) { + if (journal_entry_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__journal_entry_props({ + obj_li: journal_entry_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_journals, + table_name: 'journal_entry', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__journal_entry({ - // obj_type: 'journal_entry', - // obj_li: journal_entry_obj_li_get_result, - // log_lvl: log_lvl - // }); - } - return journal_entry_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // await db_save_ae_obj_li__journal_entry({ + // obj_type: 'journal_entry', + // obj_li: journal_entry_obj_li_get_result, + // log_lvl: log_lvl + // }); + } + return journal_entry_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__journal_entry_obj_li:', ae_promises.load__journal_entry_obj_li); - } + if (log_lvl) { + console.log('ae_promises.load__journal_entry_obj_li:', ae_promises.load__journal_entry_obj_li); + } - return ae_promises.load__journal_entry_obj_li; + return ae_promises.load__journal_entry_obj_li; } - // Updated 2025-03-15 -export async function create_ae_obj__journal_entry( - { - api_cfg, - journal_id, - data_kv, - params={}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - journal_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__journal_entry() *** journal_id=${journal_id}`); - } +export async function create_ae_obj__journal_entry({ + api_cfg, + journal_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + journal_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__journal_entry() *** journal_id=${journal_id}`); + } - if (!journal_id) { - console.log(`ERROR: Journals - Entry - journal_id required to create`); - return false; - } + if (!journal_id) { + console.log(`ERROR: Journals - Entry - journal_id required to create`); + return false; + } - ae_promises.create__journal_entry = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'journal_entry', - fields: { - journal_id_random: journal_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (journal_entry_obj_create_result) { - if (journal_entry_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__journal_entry_props({ - obj_li: [journal_entry_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_journals, - table_name: 'journal_entry', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__journal_entry = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'journal_entry', + fields: { + journal_id_random: journal_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (journal_entry_obj_create_result) { + if (journal_entry_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__journal_entry_props({ + obj_li: [journal_entry_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_journals, + table_name: 'journal_entry', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__journal_entry( - // { - // obj_type: 'journal_entry', - // obj_li: [journal_entry_obj_create_result], - // log_lvl: log_lvl - // }); - } - return journal_entry_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // await db_save_ae_obj_li__journal_entry( + // { + // obj_type: 'journal_entry', + // obj_li: [journal_entry_obj_create_result], + // log_lvl: log_lvl + // }); + } + return journal_entry_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.create__journal_entry:', ae_promises.create__journal_entry); - } - return ae_promises.create__journal_entry; + if (log_lvl) { + console.log('ae_promises.create__journal_entry:', ae_promises.create__journal_entry); + } + return ae_promises.create__journal_entry; } - // Updated 2025-03-15 -export async function delete_ae_obj_id__journal_entry( - { - api_cfg, - journal_entry_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - journal_entry_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__journal_entry() *** journal_entry_id=${journal_entry_id}`); - } +export async function delete_ae_obj_id__journal_entry({ + api_cfg, + journal_entry_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + journal_entry_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__journal_entry() *** journal_entry_id=${journal_entry_id}`); + } - ae_promises.delete__journal_entry_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'journal_entry', - obj_id: journal_entry_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for journal_entry_id=${journal_entry_id}`); - } - db_journals.journal_entry.delete(journal_entry_id); // Delete from the DB no matter what. - } - }); + ae_promises.delete__journal_entry_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'journal_entry', + obj_id: journal_entry_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for journal_entry_id=${journal_entry_id}`); + } + db_journals.journal_entry.delete(journal_entry_id); // Delete from the DB no matter what. + } + }); - if (log_lvl) { - console.log('ae_promises.delete__journal_entry_obj:', ae_promises.delete__journal_entry_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__journal_entry_obj:', ae_promises.delete__journal_entry_obj); + } - return ae_promises.delete__journal_entry_obj; + return ae_promises.delete__journal_entry_obj; } - - - - // This new function is using CRUD v2. This should allow for more flexibility in the queries. // Updated 2025-06-04 -export async function qry__journal_entry( - { - api_cfg, - journal_id, - qry_str = null, // Example: 'name:contains:"test"' - qry_created_on = null, // Example greater than: '2024-10-24' - qry_alert = null, - qry_priority = null, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 50, - offset = 0, - order_by_li = {'group': 'DESC', 'priority': 'DESC', 'sort': 'DESC', 'alert': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - journal_id: any, - qry_str?: null|string, - qry_created_on?: null|string, - qry_alert?: null|string, - qry_priority?: null|number, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - log_lvl = 1; - if (log_lvl) { - console.log(`*** qry__journal_entry() *** journal_id=${journal_id}`); - } +export async function qry__journal_entry({ + api_cfg, + journal_id, + qry_str = null, // Example: 'name:contains:"test"' + qry_created_on = null, // Example greater than: '2024-10-24' + qry_alert = null, + qry_priority = null, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 50, + offset = 0, + order_by_li = { + group: 'DESC', + priority: 'DESC', + sort: 'DESC', + alert: 'DESC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + journal_id: any; + qry_str?: null | string; + qry_created_on?: null | string; + qry_alert?: null | string; + qry_priority?: null | number; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + log_lvl = 1; + if (log_lvl) { + console.log(`*** qry__journal_entry() *** journal_id=${journal_id}`); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - params_json['qry'] = []; + params_json['qry'] = []; - if (qry_str) { - console.log('qry_str:', qry_str); - // let qry_param = - // { - // type: "AND", - // field: "qry_str", - // operator: "LIKE", - // value: qry_str - // }; - let qry_param = - { - type: "", - field: "default_qry_str", // default is really just the standard FT string in the DB - operator: "MATCH", - value: qry_str - }; - params_json['qry'].push(qry_param); - } + if (qry_str) { + console.log('qry_str:', qry_str); + // let qry_param = + // { + // type: "AND", + // field: "qry_str", + // operator: "LIKE", + // value: qry_str + // }; + const qry_param = { + type: '', + field: 'default_qry_str', // default is really just the standard FT string in the DB + operator: 'MATCH', + value: qry_str + }; + params_json['qry'].push(qry_param); + } - if (qry_created_on) { - let qry_param = - { - type: "AND", - field: "created_on", - operator: ">", - value: qry_created_on - }; - params_json['qry'].push(qry_param); - } + if (qry_created_on) { + const qry_param = { + type: 'AND', + field: 'created_on', + operator: '>', + value: qry_created_on + }; + params_json['qry'].push(qry_param); + } - if (qry_priority) { - console.log('qry_priority:', qry_priority); - let qry_param = - { - type: "AND", - field: "priority", - operator: "=", - value: qry_priority - }; - params_json['qry'].push(qry_param); - } + if (qry_priority) { + console.log('qry_priority:', qry_priority); + const qry_param = { + type: 'AND', + field: 'priority', + operator: '=', + value: qry_priority + }; + params_json['qry'].push(qry_param); + } - ae_promises.load__journal_entry_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'journal_entry', - for_obj_type: 'journal', - for_obj_id: journal_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for journal entry searching??? - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(function (journal_entry_obj_li_get_result) { - if (journal_entry_obj_li_get_result) { - if (try_cache) { - db_save_ae_obj_li__journal_entry({ - obj_type: 'journal_entry', - obj_li: journal_entry_obj_li_get_result - }); - } - return journal_entry_obj_li_get_result; - } else { - return []; - } - }); + ae_promises.load__journal_entry_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'journal_entry', + for_obj_type: 'journal', + for_obj_id: journal_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for journal entry searching??? + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(function (journal_entry_obj_li_get_result) { + if (journal_entry_obj_li_get_result) { + if (try_cache) { + db_save_ae_obj_li__journal_entry({ + obj_type: 'journal_entry', + obj_li: journal_entry_obj_li_get_result + }); + } + return journal_entry_obj_li_get_result; + } else { + return []; + } + }); - if (log_lvl) { - console.log('ae_promises.load__journal_entry_obj_li:', ae_promises.load__journal_entry_obj_li); - } - return ae_promises.load__journal_entry_obj_li; + if (log_lvl) { + console.log('ae_promises.load__journal_entry_obj_li:', ae_promises.load__journal_entry_obj_li); + } + return ae_promises.load__journal_entry_obj_li; } - - - - - // Updated 2025-03-15 // export async function update_ae_obj__journal_entry( // { @@ -527,373 +521,369 @@ export async function qry__journal_entry( // return await ae_promises.update__journal_entry_obj; // } - // Updated 2025-05-09 -export async function update_ae_obj__journal_entry( - { - api_cfg, - journal_entry_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0, - }: { - api_cfg: any; - journal_entry_id: string; - data_kv: key_val; - params?: key_val, - try_cache?: boolean, - log_lvl?: number; - }) { - // log_lvl = 1; - if (log_lvl) { - console.log(`*** update_ae_obj__journal_entry() *** journal_entry_id=${journal_entry_id}`, data_kv); - } +export async function update_ae_obj__journal_entry({ + api_cfg, + journal_entry_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + journal_entry_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + // log_lvl = 1; + if (log_lvl) { + console.log( + `*** update_ae_obj__journal_entry() *** journal_entry_id=${journal_entry_id}`, + data_kv + ); + } - // Perform the API update - const result = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'journal_entry', - obj_id: journal_entry_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl, - }); + // Perform the API update + const result = await api.update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'journal_entry', + obj_id: journal_entry_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }); - // Handle the result - if (result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__journal_entry_props({ - obj_li: [result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_journals, - table_name: 'journal_entry', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // Handle the result + if (result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__journal_entry_props({ + obj_li: [result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_journals, + table_name: 'journal_entry', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__journal_entry({ - // obj_type: 'journal_entry', - // obj_li: [result], - // log_lvl: log_lvl, - // }); - } - return result; - } else { - console.error('Failed to update journal entry.'); - return null; - } + // await db_save_ae_obj_li__journal_entry({ + // obj_type: 'journal_entry', + // obj_li: [result], + // log_lvl: log_lvl, + // }); + } + return result; + } else { + console.error('Failed to update journal entry.'); + return null; + } } - // This function will loop through the journal_entry_obj_li and save each one to the DB. // Updated 2025-05-09 -export async function db_save_ae_obj_li__journal_entry( - { - obj_type, - obj_li, - log_lvl = 0 - }: { - obj_type: string, - obj_li: any, - log_lvl?: number - } - ) { - // log_lvl = 1; - if (log_lvl) { - console.log(`*** db_save_ae_obj_li__journal_entry() *** obj_type=${obj_type}`, obj_li); - } +export async function db_save_ae_obj_li__journal_entry({ + obj_type, + obj_li, + log_lvl = 0 +}: { + obj_type: string; + obj_li: any; + log_lvl?: number; +}) { + // log_lvl = 1; + if (log_lvl) { + console.log(`*** db_save_ae_obj_li__journal_entry() *** obj_type=${obj_type}`, obj_li); + } - if (obj_li && obj_li.length) { - // let obj_li_id = obj_li.map((obj: any) => obj.journal_entry_id_random); - let obj_li_id: string[] = []; + if (obj_li && obj_li.length) { + // let obj_li_id = obj_li.map((obj: any) => obj.journal_entry_id_random); + const obj_li_id: string[] = []; - for (const obj of obj_li) { - // obj_li.forEach(async function (obj: any) { - if (log_lvl) { - console.log(`Processing ae_obj ${obj_type}:`, obj); - } + for (const obj of obj_li) { + // obj_li.forEach(async function (obj: any) { + if (log_lvl) { + console.log(`Processing ae_obj ${obj_type}:`, obj); + } - let content = obj.content ?? ''; - // remove the most common zerowidth characters from the start of the file - let content_cleaned: null|string = null; - let content_md_html: null|string = null; // await marked.parse(content_cleaned ?? '') ?? null; - // let content_md_html_alt: null|string = await marked.parse(content_cleaned ?? '', { gfm: false }) ?? null; + let content = obj.content ?? ''; + // remove the most common zerowidth characters from the start of the file + let content_cleaned: null | string = null; + let content_md_html: null | string = null; // await marked.parse(content_cleaned ?? '') ?? null; + // let content_md_html_alt: null|string = await marked.parse(content_cleaned ?? '', { gfm: false }) ?? null; - if (obj.content_encrypted) { - // In theory "content" should be null if "content_encrypted" has a value. - content = null; // obj.content_encrypted; - content_cleaned = null; - content_md_html = null; - } else { - content_cleaned = content.replace(/^[\u200B\u200C\u200D\u200E\u200F\uFEFF]/,""); - content_md_html = await marked.parse(content_cleaned ?? '') ?? null; - } + if (obj.content_encrypted) { + // In theory "content" should be null if "content_encrypted" has a value. + content = null; // obj.content_encrypted; + content_cleaned = null; + content_md_html = null; + } else { + content_cleaned = content.replace(/^[\u200B\u200C\u200D\u200E\u200F\uFEFF]/, ''); + content_md_html = (await marked.parse(content_cleaned ?? '')) ?? null; + } - let history = obj.history ?? ''; - let history_cleaned: null|string = null; - let history_md_html: null|string = null; // await marked.parse(history_cleaned ?? '') ?? null; + let history = obj.history ?? ''; + let history_cleaned: null | string = null; + let history_md_html: null | string = null; // await marked.parse(history_cleaned ?? '') ?? null; - if (obj.history_encrypted) { - // In theory "history" should be null if "history_encrypted" has a value. - history = null; // obj.history_encrypted; - history_cleaned = null; - history_md_html = null; - } else { - history_cleaned = history.replace(/^[\u200B\u200C\u200D\u200E\u200F\uFEFF]/,""); - history_md_html = await marked.parse(history_cleaned ?? '') ?? null; - } + if (obj.history_encrypted) { + // In theory "history" should be null if "history_encrypted" has a value. + history = null; // obj.history_encrypted; + history_cleaned = null; + history_md_html = null; + } else { + history_cleaned = history.replace(/^[\u200B\u200C\u200D\u200E\u200F\uFEFF]/, ''); + history_md_html = (await marked.parse(history_cleaned ?? '')) ?? null; + } - let obj_record = { - id: obj.journal_entry_id_random, - journal_entry_id: obj.journal_entry_id_random, + const obj_record = { + id: obj.journal_entry_id_random, + journal_entry_id: obj.journal_entry_id_random, - journal_id: obj.journal_id_random, + journal_id: obj.journal_id_random, - code: obj.code, + code: obj.code, - for_type: obj.for_type, - for_id: obj.for_id, + for_type: obj.for_type, + for_id: obj.for_id, - journal_entry_type: obj.journal_entry_type, + journal_entry_type: obj.journal_entry_type, - person_id: obj.person_id_random, + person_id: obj.person_id_random, - template: obj.template ?? null, // Allow for a template to be used, otherwise null + template: obj.template ?? null, // Allow for a template to be used, otherwise null - activity_code: obj.activity_code, - category_code: obj.category_code, - type_code: obj.type_code, - topic_code: obj.topic_code, - tags: obj.tags, + activity_code: obj.activity_code, + category_code: obj.category_code, + type_code: obj.type_code, + topic_code: obj.topic_code, + tags: obj.tags, - public: obj.public, - private: obj.private, - personal: obj.personal, - professional: obj.professional, + public: obj.public, + private: obj.private, + personal: obj.personal, + professional: obj.professional, - name: obj.name, - short_name: obj.short_name ?? null, - summary: obj.summary, - outline: obj.outline, - // description: obj.description, + name: obj.name, + short_name: obj.short_name ?? null, + summary: obj.summary, + outline: obj.outline, + // description: obj.description, - content: obj.content, - content_md_html: content_md_html, - // content_md_html_alt: content_md_html_alt, - content_html: obj.content_html, - content_json: obj.content_json, - content_encrypted: obj.content_encrypted, + content: obj.content, + content_md_html: content_md_html, + // content_md_html_alt: content_md_html_alt, + content_html: obj.content_html, + content_json: obj.content_json, + content_encrypted: obj.content_encrypted, - history: obj.history, - history_md_html: history_md_html, - history_encrypted: obj.history_encrypted, + history: obj.history, + history_md_html: history_md_html, + history_encrypted: obj.history_encrypted, - passcode_hash: obj.passcode_hash, + passcode_hash: obj.passcode_hash, - // url: obj.url, - // url_text: obj.url_text, + // url: obj.url, + // url_text: obj.url_text, - // hosted_file_id: obj.hosted_file_id_random, + // hosted_file_id: obj.hosted_file_id_random, - // file_path: obj.file_path, + // file_path: obj.file_path, - // filename: obj.filename, - // file_extension: obj.file_extension, + // filename: obj.filename, + // file_extension: obj.file_extension, - // start_datetime: obj.start_datetime, - // end_datetime: obj.end_datetime, - // timezone: obj.timezone, + // start_datetime: obj.start_datetime, + // end_datetime: obj.end_datetime, + // timezone: obj.timezone, - // original_datetime: obj.original_datetime, - // original_timezone: obj.original_timezone, - // original_location: obj.original_location, - // original_url: obj.original_url, - // original_url_text: obj.original_url_text, + // original_datetime: obj.original_datetime, + // original_timezone: obj.original_timezone, + // original_location: obj.original_location, + // original_url: obj.original_url, + // original_url_text: obj.original_url_text, - // enable_for_public: obj.enable_for_public, + // enable_for_public: obj.enable_for_public, - alert: obj.alert, - alert_msg: obj.alert_msg, + alert: obj.alert, + alert_msg: obj.alert_msg, - // cfg_json: obj.cfg_json ?? {}, - data_json: obj.data_json ?? {}, + // cfg_json: obj.cfg_json ?? {}, + data_json: obj.data_json ?? {}, - // This only allows for basic access to the data. - // passcode_read: obj.passcode_read, // For LLM (AI) generated summary...??? - // passcode_read_expire: obj.passcode_read_expire, - // passcode_write: obj.passcode_write, - // passcode_write_expire: obj.passcode_write_expire, + // This only allows for basic access to the data. + // passcode_read: obj.passcode_read, // For LLM (AI) generated summary...??? + // passcode_read_expire: obj.passcode_read_expire, + // passcode_write: obj.passcode_write, + // passcode_write_expire: obj.passcode_write_expire, - enable: obj.enable, - hide: obj.hide, - archive: obj.archive, - archive_on: obj.archive_on, - priority: obj.priority, - sort: obj.sort, - group: obj.group, - notes: obj.notes, - created_on: obj.created_on, - updated_on: obj.updated_on, + enable: obj.enable, + hide: obj.hide, + archive: obj.archive, + archive_on: obj.archive_on, + priority: obj.priority, + sort: obj.sort, + group: obj.group, + notes: obj.notes, + created_on: obj.created_on, + updated_on: obj.updated_on, - // Generated fields for sorting locally only - tmp_sort_1: `${obj.group}_${obj.priority}_${obj.sort}_${obj.updated_on}_${obj.created_on}`, - tmp_sort_2: `${obj.group}_${obj.priority}_${obj.sort}_${obj.updated_on ?? obj.created_on}`, - // tmp_sort_1: `${obj.original_datetime}_${obj.group}_${obj.priority}_${obj.sort}`, - // tmp_sort_2: `${obj.group}_${obj.original_datetime}_${obj.priority}_${obj.sort}`, + // Generated fields for sorting locally only + tmp_sort_1: `${obj.group}_${obj.priority}_${obj.sort}_${obj.updated_on}_${obj.created_on}`, + tmp_sort_2: `${obj.group}_${obj.priority}_${obj.sort}_${obj.updated_on ?? obj.created_on}`, + // tmp_sort_1: `${obj.original_datetime}_${obj.group}_${obj.priority}_${obj.sort}`, + // tmp_sort_2: `${obj.group}_${obj.original_datetime}_${obj.priority}_${obj.sort}`, - // Generated fields for sorting locally only - // tmp_sort_1: `${obj.original_datetime}_${obj.group}_${obj.priority}_${obj.sort}`, - // tmp_sort_2: `${obj.group}_${obj.original_datetime}_${obj.priority}_${obj.sort}`, + // Generated fields for sorting locally only + // tmp_sort_1: `${obj.original_datetime}_${obj.group}_${obj.priority}_${obj.sort}`, + // tmp_sort_2: `${obj.group}_${obj.original_datetime}_${obj.priority}_${obj.sort}`, - // From SQL view - journal_code: obj.journal_code, - journal_name: obj.journal_name, + // From SQL view + journal_code: obj.journal_code, + journal_name: obj.journal_name - // A key value list of the others - // journal_other_kv: obj.journal_other_kv, - // journal_other_li: obj.journal_other_li, - }; + // A key value list of the others + // journal_other_kv: obj.journal_other_kv, + // journal_other_li: obj.journal_other_li, + }; - let id_random = null; + let id_random = null; - try { - id_random = await db_journals.journal_entry.update(obj_record.id, obj_record); - } catch (error) { - console.log(`Error: Failed to update ${obj_record.id}: ${error}`); - } - if (!id_random) { - if (log_lvl) { - console.log(`Failed to update record with ID: ${obj_record.id}. Trying put...`); - } - try { - id_random = await db_journals.journal_entry.put(obj_record); - } catch (error) { - console.log(`Error: Failed to put ${obj.journal_entry_id_random}: ${error}`); - } - } else { - if (log_lvl) { - console.log(`Updated record with ID: ${obj_record.id}`); - } - obj_li_id.push(obj_record.id); - } - if (!id_random) { - console.log(`Failed to save record with ID: ${obj_record.id}`); - } else { - if (log_lvl) { - console.log(`Saved record with ID: ${obj_record.id}`); - } - } - // }); - } + try { + id_random = await db_journals.journal_entry.update(obj_record.id, obj_record); + } catch (error) { + console.log(`Error: Failed to update ${obj_record.id}: ${error}`); + } + if (!id_random) { + if (log_lvl) { + console.log(`Failed to update record with ID: ${obj_record.id}. Trying put...`); + } + try { + id_random = await db_journals.journal_entry.put(obj_record); + } catch (error) { + console.log(`Error: Failed to put ${obj.journal_entry_id_random}: ${error}`); + } + } else { + if (log_lvl) { + console.log(`Updated record with ID: ${obj_record.id}`); + } + obj_li_id.push(obj_record.id); + } + if (!id_random) { + console.log(`Failed to save record with ID: ${obj_record.id}`); + } else { + if (log_lvl) { + console.log(`Saved record with ID: ${obj_record.id}`); + } + } + // }); + } - return obj_li_id; - } else { - if (log_lvl) { - console.log('No objects to save.'); - } - return []; - } + return obj_li_id; + } else { + if (log_lvl) { + console.log('No objects to save.'); + } + return []; + } } - // Updated 2025-05-09 -let properties_to_save = [ - 'id', - 'journal_entry_id', +const properties_to_save = [ + 'id', + 'journal_entry_id', - 'journal_id', + 'journal_id', - 'code', + 'code', - 'for_type', - 'for_id', + 'for_type', + 'for_id', - 'journal_entry_type', + 'journal_entry_type', - 'person_id', + 'person_id', - 'template', // Allow for a template to be used, otherwise null + 'template', // Allow for a template to be used, otherwise null - 'activity_code', - 'category_code', - 'type_code', - 'topic_code', - 'tags', + 'activity_code', + 'category_code', + 'type_code', + 'topic_code', + 'tags', - 'public', - 'private', - 'personal', - 'professional', + 'public', + 'private', + 'personal', + 'professional', - 'name', - 'short_name', - 'summary', - 'outline', - // 'description', + 'name', + 'short_name', + 'summary', + 'outline', + // 'description', - 'content', - 'content_md_html', - 'content_html', - 'content_json', - 'content_encrypted', + 'content', + 'content_md_html', + 'content_html', + 'content_json', + 'content_encrypted', - 'history', - 'history_md_html', - 'history_encrypted', + 'history', + 'history_md_html', + 'history_encrypted', - 'passcode_hash', + 'passcode_hash', - 'alert', - 'alert_msg', + 'alert', + 'alert_msg', - // 'cfg_json', - 'data_json', + // 'cfg_json', + 'data_json', - 'enable', - 'hide', - 'archive', - 'archive_on', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'archive', + 'archive_on', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - 'tmp_sort_3', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + 'tmp_sort_3', + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - 'journal_code', - 'journal_name', + // From SQL view + 'journal_code', + 'journal_name' - // A key value list of the others - // 'journal_other_kv', - // 'journal_other_li', + // A key value list of the others + // 'journal_other_kv', + // 'journal_other_li', ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -962,7 +952,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-05-09 export async function process_ae_obj__journal_entry_props({ obj_li, diff --git a/src/lib/ae_journals/ae_journals_functions.ts b/src/lib/ae_journals/ae_journals_functions.ts index ebec36e0..f36fb1b0 100644 --- a/src/lib/ae_journals/ae_journals_functions.ts +++ b/src/lib/ae_journals/ae_journals_functions.ts @@ -1,22 +1,21 @@ // This file is used to export all the functions that are used for Aether Journals related functions. -import * as journal from "$lib/ae_journals/ae_journals__journal"; -import * as journal_entry from "$lib/ae_journals/ae_journals__journal_entry"; +import * as journal from '$lib/ae_journals/ae_journals__journal'; +import * as journal_entry from '$lib/ae_journals/ae_journals__journal_entry'; - -let export_obj = { - load_ae_obj_id__journal: journal.load_ae_obj_id__journal, - load_ae_obj_li__journal: journal.load_ae_obj_li__journal, - create_ae_obj__journal: journal.create_ae_obj__journal, - delete_ae_obj_id__journal: journal.delete_ae_obj_id__journal, - update_ae_obj__journal: journal.update_ae_obj__journal, - // db_save_ae_obj_li__journal: journal.db_save_ae_obj_li__journal, - load_ae_obj_id__journal_entry: journal_entry.load_ae_obj_id__journal_entry, - load_ae_obj_li__journal_entry: journal_entry.load_ae_obj_li__journal_entry, - create_ae_obj__journal_entry: journal_entry.create_ae_obj__journal_entry, - delete_ae_obj_id__journal_entry: journal_entry.delete_ae_obj_id__journal_entry, - update_ae_obj__journal_entry: journal_entry.update_ae_obj__journal_entry, - qry__journal_entry: journal_entry.qry__journal_entry, - // db_save_ae_obj_li__journal_entry: journal_entry.db_save_ae_obj_li__journal_entry, +const export_obj = { + load_ae_obj_id__journal: journal.load_ae_obj_id__journal, + load_ae_obj_li__journal: journal.load_ae_obj_li__journal, + create_ae_obj__journal: journal.create_ae_obj__journal, + delete_ae_obj_id__journal: journal.delete_ae_obj_id__journal, + update_ae_obj__journal: journal.update_ae_obj__journal, + // db_save_ae_obj_li__journal: journal.db_save_ae_obj_li__journal, + load_ae_obj_id__journal_entry: journal_entry.load_ae_obj_id__journal_entry, + load_ae_obj_li__journal_entry: journal_entry.load_ae_obj_li__journal_entry, + create_ae_obj__journal_entry: journal_entry.create_ae_obj__journal_entry, + delete_ae_obj_id__journal_entry: journal_entry.delete_ae_obj_id__journal_entry, + update_ae_obj__journal_entry: journal_entry.update_ae_obj__journal_entry, + qry__journal_entry: journal_entry.qry__journal_entry + // db_save_ae_obj_li__journal_entry: journal_entry.db_save_ae_obj_li__journal_entry, }; -export let journals_func = export_obj; +export const journals_func = export_obj; diff --git a/src/lib/ae_journals/ae_journals_stores.ts b/src/lib/ae_journals/ae_journals_stores.ts index f160797f..09483d2c 100644 --- a/src/lib/ae_journals/ae_journals_stores.ts +++ b/src/lib/ae_journals/ae_journals_stores.ts @@ -5,182 +5,181 @@ import type { Writable } from 'svelte/store'; import type { key_val } from '$lib/stores/ae_stores'; - /* *** BEGIN *** Initialize journals_local_data_struct */ // This is for longer term or sticky app data. This should be stored to *local* storage. // Updated 2025-03-20 -let journals_local_data_struct: key_val = { - ver: '2024-08-20_19', - // Shared - name: 'Aether - Journals (SvelteKit 2.x Svelte 5.x)', - title: `OSIT's Æ Journals`, // Æ +const journals_local_data_struct: key_val = { + ver: '2024-08-20_19', + // Shared + name: 'Aether - Journals (SvelteKit 2.x Svelte 5.x)', + title: `OSIT's Æ Journals`, // Æ - mode__edit: false, - mode__debug: false, + mode__edit: false, + mode__debug: false, - datetime_format: 'datetime_12_long', - time_format: 'time_12_short', - time_hours: 12, // 12 or 24 + datetime_format: 'datetime_12_long', + time_format: 'time_12_short', + time_hours: 12, // 12 or 24 - qry__enabled: 'enabled', // all, disabled, enabled - qry__hidden: 'not_hidden', // all, hidden, not_hidden - qry__limit: 20, - qry__order_by_li: { - // 'created_on': 'desc', - // 'updated_on': 'desc', - }, - qry__offset: 0, - qry__journal_id: null, + qry__enabled: 'enabled', // all, disabled, enabled + qry__hidden: 'not_hidden', // all, hidden, not_hidden + qry__limit: 20, + qry__order_by_li: { + // 'created_on': 'desc', + // 'updated_on': 'desc', + }, + qry__offset: 0, + qry__journal_id: null, - journal_view_history_li: [], // Appended each time the journal is loaded. - entry_view_history_li: [], // NO LONGER USED: Appended each time the entry is loaded. - entry_view_history_kv: {}, // Keyed by journal_entry_id for quick lookup. - entry_view_history_max: 15, // Maximum number of journal entries to keep in history. + journal_view_history_li: [], // Appended each time the journal is loaded. + entry_view_history_li: [], // NO LONGER USED: Appended each time the entry is loaded. + entry_view_history_kv: {}, // Keyed by journal_entry_id for quick lookup. + entry_view_history_max: 15, // Maximum number of journal entries to keep in history. - llm__api_base_url: 'https://ai.dgrzone.com/api', - llm__api_model: 'dgrzone-deepseek-8b-quick', - llm__api_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVhYjI2MzdlLThiMjktNGM2Zi05MzVhLWFkYjU1MDkwMGU5MCJ9.VObfR91GrX3j1vHbHZqGsOWEyrL981cbSWWjaXfYbUQ', - llm__api_dangerous_browser: false, // This allows for use of localhost. - llm__stream: false, // Whether to use streaming or not. Not all APIs support this. - llm__timeout_ms: 60000, // 60 seconds - llm__max_retries: 3, // Number of times to retry a failed LLM API call. - llm__retry_delay_ms: 2000, // 2 seconds between retries. + llm__api_base_url: 'https://ai.dgrzone.com/api', + llm__api_model: 'dgrzone-deepseek-8b-quick', + llm__api_token: + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVhYjI2MzdlLThiMjktNGM2Zi05MzVhLWFkYjU1MDkwMGU5MCJ9.VObfR91GrX3j1vHbHZqGsOWEyrL981cbSWWjaXfYbUQ', + llm__api_dangerous_browser: false, // This allows for use of localhost. + llm__stream: false, // Whether to use streaming or not. Not all APIs support this. + llm__timeout_ms: 60000, // 60 seconds + llm__max_retries: 3, // Number of times to retry a failed LLM API call. + llm__retry_delay_ms: 2000, // 2 seconds between retries. - llm__system_prompt: 'You are a helpful assistant that helps people find information.', - llm__max_tokens: 1024, - llm__temperature: 0.7, - llm__top_p: 1.0, - llm__n: 1, - llm__frequency_penalty: 0.0, - llm__presence_penalty: 0.0, + llm__system_prompt: 'You are a helpful assistant that helps people find information.', + llm__max_tokens: 1024, + llm__temperature: 0.7, + llm__top_p: 1.0, + llm__n: 1, + llm__frequency_penalty: 0.0, + llm__presence_penalty: 0.0, - journal: { - edit: false, - edit_kv: {}, + journal: { + edit: false, + edit_kv: {}, - type_code_li: [ - { code: 'diary', name: 'Diary' }, - { code: 'log', name: 'Log' }, - { code: 'journal', name: 'Journal' }, - { code: 'notebook', name: 'Notebook' }, - { code: 'personal', name: 'Personal' }, - { code: 'professional', name: 'Professional' }, - { code: 'tracking', name: 'Tracking' }, - { code: 'other', name: 'Other' }, - { code: 'test', name: 'Test' }, - // { code: 'notepad', name: 'Notepad' }, - ], - }, - entry: { - llm__system_prompt: 'Summarize the following journal entry content in a concise manner, focusing on key points and insights.', - llm__max_tokens: 512, - llm__temperature: 0.7, - llm__top_p: 1.0, - llm__n: 1, - llm__frequency_penalty: 0.0, - llm__presence_penalty: 0.0, - - edit: false, - edit_kv: {}, - }, + type_code_li: [ + { code: 'diary', name: 'Diary' }, + { code: 'log', name: 'Log' }, + { code: 'journal', name: 'Journal' }, + { code: 'notebook', name: 'Notebook' }, + { code: 'personal', name: 'Personal' }, + { code: 'professional', name: 'Professional' }, + { code: 'tracking', name: 'Tracking' }, + { code: 'other', name: 'Other' }, + { code: 'test', name: 'Test' } + // { code: 'notepad', name: 'Notepad' }, + ] + }, + entry: { + llm__system_prompt: + 'Summarize the following journal entry content in a concise manner, focusing on key points and insights.', + llm__max_tokens: 512, + llm__temperature: 0.7, + llm__top_p: 1.0, + llm__n: 1, + llm__frequency_penalty: 0.0, + llm__presence_penalty: 0.0, + edit: false, + edit_kv: {} + } }; // console.log(`AE Stores - App Journals Local Storage Data:`, journals_local_data_struct); // This works and uses *local* storage: -export let journals_loc: Writable = persisted('ae_journals_loc', journals_local_data_struct); +export const journals_loc: Writable = persisted( + 'ae_journals_loc', + journals_local_data_struct +); // console.log(`AE Stores - App Local Storage Data:`, get(ae_loc)); - /* *** BEGIN *** Initialize journals_session_data_struct */ // Temporary app data. This is lost if the page is refreshed or using different tabs/windows. This should be stored to *session* storage. // Updated 2025-03-20 -let journals_session_data_struct: key_val = { - ver: '2024-08-20_19', - log_lvl: 1, +const journals_session_data_struct: key_val = { + ver: '2024-08-20_19', + log_lvl: 1, - // Shared Triggers - trigger: null, - trigger__journal_id: null, - // trigger__journal_li: null, + // Shared Triggers + trigger: null, + trigger__journal_id: null, + // trigger__journal_li: null, - show__modal__journals_config: false, + show__modal__journals_config: false, - show__modal_edit__journal_obj: false, - show__modal_new__journal_obj: false, - show__modal_view__journal_id: null, - show_list__journal_entry_li_group: true, - show__modal_view__journal_entry_id: null, - show__modal_edit__journal_entry_id: null, + show__modal_edit__journal_obj: false, + show__modal_new__journal_obj: false, + show__modal_view__journal_id: null, + show_list__journal_entry_li_group: true, + show__modal_view__journal_entry_id: null, + show__modal_edit__journal_entry_id: null, - show__content__journal_entry_history: false, + show__content__journal_entry_history: false, - journal: { - edit: false, - edit_kv: {}, + journal: { + edit: false, + edit_kv: {}, - new_journal_name: '', - new_journal_type_code: '', + new_journal_name: '', + new_journal_type_code: '', - tmp_obj: {}, - }, - entry: { - show__ai_summary: false, - ai_summary: '', - decrypt_kv: {}, // Essentially flag that the entry (content and history) can be decrypted. - edit: false, - edit_kv: {}, + tmp_obj: {} + }, + entry: { + show__ai_summary: false, + ai_summary: '', + decrypt_kv: {}, // Essentially flag that the entry (content and history) can be decrypted. + edit: false, + edit_kv: {}, - tmp_obj: {}, - }, + tmp_obj: {} + }, - journal_kv: { - // journal_id: {}, - }, + journal_kv: { + // journal_id: {}, + } }; // console.log(`AE Stores - App Journals Session Storage Data:`, journals_session_data_struct); -export let journals_sess = writable(journals_session_data_struct); - - +export const journals_sess = writable(journals_session_data_struct); /* *** BEGIN *** Initialize journals_slct and journals_trig */ /* The slct and slct_trigger variable should not be stored in local storage. Only use session storage because browser tabs can be open to different journals, badges, exhibits, etc. */ // Intended for temporary session storage. // Updated 2024-08-20 -let journals_slct_obj_template: key_val = { - // Top level - 'journal_id': null, - 'journal_obj': {}, - 'journal_obj_li': [], +const journals_slct_obj_template: key_val = { + // Top level + journal_id: null, + journal_obj: {}, + journal_obj_li: [], - 'tmp_journal_obj': {}, // Temporary object for new journal - 'tmp_journal_entry_obj': {}, // Temporary object for new journal entry + tmp_journal_obj: {}, // Temporary object for new journal + tmp_journal_entry_obj: {}, // Temporary object for new journal entry - 'lq__journal_obj': {}, // Testing passing a LiveQuery object around... + lq__journal_obj: {} // Testing passing a LiveQuery object around... }; // console.log(`AE Stores - Selected Journals Objects:`, journals_slct_obj_template); // This works, and uses *session* (not local) storage: -export let journals_slct = writable(journals_slct_obj_template); - +export const journals_slct = writable(journals_slct_obj_template); /* *** BEGIN *** Initialize journals_trig */ // Intended for temporary session storage. // Updated 2025-03-16 -let journals_trig_template: key_val = { - journal_id: false, - journal_entry_li: false, +const journals_trig_template: key_val = { + journal_id: false, + journal_entry_li: false }; -export let journals_trig: any = writable(journals_trig_template); +export const journals_trig: any = writable(journals_trig_template); // console.log(`AE Journals Stores - Journals Trigger:`, journals_trig); - /* *** BEGIN *** Initialize journals_prom */ // Intended for temporary session storage. // Updated 2025-03-16 -let journals_prom_template: key_val = { - journal_id: false, - journal_entry_li: false,}; -export let journals_prom: any = writable(journals_prom_template); +const journals_prom_template: key_val = { + journal_id: false, + journal_entry_li: false +}; +export const journals_prom: any = writable(journals_prom_template); // console.log(`AE Journals Stores - Journals Trigger:`, journals_prom); diff --git a/src/lib/ae_journals/db_journals.ts b/src/lib/ae_journals/db_journals.ts index 3e944eef..9eb113e4 100644 --- a/src/lib/ae_journals/db_journals.ts +++ b/src/lib/ae_journals/db_journals.ts @@ -9,512 +9,510 @@ import type { key_val } from '$lib/stores/ae_stores'; // LLM = Large Language Model (AI) // Updated 2025-03-15 - export interface Journal { - id: string; // actually "id_random" - journal_id: string; + id: string; // actually "id_random" + journal_id: string; - // Essentially this is a change log of journals - snapshot_id?: string; // This is the original journal ID. If deleted, then delete all children journals. - previous_id?: null|string; // This is the old or parent journal ID - next_id?: null|string; // This is the new or child journal ID + // Essentially this is a change log of journals + snapshot_id?: string; // This is the original journal ID. If deleted, then delete all children journals. + previous_id?: null | string; // This is the old or parent journal ID + next_id?: null | string; // This is the new or child journal ID - external_id?: null|string; - import_id?: null|string; - code?: null|string; + external_id?: null | string; + import_id?: null | string; + code?: null | string; - for_type?: null|string; - for_id?: null|string; + for_type?: null | string; + for_id?: null | string; - // template?: null|boolean; // Is this a template journal? If true, it can be used to create new journals. + // template?: null|boolean; // Is this a template journal? If true, it can be used to create new journals. - type_code?: null|string; + type_code?: null | string; - account_id?: null|string; // Owner account of the journal - person_id?: null|string; // Owner person of the journal - // event_id?: null|string; // Assign to an event??? - // location_id?: null|string; // Assign to a location??? + account_id?: null | string; // Owner account of the journal + person_id?: null | string; // Owner person of the journal + // event_id?: null|string; // Assign to an event??? + // location_id?: null|string; // Assign to a location??? - name: string; // or the title - short_name?: null|string; // Short name for the journal, if any. Used for display purposes. - summary?: null|string; // LLM (AI) generated summary...??? - outline?: null|string; // LLM (AI) generated outline...??? + name: string; // or the title + short_name?: null | string; // Short name for the journal, if any. Used for display purposes. + summary?: null | string; // LLM (AI) generated summary...??? + outline?: null | string; // LLM (AI) generated outline...??? - description?: null|string; - description_md_html?: null|string; // Markdown converted to HTML based on description. Uses marked or similar library for conversion. - description_md_html_alt?: null|string; // Markdown converted to HTML based on description. Uses marked or similar library for conversion. - description_html?: null|string; - description_json?: null|string; + description?: null | string; + description_md_html?: null | string; // Markdown converted to HTML based on description. Uses marked or similar library for conversion. + description_md_html_alt?: null | string; // Markdown converted to HTML based on description. Uses marked or similar library for conversion. + description_html?: null | string; + description_json?: null | string; - start_datetime?: null|Date; - end_datetime?: null|Date; - timezone?: null|string; + start_datetime?: null | Date; + end_datetime?: null | Date; + timezone?: null | string; - alert?: null|boolean; // LLM (AI) generated summary...??? - alert_msg?: null|string; // LLM (AI) generated summary...??? + alert?: null | boolean; // LLM (AI) generated summary...??? + alert_msg?: null | string; // LLM (AI) generated summary...??? - sort_by?: null|string; // This is the sort by field - sort_by_desc?: null|string; // This is the sort by field description + sort_by?: null | string; // This is the sort by field + sort_by_desc?: null | string; // This is the sort by field description - cfg_json?: null|key_val; // This is the configuration JSON for the journal + cfg_json?: null | key_val; // This is the configuration JSON for the journal - data_json?: null|key_val; // We always need to store something extra... + data_json?: null | key_val; // We always need to store something extra... - ux_mode?: null|string; // 'mobile' or 'desktop' + ux_mode?: null | string; // 'mobile' or 'desktop' - // This only allows for basic access to the data. - passcode_read?: null|string; // For LLM (AI) generated summary...??? - passcode_read_expire?: null|Date; - passcode_write?: null|string; - passcode_write_expire?: null|Date + // This only allows for basic access to the data. + passcode_read?: null | string; // For LLM (AI) generated summary...??? + passcode_read_expire?: null | Date; + passcode_write?: null | string; + passcode_write_expire?: null | Date; - passcode?: null|string; // For Journal Entry encryption password - passcode_timeout?: null|number; // Timeout in seconds + passcode?: null | string; // For Journal Entry encryption password + passcode_timeout?: null | number; // Timeout in seconds - private_passcode?: null|string; // Combine with the Journal passcode for Journal Entry encryption password + private_passcode?: null | string; // Combine with the Journal passcode for Journal Entry encryption password - auth_key?: null|string; // For Journal authorization without sign in + auth_key?: null | string; // For Journal authorization without sign in - enable: null|boolean; - hide?: null|boolean; - archive?: null|boolean; // Archive the journal - archive_on?: null|Date; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + archive?: null | boolean; // Archive the journal + archive_on?: null | Date; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; - tmp_sort_3?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; + tmp_sort_3?: null | string; - combined_passcode?: null|string; // For Journal Entry encryption password + combined_passcode?: null | string; // For Journal Entry encryption password - // Additional fields for convenience (database views) - file_count?: null|number; // Only files directly under a journal - journal_file_id_li_json?: null|string; + // Additional fields for convenience (database views) + file_count?: null | number; // Only files directly under a journal + journal_file_id_li_json?: null | string; - // One person - person__given_name?: null|string; - person__family_name?: null|string; - person__full_name?: null|string; - person__primary_email?: null|string; - person__passcode?: null|string; + // One person + person__given_name?: null | string; + person__family_name?: null | string; + person__full_name?: null | string; + person__primary_email?: null | string; + person__passcode?: null | string; - // JSON formatted key value pairs for multiple people: {id: name, email, etc.} - person__kv_json?: null|string; + // JSON formatted key value pairs for multiple people: {id: name, email, etc.} + person__kv_json?: null | string; - journal_name?: null|string; + journal_name?: null | string; - journal_location_code?: null|string; - journal_location_name?: null|string; + journal_location_code?: null | string; + journal_location_name?: null | string; - journal_entry_count?: null|number; + journal_entry_count?: null | number; - // A key value list of the entries - journal_entry_kv?: null|key_val; - journal_entry_li?: null|[]; - // A key value list of the files - journal_file_kv?: null|key_val; - journal_file_li?: null|[]; + // A key value list of the entries + journal_entry_kv?: null | key_val; + journal_entry_li?: null | []; + // A key value list of the files + journal_file_kv?: null | key_val; + journal_file_li?: null | []; - // journal_collection_id?: null|string; // For a collection of journals? + // journal_collection_id?: null|string; // For a collection of journals? - // Future standard fields!!! - obj_id?: null|string; - obj_ext_uid?: null|string; // Probably not needed for journals - obj_ext_id?: null|string; // Probably not needed for journals - obj_import_id?: null|string; // Probably not needed for journals - obj_code?: null|string; - obj_account_id?: null|string; - obj_passcode?: null|string; - obj_type?: null|string; // Should always be 'journal' in this case - obj_type_ver_id?: null|string; // The ID from the table for the object type - obj_name?: null|string; - obj_summary?: null|string; // LLM (AI) generated summary...??? - obj_outline?: null|string; // LLM (AI) generated outline...??? - obj_description?: null|string; // Probably not needed for journals - obj_enable?: null|boolean; - obj_enable_on?: null|Date; - obj_archive_on?: null|Date; - obj_hide?: null|boolean; - obj_priority?: null|number; - obj_sort?: null|number; - obj_group?: null|string; - obj_cfg_json?: null|string; - obj_notes?: null|string; - obj_created_on?: Date; - obj_updated_on?: null|Date; + // Future standard fields!!! + obj_id?: null | string; + obj_ext_uid?: null | string; // Probably not needed for journals + obj_ext_id?: null | string; // Probably not needed for journals + obj_import_id?: null | string; // Probably not needed for journals + obj_code?: null | string; + obj_account_id?: null | string; + obj_passcode?: null | string; + obj_type?: null | string; // Should always be 'journal' in this case + obj_type_ver_id?: null | string; // The ID from the table for the object type + obj_name?: null | string; + obj_summary?: null | string; // LLM (AI) generated summary...??? + obj_outline?: null | string; // LLM (AI) generated outline...??? + obj_description?: null | string; // Probably not needed for journals + obj_enable?: null | boolean; + obj_enable_on?: null | Date; + obj_archive_on?: null | Date; + obj_hide?: null | boolean; + obj_priority?: null | number; + obj_sort?: null | number; + obj_group?: null | string; + obj_cfg_json?: null | string; + obj_notes?: null | string; + obj_created_on?: Date; + obj_updated_on?: null | Date; } export const journal_field_li = [ - 'id', - 'journal_id', - 'snapshot_id', - 'previous_id', - 'next_id', - 'external_id', - 'import_id', - 'code', - 'for_type', - 'for_id', - 'type_code', - 'account_id', - 'person_id', - 'name', - 'short_name', - 'summary', - 'outline', - 'description', - 'description_md_html', - 'description_md_html_alt', - 'description_html', - 'description_json', - 'start_datetime', - 'end_datetime', - 'timezone', - 'alert', - 'alert_msg', - 'sort_by', - 'sort_by_desc', - 'cfg_json', - 'data_json', - 'ux_mode', - 'passcode_read', - 'passcode_read_expire', - 'passcode_write', - 'passcode_write_expire', - 'passcode_timeout', - 'private_passcode', - 'auth_key', - 'enable', - 'hide', - 'archive', // Archive the journal - 'archive_on', // Archive date - 'priority', // Priority flag - 'sort', // Sort order - 'group', // Group name - 'notes', // Notes about the journal - 'created_on', // Creation date - 'updated_on', // Last updated date + 'id', + 'journal_id', + 'snapshot_id', + 'previous_id', + 'next_id', + 'external_id', + 'import_id', + 'code', + 'for_type', + 'for_id', + 'type_code', + 'account_id', + 'person_id', + 'name', + 'short_name', + 'summary', + 'outline', + 'description', + 'description_md_html', + 'description_md_html_alt', + 'description_html', + 'description_json', + 'start_datetime', + 'end_datetime', + 'timezone', + 'alert', + 'alert_msg', + 'sort_by', + 'sort_by_desc', + 'cfg_json', + 'data_json', + 'ux_mode', + 'passcode_read', + 'passcode_read_expire', + 'passcode_write', + 'passcode_write_expire', + 'passcode_timeout', + 'private_passcode', + 'auth_key', + 'enable', + 'hide', + 'archive', // Archive the journal + 'archive_on', // Archive date + 'priority', // Priority flag + 'sort', // Sort order + 'group', // Group name + 'notes', // Notes about the journal + 'created_on', // Creation date + 'updated_on', // Last updated date - 'tmp_sort_1', // Temporary sort field 1 - 'tmp_sort_2', // Temporary sort field 2 - 'tmp_sort_3', // Temporary sort field 3 + 'tmp_sort_1', // Temporary sort field 1 + 'tmp_sort_2', // Temporary sort field 2 + 'tmp_sort_3', // Temporary sort field 3 - 'combined_passcode', // For Journal Entry encryption password - 'file_count', // Only files directly under a journal - 'journal_file_id_li_json', // JSON string of file IDs - 'person__given_name', // Person's given name - 'person__family_name', // Person's family name - 'person__full_name', // Person's full name - 'person__primary_email', // Person's primary email - 'person__passcode', // Person's passcode - 'person__kv_json', // JSON formatted key value pairs for multiple people - 'journal_name', // Journal name - 'journal_location_code', // Journal location code - 'journal_location_name', // Journal location name - 'journal_entry_count', // Count of journal entries - 'journal_entry_kv', // Key value list of the entries - 'journal_entry_li', // List of journal entries - 'journal_file_kv', // Key value list of the files - 'journal_file_li', // List of journal files + 'combined_passcode', // For Journal Entry encryption password + 'file_count', // Only files directly under a journal + 'journal_file_id_li_json', // JSON string of file IDs + 'person__given_name', // Person's given name + 'person__family_name', // Person's family name + 'person__full_name', // Person's full name + 'person__primary_email', // Person's primary email + 'person__passcode', // Person's passcode + 'person__kv_json', // JSON formatted key value pairs for multiple people + 'journal_name', // Journal name + 'journal_location_code', // Journal location code + 'journal_location_name', // Journal location name + 'journal_entry_count', // Count of journal entries + 'journal_entry_kv', // Key value list of the entries + 'journal_entry_li', // List of journal entries + 'journal_file_kv', // Key value list of the files + 'journal_file_li', // List of journal files - 'obj_id', // Object ID - 'obj_ext_uid', // External UID - 'obj_ext_id', // External ID - 'obj_import_id', // Import ID - 'obj_code', // Object code - 'obj_account_id', // Object account ID - 'obj_passcode', // Object passcode - 'obj_type', // Object type - 'obj_type_ver_id', // Object type version ID - 'obj_name', // Object name - 'obj_summary', // Object summary - 'obj_outline', // Object outline - 'obj_description', // Object description - 'obj_enable', // Object enable flag - 'obj_enable_on', // Object enable date - 'obj_archive_on', // Object archive date - 'obj_hide', // Object hide flag - 'obj_priority', // Object priority - 'obj_sort', // Object sort order - 'obj_group', // Object group name - 'obj_cfg_json', // Object configuration JSON - 'obj_notes', // Object notes - 'obj_created_on', // Object creation date - 'obj_updated_on' // Object last updated date + 'obj_id', // Object ID + 'obj_ext_uid', // External UID + 'obj_ext_id', // External ID + 'obj_import_id', // Import ID + 'obj_code', // Object code + 'obj_account_id', // Object account ID + 'obj_passcode', // Object passcode + 'obj_type', // Object type + 'obj_type_ver_id', // Object type version ID + 'obj_name', // Object name + 'obj_summary', // Object summary + 'obj_outline', // Object outline + 'obj_description', // Object description + 'obj_enable', // Object enable flag + 'obj_enable_on', // Object enable date + 'obj_archive_on', // Object archive date + 'obj_hide', // Object hide flag + 'obj_priority', // Object priority + 'obj_sort', // Object sort order + 'obj_group', // Object group name + 'obj_cfg_json', // Object configuration JSON + 'obj_notes', // Object notes + 'obj_created_on', // Object creation date + 'obj_updated_on' // Object last updated date ]; // Updated 2025-04-02 export interface Journal_Entry { - id: string; // actually "id_random" - journal_entry_id: string; + id: string; // actually "id_random" + journal_entry_id: string; - journal_id: string; // This is the parent journal ID. If deleted, then delete all children journal entries. + journal_id: string; // This is the parent journal ID. If deleted, then delete all children journal entries. - // Essentially this is a change log of journal entries - snapshot_id?: string; // This is the original journal ID. If deleted, then delete all children journal entries. - previous_id?: null|string; // This is the old or parent journal ID - next_id?: null|string; // This is the new or child journal ID + // Essentially this is a change log of journal entries + snapshot_id?: string; // This is the original journal ID. If deleted, then delete all children journal entries. + previous_id?: null | string; // This is the old or parent journal ID + next_id?: null | string; // This is the new or child journal ID - external_id?: null|string; - import_id?: null|string; - code?: null|string; + external_id?: null | string; + import_id?: null | string; + code?: null | string; - for_type?: null|string; - for_id?: null|string; + for_type?: null | string; + for_id?: null | string; - template?: null|boolean; // Is this a template journal entry? If true, it can be used to create new journal entries. + template?: null | boolean; // Is this a template journal entry? If true, it can be used to create new journal entries. - activity_code?: null|string; - category_code?: null|string; - topic_code?: null|string; - type_code?: null|string; - tags?: null|string; // Comma separated tags + activity_code?: null | string; + category_code?: null | string; + topic_code?: null | string; + type_code?: null | string; + tags?: null | string; // Comma separated tags - journal_entry_type?: null|string; // This is the type of journal entry + journal_entry_type?: null | string; // This is the type of journal entry - account_id?: null|string; // Owner account of the journal - person_id?: null|string; // Owner person of the journal - // event_id?: null|string; // Assign to an event??? - // location_id?: null|string; // Assign to a location??? + account_id?: null | string; // Owner account of the journal + person_id?: null | string; // Owner person of the journal + // event_id?: null|string; // Assign to an event??? + // location_id?: null|string; // Assign to a location??? - public?: null|boolean; - private?: null|boolean; - personal?: null|boolean; - professional?: null|boolean; + public?: null | boolean; + private?: null | boolean; + personal?: null | boolean; + professional?: null | boolean; - name: string; // or the title - short_name?: null|string; // Short name for the journal entry, if any. Used for display purposes. Most likely for the templates list. - summary?: null|string; // LLM (AI) generated summary...??? - outline?: null|string; // LLM (AI) generated outline...??? - // description?: null|string; // This is the description of the journal entry + name: string; // or the title + short_name?: null | string; // Short name for the journal entry, if any. Used for display purposes. Most likely for the templates list. + summary?: null | string; // LLM (AI) generated summary...??? + outline?: null | string; // LLM (AI) generated outline...??? + // description?: null|string; // This is the description of the journal entry - content?: null|string; - content_md_html?: null|string; // Markdown converted to HTML based on content. Uses marked or similar library for conversion. - content_md_html_alt?: null|string; // Markdown converted to HTML based on content. Uses marked or similar library for conversion. - content_html?: null|string; - content_json?: null|string; - content_encrypted?: null|string; // This is the encrypted content of the journal entry + content?: null | string; + content_md_html?: null | string; // Markdown converted to HTML based on content. Uses marked or similar library for conversion. + content_md_html_alt?: null | string; // Markdown converted to HTML based on content. Uses marked or similar library for conversion. + content_html?: null | string; + content_json?: null | string; + content_encrypted?: null | string; // This is the encrypted content of the journal entry - history?: null|string; // This is the history of the journal entry; a log - history_encrypted?: null|string; // This is the encrypted history of the journal entry + history?: null | string; // This is the history of the journal entry; a log + history_encrypted?: null | string; // This is the encrypted history of the journal entry - passcode_hash?: null|string; // This is the passcode hash for the journal entry to look up the passcode + passcode_hash?: null | string; // This is the passcode hash for the journal entry to look up the passcode - start_datetime?: null|Date; - end_datetime?: null|Date; - timezone?: null|string; - seconds?: null|number; // Duration in seconds + start_datetime?: null | Date; + end_datetime?: null | Date; + timezone?: null | string; + seconds?: null | number; // Duration in seconds - location?: null|string; // Location of the journal entry - latitude?: null|number; // Latitude of the journal entry - longitude?: null|number; // Longitude of the journal entry + location?: null | string; // Location of the journal entry + latitude?: null | number; // Latitude of the journal entry + longitude?: null | number; // Longitude of the journal entry - billable?: null|boolean; // Is this billable? - bill_to?: null|string; // Who to bill for this journal entry - bill_rate?: null|number; // Rate to bill for this journal entry - billable_minutes?: null|number; // Billable minutes for this journal entry + billable?: null | boolean; // Is this billable? + bill_to?: null | string; // Who to bill for this journal entry + bill_rate?: null | number; // Rate to bill for this journal entry + billable_minutes?: null | number; // Billable minutes for this journal entry - alert?: null|boolean; // LLM (AI) generated summary...??? - alert_msg?: null|string; // LLM (AI) generated summary...??? + alert?: null | boolean; // LLM (AI) generated summary...??? + alert_msg?: null | string; // LLM (AI) generated summary...??? - parent_id?: null|string; // This is the parent journal entry ID. If deleted, then delete all children journal entries. - related_entry_id_li?: null|key_val; // List of related journal entry IDs + parent_id?: null | string; // This is the parent journal entry ID. If deleted, then delete all children journal entries. + related_entry_id_li?: null | key_val; // List of related journal entry IDs - // cfg_json?: null|key_val; // This is the configuration JSON for the journal entry - data_json?: null|key_val; // We always need to store something extra... + // cfg_json?: null|key_val; // This is the configuration JSON for the journal entry + data_json?: null | key_val; // We always need to store something extra... - // This only allows for basic access to the content. - passcode_read?: null|string; // For LLM (AI) generated summary...??? - passcode_read_expire?: null|Date; - passcode_write?: null|string; - passcode_write_expire?: null|Date + // This only allows for basic access to the content. + passcode_read?: null | string; // For LLM (AI) generated summary...??? + passcode_read_expire?: null | Date; + passcode_write?: null | string; + passcode_write_expire?: null | Date; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; - tmp_sort_3?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; + tmp_sort_3?: null | string; - // Additional fields for convenience (database views) - file_count?: null|number; // Only files directly under a journal - journal_file_id_li_json?: null|string; + // Additional fields for convenience (database views) + file_count?: null | number; // Only files directly under a journal + journal_file_id_li_json?: null | string; - journal_code?: null|string; // This is the code for the journal entry - journal_name?: null|string; // This is the name for the journal entry + journal_code?: null | string; // This is the code for the journal entry + journal_name?: null | string; // This is the name for the journal entry - // One person - person__given_name?: null|string; - person__family_name?: null|string; - person__full_name?: null|string; - person__primary_email?: null|string; - person__passcode?: null|string; + // One person + person__given_name?: null | string; + person__family_name?: null | string; + person__full_name?: null | string; + person__primary_email?: null | string; + person__passcode?: null | string; - // JSON formatted key value pairs for multiple people: {id: name, email, etc.} - person__kv_json?: null|string; + // JSON formatted key value pairs for multiple people: {id: name, email, etc.} + person__kv_json?: null | string; - // A key value list of the files - journal_file_kv?: null|key_val; - journal_file_li?: null|[]; + // A key value list of the files + journal_file_kv?: null | key_val; + journal_file_li?: null | []; - // journal_collection_id?: null|string; // For a collection of journal entries? + // journal_collection_id?: null|string; // For a collection of journal entries? - // Future standard fields!!! - obj_id?: null|string; - obj_ext_uid?: null|string; // Probably not needed for journal entries - obj_ext_id?: null|string; // Probably not needed for journal entries - obj_import_id?: null|string; // Probably not needed for journal entries - obj_code?: null|string; - obj_account_id?: null|string; - obj_passcode?: null|string; - obj_type?: null|string; // Should always be 'journal' in this case - obj_type_ver_id?: null|string; // The ID from the table for the object type - obj_name?: null|string; - obj_summary?: null|string; // LLM (AI) generated summary...??? - obj_outline?: null|string; // LLM (AI) generated outline...??? - obj_description?: null|string; // Probably not needed for journal entries - obj_enable?: null|boolean; - obj_enable_on?: null|Date; - obj_archive_on?: null|Date; - obj_hide?: null|boolean; - obj_priority?: null|number; - obj_sort?: null|number; - obj_group?: null|string; - obj_cfg_json?: null|string; - obj_notes?: null|string; - obj_created_on?: Date; - obj_updated_on?: null|Date; + // Future standard fields!!! + obj_id?: null | string; + obj_ext_uid?: null | string; // Probably not needed for journal entries + obj_ext_id?: null | string; // Probably not needed for journal entries + obj_import_id?: null | string; // Probably not needed for journal entries + obj_code?: null | string; + obj_account_id?: null | string; + obj_passcode?: null | string; + obj_type?: null | string; // Should always be 'journal' in this case + obj_type_ver_id?: null | string; // The ID from the table for the object type + obj_name?: null | string; + obj_summary?: null | string; // LLM (AI) generated summary...??? + obj_outline?: null | string; // LLM (AI) generated outline...??? + obj_description?: null | string; // Probably not needed for journal entries + obj_enable?: null | boolean; + obj_enable_on?: null | Date; + obj_archive_on?: null | Date; + obj_hide?: null | boolean; + obj_priority?: null | number; + obj_sort?: null | number; + obj_group?: null | string; + obj_cfg_json?: null | string; + obj_notes?: null | string; + obj_created_on?: Date; + obj_updated_on?: null | Date; } export const journal_entry_field_li = [ - 'id', - 'journal_entry_id', - 'journal_id', - 'code', - 'for_type', - 'for_id', - 'template', - 'activity_code', - 'category_code', - 'topic_code', - 'type_code', - 'tags', - 'journal_entry_type', - 'account_id', - 'person_id', - 'public', - 'private', - 'personal', - 'professional', - 'name', - 'short_name', - 'summary', - 'outline', - 'content', - 'content_md_html', - 'content_md_html_alt', - 'content_html', - 'content_json', - 'content_encrypted', - 'history', - 'history_encrypted', - 'passcode_hash', - 'start_datetime', - 'end_datetime', - 'timezone', - 'seconds', - 'location', - 'latitude', - 'longitude', - 'billable', - 'bill_to', - 'bill_rate', - 'billable_minutes', - 'alert', - 'alert_msg', - 'parent_id', - 'related_entry_id_li', - 'data_json', - 'passcode_read', - 'passcode_read_expire', - 'passcode_write', - 'passcode_write_expire', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'id', + 'journal_entry_id', + 'journal_id', + 'code', + 'for_type', + 'for_id', + 'template', + 'activity_code', + 'category_code', + 'topic_code', + 'type_code', + 'tags', + 'journal_entry_type', + 'account_id', + 'person_id', + 'public', + 'private', + 'personal', + 'professional', + 'name', + 'short_name', + 'summary', + 'outline', + 'content', + 'content_md_html', + 'content_md_html_alt', + 'content_html', + 'content_json', + 'content_encrypted', + 'history', + 'history_encrypted', + 'passcode_hash', + 'start_datetime', + 'end_datetime', + 'timezone', + 'seconds', + 'location', + 'latitude', + 'longitude', + 'billable', + 'bill_to', + 'bill_rate', + 'billable_minutes', + 'alert', + 'alert_msg', + 'parent_id', + 'related_entry_id_li', + 'data_json', + 'passcode_read', + 'passcode_read_expire', + 'passcode_write', + 'passcode_write_expire', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - 'tmp_sort_1', - 'tmp_sort_2', - 'tmp_sort_3', + 'tmp_sort_1', + 'tmp_sort_2', + 'tmp_sort_3', - 'file_count', - 'journal_file_id_li_json', - 'journal_code', - 'journal_name', - 'person__given_name', - 'person__family_name', - 'person__full_name', - 'person__primary_email', - 'person__passcode', - 'person__kv_json', - 'journal_file_kv', - 'journal_file_li', + 'file_count', + 'journal_file_id_li_json', + 'journal_code', + 'journal_name', + 'person__given_name', + 'person__family_name', + 'person__full_name', + 'person__primary_email', + 'person__passcode', + 'person__kv_json', + 'journal_file_kv', + 'journal_file_li', - 'obj_id', - 'obj_ext_uid', - 'obj_ext_id', - 'obj_import_id', - 'obj_code', - 'obj_account_id', - 'obj_passcode', - 'obj_type', - 'obj_type_ver_id', - 'obj_name', - 'obj_summary', - 'obj_outline', - 'obj_description', - 'obj_enable', - 'obj_enable_on', - 'obj_archive_on', - 'obj_hide', - 'obj_priority', - 'obj_sort', - 'obj_group', - 'obj_cfg_json', - 'obj_notes', - 'obj_created_on', - 'obj_updated_on' + 'obj_id', + 'obj_ext_uid', + 'obj_ext_id', + 'obj_import_id', + 'obj_code', + 'obj_account_id', + 'obj_passcode', + 'obj_type', + 'obj_type_ver_id', + 'obj_name', + 'obj_summary', + 'obj_outline', + 'obj_description', + 'obj_enable', + 'obj_enable_on', + 'obj_archive_on', + 'obj_hide', + 'obj_priority', + 'obj_sort', + 'obj_group', + 'obj_cfg_json', + 'obj_notes', + 'obj_created_on', + 'obj_updated_on' ]; - // Updated 2024-06-10 export class MySubClassedDexie extends Dexie { - // We just tell the typing system this is the case - journal!: Table; - journal_entry!: Table; + // We just tell the typing system this is the case + journal!: Table; + journal_entry!: Table; - constructor() { - super('ae_journals_db'); - this.version(4).stores({ - journal: ` + constructor() { + super('ae_journals_db'); + this.version(4).stores({ + journal: ` id, journal_id, code, account_id, @@ -525,7 +523,7 @@ export class MySubClassedDexie extends Dexie { timezone, tmp_sort_1, tmp_sort_2, tmp_sort_3, enable, hide, priority, sort, group, created_on, updated_on`, - journal_entry: ` + journal_entry: ` id, journal_entry_id, journal_id, code, @@ -535,9 +533,9 @@ export class MySubClassedDexie extends Dexie { start_datetime, end_datetime, timezone, tmp_sort_1, tmp_sort_2, tmp_sort_3, - enable, hide, priority, sort, group, created_on, updated_on`, - }); - } + enable, hide, priority, sort, group, created_on, updated_on` + }); + } } export const db_journals = new MySubClassedDexie(); diff --git a/src/lib/ae_posts/ae_posts__post.ts b/src/lib/ae_posts/ae_posts__post.ts index eec44654..0b5df996 100644 --- a/src/lib/ae_posts/ae_posts__post.ts +++ b/src/lib/ae_posts/ae_posts__post.ts @@ -1,671 +1,662 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; -import { db_posts } from "$lib/ae_posts/db_posts"; +import { db_posts } from '$lib/ae_posts/db_posts'; -import { load_ae_obj_li__post_comment } from "$lib/ae_posts/ae_posts__post_comment"; - -let ae_promises: key_val = {}; +import { load_ae_obj_li__post_comment } from '$lib/ae_posts/ae_posts__post_comment'; +const ae_promises: key_val = {}; // Updated 2025-06-23 -export async function load_ae_obj_id__post( - { - api_cfg, - post_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - inc_comment_li = false, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - post_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - inc_comment_li?: boolean, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__post() *** post_id=${post_id}`); - } +export async function load_ae_obj_id__post({ + api_cfg, + post_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + inc_comment_li = false, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + post_id: string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + inc_comment_li?: boolean; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__post() *** post_id=${post_id}`); + } - ae_promises.load__post_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'post', - obj_id: post_id, - use_alt_table: true, - use_alt_base: false, - params: params, - log_lvl: log_lvl - }) - .then(async function (post_obj_get_result) { - if (post_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__post_props({ - obj_li: [post_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_posts, - table_name: 'post', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__post_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'post', + obj_id: post_id, + use_alt_table: true, + use_alt_base: false, + params: params, + log_lvl: log_lvl + }) + .then(async function (post_obj_get_result) { + if (post_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__post_props({ + obj_li: [post_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_posts, + table_name: 'post', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__post({ - // obj_type: 'post', - // obj_li: [post_obj_get_result], - // log_lvl: log_lvl - // }); - } - return post_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // // This is expecting a list + // db_save_ae_obj_li__post({ + // obj_type: 'post', + // obj_li: [post_obj_get_result], + // log_lvl: log_lvl + // }); + } + return post_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__post_obj:', ae_promises.load__post_obj); - } - if (!ae_promises.load__post_obj) { - console.log(`ERROR: Posts - Post - The post with ID ${post_id} was not found.`); - return ae_promises.load__post_obj; // Return null if the post was not found - } + if (log_lvl) { + console.log('ae_promises.load__post_obj:', ae_promises.load__post_obj); + } + if (!ae_promises.load__post_obj) { + console.log(`ERROR: Posts - Post - The post with ID ${post_id} was not found.`); + return ae_promises.load__post_obj; // Return null if the post was not found + } - if (inc_comment_li) { - // Load the comments for the post - if (log_lvl) { - console.log(`Need to load the comment list for the post now`); - } - let load_post_comment_obj_li = load_ae_obj_li__post_comment({ - api_cfg: api_cfg, - for_obj_type: 'post', - for_obj_id: post_id, - enabled: enabled, // all, disabled, enabled - hidden: hidden, // all, hidden, not_hidden - limit: limit, // Limit for the comments - offset: offset, - params: params, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((post_comment_obj_li) => { - if (log_lvl) { - console.log(`post_comment_obj_li = `, post_comment_obj_li); - } - return post_comment_obj_li; - }); + if (inc_comment_li) { + // Load the comments for the post + if (log_lvl) { + console.log(`Need to load the comment list for the post now`); + } + const load_post_comment_obj_li = load_ae_obj_li__post_comment({ + api_cfg: api_cfg, + for_obj_type: 'post', + for_obj_id: post_id, + enabled: enabled, // all, disabled, enabled + hidden: hidden, // all, hidden, not_hidden + limit: limit, // Limit for the comments + offset: offset, + params: params, + try_cache: try_cache, + log_lvl: log_lvl + }).then((post_comment_obj_li) => { + if (log_lvl) { + console.log(`post_comment_obj_li = `, post_comment_obj_li); + } + return post_comment_obj_li; + }); - if (log_lvl) { - console.log(`post_comment_obj_li = `, load_post_comment_obj_li); - } - ae_promises.load__post_obj.post_comment_li = load_post_comment_obj_li; - } + if (log_lvl) { + console.log(`post_comment_obj_li = `, load_post_comment_obj_li); + } + ae_promises.load__post_obj.post_comment_li = load_post_comment_obj_li; + } - return ae_promises.load__post_obj; + return ae_promises.load__post_obj; } - // Updated 2025-06-23 -export async function load_ae_obj_li__post( - { - api_cfg, - for_obj_type = 'account', - for_obj_id, - qry_archive_on = null, - inc_comment_li = false, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'}, - params = {}, - params_json = null, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - qry_archive_on?: boolean|null|string, - inc_comment_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params_json?: null|key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__post() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__post({ + api_cfg, + for_obj_type = 'account', + for_obj_id, + qry_archive_on = null, + inc_comment_li = false, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + updated_on: 'DESC', + created_on: 'DESC', + title: 'ASC' + }, + params = {}, + params_json = null, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + qry_archive_on?: boolean | null | string; + inc_comment_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params_json?: null | key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__post() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - // There is probably a better way to handle this. I don't want to just start a new object if it is not passed. However, the qry_conference and qry_str are sort of a special case. -2024-10-01 - if (!params_json) { - params_json = {}; - } + // There is probably a better way to handle this. I don't want to just start a new object if it is not passed. However, the qry_conference and qry_str are sort of a special case. -2024-10-01 + if (!params_json) { + params_json = {}; + } - params_json['qry'] = []; + params_json['qry'] = []; - if (qry_archive_on) { - // let qry_param = - // { - // type: "AND", - // field: "archive_on", - // operator: ">", - // value: qry_archive_on - // }; - // params_json['qry'].push(qry_param); - } + if (qry_archive_on) { + // let qry_param = + // { + // type: "AND", + // field: "archive_on", + // operator: ">", + // value: qry_archive_on + // }; + // params_json['qry'].push(qry_param); + } + // if (qry_archive_on) { + // if (!params_json['and_qry']) { + // params_json['and_qry'] = {}; + // } - // if (qry_archive_on) { - // if (!params_json['and_qry']) { - // params_json['and_qry'] = {}; - // } + // params_json['and_qry']['archive_on'] = qry_archive_on; + // } else if (qry_archive_on === false) { + // if (!params_json['and_qry']) { + // params_json['and_qry'] = {}; + // } - // params_json['and_qry']['archive_on'] = qry_archive_on; - // } else if (qry_archive_on === false) { - // if (!params_json['and_qry']) { - // params_json['and_qry'] = {}; - // } + // if (log_lvl) { + // console.log('qry_archive_on is false!'); + // } + // params_json['and_qry']['conference'] = qry_archive_on; + // } - // if (log_lvl) { - // console.log('qry_archive_on is false!'); - // } - // params_json['and_qry']['conference'] = qry_archive_on; - // } + if (log_lvl) { + console.log('params_json:', params_json); + } - if (log_lvl) { - console.log('params_json:', params_json); - } + ae_promises.load__post_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'post', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: false, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (post_obj_li_get_result) { + if (post_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__post_props({ + obj_li: post_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_posts, + table_name: 'post', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + // db_save_ae_obj_li__post({ + // obj_type: 'post', + // obj_li: post_obj_li_get_result, + // log_lvl: log_lvl + // }); + } + return post_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); + if (log_lvl) { + console.log('ae_promises.load__post_obj_li:', ae_promises.load__post_obj_li); + } - ae_promises.load__post_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'post', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: false, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (post_obj_li_get_result) { - if (post_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__post_props({ - obj_li: post_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_posts, - table_name: 'post', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + if (inc_comment_li) { + // Load the comments for the posts + if (log_lvl) { + console.log(`Need to load the comment list for each post now`); + } + for (let i = 0; i < ae_promises.load__post_obj_li.length; i++) { + const post_obj = ae_promises.load__post_obj_li[i]; + const post_id = post_obj.post_id_random; - // db_save_ae_obj_li__post({ - // obj_type: 'post', - // obj_li: post_obj_li_get_result, - // log_lvl: log_lvl - // }); - } - return post_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + const load_post_comment_obj_li = load_ae_obj_li__post_comment({ + api_cfg: api_cfg, + for_obj_type: 'post', + for_obj_id: post_id, + enabled: enabled, + hidden: hidden, + limit: limit, + offset: offset, + params: params, + try_cache: try_cache, + log_lvl: log_lvl + }).then((post_comment_obj_li) => { + if (log_lvl) { + console.log(`post_comment_obj_li = `, post_comment_obj_li); + } - if (log_lvl) { - console.log('ae_promises.load__post_obj_li:', ae_promises.load__post_obj_li); - } + return post_comment_obj_li; + }); - if (inc_comment_li) { - // Load the comments for the posts - if (log_lvl) { - console.log(`Need to load the comment list for each post now`); - } - for (let i = 0; i < ae_promises.load__post_obj_li.length; i++) { - let post_obj = ae_promises.load__post_obj_li[i]; - let post_id = post_obj.post_id_random; + if (log_lvl) { + console.log(`load_post_comment_obj_li = `, load_post_comment_obj_li); + } + } + } - let load_post_comment_obj_li = load_ae_obj_li__post_comment({ - api_cfg: api_cfg, - for_obj_type: 'post', - for_obj_id: post_id, - enabled: enabled, - hidden: hidden, - limit: limit, - offset: offset, - params: params, - try_cache: try_cache, - log_lvl: log_lvl - }) - .then((post_comment_obj_li) => { - if (log_lvl) { - console.log(`post_comment_obj_li = `, post_comment_obj_li); - } - - return post_comment_obj_li; - }); - - if (log_lvl) { - console.log(`load_post_comment_obj_li = `, load_post_comment_obj_li); - } - } - } - - return ae_promises.load__post_obj_li; + return ae_promises.load__post_obj_li; } - // Updated 2025-06-23 -export async function create_ae_obj__post( - { - api_cfg, - account_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - account_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__post() *** account_id=${account_id}`); - } +export async function create_ae_obj__post({ + api_cfg, + account_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__post() *** account_id=${account_id}`); + } - if (!account_id) { - console.log(`ERROR: Posts - Post - account_id required to create`); - return false; - } + if (!account_id) { + console.log(`ERROR: Posts - Post - account_id required to create`); + return false; + } - ae_promises.create__post = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'post', - fields: { - account_id_random: account_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (post_obj_create_result) { - if (post_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__post_props({ - obj_li: [post_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_posts, - table_name: 'post', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__post = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'post', + fields: { + account_id_random: account_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (post_obj_create_result) { + if (post_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__post_props({ + obj_li: [post_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_posts, + table_name: 'post', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__post( - // { - // obj_type: 'post', - // obj_li: [post_obj_create_result], - // log_lvl: log_lvl - // }); - } - return post_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__post( + // { + // obj_type: 'post', + // obj_li: [post_obj_create_result], + // log_lvl: log_lvl + // }); + } + return post_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__post:', ae_promises.create__post); - } - return ae_promises.create__post; + if (log_lvl) { + console.log('ae_promises.create__post:', ae_promises.create__post); + } + return ae_promises.create__post; } - // Updated 2024-11-08 -export async function delete_ae_obj_id__post( - { - api_cfg, - post_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - post_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__post() *** post_id=${post_id}`); - } +export async function delete_ae_obj_id__post({ + api_cfg, + post_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + post_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__post() *** post_id=${post_id}`); + } - ae_promises.delete__post_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'post', - obj_id: post_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for post_id=${post_id}`); - } - db_posts.post.delete(post_id); // Delete from the DB no matter what. - } - }); + ae_promises.delete__post_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'post', + obj_id: post_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for post_id=${post_id}`); + } + db_posts.post.delete(post_id); // Delete from the DB no matter what. + } + }); - if (log_lvl) { - console.log('ae_promises.delete__post_obj:', ae_promises.delete__post_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__post_obj:', ae_promises.delete__post_obj); + } - return ae_promises.delete__post_obj; + return ae_promises.delete__post_obj; } - // Updated 2025-06-23 -export async function update_ae_obj__post( - { - api_cfg, - post_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - post_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__post() *** post_id=${post_id}`, data_kv); - } +export async function update_ae_obj__post({ + api_cfg, + post_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + post_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** update_ae_obj__post() *** post_id=${post_id}`, data_kv); + } - // Perform the API update - const result = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'post', - obj_id: post_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl, - }); + // Perform the API update + const result = await api.update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'post', + obj_id: post_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }); - // Handle the result - if (result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__post_props({ - obj_li: [result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_posts, - table_name: 'post', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // Handle the result + if (result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__post_props({ + obj_li: [result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_posts, + table_name: 'post', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__post({ - // obj_type: 'post', - // obj_li: [result], - // log_lvl: log_lvl, - // }); - } - return result; - } else { - console.error('Failed to update post.'); - return null; - } + // await db_save_ae_obj_li__post({ + // obj_type: 'post', + // obj_li: [result], + // log_lvl: log_lvl, + // }); + } + return result; + } else { + console.error('Failed to update post.'); + return null; + } } - // This new function is using CRUD v2. This should allow for more flexibility in the queries. // Updated 2024-09-25 -export async function qry__post( - { - api_cfg, - account_id, - qry_str, - qry_files, - qry_start_datetime, // Example greater than: '2024-10-24' - enabled = 'enabled', - hidden = 'not_hidden', - limit = 50, - offset = 0, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - account_id: any, - qry_str?: string, - qry_files?: null|boolean, - qry_start_datetime?: null|string, // Greater than this datetime - enabled?: "enabled" | "all" | "not_enabled" | undefined, // all, disabled, enabled - hidden?: "hidden" | "all" | "not_hidden" | undefined, // all, hidden, not_hidden - limit?: number, - offset?: number, - params?: any, - try_cache?: boolean, - log_lvl?: number - } - ) { - console.log(`*** qry__post() *** account_id=${account_id} qry_str=${qry_str}`); +export async function qry__post({ + api_cfg, + account_id, + qry_str, + qry_files, + qry_start_datetime, // Example greater than: '2024-10-24' + enabled = 'enabled', + hidden = 'not_hidden', + limit = 50, + offset = 0, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + account_id: any; + qry_str?: string; + qry_files?: null | boolean; + qry_start_datetime?: null | string; // Greater than this datetime + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; // all, disabled, enabled + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; // all, hidden, not_hidden + limit?: number; + offset?: number; + params?: any; + try_cache?: boolean; + log_lvl?: number; +}) { + console.log(`*** qry__post() *** account_id=${account_id} qry_str=${qry_str}`); - // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - // let limit: number = (params.qry__limit ?? 25); // 99 - // let offset: number = (params.qry__offset ?? 0); // 0 + // let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled + // let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden + // let limit: number = (params.qry__limit ?? 25); // 99 + // let offset: number = (params.qry__offset ?? 0); // 0 - let params_json: key_val = {}; + const params_json: key_val = {}; - // if (qry_str && qry_str.length > 2) { - // params_json['ft_qry'] = {}; - // params_json['ft_qry']['default_qry_str'] = qry_str; - // } + // if (qry_str && qry_str.length > 2) { + // params_json['ft_qry'] = {}; + // params_json['ft_qry']['default_qry_str'] = qry_str; + // } - params_json['qry'] = []; + params_json['qry'] = []; - if (qry_files === true) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: ">", - value: 0 - }; - params_json['qry'].push(qry_param); - } else if (qry_files === false) { - let qry_param = - { - type: "AND", - field: "file_count_all", - operator: "IS", - value: null - }; - params_json['qry'].push(qry_param); - } + if (qry_files === true) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: '>', + value: 0 + }; + params_json['qry'].push(qry_param); + } else if (qry_files === false) { + const qry_param = { + type: 'AND', + field: 'file_count_all', + operator: 'IS', + value: null + }; + params_json['qry'].push(qry_param); + } - if (qry_start_datetime) { - let qry_param = - { - type: "AND", - field: "start_datetime", - operator: ">", - value: qry_start_datetime - }; - params_json['qry'].push(qry_param); - } + if (qry_start_datetime) { + const qry_param = { + type: 'AND', + field: 'start_datetime', + operator: '>', + value: qry_start_datetime + }; + params_json['qry'].push(qry_param); + } - let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'}; + const order_by_li = { + priority: 'DESC', + sort: 'DESC', + updated_on: 'DESC', + created_on: 'DESC', + title: 'ASC' + }; - ae_promises.load__post_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'post', - for_obj_type: 'account', - for_obj_id: account_id, - use_alt_tbl: true, // NOTE: We want to use the alt table for post searching - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (post_obj_li_get_result) { - if (post_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__post_props({ - obj_li: post_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_posts, - table_name: 'post', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return post_obj_li_get_result; - } else { - return []; - } - }); + ae_promises.load__post_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'post', + for_obj_type: 'account', + for_obj_id: account_id, + use_alt_tbl: true, // NOTE: We want to use the alt table for post searching + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (post_obj_li_get_result) { + if (post_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__post_props({ + obj_li: post_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_posts, + table_name: 'post', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return post_obj_li_get_result; + } else { + return []; + } + }); - if (log_lvl) { - console.log('ae_promises.load__post_obj_li:', ae_promises.load__post_obj_li); - } - return ae_promises.load__post_obj_li; + if (log_lvl) { + console.log('ae_promises.load__post_obj_li:', ae_promises.load__post_obj_li); + } + return ae_promises.load__post_obj_li; } - // Updated 2024-09-25 // export async function search__post( // { @@ -802,66 +793,61 @@ export async function qry__post( // return ae_promises.load__post_obj_li; // } - - - - // Updated 2025-06-04 export const properties_to_save = [ - 'id', - 'post_id', - // 'post_id_random', + 'id', + 'post_id', + // 'post_id_random', - 'account_id', - // 'account_id_random', + 'account_id', + // 'account_id_random', - 'external_person_id', + 'external_person_id', - 'topic_id', - 'topic', - 'topic_name', + 'topic_id', + 'topic', + 'topic_name', - 'name', - 'title', - 'content', + 'name', + 'title', + 'content', - 'anonymous', - 'full_name', - 'email', - 'notify', + 'anonymous', + 'full_name', + 'email', + 'notify', - 'enable_comments', + 'enable_comments', - 'archive', - 'archive_on', + 'archive', + 'archive_on', - 'linked_li_json', - 'cfg_json', + 'linked_li_json', + 'cfg_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2', + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view - 'post_comment_count', + // From SQL view + 'post_comment_count' - // A key value list of the comments - // 'post_comment_kv', - // 'post_comment_li', + // A key value list of the comments + // 'post_comment_kv', + // 'post_comment_li', ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -930,7 +916,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-06-04 export async function process_ae_obj__post_props({ obj_li, @@ -956,4 +941,4 @@ export async function process_ae_obj__post_props({ return obj; } }); -} \ No newline at end of file +} diff --git a/src/lib/ae_posts/ae_posts__post_comment.ts b/src/lib/ae_posts/ae_posts__post_comment.ts index 5fa44c45..77c661c9 100644 --- a/src/lib/ae_posts/ae_posts__post_comment.ts +++ b/src/lib/ae_posts/ae_posts__post_comment.ts @@ -1,462 +1,456 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_save_ae_obj_li__ae_obj } from "$lib/ae_core/core__idb_dexie"; +import { db_save_ae_obj_li__ae_obj } from '$lib/ae_core/core__idb_dexie'; -import { db_posts } from "$lib/ae_posts/db_posts"; - -let ae_promises: key_val = {}; +import { db_posts } from '$lib/ae_posts/db_posts'; +const ae_promises: key_val = {}; // Updated 2025-06-23 -export async function load_ae_obj_id__post_comment( - { - api_cfg, - post_comment_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - post_comment_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__post_comment() *** post_comment_id=${post_comment_id}`); - } +export async function load_ae_obj_id__post_comment({ + api_cfg, + post_comment_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + post_comment_id: string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__post_comment() *** post_comment_id=${post_comment_id}`); + } - ae_promises.load__post_comment_obj = await api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'post_comment', - obj_id: post_comment_id, - use_alt_table: false, - use_alt_base: false, - params: params, - log_lvl: log_lvl - }) - .then(async function (post_comment_obj_get_result) { - if (post_comment_obj_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__post_comment_props({ - obj_li: [post_comment_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_posts, - table_name: 'comment', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__post_comment_obj = await api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'post_comment', + obj_id: post_comment_id, + use_alt_table: false, + use_alt_base: false, + params: params, + log_lvl: log_lvl + }) + .then(async function (post_comment_obj_get_result) { + if (post_comment_obj_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__post_comment_props({ + obj_li: [post_comment_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_posts, + table_name: 'comment', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // // This is expecting a list - // db_save_ae_obj_li__post_comment({ - // obj_type: 'post_comment', - // obj_li: [post_comment_obj_get_result], - // log_lvl: log_lvl + // // This is expecting a list + // db_save_ae_obj_li__post_comment({ + // obj_type: 'post_comment', + // obj_li: [post_comment_obj_get_result], + // log_lvl: log_lvl - // }); - } - return post_comment_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // }); + } + return post_comment_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - return ae_promises.load__post_comment_obj; + return ae_promises.load__post_comment_obj; } - // Updated 2025-06-23 -export async function load_ae_obj_li__post_comment( - { - api_cfg, - for_obj_type = 'post', - for_obj_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__post_comment() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +export async function load_ae_obj_li__post_comment({ + api_cfg, + for_obj_type = 'post', + for_obj_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + updated_on: 'DESC', + created_on: 'DESC', + title: 'ASC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__post_comment() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - if (log_lvl) { - console.log('params_json:', params_json); - } + if (log_lvl) { + console.log('params_json:', params_json); + } - ae_promises.load__post_comment_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'post_comment', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: false, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (post_comment_obj_li_get_result) { - if (post_comment_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__post_comment_props({ - obj_li: post_comment_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_posts, - table_name: 'comment', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.load__post_comment_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'post_comment', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: false, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (post_comment_obj_li_get_result) { + if (post_comment_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__post_comment_props({ + obj_li: post_comment_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_posts, + table_name: 'comment', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__post_comment({ - // obj_type: 'post_comment', - // obj_li: post_comment_obj_li_get_result, - // log_lvl: log_lvl - // }); - } - return post_comment_obj_li_get_result; - } else { - return []; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + // db_save_ae_obj_li__post_comment({ + // obj_type: 'post_comment', + // obj_li: post_comment_obj_li_get_result, + // log_lvl: log_lvl + // }); + } + return post_comment_obj_li_get_result; + } else { + return []; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__post_comment_obj_li:', ae_promises.load__post_comment_obj_li); - } + if (log_lvl) { + console.log('ae_promises.load__post_comment_obj_li:', ae_promises.load__post_comment_obj_li); + } - return ae_promises.load__post_comment_obj_li; + return ae_promises.load__post_comment_obj_li; } - // Updated 2025-06-23 -export async function create_ae_obj__post_comment( - { - api_cfg, - post_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - post_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj__post_comment() *** post_id=${post_id}`); - } +export async function create_ae_obj__post_comment({ + api_cfg, + post_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + post_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj__post_comment() *** post_id=${post_id}`); + } - if (!post_id) { - console.log(`ERROR: Posts - Comment - post_id required to create`); - return false; - } + if (!post_id) { + console.log(`ERROR: Posts - Comment - post_id required to create`); + return false; + } - ae_promises.create__post_comment = await api.create_ae_obj_crud({ - api_cfg: api_cfg, - obj_type: 'post_comment', - fields: { - post_id_random: post_id, - ...data_kv - }, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl - }) - .then(async function (post_comment_obj_create_result) { - if (post_comment_obj_create_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__post_comment_props({ - obj_li: [post_comment_obj_create_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_posts, - table_name: 'comment', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + ae_promises.create__post_comment = await api + .create_ae_obj_crud({ + api_cfg: api_cfg, + obj_type: 'post_comment', + fields: { + post_id_random: post_id, + ...data_kv + }, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }) + .then(async function (post_comment_obj_create_result) { + if (post_comment_obj_create_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__post_comment_props({ + obj_li: [post_comment_obj_create_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_posts, + table_name: 'comment', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // db_save_ae_obj_li__post_comment( - // { - // obj_type: 'post_comment', - // obj_li: [post_comment_obj_create_result], - // log_lvl: log_lvl - // }); - } - return post_comment_obj_create_result; - } else { - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - }); + // db_save_ae_obj_li__post_comment( + // { + // obj_type: 'post_comment', + // obj_li: [post_comment_obj_create_result], + // log_lvl: log_lvl + // }); + } + return post_comment_obj_create_result; + } else { + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () {}); - if (log_lvl) { - console.log('ae_promises.create__post_comment:', ae_promises.create__post_comment); - } - return ae_promises.create__post_comment; + if (log_lvl) { + console.log('ae_promises.create__post_comment:', ae_promises.create__post_comment); + } + return ae_promises.create__post_comment; } - // Updated 2024-11-08 -export async function delete_ae_obj_id__post_comment( - { - api_cfg, - post_comment_id, - method = 'delete', // 'delete', 'disable', 'hide' - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - post_comment_id: string, - method?: string, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id__post_comment() *** post_comment_id=${post_comment_id}`); - } +export async function delete_ae_obj_id__post_comment({ + api_cfg, + post_comment_id, + method = 'delete', // 'delete', 'disable', 'hide' + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + post_comment_id: string; + method?: string; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id__post_comment() *** post_comment_id=${post_comment_id}`); + } - ae_promises.delete__post_comment_obj = await api.delete_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'post_comment', - obj_id: post_comment_id, - key: api_cfg.api_crud_super_key, - params: params, - method: method, - log_lvl: log_lvl - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }) - .finally(function () { - if (try_cache) { - if (log_lvl) { - console.log(`Attempting to remove IDB entry for post_comment_id=${post_comment_id}`); - } - db_posts.comment.delete(post_comment_id); // Delete from the DB no matter what. - } - }); + ae_promises.delete__post_comment_obj = await api + .delete_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'post_comment', + obj_id: post_comment_id, + key: api_cfg.api_crud_super_key, + params: params, + method: method, + log_lvl: log_lvl + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }) + .finally(function () { + if (try_cache) { + if (log_lvl) { + console.log(`Attempting to remove IDB entry for post_comment_id=${post_comment_id}`); + } + db_posts.comment.delete(post_comment_id); // Delete from the DB no matter what. + } + }); - if (log_lvl) { - console.log('ae_promises.delete__post_comment_obj:', ae_promises.delete__post_comment_obj); - } + if (log_lvl) { + console.log('ae_promises.delete__post_comment_obj:', ae_promises.delete__post_comment_obj); + } - return ae_promises.delete__post_comment_obj; + return ae_promises.delete__post_comment_obj; } - // Updated 2025-06-23 -export async function update_ae_obj__post_comment( - { - api_cfg, - post_comment_id, - data_kv, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - post_comment_id: string, - data_kv: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** update_ae_obj__post_comment() *** post_comment_id=${post_comment_id}`, data_kv); - } +export async function update_ae_obj__post_comment({ + api_cfg, + post_comment_id, + data_kv, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + post_comment_id: string; + data_kv: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** update_ae_obj__post_comment() *** post_comment_id=${post_comment_id}`, + data_kv + ); + } - // Perform the API update - const result = await api.update_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'post_comment', - obj_id: post_comment_id, - fields: data_kv, - key: api_cfg.api_crud_super_key, - params: params, - return_obj: true, - log_lvl: log_lvl, - }); + // Perform the API update + const result = await api.update_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'post_comment', + obj_id: post_comment_id, + fields: data_kv, + key: api_cfg.api_crud_super_key, + params: params, + return_obj: true, + log_lvl: log_lvl + }); - // Handle the result - if (result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__post_comment_props({ - obj_li: [result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_posts, - table_name: 'comment', - obj_li: processed_obj_li, - properties_to_save: properties_to_save, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } + // Handle the result + if (result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__post_comment_props({ + obj_li: [result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_posts, + table_name: 'comment', + obj_li: processed_obj_li, + properties_to_save: properties_to_save, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } - // await db_save_ae_obj_li__post_comment({ - // obj_type: 'post_comment', - // obj_li: [result], - // log_lvl: log_lvl, - // }); - } - return result; - } else { - console.error('Failed to update post comment.'); - return null; - } + // await db_save_ae_obj_li__post_comment({ + // obj_type: 'post_comment', + // obj_li: [result], + // log_lvl: log_lvl, + // }); + } + return result; + } else { + console.error('Failed to update post comment.'); + return null; + } } - - - - // Updated 2025-06-04 export const properties_to_save = [ - 'id', - 'post_comment_id', - // 'post_comment_id_random', + 'id', + 'post_comment_id', + // 'post_comment_id_random', - 'post_id', - // 'post_id_random', + 'post_id', + // 'post_id_random', - 'external_person_id', + 'external_person_id', - 'name', - 'title', - 'content', + 'name', + 'title', + 'content', - 'anonymous', - 'full_name', - 'email', - 'notify', + 'anonymous', + 'full_name', + 'email', + 'notify', - 'linked_li_json', - 'cfg_json', + 'linked_li_json', + 'cfg_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', - // 'tmp_sort_a', - // 'tmp_sort_b', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2' + // 'tmp_sort_a', + // 'tmp_sort_b', - // From SQL view + // From SQL view ]; - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -525,7 +519,6 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2025-06-04 export async function process_ae_obj__post_comment_props({ obj_li, @@ -550,4 +543,4 @@ export async function process_ae_obj__post_comment_props({ return obj; } }); -} \ No newline at end of file +} diff --git a/src/lib/ae_posts/ae_posts_functions.ts b/src/lib/ae_posts/ae_posts_functions.ts index 29aa0331..a0514539 100644 --- a/src/lib/ae_posts/ae_posts_functions.ts +++ b/src/lib/ae_posts/ae_posts_functions.ts @@ -1,38 +1,32 @@ // This file is used to export all the functions that are used for Aether Posts related functions. import { - load_ae_obj_id__post, - load_ae_obj_li__post, - create_ae_obj__post, - delete_ae_obj_id__post, - update_ae_obj__post, - -} from "$lib/ae_posts/ae_posts__post"; - + load_ae_obj_id__post, + load_ae_obj_li__post, + create_ae_obj__post, + delete_ae_obj_id__post, + update_ae_obj__post +} from '$lib/ae_posts/ae_posts__post'; import { - load_ae_obj_id__post_comment, - load_ae_obj_li__post_comment, - create_ae_obj__post_comment, - delete_ae_obj_id__post_comment, - update_ae_obj__post_comment, + load_ae_obj_id__post_comment, + load_ae_obj_li__post_comment, + create_ae_obj__post_comment, + delete_ae_obj_id__post_comment, + update_ae_obj__post_comment +} from '$lib/ae_posts/ae_posts__post_comment'; -} from "$lib/ae_posts/ae_posts__post_comment"; - - -let export_obj = { - load_ae_obj_id__post: load_ae_obj_id__post, - load_ae_obj_li__post: load_ae_obj_li__post, - create_ae_obj__post: create_ae_obj__post, - delete_ae_obj_id__post: delete_ae_obj_id__post, - update_ae_obj__post: update_ae_obj__post, - - - load_ae_obj_id__post_comment: load_ae_obj_id__post_comment, - load_ae_obj_li__post_comment: load_ae_obj_li__post_comment, - create_ae_obj__post_comment: create_ae_obj__post_comment, - delete_ae_obj_id__post_comment: delete_ae_obj_id__post_comment, - update_ae_obj__post_comment: update_ae_obj__post_comment, +const export_obj = { + load_ae_obj_id__post: load_ae_obj_id__post, + load_ae_obj_li__post: load_ae_obj_li__post, + create_ae_obj__post: create_ae_obj__post, + delete_ae_obj_id__post: delete_ae_obj_id__post, + update_ae_obj__post: update_ae_obj__post, + load_ae_obj_id__post_comment: load_ae_obj_id__post_comment, + load_ae_obj_li__post_comment: load_ae_obj_li__post_comment, + create_ae_obj__post_comment: create_ae_obj__post_comment, + delete_ae_obj_id__post_comment: delete_ae_obj_id__post_comment, + update_ae_obj__post_comment: update_ae_obj__post_comment }; -export let posts_func = export_obj; \ No newline at end of file +export const posts_func = export_obj; diff --git a/src/lib/ae_posts/db_posts.ts b/src/lib/ae_posts/db_posts.ts index dbe91f36..3de1bf66 100644 --- a/src/lib/ae_posts/db_posts.ts +++ b/src/lib/ae_posts/db_posts.ts @@ -7,115 +7,113 @@ import type { key_val } from '$lib/stores/ae_stores'; // Updated 2024-11-13 export interface Post { - id: string; - // id_random: string; - post_id: string; - // post_id_random: string; + id: string; + // id_random: string; + post_id: string; + // post_id_random: string; - account_id: string; - // account_id_random: string; + account_id: string; + // account_id_random: string; - person_id?: null|string; - external_person_id?: null|string; // For IDAA this is the Novi UUID - user_id?: null|string; + person_id?: null | string; + external_person_id?: null | string; // For IDAA this is the Novi UUID + user_id?: null | string; - topic_id?: string; - topic?: string; // or topic_name? - topic_name?: string; + topic_id?: string; + topic?: string; // or topic_name? + topic_name?: string; - name: null|string; - title: null|string; - // summary?: null|string; - content?: null|string; + name: null | string; + title: null | string; + // summary?: null|string; + content?: null | string; - anonymous?: null|boolean; - full_name?: null|string; - email?: null|string; - notify?: null|boolean; + anonymous?: null | boolean; + full_name?: null | string; + email?: null | string; + notify?: null | boolean; - enable_comments?: null|boolean; + enable_comments?: null | boolean; - archive?: null|boolean; - archive_on?: null|Date; + archive?: null | boolean; + archive_on?: null | Date; - linked_li_json?: null|string; - cfg_json?: null|key_val; + linked_li_json?: null | string; + cfg_json?: null | key_val; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) - post_comment_count?: number; + // Additional fields for convenience (database views) + post_comment_count?: number; - // Placeholder for generated temp data - hosted_file_id_li?: null|Array; - hosted_file_obj_li?: null|Array; - upload_complete?: boolean; + // Placeholder for generated temp data + hosted_file_id_li?: null | Array; + hosted_file_obj_li?: null | Array; + upload_complete?: boolean; } - // Updated 2024-11-13 export interface Post_Comment { - id: string; - // id_random: string; - post_comment_id: string; - // post_comment_id_random: string; + id: string; + // id_random: string; + post_comment_id: string; + // post_comment_id_random: string; - post_id: string; - // post_id_random: string; + post_id: string; + // post_id_random: string; - external_person_id?: null|string; // For IDAA this is the Novi UUID + external_person_id?: null | string; // For IDAA this is the Novi UUID - name: null|string; - title: null|string; - // summary?: null|string; - content?: null|string; + name: null | string; + title: null | string; + // summary?: null|string; + content?: null | string; - anonymous?: null|boolean; - full_name?: null|string; - email?: null|string; - notify?: null|boolean; + anonymous?: null | boolean; + full_name?: null | string; + email?: null | string; + notify?: null | boolean; - linked_li_json?: null|string; - cfg_json?: null|key_val; + linked_li_json?: null | string; + cfg_json?: null | key_val; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) + // Additional fields for convenience (database views) } - // Updated 2024-09-25 export class MySubClassedDexie extends Dexie { - // We just tell the typing system this is the case - post!: Table; - comment!: Table; + // We just tell the typing system this is the case + post!: Table; + comment!: Table; - constructor() { - super('ae_posts_db'); - this.version(1).stores({ - post: ` + constructor() { + super('ae_posts_db'); + this.version(1).stores({ + post: ` id, post_id, account_id, topic_id, topic, @@ -126,16 +124,16 @@ export class MySubClassedDexie extends Dexie { tmp_sort_1, tmp_sort_2, enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on], [created_on+updated_on]`, - comment: ` + comment: ` id, post_comment_id, post_id, name, title, full_name, email, tmp_sort_1, tmp_sort_2, - enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on]`, - }); - } + enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on]` + }); + } } export const db_posts = new MySubClassedDexie(); diff --git a/src/lib/ae_sponsorships/ae_sponsorships_functions.ts b/src/lib/ae_sponsorships/ae_sponsorships_functions.ts index 9b9b1caf..6a8b0e48 100644 --- a/src/lib/ae_sponsorships/ae_sponsorships_functions.ts +++ b/src/lib/ae_sponsorships/ae_sponsorships_functions.ts @@ -1,36 +1,35 @@ import type { key_val } from '$lib/stores/ae_stores'; import { api } from '$lib/api/api'; -import { db_sponsorships } from "$lib/ae_sponsorships/db_sponsorships"; +import { db_sponsorships } from '$lib/ae_sponsorships/db_sponsorships'; // import { liveQuery } from "dexie"; // import { db_core } from "$lib/db_core"; // --- PROPERTIES TO SAVE --- export const properties_to_save_sponsorship_cfg = [ - 'id', - 'sponsorship_cfg_id', - 'account_id', - 'for_type', - 'for_id', - 'level_li_json', - 'option_li_json', - 'schedule_li_json', - 'cfg_json', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', + 'id', + 'sponsorship_cfg_id', + 'account_id', + 'for_type', + 'for_id', + 'level_li_json', + 'option_li_json', + 'schedule_li_json', + 'cfg_json', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2' ]; - // --- PROCESS FUNCTION --- export async function process_ae_obj__sponsorship_cfg_props({ obj_li, @@ -57,48 +56,46 @@ export async function process_ae_obj__sponsorship_cfg_props({ }); } - // --- PROPERTIES TO SAVE --- export const properties_to_save_sponsorship = [ - 'id', - 'sponsorship_id', - 'account_id', - 'organization_id', - 'person_id', - 'poc_person_id', - 'poc_json', - 'name', - 'name_override', - 'description', - 'email', - 'website_url', - 'logo_li_json', - 'media_li_json', - 'social_li_json', - 'address_li_json', - 'contact_li_json', - 'guest_li_json', - 'level_num', - 'level_str', - 'amount', - 'questions_li_json', - 'agree', - 'comments', - 'staff_notes', - 'enable', - 'hide', - 'priority', - 'sort', - 'group', - 'notes', - 'created_on', - 'updated_on', - // Generated fields for sorting locally only - 'tmp_sort_1', - 'tmp_sort_2', + 'id', + 'sponsorship_id', + 'account_id', + 'organization_id', + 'person_id', + 'poc_person_id', + 'poc_json', + 'name', + 'name_override', + 'description', + 'email', + 'website_url', + 'logo_li_json', + 'media_li_json', + 'social_li_json', + 'address_li_json', + 'contact_li_json', + 'guest_li_json', + 'level_num', + 'level_str', + 'amount', + 'questions_li_json', + 'agree', + 'comments', + 'staff_notes', + 'enable', + 'hide', + 'priority', + 'sort', + 'group', + 'notes', + 'created_on', + 'updated_on', + // Generated fields for sorting locally only + 'tmp_sort_1', + 'tmp_sort_2' ]; - // --- PROCESS FUNCTION --- export async function process_ae_obj__sponsorship_props({ obj_li, @@ -125,7 +122,6 @@ export async function process_ae_obj__sponsorship_props({ }); } - /** * NON-EXPORTED LOCAL HELPER * Processes a list of Aether objects by applying common and specific transformations. @@ -194,310 +190,315 @@ async function _process_generic_props>({ return processed_obj_li; } - // Updated 2024-03-29 -async function load_ae_obj_id__sponsorship_cfg( - { - api_cfg, - sponsorship_cfg_id, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - sponsorship_cfg_id: string, - try_cache: boolean, - log_lvl: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__sponsorship_cfg() *** sponsorship_cfg_id=${sponsorship_cfg_id}`); - } +async function load_ae_obj_id__sponsorship_cfg({ + api_cfg, + sponsorship_cfg_id, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + sponsorship_cfg_id: string; + try_cache: boolean; + log_lvl: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_id__sponsorship_cfg() *** sponsorship_cfg_id=${sponsorship_cfg_id}` + ); + } - let params = {}; + const params = {}; - ae_promises.load__sponsorship_cfg_obj = api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'sponsorship_cfg', - obj_id: sponsorship_cfg_id, - use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - params: params, - log_lvl: log_lvl - }) - .then(async function (sponsorship_cfg_obj_get_result) { - if (sponsorship_cfg_obj_get_result) { - if (log_lvl) { - console.log(`*spons_func* Got a result for sponsorship_cfg_id ${sponsorship_cfg_id}`); - } else if (log_lvl > 1) { - console.log(`*spons_func* Got a result for sponsorship_cfg_id ${sponsorship_cfg_id}:`, sponsorship_cfg_obj_get_result); - } - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__sponsorship_cfg_props({ - obj_li: [sponsorship_cfg_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_sponsorships, - table_name: 'cfg', - obj_li: processed_obj_li, - properties_to_save: properties_to_save_sponsorship_cfg, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return sponsorship_cfg_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__sponsorship_cfg_obj = api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'sponsorship_cfg', + obj_id: sponsorship_cfg_id, + use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + params: params, + log_lvl: log_lvl + }) + .then(async function (sponsorship_cfg_obj_get_result) { + if (sponsorship_cfg_obj_get_result) { + if (log_lvl) { + console.log(`*spons_func* Got a result for sponsorship_cfg_id ${sponsorship_cfg_id}`); + } else if (log_lvl > 1) { + console.log( + `*spons_func* Got a result for sponsorship_cfg_id ${sponsorship_cfg_id}:`, + sponsorship_cfg_obj_get_result + ); + } + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__sponsorship_cfg_props({ + obj_li: [sponsorship_cfg_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_sponsorships, + table_name: 'cfg', + obj_li: processed_obj_li, + properties_to_save: properties_to_save_sponsorship_cfg, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return sponsorship_cfg_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__sponsorship_cfg_obj:', ae_promises.load__sponsorship_cfg_obj); - } + if (log_lvl) { + console.log('ae_promises.load__sponsorship_cfg_obj:', ae_promises.load__sponsorship_cfg_obj); + } - return ae_promises.load__sponsorship_cfg_obj; + return ae_promises.load__sponsorship_cfg_obj; } - // Updated 2024-03-29 -async function load_ae_obj_id__sponsorship( - { - api_cfg, - sponsorship_id, - try_cache = false, - log_lvl = 0 - }: { - api_cfg: any, - sponsorship_id: string, - try_cache: boolean, - log_lvl: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_id__sponsorship() *** sponsorship_id=${sponsorship_id}`); - } +async function load_ae_obj_id__sponsorship({ + api_cfg, + sponsorship_id, + try_cache = false, + log_lvl = 0 +}: { + api_cfg: any; + sponsorship_id: string; + try_cache: boolean; + log_lvl: number; +}) { + if (log_lvl) { + console.log(`*** load_ae_obj_id__sponsorship() *** sponsorship_id=${sponsorship_id}`); + } - let params = {}; + const params = {}; - ae_promises.load__sponsorship_obj = api.get_ae_obj_id_crud({ - api_cfg: api_cfg, - obj_type: 'sponsorship', - obj_id: sponsorship_id, - use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. - use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. - params: params, - log_lvl: log_lvl - }) - .then(async function (sponsorship_obj_get_result) { - if (sponsorship_obj_get_result) { - if (log_lvl) { - console.log(`*spons_func* Got a result for sponsorship_id ${sponsorship_id}`); - } else if (log_lvl > 1) { - console.log(`*spons_func* Got a result for sponsorship_id ${sponsorship_id}:`, sponsorship_obj_get_result); - } - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__sponsorship_props({ - obj_li: [sponsorship_obj_get_result], - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_sponsorships, - table_name: 'sponsorship', - obj_li: processed_obj_li, - properties_to_save: properties_to_save_sponsorship, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return sponsorship_obj_get_result; - } else { - console.log('No results returned.'); - return null; - } - }) - .catch(function (error: any) { - console.log('No results returned or failed.', error); - }); + ae_promises.load__sponsorship_obj = api + .get_ae_obj_id_crud({ + api_cfg: api_cfg, + obj_type: 'sponsorship', + obj_id: sponsorship_id, + use_alt_table: false, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. + use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value in the API config. + params: params, + log_lvl: log_lvl + }) + .then(async function (sponsorship_obj_get_result) { + if (sponsorship_obj_get_result) { + if (log_lvl) { + console.log(`*spons_func* Got a result for sponsorship_id ${sponsorship_id}`); + } else if (log_lvl > 1) { + console.log( + `*spons_func* Got a result for sponsorship_id ${sponsorship_id}:`, + sponsorship_obj_get_result + ); + } + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__sponsorship_props({ + obj_li: [sponsorship_obj_get_result], + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_sponsorships, + table_name: 'sponsorship', + obj_li: processed_obj_li, + properties_to_save: properties_to_save_sponsorship, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return sponsorship_obj_get_result; + } else { + console.log('No results returned.'); + return null; + } + }) + .catch(function (error: any) { + console.log('No results returned or failed.', error); + }); - if (log_lvl) { - console.log('ae_promises.load__sponsorship_obj:', ae_promises.load__sponsorship_obj); - } + if (log_lvl) { + console.log('ae_promises.load__sponsorship_obj:', ae_promises.load__sponsorship_obj); + } - return ae_promises.load__sponsorship_obj; + return ae_promises.load__sponsorship_obj; } // Updated 2025-01-15 -async function load_ae_obj_li__sponsorship( - { - api_cfg, - for_obj_type = 'account', - for_obj_id, - enabled = 'enabled', - hidden = 'not_hidden', - limit = 99, - offset = 0, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - params = {}, - try_cache = true, - log_lvl = 0 - }: { - api_cfg: any, - for_obj_type: string, - for_obj_id: string, - inc_content_li?: boolean, - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - limit?: number, - offset?: number, - order_by_li?: key_val, - params?: key_val, - try_cache?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** load_ae_obj_li__sponsorship() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}`); - } +async function load_ae_obj_li__sponsorship({ + api_cfg, + for_obj_type = 'account', + for_obj_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + order_by_li = { + priority: 'DESC', + sort: 'DESC', + name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + }, + params = {}, + try_cache = true, + log_lvl = 0 +}: { + api_cfg: any; + for_obj_type: string; + for_obj_id: string; + inc_content_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + limit?: number; + offset?: number; + order_by_li?: key_val; + params?: key_val; + try_cache?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log( + `*** load_ae_obj_li__sponsorship() *** for_obj_type=${for_obj_type} for_obj_id=${for_obj_id}` + ); + } - let params_json: key_val = {}; + const params_json: key_val = {}; - ae_promises.load__sponsorship_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ - api_cfg: api_cfg, - obj_type: 'sponsorship', - for_obj_type: for_obj_type, - for_obj_id: for_obj_id, - use_alt_tbl: false, - use_alt_mdl: false, - use_alt_exp: false, - enabled: enabled, - hidden: hidden, - order_by_li: order_by_li, - limit: limit, - offset: offset, - params_json: params_json, - params: params, - log_lvl: log_lvl - }) - .then(async function (sponsorship_obj_li_get_result) { - if (sponsorship_obj_li_get_result) { - if (try_cache) { - // Process the results first - let processed_obj_li = await process_ae_obj__sponsorship_props({ - obj_li: sponsorship_obj_li_get_result, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('Processed object list:', processed_obj_li); - } - // Save the updated results list to the database - if (log_lvl) { - console.log('Saving to DB...'); - } - await db_save_ae_obj_li__ae_obj({ - db_instance: db_sponsorships, - table_name: 'sponsorship', - obj_li: processed_obj_li, - properties_to_save: properties_to_save_sponsorship, - log_lvl: log_lvl, - }); - if (log_lvl) { - console.log('DB save completed.'); - } - } - return sponsorship_obj_li_get_result; - } else { - return []; - } - }); + ae_promises.load__sponsorship_obj_li = await api + .get_ae_obj_li_for_obj_id_crud_v2({ + api_cfg: api_cfg, + obj_type: 'sponsorship', + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, + use_alt_tbl: false, + use_alt_mdl: false, + use_alt_exp: false, + enabled: enabled, + hidden: hidden, + order_by_li: order_by_li, + limit: limit, + offset: offset, + params_json: params_json, + params: params, + log_lvl: log_lvl + }) + .then(async function (sponsorship_obj_li_get_result) { + if (sponsorship_obj_li_get_result) { + if (try_cache) { + // Process the results first + const processed_obj_li = await process_ae_obj__sponsorship_props({ + obj_li: sponsorship_obj_li_get_result, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('Processed object list:', processed_obj_li); + } + // Save the updated results list to the database + if (log_lvl) { + console.log('Saving to DB...'); + } + await db_save_ae_obj_li__ae_obj({ + db_instance: db_sponsorships, + table_name: 'sponsorship', + obj_li: processed_obj_li, + properties_to_save: properties_to_save_sponsorship, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log('DB save completed.'); + } + } + return sponsorship_obj_li_get_result; + } else { + return []; + } + }); - if (log_lvl) { - console.log('ae_promises.load__sponsorship_obj_li:', ae_promises.load__sponsorship_obj_li); - } + if (log_lvl) { + console.log('ae_promises.load__sponsorship_obj_li:', ae_promises.load__sponsorship_obj_li); + } - return ae_promises.load__sponsorship_obj_li; + return ae_promises.load__sponsorship_obj_li; } +export async function download_export__sponsorship({ + api_cfg, + account_id, + file_type = 'CSV', // 'CSV' or 'Excel' + return_file = true, + filename = 'no_filename.csv', + auto_download = false, + params = {}, // key value object is expected + log_lvl = 0 +}: { + api_cfg: any; + account_id: string; + file_type?: string; + return_file?: boolean; + filename?: string; + auto_download?: boolean; + params?: key_val; + log_lvl?: number; +}) { + console.log('*** stores_event_api.js: get_sponsorship_export() ***'); + const endpoint = `/v2/crud/sponsorship/list`; + params['for_obj_type'] = 'account'; + params['for_obj_id'] = account_id; -export async function download_export__sponsorship( - { - api_cfg, - account_id, - file_type='CSV', // 'CSV' or 'Excel' - return_file=true, - filename='no_filename.csv', - auto_download=false, - params={}, // key value object is expected - log_lvl=0 - }: { - api_cfg: any, - account_id: string, - file_type?: string, - return_file?: boolean, - filename?: string, - auto_download?: boolean, - params?: key_val, - log_lvl?: number - } - ) { -console.log('*** stores_event_api.js: get_sponsorship_export() ***'); + if (file_type == 'CSV' || file_type == 'Excel') { + params['file_type'] = file_type; + } + params['return_file'] = true; -const endpoint = `/v2/crud/sponsorship/list`; -params['for_obj_type'] = 'account'; -params['for_obj_id'] = account_id; + ae_promises.download__sponsorship_export_file = await api.get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + return_blob: return_file, + filename: filename, + auto_download: auto_download, + log_lvl: log_lvl + }); -if (file_type == 'CSV' || file_type == 'Excel') { - params['file_type'] = file_type; -} -params['return_file'] = true; - -ae_promises.download__sponsorship_export_file = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - return_blob: return_file, - filename: filename, - auto_download: auto_download, - log_lvl: log_lvl - }); - -console.log('ae_promises.download__sponsorship_export_file:', ae_promises.download__sponsorship_export_file); -return ae_promises.download__sponsorship_export_file; + console.log( + 'ae_promises.download__sponsorship_export_file:', + ae_promises.download__sponsorship_export_file + ); + return ae_promises.download__sponsorship_export_file; } - - - - - -let export_obj = { - load_ae_obj_id__sponsorship_cfg: load_ae_obj_id__sponsorship_cfg, - load_ae_obj_id__sponsorship: load_ae_obj_id__sponsorship, - load_ae_obj_li__sponsorship: load_ae_obj_li__sponsorship, - download_export__sponsorship: download_export__sponsorship, +const export_obj = { + load_ae_obj_id__sponsorship_cfg: load_ae_obj_id__sponsorship_cfg, + load_ae_obj_id__sponsorship: load_ae_obj_id__sponsorship, + load_ae_obj_li__sponsorship: load_ae_obj_li__sponsorship, + download_export__sponsorship: download_export__sponsorship }; -export let spons_func = export_obj; +export const spons_func = export_obj; diff --git a/src/lib/ae_sponsorships/db_sponsorships.ts b/src/lib/ae_sponsorships/db_sponsorships.ts index 3531ccb4..f360ea22 100644 --- a/src/lib/ae_sponsorships/db_sponsorships.ts +++ b/src/lib/ae_sponsorships/db_sponsorships.ts @@ -7,115 +7,113 @@ import type { key_val } from '$lib/stores/ae_stores'; // Updated 2025-01-15 export interface Sponsorship { - id: string; - // id_random: string; - sponsorship_id: string; - // sponsorship_id_random: string; + id: string; + // id_random: string; + sponsorship_id: string; + // sponsorship_id_random: string; - account_id: string; - // account_id_random: string; + account_id: string; + // account_id_random: string; - organization_id?: null|string; - person_id?: null|string; + organization_id?: null | string; + person_id?: null | string; - poc_person_id?: null|string; - poc_json?: null|string; + poc_person_id?: null | string; + poc_json?: null | string; - name: null|string; - name_override: null|string; + name: null | string; + name_override: null | string; - description?: null|string; + description?: null | string; - email?: null|string; - website_url?: null|string; + email?: null | string; + website_url?: null | string; - // html_text?: null|string; - // thumbnail_url?: null|string; - // picture_url?: null|string; - // video_url?: null|string; - // audio_url?: null|string; - // image_url?: null|string; - // document_url?: null|string; - // logo_url?: null|string; + // html_text?: null|string; + // thumbnail_url?: null|string; + // picture_url?: null|string; + // video_url?: null|string; + // audio_url?: null|string; + // image_url?: null|string; + // document_url?: null|string; + // logo_url?: null|string; - logo_li_json?: null|string; - media_li_json?: null|string; - social_li_json?: null|string; - address_li_json?: null|string; - contact_li_json?: null|string; - guest_li_json?: null|string; + logo_li_json?: null | string; + media_li_json?: null | string; + social_li_json?: null | string; + address_li_json?: null | string; + contact_li_json?: null | string; + guest_li_json?: null | string; - level_num?: null|number; - level_str?: null|string; + level_num?: null | number; + level_str?: null | string; - amount?: null|number; // In dollars + amount?: null | number; // In dollars - questions_li_json?: null|string; + questions_li_json?: null | string; - agree?: null|boolean; // Catchall agree or consent + agree?: null | boolean; // Catchall agree or consent - comments?: null|string; // From the sponsor - staff_notes?: null|string; // Internal use; from staff + comments?: null | string; // From the sponsor + staff_notes?: null | string; // Internal use; from staff - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Generated fields for sorting locally only - tmp_sort_1?: null|string; - tmp_sort_2?: null|string; + // Generated fields for sorting locally only + tmp_sort_1?: null | string; + tmp_sort_2?: null | string; - // Additional fields for convenience (database views) + // Additional fields for convenience (database views) } - // Updated 2025-01-15 export interface Sponsorship_Cfg { - id: string; - // id_random: string; - sponsorship_cfg_id: string; - // sponsorship_cfg_id_random: string; + id: string; + // id_random: string; + sponsorship_cfg_id: string; + // sponsorship_cfg_id_random: string; - account_id: string; - // account_id_random: string; + account_id: string; + // account_id_random: string; - for_type?: null|string; - for_id?: null|number; + for_type?: null | string; + for_id?: null | number; - level_li_json?: null|string; - option_li_json?: null|string; - schedule_li_json?: null|string; + level_li_json?: null | string; + option_li_json?: null | string; + schedule_li_json?: null | string; - cfg_json?: null|key_val; + cfg_json?: null | key_val; - enable: null|boolean; - hide?: null|boolean; - priority?: null|boolean - sort?: null|number; - group?: null|string; - notes?: null|string; - created_on: Date; - updated_on?: null|Date; + enable: null | boolean; + hide?: null | boolean; + priority?: null | boolean; + sort?: null | number; + group?: null | string; + notes?: null | string; + created_on: Date; + updated_on?: null | Date; - // Additional fields for convenience (database views) + // Additional fields for convenience (database views) } - // Updated 2024-09-25 export class MySubClassedDexie extends Dexie { - // We just tell the typing system this is the case - sponsorship!: Table; - cfg!: Table; + // We just tell the typing system this is the case + sponsorship!: Table; + cfg!: Table; - constructor() { - super('ae_sponsorships_db'); - this.version(1).stores({ - sponsorship: ` + constructor() { + super('ae_sponsorships_db'); + this.version(1).stores({ + sponsorship: ` id, sponsorship_id, account_id, poc_person_id, @@ -124,12 +122,12 @@ export class MySubClassedDexie extends Dexie { agree, enable, hide, priority, sort, group, notes, created_on, updated_on, [updated_on+created_on], [created_on+updated_on]`, - cfg: ` + cfg: ` id, sponsorship_cfg_id, account_id, - for_type, for_id`, - }); - } + for_type, for_id` + }); + } } export const db_sponsorships = new MySubClassedDexie(); diff --git a/src/lib/ae_utils/ae_utils.ts b/src/lib/ae_utils/ae_utils.ts index 2f78a9fc..982e8089 100644 --- a/src/lib/ae_utils/ae_utils.ts +++ b/src/lib/ae_utils/ae_utils.ts @@ -1,6 +1,12 @@ // Import external files first. Eventually this will be broken up in to smaller files. -import { clean_filename, format_bytes, guess_file_name, guess_file_extension, get_file_hash } from './ae_utils__files'; -import { get_obj_li_w_match_prop} from './ae_utils__get_obj_li_w_match_prop'; +import { + clean_filename, + format_bytes, + guess_file_name, + guess_file_extension, + get_file_hash +} from './ae_utils__files'; +import { get_obj_li_w_match_prop } from './ae_utils__get_obj_li_w_match_prop'; import { file_extension_icon } from './ae_utils__file_extension_icon'; import { process_permission_checks } from './ae_utils__perm_checks'; import { iso_datetime_formatter } from './ae_utils__datetime_format'; @@ -10,24 +16,27 @@ import { to_title_case } from './ae_utils__to_title_case'; import { process_data_string } from './ae_utils__process_data_string'; import { set_obj_prop_display_name } from './ae_utils__set_obj_prop_display_name'; import { return_obj_type_path } from './ae_utils__return_obj_type_path'; -import { combine_iv_and_base64, encrypt_content, encrypt_wrapper, decrypt_content, decrypt_wrapper } from './ae_utils__crypto'; - +import { + combine_iv_and_base64, + encrypt_content, + encrypt_wrapper, + decrypt_content, + decrypt_wrapper +} from './ae_utils__crypto'; export type key_str = { - [key: string]: string; + [key: string]: string; }; export type key_val = { - [key: string]: any; + [key: string]: any; }; - /* This utility function will add commas to a number. */ function number_w_commas(x) { - return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); + return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); } - // This function will update the URL and send a message to the parent window (iframe). // The name should be something like "example_id". // Svelte specific: @@ -35,80 +44,113 @@ function number_w_commas(x) { // Updated 2024-03-02 // import { pushState, replaceState } from '$app/navigation'; +function handle_url_and_message(name: string, value: null | string) { + console.log(`*** handle_url_and_message() *** name=${name} value=${value}`); + const location = window.location.href; + // console.log('location:', location); + const url = new URL(location); + // console.log('url:', url); -function handle_url_and_message(name: string, value: null|string) { - console.log(`*** handle_url_and_message() *** name=${name} value=${value}`); + if (value) { + url.searchParams.set(name, value); + history.pushState({}, '', url); - let location = window.location.href; - // console.log('location:', location); - const url = new URL(location); - // console.log('url:', url); + // console.log('url:', url); + // pushState(url.href, {}); + // pushState(url.search, {}); + // replaceState(url.href, {}); - if (value) { - url.searchParams.set(name, value); - history.pushState({}, '', url); + const message = { name: value }; + window.parent.postMessage(message, '*'); + } else { + url.searchParams.delete(name); + history.pushState({}, '', url); - // console.log('url:', url); - // pushState(url.href, {}); - // pushState(url.search, {}); - // replaceState(url.href, {}); + // console.log('url:', url); + // pushState({}, '', url.search); + // pushState(url.href, {}); + // replaceState(url.href, {}); - let message = {name: value}; - window.parent.postMessage(message, "*"); - } else { - url.searchParams.delete(name); - history.pushState({}, '', url); - - // console.log('url:', url); - // pushState({}, '', url.search); - // pushState(url.href, {}); - // replaceState(url.href, {}); - - let message = {name: null}; - window.parent.postMessage(message, "*"); - } - // console.log('Message sent to parent (iframe):', message); + const message = { name: null }; + window.parent.postMessage(message, '*'); + } + // console.log('Message sent to parent (iframe):', message); } - -function create_a_element({account_id, base_url, hosted_file_id, filename=null, extension=null, text="Download", class_li='text-blue-500'}) { - return `${text}`; +function create_a_element({ + account_id, + base_url, + hosted_file_id, + filename = null, + extension = null, + text = 'Download', + class_li = 'text-blue-500' +}) { + return `${text}`; } -function create_img_element({account_id, base_url, hosted_file_id, filename=null, extension=null, class_li='max-w-64', style="", inc_link=false}) { - let img_html = ''; - if (filename) { - img_html = ``; - } else { - img_html = ``; - } +function create_img_element({ + account_id, + base_url, + hosted_file_id, + filename = null, + extension = null, + class_li = 'max-w-64', + style = '', + inc_link = false +}) { + let img_html = ''; + if (filename) { + img_html = ``; + } else { + img_html = ``; + } - if (inc_link) { - let a_html = create_a_element({account_id: account_id, base_url: base_url, hosted_file_id: hosted_file_id, filename: filename, extension: extension}); - img_html = `
${img_html}${a_html}
`; - } + if (inc_link) { + const a_html = create_a_element({ + account_id: account_id, + base_url: base_url, + hosted_file_id: hosted_file_id, + filename: filename, + extension: extension + }); + img_html = `
${img_html}${a_html}
`; + } - return img_html; + return img_html; } -function create_video_element({account_id, base_url, hosted_file_id, filename=null, extension=null, class_li='max-w-64', inc_link=false}) { - let video_html = ''; - if (filename) { - video_html = ``; - } else { - video_html = ``; - } +function create_video_element({ + account_id, + base_url, + hosted_file_id, + filename = null, + extension = null, + class_li = 'max-w-64', + inc_link = false +}) { + let video_html = ''; + if (filename) { + video_html = ``; + } else { + video_html = ``; + } - if (inc_link) { - let a_html = create_a_element({account_id: account_id, base_url: base_url, hosted_file_id: hosted_file_id, filename: filename, extension: extension}); - video_html = `
${video_html}${a_html}
`; - } + if (inc_link) { + const a_html = create_a_element({ + account_id: account_id, + base_url: base_url, + hosted_file_id: hosted_file_id, + filename: filename, + extension: extension + }); + video_html = `
${video_html}${a_html}
`; + } - return video_html; + return video_html; } - // // Clear the quick access type // function clear_access_type() { // // NOTE: I think it makes since to reset this to anonymous even if logged in as an admin or similar. @@ -127,146 +169,138 @@ function create_video_element({account_id, base_url, hosted_file_id, filename=nu // return true; // } - // This function will take a long string (sentences or paragraphs) of text and return an estimated number of words. function count_words(text: string) { - if (!text || text.length < 1) { - return false; - } - let count = text.trim().split(/\s+/).length; + if (!text || text.length < 1) { + return false; + } + const count = text.trim().split(/\s+/).length; - return count; + return count; } - // Updated 2024-06-19 // This function behaves weirdly. It needs to be reviewed and updated. -export let shorten_string = function shorten_string( - { - string, - max_length = 45, - begin_length = 15, - end_length = 5, - wildcard_length = 3 - }: { - string: undefined|string, - max_length?: number, - begin_length?: number, - end_length?: number, - wildcard_length?: number - } - ) { - // console.log('*** shorten_filename() ***'); +export const shorten_string = function shorten_string({ + string, + max_length = 45, + begin_length = 15, + end_length = 5, + wildcard_length = 3 +}: { + string: undefined | string; + max_length?: number; + begin_length?: number; + end_length?: number; + wildcard_length?: number; +}) { + // console.log('*** shorten_filename() ***'); - if (!string || typeof string != 'string') { - // console.log('Invalid string value passed'); - // return false; - return ''; - } + if (!string || typeof string != 'string') { + // console.log('Invalid string value passed'); + // return false; + return ''; + } - // NOTE: max_length is not the actual end result length. The actual max will be 45 characters. - // 20 part 1 characters, 5 part 2 characters, 20 part 3 characters + // NOTE: max_length is not the actual end result length. The actual max will be 45 characters. + // 20 part 1 characters, 5 part 2 characters, 20 part 3 characters - // let length = string.length; - let char_over = string.length-max_length; - let new_string = null; - let wildcards = char_over; - if (char_over > 0) { - let part1 = string.slice(0, begin_length); + // let length = string.length; + const char_over = string.length - max_length; + let new_string = null; + let wildcards = char_over; + if (char_over > 0) { + const part1 = string.slice(0, begin_length); - let part2 = ''; - if (char_over > 5) { - wildcards = 5; - } else { - } + let part2 = ''; + if (char_over > 5) { + wildcards = 5; + } else { + } - if (wildcard_length) { - part2 = '.'.repeat(wildcard_length); - } else { - part2 = '.'.repeat(wildcards); - } + if (wildcard_length) { + part2 = '.'.repeat(wildcard_length); + } else { + part2 = '.'.repeat(wildcards); + } - let part3 = string.slice(end_length*-1); - - new_string = part1+part2+part3; - } else { - new_string = string; - } - return new_string; -} + const part3 = string.slice(end_length * -1); + new_string = part1 + part2 + part3; + } else { + new_string = string; + } + return new_string; +}; // Updated 2024-06-19 // This function should return a shorted version of a filename if over the max length. It should always contain at least the first character of the original filename and the complete extension. // Example 1: The Original Long File Name.pdf -> The Orig....pdf // Example 2: The Original Long File Name.html -> The Ori....html -function shorten_filename( - { - filename, - max_length = 20, - slice_end_at = 15, - max_end_length = 5 - }: { - filename: string, - max_length?: number, - slice_end_at?: number, - max_end_length?: number - } - ) { - // console.log('*** shorten_filename() ***'); +function shorten_filename({ + filename, + max_length = 20, + slice_end_at = 15, + max_end_length = 5 +}: { + filename: string; + max_length?: number; + slice_end_at?: number; + max_end_length?: number; +}) { + // console.log('*** shorten_filename() ***'); - if (typeof filename !== 'string' || filename.length <= max_length) { - return filename; - } + if (typeof filename !== 'string' || filename.length <= max_length) { + return filename; + } - let new_filename = null; - let char_over = filename.length - max_length; - let wildcards = char_over - 4; // The number of characters over the max length - if (wildcards < 1) { - return filename; // No point in changing the filename? - } + let new_filename = null; + const char_over = filename.length - max_length; + let wildcards = char_over - 4; // The number of characters over the max length + if (wildcards < 1) { + return filename; // No point in changing the filename? + } - let part_1 = filename.slice(0, slice_end_at); - if (wildcards > 3) { - wildcards = 3; - } else { - } - let part_2 = '.'.repeat(wildcards); - let part_3 = filename.slice(max_end_length*-1); + const part_1 = filename.slice(0, slice_end_at); + if (wildcards > 3) { + wildcards = 3; + } else { + } + const part_2 = '.'.repeat(wildcards); + const part_3 = filename.slice(max_end_length * -1); - new_filename = part_1+part_2+part_3; + new_filename = part_1 + part_2 + part_3; - return new_filename; + return new_filename; } - -export let ae_util = { - is_datetime_recent: is_datetime_recent, - process_permission_checks: process_permission_checks, - iso_datetime_formatter: iso_datetime_formatter, - clean_filename: clean_filename, - format_bytes: format_bytes, - number_w_commas: number_w_commas, - guess_file_name: guess_file_name, - guess_file_extension: guess_file_extension, - get_file_hash: get_file_hash, - get_obj_li_w_match_prop: get_obj_li_w_match_prop, - extract_prefixed_form_data: extract_prefixed_form_data, - process_data_string: process_data_string, - handle_url_and_message: handle_url_and_message, - create_a_element: create_a_element, - create_img_element: create_img_element, - create_video_element: create_video_element, - count_words: count_words, - to_title_case: to_title_case, - shorten_string: shorten_string, - shorten_filename: shorten_filename, - file_extension_icon: file_extension_icon, - set_obj_prop_display_name: set_obj_prop_display_name, - return_obj_type_path: return_obj_type_path, - combine_iv_and_base64: combine_iv_and_base64, - encrypt_content: encrypt_content, - encrypt_wrapper: encrypt_wrapper, - decrypt_content: decrypt_content, - decrypt_wrapper: decrypt_wrapper, +export const ae_util = { + is_datetime_recent: is_datetime_recent, + process_permission_checks: process_permission_checks, + iso_datetime_formatter: iso_datetime_formatter, + clean_filename: clean_filename, + format_bytes: format_bytes, + number_w_commas: number_w_commas, + guess_file_name: guess_file_name, + guess_file_extension: guess_file_extension, + get_file_hash: get_file_hash, + get_obj_li_w_match_prop: get_obj_li_w_match_prop, + extract_prefixed_form_data: extract_prefixed_form_data, + process_data_string: process_data_string, + handle_url_and_message: handle_url_and_message, + create_a_element: create_a_element, + create_img_element: create_img_element, + create_video_element: create_video_element, + count_words: count_words, + to_title_case: to_title_case, + shorten_string: shorten_string, + shorten_filename: shorten_filename, + file_extension_icon: file_extension_icon, + set_obj_prop_display_name: set_obj_prop_display_name, + return_obj_type_path: return_obj_type_path, + combine_iv_and_base64: combine_iv_and_base64, + encrypt_content: encrypt_content, + encrypt_wrapper: encrypt_wrapper, + decrypt_content: decrypt_content, + decrypt_wrapper: decrypt_wrapper }; diff --git a/src/lib/ae_utils/ae_utils__crypto.ts b/src/lib/ae_utils/ae_utils__crypto.ts index 81cb366d..349f6272 100644 --- a/src/lib/ae_utils/ae_utils__crypto.ts +++ b/src/lib/ae_utils/ae_utils__crypto.ts @@ -1,121 +1,127 @@ -let log_lvl = 0; // 0 = no logging, 1 = some logging, 2 = all logging +const log_lvl = 0; // 0 = no logging, 1 = some logging, 2 = all logging // Updated 2025-05-08 async function generate_iv() { - const data = new Uint8Array(16); - crypto.getRandomValues(data); - return data; + const data = new Uint8Array(16); + crypto.getRandomValues(data); + return data; } // Updated 2025-05-08 -export let encrypt_content = async function encrypt_content( - content: string, - keyData: string - ) { - const iv = await generate_iv(); - const keyBytes = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(keyData)); - const key = await crypto.subtle.importKey('raw', keyBytes, { name: 'AES-CBC' }, false, ['encrypt']); - const encodedContent = await crypto.subtle.encrypt({ name: 'AES-CBC', iv }, key, new TextEncoder().encode(content)); - const base64 = btoa(String.fromCharCode(...new Uint8Array(encodedContent))); - if (log_lvl) { - console.log(`IV: ${iv}; Encrypted:`, base64); - } - return { base64, iv }; -} +export const encrypt_content = async function encrypt_content(content: string, keyData: string) { + const iv = await generate_iv(); + const keyBytes = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(keyData)); + const key = await crypto.subtle.importKey('raw', keyBytes, { name: 'AES-CBC' }, false, [ + 'encrypt' + ]); + const encodedContent = await crypto.subtle.encrypt( + { name: 'AES-CBC', iv }, + key, + new TextEncoder().encode(content) + ); + const base64 = btoa(String.fromCharCode(...new Uint8Array(encodedContent))); + if (log_lvl) { + console.log(`IV: ${iv}; Encrypted:`, base64); + } + return { base64, iv }; +}; // Updated 2025-05-08 -export let combine_iv_and_base64 = function combine_iv_and_base64( - base64: string, - iv: Uint8Array - ) { - if (log_lvl) { - console.log(`IV: ${iv}; Encrypted:`, base64); - } +export const combine_iv_and_base64 = function combine_iv_and_base64( + base64: string, + iv: Uint8Array +) { + if (log_lvl) { + console.log(`IV: ${iv}; Encrypted:`, base64); + } - // Combine the IV and encrypted content - const combined = Array.from(iv).map(byte => byte.toString(16).padStart(2, '0')).join('') + ':' + base64; - if (log_lvl) { - console.log('Combined IV and Base64:', combined); - } - // const ivBase64 = btoa(String.fromCharCode(...iv)); - // const combined = `${ivBase64}:${base64}`; - // console.log('Combined IV and Base64 v2:', combined); - return combined; -} + // Combine the IV and encrypted content + const combined = + Array.from(iv) + .map((byte) => byte.toString(16).padStart(2, '0')) + .join('') + + ':' + + base64; + if (log_lvl) { + console.log('Combined IV and Base64:', combined); + } + // const ivBase64 = btoa(String.fromCharCode(...iv)); + // const combined = `${ivBase64}:${base64}`; + // console.log('Combined IV and Base64 v2:', combined); + return combined; +}; // Updated 2025-05-08 -export let encrypt_wrapper = async function encrypt_wrapper( - content: string, - keyData: string - ) { - if (!content) { - console.error('No content provided. Returning empty string.'); - return ''; - } - if (!keyData) { - console.error('No keyData provided. Returning empty string.'); - return ''; - } - const { base64, iv } = await encrypt_content(content, keyData); - const combined = combine_iv_and_base64(base64, iv); - return combined; -} +export const encrypt_wrapper = async function encrypt_wrapper(content: string, keyData: string) { + if (!content) { + console.error('No content provided. Returning empty string.'); + return ''; + } + if (!keyData) { + console.error('No keyData provided. Returning empty string.'); + return ''; + } + const { base64, iv } = await encrypt_content(content, keyData); + const combined = combine_iv_and_base64(base64, iv); + return combined; +}; // This does not handle errors (invalid key/password) well. // Updated 2025-05-08 -export let decrypt_content = async function decrypt_content( - base64Content: string, - iv: Uint8Array, - keyData: string - ) { - const keyBytes = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(keyData)); - const key = await crypto.subtle.importKey('raw', keyBytes, { name: 'AES-CBC' }, false, ['decrypt']); - const encryptedContent = Uint8Array.from(atob(base64Content), c => c.charCodeAt(0)); - const decryptedContent = await crypto.subtle.decrypt({ name: 'AES-CBC', iv }, key, encryptedContent); - const decodedContent = new TextDecoder().decode(decryptedContent); - // console.log('Decrypted Content:', decodedContent); - return decodedContent; -} +export const decrypt_content = async function decrypt_content( + base64Content: string, + iv: Uint8Array, + keyData: string +) { + const keyBytes = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(keyData)); + const key = await crypto.subtle.importKey('raw', keyBytes, { name: 'AES-CBC' }, false, [ + 'decrypt' + ]); + const encryptedContent = Uint8Array.from(atob(base64Content), (c) => c.charCodeAt(0)); + const decryptedContent = await crypto.subtle.decrypt( + { name: 'AES-CBC', iv }, + key, + encryptedContent + ); + const decodedContent = new TextDecoder().decode(decryptedContent); + // console.log('Decrypted Content:', decodedContent); + return decodedContent; +}; // Updated 2025-05-08 -export let split_iv_and_base64 = function split_iv_and_base64( - combined: string - ) { - if (!combined) { - console.error('No combined string provided. Returning empty object.'); - return { iv: new Uint8Array(), base64: '' }; - } - let [iv_hex, encrypted_base64_string] = combined.split(':'); - let base64 = encrypted_base64_string - let iv = new Uint8Array(iv_hex.match(/.{1,2}/g).map(byte => parseInt(byte, 16))); - if (log_lvl) { - console.log(`IV: ${iv}; Encrypted:`, base64); - } - return { iv, base64 }; -} +export const split_iv_and_base64 = function split_iv_and_base64(combined: string) { + if (!combined) { + console.error('No combined string provided. Returning empty object.'); + return { iv: new Uint8Array(), base64: '' }; + } + const [iv_hex, encrypted_base64_string] = combined.split(':'); + const base64 = encrypted_base64_string; + const iv = new Uint8Array(iv_hex.match(/.{1,2}/g).map((byte) => parseInt(byte, 16))); + if (log_lvl) { + console.log(`IV: ${iv}; Encrypted:`, base64); + } + return { iv, base64 }; +}; // Updated 2025-05-15 -export let decrypt_wrapper = async function decrypt_wrapper( - combined: string, - keyData: string - ) { - if (!combined) { - console.error('No combined string provided. Returning empty string.'); - return false; - } - const { iv, base64 } = split_iv_and_base64(combined); - console.log(`IV: ${iv}; Encrypted:`, base64); - let decrypted; - try { - decrypted = await decrypt_content(base64, iv, keyData); - if (log_lvl > 1) { - console.log(`IV: ${iv}; Decrypted:`, decrypted); - } else if (log_lvl) { - console.log(`IV: ${iv}`); - } - } catch (error) { - console.error('Decryption failed:', error); - return false; - } - return decrypted; -} \ No newline at end of file +export const decrypt_wrapper = async function decrypt_wrapper(combined: string, keyData: string) { + if (!combined) { + console.error('No combined string provided. Returning empty string.'); + return false; + } + const { iv, base64 } = split_iv_and_base64(combined); + console.log(`IV: ${iv}; Encrypted:`, base64); + let decrypted; + try { + decrypted = await decrypt_content(base64, iv, keyData); + if (log_lvl > 1) { + console.log(`IV: ${iv}; Decrypted:`, decrypted); + } else if (log_lvl) { + console.log(`IV: ${iv}`); + } + } catch (error) { + console.error('Decryption failed:', error); + return false; + } + return decrypted; +}; diff --git a/src/lib/ae_utils/ae_utils__datetime_format.ts b/src/lib/ae_utils/ae_utils__datetime_format.ts index c973d48f..115274a3 100644 --- a/src/lib/ae_utils/ae_utils__datetime_format.ts +++ b/src/lib/ae_utils/ae_utils__datetime_format.ts @@ -1,176 +1,176 @@ import dayjs from 'dayjs'; -export let iso_datetime_formatter = function iso_datetime_formatter( - raw_datetime: null|string|Date = null, - named_format: string = 'datetime_iso_no_seconds', // date_iso, datetime_iso_no_seconds - time_24_hours: boolean = false - ) { - // console.log('*** iso_datetime_formatter() ***'); +export const iso_datetime_formatter = function iso_datetime_formatter( + raw_datetime: null | string | Date = null, + named_format: string = 'datetime_iso_no_seconds', // date_iso, datetime_iso_no_seconds + time_24_hours: boolean = false +) { + // console.log('*** iso_datetime_formatter() ***'); - // https://en.wikipedia.org/wiki/ISO_8601 - // https://day.js.org/docs/en/display/format - // ISO 8601-1:2019 includes the T before the time portion - // ISO 8601-1:2019 midnight may only be referred to as "00:00", corresponding to the beginning of a calendar day - // and "24:00" is no longer allowed corresponding to the end of a day - // 60 is only used to denote an added leap second + // https://en.wikipedia.org/wiki/ISO_8601 + // https://day.js.org/docs/en/display/format + // ISO 8601-1:2019 includes the T before the time portion + // ISO 8601-1:2019 midnight may only be referred to as "00:00", corresponding to the beginning of a calendar day + // and "24:00" is no longer allowed corresponding to the end of a day + // 60 is only used to denote an added leap second - // ISO 8601 UTC: 2021-03-04T19:04:44+00:00 - // ISO 8601 UTC: 2021-03-04T19:04:44Z - // ISO 8601 UTC: 20210304T190444Z + // ISO 8601 UTC: 2021-03-04T19:04:44+00:00 + // ISO 8601 UTC: 2021-03-04T19:04:44Z + // ISO 8601 UTC: 20210304T190444Z - // datetime_iso 'YYYY-MM-DD HH:mm:ss' - // datetime_iso_12 'YYYY-MM-DD hh:mm:ss A' - // datetime_iso_12_short 'YY-MM-DD hh:mm A' - // datetime_iso_tz 'YYYY-MM-DD HH:mm:ss Z' + // datetime_iso 'YYYY-MM-DD HH:mm:ss' + // datetime_iso_12 'YYYY-MM-DD hh:mm:ss A' + // datetime_iso_12_short 'YY-MM-DD hh:mm A' + // datetime_iso_tz 'YYYY-MM-DD HH:mm:ss Z' - // datetime_12_no_seconds 'YYYY-MM-DD hh:mm A' + // datetime_12_no_seconds 'YYYY-MM-DD hh:mm A' - // datetime_long 'dddd, MMMM D, YYYY hh:mm:ss A' - // datetime_medium 'ddd, MMM D, YYYY hh:mm:ss A' - // datetime_short 'MMM D, YY hh:mm A' + // datetime_long 'dddd, MMMM D, YYYY hh:mm:ss A' + // datetime_medium 'ddd, MMM D, YYYY hh:mm:ss A' + // datetime_short 'MMM D, YY hh:mm A' - // date_iso 'YYYY-MM-DD' + // date_iso 'YYYY-MM-DD' - // date_long 'dddd, MMMM D, YYYY' - // date_medium 'ddd, MMM D, YYYY' - // date_short 'MMM D, YY' + // date_long 'dddd, MMMM D, YYYY' + // date_medium 'ddd, MMM D, YYYY' + // date_short 'MMM D, YY' - // time_iso 'HH:mm:ss' - // time_iso_12 'hh:mm:ss A' - // time_iso_tz 'HH:mm:ss Z' - // time_iso_12_tz 'hh:mm:ss A Z' + // time_iso 'HH:mm:ss' + // time_iso_12 'hh:mm:ss A' + // time_iso_tz 'HH:mm:ss Z' + // time_iso_12_tz 'hh:mm:ss A Z' - // time_long 'hh:mm:ss A' - // time_medium 'h:m:s A' - // time_short 'hh:mm A' + // time_long 'hh:mm:ss A' + // time_medium 'h:m:s A' + // time_short 'hh:mm A' - // dayjs(raw_datetime).format('dddd, MMMM D, YYYY hh:mm:ss A'); + // dayjs(raw_datetime).format('dddd, MMMM D, YYYY hh:mm:ss A'); - if (!raw_datetime) { - raw_datetime = new Date(); // Get the current datetime if one was not passed. - } + if (!raw_datetime) { + raw_datetime = new Date(); // Get the current datetime if one was not passed. + } - let datetime_string = null; + let datetime_string = null; - switch (named_format) { - case 'datetime_iso': - datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD HH:mm:ss'); - break; - case 'datetime_iso_no_seconds': - datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD HH:mm'); - break; - case 'datetime_iso_12_short': - datetime_string = dayjs(raw_datetime).format('YY-MM-DD hh:mm A'); - break; - case 'datetime_iso_12_short_month': - datetime_string = dayjs(raw_datetime).format('MM-DD hh:mm A'); - break; - case 'datetime_iso_tz': - datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD HH:mm:ss Z'); - break; - case 'datetime_iso_12_no_seconds': - datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD hh:mm A'); - break; - // case 'datetime_12_no_seconds': - // datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD hh:mm A'); - // break; - case 'datetime_us': - datetime_string = dayjs(raw_datetime).format('MM/DD/YYYY hh:mm:ss A'); - break; - case 'datetime_short': - datetime_string = dayjs(raw_datetime).format('MMM D, YY HH:mm'); - break; - case 'datetime_12_short': - datetime_string = dayjs(raw_datetime).format('MMM D, YY hh:mm A'); - break; - case 'datetime_medium': - datetime_string = dayjs(raw_datetime).format('MMM D, YYYY H:mm'); - break; - case 'datetime_12_medium': - datetime_string = dayjs(raw_datetime).format('MMM D, YYYY h:mm A'); - break; - case 'datetime_long': - datetime_string = dayjs(raw_datetime).format('MMMM D, YYYY HH:mm'); - break; - case 'datetime_12_long': - datetime_string = dayjs(raw_datetime).format('MMMM D, YYYY hh:mm A'); - break; - case 'datetime_medium_sec': - datetime_string = dayjs(raw_datetime).format('MMM D, YYYY H:mm:ss'); - break; - case 'datetime_12_medium_sec': - datetime_string = dayjs(raw_datetime).format('MMM D, YYYY h:mm:ss A'); - break; - case 'datetime_short_month': - datetime_string = dayjs(raw_datetime).format('MMM D hh:mm A'); - break; - case 'datetime_long_month': - datetime_string = dayjs(raw_datetime).format('MMMM D hh:mm A'); - break; - case 'datetime_short_day': - datetime_string = dayjs(raw_datetime).format('D hh:mm A'); - break; - case 'date_iso': - datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD'); - break; - case 'date_us': - datetime_string = dayjs(raw_datetime).format('MM/DD/YYYY'); - break; - case 'date_long_month_day': - datetime_string = dayjs(raw_datetime).format('MMMM D'); - break; - case 'date_short': - datetime_string = dayjs(raw_datetime).format('MMM D, YY'); - break; - case 'date_short_no_year': - datetime_string = dayjs(raw_datetime).format('MMM D'); - break; - case 'date_long': - datetime_string = dayjs(raw_datetime).format('MMMM D, YYYY'); - break; - case 'date_full': - datetime_string = dayjs(raw_datetime).format('dddd, MMMM D, YYYY'); - break; - case 'date_full_no_year': - datetime_string = dayjs(raw_datetime).format('dddd, MMMM D'); - break; - case 'time_iso': - datetime_string = dayjs(raw_datetime).format('HH:mm:ss'); - break; - case 'time_iso_12_tz': - datetime_string = dayjs(raw_datetime).format('hh:mm:ss A Z'); - break; - case 'time_long': - datetime_string = dayjs(raw_datetime).format('HH:mm:ss'); - break; - case 'time_12_long': - datetime_string = dayjs(raw_datetime).format('hh:mm:ss A'); - break; - case 'time_short': - datetime_string = dayjs(raw_datetime).format('HH:mm'); - break; - case 'time_short_no_leading': - datetime_string = dayjs(raw_datetime).format('H:mm'); - break; - case 'time_12_short': - datetime_string = dayjs(raw_datetime).format('hh:mm A'); - break; - case 'time_12_short_no_leading': - datetime_string = dayjs(raw_datetime).format('h:mm A'); - break; - case 'week_long': - datetime_string = dayjs(raw_datetime).format('dddd'); - break; - case 'week_medium': - datetime_string = dayjs(raw_datetime).format('ddd'); - break; - case 'week_short': - datetime_string = dayjs(raw_datetime).format('dd'); - break; - default: - // console.log(`The named format passed (${named_format}) did not match a common name. Trying to format with the named format value.`); - datetime_string = dayjs(raw_datetime).format(named_format); - // datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD HH:mm:ss'); - } - return datetime_string; -} + switch (named_format) { + case 'datetime_iso': + datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD HH:mm:ss'); + break; + case 'datetime_iso_no_seconds': + datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD HH:mm'); + break; + case 'datetime_iso_12_short': + datetime_string = dayjs(raw_datetime).format('YY-MM-DD hh:mm A'); + break; + case 'datetime_iso_12_short_month': + datetime_string = dayjs(raw_datetime).format('MM-DD hh:mm A'); + break; + case 'datetime_iso_tz': + datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD HH:mm:ss Z'); + break; + case 'datetime_iso_12_no_seconds': + datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD hh:mm A'); + break; + // case 'datetime_12_no_seconds': + // datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD hh:mm A'); + // break; + case 'datetime_us': + datetime_string = dayjs(raw_datetime).format('MM/DD/YYYY hh:mm:ss A'); + break; + case 'datetime_short': + datetime_string = dayjs(raw_datetime).format('MMM D, YY HH:mm'); + break; + case 'datetime_12_short': + datetime_string = dayjs(raw_datetime).format('MMM D, YY hh:mm A'); + break; + case 'datetime_medium': + datetime_string = dayjs(raw_datetime).format('MMM D, YYYY H:mm'); + break; + case 'datetime_12_medium': + datetime_string = dayjs(raw_datetime).format('MMM D, YYYY h:mm A'); + break; + case 'datetime_long': + datetime_string = dayjs(raw_datetime).format('MMMM D, YYYY HH:mm'); + break; + case 'datetime_12_long': + datetime_string = dayjs(raw_datetime).format('MMMM D, YYYY hh:mm A'); + break; + case 'datetime_medium_sec': + datetime_string = dayjs(raw_datetime).format('MMM D, YYYY H:mm:ss'); + break; + case 'datetime_12_medium_sec': + datetime_string = dayjs(raw_datetime).format('MMM D, YYYY h:mm:ss A'); + break; + case 'datetime_short_month': + datetime_string = dayjs(raw_datetime).format('MMM D hh:mm A'); + break; + case 'datetime_long_month': + datetime_string = dayjs(raw_datetime).format('MMMM D hh:mm A'); + break; + case 'datetime_short_day': + datetime_string = dayjs(raw_datetime).format('D hh:mm A'); + break; + case 'date_iso': + datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD'); + break; + case 'date_us': + datetime_string = dayjs(raw_datetime).format('MM/DD/YYYY'); + break; + case 'date_long_month_day': + datetime_string = dayjs(raw_datetime).format('MMMM D'); + break; + case 'date_short': + datetime_string = dayjs(raw_datetime).format('MMM D, YY'); + break; + case 'date_short_no_year': + datetime_string = dayjs(raw_datetime).format('MMM D'); + break; + case 'date_long': + datetime_string = dayjs(raw_datetime).format('MMMM D, YYYY'); + break; + case 'date_full': + datetime_string = dayjs(raw_datetime).format('dddd, MMMM D, YYYY'); + break; + case 'date_full_no_year': + datetime_string = dayjs(raw_datetime).format('dddd, MMMM D'); + break; + case 'time_iso': + datetime_string = dayjs(raw_datetime).format('HH:mm:ss'); + break; + case 'time_iso_12_tz': + datetime_string = dayjs(raw_datetime).format('hh:mm:ss A Z'); + break; + case 'time_long': + datetime_string = dayjs(raw_datetime).format('HH:mm:ss'); + break; + case 'time_12_long': + datetime_string = dayjs(raw_datetime).format('hh:mm:ss A'); + break; + case 'time_short': + datetime_string = dayjs(raw_datetime).format('HH:mm'); + break; + case 'time_short_no_leading': + datetime_string = dayjs(raw_datetime).format('H:mm'); + break; + case 'time_12_short': + datetime_string = dayjs(raw_datetime).format('hh:mm A'); + break; + case 'time_12_short_no_leading': + datetime_string = dayjs(raw_datetime).format('h:mm A'); + break; + case 'week_long': + datetime_string = dayjs(raw_datetime).format('dddd'); + break; + case 'week_medium': + datetime_string = dayjs(raw_datetime).format('ddd'); + break; + case 'week_short': + datetime_string = dayjs(raw_datetime).format('dd'); + break; + default: + // console.log(`The named format passed (${named_format}) did not match a common name. Trying to format with the named format value.`); + datetime_string = dayjs(raw_datetime).format(named_format); + // datetime_string = dayjs(raw_datetime).format('YYYY-MM-DD HH:mm:ss'); + } + return datetime_string; +}; diff --git a/src/lib/ae_utils/ae_utils__extract_prefixed_form_data.ts b/src/lib/ae_utils/ae_utils__extract_prefixed_form_data.ts index 0627b35e..7f813c62 100644 --- a/src/lib/ae_utils/ae_utils__extract_prefixed_form_data.ts +++ b/src/lib/ae_utils/ae_utils__extract_prefixed_form_data.ts @@ -1,5 +1,5 @@ type key_val = { - [key: string]: any; + [key: string]: any; }; /* This utility function looks for any form data with the prefixed name passed and returns a new object. @@ -11,118 +11,122 @@ type key_val = { * REMINDER: An unchecked checkbox will not be sent in the form data. This is a browser thing. * Updated 2023-12-22 */ -export let extract_prefixed_form_data = function extract_prefixed_form_data( - { - prefix = null, - form_data = {}, - rm_empty_id = true, - rm_empty = false, - trim_values = false, - bool_tf_str = false, - log_lvl = 0 - }: { - prefix: string|null, - form_data: any, - rm_empty_id?: boolean, - rm_empty?: boolean, - trim_values?: boolean, - bool_tf_str?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log('*** extract_prefixed_form_data() ***'); - if (prefix) { - console.log(`Looking for prefixed fields: ${prefix}; Removing emptry ID fields: ${rm_empty_id}; Removing empty fields: ${rm_empty}; Trim string values: ${trim_values}; Convert true/false string values to boolean: ${bool_tf_str}`); - } else { - console.log(`No prefix set. Looking at all fields. Removing emptry ID fields: ${rm_empty_id}; Removing empty fields: ${rm_empty}; Trim string values: ${trim_values}; Convert true/false string values to boolean: ${bool_tf_str}`); - } - } - if (log_lvl > 1) { - console.log('Form Data:'); - console.log(form_data); - } +export const extract_prefixed_form_data = function extract_prefixed_form_data({ + prefix = null, + form_data = {}, + rm_empty_id = true, + rm_empty = false, + trim_values = false, + bool_tf_str = false, + log_lvl = 0 +}: { + prefix: string | null; + form_data: any; + rm_empty_id?: boolean; + rm_empty?: boolean; + trim_values?: boolean; + bool_tf_str?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log('*** extract_prefixed_form_data() ***'); + if (prefix) { + console.log( + `Looking for prefixed fields: ${prefix}; Removing emptry ID fields: ${rm_empty_id}; Removing empty fields: ${rm_empty}; Trim string values: ${trim_values}; Convert true/false string values to boolean: ${bool_tf_str}` + ); + } else { + console.log( + `No prefix set. Looking at all fields. Removing emptry ID fields: ${rm_empty_id}; Removing empty fields: ${rm_empty}; Trim string values: ${trim_values}; Convert true/false string values to boolean: ${bool_tf_str}` + ); + } + } + if (log_lvl > 1) { + console.log('Form Data:'); + console.log(form_data); + } - // const data_obj: any = {}; // future TS - let data_obj: key_val = {}; - for (let field of form_data) { - let [obj_prop_name, obj_prop_value] = field; - if (log_lvl > 1) { - console.log(`${obj_prop_name}: ${obj_prop_value} type=${typeof obj_prop_value}`); - } + // const data_obj: any = {}; // future TS + const data_obj: key_val = {}; + for (const field of form_data) { + let [obj_prop_name, obj_prop_value] = field; + if (log_lvl > 1) { + console.log(`${obj_prop_name}: ${obj_prop_value} type=${typeof obj_prop_value}`); + } - // Trim string values if needed - if (trim_values && typeof obj_prop_value === 'string') { - if (log_lvl && obj_prop_value.trim() != obj_prop_value) { - console.log('Trimming string value!'); - obj_prop_value = obj_prop_value.trim(); - } - } + // Trim string values if needed + if (trim_values && typeof obj_prop_value === 'string') { + if (log_lvl && obj_prop_value.trim() != obj_prop_value) { + console.log('Trimming string value!'); + obj_prop_value = obj_prop_value.trim(); + } + } - // Convert string to boolean if needed - if (bool_tf_str && typeof obj_prop_value === 'string') { - // console.log('Flag set for converting true/false string values to boolean!'); + // Convert string to boolean if needed + if (bool_tf_str && typeof obj_prop_value === 'string') { + // console.log('Flag set for converting true/false string values to boolean!'); - if (obj_prop_value.toLowerCase() === 'true') { - if (log_lvl) { - console.log('Converting string to boolean value: true'); - } - obj_prop_value = true; - } else if (obj_prop_value.toLowerCase() === 'false') { - if (log_lvl) { - console.log('Converting string to boolean value: false'); - } - obj_prop_value = false; - } - } + if (obj_prop_value.toLowerCase() === 'true') { + if (log_lvl) { + console.log('Converting string to boolean value: true'); + } + obj_prop_value = true; + } else if (obj_prop_value.toLowerCase() === 'false') { + if (log_lvl) { + console.log('Converting string to boolean value: false'); + } + obj_prop_value = false; + } + } - if (prefix && obj_prop_name.startsWith(prefix)) { // Prefix set - // if (obj_prop_name.startsWith(prefix)) { - obj_prop_name = obj_prop_name.replace(prefix, ''); - if (log_lvl) { - console.log(`Checking: (${prefix})${obj_prop_name} value=${obj_prop_value}`); - } - if (rm_empty_id && obj_prop_name.endsWith('id_random') && !obj_prop_value) { - if (log_lvl) { - console.log(`Match but empty *_id_random. Ignoring/removing: ${obj_prop_name}`); - } - } else if (rm_empty && !obj_prop_value) { - if (log_lvl) { - console.log(`Match but empty. Ignoring/removing: ${obj_prop_name}`); - } - } else { - if (log_lvl) { - console.log(`Match: ${prefix})${obj_prop_name} value=${obj_prop_value}`); - } - data_obj[obj_prop_name] = obj_prop_value; - } - } else if (prefix && !obj_prop_name.startsWith(prefix)) { // Prefix set - if (log_lvl > 1) { - console.log('Did not start with prefix. Ignoring'); - } - } else { // No prefix set - if (log_lvl) { - console.log(`Checking: ${obj_prop_name} value=${obj_prop_value}`); - } - if (rm_empty_id && obj_prop_name.endsWith('id_random') && !obj_prop_value) { - if (log_lvl > 1) { - console.log(`Match but empty *_id_random. Ignoring/removing: ${obj_prop_name}`); - } - } else if (rm_empty && !obj_prop_value) { - if (log_lvl > 1) { - console.log(`Match but empty. Ignoring/removing: ${obj_prop_name}`); - } - } else { - if (log_lvl > 1) { - console.log(`Match: ${obj_prop_name} value=${obj_prop_value}`); - } - data_obj[obj_prop_name] = obj_prop_value; - } - - } - } - if (log_lvl > 1) { - console.log(data_obj); - } - return data_obj; -} + if (prefix && obj_prop_name.startsWith(prefix)) { + // Prefix set + // if (obj_prop_name.startsWith(prefix)) { + obj_prop_name = obj_prop_name.replace(prefix, ''); + if (log_lvl) { + console.log(`Checking: (${prefix})${obj_prop_name} value=${obj_prop_value}`); + } + if (rm_empty_id && obj_prop_name.endsWith('id_random') && !obj_prop_value) { + if (log_lvl) { + console.log(`Match but empty *_id_random. Ignoring/removing: ${obj_prop_name}`); + } + } else if (rm_empty && !obj_prop_value) { + if (log_lvl) { + console.log(`Match but empty. Ignoring/removing: ${obj_prop_name}`); + } + } else { + if (log_lvl) { + console.log(`Match: ${prefix})${obj_prop_name} value=${obj_prop_value}`); + } + data_obj[obj_prop_name] = obj_prop_value; + } + } else if (prefix && !obj_prop_name.startsWith(prefix)) { + // Prefix set + if (log_lvl > 1) { + console.log('Did not start with prefix. Ignoring'); + } + } else { + // No prefix set + if (log_lvl) { + console.log(`Checking: ${obj_prop_name} value=${obj_prop_value}`); + } + if (rm_empty_id && obj_prop_name.endsWith('id_random') && !obj_prop_value) { + if (log_lvl > 1) { + console.log(`Match but empty *_id_random. Ignoring/removing: ${obj_prop_name}`); + } + } else if (rm_empty && !obj_prop_value) { + if (log_lvl > 1) { + console.log(`Match but empty. Ignoring/removing: ${obj_prop_name}`); + } + } else { + if (log_lvl > 1) { + console.log(`Match: ${obj_prop_name} value=${obj_prop_value}`); + } + data_obj[obj_prop_name] = obj_prop_value; + } + } + } + if (log_lvl > 1) { + console.log(data_obj); + } + return data_obj; +}; diff --git a/src/lib/ae_utils/ae_utils__file_extension_icon.ts b/src/lib/ae_utils/ae_utils__file_extension_icon.ts index 8488c0e9..27cb91f4 100644 --- a/src/lib/ae_utils/ae_utils__file_extension_icon.ts +++ b/src/lib/ae_utils/ae_utils__file_extension_icon.ts @@ -1,51 +1,50 @@ -import type { key_str } from "./ae_utils"; +import type { key_str } from './ae_utils'; // Updated 2024-06-19 -export function file_extension_icon( - extension: string) { - // console.log('*** file_extension_icon() ***'); - let file_icons: key_str = { - 'file': 'file', - '3gp': 'file-video', - '7z': 'file-archive', - 'aac': 'file-audio', - 'ac3': 'file-audio', - 'aif': 'file-audio', - 'aiff': 'file-audio', - 'avi': 'file-video', - 'bmp': 'file-image', - 'csv': 'file-csv', - 'doc': 'file-word', - 'docx': 'file-word', - 'eps': 'file-image', - 'flac': 'file-audio', - 'gif': 'file-image', - 'htm': 'file-code', - 'html': 'file-code', - 'jpeg': 'file-image', - 'jpg': 'file-image', - 'key': 'file-powerpoint', - 'mkv': 'file-video', - 'mov': 'file-video', - 'mp3': 'file-audio', - 'mp4': 'file-video', - 'odp': 'file-powerpoint', - 'pdf': 'file-pdf', - 'png': 'file-image', - 'ppt': 'file-powerpoint', - 'pptx': 'file-powerpoint', - 'txt': 'file-alt', - 'wav': 'file-audio', - 'webp': 'file-image', - 'xls': 'file-excel', - 'xlsx': 'file-excel', - 'zip': 'file-archive' - }; +export function file_extension_icon(extension: string) { + // console.log('*** file_extension_icon() ***'); + const file_icons: key_str = { + file: 'file', + '3gp': 'file-video', + '7z': 'file-archive', + aac: 'file-audio', + ac3: 'file-audio', + aif: 'file-audio', + aiff: 'file-audio', + avi: 'file-video', + bmp: 'file-image', + csv: 'file-csv', + doc: 'file-word', + docx: 'file-word', + eps: 'file-image', + flac: 'file-audio', + gif: 'file-image', + htm: 'file-code', + html: 'file-code', + jpeg: 'file-image', + jpg: 'file-image', + key: 'file-powerpoint', + mkv: 'file-video', + mov: 'file-video', + mp3: 'file-audio', + mp4: 'file-video', + odp: 'file-powerpoint', + pdf: 'file-pdf', + png: 'file-image', + ppt: 'file-powerpoint', + pptx: 'file-powerpoint', + txt: 'file-alt', + wav: 'file-audio', + webp: 'file-image', + xls: 'file-excel', + xlsx: 'file-excel', + zip: 'file-archive' + }; - if (file_icons[extension]) { - return file_icons[extension]; - } else { - // return null; - return file_icons['file']; - } + if (file_icons[extension]) { + return file_icons[extension]; + } else { + // return null; + return file_icons['file']; + } } diff --git a/src/lib/ae_utils/ae_utils__files.ts b/src/lib/ae_utils/ae_utils__files.ts index 65e1a24d..50933267 100644 --- a/src/lib/ae_utils/ae_utils__files.ts +++ b/src/lib/ae_utils/ae_utils__files.ts @@ -2,85 +2,85 @@ // Use a defined list of unacceptable characters to remove from a filename. // Updated 2024-10-18 -export let clean_filename = function clean_filename(filename: any|string, unacceptable_chars: RegExp = /[ <>:"/\\|?*]/g, replacement_char: string = '_') { - // console.log('*** clean_filename() ***'); - if (!filename) { - return ''; - } +export const clean_filename = function clean_filename( + filename: any | string, + unacceptable_chars: RegExp = /[ <>:"/\\|?*]/g, + replacement_char: string = '_' +) { + // console.log('*** clean_filename() ***'); + if (!filename) { + return ''; + } - let cleaned_filename = filename.replace(unacceptable_chars, replacement_char); - // console.log(cleaned_filename); - return cleaned_filename; -} + const cleaned_filename = filename.replace(unacceptable_chars, replacement_char); + // console.log(cleaned_filename); + return cleaned_filename; +}; +export const format_bytes = function format_bytes(bytes: number, decimals: number = 2) { + if (bytes === 0) return '0 Bytes'; -export let format_bytes = function format_bytes( - bytes: number, - decimals: number = 2 - ) { - if (bytes === 0) return '0 Bytes'; + const k = 1024; + const dm = decimals < 0 ? 0 : decimals; + const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; - const k = 1024; - const dm = decimals < 0 ? 0 : decimals; - const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + const i = Math.floor(Math.log(bytes) / Math.log(k)); - const i = Math.floor(Math.log(bytes) / Math.log(k)); - - return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; -} + return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; +}; // Updated 2024-08-12 -export let guess_file_name = function guess_file_name(filename_string: string) { - // console.log('*** guess_file_name() ***'); - if (!filename_string) { - return ''; - } - - if (filename_string.includes('.')) { - let file_name = filename_string.substring(0, filename_string.lastIndexOf('.')); - // console.log(file_name); - return file_name; - } else { - return filename_string; - } -} +export const guess_file_name = function guess_file_name(filename_string: string) { + // console.log('*** guess_file_name() ***'); + if (!filename_string) { + return ''; + } + if (filename_string.includes('.')) { + const file_name = filename_string.substring(0, filename_string.lastIndexOf('.')); + // console.log(file_name); + return file_name; + } else { + return filename_string; + } +}; // Updated 2024-08-12 -export let guess_file_extension = function guess_file_extension(filename_string: string) { - // console.log('*** guess_file_extension() ***'); - if (!filename_string) { - return ''; - } +export const guess_file_extension = function guess_file_extension(filename_string: string) { + // console.log('*** guess_file_extension() ***'); + if (!filename_string) { + return ''; + } - if (!filename_string.includes('.')) { - return ''; - } - - let file_extension = filename_string.substring(filename_string.lastIndexOf('.') + 1, filename_string.length) || filename_string; - // console.log(file_extension); - return file_extension; -} + if (!filename_string.includes('.')) { + return ''; + } + const file_extension = + filename_string.substring(filename_string.lastIndexOf('.') + 1, filename_string.length) || + filename_string; + // console.log(file_extension); + return file_extension; +}; // Updated 2024-08-12 -export let get_file_hash = async function get_file_hash(file) { - return new Promise((resolve, reject) => { - let file_reader = new FileReader(); +export const get_file_hash = async function get_file_hash(file) { + return new Promise((resolve, reject) => { + const file_reader = new FileReader(); - file_reader.onload = async function() { - if (file_reader.result.byteLength !== file.size) { - console.log('File was not read completely'); - reject("Error reading the file"); - } + file_reader.onload = async function () { + if (file_reader.result.byteLength !== file.size) { + console.log('File was not read completely'); + reject('Error reading the file'); + } - const hash_buffer = await crypto.subtle.digest('SHA-256', file_reader.result); - const hash_array = Array.from(new Uint8Array(hash_buffer)); - const hash_hex = hash_array.map(b => b.toString(16).padStart(2, '0')).join(''); + const hash_buffer = await crypto.subtle.digest('SHA-256', file_reader.result); + const hash_array = Array.from(new Uint8Array(hash_buffer)); + const hash_hex = hash_array.map((b) => b.toString(16).padStart(2, '0')).join(''); - resolve(hash_hex); - }; + resolve(hash_hex); + }; - file_reader.readAsArrayBuffer(file); - }); -} + file_reader.readAsArrayBuffer(file); + }); +}; diff --git a/src/lib/ae_utils/ae_utils__get_obj_li_w_match_prop.ts b/src/lib/ae_utils/ae_utils__get_obj_li_w_match_prop.ts index 33e05fa6..06d613c9 100644 --- a/src/lib/ae_utils/ae_utils__get_obj_li_w_match_prop.ts +++ b/src/lib/ae_utils/ae_utils__get_obj_li_w_match_prop.ts @@ -1,46 +1,43 @@ - /* Returns a list of objects that have a matching property value. */ // Updated 2023-06-28 -export let get_obj_li_w_match_prop = function get_obj_li_w_match_prop( - { - obj_li, - property, - value, - log_lvl = 0 - }: { - obj_li: any[], - property: string, - value: any, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log('Search Object List:', obj_li); - console.log(`Property: ${property}`); - console.log(`Value: ${value}`); - } - if (log_lvl > 1) { - console.log(`Type Of: ${typeof value}`); - } +export const get_obj_li_w_match_prop = function get_obj_li_w_match_prop({ + obj_li, + property, + value, + log_lvl = 0 +}: { + obj_li: any[]; + property: string; + value: any; + log_lvl?: number; +}) { + if (log_lvl) { + console.log('Search Object List:', obj_li); + console.log(`Property: ${property}`); + console.log(`Value: ${value}`); + } + if (log_lvl > 1) { + console.log(`Type Of: ${typeof value}`); + } - // Create an empty array to store the matching objects. - const matching_obj_li = []; + // Create an empty array to store the matching objects. + const matching_obj_li = []; - // Iterate through the list of objects. - for (const object of obj_li) { - // Check if the object has the specified property and the value of the property matches the specified value. - if (object.hasOwnProperty(property)) { - // console.log('Has property at least....', object[property], typeof object[property]); - } - if (object.hasOwnProperty(property) && object[property] === value) { - // Add the object to the array of matching objects. - matching_obj_li.push(object); - } - } + // Iterate through the list of objects. + for (const object of obj_li) { + // Check if the object has the specified property and the value of the property matches the specified value. + if (object.hasOwnProperty(property)) { + // console.log('Has property at least....', object[property], typeof object[property]); + } + if (object.hasOwnProperty(property) && object[property] === value) { + // Add the object to the array of matching objects. + matching_obj_li.push(object); + } + } - // Return the array of matching objects. - if (log_lvl > 1) { - console.log('Matching Object List:', matching_obj_li); - } - return matching_obj_li; -} \ No newline at end of file + // Return the array of matching objects. + if (log_lvl > 1) { + console.log('Matching Object List:', matching_obj_li); + } + return matching_obj_li; +}; diff --git a/src/lib/ae_utils/ae_utils__is_datetime_recent.ts b/src/lib/ae_utils/ae_utils__is_datetime_recent.ts index fd1c0b6e..fa690db9 100644 --- a/src/lib/ae_utils/ae_utils__is_datetime_recent.ts +++ b/src/lib/ae_utils/ae_utils__is_datetime_recent.ts @@ -1,27 +1,26 @@ // Function to check if the file (or anything) timestamp was created within the last X minutes -export let is_datetime_recent = function is_datetime_recent( - { - datetime, - minutes, - log_lvl = 0 - }: { - datetime: string, - minutes: number, - log_lvl?: number - }) { - if (log_lvl) { - console.log(`*** is_datetime_recent() *** datetime=${datetime} minutes=${minutes}`); - } +export const is_datetime_recent = function is_datetime_recent({ + datetime, + minutes, + log_lvl = 0 +}: { + datetime: string; + minutes: number; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** is_datetime_recent() *** datetime=${datetime} minutes=${minutes}`); + } - let now: any = new Date(); - let then: any = new Date(datetime); + const now: any = new Date(); + const then: any = new Date(datetime); - let diff = now - then; - let diff_minutes = Math.floor(diff / 60000); + const diff = now - then; + const diff_minutes = Math.floor(diff / 60000); - if (diff_minutes < minutes) { - return true; - } else { - return false; - } -} \ No newline at end of file + if (diff_minutes < minutes) { + return true; + } else { + return false; + } +}; diff --git a/src/lib/ae_utils/ae_utils__perm_checks.ts b/src/lib/ae_utils/ae_utils__perm_checks.ts index 36f64d21..091da69f 100644 --- a/src/lib/ae_utils/ae_utils__perm_checks.ts +++ b/src/lib/ae_utils/ae_utils__perm_checks.ts @@ -1,199 +1,199 @@ type key_val = { - [key: string]: any; + [key: string]: any; }; // NOTE: I know there is a better more efficient way to do this, but I don't have time for that right now. -export let process_permission_checks = function process_permission_checks(access_type: string) { - // let access_checks = { 'access_type': null, 'super_check': null }; - let access_checks: key_val = {}; +export const process_permission_checks = function process_permission_checks(access_type: string) { + // let access_checks = { 'access_type': null, 'super_check': null }; + const access_checks: key_val = {}; - if (access_type == 'super') { - access_checks.allow_access = true; - access_checks.access_type = 'super'; + if (access_type == 'super') { + access_checks.allow_access = true; + access_checks.access_type = 'super'; - access_checks.super_check = true; - access_checks.manager_check = false; - access_checks.administrator_check = false; - access_checks.support_check = false; - access_checks.assistant_check = false; - access_checks.trusted_check = false; - access_checks.verified_check = false; - access_checks.provisional_check = false; - access_checks.public_check = false; - access_checks.authenticated_check = true; - access_checks.anonymous_check = false; + access_checks.super_check = true; + access_checks.manager_check = false; + access_checks.administrator_check = false; + access_checks.support_check = false; + access_checks.assistant_check = false; + access_checks.trusted_check = false; + access_checks.verified_check = false; + access_checks.provisional_check = false; + access_checks.public_check = false; + access_checks.authenticated_check = true; + access_checks.anonymous_check = false; - access_checks.super_access = true; - access_checks.manager_access = true; - access_checks.administrator_access = true; - access_checks.support_access = true; - access_checks.assistant_access = true; - access_checks.trusted_access = true; - access_checks.verified_access = true; - access_checks.provisional_access = true; - access_checks.public_access = true; - access_checks.authenticated_access = true; - access_checks.anonymous_access = true; - } else if (access_type == 'manager') { - access_checks.allow_access = true; - access_checks.access_type = 'manager'; + access_checks.super_access = true; + access_checks.manager_access = true; + access_checks.administrator_access = true; + access_checks.support_access = true; + access_checks.assistant_access = true; + access_checks.trusted_access = true; + access_checks.verified_access = true; + access_checks.provisional_access = true; + access_checks.public_access = true; + access_checks.authenticated_access = true; + access_checks.anonymous_access = true; + } else if (access_type == 'manager') { + access_checks.allow_access = true; + access_checks.access_type = 'manager'; - access_checks.super_check = false; - access_checks.manager_check = true; - access_checks.administrator_check = false; - access_checks.support_check = false; - access_checks.assistant_check = false; - access_checks.trusted_check = false; - access_checks.verified_check = false; - access_checks.provisional_check = false; - access_checks.public_check = false; - access_checks.authenticated_check = true; - access_checks.anonymous_check = false; + access_checks.super_check = false; + access_checks.manager_check = true; + access_checks.administrator_check = false; + access_checks.support_check = false; + access_checks.assistant_check = false; + access_checks.trusted_check = false; + access_checks.verified_check = false; + access_checks.provisional_check = false; + access_checks.public_check = false; + access_checks.authenticated_check = true; + access_checks.anonymous_check = false; - access_checks.super_access = false; - access_checks.manager_access = true; - access_checks.administrator_access = true; - access_checks.support_access = true; - access_checks.assistant_access = true; - access_checks.trusted_access = true; - access_checks.verified_access = true; - access_checks.provisional_access = true; - access_checks.public_access = true; - access_checks.authenticated_access = true; - access_checks.anonymous_access = true; - } else if (access_type == 'administrator') { - access_checks.allow_access = true; - access_checks.access_type = 'administrator'; + access_checks.super_access = false; + access_checks.manager_access = true; + access_checks.administrator_access = true; + access_checks.support_access = true; + access_checks.assistant_access = true; + access_checks.trusted_access = true; + access_checks.verified_access = true; + access_checks.provisional_access = true; + access_checks.public_access = true; + access_checks.authenticated_access = true; + access_checks.anonymous_access = true; + } else if (access_type == 'administrator') { + access_checks.allow_access = true; + access_checks.access_type = 'administrator'; - access_checks.super_check = false; - access_checks.manager_check = false; - access_checks.administrator_check = true; - access_checks.support_check = false; - access_checks.assistant_check = false; - access_checks.trusted_check = false; - access_checks.verified_check = false; - access_checks.provisional_check = false; - access_checks.public_check = false; - access_checks.authenticated_check = false; - access_checks.anonymous_check = false; + access_checks.super_check = false; + access_checks.manager_check = false; + access_checks.administrator_check = true; + access_checks.support_check = false; + access_checks.assistant_check = false; + access_checks.trusted_check = false; + access_checks.verified_check = false; + access_checks.provisional_check = false; + access_checks.public_check = false; + access_checks.authenticated_check = false; + access_checks.anonymous_check = false; - access_checks.super_access = false; - access_checks.manager_access = false; - access_checks.administrator_access = true; - access_checks.support_access = true; - access_checks.assistant_access = true; - access_checks.trusted_access = true; - access_checks.verified_access = true; - access_checks.provisional_access = true; - access_checks.public_access = true; - access_checks.authenticated_access = true; - access_checks.anonymous_access = true; - } else if (access_type == 'trusted') { - access_checks.allow_access = true; // Should this be true?? -2024-10-03 - access_checks.access_type = 'trusted'; + access_checks.super_access = false; + access_checks.manager_access = false; + access_checks.administrator_access = true; + access_checks.support_access = true; + access_checks.assistant_access = true; + access_checks.trusted_access = true; + access_checks.verified_access = true; + access_checks.provisional_access = true; + access_checks.public_access = true; + access_checks.authenticated_access = true; + access_checks.anonymous_access = true; + } else if (access_type == 'trusted') { + access_checks.allow_access = true; // Should this be true?? -2024-10-03 + access_checks.access_type = 'trusted'; - access_checks.super_check = false; - access_checks.manager_check = false; - access_checks.administrator_check = false; - access_checks.support_check = false; - access_checks.assistant_check = false; - access_checks.trusted_check = true; - access_checks.verified_check = false; - access_checks.provisional_check = false; - access_checks.public_check = false; - access_checks.authenticated_check = true; - access_checks.anonymous_check = false; + access_checks.super_check = false; + access_checks.manager_check = false; + access_checks.administrator_check = false; + access_checks.support_check = false; + access_checks.assistant_check = false; + access_checks.trusted_check = true; + access_checks.verified_check = false; + access_checks.provisional_check = false; + access_checks.public_check = false; + access_checks.authenticated_check = true; + access_checks.anonymous_check = false; - access_checks.super_access = false; - access_checks.manager_access = false; - access_checks.administrator_access = false; - access_checks.support_access = false; - access_checks.assistant_access = false; - access_checks.trusted_access = true; - access_checks.verified_access = true; - access_checks.provisional_access = true; - access_checks.public_access = true; - access_checks.authenticated_access = true; - access_checks.anonymous_access = true; - } else if (access_type == 'public') { - access_checks.access_type = 'public'; + access_checks.super_access = false; + access_checks.manager_access = false; + access_checks.administrator_access = false; + access_checks.support_access = false; + access_checks.assistant_access = false; + access_checks.trusted_access = true; + access_checks.verified_access = true; + access_checks.provisional_access = true; + access_checks.public_access = true; + access_checks.authenticated_access = true; + access_checks.anonymous_access = true; + } else if (access_type == 'public') { + access_checks.access_type = 'public'; - access_checks.super_check = false; - access_checks.manager_check = false; - access_checks.administrator_check = false; - access_checks.support_check = false; - access_checks.assistant_check = false; - access_checks.trusted_check = false; - access_checks.verified_check = false; - access_checks.provisional_check = false; - access_checks.public_check = true; - access_checks.authenticated_check = false; - access_checks.anonymous_check = false; + access_checks.super_check = false; + access_checks.manager_check = false; + access_checks.administrator_check = false; + access_checks.support_check = false; + access_checks.assistant_check = false; + access_checks.trusted_check = false; + access_checks.verified_check = false; + access_checks.provisional_check = false; + access_checks.public_check = true; + access_checks.authenticated_check = false; + access_checks.anonymous_check = false; - access_checks.super_access = false; - access_checks.manager_access = false; - access_checks.administrator_access = false; - access_checks.support_access = false; - access_checks.assistant_access = false; - access_checks.trusted_access = false; - access_checks.verified_access = false; - access_checks.provisional_access = false; - access_checks.public_access = true; - access_checks.authenticated_access = true; - access_checks.anonymous_access = true; - } else if (access_type == 'authenticated') { - access_checks.access_type = 'authenticated'; + access_checks.super_access = false; + access_checks.manager_access = false; + access_checks.administrator_access = false; + access_checks.support_access = false; + access_checks.assistant_access = false; + access_checks.trusted_access = false; + access_checks.verified_access = false; + access_checks.provisional_access = false; + access_checks.public_access = true; + access_checks.authenticated_access = true; + access_checks.anonymous_access = true; + } else if (access_type == 'authenticated') { + access_checks.access_type = 'authenticated'; - access_checks.super_check = false; - access_checks.manager_check = false; - access_checks.administrator_check = false; - access_checks.support_check = false; - access_checks.assistant_check = false; - access_checks.trusted_check = false; - access_checks.verified_check = false; - access_checks.provisional_check = false; - access_checks.public_check = false; - access_checks.authenticated_check = true; - access_checks.anonymous_check = false; + access_checks.super_check = false; + access_checks.manager_check = false; + access_checks.administrator_check = false; + access_checks.support_check = false; + access_checks.assistant_check = false; + access_checks.trusted_check = false; + access_checks.verified_check = false; + access_checks.provisional_check = false; + access_checks.public_check = false; + access_checks.authenticated_check = true; + access_checks.anonymous_check = false; - access_checks.super_access = false; - access_checks.manager_access = false; - access_checks.administrator_access = false; - access_checks.support_access = false; - access_checks.assistant_access = false; - access_checks.trusted_access = false; - access_checks.verified_access = false; - access_checks.provisional_access = false; - access_checks.public_access = false; - access_checks.authenticated_access = true; - access_checks.anonymous_access = true; - } else { - access_checks.access_type = 'anonymous'; + access_checks.super_access = false; + access_checks.manager_access = false; + access_checks.administrator_access = false; + access_checks.support_access = false; + access_checks.assistant_access = false; + access_checks.trusted_access = false; + access_checks.verified_access = false; + access_checks.provisional_access = false; + access_checks.public_access = false; + access_checks.authenticated_access = true; + access_checks.anonymous_access = true; + } else { + access_checks.access_type = 'anonymous'; - access_checks.super_check = false; - access_checks.manager_check = false; - access_checks.administrator_check = false; - access_checks.support_check = false; - access_checks.assistant_check = false; - access_checks.trusted_check = false; - access_checks.verified_check = false; - access_checks.provisional_check = false; - access_checks.public_check = false; - access_checks.authenticated_check = false; - access_checks.anonymous_check = true; + access_checks.super_check = false; + access_checks.manager_check = false; + access_checks.administrator_check = false; + access_checks.support_check = false; + access_checks.assistant_check = false; + access_checks.trusted_check = false; + access_checks.verified_check = false; + access_checks.provisional_check = false; + access_checks.public_check = false; + access_checks.authenticated_check = false; + access_checks.anonymous_check = true; - access_checks.super_access = false; - access_checks.manager_access = false; - access_checks.administrator_access = false; - access_checks.support_access = false; - access_checks.assistant_access = false; - access_checks.trusted_access = false; - access_checks.verified_access = false; - access_checks.provisional_access = false; - access_checks.public_access = false; - access_checks.authenticated_access = false; - access_checks.anonymous_access = true; - } + access_checks.super_access = false; + access_checks.manager_access = false; + access_checks.administrator_access = false; + access_checks.support_access = false; + access_checks.assistant_access = false; + access_checks.trusted_access = false; + access_checks.verified_access = false; + access_checks.provisional_access = false; + access_checks.public_access = false; + access_checks.authenticated_access = false; + access_checks.anonymous_access = true; + } - return access_checks; -} + return access_checks; +}; diff --git a/src/lib/ae_utils/ae_utils__process_data_string.ts b/src/lib/ae_utils/ae_utils__process_data_string.ts index 3851c870..13e0c1dd 100644 --- a/src/lib/ae_utils/ae_utils__process_data_string.ts +++ b/src/lib/ae_utils/ae_utils__process_data_string.ts @@ -1,4 +1,4 @@ -import type { key_val } from "./ae_utils"; +import type { key_val } from './ae_utils'; /* This utility function processes specific data string. * MECARD @@ -14,78 +14,77 @@ import type { key_val } from "./ae_utils"; * gn: Given First Name * fn: Family Last Name * em: Email Address -*/ + */ // Updated 2022-02-11 +export const process_data_string = function process_data_string(data_string: string) { + console.log('*** process_data_string() ***'); + // console.log(data_string); + if (!data_string || data_string.length < 1) { + console.log('No data string found.'); + return false; + } -export let process_data_string = function process_data_string(data_string: string) { - console.log('*** process_data_string() ***'); - // console.log(data_string); - if (!data_string || data_string.length < 1) { - console.log('No data string found.'); - return false; - } + const obj: key_val = {}; - let obj: key_val = {}; + const colon_index = data_string.indexOf(':'); + if (colon_index) { + const data_string_type = data_string.slice(0, colon_index); + console.log(data_string_type); - let colon_index = data_string.indexOf(':'); - if (colon_index) { - let data_string_type = data_string.slice(0, colon_index); - console.log(data_string_type); + obj['qr_type'] = data_string_type; - obj['qr_type'] = data_string_type; + if (data_string_type == 'MECARD') { + const mecard_str = data_string.slice(colon_index + 1); + console.log(mecard_str); - if (data_string_type == 'MECARD') { - let mecard_str = data_string.slice(colon_index + 1); - console.log(mecard_str); + obj['str'] = mecard_str; + } else if (data_string_type == 'OBJ') { + const key_value_str = data_string.slice(colon_index + 1); + console.log(key_value_str); + const key_value_array = key_value_str.split(','); + // console.log(key_value_array); + const ot_colon_index = key_value_array[0].indexOf(':'); + const obj_type = key_value_array[0].slice(ot_colon_index + 1); + // console.log(obj_type); + const oi_colon_index = key_value_array[1].indexOf(':'); + const obj_id = key_value_array[1].slice(oi_colon_index + 1); + // console.log(obj_id); + obj['type'] = obj_type; + obj['id'] = obj_id; + } else if (data_string_type == 'JSON') { + const partial_json_str = data_string.slice(colon_index + 1); + console.log(partial_json_str); + const json_str = `{${partial_json_str}}`; + console.log(json_str); - obj['str'] = mecard_str; - } else if (data_string_type == 'OBJ') { - let key_value_str = data_string.slice(colon_index + 1); - console.log(key_value_str); - let key_value_array = key_value_str.split(','); - // console.log(key_value_array); - let ot_colon_index = key_value_array[0].indexOf(':'); - let obj_type = key_value_array[0].slice(ot_colon_index + 1); - // console.log(obj_type); - let oi_colon_index = key_value_array[1].indexOf(':'); - let obj_id = key_value_array[1].slice(oi_colon_index + 1); - // console.log(obj_id); - obj['type'] = obj_type; - obj['id'] = obj_id; - } else if (data_string_type == 'JSON') { - let partial_json_str = data_string.slice(colon_index + 1); - console.log(partial_json_str); - let json_str = `{${partial_json_str}}`; - console.log(json_str); + obj['json'] = JSON.parse(json_str); + } else if (data_string_type == 'STR') { + const str = data_string.slice(colon_index + 1); + console.log(str); - obj['json'] = JSON.parse(json_str); - } else if (data_string_type == 'STR') { - let str = data_string.slice(colon_index + 1); - console.log(str); + obj['str'] = str; + } else if (data_string_type == 'http' || data_string_type == 'https') { + console.log(`http or https: ${data_string}`); - obj['str'] = str; - } else if (data_string_type == 'http' || data_string_type == 'https') { - console.log(`http or https: ${data_string}`); + obj['type'] = 'url'; + obj['url'] = data_string; + } else { + console.log('The unknown data string type was found. Returning the string part.'); + const unknown_str = data_string.slice(colon_index + 1); + console.log(unknown_str); - obj['type'] = 'url'; - obj['url'] = data_string; - } else { - console.log('The unknown data string type was found. Returning the string part.'); - let unknown_str = data_string.slice(colon_index + 1); - console.log(unknown_str); + obj['str'] = unknown_str; + } + } else { + console.log('The data string type was not found. Returning the entire string.'); + console.log(data_string); - obj['str'] = unknown_str; - } - } else { - console.log('The data string type was not found. Returning the entire string.'); - console.log(data_string); + obj['qr_type'] = 'UNKNOWN'; + obj['str'] = data_string; + // return false; + } - obj['qr_type'] = 'UNKNOWN'; - obj['str'] = data_string; - // return false; - } - - console.log(obj); - return obj; // Returns an object + console.log(obj); + return obj; // Returns an object }; diff --git a/src/lib/ae_utils/ae_utils__return_obj_type_path.ts b/src/lib/ae_utils/ae_utils__return_obj_type_path.ts index 6eccdb6e..ef857cf0 100644 --- a/src/lib/ae_utils/ae_utils__return_obj_type_path.ts +++ b/src/lib/ae_utils/ae_utils__return_obj_type_path.ts @@ -1,66 +1,87 @@ export function return_obj_type_path({ obj_type = null, obj_type_prop_name = null }) { - console.log('*** return_obj_type_path() ***'); + console.log('*** return_obj_type_path() ***'); - let obj_type_path = null; + let obj_type_path = null; - let known_obj_type_li = ['account', 'address', 'archive', 'archive_content', 'contact', 'event_badge', 'event_exhibit', 'event_file', 'event_location', 'event_person', 'event_presentation', 'event_presenter', 'event_registration', 'event_session', 'event', 'hosted_file', 'order_line', 'order', 'person', 'post', 'post_comment', 'user']; + const known_obj_type_li = [ + 'account', + 'address', + 'archive', + 'archive_content', + 'contact', + 'event_badge', + 'event_exhibit', + 'event_file', + 'event_location', + 'event_person', + 'event_presentation', + 'event_presenter', + 'event_registration', + 'event_session', + 'event', + 'hosted_file', + 'order_line', + 'order', + 'person', + 'post', + 'post_comment', + 'user' + ]; - let known_obj_type_li_dict = [ - { name: 'account', display: 'Account', path: 'account' }, - { name: 'archive', display: 'Archive', path: 'archive' }, - { name: 'address', display: 'Address', path: 'address' }, - { name: 'archive', display: 'Archive', path: 'archive' }, - { name: 'archive_content', display: 'Archive Content', path: 'archive/content' }, - { name: 'contact', display: 'Contact', path: 'contact' }, - { name: 'data_store', display: 'Data Store', path: 'data_store' }, - { name: 'event_abstract', display: 'Event Abstract', path: 'event/abstract' }, - { name: 'event_badge', display: 'Event Badge', path: 'event/badge' }, - { name: 'event_device', display: 'Event Device', path: 'event/device' }, - { name: 'event_exhibit', display: 'Event Exhibit', path: 'event/exhibit' }, - { name: 'event_file', display: 'Event File', path: 'event/file' }, - { name: 'event_location', display: 'Event Location', path: 'event/location' }, - { name: 'event_person', display: 'Event Person', path: 'event/person' }, - { name: 'event_presentation', display: 'Event Presentation', path: 'event/' }, - { name: 'event_presenter', display: 'Event Presenter', path: 'event/presenter' }, - { name: 'event_registration', display: 'Event Registration', path: 'event/registration' }, - { name: 'event_session', display: 'Event Session', path: 'event/session' }, - { name: 'event', display: 'Event', path: 'event' }, - { name: 'hosted_file', display: 'Hosted File', path: 'hosted_file' }, - { name: 'journal', display: 'Journal', path: 'journal' }, - { name: 'journal_entry', display: 'Journal Entry', path: 'journal/entry' }, - { name: 'order_line', display: 'Order Line', path: 'order/line' }, - { name: 'order', display: 'Order', path: 'order' }, - { name: 'person', display: 'Person', path: 'person' }, - { name: 'post', display: 'Archive', path: 'post' }, - { name: 'post_comment', display: 'Archive Content', path: 'post/comment' }, - { name: 'user', display: 'User', path: 'user' }, - ]; + const known_obj_type_li_dict = [ + { name: 'account', display: 'Account', path: 'account' }, + { name: 'archive', display: 'Archive', path: 'archive' }, + { name: 'address', display: 'Address', path: 'address' }, + { name: 'archive', display: 'Archive', path: 'archive' }, + { name: 'archive_content', display: 'Archive Content', path: 'archive/content' }, + { name: 'contact', display: 'Contact', path: 'contact' }, + { name: 'data_store', display: 'Data Store', path: 'data_store' }, + { name: 'event_abstract', display: 'Event Abstract', path: 'event/abstract' }, + { name: 'event_badge', display: 'Event Badge', path: 'event/badge' }, + { name: 'event_device', display: 'Event Device', path: 'event/device' }, + { name: 'event_exhibit', display: 'Event Exhibit', path: 'event/exhibit' }, + { name: 'event_file', display: 'Event File', path: 'event/file' }, + { name: 'event_location', display: 'Event Location', path: 'event/location' }, + { name: 'event_person', display: 'Event Person', path: 'event/person' }, + { name: 'event_presentation', display: 'Event Presentation', path: 'event/' }, + { name: 'event_presenter', display: 'Event Presenter', path: 'event/presenter' }, + { name: 'event_registration', display: 'Event Registration', path: 'event/registration' }, + { name: 'event_session', display: 'Event Session', path: 'event/session' }, + { name: 'event', display: 'Event', path: 'event' }, + { name: 'hosted_file', display: 'Hosted File', path: 'hosted_file' }, + { name: 'journal', display: 'Journal', path: 'journal' }, + { name: 'journal_entry', display: 'Journal Entry', path: 'journal/entry' }, + { name: 'order_line', display: 'Order Line', path: 'order/line' }, + { name: 'order', display: 'Order', path: 'order' }, + { name: 'person', display: 'Person', path: 'person' }, + { name: 'post', display: 'Archive', path: 'post' }, + { name: 'post_comment', display: 'Archive Content', path: 'post/comment' }, + { name: 'user', display: 'User', path: 'user' } + ]; - if (obj_type) { - // Need to loop through known for safety? - obj_type_path = obj_type_prop_name.replaceAll('_', '/'); + if (obj_type) { + // Need to loop through known for safety? + obj_type_path = obj_type_prop_name.replaceAll('_', '/'); + } else if (obj_type_prop_name) { + let found_obj_type_name = null; + let found_obj_type_path = null; - } else if (obj_type_prop_name) { - let found_obj_type_name = null; - let found_obj_type_path = null; + for (let i = 0; i < known_obj_type_li_dict.length; i++) { + // console.log(known_obj_type_li_dict[i]); + // let guessed_obj_type = prop_name.startsWith(known_obj_type_li_dict[i] + if (obj_type_prop_name.startsWith(known_obj_type_li_dict[i].name)) { + console.log(`Found ${known_obj_type_li_dict[i].name}`); + found_obj_type_name = known_obj_type_li_dict[i].name; + found_obj_type_path = known_obj_type_li_dict[i].path; + // obj_type_path = obj_type_prop_name.replaceAll('_', '/'); + obj_type_path = found_obj_type_path; + break; + } + } + } else { + console.log('Missing required parameters'); + return false; + } - for (let i = 0; i < known_obj_type_li_dict.length; i++) { - // console.log(known_obj_type_li_dict[i]); - // let guessed_obj_type = prop_name.startsWith(known_obj_type_li_dict[i] - if (obj_type_prop_name.startsWith(known_obj_type_li_dict[i].name)) { - console.log(`Found ${known_obj_type_li_dict[i].name}`); - found_obj_type_name = known_obj_type_li_dict[i].name; - found_obj_type_path = known_obj_type_li_dict[i].path; - // obj_type_path = obj_type_prop_name.replaceAll('_', '/'); - obj_type_path = found_obj_type_path; - break; - } - } - - } else { - console.log('Missing required parameters'); - return false; - } - - return obj_type_path; + return obj_type_path; } diff --git a/src/lib/ae_utils/ae_utils__set_obj_prop_display_name.ts b/src/lib/ae_utils/ae_utils__set_obj_prop_display_name.ts index 9ae18ef0..ebb4475c 100644 --- a/src/lib/ae_utils/ae_utils__set_obj_prop_display_name.ts +++ b/src/lib/ae_utils/ae_utils__set_obj_prop_display_name.ts @@ -1,98 +1,124 @@ -import { to_title_case } from "./ae_utils__to_title_case"; +import { to_title_case } from './ae_utils__to_title_case'; // Updated 2023-08-18 -export function set_obj_prop_display_name({ prop_name, obj_type = null, prefix_w_obj_type = true, prefix_all_w_obj_type = false, replace_underscores = true, title_case = true, override = null }) { - console.log('*** set_obj_prop_display_name() ***'); +export function set_obj_prop_display_name({ + prop_name, + obj_type = null, + prefix_w_obj_type = true, + prefix_all_w_obj_type = false, + replace_underscores = true, + title_case = true, + override = null +}) { + console.log('*** set_obj_prop_display_name() ***'); - if (override) { - return override; - } + if (override) { + return override; + } - let known_obj_type_li = ['account', 'address', 'contact', 'event_badge', 'event_exhibit', 'event_file', 'event_location', 'event_person', 'event_presentation', 'event_presenter', 'event_registration', 'event_session', 'event', 'hosted_file', 'order_line', 'order', 'person', 'user']; + const known_obj_type_li = [ + 'account', + 'address', + 'contact', + 'event_badge', + 'event_exhibit', + 'event_file', + 'event_location', + 'event_person', + 'event_presentation', + 'event_presenter', + 'event_registration', + 'event_session', + 'event', + 'hosted_file', + 'order_line', + 'order', + 'person', + 'user' + ]; + const known_obj_type_li_dict = [ + { name: 'account', display: 'Account' }, + { name: 'address', display: 'Address' }, + { name: 'contact', display: 'Contact' }, + { name: 'event_badge', display: 'Event Badge' }, + { name: 'event_exhibit', display: 'Event Exhibit' }, + { name: 'event_file', display: 'Event File' }, + { name: 'event_location', display: 'Event Location' }, + { name: 'event_person', display: 'Event Person' }, + { name: 'event_presentation', display: 'Event Presentation' }, + { name: 'event_presenter', display: 'Event Presenter' }, + { name: 'event_registration', display: 'Event Registration' }, + { name: 'event_session', display: 'Event Session' }, + { name: 'event', display: 'Event' }, + { name: 'hosted_file', display: 'Hosted File' }, + { name: 'order_line', display: 'Order Line' }, + { name: 'order', display: 'Order' }, + { name: 'person', display: 'Person' }, + { name: 'user', display: 'User' } + ]; - let known_obj_type_li_dict = [ - { name: 'account', display: 'Account' }, - { name: 'address', display: 'Address' }, - { name: 'contact', display: 'Contact' }, - { name: 'event_badge', display: 'Event Badge' }, - { name: 'event_exhibit', display: 'Event Exhibit' }, - { name: 'event_file', display: 'Event File' }, - { name: 'event_location', display: 'Event Location' }, - { name: 'event_person', display: 'Event Person' }, - { name: 'event_presentation', display: 'Event Presentation' }, - { name: 'event_presenter', display: 'Event Presenter' }, - { name: 'event_registration', display: 'Event Registration' }, - { name: 'event_session', display: 'Event Session' }, - { name: 'event', display: 'Event' }, - { name: 'hosted_file', display: 'Hosted File' }, - { name: 'order_line', display: 'Order Line' }, - { name: 'order', display: 'Order' }, - { name: 'person', display: 'Person' }, - { name: 'user', display: 'User' }, - ]; + let prop_display_name = prop_name; - let prop_display_name = prop_name; + if (!prefix_w_obj_type) { + if (obj_type) { + prop_display_name = prop_name.replace(obj_type, ''); + } else { + for (let i = 0; i < known_obj_type_li_dict.length; i++) { + // console.log(known_obj_type_li_dict[i]); + if (prop_name.startsWith(known_obj_type_li_dict[i].name)) { + // console.log(`Found ${known_obj_type_li_dict[i].name}`); + prop_display_name = prop_name.replace(known_obj_type_li_dict[i].name, ''); + break; + } + } - if (!prefix_w_obj_type) { - if (obj_type) { - prop_display_name = prop_name.replace(obj_type, ''); - } else { - for (let i = 0; i < known_obj_type_li_dict.length; i++) { - // console.log(known_obj_type_li_dict[i]); - if (prop_name.startsWith(known_obj_type_li_dict[i].name)) { - // console.log(`Found ${known_obj_type_li_dict[i].name}`); - prop_display_name = prop_name.replace(known_obj_type_li_dict[i].name, ''); - break; - } - } + // for (let i = 0; i < known_obj_type_li.length; i++) { + // // console.log(known_obj_type_li[i]); + // if (prop_name.startsWith(known_obj_type_li[i])) { + // console.log(`Found ${known_obj_type_li[i]}`); + // prop_display_name = prop_name.replace(known_obj_type_li[i], ''); + // break; + // } + // } + } + } else { + if (!prefix_all_w_obj_type) { + for (let i = 0; i < known_obj_type_li.length; i++) { + // console.log(known_obj_type_li[i]); + let found_obj_type = null; - // for (let i = 0; i < known_obj_type_li.length; i++) { - // // console.log(known_obj_type_li[i]); - // if (prop_name.startsWith(known_obj_type_li[i])) { - // console.log(`Found ${known_obj_type_li[i]}`); - // prop_display_name = prop_name.replace(known_obj_type_li[i], ''); - // break; - // } - // } - } - } else { - if (!prefix_all_w_obj_type) { - for (let i = 0; i < known_obj_type_li.length; i++) { - // console.log(known_obj_type_li[i]); - let found_obj_type = null; + if (prop_name.startsWith(known_obj_type_li_dict[i].name)) { + // if (prop_name.startsWith(known_obj_type_li[i])) { + // console.log(`Found ${known_obj_type_li_dict[i].name}`); + found_obj_type = known_obj_type_li_dict[i].name; + if (found_obj_type == obj_type) { + prop_display_name = prop_name.replace(known_obj_type_li_dict[i].name, ''); + } - if (prop_name.startsWith(known_obj_type_li_dict[i].name)) { - // if (prop_name.startsWith(known_obj_type_li[i])) { - // console.log(`Found ${known_obj_type_li_dict[i].name}`); - found_obj_type = known_obj_type_li_dict[i].name; - if (found_obj_type == obj_type) { - prop_display_name = prop_name.replace(known_obj_type_li_dict[i].name, ''); - } + break; + } + } - break; - } - } + // if (obj_type) { + // prop_display_name = prop_name.replace(obj_type, ''); + // } else { + } + } - // if (obj_type) { - // prop_display_name = prop_name.replace(obj_type, ''); - // } else { - } - } + // console.log(prop_display_name); + if (prop_display_name.search('ID')) { + } + prop_display_name = prop_display_name.replace('id_random', 'ID'); - // console.log(prop_display_name); - if (prop_display_name.search('ID')) { - } - prop_display_name = prop_display_name.replace('id_random', 'ID'); + if (replace_underscores) { + prop_display_name = prop_display_name.replaceAll('_', ' '); + } - if (replace_underscores) { - prop_display_name = prop_display_name.replaceAll('_', ' '); - } + if (title_case) { + prop_display_name = to_title_case(prop_display_name); + } - if (title_case) { - prop_display_name = to_title_case(prop_display_name); - } - - // console.log(prop_display_name); - return prop_display_name; + // console.log(prop_display_name); + return prop_display_name; } diff --git a/src/lib/ae_utils/ae_utils__to_title_case.ts b/src/lib/ae_utils/ae_utils__to_title_case.ts index bda2f18e..76b632a4 100644 --- a/src/lib/ae_utils/ae_utils__to_title_case.ts +++ b/src/lib/ae_utils/ae_utils__to_title_case.ts @@ -1,42 +1,43 @@ /* Adapted from: To Title Case © 2018 David Gouch | https://github.com/gouch/to-title-case */ -// eslint-disable-next-line no-extend-native + export function to_title_case(text_string) { - // console.log('*** to_title_case() ***'); - let smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|v.?|vs.?|via)$/i; - let alphanumericPattern = /([A-Za-z0-9\u00C0-\u00FF])/; - let wordSeparators = /([ :–—-])/; + // console.log('*** to_title_case() ***'); + const smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|v.?|vs.?|via)$/i; + const alphanumericPattern = /([A-Za-z0-9\u00C0-\u00FF])/; + const wordSeparators = /([ :–—-])/; - return text_string.split(wordSeparators) - .map(function (current, index, array) { - if ( - /* Check for small words */ - current.search(smallWords) > -1 && - /* Skip first and last word */ - index !== 0 && - index !== array.length - 1 && - /* Ignore title end and subtitle start */ - array[index - 3] !== ':' && - array[index + 1] !== ':' && - /* Ignore small words that start a hyphenated phrase */ - (array[index + 1] !== '-' || - (array[index - 1] === '-' && array[index + 1] === '-'))) { - return current.toLowerCase(); - } + return text_string + .split(wordSeparators) + .map(function (current, index, array) { + if ( + /* Check for small words */ + current.search(smallWords) > -1 && + /* Skip first and last word */ + index !== 0 && + index !== array.length - 1 && + /* Ignore title end and subtitle start */ + array[index - 3] !== ':' && + array[index + 1] !== ':' && + /* Ignore small words that start a hyphenated phrase */ + (array[index + 1] !== '-' || (array[index - 1] === '-' && array[index + 1] === '-')) + ) { + return current.toLowerCase(); + } - /* Ignore intentional capitalization */ - if (current.substr(1).search(/[A-Z]|\../) > -1) { - return current; - } + /* Ignore intentional capitalization */ + if (current.substr(1).search(/[A-Z]|\../) > -1) { + return current; + } - /* Ignore URLs */ - if (array[index + 1] === ':' && array[index + 2] !== '') { - return current; - } + /* Ignore URLs */ + if (array[index + 1] === ':' && array[index + 2] !== '') { + return current; + } - /* Capitalize the first letter */ - return current.replace(alphanumericPattern, function (match) { - return match.toUpperCase(); - }); - }) - .join(''); + /* Capitalize the first letter */ + return current.replace(alphanumericPattern, function (match) { + return match.toUpperCase(); + }); + }) + .join(''); } diff --git a/src/lib/api/api.ts b/src/lib/api/api.ts index f558b184..14e128d5 100644 --- a/src/lib/api/api.ts +++ b/src/lib/api/api.ts @@ -4,912 +4,925 @@ import type { key_val } from '$lib/stores/ae_stores'; - import { delete_object } from '$lib/ae_api/api_delete_object'; // Exported at the end of this file import { get_object } from '$lib/ae_api/api_get_object'; // Exported at the end of this file import { patch_object } from '$lib/ae_api/api_patch_object'; // Exported at the end of this file import { post_object } from '$lib/ae_api/api_post_object'; // Exported at the end of this file - import { get_ae_obj_id_crud } from '$lib/ae_api/api_get__crud_obj_id'; import { get_ae_obj_li_for_obj_id_crud } from '$lib/ae_api/api_get__crud_obj_li_v1'; import { get_ae_obj_li_for_obj_id_crud_v2 } from '$lib/ae_api/api_get__crud_obj_li_v2'; - // This new function has not been tested yet!!! // Updated 2024-08-07 -export let get_ae_obj_li_for_lu = async function get_ae_obj_li_for_lu( - { - api_cfg, - // obj_type, - for_lu_type, - // for_obj_id=null, - // use_alt_table=false, - // use_alt_base=false, - // inc={}, - enabled='enabled', - hidden='not_hidden', - order_by_li=null, - limit=999999, - offset=0, - // key, - // jwt=null, - headers={}, - params_json=null, - // json_obj=null, - params={}, - return_meta=false, - log_lvl=1 - }: { - api_cfg: any, - // obj_type: string, - for_lu_type: string, - // for_lu_id?: string, - // use_alt_table?: boolean, - // use_alt_base?: boolean, - // inc?: key_val - enabled?: "enabled" | "all" | "not_enabled" | undefined, - hidden?: "hidden" | "all" | "not_hidden" | undefined, - order_by_li?: any, - limit?: number, - offset?: number, - // key: string, - // jwt?: string, - headers?: any, - params_json?: any, - // json_obj?: any, - params?: key_val, - return_meta?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** get_ae_obj_li_for_lu() *** for_lu_type=${for_lu_type}`); - } +export const get_ae_obj_li_for_lu = async function get_ae_obj_li_for_lu({ + api_cfg, + // obj_type, + for_lu_type, + // for_obj_id=null, + // use_alt_table=false, + // use_alt_base=false, + // inc={}, + enabled = 'enabled', + hidden = 'not_hidden', + order_by_li = null, + limit = 999999, + offset = 0, + // key, + // jwt=null, + headers = {}, + params_json = null, + // json_obj=null, + params = {}, + return_meta = false, + log_lvl = 1 +}: { + api_cfg: any; + // obj_type: string, + for_lu_type: string; + // for_lu_id?: string, + // use_alt_table?: boolean, + // use_alt_base?: boolean, + // inc?: key_val + enabled?: 'enabled' | 'all' | 'not_enabled' | undefined; + hidden?: 'hidden' | 'all' | 'not_hidden' | undefined; + order_by_li?: any; + limit?: number; + offset?: number; + // key: string, + // jwt?: string, + headers?: any; + params_json?: any; + // json_obj?: any, + params?: key_val; + return_meta?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** get_ae_obj_li_for_lu() *** for_lu_type=${for_lu_type}`); + } - let endpoint = ''; - if (for_lu_type == 'country_subdivision') { - endpoint = `/crud/lu/country_subdivision/list`; - } else if (for_lu_type == 'country') { - endpoint = `/crud/lu/country/list`; - } else if (for_lu_type == 'time_zone') { - endpoint = `/crud/lu/time_zone/list`; - } else { - console.log(`Unknown object type: ${for_lu_type}`); - return false; - } - if (log_lvl) { - console.log('Endpoint:', endpoint); - } + let endpoint = ''; + if (for_lu_type == 'country_subdivision') { + endpoint = `/crud/lu/country_subdivision/list`; + } else if (for_lu_type == 'country') { + endpoint = `/crud/lu/country/list`; + } else if (for_lu_type == 'time_zone') { + endpoint = `/crud/lu/time_zone/list`; + } else { + console.log(`Unknown object type: ${for_lu_type}`); + return false; + } + if (log_lvl) { + console.log('Endpoint:', endpoint); + } - if (order_by_li) { - headers['order_by_li'] = order_by_li; - } + if (order_by_li) { + headers['order_by_li'] = order_by_li; + } - let allowed_enabled_list = ['all', 'enabled', 'not_enabled'] - if (allowed_enabled_list.includes(enabled) ) { - params['enabled'] = enabled; - } + const allowed_enabled_list = ['all', 'enabled', 'not_enabled']; + if (allowed_enabled_list.includes(enabled)) { + params['enabled'] = enabled; + } - let allowed_hidden_list = ['all', 'hidden', 'not_hidden']; - if (allowed_hidden_list.includes(hidden) ) { - params['hidden'] = hidden; - } + const allowed_hidden_list = ['all', 'hidden', 'not_hidden']; + if (allowed_hidden_list.includes(hidden)) { + params['hidden'] = hidden; + } - if (limit >= 0) { - params['limit'] = limit; - } + if (limit >= 0) { + params['limit'] = limit; + } - if (offset >= 0) { - params['offset'] = offset; - } + if (offset >= 0) { + params['offset'] = offset; + } - let object_li_get_promise = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - headers: headers, - params: params, - // return_meta: return_meta, - log_lvl: log_lvl - }); + const object_li_get_promise = await api.get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + headers: headers, + params: params, + // return_meta: return_meta, + log_lvl: log_lvl + }); - if (log_lvl > 1) { - console.log(object_li_get_promise); - } - - return object_li_get_promise; -} + if (log_lvl > 1) { + console.log(object_li_get_promise); + } + return object_li_get_promise; +}; // Updated 2023-07-24 -export let create_ae_obj_crud = async function create_ae_obj_crud( - { - api_cfg, - obj_type, - field_name = null, - field_value = null, - fields = {}, - key, - jwt = null, - headers = {}, - params = {}, - data = {}, - return_obj = false, - obj_v_name = '', - return_meta = false, - log_lvl = 0 - } : { - api_cfg: any, - obj_type: string, - field_name?: null|string, - field_value?: any, - fields?: key_val, - key: string, - jwt?: null|string, - headers?: key_val, - params?: key_val, - data?: key_val, - return_obj?: boolean, - obj_v_name?: string, - return_meta?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** create_ae_obj_crud() *** obj_type=${obj_type}`); - } +export const create_ae_obj_crud = async function create_ae_obj_crud({ + api_cfg, + obj_type, + field_name = null, + field_value = null, + fields = {}, + key, + jwt = null, + headers = {}, + params = {}, + data = {}, + return_obj = false, + obj_v_name = '', + return_meta = false, + log_lvl = 0 +}: { + api_cfg: any; + obj_type: string; + field_name?: null | string; + field_value?: any; + fields?: key_val; + key: string; + jwt?: null | string; + headers?: key_val; + params?: key_val; + data?: key_val; + return_obj?: boolean; + obj_v_name?: string; + return_meta?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** create_ae_obj_crud() *** obj_type=${obj_type}`); + } - data['super_key'] = key; - data['jwt'] = jwt; - // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST + data['super_key'] = key; + data['jwt'] = jwt; + // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST - // This obj_v_name is the view name to use when returning data. Do not prefix it with v_. This is checked and done automatically by the API. - // This is not currently being exposed to other areas of the code. It is only used here. For now? - if (obj_v_name) { - obj_v_name = ''; - } + // This obj_v_name is the view name to use when returning data. Do not prefix it with v_. This is checked and done automatically by the API. + // This is not currently being exposed to other areas of the code. It is only used here. For now? + if (obj_v_name) { + obj_v_name = ''; + } - let endpoint = ''; - if (obj_type == 'account') { - endpoint = `/crud/account`; - } else if (obj_type == 'activity_log') { - endpoint = `/crud/activity_log`; - } else if (obj_type == 'address') { - endpoint = `/crud/address`; - } else if (obj_type == 'archive') { - endpoint = `/crud/archive`; - } else if (obj_type == 'archive_content') { - endpoint = `/crud/archive/content`; - } else if (obj_type == 'contact') { - endpoint = `/crud/contact`; - } else if (obj_type == 'data_store') { - endpoint = `/crud/data_store`; - } else if (obj_type == 'event') { - endpoint = `/crud/event`; - } else if (obj_type == 'event_abstract') { - endpoint = `/crud/event/abstract`; - } else if (obj_type == 'event_badge') { - endpoint = `/crud/event/badge`; - } else if (obj_type == 'event_device') { - endpoint = `/crud/event/device`; - } else if (obj_type == 'event_exhibit') { - endpoint = `/crud/event/exhibit`; - } else if (obj_type == 'event_exhibit_tracking') { - endpoint = `/crud/event/exhibit/tracking`; - } else if (obj_type == 'event_file') { - endpoint = `/crud/event/file`; - } else if (obj_type == 'event_location') { - endpoint = `/crud/event/location`; - } else if (obj_type == 'event_person') { - endpoint = `/crud/event/person`; - } else if (obj_type == 'event_presentation') { - endpoint = `/crud/event/presentation`; - } else if (obj_type == 'event_presenter') { - endpoint = `/crud/event/presenter`; - // obj_v_name = 'event_presenter_soft_links'; - } else if (obj_type == 'event_session') { - endpoint = `/crud/event/session`; - } else if (obj_type == 'event_track') { - endpoint = `/crud/event/track`; - } else if (obj_type == 'grant') { - endpoint = `/crud/grant`; - } else if (obj_type == 'hosted_file') { - endpoint = `/crud/hosted_file`; - } else if (obj_type == 'journal') { - endpoint = `/crud/journal`; - } else if (obj_type == 'journal_entry') { - endpoint = `/crud/journal/entry`; - } else if (obj_type == 'order') { - endpoint = `/crud/order`; - } else if (obj_type == 'order_line') { - endpoint = `/crud/order/line`; - } else if (obj_type == 'page') { - endpoint = `/crud/page`; - } else if (obj_type == 'person') { - endpoint = `/crud/person`; - } else if (obj_type == 'post') { - endpoint = `/crud/post`; - } else if (obj_type == 'post_comment') { - endpoint = `/crud/post/comment`; - } else if (obj_type == 'sponsorship_cfg') { - endpoint = `/crud/sponsorship/cfg`; - } else if (obj_type == 'sponsorship') { - endpoint = `/crud/sponsorship`; - } else if (obj_type == 'site') { - endpoint = `/crud/site`; - // } else if (obj_type == 'user') { - // endpoint = `/crud/user`; - } else { - console.log(`Unknown object type: ${obj_type}`); - return false; - } - if (log_lvl) { - console.log('Endpoint:', endpoint); - } + let endpoint = ''; + if (obj_type == 'account') { + endpoint = `/crud/account`; + } else if (obj_type == 'activity_log') { + endpoint = `/crud/activity_log`; + } else if (obj_type == 'address') { + endpoint = `/crud/address`; + } else if (obj_type == 'archive') { + endpoint = `/crud/archive`; + } else if (obj_type == 'archive_content') { + endpoint = `/crud/archive/content`; + } else if (obj_type == 'contact') { + endpoint = `/crud/contact`; + } else if (obj_type == 'data_store') { + endpoint = `/crud/data_store`; + } else if (obj_type == 'event') { + endpoint = `/crud/event`; + } else if (obj_type == 'event_abstract') { + endpoint = `/crud/event/abstract`; + } else if (obj_type == 'event_badge') { + endpoint = `/crud/event/badge`; + } else if (obj_type == 'event_device') { + endpoint = `/crud/event/device`; + } else if (obj_type == 'event_exhibit') { + endpoint = `/crud/event/exhibit`; + } else if (obj_type == 'event_exhibit_tracking') { + endpoint = `/crud/event/exhibit/tracking`; + } else if (obj_type == 'event_file') { + endpoint = `/crud/event/file`; + } else if (obj_type == 'event_location') { + endpoint = `/crud/event/location`; + } else if (obj_type == 'event_person') { + endpoint = `/crud/event/person`; + } else if (obj_type == 'event_presentation') { + endpoint = `/crud/event/presentation`; + } else if (obj_type == 'event_presenter') { + endpoint = `/crud/event/presenter`; + // obj_v_name = 'event_presenter_soft_links'; + } else if (obj_type == 'event_session') { + endpoint = `/crud/event/session`; + } else if (obj_type == 'event_track') { + endpoint = `/crud/event/track`; + } else if (obj_type == 'grant') { + endpoint = `/crud/grant`; + } else if (obj_type == 'hosted_file') { + endpoint = `/crud/hosted_file`; + } else if (obj_type == 'journal') { + endpoint = `/crud/journal`; + } else if (obj_type == 'journal_entry') { + endpoint = `/crud/journal/entry`; + } else if (obj_type == 'order') { + endpoint = `/crud/order`; + } else if (obj_type == 'order_line') { + endpoint = `/crud/order/line`; + } else if (obj_type == 'page') { + endpoint = `/crud/page`; + } else if (obj_type == 'person') { + endpoint = `/crud/person`; + } else if (obj_type == 'post') { + endpoint = `/crud/post`; + } else if (obj_type == 'post_comment') { + endpoint = `/crud/post/comment`; + } else if (obj_type == 'sponsorship_cfg') { + endpoint = `/crud/sponsorship/cfg`; + } else if (obj_type == 'sponsorship') { + endpoint = `/crud/sponsorship`; + } else if (obj_type == 'site') { + endpoint = `/crud/site`; + // } else if (obj_type == 'user') { + // endpoint = `/crud/user`; + } else { + console.log(`Unknown object type: ${obj_type}`); + return false; + } + if (log_lvl) { + console.log('Endpoint:', endpoint); + } - if (return_obj) { - params['return_obj'] = true; + if (return_obj) { + params['return_obj'] = true; - // Pass along the view name to use for returning data. - if (obj_v_name) { - params['obj_v_name'] = obj_v_name; - } - } else { - params['return_obj'] = false; // NOTE: This is needed because the current default on the API is to return the object. - } + // Pass along the view name to use for returning data. + if (obj_v_name) { + params['obj_v_name'] = obj_v_name; + } + } else { + params['return_obj'] = false; // NOTE: This is needed because the current default on the API is to return the object. + } - if (field_name) { - data['data_list'] = {}; // Really an object/dict - data['data_list'][field_name] = field_value; - // data['data_list']['testing'] = 'asdf 1234'; - } else if (fields) { - data['data_list'] = fields; // Really an object/dict - } + if (field_name) { + data['data_list'] = {}; // Really an object/dict + data['data_list'][field_name] = field_value; + // data['data_list']['testing'] = 'asdf 1234'; + } else if (fields) { + data['data_list'] = fields; // Really an object/dict + } - // NOTE: The data object may contain objects that need to be converted to JSON strings. This is done by adding "_json" to the end of the property name. This is done because the API does not support nested objects. This is a limitation of the API. - if (data['data_list']) { - if (log_lvl > 1) { - console.log('Data List:', data['data_list']); - } - for (const [key, value] of Object.entries(data['data_list'])) { - // console.log(key, value); - if (key.endsWith('_json')) { - if (log_lvl) { - console.log(`${key}: ${value}`); - } - data['data_list'][key] = JSON.stringify(value); - } - } - } + // NOTE: The data object may contain objects that need to be converted to JSON strings. This is done by adding "_json" to the end of the property name. This is done because the API does not support nested objects. This is a limitation of the API. + if (data['data_list']) { + if (log_lvl > 1) { + console.log('Data List:', data['data_list']); + } + for (const [key, value] of Object.entries(data['data_list'])) { + // console.log(key, value); + if (key.endsWith('_json')) { + if (log_lvl) { + console.log(`${key}: ${value}`); + } + data['data_list'][key] = JSON.stringify(value); + } + } + } - if (log_lvl) { - console.log('Data:', data); - } - // params['xxxxx run_safety_check xxxxx'] = false; - params['by_alias'] = false; + if (log_lvl) { + console.log('Data:', data); + } + // params['xxxxx run_safety_check xxxxx'] = false; + params['by_alias'] = false; - if (log_lvl) { - console.log('Params:', params); - } + if (log_lvl) { + console.log('Params:', params); + } - let object_obj_post_promise = await post_object({api_cfg: api_cfg, endpoint: endpoint, params: params, data: data, log_lvl: log_lvl}); + const object_obj_post_promise = await post_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + data: data, + log_lvl: log_lvl + }); - if (log_lvl > 1) { - console.log(object_obj_post_promise); - } - - return object_obj_post_promise; -} + if (log_lvl > 1) { + console.log(object_obj_post_promise); + } + return object_obj_post_promise; +}; // Updated 2023-06-28 -export let update_ae_obj_id_crud = async function update_ae_obj_id_crud( - { - api_cfg, - obj_type, - obj_id, - field_name, - field_value, - fields = {}, - key, - jwt = null, - headers = {}, - params = {}, - data = {}, - return_obj = false, - obj_v_name = '', - return_meta = false, - log_lvl = 0 - }: { - api_cfg: any, - obj_type: string, - obj_id: string, - field_name?: string, - field_value?: any, - fields?: key_val, - key: string, - jwt?: null|string, - headers?: key_val, - params?: key_val, - data?: null|key_val, - return_obj?: boolean, - obj_v_name?: string, - return_meta?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log('*** update_ae_obj_id_crud() ***'); - } +export const update_ae_obj_id_crud = async function update_ae_obj_id_crud({ + api_cfg, + obj_type, + obj_id, + field_name, + field_value, + fields = {}, + key, + jwt = null, + headers = {}, + params = {}, + data = {}, + return_obj = false, + obj_v_name = '', + return_meta = false, + log_lvl = 0 +}: { + api_cfg: any; + obj_type: string; + obj_id: string; + field_name?: string; + field_value?: any; + fields?: key_val; + key: string; + jwt?: null | string; + headers?: key_val; + params?: key_val; + data?: null | key_val; + return_obj?: boolean; + obj_v_name?: string; + return_meta?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log('*** update_ae_obj_id_crud() ***'); + } - if (!data) { - data = {}; - } - data['super_key'] = key; - data['jwt'] = jwt; + if (!data) { + data = {}; + } + data['super_key'] = key; + data['jwt'] = jwt; - // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST + // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST - // This obj_v_name is the view name to use when returning data. Do not prefix it with v_. This is checked and done automatically by the API. - // This is not currently being exposed to other areas of the code. It is only used here. For now? - if (obj_v_name) { - obj_v_name = ''; - } + // This obj_v_name is the view name to use when returning data. Do not prefix it with v_. This is checked and done automatically by the API. + // This is not currently being exposed to other areas of the code. It is only used here. For now? + if (obj_v_name) { + obj_v_name = ''; + } - let endpoint = ''; - if (obj_type == 'account') { - endpoint = `/crud/account/${obj_id}`; - } else if (obj_type == 'address') { - endpoint = `/crud/address/${obj_id}`; - } else if (obj_type == 'archive') { - endpoint = `/crud/archive/${obj_id}`; - } else if (obj_type == 'archive_content') { - endpoint = `/crud/archive/content/${obj_id}`; - } else if (obj_type == 'contact') { - endpoint = `/crud/contact/${obj_id}`; - } else if (obj_type == 'data_store') { - endpoint = `/crud/data_store/${obj_id}`; - } else if (obj_type == 'event') { - endpoint = `/crud/event/${obj_id}`; - } else if (obj_type == 'event_abstract') { - endpoint = `/crud/event/abstract/${obj_id}`; - } else if (obj_type == 'event_badge') { - endpoint = `/crud/event/badge/${obj_id}`; - } else if (obj_type == 'event_device') { - endpoint = `/crud/event/device/${obj_id}`; - } else if (obj_type == 'event_exhibit') { - endpoint = `/crud/event/exhibit/${obj_id}`; - } else if (obj_type == 'event_exhibit_tracking') { - endpoint = `/crud/event/exhibit/tracking/${obj_id}`; - } else if (obj_type == 'event_file') { - endpoint = `/crud/event/file/${obj_id}`; - } else if (obj_type == 'event_location') { - endpoint = `/crud/event/location/${obj_id}`; - } else if (obj_type == 'event_person') { - endpoint = `/crud/event/person/${obj_id}`; - } else if (obj_type == 'event_presentation') { - endpoint = `/crud/event/presentation/${obj_id}`; - } else if (obj_type == 'event_presenter') { - endpoint = `/crud/event/presenter/${obj_id}`; - // obj_v_name = 'event_presenter_soft_links'; - } else if (obj_type == 'event_session') { - endpoint = `/crud/event/session/${obj_id}`; - } else if (obj_type == 'event_track') { - endpoint = `/crud/event/track/${obj_id}`; - } else if (obj_type == 'grant') { - endpoint = `/crud/grant/${obj_id}`; - } else if (obj_type == 'hosted_file') { - endpoint = `/crud/hosted_file/${obj_id}`; - } else if (obj_type == 'journal') { - endpoint = `/crud/journal/${obj_id}`; - } else if (obj_type == 'journal_entry') { - endpoint = `/crud/journal/entry/${obj_id}`; - } else if (obj_type == 'order') { - endpoint = `/crud/order/${obj_id}`; - } else if (obj_type == 'order_line') { - endpoint = `/crud/order/line/${obj_id}`; - } else if (obj_type == 'page') { - endpoint = `/crud/page/${obj_id}`; - } else if (obj_type == 'person') { - endpoint = `/crud/person/${obj_id}`; - } else if (obj_type == 'post') { - endpoint = `/crud/post/${obj_id}`; - } else if (obj_type == 'post_comment') { - endpoint = `/crud/post/comment/${obj_id}`; - } else if (obj_type == 'site') { - endpoint = `/crud/site/${obj_id}`; - } else if (obj_type == 'sponsorship_cfg') { - endpoint = `/crud/sponsorship/cfg/${obj_id}`; - } else if (obj_type == 'sponsorship') { - endpoint = `/crud/sponsorship/${obj_id}`; - // } else if (obj_type == 'user') { - // endpoint = `/crud/user/${obj_id}`; - } else { - console.log(`Unknown object type: ${obj_type}`); - return false; - } - if (log_lvl) { - console.log('Endpoint:', endpoint); - } + let endpoint = ''; + if (obj_type == 'account') { + endpoint = `/crud/account/${obj_id}`; + } else if (obj_type == 'address') { + endpoint = `/crud/address/${obj_id}`; + } else if (obj_type == 'archive') { + endpoint = `/crud/archive/${obj_id}`; + } else if (obj_type == 'archive_content') { + endpoint = `/crud/archive/content/${obj_id}`; + } else if (obj_type == 'contact') { + endpoint = `/crud/contact/${obj_id}`; + } else if (obj_type == 'data_store') { + endpoint = `/crud/data_store/${obj_id}`; + } else if (obj_type == 'event') { + endpoint = `/crud/event/${obj_id}`; + } else if (obj_type == 'event_abstract') { + endpoint = `/crud/event/abstract/${obj_id}`; + } else if (obj_type == 'event_badge') { + endpoint = `/crud/event/badge/${obj_id}`; + } else if (obj_type == 'event_device') { + endpoint = `/crud/event/device/${obj_id}`; + } else if (obj_type == 'event_exhibit') { + endpoint = `/crud/event/exhibit/${obj_id}`; + } else if (obj_type == 'event_exhibit_tracking') { + endpoint = `/crud/event/exhibit/tracking/${obj_id}`; + } else if (obj_type == 'event_file') { + endpoint = `/crud/event/file/${obj_id}`; + } else if (obj_type == 'event_location') { + endpoint = `/crud/event/location/${obj_id}`; + } else if (obj_type == 'event_person') { + endpoint = `/crud/event/person/${obj_id}`; + } else if (obj_type == 'event_presentation') { + endpoint = `/crud/event/presentation/${obj_id}`; + } else if (obj_type == 'event_presenter') { + endpoint = `/crud/event/presenter/${obj_id}`; + // obj_v_name = 'event_presenter_soft_links'; + } else if (obj_type == 'event_session') { + endpoint = `/crud/event/session/${obj_id}`; + } else if (obj_type == 'event_track') { + endpoint = `/crud/event/track/${obj_id}`; + } else if (obj_type == 'grant') { + endpoint = `/crud/grant/${obj_id}`; + } else if (obj_type == 'hosted_file') { + endpoint = `/crud/hosted_file/${obj_id}`; + } else if (obj_type == 'journal') { + endpoint = `/crud/journal/${obj_id}`; + } else if (obj_type == 'journal_entry') { + endpoint = `/crud/journal/entry/${obj_id}`; + } else if (obj_type == 'order') { + endpoint = `/crud/order/${obj_id}`; + } else if (obj_type == 'order_line') { + endpoint = `/crud/order/line/${obj_id}`; + } else if (obj_type == 'page') { + endpoint = `/crud/page/${obj_id}`; + } else if (obj_type == 'person') { + endpoint = `/crud/person/${obj_id}`; + } else if (obj_type == 'post') { + endpoint = `/crud/post/${obj_id}`; + } else if (obj_type == 'post_comment') { + endpoint = `/crud/post/comment/${obj_id}`; + } else if (obj_type == 'site') { + endpoint = `/crud/site/${obj_id}`; + } else if (obj_type == 'sponsorship_cfg') { + endpoint = `/crud/sponsorship/cfg/${obj_id}`; + } else if (obj_type == 'sponsorship') { + endpoint = `/crud/sponsorship/${obj_id}`; + // } else if (obj_type == 'user') { + // endpoint = `/crud/user/${obj_id}`; + } else { + console.log(`Unknown object type: ${obj_type}`); + return false; + } + if (log_lvl) { + console.log('Endpoint:', endpoint); + } - if (return_obj) { - params['return_obj'] = true; + if (return_obj) { + params['return_obj'] = true; - // Pass along the view name to use for returning data. - if (obj_v_name) { - params['obj_v_name'] = obj_v_name; - } - } else { - params['return_obj'] = false; // NOTE: This is needed because the current default on the API is to return the object. - } + // Pass along the view name to use for returning data. + if (obj_v_name) { + params['obj_v_name'] = obj_v_name; + } + } else { + params['return_obj'] = false; // NOTE: This is needed because the current default on the API is to return the object. + } - if (field_name) { - data['data_list'] = {}; // Really an object/dict - data['data_list'][field_name] = field_value; - // data['data_list']['testing'] = 'asdf 1234'; - } else if (fields) { - data['data_list'] = fields; // Really an object/dict - } + if (field_name) { + data['data_list'] = {}; // Really an object/dict + data['data_list'][field_name] = field_value; + // data['data_list']['testing'] = 'asdf 1234'; + } else if (fields) { + data['data_list'] = fields; // Really an object/dict + } - // NOTE: The data object may contain objects that need to be converted to JSON strings. This is done by adding "_json" to the end of the property name. This is done because the API does not support nested objects. This is a limitation of the API. - if (data['data_list']) { - if (log_lvl > 1) { - console.log('Data List:', data['data_list']); - } - for (const [key, value] of Object.entries(data['data_list'])) { - // console.log(key, value); - if (key.endsWith('_json')) { - if (log_lvl) { - console.log(`${key}: ${value}`); - } - data['data_list'][key] = JSON.stringify(value); - } - } - } + // NOTE: The data object may contain objects that need to be converted to JSON strings. This is done by adding "_json" to the end of the property name. This is done because the API does not support nested objects. This is a limitation of the API. + if (data['data_list']) { + if (log_lvl > 1) { + console.log('Data List:', data['data_list']); + } + for (const [key, value] of Object.entries(data['data_list'])) { + // console.log(key, value); + if (key.endsWith('_json')) { + if (log_lvl) { + console.log(`${key}: ${value}`); + } + data['data_list'][key] = JSON.stringify(value); + } + } + } - // If the data is an object then we need to loop through the object and convert any objects to JSON strings, but only if the property name ends with "_json". - // if (Array.isArray(data)) { - // // console.log('Data is an array'); - // for (let i = 0; i < data.length; i++) { - // // console.log(data[i]); - // if (typeof data[i] == 'object') { - // // console.log('Data is an object'); - // for (const [key, value] of Object.entries(data[i])) { - // // console.log(key, value); - // if (key.endsWith('_json')) { - // console.log(`${key}: ${value}`); - // data[i][key] = JSON.stringify(value); - // } - // } + // If the data is an object then we need to loop through the object and convert any objects to JSON strings, but only if the property name ends with "_json". + // if (Array.isArray(data)) { + // // console.log('Data is an array'); + // for (let i = 0; i < data.length; i++) { + // // console.log(data[i]); + // if (typeof data[i] == 'object') { + // // console.log('Data is an object'); + // for (const [key, value] of Object.entries(data[i])) { + // // console.log(key, value); + // if (key.endsWith('_json')) { + // console.log(`${key}: ${value}`); + // data[i][key] = JSON.stringify(value); + // } + // } - // } - // } - // } else if (typeof data == 'object') { - // // console.log('Data is an object'); - // for (const [key, value] of Object.entries(data)) { - // // console.log(key, value); - // if (key.endsWith('_json')) { - // console.log(`${key}: ${value}`); - // data[key] = JSON.stringify(value); - // } - // } - // } + // } + // } + // } else if (typeof data == 'object') { + // // console.log('Data is an object'); + // for (const [key, value] of Object.entries(data)) { + // // console.log(key, value); + // if (key.endsWith('_json')) { + // console.log(`${key}: ${value}`); + // data[key] = JSON.stringify(value); + // } + // } + // } - if (log_lvl) { - console.log('Data:', data); - } - // params['xxxxx run_safety_check xxxxx'] = false; - params['by_alias'] = false; + if (log_lvl) { + console.log('Data:', data); + } + // params['xxxxx run_safety_check xxxxx'] = false; + params['by_alias'] = false; - if (log_lvl) { - console.log('Params:', params); - } + if (log_lvl) { + console.log('Params:', params); + } - let object_obj_patch_promise = await patch_object({api_cfg: api_cfg, endpoint: endpoint, params: params, data: data, log_lvl: log_lvl}); + const object_obj_patch_promise = await patch_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + data: data, + log_lvl: log_lvl + }); - if (log_lvl > 1) { - console.log(object_obj_patch_promise); - } - - return object_obj_patch_promise; -} + if (log_lvl > 1) { + console.log(object_obj_patch_promise); + } + return object_obj_patch_promise; +}; // Updated 2023-11-14 -export let delete_ae_obj_id_crud = async function delete_ae_obj_id_crud( - { - api_cfg, - obj_type, - obj_id, - key, - jwt = null, - headers = {}, - params = {}, - data = {}, - method = 'delete', // 'delete', 'disable', 'hide' - return_meta = false, - log_lvl = 0 - } : { - api_cfg: any, - obj_type: string, - obj_id: string, - key: string, - jwt?: null|string, - headers?: any, - params?: any, - data?: any, - method?: string, - return_meta?: boolean, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log(`*** delete_ae_obj_id_crud() *** obj_type: ${obj_type} obj_id: ${obj_id}`); - } +export const delete_ae_obj_id_crud = async function delete_ae_obj_id_crud({ + api_cfg, + obj_type, + obj_id, + key, + jwt = null, + headers = {}, + params = {}, + data = {}, + method = 'delete', // 'delete', 'disable', 'hide' + return_meta = false, + log_lvl = 0 +}: { + api_cfg: any; + obj_type: string; + obj_id: string; + key: string; + jwt?: null | string; + headers?: any; + params?: any; + data?: any; + method?: string; + return_meta?: boolean; + log_lvl?: number; +}) { + if (log_lvl) { + console.log(`*** delete_ae_obj_id_crud() *** obj_type: ${obj_type} obj_id: ${obj_id}`); + } - data['super_key'] = key; - data['jwt'] = jwt; - // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST + data['super_key'] = key; + data['jwt'] = jwt; + // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST - let endpoint = ''; - if (obj_type == 'account') { - endpoint = `/crud/account/${obj_id}`; - } else if (obj_type == 'address') { - endpoint = `/crud/address/${obj_id}`; - } else if (obj_type == 'archive') { - endpoint = `/crud/archive/${obj_id}`; - } else if (obj_type == 'archive_content') { - endpoint = `/crud/archive/content/${obj_id}`; - } else if (obj_type == 'contact') { - endpoint = `/crud/contact/${obj_id}`; - } else if (obj_type == 'data_store') { - endpoint = `/crud/data_store/${obj_id}`; - } else if (obj_type == 'event') { - endpoint = `/crud/event/${obj_id}`; - } else if (obj_type == 'event_abstract') { - endpoint = `/crud/event/abstract/${obj_id}`; - } else if (obj_type == 'event_badge') { - endpoint = `/crud/event/badge/${obj_id}`; - } else if (obj_type == 'event_device') { - endpoint = `/crud/event/device/${obj_id}`; - } else if (obj_type == 'event_exhibit') { - endpoint = `/crud/event/exhibit/${obj_id}`; - } else if (obj_type == 'event_exhibit_tracking') { - endpoint = `/crud/event/exhibit/tracking/${obj_id}`; - } else if (obj_type == 'event_file') { - endpoint = `/crud/event/file/${obj_id}`; - } else if (obj_type == 'event_location') { - endpoint = `/crud/event/location/${obj_id}`; - } else if (obj_type == 'event_person') { - endpoint = `/crud/event/person/${obj_id}`; - } else if (obj_type == 'event_presentation') { - endpoint = `/crud/event/presentation/${obj_id}`; - } else if (obj_type == 'event_presenter') { - endpoint = `/crud/event/presenter/${obj_id}`; - } else if (obj_type == 'event_session') { - endpoint = `/crud/event/session/${obj_id}`; - } else if (obj_type == 'event_track') { - endpoint = `/crud/event/track/${obj_id}`; - } else if (obj_type == 'grant') { - endpoint = `/crud/grant/${obj_id}`; - } else if (obj_type == 'hosted_file') { - endpoint = `/crud/hosted_file/${obj_id}`; - } else if (obj_type == 'journal') { - endpoint = `/crud/journal/${obj_id}`; - } else if (obj_type == 'journal_entry') { - endpoint = `/crud/journal/entry/${obj_id}`; - } else if (obj_type == 'order') { - endpoint = `/crud/order/${obj_id}`; - } else if (obj_type == 'order_line') { - endpoint = `/crud/order/line/${obj_id}`; - } else if (obj_type == 'page') { - endpoint = `/crud/page/${obj_id}`; - } else if (obj_type == 'person') { - endpoint = `/crud/person/${obj_id}`; - } else if (obj_type == 'post') { - endpoint = `/crud/post/${obj_id}`; - } else if (obj_type == 'post_comment') { - endpoint = `/crud/post/comment/${obj_id}`; - } else if (obj_type == 'site') { - endpoint = `/crud/site/${obj_id}`; - } else if (obj_type == 'sponsorship_cfg') { - endpoint = `/crud/sponsorship/cfg/${obj_id}`; - } else if (obj_type == 'sponsorship') { - endpoint = `/crud/sponsorship/${obj_id}`; - // } else if (obj_type == 'user') { - // endpoint = `/crud/user/${obj_id}`; - } else { - console.log(`Unknown object type: ${obj_type}`); - return false; - } - if (log_lvl) { - console.log('Endpoint:', endpoint); - } + let endpoint = ''; + if (obj_type == 'account') { + endpoint = `/crud/account/${obj_id}`; + } else if (obj_type == 'address') { + endpoint = `/crud/address/${obj_id}`; + } else if (obj_type == 'archive') { + endpoint = `/crud/archive/${obj_id}`; + } else if (obj_type == 'archive_content') { + endpoint = `/crud/archive/content/${obj_id}`; + } else if (obj_type == 'contact') { + endpoint = `/crud/contact/${obj_id}`; + } else if (obj_type == 'data_store') { + endpoint = `/crud/data_store/${obj_id}`; + } else if (obj_type == 'event') { + endpoint = `/crud/event/${obj_id}`; + } else if (obj_type == 'event_abstract') { + endpoint = `/crud/event/abstract/${obj_id}`; + } else if (obj_type == 'event_badge') { + endpoint = `/crud/event/badge/${obj_id}`; + } else if (obj_type == 'event_device') { + endpoint = `/crud/event/device/${obj_id}`; + } else if (obj_type == 'event_exhibit') { + endpoint = `/crud/event/exhibit/${obj_id}`; + } else if (obj_type == 'event_exhibit_tracking') { + endpoint = `/crud/event/exhibit/tracking/${obj_id}`; + } else if (obj_type == 'event_file') { + endpoint = `/crud/event/file/${obj_id}`; + } else if (obj_type == 'event_location') { + endpoint = `/crud/event/location/${obj_id}`; + } else if (obj_type == 'event_person') { + endpoint = `/crud/event/person/${obj_id}`; + } else if (obj_type == 'event_presentation') { + endpoint = `/crud/event/presentation/${obj_id}`; + } else if (obj_type == 'event_presenter') { + endpoint = `/crud/event/presenter/${obj_id}`; + } else if (obj_type == 'event_session') { + endpoint = `/crud/event/session/${obj_id}`; + } else if (obj_type == 'event_track') { + endpoint = `/crud/event/track/${obj_id}`; + } else if (obj_type == 'grant') { + endpoint = `/crud/grant/${obj_id}`; + } else if (obj_type == 'hosted_file') { + endpoint = `/crud/hosted_file/${obj_id}`; + } else if (obj_type == 'journal') { + endpoint = `/crud/journal/${obj_id}`; + } else if (obj_type == 'journal_entry') { + endpoint = `/crud/journal/entry/${obj_id}`; + } else if (obj_type == 'order') { + endpoint = `/crud/order/${obj_id}`; + } else if (obj_type == 'order_line') { + endpoint = `/crud/order/line/${obj_id}`; + } else if (obj_type == 'page') { + endpoint = `/crud/page/${obj_id}`; + } else if (obj_type == 'person') { + endpoint = `/crud/person/${obj_id}`; + } else if (obj_type == 'post') { + endpoint = `/crud/post/${obj_id}`; + } else if (obj_type == 'post_comment') { + endpoint = `/crud/post/comment/${obj_id}`; + } else if (obj_type == 'site') { + endpoint = `/crud/site/${obj_id}`; + } else if (obj_type == 'sponsorship_cfg') { + endpoint = `/crud/sponsorship/cfg/${obj_id}`; + } else if (obj_type == 'sponsorship') { + endpoint = `/crud/sponsorship/${obj_id}`; + // } else if (obj_type == 'user') { + // endpoint = `/crud/user/${obj_id}`; + } else { + console.log(`Unknown object type: ${obj_type}`); + return false; + } + if (log_lvl) { + console.log('Endpoint:', endpoint); + } - if (method) { // NOTE: method options: 'delete', 'disable', 'hide' - params['method'] = method; - } + if (method) { + // NOTE: method options: 'delete', 'disable', 'hide' + params['method'] = method; + } - if (log_lvl) { - console.log('Params:', params); - } + if (log_lvl) { + console.log('Params:', params); + } - let object_obj_delete_promise = await delete_object({api_cfg: api_cfg, endpoint: endpoint, params: params, data: data, log_lvl: log_lvl}); + const object_obj_delete_promise = await delete_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + data: data, + log_lvl: log_lvl + }); - if (log_lvl > 1) { - console.log(object_obj_delete_promise); - } - - return object_obj_delete_promise; -} + if (log_lvl > 1) { + console.log(object_obj_delete_promise); + } + return object_obj_delete_promise; +}; /* BEGIN: Hosted File Related */ // Updated 2023-08-17 -export let download_hosted_file = async function download_hosted_file( - { - api_cfg, - hosted_file_id, - return_file = true, - filename, - auto_download = false, - params = {}, - log_lvl = 0 - } : { - api_cfg: any, - hosted_file_id: string, - return_file?: boolean, - filename?: string, - auto_download?: boolean, - params?: key_val, - log_lvl?: number - } - ) { - console.log('*** stores_hosted_api.js: download_hosted_file() ***'); +export const download_hosted_file = async function download_hosted_file({ + api_cfg, + hosted_file_id, + return_file = true, + filename, + auto_download = false, + params = {}, + log_lvl = 0 +}: { + api_cfg: any; + hosted_file_id: string; + return_file?: boolean; + filename?: string; + auto_download?: boolean; + params?: key_val; + log_lvl?: number; +}) { + console.log('*** stores_hosted_api.js: download_hosted_file() ***'); - let task_id = hosted_file_id; + const task_id = hosted_file_id; - const endpoint = `/hosted_file/${hosted_file_id}/download`; - if (filename) { - params['filename'] = filename; - } - params['return_file'] = true; - - let hosted_file_download_get_promise = await api.get_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - return_blob: return_file, - filename: filename, - auto_download: auto_download, - task_id: task_id, - log_lvl: log_lvl - }); - // console.log(hosted_file_download_get_promise); - return hosted_file_download_get_promise; -} + const endpoint = `/hosted_file/${hosted_file_id}/download`; + if (filename) { + params['filename'] = filename; + } + params['return_file'] = true; + const hosted_file_download_get_promise = await api.get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + return_blob: return_file, + filename: filename, + auto_download: auto_download, + task_id: task_id, + log_lvl: log_lvl + }); + // console.log(hosted_file_download_get_promise); + return hosted_file_download_get_promise; +}; // Updated 2023-12-15 -export let delete_hosted_file = async function delete_hosted_file( - { - api_cfg, - hosted_file_id, - link_to_type, - link_to_id, - rm_orphan=false, - params={}, - data={}, - log_lvl=1 - } : { - api_cfg: any, - hosted_file_id: string, - link_to_type?: string, - link_to_id?: string, - rm_orphan?: boolean, - params?: key_val, - data?: key_val, - log_lvl?: number - } - ) { - console.log('*** stores_hosted_api.js: delete_hosted_file() ***'); +export const delete_hosted_file = async function delete_hosted_file({ + api_cfg, + hosted_file_id, + link_to_type, + link_to_id, + rm_orphan = false, + params = {}, + data = {}, + log_lvl = 1 +}: { + api_cfg: any; + hosted_file_id: string; + link_to_type?: string; + link_to_id?: string; + rm_orphan?: boolean; + params?: key_val; + data?: key_val; + log_lvl?: number; +}) { + console.log('*** stores_hosted_api.js: delete_hosted_file() ***'); - const endpoint = `/hosted_file/${hosted_file_id}`; - if (link_to_type) { - params['link_to_type'] = link_to_type; - } - if (link_to_id) { - params['link_to_id'] = link_to_id; - } - if (rm_orphan) { - params['rm_orphan'] = rm_orphan; - } + const endpoint = `/hosted_file/${hosted_file_id}`; + if (link_to_type) { + params['link_to_type'] = link_to_type; + } + if (link_to_id) { + params['link_to_id'] = link_to_id; + } + if (rm_orphan) { + params['rm_orphan'] = rm_orphan; + } - let hosted_file_obj_delete_promise = await api.delete_object({api_cfg: api_cfg, endpoint: endpoint, params: params, data: data, log_lvl: log_lvl}); - // console.log(hosted_file_obj_delete_promise); - return hosted_file_obj_delete_promise; -} + const hosted_file_obj_delete_promise = await api.delete_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + data: data, + log_lvl: log_lvl + }); + // console.log(hosted_file_obj_delete_promise); + return hosted_file_obj_delete_promise; +}; /* END: Hosted File Related */ - /* BEGIN: Data Store Related */ // Updated 2023-06-29 -export let get_data_store_obj_w_code = async function get_data_store_obj_w_code({ - api_cfg, - data_store_code, - data_type='text', - headers={}, - params={}, - timeout=25000, - log_lvl=0 - } : { - api_cfg: any, - data_store_code: string, - data_type?: string, - headers?: key_val, - params?: key_val, - timeout?: number, - log_lvl?: number - } - ) { - if (log_lvl) { - console.log('*** get_data_store_obj_w_code() ***'); - } +export const get_data_store_obj_w_code = async function get_data_store_obj_w_code({ + api_cfg, + data_store_code, + data_type = 'text', + headers = {}, + params = {}, + timeout = 25000, + log_lvl = 0 +}: { + api_cfg: any; + data_store_code: string; + data_type?: string; + headers?: key_val; + params?: key_val; + timeout?: number; + log_lvl?: number; +}) { + if (log_lvl) { + console.log('*** get_data_store_obj_w_code() ***'); + } - // let get_item_result = window.localStorage.getItem(code); + // let get_item_result = window.localStorage.getItem(code); - const endpoint = `/data_store/code/${data_store_code}`; - let data_store_obj_get_promise = await api.get_object({api_cfg: api_cfg, endpoint: endpoint, headers: headers, params: params, timeout: timeout, log_lvl: log_lvl}); + const endpoint = `/data_store/code/${data_store_code}`; + let data_store_obj_get_promise = await api.get_object({ + api_cfg: api_cfg, + endpoint: endpoint, + headers: headers, + params: params, + timeout: timeout, + log_lvl: log_lvl + }); - if (data_store_obj_get_promise === false) { - console.log('Data Store - RUN AGAIN WITH BACKUP'); - let original_api_base_url = api_cfg['base_url']; + if (data_store_obj_get_promise === false) { + console.log('Data Store - RUN AGAIN WITH BACKUP'); + const original_api_base_url = api_cfg['base_url']; - let temp_api = api_cfg; - temp_api['base_url'] = temp_api['base_url_bak'] + const temp_api = api_cfg; + temp_api['base_url'] = temp_api['base_url_bak']; - data_store_obj_get_promise = await api.get_object({api_cfg: temp_api, endpoint: endpoint, headers: headers, params: params, timeout: timeout, log_lvl: log_lvl}); - temp_api['base_url'] = original_api_base_url; - } + data_store_obj_get_promise = await api.get_object({ + api_cfg: temp_api, + endpoint: endpoint, + headers: headers, + params: params, + timeout: timeout, + log_lvl: log_lvl + }); + temp_api['base_url'] = original_api_base_url; + } - let data_store_obj = data_store_obj_get_promise; + const data_store_obj = data_store_obj_get_promise; - if (data_type == 'text') { - // console.log(data_store_obj.text); - // window.localStorage.setItem(data_store_code, data_store_obj.text); - // localStorage.setItem(data_store_code, data_store_obj.text); - } else if (data_type == 'json') { - // console.log(data_store_obj.json); - // window.localStorage.setItem(data_store_code, JSON.stringify(data_store_obj.json)); - // localStorage.setItem(data_store_code, JSON.stringify(data_store_obj.json)); - } + if (data_type == 'text') { + // console.log(data_store_obj.text); + // window.localStorage.setItem(data_store_code, data_store_obj.text); + // localStorage.setItem(data_store_code, data_store_obj.text); + } else if (data_type == 'json') { + // console.log(data_store_obj.json); + // window.localStorage.setItem(data_store_code, JSON.stringify(data_store_obj.json)); + // localStorage.setItem(data_store_code, JSON.stringify(data_store_obj.json)); + } - if (log_lvl > 1) { - console.log('Response Data:', data_store_obj); - } - return data_store_obj; -} + if (log_lvl > 1) { + console.log('Response Data:', data_store_obj); + } + return data_store_obj; +}; /* END: Data Store Related */ - /* BEGIN: Utility: Email Related */ // Updated 2023-06-29 -export let send_email = async function send_email( - { - api_cfg, - from_email, - from_name = '', - to_email, - to_name = '', - cc_email = null, - cc_name = null, - bcc_email = null, - bcc_name = null, - subject, - body_html, - body_text = null, - // headers = {}, - params = {}, - data = {}, - return_obj = false, - return_meta = false, - test = false, - log_lvl = 0 - } : { - api_cfg: any, - from_email: string, - from_name?: string, - to_email: string, - to_name?: string, - cc_email?: null|string, - cc_name?: null|string, - bcc_email?: null|string, - bcc_name?: null|string, - subject: string, - body_html: string, - body_text?: null|string, - // headers?: key_val, - params?: key_val, - data?: key_val, - return_obj?: boolean, - return_meta?: boolean, - test?: boolean, - log_lvl?: number - } - ) { - console.log('*** send_email() ***'); +export const send_email = async function send_email({ + api_cfg, + from_email, + from_name = '', + to_email, + to_name = '', + cc_email = null, + cc_name = null, + bcc_email = null, + bcc_name = null, + subject, + body_html, + body_text = null, + // headers = {}, + params = {}, + data = {}, + return_obj = false, + return_meta = false, + test = false, + log_lvl = 0 +}: { + api_cfg: any; + from_email: string; + from_name?: string; + to_email: string; + to_name?: string; + cc_email?: null | string; + cc_name?: null | string; + bcc_email?: null | string; + bcc_name?: null | string; + subject: string; + body_html: string; + body_text?: null | string; + // headers?: key_val, + params?: key_val; + data?: key_val; + return_obj?: boolean; + return_meta?: boolean; + test?: boolean; + log_lvl?: number; +}) { + console.log('*** send_email() ***'); - let endpoint = `/util/email/send`; + const endpoint = `/util/email/send`; - data['from_email'] = from_email; // Required - data['from_name'] = from_name; + data['from_email'] = from_email; // Required + data['from_name'] = from_name; - data['to_email'] = to_email; // Required - data['to_name'] = to_name; + data['to_email'] = to_email; // Required + data['to_name'] = to_name; - data['cc_email'] = cc_email; - data['cc_name'] = cc_name; + data['cc_email'] = cc_email; + data['cc_name'] = cc_name; - data['bcc_email'] = bcc_email; - data['bcc_name'] = bcc_name; + data['bcc_email'] = bcc_email; + data['bcc_name'] = bcc_name; - data['subject'] = subject; - if (log_lvl) { - console.log('Data:', data); - } + data['subject'] = subject; + if (log_lvl) { + console.log('Data:', data); + } - data['body_html'] = body_html; + data['body_html'] = body_html; - data['body_text'] = body_text; + data['body_text'] = body_text; - if (return_obj) { - params['return_obj'] = true; - } + if (return_obj) { + params['return_obj'] = true; + } - if (test) { - params['test'] = true; - } + if (test) { + params['test'] = true; + } - let send_email_post_promise = await api.post_object({ - api_cfg: api_cfg, - endpoint: endpoint, - params: params, - data: data, - return_meta: return_meta, - log_lvl: log_lvl - }); + const send_email_post_promise = await api.post_object({ + api_cfg: api_cfg, + endpoint: endpoint, + params: params, + data: data, + return_meta: return_meta, + log_lvl: log_lvl + }); - if (log_lvl > 1) { - console.log('Response Data:', send_email_post_promise); - } - if (return_obj) { - return send_email_post_promise; - } else { - return send_email_post_promise.event_abstract_id_random; - } -} + if (log_lvl > 1) { + console.log('Response Data:', send_email_post_promise); + } + if (return_obj) { + return send_email_post_promise; + } else { + return send_email_post_promise.event_abstract_id_random; + } +}; /* END: Utility: Email Related */ - -let obj = { - delete_object: delete_object, - get_object: get_object, - patch_object: patch_object, - post_object: post_object, - get_ae_obj_id_crud: get_ae_obj_id_crud, - get_ae_obj_li_for_obj_id_crud: get_ae_obj_li_for_obj_id_crud, - get_ae_obj_li_for_obj_id_crud_v2: get_ae_obj_li_for_obj_id_crud_v2, - create_ae_obj_crud: create_ae_obj_crud, - update_ae_obj_id_crud: update_ae_obj_id_crud, - delete_ae_obj_id_crud: delete_ae_obj_id_crud, - download_hosted_file: download_hosted_file, - delete_hosted_file: delete_hosted_file, - get_data_store_obj_w_code: get_data_store_obj_w_code, - send_email: send_email, -} -export let api = obj; -// module.exports = api; \ No newline at end of file +const obj = { + delete_object: delete_object, + get_object: get_object, + patch_object: patch_object, + post_object: post_object, + get_ae_obj_id_crud: get_ae_obj_id_crud, + get_ae_obj_li_for_obj_id_crud: get_ae_obj_li_for_obj_id_crud, + get_ae_obj_li_for_obj_id_crud_v2: get_ae_obj_li_for_obj_id_crud_v2, + create_ae_obj_crud: create_ae_obj_crud, + update_ae_obj_id_crud: update_ae_obj_id_crud, + delete_ae_obj_id_crud: delete_ae_obj_id_crud, + download_hosted_file: download_hosted_file, + delete_hosted_file: delete_hosted_file, + get_data_store_obj_w_code: get_data_store_obj_w_code, + send_email: send_email +}; +export const api = obj; +// module.exports = api; diff --git a/src/lib/app_components/analytics.svelte b/src/lib/app_components/analytics.svelte index 4a1af227..f7597080 100644 --- a/src/lib/app_components/analytics.svelte +++ b/src/lib/app_components/analytics.svelte @@ -1,27 +1,25 @@ - + diff --git a/src/lib/app_components/e_app_access_type.svelte b/src/lib/app_components/e_app_access_type.svelte index e7f46c18..f9129169 100644 --- a/src/lib/app_components/e_app_access_type.svelte +++ b/src/lib/app_components/e_app_access_type.svelte @@ -1,286 +1,299 @@ -
+ class:hidden={hide} +> + + - - - - - + +
+ {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + {#if $ae_loc.manager_access} + {#if $ae_loc?.sync_local_config} + + {:else} + - {:else} - + {/if} + {/if} - // dispatch_sync_local_config_changed(); - // tick(); - return true; - }} - class="btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition-all hover:transition-all *:hover:inline" - title="Currently not syncing with the remote server. Re-sync the local configuration with the remote configuration?" - > - - - - {/if} - {/if} - - - {/if} -
+ {/if} + -
+
+ {#if $ae_loc?.access_type && $ae_loc?.access_type == 'anonymous' && 1 == 3} + + + + {/if} - - {#if (show_passcode_input)} - Cancel - {:else} - Access? - {/if} - - - {/if} + {#if $ae_loc?.access_type && $ae_loc?.access_type != 'anonymous'} + + + - {#if ($ae_loc?.access_type && $ae_loc?.access_type != 'anonymous')} - - - + + {#if $ae_loc.access_type == 'super'} + + + {:else if $ae_loc.access_type == 'manager'} + + + {:else if $ae_loc.access_type == 'administrator'} + + + {:else if $ae_loc.access_type == 'trusted'} + + + {:else if $ae_loc.access_type == 'public'} + Public + + {:else if $ae_loc.access_type == 'authenticated'} + Authenticated + + {:else if $ae_loc.access_type == 'anonymous'} + Anonymous Access + {:else} + Unknown Access + {/if} + - - {#if $ae_loc.access_type == 'super'} - - - {:else if $ae_loc.access_type == 'manager'} - - - {:else if $ae_loc.access_type == 'administrator'} - - - {:else if $ae_loc.access_type == 'trusted'} - - - {:else if $ae_loc.access_type == 'public'} - Public - - {:else if $ae_loc.access_type == 'authenticated'} - Authenticated - - {:else if $ae_loc.access_type == 'anonymous'} - Anonymous Access - {:else} - Unknown Access - {/if} - + {#if $ae_loc?.user_access_type && $ae_loc?.access_type == $ae_loc?.user_access_type && !show_passcode_input} + + {:else if !show_passcode_input} + + {/if} + + {/if} - {#if $ae_loc?.user_access_type && $ae_loc?.access_type == $ae_loc?.user_access_type && !show_passcode_input} - - {:else if (!show_passcode_input)} - - {/if} - - {/if} + {#if show_passcode_input} + + + + Passcode: + - {#if (show_passcode_input)} - - - - Passcode: - - - - - - - {/if} - -
+ + + + + {/if} +
- diff --git a/src/lib/app_components/e_app_clipboard.svelte b/src/lib/app_components/e_app_clipboard.svelte index 96d3ffc5..f7992c2e 100644 --- a/src/lib/app_components/e_app_clipboard.svelte +++ b/src/lib/app_components/e_app_clipboard.svelte @@ -1,119 +1,108 @@ - diff --git a/src/lib/app_components/e_app_codemirror_v5.svelte b/src/lib/app_components/e_app_codemirror_v5.svelte index 20a3b11c..4fce3f7b 100644 --- a/src/lib/app_components/e_app_codemirror_v5.svelte +++ b/src/lib/app_components/e_app_codemirror_v5.svelte @@ -1,284 +1,295 @@ {#if browser} - -
+ +
{:else} -
-
-

Loading editor...

-
+
+
+

Loading editor...

+
-
{content}
-
+
{content}
+
{/if} \ No newline at end of file + diff --git a/src/lib/app_components/e_app_debug_menu.svelte b/src/lib/app_components/e_app_debug_menu.svelte index c073074c..af4ebd86 100644 --- a/src/lib/app_components/e_app_debug_menu.svelte +++ b/src/lib/app_components/e_app_debug_menu.svelte @@ -1,43 +1,33 @@ -
border-red-300 dark:border-red-700 hover:border-red-500 hover:dark:border-red-500 " - class:top-0={expand} - class:w-full={expand} - class:hidden={hide} - class:border-transparent={!expand} - class:dark:border-transparent={!expand} - class:hover:border-transparent={!expand} - class:hover:bg-transparent={!expand} - > - -
hover:opacity-100 relative " - > + > + +
+ + + Debug +
- -
- - - Debug -
- -
+		
             {JSON.stringify($ae_loc, null, 2)}
         
+
- - - - - - - + > + + + Quick Info + - + - - - - - + title="Turn debug content and styles off and on" + > + + + π +
diff --git a/src/lib/app_components/e_app_help_tech.svelte b/src/lib/app_components/e_app_help_tech.svelte index 9e170af4..2239e9b6 100644 --- a/src/lib/app_components/e_app_help_tech.svelte +++ b/src/lib/app_components/e_app_help_tech.svelte @@ -1,91 +1,101 @@ -
{!$ae_sess.show_help_tech ? e_class_form_hidden : e_class_form_showing} relative " - class:w-xl={$ae_sess.show_help_tech} - class:w-fit={!$ae_sess.show_help_tech} - class:mx-auto={$ae_sess.show_help_tech} - class:m-2={$ae_sess.show_help_tech} - class:p-2={$ae_sess.show_help_tech} - class:hover:border-blue-400={$ae_sess.show_help_tech} - class:hover:dark:border-blue-600={$ae_sess.show_help_tech} - class:hover:shadow-blue-200={$ae_sess.show_help_tech} - class:hover:dark:shadow-blue-800={$ae_sess.show_help_tech} - class:bg-blue-100={$ae_sess.show_help_tech} - class:dark:bg-blue-900={$ae_sess.show_help_tech} - - > - - - {#if $ae_sess.show_help_tech} -
dark:bg-blue-800 transition-all " - > -
-

- {#if e_success} - - - Help Requested - - {:else} - - - - Notify Technical Support - - + Notify Technical Support + + - {/if} + {/if} - -

- -
+ title="Close Help Request Form" + > + + + Close + +
-
{ - // Do stuff... - send_help_tech_email(); + onsubmit={preventDefault(() => { + // Do stuff... + send_help_tech_email(); - // Hide the request form - $ae_sess.show_help_tech = false; + // Hide the request form + $ae_sess.show_help_tech = false; - alert('Notification sent to the IT team.'); - })} - > - - + placeholder="Send with or without a description...." + bind:value={help_tech_text} + > - + {#if !help_tech_text} + Notify Without Description + {:else} + Send Notification + {/if} + +
- - -
- This is intended for technical issues only. Please contact your organization's staff if you have a question about your membership, recorded content, meetings, or posts. -
+ > + This is intended for technical issues only. Please contact your organization's staff if you + have a question about your membership, recorded content, meetings, or posts. +
-
-
-

- - Additional Information Included - -

- - -
-
    -
  • Datetime = {new Date().toISOString()}
  • -
  • URL = {window.location.href}
  • -
  • Browser = {navigator.userAgent}
  • -
  • Viewport Size = {window.innerWidth} x {window.innerHeight}
  • -
  • Screen Resolution = {window.screen.width} x {window.screen.height}
  • -
  • Dark mode = {window?.matchMedia?.('(prefers-color-scheme:dark)')?.matches ?? false}
  • -
  • In iframe = {$ae_loc?.iframe}
  • -
  • Theme Mode = {$ae_loc?.theme_mode}
  • -
  • Theme Name = {$ae_loc?.theme_name}
  • -
  • Account ID = {$slct.account_id}
  • -
  • Access Type = {$ae_loc?.access_type}
  • - {#if $ae_loc?.person_id} -
  • person_id = {$ae_loc?.person_id}
  • -
  • full_name = {$ae_loc?.full_name}
  • - {/if} - {#if $ae_loc?.user_id} -
  • user_id = {$ae_loc?.user_id}
  • -
  • username = {$ae_loc?.username}
  • -
  • email = {$ae_loc?.email}
  • - {/if} -
  • API Base URL = {$ae_api.base_url}
  • + onclick={() => (hide_additional_info = !hide_additional_info)} + title="Toggle additional information" + > + + {#if hide_additional_info} + + + Show + {:else} + + + Hide + {/if} + + +
+
    +
  • + Datetime = + {new Date().toISOString()} +
  • +
  • + URL = + {window.location.href} +
  • +
  • + Browser = + {navigator.userAgent} +
  • +
  • + Viewport Size = + {window.innerWidth} x {window.innerHeight} +
  • +
  • + Screen Resolution = + {window.screen.width} x {window.screen.height} +
  • +
  • + Dark mode = + {window?.matchMedia?.('(prefers-color-scheme:dark)')?.matches ?? false} +
  • +
  • + In iframe = + {$ae_loc?.iframe} +
  • +
  • + Theme Mode = + {$ae_loc?.theme_mode} +
  • +
  • + Theme Name = + {$ae_loc?.theme_name} +
  • +
  • + Account ID = + {$slct.account_id} +
  • +
  • + Access Type = + {$ae_loc?.access_type} +
  • + {#if $ae_loc?.person_id} +
  • + person_id = + {$ae_loc?.person_id} +
  • +
  • + full_name = + {$ae_loc?.full_name} +
  • + {/if} + {#if $ae_loc?.user_id} +
  • + user_id = + {$ae_loc?.user_id} +
  • +
  • + username = + {$ae_loc?.username} +
  • +
  • + email = + {$ae_loc?.email} +
  • + {/if} +
  • + API Base URL = + {$ae_api.base_url} +
  • - {#if additional_kv && Object.keys(additional_kv).length > 0} -

    Component Info:

    -
      - {#each Object.entries(additional_kv) as [key, value]} -
    • {key} = {value ?? '-- not set --'}
    • - {/each} -
    - {/if} + {#if additional_kv && Object.keys(additional_kv).length > 0} +

    Component Info:

    +
      + {#each Object.entries(additional_kv) as [key, value]} +
    • + {key} = + {value ?? '-- not set --'} +
    • + {/each} +
    + {/if} +
+
+ This information will be included in the help request to assist technical support in + diagnosing the issue. +
+ - -
- This information will be included in the help request to assist technical support in diagnosing the issue. -
- - - -
- + title="Clear App Data & Settings: Clear IndexedDB and reload. If in edit mode localStorage and sessionStorage will also be cleared." + > + + + + Clear & Reload + - - -
- - - - {:else} - - - + + + {:else} + - - {/if} - - - - - - - - - \ No newline at end of file + title={btn_title} + > + {#if !hide_icon} + + {/if} + + + {/if} + diff --git a/src/lib/app_components/e_app_sign_in_out.svelte b/src/lib/app_components/e_app_sign_in_out.svelte index ff60ffd5..ff61f03f 100644 --- a/src/lib/app_components/e_app_sign_in_out.svelte +++ b/src/lib/app_components/e_app_sign_in_out.svelte @@ -1,349 +1,341 @@ -
- - -
-

- {#if $ae_loc?.person_id && $ae_loc?.user_id} - - {$ae_loc?.person?.full_name_override ?? $ae_loc?.person?.full_name} - - - - {:else} - - User Sign In + + {:else} + + User Sign In + {/if} +

+
- {/if} - - - - - {#if !$ae_loc?.person_id && !$ae_loc?.user_id} - - - + onsubmit={async (e) => { + e.preventDefault(); + if ($ae_sess.auth__entered_email) { + alert('Attempting to look up user by email address.'); + handle_lookup_user_email({ + email: $ae_sess.auth__entered_email + }); + } else { + alert('Please enter an email address to look up.'); + } + }} + > + ($ae_sess.auth__entered_email = e.target.value)} + /> + + - -
{ - e.preventDefault(); + onsubmit={async (e) => { + e.preventDefault(); - // WARNING: Logging in as a global user does not work yet. The API needs to be updated. Currently it returns multiple user records from the v_user view if there is more than one person record linked to the user ID. + // WARNING: Logging in as a global user does not work yet. The API needs to be updated. Currently it returns multiple user records from the v_user view if there is more than one person record linked to the user ID. - if ($ae_sess.auth__entered_user_id && $ae_sess.auth__entered_user_key) { + if ($ae_sess.auth__entered_user_id && $ae_sess.auth__entered_user_key) { + // Try to use the user ID and user auth key passed in the URL params for authentication + alert('Attempting to authenticate with User ID and Auth Key.'); - // Try to use the user ID and user auth key passed in the URL params for authentication - alert('Attempting to authenticate with User ID and Auth Key.'); + ae_promises['user'] = await core_func + .auth_ae_obj__user_id_user_auth_key({ + api_cfg: $ae_api, + account_id: $ae_loc.account_id, + // null_account_id: false, // Set to true to allow to authenticate as global user (Super or Manager) + user_id: $ae_sess.auth__entered_user_id, + user_auth_key: $ae_sess.auth__entered_user_key, + log_lvl: 2 + }) + .then((user_response) => { + // console.log(`HERE:`, user_response); + if (user_response.user_id_random) { + console.log( + `Successfully authenticated in with User ID and User Auth Key: ${user_response.username}`, + user_response + ); + user_obj = user_response; // Store the user object for later use + user_id = user_obj.user_id_random; // Use the user_id_random for further API calls + // person_id = user_obj.person_id_random; + } else { + alert('Failed to authenticate: ' + user_response.error); + } + }) + .then((response) => { + if (!user_id) { + // If we didn't get a user_id, return early + console.error('No user_id obtained from auth_ae_obj__username_password'); + return; + } - ae_promises['user'] = await core_func.auth_ae_obj__user_id_user_auth_key({ - api_cfg: $ae_api, - account_id: $ae_loc.account_id, - // null_account_id: false, // Set to true to allow to authenticate as global user (Super or Manager) - user_id: $ae_sess.auth__entered_user_id, - user_auth_key: $ae_sess.auth__entered_user_key, - log_lvl: 2, - }).then((user_response) => { - // console.log(`HERE:`, user_response); - if (user_response.user_id_random) { - console.log(`Successfully authenticated in with User ID and User Auth Key: ${user_response.username}`, user_response); - user_obj = user_response; // Store the user object for later use - user_id = user_obj.user_id_random; // Use the user_id_random for further API calls - // person_id = user_obj.person_id_random; - } else { - alert('Failed to authenticate: ' + user_response.error); - } - }).then((response) => { - if (!user_id) { - // If we didn't get a user_id, return early - console.error('No user_id obtained from auth_ae_obj__username_password'); - return; - } + // Next we need to get the person's information. This is odd because we need to look it up based on the account_id and user_id. There should only be one account person record per user. 99% of the time the user's account ID will be the same as the person's account ID. The exception is for AE Global users (Super or Manager) who can have multiple accounts but only one person record per account. - // Next we need to get the person's information. This is odd because we need to look it up based on the account_id and user_id. There should only be one account person record per user. 99% of the time the user's account ID will be the same as the person's account ID. The exception is for AE Global users (Super or Manager) who can have multiple accounts but only one person record per account. + // let params = { + // user_id_random: user_id, // The user_id_random from the above authentication + // } - // let params = { - // user_id_random: user_id, // The user_id_random from the above authentication - // } + // let params_json: key_val = {}; - // let params_json: key_val = {}; + // params_json['and_qry'] = {}; - // params_json['and_qry'] = {}; + // if (user_id) { + // params_json['and_qry']['user_id_random'] = user_id; + // } - // if (user_id) { - // params_json['and_qry']['user_id_random'] = user_id; - // } + // WARNING: This function returns a list. We only want the first one. There should be no more than 1 record returned. + ae_promises['person'] = core_func + .load_ae_obj_li__person({ + api_cfg: $ae_api, + for_obj_type: 'account', + for_obj_id: $ae_loc.account_id, + qry_user_id: user_id, // The user_id_random from the above authentication + // params_json: params_json, + // params: params, + log_lvl: 1 + }) + .then((person_response) => { + if (person_response[0].person_id_random) { + console.log( + `Successfully loaded person for user_id_random (${user_id}):`, + person_response[0] + ); + person_obj = person_response[0]; + person_id = person_obj.person_id_random; - // WARNING: This function returns a list. We only want the first one. There should be no more than 1 record returned. - ae_promises['person'] = core_func.load_ae_obj_li__person({ - api_cfg: $ae_api, - for_obj_type: 'account', - for_obj_id: $ae_loc.account_id, - qry_user_id: user_id, // The user_id_random from the above authentication - // params_json: params_json, - // params: params, - log_lvl: 1, - }).then((person_response) => { - if (person_response[0].person_id_random) { - console.log(`Successfully loaded person for user_id_random (${user_id}):`, person_response[0]); - person_obj = person_response[0]; - person_id = person_obj.person_id_random; + trigger = true; // Set trigger to true to indicate we can now sign in + } else { + alert('Failed to load person information: ' + person_response.error); + } + }) + .then(() => { + // Once all promises are resolved, we can check if we have both user_id and person_id + if (user_id && person_id) { + // Set the session information + // $ae_loc.person_id = person_id; // Set the person_id in the ae_loc store + // $ae_loc.person = person_obj; // Store the full person object for reference + // $ae_loc.user_id = user_id; // Set the user_id in the ae_loc store + // $ae_loc.user = user_obj; // Store the full user object for reference - trigger = true; // Set trigger to true to indicate we can now sign in - } else { - alert('Failed to load person information: ' + person_response.error); - } - }).then(() => { - // Once all promises are resolved, we can check if we have both user_id and person_id - if (user_id && person_id) { - // Set the session information - // $ae_loc.person_id = person_id; // Set the person_id in the ae_loc store - // $ae_loc.person = person_obj; // Store the full person object for reference - // $ae_loc.user_id = user_id; // Set the user_id in the ae_loc store - // $ae_loc.user = user_obj; // Store the full user object for reference - - console.log(`Successfully authenticated and loaded user and person records: + console.log(`Successfully authenticated and loaded user and person records: user_id: ${user_id}, person_id: ${person_id} `); - // window.location.reload(); // Reload to get the new session - } else { - console.error('Failed to authenticate and load data: missing user_id or person_id'); - } - }); + // window.location.reload(); // Reload to get the new session + } else { + console.error( + 'Failed to authenticate and load data: missing user_id or person_id' + ); + } + }); + }); + // console.log('DONE???', ae_promises); + } else if ($ae_sess.auth__entered_username && $ae_sess.auth__entered_password) { + // Try to use the username/password for authentication + // alert('Attempting to authenticate with Username and Password.'); + ae_promises['user'] = await core_func + .auth_ae_obj__username_password({ + api_cfg: $ae_api, + account_id: $ae_loc.account_id, + // null_account_id: false, // Set to true to allow to authenticate as global user (Super or Manager) + username: $ae_sess.auth__entered_username, + password: $ae_sess.auth__entered_password, + log_lvl: 1 + }) + .then((user_response) => { + if (user_response.user_id_random) { + console.log( + `Successfully authenticated in with Username (${user_response.username}) and Password:`, + user_response + ); + user_obj = user_response; // Store the user object for later use + user_id = user_obj.user_id_random; // Use the user_id_random for further API calls + // person_id = user_obj.person_id_random; + } else { + alert('Failed to authenticate: ' + user_response.error); + } + }) + .then((response) => { + if (!user_id) { + // If we didn't get a user_id, return early + console.error('No user_id obtained from auth_ae_obj__username_password'); + return; + } - }); - // console.log('DONE???', ae_promises); + // Next we need to get the person's information. This is odd because we need to look it up based on the account_id and user_id. There should only be one account person record per user. 99% of the time the user's account ID will be the same as the person's account ID. The exception is for AE Global users (Super or Manager) who can have multiple accounts but only one person record per account. - } else if ($ae_sess.auth__entered_username && $ae_sess.auth__entered_password) { + // let params = { + // user_id_random: user_id, // The user_id_random from the above authentication + // } - // Try to use the username/password for authentication - // alert('Attempting to authenticate with Username and Password.'); - ae_promises['user'] = await core_func.auth_ae_obj__username_password({ - api_cfg: $ae_api, - account_id: $ae_loc.account_id, - // null_account_id: false, // Set to true to allow to authenticate as global user (Super or Manager) - username: $ae_sess.auth__entered_username, - password: $ae_sess.auth__entered_password, - log_lvl: 1, - }).then((user_response) => { - if (user_response.user_id_random) { - console.log(`Successfully authenticated in with Username (${user_response.username}) and Password:`, user_response); - user_obj = user_response; // Store the user object for later use - user_id = user_obj.user_id_random; // Use the user_id_random for further API calls - // person_id = user_obj.person_id_random; - } else { - alert('Failed to authenticate: ' + user_response.error); - } - }).then((response) => { - if (!user_id) { - // If we didn't get a user_id, return early - console.error('No user_id obtained from auth_ae_obj__username_password'); - return; - } + // let params_json: key_val = {}; - // Next we need to get the person's information. This is odd because we need to look it up based on the account_id and user_id. There should only be one account person record per user. 99% of the time the user's account ID will be the same as the person's account ID. The exception is for AE Global users (Super or Manager) who can have multiple accounts but only one person record per account. + // params_json['and_qry'] = {}; - // let params = { - // user_id_random: user_id, // The user_id_random from the above authentication - // } + // if (user_id) { + // params_json['and_qry']['user_id_random'] = user_id; + // } - // let params_json: key_val = {}; + // WARNING: This function returns a list. We only want the first one. There should be no more than 1 record returned. + ae_promises['person'] = core_func + .load_ae_obj_li__person({ + api_cfg: $ae_api, + for_obj_type: 'account', + for_obj_id: $ae_loc.account_id, + qry_user_id: user_id, // The user_id_random from the above authentication + // params_json: params_json, + // params: params, + log_lvl: 1 + }) + .then((person_response) => { + if (person_response[0].person_id_random) { + console.log( + `Successfully loaded person for user_id_random (${user_id}):`, + person_response[0] + ); + person_obj = person_response[0]; + person_id = person_obj.person_id_random; - // params_json['and_qry'] = {}; + trigger = true; // Set trigger to true to indicate we can now sign in + } else { + alert('Failed to load person information: ' + person_response.error); + } + }) + .then(() => { + // Once all promises are resolved, we can check if we have both user_id and person_id + if (user_id && person_id) { + // Set the session information + // $ae_loc.person_id = person_id; // Set the person_id in the ae_loc store + // $ae_loc.person = person_obj; // Store the full person object for reference + // $ae_loc.user_id = user_id; // Set the user_id in the ae_loc store + // $ae_loc.user = user_obj; // Store the full user object for reference - // if (user_id) { - // params_json['and_qry']['user_id_random'] = user_id; - // } - - // WARNING: This function returns a list. We only want the first one. There should be no more than 1 record returned. - ae_promises['person'] = core_func.load_ae_obj_li__person({ - api_cfg: $ae_api, - for_obj_type: 'account', - for_obj_id: $ae_loc.account_id, - qry_user_id: user_id, // The user_id_random from the above authentication - // params_json: params_json, - // params: params, - log_lvl: 1, - }).then((person_response) => { - if (person_response[0].person_id_random) { - console.log(`Successfully loaded person for user_id_random (${user_id}):`, person_response[0]); - person_obj = person_response[0]; - person_id = person_obj.person_id_random; - - trigger = true; // Set trigger to true to indicate we can now sign in - } else { - alert('Failed to load person information: ' + person_response.error); - } - }).then(() => { - // Once all promises are resolved, we can check if we have both user_id and person_id - if (user_id && person_id) { - // Set the session information - // $ae_loc.person_id = person_id; // Set the person_id in the ae_loc store - // $ae_loc.person = person_obj; // Store the full person object for reference - // $ae_loc.user_id = user_id; // Set the user_id in the ae_loc store - // $ae_loc.user = user_obj; // Store the full user object for reference - - console.log(`Successfully authenticated and loaded user and person records: + console.log(`Successfully authenticated and loaded user and person records: user_id: ${user_id}, person_id: ${person_id} `); - // window.location.reload(); // Reload to get the new session - } else { - console.error('Failed to authenticate and load data: missing user_id or person_id'); - } - }); - }); + // window.location.reload(); // Reload to get the new session + } else { + console.error( + 'Failed to authenticate and load data: missing user_id or person_id' + ); + } + }); + }); - // console.log('DONE???', ae_promises); + // console.log('DONE???', ae_promises); + } else { + alert('Please enter either a User ID and Auth Key or Username and Password.'); + return false; // Prevent form submission if no credentials are provided + } + }} + > + {#if $ae_sess.auth__entered_user_id} + ($ae_sess.auth__entered_user_id = e.target.value)} + /> + ($ae_sess.auth__entered_user_key = e.target.value)} + /> + {:else} + ($ae_sess.auth__entered_username = e.target.value)} + /> + ($ae_sess.auth__entered_password = e.target.value)} + /> + {/if} - } else { - alert('Please enter either a User ID and Auth Key or Username and Password.'); - return false; // Prevent form submission if no credentials are provided - } + +
+ {:else} +
+ + {$ae_loc?.user?.username ?? '-- not set --'} + - }} - > - {#if $ae_sess.auth__entered_user_id} + + {#if $ae_loc.edit_mode} + + {/if} - $ae_sess.auth__entered_user_id = e.target.value} - > - $ae_sess.auth__entered_user_key = e.target.value} - > + + +
+ {/if} +
- {:else} +
+ + {#if $ae_loc?.person_id && $ae_loc?.user_id} + + {$ae_loc?.person?.full_name_override ?? $ae_loc?.person?.full_name} + {:else} + + + User sign in: + {/if} + - $ae_sess.auth__entered_username = e.target.value} - > - $ae_sess.auth__entered_password = e.target.value} - > - - {/if} - - - - - {:else} - -
- - {$ae_loc?.user?.username ?? '-- not set --'} - - - - {#if $ae_loc.edit_mode} - - {/if} - - - -
- - {/if} - - - - -
- - {#if $ae_loc?.person_id && $ae_loc?.user_id} - - {$ae_loc?.person?.full_name_override ?? $ae_loc?.person?.full_name} - {:else} - - - User sign in: - {/if} - - - -
- + > + User Sign-In + + {/if} + +
{#if $ae_sess.show__modal_change_password} - - + {/if} - diff --git a/src/lib/app_components/e_app_sys_menu.svelte b/src/lib/app_components/e_app_sys_menu.svelte index d8a0a217..6ac84245 100644 --- a/src/lib/app_components/e_app_sys_menu.svelte +++ b/src/lib/app_components/e_app_sys_menu.svelte @@ -1,55 +1,58 @@ - - @@ -77,14 +80,14 @@ max-w-max --> class:hidden={!expand_btn} > --> -
duration-500 hover:duration-200 ease-in-out " - class:top-0={expand && 1 == 3} - class:opacity-100={expand} - class:w-full={expand} - class:hidden={hide} - class:border-transparent={!expand} - class:bg-transparent={!expand} - > - - - -
duration-200 hover:duration-200 ease-in-out " - title=" + title=" ID: {$ae_loc?.person_id ?? '-- not set --'} / {$ae_loc?.user_id ?? '-- not set --'} Name: {$ae_loc?.person?.full_name ?? '-- not set --'} Username: {$ae_loc?.user?.username ?? '-- not set --'} Email: {$ae_loc?.user?.email ?? '-- not set --'} Access Type: {$ae_loc?.access_type ?? '-- not set --'} " - > + > + {#if $ae_loc?.person_id} +
+ + + {$ae_loc?.person?.informal_name ?? $ae_loc?.person?.given_name} + +
+ {/if} - {#if $ae_loc?.person_id} -
- - - {$ae_loc?.person?.informal_name ?? $ae_loc?.person?.given_name} - -
- {/if} + {#if $ae_loc?.user_id} + +
+ + + {$ae_loc?.user?.username ?? '-- not set --'} + +
+ {/if} - {#if $ae_loc?.user_id} - -
- - - {$ae_loc?.user?.username ?? '-- not set --'} - -
- {/if} +
+ {#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'} + + + -
- {#if $ae_loc.access_type && $ae_loc.access_type != 'anonymous'} - - - + {#if $ae_loc.access_type == 'super'} + + + {:else if $ae_loc.access_type == 'manager'} + + + {:else if $ae_loc.access_type == 'administrator'} + + + {:else if $ae_loc.access_type == 'trusted'} + + + {:else if $ae_loc.access_type == 'public'} + Public + + {:else if $ae_loc.access_type == 'authenticated'} + Authenticated + + {:else if $ae_loc.access_type == 'anonymous'} + Anonymous Access + {:else} + Unknown Access + {/if} + + {#if $ae_loc?.user_access_type && $ae_loc?.access_type == $ae_loc?.user_access_type} + + {:else} + - {:else} - - {/if} - {:else} - + {/if} + {:else} + - {/if} -
+ title="Anonymous public access is currently set. You must Sign In or use a passcode to change your access level." + > + + + + + + {/if} +
- - - {#if $ae_loc.edit_mode} - - {:else if $ae_loc.authenticated_access} - + {:else if $ae_loc.authenticated_access} + - {/if} + title="Click to torn on/enable edit mode. Edit mode is currently off/disabled." + > + + Edit + + + {/if} - - - - - - - - + if ($ae_loc?.access_type == 'anonymous') { + $ae_sess.sys_menu.focus_passcode_input = true; + // $ae_sess.app_cfg.show_element__passcode_input = true; + } else { + // $ae_sess.app_cfg.show_element__passcode_input = false; + $ae_loc.sys_menu.expand_user = false; // Not in use yet + $ae_sess.show__sign_in_out__fields = false; + } + // $ae_loc.app_cfg.show_element__passcode_input = true; + // await tick(); + // console.log('Layout button click: Focus on passcode input!'); + // /** @type {HTMLElement | null} */ + // const to_focus = document.getElementById('access_passcode_input'); + // to_focus?.focus(); + } else { + expand = false; + $ae_sess.sys_menu.expand = false; + // $ae_loc.sys_menu.expand = false; + // $ae_loc.sys_menu.expand_btn = true; + // $ae_loc.app_cfg.show_element__passcode_input = false; + } + // $ae_loc.sys_menu.expand_btn = !expand_btn; + }} + > + + {#if expand} + + {:else} + + {/if} + + + + +
- - - - - - - - - - - + {#if $ae_loc?.app_cfg?.show_element__sign_in_out} + + +
diff --git a/src/lib/app_components/e_app_theme.svelte b/src/lib/app_components/e_app_theme.svelte index 918eb367..7383d014 100644 --- a/src/lib/app_components/e_app_theme.svelte +++ b/src/lib/app_components/e_app_theme.svelte @@ -1,27 +1,23 @@ @@ -35,8 +31,8 @@ if ($ae_loc.app_cfg.theme_mode == 'light') { } -->
+ class:hidden={hide} +> +
+ + + {$ae_loc.theme_name} + + { - // $slct_trigger = 'set_theme_name'; + let new_theme_name = event.target.value; + // document.documentElement.theme = new_theme_name; - let new_theme_name = event.target.value; - // document.documentElement.theme = new_theme_name; + console.log(`$ae_loc?.theme_name=${$ae_loc?.theme_name}`); + // $slct_trigger = null; + // Update the body attribute named "data-theme" to the current theme name. + // document.body.setAttribute('data-theme', new_theme_name); + // document.body.setAttribute('data-theme', $ae_loc?.theme_name); - console.log(`$ae_loc?.theme_name=${$ae_loc?.theme_name}`); - // $slct_trigger = null; - // Update the body attribute named "data-theme" to the current theme name. - // document.body.setAttribute('data-theme', new_theme_name); - // document.body.setAttribute('data-theme', $ae_loc?.theme_name); + // NEW for Tailwind v4: Update the html attribute named "data-theme" to the current theme name. + document.documentElement.setAttribute('data-theme', new_theme_name); - // NEW for Tailwind v4: Update the html attribute named "data-theme" to the current theme name. - document.documentElement.setAttribute('data-theme', new_theme_name); + // if ($ae_loc.theme_mode == 'light') { + // document.documentElement.classList.remove('dark'); + // document.documentElement.classList.add('light'); + // } else if ($ae_loc.theme_mode == 'dark') { + // document.documentElement.classList.remove('light'); + // document.documentElement.classList.add('dark'); + // } + }} + bind:value={$ae_loc.theme_name} + class="select w-32" + title="Theme name" + > + + + + + + + + + + + + + + + + +
- // if ($ae_loc.theme_mode == 'light') { - // document.documentElement.classList.remove('dark'); - // document.documentElement.classList.add('light'); - // } else if ($ae_loc.theme_mode == 'dark') { - // document.documentElement.classList.remove('light'); - // document.documentElement.classList.add('dark'); - // } - }} - bind:value={$ae_loc.theme_name} - class="select w-32" - title="Theme name" - > - - - - - - - - - - - - - - - - - - -
- - {#if expand} - - + > + Hide Theme Options + + - - {:else} - + {:else} + - {/if} + expand = !expand; + }} + title="Change light and dark mode" + > + {#if $ae_loc.theme_mode == 'light'} + + + + + {:else if $ae_loc.theme_mode == 'dark'} + + + + + {/if} + + {/if} +
- - - - - - + - - -
diff --git a/src/lib/components/shad-editor/colorpicker.svelte b/src/lib/components/shad-editor/colorpicker.svelte index e678ec51..e1122f11 100644 --- a/src/lib/components/shad-editor/colorpicker.svelte +++ b/src/lib/components/shad-editor/colorpicker.svelte @@ -1,17 +1,17 @@ - - -
- -
+ + +
+ +
diff --git a/src/lib/components/shad-editor/custom/Extentions/ColorHighlighter.ts b/src/lib/components/shad-editor/custom/Extentions/ColorHighlighter.ts index dca08eca..cf68fcd8 100644 --- a/src/lib/components/shad-editor/custom/Extentions/ColorHighlighter.ts +++ b/src/lib/components/shad-editor/custom/Extentions/ColorHighlighter.ts @@ -1,28 +1,28 @@ -import { Extension } from '@tiptap/core'; -import { Plugin } from '@tiptap/pm/state'; - -import findColors from '../utils.js'; - -export const ColorHighlighter = Extension.create({ - name: 'colorHighlighter', - - addProseMirrorPlugins() { - return [ - new Plugin({ - state: { - init(_, { doc }) { - return findColors(doc); - }, - apply(transaction, oldState) { - return transaction.docChanged ? findColors(transaction.doc) : oldState; - } - }, - props: { - decorations(state) { - return this.getState(state); - } - } - }) - ]; - } -}); +import { Extension } from '@tiptap/core'; +import { Plugin } from '@tiptap/pm/state'; + +import findColors from '../utils.js'; + +export const ColorHighlighter = Extension.create({ + name: 'colorHighlighter', + + addProseMirrorPlugins() { + return [ + new Plugin({ + state: { + init(_, { doc }) { + return findColors(doc); + }, + apply(transaction, oldState) { + return transaction.docChanged ? findColors(transaction.doc) : oldState; + } + }, + props: { + decorations(state) { + return this.getState(state); + } + } + }) + ]; + } +}); diff --git a/src/lib/components/shad-editor/custom/Extentions/ImageExtention.ts b/src/lib/components/shad-editor/custom/Extentions/ImageExtention.ts index 07ad32dd..f64b318c 100644 --- a/src/lib/components/shad-editor/custom/Extentions/ImageExtention.ts +++ b/src/lib/components/shad-editor/custom/Extentions/ImageExtention.ts @@ -1,32 +1,32 @@ -import { SvelteNodeViewRenderer } from 'svelte-tiptap'; -import ImageExtendedComponent from '../image-extended-component.svelte'; -import Image from '@tiptap/extension-image'; - -export const ImageExtension = Image.extend({ - addAttributes() { - return { - src: { - default: null - }, - alt: { - default: null - }, - title: { - default: null - }, - width: { - default: '100%' - }, - height: { - default: null - }, - align: { - default: 'left' - } - }; - }, - - addNodeView: () => { - return SvelteNodeViewRenderer(ImageExtendedComponent); - } -}); +import { SvelteNodeViewRenderer } from 'svelte-tiptap'; +import ImageExtendedComponent from '../image-extended-component.svelte'; +import Image from '@tiptap/extension-image'; + +export const ImageExtension = Image.extend({ + addAttributes() { + return { + src: { + default: null + }, + alt: { + default: null + }, + title: { + default: null + }, + width: { + default: '100%' + }, + height: { + default: null + }, + align: { + default: 'left' + } + }; + }, + + addNodeView: () => { + return SvelteNodeViewRenderer(ImageExtendedComponent); + } +}); diff --git a/src/lib/components/shad-editor/custom/Extentions/SearchAndReplace.ts b/src/lib/components/shad-editor/custom/Extentions/SearchAndReplace.ts index 2245857c..e6d266ad 100644 --- a/src/lib/components/shad-editor/custom/Extentions/SearchAndReplace.ts +++ b/src/lib/components/shad-editor/custom/Extentions/SearchAndReplace.ts @@ -1,406 +1,406 @@ -// MIT License - -// Copyright (c) 2023 - 2024 Jeet Mandaliya (Github Username: sereneinserenade) - -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -import { Extension, type Range, type Dispatch } from '@tiptap/core'; -import { Decoration, DecorationSet } from '@tiptap/pm/view'; -import { Plugin, PluginKey, type EditorState, type Transaction } from '@tiptap/pm/state'; -import { Node as PMNode } from '@tiptap/pm/model'; - -declare module '@tiptap/core' { - interface Commands { - search: { - /** - * @description Set search term in extension. - */ - setSearchTerm: (searchTerm: string) => ReturnType; - /** - * @description Set replace term in extension. - */ - setReplaceTerm: (replaceTerm: string) => ReturnType; - /** - * @description Set case sensitivity in extension. - */ - setCaseSensitive: (caseSensitive: boolean) => ReturnType; - /** - * @description Reset current search result to first instance. - */ - resetIndex: () => ReturnType; - /** - * @description Find next instance of search result. - */ - nextSearchResult: () => ReturnType; - /** - * @description Find previous instance of search result. - */ - previousSearchResult: () => ReturnType; - /** - * @description Replace first instance of search result with given replace term. - */ - replace: () => ReturnType; - /** - * @description Replace all instances of search result with given replace term. - */ - replaceAll: () => ReturnType; - }; - } -} - -interface TextNodesWithPosition { - text: string; - pos: number; -} - -const getRegex = (s: string, disableRegex: boolean, caseSensitive: boolean): RegExp => { - return RegExp( - disableRegex ? s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') : s, - caseSensitive ? 'gu' : 'gui' - ); -}; - -interface ProcessedSearches { - decorationsToReturn: DecorationSet; - results: Range[]; -} - -function processSearches( - doc: PMNode, - searchTerm: RegExp, - searchResultClass: string, - resultIndex: number -): ProcessedSearches { - const decorations: Decoration[] = []; - const results: Range[] = []; - - let textNodesWithPosition: TextNodesWithPosition[] = []; - let index = 0; - - if (!searchTerm) { - return { - decorationsToReturn: DecorationSet.empty, - results: [] - }; - } - - doc?.descendants((node, pos) => { - if (node.isText) { - if (textNodesWithPosition[index]) { - textNodesWithPosition[index] = { - text: textNodesWithPosition[index].text + node.text, - pos: textNodesWithPosition[index].pos - }; - } else { - textNodesWithPosition[index] = { - text: `${node.text}`, - pos - }; - } - } else { - index += 1; - } - }); - - textNodesWithPosition = textNodesWithPosition.filter(Boolean); - - for (const element of textNodesWithPosition) { - const { text, pos } = element; - const matches = Array.from(text.matchAll(searchTerm)).filter(([matchText]) => matchText.trim()); - - for (const m of matches) { - if (m[0] === '') break; - - if (m.index !== undefined) { - results.push({ - from: pos + m.index, - to: pos + m.index + m[0].length - }); - } - } - } - - for (let i = 0; i < results.length; i += 1) { - const r = results[i]; - const className = - i === resultIndex ? `${searchResultClass} ${searchResultClass}-current` : searchResultClass; - const decoration: Decoration = Decoration.inline(r.from, r.to, { - class: className - }); - - decorations.push(decoration); - } - - return { - decorationsToReturn: DecorationSet.create(doc, decorations), - results - }; -} - -const replace = ( - replaceTerm: string, - results: Range[], - { state, dispatch }: { state: EditorState; dispatch: Dispatch } -) => { - const firstResult = results[0]; - - if (!firstResult) return; - - const { from, to } = results[0]; - - if (dispatch) dispatch(state.tr.insertText(replaceTerm, from, to)); -}; - -const rebaseNextResult = ( - replaceTerm: string, - index: number, - lastOffset: number, - results: Range[] -): [number, Range[]] | null => { - const nextIndex = index + 1; - - if (!results[nextIndex]) return null; - - const { from: currentFrom, to: currentTo } = results[index]; - - const offset = currentTo - currentFrom - replaceTerm.length + lastOffset; - - const { from, to } = results[nextIndex]; - - results[nextIndex] = { - to: to - offset, - from: from - offset - }; - - return [offset, results]; -}; - -const replaceAll = ( - replaceTerm: string, - results: Range[], - { tr, dispatch }: { tr: Transaction; dispatch: Dispatch } -) => { - let offset = 0; - - let resultsCopy = results.slice(); - - if (!resultsCopy.length) return; - - for (let i = 0; i < resultsCopy.length; i += 1) { - const { from, to } = resultsCopy[i]; - - tr.insertText(replaceTerm, from, to); - - const rebaseNextResultResponse = rebaseNextResult(replaceTerm, i, offset, resultsCopy); - - if (!rebaseNextResultResponse) continue; - - offset = rebaseNextResultResponse[0]; - resultsCopy = rebaseNextResultResponse[1]; - } - - dispatch(tr); -}; - -export const searchAndReplacePluginKey = new PluginKey('searchAndReplacePlugin'); - -export interface SearchAndReplaceOptions { - searchResultClass: string; - disableRegex: boolean; -} - -export interface SearchAndReplaceStorage { - searchTerm: string; - replaceTerm: string; - results: Range[]; - lastSearchTerm: string; - caseSensitive: boolean; - lastCaseSensitive: boolean; - resultIndex: number; - lastResultIndex: number; -} - -export const SearchAndReplace = Extension.create({ - name: 'searchAndReplace', - - addOptions() { - return { - searchResultClass: 'search-result', - disableRegex: true - }; - }, - - addStorage() { - return { - searchTerm: '', - replaceTerm: '', - results: [], - lastSearchTerm: '', - caseSensitive: false, - lastCaseSensitive: false, - resultIndex: 0, - lastResultIndex: 0 - }; - }, - - addCommands() { - return { - setSearchTerm: - (searchTerm: string) => - ({ editor }) => { - editor.storage.searchAndReplace.searchTerm = searchTerm; - - return false; - }, - setReplaceTerm: - (replaceTerm: string) => - ({ editor }) => { - editor.storage.searchAndReplace.replaceTerm = replaceTerm; - - return false; - }, - setCaseSensitive: - (caseSensitive: boolean) => - ({ editor }) => { - editor.storage.searchAndReplace.caseSensitive = caseSensitive; - - return false; - }, - resetIndex: - () => - ({ editor }) => { - editor.storage.searchAndReplace.resultIndex = 0; - - return false; - }, - nextSearchResult: - () => - ({ editor }) => { - const { results, resultIndex } = editor.storage.searchAndReplace; - - const nextIndex = resultIndex + 1; - - if (results[nextIndex]) { - editor.storage.searchAndReplace.resultIndex = nextIndex; - } else { - editor.storage.searchAndReplace.resultIndex = 0; - } - - return false; - }, - previousSearchResult: - () => - ({ editor }) => { - const { results, resultIndex } = editor.storage.searchAndReplace; - - const prevIndex = resultIndex - 1; - - if (results[prevIndex]) { - editor.storage.searchAndReplace.resultIndex = prevIndex; - } else { - editor.storage.searchAndReplace.resultIndex = results.length - 1; - } - - return false; - }, - replace: - () => - ({ editor, state, dispatch }) => { - const { replaceTerm, results } = editor.storage.searchAndReplace; - - replace(replaceTerm, results, { state, dispatch }); - - return false; - }, - replaceAll: - () => - ({ editor, tr, dispatch }) => { - const { replaceTerm, results } = editor.storage.searchAndReplace; - - replaceAll(replaceTerm, results, { tr, dispatch }); - - return false; - } - }; - }, - - addProseMirrorPlugins() { - const editor = this.editor; - const { searchResultClass, disableRegex } = this.options; - - const setLastSearchTerm = (t: string) => (editor.storage.searchAndReplace.lastSearchTerm = t); - const setLastCaseSensitive = (t: boolean) => - (editor.storage.searchAndReplace.lastCaseSensitive = t); - const setLastResultIndex = (t: number) => (editor.storage.searchAndReplace.lastResultIndex = t); - - return [ - new Plugin({ - key: searchAndReplacePluginKey, - state: { - init: () => DecorationSet.empty, - apply({ doc, docChanged }, oldState) { - const { - searchTerm, - lastSearchTerm, - caseSensitive, - lastCaseSensitive, - resultIndex, - lastResultIndex - } = editor.storage.searchAndReplace; - - if ( - !docChanged && - lastSearchTerm === searchTerm && - lastCaseSensitive === caseSensitive && - lastResultIndex === resultIndex - ) - return oldState; - - setLastSearchTerm(searchTerm); - setLastCaseSensitive(caseSensitive); - setLastResultIndex(resultIndex); - - if (!searchTerm) { - editor.storage.searchAndReplace.results = []; - return DecorationSet.empty; - } - - const { decorationsToReturn, results } = processSearches( - doc, - getRegex(searchTerm, disableRegex, caseSensitive), - searchResultClass, - resultIndex - ); - - editor.storage.searchAndReplace.results = results; - - return decorationsToReturn; - } - }, - props: { - decorations(state) { - return this.getState(state); - } - } - }) - ]; - } -}); - -export default SearchAndReplace; +// MIT License + +// Copyright (c) 2023 - 2024 Jeet Mandaliya (Github Username: sereneinserenade) + +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +import { Extension, type Range, type Dispatch } from '@tiptap/core'; +import { Decoration, DecorationSet } from '@tiptap/pm/view'; +import { Plugin, PluginKey, type EditorState, type Transaction } from '@tiptap/pm/state'; +import { Node as PMNode } from '@tiptap/pm/model'; + +declare module '@tiptap/core' { + interface Commands { + search: { + /** + * @description Set search term in extension. + */ + setSearchTerm: (searchTerm: string) => ReturnType; + /** + * @description Set replace term in extension. + */ + setReplaceTerm: (replaceTerm: string) => ReturnType; + /** + * @description Set case sensitivity in extension. + */ + setCaseSensitive: (caseSensitive: boolean) => ReturnType; + /** + * @description Reset current search result to first instance. + */ + resetIndex: () => ReturnType; + /** + * @description Find next instance of search result. + */ + nextSearchResult: () => ReturnType; + /** + * @description Find previous instance of search result. + */ + previousSearchResult: () => ReturnType; + /** + * @description Replace first instance of search result with given replace term. + */ + replace: () => ReturnType; + /** + * @description Replace all instances of search result with given replace term. + */ + replaceAll: () => ReturnType; + }; + } +} + +interface TextNodesWithPosition { + text: string; + pos: number; +} + +const getRegex = (s: string, disableRegex: boolean, caseSensitive: boolean): RegExp => { + return RegExp( + disableRegex ? s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') : s, + caseSensitive ? 'gu' : 'gui' + ); +}; + +interface ProcessedSearches { + decorationsToReturn: DecorationSet; + results: Range[]; +} + +function processSearches( + doc: PMNode, + searchTerm: RegExp, + searchResultClass: string, + resultIndex: number +): ProcessedSearches { + const decorations: Decoration[] = []; + const results: Range[] = []; + + let textNodesWithPosition: TextNodesWithPosition[] = []; + let index = 0; + + if (!searchTerm) { + return { + decorationsToReturn: DecorationSet.empty, + results: [] + }; + } + + doc?.descendants((node, pos) => { + if (node.isText) { + if (textNodesWithPosition[index]) { + textNodesWithPosition[index] = { + text: textNodesWithPosition[index].text + node.text, + pos: textNodesWithPosition[index].pos + }; + } else { + textNodesWithPosition[index] = { + text: `${node.text}`, + pos + }; + } + } else { + index += 1; + } + }); + + textNodesWithPosition = textNodesWithPosition.filter(Boolean); + + for (const element of textNodesWithPosition) { + const { text, pos } = element; + const matches = Array.from(text.matchAll(searchTerm)).filter(([matchText]) => matchText.trim()); + + for (const m of matches) { + if (m[0] === '') break; + + if (m.index !== undefined) { + results.push({ + from: pos + m.index, + to: pos + m.index + m[0].length + }); + } + } + } + + for (let i = 0; i < results.length; i += 1) { + const r = results[i]; + const className = + i === resultIndex ? `${searchResultClass} ${searchResultClass}-current` : searchResultClass; + const decoration: Decoration = Decoration.inline(r.from, r.to, { + class: className + }); + + decorations.push(decoration); + } + + return { + decorationsToReturn: DecorationSet.create(doc, decorations), + results + }; +} + +const replace = ( + replaceTerm: string, + results: Range[], + { state, dispatch }: { state: EditorState; dispatch: Dispatch } +) => { + const firstResult = results[0]; + + if (!firstResult) return; + + const { from, to } = results[0]; + + if (dispatch) dispatch(state.tr.insertText(replaceTerm, from, to)); +}; + +const rebaseNextResult = ( + replaceTerm: string, + index: number, + lastOffset: number, + results: Range[] +): [number, Range[]] | null => { + const nextIndex = index + 1; + + if (!results[nextIndex]) return null; + + const { from: currentFrom, to: currentTo } = results[index]; + + const offset = currentTo - currentFrom - replaceTerm.length + lastOffset; + + const { from, to } = results[nextIndex]; + + results[nextIndex] = { + to: to - offset, + from: from - offset + }; + + return [offset, results]; +}; + +const replaceAll = ( + replaceTerm: string, + results: Range[], + { tr, dispatch }: { tr: Transaction; dispatch: Dispatch } +) => { + let offset = 0; + + let resultsCopy = results.slice(); + + if (!resultsCopy.length) return; + + for (let i = 0; i < resultsCopy.length; i += 1) { + const { from, to } = resultsCopy[i]; + + tr.insertText(replaceTerm, from, to); + + const rebaseNextResultResponse = rebaseNextResult(replaceTerm, i, offset, resultsCopy); + + if (!rebaseNextResultResponse) continue; + + offset = rebaseNextResultResponse[0]; + resultsCopy = rebaseNextResultResponse[1]; + } + + dispatch(tr); +}; + +export const searchAndReplacePluginKey = new PluginKey('searchAndReplacePlugin'); + +export interface SearchAndReplaceOptions { + searchResultClass: string; + disableRegex: boolean; +} + +export interface SearchAndReplaceStorage { + searchTerm: string; + replaceTerm: string; + results: Range[]; + lastSearchTerm: string; + caseSensitive: boolean; + lastCaseSensitive: boolean; + resultIndex: number; + lastResultIndex: number; +} + +export const SearchAndReplace = Extension.create({ + name: 'searchAndReplace', + + addOptions() { + return { + searchResultClass: 'search-result', + disableRegex: true + }; + }, + + addStorage() { + return { + searchTerm: '', + replaceTerm: '', + results: [], + lastSearchTerm: '', + caseSensitive: false, + lastCaseSensitive: false, + resultIndex: 0, + lastResultIndex: 0 + }; + }, + + addCommands() { + return { + setSearchTerm: + (searchTerm: string) => + ({ editor }) => { + editor.storage.searchAndReplace.searchTerm = searchTerm; + + return false; + }, + setReplaceTerm: + (replaceTerm: string) => + ({ editor }) => { + editor.storage.searchAndReplace.replaceTerm = replaceTerm; + + return false; + }, + setCaseSensitive: + (caseSensitive: boolean) => + ({ editor }) => { + editor.storage.searchAndReplace.caseSensitive = caseSensitive; + + return false; + }, + resetIndex: + () => + ({ editor }) => { + editor.storage.searchAndReplace.resultIndex = 0; + + return false; + }, + nextSearchResult: + () => + ({ editor }) => { + const { results, resultIndex } = editor.storage.searchAndReplace; + + const nextIndex = resultIndex + 1; + + if (results[nextIndex]) { + editor.storage.searchAndReplace.resultIndex = nextIndex; + } else { + editor.storage.searchAndReplace.resultIndex = 0; + } + + return false; + }, + previousSearchResult: + () => + ({ editor }) => { + const { results, resultIndex } = editor.storage.searchAndReplace; + + const prevIndex = resultIndex - 1; + + if (results[prevIndex]) { + editor.storage.searchAndReplace.resultIndex = prevIndex; + } else { + editor.storage.searchAndReplace.resultIndex = results.length - 1; + } + + return false; + }, + replace: + () => + ({ editor, state, dispatch }) => { + const { replaceTerm, results } = editor.storage.searchAndReplace; + + replace(replaceTerm, results, { state, dispatch }); + + return false; + }, + replaceAll: + () => + ({ editor, tr, dispatch }) => { + const { replaceTerm, results } = editor.storage.searchAndReplace; + + replaceAll(replaceTerm, results, { tr, dispatch }); + + return false; + } + }; + }, + + addProseMirrorPlugins() { + const editor = this.editor; + const { searchResultClass, disableRegex } = this.options; + + const setLastSearchTerm = (t: string) => (editor.storage.searchAndReplace.lastSearchTerm = t); + const setLastCaseSensitive = (t: boolean) => + (editor.storage.searchAndReplace.lastCaseSensitive = t); + const setLastResultIndex = (t: number) => (editor.storage.searchAndReplace.lastResultIndex = t); + + return [ + new Plugin({ + key: searchAndReplacePluginKey, + state: { + init: () => DecorationSet.empty, + apply({ doc, docChanged }, oldState) { + const { + searchTerm, + lastSearchTerm, + caseSensitive, + lastCaseSensitive, + resultIndex, + lastResultIndex + } = editor.storage.searchAndReplace; + + if ( + !docChanged && + lastSearchTerm === searchTerm && + lastCaseSensitive === caseSensitive && + lastResultIndex === resultIndex + ) + return oldState; + + setLastSearchTerm(searchTerm); + setLastCaseSensitive(caseSensitive); + setLastResultIndex(resultIndex); + + if (!searchTerm) { + editor.storage.searchAndReplace.results = []; + return DecorationSet.empty; + } + + const { decorationsToReturn, results } = processSearches( + doc, + getRegex(searchTerm, disableRegex, caseSensitive), + searchResultClass, + resultIndex + ); + + editor.storage.searchAndReplace.results = results; + + return decorationsToReturn; + } + }, + props: { + decorations(state) { + return this.getState(state); + } + } + }) + ]; + } +}); + +export default SearchAndReplace; diff --git a/src/lib/components/shad-editor/custom/Extentions/SmilieReplacer.ts b/src/lib/components/shad-editor/custom/Extentions/SmilieReplacer.ts index 0bc89e85..ea90a8f2 100644 --- a/src/lib/components/shad-editor/custom/Extentions/SmilieReplacer.ts +++ b/src/lib/components/shad-editor/custom/Extentions/SmilieReplacer.ts @@ -1,133 +1,133 @@ -import { Extension, textInputRule } from '@tiptap/core'; - -export const SmilieReplacer = Extension.create({ - name: 'smilieReplacer', - - addInputRules() { - return [ - textInputRule({ find: /-___- $/, replace: '😑 ' }), - textInputRule({ find: /:'-\) $/, replace: '😂 ' }), - textInputRule({ find: /':-\) $/, replace: '😅 ' }), - textInputRule({ find: /':-D $/, replace: '😅 ' }), - textInputRule({ find: />:-\) $/, replace: '😆 ' }), - textInputRule({ find: /-__- $/, replace: '😑 ' }), - textInputRule({ find: /':-\( $/, replace: '😓 ' }), - textInputRule({ find: /:'-\( $/, replace: '😢 ' }), - textInputRule({ find: />:-\( $/, replace: '😠 ' }), - textInputRule({ find: /O:-\) $/, replace: '😇 ' }), - textInputRule({ find: /0:-3 $/, replace: '😇 ' }), - textInputRule({ find: /0:-\) $/, replace: '😇 ' }), - textInputRule({ find: /0;\^\) $/, replace: '😇 ' }), - textInputRule({ find: /O;-\) $/, replace: '😇 ' }), - textInputRule({ find: /0;-\) $/, replace: '😇 ' }), - textInputRule({ find: /O:-3 $/, replace: '😇 ' }), - textInputRule({ find: /:'\) $/, replace: '😂 ' }), - textInputRule({ find: /:-D $/, replace: '😃 ' }), - textInputRule({ find: /':\) $/, replace: '😅 ' }), - textInputRule({ find: /'=\) $/, replace: '😅 ' }), - textInputRule({ find: /':D $/, replace: '😅 ' }), - textInputRule({ find: /'=D $/, replace: '😅 ' }), - textInputRule({ find: />:\) $/, replace: '😆 ' }), - textInputRule({ find: />;\) $/, replace: '😆 ' }), - textInputRule({ find: />=\) $/, replace: '😆 ' }), - textInputRule({ find: /;-\) $/, replace: '😉 ' }), - textInputRule({ find: /\*-\) $/, replace: '😉 ' }), - textInputRule({ find: /;-\] $/, replace: '😉 ' }), - textInputRule({ find: /;\^\) $/, replace: '😉 ' }), - textInputRule({ find: /B-\) $/, replace: '😎 ' }), - textInputRule({ find: /8-\) $/, replace: '😎 ' }), - textInputRule({ find: /B-D $/, replace: '😎 ' }), - textInputRule({ find: /8-D $/, replace: '😎 ' }), - textInputRule({ find: /:-\* $/, replace: '😘 ' }), - textInputRule({ find: /:\^\* $/, replace: '😘 ' }), - textInputRule({ find: /:-\) $/, replace: '🙂 ' }), - textInputRule({ find: /-_- $/, replace: '😑 ' }), - textInputRule({ find: /:-X $/, replace: '😶 ' }), - textInputRule({ find: /:-# $/, replace: '😶 ' }), - textInputRule({ find: /:-x $/, replace: '😶 ' }), - textInputRule({ find: />.< $/, replace: '😣 ' }), - textInputRule({ find: /:-O $/, replace: '😮 ' }), - textInputRule({ find: /:-o $/, replace: '😮 ' }), - textInputRule({ find: /O_O $/, replace: '😮 ' }), - textInputRule({ find: />:O $/, replace: '😮 ' }), - textInputRule({ find: /:-P $/, replace: '😛 ' }), - textInputRule({ find: /:-p $/, replace: '😛 ' }), - textInputRule({ find: /:-Þ $/, replace: '😛 ' }), - textInputRule({ find: /:-þ $/, replace: '😛 ' }), - textInputRule({ find: /:-b $/, replace: '😛 ' }), - textInputRule({ find: />:P $/, replace: '😜 ' }), - textInputRule({ find: /X-P $/, replace: '😜 ' }), - textInputRule({ find: /x-p $/, replace: '😜 ' }), - textInputRule({ find: /':\( $/, replace: '😓 ' }), - textInputRule({ find: /'=\( $/, replace: '😓 ' }), - textInputRule({ find: />:\\ $/, replace: '😕 ' }), - textInputRule({ find: />:\/ $/, replace: '😕 ' }), - textInputRule({ find: /:-\/ $/, replace: '😕 ' }), - textInputRule({ find: /:-. $/, replace: '😕 ' }), - textInputRule({ find: />:\[ $/, replace: '😞 ' }), - textInputRule({ find: /:-\( $/, replace: '😞 ' }), - textInputRule({ find: /:-\[ $/, replace: '😞 ' }), - textInputRule({ find: /:'\( $/, replace: '😢 ' }), - textInputRule({ find: /;-\( $/, replace: '😢 ' }), - textInputRule({ find: /#-\) $/, replace: '😵 ' }), - textInputRule({ find: /%-\) $/, replace: '😵 ' }), - textInputRule({ find: /X-\) $/, replace: '😵 ' }), - textInputRule({ find: />:\( $/, replace: '😠 ' }), - textInputRule({ find: /0:3 $/, replace: '😇 ' }), - textInputRule({ find: /0:\) $/, replace: '😇 ' }), - textInputRule({ find: /O:\) $/, replace: '😇 ' }), - textInputRule({ find: /O=\) $/, replace: '😇 ' }), - textInputRule({ find: /O:3 $/, replace: '😇 ' }), - textInputRule({ find: /<\/3 $/, replace: '💔 ' }), - textInputRule({ find: /:D $/, replace: '😃 ' }), - textInputRule({ find: /=D $/, replace: '😃 ' }), - textInputRule({ find: /;\) $/, replace: '😉 ' }), - textInputRule({ find: /\*\) $/, replace: '😉 ' }), - textInputRule({ find: /;\] $/, replace: '😉 ' }), - textInputRule({ find: /;D $/, replace: '😉 ' }), - textInputRule({ find: /B\) $/, replace: '😎 ' }), - textInputRule({ find: /8\) $/, replace: '😎 ' }), - textInputRule({ find: /:\* $/, replace: '😘 ' }), - textInputRule({ find: /=\* $/, replace: '😘 ' }), - textInputRule({ find: /:\) $/, replace: '🙂 ' }), - textInputRule({ find: /=\] $/, replace: '🙂 ' }), - textInputRule({ find: /=\) $/, replace: '🙂 ' }), - textInputRule({ find: /:\] $/, replace: '🙂 ' }), - textInputRule({ find: /:X $/, replace: '😶 ' }), - textInputRule({ find: /:# $/, replace: '😶 ' }), - textInputRule({ find: /=X $/, replace: '😶 ' }), - textInputRule({ find: /=x $/, replace: '😶 ' }), - textInputRule({ find: /:x $/, replace: '😶 ' }), - textInputRule({ find: /=# $/, replace: '😶 ' }), - textInputRule({ find: /:O $/, replace: '😮 ' }), - textInputRule({ find: /:o $/, replace: '😮 ' }), - textInputRule({ find: /:P $/, replace: '😛 ' }), - textInputRule({ find: /=P $/, replace: '😛 ' }), - textInputRule({ find: /:p $/, replace: '😛 ' }), - textInputRule({ find: /=p $/, replace: '😛 ' }), - textInputRule({ find: /:Þ $/, replace: '😛 ' }), - textInputRule({ find: /:þ $/, replace: '😛 ' }), - textInputRule({ find: /:b $/, replace: '😛 ' }), - textInputRule({ find: /d: $/, replace: '😛 ' }), - textInputRule({ find: /:\/ $/, replace: '😕 ' }), - textInputRule({ find: /:\\ $/, replace: '😕 ' }), - textInputRule({ find: /=\/ $/, replace: '😕 ' }), - textInputRule({ find: /=\\ $/, replace: '😕 ' }), - textInputRule({ find: /:L $/, replace: '😕 ' }), - textInputRule({ find: /=L $/, replace: '😕 ' }), - textInputRule({ find: /:\( $/, replace: '😞 ' }), - textInputRule({ find: /:\[ $/, replace: '😞 ' }), - textInputRule({ find: /=\( $/, replace: '😞 ' }), - textInputRule({ find: /;\( $/, replace: '😢 ' }), - textInputRule({ find: /D: $/, replace: '😨 ' }), - textInputRule({ find: /:\$ $/, replace: '😳 ' }), - textInputRule({ find: /=\$ $/, replace: '😳 ' }), - textInputRule({ find: /#\) $/, replace: '😵 ' }), - textInputRule({ find: /%\) $/, replace: '😵 ' }), - textInputRule({ find: /X\) $/, replace: '😵 ' }), - textInputRule({ find: /:@ $/, replace: '😠 ' }), - textInputRule({ find: /<3 $/, replace: '❤️ ' }), - textInputRule({ find: /\/shrug $/, replace: '¯\\_(ツ)_/¯' }) - ]; - } -}); +import { Extension, textInputRule } from '@tiptap/core'; + +export const SmilieReplacer = Extension.create({ + name: 'smilieReplacer', + + addInputRules() { + return [ + textInputRule({ find: /-___- $/, replace: '😑 ' }), + textInputRule({ find: /:'-\) $/, replace: '😂 ' }), + textInputRule({ find: /':-\) $/, replace: '😅 ' }), + textInputRule({ find: /':-D $/, replace: '😅 ' }), + textInputRule({ find: />:-\) $/, replace: '😆 ' }), + textInputRule({ find: /-__- $/, replace: '😑 ' }), + textInputRule({ find: /':-\( $/, replace: '😓 ' }), + textInputRule({ find: /:'-\( $/, replace: '😢 ' }), + textInputRule({ find: />:-\( $/, replace: '😠 ' }), + textInputRule({ find: /O:-\) $/, replace: '😇 ' }), + textInputRule({ find: /0:-3 $/, replace: '😇 ' }), + textInputRule({ find: /0:-\) $/, replace: '😇 ' }), + textInputRule({ find: /0;\^\) $/, replace: '😇 ' }), + textInputRule({ find: /O;-\) $/, replace: '😇 ' }), + textInputRule({ find: /0;-\) $/, replace: '😇 ' }), + textInputRule({ find: /O:-3 $/, replace: '😇 ' }), + textInputRule({ find: /:'\) $/, replace: '😂 ' }), + textInputRule({ find: /:-D $/, replace: '😃 ' }), + textInputRule({ find: /':\) $/, replace: '😅 ' }), + textInputRule({ find: /'=\) $/, replace: '😅 ' }), + textInputRule({ find: /':D $/, replace: '😅 ' }), + textInputRule({ find: /'=D $/, replace: '😅 ' }), + textInputRule({ find: />:\) $/, replace: '😆 ' }), + textInputRule({ find: />;\) $/, replace: '😆 ' }), + textInputRule({ find: />=\) $/, replace: '😆 ' }), + textInputRule({ find: /;-\) $/, replace: '😉 ' }), + textInputRule({ find: /\*-\) $/, replace: '😉 ' }), + textInputRule({ find: /;-\] $/, replace: '😉 ' }), + textInputRule({ find: /;\^\) $/, replace: '😉 ' }), + textInputRule({ find: /B-\) $/, replace: '😎 ' }), + textInputRule({ find: /8-\) $/, replace: '😎 ' }), + textInputRule({ find: /B-D $/, replace: '😎 ' }), + textInputRule({ find: /8-D $/, replace: '😎 ' }), + textInputRule({ find: /:-\* $/, replace: '😘 ' }), + textInputRule({ find: /:\^\* $/, replace: '😘 ' }), + textInputRule({ find: /:-\) $/, replace: '🙂 ' }), + textInputRule({ find: /-_- $/, replace: '😑 ' }), + textInputRule({ find: /:-X $/, replace: '😶 ' }), + textInputRule({ find: /:-# $/, replace: '😶 ' }), + textInputRule({ find: /:-x $/, replace: '😶 ' }), + textInputRule({ find: />.< $/, replace: '😣 ' }), + textInputRule({ find: /:-O $/, replace: '😮 ' }), + textInputRule({ find: /:-o $/, replace: '😮 ' }), + textInputRule({ find: /O_O $/, replace: '😮 ' }), + textInputRule({ find: />:O $/, replace: '😮 ' }), + textInputRule({ find: /:-P $/, replace: '😛 ' }), + textInputRule({ find: /:-p $/, replace: '😛 ' }), + textInputRule({ find: /:-Þ $/, replace: '😛 ' }), + textInputRule({ find: /:-þ $/, replace: '😛 ' }), + textInputRule({ find: /:-b $/, replace: '😛 ' }), + textInputRule({ find: />:P $/, replace: '😜 ' }), + textInputRule({ find: /X-P $/, replace: '😜 ' }), + textInputRule({ find: /x-p $/, replace: '😜 ' }), + textInputRule({ find: /':\( $/, replace: '😓 ' }), + textInputRule({ find: /'=\( $/, replace: '😓 ' }), + textInputRule({ find: />:\\ $/, replace: '😕 ' }), + textInputRule({ find: />:\/ $/, replace: '😕 ' }), + textInputRule({ find: /:-\/ $/, replace: '😕 ' }), + textInputRule({ find: /:-. $/, replace: '😕 ' }), + textInputRule({ find: />:\[ $/, replace: '😞 ' }), + textInputRule({ find: /:-\( $/, replace: '😞 ' }), + textInputRule({ find: /:-\[ $/, replace: '😞 ' }), + textInputRule({ find: /:'\( $/, replace: '😢 ' }), + textInputRule({ find: /;-\( $/, replace: '😢 ' }), + textInputRule({ find: /#-\) $/, replace: '😵 ' }), + textInputRule({ find: /%-\) $/, replace: '😵 ' }), + textInputRule({ find: /X-\) $/, replace: '😵 ' }), + textInputRule({ find: />:\( $/, replace: '😠 ' }), + textInputRule({ find: /0:3 $/, replace: '😇 ' }), + textInputRule({ find: /0:\) $/, replace: '😇 ' }), + textInputRule({ find: /O:\) $/, replace: '😇 ' }), + textInputRule({ find: /O=\) $/, replace: '😇 ' }), + textInputRule({ find: /O:3 $/, replace: '😇 ' }), + textInputRule({ find: /<\/3 $/, replace: '💔 ' }), + textInputRule({ find: /:D $/, replace: '😃 ' }), + textInputRule({ find: /=D $/, replace: '😃 ' }), + textInputRule({ find: /;\) $/, replace: '😉 ' }), + textInputRule({ find: /\*\) $/, replace: '😉 ' }), + textInputRule({ find: /;\] $/, replace: '😉 ' }), + textInputRule({ find: /;D $/, replace: '😉 ' }), + textInputRule({ find: /B\) $/, replace: '😎 ' }), + textInputRule({ find: /8\) $/, replace: '😎 ' }), + textInputRule({ find: /:\* $/, replace: '😘 ' }), + textInputRule({ find: /=\* $/, replace: '😘 ' }), + textInputRule({ find: /:\) $/, replace: '🙂 ' }), + textInputRule({ find: /=\] $/, replace: '🙂 ' }), + textInputRule({ find: /=\) $/, replace: '🙂 ' }), + textInputRule({ find: /:\] $/, replace: '🙂 ' }), + textInputRule({ find: /:X $/, replace: '😶 ' }), + textInputRule({ find: /:# $/, replace: '😶 ' }), + textInputRule({ find: /=X $/, replace: '😶 ' }), + textInputRule({ find: /=x $/, replace: '😶 ' }), + textInputRule({ find: /:x $/, replace: '😶 ' }), + textInputRule({ find: /=# $/, replace: '😶 ' }), + textInputRule({ find: /:O $/, replace: '😮 ' }), + textInputRule({ find: /:o $/, replace: '😮 ' }), + textInputRule({ find: /:P $/, replace: '😛 ' }), + textInputRule({ find: /=P $/, replace: '😛 ' }), + textInputRule({ find: /:p $/, replace: '😛 ' }), + textInputRule({ find: /=p $/, replace: '😛 ' }), + textInputRule({ find: /:Þ $/, replace: '😛 ' }), + textInputRule({ find: /:þ $/, replace: '😛 ' }), + textInputRule({ find: /:b $/, replace: '😛 ' }), + textInputRule({ find: /d: $/, replace: '😛 ' }), + textInputRule({ find: /:\/ $/, replace: '😕 ' }), + textInputRule({ find: /:\\ $/, replace: '😕 ' }), + textInputRule({ find: /=\/ $/, replace: '😕 ' }), + textInputRule({ find: /=\\ $/, replace: '😕 ' }), + textInputRule({ find: /:L $/, replace: '😕 ' }), + textInputRule({ find: /=L $/, replace: '😕 ' }), + textInputRule({ find: /:\( $/, replace: '😞 ' }), + textInputRule({ find: /:\[ $/, replace: '😞 ' }), + textInputRule({ find: /=\( $/, replace: '😞 ' }), + textInputRule({ find: /;\( $/, replace: '😢 ' }), + textInputRule({ find: /D: $/, replace: '😨 ' }), + textInputRule({ find: /:\$ $/, replace: '😳 ' }), + textInputRule({ find: /=\$ $/, replace: '😳 ' }), + textInputRule({ find: /#\) $/, replace: '😵 ' }), + textInputRule({ find: /%\) $/, replace: '😵 ' }), + textInputRule({ find: /X\) $/, replace: '😵 ' }), + textInputRule({ find: /:@ $/, replace: '😠 ' }), + textInputRule({ find: /<3 $/, replace: '❤️ ' }), + textInputRule({ find: /\/shrug $/, replace: '¯\\_(ツ)_/¯' }) + ]; + } +}); diff --git a/src/lib/components/shad-editor/custom/code-extended.svelte b/src/lib/components/shad-editor/custom/code-extended.svelte index bbe11cee..78412953 100644 --- a/src/lib/components/shad-editor/custom/code-extended.svelte +++ b/src/lib/components/shad-editor/custom/code-extended.svelte @@ -1,78 +1,78 @@ - - - - - {defaultLanguage} - - - - {#each languages as language} - { - defaultLanguage = language; - updateAttributes({ language: defaultLanguage }); - }} - > - {language} - - {/each} - - - -
-			
-	
-
+ + + + + {defaultLanguage} + + + + {#each languages as language} + { + defaultLanguage = language; + updateAttributes({ language: defaultLanguage }); + }} + > + {language} + + {/each} + + + +
+			
+	
+
diff --git a/src/lib/components/shad-editor/custom/image-extended-component.svelte b/src/lib/components/shad-editor/custom/image-extended-component.svelte index 072ba459..8aa4840a 100644 --- a/src/lib/components/shad-editor/custom/image-extended-component.svelte +++ b/src/lib/components/shad-editor/custom/image-extended-component.svelte @@ -1,251 +1,251 @@ - - - -
- {node.attrs.alt} - {#if node.attrs.title !== null && node.attrs.title.trim() !== ''} - { - if (e.target === null) return; - //@ts-ignore - updateAttributes({ title: e.target.value }); - }} - /> - {/if} - - {#if editor?.isEditable} -
{ - handleResizingPosition(event, 'left'); - }} - ontouchstart={(event: TouchEvent) => { - handleTouchStart(event, 'left'); - }} - > -
-
- -
{ - handleResizingPosition(event, 'right'); - }} - ontouchstart={(event: TouchEvent) => { - handleTouchStart(event, 'right'); - }} - > -
-
-
- - - - (openedMore = value)}> - - - - - { - if (node.attrs.title === null || node.attrs.title.trim() === '') - updateAttributes({ - title: 'Image Caption' - }); - }} - > - Caption - - { - duplicateContent(editor); - }} - > - Duplicate - - { - updateAttributes({ - width: 'fit-content' - }); - }} - > - Full Screen - - { - deleteNode(); - }} - class="text-destructive" - > - Delete - - - -
- {/if} -
-
+ + + +
+ {node.attrs.alt} + {#if node.attrs.title !== null && node.attrs.title.trim() !== ''} + { + if (e.target === null) return; + //@ts-ignore + updateAttributes({ title: e.target.value }); + }} + /> + {/if} + + {#if editor?.isEditable} +
{ + handleResizingPosition(event, 'left'); + }} + ontouchstart={(event: TouchEvent) => { + handleTouchStart(event, 'left'); + }} + > +
+
+ +
{ + handleResizingPosition(event, 'right'); + }} + ontouchstart={(event: TouchEvent) => { + handleTouchStart(event, 'right'); + }} + > +
+
+
+ + + + (openedMore = value)}> + + + + + { + if (node.attrs.title === null || node.attrs.title.trim() === '') + updateAttributes({ + title: 'Image Caption' + }); + }} + > + Caption + + { + duplicateContent(editor); + }} + > + Duplicate + + { + updateAttributes({ + width: 'fit-content' + }); + }} + > + Full Screen + + { + deleteNode(); + }} + class="text-destructive" + > + Delete + + + +
+ {/if} +
+
diff --git a/src/lib/components/shad-editor/custom/utils.ts b/src/lib/components/shad-editor/custom/utils.ts index 02e8c95e..14ef0825 100644 --- a/src/lib/components/shad-editor/custom/utils.ts +++ b/src/lib/components/shad-editor/custom/utils.ts @@ -1,43 +1,43 @@ -import type { Editor } from '@tiptap/core'; -import { Node } from '@tiptap/pm/model'; -import { Decoration, DecorationSet } from '@tiptap/pm/view'; - -export default function (doc: Node): DecorationSet { - const hexColor = /(#[0-9a-f]{3,6})\b/gi; - const decorations: Decoration[] = []; - - doc.descendants((node, position) => { - if (!node.text) { - return; - } - - Array.from(node.text.matchAll(hexColor)).forEach((match) => { - const color = match[0]; - const index = match.index || 0; - const from = position + index; - const to = from + color.length; - const decoration = Decoration.inline(from, to, { - class: 'color', - style: `--color: ${color}` - }); - - decorations.push(decoration); - }); - }); - - return DecorationSet.create(doc, decorations); -} - -export const duplicateContent = (editor: Editor) => { - const { view } = editor; - const { state } = view; - const { selection } = state; - - editor - .chain() - .insertContentAt(selection.to, selection.content().content.firstChild?.toJSON(), { - updateSelection: true - }) - .focus(selection.to) - .run(); -}; +import type { Editor } from '@tiptap/core'; +import { Node } from '@tiptap/pm/model'; +import { Decoration, DecorationSet } from '@tiptap/pm/view'; + +export default function (doc: Node): DecorationSet { + const hexColor = /(#[0-9a-f]{3,6})\b/gi; + const decorations: Decoration[] = []; + + doc.descendants((node, position) => { + if (!node.text) { + return; + } + + Array.from(node.text.matchAll(hexColor)).forEach((match) => { + const color = match[0]; + const index = match.index || 0; + const from = position + index; + const to = from + color.length; + const decoration = Decoration.inline(from, to, { + class: 'color', + style: `--color: ${color}` + }); + + decorations.push(decoration); + }); + }); + + return DecorationSet.create(doc, decorations); +} + +export const duplicateContent = (editor: Editor) => { + const { view } = editor; + const { state } = view; + const { selection } = state; + + editor + .chain() + .insertContentAt(selection.to, selection.content().content.firstChild?.toJSON(), { + updateSelection: true + }) + .focus(selection.to) + .run(); +}; diff --git a/src/lib/components/shad-editor/editor-toolbar.svelte b/src/lib/components/shad-editor/editor-toolbar.svelte index 92581cd9..ce0fbfe2 100644 --- a/src/lib/components/shad-editor/editor-toolbar.svelte +++ b/src/lib/components/shad-editor/editor-toolbar.svelte @@ -1,172 +1,181 @@ - - -
- - {#if show_button_kv.undo} - - {/if} - {#if show_button_kv.redo} - - {/if} - - - - {#if show_button_kv.text} - - {/if} - - - {#if show_button_kv.bold} - - {/if} - {#if show_button_kv.italic} - - {/if} - {#if show_button_kv.underline} - - {/if} - {#if show_button_kv.strikethrough} - - {/if} - - - {#if show_button_kv.align} - - {/if} - {#if show_button_kv.link} - - {/if} - {#if show_button_kv.code} - - {/if} - {#if show_button_kv.blockquote} -
- {/if} - {#if show_button_kv.subscript} - - {/if} - {#if show_button_kv.superscript} - - {/if} - {#if show_button_kv.bullet_list} - - {/if} - {#if show_button_kv.ordered_list} - - {/if} - {#if show_button_kv.task_list} - - {/if} - - {#if show_button_kv.table} - - {/if} - - - cxx - {#if show_button_kv.text_color} - - {/if} - {#if show_button_kv.highlighter} - - {/if} - {#if show_button_kv.quick_color} - - {/if} - - - {#if show_button_kv.search_replace} - - {/if} - - + + +
+ + {#if show_button_kv.undo} + + {/if} + {#if show_button_kv.redo} + + {/if} + + + + {#if show_button_kv.text} + + {/if} + + + {#if show_button_kv.bold} + + {/if} + {#if show_button_kv.italic} + + {/if} + {#if show_button_kv.underline} + + {/if} + {#if show_button_kv.strikethrough} + + {/if} + + + {#if show_button_kv.align} + + {/if} + {#if show_button_kv.link} + + {/if} + {#if show_button_kv.code} + + {/if} + {#if show_button_kv.blockquote} +
+ {/if} + {#if show_button_kv.subscript} + + {/if} + {#if show_button_kv.superscript} + + {/if} + {#if show_button_kv.bullet_list} + + {/if} + {#if show_button_kv.ordered_list} + + {/if} + {#if show_button_kv.task_list} + + {/if} + + {#if show_button_kv.table} +
+ {/if} + + + cxx + {#if show_button_kv.text_color} + + {/if} + {#if show_button_kv.highlighter} + + {/if} + {#if show_button_kv.quick_color} + + {/if} + + + {#if show_button_kv.search_replace} + + {/if} + + diff --git a/src/lib/components/shad-editor/editor.css b/src/lib/components/shad-editor/editor.css index c2568fe6..63995c09 100644 --- a/src/lib/components/shad-editor/editor.css +++ b/src/lib/components/shad-editor/editor.css @@ -1,159 +1,157 @@ -@import 'tailwindcss'; - -@import "@skeletonlabs/skeleton"; -@import "@skeletonlabs/skeleton/optional/presets"; - -/* @import "tailwindcss/preflight"; */ -/* @tailwind utilities; */ - -@import '@skeletonlabs/skeleton/themes/cerberus'; -@import '@skeletonlabs/skeleton/themes/modern'; -@import '@skeletonlabs/skeleton/themes/wintry'; - -@source '../node_modules/@skeletonlabs/skeleton-svelte/dist'; - -@import "tailwindcss/utilities.css" layer(utilities); - - -.tiptap :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { - margin-top: 0 !important; - margin-bottom: 0 !important; -} - -.tiptap code:not(pre code) { - /* Remove the before and after pseudo elements */ - @apply rounded-sm border bg-black/50 p-1 before:content-[''] after:content-['']; -} - -.tiptap blockquote p { - @apply before:content-[''] after:content-['']; -} - -.tiptap a { - @apply text-blue-600 underline; -} - -ul[data-type='taskList'] { - list-style: none; - margin: 0; - padding: 0; -} - -ul[data-type='taskList'] li { - display: flex; - align-items: center; -} - -ul li, -ol li { - margin-top: 0 !important; - margin-bottom: 0 !important; -} - -ul[data-type='taskList'] li label { - flex: 0 0 auto; - margin-right: 0.5rem; - user-select: none; -} - -ul[data-type='taskList'] li div { - flex: 1 1 auto; -} - -ul[data-type='taskList'] li label { - display: flex; - align-items: center; - justify-content: center; -} - -ul[data-type='taskList'] li[data-checked='true'] div { - @apply text-black/50 line-through; -} - -input[type='checkbox'] { - @apply size-4 cursor-pointer rounded-sm; - /* This kills compiling !important */ -} - -ul[data-type='taskList'] ul[data-type='taskList'] { - margin: 0; -} - -/* Color swatches */ -.color { - @apply whitespace-nowrap; -} - -.color::before { - @apply mb-[0.15rem] mr-[0.1rem] inline-block size-[1rem] rounded-sm border border-black/50 align-middle; - background-color: var(--color); - content: ' '; -} - -/* Table-specific styling */ -.tiptap table { - border-collapse: collapse; - margin: 0; - overflow: hidden; - table-layout: fixed; - width: 100%; -} - -.tiptap table td, -.tiptap table th { - @apply border border-black/50; - box-sizing: border-box; - min-width: 1em; - padding: 6px 8px; - position: relative; - vertical-align: top; -} - -.tiptap table td > *, -.tiptap table th > * { - margin-bottom: 0; -} - -.tiptap table th { - @apply bg-black/50 text-left; - /* Kills compile: font-bold */ - font-weight: bold; - -} - -.tiptap table .selectedCell:after { - @apply pointer-events-none absolute bottom-0 left-0 right-0 top-0 border-[2px] border-black/50; - content: ''; - z-index: 2; -} - -.tiptap table .column-resize-handle { - @apply pointer-events-none absolute -bottom-[2px] -right-[2px] top-0 w-1 bg-black/50; -} - -.tiptap .tableWrapper { - margin: 1.5rem 0; - overflow-x: auto; -} - -.tiptap.resize-cursor { - cursor: ew-resize; - cursor: col-resize; -} - -/* Tiptap code block */ -.tiptap pre { - @apply m-0 flex h-fit overflow-auto !rounded-none bg-transparent p-0; -} - -.tiptap pre code { - @apply flex-1 !rounded-none bg-transparent p-0 text-inherit; -} - -.tiptap .search-result { - background-color: yellow; -} - -.tiptap .search-result-current { - background-color: orange; -} +@import 'tailwindcss'; + +@import '@skeletonlabs/skeleton'; +@import '@skeletonlabs/skeleton/optional/presets'; + +/* @import "tailwindcss/preflight"; */ +/* @tailwind utilities; */ + +@import '@skeletonlabs/skeleton/themes/cerberus'; +@import '@skeletonlabs/skeleton/themes/modern'; +@import '@skeletonlabs/skeleton/themes/wintry'; + +@source '../node_modules/@skeletonlabs/skeleton-svelte/dist'; + +@import 'tailwindcss/utilities.css' layer(utilities); + +.tiptap :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.tiptap code:not(pre code) { + /* Remove the before and after pseudo elements */ + @apply rounded-sm border bg-black/50 p-1 before:content-[''] after:content-['']; +} + +.tiptap blockquote p { + @apply before:content-[''] after:content-['']; +} + +.tiptap a { + @apply text-blue-600 underline; +} + +ul[data-type='taskList'] { + list-style: none; + margin: 0; + padding: 0; +} + +ul[data-type='taskList'] li { + display: flex; + align-items: center; +} + +ul li, +ol li { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +ul[data-type='taskList'] li label { + flex: 0 0 auto; + margin-right: 0.5rem; + user-select: none; +} + +ul[data-type='taskList'] li div { + flex: 1 1 auto; +} + +ul[data-type='taskList'] li label { + display: flex; + align-items: center; + justify-content: center; +} + +ul[data-type='taskList'] li[data-checked='true'] div { + @apply text-black/50 line-through; +} + +input[type='checkbox'] { + @apply size-4 cursor-pointer rounded-sm; + /* This kills compiling !important */ +} + +ul[data-type='taskList'] ul[data-type='taskList'] { + margin: 0; +} + +/* Color swatches */ +.color { + @apply whitespace-nowrap; +} + +.color::before { + @apply mb-[0.15rem] mr-[0.1rem] inline-block size-[1rem] rounded-sm border border-black/50 align-middle; + background-color: var(--color); + content: ' '; +} + +/* Table-specific styling */ +.tiptap table { + border-collapse: collapse; + margin: 0; + overflow: hidden; + table-layout: fixed; + width: 100%; +} + +.tiptap table td, +.tiptap table th { + @apply border border-black/50; + box-sizing: border-box; + min-width: 1em; + padding: 6px 8px; + position: relative; + vertical-align: top; +} + +.tiptap table td > *, +.tiptap table th > * { + margin-bottom: 0; +} + +.tiptap table th { + @apply bg-black/50 text-left; + /* Kills compile: font-bold */ + font-weight: bold; +} + +.tiptap table .selectedCell:after { + @apply pointer-events-none absolute bottom-0 left-0 right-0 top-0 border-[2px] border-black/50; + content: ''; + z-index: 2; +} + +.tiptap table .column-resize-handle { + @apply pointer-events-none absolute -bottom-[2px] -right-[2px] top-0 w-1 bg-black/50; +} + +.tiptap .tableWrapper { + margin: 1.5rem 0; + overflow-x: auto; +} + +.tiptap.resize-cursor { + cursor: ew-resize; + cursor: col-resize; +} + +/* Tiptap code block */ +.tiptap pre { + @apply m-0 flex h-fit overflow-auto !rounded-none bg-transparent p-0; +} + +.tiptap pre code { + @apply flex-1 !rounded-none bg-transparent p-0 text-inherit; +} + +.tiptap .search-result { + background-color: yellow; +} + +.tiptap .search-result-current { + background-color: orange; +} diff --git a/src/lib/components/shad-editor/icons/block-quote.svelte b/src/lib/components/shad-editor/icons/block-quote.svelte index 77046fd7..893b6cae 100644 --- a/src/lib/components/shad-editor/icons/block-quote.svelte +++ b/src/lib/components/shad-editor/icons/block-quote.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Block Quote (⌘⇧B)

-
-
-
+ + + + + + + + +

Block Quote (⌘⇧B)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/bold.svelte b/src/lib/components/shad-editor/icons/bold.svelte index a6f32636..80c31d49 100644 --- a/src/lib/components/shad-editor/icons/bold.svelte +++ b/src/lib/components/shad-editor/icons/bold.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Bold (⌘B)

-
-
-
+ + + + + + + + +

Bold (⌘B)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/buttle-list.svelte b/src/lib/components/shad-editor/icons/buttle-list.svelte index ade1ff65..bfe5106e 100644 --- a/src/lib/components/shad-editor/icons/buttle-list.svelte +++ b/src/lib/components/shad-editor/icons/buttle-list.svelte @@ -1,27 +1,27 @@ - - - - - - - - -

Bullet List (⌘⇧8)

-
-
-
+ + + + + + + + +

Bullet List (⌘⇧8)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/code.svelte b/src/lib/components/shad-editor/icons/code.svelte index 5fc23b3b..a6faf183 100644 --- a/src/lib/components/shad-editor/icons/code.svelte +++ b/src/lib/components/shad-editor/icons/code.svelte @@ -1,27 +1,27 @@ - - - - - - - - -

Code (⌘E)

-
-
-
+ + + + + + + + +

Code (⌘E)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/highlighter.svelte b/src/lib/components/shad-editor/icons/highlighter.svelte index d57096c7..47885c6b 100644 --- a/src/lib/components/shad-editor/icons/highlighter.svelte +++ b/src/lib/components/shad-editor/icons/highlighter.svelte @@ -1,75 +1,75 @@ - - - - - - - - - - -
-

Pick a highlight color

- - - -
-
- { - if (event.detail.hex === undefined) return; - color = event.detail.hex; - editor.chain().focus().setHighlight({ color }).run(); - }} - isDialog={false} - --picker-indicator-size="1rem" - --input-size="1rem" - /> -
-
- -
-
-
-
- -

Highlighter (⌘⇧H)

-
-
-
+ + + + + + + + + + +
+

Pick a highlight color

+ + + +
+
+ { + if (event.detail.hex === undefined) return; + color = event.detail.hex; + editor.chain().focus().setHighlight({ color }).run(); + }} + isDialog={false} + --picker-indicator-size="1rem" + --input-size="1rem" + /> +
+
+ +
+
+
+
+ +

Highlighter (⌘⇧H)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/image.svelte b/src/lib/components/shad-editor/icons/image.svelte index 69c94f29..2e4ea242 100644 --- a/src/lib/components/shad-editor/icons/image.svelte +++ b/src/lib/components/shad-editor/icons/image.svelte @@ -1,73 +1,73 @@ - - - - - - - - - - -
-

Image

- - - -
-

Insert image url

- { - if (e !== null && e.target !== null) { - //@ts-ignore - editor.chain().focus().setImage({ src: e.target.value }).run(); - } - }} - class="w-full" - /> -

OR Pick an Image

- { - //@ts-ignore - if (e.target && e.target.files) { - //@ts-ignore - const files = Array.from(e.target.files || []); - files.map((file) => { - const reader = new FileReader(); - reader.onload = () => { - const src = reader.result as string; - editor.chain().focus().setImage({ src }).run(); - }; - //@ts-ignore - reader.readAsDataURL(file); - }); - } - }} - /> -
-
-
- -

Add Image

-
-
-
+ + + + + + + + + + +
+

Image

+ + + +
+

Insert image url

+ { + if (e !== null && e.target !== null) { + //@ts-ignore + editor.chain().focus().setImage({ src: e.target.value }).run(); + } + }} + class="w-full" + /> +

OR Pick an Image

+ { + //@ts-ignore + if (e.target && e.target.files) { + //@ts-ignore + const files = Array.from(e.target.files || []); + files.map((file) => { + const reader = new FileReader(); + reader.onload = () => { + const src = reader.result as string; + editor.chain().focus().setImage({ src }).run(); + }; + //@ts-ignore + reader.readAsDataURL(file); + }); + } + }} + /> +
+
+
+ +

Add Image

+
+
+
diff --git a/src/lib/components/shad-editor/icons/italic.svelte b/src/lib/components/shad-editor/icons/italic.svelte index 078b0fa3..01d85ab9 100644 --- a/src/lib/components/shad-editor/icons/italic.svelte +++ b/src/lib/components/shad-editor/icons/italic.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Italic (⌘I)

-
-
-
+ + + + + + + + +

Italic (⌘I)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/link.svelte b/src/lib/components/shad-editor/icons/link.svelte index beb2e401..f81d3cb0 100644 --- a/src/lib/components/shad-editor/icons/link.svelte +++ b/src/lib/components/shad-editor/icons/link.svelte @@ -1,72 +1,72 @@ - - - - - - - - - - -
-

Link

- - - -
-

Insert or remove link from selected text.

- { - //@ts-ignore - if (e !== null && e.target !== null) setLink(e.target.value); - }} - class="w-full" - /> -
- - -
-
-
-
- -

Add Or Remove Link

-
-
-
+ + + + + + + + + + +
+

Link

+ + + +
+

Insert or remove link from selected text.

+ { + //@ts-ignore + if (e !== null && e.target !== null) setLink(e.target.value); + }} + class="w-full" + /> +
+ + +
+
+
+
+ +

Add Or Remove Link

+
+
+
diff --git a/src/lib/components/shad-editor/icons/ordered-list.svelte b/src/lib/components/shad-editor/icons/ordered-list.svelte index fd2dbebf..5a6b31a3 100644 --- a/src/lib/components/shad-editor/icons/ordered-list.svelte +++ b/src/lib/components/shad-editor/icons/ordered-list.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Ordered List

-
-
-
+ + + + + + + + +

Ordered List

+
+
+
diff --git a/src/lib/components/shad-editor/icons/quickcolor.svelte b/src/lib/components/shad-editor/icons/quickcolor.svelte index d3c1b171..31162777 100644 --- a/src/lib/components/shad-editor/icons/quickcolor.svelte +++ b/src/lib/components/shad-editor/icons/quickcolor.svelte @@ -1,95 +1,95 @@ - - - - - - - - - - - - Text Color - {#each colors as color} - { - if (color.value === '' || color.label === 'Default') - editor.chain().focus().unsetColor().run(); - else - editor - .chain() - .focus() - .setColor(currentColor === color.value ? '' : color.value) - .run(); - }} - closeOnSelect={false} - > - A - {color.label} - {#if editor.isActive('textStyle', { color: color.value })} - - {/if} - - {/each} - - - - Background Colors - {#each colors as color} - { - if (color.value === '' || color.label === 'Default') - editor.chain().focus().unsetHighlight().run(); - else editor.chain().focus().toggleHighlight({ color: color.value }).run(); - }} - closeOnSelect={false} - > - A - {color.label} - {#if editor.isActive('highlight', { color: color.value })} - - {/if} - - {/each} - - - - - -

Quick Colors

-
-
-
+ + + + + + + + + + + + Text Color + {#each colors as color} + { + if (color.value === '' || color.label === 'Default') + editor.chain().focus().unsetColor().run(); + else + editor + .chain() + .focus() + .setColor(currentColor === color.value ? '' : color.value) + .run(); + }} + closeOnSelect={false} + > + A + {color.label} + {#if editor.isActive('textStyle', { color: color.value })} + + {/if} + + {/each} + + + + Background Colors + {#each colors as color} + { + if (color.value === '' || color.label === 'Default') + editor.chain().focus().unsetHighlight().run(); + else editor.chain().focus().toggleHighlight({ color: color.value }).run(); + }} + closeOnSelect={false} + > + A + {color.label} + {#if editor.isActive('highlight', { color: color.value })} + + {/if} + + {/each} + + + + + +

Quick Colors

+
+
+
diff --git a/src/lib/components/shad-editor/icons/redo.svelte b/src/lib/components/shad-editor/icons/redo.svelte index e769c7f2..d367008a 100644 --- a/src/lib/components/shad-editor/icons/redo.svelte +++ b/src/lib/components/shad-editor/icons/redo.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Redo (⌘R)

-
-
-
+ + + + + + + + +

Redo (⌘R)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/search-replace.svelte b/src/lib/components/shad-editor/icons/search-replace.svelte index 1fab971e..e838ce53 100644 --- a/src/lib/components/shad-editor/icons/search-replace.svelte +++ b/src/lib/components/shad-editor/icons/search-replace.svelte @@ -1,146 +1,146 @@ - - - - - - { - if (open) updateSearchTerm(); - else { - clear(); - updateSearchTerm(true); - } - }} - > - - - - - { - clear(); - updateSearchTerm(true); - }} - > - - -
- updateSearchTerm()} - class="mr-1 " - /> - - -
-
- updateSearchTerm()} - class="mr-1 " - /> - - -
- -
-
- updateSearchTerm()} - /> -

Case Sensitive

-
-
- {searchCount > 0 ? searchIndex + 1 : 0} / {searchCount} -
-
-
-
-
- -

Search And Replace Text

-
-
-
+ + + + + + { + if (open) updateSearchTerm(); + else { + clear(); + updateSearchTerm(true); + } + }} + > + + + + + { + clear(); + updateSearchTerm(true); + }} + > + + +
+ updateSearchTerm()} + class="mr-1 " + /> + + +
+
+ updateSearchTerm()} + class="mr-1 " + /> + + +
+ +
+
+ updateSearchTerm()} + /> +

Case Sensitive

+
+
+ {searchCount > 0 ? searchIndex + 1 : 0} / {searchCount} +
+
+
+
+
+ +

Search And Replace Text

+
+
+
diff --git a/src/lib/components/shad-editor/icons/strikethrough.svelte b/src/lib/components/shad-editor/icons/strikethrough.svelte index 5ef549b9..40819787 100644 --- a/src/lib/components/shad-editor/icons/strikethrough.svelte +++ b/src/lib/components/shad-editor/icons/strikethrough.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Strike (⌘⇧S)

-
-
-
+ + + + + + + + +

Strike (⌘⇧S)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/subscript.svelte b/src/lib/components/shad-editor/icons/subscript.svelte index fad10b2c..a80b9158 100644 --- a/src/lib/components/shad-editor/icons/subscript.svelte +++ b/src/lib/components/shad-editor/icons/subscript.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Subscript (⌘,)

-
-
-
+ + + + + + + + +

Subscript (⌘,)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/superscript.svelte b/src/lib/components/shad-editor/icons/superscript.svelte index 22e4d81b..715e7b7c 100644 --- a/src/lib/components/shad-editor/icons/superscript.svelte +++ b/src/lib/components/shad-editor/icons/superscript.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Superscript (⌘.)

-
-
-
+ + + + + + + + +

Superscript (⌘.)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/table.svelte b/src/lib/components/shad-editor/icons/table.svelte index 67d2773a..4de0dc32 100644 --- a/src/lib/components/shad-editor/icons/table.svelte +++ b/src/lib/components/shad-editor/icons/table.svelte @@ -1,111 +1,111 @@ - - - - - - - -
- - - - - - editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run()} - > - Insert Table - - - - Header - - - editor.chain().focus().toggleHeaderColumn().run()}> - Toggle Column - - editor.chain().focus().toggleHeaderRow().run()}> - Toggle Row - - editor.chain().focus().toggleHeaderCell().run()}> - Toggle Cell - - - - - - Cells - - - editor.chain().focus().mergeCells().run()}> - Merge - - editor.chain().focus().splitCell().run()}> - Split - - editor.chain().focus().mergeOrSplit().run()}> - Merge or Split - - - - - - Row - - - editor.chain().focus().addRowBefore().run()}> - Insert Above - - editor.chain().focus().addRowAfter().run()}> - Insert Below - - editor.chain().focus().deleteRow().run()} - class="text-destructive hover:text-foreground data-[highlighted]:bg-destructive" - > - Delete Row - - - - - - Column - - - editor.chain().focus().addColumnBefore().run()}> - Insert Before - - editor.chain().focus().addColumnAfter().run()}> - Insert After - - editor.chain().focus().deleteColumn().run()} - class="text-destructive hover:text-foreground data-[highlighted]:bg-destructive" - > - Delete - - - - editor.chain().focus().deleteTable().run()} - class="text-destructive hover:text-foreground data-[highlighted]:bg-destructive" - > - Delete - - - - - -

Table

-
- - + + + + + + + +
+ + + + + + editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run()} + > + Insert Table + + + + Header + + + editor.chain().focus().toggleHeaderColumn().run()}> + Toggle Column + + editor.chain().focus().toggleHeaderRow().run()}> + Toggle Row + + editor.chain().focus().toggleHeaderCell().run()}> + Toggle Cell + + + + + + Cells + + + editor.chain().focus().mergeCells().run()}> + Merge + + editor.chain().focus().splitCell().run()}> + Split + + editor.chain().focus().mergeOrSplit().run()}> + Merge or Split + + + + + + Row + + + editor.chain().focus().addRowBefore().run()}> + Insert Above + + editor.chain().focus().addRowAfter().run()}> + Insert Below + + editor.chain().focus().deleteRow().run()} + class="text-destructive hover:text-foreground data-[highlighted]:bg-destructive" + > + Delete Row + + + + + + Column + + + editor.chain().focus().addColumnBefore().run()}> + Insert Before + + editor.chain().focus().addColumnAfter().run()}> + Insert After + + editor.chain().focus().deleteColumn().run()} + class="text-destructive hover:text-foreground data-[highlighted]:bg-destructive" + > + Delete + + + + editor.chain().focus().deleteTable().run()} + class="text-destructive hover:text-foreground data-[highlighted]:bg-destructive" + > + Delete + + + + + +

Table

+
+ + diff --git a/src/lib/components/shad-editor/icons/task-list.svelte b/src/lib/components/shad-editor/icons/task-list.svelte index e4fd628b..b22edc92 100644 --- a/src/lib/components/shad-editor/icons/task-list.svelte +++ b/src/lib/components/shad-editor/icons/task-list.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Tasks List (⌘⇧9)

-
-
-
+ + + + + + + + +

Tasks List (⌘⇧9)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/text.svelte b/src/lib/components/shad-editor/icons/text.svelte index 8e165294..9647fa60 100644 --- a/src/lib/components/shad-editor/icons/text.svelte +++ b/src/lib/components/shad-editor/icons/text.svelte @@ -1,95 +1,95 @@ - - - - - - - - - - - editor.chain().focus().toggleHeading({ level: 1 }).run()} - closeOnSelect={false} - > - Heading 1 - {#if editor.isActive('heading', { level: 1 })} - - {/if} - - editor.chain().focus().toggleHeading({ level: 2 }).run()} - closeOnSelect={false} - > - Heading 2 - {#if editor.isActive('heading', { level: 2 })} - - {/if} - - editor.chain().focus().toggleHeading({ level: 3 }).run()} - closeOnSelect={false} - > - Heading 3 - {#if editor.isActive('heading', { level: 3 })} - - {/if} - - editor.chain().focus().setParagraph().run()} - closeOnSelect={false} - > - Paragraph - {#if editor.isActive('paragraph')} - - {/if} - - editor.chain().focus().toggleCodeBlock().run()} - closeOnSelect={false} - > - Code Block - {#if editor.isActive('codeBlock')} - - {/if} - - - - - -

Text Formatting

-
-
-
+ + + + + + + + + + + editor.chain().focus().toggleHeading({ level: 1 }).run()} + closeOnSelect={false} + > + Heading 1 + {#if editor.isActive('heading', { level: 1 })} + + {/if} + + editor.chain().focus().toggleHeading({ level: 2 }).run()} + closeOnSelect={false} + > + Heading 2 + {#if editor.isActive('heading', { level: 2 })} + + {/if} + + editor.chain().focus().toggleHeading({ level: 3 }).run()} + closeOnSelect={false} + > + Heading 3 + {#if editor.isActive('heading', { level: 3 })} + + {/if} + + editor.chain().focus().setParagraph().run()} + closeOnSelect={false} + > + Paragraph + {#if editor.isActive('paragraph')} + + {/if} + + editor.chain().focus().toggleCodeBlock().run()} + closeOnSelect={false} + > + Code Block + {#if editor.isActive('codeBlock')} + + {/if} + + + + + +

Text Formatting

+
+
+
diff --git a/src/lib/components/shad-editor/icons/textalign.svelte b/src/lib/components/shad-editor/icons/textalign.svelte index d48611ff..533814ec 100644 --- a/src/lib/components/shad-editor/icons/textalign.svelte +++ b/src/lib/components/shad-editor/icons/textalign.svelte @@ -1,82 +1,82 @@ - - - - - - - - - - - editor.chain().focus().setTextAlign('left').run()} - closeOnSelect={false} - > - Align Left - {#if editor.isActive({ textAlign: 'left' })} - - {/if} - - editor.chain().focus().setTextAlign('center').run()} - closeOnSelect={false} - > - Align Center - {#if editor.isActive({ textAlign: 'center' })} - - {/if} - - editor.chain().focus().setTextAlign('right').run()} - closeOnSelect={false} - > - Align Right - {#if editor.isActive({ textAlign: 'right' })} - - {/if} - - editor.chain().focus().setTextAlign('justify').run()} - closeOnSelect={false} - > - Align Justify - {#if editor.isActive({ textAlign: 'justify' })} - - {/if} - - - - - -

Text Alignment

-
-
-
+ + + + + + + + + + + editor.chain().focus().setTextAlign('left').run()} + closeOnSelect={false} + > + Align Left + {#if editor.isActive({ textAlign: 'left' })} + + {/if} + + editor.chain().focus().setTextAlign('center').run()} + closeOnSelect={false} + > + Align Center + {#if editor.isActive({ textAlign: 'center' })} + + {/if} + + editor.chain().focus().setTextAlign('right').run()} + closeOnSelect={false} + > + Align Right + {#if editor.isActive({ textAlign: 'right' })} + + {/if} + + editor.chain().focus().setTextAlign('justify').run()} + closeOnSelect={false} + > + Align Justify + {#if editor.isActive({ textAlign: 'justify' })} + + {/if} + + + + + +

Text Alignment

+
+
+
diff --git a/src/lib/components/shad-editor/icons/textcolor.svelte b/src/lib/components/shad-editor/icons/textcolor.svelte index b3dda101..a8c3c844 100644 --- a/src/lib/components/shad-editor/icons/textcolor.svelte +++ b/src/lib/components/shad-editor/icons/textcolor.svelte @@ -1,75 +1,75 @@ - - - - - - - - - - -
-

Pick a text color

- - - -
-
- { - if (event.detail.hex === undefined) return; - color = event.detail.hex; - editor.chain().focus().setColor(color).run(); - }} - isDialog={false} - --picker-indicator-size="1rem" - --input-size="1rem" - /> -
-
- -
-
-
-
- -

Text Color

-
-
-
+ + + + + + + + + + +
+

Pick a text color

+ + + +
+
+ { + if (event.detail.hex === undefined) return; + color = event.detail.hex; + editor.chain().focus().setColor(color).run(); + }} + isDialog={false} + --picker-indicator-size="1rem" + --input-size="1rem" + /> +
+
+ +
+
+
+
+ +

Text Color

+
+
+
diff --git a/src/lib/components/shad-editor/icons/underline.svelte b/src/lib/components/shad-editor/icons/underline.svelte index 00c03f67..48cd8098 100644 --- a/src/lib/components/shad-editor/icons/underline.svelte +++ b/src/lib/components/shad-editor/icons/underline.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Underline (⌘U)

-
-
-
+ + + + + + + + +

Underline (⌘U)

+
+
+
diff --git a/src/lib/components/shad-editor/icons/undo.svelte b/src/lib/components/shad-editor/icons/undo.svelte index 08c4420a..2cb87328 100644 --- a/src/lib/components/shad-editor/icons/undo.svelte +++ b/src/lib/components/shad-editor/icons/undo.svelte @@ -1,26 +1,26 @@ - - - - - - - - -

Undo (⌘Z)

-
-
-
+ + + + + + + + +

Undo (⌘Z)

+
+
+
diff --git a/src/lib/components/shad-editor/onedark.css b/src/lib/components/shad-editor/onedark.css index 50d368c3..50ef156f 100644 --- a/src/lib/components/shad-editor/onedark.css +++ b/src/lib/components/shad-editor/onedark.css @@ -1,89 +1,89 @@ -/* One Dark and Light Theme for Highlight.js using Tailwind CSS */ -.tiptap pre code { - @apply text-[#383a42] dark:text-[#abb2bf]; -} - -/* Comment */ -.hljs-comment, -.hljs-quote { - @apply italic text-[#a0a1a7] dark:text-[#5c6370]; -} - -/* Red */ -.hljs-variable, -.hljs-template-variable, -.hljs-tag, -.hljs-name, -.hljs-selector-id, -.hljs-selector-class, -.hljs-regexp, -.hljs-deletion { - @apply text-[#e45649] dark:text-[#e06c75]; -} - -/* Orange */ -.hljs-number, -.hljs-built_in, -.hljs-literal, -.hljs-type, -.hljs-params, -.hljs-meta, -.hljs-link { - @apply text-[#986801] dark:text-[#d19a66]; -} - -/* Yellow */ -.hljs-attribute { - @apply text-[#c18401] dark:text-[#e5c07b]; -} - -/* Green */ -.hljs-string, -.hljs-symbol, -.hljs-bullet, -.hljs-addition { - @apply text-[#50a14f] dark:text-[#98c379]; -} - -/* Blue */ -.hljs-title, -.hljs-section { - @apply text-[#4078f2] dark:text-[#61afef]; -} - -/* Purple */ -.hljs-keyword, -.hljs-selector-tag { - @apply text-[#a626a4] dark:text-[#c678dd]; -} - -/* Cyan */ -.hljs-emphasis { - @apply italic text-[#0184bc] dark:text-[#56b6c2]; -} - -.hljs-strong { - /* @apply font-bold; */ - /* Kills compile: font-bold */ - font-weight: bold; -} - -/* Base styles */ -.hljs-doctag, -.hljs-formula { - @apply text-[#a626a4] dark:text-[#c678dd]; -} - -.hljs-attr, -.hljs-subst { - @apply text-[#383a42] dark:text-[#abb2bf]; -} - -/* Line highlights */ -.hljs-addition { - @apply bg-[#e6ffed] dark:bg-[#283428]; -} - -.hljs-deletion { - @apply bg-[#ffeef0] dark:bg-[#342828]; -} +/* One Dark and Light Theme for Highlight.js using Tailwind CSS */ +.tiptap pre code { + @apply text-[#383a42] dark:text-[#abb2bf]; +} + +/* Comment */ +.hljs-comment, +.hljs-quote { + @apply italic text-[#a0a1a7] dark:text-[#5c6370]; +} + +/* Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + @apply text-[#e45649] dark:text-[#e06c75]; +} + +/* Orange */ +.hljs-number, +.hljs-built_in, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + @apply text-[#986801] dark:text-[#d19a66]; +} + +/* Yellow */ +.hljs-attribute { + @apply text-[#c18401] dark:text-[#e5c07b]; +} + +/* Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + @apply text-[#50a14f] dark:text-[#98c379]; +} + +/* Blue */ +.hljs-title, +.hljs-section { + @apply text-[#4078f2] dark:text-[#61afef]; +} + +/* Purple */ +.hljs-keyword, +.hljs-selector-tag { + @apply text-[#a626a4] dark:text-[#c678dd]; +} + +/* Cyan */ +.hljs-emphasis { + @apply italic text-[#0184bc] dark:text-[#56b6c2]; +} + +.hljs-strong { + /* @apply font-bold; */ + /* Kills compile: font-bold */ + font-weight: bold; +} + +/* Base styles */ +.hljs-doctag, +.hljs-formula { + @apply text-[#a626a4] dark:text-[#c678dd]; +} + +.hljs-attr, +.hljs-subst { + @apply text-[#383a42] dark:text-[#abb2bf]; +} + +/* Line highlights */ +.hljs-addition { + @apply bg-[#e6ffed] dark:bg-[#283428]; +} + +.hljs-deletion { + @apply bg-[#ffeef0] dark:bg-[#342828]; +} diff --git a/src/lib/components/shad-editor/shad-editor.svelte b/src/lib/components/shad-editor/shad-editor.svelte index 2030f5cd..ba110618 100644 --- a/src/lib/components/shad-editor/shad-editor.svelte +++ b/src/lib/components/shad-editor/shad-editor.svelte @@ -1,180 +1,175 @@ - - -
- {#if editor && show_toolbar} - - {/if} -
- -
-
+ + +
+ {#if editor && show_toolbar} + + {/if} +
+ +
+
diff --git a/src/lib/components/ui/button/button.svelte b/src/lib/components/ui/button/button.svelte index 2ab7c751..00a5a988 100644 --- a/src/lib/components/ui/button/button.svelte +++ b/src/lib/components/ui/button/button.svelte @@ -1,35 +1,34 @@ {#if href} - + {@render children?.()} {:else} diff --git a/src/lib/components/ui/button/index.js b/src/lib/components/ui/button/index.js index 07375978..10d4bae9 100644 --- a/src/lib/components/ui/button/index.js +++ b/src/lib/components/ui/button/index.js @@ -1,9 +1,9 @@ -import Root, { buttonVariants } from "./button.svelte"; +import Root, { buttonVariants } from './button.svelte'; export { Root, // Root as Button, - buttonVariants, + buttonVariants }; diff --git a/src/lib/components/ui/button/index.ts b/src/lib/components/ui/button/index.ts index fb585d76..5414d9d3 100644 --- a/src/lib/components/ui/button/index.ts +++ b/src/lib/components/ui/button/index.ts @@ -2,8 +2,8 @@ import Root, { type ButtonProps, type ButtonSize, type ButtonVariant, - buttonVariants, -} from "./button.svelte"; + buttonVariants +} from './button.svelte'; export { Root, @@ -13,5 +13,5 @@ export { buttonVariants, type ButtonProps, type ButtonSize, - type ButtonVariant, + type ButtonVariant }; diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte index b5f212b4..e5c13990 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte @@ -1,9 +1,9 @@ @@ -13,8 +13,8 @@ - import { Tooltip as TooltipPrimitive } from "bits-ui"; - import { cn } from "$lib/utils/utils.js"; + import { Tooltip as TooltipPrimitive } from 'bits-ui'; + import { cn } from '$lib/utils/utils.js'; let { ref = $bindable(null), @@ -14,7 +14,7 @@ bind:ref {sideOffset} class={cn( - "bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md", + 'bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md', className )} {...restProps} diff --git a/src/lib/electron/electron_native.js b/src/lib/electron/electron_native.js index 25cbeb35..d0e76887 100644 --- a/src/lib/electron/electron_native.js +++ b/src/lib/electron/electron_native.js @@ -28,24 +28,27 @@ const { ipcRenderer } = require('electron'); // const ps_list = require('ps-list'); let home_directory = require('os').homedir(); -console.log('Home: '+home_directory); +console.log('Home: ' + home_directory); let tmp_directory = require('os').tmpdir(); -console.log('Temporary: '+tmp_directory); +console.log('Temporary: ' + tmp_directory); let app_root_path = path.join(home_directory, 'OSIT/native_app'); // macOS default let config = null; -let default_osit_sync_app_root_relative_path = 'OSIT/Speaker Ready System/Admin Share/Custom Applications'; // Mainly for macOS laptops -let default_osit_sync_app_root_path = path.join(home_directory, default_osit_sync_app_root_relative_path); // macOS default -let default_osit_sync_native_app_relative_path = 'OSIT/Speaker Ready System/Admin Share/Custom Applications/osit_binaries/osit_aether.current.app'; // Mainly for macOS laptops +let default_osit_sync_app_root_relative_path = + 'OSIT/Speaker Ready System/Admin Share/Custom Applications'; // Mainly for macOS laptops +let default_osit_sync_app_root_path = path.join( + home_directory, + default_osit_sync_app_root_relative_path +); // macOS default +let default_osit_sync_native_app_relative_path = + 'OSIT/Speaker Ready System/Admin Share/Custom Applications/osit_binaries/osit_aether.current.app'; // Mainly for macOS laptops let default_native_app_relative_path = 'OSIT/native_app/osit_aether.app'; // Mainly for macOS laptops let default_current_native_app_relative_path = 'OSIT/native_app/osit_aether.current.app'; // Mainly for macOS laptops let test_native_app_relative_path = 'OSIT/native_app/osit_aether.remote.app'; // Mainly for macOS laptops - - // exports.check_for_native_app_update = function () { // console.log('*** Aether App Native export: check_for_native_app_update() ***'); // @@ -72,818 +75,917 @@ let test_native_app_relative_path = 'OSIT/native_app/osit_aether.remote.app'; // // // } - exports.load_init_config = function () { - console.log('*** Aether App Native export: load_init_config() ***'); + console.log('*** Aether App Native export: load_init_config() ***'); - let cwd = process.cwd(); - console.log(`CWD: ${cwd}`); + let cwd = process.cwd(); + console.log(`CWD: ${cwd}`); - try { - if (cwd == '/') { - cwd = home_directory; - } - let directory_list = fs.readdirSync(cwd) - console.log('CWD Contents:', directory_list); - } catch (err) { - console.error(err); - } + try { + if (cwd == '/') { + cwd = home_directory; + } + let directory_list = fs.readdirSync(cwd); + console.log('CWD Contents:', directory_list); + } catch (err) { + console.error(err); + } - // let home_directory = require('os').homedir(); - // console.log('Home: '+home_directory); + // let home_directory = require('os').homedir(); + // console.log('Home: '+home_directory); - // let tmp_directory = require('os').tmpdir(); - // console.log('Temporary: '+tmp_directory); + // let tmp_directory = require('os').tmpdir(); + // console.log('Temporary: '+tmp_directory); - // let config = null; - let config_directory = null; - // let default_config_path = path.join(process.cwd(),'ae_native_app_config.current.json'); - let default_config_path = 'ae_native_app_config.current.json'; - console.log(`Default Config File (path): ${default_config_path}`); - let config_path = null; + // let config = null; + let config_directory = null; + // let default_config_path = path.join(process.cwd(),'ae_native_app_config.current.json'); + let default_config_path = 'ae_native_app_config.current.json'; + console.log(`Default Config File (path): ${default_config_path}`); + let config_path = null; - // Set the config path for macOS or Linux - if (os.platform == 'darwin') { - // config_directory = path.join(home_directory, 'Library/Application Support/OSIT'); - config_directory = path.join(home_directory, 'OSIT/native_app'); - console.log('macOS config directory: '+config_directory); + // Set the config path for macOS or Linux + if (os.platform == 'darwin') { + // config_directory = path.join(home_directory, 'Library/Application Support/OSIT'); + config_directory = path.join(home_directory, 'OSIT/native_app'); + console.log('macOS config directory: ' + config_directory); - let electron_app_path = path.join(home_directory, default_native_app_relative_path); - let test_stats = fs.statSync(electron_app_path); - console.log(test_stats); - } else if (os.platform == 'linux') { - config_directory = path.join(home_directory, '.config/OSIT'); - console.log('Linux config directory: '+config_directory); - } + let electron_app_path = path.join(home_directory, default_native_app_relative_path); + let test_stats = fs.statSync(electron_app_path); + console.log(test_stats); + } else if (os.platform == 'linux') { + config_directory = path.join(home_directory, '.config/OSIT'); + console.log('Linux config directory: ' + config_directory); + } - // Look for the config file and copy the default if not found. - if (fs.existsSync(config_directory)) { - console.log('Config directory found: '+config_directory); - } else { - fs.mkdirSync(config_directory); - console.log('Config directory created: '+config_directory); + // Look for the config file and copy the default if not found. + if (fs.existsSync(config_directory)) { + console.log('Config directory found: ' + config_directory); + } else { + fs.mkdirSync(config_directory); + console.log('Config directory created: ' + config_directory); - //default_config_path = path.join(process.cwd(),'ae_native_app_config.current.json'); - // config_path = path.join(config_directory, 'ae_native_app_config.json'); - // fs.copyFileSync(default_config_path, config_path); - // console.log('Default config file copied: '+config_directory); - } + //default_config_path = path.join(process.cwd(),'ae_native_app_config.current.json'); + // config_path = path.join(config_directory, 'ae_native_app_config.json'); + // fs.copyFileSync(default_config_path, config_path); + // console.log('Default config file copied: '+config_directory); + } - config_path = path.join(config_directory, 'ae_native_app_config.json'); + config_path = path.join(config_directory, 'ae_native_app_config.json'); - // Attempt to open the config file. The preferred location is based on the OS's config directory. - if (fs.existsSync(config_path)) { - console.log(`Config file (ae_native_app_config.json) found under ${config_directory}`); - } else if (!fs.existsSync(config_path) && fs.existsSync(default_config_path)) { - fs.copyFileSync(default_config_path, config_path); - console.log('Default config file copied: '+config_directory); + // Attempt to open the config file. The preferred location is based on the OS's config directory. + if (fs.existsSync(config_path)) { + console.log(`Config file (ae_native_app_config.json) found under ${config_directory}`); + } else if (!fs.existsSync(config_path) && fs.existsSync(default_config_path)) { + fs.copyFileSync(default_config_path, config_path); + console.log('Default config file copied: ' + config_directory); - // config = JSON.parse(fs.readFileSync(config_path)); - // console.log('Config file read.'); - } else if (fs.existsSync(path.join(cwd, 'ae_native_app_config.json'))) { - //fs.copyFileSync(default_config_path, config_path); - //console.log('Default config file copied: '+config_directory); + // config = JSON.parse(fs.readFileSync(config_path)); + // console.log('Config file read.'); + } else if (fs.existsSync(path.join(cwd, 'ae_native_app_config.json'))) { + //fs.copyFileSync(default_config_path, config_path); + //console.log('Default config file copied: '+config_directory); - console.log(`Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}`); - config_path = path.join(cwd, 'ae_native_app_config.json'); + console.log( + `Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}` + ); + config_path = path.join(cwd, 'ae_native_app_config.json'); - console.log(`Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}`); - let found_config_path = path.join(cwd, 'ae_native_app_config.json'); + console.log( + `Config file (config.json) not found under ${config_directory}. Using config in CWD. ${cwd}` + ); + let found_config_path = path.join(cwd, 'ae_native_app_config.json'); - fs.copyFileSync(found_config_path, config_path); - console.log(`Found config file copied: ${config_directory}`); - } else if (fs.existsSync(path.join(cwd, 'ae_native_app_config.current.json'))) { - console.log(`Config file (config.json) not found under ${config_directory} or CWD. Using default config in CWD. ${cwd}`); - default_config_path = path.join(cwd, 'ae_native_app_config.current.json'); + fs.copyFileSync(found_config_path, config_path); + console.log(`Found config file copied: ${config_directory}`); + } else if (fs.existsSync(path.join(cwd, 'ae_native_app_config.current.json'))) { + console.log( + `Config file (config.json) not found under ${config_directory} or CWD. Using default config in CWD. ${cwd}` + ); + default_config_path = path.join(cwd, 'ae_native_app_config.current.json'); - fs.copyFileSync(default_config_path, config_path); - console.log(`Default config file copied: ${config_directory}`); - } else { - console.log('Can not find a config file.'); + fs.copyFileSync(default_config_path, config_path); + console.log(`Default config file copied: ${config_directory}`); + } else { + console.log('Can not find a config file.'); - return false; - } + return false; + } - let local_config = JSON.parse(fs.readFileSync(config_path)); - console.log('Config file read.', local_config); - config = local_config; + let local_config = JSON.parse(fs.readFileSync(config_path)); + console.log('Config file read.', local_config); + config = local_config; - // Do some quick clean up. + // Do some quick clean up. - config.home_directory = home_directory; // From the OS platform - config.tmp_directory = tmp_directory; // From the OS platform + config.home_directory = home_directory; // From the OS platform + config.tmp_directory = tmp_directory; // From the OS platform - config.app_root_path = config.app_root_path.replace('[home]', home_directory); - config.app_root_path = config.app_root_path.replace('[tmp]', tmp_directory); - console.log(`App Root Path: ${config.app_root_path}`); + config.app_root_path = config.app_root_path.replace('[home]', home_directory); + config.app_root_path = config.app_root_path.replace('[tmp]', tmp_directory); + console.log(`App Root Path: ${config.app_root_path}`); - config.local_file_cache_path = config.local_file_cache_path.replace('[home]', home_directory); - config.local_file_cache_path = config.local_file_cache_path.replace('[tmp]', tmp_directory); - console.log(`Local File Cache Path: ${config.local_file_cache_path}`); - if (fs.existsSync(config.local_file_cache_path)) { - } else { - fs.mkdirSync(config.local_file_cache_path); - console.log(`Host file cache directory created: ${config.local_file_cache_path}`); - } + config.local_file_cache_path = config.local_file_cache_path.replace('[home]', home_directory); + config.local_file_cache_path = config.local_file_cache_path.replace('[tmp]', tmp_directory); + console.log(`Local File Cache Path: ${config.local_file_cache_path}`); + if (fs.existsSync(config.local_file_cache_path)) { + } else { + fs.mkdirSync(config.local_file_cache_path); + console.log(`Host file cache directory created: ${config.local_file_cache_path}`); + } - config.host_file_temp_path = config.host_file_temp_path.replace('[home]', home_directory); - config.host_file_temp_path = config.host_file_temp_path.replace('[tmp]', tmp_directory); - console.log(`Host file temp path: ${config.host_file_temp_path}`); - if (fs.existsSync(config.host_file_temp_path)) { - } else { - fs.mkdirSync(config.host_file_temp_path); - console.log(`Host file temp directory created: ${config.host_file_temp_path}`); - } + config.host_file_temp_path = config.host_file_temp_path.replace('[home]', home_directory); + config.host_file_temp_path = config.host_file_temp_path.replace('[tmp]', tmp_directory); + console.log(`Host file temp path: ${config.host_file_temp_path}`); + if (fs.existsSync(config.host_file_temp_path)) { + } else { + fs.mkdirSync(config.host_file_temp_path); + console.log(`Host file temp directory created: ${config.host_file_temp_path}`); + } - // NOTE: This is not ideal... - if (!config.account_id) { - if (config.event_id == 'pjrcghqwert' || config.event_id == 'nmBfuGFeR0k') { - config.account_id = '_XY7DXtc9MY'; - } else if (config.event_id == 'r8c-rr-I4-52') { // CMSC - config.account_id = '8Gfxbxr19Nw'; - } else if (config.event_id == 'NeC-hm-MF-Q3') { // LCI - config.account_id = 'xFP7AhU8Zlc'; - } else if (config.event_id == 'Y7v-Zg-fe-gu') { // NCSD - config.account_id = 'FrodrLD7B4w'; - } else if (config.event_id == '9jW-Db-SF-wt') { // AAPOR - config.account_id = 'j5EBhRDqPuw'; - } else if (config.event_id == 'zJP-Ld-A7-I4') { // BGH - config.account_id = 'GpLf_bnywCs'; - } else { - console.log('WARNING WARNING WARNING: The account ID could not be guessed. Using the default of 1. <<< WARNING'); - config.account_id = '_XY7DXtc9MY'; - } - } + // NOTE: This is not ideal... + if (!config.account_id) { + if (config.event_id == 'pjrcghqwert' || config.event_id == 'nmBfuGFeR0k') { + config.account_id = '_XY7DXtc9MY'; + } else if (config.event_id == 'r8c-rr-I4-52') { + // CMSC + config.account_id = '8Gfxbxr19Nw'; + } else if (config.event_id == 'NeC-hm-MF-Q3') { + // LCI + config.account_id = 'xFP7AhU8Zlc'; + } else if (config.event_id == 'Y7v-Zg-fe-gu') { + // NCSD + config.account_id = 'FrodrLD7B4w'; + } else if (config.event_id == '9jW-Db-SF-wt') { + // AAPOR + config.account_id = 'j5EBhRDqPuw'; + } else if (config.event_id == 'zJP-Ld-A7-I4') { + // BGH + config.account_id = 'GpLf_bnywCs'; + } else { + console.log( + 'WARNING WARNING WARNING: The account ID could not be guessed. Using the default of 1. <<< WARNING' + ); + config.account_id = '_XY7DXtc9MY'; + } + } - let import_config_to_ipc_result = ipcRenderer.invoke('import_config', config).then((result) => { - console.log('IPC import config finished'); - // console.log(result); - return result; // Result should be "true" - }) - - //console.log(config); - return config; -} + let import_config_to_ipc_result = ipcRenderer.invoke('import_config', config).then((result) => { + console.log('IPC import config finished'); + // console.log(result); + return result; // Result should be "true" + }); + //console.log(config); + return config; +}; exports.load_full_config = function (init_config) { - console.log('*** Aether App Native export: load_config() ***'); + console.log('*** Aether App Native export: load_config() ***'); - console.log('Init config.', init_config); - // config = init_config; + console.log('Init config.', init_config); + // config = init_config; - config = get_url_cfg(init_config).then((cfg) => { - console.log('URL config file downloaded.', cfg); + config = get_url_cfg(init_config).then((cfg) => { + console.log('URL config file downloaded.', cfg); - let new_config = init_config; + let new_config = init_config; - // Update with remote device config settings from API. - new_config.account_id = cfg.account_id_random; - new_config.event_id = cfg.event_id_random; - new_config.event_device_id = cfg.event_device_id; - new_config.event_location_id = cfg.event_location_id; - new_config.event_session_id = cfg.event_session_id; + // Update with remote device config settings from API. + new_config.account_id = cfg.account_id_random; + new_config.event_id = cfg.event_id_random; + new_config.event_device_id = cfg.event_device_id; + new_config.event_location_id = cfg.event_location_id; + new_config.event_session_id = cfg.event_session_id; - new_config.check_event_device_loop_period = cfg.check_event_device_loop_period; - new_config.check_event_location_loop_period = cfg.check_event_location_loop_period; - new_config.check_event_loop_period = cfg.check_event_loop_period; - new_config.check_event_session_loop_period = cfg.check_event_session_loop_period; + new_config.check_event_device_loop_period = cfg.check_event_device_loop_period; + new_config.check_event_location_loop_period = cfg.check_event_location_loop_period; + new_config.check_event_loop_period = cfg.check_event_loop_period; + new_config.check_event_session_loop_period = cfg.check_event_session_loop_period; - new_config.record_audio = cfg.record_audio; - new_config.record_video = cfg.record_video; - new_config.recording_path = cfg.recording_path; - new_config.recording_path = new_config.recording_path.replace('[home]', home_directory); - new_config.recording_path = new_config.recording_path.replace('[tmp]', home_directory); + new_config.record_audio = cfg.record_audio; + new_config.record_video = cfg.record_video; + new_config.recording_path = cfg.recording_path; + new_config.recording_path = new_config.recording_path.replace('[home]', home_directory); + new_config.recording_path = new_config.recording_path.replace('[tmp]', home_directory); - new_config.home_directory = home_directory; // From the OS platform - new_config.tmp_directory = tmp_directory; // From the OS platform + new_config.home_directory = home_directory; // From the OS platform + new_config.tmp_directory = tmp_directory; // From the OS platform - new_config.app_root_path = new_config.app_root_path.replace('[home]', home_directory); - new_config.app_root_path = new_config.app_root_path.replace('[tmp]', tmp_directory); - console.log(`App Root Path: ${new_config.app_root_path}`); + new_config.app_root_path = new_config.app_root_path.replace('[home]', home_directory); + new_config.app_root_path = new_config.app_root_path.replace('[tmp]', tmp_directory); + console.log(`App Root Path: ${new_config.app_root_path}`); - new_config.local_file_cache_path = new_config.local_file_cache_path.replace('[home]', home_directory); - new_config.local_file_cache_path = new_config.local_file_cache_path.replace('[tmp]', tmp_directory); - console.log(`Local File Cache Path: ${new_config.local_file_cache_path}`); - if (fs.existsSync(new_config.local_file_cache_path)) { - } else { - fs.mkdirSync(new_config.local_file_cache_path); - console.log(`Host file cache directory created: ${new_config.local_file_cache_path}`); - } + new_config.local_file_cache_path = new_config.local_file_cache_path.replace( + '[home]', + home_directory + ); + new_config.local_file_cache_path = new_config.local_file_cache_path.replace( + '[tmp]', + tmp_directory + ); + console.log(`Local File Cache Path: ${new_config.local_file_cache_path}`); + if (fs.existsSync(new_config.local_file_cache_path)) { + } else { + fs.mkdirSync(new_config.local_file_cache_path); + console.log(`Host file cache directory created: ${new_config.local_file_cache_path}`); + } - new_config.host_file_temp_path = new_config.host_file_temp_path.replace('[home]', home_directory); - new_config.host_file_temp_path = new_config.host_file_temp_path.replace('[tmp]', tmp_directory); - console.log(`Host file temp path: ${new_config.host_file_temp_path}`); - if (fs.existsSync(new_config.host_file_temp_path)) { - } else { - fs.mkdirSync(new_config.host_file_temp_path); - console.log(`Host file temp directory created: ${new_config.host_file_temp_path}`); - } + new_config.host_file_temp_path = new_config.host_file_temp_path.replace( + '[home]', + home_directory + ); + new_config.host_file_temp_path = new_config.host_file_temp_path.replace('[tmp]', tmp_directory); + console.log(`Host file temp path: ${new_config.host_file_temp_path}`); + if (fs.existsSync(new_config.host_file_temp_path)) { + } else { + fs.mkdirSync(new_config.host_file_temp_path); + console.log(`Host file temp directory created: ${new_config.host_file_temp_path}`); + } - let import_config_to_ipc_result = ipcRenderer.invoke('import_config', new_config).then((result) => { - console.log('IPC import config finished'); - // console.log(result); - return result; // Result should be "true" - }) + let import_config_to_ipc_result = ipcRenderer + .invoke('import_config', new_config) + .then((result) => { + console.log('IPC import config finished'); + // console.log(result); + return result; // Result should be "true" + }); - return new_config - }) - - //console.log(config); - return config; -} + return new_config; + }); + //console.log(config); + return config; +}; async function get_url_cfg(cfg) { - let base_url = `${cfg.api_protocol}://${cfg.api_server}:${cfg.api_port}/${cfg.api_path}`; + let base_url = `${cfg.api_protocol}://${cfg.api_server}:${cfg.api_port}/${cfg.api_path}`; - let axios_api = axios.create({ - baseURL: base_url, - timeout: 60000, // in milliseconds; 60000 = 60 seconds - /* other custom settings */ - }); - // axios_api.defaults.headers = cfg['headers']; + let axios_api = axios.create({ + baseURL: base_url, + timeout: 60000 // in milliseconds; 60000 = 60 seconds + /* other custom settings */ + }); + // axios_api.defaults.headers = cfg['headers']; - // axios.defaults.baseURL = `${cfg.api_protocol}://${cfg.api_server}:${cfg.api_port}/${cfg.api_path}`; - axios_api.defaults.headers.common['Access-Control-Allow-Origin'] = cfg.access_control_allow_origin; // '*'; // app_cfg.access_control_allow_origin; - axios_api.defaults.headers.common['Content-Type'] = 'application/json'; - axios_api.defaults.headers.common['x-aether-api-key'] = cfg.api_secret_key; - // axios_api.defaults.headers.common['x-account-id'] = cfg.account_id; + // axios.defaults.baseURL = `${cfg.api_protocol}://${cfg.api_server}:${cfg.api_port}/${cfg.api_path}`; + axios_api.defaults.headers.common['Access-Control-Allow-Origin'] = + cfg.access_control_allow_origin; // '*'; // app_cfg.access_control_allow_origin; + axios_api.defaults.headers.common['Content-Type'] = 'application/json'; + axios_api.defaults.headers.common['x-aether-api-key'] = cfg.api_secret_key; + // axios_api.defaults.headers.common['x-account-id'] = cfg.account_id; - let event_device_id = 'dbgMWS3KEHE'; - let endpoint = `/event/device/${event_device_id}`; + let event_device_id = 'dbgMWS3KEHE'; + let endpoint = `/event/device/${event_device_id}`; - let params = {'event_device_code': 'asdf'}; + let params = { event_device_code: 'asdf' }; - let response_data_promise = await axios_api.get( - endpoint, - { - params: params, - onDownloadProgress: (progressEvent) => { - let percent_completed = Math.round( - (progressEvent.loaded * 100) / progressEvent.total - ); - console.log('GET Data Timestamp:', progressEvent.timeStamp, 'Total:', progressEvent.total, 'Loaded:', progressEvent.loaded, 'Percent Completed', percent_completed); + let response_data_promise = await axios_api + .get(endpoint, { + params: params, + onDownloadProgress: (progressEvent) => { + let percent_completed = Math.round((progressEvent.loaded * 100) / progressEvent.total); + console.log( + 'GET Data Timestamp:', + progressEvent.timeStamp, + 'Total:', + progressEvent.total, + 'Loaded:', + progressEvent.loaded, + 'Percent Completed', + percent_completed + ); - // temp_get_object_percent_completed = percent_completed; - } - } - ) - .then(function (response) { - console.log(`Response: ${response}`); + // temp_get_object_percent_completed = percent_completed; + } + }) + .then(function (response) { + console.log(`Response: ${response}`); - let return_data = response.data['data']; - if (Array.isArray(return_data)) { - console.log(`Data result is an array/list. Array length: ${return_data.length}`); - } else { - console.log(`Data result is a dictionary/object, not an array/list.`); - } - return return_data; - }) - .catch(function (error) { - console.log(`Base URL: ${base_url} | Endpoint: ${endpoint}`); + let return_data = response.data['data']; + if (Array.isArray(return_data)) { + console.log(`Data result is an array/list. Array length: ${return_data.length}`); + } else { + console.log(`Data result is a dictionary/object, not an array/list.`); + } + return return_data; + }) + .catch(function (error) { + console.log(`Base URL: ${base_url} | Endpoint: ${endpoint}`); - console.log('Error Message:', error.message); // Is this needed here or below in the in the else portion??? - if (error.response) { - console.log(`Response Status: ${error.response.status}; Status Text: ${error.response.statusText}`); - } else { - console.log('Error:', error); - } + console.log('Error Message:', error.message); // Is this needed here or below in the in the else portion??? + if (error.response) { + console.log( + `Response Status: ${error.response.status}; Status Text: ${error.response.statusText}` + ); + } else { + console.log('Error:', error); + } - if (error.response && error.response.status === 404) { - return null; // Returning null since there were no results - } - return false; // Returning false since something may have gone wrong. Also more in line with what the API returns. - }); + if (error.response && error.response.status === 404) { + return null; // Returning null since there were no results + } + return false; // Returning false since something may have gone wrong. Also more in line with what the API returns. + }); - return response_data_promise; + return response_data_promise; } - - - - - - - // Check for local file // Updated 2022-05-06 -exports.check_local_file = async function ({local_file_path, filename}) { - console.log('*** Electron framework export: check_local_file() ***'); - // console.log('Check for local file'); - console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`); +exports.check_local_file = async function ({ local_file_path, filename }) { + console.log('*** Electron framework export: check_local_file() ***'); + // console.log('Check for local file'); + console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`); - let full_local_file_path = path.join(local_file_path, filename); - console.log(full_local_file_path); - - if (fs.existsSync(full_local_file_path)) { - console.log(`Local file exists: ${full_local_file_path}`); - return true; - } else { - return false; - } -} + let full_local_file_path = path.join(local_file_path, filename); + console.log(full_local_file_path); + if (fs.existsSync(full_local_file_path)) { + console.log(`Local file exists: ${full_local_file_path}`); + return true; + } else { + return false; + } +}; // Check local hash file cache // Used by Svelte Event Launcher // NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11 // Updated 2022-05-06 -exports.check_hash_file_cache = async function ({local_file_cache_path, hash}) { - // console.log('*** Electron framework export: check_hash_file_cache() ***'); - // console.log('Check local hash file cache'); - console.log(`*** Electron framework export: check_hash_file_cache() *** Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}`); +exports.check_hash_file_cache = async function ({ local_file_cache_path, hash }) { + // console.log('*** Electron framework export: check_hash_file_cache() ***'); + // console.log('Check local hash file cache'); + console.log( + `*** Electron framework export: check_hash_file_cache() *** Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}` + ); - let hash_filename = `${hash}.file`; + let hash_filename = `${hash}.file`; - let subdirectory = hash_filename.substring(0,2); - let subdirectory_path = path.join(local_file_cache_path, subdirectory); - if (fs.existsSync(subdirectory_path)) { - } else { - console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`); - return false; - } + let subdirectory = hash_filename.substring(0, 2); + let subdirectory_path = path.join(local_file_cache_path, subdirectory); + if (fs.existsSync(subdirectory_path)) { + } else { + console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`); + return false; + } - let hash_file_cache_path = path.join(subdirectory_path, hash_filename); - // console.log(hash_file_cache_path); - - if (fs.existsSync(hash_file_cache_path)) { - // console.log(`Hashed file exists in cache: ${hash_file_cache_path}`); - return true; - } else { - console.log(`Hashed file not found in cache: ${hash_file_cache_path}`); - return false; - } -} + let hash_file_cache_path = path.join(subdirectory_path, hash_filename); + // console.log(hash_file_cache_path); + if (fs.existsSync(hash_file_cache_path)) { + // console.log(`Hashed file exists in cache: ${hash_file_cache_path}`); + return true; + } else { + console.log(`Hashed file not found in cache: ${hash_file_cache_path}`); + return false; + } +}; // Check local hash file cache // Used by Svelte Event Launcher // Updated 2022-10-12 -exports.check_hash_file_cache_v2 = async function ({local_file_cache_path, hash, verify_hash=false}) { - console.log('*** Aether App Native export: check_hash_file_cache_v2() ***'); - console.log(`Local File Cache Path: ${local_file_cache_path}; Hash: ${hash}`); +exports.check_hash_file_cache_v2 = async function ({ + local_file_cache_path, + hash, + verify_hash = false +}) { + console.log('*** Aether App Native export: check_hash_file_cache_v2() ***'); + console.log(`Local File Cache Path: ${local_file_cache_path}; Hash: ${hash}`); - if (fs.existsSync(local_file_cache_path)) { - } else { - // This should not happen. The directory needs to be created. - console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`); - return false; - } + if (fs.existsSync(local_file_cache_path)) { + } else { + // This should not happen. The directory needs to be created. + console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`); + return false; + } - let hash_filename = `${hash}.file`; + let hash_filename = `${hash}.file`; - let hash_subdirectory = hash_filename.substring(0,2); - let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory); + let hash_subdirectory = hash_filename.substring(0, 2); + let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory); - if (fs.existsSync(subdirectory_path)) { - } else { - // This should not happen. The subdirectory needs to be created. - console.log(`Hashed file subdirectory not found in cache directory: ${subdirectory_path}`); - return false; - } + if (fs.existsSync(subdirectory_path)) { + } else { + // This should not happen. The subdirectory needs to be created. + console.log(`Hashed file subdirectory not found in cache directory: ${subdirectory_path}`); + return false; + } - let full_cached_hash_path = path.join(subdirectory_path, hash_filename); + let full_cached_hash_path = path.join(subdirectory_path, hash_filename); - if (fs.existsSync(full_cached_hash_path)) { - // console.log(`Hashed file exists in cache: ${full_cached_hash_path}`); + if (fs.existsSync(full_cached_hash_path)) { + // console.log(`Hashed file exists in cache: ${full_cached_hash_path}`); - if (verify_hash) { - const file_buffer = fs.readFileSync(full_cached_hash_path); - const file_hash_sha256 = crypto.createHash('sha256'); - file_hash_sha256.update(file_buffer); - - const file_hash_sha256_check = file_hash_sha256.digest('hex'); - if (file_hash_sha256_check == hash) { - console.log('File hash match', file_hash_sha256_check); - } else { - // This should only happen if the file is actively being downloaded or it is corrupt. - console.log('File hash does not match', file_hash_sha256_check); - return false; - } - } - return true; - } else { - console.log(`Hashed file not found in cache: ${full_cached_hash_path}`); - return null; - } -} + if (verify_hash) { + const file_buffer = fs.readFileSync(full_cached_hash_path); + const file_hash_sha256 = crypto.createHash('sha256'); + file_hash_sha256.update(file_buffer); + const file_hash_sha256_check = file_hash_sha256.digest('hex'); + if (file_hash_sha256_check == hash) { + console.log('File hash match', file_hash_sha256_check); + } else { + // This should only happen if the file is actively being downloaded or it is corrupt. + console.log('File hash does not match', file_hash_sha256_check); + return false; + } + } + return true; + } else { + console.log(`Hashed file not found in cache: ${full_cached_hash_path}`); + return null; + } +}; // Download hash file to cache // Used by Svelte Event Launcher // Updated 2022-05-06 -exports.download_hash_file_to_cache = async function ({api_base_url, local_file_cache_path, event_file_id=null, hash=null}) { - // console.log('*** Electron framework export: download_hash_file_to_cache() ***'); - // console.log('Download hash file to cache'); - console.log(`*** Electron framework export: download_hash_file_to_cache() *** Base URL: ${api_base_url}; Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`); +exports.download_hash_file_to_cache = async function ({ + api_base_url, + local_file_cache_path, + event_file_id = null, + hash = null +}) { + // console.log('*** Electron framework export: download_hash_file_to_cache() ***'); + // console.log('Download hash file to cache'); + console.log( + `*** Electron framework export: download_hash_file_to_cache() *** Base URL: ${api_base_url}; Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}` + ); - let endpoint = `/event/file/${event_file_id}/download`; + let endpoint = `/event/file/${event_file_id}/download`; - let hash_filename = `${hash}.file`; + let hash_filename = `${hash}.file`; - let subdirectory = hash_filename.substring(0,2); - let subdirectory_path = path.join(local_file_cache_path, subdirectory); - if (fs.existsSync(subdirectory_path)) { - } else { - fs.mkdirSync(subdirectory_path); - console.log(`Subdirectory directory created: ${subdirectory_path}`); - } + let subdirectory = hash_filename.substring(0, 2); + let subdirectory_path = path.join(local_file_cache_path, subdirectory); + if (fs.existsSync(subdirectory_path)) { + } else { + fs.mkdirSync(subdirectory_path); + console.log(`Subdirectory directory created: ${subdirectory_path}`); + } - let hash_file_cache_path = path.join(subdirectory_path, hash_filename); - if (fs.existsSync(hash_file_cache_path)) { - if (check_hash) { - const file_buffer = fs.readFileSync(hash_file_cache_path); - const file_hash_sha256 = crypto.createHash('sha256'); - file_hash_sha256.update(file_buffer); + let hash_file_cache_path = path.join(subdirectory_path, hash_filename); + if (fs.existsSync(hash_file_cache_path)) { + if (check_hash) { + const file_buffer = fs.readFileSync(hash_file_cache_path); + const file_hash_sha256 = crypto.createHash('sha256'); + file_hash_sha256.update(file_buffer); - const file_hash_sha256_check = file_hash_sha256.digest('hex');S - if (file_hash_sha256_check == hash) { - console.log('File hash match', file_hash_sha256_check); - return true; - } else { - // This should only happen if the file is actively being downloaded or it is corrupt. - console.log('File hash does not match', file_hash_sha256_check); - return false; - } - } - } - // console.log(`!!!ABOUT TO CALL DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`); - let download_file_result = await ipcRenderer.invoke('download_file', api_base_url, endpoint, hash_file_cache_path).then((result) => { - if (result) { - console.log('IPC download file process finished successfully'); - return true; - } else if (result == null) { - console.log('IPC Download Result (file not found?):', result); - return null; - } else { - console.log('IPC Download Result (file being downloaded or something went wrong):', result); - return false; - } - }); - // console.log(`!!!DONE WITH DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`); - - return download_file_result; -} + const file_hash_sha256_check = file_hash_sha256.digest('hex'); + S; + if (file_hash_sha256_check == hash) { + console.log('File hash match', file_hash_sha256_check); + return true; + } else { + // This should only happen if the file is actively being downloaded or it is corrupt. + console.log('File hash does not match', file_hash_sha256_check); + return false; + } + } + } + // console.log(`!!!ABOUT TO CALL DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`); + let download_file_result = await ipcRenderer + .invoke('download_file', api_base_url, endpoint, hash_file_cache_path) + .then((result) => { + if (result) { + console.log('IPC download file process finished successfully'); + return true; + } else if (result == null) { + console.log('IPC Download Result (file not found?):', result); + return null; + } else { + console.log('IPC Download Result (file being downloaded or something went wrong):', result); + return false; + } + }); + // console.log(`!!!DONE WITH DOWNLOAD FILE HANDLER!!! exports.download_hash_file_to_cache(); Base URL: ${api_base_url}`); + return download_file_result; +}; // Download hash file to cache // Used by Svelte Event Launcher // Updated 2023-05-26 -exports.download_hash_file_to_cache_v2 = async function ({api_base_url, api_base_url_backup, local_file_cache_path, event_file_id=null, hash=null, verify_hash=true, overwrite_existing=false}) { - console.log('*** Aether App Native export: download_hash_file_to_cache_v2() ***'); - console.log(`Base URL: ${api_base_url}; Base URL Backup: ${api_base_url_backup}; Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`); +exports.download_hash_file_to_cache_v2 = async function ({ + api_base_url, + api_base_url_backup, + local_file_cache_path, + event_file_id = null, + hash = null, + verify_hash = true, + overwrite_existing = false +}) { + console.log('*** Aether App Native export: download_hash_file_to_cache_v2() ***'); + console.log( + `Base URL: ${api_base_url}; Base URL Backup: ${api_base_url_backup}; Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}` + ); - if (fs.existsSync(local_file_cache_path)) { - } else { - // This should not happen. The directory needs to be created. - console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`); - return false; - } + if (fs.existsSync(local_file_cache_path)) { + } else { + // This should not happen. The directory needs to be created. + console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`); + return false; + } - let endpoint = `/event/file/${event_file_id}/download`; + let endpoint = `/event/file/${event_file_id}/download`; - let hash_filename = `${hash}.file`; + let hash_filename = `${hash}.file`; - let hash_subdirectory = hash_filename.substring(0,2); - let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory); + let hash_subdirectory = hash_filename.substring(0, 2); + let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory); - if (fs.existsSync(subdirectory_path)) { - } else { - fs.mkdirSync(subdirectory_path); - console.log(`Hashed file subdirectory directory created in cache directory: ${subdirectory_path}`); - } + if (fs.existsSync(subdirectory_path)) { + } else { + fs.mkdirSync(subdirectory_path); + console.log( + `Hashed file subdirectory directory created in cache directory: ${subdirectory_path}` + ); + } - let full_cached_hash_path = path.join(subdirectory_path, hash_filename); + let full_cached_hash_path = path.join(subdirectory_path, hash_filename); - if (fs.existsSync(full_cached_hash_path)) { - console.log(`Hashed file exists in cache: ${full_cached_hash_path}`); + if (fs.existsSync(full_cached_hash_path)) { + console.log(`Hashed file exists in cache: ${full_cached_hash_path}`); - if (verify_hash) { - const file_buffer = fs.readFileSync(full_cached_hash_path); - const file_hash_sha256 = crypto.createHash('sha256'); - file_hash_sha256.update(file_buffer); + if (verify_hash) { + const file_buffer = fs.readFileSync(full_cached_hash_path); + const file_hash_sha256 = crypto.createHash('sha256'); + file_hash_sha256.update(file_buffer); - const file_hash_sha256_check = file_hash_sha256.digest('hex'); - if (file_hash_sha256_check == hash) { - // console.log('File hash match', file_hash_sha256_check); - if (overwrite_existing) { - console.log('Going to overwrite the existing file even though the hash matches.'); - } else { - return true; - } - } else { - // This should only happen if the file is actively being copied or it is corrupt. - console.log('File hash does not match', file_hash_sha256_check); - if (overwrite_existing) { - console.log('Going to overwrite the existing file because the hash does not match.'); - } else { - return false; - } - } - } - } + const file_hash_sha256_check = file_hash_sha256.digest('hex'); + if (file_hash_sha256_check == hash) { + // console.log('File hash match', file_hash_sha256_check); + if (overwrite_existing) { + console.log('Going to overwrite the existing file even though the hash matches.'); + } else { + return true; + } + } else { + // This should only happen if the file is actively being copied or it is corrupt. + console.log('File hash does not match', file_hash_sha256_check); + if (overwrite_existing) { + console.log('Going to overwrite the existing file because the hash does not match.'); + } else { + return false; + } + } + } + } - const tmp_full_save_path = full_cached_hash_path+'.tmp'; + const tmp_full_save_path = full_cached_hash_path + '.tmp'; - if (fs.existsSync(tmp_full_save_path)) { - console.log(`A temp download file was found! ${tmp_full_save_path}`); + if (fs.existsSync(tmp_full_save_path)) { + console.log(`A temp download file was found! ${tmp_full_save_path}`); - let stats = null; - try { - stats = fs.statSync(tmp_full_save_path); + let stats = null; + try { + stats = fs.statSync(tmp_full_save_path); - // console.log(`File Accessed Last: ${stats.atime}`); // File data last changed (actual contents) - console.log(`File Data Last Modified: ${stats.mtime}`); // File data last changed (actual contents) - console.log(`File Metadata Last Modified: ${stats.ctime}`); // File metadata last changed (filename, permissions, etc) - } catch (error) { - console.log(error); - } + // console.log(`File Accessed Last: ${stats.atime}`); // File data last changed (actual contents) + console.log(`File Data Last Modified: ${stats.mtime}`); // File data last changed (actual contents) + console.log(`File Metadata Last Modified: ${stats.ctime}`); // File metadata last changed (filename, permissions, etc) + } catch (error) { + console.log(error); + } - let current_datetime = new Date(); - let offset_minutes = 3; // In minutes. 5 minutes of no changes to the file content seems reasonable? Trying with 3 minutes 2022-10-12 - let offset_datetime = new Date(current_datetime.getTime() - offset_minutes*60000); + let current_datetime = new Date(); + let offset_minutes = 3; // In minutes. 5 minutes of no changes to the file content seems reasonable? Trying with 3 minutes 2022-10-12 + let offset_datetime = new Date(current_datetime.getTime() - offset_minutes * 60000); - // console.log(`Times: ${current_datetime} ${offset_datetime} | File ${stats.mtime}`); - if (stats.mtime < offset_datetime) { - // console.log(`Marking as expired temp file based on modified datetime. Expire after: ${offset_minutes} minutes`); - // overwrite_existing = true; - } else { - console.log(`Temp download file has not expired yet. Expire after: ${offset_minutes} minutes`); - // return false; - return 'tmp'; - } - } + // console.log(`Times: ${current_datetime} ${offset_datetime} | File ${stats.mtime}`); + if (stats.mtime < offset_datetime) { + // console.log(`Marking as expired temp file based on modified datetime. Expire after: ${offset_minutes} minutes`); + // overwrite_existing = true; + } else { + console.log( + `Temp download file has not expired yet. Expire after: ${offset_minutes} minutes` + ); + // return false; + return 'tmp'; + } + } - console.log(`Trying IPC API download from: ${api_base_url}`); - let download_file_result = await ipcRenderer.invoke('download_file', api_base_url, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then(async (result) => { + console.log(`Trying IPC API download from: ${api_base_url}`); + let download_file_result = await ipcRenderer + .invoke( + 'download_file', + api_base_url, + endpoint, + full_cached_hash_path, + hash, + verify_hash, + overwrite_existing + ) + .then(async (result) => { + if (result) { + console.log(`IPC API download file process finished successfully: ${hash}`); + return true; + } else if (result == null) { + console.log(`IPC API download result (file not found?):`, result); + return null; + } else if (result === 'in_progress') { + console.log(`IPC API primary download IN PROGRESS: ${hash}`); + // return false; // Should return result instead??? + return result; + } else if (result === 'tmp') { + console.log(`IPC API primary download FOUND TMP: ${hash}`); + // return false; // Should return result instead??? + return result; + } else { + console.log( + `IPC API download result (file being downloaded or something went wrong): ${hash}`, + result + ); + return false; - if (result) { - console.log(`IPC API download file process finished successfully: ${hash}`); - return true; - } else if (result == null) { - console.log(`IPC API download result (file not found?):`, result); - return null; - } else if (result === 'in_progress') { - console.log(`IPC API primary download IN PROGRESS: ${hash}`); - // return false; // Should return result instead??? - return result; - } else if (result === 'tmp') { - console.log(`IPC API primary download FOUND TMP: ${hash}`); - // return false; // Should return result instead??? - return result; - } else { - console.log(`IPC API download result (file being downloaded or something went wrong): ${hash}`, result); - return false; - - // if (api_base_url_backup) { - // console.log(`Download FAILED! Trying again with backup API server. API Backup: ${api_base_url_backup}`); - // let download_backup_file_result = await ipcRenderer.invoke('download_file', api_base_url_backup, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then((result_backup) => { - // if (result_backup) { - // console.log('IPC download file (from backup) process finished successfully'); - // return true; - // } else if (result_backup == null) { - // console.log('IPC Download Result (from backup) (file not found?):', result_backup); - // return null; - // } else { - // console.log('IPC Download Result (from backup) (file being downloaded or something went wrong):', result_backup); - // return false; - // } - // }); - // } else { - // return false; - // } - } - return true; - // }); - }).then(async (result) => { - if (result === false) { - console.log(`IPC API primary download FAILED!`); // Trying again with backup API server. API Backup: ${api_base_url_backup}`); - if (api_base_url_backup) { - console.log(`IPC API primary download FAILED! Trying again with backup API server. API Backup: ${api_base_url_backup}`); - console.log(`Trying IPC API backup download from: ${api_base_url_backup}`); - let download_backup_file_result = await ipcRenderer.invoke('download_file', api_base_url_backup, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then((result_backup) => { - if (result_backup) { - console.log(`IPC API backup download file (from backup) process finished successfully: ${hash}`); - return true; - } else if (result_backup == null) { - console.log('IPC API backup download result (file not found?):', result_backup); - return null; - } else { - console.log(`IPC API backup download result (file being downloaded or something went wrong): ${hash}`, result_backup); - return false; - } - }); - return download_backup_file_result; - } else { - console.log(`IPC Download FAILED! No backup API server passed. Returning false.`); - return false; - } - - } else if (result === 'in_progress') { - console.log(`IPC API primary download IN PROGRESS: ${hash}`); - return false; // Should return result instead??? - } else if (result === 'tmp') { - console.log(`IPC API primary download FOUND TMP: ${hash}`); - return false; // Should return result instead??? - } else { - return result; - } - }); - - // if (download_file_result === false) { - // console.log(`Download FAILED! Trying again with backup API server. API Backup: ${api_base_url_backup}`) - // download_file_result = await ipcRenderer.invoke('download_file', api_base_url_backup, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then((result) => { - // if (result) { - // console.log('IPC download file (from backup) process finished successfully'); - // return true; - // } else if (result == null) { - // console.log('IPC Download Result (from backup) (file not found?):', result); - // return null; - // } else { - // console.log('IPC Download Result (from backup) (file being downloaded or something went wrong):', result); - // return false; - // } - // }); - // } - - return download_file_result; -} + // if (api_base_url_backup) { + // console.log(`Download FAILED! Trying again with backup API server. API Backup: ${api_base_url_backup}`); + // let download_backup_file_result = await ipcRenderer.invoke('download_file', api_base_url_backup, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then((result_backup) => { + // if (result_backup) { + // console.log('IPC download file (from backup) process finished successfully'); + // return true; + // } else if (result_backup == null) { + // console.log('IPC Download Result (from backup) (file not found?):', result_backup); + // return null; + // } else { + // console.log('IPC Download Result (from backup) (file being downloaded or something went wrong):', result_backup); + // return false; + // } + // }); + // } else { + // return false; + // } + } + return true; + // }); + }) + .then(async (result) => { + if (result === false) { + console.log(`IPC API primary download FAILED!`); // Trying again with backup API server. API Backup: ${api_base_url_backup}`); + if (api_base_url_backup) { + console.log( + `IPC API primary download FAILED! Trying again with backup API server. API Backup: ${api_base_url_backup}` + ); + console.log(`Trying IPC API backup download from: ${api_base_url_backup}`); + let download_backup_file_result = await ipcRenderer + .invoke( + 'download_file', + api_base_url_backup, + endpoint, + full_cached_hash_path, + hash, + verify_hash, + overwrite_existing + ) + .then((result_backup) => { + if (result_backup) { + console.log( + `IPC API backup download file (from backup) process finished successfully: ${hash}` + ); + return true; + } else if (result_backup == null) { + console.log('IPC API backup download result (file not found?):', result_backup); + return null; + } else { + console.log( + `IPC API backup download result (file being downloaded or something went wrong): ${hash}`, + result_backup + ); + return false; + } + }); + return download_backup_file_result; + } else { + console.log(`IPC Download FAILED! No backup API server passed. Returning false.`); + return false; + } + } else if (result === 'in_progress') { + console.log(`IPC API primary download IN PROGRESS: ${hash}`); + return false; // Should return result instead??? + } else if (result === 'tmp') { + console.log(`IPC API primary download FOUND TMP: ${hash}`); + return false; // Should return result instead??? + } else { + return result; + } + }); + // if (download_file_result === false) { + // console.log(`Download FAILED! Trying again with backup API server. API Backup: ${api_base_url_backup}`) + // download_file_result = await ipcRenderer.invoke('download_file', api_base_url_backup, endpoint, full_cached_hash_path, hash, verify_hash, overwrite_existing).then((result) => { + // if (result) { + // console.log('IPC download file (from backup) process finished successfully'); + // return true; + // } else if (result == null) { + // console.log('IPC Download Result (from backup) (file not found?):', result); + // return null; + // } else { + // console.log('IPC Download Result (from backup) (file being downloaded or something went wrong):', result); + // return false; + // } + // }); + // } + return download_file_result; +}; // Open cached hash file after copying to temp directory // Used by Svelte Event Launcher // NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11 // Updated 2022-05-06 -exports.open_hash_file_to_temp = async function ({local_file_cache_path, hash, host_file_temp_path, filename}) { - console.log('*** Electron framework export: open_hash_file_to_temp() ***'); - // console.log('Open cached hash file after copying to temp directory'); - console.log(`Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}`); +exports.open_hash_file_to_temp = async function ({ + local_file_cache_path, + hash, + host_file_temp_path, + filename +}) { + console.log('*** Electron framework export: open_hash_file_to_temp() ***'); + // console.log('Open cached hash file after copying to temp directory'); + console.log( + `Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}` + ); - let subdirectory = hash.substring(0,2); - let subdirectory_path = path.join(local_file_cache_path, subdirectory); - if (fs.existsSync(subdirectory_path)) { - } else { - console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`); - return false; - } + let subdirectory = hash.substring(0, 2); + let subdirectory_path = path.join(local_file_cache_path, subdirectory); + if (fs.existsSync(subdirectory_path)) { + } else { + console.log(`Hashed file subdirectory not found in cache: ${subdirectory_path}`); + return false; + } - let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', subdirectory_path, hash, host_file_temp_path, filename).then((result) => { - console.log('IPC open hash file to temp finished'); - console.log(result); - return true; - }) - - // let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename); - // console.log(result); - - console.log(open_hash_file_to_temp_result); - console.log('End: open_hash_file_to_temp()'); - if (open_hash_file_to_temp_result) { - console.log('File opened successfully'); - return true; - } else { - console.log('File was not opened successfully'); - return false; - } -} + let open_hash_file_to_temp_result = await ipcRenderer + .invoke('open_hash_file_to_temp', subdirectory_path, hash, host_file_temp_path, filename) + .then((result) => { + console.log('IPC open hash file to temp finished'); + console.log(result); + return true; + }); + // let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename); + // console.log(result); + console.log(open_hash_file_to_temp_result); + console.log('End: open_hash_file_to_temp()'); + if (open_hash_file_to_temp_result) { + console.log('File opened successfully'); + return true; + } else { + console.log('File was not opened successfully'); + return false; + } +}; // Open cached hash file after copying to temp directory // Used by Svelte Event Launcher // Updated 2022-10-12 -exports.open_hash_file_to_temp_v2 = async function ({local_file_cache_path, hash, host_file_temp_path, filename, verify_hash=true}) { - console.log('*** Aether App Native export: open_hash_file_to_temp_v2() ***'); - console.log(`Local File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Local File Temp Path: ${host_file_temp_path}; Filename: ${filename}`); +exports.open_hash_file_to_temp_v2 = async function ({ + local_file_cache_path, + hash, + host_file_temp_path, + filename, + verify_hash = true +}) { + console.log('*** Aether App Native export: open_hash_file_to_temp_v2() ***'); + console.log( + `Local File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Local File Temp Path: ${host_file_temp_path}; Filename: ${filename}` + ); - // console.log('Process: Check local hash file cache, Download hash file to cache, and Open cached hash file after copying to temp directory'); + // console.log('Process: Check local hash file cache, Download hash file to cache, and Open cached hash file after copying to temp directory'); - if (fs.existsSync(local_file_cache_path)) { - } else { - // This should not happen. The directory needs to be created. - console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`); - return false; - } + if (fs.existsSync(local_file_cache_path)) { + } else { + // This should not happen. The directory needs to be created. + console.log(`Cache directory for hashed files was not found: ${local_file_cache_path}`); + return false; + } - let hash_filename = `${hash}.file`; + let hash_filename = `${hash}.file`; - let hash_subdirectory = hash_filename.substring(0,2); - let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory); + let hash_subdirectory = hash_filename.substring(0, 2); + let subdirectory_path = path.join(local_file_cache_path, hash_subdirectory); - if (fs.existsSync(subdirectory_path)) { - } else { - // This should not happen. The subdirectory needs to be created. - console.log(`Hashed file subdirectory not found in cache directory: ${subdirectory_path}`); - return false; - } + if (fs.existsSync(subdirectory_path)) { + } else { + // This should not happen. The subdirectory needs to be created. + console.log(`Hashed file subdirectory not found in cache directory: ${subdirectory_path}`); + return false; + } - let full_cached_hash_path = path.join(subdirectory_path, hash_filename); + let full_cached_hash_path = path.join(subdirectory_path, hash_filename); - if (fs.existsSync(full_cached_hash_path)) { - console.log(`Hashed file exists in cache: ${full_cached_hash_path}`); + if (fs.existsSync(full_cached_hash_path)) { + console.log(`Hashed file exists in cache: ${full_cached_hash_path}`); - if (verify_hash) { - const file_buffer = fs.readFileSync(full_cached_hash_path); - const file_hash_sha256 = crypto.createHash('sha256'); - file_hash_sha256.update(file_buffer); + if (verify_hash) { + const file_buffer = fs.readFileSync(full_cached_hash_path); + const file_hash_sha256 = crypto.createHash('sha256'); + file_hash_sha256.update(file_buffer); - const file_hash_sha256_check = file_hash_sha256.digest('hex'); - if (file_hash_sha256_check == hash) { - // console.log('File hash match', file_hash_sha256_check); - } else { - // This should only happen if the file is actively being downloaded or it is corrupt. - console.log('File hash does not match', file_hash_sha256_check); - return false; - } - } - } else { - console.log(`Hashed file not found in cache: ${full_cached_hash_path}`); - return null; - } + const file_hash_sha256_check = file_hash_sha256.digest('hex'); + if (file_hash_sha256_check == hash) { + // console.log('File hash match', file_hash_sha256_check); + } else { + // This should only happen if the file is actively being downloaded or it is corrupt. + console.log('File hash does not match', file_hash_sha256_check); + return false; + } + } + } else { + console.log(`Hashed file not found in cache: ${full_cached_hash_path}`); + return null; + } - let local_file_cache_path_w_sub = subdirectory_path; // I need to go back and clean up the variable names related file directory and file paths. - // NOTE: Setting check_hash to false since by default it was checked above. - let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', local_file_cache_path_w_sub, hash, host_file_temp_path, filename, verify_hash=false).then((result) => { - console.log('IPC open hash file to temp finished'); - if (result) { - console.log('Local hash file was opened from temp directory.'); - return result; - } else { - console.log('Local hash file was not opened from the temp directory. Something went wrong.'); - console.log(result); - return false; - } - }) + let local_file_cache_path_w_sub = subdirectory_path; // I need to go back and clean up the variable names related file directory and file paths. + // NOTE: Setting check_hash to false since by default it was checked above. + let open_hash_file_to_temp_result = await ipcRenderer + .invoke( + 'open_hash_file_to_temp', + local_file_cache_path_w_sub, + hash, + host_file_temp_path, + filename, + (verify_hash = false) + ) + .then((result) => { + console.log('IPC open hash file to temp finished'); + if (result) { + console.log('Local hash file was opened from temp directory.'); + return result; + } else { + console.log( + 'Local hash file was not opened from the temp directory. Something went wrong.' + ); + console.log(result); + return false; + } + }); - // let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename); - // console.log(result); - - // console.log(open_hash_file_to_temp_result); - // console.log('End: open_hash_file_to_temp()'); - // if (open_hash_file_to_temp_result) { - // console.log('File opened successfully'); - // return true; - // } else { - // console.log('File was not opened successfully'); - // return false; - // } - - // let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', subdirectory_path, hash, host_file_temp_path, filename).then((result) => { - // console.log('IPC open hash file to temp finished'); - // if (result) { - // console.log('Local hash file was opened from temp directory.'); - // return result; - // } else { - // console.log('Local hash file was not opened from the temp directory. Something went wrong.'); - // console.log(result); - // return false; - // } - // }) - - return open_hash_file_to_temp_result; -} + // let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename); + // console.log(result); + // console.log(open_hash_file_to_temp_result); + // console.log('End: open_hash_file_to_temp()'); + // if (open_hash_file_to_temp_result) { + // console.log('File opened successfully'); + // return true; + // } else { + // console.log('File was not opened successfully'); + // return false; + // } + // let open_hash_file_to_temp_result = await ipcRenderer.invoke('open_hash_file_to_temp', subdirectory_path, hash, host_file_temp_path, filename).then((result) => { + // console.log('IPC open hash file to temp finished'); + // if (result) { + // console.log('Local hash file was opened from temp directory.'); + // return result; + // } else { + // console.log('Local hash file was not opened from the temp directory. Something went wrong.'); + // console.log(result); + // return false; + // } + // }) + return open_hash_file_to_temp_result; +}; // Open local file // Used by Svelte Event Launcher // NOTE: Trying to replace this with something directly in the Svelte app part. 2022-10-11 // Updated 2022-03-10 -exports.open_local_file = async function ({local_file_path, filename}) { - console.log('*** Electron framework export: open_local_file() ***'); - // console.log('Open local file'); - console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`); +exports.open_local_file = async function ({ local_file_path, filename }) { + console.log('*** Electron framework export: open_local_file() ***'); + // console.log('Open local file'); + console.log(`Local File Path: ${local_file_path}; Filename: ${filename}`); - // let full_local_file_path = path.join(local_file_path, filename); - // console.log(full_local_file_path); + // let full_local_file_path = path.join(local_file_path, filename); + // console.log(full_local_file_path); - // if (fs.existsSync(full_local_file_path)) { - // console.log(`Local file exists: ${full_local_file_path}`); - // // return true; - // } else { - // return false; - // } + // if (fs.existsSync(full_local_file_path)) { + // console.log(`Local file exists: ${full_local_file_path}`); + // // return true; + // } else { + // return false; + // } - let open_local_file_result = await ipcRenderer.invoke('open_local_file', local_file_path, filename).then((result) => { - console.log('IPC open local file finished'); - console.log(result); - return true; - }) - - console.log(open_local_file_result); - console.log('End: open_local_file()'); - if (open_local_file_result) { - console.log('File opened successfully'); - return true; - } else { - console.log('File was not opened successfully'); - return false; - } -} + let open_local_file_result = await ipcRenderer + .invoke('open_local_file', local_file_path, filename) + .then((result) => { + console.log('IPC open local file finished'); + console.log(result); + return true; + }); + console.log(open_local_file_result); + console.log('End: open_local_file()'); + if (open_local_file_result) { + console.log('File opened successfully'); + return true; + } else { + console.log('File was not opened successfully'); + return false; + } +}; // // Check local file cache and download from server if needed. // // Updated 2022-03-09 @@ -940,452 +1042,484 @@ exports.open_local_file = async function ({local_file_path, filename}) { // } // } - // Check local file cache and download from server if needed. Must use IPC to Main to download file. Set a Promise to wait for download_file_reply. // Updated 2022-03-09 -async function check_file_cache({api_base_url, local_file_cache_path, event_file_id, hash}) { - console.log('*** Electron framework: check_file_cache() ***'); - // console.log('Check local file cache and download from server if needed.'); - console.log(`Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}`); +async function check_file_cache({ api_base_url, local_file_cache_path, event_file_id, hash }) { + console.log('*** Electron framework: check_file_cache() ***'); + // console.log('Check local file cache and download from server if needed.'); + console.log( + `Host File Cache Path: ${local_file_cache_path}; Event File ID: ${event_file_id}; Hash: ${hash}` + ); - // NOTE: event_file_id is the event_file.id_random or event_file.event_file_id_random - let hash_filename = hash+'.file'; + // NOTE: event_file_id is the event_file.id_random or event_file.event_file_id_random + let hash_filename = hash + '.file'; - let save_path = path.join(local_file_cache_path, hash_filename); - console.log(save_path); + let save_path = path.join(local_file_cache_path, hash_filename); + console.log(save_path); - if (fs.existsSync(save_path)) { - console.log('Hashed file cache already exists: '+save_path); - return true; - } else { - console.log('Hashed file not found in local cache. Downloading file: '+save_path); - let endpoint = `/event/file/${event_file_id}/download`; - let result = await ipcRenderer.send('download_file', api_base_url, endpoint, save_path); // Must download file using main node.js thread. - console.log(result); + if (fs.existsSync(save_path)) { + console.log('Hashed file cache already exists: ' + save_path); + return true; + } else { + console.log('Hashed file not found in local cache. Downloading file: ' + save_path); + let endpoint = `/event/file/${event_file_id}/download`; + let result = await ipcRenderer.send('download_file', api_base_url, endpoint, save_path); // Must download file using main node.js thread. + console.log(result); - return new Promise((resolve, reject) => { - ipcRenderer.once('download_file_reply', function(event, response){ - console.log(response); - return response; - }) - resolve(true); - }); + return new Promise((resolve, reject) => { + ipcRenderer.once('download_file_reply', function (event, response) { + console.log(response); + return response; + }); + resolve(true); + }); - // await ipcRenderer.once('download_file_reply', function(event, response){ - // console.log(response); - // return response; - // }); + // await ipcRenderer.once('download_file_reply', function(event, response){ + // console.log(response); + // return response; + // }); - // result.then(function (response) { - // console.log('Downloaded!!!???'); - // return true; - // }).catch(function (error: any) { - // console.log(error); - // return false; - // }); + // result.then(function (response) { + // console.log('Downloaded!!!???'); + // return true; + // }).catch(function (error: any) { + // console.log(error); + // return false; + // }); - // return result; + // return result; - // console.log(result); - // if (result) { - // return true; - // } else { - // return false; - // } - } + // console.log(result); + // if (result) { + // return true; + // } else { + // return false; + // } + } } - // IPC to Main: Open local file cache if available. Copy to temp directory with given filename first. // Updated 2022-03-09 -async function open_local_file({local_file_cache_path, hash, host_file_temp_path, filename}) { - console.log('*** Electron framework: open_local_file() ***'); - // console.log('Open local file cache if available. Copy to temp directory with given filename first.'); - console.log(`Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}`); +async function open_local_file({ local_file_cache_path, hash, host_file_temp_path, filename }) { + console.log('*** Electron framework: open_local_file() ***'); + // console.log('Open local file cache if available. Copy to temp directory with given filename first.'); + console.log( + `Host File Cache Path: ${local_file_cache_path}; Hash: ${hash}; Host File Temp Path: ${host_file_temp_path}; Filename: ${filename}` + ); - console.log(local_file_cache_path); - console.log(hash); - console.log(filename); + console.log(local_file_cache_path); + console.log(hash); + console.log(filename); - let result = await ipcRenderer.send('open_local_file', local_file_cache_path, hash, host_file_temp_path, filename); - console.log(result); + let result = await ipcRenderer.send( + 'open_local_file', + local_file_cache_path, + hash, + host_file_temp_path, + filename + ); + console.log(result); - return true; + return true; } - // No longer needed? Not referenced as of 2022-10-11 -exports.check_file_cache_and_open_local_file = async function ({local_file_cache_path, event_file_id, hash, host_file_temp_path, filename}) { - console.log('*** Electron framework: check_file_cache_and_open_local_file() ***'); - console.log('Checking the local file cache against the remote server and then opening the local file.'); +exports.check_file_cache_and_open_local_file = async function ({ + local_file_cache_path, + event_file_id, + hash, + host_file_temp_path, + filename +}) { + console.log('*** Electron framework: check_file_cache_and_open_local_file() ***'); + console.log( + 'Checking the local file cache against the remote server and then opening the local file.' + ); - let check_file_cache_result = check_file_cache({local_file_cache_path: local_file_cache_path, event_file_id: event_file_id, hash: hash}); - console.log(check_file_cache_result); + let check_file_cache_result = check_file_cache({ + local_file_cache_path: local_file_cache_path, + event_file_id: event_file_id, + hash: hash + }); + console.log(check_file_cache_result); - if (check_file_cache_result) { - let open_local_file_result = open_local_file({local_file_cache_path: local_file_cache_path, hash: hash, host_file_temp_path: host_file_temp_path, filename: filename}); - console.log(open_local_file_result); + if (check_file_cache_result) { + let open_local_file_result = open_local_file({ + local_file_cache_path: local_file_cache_path, + hash: hash, + host_file_temp_path: host_file_temp_path, + filename: filename + }); + console.log(open_local_file_result); - return open_local_file_result; - } + return open_local_file_result; + } - ipcRenderer.once('download_file_reply', function(event, response){ - console.log(response); + ipcRenderer.once('download_file_reply', function (event, response) { + console.log(response); - let open_local_file_result = open_local_file({local_file_cache_path: local_file_cache_path, hash: hash, host_file_temp_path: host_file_temp_path, filename: filename}); - console.log(open_local_file_result); - - return open_local_file_result; - }) -} + let open_local_file_result = open_local_file({ + local_file_cache_path: local_file_cache_path, + hash: hash, + host_file_temp_path: host_file_temp_path, + filename: filename + }); + console.log(open_local_file_result); + return open_local_file_result; + }); +}; // Kill processes // Signals: HUP (hang up), INT (interrupt), QUIT (quit), ABRT (abort), KILL (non-catchable, non-ignoraable kill), ALRMn (alarm clock), TERM (default; software termination signal) // Updated 2022-05-07 -exports.kill_processes = async function ({process_name = null, process_id = null, signal = null}) { - console.log('*** Electron framework export: kill_processes() ***'); - console.log(process_name); // process_name or grep pattern +exports.kill_processes = async function ({ + process_name = null, + process_id = null, + signal = null +}) { + console.log('*** Electron framework export: kill_processes() ***'); + console.log(process_name); // process_name or grep pattern - let cmd = ''; - if (os.platform == 'darwin') { - if (signal == 'HUP') { - cmd = `killall -HUP '${process_name}'`; - } else if (signal == 'INT') { - cmd = `killall -INT '${process_name}'`; - } else if (signal == 'QUIT') { - cmd = `killall -QUIT '${process_name}'`; - } else if (signal == 'ABRT') { - cmd = `killall -ABRT '${process_name}'`; - } else if (signal == 'KILL') { - cmd = `killall -KILL '${process_name}'`; - } else if (signal == 'ALRM') { - cmd = `killall -ALRM '${process_name}'`; - } else if (signal == 'TERM') { - cmd = `killall -TERM '${process_name}'`; - } else if (process_id && signal == 'HUP') { - cmd = `killall -HUP ${process_id}`; - } else if (process_id && signal == 'INT') { - cmd = `killall -INT ${process_id}`; - } else if (process_id && signal == 'QUIT') { - cmd = `killall -QUIT ${process_id}`; - } else if (process_id && signal == 'ABRT') { - cmd = `killall -ABRT ${process_id}`; - } else if (process_id && signal == 'KILL') { - cmd = `killall -KILL ${process_id}`; - } else if (process_id && signal == 'ALRM') { - cmd = `killall -ALRM ${process_id}`; - } else if (process_id && signal == 'TERM') { - cmd = `killall -TERM ${process_id}`; - } else { - // cmd = `osascript -e 'quit app "${process_name}" saving no'`; - cmd = `osascript -e 'quit application "${process_name}" saving no'`; - } + let cmd = ''; + if (os.platform == 'darwin') { + if (signal == 'HUP') { + cmd = `killall -HUP '${process_name}'`; + } else if (signal == 'INT') { + cmd = `killall -INT '${process_name}'`; + } else if (signal == 'QUIT') { + cmd = `killall -QUIT '${process_name}'`; + } else if (signal == 'ABRT') { + cmd = `killall -ABRT '${process_name}'`; + } else if (signal == 'KILL') { + cmd = `killall -KILL '${process_name}'`; + } else if (signal == 'ALRM') { + cmd = `killall -ALRM '${process_name}'`; + } else if (signal == 'TERM') { + cmd = `killall -TERM '${process_name}'`; + } else if (process_id && signal == 'HUP') { + cmd = `killall -HUP ${process_id}`; + } else if (process_id && signal == 'INT') { + cmd = `killall -INT ${process_id}`; + } else if (process_id && signal == 'QUIT') { + cmd = `killall -QUIT ${process_id}`; + } else if (process_id && signal == 'ABRT') { + cmd = `killall -ABRT ${process_id}`; + } else if (process_id && signal == 'KILL') { + cmd = `killall -KILL ${process_id}`; + } else if (process_id && signal == 'ALRM') { + cmd = `killall -ALRM ${process_id}`; + } else if (process_id && signal == 'TERM') { + cmd = `killall -TERM ${process_id}`; + } else { + // cmd = `osascript -e 'quit app "${process_name}" saving no'`; + cmd = `osascript -e 'quit application "${process_name}" saving no'`; + } + } else { + cmd = `pkill ${process_name}`; + } - } else { - cmd = `pkill ${process_name}`; - } + child_process.exec(cmd, (err, stdout, stdin) => { + // if (err) throw err; + if (err) console.log(err); + console.log(stdout); + }); + console.log(`Killed processes matching ${process_name}`); - child_process.exec(cmd, (err, stdout, stdin) => { - // if (err) throw err; - if (err) console.log(err); - console.log(stdout); - }); - console.log(`Killed processes matching ${process_name}`); + if (os.platform == 'darwin') { + if (process_name == 'Parallels:Acrobat Reader') { + // Regular expression: (Parallels).*(Acrobat Reader) + // This will find any process with Parallels and Acrobat Reader in the name + cmd = `pkill -i -f '(Parallels).*(Acrobat Reader)'`; - if (os.platform == 'darwin') { - if (process_name == 'Parallels:Acrobat Reader') { - // Regular expression: (Parallels).*(Acrobat Reader) - // This will find any process with Parallels and Acrobat Reader in the name - cmd = `pkill -i -f '(Parallels).*(Acrobat Reader)'`; + child_process.exec(cmd, (err, stdout, stdin) => { + if (err) throw err; + console.log(stdout); + }); + console.log('Killed Parallels Acrobat Reader process'); + } - child_process.exec(cmd, (err, stdout, stdin) => { - if (err) throw err; - console.log(stdout); - }); - console.log('Killed Parallels Acrobat Reader process'); - } + if (process_name == 'Parallels:PowerPoint') { + // Regular expression: (Parallels).*(PowerPoint) + // This will find any process with Parallels and PowerPoint in the name + cmd = `pkill -i -f '(Parallels).*(PowerPoint)'`; - if (process_name == 'Parallels:PowerPoint') { - // Regular expression: (Parallels).*(PowerPoint) - // This will find any process with Parallels and PowerPoint in the name - cmd = `pkill -i -f '(Parallels).*(PowerPoint)'`; + child_process.exec(cmd, (err, stdout, stdin) => { + if (err) throw err; + console.log(stdout); + }); + console.log('Killed Parallels PowerPoint process'); + } + } - child_process.exec(cmd, (err, stdout, stdin) => { - if (err) throw err; - console.log(stdout); - }); - console.log('Killed Parallels PowerPoint process'); - } - } - - // let signal = 'SIGTERM'; // 'SIGTERM', 'SIGINT', 'SIGHUP' - // process.kill(pid, signal); - // process.kill(pid, 0); // Special case test if process exists - - return true; -} + // let signal = 'SIGTERM'; // 'SIGTERM', 'SIGINT', 'SIGHUP' + // process.kill(pid, signal); + // process.kill(pid, 0); // Special case test if process exists + return true; +}; // Run raw osascript // Updated 2022-05-07 -exports.run_osascript = async function ({cmd=null, interactive=false, language=null, flags='h', program_file=null}) { - console.log('*** Electron framework export: run_osascript() ***'); - console.log(cmd); +exports.run_osascript = async function ({ + cmd = null, + interactive = false, + language = null, + flags = 'h', + program_file = null +}) { + console.log('*** Electron framework export: run_osascript() ***'); + console.log(cmd); - if (os.platform == 'darwin') { - } else { - console.log('Not available for this platform. macOS (darwin) only.'); - return false; - } + if (os.platform == 'darwin') { + } else { + console.log('Not available for this platform. macOS (darwin) only.'); + return false; + } - let osascript_str = ''; + let osascript_str = ''; - if (Array.isArray(cmd)) { - console.log('List of cmd strings'); - let cmds_str = ''; - for (let i = 0; i < cmd.length; i++) { - cmds_str += `-e '${cmd[i]}'`; - } - osascript_str = `osascript ${cmds_str}` + if (Array.isArray(cmd)) { + console.log('List of cmd strings'); + let cmds_str = ''; + for (let i = 0; i < cmd.length; i++) { + cmds_str += `-e '${cmd[i]}'`; + } + osascript_str = `osascript ${cmds_str}`; + } else if (typeof cmd === 'string') { + console.log('Single cmd string'); + osascript_str = `osascript -e '${cmd}'`; + } else { + return false; + } - } else if (typeof cmd === 'string') { - console.log('Single cmd string'); - osascript_str = `osascript -e '${cmd}'`; - } else { - return false; - } + if (language) { + console.log(`Language: ${language}`); + osascript_str = `${osascript_str} -l ${language}`; + } - if (language) { - console.log(`Language: ${language}`); - osascript_str = `${osascript_str} -l ${language}`; - } + if (flags) { + console.log(`Flags: ${flags}`); + osascript_str = `${osascript_str} -s ${flags}`; + } - if (flags) { - console.log(`Flags: ${flags}`); - osascript_str = `${osascript_str} -s ${flags}`; - } - - console.log(`OSA Script String: ${osascript_str}`); - child_process.exec(osascript_str, (err, stdout, stdin) => { - if (err) throw err; - console.log(stdout); - console.log(stdin); - }); - - console.log('Finished'); - return true; -} + console.log(`OSA Script String: ${osascript_str}`); + child_process.exec(osascript_str, (err, stdout, stdin) => { + if (err) throw err; + console.log(stdout); + console.log(stdin); + }); + console.log('Finished'); + return true; +}; // Run raw command // Updated 2022-05-07 -exports.run_cmd = async function ({cmd=null, return_stdout=null, return_stdin=null, sync=null}) { - console.log('*** Electron framework export: run_cmd() ***'); +exports.run_cmd = async function ({ + cmd = null, + return_stdout = null, + return_stdin = null, + sync = null +}) { + console.log('*** Electron framework export: run_cmd() ***'); - console.log(`Command String: ${cmd}`); + console.log(`Command String: ${cmd}`); - let result; + let result; - if (!sync) { - result = child_process.exec(cmd, (err, stdout, stdin) => { - // if (err) throw err; - if (err) { - console.log('Error:', err); - return false; - }; + if (!sync) { + result = child_process.exec(cmd, (err, stdout, stdin) => { + // if (err) throw err; + if (err) { + console.log('Error:', err); + return false; + } - console.log('stdout:', stdout); - // console.log('stdin:', stdin); + console.log('stdout:', stdout); + // console.log('stdin:', stdin); - if (return_stdout) { - console.log('Finished and returning stdout'); - return stdout; - } else { - console.log('Finished and returning true'); - return true; - } - }); - } else { - result = child_process.execSync(cmd, (err, stdout, stdin) => { - // if (err) throw err; - if (err) { - console.log('Error:', err); - return false; - }; + if (return_stdout) { + console.log('Finished and returning stdout'); + return stdout; + } else { + console.log('Finished and returning true'); + return true; + } + }); + } else { + result = child_process.execSync(cmd, (err, stdout, stdin) => { + // if (err) throw err; + if (err) { + console.log('Error:', err); + return false; + } - console.log('stdout:', stdout); - // console.log('stdin:', stdin); + console.log('stdout:', stdout); + // console.log('stdin:', stdin); - if (return_stdout) { - console.log('Finished and returning stdout'); - return stdout; - } else { - console.log('Finished and returning true'); - return true; - } - }); - } - - console.log('Result:', result); - return result; -} + if (return_stdout) { + console.log('Finished and returning stdout'); + return stdout; + } else { + console.log('Finished and returning true'); + return true; + } + }); + } + console.log('Result:', result); + return result; +}; // Run raw command sync // Updated 2022-05-07 -exports.run_cmd_sync = function ({cmd=null, return_stdout=null, return_stdin=null}) { - console.log('*** Electron framework export: run_cmd() ***'); +exports.run_cmd_sync = function ({ cmd = null, return_stdout = null, return_stdin = null }) { + console.log('*** Electron framework export: run_cmd() ***'); - console.log(`Command String: ${cmd}`); + console.log(`Command String: ${cmd}`); - let stdout; + let stdout; - try { - stdout = child_process.execSync(cmd, {encoding: 'utf8'}); - console.log('Std Out:', stdout); - } catch (err) { - console.error('Error:', err); - return false; - } + try { + stdout = child_process.execSync(cmd, { encoding: 'utf8' }); + console.log('Std Out:', stdout); + } catch (err) { + console.error('Error:', err); + return false; + } - if (return_stdout) { - console.log('Finished and returning stdout'); - return stdout; - } else { - console.log('Finished and returning true'); - return true; - } + if (return_stdout) { + console.log('Finished and returning stdout'); + return stdout; + } else { + console.log('Finished and returning true'); + return true; + } - // let result; - // let stdout; - // let stderr; - // try { - // let { stdout, stderr } = child_process.execSync(cmd, (err, stdout, stdin) => { - // // if (err) throw err; - // if (err) { - // console.log('Error:', err); - // return false; - // }; + // let result; + // let stdout; + // let stderr; + // try { + // let { stdout, stderr } = child_process.execSync(cmd, (err, stdout, stdin) => { + // // if (err) throw err; + // if (err) { + // console.log('Error:', err); + // return false; + // }; - // console.log('stdout:', stdout); - // // console.log('stdin:', stdin); + // console.log('stdout:', stdout); + // // console.log('stdin:', stdin); - // if (return_stdout) { - // console.log('Finished and returning stdout'); - // return stdout; - // } else { - // console.log('Finished and returning true'); - // return true; - // } - // }); - // } catch (err) { - // console.error(err); - // return false; - // } - - // console.log('Result:', result); - // return result; -} + // if (return_stdout) { + // console.log('Finished and returning stdout'); + // return stdout; + // } else { + // console.log('Finished and returning true'); + // return true; + // } + // }); + // } catch (err) { + // console.error(err); + // return false; + // } + // console.log('Result:', result); + // return result; +}; // Run raw command // Updated 2022-05-25 exports.get_device_info = async function () { - console.log('*** Electron framework export: get_device_info() ***'); + console.log('*** Electron framework export: get_device_info() ***'); - // https://nodejs.org/api/os.html - - let data = {}; - data['arch'] = os.arch(); - data['hostname'] = os.hostname(); - data['cpus'] = os.cpus(); - data['freemem'] = os.freemem(); - data['totalmem'] = os.totalmem(); - data['loadavg'] = os.loadavg(); - data['networkInterfaces'] = os.networkInterfaces(); - data['platform'] = os.platform(); - data['release'] = os.release(); - data['uptime'] = os.uptime(); - data['version'] = os.version(); - - console.log(data); - return data; -} + // https://nodejs.org/api/os.html + let data = {}; + data['arch'] = os.arch(); + data['hostname'] = os.hostname(); + data['cpus'] = os.cpus(); + data['freemem'] = os.freemem(); + data['totalmem'] = os.totalmem(); + data['loadavg'] = os.loadavg(); + data['networkInterfaces'] = os.networkInterfaces(); + data['platform'] = os.platform(); + data['release'] = os.release(); + data['uptime'] = os.uptime(); + data['version'] = os.version(); + console.log(data); + return data; +}; // For loading JS file -function loadJS(){ +function loadJS() { + // Gives -1 when the given input is not in the string + // i.e this file has not been added - // Gives -1 when the given input is not in the string - // i.e this file has not been added + if (filesAdded.indexOf('script.js') !== -1) return; - if(filesAdded.indexOf('script.js') !== -1) - return + // Head tag + var head = document.getElementsByTagName('head')[0]; - // Head tag - var head = document.getElementsByTagName('head')[0] + // Creating script element + var script = document.createElement('script'); + script.src = 'script.js'; + script.type = 'text/javascript'; - // Creating script element - var script = document.createElement('script') - script.src = 'script.js' - script.type = 'text/javascript' + // Adding script element + head.append(script); - // Adding script element - head.append(script) - - // Adding the name of the file to keep record - filesAdded += ' script.js' + // Adding the name of the file to keep record + filesAdded += ' script.js'; } // To load CSS file function loadCSS() { + if (filesAdded.indexOf('styles.css') !== -1) return; - if(filesAdded.indexOf('styles.css') !== -1) - return + var head = document.getElementsByTagName('head')[0]; - var head = document.getElementsByTagName('head')[0] + // Creating link element + var style = document.createElement('link'); + style.href = 'styles.css'; + style.type = 'text/css'; + style.rel = 'stylesheet'; + head.append(style); - // Creating link element - var style = document.createElement('link') - style.href = 'styles.css' - style.type = 'text/css' - style.rel = 'stylesheet' - head.append(style); - - // Adding the name of the file to keep record - filesAdded += ' styles.css' + // Adding the name of the file to keep record + filesAdded += ' styles.css'; } +exports.check_and_get_updated_native_app_config = function ({ + file_path = 'device_configs/ae_native_app_config.default.json', + overwrite = false +}) { + console.log('*** Aether App Native export: check_and_get_updated_native_app_config() ***'); + if (os.platform == 'darwin') { + let default_osit_sync_app_config_path = path.join(default_osit_sync_app_root_path, file_path); -exports.check_and_get_updated_native_app_config = function ({file_path='device_configs/ae_native_app_config.default.json', overwrite=false}) { - console.log('*** Aether App Native export: check_and_get_updated_native_app_config() ***'); + let default_app_config_path = path.join(app_root_path, 'ae_native_app_config.default.json'); + console.log('macOS app root and config directory: ' + default_app_config_path); - if (os.platform == 'darwin') { - let default_osit_sync_app_config_path = path.join(default_osit_sync_app_root_path, file_path); + fs.copyFileSync(default_osit_sync_app_config_path, default_app_config_path); - let default_app_config_path = path.join(app_root_path, 'ae_native_app_config.default.json'); - console.log('macOS app root and config directory: '+default_app_config_path); + if (overwrite) { + console.log('Overwriting the current active config file...'); + let active_app_config_path = path.join(app_root_path, 'ae_native_app_config.json'); + console.log('macOS app root and config directory: ' + active_app_config_path); - fs.copyFileSync(default_osit_sync_app_config_path, default_app_config_path); + fs.copyFileSync(default_osit_sync_app_config_path, active_app_config_path); + } + } else if (os.platform == 'linux') { + app_root_path = path.join(home_directory, '.config/OSIT'); + console.log('Linux config directory: ' + app_root_path); + return false; + } else { + console.log('Unknown OS... Is this Windows?'); + return false; + } - if (overwrite) { - console.log('Overwriting the current active config file...'); - let active_app_config_path = path.join(app_root_path, 'ae_native_app_config.json'); - console.log('macOS app root and config directory: '+active_app_config_path); - - fs.copyFileSync(default_osit_sync_app_config_path, active_app_config_path); - } - } else if (os.platform == 'linux') { - app_root_path = path.join(home_directory, '.config/OSIT'); - console.log('Linux config directory: '+app_root_path); - return false; - } else { - console.log('Unknown OS... Is this Windows?'); - return false; - } - - return true; -} + return true; +}; diff --git a/src/lib/electron/electron_relay.js b/src/lib/electron/electron_relay.js index fbdfc863..21e869aa 100644 --- a/src/lib/electron/electron_relay.js +++ b/src/lib/electron/electron_relay.js @@ -8,7 +8,6 @@ // const path = require('path'); // const { ipcRenderer } = require('electron'); - // function sleep(milliseconds) { // const date = Date.now(); // let currentDate = null; @@ -59,105 +58,113 @@ // } // } - // Updated 2022-05-07 -export let kill_processes = async function kill_processes({process_name_li=[]}) { - console.log('*** kill_processes() ***'); - console.log(`Process Name List: ${process_name_li}`); +export let kill_processes = async function kill_processes({ process_name_li = [] }) { + console.log('*** kill_processes() ***'); + console.log(`Process Name List: ${process_name_li}`); - let fail_flag = null; - if (process_name_li) { - for (let i = 0; i < process_name_li.length; i++) { - // separate the keys and the values - let process_name = process_name_li[i]; - let signal = null; + let fail_flag = null; + if (process_name_li) { + for (let i = 0; i < process_name_li.length; i++) { + // separate the keys and the values + let process_name = process_name_li[i]; + let signal = null; - if (process_name == 'osit_aperture_wrapper') { - signal = 'INT'; // INT (interrupt) correctly stops the wrapper - } + if (process_name == 'osit_aperture_wrapper') { + signal = 'INT'; // INT (interrupt) correctly stops the wrapper + } - let kill_processes_result = await native_app.kill_processes({process_name: process_name, signal: signal}); - console.log(kill_processes_result); - if (kill_processes_result) { - console.log('Killed process.'); - // return kill_processes_result; - } else { - console.log('Did not kill process. Something went wrong.'); - fail_flag = true; - // return false; - } - } - } + let kill_processes_result = await native_app.kill_processes({ + process_name: process_name, + signal: signal + }); + console.log(kill_processes_result); + if (kill_processes_result) { + console.log('Killed process.'); + // return kill_processes_result; + } else { + console.log('Did not kill process. Something went wrong.'); + fail_flag = true; + // return false; + } + } + } - return fail_flag; - - // let kill_processes_result = await native_app.kill_processes({process_name: process_name}); - // console.log(kill_processes_result); - // if (kill_processes_result) { - // console.log('Killed process.'); - // return kill_processes_result; - // } else { - // console.log('Did not kill process. Something went wrong.'); - // return false; - // } -} + return fail_flag; + // let kill_processes_result = await native_app.kill_processes({process_name: process_name}); + // console.log(kill_processes_result); + // if (kill_processes_result) { + // console.log('Killed process.'); + // return kill_processes_result; + // } else { + // console.log('Did not kill process. Something went wrong.'); + // return false; + // } +}; // Updated 2022-05-06 -export let open_local_file = async function open_local_file({file_path, filename}) { - console.log('*** open_local_file() ***'); - console.log(`File Path: ${file_path}; Filename: ${filename}`); +export let open_local_file = async function open_local_file({ file_path, filename }) { + console.log('*** open_local_file() ***'); + console.log(`File Path: ${file_path}; Filename: ${filename}`); - console.log('Process: Check local hash file cache, Download hash file to cache, and Open cached hash file after copying to temp directory'); + console.log( + 'Process: Check local hash file cache, Download hash file to cache, and Open cached hash file after copying to temp directory' + ); - // let check_local_file_result = await native_app.check_local_file({local_file_path: file_path, filename: filename}); - // console.log(check_local_file_result); - // if (check_local_file_result) { - // console.log('Local file found.'); - // } else { - // console.log('Local file not found. Will not attempt to open.'); - // return false; - // } - - // console.log('Local file file found and ready to be opened.'); - let open_local_file_result = await native_app.open_local_file({local_file_path: file_path, filename: filename}); - console.log(open_local_file_result); - if (open_local_file_result) { - console.log('Local file was opened.'); - return open_local_file_result; - } else { - console.log('Local file was not opened. Something went wrong.'); - return false; - } -} + // let check_local_file_result = await native_app.check_local_file({local_file_path: file_path, filename: filename}); + // console.log(check_local_file_result); + // if (check_local_file_result) { + // console.log('Local file found.'); + // } else { + // console.log('Local file not found. Will not attempt to open.'); + // return false; + // } + // console.log('Local file file found and ready to be opened.'); + let open_local_file_result = await native_app.open_local_file({ + local_file_path: file_path, + filename: filename + }); + console.log(open_local_file_result); + if (open_local_file_result) { + console.log('Local file was opened.'); + return open_local_file_result; + } else { + console.log('Local file was not opened. Something went wrong.'); + return false; + } +}; // exports.open_local_file should no longer be needed with this. // Updated 2022-10-11 -export let open_local_file_v2 = async function open_local_file_v2({file_path, filename}) { - console.log('*** open_local_file_v2() ***'); - console.log(`Local File Path: ${file_path}; Filename: ${filename}`); +export let open_local_file_v2 = async function open_local_file_v2({ file_path, filename }) { + console.log('*** open_local_file_v2() ***'); + console.log(`Local File Path: ${file_path}; Filename: ${filename}`); - console.log('Process: Check local hash file cache, Download hash file to cache, and Open cached hash file after copying to temp directory'); + console.log( + 'Process: Check local hash file cache, Download hash file to cache, and Open cached hash file after copying to temp directory' + ); - let open_local_file_result = await ipcRenderer.invoke('open_local_file', file_path, filename).then((result) => { - console.log('IPC open local file finished'); - if (result) { - console.log('Local file was opened.'); - return result; - } else { - console.log('Local file was not opened. Something went wrong.'); - console.log(result); - return false; - } + let open_local_file_result = await ipcRenderer + .invoke('open_local_file', file_path, filename) + .then((result) => { + console.log('IPC open local file finished'); + if (result) { + console.log('Local file was opened.'); + return result; + } else { + console.log('Local file was not opened. Something went wrong.'); + console.log(result); + return false; + } - console.log(result); - return true; - }) - - return open_local_file_result; -} + console.log(result); + return true; + }); + return open_local_file_result; +}; // // Updated 2022-05-06 // export let open_hash_file_to_temp = async function open_hash_file_to_temp({local_file_cache_path, hash, host_file_temp_path, filename}) { @@ -227,92 +234,99 @@ export let open_local_file_v2 = async function open_local_file_v2({file_path, fi // return open_hash_file_to_temp_result; // } - // Updated 2022-05-07 -export let run_cmd = async function run_cmd({cmd=null, return_stdout=null}) { - console.log('*** run_cmd() ***'); +export let run_cmd = async function run_cmd({ cmd = null, return_stdout = null }) { + console.log('*** run_cmd() ***'); - let run_cmd_result = await native_app.run_cmd({cmd: cmd, return_stdout: return_stdout}) - .then(function (result) { - if (result) { - console.log('Command ran'); - } else { - console.log('Command did not run. Something went wrong.'); - return false; - } - if (return_stdout) { - return result; - } else { - return true; - } + let run_cmd_result = await native_app + .run_cmd({ cmd: cmd, return_stdout: return_stdout }) + .then(function (result) { + if (result) { + console.log('Command ran'); + } else { + console.log('Command did not run. Something went wrong.'); + return false; + } + if (return_stdout) { + return result; + } else { + return true; + } + }); - }); - - console.log('Run Command Result:', run_cmd_result); - - return run_cmd_result; -} + console.log('Run Command Result:', run_cmd_result); + return run_cmd_result; +}; // Updated 2022-10-27 -export let run_cmd_sync = function run_cmd_sync({cmd=null, return_stdout=null}) { - console.log('*** run_cmd_sync() ***'); +export let run_cmd_sync = function run_cmd_sync({ cmd = null, return_stdout = null }) { + console.log('*** run_cmd_sync() ***'); - let run_cmd_result = native_app.run_cmd_sync({cmd: cmd, return_stdout: return_stdout}); + let run_cmd_result = native_app.run_cmd_sync({ cmd: cmd, return_stdout: return_stdout }); - // if (run_cmd_result) { - // console.log('Command ran'); - // } else { - // console.log('Command did not run. Something went wrong.'); - // // return false; - // } + // if (run_cmd_result) { + // console.log('Command ran'); + // } else { + // console.log('Command did not run. Something went wrong.'); + // // return false; + // } - // if (return_stdout) { - // return run_cmd_result; - // } else { - // return true; - // } + // if (return_stdout) { + // return run_cmd_result; + // } else { + // return true; + // } - console.log('Run Command Result:', run_cmd_result); - - return run_cmd_result; -} + console.log('Run Command Result:', run_cmd_result); + return run_cmd_result; +}; // Updated 2022-05-07 -export let run_osascript = async function run_osascript({cmd=null, interactive=false, language=null, flags='h', program_file=null}) { - console.log('*** run_osascript() ***'); +export let run_osascript = async function run_osascript({ + cmd = null, + interactive = false, + language = null, + flags = 'h', + program_file = null +}) { + console.log('*** run_osascript() ***'); - let run_osascript_result = await native_app.run_osascript({cmd: cmd, interactive: interactive, language: language, flags: flags, program_file: program_file}); + let run_osascript_result = await native_app.run_osascript({ + cmd: cmd, + interactive: interactive, + language: language, + flags: flags, + program_file: program_file + }); - console.log(run_osascript_result); - - if (run_osascript_result) { - console.log('Apple Script ran'); - } else { - console.log('Apple Script did not run. Something went wrong.'); - } - - return run_osascript_result; -} + console.log(run_osascript_result); + if (run_osascript_result) { + console.log('Apple Script ran'); + } else { + console.log('Apple Script did not run. Something went wrong.'); + } + return run_osascript_result; +}; // Updated 2022-05-07 -export let get_device_info = async function get_device_info({event_device_id}) { - console.log('*** get_device_info() ***'); +export let get_device_info = async function get_device_info({ event_device_id }) { + console.log('*** get_device_info() ***'); - console.log(event_device_id); + console.log(event_device_id); - let get_device_info_result = await native_app.get_device_info(); + let get_device_info_result = await native_app.get_device_info(); - console.log(get_device_info_result); + console.log(get_device_info_result); - if (get_device_info_result) { - console.log('Success'); - } else { - console.log('Failed? Something went wrong.'); - } + if (get_device_info_result) { + console.log('Success'); + } else { + console.log('Failed? Something went wrong.'); + } - return get_device_info_result; -} \ No newline at end of file + return get_device_info_result; +}; diff --git a/src/lib/element_qr_scanner_v2.svelte b/src/lib/element_qr_scanner_v2.svelte index b5dcdb08..6be54cc6 100644 --- a/src/lib/element_qr_scanner_v2.svelte +++ b/src/lib/element_qr_scanner_v2.svelte @@ -1,310 +1,306 @@ -
- - - - + + -
-
+
+
+ - + - - - - {#if (scanning_status == 'scanning')} - - {/if} + {#if scanning_status == 'scanning'} + + {/if} +
-
+
+ +
-
-
+ {#if show_qr_manual_text_entry_option} +
+ {#if show_qr_manual_entry} + + + - {#if show_qr_manual_text_entry_option} -
- {#if show_qr_manual_entry} - - - +
+ +
+ {:else} + + {/if} +
+ {/if} - -
- -
- - {:else} - - {/if} -
- {/if} - - {#if show_qr_manual_badge_id_entry_option} -
- {#if show_qr_manual_entry} -
handle_qr_manual_entry} class="flex"> - - - + - + + + {:else} + + {/if} +
+ {/if} - - {:else} - - {/if} - - {/if} + {#if show_qr_scan_result && qr_scan_result} +
+ Raw Result: + {qr_scan_result} +
+ {/if} - {#if show_qr_scan_result && qr_scan_result} -
- Raw Result: - {qr_scan_result} -
- {/if} - - - - -

v2 - Try pressing the "Allow Camera Access" button and then the "Start Scanning" button if it does not start on its own. This fix is not perfect. A permanent solution is actively being worked on in the development version.

+ +

+ v2 - Try pressing the "Allow Camera Access" button and then the "Start Scanning" button if it + does not start on its own. This fix is not perfect. A permanent solution is actively being + worked on in the development version. +

- diff --git a/src/lib/elements/element_ae_crud.svelte b/src/lib/elements/element_ae_crud.svelte index e79aefd4..9a8d8ffb 100644 --- a/src/lib/elements/element_ae_crud.svelte +++ b/src/lib/elements/element_ae_crud.svelte @@ -1,476 +1,447 @@ +
+ + -
- - + + - - +
+ + -
- - + + - - + + {#if field_type == 'template'} + + {:else if field_type == 'button'} + + {field_value} + {:else if field_type == 'select'} + + {:else if field_type == 'text'} + + {:else if field_type == 'textarea'} + + {:else} + + {/if} + {#if allow_null} + + {/if} + - - {#if field_type == 'template'} - - {:else if field_type == 'button'} - - {field_value} - {:else if field_type == 'select'} - + - {:else if field_type == 'text'} - - {:else if field_type == 'textarea'} - - {:else} - - {/if} - {#if allow_null} - - {/if} - - - - -
- {#await ae_promises.api_update__ae_obj} - - Processing... - {:then} - {#if patch_result} - - {patch_result} - {:else} - - {/if} - {/await} -
-
+
+ {#await ae_promises.api_update__ae_obj} + + Processing... + {:then} + {#if patch_result} + + {patch_result} + {:else} + + {/if} + {/await} +
+
- diff --git a/src/lib/elements/element_ae_crud_v2.svelte b/src/lib/elements/element_ae_crud_v2.svelte index 7c06ad4d..13270657 100644 --- a/src/lib/elements/element_ae_crud_v2.svelte +++ b/src/lib/elements/element_ae_crud_v2.svelte @@ -1,259 +1,258 @@ -
+ class:hidden={hide_element} + class:block={display_block} + class:inline-block={!display_block} + class:outline_element +> + {@render children?.()} - {@render children?.()} - - - + > + - - + ondblclick={() => { + // hide_edit_btn = true; + // hide_edit_form = false; + show_edit_form = true; + }} + title="Double click to edit property" + > + + + + - -
- - + > + + - - + + - - New value: {new_field_value} - + + New value: {new_field_value} + - - {#if field_type == 'template'} - - {:else if field_type == 'button'} - - {new_field_value} - {:else if field_type == 'select'} - - {#if select_option_kv && Object.keys(select_option_kv).length == 0} - - {:else if select_option_kv && Object.keys(select_option_kv).length > 0} - {#each Object.keys(select_option_kv) as option} - - {/each} - {:else} - - {/if} - + > + {#if select_option_kv && Object.keys(select_option_kv).length == 0} + + {:else if select_option_kv && Object.keys(select_option_kv).length > 0} + {#each Object.keys(select_option_kv) as option} + + {/each} + {:else} + + {/if} + + {:else if field_type == 'text'} + + {:else if field_type == 'textarea'} + + {:else} + + {/if} + {#if allow_null} + + {/if} + - {:else if field_type == 'text'} - - {:else if field_type == 'textarea'} - - {:else} - - {/if} - {#if allow_null} - - {/if} - - - - -
- {#await ae_promises.api_update__ae_obj} - - Processing... - {:then} - {#if patch_status} - - {patch_status} - {:else} - - {/if} - {/await} -
-
+ disabled={new_field_value === current_field_value} + onclick={async () => { + handle_obj_field_patch(new_field_value); + }} + title="Save new field value" + > + {#if new_field_value === current_field_value} + {#if btn_label} + {@html btn_label} + {:else} + + Save + {/if} + + {:else if btn_label} + {@html btn_label} + {:else} + + Save + {/if} + +
+ {#await ae_promises.api_update__ae_obj} + + Processing... + {:then} + {#if patch_status} + + {patch_status} + {:else} + + {/if} + {/await} +
+
- diff --git a/src/lib/elements/element_data_store.svelte b/src/lib/elements/element_data_store.svelte index bf98172e..40478c3a 100644 --- a/src/lib/elements/element_data_store.svelte +++ b/src/lib/elements/element_data_store.svelte @@ -1,485 +1,487 @@ - -
-{#if ae_ds_tmp} - - -{#if debug || $ae_loc.debug == 'debug'} - -
+
+ {#if ae_ds_tmp} + {#if debug || $ae_loc.debug == 'debug'} +
     id: {ae_ds_tmp.id},
     code: {ae_ds_tmp.code},
     type: {ae_ds_tmp.type},
@@ -495,311 +497,297 @@ async function handle_update__data_store({
     text: {ae_ds_tmp.text},
     updated_on: {ae_ds_tmp.updated_on},
     
-{/if} + {/if} -{#if show_edit} -
-
+ {#if show_edit} +
+ + - + {#if $ae_loc.trusted_access} + + {/if} + {#if $ae_loc.manager_access} + - {#if $ae_loc.trusted_access} - - {/if} - {#if $ae_loc.manager_access} - + + {/if} + {#if $ae_loc.trusted_access} + + {/if} + {#if $ae_loc.manager_access} + + + + + + + {:else} + Code: {ae_ds_tmp.code} + + Type: {ae_ds_tmp.type} + {/if} - - {/if} - {#if $ae_loc.trusted_access} - - {/if} - {#if $ae_loc.manager_access} - - - - - - - {:else} - Code: {ae_ds_tmp.code} - - Type: {ae_ds_tmp.type} - {/if} + + {#if ae_ds_tmp.type == 'html' || ae_ds_tmp.type == null} + + + {:else if ae_ds_tmp.type == 'sql'} + - - {#if ae_ds_tmp.type == 'html' || ae_ds_tmp.type == null} - - - {:else if ae_ds_tmp.type == 'sql'} - + + {:else if ae_ds_tmp.type == 'text'} + + {/if} +
+ - - {:else if ae_ds_tmp.type == 'text'} - - {/if} -
+ - + - + {#await ds_submit_results} + + {:then ds_submit_results} + {#if ds_submit_results} +
+ + Saved +
+ {/if} + {/await} - +
+ submit: {$ae_sess.ds.submit_status} + create: {$ae_sess.ds.create_status} + update: {$ae_sess.ds.update_status} +
+
+ +
+ {/if} - {#await ds_submit_results} - - {:then ds_submit_results} - {#if ds_submit_results} -
- - - Saved - -
- {/if} - {/await} + -
- submit: {$ae_sess.ds.submit_status} - create: {$ae_sess.ds.create_status} - update: {$ae_sess.ds.update_status} -
+ {#if !ae_ds_tmp.type && !ae_ds_tmp.html && !ae_ds_tmp.json && !ae_ds_tmp.md && !ae_ds_tmp.text} + {#if $ae_loc.manager_access} + No data found! Is the data store correct or new? + {:else} + + {/if} + {/if} -
+ {#if ae_ds_tmp.type == 'html' && ae_ds_tmp.html} + {@html ae_ds_tmp.html} + {:else if ae_ds_tmp.type == 'html'} + {#if $ae_loc.manager_access} + No HTML found! Is the data store type correct? + {:else} + + {/if} + {/if} - - -{/if} + {#if ae_ds_tmp.type == 'text' && ae_ds_tmp.text} + {ae_ds_tmp.text} + {:else if ae_ds_tmp.type == 'text'} + {#if $ae_loc.manager_access} + No text found! Is the data store type correct? + {:else} + + {/if} + {/if} - + -{#if !ae_ds_tmp.type && !ae_ds_tmp.html && !ae_ds_tmp.json && !ae_ds_tmp.md && !ae_ds_tmp.text} - {#if $ae_loc.manager_access} - No data found! Is the data store correct or new? - {:else} - - {/if} -{/if} + + {:else} + + {/if} -{#if ae_ds_tmp.type == 'html' && ae_ds_tmp.html} - {@html ae_ds_tmp.html} -{:else if ae_ds_tmp.type == 'html'} - {#if $ae_loc.manager_access} - No HTML found! Is the data store type correct? - {:else} - - {/if} -{/if} - -{#if ae_ds_tmp.type == 'text' && ae_ds_tmp.text} - {ae_ds_tmp.text} -{:else if ae_ds_tmp.type == 'text'} - {#if $ae_loc.manager_access} - No text found! Is the data store type correct? - {:else} - - {/if} -{/if} - - - - -{:else} - -{/if} - - - -{#await ds_get_results} - -{/await} - - + {#await ds_get_results} + + {/await} +
- diff --git a/src/lib/elements/element_data_store_v2.svelte b/src/lib/elements/element_data_store_v2.svelte index 27240e1f..2aa97c83 100644 --- a/src/lib/elements/element_data_store_v2.svelte +++ b/src/lib/elements/element_data_store_v2.svelte @@ -1,499 +1,505 @@ - -
-{#if ae_ds_tmp} - - -{#if debug || $ae_loc.debug == 'debug'} - -
+
+ {#if ae_ds_tmp} + {#if debug || $ae_loc.debug == 'debug'} +
     id: {ae_ds_tmp.id},
     code: {ae_ds_tmp.code},
     type: {ae_ds_tmp.type},
@@ -509,188 +515,180 @@ async function handle_update__data_store(
     text: {ae_ds_tmp.text},
     updated_on: {ae_ds_tmp.updated_on},
     
+ {/if} -{/if} + + - - - - - +
+ - > +
+ {#if $ae_loc.trusted_access} + + {/if} + {#if $ae_loc.manager_access} + - + + {/if} +
- +
+ {#if $ae_loc.trusted_access} + + {/if} +
-
- {#if $ae_loc.trusted_access} - - {/if} - {#if $ae_loc.manager_access} - +
+ {#if $ae_loc.manager_access} + + + + + + + {:else} + Code: {ae_ds_tmp.code} + + Type: {ae_ds_tmp.type} + {/if} +
- - {/if} -
+
+ + {#if ae_ds_tmp.type == 'html' || ae_ds_tmp.type == null} + + + {:else if ae_ds_tmp.type == 'sql'} + -
- {#if $ae_loc.trusted_access} - - {/if} -
+ + {:else if ae_ds_tmp.type == 'text'} + + {/if} +
-
- {#if $ae_loc.manager_access} - - - - - - - {:else} - Code: {ae_ds_tmp.code} - - Type: {ae_ds_tmp.type} - {/if} -
+
+ -
- - {#if ae_ds_tmp.type == 'html' || ae_ds_tmp.type == null} - - - {:else if ae_ds_tmp.type == 'sql'} - - - - {:else if ae_ds_tmp.type == 'text'} - - {/if} -
- -
- - - - - + - {#await ds_submit_results} - - {:then ds_submit_results} - {#if ds_submit_results} -
- - - Saved - -
- {/if} - {/await} + {#await ds_submit_results} + + {:then ds_submit_results} + {#if ds_submit_results} +
+ + Saved +
+ {/if} + {/await} -
- submit: {$ae_sess.ds.submit_status} - create: {$ae_sess.ds.create_status} - update: {$ae_sess.ds.update_status} -
+
+ submit: {$ae_sess.ds.submit_status} + create: {$ae_sess.ds.create_status} + update: {$ae_sess.ds.update_status} +
+
+ -
+ +
+ +
+
+
- + + - -
- -
-
+ - + {#if !ae_ds_tmp.type && !ae_ds_tmp.html && !ae_ds_tmp.json && !ae_ds_tmp.md && !ae_ds_tmp.text} + {#if $ae_loc.manager_access} + No data found! Is the data store correct or new? + {:else} + + {/if} + {/if} - - + {#if ae_ds_tmp.type == 'html' && ae_ds_tmp.html} + {@html ae_ds_tmp.html} + {:else if ae_ds_tmp.type == 'html'} + {#if $ae_loc.manager_access} + No HTML found! Is the data store type correct? + {:else} + + {/if} + {/if} - + {#if ae_ds_tmp.type == 'text' && ae_ds_tmp.text} + {ae_ds_tmp.text} + {:else if ae_ds_tmp.type == 'text'} + {#if $ae_loc.manager_access} + No text found! Is the data store type correct? + {:else} + + {/if} + {/if} -{#if !ae_ds_tmp.type && !ae_ds_tmp.html && !ae_ds_tmp.json && !ae_ds_tmp.md && !ae_ds_tmp.text} - {#if $ae_loc.manager_access} - No data found! Is the data store correct or new? - {:else} - - {/if} -{/if} + -{#if ae_ds_tmp.type == 'html' && ae_ds_tmp.html} - {@html ae_ds_tmp.html} -{:else if ae_ds_tmp.type == 'html'} - {#if $ae_loc.manager_access} - No HTML found! Is the data store type correct? - {:else} - - {/if} -{/if} + + {:else} + + {/if} -{#if ae_ds_tmp.type == 'text' && ae_ds_tmp.text} - {ae_ds_tmp.text} -{:else if ae_ds_tmp.type == 'text'} - {#if $ae_loc.manager_access} - No text found! Is the data store type correct? - {:else} - - {/if} -{/if} - - - - -{:else} - -{/if} - - - -{#await ds_get_results} - -{/await} - - + {#await ds_get_results} + + {/await} +
- diff --git a/src/lib/elements/element_input_file.svelte b/src/lib/elements/element_input_file.svelte index a9113af2..c2315279 100644 --- a/src/lib/elements/element_input_file.svelte +++ b/src/lib/elements/element_input_file.svelte @@ -1,414 +1,426 @@ +
+ -
- + - + {#if file_list_status == 'processing'} +
+ Processing selected file list... +
+ {/if} - {#if file_list_status == 'processing'} -
- Processing selected file list... -
- {/if} - - - - {#if use_selected_file_table && input_file_list_processed && input_file_list_processed.length} - Files selected for upload -
- - - - - - - - - - - - {#each input_file_list_processed as file_list_item, file_index} - - - - - - + + + + + + {/each} +
RemoveFilenameModifiedSizeExtHash
- - {file_list_item.filename}{file_list_item.modified_datetime_string} - {file_list_item.file_size_string} - + + {#if use_selected_file_table && input_file_list_processed && input_file_list_processed.length} + Files selected for upload + + + + + + + + + + + + + {#each input_file_list_processed as file_list_item, file_index} + + + + + + - - - - - - {/each} - -
RemoveFilenameModifiedSizeExtHash
+ + {file_list_item.filename}{file_list_item.modified_datetime_string} + {file_list_item.file_size_string} + - - {file_list_item.guessed_extension} - - {ae_util.shorten_string({string: file_list_item.hash_sha256, begin_length: 5, end_length: 4, wildcard_length: 2})} -
- {/if} - +
+ {file_list_item.guessed_extension} + + {ae_util.shorten_string({ + string: file_list_item.hash_sha256, + begin_length: 5, + end_length: 4, + wildcard_length: 2 + })} +
+ {/if}
- diff --git a/src/lib/elements/element_input_files_tbl.svelte b/src/lib/elements/element_input_files_tbl.svelte index bfe75d51..c91399e0 100644 --- a/src/lib/elements/element_input_files_tbl.svelte +++ b/src/lib/elements/element_input_files_tbl.svelte @@ -1,389 +1,406 @@ +
+ {#if file_list_status == 'processing'} +
+ Processing selected file list... +
+ {/if} -
- - - {#if file_list_status == 'processing'} -
- Processing selected file list... -
- {/if} - - - - {#if use_selected_file_table && processed_file_list && processed_file_list.length} - Files selected for upload - - - - - - - - - - - - - {#each processed_file_list as file_list_item, file_index} - - - - - - - - - - - - {/each} - -
RemoveFilenameModifiedSizeExtHash
- - - {file_list_item.filename} - {file_list_item.modified_datetime_string} - {file_list_item.file_size_string} - {#if $ae_sess.api_upload_kv[file_list_item.hash_sha256]} - ({$ae_sess.api_upload_kv[file_list_item.hash_sha256].percent_completed}%) - {/if} - - {file_list_item.guessed_extension} - - {ae_util.shorten_string({string: file_list_item.hash_sha256, begin_length: 5, end_length: 4, wildcard_length: 2})} -
- {/if} - + + + {#if use_selected_file_table && processed_file_list && processed_file_list.length} + Files selected for upload + + + + + + + + + + + + + {#each processed_file_list as file_list_item, file_index} + + + + + + + + + + + + {/each} +
RemoveFilenameModifiedSizeExtHash
+ + + {file_list_item.filename} + {file_list_item.modified_datetime_string} + {file_list_item.file_size_string} + {#if $ae_sess.api_upload_kv[file_list_item.hash_sha256]} + ({$ae_sess.api_upload_kv[file_list_item.hash_sha256].percent_completed}%) + {/if} + + {file_list_item.guessed_extension} + + {ae_util.shorten_string({ + string: file_list_item.hash_sha256, + begin_length: 5, + end_length: 4, + wildcard_length: 2 + })} +
+ {/if}
- diff --git a/src/lib/elements/element_input_v2.svelte b/src/lib/elements/element_input_v2.svelte index cbdaea00..1d14bd45 100644 --- a/src/lib/elements/element_input_v2.svelte +++ b/src/lib/elements/element_input_v2.svelte @@ -1,328 +1,329 @@
+ {#if type === 'email' || type === 'date' || type === 'number' || type === 'tel' || type === 'text' || type === 'time' || type === 'url'} + {#if content_layout == 'label_start' && label} + + {/if} -{#if type === 'email' || type === 'date' || type === 'number' || type === 'tel' || type === 'text' || type === 'time' || type === 'url' } - {#if (content_layout == 'label_start' && label)} - - {/if} + - + {#if content_layout != 'label_start' && label} + + {/if} - {#if (content_layout != 'label_start' && label)} - - {/if} + {description} + {:else if type === 'date_time'} + {#if content_layout == 'label_start' && label} + {label} + + {/if} - {description} +
+ {#if label_begin} + + {/if} -{:else if type === 'date_time' } - {#if (content_layout == 'label_start' && label)} - {label} - - {/if} + -
- {#if label_begin} - - {/if} + {#if !label_begin} + + {/if} +
- +
+ {#if label_begin} + + {/if} - {#if !label_begin} - - {/if} -
+ -
- {#if label_begin} - - {/if} + {#if !label_begin} + + {/if} +
- + {#if content_layout != 'label_start' && label} + {label} + + {/if} - {#if !label_begin} - - {/if} -
+ {description} + {:else if type === 'checkbox'} + {#if checkbox_none} + {#if !value} + {(checked = 'checked')} + {/if} + + {/if} + {#if checkbox_li.length} + {#if content_layout == 'label_start' && label} + {label} + {/if} + {#each Object.entries(checkbox_li) as [li_key, li_value]} + {#if li_key.toString() === value.toString()} + + {:else} + + {/if} + {/each} - {#if (content_layout != 'label_start' && label)} - {label} - - {/if} + {#if content_layout != 'label_start' && label} + {label} + {/if} + {:else} + {#if label_begin} + + {/if} - {description} + + {/if} -{:else if type === 'checkbox' } - {#if checkbox_none} - {#if !value} - {checked='checked'} - {/if} - - {/if} - {#if checkbox_li.length} - {#if (content_layout == 'label_start' && label)} - {label} - {/if} + {description} + {:else if type === 'radio'} + {#if radio_none} + {#if !value} + {(checked = 'checked')} + {/if} + + {/if} + {#if radio_li} + {#if content_layout == 'label_start' && label} + {label}: + {/if} - {#each Object.entries(checkbox_li) as [li_key, li_value]} - {#if li_key.toString() === value.toString() } - - {:else} - - {/if} - {/each} + + {#each Object.entries(radio_li) as [li_key, li_value]} + {#if value === null} + + + {:else if li_key.toString() === value.toString() || (li_key == 'true' && value == true) || (li_key == 'false' && value == false)} + + {:else} + + {/if} - {#if (content_layout != 'label_start' && label)} - {label} - {/if} - {:else} - {#if label_begin} - - {/if} - - - {/if} - - {description} - -{:else if type === 'radio' } - {#if radio_none} - {#if !value} - {checked='checked'} - {/if} - - {/if} - {#if radio_li} - {#if (content_layout == 'label_start' && label)} - {label}: - {/if} - - - {#each Object.entries(radio_li) as [li_key, li_value]} - {#if value === null} - - {:else if ( li_key.toString() === value.toString() || (li_key == 'true' && value == true) || (li_key == 'false' && value == false) ) } - - {:else} - - {/if} - - - {/each} - + {/each} + - {#if !label_begin} - {label}: - {/if} - {:else} - {#if label_begin} - - {/if} + {#if !label_begin} + {label}: + {/if} + {:else} + {#if label_begin} + + {/if} - + - {#if !label_begin} - - {/if} - {/if} + {#if !label_begin} + + {/if} + {/if} - {description} + {description} + {:else if type === 'textarea'} + {#if label_begin} + + {/if} -{:else if type === 'textarea'} - {#if label_begin} - - {/if} + {#if value_new_line}
{/if} + + - {#if value_new_line}
{/if} - - + {#if !label_begin} + + {/if} - {#if !label_begin} - - {/if} + {description} + {:else if type === 'hidden'} + + {:else if type === 'select'} + {#if label_begin} + + {/if} - {description} + -{:else if type === 'hidden'} - + {#if !label_begin} + + {/if} -{:else if type === 'select'} - {#if label_begin} - - {/if} - - - - {#if !label_begin} - - {/if} - - {description} -{/if} - - - + {description} + {/if} +
- \ No newline at end of file + .container_inline { + display: inline; + } + diff --git a/src/lib/elements/element_manage_event_file_li.svelte b/src/lib/elements/element_manage_event_file_li.svelte index 3986df71..7b36714f 100644 --- a/src/lib/elements/element_manage_event_file_li.svelte +++ b/src/lib/elements/element_manage_event_file_li.svelte @@ -1,593 +1,591 @@ +
+ - // ae_tmp.show__file_li = false; - // console.log(`$lq__event_file_obj_li:`, $lq__event_file_obj_li); - // $slct_trigger = 'load__event_file_obj_li'; - // ae_tmp.show__file_li = true; - }} - class="btn btn-sm p-1 m-1 preset-tonal-tertiary hover:preset-tonal-warning border border-warning-500 transition hover:transition-all *:hover:inline" - class:hidden={!$ae_loc.edit_mode || !$ae_loc.authenticated_access} - title="Refresh the list of files" - > - - - - - +
+
+

+ Manage Files: + + + {@html $lq__event_file_obj_li ? `${$lq__event_file_obj_li.length}×` : '-- none --'} + +

-
+ {#if $lq__event_file_obj_li && $lq__event_file_obj_li.length} +
+ + {#if display_mode === 'default'} + + + + {#if display_mode === 'default'} + + {/if} + {#if display_mode === 'default'} + + {/if} + + + + {/if} + + {#each $lq__event_file_obj_li as event_file_obj} + + + + {/each} + +
Download FileOptionsStatusMeta
+ {#if $events_sess.pres_mgmt?.show_field_edit__filename != event_file_obj.event_file_id_random} +
+
+ {:else} +

+ No files uploaded to display +

+ {/if}
- \ No newline at end of file + diff --git a/src/lib/elements/element_manage_event_file_li_all.svelte b/src/lib/elements/element_manage_event_file_li_all.svelte index f16ef4fa..f83db0e6 100644 --- a/src/lib/elements/element_manage_event_file_li_all.svelte +++ b/src/lib/elements/element_manage_event_file_li_all.svelte @@ -1,71 +1,70 @@ - + {link_to_type} + {link_to_id} + {lq__event_file_obj_li} + {allow_basic} + {allow_moderator} + {container_class_li} + {display_mode} +/> diff --git a/src/lib/elements/element_manage_event_file_li_direct.svelte b/src/lib/elements/element_manage_event_file_li_direct.svelte index 3d0ff5a8..95cab3b3 100644 --- a/src/lib/elements/element_manage_event_file_li_direct.svelte +++ b/src/lib/elements/element_manage_event_file_li_direct.svelte @@ -1,82 +1,80 @@ - {#await lq__event_file_obj_li} - -

Loading...

- +

Loading...

{:then lq__event_file_obj_li} - + {:catch error} -

{error.message}

+

{error.message}

{/await} diff --git a/src/lib/elements/element_manage_hosted_file_li.svelte b/src/lib/elements/element_manage_hosted_file_li.svelte index 6e88fd0c..f238fbea 100644 --- a/src/lib/elements/element_manage_hosted_file_li.svelte +++ b/src/lib/elements/element_manage_hosted_file_li.svelte @@ -1,269 +1,245 @@ +
+

+ Manage Files: + + + {@html $lq__hosted_file_obj_li ? `${$lq__hosted_file_obj_li.length}×` : '-- none --'} + +

-
+
+ - core_func.load_ae_obj_li__hosted_file({ - api_cfg: $ae_api, - for_obj_type: link_to_type, - for_obj_id: link_to_id, - enabled: 'enabled', - hidden: 'not_hidden', - limit: 250, - // params: params, - try_cache: true, - log_lvl: 2 - }); + +
- // ae_tmp.show__file_li = false; - // console.log(`$lq__hosted_file_obj_li:`, $lq__hosted_file_obj_li); - // $slct_trigger = 'load__hosted_file_obj_li'; - // ae_tmp.show__file_li = true; - }} - class="btn btn-sm p-1 m-1 preset-tonal-tertiary hover:preset-tonal-warning border border-warning-500 transition hover:transition-all *:hover:inline" - class:hidden={!$ae_loc.edit_mode || !$ae_loc.authenticated_access} - title="Refresh the list of files" - > - - - + {#if $lq__hosted_file_obj_li && $lq__hosted_file_obj_li.length} +
+
    + {#each [...$lq__hosted_file_obj_li].reverse().slice(0, max_file_count) as hosted_file_obj} +
  1. + -
+ delete slct_hosted_file_kv[hosted_file_obj.hosted_file_id]; + slct_hosted_file_id = null; + slct_hosted_file_obj = null; + } else { + $ae_loc.files.uploaded_file_kv[hosted_file_obj.hosted_file_id] = hosted_file_obj; + lq__hosted_file_obj_li[hosted_file_obj.hosted_file_id] = hosted_file_obj; + slct_hosted_file_kv[hosted_file_obj.hosted_file_id] = hosted_file_obj; + slct_hosted_file_id = hosted_file_obj.hosted_file_id; + slct_hosted_file_obj = hosted_file_obj; + } + log_lvl = 1; + if (log_lvl) { + console.log(`slct_hosted_file_kv:`, slct_hosted_file_kv); + } + }} + class="btn btn-sm preset-tonal-secondary hover:preset-filled-secondary-500" + title="Add/Remove file to/from the locally stored uploaded file list. This is referenced by other AE components." + > + {#if $ae_loc.files.uploaded_file_kv[hosted_file_obj.hosted_file_id]} + + + {:else} + + + {/if} + + -{#if $lq__hosted_file_obj_li && $lq__hosted_file_obj_li.length} -
+ + + + + {ae_util.iso_datetime_formatter(hosted_file_obj.created_on, 'datetime_medium_sec')} + {#if hosted_file_obj.updated_on} + + Updated on + {ae_util.iso_datetime_formatter(hosted_file_obj.updated_on, 'datetime_medium_sec')} + {/if} + -
    -{#each [...$lq__hosted_file_obj_li].reverse().slice(0, max_file_count) as hosted_file_obj} -
  1. - - - - - - - - - - {ae_util.iso_datetime_formatter(hosted_file_obj.created_on, 'datetime_medium_sec')} - {#if hosted_file_obj.updated_on} - - Updated on - {ae_util.iso_datetime_formatter(hosted_file_obj.updated_on, 'datetime_medium_sec')} - {/if} - - - - - {hosted_file_obj.filename} - - - - {ae_util.format_bytes(hosted_file_obj.size)} - - - - {hosted_file_obj.hash_sha256?.slice(0, 5)}... - - -
  2. -{/each} -
- -
- -{:else} - -

- No files available to display -

- -{/if} + + + {hosted_file_obj.filename} + + + + {ae_util.format_bytes(hosted_file_obj.size)} + + + {hosted_file_obj.hash_sha256?.slice(0, 5)}... + + + {/each} + +
+ {:else} +

+ No files available to display +

+ {/if} - \ No newline at end of file + diff --git a/src/lib/elements/element_manage_hosted_file_li_all.svelte b/src/lib/elements/element_manage_hosted_file_li_all.svelte index e8241386..d4796e75 100644 --- a/src/lib/elements/element_manage_hosted_file_li_all.svelte +++ b/src/lib/elements/element_manage_hosted_file_li_all.svelte @@ -1,128 +1,122 @@ - - - {#if lq__hosted_file_obj_li} - - - + + + {:else} -

No files found

+

No files found

{/if} diff --git a/src/lib/elements/element_obj_tbl_row.svelte b/src/lib/elements/element_obj_tbl_row.svelte index edc3ea5f..9c6f39b4 100644 --- a/src/lib/elements/element_obj_tbl_row.svelte +++ b/src/lib/elements/element_obj_tbl_row.svelte @@ -1,54 +1,49 @@ - -{#if obj != null && typeof obj == 'object'} -{#each Object.entries(obj) as [obj_prop_name, obj_prop_value]} - - - {#if obj_prop_name.endsWith('_id_random') || obj_prop_name == 'for_type' || obj_prop_name == 'for_id'} - {#if row_header} - primary_obj_li_type=obj_prop_name.replace('_id_random', '')}> - {ae_util.set_obj_prop_display_name({prop_name: obj_prop_name, obj_type: primary_obj_li_type})} - - {:else} - { - slct_obj_type=obj_prop_name.replace('_id_random', ''); - slct_obj_id=obj_prop_value; - }} - on:keypress={() => { - slct_obj_type=obj_prop_name.replace('_id_random', ''); - slct_obj_id=obj_prop_value; - }} - > - + {#if obj_prop_name.endsWith('_id_random') || obj_prop_name == 'for_type' || obj_prop_name == 'for_id'} + {#if row_header} + (primary_obj_li_type = obj_prop_name.replace('_id_random', ''))} + > + {ae_util.set_obj_prop_display_name({ + prop_name: obj_prop_name, + obj_type: primary_obj_li_type + })} + + {:else} + { + slct_obj_type = obj_prop_name.replace('_id_random', ''); + slct_obj_id = obj_prop_value; + }} + on:keypress={() => { + slct_obj_type = obj_prop_name.replace('_id_random', ''); + slct_obj_id = obj_prop_value; + }} + > + - - {#if obj_prop_value} - - {obj_prop_value.substring(0,25)} - - {:else} - - -- None -- - {/if} - - - {/if} - {:else if obj_prop_name.endsWith('[URL]')} - {#if row_header} - primary_obj_li_type=obj_prop_name.replaceAll('[URL]', '')}> - {ae_util.set_obj_prop_display_name({prop_name: obj_prop_name.replaceAll('[URL]', ''), obj_type: primary_obj_li_type})} - - {:else} - { - slct_obj_type=obj_prop_name.replaceAll('[URL]', ''); - slct_obj_id=obj_prop_value; - }} - on:keypress={() => { - slct_obj_type=obj_prop_name.replaceAll('[URL]', ''); - slct_obj_id=obj_prop_value; - }} - > - {obj_prop_value} - - {/if} - {:else} - {#if row_header} - - {ae_util.set_obj_prop_display_name({prop_name: obj_prop_name, obj_type: primary_obj_li_type})} - - {:else} - - {#if (obj_prop_value)} - {#if (obj_prop_value && obj_prop_value.length > 25)} - {obj_prop_value.substring(0,25)} ... - {:else} - {obj_prop_value} - {/if} - {:else} - -- None -- - {/if} - - {/if} - {/if} - -{/each} -{:else} - - - -- Not Set -- - -{/if} + {#if obj_prop_value} + + {obj_prop_value.substring(0, 25)} + + {:else} + + -- None -- + {/if} + + {/if} + {:else if obj_prop_name.endsWith('[URL]')} + {#if row_header} + (primary_obj_li_type = obj_prop_name.replaceAll('[URL]', ''))} + > + {ae_util.set_obj_prop_display_name({ + prop_name: obj_prop_name.replaceAll('[URL]', ''), + obj_type: primary_obj_li_type + })} + + {:else} + { + slct_obj_type = obj_prop_name.replaceAll('[URL]', ''); + slct_obj_id = obj_prop_value; + }} + on:keypress={() => { + slct_obj_type = obj_prop_name.replaceAll('[URL]', ''); + slct_obj_id = obj_prop_value; + }} + > + {obj_prop_value} + + {/if} + {:else if row_header} + + {ae_util.set_obj_prop_display_name({ + prop_name: obj_prop_name, + obj_type: primary_obj_li_type + })} + + {:else} + + {#if obj_prop_value} + {#if obj_prop_value && obj_prop_value.length > 25} + {obj_prop_value.substring(0, 25)} ... + {:else} + {obj_prop_value} + {/if} + {:else} + -- None -- + {/if} + + {/if} + + {/each} + {:else} + + -- Not Set -- + {/if} - \ No newline at end of file + diff --git a/src/lib/elements/element_sql_qry.svelte b/src/lib/elements/element_sql_qry.svelte index b8360fdc..4381ca6e 100644 --- a/src/lib/elements/element_sql_qry.svelte +++ b/src/lib/elements/element_sql_qry.svelte @@ -1,145 +1,146 @@ -
- {#if show_textarea} - - {/if} + {#if show_textarea} + + {/if} -
- -
+
+ +
- {#if show_record_count && sql_qry_result && sql_qry_result.length} -
- Record count: {sql_qry_result.length} -
- {/if} + {#if show_record_count && sql_qry_result && sql_qry_result.length} +
+ Record count: {sql_qry_result.length} +
+ {/if} -
- {#await ae_promises.sql_qry_promise} - Getting results... - {:then} - {#if sql_qry_result && sql_qry_result.length} - - - {#each sql_qry_result as record} - - {/each} -
- {:else} -
Nothing to show yet...
- {/if} - - {/await} -
+
+ {#await ae_promises.sql_qry_promise} + Getting results... + {:then} + {#if sql_qry_result && sql_qry_result.length} + + + {#each sql_qry_result as record} + + {/each} +
+ {:else} +
Nothing to show yet...
+ {/if} + {/await} +
- diff --git a/src/lib/elements/element_websocket_v2.svelte b/src/lib/elements/element_websocket_v2.svelte index 82f8273b..aea1988b 100644 --- a/src/lib/elements/element_websocket_v2.svelte +++ b/src/lib/elements/element_websocket_v2.svelte @@ -1,434 +1,429 @@ -
+ class:hidden={!ws_connect || hide__ws_element} + class="ae_element__websocket container p-1 bg-pink-100 text-xs mx-auto pb-16 mt-32 mb-32 relative" +> + + + + + - - - - - +
+

Websocket Messages & Commands

+
-
- -

Websocket Messages & Commands

- -
- - - -{#if !hide__ws_form} -
- - - - + - - + + - -
-{/if} + + + {/if} - - + -
-

Messages [grp, client, target, type]

+
+

Messages [grp, client, target, type]

-
    - {#each ws_received_list_other as msg_entry, index} -
  1. -
    - - [{(msg_entry.group_id||'No Group ID')}] - {(msg_entry.client_id.toString().slice(-5)||'No Client ID')} - – - {(msg_entry.target||'No Target')} - | - - {(msg_entry.type||'No Type')}: - - - "{msg_entry.msg}" - - -
    -
  2. - {/each} -
-
+
    + {#each ws_received_list_other as msg_entry, index} +
  1. +
    + + [{msg_entry.group_id || 'No Group ID'}] + {msg_entry.client_id.toString().slice(-5) || 'No Client ID'} + – + {msg_entry.target || 'No Target'} + | + + {msg_entry.type || 'No Type'}: + + + "{msg_entry.msg}" + + +
    +
  2. + {/each} +
+
+ -
- -
-

Commands

- -
    - {#each ws_received_list_cmd as cmd_entry} -
  1. -
    - - [{(cmd_entry.group_id||'No Group ID')}] - {(cmd_entry.client_id.toString().slice(-5)||'No Client ID')} - — - {(cmd_entry.target||'No Target')} - | - - {(cmd_entry.type||'No Type')}: - - - "{cmd_entry.cmd}" - -
    -
  2. - {/each} -
-
+
+
+

Commands

+
    + {#each ws_received_list_cmd as cmd_entry} +
  1. +
    + + [{cmd_entry.group_id || 'No Group ID'}] + {cmd_entry.client_id.toString().slice(-5) || 'No Client ID'} + — + {cmd_entry.target || 'No Target'} + | + + {cmd_entry.type || 'No Type'}: + + + "{cmd_entry.cmd}" + +
    +
  2. + {/each} +
+
+
- - diff --git a/src/lib/stores/ae_events_stores.ts b/src/lib/stores/ae_events_stores.ts index da007656..075cc4ec 100644 --- a/src/lib/stores/ae_events_stores.ts +++ b/src/lib/stores/ae_events_stores.ts @@ -5,677 +5,669 @@ import type { Writable } from 'svelte/store'; import type { key_val } from '$lib/stores/ae_stores'; // Set the version for the app data. Changing this should force a notification and ask the user to clear and reload the page. -let ver = '2025-10-16_2139'; -let ver_idb = '2025-10-16_2139'; +const ver = '2025-10-16_2139'; +const ver_idb = '2025-10-16_2139'; /* *** BEGIN *** Initialize events_local_data_struct */ // Longer-term app data. This should be stored to *local* storage. // Updated 2024-03-06 -let events_local_data_struct: key_val = { - ver: ver, - ver_idb: ver_idb, +const events_local_data_struct: key_val = { + ver: ver, + ver_idb: ver_idb, - // Shared - name: 'Aether - Events (SvelteKit 2.x Svelte 4.x)', - title: `OSIT's Æ Events`, // - Dev SvelteKit`, // Æ + // Shared + name: 'Aether - Events (SvelteKit 2.x Svelte 4.x)', + title: `OSIT's Æ Events`, // - Dev SvelteKit`, // Æ - 'ds': {}, + ds: {}, - 'events_cfg_json': {}, + events_cfg_json: {}, - 'event_id': null, + event_id: null, - // all, disabled, enabled - 'qry__enabled': 'enabled', - // all, hidden, not_hidden - 'qry__hidden': 'not_hidden', - 'qry__limit': 20, - 'qry__offset': 0, + // all, disabled, enabled + qry__enabled: 'enabled', + // all, hidden, not_hidden + qry__hidden: 'not_hidden', + qry__limit: 20, + qry__offset: 0, - // The show details is intended for things like meta data and additional details that are not always needed. - show_details: false, + // The show details is intended for things like meta data and additional details that are not always needed. + show_details: false, - auth__person: {}, // allow, id, name, email, passcode, etc - // The auth__entered_key (usually email or person_id) and auth__entered_passcode is found under events_sess.entered_key and events_sess.entered_passcode because it should be temporary. - // auth__entered_passcode: null, + auth__person: {}, // allow, id, name, email, passcode, etc + // The auth__entered_key (usually email or person_id) and auth__entered_passcode is found under events_sess.entered_key and events_sess.entered_passcode because it should be temporary. + // auth__entered_passcode: null, - // The auth__kv (key value pairs) is used to store the xyz IDs that the browser client can access. This is a key value list of xyz ID and created datetime stamp (or just true). These should not be more than X days old. - auth__kv: { - event: { - // 'LNDF-67-89-92': true - }, - exhibit: { - // 'LNDF-67-89-92': true - }, - location: { - // 'LNDF-67-89-92': true - }, - session: { - // 'LNDF-67-89-92': true, false, 'read', 'write' - }, - presentation: { - // 'LNDF-67-89-92': true - }, - presenter: { - // 'LNDF-67-89-92': true - }, - person: { - // 'LNDF-67-89-92': true - }, - }, + // The auth__kv (key value pairs) is used to store the xyz IDs that the browser client can access. This is a key value list of xyz ID and created datetime stamp (or just true). These should not be more than X days old. + auth__kv: { + event: { + // 'LNDF-67-89-92': true + }, + exhibit: { + // 'LNDF-67-89-92': true + }, + location: { + // 'LNDF-67-89-92': true + }, + session: { + // 'LNDF-67-89-92': true, false, 'read', 'write' + }, + presentation: { + // 'LNDF-67-89-92': true + }, + presenter: { + // 'LNDF-67-89-92': true + }, + person: { + // 'LNDF-67-89-92': true + } + }, - // auth__session_kv: { - // // {'LNDF-67-89-92': true} - // }, - // auth__presentation_kv: { - // // {'LNDF-67-89-92': true} - // }, - // auth__presenter_kv: { - // // {'LNDF-67-89-92': true} - // }, + // auth__session_kv: { + // // {'LNDF-67-89-92': true} + // }, + // auth__presentation_kv: { + // // {'LNDF-67-89-92': true} + // }, + // auth__presenter_kv: { + // // {'LNDF-67-89-92': true} + // }, - // Badge Printing - 'badges': { - auto_view: true, + // Badge Printing + badges: { + auto_view: true, - show_hidden: false, // These are hidden (archived) leads so the list is not as long. - show_not_enabled: false, + show_hidden: false, // These are hidden (archived) leads so the list is not as long. + show_not_enabled: false, - show_printed: false, - allow_reprint: false, + show_printed: false, + allow_reprint: false, - 'show_element__cfg': true, - 'show_element__cfg_detail': false, - // 'theme_mode': 'dark', - // 'theme_name': 'wintry', + show_element__cfg: true, + show_element__cfg_detail: false, + // 'theme_mode': 'dark', + // 'theme_name': 'wintry', - 'fulltext_search_qry_str': null, - 'search_badge_type_code': null, - 'status_qry__search': null, - 'use_id_li': true, - 'search_status': null, - 'search_complete': false, + fulltext_search_qry_str: null, + search_badge_type_code: null, + status_qry__search: null, + use_id_li: true, + search_status: null, + search_complete: false, - 'classes__form': 'border border-surface-200 p-4 space-y-4 rounded-container', - }, + classes__form: 'border border-surface-200 p-4 space-y-4 rounded-container' + }, - // Event Files - uploads for sessions, presenters, etc - // 'files': { - // }, + // Event Files - uploads for sessions, presenters, etc + // 'files': { + // }, - // Event Presentation Launcher (and native Electron app) - 'launcher': { - // default - browser, onsite - browser onsite, native - Electron app onsite - app_mode: 'default', // 'default', 'native', 'onsite' - ws_connect: false, + // Event Presentation Launcher (and native Electron app) + launcher: { + // default - browser, onsite - browser onsite, native - Electron app onsite + app_mode: 'default', // 'default', 'native', 'onsite' + ws_connect: false, - qry_limit__files: 25, - qry_limit__presentations: 25, - qry_limit__presenters: 75, - qry_limit__sessions: 50, + qry_limit__files: 25, + qry_limit__presentations: 25, + qry_limit__presenters: 75, + qry_limit__sessions: 50, - hide__launcher_header: false, - hide__launcher_menu: true, - hide__launcher_footer: false, + hide__launcher_header: false, + hide__launcher_menu: true, + hide__launcher_footer: false, - hide__modal_header_title: false, + hide__modal_header_title: false, - hide_drawer__debug: true, - hide__ws_element: true, - hide__ws_form: true, - hide__ws_messages: true, - hide__ws_commands: true, + hide_drawer__debug: true, + hide__ws_element: true, + hide__ws_form: true, + hide__ws_messages: true, + hide__ws_commands: true, - hide_content__draft_files: true, + hide_content__draft_files: true, - show_content__disabled_files: false, - show_content__hidden_files: false, - show_content__hidden_presentations: false, - show_content__hidden_presenters: false, - show_content__hidden_sessions: false, - show_content__draft_files: false, + show_content__disabled_files: false, + show_content__hidden_files: false, + show_content__hidden_presentations: false, + show_content__hidden_presenters: false, + show_content__hidden_sessions: false, + show_content__draft_files: false, - // These should be renamed to match the pres_mgmt section. Use "hide" instead of "show". - show_content__session_code: true, - show_content__presentation_code: true, - show_content__presenter_code: true, + // These should be renamed to match the pres_mgmt section. Use "hide" instead of "show". + show_content__session_code: true, + show_content__presentation_code: true, + show_content__presenter_code: true, - show_section__controller: false, + show_section__controller: false, - datetime_format: 'datetime_12_long', - time_format: 'time_12_short', - time_hours: 12, // 12 or 24 + datetime_format: 'datetime_12_long', + time_format: 'time_12_short', + time_hours: 12, // 12 or 24 - slct: { - event_id: null, - event_location_id: null, - event_session_id: null, - event_presentation_id: null, - event_presenter_id: null, - event_file_id: null, // event_file_id - }, + slct: { + event_id: null, + event_location_id: null, + event_session_id: null, + event_presentation_id: null, + event_presenter_id: null, + event_file_id: null // event_file_id + }, - native: { - // 'local_file_cache_path': aether_cfg_data.app.local_file_cache_path, - // 'host_file_temp_path': aether_cfg_data.app.host_file_temp_path, - 'host_file_config_path': 'device_configs/ae_native_app_config.default.json', - }, + native: { + // 'local_file_cache_path': aether_cfg_data.app.local_file_cache_path, + // 'host_file_temp_path': aether_cfg_data.app.host_file_temp_path, + host_file_config_path: 'device_configs/ae_native_app_config.default.json' + }, - idle_timer: 7*60*1000, // How many seconds until idle - idle_cycle: 5*1000, // How frequently the idle status is checked - idle_loop_period: 3*60*1000, // How frequently the loop runs for the screen saver and similar + idle_timer: 7 * 60 * 1000, // How many seconds until idle + idle_cycle: 5 * 1000, // How frequently the idle status is checked + idle_loop_period: 3 * 60 * 1000, // How frequently the loop runs for the screen saver and similar - screen_saver_img_kv: {}, // This key value list is generate when the launcher_file_cont is loaded. It only adds image file types. - modal__title: '-- Not Set --', - modal__open: null, - modal__open_filename: null, - modal_img_src: null, + screen_saver_img_kv: {}, // This key value list is generate when the launcher_file_cont is loaded. It only adds image file types. + modal__title: '-- Not Set --', + modal__open: null, + modal__open_filename: null, + modal_img_src: null, - controller: 'local', - controller_group_code: 'launcher-00', - controller_client_id: null, - // controller_cmd: null, - // controller_trigger_send: null, - }, + controller: 'local', + controller_group_code: 'launcher-00', + controller_client_id: null + // controller_cmd: null, + // controller_trigger_send: null, + }, - // Lead Retrievals (Exhibit) - 'leads': { - show_option__paid_tab: true, - show_content__scan_alert: true, // For QR scanner bug... - show_content__scan_requirements: true, - show_content__custom_question_descriptions: true, - show_content__email_link_warning: true, + // Lead Retrievals (Exhibit) + leads: { + show_option__paid_tab: true, + show_content__scan_alert: true, // For QR scanner bug... + show_content__scan_requirements: true, + show_content__custom_question_descriptions: true, + show_content__email_link_warning: true, - default_to_scan: true, + default_to_scan: true, - // For ISHLT 2024 Annual Meeting only! - default__external_registration_id: '2024_Annual Meeting', + // For ISHLT 2024 Annual Meeting only! + default__external_registration_id: '2024_Annual Meeting', - auto_view: true, // Show the new lead after added by scan or search - auto_hide_on_sign_in: true, + auto_view: true, // Show the new lead after added by scan or search + auto_hide_on_sign_in: true, - show_hidden: false, // These are hidden (archived) leads so the list is not as long. - show_not_enabled: false, + show_hidden: false, // These are hidden (archived) leads so the list is not as long. + show_not_enabled: false, - refresh_interval__tracking_li: 30000, // 30 seconds + refresh_interval__tracking_li: 30000, // 30 seconds - // The entered_passcode is the exhibit booths shared passcode for staff. This is used to initially access the lead retrieval service. - entered_passcode: null, + // The entered_passcode is the exhibit booths shared passcode for staff. This is used to initially access the lead retrieval service. + entered_passcode: null, - // The auth_exhibit_kv (key value pairs) is used to store the exhibit IDs that the browser client can access. This is a key value list of exhibit ID and created datetime stamp. These should not be more than X days old. The entered_passcode for events_sess.leads is what they are entering to log in. - auth_exhibit_kv: { - // {'LNDF-67-89-92': {key: 'example@oneskyit.com', updated_on: '2024-03-13T08:05:29Z}} - }, + // The auth_exhibit_kv (key value pairs) is used to store the exhibit IDs that the browser client can access. This is a key value list of exhibit ID and created datetime stamp. These should not be more than X days old. The entered_passcode for events_sess.leads is what they are entering to log in. + auth_exhibit_kv: { + // {'LNDF-67-89-92': {key: 'example@oneskyit.com', updated_on: '2024-03-13T08:05:29Z}} + }, - // The auth_exhibit_license_li is used to store the exhibit license(s) being used on the browser client. There can be multiple exhibit IDs, but only one license per exhibit ID for the browser client. This is used to determine who can actually access and use the lead retrieval service. This is a key value list of key (email address) and created datetime stamp. These should not be more than X days old. - // auth_exhibit_license_li: { - // // 'LNDF-67-89-92': { 'key': 'example@oneskyit.com', 'updated_on': '2024-03-13T08:05:29Z'} - // }, - edit_license_li: false, + // The auth_exhibit_license_li is used to store the exhibit license(s) being used on the browser client. There can be multiple exhibit IDs, but only one license per exhibit ID for the browser client. This is used to determine who can actually access and use the lead retrieval service. This is a key value list of key (email address) and created datetime stamp. These should not be more than X days old. + // auth_exhibit_license_li: { + // // 'LNDF-67-89-92': { 'key': 'example@oneskyit.com', 'updated_on': '2024-03-13T08:05:29Z'} + // }, + edit_license_li: false, - // The "tab" is a key value list of exhibit ID and tab name. This is intentionally using local storage to store the current tab for each exhibit. - // example: {'LNDF-67-89-92': 'start', 'OFLN-32-38-14': 'add_scan'} - tab: {}, + // The "tab" is a key value list of exhibit ID and tab name. This is intentionally using local storage to store the current tab for each exhibit. + // example: {'LNDF-67-89-92': 'start', 'OFLN-32-38-14': 'add_scan'} + tab: {} + }, + // Presentation Management + pres_mgmt: { + sync_local_config: false, + lock_config: true, - }, + datetime_format: 'datetime_12_long', + time_format: 'time_12_short', + time_hours: 12, // 12 or 24 - // Presentation Management - pres_mgmt: { - sync_local_config: false, - lock_config: true, + qry_enabled: 'enabled', // all, disabled, enabled + qry_hidden: 'not_hidden', // all, hidden, not_hidden + qry_limit__files: 75, + qry_limit__presentations: 25, + qry_limit__presenters: 500, + qry_limit__sessions: 100, + qry_max: 500, // This is the max number the limit is allowed to be set to. + qry__files_offset_seconds: null, + qry__files_sort: 'created_on', - datetime_format: 'datetime_12_long', - time_format: 'time_12_short', - time_hours: 12, // 12 or 24 + qry_and__file_count: true, // Essentially it should be greater than 0 - qry_enabled: 'enabled', // all, disabled, enabled - qry_hidden: 'not_hidden', // all, hidden, not_hidden - qry_limit__files: 75, - qry_limit__presentations: 25, - qry_limit__presenters: 500, - qry_limit__sessions: 100, - qry_max: 500, // This is the max number the limit is allowed to be set to. - qry__files_offset_seconds: null, - qry__files_sort: 'created_on', + save_search_text: true, + saved_search__session: null, - qry_and__file_count: true, // Essentially it should be greater than 0 + require__presenter_agree: false, + require__session_agree: false, - save_search_text: true, - saved_search__session: null, + // show_content__agree_text: false, + show_content__event_view: null, + // show__launcher_link: false, + // show__location_link: false, + show_content__location_qr: false, + show_content__presentation_description: false, // Note that this is for *all* presentations in the user interface. It is a global setting. + show_content__presenter_page_help: true, + // show_content__presenter_start: false, + show_content__presenter_view: null, + show_content__presenter_qr: false, + show_content__session_description: false, + show_content__session_files: false, + show_content__session_help: true, + show_content__session_presentations: false, + show_content__session_search_view: null, + show_content__session_search_help: true, + show_content__session_search_room_name: false, + show_content__session_view: null, + show_content__session_qr: false, + hide__session_msg: true, + hide__session_poc: true, + hide__session_poc_biography: true, + hide__presenter_biography: true, - require__presenter_agree: false, - require__session_agree: false, + // Only specific to lists and tables: + hide__session_li_location_field: false, + hide__session_li_poc_field: false, + hide__launcher_link_legacy: true, // Flask version + hide__launcher_link: true, // New Svelte version + hide__location_link: true, - // show_content__agree_text: false, - show_content__event_view: null, - // show__launcher_link: false, - // show__location_link: false, - show_content__location_qr: false, - show_content__presentation_description: false, // Note that this is for *all* presentations in the user interface. It is a global setting. - show_content__presenter_page_help: true, - // show_content__presenter_start: false, - show_content__presenter_view: null, - show_content__presenter_qr: false, - show_content__session_description: false, - show_content__session_files: false, - show_content__session_help: true, - show_content__session_presentations: false, - show_content__session_search_view: null, - show_content__session_search_help: true, - show_content__session_search_room_name: false, - show_content__session_view: null, - show_content__session_qr: false, - hide__session_msg: true, - hide__session_poc: true, - hide__session_poc_biography: true, - hide__presenter_biography: true, + show_content__disabled_files: false, + show_content__hidden_files: false, + show_content__hidden_presentations: false, + show_content__hidden_presenters: false, + show_content__hidden_sessions: false, - // Only specific to lists and tables: - hide__session_li_location_field: false, - hide__session_li_poc_field: false, - hide__launcher_link_legacy: true, // Flask version - hide__launcher_link: true, // New Svelte version - hide__location_link: true, + show__direct_download: false, - show_content__disabled_files: false, - show_content__hidden_files: false, - show_content__hidden_presentations: false, - show_content__hidden_presenters: false, - show_content__hidden_sessions: false, + // No longer used. Use "hide" instead of "show". Now it is initially set in the remote event config sync. + // show_content__presentation_code: true, + // show_content__presenter_code: true, + // show_content__session_code: true, - show__direct_download: false, + show_menu__presenter: null, + show_menu__session: null, + show_menu__session_search: null, + show_menu__event_reports: null, - // No longer used. Use "hide" instead of "show". Now it is initially set in the remote event config sync. - // show_content__presentation_code: true, - // show_content__presenter_code: true, - // show_content__session_code: true, + show_report: null, + // show_report__presenters_agree: false, + // show_report__recent_files: false, - show_menu__presenter: null, - show_menu__session: null, - show_menu__session_search: null, - show_menu__event_reports: null, + // time_format: 'time_12_short', // 'time_short', 'time_12_short' - show_report: null, - // show_report__presenters_agree: false, - // show_report__recent_files: false, + disable_submit__opt_out: true, + submit_status__opt_out: null, - // time_format: 'time_12_short', // 'time_short', 'time_12_short' + device_kv: { + // 'LNDF-67-89-92': {'collapse': true}, + }, + location_kv: { + // 'LNDF-67-89-92': {'collapse': true}, + } + } - disable_submit__opt_out: true, - submit_status__opt_out: null, + // Speakers Management (Collection) + // 'speakers': { + // }, - device_kv: { - // 'LNDF-67-89-92': {'collapse': true}, - }, - location_kv: { - // 'LNDF-67-89-92': {'collapse': true}, - }, - }, - - // Speakers Management (Collection) - // 'speakers': { - // }, - - // other -} + // other +}; // console.log(`AE Stores - App Events Local Storage Data:`, events_local_data_struct); // This works, but does not uses local storage: // export let ae_loc = writable(events_local_data_struct); // This works and uses *local* storage: -export let events_loc: Writable = persisted('ae_events_loc', events_local_data_struct); +export const events_loc: Writable = persisted('ae_events_loc', events_local_data_struct); // console.log(`AE Stores - App Local Storage Data:`, get(ae_loc)); - /* *** BEGIN *** Initialize events_session_data_struct */ // Temporary app data. This should be stored to session storage. // Updated 2024-03-06 -let events_session_data_struct: key_val = { - ver: ver, - ver_idb: ver_idb, - log_lvl: 1, +const events_session_data_struct: key_val = { + ver: ver, + ver_idb: ver_idb, + log_lvl: 1, - // Shared - 'ds': { - 'submit_status': null, - }, - 'ds_loaded': { - }, + // Shared + ds: { + submit_status: null + }, + ds_loaded: {}, - 'qry__enabled': 'enabled', // all, disabled, enabled - 'qry__hidden': 'not_hidden', // all, hidden, not_hidden - 'qry__limit': 20, - 'qry__offset': 0, + qry__enabled: 'enabled', // all, disabled, enabled + qry__hidden: 'not_hidden', // all, hidden, not_hidden + qry__limit: 20, + qry__offset: 0, - // This is intended to only be temporary. - auth__person: {}, - auth__entered_key: null, - auth__entered_passcode: null, - auth__kv: { - event: {}, - exhibit: {}, - location: {}, - session: {}, - presentation: {}, - presenter: {}, - person: {}, - }, + // This is intended to only be temporary. + auth__person: {}, + auth__entered_key: null, + auth__entered_passcode: null, + auth__kv: { + event: {}, + exhibit: {}, + location: {}, + session: {}, + presentation: {}, + presenter: {}, + person: {} + }, - // Badge Printing - 'badges': { - 'fulltext_search_qry_str': null, - 'search_badge_type_code': null, - 'status_qry__search': null, - 'use_id_li': true, - 'search_status': null, - 'search_complete': true, + // Badge Printing + badges: { + fulltext_search_qry_str: null, + search_badge_type_code: null, + status_qry__search: null, + use_id_li: true, + search_status: null, + search_complete: true, - show_form__search: true, - show_form__search_results: true, - show_form__scan: false, + show_form__search: true, + show_form__search_results: true, + show_form__scan: false, - qr_scan_start: true, - qr_scan_result: null, - }, + qr_scan_start: true, + qr_scan_result: null + }, - // Event Files - uploads for sessions, presenters, etc - 'files': { - disable_submit__event_file_obj: null, - status__submit: null, - status__file_list: null, // processing, complete + // Event Files - uploads for sessions, presenters, etc + files: { + disable_submit__event_file_obj: null, + status__submit: null, + status__file_list: null, // processing, complete - processed_file_list: [], - }, + processed_file_list: [] + }, - // Event Presentation Launcher (and native Electron app) - 'launcher': { - ws_connect_status: null, - av_recording_status: null, - controller_cmd: null, - controller_trigger_send: null, - event_file_open: {}, // This is from the older Launcher. - native: { - }, + // Event Presentation Launcher (and native Electron app) + launcher: { + ws_connect_status: null, + av_recording_status: null, + controller_cmd: null, + controller_trigger_send: null, + event_file_open: {}, // This is from the older Launcher. + native: {}, - modal__title: '', - modal__open_event_file_id: false, - modal__event_file_obj: null, + modal__title: '', + modal__open_event_file_id: false, + modal__event_file_obj: null, - loading__session_li_status: null, - loading__session_id_status: null, + loading__session_li_status: null, + loading__session_id_status: null, - trigger_reload__event_session_obj_id: null, - trigger_reload__event_session_obj_li: null, - trigger_reload__event_location_obj_id: null, - trigger_reload__event_location_obj_li: null, + trigger_reload__event_session_obj_id: null, + trigger_reload__event_session_obj_li: null, + trigger_reload__event_location_obj_id: null, + trigger_reload__event_location_obj_li: null, - trigger__ws_connect: null, - trigger__ws_disconnect: null, - }, + trigger__ws_connect: null, + trigger__ws_disconnect: null + }, - // Lead Retrievals (Exhibit) - 'leads': { - example: true, + // Lead Retrievals (Exhibit) + leads: { + example: true, - show_form__license: false, - show_form__search: false, - show_form__scan: false, - show_form__view_lead: false, // Set to event_exhibit_tracking_id - // show_form__view_lead: [], + show_form__license: false, + show_form__search: false, + show_form__scan: false, + show_form__view_lead: false, // Set to event_exhibit_tracking_id + // show_form__view_lead: [], - show_confirm__add_lead: [], + show_confirm__add_lead: [], - submit_status__license: null, // 'saving', 'created', 'updated' - // create_status__license: null, // 'creating', 'created', 'updated' - // update_status__license: null, // 'updating', 'created', 'updated' + submit_status__license: null, // 'saving', 'created', 'updated' + // create_status__license: null, // 'creating', 'created', 'updated' + // update_status__license: null, // 'updating', 'created', 'updated' - submit_status__search: null, // 'searching', 'complete' + submit_status__search: null, // 'searching', 'complete' - // The entered_passcode is the exhibit booths shared passcode for staff. This is used to initially access the lead retrieval service. - entered_passcode: null, + // The entered_passcode is the exhibit booths shared passcode for staff. This is used to initially access the lead retrieval service. + entered_passcode: null, - tmp_license: { - 'index': null, - // 'agree' : false, // The user must agree to the license agreement. - 'email': '', - 'full_name': '', - 'passcode': '', - 'session_count': 0, - 'updated_on': new Date().toISOString() - }, + tmp_license: { + index: null, + // 'agree' : false, // The user must agree to the license agreement. + email: '', + full_name: '', + passcode: '', + session_count: 0, + updated_on: new Date().toISOString() + }, - entered_search_str: null, + entered_search_str: null, - lead_data_changed: null, + lead_data_changed: null, - qr_scan_start: true, - qr_scan_result: null, - }, + qr_scan_start: true, + qr_scan_result: null + }, - 'stripe': { - 'license_qty': 1, - 'rental_qty': 0, - 'rental_option': true, - 'api_use': false, - 'client_reference_id': null, - 'publishable_key': 'pk_live_zqaWNDfak2eDHeqnRiyaJcFi', - 'btn_payment_id': null, - 'btn_1_license': 'buy_btn_1OvqWJ2gJkNsDuiNqMCWz5nG', - 'btn_1_license_rental': 'buy_btn_1OvqVA2gJkNsDuiNhk9r8Io2', - 'btn_3_license': 'buy_btn_1OvrI22gJkNsDuiNXjBg3c4Y', - 'btn_3_license_rental': 'buy_btn_1OvrKa2gJkNsDuiNhSBCkNau', - 'btn_6_license': 'buy_btn_1OvrWc2gJkNsDuiN7mnwvZNL', - 'btn_6_license_rental': 'buy_btn_1OvrXP2gJkNsDuiNZpWZs3Uy', - 'btn_10_license': 'buy_btn_1OvrPM2gJkNsDuiNRCMHfSuz', - 'btn_10_license_rental': 'buy_btn_1OvrPs2gJkNsDuiN1nPkjPOM', - }, + stripe: { + license_qty: 1, + rental_qty: 0, + rental_option: true, + api_use: false, + client_reference_id: null, + publishable_key: 'pk_live_zqaWNDfak2eDHeqnRiyaJcFi', + btn_payment_id: null, + btn_1_license: 'buy_btn_1OvqWJ2gJkNsDuiNqMCWz5nG', + btn_1_license_rental: 'buy_btn_1OvqVA2gJkNsDuiNhk9r8Io2', + btn_3_license: 'buy_btn_1OvrI22gJkNsDuiNXjBg3c4Y', + btn_3_license_rental: 'buy_btn_1OvrKa2gJkNsDuiNhSBCkNau', + btn_6_license: 'buy_btn_1OvrWc2gJkNsDuiN7mnwvZNL', + btn_6_license_rental: 'buy_btn_1OvrXP2gJkNsDuiNZpWZs3Uy', + btn_10_license: 'buy_btn_1OvrPM2gJkNsDuiNRCMHfSuz', + btn_10_license_rental: 'buy_btn_1OvrPs2gJkNsDuiN1nPkjPOM' + }, - // Presentation Management - pres_mgmt: { - // link: { - // ae_core: true, - // pres_mgmt__launcher_id: null, // event_location_id - // pres_mgmt__location_id: null, // event_location_id - // pres_mgmt__presenter_id: null, // event_presenter_id - // pres_mgmt__reports: null, // event_id - // pres_mgmt__session_id: null, // event_session_id - // pres_mgmt__session_search: null, // event_id - // }, - // presenter__url_str: null, - presenter__updated_on: null, - session_updated_on: null, + // Presentation Management + pres_mgmt: { + // link: { + // ae_core: true, + // pres_mgmt__launcher_id: null, // event_location_id + // pres_mgmt__location_id: null, // event_location_id + // pres_mgmt__presenter_id: null, // event_presenter_id + // pres_mgmt__reports: null, // event_id + // pres_mgmt__session_id: null, // event_session_id + // pres_mgmt__session_search: null, // event_id + // }, + // presenter__url_str: null, + presenter__updated_on: null, + session_updated_on: null, - location_name_qry_str: null, - fulltext_search_qry_str: null, - status_qry__search: null, + location_name_qry_str: null, + fulltext_search_qry_str: null, + status_qry__search: null, - disable_submit__event_file_obj: true, + disable_submit__event_file_obj: true, - show_form__search: true, - show_form__search_results: true, + show_form__search: true, + show_form__search_results: true, - show_content__agree_text: false, - show_content__presenter_start: false, + show_content__agree_text: false, + show_content__presenter_start: false, - show_content__presentation_description: false, // Note that this is per presentation. The event_presentation_id_random should match. + show_content__presentation_description: false, // Note that this is per presentation. The event_presentation_id_random should match. - show_report: null, - // show_report__presenters_agree: false, - // show_report__recent_files: false, + show_report: null, + // show_report__presenters_agree: false, + // show_report__recent_files: false, - show_field_edit__filename: false, // For file rename + show_field_edit__filename: false, // For file rename - new_upload_list: null, - files_uploading_count: null, + new_upload_list: null, + files_uploading_count: null, - qry_limit__files: 75, - qry_limit__presentations: 25, - qry_limit__presenters: 500, - qry_limit__sessions: 100, + qry_limit__files: 75, + qry_limit__presentations: 25, + qry_limit__presenters: 500, + qry_limit__sessions: 100, - show_fields__presentation: true, - show_fields__session: true, + show_fields__presentation: true, + show_fields__session: true, + show_modal__presenter_agree: false, + show__session_poc_profile: false, + show_modal__session_poc_agree: false, - show_modal__presenter_agree: false, - show__session_poc_profile: false, - show_modal__session_poc_agree: false, + // hide__edit_location: {}, + show__edit_location: {}, - // hide__edit_location: {}, - show__edit_location: {}, + show__edit_poc_person: {}, - show__edit_poc_person: {}, + show__view_alert: {}, // key values + show__edit_alert_msg: {}, // key values - show__view_alert: {}, // key values - show__edit_alert_msg: {}, // key values + tmp__alert_msg: {}, // key values - tmp__alert_msg: {}, // key values + session_qr_url: {}, // key value of session_id and URL string - session_qr_url: {}, // key value of session_id and URL string + status_rpt: { + recent_files: null, + presenters_agree: null, + presenters_biography: null + }, - status_rpt: { - recent_files: null, - presenters_agree: null, - presenters_biography: null, - }, + rpt__session_no_files: true, + rpt__session_poc_agree: false, // Default to false for new events. + rpt__session_no_bio: true, - rpt__session_no_files: true, - rpt__session_poc_agree: false, // Default to false for new events. - rpt__session_no_bio: true, + rpt__presenter_agree: true, - rpt__presenter_agree: true, + tmp_val__filename_no_ext: null // For file rename + } - tmp_val__filename_no_ext: null, // For file rename - }, + // Speakers Management (Collection) - // Speakers Management (Collection) - - // other + // other }; // console.log(`AE Stores - App Events Session Storage Data:`, events_session_data_struct); -export let events_sess = writable(events_session_data_struct); - +export const events_sess = writable(events_session_data_struct); /* *** BEGIN *** Initialize events_slct and events_trigger */ /* The slct and slct_trigger variable should not be stored in local storage. Only use session storage because browser tabs can be open to different events, badges, exhibits, etc. */ // Intended for temporary session storage. // Updated 2024-03-06 -let events_slct_obj_template: key_val = { - // Top level - 'event_id': null, - 'event_obj': {}, - 'event_obj_li': [], +const events_slct_obj_template: key_val = { + // Top level + event_id: null, + event_obj: {}, + event_obj_li: [], - // Sub-level event_ - 'abstract_id': null, - 'abstract_obj': {}, - 'abstract_obj_li': [], + // Sub-level event_ + abstract_id: null, + abstract_obj: {}, + abstract_obj_li: [], - 'badge_id': null, - 'badge_obj': {}, - 'badge_obj_li': [], + badge_id: null, + badge_obj: {}, + badge_obj_li: [], - 'badge_template_id': null, - 'badge_template_obj': {}, - 'badge_template_obj_li': [], + badge_template_id: null, + badge_template_obj: {}, + badge_template_obj_li: [], - 'device_id': null, - 'device_obj': {}, - 'device_obj_li': [], + device_id: null, + device_obj: {}, + device_obj_li: [], - 'exhibit_id': null, - 'exhibit_obj': {}, - 'exhibit_obj_li': [], + exhibit_id: null, + exhibit_obj: {}, + exhibit_obj_li: [], - // Rename these to badge_tracking_*? - 'exhibit_tracking_id': null, - 'exhibit_tracking_obj': {}, - 'exhibit_tracking_obj_li': [], + // Rename these to badge_tracking_*? + exhibit_tracking_id: null, + exhibit_tracking_obj: {}, + exhibit_tracking_obj_li: [], - 'file_id': null, - 'file_obj': {}, - 'file_obj_li': [], - 'event_file_obj': {}, + file_id: null, + file_obj: {}, + file_obj_li: [], + event_file_obj: {}, - 'event_file_obj_li': [], + event_file_obj_li: [], - 'location_id': null, - 'location_obj': {}, - 'location_obj_li': [], + location_id: null, + location_obj: {}, + location_obj_li: [], - 'person_id': null, - 'person_obj': {}, - 'person_obj_li': [], + person_id: null, + person_obj: {}, + person_obj_li: [], - 'presentation_id': null, - 'presentation_obj': {}, - 'presentation_obj_li': [], - 'event_presentation_obj': {}, + presentation_id: null, + presentation_obj: {}, + presentation_obj_li: [], + event_presentation_obj: {}, - 'presenter_id': null, - 'presenter_obj': {}, - 'presenter_obj_li': [], - 'event_presenter_obj': {}, + presenter_id: null, + presenter_obj: {}, + presenter_obj_li: [], + event_presenter_obj: {}, - 'session_id': null, - 'session_obj': {}, - 'session_obj_li': [], - 'event_session_obj': {}, + session_id: null, + session_obj: {}, + session_obj_li: [], + event_session_obj: {}, - 'lq__presenter_obj': {}, // Testing passing a LiveQuery object around... + lq__presenter_obj: {}, // Testing passing a LiveQuery object around... - 'auth__event_presenter_id': null, - 'auth__event_presentation_id': null, + auth__event_presenter_id: null, + auth__event_presentation_id: null }; // console.log(`AE Stores - Selected Events Objects:`, events_slct_obj_template); // This works, and uses *session* (not local) storage: -export let events_slct = writable(events_slct_obj_template); +export const events_slct = writable(events_slct_obj_template); // This works and uses *local* storage: // export let events_slct: Writable = persisted('ae_events_slct', events_slct_obj_template); - /* *** BEGIN *** Initialize events_trigger */ // Intended for temporary session storage. // Updated 2024-03-06 -export let events_trigger: any = writable(null); +export const events_trigger: any = writable(null); // console.log(`AE Events Stores - Events Trigger:`, events_trigger); -let tmp__events_trig: key_val = { - 'event_id': null, - 'event_id_li': [], - 'event_location_id': null, - 'event_location_id_li': [], - 'event_session_id': null, - 'event_session_id_li': [], - 'event_presentation_id': null, - 'event_presentation_id_li': [], - 'event_presenter_id': null, - 'event_presenter_id_li': [], +const tmp__events_trig: key_val = { + event_id: null, + event_id_li: [], + event_location_id: null, + event_location_id_li: [], + event_session_id: null, + event_session_id_li: [], + event_presentation_id: null, + event_presentation_id_li: [], + event_presenter_id: null, + event_presenter_id_li: [] }; // console.log(`AE Stores - Events Trigger:`, events_trig); -export let events_trig: Writable = writable(tmp__events_trig); +export const events_trig: Writable = writable(tmp__events_trig); /* *** BEGIN *** TESTING Initialize trig_resp */ // The idea behind this is for a shared (Svelte app (within Events for now)) trigger and response. In theory this could be used to monitor multiple downloads or have a universal status area. Intended for temporary session storage. // Updated 2024-06-25 -let tmp__events_trig_kv: key_val = {}; +const tmp__events_trig_kv: key_val = {}; // { - // 'example-1': - // { - // 'a-rand-id-1': true, - // 'a-rand-id-2': false, - // 'a-rand-id-3': Promise.resolve('This is a test promise.'), - // }, - // 'example-2': - // { - // 'a-rand-id-4': true, - // 'a-rand-id-5': false, - // 'a-rand-id-6': Promise.resolve('This is a test promise.'), - // }, +// 'example-1': +// { +// 'a-rand-id-1': true, +// 'a-rand-id-2': false, +// 'a-rand-id-3': Promise.resolve('This is a test promise.'), +// }, +// 'example-2': +// { +// 'a-rand-id-4': true, +// 'a-rand-id-5': false, +// 'a-rand-id-6': Promise.resolve('This is a test promise.'), +// }, // }; -export let events_trig_kv = writable(tmp__events_trig_kv); \ No newline at end of file +export const events_trig_kv = writable(tmp__events_trig_kv); diff --git a/src/lib/stores/ae_idaa_stores.ts b/src/lib/stores/ae_idaa_stores.ts index bc7fd259..12031c35 100644 --- a/src/lib/stores/ae_idaa_stores.ts +++ b/src/lib/stores/ae_idaa_stores.ts @@ -6,101 +6,98 @@ import type { key_val } from '$lib/stores/ae_stores'; import { offset } from '@floating-ui/dom'; // Set the version for the app data. Changing this should force a notification and ask the user to clear and reload the page. -let ver = '2024-08-21_1646'; -let ver_idb = '2024-08-21_1645'; +const ver = '2024-08-21_1646'; +const ver_idb = '2024-08-21_1645'; /* *** BEGIN *** Initialize idaa_local_data_struct */ // Longer-term app data. This should be stored to *local* storage. // Updated 2024-03-06 -let idaa_local_data_struct: key_val = { - ver: ver, - ver_idb: ver_idb, +const idaa_local_data_struct: key_val = { + ver: ver, + ver_idb: ver_idb, - // Shared - name: 'Aether - IDAA (SvelteKit 2.x Svelte 4.x)', - title: `OSIT's Æ IDAA`, // - Dev SvelteKit`, // Æ + // Shared + name: 'Aether - IDAA (SvelteKit 2.x Svelte 4.x)', + title: `OSIT's Æ IDAA`, // - Dev SvelteKit`, // Æ - novi_uuid: null, - novi_email: null, - novi_full_name: null, - novi_admin_li: [ - "2b078deb-b4e7-4203-99da-9f7cd62159a5" - ], - novi_trusted_li: [ - "c9ea07b5-06b0-4a43-a2d0-8d06558c8a82", - "58db22ee-4b0a-49a7-9f34-53d2ba85a84b", - ], - novi_jitsi_mod_li: [ - "5724aad7-6d89-47e7-8943-966fd22911bd", - ], + novi_uuid: null, + novi_email: null, + novi_full_name: null, + novi_admin_li: ['2b078deb-b4e7-4203-99da-9f7cd62159a5'], + novi_trusted_li: ['c9ea07b5-06b0-4a43-a2d0-8d06558c8a82', '58db22ee-4b0a-49a7-9f34-53d2ba85a84b'], + novi_jitsi_mod_li: ['5724aad7-6d89-47e7-8943-966fd22911bd'], - novi_archives_base_url: "https://www.idaa.org/idaa-archives", - novi_bb_base_url: "https://www.idaa.org/idaa-bulletin-board", - novi_meetings_base_url: "https://www.idaa.org/idaa-meetings", + novi_archives_base_url: 'https://www.idaa.org/idaa-archives', + novi_bb_base_url: 'https://www.idaa.org/idaa-bulletin-board', + novi_meetings_base_url: 'https://www.idaa.org/idaa-meetings', - 'ds': {}, + ds: {}, - 'idaa_cfg_json': {}, + idaa_cfg_json: {}, - // all, disabled, enabled - 'qry__enabled': 'enabled', - // all, hidden, not_hidden - 'qry__hidden': 'not_hidden', - 'qry__limit': 20, - 'qry__offset': 0, + // all, disabled, enabled + qry__enabled: 'enabled', + // all, hidden, not_hidden + qry__hidden: 'not_hidden', + qry__limit: 20, + qry__offset: 0, - archives: { - enabled: 'enabled', // all, disabled, enabled - hidden: 'not_hidden', // all, hidden, not_hidden - limit: 150, - offset: 0, + archives: { + enabled: 'enabled', // all, disabled, enabled + hidden: 'not_hidden', // all, hidden, not_hidden + limit: 150, + offset: 0, - edit_kv: {}, // Used to track which archive objects are being edited - edit__archive_obj: null, - edit__archive_content_obj: null, + edit_kv: {}, // Used to track which archive objects are being edited + edit__archive_obj: null, + edit__archive_content_obj: null - // qry__order_by: 'updated_on', // For the IDB index query - // qry__order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'}, // For the SQL query - }, + // qry__order_by: 'updated_on', // For the IDB index query + // qry__order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'}, // For the SQL query + }, - bb: { - enabled: 'enabled', // all, disabled, enabled - hidden: 'not_hidden', // all, hidden, not_hidden - limit: 50, - offset: 0, + bb: { + enabled: 'enabled', // all, disabled, enabled + hidden: 'not_hidden', // all, hidden, not_hidden + limit: 50, + offset: 0, - edit_kv: {}, // Used to track which post objects are being edited - edit__post_obj: null, - edit__post_comment_obj: null, + edit_kv: {}, // Used to track which post objects are being edited + edit__post_obj: null, + edit__post_comment_obj: null, - show_list__post_obj_li: true, + show_list__post_obj_li: true, - qry__enabled: 'enabled', // all, disabled, enabled - qry__hidden: 'not_hidden', // all, hidden, not_hidden - qry__limit: 25, - qry__offset: 0, - qry__order_by: 'updated_on', // For the IDB index query - qry__order_by_li: {'updated_on': 'DESC', 'created_on': 'DESC'}, // For the SQL query + qry__enabled: 'enabled', // all, disabled, enabled + qry__hidden: 'not_hidden', // all, hidden, not_hidden + qry__limit: 25, + qry__offset: 0, + qry__order_by: 'updated_on', // For the IDB index query + qry__order_by_li: { updated_on: 'DESC', created_on: 'DESC' } // For the SQL query + }, + recovery_meetings: { + edit_kv: {}, // Used to track which event objects are being edited + edit__event_obj: null, - }, + qry__enabled: 'enabled', // all, disabled, enabled + qry__hidden: 'not_hidden', // all, hidden, not_hidden + qry__limit: 150, + qry__order_by: 'updated_on', // For the IDB index query; name, updated_on/created_on + qry__order_by_li: { + priority: 'DESC', + sort: 'DESC', + updated_on: 'DESC', + created_on: 'DESC', + name: 'ASC' + }, // For the SQL query + qry__offset: 0, - recovery_meetings: { - edit_kv: {}, // Used to track which event objects are being edited - edit__event_obj: null, - - qry__enabled: 'enabled', // all, disabled, enabled - qry__hidden: 'not_hidden', // all, hidden, not_hidden - qry__limit: 150, - qry__order_by: 'updated_on', // For the IDB index query; name, updated_on/created_on - qry__order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'}, // For the SQL query - qry__offset: 0, - - qry__fulltext_str: null, - qry__physical: null, - qry__type: null, - qry__virtual: null, - }, + qry__fulltext_str: null, + qry__physical: null, + qry__type: null, + qry__virtual: null + } }; // console.log(`AE Stores - App IDAA Local Storage Data:`, idaa_local_data_struct); @@ -108,118 +105,113 @@ let idaa_local_data_struct: key_val = { // export let ae_loc = writable(idaa_local_data_struct); // This works and uses *local* storage: -export let idaa_loc: Writable = persisted('ae_idaa_loc', idaa_local_data_struct); +export const idaa_loc: Writable = persisted('ae_idaa_loc', idaa_local_data_struct); // console.log(`AE Stores - App Local Storage Data:`, get(ae_loc)); - /* *** BEGIN *** Initialize idaa_session_data_struct */ // Temporary app data. This should be stored to session storage. // Updated 2024-03-06 -let idaa_session_data_struct: key_val = { - ver: ver, - ver_idb: ver_idb, - log_lvl: 1, +const idaa_session_data_struct: key_val = { + ver: ver, + ver_idb: ver_idb, + log_lvl: 1, - archives: { - qry__status: null, - show__modal_edit__archive_id: null, - show__modal_view__archive_id: null, - show__modal_edit__archive_content_id: null, - show__modal_view__archive_content_id: null, - obj_changed: false, // Used to track if the archive object has been changed in the edit view - }, + archives: { + qry__status: null, + show__modal_edit__archive_id: null, + show__modal_view__archive_id: null, + show__modal_edit__archive_content_id: null, + show__modal_view__archive_content_id: null, + obj_changed: false // Used to track if the archive object has been changed in the edit view + }, - bb: { - qry__status: null, + bb: { + qry__status: null, - edit__post_obj: null, + edit__post_obj: null, - show__inline_edit__post_obj: null, - show__modal_edit__post_id: null, - show__modal_view__post_id: null, - obj_changed: false, // Used to track if the post object has been changed in the edit view - // edit_kv: {}, // Used to track which post objects are being edited - }, + show__inline_edit__post_obj: null, + show__modal_edit__post_id: null, + show__modal_view__post_id: null, + obj_changed: false // Used to track if the post object has been changed in the edit view + // edit_kv: {}, // Used to track which post objects are being edited + }, - recovery_meetings: { - qry__status: null, - qry__fulltext_str: null, + recovery_meetings: { + qry__status: null, + qry__fulltext_str: null, - edit__event_obj: null, + edit__event_obj: null, - status_qry__last_request_str: null, + status_qry__last_request_str: null, - show__modal_edit: false, - show__modal_view: false, - show__modal_edit__event_id: null, - show__modal_view__event_id: null, - obj_changed: false, // Used to track if the event object has been changed in the edit view - - attend_platform: null, // 'Zoom', 'Google Meet', 'Microsoft Teams', etc. - }, + show__modal_edit: false, + show__modal_view: false, + show__modal_edit__event_id: null, + show__modal_view__event_id: null, + obj_changed: false, // Used to track if the event object has been changed in the edit view + attend_platform: null // 'Zoom', 'Google Meet', 'Microsoft Teams', etc. + } }; // console.log(`AE Stores - App IDAA Session Storage Data:`, idaa_session_data_struct); -export let idaa_sess = writable(idaa_session_data_struct); - +export const idaa_sess = writable(idaa_session_data_struct); /* *** BEGIN *** Initialize idaa_slct and idaa_trig */ /* The slct and slct_trigger variable should not be stored in local storage. Only use session storage because browser tabs can be open to different idaa, badges, exhibits, etc. */ // Intended for temporary session storage. // Updated 2024-03-06 -let idaa_slct_obj_template: key_val = { - // Top level - 'event_id': null, - 'event_obj': {}, - 'event_obj_li': [], +const idaa_slct_obj_template: key_val = { + // Top level + event_id: null, + event_obj: {}, + event_obj_li: [], - 'archive_id': null, - 'archive_obj': {}, - 'archive_obj_li': [], + archive_id: null, + archive_obj: {}, + archive_obj_li: [], - 'archive_content_id': null, - 'archive_content_obj': {}, - 'archive_content_obj_li': [], + archive_content_id: null, + archive_content_obj: {}, + archive_content_obj_li: [], - 'post_id': null, - 'post_obj': {}, - 'post_obj_li': [], + post_id: null, + post_obj: {}, + post_obj_li: [], - 'post_comment_id': null, - 'post_comment_obj': {}, - 'post_comment_obj_li': [], + post_comment_id: null, + post_comment_obj: {}, + post_comment_obj_li: [] }; // console.log(`AE Stores - Selected IDAA Objects:`, idaa_slct_obj_template); // This works, and uses *session* (not local) storage: -export let idaa_slct = writable(idaa_slct_obj_template); +export const idaa_slct = writable(idaa_slct_obj_template); // This works and uses *local* storage: // export let idaa_slct: Writable = persisted('ae_idaa_slct', idaa_slct_obj_template); - /* *** BEGIN *** Initialize idaa_trig */ // Intended for temporary session storage. // Updated 2024-11-19 -let idaa_trig_template: key_val = { - archive_id: false, - archive_content_li: false, - event_id: false, - post_id: false, +const idaa_trig_template: key_val = { + archive_id: false, + archive_content_li: false, + event_id: false, + post_id: false }; -export let idaa_trig: any = writable(idaa_trig_template); +export const idaa_trig: any = writable(idaa_trig_template); // console.log(`AE IDAA Stores - IDAA Trigger:`, idaa_trig); - /* *** BEGIN *** Initialize idaa_prom */ // Intended for temporary session storage. // Updated 2024-11-19 -let idaa_prom_template: key_val = { - archive_id: false, - archive_content_li: false, - event_id: false, - post_id: false, +const idaa_prom_template: key_val = { + archive_id: false, + archive_content_li: false, + event_id: false, + post_id: false }; -export let idaa_prom: any = writable(idaa_prom_template); +export const idaa_prom: any = writable(idaa_prom_template); // console.log(`AE IDAA Stores - IDAA Trigger:`, idaa_prom); diff --git a/src/lib/stores/ae_stores.ts b/src/lib/stores/ae_stores.ts index bee2b008..20d5d5c6 100644 --- a/src/lib/stores/ae_stores.ts +++ b/src/lib/stores/ae_stores.ts @@ -3,8 +3,21 @@ import { persisted } from 'svelte-persisted-store'; import { readable, writable } from 'svelte/store'; import type { Readable, Writable } from 'svelte/store'; - -import { PUBLIC_TESTING, PUBLIC_AE_API_PROTOCOL, PUBLIC_AE_API_SERVER, PUBLIC_AE_API_BAK_SERVER, PUBLIC_AE_API_PORT, PUBLIC_AE_API_PATH, PUBLIC_AE_API_SECRET_KEY, PUBLIC_AE_API_CRUD_SUPER_KEY, PUBLIC_AE_NO_ACCOUNT_ID, PUBLIC_AE_NO_ACCOUNT_ID_TOKEN, PUBLIC_AE_ACCOUNT_ID, PUBLIC_AE_EVENT_ID, PUBLIC_AE_SPONSORSHIP_CFG_ID } from '$env/static/public'; +import { + PUBLIC_TESTING, + PUBLIC_AE_API_PROTOCOL, + PUBLIC_AE_API_SERVER, + PUBLIC_AE_API_BAK_SERVER, + PUBLIC_AE_API_PORT, + PUBLIC_AE_API_PATH, + PUBLIC_AE_API_SECRET_KEY, + PUBLIC_AE_API_CRUD_SUPER_KEY, + PUBLIC_AE_NO_ACCOUNT_ID, + PUBLIC_AE_NO_ACCOUNT_ID_TOKEN, + PUBLIC_AE_ACCOUNT_ID, + PUBLIC_AE_EVENT_ID, + PUBLIC_AE_SPONSORSHIP_CFG_ID +} from '$env/static/public'; console.log(`AE Stores - PUBLIC_TESTING:`, PUBLIC_TESTING); const api_server_fqdn = PUBLIC_AE_API_SERVER; // 'api.oneskyit.com' @@ -15,7 +28,7 @@ const api_secret_key = PUBLIC_AE_API_SECRET_KEY; const api_crud_super_key = PUBLIC_AE_API_CRUD_SUPER_KEY; // const ae_account_id = PUBLIC_AE_ACCOUNT_ID; -let ae_account_id: null|string = null; +const ae_account_id: null | string = null; const ae_no_account_id = PUBLIC_AE_NO_ACCOUNT_ID; const ae_no_account_id_token = PUBLIC_AE_NO_ACCOUNT_ID_TOKEN; const ae_event_id = PUBLIC_AE_EVENT_ID; @@ -28,18 +41,16 @@ const ae_sponsorship_cfg_id = PUBLIC_AE_SPONSORSHIP_CFG_ID; // console.log(import.meta.env.MODE); // console.log(import.meta.env.BASE_URL); - // Export the key_val type for use in other files. export type key_val = { - [key: string]: any; // variable key - // name: string; + [key: string]: any; // variable key + // name: string; }; // export type key_val = key_val; - // import { html__not_set, classes__events_pres_mgmt_menu } from './ae_string_snippets'; -import {string_snippets} from '$lib/utils/ae_string_snippets'; -export let ae_snip = string_snippets; +import { string_snippets } from '$lib/utils/ae_string_snippets'; +export const ae_snip = string_snippets; // export let ae_snip = // { @@ -48,250 +59,250 @@ export let ae_snip = string_snippets; // }; // Set the version for the app data. Changing this should force a notification and ask the user to clear and reload the page. -let ver = '2025-05-01_1445'; // KEEP: 2025-05-01_1445 -let ver_idb = '2025-05-01_1445'; // Not currently used +const ver = '2025-05-01_1445'; // KEEP: 2025-05-01_1445 +const ver_idb = '2025-05-01_1445'; // Not currently used // *** BEGIN *** Longer-term app data. This should be stored to local storage. const ae_app_local_data_defaults: key_val = { - last_page_reload: null, - // last_idb_reload: null, - // last_cache_refresh: null, // Date.now() - last_cache_refresh: Date.now(), - cache_expired: false, - ver: ver, // ver, // '2025-04-18_1100', - ver_idb: ver_idb, // '2025-04-18_1100', + last_page_reload: null, + // last_idb_reload: null, + // last_cache_refresh: null, // Date.now() + last_cache_refresh: Date.now(), + cache_expired: false, + ver: ver, // ver, // '2025-04-18_1100', + ver_idb: ver_idb, // '2025-04-18_1100', - name: 'Aether - App Hub (SvelteKit 2.x Svelte 4.x)', + name: 'Aether - App Hub (SvelteKit 2.x Svelte 4.x)', - theme: 'light', - theme_mode: 'light', - theme_name: 'nouveau', // wintry - iframe: false, + theme: 'light', + theme_mode: 'light', + theme_name: 'nouveau', // wintry + iframe: false, - // disable_sys_header: false, - // disable_sys_nav: false, - // disable_sys_footer: false, + // disable_sys_header: false, + // disable_sys_nav: false, + // disable_sys_footer: false, - browser_type: null, // Safari needs help with scrolling correctly in iframes. + browser_type: null, // Safari needs help with scrolling correctly in iframes. - title: `OSIT's Æ`, // - Dev SvelteKit`, // Æ + title: `OSIT's Æ`, // - Dev SvelteKit`, // Æ - // debug_menu: false, // Flag show debug menu. - debug_mode: false, // Flag to know if we should be in debug mode and show show debug options. - edit_mode: false, // Flag to know if we should be in edit mode and show edit options. - adv_mode: false, // Flag to know if we should be in advanced mode and show advanced options. - // sys_menu: true, // Flag show system menu. - sync_local_config: true, // Flag to know if we should sync local config with the remote API server. + // debug_menu: false, // Flag show debug menu. + debug_mode: false, // Flag to know if we should be in debug mode and show show debug options. + edit_mode: false, // Flag to know if we should be in edit mode and show edit options. + adv_mode: false, // Flag to know if we should be in advanced mode and show advanced options. + // sys_menu: true, // Flag show system menu. + sync_local_config: true, // Flag to know if we should sync local config with the remote API server. - 'account_id': ae_account_id, // OSIT Demo _XY7DXtc9MY - 'account_code': 'not_set', - 'account_name': 'Account Name Not Set', - 'allow_access': true, // Set to key site key was used, otherwise set to true. - 'site_domain': null, // https://example.com, https://dev.example.com, etc. - 'site_access_key': null, // This is the general site access key - 'site_domain_access_key': null, // This is specific to a (sub)domain. - 'site_cfg_json': { - slct__event_id: null, - slct__event_badge_template_id: null, - slct__sponsorship_cfg_id: null, - header_image_path: null, - }, + account_id: ae_account_id, // OSIT Demo _XY7DXtc9MY + account_code: 'not_set', + account_name: 'Account Name Not Set', + allow_access: true, // Set to key site key was used, otherwise set to true. + site_domain: null, // https://example.com, https://dev.example.com, etc. + site_access_key: null, // This is the general site access key + site_domain_access_key: null, // This is specific to a (sub)domain. + site_cfg_json: { + slct__event_id: null, + slct__event_badge_template_id: null, + slct__sponsorship_cfg_id: null, + header_image_path: null + }, - // The site access codes can be pulled from the site records for an account. - 'site_access_code_kv': { - // 'manager': '10240', - 'administrator': null, - 'trusted': null, - 'public': 'public1980', - 'authenticated': 'auth1980' - }, - // 'manager_passcode': '10240', - // 'administrator_passcode': '11500', - // 'trusted_passcode': '19111', - // 'authenticated_passcode': 'auth2024', + // The site access codes can be pulled from the site records for an account. + site_access_code_kv: { + // 'manager': '10240', + administrator: null, + trusted: null, + public: 'public1980', + authenticated: 'auth1980' + }, + // 'manager_passcode': '10240', + // 'administrator_passcode': '11500', + // 'trusted_passcode': '19111', + // 'authenticated_passcode': 'auth2024', - access_type: 'anonymous', - administrator_access: false, - trusted_access: false, - public_access: false, - authenticated_access: false, - anonymous_access: true, + access_type: 'anonymous', + administrator_access: false, + trusted_access: false, + public_access: false, + authenticated_access: false, + anonymous_access: true, - user_email: null, // Currently used with Sponsorships only? - user_access_type: null, // Used to revert back to the user's access type after quick access (temporarily escalate permissions) turned off. + user_email: null, // Currently used with Sponsorships only? + user_access_type: null, // Used to revert back to the user's access type after quick access (temporarily escalate permissions) turned off. - // Added 2025-04-04 - person_id: null, // The current person_id of the logged-in user (if any) - person: { - // WARNING: We need to add some logic on sign in to only include needed fields. 2025-08-12 - id: null, // The current person_id of the logged-in user - // profile_id: null, // The current person_profile_id of the logged-in user - // pronouns: null, - // informal_name: null, - given_name: null, - // family_name: null, - // professional_title: null, - full_name: null, // convenience - full_name_override: null, // was called display_name + // Added 2025-04-04 + person_id: null, // The current person_id of the logged-in user (if any) + person: { + // WARNING: We need to add some logic on sign in to only include needed fields. 2025-08-12 + id: null, // The current person_id of the logged-in user + // profile_id: null, // The current person_profile_id of the logged-in user + // pronouns: null, + // informal_name: null, + given_name: null, + // family_name: null, + // professional_title: null, + full_name: null, // convenience + full_name_override: null, // was called display_name - // affiliations: null, - primary_email: null, // The primary email of the logged-in person/user - user_id: null, // The user ID of the logged-in user + // affiliations: null, + primary_email: null, // The primary email of the logged-in person/user + user_id: null, // The user ID of the logged-in user - qry_limit__people: 150, + qry_limit__people: 150, - show_content__person_page_help: false, - }, + show_content__person_page_help: false + }, - // Added 2025-04-04 - user_id: null, // The current user_id of the logged-in user (if any) - user: { - id: null, // The current user_id of the logged-in user - username: null, - name: null, - email: null, // The email of the logged-in user - allow_auth_key: null, // For sign in without password - super: false, // Is the user a super user - manager: false, // Is the user a global manager (can manage accounts and users) - administrator: false, // Is the user an account administrator - verified: false, // Is the user verified - public: false, // Is the user a public user (can view public content) - person_id: null, // The person ID of the logged-in user - access_type: null, // The access type of the logged-in user + // Added 2025-04-04 + user_id: null, // The current user_id of the logged-in user (if any) + user: { + id: null, // The current user_id of the logged-in user + username: null, + name: null, + email: null, // The email of the logged-in user + allow_auth_key: null, // For sign in without password + super: false, // Is the user a super user + manager: false, // Is the user a global manager (can manage accounts and users) + administrator: false, // Is the user an account administrator + verified: false, // Is the user verified + public: false, // Is the user a public user (can view public content) + person_id: null, // The person ID of the logged-in user + access_type: null, // The access type of the logged-in user - qry_limit__users: 100, - }, + qry_limit__users: 100 + }, - 'qry__enabled': 'enabled', // all, disabled, enabled - 'qry__hidden': 'not_hidden', // all, hidden, not_hidden - 'qry__limit': 20, - 'qry__offset': 0, + qry__enabled: 'enabled', // all, disabled, enabled + qry__hidden: 'not_hidden', // all, hidden, not_hidden + qry__limit: 20, + qry__offset: 0, - qr_scanner_version: 'one', + qr_scanner_version: 'one', - 'admin': { - show_element__sql_qry: false, - show_element__sql_qry_results: false, - }, + admin: { + show_element__sql_qry: false, + show_element__sql_qry_results: false + }, - sys_menu: { - hide: false, - expand: false, - hide_access_type: false, - expand_access_type: false, - hide_edit_mode: false, - expand_edit_mode: false, - hide_user: false, - expand_user: false, - hide_theme: false, - expand_theme: false, - hide_app_cfg: false, - expand_app_cfg: false, - }, - debug_menu: { - hide: false, - expand: false, - // hide_quick_info: true - }, + sys_menu: { + hide: false, + expand: false, + hide_access_type: false, + expand_access_type: false, + hide_edit_mode: false, + expand_edit_mode: false, + hide_user: false, + expand_user: false, + hide_theme: false, + expand_theme: false, + hide_app_cfg: false, + expand_app_cfg: false + }, + debug_menu: { + hide: false, + expand: false + // hide_quick_info: true + }, - app_cfg: { - show_element__header: false, - show_element__footer: false, - show_element__menu: false, - show_element__menu_btn: true, + app_cfg: { + show_element__header: false, + show_element__footer: false, + show_element__menu: false, + show_element__menu_btn: true, - show_element__access_type: true, - show_element__passcode_input: true, - show_element__cfg: true, - show_element__cfg_detail: false, - show_element__sign_in_out: true, // Show the sign-in/out button in the UI - show_opt__debug: true, - show_opt__permissions: true, - show_opt__reset: true, - show_opt__sync: true, - show_opt__theme: true, - show_opt__utilities: true, - }, + show_element__access_type: true, + show_element__passcode_input: true, + show_element__cfg: true, + show_element__cfg_detail: false, + show_element__sign_in_out: true, // Show the sign-in/out button in the UI + show_opt__debug: true, + show_opt__permissions: true, + show_opt__reset: true, + show_opt__sync: true, + show_opt__theme: true, + show_opt__utilities: true + }, - files: { - processed_file_kv: {}, - uploaded_file_kv: {}, - video_clip_file_kv: {}, - add_to_use_files_method: 'upload', // upload, select - }, + files: { + processed_file_kv: {}, + uploaded_file_kv: {}, + video_clip_file_kv: {}, + add_to_use_files_method: 'upload' // upload, select + }, - 'ds': {}, - 'hub': { - 'show_element__cfg': true, - 'show_element__cfg_detail': false, - 'show_element__access_type': true, - 'theme_mode': 'light', - 'theme_name': 'wintry', // wintry + ds: {}, + hub: { + show_element__cfg: true, + show_element__cfg_detail: false, + show_element__access_type: true, + theme_mode: 'light', + theme_name: 'wintry', // wintry - 'classes__form': 'border border-surface-200 p-4 space-y-4 rounded-container', + classes__form: 'border border-surface-200 p-4 space-y-4 rounded-container', - 'qr': {}, - }, - 'mod': { - 'archives': {}, + qr: {} + }, + mod: { + archives: {}, - 'events': { - 'event_id': null, + events: { + event_id: null, - show_edit__event_presenter_obj: false, - show_list__event_presenter_obj_li: true, - show_view__event_presenter_obj: false, + show_edit__event_presenter_obj: false, + show_list__event_presenter_obj_li: true, + show_view__event_presenter_obj: false, - submit_status: null, // 'saving', 'created', 'updated' + submit_status: null, // 'saving', 'created', 'updated' - // Badge Printing + // Badge Printing - // Lead Retrievals + // Lead Retrievals - // Presentation Management + // Presentation Management - // Speakers Management - 'default_session_id': null, // Assign to presenters by default + // Speakers Management + default_session_id: null // Assign to presenters by default - // other - }, + // other + }, - 'journals': {}, + journals: {}, - 'posts': {}, + posts: {}, - 'sponsorships': { - 'cfg_id': ae_sponsorship_cfg_id, + sponsorships: { + cfg_id: ae_sponsorship_cfg_id, - for_type: null, - for_id: null, + for_type: null, + for_id: null, - level_guest_max_li: { - 0: 0, - 1: 4, // CHOW 2024 - Friend - 2: 8, // CHOW 2024 - Supporter - 3: 8, // CHOW 2024 - Advocate - 4: 8, // CHOW 2024 - Champion - 5: 8, // CHOW 2024 - Presenting Partner - 6: 16, // CHOW 2024 - Signature Partner - 7: 16, // CHOW 2024 - Premier Partner - }, + level_guest_max_li: { + 0: 0, + 1: 4, // CHOW 2024 - Friend + 2: 8, // CHOW 2024 - Supporter + 3: 8, // CHOW 2024 - Advocate + 4: 8, // CHOW 2024 - Champion + 5: 8, // CHOW 2024 - Presenting Partner + 6: 16, // CHOW 2024 - Signature Partner + 7: 16 // CHOW 2024 - Premier Partner + }, - show_edit__sponsorship_obj: false, - show_list__sponsorship_obj_li: true, - show_view__sponsorship_obj: false, + show_edit__sponsorship_obj: false, + show_list__sponsorship_obj_li: true, + show_view__sponsorship_obj: false, - show_question__accommodations: false, + show_question__accommodations: false, - submit_status: null, // 'saving', 'created', 'updated' - }, + submit_status: null // 'saving', 'created', 'updated' + } - // testing: {}, - }, + // testing: {}, + } - // testing: true, - // ver_testing: true, -} + // testing: true, + // ver_testing: true, +}; // let ae_app_local_data_struct: key_val = { // ...ae_app_local_data_defaults, @@ -331,205 +342,194 @@ const ae_app_local_data_defaults: key_val = { // export let ae_loc = writable(ae_app_local_data_struct); // This works and uses local storage: -export let ae_loc: Writable = persisted('ae_loc', ae_app_local_data_defaults); +export const ae_loc: Writable = persisted('ae_loc', ae_app_local_data_defaults); // console.log(`AE Stores - App Local Storage Data:`, get(ae_loc)); - // *** BEGIN *** Temporary app data. This should be stored to session storage. -let ae_app_session_data_defaults: key_val = { - // ver: '2025-04-18_1335', // ver, // '2025-04-18_1100', - ver: ver, - ver_idb: ver_idb, - log_lvl: 0, +const ae_app_session_data_defaults: key_val = { + // ver: '2025-04-18_1335', // ver, // '2025-04-18_1100', + ver: ver, + ver_idb: ver_idb, + log_lvl: 0, - disable_sys_header: false, - disable_sys_nav: false, - disable_sys_footer: false, + disable_sys_header: false, + disable_sys_nav: false, + disable_sys_footer: false, - sys_menu: { - expand: false, - focus_passcode_input: false, - }, + sys_menu: { + expand: false, + focus_passcode_input: false + }, - debug_menu: { - hide_quick_info: true - }, + debug_menu: { + hide_quick_info: true + }, - app_cfg: { - show_element__passcode_input: true, - }, + app_cfg: { + show_element__passcode_input: true + }, - 'ds': { - 'submit_status': null, - }, - 'ds_loaded': { - }, + ds: { + submit_status: null + }, + ds_loaded: {}, - 'files': { - disable_submit__hosted_file_obj: false, - processed_file_kv: {}, - uploaded_file_kv: {}, - video_clip_file_kv: {}, - processed_file_list: [], - // uploaded_file_list: [], - video_clip_file_list: [], - submit_status: null, // 'saving', 'created', 'updated', 'saved' - clip_complete: null, - }, + files: { + disable_submit__hosted_file_obj: false, + processed_file_kv: {}, + uploaded_file_kv: {}, + video_clip_file_kv: {}, + processed_file_list: [], + // uploaded_file_list: [], + video_clip_file_list: [], + submit_status: null, // 'saving', 'created', 'updated', 'saved' + clip_complete: null + }, - 'hub': { - 'show_xyz': null, - 'account_id_qry_status': null, - 'event_badge_id_status_qry__search': null, - 'event_presenter_id_qry_status': null, - 'site_domain_id_qry_status': null, - 'sponsorship_id_qry_status': null, - 'sponsorship_cfg_id_qry_status': null, + hub: { + show_xyz: null, + account_id_qry_status: null, + event_badge_id_status_qry__search: null, + event_presenter_id_qry_status: null, + site_domain_id_qry_status: null, + sponsorship_id_qry_status: null, + sponsorship_cfg_id_qry_status: null, - 'qr': {}, - }, - 'mod': { - 'archives': {}, - 'events': { - // Badge Printing + qr: {} + }, + mod: { + archives: {}, + events: { + // Badge Printing + // Lead Retrievals + // Presentation Management + // Speakers Management + // other + }, + journals: {}, + posts: {}, + sponsorships: { + disable_submit__sponsorship_obj: false, + slct__level_num: 0, + show_question__accommodations: false, + submit_status: null // 'saving', 'created', 'updated', 'saved' + }, + testing: {} + }, - // Lead Retrievals + person: { + show_report__person_li: false, - // Presentation Management + qry_limit__people: 100 + }, - // Speakers Management + show__modal_change_password: false, - // other - }, - 'journals': {}, - 'posts': {}, - 'sponsorships': { - disable_submit__sponsorship_obj: false, - slct__level_num: 0, - show_question__accommodations: false, - submit_status: null, // 'saving', 'created', 'updated', 'saved' - }, - 'testing': {}, - }, + download: {}, + // For API download and upload progress status per file. + api_download_kv: {}, + // Example: {example_file_id: {status: 'downloading', endpoint: '/event/file/abc123/download', filename: 'example_file_name.ext', size_total: 0, size_loaded: 0, percent_completed: 0}} + api_upload_kv: {}, // {example_temp_id: {status: 'uploading', endpoint: '/event/file/abc123/upload', filename: 'example_file_name.ext', size_total: 0, size_loaded: 0, percent_completed: 0}} - 'person': { - show_report__person_li: false, - - qry_limit__people: 100, - }, - - show__modal_change_password: false, - - - 'download': {}, - // For API download and upload progress status per file. - 'api_download_kv': {}, - // Example: {example_file_id: {status: 'downloading', endpoint: '/event/file/abc123/download', filename: 'example_file_name.ext', size_total: 0, size_loaded: 0, percent_completed: 0}} - 'api_upload_kv': {}, // {example_temp_id: {status: 'uploading', endpoint: '/event/file/abc123/upload', filename: 'example_file_name.ext', size_total: 0, size_loaded: 0, percent_completed: 0}} - - test: true, + test: true }; // console.log(`AE Stores - App Session Storage Data:`, ae_app_session_data_defaults); -export let ae_sess = writable(ae_app_session_data_defaults); - +export const ae_sess = writable(ae_app_session_data_defaults); // *** BEGIN *** Temporary API data. This should be stored to session storage. -export let ae_api_data_struct: key_val = { - 'ver': '2024-08-11_11', - 'fqdn': api_server_fqdn, - 'base_url': api_base_url, - 'base_url_bak': api_base_url_bak, - 'api_secret_key': api_secret_key, // 'YOUR_API_SECRET_KEY', - 'api_secret_key_bak': api_secret_key, // 'YOUR_API_SECRET_KEY', - 'api_crud_super_key': api_crud_super_key, // 'YOUR_SUPER_KEY' 'zp5PtX4zUsI' - 'headers': {}, - 'account_id': ae_account_id, +export const ae_api_data_struct: key_val = { + ver: '2024-08-11_11', + fqdn: api_server_fqdn, + base_url: api_base_url, + base_url_bak: api_base_url_bak, + api_secret_key: api_secret_key, // 'YOUR_API_SECRET_KEY', + api_secret_key_bak: api_secret_key, // 'YOUR_API_SECRET_KEY', + api_crud_super_key: api_crud_super_key, // 'YOUR_SUPER_KEY' 'zp5PtX4zUsI' + headers: {}, + account_id: ae_account_id }; -let ae_api_headers: key_val = {}; +const ae_api_headers: key_val = {}; ae_api_headers['Access-Control-Allow-Origin'] = '*'; ae_api_headers['Content-Yype'] = 'application/json'; ae_api_headers['x-aether-api-key'] = ae_api_data_struct.api_secret_key; ae_api_headers['x-aether-api-token'] = 'fake-temp-token'; ae_api_headers['x-aether-api-expire-on'] = ''; if (ae_account_id) { - ae_api_headers['x-account-id'] = ae_account_id; + ae_api_headers['x-account-id'] = ae_account_id; } else { - // ae_api_headers['x-account-id'] = ; + // ae_api_headers['x-account-id'] = ; } if (ae_no_account_id) { - ae_api_headers['x-no-account-id'] = ae_no_account_id; + ae_api_headers['x-no-account-id'] = ae_no_account_id; } ae_api_data_struct['headers'] = ae_api_headers; // console.log(`AE Stores - API Data:`, ae_api_data_struct); -export let ae_api = writable(ae_api_data_struct); +export const ae_api = writable(ae_api_data_struct); // *** BEGIN *** Trigger to update the slct variables and other things. -let ae_trig_template: key_val = {}; -export let ae_trig = writable(ae_trig_template); - +const ae_trig_template: key_val = {}; +export const ae_trig = writable(ae_trig_template); /* *** BEGIN *** Initialize slct and slct_trigger */ /* The slct and slct_trigger variable should not be stored in local storage. Only use session storage because browser tabs can be open to different accounts, events, sponsorships, etc. */ // Intended for temporary session storage. // Updated 2024-03-15 -let slct_obj_template: key_val = { - 'account_id': ae_account_id, - 'account_obj': {}, - 'event_id': null, - 'event_obj': {}, - 'event_obj_li': [], - // 'event_exhibit_id': null, - // 'event_exhibit_obj': {}, - // 'event_exhibit_obj_li': [], - 'event_presentation_id': null, - 'event_presentation_obj': {}, - 'event_presentation_obj_li': [], - 'event_presenter_id': null, - 'event_presenter_obj': {}, - 'event_presenter_obj_li': [], - 'event_session_id': null, - 'event_session_obj': {}, - 'event_session_obj_li': [], - 'sponsorship_id': null, - 'sponsorship_obj': {}, - 'sponsorship_obj_li': [], - 'sponsorship_cfg_id': ae_sponsorship_cfg_id, - 'sponsorship_cfg_obj': {}, - 'sponsorship_cfg_obj_li': [], - 'post_id': null, - 'post_obj': {}, - 'post_obj_li': [], - 'post_comment_id': null, - 'post_comment_obj': {}, - 'post_comment_obj_li': [] +const slct_obj_template: key_val = { + account_id: ae_account_id, + account_obj: {}, + event_id: null, + event_obj: {}, + event_obj_li: [], + // 'event_exhibit_id': null, + // 'event_exhibit_obj': {}, + // 'event_exhibit_obj_li': [], + event_presentation_id: null, + event_presentation_obj: {}, + event_presentation_obj_li: [], + event_presenter_id: null, + event_presenter_obj: {}, + event_presenter_obj_li: [], + event_session_id: null, + event_session_obj: {}, + event_session_obj_li: [], + sponsorship_id: null, + sponsorship_obj: {}, + sponsorship_obj_li: [], + sponsorship_cfg_id: ae_sponsorship_cfg_id, + sponsorship_cfg_obj: {}, + sponsorship_cfg_obj_li: [], + post_id: null, + post_obj: {}, + post_obj_li: [], + post_comment_id: null, + post_comment_obj: {}, + post_comment_obj_li: [] }; // console.log(`AE Stores - Selected Objects:`, slct_obj_template); // This works, and uses *session* (not local) storage: -export let slct = writable(slct_obj_template); +export const slct = writable(slct_obj_template); // This works and uses *local* storage: // export let slct: Writable = persisted('ae_slct', slct_obj_template); - /* *** BEGIN *** Initialize slct_trigger */ // Intended for temporary session storage. // Updated 2024-02-27 -export let slct_trigger: any = writable(null); +export const slct_trigger: any = writable(null); // console.log(`AE Stores - Selected Trigger:`, slct_trigger); - /* *** BEGIN *** Create time variable */ // Updated 2020 export const time = readable(new Date(), function start(set) { - const interval = setInterval(() => { - set(new Date()); - }, 1000); + const interval = setInterval(() => { + set(new Date()); + }, 1000); - return function stop() { - clearInterval(interval); - }; + return function stop() { + clearInterval(interval); + }; }); diff --git a/src/lib/utils/ae_string_snippets.ts b/src/lib/utils/ae_string_snippets.ts index 53050816..5f8550bd 100644 --- a/src/lib/utils/ae_string_snippets.ts +++ b/src/lib/utils/ae_string_snippets.ts @@ -1,6 +1,6 @@ // These are shared snippets of text, This is mostly HTML and CSS. -export let string_snippets: any = {}; +export const string_snippets: any = {}; string_snippets['html__not_set'] = ` `; -string_snippets['classes__core_menu'] = 'flex flex-col items-center space-y-1 border border-blue-200 rounded-md py-1 px-2 hover:bg-blue-100'; +string_snippets['classes__core_menu'] = + 'flex flex-col items-center space-y-1 border border-blue-200 rounded-md py-1 px-2 hover:bg-blue-100'; -string_snippets['classes__core_menu__button'] = 'btn btn-sm mx-1 preset-tonal-tertiary text-info-300 hover:text-info-800'; -string_snippets['classes__core_menu__button_highlight'] = 'btn btn-sm mx-1 preset-filled-tertiary-500 text-info-300 hover:text-info-800'; -string_snippets['classes__core_menu__button_warning'] = 'btn btn-sm mx-1 preset-tonal-warning text-info-300 hover:text-info-800'; +string_snippets['classes__core_menu__button'] = + 'btn btn-sm mx-1 preset-tonal-tertiary text-info-300 hover:text-info-800'; +string_snippets['classes__core_menu__button_highlight'] = + 'btn btn-sm mx-1 preset-filled-tertiary-500 text-info-300 hover:text-info-800'; +string_snippets['classes__core_menu__button_warning'] = + 'btn btn-sm mx-1 preset-tonal-warning text-info-300 hover:text-info-800'; // string_snippets['classes__events_pres_mgmt_menu'] = 'flex flex-col items-center space-y-1 border border-blue-200 rounded-md py-1 px-2 hover:bg-blue-100 transition-all duration-700 hover:duration-300'; -string_snippets['classes__events_pres_mgmt_menu'] = 'w-full flex flex-col items-center gap-1 border border-gray-200 rounded-md p-1 hover:bg-gray-100 transition-all duration-700 hover:duration-300'; +string_snippets['classes__events_pres_mgmt_menu'] = + 'w-full flex flex-col items-center gap-1 border border-gray-200 rounded-md p-1 hover:bg-gray-100 transition-all duration-700 hover:duration-300'; -string_snippets['classes__events_pres_mgmt_menu__button'] = 'btn btn-sm mx-1 preset-tonal-secondary hover:preset-filled-secondary-500'; -string_snippets['classes__events_pres_mgmt_menu__button_special'] = 'btn btn-sm mx-1 hover:preset-filled-primary-500'; +string_snippets['classes__events_pres_mgmt_menu__button'] = + 'btn btn-sm mx-1 preset-tonal-secondary hover:preset-filled-secondary-500'; +string_snippets['classes__events_pres_mgmt_menu__button_special'] = + 'btn btn-sm mx-1 hover:preset-filled-primary-500'; // string_snippets['classes__events_pres_mgmt_menu__button'] = 'btn btn-sm mx-1 variant-soft-tertiary text-info-300 hover:text-info-800 hover:variant-filled-tertiary'; // string_snippets['classes__events_pres_mgmt_menu__button_special'] = 'btn btn-sm mx-1 variant-ghost-tertiary text-info-300 hover:text-info-800 hover:variant-filled-tertiary'; -string_snippets['classes__events_pres_mgmt_menu__button_highlight'] = 'btn btn-sm mx-1 preset-filled-tertiary-500 text-info-300 hover:text-info-800'; -string_snippets['classes__events_pres_mgmt_menu__button_warning'] = 'btn btn-sm mx-1 preset-tonal-warning text-info-300 hover:text-info-800'; -string_snippets['classes__events_pres_mgmt_menu__button_warning_special'] = 'btn btn-sm mx-1 preset-tonal-warning'; +string_snippets['classes__events_pres_mgmt_menu__button_highlight'] = + 'btn btn-sm mx-1 preset-filled-tertiary-500 text-info-300 hover:text-info-800'; +string_snippets['classes__events_pres_mgmt_menu__button_warning'] = + 'btn btn-sm mx-1 preset-tonal-warning text-info-300 hover:text-info-800'; +string_snippets['classes__events_pres_mgmt_menu__button_warning_special'] = + 'btn btn-sm mx-1 preset-tonal-warning'; - - -// export string_snippets; \ No newline at end of file +// export string_snippets; diff --git a/src/lib/utils/utils.ts b/src/lib/utils/utils.ts index ac680b30..256f86ff 100644 --- a/src/lib/utils/utils.ts +++ b/src/lib/utils/utils.ts @@ -1,5 +1,5 @@ -import { type ClassValue, clsx } from "clsx"; -import { twMerge } from "tailwind-merge"; +import { type ClassValue, clsx } from 'clsx'; +import { twMerge } from 'tailwind-merge'; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); diff --git a/src/parent_iframe.html b/src/parent_iframe.html index 406dfe79..5a2e4697 100644 --- a/src/parent_iframe.html +++ b/src/parent_iframe.html @@ -1,128 +1,137 @@ -

+

+ +

diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index cdf91900..8fc244a1 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,705 +1,773 @@ - - + + {#if $ae_loc?.site_google_tracking_id && $ae_loc?.site_google_tracking_id.length > 0} - + {/if} @@ -707,8 +775,8 @@ $effect(() => {
{ z-40 transition-all " - > - - - - -
{ transition-all " - > + > +
+ + App Loading + +
-
- - App Loading - -
+
+ -
- - - -
+ title="Close Quick Info" + > + + + Close Quick Info + +
-
- + title="Reload and clear the page cache" + onclick={() => { + clear_idb(); + window.location.reload(true); + }} + > + + + Quick Page Reload + + + + - + title="Reload and clear the page cache" + > + + + Clear Cache and Reload + - -
- - - - - - - - - - - - - - - - - - - - -
KeyValue
Datetime ={new Date().toISOString()}
URL ={data.url.href}
Browser{navigator.userAgent}
account_id ={$slct.account_id}
iframe ={$ae_loc?.iframe}
access_type ={$ae_loc?.access_type}
person_id ={$ae_loc?.person_id}
full_name ={$ae_loc?.person?.full_name}
user_id ={$ae_loc?.user_id}
username{$ae_loc?.user?.username}
email ={$ae_loc?.user?.email}
- -
+ > +
+ + + + + + + + + + + + + + + + + +
KeyValue
Datetime ={new Date().toISOString()}
URL ={data.url.href}
Browser{navigator.userAgent}
account_id ={$slct.account_id}
iframe ={$ae_loc?.iframe}
access_type ={$ae_loc?.access_type}
person_id ={$ae_loc?.person_id}
full_name ={$ae_loc?.person?.full_name}
user_id ={$ae_loc?.user_id}
username{$ae_loc?.user?.username}
email ={$ae_loc?.user?.email}
+ -{#if (browser && flag_new_ver)} -
-

New Version Available

-

A new version of the site is available. Please use the Clear Cache and Reload button below to update.

+{#if browser && flag_new_ver} +
+

+ New Version Available +

+

+ A new version of the site is available. Please use the Clear Cache and Reload button below to + update. +

- + window.location.reload(); + }} + class="btn btn-lg m-1 preset-tonal-error border border-error-500 hover:preset-filled-success-500 text-error-1000 hover:text-error-800 transition-all text-wrap" + title="Reload and clear the page cache to update" + > + + + + Clear Cache and
Reload to Update +
+ - -
-

If you have tried the "Clear Cache and Reload" button, you may need to manually reload the page using your browser's reload button or by pressing Ctrl + R or Cmd + R.

-

This sometimes happens with new versions of the app or when in an iframe.

-
+ +
+

+ If you have tried the "Clear Cache and Reload" button, you may need to manually reload the + page using your browser's reload button or by pressing Ctrl + R or + Cmd + + R. +

+

This sometimes happens with new versions of the app or when in an iframe.

+
-
- Æther: - {$ae_loc?.ver} {$ae_sess?.ver} -
+
+ Æther: + {$ae_loc?.ver} {$ae_sess?.ver} +
- -
+ > + + + Reload + +
{:else if browser && $ae_loc?.cache_expired} -
-

Expired Cache

-

The cache for this site has expired. Please reload the page. You may need to sign in again.

+
+

Expired Cache

+

+ The cache for this site has expired. Please reload the page. You may need to sign in again. +

- + window.location.reload(); + }} + class="btn btn-lg m-1 preset-tonal-warning border border-warning-500 hover:preset-filled-success-500 text-error-1000 hover:text-error-800 transition-all text-wrap" + title="Reload and clear the page cache" + > + + + Clear Cache and Reload + - -
-

If you have tried the "Clear Cache and Reload" button, you may need to manually reload the page using your browser's reload button or by pressing Ctrl + R or Cmd + R.

-

This sometimes happens with new versions of the app or when in an iframe.

-
+ +
+

+ If you have tried the "Clear Cache and Reload" button, you may need to manually reload the + page using your browser's reload button or by pressing Ctrl + R or + Cmd + + R. +

+

This sometimes happens with new versions of the app or when in an iframe.

+
-
-
- Expired: - {Math.floor((Date.now() - $ae_loc.last_cache_refresh) / 60000)} minutes ago +
+
+ Expired: + + {Math.floor((Date.now() - $ae_loc.last_cache_refresh) / 60000)} minutes ago - - (max age: {Math.floor(default_refresh_time / 60000)} minutes) - -
-
- Last Refresh: - {new Date($ae_loc.last_cache_refresh).toLocaleString()} -
-
- Access Level: - {$ae_loc.access_level ?? '-- not set --'} -
-
- Username: - {$ae_loc.user?.username ?? '-- not set --'} -
-
- - -
+ + (max age: {Math.floor(default_refresh_time / 60000)} minutes) + +
+
+ Last Refresh: + {new Date($ae_loc.last_cache_refresh).toLocaleString()} +
+
+ Access Level: + {$ae_loc.access_level ?? '-- not set --'} +
+
+ Username: + {$ae_loc.user?.username ?? '-- not set --'} +
+
+ +
{:else if browser && !$ae_loc?.allow_access} - - -
-

Access Denied

-

You do not have access to this site. You may need a passcode, sign in link, and or URL site key.

- + + +
+

Access Denied

+

+ You do not have access to this site. You may need a passcode, + sign in link, and or URL site key. +

+ -
- -
- Access Level: - {$ae_loc.access_level ?? '-- not set --'} -
+
+ +
+ Access Level: + {$ae_loc.access_level ?? '-- not set --'} +
- -
- Username: - {$ae_loc.user?.username ?? '-- not set --'} -
-
+ +
+ Username: + {$ae_loc.user?.username ?? '-- not set --'} +
+
- + - + window.location.reload(); + }} + class="btn btn-sm m-1 preset-tonal-secondary hover:preset-tonal-warning border border-warning-500 hover:variant-outline-warning text-error-700 hover:text-error-900 transition-all text-wrap" + title="Reload and clear the page cache" + > + + + Clear Cache and Reload + - -
-

If you have tried the "Clear Cache and Reload" button, you may need to manually reload the page using your browser's reload button or by pressing Ctrl + R or Cmd + R.

-

This sometimes happens with new versions of the app or when in an iframe.

-
- - -
- -{:else if (browser && $ae_loc?.allow_access)} - - - - - {@render children?.()} - -{:else if (browser || flag_reload)} - -
-
- - Page data is loading... -
-
+ +
+

+ If you have tried the "Clear Cache and Reload" button, you may need to manually reload the + page using your browser's reload button or by pressing Ctrl + R or + Cmd + + R. +

+

This sometimes happens with new versions of the app or when in an iframe.

+
+
+{:else if browser && $ae_loc?.allow_access} + + + {@render children?.()} +{:else if browser || flag_reload} +
+
+ + Page data is loading... +
+
{/if} +{#if browser} + + {#if !$ae_loc?.iframe || $ae_loc?.trusted_access} + -{#if (browser) } - - - {#if !$ae_loc?.iframe || $ae_loc?.trusted_access} - - - - - {:else} - - {/if} - + + + {:else} + + {/if} {:else} - {/if} - diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index c675f5d4..30e5698c 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -8,7 +8,17 @@ import { error } from '@sveltejs/kit'; import { add_url_params, clean_headers } from '$lib/ae_core/core__api_helpers'; import type { key_val } from '$lib/stores/ae_stores'; -import { PUBLIC_AE_API_PROTOCOL, PUBLIC_AE_API_SERVER, PUBLIC_AE_API_BAK_SERVER, PUBLIC_AE_API_PORT, PUBLIC_AE_API_PATH, PUBLIC_AE_API_SECRET_KEY, PUBLIC_AE_API_CRUD_SUPER_KEY, PUBLIC_AE_NO_ACCOUNT_ID, PUBLIC_AE_NO_ACCOUNT_ID_TOKEN } from '$env/static/public'; +import { + PUBLIC_AE_API_PROTOCOL, + PUBLIC_AE_API_SERVER, + PUBLIC_AE_API_BAK_SERVER, + PUBLIC_AE_API_PORT, + PUBLIC_AE_API_PATH, + PUBLIC_AE_API_SECRET_KEY, + PUBLIC_AE_API_CRUD_SUPER_KEY, + PUBLIC_AE_NO_ACCOUNT_ID, + PUBLIC_AE_NO_ACCOUNT_ID_TOKEN +} from '$env/static/public'; const api_base_url = `${PUBLIC_AE_API_PROTOCOL}://${PUBLIC_AE_API_SERVER}:${PUBLIC_AE_API_PORT}${PUBLIC_AE_API_PATH}`; const api_base_url_bak = `${PUBLIC_AE_API_PROTOCOL}://${PUBLIC_AE_API_BAK_SERVER}:${PUBLIC_AE_API_PORT}${PUBLIC_AE_API_PATH}`; @@ -16,293 +26,297 @@ const api_base_url_bak = `${PUBLIC_AE_API_PROTOCOL}://${PUBLIC_AE_API_BAK_SERVER const api_secret_key = PUBLIC_AE_API_SECRET_KEY; const api_crud_super_key = PUBLIC_AE_API_CRUD_SUPER_KEY; -let ae_account_id: null|string = null; +const ae_account_id: null | string = null; const ae_no_account_id = PUBLIC_AE_NO_ACCOUNT_ID; const ae_no_account_id_token = PUBLIC_AE_NO_ACCOUNT_ID_TOKEN; -let ae_api_init: key_val = { - 'ver': '2024-08-11_11', - 'base_url': api_base_url, - 'base_url_bak': api_base_url_bak, - 'api_secret_key': api_secret_key, // 'YOUR_API_SECRET_KEY', - 'api_secret_key_bak': api_secret_key, // 'YOUR_API_SECRET_KEY', - 'api_crud_super_key': api_crud_super_key, // 'YOUR_SUPER_KEY' 'zp5PtX4zUsI' - 'headers': {}, - 'account_id': ae_account_id, +const ae_api_init: key_val = { + ver: '2024-08-11_11', + base_url: api_base_url, + base_url_bak: api_base_url_bak, + api_secret_key: api_secret_key, // 'YOUR_API_SECRET_KEY', + api_secret_key_bak: api_secret_key, // 'YOUR_API_SECRET_KEY', + api_crud_super_key: api_crud_super_key, // 'YOUR_SUPER_KEY' 'zp5PtX4zUsI' + headers: {}, + account_id: ae_account_id }; -let ae_api_headers: key_val = {}; +const ae_api_headers: key_val = {}; ae_api_headers['Access-Control-Allow-Origin'] = '*'; ae_api_headers['Content-Type'] = 'application/json'; ae_api_headers['x-aether-api-key'] = ae_api_init.api_secret_key; ae_api_headers['x-aether-api-token'] = 'fake-temp-token'; ae_api_headers['x-aether-api-expire-on'] = ''; if (ae_account_id) { - ae_api_headers['x-account-id'] = ae_account_id; + ae_api_headers['x-account-id'] = ae_account_id; } else { - // ae_api_headers['x-account-id'] = ; + // ae_api_headers['x-account-id'] = ; } if (ae_no_account_id) { - ae_api_headers['x-no-account-id'] = ae_no_account_id; + ae_api_headers['x-no-account-id'] = ae_no_account_id; } ae_api_init['headers'] = ae_api_headers; -let ae_loc_init: key_val = { -}; +const ae_loc_init: key_val = {}; // export const prerender = false; // There is not an initial data store from SvelteKit for this, so we will just use the API to get the data. // properties: params, route, url // functions: fetch, setHeaders, parent, depends, untrack -export async function load({ fetch, params, parent, route, url }) { // params, route, url - let log_lvl: number = 0; - // console.log(`Svelte root +layout.ts params:`, params); - // console.log(`Svelte root +layout.ts route:`, route); - // console.log(`Svelte root +layout.ts url:`, url); +export async function load({ fetch, params, parent, route, url }) { + // params, route, url + const log_lvl: number = 0; + // console.log(`Svelte root +layout.ts params:`, params); + // console.log(`Svelte root +layout.ts route:`, route); + // console.log(`Svelte root +layout.ts url:`, url); - let account_id: any; // Promise; + let account_id: any; // Promise; - let ae_acct: key_val = { - api: ae_api_init, - ds: {}, - loc: { - 'account_id': '', - 'site_id': '', - 'site_domain_id': '', - 'iframe': false, - }, - sess: {}, - slct: {}, - } + const ae_acct: key_val = { + api: ae_api_init, + ds: {}, + loc: { + account_id: '', + site_id: '', + site_domain_id: '', + iframe: false + }, + sess: {}, + slct: {} + }; - // let ae_loc_tmp = get(ae_loc); - // console.log(`ae_loc = `, ae_loc_tmp); + // let ae_loc_tmp = get(ae_loc); + // console.log(`ae_loc = `, ae_loc_tmp); - // let ae_api_tmp = get(ae_api); - // console.log(`ae_api = `, ae_api_tmp); + // let ae_api_tmp = get(ae_api); + // console.log(`ae_api = `, ae_api_tmp); - let ds_code_li: null|key_val = {}; - // if (ae_loc_tmp && ae_loc_tmp.ds) { - // ds_code_li = ae_loc_tmp.ds; - // } - // console.log(`ae_ ds_code_li = `, ds_code_li); - let ds_code: null|string = null; + const ds_code_li: null | key_val = {}; + // if (ae_loc_tmp && ae_loc_tmp.ds) { + // ds_code_li = ae_loc_tmp.ds; + // } + // console.log(`ae_ ds_code_li = `, ds_code_li); + const ds_code: null | string = null; - let data_struct: key_val = { - // ae_acct should only be updated and referenced by the corresponding account_id. - account_id: null, - ae_acct: { - // '_XY7DXtc9MY': ae_acct, - }, + const data_struct: key_val = { + // ae_acct should only be updated and referenced by the corresponding account_id. + account_id: null, + ae_acct: { + // '_XY7DXtc9MY': ae_acct, + }, - ae_loc: {}, - ae_api: ae_api_init, - ae_ds: {}, - ae_hub: {}, // was ae_core - ae_m_sponsorships: {}, - ae_m_events: {}, - ae_m_events_speakers: {}, - ae_slct: {}, + ae_loc: {}, + ae_api: ae_api_init, + ae_ds: {}, + ae_hub: {}, // was ae_core + ae_m_sponsorships: {}, + ae_m_events: {}, + ae_m_events_speakers: {}, + ae_slct: {}, - iframe: false, + iframe: false, - ae_root_layout_ts: true, + ae_root_layout_ts: true, - params: params, - route: route, - url: url, + params: params, + route: route, + url: url, - // Not really used yet - sections: [ + // Not really used yet + sections: [ { slug: 'new', title: 'New Test' }, { slug: 'manage', title: 'Manage Test' }, - { slug: 'test', title: 'Test Test' }, + { slug: 'test', title: 'Test Test' } ], - // Not really used yet - submenu: {}, - }; + // Not really used yet + submenu: {} + }; - // let parent_data = await parent(); - // console.log(`root +layout.ts parent_data:`, parent_data); + // let parent_data = await parent(); + // console.log(`root +layout.ts parent_data:`, parent_data); - // First do a site_domain look up to check if it is valid and get the account_id. - // ae_loc.url_host = data.url.host; // Use this to look up? sub.example.com:123 - // ae_loc.fqdn = url.host; // Use this to look up? sub.example.com:123 - // ae_loc.url_hostname = parent_data.url.hostname; // sub.example.com - // ae_loc.url_origin = parent_data.url.origin; // Use this to look up? https://sub.example.com:123 - // ae_loc.site_domain = data.url.origin; - // console.log(`ae_loc = `, ae_loc); + // First do a site_domain look up to check if it is valid and get the account_id. + // ae_loc.url_host = data.url.host; // Use this to look up? sub.example.com:123 + // ae_loc.fqdn = url.host; // Use this to look up? sub.example.com:123 + // ae_loc.url_hostname = parent_data.url.hostname; // sub.example.com + // ae_loc.url_origin = parent_data.url.origin; // Use this to look up? https://sub.example.com:123 + // ae_loc.site_domain = data.url.origin; + // console.log(`ae_loc = `, ae_loc); - let fqdn = url.host; - let api_endpoint = `/crud/site/domain/${fqdn}`; + const fqdn = url.host; + const api_endpoint = `/crud/site/domain/${fqdn}`; - let api_params: any = { - 'use_alt_table': true, - 'use_alt_base': true, - }; + const api_params: any = { + use_alt_table: true, + use_alt_base: true + }; - const api_url_str = add_url_params({ - base_url: ae_api_init['base_url'], - endpoint: api_endpoint, - params: api_params, - log_lvl: log_lvl - }); + const api_url_str = add_url_params({ + base_url: ae_api_init['base_url'], + endpoint: api_endpoint, + params: api_params, + log_lvl: log_lvl + }); - let headers: any = { - 'x-no-account-id': 'Nothing to See Here', - } + let headers: any = { + 'x-no-account-id': 'Nothing to See Here' + }; - headers = clean_headers({ - headers: headers, - log_lvl: log_lvl - }); + headers = clean_headers({ + headers: headers, + log_lvl: log_lvl + }); - const fetchOptions: RequestInit = { - method: 'GET', - headers: { - ...ae_api_init['headers'], - ...headers - }, - // signal: controller.signal - }; + const fetchOptions: RequestInit = { + method: 'GET', + headers: { + ...ae_api_init['headers'], + ...headers + } + // signal: controller.signal + }; - let result = await fetch(api_url_str, fetchOptions) - .then(async function (response) { - if (response.ok) { - let json_raw = await response.json(); - // console.log(`ALERT json_raw = `, json_raw); + const result = await fetch(api_url_str, fetchOptions) + .then(async function (response) { + if (response.ok) { + const json_raw = await response.json(); + // console.log(`ALERT json_raw = `, json_raw); - let json_data: any = null; + let json_data: any = null; - if (json_raw.data) { + if (json_raw.data) { + json_data = json_raw.data; + account_id = json_data.account_id_random; + data_struct.account_id = json_data.account_id_random; + ae_acct.account_id = json_data.account_id_random; - json_data = json_raw.data; - account_id = json_data.account_id_random; - data_struct.account_id = json_data.account_id_random; - ae_acct.account_id = json_data.account_id_random; + ae_api_init['account_id'] = json_data.account_id_random; + ae_api_init['fetch'] = fetch; + // ae_api_init['fetch'] = null; + ae_api_init['headers']['x-account-id'] = json_data.account_id_random; + ae_api_init['headers']['x-no-account-id'] = null; - ae_api_init['account_id'] = json_data.account_id_random; - ae_api_init['fetch'] = fetch; - // ae_api_init['fetch'] = null; - ae_api_init['headers']['x-account-id'] = json_data.account_id_random; - ae_api_init['headers']['x-no-account-id'] = null; + ae_loc_init['account_id'] = json_data.account_id_random; + ae_loc_init['account_code'] = json_data.account_code; // Useful for export file naming + ae_loc_init['account_name'] = json_data.account_name; // Generally useful for display - ae_loc_init['account_id'] = json_data.account_id_random; - ae_loc_init['account_code'] = json_data.account_code; // Useful for export file naming - ae_loc_init['account_name'] = json_data.account_name; // Generally useful for display + ae_loc_init['site_id'] = json_data.site_id_random; + ae_loc_init['site_domain_id'] = json_data.site_domain_id_random; + ae_loc_init['site_enable'] = json_data.enable; + ae_loc_init['site_header_image_path'] = json_data.header_image_path; + ae_loc_init['site_style_href'] = json_data.style_href; + ae_loc_init['site_google_tracking_id'] = json_data.google_tracking_id; + ae_loc_init['site_access_code_kv'] = json_data.access_code_kv_json; + ae_loc_init['site_cfg_json'] = json_data.cfg_json; + ae_loc_init['site_access_key'] = json_data.access_key; // This is the general site access key + ae_loc_init['site_domain_access_key'] = json_data.site_domain_access_key; // This is specific to a (sub)domain. - ae_loc_init['site_id'] = json_data.site_id_random; - ae_loc_init['site_domain_id'] = json_data.site_domain_id_random; - ae_loc_init['site_enable'] = json_data.enable; - ae_loc_init['site_header_image_path'] = json_data.header_image_path; - ae_loc_init['site_style_href'] = json_data.style_href; - ae_loc_init['site_google_tracking_id'] = json_data.google_tracking_id; - ae_loc_init['site_access_code_kv'] = json_data.access_code_kv_json; - ae_loc_init['site_cfg_json'] = json_data.cfg_json; - ae_loc_init['site_access_key'] = json_data.access_key; // This is the general site access key - ae_loc_init['site_domain_access_key'] = json_data.site_domain_access_key; // This is specific to a (sub)domain. + ae_loc_init['base_url'] = url.origin; + ae_loc_init['hostname'] = url.hostname; - ae_loc_init['base_url'] = url.origin; - ae_loc_init['hostname'] = url.hostname + if (!ae_loc_init['site_access_key'] && !ae_loc_init['site_domain_access_key']) { + ae_loc_init['key_checked'] = true; // Se to true to allow access without a key. + ae_loc_init['allow_access'] = true; // No access key is required here. + } else { + const access_key = url.searchParams.get('key'); // Technically this is the site's auth key. - if (!ae_loc_init['site_access_key'] && !ae_loc_init['site_domain_access_key']) { - ae_loc_init['key_checked'] = true; // Se to true to allow access without a key. - ae_loc_init['allow_access'] = true; // No access key is required here. - } else { - let access_key = url.searchParams.get('key'); // Technically this is the site's auth key. - - if (access_key) { - if (log_lvl) { - console.log(`root +layout.ts: access_key = ${access_key}`); - } - if (access_key == ae_loc_init['site_access_key']) { - ae_loc_init['key_checked'] = ae_loc_init['site_access_key']; - ae_loc_init['allow_access'] = ae_loc_init['site_access_key']; - } else if (access_key == ae_loc_init['site_domain_access_key']) { - ae_loc_init['key_checked'] = ae_loc_init['site_domain_access_key']; - ae_loc_init['allow_access'] = ae_loc_init['site_domain_access_key']; - } else { - // The key changed and no longer matches the site or domain key. - ae_loc_init['key_checked'] = true; - ae_loc_init['allow_access'] = false; - } - } else { - if (log_lvl > 1) { - console.log(`root +layout.ts: No access key found in URL.`); - } - ae_loc_init['key_checked'] = true; - // Do nothing to change the allow_access here - // ae_loc_init['allow_access'] = false; // An access key is required at this point. - } - } - } else { - console.log('API GET Object *fetch* response was missing the JSON "data" part. This should not happen.'); - return false; - } - return json_data; // || json_raw; - } else if (response.status === 404) { - console.log('API GET Object *fetch* response was a 404 not found.'); - return null; - } else { - console.log('API GET Object *fetch* request was not ok for some other reason.'); - return false; - } - - }) - .catch((err) => { - console.log('API GET Object *fetch* request was aborted or failed in an unexpected way.', err); - error(500, { - message: 'Site lookup aborted or failed! Check the network connection, domain name, and API.' + if (access_key) { + if (log_lvl) { + console.log(`root +layout.ts: access_key = ${access_key}`); + } + if (access_key == ae_loc_init['site_access_key']) { + ae_loc_init['key_checked'] = ae_loc_init['site_access_key']; + ae_loc_init['allow_access'] = ae_loc_init['site_access_key']; + } else if (access_key == ae_loc_init['site_domain_access_key']) { + ae_loc_init['key_checked'] = ae_loc_init['site_domain_access_key']; + ae_loc_init['allow_access'] = ae_loc_init['site_domain_access_key']; + } else { + // The key changed and no longer matches the site or domain key. + ae_loc_init['key_checked'] = true; + ae_loc_init['allow_access'] = false; + } + } else { + if (log_lvl > 1) { + console.log(`root +layout.ts: No access key found in URL.`); + } + ae_loc_init['key_checked'] = true; + // Do nothing to change the allow_access here + // ae_loc_init['allow_access'] = false; // An access key is required at this point. + } + } + } else { + console.log( + 'API GET Object *fetch* response was missing the JSON "data" part. This should not happen.' + ); + return false; + } + return json_data; // || json_raw; + } else if (response.status === 404) { + console.log('API GET Object *fetch* response was a 404 not found.'); + return null; + } else { + console.log('API GET Object *fetch* request was not ok for some other reason.'); + return false; + } + }) + .catch((err) => { + console.log( + 'API GET Object *fetch* request was aborted or failed in an unexpected way.', + err + ); + error(500, { + message: + 'Site lookup aborted or failed! Check the network connection, domain name, and API.' + }); }); - }); - if (log_lvl > 1) { - console.log(`ALERT response = `, result); - } + if (log_lvl > 1) { + console.log(`ALERT response = `, result); + } - if (result === null) { - error(403, { - message: 'The site lookup failed! Check that the domain name is configured and enabled.' - }); - } else if (result === false) { - error(500, { - message: 'Site lookup failed or returned an unexpected response! Check the API.' - }); - } + if (result === null) { + error(403, { + message: 'The site lookup failed! Check that the domain name is configured and enabled.' + }); + } else if (result === false) { + error(500, { + message: 'Site lookup failed or returned an unexpected response! Check the API.' + }); + } - // log_lvl = 0; - if (log_lvl > 1) { - console.log(`root +layout.ts: Using account_id = `, account_id); - console.log(`root +layout.ts: ae_loc_init = `, ae_loc_init); - } + // log_lvl = 0; + if (log_lvl > 1) { + console.log(`root +layout.ts: Using account_id = `, account_id); + console.log(`root +layout.ts: ae_loc_init = `, ae_loc_init); + } - if (!account_id) { - error(500, { + if (!account_id) { + error(500, { message: 'The account ID was not found! Check the API.' }); - } + } - ae_acct['api'] = ae_api_init; - ae_acct['loc'] = ae_loc_init; - ae_acct['ds'] = ds_code_li; - ae_acct['slct'] = { - 'account_id': account_id, - 'site_domain_id': ae_loc_init.site_domain_id, - 'site_id': ae_loc_init.site_id, + ae_acct['api'] = ae_api_init; + ae_acct['loc'] = ae_loc_init; + ae_acct['ds'] = ds_code_li; + ae_acct['slct'] = { + account_id: account_id, + site_domain_id: ae_loc_init.site_domain_id, + site_id: ae_loc_init.site_id, - // For events_leads, events_badges, events_speakers - 'event_id': ae_loc_init.site_cfg_json?.slct__event_id, - 'event_badge_template_id': ae_loc_init.site_cfg_json?.slct__event_badge_template_id, + // For events_leads, events_badges, events_speakers + event_id: ae_loc_init.site_cfg_json?.slct__event_id, + event_badge_template_id: ae_loc_init.site_cfg_json?.slct__event_badge_template_id, - // For sponsorships - 'sponsorship_cfg_id': ae_loc_init.site_cfg_json?.slct__sponsorship_cfg_id, - } - // console.log(`ae_acct = `, ae_acct); + // For sponsorships + sponsorship_cfg_id: ae_loc_init.site_cfg_json?.slct__sponsorship_cfg_id + }; + // console.log(`ae_acct = `, ae_acct); - // WARNING: Using the Account ID is a precaution against shared data between other accounts (sites and sessions). - data_struct[ae_loc_init.account_id] = ae_acct; + // WARNING: Using the Account ID is a precaution against shared data between other accounts (sites and sessions). + data_struct[ae_loc_init.account_id] = ae_acct; - return data_struct; + return data_struct; } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index a6a450b6..e07fd754 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,141 +1,133 @@ {$ae_loc.title ?? 'Æ loading...'} -
+ class="ae_root md:container h-full mx-auto flex flex-col items-center p-4 space-y-12" + class:ae_root--auth_access={$ae_loc.auth_access} + class:ae_root--public_access={$ae_loc.public_access} + class:ae_root--trusted_access={$ae_loc.trusted_access} + class:ae_root--administrator_access={$ae_loc.administrator_access} + class:ae_root--manager_access={$ae_loc.manager_access} + class:ae_root--super_access={$ae_loc.super_access} +> + + - - + + - - +
+
+ + - +
- localStorage.clear(); - sessionStorage.clear(); - - alert('Local and Session Storage cleared. The page should now refresh on its own.'); - window.location.reload(true); - }} - class="btn btn-sm m-1 p-1 preset-tonal-surface hover:variant-outline-warning text-error-300 hover:text-error-800 transition-all" - title="Clear IDB, localStorage, and sessionStorage and then reload to clear the page cache" - > - - - Clear Storage and Reload - - - - - - - - + + + +
- - - diff --git a/src/routes/admin/+layout.svelte b/src/routes/admin/+layout.svelte index 23db5547..61dc24f2 100644 --- a/src/routes/admin/+layout.svelte +++ b/src/routes/admin/+layout.svelte @@ -1,123 +1,116 @@ - Æ Admin - {$ae_loc.title ?? 'Æ loading...'} - - -{/if} - -
- - {@render children?.()} - -
- - \ No newline at end of file +
+ + {@render children?.()} + +
+ diff --git a/src/routes/core/+page.svelte b/src/routes/core/+page.svelte index 67918992..75ae3cf1 100644 --- a/src/routes/core/+page.svelte +++ b/src/routes/core/+page.svelte @@ -1,229 +1,232 @@ -
+

Æ Core for {$ae_loc.account_name ?? 'Æ loading...'}

-

Æ Core for {$ae_loc.account_name ?? 'Æ loading...'}

+ + + let new_person_obj = await core_func.create_ae_obj__person({ + api_cfg: $ae_api, + // user_id: $ae_loc.user_id, + data_kv: person_data, + log_lvl: 1 + }); - - let new_person_obj = await core_func.create_ae_obj__person({ - api_cfg: $ae_api, - // user_id: $ae_loc.user_id, - data_kv: person_data, - log_lvl: 1, - }) + + {#if $ae_sess.person.show_report__person_li && person_id_random_li?.length > 0} +

Person Records

- console.log('new_person_obj:', new_person_obj); + - -
- - - -
-{/if} - + for (let i = 0; i < $slct.person_id_random_li.length; i++) { + let person_obj = $slct.person_id_random_li[i]; + let person_id_random = person_obj.person_id_random; + tmp_li.push(person_id_random); + } + person_id_random_li = tmp_li; + } + return load_results; + }); + }} + class="select max-w-20 text-sm" + > + + + + + + + + + + + + +
+ + +
+ {/if}
diff --git a/src/routes/core/ae_comp__person_obj_tbl.svelte b/src/routes/core/ae_comp__person_obj_tbl.svelte index 4af3f115..b8231774 100644 --- a/src/routes/core/ae_comp__person_obj_tbl.svelte +++ b/src/routes/core/ae_comp__person_obj_tbl.svelte @@ -1,146 +1,148 @@ -
+ {#if person_id_random_li && $lq_kv__person_obj_li && $lq_kv__person_obj_li?.length > 0} +
+

+ Results: + {#if $lq_kv__person_obj_li.length} + + + {$lq_kv__person_obj_li.length ?? 'None'} + + {/if} +

-{#if person_id_random_li && $lq_kv__person_obj_li && $lq_kv__person_obj_li?.length > 0} -
-

- - Results: - + + + + + + + {#if show_user_fields} + + + {/if} + + + + + {#each $lq_kv__person_obj_li as person_obj} + + + + - {#if $lq_kv__person_obj_li.length} - - - {$lq_kv__person_obj_li.length ?? 'None'} - - {/if} - - -
Name ({$lq_kv__person_obj_li?.length}×)EmailAffiliationsUsernameAccessCreated/Updated
+ + + + {@html person_obj?.full_name ? person_obj?.full_name : ae_snip.html__not_set} + + + + {#if person_obj?.primary_email} + + {@html person_obj?.primary_email ?? ae_snip.html__not_set} + + {:else} + {@html ae_snip.html__not_set} + {/if} + + + {@html person_obj?.affiliations ?? ae_snip.html__not_set} +
- - - - - - {#if show_user_fields} - - - {/if} - - - - - - {#each $lq_kv__person_obj_li as person_obj} - - - - - - {#if show_user_fields} - - - {/if} - - - - {/each} - -
Name ({$lq_kv__person_obj_li?.length}×)EmailAffiliationsUsernameAccessCreated/Updated
- - - - {@html person_obj?.full_name ? person_obj?.full_name : ae_snip.html__not_set} - - - - {#if person_obj?.primary_email} - - {@html person_obj?.primary_email ?? ae_snip.html__not_set} - - {:else} - {@html ae_snip.html__not_set} - {/if} - - - {@html person_obj?.affiliations ?? ae_snip.html__not_set} - - {#if person_obj?.user_id_random} - - - {@html person_obj?.username ?? ae_snip.html__not_set} - - {:else} - {@html ae_snip.html__not_set} - {/if} - - {person_obj?.user_super ? 'Super' : ''} - {person_obj?.user_manager ? 'Manager' : ''} - {person_obj?.user_administrator ? 'Administrator' : ''} - - {ae_util.iso_datetime_formatter(person_obj?.created_on, 'datetime_iso_12_no_seconds')} -
- {ae_util.iso_datetime_formatter(person_obj?.updated_on, 'datetime_iso_12_no_seconds')} -
-

-{/if} + {#if show_user_fields} + + {#if person_obj?.user_id_random} + + + {@html person_obj?.username ?? ae_snip.html__not_set} + + {:else} + {@html ae_snip.html__not_set} + {/if} + + + {person_obj?.user_super ? 'Super' : ''} + {person_obj?.user_manager ? 'Manager' : ''} + {person_obj?.user_administrator ? 'Administrator' : ''} + + {/if} + + {ae_util.iso_datetime_formatter( + person_obj?.created_on, + 'datetime_iso_12_no_seconds' + )} +
+ {ae_util.iso_datetime_formatter( + person_obj?.updated_on, + 'datetime_iso_12_no_seconds' + )} + + + {/each} + + +
+ {/if}
- diff --git a/src/routes/core/not_used+layout.ts b/src/routes/core/not_used+layout.ts index 9e7d562e..37f296cd 100644 --- a/src/routes/core/not_used+layout.ts +++ b/src/routes/core/not_used+layout.ts @@ -3,35 +3,34 @@ // import { core_func } from '$lib/ae_core_functions'; - export async function load({ parent }) { - let log_lvl: number = 0; + const log_lvl: number = 0; - let data = await parent(); - // console.log(`ae_events_pres_mgmt +layout.ts data:`, data); + const data = await parent(); + // console.log(`ae_events_pres_mgmt +layout.ts data:`, data); - // let account_id = data.account_id; - // if (!account_id) { - // console.log(`events_pres_mgmt +layout.ts: The account_id was not found in the data!!!`); - // return false; - // } + // let account_id = data.account_id; + // if (!account_id) { + // console.log(`events_pres_mgmt +layout.ts: The account_id was not found in the data!!!`); + // return false; + // } - // let ae_acct = data[account_id]; - // if (log_lvl) { - // console.log(`ae_acct = `, ae_acct); - // } + // let ae_acct = data[account_id]; + // if (log_lvl) { + // console.log(`ae_acct = `, ae_acct); + // } - // let submenu = { - // main: {name: 'Main', href: '/events', access: false}, - // // manage: {name: 'Manage', href: '/events/manage', access: 'administrator', disable: true, hide: true}, - // locations: {name: 'Locations', href: '/events/locations', access: false, disable: false, hide: false}, - // }; - // data.submenu = submenu + // let submenu = { + // main: {name: 'Main', href: '/events', access: false}, + // // manage: {name: 'Manage', href: '/events/manage', access: 'administrator', disable: true, hide: true}, + // locations: {name: 'Locations', href: '/events/locations', access: false, disable: false, hide: false}, + // }; + // data.submenu = submenu - // // WARNING: Precaution against shared data between sites and sessions. - // data[account_id] = ae_acct; + // // WARNING: Precaution against shared data between sites and sessions. + // data[account_id] = ae_acct; - return data; + return data; } // export const prerender = false; diff --git a/src/routes/core/person/[person_id]/+page.svelte b/src/routes/core/person/[person_id]/+page.svelte index 49c50565..f63ae640 100644 --- a/src/routes/core/person/[person_id]/+page.svelte +++ b/src/routes/core/person/[person_id]/+page.svelte @@ -1,196 +1,198 @@ - Person: {ae_util.shorten_string({ string: $lq__person_obj?.full_name, max_length: 20, begin_length: 10, end_length: 4 })} - ({$lq__person_obj?.person_id ?? 'loading...'}) - Core - {$ae_loc?.title} - + Person: {ae_util.shorten_string({ + string: $lq__person_obj?.full_name, + max_length: 20, + begin_length: 10, + end_length: 4 + })} + ({$lq__person_obj?.person_id ?? 'loading...'}) - Core - {$ae_loc?.title} + +
+
+
+ + + Back to Core + -
+ +
-
+ -
- - - Back to Core - +
+ +
+
- -
+ {#if !$lq__person_obj} +
+ + Loading... +
+ {:else} + + {/if} - + -
- -
-
- -{#if !$lq__person_obj} -
- - Loading... -
-{:else} - -{/if} - - - - - - - - +
- \ No newline at end of file + /* overflow-y: auto; */ + } + diff --git a/src/routes/core/person/[person_id]/+page.ts b/src/routes/core/person/[person_id]/+page.ts index 48aa9652..58d87eaa 100644 --- a/src/routes/core/person/[person_id]/+page.ts +++ b/src/routes/core/person/[person_id]/+page.ts @@ -4,38 +4,41 @@ console.log(`ae core person [person_id] +page.ts: start`); import { core_func } from '$lib/ae_core/ae_core_functions'; -export async function load({ params, parent }) { // route - let log_lvl: number = 0; +export async function load({ params, parent }) { + // route + const log_lvl: number = 0; - let data = await parent(); - // console.log(`ae core person [person_id] +page.ts data:`, data); - data.log_lvl = log_lvl; + const data = await parent(); + // console.log(`ae core person [person_id] +page.ts data:`, data); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; - console.log(`ae_acct = `, ae_acct); + const account_id = data.account_id; + const ae_acct = data[account_id]; + console.log(`ae_acct = `, ae_acct); - let person_id = params.person_id; - console.log(`person_id = `, person_id); - if (!person_id) { - console.log(`ae core person [person_id] +page.ts: The person_id was not found in the params!!!`); - error(404, { + const person_id = params.person_id; + console.log(`person_id = `, person_id); + if (!person_id) { + console.log( + `ae core person [person_id] +page.ts: The person_id was not found in the params!!!` + ); + error(404, { message: 'Person not found' }); - } + } - ae_acct.slct.person_id = person_id; + ae_acct.slct.person_id = person_id; - let load_person_obj = await core_func.load_ae_obj_id__person({ - api_cfg: ae_acct.api, - person_id: person_id, - try_cache: true - }); + const load_person_obj = await core_func.load_ae_obj_id__person({ + api_cfg: ae_acct.api, + person_id: person_id, + try_cache: true + }); - ae_acct.slct.person_obj = load_person_obj; + ae_acct.slct.person_obj = load_person_obj; - // WARNING: Precaution against shared data between sites and presentations. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and presentations. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/core/person_view.svelte b/src/routes/core/person_view.svelte index 81d4c684..8f5fe184 100644 --- a/src/routes/core/person_view.svelte +++ b/src/routes/core/person_view.svelte @@ -1,622 +1,689 @@ - {#if $lq__person_obj} -

- Person Details for:
- - "{$lq__person_obj.full_name}" - -

+

+ Person Details for:
+ + "{$lq__person_obj.full_name}" + +

+
    +
  • + { + console.log(`ae_crud_updated:`, e.detail); -
      -
    • - { - console.log(`ae_crud_updated:`, e.detail); + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + External ID: + + {@html $lq__person_obj.external_id ?? ae_snip.html__not_set} + + +
    • +
    • + { + console.log(`ae_crud_updated:`, e.detail); - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - External ID: - - {@html $lq__person_obj.external_id ?? ae_snip.html__not_set} - - -
    • -
    • + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + External System ID: + + {@html $lq__person_obj.external_sys_id ?? ae_snip.html__not_set} + + +
    • - { - console.log(`ae_crud_updated:`, e.detail); +
    • + - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - External System ID: - - {@html $lq__person_obj.external_sys_id ?? ae_snip.html__not_set} - - -
    • + { + console.log(`ae_crud_updated:`, e.detail); -
    • - + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + {@html $lq__person_obj.given_name ?? ae_snip.html__not_set} + + + { + console.log(`ae_crud_updated:`, e.detail); - { - console.log(`ae_crud_updated:`, e.detail); + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + {@html $lq__person_obj.family_name ?? ae_snip.html__not_set} + + +
    • +
    • + { + console.log(`ae_crud_updated:`, e.detail); - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - {@html $lq__person_obj.given_name ?? ae_snip.html__not_set} - - - { - console.log(`ae_crud_updated:`, e.detail); + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + {#if $lq__person_obj.primary_email} + + {@html $lq__person_obj.primary_email ?? 'email' + ae_snip.html__not_set} + + {:else} + email {@html ae_snip.html__not_set} + {/if} + + +
    • +
    • + { + console.log(`ae_crud_updated:`, e.detail); - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - {@html $lq__person_obj.family_name ?? ae_snip.html__not_set} - - -
    • -
    • - { - console.log(`ae_crud_updated:`, e.detail); + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + {@html $lq__person_obj.affiliations ?? 'affiliations' + ae_snip.html__not_set} + + +
    • +
    • + { + console.log(`ae_crud_updated:`, e.detail); - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - {#if $lq__person_obj.primary_email} - - {@html $lq__person_obj.primary_email ?? 'email'+ae_snip.html__not_set} - - {:else} - email {@html ae_snip.html__not_set} - {/if} - - -
    • -
    • - { - console.log(`ae_crud_updated:`, e.detail); + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + {@html $lq__person_obj.professional_title && $lq__person_obj.professional_title.length + ? $lq__person_obj.professional_title + : 'professional title' + ae_snip.html__not_set} + + +
    • +
    • + { + console.log(`ae_crud_updated:`, e.detail); - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - {@html $lq__person_obj.affiliations ?? 'affiliations'+ae_snip.html__not_set} - - -
    • -
    • - { - console.log(`ae_crud_updated:`, e.detail); + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + Passcode: + + {@html $lq__person_obj.passcode ?? 'passcode' + ae_snip.html__not_set} + + +
    • - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - {@html $lq__person_obj.professional_title && $lq__person_obj.professional_title.length ? $lq__person_obj.professional_title : 'professional title'+ae_snip.html__not_set} - -
      - -
    • - { - console.log(`ae_crud_updated:`, e.detail); +
    • + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + {#if $ae_loc.trusted_access} + {$lq__person_obj?.hide ? 'Hidden' : 'Not Hidden'} + {/if} + +
      - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - {#if $ae_loc.trusted_access} - {($lq__person_obj?.hide ? 'Hidden' : 'Not Hidden')} - {/if} - - + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + {#if $ae_loc.trusted_access} + {$lq__person_obj?.enable ? 'Enabled' : 'Disabled'} + {/if} + + - - { - console.log(`ae_crud_updated:`, e.detail); + + { + console.log(`ae_crud_updated:`, e.detail); - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - {#if $ae_loc.trusted_access} - {($lq__person_obj?.enable ? 'Enabled' : 'Disabled')} - {/if} - - + // $events_slct.exhibit_tracking_obj.hide = !$lq__person_obj?.hide; + ae_triggers.priority = true; + }} + class="btn btn-sm preset-tonal-warning" + > + {#if $ae_loc.trusted_access} + {@html $lq__person_obj?.priority + ? ' Not Priority?' + : ' Priority?'} + {:else} + + {@html $lq__person_obj?.priority + ? ' Not Priority' + : ' Priority'} + {/if} + + + + { + console.log(`ae_crud_updated:`, e.detail); - - { - console.log(`ae_crud_updated:`, e.detail); + core_func + .load_ae_obj_id__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj?.person_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + {#if $ae_loc.trusted_access} + {$lq__person_obj?.allow_auth_key ? 'Allow Auth Key' : 'Not Allow Auth Key'} + {/if} + + + - // $events_slct.exhibit_tracking_obj.hide = !$lq__person_obj?.hide; - ae_triggers.priority = true; - }} - class="btn btn-sm preset-tonal-warning" - > - {#if $ae_loc.trusted_access} - {@html ($lq__person_obj?.priority ? ' Not Priority?' : ' Priority?')} - {:else} - - {@html ($lq__person_obj?.priority ? ' Not Priority' : ' Priority')} - {/if} - - +
    • +
      + + + +
      - - { - console.log(`ae_crud_updated:`, e.detail); +

      + JSON length: {ae_tmp.value__data_json + ? ae_util.number_w_commas(ae_tmp.value__data_json.length) + : 0} characters - core_func.load_ae_obj_id__person({api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1}) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - {#if $ae_loc.trusted_access} - {($lq__person_obj?.allow_auth_key ? 'Allow Auth Key' : 'Not Allow Auth Key')} - {/if} - - +

      +
    • + // We need to parse the JSON string into an object. In the future this should be dynamic and allow for basic key_val object. + let data_json_obj = JSON.parse(ae_tmp.value__data_json); -
    • -
      - - - - -
      - -

      - JSON length: {(ae_tmp.value__data_json ? ae_util.number_w_commas(ae_tmp.value__data_json.length) : 0)} characters - - {#if ae_tmp.valid__data_json} - - {:else} - - Invalid JSON - {/if} -

      - -
      - - -
      -
    • - - -
    + let person_data = { + data_json: data_json_obj + }; + ae_promises.update__person_obj = core_func + .update_ae_obj__person({ + api_cfg: $ae_api, + person_id: $lq__person_obj.person_id_random, + data_kv: person_data, + log_lvl: 0 + }) + .then(function (update_result) { + // console.log(update_result); + // return update_result; + }); + }} + > + {#await ae_promises.update__person_obj} + + {:then} + {#if ae_tmp.value__data_json == $lq__person_obj.data_json} + + {:else} + + {/if} + {/await} + Save JSON + + +
  • +
{/if} diff --git a/src/routes/events/+layout.svelte b/src/routes/events/+layout.svelte index a44a5590..3bffcea2 100644 --- a/src/routes/events/+layout.svelte +++ b/src/routes/events/+layout.svelte @@ -1,129 +1,124 @@ - - Æ: - Events - {$events_loc.title ?? 'Æ loading...'} - + Æ: Events - {$events_loc.title ?? 'Æ loading...'} + - -{#if ($events_loc?.ver && $events_loc?.ver !== $events_sess?.ver)} -
- - -
+ + {/if} @@ -187,12 +181,12 @@ function clear_sess() {
- -{#if !$ae_sess?.disable_sys_nav} - -{/if} - -
50 && nav_y_height <= 100} - class:pt-32={nav_y_height > 100 && nav_y_height <= 150} - class:pt-40={nav_y_height > 150 && nav_y_height <= 200} - class=" +
50 && nav_y_height <= 100} + class:pt-32={nav_y_height > 100 && nav_y_height <= 150} + class:pt-40={nav_y_height > 150 && nav_y_height <= 200} + class=" main_content grow px-1 md:px-2 lg:px-4 @@ -274,29 +255,25 @@ function clear_sess() { items-center justify-start " - > + > + + {@render children?.()} +
- - {@render children?.()} - -
- - -
- - - + window.parent.postMessage({ scroll_to: 0 }, '*'); // This should be + }} + title="Scroll to top" + > + + Scroll to Top + - - + window.parent.postMessage({ scroll_to: scroll_y }, '*'); + }} + title="Scroll to bottom" + > + + Scroll to Bottom + + +
-
- -{#if !$ae_sess?.disable_sys_footer} -
300} - class:opacity-80={yTop < 250} - class:opacity-0={yTop > 250} - class=" + {#if !$ae_sess?.disable_sys_footer} +
300} + class:opacity-80={yTop < 250} + class:opacity-0={yTop > 250} + class=" footer z-20 hover:opacity-100 @@ -381,17 +357,13 @@ function clear_sess() { transition-all duration-1000 " - class:ae_debug={$ae_loc.debug} - > - - - -
-{/if} - - + class:ae_debug={$ae_loc.debug} + > + +
+ {/if} diff --git a/src/routes/events/+layout.ts b/src/routes/events/+layout.ts index e7ab25bd..30a06565 100644 --- a/src/routes/events/+layout.ts +++ b/src/routes/events/+layout.ts @@ -5,28 +5,27 @@ console.log(`ae_events_pres_mgmt +layout.ts start`); // import { browser } from '$app/environment'; // import { events_func } from '$lib/ae_events_functions'; - export async function load({ parent }) { - let log_lvl: number = 0; + const log_lvl: number = 0; - let parent_data = await parent(); - // console.log(`ae_events_pres_mgmt +layout.ts parent_data:`, parent_data); + const parent_data = await parent(); + // console.log(`ae_events_pres_mgmt +layout.ts parent_data:`, parent_data); - let account_id = parent_data.account_id; - if (!account_id) { - console.log(`events_pres_mgmt +layout.ts: The account_id was not found in the parent_data!!!`); - return false; - } + const account_id = parent_data.account_id; + if (!account_id) { + console.log(`events_pres_mgmt +layout.ts: The account_id was not found in the parent_data!!!`); + return false; + } - let ae_acct = parent_data[account_id]; - if (log_lvl) { - console.log(`ae_acct = `, ae_acct); - } + const ae_acct = parent_data[account_id]; + if (log_lvl) { + console.log(`ae_acct = `, ae_acct); + } - // WARNING: Precaution against shared parent_data between sites and sessions. - parent_data[account_id] = ae_acct; + // WARNING: Precaution against shared parent_data between sites and sessions. + parent_data[account_id] = ae_acct; - return parent_data; + return parent_data; } // export const prerender = false; diff --git a/src/routes/events/+page.svelte b/src/routes/events/+page.svelte index 322c107d..c8d3ede5 100644 --- a/src/routes/events/+page.svelte +++ b/src/routes/events/+page.svelte @@ -1,64 +1,65 @@ - @@ -66,14 +67,16 @@ onMount(() => {

Presentation Management for {$ae_loc.account_name ?? 'Æ loading...'}

{#if $ae_loc.administrator_access} -

Administrator Access - Technical Support

-

You are accessing the presentation management system with "administrator" level permissions.

+

Administrator Access - Technical Support

+

+ You are accessing the presentation management system with "administrator" level permissions. +

{:else if $ae_loc.trusted_access} -

Trusted Access - Staff

-

You are accessing the presentation management system with "trusted" level permissions.

+

Trusted Access - Staff

+

You are accessing the presentation management system with "trusted" level permissions.

{:else if !$ae_loc.trusted_access} -

Restricted Access

-

You access to the presentation management system is limited.

+

Restricted Access

+

You access to the presentation management system is limited.

{/if} - {#if $lq__event_obj_li} - - {#if $lq__event_obj_li.length} - -
- - Page {current_page} of {total_pages} - -
- {:else} -
- - No events available to display. - -
- {/if} + {#if $lq__event_obj_li.length} + +
+ + Page {current_page} of {total_pages} + +
+ {:else} +
+ + No events available to display. + +
+ {/if} {:else} -
- - Loading... -
- +
+ + Loading... +
+ {/if} - - - diff --git a/src/routes/events/+page.ts b/src/routes/events/+page.ts index ae6e9210..e939ef6d 100644 --- a/src/routes/events/+page.ts +++ b/src/routes/events/+page.ts @@ -5,70 +5,67 @@ import { browser } from '$app/environment'; import { events_func } from '$lib/ae_events_functions'; export async function load({ parent }) { - let log_lvl: number = 0; + const log_lvl: number = 0; - let parent_data = await parent(); + const parent_data = await parent(); - let account_id = parent_data.account_id; + const account_id = parent_data.account_id; - let ae_acct = parent_data[account_id]; + const ae_acct = parent_data[account_id]; - let event_id = ae_acct.slct.event_id; // From root +layout.ts - if (!event_id) { - if (log_lvl) { - console.log(`INFO: events +layout.ts: The event_id was not found in the parent_data.`); - } - // return false; - } + const event_id = ae_acct.slct.event_id; // From root +layout.ts + if (!event_id) { + if (log_lvl) { + console.log(`INFO: events +layout.ts: The event_id was not found in the parent_data.`); + } + // return false; + } - if (browser) { - if (event_id) { - // let ae_params = {}; + if (browser) { + if (event_id) { + // let ae_params = {}; - let load_event_obj_li = await events_func.load_ae_obj_id__event({ - api_cfg: ae_acct.api, - event_id: event_id, - log_lvl: log_lvl - }); - ae_acct.slct.event_obj_li = load_event_obj_li; - } + const load_event_obj_li = await events_func.load_ae_obj_id__event({ + api_cfg: ae_acct.api, + event_id: event_id, + log_lvl: log_lvl + }); + ae_acct.slct.event_obj_li = load_event_obj_li; + } - let load_event_obj_li = await events_func.load_ae_obj_li__event({ - api_cfg: ae_acct.api, - for_obj_type: 'account', - for_obj_id: account_id, - inc_session_li: true, - hidden: 'all', // 'not_hidden' - enabled: 'enabled', - // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - limit: 25, - // params: ae_params, - try_cache: true, - log_lvl: log_lvl - }); - ae_acct.slct.event_obj_li = load_event_obj_li; + const load_event_obj_li = await events_func.load_ae_obj_li__event({ + api_cfg: ae_acct.api, + for_obj_type: 'account', + for_obj_id: account_id, + inc_session_li: true, + hidden: 'all', // 'not_hidden' + enabled: 'enabled', + // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, + limit: 25, + // params: ae_params, + try_cache: true, + log_lvl: log_lvl + }); + ae_acct.slct.event_obj_li = load_event_obj_li; + } + parent_data[account_id] = ae_acct; - } + return parent_data; - parent_data[account_id] = ae_acct; + // let ae_acct = parent_data[account_id]; - return parent_data; + // Should we limit these to event.conference = true? + // let load_event_obj_li = await events_func.load_ae_obj_li__event({ + // api_cfg: ae_acct.api, + // account_id: account_id, + // params: {enabled: 'enabled', qry__limit: 25}, + // try_cache: false, + // log_lvl: 1 + // }); + // ae_acct.slct.event_obj_li = load_event_obj_li; + // parent_data[account_id] = ae_acct; - // let ae_acct = parent_data[account_id]; - - // Should we limit these to event.conference = true? - // let load_event_obj_li = await events_func.load_ae_obj_li__event({ - // api_cfg: ae_acct.api, - // account_id: account_id, - // params: {enabled: 'enabled', qry__limit: 25}, - // try_cache: false, - // log_lvl: 1 - // }); - // ae_acct.slct.event_obj_li = load_event_obj_li; - - // parent_data[account_id] = ae_acct; - - // return parent_data; + // return parent_data; } diff --git a/src/routes/events/[event_id]/(badges)/badges/+layout.svelte b/src/routes/events/[event_id]/(badges)/badges/+layout.svelte index 8aebc1a7..17efe252 100644 --- a/src/routes/events/[event_id]/(badges)/badges/+layout.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/+layout.svelte @@ -1,88 +1,90 @@ - - Æ: - Badges for - {ae_util.shorten_string({string: $lq__event_obj?.name ?? '-- not set --', max_length: 12})} - - Badges v3 - - {$events_loc?.title} - + Æ: Badges for + {ae_util.shorten_string({ string: $lq__event_obj?.name ?? '-- not set --', max_length: 12 })} + - Badges v3 - + {$events_loc?.title} + - - - {@render children?.()} diff --git a/src/routes/events/[event_id]/(badges)/badges/+page.svelte b/src/routes/events/[event_id]/(badges)/badges/+page.svelte index 1cfa96d6..c43c37c2 100644 --- a/src/routes/events/[event_id]/(badges)/badges/+page.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/+page.svelte @@ -1,118 +1,118 @@ - - Badges - - {ae_util.shorten_string({string: $lq__event_obj?.name ?? '-- not set --', max_length: 12})} - - OSIT's Æ Events - + Badges - + {ae_util.shorten_string({ string: $lq__event_obj?.name ?? '-- not set --', max_length: 12 })} + - OSIT's Æ Events + - - - - + event_id={$events_slct?.event_id ?? ''} + bind:use_id_li={$events_sess.badges.use_id_li} + bind:event_badge_id_li + bind:search_status={$events_sess.badges.search_status} + bind:search_complete={$events_sess.badges.search_complete} + bind:qry_str={$events_loc.badges.fulltext_search_qry_str} + bind:qry_type_code={$events_loc.badges.search_badge_type_code} + log_lvl={1} +> - -{#if $events_sess?.badges?.search_status != 'loading' && $events_sess?.badges?.search_status != 'processing'} - - +{#if $events_sess?.badges?.search_status != 'loading' && $events_sess?.badges?.search_status != 'processing'} + {:else} -

Loading badges...

+

Loading badges...

{/if} \ No newline at end of file +{/if} --> diff --git a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/+page.svelte b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/+page.svelte index c4432ee3..d97b827e 100644 --- a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/+page.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/+page.svelte @@ -1,123 +1,119 @@ - - Æ: - Badge - - {$lq__event_badge_obj?.given_name ?? '-- not set --'} - {$lq__event_badge_obj?.family_name ? $lq__event_badge_obj?.family_name.charAt(0) + '.' : ''} - - Badges v3 - - {$events_loc?.title} - + Æ: Badge - + {$lq__event_badge_obj?.given_name ?? '-- not set --'} + {$lq__event_badge_obj?.family_name ? $lq__event_badge_obj?.family_name.charAt(0) + '.' : ''} + - Badges v3 - + {$events_loc?.title} + - {#if $lq__event_badge_obj} -
-

- Badge: - {#if $lq__event_badge_obj.full_name} - {$lq__event_badge_obj.full_name} - {:else if $lq__event_badge_obj.given_name} - {$lq__event_badge_obj.given_name} - {:else} - -- no name -- - {/if} -

- - - Back to Search - -
- - - - - + > +

+ Badge: + {#if $lq__event_badge_obj.full_name} + {$lq__event_badge_obj.full_name} + {:else if $lq__event_badge_obj.given_name} + {$lq__event_badge_obj.given_name} + {:else} + -- no name -- + {/if} +

+ + + Back to Search + + + + + {:else} -

No IDB record found for ID: {event_badge_id}

+

No IDB record found for ID: {event_badge_id}

{/if} diff --git a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte index e9e4868f..6dfcd79c 100644 --- a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/ae_comp__badge_obj_view.svelte @@ -1,391 +1,412 @@ - - - - - - - - -
{ outline-4 outline-green-500/50 hover:outline-green-700/75 group " - > - - - Back of badge - + > + Back of badge + - {#if $lq__event_badge_template_obj.secondary_header_path} -
{ overflow-hidden hover:outline-2 hover:outline-dashed hover:outline-gray-500/75 " - > - check secondary header path -
- {:else if $lq__event_badge_template_obj.header_path} -
- check primary header path -
- {:else} -
- - -
- {/if} + > + check secondary header path + + {:else if $lq__event_badge_template_obj.header_path} +
+ check primary header path +
+ {:else} +
+ + +
+ {/if} - -
{ text-xs px-1 hover:outline-2 hover:outline-dashed hover:outline-gray-500/75 " - > - -
- {#if $lq__event_badge_template_obj.wireless_ssid} + > + {#if $lq__event_badge_template_obj.wireless_ssid} +
+ + Signal Name + + {$lq__event_badge_template_obj.wireless_ssid} + + + + Access Code + + {$lq__event_badge_template_obj.wireless_password} + + +
+
+ + WiFi +
+ {/if} -
- - - Signal Name - - - {$lq__event_badge_template_obj.wireless_ssid} - - - - - Access Code - - - {$lq__event_badge_template_obj.wireless_password} - - -
-
- - WiFi -
- {/if} + +
- -
+
+ Download Meeting App: + +
    +
  1. Use QR code or search your app store for "App Name"
  2. +
  3. + Once downloaded, use the search feature to find "999th Meeting" guide +
  4. +
  5. You may also go to OneSkyIT.com
  6. +
+
+ + + {#if $lq__event_badge_obj.other_1 || $lq__event_badge_obj.other_2 || $lq__event_badge_obj.ticket_1_code || $lq__event_badge_obj.ticket_2_code || $lq__event_badge_obj.ticket_3_code || $lq__event_badge_obj.ticket_4_code || $lq__event_badge_obj.ticket_5_code} +
+ +
    + {#if $lq__event_badge_obj.ticket_1_code} +
  • {@html $lq__event_badge_template_obj.ticket_1_text}
  • + {/if} + {#if $lq__event_badge_obj.ticket_2_code} +
  • {@html $lq__event_badge_template_obj.ticket_2_text}
  • + {/if} + {#if $lq__event_badge_obj.ticket_3_code} +
  • {@html $lq__event_badge_template_obj.ticket_3_text}
  • + {/if} + {#if $lq__event_badge_obj.ticket_4_code} +
  • {@html $lq__event_badge_template_obj.ticket_4_text}
  • + {/if} + {#if $lq__event_badge_obj.ticket_5_code} +
  • {@html $lq__event_badge_template_obj.ticket_5_text}
  • + {/if} +
-
- Download Meeting App: - -
    -
  1. Use QR code or search your app store for "App Name"
  2. -
  3. Once downloaded, use the search feature to find "999th Meeting" guide
  4. -
  5. You may also go to OneSkyIT.com
  6. -
-
+ {#if $ae_loc.administrator_access} + {#if $lq__event_badge_obj.other_1} +
+ Other 1: {$lq__event_badge_obj.other_1} + {#if option_other_1_override && ['back_bool', 'front_back_bool'].includes(option_other_1_display_opt)} + - {option_other_1_override} + {:else if option_other_1_override && ['back_html', 'front_back_html'].includes(option_other_1_display_opt)} + - {@html option_other_1_override} + {/if} +
+ {/if} + {#if $lq__event_badge_obj.other_2} +
+ Other 2: {$lq__event_badge_obj.other_2} + {#if option_other_2_override && ['back_bool', 'front_back_bool'].includes(option_other_2_display_opt)} + - {option_other_2_override} + {:else if option_other_2_override && ['back_html', 'front_back_html'].includes(option_other_2_display_opt)} + - {@html option_other_2_override} + {/if} +
+ {/if} + {/if} +
+ + {/if} - - - {#if $lq__event_badge_obj.other_1 || $lq__event_badge_obj.other_2 || $lq__event_badge_obj.ticket_1_code || $lq__event_badge_obj.ticket_2_code || $lq__event_badge_obj.ticket_3_code || $lq__event_badge_obj.ticket_4_code || $lq__event_badge_obj.ticket_5_code} -
- -
    - {#if $lq__event_badge_obj.ticket_1_code} -
  • {@html $lq__event_badge_template_obj.ticket_1_text}
  • - {/if} - {#if $lq__event_badge_obj.ticket_2_code} -
  • {@html $lq__event_badge_template_obj.ticket_2_text}
  • - {/if} - {#if $lq__event_badge_obj.ticket_3_code} -
  • {@html $lq__event_badge_template_obj.ticket_3_text}
  • - {/if} - {#if $lq__event_badge_obj.ticket_4_code} -
  • {@html $lq__event_badge_template_obj.ticket_4_text}
  • - {/if} - {#if $lq__event_badge_obj.ticket_5_code} -
  • {@html $lq__event_badge_template_obj.ticket_5_text}
  • - {/if} -
+ {#if $lq__event_badge_template_obj.exhibitor_info} +
+ Exhibitor Info: + +
+ {/if} - {#if $ae_loc.administrator_access} - {#if $lq__event_badge_obj.other_1} -
Other 1: {$lq__event_badge_obj.other_1} - {#if (option_other_1_override && ['back_bool', 'front_back_bool'].includes(option_other_1_display_opt))} - - {option_other_1_override} - {:else if (option_other_1_override && ['back_html', 'front_back_html'].includes(option_other_1_display_opt))} - - {@html option_other_1_override} - {/if} -
- {/if} - {#if $lq__event_badge_obj.other_2} -
Other 2: {$lq__event_badge_obj.other_2} - {#if (option_other_2_override && ['back_bool', 'front_back_bool'].includes(option_other_2_display_opt))} - - {option_other_2_override} - {:else if (option_other_2_override && ['back_html', 'front_back_html'].includes(option_other_2_display_opt))} - - {@html option_other_2_override} - {/if} -
- {/if} - {/if} -
- - {/if} + {#if $lq__event_badge_template_obj.presenter_info} +
+ Presenter Info: + +
+ {/if} - {#if $lq__event_badge_template_obj.exhibitor_info} -
- Exhibitor Info: - -
- {/if} + {#if $lq__event_badge_template_obj.staff_info} +
+ Staff Info: + +
+ {/if} - {#if $lq__event_badge_template_obj.presenter_info} -
- Presenter Info: - -
- {/if} + {#if $lq__event_badge_template_obj.vip_info} +
+ VIP Info: + +
+ {/if} - {#if $lq__event_badge_template_obj.staff_info} -
- Staff Info: - -
- {/if} + {#if $lq__event_badge_template_obj.vote_info} +
+
Voting Info:
+ +
+ {/if} - {#if $lq__event_badge_template_obj.vip_info} -
- VIP Info: - -
- {/if} - - {#if $lq__event_badge_template_obj.vote_info} -
-
Voting Info:
- -
- {/if} - - {#if $lq__event_badge_template_obj.show_qr_back} -
-
- - {$lq__event_badge_obj.given_name}'s - - Badge ID and QR Code: -
-
- + + {$lq__event_badge_obj.given_name}'s + + Badge ID and QR Code: +
+
+ - {$lq__event_badge_obj.event_badge_id_random - } - -
- {#await qr_data_url} - - Generating... - {:then result} - {#if result} -
- + badge QR code { - // (hide_qr) ? hide_qr = !hide_qr : hide_qr; - (hide_qr) ? hide_qr = false : hide_qr = true; - }} - /> -
{ + // (hide_qr) ? hide_qr = !hide_qr : hide_qr; + hide_qr ? (hide_qr = false) : (hide_qr = true); + }} + /> +
- {#if allow_tracking} -

This was allowed at the time your badge was printed. You may opt-out at anytime.

-

By allowing this QR code to be scanned by an exhibitor or staff, you understand and agree that they may use your personal information.

- {:else} -

Tracking was not allowed at the time your badge was printed. You may opt-in at anytime.

-

If this QR code is scanned by an exhibitor or staff, they will not have access to your information.

- {/if} -
-
- {/if} - {/await} -
- {/if} + > + {#if allow_tracking} +

+ This was allowed at the time your badge was printed. You may + opt-out at anytime. +

+

+ By allowing this QR code to be scanned by an exhibitor or staff, you + understand and agree that they may use your personal information. +

+ {:else} +

+ Tracking was not allowed at the time your badge was printed. + You may opt-in at anytime. +

+

+ If this QR code is scanned by an exhibitor or staff, they will not have access to your information. +

+ {/if} +
+ + {/if} + {/await} + + {/if} + - - - + - + + +
+ + + + + + + + + + + + + + + {/if} + - - - - - - - - - - - - - - - - - - -{/if} - - - - -
+        ">
     {JSON.stringify($lq__event_badge_obj, null, 2)}
 
- diff --git a/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte b/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte index f56b7b03..f92717cc 100644 --- a/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte @@ -1,286 +1,303 @@ -
+ + {#if $lq__event_badge_obj_li?.length} +
+

Results:

+
+ + {$lq__event_badge_obj_li.length}× +
+
- -{#if $lq__event_badge_obj_li?.length} -
-

Results:

-
- - {$lq__event_badge_obj_li.length}× -
-
+ - - - - {#if show_sensitive_fields} - - - - - - - {event_badge_obj.email ? event_badge_obj.email.replace(/^(.{3}).*@/, '$1...@') : ''} - - {/if} - {#if !hide_affiliations} - - - {event_badge_obj?.affiliations ?? '-- no affiliations --'} - {/if} - {#if !hide_location} - - - {event_badge_obj?.location ?? '-- no location --'} - {/if} - {#if !hide_badge_type} - - - {event_badge_obj?.badge_type} - {/if} - - {/each} - - - -{:else} -
-

No results available to show.

-
-{/if} -
\ No newline at end of file + {:else} +
+

No results available to show.

+
+ {/if} + diff --git a/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_search.svelte b/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_search.svelte index 91ac249e..f4793046 100644 --- a/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_search.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_search.svelte @@ -1,552 +1,590 @@ -
- +> + - - - -{#if $events_sess.badges.show_form__search} -
{ - // ae_triggers.event_badge_qry = 'load__event_badge_obj_li'; - ae_triggers.event_badge_qry = true; - })} - autocomplete="off" - class=" + {#if $events_sess.badges.show_form__search} + { + // ae_triggers.event_badge_qry = 'load__event_badge_obj_li'; + ae_triggers.event_badge_qry = true; + })} + autocomplete="off" + class=" form grow flex flex-row flex-wrap gap-1 items-center justify-center w-full " - > + > + + {#if $ae_loc.trusted_access && badge_type_code_li} + + {/if} - - - - - {#if $ae_loc.trusted_access && badge_type_code_li} - - {/if} - - - { - if ($events_loc.badges.fulltext_search_qry_str.length >= 7) { - ae_triggers.event_badge_qry = true; - } - }} - title="Enter at least 3 characters to search. Search by name, email, affiliations, etc." - /> - + { + if ($events_loc.badges.fulltext_search_qry_str.length >= 7) { + ae_triggers.event_badge_qry = true; + } + }} + title="Enter at least 3 characters to search. Search by name, email, affiliations, etc." + /> + + + - - - - - - - + {#await ae_promises.load__event_badge_obj_li} + Loading... + {:then load_result} + {#if load_result === null} + + No entries found - null + + {:else if load_result?.length === 0} + + No entries found + + {:else if event_badge_id_li?.length === 0} + + Enter to search + + {:else} + + {load_result?.length ?? 0} found + + {/if} + {:catch error} + + Error loading entries. + + {/await} + + +
- + + {:else if $events_sess.badges.show_form__scan} + Not implemented yet. + {/if} - -{:else if $events_sess.badges.show_form__scan} - Not implemented yet. -{/if} +
+ {#if $events_sess.badges.show_form__search} + + {:else if $events_sess.badges.show_form__scan} + + {/if} - -
- {#if $events_sess.badges.show_form__search} - - {:else if $events_sess.badges.show_form__scan} - - {/if} - - - -
- -
\ No newline at end of file + + + + diff --git a/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte b/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte index 05fcd474..d4db6d4c 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher/+layout.svelte @@ -1,803 +1,840 @@ - - - + - Æ: - {$lq__event_location_obj?.name ?? '-- not set --'} - ({$lq__event_session_obj?.name ?? 'Æ loading...'}) - - Launcher v3 - - {$events_loc?.title} - + Æ: + {$lq__event_location_obj?.name ?? '-- not set --'} + ({$lq__event_session_obj?.name ?? 'Æ loading...'}) - Launcher v3 - + {$events_loc?.title} +
{ w-full max-w-7xl transition-all " - > - - -
-

+ > +

+ +

- - + {#if $lq__event_obj} + +

+ + {$lq__event_location_obj?.name} +

+ {:else} +
+ + Loading event... +
+ {/if} +
- {#if $lq__event_obj} - -

- - {$lq__event_location_obj?.name} -

- {:else} -
- - Loading event... -
- {/if} - - - - - - - + {@render children?.()}
- -{@render children?.()} - - - - -
- -
- - {$lq__event_location_obj?.name} - {#if $lq__event_device_obj?.name} - - {$lq__event_device_obj?.name} - {/if} -
+
+ + {$lq__event_location_obj?.name} + {#if $lq__event_device_obj?.name} + + {$lq__event_device_obj?.name} + {/if} +
- - {#if $idle} - - - {:else} - - - {/if} - + + {#if $idle} + + + {:else} + + + {/if} + - - + - - - + + + + + {online?.current ? '' : 'Offline!'} + + - class="group px-1 rounded-md transition-all duration-1000" - title="Online status = { online?.current }" - > - - - {online?.current ? '' : 'Offline!'} - - - - - + - - + - - {#if $events_sess.launcher.ws_connect_status == 'connected'} - - - {:else} - - - {/if} - + + {#if $events_sess.launcher.ws_connect_status == 'connected'} + + + {:else} + + + {/if} + - - {#if $events_sess.launcher?.av_recording_status} - - - {:else} - - - {/if} - + + {#if $events_sess.launcher?.av_recording_status} + + + {:else} + + + {/if} + -
- - - {#if $events_loc.launcher?.time_hours == 12} - {ae_util.iso_datetime_formatter($time,'time_12_long')} - {:else} - {ae_util.iso_datetime_formatter($time,'time_long')} - {/if} - - -
+
+ + + {#if $events_loc.launcher?.time_hours == 12} + {ae_util.iso_datetime_formatter($time, 'time_12_long')} + {:else} + {ae_util.iso_datetime_formatter($time, 'time_long')} + {/if} + + +
- -
- +
- + bgColor="bg-blue" + class="bg-orange-100 opacity-90 hover:opacity-97 transition-all duration-1000 border border-gray-300 dark:border-gray-600" + placement="left" + transitionType="fly" + transitionParams={{ + x: -320, + duration: 200, + easing: sineIn + }} + width={'w-md'} + bind:hidden={$events_loc.launcher.hide_drawer__cfg} + id="sidebar1" +> + - +
- -
- -
- - - Session Search - - {#if $events_slct?.event_location_id} - - - View Selected Location - - {/if} - {#if $events_slct?.event_session_id} - - - View Selected Session - - {/if} - - -
- +
- - -
-

- Debug -

- -
+ activateClickOutside={false} + backdrop={false} + class="bg-red-100 opacity-75 hover:opacity-95 transition-all duration-1000" + placement="bottom" + transitionType="fly" + transitionParams={{ + y: 320, + duration: 200, + easing: sineIn + }} + width={'min-h-96 h-1/2'} + bind:hidden={$events_loc.launcher.hide_drawer__debug} + id="sidebar2" +> +
+

Debug

+ +
-
- - -
+	
+ +
         {JSON.stringify($events_loc.launcher, null, 2)}
     
-
-
+		
+
         {JSON.stringify($ae_api, null, 2)}
     
- -
+
- - - + + { - $events_sess.launcher.modal__open_event_file_id = null; - if ($events_loc.launcher.controller == 'local_push' && $events_sess.launcher.ws_connect_status == 'connected') { - // // This should work....???? - // console.log(`TEST - FAIL??? Local Push Controller Command: ae_close:event_file_modal`); - // console.log(`Before: ${$events_sess.launcher.controller_trigger_send}`); - // // $events_sess.launcher.controller_cmd = `ae_close:event_file_modal`; - // // $events_sess.launcher.controller_trigger_send = true; - // // $events_sess = $events_sess; - // // events_sess.set($events_sess); - // // tick(); - // // events_sess.set($events_sess); - // console.log(`After: ${$events_sess.launcher.controller_trigger_send}`); - } - }} - > + bodyClass="p-0 space-y-0 overflow-y-auto flex flex-col gap-1 items-center justify-center" + headerClass={`fixed top-0 right-0 left-0 p-1 md:p-2 flex flex-row items-center ${$events_loc.launcher.controller == 'remote' ? 'hidden' : ''} bg-white dark:bg-gray-800 opacity-50 ${$events_loc.launcher.hide__modal_header_title ? 'justify-center' : 'justify-between'}`} + footerClass="text-center hidden" + onclose={async () => { + $events_sess.launcher.modal__open_event_file_id = null; + if ( + $events_loc.launcher.controller == 'local_push' && + $events_sess.launcher.ws_connect_status == 'connected' + ) { + // // This should work....???? + // console.log(`TEST - FAIL??? Local Push Controller Command: ae_close:event_file_modal`); + // console.log(`Before: ${$events_sess.launcher.controller_trigger_send}`); + // // $events_sess.launcher.controller_cmd = `ae_close:event_file_modal`; + // // $events_sess.launcher.controller_trigger_send = true; + // // $events_sess = $events_sess; + // // events_sess.set($events_sess); + // // tick(); + // // events_sess.set($events_sess); + // console.log(`After: ${$events_sess.launcher.controller_trigger_send}`); + } + }} +> + {#snippet header()} + +

+ {$events_sess.launcher?.modal__title ?? 'Digital Poster Display'} +

+ + + {/snippet} - {#snippet header()} - -

- {$events_sess.launcher?.modal__title ?? 'Digital Poster Display'} -

- - - {/snippet} - - - - - - - {#if $events_sess.launcher.modal__open_event_file_id} - Placeholder: /event/file/{$events_sess.launcher.modal__open_event_file_id}/download?filename={$events_slct.event_file_obj.filename}&x_no_account_id_token=direct-download - {:else} -
- - No image selected -
- {/if} + class:hidden={$events_loc.launcher.controller != 'local_push' || + $events_sess.launcher.ws_connect_status != 'connected'} + title="Close the remote device's display of the poster" + > + + + Close Remote Poster Display Only + + + + + {#if $events_sess.launcher.modal__open_event_file_id} + Placeholder: /event/file/{$events_sess.launcher
+				.modal__open_event_file_id}/download?filename={$events_slct.event_file_obj
+				.filename}&x_no_account_id_token=direct-download + {:else} +
+ + No image selected +
+ {/if} - + - + class:hidden={$events_loc.launcher.controller != 'local_push' || + $events_sess.launcher.ws_connect_status != 'connected'} + title="Close the remote device's display of the poster" + > + + + Close Remote Poster Display Only + - + - + class:hidden={!$ae_loc.trusted_access && + ($events_loc.launcher.controller != 'local_push' || + $events_sess.launcher.ws_connect_status != 'connected')} + title="Close this controller's local modal display of this poster" + > + + + Close + + + Poster + + on This Device + + - -
{#if $events_loc.launcher.controller_group_code && $events_loc.launcher.ws_connect} - - - + + + {/if} diff --git a/src/routes/events/[event_id]/(launcher)/launcher/+layout.ts b/src/routes/events/[event_id]/(launcher)/launcher/+layout.ts index d74edf89..131fbc63 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher/+layout.ts +++ b/src/routes/events/[event_id]/(launcher)/launcher/+layout.ts @@ -5,116 +5,115 @@ import { error } from '@sveltejs/kit'; import { browser } from '$app/environment'; import { events_func } from '$lib/ae_events_functions'; -export async function load({ params, parent, url }) { // route - let log_lvl: number = 0; +export async function load({ params, parent, url }) { + // route + const log_lvl: number = 0; - let data = await parent(); - // console.log(`ae events_pres_mgmt event [event_id] +page.ts data:`, data); - data.log_lvl = log_lvl; + const data = await parent(); + // console.log(`ae events_pres_mgmt event [event_id] +page.ts data:`, data); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; - // console.log(`ae_acct = `, ae_acct); + const account_id = data.account_id; + const ae_acct = data[account_id]; + // console.log(`ae_acct = `, ae_acct); - let event_id = params.event_id; - // if (!event_id) { - // console.log(`ae Events - [event_id] +page.ts: The event_id was not found in the params.event_id!!!`); - // error(404, { + const event_id = params.event_id; + // if (!event_id) { + // console.log(`ae Events - [event_id] +page.ts: The event_id was not found in the params.event_id!!!`); + // error(404, { // message: 'Event ID not found' // }); - // } + // } - // ae_acct.slct.event_id = event_id; + // ae_acct.slct.event_id = event_id; - // let load_event_obj = events_func.handle_load_ae_obj_id__event({ - // api_cfg: ae_acct.api, event_id: event_id, try_cache: true - // }); + // let load_event_obj = events_func.handle_load_ae_obj_id__event({ + // api_cfg: ae_acct.api, event_id: event_id, try_cache: true + // }); - // ae_acct.slct.event_obj = await load_event_obj; + // ae_acct.slct.event_obj = await load_event_obj; - if (browser) { - console.log(`ae_events Launcher - [event_id] launcher +layout.ts start`); + if (browser) { + console.log(`ae_events Launcher - [event_id] launcher +layout.ts start`); - // Load event object again, but with the event file list - // let load_event_obj = events_func.load_ae_obj_id__event({ - // api_cfg: ae_acct.api, - // event_id: event_id, - // inc_file_li: true, - // log_lvl: log_lvl - // }) - // .then((results) => { - // if (!results) { - // error(404, { - // message: 'Events Launcher - Event not found' - // }); - // } else { - // // ae_acct.slct.event_obj = results; - // } - // }); + // Load event object again, but with the event file list + // let load_event_obj = events_func.load_ae_obj_id__event({ + // api_cfg: ae_acct.api, + // event_id: event_id, + // inc_file_li: true, + // log_lvl: log_lvl + // }) + // .then((results) => { + // if (!results) { + // error(404, { + // message: 'Events Launcher - Event not found' + // }); + // } else { + // // ae_acct.slct.event_obj = results; + // } + // }); - let load_event_device_obj_li = events_func.load_ae_obj_li__event_device({ - api_cfg: ae_acct.api, - for_obj_type: 'event', - for_obj_id: event_id, - log_lvl: log_lvl - }); + const load_event_device_obj_li = events_func.load_ae_obj_li__event_device({ + api_cfg: ae_acct.api, + for_obj_type: 'event', + for_obj_id: event_id, + log_lvl: log_lvl + }); - let load_event_file_obj_li = events_func.load_ae_obj_li__event_file({ - api_cfg: ae_acct.api, - for_obj_type: 'event', - for_obj_id: event_id, - log_lvl: log_lvl - }); + const load_event_file_obj_li = events_func.load_ae_obj_li__event_file({ + api_cfg: ae_acct.api, + for_obj_type: 'event', + for_obj_id: event_id, + log_lvl: log_lvl + }); - // let load_event_obj = events_func.load_ae_obj_id__event({ - // api_cfg: ae_acct.api, event_id: event_id, try_cache: true, log_lvl: 1 - // }); - // console.log(`load_event_obj = `, load_event_obj); - // ae_acct.slct.event_obj = load_event_obj; + // let load_event_obj = events_func.load_ae_obj_id__event({ + // api_cfg: ae_acct.api, event_id: event_id, try_cache: true, log_lvl: 1 + // }); + // console.log(`load_event_obj = `, load_event_obj); + // ae_acct.slct.event_obj = load_event_obj; - // let load_event_session_obj_li = events_func.load_ae_obj_li__event_session({ - // api_cfg: ae_acct.api, - // for_obj_type: 'event', - // for_obj_id: event_id, - // params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 200}, - // try_cache: true, - // log_lvl: 1 - // }); - // console.log(`load_event_session_obj_li = `, load_event_session_obj_li); - // ae_acct.slct.event_session_obj_li = load_event_session_obj_li; + // let load_event_session_obj_li = events_func.load_ae_obj_li__event_session({ + // api_cfg: ae_acct.api, + // for_obj_type: 'event', + // for_obj_id: event_id, + // params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 200}, + // try_cache: true, + // log_lvl: 1 + // }); + // console.log(`load_event_session_obj_li = `, load_event_session_obj_li); + // ae_acct.slct.event_session_obj_li = load_event_session_obj_li; - // let load_event_location_obj_li = events_func.load_ae_obj_li__event_location({ - // api_cfg: ae_acct.api, - // for_obj_type: 'event', - // for_obj_id: event_id, - // params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 200}, - // try_cache: true, - // log_lvl: log_lvl - // }); - // console.log(`load_event_location_obj_li = `, load_event_location_obj_li); - // ae_acct.slct.event_location_obj_li = load_event_location_obj_li; + // let load_event_location_obj_li = events_func.load_ae_obj_li__event_location({ + // api_cfg: ae_acct.api, + // for_obj_type: 'event', + // for_obj_id: event_id, + // params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 200}, + // try_cache: true, + // log_lvl: log_lvl + // }); + // console.log(`load_event_location_obj_li = `, load_event_location_obj_li); + // ae_acct.slct.event_location_obj_li = load_event_location_obj_li; + // let event_session_id = url.searchParams.get('session_id'); + // if (event_session_id) { + // let load_event_session_obj = events_func.load_ae_obj_id__event_session({ + // api_cfg: ae_acct.api, + // event_session_id: event_session_id, + // inc_file_li: true, + // inc_presentation_li: true, + // inc_presenter_li: true, + // try_cache: true, + // log_lvl: log_lvl + // }); + // ae_acct.slct.event_session_id = event_session_id; + // console.log(`load_event_session_obj = `, load_event_session_obj); + // ae_acct.slct.event_session_obj = load_event_session_obj; + // } + } - // let event_session_id = url.searchParams.get('session_id'); - // if (event_session_id) { - // let load_event_session_obj = events_func.load_ae_obj_id__event_session({ - // api_cfg: ae_acct.api, - // event_session_id: event_session_id, - // inc_file_li: true, - // inc_presentation_li: true, - // inc_presenter_li: true, - // try_cache: true, - // log_lvl: log_lvl - // }); - // ae_acct.slct.event_session_id = event_session_id; - // console.log(`load_event_session_obj = `, load_event_session_obj); - // ae_acct.slct.event_session_obj = load_event_session_obj; - // } + // WARNING: Precaution against shared data between sites and sessions. + // data[account_id] = ae_acct; - } - - // WARNING: Precaution against shared data between sites and sessions. - // data[account_id] = ae_acct; - - return data; + return data; } diff --git a/src/routes/events/[event_id]/(launcher)/launcher/+page.svelte b/src/routes/events/[event_id]/(launcher)/launcher/+page.svelte index 4392472d..0fbba997 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher/+page.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher/+page.svelte @@ -1,4 +1,2 @@ diff --git a/src/routes/events/[event_id]/(launcher)/launcher/[event_location_id]/+page.svelte b/src/routes/events/[event_id]/(launcher)/launcher/[event_location_id]/+page.svelte index a195d9d3..8997ed48 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher/[event_location_id]/+page.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher/[event_location_id]/+page.svelte @@ -1,241 +1,249 @@ diff --git a/src/routes/events/[event_id]/(launcher)/launcher/[event_location_id]/+page.ts b/src/routes/events/[event_id]/(launcher)/launcher/[event_location_id]/+page.ts index 2139a209..1d64a37f 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher/[event_location_id]/+page.ts +++ b/src/routes/events/[event_id]/(launcher)/launcher/[event_location_id]/+page.ts @@ -5,85 +5,91 @@ console.log(`ae events launcher [event_location_id] +page.ts: start`); import { browser } from '$app/environment'; import { events_func } from '$lib/ae_events_functions'; -export async function load({ params, parent, url }) { // route - let log_lvl: number = 1; +export async function load({ params, parent, url }) { + // route + const log_lvl: number = 1; - let data = await parent(); - // console.log(`ae events_pres_mgmt event [event_location_id] +page.ts data:`, data); - data.log_lvl = log_lvl; + const data = await parent(); + // console.log(`ae events_pres_mgmt event [event_location_id] +page.ts data:`, data); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; + const account_id = data.account_id; + const ae_acct = data[account_id]; - let event_location_id = params.event_location_id; - if (!event_location_id) { - console.log(`ae Events - [event_id] launcher [event_location_id] +page.ts: The event_location_id was not found in the params.event_location_id!!!`); - error(404, { - message: 'Events Pres Mgmt - Event Location ID not found' - }); - } + const event_location_id = params.event_location_id; + if (!event_location_id) { + console.log( + `ae Events - [event_id] launcher [event_location_id] +page.ts: The event_location_id was not found in the params.event_location_id!!!` + ); + error(404, { + message: 'Events Pres Mgmt - Event Location ID not found' + }); + } - if (browser) { - if (log_lvl) { - console.log(`ae_events launcher [event_location_id] +page.ts: event_location_id = `, event_location_id); - } - // Load event_session object - // let load_event_session_obj_li = await events_func.load_ae_obj_li__event_session({ - let load_event_session_obj_li = events_func.load_ae_obj_li__event_session({ - api_cfg: ae_acct.api, - for_obj_type: 'event_location', - for_obj_id: event_location_id, - inc_file_li: true, // Only include files directly under the session? - inc_all_file_li: false, // Also include files under presentations and presenters as well? - inc_presentation_li: true, - inc_presenter_li: true, - enabled: 'enabled', - hidden: 'all', - limit: 150, - log_lvl: log_lvl - }) - .finally(() => { - // console.log(`load_event_session_obj_li = `, load_event_session_obj_li); - // ae_acct.trig.event_session_obj_li = false; - }); - ae_acct.slct.event_session_obj_li = load_event_session_obj_li; - // console.log(`ae_acct.slct.event_session_obj_li = `, ae_acct.slct.event_session_obj_li); + if (browser) { + if (log_lvl) { + console.log( + `ae_events launcher [event_location_id] +page.ts: event_location_id = `, + event_location_id + ); + } + // Load event_session object + // let load_event_session_obj_li = await events_func.load_ae_obj_li__event_session({ + const load_event_session_obj_li = events_func + .load_ae_obj_li__event_session({ + api_cfg: ae_acct.api, + for_obj_type: 'event_location', + for_obj_id: event_location_id, + inc_file_li: true, // Only include files directly under the session? + inc_all_file_li: false, // Also include files under presentations and presenters as well? + inc_presentation_li: true, + inc_presenter_li: true, + enabled: 'enabled', + hidden: 'all', + limit: 150, + log_lvl: log_lvl + }) + .finally(() => { + // console.log(`load_event_session_obj_li = `, load_event_session_obj_li); + // ae_acct.trig.event_session_obj_li = false; + }); + ae_acct.slct.event_session_obj_li = load_event_session_obj_li; + // console.log(`ae_acct.slct.event_session_obj_li = `, ae_acct.slct.event_session_obj_li); - // let id_li__event_session = []; + // let id_li__event_session = []; - // let tmp_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery. + // let tmp_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery. - // for (let i = 0; i < load_event_session_obj_li.length; i++) { - // let event_session_obj = load_event_session_obj_li[i]; - // let event_session_id_random = event_session_obj.event_session_id_random; - // tmp_li.push(event_session_id_random); - // } - // id_li__event_session = tmp_li; - // console.log(`id_li__event_session:`, id_li__event_session); - // ae_acct.slct.id_li__event_session = id_li__event_session; + // for (let i = 0; i < load_event_session_obj_li.length; i++) { + // let event_session_obj = load_event_session_obj_li[i]; + // let event_session_id_random = event_session_obj.event_session_id_random; + // tmp_li.push(event_session_id_random); + // } + // id_li__event_session = tmp_li; + // console.log(`id_li__event_session:`, id_li__event_session); + // ae_acct.slct.id_li__event_session = id_li__event_session; - // This should only be needed if the session ID passed is not part of the location sessions. - // let event_session_id = url.searchParams.get('session_id'); - // if (event_session_id) { - // let load_event_session_obj = await events_func.load_ae_obj_id__event_session({ - // api_cfg: ae_acct.api, - // event_session_id: event_session_id, - // inc_file_li: true, - // inc_presentation_li: true, - // inc_presenter_li: true, - // log_lvl: log_lvl - // }); - // ae_acct.slct.event_session_id = event_session_id; - // console.log(`load_event_session_obj = `, load_event_session_obj); - // ae_acct.slct.event_session_obj = load_event_session_obj; - // } + // This should only be needed if the session ID passed is not part of the location sessions. + // let event_session_id = url.searchParams.get('session_id'); + // if (event_session_id) { + // let load_event_session_obj = await events_func.load_ae_obj_id__event_session({ + // api_cfg: ae_acct.api, + // event_session_id: event_session_id, + // inc_file_li: true, + // inc_presentation_li: true, + // inc_presenter_li: true, + // log_lvl: log_lvl + // }); + // ae_acct.slct.event_session_id = event_session_id; + // console.log(`load_event_session_obj = `, load_event_session_obj); + // ae_acct.slct.event_session_obj = load_event_session_obj; + // } + } else { + console.log(`ae pres_mgmt launcher [slug] +page.ts: browser = false`); + } - } else { - console.log(`ae pres_mgmt launcher [slug] +page.ts: browser = false`); - } + // WARNING: Precaution against shared data between sites and sessions. + data[account_id] = ae_acct; - // WARNING: Precaution against shared data between sites and sessions. - data[account_id] = ae_acct; - - return data; + return data; } diff --git a/src/routes/events/[event_id]/(launcher)/launcher_cfg.svelte b/src/routes/events/[event_id]/(launcher)/launcher_cfg.svelte index 4316c24b..13106435 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_cfg.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_cfg.svelte @@ -1,245 +1,238 @@ -
+> +
+

+ Launcher Configuration +

-
-

- Launcher Configuration -

+ +
- -
+ +
+

+ +

- +
+
+ +
+
+ { + $events_sess.launcher.controller_unlock_group_code = + !$events_sess.launcher.controller_unlock_group_code; -
-

- -

+ - if ($events_loc.launcher.ws_connect) { - $events_sess.launcher.trigger__ws_disconnect = true; - } else { - // $events_sess.launcher.trigger__ws_connect = true; - } - // $events_loc.launcher.ws_connect = false; - }} - readonly={!$events_sess.launcher.controller_unlock_group_code} - > + {#if $events_loc.launcher.ws_connect} + + {/if} +
+
+
- +
+

+ +

- {#if $events_loc.launcher.ws_connect} - - {/if} -
+
+ + -
- + + - + + + + + -
-

+ - -

- -
- - - - - - - - - - - -
- -
- - - - - - - - + + -
-

- -

+
+

+ +

-
+
+
+ {#if !$events_loc.launcher.app_mode || $events_loc.launcher.app_mode != 'default'} + + {/if} + {#if $events_loc.launcher.app_mode != 'native'} + + {/if} + {#if $events_loc.launcher.app_mode != 'onsite'} + + {/if} +
-
- {#if !$events_loc.launcher.app_mode || $events_loc.launcher.app_mode != 'default'} - - {/if} - {#if $events_loc.launcher.app_mode != 'native'} - - {/if} - {#if $events_loc.launcher.app_mode != 'onsite'} - - {/if} -
+
+ {#if $events_loc.launcher.hide__launcher_menu} + + {/if} + {#if !$events_loc.launcher.hide__launcher_header} + + {/if} + {#if $events_loc.launcher.hide__launcher_header} + + {/if} -
- {#if $events_loc.launcher.hide__launcher_menu} - - {/if} - {#if !$events_loc.launcher.hide__launcher_header} - - {/if} - {#if $events_loc.launcher.hide__launcher_header} - - {/if} + {#if !$events_loc.launcher.hide__launcher_footer} + + {/if} + {#if $events_loc.launcher.hide__launcher_footer} + + {/if} - {#if !$events_loc.launcher.hide__launcher_footer} - - {/if} - {#if $events_loc.launcher.hide__launcher_footer} - - {/if} + + {#if !$events_loc.launcher.hide__launcher_menu} + + {/if} + + {#if !$events_loc.launcher.hide__session_datetimes} + + {/if} + {#if $events_loc.launcher.hide__session_datetimes} + + {/if} - - {#if !$events_loc.launcher.hide__launcher_menu} - - {/if} - - {#if !$events_loc.launcher.hide__session_datetimes} - - {/if} - {#if $events_loc.launcher.hide__session_datetimes} - - {/if} + - + + {#if !$events_loc.launcher.hide__ws_element} + + {/if} + {#if $events_loc.launcher.hide__ws_element} + + {/if} - - {#if !$events_loc.launcher.hide__ws_element} - - {/if} - {#if $events_loc.launcher.hide__ws_element} - - {/if} + + {#if !$events_loc.launcher.hide__modal_header_title} + + {/if} + {#if $events_loc.launcher.hide__modal_header_title} + + {/if} +
+
+
- - {#if !$events_loc.launcher.hide__modal_header_title} - - {/if} - {#if $events_loc.launcher.hide__modal_header_title} - - {/if} +
+

+ +

- + +
+
+ { - const val = (event.target as HTMLSelectElement).value; - if (val && val != '') { - if (val == 'delete_idbs') { - // Delete all IDB tables - if (confirm('Are you sure you want to delete ALL IndexedDB databases? This will log you out of the app and you will need to reload the app.')) { - // continue - } else { - (event.target as HTMLSelectElement).value = ''; - return false; - } + localStorage.removeItem('ae_events_loc'); + // localStorage.removeItem('ae_event_cfg_' + $lq__event_obj?.event_id); + // localStorage.removeItem('ae_event_launcher_' + $lq__event_obj?.event_id); + location.reload(); + } - indexedDB.deleteDatabase('ae_archives_db'); // Archives module - indexedDB.deleteDatabase('ae_core_db'); - indexedDB.deleteDatabase('ae_events_db'); // Events module - indexedDB.deleteDatabase('ae_journals_db'); // Journals module - indexedDB.deleteDatabase('ae_posts_db'); // Posts module - indexedDB.deleteDatabase('ae_sponsorships_db'); // Sponsorships module + (event.target as HTMLSelectElement).value = ''; + } + }} + > + + + + + + + + The action happens when the option is selected + +
- alert('All IndexedDB databases deleted. Please reload the app.'); - } else if (val == 'delete_idbs_events') { - // Delete Event IDB tables - if (confirm('Are you sure you want to delete ONLY the Events IndexedDB database? This will log you out of the app and you will need to reload the app.')) { - // continue - } else { - (event.target as HTMLSelectElement).value = ''; - return false; - } +
+ + - indexedDB.deleteDatabase('ae_events_db'); // Events module - alert('Events IndexedDB database deleted. Please reload the app.'); - } else if (val == 'delete_local') { - // Delete all local config - if (confirm('Are you sure you want to delete ALL local config in localStorage? This will log you out of the app and you will need to reload the app.')) { - // continue - } else { - (event.target as HTMLSelectElement).value = ''; - return false; - } + + +
- localStorage.removeItem('ae_loc'); - localStorage.removeItem('ae_events_loc'); - localStorage.removeItem('ae_idaa_loc'); - localStorage.removeItem('ae_journals_loc'); - location.reload(); - } else if (val == 'delete_local_events') { - // Delete local config for Events - if (confirm('Are you sure you want to delete ONLY the Events local config in localStorage? This will log you out of the app and you will need to reload the app.')) { - // continue - } else { - (event.target as HTMLSelectElement).value = ''; - return false; - } +
API: {$ae_api.base_url}
+
+
- localStorage.removeItem('ae_events_loc'); - // localStorage.removeItem('ae_event_cfg_' + $lq__event_obj?.event_id); - // localStorage.removeItem('ae_event_launcher_' + $lq__event_obj?.event_id); - location.reload(); - } + - (event.target as HTMLSelectElement).value = ''; - } - }} - > - - - - - - - - The action happens when the option is selected - +
+ + + +
- -
- - - - - - -
- -
API: {$ae_api.base_url}
- - - -
- - - - - -
- - - -
- - \ No newline at end of file diff --git a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte index 0e04f33b..d98989c7 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte @@ -1,280 +1,338 @@ -
(fn: (event: T) => void) { max-w-full transition-all " - > +> + {#if open_file_clicked} +
+ {#if $events_loc.launcher.app_mode == 'native'} + {#if open_file_status} +
*** {open_file_status_message} ***
+ {/if} -{#if open_file_clicked} -
- {#if ($events_loc.launcher.app_mode == 'native')} - {#if (open_file_status)} -
*** {open_file_status_message} ***
- {/if} + +

Most files will automatically be opened full screen.

+

PowerPoint or KeyNote will attempt to display in presenter view.

+

PDFs, videos, and images will attempt to be displayed mirrored.

+

Please close the file when finished.

+ {:else if $events_loc.launcher.app_mode == 'onsite'} + *** Please wait while this file loads... *** +

Most files will automatically be opened full screen.

+

PowerPoint or KeyNote will attempt to display in presenter view.

+

PDFs, videos, and images will attempt to be displayed mirrored.

+

Please close the file when finished.

+ {:else} + *** Please wait while this file downloads... *** +

Onsite in the Speaker Ready Room and conference session rooms:

+
    +
  • Most files will automatically be opened full screen.
  • +
  • PowerPoint or KeyNote will attempt to display in presenter view.
  • +
  • PDFs, videos, and images will attempt to be displayed mirrored.
  • +
  • Please close the file when finished.
  • +
+ {/if} +
+ {/if} - -

Most files will automatically be opened full screen.

-

PowerPoint or KeyNote will attempt to display in presenter view.

-

PDFs, videos, and images will attempt to be displayed mirrored.

-

Please close the file when finished.

- {:else if ($events_loc.launcher.app_mode == 'onsite')} - *** Please wait while this file loads... *** -

Most files will automatically be opened full screen.

-

PowerPoint or KeyNote will attempt to display in presenter view.

-

PDFs, videos, and images will attempt to be displayed mirrored.

-

Please close the file when finished.

- {:else} - *** Please wait while this file downloads... *** -

Onsite in the Speaker Ready Room and conference session rooms:

-
    -
  • Most files will automatically be opened full screen.
  • -
  • PowerPoint or KeyNote will attempt to display in presenter view.
  • -
  • PDFs, videos, and images will attempt to be displayed mirrored.
  • -
  • Please close the file when finished.
  • -
- {/if} -
-{/if} - - - - - -{#if (session_type == 'poster' || open_method == 'modal')} - + {#if session_type == 'poster' || open_method == 'modal'} + - + title={`Open this file in a modal window:\n${event_file_obj.filename}\n[API] SHA256: ${event_file_obj.hash_sha256.slice(0, 10)}...\nHosted ID: ${event_file_obj.hosted_file_id_random} Event File ID: ${event_file_id}`} + > + {#if screen_saver_exts.includes(event_file_obj.extension)} + + Open Poster + + {:else} + + {ae_util.shorten_filename({ + filename: event_file_obj.filename, + max_length: max_filename_length + })} + {/if} + + + + + {:else if $events_loc.launcher.app_mode == 'native'} + { + handle_open_file(); + })} + data-hash_sha256={event_file_obj.hash_sha256} + data-filename={event_file_obj.filename} + title={`${event_file_obj.filename} [A] -- SHA256 hash: ${event_file_obj.hash_sha256.slice(0, 10)}...`} + > + + {ae_util.shorten_filename({ + filename: event_file_obj.filename, + max_length: max_filename_length + })} + - - -{:else if ($events_loc.launcher.app_mode == 'native')} - {handle_open_file();})} - data-hash_sha256={event_file_obj.hash_sha256} - data-filename={event_file_obj.filename} - title={`${event_file_obj.filename} [A] -- SHA256 hash: ${event_file_obj.hash_sha256.slice(0, 10)}...`} - > - {ae_util.shorten_filename({filename: event_file_obj.filename, max_length: max_filename_length})} - - - - - + + + {:else} + -{/if} + class:hidden={!event_file_obj.file_purpose} + > + {event_file_obj.file_purpose} + + + {/if} + - + + - // if ($events_loc.launcher.app_mode == 'onsite' && (event_file_obj.extension == 'ppt' || event_file_obj.extension == 'pptx') && event_file_obj.open_in_os == 'win') { - // // Example: the_new_filename.pptxwin - // new_filename = event_file_obj.filename + 'win'; - // } + { + console.log(`ae_crud_updated:`, e.detail); - // ae_promises[event_file_id] - ae_promises[event_file_id] = api.download_hosted_file({ - api_cfg: $ae_api, - hosted_file_id: event_file_obj.hosted_file_id_random, // +'x' - return_file: true, - filename: event_file_obj.filename, - auto_download: true, - log_lvl: 1 - }); + events_func.load_ae_obj_id__event_file({ + api_cfg: $ae_api, + event_file_id: event_file_obj?.event_file_id_random, + log_lvl: log_lvl + }); + }} + > + + + // $events_slct.exhibit_tracking_obj.open_in_os = !event_file_obj?.open_in_os; + ae_triggers.open_in_os = true; + }} + class="btn btn-sm transition-all group" + class:preset-tonal-success={event_file_obj?.open_in_os == 'win'} + class:preset-tonal-warning={event_file_obj?.open_in_os == 'mac'} + disabled={!$ae_loc.trusted_access} + title="Open with: {event_file_obj?.open_in_os ?? 'Default'}" + > + {#if event_file_obj?.open_in_os == 'win'} + + + {:else if event_file_obj?.open_in_os == 'mac'} + + + + {:else} + + + {/if} + + + - - { - console.log(`ae_crud_updated:`, e.detail); - - events_func.load_ae_obj_id__event_file({ - api_cfg: $ae_api, - event_file_id: event_file_obj?.event_file_id_random, - log_lvl: log_lvl - }); - }} - > - - - - - - (fn: (event: T) => void) { px-1 py-0.5 " - class:hidden="{hide_created_on}" - > - - - - {ae_util.iso_datetime_formatter(event_file_obj.created_on, 'date_short')} - - - - {ae_util.iso_datetime_formatter(event_file_obj.created_on, 'time_12_short')} - - - + class:hidden={hide_created_on} + > + + + + {ae_util.iso_datetime_formatter(event_file_obj.created_on, 'date_short')} + + + + {ae_util.iso_datetime_formatter(event_file_obj.created_on, 'time_12_short')} + + + - (fn: (event: T) => void) { rounded py-0.5 " - class:hidden="{hide_size}" - > - - {#if event_file_obj.file_size}{ae_util.format_bytes(event_file_obj.file_size)}{/if} - + class:hidden={hide_size} + > + + {#if event_file_obj.file_size}{ae_util.format_bytes(event_file_obj.file_size)}{/if} + + + + - - - + + + - - - - - -
- diff --git a/src/routes/events/[event_id]/(launcher)/launcher_menu.svelte b/src/routes/events/[event_id]/(launcher)/launcher_menu.svelte index 58b16e1c..ba9c740f 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_menu.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_menu.svelte @@ -1,127 +1,134 @@ -
- +> + - -{#if $lq__event_event_file_obj_li} -
- - {#each $lq__event_event_file_obj_li as event_file_obj, index} - + {/each} +
+ {/if} - bind:modal__title={$events_sess.launcher.modal__title} - bind:modal__open_event_file_id={$events_sess.launcher.modal__open_event_file_id} - bind:modal__event_file_obj={$events_sess.launcher.modal__event_file_obj} - /> - {/each} -
-{/if} + {#if $ae_loc.edit_mode} + + {/if} + {#if $lq__location_event_file_obj_li} +
+ {#each $lq__location_event_file_obj_li as event_file_obj, index} + + {/each} +
+ {/if} -{#if $ae_loc.edit_mode} - -{/if} + {#if $lq__event_session_obj_li} + + {/if} - -{#if $lq__location_event_file_obj_li} -
- {#each $lq__location_event_file_obj_li as event_file_obj, index} - - {/each} -
-{/if} - - -{#if $lq__event_session_obj_li} - -{/if} - - -{#if $ae_loc.edit_mode} -
- - + + > + {#if $events_loc.launcher.show_content__hidden_sessions} + + Hide Sessions + {:else} + + All Sessions + {/if} + +
+ {/if} -{/if} - - - \ No newline at end of file diff --git a/src/routes/events/[event_id]/(launcher)/launcher_presenter_view.svelte b/src/routes/events/[event_id]/(launcher)/launcher_presenter_view.svelte index d980cca1..3f0e3a6f 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_presenter_view.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_presenter_view.svelte @@ -1,98 +1,111 @@ - - {#if lq__event_presenter_obj?.given_name && lq__event_presenter_obj?.given_name != 'Group'} - - {lq__event_presenter_obj?.full_name} - {:else if lq__event_presenter_obj?.given_name == 'Group'} - - {lq__event_presenter_obj?.affiliations} - {:else} - --not set-- - {/if } + {#if lq__event_presenter_obj?.given_name && lq__event_presenter_obj?.given_name != 'Group'} + + {lq__event_presenter_obj?.full_name} + {:else if lq__event_presenter_obj?.given_name == 'Group'} + + {lq__event_presenter_obj?.affiliations} + {:else} + --not set-- + {/if} {#if !lq__event_presenter_obj?.file_count} -

- - No files to show for this presenter at this time. - -

+

+ + No files to show for this presenter at this time. + +

{/if} {#if $lq__event_file_obj_li && $lq__event_file_obj_li.length} -
-
-
- - Presenter Files: - {#if $ae_loc.administrator_access && $ae_loc.edit_mode} - ({$lq__event_file_obj_li?.length}×) - {/if} -
-
-
    - {#each $lq__event_file_obj_li as event_file_obj, index} -
  • - - -
  • - {/each} -
-
+
+
+
+ + + Presenter Files: + {#if $ae_loc.administrator_access && $ae_loc.edit_mode} + ({$lq__event_file_obj_li?.length}×) + {/if} + +
+
+
    + {#each $lq__event_file_obj_li as event_file_obj, index} +
  • + +
  • + {/each} +
+
{/if} diff --git a/src/routes/events/[event_id]/(launcher)/launcher_presenter_view_posters.svelte b/src/routes/events/[event_id]/(launcher)/launcher_presenter_view_posters.svelte index c3b6250c..5209a334 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_presenter_view_posters.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_presenter_view_posters.svelte @@ -1,73 +1,81 @@ - - - {#if lq__event_presenter_obj?.given_name && lq__event_presenter_obj?.given_name != 'Group'} - - {lq__event_presenter_obj?.full_name} - {:else if lq__event_presenter_obj?.given_name == 'Group'} - - {lq__event_presenter_obj?.affiliations} - {:else} - --not set-- - {/if } + + {#if lq__event_presenter_obj?.given_name && lq__event_presenter_obj?.given_name != 'Group'} + + {lq__event_presenter_obj?.full_name} + {:else if lq__event_presenter_obj?.given_name == 'Group'} + + {lq__event_presenter_obj?.affiliations} + {:else} + --not set-- + {/if} {#if !lq__event_presenter_obj?.file_count} -

- - No files to show for this presenter at this time. - -

+

+ + No files to show for this presenter at this time. + +

{/if} {#if $lq__event_file_obj_li && $lq__event_file_obj_li.length} -
- -
    - {#each $lq__event_file_obj_li as event_file_obj, index} -
  • - -
  • - {/each} -
-
+
    + {#each $lq__event_file_obj_li as event_file_obj, index} +
  • + +
  • + {/each} +
+ {/if} diff --git a/src/routes/events/[event_id]/(launcher)/launcher_session_view.svelte b/src/routes/events/[event_id]/(launcher)/launcher_session_view.svelte index bb731f34..f540da2d 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_session_view.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_session_view.svelte @@ -1,326 +1,367 @@ -
- +> + -{#if $events_sess.launcher.loading__session_id_status} - - - Loading session information... - - -{/if} + {/if} + {#if $lq__event_session_obj && $lq__event_session_obj.event_session_id_random} +
+

+ +

-{#if $lq__event_session_obj && $lq__event_session_obj.event_session_id_random} -
+ +

+ {$lq__event_session_obj?.name} +

+ {#if $lq__event_session_obj?.code} + + + {$lq__event_session_obj?.code} + + {/if} +
+
-

- -

- - -

- {$lq__event_session_obj?.name} -

- {#if $lq__event_session_obj?.code} - - - {$lq__event_session_obj?.code} - - {/if} -
- -
- - - {#if !$lq__event_session_obj?.file_count_all} -

- - Warning - -
- No files available show for this session. + {#if !$lq__event_session_obj?.file_count_all} +

+ + Warning + +
+ No files available show for this session. +

+ {/if} -

- {/if} + {#if $lq__event_file_obj_li && $lq__event_file_obj_li.length} +
+
+
+ + + Session Files: - - {#if $lq__event_file_obj_li && $lq__event_file_obj_li.length} -
-
-
- - - Session Files: - - - ({$lq__event_file_obj_li?.length}×) - - -
- -
-
    - {#each $lq__event_file_obj_li as event_file_obj, index} -
  • +
+
    + {#each $lq__event_file_obj_li as event_file_obj, index} +
  • + - --> - bind:modal__title={$events_sess.launcher.modal__title} - bind:modal__open_event_file_id={$events_sess.launcher.modal__open_event_file_id} - bind:modal__event_file_obj={$events_sess.launcher.modal__event_file_obj} - /> - - - - - -
  • - {/each} -
-
- {/if} + + {/each} + + + {/if} - + -
+
+ + {#if $lq__event_presentation_obj_li} +
+ + {#if type_code == 'poster'} + + Posters: + {:else} + + Presentations: + {/if} + {#if $ae_loc.administrator_access && $ae_loc.edit_mode} + ({$lq__event_presentation_obj_li?.length}×) + {/if} + +
- + +
    + {#each $lq__event_presentation_obj_li as event_presentation_obj} +
  • + +
    + + {#if event_presentation_obj?.start_datetime} + {ae_util.iso_datetime_formatter( + event_presentation_obj?.start_datetime, + 'time_12_short_no_leading' + )} + {/if} - {#if $lq__event_presentation_obj_li} + {event_presentation_obj?.name} + -
    - {#if type_code == 'poster'} - - Posters: - {:else} - - Presentations: - {/if} - {#if $ae_loc.administrator_access && $ae_loc.edit_mode} - ({$lq__event_presentation_obj_li?.length}×) - {/if} -
    + + {#if $lq__event_presenter_obj_li && type_code == 'poster'} + {#each $lq__event_presenter_obj_li as event_presenter_obj, index} + {#if event_presenter_obj.event_presentation_id_random == event_presentation_obj.event_presentation_id_random} + + {#if $lq__event_presenter_obj_li[index]?.given_name && $lq__event_presenter_obj_li[index]?.given_name != 'Group'} + + {$lq__event_presenter_obj_li[index]?.full_name} + {:else if $lq__event_presenter_obj_li[index]?.given_name == 'Group'} + + {$lq__event_presenter_obj_li[index]?.affiliations} + {:else} + --not set-- + {/if} + + {/if} + {/each} + {/if} +
    - -
      - {#each $lq__event_presentation_obj_li as event_presentation_obj} -
    • + - -
      - - {#if event_presentation_obj?.start_datetime} - {ae_util.iso_datetime_formatter(event_presentation_obj?.start_datetime, 'time_12_short_no_leading')} - {/if} - - {event_presentation_obj?.name} - - - - {#if $lq__event_presenter_obj_li && type_code == 'poster'} - {#each $lq__event_presenter_obj_li as event_presenter_obj, index} - {#if event_presenter_obj.event_presentation_id_random == event_presentation_obj.event_presentation_id_random} - - {#if $lq__event_presenter_obj_li[index]?.given_name && $lq__event_presenter_obj_li[index]?.given_name != 'Group'} - - {$lq__event_presenter_obj_li[index]?.full_name} - {:else if $lq__event_presenter_obj_li[index]?.given_name == 'Group'} - - {$lq__event_presenter_obj_li[index]?.affiliations} - {:else} - --not set-- - {/if } - - - {/if} - {/each} - {/if} -
      - - - - {#if $lq__event_presenter_obj_li && $lq__event_presenter_obj_li.length} -
        - {#each $lq__event_presenter_obj_li as event_presenter_obj, index} - {#if event_presenter_obj.event_presentation_id_random == event_presentation_obj.event_presentation_id_random} -
      • + {#each $lq__event_presenter_obj_li as event_presenter_obj, index} + {#if event_presenter_obj.event_presentation_id_random == event_presentation_obj.event_presentation_id_random} +
      • - {#if type_code == 'poster'} - - {:else} - - {/if} - -
      • - {/if} - {/each} -
      - {:else} - No presenters to display - {/if} - -
    • - {/each} -
    - {:else} -

    No presentations available to display.

    - {/if} -
-{:else} - - No session selected -{/if} - + > + {#if type_code == 'poster'} + + {:else} + + {/if} + + + {/if} + {/each} + + {:else} + No presenters to display + {/if} + + {/each} + + {:else} +

No presentations available to display.

+ {/if} +
+ {:else} + + No session selected + {/if}
- diff --git a/src/routes/events/[event_id]/(launcher)/menu_location_list.svelte b/src/routes/events/[event_id]/(launcher)/menu_location_list.svelte index 4acd1e1d..cac73d56 100644 --- a/src/routes/events/[event_id]/(launcher)/menu_location_list.svelte +++ b/src/routes/events/[event_id]/(launcher)/menu_location_list.svelte @@ -1,195 +1,202 @@
- {#if $lq__event_location_obj_li && $lq__event_location_obj_li.length > 0} -
- - Location: - - ({$lq__event_location_obj_li?.length}×) - +> + {#if $lq__event_location_obj_li && $lq__event_location_obj_li.length > 0} +
+ + Location: + + ({$lq__event_location_obj_li?.length}×) + - - {#await ae_promises[slct_event_location_id]} - - {:then result} - - {/await} - -
+ + {#await ae_promises[slct_event_location_id]} + + {:then result} + + {/await} +
+
- { + // console.log(`slct_event_location_id:`, slct_event_location_id); - loading__session_li_status = true; + loading__session_li_status = true; - console.log('Remove fields from the URL.'); - // data_url.searchParams.delete('location_id'); - data_url.searchParams.delete('presentation_id'); - data_url.searchParams.delete('presenter_id'); - data_url.searchParams.delete('session_id'); + console.log('Remove fields from the URL.'); + // data_url.searchParams.delete('location_id'); + data_url.searchParams.delete('presentation_id'); + data_url.searchParams.delete('presenter_id'); + data_url.searchParams.delete('session_id'); - // let url_location_id = slct_event_location_id; - // data_url.searchParams.set('location_id', url_location_id); + // let url_location_id = slct_event_location_id; + // data_url.searchParams.set('location_id', url_location_id); - let new_url = `/events/${$events_slct.event_id}/launcher`; + let new_url = `/events/${$events_slct.event_id}/launcher`; - if (slct_event_location_id) { - loading__session_li_status = 'loading'; + if (slct_event_location_id) { + loading__session_li_status = 'loading'; - $events_loc.launcher.slct.event_location_id = slct_event_location_id; - $events_slct.event_location_id = slct_event_location_id; + $events_loc.launcher.slct.event_location_id = slct_event_location_id; + $events_slct.event_location_id = slct_event_location_id; - // Load the sessions for this location - await handle_load_ae_obj_li__event_session(slct_event_location_id); + // Load the sessions for this location + await handle_load_ae_obj_li__event_session(slct_event_location_id); + new_url = `/events/${$events_slct.event_id}/launcher/${slct_event_location_id}`; - new_url = `/events/${$events_slct.event_id}/launcher/${slct_event_location_id}`; + loading__session_li_status = 'finished'; + } else { + // This will hide the selected session if the location is changed to false. + // WARNING: This may need to be commented out later. + // slct_event_session_id = null; + $events_loc.launcher.slct.event_location_id = null; + $events_slct.event_location_id = null; + $events_loc.launcher.slct.event_session_id = null; + $events_slct.event_session_id = null; - loading__session_li_status = 'finished'; + loading__session_li_status = 'finished'; + // WARNING: This may need to be commented out later. + } - } else { - // This will hide the selected session if the location is changed to false. - // WARNING: This may need to be commented out later. - // slct_event_session_id = null; - $events_loc.launcher.slct.event_location_id = null; - $events_slct.event_location_id = null; - $events_loc.launcher.slct.event_session_id = null; - $events_slct.event_session_id = null; - - loading__session_li_status = 'finished'; - // WARNING: This may need to be commented out later. - } - - loading__session_li_status = null; - // goto(new_url, {replaceState: true}); // Updates the URL without reloading the page - goto(new_url, {replaceState: false}); // Updates the URL history without reloading the page - }} - > - - {#each $lq__event_location_obj_li as event_location_obj} - - {/each} - - {:else} -
- No locations found. - -
- {/if} -
\ No newline at end of file + loading__session_li_status = null; + // goto(new_url, {replaceState: true}); // Updates the URL without reloading the page + goto(new_url, { replaceState: false }); // Updates the URL history without reloading the page + }} + > + + {#each $lq__event_location_obj_li as event_location_obj} + + {/each} + + {:else} +
+ No locations found. + +
+ {/if} + diff --git a/src/routes/events/[event_id]/(launcher)/menu_session_list.svelte b/src/routes/events/[event_id]/(launcher)/menu_session_list.svelte index 79f83c0e..bf7ad0d3 100644 --- a/src/routes/events/[event_id]/(launcher)/menu_session_list.svelte +++ b/src/routes/events/[event_id]/(launcher)/menu_session_list.svelte @@ -1,283 +1,292 @@ -
-{#if $lq__event_session_obj_li && $lq__event_session_obj_li.length > 0} -
- - Sessions: - - ({$lq__event_session_obj_li?.length}×) - +> + {#if $lq__event_session_obj_li && $lq__event_session_obj_li.length > 0} +
+ + Sessions: + + ({$lq__event_session_obj_li?.length}×) + - - {#await ae_promises.slct__event_session_id} - - {:then result} - - {/await} - -
+ + {#await ae_promises.slct__event_session_id} + + {:then result} + + {/await} +
+
-
    - {#each $lq__event_session_obj_li as event_session_obj} -
  • - -
  • - {/each} -
-{:else} -
- No sessions found. + > + {event_session_obj?.name} + + + + {/each} + + {:else} +
No sessions found.
+ {/if}
-{/if} -
\ No newline at end of file diff --git a/src/routes/events/[event_id]/+layout.svelte b/src/routes/events/[event_id]/+layout.svelte index 3329e8f3..be85b74e 100644 --- a/src/routes/events/[event_id]/+layout.svelte +++ b/src/routes/events/[event_id]/+layout.svelte @@ -1,56 +1,64 @@ - {@render children?.()} diff --git a/src/routes/events/[event_id]/+layout.ts b/src/routes/events/[event_id]/+layout.ts index 49ec1ecb..de7d796e 100644 --- a/src/routes/events/[event_id]/+layout.ts +++ b/src/routes/events/[event_id]/+layout.ts @@ -5,65 +5,67 @@ import { error } from '@sveltejs/kit'; import { browser } from '$app/environment'; import { events_func } from '$lib/ae_events_functions'; +export async function load({ params, parent, url }) { + // route + const log_lvl: number = 0; -export async function load({ params, parent, url }) { // route - let log_lvl: number = 0; + const data = await parent(); + // console.log(`ae events_pres_mgmt event [event_id] +page.ts data:`, data); + data.log_lvl = log_lvl; - let data = await parent(); - // console.log(`ae events_pres_mgmt event [event_id] +page.ts data:`, data); - data.log_lvl = log_lvl; + const account_id = data.account_id; + const ae_acct = data[account_id]; - let account_id = data.account_id; - let ae_acct = data[account_id]; - - let event_id = params.event_id; - if (!event_id) { - console.log(`ae Events - [event_id] +page.ts: The event_id was not found in the params.event_id!!!`); - error(404, { + const event_id = params.event_id; + if (!event_id) { + console.log( + `ae Events - [event_id] +page.ts: The event_id was not found in the params.event_id!!!` + ); + error(404, { message: 'Events Pres Mgmt - Event ID not found' }); - } + } - ae_acct.slct.event_id = event_id; + ae_acct.slct.event_id = event_id; - if (browser) { - // console.log(`TEST URL Params`, params); - // console.log(`TEST URL`, url); + if (browser) { + // console.log(`TEST URL Params`, params); + // console.log(`TEST URL`, url); - let load_event_obj = await events_func.load_ae_obj_id__event({ - api_cfg: ae_acct.api, - event_id: event_id, - // inc_file_li: true, - // inc_device_li: true, - inc_location_li: true, - inc_session_li: true, - // inc_badge_li: true, - inc_template_li: true, - log_lvl: log_lvl - // }) - // .then((results) => { - // if (!results) { - // error(404, { - // message: 'Events - Event not found' - // }); - // } else { - // // ae_acct.slct.event_obj = results; - // } - }); - if (!load_event_obj) { - error(404, { - message: 'Events - Event not found' - }); - } - console.log(`load_event_obj = `, load_event_obj); - ae_acct.slct.event_obj = load_event_obj; - // ae_acct.slct.event_device_obj_li = load_event_obj.event_device_obj_li; - ae_acct.slct.event_location_obj_li = load_event_obj.event_location_obj_li; - ae_acct.slct.event_session_obj_li = load_event_obj.event_session_obj_li; - } + const load_event_obj = await events_func.load_ae_obj_id__event({ + api_cfg: ae_acct.api, + event_id: event_id, + // inc_file_li: true, + // inc_device_li: true, + inc_location_li: true, + inc_session_li: true, + // inc_badge_li: true, + inc_template_li: true, + log_lvl: log_lvl + // }) + // .then((results) => { + // if (!results) { + // error(404, { + // message: 'Events - Event not found' + // }); + // } else { + // // ae_acct.slct.event_obj = results; + // } + }); + if (!load_event_obj) { + error(404, { + message: 'Events - Event not found' + }); + } + console.log(`load_event_obj = `, load_event_obj); + ae_acct.slct.event_obj = load_event_obj; + // ae_acct.slct.event_device_obj_li = load_event_obj.event_device_obj_li; + ae_acct.slct.event_location_obj_li = load_event_obj.event_location_obj_li; + ae_acct.slct.event_session_obj_li = load_event_obj.event_session_obj_li; + } - // WARNING: Precaution against shared data between sites and sessions. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and sessions. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/events/[event_id]/+page.svelte b/src/routes/events/[event_id]/+page.svelte index 913b5edc..01194a57 100644 --- a/src/routes/events/[event_id]/+page.svelte +++ b/src/routes/events/[event_id]/+page.svelte @@ -1,372 +1,393 @@ - - Æ: - {ae_util.shorten_string({string: $lq__event_obj?.name, max_length: 12})} - - Pres Mgmt - {$events_loc?.title} - + Æ: + {ae_util.shorten_string({ string: $lq__event_obj?.name, max_length: 12 })} + - Pres Mgmt - {$events_loc?.title} + max-w-max " > --> - - - + {#if !$lq__event_obj} - -
- - Loading event information... -
- +
+ + Loading event information... +
{:else if $lq__event_obj?.enable || $ae_loc.trusted_access} +
+ + + + + -
- - - - - +

+ + {$lq__event_obj.cfg_json?.short_name ?? $lq__event_obj?.name} + + + +

+
-

+ {#if !$events_loc.pres_mgmt.show_content__event_view || $events_loc.pres_mgmt.show_content__event_view == 'default'} + +
+
{ + $events_trigger = 'load__event_session_obj_li'; + })} + autocomplete="off" + class="form grow flex flex-row flex-wrap gap-1 justify-center items-center w-full" + > + + - - {$lq__event_obj.cfg_json?.short_name ?? $lq__event_obj?.name} - - - + -

+ -
+ + { + if ( + $events_sess.pres_mgmt?.fulltext_search_qry_str && + $events_sess.pres_mgmt.fulltext_search_qry_str.length >= 3 + ) { + $events_trigger = 'load__event_session_obj_li'; + } + }} + autofocus + data-ignore="true" + /> + + + + + {#if event_session_id_random_li.length} + + {:else} +
+
+ + No results to show + +
+
Please use the search above to find your session.
+
+
+ Search by: +
    +
  • Session name
  • +
  • Session description
  • +
  • Presentation name
  • +
  • Presenter names
  • +
  • Presenter ID (member ID)
  • +
+
+
+ {/if} + {:else if $events_loc.pres_mgmt.show_content__event_view == 'manage_files' && $ae_loc.trusted_access} + {#if $lq__event_obj} +
+

{$lq__event_obj?.name}

+

Event - Manage Files

+
+ {/if} -{#if !$events_loc.pres_mgmt.show_content__event_view || $events_loc.pres_mgmt.show_content__event_view == 'default'} +
+

+ + + Manage and Upload Event Files: +

- -
- -
{ - $events_trigger = 'load__event_session_obj_li'; - })} - autocomplete="off" - class="form grow flex flex-row flex-wrap gap-1 justify-center items-center w-full" - > - - - - - - - - - - - { - if ($events_sess.pres_mgmt?.fulltext_search_qry_str && $events_sess.pres_mgmt.fulltext_search_qry_str.length >= 3) { - $events_trigger = 'load__event_session_obj_li'; - } - }} - autofocus - data-ignore="true" - /> - - -
- -
- - - -{#if event_session_id_random_li.length} - - + + +
+ + Upload global event files only! +
+
+ Global event files only
+ Recommended: PowerPoint (pptx) or Keynote (key)
+ Media: Audio and videos files should be directly embedded in PowerPoint (PPTX) files
+ Supplemental files: mp4, PDF, Word Doc, Excel, txt, etc +
+
+
+
+ +
+
+ {/if} {:else} - -
-
- - No results to show - -
-
- Please use the search above to find your session. -
-
-
- Search by: -
    -
  • Session name
  • -
  • Session description
  • -
  • Presentation name
  • -
  • Presenter names
  • -
  • Presenter ID (member ID)
  • -
-
-
- -{/if} - - -{:else if $events_loc.pres_mgmt.show_content__event_view == 'manage_files' && $ae_loc.trusted_access} - - - {#if $lq__event_obj} -
-

{$lq__event_obj?.name}

-

Event - Manage Files

-
- {/if} - -
-

- - - Manage and Upload Event Files: -

- - - -
- - Upload global event files only! -
-
- Global event files only
- Recommended: PowerPoint (pptx) or Keynote (key)
- Media: Audio and videos files should be directly embedded in PowerPoint (PPTX) files
- Supplemental files: mp4, PDF, Word Doc, Excel, txt, etc -
-
-
- -
- -
-
- -{/if} - -{:else} -
-

- - Event Disabled -

-

- This event is currently disabled. Please contact the event organizer for more information. -

-
- +
+

+ + Event Disabled +

+

+ This event is currently disabled. Please contact the event organizer for more information. +

+
{/if} - diff --git a/src/routes/events/[event_id]/locations/+page.svelte b/src/routes/events/[event_id]/locations/+page.svelte index 037628ac..ca0d8f63 100644 --- a/src/routes/events/[event_id]/locations/+page.svelte +++ b/src/routes/events/[event_id]/locations/+page.svelte @@ -1,85 +1,103 @@ - - Locations: {ae_util.shorten_string({string: $lq__event_obj?.name ?? 'Loading...', max_length: 12})} ({$lq__event_obj?.event_id ?? ''}) - Pres Mgmt - {$events_loc?.title} - + Locations: {ae_util.shorten_string({ + string: $lq__event_obj?.name ?? 'Loading...', + max_length: 12 + })} ({$lq__event_obj?.event_id ?? ''}) - Pres Mgmt - {$events_loc?.title} + -
{ min-w-full max-w-max " - > +> + - - -{#if !$lq__event_location_obj_li} - -
- - Loading locations... -
- -{:else} - -
-

+ Loading locations... + + {:else} +
+

- - - Locations/Rooms - - - - {#if $lq__event_obj?.cfg_json?.short_name} - {@html $lq__event_obj?.cfg_json.short_name ?? ae_snip.html__not_set} - {:else} - {@html $lq__event_obj?.name ?? ae_snip.html__not_set} - {/if} -

-
+ > + + + Locations/Rooms + + + + {#if $lq__event_obj?.cfg_json?.short_name} + {@html $lq__event_obj?.cfg_json.short_name ?? ae_snip.html__not_set} + {:else} + {@html $lq__event_obj?.name ?? ae_snip.html__not_set} + {/if} +

+
- - -{/if} - - - + + {/if} +
- diff --git a/src/routes/events/[event_id]/locations/ae_comp__event_location_obj_li.svelte b/src/routes/events/[event_id]/locations/ae_comp__event_location_obj_li.svelte index 19daf79b..835ddddc 100644 --- a/src/routes/events/[event_id]/locations/ae_comp__event_location_obj_li.svelte +++ b/src/routes/events/[event_id]/locations/ae_comp__event_location_obj_li.svelte @@ -1,49 +1,62 @@ -
+> +
+ {#if $ae_loc.administrator_access && $ae_loc.edit_mode} + + {/if} +
- events_func.create_ae_obj__event_location({ - api_cfg: $ae_api, - event_id: $events_slct.event_id, - data_kv: location_data, - log_lvl: log_lvl, - }) - }} - class="btn btn-sm preset-tonal-warning hover:preset-filled-warning-500" - > - - Add Location - - {/if} - +

+ Locations: + + + {@html $lq__event_location_obj_li?.length + ? `${$lq__event_location_obj_li?.length}×` + : ''} + + {#if !$lq__event_location_obj_li?.length} + + + No locations available. + + {/if} +

-

- Locations: - - - {@html ($lq__event_location_obj_li?.length ? `${$lq__event_location_obj_li?.length}×` : '')} - + + {#if $lq__event_location_obj_li?.length} +
    + {#each $lq__event_location_obj_li as event_location_obj} +
  • +

    + + + + + "{event_location_obj?.name ?? '-- not set --'}" + - {#if !$lq__event_location_obj_li?.length} - - - No locations available. - - {/if} -

    + + {#if event_location_obj?.code && !$events_loc.pres_mgmt?.hide__location_code} + + + {event_location_obj?.code ?? ''} + + {/if} + - -{#if $lq__event_location_obj_li?.length} -
      - {#each $lq__event_location_obj_li as event_location_obj} -
    • + + + + + -

      - - + + + - object_type={'event_location'} - object_id={event_location_obj?.event_location_id} - object_reload={true} + + + + + - field_name={'name'} - field_type={'text'} + +

      - current_field_value={event_location_obj?.name} - - allow_null={false} - - hide_element={!$ae_loc.edit_mode} - hide_edit_btn={false} - - outline_element={false} - display_block={false} - display_absolute_edit={false} - - class_li={'m-1'} - > - - - "{event_location_obj?.name ?? '-- not set --'}" - - - - {#if event_location_obj?.code && !$events_loc.pres_mgmt?.hide__location_code} - - - {event_location_obj?.code ?? ''} - - {/if} -
      - - - - - - - - - - - - - - - - - - - - -

- -
- -
- - + Description: - object_type={'event_location'} - object_id={event_location_obj?.event_location_id_random} - object_reload={true} + {#if event_location_obj?.description} + - allow_null={true} +
{event_location_obj.description}
+ {:else} + {@html ae_snip.html__not_set} + {/if} +
+
- hide_element={!$ae_loc.edit_mode} - hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} + {#if !$events_loc.pres_mgmt.show_content__location_devices_sessions || $events_loc.pres_mgmt.show_content__location_devices_sessions == 'default' || $events_loc.pres_mgmt.show_content__location_devices_sessions == 'sessions'} + + {#if event_location_obj?.event_location_id_random} + + {/if} + {:else if $events_loc.pres_mgmt.show_content__location_devices_sessions == 'devices'} + + {#if event_location_obj?.event_location_id_random} + + {/if} + {/if} - outline_element={false} - display_block={false} - display_absolute_edit={false} - - textarea_rows={15} - - class_li={'m-1'} - > - - Description: - - - {#if event_location_obj?.description} - - -
{event_location_obj.description}
- {:else} - {@html ae_snip.html__not_set} - {/if} - -
- - {#if !$events_loc.pres_mgmt.show_content__location_devices_sessions || $events_loc.pres_mgmt.show_content__location_devices_sessions == 'default' || $events_loc.pres_mgmt.show_content__location_devices_sessions == 'sessions'} - - {#if event_location_obj?.event_location_id_random} - - - {/if} - {:else if $events_loc.pres_mgmt.show_content__location_devices_sessions == 'devices'} - - {#if event_location_obj?.event_location_id_random} - - - {/if} - {/if} - - - - - - + - - - {/each} - -{:else} - -{/if} - - + {/if}
diff --git a/src/routes/events/[event_id]/locations/locations_page_menu.svelte b/src/routes/events/[event_id]/locations/locations_page_menu.svelte index 076e9ad0..d19d1073 100644 --- a/src/routes/events/[event_id]/locations/locations_page_menu.svelte +++ b/src/routes/events/[event_id]/locations/locations_page_menu.svelte @@ -1,225 +1,233 @@ - -
+
+ +
+ - -
+ + + - + + +
+ - - - - - - - -
- - - -
- - +
+ - - + + - - + + - - + + - - - + + + +
+ -
+ - - - -
- -
-
+
+ +
+
+ diff --git a/src/routes/events/[event_id]/presenter/[presenter_id]/+page.svelte b/src/routes/events/[event_id]/presenter/[presenter_id]/+page.svelte index cc466b1e..2e657ee3 100644 --- a/src/routes/events/[event_id]/presenter/[presenter_id]/+page.svelte +++ b/src/routes/events/[event_id]/presenter/[presenter_id]/+page.svelte @@ -1,97 +1,119 @@ - - Presenter: {ae_util.shorten_string({ string: $lq__event_presenter_obj?.full_name, max_length: 20, begin_length: 10, end_length: 4 })} - ({$lq__event_presenter_obj?.event_presenter_id ?? 'loading...'}) - Pres Mgmt - {$events_loc?.title} - + Presenter: {ae_util.shorten_string({ + string: $lq__event_presenter_obj?.full_name, + max_length: 20, + begin_length: 10, + end_length: 4 + })} + ({$lq__event_presenter_obj?.event_presenter_id ?? 'loading...'}) - Pres Mgmt - {$events_loc?.title} + -
{ min-w-full max-w-max " - > +> + - + {#if !$lq__event_presenter_obj} +
+ + Loading presenter information... +
+ {:else if $lq__event_presenter_obj?.enable || $ae_loc.trusted_access} +
+ + + + + -{#if !$lq__event_presenter_obj} - -
- - Loading presenter information... -
- -{:else if $lq__event_presenter_obj?.enable || $ae_loc.trusted_access} - -
- - - - - - - -

- {@html $lq__event_presenter_obj?.full_name ?? ae_snip.html__not_set} - +

+ {@html $lq__event_presenter_obj?.full_name ?? ae_snip.html__not_set} + -

+ + + + {#if !$ae_loc.trusted_access && !$events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id] && !$events_loc.auth__kv.session[$lq__event_presenter_obj.event_session_id]} + + + + - - - - {#if (!$ae_loc.trusted_access && !$events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id] && !$events_loc.auth__kv.session[$lq__event_presenter_obj.event_session_id])} - - - - - - - - - Not signed in as presenter - {#if $lq__event_presenter_obj?.person_primary_email} - ({$lq__event_presenter_obj.person_primary_email.replace(/^(.{3}).*@/, '$1...@')}) - {:else} - + + + Not signed in as presenter + {#if $lq__event_presenter_obj?.person_primary_email} + ({$lq__event_presenter_obj.person_primary_email.replace(/^(.{3}).*@/, '$1...@')}) + {:else} + - {/if} - {:else} - ({@html ($lq__event_presenter_obj?.person_primary_email && $lq__event_presenter_obj?.person_primary_email.length) ? $lq__event_presenter_obj?.person_primary_email : 'email '+ae_snip.html__not_set}) - {/if} - + {/if} + {:else} + ({@html $lq__event_presenter_obj?.person_primary_email && + $lq__event_presenter_obj?.person_primary_email.length + ? $lq__event_presenter_obj?.person_primary_email + : 'email ' + ae_snip.html__not_set}) + {/if} + - - {#if $lq__event_presenter_obj.person_id && $ae_loc.trusted_access} - - + + {#if $lq__event_presenter_obj.person_id && $ae_loc.trusted_access} + + - - - {/if} + + {/if} - {#if $events_loc.pres_mgmt?.require__presenter_agree - && $events_loc?.pres_mgmt?.show__email_access_link - && $lq__event_presenter_obj?.person_primary_email - && ($ae_loc.public_access || !$events_loc.auth__person?.id)} - - {/if} - + events_func.email_sign_in__event_presenter({ + api_cfg: $ae_api, + to_email: $lq__event_presenter_obj?.person_primary_email, + to_name: $lq__event_presenter_obj?.full_name ?? '-- not set --', + base_url: $ae_loc.url_origin, + person_id: $lq__event_presenter_obj?.person_id, + person_passcode: $lq__event_presenter_obj?.person_passcode ?? '-- not set --', + event_id: $lq__event_presenter_obj?.event_id, + event_session_id: $lq__event_presenter_obj?.event_session_id, + event_presentation_id: $lq__event_presenter_obj?.event_presentation_id, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + session_name: $lq__event_presenter_obj?.event_session_name ?? '-- not set --', + presentation_name: + $lq__event_presenter_obj?.event_presentation_name ?? '-- not set --' + }); + }} + class="btn btn-sm preset-tonal-secondary border border-secondary-500 hover:preset-filled-secondary-500 m-0.25" + title="Email the access link to the presenter" + > + + Email Access Link + + {/if} + + +
- + {#if !$events_loc.pres_mgmt.show_content__presenter_view || ($events_loc.pres_mgmt.show_content__presenter_view == 'default' && $lq__event_presenter_obj)} + + {#if $ae_loc.trusted_access || $lq__auth__event_presenter_obj?.agree} +
+ + +
+ {/if} +

+ + + Manage and Upload Presenter Files + + + {$lq__event_presenter_obj?.file_count}× + +

-
+ + {#if $ae_loc.trusted_access || $events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id]} + + +
+ + Upload presenter (speaker) specific files +
+
+ Presenter (speaker) presentation files only
+ Recommended: PowerPoint (pptx) or Keynote (key)
+ Media: Audio and videos files should be directly embedded in PowerPoint (PPTX) files
+ Supplemental files: mp4, PDF, Word Doc, Excel, txt, etc +
+
+
+ {/if} -{#if !$events_loc.pres_mgmt.show_content__presenter_view || $events_loc.pres_mgmt.show_content__presenter_view == 'default' && $lq__event_presenter_obj} - +
+ +
+ {:else if $events_loc.pres_mgmt.show_content__presenter_view == 'manage_files' && $ae_loc.authenticated_access} +
+

+ + + Manage and Upload Presenter Files + + + {$lq__event_presenter_obj?.file_count}× + +

- {#if - ($ae_loc.trusted_access || - $lq__auth__event_presenter_obj?.agree)} -
- - -
- {/if} + {#if $ae_loc.public_access || $events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id]} + + +
+ + Upload presenter (speaker) specific files +
+
+ Presentation related files only
+ Recommended: PowerPoint (pptx) or Keynote (key)
+ Media: Audio and videos files should be directly embedded in PowerPoint (PPTX) files
+ Supplemental files: mp4, PDF, Word Doc, Excel, txt, etc +
+
+
+ {/if} -

- - - Manage and Upload Presenter Files - - - {$lq__event_presenter_obj?.file_count}× - -

+
+ +
+
- - {#if $ae_loc.trusted_access || $events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id]} - - -
- - Upload presenter (speaker) specific files -
-
- Presenter (speaker) presentation files only
- Recommended: PowerPoint (pptx) or Keynote (key)
- Media: Audio and videos files should be directly embedded in PowerPoint (PPTX) files
- Supplemental files: mp4, PDF, Word Doc, Excel, txt, etc -
-
-
- {/if} - -
- -
- -{:else if $events_loc.pres_mgmt.show_content__presenter_view == 'manage_files' && $ae_loc.authenticated_access} -
-

- - - Manage and Upload Presenter Files - - - {$lq__event_presenter_obj?.file_count}× - -

- - {#if $ae_loc.public_access || $events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id]} - - -
- - Upload presenter (speaker) specific files -
-
- Presentation related files only
- Recommended: PowerPoint (pptx) or Keynote (key)
- Media: Audio and videos files should be directly embedded in PowerPoint (PPTX) files
- Supplemental files: mp4, PDF, Word Doc, Excel, txt, etc -
-
-
- {/if} - -
- -
-
- - - + -{/if} - -{:else} - -
-

- - Presenter Disabled -

-

- This presenter is currently disabled. Please contact the event organizer for more information. -

-
- -{/if} - + {/if} + {:else} +
+

+ + Presenter Disabled +

+

+ This presenter is currently disabled. Please contact the event organizer for more + information. +

+
+ {/if}
- - - - - - {#snippet footer()} -
- - -
- {/snippet} + title="{$lq__event_presenter_obj?.full_name} Presenter Consent and Release and Terms and Conditions" + bind:open={$events_sess.pres_mgmt.show_modal__presenter_agree} + autoclose={false} + placement="top-center" + class="bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y" +> + + {#snippet footer()} +
+ +
+ {/snippet}
- - - - \ No newline at end of file + diff --git a/src/routes/events/[event_id]/presenter/[presenter_id]/+page.ts b/src/routes/events/[event_id]/presenter/[presenter_id]/+page.ts index 93f40a6e..e643aaf0 100644 --- a/src/routes/events/[event_id]/presenter/[presenter_id]/+page.ts +++ b/src/routes/events/[event_id]/presenter/[presenter_id]/+page.ts @@ -4,60 +4,62 @@ console.log(`ae_p_event_presenter [presenter_id] +page.ts: start`); import { browser } from '$app/environment'; import { events_func } from '$lib/ae_events_functions'; -export async function load({ params, parent }) { // route - let log_lvl: number = 0; +export async function load({ params, parent }) { + // route + const log_lvl: number = 0; - let data = await parent(); - // console.log(`ae events_pres_mgmt presenter [presenter_id] +page.ts data:`, data); - data.log_lvl = log_lvl; + const data = await parent(); + // console.log(`ae events_pres_mgmt presenter [presenter_id] +page.ts data:`, data); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; - // console.log(`ae_acct = `, ae_acct); + const account_id = data.account_id; + const ae_acct = data[account_id]; + // console.log(`ae_acct = `, ae_acct); - let event_presenter_id = params.presenter_id; - // if (!event_presenter_id) { - // console.log(`ae events_pres_mgmt presenter [presenter_id] +page.ts: The event_presenter_id was not found in the params.presenter_id!!!`); - // return false; - // } + const event_presenter_id = params.presenter_id; + // if (!event_presenter_id) { + // console.log(`ae events_pres_mgmt presenter [presenter_id] +page.ts: The event_presenter_id was not found in the params.presenter_id!!!`); + // return false; + // } - ae_acct.slct.event_presenter_id = event_presenter_id; + ae_acct.slct.event_presenter_id = event_presenter_id; - if (browser) { - // Load event presenter object - let load_event_presenter_obj = events_func.load_ae_obj_id__event_presenter({ - api_cfg: ae_acct.api, - event_presenter_id: event_presenter_id, - try_cache: true, - log_lvl: log_lvl - }); + if (browser) { + // Load event presenter object + const load_event_presenter_obj = events_func.load_ae_obj_id__event_presenter({ + api_cfg: ae_acct.api, + event_presenter_id: event_presenter_id, + try_cache: true, + log_lvl: log_lvl + }); - ae_acct.slct.event_presenter_obj = await load_event_presenter_obj; + ae_acct.slct.event_presenter_obj = await load_event_presenter_obj; - // Load event files for the presenter - let load_event_file_obj_li = await events_func.load_ae_obj_li__event_file({ - api_cfg: ae_acct.api, - for_obj_type: 'event_presenter', - for_obj_id: event_presenter_id, - enabled: 'all', - hidden: 'all', - limit: 50, - try_cache: true - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); - if (log_lvl) { - console.log(`load_event_file_obj_li = `, load_event_file_obj_li); - } - ae_acct.slct.event_file_obj_li = load_event_file_obj_li; - } + // Load event files for the presenter + const load_event_file_obj_li = await events_func + .load_ae_obj_li__event_file({ + api_cfg: ae_acct.api, + for_obj_type: 'event_presenter', + for_obj_id: event_presenter_id, + enabled: 'all', + hidden: 'all', + limit: 50, + try_cache: true + }) + .then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); + if (log_lvl) { + console.log(`load_event_file_obj_li = `, load_event_file_obj_li); + } + ae_acct.slct.event_file_obj_li = load_event_file_obj_li; + } - // WARNING: Precaution against shared data between sites and presentations. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and presentations. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/events/[event_id]/presenter/[presenter_id]/ae_comp__event_presenter_form_agree.svelte b/src/routes/events/[event_id]/presenter/[presenter_id]/ae_comp__event_presenter_form_agree.svelte index f8c06fe6..277df425 100644 --- a/src/routes/events/[event_id]/presenter/[presenter_id]/ae_comp__event_presenter_form_agree.svelte +++ b/src/routes/events/[event_id]/presenter/[presenter_id]/ae_comp__event_presenter_form_agree.svelte @@ -1,424 +1,423 @@ - {#if $lq__event_presenter_obj} -

- Presenter Agreement for:
- {$lq__event_presenter_obj?.full_name} - {#if $lq__event_presenter_obj?.person_primary_email} - ({$lq__event_presenter_obj?.person_primary_email ?? '-- not set --'}) - {/if} - -

- -{#if !$lq__event_presenter_obj?.agree} -
-
- - Not Yet Agreed -
-
- Waiting for agreement to the Guest Speaker Consent and Release and Terms and Conditions before you can move on. Please review and mark as agreed below. -
-
-{/if} - -
- -
- -
- - -

- {$lq__event_presenter_obj.full_name} ({$lq__event_presenter_obj.email}) agrees to the following terms and conditions for the presentation: -

-

- Presentation: "{$lq__event_presenter_obj?.event_presentation_name}" -

- -
-

Opt-Out?

- -
- -
-

Agree?

- - {#if !$lq__event_presenter_obj?.agree} -
- Not Agreed: - - -
-
- Waiting for agreement to the Guest Speaker Consent and Release and Terms and Conditions before you can move on. -
- {:else} -
- Agreed: - - Marked as agreed -
- {/if} - - {#if !$lq__event_presenter_obj?.agree} - - {:else} - - {/if} - - -
- -
+

+ Presenter Agreement for:
+ {$lq__event_presenter_obj?.full_name} + {#if $lq__event_presenter_obj?.person_primary_email} + ({$lq__event_presenter_obj?.person_primary_email ?? '-- not set --'}) + {/if} + +

+ {#if !$lq__event_presenter_obj?.agree} +
+
+ + Not Yet Agreed +
+
+ Waiting for agreement to the Guest Speaker Consent and Release and Terms and Conditions + before you can move on. Please review and mark as agreed below. +
+
+ {/if} + +
+ +
+ +
+ +

+ {$lq__event_presenter_obj.full_name} ({$lq__event_presenter_obj.email}) agrees + to the following terms and conditions for the presentation: +

+

+ Presentation: + "{$lq__event_presenter_obj?.event_presentation_name}" +

+ +
+

Opt-Out?

+ +
+ +
+

Agree?

+ + {#if !$lq__event_presenter_obj?.agree} +
+ Not Agreed: + + +
+
+ Waiting for agreement to the Guest Speaker Consent and Release and Terms and Conditions + before you can move on. +
+ {:else} +
+ Agreed: + + Marked as agreed +
+ {/if} + + {#if !$lq__event_presenter_obj?.agree} + + {:else} + + {/if} +
+
{/if} diff --git a/src/routes/events/[event_id]/presenter/[presenter_id]/presenter_page_menu.svelte b/src/routes/events/[event_id]/presenter/[presenter_id]/presenter_page_menu.svelte index f5cc4c09..27f4780e 100644 --- a/src/routes/events/[event_id]/presenter/[presenter_id]/presenter_page_menu.svelte +++ b/src/routes/events/[event_id]/presenter/[presenter_id]/presenter_page_menu.svelte @@ -1,486 +1,498 @@ - -
+
+ +
+ - -
+ + + - + + - - - + + - - + {#if $events_loc.pres_mgmt?.require__presenter_agree} + + {#if $lq__event_presenter_obj?.agree} + + - + $events_slct.event_presenter_id = $lq__event_presenter_obj?.event_presenter_id_random; + // $lq__event_presenter_obj = $lq__event_presenter_obj; - {#if $events_loc.pres_mgmt?.require__presenter_agree} - - {#if $lq__event_presenter_obj?.agree} - - + {:else} + - {:else} - + {/if} + + {/if} +
+ - $events_slct.event_presenter_id = $lq__event_presenter_obj?.event_presenter_id_random; - // $lq__event_presenter_obj = $lq__event_presenter_obj; + +
+ { + console.log(`ae_crud_updated:`, e.detail); - $events_sess.pres_mgmt.show_modal__presenter_agree = $lq__event_presenter_obj?.event_presenter_id_random; - }} - class="btn btn-sm mx-1 font-bold ae_btn_warning_filled" - title="View terms and conditions" - > - - - Not yet agreed - - - {/if} - - {/if} + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id_random, + log_lvl: log_lvl + }); + }} + > + + + -
+ { + console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id_random, + log_lvl: log_lvl + }); + }} + > + + + - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, - event_presenter_id: $lq__event_presenter_obj?.event_presenter_id_random, - log_lvl: log_lvl - }); - }} - > - - - + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id_random, + log_lvl: 1 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + - { - console.log(`ae_crud_updated:`, e.detail); + - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, - event_presenter_id: $lq__event_presenter_obj?.event_presenter_id_random, - log_lvl: log_lvl - }); - }} - > - - - + {#if $ae_loc.manager_access} + + {:else if $ae_loc.trusted_access} + + {/if} - ae_triggers.enable = true; - }} - class="btn btn-sm" - class:ae_btn_success_outlined={$lq__event_presenter_obj?.enable} - class:ae_btn_error={!$lq__event_presenter_obj?.enable} - disabled={!$ae_loc.manager_access} - > - {#if $lq__event_presenter_obj?.enable} - - Enabled - {:else} - - Enable? - {/if} - - - + {#if $ae_loc.administrator_access} + {#if $events_loc.pres_mgmt.show_content__presenter_qr} + + {:else} + + {/if} + {/if} + {#if $ae_loc.trusted_access} + {#if $ae_loc.edit_mode} + + {:else} + + {/if} + {/if} +
+ - + - - - - - {#if $ae_loc.manager_access} - - {:else if $ae_loc.trusted_access} - - {/if} - - {#if $ae_loc.administrator_access} - {#if $events_loc.pres_mgmt.show_content__presenter_qr} - - {:else} - - {/if} - {/if} - - {#if $ae_loc.trusted_access} - {#if $ae_loc.edit_mode} - - {:else} - - {/if} - {/if} - -
- - - - -
- -
-
+
+ +
+ + diff --git a/src/routes/events/[event_id]/presenter/[presenter_id]/presenter_view.svelte b/src/routes/events/[event_id]/presenter/[presenter_id]/presenter_view.svelte index d0ccfc5c..f49b73f8 100644 --- a/src/routes/events/[event_id]/presenter/[presenter_id]/presenter_view.svelte +++ b/src/routes/events/[event_id]/presenter/[presenter_id]/presenter_view.svelte @@ -1,182 +1,192 @@ - {#if $lq__event_presenter_obj} -

- - - Presenter Details -

+

+ + + Presenter Details +

-
-

- - Session: - - "{$lq__event_presenter_obj?.event_session_name}" -

-

- { - console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presentation({api_cfg: $ae_api, event_presentation_id: $lq__event_presenter_obj?.event_presentation_id, log_lvl: 0}); - }} - > - - Presentation: - - - "{$lq__event_presenter_obj?.event_presentation_name}" - - -

+
+

+ Session: + "{$lq__event_presenter_obj?.event_session_name}" +

+

+ { + console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_presentation({ + api_cfg: $ae_api, + event_presentation_id: $lq__event_presenter_obj?.event_presentation_id, + log_lvl: 0 + }); + }} + > + Presentation: + + "{$lq__event_presenter_obj?.event_presentation_name}" + + +

-

- - Presenter: - -

+

+ Presenter: +

- - -{#await ae_promises.generate_qr_code_url} - Generating... -{:then result} - {#if ae_promises.generate_qr_code_url && $ae_loc.trusted_access} -
- - - { - $events_sess.pres_mgmt.qr_bigger = !$events_sess.pres_mgmt.qr_bigger; - }} - class:h-48={$events_sess.pres_mgmt.qr_bigger} - class:w-48={$events_sess.pres_mgmt.qr_bigger} - class:hover:h-96={$events_sess.pres_mgmt.qr_bigger} - class:hover:w-96={$events_sess.pres_mgmt.qr_bigger} - class="qr_code qr_type_url + {#await ae_promises.generate_qr_code_url} + Generating... + {:then result} + {#if ae_promises.generate_qr_code_url && $ae_loc.trusted_access} +
+ + + { + $events_sess.pres_mgmt.qr_bigger = !$events_sess.pres_mgmt.qr_bigger; + }} + class:h-48={$events_sess.pres_mgmt.qr_bigger} + class:w-48={$events_sess.pres_mgmt.qr_bigger} + class:hover:h-96={$events_sess.pres_mgmt.qr_bigger} + class:hover:w-96={$events_sess.pres_mgmt.qr_bigger} + class="qr_code qr_type_url h-32 w-32 hover:h-54 hover:w-54 transition-all ease-in-out duration-500 " - alt="URL QR code" - /> - - - Presenter URL - - -
- {/if} -{/await} + alt="URL QR code" + /> + + + Presenter URL + + +
+ {/if} + {/await} -
    -
  • - { - console.log(`ae_crud_updated:`, e.detail); - if (!confirm('Use caution with changing the external ID. This can break links and synchronizations. Are you sure you want to update the external ID?')) {return false;} +
      +
    • + { + console.log(`ae_crud_updated:`, e.detail); + if ( + !confirm( + 'Use caution with changing the external ID. This can break links and synchronizations. Are you sure you want to update the external ID?' + ) + ) { + return false; + } - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }); - }} - > - - {$events_loc.pres_mgmt?.label__presenter_external_id ?? 'External ID'}: - - {@html $lq__event_presenter_obj?.external_id ?? ae_snip.html__not_set} - - + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }); + }} + > + + {$events_loc.pres_mgmt?.label__presenter_external_id ?? 'External ID'}: + + {@html $lq__event_presenter_obj?.external_id ?? ae_snip.html__not_set} + + - {#if $lq__event_presenter_obj?.person_id && $lq__event_presenter_obj.external_id != $lq__event_presenter_obj.person_external_id} -
      - { - console.log(`ae_crud_updated:`, e.detail); + {#if $lq__event_presenter_obj?.person_id && $lq__event_presenter_obj.external_id != $lq__event_presenter_obj.person_external_id} +
      + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }); - }} - > - - - {$events_loc.pres_mgmt?.label__person_external_id ?? 'Person External ID'}: - - {@html $lq__event_presenter_obj.person_external_id ?? ae_snip.html__not_set} - - + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }); + }} + > + + + {$events_loc.pres_mgmt?.label__person_external_id ?? 'Person External ID'}: + + {@html $lq__event_presenter_obj.person_external_id ?? ae_snip.html__not_set} + + - { - console.log(`ae_crud_updated:`, e.detail); + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }); - }} - > - - -
      - {/if} -
    • + ae_triggers.update_person_external_id = true; + }} + class="btn btn-sm preset-tonal-warning group" + title="Use the external ID from this presenter record to overwrite the person record." + > + + + + + + {/if} + -
    • +
    • + - + { + console.log(`ae_crud_updated:`, e.detail); - { - console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }); + }} + > + + {$lq__event_presenter_obj.given_name} + + - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }); - }} - > - - {$lq__event_presenter_obj.given_name} - - + { + console.log(`ae_crud_updated:`, e.detail); - { - console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }); + }} + > + + {$lq__event_presenter_obj.family_name} + + - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }); - }} - > - - {$lq__event_presenter_obj.family_name} - - + {#if $lq__event_presenter_obj.person_given_name != $lq__event_presenter_obj.given_name || $lq__event_presenter_obj.person_family_name != $lq__event_presenter_obj.family_name} + {#if $lq__event_presenter_obj.person_given_name != $lq__event_presenter_obj.given_name} +
      + + + given name: + { + console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: log_lvl + }); + }} + > + + {@html $lq__event_presenter_obj.person_given_name ?? ae_snip.html__not_set} + + - {#if $lq__event_presenter_obj.person_given_name != $lq__event_presenter_obj.given_name || $lq__event_presenter_obj.person_family_name != $lq__event_presenter_obj.family_name} + {#if $ae_loc.edit_mode && $ae_loc.trusted_access} + + { + console.log(`ae_crud_updated:`, e.detail); - {#if $lq__event_presenter_obj.person_given_name != $lq__event_presenter_obj.given_name} -
      - - - given name: - { - console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: log_lvl + }); + }} + > + + + {/if} +
      + {/if} - {#if $ae_loc.edit_mode && $ae_loc.trusted_access} - - { - console.log(`ae_crud_updated:`, e.detail); + {#if $lq__event_presenter_obj.person_family_name != $lq__event_presenter_obj.family_name} +
      + + + family name: + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, - event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, - log_lvl: log_lvl - }); - }} - > - - - {/if} -
      - {/if} + {#if $ae_loc.edit_mode && $ae_loc.trusted_access} + + { + console.log(`ae_crud_updated:`, e.detail); - {#if $lq__event_presenter_obj.person_family_name != $lq__event_presenter_obj.family_name} -
      - - - family name: - { - console.log(`ae_crud_updated:`, e.detail); + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + {/if} +
      + {/if} + {/if} + +
    • - {#if $ae_loc.edit_mode && $ae_loc.trusted_access} - - { - console.log(`ae_crud_updated:`, e.detail); +
    • + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - {/if} - - {/if} + {#if $lq__event_presenter_obj.person_primary_email && $lq__event_presenter_obj.person_primary_email != $lq__event_presenter_obj.email} +
      + { + console.log(`ae_crud_updated:`, e.detail); + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + {#if $lq__event_presenter_obj.person_primary_email} + + {$lq__event_presenter_obj.person_primary_email} + + {:else} + email + {@html ae_snip.html__not_set} + {/if} - - {/if} - -
    • - -
    • - { - console.log(`ae_crud_updated:`, e.detail); - - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - {#if $lq__event_presenter_obj.email} - - {$lq__event_presenter_obj.email} - - {:else} - email - {@html ae_snip.html__not_set} - {/if} - - - {#if $lq__event_presenter_obj.person_primary_email && $lq__event_presenter_obj.person_primary_email != $lq__event_presenter_obj.email} -
      - { - console.log(`ae_crud_updated:`, e.detail); - - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - {#if $lq__event_presenter_obj.person_primary_email} - - {$lq__event_presenter_obj.person_primary_email} - - {:else} - email - {@html ae_snip.html__not_set} - {/if} - - - + - {#if $ae_loc.trusted_access} - - { - console.log(`ae_crud_updated:`, e.detail); + {#if $ae_loc.trusted_access} + + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - {/if} -
      - {/if} + ae_triggers.update_person_primary_email = true; + }} + class="btn btn-sm preset-tonal-warning group" + title="Use the email address from this presenter record to overwrite the person record." + > + + + + + {/if} + + {/if} +
    • - +
    • + { + console.log(`ae_crud_updated:`, e.detail); -
    • + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }) + .then(function (load_results) {}); + }} + > + + {#if $lq__event_presenter_obj.affiliations && $lq__event_presenter_obj.affiliations.length} + + {$lq__event_presenter_obj.affiliations} + + {:else} + affiliations + {@html ae_snip.html__not_set} + {/if} + - { - console.log(`ae_crud_updated:`, e.detail); + {#if $lq__event_presenter_obj.person_id && $lq__event_presenter_obj.person_affiliations != $lq__event_presenter_obj.affiliations} +
      + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - }); - }} - > - - {#if $lq__event_presenter_obj.affiliations && $lq__event_presenter_obj.affiliations.length} - - {$lq__event_presenter_obj.affiliations} - - {:else} - affiliations - {@html ae_snip.html__not_set} - {/if} - + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }); + }} + > + + + + {@html $lq__event_presenter_obj.person_affiliations ?? + 'affiliations' + ae_snip.html__not_set} + + - {#if $lq__event_presenter_obj.person_id && $lq__event_presenter_obj.person_affiliations != $lq__event_presenter_obj.affiliations} -
      - { - console.log(`ae_crud_updated:`, e.detail); + {#if $ae_loc.trusted_access} + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }); - }} - > - - - - {@html $lq__event_presenter_obj.person_affiliations ?? 'affiliations'+ae_snip.html__not_set} - - + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + {/if} +
      + {/if} +
    • - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - -
      - {/if} - - {/if} + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }) + .then(function (load_results) {}); + }} + > + + {#if $lq__event_presenter_obj.professional_title && $lq__event_presenter_obj.professional_title.length} + + {$lq__event_presenter_obj.professional_title} + + {:else} + professional title + {@html ae_snip.html__not_set} + {/if} + - + {#if $lq__event_presenter_obj.person_id && $lq__event_presenter_obj.person_professional_title != $lq__event_presenter_obj.professional_title} +
      + { + console.log(`ae_crud_updated:`, e.detail); -
    • + events_func.load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }); + }} + > + + + + {@html $lq__event_presenter_obj.person_professional_title && + $lq__event_presenter_obj.person_professional_title.length + ? $lq__event_presenter_obj.person_professional_title + : 'professional title' + ae_snip.html__not_set} + + - { - console.log(`ae_crud_updated:`, e.detail); + {#if $ae_loc.trusted_access} + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - }); - }} - > - - {#if $lq__event_presenter_obj.professional_title && $lq__event_presenter_obj.professional_title.length} - - {$lq__event_presenter_obj.professional_title} - - {:else} - professional title - {@html ae_snip.html__not_set} - {/if} - + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + {/if} +
    • + {/if} + - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }); - }} - > - - - - {@html $lq__event_presenter_obj.person_professional_title && $lq__event_presenter_obj.person_professional_title.length ? $lq__event_presenter_obj.person_professional_title : 'professional title'+ae_snip.html__not_set} - - +
    • + + Person link: + + {#if $ae_loc.trusted_access} + { + console.log(`ae_crud_updated:`, e.detail); - {#if $ae_loc.trusted_access} - { - console.log(`ae_crud_updated:`, e.detail); + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + + {#if $lq__event_presenter_obj.person_id} + + + {$lq__event_presenter_obj.person_id} + + {:else} + + person + {@html ae_snip.html__not_set} + {/if} - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - {/if} - - {/if} + -
    • + + + {:else if !$lq__event_presenter_obj.person_id || $ae_loc.administrator_access} + + {/if} + {/if} + + + {/if} - - + // NOTE: The external_id should not really be changed once it is set. The person.external_sys_id may need to be updated as well. + let event_presenter_data = { + external_id: $lq__event_presenter_obj.person_external_id, + given_name: $lq__event_presenter_obj.person_given_name, + family_name: $lq__event_presenter_obj.person_family_name, + professional_title: $lq__event_presenter_obj.person_professional_title, + affiliations: $lq__event_presenter_obj.person_affiliations, + email: $lq__event_presenter_obj.person_primary_email + // 'passcode': $lq__event_presenter_obj.person_passcode, + }; - {:else if !$lq__event_presenter_obj.person_id || $ae_loc.administrator_access} + let person_update_result = events_func + .update_ae_obj__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + data_kv: event_presenter_data, + log_lvl: 0 + }) + .then(function (update_result) { + // console.log(update_result); + // return update_result; + }); - + {/if} - // let params = { - // qry__limit: 300, - // } + {#if $ae_loc.trusted_access && !$lq__event_presenter_obj?.person_id} + + {/if} + - ae_tmp.person_id = $lq__event_presenter_obj?.person_id; - ae_tmp.show__edit_person = true; - }} - class="btn btn-sm preset-tonal-warning group" - title="Edit the person record linked to this presenter. Presenter ID: {$lq__event_presenter_obj.event_presenter_id}" - > - - - - {/if} +
    • + { + console.log(`ae_crud_updated:`, e.detail); - {/if} + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + Passcode: + + {@html $lq__event_presenter_obj.person_passcode ?? ae_snip.html__not_set} + + - - {/if} - - - {#if $ae_loc.administrator_access && $lq__event_presenter_obj?.person_id} - - {/if} - - {#if $ae_loc.trusted_access && !$lq__event_presenter_obj?.person_id} - - {/if} - -
    • - -
    • - { - console.log(`ae_crud_updated:`, e.detail); - - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - Passcode: - - {@html $lq__event_presenter_obj.person_passcode ?? ae_snip.html__not_set} - - - - -
    • + -
    • - { - console.log(`ae_crud_updated:`, e.detail); +
    • + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presenter({ - api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl: 0 - }) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - External System ID: - - {@html $lq__event_presenter_obj.person_external_sys_id ?? ae_snip.html__not_set} - - -
    • + events_func + .load_ae_obj_id__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + log_lvl: 0 + }) + .then(function (load_results) { + // Maybe reload page? + // window.location.reload(); + }); + }} + > + + + External System ID: + + {@html $lq__event_presenter_obj.person_external_sys_id ?? ae_snip.html__not_set} + + + - -
    • -
      - - - + +
    • +
      + + + - + - + +
      - + {#if ae_tmp.biography} +

      + Biography length: {ae_tmp.biography + ? ae_util.number_w_commas(ae_tmp.biography.length) + : 0} characters; {ae_tmp.biography + ? ae_util.number_w_commas(ae_util.count_words(ae_tmp.biography)) + : 0} estimated words +

      + +

      The biography should be plain text only and be at most 100 words.

      + + + {/if} - {#if ae_tmp.biography} -

      Biography length: {(ae_tmp.biography ? ae_util.number_w_commas(ae_tmp.biography.length) : 0)} characters; {(ae_tmp.biography ? ae_util.number_w_commas(ae_util.count_words(ae_tmp.biography)) : 0)} estimated words

      - -

      The biography should be plain text only and be at most 100 words.

      - - - {/if} +
      + - - {#if $lq__event_presenter_obj.data_json?.biography_updated_on} - - Last saved: {ae_util.iso_datetime_formatter($lq__event_presenter_obj.data_json?.biography_updated_on, 'datetime_12_long')} - - {/if} -
      - -
    • -
    - -
+ ae_promises.update__event_presenter_obj = events_func + .update_ae_obj__event_presenter({ + api_cfg: $ae_api, + event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, + data_kv: event_presenter_data, + log_lvl: 0 + }) + .then(function (update_result) { + // console.log(update_result); + // return update_result; + }); + }} + class:hidden={!ae_tmp.biography || ae_tmp.biography?.length < 20} + > + {#await ae_promises.update__event_presenter_obj} + + {:then} + {#if ae_tmp.biography == $lq__event_presenter_obj.biography} + + {:else} + + {/if} + {/await} + Save Biography + + {#if $lq__event_presenter_obj.data_json?.biography_updated_on} + + Last saved: {ae_util.iso_datetime_formatter( + $lq__event_presenter_obj.data_json?.biography_updated_on, + 'datetime_12_long' + )} + + {/if} + + + +
{/if} diff --git a/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_li.svelte b/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_li.svelte index 844b6559..d7e75b56 100644 --- a/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_li.svelte +++ b/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_li.svelte @@ -1,80 +1,88 @@ - -
- +
+
-
+> +

+ + Presenters: -

- - Presenters: + {#if $lq__event_presenter_obj_li?.length} + + + {$lq__event_presenter_obj_li.length ?? 'None'}× + + {/if} - {#if $lq__event_presenter_obj_li?.length} - - - {$lq__event_presenter_obj_li.length ?? 'None'}× - - {/if} - - - -

+
+

- -{#if $lq__event_presenter_obj_li?.length} - + {#if $lq__event_presenter_obj_li?.length} + -
    - {#each $lq__event_presenter_obj_li as event_presenter_obj} - - -
  • - + {#each $lq__event_presenter_obj_li as event_presenter_obj} + + +
  • + - {#if event_presenter_obj?.given_name && event_presenter_obj?.given_name != 'Group'} - - {:else if event_presenter_obj?.given_name == 'Group'} - - {:else} - - {/if } - {#if event_presenter_obj.priority} - - {/if} - + title="Person ID: {event_presenter_obj.person_id_random}; Email: {event_presenter_obj.person_primary_email}" + > + {#if event_presenter_obj?.given_name && event_presenter_obj?.given_name != 'Group'} + + {:else if event_presenter_obj?.given_name == 'Group'} + + {:else} + + {/if} + {#if event_presenter_obj.priority} + + {/if} + + {#if event_presenter_obj?.given_name && event_presenter_obj?.given_name != 'Group'} + {event_presenter_obj?.full_name} + {:else if event_presenter_obj?.given_name == 'Group'} + {ae_util.shorten_string({ + string: event_presenter_obj?.affiliations, + max_length: 25 + })} + {:else} + --not set-- + {/if} + - {#if event_presenter_obj?.given_name && event_presenter_obj?.given_name != 'Group'} - {event_presenter_obj?.full_name} - {:else if event_presenter_obj?.given_name == 'Group'} - {ae_util.shorten_string({string: event_presenter_obj?.affiliations, max_length: 25})} - {:else} - --not set-- - {/if } - + {#if event_presenter_obj?.file_count} + + + {event_presenter_obj?.file_count}× + + + {/if} + - {#if event_presenter_obj?.file_count} - - - {event_presenter_obj?.file_count}× - - - {/if} - + {#if $events_loc?.pres_mgmt?.show__email_access_link && event_presenter_obj?.person_primary_email && ($ae_loc.administrator_access || !$events_loc.auth__person?.id)} + + {/if} - {#if ($events_loc?.pres_mgmt?.show__email_access_link && event_presenter_obj?.person_primary_email && ($ae_loc.administrator_access || !$events_loc.auth__person?.id))} - - {/if} + $events_slct.event_presenter_id = event_presenter_obj.event_presenter_id_random; + // $events_slct.event_presenter_obj = event_presenter_obj; - {#if $events_loc.pres_mgmt?.require__presenter_agree} - {#if event_presenter_obj?.agree} - - + {:else} + - {:else} - + {/if} + {/if} - $events_slct.event_presenter_id = event_presenter_obj.event_presenter_id_random; - // $events_slct.event_presenter_obj = event_presenter_obj; +
    + {#if $ae_loc.administrator_access && !event_presenter_obj.person_id_random} + - {/if} - {/if} + let person_data = { + account_id_random: $slct.account_id, + // user_id_random: user_obj.user_id_random, + given_name: 'New', + family_name: 'Presenter', + primary_email: 'test+newpres@oneskyit.com', + code: 'new_presenter', + // Random number between 100000 and 999999 + passcode: Math.floor(Math.random() * 900000) + 100000, + enable: true + }; -
    - {#if $ae_loc.administrator_access && !event_presenter_obj.person_id_random} - - {/if} -
    - -
  • - - {/each} -
-{:else} - + {/each} + + {:else} + -{/if} - - + {/if}
diff --git a/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_li_wrapper.svelte b/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_li_wrapper.svelte index 71965248..8bb901a7 100644 --- a/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_li_wrapper.svelte +++ b/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_li_wrapper.svelte @@ -1,69 +1,67 @@ - - + {container_class_li} + {display_mode} + {link_to_type} + {link_to_id} + {lq__event_presenter_obj_li} + {log_lvl} +> diff --git a/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_tbl.svelte b/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_tbl.svelte index 9bd283bf..f7b426ab 100644 --- a/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_tbl.svelte +++ b/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_tbl.svelte @@ -1,390 +1,411 @@ -
+ class:border-r-2={horiz_scroll_warning} + class:border-dashed={horiz_scroll_warning} + class:border-warning-900-100={horiz_scroll_warning} + class="ae_comp event_presenter_obj_tbl {container_class_li} container overflow-auto max-w-screen" +> + {#if $lq__event_presenter_obj_li && $lq__event_presenter_obj_li?.length} +
+
+

+ Results: -{#if $lq__event_presenter_obj_li && $lq__event_presenter_obj_li?.length} + {#if $lq__event_presenter_obj_li.length} + + + {$lq__event_presenter_obj_li.length ?? 'None'}× + + {/if} +

-
-
-

- - Results: - +
+

+ let csv_data = generate_presenter_export_csv($lq__event_presenter_obj_li); + console.log('CSV Data:', csv_data); + }} + > + + Export Presenters CSV + + -
- + {:else} + + {/if} - let csv_data = generate_presenter_export_csv($lq__event_presenter_obj_li); - console.log('CSV Data:', csv_data); - }} - > - - Export Presenters CSV - - + + {#if !hide_session_code} + + {:else} + + {/if} + {#if show_presentation_fields} + + {:else} + + {/if} +
+
- {#if show_session_fields} - - {:else} - - {/if} + + + + + + + - - {#if !hide_session_code} - - {:else} - - {/if} + {#if show_session_fields} + + + + {/if} - {#if show_presentation_fields} - - {:else} - - {/if} - + {#if show_presentation_fields} + + + {/if} + + + + + {#each $lq__event_presenter_obj_li as event_presenter_obj} + + + + + - + {#if show_session_fields} + + + + {/if} -
NameEmailAgreeFiles Code Session Start datetimePresentationPresentation time Updated On
+ + + {event_presenter_obj?.full_name ?? '-- not set --'} + + + + {#if event_presenter_obj?.email} + + {event_presenter_obj?.email} + + {:else} + -- not set -- + {/if} + {event_presenter_obj?.agree ? 'Yes' : 'No'}{event_presenter_obj?.file_count ?? '0'} + {event_presenter_obj?.event_session_code ?? '-- not set --'} + + + + {#if event_presenter_obj?.event_session_name} + {event_presenter_obj?.event_session_name} + {:else} + -- not set -- + {/if} + + + {#if event_presenter_obj?.event_session_start_datetime} + {ae_util.iso_datetime_formatter( + event_presenter_obj?.event_session_start_datetime, + 'datetime_iso_12_no_seconds' + )} + {:else} + -- not set -- + {/if} +
- - - - - - - - {#if show_session_fields} - - - - {/if} - - {#if show_presentation_fields} - - - {/if} - - - - - {#each $lq__event_presenter_obj_li as event_presenter_obj} - - - - - - - {#if show_session_fields} - - - - {/if} - - {#if show_presentation_fields} - - - {/if} - - - - - {/each} - -
NameEmailAgreeFiles - Code - - Session - Start datetimePresentationPresentation time - Updated On -
- - - {event_presenter_obj?.full_name ?? '-- not set --'} - - - - {#if event_presenter_obj?.email} - - {event_presenter_obj?.email} - - {:else} - -- not set -- - {/if} - {event_presenter_obj?.agree ? 'Yes' : 'No'}{event_presenter_obj?.file_count ?? '0'} - {event_presenter_obj?.event_session_code ?? '-- not set --'} - - - - {#if event_presenter_obj?.event_session_name} - {event_presenter_obj?.event_session_name} - {:else} - -- not set -- - {/if} - - - {#if event_presenter_obj?.event_session_start_datetime} - {ae_util.iso_datetime_formatter(event_presenter_obj?.event_session_start_datetime, 'datetime_iso_12_no_seconds')} - {:else} - -- not set -- - {/if} - {event_presenter_obj?.event_presentation_name} - {#if event_presenter_obj?.event_presentation_start_datetime} - {ae_util.iso_datetime_formatter(event_presenter_obj?.event_presentation_start_datetime, 'time_12_short')} - {:else} - -- not set -- - {/if} - - {#if event_presenter_obj?.updated_on} - {ae_util.iso_datetime_formatter(event_presenter_obj?.updated_on, 'datetime_iso_12_no_seconds')} - {:else} - -- not set -- - {/if} -
-
- -{:else} - -

- No presenters available to show. -

- -{/if} + {#if show_presentation_fields} + {event_presenter_obj?.event_presentation_name} + + {#if event_presenter_obj?.event_presentation_start_datetime} + {ae_util.iso_datetime_formatter( + event_presenter_obj?.event_presentation_start_datetime, + 'time_12_short' + )} + {:else} + -- not set -- + {/if} + + {/if} + + {#if event_presenter_obj?.updated_on} + {ae_util.iso_datetime_formatter( + event_presenter_obj?.updated_on, + 'datetime_iso_12_no_seconds' + )} + {:else} + -- not set -- + {/if} + + + {/each} + + +
+ {:else} +

No presenters available to show.

+ {/if}
- diff --git a/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_tbl_wrapper.svelte b/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_tbl_wrapper.svelte index 11a63e9b..92c45505 100644 --- a/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_tbl_wrapper.svelte +++ b/src/routes/events/[event_id]/presenter/ae_comp__event_presenter_obj_tbl_wrapper.svelte @@ -1,129 +1,137 @@ - {#if event_presenter_obj_li && event_presenter_obj_li?.length} - - - + + {:else} -
-

No presenters available to show in table.

-
-{/if} \ No newline at end of file +
+

No presenters available to show in table.

+
+{/if} diff --git a/src/routes/events/[event_id]/reports/+page.svelte b/src/routes/events/[event_id]/reports/+page.svelte index 11ee3af4..d24d467f 100644 --- a/src/routes/events/[event_id]/reports/+page.svelte +++ b/src/routes/events/[event_id]/reports/+page.svelte @@ -1,702 +1,696 @@ - Reports: {ae_util.shorten_string({string: $lq__event_obj?.name, max_length: 12})} - ({$lq__event_obj?.event_id}) - Pres Mgmt - {$events_loc?.title} - + Reports: {ae_util.shorten_string({ string: $lq__event_obj?.name, max_length: 12 })} + ({$lq__event_obj?.event_id}) - Pres Mgmt - {$events_loc?.title} + - - + {#if !$lq__event_obj} - -
- - Loading event information... -
- +
+ + Loading event information... +
{:else} - -
- - - -

- - - Reports - - - {#if $lq__event_obj?.cfg_json?.short_name} - {@html $lq__event_obj?.cfg_json.short_name ?? ae_snip.html__not_set} - {:else} - {@html $lq__event_obj?.name ?? ae_snip.html__not_set} - {/if} -

+ > + + + Reports + + + {#if $lq__event_obj?.cfg_json?.short_name} + {@html $lq__event_obj?.cfg_json.short_name ?? ae_snip.html__not_set} + {:else} + {@html $lq__event_obj?.name ?? ae_snip.html__not_set} + {/if} + +
- +
+ + + + -
+ + + - + + - - + - + + - - - - - - - - - - - - - - - - - - - - + + +
-
+ + {#if $events_loc.pres_mgmt.show_report == 'session_no_files' || $events_loc.pres_mgmt.show_report == 'session_no_bio' || $events_loc.pres_mgmt.show_report == 'sessions_poc_agree'} + + {/if} + + {#if $events_loc.pres_mgmt.show_report == 'presenters_agree' || $events_loc.pres_mgmt.show_report == 'presenters_biography' || $events_loc.pres_mgmt.show_report == 'presenters_overview'} + + {/if} -
- - - -{#if $events_loc.pres_mgmt.show_report == 'session_no_files' || $events_loc.pres_mgmt.show_report == 'session_no_bio' || $events_loc.pres_mgmt.show_report == 'sessions_poc_agree'} - + + {#if $events_loc.pres_mgmt.show_report == 'event_files' || $events_loc.pres_mgmt.show_report == 'recent_files' || $events_loc.pres_mgmt.show_report == 'large_files'} + + {/if} {/if} - - - -{#if $events_loc.pres_mgmt.show_report == 'presenters_agree' || $events_loc.pres_mgmt.show_report == 'presenters_biography' || $events_loc.pres_mgmt.show_report == 'presenters_overview'} - -{/if} - - - -{#if $events_loc.pres_mgmt.show_report == 'event_files' ||$events_loc.pres_mgmt.show_report == 'recent_files' || $events_loc.pres_mgmt.show_report == 'large_files'} - -{/if} - -{/if} \ No newline at end of file diff --git a/src/routes/events/[event_id]/reports/event_reports_page_menu.svelte b/src/routes/events/[event_id]/reports/event_reports_page_menu.svelte index 7d766a19..5fee4b4f 100644 --- a/src/routes/events/[event_id]/reports/event_reports_page_menu.svelte +++ b/src/routes/events/[event_id]/reports/event_reports_page_menu.svelte @@ -1,104 +1,108 @@ -
+ class="pres_mgmt__event_reports {ae_snip.classes__events_pres_mgmt_menu}" + class:border-gray-100={!$events_loc.pres_mgmt.show_menu__event_reports} +> + +
+ - -
+ + + - + + +
+ - - - - - - - - -
- - - - - {/if} + -
- - - - -
- -
-
+
+ +
+ + diff --git a/src/routes/events/[event_id]/reports/reports_files.svelte b/src/routes/events/[event_id]/reports/reports_files.svelte index cd4d8040..f961548b 100644 --- a/src/routes/events/[event_id]/reports/reports_files.svelte +++ b/src/routes/events/[event_id]/reports/reports_files.svelte @@ -1,535 +1,540 @@ - {#if rpt__name == 'event_files' || rpt__name == 'large_files'} -
-

- {#if qry__status == 'loading'} - - - {:else} - - {/if} - File Uploads -

+
+

+ {#if qry__status == 'loading'} + + + {:else} + + {/if} + File Uploads +

+
+ - { + // handle_qry__event_file({ + // min_file_size: $events_loc.pres_mgmt.qry__files_min_size ?? 100000000, // in bytes + // file_purpose: $events_loc.pres_mgmt.qry__file_purpose ?? null, + // log_lvl: log_lvl, + // }); + qry__trigger = true; + $events_loc.pres_mgmt.show_report = 'event_files'; + }} + > + + + + + + + + + + + + - $events_loc.pres_mgmt.show_report = 'event_files'; - }} - > - - - - - - - - - - - - - - - - - + - + - -
-
+ // ae_promises.handle_search__event_presenter = handle_search__event_presenter({ + // // ft_search_str: '', + // // lk_search_str: '', + // order_by_li: $events_loc.pres_mgmt.qry__presenter_order_by_li, + // log_lvl: log_lvl, + // }); + qry__trigger = true; + $events_loc.pres_mgmt.show_report = 'event_files'; + }} + > + + + + + + + + + + + + + + +
{/if} - {#if event_file_obj_li} - - - + + {/if} diff --git a/src/routes/events/[event_id]/reports/reports_presenters.svelte b/src/routes/events/[event_id]/reports/reports_presenters.svelte index fc66a935..637d8baa 100644 --- a/src/routes/events/[event_id]/reports/reports_presenters.svelte +++ b/src/routes/events/[event_id]/reports/reports_presenters.svelte @@ -1,403 +1,413 @@ - {#if rpt__name == 'presenters_agree'} -
-

- {#if qry__status == 'loading'} - - - {:else if $events_loc.pres_mgmt.rpt__presenter_agree} - - {:else} - - {/if} - Presenters - {#if $events_loc.pres_mgmt.rpt__presenter_agree}Agreed{:else}Not Agreed{/if} - -

+
+

+ {#if qry__status == 'loading'} + + + {:else if $events_loc.pres_mgmt.rpt__presenter_agree} + + {:else} + + {/if} + Presenters + {#if $events_loc.pres_mgmt.rpt__presenter_agree}Agreed{:else}Not Agreed{/if} + +

-
- -
-
+ qry__trigger = true; + rpt__name = 'presenters_agree'; + }} + class="ae_btn_info btn btn-sm m-1" + > + {#if $events_loc.pres_mgmt.rpt__presenter_agree} + + + Agreed + {:else} + + + Not Agreed + {/if} + + +
{/if} - {#if $events_loc.pres_mgmt.show_report == 'presenters_biography'} -
-

- {#if qry__status == 'loading'} - - - {:else} - - {/if} - Presenters with Bios -

-
+
+

+ {#if qry__status == 'loading'} + + + {:else} + + {/if} + Presenters with Bios +

+
{/if} - {#if $events_loc.pres_mgmt.show_report == 'presenters_overview'} -
-

- {#if qry__status == 'loading'} - - - {:else} - - {/if} - Presenters Overview -

+
+

+ {#if qry__status == 'loading'} + + + {:else} + + {/if} + Presenters Overview +

-
- -
+ // ae_promises.handle_search__event_presenter = handle_search__event_presenter({ + // // ft_search_str: '', + // // lk_search_str: '', + // order_by_li: $events_loc.pres_mgmt.qry__presenter_order_by_li, + // log_lvl: log_lvl, + // }); + qry__trigger = true; + rpt__name = 'presenters_overview'; + }} + > + + + + + + + + + + + +
{/if} - {#if event_presenter_obj_li} - - -{/if} \ No newline at end of file + +{/if} diff --git a/src/routes/events/[event_id]/reports/reports_sessions.svelte b/src/routes/events/[event_id]/reports/reports_sessions.svelte index 9aab3f9f..54bb7bf2 100644 --- a/src/routes/events/[event_id]/reports/reports_sessions.svelte +++ b/src/routes/events/[event_id]/reports/reports_sessions.svelte @@ -1,424 +1,437 @@ - {#if rpt__name == 'session_no_files'} -
-

- {#if qry__status == 'loading'} - - - {:else if $events_loc.pres_mgmt.rpt__session_no_files} - - {:else} - - {/if} - Sessions - {#if $events_loc.pres_mgmt?.rpt__session_no_files} - With - {:else} - Without - {/if} - Files -

+
+

+ {#if qry__status == 'loading'} + + + {:else if $events_loc.pres_mgmt.rpt__session_no_files} + + {:else} + + {/if} + Sessions + {#if $events_loc.pres_mgmt?.rpt__session_no_files} + With + {:else} + Without + {/if} + Files +

-
- -
-
+ qry__trigger = true; + rpt__name = 'session_no_files'; + }} + class="ae_btn_info btn-sm m-1" + > + {#if $events_loc.pres_mgmt?.rpt__session_no_files} + + With + {:else} + + Without + {/if} + + +
{/if} {#if rpt__name == 'sessions_no_bio'} -
-

- {#if qry__status == 'loading'} - - - {:else} - - - {/if} - Sessions - {#if $events_loc.pres_mgmt?.rpt__session_no_bio} - With - {:else} - Without - {/if} - POC Biography -

+
+

+ {#if qry__status == 'loading'} + + + {:else} + + + {/if} + Sessions + {#if $events_loc.pres_mgmt?.rpt__session_no_bio} + With + {:else} + Without + {/if} + POC Biography +

-
- -
-
+ qry__trigger = true; + rpt__name = 'session_no_bio'; + }} + class="ae_btn_info btn-sm m-1" + > + {#if $events_loc.pres_mgmt?.rpt__session_no_bio} + + With + {:else} + + Without + {/if} + + +
{/if} {#if rpt__name == 'sessions_poc_agree'} -
-

- {#if qry__status == 'loading'} - - - {:else if $events_loc.pres_mgmt.rpt__session_poc_agree} - - {:else} - - {/if} - Sessions POC - {#if $events_loc.pres_mgmt?.rpt__session_poc_agree} - Agreed - {:else} - Not Agreed - {/if} -

+
+

+ {#if qry__status == 'loading'} + + + {:else if $events_loc.pres_mgmt.rpt__session_poc_agree} + + {:else} + + {/if} + Sessions POC + {#if $events_loc.pres_mgmt?.rpt__session_poc_agree} + Agreed + {:else} + Not Agreed + {/if} +

-
- -
-
+ qry__trigger = true; + rpt__name = 'sessions_poc_agree'; + }} + class="ae_btn_info btn-sm m-1" + title="Toggle to show sessions with or without POC agreement to terms" + > + {#if $events_loc.pres_mgmt?.rpt__session_poc_agree} + + With + {:else} + + Without (NOT working) + {/if} + + +
{/if} - {#if event_session_obj_li} - - -{/if} \ No newline at end of file + +{/if} diff --git a/src/routes/events/[event_id]/session/[session_id]/+page.svelte b/src/routes/events/[event_id]/session/[session_id]/+page.svelte index 57e02243..583bac7e 100644 --- a/src/routes/events/[event_id]/session/[session_id]/+page.svelte +++ b/src/routes/events/[event_id]/session/[session_id]/+page.svelte @@ -1,167 +1,187 @@ - - Session: {ae_util.shorten_string({string: $lq__event_session_obj?.name ?? 'Loading...', max_length: 12})} ({$lq__event_session_obj?.event_session_id ?? ''}) - Pres Mgmt - {$events_loc?.title} - + Session: {ae_util.shorten_string({ + string: $lq__event_session_obj?.name ?? 'Loading...', + max_length: 12 + })} ({$lq__event_session_obj?.event_session_id ?? ''}) - Pres Mgmt - {$events_loc?.title} + -
+> + - + {#if !$lq__event_session_obj} +
+ + Loading session information... +
+ {:else if $lq__event_session_obj?.enable || $ae_loc.trusted_access} +
+ {#if $lq__event_session_obj?.alert && $ae_loc.trusted_access} + + {/if} -{#if !$lq__event_session_obj} + + + + + + -
- - Loading session information... -
+ +

+ + {@html $lq__event_session_obj?.name ?? ae_snip.html__not_set} + +

-{:else if $lq__event_session_obj?.enable || $ae_loc.trusted_access} + {#if (!$events_loc.pres_mgmt?.hide__session_code && $lq__event_session_obj.code) || $ae_loc.edit_mode} + + + + code + + {$lq__event_session_obj.code} + + {/if} +
+
-
- {#if $lq__event_session_obj?.alert && $ae_loc.trusted_access} - - {/if} + - - - - - - +
+ {#if $ae_loc.trusted_access || ($events_loc.auth__person?.id && $events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id])} + {#if $events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] === true} +

+ Welcome {$lq__event_session_obj?.poc_person_full_name ?? 'Session POC'} +

+ {:else if $events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] == 'read'} +

Welcome {$lq__auth__event_presenter_obj?.full_name ?? 'Presenter'}

+ {/if} - -

- - {@html $lq__event_session_obj?.name ?? ae_snip.html__not_set} - -

+ {#if $ae_loc.trusted_access || $events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] === true || ($events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] == 'read' && $lq__auth__event_presenter_obj?.agree)} + + + {:else if $events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] == 'read' && !$lq__event_presenter_obj?.agree} + + + {/if} + {/if} - {#if !$events_loc.pres_mgmt?.hide__session_code && $lq__event_session_obj.code || $ae_loc.edit_mode} - - - - code - - {$lq__event_session_obj.code} - - {/if} -
+ {#if (!$events_loc.auth__person?.id && !$ae_loc.trusted_access) || ($ae_loc.trusted_access && $ae_loc.edit_mode)} + + {/if} +
-
+ {#if !$events_loc.pres_mgmt.show_content__session_view || $events_loc.pres_mgmt.show_content__session_view == 'default'} + + {:else if $events_loc.pres_mgmt.show_content__session_view == 'manage_files' && $ae_loc.public_access} +
+

+ + + Manage and Upload Session Files: + + + {$lq__event_session_obj?.file_count}× + +

- - -
-{#if $ae_loc.trusted_access || ($events_loc.auth__person?.id && $events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id])} - - {#if $events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] === true} -

Welcome {$lq__event_session_obj?.poc_person_full_name ?? 'Session POC'}

- {:else if $events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] == 'read'} -

Welcome {$lq__auth__event_presenter_obj?.full_name ?? 'Presenter'}

- {/if} - - {#if - $ae_loc.trusted_access || - $events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] === true || - ($events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] == 'read' && $lq__auth__event_presenter_obj?.agree)} - - - {:else if ($events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id] == 'read' && !$lq__event_presenter_obj?.agree)} - - - {/if} -{/if} - -{#if (!$events_loc.auth__person?.id && !$ae_loc.trusted_access) || ($ae_loc.trusted_access && $ae_loc.edit_mode) } - - - -{/if} - -
- -{#if !$events_loc.pres_mgmt.show_content__session_view || $events_loc.pres_mgmt.show_content__session_view == 'default'} - - -{:else if $events_loc.pres_mgmt.show_content__session_view == 'manage_files' && $ae_loc.public_access} - -
-

- - - Manage and Upload Session Files: - - - {$lq__event_session_obj?.file_count}× - -

- - - {#snippet label()} - -
- - Upload session (breakout) specific files only! -
-
- Session (breakout) files only
- Recommended: PowerPoint (pptx) or Keynote (key)
- Media: Audio and videos files should be directly embedded in PowerPoint (PPTX) files
- Supplemental files: mp4, PDF, Word Doc, Excel, txt, etc -
-
- {/snippet} -
- -
- -
-
- -{/if} - -{:else} - -
-

- - Session Disabled -

-

- This session is currently disabled. Please contact the event organizer for more information. -

-
- -{/if} + + {#snippet label()} + +
+ + Upload session (breakout) specific files only! +
+
+ Session (breakout) files only
+ Recommended: PowerPoint (pptx) or Keynote (key)
+ Media: Audio and videos files should be directly embedded in PowerPoint (PPTX) files
+ Supplemental files: mp4, PDF, Word Doc, Excel, txt, etc +
+
+ {/snippet} +
+
+ +
+
+ {/if} + {:else} +
+

+ + Session Disabled +

+

+ This session is currently disabled. Please contact the event organizer for more information. +

+
+ {/if}
- - - - - {#snippet footer()} -
- - -
- {/snippet} + title="{$lq__event_presenter_obj?.full_name} Presenter Consent and Release and Terms and Conditions" + bind:open={$events_sess.pres_mgmt.show_modal__presenter_agree} + autoclose={false} + placement="top-center" + class="bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y" +> + + {#snippet footer()} +
+ +
+ {/snippet}
diff --git a/src/routes/events/[event_id]/session/[session_id]/+page.ts b/src/routes/events/[event_id]/session/[session_id]/+page.ts index 0f6a414d..6c321bf0 100644 --- a/src/routes/events/[event_id]/session/[session_id]/+page.ts +++ b/src/routes/events/[event_id]/session/[session_id]/+page.ts @@ -5,113 +5,118 @@ console.log(`ae_p_event_session [session_id] +page.ts start`); import { browser } from '$app/environment'; import { events_func } from '$lib/ae_events_functions'; -export async function load({ params, parent }) { // route - let log_lvl: number = 0; +export async function load({ params, parent }) { + // route + const log_lvl: number = 0; - let data = await parent(); - // console.log(`ae events_pres_mgmt session [session_id] +page.ts data:`, data); + const data = await parent(); + // console.log(`ae events_pres_mgmt session [session_id] +page.ts data:`, data); - let account_id = data.account_id; - let ae_acct = data[account_id]; - // console.log(`ae_acct = `, ae_acct); + const account_id = data.account_id; + const ae_acct = data[account_id]; + // console.log(`ae_acct = `, ae_acct); - // if (!account_id) { - // console.log(`ae events_pres_mgmt session [session_id] +page.ts: The account_id was not found in the data!!!`); - // return false; - // } + // if (!account_id) { + // console.log(`ae events_pres_mgmt session [session_id] +page.ts: The account_id was not found in the data!!!`); + // return false; + // } - data.ae_events_pres_mgmt_event_session_id_page_ts = true; + data.ae_events_pres_mgmt_event_session_id_page_ts = true; - let event_session_id = params.session_id; - if (!event_session_id) { - console.log(`ae events_pres_mgmt session [session_id] +page.ts: The event_session_id was not found in the params!!!`); - error(404, { + const event_session_id = params.session_id; + if (!event_session_id) { + console.log( + `ae events_pres_mgmt session [session_id] +page.ts: The event_session_id was not found in the params!!!` + ); + error(404, { message: 'Session not found' }); - } - ae_acct.slct.event_session_id = event_session_id; + } + ae_acct.slct.event_session_id = event_session_id; - if (browser) { - // Load event session object - let load_event_session_obj = await events_func.load_ae_obj_id__event_session({ - api_cfg: ae_acct.api, - event_session_id: event_session_id, - // inc_presentation_li: true, - // inc_presenter_li: true, - try_cache: true - }); + if (browser) { + // Load event session object + const load_event_session_obj = await events_func.load_ae_obj_id__event_session({ + api_cfg: ae_acct.api, + event_session_id: event_session_id, + // inc_presentation_li: true, + // inc_presenter_li: true, + try_cache: true + }); - ae_acct.slct.event_session_obj = load_event_session_obj; + ae_acct.slct.event_session_obj = load_event_session_obj; - // Load event presentations for the session - let load_event_presentation_obj_li = events_func.load_ae_obj_li__event_presentation({ - api_cfg: ae_acct.api, - for_obj_type: 'event_session', - for_obj_id: event_session_id, - inc_presenter_li: true, - enabled: 'all', - hidden: 'all', - limit: 19, - // params: {}, - try_cache: true, - log_lvl: 2 - }) - .then((event_presentation_obj_li) => { - if (log_lvl) { - console.log(`event_presentation_obj_li = `, event_presentation_obj_li); - } - for (let index = 0; index < event_presentation_obj_li?.length; index++) { - let event_presentation_obj = event_presentation_obj_li[index]; - let event_presentation_id = event_presentation_obj.event_presentation_id_random; + // Load event presentations for the session + const load_event_presentation_obj_li = events_func + .load_ae_obj_li__event_presentation({ + api_cfg: ae_acct.api, + for_obj_type: 'event_session', + for_obj_id: event_session_id, + inc_presenter_li: true, + enabled: 'all', + hidden: 'all', + limit: 19, + // params: {}, + try_cache: true, + log_lvl: 2 + }) + .then((event_presentation_obj_li) => { + if (log_lvl) { + console.log(`event_presentation_obj_li = `, event_presentation_obj_li); + } + for (let index = 0; index < event_presentation_obj_li?.length; index++) { + const event_presentation_obj = event_presentation_obj_li[index]; + const event_presentation_id = event_presentation_obj.event_presentation_id_random; - let load_event_presenter_obj_li = events_func.load_ae_obj_li__event_presenter({ - api_cfg: ae_acct.api, - for_obj_type: 'event_presentation', - for_obj_id: event_presentation_id, - enabled: 'all', - hidden: 'all', - limit: 19, - params: {}, - try_cache: true, - log_lvl: 2 - }); - if (log_lvl) { - console.log(`load_event_presenter_obj_li = `, load_event_presenter_obj_li); - } - event_presentation_obj_li[index].event_presenter_li = load_event_presenter_obj_li; - } + const load_event_presenter_obj_li = events_func.load_ae_obj_li__event_presenter({ + api_cfg: ae_acct.api, + for_obj_type: 'event_presentation', + for_obj_id: event_presentation_id, + enabled: 'all', + hidden: 'all', + limit: 19, + params: {}, + try_cache: true, + log_lvl: 2 + }); + if (log_lvl) { + console.log(`load_event_presenter_obj_li = `, load_event_presenter_obj_li); + } + event_presentation_obj_li[index].event_presenter_li = load_event_presenter_obj_li; + } - return event_presentation_obj_li; - }); - if (log_lvl) { - console.log(`load_event_presentation_obj_li = `, load_event_presentation_obj_li); - } - ae_acct.slct.event_presentation_obj_li = load_event_presentation_obj_li; + return event_presentation_obj_li; + }); + if (log_lvl) { + console.log(`load_event_presentation_obj_li = `, load_event_presentation_obj_li); + } + ae_acct.slct.event_presentation_obj_li = load_event_presentation_obj_li; - // Load event files for the session - let load_event_file_obj_li = await events_func.load_ae_obj_li__event_file({ - api_cfg: ae_acct.api, - for_obj_type: 'event_session', - for_obj_id: event_session_id, - enabled: 'all', - hidden: 'all', - limit: 50, - try_cache: true - }) - .then((event_file_obj_li) => { - if (log_lvl) { - console.log(`event_file_obj_li = `, event_file_obj_li); - } - return event_file_obj_li; - }); - if (log_lvl) { - console.log(`load_event_file_obj_li = `, load_event_file_obj_li); - } - ae_acct.slct.event_file_obj_li = load_event_file_obj_li; - } + // Load event files for the session + const load_event_file_obj_li = await events_func + .load_ae_obj_li__event_file({ + api_cfg: ae_acct.api, + for_obj_type: 'event_session', + for_obj_id: event_session_id, + enabled: 'all', + hidden: 'all', + limit: 50, + try_cache: true + }) + .then((event_file_obj_li) => { + if (log_lvl) { + console.log(`event_file_obj_li = `, event_file_obj_li); + } + return event_file_obj_li; + }); + if (log_lvl) { + console.log(`load_event_file_obj_li = `, load_event_file_obj_li); + } + ae_acct.slct.event_file_obj_li = load_event_file_obj_li; + } - // WARNING: Precaution against shared data between sites and presentations. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and presentations. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/events/[event_id]/session/[session_id]/ae_comp__event_session_poc_form_agree.svelte b/src/routes/events/[event_id]/session/[session_id]/ae_comp__event_session_poc_form_agree.svelte index 40e89bb6..d60d253f 100644 --- a/src/routes/events/[event_id]/session/[session_id]/ae_comp__event_session_poc_form_agree.svelte +++ b/src/routes/events/[event_id]/session/[session_id]/ae_comp__event_session_poc_form_agree.svelte @@ -1,424 +1,422 @@ - {#if $lq__event_session_obj} -

- {$events_loc.pres_mgmt?.label__session_poc_name} Agreement for:
- {$lq__event_session_obj?.poc_person_full_name} - {#if $lq__event_session_obj?.poc_person_primary_email} - ({$lq__event_session_obj?.poc_person_primary_email ?? '-- not set --'}) - {/if} - -

+

+ {$events_loc.pres_mgmt?.label__session_poc_name} Agreement for:
+ {$lq__event_session_obj?.poc_person_full_name} + {#if $lq__event_session_obj?.poc_person_primary_email} + ({$lq__event_session_obj?.poc_person_primary_email ?? '-- not set --'}) + {/if} + +

-{#if !$lq__event_session_obj?.poc_agree} -
-
- - Not Yet Agreed -
-
- Waiting for agreement to the {$events_loc.pres_mgmt?.label__session_poc_name} Consent and Release and Terms and Conditions before you can move on. Please review and mark as agreed below. -
-
-{/if} + {#if !$lq__event_session_obj?.poc_agree} +
+
+ + Not Yet Agreed +
+
+ Waiting for agreement to the {$events_loc.pres_mgmt?.label__session_poc_name} Consent and Release + and Terms and Conditions before you can move on. Please review and mark as agreed below. +
+
+ {/if} -
- -
+
+ +
+
+ +

+ {$lq__event_session_obj.poc_person_full_name} ({$lq__event_session_obj.poc_person_primary_email}) agrees to the following terms and conditions for the presentation: +

+

+ Session: "{$lq__event_session_obj?.name}" +

-
+
+

Opt-Out?

+ -
- -
+ let event_session_data = { + poc_agree: true + }; - -
+ // Use this in the future if we need to store the agreements in a more complex way? + // let event_session_data = {poc_kv_json: $lq__event_session_obj?.poc_kv_json}; + // console.log('event_session_data:', event_session_data); + // event_session_data.poc_kv_json[poc_type]['agree'] = true; -
-

Agree?

- - {#if !$lq__event_session_obj?.poc_agree} -
- Not Agreed: - - -
-
- Waiting for agreement to the POC Consent and Release and Terms and Conditions before you can move on. -
- {:else} -
- Agreed: - - Marked as agreed -
- {/if} + ae_promises.update__event_session_obj__agree = events_func + .update_ae_obj__event_session({ + api_cfg: $ae_api, + event_session_id: $lq__event_session_obj?.event_session_id, + data_kv: event_session_data, + log_lvl: log_lvl + }) + .then(function (update_result) { + if (log_lvl) { + console.log('update_result:', update_result); + } + $events_sess.pres_mgmt.status__session_agree = 'saved'; + }); + }} + class="btn btn-lg preset-tonal-primary border border-primary-500 hover:preset-filled-success-500 m-2" + > + + Mark as agreed? - {#if !$lq__event_session_obj?.poc_agree} - + {:else} + - {:else} - - {/if} -
- -
+ ae_promises.update__event_session_obj__agree = events_func + .update_ae_obj__event_session({ + api_cfg: $ae_api, + event_session_id: $lq__event_session_obj?.event_session_id, + data_kv: event_session_data, + log_lvl: log_lvl + }) + .then(function (update_result) { + // console.log(update_result); + // return update_result; + }); + }} + class="btn btn-lg preset-tonal-success border border-success-500 hover:preset-filled-warning-500 m-2" + > + + Change to not agreed? + {#await ae_promises.update__event_session_obj__agree} + + {:then update__event_session_obj__agree_result} + {#if $events_sess.pres_mgmt.status__session_agree} + + {/if} + {:catch error} + + {/await} + + {/if} + +
{:else} - Not ready -{/if} \ No newline at end of file + Not ready +{/if} diff --git a/src/routes/events/[event_id]/session/[session_id]/ae_comp__event_session_poc_profile.svelte b/src/routes/events/[event_id]/session/[session_id]/ae_comp__event_session_poc_profile.svelte index 3da92ff8..fe37ffe2 100644 --- a/src/routes/events/[event_id]/session/[session_id]/ae_comp__event_session_poc_profile.svelte +++ b/src/routes/events/[event_id]/session/[session_id]/ae_comp__event_session_poc_profile.svelte @@ -1,197 +1,209 @@ -
+ {#if $lq__event_session_obj} + {#if $lq__event_session_obj.poc_person_id_random && $ae_loc.trusted_access} + + + + + + + + {/if} -{#if $lq__event_session_obj} +

+ + {$lq__event_session_obj.poc_person_full_name} ({$lq__event_session_obj.poc_person_primary_email}) +

-{#if $lq__event_session_obj.poc_person_id_random && $ae_loc.trusted_access} - - - - - - + + - -{/if} + + +
+
+ -

- - {$lq__event_session_obj.poc_person_full_name} ({$lq__event_session_obj.poc_person_primary_email}) -

+ - - + +
+

+ Biography length: {ae_tmp.biography ? ae_util.number_w_commas(ae_tmp.biography.length) : 0} characters; + {ae_tmp.biography ? ae_util.number_w_commas(ae_util.count_words(ae_tmp.biography)) : 0} estimated + words +

+ +

The biography should be plain text only and be at most 100 words.

+ + +
+ -
-

Biography length: {(ae_tmp.biography ? ae_util.number_w_commas(ae_tmp.biography.length) : 0)} characters; {(ae_tmp.biography ? ae_util.number_w_commas(ae_util.count_words(ae_tmp.biography)) : 0)} estimated words

- -

The biography should be plain text only and be at most 100 words.

- - - -
- - -{#if $lq__event_session_obj.poc_kv_json[poc_type]?.biography_updated_on} - - Last saved: {ae_util.iso_datetime_formatter($lq__event_session_obj.poc_kv_json[poc_type]?.biography_updated_on, 'datetime_12_long')} - -{/if} - -
- -
- - - - - - -{:else} -Not ready -{/if} + {#if $lq__event_session_obj.poc_kv_json[poc_type]?.biography_updated_on} + + Last saved: {ae_util.iso_datetime_formatter( + $lq__event_session_obj.poc_kv_json[poc_type]?.biography_updated_on, + 'datetime_12_long' + )} + + {/if} + + + {:else} + Not ready + {/if}
diff --git a/src/routes/events/[event_id]/session/[session_id]/session_page_menu.svelte b/src/routes/events/[event_id]/session/[session_id]/session_page_menu.svelte index 322faec5..de4698c4 100644 --- a/src/routes/events/[event_id]/session/[session_id]/session_page_menu.svelte +++ b/src/routes/events/[event_id]/session/[session_id]/session_page_menu.svelte @@ -1,533 +1,531 @@ - -
+
+ +
+ + - -
+ + + - - + - - - + + - + + {#if $lq__event_session_obj?.event_id} + + + {/if} + +
+ - - + +
+
+

Æ Session Menu Options

- - {#if $lq__event_session_obj?.event_id} - - - {/if} - +
+
+ +
- - - -
- -
-

- Æ Session Menu Options -

- -
- -
- - - + title={$lq__event_session_obj?.alert ? 'Remove alert status' : 'Mark as alert'} + > + {#if $lq__event_session_obj?.alert} + + + {:else} + + {/if} + + + { + console.log(`ae_crud_updated:`, e.detail); - { - console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: $lq__event_session_obj?.event_session_id, + log_lvl: log_lvl + }); + }} + > + + +
- ae_triggers.hide_event_launcher = true; - }} - class="btn btn-sm m-1 group" - class:ae_btn_surface_outlined={!$lq__event_session_obj?.hide_event_launcher} - class:ae_btn_success={$lq__event_session_obj?.hide_event_launcher} - disabled={!$ae_loc.trusted_access} - title="{$lq__event_session_obj?.hide_event_launcher ? 'Not showing in the Launcher. Unhide from the Launcher?' : 'Currently showing in the Launcher. Hide from the Launcher?'}" - > - {#if $lq__event_session_obj?.hide_event_launcher} - - Unhide from Launcher - {:else} - - - - {/if} - - - -
+
+ { + console.log(`ae_crud_updated:`, e.detail); -
+ events_func.load_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: $lq__event_session_obj?.event_session_id, + log_lvl: log_lvl + }); + }} + > + + + - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: $lq__event_session_obj?.event_session_id, - log_lvl: log_lvl - }); - }} - > - - - + events_func.load_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: $lq__event_session_obj?.event_session_id, + log_lvl: log_lvl + }); + }} + > + + + - { - console.log(`ae_crud_updated:`, e.detail); + + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: $lq__event_session_obj?.event_session_id, - log_lvl: log_lvl - }); - }} - > - - - + // $events_slct.exhibit_tracking_obj.hide = !$lq__event_session_obj?.hide; + ae_triggers.enable = true; + }} + class="btn btn-sm" + class:ae_btn_success_outlined={$lq__event_session_obj?.enable} + class:ae_btn_error={!$lq__event_session_obj?.enable} + disabled={!$ae_loc.manager_access} + > + {#if $lq__event_session_obj?.enable} + + Enabled + {:else} + + Enable? + {/if} + + + + - - { - console.log(`ae_crud_updated:`, e.detail); + - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: $lq__event_session_obj?.event_session_id, - log_lvl: log_lvl - }) - .then(function (load_results) { - // Maybe reload page? - // window.location.reload(); - }); - }} - > - - - + events_func + .delete_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: $lq__event_session_obj.event_session_id, + method: 'delete' + }) + .then(function (delete_results) { + $events_slct.event_session_id = null; + $events_slct.event_session_obj = {}; + goto( + `/events/${$lq__event_session_obj.event_id}/session/${$lq__event_session_obj.event_session_id}` + ); + }); + }} + class="btn btn-sm mx-1 ae_btn_error" + type="button" + title="Delete record permanently" + > + + Delete + + {:else if $ae_loc.administrator_access} + + {/if} +
+
+
+ +
+ - + - - {#if $ae_loc.manager_access} - - {:else if $ae_loc.administrator_access} - - {/if} - -
- -
-
- - - -
- - - - -
- -
-
+
+ +
+
+ diff --git a/src/routes/events/[event_id]/session/[session_id]/session_view.svelte b/src/routes/events/[event_id]/session/[session_id]/session_view.svelte index c80879fe..5cc2e5f7 100644 --- a/src/routes/events/[event_id]/session/[session_id]/session_view.svelte +++ b/src/routes/events/[event_id]/session/[session_id]/session_view.svelte @@ -1,157 +1,162 @@ - {#if $lq__event_session_obj} - -
- - - - - {#if $events_sess.pres_mgmt.session_qr_url[lq__event_session_obj?.event_session_id]} -
- {#if $events_sess.pres_mgmt.session_qr_url[lq__event_session_obj?.event_session_id]} - - - { - $events_sess.pres_mgmt.qr_bigger = !$events_sess.pres_mgmt.qr_bigger; - }} - class:h-48={$events_sess.pres_mgmt.qr_bigger} - class:w-48={$events_sess.pres_mgmt.qr_bigger} - class:hover:h-96={$events_sess.pres_mgmt.qr_bigger} - class:hover:w-96={$events_sess.pres_mgmt.qr_bigger} - class="qr_code qr_type_url + > + {#if $events_sess.pres_mgmt.session_qr_url[lq__event_session_obj?.event_session_id]} + + + { + $events_sess.pres_mgmt.qr_bigger = !$events_sess.pres_mgmt.qr_bigger; + }} + class:h-48={$events_sess.pres_mgmt.qr_bigger} + class:w-48={$events_sess.pres_mgmt.qr_bigger} + class:hover:h-96={$events_sess.pres_mgmt.qr_bigger} + class:hover:w-96={$events_sess.pres_mgmt.qr_bigger} + class="qr_code qr_type_url h-32 w-32 hover:h-54 hover:w-54 transition-all ease-in-out duration-500 " - alt="URL QR code" - /> - {:else} - No QR URL yet - {/if} - - - Session URL - - - -
-{/if} + alt="URL QR code" + /> + {:else} + No QR URL yet + {/if} + + + Session URL + + + + + {/if} +
    +
  • + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + { + console.log(`ae_crud_updated:`, e.detail); -
      -
    • - {#if $ae_loc.trusted_access && $ae_loc.edit_mode} - { - console.log(`ae_crud_updated:`, e.detail); + events_func + .load_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: lq__event_session_obj?.event_session_id, + log_lvl: 1 + }) + .then(function (load_results) {}); + }} + > + Name/title: + + {lq__event_session_obj.name} + + + {/if} - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: lq__event_session_obj?.event_session_id, - log_lvl: 1 - }) - .then(function (load_results) { - }); - }} - > - Name/title: - - {lq__event_session_obj.name} - + {#if $ae_loc.edit_mode} + { + console.log(`ae_crud_updated:`, e.detail); - - {/if} - - {#if $ae_loc.edit_mode} - { - console.log(`ae_crud_updated:`, e.detail); - - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: lq__event_session_obj?.event_session_id, - log_lvl: 1 - }) - .then(function (load_results) { - }); - }} - > - - code: - - {lq__event_session_obj.code} - - - {/if} -
    • -
    • - - Date - & - - : - - { - console.log(`ae_crud_updated:`, e.detail); + title="Session code {lq__event_session_obj.code}" + > + code: + + {lq__event_session_obj.code} + + + {/if} +
    • +
    • + + Date & + + : + + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: lq__event_session_obj?.event_session_id - }); - // $events_trigger = 'load__event_session_obj_id'; - // $events_trig_kv['event_session_id'] = lq__event_session_obj?.event_session_id; - }} - > - {ae_util.iso_datetime_formatter(lq__event_session_obj.start_datetime, 'dddd')}, - {ae_util.iso_datetime_formatter(lq__event_session_obj.start_datetime, $events_loc.pres_mgmt.datetime_format)} - - - - { - console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: lq__event_session_obj?.event_session_id + }); + // $events_trigger = 'load__event_session_obj_id'; + // $events_trig_kv['event_session_id'] = lq__event_session_obj?.event_session_id; + }} + > + {ae_util.iso_datetime_formatter(lq__event_session_obj.start_datetime, 'dddd')}, + {ae_util.iso_datetime_formatter( + lq__event_session_obj.start_datetime, + $events_loc.pres_mgmt.datetime_format + )} + + - + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: lq__event_session_obj?.event_session_id - }); - // $events_trigger = 'load__event_session_obj_id'; - // $events_trig_kv['event_session_id'] = lq__event_session_obj?.event_session_id; - }} - > - {ae_util.iso_datetime_formatter(lq__event_session_obj.end_datetime, $events_loc.pres_mgmt.time_format)} - -
    • -
    • - - Location/room: - - + events_func.load_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: lq__event_session_obj?.event_session_id + }); + // $events_trigger = 'load__event_session_obj_id'; + // $events_trig_kv['event_session_id'] = lq__event_session_obj?.event_session_id; + }} + > + {ae_util.iso_datetime_formatter( + lq__event_session_obj.end_datetime, + $events_loc.pres_mgmt.time_format + )} + +
    • +
    • + Location/room: + - {#if $events_loc.pres_mgmt?.hide__launcher_link_legacy && $events_loc.pres_mgmt?.hide__launcher_link && !$ae_loc.edit_mode} - - {lq__event_session_obj?.event_location_name ?? '-- not set --'} - - {/if} + {#if $events_loc.pres_mgmt?.hide__launcher_link_legacy && $events_loc.pres_mgmt?.hide__launcher_link && !$ae_loc.edit_mode} + + {lq__event_session_obj?.event_location_name ?? '-- not set --'} + + {/if} - - - - {@html lq__event_session_obj?.event_location_name ? lq__event_session_obj?.event_location_name : ae_snip.html__not_set} - + + + + {@html lq__event_session_obj?.event_location_name + ? lq__event_session_obj?.event_location_name + : ae_snip.html__not_set} + - - - - - + + + + + - - - - - + + + + + - {#if $ae_loc.trusted_access && $ae_loc.edit_mode} - { - console.log(`ae_crud_updated:`, e.detail); + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: lq__event_session_obj?.event_session_id, - log_lvl: 1 - }) - .then(function (load_results) { - ae_tmp.event_location_id = null; - ae_tmp.show__edit_event_location = false; - }); - }} - > - {#if ae_tmp?.show__edit_location} - - {#await $slct.event_location_obj_li} - - {:then event_location_obj_li} - - {/await} + {/await} - + ae_tmp.event_location_id = null; + ae_tmp.show__edit_event_location = false; + }} + class="btn btn-sm preset-tonal-warning hover:preset-tonal-warning border border-warning-500" + > + + Cancel + + {:else} + + {/if} + + {/if} +
    • +
    • + + {$events_loc.pres_mgmt?.label__session_poc_name}: + + {#if lq__event_session_obj?.poc_person_id} + {#if $ae_loc.manager_access} + + {@html lq__event_session_obj?.poc_person_full_name + ? lq__event_session_obj.poc_person_full_name + : ae_snip.html__not_set} + + {/if} - return load_results; - }) - .finally(function () { - console.log(`Finally...`); - ae_tmp.event_location_id = lq__event_session_obj?.event_location_id; - ae_tmp.show__edit_event_location = true; - }); - }} - class="btn btn-sm preset-tonal-warning group" - > - - - + {#if $ae_loc.trusted_access || $events_loc.auth__kv.session[lq__event_session_obj?.event_session_id] === true} + + - {/if} + + + + {#snippet footer()} +
      + +
      + {/snippet} +
      + {#if $events_loc.pres_mgmt?.require__session_agree} + + - - {/if} -
    • -
    • - - {$events_loc.pres_mgmt?.label__session_poc_name}: - - {#if lq__event_session_obj?.poc_person_id} - {#if $ae_loc.manager_access} - - {@html lq__event_session_obj?.poc_person_full_name ? lq__event_session_obj.poc_person_full_name : ae_snip.html__not_set} - - {/if} + + + - {#if - $ae_loc.trusted_access || - $events_loc.auth__kv.session[lq__event_session_obj?.event_session_id] === true} - - + {#snippet footer()} +
      + +
      + {/snippet} +
      + {/if} - - + + {:else} + + {@html lq__event_session_obj.poc_person_full_name + ? lq__event_session_obj.poc_person_full_name + : ae_snip.html__not_set} + + {/if} + {:else} + {@html ae_snip.html__not_set} + {/if} - + - {#snippet footer()} -
      - -
      - {/snippet} - -
      - - {#if $events_loc.pres_mgmt?.require__session_agree} - - - - - - - - - {#snippet footer()} -
      - - -
      - {/snippet} - -
      - {/if} - - - - - {:else} - - {@html lq__event_session_obj.poc_person_full_name ? lq__event_session_obj.poc_person_full_name : ae_snip.html__not_set} - - {/if} - {:else} - {@html ae_snip.html__not_set} - {/if} - - - - - {#if $ae_loc.trusted_access && $ae_loc.edit_mode} - { - console.log(`ae_crud_updated:`, e.detail); + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: lq__event_session_obj?.event_session_id, - log_lvl: 0 - }) - .then(function (load_results) { - ae_tmp.poc_person_id = null; - ae_tmp.show__edit_poc_person = false; + events_func + .load_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: lq__event_session_obj?.event_session_id, + log_lvl: 0 + }) + .then(function (load_results) { + ae_tmp.poc_person_id = null; + ae_tmp.show__edit_poc_person = false; - // Maybe reload page? - // window.location.reload(); - }); - }} - > - {#if ae_tmp?.show__edit_poc_person} + // Maybe reload page? + // window.location.reload(); + }); + }} + > + {#if ae_tmp?.show__edit_poc_person} + {#await $slct.person_obj_li} + + {:then person_obj_li} + + {/await} + {/if} - {#await $slct.person_obj_li} - - {:then person_obj_li} - - {/await} + {#if ae_tmp.show__edit_poc_person} + + {:else} + + // $slct.person_obj_li = await core_func.load_ae_obj_li__person({api_cfg: $ae_api, account_id: $slct.account_id, params: params}); - {:else} + $slct.person_obj_li = core_func + .load_ae_obj_li__person({ + api_cfg: $ae_api, + for_obj_type: 'account', + for_obj_id: $slct.account_id, + limit: $ae_loc.person.qry_limit__people, + order_by_li: { + family_name: 'ASC', + given_name: 'ASC', + updated_on: 'DESC', + created_on: 'DESC' + } + // params: params + }) + .then(function (load_results) { + console.log(`Loaded person_obj_li:`, load_results); - + {/if} + + {/if} - $slct.person_obj_li = core_func.load_ae_obj_li__person({ - api_cfg: $ae_api, - for_obj_type: 'account', - for_obj_id: $slct.account_id, - limit: $ae_loc.person.qry_limit__people, - order_by_li: {'family_name': 'ASC', 'given_name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - // params: params - }) - .then(function (load_results) { - console.log(`Loaded person_obj_li:`, load_results); + + {#if $events_loc.auth__kv.session[$events_slct.event_session_id] === true} + Signed In + {/if} + {#if $events_loc.pres_mgmt?.require__session_agree && $events_loc?.pres_mgmt?.show__email_access_link && lq__event_session_obj?.poc_person_primary_email && ($ae_loc.trusted_access || !$events_loc.auth__kv.session[lq__event_session_obj?.event_session_id])} + + {/if} - return load_results; - }); + {#if $events_loc.pres_mgmt?.show__copy_access_link && $ae_loc.trusted_access && lq__event_session_obj.poc_person_id} + + - ae_tmp.poc_person_id = lq__event_session_obj?.poc_person_id; - ae_tmp.show__edit_poc_person = true; - }} - class="btn btn-sm preset-tonal-warning group" - > - - - - {/if} + + {/if} + +
    • - - {/if} + {#if $ae_loc.administrator_access} +
    • + Session passcode: + + {@html lq__event_session_obj.passcode + ? lq__event_session_obj.passcode + : ae_snip.html__not_set} + { + console.log(`ae_crud_updated:`, e.detail); - - {#if $events_loc.auth__kv.session[$events_slct.event_session_id] === true} - Signed In - {/if} - {#if $events_loc.pres_mgmt?.require__session_agree - && $events_loc?.pres_mgmt?.show__email_access_link - && lq__event_session_obj?.poc_person_primary_email - && ($ae_loc.trusted_access || !$events_loc.auth__kv.session[lq__event_session_obj?.event_session_id])} + events_func + .load_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: lq__event_session_obj?.event_session_id, + log_lvl: 1 + }) + .then(function (load_results) {}); + }} + > +
    • + {/if} - + events_func.load_ae_obj_id__event_session({ + api_cfg: $ae_api, + event_session_id: lq__event_session_obj?.event_session_id, + log_lvl: 1 + }); + }} + > + Session description: - {/if} + {#if lq__event_session_obj.description} + - {#if $events_loc.pres_mgmt?.show__copy_access_link - && $ae_loc.trusted_access && lq__event_session_obj.poc_person_id} - - +
      {lq__event_session_obj.description}
      + {:else} + {@html ae_snip.html__not_set} + {/if} + + + +
    - - {/if} - - -
  • - - {#if $ae_loc.administrator_access} -
  • - - Session passcode: - - - {@html lq__event_session_obj.passcode ? lq__event_session_obj.passcode : ae_snip.html__not_set} - { - console.log(`ae_crud_updated:`, e.detail); - - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: lq__event_session_obj?.event_session_id, - log_lvl: 1 - }) - .then(function (load_results) { - }); - }} - > - -
  • - {/if} - -
  • -
    - { - console.log(`ae_crud_updated:`, e.detail); - - events_func.load_ae_obj_id__event_session({ - api_cfg: $ae_api, - event_session_id: lq__event_session_obj?.event_session_id, - log_lvl: 1 - }); - }} - > - - Session description: - - - {#if lq__event_session_obj.description} - - -
    {lq__event_session_obj.description}
    - - {:else} - {@html ae_snip.html__not_set} - {/if} -
    -
    -
  • - -
- - +
- - - - - -
- - {#if $lq__event_presentation_obj_li && $lq__event_presentation_obj_li?.length > 0} - - - {/if} - -
- + +
+ {#if $lq__event_presentation_obj_li && $lq__event_presentation_obj_li?.length > 0} + + {/if} +
{/if} - - diff --git a/src/routes/events/[event_id]/session/ae_comp__event_session_alert.svelte b/src/routes/events/[event_id]/session/ae_comp__event_session_alert.svelte index c0710003..78c63b18 100644 --- a/src/routes/events/[event_id]/session/ae_comp__event_session_alert.svelte +++ b/src/routes/events/[event_id]/session/ae_comp__event_session_alert.svelte @@ -1,79 +1,94 @@ -
- - - + title={`*Alert*:\n${lq__event_session_obj?.alert_msg ? lq__event_session_obj?.alert_msg : 'No message set.'}`} + > + + + - -
-
- - + title="Cancel editing and close alert message" + > + + + Close Alert + - - -
+ title="Toggle alert status" + > + + + Remove Alert + +
+
+ {#if $events_sess.pres_mgmt.show__edit_alert_msg[lq__event_session_obj?.event_session_id_random]} + + {:else} + {lq__event_session_obj?.alert_msg ?? 'No message set.'} + {/if} +
-
- {#if $events_sess.pres_mgmt.show__edit_alert_msg[lq__event_session_obj?.event_session_id_random]} - - {:else} - {lq__event_session_obj?.alert_msg ?? 'No message set.'} - {/if} -
- - -
- {#if $events_sess.pres_mgmt.show__edit_alert_msg[lq__event_session_obj?.event_session_id_random]} - - - + title="Save alert message" + > + + Save + - - + title="Reset alert message and cancel editing alert" + > + + Cancel + + {:else} + + - - {/if} -
- - -
- + title="Edit alert message" + > + + Edit Message + + {/if} + + diff --git a/src/routes/events/[event_id]/sign_in_out.svelte b/src/routes/events/[event_id]/sign_in_out.svelte index 258fa81e..50bf1aef 100644 --- a/src/routes/events/[event_id]/sign_in_out.svelte +++ b/src/routes/events/[event_id]/sign_in_out.svelte @@ -1,263 +1,267 @@ -{#if $events_loc.auth__person?.id} - -{:else if $events_sess.auth__person.presenter_id || $events_sess.auth__person.session_id} -
-
- Use the link that was sent to your email address to sign in or enter your key and passcode to sign in. -
-
- $events_sess.auth__entered_key = e.target?.value} - > - $events_sess.auth__entered_passcode = e.target?.value} - > - + {:else if $events_sess.auth__person.presenter_id || $events_sess.auth__person.session_id} +
+
+ Use the link that was sent to your email address to sign in or enter your key and passcode + to sign in. +
+
+ ($events_sess.auth__entered_key = e.target?.value)} + /> + ($events_sess.auth__entered_passcode = e.target?.value)} + /> + -
+ // Setting again here... just because for now. + // $events_slct.event_presentation_id = $events_sess.auth__person.presentation_id; + // $events_slct.event_presenter_id = $events_sess.auth__person.presenter_id; + }} + > + + Sign In + +
-
- For: - session: {$events_sess.auth__person.session_id} - presentation: {$events_sess.auth__person.presentation_id} - presenter: {$events_sess.auth__person.presenter_id} -
+
+ For: session: {$events_sess.auth__person.session_id} + presentation: {$events_sess.auth__person.presentation_id} + presenter: {$events_sess.auth__person.presenter_id} +
- -
+ +
- - -
-{/if} - \ No newline at end of file +
+ {/if} +
diff --git a/src/routes/events/ae_comp__event_file_obj_tbl.svelte b/src/routes/events/ae_comp__event_file_obj_tbl.svelte index 3d5b50e4..fdf25798 100644 --- a/src/routes/events/ae_comp__event_file_obj_tbl.svelte +++ b/src/routes/events/ae_comp__event_file_obj_tbl.svelte @@ -1,407 +1,428 @@ -
+ class:border-r-2={horiz_scroll_warning} + class:border-dashed={horiz_scroll_warning} + class:border-warning-900-100={horiz_scroll_warning} + class="ae_comp event_file_obj_tbl {container_class_li} container overflow-auto max-w-screen" +> + + {#if $lq__event_file_obj_li && $lq__event_file_obj_li?.length} +
+
+

+ Results: + {#if $lq__event_file_obj_li.length} + + + {$lq__event_file_obj_li.length ?? 'None'}× + + {/if} +

- -{#if $lq__event_file_obj_li && $lq__event_file_obj_li?.length} +
+ + - {#if $lq__event_file_obj_li.length} - - - {$lq__event_file_obj_li.length ?? 'None'}× - - {/if} - + {#if show_session_fields} + + {:else} + + {/if} -
- + {:else} + + {/if} - let csv_data = generate_file_export_csv($lq__event_file_obj_li); - console.log('CSV Data:', csv_data); - }} - > - - Export Files CSV - - + {#if show_presentation_fields} + + {:else} + + {/if} +
+
+ + + + + + + + {#if show_location_fields} + + {/if} + {#if show_session_fields} + + + + {/if} + {#if show_presentation_fields} + + + {/if} + + + + + + + {#each $lq__event_file_obj_li as event_file_obj} + + + {/each} + +
+ Filename + + Link SizeUploadedLocation Code Session Start datetimePresentationPresentation timeName
+ - {:else} - - {/if} - - - {#if !hide_session_code} - - {:else} - - {/if} - - {#if show_presentation_fields} - - {:else} - - {/if} - - - - - - - - - - - - {#if show_location_fields} - - {/if} - {#if show_session_fields} - - - - {/if} - {#if show_presentation_fields} - - - {/if} - - - - - - - - {#each $lq__event_file_obj_li as event_file_obj} - - - + + + + {#if show_location_fields} + + {/if} - - - - {#if show_location_fields} - - {/if} - - {#if show_session_fields} - - - - {/if} - {#if show_presentation_fields} - - - {/if} - - + {@html ae_snip.html__not_set} + {/if} + + - - - - {/each} - -
- Filename - - - Link - SizeUploadedLocation - Code - - Session - Start datetimePresentationPresentation timeName
- - - - - -
- - Original: - - - - - - +
+
+ Original: + + + + + - -
+ + -
- - Session Name: - - - - - - - -
+ + -
- - Presentation Name: - - - - - - - -
+ + +
{ae_util.format_bytes(event_file_obj?.file_size)} +
+ + {ae_util.iso_datetime_formatter(event_file_obj?.created_on, 'dddd')} + + + {ae_util.iso_datetime_formatter( + event_file_obj?.created_on, + 'date_long_month_day' + )} + +
+ + {ae_util.iso_datetime_formatter(event_file_obj?.created_on, 'time_12_short')} + +
+ {#if event_file_obj?.event_location_id} + + {event_file_obj?.event_location_name} + {:else} + {@html ae_snip.html__not_set} + {/if} + {ae_util.format_bytes(event_file_obj?.file_size)} -
- - {ae_util.iso_datetime_formatter(event_file_obj?.created_on, 'dddd')} - - - {ae_util.iso_datetime_formatter(event_file_obj?.created_on, 'date_long_month_day')} - -
- - {ae_util.iso_datetime_formatter(event_file_obj?.created_on, 'time_12_short')} - -
- {#if event_file_obj?.event_location_id} - - {event_file_obj?.event_location_name} - {:else} - {@html ae_snip.html__not_set} - {/if} - - {event_file_obj?.event_session_code ?? '-- not set --'} - - - - {event_file_obj?.event_session_name} - - {ae_util.iso_datetime_formatter(event_file_obj?.event_session_start_datetime, 'datetime_iso_12_no_seconds')} - {#if event_file_obj?.event_presentation_id} - {event_file_obj?.event_presentation_name} - {:else} - {@html ae_snip.html__not_set} - {/if} - - {#if event_file_obj?.event_presentation_id} - {ae_util.iso_datetime_formatter(event_file_obj?.event_presentation_start_datetime, 'time_12_short')} - {:else} - {@html ae_snip.html__not_set} - {/if} - - {#if event_file_obj?.event_presenter_id} - - - {event_file_obj?.event_presenter_full_name} - - {:else} - - {@html ae_snip.html__not_set} - {/if} -
- - -{:else} - -

- No files available to show. -

- -{/if} - + +
+
+ {:else} +

No files available to show.

+ {/if}
- diff --git a/src/routes/events/ae_comp__event_file_obj_tbl_wrapper.svelte b/src/routes/events/ae_comp__event_file_obj_tbl_wrapper.svelte index 147bbfbd..8d93552f 100644 --- a/src/routes/events/ae_comp__event_file_obj_tbl_wrapper.svelte +++ b/src/routes/events/ae_comp__event_file_obj_tbl_wrapper.svelte @@ -1,135 +1,143 @@ - {#if event_file_obj_li && event_file_obj_li?.length} - - - + + {:else} -
-

No files available to show in table.

-
-{/if} \ No newline at end of file +
+

No files available to show in table.

+
+{/if} diff --git a/src/routes/events/ae_comp__event_files_upload.svelte b/src/routes/events/ae_comp__event_files_upload.svelte index e4d0f192..847b36fb 100644 --- a/src/routes/events/ae_comp__event_files_upload.svelte +++ b/src/routes/events/ae_comp__event_files_upload.svelte @@ -1,305 +1,311 @@ - -
+ + {#await ae_promises.upload__hosted_file_obj} +
+ + + Uploading + {#if $ae_sess.api_upload_kv[task_id]} + {$ae_sess.api_upload_kv[task_id].percent_completed}% + {/if} + +
+ {/await} - {#await ae_promises.upload__hosted_file_obj} -
- - - Uploading - {#if $ae_sess.api_upload_kv[task_id]} - {$ae_sess.api_upload_kv[task_id].percent_completed}% - {/if} - -
- {/await} - -
- + class:hidden={$events_sess.files.disable_submit__event_file_obj} + > + {#if label}{@render label()}{:else} +
+ + + + Upload files + +
+
+ Presentation related files only
+ (PowerPoint, Keynote, PDF, mp4, Word Doc, Excel, txt, etc) +
+ {/if} + - -
+ /> + - - bind:file_list_status={$events_sess.files.status__file_list} - bind:processed_file_list={$events_sess.files.processed_file_list} - table_class_li={table_class_li} - /> - - + {@html $events_sess.files.processed_file_list.length == 1 + ? `${$events_sess.files.processed_file_list.length}× file` + : `${$events_sess.files.processed_file_list.length}× files`} + {:else} + No files selected + {/if} + + + {/await} + diff --git a/src/routes/events/ae_comp__event_presentation_obj_li.svelte b/src/routes/events/ae_comp__event_presentation_obj_li.svelte index e3a144fe..794414d7 100644 --- a/src/routes/events/ae_comp__event_presentation_obj_li.svelte +++ b/src/routes/events/ae_comp__event_presentation_obj_li.svelte @@ -1,49 +1,59 @@ -
+> +
+ {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + + {/if} +
- events_func.create_ae_obj__event_presentation({ - api_cfg: $ae_api, - event_id: $events_slct.event_id, - event_session_id: $events_slct.event_session_id, - data_kv: presentation_data, - log_lvl: 1, - }) - }} - class="btn btn-sm preset-tonal-warning hover:preset-filled-warning-500" - > - - Add Presentation - - {/if} - + +

+ + Presentations: - + {#if $lq__event_presentation_obj_li?.length} + + + {$lq__event_presentation_obj_li.length ?? 'None'}× + + {/if} - -

- - Presentations: - - {#if $lq__event_presentation_obj_li?.length} - - - {$lq__event_presentation_obj_li.length ?? 'None'}× - - {/if} - - - -

+
+

- -{#if $lq__event_presentation_obj_li?.length} -
    - {#each $lq__event_presentation_obj_li as event_presentation_obj} -
  • + + {#if $lq__event_presentation_obj_li?.length} +
      + {#each $lq__event_presentation_obj_li as event_presentation_obj} +
    • +
      + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + + {/if} +
      - events_func.create_ae_obj__event_presenter({ - api_cfg: $ae_api, - event_id: $events_slct.event_id, - event_session_id: $events_slct.event_session_id, - event_presentation_id: event_presentation_obj.event_presentation_id, - data_kv: presenter_data, - log_lvl: 1, - }) - }} - class="btn btn-sm preset-tonal-warning hover:preset-filled-warning-500" - > - - Add Presenter - - {/if} +

      + + {ae_util.iso_datetime_formatter(event_presentation_obj.start_datetime, 'dddd')} + @ + + + {ae_util.iso_datetime_formatter( + event_presentation_obj.start_datetime, + $events_loc.pres_mgmt.time_format + )} + + { + console.log(`ae_crud_updated:`, e.detail); - + events_func + .load_ae_obj_id__event_presentation({ + api_cfg: $ae_api, + event_presentation_id: event_presentation_obj.event_presentation_id, + log_lvl: 1 + }) + .then(function (load_results) {}) + .then(function (load_results) { + // $events_trigger = 'load__event_presentation_obj_id'; + // $events_trig_kv['event_presentation_id'] = event_presentation_obj.event_presentation_id; + }); + }} + > + + + {event_presentation_obj?.name} + + + -

      - - {ae_util.iso_datetime_formatter(event_presentation_obj.start_datetime, 'dddd')} - @ - - - {ae_util.iso_datetime_formatter(event_presentation_obj.start_datetime, $events_loc.pres_mgmt.time_format)} - + { + console.log(`ae_crud_updated:`, e.detail); - { - console.log(`ae_crud_updated:`, e.detail); + events_func + .load_ae_obj_id__event_presentation({ + api_cfg: $ae_api, + event_presentation_id: event_presentation_obj.event_presentation_id, + log_lvl: 1 + }) + .then(function (load_results) {}) + .then(function (load_results) { + // $events_trigger = 'load__event_presentation_obj_id'; + // $events_trig_kv['event_presentation_id'] = event_presentation_obj.event_presentation_id; + }); + }} + > + {#if (event_presentation_obj?.code || event_presentation_obj?.abstract_code) && !$events_loc.pres_mgmt.hide__presentation_code} + + + {event_presentation_obj?.code ?? ''} + {event_presentation_obj?.abstract_code ?? ''} + + {:else if $ae_loc.trusted_access && $ae_loc.edit_mode} + + + Code: + + {@html event_presentation_obj?.code ?? ae_snip.html__not_set} + + + {/if} + + +

      - events_func.load_ae_obj_id__event_presentation({ - api_cfg: $ae_api, event_presentation_id: event_presentation_obj.event_presentation_id, log_lvl: 1 - }) - .then(function (load_results) { - }) - .then(function (load_results) { - // $events_trigger = 'load__event_presentation_obj_id'; - // $events_trig_kv['event_presentation_id'] = event_presentation_obj.event_presentation_id; - }); - }} - > - - - {event_presentation_obj?.name} - - - +
      + + Date & + + : + + { + console.log(`ae_crud_updated:`, e.detail); - { - console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_presentation({ + api_cfg: $ae_api, + event_presentation_id: event_presentation_obj?.event_presentation_id + }); + // $events_trigger = 'load__event_presentation_obj_id'; + // $events_trig_kv['event_presentation_id'] = event_presentation_obj?.event_presentation_id; + }} + > + {ae_util.iso_datetime_formatter(event_presentation_obj.start_datetime, 'dddd')} + + + {ae_util.iso_datetime_formatter( + event_presentation_obj.start_datetime, + $events_loc.pres_mgmt.time_format + )} + + - + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presentation({ - api_cfg: $ae_api, event_presentation_id: event_presentation_obj.event_presentation_id, log_lvl: 1 - }) - .then(function (load_results) { - }) - .then(function (load_results) { - // $events_trigger = 'load__event_presentation_obj_id'; - // $events_trig_kv['event_presentation_id'] = event_presentation_obj.event_presentation_id; - }); - }} - > - {#if (event_presentation_obj?.code || event_presentation_obj?.abstract_code) && !$events_loc.pres_mgmt.hide__presentation_code} - - - {event_presentation_obj?.code ?? ''} {event_presentation_obj?.abstract_code ?? ''} - - {:else if $ae_loc.trusted_access && $ae_loc.edit_mode} - - - Code: - - {@html event_presentation_obj?.code ?? ae_snip.html__not_set} - - - {/if} - - - + events_func.load_ae_obj_id__event_presentation({ + api_cfg: $ae_api, + event_presentation_id: event_presentation_obj?.event_presentation_id + }); + // $events_trigger = 'load__event_presentation_obj_id'; + // $events_trig_kv['event_presentation_id'] = event_presentation_obj?.event_presentation_id; + }} + > + {ae_util.iso_datetime_formatter( + event_presentation_obj.end_datetime, + $events_loc.pres_mgmt.time_format + )} + +
      -
      - - Date - & - - : - - { - console.log(`ae_crud_updated:`, e.detail); +
      + { + console.log(`ae_crud_updated:`, e.detail); - events_func.load_ae_obj_id__event_presentation({ - api_cfg: $ae_api, - event_presentation_id: event_presentation_obj?.event_presentation_id - }); - // $events_trigger = 'load__event_presentation_obj_id'; - // $events_trig_kv['event_presentation_id'] = event_presentation_obj?.event_presentation_id; - }} - > - {ae_util.iso_datetime_formatter(event_presentation_obj.start_datetime, 'dddd')} - - - {ae_util.iso_datetime_formatter(event_presentation_obj.start_datetime, $events_loc.pres_mgmt.time_format)} - - - - { - console.log(`ae_crud_updated:`, e.detail); + events_func.load_ae_obj_id__event_presentation({ + api_cfg: $ae_api, + event_presentation_id: event_presentation_obj.event_presentation_id, + log_lvl: 1 + }); + }} + > + Description: - events_func.load_ae_obj_id__event_presentation({ - api_cfg: $ae_api, - event_presentation_id: event_presentation_obj?.event_presentation_id - }); - // $events_trigger = 'load__event_presentation_obj_id'; - // $events_trig_kv['event_presentation_id'] = event_presentation_obj?.event_presentation_id; - }} - > - {ae_util.iso_datetime_formatter(event_presentation_obj.end_datetime, $events_loc.pres_mgmt.time_format)} - -
      + {#if event_presentation_obj?.description} + - {#if event_presentation_obj?.description} - - -
      {event_presentation_obj.description}
      - - {:else} - {@html ae_snip.html__not_set} - {/if} - -
      -
      + + - - {#if event_presentation_obj?.event_presentation_id} - - - {/if} + + {#if event_presentation_obj?.event_presentation_id} + + {/if} - - - - -
    • - {/each} -
    -{:else} - + +
  • + {/each} +
+ {:else} + -{/if} - - + {/if}
diff --git a/src/routes/events/ae_comp__event_session_obj_li.svelte b/src/routes/events/ae_comp__event_session_obj_li.svelte index a8350444..558954df 100644 --- a/src/routes/events/ae_comp__event_session_obj_li.svelte +++ b/src/routes/events/ae_comp__event_session_obj_li.svelte @@ -1,78 +1,90 @@
+> + {#if $lq__event_session_obj_li && $lq__event_session_obj_li?.length} +

+ Sessions: + {#if $lq__event_session_obj_li?.length} + + + {$lq__event_session_obj_li.length ?? 'None'}× + + {/if} +

-{#if $lq__event_session_obj_li && $lq__event_session_obj_li?.length} + + + + + + + + + + + + + + {#each $lq__event_session_obj_li as session_obj, index} + + + + {/each} + +
SessionDate + Times + + Location POC Admin
+ {#if session_obj?.alert && $ae_loc.trusted_access} + + {/if} - -

- - Sessions: - - - {#if $lq__event_session_obj_li?.length} - - - {$lq__event_session_obj_li.length ?? 'None'}× - - {/if} -

- - - - - - - - - - - - - - -{#each $lq__event_session_obj_li as session_obj, index} - - + + - {#if show__session_files && $ae_loc.manager_access} - - {/if} + - - + + + + + + - - {/if} + + $slct.person_obj_li = core_func + .load_ae_obj_li__person({ + api_cfg: $ae_api, + for_obj_type: 'account', + for_obj_id: $slct.account_id, + limit: 500, + log_lvl: log_lvl + }) + .then(function (load_results) { + console.log(`Loaded person_obj_li:`, load_results); - - - - - - -{/each} - -
SessionDate - - Times - - - - Location - - POC - - Admin -
- {#if session_obj?.alert && $ae_loc.trusted_access} - - {/if} - - - - - - --> + + + - - {session_obj?.name} - - - {#if session_obj?.file_count_all} - - - {session_obj?.file_count_all}× - - {:else} - - {/if} - + > + + {session_obj?.name} + + + {#if session_obj?.file_count_all} + + + {session_obj?.file_count_all}× + + {:else} + + {/if} + - {#if show__session_presentations && $ae_loc.manager_access} - - - {/if} + {#if show__session_presentations && $ae_loc.manager_access} + + {/if} + {#if show__session_files && $ae_loc.manager_access} + + {/if} + + + + {ae_util.iso_datetime_formatter(session_obj?.start_datetime, 'dddd')} + + + {ae_util.iso_datetime_formatter( + session_obj?.start_datetime, + 'date_long_month_day' + )} + + + + + {#if session_obj?.start_datetime} + + {ae_util.iso_datetime_formatter(session_obj?.start_datetime, 'time_12_short')} + + + + {ae_util.iso_datetime_formatter(session_obj?.end_datetime, 'time_12_short')} + + {:else} + {@html ae_snip.html__not_set} + {/if} + + + + + + + {session_obj?.event_location_name ?? '-- not set --'} + + - - - - {ae_util.iso_datetime_formatter(session_obj?.start_datetime,'dddd')} - - - {ae_util.iso_datetime_formatter(session_obj?.start_datetime,'date_long_month_day')} - - - - - {#if session_obj?.start_datetime} - - {ae_util.iso_datetime_formatter(session_obj?.start_datetime,'time_12_short')} - - - – - - - {ae_util.iso_datetime_formatter(session_obj?.end_datetime,'time_12_short')} - - {:else} - {@html ae_snip.html__not_set} - {/if} - - + + + + + - - - - - {session_obj?.event_location_name ?? '-- not set --'} - - + + + + + + - - - - - - + {#if $ae_loc.edit_mode && $ae_loc.trusted_access} + + {/if} - - - - - + {#if $events_sess.pres_mgmt.show__edit_location[session_obj?.event_session_id_random]} + + {:else if $ae_loc.edit_mode} + + > + + + + + {/if} + + + + {#if session_obj?.poc_person_full_name} + + + {session_obj?.poc_person_full_name} + + + {#if $ae_loc.trusted_access && session_obj?.poc_person_primary_email} + + + + {session_obj?.poc_person_primary_email} + + + {/if} + {:else} + {@html ae_snip.html__not_set} + {/if} - + {#if $ae_loc.edit_mode && $ae_loc.administrator_access} + + - - {#if session_obj?.poc_person_full_name} - - - {session_obj?.poc_person_full_name} - - - {#if $ae_loc.trusted_access && session_obj?.poc_person_primary_email} - - - - {session_obj?.poc_person_primary_email} - - - {/if} - {:else} - {@html ae_snip.html__not_set} - {/if} + // We need to make this ready for the select option list. Convert the list to a key value pair with the person_id_random as the key. We also need to set the option text value to: full_name (primary_email) + if (load_results) { + let person_obj_li = load_results; + let person_obj_kv: key_val = {}; + person_obj_kv[''] = '-- Select a person --'; + person_obj_li.forEach((person_obj) => { + let option_text = `${person_obj.full_name} (${person_obj.primary_email})`; + person_obj_kv[person_obj.person_id_random] = option_text; + }); + $slct.person_obj_kv = person_obj_kv; + } + console.log(`$slct.person_obj_kv = `, $slct.person_obj_kv); + return load_results; + }) + .finally(function () { + console.log(`Finally...`); + ae_tmp.poc_person_id = session_obj?.poc_person_id_random; + ae_tmp.show__edit_event_poc_person = true; - {#if $ae_loc.edit_mode && $ae_loc.administrator_access } - - - - - {/if} + > + + + + + {/if} + + + - - + - + - + + - + let new_hide_event_launcher_value = !session_obj?.hide_event_launcher; + console.log('New hide_event_launcher value:', new_hide_event_launcher_value); - - - + title={session_obj?.hide_event_launcher + ? 'Show in event launcher' + : 'Hide from event launcher'} + > + + {#if session_obj?.hide_event_launcher} + + {:else} + + + {/if} + + + - - -
- - -{:else} -

- - No results to show. Please use the search above to find your session. - -

- - - - - - -{/if} - - \ No newline at end of file + title={session_obj?.alert ? 'Remove alert status' : 'Mark as alert'} + > + {#if session_obj?.alert} + + + {:else} + + {/if} + + +
+ + {:else} +

+ + No results to show. Please use the search above to find your session. + +

+ + + + + + + {/if} +
diff --git a/src/routes/events/ae_comp__event_session_obj_li_wrapper.svelte b/src/routes/events/ae_comp__event_session_obj_li_wrapper.svelte index 07a8ce3f..f7538534 100644 --- a/src/routes/events/ae_comp__event_session_obj_li_wrapper.svelte +++ b/src/routes/events/ae_comp__event_session_obj_li_wrapper.svelte @@ -1,89 +1,87 @@ - - \ No newline at end of file + {container_class_li} + {lq__event_session_obj_li} + {hide__session_location} + {hide__session_poc} + {hide__admin} + {hide__launcher_link_legacy} + {hide__launcher_link} + {hide__location_link} + {log_lvl} +> + diff --git a/src/routes/events/ae_comp__event_session_obj_tbl.svelte b/src/routes/events/ae_comp__event_session_obj_tbl.svelte index de26097b..b4bf8d55 100644 --- a/src/routes/events/ae_comp__event_session_obj_tbl.svelte +++ b/src/routes/events/ae_comp__event_session_obj_tbl.svelte @@ -1,143 +1,125 @@ -
+ class:border-r-2={horiz_scroll_warning} + class:border-dashed={horiz_scroll_warning} + class:border-warning-900-100={horiz_scroll_warning} + class="ae_comp event_session_obj_tbl {container_class_li} container overflow-auto max-w-screen" +> + {#if $lq__event_session_obj_li && $lq__event_session_obj_li?.length} +
+

+ Results: -{#if $lq__event_session_obj_li && $lq__event_session_obj_li?.length} + {#if $lq__event_session_obj_li?.length} + + + {$lq__event_session_obj_li.length ?? 'None'}× + + {/if} +

-
-

- - Results: - - - {#if $lq__event_session_obj_li?.length} - - - {$lq__event_session_obj_li.length ?? 'None'}× - - {/if} -

- - - - - - - {#if show_location_fields} - - {/if} - - - - - - {#each $lq__event_session_obj_li as event_session_obj, index} - - - - {#if show_location_fields} - - {/if} - - - - {/each} - -
NameStart DatetimeLocationSession FilesPresenter Files
- - {event_session_obj?.name} - - - {ae_util.iso_datetime_formatter(event_session_obj?.start_datetime, 'datetime_iso_12_no_seconds')} - - {event_session_obj?.event_location_name} - - {event_session_obj?.file_count ?? '0'} - - {event_session_obj?.file_count_all ?? '0'} -
-
- -{:else} - -

- No sessions available to show. -

- -{/if} - - -
\ No newline at end of file + + + + + + {#if show_location_fields} + + {/if} + + + + + + {#each $lq__event_session_obj_li as event_session_obj, index} + + + + {#if show_location_fields} + + {/if} + + + + {/each} + +
NameStart DatetimeLocationSession FilesPresenter Files
+ + {event_session_obj?.name} + + + {ae_util.iso_datetime_formatter( + event_session_obj?.start_datetime, + 'datetime_iso_12_no_seconds' + )} + + {event_session_obj?.event_location_name} + + {event_session_obj?.file_count ?? '0'} + + {event_session_obj?.file_count_all ?? '0'} +
+ + {:else} +

No sessions available to show.

+ {/if} + diff --git a/src/routes/events/ae_comp__event_session_obj_tbl_wrapper.svelte b/src/routes/events/ae_comp__event_session_obj_tbl_wrapper.svelte index 349d3d37..8d5e49e4 100644 --- a/src/routes/events/ae_comp__event_session_obj_tbl_wrapper.svelte +++ b/src/routes/events/ae_comp__event_session_obj_tbl_wrapper.svelte @@ -1,131 +1,140 @@ - {#if event_session_obj_li && event_session_obj_li?.length} - - + {:else} -
-

No sessions available to show in table.

-
-{/if} \ No newline at end of file +
+

No sessions available to show in table.

+
+{/if} diff --git a/src/routes/events/ae_comp__events_menu_nav.svelte b/src/routes/events/ae_comp__events_menu_nav.svelte index 887d39a2..d5af3ac9 100644 --- a/src/routes/events/ae_comp__events_menu_nav.svelte +++ b/src/routes/events/ae_comp__events_menu_nav.svelte @@ -1,97 +1,97 @@ -
- - - - Æ Core - + class="ae_comp__events_menu_nav flex flex-row flex-wrap gap-1.5 items-center justify-around" + class:hidden={hide} +> + + + + Æ Core + - - - Pres Mgmt Reports - - - - - Locations - - + + + Pres Mgmt Reports + + + + + Locations + + - - - - Session Search - - - - - Back to Session - - - - Launcher - - - - - Session Location - - - -
\ No newline at end of file + + + + Session Search + + + + + Back to Session + + + + Launcher + + + + + Session Location + + + diff --git a/src/routes/events/ae_comp__events_menu_opts.svelte b/src/routes/events/ae_comp__events_menu_opts.svelte index 03b7c4c2..f41af150 100644 --- a/src/routes/events/ae_comp__events_menu_opts.svelte +++ b/src/routes/events/ae_comp__events_menu_opts.svelte @@ -1,666 +1,669 @@ - -
-

- -

+
+

+ +

-
+
+ {#if $ae_loc.authenticated_access} +
+ + + + + + + - {#if $ae_loc.authenticated_access} -
- + + + + + - - - - - - + + + + + - - - - - + + + + + + - - - - - + + + + - - - - - - + + + {#if $ae_loc.manager_access} + + {/if} + +
+ {/if} - +
+ - - - + {#if $ae_loc.authenticated_access} + {#if !$events_loc.pres_mgmt.hide__session_msg} + + {:else} + + {/if} + {/if} - - - {#if $ae_loc.manager_access} - - {/if} + {#if $ae_loc.authenticated_access} + + {#if !$events_loc.pres_mgmt.hide__session_code} + + {:else} + + {/if} + {/if} +
-
-
- {/if} +
+ {#if $ae_loc.trusted_access} +
+ {#if $events_loc.pres_mgmt.show__copy_access_link} + + {:else} + + {/if} -
+ {#if $events_loc.pres_mgmt.show__email_access_link} + + {:else} + + {/if} +
+ {/if} - + {#if $ae_loc.authenticated_access} +
+ {#if $events_loc.pres_mgmt.show_content__session_qr} + + {:else} + + {/if} - {#if $ae_loc.authenticated_access} - {#if !$events_loc.pres_mgmt.hide__session_msg} - - {:else} - - {/if} - {/if} + {#if $events_loc.pres_mgmt.show_content__presenter_qr} + + {:else} + + {/if} +
+ {/if} +
- {#if $ae_loc.authenticated_access} - - {#if !$events_loc.pres_mgmt.hide__session_code} - - {:else} - - {/if} - {/if} -
+ {#if $ae_loc.authenticated_access} +
+ + -
- {#if $ae_loc.trusted_access} -
- {#if $events_loc.pres_mgmt.show__copy_access_link} - - {:else} - - {/if} + + - {#if $events_loc.pres_mgmt.show__email_access_link} - - {:else} - - {/if} -
- {/if} + + - {#if $ae_loc.authenticated_access} -
- {#if $events_loc.pres_mgmt.show_content__session_qr} - - {:else} - - {/if} + + - {#if $events_loc.pres_mgmt.show_content__presenter_qr} - - {:else} - - {/if} -
- {/if} -
+ + + + + {#if $events_loc.pres_mgmt.show_content__session_files} + + {:else} + + {/if} + {#if $events_loc.pres_mgmt.show_content__session_presentations} + + {:else} + + {/if} + +
+ {/if} - {#if $ae_loc.authenticated_access} -
+
+ {#if $ae_loc?.trusted_access} + {#if $ae_loc?.edit_mode} + + {:else} + + {/if} - - - - - - - - - - - - - - - - - - - - - {#if $events_loc.pres_mgmt.show_content__session_files} - - {:else} - - {/if} - - {#if $events_loc.pres_mgmt.show_content__session_presentations} - - {:else} - - {/if} - -
- {/if} - - -
- {#if $ae_loc?.trusted_access} - {#if $ae_loc?.edit_mode} - - {:else} - - {/if} - - {#if $ae_loc?.adv_mode} - - {:else} - - {/if} - {/if} -
- -
- -
\ No newline at end of file + {#if $ae_loc?.adv_mode} + + {:else} + + {/if} + {/if} +
+
+
diff --git a/src/routes/events_badges/+layout.svelte b/src/routes/events_badges/+layout.svelte index 337dfbf7..0286c577 100644 --- a/src/routes/events_badges/+layout.svelte +++ b/src/routes/events_badges/+layout.svelte @@ -1,141 +1,133 @@ - Events Badges - {$events_loc.title ?? 'Æ loading...'} - - - - - - - diff --git a/src/routes/events_badges/stats/+layout.ts b/src/routes/events_badges/stats/+layout.ts index aeae2f39..b413dac9 100644 --- a/src/routes/events_badges/stats/+layout.ts +++ b/src/routes/events_badges/stats/+layout.ts @@ -8,10 +8,9 @@ import type { key_val } from '$lib/stores/ae_stores'; import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/stores/ae_stores'; // import { events_loc, events_slct, events_trigger } from '$lib/stores/ae_events_stores'; - /* * This +layout load should be used for: * * loading data required for the layout of the page... * * like? * Returns: data object (parent to child) -*/ + */ diff --git a/src/routes/events_badges/stats/+page.svelte b/src/routes/events_badges/stats/+page.svelte index efbd3132..8cfc7c8c 100644 --- a/src/routes/events_badges/stats/+page.svelte +++ b/src/routes/events_badges/stats/+page.svelte @@ -1,378 +1,405 @@ +
+ + {#if $ae_loc.iframe} + + header +

Review & Print
Your Badge

+
+ {:else} +
+

Badge Review and Print

+
+ {/if} -
+
+ {#if $events_sess.badges.show_form__search} +
{ + $events_trigger = 'load__event_badge_obj_li'; + }} + autocomplete="off" + class="form grow flex flex-row flex-wrap gap-1 justify-center items-center w-full" + > + {#if $ae_loc.trusted_access && badge_type_code_li} +
+ +
+ {/if} - -{#if $ae_loc.iframe} - - header -

Review & Print
Your Badge

-
-{:else} -
-

Badge Review and Print

-
-{/if} - -
- -{#if $events_sess.badges.show_form__search} - { - $events_trigger = 'load__event_badge_obj_li'; - }} - autocomplete="off" - class="form grow flex flex-row flex-wrap gap-1 justify-center items-center w-full" - > -{#if $ae_loc.trusted_access && badge_type_code_li} -
- -
-{/if} - - - { - if ($events_sess.badges.fulltext_search_qry_str.length >= 3) { - $events_trigger = 'load__event_badge_obj_li'; - } - }} - autofocus - suggest="off" - data-lpignore="true" - > + { + if ($events_sess.badges.fulltext_search_qry_str.length >= 3) { + $events_trigger = 'load__event_badge_obj_li'; + } + }} + autofocus + suggest="off" + data-lpignore="true" + /> + + - - - - -{:else if $events_sess.badges.show_form__scan} - - + {:else if $events_sess.badges.show_form__scan} + + + + - - - - - + + + + + {/if} + - - - +
+ {#if $events_sess.badges.show_form__search} + + {:else if $events_sess.badges.show_form__scan} + + {/if} +
+
+ {#await load_obj_li_results} + + + Loading... + + {:then load_obj_li_results} + {#if load_obj_li_results} + + Loaded + {/if} + {/await} + {#if $events_sess.badges.show_form__search} + {#if $events_slct?.badge_obj_li.length} + +
+

Results:

+ + + + + + + + + + + + {#each $events_slct.badge_obj_li as badge_obj} + + = 1 || badge_obj.hide) && + !$ae_loc.trusted_access} + class:fade_50={(badge_obj.print_count >= 1 || badge_obj.hide) && + $ae_loc.trusted_access} + > + + + - -{/each} - -
BadgeEmail / Affiliations / LocationBadge Type
+ + +
+
+ + + + {badge_obj.email ? badge_obj.email.replace(/^(.{3}).*@/, '$1...@') : ''} +
- $events_sess.badges.show_form__search = false; - $events_sess.badges.show_form__search_results = false; - $events_sess.badges.show_form__scan = true; - $events_sess.badges.qr_scan_start = true; - }} - class="btn btn-sm preset-tonal-primary border border-primary-500" - > - - QR Scan - - {:else if $events_sess.badges.show_form__scan} - - {/if} -
+
+ {#if badge_obj?.affiliations} + + {badge_obj.affiliations} + {:else if badge_obj.location} + + {badge_obj.location} + {:else if badge_obj.city && badge_obj.state_province} + + {badge_obj.city}, {badge_obj.state_province} + {:else if badge_obj.city} + + {badge_obj.city} + {:else if badge_obj.state_province} + + {badge_obj.state_province} + {:else} + -- none -- + {/if} +
+ +
+
+ {badge_obj.badge_type} +
+ { + console.log(`ae_crud_updated event:`, e.detail); + // events_func.handle_load_ae_obj_id__badge({api_cfg: $ae_api, badge_id: $events_slct.badge_id}); + }} + > + + {#if $ae_loc.administrator_access} + + + + {/if} + -
- - -{#await load_obj_li_results} - - - - Loading... - - -{:then load_obj_li_results} - {#if load_obj_li_results} - - - Loaded - - {/if} -{/await} - - -{#if $events_sess.badges.show_form__search} - -{#if $events_slct?.badge_obj_li.length} - -
-

Results:

- - - - - - - - - - - -{#each $events_slct.badge_obj_li as badge_obj} - -= 1 || badge_obj.hide) && !$ae_loc.trusted_access} - class:fade_50={(badge_obj.print_count >= 1 || badge_obj.hide) && $ae_loc.trusted_access} - > - - - + + {/each} + +
BadgeEmail / Affiliations / LocationBadge Type
- - -
-
- - - - {badge_obj.email ? badge_obj.email.replace(/^(.{3}).*@/, '$1...@') : ''} -
- -
- {#if badge_obj?.affiliations} - - {badge_obj.affiliations} - {:else if badge_obj.location} - - {badge_obj.location} - {:else if badge_obj.city && badge_obj.state_province} - - {badge_obj.city}, {badge_obj.state_province} - {:else if badge_obj.city} - - {badge_obj.city} - {:else if badge_obj.state_province} - - {badge_obj.state_province} - {:else} - -- none -- - {/if} -
-
-
-
- {badge_obj.badge_type} - -
- { - console.log(`ae_crud_updated event:`, e.detail); - // events_func.handle_load_ae_obj_id__badge({api_cfg: $ae_api, badge_id: $events_slct.badge_id}); - }} - > - - - {#if $ae_loc.administrator_access} - - - - {/if} - - - { - console.log(`ae_crud_updated event:`, e.detail); - // events_func.handle_load_ae_obj_id__badge({api_cfg: $ae_api, badge_id: badge_obj.badge_id_random}); - }} - > - - - -
+ + +
+ +
+
+ {:else} +
+ Type your name, email, or affiliations. Results will start to appear automatically. +
-
-
-
-{:else} -
- Type your name, email, or affiliations. Results will start to appear automatically. -
- - {#if $events_sess.badges.fulltext_search_qry_str && $events_sess.badges.fulltext_search_qry_str.length > 5} -
- No badges found. Please change your search. -
- {/if} -{/if} - - -{:else if $events_sess.badges.show_form__scan} - - -
-
+ No badges found. Please change your search. +
+ {/if} + {/if} + {:else if $events_sess.badges.show_form__scan} +
+
-
-

Scan

+ > +
+

Scan

-
-
- -
+
+
+ +
- -
-
+ $events_slct.badge_id = null; + $events_slct.badge_obj = null; + }} + > + + Close + +
+ -
+
+ - +
+ {@html $events_sess.badges.qr_scan_result ?? 'No results yet'} +
-
- {@html $events_sess.badges.qr_scan_result ?? 'No results yet'} -
+ {#if $events_slct.badge_id && $events_slct.badge_obj} +

Badge ID: {$events_slct.badge_obj.event_badge_id_random}

+ {/if} +
+ +
+ +
+ {/if} - - {#if $events_slct.badge_id && $events_slct.badge_obj} -

Badge ID: {$events_slct.badge_obj.event_badge_id_random}

- {/if} - -
-
- - - - - -{/if} - - - - - - - - - diff --git a/src/routes/events_leads/+layout.svelte b/src/routes/events_leads/+layout.svelte index 74d989fc..ab2f9476 100644 --- a/src/routes/events_leads/+layout.svelte +++ b/src/routes/events_leads/+layout.svelte @@ -1,53 +1,49 @@ - Events Leads - {$events_loc.title ?? 'Æ loading...'} - diff --git a/src/routes/events_leads/+layout.ts b/src/routes/events_leads/+layout.ts index bc678fc2..757a7696 100644 --- a/src/routes/events_leads/+layout.ts +++ b/src/routes/events_leads/+layout.ts @@ -3,39 +3,45 @@ console.log(`ae_events_leads +layout.ts start`); import { events_func } from '$lib/ae_events_functions'; - export async function load({ parent }) { + const data = await parent(); - let data = await parent(); + const account_id = data.account_id; + const ae_acct = data[account_id]; + console.log(`ae_acct = `, ae_acct); - let account_id = data.account_id; - let ae_acct = data[account_id]; - console.log(`ae_acct = `, ae_acct); + if (!account_id) { + console.log(`events_leads +layout.ts: The account_id was not found in the data!!!`); + return false; + } - if (!account_id) { - console.log(`events_leads +layout.ts: The account_id was not found in the data!!!`); - return false; - } + const event_id = ae_acct.slct.event_id; + if (!event_id) { + console.log(`events_leads +layout.ts: The event_id was not found in the data!!!`); + return false; + } - let event_id = ae_acct.slct.event_id; - if (!event_id) { - console.log(`events_leads +layout.ts: The event_id was not found in the data!!!`); - return false; - } + const load_event_obj = events_func.load_ae_obj_id__event({ + api_cfg: ae_acct.api, + event_id: event_id, + try_cache: true + }); - let load_event_obj = events_func.load_ae_obj_id__event({api_cfg: ae_acct.api, event_id: event_id, try_cache: true}); + ae_acct.slct.event_obj = load_event_obj; - ae_acct.slct.event_obj = load_event_obj; + const load_event_exhibit_obj_li = events_func.handle_load_ae_obj_li__exhibit({ + api_cfg: ae_acct.api, + event_id: event_id, + try_cache: false + }); + console.log(`load_event_exhibit_obj_li = `, load_event_exhibit_obj_li); - let load_event_exhibit_obj_li = events_func.handle_load_ae_obj_li__exhibit({api_cfg: ae_acct.api, event_id: event_id, try_cache: false}); - console.log(`load_event_exhibit_obj_li = `, load_event_exhibit_obj_li); + ae_acct.slct.event_exhibit_obj_li = load_event_exhibit_obj_li; - ae_acct.slct.event_exhibit_obj_li = load_event_exhibit_obj_li; + // WARNING: Precaution against shared data between sites and sessions. + data[account_id] = ae_acct; - // WARNING: Precaution against shared data between sites and sessions. - data[account_id] = ae_acct; - - return data; + return data; } // export const prerender = false; diff --git a/src/routes/events_leads/+page.svelte b/src/routes/events_leads/+page.svelte index 74e5053f..ffeb8284 100644 --- a/src/routes/events_leads/+page.svelte +++ b/src/routes/events_leads/+page.svelte @@ -1,180 +1,194 @@ +
+

Events - Leads for exhibitors

-
+ -

Events - Leads for exhibitors

+ - - - - - -{#if $event_exhibit_obj_li} -

Select your exhibit from the list

- +
+
{ + $events_sess.leads.open_href = `/events_leads/exhibit/${$events_slct.exhibit_obj.id_random}?event_id=${$events_slct.event_id}`; + goto($events_sess.leads.open_href, { invalidateAll: true }); + }} + class="flex flex-col items-center border border-slate-500/10 p-2" + > + + +
+ Select your exhibit booth from the list and enter passcode you were given. If it is + correct you will be taken to the page for your exhibit. +
-
- { - $events_sess.leads.open_href = `/events_leads/exhibit/${$events_slct.exhibit_obj.id_random}?event_id=${$events_slct.event_id}`; - goto($events_sess.leads.open_href, {invalidateAll: true}); - }} +
+ +
-
-
+ - {#if ($ae_loc.administrator_access && !$events_loc.show_details)} -
+ {#if $ae_loc.administrator_access && !$events_loc.show_details} +
+ + - - + + +
+ {/if} +
- - -
- {/if} - - -
- - - + {/if} - -{/if} - - -
- diff --git a/src/routes/events_leads/+page.ts b/src/routes/events_leads/+page.ts index 7a2873ae..1d8f3fd4 100644 --- a/src/routes/events_leads/+page.ts +++ b/src/routes/events_leads/+page.ts @@ -3,38 +3,51 @@ console.log(`ae_events_leads +page.ts start`); import { events_func } from '$lib/ae_events_functions'; -export async function load({ params, parent, url }) { // route +export async function load({ params, parent, url }) { + // route - let data = parent(); - // console.log(`ae_events_leads +page.ts data:`, data); + const data = parent(); + // console.log(`ae_events_leads +page.ts data:`, data); - // console.log(`ae_events_leads +page.ts data.ae_loc:`, data.ae_loc); - // if (data.ae_loc.account_id) { - // } else { - // console.log(`The account_id was not found in the data.ae_loc!!!`); - // return false; - // } + // console.log(`ae_events_leads +page.ts data.ae_loc:`, data.ae_loc); + // if (data.ae_loc.account_id) { + // } else { + // console.log(`The account_id was not found in the data.ae_loc!!!`); + // return false; + // } - data.ae_events_leads_page_ts = true; + data.ae_events_leads_page_ts = true; - let submenu = { - main: {name: 'Main', href: '/events_leads', access: false}, - manage: {name: 'Manage', href: '/events_leads/manage', access: 'administrator', disable: true, hide: true}, - review: {name: 'Exhibitor', href: '/events_leads/exhibitor', access: false, disable: false, hide: false}, - }; - data.submenu = submenu + const submenu = { + main: { name: 'Main', href: '/events_leads', access: false }, + manage: { + name: 'Manage', + href: '/events_leads/manage', + access: 'administrator', + disable: true, + hide: true + }, + review: { + name: 'Exhibitor', + href: '/events_leads/exhibitor', + access: false, + disable: false, + hide: false + } + }; + data.submenu = submenu; - // Do not wait on these: + // Do not wait on these: - // let load_event_obj = events_func.handle_load_ae_obj_id__event({api_cfg: data.ae_api, event_id: event_id, try_cache: true}); - // console.log(`load_event_obj = `, load_event_obj); + // let load_event_obj = events_func.handle_load_ae_obj_id__event({api_cfg: data.ae_api, event_id: event_id, try_cache: true}); + // console.log(`load_event_obj = `, load_event_obj); - // let load_event_exhibit_obj_li = events_func.handle_load_ae_obj_li__exhibit({api_cfg: data.ae_api, event_id: event_id, try_cache: false}); - // console.log(`load_event_exhibit_obj_li = `, load_event_exhibit_obj_li); + // let load_event_exhibit_obj_li = events_func.handle_load_ae_obj_li__exhibit({api_cfg: data.ae_api, event_id: event_id, try_cache: false}); + // console.log(`load_event_exhibit_obj_li = `, load_event_exhibit_obj_li); - // let exhibit_id = params.slug; - // let load_event_exhibit_obj = events_func.handle_load_ae_obj_id__exhibit({api_cfg: data.ae_api, exhibit_id: exhibit_id, try_cache: false}); - // console.log(`load_event_exhibit_obj = `, load_event_exhibit_obj); + // let exhibit_id = params.slug; + // let load_event_exhibit_obj = events_func.handle_load_ae_obj_id__exhibit({api_cfg: data.ae_api, exhibit_id: exhibit_id, try_cache: false}); + // console.log(`load_event_exhibit_obj = `, load_event_exhibit_obj); - return data; + return data; } diff --git a/src/routes/events_leads/exhibit/[slug]/+page.svelte b/src/routes/events_leads/exhibit/[slug]/+page.svelte index 931960cf..14467aec 100644 --- a/src/routes/events_leads/exhibit/[slug]/+page.svelte +++ b/src/routes/events_leads/exhibit/[slug]/+page.svelte @@ -1,425 +1,478 @@ -
- - - - -{#if $events_slct.exhibit_id && $event_exhibit_obj} - + {#if $events_slct.exhibit_id && $event_exhibit_obj} + - - - - {#if $events_loc.leads.show_option__paid_tab ?? true} - - {/if} + {/if} - - - + - - + - - + - + + + {#if $events_loc.leads.tab[$events_slct.exhibit_id] === 'start'} +
+
+

+ + {$event_exhibit_obj?.name ?? 'Welcome to Leads for Exhibits!'} + # {$event_exhibit_obj?.code ?? ''} +

+

+ {#if $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id] && $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} + + {$events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} + + {:else if $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id]} + + No license key selected + {:else} + + Enter the shared exhibit passcode + {/if} +

+
- -{#if $events_loc.leads.tab[$events_slct.exhibit_id] === 'start'} + {#if $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id] && $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} +

+ You are logged in using the shared exhibit staff passcode and are using the license key + for {$events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key}. Any leads you + collect will be associated with this license key (email address). Use the Clear License + button to "log out" or Sign In with a different license. +

+ {:else if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id]} +

+ Please select your name from the license list below to use the lead retrieval service. + You may need to add your name first. This is also used to link new leads to whoever adds + them. +

+ {:else} +

+ To access this exhibit you must enter the shared staff passcode that you were given. You + will then be able to select a license and use the lead retrieval service from your + device. +

+ + {/if} + {#if $events_loc?.leads.auth_exhibit_kv && $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id]} + + {#if $event_exhibit_obj?.license_max} +

License List (max {$event_exhibit_obj?.license_max})

-
+
+ Use the "Sign In" or "Email" option buttons below to log in using one of the available + licenses. Be sure use the one with your name and email address. If you select a + license that is already in use on another device, it will be logged out. +
    +
  • + "Sign In" option - Use this to sign and use the license with your + current browser and device. +
  • +
  • + "Email" option - Use this to send an email with a link to log in. + You may want to use this to send the link to other staff associated with this + exhibit. +
  • +
+
-
-

- - {$event_exhibit_obj?.name ?? 'Welcome to Leads for Exhibits!'} - # {$event_exhibit_obj?.code ?? ''} -

-

- {#if $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id] && $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} - - {$events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} - - {:else if $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id]} - - No license key selected - {:else} - - Enter the shared exhibit passcode - {/if} -

-
+ {#if !Array.isArray($event_exhibit_obj?.license_li_json) || (Array.isArray($event_exhibit_obj?.license_li_json) && $event_exhibit_obj?.license_li_json.length < $event_exhibit_obj?.license_max)} + + {/if} + +
+
{ + console.log('Save License List'); + handle_submit_form(event); + }} + id="form__license_table" + class="p-0 m-0" + > + -{#if $events_loc?.leads.auth_exhibit_kv && $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id]} + + {#if Array.isArray($event_exhibit_obj?.license_li_json) && $event_exhibit_obj?.license_li_json.length > 0} + + + + + + + + + + {#if $events_loc.show_details} + + {/if} + + + + + + - -{#if $event_exhibit_obj?.license_max } -

License List (max {$event_exhibit_obj?.license_max})

+ + {#each $event_exhibit_obj?.license_li_json as license, index} + + + - $events_sess.leads.show_form__license = true; - }} - > - - Add License - -{/if} - -
- { - console.log('Save License List'); - handle_submit_form(event); - }} - id="form__license_table" - class="p-0 m-0" - > - - - - - -{#if Array.isArray($event_exhibit_obj?.license_li_json) && $event_exhibit_obj?.license_li_json.length > 0} -
LicenseInfoSave { + $events_loc.leads.show_meta__event_exhibit_obj = + !$events_loc.leads.show_meta__event_exhibit_obj; + }}>Meta
+ -
Use the "Sign In" or "Email" option buttons below to log in using one of the available licenses. Be sure use the one with your name and email address. If you select a license that is already in use on another device, it will be logged out. -
    -
  • "Sign In" option - Use this to sign and use the license with your current browser and device.
  • -
  • "Email" option - Use this to send an email with a link to log in. You may want to use this to send the link to other staff associated with this exhibit.
  • -
+ {#if index < $event_exhibit_obj?.license_max} + + +
+
+ if ($events_loc.leads.auto_hide_on_sign_in) { + $events_loc.leads.tab[$events_slct.exhibit_id] = 'add_scan'; -{#if !Array.isArray($event_exhibit_obj?.license_li_json) || (Array.isArray($event_exhibit_obj?.license_li_json) && $event_exhibit_obj?.license_li_json.length < $event_exhibit_obj?.license_max)} - + + +
+ {:else} +
+ + Disabled license +
+ {/if} +
- - - - - - - - - {#if $events_loc.show_details} - - {/if} - - - - - - - - - -{#each $event_exhibit_obj?.license_li_json as license, index} - - - - - - - {license.passcode} - - - - - - + $events_sess.leads.show_form__license = true; + }} + class="btn btn-sm preset-tonal-warning" + > + + Edit + + + + - {#if $events_loc.show_details} - - {/if} + {#if $events_loc.show_details} + + {/if} + + {/each} + +
LicenseInfoSave { - $events_loc.leads.show_meta__event_exhibit_obj = !$events_loc.leads.show_meta__event_exhibit_obj; - }} - >Meta
- - - - {#if index < $event_exhibit_obj?.license_max} - - -
- - - -
- {:else} -
- - Disabled license -
- {/if} -
- -
+ > +
+ {license.full_name} + {license.email} +
-
- {license.full_name} - {license.email} -
+ + {license.passcode} + +
+
- -
- - -
-
- -
-
- Updated On: - {license.updated_on} -
-
- Created On: - {license.created_on} -
-
- Expires On: - {license.expires_on} -
-
-
+ +
+
+ Updated On: + {license.updated_on} +
+
+ Created On: + {license.created_on} +
+
+ Expires On: + {license.expires_on} +
+
+
+ {:else} +
No licenses found. Add a license above.
+ {/if} + + + +
+
+ + {/if} + + {/if} +
+ - -{/each} + + {:else if $events_loc.leads.tab[$events_slct.exhibit_id] == 'add_scan'} + - - -{:else} -
No licenses found. Add a license above.
-{/if} - + + {:else if $events_loc.leads.tab[$events_slct.exhibit_id] == 'leads'} + - -
- -{/if} -{/if} - -
- - - -{:else if $events_loc.leads.tab[$events_slct.exhibit_id] == 'add_scan'} - - - - - - -{:else if $events_loc.leads.tab[$events_slct.exhibit_id] == 'leads'} - - - - - - -{:else if $events_loc.leads.tab[$events_slct.exhibit_id] == 'manage'} - - - - - - -{:else if $events_loc.leads.tab[$events_slct.exhibit_id] == 'payment'} - - - - - -{/if} - - -{/if} + + {:else if $events_loc.leads.tab[$events_slct.exhibit_id] == 'manage'} + + + {:else if $events_loc.leads.tab[$events_slct.exhibit_id] == 'payment'} + + {/if} + + + {/if} +
- {#if $events_sess.leads.show_form__license} -
-
+
-
-

Edit License

+ > +
+

Edit License

-
- -
-
+
+ +
+
-
-
- - - - -
- Do not use the same email address for more than one license. The email address is used as the key to log in and is linked to leads added. The full name is used to help identify the staff person. -
- + +
+ Do not use the same email address for more than one license. The email address + is used as the key to log in and is linked to leads added. The full name is used to help + identify the staff person. +
+ - + - {#if $ae_loc.trusted_access} - - {/if} + {#if $ae_loc.trusted_access} + + {/if} +
+
+ - -
+
+
+ - $events_sess.leads.show_form__license = false; - } - }} - class:hidden={$events_sess.leads.tmp_license.index === null} - class="btn preset-tonal-warning m-1" - > - - Remove - + +
- -
+
+ + {#await license_submit_results} + + {:then license_submit_results} + {#if license_submit_results} +
+ + Saved +
+ {/if} + {/await} -
- - {#await license_submit_results} - - {:then license_submit_results} - {#if license_submit_results} -
- - - Saved - -
- {/if} - {/await} +
+ submit: {$events_sess?.leads.submit_status__license} + + +
+
-
- submit: {$events_sess?.leads.submit_status__license} - - -
-
- -
- -
- - - - - +
+ +
+ + + + + {/if} - diff --git a/src/routes/events_leads/exhibit/[slug]/+page.ts b/src/routes/events_leads/exhibit/[slug]/+page.ts index 9f155436..0dc52f48 100644 --- a/src/routes/events_leads/exhibit/[slug]/+page.ts +++ b/src/routes/events_leads/exhibit/[slug]/+page.ts @@ -3,47 +3,56 @@ console.log(`ae_events_leads [slug] +page.ts start`); import { events_func } from '$lib/ae_events_functions'; -export async function load({ params, parent }) { // route - let log_lvl: number = 0; +export async function load({ params, parent }) { + // route + const log_lvl: number = 0; - let data = await parent(); - // console.log(`ae_events_leads exhibit [slug] +page.ts data:`, data); + const data = await parent(); + // console.log(`ae_events_leads exhibit [slug] +page.ts data:`, data); - let account_id = data.account_id; - let ae_acct = data[account_id]; - console.log(`ae_acct = `, ae_acct); + const account_id = data.account_id; + const ae_acct = data[account_id]; + console.log(`ae_acct = `, ae_acct); - if (!account_id) { - console.log(`events_leads exhibit [slug] +page.ts: The account_id was not found in the data!!!`); - return false; - } + if (!account_id) { + console.log( + `events_leads exhibit [slug] +page.ts: The account_id was not found in the data!!!` + ); + return false; + } - data.ae_events_leads_exhibit_slug_page_ts = true; + data.ae_events_leads_exhibit_slug_page_ts = true; - let event_exhibit_id = params.slug; - if (!event_exhibit_id) { - console.log(`events_leads exhibit [slug] +page.ts: The event_exhibit_id was not found in the params.slug!!!`); - return false; - } + const event_exhibit_id = params.slug; + if (!event_exhibit_id) { + console.log( + `events_leads exhibit [slug] +page.ts: The event_exhibit_id was not found in the params.slug!!!` + ); + return false; + } - ae_acct.slct.event_exhibit_id = event_exhibit_id; + ae_acct.slct.event_exhibit_id = event_exhibit_id; - let load_event_exhibit_obj = events_func.handle_load_ae_obj_id__exhibit({api_cfg: ae_acct.api, exhibit_id: event_exhibit_id, try_cache: false}); + const load_event_exhibit_obj = events_func.handle_load_ae_obj_id__exhibit({ + api_cfg: ae_acct.api, + exhibit_id: event_exhibit_id, + try_cache: false + }); - ae_acct.slct.event_exhibit_obj = await load_event_exhibit_obj; + ae_acct.slct.event_exhibit_obj = await load_event_exhibit_obj; - let load_event_exhibit_tracking_obj_li = events_func.handle_load_ae_obj_li__exhibit_tracking({ - api_cfg: ae_acct.api, - exhibit_id: event_exhibit_id, - params: {enabled: 'all', qry__limit: 550}, - try_cache: false - }); - console.log(`load_event_exhibit_tracking_obj_li = `, load_event_exhibit_tracking_obj_li); + const load_event_exhibit_tracking_obj_li = events_func.handle_load_ae_obj_li__exhibit_tracking({ + api_cfg: ae_acct.api, + exhibit_id: event_exhibit_id, + params: { enabled: 'all', qry__limit: 550 }, + try_cache: false + }); + console.log(`load_event_exhibit_tracking_obj_li = `, load_event_exhibit_tracking_obj_li); - ae_acct.slct.event_exhibit_tracking_obj_li = load_event_exhibit_tracking_obj_li; + ae_acct.slct.event_exhibit_tracking_obj_li = load_event_exhibit_tracking_obj_li; - // WARNING: Precaution against shared data between sites and sessions. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and sessions. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte b/src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte index c2357201..fa7baabc 100644 --- a/src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte +++ b/src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte @@ -1,218 +1,229 @@ +
+ {#if $events_loc?.leads.auth_exhibit_kv && $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id]} + {#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} +
+ Leads for: + {$events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} +
+ {:else} +
+ Please go to the Main tab and select a license to use. +
+ {/if} -
+ -{#if $events_loc?.leads.auth_exhibit_kv && $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id]} - -{#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} -
Leads for: - {$events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} -
-{:else} -
Please go to the Main tab and select a license to use.
-{/if} - - - -

- - {#if $ae_loc.hub.qr.camera_status == 'unknown'} - You will need to allow access to your device's camera when asked. - {:else if $ae_loc.hub.qr.camera_status == 'denied'} - You need to allow access to your device's camera. Currently this seems to be blocked or denied for this site. - Please check your browser's permissions. - {/if} -

- + {#if $ae_loc.hub.qr.camera_status == 'unknown'} + You will need to allow access to your device's camera when asked. + {:else if $ae_loc.hub.qr.camera_status == 'denied'} + You need to allow access to your device's camera. Currently this seems to be blocked or + denied for this site. + Please check your browser's permissions. + {/if} +

+ - - + + - - + + - -{#if ($events_loc.leads.show_content__scan_alert)} - -{:else if (!$events_loc.leads.show_content__scan_alert)} - -{/if} + + {#if $events_loc.leads.show_content__scan_alert} + + {:else if !$events_loc.leads.show_content__scan_alert} + + {/if} - + - + -{#if ($events_loc.leads.show_content__scan_requirements)} - -{:else if (!$events_loc.leads.show_content__scan_requirements)} - -{/if} - + {#if $events_loc.leads.show_content__scan_requirements} + + {:else if !$events_loc.leads.show_content__scan_requirements} + + {/if} + -{#if $events_loc.leads.show_content__scan_alert} -
- - - Alert - Use Scanner Version: - - -

A bug was found late Monday that affects some mobile devices (cell phones and tablets). Incremental fixes have been added, but this issue has been difficult to address across all devices. We recommend most users stick with v1 (default). If you are not having any trouble and have no idea what this message is about, then this is what you want.

-

We recommend you try v2 if you are having trouble with the camera not starting or turning on. This version allows you to manually attempt to Allow Camera Access and to Start Scanning if it does not start on its own. This fix is not perfect. A permanent solution is actively being worked on in the development version.

-

A fix is in progress to address all devices. -2024-04-10 2:25 AM (Prague time)

-
-
-{/if} -{#if $events_loc.leads.show_content__scan_requirements} -
-

You will need a device with a camera to scan the QR codes. You will also of course need one or more valid QR codes to scan. - -

-
    -
  • Most laptops, workstations, Android phones/tablets, iPhones, and iPads are compatible
  • -
  • The device must have a current (within the last 4 years) web browser such as Google Chrome, Mozilla Firefox, Apple's Safari, or Microsoft Edge. Opera is not yet fully supported.
  • -
  • There is no Android or Apple app that needs to be installed!
  • -
  • The device must have a camera for scanning or you will need to manually enter attendee badge IDs.
  • -
  • The only permission you need to allow is access to your device's camera when asked.
  • -
-
-{:else} - -{/if} - - -{:else} -
Not logged in. Please log in and select a user license.
-{/if} + {#if $events_loc.leads.show_content__scan_alert} +
+ + + Alert + Use Scanner Version: + +

+ A bug was found late Monday that affects some mobile devices (cell phones and tablets). + Incremental fixes have been added, but this issue has been difficult to address across + all devices. We recommend most users stick with v1 (default). If you are not having any + trouble and have no idea what this message is about, then this is what you want. +

+

+ We recommend you try v2 if you are having trouble with the camera not starting or + turning on. This version allows you to manually attempt to Allow Camera Access and to + Start Scanning if it does not start on its own. This fix is not perfect. A permanent + solution is actively being worked on in the development version. +

+

A fix is in progress to address all devices. -2024-04-10 2:25 AM (Prague time)

+
+
+ {/if} + {#if $events_loc.leads.show_content__scan_requirements} +
+

+ You will need a device with a camera to scan the QR codes. You will also of course need + one or more valid QR codes to scan. + +

+
    +
  • + Most laptops, workstations, Android phones/tablets, iPhones, and iPads are compatible +
  • +
  • + The device must have a current (within the last 4 years) web browser such as Google + Chrome, Mozilla Firefox, Apple's Safari, or Microsoft Edge. Opera is not yet fully + supported. +
  • +
  • There is no Android or Apple app that needs to be installed!
  • +
  • + The device must have a camera for scanning or you will need to manually enter attendee + badge IDs. +
  • +
  • + The only permission you need to allow is access to your device's camera when asked. +
  • +
+
+ {:else} + + {/if} + {:else} + +
Not logged in. Please log in and select a user license.
+ {/if} +
- {#if $events_sess.leads.show_form__search} -
-
+
+
+
+ {#if $event_badge_obj_li} + -
- -
- +
+

{$events_slct.badge_obj_li.length} results found

+ {#each $events_slct.badge_obj_li as event_badge_obj_v2, index} +
+ -
-

{$events_slct.badge_obj_li.length} results found

- - {#each $events_slct.badge_obj_li as event_badge_obj_v2, index} - -
- - - - - {#if $events_sess.leads.show_confirm__add_lead[index]} -
-
+
-
-

Add Selected?

+ > +
+

Add Selected?

-
- -
-
+
+ +
+
-
-

Are you sure you want to add {event_badge_obj_v2.full_name} to the leads list?

-

Badge ID: {event_badge_obj_v2.event_badge_id_random}

-
- + $events_sess.leads.show_confirm__add_lead[index] = false; + }} + > + + No + - -
-
-
+ // $events_sess.leads.show_confirm__add_lead[index] = false; + }} + > + + Yes + +
+
+ +
+ + + {/if} - - {/if} - -
- - - - {#if $event_exhibit_obj?.priority || $ae_loc.trusted_access} - {event_badge_obj_v2.full_name} - {:else} - - {event_badge_obj_v2.full_name ? event_badge_obj_v2.full_name.substring(0, 1) + '...' : 'Hidden'} - - {/if} - - - - {#if $event_exhibit_obj?.priority || $ae_loc.trusted_access} - {event_badge_obj_v2.affiliations} - {:else} - - {event_badge_obj_v2.affiliations ? event_badge_obj_v2.affiliations.substring(0, 3) + '...' : 'Hidden'} - - {/if} - - - -
- + + + {#if $event_exhibit_obj?.priority || $ae_loc.trusted_access} + {event_badge_obj_v2.full_name} + {:else} + + {event_badge_obj_v2.full_name + ? event_badge_obj_v2.full_name.substring(0, 1) + '...' + : 'Hidden'} + + {/if} + + + + {#if $event_exhibit_obj?.priority || $ae_loc.trusted_access} + {event_badge_obj_v2.affiliations} + {:else} + + {event_badge_obj_v2.affiliations + ? event_badge_obj_v2.affiliations.substring(0, 3) + '...' + : 'Hidden'} + + {/if} + + + + + + {/each} + - {/each} - - - - - - {:else} -
No results yet
- {/if} - - + {:else} +
No results yet
+ {/if} + + + +
+
+ +
-
-
- -
+
+ + {#await search_submit_results} + + {:then search_submit_results} + {#if search_submit_results} +
+ + Complete -
- - {#await search_submit_results} - - {:then search_submit_results} - {#if search_submit_results} -
- - - Complete - + + ( + {$events_slct.badge_obj_li.length} results + {#if $ae_loc.trusted_access} + & + {$event_badge_obj_li.length} cached + {/if} + ) + +
+ {/if} + {/await} - - ( - {$events_slct.badge_obj_li.length} results - {#if $ae_loc.trusted_access} - & - {$event_badge_obj_li.length} cached - {/if} - ) - -
- {/if} - {/await} +
+ submit: {$events_sess?.leads.submit_status__search} +
+
-
- submit: {$events_sess?.leads.submit_status__search} -
-
- -
- -
- -
- - - +
+ +
+
+ + + + + {/if} - {#if $events_sess.leads.show_form__scan} -
-
+
-
-

Scan

+ > +
+

Scan

-
- -
-
+ $events_sess.leads.qr_scan_result = null; + }} + > + + Close + +
+ -
- - {#if !$ae_loc.qr_scanner_version || $ae_loc.qr_scanner_version == 'one'} - - {:else if $ae_loc.qr_scanner_version == 'two'} - - + + {:else} +

Please close this and select a QR Scanner version

+ {/if} - {:else} -

Please close this and select a QR Scanner version

- {/if} +
+ {@html $events_sess.leads.qr_scan_result ?? 'No results yet'} +
-
- {@html $events_sess.leads.qr_scan_result ?? 'No results yet'} -
- - - - - - {#if $events_sess.leads.show_confirm__add_lead[$events_slct.badge_id] && $event_badge_obj} -
-
+
-
-

Add Scanned?

+ > +
+

Add Scanned?

-
- -
-
+ $events_sess.leads.qr_scan_result = null; + }} + > + + Close + +
+ -
-

Are you sure you want to add {$event_badge_obj.full_name} to the leads list?

-

Badge ID: {$event_badge_obj.event_badge_id_random}

-
+
+

+ Are you sure you want to add {$event_badge_obj.full_name} to the leads + list? +

+

Badge ID: {$event_badge_obj.event_badge_id_random}

+
+ - $events_sess.leads.qr_scan_result = null; - }} - > - - No - + +
+
+ +
+ + + {/if} +
+ - // $events_sess.leads.show_confirm__add_lead[$events_slct.badge_id] = false; - }} - > - - Yes - - - - - - - - {/if} - - - - -
- -
- - + -
- submit: {$events_sess?.leads.submit_status__scan} -
-
+
+ submit: {$events_sess?.leads.submit_status__scan} +
+ -
- -
- -
- - - + $events_sess.leads.qr_scan_result = null; + }} + > + + Close + + + + + + + + {/if} - diff --git a/src/routes/events_leads/exhibit/[slug]/leads_list.svelte b/src/routes/events_leads/exhibit/[slug]/leads_list.svelte index 82bb6952..92ef514b 100644 --- a/src/routes/events_leads/exhibit/[slug]/leads_list.svelte +++ b/src/routes/events_leads/exhibit/[slug]/leads_list.svelte @@ -1,352 +1,388 @@ -
+ {#if $events_slct.exhibit_id && $events_slct.exhibit_obj} +

+ + {$lq__event_exhibit_tracking_obj_li?.length} + Leads for {$lq__event_exhibit_obj?.name} +

-{#if $events_slct.exhibit_id && $events_slct.exhibit_obj} -

- - {$lq__event_exhibit_tracking_obj_li?.length} - Leads for {$lq__event_exhibit_obj?.name} -

+ - +
+ + - + {#if $ae_loc.trusted_access} + + {/if} -{#if $ae_loc.trusted_access} - -{/if} - - + {:then} + + {/await} + Export Data + +
+ - + {#if $lq__event_exhibit_tracking_obj_li} + + + + + + + + + + {#each $lq__event_exhibit_tracking_obj_li as event_exhibit_tracking_obj, index} + + + + + {/each} + +
StarRankPerson
+ -{#if $lq__event_exhibit_tracking_obj_li} - - - - - - - - + + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit_tracking({ + api_cfg: $ae_api, + exhibit_tracking_id: $events_slct.exhibit_tracking_id + }); + }} + > + + $events_slct.exhibit_tracking_id = + event_exhibit_tracking_obj.event_exhibit_tracking_id_random; + $events_slct.exhibit_tracking_obj = event_exhibit_tracking_obj; -{#each $lq__event_exhibit_tracking_obj_li as event_exhibit_tracking_obj, index} - - - - $events_slct.exhibit_tracking_id = event_exhibit_tracking_obj.event_exhibit_tracking_id_random; - $events_slct.exhibit_tracking_obj = event_exhibit_tracking_obj; + + + $events_slct.exhibit_tracking_id = + event_exhibit_tracking_obj.event_exhibit_tracking_id_random; + $events_slct.exhibit_tracking_obj = event_exhibit_tracking_obj; - - + + + - - - -{/each} - - - -
StarRankPerson
- + $events_slct.exhibit_tracking_obj.priority = + !$events_slct.exhibit_tracking_obj.priority; - - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit_tracking({api_cfg: $ae_api, exhibit_tracking_id: $events_slct.exhibit_tracking_id}); - }} - > - + + + +
+ - $events_slct.exhibit_tracking_obj.priority = !$events_slct.exhibit_tracking_obj.priority; + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit_tracking({ + api_cfg: $ae_api, + exhibit_tracking_id: $events_slct.exhibit_tracking_id + }); + }} + > + - -
-
- + if ($events_slct.exhibit_tracking_obj.sort < 1) { + $events_slct.exhibit_tracking_obj.sort = 0; + } else { + $events_slct.exhibit_tracking_obj.sort -= 1; + } - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit_tracking({api_cfg: $ae_api, exhibit_tracking_id: $events_slct.exhibit_tracking_id}); - }} - > - + - $events_slct.exhibit_tracking_id = event_exhibit_tracking_obj.event_exhibit_tracking_id_random; - $events_slct.exhibit_tracking_obj = event_exhibit_tracking_obj; + {event_exhibit_tracking_obj.sort ?? ''} - if ($events_slct.exhibit_tracking_obj.sort < 1) { - $events_slct.exhibit_tracking_obj.sort = 0; - } else { - $events_slct.exhibit_tracking_obj.sort -= 1; - } + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit_tracking({ + api_cfg: $ae_api, + exhibit_tracking_id: $events_slct.exhibit_tracking_id + }); + }} + > + - + $events_slct.exhibit_tracking_id = + event_exhibit_tracking_obj.event_exhibit_tracking_id_random; + $events_slct.exhibit_tracking_obj = event_exhibit_tracking_obj; - {event_exhibit_tracking_obj.sort ?? ''} + if ($events_slct.exhibit_tracking_obj.sort >= 5) { + $events_slct.exhibit_tracking_obj.sort = 5; + } else { + $events_slct.exhibit_tracking_obj.sort += 1; + } - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit_tracking({api_cfg: $ae_api, exhibit_tracking_id: $events_slct.exhibit_tracking_id}); - }} - > - + - $events_slct.exhibit_tracking_id = event_exhibit_tracking_obj.event_exhibit_tracking_id_random; - $events_slct.exhibit_tracking_obj = event_exhibit_tracking_obj; - - if ($events_slct.exhibit_tracking_obj.sort >= 5) { - $events_slct.exhibit_tracking_obj.sort = 5; - } else { - $events_slct.exhibit_tracking_obj.sort += 1; - } - - ae_triggers.sort[event_exhibit_tracking_obj?.event_exhibit_tracking_id_random] = true; - }} - disabled={event_exhibit_tracking_obj.sort >= 5} - class="btn btn-sm preset-tonal-secondary" - > - - - - - -
-
-
- +
+
+ - - - - - {event_exhibit_tracking_obj.event_badge_email} - - - - {event_exhibit_tracking_obj.event_badge_affiliations} - -
-
-{:else} - No leads available to show - {$lq__event_exhibit_tracking_obj_li} -{/if} - -{:else} - Loading...? -{/if} + + + + + {event_exhibit_tracking_obj.event_badge_email} + + + {event_exhibit_tracking_obj.event_badge_affiliations} + + +
+ {:else} + No leads available to show + {$lq__event_exhibit_tracking_obj_li} + {/if} + {:else} + Loading...? + {/if}
- - {#if $events_sess.leads.show_form__view_lead} - - - + {/if} - diff --git a/src/routes/events_leads/exhibit/[slug]/leads_manage.svelte b/src/routes/events_leads/exhibit/[slug]/leads_manage.svelte index 529eb6d3..0c83e7a9 100644 --- a/src/routes/events_leads/exhibit/[slug]/leads_manage.svelte +++ b/src/routes/events_leads/exhibit/[slug]/leads_manage.svelte @@ -1,571 +1,627 @@ +
+

+ + Login and License +

-
+ {#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id] && $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} +
+

+ {@html $event_exhibit_obj?.priority + ? ' Leads license(s) marked as paid for this exhibit!' + : 'The leads license have not been marked as paid yet. If you have already paid, please wait and this will be reflected here within 48 business hours.'} +

-

- - Login and License -

+

+ Exhibit name: {$events_slct.exhibit_obj.name} # {$events_slct.exhibit_obj.code} +

-{#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id] && $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} +
+ Logged in and using license for: + {#if $event_exhibit_obj?.license_li_json} + + {#each $event_exhibit_obj?.license_li_json as license, index} + {#if license.email === $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} +
+ Name: + {license.full_name} +
+ {/if} + {/each} + + {/if} +
+ Email: + {$events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} + +
+
+ Started: + {ae_util.iso_datetime_formatter( + $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].updated_on, + 'datetime_12_long' + )} +
+
-
-

{@html $event_exhibit_obj?.priority ? ' Leads license(s) marked as paid for this exhibit!' : 'The leads license have not been marked as paid yet. If you have already paid, please wait and this will be reflected here within 48 business hours.'}

+ + -

Exhibit name: {$events_slct.exhibit_obj.name} # {$events_slct.exhibit_obj.code}

+ +
+ {:else if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id]} +
+ You are logged in using the shared passcode for the exhibit. You will want to select a license + to fully use this lead retrieval service. Please go to the Main tab and select a license to + use. +
-
- Logged in and using license for: - {#if $event_exhibit_obj?.license_li_json} - - {#each $event_exhibit_obj?.license_li_json as license, index} - {#if license.email === $events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} -
- Name: - {license.full_name} -
- {/if} - {/each} - - {/if} -
- Email: - {$events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} -
-
- Started: - {ae_util.iso_datetime_formatter($events_loc.leads.auth_exhibit_kv[$events_slct.exhibit_id].updated_on, 'datetime_12_long')} -
-
+ + {:else} +
+ Please go to the Main tab to login using the shared staff passcode for this exhibit. Then + select a license to use. +
+ {/if} - - + + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit({ + api_cfg: $ae_api, + exhibit_id: $events_slct.exhibit_id + }); + }} + > + Shared exhibit passcode: + {$events_slct.exhibit_obj.staff_passcode} + {#if $ae_loc.administrator_access} + + + {/if} + - -
+ + + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit({ + api_cfg: $ae_api, + exhibit_id: $events_slct.exhibit_id + }); + }} + > + {#if !$event_exhibit_obj?.priority} + Not Paid: + + + Waiting for payment + {:else} + Paid: + + + Marked as paid + {/if} -{:else if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id]} -
You are logged in using the shared passcode for the exhibit. You will want to select a license to fully use this lead retrieval service. Please go to the Main tab and select a license to use.
+ + {#if $ae_loc.administrator_access} + + {/if} +
- -{:else} -
Please go to the Main tab to login using the shared staff passcode for this exhibit. Then select a license to use.
-{/if} + +
+ {#if $event_exhibit_obj?.priority} + {#if $events_loc.leads.show_option__paid_tab} + + {:else} + + {/if} + {/if} +
+ + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit({ + api_cfg: $ae_api, + exhibit_id: $events_slct.exhibit_id + }); + }} + > + Max licenses: + {@html $events_slct.exhibit_obj?.license_max + ? ` ${$events_slct.exhibit_obj.license_max}` + : ' 0'} + {#if $ae_loc.administrator_access} + + + {/if} + - - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit({api_cfg: $ae_api, exhibit_id: $events_slct.exhibit_id}); - }} - > - Shared exhibit passcode: - {$events_slct.exhibit_obj.staff_passcode} - {#if $ae_loc.administrator_access} - - - {/if} - + + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit({ + api_cfg: $ae_api, + exhibit_id: $events_slct.exhibit_id + }); + }} + > + Small devices: + {@html $events_slct.exhibit_obj?.leads_device_sm_qty + ? ` ${$events_slct.exhibit_obj.leads_device_sm_qty}` + : ' 0'} + {#if $ae_loc.administrator_access} + + + {/if} + + + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit({ + api_cfg: $ae_api, + exhibit_id: $events_slct.exhibit_id + }); + }} + > + Large devices: + {@html $events_slct.exhibit_obj?.leads_device_lg_qty + ? ` ${$events_slct.exhibit_obj.leads_device_lg_qty}` + : ' 0'} + {#if $ae_loc.administrator_access} + + + {/if} + - - - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit({api_cfg: $ae_api, exhibit_id: $events_slct.exhibit_id}); - }} - > - {#if !$event_exhibit_obj?.priority} - Not Paid: - - - Waiting for payment - {:else} - Paid: - - - Marked as paid - {/if} + - - {#if $ae_loc.administrator_access} - - {/if} - + {#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id] && $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} +
- -
-{#if $event_exhibit_obj?.priority} +

+ + Export Data +

- {#if $events_loc.leads.show_option__paid_tab} - - {:else} - - {/if} -{/if} +

+ Use this to export the leads data for this exhibit to an Excel file format. The data can be + downloaded at anytime using the export button below. The data exported to exhibitors will + likely be these fields: given/first name, family/last name, professional title, affiliations, + email, city, state/province, country. The exact fields exported sometimes changes slightly + from meeting to meeting. +

+
- - - - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit({api_cfg: $ae_api, exhibit_id: $events_slct.exhibit_id}); - }} - > - Max licenses: - {@html ($events_slct.exhibit_obj?.license_max ? ` ${$events_slct.exhibit_obj.license_max}` : ' 0')} - {#if $ae_loc.administrator_access} - - - {/if} - - - - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit({api_cfg: $ae_api, exhibit_id: $events_slct.exhibit_id}); - }} - > - Small devices: - {@html ($events_slct.exhibit_obj?.leads_device_sm_qty ? ` ${$events_slct.exhibit_obj.leads_device_sm_qty}` : ' 0')} - {#if $ae_loc.administrator_access} - - - {/if} - - - - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit({api_cfg: $ae_api, exhibit_id: $events_slct.exhibit_id}); - }} - > - Large devices: - {@html ($events_slct.exhibit_obj?.leads_device_lg_qty ? ` ${$events_slct.exhibit_obj.leads_device_lg_qty}` : ' 0')} - {#if $ae_loc.administrator_access} - - - {/if} - - - - - - -{#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id] && $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id].key} - - -
- -

- - Export Data -

- -

Use this to export the leads data for this exhibit to an Excel file format. The data can be downloaded at anytime using the export button below. The data exported to exhibitors will likely be these fields: given/first name, family/last name, professional title, affiliations, email, city, state/province, country. The exact fields exported sometimes changes slightly from meeting to meeting.

- + {:then} + + {/await} + Export Data + + {/if} + -{/if} +
-
+

+ + Additional Settings +

-

- - Additional Settings -

+
+ List refresh interval in seconds: + +
-
- List refresh interval in seconds: - -
+
+ + -
- - + +
- -
+ {#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id]} +
+ Auto hide header/footer on sign in: + +
-{#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id]} +
+ Turn on iframe mode: + +
-
- Auto hide header/footer on sign in: - -
+
+ Show or hide additional details: + +
-
- Turn on iframe mode: - -
- -
- Show or hide additional details: - -
- - - - - - -{:else} -
You must be logged in to view this tab.
-{/if} - + {:else} +
You must be logged in to view this tab.
+ {/if} +
diff --git a/src/routes/events_leads/exhibit/[slug]/leads_payment.svelte b/src/routes/events_leads/exhibit/[slug]/leads_payment.svelte index a8f21f88..d21ee08c 100644 --- a/src/routes/events_leads/exhibit/[slug]/leads_payment.svelte +++ b/src/routes/events_leads/exhibit/[slug]/leads_payment.svelte @@ -1,179 +1,193 @@ -
+

+ + Payment +

-

- - Payment -

+ {#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id]} + {#if $event_exhibit_obj?.priority} +

Marked as Paid

-{#if $events_loc?.leads.auth_exhibit_kv[$events_slct.exhibit_id]} - {#if $event_exhibit_obj?.priority} -

Marked as Paid

+
+

+ Thank you for your payment. You have purchased {$event_exhibit_obj?.license_max} user license(s) + for the lead retrieval service with your booth at ISHLT 2024 in Prague. +

-
-

Thank you for your payment. You have purchased {$event_exhibit_obj?.license_max} user license(s) for the lead retrieval service with your booth at ISHLT 2024 in Prague.

+ {#if $event_exhibit_obj?.leads_device_sm_qty > 0} +

+ You have also rented {$event_exhibit_obj?.leads_device_sm_qty} tablet(s) for using with the + lead retrievals. You will be able to pick up your rental tablets at ISHLT's onsite registration. +

+ {:else} +

+ You have not rented any tablets for scanning. You can use your own device(s) with this + service. +

+ {/if} - {#if $event_exhibit_obj?.leads_device_sm_qty > 0} -

You have also rented {$event_exhibit_obj?.leads_device_sm_qty} tablet(s) for using with the lead retrievals. You will be able to pick up your rental tablets at ISHLT's onsite registration.

- {:else} -

You have not rented any tablets for scanning. You can use your own device(s) with this service.

- {/if} +

+ To save space while using this app you can hide this payment tab now that you have paid + for your licenses. This can be unhidden under the Conf(ig) tab if needed. +

+
-

To save space while using this app you can hide this payment tab now that you have paid for your licenses. This can be unhidden under the Conf(ig) tab if needed.

-
+ + {:else} +

Not Marked as Paid

- +
+

+ Please select the number of licenses to purchase and if you need to rent any tablets for + scanning. As a reminder, you can use your own device (cell phone, tablet, laptop, etc) to + scan the QR codes on the badges of the attendees. Tablet rentals are limited in supply for + ISHLT 2024 in Prague and will be given out on a first come first served basis. +

+
- {:else} -

Not Marked as Paid

+ -
-

Please select the number of licenses to purchase and if you need to rent any tablets for scanning. As a reminder, you can use your own device (cell phone, tablet, laptop, etc) to scan the QR codes on the badges of the attendees. Tablet rentals are limited in supply for ISHLT 2024 in Prague and will be given out on a first come first served basis.

-
+
+ +

+ Each person associated with your exhibit needs a license to use the lead retrieval service + for exhibitors. +

+
- - -
- -

Each person associated with your exhibit needs a license to use the lead retrieval service for exhibitors.

-
- - - - - - - + + - - + -
- -

You can use your own device(s) with this service. Renting tablets for scanning is not required.

-
+
+ +

+ You can use your own device(s) with this service. Renting tablets for scanning is not + required. +

+
- + - - + + {#if $events_sess.stripe.btn_payment_id} +
+ + +

+ You have selected to purchase {$events_sess.stripe.license_qty} user license(s) and rent + {$events_sess.stripe.rental_qty} tablet(s). Press the button above to pay by credit card, + debit card, or ACH direct debit. +

+

+ WARNING: Please be sure to double check and update the quantities on the + next page. +

+
+ {/if} -{#if $events_sess.stripe.btn_payment_id} -
- +

+ NOTE: Your payment will be reviewed and is not reflected immediately on + this page for your exhibit. It may take up to 2 business days for this to show as being + paid. If you have any questions or concerns please email + exhibits@oneskyit.com. +

+
- > - -

You have selected to purchase {$events_sess.stripe.license_qty} user license(s) and rent {$events_sess.stripe.rental_qty} tablet(s). Press the button above to pay by credit card, debit card, or ACH direct debit.

-

WARNING: Please be sure to double check and update the quantities on the next page.

- -{/if} - - - -
-

NOTE: Your payment will be reviewed and is not reflected immediately on this page for your exhibit. It may take up to 2 business days for this to show as being paid. If you have any questions or concerns please email exhibits@oneskyit.com.

-
- - - - - - + - - - - - - - {/if} - -{:else} -
Please go to the Main tab to login using the shared staff passcode for this exhibit. Then select a license to use.
-{/if} - - - + + {/if} + {:else} +
+ Please go to the Main tab to login using the shared staff passcode for this exhibit. Then + select a license to use. +
+ {/if}
diff --git a/src/routes/events_leads/exhibit/[slug]/leads_view_lead.svelte b/src/routes/events_leads/exhibit/[slug]/leads_view_lead.svelte index f2288748..1b25d4d5 100644 --- a/src/routes/events_leads/exhibit/[slug]/leads_view_lead.svelte +++ b/src/routes/events_leads/exhibit/[slug]/leads_view_lead.svelte @@ -1,137 +1,144 @@ - - -
-
-
-

- Lead: - {@html ($event_exhibit_tracking_obj?.priority ? '' : '')} + > +
+

+ Lead: + {@html $event_exhibit_tracking_obj?.priority + ? '' + : ''} - {$event_exhibit_tracking_obj?.event_badge_full_name} - - {$event_exhibit_tracking_obj?.event_exhibit_tracking_id_random} - -

+ {$event_exhibit_tracking_obj?.event_badge_full_name} + + {$event_exhibit_tracking_obj?.event_exhibit_tracking_id_random} + +

- {#if $events_sess.leads.lead_data_changed} - - {/if} + {#if $events_sess.leads.lead_data_changed} + + {/if} - {#await ae_promises.update__exhibit_tracking_obj} - - {:then update__exhibit_tracking_obj} - - {#if $events_sess.leads.lead_data_changed === false} - - {/if} - - {:catch error} - - {/await} + {#await ae_promises.update__exhibit_tracking_obj} + + {:then update__exhibit_tracking_obj} + + {#if $events_sess.leads.lead_data_changed === false} + + {/if} + + {:catch error} + + {/await} -
- -
-
+
+ +
+ +
+
+ -
+ {#if $event_exhibit_tracking_obj?.event_badge_professional_title || $event_exhibit_tracking_obj?.event_badge_professional_title_override} +
+ Titles (degrees, credentials): + + {#if $event_exhibit_tracking_obj?.event_badge_professional_title_override} + {@html $event_exhibit_tracking_obj?.event_badge_professional_title_override} + {:else} + {@html $event_exhibit_tracking_obj?.event_badge_professional_title} + {/if} + +
+ {/if} -
- + {#if $event_exhibit_tracking_obj?.event_badge_affiliations || $event_exhibit_tracking_obj?.event_badge_affiliations_override} +
+ Affiliations: + + {#if $event_exhibit_tracking_obj?.event_badge_affiliations_override} + {$event_exhibit_tracking_obj?.event_badge_affiliations_override} + {:else} + {$event_exhibit_tracking_obj?.event_badge_affiliations} + {/if} + +
+ {/if} -{#if $event_exhibit_tracking_obj?.event_badge_professional_title || $event_exhibit_tracking_obj?.event_badge_professional_title_override} -
- Titles (degrees, credentials): - - {#if $event_exhibit_tracking_obj?.event_badge_professional_title_override} - {@html $event_exhibit_tracking_obj?.event_badge_professional_title_override} - {:else} - {@html $event_exhibit_tracking_obj?.event_badge_professional_title} - {/if} - -
-{/if} + {#if $event_exhibit_tracking_obj?.event_badge_country} +
+ Location: + + + + {$event_exhibit_tracking_obj?.event_badge_country} + +
+ {/if} +
+ -{#if $event_exhibit_tracking_obj?.event_badge_affiliations || $event_exhibit_tracking_obj?.event_badge_affiliations_override} -
- Affiliations: - - {#if $event_exhibit_tracking_obj?.event_badge_affiliations_override} - {$event_exhibit_tracking_obj?.event_badge_affiliations_override} - {:else} - {$event_exhibit_tracking_obj?.event_badge_affiliations} - {/if} - -
-{/if} - -{#if $event_exhibit_tracking_obj?.event_badge_country} -
- Location: - - - - {$event_exhibit_tracking_obj?.event_badge_country} - -
-{/if} -
- - -
+ > + + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit_tracking({ + api_cfg: $ae_api, + exhibit_tracking_id: $events_slct.exhibit_tracking_id + }); + }} + > + {@html $event_exhibit_tracking_obj?.priority + ? ' Stared' + : ' Not Stared'} + + - - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit_tracking({api_cfg: $ae_api, exhibit_tracking_id: $events_slct.exhibit_tracking_id}); - }} - > - {@html ($event_exhibit_tracking_obj?.priority ? ' Stared' : ' Not Stared')} - - + + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit_tracking({ + api_cfg: $ae_api, + exhibit_tracking_id: $events_slct.exhibit_tracking_id + }); + }} + > + {@html $event_exhibit_tracking_obj?.sort + ? ' Ranked' + : ' Not Ranked'} + + +
- - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit_tracking({api_cfg: $ae_api, exhibit_tracking_id: $events_slct.exhibit_tracking_id}); - }} - > - {@html ($event_exhibit_tracking_obj?.sort ? ' Ranked' : ' Not Ranked')} - - - -
- - -
- - - - - + - - + - -
- -
+ +
+ +
- - {#if $event_exhibit_obj?.leads_custom_questions_json} + + {#if $event_exhibit_obj?.leads_custom_questions_json} + - + {#if $event_exhibit_obj?.leads_custom_questions_json.length > 0} +
+
+ + Custom Questions: + + - {#if $event_exhibit_obj?.leads_custom_questions_json.length > 0} + {#each $event_exhibit_obj?.leads_custom_questions_json as leads_custom_question, question_index} +
+ {leads_custom_question.question} -
-
- - Custom Questions: - - + {#if leads_custom_question.type == 'text'} + { + $events_sess.leads.lead_data_changed = true; + }} + /> + {:else if leads_custom_question.type == 'option' && leads_custom_question.option_li} + + {:else} + Response type not yet configured + {/if} + + {#if $events_loc.leads.show_content__custom_question_descriptions && leads_custom_question?.description} + {leads_custom_question?.description ?? ''} + {/if} +
+ {/each} +
+
+ {/if} + {/if} +
+ {#if $events_loc.leads.show_content__email_link_warning} +
+ + This is the email address of the person that originally scanned the badge. This is used + to link the lead to the person that scanned the badge. This is useful for tracking who + scanned the badge and who the lead is associated with. +
+ {/if} + +
+
- {#each $event_exhibit_obj?.leads_custom_questions_json as leads_custom_question, question_index} -
- {leads_custom_question.question} +
+ + +
+
+ - {#if (leads_custom_question.type == 'text')} - { - $events_sess.leads.lead_data_changed = true; - }} - /> - {:else if (leads_custom_question.type == 'option' && leads_custom_question.option_li)} - - {:else} - Response type not yet configured - {/if} - - {#if ($events_loc.leads.show_content__custom_question_descriptions && leads_custom_question?.description)} - {leads_custom_question?.description ?? ''} - {/if} - - {/each} - - - {/if} - {/if} +
+
+ + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit_tracking({ + api_cfg: $ae_api, + exhibit_tracking_id: $events_slct.exhibit_tracking_id + }); + }} + > + {#if $ae_loc.trusted_access} + {$event_exhibit_tracking_obj?.hide ? 'Hidden' : 'Not Hidden'} + {/if} + + -
- {#if ($events_loc.leads.show_content__email_link_warning)} -
- - This is the email address of the person that originally scanned the badge. This is used to link the lead to the person that scanned the badge. This is useful for tracking who scanned the badge and who the lead is associated with. -
- {/if} - -
+ + { + console.log(`ae_crud_updated event:`, e.detail); + events_func.handle_load_ae_obj_id__exhibit_tracking({ + api_cfg: $ae_api, + exhibit_tracking_id: $events_slct.exhibit_tracking_id + }); - + let load_event_exhibit_tracking_obj_li = + events_func.handle_load_ae_obj_li__exhibit_tracking({ + api_cfg: $ae_api, + exhibit_id: $event_exhibit_obj?.event_exhibit_id_random, + params: { enabled: 'all', qry__limit: 200 } + }); + console.log( + `load_event_exhibit_tracking_obj_li = `, + load_event_exhibit_tracking_obj_li + ); -
- - + if (!$ae_loc.trusted_access) { + $events_sess.leads.show_form__view_lead = false; + $events_sess.leads.lead_data_changed = null; + } + }} + > + {#if $ae_loc.trusted_access} + {$event_exhibit_tracking_obj?.enable ? 'Enabled' : 'Not Enabled'}: + {/if} + + + +
+ +
+ +
+
+ + + - - - - -
-
- - - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit_tracking({api_cfg: $ae_api, exhibit_tracking_id: $events_slct.exhibit_tracking_id}); - }} - > - {#if $ae_loc.trusted_access} - {($event_exhibit_tracking_obj?.hide ? 'Hidden' : 'Not Hidden')} - {/if} - - - - - { - console.log(`ae_crud_updated event:`, e.detail); - events_func.handle_load_ae_obj_id__exhibit_tracking({api_cfg: $ae_api, exhibit_tracking_id: $events_slct.exhibit_tracking_id}); - - let load_event_exhibit_tracking_obj_li = events_func.handle_load_ae_obj_li__exhibit_tracking({ - api_cfg: $ae_api, - exhibit_id: $event_exhibit_obj?.event_exhibit_id_random, - params: {enabled: 'all', qry__limit: 200}, - }); - console.log(`load_event_exhibit_tracking_obj_li = `, load_event_exhibit_tracking_obj_li); - - if (!$ae_loc.trusted_access) { - $events_sess.leads.show_form__view_lead = false; - $events_sess.leads.lead_data_changed = null; - } - }} - > - {#if $ae_loc.trusted_access} - {($event_exhibit_tracking_obj?.enable ? 'Enabled' : 'Not Enabled')}: - {/if} - - - - - -
- - -
- -
-
- - - + diff --git a/src/routes/hosted_files/+layout.svelte b/src/routes/hosted_files/+layout.svelte index cefd9252..5dc56f20 100644 --- a/src/routes/hosted_files/+layout.svelte +++ b/src/routes/hosted_files/+layout.svelte @@ -1,55 +1,54 @@ Hosted Files - {$ae_loc?.title ?? 'Æ loading...'} -
- - - + + + + + -
- {@render children?.()} -
- -
\ No newline at end of file +
+ {@render children?.()} +
+ diff --git a/src/routes/hosted_files/+layout.ts b/src/routes/hosted_files/+layout.ts index ff2bfefc..3b958283 100644 --- a/src/routes/hosted_files/+layout.ts +++ b/src/routes/hosted_files/+layout.ts @@ -5,49 +5,56 @@ import { error } from '@sveltejs/kit'; import { browser } from '$app/environment'; import { core_func } from '$lib/ae_core/ae_core_functions'; -export async function load({ params, parent, url }) { // route - let log_lvl: number = 0; +export async function load({ params, parent, url }) { + // route + const log_lvl: number = 0; - let data = await parent(); - data.log_lvl = log_lvl; + const data = await parent(); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; - // console.log(`ae_acct = `, ae_acct); + const account_id = data.account_id; + const ae_acct = data[account_id]; + // console.log(`ae_acct = `, ae_acct); - // if (!account_id) { - // console.log(`ae Core - [account_id] +page.ts: The account_id was not found!!!`); - // error(404, { + // if (!account_id) { + // console.log(`ae Core - [account_id] +page.ts: The account_id was not found!!!`); + // error(404, { // message: 'Account ID not found' // }); - // } + // } - // ae_acct.slct.account_id = account_id; + // ae_acct.slct.account_id = account_id; - let qry_limit = url.searchParams.get('limit') ?? 19; - if (!qry_limit) { - console.log(`qry_limit +page.ts: The qry_limit was not found in the params!!!`); - } - ae_acct.slct.qry_limit = qry_limit; + const qry_limit = url.searchParams.get('limit') ?? 19; + if (!qry_limit) { + console.log(`qry_limit +page.ts: The qry_limit was not found in the params!!!`); + } + ae_acct.slct.qry_limit = qry_limit; - if (browser) { - let load_hosted_file_obj_li = core_func.load_ae_obj_li__hosted_file({ - api_cfg: ae_acct.api, - for_obj_type: 'account', - for_obj_id: account_id, - enabled: 'enabled', - hidden: 'not_hidden', - limit: qry_limit, - order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'}, - try_cache: true, - log_lvl: log_lvl - }); - console.log(`load_hosted_file_obj_li = `, load_hosted_file_obj_li); - ae_acct.slct.hosted_file_obj_li = load_hosted_file_obj_li; - } + if (browser) { + const load_hosted_file_obj_li = core_func.load_ae_obj_li__hosted_file({ + api_cfg: ae_acct.api, + for_obj_type: 'account', + for_obj_id: account_id, + enabled: 'enabled', + hidden: 'not_hidden', + limit: qry_limit, + order_by_li: { + priority: 'DESC', + sort: 'DESC', + updated_on: 'DESC', + created_on: 'DESC', + title: 'ASC' + }, + try_cache: true, + log_lvl: log_lvl + }); + console.log(`load_hosted_file_obj_li = `, load_hosted_file_obj_li); + ae_acct.slct.hosted_file_obj_li = load_hosted_file_obj_li; + } - // WARNING: Precaution against shared data between sites and sessions. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and sessions. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/hosted_files/+page.svelte b/src/routes/hosted_files/+page.svelte index 4a903a07..d5c8e5b4 100644 --- a/src/routes/hosted_files/+page.svelte +++ b/src/routes/hosted_files/+page.svelte @@ -1,96 +1,92 @@ - -

Æ Hosted Files

+

Æ Hosted Files

-

Video Utilities

-

Clip, scale, re-encode videos files (mp4).

+

Video Utilities

+

Clip, scale, re-encode videos files (mp4).

- - - Video Utilities - + + + Video Utilities + -
+
-

Manage Files

+

Manage Files

- + - - - - - - - diff --git a/src/routes/hosted_files/video_util/+page.svelte b/src/routes/hosted_files/video_util/+page.svelte index 9cfa96b9..48ac6941 100644 --- a/src/routes/hosted_files/video_util/+page.svelte +++ b/src/routes/hosted_files/video_util/+page.svelte @@ -1,122 +1,118 @@ - -

Clip and Scale Video Files

-

This AV utility will take an mp4 video file and create a clipped mp4 video file. By default, videos will be scaled down to 1920x1080. This process takes at least 30 seconds, but it can easily take a handful of minutes. The scaling option requires that the video be re-encoded. Please be patient while it is processing.

+

Clip and Scale Video Files

+

+ This AV utility will take an mp4 video file and create a clipped mp4 video file. By default, + videos will be scaled down to 1920x1080. This process takes at least 30 seconds, but it can easily + take a handful of minutes. The scaling option requires that the video be re-encoded. Please be + patient while it is processing. +

-

- Step 1: Upload Video File or Select from Hosted Files +

+ Step 1: Upload Video File or Select from Hosted Files - -

+ + -
- - {#snippet label()} - -
- - Upload video files -
- - Aether hosted files only
- Recommended: video (mp4, mkv)
-
-
- {/snippet} -
-
+
+ + {#snippet label()} + +
+ + Upload video files +
+ + Aether hosted files only
+ Recommended: video (mp4, mkv)
+
+
+ {/snippet} +
+
-
- -
+
+ +
-
+
-

- Step 2: Clip Video +

+ Step 2: Clip Video - -

- {#if $ae_loc.files.uploaded_file_kv && Object.entries($ae_loc.files.uploaded_file_kv).length > 0} - - - {:else} -

Upload a video file to clip first.

- {/if} + + +{#if $ae_loc.files.uploaded_file_kv && Object.entries($ae_loc.files.uploaded_file_kv).length > 0} + +{:else} +

Upload a video file to clip first.

+{/if} -
+
-

- Step 3: Download Recently Processed Video Clips +

+ Step 3: Download Recently Processed Video Clips - -

- {#if $ae_loc.files.video_clip_file_kv && Object.entries($ae_loc.files.video_clip_file_kv).length > 0} - - - {:else} -

Clip a video file first.

- {/if} + + +{#if $ae_loc.files.video_clip_file_kv && Object.entries($ae_loc.files.video_clip_file_kv).length > 0} + +{:else} +

Clip a video file first.

+{/if} - - - - - - - diff --git a/src/routes/hosted_files/video_util/hold_video_util.svelte b/src/routes/hosted_files/video_util/hold_video_util.svelte index 8a41ac07..68844e35 100644 --- a/src/routes/hosted_files/video_util/hold_video_util.svelte +++ b/src/routes/hosted_files/video_util/hold_video_util.svelte @@ -1,185 +1,172 @@ +
+
+

Clip and Scale Video Files

+

+ This AV utility will take an mp4 video file and create a clipped mp4 video file. By default, + videos will be scaled down to 1920x1080. This process takes at least 30 seconds, but it can + easily take a handful of minutes. The scaling option requires that the video be re-encoded. + Please be patient while it is processing. +

+

+ Step 1: Upload Video File or Select from Hosted Files -
+ +

-
-

Clip and Scale Video Files

-

This AV utility will take an mp4 video file and create a clipped mp4 video file. By default, videos will be scaled down to 1920x1080. This process takes at least 30 seconds, but it can easily take a handful of minutes. The scaling option requires that the video be re-encoded. Please be patient while it is processing.

+
+ + {#snippet label()} + +
+ + Upload video files +
+ + Aether hosted files only
+ Recommended: video (mp4, mkv)
+
+
+ {/snippet} +
+
-

- Step 1: Upload Video File or Select from Hosted Files +
+ +
- -

+
-
- - {#snippet label()} - -
- - Upload video files -
- - Aether hosted files only
- Recommended: video (mp4, mkv)
-
-
- {/snippet} -
-
+

+ Step 2: Clip Video -
- -
+ +

+ {#if $ae_loc.files.uploaded_file_kv && Object.entries($ae_loc.files.uploaded_file_kv).length > 0} + + {:else} +

Upload a video file to clip first.

+ {/if} -
+

+ Step 3: Download Recently Processed Video Clips -

- Step 2: Clip Video + +

+ {#if $ae_loc.files.video_clip_file_kv && Object.entries($ae_loc.files.video_clip_file_kv).length > 0} + + {:else} +

Clip a video file first.

+ {/if} - - - {#if $ae_loc.files.uploaded_file_kv && Object.entries($ae_loc.files.uploaded_file_kv).length > 0} - - - {:else} -

Upload a video file to clip first.

- {/if} + - -

- Step 3: Download Recently Processed Video Clips - - -

- {#if $ae_loc.files.video_clip_file_kv && Object.entries($ae_loc.files.video_clip_file_kv).length > 0} - - - {:else} -

Clip a video file first.

- {/if} - - - - - - + - - - - - + - - + - + - -
+
- - - - - - - - + + - - -
- diff --git a/src/routes/idaa/(idaa)/+layout.svelte b/src/routes/idaa/(idaa)/+layout.svelte index a0a211ee..e44475d9 100644 --- a/src/routes/idaa/(idaa)/+layout.svelte +++ b/src/routes/idaa/(idaa)/+layout.svelte @@ -1,202 +1,207 @@ - - - - -{#if (browser && ($ae_loc.trusted_access || ($ae_loc.authenticated_access && $idaa_loc.novi_uuid)))} - - - - + + - - {@render children?.()} - - {#if $idaa_loc.novi_uuid} - - Novi: - {$idaa_loc.novi_uuid} - {$idaa_loc.novi_full_name ?? 'name not set'} - {$idaa_loc.novi_email ?? 'email not set'} - - {:else} -

IDAA Novi UUID not found!

- {/if} - + {@render children?.()} + + {#if $idaa_loc.novi_uuid} + + Novi: + {$idaa_loc.novi_uuid} + {$idaa_loc.novi_full_name ?? 'name not set'} + {$idaa_loc.novi_email ?? 'email not set'} + + {:else} +

IDAA Novi UUID not found!

+ {/if} {:else if browser} +
+

+ + + Access Denied + + +

+

You do not have access to these IDAA page.

-
-

- - - Access Denied - - -

-

You do not have access to these IDAA page.

+ {#if $ae_loc.iframe} + In iframe mode + {/if} - {#if $ae_loc.iframe} - In iframe mode - {/if} - - {#if $idaa_loc.novi_uuid} - - Novi: - {$idaa_loc.novi_uuid} - {$idaa_loc.novi_full_name ?? 'name not set'} - {$idaa_loc.novi_email ?? 'email not set'} - - {:else} -

IDAA Novi UUID not found!

- {/if} -
+ {#if $idaa_loc.novi_uuid} + + Novi: + {$idaa_loc.novi_uuid} + {$idaa_loc.novi_full_name ?? 'name not set'} + {$idaa_loc.novi_email ?? 'email not set'} + + {:else} +

IDAA Novi UUID not found!

+ {/if} +
{:else} -

- - Loading... -

+

+ + Loading... +

{/if} diff --git a/src/routes/idaa/(idaa)/archives/+layout.svelte b/src/routes/idaa/(idaa)/archives/+layout.svelte index 306168cd..db8e6d88 100644 --- a/src/routes/idaa/(idaa)/archives/+layout.svelte +++ b/src/routes/idaa/(idaa)/archives/+layout.svelte @@ -1,35 +1,42 @@ - {@render children?.()} diff --git a/src/routes/idaa/(idaa)/archives/+layout.ts b/src/routes/idaa/(idaa)/archives/+layout.ts index b4696da7..4756bdeb 100644 --- a/src/routes/idaa/(idaa)/archives/+layout.ts +++ b/src/routes/idaa/(idaa)/archives/+layout.ts @@ -5,47 +5,54 @@ import { browser } from '$app/environment'; import { archives_func } from '$lib/ae_archives/ae_archives_functions'; -export async function load({ fetch, params, parent }) { // route - let log_lvl: number = 0; +export async function load({ fetch, params, parent }) { + // route + const log_lvl: number = 0; - let data = await parent(); - data.log_lvl = log_lvl; + const data = await parent(); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; - // console.log(`ae_acct = `, ae_acct); + const account_id = data.account_id; + const ae_acct = data[account_id]; + // console.log(`ae_acct = `, ae_acct); - // if (!account_id) { - // console.log(`ae IDAA Archives - [account_id] +page.ts: The account_id was not found!!!`); - // error(404, { + // if (!account_id) { + // console.log(`ae IDAA Archives - [account_id] +page.ts: The account_id was not found!!!`); + // error(404, { // message: 'Account ID not found' // }); - // } + // } - // ae_acct.slct.account_id = account_id; + // ae_acct.slct.account_id = account_id; - if (browser) { - let load_archive_obj_li = archives_func.load_ae_obj_li__archive({ - api_cfg: ae_acct.api, - for_obj_type: 'account', - for_obj_id: account_id, - inc_content_li: true, - enabled: 'enabled', - hidden: 'not_hidden', - limit: 29, - order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'}, - params: params, - try_cache: true, - log_lvl: log_lvl - }); - if (log_lvl) { - console.log(`load_archive_obj_li = `, load_archive_obj_li); - } - ae_acct.slct.archive_obj_li = load_archive_obj_li; - } + if (browser) { + const load_archive_obj_li = archives_func.load_ae_obj_li__archive({ + api_cfg: ae_acct.api, + for_obj_type: 'account', + for_obj_id: account_id, + inc_content_li: true, + enabled: 'enabled', + hidden: 'not_hidden', + limit: 29, + order_by_li: { + priority: 'DESC', + sort: 'DESC', + updated_on: 'DESC', + created_on: 'DESC', + name: 'ASC' + }, + params: params, + try_cache: true, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log(`load_archive_obj_li = `, load_archive_obj_li); + } + ae_acct.slct.archive_obj_li = load_archive_obj_li; + } - // WARNING: Precaution against shared data between sites and sessions. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and sessions. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/idaa/(idaa)/archives/+page.svelte b/src/routes/idaa/(idaa)/archives/+page.svelte index d056318d..e200b09b 100644 --- a/src/routes/idaa/(idaa)/archives/+page.svelte +++ b/src/routes/idaa/(idaa)/archives/+page.svelte @@ -1,164 +1,169 @@ - - IDAA Archives: - - Novi - {$ae_loc?.title} - + IDAA Archives: - Novi - {$ae_loc?.title} + - + e_class="m-auto" + e_class_h1="novi_m0" + e_class_h2="novi_m0" + btn_class="novi_btn" + show_btn_class="z-10" + additional_kv={{ + novi_uuid: $idaa_loc.novi_uuid, + novi_email: $idaa_loc.novi_email, + novi_full_name: $idaa_loc.novi_full_name + }} +> {#await lq__archive_obj_li} -
- - Loading archives... -
+
+ + Loading archives... +
{:then} - {#if $lq__archive_obj_li && $lq__archive_obj_li?.length} - - {:else} -
-

No archives found.

-

Archives will appear here once created.

-
- {/if} + {#if $lq__archive_obj_li && $lq__archive_obj_li?.length} + + {:else} +
+

No archives found.

+

+ Archives will appear here once created. +

+
+ {/if} {/await} diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte index 0343c297..2cedd739 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/+page.svelte @@ -1,237 +1,257 @@ - - IDAA Archives: - {$lq__archive_obj?.name ? ae_util.shorten_string({ string: $lq__archive_obj?.name, max_length: 20, begin_length: 10, end_length: 4 }) : ''} - - Novi - {$ae_loc?.title} - + IDAA Archives: + {$lq__archive_obj?.name + ? ae_util.shorten_string({ + string: $lq__archive_obj?.name, + max_length: 20, + begin_length: 10, + end_length: 4 + }) + : ''} + - Novi - {$ae_loc?.title} + -
-

+

- - - {@html $lq__archive_obj?.name ?? 'Archive'} - {#if $ae_loc.trusted_access && $ae_loc.edit_mode} - ({$lq__archive_content_obj_li?.length ?? '0'}×) - {/if} - {#await $idaa_prom.load__archive_content_obj_li} - - {:then} - - {/await} -

+ > + + + {@html $lq__archive_obj?.name ?? 'Archive'} + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + ({$lq__archive_content_obj_li?.length ?? '0'}×) + {/if} + {#await $idaa_prom.load__archive_content_obj_li} + + {:then} + + {/await} + -
- - {#if $lq__archive_obj?.topic_name} - {$lq__archive_obj?.topic_name} - {/if} - {#if $ae_loc.trusted_access && $lq__archive_obj?.hide} - Hidden - {/if} - {#if $ae_loc.administrator_access && !$lq__archive_obj?.enable} - Not enabled - {/if} - -
+ > + + {#if $lq__archive_obj?.topic_name} + {$lq__archive_obj?.topic_name} + {/if} + {#if $ae_loc.trusted_access && $lq__archive_obj?.hide} + Hidden + {/if} + {#if $ae_loc.administrator_access && !$lq__archive_obj?.enable} + Not enabled + {/if} + +
- - + - -
- - - - View Other Archives - - + " + > + + View Other Archives +
- + - - + - + title="{$lq__archive_obj?.name} - {$lq__archive_obj?.id}" + bind:open={$idaa_sess.archives.show__modal_edit__archive_id} + autoclose={false} + placement="top-center" + size="xl" + class="top-center bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y" +> + {#snippet header()} +
+

+ {#if $ae_loc.trusted_access} + + + + {/if} -
-

- {#if $ae_loc.trusted_access} - -

+
+ {/snippet} - $idaa_sess.archives.show__modal_view__archive_id = $idaa_slct.archive_id; - $idaa_sess.archives.show__modal_edit__archive_id = false; - }} - class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition" - title={`View meeting: ${$lq__archive_obj?.name}`} - > - View - - - {/if} - - - Edit Archive: - - {$lq__archive_obj?.name} -

-
- - - {/snippet} - - - - {#snippet footer()} - - {/snippet} + + {#snippet footer()} + + {/snippet}
- + bind:open={$idaa_sess.archives.show__modal_edit__archive_content_id} + autoclose={false} + placement="top-center" + size="xl" + class="top-center bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y" +> + {#snippet header()} +
+

+ {#if $ae_loc.trusted_access} + + + + {/if} - // $idaa_sess.archives.show__modal_view__archive_content_id = $idaa_slct.archive_content_id; - $idaa_slct.archive_content_id = null; - $idaa_slct.archive_content_obj = {}; + Edit Content: + {$idaa_slct.archive_content_obj?.name ?? 'New Archive Content'} +

+
+ {/snippet} - $idaa_sess.archives.show__modal_edit__archive_content_id = false; - }} - class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition" - title={`View meeting: ${$lq__archive_content_obj?.name}`} - > - Cancel - - - {/if} - - - Edit Content: - - {$idaa_slct.archive_content_obj?.name ?? 'New Archive Content'} - - - - - {/snippet} - - - - {#snippet footer()} - - {/snippet} + + {#snippet footer()} + + {/snippet}
- - + diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/+page.ts b/src/routes/idaa/(idaa)/archives/[archive_id]/+page.ts index ae692398..d06e6771 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/+page.ts +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/+page.ts @@ -6,51 +6,53 @@ import { error } from '@sveltejs/kit'; import { browser } from '$app/environment'; import { archives_func } from '$lib/ae_archives/ae_archives_functions'; -export const load = (async ({ params, parent }) => { // route - let log_lvl: number = 0; +export const load = (async ({ params, parent }) => { + // route + const log_lvl: number = 0; - let data = await parent(); - data.log_lvl = log_lvl; + const data = await parent(); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; + const account_id = data.account_id; + const ae_acct = data[account_id]; - let archive_id = params.archive_id; + const archive_id = params.archive_id; - ae_acct.slct.archive_id = archive_id; + ae_acct.slct.archive_id = archive_id; - if (browser) { - if (log_lvl) { - console.log(`ae_idaa_archives archives [archive_id] +page.ts: archive_id = `, archive_id); - } - // Load archive object - let load_archive_obj = await archives_func.load_ae_obj_id__archive({ - api_cfg: ae_acct.api, - archive_id: archive_id, - inc_content_li: true, - enabled: 'enabled', - hidden: 'all', // 'not_hidden' to load only visible entries - limit: 99, - log_lvl: log_lvl - }) - .then((results) => { - if (!results) { - error(404, { - message: 'IDAA Archives - Archive not found' - }); - } else { - // ae_acct.slct.post_obj = results; - } - }); + if (browser) { + if (log_lvl) { + console.log(`ae_idaa_archives archives [archive_id] +page.ts: archive_id = `, archive_id); + } + // Load archive object + const load_archive_obj = await archives_func + .load_ae_obj_id__archive({ + api_cfg: ae_acct.api, + archive_id: archive_id, + inc_content_li: true, + enabled: 'enabled', + hidden: 'all', // 'not_hidden' to load only visible entries + limit: 99, + log_lvl: log_lvl + }) + .then((results) => { + if (!results) { + error(404, { + message: 'IDAA Archives - Archive not found' + }); + } else { + // ae_acct.slct.post_obj = results; + } + }); - if (log_lvl) { - console.log(`load_archive_obj = `, load_archive_obj); - } - ae_acct.slct.archive_obj = load_archive_obj; - } + if (log_lvl) { + console.log(`load_archive_obj = `, load_archive_obj); + } + ae_acct.slct.archive_obj = load_archive_obj; + } - // WARNING: Precaution against shared data between sites and presentations. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and presentations. + data[account_id] = ae_acct; - return data; + return data; }) satisfies PageLoad; diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte index 7669926a..93d32c15 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_id_edit.svelte @@ -1,416 +1,439 @@ -
- + class:ae_create={!$idaa_slct.archive_content_id} +> + -
+ + {#await prom_api__archive_content_obj} +
Saving...
+ {:then} + {#if prom_api__archive_content_obj} +
Finished saving
+ {:else} + + {/if} + {/await} - {#await prom_api__archive_content_obj} -
Saving...
- {:then} - {#if prom_api__archive_content_obj} -
Finished saving
- {:else} - - {/if} - {/await} + - - -
- -
-
- - + - -
+ - {#if $idaa_slct.archive_content_id} -
+ {#if $idaa_slct.archive_content_id} +
+

Upload/Manage Hosted File

-

Upload/Manage Hosted File

+ {#if !$idaa_slct.archive_content_obj?.hosted_file_id} + No file uploaded yet. - {#if !$idaa_slct.archive_content_obj?.hosted_file_id} - No file uploaded yet. + {#if $ae_loc.trusted_access} + - {#if $ae_loc.trusted_access} - +
+ + {#snippet label()} + +
+ + Upload archive files +
+ + Aether hosted files only
+ Recommended: PowerPoint (pptx) or Keynote (key) or Adobe PDF
+ Media: audio (mp3, m4a) and video (mp4, mkv)
+ Supplemental files: Word Doc, Excel, txt, etc +
+
+ {/snippet} +
+
-
- - {#snippet label()} - -
- - Upload archive files -
- - Aether hosted files only
- Recommended: PowerPoint (pptx) or Keynote (key) or Adobe PDF
- Media: audio (mp3, m4a) and video (mp4, mkv)
- Supplemental files: Word Doc, Excel, txt, etc -
-
- {/snippet} -
-
- -
- -
- {/if} - - {:else} - - + - - + - + + {/if} +
+ {:else} +
+ + Save the form first before uploading a file. +
+ {/if} - {/if} +
+

Original

-
- {:else} -
- - Save the form first before uploading a file. -
- {/if} + -
+
+ +
-

Original

+ +
- - -
- -
- - - -
- - - {#if $ae_loc.trusted_access} - + class:preset-filled-success-200-800={$idaa_loc.archives.show__admin_options} + class:preset-filled-tertiary-200-800={!$idaa_loc.archives.show__admin_options} + onclick={() => { + $idaa_loc.archives.show__admin_options = !$idaa_loc.archives.show__admin_options; + }} + > + {#if $idaa_loc.archives.show__admin_options} + + {:else} + + {/if} + {$idaa_loc.archives.show__admin_options ? 'Hide' : 'Show'} Admin + - -
+ class:hidden={!$idaa_loc.archives.show__admin_options} + > +

Admin Options

-

- Admin Options -

+ + +
+ Hide +
+ + +
+
+ + +
+
- - -
- Hide -
- - -
-
- - -
-
+
+ Priority +
+ + +
+
+ + +
+
+
-
- Priority -
- - -
-
- - -
-
-
- - - + > + - - + +
- {#if $ae_loc.administrator_access} - -
- Enable -
- - -
-
- - -
-
-
- {:else} - - {/if} -
+ {#if $ae_loc.administrator_access} + +
+ Enable +
+ + +
+
+ + +
+
+
+ {:else} + + {/if} + - {#if $ae_loc.trusted_access} - - {/if} + {#if $ae_loc.trusted_access} + + {/if} -
- {$lq__archive_content_obj?.updated_on ? `DB Updated on: ${$lq__archive_content_obj?.updated_on}` : ''} - {$idaa_slct.archive_content_obj?.updated_on ? `SLCT Updated on: ${$idaa_slct.archive_content_obj?.updated_on}` : ''} -
+
+ {$lq__archive_content_obj?.updated_on + ? `DB Updated on: ${$lq__archive_content_obj?.updated_on}` + : ''} + {$idaa_slct.archive_content_obj?.updated_on + ? `SLCT Updated on: ${$idaa_slct.archive_content_obj?.updated_on}` + : ''} +
+
+ + {/if} - - {/if} - - -
- + > + {#await prom_api__archive_content_obj} + Saving + {:then} + Save Changes + {/await} + + + - {#if $idaa_slct.archive_content_id && !$idaa_slct.archive_content_obj?.hosted_file_id} - + title="Disable this archive content" + > + + Remove + {#if $ae_loc.administrator_access} + (Disable) + {/if} + - {#if $ae_loc.administrator_access && $ae_loc.edit_mode} - - {/if} - {:else if $idaa_slct.archive_content_obj.hosted_file_id} - {#if $ae_loc.administrator_access} - Can not delete. Remove hosted file first. - {/if} - {/if} -
- -
- -
+ title="Delete this archive content" + > + + Delete + + {/if} + {:else if $idaa_slct.archive_content_obj.hosted_file_id} + {#if $ae_loc.administrator_access} + Can not delete. Remove hosted file first. + {/if} + {/if} + + + + diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_li.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_li.svelte index 4e461e20..48f5b4f9 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_li.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_content_obj_li.svelte @@ -1,205 +1,231 @@ -
-{#if $lq__archive_content_obj_li && $lq__archive_content_obj_li.length} - - -{#each $lq__archive_content_obj_li as idaa_archive_content_obj, index} - -{#if idaa_archive_content_obj.group && idaa_archive_content_obj.group != $lq__archive_content_obj_li[index - 1]?.group} - -
- -
-{/if} + > + + + {/if} -{#if $idaa_sess.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group} + {#if $idaa_sess.archives.show_list__archive_content_li_group == idaa_archive_content_obj.group} +
+
+

+ {@html idaa_archive_content_obj.name} +

-
+ {#if idaa_archive_content_obj.original_location} + — +

+ + {idaa_archive_content_obj.original_location} +

+ {/if} +
-
-

- {@html idaa_archive_content_obj.name} -

+ {#if idaa_archive_content_obj.description}
{@html idaa_archive_content_obj.description}
{/if} - {#if idaa_archive_content_obj.original_location} - — -

- - {idaa_archive_content_obj.original_location} -

- {/if} -
+
+ {#if idaa_archive_content_obj?.hosted_file_id} + - // let message = {'archive_id': idaa_archive_content_obj?.archive_id}; - // window.parent.postMessage(message, "*"); + {#if $ae_loc.trusted_access && idaa_archive_content_obj?.hosted_file_id} + + // window.postMessage({ type: 'download_event_file', hosted_file_id: idaa_archive_content_obj.hosted_file_id, filename: idaa_archive_content_obj.filename, auto_download: true }, '*'); + }} + class="novi_btn btn btn-sm lg:btn-md preset-tonal-primary hover:preset-filled-primary-500 min-w-72 lg:min-w-96" + title={`Download this file:\n${idaa_archive_content_obj.filename}\n[API] SHA256: ${idaa_archive_content_obj?.hash_sha256.slice(0, 10)}... Hosted ID: ${idaa_archive_content_obj.hosted_file_id} Archive Content ID: ${idaa_archive_content_obj.archive_content_id}`} + > + {#await ae_promises[idaa_archive_content_obj.hosted_file_id]} + + + Downloading + {#if $ae_sess.api_download_kv[idaa_archive_content_obj.hosted_file_id]} + {$ae_sess.api_download_kv[idaa_archive_content_obj.hosted_file_id] + .percent_completed}% + {/if} + : + + {:then} + + {/await} - {#if $ae_loc.trusted_access && idaa_archive_content_obj?.hosted_file_id} - - // window.postMessage({ type: 'download_event_file', hosted_file_id: idaa_archive_content_obj.hosted_file_id, filename: idaa_archive_content_obj.filename, auto_download: true }, '*'); - }} - class="novi_btn btn btn-sm lg:btn-md preset-tonal-primary hover:preset-filled-primary-500 min-w-72 lg:min-w-96" - title={`Download this file:\n${idaa_archive_content_obj.filename}\n[API] SHA256: ${idaa_archive_content_obj?.hash_sha256.slice(0, 10)}... Hosted ID: ${idaa_archive_content_obj.hosted_file_id} Archive Content ID: ${idaa_archive_content_obj.archive_content_id}`} - > - {#await ae_promises[idaa_archive_content_obj.hosted_file_id]} - - - Downloading - {#if $ae_sess.api_download_kv[idaa_archive_content_obj.hosted_file_id]} - {$ae_sess.api_download_kv[idaa_archive_content_obj.hosted_file_id].percent_completed}% - {/if} - : - - {:then} - - {/await} - - - {ae_util.shorten_filename({filename: idaa_archive_content_obj?.filename, max_length: 30})} - - - - - - {/if} + {/if} + {:else} + + + No file linked. + + + {/if} - {:else} - - - No file linked. - - - {/if} + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + + {/if} +
- $idaa_sess.archives.show__modal_view__archive_content_id = false; - $idaa_sess.archives.show__modal_edit__archive_content_id = $idaa_slct.archive_content_id; - }} - class="novi_btn btn btn-sm preset-tonal-warning hover:preset-filled-warning-500 transition" - title={`Edit archive content: ${idaa_archive_content_obj?.name}`} - > - Edit Content - - {/if} -
+
+ {#if idaa_archive_content_obj?.description} +
+
Description:
+
+ {@html idaa_archive_content_obj?.description} +
+
+ {/if} -
- {#if idaa_archive_content_obj?.description} -
-
Description:
-
- {@html idaa_archive_content_obj?.description} -
-
- {/if} + {#if idaa_archive_content_obj?.content_html} +
+
Content:
+
+ {@html idaa_archive_content_obj?.content_html} +
+
+ {/if} - {#if idaa_archive_content_obj?.content_html} -
-
Content:
-
- {@html idaa_archive_content_obj?.content_html} -
-
- {/if} +
+ Original date/time: + {#if idaa_archive_content_obj.original_datetime} + {ae_util.iso_datetime_formatter( + idaa_archive_content_obj.original_datetime, + 'datetime_12_long' + )} + {/if} + {#if idaa_archive_content_obj.original_timezone} + Timezone: + {idaa_archive_content_obj.original_timezone} + {/if} +
+
-
- Original date/time: - {#if idaa_archive_content_obj.original_datetime} - {ae_util.iso_datetime_formatter(idaa_archive_content_obj.original_datetime, 'datetime_12_long')} - {/if} - {#if idaa_archive_content_obj.original_timezone} - Timezone: - {idaa_archive_content_obj.original_timezone} - {/if} -
+
+ + Type: {idaa_archive_content_obj.archive_content_type} + + + + Created on: {ae_util.iso_datetime_formatter( + idaa_archive_content_obj.created_on, + 'datetime_12_long' + )} + + + Updated on: {ae_util.iso_datetime_formatter( + idaa_archive_content_obj.updated_on, + 'datetime_12_long' + )} + + +
+ + {/if} + {/each} -
- - -
- - Type: {idaa_archive_content_obj.archive_content_type} - - - - Created on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.created_on, 'datetime_12_long')} - - - Updated on: {ae_util.iso_datetime_formatter(idaa_archive_content_obj.updated_on, 'datetime_12_long')} - - -
- - - -{/if} - -{/each} - - - -{:else} -

No archive content available to show.

-{/if} + + {:else} +

No archive content available to show.

+ {/if}
diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_edit.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_edit.svelte index ba142f04..54c91dd6 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_edit.svelte @@ -1,350 +1,355 @@ -
+ class:ae_create={!$idaa_slct.archive_id} + bind:clientHeight={$ae_loc.iframe_height_modal_body} +> +
+ {#await update_archive_obj_promise} +
Saving...
+ {:then} + {#if update_archive_obj_promise} +
Finished saving
+ {:else} + + {/if} + {/await} - + - {#await update_archive_obj_promise} -
Saving...
- {:then} - {#if update_archive_obj_promise} -
Finished saving
- {:else} - - {/if} - {/await} - - - -
- -
- +
- + - +
- +
+

Original

-
+ -

Original

+
+ +
- - -
- -
- - - + - + - + +
-
+ - - - - - - {#if $ae_loc.administrator_access} - - {/if} + {#if $ae_loc.administrator_access} + + {/if} - - {#if $ae_loc.trusted_access} - + class:preset-filled-success-200-800={$idaa_loc.archives.show__admin_options} + class:preset-filled-tertiary-200-800={!$idaa_loc.archives.show__admin_options} + onclick={() => { + $idaa_loc.archives.show__admin_options = !$idaa_loc.archives.show__admin_options; + }} + > + {#if $idaa_loc.archives.show__admin_options} + + {:else} + + {/if} + {$idaa_loc.archives.show__admin_options ? 'Hide' : 'Show'} Admin + - -
+ class:hidden={!$idaa_loc.archives.show__admin_options} + > +

Admin Options

-

- Admin Options -

+ + +
+ Hide +
+ + +
+
+ + +
+
- - -
- Hide -
- - -
-
- - -
-
+
+ Priority +
+ + +
+
+ + +
+
+
-
- Priority -
- - -
-
- - -
-
-
- - - + > + - - + +
- {#if $ae_loc.administrator_access} - -
- Enable -
- - -
-
- - -
-
-
- {:else} - - {/if} -
+ {#if $ae_loc.administrator_access} + +
+ Enable +
+ + +
+
+ + +
+
+
+ {:else} + + {/if} + - {#if $ae_loc.trusted_access} - - {/if} + {#if $ae_loc.trusted_access} + + {/if} -
- {$lq__archive_obj?.updated_on ? `DB Updated on: ${$lq__archive_obj?.updated_on}` : ''} - {$idaa_slct.archive_obj?.updated_on ? `SLCT Updated on: ${$idaa_slct.archive_obj?.updated_on}` : ''} -
+
+ {$lq__archive_obj?.updated_on ? `DB Updated on: ${$lq__archive_obj?.updated_on}` : ''} + {$idaa_slct.archive_obj?.updated_on + ? `SLCT Updated on: ${$idaa_slct.archive_obj?.updated_on}` + : ''} +
+
+ + {/if} - - {/if} - - -
- + > + + Save Archive + - {#if $idaa_slct.archive_id} - - {/if} -
- -
- + title="Disable this archive content" + > + + Delete + + {/if} + +
- diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_view.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_view.svelte index e8b07d56..87b08908 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_view.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__archive_obj_id_view.svelte @@ -1,32 +1,41 @@ - -
- - -
- {#if $lq__archive_obj?.description}
{@html $lq__archive_obj?.description}
{/if} - {#if $lq__archive_obj?.content_html}
{@html $lq__archive_obj?.content_html}
{/if} - {#if $lq__archive_obj?.original_url} -
- URL: - {$lq__archive_obj?.original_url} -
- {/if} - {#if $lq__archive_obj?.original_datetime} -
- Start Date: - {ae_util.iso_datetime_formatter($lq__archive_obj?.original_datetime, 'date_long')} -
- {/if} - {#if $lq__archive_obj?.original_timezone} - Timezone: - {$lq__archive_obj?.original_timezone} - {/if} - {#if $lq__archive_obj?.original_location} -
- Location: - {$lq__archive_obj?.original_location} -
- {/if} +
+ {#if $lq__archive_obj?.description}
+ {@html $lq__archive_obj?.description} +
{/if} + {#if $lq__archive_obj?.content_html}
+ {@html $lq__archive_obj?.content_html} +
{/if} + {#if $lq__archive_obj?.original_url} +
+ URL: + {$lq__archive_obj?.original_url} +
+ {/if} + {#if $lq__archive_obj?.original_datetime} +
+ Start Date: + {ae_util.iso_datetime_formatter($lq__archive_obj?.original_datetime, 'date_long')} +
+ {/if} + {#if $lq__archive_obj?.original_timezone} + Timezone: + {$lq__archive_obj?.original_timezone} + {/if} + {#if $lq__archive_obj?.original_location} +
+ Location: + {$lq__archive_obj?.original_location} +
+ {/if} +
+ +
+
+ + Created on: + {ae_util.iso_datetime_formatter( + $lq__archive_obj?.created_on, + 'datetime_iso_12_no_seconds' + )} + + {#if $lq__archive_obj?.updated_on} + + Updated on: + {ae_util.iso_datetime_formatter( + $lq__archive_obj?.updated_on, + 'datetime_iso_12_no_seconds' + )} + + {/if} +
+ + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + + {/if} +
- -
-
- - Created on: - {ae_util.iso_datetime_formatter($lq__archive_obj?.created_on, 'datetime_iso_12_no_seconds')} - - {#if $lq__archive_obj?.updated_on} - - Updated on: - {ae_util.iso_datetime_formatter($lq__archive_obj?.updated_on, 'datetime_iso_12_no_seconds')} - - {/if} -
- - - {#if $ae_loc.trusted_access && $ae_loc.edit_mode} - - {/if} - - -
- -
\ No newline at end of file diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__modal_media_player.svelte b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__modal_media_player.svelte index 887145e5..7e9ff2b9 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__modal_media_player.svelte +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/ae_idaa_comp__modal_media_player.svelte @@ -1,97 +1,93 @@ - { - // We want to cancel the inline edit if the modal is closed - // $idaa_sess.archives.show__inline_edit__archive_content_id = false; - }} - outsideclose={true} - placement="top-center" - size="xl" - class="top-center bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y" - > - - {#snippet header()} -
-

- - {$idaa_slct.archive_content_obj?.name} - {$lq__archive_content_obj?.archive_content_id}

-
+ {$idaa_slct.archive_content_obj?.name} - {$lq__archive_content_obj?.archive_content_id} + + - - {/snippet} + $idaa_slct.archive_content_id = null; + let message = { archive_content_id: null }; + window.parent.postMessage(message, '*'); + }} + > + + Close + + {/snippet} - + - {#snippet footer()} - - {/snippet} - -
\ No newline at end of file + $idaa_slct.archive_content_id = null; + let message = { archive_content_id: null }; + window.parent.postMessage(message, '*'); + }} + > + + Close + + {/snippet} + diff --git a/src/routes/idaa/(idaa)/archives/[archive_id]/not_used+layout.ts b/src/routes/idaa/(idaa)/archives/[archive_id]/not_used+layout.ts index 2989cee7..28400b50 100644 --- a/src/routes/idaa/(idaa)/archives/[archive_id]/not_used+layout.ts +++ b/src/routes/idaa/(idaa)/archives/[archive_id]/not_used+layout.ts @@ -1,4 +1,5 @@ /** @type {import('./$types').LayoutLoad} */ -export async function load({ params, parent }) { // route +export async function load({ params, parent }) { + // route } diff --git a/src/routes/idaa/(idaa)/archives/ae_idaa_comp__archive_obj_li.svelte b/src/routes/idaa/(idaa)/archives/ae_idaa_comp__archive_obj_li.svelte index b5b6a6fa..57b78718 100644 --- a/src/routes/idaa/(idaa)/archives/ae_idaa_comp__archive_obj_li.svelte +++ b/src/routes/idaa/(idaa)/archives/ae_idaa_comp__archive_obj_li.svelte @@ -1,112 +1,123 @@ -
-{#if $lq__archive_obj_li && $lq__archive_obj_li.length} +> + {#if $lq__archive_obj_li && $lq__archive_obj_li.length} + {#each $lq__archive_obj_li as idaa_archive_obj, index} +
+
+

+ + {@html idaa_archive_obj.name} +

-{#each $lq__archive_obj_li as idaa_archive_obj, index} -
+ {#if idaa_archive_obj.original_location} + +

+ + {idaa_archive_obj.original_location} +

+ {/if} +
-
-

- - {@html idaa_archive_obj.name} -

+ {#if idaa_archive_obj.description}
{@html idaa_archive_obj.description}
{/if} - {#if idaa_archive_obj.original_location} - -

- - {idaa_archive_obj.original_location} -

- {/if} -
- - {#if idaa_archive_obj.description}
{@html idaa_archive_obj.description}
{/if} - -
- - + - - - Open + title={`View: ${idaa_archive_obj?.name}`} + > + + + Open - {#if idaa_archive_obj?.archive_content_count} - - {(idaa_archive_obj?.archive_content_count == 1 ? `${idaa_archive_obj?.archive_content_count} content` : `${idaa_archive_obj?.archive_content_count} contents` )} - - {/if} - + {#if idaa_archive_obj?.archive_content_count} + + + {idaa_archive_obj?.archive_content_count == 1 + ? `${idaa_archive_obj?.archive_content_count} content` + : `${idaa_archive_obj?.archive_content_count} contents`} + + {/if} + +
- -
- - - - - -{/each} - -{:else} - No archives found at this time -{/if} + + + {/each} + {:else} + No archives found at this time + {/if}
diff --git a/src/routes/idaa/(idaa)/archives/ae_idaa_comp__media_player.svelte b/src/routes/idaa/(idaa)/archives/ae_idaa_comp__media_player.svelte index 066849a7..b383f748 100644 --- a/src/routes/idaa/(idaa)/archives/ae_idaa_comp__media_player.svelte +++ b/src/routes/idaa/(idaa)/archives/ae_idaa_comp__media_player.svelte @@ -1,120 +1,126 @@
- {#if !$idaa_slct.archive_content_obj.hosted_file_id} - - - No Hosted File Linked - - - {:else if file_icons[$idaa_slct.archive_content_obj.file_extension] == 'file-audio'} - - - {:else if file_icons[$idaa_slct.archive_content_obj.file_extension] == 'file-video'} - - - - - {:else if file_icons[$idaa_slct.archive_content_obj.file_extension] == 'file-image'} - {$idaa_slct.archive_content_obj.name} - {:else} - + + No Hosted File Linked + + + {:else if file_icons[$idaa_slct.archive_content_obj.file_extension] == 'file-audio'} + + {:else if file_icons[$idaa_slct.archive_content_obj.file_extension] == 'file-video'} + + + + {:else if file_icons[$idaa_slct.archive_content_obj.file_extension] == 'file-image'} + {$idaa_slct.archive_content_obj.name} + {:else} + - - Download: - {$idaa_slct.archive_content_obj.filename} - - {/if} + title="Download: {$idaa_slct.archive_content_obj.filename}" + download={$idaa_slct.archive_content_obj.filename} + > + + Download: + {$idaa_slct.archive_content_obj.filename} + + {/if} - {#if $idaa_slct.archive_content_obj.description} -
- {@html $idaa_slct.archive_content_obj.description} -
- {/if} + {#if $idaa_slct.archive_content_obj.description} +
+ {@html $idaa_slct.archive_content_obj.description} +
+ {/if} - {#if $idaa_slct.archive_content_obj.content_html} -
- {@html $idaa_slct.archive_content_obj.content_html} -
- {/if} - -
\ No newline at end of file + {#if $idaa_slct.archive_content_obj.content_html} +
+ {@html $idaa_slct.archive_content_obj.content_html} +
+ {/if} + diff --git a/src/routes/idaa/(idaa)/bb/+layout.svelte b/src/routes/idaa/(idaa)/bb/+layout.svelte index b3417ecf..0e66c77e 100644 --- a/src/routes/idaa/(idaa)/bb/+layout.svelte +++ b/src/routes/idaa/(idaa)/bb/+layout.svelte @@ -1,89 +1,96 @@ - {@render children?.()} diff --git a/src/routes/idaa/(idaa)/bb/+layout.ts b/src/routes/idaa/(idaa)/bb/+layout.ts index cbe5adef..ba3ec12b 100644 --- a/src/routes/idaa/(idaa)/bb/+layout.ts +++ b/src/routes/idaa/(idaa)/bb/+layout.ts @@ -6,61 +6,53 @@ import { browser } from '$app/environment'; // import { page } from '$app/state'; import { posts_func } from '$lib/ae_posts/ae_posts_functions'; -export async function load({ params, parent }) { // route - // let log_lvl: number = 0; - - // let data = await parent(); - // data.log_lvl = log_lvl; - - // let account_id = data.account_id; - // let ae_acct = data[account_id]; - // // console.log(`ae_acct = `, ae_acct); - - // // if (!account_id) { - // // console.log(`ae IDAA BB - [account_id] +page.ts: The account_id was not found!!!`); - // // error(404, { +export async function load({ params, parent }) { + // route + // let log_lvl: number = 0; + // let data = await parent(); + // data.log_lvl = log_lvl; + // let account_id = data.account_id; + // let ae_acct = data[account_id]; + // // console.log(`ae_acct = `, ae_acct); + // // if (!account_id) { + // // console.log(`ae IDAA BB - [account_id] +page.ts: The account_id was not found!!!`); + // // error(404, { // // message: 'Account ID not found' // // }); - // // } - - // // ae_acct.slct.account_id = account_id; - - // // let post_id = params.post_id; - // // let post_id = page.url.searchParams.has('post_id') ?? null; - // // let post_id = page.url.searchParams.get('post_id') ?? null; - // // if (!post_id) { - // // console.log(`ae Posts - [post_id] +page.ts: The post_id was not found in the params.post_id!!!`); - // // // error(404, { + // // } + // // ae_acct.slct.account_id = account_id; + // // let post_id = params.post_id; + // // let post_id = page.url.searchParams.has('post_id') ?? null; + // // let post_id = page.url.searchParams.get('post_id') ?? null; + // // if (!post_id) { + // // console.log(`ae Posts - [post_id] +page.ts: The post_id was not found in the params.post_id!!!`); + // // // error(404, { // // // message: 'Post ID not found' // // // }); - // // } else { - // // console.log(`ae Posts - [post_id] +page.ts: post_id = `, post_id); - // // ae_acct.slct.post_id = post_id; - // // } - - // // ae_acct.slct.post_id = post_id; - - // if (browser) { - // let load_post_obj_li = posts_func.load_ae_obj_li__post({ - // api_cfg: ae_acct.api, - // for_obj_type: 'account', - // for_obj_id: account_id, - // inc_comment_li: true, - // enabled: 'enabled', - // hidden: 'not_hidden', - // limit: 29, - // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'}, - // try_cache: true, - // log_lvl: log_lvl - // }); - // if (log_lvl) { - // console.log(`load_post_obj_li = `, load_post_obj_li); - // } - // ae_acct.slct.post_obj_li = load_post_obj_li; - // } - - // // WARNING: Precaution against shared data between sites and sessions. - // data[account_id] = ae_acct; - - // return data; + // // } else { + // // console.log(`ae Posts - [post_id] +page.ts: post_id = `, post_id); + // // ae_acct.slct.post_id = post_id; + // // } + // // ae_acct.slct.post_id = post_id; + // if (browser) { + // let load_post_obj_li = posts_func.load_ae_obj_li__post({ + // api_cfg: ae_acct.api, + // for_obj_type: 'account', + // for_obj_id: account_id, + // inc_comment_li: true, + // enabled: 'enabled', + // hidden: 'not_hidden', + // limit: 29, + // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'}, + // try_cache: true, + // log_lvl: log_lvl + // }); + // if (log_lvl) { + // console.log(`load_post_obj_li = `, load_post_obj_li); + // } + // ae_acct.slct.post_obj_li = load_post_obj_li; + // } + // // WARNING: Precaution against shared data between sites and sessions. + // data[account_id] = ae_acct; + // return data; } diff --git a/src/routes/idaa/(idaa)/bb/+page.svelte b/src/routes/idaa/(idaa)/bb/+page.svelte index fbe428f8..9f30660d 100644 --- a/src/routes/idaa/(idaa)/bb/+page.svelte +++ b/src/routes/idaa/(idaa)/bb/+page.svelte @@ -1,211 +1,213 @@ - - IDAA Bulletin Board: - - Novi - {$ae_loc?.title} - + IDAA Bulletin Board: - Novi - {$ae_loc?.title} + - - + {#if $lq__post_obj_li && $lq__post_obj_li?.length} - + {:else} -

No posts available to show.

+

No posts available to show.

{/if} - diff --git a/src/routes/idaa/(idaa)/bb/+page.ts b/src/routes/idaa/(idaa)/bb/+page.ts index 81b8e52e..169fc48e 100644 --- a/src/routes/idaa/(idaa)/bb/+page.ts +++ b/src/routes/idaa/(idaa)/bb/+page.ts @@ -6,40 +6,40 @@ import { error } from '@sveltejs/kit'; import { browser } from '$app/environment'; import { posts_func } from '$lib/ae_posts/ae_posts_functions'; -export const load = (async ({ params, parent }) => { // route - let log_lvl: number = 1; +export const load = (async ({ params, parent }) => { + // route + const log_lvl: number = 1; - let data = await parent(); - data.log_lvl = log_lvl; + const data = await parent(); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; + const account_id = data.account_id; + const ae_acct = data[account_id]; - if (browser) { - let load_post_obj_li = posts_func.load_ae_obj_li__post({ - api_cfg: ae_acct.api, - for_obj_type: 'account', - for_obj_id: account_id, - // archive_on should be current datetime in ISO format - // Date().toISOString() - qry_archive_on: '2024-01-01', // (new Date()).toISOString(), - inc_comment_li: true, - enabled: 'enabled', - hidden: 'not_hidden', - limit: 19, - order_by_li: {'updated_on': 'DESC', 'created_on': 'DESC'}, - try_cache: true, - log_lvl: log_lvl - }); - if (log_lvl) { - console.log(`load_post_obj_li = `, load_post_obj_li); - } - ae_acct.slct.post_obj_li = load_post_obj_li; - } + if (browser) { + const load_post_obj_li = posts_func.load_ae_obj_li__post({ + api_cfg: ae_acct.api, + for_obj_type: 'account', + for_obj_id: account_id, + // archive_on should be current datetime in ISO format + // Date().toISOString() + qry_archive_on: '2024-01-01', // (new Date()).toISOString(), + inc_comment_li: true, + enabled: 'enabled', + hidden: 'not_hidden', + limit: 19, + order_by_li: { updated_on: 'DESC', created_on: 'DESC' }, + try_cache: true, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log(`load_post_obj_li = `, load_post_obj_li); + } + ae_acct.slct.post_obj_li = load_post_obj_li; + } - // WARNING: Precaution against shared data between sites and sessions. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and sessions. + data[account_id] = ae_acct; - return data; - -}) satisfies PageLoad; \ No newline at end of file + return data; +}) satisfies PageLoad; diff --git a/src/routes/idaa/(idaa)/bb/[post_id]/+page.svelte b/src/routes/idaa/(idaa)/bb/[post_id]/+page.svelte index ff92c9d0..7f3b600b 100644 --- a/src/routes/idaa/(idaa)/bb/[post_id]/+page.svelte +++ b/src/routes/idaa/(idaa)/bb/[post_id]/+page.svelte @@ -1,152 +1,176 @@ - - - IDAA BB: - {$lq__post_obj?.name ? ae_util.shorten_string({ string: $lq__post_obj?.name, max_length: 20, begin_length: 10, end_length: 4 }) : ''} - - Novi - {$ae_loc?.title} - + IDAA BB: + {$lq__post_obj?.name + ? ae_util.shorten_string({ + string: $lq__post_obj?.name, + max_length: 20, + begin_length: 10, + end_length: 4 + }) + : ''} + - Novi - {$ae_loc?.title} +
-

{ min-w-1/2 max-w-full " - > - - - {$lq__post_obj?.name ? $lq__post_obj?.name : 'BB Post'} -

+ > + + + {$lq__post_obj?.name ? $lq__post_obj?.name : 'BB Post'} + -
- - - - {#if $lq__post_obj?.topic_name} - {$lq__post_obj?.topic_name} - {/if} - {#if $ae_loc.trusted_access && $lq__post_obj?.hide} - Hidden - {/if} - {#if $ae_loc.administrator_access && !$lq__post_obj?.enable} - Not enabled - {/if} - -
+ > + + + {#if $lq__post_obj?.topic_name} + {$lq__post_obj?.topic_name} + {/if} + {#if $ae_loc.trusted_access && $lq__post_obj?.hide} + Hidden + {/if} + {#if $ae_loc.administrator_access && !$lq__post_obj?.enable} + Not enabled + {/if} + +
- - - Back to Posts List - - + > + Back to Posts List + + - - {#if $idaa_sess.bb.edit__post_obj} - - {:else} - - {#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $lq__post_obj?.external_person_id === $idaa_loc.novi_uuid || $lq__post_obj?.email === $idaa_loc.novi_email} - + {:else} + + {#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $lq__post_obj?.external_person_id === $idaa_loc.novi_uuid || $lq__post_obj?.email === $idaa_loc.novi_email} + - {/if} - {/if} + onclick={() => { + // $idaa_slct.post_obj = { + // ...$lq__post_obj, + // } + $idaa_sess.bb.edit__post_obj = $idaa_slct.post_id; + // if (log_lvl) { + // console.log(`Toggle edit__post_obj: ${$idaa_sess.bb.edit__post_obj}`); + // } + }} + title="Edit this BB Post" + > + + Edit Post + + {/if} + {/if}
- - {#if $idaa_sess.bb.edit__post_obj || $idaa_loc.bb.edit__post_obj} - - - + + + {:else} - + {/if} diff --git a/src/routes/idaa/(idaa)/bb/[post_id]/+page.ts b/src/routes/idaa/(idaa)/bb/[post_id]/+page.ts index e204e5f8..c628b626 100644 --- a/src/routes/idaa/(idaa)/bb/[post_id]/+page.ts +++ b/src/routes/idaa/(idaa)/bb/[post_id]/+page.ts @@ -6,48 +6,50 @@ import { error } from '@sveltejs/kit'; import { browser } from '$app/environment'; import { posts_func } from '$lib/ae_posts/ae_posts_functions'; -export const load = (async ({ params, parent }) => { // route - let log_lvl: number = 0; +export const load = (async ({ params, parent }) => { + // route + const log_lvl: number = 0; - let data = await parent(); - data.log_lvl = log_lvl; + const data = await parent(); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; + const account_id = data.account_id; + const ae_acct = data[account_id]; - let post_id = params.post_id; + const post_id = params.post_id; - ae_acct.slct.post_id = post_id; + ae_acct.slct.post_id = post_id; - if (browser) { - if (log_lvl) { - console.log(`ae_idaa_posts posts [post_id] +page.ts: post_id = `, post_id); - } - // Load post object - let load_post_obj = await posts_func.load_ae_obj_id__post({ - api_cfg: ae_acct.api, - post_id: post_id, - inc_comment_li: true, - log_lvl: log_lvl - }) - .then((results) => { - if (!results) { - error(404, { - message: 'IDAA BB - Post not found' - }); - } else { - // ae_acct.slct.post_obj = results; - } - }); + if (browser) { + if (log_lvl) { + console.log(`ae_idaa_posts posts [post_id] +page.ts: post_id = `, post_id); + } + // Load post object + const load_post_obj = await posts_func + .load_ae_obj_id__post({ + api_cfg: ae_acct.api, + post_id: post_id, + inc_comment_li: true, + log_lvl: log_lvl + }) + .then((results) => { + if (!results) { + error(404, { + message: 'IDAA BB - Post not found' + }); + } else { + // ae_acct.slct.post_obj = results; + } + }); - if (log_lvl) { - console.log(`load_post_obj = `, load_post_obj); - } - ae_acct.slct.post_obj = load_post_obj; - } + if (log_lvl) { + console.log(`load_post_obj = `, load_post_obj); + } + ae_acct.slct.post_obj = load_post_obj; + } - // WARNING: Precaution against shared data between sites. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites. + data[account_id] = ae_acct; - return data; -}) satisfies PageLoad; \ No newline at end of file + return data; +}) satisfies PageLoad; diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_comment_obj_id_edit.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_comment_obj_id_edit.svelte index d6fa5be9..07838b6e 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_comment_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_comment_obj_id_edit.svelte @@ -1,296 +1,319 @@ -
+ class:ae_create={!$idaa_slct.post_id} + bind:clientHeight={$ae_loc.iframe_height_modal_body} +> +
+ {#await prom_api__post_comment_obj} +
Saving...
+ {:then} + {#if prom_api__post_comment_obj} + + {:else} + + {/if} + {/await} - - - {#await prom_api__post_comment_obj} -
Saving...
- {:then} - {#if prom_api__post_comment_obj} - - {:else} - - {/if} - {/await} - -
- -
+ title="Cancel editing of post comment for {$idaa_slct.post_comment_obj + ?.full_name} (ID: {$idaa_slct.post_comment_obj?.post_comment_id}" + > + + Cancel Edit + +
+ - + - + -
+
+ - +

Commenter's Information

+
+ Comment as Anonymous +
+ + +
+
+ + +
+
-

Commenter's Information

-
- Comment as Anonymous -
- - -
-
- - -
-
+
+ +
-
- -
+
+ +
-
- -
+ {#if $ae_loc.trusted_access} +
+ +
+ {:else} + + {/if} +
+ - {#if $ae_loc.trusted_access} -
- -
- {:else} - - {/if} - -
- - - {#if $ae_loc.trusted_access} - + class:preset-filled-success-200-800={$idaa_loc.bb.show__admin_options} + class:preset-filled-tertiary-200-800={!$idaa_loc.bb.show__admin_options} + onclick={() => { + $idaa_loc.bb.show__admin_options = !$idaa_loc.bb.show__admin_options; + }} + > + {#if $idaa_loc.bb.show__admin_options} + + {:else} + + {/if} + {$idaa_loc.bb.show__admin_options ? 'Hide' : 'Show'} Admin + - -
+ class:hidden={!$idaa_loc.bb.show__admin_options} + > +

Admin Options

-

- Admin Options -

+ + +
+ Hide +
+ + +
+
+ + +
+
- - -
- Hide -
- - -
-
- - -
-
+
+ Priority +
+ + +
+
+ + +
+
+
-
- Priority -
- - -
-
- - -
-
-
- - - + > + - - + +
- {#if $ae_loc.administrator_access} - -
- Enable -
- - -
-
- - -
-
-
- {/if} -
+ {#if $ae_loc.administrator_access} + +
+ Enable +
+ + +
+
+ + +
+
+
+ {/if} + - +
+ + {/if} - - {/if} - - -
-
- - {#if $idaa_slct.post_comment_id} - - {:else} - + {:else} + - {/if} + > + {#await prom_api__post_comment_obj} + Saving + {:then} + Save New Comment + {/await} + + {/if} - {#if $idaa_slct.post_comment_id} - {#if $ae_loc.administrator_access} - - {:else if $ae_loc.trusted_access} - + {:else if $ae_loc.trusted_access} + - {:else} - + {:else} + - {/if} - {/if} -
+ title="Hide record to delete" + > + Delete + + {/if} + {/if} +
-
- -
- - - - + title="Cancel editing of post for {$idaa_slct.post_comment_obj.full_name} (ID: {$idaa_slct + .post_comment_obj.post_comment_id}" + > + + Cancel Edit + + + + - diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_edit.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_edit.svelte index b072d817..f87e0a44 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_edit.svelte @@ -1,333 +1,339 @@ -
+ class:ae_create={!$idaa_slct.post_id} + bind:clientHeight={$ae_loc.iframe_height_modal_body} +> +
+ {#await prom_api__post_obj} +
Saving...
+ {:then} + {#if prom_api__post_obj} + + {:else} + + {/if} + {/await} - - - {#await prom_api__post_obj} -
Saving...
- {:then} - {#if prom_api__post_obj} - - {:else} - - {/if} - {/await} - -
- -
+ title="Cancel editing of post for {$idaa_slct.post_obj.full_name} (ID: {$idaa_slct.post_obj + .post_id}" + > + + Cancel Edit + + + - + - + -
+
+ -
- -
+ placeholder="Title of Post" + /> + +
- -
- + class:preset-filled-success-200-800={$idaa_sess.bb.show__inline_edit__file_upload} + class:preset-filled-tertiary-200-800={!$idaa_sess.bb.show__inline_edit__file_upload} + onclick={() => { + $idaa_sess.bb.show__inline_edit__file_upload = + !$idaa_sess.bb.show__inline_edit__file_upload; + }} + > + + {$idaa_sess.bb.show__inline_edit__file_upload ? 'Hide' : 'Show'} File Upload + -
-
- - NOTE - This is intended for attaching something like a PDF or image to a specific post. Images will be displayed in line. PDFs will be shown with a download button. -
- {#if $ae_loc.authenticated_access} - - {#snippet label()} - -
- - Upload post files -
- - - Recommended: documents (PDF) and images (png, webp, jpg) - - - -
- {/snippet} -
- {/if} -
-
+
+
+ + NOTE - This is intended for attaching something like a PDF or image to a specific post. Images + will be displayed in line. PDFs will be shown with a download button. +
+ {#if $ae_loc.authenticated_access} + + {#snippet label()} + +
+ + Upload post files +
+ + + Recommended: documents (PDF) and images (png, webp, jpg) + + + +
+ {/snippet} +
+ {/if} +
+
- {#if $idaa_slct.post_obj?.linked_li_json && $idaa_slct.post_obj.linked_li_json.length} -
- - Linked files: - {#each $idaa_slct.post_obj.linked_li_json as linked_obj, index} - - - {#if $ae_loc.authenticated_access && linked_obj?.hosted_file_id_random} - + + {ae_util.shorten_filename({ filename: linked_obj?.filename, max_length: 30 })} + + - - {/if} + title="Delete this file" + > + + + Delete + + {/if} + + {/each} +
+ {/if} - - {/each} - - {/if} - - -
- -
+ bind:value={$idaa_slct.post_obj.topic_id} + > + + + + + + + + + + +

Poster's Information

+
+ Post as "Anonymous"? +
+ + +
+
+ + +
+
-

Poster's Information

-
- Post as "Anonymous"? -
- - -
-
- - -
-
- -
- -
+ /> + {:else} +
+ Primary link using the Novi API UUID. This must be empty, a staff person, or an active + member of IDAA and should be the primary contact for this meeting. +
+ + + {/if} + + -
- -
+
+ +
- {#if $ae_loc.trusted_access} -
- -
- {:else} - - {/if} + {#if $ae_loc.trusted_access} +
+ +
+ {:else} + + {/if} - -
- - Notify me of comments? - -
- - -
-
- - -
-
+ +
+ + Notify me of comments? + +
+ + +
+
+ + +
+
+ + - - - - {#if $ae_loc.trusted_access} - + class:preset-filled-success-200-800={$idaa_loc.bb.show__admin_options} + class:preset-filled-tertiary-200-800={!$idaa_loc.bb.show__admin_options} + onclick={() => { + $idaa_loc.bb.show__admin_options = !$idaa_loc.bb.show__admin_options; + }} + > + {#if $idaa_loc.bb.show__admin_options} + + {:else} + + {/if} + {$idaa_loc.bb.show__admin_options ? 'Hide' : 'Show'} Admin + - -
+ class:hidden={!$idaa_loc.bb.show__admin_options} + > +

Admin Options

-

- Admin Options -

+ + +
+ Hide +
+ + +
+
+ + +
+
- - -
- Hide -
- - -
-
- - -
-
+
+ Priority +
+ + +
+
+ + +
+
+
-
- Priority -
- - -
-
- - -
-
-
- - - + > + - - + +
- {#if $ae_loc.administrator_access} - -
- Enable -
- - -
-
- - -
-
-
- {:else} - - {/if} -
+ {#if $ae_loc.administrator_access} + +
+ Enable +
+ + +
+
+ + +
+
+
+ {:else} + + {/if} + - {#if $ae_loc.trusted_access} - - {/if} + {#if $ae_loc.trusted_access} + + {/if} +
+ + {/if} - - {/if} - - -
-
- - {#if $idaa_slct.post_id} - - {:else} - + {:else} + - {/if} + > + {#await prom_api__post_obj} + Saving + {:then} + Save New Post + {/await} + + {/if} - {#if $idaa_slct.post_id} - {#if $ae_loc.administrator_access} - - {:else if $ae_loc.trusted_access} - + {:else if $ae_loc.trusted_access} + - {:else} - + {:else} + - {/if} - {/if} -
+ title="Hide record to delete" + > + Delete + + {/if} + {/if} +
-
- -
- - -
- + title="Cancel editing of post for {$idaa_slct.post_obj.full_name} (ID: {$idaa_slct + .post_obj.post_id}" + > + + Cancel Edit + + + +
- diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte index 387898fa..a1995724 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_id_view.svelte @@ -1,110 +1,115 @@ -
- - - -
+
+ - +
+ {@html $lq__post_obj?.content} +
-
{@html $lq__post_obj?.content}
- - {#if $lq__post_obj?.linked_li_json && $lq__post_obj?.linked_li_json.length} -
- - Linked files: - {#each $lq__post_obj.linked_li_json as linked_obj, index} - - {#if $ae_loc.authenticated_access && linked_obj?.hosted_file_id_random} - {#if linked_obj.extension === 'png' || linked_obj.extension === 'jpg' || linked_obj.extension === 'jpeg' || linked_obj.extension === 'gif' || linked_obj.extension === 'webp' || linked_obj.extension === 'svg'} -
- {linked_obj.filename} - -
- {:else} -
+ {:else} + - {/if} - {/if} + + {ae_util.shorten_filename({ filename: linked_obj?.filename, max_length: 30 })} + + + {/if} + {/if} + {/each} +
+ {/if} +
+ + + {#if $idaa_sess.bb.show__inline_edit__post_comment_id === true} + + {/if} -{#if $idaa_sess.bb.show__inline_edit__post_comment_id === true} - -{/if} + {#if $lq__post_comment_obj_li?.length} +
+ {#each $lq__post_comment_obj_li as post_comment_obj, index} +
+ {#if $idaa_sess.bb.show__inline_edit__post_comment_id == post_comment_obj.post_comment_id} + {$lq__post_comment_obj_li.length ?? 'unknown???'} + + {:else} +
+
{@html post_comment_obj.content}
+
-{#if $lq__post_comment_obj_li?.length} -
-{#each $lq__post_comment_obj_li as post_comment_obj, index} +
+
+ + Comment by: + {#if post_comment_obj.anonymous} + + Anonymous + {:else} + + {post_comment_obj.full_name} + {/if} + + + {#if !post_comment_obj.updated_on || $ae_loc.edit_mode} + Created on: + {ae_util.iso_datetime_formatter( + post_comment_obj.created_on, + 'datetime_12_short' + )} + {/if} + {#if post_comment_obj.updated_on} + Updated on: + {ae_util.iso_datetime_formatter( + post_comment_obj.updated_on, + 'datetime_12_short' + )} + {/if} + +
-
+ {#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || post_comment_obj.external_person_id === $idaa_loc.novi_uuid} +
+ -
- {/if} - -
- {/if} - -
- -{/each} + title="Edit comment by {post_comment_obj?.full_name} (for post ID {$lq__post_obj?.id})" + > + + Edit Comment + + + {/if} +
+ {/if} + + {/each} +
+ {/if} -{/if} - - - diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte index ac88d4b8..6610cdd7 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_obj_li.svelte @@ -1,143 +1,177 @@ -
-{#if $lq__post_obj_li && $lq__post_obj_li.length} + {#if $lq__post_obj_li && $lq__post_obj_li.length} + {#each $lq__post_obj_li as idaa_post_obj, index} + {#if idaa_post_obj} + +
+
+

+ + + {@html idaa_post_obj.title} + + {#if idaa_post_obj.topic_name} {idaa_post_obj.topic_name}{/if} +

+
-{#each $lq__post_obj_li as idaa_post_obj, index} + + + {#if idaa_post_obj.content} +
+ {@html idaa_post_obj.content} + +
+
+ {/if} - {#if idaa_post_obj} -
- -
-

- - - {@html idaa_post_obj.title} - - {#if idaa_post_obj.topic_name} {idaa_post_obj.topic_name}{/if} -

-
- - - - {#if idaa_post_obj.content} -
- {@html idaa_post_obj.content} - -
-
- {/if} - - + {#if idaa_post_obj?.linked_li_json?.length} + + + {idaa_post_obj?.linked_li_json?.length} + {idaa_post_obj?.linked_li_json?.length == 1 ? ' file' : ' files'} + + {/if} + +
- - {/if} - -{/each} - -{:else} - No posts found at this time -{/if} + {#if idaa_post_obj.created_on} +
+ {#if !idaa_post_obj.updated_on} + + Created on: + {ae_util.iso_datetime_formatter( + idaa_post_obj.created_on, + 'datetime_12_short' + )} + + {:else} + + Updated on: + {ae_util.iso_datetime_formatter( + idaa_post_obj.updated_on, + 'datetime_12_short' + )} + + {/if} + {#if idaa_post_obj.archive_on} + + Archive on: + {ae_util.iso_datetime_formatter( + idaa_post_obj.archive_on, + 'datetime_12_short' + )} + + {/if} +
+ {/if} + +
+ + {/if} + {/each} + {:else} + No posts found at this time + {/if}
diff --git a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_options.svelte b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_options.svelte index f0b13751..e61fb4ad 100644 --- a/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_options.svelte +++ b/src/routes/idaa/(idaa)/bb/ae_idaa_comp__post_options.svelte @@ -1,39 +1,44 @@ -
- -
- - - + > + + + + + + + + + + + - {#if $ae_loc.trusted_access && (!$idaa_loc.bb.qry__hidden || $idaa_loc.bb.qry__hidden == 'not_hidden')} - - {:else if $ae_loc.trusted_access && $idaa_loc.bb.qry__hidden != 'not_hidden'} - + {:else if $ae_loc.trusted_access && $idaa_loc.bb.qry__hidden != 'not_hidden'} + - {/if} + > + Hide Hidden Posts + + {/if} - {#if $ae_loc.administrator_access && (!$idaa_loc.bb.qry__enabled || $idaa_loc.bb.qry__enabled == 'enabled')} - - {:else if $ae_loc.administrator_access && $idaa_loc.bb.qry__enabled != 'enabled'} - + {:else if $ae_loc.administrator_access && $idaa_loc.bb.qry__enabled != 'enabled'} + - {/if} + > + Hide Disabled Posts + + {/if} - {#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $idaa_loc.novi_uuid} - - {/if} + title="Create new post" + > + Create New Post + + {/if} +
-
- - - - - + + + diff --git a/src/routes/idaa/(idaa)/hold_app.pcss b/src/routes/idaa/(idaa)/hold_app.pcss index e8ff4f8a..73c329d7 100644 --- a/src/routes/idaa/(idaa)/hold_app.pcss +++ b/src/routes/idaa/(idaa)/hold_app.pcss @@ -3,72 +3,72 @@ /* @tailwind base; */ :root { - font-family: system-ui, Helvetica, Arial, sans-serif; - /* line-height: 1.5; */ - /* font-weight: 400; */ + font-family: system-ui, Helvetica, Arial, sans-serif; + /* line-height: 1.5; */ + /* font-weight: 400; */ - color-scheme: light dark; - /* color: rgba(255, 255, 255, 0.87); */ - /* background-color: #242424; */ + color-scheme: light dark; + /* color: rgba(255, 255, 255, 0.87); */ + /* background-color: #242424; */ - /* font-synthesis: none; */ - /* text-rendering: optimizeLegibility; */ - /* -webkit-font-smoothing: antialiased; */ - /* -moz-osx-font-smoothing: grayscale; */ - /* -webkit-text-size-adjust: 100%; */ + /* font-synthesis: none; */ + /* text-rendering: optimizeLegibility; */ + /* -webkit-font-smoothing: antialiased; */ + /* -moz-osx-font-smoothing: grayscale; */ + /* -webkit-text-size-adjust: 100%; */ } body { - /* margin: 0; */ - /* display: flex; + /* margin: 0; */ + /* display: flex; place-items: center; */ - /* min-width: 320px; */ + /* min-width: 320px; */ - min-height: 100vh; - /* min-height: fit-content; */ - /* height: 100%; */ + min-height: 100vh; + /* min-height: fit-content; */ + /* height: 100%; */ - min-width: 100vw; - /* width: 100%; */ + min-width: 100vw; + /* width: 100%; */ - /* contain: layout; */ - /* contain: size; */ + /* contain: layout; */ + /* contain: size; */ } address { - margin-bottom: 0.25em; - padding-left: 0.5em; - font-style: italic; + margin-bottom: 0.25em; + padding-left: 0.5em; + font-style: italic; } pre { - white-space: pre-wrap; - word-break: normal; - word-wrap: normal; + white-space: pre-wrap; + word-break: normal; + word-wrap: normal; - border: none; + border: none; } textarea { - /* width: calc(fit-content - 1em); */ - width: 100%; - max-width: calc(fit-content - 0.5em); + /* width: calc(fit-content - 1em); */ + width: 100%; + max-width: calc(fit-content - 0.5em); } button.ae_normal, .btn.ae_normal { - /* font: normal 1em sans-serif; */ - font-size: 1rem; + /* font: normal 1em sans-serif; */ + font-size: 1rem; } button.ae_smaller, .btn.ae_smaller { - font-size: 0.8rem; + font-size: 0.8rem; } button.ae_smallest, .btn.ae_smallest { - font-size: 0.65rem; + font-size: 0.65rem; } /* h1 { @@ -127,264 +127,263 @@ button:focus-visible { .ae_btn.btn-danger, .ae_btn.btn-info, .ae_btn.btn-warning { - border-radius: 60px; + border-radius: 60px; } /* END: Novi and Bootstrap specific fixes */ .ae_main { - /* min-height: fit-content; */ - /* min-height: 100vh; */ - /* height: 100%; */ + /* min-height: fit-content; */ + /* min-height: 100vh; */ + /* height: 100%; */ - /* min-width: 100vw; */ - /* width: 100%; */ + /* min-width: 100vw; */ + /* width: 100%; */ - /* contain: layout; */ - /* contain: content; */ - /* contain: size; */ + /* contain: layout; */ + /* contain: content; */ + /* contain: size; */ } .ae_dev_in_progress { - background-color: hsla(300, 80%, 50%, 1); + background-color: hsla(300, 80%, 50%, 1); } .c_idaa_bb, .c_idaa_recovery_meetings { - display: flex; - flex-direction: column; - /* align-items: center; */ - /* justify-content: center; */ - /* min-height: 100vh; */ + display: flex; + flex-direction: column; + /* align-items: center; */ + /* justify-content: center; */ + /* min-height: 100vh; */ - gap: 1em; + gap: 1em; } .c_idaa_archives > .ae_meta, .c_idaa_bb > .ae_meta, .c_idaa_recovery_meetings > .ae_meta { - background-color: lightgray; + background-color: lightgray; } .ae_list.archive_obj_li { - /* border: solid thin gray; */ + /* border: solid thin gray; */ - display: flex; - flex-direction: column; - /* align-items: stretch; */ - /* justify-content: stretch; */ - gap: 0.5em; + display: flex; + flex-direction: column; + /* align-items: stretch; */ + /* justify-content: stretch; */ + gap: 0.5em; } .ae_list.archive_obj_li .ae_object.archive_obj, .ae_list.archive_content_obj_li .ae_object.archive_content_obj { - border-top: solid medium hsla(0, 0%, 90%, 1); - /* border-bottom: solid thin hsla(0,0%,90%,1); */ - /* margin: 1em .5em; */ - padding: 0.5em 0.5em; + border-top: solid medium hsla(0, 0%, 90%, 1); + /* border-bottom: solid thin hsla(0,0%,90%,1); */ + /* margin: 1em .5em; */ + padding: 0.5em 0.5em; - width: 100%; + width: 100%; - /* grow: 1; */ + /* grow: 1; */ } .c_idaa_recovery_meetings section.ae_options fieldset { - display: flex; - flex-direction: row; + display: flex; + flex-direction: row; } .c_idaa_recovery_meetings section.ae_options fieldset legend { - display: inline; - /* border: none; */ - margin: 0; + display: inline; + /* border: none; */ + margin: 0; - width: auto; + width: auto; } .ae_list.event_obj_li { - /* border: solid thin gray; */ + /* border: solid thin gray; */ - display: flex; - flex-direction: column; - /* align-items: stretch; */ - /* justify-content: stretch; */ - gap: 0.5em; + display: flex; + flex-direction: column; + /* align-items: stretch; */ + /* justify-content: stretch; */ + gap: 0.5em; } .ae_list.event_obj_li .ae_object.event_obj { - border-top: solid medium hsla(0, 0%, 90%, 1); - /* border-bottom: solid thin hsla(0,0%,90%,1); */ - /* margin: 1em .5em; */ - padding: 0.5em 0.5em; + border-top: solid medium hsla(0, 0%, 90%, 1); + /* border-bottom: solid thin hsla(0,0%,90%,1); */ + /* margin: 1em .5em; */ + padding: 0.5em 0.5em; - width: 100%; + width: 100%; - /* grow: 1; */ + /* grow: 1; */ } /* For now this only affects the IDAA Recovery Meetings when viewing a specific meeting. */ .view__event_obj a, .view__event_obj a.ae_link { - /* color: #007bff; */ - color: #82b6e1; - /* text-decoration: underline; */ - /* background-color: transparent; */ + /* color: #007bff; */ + color: #82b6e1; + /* text-decoration: underline; */ + /* background-color: transparent; */ } .view__event_obj a:hover, .view__event_obj a:focus, .view__event_obj a.ae_link:hover, .view__event_obj a.ae_link:focus { - color: #0056b3; - text-decoration: underline; - /* background-color: transparent; */ + color: #0056b3; + text-decoration: underline; + /* background-color: transparent; */ - /* scale: 1.1; */ + /* scale: 1.1; */ } .svelte_component { - margin: 0em; - padding: 0em; + margin: 0em; + padding: 0em; } .ae_section { - display: flex; - flex-direction: column; + display: flex; + flex-direction: column; } .ae_warning { - color: red; + color: red; } .ae_highlight { - background-color: hsla(60, 100%, 50%, 1); + background-color: hsla(60, 100%, 50%, 1); } .ae_d_none, .d-none { - display: none; + display: none; } .ae_group { - /* display: flex; */ - /* flex-direction: row; */ - /* align-items: center; */ - /* justify-content: space-between; */ - /* justify-content: space-evenly; */ + /* display: flex; */ + /* flex-direction: row; */ + /* align-items: center; */ + /* justify-content: space-between; */ + /* justify-content: space-evenly; */ } .ae_column { - display: flex; - flex-direction: column; - /* align-items: center; */ - /* justify-content: space-between; */ - justify-content: space-evenly; + display: flex; + flex-direction: column; + /* align-items: center; */ + /* justify-content: space-between; */ + justify-content: space-evenly; } .ae_row { - display: flex; - flex-direction: row; + display: flex; + flex-direction: row; - align-items: center; - /* justify-content: space-between; */ - justify-content: space-evenly; + align-items: center; + /* justify-content: space-between; */ + justify-content: space-evenly; } .ae_flex_justify_around { - justify-content: space-around; + justify-content: space-around; } .ae_flex_justify_center { - justify-content: center; + justify-content: center; } - .ae_width_25 { - width: 25%; - /* max-width: 25%; */ + width: 25%; + /* max-width: 25%; */ } .ae_width_30 { - width: 30%; - /* max-width: 30%; */ + width: 30%; + /* max-width: 30%; */ } .ae_width_50 { - width: 50%; - /* max-width: 50%; */ + width: 50%; + /* max-width: 50%; */ } .ae_width_100 { - width: 100%; - /* max-width: 100%; */ + width: 100%; + /* max-width: 100%; */ } .ae_width_md { - min-width: 16em; - width: 16em; - max-width: 16em; + min-width: 16em; + width: 16em; + max-width: 16em; } .ae_width_lg { - min-width: 20em; - width: 22em; - max-width: 24em; + min-width: 20em; + width: 22em; + max-width: 24em; } .ae_margin_xs { - margin: 0.25em; + margin: 0.25em; } .ae_margin_sm { - margin: 0.5em; + margin: 0.5em; } .ae_margin_md { - margin: 0.75em; + margin: 0.75em; } .ae_margin_lg { - margin: 1em; + margin: 1em; } .ae_margin_lg { - margin: 1.25em; + margin: 1.25em; } .ae_padding_md { - padding: 0.75em; + padding: 0.75em; } .ae_float_right { - float: right; - align-self: flex-end; + float: right; + align-self: flex-end; } .ae_options { - padding: 1em; + padding: 1em; } .ae_fade_in { - /* animation: fadein 1s; */ - opacity: 1; - /* height: initial; */ - /* max-height: 100%; */ - /* width: initial; */ - /* max-width: 100%; */ - transition: - opacity, - height, - width, - 0.25s ease-in; + /* animation: fadein 1s; */ + opacity: 1; + /* height: initial; */ + /* max-height: 100%; */ + /* width: initial; */ + /* max-width: 100%; */ + transition: + opacity, + height, + width, + 0.25s ease-in; - /* transition: height 1s ease-in; */ - /* width: initial; */ - /* transition: opacity, height, width 1s ease-in 1s; */ + /* transition: height 1s ease-in; */ + /* width: initial; */ + /* transition: opacity, height, width 1s ease-in 1s; */ } .ae_fade_out { - /* animation: fadeout 1s; */ - opacity: 0; - height: 0; - max-height: 0; - width: 0; - max-width: 0; - transition: - opacity, - height, - width, - 0.25s ease-out; + /* animation: fadeout 1s; */ + opacity: 0; + height: 0; + max-height: 0; + width: 0; + max-width: 0; + transition: + opacity, + height, + width, + 0.25s ease-out; } /* .ae_section.ae_options { @@ -401,133 +400,133 @@ button:focus-visible { } */ .ae_section.ae_meta { - font-size: smaller; - color: hsla(0, 0%, 50%, 1); + font-size: smaller; + color: hsla(0, 0%, 50%, 1); } .svelte_component.ae_edit { - /* outline: dashed thin pink; */ - border: solid medium hsla(220, 100%, 50%, 0.1); + /* outline: dashed thin pink; */ + border: solid medium hsla(220, 100%, 50%, 0.1); } .svelte_component.ae_create { - border: solid medium hsla(0, 100%, 50%, 0.1); + border: solid medium hsla(0, 100%, 50%, 0.1); } /* element_ae_modal ae_modal_showing_container ae_modal modal_cover_body */ .ae_modal { - position: fixed; - top: 0; - left: 0; - z-index: 1000; + position: fixed; + top: 0; + left: 0; + z-index: 1000; - min-height: 100vh; - height: 100%; - /* max-height: 100vh; */ + min-height: 100vh; + height: 100%; + /* max-height: 100vh; */ - min-width: 100vw; - width: 100%; - max-width: 100vw; + min-width: 100vw; + width: 100%; + max-width: 100vw; - /* background-color: hsla(180,75%,90%,.75); */ - background-color: hsla(180, 0%, 90%, 0.75); + /* background-color: hsla(180,75%,90%,.75); */ + background-color: hsla(180, 0%, 90%, 0.75); - display: flex; - flex-direction: column; + display: flex; + flex-direction: column; - align-items: center; - /* align-items: flex-start; */ - /* justify-content: center; */ - /* justify-content: flex-start; */ + align-items: center; + /* align-items: flex-start; */ + /* justify-content: center; */ + /* justify-content: flex-start; */ - /* contain: layout; */ - contain: strict; - /* contain: size; */ + /* contain: layout; */ + contain: strict; + /* contain: size; */ - /* Margin should stay 0 and padding can be used to create space within the modal for the actual content. */ - margin: 0; - padding: 1em; + /* Margin should stay 0 and padding can be used to create space within the modal for the actual content. */ + margin: 0; + padding: 1em; - /* pointer-events: auto; */ + /* pointer-events: auto; */ } .ae_modal .modal_content { - z-index: 1001; - position: relative; + z-index: 1001; + position: relative; - box-sizing: content-box; + box-sizing: content-box; - background-color: white; - /* margin: 1em; + background-color: white; + /* margin: 1em; padding: .25em .5em; */ - margin: 0em; - padding: 0em; + margin: 0em; + padding: 0em; - border: solid thin lightgray; - border-radius: 0.5em; + border: solid thin lightgray; + border-radius: 0.5em; - /* box-shadow: .5em .5em 1.5em .5em hsla(0, 0%, 0%, .9); */ - box-shadow: 0em 0em 1.5em 0.5em hsla(0, 0%, 0%, 0.9); + /* box-shadow: .5em .5em 1.5em .5em hsla(0, 0%, 0%, .9); */ + box-shadow: 0em 0em 1.5em 0.5em hsla(0, 0%, 0%, 0.9); - /* min-height: 50vh; */ - max-height: calc(100vh - 2em); - /* max-height: fit-content; */ + /* min-height: 50vh; */ + max-height: calc(100vh - 2em); + /* max-height: fit-content; */ - /* min-width: 50vw; */ - max-width: calc(100vw - 2em); - /* max-width: 100vw; */ + /* min-width: 50vw; */ + max-width: calc(100vw - 2em); + /* max-width: 100vw; */ - /* scroll-behavior: auto; */ - /* overflow: scroll; */ - /* overflow: auto; */ - /* contain: content; */ - /* contain: strict; */ - /* overflow: auto; */ + /* scroll-behavior: auto; */ + /* overflow: scroll; */ + /* overflow: auto; */ + /* contain: content; */ + /* contain: strict; */ + /* overflow: auto; */ - display: flex; - flex-direction: column; - align-items: stretch; + display: flex; + flex-direction: column; + align-items: stretch; } .ae_modal .modal_header { - background-color: hsla(0, 0%, 90%, 0.5); - border-bottom: solid thin lightgray; + background-color: hsla(0, 0%, 90%, 0.5); + border-bottom: solid thin lightgray; - margin: 0em; - padding: 0.25em 0.25em; + margin: 0em; + padding: 0.25em 0.25em; - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; } .ae_modal .modal_body { - /* outline: dashed medium pink; */ + /* outline: dashed medium pink; */ - margin: 0em; - padding: 0.25em 0.25em; + margin: 0em; + padding: 0.25em 0.25em; - /* height: 100vh; */ + /* height: 100vh; */ - /* contain: content; */ - /* pointer-events: auto; */ - overflow: scroll; - /* overflow-x: auto; */ - /* overflow-y: scroll; */ + /* contain: content; */ + /* pointer-events: auto; */ + overflow: scroll; + /* overflow-x: auto; */ + /* overflow-y: scroll; */ } .ae_modal .modal_footer { - background-color: hsla(0, 0%, 90%, 0.5); - border-top: solid thin lightgray; + background-color: hsla(0, 0%, 90%, 0.5); + border-top: solid thin lightgray; - margin: 0em; - padding: 0.25em 0.25em; + margin: 0em; + padding: 0.25em 0.25em; - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; } /* body.modal_cover_body { @@ -538,50 +537,50 @@ button:focus-visible { } */ body.modal_cover_body .ae_modal { - margin: 0em; - padding: 0em; - /* max-width: 100vw; */ + margin: 0em; + padding: 0em; + /* max-width: 100vw; */ - align-items: stretch; + align-items: stretch; } body.modal_cover_body .ae_modal .modal_content { - /* outline: dashed thin pink; */ + /* outline: dashed thin pink; */ - border: none; - border-radius: 0; + border: none; + border-radius: 0; - box-shadow: none; + box-shadow: none; - max-height: calc(100vh - 0.5em); + max-height: calc(100vh - 0.5em); - max-width: calc(100vw); + max-width: calc(100vw); } body.modal_cover_body .ae_modal .modal_body { - /* outline: dashed medium pink; */ + /* outline: dashed medium pink; */ } form { - display: flex; - flex-direction: column; - /* justify-content: flex-start; */ - /* align-items: center; */ + display: flex; + flex-direction: column; + /* justify-content: flex-start; */ + /* align-items: center; */ - padding: 0.75em; + padding: 0.75em; } form fieldset { - display: flex; - flex-direction: column; - /* justify-content: flex-start; */ - /* align-items: center; */ + display: flex; + flex-direction: column; + /* justify-content: flex-start; */ + /* align-items: center; */ } /* Make readonly input fields grayed out and hide border*/ form input:read-only { - /* background-color: hsla(0,0%,90%,1); */ - border: none; + /* background-color: hsla(0,0%,90%,1); */ + border: none; } /* @tailwind components; */ @tailwind utilities; diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+layout.svelte b/src/routes/idaa/(idaa)/recovery_meetings/+layout.svelte index 15e3c842..d6004d86 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/+layout.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/+layout.svelte @@ -1,89 +1,95 @@ - {@render children?.()} diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts b/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts index 67c4ffca..96ed40d4 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts +++ b/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts @@ -5,46 +5,53 @@ import { browser } from '$app/environment'; import { events_func } from '$lib/ae_events_functions'; -export async function load({ params, parent }) { // route - let log_lvl: number = 0; +export async function load({ params, parent }) { + // route + const log_lvl: number = 0; - let data = await parent(); - data.log_lvl = log_lvl; + const data = await parent(); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; - // console.log(`ae_acct = `, ae_acct); + const account_id = data.account_id; + const ae_acct = data[account_id]; + // console.log(`ae_acct = `, ae_acct); - // if (!account_id) { - // console.log(`ae IDAA Recovery Meetings - [account_id] +page.ts: The account_id was not found!!!`); - // error(404, { + // if (!account_id) { + // console.log(`ae IDAA Recovery Meetings - [account_id] +page.ts: The account_id was not found!!!`); + // error(404, { // message: 'Account ID not found' // }); - // } + // } - // ae_acct.slct.account_id = account_id; + // ae_acct.slct.account_id = account_id; - if (browser) { - let load_event_obj_li = events_func.load_ae_obj_li__event({ - api_cfg: ae_acct.api, - for_obj_type: 'account', - for_obj_id: account_id, - qry_conference: false, - hidden: 'not_hidden', // 'not_hidden' - enabled: 'enabled', - order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'}, - limit: 199, - try_cache: true, - log_lvl: log_lvl - }); - if (log_lvl) { - console.log(`load_event_obj_li = `, load_event_obj_li); - } - ae_acct.slct.event_obj_li = load_event_obj_li; - } + if (browser) { + const load_event_obj_li = events_func.load_ae_obj_li__event({ + api_cfg: ae_acct.api, + for_obj_type: 'account', + for_obj_id: account_id, + qry_conference: false, + hidden: 'not_hidden', // 'not_hidden' + enabled: 'enabled', + order_by_li: { + priority: 'DESC', + sort: 'DESC', + updated_on: 'DESC', + created_on: 'DESC', + name: 'ASC' + }, + limit: 199, + try_cache: true, + log_lvl: log_lvl + }); + if (log_lvl) { + console.log(`load_event_obj_li = `, load_event_obj_li); + } + ae_acct.slct.event_obj_li = load_event_obj_li; + } - // WARNING: Precaution against shared data between sites and sessions. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and sessions. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte b/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte index 70e79567..216cdd9b 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte @@ -1,491 +1,492 @@ - - IDAA Recovery Meetings - - Novi - {$ae_loc?.title} - + IDAA Recovery Meetings - Novi - {$ae_loc?.title} + - - + + show_edit_btn={true} +/> {#if Array.isArray(event_id_random_li) && event_id_random_li.length} - + {:else} -
- {#if $idaa_sess.recovery_meetings.qry__status === 'loading'} -
- - Loading... -
- {:else} -
- No recovery meetings available to show. The search may need to be changed. - {$idaa_sess.recovery_meetings.qry__status ?? 'Unknown Query Status'} -
- {/if} -
+
+ {#if $idaa_sess.recovery_meetings.qry__status === 'loading'} +
+ + Loading... +
+ {:else} +
+ No recovery meetings available to show. The search may need to be changed. + {$idaa_sess.recovery_meetings.qry__status ?? 'Unknown Query Status'} +
+ {/if} +
{/if} diff --git a/src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.svelte b/src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.svelte index a02576ce..d2fcabf1 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.svelte @@ -1,106 +1,120 @@ - - IDAA Recovery Mtgs: - {$lq__event_obj?.name ? ae_util.shorten_string({ string: $lq__event_obj?.name, max_length: 20, begin_length: 10, end_length: 4 }) : ''} - - Novi - {$ae_loc?.title} - + IDAA Recovery Mtgs: + {$lq__event_obj?.name + ? ae_util.shorten_string({ + string: $lq__event_obj?.name, + max_length: 20, + begin_length: 10, + end_length: 4 + }) + : ''} + - Novi - {$ae_loc?.title} +
-

{ min-w-1/2 max-w-full " - > - - - {$lq__event_obj?.name ? $lq__event_obj?.name : 'Recovery Meeting'} -

+ > + + + {$lq__event_obj?.name ? $lq__event_obj?.name : 'Recovery Meeting'} + -
- {#if $lq__event_obj?.status == 'unknown'} - - - Not Confirmed by IDAA - - - - {/if} + > + {#if $lq__event_obj?.status == 'unknown'} + + + Not Confirmed by IDAA + + + + {/if} - - - {#if $lq__event_obj?.physical && $lq__event_obj?.virtual} - F2F and Virtual - {:else if $lq__event_obj?.physical} - F2F - {:else if $lq__event_obj?.virtual} - Virtual - {/if} - - {#if $lq__event_obj?.type} - {$lq__event_obj?.type} - {/if} - {#if $ae_loc.trusted_access && $lq__event_obj?.hide} - Hidden - {/if} - {#if $ae_loc.administrator_access && !$lq__event_obj?.enable} - Not enabled - {/if} - -
+ + + {#if $lq__event_obj?.physical && $lq__event_obj?.virtual} + F2F and Virtual + {:else if $lq__event_obj?.physical} + F2F + {:else if $lq__event_obj?.virtual} + Virtual + {/if} + + {#if $lq__event_obj?.type} + {$lq__event_obj?.type} + {/if} + {#if $ae_loc.trusted_access && $lq__event_obj?.hide} + Hidden + {/if} + {#if $ae_loc.administrator_access && !$lq__event_obj?.enable} + Not enabled + {/if} + +
- - +
- - - Back to Meeting List - - + > + Back to Meeting List + + - - {#if $idaa_sess.recovery_meetings.edit__event_obj} - - {:else} - - {#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $lq__event_obj?.external_person_id === $idaa_loc.novi_uuid || $lq__event_obj?.contact_li_json[0].email === $idaa_loc.novi_email} - + {:else} + + {#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $lq__event_obj?.external_person_id === $idaa_loc.novi_uuid || $lq__event_obj?.contact_li_json[0].email === $idaa_loc.novi_email} + - {/if} - {/if} + onclick={() => { + $idaa_sess.recovery_meetings.edit__event_obj = $idaa_slct.event_id; + if (log_lvl) { + console.log(`Toggle edit__event_obj: ${$idaa_sess.recovery_meetings.edit__event_obj}`); + } + }} + title="Edit this Recovery Meeting" + > + + Edit Meeting + + {/if} + {/if}
{#if $idaa_sess.recovery_meetings.edit__event_obj || $idaa_loc.recovery_meetings.edit__event_obj} - + {:else} - + {/if} diff --git a/src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.ts b/src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.ts index ef129611..89cf1444 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.ts +++ b/src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.ts @@ -6,47 +6,49 @@ import { error } from '@sveltejs/kit'; import { browser } from '$app/environment'; import { events_func } from '$lib/ae_events_functions'; -export const load = (async ({ params, parent }) => { // route - let log_lvl: number = 0; +export const load = (async ({ params, parent }) => { + // route + const log_lvl: number = 0; - let data = await parent(); - data.log_lvl = log_lvl; + const data = await parent(); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; + const account_id = data.account_id; + const ae_acct = data[account_id]; - let event_id = params.event_id; + const event_id = params.event_id; - ae_acct.slct.event_id = event_id; + ae_acct.slct.event_id = event_id; - if (browser) { - if (log_lvl) { - console.log(`ae_idaa_events events [event_id] +page.ts: event_id = `, event_id); - } - // Load event object - let load_event_obj = await events_func.load_ae_obj_id__event({ - api_cfg: ae_acct.api, - event_id: event_id, - log_lvl: log_lvl - }) - .then((results) => { - if (!results) { - error(404, { - message: 'IDAA Recovery Meetings - Event not found' - }); - } else { - // ae_acct.slct.event_obj = results; - } - }); + if (browser) { + if (log_lvl) { + console.log(`ae_idaa_events events [event_id] +page.ts: event_id = `, event_id); + } + // Load event object + const load_event_obj = await events_func + .load_ae_obj_id__event({ + api_cfg: ae_acct.api, + event_id: event_id, + log_lvl: log_lvl + }) + .then((results) => { + if (!results) { + error(404, { + message: 'IDAA Recovery Meetings - Event not found' + }); + } else { + // ae_acct.slct.event_obj = results; + } + }); - if (log_lvl) { - console.log(`load_event_obj = `, load_event_obj); - } - ae_acct.slct.event_obj = load_event_obj; - } + if (log_lvl) { + console.log(`load_event_obj = `, load_event_obj); + } + ae_acct.slct.event_obj = load_event_obj; + } - // WARNING: Precaution against shared data between sites and presentations. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites and presentations. + data[account_id] = ae_acct; - return data; -}) satisfies PageLoad; \ No newline at end of file + return data; +}) satisfies PageLoad; diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte index ff4803c5..fad169b6 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte @@ -1,692 +1,742 @@ -
+ class:ae_create={!$idaa_slct.event_id} + bind:clientHeight={$ae_loc.iframe_height_modal_body} +> +
+ {#await prom_api__event_obj} +
Saving...
+ {:then} + {#if prom_api__event_obj} + + {:else} + + {/if} + {/await} - +
+ + {#if $idaa_slct.event_id} + + {/if} +
+ - {#await prom_api__event_obj} -
Saving...
- {:then} - {#if prom_api__event_obj} - - {:else} - - {/if} - {/await} + -
- {#if $idaa_slct.event_id} - - {/if} -
+ - +
+ - - -
- -
- -
+ /> + +
- - -
- -
    -
  • IDAA - Open to IDAA members only
  • -
  • Caduceus - Open to all healthcare workers including those who do not qualify for IDAA
  • -
  • Family Recovery - Open to spouses, parents, and adult children of medical professionals who have substance use disorder. -
  • -
-
+ > + + + + + +
    +
  • IDAA - Open to IDAA members only
  • +
  • + Caduceus - Open to all healthcare workers including those who do not qualify + for IDAA +
  • +
  • + Family Recovery - Open to spouses, parents, and adult children of medical + professionals who have substance use disorder. +
  • +
+
+ + - +
+ +

How to Attended

- -
-

How to Attended

- -
- Face-to-Face or Virtual -

Is this a face-to-face/in person meeting, a virtual/online meeting, or both?

-
-
+ > + + Virtual/Online + + + +
+ - {#if !$idaa_slct.event_obj?.physical && !$idaa_slct.event_obj?.more__location_fields} - - {:else if !$idaa_slct.event_obj?.physical && $idaa_slct.event_obj?.more__location_fields} - + {:else if !$idaa_slct.event_obj?.physical && $idaa_slct.event_obj?.more__location_fields} + - {/if} + onclick={() => ($idaa_slct.event_obj.more__location_fields = false)} + > + + Hide Extra Location Fields + + {/if} -
+ class:hidden={!$idaa_slct.event_obj?.physical && + !$idaa_slct.event_obj?.more__location_fields} + > + Address - Address + - + - + - + - + +
- - - - -
- - + id="address_city" + name="address_city" + placeholder="Name of the city" + value={$lq__event_obj?.location_address_json && + $lq__event_obj?.location_address_json.city + ? $lq__event_obj?.location_address_json.city + : ($lq__event_obj?.address_city ?? '')} + autocomplete="address-level2" + /> + - {#if lu_country_subdivision_list} - - {:else} - + {:else} + - {/if} - + {/if} + + id="address_postal_code" + name="address_postal_code" + placeholder="Postal code or zip code" + value={$lq__event_obj?.location_address_json && + $lq__event_obj?.location_address_json.postal_code + ? $lq__event_obj?.location_address_json.postal_code + : ($lq__event_obj?.address_postal_code ?? '')} + autocomplete="postal-code" + /> + - {#if lu_country_list} - - {:else} - - {/if} + title="Select the country for the meeting" + > + + {#each lu_country_list as lu_country} + + {/each} + + + {:else} + + {/if} +
- + - - {#if !$idaa_slct.event_obj?.virtual && !$idaa_slct.event_obj?.more__virtual_fields} - - {:else if !$idaa_slct.event_obj?.virtual && $idaa_slct.event_obj?.more__virtual_fields} - - {/if} + class:preset-filled-success-200-800={$idaa_loc.bb.more__virtual_fields} + class:preset-filled-tertiary-200-800={!$idaa_loc.bb.more__virtual_fields} + onclick={() => ($idaa_slct.event_obj.more__virtual_fields = true)} + > + + Show Extra Virtual Fields + + {:else if !$idaa_slct.event_obj?.virtual && $idaa_slct.event_obj?.more__virtual_fields} + + {/if} -
- - Virtual/Online - {#if $idaa_sess.recovery_meetings.attend_platform == 'Zoom'} - (Zoom Meeting) - {:else if $idaa_sess.recovery_meetings.attend_platform == 'Google Meet'} - (Google Meet) - {:else if $idaa_sess.recovery_meetings.attend_platform == 'Microsoft Teams'} - (Microsoft Teams) - {:else if $idaa_sess.recovery_meetings.attend_platform == 'other'} - (Other Platform/ Service) - {/if} - + class:hidden={!$idaa_slct.event_obj.virtual && !$idaa_slct.event_obj?.more__virtual_fields} + > + + Virtual/Online + {#if $idaa_sess.recovery_meetings.attend_platform == 'Zoom'} + (Zoom Meeting) + {:else if $idaa_sess.recovery_meetings.attend_platform == 'Google Meet'} + (Google Meet) + {:else if $idaa_sess.recovery_meetings.attend_platform == 'Microsoft Teams'} + (Microsoft Teams) + {:else if $idaa_sess.recovery_meetings.attend_platform == 'other'} + (Other Platform/ Service) + {/if} + - -
-

- Click button to toggle if this is a Zoom meeting or other platform/service. - - {$idaa_sess.recovery_meetings.attend_platform} -

- {#if $idaa_sess.recovery_meetings?.attend_platform === 'Zoom'} - - {:else if $idaa_sess.recovery_meetings?.attend_platform === 'Jitsi'} - + {:else if $idaa_sess.recovery_meetings?.attend_platform === 'Jitsi'} + - {:else if !$idaa_sess.recovery_meetings?.attend_platform || $idaa_sess.recovery_meetings?.attend_platform === 'other'} - + {:else if !$idaa_sess.recovery_meetings?.attend_platform || $idaa_sess.recovery_meetings?.attend_platform === 'other'} + + $idaa_sess.recovery_meetings.attend_platform = 'Zoom'; + $idaa_trig = 'update_zoom_full_url'; + }} + > + + + Zoom Meeting + - - {/if} - + + IDAA Jitsi Meeting + + {/if} + -
- {#if $idaa_sess.recovery_meetings?.attend_platform === 'Zoom'} -
-
+ {#if $idaa_sess.recovery_meetings?.attend_platform === 'Zoom'} +
+ - + - + - + -
- +
+ - + placeholder="Zoom Meeting URL" + /> + + + - - - - {:else if $idaa_sess.recovery_meetings?.attend_platform === 'Jitsi'} -
-
- + + + placeholder="Jitsi Meeting URL" + /> + + + {:else if !$idaa_sess.recovery_meetings?.attend_platform || $idaa_sess.recovery_meetings?.attend_platform === 'other'} + + + + + {/if} + - {:else if !$idaa_sess.recovery_meetings?.attend_platform || $idaa_sess.recovery_meetings?.attend_platform === 'other'} - - + + + - +
+ +

Recurring and When

-
- -

Recurring and When

- - - -
- - - -
+ name="recurring_pattern" + id="recurring_pattern" + value={$lq__event_obj?.recurring_pattern} + > + + + + + + + -
- - - - - - - -
+
+ + + + + + + +
-
- - + - -
+ /> + + - {#if ( $ae_loc.administrator_access || $lq__event_obj && ($idaa_slct.event_obj?.show_recurring_text || ($lq__event_obj?.recurring_text && !$lq__event_obj?.recurring_text.includes('*gen*'))) )} -

Please only use the text box for additional information if the options above do not cover your needs. This may affect how this meeting shows up in search results.

-
+
+ +
+

Contacts

-
- -

Contacts

- - -
-
+ + - {/if} - -
- + /> + {/if} + +
+ -
+
+
+ Contact 1 +
Contact 1 is the primary contact for this meeting.
-
- Contact 1 -
Contact 1 is the primary contact for this meeting.
- - - - {#if !($ae_loc.administrator_access || ($idaa_slct.event_obj?.contact_li_json?.length && $idaa_slct.event_obj?.contact_li_json[0]?.unlock))} - - {:else} - + {:else} + - {/if} + > + + Unlocked + + {/if} - - - - - - - - -
+ + + + + + + + +
-
- Contact 2 - - - - - - - - - -
+
+ Contact 2 + + + + + + + + + +
+
+
+ - - - - - - {#if $ae_loc.trusted_access} - + class:preset-filled-success-200-800={$idaa_loc.recovery_meetings.show__admin_options} + class:preset-filled-tertiary-200-800={!$idaa_loc.recovery_meetings.show__admin_options} + > + {#if $idaa_loc.recovery_meetings.show__admin_options} + + {:else} + + {/if} + {$idaa_loc.recovery_meetings.show__admin_options ? 'Hide' : 'Show'} Admin + - -
+ class:hidden={!$idaa_loc.recovery_meetings.show__admin_options} + > +

Admin Options

-

- Admin Options -

+ + +
+ Confirmed +
+ + +
+
+ + +
+
- - -
- Confirmed -
- - -
-
- - -
-
+
+ Hide +
+ + +
+
+ + +
+
-
- Hide -
- - -
-
- - -
-
+
+ Priority +
+ + +
+
+ + +
+
+
-
- Priority -
- - -
-
- - -
-
-
- - - + > + - - + +
- {#if $ae_loc.administrator_access} - -
- Enable -
- - -
-
- - -
-
-
- {:else} - - {/if} -
+ {#if $ae_loc.administrator_access} + +
+ Enable +
+ + +
+
+ + +
+
+
+ {:else} + + {/if} + - {#if $ae_loc.trusted_access} - - {/if} + {#if $ae_loc.trusted_access} + + {/if} +
+ + {/if} - - {/if} - - -
- - {#if $idaa_slct.event_id} - - {:else} - + {:else} + - {/if} + > + {#await prom_api__event_obj} + Saving + {:then} + Save New Event + {/await} + + {/if} - {#if $idaa_slct.event_id} - {#if $ae_loc.administrator_access} - - {:else if $ae_loc.trusted_access} - + {:else if $ae_loc.trusted_access} + - {:else} - + {:else} + - {/if} - {/if} - - - + {/if} + {/if} + + + - -
- -
- + onclick={() => { + $idaa_sess.recovery_meetings.edit__event_obj = false; + if (log_lvl) { + console.log( + `Toggle edit__event_obj: ${$idaa_sess.recovery_meetings.edit__event_obj}` + ); + } + }} + title="View this Recovery Meeting" + > + + + Cancel Edit + + + +
- diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_view.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_view.svelte index f7721ff9..5e458ef4 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_view.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_view.svelte @@ -1,161 +1,166 @@ -
- - -
-
-
Description:
-
{@html $lq__event_obj?.description}
-
+
+
+
Description:
+
{@html $lq__event_obj?.description}
+
-
- Type of Recovery Meeting: - {$lq__event_obj?.type} -
-
+
+ Type of Recovery Meeting: + {$lq__event_obj?.type} +
+
+
+
+
+ Address: +
+ {#if $lq__event_obj?.location_address_json} + {#if $lq__event_obj?.physical} + {#if $lq__event_obj?.location_address_json.name}{$lq__event_obj?.location_address_json + .name}
{/if} + {#if $lq__event_obj?.location_address_json.line_1}{$lq__event_obj + ?.location_address_json.line_1}
{/if} + {#if $lq__event_obj?.location_address_json.line_2}{$lq__event_obj + ?.location_address_json.line_2}
{/if} + {#if $lq__event_obj?.location_address_json.line_3}{$lq__event_obj + ?.location_address_json.line_3}
{/if} + {/if} + {#if $lq__event_obj?.location_address_json.city}{$lq__event_obj?.location_address_json + .city}, + {/if} + {#if $lq__event_obj?.location_address_json.state_province}{$lq__event_obj + ?.location_address_json.state_province}{/if} + {#if $lq__event_obj?.physical} + {#if $lq__event_obj?.location_address_json.postal_code}{$lq__event_obj + ?.location_address_json.postal_code}{/if} + {/if} + {#if $lq__event_obj?.location_address_json.country} +
+ {$lq__event_obj?.location_address_json.country} + {/if} + {:else} + {#if $lq__event_obj?.physical} + {#if $lq__event_obj?.address_name}{$lq__event_obj?.address_name}
{/if} + {#if $lq__event_obj?.address_line_1}{$lq__event_obj?.address_line_1}
{/if} + {#if $lq__event_obj?.address_line_2}{$lq__event_obj?.address_line_2}
{/if} + {#if $lq__event_obj?.address_line_3}{$lq__event_obj?.address_line_3}
{/if} + {/if} + {#if $lq__event_obj?.address_city}{$lq__event_obj?.address_city}, + {/if} + {#if $lq__event_obj?.address_country_subdivision_name}{$lq__event_obj?.address_country_subdivision_name}{/if} + {#if $lq__event_obj?.physical} + {#if $lq__event_obj?.address_postal_code}{$lq__event_obj?.address_postal_code}{/if} + {/if} + {#if $lq__event_obj?.address_country_name} +
+ {$lq__event_obj?.address_country_name} + {/if} + {/if} +
+ {#if $lq__event_obj?.physical} +
+ Additional information: + {@html $lq__event_obj?.location_text} +
+ {/if} +
+
-
-
-
- - Address: - -
- {#if $lq__event_obj?.location_address_json} - - {#if $lq__event_obj?.physical} - {#if $lq__event_obj?.location_address_json.name}{$lq__event_obj?.location_address_json.name}
{/if} - {#if $lq__event_obj?.location_address_json.line_1}{$lq__event_obj?.location_address_json.line_1}
{/if} - {#if $lq__event_obj?.location_address_json.line_2}{$lq__event_obj?.location_address_json.line_2}
{/if} - {#if $lq__event_obj?.location_address_json.line_3}{$lq__event_obj?.location_address_json.line_3}
{/if} - {/if} - {#if $lq__event_obj?.location_address_json.city}{$lq__event_obj?.location_address_json.city}, {/if} - {#if $lq__event_obj?.location_address_json.state_province}{$lq__event_obj?.location_address_json.state_province}{/if} - {#if $lq__event_obj?.physical} - {#if $lq__event_obj?.location_address_json.postal_code}{$lq__event_obj?.location_address_json.postal_code}{/if} - {/if} - {#if $lq__event_obj?.location_address_json.country} -
- {$lq__event_obj?.location_address_json.country} - {/if} - - {:else} - - {#if $lq__event_obj?.physical} - {#if $lq__event_obj?.address_name}{$lq__event_obj?.address_name}
{/if} - {#if $lq__event_obj?.address_line_1}{$lq__event_obj?.address_line_1}
{/if} - {#if $lq__event_obj?.address_line_2}{$lq__event_obj?.address_line_2}
{/if} - {#if $lq__event_obj?.address_line_3}{$lq__event_obj?.address_line_3}
{/if} - {/if} - {#if $lq__event_obj?.address_city}{$lq__event_obj?.address_city}, {/if} - {#if $lq__event_obj?.address_country_subdivision_name}{$lq__event_obj?.address_country_subdivision_name}{/if} - {#if $lq__event_obj?.physical} - {#if $lq__event_obj?.address_postal_code}{$lq__event_obj?.address_postal_code}{/if} - {/if} - {#if $lq__event_obj?.address_country_name} -
- {$lq__event_obj?.address_country_name} - {/if} - - {/if} -
- {#if $lq__event_obj?.physical} -
- - Additional information: - - {@html $lq__event_obj?.location_text} -
- {/if} -
-
- -
- - {#if $lq__event_obj?.attend_json?.zoom} -
- - - Zoom Meeting: - - - - + {#if $lq__event_obj?.attend_json?.zoom} +
+ + + Zoom Meeting: + + + + - - - Join: Zoom ID {$lq__event_obj?.attend_json?.zoom?.meeting_id} - {#if $lq__event_obj?.attend_json?.zoom?.passcode} - | Passcode: {$lq__event_obj?.attend_json?.zoom?.passcode} - {/if} - - + > + + + Join: Zoom ID {$lq__event_obj?.attend_json?.zoom?.meeting_id} + {#if $lq__event_obj?.attend_json?.zoom?.passcode} + | Passcode: {$lq__event_obj?.attend_json?.zoom?.passcode} + {/if} + + - -
- - {:else if $lq__event_obj?.attend_json?.jitsi} -
- - - Jitsi Meeting: - - - - + + + Jitsi Meeting: + + + + - - - Join: {$lq__event_obj?.attend_json?.jitsi?.name ?? 'Jitsi Meeting'} - {#if $lq__event_obj?.attend_json?.jitsi?.passcode} - | Passcode: {$lq__event_obj?.attend_json?.jitsi?.passcode} - {/if} - - + > + + + Join: {$lq__event_obj?.attend_json?.jitsi?.name ?? 'Jitsi Meeting'} + {#if $lq__event_obj?.attend_json?.jitsi?.passcode} + | Passcode: {$lq__event_obj?.attend_json?.jitsi?.passcode} + {/if} + + - -
+ > +
+ {:else} +
+ + + URL: + + + {$lq__event_obj?.attend_url} + + + + + Passcode: + + + {$lq__event_obj?.attend_url_passcode} + + +
+ {/if} +
+ + + Phone: + + + {$lq__event_obj?.attend_phone} + + + + Passcode: + + + {$lq__event_obj?.attend_phone_passcode} + +
+
+ Additional information: + {@html $lq__event_obj?.attend_text} +
+
+
- {:else} -
- - - URL: - - - {$lq__event_obj?.attend_url} - - - - - Passcode: - - - {$lq__event_obj?.attend_url_passcode} - - -
- {/if} -
- - - Phone: - - - {$lq__event_obj?.attend_phone} - - - - Passcode: - - - {$lq__event_obj?.attend_phone_passcode} - -
-
- - Additional information: - - {@html $lq__event_obj?.attend_text} -
-
+
+
+
+ + + Frequency: + + {#if $lq__event_obj?.recurring_pattern == 'weekly'}Weekly + {:else if $lq__event_obj?.recurring_pattern == 'monthly'}Monthly + {:else if $lq__event_obj?.recurring_pattern == 'every other week'}Every Other Week + {:else if $lq__event_obj?.recurring_pattern == 'other'}Other + {/if} + {#if $lq__event_obj?.recurring_text && $lq__event_obj?.recurring_text.length > 0} + {#if $lq__event_obj?.recurring_text.includes('*gen*') && $ae_loc.administrator_access} + {@html $lq__event_obj?.recurring_text} + {:else if !$lq__event_obj?.recurring_text.includes('*gen*')} + {@html $lq__event_obj?.recurring_text} + {/if} + + {/if} +
+
+ + + Days of week: + + {#if $lq__event_obj?.weekday_sunday}Sunday{/if} + {#if $lq__event_obj?.weekday_monday}Monday{/if} + {#if $lq__event_obj?.weekday_tuesday}Tuesday{/if} + {#if $lq__event_obj?.weekday_wednesday}Wednesday{/if} + {#if $lq__event_obj?.weekday_thursday}Thursday{/if} + {#if $lq__event_obj?.weekday_friday}Friday{/if} + {#if $lq__event_obj?.weekday_saturday}Saturday{/if} +
+
+ {#if $lq__event_obj?.recurring_start_time} + + + Start time: + + {ae_util.iso_datetime_formatter( + `2024-01-01 ${$lq__event_obj?.recurring_start_time}`, + 'time_12_short' + )} + + + + End time: + {ae_util.iso_datetime_formatter( + `2024-01-01 ${$lq__event_obj?.recurring_end_time}`, + 'time_12_short' + )} + + + + + + Timezone: + {$lq__event_obj?.timezone} + + + {#if $lq__event_obj?.timezone && $ae_loc.current_timezone} + + ( + Your TZ: + + + + {$ae_loc.current_timezone} + + ) + + {/if} + {:else} + No times set + {/if} -
+ +
+
+ - -
- -
-
- - - Frequency: - - {#if $lq__event_obj?.recurring_pattern == 'weekly'}Weekly - {:else if $lq__event_obj?.recurring_pattern == 'monthly'}Monthly - {:else if $lq__event_obj?.recurring_pattern == 'every other week'}Every Other Week - {:else if $lq__event_obj?.recurring_pattern == 'other'}Other - {/if} - {#if $lq__event_obj?.recurring_text && $lq__event_obj?.recurring_text.length > 0} - {#if $lq__event_obj?.recurring_text.includes('*gen*') && $ae_loc.administrator_access} - {@html $lq__event_obj?.recurring_text} - {:else if (!$lq__event_obj?.recurring_text.includes('*gen*'))} - {@html $lq__event_obj?.recurring_text} - {/if} - - {/if} -
-
- - - Days of week: - - {#if $lq__event_obj?.weekday_sunday}Sunday{/if} - {#if $lq__event_obj?.weekday_monday}Monday{/if} - {#if $lq__event_obj?.weekday_tuesday}Tuesday{/if} - {#if $lq__event_obj?.weekday_wednesday}Wednesday{/if} - {#if $lq__event_obj?.weekday_thursday}Thursday{/if} - {#if $lq__event_obj?.weekday_friday}Friday{/if} - {#if $lq__event_obj?.weekday_saturday}Saturday{/if} -
-
- {#if $lq__event_obj?.recurring_start_time} - - - Start time: - - {ae_util.iso_datetime_formatter(`2024-01-01 ${$lq__event_obj?.recurring_start_time}`, 'time_12_short')} - - - - End time: - {ae_util.iso_datetime_formatter(`2024-01-01 ${$lq__event_obj?.recurring_end_time}`, 'time_12_short')} - - - - - - Timezone: - {$lq__event_obj?.timezone} - - - {#if $lq__event_obj?.timezone && $ae_loc.current_timezone} - - ( - Your TZ: - - - - {$ae_loc.current_timezone} - - ) - - {/if} - {:else} - No times set - {/if} - - - - -
-
- -
- - -
- + - - Message IDAA Staff? - + title="Send a message to IDAA Staff regarding this Recovery Meeting." + > + + Message IDAA Staff? + - {#if $lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json.length && $lq__event_obj?.contact_li_json[0].full_name} -
- - Contact: - - {$lq__event_obj?.contact_li_json[0].full_name} - {#if $lq__event_obj?.contact_li_json[0].email} - {$lq__event_obj?.contact_li_json[0].email} - - {/if} - {#if $lq__event_obj?.contact_li_json[0].phone_mobile} - | Mobile: - {$lq__event_obj?.contact_li_json[0].phone_mobile} - {/if} - {#if $lq__event_obj?.contact_li_json[0].phone_home} - | Home: - {$lq__event_obj?.contact_li_json[0].phone_home} - {/if} - {#if $lq__event_obj?.contact_li_json[0].phone_office} - | Office: - {$lq__event_obj?.contact_li_json[0].phone_office} - {/if} - {#if $lq__event_obj?.contact_li_json[0].other_text}| {$lq__event_obj?.contact_li_json[0].other_text}{/if} -
- {/if} + {#if $lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json.length && $lq__event_obj?.contact_li_json[0].full_name} +
+ + Contact: + + {$lq__event_obj?.contact_li_json[0].full_name} + {#if $lq__event_obj?.contact_li_json[0].email} + {$lq__event_obj?.contact_li_json[0].email} + + {/if} + {#if $lq__event_obj?.contact_li_json[0].phone_mobile} + | Mobile: + {$lq__event_obj?.contact_li_json[0].phone_mobile} + {/if} + {#if $lq__event_obj?.contact_li_json[0].phone_home} + | Home: + {$lq__event_obj?.contact_li_json[0].phone_home} + {/if} + {#if $lq__event_obj?.contact_li_json[0].phone_office} + | Office: + {$lq__event_obj?.contact_li_json[0].phone_office} + {/if} + {#if $lq__event_obj?.contact_li_json[0].other_text}| {$lq__event_obj?.contact_li_json[0] + .other_text}{/if} +
+ {/if} - {#if $lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json.length && $lq__event_obj?.contact_li_json[1].full_name} -
- - Contact: - - {$lq__event_obj?.contact_li_json[1].full_name} - {#if $lq__event_obj?.contact_li_json[1].email} - | {$lq__event_obj?.contact_li_json[1].email} - - {/if} - {#if $lq__event_obj?.contact_li_json[1].phone_mobile} - | Mobile: - {$lq__event_obj?.contact_li_json[1].phone_mobile} - {/if} - {#if $lq__event_obj?.contact_li_json[1].phone_home} - | Home: - {$lq__event_obj?.contact_li_json[1].phone_home} - {/if} - {#if $lq__event_obj?.contact_li_json[1].phone_office} - | Office: - {$lq__event_obj?.contact_li_json[1].phone_office} - {/if} - {#if $lq__event_obj?.contact_li_json[1].other_text}| {$lq__event_obj?.contact_li_json[1].other_text}{/if} -
- {/if} + {#if $lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json.length && $lq__event_obj?.contact_li_json[1].full_name} +
+ + Contact: + + {$lq__event_obj?.contact_li_json[1].full_name} + {#if $lq__event_obj?.contact_li_json[1].email} + | {$lq__event_obj?.contact_li_json[1].email} + + {/if} + {#if $lq__event_obj?.contact_li_json[1].phone_mobile} + | Mobile: + {$lq__event_obj?.contact_li_json[1].phone_mobile} + {/if} + {#if $lq__event_obj?.contact_li_json[1].phone_home} + | Home: + {$lq__event_obj?.contact_li_json[1].phone_home} + {/if} + {#if $lq__event_obj?.contact_li_json[1].phone_office} + | Office: + {$lq__event_obj?.contact_li_json[1].phone_office} + {/if} + {#if $lq__event_obj?.contact_li_json[1].other_text}| {$lq__event_obj?.contact_li_json[1] + .other_text}{/if} +
+ {/if} +
+
+ + ID: + {$lq__event_obj?.event_id_random} + + + Created on: {ae_util.iso_datetime_formatter($lq__event_obj?.created_on, 'datetime_12_short')} + + + Updated on: {ae_util.iso_datetime_formatter($lq__event_obj?.updated_on, 'datetime_12_short')} + +
- - - -
- - ID: - {$lq__event_obj?.event_id_random} - - - Created on: {ae_util.iso_datetime_formatter($lq__event_obj?.created_on, 'datetime_12_short')} - - - Updated on: {ae_util.iso_datetime_formatter($lq__event_obj?.updated_on, 'datetime_12_short')} - -
- - - +
- diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte index 5772754e..6f113871 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte @@ -1,199 +1,212 @@ -
+> + + {#if $lq__event_obj_li && $lq__event_obj_li.length} +
+

+ Results: - -{#if $lq__event_obj_li && $lq__event_obj_li.length} -
-

- - Results: - + {#if $lq__event_obj_li?.length} + + + {$lq__event_obj_li.length ?? 'None'} + + {/if} +

- {#if $lq__event_obj_li?.length} - - - {$lq__event_obj_li.length ?? 'None'} - - {/if} -

- -{#each $lq__event_obj_li as idaa_event_obj, index} - - {#if idaa_event_obj} -
- -
-

+
+

- - {idaa_event_obj?.name ?? 'Recovery Meeting'} -

+ > + + {idaa_event_obj?.name ?? 'Recovery Meeting'} +

-
- {#if idaa_event_obj?.status == 'unknown'} - - - Not Confirmed by IDAA - - - - {/if} + > + {#if idaa_event_obj?.status == 'unknown'} + + + Not Confirmed by IDAA + + + + {/if} - - - {#if idaa_event_obj?.physical && idaa_event_obj?.virtual} - F2F and Virtual - {:else if idaa_event_obj?.physical} - F2F - {:else if idaa_event_obj?.virtual} - Virtual - {/if} - - {#if idaa_event_obj?.type} - {idaa_event_obj?.type} - {/if} - {#if $ae_loc.trusted_access && idaa_event_obj?.hide} - Hidden - {/if} - {#if $ae_loc.administrator_access && !idaa_event_obj?.enable} - Not enabled - {/if} - -
-
+ + + {#if idaa_event_obj?.physical && idaa_event_obj?.virtual} + F2F and + Virtual + {:else if idaa_event_obj?.physical} + F2F + {:else if idaa_event_obj?.virtual} + Virtual + {/if} + + {#if idaa_event_obj?.type} + {idaa_event_obj?.type} + {/if} + {#if $ae_loc.trusted_access && idaa_event_obj?.hide} + Hidden + {/if} + {#if $ae_loc.administrator_access && !idaa_event_obj?.enable} + Not enabled + {/if} + +
+ - + title={`View: ${idaa_event_obj?.name}`} + > + + + + Meeting Details + +
- -
- -
- Type of Recovery Meeting: - {idaa_event_obj?.type} -
+
+ Type of Recovery Meeting: + {idaa_event_obj?.type} +
-
- - - Zoom Meeting: - - - - + + + Zoom Meeting: + + + + - - - Join: Zoom ID {idaa_event_obj?.attend_json?.zoom?.meeting_id} - {#if idaa_event_obj?.attend_json?.zoom?.passcode} - Passcode: {idaa_event_obj?.attend_json?.zoom?.passcode} - {/if} - - + > + + + Join: Zoom ID {idaa_event_obj?.attend_json?.zoom?.meeting_id} + {#if idaa_event_obj?.attend_json?.zoom?.passcode} + Passcode: {idaa_event_obj?.attend_json?.zoom?.passcode} + {/if} + + - -
+ > + -
- - - Jitsi Meeting: - - - - + + + Jitsi Meeting: + + + + - - - Join: {idaa_event_obj?.attend_json?.jitsi?.name ?? 'Jitsi Meeting'} - {#if idaa_event_obj?.attend_json?.jitsi?.passcode} - Passcode: {idaa_event_obj?.attend_json?.jitsi?.passcode} - {/if} - - + > + + + Join: {idaa_event_obj?.attend_json?.jitsi?.name ?? 'Jitsi Meeting'} + {#if idaa_event_obj?.attend_json?.jitsi?.passcode} + Passcode: {idaa_event_obj?.attend_json?.jitsi?.passcode} + {/if} + + - -
+ > + -
- - - When: - - - {#if idaa_event_obj?.weekday_sunday || idaa_event_obj?.weekday_monday || idaa_event_obj?.weekday_tuesday || idaa_event_obj?.weekday_wednesday || idaa_event_obj?.weekday_thursday || idaa_event_obj?.weekday_friday || idaa_event_obj?.weekday_saturday} - - - {#if idaa_event_obj?.weekday_sunday}Sunday{/if} - {#if idaa_event_obj?.weekday_monday}Monday{/if} - {#if idaa_event_obj?.weekday_tuesday}Tuesday{/if} - {#if idaa_event_obj?.weekday_wednesday}Wednesday{/if} - {#if idaa_event_obj?.weekday_thursday}Thursday{/if} - {#if idaa_event_obj?.weekday_friday}Friday{/if} - {#if idaa_event_obj?.weekday_saturday}Saturday{/if} - - {/if} +
+ + + When: + + + {#if idaa_event_obj?.weekday_sunday || idaa_event_obj?.weekday_monday || idaa_event_obj?.weekday_tuesday || idaa_event_obj?.weekday_wednesday || idaa_event_obj?.weekday_thursday || idaa_event_obj?.weekday_friday || idaa_event_obj?.weekday_saturday} + + + {#if idaa_event_obj?.weekday_sunday}Sunday{/if} + {#if idaa_event_obj?.weekday_monday}Monday{/if} + {#if idaa_event_obj?.weekday_tuesday}Tuesday{/if} + {#if idaa_event_obj?.weekday_wednesday}Wednesday{/if} + {#if idaa_event_obj?.weekday_thursday}Thursday{/if} + {#if idaa_event_obj?.weekday_friday}Friday{/if} + {#if idaa_event_obj?.weekday_saturday}Saturday{/if} + + {/if} - {#if idaa_event_obj?.recurring_start_time} - - {ae_util.iso_datetime_formatter(`2023-01-01 ${idaa_event_obj?.recurring_start_time}`, 'time_12_short')} - {/if} - {#if idaa_event_obj?.timezone} - - ({idaa_event_obj?.timezone}) - {:else} -
Required: No timezone was given!
- {/if} -
+ {#if idaa_event_obj?.recurring_start_time} + + {ae_util.iso_datetime_formatter( + `2023-01-01 ${idaa_event_obj?.recurring_start_time}`, + 'time_12_short' + )} + {/if} + {#if idaa_event_obj?.timezone} + + ({idaa_event_obj?.timezone}) + {:else} +
+ Required: No timezone was given! +
+ {/if} +
-
+
+ {#if idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && idaa_event_obj?.contact_li_json[0].full_name} +
+ + Contact: + + {idaa_event_obj?.contact_li_json[0].full_name} + {#if idaa_event_obj?.contact_li_json[0].email} + | {idaa_event_obj?.contact_li_json[0].email} + + {/if} + {#if idaa_event_obj?.contact_li_json[0].phone_mobile} + | Mobile: + {idaa_event_obj?.contact_li_json[0].phone_mobile} + {/if} + {#if idaa_event_obj?.contact_li_json[0].phone_home} + | Home: + {idaa_event_obj?.contact_li_json[0].phone_home} + {/if} + {#if idaa_event_obj?.contact_li_json[0].phone_office} + | Office: + {idaa_event_obj?.contact_li_json[0].phone_office} + {/if} + {#if idaa_event_obj?.contact_li_json[0].other_text}| {idaa_event_obj + ?.contact_li_json[0].other_text}{/if} +
+ {:else if $ae_loc.trusted_access} +
+ ALERT: The primary contact information may be missing? This meeting should be + checked and updated. Please Edit and Save to use the new format. + +
+ {/if} - {#if idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && idaa_event_obj?.contact_li_json[0].full_name} -
- - Contact: - - {idaa_event_obj?.contact_li_json[0].full_name} - {#if idaa_event_obj?.contact_li_json[0].email} - | {idaa_event_obj?.contact_li_json[0].email} - - {/if} - {#if idaa_event_obj?.contact_li_json[0].phone_mobile} - | Mobile: - {idaa_event_obj?.contact_li_json[0].phone_mobile} - {/if} - {#if idaa_event_obj?.contact_li_json[0].phone_home} - | Home: - {idaa_event_obj?.contact_li_json[0].phone_home} - {/if} - {#if idaa_event_obj?.contact_li_json[0].phone_office} - | Office: - {idaa_event_obj?.contact_li_json[0].phone_office} - {/if} - {#if idaa_event_obj?.contact_li_json[0].other_text}| {idaa_event_obj?.contact_li_json[0].other_text}{/if} -
- {:else} - {#if $ae_loc.trusted_access} -
- ALERT: The primary contact information may be missing? This meeting should be checked and updated. Please Edit and Save to use the new format. - -
- {/if} - {/if} + {#if idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && idaa_event_obj?.contact_li_json[1].full_name} +
+ + Contact: + + {idaa_event_obj?.contact_li_json[1].full_name} + {#if idaa_event_obj?.contact_li_json[1].email} + | {idaa_event_obj?.contact_li_json[1].email} + + {/if} + {#if idaa_event_obj?.contact_li_json[1].phone_mobile} + | Mobile: + {idaa_event_obj?.contact_li_json[1].phone_mobile} + {/if} + {#if idaa_event_obj?.contact_li_json[1].phone_home} + | Home: + {idaa_event_obj?.contact_li_json[1].phone_home} + {/if} + {#if idaa_event_obj?.contact_li_json[1].phone_office} + | Office: + {idaa_event_obj?.contact_li_json[1].phone_office} + {/if} + {#if idaa_event_obj?.contact_li_json[1].other_text}| {idaa_event_obj + ?.contact_li_json[1].other_text}{/if} +
+ {/if} + {#if $ae_loc.trusted_access} + {#if idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && !idaa_event_obj?.contact_li_json[0].full_name} +
+ Required: No primary contact information was found! +
+ {/if} + {#if !idaa_event_obj?.external_person_id} +
+ Warning: Not linked to a Novi record! +
+ {/if} + {/if} +
+
- {#if idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && idaa_event_obj?.contact_li_json[1].full_name} -
- - Contact: - - {idaa_event_obj?.contact_li_json[1].full_name} - {#if idaa_event_obj?.contact_li_json[1].email} - | {idaa_event_obj?.contact_li_json[1].email} - - {/if} - {#if idaa_event_obj?.contact_li_json[1].phone_mobile} - | Mobile: - {idaa_event_obj?.contact_li_json[1].phone_mobile} - {/if} - {#if idaa_event_obj?.contact_li_json[1].phone_home} - | Home: - {idaa_event_obj?.contact_li_json[1].phone_home} - {/if} - {#if idaa_event_obj?.contact_li_json[1].phone_office} - | Office: - {idaa_event_obj?.contact_li_json[1].phone_office} - {/if} - {#if idaa_event_obj?.contact_li_json[1].other_text}| {idaa_event_obj?.contact_li_json[1].other_text}{/if} -
- {/if} - {#if $ae_loc.trusted_access} - {#if (idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && !idaa_event_obj?.contact_li_json[0].full_name)} -
Required: No primary contact information was found!
- {/if} - {#if !idaa_event_obj?.external_person_id} -
Warning: Not linked to a Novi record!
- {/if} - {/if} - - -
- - - {#if $ae_loc.administrator_access} - - {/if} - - - {/if} - -{/each} - - -{:else} - -
- {#if $idaa_sess.recovery_meetings.qry__status === 'loading'} -
- - - Loading... -
- {:else} -
- No recovery meetings available to show. The search may need to be changed. -
- {/if} -
-{/if} +
+ + Created on: {ae_util.iso_datetime_formatter( + idaa_event_obj?.created_on, + 'datetime_12_short' + )} + + + Updated on: {ae_util.iso_datetime_formatter( + idaa_event_obj?.updated_on, + 'datetime_12_short' + )} + +
+ + {/if} + + {/if} + {/each} + + {:else} + +
+ {#if $idaa_sess.recovery_meetings.qry__status === 'loading'} +
+ + + Loading... +
+ {:else} +
+ No recovery meetings available to show. The search may need to be changed. +
+ {/if} +
+ {/if} - diff --git a/src/routes/journals/+page.ts b/src/routes/journals/+page.ts index b27c7893..2d23e513 100644 --- a/src/routes/journals/+page.ts +++ b/src/routes/journals/+page.ts @@ -5,61 +5,60 @@ import { browser } from '$app/environment'; import { journals_func } from '$lib/ae_journals/ae_journals_functions'; export async function load({ fetch, parent }) { - let log_lvl: number = 0; + const log_lvl: number = 0; - let parent_data = await parent(); + const parent_data = await parent(); - let account_id = parent_data.account_id; + const account_id = parent_data.account_id; - let ae_acct = parent_data[account_id]; + const ae_acct = parent_data[account_id]; - let journal_id = ae_acct.slct.journal_id; // From root +layout.ts - if (!journal_id) { - if (log_lvl) { - console.log(`INFO: journals +layout.ts: The journal_id was not found in the parent_data.`); - } - // return false; - } + const journal_id = ae_acct.slct.journal_id; // From root +layout.ts + if (!journal_id) { + if (log_lvl) { + console.log(`INFO: journals +layout.ts: The journal_id was not found in the parent_data.`); + } + // return false; + } - if (browser) { - if (journal_id) { - // let ae_params = {}; + if (browser) { + if (journal_id) { + // let ae_params = {}; - let load_journal_obj_li = journals_func.load_ae_obj_id__journal({ - api_cfg: ae_acct.api, - journal_id: journal_id, - hidden: 'all', // 'not_hidden' to load only visible entries - // params: ae_params, - try_cache: true, - log_lvl: log_lvl - }); - ae_acct.slct.journal_obj_li = load_journal_obj_li; - } + const load_journal_obj_li = journals_func.load_ae_obj_id__journal({ + api_cfg: ae_acct.api, + journal_id: journal_id, + hidden: 'all', // 'not_hidden' to load only visible entries + // params: ae_params, + try_cache: true, + log_lvl: log_lvl + }); + ae_acct.slct.journal_obj_li = load_journal_obj_li; + } - // console.log(`ae_acct = `, ae_acct); - // WARNING: This does not currently work because the person_id has not been set yet. - let person_id = ae_acct.loc.person_id; - // console.log(`person_id = `, person_id); + // console.log(`ae_acct = `, ae_acct); + // WARNING: This does not currently work because the person_id has not been set yet. + const person_id = ae_acct.loc.person_id; + // console.log(`person_id = `, person_id); - let load_journal_obj_li = await journals_func.load_ae_obj_li__journal({ - api_cfg: ae_acct.api, - for_obj_type: 'account', - for_obj_id: account_id, - qry_person_id: person_id, - inc_entry_li: true, - hidden: 'all', // 'not_hidden' - enabled: 'enabled', - // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, - limit: 25, - // params: ae_params, - try_cache: true, - log_lvl: log_lvl - }); - ae_acct.slct.journal_obj_li = load_journal_obj_li; + const load_journal_obj_li = await journals_func.load_ae_obj_li__journal({ + api_cfg: ae_acct.api, + for_obj_type: 'account', + for_obj_id: account_id, + qry_person_id: person_id, + inc_entry_li: true, + hidden: 'all', // 'not_hidden' + enabled: 'enabled', + // order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, + limit: 25, + // params: ae_params, + try_cache: true, + log_lvl: log_lvl + }); + ae_acct.slct.journal_obj_li = load_journal_obj_li; + } - } + parent_data[account_id] = ae_acct; - parent_data[account_id] = ae_acct; - - return parent_data; + return parent_data; } diff --git a/src/routes/journals/[journal_id]/+layout.svelte b/src/routes/journals/[journal_id]/+layout.svelte index e046546f..82280925 100644 --- a/src/routes/journals/[journal_id]/+layout.svelte +++ b/src/routes/journals/[journal_id]/+layout.svelte @@ -1,149 +1,169 @@ -
{ max-w-max space-y-2 " - > - - - -
{ relative transition-all " - > - - - - - - -
{ min-w-72 max-w-fit " - class:hidden={!show_menu__all_journals} - > - - - - - - All Journals - + title="View all journals for this account: {$ae_loc.account_name}" + > + + + + All Journals + - - - - - - {#if $journals_loc.entry_view_history_kv && Object.keys($journals_loc.entry_view_history_kv).length > 0} - { + if ($journals_slct.journal_entry_id) { + goto( + `/journals/${$journals_slct?.journal_id}/entry/${$journals_slct.journal_entry_id}` + ); + } + }} + class=" form-select w-full text-sm border border-neutral-400-600 p-1 " - > - - - {#each Object.entries($journals_loc.entry_view_history_kv).reverse() as [journal_entry_id, journal_entry_obj]} - - {/each} - - {/if} + > + + + {#each Object.entries($journals_loc.entry_view_history_kv).reverse() as [journal_entry_id, journal_entry_obj]} + + {/each} + + {/if} +
-
- - {#if $journals_slct?.journal_entry_id} - - - - - - - - - {$lq__journal_obj?.name || 'Journal'} - - - {:else} - - + + + + + + {$lq__journal_obj?.name || 'Journal'} + + + {:else} + + - - {/if} + + {/if} - - - + + - - - - - - - - - - - -{@render children?.()} - - + title="Create a new journal entry for this journal: {$lq__journal_obj?.name}" + > + + + + + + + + {@render children?.()} +
- - diff --git a/src/routes/journals/[journal_id]/+layout.ts b/src/routes/journals/[journal_id]/+layout.ts index e2d833bf..ee30ae42 100644 --- a/src/routes/journals/[journal_id]/+layout.ts +++ b/src/routes/journals/[journal_id]/+layout.ts @@ -8,78 +8,80 @@ import { journals_func } from '$lib/ae_journals/ae_journals_functions'; // import { load_ae_obj_id } from '$lib/ae_core/core__crud_generic'; export async function load({ params, parent }) { - let log_lvl: number = 0; + const log_lvl: number = 0; - let data = await parent(); - data.log_lvl = log_lvl; + const data = await parent(); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; + const account_id = data.account_id; + const ae_acct = data[account_id]; - let journal_id = params.journal_id; - if (!journal_id) { - console.log(`ae_journals journals [journal_id] +page.ts: The journal_id was not found in the params!!!`); - error(404, { - message: 'Journals - Journal ID not found' - }); - } - ae_acct.slct.journal_id = journal_id; - if (log_lvl) { - console.log(`ae_journals journals [journal_id] +page.ts: journal_id = `, journal_id); - } + const journal_id = params.journal_id; + if (!journal_id) { + console.log( + `ae_journals journals [journal_id] +page.ts: The journal_id was not found in the params!!!` + ); + error(404, { + message: 'Journals - Journal ID not found' + }); + } + ae_acct.slct.journal_id = journal_id; + if (log_lvl) { + console.log(`ae_journals journals [journal_id] +page.ts: journal_id = `, journal_id); + } - if (browser) { - if (log_lvl) { - console.log(`ae_journals journals [journal_id] +page.ts: journal_id = `, journal_id); - } - // Load journal object - // let load_journal_obj = load_ae_obj_id({ - // api_cfg: ae_acct.api, - // obj_type: 'journal', - // obj_id: journal_id, - // db_instance: db_journals, - // db_field_li: journal_field_li, - // inc_obj_type_li: ['journal_entry'], - // log_lvl: 2 - // }); + if (browser) { + if (log_lvl) { + console.log(`ae_journals journals [journal_id] +page.ts: journal_id = `, journal_id); + } + // Load journal object + // let load_journal_obj = load_ae_obj_id({ + // api_cfg: ae_acct.api, + // obj_type: 'journal', + // obj_id: journal_id, + // db_instance: db_journals, + // db_field_li: journal_field_li, + // inc_obj_type_li: ['journal_entry'], + // log_lvl: 2 + // }); - let load_journal_obj = await journals_func.load_ae_obj_id__journal({ - api_cfg: ae_acct.api, - journal_id: journal_id, - inc_entry_li: true, - enabled: 'enabled', - hidden: 'all', // 'not_hidden' to load only visible entries - limit: 99, - try_cache: true, - log_lvl: log_lvl - }); - // .then((results) => { - // if (!results) { - // error(404, { - // message: 'Journals - Journal not found' - // }); - // } else { - // // ae_acct.slct.journal_obj = results; - // } - // }) - // .catch((err) => { - // console.error(`Error loading journal object:`, err); - // error(500, { - // message: 'Journals - Error loading journal object' - // }); - // }); + const load_journal_obj = await journals_func.load_ae_obj_id__journal({ + api_cfg: ae_acct.api, + journal_id: journal_id, + inc_entry_li: true, + enabled: 'enabled', + hidden: 'all', // 'not_hidden' to load only visible entries + limit: 99, + try_cache: true, + log_lvl: log_lvl + }); + // .then((results) => { + // if (!results) { + // error(404, { + // message: 'Journals - Journal not found' + // }); + // } else { + // // ae_acct.slct.journal_obj = results; + // } + // }) + // .catch((err) => { + // console.error(`Error loading journal object:`, err); + // error(500, { + // message: 'Journals - Error loading journal object' + // }); + // }); - if (!load_journal_obj) { - error(404, { - message: 'Journals - Journal Entry not found' - }); - } else { - ae_acct.slct.load_journal_obj = load_journal_obj; - } - } + if (!load_journal_obj) { + error(404, { + message: 'Journals - Journal Entry not found' + }); + } else { + ae_acct.slct.load_journal_obj = load_journal_obj; + } + } - // WARNING: Precaution against shared data between sites. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/journals/[journal_id]/+page.svelte b/src/routes/journals/[journal_id]/+page.svelte index b2c9e75a..6826d5e5 100644 --- a/src/routes/journals/[journal_id]/+page.svelte +++ b/src/routes/journals/[journal_id]/+page.svelte @@ -1,272 +1,315 @@ - - Æ Journals: - {$lq__journal_obj?.name ? ae_util.shorten_string({ string: $lq__journal_obj?.name, max_length: 20, begin_length: 10, end_length: 4 }) : ''} - - {$ae_loc?.title} - + Æ Journals: + {$lq__journal_obj?.name + ? ae_util.shorten_string({ + string: $lq__journal_obj?.name, + max_length: 20, + begin_length: 10, + end_length: 4 + }) + : ''} + - {$ae_loc?.title} + - {#if $ae_loc.person_id == $lq__journal_obj?.person_id} - - + + + {#if $lq__journal_entry_obj_li && $lq__journal_entry_obj_li?.length} + + {:else} +
+

No journal entry available to show.

+
+ {/if} + - - - - -{#if $lq__journal_entry_obj_li && $lq__journal_entry_obj_li?.length } - + + + {:else} -
-

No journal entry available to show.

-
+
+

You must be logged in as the owner to view this Journal.

+
{/if} - - - - - - - - - -{:else} -
-

- You must be logged in as the owner to view this Journal. -

-
-{/if} \ No newline at end of file diff --git a/src/routes/journals/[journal_id]/+page.ts b/src/routes/journals/[journal_id]/+page.ts index d9a77d5d..a32b6f4b 100644 --- a/src/routes/journals/[journal_id]/+page.ts +++ b/src/routes/journals/[journal_id]/+page.ts @@ -5,80 +5,70 @@ console.log(`ae_p_journals [journal_id] +page.ts start`); import { browser } from '$app/environment'; import { journals_func } from '$lib/ae_journals/ae_journals_functions'; -export async function load({ params, parent }) { // route - // let log_lvl: number = 1; - - // let data = await parent(); - // data.log_lvl = log_lvl; - - // let account_id = data.account_id; - // let ae_acct = data[account_id]; - - // let journal_id = params.journal_id; - // if (!journal_id) { - // console.log(`ae_journals journals [journal_id] +page.ts: The journal_id was not found in the params!!!`); - // error(404, { +export async function load({ params, parent }) { + // route + // let log_lvl: number = 1; + // let data = await parent(); + // data.log_lvl = log_lvl; + // let account_id = data.account_id; + // let ae_acct = data[account_id]; + // let journal_id = params.journal_id; + // if (!journal_id) { + // console.log(`ae_journals journals [journal_id] +page.ts: The journal_id was not found in the params!!!`); + // error(404, { // message: 'Journals - Journal ID not found' // }); - // } - // ae_acct.slct.journal_id = journal_id; - // console.log(`ae_journals journals [journal_id] +page.ts: journal_id = `, ae_acct.slct.journal_id); - - // if (browser) { - // if (log_lvl) { - // console.log(`ae_journals journals [journal_id] +page.ts: journal_id = `, journal_id); - // } - // // Load event journal object - // let load_journal_obj = journals_func.load_ae_obj_id__journal({ - // api_cfg: ae_acct.api, - // journal_id: journal_id, - // inc_entry_li: true, - // try_cache: true, - // log_lvl: log_lvl - // }); - - // ae_acct.slct.journal_obj = load_journal_obj; - - // Load journal entries for the journal - // let load_journal_entry_obj_li = journals_func.load_ae_obj_li__journal_entry({ - // api_cfg: ae_acct.api, - // for_obj_type: 'journal', - // for_obj_id: journal_id, - // params: {qry__enabled: 'all', qry__limit: 99}, - // try_cache: true - // }) - // .then((journal_entry_obj_li) => { - // if (log_lvl) { - // console.log(`journal_entry_obj_li = `, journal_entry_obj_li); - // } - // for (let index = 0; index < journal_entry_obj_li.length; index++) { - // let journal_entry_obj = journal_entry_obj_li[index]; - // let journal_entry_id = journal_entry_obj.journal_entry_id_random; - - // let load_journal_entry_obj_li = journals_func.load_ae_obj_li__journal_entry({ - // api_cfg: ae_acct.api, - // for_obj_type: 'journal_entry', - // for_obj_id: journal_entry_id, - // params: {qry__enabled: 'all', qry__limit: 15}, - // try_cache: true - // }); - // if (log_lvl) { - // console.log(`load_journal_entry_obj_li = `, load_journal_entry_obj_li); - // } - // journal_entry_obj_li[index].journal_entry_li = load_journal_entry_obj_li; - // } - - // return journal_entry_obj_li; - // }); - // if (log_lvl) { - // console.log(`load_journal_entry_obj_li = `, load_journal_entry_obj_li); - // } - // ae_acct.slct.journal_entry_obj_li = load_journal_entry_obj_li; - - // } - - // WARNING: Precaution against shared data between sites. - // data[account_id] = ae_acct; - - // return data; + // } + // ae_acct.slct.journal_id = journal_id; + // console.log(`ae_journals journals [journal_id] +page.ts: journal_id = `, ae_acct.slct.journal_id); + // if (browser) { + // if (log_lvl) { + // console.log(`ae_journals journals [journal_id] +page.ts: journal_id = `, journal_id); + // } + // // Load event journal object + // let load_journal_obj = journals_func.load_ae_obj_id__journal({ + // api_cfg: ae_acct.api, + // journal_id: journal_id, + // inc_entry_li: true, + // try_cache: true, + // log_lvl: log_lvl + // }); + // ae_acct.slct.journal_obj = load_journal_obj; + // Load journal entries for the journal + // let load_journal_entry_obj_li = journals_func.load_ae_obj_li__journal_entry({ + // api_cfg: ae_acct.api, + // for_obj_type: 'journal', + // for_obj_id: journal_id, + // params: {qry__enabled: 'all', qry__limit: 99}, + // try_cache: true + // }) + // .then((journal_entry_obj_li) => { + // if (log_lvl) { + // console.log(`journal_entry_obj_li = `, journal_entry_obj_li); + // } + // for (let index = 0; index < journal_entry_obj_li.length; index++) { + // let journal_entry_obj = journal_entry_obj_li[index]; + // let journal_entry_id = journal_entry_obj.journal_entry_id_random; + // let load_journal_entry_obj_li = journals_func.load_ae_obj_li__journal_entry({ + // api_cfg: ae_acct.api, + // for_obj_type: 'journal_entry', + // for_obj_id: journal_entry_id, + // params: {qry__enabled: 'all', qry__limit: 15}, + // try_cache: true + // }); + // if (log_lvl) { + // console.log(`load_journal_entry_obj_li = `, load_journal_entry_obj_li); + // } + // journal_entry_obj_li[index].journal_entry_li = load_journal_entry_obj_li; + // } + // return journal_entry_obj_li; + // }); + // if (log_lvl) { + // console.log(`load_journal_entry_obj_li = `, load_journal_entry_obj_li); + // } + // ae_acct.slct.journal_entry_obj_li = load_journal_entry_obj_li; + // } + // WARNING: Precaution against shared data between sites. + // data[account_id] = ae_acct; + // return data; } diff --git a/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.svelte b/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.svelte index 58c167a6..97d19eb3 100644 --- a/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.svelte +++ b/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.svelte @@ -1,242 +1,285 @@ - - {#if $ae_loc.person_id == $lq__journal_obj?.person_id || $lq__journal_entry_obj?.public} -
{ max-w-max space-y-2 " - > - - - - - -
- + > + + + + {:else} - -
-

- You must be logged in as the owner to view this Journal Entry. -

-
- -{/if} \ No newline at end of file +
+

You must be logged in as the owner to view this Journal Entry.

+
+{/if} diff --git a/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.ts b/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.ts index b029ed80..78fefef7 100644 --- a/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.ts +++ b/src/routes/journals/[journal_id]/entry/[journal_entry_id]/+page.ts @@ -4,65 +4,74 @@ console.log(`ae_p_journals [journal_entry_id] +page.ts start`); import { browser } from '$app/environment'; import { journals_func } from '$lib/ae_journals/ae_journals_functions'; -import { db_journals, journal_entry_field_li } from "$lib/ae_journals/db_journals"; +import { db_journals, journal_entry_field_li } from '$lib/ae_journals/db_journals'; import { load_ae_obj_id } from '$lib/ae_core/core__crud_generic'; -export async function load({ params, parent }) { // route - let log_lvl: number = 0; +export async function load({ params, parent }) { + // route + const log_lvl: number = 0; - let data = await parent(); - data.log_lvl = log_lvl; + const data = await parent(); + data.log_lvl = log_lvl; - let account_id = data.account_id; - let ae_acct = data[account_id]; + const account_id = data.account_id; + const ae_acct = data[account_id]; - let journal_id = params.journal_id; - ae_acct.slct.journal_id = journal_id; + const journal_id = params.journal_id; + ae_acct.slct.journal_id = journal_id; - let journal_entry_id = params.journal_entry_id; - if (!journal_entry_id) { - console.log(`ae_journals journals [journal_entry_id] +page.ts: The journal_entry_id was not found in the params!!!`); - error(404, { + const journal_entry_id = params.journal_entry_id; + if (!journal_entry_id) { + console.log( + `ae_journals journals [journal_entry_id] +page.ts: The journal_entry_id was not found in the params!!!` + ); + error(404, { message: 'Journals - Journal Entry ID not found' }); - } - ae_acct.slct.journal_entry_id = journal_entry_id; - if (log_lvl) { - console.log(`ae_journals journals [journal_entry_id] +page.ts: journal_entry_id = `, journal_entry_id); - } + } + ae_acct.slct.journal_entry_id = journal_entry_id; + if (log_lvl) { + console.log( + `ae_journals journals [journal_entry_id] +page.ts: journal_entry_id = `, + journal_entry_id + ); + } - if (browser) { - if (log_lvl) { - console.log(`ae_journals journals [journal_entry_id] +page.ts: journal_entry_id = `, journal_entry_id); - } - // Load event journal entry object - // let load_journal_entry_obj = journals_func.load_ae_obj_id__journal_entry({ - // api_cfg: ae_acct.api, - // journal_entry_id: journal_entry_id, - // try_cache: true, - // log_lvl: log_lvl - // }); + if (browser) { + if (log_lvl) { + console.log( + `ae_journals journals [journal_entry_id] +page.ts: journal_entry_id = `, + journal_entry_id + ); + } + // Load event journal entry object + // let load_journal_entry_obj = journals_func.load_ae_obj_id__journal_entry({ + // api_cfg: ae_acct.api, + // journal_entry_id: journal_entry_id, + // try_cache: true, + // log_lvl: log_lvl + // }); - let load_journal_entry_obj = load_ae_obj_id({ - api_cfg: ae_acct.api, - obj_type: 'journal_entry', - obj_id: journal_entry_id, - db_instance: db_journals, - db_field_li: journal_entry_field_li, - log_lvl: 2 - }); + const load_journal_entry_obj = load_ae_obj_id({ + api_cfg: ae_acct.api, + obj_type: 'journal_entry', + obj_id: journal_entry_id, + db_instance: db_journals, + db_field_li: journal_entry_field_li, + log_lvl: 2 + }); - if (!load_journal_entry_obj) { - error(404, { - message: 'Journals - Journal Entry not found' - }); - } else { - ae_acct.slct.load_journal_entry_obj = load_journal_entry_obj; - } - } + if (!load_journal_entry_obj) { + error(404, { + message: 'Journals - Journal Entry not found' + }); + } else { + ae_acct.slct.load_journal_entry_obj = load_journal_entry_obj; + } + } - // WARNING: Precaution against shared data between sites. - data[account_id] = ae_acct; + // WARNING: Precaution against shared data between sites. + data[account_id] = ae_acct; - return data; + return data; } diff --git a/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte b/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte index b36fd0e3..5cf4e60d 100644 --- a/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte +++ b/src/routes/journals/ae_comp__journal_entry_obj_file_li.svelte @@ -1,331 +1,334 @@ -
- +> + -

{$ae_sess.files.add_to_use_files_method == 'select' ? 'Select' : 'Upload'} and Manage Hosted Files

- - - +

+ {$ae_sess.files.add_to_use_files_method == 'select' ? 'Select' : 'Upload'} and Manage Hosted Files +

+ + + - - - - -
- + - {#snippet label()} - -
- - Upload Journal Entry files -
- - Aether hosted files only - -
- {/snippet} -
-
+ {link_to_type} + {link_to_id} + bind:hosted_file_id_li={slct_hosted_file_id_li} + bind:hosted_file_obj_li={slct_hosted_file_obj_li} + bind:hosted_file_obj_kv={slct_hosted_file_kv} + bind:upload_complete + {log_lvl} + > + {#snippet label()} + +
+ + Upload Journal Entry files +
+ + Aether hosted files only + +
+ {/snippet} + + -
- - - -
+
+ + + +
- - {#if !Object.keys(hosted_file_kv ?? {}).length} - No file(s) uploaded yet. - {:else} - - + - {#each Object.entries(hosted_file_kv) as [hosted_file_id, hosted_file_obj]} -
+ {#each Object.entries(hosted_file_kv) as [hosted_file_id, hosted_file_obj]} +
+ - + - + + +
+ {/each} -
- {/each} - - - - {/if} - + {/if}
diff --git a/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte b/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte index 31934d95..df835e52 100644 --- a/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte +++ b/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte @@ -1,867 +1,925 @@ -
- - -{#if $lq__journal_entry_obj} - -
{ bg-gray-100 dark:bg-gray-800 p-1 rounded-lg shadow-md " - > + > +
+ + - - {/if} - +

+ + + + {#if $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current'} + + + + + {:else} + + {#if $lq__journal_entry_obj?.name} + + {@html $lq__journal_entry_obj?.name} + {:else} + + {ae_util.iso_datetime_formatter( + $lq__journal_entry_obj?.created_on, + 'datetime_iso_12_no_seconds' + )} + {/if} + + {/if} + +

+
-

+
+
+ + {#if $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current'} +
+ + + + - - - - {#if $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current'} - - - - - {:else} - - {#if ($lq__journal_entry_obj?.name)} - - {@html $lq__journal_entry_obj?.name} - {:else} - - {ae_util.iso_datetime_formatter($lq__journal_entry_obj?.created_on, 'datetime_iso_12_no_seconds')} - {/if} - - {/if} - - -

- - -
-
- - - {#if $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current'} -
- - - - - - -
- {:else} - {#if $lq__journal_entry_obj.tags && $lq__journal_entry_obj.tags.length} -
- - - - - - {#each $lq__journal_entry_obj.tags.split(',') as tag} - - {tag.trim()} - - {/each} -
- {/if} - {/if} + {#each $lq__journal_entry_obj.tags.split(',') as tag} + + {tag.trim()} + + {/each} +
+ {/if} + + {#if $lq__journal_entry_obj.category_code} +
+ + + + + + {$lq__journal_entry_obj.category_code} + +
+ {/if} - - {#if $lq__journal_entry_obj.category_code} -
- - - - - - {$lq__journal_entry_obj.category_code} - -
- {/if} - - - - - - - - + > + + - - + + - - - - + + + - {/if} + + - - + + - - + + + +
- - + +
+ + - - - - - - - - - - -
- - - - - - - + - + - - -
- - - Flags: - + > + + + Flags: + - - - + + + - - - - + + + - - - + + + - - - + + + - - - + + +
+ +
+ + + + - - + +
+ // Use the Clipboard API to write the HTML content as rich text + await navigator.clipboard.write([ + new ClipboardItem({ + 'text/html': new Blob([htmlContent], { type: 'text/html' }) + }) + ]); - -
- - - - + alert('Rendered rich content copied to clipboard!'); + } catch (error) { + console.error('Failed to copy rich content:', error); + alert('Failed to copy rich content.'); + } + }} + class="btn btn-sm w-full mb-2 p-1 preset-tonal-secondary *:hover:inline lg:text-xs" + title="Copy the rich text (rendered HTML) content" + > + + + + - - +
- // Use the Clipboard API to write the HTML content as rich text - await navigator.clipboard.write([ - new ClipboardItem({ - 'text/html': new Blob([htmlContent], { type: 'text/html' }), - }), - ]); - - alert('Rendered rich content copied to clipboard!'); - } catch (error) { - console.error('Failed to copy rich content:', error); - alert('Failed to copy rich content.'); - } - }} - class="btn btn-sm w-full mb-2 p-1 preset-tonal-secondary *:hover:inline lg:text-xs" - title="Copy the rich text (rendered HTML) content" - > - - - - - - - - - - - - {#if ($lq__journal_entry_obj?.history || $lq__journal_entry_obj?.history_encrypted)} -
- - // if ($journals_sess.show__content__journal_entry_history == 'view') { - // $journals_sess.show__content__journal_entry_history = 'hide'; - // } else if ($journals_sess.show__content__journal_entry_history == 'edit') { - // $journals_sess.show__content__journal_entry_history = 'hide'; - // } else if ($journals_sess.show__content__journal_entry_history == 'hide') { - // $journals_sess.show__content__journal_entry_history = 'view'; - // } else if (!$journals_sess.show__content__journal_entry_history) { - // $journals_sess.show__content__journal_entry_history = 'view'; - // } + + decrypted_history = await ae_util.decrypt_wrapper( + tmp_entry_obj?.history_encrypted, + journal_key + ); - +
+ {/if} - decrypted_history = await ae_util.decrypt_wrapper(tmp_entry_obj?.history_encrypted, journal_key); - - // decrypted_history = await handle_decrypt_string(tmp_entry_obj.history_encrypted, journal_key); - console.log('Decrypted history:', decrypted_history); - tmp_entry_obj.history = decrypted_history; - - history_cleaned = decrypted_history.replace(/^[\u200B\u200C\u200D\u200E\u200F\uFEFF]/,""); - history_md_html = await marked.parse(history_cleaned ?? '') ?? null; - tmp_entry_obj.history_md_html = history_md_html; - // console.log('History cleaned:', history_cleaned); - console.log('History md html:', history_md_html); - } - }} - class="btn btn-sm preset-tonal-secondary hover:preset-filled-secondary-500 *:hover:inline lg:text-xs" - title="Toggle edit mode for history of this journal entry" - > - {#if !$journals_sess?.show__content__journal_entry_history || $journals_sess?.show__content__journal_entry_history == 'view'} - - {:else if $journals_sess?.show__content__journal_entry_history == 'edit'} - - {/if} - - - - - {/if} - - -
- + title="Generate AI summary of this journal entry" + > + {#await ae_promises} + + Summarizing... + {:then} + + Summarize + {:catch error} + Error + {/await} + - {#if !$journals_sess?.entry?.show__ai_summary && $journals_sess?.entry?.ai_summary} - - {:else if !$journals_sess?.entry?.show__ai_summary && $lq__journal_entry_obj?.summary} - + {:else if !$journals_sess?.entry?.show__ai_summary && $lq__journal_entry_obj?.summary} + - {/if} -
+ title="Show saved summary of this journal entry" + > + + Use Saved Summary + + {/if} + -
+
- -
- - + +
+ + - - - - - {#if $lq__journal_entry_obj?.sort} - {$lq__journal_entry_obj.sort} - {:else} - - - {/if} - - - + + + + + {#if $lq__journal_entry_obj?.sort} + {$lq__journal_entry_obj.sort} + {:else} + + + {/if} + + + + + { + update_journal_entry(); + }} + class:hidden={!$ae_loc.edit_mode} + class="input input-sm input-bordered w-full mb-2" + title="Set group (for sorting) of this journal entry" + /> - - { - update_journal_entry(); - }} - class:hidden={!$ae_loc.edit_mode} - class="input input-sm input-bordered w-full mb-2" - title="Set group (for sorting) of this journal entry" - /> + + + { + update_journal_entry(); + }} + class:hidden={!$ae_loc.edit_mode} + class="input input-sm input-bordered w-auto border-none" + title="Set archive on datetime for archiving this journal entry" + /> - - + {#if $lq__journal_entry_obj?.archive_on} + + + {:else} + + + {/if} + - { - update_journal_entry(); - }} - class:hidden={!$ae_loc.edit_mode} - class="input input-sm input-bordered w-auto border-none" - title="Set archive on datetime for archiving this journal entry" - /> + + - {#if $lq__journal_entry_obj?.archive_on} - - - {:else} - - - {/if} - + + - - + + +
- - + + {#if $ae_loc.edit_mode && $lq__journal_obj_li?.length} +
+ + + + - - - -
- - - {#if $ae_loc.edit_mode && $lq__journal_obj_li?.length} -
- - - - - - - -
- {/if} + bind:value={tmp_entry_obj.journal_id} + onchange={(event) => { + tmp_entry_obj.journal_id = event.target.value; + console.log('Selected journal:', tmp_entry_obj.journal_id); + if (confirm(`Are you sure you want to change the journal for this entry?`)) { + change_journal_id(); + } + }} + title="Select a different journal for this entry" + > + + {#each $lq__journal_obj_li as journal} + + {/each} + +
+ {/if} + + +
+ +
- - - -
- - - - - - - - - - - + -
bg-gray-100 dark:bg-gray-800 p-1 rounded-lg shadow-md " - class:bg-yellow-50={$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current'} - class:dark:bg-yellow-950={$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current'} - > + class:bg-yellow-50={$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == + 'current'} + class:dark:bg-yellow-950={$journals_loc.entry.edit_kv[ + $lq__journal_entry_obj?.journal_entry_id + ] == 'current'} + > + {#if $journals_sess?.entry?.ai_summary} + + {:else if !$journals_sess?.entry?.show__ai_summary && $journals_sess?.entry?.ai_summary} + - {:else} - {#if !$journals_sess?.entry?.show__ai_summary && $journals_sess?.entry?.ai_summary} - - {:else if !$journals_sess?.entry?.show__ai_summary && $lq__journal_entry_obj?.summary} - + {:else if !$journals_sess?.entry?.show__ai_summary && $lq__journal_entry_obj?.summary} + - {/if} + title="Show saved summary of this journal entry" + > + + Use Saved Summary + + {/if} - {/if} - - - -{#if (!$journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id])} - - {#if $lq__journal_obj?.cfg_json?.pref_viewer == 'codemirror'} - - {:else if $lq__journal_obj?.cfg_json?.pref_viewer == 'plain'} -
                 shadow-md rounded-lg
                 border border-gray-200 dark:border-gray-700
                 hover:border-green-500 dark:hover:border-green-500
-                "
-                >
+                ">
                 {#if tmp_entry_obj.content}
-                {tmp_entry_obj.content}
-                {/if}
+							{tmp_entry_obj.content}
+						{/if}
         
- {:else} -
prose-h1:m-0 prose-h2:m-0 prose-h3:m-0 prose-h4:m-0 prose-h5:m-0 prose-h6:m-0 prose-li:m-0 prose-li:p-0 prose-li:line-height-none " - id="rendered_journal_entry_content_{$lq__journal_entry_obj?.journal_entry_id}" - > - {#if tmp_entry_obj.content_md_html} - {@html tmp_entry_obj.content_md_html} - {:else if tmp_entry_obj?.content_encrypted && tmp_entry_obj?.private} -
+ id="rendered_journal_entry_content_{$lq__journal_entry_obj?.journal_entry_id}" + > + {#if tmp_entry_obj.content_md_html} + {@html tmp_entry_obj.content_md_html} + {:else if tmp_entry_obj?.content_encrypted && tmp_entry_obj?.private} +
+
+ Encrypted: +
-
Encrypted:
- -
- {tmp_entry_obj?.content_encrypted} -
-
- {/if} - {:else} {@html $lq__journal_entry_obj?.content_md_html} {/if} --> -
- {/if} - return base64; }} --> - - - + + + - {#if $lq__journal_entry_obj?.data_json?.hosted_file_kv} -
- - - - - + {#if $lq__journal_entry_obj?.data_json?.hosted_file_kv} +
+ + + + + - {#each Object.entries($lq__journal_entry_obj?.data_json?.hosted_file_kv) as [key, hosted_file_obj]} + {#each Object.entries($lq__journal_entry_obj?.data_json?.hosted_file_kv) as [key, hosted_file_obj]} + + {/each} +
+ {/if} + {:else if $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current'} + + - - - {/each} -
- {/if} - - -{:else if ($journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'current')} - - - - {#if (!tmp_entry_obj?.content && tmp_entry_obj?.content_encrypted)} -
border border-red-200 dark:border-red-700 hover:border-red-500 dark:hover:border-red-500 " - > -
The entry must be decrypted before it can be edited.
- {#if tmp_entry_obj?.content === false && $journals_sess?.journal_kv[$lq__journal_obj?.id]?.journal_passcode_verified} -
- - Decryption failed. Check the passcode(s). -
- {:else if tmp_entry_obj?.content === false} -
- - Decryption failed. You may need to enter the Journal's private passcode. -
- {/if} - {#if tmp_entry_obj?.content === false && $lq__journal_obj?.id && $journals_sess?.journal_kv[$lq__journal_obj?.id]?.journal_passcode_verified} -
- This might not be encoded with the private passcode or a passcode has changed? -
- {/if} - --> -
- {:else} - - - + - {#if $lq__journal_obj?.cfg_json?.pref_editor == 'codemirror'} - - - {:else} - - {/if} + placeholder="Edit journal entry content here..." + > + {/if} - - - + > + + Save Changes + - - {#if updated_idb} - - WARNING: IDB object has been updated since last load. - - {/if} - + {#if updated_idb} + + WARNING: IDB object has been updated since last load. + + {/if} + - + - - + > + + Save Changes + - + + {/if} - {/if} + {#if $lq__journal_entry_obj?.journal_entry_id} + + + {#if $lq__journal_entry_obj?.data_json?.hosted_file_kv} +
+ + + + + - {#if $lq__journal_entry_obj?.journal_entry_id} - - - - {#if $lq__journal_entry_obj?.data_json?.hosted_file_kv} -
- - - - - - - {#each Object.entries($lq__journal_entry_obj?.data_json?.hosted_file_kv) as [key, hosted_file_obj]} - - - - {/each} -
- {/if} - - - - {:else} -
- - Save the form first before uploading a file. -
- {/if} - -{:else if ($journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'history')} - -
+ {/each} +
+ {/if} + {:else} +
+ + Save the form first before uploading a file. +
+ {/if} + {:else if $journals_loc.entry.edit_kv[$lq__journal_entry_obj?.journal_entry_id] == 'history'} +
- {#if $journals_sess?.show__content__journal_entry_history == 'view'} - {@html tmp_entry_obj?.history_md_html} --> - - {:else if $journals_sess?.show__content__journal_entry_history == 'edit'} - placeholder="Edit journal entry content here..." > --> - - {/if} -
+ /> + {/if} +
+ {/if} - - -{/if} - - +
- - - - - - - - - - + + + - - + - - +
+ + {#if !$ae_loc.edit_mode} + + {ae_util.iso_datetime_formatter( + $lq__journal_entry_obj?.created_on, + 'datetime_iso_12_no_seconds' + )} + {$lq__journal_entry_obj?.updated_on + ? ` | Last updated: ${ae_util.iso_datetime_formatter($lq__journal_entry_obj?.updated_on, 'datetime_iso_12_no_seconds')}` + : ''} + + {:else} + + {ae_util.iso_datetime_formatter($lq__journal_entry_obj?.created_on, 'datetime_iso_tz')} + {$lq__journal_entry_obj?.updated_on + ? ` | Last updated: ${ae_util.iso_datetime_formatter($lq__journal_entry_obj?.updated_on, 'datetime_iso_tz')}` + : ''} + + {/if} + +
-
+ {#if $journals_sess?.entry?.show__ai_summary && $journals_sess?.entry?.ai_summary} + +
+ + // let msg_role_system_content = $journals_loc?.entry?.llm__system_prompt || 'You are a helpful assistant that helps people find information.'; + // let msg_role_user_content = 'Why is the sky blue?'; + let msg_role_user_content = tmp_entry_obj?.content; - + try { + ae_promises = ai_client.chat.completions + .create({ + model: $journals_loc?.llm__api_model, + messages: [ + { + role: 'system', + content: + $journals_loc?.entry?.llm__system_prompt || + 'You are a helpful assistant that helps people find information.' + }, + { role: 'user', content: msg_role_user_content } + ] + // max_tokens: 512, + // temperature: 0.7, + // stream: true, + }) + .then((resp__chat) => { + console.log('AI API Response (chat)', resp__chat); + console.log('AI API Response (chat)', resp__chat); - + title="Generate AI summary of this journal entry" + > + {#await ae_promises} + + Summarizing... + {:then} + + Re-Summarize + {:catch error} + Error + {/await} + - - + + - + on:change={(e) => { + $journals_loc.entry.llm__system_prompt = e.detail; + }} + /> + + - - - - - - - -{/if} - -{:else} -
- - The Journal Entry was not found or is not available to show. - -
-{/if} - + /> + + + {/if} + {:else} +
+ + The Journal Entry was not found or is not available to show. + +
+ {/if} diff --git a/src/routes/journals/ae_comp__journal_entry_obj_li.svelte b/src/routes/journals/ae_comp__journal_entry_obj_li.svelte index e3f9aff5..b872d6d3 100644 --- a/src/routes/journals/ae_comp__journal_entry_obj_li.svelte +++ b/src/routes/journals/ae_comp__journal_entry_obj_li.svelte @@ -1,79 +1,91 @@ -
-{#if $lq__journal_entry_obj_li && $lq__journal_entry_obj_li.length} - - -{#each $lq__journal_entry_obj_li as journals_journal_entry_obj, index} - - - - -
{ hover:border-gray-300 transition-all duration-500 ease-out " - class:dim={!journals_journal_entry_obj.enable} - class:bg-warning-100={!journals_journal_entry_obj?.enable} - > -
+ class:dim={!journals_journal_entry_obj.enable} + class:bg-warning-100={!journals_journal_entry_obj?.enable} + > +
+ + + {#if journals_journal_entry_obj.alert} + + {/if} - + {#if journals_journal_entry_obj.priority} + + {/if} + {#if journals_journal_entry_obj.group} + + + + {/if} + - - {#if (journals_journal_entry_obj.alert)} - - {/if} +

+ {#if journals_journal_entry_obj.template} + - {#if (journals_journal_entry_obj.priority)} - - {/if} + {@html journals_journal_entry_obj.name ?? '-- no name --'} + {:else if journals_journal_entry_obj.name} + + {@html journals_journal_entry_obj.name} + {:else} + + {ae_util.iso_datetime_formatter( + journals_journal_entry_obj.created_on, + 'datetime_iso_12_no_seconds' + )} + {/if} +

- {#if (journals_journal_entry_obj.group)} - - - - {/if} -
+ + {#if !journals_journal_entry_obj.private} + + - {#if journals_journal_entry_obj.template} - + + - + + + // Use the Clipboard API to write the HTML content as rich text + await navigator.clipboard.write([ + new ClipboardItem({ + 'text/html': new Blob([htmlContent], { type: 'text/html' }) + }) + ]); - - - navigator.clipboard.writeText(htmlContent).then(() => { - alert('Rendered HTML content copied to clipboard!'); - }).catch((error) => { - console.error('Failed to copy HTML content:', error); - alert('Failed to copy HTML content.'); - }); - }} - class:hidden={journals_journal_entry_obj.template || $lq__journal_obj?.cfg_json?.hide_copy_html} - class="btn btn-sm p-1 preset-tonal-secondary hover:preset-filled-secondary-500 *:hover:inline lg:text-xs" - title="Copy the rendered HTML content" - > - - - - - + + - try { - // Get the rendered HTML content - const htmlContent = element.innerHTML; + + {:else} + + + + - // Use the Clipboard API to write the HTML content as rich text - await navigator.clipboard.write([ - new ClipboardItem({ - 'text/html': new Blob([htmlContent], { type: 'text/html' }), - }), - ]); + + + navigator.clipboard + .writeText(tmp_entry_obj.content_encrypted) + .then(() => { + alert('Encrypted content copied to clipboard!'); + }) + .catch((error) => { + console.error('Failed to copy content:', error); + alert('Failed to copy content.'); + }); + }} + class:hidden={$lq__journal_obj?.cfg_json?.hide_copy_encrypted} + class="btn btn-sm p-1 preset-tonal-secondary hover:preset-filled-secondary-500 *:hover:inline text-xs lg:text-sm" + title="Copy the encrypted content" + > + + + + + + + {/if} + +
- - + + {#if journals_journal_entry_obj.tags && journals_journal_entry_obj.tags.length} +
+ + - + {#each journals_journal_entry_obj.tags.split(',') as tag} + + {tag.trim()} + + {/each} +
+ {/if} - {:else} + + {#if journals_journal_entry_obj.category_code} + + + {/if} - - - - + + + + - - +
+ - navigator.clipboard.writeText(tmp_entry_obj.content_encrypted).then(() => { - alert('Encrypted content copied to clipboard!'); - }).catch((error) => { - console.error('Failed to copy content:', error); - alert('Failed to copy content.'); - }); - }} - class:hidden={$lq__journal_obj?.cfg_json?.hide_copy_encrypted} - class="btn btn-sm p-1 preset-tonal-secondary hover:preset-filled-secondary-500 *:hover:inline text-xs lg:text-sm" - title="Copy the encrypted content" - > - - - - - - - - - {/if} - - - - - - -
- -
- - - - {journals_journal_entry_obj?.data_json?.hosted_file_kv - ? Object.keys(journals_journal_entry_obj?.data_json?.hosted_file_kv).length - : 0}× - -
- - - {#if journals_journal_entry_obj.tags && journals_journal_entry_obj.tags.length} -
- - - - {#each journals_journal_entry_obj.tags.split(',') as tag} - - {tag.trim()} - - {/each} -
- {/if} - - - {#if journals_journal_entry_obj.category_code} - - - {/if} - - - - - - - - -
- - - - {#if journals_journal_entry_obj.content} - -
{ active:z-10 hover:bg-blue-100 hover:border-blue-500 dark:hover:border-blue-500 overflow-scroll - {$journals_slct.journal_obj.cfg_json.entry_li_max_height ? `${$journals_slct.journal_obj.cfg_json.entry_li_max_height}` : ''} + {$journals_slct.journal_obj.cfg_json.entry_li_max_height + ? `${$journals_slct.journal_obj.cfg_json.entry_li_max_height}` + : ''} - {$journals_slct.journal_obj.cfg_json.entry_li_click_max_height ? `${$journals_slct.journal_obj.cfg_json.entry_li_click_max_height}` : ''} + {$journals_slct.journal_obj.cfg_json.entry_li_click_max_height + ? `${$journals_slct.journal_obj.cfg_json.entry_li_click_max_height}` + : ''} - {$journals_slct.journal_obj.cfg_json.entry_li_hover_max_height ? `${$journals_slct.journal_obj.cfg_json.entry_li_hover_max_height}` : ''} + {$journals_slct.journal_obj.cfg_json.entry_li_hover_max_height + ? `${$journals_slct.journal_obj.cfg_json.entry_li_hover_max_height}` + : ''} " - > - {@html journals_journal_entry_obj.content} -
+ > + {@html journals_journal_entry_obj.content} + - - - {/if} + + + {/if} - -
- - -
- Original date/time: - {#if journals_journal_entry_obj.original_datetime} - {ae_util.iso_datetime_formatter(journals_journal_entry_obj.original_datetime, 'datetime_12_long')} - {/if} - {#if journals_journal_entry_obj.original_timezone} - Timezone: - {journals_journal_entry_obj.original_timezone} - {/if} -
+
+ Original date/time: + {#if journals_journal_entry_obj.original_datetime} + {ae_util.iso_datetime_formatter( + journals_journal_entry_obj.original_datetime, + 'datetime_12_long' + )} + {/if} + {#if journals_journal_entry_obj.original_timezone} + Timezone: + {journals_journal_entry_obj.original_timezone} + {/if} +
+
-
- - -
- - - - Created: - {ae_util.iso_datetime_formatter(journals_journal_entry_obj.created_on, 'datetime_12_long')} - - - Last update: - {ae_util.iso_datetime_formatter(journals_journal_entry_obj.updated_on, 'datetime_12_long')} - - + + + Created: + {ae_util.iso_datetime_formatter( + journals_journal_entry_obj.created_on, + 'datetime_12_long' + )} + + + Last update: + {ae_util.iso_datetime_formatter( + journals_journal_entry_obj.updated_on, + 'datetime_12_long' + )} + + - - + + +
+ + {/each} - - - - - - - -{/each} - - - -{#if $journals_sess.show__modal_append__journal_entry_id} - - + + + + {/if} + {:else} +

No journal entry available to show.

+ {/if} diff --git a/src/routes/journals/ae_comp__journal_entry_obj_qry.svelte b/src/routes/journals/ae_comp__journal_entry_obj_qry.svelte index 449344e2..7e28cb1e 100644 --- a/src/routes/journals/ae_comp__journal_entry_obj_qry.svelte +++ b/src/routes/journals/ae_comp__journal_entry_obj_qry.svelte @@ -1,202 +1,223 @@ - - - - - { - if (event.key === 'Enter') { - // $journals_loc.qry__search_text = event.target.value; - $journals_trig.journal_entry_qry = true; - } - }} - title={`Search for Entries in "${$lq__journal_obj?.name}. Press Enter to search.`} - autocomplete="off" - class=" + + { + if (event.key === 'Enter') { + // $journals_loc.qry__search_text = event.target.value; + $journals_trig.journal_entry_qry = true; + } + }} + title={`Search for Entries in "${$lq__journal_obj?.name}. Press Enter to search.`} + autocomplete="off" + class=" input input-sm input-bordered w-44 md:w-52 text-sm " - class:bg-red-200={$journals_sess.entry_li == null} - class:dark:bg-red-800={$journals_sess.entry_li == null} - /> - - + title="Clear search query text" + > + + + {#await $journals_prom.load__journal_entry_obj_li} + Loading... + {:then load_result} + {#if load_result === null} + + No entries found - null + + {:else if load_result?.length === 0} + + No entries found + + {:else if $journals_sess.entry_li?.length === 0} + Enter to search + {:else} + + {load_result?.length ?? 0} found + + {/if} + {:catch error} + + Error loading entries. + + {/await} + - - - { - // WARNING: This will cause pages to reset if the journal entry list is being filtered by category. This is a bug that should be fixed. - $journals_loc.qry__category_code = event.target.value; - $journals_loc.filter__category_code = event.target.value; - $journals_trig.journal_entry_li = true; - console.log('Selected category:', $journals_loc.qry__category_code); - }} - title="Select a category for the new journal entry" - > - - {#each $lq__journal_obj?.cfg_json?.category_li as category} - - {/each} - - \ No newline at end of file + bind:value={$journals_loc.qry__category_code} + onchange={(event) => { + // WARNING: This will cause pages to reset if the journal entry list is being filtered by category. This is a bug that should be fixed. + $journals_loc.qry__category_code = event.target.value; + $journals_loc.filter__category_code = event.target.value; + $journals_trig.journal_entry_li = true; + console.log('Selected category:', $journals_loc.qry__category_code); + }} + title="Select a category for the new journal entry" + > + + {#each $lq__journal_obj?.cfg_json?.category_li as category} + + {/each} + +
diff --git a/src/routes/journals/ae_comp__journal_obj_id_edit.svelte b/src/routes/journals/ae_comp__journal_obj_id_edit.svelte index 6b7c2aa0..65a1ecc8 100644 --- a/src/routes/journals/ae_comp__journal_obj_id_edit.svelte +++ b/src/routes/journals/ae_comp__journal_obj_id_edit.svelte @@ -1,1222 +1,1207 @@ - +> + {#snippet header()} +

+ + + + + Edit Journal / Settings: + + {$lq__journal_obj?.name ?? '-- not set --'} +

+ {/snippet} - {#snippet header()} -

- - - - - Edit Journal / Settings: - - {$lq__journal_obj?.name ?? '-- not set --'} -

- {/snippet} + - - - - - - - - - - - - - - - -
- - - - - - - - {#if $lq__journal_obj?.sort} - {$lq__journal_obj.sort} - {:else} - - {/if} - - - - - - { - let data_kv = { - group: tmp__journal_obj.group, - }; - journals_func.update_ae_obj__journal({ - api_cfg: $ae_api, - journal_id: $lq__journal_obj?.journal_id, - data_kv: data_kv, - log_lvl: log_lvl - }).then(() => { - alert('Journal group updated successfully!'); - }).catch((error) => { - console.error('Error updating journal group:', error); - alert('Failed to update journal group.'); - }); - }} - class="input input-sm input-bordered w-24" - title="Set group (for sorting) of this journal" - /> - - - - - - - - - -
- -{/if} - - - - - - {#snippet footer()} -
- + > + - -
- {/snippet} -
\ No newline at end of file + + + {/snippet} + diff --git a/src/routes/journals/ae_comp__journal_obj_id_view.svelte b/src/routes/journals/ae_comp__journal_obj_id_view.svelte index 2eca9ea8..e618fed2 100644 --- a/src/routes/journals/ae_comp__journal_obj_id_view.svelte +++ b/src/routes/journals/ae_comp__journal_obj_id_view.svelte @@ -1,143 +1,159 @@ - -
+ bind:clientHeight={$ae_loc.iframe_height_modal_body} +> +
+

+ + {@html $lq__journal_obj?.name ?? 'Loading...'} + {#if $ae_loc.trusted_access && $ae_loc.edit_mode} + ({$lq__journal_entry_obj_li?.length ?? '0'}×) + {/if} + {#await $journals_prom.load__journal_entry_obj_li} + + {:then} + + {/await} +

-
-

- - {@html $lq__journal_obj?.name ?? 'Loading...'} - {#if $ae_loc.trusted_access && $ae_loc.edit_mode} - ({$lq__journal_entry_obj_li?.length ?? '0'}×) - {/if} - {#await $journals_prom.load__journal_entry_obj_li} - - {:then} - - {/await} -

- - -
- -
- - + title="Toggle menu" + > + + + - - - + + + { + // console.log('HERE'); + // verify_journal_passcode(); + }} + class="input input-sm input-bordered w-full mb-2" + title="Enter private passcode of this journal" + /> - - - { - // console.log('HERE'); - // verify_journal_passcode(); - }} - class="input input-sm input-bordered w-full mb-2" - title="Enter private passcode of this journal" - /> + {#if $journals_sess?.journal_kv[$lq__journal_obj?.id]?.journal_passcode_verified} +
+ + Journal passcode verified +
+ {:else} +
+ + Journal passcode not verified {$lq__journal_obj?.private_passcode ?? '??'} +
+ {/if} +
+ +
+ + - {#if $journals_sess?.journal_kv[$lq__journal_obj?.id]?.journal_passcode_verified} -
- - Journal passcode verified -
- {:else} -
- - Journal passcode not verified {$lq__journal_obj?.private_passcode ?? '??'} -
- {/if} - - - - - - - - - - - - - - -{#if $lq__journal_obj?.description && $ae_loc.edit_mode} -
- {@html $lq__journal_obj.description_md_html} -
-{/if} - - - - - - \ No newline at end of file + > + {@html $lq__journal_obj.description_md_html} + + {/if} + + diff --git a/src/routes/journals/ae_comp__journal_obj_li.svelte b/src/routes/journals/ae_comp__journal_obj_li.svelte index 208c726c..e45d44ea 100644 --- a/src/routes/journals/ae_comp__journal_obj_li.svelte +++ b/src/routes/journals/ae_comp__journal_obj_li.svelte @@ -1,84 +1,86 @@ -
-{#if $lq__journal_obj_li && $lq__journal_obj_li.length} - -{#each $lq__journal_obj_li as journals_journal_obj, index} -
- -
-

+ > +

+ + {@html journals_journal_obj.name} +

- - {@html journals_journal_obj.name} - - - - - {#if journals_journal_obj.type_code} - - - {journals_journal_obj.type_code} - - {/if} -
+ > + + {journals_journal_obj.type_code} + + {/if} + - + - {#if journals_journal_obj.description && $ae_loc.edit_mode} -
- {@html journals_journal_obj.description_md_html} -
- {/if} + > + {@html journals_journal_obj.description_md_html} +
+ {/if} -
+ - {#if journals_journal_obj?.journal_entry_count} - - {@html (journals_journal_obj?.journal_entry_count == 1 ? `${journals_journal_obj?.journal_entry_count}× entry` : `${journals_journal_obj?.journal_entry_count}× entries` )} - - {/if} - -
- - - - - -{/each} - -{:else} - No journals found at this time -{/if} + + + {/each} + {:else} + No journals found at this time + {/if}
diff --git a/src/routes/journals/ae_comp__obj_core_props.svelte b/src/routes/journals/ae_comp__obj_core_props.svelte index 6f26357d..d27ae3b9 100644 --- a/src/routes/journals/ae_comp__obj_core_props.svelte +++ b/src/routes/journals/ae_comp__obj_core_props.svelte @@ -1,322 +1,365 @@
- - - + + - - - - - {#if obj_sort} - {obj_sort} - {:else} - - - {/if} - - - + + + + + {#if obj_sort} + {obj_sort} + {:else} + + + {/if} + + + + + { + // update_journal_entry(); + }} + class:hidden={!$ae_loc.edit_mode} + class="input input-sm input-bordered w-24" + title="Set group (for sorting) of this journal entry" + /> - - { - // update_journal_entry(); - }} - class:hidden={!$ae_loc.edit_mode} - class="input input-sm input-bordered w-24" - title="Set group (for sorting) of this journal entry" - /> + + + { + // update_journal_entry(); + }} + class:hidden={!$ae_loc.edit_mode} + class="input input-sm input-bordered w-auto border-none" + title="Set archive on datetime for archiving this journal entry" + /> - - + {#if obj_archive_on} + + + {:else} + + + {/if} + - { - // update_journal_entry(); - }} - class:hidden={!$ae_loc.edit_mode} - class="input input-sm input-bordered w-auto border-none" - title="Set archive on datetime for archiving this journal entry" - /> + + - {#if obj_archive_on} - - - {:else} - - - {/if} - + + - - + + - - + + {#if !$ae_loc.edit_mode} + + {ae_util.iso_datetime_formatter( + $lq__journal_entry_obj?.created_on, + 'datetime_iso_12_no_seconds' + )} + {$lq__journal_entry_obj?.updated_on + ? ` | Last updated: ${ae_util.iso_datetime_formatter($lq__journal_entry_obj?.updated_on, 'datetime_iso_12_no_seconds')}` + : ''} + + {:else} + + {ae_util.iso_datetime_formatter($lq__journal_entry_obj?.created_on, 'datetime_iso_tz')} + {$lq__journal_entry_obj?.updated_on + ? ` | Last updated: ${ae_util.iso_datetime_formatter($lq__journal_entry_obj?.updated_on, 'datetime_iso_tz')}` + : ''} + + {/if} + - - - - - -{#if !$ae_loc.edit_mode} - - {ae_util.iso_datetime_formatter($lq__journal_entry_obj?.created_on, 'datetime_iso_12_no_seconds')} - {$lq__journal_entry_obj?.updated_on ? - ` | Last updated: ${ae_util.iso_datetime_formatter($lq__journal_entry_obj?.updated_on, 'datetime_iso_12_no_seconds')}` : ''} - -{:else} - - {ae_util.iso_datetime_formatter($lq__journal_entry_obj?.created_on, 'datetime_iso_tz')} - {$lq__journal_entry_obj?.updated_on ? - ` | Last updated: ${ae_util.iso_datetime_formatter($lq__journal_entry_obj?.updated_on, 'datetime_iso_tz')}` : ''} - -{/if} - - - - -{#if $ae_loc.edit_mode && $lq__journal_obj_li?.length} -
- - - - { - tmp_entry_obj.journal_id = event.target.value; - console.log('Selected journal:', tmp_entry_obj.journal_id); - if (confirm(`Are you sure you want to change the journal for this entry?`)) { - change_journal_id(); - } - }} - title="Select a different journal for this entry" - > - - {#each $lq__journal_obj_li as journal} - - {/each} - -
-{/if} - - + bind:value={tmp_entry_obj.journal_id} + onchange={(event) => { + tmp_entry_obj.journal_id = event.target.value; + console.log('Selected journal:', tmp_entry_obj.journal_id); + if (confirm(`Are you sure you want to change the journal for this entry?`)) { + change_journal_id(); + } + }} + title="Select a different journal for this entry" + > + + {#each $lq__journal_obj_li as journal} + + {/each} + + + {/if}
diff --git a/src/routes/journals/hold+layout.svelte b/src/routes/journals/hold+layout.svelte deleted file mode 100644 index 8d23a094..00000000 --- a/src/routes/journals/hold+layout.svelte +++ /dev/null @@ -1,65 +0,0 @@ - - - - Notes - {$notes_loc.title ?? 'Æ loading...'} - - -
- - - -
-{#if $ae_loc.administrator_access} -

Administrator Access - Technical Support

-

You are accessing the notes module with "administrator" level permissions.

-{:else if $ae_loc.trusted_access} -

Trusted Access - Staff

-

You are accessing the notes module with "trusted" level permissions.

-{:else if !$ae_loc.trusted_access} -

Restricted Access

-

You are accessing to the notes module is limited

-{/if} -
- -
- {@render children?.()} -
- -
\ No newline at end of file diff --git a/src/routes/journals/hold+layout.ts b/src/routes/journals/hold+layout.ts deleted file mode 100644 index 199685f2..00000000 --- a/src/routes/journals/hold+layout.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** @type {import('./$types').LayoutLoad} */ - -// import { error } from '@sveltejs/kit'; -import { browser } from '$app/environment'; - -// import { api } from '$lib/api'; -// import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores'; -// import { core_func } from '$lib/ae_core/ae_core_functions'; -// import type { key_val } from '$lib/ae_stores'; - - -export async function load({ fetch, params, parent, route, url }) { - let log_lvl: number = 0; - - let parent_data = await parent(); - - let account_id = parent_data.account_id; - - let ae_acct = parent_data[account_id]; - if (log_lvl) { - console.log(`ae_acct = `, ae_acct); - } - - - // let ae_params = {}; - - if (browser) { - - } - - parent_data[account_id] = ae_acct; - - return parent_data; -} \ No newline at end of file diff --git a/src/routes/journals/modal_journals_config.svelte b/src/routes/journals/modal_journals_config.svelte index e7910e34..b7134c02 100644 --- a/src/routes/journals/modal_journals_config.svelte +++ b/src/routes/journals/modal_journals_config.svelte @@ -1,49 +1,87 @@ - +> + {#snippet header()} +

+ + + + + Æ Journals Settings: + + {$journals_loc?.name ?? '-- not set --'} +

+ {/snippet} -{#snippet header()} -

- - - - - Æ Journals Settings: - - {$journals_loc?.name ?? '-- not set --'} -

-{/snippet} - - - - -
- + - -
+ + + - - - -{#snippet footer()} - -{/snippet} - -
\ No newline at end of file + {#snippet footer()} + + {/snippet} + diff --git a/src/routes/not_used+layout.server.js b/src/routes/not_used+layout.server.js deleted file mode 100644 index bb26165b..00000000 --- a/src/routes/not_used+layout.server.js +++ /dev/null @@ -1,11 +0,0 @@ -// export const ssr = false; -// export const prerender = true -// export const prerender = false; -// export const trailingSlash = 'always'; // 'never' | 'always' | 'ignore' - - -// import { TESTING } from '$env/static/private'; -// console.log(`Aether Config - TESTING:`, TESTING); - -// import { PRIVATE_TESTING } from '$env/static/private'; -// console.log(`Aether Config - TESTING:`, PRIVATE_TESTING); \ No newline at end of file diff --git a/src/routes/not_used+page.server.ts b/src/routes/not_used+page.server.ts deleted file mode 100644 index bb26165b..00000000 --- a/src/routes/not_used+page.server.ts +++ /dev/null @@ -1,11 +0,0 @@ -// export const ssr = false; -// export const prerender = true -// export const prerender = false; -// export const trailingSlash = 'always'; // 'never' | 'always' | 'ignore' - - -// import { TESTING } from '$env/static/private'; -// console.log(`Aether Config - TESTING:`, TESTING); - -// import { PRIVATE_TESTING } from '$env/static/private'; -// console.log(`Aether Config - TESTING:`, PRIVATE_TESTING); \ No newline at end of file diff --git a/src/routes/not_used+page.ts b/src/routes/not_used+page.ts deleted file mode 100644 index 66ede663..00000000 --- a/src/routes/not_used+page.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** @type {import('./$types').PageLoad} */ - -export function load() { - // return { - // ae_root_page_ts: true, - // }; -} diff --git a/src/routes/testing/+layout.ts b/src/routes/testing/+layout.ts index 8c04173b..7c7e714b 100644 --- a/src/routes/testing/+layout.ts +++ b/src/routes/testing/+layout.ts @@ -1 +1 @@ -// export const prerender = true \ No newline at end of file +// export const prerender = true diff --git a/src/routes/testing/+page.svelte b/src/routes/testing/+page.svelte index 3aff8030..283984fe 100644 --- a/src/routes/testing/+page.svelte +++ b/src/routes/testing/+page.svelte @@ -1,170 +1,160 @@ -

Aether - Sponsorships (testing)

-
- -
- +
-