{"version":3,"sources":["jsdelivr-header.js","/npm/enhanced-word-mcp-server@2.7.13/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACCA,MAAM,MAAE,MAAK,SAAE,UAAa,QAAQ,iBAC9B,KAAO,QAAQ,QAMrB,SAAS,oBAEP,MAAM,EAAc,CAClB,QAAQ,IAAI,YACZ,QAAQ,IAAI,qBACZ,UACA,SACA,mBACA,0BACA,OAAO,SAET,IAAK,MAAM,KAAc,EACvB,IAME,OAJA,SAAS,GAAG,wCAAkD,CAC5D,MAAO,OACP,QAAS,MAEJ,CACT,CAAE,MAAO,GACP,QACF,CAGF,MAAM,IAAI,MAAM,gFAClB,CAOA,SAAS,YAAY,EAAU,CAAC,GAC9B,MAAM,EAAa,UAEnB,IACE,MAAM,EAAmB,oBAQzB,OANe,MAAM,EAAkB,CAAC,KAAM,6BAA8B,CAC1E,IAAK,EACL,MAAO,EAAQ,OAAS,UACxB,IAAK,IAAK,QAAQ,OAAQ,EAAQ,MAItC,CAAE,MAAO,GAIP,MAHA,QAAQ,MAAM,eAAgB,EAAI,SAClC,QAAQ,MAAM,kDACd,QAAQ,MAAM,2CACR,CACR,CACF,CAOA,GALA,OAAO,QAAU,CACf,yBAIE,QAAQ,OAAS,OACnB,IACE,MAAM,EAAS,cAEf,EAAO,GAAG,SAAU,IAClB,QAAQ,KAAK,EAAK,IAGpB,EAAO,GAAG,SAAU,IAClB,QAAQ,MAAM,4CAA6C,EAAI,SAC/D,QAAQ,MAAM,iEACd,QAAQ,KAAK,EAAE,GAEnB,CAAE,MAAO,GACP,QAAQ,MAAM,0BAA2B,EAAI,SAC7C,QAAQ,KAAK,EACf","file":"/npm/enhanced-word-mcp-server@2.7.13/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/enhanced-word-mcp-server@2.7.13/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * Enhanced Word MCP Server - Node.js Entry Point\n * \n * This is a Node.js wrapper for the Python-based Enhanced Word MCP Server.\n * The actual server logic is implemented in Python using the word_document_server module.\n */\n\nconst { spawn, execSync } = require('child_process');\nconst path = require('path');\n\n/**\n * Find the correct Python executable with mcp module\n * @returns {string} Path to Python executable\n */\nfunction findPythonWithMCP() {\n  // Try environment variable first, then common paths\n  const pythonPaths = [\n    process.env.PYTHON_PATH,\n    process.env.ENHANCED_WORD_PYTHON,\n    'python3',\n    'python',\n    '/usr/bin/python3',\n    '/usr/local/bin/python3'\n  ].filter(Boolean); // Remove undefined values\n  \n  for (const pythonPath of pythonPaths) {\n    try {\n      // Check if this Python has the mcp module\n      execSync(`${pythonPath} -c \"import mcp; print('MCP found')\"`, { \n        stdio: 'pipe', \n        timeout: 5000 \n      });\n      return pythonPath;\n    } catch (err) {\n      continue;\n    }\n  }\n  \n  throw new Error('No Python installation found with MCP module. Please install: pip install mcp');\n}\n\n/**\n * Start the Enhanced Word MCP Server\n * @param {Object} options - Configuration options\n * @returns {ChildProcess} The spawned Python process\n */\nfunction startServer(options = {}) {\n  const packageDir = __dirname;\n  \n  try {\n    const pythonExecutable = findPythonWithMCP();\n    \n    const python = spawn(pythonExecutable, ['-m', 'word_document_server.main'], {\n      cwd: packageDir,\n      stdio: options.stdio || 'inherit',\n      env: { ...process.env, ...options.env }\n    });\n\n    return python;\n  } catch (err) {\n    console.error('Setup Error:', err.message);\n    console.error('Please install the MCP module: pip install mcp');\n    console.error('Or ensure Python 3.11+ is in your PATH.');\n    throw err;\n  }\n}\n\nmodule.exports = {\n  startServer\n};\n\n// If this file is run directly, start the server\nif (require.main === module) {\n  try {\n    const server = startServer();\n    \n    server.on('close', (code) => {\n      process.exit(code);\n    });\n    \n    server.on('error', (err) => {\n      console.error('Failed to start Enhanced Word MCP Server:', err.message);\n      console.error('Make sure Python 3.11+ is installed and requirements are met.');\n      process.exit(1);\n    });\n  } catch (err) {\n    console.error('Failed to start server:', err.message);\n    process.exit(1);\n  }\n}\n"]}