define(["exports","./serversync.js"],function(_exports,_serversync){function MultiServerSync(){}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,MultiServerSync.prototype.sync=function(connectionManager,options){console.log("MultiServerSync.sync starting...");var servers=connectionManager.getSavedServers();return function syncNext(connectionManager,servers,index,options){var server;return servers.length<=index?(console.log("MultiServerSync.sync complete"),Promise.resolve()):(server=servers[index],console.log("Creating ServerSync to server: "+server.Id),(new _serversync.default).sync(connectionManager,server,options).then(function(){return console.log("ServerSync succeeded to server: "+server.Id),syncNext(connectionManager,servers,index+1,options)},function(err){return console.log("ServerSync failed to server: "+server.Id+". "+err),syncNext(connectionManager,servers,index+1,options)}))}(connectionManager,servers,0,options)},_exports.default=MultiServerSync});