'use strict';const a23_0x2c3b27=a23_0x1898;(function(_0x42f03c,_0x128d67){const _0x6800e1=a23_0x1898,_0x4599c2=_0x42f03c();while(!![]){try{const _0x336159=-parseInt(_0x6800e1(0xd5))/0x1*(-parseInt(_0x6800e1(0xc7))/0x2)+parseInt(_0x6800e1(0xce))/0x3+-parseInt(_0x6800e1(0xcb))/0x4*(-parseInt(_0x6800e1(0xcd))/0x5)+parseInt(_0x6800e1(0xbe))/0x6*(-parseInt(_0x6800e1(0xc8))/0x7)+-parseInt(_0x6800e1(0xd4))/0x8*(parseInt(_0x6800e1(0xc1))/0x9)+-parseInt(_0x6800e1(0xc5))/0xa+-parseInt(_0x6800e1(0xd9))/0xb;if(_0x336159===_0x128d67)break;else _0x4599c2['push'](_0x4599c2['shift']());}catch(_0x2bced4){_0x4599c2['push'](_0x4599c2['shift']());}}}(a23_0x2cd3,0x1c5a3));function a23_0x1898(_0x2384b0,_0x49295c){_0x2384b0=_0x2384b0-0xbb;const _0x2cd363=a23_0x2cd3();let _0x189824=_0x2cd363[_0x2384b0];return _0x189824;}var __importDefault=this&&this['__importDefault']||function(_0x5438cd){const _0x5a0079=a23_0x1898;return _0x5438cd&&_0x5438cd[_0x5a0079(0xbb)]?_0x5438cd:{'default':_0x5438cd};};Object[a23_0x2c3b27(0xc9)](exports,a23_0x2c3b27(0xbb),{'value':!![]}),exports[a23_0x2c3b27(0xd8)]=loadConfig,exports[a23_0x2c3b27(0xcc)]=saveConfig,exports['getConfig']=getConfig;const node_fs_1=__importDefault(require(a23_0x2c3b27(0xd0))),node_path_1=__importDefault(require(a23_0x2c3b27(0xca))),node_os_1=__importDefault(require(a23_0x2c3b27(0xc4))),CONFIG_DIR=node_path_1[a23_0x2c3b27(0xda)][a23_0x2c3b27(0xd1)](node_os_1['default'][a23_0x2c3b27(0xd3)](),a23_0x2c3b27(0xcf)),CONFIG_FILE=node_path_1[a23_0x2c3b27(0xda)][a23_0x2c3b27(0xd1)](CONFIG_DIR,'serve-config.json'),SIGNAL_SERVER=a23_0x2c3b27(0xc6),RECONNECT_BASE_MS=0x7d0,RECONNECT_MAX_MS=0x7530,DEFAULT_CONFIG={'nodeId':'','pairingCode':'','model':a23_0x2c3b27(0xbf),'maxConnections':0x3,'contextWindow':0x3e80,'allowMultiple':!![],'signalServer':SIGNAL_SERVER,'reconnectBaseMs':RECONNECT_BASE_MS,'reconnectMaxMs':RECONNECT_MAX_MS};function ensureConfigDir(){const _0x830d56=a23_0x2c3b27;!node_fs_1['default'][_0x830d56(0xc2)](CONFIG_DIR)&&node_fs_1[_0x830d56(0xda)][_0x830d56(0xd2)](CONFIG_DIR,{'recursive':!![]});}function loadConfig(){const _0x3f394b=a23_0x2c3b27;try{if(node_fs_1[_0x3f394b(0xda)][_0x3f394b(0xc2)](CONFIG_FILE)){const _0x435de6=node_fs_1[_0x3f394b(0xda)][_0x3f394b(0xbc)](CONFIG_FILE,_0x3f394b(0xc3));return{...DEFAULT_CONFIG,...JSON[_0x3f394b(0xd7)](_0x435de6)};}}catch(_0x35d4e3){console[_0x3f394b(0xbd)](_0x3f394b(0xd6),_0x35d4e3);}return null;}function a23_0x2cd3(){const _0x3dfca2=['defineProperty','node:path','8bsPQOK','saveConfig','55745GasPlS','647613pSqpsX','.clawdaddy','node:fs','join','mkdirSync','homedir','7448HjCniw','74891FfOHif','Failed\x20to\x20load\x20config:','parse','loadConfig','18557WChMfp','default','__esModule','readFileSync','error','319092mUWLkJ','llama3.2','stringify','819cjHNxh','existsSync','utf-8','node:os','1322300qlVEEF','http://clawdaddyswitch01.goodenoughcafe.com:3003','4rruOnr','7BWWXVU'];a23_0x2cd3=function(){return _0x3dfca2;};return a23_0x2cd3();}function saveConfig(_0x254e1d){const _0x4aff2c=a23_0x2c3b27;try{ensureConfigDir(),node_fs_1[_0x4aff2c(0xda)]['writeFileSync'](CONFIG_FILE,JSON[_0x4aff2c(0xc0)](_0x254e1d,null,0x2));}catch(_0xe572ec){console[_0x4aff2c(0xbd)]('Failed\x20to\x20save\x20config:',_0xe572ec);}}function getConfig(){const _0x5557d3=loadConfig();if(!_0x5557d3)return ensureConfigDir(),saveConfig(DEFAULT_CONFIG),DEFAULT_CONFIG;return{...DEFAULT_CONFIG,..._0x5557d3};}