| 9410 | } |
| 9411 | dhtmlxHook(); |
| 9412 | class SchedulerFactory { |
| 9413 | constructor(extensions) { |
| 9414 | this._seed = 0; |
| 9415 | this._schedulerPlugins = []; |
| 9416 | this._bundledExtensions = extensions; |
| 9417 | this._extensionsManager = new ExtensionsManager(extensions); |
| 9418 | } |
| 9419 | plugin(code) { |
| 9420 | this._schedulerPlugins.push(code); |
| 9421 | if (global$1.scheduler) { |
| 9422 | code(global$1.scheduler); |
| 9423 | } |
| 9424 | } |
| 9425 | getSchedulerInstance(initConfig) { |
| 9426 | var scheduler2 = factoryMethod(this._extensionsManager); |
| 9427 | for (var i = 0; i < this._schedulerPlugins.length; i++) { |
| 9428 | this._schedulerPlugins[i](scheduler2); |
| 9429 | } |
| 9430 | scheduler2._internal_id = this._seed++; |
| 9431 | if (this.$syncFactory) { |
| 9432 | this.$syncFactory(scheduler2); |
| 9433 | } |
| 9434 | if (initConfig) { |
| 9435 | this._initFromConfig(scheduler2, initConfig); |
| 9436 | } |
| 9437 | return scheduler2; |
| 9438 | } |
| 9439 | _initFromConfig(scheduler2, initConfig) { |
| 9440 | if (initConfig.plugins) { |
| 9441 | scheduler2.plugins(initConfig.plugins); |
| 9442 | } |
| 9443 | if (initConfig.config) { |
| 9444 | scheduler2.mixin(scheduler2.config, initConfig.config, true); |
| 9445 | } |
| 9446 | if (initConfig.templates) { |
| 9447 | scheduler2.attachEvent("onTemplatesReady", function() { |
| 9448 | scheduler2.mixin(scheduler2.templates, initConfig.templates, true); |
| 9449 | }, { once: true }); |
| 9450 | } |
| 9451 | if (initConfig.events) { |
| 9452 | for (const event2 in initConfig.events) { |
| 9453 | scheduler2.attachEvent(event2, initConfig.events[event2]); |
| 9454 | } |
| 9455 | } |
| 9456 | if (initConfig.locale) { |
| 9457 | scheduler2.i18n.setLocale(initConfig.locale); |
| 9458 | } |
| 9459 | if (Array.isArray(initConfig.calendars)) { |
| 9460 | initConfig.calendars.forEach(function(calendar) { |
| 9461 | scheduler2.addCalendar(calendar); |
| 9462 | }); |
| 9463 | } |
| 9464 | if (initConfig.container) { |
| 9465 | scheduler2.init(initConfig.container); |
| 9466 | } else { |
| 9467 | scheduler2.init(); |
| 9468 | } |
| 9469 | if (initConfig.data) { |
nothing calls this directly
no outgoing calls
no test coverage detected