eligius 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,10 @@ var Mousetrap__default = /*#__PURE__*/_interopDefaultLegacy(Mousetrap);
16
16
 
17
17
  function deepCopy(original) {
18
18
  if (tsIsPresent.isDefined(original)) {
19
+ if (typeof structuredClone !== 'undefined') {
20
+ return structuredClone(original);
21
+ }
22
+
19
23
  return JSON.parse(JSON.stringify(original));
20
24
  }
21
25
 
@@ -82,16 +86,16 @@ var Action = /*#__PURE__*/function () {
82
86
  var operationInfo = operations[idx];
83
87
  var copy = operationInfo.operationData ? deepCopy(operationInfo.operationData) : {};
84
88
  var mergedOperationData = Object.assign(previousOperationData, copy);
85
- var result = operationInfo.instance.call(context, mergedOperationData);
89
+ var operationResult = operationInfo.instance.call(context, mergedOperationData);
86
90
 
87
- if (isPromise(result)) {
88
- result.then(function (resultOperationData) {
91
+ if (isPromise(operationResult)) {
92
+ operationResult.then(function (resultOperationData) {
89
93
  _this2.executeOperation(operations, ++idx, resolve, reject, resultOperationData, context);
90
94
  })["catch"](function (error) {
91
95
  reject(error);
92
96
  });
93
97
  } else {
94
- this.executeOperation(operations, ++idx, resolve, reject, result, context);
98
+ this.executeOperation(operations, ++idx, resolve, reject, operationResult, context);
95
99
  }
96
100
  } else {
97
101
  resolve(previousOperationData);
@@ -101,6 +105,351 @@ var Action = /*#__PURE__*/function () {
101
105
  return Action;
102
106
  }();
103
107
 
108
+ function _regeneratorRuntime() {
109
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
110
+
111
+ _regeneratorRuntime = function () {
112
+ return exports;
113
+ };
114
+
115
+ var exports = {},
116
+ Op = Object.prototype,
117
+ hasOwn = Op.hasOwnProperty,
118
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
119
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
120
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
121
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
122
+
123
+ function define(obj, key, value) {
124
+ return Object.defineProperty(obj, key, {
125
+ value: value,
126
+ enumerable: !0,
127
+ configurable: !0,
128
+ writable: !0
129
+ }), obj[key];
130
+ }
131
+
132
+ try {
133
+ define({}, "");
134
+ } catch (err) {
135
+ define = function (obj, key, value) {
136
+ return obj[key] = value;
137
+ };
138
+ }
139
+
140
+ function wrap(innerFn, outerFn, self, tryLocsList) {
141
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
142
+ generator = Object.create(protoGenerator.prototype),
143
+ context = new Context(tryLocsList || []);
144
+ return generator._invoke = function (innerFn, self, context) {
145
+ var state = "suspendedStart";
146
+ return function (method, arg) {
147
+ if ("executing" === state) throw new Error("Generator is already running");
148
+
149
+ if ("completed" === state) {
150
+ if ("throw" === method) throw arg;
151
+ return doneResult();
152
+ }
153
+
154
+ for (context.method = method, context.arg = arg;;) {
155
+ var delegate = context.delegate;
156
+
157
+ if (delegate) {
158
+ var delegateResult = maybeInvokeDelegate(delegate, context);
159
+
160
+ if (delegateResult) {
161
+ if (delegateResult === ContinueSentinel) continue;
162
+ return delegateResult;
163
+ }
164
+ }
165
+
166
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
167
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
168
+ context.dispatchException(context.arg);
169
+ } else "return" === context.method && context.abrupt("return", context.arg);
170
+ state = "executing";
171
+ var record = tryCatch(innerFn, self, context);
172
+
173
+ if ("normal" === record.type) {
174
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
175
+ return {
176
+ value: record.arg,
177
+ done: context.done
178
+ };
179
+ }
180
+
181
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
182
+ }
183
+ };
184
+ }(innerFn, self, context), generator;
185
+ }
186
+
187
+ function tryCatch(fn, obj, arg) {
188
+ try {
189
+ return {
190
+ type: "normal",
191
+ arg: fn.call(obj, arg)
192
+ };
193
+ } catch (err) {
194
+ return {
195
+ type: "throw",
196
+ arg: err
197
+ };
198
+ }
199
+ }
200
+
201
+ exports.wrap = wrap;
202
+ var ContinueSentinel = {};
203
+
204
+ function Generator() {}
205
+
206
+ function GeneratorFunction() {}
207
+
208
+ function GeneratorFunctionPrototype() {}
209
+
210
+ var IteratorPrototype = {};
211
+ define(IteratorPrototype, iteratorSymbol, function () {
212
+ return this;
213
+ });
214
+ var getProto = Object.getPrototypeOf,
215
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
216
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
217
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
218
+
219
+ function defineIteratorMethods(prototype) {
220
+ ["next", "throw", "return"].forEach(function (method) {
221
+ define(prototype, method, function (arg) {
222
+ return this._invoke(method, arg);
223
+ });
224
+ });
225
+ }
226
+
227
+ function AsyncIterator(generator, PromiseImpl) {
228
+ function invoke(method, arg, resolve, reject) {
229
+ var record = tryCatch(generator[method], generator, arg);
230
+
231
+ if ("throw" !== record.type) {
232
+ var result = record.arg,
233
+ value = result.value;
234
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
235
+ invoke("next", value, resolve, reject);
236
+ }, function (err) {
237
+ invoke("throw", err, resolve, reject);
238
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
239
+ result.value = unwrapped, resolve(result);
240
+ }, function (error) {
241
+ return invoke("throw", error, resolve, reject);
242
+ });
243
+ }
244
+
245
+ reject(record.arg);
246
+ }
247
+
248
+ var previousPromise;
249
+
250
+ this._invoke = function (method, arg) {
251
+ function callInvokeWithMethodAndArg() {
252
+ return new PromiseImpl(function (resolve, reject) {
253
+ invoke(method, arg, resolve, reject);
254
+ });
255
+ }
256
+
257
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
258
+ };
259
+ }
260
+
261
+ function maybeInvokeDelegate(delegate, context) {
262
+ var method = delegate.iterator[context.method];
263
+
264
+ if (undefined === method) {
265
+ if (context.delegate = null, "throw" === context.method) {
266
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
267
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
268
+ }
269
+
270
+ return ContinueSentinel;
271
+ }
272
+
273
+ var record = tryCatch(method, delegate.iterator, context.arg);
274
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
275
+ var info = record.arg;
276
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
277
+ }
278
+
279
+ function pushTryEntry(locs) {
280
+ var entry = {
281
+ tryLoc: locs[0]
282
+ };
283
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
284
+ }
285
+
286
+ function resetTryEntry(entry) {
287
+ var record = entry.completion || {};
288
+ record.type = "normal", delete record.arg, entry.completion = record;
289
+ }
290
+
291
+ function Context(tryLocsList) {
292
+ this.tryEntries = [{
293
+ tryLoc: "root"
294
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
295
+ }
296
+
297
+ function values(iterable) {
298
+ if (iterable) {
299
+ var iteratorMethod = iterable[iteratorSymbol];
300
+ if (iteratorMethod) return iteratorMethod.call(iterable);
301
+ if ("function" == typeof iterable.next) return iterable;
302
+
303
+ if (!isNaN(iterable.length)) {
304
+ var i = -1,
305
+ next = function next() {
306
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
307
+
308
+ return next.value = undefined, next.done = !0, next;
309
+ };
310
+
311
+ return next.next = next;
312
+ }
313
+ }
314
+
315
+ return {
316
+ next: doneResult
317
+ };
318
+ }
319
+
320
+ function doneResult() {
321
+ return {
322
+ value: undefined,
323
+ done: !0
324
+ };
325
+ }
326
+
327
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
328
+ var ctor = "function" == typeof genFun && genFun.constructor;
329
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
330
+ }, exports.mark = function (genFun) {
331
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
332
+ }, exports.awrap = function (arg) {
333
+ return {
334
+ __await: arg
335
+ };
336
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
337
+ return this;
338
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
339
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
340
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
341
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
342
+ return result.done ? result.value : iter.next();
343
+ });
344
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
345
+ return this;
346
+ }), define(Gp, "toString", function () {
347
+ return "[object Generator]";
348
+ }), exports.keys = function (object) {
349
+ var keys = [];
350
+
351
+ for (var key in object) keys.push(key);
352
+
353
+ return keys.reverse(), function next() {
354
+ for (; keys.length;) {
355
+ var key = keys.pop();
356
+ if (key in object) return next.value = key, next.done = !1, next;
357
+ }
358
+
359
+ return next.done = !0, next;
360
+ };
361
+ }, exports.values = values, Context.prototype = {
362
+ constructor: Context,
363
+ reset: function (skipTempReset) {
364
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
365
+ },
366
+ stop: function () {
367
+ this.done = !0;
368
+ var rootRecord = this.tryEntries[0].completion;
369
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
370
+ return this.rval;
371
+ },
372
+ dispatchException: function (exception) {
373
+ if (this.done) throw exception;
374
+ var context = this;
375
+
376
+ function handle(loc, caught) {
377
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
378
+ }
379
+
380
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
381
+ var entry = this.tryEntries[i],
382
+ record = entry.completion;
383
+ if ("root" === entry.tryLoc) return handle("end");
384
+
385
+ if (entry.tryLoc <= this.prev) {
386
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
387
+ hasFinally = hasOwn.call(entry, "finallyLoc");
388
+
389
+ if (hasCatch && hasFinally) {
390
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
391
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
392
+ } else if (hasCatch) {
393
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
394
+ } else {
395
+ if (!hasFinally) throw new Error("try statement without catch or finally");
396
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
397
+ }
398
+ }
399
+ }
400
+ },
401
+ abrupt: function (type, arg) {
402
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
403
+ var entry = this.tryEntries[i];
404
+
405
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
406
+ var finallyEntry = entry;
407
+ break;
408
+ }
409
+ }
410
+
411
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
412
+ var record = finallyEntry ? finallyEntry.completion : {};
413
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
414
+ },
415
+ complete: function (record, afterLoc) {
416
+ if ("throw" === record.type) throw record.arg;
417
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
418
+ },
419
+ finish: function (finallyLoc) {
420
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
421
+ var entry = this.tryEntries[i];
422
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
423
+ }
424
+ },
425
+ catch: function (tryLoc) {
426
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
427
+ var entry = this.tryEntries[i];
428
+
429
+ if (entry.tryLoc === tryLoc) {
430
+ var record = entry.completion;
431
+
432
+ if ("throw" === record.type) {
433
+ var thrown = record.arg;
434
+ resetTryEntry(entry);
435
+ }
436
+
437
+ return thrown;
438
+ }
439
+ }
440
+
441
+ throw new Error("illegal catch attempt");
442
+ },
443
+ delegateYield: function (iterable, resultName, nextLoc) {
444
+ return this.delegate = {
445
+ iterator: values(iterable),
446
+ resultName: resultName,
447
+ nextLoc: nextLoc
448
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
449
+ }
450
+ }, exports;
451
+ }
452
+
104
453
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
105
454
  try {
106
455
  var info = gen[key](arg);
@@ -138,7 +487,7 @@ function _asyncToGenerator(fn) {
138
487
  }
139
488
 
140
489
  function _extends() {
141
- _extends = Object.assign || function (target) {
490
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
142
491
  for (var i = 1; i < arguments.length; i++) {
143
492
  var source = arguments[i];
144
493
 
@@ -151,7 +500,6 @@ function _extends() {
151
500
 
152
501
  return target;
153
502
  };
154
-
155
503
  return _extends.apply(this, arguments);
156
504
  }
157
505
 
@@ -163,11 +511,10 @@ function _inheritsLoose(subClass, superClass) {
163
511
  }
164
512
 
165
513
  function _setPrototypeOf(o, p) {
166
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
514
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
167
515
  o.__proto__ = p;
168
516
  return o;
169
517
  };
170
-
171
518
  return _setPrototypeOf(o, p);
172
519
  }
173
520
 
@@ -261,943 +608,184 @@ function getNestedValue(properties, sourceObject) {
261
608
 
262
609
  if (parts.length > 1) {
263
610
  prop = parts[0];
264
- suffix = parts[1];
265
- }
266
- }
267
-
268
- currentInstance = currentInstance[prop];
269
- });
270
- return suffix ? currentInstance + suffix : currentInstance;
271
- }
272
-
273
- function getNestedPropertyValue(propertyChain, sourceObject) {
274
- var properties = propertyChain.split('.');
275
- return getNestedValue(properties, sourceObject);
276
- }
277
-
278
- var ConfigurationResolver = /*#__PURE__*/function () {
279
- function ConfigurationResolver(importer, eventbus) {
280
- this.importer = void 0;
281
- this.eventbus = void 0;
282
- this.importer = importer;
283
- this.eventbus = eventbus;
284
- }
285
-
286
- var _proto = ConfigurationResolver.prototype;
287
-
288
- _proto.process = function process(configuration, actionRegistryListener) {
289
- resolvePlaceholders(configuration, configuration, this.importer);
290
-
291
- if (!tsIsPresent.isDefined(configuration.timelineProviderSettings)) {
292
- throw new Error('Configuration incomplete: it needs to have at least one timeline provider setting');
293
- }
294
-
295
- var resolvedConfig = {
296
- id: configuration.id,
297
- engine: _extends({}, configuration.engine),
298
- timelineProviderSettings: deepCopy(configuration.timelineProviderSettings),
299
- containerSelector: configuration.containerSelector,
300
- language: configuration.language,
301
- layoutTemplate: configuration.layoutTemplate,
302
- availableLanguages: deepCopy(configuration.availableLanguages),
303
- actions: resolveActions(configuration.actions, this.importer, this.eventbus),
304
- initActions: resolveActions(configuration.initActions, this.importer, this.eventbus),
305
- labels: deepCopy(configuration.labels),
306
- timelineFlow: deepCopy(configuration.timelineFlow),
307
- timelines: resolveTimelines(configuration.timelines, this.importer, this.eventbus)
308
- };
309
- var eventActions = [];
310
-
311
- if (configuration.eventActions && actionRegistryListener) {
312
- eventActions = resolveEventActions(configuration.eventActions, actionRegistryListener, this.importer, this.eventbus);
313
- }
314
-
315
- var actionsLookup = resolvedConfig.actions.concat(eventActions).reduce(function (aggr, action) {
316
- var _extends2;
317
-
318
- return _extends({}, aggr, (_extends2 = {}, _extends2[action.name] = action, _extends2));
319
- }, {});
320
- return [actionsLookup, resolvedConfig];
321
- };
322
-
323
- return ConfigurationResolver;
324
- }();
325
-
326
- function resolveEventActions(eventActionConfigurations, actionRegistryListener, importer, eventbus) {
327
- var resolvedConfigs = eventActionConfigurations.map(function (config) {
328
- return resolveActionConfiguration(config, importer);
329
- });
330
- return resolvedConfigs.map(function (config, index) {
331
- var _eventActionConfigura = eventActionConfigurations[index],
332
- eventName = _eventActionConfigura.eventName,
333
- eventTopic = _eventActionConfigura.eventTopic;
334
- var eventAction = new Action(config.name, config.startOperations, eventbus);
335
- actionRegistryListener.registerAction(eventAction, eventName, eventTopic);
336
- return eventAction;
337
- });
338
- }
339
-
340
- function resolveTimelines(timelines, importer, eventbus) {
341
- var resolve = resolveTimelineAction.bind(null, importer, eventbus);
342
- return timelines.map(function (config) {
343
- return _extends({}, config, {
344
- timelineActions: config.timelineActions.map(resolve)
345
- });
346
- });
347
- }
348
-
349
- function resolveOperation(importer, operationConfig) {
350
- return {
351
- id: operationConfig.id,
352
- systemName: operationConfig.systemName,
353
- operationData: deepCopy(operationConfig.operationData),
354
- instance: importer["import"](operationConfig.systemName)[operationConfig.systemName]
355
- };
356
- }
357
-
358
- function resolveActionConfiguration(config, importer) {
359
- var resolve = resolveOperation.bind(null, importer);
360
- return {
361
- id: config.id,
362
- name: config.name,
363
- startOperations: config.startOperations.map(resolve)
364
- };
365
- }
366
-
367
- function resolveEndableActionConfiguration(config, importer) {
368
- var resolve = resolveOperation.bind(null, importer);
369
- var action = resolveActionConfiguration(config, importer);
370
- return _extends({}, action, {
371
- endOperations: config.endOperations.map(resolve)
372
- });
373
- }
374
-
375
- function resolveTimelineAction(importer, eventbus, actionConfiguration) {
376
- var _actionConfiguration$;
377
-
378
- var resolvedConfig = resolveEndableActionConfiguration(actionConfiguration, importer);
379
- var duration = {
380
- end: (_actionConfiguration$ = actionConfiguration.duration.end) != null ? _actionConfiguration$ : -1,
381
- start: actionConfiguration.duration.start
382
- };
383
- var id = resolvedConfig.id,
384
- name = resolvedConfig.name,
385
- endOperations = resolvedConfig.endOperations,
386
- startOperations = resolvedConfig.startOperations;
387
- var action = new TimelineAction(name, startOperations, endOperations, duration, eventbus);
388
- action.id = id;
389
- return action;
390
- }
391
-
392
- function resolveActions(actionConfigurations, importer, eventbus) {
393
- var resolvedConfigs = actionConfigurations.map(function (config) {
394
- return resolveEndableActionConfiguration(config, importer);
395
- });
396
- return resolvedConfigs.map(function (resolvedConfig) {
397
- var name = resolvedConfig.name,
398
- endOperations = resolvedConfig.endOperations,
399
- startOperations = resolvedConfig.startOperations;
400
- var action = new EndableAction(name, startOperations, endOperations, eventbus);
401
- action.id = resolvedConfig.id;
402
- return action;
403
- });
404
- }
405
-
406
- function resolvePlaceholders(config, rootConfig, importer) {
407
- if (!tsIsPresent.isDefined(config)) {
408
- return;
409
- }
410
-
411
- if (Array.isArray(config)) {
412
- config.forEach(function (item) {
413
- resolvePlaceholders(item, rootConfig, importer);
414
- });
415
- } else {
416
- Object.keys(config).forEach(function (key) {
417
- resolvePlaceholder(key, config, rootConfig, importer);
418
- });
419
- }
420
- }
421
-
422
- function resolvePlaceholder(key, config, rootConfig, importer) {
423
- var value = config[key];
424
-
425
- if (typeof value === 'string') {
426
- if (value.startsWith('config:')) {
427
- var configProperty = value.substr(7, value.length);
428
- config[key] = getNestedPropertyValue(configProperty, rootConfig);
429
- } else if (value.startsWith('template:')) {
430
- var templateKey = value.substr(9, value.length);
431
- config[key] = importer["import"](templateKey)[templateKey];
432
- } else if (value.startsWith('json:')) {
433
- var jsonKey = value.substr(5, value.length);
434
- var json = importer["import"](jsonKey)[jsonKey];
435
- config[key] = json;
436
- }
437
- } else if (typeof value === 'object') {
438
- resolvePlaceholders(config[key], rootConfig, importer);
439
- }
440
- }
441
-
442
- var runtime = {exports: {}};
443
-
444
- /**
445
- * Copyright (c) 2014-present, Facebook, Inc.
446
- *
447
- * This source code is licensed under the MIT license found in the
448
- * LICENSE file in the root directory of this source tree.
449
- */
450
-
451
- (function (module) {
452
- var runtime = (function (exports) {
453
-
454
- var Op = Object.prototype;
455
- var hasOwn = Op.hasOwnProperty;
456
- var undefined$1; // More compressible than void 0.
457
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
458
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
459
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
460
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
461
-
462
- function define(obj, key, value) {
463
- Object.defineProperty(obj, key, {
464
- value: value,
465
- enumerable: true,
466
- configurable: true,
467
- writable: true
468
- });
469
- return obj[key];
470
- }
471
- try {
472
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
473
- define({}, "");
474
- } catch (err) {
475
- define = function(obj, key, value) {
476
- return obj[key] = value;
477
- };
478
- }
479
-
480
- function wrap(innerFn, outerFn, self, tryLocsList) {
481
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
482
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
483
- var generator = Object.create(protoGenerator.prototype);
484
- var context = new Context(tryLocsList || []);
485
-
486
- // The ._invoke method unifies the implementations of the .next,
487
- // .throw, and .return methods.
488
- generator._invoke = makeInvokeMethod(innerFn, self, context);
489
-
490
- return generator;
491
- }
492
- exports.wrap = wrap;
493
-
494
- // Try/catch helper to minimize deoptimizations. Returns a completion
495
- // record like context.tryEntries[i].completion. This interface could
496
- // have been (and was previously) designed to take a closure to be
497
- // invoked without arguments, but in all the cases we care about we
498
- // already have an existing method we want to call, so there's no need
499
- // to create a new function object. We can even get away with assuming
500
- // the method takes exactly one argument, since that happens to be true
501
- // in every case, so we don't have to touch the arguments object. The
502
- // only additional allocation required is the completion record, which
503
- // has a stable shape and so hopefully should be cheap to allocate.
504
- function tryCatch(fn, obj, arg) {
505
- try {
506
- return { type: "normal", arg: fn.call(obj, arg) };
507
- } catch (err) {
508
- return { type: "throw", arg: err };
509
- }
510
- }
511
-
512
- var GenStateSuspendedStart = "suspendedStart";
513
- var GenStateSuspendedYield = "suspendedYield";
514
- var GenStateExecuting = "executing";
515
- var GenStateCompleted = "completed";
516
-
517
- // Returning this object from the innerFn has the same effect as
518
- // breaking out of the dispatch switch statement.
519
- var ContinueSentinel = {};
520
-
521
- // Dummy constructor functions that we use as the .constructor and
522
- // .constructor.prototype properties for functions that return Generator
523
- // objects. For full spec compliance, you may wish to configure your
524
- // minifier not to mangle the names of these two functions.
525
- function Generator() {}
526
- function GeneratorFunction() {}
527
- function GeneratorFunctionPrototype() {}
528
-
529
- // This is a polyfill for %IteratorPrototype% for environments that
530
- // don't natively support it.
531
- var IteratorPrototype = {};
532
- define(IteratorPrototype, iteratorSymbol, function () {
533
- return this;
534
- });
535
-
536
- var getProto = Object.getPrototypeOf;
537
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
538
- if (NativeIteratorPrototype &&
539
- NativeIteratorPrototype !== Op &&
540
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
541
- // This environment has a native %IteratorPrototype%; use it instead
542
- // of the polyfill.
543
- IteratorPrototype = NativeIteratorPrototype;
544
- }
545
-
546
- var Gp = GeneratorFunctionPrototype.prototype =
547
- Generator.prototype = Object.create(IteratorPrototype);
548
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
549
- define(Gp, "constructor", GeneratorFunctionPrototype);
550
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
551
- GeneratorFunction.displayName = define(
552
- GeneratorFunctionPrototype,
553
- toStringTagSymbol,
554
- "GeneratorFunction"
555
- );
556
-
557
- // Helper for defining the .next, .throw, and .return methods of the
558
- // Iterator interface in terms of a single ._invoke method.
559
- function defineIteratorMethods(prototype) {
560
- ["next", "throw", "return"].forEach(function(method) {
561
- define(prototype, method, function(arg) {
562
- return this._invoke(method, arg);
563
- });
564
- });
565
- }
566
-
567
- exports.isGeneratorFunction = function(genFun) {
568
- var ctor = typeof genFun === "function" && genFun.constructor;
569
- return ctor
570
- ? ctor === GeneratorFunction ||
571
- // For the native GeneratorFunction constructor, the best we can
572
- // do is to check its .name property.
573
- (ctor.displayName || ctor.name) === "GeneratorFunction"
574
- : false;
575
- };
576
-
577
- exports.mark = function(genFun) {
578
- if (Object.setPrototypeOf) {
579
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
580
- } else {
581
- genFun.__proto__ = GeneratorFunctionPrototype;
582
- define(genFun, toStringTagSymbol, "GeneratorFunction");
583
- }
584
- genFun.prototype = Object.create(Gp);
585
- return genFun;
586
- };
587
-
588
- // Within the body of any async function, `await x` is transformed to
589
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
590
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
591
- // meant to be awaited.
592
- exports.awrap = function(arg) {
593
- return { __await: arg };
594
- };
595
-
596
- function AsyncIterator(generator, PromiseImpl) {
597
- function invoke(method, arg, resolve, reject) {
598
- var record = tryCatch(generator[method], generator, arg);
599
- if (record.type === "throw") {
600
- reject(record.arg);
601
- } else {
602
- var result = record.arg;
603
- var value = result.value;
604
- if (value &&
605
- typeof value === "object" &&
606
- hasOwn.call(value, "__await")) {
607
- return PromiseImpl.resolve(value.__await).then(function(value) {
608
- invoke("next", value, resolve, reject);
609
- }, function(err) {
610
- invoke("throw", err, resolve, reject);
611
- });
612
- }
613
-
614
- return PromiseImpl.resolve(value).then(function(unwrapped) {
615
- // When a yielded Promise is resolved, its final value becomes
616
- // the .value of the Promise<{value,done}> result for the
617
- // current iteration.
618
- result.value = unwrapped;
619
- resolve(result);
620
- }, function(error) {
621
- // If a rejected Promise was yielded, throw the rejection back
622
- // into the async generator function so it can be handled there.
623
- return invoke("throw", error, resolve, reject);
624
- });
625
- }
626
- }
627
-
628
- var previousPromise;
629
-
630
- function enqueue(method, arg) {
631
- function callInvokeWithMethodAndArg() {
632
- return new PromiseImpl(function(resolve, reject) {
633
- invoke(method, arg, resolve, reject);
634
- });
635
- }
636
-
637
- return previousPromise =
638
- // If enqueue has been called before, then we want to wait until
639
- // all previous Promises have been resolved before calling invoke,
640
- // so that results are always delivered in the correct order. If
641
- // enqueue has not been called before, then it is important to
642
- // call invoke immediately, without waiting on a callback to fire,
643
- // so that the async generator function has the opportunity to do
644
- // any necessary setup in a predictable way. This predictability
645
- // is why the Promise constructor synchronously invokes its
646
- // executor callback, and why async functions synchronously
647
- // execute code before the first await. Since we implement simple
648
- // async functions in terms of async generators, it is especially
649
- // important to get this right, even though it requires care.
650
- previousPromise ? previousPromise.then(
651
- callInvokeWithMethodAndArg,
652
- // Avoid propagating failures to Promises returned by later
653
- // invocations of the iterator.
654
- callInvokeWithMethodAndArg
655
- ) : callInvokeWithMethodAndArg();
656
- }
657
-
658
- // Define the unified helper method that is used to implement .next,
659
- // .throw, and .return (see defineIteratorMethods).
660
- this._invoke = enqueue;
661
- }
662
-
663
- defineIteratorMethods(AsyncIterator.prototype);
664
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
665
- return this;
666
- });
667
- exports.AsyncIterator = AsyncIterator;
668
-
669
- // Note that simple async functions are implemented on top of
670
- // AsyncIterator objects; they just return a Promise for the value of
671
- // the final result produced by the iterator.
672
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
673
- if (PromiseImpl === void 0) PromiseImpl = Promise;
674
-
675
- var iter = new AsyncIterator(
676
- wrap(innerFn, outerFn, self, tryLocsList),
677
- PromiseImpl
678
- );
679
-
680
- return exports.isGeneratorFunction(outerFn)
681
- ? iter // If outerFn is a generator, return the full iterator.
682
- : iter.next().then(function(result) {
683
- return result.done ? result.value : iter.next();
684
- });
685
- };
686
-
687
- function makeInvokeMethod(innerFn, self, context) {
688
- var state = GenStateSuspendedStart;
689
-
690
- return function invoke(method, arg) {
691
- if (state === GenStateExecuting) {
692
- throw new Error("Generator is already running");
693
- }
694
-
695
- if (state === GenStateCompleted) {
696
- if (method === "throw") {
697
- throw arg;
698
- }
699
-
700
- // Be forgiving, per 25.3.3.3.3 of the spec:
701
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
702
- return doneResult();
703
- }
704
-
705
- context.method = method;
706
- context.arg = arg;
707
-
708
- while (true) {
709
- var delegate = context.delegate;
710
- if (delegate) {
711
- var delegateResult = maybeInvokeDelegate(delegate, context);
712
- if (delegateResult) {
713
- if (delegateResult === ContinueSentinel) continue;
714
- return delegateResult;
715
- }
716
- }
717
-
718
- if (context.method === "next") {
719
- // Setting context._sent for legacy support of Babel's
720
- // function.sent implementation.
721
- context.sent = context._sent = context.arg;
722
-
723
- } else if (context.method === "throw") {
724
- if (state === GenStateSuspendedStart) {
725
- state = GenStateCompleted;
726
- throw context.arg;
727
- }
728
-
729
- context.dispatchException(context.arg);
730
-
731
- } else if (context.method === "return") {
732
- context.abrupt("return", context.arg);
733
- }
734
-
735
- state = GenStateExecuting;
736
-
737
- var record = tryCatch(innerFn, self, context);
738
- if (record.type === "normal") {
739
- // If an exception is thrown from innerFn, we leave state ===
740
- // GenStateExecuting and loop back for another invocation.
741
- state = context.done
742
- ? GenStateCompleted
743
- : GenStateSuspendedYield;
744
-
745
- if (record.arg === ContinueSentinel) {
746
- continue;
747
- }
748
-
749
- return {
750
- value: record.arg,
751
- done: context.done
752
- };
753
-
754
- } else if (record.type === "throw") {
755
- state = GenStateCompleted;
756
- // Dispatch the exception by looping back around to the
757
- // context.dispatchException(context.arg) call above.
758
- context.method = "throw";
759
- context.arg = record.arg;
760
- }
761
- }
762
- };
763
- }
764
-
765
- // Call delegate.iterator[context.method](context.arg) and handle the
766
- // result, either by returning a { value, done } result from the
767
- // delegate iterator, or by modifying context.method and context.arg,
768
- // setting context.delegate to null, and returning the ContinueSentinel.
769
- function maybeInvokeDelegate(delegate, context) {
770
- var method = delegate.iterator[context.method];
771
- if (method === undefined$1) {
772
- // A .throw or .return when the delegate iterator has no .throw
773
- // method always terminates the yield* loop.
774
- context.delegate = null;
775
-
776
- if (context.method === "throw") {
777
- // Note: ["return"] must be used for ES3 parsing compatibility.
778
- if (delegate.iterator["return"]) {
779
- // If the delegate iterator has a return method, give it a
780
- // chance to clean up.
781
- context.method = "return";
782
- context.arg = undefined$1;
783
- maybeInvokeDelegate(delegate, context);
784
-
785
- if (context.method === "throw") {
786
- // If maybeInvokeDelegate(context) changed context.method from
787
- // "return" to "throw", let that override the TypeError below.
788
- return ContinueSentinel;
789
- }
790
- }
791
-
792
- context.method = "throw";
793
- context.arg = new TypeError(
794
- "The iterator does not provide a 'throw' method");
795
- }
796
-
797
- return ContinueSentinel;
798
- }
799
-
800
- var record = tryCatch(method, delegate.iterator, context.arg);
801
-
802
- if (record.type === "throw") {
803
- context.method = "throw";
804
- context.arg = record.arg;
805
- context.delegate = null;
806
- return ContinueSentinel;
807
- }
808
-
809
- var info = record.arg;
810
-
811
- if (! info) {
812
- context.method = "throw";
813
- context.arg = new TypeError("iterator result is not an object");
814
- context.delegate = null;
815
- return ContinueSentinel;
816
- }
817
-
818
- if (info.done) {
819
- // Assign the result of the finished delegate to the temporary
820
- // variable specified by delegate.resultName (see delegateYield).
821
- context[delegate.resultName] = info.value;
822
-
823
- // Resume execution at the desired location (see delegateYield).
824
- context.next = delegate.nextLoc;
825
-
826
- // If context.method was "throw" but the delegate handled the
827
- // exception, let the outer generator proceed normally. If
828
- // context.method was "next", forget context.arg since it has been
829
- // "consumed" by the delegate iterator. If context.method was
830
- // "return", allow the original .return call to continue in the
831
- // outer generator.
832
- if (context.method !== "return") {
833
- context.method = "next";
834
- context.arg = undefined$1;
835
- }
836
-
837
- } else {
838
- // Re-yield the result returned by the delegate method.
839
- return info;
840
- }
841
-
842
- // The delegate iterator is finished, so forget it and continue with
843
- // the outer generator.
844
- context.delegate = null;
845
- return ContinueSentinel;
846
- }
847
-
848
- // Define Generator.prototype.{next,throw,return} in terms of the
849
- // unified ._invoke helper method.
850
- defineIteratorMethods(Gp);
851
-
852
- define(Gp, toStringTagSymbol, "Generator");
853
-
854
- // A Generator should always return itself as the iterator object when the
855
- // @@iterator function is called on it. Some browsers' implementations of the
856
- // iterator prototype chain incorrectly implement this, causing the Generator
857
- // object to not be returned from this call. This ensures that doesn't happen.
858
- // See https://github.com/facebook/regenerator/issues/274 for more details.
859
- define(Gp, iteratorSymbol, function() {
860
- return this;
861
- });
862
-
863
- define(Gp, "toString", function() {
864
- return "[object Generator]";
865
- });
866
-
867
- function pushTryEntry(locs) {
868
- var entry = { tryLoc: locs[0] };
869
-
870
- if (1 in locs) {
871
- entry.catchLoc = locs[1];
872
- }
873
-
874
- if (2 in locs) {
875
- entry.finallyLoc = locs[2];
876
- entry.afterLoc = locs[3];
877
- }
878
-
879
- this.tryEntries.push(entry);
880
- }
881
-
882
- function resetTryEntry(entry) {
883
- var record = entry.completion || {};
884
- record.type = "normal";
885
- delete record.arg;
886
- entry.completion = record;
887
- }
888
-
889
- function Context(tryLocsList) {
890
- // The root entry object (effectively a try statement without a catch
891
- // or a finally block) gives us a place to store values thrown from
892
- // locations where there is no enclosing try statement.
893
- this.tryEntries = [{ tryLoc: "root" }];
894
- tryLocsList.forEach(pushTryEntry, this);
895
- this.reset(true);
896
- }
897
-
898
- exports.keys = function(object) {
899
- var keys = [];
900
- for (var key in object) {
901
- keys.push(key);
902
- }
903
- keys.reverse();
904
-
905
- // Rather than returning an object with a next method, we keep
906
- // things simple and return the next function itself.
907
- return function next() {
908
- while (keys.length) {
909
- var key = keys.pop();
910
- if (key in object) {
911
- next.value = key;
912
- next.done = false;
913
- return next;
914
- }
915
- }
916
-
917
- // To avoid creating an additional object, we just hang the .value
918
- // and .done properties off the next function object itself. This
919
- // also ensures that the minifier will not anonymize the function.
920
- next.done = true;
921
- return next;
922
- };
923
- };
924
-
925
- function values(iterable) {
926
- if (iterable) {
927
- var iteratorMethod = iterable[iteratorSymbol];
928
- if (iteratorMethod) {
929
- return iteratorMethod.call(iterable);
930
- }
931
-
932
- if (typeof iterable.next === "function") {
933
- return iterable;
934
- }
935
-
936
- if (!isNaN(iterable.length)) {
937
- var i = -1, next = function next() {
938
- while (++i < iterable.length) {
939
- if (hasOwn.call(iterable, i)) {
940
- next.value = iterable[i];
941
- next.done = false;
942
- return next;
943
- }
944
- }
945
-
946
- next.value = undefined$1;
947
- next.done = true;
948
-
949
- return next;
950
- };
951
-
952
- return next.next = next;
953
- }
954
- }
955
-
956
- // Return an iterator with no values.
957
- return { next: doneResult };
958
- }
959
- exports.values = values;
960
-
961
- function doneResult() {
962
- return { value: undefined$1, done: true };
963
- }
964
-
965
- Context.prototype = {
966
- constructor: Context,
967
-
968
- reset: function(skipTempReset) {
969
- this.prev = 0;
970
- this.next = 0;
971
- // Resetting context._sent for legacy support of Babel's
972
- // function.sent implementation.
973
- this.sent = this._sent = undefined$1;
974
- this.done = false;
975
- this.delegate = null;
976
-
977
- this.method = "next";
978
- this.arg = undefined$1;
979
-
980
- this.tryEntries.forEach(resetTryEntry);
981
-
982
- if (!skipTempReset) {
983
- for (var name in this) {
984
- // Not sure about the optimal order of these conditions:
985
- if (name.charAt(0) === "t" &&
986
- hasOwn.call(this, name) &&
987
- !isNaN(+name.slice(1))) {
988
- this[name] = undefined$1;
989
- }
990
- }
991
- }
992
- },
993
-
994
- stop: function() {
995
- this.done = true;
996
-
997
- var rootEntry = this.tryEntries[0];
998
- var rootRecord = rootEntry.completion;
999
- if (rootRecord.type === "throw") {
1000
- throw rootRecord.arg;
1001
- }
1002
-
1003
- return this.rval;
1004
- },
1005
-
1006
- dispatchException: function(exception) {
1007
- if (this.done) {
1008
- throw exception;
1009
- }
1010
-
1011
- var context = this;
1012
- function handle(loc, caught) {
1013
- record.type = "throw";
1014
- record.arg = exception;
1015
- context.next = loc;
1016
-
1017
- if (caught) {
1018
- // If the dispatched exception was caught by a catch block,
1019
- // then let that catch block handle the exception normally.
1020
- context.method = "next";
1021
- context.arg = undefined$1;
1022
- }
1023
-
1024
- return !! caught;
611
+ suffix = parts[1];
1025
612
  }
613
+ }
1026
614
 
1027
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1028
- var entry = this.tryEntries[i];
1029
- var record = entry.completion;
1030
-
1031
- if (entry.tryLoc === "root") {
1032
- // Exception thrown outside of any try block that could handle
1033
- // it, so set the completion value of the entire function to
1034
- // throw the exception.
1035
- return handle("end");
1036
- }
615
+ currentInstance = currentInstance[prop];
616
+ });
617
+ return suffix ? currentInstance + suffix : currentInstance;
618
+ }
1037
619
 
1038
- if (entry.tryLoc <= this.prev) {
1039
- var hasCatch = hasOwn.call(entry, "catchLoc");
1040
- var hasFinally = hasOwn.call(entry, "finallyLoc");
620
+ function getNestedPropertyValue(propertyChain, sourceObject) {
621
+ var properties = propertyChain.split('.');
622
+ return getNestedValue(properties, sourceObject);
623
+ }
1041
624
 
1042
- if (hasCatch && hasFinally) {
1043
- if (this.prev < entry.catchLoc) {
1044
- return handle(entry.catchLoc, true);
1045
- } else if (this.prev < entry.finallyLoc) {
1046
- return handle(entry.finallyLoc);
1047
- }
625
+ var ConfigurationResolver = /*#__PURE__*/function () {
626
+ function ConfigurationResolver(importer, eventbus) {
627
+ this.importer = void 0;
628
+ this.eventbus = void 0;
629
+ this.importer = importer;
630
+ this.eventbus = eventbus;
631
+ }
1048
632
 
1049
- } else if (hasCatch) {
1050
- if (this.prev < entry.catchLoc) {
1051
- return handle(entry.catchLoc, true);
1052
- }
633
+ var _proto = ConfigurationResolver.prototype;
1053
634
 
1054
- } else if (hasFinally) {
1055
- if (this.prev < entry.finallyLoc) {
1056
- return handle(entry.finallyLoc);
1057
- }
635
+ _proto.process = function process(configuration, actionRegistryListener) {
636
+ resolvePlaceholders(configuration, configuration, this.importer);
1058
637
 
1059
- } else {
1060
- throw new Error("try statement without catch or finally");
1061
- }
1062
- }
1063
- }
1064
- },
638
+ if (!tsIsPresent.isDefined(configuration.timelineProviderSettings)) {
639
+ throw new Error('Configuration incomplete: it needs to have at least one timeline provider setting');
640
+ }
1065
641
 
1066
- abrupt: function(type, arg) {
1067
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1068
- var entry = this.tryEntries[i];
1069
- if (entry.tryLoc <= this.prev &&
1070
- hasOwn.call(entry, "finallyLoc") &&
1071
- this.prev < entry.finallyLoc) {
1072
- var finallyEntry = entry;
1073
- break;
1074
- }
1075
- }
642
+ var resolvedConfig = {
643
+ id: configuration.id,
644
+ engine: _extends({}, configuration.engine),
645
+ timelineProviderSettings: deepCopy(configuration.timelineProviderSettings),
646
+ containerSelector: configuration.containerSelector,
647
+ language: configuration.language,
648
+ layoutTemplate: configuration.layoutTemplate,
649
+ availableLanguages: deepCopy(configuration.availableLanguages),
650
+ actions: resolveActions(configuration.actions, this.importer, this.eventbus),
651
+ initActions: resolveActions(configuration.initActions, this.importer, this.eventbus),
652
+ labels: deepCopy(configuration.labels),
653
+ timelineFlow: deepCopy(configuration.timelineFlow),
654
+ timelines: resolveTimelines(configuration.timelines, this.importer, this.eventbus)
655
+ };
656
+ var eventActions = [];
1076
657
 
1077
- if (finallyEntry &&
1078
- (type === "break" ||
1079
- type === "continue") &&
1080
- finallyEntry.tryLoc <= arg &&
1081
- arg <= finallyEntry.finallyLoc) {
1082
- // Ignore the finally entry if control is not jumping to a
1083
- // location outside the try/catch block.
1084
- finallyEntry = null;
1085
- }
658
+ if (configuration.eventActions && actionRegistryListener) {
659
+ eventActions = resolveEventActions(configuration.eventActions, actionRegistryListener, this.importer, this.eventbus);
660
+ }
1086
661
 
1087
- var record = finallyEntry ? finallyEntry.completion : {};
1088
- record.type = type;
1089
- record.arg = arg;
662
+ var actionsLookup = resolvedConfig.actions.concat(eventActions).reduce(function (aggr, action) {
663
+ var _extends2;
1090
664
 
1091
- if (finallyEntry) {
1092
- this.method = "next";
1093
- this.next = finallyEntry.finallyLoc;
1094
- return ContinueSentinel;
1095
- }
665
+ return _extends({}, aggr, (_extends2 = {}, _extends2[action.name] = action, _extends2));
666
+ }, {});
667
+ return [actionsLookup, resolvedConfig];
668
+ };
1096
669
 
1097
- return this.complete(record);
1098
- },
670
+ return ConfigurationResolver;
671
+ }();
1099
672
 
1100
- complete: function(record, afterLoc) {
1101
- if (record.type === "throw") {
1102
- throw record.arg;
1103
- }
673
+ function resolveEventActions(eventActionConfigurations, actionRegistryListener, importer, eventbus) {
674
+ var resolvedConfigs = eventActionConfigurations.map(function (config) {
675
+ return resolveActionConfiguration(config, importer);
676
+ });
677
+ return resolvedConfigs.map(function (config, index) {
678
+ var _eventActionConfigura = eventActionConfigurations[index],
679
+ eventName = _eventActionConfigura.eventName,
680
+ eventTopic = _eventActionConfigura.eventTopic;
681
+ var eventAction = new Action(config.name, config.startOperations, eventbus);
682
+ actionRegistryListener.registerAction(eventAction, eventName, eventTopic);
683
+ return eventAction;
684
+ });
685
+ }
1104
686
 
1105
- if (record.type === "break" ||
1106
- record.type === "continue") {
1107
- this.next = record.arg;
1108
- } else if (record.type === "return") {
1109
- this.rval = this.arg = record.arg;
1110
- this.method = "return";
1111
- this.next = "end";
1112
- } else if (record.type === "normal" && afterLoc) {
1113
- this.next = afterLoc;
1114
- }
687
+ function resolveTimelines(timelines, importer, eventbus) {
688
+ var resolve = resolveTimelineAction.bind(null, importer, eventbus);
689
+ return timelines.map(function (config) {
690
+ return _extends({}, config, {
691
+ timelineActions: config.timelineActions.map(resolve)
692
+ });
693
+ });
694
+ }
1115
695
 
1116
- return ContinueSentinel;
1117
- },
696
+ function resolveOperation(importer, operationConfig) {
697
+ return {
698
+ id: operationConfig.id,
699
+ systemName: operationConfig.systemName,
700
+ operationData: deepCopy(operationConfig.operationData),
701
+ instance: importer["import"](operationConfig.systemName)[operationConfig.systemName]
702
+ };
703
+ }
1118
704
 
1119
- finish: function(finallyLoc) {
1120
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1121
- var entry = this.tryEntries[i];
1122
- if (entry.finallyLoc === finallyLoc) {
1123
- this.complete(entry.completion, entry.afterLoc);
1124
- resetTryEntry(entry);
1125
- return ContinueSentinel;
1126
- }
1127
- }
1128
- },
705
+ function resolveActionConfiguration(config, importer) {
706
+ var resolve = resolveOperation.bind(null, importer);
707
+ return {
708
+ id: config.id,
709
+ name: config.name,
710
+ startOperations: config.startOperations.map(resolve)
711
+ };
712
+ }
1129
713
 
1130
- "catch": function(tryLoc) {
1131
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
1132
- var entry = this.tryEntries[i];
1133
- if (entry.tryLoc === tryLoc) {
1134
- var record = entry.completion;
1135
- if (record.type === "throw") {
1136
- var thrown = record.arg;
1137
- resetTryEntry(entry);
1138
- }
1139
- return thrown;
1140
- }
1141
- }
714
+ function resolveEndableActionConfiguration(config, importer) {
715
+ var resolve = resolveOperation.bind(null, importer);
716
+ var action = resolveActionConfiguration(config, importer);
717
+ return _extends({}, action, {
718
+ endOperations: config.endOperations.map(resolve)
719
+ });
720
+ }
1142
721
 
1143
- // The context.catch method must only be called with a location
1144
- // argument that corresponds to a known catch block.
1145
- throw new Error("illegal catch attempt");
1146
- },
722
+ function resolveTimelineAction(importer, eventbus, actionConfiguration) {
723
+ var _actionConfiguration$;
1147
724
 
1148
- delegateYield: function(iterable, resultName, nextLoc) {
1149
- this.delegate = {
1150
- iterator: values(iterable),
1151
- resultName: resultName,
1152
- nextLoc: nextLoc
1153
- };
725
+ var resolvedConfig = resolveEndableActionConfiguration(actionConfiguration, importer);
726
+ var duration = {
727
+ end: (_actionConfiguration$ = actionConfiguration.duration.end) != null ? _actionConfiguration$ : -1,
728
+ start: actionConfiguration.duration.start
729
+ };
730
+ var id = resolvedConfig.id,
731
+ name = resolvedConfig.name,
732
+ endOperations = resolvedConfig.endOperations,
733
+ startOperations = resolvedConfig.startOperations;
734
+ var action = new TimelineAction(name, startOperations, endOperations, duration, eventbus);
735
+ action.id = id;
736
+ return action;
737
+ }
1154
738
 
1155
- if (this.method === "next") {
1156
- // Deliberately forget the last sent value so that we don't
1157
- // accidentally pass it on to the delegate.
1158
- this.arg = undefined$1;
1159
- }
739
+ function resolveActions(actionConfigurations, importer, eventbus) {
740
+ var resolvedConfigs = actionConfigurations.map(function (config) {
741
+ return resolveEndableActionConfiguration(config, importer);
742
+ });
743
+ return resolvedConfigs.map(function (resolvedConfig) {
744
+ var name = resolvedConfig.name,
745
+ endOperations = resolvedConfig.endOperations,
746
+ startOperations = resolvedConfig.startOperations;
747
+ var action = new EndableAction(name, startOperations, endOperations, eventbus);
748
+ action.id = resolvedConfig.id;
749
+ return action;
750
+ });
751
+ }
1160
752
 
1161
- return ContinueSentinel;
1162
- }
1163
- };
753
+ function resolvePlaceholders(configFragment, rootConfig, importer) {
754
+ if (!tsIsPresent.isDefined(configFragment)) {
755
+ return;
756
+ }
1164
757
 
1165
- // Regardless of whether this script is executing as a CommonJS module
1166
- // or not, return the runtime object so that we can declare the variable
1167
- // regeneratorRuntime in the outer scope, which allows this module to be
1168
- // injected easily by `bin/regenerator --include-runtime script.js`.
1169
- return exports;
1170
-
1171
- }(
1172
- // If this script is executing as a CommonJS module, use module.exports
1173
- // as the regeneratorRuntime namespace. Otherwise create a new empty
1174
- // object. Either way, the resulting object will be used to initialize
1175
- // the regeneratorRuntime variable at the top of this file.
1176
- module.exports
1177
- ));
1178
-
1179
- try {
1180
- regeneratorRuntime = runtime;
1181
- } catch (accidentalStrictMode) {
1182
- // This module should not be running in strict mode, so the above
1183
- // assignment should always work unless something is misconfigured. Just
1184
- // in case runtime.js accidentally runs in strict mode, in modern engines
1185
- // we can explicitly access globalThis. In older engines we can escape
1186
- // strict mode using a global Function call. This could conceivably fail
1187
- // if a Content Security Policy forbids using Function, but in that case
1188
- // the proper solution is to fix the accidental strict mode problem. If
1189
- // you've misconfigured your bundler to force strict mode and applied a
1190
- // CSP to forbid Function, and you're not willing to fix either of those
1191
- // problems, please detail your unique predicament in a GitHub issue.
1192
- if (typeof globalThis === "object") {
1193
- globalThis.regeneratorRuntime = runtime;
758
+ if (Array.isArray(configFragment)) {
759
+ configFragment.forEach(function (item) {
760
+ resolvePlaceholders(item, rootConfig, importer);
761
+ });
1194
762
  } else {
1195
- Function("r", "regeneratorRuntime = r")(runtime);
763
+ Object.keys(configFragment).forEach(function (key) {
764
+ resolvePlaceholder(key, configFragment, rootConfig, importer);
765
+ });
1196
766
  }
1197
767
  }
1198
- }(runtime));
1199
768
 
1200
- var _regeneratorRuntime = runtime.exports;
769
+ function resolvePlaceholder(key, configFragment, rootConfig, importer) {
770
+ var configValue = configFragment[key];
771
+
772
+ if (typeof configValue === 'string') {
773
+ if (configValue.startsWith('config:')) {
774
+ var configProperty = configValue.substring(7, configValue.length);
775
+ configFragment[key] = getNestedPropertyValue(configProperty, rootConfig);
776
+ } else if (configValue.startsWith('template:')) {
777
+ var templateKey = configValue.substring(9, configValue.length);
778
+ var template = importer["import"](templateKey)[templateKey];
779
+ configFragment[key] = template;
780
+ } else if (configValue.startsWith('json:')) {
781
+ var jsonKey = configValue.substring(5, configValue.length);
782
+ var json = importer["import"](jsonKey)[jsonKey];
783
+ configFragment[key] = json;
784
+ }
785
+ } else if (typeof configValue === 'object') {
786
+ resolvePlaceholders(configValue, rootConfig, importer);
787
+ }
788
+ }
1201
789
 
1202
790
  var TimelineEventNames = function TimelineEventNames() {};
1203
791
  TimelineEventNames.PLAY_TOGGLE_REQUEST = 'timeline-play-toggle-request';
@@ -1307,19 +895,19 @@ var EventListenerController = /*#__PURE__*/function () {
1307
895
  return;
1308
896
  }
1309
897
 
1310
- var copy = this.operationData.actionOperationData ? deepCopy(this.operationData.actionOperationData) : {};
898
+ var actionOperationData = this.operationData.actionOperationData ? deepCopy(this.operationData.actionOperationData) : {};
1311
899
 
1312
900
  if (event.target) {
1313
- copy.targetValue = event.target.value;
901
+ actionOperationData.targetValue = event.target.value;
1314
902
  }
1315
903
 
1316
- this._executeAction(this.actionInstanceInfos, copy, 0);
904
+ this._executeAction(this.actionInstanceInfos, actionOperationData, 0);
1317
905
  };
1318
906
 
1319
907
  _proto._executeAction = /*#__PURE__*/function () {
1320
- var _executeAction2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(actions, operationData, idx) {
908
+ var _executeAction2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(actions, operationData, idx) {
1321
909
  var actionInfo, action, method, resultOperationData;
1322
- return _regeneratorRuntime.wrap(function _callee$(_context) {
910
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1323
911
  while (1) {
1324
912
  switch (_context.prev = _context.next) {
1325
913
  case 0:
@@ -2251,8 +1839,8 @@ var EligiusEngine = /*#__PURE__*/function () {
2251
1839
 
2252
1840
  this._activeTimelineProvider = providerSettings.provider;
2253
1841
  return new Promise( /*#__PURE__*/function () {
2254
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(resolve) {
2255
- return _regeneratorRuntime.wrap(function _callee$(_context) {
1842
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve) {
1843
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2256
1844
  while (1) {
2257
1845
  switch (_context.prev = _context.next) {
2258
1846
  case 0:
@@ -2291,8 +1879,8 @@ var EligiusEngine = /*#__PURE__*/function () {
2291
1879
  };
2292
1880
 
2293
1881
  _proto._cleanUp = /*#__PURE__*/function () {
2294
- var _cleanUp2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
2295
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
1882
+ var _cleanUp2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1883
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2296
1884
  while (1) {
2297
1885
  switch (_context2.prev = _context2.next) {
2298
1886
  case 0:
@@ -2319,8 +1907,8 @@ var EligiusEngine = /*#__PURE__*/function () {
2319
1907
  }();
2320
1908
 
2321
1909
  _proto.destroy = /*#__PURE__*/function () {
2322
- var _destroy = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
2323
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
1910
+ var _destroy = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1911
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
2324
1912
  while (1) {
2325
1913
  switch (_context3.prev = _context3.next) {
2326
1914
  case 0:
@@ -2436,9 +2024,9 @@ var EligiusEngine = /*#__PURE__*/function () {
2436
2024
  };
2437
2025
 
2438
2026
  _proto._executeActions = /*#__PURE__*/function () {
2439
- var _executeActions2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(actions, methodName, idx) {
2027
+ var _executeActions2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(actions, methodName, idx) {
2440
2028
  var action;
2441
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
2029
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
2442
2030
  while (1) {
2443
2031
  switch (_context4.prev = _context4.next) {
2444
2032
  case 0:
@@ -2483,12 +2071,12 @@ var EligiusEngine = /*#__PURE__*/function () {
2483
2071
  };
2484
2072
 
2485
2073
  _proto._handleRequestTimelineUri = /*#__PURE__*/function () {
2486
- var _handleRequestTimelineUri2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(uri, position, previousVideoPosition) {
2074
+ var _handleRequestTimelineUri2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(uri, position, previousVideoPosition) {
2487
2075
  var _position,
2488
2076
  _this3 = this;
2489
2077
 
2490
2078
  var timelineConfig, newProviderSettings;
2491
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
2079
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
2492
2080
  while (1) {
2493
2081
  switch (_context5.prev = _context5.next) {
2494
2082
  case 0:
@@ -2730,29 +2318,31 @@ var EligiusEngine = /*#__PURE__*/function () {
2730
2318
 
2731
2319
  var ActionRegistryEventbusListener = /*#__PURE__*/function () {
2732
2320
  function ActionRegistryEventbusListener() {
2733
- this._actionRegistry = {};
2321
+ this._actionRegistry = new Map();
2734
2322
  }
2735
2323
 
2736
2324
  var _proto = ActionRegistryEventbusListener.prototype;
2737
2325
 
2738
2326
  _proto.registerAction = function registerAction(action, eventName, eventTopic) {
2327
+ var _this$_actionRegistry;
2328
+
2739
2329
  if (eventTopic && eventTopic.length) {
2740
2330
  eventName = eventName + ":" + eventTopic;
2741
2331
  }
2742
2332
 
2743
- if (!this._actionRegistry[eventName]) {
2744
- this._actionRegistry[eventName] = [];
2333
+ if (!this._actionRegistry.has(eventName)) {
2334
+ this._actionRegistry.set(eventName, []);
2745
2335
  }
2746
2336
 
2747
- this._actionRegistry[eventName].push(action);
2337
+ (_this$_actionRegistry = this._actionRegistry.get(eventName)) == null ? void 0 : _this$_actionRegistry.push(action);
2748
2338
  };
2749
2339
 
2750
2340
  _proto.handleEvent = function handleEvent(eventName, eventTopic, args) {
2751
- if (eventTopic && eventTopic.length) {
2341
+ if (eventTopic) {
2752
2342
  eventName = eventName + ":" + eventTopic;
2753
2343
  }
2754
2344
 
2755
- var actions = this._actionRegistry[eventName];
2345
+ var actions = this._actionRegistry.get(eventName);
2756
2346
 
2757
2347
  if (actions) {
2758
2348
  var operationData = {
@@ -2769,8 +2359,8 @@ var ActionRegistryEventbusListener = /*#__PURE__*/function () {
2769
2359
 
2770
2360
  var Eventbus = /*#__PURE__*/function () {
2771
2361
  function Eventbus() {
2772
- this.eventHandlers = {};
2773
- this.eventInterceptors = {};
2362
+ this.eventHandlers = new Map();
2363
+ this.eventInterceptors = new Map();
2774
2364
  this.eventListeners = [];
2775
2365
  this.clear();
2776
2366
  }
@@ -2778,33 +2368,33 @@ var Eventbus = /*#__PURE__*/function () {
2778
2368
  var _proto = Eventbus.prototype;
2779
2369
 
2780
2370
  _proto.clear = function clear() {
2781
- this.eventHandlers = {};
2371
+ this.eventHandlers = new Map();
2782
2372
  this.eventListeners = [];
2783
- this.eventInterceptors = {};
2373
+ this.eventInterceptors = new Map();
2784
2374
  };
2785
2375
 
2786
2376
  _proto._getEventInterceptors = function _getEventInterceptors(eventName, eventTopic) {
2787
- if (eventTopic && eventTopic.length) {
2377
+ if (eventTopic) {
2788
2378
  eventName = eventName + ":" + eventTopic;
2789
2379
  }
2790
2380
 
2791
- if (!this.eventInterceptors[eventName]) {
2792
- this.eventInterceptors[eventName] = [];
2381
+ if (!this.eventInterceptors.has(eventName)) {
2382
+ this.eventInterceptors.set(eventName, []);
2793
2383
  }
2794
2384
 
2795
- return this.eventInterceptors[eventName];
2385
+ return this.eventInterceptors.get(eventName);
2796
2386
  };
2797
2387
 
2798
2388
  _proto._getEventHandlers = function _getEventHandlers(eventName, eventTopic) {
2799
- if (eventTopic && eventTopic.length) {
2389
+ if (eventTopic) {
2800
2390
  eventName = eventName + ":" + eventTopic;
2801
2391
  }
2802
2392
 
2803
- if (!this.eventHandlers[eventName]) {
2804
- this.eventHandlers[eventName] = [];
2393
+ if (!this.eventHandlers.has(eventName)) {
2394
+ this.eventHandlers.set(eventName, []);
2805
2395
  }
2806
2396
 
2807
- return this.eventHandlers[eventName];
2397
+ return this.eventHandlers.get(eventName);
2808
2398
  };
2809
2399
 
2810
2400
  _proto.on = function on(eventName, eventHandler, eventTopic) {
@@ -3148,33 +2738,35 @@ var EngineFactory = /*#__PURE__*/function () {
3148
2738
  * @param operationData
3149
2739
  * @returns
3150
2740
  */
3151
- var addClass = function addClass(operationData) {
2741
+ var addClass$1 = function addClass(operationData) {
3152
2742
  var selectedElement = operationData.selectedElement,
3153
2743
  className = operationData.className;
3154
2744
  selectedElement.addClass(className);
3155
2745
  return operationData;
3156
2746
  };
3157
2747
 
3158
- var controllersName = 'eligiusEngineControllers';
2748
+ var controllersDataName = 'eligiusEngineControllers';
3159
2749
 
3160
2750
  function getElementData(name, element) {
3161
2751
  return element.data(name);
3162
2752
  }
3163
2753
 
3164
- var getElementControllers = /*#__PURE__*/getElementData.bind(null, controllersName);
2754
+ var getElementControllers = /*#__PURE__*/getElementData.bind(null, controllersDataName);
3165
2755
 
3166
2756
  function attachControllerToElement(element, controller) {
3167
- if (!element.data('eligiusEngineControllers')) {
3168
- element.data('eligiusEngineControllers', []);
2757
+ if (!element.data(controllersDataName)) {
2758
+ element.data(controllersDataName, []);
3169
2759
  }
3170
2760
 
3171
2761
  var controllers = getElementControllers(element);
3172
- controllers.push(controller);
2762
+
2763
+ if (controllers) {
2764
+ controllers.push(controller);
2765
+ }
3173
2766
  }
3174
2767
 
3175
2768
  function mergeOperationData(operationData, newOperationData) {
3176
- //return { ...(operationData as any), ...newOperationData } as K;
3177
- return Object.assign(operationData, newOperationData);
2769
+ return _extends({}, operationData, newOperationData);
3178
2770
  }
3179
2771
 
3180
2772
  function internalResolve(resolve, operationData, newOperationData) {
@@ -3192,7 +2784,7 @@ function internalResolve(resolve, operationData, newOperationData) {
3192
2784
  * @returns
3193
2785
  */
3194
2786
 
3195
- var addControllerToElement = function addControllerToElement(operationData) {
2787
+ var addControllerToElement$1 = function addControllerToElement(operationData) {
3196
2788
  var selectedElement = operationData.selectedElement,
3197
2789
  controllerInstance = operationData.controllerInstance;
3198
2790
  attachControllerToElement(selectedElement, controllerInstance);
@@ -3218,7 +2810,7 @@ var addControllerToElement = function addControllerToElement(operationData) {
3218
2810
  * @returns
3219
2811
  */
3220
2812
 
3221
- var animate = function animate(operationData) {
2813
+ var animate$1 = function animate(operationData) {
3222
2814
  var animationEasing = operationData.animationEasing,
3223
2815
  selectedElement = operationData.selectedElement,
3224
2816
  animationProperties = operationData.animationProperties,
@@ -3250,7 +2842,7 @@ var animate = function animate(operationData) {
3250
2842
  * @returns
3251
2843
  */
3252
2844
 
3253
- var animateWithClass = function animateWithClass(operationData) {
2845
+ var animateWithClass$1 = function animateWithClass(operationData) {
3254
2846
  var selectedElement = operationData.selectedElement,
3255
2847
  className = operationData.className,
3256
2848
  removeClass = operationData.removeClass;
@@ -3305,7 +2897,7 @@ function resolveEventArguments(operationData, eventArgs) {
3305
2897
  * @returns
3306
2898
  */
3307
2899
 
3308
- var broadcastEvent = function broadcastEvent(operationData) {
2900
+ var broadcastEvent$1 = function broadcastEvent(operationData) {
3309
2901
  var eventArgs = operationData.eventArgs,
3310
2902
  eventTopic = operationData.eventTopic,
3311
2903
  eventName = operationData.eventName;
@@ -3324,7 +2916,7 @@ var broadcastEvent = function broadcastEvent(operationData) {
3324
2916
  /**
3325
2917
  * This operation removes all of the children from the specified selected element.
3326
2918
  */
3327
- var clearElement = function clearElement(operationData) {
2919
+ var clearElement$1 = function clearElement(operationData) {
3328
2920
  var selectedElement = operationData.selectedElement;
3329
2921
  selectedElement.empty();
3330
2922
  return operationData;
@@ -3334,7 +2926,7 @@ var clearElement = function clearElement(operationData) {
3334
2926
  * This operation removes all of the properties on the current operation date.
3335
2927
  * Or, if the properties property is set only removes the properties defined by that list.
3336
2928
  */
3337
- var clearOperationData = function clearOperationData(operationData) {
2929
+ var clearOperationData$1 = function clearOperationData(operationData) {
3338
2930
  var properties = operationData.properties;
3339
2931
 
3340
2932
  if (properties) {
@@ -3401,7 +2993,7 @@ function resolveProperties(properties, copy, extract) {
3401
2993
  * @returns
3402
2994
  */
3403
2995
 
3404
- var createElement = function createElement(operationData) {
2996
+ var createElement$1 = function createElement(operationData) {
3405
2997
  operationData = resolvePropertyValues(operationData, operationData);
3406
2998
  var _operationData = operationData,
3407
2999
  elementName = _operationData.elementName,
@@ -3428,7 +3020,7 @@ var createElement = function createElement(operationData) {
3428
3020
  * @returns
3429
3021
  */
3430
3022
 
3431
- var customFunction = function customFunction(operationData) {
3023
+ var customFunction$1 = function customFunction(operationData) {
3432
3024
  var _this = this;
3433
3025
 
3434
3026
  var systemName = operationData.systemName;
@@ -3456,7 +3048,7 @@ var customFunction = function customFunction(operationData) {
3456
3048
  * @returns
3457
3049
  */
3458
3050
 
3459
- var endAction = function endAction(operationData) {
3051
+ var endAction$1 = function endAction(operationData) {
3460
3052
  var _operationData = operationData,
3461
3053
  actionInstance = _operationData.actionInstance,
3462
3054
  actionOperationData = _operationData.actionOperationData;
@@ -3478,7 +3070,7 @@ var endAction = function endAction(operationData) {
3478
3070
  * @param operationData
3479
3071
  * @returns
3480
3072
  */
3481
- var endLoop = function endLoop(operationData) {
3073
+ var endLoop$1 = function endLoop(operationData) {
3482
3074
  var context = this;
3483
3075
 
3484
3076
  if (!context.skipNextOperation) {
@@ -3498,7 +3090,7 @@ var endLoop = function endLoop(operationData) {
3498
3090
  return operationData;
3499
3091
  };
3500
3092
 
3501
- var extendController = function extendController(operationData) {
3093
+ var extendController$1 = function extendController(operationData) {
3502
3094
  var controllerInstance = operationData.controllerInstance,
3503
3095
  controllerExtension = operationData.controllerExtension;
3504
3096
  operationData.controllerInstance = Object.assign(controllerInstance, controllerExtension);
@@ -3512,7 +3104,7 @@ var extendController = function extendController(operationData) {
3512
3104
  * @returns
3513
3105
  */
3514
3106
 
3515
- var getControllerFromElement = function getControllerFromElement(operationData) {
3107
+ var getControllerFromElement$1 = function getControllerFromElement(operationData) {
3516
3108
  var selectedElement = operationData.selectedElement,
3517
3109
  controllerName = operationData.controllerName;
3518
3110
  var controllers = getElementControllers(selectedElement);
@@ -3537,7 +3129,7 @@ var getControllerFromElement = function getControllerFromElement(operationData)
3537
3129
  * @returns
3538
3130
  */
3539
3131
 
3540
- var getControllerInstance = function getControllerInstance(operationData) {
3132
+ var getControllerInstance$1 = function getControllerInstance(operationData) {
3541
3133
  var systemName = operationData.systemName,
3542
3134
  _operationData$proper = operationData.propertyName,
3543
3135
  propertyName = _operationData$proper === void 0 ? 'controllerInstance' : _operationData$proper;
@@ -3552,22 +3144,31 @@ var getControllerInstance = function getControllerInstance(operationData) {
3552
3144
  return operationData;
3553
3145
  };
3554
3146
 
3555
- function modifyDimensionsByRatio(ratioModifier, dimensions) {
3556
- //h[ar=8-1]
3147
+ function _modifyDimensionsByRatio(ratioModifier, dimensions) {
3148
+ var modifiedDimensions = _extends({}, dimensions); //h[ar=8-1]
3149
+
3150
+
3557
3151
  var prefix = ratioModifier.substring(0, 1);
3558
- var ratio = ratioModifier.substring(ratioModifier.indexOf('[') + 1, ratioModifier.indexOf(']') - ratioModifier.indexOf('[') - 1);
3152
+ var ratio = ratioModifier.substring(ratioModifier.indexOf('[') + 1, ratioModifier.indexOf(']') - (ratioModifier.indexOf('[') - 1));
3559
3153
  var ratios = ratio.split('=')[1].split('-');
3560
3154
 
3155
+ if (ratios.filter(Boolean).length !== 2) {
3156
+ throw new Error("Badly formatted modifier, expect two ratios: " + ratio);
3157
+ }
3158
+
3561
3159
  if (prefix === 'h') {
3562
- dimensions.height = dimensions.width / +ratios[0] * +ratios[1];
3160
+ modifiedDimensions.height = modifiedDimensions.width / +ratios[0] * +ratios[1];
3563
3161
  } else if (prefix === 'w') {
3564
- dimensions.width = dimensions.height / +ratios[1] * +ratios[0];
3162
+ modifiedDimensions.width = modifiedDimensions.height / +ratios[1] * +ratios[0];
3565
3163
  }
3164
+
3165
+ return modifiedDimensions;
3566
3166
  }
3567
3167
 
3568
- function getModifierSuffix(modifier) {
3168
+ function _getModifierSuffix(modifier //*100h%
3169
+ ) {
3569
3170
  var endIdx = 1;
3570
- var suffix = modifier.substring(modifier.length - 1, 1);
3171
+ var suffix = modifier.substring(modifier.length - endIdx, modifier.length);
3571
3172
 
3572
3173
  if (suffix !== 'h' && suffix !== 'w' && suffix !== '%') {
3573
3174
  suffix = null;
@@ -3576,12 +3177,10 @@ function getModifierSuffix(modifier) {
3576
3177
  var isPercent = suffix === '%';
3577
3178
 
3578
3179
  if (isPercent) {
3579
- endIdx = 2;
3580
- suffix = modifier.substring(modifier.length - endIdx, 1);
3180
+ suffix = modifier.substring(modifier.length - endIdx, modifier.length - (endIdx + 1));
3581
3181
 
3582
3182
  if (suffix !== 'h' && suffix !== 'w') {
3583
3183
  suffix = null;
3584
- endIdx = 1;
3585
3184
  }
3586
3185
  }
3587
3186
 
@@ -3589,20 +3188,22 @@ function getModifierSuffix(modifier) {
3589
3188
  }
3590
3189
 
3591
3190
  function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModifier) {
3191
+ var modifiedDimension = _extends({}, dimensions);
3192
+
3592
3193
  switch (prefix) {
3593
3194
  case '+':
3594
3195
  switch (suffix) {
3595
3196
  case 'h':
3596
- dimensions.height += heightModifier;
3197
+ modifiedDimension.height += heightModifier;
3597
3198
  break;
3598
3199
 
3599
3200
  case 'w':
3600
- dimensions.width += widthModifier;
3201
+ modifiedDimension.width += widthModifier;
3601
3202
  break;
3602
3203
 
3603
3204
  default:
3604
- dimensions.height += heightModifier;
3605
- dimensions.width += widthModifier;
3205
+ modifiedDimension.height += heightModifier;
3206
+ modifiedDimension.width += widthModifier;
3606
3207
  }
3607
3208
 
3608
3209
  break;
@@ -3610,16 +3211,16 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
3610
3211
  case '-':
3611
3212
  switch (suffix) {
3612
3213
  case 'h':
3613
- dimensions.height -= heightModifier;
3214
+ modifiedDimension.height -= heightModifier;
3614
3215
  break;
3615
3216
 
3616
3217
  case 'w':
3617
- dimensions.width -= widthModifier;
3218
+ modifiedDimension.width -= widthModifier;
3618
3219
  break;
3619
3220
 
3620
3221
  default:
3621
- dimensions.height -= heightModifier;
3622
- dimensions.width -= widthModifier;
3222
+ modifiedDimension.height -= heightModifier;
3223
+ modifiedDimension.width -= widthModifier;
3623
3224
  }
3624
3225
 
3625
3226
  break;
@@ -3627,16 +3228,16 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
3627
3228
  case '/':
3628
3229
  switch (suffix) {
3629
3230
  case 'h':
3630
- dimensions.height /= heightModifier;
3231
+ modifiedDimension.height /= heightModifier;
3631
3232
  break;
3632
3233
 
3633
3234
  case 'w':
3634
- dimensions.width /= widthModifier;
3235
+ modifiedDimension.width /= widthModifier;
3635
3236
  break;
3636
3237
 
3637
3238
  default:
3638
- dimensions.height /= heightModifier;
3639
- dimensions.width /= widthModifier;
3239
+ modifiedDimension.height /= heightModifier;
3240
+ modifiedDimension.width /= widthModifier;
3640
3241
  }
3641
3242
 
3642
3243
  break;
@@ -3644,16 +3245,16 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
3644
3245
  case '*':
3645
3246
  switch (suffix) {
3646
3247
  case 'h':
3647
- dimensions.height *= heightModifier;
3248
+ modifiedDimension.height *= heightModifier;
3648
3249
  break;
3649
3250
 
3650
3251
  case 'w':
3651
- dimensions.width *= widthModifier;
3252
+ modifiedDimension.width *= widthModifier;
3652
3253
  break;
3653
3254
 
3654
3255
  default:
3655
- dimensions.height *= heightModifier;
3656
- dimensions.width *= widthModifier;
3256
+ modifiedDimension.height *= heightModifier;
3257
+ modifiedDimension.width *= widthModifier;
3657
3258
  }
3658
3259
 
3659
3260
  break;
@@ -3662,7 +3263,7 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
3662
3263
  console.error("Unknown operator found: " + prefix);
3663
3264
  }
3664
3265
 
3665
- return dimensions;
3266
+ return modifiedDimension;
3666
3267
  }
3667
3268
  /**
3668
3269
  * Modifies the given dimensions using the given modifier string.
@@ -3682,6 +3283,8 @@ function _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModi
3682
3283
 
3683
3284
 
3684
3285
  function modifyDimensions(dimensions, modifier) {
3286
+ var clonedDimensions = _extends({}, dimensions);
3287
+
3685
3288
  var ratioModifier = null;
3686
3289
 
3687
3290
  if (modifier.indexOf('|') > -1) {
@@ -3693,25 +3296,27 @@ function modifyDimensions(dimensions, modifier) {
3693
3296
 
3694
3297
  var prefix = modifier.substring(0, 1);
3695
3298
 
3696
- var _getModifierSuffix = getModifierSuffix(modifier),
3697
- suffix = _getModifierSuffix[0],
3698
- endIdx = _getModifierSuffix[1],
3699
- isPercent = _getModifierSuffix[2];
3299
+ var _getModifierSuffix2 = _getModifierSuffix(modifier),
3300
+ suffix = _getModifierSuffix2[0],
3301
+ endIdx = _getModifierSuffix2[1],
3302
+ isPercent = _getModifierSuffix2[2];
3700
3303
 
3701
- var value = parseInt(suffix !== null ? modifier.substring(1, modifier.length - endIdx - 1) : modifier.substring(1, modifier.length), 10);
3304
+ var value = parseInt(suffix !== null ? modifier.substring(1, modifier.length - (endIdx - 1)) : modifier.substring(1), 10);
3702
3305
  var widthModifier = value;
3703
3306
  var heightModifier = value;
3704
3307
 
3705
3308
  if (isPercent) {
3706
- widthModifier = dimensions.width / 100 * value;
3707
- heightModifier = dimensions.height / 100 * value;
3309
+ widthModifier = clonedDimensions.width / 100 * value;
3310
+ heightModifier = clonedDimensions.height / 100 * value;
3708
3311
  }
3709
3312
 
3710
- dimensions = _modifyDimensions(dimensions, prefix, suffix, widthModifier, heightModifier);
3313
+ var modifiedDimension = _modifyDimensions(clonedDimensions, prefix, suffix, widthModifier, heightModifier);
3711
3314
 
3712
3315
  if (ratioModifier) {
3713
- modifyDimensionsByRatio(ratioModifier, dimensions);
3316
+ return _modifyDimensionsByRatio(ratioModifier, modifiedDimension);
3714
3317
  }
3318
+
3319
+ return modifiedDimension;
3715
3320
  }
3716
3321
 
3717
3322
  /**
@@ -3733,7 +3338,7 @@ function modifyDimensions(dimensions, modifier) {
3733
3338
  * @returns
3734
3339
  */
3735
3340
 
3736
- var getElementDimensions = function getElementDimensions(operationData) {
3341
+ var getElementDimensions$1 = function getElementDimensions(operationData) {
3737
3342
  var _selectedElement$inne, _selectedElement$inne2;
3738
3343
 
3739
3344
  var selectedElement = operationData.selectedElement,
@@ -3748,7 +3353,7 @@ var getElementDimensions = function getElementDimensions(operationData) {
3748
3353
  }
3749
3354
 
3750
3355
  if (modifier) {
3751
- modifyDimensions(dimensions, modifier);
3356
+ dimensions = modifyDimensions(dimensions, modifier);
3752
3357
  }
3753
3358
 
3754
3359
  operationData.dimensions = dimensions;
@@ -3763,7 +3368,7 @@ var getElementDimensions = function getElementDimensions(operationData) {
3763
3368
  * @returns
3764
3369
  */
3765
3370
 
3766
- var getImport = function getImport(operationData) {
3371
+ var getImport$1 = function getImport(operationData) {
3767
3372
  var systemName = operationData.systemName;
3768
3373
 
3769
3374
  var callBack = function callBack(instance) {
@@ -3790,7 +3395,7 @@ var addToCache = function addToCache(key, value) {
3790
3395
  * @returns
3791
3396
  */
3792
3397
 
3793
- var loadJSON = function loadJSON(operationData) {
3398
+ var loadJSON$1 = function loadJSON(operationData) {
3794
3399
  var url = operationData.url,
3795
3400
  cache = operationData.cache,
3796
3401
  _operationData$proper = operationData.propertyName,
@@ -3804,9 +3409,9 @@ var loadJSON = function loadJSON(operationData) {
3804
3409
 
3805
3410
  return new Promise(function (resolve, reject) {
3806
3411
  fetch(url).then( /*#__PURE__*/function () {
3807
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(response) {
3412
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(response) {
3808
3413
  var json, cacheValue;
3809
- return _regeneratorRuntime.wrap(function _callee$(_context) {
3414
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3810
3415
  while (1) {
3811
3416
  switch (_context.prev = _context.next) {
3812
3417
  case 0:
@@ -3841,7 +3446,7 @@ var loadJSON = function loadJSON(operationData) {
3841
3446
  * @param operationData
3842
3447
  * @returns
3843
3448
  */
3844
- var log = function log(operationData) {
3449
+ var log$1 = function log(operationData) {
3845
3450
  console.group('Operation info');
3846
3451
  console.dir({
3847
3452
  context: this
@@ -3859,7 +3464,7 @@ var log = function log(operationData) {
3859
3464
  * @param operationData
3860
3465
  * @returns
3861
3466
  */
3862
- var removeClass = function removeClass(operationData) {
3467
+ var removeClass$1 = function removeClass(operationData) {
3863
3468
  var selectedElement = operationData.selectedElement,
3864
3469
  className = operationData.className;
3865
3470
  selectedElement.removeClass(className);
@@ -3873,7 +3478,7 @@ var removeClass = function removeClass(operationData) {
3873
3478
  * @returns
3874
3479
  */
3875
3480
 
3876
- var removeControllerFromElement = function removeControllerFromElement(operationData) {
3481
+ var removeControllerFromElement$1 = function removeControllerFromElement(operationData) {
3877
3482
  var selectedElement = operationData.selectedElement,
3878
3483
  controllerName = operationData.controllerName;
3879
3484
  var controllers = getElementControllers(selectedElement);
@@ -3896,7 +3501,7 @@ var removeControllerFromElement = function removeControllerFromElement(operation
3896
3501
  * @param operationData
3897
3502
  * @returns
3898
3503
  */
3899
- var removeElement = function removeElement(operationData) {
3504
+ var removeElement$1 = function removeElement(operationData) {
3900
3505
  var selectedElement = operationData.selectedElement;
3901
3506
  selectedElement.remove();
3902
3507
  return operationData;
@@ -3908,7 +3513,7 @@ var removeElement = function removeElement(operationData) {
3908
3513
  * @param operationData
3909
3514
  * @returns
3910
3515
  */
3911
- var removePropertiesFromOperationData = function removePropertiesFromOperationData(operationData) {
3516
+ var removePropertiesFromOperationData$1 = function removePropertiesFromOperationData(operationData) {
3912
3517
  var propertyNames = operationData.propertyNames;
3913
3518
  propertyNames.forEach(function (name) {
3914
3519
  delete operationData[name];
@@ -3924,7 +3529,7 @@ var removePropertiesFromOperationData = function removePropertiesFromOperationDa
3924
3529
  * @param operationData
3925
3530
  * @returns
3926
3531
  */
3927
- var reparentElement = function reparentElement(operationData) {
3532
+ var reparentElement$1 = function reparentElement(operationData) {
3928
3533
  var selectedElement = operationData.selectedElement,
3929
3534
  newParentSelector = operationData.newParentSelector;
3930
3535
  selectedElement.remove().appendTo(newParentSelector);
@@ -3939,7 +3544,7 @@ var reparentElement = function reparentElement(operationData) {
3939
3544
  * @returns
3940
3545
  */
3941
3546
 
3942
- var requestAction = function requestAction(operationData) {
3547
+ var requestAction$1 = function requestAction(operationData) {
3943
3548
  var systemName = operationData.systemName;
3944
3549
 
3945
3550
  var resultCallback = function resultCallback(action) {
@@ -3957,7 +3562,7 @@ var requestAction = function requestAction(operationData) {
3957
3562
  * @returns
3958
3563
  */
3959
3564
 
3960
- var resizeAction = function resizeAction(operationData) {
3565
+ var resizeAction$1 = function resizeAction(operationData) {
3961
3566
  var _operationData = operationData,
3962
3567
  actionInstance = _operationData.actionInstance,
3963
3568
  actionOperationData = _operationData.actionOperationData;
@@ -3995,7 +3600,7 @@ function findElementBySelector(root, selector, operationData, propertyName) {
3995
3600
  */
3996
3601
 
3997
3602
 
3998
- var selectElement = function selectElement(operationData) {
3603
+ var selectElement$1 = function selectElement(operationData) {
3999
3604
  var selector = operationData.selector,
4000
3605
  _operationData$proper = operationData.propertyName,
4001
3606
  propertyName = _operationData$proper === void 0 ? 'selectedElement' : _operationData$proper,
@@ -4026,7 +3631,7 @@ var selectElement = function selectElement(operationData) {
4026
3631
  * @param operationData
4027
3632
  * @returns
4028
3633
  */
4029
- var setElementAttributes = function setElementAttributes(operationData) {
3634
+ var setElementAttributes$1 = function setElementAttributes(operationData) {
4030
3635
  var attributes = operationData.attributes,
4031
3636
  selectedElement = operationData.selectedElement;
4032
3637
  Object.entries(attributes).forEach(function (_ref) {
@@ -4049,7 +3654,7 @@ var setElementAttributes = function setElementAttributes(operationData) {
4049
3654
  * @param operationData
4050
3655
  * @returns
4051
3656
  */
4052
- var setElementContent = function setElementContent(operationData) {
3657
+ var setElementContent$1 = function setElementContent(operationData) {
4053
3658
  var _operationData$insert = operationData.insertionType,
4054
3659
  insertionType = _operationData$insert === void 0 ? 'overwrite' : _operationData$insert,
4055
3660
  selectedElement = operationData.selectedElement,
@@ -4081,7 +3686,7 @@ var setElementContent = function setElementContent(operationData) {
4081
3686
  * @returns
4082
3687
  */
4083
3688
 
4084
- var setOperationData = function setOperationData(operationData) {
3689
+ var setOperationData$1 = function setOperationData(operationData) {
4085
3690
  var _operationData = operationData,
4086
3691
  _operationData$overri = _operationData.override,
4087
3692
  override = _operationData$overri === void 0 ? false : _operationData$overri,
@@ -4109,7 +3714,7 @@ var setOperationData = function setOperationData(operationData) {
4109
3714
  * @returns
4110
3715
  */
4111
3716
 
4112
- var setStyle = function setStyle(operationData) {
3717
+ var setStyle$1 = function setStyle(operationData) {
4113
3718
  var _operationData$proper = operationData.propertyName,
4114
3719
  propertyName = _operationData$proper === void 0 ? 'selectedElement' : _operationData$proper;
4115
3720
  var properties = resolvePropertyValues(operationData, operationData.properties);
@@ -4129,7 +3734,7 @@ var setStyle = function setStyle(operationData) {
4129
3734
  * @returns
4130
3735
  */
4131
3736
 
4132
- var startAction = function startAction(operationData) {
3737
+ var startAction$1 = function startAction(operationData) {
4133
3738
  var _operationData = operationData,
4134
3739
  actionInstance = _operationData.actionInstance,
4135
3740
  actionOperationData = _operationData.actionOperationData;
@@ -4155,7 +3760,7 @@ var startAction = function startAction(operationData) {
4155
3760
  * @param operationData
4156
3761
  * @returns
4157
3762
  */
4158
- var startLoop = function startLoop(operationData) {
3763
+ var startLoop$1 = function startLoop(operationData) {
4159
3764
  var context = this;
4160
3765
  var collection = operationData.collection,
4161
3766
  _operationData$proper = operationData.propertyName,
@@ -4189,7 +3794,7 @@ var startLoop = function startLoop(operationData) {
4189
3794
  * @param operationData
4190
3795
  * @returns
4191
3796
  */
4192
- var toggleClass = function toggleClass(operationData) {
3797
+ var toggleClass$1 = function toggleClass(operationData) {
4193
3798
  var selectedElement = operationData.selectedElement,
4194
3799
  className = operationData.className;
4195
3800
  selectedElement.toggleClass(className);
@@ -4200,66 +3805,66 @@ var toggleClass = function toggleClass(operationData) {
4200
3805
  * This operation toggles the visibility of the specified selected element
4201
3806
  *
4202
3807
  * @param operationData
4203
- * @returns
4204
- */
4205
- var toggleElement = function toggleElement(operationData) {
4206
- operationData.selectedElement.toggle();
4207
- return operationData;
4208
- };
4209
-
4210
- /**
4211
- * This operation waits for the specified amount of milliseconds.
4212
- *
4213
- * @param operationData
4214
- * @returns
4215
- */
4216
-
4217
- var wait = function wait(operationData) {
4218
- var milliseconds = operationData.milliseconds;
4219
- return new Promise(function (resolve) {
4220
- setTimeout(function () {
4221
- internalResolve(resolve, operationData);
4222
- }, milliseconds);
4223
- });
4224
- };
4225
-
4226
- var ops = {
4227
- __proto__: null,
4228
- addClass: addClass,
4229
- addControllerToElement: addControllerToElement,
4230
- animate: animate,
4231
- animateWithClass: animateWithClass,
4232
- broadcastEvent: broadcastEvent,
4233
- clearElement: clearElement,
4234
- clearOperationData: clearOperationData,
4235
- createElement: createElement,
4236
- customFunction: customFunction,
4237
- endAction: endAction,
4238
- endLoop: endLoop,
4239
- extendController: extendController,
4240
- getControllerFromElement: getControllerFromElement,
4241
- getControllerInstance: getControllerInstance,
4242
- getElementDimensions: getElementDimensions,
4243
- getImport: getImport,
4244
- loadJSON: loadJSON,
4245
- log: log,
4246
- removeClass: removeClass,
4247
- removeControllerFromElement: removeControllerFromElement,
4248
- removeElement: removeElement,
4249
- removePropertiesFromOperationData: removePropertiesFromOperationData,
4250
- reparentElement: reparentElement,
4251
- requestAction: requestAction,
4252
- resizeAction: resizeAction,
4253
- selectElement: selectElement,
4254
- setElementAttributes: setElementAttributes,
4255
- setElementContent: setElementContent,
4256
- setOperationData: setOperationData,
4257
- setStyle: setStyle,
4258
- startAction: startAction,
4259
- startLoop: startLoop,
4260
- toggleClass: toggleClass,
4261
- toggleElement: toggleElement,
4262
- wait: wait
3808
+ * @returns
3809
+ */
3810
+ var toggleElement$1 = function toggleElement(operationData) {
3811
+ operationData.selectedElement.toggle();
3812
+ return operationData;
3813
+ };
3814
+
3815
+ /**
3816
+ * This operation waits for the specified amount of milliseconds.
3817
+ *
3818
+ * @param operationData
3819
+ * @returns
3820
+ */
3821
+
3822
+ var wait$1 = function wait(operationData) {
3823
+ var milliseconds = operationData.milliseconds;
3824
+ return new Promise(function (resolve) {
3825
+ setTimeout(function () {
3826
+ internalResolve(resolve, operationData);
3827
+ }, milliseconds);
3828
+ });
3829
+ };
3830
+
3831
+ var ops = {
3832
+ __proto__: null,
3833
+ addClass: addClass$1,
3834
+ addControllerToElement: addControllerToElement$1,
3835
+ animate: animate$1,
3836
+ animateWithClass: animateWithClass$1,
3837
+ broadcastEvent: broadcastEvent$1,
3838
+ clearElement: clearElement$1,
3839
+ clearOperationData: clearOperationData$1,
3840
+ createElement: createElement$1,
3841
+ customFunction: customFunction$1,
3842
+ endAction: endAction$1,
3843
+ endLoop: endLoop$1,
3844
+ extendController: extendController$1,
3845
+ getControllerFromElement: getControllerFromElement$1,
3846
+ getControllerInstance: getControllerInstance$1,
3847
+ getElementDimensions: getElementDimensions$1,
3848
+ getImport: getImport$1,
3849
+ loadJSON: loadJSON$1,
3850
+ log: log$1,
3851
+ removeClass: removeClass$1,
3852
+ removeControllerFromElement: removeControllerFromElement$1,
3853
+ removeElement: removeElement$1,
3854
+ removePropertiesFromOperationData: removePropertiesFromOperationData$1,
3855
+ reparentElement: reparentElement$1,
3856
+ requestAction: requestAction$1,
3857
+ resizeAction: resizeAction$1,
3858
+ selectElement: selectElement$1,
3859
+ setElementAttributes: setElementAttributes$1,
3860
+ setElementContent: setElementContent$1,
3861
+ setOperationData: setOperationData$1,
3862
+ setStyle: setStyle$1,
3863
+ startAction: startAction$1,
3864
+ startLoop: startLoop$1,
3865
+ toggleClass: toggleClass$1,
3866
+ toggleElement: toggleElement$1,
3867
+ wait: wait$1
4263
3868
  };
4264
3869
 
4265
3870
  var JwPlayerTimelineProvider = /*#__PURE__*/function () {
@@ -4799,6 +4404,491 @@ var WebpackResourceImporter = /*#__PURE__*/function () {
4799
4404
  return WebpackResourceImporter;
4800
4405
  }();
4801
4406
 
4407
+ function addClass() {
4408
+ return {
4409
+ description: 'Add a class to the selected element.',
4410
+ dependentProperties: ['selectedElement'],
4411
+ properties: {
4412
+ className: {
4413
+ type: 'ParameterType:className',
4414
+ required: true
4415
+ }
4416
+ }
4417
+ };
4418
+ }
4419
+
4420
+ function addControllerToElement() {
4421
+ return {
4422
+ description: 'Adds the current controller to the selected element(s)',
4423
+ dependentProperties: ['selectedElement', 'controllerInstance']
4424
+ };
4425
+ }
4426
+
4427
+ function animate() {
4428
+ return {
4429
+ description: 'Animates the selected element with the given animation settings.',
4430
+ dependentProperties: ['selectedElement'],
4431
+ properties: {
4432
+ animationEasing: 'ParameterType:boolean',
4433
+ animationProperties: {
4434
+ type: 'ParameterType:object',
4435
+ required: true
4436
+ },
4437
+ animationDuration: {
4438
+ type: 'ParameterType:integer',
4439
+ required: true
4440
+ }
4441
+ }
4442
+ };
4443
+ }
4444
+
4445
+ function animateWithClass() {
4446
+ return {
4447
+ description: 'Animates the selected element by adding the given animation class.',
4448
+ dependentProperties: ['selectedElement'],
4449
+ properties: {
4450
+ className: {
4451
+ type: 'ParameterType:className',
4452
+ required: true
4453
+ },
4454
+ removeClass: 'ParameterType:boolean'
4455
+ }
4456
+ };
4457
+ }
4458
+
4459
+ function broadcastEvent() {
4460
+ return {
4461
+ description: 'Broadcasts an eventbus event with the given type, topic and optional arguments',
4462
+ properties: {
4463
+ eventArgs: 'ParameterType:array',
4464
+ eventTopic: 'ParameterType:eventTopic',
4465
+ eventName: {
4466
+ type: 'ParameterType:eventName',
4467
+ required: true
4468
+ }
4469
+ }
4470
+ };
4471
+ }
4472
+
4473
+ function clearElement() {
4474
+ return {
4475
+ description: 'clears the given element',
4476
+ dependentProperties: ['selectedElement']
4477
+ };
4478
+ }
4479
+
4480
+ function clearOperationData() {
4481
+ return {
4482
+ description: 'clears the current operation data',
4483
+ properties: {
4484
+ properties: 'ParameterType:array'
4485
+ }
4486
+ };
4487
+ }
4488
+
4489
+ function createElement() {
4490
+ return {
4491
+ description: 'Creates an HTML element with the given name and optionally adds the given attributes',
4492
+ properties: {
4493
+ elementName: {
4494
+ type: 'ParameterType:htmlElementName',
4495
+ required: true
4496
+ },
4497
+ attributes: 'ParameterType:object',
4498
+ text: 'ParameterType:string'
4499
+ },
4500
+ outputProperties: {
4501
+ template: 'ParameterType:object'
4502
+ }
4503
+ };
4504
+ }
4505
+
4506
+ function customFunction() {
4507
+ return {
4508
+ description: 'Executes the specified custom function',
4509
+ properties: {
4510
+ systemName: {
4511
+ type: 'ParameterType:systemName',
4512
+ required: true
4513
+ }
4514
+ }
4515
+ };
4516
+ }
4517
+
4518
+ function endAction() {
4519
+ return {
4520
+ description: 'Ends the current action',
4521
+ dependentProperties: ['actionInstance'],
4522
+ properties: {
4523
+ actionOperationData: 'ParameterType:object'
4524
+ }
4525
+ };
4526
+ }
4527
+
4528
+ function endLoop() {
4529
+ return {
4530
+ description: 'Ends the current loop'
4531
+ };
4532
+ }
4533
+
4534
+ function extendController() {
4535
+ return {
4536
+ description: 'Extends the current controller',
4537
+ dependentProperties: ['controllerInstance'],
4538
+ properties: {
4539
+ controllerExtension: 'ParameterType:object'
4540
+ }
4541
+ };
4542
+ }
4543
+
4544
+ function getControllerFromElement() {
4545
+ return {
4546
+ description: 'Retrieves the specified controller from the current element',
4547
+ dependentProperties: ['selectedElement'],
4548
+ properties: {
4549
+ controllerName: {
4550
+ type: 'ParameterType:controllerName',
4551
+ required: true
4552
+ }
4553
+ },
4554
+ outputProperties: {
4555
+ controllerInstance: 'ParameterType:object'
4556
+ }
4557
+ };
4558
+ }
4559
+
4560
+ function getControllerInstance() {
4561
+ return {
4562
+ description: 'Retrieves an instance of the specified controller',
4563
+ properties: {
4564
+ systemName: {
4565
+ type: 'ParameterType:controllerName',
4566
+ required: true
4567
+ },
4568
+ propertyName: {
4569
+ type: 'ParameterType:string',
4570
+ defaultValue: 'controllerInstance'
4571
+ }
4572
+ },
4573
+ outputProperties: {
4574
+ controllerInstance: 'ParameterType:object'
4575
+ }
4576
+ };
4577
+ }
4578
+
4579
+ function getElementDimensions() {
4580
+ return {
4581
+ description: 'Calculates the dimensions for the current element',
4582
+ dependentProperties: ['selectedElement'],
4583
+ properties: {
4584
+ modifier: 'ParameterType:dimensionsModifier'
4585
+ },
4586
+ outputProperties: {
4587
+ dimensions: 'ParameterType:dimensions'
4588
+ }
4589
+ };
4590
+ }
4591
+
4592
+ function getImport() {
4593
+ return {
4594
+ description: 'Retrieves a javascript import specified by the given system name',
4595
+ properties: {
4596
+ systemName: {
4597
+ type: 'ParameterType:systemName',
4598
+ required: true
4599
+ }
4600
+ },
4601
+ outputProperties: {
4602
+ importedInstance: 'ParameterType:object'
4603
+ }
4604
+ };
4605
+ }
4606
+
4607
+ function loadJSON() {
4608
+ return {
4609
+ description: 'Load JSON from the given url',
4610
+ properties: {
4611
+ url: {
4612
+ type: 'ParameterType:url',
4613
+ required: true
4614
+ },
4615
+ cache: 'ParameterType:boolean',
4616
+ propertyName: {
4617
+ type: 'ParameterType:string',
4618
+ defaultValue: 'json'
4619
+ }
4620
+ },
4621
+ outputProperties: {
4622
+ json: 'ParameterType:object'
4623
+ }
4624
+ };
4625
+ }
4626
+
4627
+ function log() {
4628
+ return {
4629
+ description: 'Logs the current context and operation data to the console'
4630
+ };
4631
+ }
4632
+
4633
+ function removeClass() {
4634
+ return {
4635
+ description: 'Removes the specified class from the selected element',
4636
+ dependentProperties: ['selectedElement'],
4637
+ properties: {
4638
+ className: {
4639
+ type: 'ParameterType:className',
4640
+ required: true
4641
+ }
4642
+ }
4643
+ };
4644
+ }
4645
+
4646
+ function removeControllerFromElement() {
4647
+ return {
4648
+ description: 'Removes the specified controller from the selected element',
4649
+ dependentProperties: ['selectedElement'],
4650
+ properties: {
4651
+ controllerName: {
4652
+ type: 'ParameterType:controllerName',
4653
+ required: true
4654
+ }
4655
+ }
4656
+ };
4657
+ }
4658
+
4659
+ function removeElement() {
4660
+ return {
4661
+ description: 'Removes the selected element from the DOM',
4662
+ dependentProperties: ['selectedElement']
4663
+ };
4664
+ }
4665
+
4666
+ function removePropertiesFromOperationData() {
4667
+ return {
4668
+ description: 'Removes the specified properties from the current operation data',
4669
+ properties: {
4670
+ propertyNames: 'ParameterType:array'
4671
+ }
4672
+ };
4673
+ }
4674
+
4675
+ function reparentElement() {
4676
+ return {
4677
+ description: 'Moves the selected element to the new location described by the given selector',
4678
+ dependentProperties: ['selectedElement'],
4679
+ properties: {
4680
+ newParentSelector: {
4681
+ type: 'ParameterType:selector',
4682
+ required: true
4683
+ }
4684
+ }
4685
+ };
4686
+ }
4687
+
4688
+ function requestAction() {
4689
+ return {
4690
+ description: 'Retrieves an instance of the specified action',
4691
+ properties: {
4692
+ systemName: {
4693
+ type: 'ParameterType:actionName'
4694
+ }
4695
+ },
4696
+ outputProperties: {
4697
+ actionInstance: 'ParameterType:object'
4698
+ }
4699
+ };
4700
+ }
4701
+
4702
+ function resizeAction() {
4703
+ return {
4704
+ description: 'Triggers a resize on the current action',
4705
+ dependentProperties: ['actionInstance'],
4706
+ properties: {
4707
+ actionOperationData: 'ParameterType:object'
4708
+ }
4709
+ };
4710
+ }
4711
+
4712
+ function selectElement() {
4713
+ return {
4714
+ description: 'Selects an element using the given selector',
4715
+ properties: {
4716
+ selector: {
4717
+ type: 'ParameterType:selector',
4718
+ required: true
4719
+ },
4720
+ propertyName: 'ParameterType:string',
4721
+ useSelectedElementAsRoot: 'ParameterType:boolean'
4722
+ },
4723
+ outputProperties: {
4724
+ selectedElement: 'ParameterType:object'
4725
+ }
4726
+ };
4727
+ }
4728
+
4729
+ function setElementAttributes() {
4730
+ return {
4731
+ description: 'Sets the given attributes on the selected element',
4732
+ dependentProperties: ['selectedElement'],
4733
+ properties: {
4734
+ attributes: {
4735
+ type: 'ParameterType:object',
4736
+ required: true
4737
+ }
4738
+ }
4739
+ };
4740
+ }
4741
+
4742
+ function setElementContent() {
4743
+ return {
4744
+ description: 'Sets the given HTML content in the selected element',
4745
+ dependentProperties: ['selectedElement'],
4746
+ properties: {
4747
+ insertionType: [{
4748
+ value: 'overwrite',
4749
+ description: 'the contents of the selected element are replaced by the given template',
4750
+ "default": true
4751
+ }, {
4752
+ value: 'append',
4753
+ description: 'the new content will be inserted after the current content'
4754
+ }, {
4755
+ value: 'prepend',
4756
+ description: 'the new content will be inserted before the current content'
4757
+ }],
4758
+ template: {
4759
+ type: 'ParameterType:htmlContent',
4760
+ required: true
4761
+ }
4762
+ }
4763
+ };
4764
+ }
4765
+
4766
+ function setOperationData() {
4767
+ return {
4768
+ description: 'Sets the given properties on the current operation data',
4769
+ properties: {
4770
+ properties: {
4771
+ type: 'ParameterType:object',
4772
+ required: true
4773
+ },
4774
+ override: 'ParameterType:boolean'
4775
+ }
4776
+ };
4777
+ }
4778
+
4779
+ function setStyle() {
4780
+ return {
4781
+ description: 'Sets the given style properties on the selected element',
4782
+ properties: {
4783
+ properties: {
4784
+ type: 'ParameterType:object',
4785
+ required: true
4786
+ },
4787
+ propertyName: {
4788
+ type: 'ParameterType:string',
4789
+ required: false
4790
+ }
4791
+ }
4792
+ };
4793
+ }
4794
+
4795
+ function startAction() {
4796
+ return {
4797
+ description: 'Starts the selected action',
4798
+ dependentProperties: ['actionInstance'],
4799
+ properties: {
4800
+ actionOperationData: 'ParameterType:object'
4801
+ }
4802
+ };
4803
+ }
4804
+
4805
+ function startLoop() {
4806
+ return {
4807
+ description: 'Starts a loop over the given collection',
4808
+ properties: {
4809
+ collection: {
4810
+ type: 'ParameterType:array',
4811
+ required: true
4812
+ },
4813
+ propertyName: {
4814
+ type: 'ParameterType:string',
4815
+ defaultValue: 'currentItem'
4816
+ }
4817
+ }
4818
+ };
4819
+ }
4820
+
4821
+ function toggleClass() {
4822
+ return {
4823
+ description: 'Toggles the given class on the selected element',
4824
+ dependentProperties: ['selectedElement'],
4825
+ properties: {
4826
+ className: {
4827
+ type: 'ParameterType:className',
4828
+ required: true
4829
+ }
4830
+ }
4831
+ };
4832
+ }
4833
+
4834
+ function toggleElement() {
4835
+ return {
4836
+ description: 'Toggles the selected element',
4837
+ dependentProperties: ['selectedElement']
4838
+ };
4839
+ }
4840
+
4841
+ function wait() {
4842
+ return {
4843
+ description: 'Waits the given amount of milliseconds before the action continues',
4844
+ properties: {
4845
+ milliseconds: {
4846
+ type: 'ParameterType:integer',
4847
+ required: true
4848
+ }
4849
+ }
4850
+ };
4851
+ }
4852
+
4853
+ var index = {
4854
+ __proto__: null,
4855
+ addClass: addClass,
4856
+ addControllerToElement: addControllerToElement,
4857
+ animate: animate,
4858
+ animateWithClass: animateWithClass,
4859
+ broadcastEvent: broadcastEvent,
4860
+ clearElement: clearElement,
4861
+ clearOperationData: clearOperationData,
4862
+ createElement: createElement,
4863
+ customFunction: customFunction,
4864
+ endAction: endAction,
4865
+ endLoop: endLoop,
4866
+ extendController: extendController,
4867
+ getControllerFromElement: getControllerFromElement,
4868
+ getControllerInstance: getControllerInstance,
4869
+ getElementDimensions: getElementDimensions,
4870
+ getImport: getImport,
4871
+ loadJSON: loadJSON,
4872
+ log: log,
4873
+ removeClass: removeClass,
4874
+ removeControllerFromElement: removeControllerFromElement,
4875
+ removeElement: removeElement,
4876
+ removePropertiesFromOperationData: removePropertiesFromOperationData,
4877
+ reparentElement: reparentElement,
4878
+ requestAction: requestAction,
4879
+ resizeAction: resizeAction,
4880
+ selectElement: selectElement,
4881
+ setElementAttributes: setElementAttributes,
4882
+ setElementContent: setElementContent,
4883
+ setOperationData: setOperationData,
4884
+ setStyle: setStyle,
4885
+ startAction: startAction,
4886
+ startLoop: startLoop,
4887
+ toggleClass: toggleClass,
4888
+ toggleElement: toggleElement,
4889
+ wait: wait
4890
+ };
4891
+
4802
4892
  exports.Action = Action;
4803
4893
  exports.ActionRegistryEventbusListener = ActionRegistryEventbusListener;
4804
4894
  exports.ConfigurationResolver = ConfigurationResolver;
@@ -4820,39 +4910,40 @@ exports.SubtitlesController = SubtitlesController;
4820
4910
  exports.TimelineAction = TimelineAction;
4821
4911
  exports.TimelineEventNames = TimelineEventNames;
4822
4912
  exports.WebpackResourceImporter = WebpackResourceImporter;
4823
- exports.addClass = addClass;
4824
- exports.addControllerToElement = addControllerToElement;
4825
- exports.animate = animate;
4826
- exports.animateWithClass = animateWithClass;
4827
- exports.broadcastEvent = broadcastEvent;
4828
- exports.clearElement = clearElement;
4829
- exports.clearOperationData = clearOperationData;
4830
- exports.createElement = createElement;
4831
- exports.customFunction = customFunction;
4832
- exports.endAction = endAction;
4833
- exports.endLoop = endLoop;
4834
- exports.extendController = extendController;
4835
- exports.getControllerFromElement = getControllerFromElement;
4836
- exports.getControllerInstance = getControllerInstance;
4837
- exports.getElementDimensions = getElementDimensions;
4838
- exports.getImport = getImport;
4839
- exports.loadJSON = loadJSON;
4840
- exports.log = log;
4841
- exports.removeClass = removeClass;
4842
- exports.removeControllerFromElement = removeControllerFromElement;
4843
- exports.removeElement = removeElement;
4844
- exports.removePropertiesFromOperationData = removePropertiesFromOperationData;
4845
- exports.reparentElement = reparentElement;
4846
- exports.requestAction = requestAction;
4847
- exports.resizeAction = resizeAction;
4848
- exports.selectElement = selectElement;
4849
- exports.setElementAttributes = setElementAttributes;
4850
- exports.setElementContent = setElementContent;
4851
- exports.setOperationData = setOperationData;
4852
- exports.setStyle = setStyle;
4853
- exports.startAction = startAction;
4854
- exports.startLoop = startLoop;
4855
- exports.toggleClass = toggleClass;
4856
- exports.toggleElement = toggleElement;
4857
- exports.wait = wait;
4913
+ exports.addClass = addClass$1;
4914
+ exports.addControllerToElement = addControllerToElement$1;
4915
+ exports.animate = animate$1;
4916
+ exports.animateWithClass = animateWithClass$1;
4917
+ exports.broadcastEvent = broadcastEvent$1;
4918
+ exports.clearElement = clearElement$1;
4919
+ exports.clearOperationData = clearOperationData$1;
4920
+ exports.createElement = createElement$1;
4921
+ exports.customFunction = customFunction$1;
4922
+ exports.endAction = endAction$1;
4923
+ exports.endLoop = endLoop$1;
4924
+ exports.extendController = extendController$1;
4925
+ exports.getControllerFromElement = getControllerFromElement$1;
4926
+ exports.getControllerInstance = getControllerInstance$1;
4927
+ exports.getElementDimensions = getElementDimensions$1;
4928
+ exports.getImport = getImport$1;
4929
+ exports.loadJSON = loadJSON$1;
4930
+ exports.log = log$1;
4931
+ exports.metadata = index;
4932
+ exports.removeClass = removeClass$1;
4933
+ exports.removeControllerFromElement = removeControllerFromElement$1;
4934
+ exports.removeElement = removeElement$1;
4935
+ exports.removePropertiesFromOperationData = removePropertiesFromOperationData$1;
4936
+ exports.reparentElement = reparentElement$1;
4937
+ exports.requestAction = requestAction$1;
4938
+ exports.resizeAction = resizeAction$1;
4939
+ exports.selectElement = selectElement$1;
4940
+ exports.setElementAttributes = setElementAttributes$1;
4941
+ exports.setElementContent = setElementContent$1;
4942
+ exports.setOperationData = setOperationData$1;
4943
+ exports.setStyle = setStyle$1;
4944
+ exports.startAction = startAction$1;
4945
+ exports.startLoop = startLoop$1;
4946
+ exports.toggleClass = toggleClass$1;
4947
+ exports.toggleElement = toggleElement$1;
4948
+ exports.wait = wait$1;
4858
4949
  //# sourceMappingURL=eligius.cjs.development.js.map