@taazkareem/clickup-mcp-server 0.12.12 → 0.12.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +31 -24
  2. package/build/auth/routes.js +1 -1
  3. package/build/config.js +1 -1
  4. package/build/index.js +1 -1
  5. package/build/license.js +1 -1
  6. package/build/logger.js +1 -1
  7. package/build/middleware/auth.js +1 -1
  8. package/build/middleware/security.js +1 -1
  9. package/build/server.js +1 -1
  10. package/build/services/clickup/base.js +1 -1
  11. package/build/services/clickup/bulk.js +1 -1
  12. package/build/services/clickup/chat.js +1 -1
  13. package/build/services/clickup/document.js +1 -1
  14. package/build/services/clickup/folder.js +1 -1
  15. package/build/services/clickup/index.js +1 -1
  16. package/build/services/clickup/list.js +1 -1
  17. package/build/services/clickup/tag.js +1 -1
  18. package/build/services/clickup/task/index.js +1 -1
  19. package/build/services/clickup/task/task-attachments.js +1 -1
  20. package/build/services/clickup/task/task-comments.js +1 -1
  21. package/build/services/clickup/task/task-core.js +1 -1
  22. package/build/services/clickup/task/task-custom-fields.js +1 -1
  23. package/build/services/clickup/task/task-relationships.js +1 -1
  24. package/build/services/clickup/task/task-search.js +1 -1
  25. package/build/services/clickup/task/task-service.js +1 -1
  26. package/build/services/clickup/task/task-tags.js +1 -1
  27. package/build/services/clickup/time.js +1 -1
  28. package/build/services/clickup/types.js +1 -1
  29. package/build/services/clickup/workspace.js +1 -1
  30. package/build/services/oauth.js +1 -1
  31. package/build/services/shared.js +1 -1
  32. package/build/sse_server.js +1 -1
  33. package/build/tools/chat/handlers.js +1 -1
  34. package/build/tools/chat/index.js +1 -1
  35. package/build/tools/chat/utils.js +1 -1
  36. package/build/tools/documents.js +1 -1
  37. package/build/tools/feedback.js +1 -1
  38. package/build/tools/folder.js +1 -1
  39. package/build/tools/index.js +1 -1
  40. package/build/tools/list.js +1 -1
  41. package/build/tools/member.js +1 -1
  42. package/build/tools/tag.js +1 -1
  43. package/build/tools/task/attachments.js +1 -1
  44. package/build/tools/task/bulk-operations.js +1 -1
  45. package/build/tools/task/handlers.js +1 -1
  46. package/build/tools/task/index.js +1 -1
  47. package/build/tools/task/main.js +1 -1
  48. package/build/tools/task/markdown-converter.js +1 -1
  49. package/build/tools/task/relationships.js +1 -1
  50. package/build/tools/task/single-operations.js +1 -1
  51. package/build/tools/task/time-tracking.js +1 -1
  52. package/build/tools/task/utilities.js +1 -1
  53. package/build/tools/task/workspace-operations.js +1 -1
  54. package/build/tools/utils.js +1 -1
  55. package/build/tools/workspace.js +1 -1
  56. package/build/utils/cache.js +1 -1
  57. package/build/utils/color-processor.js +1 -1
  58. package/build/utils/concurrency-utils.js +1 -1
  59. package/build/utils/date-utils.js +1 -1
  60. package/build/utils/resolver-utils.js +1 -1
  61. package/build/utils/sponsor-service.js +1 -1
  62. package/build/utils/token-utils.js +1 -1
  63. package/package.json +1 -1
package/README.md CHANGED
@@ -4,12 +4,12 @@
4
4
 
5
5
  <div align="center">
6
6
 
7
- <a href="https://www.npmjs.com/package/@taazkareem/clickup-mcp-server" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/npm/v/@taazkareem/clickup-mcp-server.svg" alt="npm version"></a>
8
- <a href="https://www.npmjs.com/package/@taazkareem/clickup-mcp-server" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/npm/dm/@taazkareem/clickup-mcp-server.svg" alt="npm downloads"></a>
7
+ [![npm version](https://img.shields.io/npm/v/@taazkareem/clickup-mcp-server.svg)](https://www.npmjs.com/package/@taazkareem/clickup-mcp-server)
8
+ [![npm downloads](https://img.shields.io/npm/dm/@taazkareem/clickup-mcp-server.svg)](https://www.npmjs.com/package/@taazkareem/clickup-mcp-server)
9
9
  [![License](https://img.shields.io/badge/License-Proprietary-red.svg)](LICENSE)
10
- <img src="https://img.shields.io/badge/Ranked_Top_3_on_Google-🔥-orange.svg" alt="Top 3 on Google">
11
- <img src="https://img.shields.io/badge/Trending-MCP_Server-blueviolet.svg" alt="Trending MCP Server">
12
- <a href="https://github.com/TaazKareem/clickup-mcp-server/graphs/commit-activity" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" alt="Maintained"></a>
10
+ ![Top 3 on Google](https://img.shields.io/badge/Ranked_Top_3_on_Google-🔥-orange.svg)
11
+ ![Trending MCP Server](https://img.shields.io/badge/Trending-MCP_Server-blueviolet.svg)
12
+ [![Maintained](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/TaazKareem/clickup-mcp-server/graphs/commit-activity)
13
13
 
14
14
  </div>
15
15
 
@@ -19,15 +19,15 @@
19
19
 
20
20
  *A high-performance Model Context Protocol (MCP) server for managing tasks, comments, tags, lists, folders, files, docs, chat, and time using natural language.*
21
21
 
22
- **⭐️ Proven Performance:** 460+ Stars & thousands of weekly NPM downloads. The industry-standard ClickUp integration for AI.
22
+ **⭐️ Proven Performance:** 460+ Stars (from previous public repo) & thousands of weekly NPM downloads. <br>The industry-standard ClickUp integration for AI.
23
23
 
24
24
  ---
25
25
 
26
- ## 📖 Table of Contents
26
+ ## 📚 Table of Contents
27
27
 
28
28
  | Links&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Quick&nbsp;Start&nbsp;&&nbsp;Installation |
29
29
  | :--- | :--- |
30
- | •&nbsp;[Features](#features)<br>•&nbsp;[Premium&nbsp;Access](#premium-access)<br>•&nbsp;[Available&nbsp;Tools](#available-tools)<br>•&nbsp;[Adv.&nbsp;Config](#advanced-configuration)<br>•&nbsp;[FAQ](#faq)<br>•&nbsp;[Disclaimer](#disclaimer) | <table border="0" style="border: none; border-collapse: collapse; width: 575px;"> <tr style="border: none;"> <td width="140" style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/cursor-white.svg" height="16" style="vertical-align: middle;"> Cursor](#cursor-setup)</td> <td width="155" style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/windsurf-white.svg" height="16" style="vertical-align: middle;"> Windsurf](#windsurf-setup)</td> <td width="140" style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/visual-studio-code.svg" height="16" style="vertical-align: middle;"> VS&nbsp;Code](#vscode-setup)</td> <td width="140" style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="https://avatars.githubusercontent.com/u/211522643?s=200&v=4" height="16" style="vertical-align: middle; border-radius: 4px;"> Roo&nbsp;Code](#roocode-setup)</td> </tr> <tr style="border: none;"> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/claude.svg" height="16" style="vertical-align: middle;"> Claude](#claude-desktop-setup)</td> <td st yle="border: none; vertical-align: middle; white-space: nowrap;">[<img src="https://cdn.simpleicons.org/anthropic/D97757" height="16" style="vertical-align: middle;"> Claude&nbsp;Code](#claude-code-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="https://cdn.simpleicons.org/n8n/FF6D5A" height="16" style="vertical-align: middle;"> n8n](#n8n-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="https://cdn.simpleicons.org/googlegemini/8E75C2" height="16" style="vertical-align: middle;"> Gemini&nbsp;CLI](#gemini-setup)</td> </tr> <tr style="border: none;"> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/antigravity.svg" height="16" style="vertical-align: middle;"> Antigravity](#antigravity-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/openai-icon.svg" height="16" style="vertical-align: middle;"> Codex](#codex-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/openai-icon.svg" height="16" style="vertical-align: middle;"> ChatGPT](#chatgpt-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/augment-code.svg" height="16" style="vertical-align: middle;"> Augment](#augment-setup)</td> </tr> <tr style="border: none;"> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/augment-code.svg" height="16" style="vertical-align: middle;"> Auggie](#auggierun-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/lobster.svg" height="16" style="vertical-align: middle;"> OpenClaw](#openclaw-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[Other](#other-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[➕ Add Agent](https://github.com/TaazKareem/clickup-mcp-server/issues/new?template=add-agent.md)</td> </tr> </table> |
30
+ | •&nbsp;[Features](#features)<br>•&nbsp;[Premium&nbsp;Access](#premium-access)<br>•&nbsp;[Available&nbsp;Tools](#available-tools)<br>•&nbsp;[Adv.&nbsp;Config](#advanced-configuration)<br>•&nbsp;[FAQ](#faq)<br>•&nbsp;[Disclaimer](#disclaimer) | <table border="0" style="border: none; border-collapse: collapse; width: 575px;"> <tr style="border: none;"> <td width="140" style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/cursor-white.svg" height="16" style="vertical-align: middle;"> Cursor](#cursor-setup)</td> <td width="155" style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/windsurf-white.svg" height="16" style="vertical-align: middle;"> Windsurf](#windsurf-setup)</td> <td width="140" style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/visual-studio-code.svg" height="16" style="vertical-align: middle;"> VS&nbsp;Code](#vscode-setup)</td> <td width="140" style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="https://avatars.githubusercontent.com/u/211522643?s=200&v=4" height="16" style="vertical-align: middle; border-radius: 4px;"> Roo&nbsp;Code](#roocode-setup)</td> </tr> <tr style="border: none;"> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/claude.svg" height="16" style="vertical-align: middle;"> Claude](#claude-desktop-setup)</td> <td st yle="border: none; vertical-align: middle; white-space: nowrap;">[<img src="https://cdn.simpleicons.org/anthropic/D97757" height="16" style="vertical-align: middle;"> Claude&nbsp;Code](#claude-code-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="https://cdn.simpleicons.org/n8n/FF6D5A" height="16" style="vertical-align: middle;"> n8n](#n8n-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="https://cdn.simpleicons.org/googlegemini/8E75C2" height="16" style="vertical-align: middle;"> Gemini&nbsp;CLI](#gemini-setup)</td> </tr> <tr style="border: none;"> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/antigravity.svg" height="16" style="vertical-align: middle;"> Antigravity](#antigravity-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/openai-icon.svg" height="16" style="vertical-align: middle;"> Codex](#codex-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/openai-icon.svg" height="16" style="vertical-align: middle;"> ChatGPT](#chatgpt-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/augment-code.svg" height="16" style="vertical-align: middle;"> Augment](#augment-setup)</td> </tr> <tr style="border: none;"> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/augment-code.svg" height="16" style="vertical-align: middle;"> Auggie](#auggierun-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[<img src="./assets/logos/lobster.svg" height="16" style="vertical-align: middle;"> OpenClaw](#openclaw-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[Other](#other-setup)</td> <td style="border: none; vertical-align: middle; white-space: nowrap;">[➕ Add Agent](mailto:info@taazkareem.com?subject=Redirect%20URI%20Whitelist%20Request)</td> </tr> </table> |
31
31
 
32
32
  ---
33
33
 
@@ -40,8 +40,8 @@
40
40
  MCP spec compliant OAuth 2.1 with advanced security hardening. Backwards compatible with API Key/Team ID.
41
41
  </td>
42
42
  <td width="50%" style="vertical-align: top; border: none; padding-bottom: 20px;">
43
- <strong>🔍 Intelligent Search</strong><br>
44
- Fuzzy matching across names, statuses, tags, custom fields, and descriptions. Automatic name resolution—no IDs needed.
43
+ <strong>🔍 Intelligent Search & Resolution</strong><br>
44
+ Smart tiered, global fuzzy search across task, list, folder, and space names, members/emails, statuses, tags, descriptions, and more. Automatic resolution—no IDs needed.
45
45
  </td>
46
46
  </tr>
47
47
  <tr style="border: none;">
@@ -51,7 +51,7 @@
51
51
  </td>
52
52
  <td style="vertical-align: top; border: none; padding-bottom: 20px;">
53
53
  <strong>⏱️ Time Tracking</strong><br>
54
- Start/stop timers, view entries, and manage billable time via natural language.
54
+ Start/stop timers, search entries with date ranges, and manage billable time via natural language.
55
55
  </td>
56
56
  </tr>
57
57
  <tr style="border: none;">
@@ -88,18 +88,20 @@
88
88
 
89
89
  **⚡️ Instant Delivery:** Your License Key is delivered immediately via **Polar.sh**. Total setup time is under 2 minutes.
90
90
 
91
+ [![Purchase License](https://img.shields.io/badge/Purchase%20License-0069ff?style=for-the-badge&logo=polar&logoColor=white)](https://buy.polar.sh/polar_cl_tZ2q8jRvtaaduurOkQKKJmRgdD43ZiB5K0GZn0aQcur?utm_source=github&utm_medium=readme)
92
+
91
93
  ---
92
94
 
93
95
  ## 🚀 Quick Start & Installation
94
96
 
95
97
  ### 1. Prerequisites
96
- * **License Key:** 💳 <a href="https://buy.polar.sh/polar_cl_tZ2q8jRvtaaduurOkQKKJmRgdD43ZiB5K0GZn0aQcur?utm_source=github&utm_medium=readme" target="_blank" rel="noopener noreferrer">**Purchase here**</a>
97
- * **ClickUp Credentials:** API Key & Team ID (Only required if running locally/self-hosted).
98
+ * **License Key:** See above
99
+ * **ClickUp Credentials:** (Optional) API Key & Team ID
98
100
  <details>
99
101
  <summary><strong>How to find your credentials?</strong></summary>
100
102
 
101
103
  **ClickUp API Key:**
102
- 1. Log into ClickUp and go to <a href="https://app.clickup.com/settings/apps" target="_blank" rel="noopener noreferrer">ClickUp Settings → Apps</a>.
104
+ 1. Log into ClickUp and go to [ClickUp Settings → Apps](https://app.clickup.com/settings/apps).
103
105
  2. Click **Generate** under "API Token" (or copy your existing one).
104
106
 
105
107
  **ClickUp Team ID:**
@@ -454,8 +456,7 @@ auggie mcp add ClickUp --url https://clickup-mcp.taazkareem.com/mcp \
454
456
  OpenClaw integrates MCP servers through **mcporter**, a bridge that handles both HTTP and stdio connections.
455
457
 
456
458
  **1. Prerequisites:**
457
- - Install mcporter: `npm i -g mcporter`
458
- - Enable the skill in OpenClaw `config.json`:
459
+ - Enable the skill in OpenClaw `~/.openclaw/openclaw.json`:
459
460
  ```json
460
461
  {"skills": {"allowBundled": ["mcporter"]}}
461
462
  ```
@@ -484,9 +485,15 @@ mcporter config add ClickUp \
484
485
 
485
486
  <a name="other-setup"></a>
486
487
  <details>
487
- <summary><strong>Other (Custom Agents, etc.)</strong></summary>
488
+ <summary>&nbsp;&nbsp;<strong>Other (Custom Agents, etc.)</strong></summary>
488
489
  <br>
489
490
 
491
+ For most MCP-compliant hosts (e.g. Smithery, MCP Inspector, custom GUIs):
492
+ * **Server URL:** `https://clickup-mcp.taazkareem.com/mcp`
493
+ * **Auth Header:** `X-License-Key: your-license-key` (Required for HTTP/SSE connections)
494
+
495
+ ---
496
+
490
497
  **Advanced: OpenAI Agents SDK**
491
498
  For developers building custom agents.
492
499
 
@@ -519,14 +526,13 @@ Restart your MCP Host (e.g., Cursor IDE). The server will validate your License
519
526
  ## <a name="available-tools"></a>🛠️ Available Tools
520
527
 
521
528
  <details>
522
- <summary><strong>👇 Click to view all 54 available tools</strong></summary>
529
+ <summary><strong>👇 Click to view all 50+ available tools</strong></summary>
523
530
 
524
531
  | Category | Tool | Description |
525
532
  | :--- | :--- | :--- |
526
533
  | **Workspace** | `get_workspace_hierarchy` | Get workspace structure |
527
534
  | | `get_workspace_members` | Get all workspace members |
528
535
  | | `find_member_by_name` | Find member by name or email |
529
- | | `resolve_assignees` | Resolve names/emails to user IDs |
530
536
  | **Tasks** | `create_task` | Create a task |
531
537
  | | `get_task` | Get single task details |
532
538
  | | `update_task` | Modify task properties |
@@ -559,7 +565,8 @@ Restart your MCP Host (e.g., Cursor IDE). The server will validate your License
559
565
  | | `delete_space_tag` | Delete a tag |
560
566
  | | `add_tag_to_task` | Add tag to task |
561
567
  | | `remove_tag_from_task` | Remove tag from task |
562
- | **Time Tracking** | `get_task_time_entries` | Get time entries for a task |
568
+ | **Time Tracking** | `get_task_time_entries` | Get time entries for a task with date filters |
569
+ | | `get_workspace_time_entries` | Search workspace time entries with date range filtering |
563
570
  | | `start_time_tracking` | Start time tracking |
564
571
  | | `stop_time_tracking` | Stop current time tracking |
565
572
  | | `add_time_entry` | Add manual time entry |
@@ -615,10 +622,10 @@ Building reliable MCP integrations requires significant maintenance. Moving to a
615
622
  Existing local clones will continue to work, but you will not receive updates, bug fixes, or support without a license.
616
623
 
617
624
  **How can I add my AI Agent/Platform to the supported list?**
618
- We welcome new integrations! Please [submit a request](https://github.com/TaazKareem/clickup-mcp-server/issues/new?template=add-agent.md) to have your agent's redirect URI added to our allowlist.
625
+ We welcome new integrations!<br>Please [contact us via email](mailto:info@taazkareem.com?subject=Redirect%20URI%20Whitelist%20Request) to have your agent's redirect URI added to our allowlist.
619
626
 
620
627
  **How do I get support?**
621
- Premium users get priority support. Please <a href="https://github.com/TaazKareem/clickup-mcp-server/issues" target="_blank" rel="noopener noreferrer">open an issue</a> in this repository.
628
+ Premium users get priority support. Please [open an issue](https://github.com/TaazKareem/clickup-mcp-server/issues) in this repository.
622
629
 
623
630
  ---
624
631
 
@@ -629,5 +636,5 @@ Originally developed as open source and refined during a consultancy with ClickU
629
636
  This software makes use of third-party APIs and may reference trademarks or brands owned by third parties. The use of such APIs or references does not imply any affiliation with or endorsement by the respective companies. All trademarks and brand names are the property of their respective owners. This project is an independent work and is not officially associated with or sponsored by any third-party company mentioned.
630
637
 
631
638
  <div align="center">
632
- <sub>Created by <a href="https://github.com/taazkareem" target="_blank" rel="noopener noreferrer">taazkareem</a></sub>
633
- </div>
639
+ <sub>Created by <a href="https://github.com/taazkareem">taazkareem</a></sub>
640
+ </div>
@@ -1 +1 @@
1
- function a0_0x32a8(_0x324d87,_0x3dbabb){_0x324d87=_0x324d87-0x7a;const _0x78b272=a0_0x78b2();let _0x32a8ce=_0x78b272[_0x324d87];if(a0_0x32a8['DrCnOB']===undefined){var _0x32fa1a=function(_0x49af59){const _0x16940c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x34a690='',_0x4275d0='';for(let _0x52c813=0x0,_0x284440,_0x2b0981,_0x3ea9d3=0x0;_0x2b0981=_0x49af59['charAt'](_0x3ea9d3++);~_0x2b0981&&(_0x284440=_0x52c813%0x4?_0x284440*0x40+_0x2b0981:_0x2b0981,_0x52c813++%0x4)?_0x34a690+=String['fromCharCode'](0xff&_0x284440>>(-0x2*_0x52c813&0x6)):0x0){_0x2b0981=_0x16940c['indexOf'](_0x2b0981);}for(let _0x5ae1ab=0x0,_0x130470=_0x34a690['length'];_0x5ae1ab<_0x130470;_0x5ae1ab++){_0x4275d0+='%'+('00'+_0x34a690['charCodeAt'](_0x5ae1ab)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4275d0);};a0_0x32a8['yuaTNL']=_0x32fa1a,a0_0x32a8['AtNSzd']={},a0_0x32a8['DrCnOB']=!![];}const _0x625c9b=_0x78b272[0x0],_0x457758=_0x324d87+_0x625c9b,_0x2ee744=a0_0x32a8['AtNSzd'][_0x457758];return!_0x2ee744?(_0x32a8ce=a0_0x32a8['yuaTNL'](_0x32a8ce),a0_0x32a8['AtNSzd'][_0x457758]=_0x32a8ce):_0x32a8ce=_0x2ee744,_0x32a8ce;}const a0_0xe9aaa1=a0_0x32a8;(function(_0xc73ec3,_0x244e8d){const _0x26729c=a0_0x32a8,_0x40b487=_0xc73ec3();while(!![]){try{const _0x5941e6=parseInt(_0x26729c(0xd7))/0x1*(-parseInt(_0x26729c(0x132))/0x2)+-parseInt(_0x26729c(0x136))/0x3+-parseInt(_0x26729c(0xd1))/0x4+-parseInt(_0x26729c(0x158))/0x5*(parseInt(_0x26729c(0x12f))/0x6)+-parseInt(_0x26729c(0xba))/0x7+parseInt(_0x26729c(0xe1))/0x8+-parseInt(_0x26729c(0x13c))/0x9*(-parseInt(_0x26729c(0xa8))/0xa);if(_0x5941e6===_0x244e8d)break;else _0x40b487['push'](_0x40b487['shift']());}catch(_0x4cf60b){_0x40b487['push'](_0x40b487['shift']());}}}(a0_0x78b2,0x8b184));import a0_0x512b1b from'express';import a0_0x6b8436 from'../config.js';import{Logger}from'../logger.js';import{OAuthService}from'../services/oauth.js';import{clearTokenCache}from'../middleware/auth.js';import a0_0x649e40 from'axios';const router=a0_0x512b1b[a0_0xe9aaa1(0x13f)+'r'](),logger=new Logger(a0_0xe9aaa1(0xff)+a0_0xe9aaa1(0x13f)+'s');function a0_0x78b2(){const _0x1e32b8=['rMfPBgu','BMDLihq','C21HDgm','Ec1MB3i','t3flt3C','yxrLu2K','z2v0','yMfJAYa','DgLVBG','yxrPB24','BgLLBNq','Evn0yxq','y2TvCa','BwLZC2K','mtmZnZGWmtbHB2rSEeS','AwD1CMe','y29UzMK','yw50','D29YA3m','zvbYB3G','yxjHBwu','y3jLzgu','Aw50BYa','DMvYAwy','AwqGy2W','AwvUDa','y2T1Cc4','ihn0yxq','yxv0Ag8','ExbL','oI8Vyxa','DcbszwC','nJG5mZi0m1bhAu1bsW','C2vHCMm','Aw52ywW','CYbYzxe','CMvJzwK','Ac90B2S','CMvJDca','oIbZDge','DgLVBIa','Ac9YzwC','CMvKAxi','AwqGC3q','y29Kzq','AM9PBG','AfbHCMe','EunSAwu','zwfTiha','CNzLCLu','B3nmEwi','lcbYzxq','BgjHy2S','CNKGywC','AuTJthC','mta1odi4mePZruXzqG','DwTyqKK','C2vJDxi','BIbfEgm','whvzA0y','zgrPBMC','ndK1mJq4tfzoCwXO','zMfPBgu','BMfSx3m','DxrOx3m','C3vJy2u','zxn0icG','l3rLyw0','y29Tl2e','zwnVzgu','uhjVEhK','ndyXnJm2oe1wDNLPwa','ueTdrsa','C3rHDhu','CM92Awq','C3nPB24','ief1DgG','Df9Pza','rIbKzxq','B3P6qNG','tgX5vKS','AwnRvxa','uMvQzwm','B1LlCem','DhvYzq','ihjLCxu','lIbqBgu','sw52ywW','q29Kzq','zgLUzYa','CMv0x3a','DxjUAw4','BsbdBgK','y2XPzw4','yxbWzw4','Cc5JBgK','B2rL','Axn0CMe','BwfW','B2TPzq','Bg93zwq','t0f1DgG','vxbZDhi','Axn0zxi','Ac9JywW','ifrVA2u','l29HDxq','AwXLza','t0fsyMG','y3rPB24','AcbVCIa','AwrFy2W','AwvUDca','AwqGq2W','C2vSzwm','zxj2zxi','C3qGkfa','y2HHBgW','As5JBgK','zxjYB3i','zYbYyxC','BMCGq2W','C2vUza','CIbnAxm','D2fYBG','twLZC2K','Ac9HDxq','zgf0yq','Df9Zzwm','Aw9UoIa','AxnbCNi','zguGB3i','B3H5u3q','zwfTihq','DguGBwK','z2vUzxi','BNnLx3q','yxrH','Cg9YDa','BgvUz3q','B3jPz2K','ywnJzxm','CxvLCNK','x3n0yxq','Cg9ZDa','ientuKy','yM5ZBMW','BMDLvg8','Ahr0Chm','ndCWmJiXoeXOs2DQAa','ihrPBwu','yM9KEq','mLnWseTxtq','B24GzMe','EMf0Aw8','Aw9Ux2m','ndyZotm4C0HmzerS','CM94EsK','zwn0zwq','CMvZCg8','Aw5N','Bgf4','mtHKAfbfA3q','AwnHDgK','igrLDgu','uM91Dgu','A2vUv2K','CMv0','C3rHDgu','wur4Aue','Dgf0zq','BNrtzwm','BwvZC2e','BwnWx2e','C2LNBMe','yxnLihq','B2TLBIa','y29VA2K','z25Lzem','D2fYzgu','BMfSx3i','zxn0','BMCGy28','Ahr0CdO','z25Lzfa','Aw5MBW','B3jPEMe','Dg9Rzw4','yxrLiha','y2XLyxi','nwPPywHfDW','x19iB3m','zcb0BYa','Dc1Ty3a','BNrPy2e','BMDLigy','lY9SB2m','ifjLzgK','CIbdu1i','ignHBgW','B3qGywW','z2LZDhi','zc1WCM8','zwn0x3u','BNqGsuq','BwnWu2u','zxHJAge','CgKVDJi','u2vJCMu','x2f1DgG','igvTyMu','ueTdrq','ienSAwu','DxbdBgK','y29Kzv8','ie9bDxq','DgvHBxm','BNqGuMu','twr2BeG','tunqiem','quHKEKC','CMLZigK','z3vYyxq','Bwv0ywq','AwrFz3i','Bwv0Ag8','B3v0ig8','Dg9tDhi','ANnVBG','ywLSDxi','q29VA2K','vhzxCLq','AwvYigK','ignVBMy','AuXZqMq','t3ruBfe','ihrLyw0','AgfUz2u','Ag9YAxO','zw5Nzq'];a0_0x78b2=function(){return _0x1e32b8;};return a0_0x78b2();}import{createAuthRateLimitMiddleware}from'../middleware/security.js';const createAuthRateLimit=createAuthRateLimitMiddleware(),serverUrl=a0_0x6b8436[a0_0xe9aaa1(0x167)+a0_0xe9aaa1(0xcb)+'rl']||a0_0xe9aaa1(0x151)+a0_0xe9aaa1(0x15e)+'alhos'+'t:'+(a0_0x6b8436[a0_0xe9aaa1(0x124)]||0xc9f);router['post'](a0_0xe9aaa1(0x104)+a0_0xe9aaa1(0xc3)+a0_0xe9aaa1(0x101),createAuthRateLimit,(_0xa6bbe9,_0x149c9b)=>{const _0x2af6d7=a0_0xe9aaa1,_0x39ffd7={'AHdzG':function(_0x3874d3,_0x462845){return _0x3874d3===_0x462845;},'ozzBx':_0x2af6d7(0xc4)+_0x2af6d7(0x165)+_0x2af6d7(0x87)+_0x2af6d7(0xbd)+'uired','oZwqY':'inval'+_0x2af6d7(0x109)+'ient_'+_0x2af6d7(0x89)+_0x2af6d7(0x123)},{client_name:_0x43fd11,redirect_uris:_0x2169ca}=_0xa6bbe9[_0x2af6d7(0x131)];logger[_0x2af6d7(0x153)](_0x2af6d7(0xff)+_0x2af6d7(0x7e)+_0x2af6d7(0x83)+_0x2af6d7(0x163)+_0x2af6d7(0xa3)+_0x2af6d7(0xef)+_0x2af6d7(0x14f),{'client_name':_0x43fd11,'redirect_uris':_0x2169ca});if(!_0x2169ca||!Array[_0x2af6d7(0x11c)+'ay'](_0x2169ca)||_0x39ffd7[_0x2af6d7(0x86)](_0x2169ca[_0x2af6d7(0x125)+'h'],0x0)){_0x149c9b[_0x2af6d7(0xe3)+'s'](0x190)[_0x2af6d7(0x8e)]({'error':'inval'+_0x2af6d7(0x109)+'ient_'+_0x2af6d7(0x89)+'ata','error_description':_0x39ffd7[_0x2af6d7(0xe9)]});return;}try{const {clientId:_0x1f5185,clientSecret:_0x1c573f}=OAuthService['gener'+_0x2af6d7(0x9f)+_0x2af6d7(0x14c)+'lient'+'Id'](_0x2169ca);_0x149c9b[_0x2af6d7(0xe3)+'s'](0xc9)[_0x2af6d7(0x8e)]({'client_id':_0x1f5185,'client_secret':_0x1c573f,'client_name':_0x43fd11||_0x2af6d7(0x85)+_0x2af6d7(0xa4),'redirect_uris':_0x2169ca,'grant_types':[_0x2af6d7(0xb6)+'rizat'+_0x2af6d7(0x135)+_0x2af6d7(0xfa)],'response_types':['code'],'token_endpoint_auth_method':_0x2af6d7(0xf7)+_0x2af6d7(0x11a)+_0x2af6d7(0xf4)+'ost'});}catch(_0x400250){logger[_0x2af6d7(0x116)]('Clien'+_0x2af6d7(0xb9)+_0x2af6d7(0xfb)+'tion\x20'+_0x2af6d7(0xec)+'ted',{'error':_0x400250[_0x2af6d7(0x146)+'ge'],'redirect_uris':_0x2169ca}),_0x149c9b['statu'+'s'](0x190)[_0x2af6d7(0x8e)]({'error':_0x39ffd7['oZwqY'],'error_description':_0x400250[_0x2af6d7(0x146)+'ge']});}}),router['get'](a0_0xe9aaa1(0x104)+a0_0xe9aaa1(0x118)+a0_0xe9aaa1(0x98)+'e',createAuthRateLimit,(_0x3bdb08,_0x19a660)=>{const _0x520c24=a0_0xe9aaa1,_0xfd8723={'iKcLw':_0x520c24(0xff)+_0x520c24(0xe6)+_0x520c24(0x154)+_0x520c24(0xc2)+'reque'+_0x520c24(0x10e)+_0x520c24(0x137),'nTyXX':_0x520c24(0xf1)+'id\x20Cl'+_0x520c24(0x10a)+'ID\x20or'+_0x520c24(0x15f)+_0x520c24(0xc0)+'URI\x20n'+_0x520c24(0x162)+_0x520c24(0xfe),'iLsBd':_0x520c24(0x12e)+_0x520c24(0xb8)+_0x520c24(0xf9)+_0x520c24(0xb4)+_0x520c24(0xde)+'pi','MdvlH':_0x520c24(0xc4)+_0x520c24(0x165)+'ri','oYKpC':_0x520c24(0x139)+_0x520c24(0x122)+_0x520c24(0xb7),'teCwn':_0x520c24(0xc6),'niehU':_0x520c24(0x142),'osLyb':_0x520c24(0x159)+_0x520c24(0x15b)+_0x520c24(0x7b)+_0x520c24(0x129)+'e','LLmLs':function(_0x54c91d,_0x44c3f9){return _0x54c91d*_0x44c3f9;}},{response_type:_0x404f1b,client_id:_0x4a307e,redirect_uri:_0x1d234e,state:_0x11044f,code_challenge:_0x29060e,code_challenge_method:_0x2ef583}=_0x3bdb08[_0x520c24(0x128)];logger[_0x520c24(0x153)](_0xfd8723[_0x520c24(0xd0)],{'response_type':_0x404f1b,'client_id':_0x4a307e,'redirect_uri':_0x1d234e,'state':_0x11044f});if(_0x4a307e&&!OAuthService['verif'+_0x520c24(0xc9)+'ntId'](_0x4a307e,_0x1d234e)){_0x19a660['statu'+'s'](0x191)[_0x520c24(0x114)](_0xfd8723['nTyXX']);return;}const _0x2c4f45=a0_0x6b8436['click'+_0x520c24(0x7f)+'entId'];if(!_0x2c4f45){logger['error'](_0x520c24(0x117)+_0x520c24(0x113)+_0x520c24(0xeb)+_0x520c24(0x7e)+'nt\x20ID'+'\x20in\x20s'+_0x520c24(0x10d)+_0x520c24(0x93)+_0x520c24(0xa9)+_0x520c24(0xa2)),_0x19a660[_0x520c24(0xe3)+'s'](0x1f4)[_0x520c24(0x114)]('Serve'+_0x520c24(0x115)+_0x520c24(0xaa)+_0x520c24(0x88)+_0x520c24(0x11b)+'Missi'+_0x520c24(0x113)+_0x520c24(0xeb)+'\x20Clie'+_0x520c24(0x166));return;}const _0x255887=OAuthService[_0x520c24(0x121)+'atePr'+_0x520c24(0x11e)+'ate'](_0x1d234e,_0x11044f,_0x29060e,_0x2ef583),_0x190b54=new URL(_0xfd8723[_0x520c24(0x94)]);_0x190b54['searc'+_0x520c24(0xc8)+'ms'][_0x520c24(0xf8)+'d'](_0x520c24(0xf7)+_0x520c24(0xe7),_0x2c4f45),_0x190b54[_0x520c24(0xbb)+_0x520c24(0xc8)+'ms'][_0x520c24(0xf8)+'d'](_0xfd8723[_0x520c24(0x84)],serverUrl+(_0x520c24(0x104)+_0x520c24(0x102)+'lback')),_0x190b54['searc'+_0x520c24(0xc8)+'ms'][_0x520c24(0xf8)+'d'](_0xfd8723[_0x520c24(0xed)],_0xfd8723['teCwn']),_0x190b54[_0x520c24(0xbb)+_0x520c24(0xc8)+'ms'][_0x520c24(0xf8)+'d'](_0xfd8723['niehU'],_0x255887);const _0x29e237=_0x3bdb08[_0x520c24(0xd3)+'e']||_0x3bdb08['heade'+'rs'][_0x520c24(0x9d)+_0x520c24(0x14d)+'d-pro'+'to']===_0x520c24(0x12e),_0xc68552=_0x29e237?_0xfd8723[_0x520c24(0xcc)]:'mcp_a'+'uth_s'+'tate';_0x19a660[_0x520c24(0x14b)+'e'](_0xc68552,_0x255887,{'httpOnly':!![],'secure':_0x29e237,'sameSite':_0x520c24(0x13b),'maxAge':_0xfd8723['LLmLs'](0xf*0x3c,0x3e8),'path':'/'}),_0x19a660[_0x520c24(0xc4)+'ect'](_0x190b54['toStr'+'ing']());}),router[a0_0xe9aaa1(0xa0)](a0_0xe9aaa1(0x104)+a0_0xe9aaa1(0x102)+a0_0xe9aaa1(0xce),createAuthRateLimit,(_0x3d3b1d,_0x34749e)=>{const _0x368e4a=a0_0xe9aaa1,_0x3864c8={'OtTlQ':_0x368e4a(0x117)+'ng\x20co'+_0x368e4a(0x11d)+_0x368e4a(0xb5)+'e\x20fro'+_0x368e4a(0xf6)+_0x368e4a(0xa6),'oMaZw':_0x368e4a(0xff)+_0x368e4a(0x161)+_0x368e4a(0xa1)+_0x368e4a(0xbe)+'ved','ukXBI':function(_0x5f50eb,_0x4d045d){return _0x5f50eb===_0x4d045d;},'LlyVK':_0x368e4a(0x159)+'t-mcp'+_0x368e4a(0x7b)+_0x368e4a(0x129)+'e','OARbh':'OAuth'+_0x368e4a(0x12b)+_0x368e4a(0x13e)+_0x368e4a(0x107)+_0x368e4a(0xc1)+_0x368e4a(0x120)+_0x368e4a(0x9c)+_0x368e4a(0x108)+_0x368e4a(0xa7)+_0x368e4a(0x150)+_0x368e4a(0xfd),'YDxiA':function(_0xb41669,_0x30e950){return _0xb41669===_0x30e950;},'OqKOw':'Authe'+_0x368e4a(0x15c)+_0x368e4a(0xc2)+_0x368e4a(0xd8)+'d:\x20se'+_0x368e4a(0xe5)+_0x368e4a(0x130)+_0x368e4a(0x8c)+_0x368e4a(0x160)+_0x368e4a(0xe8)+_0x368e4a(0x138)+_0x368e4a(0xf0)+_0x368e4a(0x149)+_0x368e4a(0xcf)+'ain.','OPTpO':_0x368e4a(0xc6)},{code:_0x4461d5,state:_0x188b3c}=_0x3d3b1d['query'];if(!_0x4461d5||!_0x188b3c){_0x34749e[_0x368e4a(0xe3)+'s'](0x190)[_0x368e4a(0x114)](_0x3864c8[_0x368e4a(0x95)]);return;}logger['info'](_0x3864c8['oMaZw'],{'query':_0x3d3b1d['query']});const _0x49d9b7=_0x3d3b1d[_0x368e4a(0xd3)+'e']||_0x3864c8[_0x368e4a(0xd2)](_0x3d3b1d['heade'+'rs']['x-for'+_0x368e4a(0x14d)+_0x368e4a(0x164)+'to'],_0x368e4a(0x12e)),_0x722f53=_0x49d9b7?_0x3864c8[_0x368e4a(0xea)]:_0x368e4a(0x147)+_0x368e4a(0xda)+_0x368e4a(0x144),_0x4d05f8=_0x3d3b1d[_0x368e4a(0x14b)+'es']?.[_0x722f53];if(!_0x4d05f8||_0x4d05f8!==_0x188b3c){logger[_0x368e4a(0x116)](_0x3864c8[_0x368e4a(0x106)],{'hasCookie':!!_0x4d05f8,'cookieName':_0x722f53,'stateMatch':_0x3864c8[_0x368e4a(0x143)](_0x4d05f8,_0x188b3c)}),_0x34749e[_0x368e4a(0xe3)+'s'](0x193)['send'](_0x3864c8[_0x368e4a(0x9e)]);return;}_0x34749e[_0x368e4a(0x157)+_0x368e4a(0x90)+'e'](_0x722f53,{'path':'/'});try{const _0x3a151a=OAuthService['decod'+_0x368e4a(0xad)+_0x368e4a(0xa5)+'e'](_0x188b3c),_0x58d9a6=new URL(_0x3a151a[_0x368e4a(0x126)+_0x368e4a(0x14e)+'edire'+'ct_ur'+'i']),_0x1eeb59=OAuthService[_0x368e4a(0x121)+_0x368e4a(0x9f)+_0x368e4a(0x152)+'roxyC'+_0x368e4a(0xfa)](_0x4461d5,_0x3a151a[_0x368e4a(0x80)+'chall'+_0x368e4a(0x99)],_0x3a151a[_0x368e4a(0x80)+_0x368e4a(0x10f)+'enge_'+_0x368e4a(0x8b)+'d']);_0x58d9a6[_0x368e4a(0xbb)+_0x368e4a(0xc8)+'ms'][_0x368e4a(0xf8)+'d'](_0x3864c8['OPTpO'],_0x1eeb59),_0x58d9a6[_0x368e4a(0xbb)+_0x368e4a(0xc8)+'ms'][_0x368e4a(0xf8)+'d'](_0x368e4a(0x142),_0x3a151a[_0x368e4a(0x126)+_0x368e4a(0xd9)+_0x368e4a(0x144)]),_0x34749e[_0x368e4a(0xc4)+'ect'](_0x58d9a6[_0x368e4a(0x8d)+_0x368e4a(0x13a)]());}catch(_0x2beb40){logger['error'](_0x368e4a(0x9a)+_0x368e4a(0x15a)+'parse'+_0x368e4a(0x81)+'h\x20sta'+'te',_0x2beb40),_0x34749e[_0x368e4a(0xe3)+'s'](0x190)[_0x368e4a(0x114)](_0x368e4a(0xf1)+_0x368e4a(0xc5)+_0x368e4a(0x156)+_0x368e4a(0xae)+'ter');}}),router[a0_0xe9aaa1(0x12a)]('/oaut'+a0_0xe9aaa1(0xbf)+'en',createAuthRateLimit,async(_0x37dfa8,_0x3bf2af)=>{const _0x30afce=a0_0xe9aaa1,_0x3cc61b={'yFjqO':function(_0x3b2e1a,_0x170c4d){return _0x3b2e1a&&_0x170c4d;},'msnuk':_0x30afce(0xf1)+_0x30afce(0x10b)+'ient\x20'+_0x30afce(0x7a)+'t','YdeHG':_0x30afce(0xbc)+_0x30afce(0x109)+_0x30afce(0xb3),'TvWrT':_0x30afce(0xf1)+_0x30afce(0xb2)+_0x30afce(0x10a)+_0x30afce(0xaf)+'ntial'+'s','bnsnl':_0x30afce(0xf1)+'id\x20au'+'thori'+_0x30afce(0x134)+'n\x20cod'+'e\x20or\x20'+_0x30afce(0x148)+_0x30afce(0xee),'XuYkF':'code_'+_0x30afce(0xb1)+_0x30afce(0x92)+_0x30afce(0xbd)+'uired'+'\x20for\x20'+_0x30afce(0x7d)},{grant_type:_0x590a45,code:_0x4a793b,redirect_uri:_0x26f298,client_id:_0x13f3da,client_secret:_0x242b5b,code_verifier:_0x55427e}=_0x37dfa8[_0x30afce(0x131)];logger[_0x30afce(0x153)](_0x30afce(0xff)+_0x30afce(0x103)+_0x30afce(0xd4)+_0x30afce(0x97)+_0x30afce(0xef)+_0x30afce(0xdc)+_0x30afce(0xe0)+')',{'grant_type':_0x590a45,'client_id':_0x13f3da});if(_0x3cc61b['yFjqO'](_0x13f3da,_0x242b5b)){if(!OAuthService[_0x30afce(0xb1)+_0x30afce(0xc9)+_0x30afce(0x145)+_0x30afce(0x141)](_0x13f3da,_0x242b5b)){logger[_0x30afce(0x116)](_0x3cc61b['msnuk'],{'client_id':_0x13f3da}),_0x3bf2af[_0x30afce(0xe3)+'s'](0x191)[_0x30afce(0x8e)]({'error':_0x3cc61b['YdeHG'],'error_description':_0x3cc61b[_0x30afce(0x91)]});return;}}const _0x1bd2dd=OAuthService[_0x30afce(0xb1)+'yAndD'+_0x30afce(0xdf)+'Proxy'+_0x30afce(0xf2)](_0x4a793b);if(!_0x1bd2dd){logger[_0x30afce(0x116)](_0x30afce(0xf1)+'id\x20Pr'+'oxy\x20C'+_0x30afce(0xfa),{'code':_0x4a793b}),_0x3bf2af[_0x30afce(0xe3)+'s'](0x190)['json']({'error':'inval'+_0x30afce(0x8a)+_0x30afce(0xab),'error_description':_0x3cc61b[_0x30afce(0x12c)]});return;}if(!_0x55427e){_0x3bf2af['statu'+'s'](0x190)[_0x30afce(0x8e)]({'error':'inval'+_0x30afce(0x8a)+_0x30afce(0xab),'error_description':_0x3cc61b[_0x30afce(0xd5)]});return;}if(!OAuthService[_0x30afce(0xb1)+'yPKCE'](_0x55427e,_0x1bd2dd['hc'],_0x1bd2dd['hm'])){logger[_0x30afce(0x116)](_0x30afce(0xe2)+_0x30afce(0xb1)+'icati'+_0x30afce(0x133)+'iled',{'clickUpCode':_0x1bd2dd['c'],'verifier':_0x55427e}),_0x3bf2af[_0x30afce(0xe3)+'s'](0x190)['json']({'error':_0x30afce(0xbc)+_0x30afce(0x8a)+_0x30afce(0xab),'error_description':_0x30afce(0xe2)+_0x30afce(0xb1)+_0x30afce(0x13d)+'on\x20fa'+_0x30afce(0x105)});return;}const _0x1cf1bc=await OAuthService[_0x30afce(0x168)+_0x30afce(0x12d)+_0x30afce(0x140)+'thCli'+_0x30afce(0xa6)](_0x1bd2dd['c']);if(_0x1cf1bc[_0x30afce(0xdb)+'ss']){const _0x5b2c9f=_0x1cf1bc[_0x30afce(0x119)][_0x30afce(0x127)+'s_tok'+'en'];clearTokenCache(_0x5b2c9f);try{const _0x247b4a=await a0_0x649e40[_0x30afce(0xa0)]('https'+_0x30afce(0xb8)+_0x30afce(0x110)+_0x30afce(0xb4)+_0x30afce(0xde)+_0x30afce(0x169)+_0x30afce(0xdd),{'headers':{'Authorization':_0x5b2c9f},'timeout':0x2710}),_0x422b3a=_0x247b4a[_0x30afce(0x119)]?.[_0x30afce(0x82)]||[];if(_0x422b3a[_0x30afce(0x125)+'h']>0x0){const _0x5c43c3=_0x422b3a[_0x30afce(0xfc)](_0x548ea1=>String(_0x548ea1['id'])),_0x3b4df2=_0x5c43c3[_0x30afce(0xc7)](','),_0x359765=_0x3b4df2+':'+_0x5b2c9f;logger['info']('Embed'+_0x30afce(0xf3)+_0x30afce(0xac)+'pace\x20'+_0x30afce(0x10c)+_0x30afce(0xc2)+_0x30afce(0xb0)+_0x30afce(0x155),{'count':_0x5c43c3[_0x30afce(0x125)+'h'],'confirmedIds':_0x3b4df2}),_0x3bf2af[_0x30afce(0x8e)]({..._0x1cf1bc[_0x30afce(0x119)],'access_token':_0x359765,'first_team_id':_0x5c43c3[0x0],'all_team_ids':_0x5c43c3});return;}}catch(_0x3f584a){logger[_0x30afce(0x116)](_0x30afce(0x9a)+_0x30afce(0x15a)+'fetch'+_0x30afce(0x96)+'s\x20for'+_0x30afce(0x7c)+_0x30afce(0xd6)+_0x30afce(0xcd)+_0x30afce(0xf5)+_0x30afce(0x112)+'\x20toke'+'n',{'error':_0x3f584a[_0x30afce(0x146)+'ge']});}_0x3bf2af['json'](_0x1cf1bc[_0x30afce(0x119)]);}else logger[_0x30afce(0x111)](_0x30afce(0x100)+_0x30afce(0x11f)+'oken\x20'+'excha'+_0x30afce(0x15d)+_0x30afce(0x8f)+'e',{'error':_0x1cf1bc['error']}),_0x3bf2af[_0x30afce(0xe3)+'s'](0x1f4)[_0x30afce(0x8e)]({'error':_0x30afce(0x9a)+_0x30afce(0x15a)+_0x30afce(0x168)+_0x30afce(0x9b)+_0x30afce(0x14a)+'with\x20'+'upstr'+_0x30afce(0xca)+_0x30afce(0xe4)+'er','details':_0x1cf1bc[_0x30afce(0x111)]});});export default router;
1
+ const a0_0x35c3d6=a0_0x44ae;(function(_0x2a5dee,_0x1e6b12){const _0x20e1a4=a0_0x44ae,_0x1cc6f2=_0x2a5dee();while(!![]){try{const _0x48b854=parseInt(_0x20e1a4(0xfe))/0x1+parseInt(_0x20e1a4(0x12d))/0x2+-parseInt(_0x20e1a4(0x110))/0x3+-parseInt(_0x20e1a4(0x109))/0x4+-parseInt(_0x20e1a4(0xe3))/0x5+parseInt(_0x20e1a4(0x193))/0x6*(-parseInt(_0x20e1a4(0x19b))/0x7)+parseInt(_0x20e1a4(0xd1))/0x8;if(_0x48b854===_0x1e6b12)break;else _0x1cc6f2['push'](_0x1cc6f2['shift']());}catch(_0x536d47){_0x1cc6f2['push'](_0x1cc6f2['shift']());}}}(a0_0x32aa,0x2f8ff));import a0_0x2b7093 from'express';import a0_0x1f1149 from'../config.js';import{Logger}from'../logger.js';import{OAuthService}from'../services/oauth.js';import{clearTokenCache}from'../middleware/auth.js';import a0_0x1cc724 from'axios';const router=a0_0x2b7093[a0_0x35c3d6(0x175)+'r'](),logger=new Logger(a0_0x35c3d6(0xeb)+a0_0x35c3d6(0x175)+'s');function a0_0x32aa(){const _0xad532d=['yxnLihq','As5JBgK','zsbMCM8','AfbHCMe','nZyYzgPrs2DY','BMDLihq','Aw5MBW','rIbKzxq','Aw9UoIa','D2fYzgu','DgLVBIa','tunqiem','mtCZodfHzenWuKu','C3vJy2u','CMv0','BwvZC2e','BwfW','zMv0y2G','BsbdBgK','DgHVCMK','zwfTihq','y3jLzgu','l29HDxq','C2vHCMm','Ac9JywW','Cg9YDa','EufUzeq','AM9PBG','ywXOB3m','yxbWzw4','rKXby1C','yMfJAYa','AwqGuhi','yxrH','yw50','zsbVCIa','AwvUDa','D2fYBG','z2v0','CMvZCg8','vezuz2K','B2TLBIa','Df9Pza','ANnVBG','ihrVA2u','zxn0icG','zgvJB2q','B3jPEMe','Evn0yxq','y29VA2K','oIbZDge','qxv0Agu','uLP5BhO','z3vYyxq','x2f1DgG','B3jPz2K','ywnJzxm','ExvMrhq','nJG3mta0ogTRz0TVzW','ihjLCxu','ientuKy','DxjUAw4','AwqGC3q','CMvXDwu','u2vYDMu','DxrOx3m','zc1WCM8','zgf0yq','zMfPBgu','AxnbCNi','CIbdu1i','igrLDgu','B3n0','ueTdrsa','AwvUDf8','B2rL','ndeZmJC1BgH0u2Xn','Ec1MB3i','Bgf4','CMvJDca','CMvKAxi','twLZC2K','wgPvv2G','yM9KEq','t0f1DgG','igzVCIa','zcb0BYa','vvbjrLG','CML6yxq','Bwv0ywq','AwnRvxa','BNnLx3q','zwrPCMu','y3rPB24','z25Lzem','BwnWu2u','B2TPzq','BIbfEgm','CxvLCNK','rw1Izwq','AwrFz3i','Ag9YAxO','oI8Vyxa','mty1mJKYExHAugTM','CMLZigK','Axn0zxi','tgvJEgS','EMf0Aw8','DhvYzq','zwn0','ignHBgW','q29VA2K','Dgf0zq','yxrLu2K','odC1nteYy2LsEhzI','BgLLBNq','zwn0x3u','Aw52ywW','zw5Nzq','uhjVEhK','C3nPB24','odCZmZyZwxntuNv1','Bwv0Ag8','ywLSDxi','lIbqBgu','CIbnAxm','wgrquxG','sw52ywW','BNqGuMu','AwqGq2W','twjqzwi','BIbJB2q','BMCGy28','DwLYzwq','A3PRA0m','AwD1CMe','rMfPBgu','tePMtgu','CuPfy08','igLUihm','AwrFy2W','DMvK','ruvPAeG','uMPPC1O','uLDTs2O','y2TvCa','ihn0yxq','yxjHBwu','Dc1Ty3a','Evblq0u','mtu3mJC0sNb1sK5L','lcbYzxq','y2T1Cc4','y29UzMK','C2LNBMe','BwnWx2e','y29Kzv8','DxbdBgK','zxHJAge','D2L0Aca','rgLfswS','DgHdBgK','CgfYC2u','vxbZDhi','lY9SB2m','Cg9ZDa','EunSAwu','DgvHBxm','Ahr0Chm','rKPhvgi','uLzOuKO','AcbVCIa','zxj2zxi','BMfSx3m','x3n0yxq','wuvXquO','Cc5JBgK','C2vUza','Ahr0CdO','AgvHzgu','C190B2S','y29Kzq','y2HHBgW','zufxy1C','CgfJzsa','zwnVzgu','vxPhuxm','CMvJzwK','yxrL','BNrjza','Ac9YzwC','DxbZDhi','A2vUv2K','CMv0x3a','Aw5N','BgvUz3q','yxrPB24','r2ruqNy','BNrPywW','ExbL','ueTdrq','re9erNq','BMDLigy','y29Tl2e','C3rHDhu','AwvUDca','CM92Awq','DMvYAwy','BNrPy2e','zdOGC2u','AcbZDge','q2XPzw4','z2vUzxi','y2XPzw4','D29YA3m','zwfTiha','yxrLuhi','Dg9tDhi','uMvQzwm','AwnHDgK','uMrgvve','BNqGsuq','uM91Dgu','B24GzMe','vujPuKS','zxjYB3i','C3qGkfa','Bg93zwq','B3H5iem','CNzLCLu','x19iB3m','y2XLyxi','DgLVBG','DguGBwK','Ac90B2S','ifjLzgK','z1H1tNy','De5bwLG','z25Lzfa','CYbYzxe','C2vJDxi','ief1DgG','ie9bDxq','yxrLiha','ienSAwu','CgKVDJi','B3qGywW','Axn0CMe'];a0_0x32aa=function(){return _0xad532d;};return a0_0x32aa();}function a0_0x44ae(_0x3baa10,_0x2f13e1){_0x3baa10=_0x3baa10-0xb0;const _0x32aa36=a0_0x32aa();let _0x44aec1=_0x32aa36[_0x3baa10];if(a0_0x44ae['JJKpvI']===undefined){var _0x38e305=function(_0x16c3d9){const _0x1b938a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7ee37c='',_0xb1daef='';for(let _0x2534d3=0x0,_0x2eb0cd,_0x45110b,_0x555c41=0x0;_0x45110b=_0x16c3d9['charAt'](_0x555c41++);~_0x45110b&&(_0x2eb0cd=_0x2534d3%0x4?_0x2eb0cd*0x40+_0x45110b:_0x45110b,_0x2534d3++%0x4)?_0x7ee37c+=String['fromCharCode'](0xff&_0x2eb0cd>>(-0x2*_0x2534d3&0x6)):0x0){_0x45110b=_0x1b938a['indexOf'](_0x45110b);}for(let _0xfb2e22=0x0,_0x46e42f=_0x7ee37c['length'];_0xfb2e22<_0x46e42f;_0xfb2e22++){_0xb1daef+='%'+('00'+_0x7ee37c['charCodeAt'](_0xfb2e22)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xb1daef);};a0_0x44ae['bcrbMH']=_0x38e305,a0_0x44ae['DuHyuG']={},a0_0x44ae['JJKpvI']=!![];}const _0x5e78ad=_0x32aa36[0x0],_0x43ab2f=_0x3baa10+_0x5e78ad,_0x2d3e91=a0_0x44ae['DuHyuG'][_0x43ab2f];return!_0x2d3e91?(_0x44aec1=a0_0x44ae['bcrbMH'](_0x44aec1),a0_0x44ae['DuHyuG'][_0x43ab2f]=_0x44aec1):_0x44aec1=_0x2d3e91,_0x44aec1;}import{createAuthRateLimitMiddleware}from'../middleware/security.js';const createAuthRateLimit=createAuthRateLimitMiddleware(),serverUrl=a0_0x1f1149[a0_0x35c3d6(0xf6)+a0_0x35c3d6(0x17c)+'rl']||a0_0x35c3d6(0x149)+a0_0x35c3d6(0x13b)+a0_0x35c3d6(0xb3)+'t:'+(a0_0x1f1149[a0_0x35c3d6(0xb0)]||0xc9f);router[a0_0x35c3d6(0x13c)](a0_0x35c3d6(0x1a5)+a0_0x35c3d6(0x155)+a0_0x35c3d6(0x100),createAuthRateLimit,(_0x4e1777,_0x329cf0)=>{const _0x21b227=a0_0x35c3d6,_0x3c7edc={'XjUWh':function(_0x641ddd,_0x12654f){return _0x641ddd===_0x12654f;},'TFTgi':_0x21b227(0x10c)+_0x21b227(0x123)+'ient_'+_0x21b227(0xf0)+_0x21b227(0xb8),'EEihH':function(_0x37b6d8,_0x7e77a9){return _0x37b6d8||_0x7e77a9;},'Woqcb':'autho'+_0x21b227(0xef)+'ion_c'+_0x21b227(0xe2),'RdFUQ':_0x21b227(0x14c)},{client_name:_0x3908ee,redirect_uris:_0x3d6245}=_0x4e1777[_0x21b227(0xea)];logger[_0x21b227(0x195)]('OAuth'+_0x21b227(0x18b)+_0x21b227(0x117)+'gistr'+_0x21b227(0x15b)+_0x21b227(0xd2)+'est',{'client_name':_0x3908ee,'redirect_uris':_0x3d6245});if(!_0x3d6245||!Array[_0x21b227(0xdc)+'ay'](_0x3d6245)||_0x3c7edc[_0x21b227(0xe9)](_0x3d6245[_0x21b227(0x15a)+'h'],0x0)){_0x329cf0[_0x21b227(0x163)+'s'](0x190)[_0x21b227(0xc2)]({'error':_0x3c7edc[_0x21b227(0xbf)],'error_description':_0x21b227(0xe7)+_0x21b227(0x10b)+_0x21b227(0xff)+_0x21b227(0x186)+_0x21b227(0x11c)});return;}try{const {clientId:_0x4b2fb0,clientSecret:_0x19cb60}=OAuthService[_0x21b227(0x16b)+'ateSi'+_0x21b227(0xf5)+_0x21b227(0x10a)+'Id'](_0x3d6245);_0x329cf0[_0x21b227(0x163)+'s'](0xc9)[_0x21b227(0xc2)]({'client_id':_0x4b2fb0,'client_secret':_0x19cb60,'client_name':_0x3c7edc[_0x21b227(0x125)](_0x3908ee,_0x21b227(0x19a)+_0x21b227(0x10a)),'redirect_uris':_0x3d6245,'grant_types':[_0x3c7edc['Woqcb']],'response_types':[_0x3c7edc[_0x21b227(0x173)]],'token_endpoint_auth_method':_0x21b227(0x16c)+'t_sec'+_0x21b227(0x158)+_0x21b227(0xdf)});}catch(_0x3af7bf){logger[_0x21b227(0xbc)](_0x21b227(0x16a)+'t\x20Reg'+_0x21b227(0x18e)+'tion\x20'+_0x21b227(0x171)+'ted',{'error':_0x3af7bf['messa'+'ge'],'redirect_uris':_0x3d6245}),_0x329cf0[_0x21b227(0x163)+'s'](0x190)['json']({'error':_0x21b227(0x10c)+_0x21b227(0x123)+_0x21b227(0xe1)+_0x21b227(0xf0)+_0x21b227(0xb8),'error_description':_0x3af7bf[_0x21b227(0x19e)+'ge']});}}),router[a0_0x35c3d6(0xbd)]('/oaut'+'h/aut'+a0_0x35c3d6(0xfc)+'e',createAuthRateLimit,(_0x3b926d,_0x151416)=>{const _0x2e5cfd=a0_0x35c3d6,_0x5e0c8e={'qJEcO':_0x2e5cfd(0xe8)+'ng\x20Cl'+'ickUp'+_0x2e5cfd(0x18b)+_0x2e5cfd(0x174)+_0x2e5cfd(0x122)+_0x2e5cfd(0x143)+'\x20conf'+_0x2e5cfd(0x11e)+_0x2e5cfd(0x17f),'UPIFX':_0x2e5cfd(0xd7)+_0x2e5cfd(0x114)+_0x2e5cfd(0x130)+_0x2e5cfd(0xcc)+_0x2e5cfd(0x197)+'Missi'+'ng\x20Cl'+_0x2e5cfd(0xf1)+_0x2e5cfd(0x18b)+_0x2e5cfd(0x174),'FLAcW':_0x2e5cfd(0xe7)+_0x2e5cfd(0x10b)+'ri','FKogl':_0x2e5cfd(0xbe)+_0x2e5cfd(0xf2)+_0x2e5cfd(0x15e),'LJfLe':function(_0x5e4fd9,_0x391d65){return _0x5e4fd9===_0x391d65;},'YqGwm':'__Hos'+'t-mcp'+_0x2e5cfd(0xcd)+_0x2e5cfd(0x145)+'e','tNAZX':'mcp_a'+_0x2e5cfd(0xd8)+'tate','RZylz':function(_0x58c1ae,_0xb651dd){return _0x58c1ae*_0xb651dd;}},{response_type:_0x1f3eda,client_id:_0x6883aa,redirect_uri:_0x13a235,state:_0x32c515,code_challenge:_0x6ab52a,code_challenge_method:_0x1fcf55}=_0x3b926d[_0x2e5cfd(0xf9)];logger['info'](_0x2e5cfd(0xeb)+_0x2e5cfd(0x188)+_0x2e5cfd(0xc6)+_0x2e5cfd(0x199)+_0x2e5cfd(0xd6)+_0x2e5cfd(0x179)+'roxy)',{'response_type':_0x1f3eda,'client_id':_0x6883aa,'redirect_uri':_0x13a235,'state':_0x32c515});if(_0x6883aa&&!OAuthService['verif'+_0x2e5cfd(0x13d)+_0x2e5cfd(0x154)](_0x6883aa,_0x13a235)){_0x151416['statu'+'s'](0x191)['send']('Inval'+_0x2e5cfd(0x118)+_0x2e5cfd(0x164)+'ID\x20or'+_0x2e5cfd(0x182)+_0x2e5cfd(0xe6)+'URI\x20n'+_0x2e5cfd(0x18d)+_0x2e5cfd(0x17a));return;}const _0x449c6d=a0_0x1f1149['click'+_0x2e5cfd(0x134)+'entId'];if(!_0x449c6d){logger['error'](_0x5e0c8e[_0x2e5cfd(0x121)]),_0x151416[_0x2e5cfd(0x163)+'s'](0x1f4)[_0x2e5cfd(0x148)](_0x5e0c8e[_0x2e5cfd(0xee)]);return;}const _0x4bc0c6=OAuthService[_0x2e5cfd(0x16b)+_0x2e5cfd(0x16f)+'oxySt'+_0x2e5cfd(0x153)](_0x13a235,_0x32c515,_0x6ab52a,_0x1fcf55),_0x5861ae=new URL('https'+'://ap'+_0x2e5cfd(0x147)+_0x2e5cfd(0x12f)+_0x2e5cfd(0x162)+'pi');_0x5861ae[_0x2e5cfd(0x1a6)+_0x2e5cfd(0x192)+'ms'][_0x2e5cfd(0xb4)+'d'](_0x2e5cfd(0x16c)+_0x2e5cfd(0xc1),_0x449c6d),_0x5861ae[_0x2e5cfd(0x1a6)+_0x2e5cfd(0x192)+'ms'][_0x2e5cfd(0xb4)+'d'](_0x5e0c8e[_0x2e5cfd(0xb5)],serverUrl+(_0x2e5cfd(0x1a5)+_0x2e5cfd(0x1a7)+'lback')),_0x5861ae[_0x2e5cfd(0x1a6)+_0x2e5cfd(0x192)+'ms']['appen'+'d'](_0x5e0c8e['FKogl'],_0x2e5cfd(0x14c)),_0x5861ae[_0x2e5cfd(0x1a6)+_0x2e5cfd(0x192)+'ms'][_0x2e5cfd(0xb4)+'d']('state',_0x4bc0c6);const _0xd438c=_0x3b926d[_0x2e5cfd(0x187)+'e']||_0x5e0c8e[_0x2e5cfd(0x120)](_0x3b926d[_0x2e5cfd(0x14a)+'rs'][_0x2e5cfd(0xe4)+_0x2e5cfd(0x198)+_0x2e5cfd(0xd9)+'to'],_0x2e5cfd(0x13f)),_0x48d1d2=_0xd438c?_0x5e0c8e['YqGwm']:_0x5e0c8e[_0x2e5cfd(0x184)];_0x151416[_0x2e5cfd(0xc8)+'e'](_0x48d1d2,_0x4bc0c6,{'httpOnly':!![],'secure':_0xd438c,'sameSite':_0x2e5cfd(0xe5),'maxAge':_0x5e0c8e[_0x2e5cfd(0xcb)](0xf,0x3c)*0x3e8,'path':'/'}),_0x151416[_0x2e5cfd(0xe7)+'ect'](_0x5861ae['toStr'+_0x2e5cfd(0x159)]());}),router[a0_0x35c3d6(0xbd)]('/oaut'+'h/cal'+'lback',createAuthRateLimit,(_0x2a60e6,_0x16820f)=>{const _0xb93d93=a0_0x35c3d6,_0x48a715={'RWmKj':'OAuth'+_0xb93d93(0x105)+_0xb93d93(0xb6)+_0xb93d93(0x152)+_0xb93d93(0x124),'gXuNv':_0xb93d93(0xeb)+_0xb93d93(0xd3)+_0xb93d93(0xde)+_0xb93d93(0xf4)+_0xb93d93(0xc9)+_0xb93d93(0x180)+'smatc'+_0xb93d93(0x142)+'missi'+_0xb93d93(0x11b)+_0xb93d93(0xf7),'GdTBv':function(_0x46ee0e,_0x15b2e5){return _0x46ee0e===_0x15b2e5;},'FJGTb':_0xb93d93(0x11f)+_0xb93d93(0xed)+_0xb93d93(0x139)+_0xb93d93(0x189)+_0xb93d93(0x169)+'te','kzkkC':_0xb93d93(0x116)+_0xb93d93(0xd5)+_0xb93d93(0x18a)+_0xb93d93(0x12a)+'ter'},{code:_0x2c0a7e,state:_0x364fd9}=_0x2a60e6['query'];if(!_0x2c0a7e||!_0x364fd9){_0x16820f[_0xb93d93(0x163)+'s'](0x190)[_0xb93d93(0x148)](_0xb93d93(0xe8)+_0xb93d93(0x11b)+'de\x20or'+_0xb93d93(0x129)+_0xb93d93(0x191)+_0xb93d93(0x1a1)+_0xb93d93(0x128));return;}logger[_0xb93d93(0x195)](_0x48a715[_0xb93d93(0x127)],{'query':_0x2a60e6[_0xb93d93(0xf9)]});const _0x489507=_0x2a60e6[_0xb93d93(0x187)+'e']||_0x2a60e6[_0xb93d93(0x14a)+'rs'][_0xb93d93(0xe4)+_0xb93d93(0x198)+_0xb93d93(0xd9)+'to']===_0xb93d93(0x13f),_0x2e0958=_0x489507?_0xb93d93(0x17d)+_0xb93d93(0x12b)+_0xb93d93(0xcd)+_0xb93d93(0x145)+'e':_0xb93d93(0x132)+'uth_s'+_0xb93d93(0x107),_0x5051b1=_0x2a60e6[_0xb93d93(0xc8)+'es']?.[_0x2e0958];if(!_0x5051b1||_0x5051b1!==_0x364fd9){logger[_0xb93d93(0xbc)](_0x48a715[_0xb93d93(0x183)],{'hasCookie':!!_0x5051b1,'cookieName':_0x2e0958,'stateMatch':_0x48a715[_0xb93d93(0x15c)](_0x5051b1,_0x364fd9)}),_0x16820f[_0xb93d93(0x163)+'s'](0x193)[_0xb93d93(0x148)](_0xb93d93(0xca)+_0xb93d93(0x167)+'tion\x20'+_0xb93d93(0xdb)+_0xb93d93(0x168)+_0xb93d93(0x10f)+'\x20time'+'out\x20o'+_0xb93d93(0xdd)+_0xb93d93(0x196)+'ected'+_0xb93d93(0x113)+_0xb93d93(0x18f)+'ry\x20ag'+'ain.');return;}_0x16820f[_0xb93d93(0x17e)+_0xb93d93(0x106)+'e'](_0x2e0958,{'path':'/'});try{const _0x18bd57=OAuthService[_0xb93d93(0xc5)+'eProx'+_0xb93d93(0xc7)+'e'](_0x364fd9),_0x229d43=new URL(_0x18bd57['origi'+'nal_r'+_0xb93d93(0xf3)+'ct_ur'+'i']),_0xd2ff33=OAuthService['gener'+_0xb93d93(0x108)+_0xb93d93(0x185)+'roxyC'+_0xb93d93(0xe2)](_0x2c0a7e,_0x18bd57[_0xb93d93(0x133)+_0xb93d93(0x14d)+_0xb93d93(0x10d)],_0x18bd57[_0xb93d93(0x133)+_0xb93d93(0x14d)+'enge_'+_0xb93d93(0x111)+'d']);_0x229d43[_0xb93d93(0x1a6)+'hPara'+'ms'][_0xb93d93(0xb4)+'d'](_0xb93d93(0x14c),_0xd2ff33),_0x229d43[_0xb93d93(0x1a6)+_0xb93d93(0x192)+'ms'][_0xb93d93(0xb4)+'d']('state',_0x18bd57[_0xb93d93(0xce)+_0xb93d93(0x144)+_0xb93d93(0x107)]),_0x16820f[_0xb93d93(0xe7)+_0xb93d93(0x104)](_0x229d43[_0xb93d93(0x170)+_0xb93d93(0x159)]());}catch(_0x555503){logger[_0xb93d93(0x178)](_0x48a715[_0xb93d93(0x140)],_0x555503),_0x16820f[_0xb93d93(0x163)+'s'](0x190)[_0xb93d93(0x148)](_0x48a715[_0xb93d93(0x11d)]);}}),router[a0_0x35c3d6(0x13c)]('/oaut'+a0_0x35c3d6(0x181)+'en',createAuthRateLimit,async(_0x418b16,_0x1e98a9)=>{const _0x53eba5=a0_0x35c3d6,_0x5a19b0={'UzGQs':_0x53eba5(0xeb)+'\x20Toke'+_0x53eba5(0xf8)+'hange'+'\x20requ'+_0x53eba5(0xc4)+'Proxy'+')','DiEIk':function(_0x220ef2,_0xfd2b72){return _0x220ef2&&_0xfd2b72;},'DODFt':_0x53eba5(0x116)+_0x53eba5(0x118)+_0x53eba5(0x164)+'Secre'+'t','eAWcW':'Inval'+_0x53eba5(0xb7)+_0x53eba5(0x17b)+'ode','MbPeb':_0x53eba5(0x10c)+'id_gr'+_0x53eba5(0xb9),'XdPQx':'Inval'+'id\x20au'+_0x53eba5(0x1a2)+_0x53eba5(0x102)+_0x53eba5(0x11a)+_0x53eba5(0xba)+_0x53eba5(0x131)+_0x53eba5(0x103),'RjisZ':_0x53eba5(0xe0)+_0x53eba5(0x166)+_0x53eba5(0x172)+_0x53eba5(0x176)+'iled','YEqAJ':'https'+_0x53eba5(0xfd)+_0x53eba5(0x190)+'ckup.'+_0x53eba5(0x162)+_0x53eba5(0x18c)+'/team','yufDt':function(_0xb4235e,_0x4164a5){return _0xb4235e>_0x4164a5;},'Lecxk':_0x53eba5(0xfa)+'ding\x20'+_0x53eba5(0x16d)+_0x53eba5(0x14f)+'selec'+'tion\x20'+'into\x20'+'token','UBiRK':_0x53eba5(0x13a)+_0x53eba5(0x1a3)+_0x53eba5(0xc0)+_0x53eba5(0x135)+_0x53eba5(0x161)+_0x53eba5(0x112)+'e','RVhRJ':'Faile'+'d\x20to\x20'+'excha'+_0x53eba5(0x194)+'oken\x20'+_0x53eba5(0x136)+_0x53eba5(0x156)+_0x53eba5(0x16e)+_0x53eba5(0x165)+'er'},{grant_type:_0x462e42,code:_0x4a9134,redirect_uri:_0xa88553,client_id:_0x1cb148,client_secret:_0x2d6a52,code_verifier:_0x4e09c5}=_0x418b16[_0x53eba5(0xea)];logger[_0x53eba5(0x195)](_0x5a19b0[_0x53eba5(0x151)],{'grant_type':_0x462e42,'client_id':_0x1cb148});if(_0x5a19b0[_0x53eba5(0x137)](_0x1cb148,_0x2d6a52)){if(!OAuthService['verif'+'yClie'+'ntSec'+_0x53eba5(0x19d)](_0x1cb148,_0x2d6a52)){logger[_0x53eba5(0xbc)](_0x5a19b0[_0x53eba5(0x160)],{'client_id':_0x1cb148}),_0x1e98a9['statu'+'s'](0x191)[_0x53eba5(0xc2)]({'error':'inval'+_0x53eba5(0x123)+_0x53eba5(0xbb),'error_description':_0x53eba5(0x116)+'id\x20cl'+_0x53eba5(0x164)+_0x53eba5(0x1a4)+_0x53eba5(0x15d)+'s'});return;}}const _0x4a84e7=OAuthService[_0x53eba5(0x166)+_0x53eba5(0xb1)+_0x53eba5(0x150)+_0x53eba5(0x10e)+'Code'](_0x4a9134);if(!_0x4a84e7){logger[_0x53eba5(0xbc)](_0x5a19b0[_0x53eba5(0x14e)],{'code':_0x4a9134}),_0x1e98a9['statu'+'s'](0x190)['json']({'error':_0x5a19b0[_0x53eba5(0x119)],'error_description':_0x5a19b0[_0x53eba5(0x115)]});return;}if(!_0x4e09c5){_0x1e98a9[_0x53eba5(0x163)+'s'](0x190)[_0x53eba5(0xc2)]({'error':_0x5a19b0[_0x53eba5(0x119)],'error_description':_0x53eba5(0x133)+_0x53eba5(0x166)+'ier\x20i'+_0x53eba5(0x186)+_0x53eba5(0x11c)+_0x53eba5(0xec)+_0x53eba5(0x15f)});return;}if(!OAuthService[_0x53eba5(0x166)+_0x53eba5(0x12c)](_0x4e09c5,_0x4a84e7['hc'],_0x4a84e7['hm'])){logger['warn'](_0x5a19b0[_0x53eba5(0x126)],{'clickUpCode':_0x4a84e7['c'],'verifier':_0x4e09c5}),_0x1e98a9[_0x53eba5(0x163)+'s'](0x190)[_0x53eba5(0xc2)]({'error':_0x53eba5(0x10c)+_0x53eba5(0xfb)+_0x53eba5(0xb9),'error_description':_0x5a19b0[_0x53eba5(0x126)]});return;}const _0x3958fb=await OAuthService[_0x53eba5(0x135)+'ngeTo'+_0x53eba5(0x157)+_0x53eba5(0x138)+_0x53eba5(0x128)](_0x4a84e7['c']);if(_0x3958fb[_0x53eba5(0x19c)+'ss']){const _0x38744d=_0x3958fb[_0x53eba5(0xda)][_0x53eba5(0xcf)+_0x53eba5(0x14b)+'en'];clearTokenCache(_0x38744d);try{const _0x3fd620=await a0_0x1cc724[_0x53eba5(0xbd)](_0x5a19b0[_0x53eba5(0x146)],{'headers':{'Authorization':_0x38744d},'timeout':0x2710}),_0x596f70=_0x3fd620[_0x53eba5(0xda)]?.[_0x53eba5(0x13e)]||[];if(_0x5a19b0[_0x53eba5(0xd0)](_0x596f70[_0x53eba5(0x15a)+'h'],0x0)){const _0x140360=_0x596f70[_0x53eba5(0x19f)](_0x46f1c3=>String(_0x46f1c3['id'])),_0x17ea22=_0x140360[_0x53eba5(0xb2)](','),_0x5e88b7=_0x17ea22+':'+_0x38744d;logger[_0x53eba5(0x195)](_0x5a19b0[_0x53eba5(0x101)],{'count':_0x140360[_0x53eba5(0x15a)+'h'],'confirmedIds':_0x17ea22}),_0x1e98a9[_0x53eba5(0xc2)]({..._0x3958fb[_0x53eba5(0xda)],'access_token':_0x5e88b7,'first_team_id':_0x140360[0x0],'all_team_ids':_0x140360});return;}}catch(_0xcaa0b4){logger[_0x53eba5(0xbc)](_0x53eba5(0x11f)+'d\x20to\x20'+_0x53eba5(0x1a0)+'\x20team'+'s\x20for'+'\x20embe'+'dding'+_0x53eba5(0x12e)+_0x53eba5(0xd4)+'g\x20raw'+_0x53eba5(0xc3)+'n',{'error':_0xcaa0b4[_0x53eba5(0x19e)+'ge']});}_0x1e98a9[_0x53eba5(0xc2)](_0x3958fb[_0x53eba5(0xda)]);}else logger[_0x53eba5(0x178)](_0x5a19b0[_0x53eba5(0x177)],{'error':_0x3958fb[_0x53eba5(0x178)]}),_0x1e98a9[_0x53eba5(0x163)+'s'](0x1f4)[_0x53eba5(0xc2)]({'error':_0x5a19b0[_0x53eba5(0x141)],'details':_0x3958fb['error']});});export default router;
package/build/config.js CHANGED
@@ -1 +1 @@
1
- function a0_0x1c27(){const _0x3311fe=['vvbqt1i','zvn0zgK','zMfSC2u','zhn1CMy','mtGZnZKZnZDSuMfPqMO','zgv2l2m','lgH0Dha','lZeYnY4','vfjbq0u','mtOZmda','zwL1Bs4','rvjst1i','mte5mdKZnNLMr3zZtW','l1S6oJe','oI8VDNm','Ahr0CdO','Ahr0Chm','y3a6lY8','lhzZy28','nJGZmdu5sKDRvMv6','AMHXse4','mtbTyG','zw50ihy','lY8XmJC','wZO6mv0','lY8Q','ExnWAgu','Dha6lY8','y2fSAg8','oIOSAhq','oI8VkIW','mtqXnZuWvhfbwhfi','Cej3Cum','C3bSAxq','CxvPCMu','qu1Fsuq','DgLequu','nY4WlJa','lhPLzdO','zvntrq','zw50swq','twLZC2K','lJe6mZq','y2XHDwq','rv9tu0u','mJe2mZyWr0vqy1bj','mJK0nJzJwgHSDgy','rvzfta','ywXOB3m','mc4WlJe','y29Tl2m','mtG1mJa4ohfkueX5Eq','B3bPyY4','y3vYC28','zs5HAq','zgu6lY8','y29TlYO','Cg9YDa','C2nVzgu','DhbZoI8','BgjHy2S','kIXODhq','rv9tveq','t0juBhK','lJaUmc4','zguUywK','q0Xjq0S','mZiZmq','lY8QlNy','DMvS','xtOQlgm','y3jLDa','BgvKvg8','y29T','ru5ux1m','BuLK','DNnJB2q','su5gtW','AtOVlYO','zwruB28','DMLLDZO','v0fstG','zxjdyxm','AM9PBG','s2v5','DhjPBq','zgLZywi','y29Kzs4','DdOZmda','zs5Kzxy','C3nLug8','AxjVBM0','CgvHCMe','zw50u3u','y2SSAhq','oI8Vmti','ls1LBNy','t1ju','kIX3Aw4','yw50Ahi','yxjNDG','CMvKAxi','B2XZ','BLvNAeu','zcbLBNy','zw50u2u','DhrWCZO','BgHVC3q','CMuUzgu','lYOUyw4','BgvZoIa','Dg9vCha','lY9SB2m','CZOVl3y','DxbdBgK','DhrWoI8','DdOZmJm','zMLSDgu','tevex1q','zw5HyMW','revcvuC','yMfJAYW','zg9JDw0','u1nfx1a','BMCGCMu','Dxbuzwe','t09muW','ru5bqKW','oI8VkI4','DI9JywW','n2D1AuTZwG','y2XPy2S','Ac9JywW','AwLHr3y','vvbFqva','zgv2','nw95D2vYAG','Ag9ZDa','t0Xt','kI5JDxi','s0nPsuG','re9dvu0','ChbVCNq','DxbbCgK','mtOZmJm','Bg9Ntgu','BgvUz3q','sv9lrvK','BwfW','mc4WlJa','BMn5wwW','reLtqui','ywXSyMe','l2nHBgW'];a0_0x1c27=function(){return _0x3311fe;};return a0_0x1c27();}const a0_0x169094=a0_0x11d9;(function(_0x20f78a,_0x1669b8){const _0x1a3777=a0_0x11d9,_0x3ebec5=_0x20f78a();while(!![]){try{const _0x8ad33e=-parseInt(_0x1a3777(0x20b))/0x1+parseInt(_0x1a3777(0x18b))/0x2+parseInt(_0x1a3777(0x18c))/0x3+-parseInt(_0x1a3777(0x204))/0x4*(parseInt(_0x1a3777(0x1e6))/0x5)+-parseInt(_0x1a3777(0x17d))/0x6+-parseInt(_0x1a3777(0x1e0))/0x7*(parseInt(_0x1a3777(0x191))/0x8)+parseInt(_0x1a3777(0x1fc))/0x9;if(_0x8ad33e===_0x1669b8)break;else _0x3ebec5['push'](_0x3ebec5['shift']());}catch(_0x19cccc){_0x3ebec5['push'](_0x3ebec5['shift']());}}}(a0_0x1c27,0xe1a42));const args=process[a0_0x169094(0x1c2)]['slice'](0x2),envArgs={};for(let i=0x0;i<args[a0_0x169094(0x1f0)+'h'];i++){if(args[i]===a0_0x169094(0x1be)&&i+0x1<args[a0_0x169094(0x1f0)+'h']){const [key,value]=args[i+0x1][a0_0x169094(0x17f)]('=');if(key===a0_0x169094(0x1a0)+a0_0x169094(0x1e4)+a0_0x169094(0x1f1))envArgs[a0_0x169094(0x1e1)+a0_0x169094(0x1ed)+a0_0x169094(0x1b2)]=value;if(key==='CLICK'+'UP_TE'+a0_0x169094(0x181))envArgs[a0_0x169094(0x1e1)+a0_0x169094(0x1db)+a0_0x169094(0x1a9)]=value;if(key===a0_0x169094(0x1eb)+a0_0x169094(0x1a8)+a0_0x169094(0x1f8)+'T')envArgs[a0_0x169094(0x1d8)+a0_0x169094(0x1bb)+a0_0x169094(0x1ec)]=value;if(key==='LOG_L'+a0_0x169094(0x18d))envArgs[a0_0x169094(0x1ef)+'vel']=value;if(key===a0_0x169094(0x1f5)+a0_0x169094(0x1d4)+a0_0x169094(0x1dc))envArgs[a0_0x169094(0x1b4)+'ledTo'+a0_0x169094(0x1c4)]=value;if(key===a0_0x169094(0x1dd)+'ED_TO'+a0_0x169094(0x1e8))envArgs['enabl'+a0_0x169094(0x1ad)+'ls']=value;if(key===a0_0x169094(0x1dd)+a0_0x169094(0x18a))envArgs['enabl'+a0_0x169094(0x185)]=value;if(key===a0_0x169094(0x1d9)+a0_0x169094(0x1bf))envArgs[a0_0x169094(0x1b8)+'rt']=value;if(key===a0_0x169094(0x1dd)+a0_0x169094(0x19c)+'IO')envArgs['enabl'+'eStdi'+'o']=value;if(key==='PORT')envArgs[a0_0x169094(0x197)]=value;if(key==='HOST')envArgs['host']=value;i++;}}export var LogLevel;(function(_0x3c3250){const _0x4d0668=a0_0x169094,_0x3d9e77={'iiaGv':_0x4d0668(0x200),'BZWPy':'DEBUG','nUghE':_0x4d0668(0x1ab),'jhqHN':'WARN'};_0x3c3250[_0x3c3250[_0x4d0668(0x200)]=0x0]=_0x3d9e77[_0x4d0668(0x1e3)],_0x3c3250[_0x3c3250[_0x3d9e77['BZWPy']]=0x1]='DEBUG',_0x3c3250[_0x3c3250[_0x4d0668(0x1ab)]=0x2]=_0x3d9e77[_0x4d0668(0x1c5)],_0x3c3250[_0x3c3250[_0x3d9e77[_0x4d0668(0x172)]]=0x3]=_0x4d0668(0x1af),_0x3c3250[_0x3c3250[_0x4d0668(0x203)]=0x4]=_0x4d0668(0x203);}(LogLevel||(LogLevel={})));const parseLogLevel=_0x30183c=>{const _0x4c1623=a0_0x169094,_0x25b2f1={'xIdji':_0x4c1623(0x1af)};if(!_0x30183c)return LogLevel[_0x4c1623(0x203)];switch(_0x30183c[_0x4c1623(0x1cd)+_0x4c1623(0x1b0)+'e']()){case _0x4c1623(0x200):return LogLevel[_0x4c1623(0x200)];case'DEBUG':return LogLevel[_0x4c1623(0x1d6)];case _0x4c1623(0x1ab):return LogLevel['INFO'];case _0x25b2f1['xIdji']:return LogLevel[_0x4c1623(0x1af)];case _0x4c1623(0x203):return LogLevel[_0x4c1623(0x203)];default:return LogLevel[_0x4c1623(0x203)];}},parseBoolean=(_0xa02fe4,_0x36d59c)=>{const _0x15ea56=a0_0x169094,_0x44a456={'ncyYl':function(_0x1adff2,_0x3435d7){return _0x1adff2===_0x3435d7;},'tiDAE':'true'};if(_0xa02fe4===undefined)return _0x36d59c;return _0x44a456[_0x15ea56(0x1f4)](_0xa02fe4['toLow'+_0x15ea56(0x1b0)+'e'](),_0x44a456[_0x15ea56(0x182)]);},parseInteger=(_0x272ba3,_0x2c6a1a)=>{const _0x256bcf=a0_0x169094,_0x5ad829={'KCiIH':function(_0x2f24bb,_0x1c58a7,_0x1b81c8){return _0x2f24bb(_0x1c58a7,_0x1b81c8);},'OBTly':function(_0x20ce53,_0x565219){return _0x20ce53(_0x565219);}};if(_0x272ba3===undefined)return _0x2c6a1a;const _0x537911=_0x5ad829[_0x256bcf(0x1ea)](parseInt,_0x272ba3,0xa);return _0x5ad829[_0x256bcf(0x19d)](isNaN,_0x537911)?_0x2c6a1a:_0x537911;},parseOrigins=(_0x57cb8e,_0x509b9d)=>{const _0x3877a3=a0_0x169094;if(!_0x57cb8e)return _0x509b9d;return _0x57cb8e[_0x3877a3(0x17f)](',')['map'](_0x3b3ec7=>_0x3b3ec7[_0x3877a3(0x1b3)]())[_0x3877a3(0x1d3)+'r'](_0x359015=>_0x359015!=='');},configuration={'clickupApiKey':envArgs[a0_0x169094(0x1e1)+'upApi'+'Key']||process.env.CLICKUP_API_KEY||'','clickupTeamId':envArgs[a0_0x169094(0x1e1)+a0_0x169094(0x1db)+a0_0x169094(0x1a9)]||process.env.CLICKUP_TEAM_ID||'','documentSupport':envArgs['docum'+a0_0x169094(0x1bb)+a0_0x169094(0x1ec)]||process.env.DOCUMENT_SUPPORT||process.env.DOCUMENT_MODULE||process.env.DOCUMENT_MODEL||a0_0x169094(0x1fa),'logLevel':parseLogLevel(envArgs[a0_0x169094(0x1ef)+a0_0x169094(0x1a3)]||process.env.LOG_LEVEL),'disabledTools':(envArgs[a0_0x169094(0x1b4)+a0_0x169094(0x1a6)+a0_0x169094(0x1c4)]||process.env.DISABLED_TOOLS||process.env.DISABLED_COMMANDS)?.[a0_0x169094(0x17f)](',')[a0_0x169094(0x1f2)](_0x537d67=>_0x537d67[a0_0x169094(0x1b3)]())[a0_0x169094(0x1d3)+'r'](_0x440663=>_0x440663!=='')||[],'enabledTools':(envArgs[a0_0x169094(0x1d5)+a0_0x169094(0x1ad)+'ls']||process.env.ENABLED_TOOLS)?.[a0_0x169094(0x17f)](',')[a0_0x169094(0x1f2)](_0x54b7fe=>_0x54b7fe[a0_0x169094(0x1b3)]())[a0_0x169094(0x1d3)+'r'](_0x419a9=>_0x419a9!=='')||[],'enableSSE':parseBoolean(envArgs[a0_0x169094(0x1d5)+a0_0x169094(0x185)]||process.env.ENABLE_SSE||process.env.ENABLE_HTTP,![]),'ssePort':parseInteger(envArgs[a0_0x169094(0x1b8)+'rt']||process.env.SSE_PORT,0xbb8),'enableStdio':parseBoolean(envArgs[a0_0x169094(0x1d5)+a0_0x169094(0x1f9)+'o']||process.env.ENABLE_STDIO,!![]),'port':envArgs[a0_0x169094(0x197)]||process.env.PORT||a0_0x169094(0x1a1),'enableSecurityFeatures':parseBoolean(process.env.ENABLE_SECURITY_FEATURES,![]),'enableOriginValidation':parseBoolean(process.env.ENABLE_ORIGIN_VALIDATION,![]),'enableRateLimit':parseBoolean(process.env.ENABLE_RATE_LIMIT,![]),'enableCors':parseBoolean(process.env.ENABLE_CORS,![]),'allowedOrigins':parseOrigins(process.env.ALLOWED_ORIGINS,[a0_0x169094(0x208)+a0_0x169094(0x206)+a0_0x169094(0x1b5)+a0_0x169094(0x1e5),a0_0x169094(0x208)+'://*.'+'vscod'+a0_0x169094(0x1b7),a0_0x169094(0x208)+a0_0x169094(0x1de)+a0_0x169094(0x193)+'r.sh',a0_0x169094(0x208)+a0_0x169094(0x1de)+'anthr'+a0_0x169094(0x192)+a0_0x169094(0x1a7),a0_0x169094(0x208)+a0_0x169094(0x1de)+a0_0x169094(0x189)+a0_0x169094(0x194),a0_0x169094(0x1aa)+'e-web'+a0_0x169094(0x1ae)+a0_0x169094(0x177),a0_0x169094(0x207)+'//127'+'.0.0.'+a0_0x169094(0x1ee)+'1',a0_0x169094(0x207)+'//loc'+'alhos'+a0_0x169094(0x1d2)+'1',a0_0x169094(0x207)+a0_0x169094(0x175)+a0_0x169094(0x19e)+a0_0x169094(0x201)+'0',a0_0x169094(0x207)+a0_0x169094(0x1ce)+'alhos'+a0_0x169094(0x1b6)+'0',a0_0x169094(0x208)+a0_0x169094(0x1bd)+a0_0x169094(0x183)+a0_0x169094(0x188)+'43',a0_0x169094(0x208)+'://lo'+a0_0x169094(0x17a)+'st:34'+'43']),'rateLimitMax':parseInteger(process.env.RATE_LIMIT_MAX,0x64),'rateLimitWindowMs':parseInteger(process.env.RATE_LIMIT_WINDOW_MS,0xea60),'maxRequestSize':process.env.MAX_REQUEST_SIZE||a0_0x169094(0x173),'host':envArgs[a0_0x169094(0x1e7)]||process.env.HOST||a0_0x169094(0x1f3)+'.0','clickupClientId':process.env.CLICKUP_CLIENT_ID,'clickupClientSecret':process.env.CLICKUP_CLIENT_SECRET,'mcpServerUrl':process.env.MCP_SERVER_URL,'redirectUriAllowlist':(process.env.REDIRECT_URI_ALLOWLIST||'http:'+a0_0x169094(0x1ce)+a0_0x169094(0x18e)+'t:*,h'+a0_0x169094(0x1d1)+'/127.'+a0_0x169094(0x18f)+a0_0x169094(0x17b)+a0_0x169094(0x179)+a0_0x169094(0x176)+a0_0x169094(0x17b)+'tps:/'+'/loca'+a0_0x169094(0x1c9)+':*,ht'+'tps:/'+a0_0x169094(0x1ff)+a0_0x169094(0x18f)+':*,ht'+a0_0x169094(0x199)+a0_0x169094(0x205)+a0_0x169094(0x1a4)+'ursor'+a0_0x169094(0x17c)+a0_0x169094(0x189)+'e://*'+a0_0x169094(0x20a)+a0_0x169094(0x195)+a0_0x169094(0x1c0)+a0_0x169094(0x1fb)+a0_0x169094(0x17c)+a0_0x169094(0x1ba)+a0_0x169094(0x1ac)+a0_0x169094(0x184)+'//*,m'+a0_0x169094(0x209)+a0_0x169094(0x19b)+'ps://'+a0_0x169094(0x1e9)+'sor.s'+a0_0x169094(0x1e2)+a0_0x169094(0x19a)+',http'+'s://*'+'.clau'+a0_0x169094(0x19f)+a0_0x169094(0x1f7)+a0_0x169094(0x1d7)+a0_0x169094(0x208)+a0_0x169094(0x1de)+a0_0x169094(0x1c1)+'opic.'+a0_0x169094(0x190)+a0_0x169094(0x1f6)+a0_0x169094(0x1bc)+a0_0x169094(0x199)+a0_0x169094(0x1cb)+a0_0x169094(0x178)+a0_0x169094(0x1ca)+a0_0x169094(0x1df)+a0_0x169094(0x19a)+a0_0x169094(0x1fe)+a0_0x169094(0x1cf)+a0_0x169094(0x198)+'.dev/'+a0_0x169094(0x1c3)+'ect,h'+a0_0x169094(0x1c8)+a0_0x169094(0x1a2)+a0_0x169094(0x198)+'.dev/'+a0_0x169094(0x19b)+'ps://'+'*.cod'+a0_0x169094(0x202)+a0_0x169094(0x196)+a0_0x169094(0x1fe)+'s://*'+'.zed.'+a0_0x169094(0x1fd)+a0_0x169094(0x1f6)+'ck')[a0_0x169094(0x17f)](',')[a0_0x169094(0x1f2)](_0x2051d2=>_0x2051d2[a0_0x169094(0x1b3)]())};export const validateConfiguration=()=>{const _0x2f9b0e=a0_0x169094,_0x112287={'pBwqC':_0x2f9b0e(0x1e1)+_0x2f9b0e(0x1ed)+_0x2f9b0e(0x1b2)},_0x49db20=[_0x112287[_0x2f9b0e(0x17e)],_0x2f9b0e(0x1e1)+_0x2f9b0e(0x1db)+_0x2f9b0e(0x1a9)],_0x25f1f2=_0x49db20[_0x2f9b0e(0x1d3)+'r'](_0x3f121d=>!configuration[_0x3f121d]);if(_0x25f1f2[_0x2f9b0e(0x1f0)+'h']>0x0){const _0x41dc04=!!(configuration[_0x2f9b0e(0x1e1)+_0x2f9b0e(0x1d0)+_0x2f9b0e(0x186)]&&configuration[_0x2f9b0e(0x1e1)+_0x2f9b0e(0x1d0)+_0x2f9b0e(0x1c7)+_0x2f9b0e(0x1a5)]),_0x1d77ab=!!process.env.CLICKUP_MCP_LICENSE_KEY;if(configuration['enabl'+_0x2f9b0e(0x185)]||_0x41dc04||_0x1d77ab){}else throw new Error(_0x2f9b0e(0x187)+_0x2f9b0e(0x1da)+_0x2f9b0e(0x180)+_0x2f9b0e(0x1c6)+_0x2f9b0e(0x1b9)+_0x2f9b0e(0x174)+'ariab'+_0x2f9b0e(0x1cc)+_0x25f1f2[_0x2f9b0e(0x1b1)](',\x20'));}};function a0_0x11d9(_0xbdccdc,_0x14c96e){_0xbdccdc=_0xbdccdc-0x172;const _0x1c27fc=a0_0x1c27();let _0x11d93f=_0x1c27fc[_0xbdccdc];if(a0_0x11d9['iesUOe']===undefined){var _0x10e233=function(_0x56c0af){const _0x3f0071='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2b346a='',_0x3cce5c='';for(let _0x30a08f=0x0,_0xdeeb9c,_0x181d20,_0x29efd5=0x0;_0x181d20=_0x56c0af['charAt'](_0x29efd5++);~_0x181d20&&(_0xdeeb9c=_0x30a08f%0x4?_0xdeeb9c*0x40+_0x181d20:_0x181d20,_0x30a08f++%0x4)?_0x2b346a+=String['fromCharCode'](0xff&_0xdeeb9c>>(-0x2*_0x30a08f&0x6)):0x0){_0x181d20=_0x3f0071['indexOf'](_0x181d20);}for(let _0x53a6ac=0x0,_0x34cbe9=_0x2b346a['length'];_0x53a6ac<_0x34cbe9;_0x53a6ac++){_0x3cce5c+='%'+('00'+_0x2b346a['charCodeAt'](_0x53a6ac)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3cce5c);};a0_0x11d9['TIrXZB']=_0x10e233,a0_0x11d9['CLDgwA']={},a0_0x11d9['iesUOe']=!![];}const _0x49b3a6=_0x1c27fc[0x0],_0x177a3a=_0xbdccdc+_0x49b3a6,_0x24f177=a0_0x11d9['CLDgwA'][_0x177a3a];return!_0x24f177?(_0x11d93f=a0_0x11d9['TIrXZB'](_0x11d93f),a0_0x11d9['CLDgwA'][_0x177a3a]=_0x11d93f):_0x11d93f=_0x24f177,_0x11d93f;}export default configuration;
1
+ function a0_0x3b62(_0x32defa,_0x28fd7c){_0x32defa=_0x32defa-0x1df;const _0x417768=a0_0x4177();let _0x3b6218=_0x417768[_0x32defa];if(a0_0x3b62['pIyWxc']===undefined){var _0x3b9d3a=function(_0x26ac43){const _0x34ba1d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5cbfbb='',_0x5441e3='';for(let _0x1bf11a=0x0,_0x120640,_0x3a38c1,_0x5c14f8=0x0;_0x3a38c1=_0x26ac43['charAt'](_0x5c14f8++);~_0x3a38c1&&(_0x120640=_0x1bf11a%0x4?_0x120640*0x40+_0x3a38c1:_0x3a38c1,_0x1bf11a++%0x4)?_0x5cbfbb+=String['fromCharCode'](0xff&_0x120640>>(-0x2*_0x1bf11a&0x6)):0x0){_0x3a38c1=_0x34ba1d['indexOf'](_0x3a38c1);}for(let _0x10976a=0x0,_0x2e803b=_0x5cbfbb['length'];_0x10976a<_0x2e803b;_0x10976a++){_0x5441e3+='%'+('00'+_0x5cbfbb['charCodeAt'](_0x10976a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5441e3);};a0_0x3b62['aeGdgW']=_0x3b9d3a,a0_0x3b62['qgMhtj']={},a0_0x3b62['pIyWxc']=!![];}const _0x31f0e6=_0x417768[0x0],_0x288ebe=_0x32defa+_0x31f0e6,_0x12270a=a0_0x3b62['qgMhtj'][_0x288ebe];return!_0x12270a?(_0x3b6218=a0_0x3b62['aeGdgW'](_0x3b6218),a0_0x3b62['qgMhtj'][_0x288ebe]=_0x3b6218):_0x3b6218=_0x12270a,_0x3b6218;}const a0_0xe70b7f=a0_0x3b62;(function(_0x517212,_0x9fa061){const _0x169020=a0_0x3b62,_0x56713e=_0x517212();while(!![]){try{const _0x16cc34=-parseInt(_0x169020(0x227))/0x1*(parseInt(_0x169020(0x1f2))/0x2)+-parseInt(_0x169020(0x22a))/0x3*(-parseInt(_0x169020(0x23c))/0x4)+parseInt(_0x169020(0x21a))/0x5+parseInt(_0x169020(0x216))/0x6+parseInt(_0x169020(0x24c))/0x7+parseInt(_0x169020(0x1f6))/0x8+-parseInt(_0x169020(0x1f7))/0x9;if(_0x16cc34===_0x9fa061)break;else _0x56713e['push'](_0x56713e['shift']());}catch(_0x3ccf6d){_0x56713e['push'](_0x56713e['shift']());}}}(a0_0x4177,0xa868f));const args=process['argv']['slice'](0x2),envArgs={};for(let i=0x0;i<args['lengt'+'h'];i++){if(args[i]==='--env'&&i+0x1<args[a0_0xe70b7f(0x223)+'h']){const [key,value]=args[i+0x1][a0_0xe70b7f(0x21d)]('=');if(key===a0_0xe70b7f(0x24b)+a0_0xe70b7f(0x26f)+a0_0xe70b7f(0x22c))envArgs[a0_0xe70b7f(0x270)+a0_0xe70b7f(0x268)+a0_0xe70b7f(0x209)]=value;if(key==='CLICK'+'UP_TE'+a0_0xe70b7f(0x275))envArgs['click'+a0_0xe70b7f(0x1e6)+a0_0xe70b7f(0x1ea)]=value;if(key===a0_0xe70b7f(0x246)+a0_0xe70b7f(0x205)+a0_0xe70b7f(0x211)+'T')envArgs[a0_0xe70b7f(0x1f4)+a0_0xe70b7f(0x26e)+'pport']=value;if(key===a0_0xe70b7f(0x23f)+'EVEL')envArgs['logLe'+a0_0xe70b7f(0x1ed)]=value;if(key===a0_0xe70b7f(0x220)+a0_0xe70b7f(0x235)+a0_0xe70b7f(0x21c))envArgs[a0_0xe70b7f(0x1fe)+a0_0xe70b7f(0x1f5)+a0_0xe70b7f(0x26c)]=value;if(key==='ENABL'+'ED_TO'+a0_0xe70b7f(0x239))envArgs[a0_0xe70b7f(0x265)+a0_0xe70b7f(0x25d)+'ls']=value;if(key===a0_0xe70b7f(0x26d)+'E_SSE')envArgs['enabl'+a0_0xe70b7f(0x22d)]=value;if(key==='SSE_P'+a0_0xe70b7f(0x202))envArgs[a0_0xe70b7f(0x1e7)+'rt']=value;if(key===a0_0xe70b7f(0x26d)+a0_0xe70b7f(0x26b)+'IO')envArgs[a0_0xe70b7f(0x265)+a0_0xe70b7f(0x276)+'o']=value;if(key===a0_0xe70b7f(0x234))envArgs[a0_0xe70b7f(0x226)]=value;if(key===a0_0xe70b7f(0x207))envArgs[a0_0xe70b7f(0x25a)]=value;i++;}}export var LogLevel;(function(_0x47ae20){const _0x586f68=a0_0xe70b7f,_0x2304fc={'cjCGh':_0x586f68(0x262),'CccTy':_0x586f68(0x213),'gGNcA':_0x586f68(0x251),'GTIkx':_0x586f68(0x1e0),'SyAWx':_0x586f68(0x236)},_0x2a080b=(_0x586f68(0x228)+_0x586f68(0x25b))[_0x586f68(0x21d)]('|');let _0x5c4be8=0x0;while(!![]){switch(_0x2a080b[_0x5c4be8++]){case'0':_0x47ae20[_0x47ae20[_0x2304fc[_0x586f68(0x20a)]]=0x1]=_0x2304fc['cjCGh'];continue;case'1':_0x47ae20[_0x47ae20[_0x2304fc['CccTy']]=0x4]=_0x586f68(0x213);continue;case'2':_0x47ae20[_0x47ae20[_0x2304fc[_0x586f68(0x25c)]]=0x3]=_0x586f68(0x251);continue;case'3':_0x47ae20[_0x47ae20[_0x2304fc['GTIkx']]=0x2]=_0x2304fc['GTIkx'];continue;case'4':_0x47ae20[_0x47ae20[_0x586f68(0x236)]=0x0]=_0x2304fc[_0x586f68(0x264)];continue;}break;}}(LogLevel||(LogLevel={})));const parseLogLevel=_0x55fc11=>{const _0x28c58d=a0_0xe70b7f,_0x3d5611={'rZNNv':'INFO','tAjAS':_0x28c58d(0x251),'MrqIR':'ERROR'};if(!_0x55fc11)return LogLevel['ERROR'];switch(_0x55fc11[_0x28c58d(0x218)+_0x28c58d(0x210)+'e']()){case _0x28c58d(0x236):return LogLevel[_0x28c58d(0x236)];case _0x28c58d(0x262):return LogLevel[_0x28c58d(0x262)];case _0x3d5611[_0x28c58d(0x21e)]:return LogLevel['INFO'];case _0x3d5611[_0x28c58d(0x200)]:return LogLevel[_0x28c58d(0x251)];case _0x3d5611[_0x28c58d(0x20f)]:return LogLevel[_0x28c58d(0x213)];default:return LogLevel['ERROR'];}},parseBoolean=(_0x15bfdc,_0x280ce3)=>{const _0x42ac57=a0_0xe70b7f,_0x4a65a9={'jAWkm':function(_0x4cde41,_0x1e89cc){return _0x4cde41===_0x1e89cc;},'GXEeP':function(_0x27fdfe,_0x1a4b38){return _0x27fdfe===_0x1a4b38;}};if(_0x4a65a9[_0x42ac57(0x1ee)](_0x15bfdc,undefined))return _0x280ce3;return _0x4a65a9[_0x42ac57(0x25f)](_0x15bfdc['toLow'+'erCas'+'e'](),_0x42ac57(0x248));},parseInteger=(_0x258d91,_0xa19788)=>{const _0x1f12b7=a0_0xe70b7f,_0x30cd37={'smPTZ':function(_0xb6a084,_0x2eb5ee,_0x497965){return _0xb6a084(_0x2eb5ee,_0x497965);}};if(_0x258d91===undefined)return _0xa19788;const _0x8e2ad2=_0x30cd37[_0x1f12b7(0x201)](parseInt,_0x258d91,0xa);return isNaN(_0x8e2ad2)?_0xa19788:_0x8e2ad2;},parseOrigins=(_0x26003c,_0xd600ef)=>{if(!_0x26003c)return _0xd600ef;return _0x26003c['split'](',')['map'](_0x53953a=>_0x53953a['trim']())['filte'+'r'](_0x219f67=>_0x219f67!=='');},configuration={'clickupApiKey':envArgs['click'+a0_0xe70b7f(0x268)+'Key']||process.env.CLICKUP_API_KEY||'','clickupTeamId':envArgs['click'+a0_0xe70b7f(0x1e6)+'mId']||process.env.CLICKUP_TEAM_ID||'','documentSupport':envArgs[a0_0xe70b7f(0x1f4)+a0_0xe70b7f(0x26e)+'pport']||process.env.DOCUMENT_SUPPORT||process.env.DOCUMENT_MODULE||process.env.DOCUMENT_MODEL||a0_0xe70b7f(0x247),'logLevel':parseLogLevel(envArgs[a0_0xe70b7f(0x258)+a0_0xe70b7f(0x1ed)]||process.env.LOG_LEVEL),'disabledTools':(envArgs[a0_0xe70b7f(0x1fe)+a0_0xe70b7f(0x1f5)+a0_0xe70b7f(0x26c)]||process.env.DISABLED_TOOLS||process.env.DISABLED_COMMANDS)?.[a0_0xe70b7f(0x21d)](',')[a0_0xe70b7f(0x259)](_0x1e3d02=>_0x1e3d02[a0_0xe70b7f(0x242)]())[a0_0xe70b7f(0x249)+'r'](_0x1ade79=>_0x1ade79!=='')||[],'enabledTools':(envArgs[a0_0xe70b7f(0x265)+a0_0xe70b7f(0x25d)+'ls']||process.env.ENABLED_TOOLS)?.[a0_0xe70b7f(0x21d)](',')['map'](_0x474d84=>_0x474d84['trim']())[a0_0xe70b7f(0x249)+'r'](_0x259320=>_0x259320!=='')||[],'enableSSE':parseBoolean(envArgs[a0_0xe70b7f(0x265)+a0_0xe70b7f(0x22d)]||process.env.ENABLE_SSE||process.env.ENABLE_HTTP,![]),'ssePort':parseInteger(envArgs[a0_0xe70b7f(0x1e7)+'rt']||process.env.SSE_PORT,0xbb8),'enableStdio':parseBoolean(envArgs['enabl'+'eStdi'+'o']||process.env.ENABLE_STDIO,!![]),'port':envArgs['port']||process.env.PORT||a0_0xe70b7f(0x1ef),'enableSecurityFeatures':parseBoolean(process.env.ENABLE_SECURITY_FEATURES,![]),'enableOriginValidation':parseBoolean(process.env.ENABLE_ORIGIN_VALIDATION,![]),'enableRateLimit':parseBoolean(process.env.ENABLE_RATE_LIMIT,![]),'enableCors':parseBoolean(process.env.ENABLE_CORS,![]),'allowedOrigins':parseOrigins(process.env.ALLOWED_ORIGINS,['https'+a0_0xe70b7f(0x21f)+a0_0xe70b7f(0x1ff)+'dev',a0_0xe70b7f(0x1e4)+'://*.'+a0_0xe70b7f(0x244)+a0_0xe70b7f(0x266),'https'+a0_0xe70b7f(0x271)+'curso'+'r.sh','https'+'://*.'+a0_0xe70b7f(0x1f1)+a0_0xe70b7f(0x253)+a0_0xe70b7f(0x257),a0_0xe70b7f(0x1e4)+'://*.'+a0_0xe70b7f(0x229)+a0_0xe70b7f(0x250),a0_0xe70b7f(0x244)+a0_0xe70b7f(0x231)+a0_0xe70b7f(0x256)+a0_0xe70b7f(0x23e),a0_0xe70b7f(0x237)+a0_0xe70b7f(0x272)+'.0.0.'+a0_0xe70b7f(0x1fa)+'1','http:'+a0_0xe70b7f(0x204)+a0_0xe70b7f(0x215)+'t:323'+'1',a0_0xe70b7f(0x237)+a0_0xe70b7f(0x272)+'.0.0.'+a0_0xe70b7f(0x1fd)+'0','http:'+'//loc'+'alhos'+a0_0xe70b7f(0x24e)+'0','https'+a0_0xe70b7f(0x273)+a0_0xe70b7f(0x241)+a0_0xe70b7f(0x1e2)+'43',a0_0xe70b7f(0x1e4)+'://lo'+a0_0xe70b7f(0x1e1)+'st:34'+'43']),'rateLimitMax':parseInteger(process.env.RATE_LIMIT_MAX,0x64),'rateLimitWindowMs':parseInteger(process.env.RATE_LIMIT_WINDOW_MS,0xea60),'maxRequestSize':process.env.MAX_REQUEST_SIZE||a0_0xe70b7f(0x274),'host':envArgs[a0_0xe70b7f(0x25a)]||process.env.HOST||'0.0.0'+'.0','clickupClientId':process.env.CLICKUP_CLIENT_ID,'clickupClientSecret':process.env.CLICKUP_CLIENT_SECRET,'mcpServerUrl':process.env.MCP_SERVER_URL,'redirectUriAllowlist':(process.env.REDIRECT_URI_ALLOWLIST||a0_0xe70b7f(0x237)+a0_0xe70b7f(0x204)+'alhos'+'t:*,h'+a0_0xe70b7f(0x1f8)+'/127.'+a0_0xe70b7f(0x252)+a0_0xe70b7f(0x20b)+'tp://'+a0_0xe70b7f(0x1e8)+a0_0xe70b7f(0x20b)+a0_0xe70b7f(0x25e)+a0_0xe70b7f(0x1ec)+a0_0xe70b7f(0x206)+a0_0xe70b7f(0x20b)+a0_0xe70b7f(0x25e)+'/127.'+a0_0xe70b7f(0x252)+a0_0xe70b7f(0x20b)+a0_0xe70b7f(0x25e)+a0_0xe70b7f(0x23b)+a0_0xe70b7f(0x243)+a0_0xe70b7f(0x203)+a0_0xe70b7f(0x267)+a0_0xe70b7f(0x229)+'e://*'+',vsco'+a0_0xe70b7f(0x20c)+a0_0xe70b7f(0x22b)+a0_0xe70b7f(0x26a)+'://*,'+a0_0xe70b7f(0x22e)+a0_0xe70b7f(0x1fb)+a0_0xe70b7f(0x261)+a0_0xe70b7f(0x20d)+'cp://'+a0_0xe70b7f(0x263)+'ps://'+a0_0xe70b7f(0x24a)+'sor.s'+a0_0xe70b7f(0x23d)+a0_0xe70b7f(0x1f0)+a0_0xe70b7f(0x22f)+'s://*'+a0_0xe70b7f(0x24d)+a0_0xe70b7f(0x254)+a0_0xe70b7f(0x260)+a0_0xe70b7f(0x255)+'https'+a0_0xe70b7f(0x271)+a0_0xe70b7f(0x1f1)+a0_0xe70b7f(0x253)+'com/c'+a0_0xe70b7f(0x1df)+a0_0xe70b7f(0x1e5)+a0_0xe70b7f(0x25e)+a0_0xe70b7f(0x225)+a0_0xe70b7f(0x1e3)+a0_0xe70b7f(0x208)+a0_0xe70b7f(0x1f3)+a0_0xe70b7f(0x1f0)+a0_0xe70b7f(0x22f)+'s://v'+'scode'+a0_0xe70b7f(0x240)+'redir'+a0_0xe70b7f(0x233)+'ttps:'+a0_0xe70b7f(0x1e9)+a0_0xe70b7f(0x1fc)+'.dev/'+a0_0xe70b7f(0x263)+'ps://'+a0_0xe70b7f(0x20e)+'eium.'+a0_0xe70b7f(0x219)+a0_0xe70b7f(0x22f)+a0_0xe70b7f(0x221)+a0_0xe70b7f(0x269)+a0_0xe70b7f(0x238)+a0_0xe70b7f(0x1df)+'ck')[a0_0xe70b7f(0x21d)](',')[a0_0xe70b7f(0x259)](_0x527859=>_0x527859['trim']())};export const validateConfiguration=()=>{const _0x14b6af=a0_0xe70b7f,_0x49d1ba={'DAelK':_0x14b6af(0x270)+_0x14b6af(0x268)+_0x14b6af(0x209),'NHzGp':_0x14b6af(0x270)+_0x14b6af(0x1e6)+_0x14b6af(0x1ea)},_0x1fc74b=[_0x49d1ba[_0x14b6af(0x217)],_0x49d1ba[_0x14b6af(0x232)]],_0x3bdaaf=_0x1fc74b['filte'+'r'](_0x10090c=>!configuration[_0x10090c]);if(_0x3bdaaf[_0x14b6af(0x223)+'h']>0x0){const _0x5b4da3=!!(configuration[_0x14b6af(0x270)+_0x14b6af(0x214)+_0x14b6af(0x212)]&&configuration[_0x14b6af(0x270)+_0x14b6af(0x214)+_0x14b6af(0x224)+_0x14b6af(0x222)]),_0x192b86=!!process.env.CLICKUP_MCP_LICENSE_KEY;if(configuration[_0x14b6af(0x265)+'eSSE']||_0x5b4da3||_0x192b86){}else throw new Error(_0x14b6af(0x230)+_0x14b6af(0x24f)+_0x14b6af(0x1eb)+'d\x20env'+_0x14b6af(0x245)+_0x14b6af(0x21b)+'ariab'+_0x14b6af(0x23a)+_0x3bdaaf[_0x14b6af(0x1f9)](',\x20'));}};function a0_0x4177(){const _0x512599=['v0fstG','mc4WlJe','B3bPyY4','zguUywK','yMfJAYW','DMLLDZO','y29T','Bg9Ntgu','BwfW','Ag9ZDa','Fdj8mq','z0Doy0e','zwruB28','DhbZoI8','r1Hfzva','l2nHBgW','lhPLzdO','revcvuC','kIXODhq','u3Lbv3G','zw5HyMW','zs5Kzxy','oI8VkIW','DxbbCgK','lNPLzc4','zhn1CMy','rv9tveq','B2XZ','ru5bqKW','zw50u3u','vvbFqva','y2XPy2S','oI8VkI4','lY8XmJC','oI8Vmti','mtbTyG','qu1Fsuq','zvn0zgK','ywXSyMe','su5gtW','y2fSAg8','lJe6mZq','ExnWAgu','Ahr0Chm','y2SSAhq','Dxbuzwe','C3nLug8','wZO6mv0','lY8QlNy','BuLK','CxvPCMu','l2XVy2e','DMvS','AKfxA20','mZiZmq','BgjHy2S','yw50Ahi','mtC3mZa3ne5kzvbcqG','DI9JywW','zg9JDw0','BgvKvg8','mteWmtmWnerkALHhyq','mtCXndeWotrqALnhEwO','DhrWoI8','AM9PBG','mtOZmJm','AtOVlYO','C2nVzgu','mtOZmda','zgLZywi','y29Kzs4','DefQqvm','C21qvfO','t1ju','DxjZB3i','lY9SB2m','ru5ux1m','BgHVC3q','se9tva','CMuUzgu','s2v5','y2Pdr2G','oIOSAhq','zgu6lY8','lY8Qlg0','kI5JB2q','txjXsvi','zxjdyxm','vvbqt1i','zw50swq','rvjst1i','DxbdBgK','ywXOB3m','ntq4nJa5ngL2B0HvvW','refLBeS','Dg9vCha','y29TlYO','ntyYnZmWmhnpDKDivq','zw50ihy','t09muW','C3bSAxq','CLPotNy','oI8VDNm','reLtqui','CZOVlYO','y3jLDa','BgvUz3q','zw50u2u','lYOUyw4','Cg9YDa','muXYquLLrG','nhWWFdm','y2XHDwq','mtG2mZu5n1Lpu1rbtq','kIX3Aw4','sv9lrvK','zvntrq','CgvHCMe','lgH0Dha','twLZC2K','zs13zwi','tKH6r3a','zwn0lgG','ue9sva','tevex1q','vfjbq0u','Ahr0CdO','zgv2l2m','t0Xt','BgvZoIa','l1S6oJe','oefID0DxAa','Ac9JywW','lY8Q','te9hx0W','lMrLDI8','nY4WlJa','DhjPBq','xtOQlgm','DNnJB2q','AxjVBM0','re9dvu0','zMfSC2u','Dhj1zq','zMLSDgu','kI5JDxi','q0Xjq0S','ndi3mJGWs0LjDuHL','lMnSyxu','DdOZmda','BMCGCMu','zs5HAq'];a0_0x4177=function(){return _0x512599;};return a0_0x4177();}export default configuration;
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x170ef1=a0_0x4218;(function(_0x3534f1,_0x281a1e){const _0x316b0f=a0_0x4218,_0xae4744=_0x3534f1();while(!![]){try{const _0x41ce20=-parseInt(_0x316b0f(0x282))/0x1*(-parseInt(_0x316b0f(0x25a))/0x2)+parseInt(_0x316b0f(0x21e))/0x3+-parseInt(_0x316b0f(0x200))/0x4*(-parseInt(_0x316b0f(0x23f))/0x5)+-parseInt(_0x316b0f(0x21c))/0x6+parseInt(_0x316b0f(0x283))/0x7+-parseInt(_0x316b0f(0x261))/0x8+parseInt(_0x316b0f(0x24f))/0x9*(-parseInt(_0x316b0f(0x26f))/0xa);if(_0x41ce20===_0x281a1e)break;else _0xae4744['push'](_0xae4744['shift']());}catch(_0x22d993){_0xae4744['push'](_0xae4744['shift']());}}}(a0_0x487f,0x89474));import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{createMcpServer}from'./server.js';import{createServices}from'./services/shared.js';import{info,error}from'./logger.js';import a0_0x53223a,{validateConfiguration}from'./config.js';import{dirname}from'path';import{fileURLToPath}from'url';import{startSSEServer}from'./sse_server.js';function a0_0x4218(_0x6ac285,_0x487334){_0x6ac285=_0x6ac285-0x1d9;const _0x487f0d=a0_0x487f();let _0x421839=_0x487f0d[_0x6ac285];if(a0_0x4218['qrWySd']===undefined){var _0x596c62=function(_0x2f054a){const _0x38445b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x20a1b8='',_0x133546='';for(let _0x4eb6f1=0x0,_0x37b6f2,_0x4e072a,_0x4f4fd5=0x0;_0x4e072a=_0x2f054a['charAt'](_0x4f4fd5++);~_0x4e072a&&(_0x37b6f2=_0x4eb6f1%0x4?_0x37b6f2*0x40+_0x4e072a:_0x4e072a,_0x4eb6f1++%0x4)?_0x20a1b8+=String['fromCharCode'](0xff&_0x37b6f2>>(-0x2*_0x4eb6f1&0x6)):0x0){_0x4e072a=_0x38445b['indexOf'](_0x4e072a);}for(let _0x3481e2=0x0,_0xe027d6=_0x20a1b8['length'];_0x3481e2<_0xe027d6;_0x3481e2++){_0x133546+='%'+('00'+_0x20a1b8['charCodeAt'](_0x3481e2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x133546);};a0_0x4218['BHIzZh']=_0x596c62,a0_0x4218['LhoCQN']={},a0_0x4218['qrWySd']=!![];}const _0x54adfe=_0x487f0d[0x0],_0x3c28e7=_0x6ac285+_0x54adfe,_0x2efc5c=a0_0x4218['LhoCQN'][_0x3c28e7];return!_0x2efc5c?(_0x421839=a0_0x4218['BHIzZh'](_0x421839),a0_0x4218['LhoCQN'][_0x3c28e7]=_0x421839):_0x421839=_0x2efc5c,_0x421839;}import{initializeLicense}from'./license.js';const __dirname=dirname(fileURLToPath(import.meta.url));let httpServer=null,keepAliveInterval=null;process['on'](a0_0x170ef1(0x244)+a0_0x170ef1(0x26e)+'cepti'+'on',_0xc0a0fc=>{const _0x1786f8=a0_0x170ef1,_0x4bd9c7={'LChLT':function(_0x223331,_0x4886f3,_0x1092f7){return _0x223331(_0x4886f3,_0x1092f7);},'WKtcm':_0x1786f8(0x25f)+'ght\x20E'+_0x1786f8(0x201)+_0x1786f8(0x1ee)};_0x4bd9c7[_0x1786f8(0x208)](error,_0x4bd9c7[_0x1786f8(0x241)],{'message':_0xc0a0fc[_0x1786f8(0x264)+'ge'],'stack':_0xc0a0fc[_0x1786f8(0x270)]});}),process['on'](a0_0x170ef1(0x230)+a0_0x170ef1(0x1fb)+a0_0x170ef1(0x248)+a0_0x170ef1(0x1ee),(_0x2be9b7,_0x1a1ad0)=>{const _0xcb43ea=a0_0x170ef1,_0x5304c3={'uiIFk':function(_0x3005e1,_0xd200d2,_0x4f7fb4){return _0x3005e1(_0xd200d2,_0x4f7fb4);},'meYFc':_0xcb43ea(0x1f5)+'dled\x20'+'Rejec'+_0xcb43ea(0x1e6)};_0x5304c3['uiIFk'](error,_0x5304c3[_0xcb43ea(0x1f3)],{'reason':_0x2be9b7});});async function startStdioServer(){const _0x1266ce=a0_0x170ef1,_0x1d24a5={'sktvO':function(_0x202af8,_0x53b9aa,_0x101594){return _0x202af8(_0x53b9aa,_0x101594);},'dVHJX':'Serve'+'r\x20env'+_0x1266ce(0x25d)+_0x1266ce(0x256),'XbhHB':function(_0x233e9b,_0x566ace){return _0x233e9b(_0x566ace);},'mrYYs':_0x1266ce(0x1e5)+'2','zghtD':function(_0xb4b4ec,_0x51e33d,_0x14423b){return _0xb4b4ec(_0x51e33d,_0x14423b);},'Mxhnj':'Conne'+_0x1266ce(0x1f9)+_0x1266ce(0x255)+_0x1266ce(0x1da)+_0x1266ce(0x27a)+_0x1266ce(0x267)+_0x1266ce(0x217)};info(_0x1266ce(0x226)+_0x1266ce(0x224)+_0x1266ce(0x245)+'p\x20MCP'+_0x1266ce(0x20c)+_0x1266ce(0x269)+_0x1266ce(0x228)+_0x1266ce(0x265)),_0x1d24a5[_0x1266ce(0x22d)](info,_0x1d24a5['dVHJX'],{'pid':process['pid'],'node':process[_0x1266ce(0x215)+'on'],'os':process[_0x1266ce(0x1eb)+'orm'],'arch':process[_0x1266ce(0x23d)]}),_0x1d24a5[_0x1266ce(0x249)](info,_0x1266ce(0x1f7)+_0x1266ce(0x1ec)+_0x1266ce(0x240)+_0x1266ce(0x268)+_0x1266ce(0x20f)+_0x1266ce(0x277)+'er');const _0x2897fa=await _0x1d24a5['XbhHB'](createServices,a0_0x53223a),_0x14900e=a0_0x53223a['mcpSe'+'rverU'+'rl']||_0x1266ce(0x262)+_0x1266ce(0x20e)+_0x1266ce(0x1e7)+'t:'+(a0_0x53223a['port']||0xc9f),_0x58679a={'type':_0x1d24a5[_0x1266ce(0x1de)],'resource':_0x14900e,'authorization_servers':[_0x14900e],'issuer':_0x14900e,'authorization_endpoint':_0x14900e+(_0x1266ce(0x229)+_0x1266ce(0x1fe)+_0x1266ce(0x27c)+'e'),'token_endpoint':_0x14900e+('/oaut'+_0x1266ce(0x276)+'en'),'registration_endpoint':_0x14900e+(_0x1266ce(0x229)+'h/reg'+_0x1266ce(0x1f6)),'authorization_url':_0x14900e+('/oaut'+'h/aut'+_0x1266ce(0x27c)+'e'),'token_url':_0x14900e+('/oaut'+'h/tok'+'en'),'registration_url':_0x14900e+(_0x1266ce(0x229)+'h/reg'+_0x1266ce(0x1f6)),'discoveryUrl':_0x14900e+(_0x1266ce(0x252)+_0x1266ce(0x205)+_0x1266ce(0x260)+_0x1266ce(0x206)+_0x1266ce(0x238)+_0x1266ce(0x234)+_0x1266ce(0x1e9)+_0x1266ce(0x212))},{server:_0x5c7f6e}=_0x1d24a5[_0x1266ce(0x281)](createMcpServer,_0x2897fa,_0x58679a);info(_0x1d24a5['Mxhnj']);const _0xdd7862=new StdioServerTransport();await _0x5c7f6e[_0x1266ce(0x23a)+'ct'](_0xdd7862),_0x1d24a5[_0x1266ce(0x249)](info,'Serve'+_0x1266ce(0x221)+_0x1266ce(0x233)+_0x1266ce(0x24b)+_0x1266ce(0x254)+'\x20read'+'y\x20to\x20'+'handl'+'e\x20req'+_0x1266ce(0x209));}async function main(){const _0x4e6a68=a0_0x170ef1,_0x14e7e7={'JGdRV':'Backg'+_0x4e6a68(0x258)+'\x20lice'+_0x4e6a68(0x1dd)+_0x4e6a68(0x246)+'lizat'+_0x4e6a68(0x259)+'ailed','fFroo':_0x4e6a68(0x1e0)+_0x4e6a68(0x277)+_0x4e6a68(0x257)+_0x4e6a68(0x253)+'ized\x20'+_0x4e6a68(0x286)+_0x4e6a68(0x236)+_0x4e6a68(0x1d9),'SxHAI':function(_0x5a0ba3,_0x289afd){return _0x5a0ba3(_0x289afd);},'EzqxA':_0x4e6a68(0x26d)+_0x4e6a68(0x23e)+_0x4e6a68(0x203)+'tion\x20'+_0x4e6a68(0x26c)+'nce\x20c'+_0x4e6a68(0x222)+'te','LONTx':function(_0x2c642f,_0x2b7b75){return _0x2c642f(_0x2b7b75);},'TOLuH':'Start'+'ing\x20C'+_0x4e6a68(0x245)+_0x4e6a68(0x278)+_0x4e6a68(0x20c)+'er\x20ma'+_0x4e6a68(0x1f4),'Gcuoy':_0x4e6a68(0x1f7)+_0x4e6a68(0x1ec)+_0x4e6a68(0x227)+'E\x20ser'+_0x4e6a68(0x279),'byLep':_0x4e6a68(0x27b)+'\x20duri'+_0x4e6a68(0x240)+_0x4e6a68(0x1f0)+_0x4e6a68(0x223)+_0x4e6a68(0x202)+_0x4e6a68(0x1e4)+'()'};try{const _0x5c2893=(_0x4e6a68(0x280)+_0x4e6a68(0x26a)+'1')[_0x4e6a68(0x23c)]('|');let _0x130073=0x0;while(!![]){switch(_0x5c2893[_0x130073++]){case'0':if(a0_0x53223a[_0x4e6a68(0x251)+_0x4e6a68(0x20a)+'o'])info(_0x4e6a68(0x1f7)+'alizi'+'ng\x20St'+_0x4e6a68(0x21a)+'erver'),await startStdioServer(),info(_0x14e7e7[_0x4e6a68(0x247)]);else a0_0x53223a[_0x4e6a68(0x251)+_0x4e6a68(0x23b)]?(info(_0x4e6a68(0x207)+_0x4e6a68(0x218)+_0x4e6a68(0x1f2)+'in\x20SS'+_0x4e6a68(0x26b)+_0x4e6a68(0x22b)+'e'),keepAliveInterval=setInterval(()=>{},0xea60)):(_0x14e7e7[_0x4e6a68(0x216)](error,'No\x20tr'+_0x4e6a68(0x1fa)+_0x4e6a68(0x21f)+_0x4e6a68(0x1ea)+_0x4e6a68(0x231)+_0x4e6a68(0x27f)+_0x4e6a68(0x242)+_0x4e6a68(0x232)+_0x4e6a68(0x204)+_0x4e6a68(0x211)+_0x4e6a68(0x1fc)),process[_0x4e6a68(0x1f1)](0x1));continue;case'1':info(_0x14e7e7['EzqxA']);continue;case'2':_0x14e7e7[_0x4e6a68(0x214)](info,_0x14e7e7[_0x4e6a68(0x271)]);continue;case'3':validateConfiguration();continue;case'4':a0_0x53223a[_0x4e6a68(0x251)+_0x4e6a68(0x23b)]&&(info(_0x14e7e7[_0x4e6a68(0x275)]),httpServer=await startSSEServer());continue;case'5':initializeLicense()[_0x4e6a68(0x219)](_0x3eb319=>{const _0x4f018d=_0x4e6a68;error(_0x14e7e7[_0x4f018d(0x22c)],{'message':_0x3eb319[_0x4f018d(0x264)+'ge']});});continue;}break;}}catch(_0x5b7915){error(_0x14e7e7[_0x4e6a68(0x272)],{'message':_0x5b7915[_0x4e6a68(0x264)+'ge'],'stack':_0x5b7915[_0x4e6a68(0x270)]}),console[_0x4e6a68(0x250)](_0x4e6a68(0x24e)+_0x4e6a68(0x210)+_0x4e6a68(0x27e)+_0x4e6a68(0x1fd)+'\x20'+_0x5b7915['messa'+'ge']);if(_0x5b7915['stack'])console[_0x4e6a68(0x250)](_0x5b7915[_0x4e6a68(0x270)]);process['exit'](0x1);}}function a0_0x487f(){const _0x1572fa=['DwvZDhm','zvn0zgK','y2XLyxi','ifnLCNy','ievsuK8','lY9SB2m','CYbHBMq','ifnuqvi','zgLZywi','CNzLCG','re9NrKm','te9ovhG','DMvYC2K','u3HiquK','B3j0','CIbYDw4','y2f0y2G','zgLVihm','suXtveG','mJq1odqXnKjvq3btqG','ywnLzNu','mtGZnZKZnxv2quvQsa','CNqGzw4','Aw4Uy2e','CIbZDge','B21WBgu','C3rHCNq','Aw5Niem','sfruuca','u3rHCNq','BMCGu1m','zw1PDw0','l29HDxq','veD3tK8','EsbTB2q','sKDKuLy','C2T0DK8','yw5KBgu','vfaGC2u','Dw5Oyw4','icHIB3q','zcbtu0u','CNr1Cca','AxPHDgK','DgfYDgK','B25Uzwm','ihnPz24','DxrOB3i','ywXPDMu','y29UBMu','zvntrq','C3bSAxq','yxjJAa','Aw5PDgK','mZy0mZiXmgrQBfjTva','BMCGC2u','v0T0y20','su8Gyw4','DMvKia','Dw5Jyxu','BgLJA1u','BML0Awe','zKzYB28','zwPLy3q','wgjOsei','CNzHBca','y29TCgW','DMvYigu','ifvosee','rKfuquW','otaZmtG2EK9PAwLT','zxjYB3i','zw5HyMW','lY53zwW','AxrPywW','zxrLic0','ihrVie0','zw50','zxiGAw4','CM91BMq','Aw9Uigy','nJyYugr6yLLg','s2vLCc0','whvJuK8','AxjVBM0','Aw4GBwe','vw5Jyxu','D24VB2e','oda2ntyWmhjMrLjjvq','Ahr0CdO','u2H1Dgq','BwvZC2e','lI4U','whHiCuG','CMfUC3a','CNzPy2u','zxiGuhi','Fdr8mhW','rs1VBMW','C2vXDwu','twfPBIa','z2H0rxG','nZbHEM9lrKK','C3rHy2S','ve9mDuG','yNLmzxa','C2vK','u0Lhsu4','r2n1B3K','Ac90B2S','ihnLCNy','Ccbnq1a','DMvY','zgLVihq','rxjYB3i','Ag9YAxO','v2P4q0m','vfvqieu','Acbtveq','mNWZFdu','EMDODeq','mty0mujVBNn0Ea','ntu4nZCZnMHtwvfiCq','y2XVC2u','DgnO','yw5Kigm','DgvK','q1aGC3q','AKn3CNu','CIbJBg8','BNnLigK','Bxjzwxm','BcbZAhu','u3rKAw8','zcbZzxi','BMCGsfq','tKrmruq','ig1HAw4','B2f1DgG','DgLVBG','ywXOB3m','BKfyC28','B24TC2u','ywjSzwq','CgXHDgy','ywXPEMK','B3DUigm','Aw9U','q2XVC2K','CNzLCIa','zxHPDa','BMLUzYa','BwvzrMm','Aw4Okq','vw5Oyw4','Axn0zxi','sw5PDgK','u0Lhveu','y3rPBMC','yw5ZCg8','zgXLzfi','BgvKkq','uLjpuJO','Ac9HDxq','igLUDgu','nffXD0jTyG','EgnLChq','DxaGAw4','ywXPEMe','igfYzsa','Bc1RBM8','DxrOlwe','u2vYDMu','tenOtfq'];a0_0x487f=function(){return _0x1572fa;};return a0_0x487f();}main()[a0_0x170ef1(0x219)](_0x23a077=>{const _0xc54b1c=a0_0x170ef1,_0x563056={'TGwNO':function(_0x207a3f,_0x5af96f,_0x56fcd9){return _0x207a3f(_0x5af96f,_0x56fcd9);},'ILSTH':'Fatal'+':\x20Unh'+_0xc54b1c(0x22e)+_0xc54b1c(0x1e1)+_0xc54b1c(0x24c)+'rror\x20'+_0xc54b1c(0x25e)+_0xc54b1c(0x220)+_0xc54b1c(0x285)};_0x563056[_0xc54b1c(0x22a)](error,_0x563056[_0xc54b1c(0x21b)],{'message':_0x23a077[_0xc54b1c(0x264)+'ge'],'stack':_0x23a077[_0xc54b1c(0x270)]}),console[_0xc54b1c(0x250)](_0xc54b1c(0x24e)+_0xc54b1c(0x24d)+_0xc54b1c(0x1e3)+_0xc54b1c(0x20d)+'R:\x20'+_0x23a077['messa'+'ge']);if(_0x23a077[_0xc54b1c(0x270)])console[_0xc54b1c(0x250)](_0x23a077[_0xc54b1c(0x270)]);process[_0xc54b1c(0x1f1)](0x1);});async function shutdown(_0x3e8294){const _0x9341e7=a0_0x170ef1,_0x5565ec={'XxHqH':function(_0x4b7fb1){return _0x4b7fb1();},'WjxCC':function(_0x541d5d,_0x5f5382){return _0x541d5d(_0x5f5382);},'XucRO':_0x9341e7(0x25b)+_0x9341e7(0x239)+_0x9341e7(0x1ff)+_0x9341e7(0x24a)+_0x9341e7(0x20b)+'ed','jCwru':function(_0x493f3a,_0x37bf73){return _0x493f3a(_0x37bf73);},'yVkql':function(_0x3f0fcf,_0x4cde5e){return _0x3f0fcf(_0x4cde5e);},'pPBKW':_0x9341e7(0x263)+_0x9341e7(0x1ed)+_0x9341e7(0x222)+'te'};info('Recei'+_0x9341e7(0x243)+_0x3e8294+(_0x9341e7(0x237)+'al,\x20s'+_0x9341e7(0x235)+'ng\x20gr'+_0x9341e7(0x21d)+_0x9341e7(0x1df)+'tdown'+_0x9341e7(0x265))),keepAliveInterval&&(_0x5565ec['WjxCC'](clearInterval,keepAliveInterval),keepAliveInterval=null,_0x5565ec[_0x9341e7(0x27d)](info,_0x5565ec[_0x9341e7(0x25c)])),httpServer&&(_0x5565ec[_0x9341e7(0x1db)](info,_0x9341e7(0x1ef)+_0x9341e7(0x1e2)+_0x9341e7(0x22f)+'rver.'+'..'),await new Promise(_0x4b6c27=>{const _0x3900c8=_0x9341e7,_0xdf18e7={'DOgFC':_0x3900c8(0x225)+'serve'+_0x3900c8(0x1dc)+_0x3900c8(0x273),'nAXso':function(_0xccaf7c){const _0xeedc24=_0x3900c8;return _0x5565ec[_0xeedc24(0x266)](_0xccaf7c);}};httpServer[_0x3900c8(0x284)](()=>{const _0x287a62=_0x3900c8;info(_0xdf18e7[_0x287a62(0x213)]),_0xdf18e7[_0x287a62(0x1e8)](_0x4b6c27);});})),_0x5565ec['yVkql'](info,_0x5565ec['pPBKW']),process[_0x9341e7(0x1f1)](0x0);}process['on'](a0_0x170ef1(0x274)+'T',()=>shutdown(a0_0x170ef1(0x274)+'T')),process['on']('SIGTE'+'RM',()=>shutdown(a0_0x170ef1(0x1f8)+'RM'));
2
+ const a0_0x480f07=a0_0x39df;(function(_0x523c7f,_0x4b09d9){const _0x485a51=a0_0x39df,_0x4e85a9=_0x523c7f();while(!![]){try{const _0x4dcf8b=-parseInt(_0x485a51(0x20b))/0x1*(-parseInt(_0x485a51(0x1f9))/0x2)+-parseInt(_0x485a51(0x220))/0x3*(-parseInt(_0x485a51(0x21a))/0x4)+-parseInt(_0x485a51(0x200))/0x5+parseInt(_0x485a51(0x1db))/0x6*(parseInt(_0x485a51(0x22e))/0x7)+parseInt(_0x485a51(0x21e))/0x8+parseInt(_0x485a51(0x1de))/0x9*(-parseInt(_0x485a51(0x1ec))/0xa)+-parseInt(_0x485a51(0x233))/0xb;if(_0x4dcf8b===_0x4b09d9)break;else _0x4e85a9['push'](_0x4e85a9['shift']());}catch(_0xd953cd){_0x4e85a9['push'](_0x4e85a9['shift']());}}}(a0_0x22a9,0xd0d29));import{StdioServerTransport}from'@modelcontextprotocol/sdk/server/stdio.js';import{createMcpServer}from'./server.js';import{createServices}from'./services/shared.js';function a0_0x22a9(){const _0x4278f6=['qNHHDhG','DxaGAw4','Aw9Uigy','q29UBMu','ihnLCNy','igfYzsa','CIbZDge','z2H0ieu','u3rKAw8','qu5qCgG','DxrOlwe','y2XVC2u','rsbZzxi','BMCGu1m','Ae15B2K','ifnLCNy','DwvZDhm','CNqGzw4','D24VB2e','DgLVBIa','Ag9YAxO','rKfuquW','EgnLChq','CNzLCLu','C3bSAxq','AxPHDgK','igLUDgu','CM91BMq','Ac9HDxq','y29TCgW','y2f0y2G','oIbvBMG','z2H0rxG','zxHPDa','C2vK','Axn0zxi','u0Lhveu','nMH3AfLyEa','vfaGC2u','zvn0zgK','mJDkAKLoAuW','Ce1Oz3O','B3DUigm','zxiGBwe','CIbJBg8','Ccbnq1a','AgfUzgW','thDbEKm','CxvKDvm','C0rWD1G','CKjuvxi','teLOAwW','Avj4Awq','DgnO','mZe3mZKZmeXfs2zpzG','Ac9YzwC','B1fnAvK','zw50','zgLVihm','yLvTC0S','zsbYzxe','zxiGAw4','v0riyuW','zw1PDw0','DgvK','Bc1RBM8','Aw5Niem','ndzwwezrtwm','zgLZywi','v01IBKi','Aw9U','zxiGuhi','B3j0','Fdj8nhW','mtq3nJq1qK1dz3bx','icHIB3q','CgXHDgy','C2vYDMu','yxjJAa','EM5KsfK','rxjYB3i','sfruuca','Acbtveq','nxWXFda','ywXPEMK','mJGWmwvlCvvtua','Aw4Gu1m','C3rHCNq','DMvY','twfPBIa','B21WBgu','q2XVC2K','s2vLCc0','rwruCfq','sNz1u2q','Ac90B2S','tKrmruq','zxj2zxi','Aw5PDgK','zxrLic0','nfvJDg5yCG','su8Gyw4','CNzLCI4','zxjYB3i','mtiZnJqWmJrXvvzHqMu','yw5ZCg8','nde1odeXn21hCMLIta','DMvYigu','BMCGz3i','qMfJA2C','BMCGu3q','DgfYDgK','BMLUzYa','igXPy2u','vfvqieu','ihjLywq','u3rHCNq','BMnLigm','y29UBMu','CNzLCIa','mZG4mta2nKHQv01KsG','AxrPywW','CIbYDw4','yw5Kigm','BcbZAhu','mtG4ndy5mZHAEMPMyKS','BgLJA1u','CYbHBMq','l29HDxq','yw5KBgu','zw5HyMW','Cg9YDa','BgL6yxq','zePozhu','CNr1Cca','B0T2vge','ywXOB3m','AxjVBM0','DgLVBG','Dw5Jyxu','ievsuK8','u0Lhsu4','BfzLsge','u2vYDMu','zcbtu0u','uLjpuJO','DMvYC2K','lI4U','CNjVCIa','DNfYqwq','Ahr0CdO','zwPLy3q','Aw4Okq','BML0Awe','ywXPDMu','lY9SB2m','C2vXDwu','B25Uzwm','CNzPy2u','ywWSihm','ChPwD3O','B24TC2u','y2XLyxi','EsbTB2q','zensEuC','Dw5Oyw4','wLLfALy','igr1CMK','y3rPBMC','BwnWu2u','BwvZC2e','CNzLCG','CIbLBNy','DMvKia','u2H1Dgq','zvntrq','y2vWDgK','rMf0ywW','sw5PDgK','BMCGC2u','r09HDKu','C3rHy2S'];a0_0x22a9=function(){return _0x4278f6;};return a0_0x22a9();}import{info,error}from'./logger.js';import a0_0x5bcd3c,{validateConfiguration}from'./config.js';import{dirname}from'path';import{fileURLToPath}from'url';function a0_0x39df(_0x7ece7a,_0x5cf925){_0x7ece7a=_0x7ece7a-0x184;const _0x22a9bb=a0_0x22a9();let _0x39dfaf=_0x22a9bb[_0x7ece7a];if(a0_0x39df['tQxFlu']===undefined){var _0x2cd8f6=function(_0x2dc0d8){const _0x847041='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x42f3cc='',_0x47bdb2='';for(let _0x33319c=0x0,_0x37a81f,_0x36a03a,_0x2f4e0d=0x0;_0x36a03a=_0x2dc0d8['charAt'](_0x2f4e0d++);~_0x36a03a&&(_0x37a81f=_0x33319c%0x4?_0x37a81f*0x40+_0x36a03a:_0x36a03a,_0x33319c++%0x4)?_0x42f3cc+=String['fromCharCode'](0xff&_0x37a81f>>(-0x2*_0x33319c&0x6)):0x0){_0x36a03a=_0x847041['indexOf'](_0x36a03a);}for(let _0x4180a7=0x0,_0x10659c=_0x42f3cc['length'];_0x4180a7<_0x10659c;_0x4180a7++){_0x47bdb2+='%'+('00'+_0x42f3cc['charCodeAt'](_0x4180a7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x47bdb2);};a0_0x39df['cPBQyZ']=_0x2cd8f6,a0_0x39df['BVpOcI']={},a0_0x39df['tQxFlu']=!![];}const _0x27a83e=_0x22a9bb[0x0],_0x31b7a1=_0x7ece7a+_0x27a83e,_0x265ae1=a0_0x39df['BVpOcI'][_0x31b7a1];return!_0x265ae1?(_0x39dfaf=a0_0x39df['cPBQyZ'](_0x39dfaf),a0_0x39df['BVpOcI'][_0x31b7a1]=_0x39dfaf):_0x39dfaf=_0x265ae1,_0x39dfaf;}import{startSSEServer}from'./sse_server.js';import{initializeLicense}from'./license.js';const __dirname=dirname(fileURLToPath(import.meta.url));let httpServer=null,keepAliveInterval=null;process['on'](a0_0x480f07(0x18b)+a0_0x480f07(0x1d6)+a0_0x480f07(0x1b0)+'on',_0xb32271=>{const _0x4c1276=a0_0x480f07,_0x3d66c3={'LwAzC':function(_0x1c8d18,_0x1eb0a1,_0x5521cf){return _0x1c8d18(_0x1eb0a1,_0x5521cf);}};_0x3d66c3[_0x4c1276(0x1e5)](error,'Uncau'+_0x4c1276(0x1bd)+_0x4c1276(0x1cc)+_0x4c1276(0x1fc),{'message':_0xb32271[_0x4c1276(0x1aa)+'ge'],'stack':_0xb32271[_0x4c1276(0x1b5)]});}),process['on'](a0_0x480f07(0x1a5)+'dledR'+a0_0x480f07(0x197)+a0_0x480f07(0x1fc),(_0x52a152,_0x565003)=>{const _0xd78698=a0_0x480f07,_0x3cd0ad={'oKvTa':function(_0x5b7f50,_0x5d80f8,_0x2ee7f4){return _0x5b7f50(_0x5d80f8,_0x2ee7f4);},'tDqTz':'Unhan'+'dled\x20'+'Rejec'+_0xd78698(0x18a)};_0x3cd0ad[_0xd78698(0x187)](error,_0x3cd0ad['tDqTz'],{'reason':_0x52a152});});async function startStdioServer(){const _0x39c861=a0_0x480f07,_0x2a2075={'zndHY':function(_0x5cae32,_0x53d904){return _0x5cae32(_0x53d904);},'WDHaL':_0x39c861(0x22a)+_0x39c861(0x1f8)+_0x39c861(0x234)+_0x39c861(0x1e3)+'\x20Serv'+_0x39c861(0x1fd)+_0x39c861(0x1f5)+_0x39c861(0x193),'oQMiY':function(_0x2e97ab,_0x27caf4,_0x292bf9){return _0x2e97ab(_0x27caf4,_0x292bf9);},'pzVwz':_0x39c861(0x18f)+_0x39c861(0x1ac)+_0x39c861(0x189)+_0x39c861(0x1ef),'JvuSd':'oauth'+'2','WMbnB':_0x39c861(0x18f)+_0x39c861(0x1bc)+_0x39c861(0x186)+_0x39c861(0x1d3)+_0x39c861(0x219)+_0x39c861(0x229)+'y\x20to\x20'+_0x39c861(0x1e4)+_0x39c861(0x1f2)+_0x39c861(0x1c6)};_0x2a2075['zndHY'](info,_0x2a2075[_0x39c861(0x1f4)]),_0x2a2075[_0x39c861(0x1ee)](info,_0x2a2075[_0x39c861(0x1a0)],{'pid':process['pid'],'node':process[_0x39c861(0x192)+'on'],'os':process[_0x39c861(0x202)+'orm'],'arch':process[_0x39c861(0x204)]}),_0x2a2075[_0x39c861(0x205)](info,_0x39c861(0x1b2)+_0x39c861(0x20a)+_0x39c861(0x1b3)+_0x39c861(0x19e)+_0x39c861(0x235)+_0x39c861(0x1ba)+'er');const _0x5611d9=await createServices(a0_0x5bcd3c),_0x494895=a0_0x5bcd3c[_0x39c861(0x1a9)+_0x39c861(0x1cd)+'rl']||_0x39c861(0x196)+_0x39c861(0x19b)+_0x39c861(0x188)+'t:'+(a0_0x5bcd3c[_0x39c861(0x239)]||0xc9f),_0x289982={'type':_0x2a2075[_0x39c861(0x214)],'resource':_0x494895,'authorization_servers':[_0x494895],'issuer':_0x494895,'authorization_endpoint':_0x494895+(_0x39c861(0x236)+_0x39c861(0x1d2)+_0x39c861(0x1ca)+'e'),'token_endpoint':_0x494895+(_0x39c861(0x236)+_0x39c861(0x215)+'en'),'registration_endpoint':_0x494895+('/oaut'+_0x39c861(0x1ed)+_0x39c861(0x1d9)),'authorization_url':_0x494895+(_0x39c861(0x236)+_0x39c861(0x1d2)+'horiz'+'e'),'token_url':_0x494895+('/oaut'+_0x39c861(0x215)+'en'),'registration_url':_0x494895+('/oaut'+_0x39c861(0x1ed)+_0x39c861(0x1d9)),'discoveryUrl':_0x494895+('/.wel'+_0x39c861(0x1f7)+_0x39c861(0x1c8)+_0x39c861(0x1c0)+'uthor'+_0x39c861(0x1cf)+_0x39c861(0x1a1)+_0x39c861(0x1ab))},{server:_0x3ec72b}=_0x2a2075[_0x39c861(0x1ee)](createMcpServer,_0x5611d9,_0x289982);_0x2a2075[_0x39c861(0x205)](info,_0x39c861(0x1b9)+_0x39c861(0x1a8)+'\x20to\x20M'+'CP\x20st'+'dio\x20t'+'ransp'+_0x39c861(0x1fe));const _0x14f36c=new StdioServerTransport();await _0x3ec72b[_0x39c861(0x22c)+'ct'](_0x14f36c),info(_0x2a2075[_0x39c861(0x1fb)]);}async function main(){const _0x3052fd=a0_0x480f07,_0x3e98ba={'pMhgz':_0x3052fd(0x223)+_0x3052fd(0x1d1)+_0x3052fd(0x227)+'nse\x20i'+_0x3052fd(0x199)+_0x3052fd(0x184)+_0x3052fd(0x1b8)+'ailed','ENcpo':_0x3052fd(0x209)+_0x3052fd(0x1ff)+'3','rBTUr':_0x3052fd(0x1b2)+'alizi'+_0x3052fd(0x1c3)+_0x3052fd(0x1c2)+_0x3052fd(0x20e),'quduS':function(_0x4aacbb){return _0x4aacbb();},'dJNdu':_0x3052fd(0x1b2)+_0x3052fd(0x20a)+_0x3052fd(0x224)+_0x3052fd(0x1f0)+_0x3052fd(0x217),'EdTpT':_0x3052fd(0x1be)+_0x3052fd(0x1ba)+_0x3052fd(0x1f3)+_0x3052fd(0x22f)+'ized\x20'+_0x3052fd(0x231)+_0x3052fd(0x19d)+_0x3052fd(0x1f6),'vqrAd':function(_0x5de343,_0xe9ad50){return _0x5de343(_0xe9ad50);},'sDpwX':function(_0x10b12a,_0x53ccdc,_0x19bdc8){return _0x10b12a(_0x53ccdc,_0x19bdc8);},'Zelun':'No\x20tr'+_0x3052fd(0x21f)+_0x3052fd(0x1c7)+'abled'+_0x3052fd(0x201)+_0x3052fd(0x208)+_0x3052fd(0x21b)+_0x3052fd(0x190)+_0x3052fd(0x1bb)+_0x3052fd(0x1fa)+'led)','lVeHa':_0x3052fd(0x22a)+_0x3052fd(0x1f8)+_0x3052fd(0x234)+_0x3052fd(0x1e3)+_0x3052fd(0x1c5)+_0x3052fd(0x1e1)+_0x3052fd(0x198)};try{const _0x522e73=_0x3e98ba['ENcpo'][_0x3052fd(0x1ce)]('|');let _0x2b152f=0x0;while(!![]){switch(_0x522e73[_0x2b152f++]){case'0':initializeLicense()['catch'](_0x4eb7e3=>{const _0x335d68=_0x3052fd;error(_0x3e98ba[_0x335d68(0x1df)],{'message':_0x4eb7e3[_0x335d68(0x1aa)+'ge']});});continue;case'1':validateConfiguration();continue;case'2':a0_0x5bcd3c[_0x3052fd(0x238)+_0x3052fd(0x1af)]&&(info(_0x3e98ba[_0x3052fd(0x1e8)]),httpServer=await _0x3e98ba[_0x3052fd(0x1e6)](startSSEServer));continue;case'3':info(_0x3052fd(0x20f)+_0x3052fd(0x218)+'aliza'+_0x3052fd(0x1c9)+_0x3052fd(0x19c)+_0x3052fd(0x22b)+_0x3052fd(0x210)+'te');continue;case'4':if(a0_0x5bcd3c['enabl'+_0x3052fd(0x1dd)+'o'])info(_0x3e98ba[_0x3052fd(0x185)]),await _0x3e98ba[_0x3052fd(0x1e6)](startStdioServer),info(_0x3e98ba[_0x3052fd(0x213)]);else a0_0x5bcd3c['enabl'+'eSSE']?(_0x3e98ba['vqrAd'](info,_0x3052fd(0x18f)+_0x3052fd(0x230)+_0x3052fd(0x226)+_0x3052fd(0x20c)+'E-onl'+_0x3052fd(0x1a3)+'e'),keepAliveInterval=_0x3e98ba[_0x3052fd(0x1e7)](setInterval,()=>{},0xea60)):(error(_0x3e98ba['Zelun']),process[_0x3052fd(0x1d7)](0x1));continue;case'5':_0x3e98ba[_0x3052fd(0x195)](info,_0x3e98ba[_0x3052fd(0x18e)]);continue;}break;}}catch(_0x11ef31){error(_0x3052fd(0x206)+_0x3052fd(0x1a7)+_0x3052fd(0x1b3)+_0x3052fd(0x22d)+_0x3052fd(0x20d)+_0x3052fd(0x1b7)+'\x20main'+'()',{'message':_0x11ef31[_0x3052fd(0x1aa)+'ge'],'stack':_0x11ef31['stack']}),console['error'](_0x3052fd(0x1cb)+'\x20STAR'+_0x3052fd(0x228)+_0x3052fd(0x191)+'\x20'+_0x11ef31[_0x3052fd(0x1aa)+'ge']);if(_0x11ef31['stack'])console[_0x3052fd(0x21d)](_0x11ef31['stack']);process[_0x3052fd(0x1d7)](0x1);}}main()[a0_0x480f07(0x1d4)](_0x1d13fd=>{const _0x45b3c4=a0_0x480f07,_0x335e31={'bgelg':function(_0x2f6123,_0x1fb7fd,_0x2106b8){return _0x2f6123(_0x1fb7fd,_0x2106b8);},'GOavE':_0x45b3c4(0x1b1)+_0x45b3c4(0x1d5)+_0x45b3c4(0x237)+'d\x20ser'+_0x45b3c4(0x221)+_0x45b3c4(0x194)+'in\x20ma'+'in.ca'+_0x45b3c4(0x1eb)};_0x335e31['bgelg'](error,_0x335e31[_0x45b3c4(0x1b4)],{'message':_0x1d13fd['messa'+'ge'],'stack':_0x1d13fd[_0x45b3c4(0x1b5)]}),console[_0x45b3c4(0x21d)](_0x45b3c4(0x1cb)+'\x20UNHA'+_0x45b3c4(0x216)+_0x45b3c4(0x18c)+'R:\x20'+_0x1d13fd[_0x45b3c4(0x1aa)+'ge']);if(_0x1d13fd[_0x45b3c4(0x1b5)])console[_0x45b3c4(0x21d)](_0x1d13fd['stack']);process[_0x45b3c4(0x1d7)](0x1);});async function shutdown(_0x3073d5){const _0xee40af=a0_0x480f07,_0xa03af5={'ANPph':function(_0x2b2e5d){return _0x2b2e5d();},'dCRyG':function(_0x294612,_0xd1ed69){return _0x294612(_0xd1ed69);},'ZYEjV':function(_0x4f7157,_0x5cbed8){return _0x4f7157(_0x5cbed8);},'LIhil':function(_0x68c00b,_0x2d4097){return _0x68c00b(_0x2d4097);},'Bxatx':_0xee40af(0x211)+'ng\x20HT'+_0xee40af(0x1dc)+_0xee40af(0x21c)+'..','bUmsK':function(_0x2ee723,_0x4a6381){return _0x2ee723(_0x4a6381);}};info('Recei'+_0xee40af(0x1ad)+_0x3073d5+('\x20sign'+_0xee40af(0x19f)+_0xee40af(0x225)+_0xee40af(0x222)+'acefu'+_0xee40af(0x232)+'tdown'+_0xee40af(0x193))),keepAliveInterval&&(_0xa03af5[_0xee40af(0x1a4)](clearInterval,keepAliveInterval),keepAliveInterval=null,_0xa03af5[_0xee40af(0x1a6)](info,_0xee40af(0x212)+_0xee40af(0x19a)+_0xee40af(0x1d0)+'rval\x20'+_0xee40af(0x1a2)+'ed')),httpServer&&(_0xa03af5[_0xee40af(0x1e9)](info,_0xa03af5[_0xee40af(0x1b6)]),await new Promise(_0x133d30=>{const _0x183345=_0xee40af,_0x1b4c8a={'hMyoi':_0x183345(0x207)+_0x183345(0x203)+_0x183345(0x1e2)+_0x183345(0x1d8),'iRxid':function(_0x3a7a14){const _0x57c069=_0x183345;return _0xa03af5[_0x57c069(0x1bf)](_0x3a7a14);}};httpServer[_0x183345(0x1c1)](()=>{const _0x2c6213=_0x183345;info(_0x1b4c8a[_0x2c6213(0x1c4)]),_0x1b4c8a[_0x2c6213(0x1ea)](_0x133d30);});})),_0xa03af5[_0xee40af(0x1f1)](info,_0xee40af(0x1ae)+_0xee40af(0x1e0)+_0xee40af(0x210)+'te'),process[_0xee40af(0x1d7)](0x0);}process['on'](a0_0x480f07(0x18d)+'T',()=>shutdown(a0_0x480f07(0x18d)+'T')),process['on'](a0_0x480f07(0x1da)+'RM',()=>shutdown('SIGTE'+'RM'));
package/build/license.js CHANGED
@@ -1 +1 @@
1
- const a0_0x223513=a0_0x4f82;(function(_0x3ddf7c,_0x50385c){const _0x56e5da=a0_0x4f82,_0x26fea2=_0x3ddf7c();while(!![]){try{const _0x26f34e=parseInt(_0x56e5da(0x208))/0x1*(parseInt(_0x56e5da(0x265))/0x2)+-parseInt(_0x56e5da(0x1db))/0x3*(parseInt(_0x56e5da(0x21d))/0x4)+-parseInt(_0x56e5da(0x1cb))/0x5+parseInt(_0x56e5da(0x1c6))/0x6+parseInt(_0x56e5da(0x168))/0x7*(parseInt(_0x56e5da(0x264))/0x8)+-parseInt(_0x56e5da(0x21a))/0x9*(-parseInt(_0x56e5da(0x1c4))/0xa)+-parseInt(_0x56e5da(0x216))/0xb*(parseInt(_0x56e5da(0x1ac))/0xc);if(_0x26f34e===_0x50385c)break;else _0x26fea2['push'](_0x26fea2['shift']());}catch(_0xdbbe81){_0x26fea2['push'](_0x26fea2['shift']());}}}(a0_0x2101,0x20589));import a0_0x5b0f72 from'axios';import{Logger}from'./logger.js';import{createHash}from'crypto';import{TTLCache}from'./utils/cache.js';const logger=new Logger(a0_0x223513(0x2a1)+'se'),licenseCache=new TTLCache(0x3c*0x3c*0x3e8,0x5*0x3c*0x3e8),ORG_PART_1='cd9f6'+a0_0x223513(0x1f1),ORG_PART_2=a0_0x223513(0x1da),ORG_PART_3=a0_0x223513(0x26a),ORG_PART_4=a0_0x223513(0x1f3),ORG_PART_5='c92dd'+a0_0x223513(0x1c9)+'cd',POLAR_ORGANIZATION_ID=ORG_PART_1+'-'+ORG_PART_2+'-'+ORG_PART_3+'-'+ORG_PART_4+'-'+ORG_PART_5,EXPECTED_CHECKSUM='fb75c'+'43b43'+a0_0x223513(0x14a)+a0_0x223513(0x18b)+'def0b'+'8a0eb'+a0_0x223513(0x256)+a0_0x223513(0x17a)+a0_0x223513(0x197)+a0_0x223513(0x19b)+a0_0x223513(0x19e)+a0_0x223513(0x1ab)+a0_0x223513(0x185);function validateIntegrity(){const _0x40847c=a0_0x223513,_0x3494bc={'qJJxS':function(_0x35ba90,_0x30e734){return _0x35ba90(_0x30e734);},'AlCGw':'hex','CaxqD':function(_0x2bda8e,_0x4c7073){return _0x2bda8e===_0x4c7073;}},_0x311607=_0x3494bc[_0x40847c(0x14c)](createHash,_0x40847c(0x1f8)+'6')[_0x40847c(0x242)+'e'](POLAR_ORGANIZATION_ID)['diges'+'t'](_0x3494bc[_0x40847c(0x148)]);return _0x3494bc[_0x40847c(0x1ec)](_0x311607,EXPECTED_CHECKSUM);}const SANDBOX_PART_1=a0_0x223513(0x284)+a0_0x223513(0x28a),SANDBOX_PART_2=a0_0x223513(0x162),SANDBOX_PART_3=a0_0x223513(0x231),SANDBOX_PART_4=a0_0x223513(0x202),SANDBOX_PART_5=a0_0x223513(0x14b)+a0_0x223513(0x176)+'d3',SANDBOX_ORG_ID=SANDBOX_PART_1+'-'+SANDBOX_PART_2+'-'+SANDBOX_PART_3+'-'+SANDBOX_PART_4+'-'+SANDBOX_PART_5,SANDBOX_SECRET_HASH=a0_0x223513(0x1ea)+a0_0x223513(0x213)+a0_0x223513(0x164)+a0_0x223513(0x1d9)+'f02f6'+'37a5d'+a0_0x223513(0x291)+a0_0x223513(0x14d)+a0_0x223513(0x277)+a0_0x223513(0x25b)+'3b105'+a0_0x223513(0x165)+a0_0x223513(0x143);function isSandboxSecretValid(_0x17fc11){const _0x1888f2=a0_0x223513,_0x14387f={'kMxjU':function(_0xd98b15,_0x48afaa){return _0xd98b15(_0x48afaa);},'IIoMm':function(_0x2fc7ce,_0x59ef67){return _0x2fc7ce===_0x59ef67;}};if(!_0x17fc11)return![];try{const _0x1f8afb=_0x14387f[_0x1888f2(0x14e)](createHash,_0x1888f2(0x1f8)+'6')['updat'+'e'](_0x17fc11)['diges'+'t'](_0x1888f2(0x297));return _0x14387f[_0x1888f2(0x27e)](_0x1f8afb,SANDBOX_SECRET_HASH);}catch{return![];}}logger[a0_0x223513(0x22f)]('Remot'+'e-onl'+a0_0x223513(0x178)+a0_0x223513(0x290)+'r-ses'+a0_0x223513(0x250)+a0_0x223513(0x27a)+a0_0x223513(0x29a)+a0_0x223513(0x1fe)+a0_0x223513(0x160));let licenseStatus={'isValid':![],'status':'missi'+'ng','errorMessage':a0_0x223513(0x2a1)+a0_0x223513(0x179)+'t\x20yet'+a0_0x223513(0x201)+'dated'},licenseInitPromise=null;export function getLicenseStatus(){return licenseStatus;}export async function waitForLicenseInit(){licenseInitPromise&&await licenseInitPromise;}function a0_0x4f82(_0x3cede2,_0x1beb5f){_0x3cede2=_0x3cede2-0x13d;const _0x21013a=a0_0x2101();let _0x4f826f=_0x21013a[_0x3cede2];if(a0_0x4f82['YABXMN']===undefined){var _0x2fa206=function(_0x4fc40e){const _0x32e368='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4fdeb3='',_0x52972a='';for(let _0x1e397f=0x0,_0xf0f8f4,_0x45edb3,_0x2150f1=0x0;_0x45edb3=_0x4fc40e['charAt'](_0x2150f1++);~_0x45edb3&&(_0xf0f8f4=_0x1e397f%0x4?_0xf0f8f4*0x40+_0x45edb3:_0x45edb3,_0x1e397f++%0x4)?_0x4fdeb3+=String['fromCharCode'](0xff&_0xf0f8f4>>(-0x2*_0x1e397f&0x6)):0x0){_0x45edb3=_0x32e368['indexOf'](_0x45edb3);}for(let _0x159dda=0x0,_0x1af952=_0x4fdeb3['length'];_0x159dda<_0x1af952;_0x159dda++){_0x52972a+='%'+('00'+_0x4fdeb3['charCodeAt'](_0x159dda)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x52972a);};a0_0x4f82['fSOonf']=_0x2fa206,a0_0x4f82['wXMoTH']={},a0_0x4f82['YABXMN']=!![];}const _0x51293b=_0x21013a[0x0],_0xdc757c=_0x3cede2+_0x51293b,_0x279fc1=a0_0x4f82['wXMoTH'][_0xdc757c];return!_0x279fc1?(_0x4f826f=a0_0x4f82['fSOonf'](_0x4f826f),a0_0x4f82['wXMoTH'][_0xdc757c]=_0x4f826f):_0x4f826f=_0x279fc1,_0x4f826f;}export function isLicenseValid(){const _0x49a534=a0_0x223513,_0x4f35c4={'rSGzn':function(_0x2d5530){return _0x2d5530();}};if(!_0x4f35c4[_0x49a534(0x21e)](validateIntegrity))return logger[_0x49a534(0x263)](_0x49a534(0x1c8)+_0x49a534(0x214)+_0x49a534(0x295)+_0x49a534(0x159)+'\x20fail'+'ed\x20-\x20'+'possi'+_0x49a534(0x180)+_0x49a534(0x15d)+_0x49a534(0x184)+_0x49a534(0x2a0)+'ed'),![];return licenseStatus[_0x49a534(0x210)+'id'];}export function getPurchaseLinks(_0x55aaa8){const _0x2d121f=a0_0x223513,_0xa0ded7={'KBvmT':function(_0xbb6a88,_0x2358ad){return _0xbb6a88===_0x2358ad;},'TYyga':_0x2d121f(0x13f)},_0x635e0e=_0x55aaa8||(_0xa0ded7[_0x2d121f(0x188)](process.env.ENABLE_SSE,_0xa0ded7[_0x2d121f(0x28d)])?_0x2d121f(0x1cf)+_0x2d121f(0x1b2)+'truct'+'ions':_0x2d121f(0x1e2)+_0x2d121f(0x1a4)+'ns');return{'monthly':_0x2d121f(0x17d)+'://bu'+_0x2d121f(0x260)+'ar.sh'+_0x2d121f(0x246)+_0x2d121f(0x186)+'3xQoj'+'QLgzQ'+_0x2d121f(0x1dd)+_0x2d121f(0x155)+'YfL6z'+'8hzSB'+'Bqh9i'+_0x2d121f(0x142)+'dwW?u'+_0x2d121f(0x22d)+_0x2d121f(0x1bc)+_0x2d121f(0x1d3)+_0x2d121f(0x187)+_0x2d121f(0x273)+_0x635e0e+(_0x2d121f(0x1cd)+_0x2d121f(0x215)+_0x2d121f(0x257)+'licku'+_0x2d121f(0x194)+'_serv'+'er'),'annual':_0x2d121f(0x17d)+_0x2d121f(0x17f)+_0x2d121f(0x260)+_0x2d121f(0x234)+'/pola'+_0x2d121f(0x186)+_0x2d121f(0x280)+'055T4'+_0x2d121f(0x150)+'lSQPs'+_0x2d121f(0x1f6)+_0x2d121f(0x1f0)+_0x2d121f(0x1b6)+_0x2d121f(0x232)+'wTZ?u'+_0x2d121f(0x22d)+'urce='+_0x2d121f(0x1d3)+_0x2d121f(0x187)+'dium='+_0x635e0e+(_0x2d121f(0x1cd)+_0x2d121f(0x215)+_0x2d121f(0x257)+_0x2d121f(0x140)+_0x2d121f(0x194)+_0x2d121f(0x1fb)+'er'),'lifetime':_0x2d121f(0x17d)+_0x2d121f(0x17f)+_0x2d121f(0x260)+_0x2d121f(0x234)+'/pola'+'r_cl_'+_0x2d121f(0x18d)+_0x2d121f(0x272)+'4iPZJ'+_0x2d121f(0x170)+_0x2d121f(0x166)+_0x2d121f(0x190)+_0x2d121f(0x16c)+_0x2d121f(0x1cc)+_0x2d121f(0x255)+_0x2d121f(0x22d)+'urce='+'mcp&u'+_0x2d121f(0x187)+_0x2d121f(0x273)+_0x635e0e+(_0x2d121f(0x1cd)+_0x2d121f(0x215)+'ign=c'+_0x2d121f(0x140)+_0x2d121f(0x194)+_0x2d121f(0x1fb)+'er')};}export function getLicenseErrorMessage(){const _0x3e3454=a0_0x223513,_0x5c27f3={'nekFL':_0x3e3454(0x13f),'DbYOZ':'remot'+_0x3e3454(0x19d)+_0x3e3454(0x29c)+'or','cIvnP':function(_0x1accee,_0x170804){return _0x1accee===_0x170804;}},_0x441d0d=getPurchaseLinks(process.env.ENABLE_SSE===_0x5c27f3['nekFL']?_0x5c27f3[_0x3e3454(0x169)]:_0x3e3454(0x191)+_0x3e3454(0x263)),_0x1bf039=_0x3e3454(0x1aa)+_0x3e3454(0x286)+_0x3e3454(0x283)+_0x3e3454(0x24d)+_0x3e3454(0x259)+_0x3e3454(0x1eb)+_0x3e3454(0x15f)+_0x3e3454(0x251)+_0x3e3454(0x1a2)+_0x3e3454(0x2a6)+'is\x20re'+_0x3e3454(0x1c2)+_0x3e3454(0x23a)+_0x3e3454(0x15a)+_0x3e3454(0x17b)+_0x3e3454(0x1b5)+_0x3e3454(0x1d5)+_0x3e3454(0x226)+'\x20a\x20pr'+'emium'+_0x3e3454(0x1b1)+_0x3e3454(0x1ae)+_0x3e3454(0x1dc)+'\x20Clic'+_0x3e3454(0x172)+_0x3e3454(0x243)+_0x3e3454(0x1fa)+_0x3e3454(0x266)+_0x3e3454(0x1ed)+'\x20all\x20'+_0x3e3454(0x1f5)+_0x3e3454(0x28b)+'tools'+_0x3e3454(0x28f)+'ase\x20p'+_0x3e3454(0x16d)+_0x3e3454(0x24c)+_0x3e3454(0x27a)+'se:\x0a-'+_0x3e3454(0x1ef)+'onthl'+_0x3e3454(0x203)+_0x3e3454(0x1d4)+_0x441d0d[_0x3e3454(0x1d0)+'ly']+(_0x3e3454(0x23f)+_0x3e3454(0x2a3)+_0x3e3454(0x15c)+_0x3e3454(0x161)+'ost\x20P'+_0x3e3454(0x278)+_0x3e3454(0x16e))+_0x441d0d[_0x3e3454(0x219)+'l']+(_0x3e3454(0x253)+_0x3e3454(0x275)+_0x3e3454(0x2a8)+_0x3e3454(0x145)+_0x3e3454(0x152)+_0x3e3454(0x206)+'](')+_0x441d0d[_0x3e3454(0x288)+'ime']+(_0x3e3454(0x26c)+_0x3e3454(0x23e)+'lread'+_0x3e3454(0x1d2)+_0x3e3454(0x1bb)+'d?**\x0a')+(_0x5c27f3[_0x3e3454(0x20f)](process.env.ENABLE_SSE,_0x5c27f3['nekFL'])?'>\x20Pro'+_0x3e3454(0x173)+'your\x20'+_0x3e3454(0x1d6)+_0x3e3454(0x146)+'\x20`X-L'+_0x3e3454(0x144)+'e-Key'+_0x3e3454(0x163)+_0x3e3454(0x2a7)+'der.':_0x3e3454(0x183)+_0x3e3454(0x293)+_0x3e3454(0x2a6)+_0x3e3454(0x24f)+_0x3e3454(0x15b)+_0x3e3454(0x25f)+_0x3e3454(0x199)+_0x3e3454(0x1ff)+'SE_KE'+_0x3e3454(0x192)+'viron'+_0x3e3454(0x209)+'varia'+_0x3e3454(0x28c))+(_0x3e3454(0x207)+_0x3e3454(0x21b)+_0x3e3454(0x224)+_0x3e3454(0x25a)+_0x3e3454(0x296)+_0x3e3454(0x16a)+_0x3e3454(0x1e6)+_0x3e3454(0x1de)+_0x3e3454(0x1f7)+_0x3e3454(0x1a6)+_0x3e3454(0x16d)+_0x3e3454(0x1a7)+_0x3e3454(0x292)+_0x3e3454(0x26f)+_0x3e3454(0x189)+_0x3e3454(0x294)+_0x3e3454(0x1ca)+_0x3e3454(0x238)+'icens'+_0x3e3454(0x20a)+_0x3e3454(0x22b)+_0x3e3454(0x174)+_0x3e3454(0x181)+_0x3e3454(0x200)+_0x3e3454(0x24d)+_0x3e3454(0x268));if(licenseStatus[_0x3e3454(0x263)+'Messa'+'ge'])return _0x1bf039+(_0x3e3454(0x1a5)+'Error'+'\x20Deta'+'ils:*'+'*\x20')+licenseStatus[_0x3e3454(0x263)+_0x3e3454(0x1e5)+'ge'];return _0x1bf039;}export async function validateLicenseKey(_0x571a90,_0x49dea2){const _0x36e01f=a0_0x223513,_0x5abfee={'mYcIk':function(_0x11eec3,_0x3afdbf){return _0x11eec3===_0x3afdbf;},'pJKqD':_0x36e01f(0x258)+'ng','JZWcw':_0x36e01f(0x17d)+_0x36e01f(0x24b)+'i.pol'+_0x36e01f(0x234)+_0x36e01f(0x241),'plcsh':'tampe'+_0x36e01f(0x1c0),'aXolb':'Code\x20'+_0x36e01f(0x214)+_0x36e01f(0x295)+'check'+_0x36e01f(0x218)+_0x36e01f(0x2a2)+'lease'+_0x36e01f(0x20d)+_0x36e01f(0x252)+'\x20from'+_0x36e01f(0x229)+_0x36e01f(0x156)+'npm\x20p'+_0x36e01f(0x1c3)+'e.','CIXaN':function(_0x29fb19,_0x41dcce){return _0x29fb19*_0x41dcce;},'xEHgN':function(_0x583ee3,_0x2c4230){return _0x583ee3+_0x2c4230;},'YWlpb':_0x36e01f(0x17e),'iHHkf':_0x36e01f(0x1be)+'catio'+_0x36e01f(0x220)+'n','YFGrs':_0x36e01f(0x254)+'ed','jZOpr':'expir'+'ed','nAkeJ':_0x36e01f(0x2a1)+_0x36e01f(0x1c5)+_0x36e01f(0x221)+_0x36e01f(0x1c1)+'red','ZtBfl':function(_0x2cf3d5,_0x3fd0c3){return _0x2cf3d5*_0x3fd0c3;},'OZeAl':_0x36e01f(0x157)+'wn','bOkKf':'error','DUEWv':_0x36e01f(0x262)+_0x36e01f(0x251)+_0x36e01f(0x1a2)+'\x20key','EvTMY':function(_0x39e3a3,_0x4b350f){return _0x39e3a3===_0x4b350f;},'rmJMT':_0x36e01f(0x262)+_0x36e01f(0x251)+_0x36e01f(0x1a2)+_0x36e01f(0x2a6)+_0x36e01f(0x193)+'t','zjwgp':'Licen'+_0x36e01f(0x29a)+_0x36e01f(0x1fe)+'ion\x20f'+'ailed'+'\x20-\x20pl'+_0x36e01f(0x228)+_0x36e01f(0x159)+_0x36e01f(0x293)+'\x20netw'+_0x36e01f(0x13d)+_0x36e01f(0x22e)+_0x36e01f(0x26d)+'and\x20t'+_0x36e01f(0x151)+_0x36e01f(0x22c)};if(!_0x571a90||_0x5abfee[_0x36e01f(0x24a)](_0x571a90[_0x36e01f(0x1bd)](),''))return{'isValid':![],'status':_0x5abfee[_0x36e01f(0x19a)],'errorMessage':_0x36e01f(0x1e3)+_0x36e01f(0x1a2)+_0x36e01f(0x2a6)+_0x36e01f(0x240)+_0x36e01f(0x195)};const _0x2a9a83=isSandboxSecretValid(_0x49dea2),_0x5137e5=_0x2a9a83?'sandb'+'ox:'+_0x571a90:_0x571a90,_0x35e2b5=licenseCache[_0x36e01f(0x25d)](_0x5137e5);if(_0x35e2b5)return logger[_0x36e01f(0x217)](_0x36e01f(0x1af)+_0x36e01f(0x22a)+_0x36e01f(0x239)+_0x36e01f(0x1a3)+_0x36e01f(0x141)+_0x36e01f(0x16b)+'s',{'status':_0x35e2b5['statu'+'s'],'sandbox':_0x2a9a83}),_0x35e2b5;const _0x2a12d4=_0x2a9a83?SANDBOX_ORG_ID:POLAR_ORGANIZATION_ID,_0x213d88=_0x2a9a83?'https'+_0x36e01f(0x1a8)+_0x36e01f(0x25c)+'-api.'+'polar'+_0x36e01f(0x1e4)+'1':_0x5abfee['JZWcw'],_0x5a9b9f=_0x213d88+(_0x36e01f(0x249)+_0x36e01f(0x21c)+'porta'+'l/lic'+_0x36e01f(0x298)+_0x36e01f(0x18f)+_0x36e01f(0x149)+_0x36e01f(0x29f));if(!validateIntegrity()&&!_0x2a9a83){const _0x4a3128={'isValid':![],'status':_0x5abfee[_0x36e01f(0x235)],'errorMessage':_0x5abfee[_0x36e01f(0x23b)]};return licenseCache[_0x36e01f(0x154)](_0x5137e5,_0x4a3128,_0x5abfee['CIXaN'](_0x5abfee[_0x36e01f(0x2a9)](0xa,0x3c),0x3e8)),_0x4a3128;}try{logger[_0x36e01f(0x217)](_0x36e01f(0x17c)+_0x36e01f(0x270)+'\x20lice'+'nse\x20k'+_0x36e01f(0x29d),{'mode':_0x2a9a83?_0x36e01f(0x223)+'ox':_0x36e01f(0x158)+_0x36e01f(0x1ce),'orgId':_0x5abfee[_0x36e01f(0x285)](_0x2a12d4[_0x36e01f(0x23d)+'ring'](0x0,0x8),_0x5abfee['YWlpb'])});const _0x4ffbc3=await a0_0x5b0f72[_0x36e01f(0x1bf)](_0x5a9b9f,{'key':_0x571a90[_0x36e01f(0x1bd)](),'organization_id':_0x2a12d4},{'headers':{'Content-Type':_0x5abfee[_0x36e01f(0x198)]},'timeout':0x2710}),_0x214beb=_0x4ffbc3[_0x36e01f(0x2a4)];logger[_0x36e01f(0x217)](_0x36e01f(0x1b0)+'\x20resp'+'onse\x20'+_0x36e01f(0x16b)+_0x36e01f(0x1e1)+_0x214beb[_0x36e01f(0x16b)+'s']);if(_0x214beb['statu'+'s']===_0x5abfee['YFGrs']){if(_0x214beb['expir'+_0x36e01f(0x2a5)]){const _0x43086e=new Date(_0x214beb[_0x36e01f(0x25e)+_0x36e01f(0x2a5)]);if(_0x43086e<new Date()){logger['warn']('Licen'+_0x36e01f(0x27d)+_0x36e01f(0x282)+_0x36e01f(0x1fc)+_0x214beb[_0x36e01f(0x25e)+_0x36e01f(0x2a5)]);const _0x5219c2={'isValid':![],'status':_0x5abfee[_0x36e01f(0x299)],'expiresAt':_0x214beb['expir'+_0x36e01f(0x2a5)],'errorMessage':_0x5abfee[_0x36e01f(0x225)]};return licenseCache[_0x36e01f(0x154)](_0x5137e5,_0x5219c2,_0x5abfee[_0x36e01f(0x18c)](0x3c*0x3c,0x3e8)),_0x5219c2;}}logger[_0x36e01f(0x22f)](_0x36e01f(0x2a1)+'se\x20gr'+_0x36e01f(0x1ba)+_0x36e01f(0x13e)+'\x20'+(_0x214beb[_0x36e01f(0x274)+_0x36e01f(0x276)]?.[_0x36e01f(0x230)]||_0x5abfee[_0x36e01f(0x271)]));const _0x725e37={'isValid':!![],'status':_0x36e01f(0x254)+'ed','customerEmail':_0x214beb[_0x36e01f(0x274)+_0x36e01f(0x276)]?.[_0x36e01f(0x230)],'expiresAt':_0x214beb[_0x36e01f(0x25e)+_0x36e01f(0x2a5)]};return licenseCache[_0x36e01f(0x154)](_0x5137e5,_0x725e37,0x3c*0x3c*0x3e8),_0x725e37;}logger['warn'](_0x36e01f(0x2a1)+'se\x20no'+'t\x20gra'+'nted,'+_0x36e01f(0x267)+_0x36e01f(0x212)+_0x214beb[_0x36e01f(0x16b)+'s']);const _0x39f7e2={'isValid':![],'status':_0x214beb[_0x36e01f(0x16b)+'s'],'errorMessage':_0x36e01f(0x2a1)+'se\x20ke'+'y\x20sta'+_0x36e01f(0x1b7)+_0x214beb[_0x36e01f(0x16b)+'s']};return licenseCache[_0x36e01f(0x154)](_0x5137e5,_0x39f7e2,0xa*0x3c*0x3e8),_0x39f7e2;}catch(_0x243bf3){logger['error'](_0x36e01f(0x2a1)+_0x36e01f(0x29a)+'lidat'+_0x36e01f(0x153)+'rror:',{'message':_0x243bf3[_0x36e01f(0x1df)+'ge']});if(_0x243bf3[_0x36e01f(0x1f2)+_0x36e01f(0x20e)]){const _0x178519=_0x243bf3[_0x36e01f(0x1f2)+_0x36e01f(0x20e)][_0x36e01f(0x16b)+'s'];logger[_0x36e01f(0x217)](_0x36e01f(0x227)+_0x36e01f(0x27c)+'s:\x20'+_0x178519,{'response':_0x243bf3[_0x36e01f(0x1f2)+'nse'][_0x36e01f(0x2a4)]});if(_0x178519===0x194){const _0x154ecf={'isValid':![],'status':_0x5abfee['bOkKf'],'errorMessage':_0x5abfee['DUEWv']};return licenseCache[_0x36e01f(0x154)](_0x5137e5,_0x154ecf,_0x5abfee[_0x36e01f(0x2a9)](0xa,0x3c)*0x3e8),_0x154ecf;}if(_0x5abfee[_0x36e01f(0x19f)](_0x178519,0x1a6)){const _0x4bf77b={'isValid':![],'status':_0x5abfee[_0x36e01f(0x1b4)],'errorMessage':_0x5abfee[_0x36e01f(0x19c)]};return licenseCache['set'](_0x5137e5,_0x4bf77b,_0x5abfee['ZtBfl'](0xa*0x3c,0x3e8)),_0x4bf77b;}if(_0x5abfee[_0x36e01f(0x24a)](_0x178519,0x1ad))return logger['warn'](_0x36e01f(0x147)+_0x36e01f(0x26b)+_0x36e01f(0x23c)+'eded\x20'+_0x36e01f(0x28e)+_0x36e01f(0x144)+'e\x20val'+_0x36e01f(0x279)+'on.\x20B'+_0x36e01f(0x177)+_0x36e01f(0x182)+'.'),{'isValid':![],'status':_0x36e01f(0x263),'errorMessage':'Rate\x20'+_0x36e01f(0x26b)+_0x36e01f(0x23c)+'eded.'+_0x36e01f(0x1f9)+_0x36e01f(0x269)+_0x36e01f(0x1a1)+_0x36e01f(0x1c7)+_0x36e01f(0x244)};}return logger[_0x36e01f(0x263)](_0x36e01f(0x287)+_0x36e01f(0x1e8)+_0x36e01f(0x149)+_0x36e01f(0x29e)+_0x36e01f(0x144)+_0x36e01f(0x1e7)+_0x36e01f(0x26e)+_0x36e01f(0x175)+_0x36e01f(0x29b)+_0x36e01f(0x237)+_0x36e01f(0x1f4)+_0x36e01f(0x196)+_0x36e01f(0x1d8)+'ss\x20fo'+_0x36e01f(0x1b8)+_0x36e01f(0x1a9)+'.'),{'isValid':![],'status':_0x5abfee[_0x36e01f(0x1b4)],'errorMessage':_0x5abfee['zjwgp']};}}function a0_0x2101(){const _0x415bee=['wu5uste','Aw9Uigy','mJy5otL2yxbnyui','rgjzt1O','vcbNDwK','C3rHDhu','wfHdA1O','DxjJAge','CL0O','BcbYzxq','uZfryKi','AwWGysa','A1vWie0','DMLKzsa','CMvKigy','Dg8GBMu','mJqZnJC','ywnRAw4','EsbnB2q','C2uGBM8','nZa2mJK','AgLZihq','vMfSAwq','Ahr0Chm','lI4U','oI8VyNu','yMXLihq','B3iGDgG','zYbVzMy','pIbbzgq','Aw5Nigq','otuWzq','CL9JBf8','Dg1FBwu','s0j2Bvq','yw5Kigu','vvbFtum','zJq3mJC','wNrczMW','ngHHm3u','y2nLC3m','A2v5CY8','tuTuDMe','Dg9VBf8','wwaGzw4','zM9YBwe','Cf9Ty3a','zgvK','tLLjtKC','owi1oda','AuHiA2y','x01duf8','CePlCuq','n2vHowy','CM1ktvq','zv90B28','ywy1nwi','rxzutvK','BNzPCM8','EsbHz2e','y2vUC2u','zcbSAwm','Dwn0Aw8','cGOGkIO','DgHLiha','C2uGBgK','oI8VC2e','DxjPDhK','cImG8j+uKIa','ngzMmti','otG1mKDvz05duG','zsbLCNi','Aw9Uig8','uMv0Dxi','ug9Syxi','ihzLCNm','zv9PBNm','BM90ihm','yK9Rs2y','B29SlIO','oefiqwK','DhvZoIa','CIbZzwm','ihjLDhu','yw50zwq','y2HHC2u','DxjJzt0','DhjPBq','yxbWBgK','Cg9ZDa','CMvK','igv4CgK','CxvPCMu','ywnRywC','mZG4odqWBLnwELjY','C2uGA2u','odiWote0DgPZyNjT','Aw4GBge','q29Kzsa','otm3n2i','BIb0Age','mte5otyYme5dBMLTBW','vgi0nxy','jNv0Bv8','y3rPB24','CMvTB3q','Bw9UDgG','ihbYB3y','EsbWDxi','BwnWjNu','BL0O','kGOkvgG','A2v5igK','uf9msum','igfJy2u','otCXmZe','nwi1mq','mtG2v1HNrLbb','zIb0Agu','weTdthO','zsb1C2u','BwvZC2e','zNvSBhK','CZOG','Aw5ZDhi','tM8GBgK','lNnOl3y','twvZC2e','zguGDgG','zsbRzxK','ig5VDca','ChnvCxO','mwiXowe','zwqkkIO','q2f4Cuq','BMXVy2S','zwfKzxi','icOQw00','tfv3C00','zJDJ','CMvZCg8','odCYyG','CI4Greu','ntqGy3u','tNnOt0O','CIb0BYa','C2HHmJu','ifbSzwe','CNzLCI4','x3nLCNy','igf0oIa','zNPdDve','BgLKyxq','teLdru4','AxmGzMu','ihzHBgK','ytaYzq','EsbqBge','Bfv5CLm','s2v5ieG','vMfSDwu','cGOQkKe','ndC5ovj6y05Rwq','BwvUDca','zsbPCYa','ihDPBgW','s0vzigu','ihjLAw4','BNnL','y0L2BLa','AxnwywW','CJOG','Dxm6ia','mMeZnMi','Aw50zwC','y2fTCge','mtm2ngnmB0jwvq','zgvIDwC','igzHAwW','yw5UDwe','mJDeA1fiCNG','ssbbu1m','B21LCI0','nJKYvNvjA1HZ','CLnhEM4','ru5trv8','BI9QC28','EsbOyxm','ig1PC3m','C2fUzgi','svnuqu4','BKfRzuO','AxmGAxm','sfruuca','zwfZzsa','ig9MzMK','BMLUzYa','CMvXDwK','ywLU','Dg1FC28','B25Uzwm','Aw5MBW','zw1HAwW','ndLKza','sviZEtK','EsbUB3q','yxiUC2G','CgXJC2G','BM1LBNq','igvYCM8','DcbHigW','y2fJAgu','zcb0BYa','yvHVBgi','igv4y2u','C3vIC3q','pIaQkKe','ksOQiaO','ChjVDMK','l3yX','DxbKyxq','q1aGu2u','DgvYlG','AuDiu2e','l3bVBge','CIb1BNq','B3zPzgu','l2n1C3q','BvLJswS','oI8Vyxa','C2uGysa','yxr1CMu','ihzHCMK','Dg8GDgG','C2LVBIa','AwqGBgK','C3rHBgW','ksOQcI0','z3jHBNq','ufbgp3u','nJyZmJi','AwDUpwm','BwLZC2K','ieXVy2S','vdOGww8','ytnLnMq','BMrIB3G','z2v0','zxHWAxi','sunlvva','Es5WB2W','D2fYBG','sw52ywW','zxjYB3i','nZjSzKzmruG','odjdveTrv1C','ifrVihu','ihn0yxq','lIOQcG','C2uGDhi','ngu1zq','BgLTAxq','ksOQcGO','DgLVBIa','igr1zsa','yM92zsa','yxrPBMC','t1PLqwW','vNLkvhu','zgL1Bt0','y3vZDg8','icOQw0W','BwvY','odCWyMe','B3b1Bge','AwrHDgK','BgLJzw4','ywLS','u3rHDhu','C2uGzxG','suLVtw0','BwvYrw0','m2e4ytm','B3iU','CgLYzwq','Dw0GrMu','ntC0oti','Eeviz04','uhjLBwK','q291Bgq','BgLMzxq','wc1mAwm','nwrI','C3rVBsa','yMXLlG','vfL5z2e','zM9YigW','lcbWBgu','zsaOugu','mMvKyZi','BMTZige','ihLVDxi','EhbSywK','CML0Esa','Dsbnvvm','Agv4','zw5Zzs0','ALPpChi','C2uGDMe','DhDVCMS','Bf9LCNi','zxKUlI4','yxrLigW','yxrL','zxrLy3q','tgLJzw4','zwqUifa','lsaQkLS','zgf0yq','zxnFyxq','igTLEsa','ucbOzwe','AwzLDgK','q0Lyyu4','ywLSzwq','B3jRigm','igzVCJO','Dhj1zq','BgLJA3u','zw5Zzsa','DNKXCvO','nwzJzG','AwnLBNm','BwuGlsa','BIb0Agu','uMf0zsa','qwXdr3C','DMfSAwq','otq4zJi','y2vImte','CuPkEfm','mZGXoge','A014ALu','ifrVB2W','q0HjB1y','CNKGywC','qMvZDca','Aw9Uigu','C2v0','C3HJndK','y2LHBca','Dw5RBM8','ChjVzhu','y2HLy2S','DxnLihq','zsbGq0W','qw5UDwe','yw1Wzxi','r291DMu','qsb2ywW','Aw9Ukq','BcaTie0','ndbIoq','ycbivfq','mJvJmMy','zJi2nge'];a0_0x2101=function(){return _0x415bee;};return a0_0x2101();}export async function initializeLicense(){const _0xccf8=a0_0x223513,_0xad2acd={'lUyrS':_0xccf8(0x258)+'ng','fzCuQ':function(_0x263e8f,_0x419940){return _0x263e8f===_0x419940;},'Gouve':'true','psUqz':'CLICK'+_0xccf8(0x18a)+_0xccf8(0x1d7)+_0xccf8(0x21f)+_0xccf8(0x20c)+_0xccf8(0x1a0)+_0xccf8(0x236)+_0xccf8(0x24e)+'able\x20'+_0xccf8(0x1b3)+'et','iGHSa':function(_0x559b24,_0xea4a85,_0x350bea){return _0x559b24(_0xea4a85,_0x350bea);}};if(licenseInitPromise)return licenseInitPromise;return licenseInitPromise=((async()=>{const _0x30d709=_0xccf8,_0x4e6fda=process.env.CLICKUP_MCP_LICENSE_KEY,_0xec072d=process.env.CLICKUP_MCP_SANDBOX_SECRET;return!_0x4e6fda?(licenseStatus={'isValid':![],'status':_0xad2acd[_0x30d709(0x204)],'errorMessage':_0xad2acd[_0x30d709(0x1fd)](process.env.ENABLE_SSE,_0xad2acd[_0x30d709(0x15e)])?_0x30d709(0x289)+_0x30d709(0x298)+_0x30d709(0x205)+'TTP\x20h'+_0x30d709(0x1ee)+_0x30d709(0x222)+'ing':_0xad2acd[_0x30d709(0x1e9)]},logger['warn'](_0x30d709(0x2a1)+_0x30d709(0x1c5)+_0x30d709(0x233)+_0x30d709(0x1d1)+'ided.'+_0x30d709(0x14f)+'s\x20wil'+_0x30d709(0x16f)+'urn\x20l'+_0x30d709(0x144)+_0x30d709(0x1ad)+_0x30d709(0x281))):(licenseStatus=await _0xad2acd[_0x30d709(0x245)](validateLicenseKey,_0x4e6fda,_0xec072d),licenseStatus[_0x30d709(0x210)+'id']?licenseStatus[_0x30d709(0x274)+_0x30d709(0x27f)+_0x30d709(0x27b)]?logger[_0x30d709(0x22f)](_0x30d709(0x2a1)+_0x30d709(0x29a)+_0x30d709(0x1fe)+'ed\x20fo'+_0x30d709(0x211)+licenseStatus[_0x30d709(0x274)+'merEm'+'ail']):logger[_0x30d709(0x22f)](_0x30d709(0x2a1)+'se\x20va'+_0x30d709(0x1fe)+'ed\x20su'+_0x30d709(0x18e)+_0x30d709(0x1e0)):(logger[_0x30d709(0x261)](_0x30d709(0x2a1)+_0x30d709(0x29a)+'lidat'+_0x30d709(0x167)+_0x30d709(0x2aa)+':\x20'+licenseStatus['error'+'Messa'+'ge']),logger[_0x30d709(0x22f)]('Tools'+_0x30d709(0x20b)+_0x30d709(0x1b9)+'rn\x20li'+'cense'+_0x30d709(0x237)+_0x30d709(0x247)+_0x30d709(0x171)+'valid'+'\x20key\x20'+'is\x20pr'+_0x30d709(0x248)+'d.'))),licenseStatus;})()),licenseInitPromise;}
1
+ const a0_0x1bdb46=a0_0x2043;(function(_0x1c5d00,_0x3d9e71){const _0x21856a=a0_0x2043,_0x3a00ff=_0x1c5d00();while(!![]){try{const _0x2e5d2e=-parseInt(_0x21856a(0x28b))/0x1+parseInt(_0x21856a(0x1b4))/0x2+-parseInt(_0x21856a(0x1ad))/0x3*(-parseInt(_0x21856a(0x17c))/0x4)+-parseInt(_0x21856a(0x18a))/0x5+-parseInt(_0x21856a(0x1a9))/0x6*(parseInt(_0x21856a(0x290))/0x7)+parseInt(_0x21856a(0x233))/0x8*(parseInt(_0x21856a(0x1f7))/0x9)+parseInt(_0x21856a(0x2a0))/0xa;if(_0x2e5d2e===_0x3d9e71)break;else _0x3a00ff['push'](_0x3a00ff['shift']());}catch(_0x4da50f){_0x3a00ff['push'](_0x3a00ff['shift']());}}}(a0_0x2d41,0xa4855));import a0_0x1e3d11 from'axios';import{Logger}from'./logger.js';function a0_0x2043(_0x20bc9d,_0x52951e){_0x20bc9d=_0x20bc9d-0x179;const _0x2d4129=a0_0x2d41();let _0x204351=_0x2d4129[_0x20bc9d];if(a0_0x2043['acPlrd']===undefined){var _0x5a5435=function(_0x557432){const _0xc6dc2b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x412cec='',_0x203626='';for(let _0x3281c5=0x0,_0x1cbde3,_0x51845f,_0x224fe2=0x0;_0x51845f=_0x557432['charAt'](_0x224fe2++);~_0x51845f&&(_0x1cbde3=_0x3281c5%0x4?_0x1cbde3*0x40+_0x51845f:_0x51845f,_0x3281c5++%0x4)?_0x412cec+=String['fromCharCode'](0xff&_0x1cbde3>>(-0x2*_0x3281c5&0x6)):0x0){_0x51845f=_0xc6dc2b['indexOf'](_0x51845f);}for(let _0x290401=0x0,_0x38067f=_0x412cec['length'];_0x290401<_0x38067f;_0x290401++){_0x203626+='%'+('00'+_0x412cec['charCodeAt'](_0x290401)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x203626);};a0_0x2043['XStSai']=_0x5a5435,a0_0x2043['NbbIXZ']={},a0_0x2043['acPlrd']=!![];}const _0x5981a7=_0x2d4129[0x0],_0x10deb2=_0x20bc9d+_0x5981a7,_0x3fc9e6=a0_0x2043['NbbIXZ'][_0x10deb2];return!_0x3fc9e6?(_0x204351=a0_0x2043['XStSai'](_0x204351),a0_0x2043['NbbIXZ'][_0x10deb2]=_0x204351):_0x204351=_0x3fc9e6,_0x204351;}import{createHash}from'crypto';import{TTLCache}from'./utils/cache.js';const logger=new Logger(a0_0x1bdb46(0x202)+'se'),licenseCache=new TTLCache(0x3c*0x3c*0x3e8,0x5*0x3c*0x3e8),ORG_PART_1=a0_0x1bdb46(0x26f)+a0_0x1bdb46(0x26e),ORG_PART_2=a0_0x1bdb46(0x245),ORG_PART_3=a0_0x1bdb46(0x1c0),ORG_PART_4=a0_0x1bdb46(0x26c),ORG_PART_5='c92dd'+a0_0x1bdb46(0x1de)+'cd',POLAR_ORGANIZATION_ID=ORG_PART_1+'-'+ORG_PART_2+'-'+ORG_PART_3+'-'+ORG_PART_4+'-'+ORG_PART_5,EXPECTED_CHECKSUM=a0_0x1bdb46(0x216)+a0_0x1bdb46(0x214)+a0_0x1bdb46(0x270)+a0_0x1bdb46(0x209)+a0_0x1bdb46(0x190)+a0_0x1bdb46(0x1a8)+'66322'+'70629'+a0_0x1bdb46(0x29e)+a0_0x1bdb46(0x1cf)+'af55b'+a0_0x1bdb46(0x263)+a0_0x1bdb46(0x2d1);function validateIntegrity(){const _0x59355d=a0_0x1bdb46,_0x16e365={'zqAvf':_0x59355d(0x21c)+'6'},_0x66dc66=createHash(_0x16e365['zqAvf'])[_0x59355d(0x20e)+'e'](POLAR_ORGANIZATION_ID)[_0x59355d(0x220)+'t'](_0x59355d(0x187));return _0x66dc66===EXPECTED_CHECKSUM;}const SANDBOX_PART_1=a0_0x1bdb46(0x282)+a0_0x1bdb46(0x2ab),SANDBOX_PART_2=a0_0x1bdb46(0x253),SANDBOX_PART_3=a0_0x1bdb46(0x200),SANDBOX_PART_4=a0_0x1bdb46(0x240),SANDBOX_PART_5='ceb11'+a0_0x1bdb46(0x1a4)+'d3',SANDBOX_ORG_ID=SANDBOX_PART_1+'-'+SANDBOX_PART_2+'-'+SANDBOX_PART_3+'-'+SANDBOX_PART_4+'-'+SANDBOX_PART_5,SANDBOX_SECRET_HASH='1b19a'+'2a36b'+'25c2f'+a0_0x1bdb46(0x186)+'f02f6'+a0_0x1bdb46(0x295)+a0_0x1bdb46(0x271)+a0_0x1bdb46(0x1bc)+'870ba'+a0_0x1bdb46(0x1b2)+a0_0x1bdb46(0x1b1)+'f264a'+'5fcf';function a0_0x2d41(){const _0x351124=['z2v0','C2uGDhi','zsbGq0W','CL0O','BcbYzxq','B3jRigm','ndbIoq','B29SlIO','jNv0Bv8','CIb0BYa','q0Xjq0S','v1z4wvO','zsb1C2u','zxHWAxi','Dcb5zxq','Aw9Ukq','C3rHDhu','ifrVB2W','EsbZDge','uMvTB3q','B250AgW','EsbUB3q','ngzMmti','igeGChi','zv9PBNm','ihjLAw4','ig5LDhC','Dwn0Aw8','rxjYB3i','igzYB20','DMfSAwq','odCYyG','C0vgD1a','zJDJ','y2q5zJy','otq4zJi','mMvKyZi','C2uGBM8','zsbPCYa','sunlvva','CNzLCI4','sviZEtK','B3n0ifa','icOQw00','yw50zwq','Es5WB2W','zhDxp3u','Aw5Nigq','z3jHBNq','vg9VBhm','igr1zsa','C2uGA2u','zw1HAwW','ntC0oti','u1bKA2y','yxrPBMC','Bw9UDgG','vfrqigG','A0r4y0i','igf0oIa','ru5trv8','lIOQcG','nJe2nZe0yNfxBMvV','igv4CgK','zgf0yq','Cg9Syxi','DgLVBIa','mJCWmJGZm25kD1HztG','zwqUifa','ywnRywC','yxiUC2G','CML0Esa','mZDHnwq','Cf9Ty3a','B3G6','CgLYzwq','u0vFs0u','BwvUDca','Dg1FBwu','EsbqBge','A2v5CY8','owi1oda','CMLUzW','mti3odqWndb4ruDbwum','ogH6u0i','y2vUC2u','BNzPCM8','zxrLy3q','BM90ihm','icOQw0W','zgL1Bt0','x01duf8','vcbNDwK','AxnwywW','nwrI','DcbNCMe','qw5UDwe','zgf0zwq','zIb0Agu','y2LHBca','EsbOyxm','qKj5s2u','lsaQkLS','ssbbu1m','EsbnB2q','uuXNELe','DMLYB24','s2v5ieG','y2fTCge','Aw50zwC','sw52ywW','ywLS','ChjVzhu','wc1mAwm','CI4Greu','DgHLiha','cImG8j+uKIa','C2uGBgK','l3bVBge','zsb2ywW','AxmGzMu','DxjPDhK','ig5VDca','ChbVC1q','ug9Syxi','vdOGww8','u3rHDhu','ihzLCNm','y2fJAgu','ihjLC3a','igXPy2u','BIb0Age','otuWzq','BgLMzxq','rK1TqNq','ieXVy2S','DcbHigW','zcb0BYa','Cg9YDge','yxrLigW','zwqGC3u','BNnL','twvZC2e','qMvZDca','Dsbnvvm','DMfYAwe','mJy3mdK1nKDksezcyG','pIbbzgq','Bc9SAwm','uZfryKi','Aw9Uigu','C3rHBgW','wg9Qzhi','A1vWie0','Aw5N','ywjSzsa','otCXmZe','Agv4','yxbWBgK','lcbWBgu','nte2nZG3nuz2B1j0yW','BgLTAxq','DhvZoIa','Dhj1zq','BNbTiha','zhDRs00','zgvMmgi','qNP4u1i','CYb3AwW','vMfSDwu','zwrLzca','igTLEsa','ifrVihu','vMfSAwq','yw5UDwe','oefiqwK','vNLkvhu','oI8VC2e','Aw9Uigy','B3b1Bge','BwvY','zw1PDw0','yMXLlG','Dg9VBhm','DgfTCgu','AwqGBgK','mJqZnJC','B3iU','ChjVDMK','EuLzA3G','ogeWzwi','mtHetu5qvNa','rhHIBvK','CIbZzwm','y3rPB24','nNnjzLP6sW','AwzLDgK','ihDPBgW','BwnWjNu','m2iXmdu','ytnLnMq','CNjVCJO','mtCWnta1mgPArgDArG','ksOQcI0','ngLqwKO','ufbgp3u','tfv3C00','y3vZDg8','CZOG','l2n1C3q','mZGXoge','igv4y2u','zgvYlG','ihLVDxi','ngu1zq','q291Bgq','Aw5ZDhi','DgvYlG','zgvK','B24Uiei','v1z1tgW','DhDVCMS','BgLKyxq','igfSBca','ksOQcGO','m2e4ytm','DxjUigW','CMvTB3q','DxjJzt0','n2vHowy','BNnLigS','zcbSAwm','BMrIB3G','wKncu1G','wevWr0e','zM9YBwe','zwfZzsa','BcaTie0','ihzHCMK','lwfWAs4','y2HLy2S','AxmGChi','lI4U','igzHAwW','otm3n2i','zwfKzxi','Dxm6ia','tLLjtKC','CMvZCg8','uf9msum','vgi0nxy','ic0GCgW','ywLSzwq','cGOGkIO','C3vIC3q','revus3y','BhjLywq','yxnLiha','CL9JBf8','s0vzigu','ig9MzMK','tuTuDMe','uMv0Dxi','BgLJA3u','Dg1FC28','ngHHm3u','wenvtxG','BgLJzw4','yMXLihq','mtuZDKjfzhrn','C2v0','ycbivfq','q29Kzsa','ywLU','DhjPBq','Aw9Uig8','wxrxwue','CNKGywC','ndLKza','AwnLBNm','tgLJzw4','vvbFtum','ihzHBgK','sfruuca','vu1YBLa','AwrHDgK','AxmGCMu','zJq3mJC','C3HJndK','As5WB2W','zxnFyxq','ihjLDhu','DxbKyxq','Cg9ZC2K','l3yX','AgLZihq','zxjYB3i','C2LVBIa','ndnIndm','BIb0Agu','zMi3nwm','t1PAEw8','BwLZC2K','x3nLCNy','m3HrB2O','D2fYBG','C2HHmJu','wfHdA1O','B3iGDgG','EfLSy24','zgLNzxm','BwHHtwi','Ew91CIa','BwvYrw0','BI9QC28','Ahr0Chm','weTdthO','DxjJAge','Aw5MBW','zgvIDwC','BwvZC2e','zs1lzxK','C2fUzgi','oI8VyNu','ywnRAw4','ntqGy3u','EhbSywK','y2HHC2u','zguGDgG','nZu4nfbyEuDesW','B0XVyxq','CMvKigy','yxrL','EsbHz2e','C3rVBsa','CvHythe','C2uGDMe','BgvHC2u','C2uGysa','Dw5RBM8','AwXZoIO','zw5Zzs0','ytaYzq','teLdru4','kGOkvgG','zs1VBMW','zwqkkIO','nwi1mq','zwrLzc4','EeHnthi','CxvPCMu','zxKUlI4','ksOQiaO','AwDUpwm','igvYCM8'];a0_0x2d41=function(){return _0x351124;};return a0_0x2d41();}function isSandboxSecretValid(_0xa65930){const _0x1ffa30=a0_0x1bdb46,_0x50d820={'xNzhH':function(_0x50d4ec,_0x5f02ce){return _0x50d4ec(_0x5f02ce);},'WNdTS':'hex'};if(!_0xa65930)return![];try{const _0x5246af=_0x50d820['xNzhH'](createHash,'sha25'+'6')[_0x1ffa30(0x20e)+'e'](_0xa65930)[_0x1ffa30(0x220)+'t'](_0x50d820['WNdTS']);return _0x5246af===SANDBOX_SECRET_HASH;}catch{return![];}}logger[a0_0x1bdb46(0x228)](a0_0x1bdb46(0x260)+a0_0x1bdb46(0x243)+a0_0x1bdb46(0x2b5)+'e\x20(Pe'+'r-ses'+a0_0x1bdb46(0x213)+a0_0x1bdb46(0x1f5)+a0_0x1bdb46(0x23a)+a0_0x1bdb46(0x1c8)+a0_0x1bdb46(0x25c));let licenseStatus={'isValid':![],'status':a0_0x1bdb46(0x218)+'ng','errorMessage':'Licen'+a0_0x1bdb46(0x272)+a0_0x1bdb46(0x25b)+a0_0x1bdb46(0x204)+a0_0x1bdb46(0x2ae)},licenseInitPromise=null;export function getLicenseStatus(){return licenseStatus;}export async function waitForLicenseInit(){licenseInitPromise&&await licenseInitPromise;}export function isLicenseValid(){const _0x52d209=a0_0x1bdb46,_0x2420ca={'xUSqM':function(_0x17e48c){return _0x17e48c();},'jdZon':_0x52d209(0x1fa)+_0x52d209(0x2ba)+_0x52d209(0x294)+_0x52d209(0x1da)+_0x52d209(0x1dd)+'ed\x20-\x20'+_0x52d209(0x20f)+_0x52d209(0x1f6)+'amper'+_0x52d209(0x27c)+_0x52d209(0x2a4)+'ed'};if(!_0x2420ca['xUSqM'](validateIntegrity))return logger[_0x52d209(0x212)](_0x2420ca['jdZon']),![];return licenseStatus[_0x52d209(0x2aa)+'id'];}export function getPurchaseLinks(_0x46221e){const _0x273b9f=a0_0x1bdb46,_0x1f1011={'UMrnP':_0x273b9f(0x18d),'HQMNP':'remot'+_0x273b9f(0x265)+'truct'+'ions'},_0x39df74=_0x46221e||(process.env.ENABLE_SSE===_0x1f1011[_0x273b9f(0x206)]?_0x1f1011['HQMNP']:_0x273b9f(0x1c2)+_0x273b9f(0x268)+'ns');return{'monthly':'https'+'://bu'+'y.pol'+_0x273b9f(0x293)+'/pola'+_0x273b9f(0x1ec)+_0x273b9f(0x21a)+_0x273b9f(0x2b6)+_0x273b9f(0x226)+_0x273b9f(0x20a)+'YfL6z'+_0x273b9f(0x2a1)+'Bqh9i'+'vy1qZ'+_0x273b9f(0x27b)+_0x273b9f(0x1f2)+_0x273b9f(0x1ce)+'mcp&u'+_0x273b9f(0x29b)+_0x273b9f(0x2a7)+_0x39df74+(_0x273b9f(0x255)+_0x273b9f(0x2b9)+'ign=c'+_0x273b9f(0x1f1)+_0x273b9f(0x296)+'_serv'+'er'),'annual':'https'+_0x273b9f(0x22d)+_0x273b9f(0x27a)+_0x273b9f(0x293)+_0x273b9f(0x2c3)+_0x273b9f(0x1ec)+_0x273b9f(0x1cb)+'055T4'+'CHIoV'+'lSQPs'+'NshOJ'+_0x273b9f(0x1b8)+_0x273b9f(0x199)+_0x273b9f(0x276)+'wTZ?u'+_0x273b9f(0x1f2)+_0x273b9f(0x1ce)+_0x273b9f(0x1b0)+'tm_me'+_0x273b9f(0x2a7)+_0x39df74+(_0x273b9f(0x255)+'campa'+_0x273b9f(0x24b)+_0x273b9f(0x1f1)+_0x273b9f(0x296)+_0x273b9f(0x219)+'er'),'lifetime':_0x273b9f(0x225)+_0x273b9f(0x22d)+_0x273b9f(0x27a)+'ar.sh'+_0x273b9f(0x2c3)+'r_cl_'+_0x273b9f(0x1f3)+_0x273b9f(0x19a)+_0x273b9f(0x1b6)+_0x273b9f(0x17f)+'YNTI1'+_0x273b9f(0x1ef)+_0x273b9f(0x21d)+_0x273b9f(0x1e4)+_0x273b9f(0x1b7)+_0x273b9f(0x1f2)+_0x273b9f(0x1ce)+_0x273b9f(0x1b0)+_0x273b9f(0x29b)+_0x273b9f(0x2a7)+_0x39df74+(_0x273b9f(0x255)+_0x273b9f(0x2b9)+_0x273b9f(0x24b)+_0x273b9f(0x1f1)+'p_mcp'+_0x273b9f(0x219)+'er')};}export function getLicenseErrorMessage(){const _0x1602f4=a0_0x1bdb46,_0x53ba7a={'Xojdr':function(_0x547b4b,_0x2712a4){return _0x547b4b===_0x2712a4;},'XEpGA':'true','WVuLl':function(_0x4e899e,_0x25f758){return _0x4e899e===_0x25f758;}},_0x7c17cf=getPurchaseLinks(_0x53ba7a[_0x1602f4(0x182)](process.env.ENABLE_SSE,_0x53ba7a[_0x1602f4(0x1d4)])?_0x1602f4(0x1cd)+'e_too'+'l_err'+'or':'tool_'+_0x1602f4(0x212)),_0x4ffd71=_0x1602f4(0x2c1)+'Premi'+'um\x20Fe'+'ature'+_0x1602f4(0x2d4)+_0x1602f4(0x244)+'A\x20val'+'id\x20li'+_0x1602f4(0x2a2)+_0x1602f4(0x195)+_0x1602f4(0x208)+_0x1602f4(0x248)+_0x1602f4(0x2d6)+'use\x20t'+_0x1602f4(0x211)+_0x1602f4(0x254)+_0x1602f4(0x242)+'is\x20is'+_0x1602f4(0x264)+_0x1602f4(0x19f)+_0x1602f4(0x2cc)+_0x1602f4(0x1fd)+_0x1602f4(0x2af)+'\x20Clic'+_0x1602f4(0x183)+'CP\x20Se'+_0x1602f4(0x275)+_0x1602f4(0x196)+'nlock'+_0x1602f4(0x1c9)+_0x1602f4(0x22f)+_0x1602f4(0x238)+_0x1602f4(0x1a1)+_0x1602f4(0x189)+_0x1602f4(0x1eb)+_0x1602f4(0x227)+_0x1602f4(0x23c)+_0x1602f4(0x1f5)+'se:\x0a-'+_0x1602f4(0x278)+_0x1602f4(0x261)+_0x1602f4(0x29c)+'n]('+_0x7c17cf[_0x1602f4(0x285)+'ly']+(_0x1602f4(0x24a)+_0x1602f4(0x2b3)+_0x1602f4(0x2ad)+_0x1602f4(0x1d7)+_0x1602f4(0x277)+_0x1602f4(0x19d)+_0x1602f4(0x250))+_0x7c17cf[_0x1602f4(0x198)+'l']+(_0x1602f4(0x1b5)+_0x1602f4(0x2a6)+_0x1602f4(0x1ae)+'me\x20-\x20'+_0x1602f4(0x179)+_0x1602f4(0x193)+'](')+_0x7c17cf[_0x1602f4(0x2d2)+'ime']+(_0x1602f4(0x1ca)+'>\x20**A'+_0x1602f4(0x1ea)+'y\x20pur'+_0x1602f4(0x231)+'d?**\x0a')+(_0x53ba7a[_0x1602f4(0x1c6)](process.env.ENABLE_SSE,_0x1602f4(0x18d))?'>\x20Pro'+'vide\x20'+_0x1602f4(0x222)+'key\x20i'+_0x1602f4(0x215)+'\x20`X-L'+'icens'+_0x1602f4(0x22b)+_0x1602f4(0x1f9)+'P\x20hea'+_0x1602f4(0x1be):_0x1602f4(0x17d)+_0x1602f4(0x1bf)+_0x1602f4(0x195)+'to\x20th'+_0x1602f4(0x24f)+_0x1602f4(0x274)+_0x1602f4(0x2a8)+_0x1602f4(0x241)+_0x1602f4(0x299)+'Y`\x20en'+_0x1602f4(0x2b7)+_0x1602f4(0x29a)+_0x1602f4(0x17b)+_0x1602f4(0x1a0))+('\x0a\x0a**A'+_0x1602f4(0x2b4)+'ISTAN'+_0x1602f4(0x2ca)+_0x1602f4(0x17a)+_0x1602f4(0x2a9)+_0x1602f4(0x232)+_0x1602f4(0x259)+_0x1602f4(0x256)+_0x1602f4(0x2c0)+_0x1602f4(0x227)+_0x1602f4(0x2c2)+'nks\x20a'+'bove\x20'+'and\x20e'+_0x1602f4(0x230)+_0x1602f4(0x2d0)+_0x1602f4(0x2d5)+'icens'+_0x1602f4(0x273)+'requi'+_0x1602f4(0x235)+_0x1602f4(0x21e)+_0x1602f4(0x2c5)+'ature'+_0x1602f4(0x28a));if(licenseStatus['error'+_0x1602f4(0x2db)+'ge'])return _0x4ffd71+(_0x1602f4(0x1e7)+_0x1602f4(0x269)+'\x20Deta'+_0x1602f4(0x23e)+'*\x20')+licenseStatus[_0x1602f4(0x212)+_0x1602f4(0x2db)+'ge'];return _0x4ffd71;}export async function validateLicenseKey(_0x4a6e8e,_0x569c4c){const _0x25ac72=a0_0x1bdb46,_0x39dfc3={'FMmBt':function(_0x1a6b7e,_0x5e5cda){return _0x1a6b7e===_0x5e5cda;},'OZZyo':_0x25ac72(0x218)+'ng','NUHPD':_0x25ac72(0x1f0)+'ning\x20'+_0x25ac72(0x2cd)+_0x25ac72(0x1d1)+'ense\x20'+_0x25ac72(0x25d)+'s','SPdkf':_0x25ac72(0x225)+'://ap'+_0x25ac72(0x20b)+'ar.sh'+_0x25ac72(0x210),'oLoat':function(_0xa8b913){return _0xa8b913();},'ZCBSX':_0x25ac72(0x1fa)+_0x25ac72(0x2ba)+_0x25ac72(0x294)+_0x25ac72(0x1da)+_0x25ac72(0x1dd)+_0x25ac72(0x291)+_0x25ac72(0x23b)+_0x25ac72(0x266)+_0x25ac72(0x181)+_0x25ac72(0x26a)+_0x25ac72(0x1ee)+_0x25ac72(0x2b0)+_0x25ac72(0x18e)+_0x25ac72(0x292)+'e.','sEFwP':function(_0x2e0448,_0x2bda02){return _0x2e0448*_0x2bda02;},'SdAyn':_0x25ac72(0x22c)+'ox','DxbmY':_0x25ac72(0x188)+'catio'+_0x25ac72(0x224)+'n','xYlcn':function(_0x1f71dd,_0x1b9d89){return _0x1f71dd<_0x1b9d89;},'kDxcB':_0x25ac72(0x202)+_0x25ac72(0x280)+_0x25ac72(0x2b1)+_0x25ac72(0x28c)+'red','YtWYA':_0x25ac72(0x27d)+'ed','BzxSR':function(_0x5d72e4,_0x132b1d){return _0x5d72e4*_0x132b1d;},'BByKe':function(_0x15590f,_0x123420){return _0x15590f*_0x123420;},'yIYkx':'Inval'+_0x25ac72(0x1a3)+_0x25ac72(0x2a2)+'\x20key','mhaMb':_0x25ac72(0x212),'WVxYZ':'Rate\x20'+_0x25ac72(0x18b)+'\x20exce'+_0x25ac72(0x194)+'for\x20l'+_0x25ac72(0x201)+_0x25ac72(0x2c4)+_0x25ac72(0x207)+_0x25ac72(0x1c5)+_0x25ac72(0x22e)+'g\x20off'+'.','qXXLq':_0x25ac72(0x1c1)+_0x25ac72(0x2c7)+'valid'+_0x25ac72(0x2d8)+_0x25ac72(0x201)+'e\x20key'+_0x25ac72(0x27f)+'to\x20ne'+_0x25ac72(0x1c7)+_0x25ac72(0x24c)+_0x25ac72(0x2bf)+_0x25ac72(0x1e1)+'\x20acce'+'ss\x20fo'+_0x25ac72(0x1ab)+_0x25ac72(0x2c6)+'.','xHMLr':_0x25ac72(0x202)+_0x25ac72(0x23a)+_0x25ac72(0x1c8)+_0x25ac72(0x19c)+_0x25ac72(0x1e6)+_0x25ac72(0x1e5)+_0x25ac72(0x1d6)+_0x25ac72(0x1da)+_0x25ac72(0x1bf)+_0x25ac72(0x267)+_0x25ac72(0x252)+'onnec'+_0x25ac72(0x28f)+'and\x20t'+_0x25ac72(0x1ff)+_0x25ac72(0x1fb)};if(!_0x4a6e8e||_0x39dfc3[_0x25ac72(0x2d3)](_0x4a6e8e['trim'](),''))return{'isValid':![],'status':_0x39dfc3[_0x25ac72(0x217)],'errorMessage':'No\x20li'+_0x25ac72(0x2a2)+'\x20key\x20'+_0x25ac72(0x1a6)+_0x25ac72(0x1c4)};const _0x1894ed=isSandboxSecretValid(_0x569c4c),_0x53bac8=_0x1894ed?'sandb'+_0x25ac72(0x297)+_0x4a6e8e:_0x4a6e8e,_0x567be7=licenseCache[_0x25ac72(0x24d)](_0x53bac8);if(_0x567be7)return logger['debug'](_0x39dfc3['NUHPD'],{'status':_0x567be7[_0x25ac72(0x25d)+'s'],'sandbox':_0x1894ed}),_0x567be7;const _0x8025d5=_0x1894ed?SANDBOX_ORG_ID:POLAR_ORGANIZATION_ID,_0x4a0345=_0x1894ed?'https'+_0x25ac72(0x19b)+_0x25ac72(0x1d2)+_0x25ac72(0x1d9)+_0x25ac72(0x28e)+'.sh/v'+'1':_0x39dfc3[_0x25ac72(0x283)],_0xb2a455=_0x4a0345+(_0x25ac72(0x1bb)+'omer-'+_0x25ac72(0x2d7)+_0x25ac72(0x17e)+_0x25ac72(0x23f)+_0x25ac72(0x29d)+_0x25ac72(0x26b)+_0x25ac72(0x236));if(!_0x39dfc3[_0x25ac72(0x234)](validateIntegrity)&&!_0x1894ed){const _0x5910c9={'isValid':![],'status':_0x25ac72(0x1a2)+'red','errorMessage':_0x39dfc3[_0x25ac72(0x1d3)]};return licenseCache[_0x25ac72(0x1f8)](_0x53bac8,_0x5910c9,_0x39dfc3[_0x25ac72(0x26d)](0xa,0x3c)*0x3e8),_0x5910c9;}try{logger[_0x25ac72(0x229)](_0x25ac72(0x197)+_0x25ac72(0x284)+_0x25ac72(0x2cf)+_0x25ac72(0x1d0)+_0x25ac72(0x249),{'mode':_0x1894ed?_0x39dfc3['SdAyn']:_0x25ac72(0x2bd)+_0x25ac72(0x1ac),'orgId':_0x8025d5[_0x25ac72(0x1e8)+_0x25ac72(0x29f)](0x0,0x8)+_0x25ac72(0x1dc)});const _0x131dd7=await a0_0x1e3d11['post'](_0xb2a455,{'key':_0x4a6e8e[_0x25ac72(0x1fc)](),'organization_id':_0x8025d5},{'headers':{'Content-Type':_0x39dfc3[_0x25ac72(0x1aa)]},'timeout':0x2710}),_0x14725a=_0x131dd7[_0x25ac72(0x28d)];logger[_0x25ac72(0x229)](_0x25ac72(0x2c9)+_0x25ac72(0x2ce)+'onse\x20'+_0x25ac72(0x25d)+_0x25ac72(0x1ba)+_0x14725a['statu'+'s']);if(_0x39dfc3[_0x25ac72(0x2d3)](_0x14725a[_0x25ac72(0x25d)+'s'],_0x25ac72(0x27d)+'ed')){if(_0x14725a[_0x25ac72(0x25a)+_0x25ac72(0x20c)]){const _0x3069b1=new Date(_0x14725a[_0x25ac72(0x25a)+_0x25ac72(0x20c)]);if(_0x39dfc3[_0x25ac72(0x21f)](_0x3069b1,new Date())){logger['warn'](_0x25ac72(0x202)+'se\x20ex'+_0x25ac72(0x298)+_0x25ac72(0x288)+_0x14725a[_0x25ac72(0x25a)+_0x25ac72(0x20c)]);const _0x12bdb8={'isValid':![],'status':_0x25ac72(0x25a)+'ed','expiresAt':_0x14725a[_0x25ac72(0x25a)+_0x25ac72(0x20c)],'errorMessage':_0x39dfc3[_0x25ac72(0x287)]};return licenseCache[_0x25ac72(0x1f8)](_0x53bac8,_0x12bdb8,0x3c*0x3c*0x3e8),_0x12bdb8;}}logger[_0x25ac72(0x228)](_0x25ac72(0x202)+'se\x20gr'+_0x25ac72(0x279)+'\x20for:'+'\x20'+(_0x14725a['custo'+_0x25ac72(0x19e)]?.[_0x25ac72(0x281)]||_0x25ac72(0x23d)+'wn'));const _0x45b4b6={'isValid':!![],'status':_0x39dfc3[_0x25ac72(0x1fe)],'customerEmail':_0x14725a[_0x25ac72(0x1b9)+'mer']?.[_0x25ac72(0x281)],'expiresAt':_0x14725a['expir'+'es_at']};return licenseCache[_0x25ac72(0x1f8)](_0x53bac8,_0x45b4b6,_0x39dfc3[_0x25ac72(0x26d)](_0x39dfc3[_0x25ac72(0x191)](0x3c,0x3c),0x3e8)),_0x45b4b6;}logger[_0x25ac72(0x21b)](_0x25ac72(0x202)+_0x25ac72(0x272)+_0x25ac72(0x2ac)+'nted,'+'\x20stat'+_0x25ac72(0x1e0)+_0x14725a[_0x25ac72(0x25d)+'s']);const _0x1a2ebc={'isValid':![],'status':_0x14725a[_0x25ac72(0x25d)+'s'],'errorMessage':_0x25ac72(0x202)+_0x25ac72(0x280)+_0x25ac72(0x25f)+_0x25ac72(0x18c)+_0x14725a[_0x25ac72(0x25d)+'s']};return licenseCache[_0x25ac72(0x1f8)](_0x53bac8,_0x1a2ebc,_0x39dfc3[_0x25ac72(0x2b2)](0xa*0x3c,0x3e8)),_0x1a2ebc;}catch(_0xc11b7b){logger[_0x25ac72(0x212)](_0x25ac72(0x202)+'se\x20va'+_0x25ac72(0x1c8)+_0x25ac72(0x180)+_0x25ac72(0x1b3),{'message':_0xc11b7b[_0x25ac72(0x22a)+'ge']});if(_0xc11b7b['respo'+_0x25ac72(0x2da)]){const _0x841008=_0xc11b7b['respo'+_0x25ac72(0x2da)][_0x25ac72(0x25d)+'s'];logger[_0x25ac72(0x229)](_0x25ac72(0x205)+_0x25ac72(0x2cb)+_0x25ac72(0x1ba)+_0x841008,{'response':_0xc11b7b[_0x25ac72(0x1e2)+_0x25ac72(0x2da)][_0x25ac72(0x28d)]});if(_0x39dfc3[_0x25ac72(0x2d3)](_0x841008,0x194)){const _0x58b4e9={'isValid':![],'status':_0x25ac72(0x212),'errorMessage':_0x39dfc3[_0x25ac72(0x1a7)]};return licenseCache['set'](_0x53bac8,_0x58b4e9,0xa*0x3c*0x3e8),_0x58b4e9;}if(_0x841008===0x1a6){const _0x2d6356={'isValid':![],'status':_0x39dfc3[_0x25ac72(0x221)],'errorMessage':_0x25ac72(0x2bb)+_0x25ac72(0x1a3)+'cense'+_0x25ac72(0x195)+_0x25ac72(0x1d5)+'t'};return licenseCache['set'](_0x53bac8,_0x2d6356,_0x39dfc3['BzxSR'](0xa*0x3c,0x3e8)),_0x2d6356;}if(_0x841008===0x1ad)return logger['warn'](_0x39dfc3[_0x25ac72(0x258)]),{'isValid':![],'status':_0x25ac72(0x212),'errorMessage':'Rate\x20'+'limit'+_0x25ac72(0x1bd)+_0x25ac72(0x246)+'\x20Plea'+_0x25ac72(0x24e)+_0x25ac72(0x237)+'in\x20la'+_0x25ac72(0x1c3)};}return logger[_0x25ac72(0x212)](_0x39dfc3[_0x25ac72(0x239)]),{'isValid':![],'status':_0x39dfc3[_0x25ac72(0x221)],'errorMessage':_0x39dfc3[_0x25ac72(0x247)]};}}export async function initializeLicense(){const _0x56558b=a0_0x1bdb46,_0x43172f={'pposT':'true','XCUMx':function(_0xf3cef7,_0x54759f,_0x389026){return _0xf3cef7(_0x54759f,_0x389026);},'DETKv':'Licen'+_0x56558b(0x23a)+_0x56558b(0x1c8)+_0x56558b(0x2d9)+'ccess'+'fully','dwkKM':_0x56558b(0x27e)+_0x56558b(0x1af)+_0x56558b(0x20d)+'rn\x20li'+'cense'+'\x20erro'+'r\x20unt'+'il\x20a\x20'+_0x56558b(0x26b)+_0x56558b(0x195)+_0x56558b(0x1db)+'ovide'+'d.'};if(licenseInitPromise)return licenseInitPromise;return licenseInitPromise=((async()=>{const _0x52b2b8=_0x56558b,_0x59b534=process.env.CLICKUP_MCP_LICENSE_KEY,_0x520e3f=process.env.CLICKUP_MCP_SANDBOX_SECRET;return!_0x59b534?(licenseStatus={'isValid':![],'status':_0x52b2b8(0x218)+'ng','errorMessage':process.env.ENABLE_SSE===_0x43172f[_0x52b2b8(0x2c8)]?_0x52b2b8(0x2be)+_0x52b2b8(0x23f)+_0x52b2b8(0x2b8)+_0x52b2b8(0x286)+_0x52b2b8(0x1df)+'\x20miss'+_0x52b2b8(0x184):_0x52b2b8(0x257)+_0x52b2b8(0x203)+_0x52b2b8(0x1e3)+_0x52b2b8(0x289)+_0x52b2b8(0x1ed)+_0x52b2b8(0x2a3)+'nment'+_0x52b2b8(0x1d8)+_0x52b2b8(0x185)+_0x52b2b8(0x2a5)+'et'},logger[_0x52b2b8(0x21b)](_0x52b2b8(0x202)+_0x52b2b8(0x280)+_0x52b2b8(0x262)+'\x20prov'+'ided.'+_0x52b2b8(0x25e)+_0x52b2b8(0x192)+_0x52b2b8(0x251)+_0x52b2b8(0x1cc)+'icens'+'e\x20err'+_0x52b2b8(0x1a5))):(licenseStatus=await _0x43172f[_0x52b2b8(0x1f4)](validateLicenseKey,_0x59b534,_0x520e3f),licenseStatus[_0x52b2b8(0x2aa)+'id']?licenseStatus[_0x52b2b8(0x1b9)+_0x52b2b8(0x223)+'ail']?logger[_0x52b2b8(0x228)]('Licen'+'se\x20va'+_0x52b2b8(0x1c8)+'ed\x20fo'+'r:\x20'+licenseStatus[_0x52b2b8(0x1b9)+'merEm'+_0x52b2b8(0x2bc)]):logger[_0x52b2b8(0x228)](_0x43172f[_0x52b2b8(0x1e9)]):(logger[_0x52b2b8(0x21b)](_0x52b2b8(0x202)+_0x52b2b8(0x23a)+'lidat'+_0x52b2b8(0x19c)+_0x52b2b8(0x1e6)+':\x20'+licenseStatus['error'+'Messa'+'ge']),logger[_0x52b2b8(0x228)](_0x43172f[_0x52b2b8(0x18f)]))),licenseStatus;})()),licenseInitPromise;}