(message2)
| 1289 | } |
| 1290 | function createHandlers(scheduler2) { |
| 1291 | function remoteUpdates(message2) { |
| 1292 | if (!message2 || !message2.event || !message2.event.id) { |
| 1293 | console.error("Invalid message format:", message2); |
| 1294 | return; |
| 1295 | } |
| 1296 | const { type, event: event2 } = message2; |
| 1297 | if (scheduler2._dp && scheduler2._dp._in_progress[event2.id]) { |
| 1298 | return; |
| 1299 | } |
| 1300 | if (type === "add-event" && scheduler2._dp) { |
| 1301 | for (const id in scheduler2._dp._in_progress) { |
| 1302 | if (scheduler2._dp.getState(id) === "inserted") { |
| 1303 | scheduler2._dp.attachEvent("onFullSync", function() { |
| 1304 | if (!scheduler2.getEvent(event2.id)) { |
| 1305 | processUpdate(type, event2); |
| 1306 | } |
| 1307 | }, { once: true }); |
| 1308 | return; |
| 1309 | } |
| 1310 | } |
| 1311 | } |
| 1312 | processUpdate(type, event2); |
| 1313 | } |
| 1314 | function processUpdate(type, event2) { |
| 1315 | switch (type) { |
| 1316 | case "add-event": |
nothing calls this directly
no test coverage detected