sychev-lab-mcp-server 1.0.2

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.
package/README.md ADDED
@@ -0,0 +1,173 @@
1
+ # Sychev Lab MCP Server
2
+
3
+ [![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-blue)](https://lab.sychev.xyz/mcp)
4
+
5
+ Servidor MCP (Model Context Protocol) para Sychev Lab - proporciona acceso a productos, artículos, tutoriales y funciones de comercio electrónico.
6
+
7
+ ## 🤖 MCP Server — AI Integration
8
+
9
+ **Claude.ai / Web:**
10
+ Añade en Settings → Integrations: `https://lab.sychev.xyz/mcp`
11
+
12
+ **Claude Desktop / Cursor:**
13
+
14
+ ```json
15
+ {
16
+ "mcpServers": {
17
+ "sychev-lab": {
18
+ "command": "npx",
19
+ "args": ["-y", "sychev-lab-mcp-server"],
20
+ "env": {
21
+ "SYCHEV_LAB_URL": "https://lab.sychev.xyz"
22
+ }
23
+ }
24
+ }
25
+ }
26
+ ```
27
+
28
+ **Endpoints HTTP:**
29
+
30
+ - `POST/DELETE /mcp` — Streamable HTTP (estándar MCP 2025-06-18)
31
+ - `GET /sse` — SSE Legacy
32
+ - `POST /messages` — Mensajes SSE Legacy
33
+ - `GET /.well-known/mcp` — Descubrimiento automático
34
+
35
+ ## Características
36
+
37
+ - **Catálogo de Productos**: Listar, buscar y obtener detalles de productos STL para impresión 3D
38
+ - **Artículos**: Acceso a artículos técnicos y de blog
39
+ - **Tutoriales**: Tutoriales paso a paso con información de dificultad y duración
40
+ - **Categorías**: Navegación por categorías de productos
41
+ - **Usuarios**: Registro de nuevos usuarios
42
+ - **Checkout**: Creación de sesiones de pago con Stripe
43
+
44
+ ## Herramientas Disponibles
45
+
46
+ | Herramienta | Descripción |
47
+ | ----------------------------- | -------------------------------------------- |
48
+ | `list_products` | Lista todos los productos disponibles |
49
+ | `get_product_details` | Obtiene información detallada de un producto |
50
+ | `search_products_by_category` | Busca productos por categoría o término |
51
+ | `get_categories` | Obtiene todas las categorías disponibles |
52
+ | `list_articles` | Lista todos los artículos |
53
+ | `get_article` | Obtiene el contenido completo de un artículo |
54
+ | `list_tutorials` | Lista todos los tutoriales |
55
+ | `get_tutorial` | Obtiene el contenido completo de un tutorial |
56
+ | `register_user` | Registra un nuevo usuario |
57
+ | `create_stripe_checkout` | Crea una sesión de checkout de Stripe |
58
+
59
+ ## Instalación
60
+
61
+ ```bash
62
+ npm install
63
+ npm run build
64
+ ```
65
+
66
+ ## Uso
67
+
68
+ ### Modo stdio (para Claude Desktop)
69
+
70
+ ```bash
71
+ npm start
72
+ # o
73
+ node dist/index.js
74
+ ```
75
+
76
+ ### Modo HTTP (Streamable HTTP + SSE)
77
+
78
+ ```bash
79
+ npm run start:http
80
+ # o
81
+ PORT=3001 node dist/server-http.js
82
+ ```
83
+
84
+ Endpoints disponibles:
85
+
86
+ - `POST/DELETE /mcp` - Streamable HTTP (estandar MCP 2025-06-18)
87
+ - `GET /sse` - SSE Legacy
88
+ - `POST /messages` - Mensajes SSE Legacy
89
+ - `GET /health` - Health check
90
+ - `GET /.well-known/mcp` - Descubrimiento automatico
91
+
92
+ ### Modo HTTP Legacy
93
+
94
+ ```bash
95
+ npm run start:http:legacy
96
+ # o
97
+ node dist/index.js --http 3000
98
+ ```
99
+
100
+ ### Variables de Entorno
101
+
102
+ | Variable | Descripción | Default |
103
+ | ---------------- | ------------------------------- | ------------------------ |
104
+ | `SYCHEV_LAB_URL` | URL base de la API | `https://lab.sychev.xyz` |
105
+ | `MCP_API_KEY` | API key opcional para modo HTTP | - |
106
+
107
+ ## Configuración con Claude Desktop
108
+
109
+ Añade a tu configuración de Claude Desktop (`claude_desktop_config.json`):
110
+
111
+ ```json
112
+ {
113
+ "mcpServers": {
114
+ "sychev-lab": {
115
+ "command": "npx",
116
+ "args": ["-y", "sychev-lab-mcp-server"],
117
+ "env": {
118
+ "SYCHEV_LAB_URL": "https://lab.sychev.xyz"
119
+ }
120
+ }
121
+ }
122
+ }
123
+ ```
124
+
125
+ O instala globalmente:
126
+
127
+ ```bash
128
+ npm install -g sychev-lab-mcp-server
129
+ ```
130
+
131
+ ## Endpoints HTTP
132
+
133
+ Cuando se ejecuta en modo HTTP (`npm run start:http`):
134
+
135
+ - `POST /mcp` - Streamable HTTP (nuevo estandar MCP)
136
+ - `DELETE /mcp` - Cerrar sesion Streamable HTTP
137
+ - `GET /sse` - SSE Legacy (compatibilidad)
138
+ - `POST /messages` - Mensajes SSE Legacy
139
+ - `GET /health` - Health check
140
+ - `GET /.well-known/mcp` - Descubrimiento automatico
141
+
142
+ Headers:
143
+
144
+ ```
145
+ Content-Type: application/json
146
+ Mcp-Session-Id: <session-id>
147
+ ```
148
+
149
+ ## Scripts
150
+
151
+ | Script | Descripción |
152
+ | -------------------- | -------------------------- |
153
+ | `npm run build` | Compila TypeScript |
154
+ | `npm run dev` | Compila en modo watch |
155
+ | `npm start` | Inicia el servidor (stdio) |
156
+ | `npm run start:http` | Inicia el servidor HTTP |
157
+ | `npm run inspector` | Ejecuta el inspector MCP |
158
+ | `npm run lint` | Ejecuta ESLint |
159
+ | `npm run typecheck` | Verifica tipos sin emitir |
160
+
161
+ ## Estructura del Proyecto
162
+
163
+ ```
164
+ src/
165
+ ├── index.ts # Punto de entrada y servidor MCP
166
+ ├── tools.ts # Definiciones e implementaciones de herramientas
167
+ ├── client.ts # Cliente HTTP para la API de Sychev Lab
168
+ └── config.ts # Configuración del servidor
169
+ ```
170
+
171
+ ## Licencia
172
+
173
+ MIT
@@ -0,0 +1,111 @@
1
+ /**
2
+ * HTTP Client for Sychev Lab API
3
+ */
4
+ export interface Product {
5
+ id: string;
6
+ name: string;
7
+ description: string;
8
+ price: number;
9
+ currency: string;
10
+ images: string[];
11
+ category: string;
12
+ tags: string[];
13
+ slug?: string;
14
+ thumbnail?: string;
15
+ type?: string;
16
+ featured?: boolean;
17
+ }
18
+ export interface Article {
19
+ id: string;
20
+ title: string;
21
+ content: string;
22
+ author: string;
23
+ published_at: string;
24
+ tags: string[];
25
+ slug?: string;
26
+ description?: string;
27
+ thumbnail?: string;
28
+ type?: string;
29
+ featured?: boolean;
30
+ path?: string;
31
+ }
32
+ export interface Tutorial {
33
+ id: string;
34
+ title: string;
35
+ content: string;
36
+ author: string;
37
+ published_at: string;
38
+ tags: string[];
39
+ difficulty: string;
40
+ duration: string;
41
+ slug?: string;
42
+ description?: string;
43
+ thumbnail?: string;
44
+ type?: string;
45
+ featured?: boolean;
46
+ path?: string;
47
+ }
48
+ export interface Category {
49
+ id: string;
50
+ name: string;
51
+ slug: string;
52
+ description?: string;
53
+ parent?: string;
54
+ children?: Category[];
55
+ }
56
+ export interface CheckoutSession {
57
+ sessionId: string;
58
+ url: string;
59
+ }
60
+ export interface CheckoutItem {
61
+ id: string;
62
+ title: string;
63
+ price: number;
64
+ quantity?: number;
65
+ }
66
+ declare class ApiClient {
67
+ private baseUrl;
68
+ constructor(baseUrl: string);
69
+ private fetch;
70
+ private post;
71
+ getProducts(): Promise<Product[]>;
72
+ getProduct(id: string, lang?: string): Promise<Product>;
73
+ getArticles(): Promise<Article[]>;
74
+ getArticle(id: string, lang: string): Promise<Article>;
75
+ getTutorials(): Promise<Tutorial[]>;
76
+ getTutorial(id: string, lang: string): Promise<Tutorial>;
77
+ getCategories(): Promise<{
78
+ data: {
79
+ categories: Category[];
80
+ };
81
+ }>;
82
+ searchProductsByCategory(searchTerm: string, limit?: number): Promise<Product[]>;
83
+ createCheckout(items: CheckoutItem[], options?: {
84
+ guestEmail?: string;
85
+ locale?: string;
86
+ }): Promise<CheckoutSession>;
87
+ createCheckoutSecure(productId: string, quantity?: number, options?: {
88
+ guestEmail?: string;
89
+ guestName?: string;
90
+ locale?: string;
91
+ }): Promise<CheckoutSession & {
92
+ product: {
93
+ id: string;
94
+ name: string;
95
+ price: number;
96
+ currency: string;
97
+ type: string;
98
+ };
99
+ }>;
100
+ registerUser(email: string, password: string, displayName?: string): Promise<{
101
+ message: string;
102
+ user: {
103
+ uid: string;
104
+ email: string;
105
+ displayName?: string;
106
+ };
107
+ }>;
108
+ }
109
+ export declare const apiClient: ApiClient;
110
+ export {};
111
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,OAAO;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CA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ADDED
@@ -0,0 +1,143 @@
1
+ /**
2
+ * HTTP Client for Sychev Lab API
3
+ */
4
+ import { config } from './config.js';
5
+ class ApiClient {
6
+ baseUrl;
7
+ constructor(baseUrl) {
8
+ this.baseUrl = baseUrl.replace(/\/$/, '');
9
+ }
10
+ async fetch(endpoint) {
11
+ const url = `${this.baseUrl}${endpoint}`;
12
+ const response = await fetch(url);
13
+ if (!response.ok) {
14
+ throw new Error(`API error: ${response.status} ${response.statusText}`);
15
+ }
16
+ return response.json();
17
+ }
18
+ async post(endpoint, body) {
19
+ const url = `${this.baseUrl}${endpoint}`;
20
+ const response = await fetch(url, {
21
+ method: 'POST',
22
+ headers: {
23
+ 'Content-Type': 'application/json',
24
+ },
25
+ body: JSON.stringify(body),
26
+ });
27
+ if (!response.ok) {
28
+ const error = await response.json().catch(() => ({ message: 'Unknown error' }));
29
+ throw new Error(error.message || `API error: ${response.status}`);
30
+ }
31
+ return response.json();
32
+ }
33
+ // Products
34
+ async getProducts() {
35
+ return this.fetch('/api/lab/products/index.json');
36
+ }
37
+ async getProduct(id, lang = 'es') {
38
+ return this.fetch(`/api/lab/products/${id}.${lang}.json`);
39
+ }
40
+ // Articles
41
+ async getArticles() {
42
+ return this.fetch('/api/lab/index.articles.json');
43
+ }
44
+ async getArticle(id, lang) {
45
+ return this.fetch(`/api/lab/articles/${id}.${lang}.json`);
46
+ }
47
+ // Tutorials
48
+ async getTutorials() {
49
+ return this.fetch('/api/lab/index.tutorials.json');
50
+ }
51
+ async getTutorial(id, lang) {
52
+ return this.fetch(`/api/lab/tutorials/${id}.${lang}.json`);
53
+ }
54
+ // Categories
55
+ async getCategories() {
56
+ return this.fetch('/api/lab/categories.json');
57
+ }
58
+ // Search products by category (fuzzy search)
59
+ async searchProductsByCategory(searchTerm, limit = 20) {
60
+ const response = await this.getProducts();
61
+ // Handle case where API returns an object with products or data property
62
+ const products = Array.isArray(response) ? response :
63
+ (response && typeof response === 'object' && 'products' in response) ?
64
+ response.products :
65
+ (response && typeof response === 'object' && 'data' in response) ?
66
+ response.data : [];
67
+ const searchLower = searchTerm.toLowerCase();
68
+ const filtered = products.filter((p) => {
69
+ // Search in multiple fields (API uses 'title' instead of 'name')
70
+ const nameMatch = p.name?.toLowerCase().includes(searchLower) ||
71
+ p.title?.toLowerCase().includes(searchLower);
72
+ const descriptionMatch = p.description?.toLowerCase().includes(searchLower);
73
+ // category puede ser string, objeto o array - manejar todos los casos
74
+ let categoryValue = '';
75
+ if (typeof p.category === 'string') {
76
+ categoryValue = p.category;
77
+ }
78
+ else if (p.category && typeof p.category === 'object') {
79
+ // Es un objeto con propiedad name
80
+ categoryValue = p.category.name || '';
81
+ }
82
+ else if (Array.isArray(p.category)) {
83
+ categoryValue = p.category.join(' ');
84
+ }
85
+ const categoryMatch = categoryValue.toLowerCase().includes(searchLower);
86
+ const tagsMatch = p.tags?.some((tag) => tag.toLowerCase().includes(searchLower));
87
+ const slugMatch = p.slug?.toLowerCase().includes(searchLower);
88
+ return nameMatch || descriptionMatch || categoryMatch || tagsMatch || slugMatch;
89
+ });
90
+ // Sort by relevance (exact matches first, then partial matches)
91
+ const sorted = filtered.sort((a, b) => {
92
+ const aName = (a.name || a.title || '').toLowerCase();
93
+ const bName = (b.name || b.title || '').toLowerCase();
94
+ const aExact = aName === searchLower;
95
+ const bExact = bName === searchLower;
96
+ if (aExact && !bExact)
97
+ return -1;
98
+ if (!aExact && bExact)
99
+ return 1;
100
+ // Then prioritize name starts with search term
101
+ const aStarts = aName.startsWith(searchLower);
102
+ const bStarts = bName.startsWith(searchLower);
103
+ if (aStarts && !bStarts)
104
+ return -1;
105
+ if (!aStarts && bStarts)
106
+ return 1;
107
+ return 0;
108
+ });
109
+ return sorted.slice(0, limit);
110
+ }
111
+ // Checkout (legacy - mantenido para compatibilidad)
112
+ async createCheckout(items, options) {
113
+ return this.post('/api/stripe/checkout', {
114
+ items,
115
+ guestEmail: options?.guestEmail,
116
+ locale: options?.locale || 'es',
117
+ successUrl: `${this.baseUrl}/checkout/success`,
118
+ cancelUrl: `${this.baseUrl}/checkout/cancel`,
119
+ });
120
+ }
121
+ // Checkout seguro - solo recibe productId, obtiene datos desde Firestore
122
+ async createCheckoutSecure(productId, quantity = 1, options) {
123
+ return this.post('/api/stripe/checkout-secure', {
124
+ productId,
125
+ quantity,
126
+ guestEmail: options?.guestEmail,
127
+ guestName: options?.guestName,
128
+ locale: options?.locale || 'es',
129
+ successUrl: `${this.baseUrl}/checkout/success`,
130
+ cancelUrl: `${this.baseUrl}/checkout/cancel`,
131
+ });
132
+ }
133
+ // User Registration
134
+ async registerUser(email, password, displayName) {
135
+ return this.post('/api/register', {
136
+ email,
137
+ password,
138
+ displayName,
139
+ });
140
+ }
141
+ }
142
+ export const apiClient = new ApiClient(config.baseUrl);
143
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAsErC,MAAM,SAAS;IACH,OAAO,CAAS;IAExB,YAAY,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC;IAEO,KAAK,CAAC,KAAK,CAAI,QAAgB;QACnC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,QAAQ,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAElC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,cAAc,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;QAC5E,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,EAAgB,CAAC;IACzC,CAAC;IAEO,KAAK,CAAC,IAAI,CAAI,QAAgB,EAAE,IA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;YAC7B,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,IAAI;YAC/B,UAAU,EAAE,GAAG,IAAI,CAAC,OAAO,mBAAmB;YAC9C,SAAS,EAAE,GAAG,IAAI,CAAC,OAAO,kBAAkB;SAC/C,CAAC,CAAC;IACP,CAAC;IAED,oBAAoB;IACpB,KAAK,CAAC,YAAY,CACd,KAAa,EACb,QAAgB,EAChB,WAAoB;QAEpB,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YAC9B,KAAK;YACL,QAAQ;YACR,WAAW;SACd,CAAC,CAAC;IACP,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Configuration for Sychev Lab MCP Server
3
+ */
4
+ export interface ServerConfig {
5
+ baseUrl: string;
6
+ name: string;
7
+ version: string;
8
+ }
9
+ export declare const config: ServerConfig;
10
+ export declare function validateConfig(): void;
11
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB;AAGD,eAAO,MAAM,MAAM,EAAE,YAIpB,CAAC;AAGF,wBAAgB,cAAc,IAAI,IAAI,CAUrC"}
package/dist/config.js ADDED
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Configuration for Sychev Lab MCP Server
3
+ */
4
+ // Load from environment or use defaults
5
+ export const config = {
6
+ baseUrl: process.env.SYCHEV_LAB_URL || 'https://lab.sychev.xyz',
7
+ name: 'sychev-lab-mcp',
8
+ version: '1.0.0',
9
+ };
10
+ // Validate configuration
11
+ export function validateConfig() {
12
+ if (!config.baseUrl) {
13
+ throw new Error('SYCHEV_LAB_URL environment variable is required');
14
+ }
15
+ try {
16
+ new URL(config.baseUrl);
17
+ }
18
+ catch {
19
+ throw new Error(`Invalid base URL: ${config.baseUrl}`);
20
+ }
21
+ }
22
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,wCAAwC;AACxC,MAAM,CAAC,MAAM,MAAM,GAAiB;IAChC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,wBAAwB;IAC/D,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,OAAO;CACnB,CAAC;AAEF,yBAAyB;AACzB,MAAM,UAAU,cAAc;IAC1B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,CAAC;QACD,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACL,MAAM,IAAI,KAAK,CAAC,qBAAqB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;AACL,CAAC"}
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Sychev Lab MCP Server
4
+ *
5
+ * Supports both stdio (for Claude Desktop) and HTTP (for remote clients) transports
6
+ *
7
+ * Usage:
8
+ * node dist/index.js # Run with stdio transport (default)
9
+ * node dist/index.js --http # Run with HTTP transport
10
+ * node dist/index.js --http 3000 # Run HTTP on port 3000
11
+ */
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG"}