camunda-bpmn-js 0.20.0 → 0.21.1

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.
@@ -14,10 +14,10 @@
14
14
  * @return {Array<?>}
15
15
  */
16
16
 
17
- const nativeToString$4 = Object.prototype.toString;
18
- const nativeHasOwnProperty$3 = Object.prototype.hasOwnProperty;
17
+ const nativeToString$1 = Object.prototype.toString;
18
+ const nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
19
19
 
20
- function isUndefined$4(obj) {
20
+ function isUndefined$2(obj) {
21
21
  return obj === undefined;
22
22
  }
23
23
 
@@ -25,20 +25,20 @@
25
25
  return obj !== undefined;
26
26
  }
27
27
 
28
- function isArray$4(obj) {
29
- return nativeToString$4.call(obj) === '[object Array]';
28
+ function isArray$2(obj) {
29
+ return nativeToString$1.call(obj) === '[object Array]';
30
30
  }
31
31
 
32
- function isObject$1(obj) {
33
- return nativeToString$4.call(obj) === '[object Object]';
32
+ function isObject(obj) {
33
+ return nativeToString$1.call(obj) === '[object Object]';
34
34
  }
35
35
 
36
36
  function isNumber(obj) {
37
- return nativeToString$4.call(obj) === '[object Number]';
37
+ return nativeToString$1.call(obj) === '[object Number]';
38
38
  }
39
39
 
40
- function isFunction$1(obj) {
41
- const tag = nativeToString$4.call(obj);
40
+ function isFunction(obj) {
41
+ const tag = nativeToString$1.call(obj);
42
42
 
43
43
  return (
44
44
  tag === '[object Function]' ||
@@ -49,8 +49,8 @@
49
49
  );
50
50
  }
51
51
 
52
- function isString$3(obj) {
53
- return nativeToString$4.call(obj) === '[object String]';
52
+ function isString(obj) {
53
+ return nativeToString$1.call(obj) === '[object String]';
54
54
  }
55
55
 
56
56
  /**
@@ -61,8 +61,8 @@
61
61
  *
62
62
  * @return {Boolean}
63
63
  */
64
- function has$3(target, key) {
65
- return nativeHasOwnProperty$3.call(target, key);
64
+ function has$1(target, key) {
65
+ return nativeHasOwnProperty$1.call(target, key);
66
66
  }
67
67
 
68
68
  /**
@@ -73,13 +73,13 @@
73
73
  *
74
74
  * @return {Object}
75
75
  */
76
- function find$1(collection, matcher) {
76
+ function find(collection, matcher) {
77
77
 
78
- matcher = toMatcher$1(matcher);
78
+ matcher = toMatcher(matcher);
79
79
 
80
80
  let match;
81
81
 
82
- forEach$3(collection, function(val, key) {
82
+ forEach$1(collection, function(val, key) {
83
83
  if (matcher(val, key)) {
84
84
  match = val;
85
85
 
@@ -92,6 +92,32 @@
92
92
  }
93
93
 
94
94
 
95
+ /**
96
+ * Find element index in collection.
97
+ *
98
+ * @param {Array|Object} collection
99
+ * @param {Function} matcher
100
+ *
101
+ * @return {Object}
102
+ */
103
+ function findIndex(collection, matcher) {
104
+
105
+ matcher = toMatcher(matcher);
106
+
107
+ let idx = isArray$2(collection) ? -1 : undefined;
108
+
109
+ forEach$1(collection, function(val, key) {
110
+ if (matcher(val, key)) {
111
+ idx = key;
112
+
113
+ return false;
114
+ }
115
+ });
116
+
117
+ return idx;
118
+ }
119
+
120
+
95
121
  /**
96
122
  * Find element in collection.
97
123
  *
@@ -100,11 +126,11 @@
100
126
  *
101
127
  * @return {Array} result
102
128
  */
103
- function filter$1(collection, matcher) {
129
+ function filter(collection, matcher) {
104
130
 
105
131
  let result = [];
106
132
 
107
- forEach$3(collection, function(val, key) {
133
+ forEach$1(collection, function(val, key) {
108
134
  if (matcher(val, key)) {
109
135
  result.push(val);
110
136
  }
@@ -123,20 +149,20 @@
123
149
  *
124
150
  * @return {Object} return result that stopped the iteration
125
151
  */
126
- function forEach$3(collection, iterator) {
152
+ function forEach$1(collection, iterator) {
127
153
 
128
154
  let val,
129
155
  result;
130
156
 
131
- if (isUndefined$4(collection)) {
157
+ if (isUndefined$2(collection)) {
132
158
  return;
133
159
  }
134
160
 
135
- const convertKey = isArray$4(collection) ? toNum$3 : identity$3;
161
+ const convertKey = isArray$2(collection) ? toNum$1 : identity$1;
136
162
 
137
163
  for (let key in collection) {
138
164
 
139
- if (has$3(collection, key)) {
165
+ if (has$1(collection, key)) {
140
166
  val = collection[key];
141
167
 
142
168
  result = iterator(val, convertKey(key));
@@ -160,7 +186,7 @@
160
186
  */
161
187
  function reduce(collection, iterator, result) {
162
188
 
163
- forEach$3(collection, function(value, idx) {
189
+ forEach$1(collection, function(value, idx) {
164
190
  result = iterator(result, value, idx);
165
191
  });
166
192
 
@@ -196,7 +222,7 @@
196
222
  */
197
223
  function some(collection, matcher) {
198
224
 
199
- return !!find$1(collection, matcher);
225
+ return !!find(collection, matcher);
200
226
  }
201
227
 
202
228
 
@@ -213,7 +239,7 @@
213
239
 
214
240
  let result = [];
215
241
 
216
- forEach$3(collection, function(val, key) {
242
+ forEach$1(collection, function(val, key) {
217
243
  result.push(fn(val, key));
218
244
  });
219
245
 
@@ -246,18 +272,18 @@
246
272
  }
247
273
 
248
274
 
249
- function toMatcher$1(matcher) {
250
- return isFunction$1(matcher) ? matcher : (e) => {
275
+ function toMatcher(matcher) {
276
+ return isFunction(matcher) ? matcher : (e) => {
251
277
  return e === matcher;
252
278
  };
253
279
  }
254
280
 
255
281
 
256
- function identity$3(arg) {
282
+ function identity$1(arg) {
257
283
  return arg;
258
284
  }
259
285
 
260
- function toNum$3(arg) {
286
+ function toNum$1(arg) {
261
287
  return Number(arg);
262
288
  }
263
289
 
@@ -343,7 +369,7 @@
343
369
  *
344
370
  * @return {Function} bound function
345
371
  */
346
- function bind$3(fn, target) {
372
+ function bind$2(fn, target) {
347
373
  return fn.bind(target);
348
374
  }
349
375
 
@@ -355,10 +381,34 @@
355
381
  *
356
382
  * @return {Object} the target
357
383
  */
358
- function assign$4(target, ...others) {
384
+ function assign$1(target, ...others) {
359
385
  return Object.assign(target, ...others);
360
386
  }
361
387
 
388
+ /**
389
+ * Pick given properties from the target object.
390
+ *
391
+ * @param {Object} target
392
+ * @param {Array} properties
393
+ *
394
+ * @return {Object} target
395
+ */
396
+ function pick(target, properties) {
397
+
398
+ let result = {};
399
+
400
+ let obj = Object(target);
401
+
402
+ forEach$1(properties, function(prop) {
403
+
404
+ if (prop in obj) {
405
+ result[prop] = target[prop];
406
+ }
407
+ });
408
+
409
+ return result;
410
+ }
411
+
362
412
  /**
363
413
  * Pick all target properties, excluding the given ones.
364
414
  *
@@ -373,7 +423,7 @@
373
423
 
374
424
  let obj = Object(target);
375
425
 
376
- forEach$3(obj, function(prop, key) {
426
+ forEach$1(obj, function(prop, key) {
377
427
 
378
428
  if (properties.indexOf(key) === -1) {
379
429
  result[key] = prop;
@@ -1325,14 +1375,17 @@
1325
1375
  * @return {Array<?>}
1326
1376
  */
1327
1377
 
1328
- var nativeToString$3 = Object.prototype.toString;
1329
- var nativeHasOwnProperty$2 = Object.prototype.hasOwnProperty;
1330
- function isUndefined$3(obj) {
1378
+ const nativeToString = Object.prototype.toString;
1379
+ const nativeHasOwnProperty = Object.prototype.hasOwnProperty;
1380
+
1381
+ function isUndefined$1(obj) {
1331
1382
  return obj === undefined;
1332
1383
  }
1333
- function isArray$3(obj) {
1334
- return nativeToString$3.call(obj) === '[object Array]';
1384
+
1385
+ function isArray$1(obj) {
1386
+ return nativeToString.call(obj) === '[object Array]';
1335
1387
  }
1388
+
1336
1389
  /**
1337
1390
  * Return true, if target owns a property with the given key.
1338
1391
  *
@@ -1341,10 +1394,11 @@
1341
1394
  *
1342
1395
  * @return {Boolean}
1343
1396
  */
1344
-
1345
- function has$2(target, key) {
1346
- return nativeHasOwnProperty$2.call(target, key);
1397
+ function has(target, key) {
1398
+ return nativeHasOwnProperty.call(target, key);
1347
1399
  }
1400
+
1401
+
1348
1402
  /**
1349
1403
  * Iterate over collection; returning something
1350
1404
  * (non-undefined) will stop iteration.
@@ -1354,19 +1408,22 @@
1354
1408
  *
1355
1409
  * @return {Object} return result that stopped the iteration
1356
1410
  */
1411
+ function forEach(collection, iterator) {
1357
1412
 
1358
- function forEach$2(collection, iterator) {
1359
- var val, result;
1413
+ let val,
1414
+ result;
1360
1415
 
1361
- if (isUndefined$3(collection)) {
1416
+ if (isUndefined$1(collection)) {
1362
1417
  return;
1363
1418
  }
1364
1419
 
1365
- var convertKey = isArray$3(collection) ? toNum$2 : identity$2;
1420
+ const convertKey = isArray$1(collection) ? toNum : identity;
1366
1421
 
1367
- for (var key in collection) {
1368
- if (has$2(collection, key)) {
1422
+ for (let key in collection) {
1423
+
1424
+ if (has(collection, key)) {
1369
1425
  val = collection[key];
1426
+
1370
1427
  result = iterator(val, convertKey(key));
1371
1428
 
1372
1429
  if (result === false) {
@@ -1376,11 +1433,12 @@
1376
1433
  }
1377
1434
  }
1378
1435
 
1379
- function identity$2(arg) {
1436
+
1437
+ function identity(arg) {
1380
1438
  return arg;
1381
1439
  }
1382
1440
 
1383
- function toNum$2(arg) {
1441
+ function toNum(arg) {
1384
1442
  return Number(arg);
1385
1443
  }
1386
1444
 
@@ -1392,15 +1450,15 @@
1392
1450
  *
1393
1451
  * @return {Element} the element
1394
1452
  */
1395
- function assign$3(element, ...styleSources) {
1453
+ function assign(element, ...styleSources) {
1396
1454
  const target = element.style;
1397
1455
 
1398
- forEach$2(styleSources, function(style) {
1456
+ forEach(styleSources, function(style) {
1399
1457
  if (!style) {
1400
1458
  return;
1401
1459
  }
1402
1460
 
1403
- forEach$2(style, function(value, key) {
1461
+ forEach(style, function(value, key) {
1404
1462
  target[key] = value;
1405
1463
  });
1406
1464
  });
@@ -1685,7 +1743,7 @@
1685
1743
  // when delegating.
1686
1744
  var forceCaptureEvents = [ 'focus', 'blur' ];
1687
1745
 
1688
- function bind$2(el, selector, type, fn, capture) {
1746
+ function bind(el, selector, type, fn, capture) {
1689
1747
  if (forceCaptureEvents.indexOf(type) !== -1) {
1690
1748
  capture = true;
1691
1749
  }
@@ -1717,7 +1775,7 @@
1717
1775
  }
1718
1776
 
1719
1777
  var delegate = {
1720
- bind: bind$2,
1778
+ bind,
1721
1779
  unbind
1722
1780
  };
1723
1781
 
@@ -2654,7 +2712,7 @@
2654
2712
  var computeStyle = styles.computeStyle;
2655
2713
 
2656
2714
  function addMarker(id, options) {
2657
- var attrs = assign$4({
2715
+ var attrs = assign$1({
2658
2716
  fill: black,
2659
2717
  strokeWidth: 1,
2660
2718
  strokeLinecap: 'round',
@@ -2826,7 +2884,7 @@
2826
2884
 
2827
2885
  function drawCircle(parentGfx, width, height, offset, attrs) {
2828
2886
 
2829
- if (isObject$1(offset)) {
2887
+ if (isObject(offset)) {
2830
2888
  attrs = offset;
2831
2889
  offset = 0;
2832
2890
  }
@@ -2861,7 +2919,7 @@
2861
2919
 
2862
2920
  function drawRect(parentGfx, width, height, r, offset, attrs) {
2863
2921
 
2864
- if (isObject$1(offset)) {
2922
+ if (isObject(offset)) {
2865
2923
  attrs = offset;
2866
2924
  offset = 0;
2867
2925
  }
@@ -2949,7 +3007,7 @@
2949
3007
  }
2950
3008
 
2951
3009
  function drawMarker(type, parentGfx, path, attrs) {
2952
- return drawPath(parentGfx, path, assign$4({ 'data-marker': type }, attrs));
3010
+ return drawPath(parentGfx, path, assign$1({ 'data-marker': type }, attrs));
2953
3011
  }
2954
3012
 
2955
3013
  function renderer(type) {
@@ -3021,7 +3079,7 @@
3021
3079
 
3022
3080
  function renderLabel(parentGfx, label, options) {
3023
3081
 
3024
- options = assign$4({
3082
+ options = assign$1({
3025
3083
  size: {
3026
3084
  width: 100
3027
3085
  }
@@ -3061,7 +3119,7 @@
3061
3119
  return renderLabel(parentGfx, getLabel(element), {
3062
3120
  box: box,
3063
3121
  fitBox: true,
3064
- style: assign$4(
3122
+ style: assign$1(
3065
3123
  {},
3066
3124
  textRenderer.getExternalStyle(),
3067
3125
  {
@@ -3663,7 +3721,7 @@
3663
3721
  return task;
3664
3722
  },
3665
3723
  'bpmn:SubProcess': function(parentGfx, element, attrs) {
3666
- attrs = assign$4({
3724
+ attrs = assign$1({
3667
3725
  fill: getFillColor(element, defaultFillColor),
3668
3726
  stroke: getStrokeColor(element, defaultStrokeColor)
3669
3727
  }, attrs);
@@ -3749,7 +3807,7 @@
3749
3807
  return lane;
3750
3808
  },
3751
3809
  'bpmn:Lane': function(parentGfx, element, attrs) {
3752
- var rect = drawRect(parentGfx, element.width, element.height, 0, assign$4({
3810
+ var rect = drawRect(parentGfx, element.width, element.height, 0, assign$1({
3753
3811
  fill: getFillColor(element, defaultFillColor),
3754
3812
  fillOpacity: HIGH_FILL_OPACITY,
3755
3813
  stroke: getStrokeColor(element, defaultStrokeColor)
@@ -3971,7 +4029,7 @@
3971
4029
  var fill = getFillColor(element, defaultFillColor),
3972
4030
  stroke = getStrokeColor(element, defaultStrokeColor);
3973
4031
 
3974
- attrs = assign$4({
4032
+ attrs = assign$1({
3975
4033
  strokeDasharray: '0.5, 5',
3976
4034
  strokeLinecap: 'round',
3977
4035
  strokeLinejoin: 'round',
@@ -4159,12 +4217,12 @@
4159
4217
  }
4160
4218
 
4161
4219
  // apply fillOpacity
4162
- var outerAttrs = assign$4({}, attrs, {
4220
+ var outerAttrs = assign$1({}, attrs, {
4163
4221
  fillOpacity: 1
4164
4222
  });
4165
4223
 
4166
4224
  // apply no-fill
4167
- var innerAttrs = assign$4({}, attrs, {
4225
+ var innerAttrs = assign$1({}, attrs, {
4168
4226
  fill: 'none'
4169
4227
  });
4170
4228
 
@@ -4387,7 +4445,7 @@
4387
4445
  };
4388
4446
  }
4389
4447
 
4390
- forEach$3(taskMarkers, function(marker) {
4448
+ forEach$1(taskMarkers, function(marker) {
4391
4449
  renderer(marker)(parentGfx, element, position);
4392
4450
  });
4393
4451
 
@@ -4515,8 +4573,8 @@
4515
4573
 
4516
4574
  function parsePadding(padding) {
4517
4575
 
4518
- if (isObject$1(padding)) {
4519
- return assign$4({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
4576
+ if (isObject(padding)) {
4577
+ return assign$1({ top: 0, left: 0, right: 0, bottom: 0 }, padding);
4520
4578
  } else {
4521
4579
  return {
4522
4580
  top: padding,
@@ -4680,7 +4738,7 @@
4680
4738
  id: 'helper-svg'
4681
4739
  });
4682
4740
 
4683
- assign$3(helperSvg, {
4741
+ assign(helperSvg, {
4684
4742
  visibility: 'hidden',
4685
4743
  position: 'fixed',
4686
4744
  width: 0,
@@ -4705,7 +4763,7 @@
4705
4763
  */
4706
4764
  function Text(config) {
4707
4765
 
4708
- this._config = assign$4({}, {
4766
+ this._config = assign$1({}, {
4709
4767
  size: DEFAULT_LABEL_SIZE$1,
4710
4768
  padding: DEFAULT_BOX_PADDING,
4711
4769
  style: {},
@@ -4754,8 +4812,8 @@
4754
4812
  * @return {Object} { element, dimensions }
4755
4813
  */
4756
4814
  Text.prototype.layoutText = function(text, options) {
4757
- var box = assign$4({}, this._config.size, options.box),
4758
- style = assign$4({}, this._config.style, options.style),
4815
+ var box = assign$1({}, this._config.size, options.box),
4816
+ style = assign$1({}, this._config.style, options.style),
4759
4817
  align = parseAlign(options.align || this._config.align),
4760
4818
  padding = parsePadding(options.padding !== undefined ? options.padding : this._config.padding),
4761
4819
  fitBox = options.fitBox || false;
@@ -4811,7 +4869,7 @@
4811
4869
 
4812
4870
  // layout each line taking into account that parent
4813
4871
  // shape might resize to fit text size
4814
- forEach$3(layouted, function(line) {
4872
+ forEach$1(layouted, function(line) {
4815
4873
 
4816
4874
  var x;
4817
4875
 
@@ -4870,7 +4928,7 @@
4870
4928
 
4871
4929
  function TextRenderer(config) {
4872
4930
 
4873
- var defaultStyle = assign$4({
4931
+ var defaultStyle = assign$1({
4874
4932
  fontFamily: 'Arial, sans-serif',
4875
4933
  fontSize: DEFAULT_FONT_SIZE,
4876
4934
  fontWeight: 'normal',
@@ -4879,7 +4937,7 @@
4879
4937
 
4880
4938
  var fontSize = parseInt(defaultStyle.fontSize, 10) - 1;
4881
4939
 
4882
- var externalStyle = assign$4({}, defaultStyle, {
4940
+ var externalStyle = assign$1({}, defaultStyle, {
4883
4941
  fontSize: fontSize
4884
4942
  }, config && config.externalStyle || {});
4885
4943
 
@@ -5615,7 +5673,7 @@
5615
5673
  size = DEFAULT_LABEL_SIZE;
5616
5674
  }
5617
5675
 
5618
- return assign$4({
5676
+ return assign$1({
5619
5677
  x: mid.x - size.width / 2,
5620
5678
  y: mid.y - size.height / 2
5621
5679
  }, size);
@@ -5785,7 +5843,7 @@
5785
5843
  * @return {Object}
5786
5844
  */
5787
5845
  function elementData(semantic, di, attrs) {
5788
- return assign$4({
5846
+ return assign$1({
5789
5847
  id: semantic.id,
5790
5848
  type: semantic.$type,
5791
5849
  businessObject: semantic,
@@ -6340,13 +6398,13 @@
6340
6398
  }
6341
6399
 
6342
6400
  function registerEvents(svg) {
6343
- forEach$3(bindings, function(val, key) {
6401
+ forEach$1(bindings, function(val, key) {
6344
6402
  registerEvent(svg, key, val);
6345
6403
  });
6346
6404
  }
6347
6405
 
6348
6406
  function unregisterEvents(svg) {
6349
- forEach$3(bindings, function(val, key) {
6407
+ forEach$1(bindings, function(val, key) {
6350
6408
  unregisterEvent(svg, key, val);
6351
6409
  });
6352
6410
  }
@@ -6417,7 +6475,7 @@
6417
6475
 
6418
6476
  function createHitStyle(classNames, attrs) {
6419
6477
 
6420
- attrs = assign$4({
6478
+ attrs = assign$1({
6421
6479
  stroke: 'white',
6422
6480
  strokeWidth: 15
6423
6481
  }, attrs || {});
@@ -6456,7 +6514,7 @@
6456
6514
  this.removeHits = function(gfx) {
6457
6515
  var hits = all('.djs-hit', gfx);
6458
6516
 
6459
- forEach$3(hits, remove$3);
6517
+ forEach$1(hits, remove$3);
6460
6518
  };
6461
6519
 
6462
6520
  /**
@@ -6515,7 +6573,7 @@
6515
6573
  */
6516
6574
  this.createBoxHit = function(gfx, type, attrs) {
6517
6575
 
6518
- attrs = assign$4({
6576
+ attrs = assign$1({
6519
6577
  x: 0,
6520
6578
  y: 0
6521
6579
  }, attrs);
@@ -6672,7 +6730,7 @@
6672
6730
  function getBBox(elements, stopRecursion) {
6673
6731
 
6674
6732
  stopRecursion = !!stopRecursion;
6675
- if (!isArray$4(elements)) {
6733
+ if (!isArray$2(elements)) {
6676
6734
  elements = [ elements ];
6677
6735
  }
6678
6736
 
@@ -6681,7 +6739,7 @@
6681
6739
  maxX,
6682
6740
  maxY;
6683
6741
 
6684
- forEach$3(elements, function(element) {
6742
+ forEach$1(elements, function(element) {
6685
6743
 
6686
6744
  // If element is a connection the bbox must be computed first
6687
6745
  var bbox = element;
@@ -6760,7 +6818,7 @@
6760
6818
  function createOutline(gfx, bounds) {
6761
6819
  var outline = create$2('rect');
6762
6820
 
6763
- attr$2(outline, assign$4({
6821
+ attr$2(outline, assign$1({
6764
6822
  x: 10,
6765
6823
  y: 10,
6766
6824
  rx: 3,
@@ -6919,7 +6977,7 @@
6919
6977
  var selectedElements = this._selectedElements,
6920
6978
  oldSelection = selectedElements.slice();
6921
6979
 
6922
- if (!isArray$4(elements)) {
6980
+ if (!isArray$2(elements)) {
6923
6981
  elements = elements ? [ elements ] : [];
6924
6982
  }
6925
6983
 
@@ -6936,7 +6994,7 @@
6936
6994
  // selection may be cleared by passing an empty array or null
6937
6995
  // to the method
6938
6996
  if (add) {
6939
- forEach$3(elements, function(element) {
6997
+ forEach$1(elements, function(element) {
6940
6998
  if (selectedElements.indexOf(element) !== -1) {
6941
6999
 
6942
7000
  // already selected
@@ -7005,13 +7063,13 @@
7005
7063
  var oldSelection = event.oldSelection,
7006
7064
  newSelection = event.newSelection;
7007
7065
 
7008
- forEach$3(oldSelection, function(e) {
7066
+ forEach$1(oldSelection, function(e) {
7009
7067
  if (newSelection.indexOf(e) === -1) {
7010
7068
  deselect(e);
7011
7069
  }
7012
7070
  });
7013
7071
 
7014
- forEach$3(newSelection, function(e) {
7072
+ forEach$1(newSelection, function(e) {
7015
7073
  if (oldSelection.indexOf(e) === -1) {
7016
7074
  select(e);
7017
7075
  }
@@ -7053,7 +7111,7 @@
7053
7111
 
7054
7112
  var rect = create$2('rect');
7055
7113
 
7056
- attr$2(rect, assign$4({
7114
+ attr$2(rect, assign$1({
7057
7115
  rx: 3
7058
7116
  }, bBox));
7059
7117
 
@@ -7090,7 +7148,7 @@
7090
7148
  return;
7091
7149
  }
7092
7150
 
7093
- if (isArray$4(autoSelect)) {
7151
+ if (isArray$2(autoSelect)) {
7094
7152
  selection.select(autoSelect);
7095
7153
  } else {
7096
7154
 
@@ -7117,7 +7175,7 @@
7117
7175
  var shape = elementRegistry.get(event.context.shape.id);
7118
7176
 
7119
7177
  // Always select main shape on move
7120
- var isSelected = find$1(previousSelection, function(selectedShape) {
7178
+ var isSelected = find(previousSelection, function(selectedShape) {
7121
7179
  return shape.id === selectedShape.id;
7122
7180
  });
7123
7181
 
@@ -7296,7 +7354,7 @@
7296
7354
 
7297
7355
  this._ids = ids;
7298
7356
 
7299
- this._overlayDefaults = assign$4({
7357
+ this._overlayDefaults = assign$1({
7300
7358
 
7301
7359
  // no show constraints
7302
7360
  show: null,
@@ -7358,11 +7416,11 @@
7358
7416
  */
7359
7417
  Overlays.prototype.get = function(search) {
7360
7418
 
7361
- if (isString$3(search)) {
7419
+ if (isString(search)) {
7362
7420
  search = { id: search };
7363
7421
  }
7364
7422
 
7365
- if (isString$3(search.element)) {
7423
+ if (isString(search.element)) {
7366
7424
  search.element = this._elementRegistry.get(search.element);
7367
7425
  }
7368
7426
 
@@ -7371,13 +7429,13 @@
7371
7429
 
7372
7430
  // return a list of overlays when searching by element (+type)
7373
7431
  if (container) {
7374
- return search.type ? filter$1(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
7432
+ return search.type ? filter(container.overlays, matchPattern({ type: search.type })) : container.overlays.slice();
7375
7433
  } else {
7376
7434
  return [];
7377
7435
  }
7378
7436
  } else
7379
7437
  if (search.type) {
7380
- return filter$1(this._overlays, matchPattern({ type: search.type }));
7438
+ return filter(this._overlays, matchPattern({ type: search.type }));
7381
7439
  } else {
7382
7440
 
7383
7441
  // return single element when searching by id
@@ -7410,7 +7468,7 @@
7410
7468
  */
7411
7469
  Overlays.prototype.add = function(element, type, overlay) {
7412
7470
 
7413
- if (isObject$1(type)) {
7471
+ if (isObject(type)) {
7414
7472
  overlay = type;
7415
7473
  type = null;
7416
7474
  }
@@ -7433,7 +7491,7 @@
7433
7491
 
7434
7492
  var id = this._ids.next();
7435
7493
 
7436
- overlay = assign$4({}, this._overlayDefaults, overlay, {
7494
+ overlay = assign$1({}, this._overlayDefaults, overlay, {
7437
7495
  id: id,
7438
7496
  type: type,
7439
7497
  element: element,
@@ -7457,13 +7515,13 @@
7457
7515
 
7458
7516
  var overlays = this.get(filter) || [];
7459
7517
 
7460
- if (!isArray$4(overlays)) {
7518
+ if (!isArray$2(overlays)) {
7461
7519
  overlays = [ overlays ];
7462
7520
  }
7463
7521
 
7464
7522
  var self = this;
7465
7523
 
7466
- forEach$3(overlays, function(overlay) {
7524
+ forEach$1(overlays, function(overlay) {
7467
7525
 
7468
7526
  var container = self._getOverlayContainer(overlay.element, true);
7469
7527
 
@@ -7573,7 +7631,7 @@
7573
7631
 
7574
7632
  Overlays.prototype._createOverlayContainer = function(element) {
7575
7633
  var html = domify$1('<div class="djs-overlays" />');
7576
- assign$3(html, { position: 'absolute' });
7634
+ assign(html, { position: 'absolute' });
7577
7635
 
7578
7636
  this._overlayRoot.appendChild(html);
7579
7637
 
@@ -7610,7 +7668,7 @@
7610
7668
 
7611
7669
 
7612
7670
  Overlays.prototype._getOverlayContainer = function(element, raw) {
7613
- var container = find$1(this._overlayContainers, function(c) {
7671
+ var container = find(this._overlayContainers, function(c) {
7614
7672
  return c.element === element;
7615
7673
  });
7616
7674
 
@@ -7638,14 +7696,14 @@
7638
7696
 
7639
7697
  // create proper html elements from
7640
7698
  // overlay HTML strings
7641
- if (isString$3(html)) {
7699
+ if (isString(html)) {
7642
7700
  html = domify$1(html);
7643
7701
  }
7644
7702
 
7645
7703
  overlayContainer = this._getOverlayContainer(element);
7646
7704
 
7647
7705
  htmlContainer = domify$1('<div class="djs-overlay" data-overlay-id="' + id + '">');
7648
- assign$3(htmlContainer, { position: 'absolute' });
7706
+ assign(htmlContainer, { position: 'absolute' });
7649
7707
 
7650
7708
  htmlContainer.appendChild(html);
7651
7709
 
@@ -7735,7 +7793,7 @@
7735
7793
 
7736
7794
  var self = this;
7737
7795
 
7738
- forEach$3(this._overlays, function(overlay) {
7796
+ forEach$1(this._overlays, function(overlay) {
7739
7797
  self._updateOverlayVisibilty(overlay, viewbox);
7740
7798
  });
7741
7799
  };
@@ -7772,7 +7830,7 @@
7772
7830
  var element = e.element;
7773
7831
  var overlays = self.get({ element: element });
7774
7832
 
7775
- forEach$3(overlays, function(o) {
7833
+ forEach$1(overlays, function(o) {
7776
7834
  self.remove(o.id);
7777
7835
  });
7778
7836
 
@@ -7796,7 +7854,7 @@
7796
7854
  var container = self._getOverlayContainer(element, true);
7797
7855
 
7798
7856
  if (container) {
7799
- forEach$3(container.overlays, function(overlay) {
7857
+ forEach$1(container.overlays, function(overlay) {
7800
7858
  self._updateOverlay(overlay);
7801
7859
  });
7802
7860
 
@@ -7833,7 +7891,7 @@
7833
7891
  '<div class="djs-overlay-container" />'
7834
7892
  );
7835
7893
 
7836
- assign$3(root, {
7894
+ assign(root, {
7837
7895
  position: 'absolute',
7838
7896
  width: 0,
7839
7897
  height: 0
@@ -7845,7 +7903,7 @@
7845
7903
  }
7846
7904
 
7847
7905
  function setPosition(el, x, y) {
7848
- assign$3(el, { left: x + 'px', top: y + 'px' });
7906
+ assign(el, { left: x + 'px', top: y + 'px' });
7849
7907
  }
7850
7908
 
7851
7909
  /**
@@ -7991,7 +8049,7 @@
7991
8049
  */
7992
8050
  CommandInterceptor.prototype.on = function(events, hook, priority, handlerFn, unwrap, that) {
7993
8051
 
7994
- if (isFunction$1(hook) || isNumber(hook)) {
8052
+ if (isFunction(hook) || isNumber(hook)) {
7995
8053
  that = unwrap;
7996
8054
  unwrap = handlerFn;
7997
8055
  handlerFn = priority;
@@ -7999,29 +8057,29 @@
7999
8057
  hook = null;
8000
8058
  }
8001
8059
 
8002
- if (isFunction$1(priority)) {
8060
+ if (isFunction(priority)) {
8003
8061
  that = unwrap;
8004
8062
  unwrap = handlerFn;
8005
8063
  handlerFn = priority;
8006
8064
  priority = DEFAULT_PRIORITY$2;
8007
8065
  }
8008
8066
 
8009
- if (isObject$1(unwrap)) {
8067
+ if (isObject(unwrap)) {
8010
8068
  that = unwrap;
8011
8069
  unwrap = false;
8012
8070
  }
8013
8071
 
8014
- if (!isFunction$1(handlerFn)) {
8072
+ if (!isFunction(handlerFn)) {
8015
8073
  throw new Error('handlerFn must be a function');
8016
8074
  }
8017
8075
 
8018
- if (!isArray$4(events)) {
8076
+ if (!isArray$2(events)) {
8019
8077
  events = [ events ];
8020
8078
  }
8021
8079
 
8022
8080
  var eventBus = this._eventBus;
8023
8081
 
8024
- forEach$3(events, function(event) {
8082
+ forEach$1(events, function(event) {
8025
8083
 
8026
8084
  // concat commandStack(.event)?(.hook)?
8027
8085
  var fullEvent = [ 'commandStack', event, hook ].filter(function(e) { return e; }).join('.');
@@ -8049,7 +8107,7 @@
8049
8107
  * This will generate the CommandInterceptor#(preExecute|...|reverted) methods
8050
8108
  * which will in term forward to CommandInterceptor#on.
8051
8109
  */
8052
- forEach$3(hooks, function(hook) {
8110
+ forEach$1(hooks, function(hook) {
8053
8111
 
8054
8112
  /**
8055
8113
  * {canExecute|preExecute|preExecuted|execute|executed|postExecute|postExecuted|revert|reverted}
@@ -8065,7 +8123,7 @@
8065
8123
  */
8066
8124
  CommandInterceptor.prototype[hook] = function(events, priority, handlerFn, unwrap, that) {
8067
8125
 
8068
- if (isFunction$1(events) || isNumber(events)) {
8126
+ if (isFunction(events) || isNumber(events)) {
8069
8127
  that = unwrap;
8070
8128
  unwrap = handlerFn;
8071
8129
  handlerFn = priority;
@@ -8285,7 +8343,7 @@
8285
8343
  var shape = e.element,
8286
8344
  bo = getBusinessObject(shape);
8287
8345
 
8288
- var isPresent = find$1(boParents, function(el) {
8346
+ var isPresent = find(boParents, function(el) {
8289
8347
  return el === bo;
8290
8348
  });
8291
8349
 
@@ -8908,7 +8966,7 @@
8908
8966
  *
8909
8967
  * @return {boolean}
8910
8968
  */
8911
- function isArray$2(obj) {
8969
+ function isArray(obj) {
8912
8970
  return Array.isArray(obj);
8913
8971
  }
8914
8972
 
@@ -8935,7 +8993,7 @@
8935
8993
  */
8936
8994
  function annotate(...args) {
8937
8995
 
8938
- if (args.length === 1 && isArray$2(args[0])) {
8996
+ if (args.length === 1 && isArray(args[0])) {
8939
8997
  args = args[0];
8940
8998
  }
8941
8999
 
@@ -9076,7 +9134,7 @@
9076
9134
  }
9077
9135
 
9078
9136
  if (typeof fn !== 'function') {
9079
- if (isArray$2(fn)) {
9137
+ if (isArray(fn)) {
9080
9138
  fn = annotate(fn.slice());
9081
9139
  } else {
9082
9140
  throw error(`Cannot invoke "${ fn }". Expected a function!`);
@@ -9348,7 +9406,7 @@
9348
9406
  // helpers ///////////////
9349
9407
 
9350
9408
  function arrayUnwrap(type, value) {
9351
- if (type !== 'value' && isArray$2(value)) {
9409
+ if (type !== 'value' && isArray(value)) {
9352
9410
  value = annotate(value.slice());
9353
9411
  }
9354
9412
 
@@ -9393,9 +9451,9 @@
9393
9451
  });
9394
9452
 
9395
9453
  if (isFrameElement(element)) {
9396
- attr$2(rect, assign$4({}, this.FRAME_STYLE, attrs || {}));
9454
+ attr$2(rect, assign$1({}, this.FRAME_STYLE, attrs || {}));
9397
9455
  } else {
9398
- attr$2(rect, assign$4({}, this.SHAPE_STYLE, attrs || {}));
9456
+ attr$2(rect, assign$1({}, this.SHAPE_STYLE, attrs || {}));
9399
9457
  }
9400
9458
 
9401
9459
  append$1(visuals, rect);
@@ -9405,7 +9463,7 @@
9405
9463
 
9406
9464
  DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
9407
9465
 
9408
- var line = createLine(connection.waypoints, assign$4({}, this.CONNECTION_STYLE, attrs || {}));
9466
+ var line = createLine(connection.waypoints, assign$1({}, this.CONNECTION_STYLE, attrs || {}));
9409
9467
  append$1(visuals, line);
9410
9468
 
9411
9469
  return line;
@@ -9481,7 +9539,7 @@
9481
9539
  this.cls = function(className, traits, additionalAttrs) {
9482
9540
  var attrs = this.style(traits, additionalAttrs);
9483
9541
 
9484
- return assign$4(attrs, { 'class': className });
9542
+ return assign$1(attrs, { 'class': className });
9485
9543
  };
9486
9544
 
9487
9545
  /**
@@ -9494,25 +9552,25 @@
9494
9552
  */
9495
9553
  this.style = function(traits, additionalAttrs) {
9496
9554
 
9497
- if (!isArray$4(traits) && !additionalAttrs) {
9555
+ if (!isArray$2(traits) && !additionalAttrs) {
9498
9556
  additionalAttrs = traits;
9499
9557
  traits = [];
9500
9558
  }
9501
9559
 
9502
9560
  var attrs = reduce(traits, function(attrs, t) {
9503
- return assign$4(attrs, defaultTraits[t] || {});
9561
+ return assign$1(attrs, defaultTraits[t] || {});
9504
9562
  }, {});
9505
9563
 
9506
- return additionalAttrs ? assign$4(attrs, additionalAttrs) : attrs;
9564
+ return additionalAttrs ? assign$1(attrs, additionalAttrs) : attrs;
9507
9565
  };
9508
9566
 
9509
9567
  this.computeStyle = function(custom, traits, defaultStyles) {
9510
- if (!isArray$4(traits)) {
9568
+ if (!isArray$2(traits)) {
9511
9569
  defaultStyles = traits;
9512
9570
  traits = [];
9513
9571
  }
9514
9572
 
9515
- return self.style(traits || [], assign$4({}, defaultStyles, custom || {}));
9573
+ return self.style(traits || [], assign$1({}, defaultStyles, custom || {}));
9516
9574
  };
9517
9575
  }
9518
9576
 
@@ -9621,7 +9679,7 @@
9621
9679
  */
9622
9680
  function createContainer(options) {
9623
9681
 
9624
- options = assign$4({}, { width: '100%', height: '100%' }, options);
9682
+ options = assign$1({}, { width: '100%', height: '100%' }, options);
9625
9683
 
9626
9684
  const container = options.container || document.body;
9627
9685
 
@@ -9631,7 +9689,7 @@
9631
9689
  const parent = document.createElement('div');
9632
9690
  parent.setAttribute('class', 'djs-container');
9633
9691
 
9634
- assign$3(parent, {
9692
+ assign(parent, {
9635
9693
  position: 'relative',
9636
9694
  overflow: 'hidden',
9637
9695
  width: ensurePx(options.width),
@@ -9733,7 +9791,7 @@
9733
9791
  // debounce canvas.viewbox.changed events
9734
9792
  // for smoother diagram interaction
9735
9793
  if (config.deferUpdate !== false) {
9736
- this._viewboxChanged = debounce(bind$3(this._viewboxChanged, this), 300);
9794
+ this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
9737
9795
  }
9738
9796
 
9739
9797
  eventBus.on('diagram.init', function() {
@@ -10034,7 +10092,7 @@
10034
10092
  };
10035
10093
 
10036
10094
  Canvas.prototype._findPlaneForRoot = function(rootElement) {
10037
- return find$1(this._planes, function(plane) {
10095
+ return find(this._planes, function(plane) {
10038
10096
  return plane.rootElement === rootElement;
10039
10097
  });
10040
10098
  };
@@ -10067,7 +10125,7 @@
10067
10125
  return;
10068
10126
  }
10069
10127
 
10070
- forEach$3([ container.gfx, container.secondaryGfx ], function(gfx) {
10128
+ forEach$1([ container.gfx, container.secondaryGfx ], function(gfx) {
10071
10129
  if (gfx) {
10072
10130
 
10073
10131
  // invoke either addClass or removeClass based on mode
@@ -10724,7 +10782,7 @@
10724
10782
 
10725
10783
  if (delta) {
10726
10784
  this._changeViewbox(function() {
10727
- delta = assign$4({ dx: 0, dy: 0 }, delta || {});
10785
+ delta = assign$1({ dx: 0, dy: 0 }, delta || {});
10728
10786
 
10729
10787
  matrix = this._svg.createSVGMatrix().translate(delta.dx, delta.dy).multiply(matrix);
10730
10788
 
@@ -10919,7 +10977,7 @@
10919
10977
  const currentScale = currentMatrix.a;
10920
10978
 
10921
10979
  if (center) {
10922
- centerPoint = assign$4(point, center);
10980
+ centerPoint = assign$1(point, center);
10923
10981
 
10924
10982
  // revert applied viewport transformations
10925
10983
  originalPoint = centerPoint.matrixTransform(currentMatrix.inverse());
@@ -11813,7 +11871,7 @@
11813
11871
  if (!Type) {
11814
11872
  throw new Error('unknown type: <' + type + '>');
11815
11873
  }
11816
- return assign$4(new Type(), attrs);
11874
+ return assign$1(new Type(), attrs);
11817
11875
  }
11818
11876
 
11819
11877
  /**
@@ -11850,7 +11908,7 @@
11850
11908
  */
11851
11909
  ElementFactory.prototype.create = function(type, attrs) {
11852
11910
 
11853
- attrs = assign$4({}, attrs || {});
11911
+ attrs = assign$1({}, attrs || {});
11854
11912
 
11855
11913
  if (!attrs.id) {
11856
11914
  attrs.id = type + '_' + (this._uid++);
@@ -11976,9 +12034,9 @@
11976
12034
  */
11977
12035
  EventBus.prototype.on = function(events, priority, callback, that) {
11978
12036
 
11979
- events = isArray$4(events) ? events : [ events ];
12037
+ events = isArray$2(events) ? events : [ events ];
11980
12038
 
11981
- if (isFunction$1(priority)) {
12039
+ if (isFunction(priority)) {
11982
12040
  that = callback;
11983
12041
  callback = priority;
11984
12042
  priority = DEFAULT_PRIORITY$1;
@@ -11991,7 +12049,7 @@
11991
12049
  var actualCallback = callback;
11992
12050
 
11993
12051
  if (that) {
11994
- actualCallback = bind$3(callback, that);
12052
+ actualCallback = bind$2(callback, that);
11995
12053
 
11996
12054
  // make sure we remember and are able to remove
11997
12055
  // bound callbacks via {@link #off} using the original
@@ -12022,7 +12080,7 @@
12022
12080
  EventBus.prototype.once = function(event, priority, callback, that) {
12023
12081
  var self = this;
12024
12082
 
12025
- if (isFunction$1(priority)) {
12083
+ if (isFunction(priority)) {
12026
12084
  that = callback;
12027
12085
  callback = priority;
12028
12086
  priority = DEFAULT_PRIORITY$1;
@@ -12061,7 +12119,7 @@
12061
12119
  */
12062
12120
  EventBus.prototype.off = function(events, callback) {
12063
12121
 
12064
- events = isArray$4(events) ? events : [ events ];
12122
+ events = isArray$2(events) ? events : [ events ];
12065
12123
 
12066
12124
  var self = this;
12067
12125
 
@@ -12356,7 +12414,7 @@
12356
12414
  };
12357
12415
 
12358
12416
  InternalEvent.prototype.init = function(data) {
12359
- assign$4(this, data || {});
12417
+ assign$1(this, data || {});
12360
12418
  };
12361
12419
 
12362
12420
 
@@ -12529,7 +12587,7 @@
12529
12587
 
12530
12588
  // update all parents of changed and reorganized their children
12531
12589
  // in the correct order (as indicated in our model)
12532
- forEach$3(parents, function(parent) {
12590
+ forEach$1(parents, function(parent) {
12533
12591
 
12534
12592
  var children = parent.children;
12535
12593
 
@@ -12539,7 +12597,7 @@
12539
12597
 
12540
12598
  var childrenGfx = self._getChildrenContainer(parent);
12541
12599
 
12542
- forEach$3(children.slice().reverse(), function(child) {
12600
+ forEach$1(children.slice().reverse(), function(child) {
12543
12601
  var childGfx = elementRegistry.getGraphics(child);
12544
12602
 
12545
12603
  prependTo(childGfx.parentNode, childrenGfx);
@@ -12789,193 +12847,6 @@
12789
12847
  this.get('eventBus').fire('diagram.clear');
12790
12848
  };
12791
12849
 
12792
- /**
12793
- * Flatten array, one level deep.
12794
- *
12795
- * @param {Array<?>} arr
12796
- *
12797
- * @return {Array<?>}
12798
- */
12799
-
12800
- var nativeToString$2 = Object.prototype.toString;
12801
- function isString$2(obj) {
12802
- return nativeToString$2.call(obj) === '[object String]';
12803
- }
12804
-
12805
- function _extends$2() {
12806
- _extends$2 = Object.assign || function (target) {
12807
- for (var i = 1; i < arguments.length; i++) {
12808
- var source = arguments[i];
12809
-
12810
- for (var key in source) {
12811
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12812
- target[key] = source[key];
12813
- }
12814
- }
12815
- }
12816
-
12817
- return target;
12818
- };
12819
-
12820
- return _extends$2.apply(this, arguments);
12821
- }
12822
-
12823
- /**
12824
- * Convenience wrapper for `Object.assign`.
12825
- *
12826
- * @param {Object} target
12827
- * @param {...Object} others
12828
- *
12829
- * @return {Object} the target
12830
- */
12831
-
12832
- function assign$2(target) {
12833
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12834
- others[_key - 1] = arguments[_key];
12835
- }
12836
-
12837
- return _extends$2.apply(void 0, [target].concat(others));
12838
- }
12839
-
12840
- /**
12841
- * Flatten array, one level deep.
12842
- *
12843
- * @param {Array<?>} arr
12844
- *
12845
- * @return {Array<?>}
12846
- */
12847
-
12848
- var nativeToString$1 = Object.prototype.toString;
12849
- var nativeHasOwnProperty$1 = Object.prototype.hasOwnProperty;
12850
- function isUndefined$2(obj) {
12851
- return obj === undefined;
12852
- }
12853
- function isArray$1(obj) {
12854
- return nativeToString$1.call(obj) === '[object Array]';
12855
- }
12856
- function isObject(obj) {
12857
- return nativeToString$1.call(obj) === '[object Object]';
12858
- }
12859
- function isString$1(obj) {
12860
- return nativeToString$1.call(obj) === '[object String]';
12861
- }
12862
- /**
12863
- * Return true, if target owns a property with the given key.
12864
- *
12865
- * @param {Object} target
12866
- * @param {String} key
12867
- *
12868
- * @return {Boolean}
12869
- */
12870
-
12871
- function has$1(target, key) {
12872
- return nativeHasOwnProperty$1.call(target, key);
12873
- }
12874
- /**
12875
- * Iterate over collection; returning something
12876
- * (non-undefined) will stop iteration.
12877
- *
12878
- * @param {Array|Object} collection
12879
- * @param {Function} iterator
12880
- *
12881
- * @return {Object} return result that stopped the iteration
12882
- */
12883
-
12884
- function forEach$1(collection, iterator) {
12885
- var val, result;
12886
-
12887
- if (isUndefined$2(collection)) {
12888
- return;
12889
- }
12890
-
12891
- var convertKey = isArray$1(collection) ? toNum$1 : identity$1;
12892
-
12893
- for (var key in collection) {
12894
- if (has$1(collection, key)) {
12895
- val = collection[key];
12896
- result = iterator(val, convertKey(key));
12897
-
12898
- if (result === false) {
12899
- return val;
12900
- }
12901
- }
12902
- }
12903
- }
12904
-
12905
- function identity$1(arg) {
12906
- return arg;
12907
- }
12908
-
12909
- function toNum$1(arg) {
12910
- return Number(arg);
12911
- }
12912
- /**
12913
- * Bind function against target <this>.
12914
- *
12915
- * @param {Function} fn
12916
- * @param {Object} target
12917
- *
12918
- * @return {Function} bound function
12919
- */
12920
-
12921
- function bind(fn, target) {
12922
- return fn.bind(target);
12923
- }
12924
-
12925
- function _extends$1() {
12926
- _extends$1 = Object.assign || function (target) {
12927
- for (var i = 1; i < arguments.length; i++) {
12928
- var source = arguments[i];
12929
-
12930
- for (var key in source) {
12931
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12932
- target[key] = source[key];
12933
- }
12934
- }
12935
- }
12936
-
12937
- return target;
12938
- };
12939
-
12940
- return _extends$1.apply(this, arguments);
12941
- }
12942
-
12943
- /**
12944
- * Convenience wrapper for `Object.assign`.
12945
- *
12946
- * @param {Object} target
12947
- * @param {...Object} others
12948
- *
12949
- * @return {Object} the target
12950
- */
12951
-
12952
- function assign$1(target) {
12953
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12954
- others[_key - 1] = arguments[_key];
12955
- }
12956
-
12957
- return _extends$1.apply(void 0, [target].concat(others));
12958
- }
12959
- /**
12960
- * Pick given properties from the target object.
12961
- *
12962
- * @param {Object} target
12963
- * @param {Array} properties
12964
- *
12965
- * @return {Object} target
12966
- */
12967
-
12968
- function pick(target, properties) {
12969
- var result = {};
12970
- var obj = Object(target);
12971
- forEach$1(properties, function (prop) {
12972
- if (prop in obj) {
12973
- result[prop] = target[prop];
12974
- }
12975
- });
12976
- return result;
12977
- }
12978
-
12979
12850
  /**
12980
12851
  * Moddle base element.
12981
12852
  */
@@ -13028,7 +12899,7 @@
13028
12899
  props.define(this, '$attrs', { value: {} });
13029
12900
  props.define(this, '$parent', { writable: true });
13030
12901
 
13031
- forEach$1(attrs, bind(function(val, key) {
12902
+ forEach$1(attrs, bind$2(function(val, key) {
13032
12903
  this.set(key, val);
13033
12904
  }, this));
13034
12905
  }
@@ -13111,6 +12982,7 @@
13111
12982
  localName = name;
13112
12983
  prefix = defaultPrefix;
13113
12984
  } else
12985
+
13114
12986
  // prefix + local name
13115
12987
  if (parts.length === 2) {
13116
12988
  localName = parts[1];
@@ -13317,7 +13189,7 @@
13317
13189
  return;
13318
13190
  }
13319
13191
 
13320
- forEach$1(t.properties, bind(function(p) {
13192
+ forEach$1(t.properties, bind$2(function(p) {
13321
13193
 
13322
13194
  // clone property to allow extensions
13323
13195
  p = assign$1({}, p, {
@@ -13364,7 +13236,7 @@
13364
13236
 
13365
13237
  this.properties = properties;
13366
13238
 
13367
- forEach$1(packages, bind(this.registerPackage, this));
13239
+ forEach$1(packages, bind$2(this.registerPackage, this));
13368
13240
  }
13369
13241
 
13370
13242
 
@@ -13388,7 +13260,7 @@
13388
13260
  ensureAvailable(pkgMap, pkg, 'uri');
13389
13261
 
13390
13262
  // register types
13391
- forEach$1(pkg.types, bind(function(descriptor) {
13263
+ forEach$1(pkg.types, bind$2(function(descriptor) {
13392
13264
  this.registerType(descriptor, pkg);
13393
13265
  }, this));
13394
13266
 
@@ -13414,7 +13286,7 @@
13414
13286
  propertiesByName = {};
13415
13287
 
13416
13288
  // parse properties
13417
- forEach$1(type.properties, bind(function(p) {
13289
+ forEach$1(type.properties, bind$2(function(p) {
13418
13290
 
13419
13291
  // namespace property names
13420
13292
  var propertyNs = parseName(p.name, ns.prefix),
@@ -13440,7 +13312,7 @@
13440
13312
  propertiesByName: propertiesByName
13441
13313
  });
13442
13314
 
13443
- forEach$1(type.extends, bind(function(extendsName) {
13315
+ forEach$1(type.extends, bind$2(function(extendsName) {
13444
13316
  var extended = this.typeMap[extendsName];
13445
13317
 
13446
13318
  extended.traits = extended.traits || [];
@@ -13535,7 +13407,7 @@
13535
13407
 
13536
13408
 
13537
13409
 
13538
- ///////// helpers ////////////////////////////
13410
+ // helpers ////////////////////////////
13539
13411
 
13540
13412
  function ensureAvailable(packageMap, pkg, identifierKey) {
13541
13413
 
@@ -13566,11 +13438,16 @@
13566
13438
  */
13567
13439
  Properties.prototype.set = function(target, name, value) {
13568
13440
 
13441
+ if (!isString(name) || !name.length) {
13442
+ throw new TypeError('property name must be a non-empty string');
13443
+ }
13444
+
13569
13445
  var property = this.model.getPropertyDescriptor(target, name);
13570
13446
 
13571
13447
  var propertyName = property && property.name;
13572
13448
 
13573
- if (isUndefined$1(value)) {
13449
+ if (isUndefined(value)) {
13450
+
13574
13451
  // unset the property, if the specified value is undefined;
13575
13452
  // delete from $attrs (for extensions) or the target itself
13576
13453
  if (property) {
@@ -13579,6 +13456,7 @@
13579
13456
  delete target.$attrs[name];
13580
13457
  }
13581
13458
  } else {
13459
+
13582
13460
  // set the property, defining well defined properties on the fly
13583
13461
  // or simply updating them in target.$attrs (for extensions)
13584
13462
  if (property) {
@@ -13661,7 +13539,7 @@
13661
13539
  };
13662
13540
 
13663
13541
 
13664
- function isUndefined$1(val) {
13542
+ function isUndefined(val) {
13665
13543
  return typeof val === 'undefined';
13666
13544
  }
13667
13545
 
@@ -13674,7 +13552,7 @@
13674
13552
  });
13675
13553
  }
13676
13554
 
13677
- //// Moddle implementation /////////////////////////////////////////////////
13555
+ // Moddle implementation /////////////////////////////////////////////////
13678
13556
 
13679
13557
  /**
13680
13558
  * @class Moddle
@@ -13750,7 +13628,7 @@
13750
13628
 
13751
13629
  var cache = this.typeCache;
13752
13630
 
13753
- var name = isString$1(descriptor) ? descriptor : descriptor.ns.name;
13631
+ var name = isString(descriptor) ? descriptor : descriptor.ns.name;
13754
13632
 
13755
13633
  var type = cache[name];
13756
13634
 
@@ -13883,180 +13761,6 @@
13883
13761
  return this.registry.typeMap[type];
13884
13762
  };
13885
13763
 
13886
- /**
13887
- * Flatten array, one level deep.
13888
- *
13889
- * @param {Array<?>} arr
13890
- *
13891
- * @return {Array<?>}
13892
- */
13893
-
13894
- var nativeToString = Object.prototype.toString;
13895
- var nativeHasOwnProperty = Object.prototype.hasOwnProperty;
13896
- function isUndefined(obj) {
13897
- return obj === undefined;
13898
- }
13899
- function isArray(obj) {
13900
- return nativeToString.call(obj) === '[object Array]';
13901
- }
13902
- function isFunction(obj) {
13903
- var tag = nativeToString.call(obj);
13904
- return tag === '[object Function]' || tag === '[object AsyncFunction]' || tag === '[object GeneratorFunction]' || tag === '[object AsyncGeneratorFunction]' || tag === '[object Proxy]';
13905
- }
13906
- function isString(obj) {
13907
- return nativeToString.call(obj) === '[object String]';
13908
- }
13909
- /**
13910
- * Return true, if target owns a property with the given key.
13911
- *
13912
- * @param {Object} target
13913
- * @param {String} key
13914
- *
13915
- * @return {Boolean}
13916
- */
13917
-
13918
- function has(target, key) {
13919
- return nativeHasOwnProperty.call(target, key);
13920
- }
13921
-
13922
- /**
13923
- * Find element in collection.
13924
- *
13925
- * @param {Array|Object} collection
13926
- * @param {Function|Object} matcher
13927
- *
13928
- * @return {Object}
13929
- */
13930
-
13931
- function find(collection, matcher) {
13932
- matcher = toMatcher(matcher);
13933
- var match;
13934
- forEach(collection, function (val, key) {
13935
- if (matcher(val, key)) {
13936
- match = val;
13937
- return false;
13938
- }
13939
- });
13940
- return match;
13941
- }
13942
- /**
13943
- * Find element index in collection.
13944
- *
13945
- * @param {Array|Object} collection
13946
- * @param {Function} matcher
13947
- *
13948
- * @return {Object}
13949
- */
13950
-
13951
- function findIndex(collection, matcher) {
13952
- matcher = toMatcher(matcher);
13953
- var idx = isArray(collection) ? -1 : undefined;
13954
- forEach(collection, function (val, key) {
13955
- if (matcher(val, key)) {
13956
- idx = key;
13957
- return false;
13958
- }
13959
- });
13960
- return idx;
13961
- }
13962
- /**
13963
- * Find element in collection.
13964
- *
13965
- * @param {Array|Object} collection
13966
- * @param {Function} matcher
13967
- *
13968
- * @return {Array} result
13969
- */
13970
-
13971
- function filter(collection, matcher) {
13972
- var result = [];
13973
- forEach(collection, function (val, key) {
13974
- if (matcher(val, key)) {
13975
- result.push(val);
13976
- }
13977
- });
13978
- return result;
13979
- }
13980
- /**
13981
- * Iterate over collection; returning something
13982
- * (non-undefined) will stop iteration.
13983
- *
13984
- * @param {Array|Object} collection
13985
- * @param {Function} iterator
13986
- *
13987
- * @return {Object} return result that stopped the iteration
13988
- */
13989
-
13990
- function forEach(collection, iterator) {
13991
- var val, result;
13992
-
13993
- if (isUndefined(collection)) {
13994
- return;
13995
- }
13996
-
13997
- var convertKey = isArray(collection) ? toNum : identity;
13998
-
13999
- for (var key in collection) {
14000
- if (has(collection, key)) {
14001
- val = collection[key];
14002
- result = iterator(val, convertKey(key));
14003
-
14004
- if (result === false) {
14005
- return val;
14006
- }
14007
- }
14008
- }
14009
- }
14010
-
14011
- function toMatcher(matcher) {
14012
- return isFunction(matcher) ? matcher : function (e) {
14013
- return e === matcher;
14014
- };
14015
- }
14016
-
14017
- function identity(arg) {
14018
- return arg;
14019
- }
14020
-
14021
- function toNum(arg) {
14022
- return Number(arg);
14023
- }
14024
-
14025
- function _extends() {
14026
- _extends = Object.assign || function (target) {
14027
- for (var i = 1; i < arguments.length; i++) {
14028
- var source = arguments[i];
14029
-
14030
- for (var key in source) {
14031
- if (Object.prototype.hasOwnProperty.call(source, key)) {
14032
- target[key] = source[key];
14033
- }
14034
- }
14035
- }
14036
-
14037
- return target;
14038
- };
14039
-
14040
- return _extends.apply(this, arguments);
14041
- }
14042
-
14043
- /**
14044
- * Convenience wrapper for `Object.assign`.
14045
- *
14046
- * @param {Object} target
14047
- * @param {...Object} others
14048
- *
14049
- * @return {Object} the target
14050
- */
14051
-
14052
- function assign(target) {
14053
- for (var _len = arguments.length, others = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
14054
- others[_key - 1] = arguments[_key];
14055
- }
14056
-
14057
- return _extends.apply(void 0, [target].concat(others));
14058
- }
14059
-
14060
13764
  var fromCharCode = String.fromCharCode;
14061
13765
 
14062
13766
  var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -15231,7 +14935,7 @@
15231
14935
  * @property {Boolean} lax
15232
14936
  */
15233
14937
 
15234
- assign(this, options);
14938
+ assign$1(this, options);
15235
14939
 
15236
14940
  this.elementsById = {};
15237
14941
  this.references = [];
@@ -15452,7 +15156,7 @@
15452
15156
  model = this.model,
15453
15157
  propNameNs;
15454
15158
 
15455
- forEach(attributes, function(value, name) {
15159
+ forEach$1(attributes, function(value, name) {
15456
15160
 
15457
15161
  var prop = descriptor.propertiesByName[name],
15458
15162
  values;
@@ -15470,7 +15174,7 @@
15470
15174
  // IDREFS: parse references as whitespace-separated list
15471
15175
  values = value.split(' ');
15472
15176
 
15473
- forEach(values, function(v) {
15177
+ forEach$1(values, function(v) {
15474
15178
  context.addReference({
15475
15179
  element: instance,
15476
15180
  property: prop.ns.name,
@@ -15537,7 +15241,7 @@
15537
15241
 
15538
15242
  elementType = model.getType(elementTypeName);
15539
15243
 
15540
- return assign({}, property, {
15244
+ return assign$1({}, property, {
15541
15245
  effectiveType: getModdleDescriptor(elementType).name
15542
15246
  });
15543
15247
  }
@@ -15559,7 +15263,7 @@
15559
15263
  });
15560
15264
 
15561
15265
  if (property) {
15562
- return assign({}, property, {
15266
+ return assign$1({}, property, {
15563
15267
  effectiveType: getModdleDescriptor(elementType).name
15564
15268
  });
15565
15269
  }
@@ -15634,7 +15338,7 @@
15634
15338
  }
15635
15339
 
15636
15340
  if (propertyDesc.isReference) {
15637
- assign(newElement, {
15341
+ assign$1(newElement, {
15638
15342
  element: element
15639
15343
  });
15640
15344
 
@@ -15743,7 +15447,7 @@
15743
15447
  };
15744
15448
  }
15745
15449
 
15746
- assign(this, { lax: false }, options);
15450
+ assign$1(this, { lax: false }, options);
15747
15451
  }
15748
15452
 
15749
15453
  /**
@@ -15798,7 +15502,7 @@
15798
15502
  var model = this.model,
15799
15503
  lax = this.lax;
15800
15504
 
15801
- var context = new Context(assign({}, options, { rootHandler: rootHandler })),
15505
+ var context = new Context(assign$1({}, options, { rootHandler: rootHandler })),
15802
15506
  parser = new Parser({ proxy: true }),
15803
15507
  stack = createStack();
15804
15508
 
@@ -16193,14 +15897,14 @@
16193
15897
 
16194
15898
  function getElementNs(ns, descriptor) {
16195
15899
  if (descriptor.isGeneric) {
16196
- return assign({ localName: descriptor.ns.localName }, ns);
15900
+ return assign$1({ localName: descriptor.ns.localName }, ns);
16197
15901
  } else {
16198
- return assign({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
15902
+ return assign$1({ localName: nameToAlias(descriptor.ns.localName, descriptor.$pkg) }, ns);
16199
15903
  }
16200
15904
  }
16201
15905
 
16202
15906
  function getPropertyNs(ns, descriptor) {
16203
- return assign({ localName: descriptor.ns.localName }, ns);
15907
+ return assign$1({ localName: descriptor.ns.localName }, ns);
16204
15908
  }
16205
15909
 
16206
15910
  function getSerializableProperties(element) {
@@ -16214,7 +15918,7 @@
16214
15918
  }
16215
15919
 
16216
15920
  // do not serialize defaults
16217
- if (!has(element, name)) {
15921
+ if (!has$1(element, name)) {
16218
15922
  return false;
16219
15923
  }
16220
15924
 
@@ -16432,7 +16136,7 @@
16432
16136
  if (this.isLocalNs(effectiveNs)) {
16433
16137
  return { localName: ns.localName };
16434
16138
  } else {
16435
- return assign({ localName: ns.localName }, effectiveNs);
16139
+ return assign$1({ localName: ns.localName }, effectiveNs);
16436
16140
  }
16437
16141
  };
16438
16142
 
@@ -16443,7 +16147,7 @@
16443
16147
 
16444
16148
  var attributes = [];
16445
16149
 
16446
- forEach(element, function(val, key) {
16150
+ forEach$1(element, function(val, key) {
16447
16151
 
16448
16152
  var nonNsAttr;
16449
16153
 
@@ -16451,7 +16155,7 @@
16451
16155
  body.push(new BodySerializer().build({ type: 'String' }, val));
16452
16156
  } else
16453
16157
  if (key === '$children') {
16454
- forEach(val, function(child) {
16158
+ forEach$1(val, function(child) {
16455
16159
  body.push(new ElementSerializer(self).build(child));
16456
16160
  });
16457
16161
  } else
@@ -16521,7 +16225,7 @@
16521
16225
  // parse namespace attributes first
16522
16226
  // and log them. push non namespace attributes to a list
16523
16227
  // and process them later
16524
- forEach(genericAttrs, function(value, name) {
16228
+ forEach$1(genericAttrs, function(value, name) {
16525
16229
 
16526
16230
  var nonNsAttr = self.parseNsAttribute(element, name, value);
16527
16231
 
@@ -16537,7 +16241,7 @@
16537
16241
 
16538
16242
  var self = this;
16539
16243
 
16540
- forEach(attributes, function(attr) {
16244
+ forEach$1(attributes, function(attr) {
16541
16245
 
16542
16246
  // do not serialize xsi:type attribute
16543
16247
  // it is set manually based on the actual implementation type
@@ -16548,6 +16252,8 @@
16548
16252
  try {
16549
16253
  self.addAttribute(self.nsAttributeName(attr.name), attr.value);
16550
16254
  } catch (e) {
16255
+ /* global console */
16256
+
16551
16257
  console.warn(
16552
16258
  'missing namespace information for ',
16553
16259
  attr.name, '=', attr.value, 'on', element,
@@ -16562,7 +16268,7 @@
16562
16268
  body = this.body,
16563
16269
  element = this.element;
16564
16270
 
16565
- forEach(properties, function(p) {
16271
+ forEach$1(properties, function(p) {
16566
16272
  var value = element.get(p.name),
16567
16273
  isReference = p.isReference,
16568
16274
  isMany = p.isMany;
@@ -16575,12 +16281,12 @@
16575
16281
  body.push(new BodySerializer().build(p, value[0]));
16576
16282
  } else
16577
16283
  if (isSimple(p.type)) {
16578
- forEach(value, function(v) {
16284
+ forEach$1(value, function(v) {
16579
16285
  body.push(new ValueSerializer(self.addTagName(self.nsPropertyTagName(p))).build(p, v));
16580
16286
  });
16581
16287
  } else
16582
16288
  if (isReference) {
16583
- forEach(value, function(v) {
16289
+ forEach$1(value, function(v) {
16584
16290
  body.push(new ReferenceSerializer(self.addTagName(self.nsPropertyTagName(p))).build(v));
16585
16291
  });
16586
16292
  } else {
@@ -16590,7 +16296,7 @@
16590
16296
  var asType = serializeAsType(p),
16591
16297
  asProperty = serializeAsProperty(p);
16592
16298
 
16593
- forEach(value, function(v) {
16299
+ forEach$1(value, function(v) {
16594
16300
  var serializer;
16595
16301
 
16596
16302
  if (asType) {
@@ -16698,7 +16404,7 @@
16698
16404
  var self = this,
16699
16405
  element = this.element;
16700
16406
 
16701
- forEach(properties, function(p) {
16407
+ forEach$1(properties, function(p) {
16702
16408
 
16703
16409
  var value = element.get(p.name);
16704
16410
 
@@ -16709,7 +16415,7 @@
16709
16415
  }
16710
16416
  else {
16711
16417
  var values = [];
16712
- forEach(value, function(v) {
16418
+ forEach$1(value, function(v) {
16713
16419
  values.push(v.id);
16714
16420
  });
16715
16421
 
@@ -16765,7 +16471,7 @@
16765
16471
  attrs = getNsAttrs(namespaces).concat(attrs);
16766
16472
  }
16767
16473
 
16768
- forEach(attrs, function(a) {
16474
+ forEach$1(attrs, function(a) {
16769
16475
  writer
16770
16476
  .append(' ')
16771
16477
  .append(nsName(a.name)).append('="').append(a.value).append('"');
@@ -16792,7 +16498,7 @@
16792
16498
  .indent();
16793
16499
  }
16794
16500
 
16795
- forEach(this.body, function(b) {
16501
+ forEach$1(this.body, function(b) {
16796
16502
  b.serializeTo(writer);
16797
16503
  });
16798
16504
 
@@ -16860,7 +16566,7 @@
16860
16566
 
16861
16567
  function FormatingWriter(out, format) {
16862
16568
 
16863
- var indent = [''];
16569
+ var indent = [ '' ];
16864
16570
 
16865
16571
  this.append = function(str) {
16866
16572
  out.write(str);
@@ -16902,7 +16608,7 @@
16902
16608
  */
16903
16609
  function Writer(options) {
16904
16610
 
16905
- options = assign({ format: false, preamble: true }, options || {});
16611
+ options = assign$1({ format: false, preamble: true }, options || {});
16906
16612
 
16907
16613
  function toXML(tree, writer) {
16908
16614
  var internalWriter = writer || new SavingWriter();
@@ -16969,12 +16675,12 @@
16969
16675
  */
16970
16676
  BpmnModdle.prototype.fromXML = function(xmlStr, typeName, options) {
16971
16677
 
16972
- if (!isString$2(typeName)) {
16678
+ if (!isString(typeName)) {
16973
16679
  options = typeName;
16974
16680
  typeName = 'bpmn:Definitions';
16975
16681
  }
16976
16682
 
16977
- var reader = new Reader(assign$2({ model: this, lax: true }, options));
16683
+ var reader = new Reader(assign$1({ model: this, lax: true }, options));
16978
16684
  var rootHandler = reader.handler(typeName);
16979
16685
 
16980
16686
  return reader.fromXML(xmlStr, rootHandler);
@@ -20661,7 +20367,7 @@
20661
20367
  };
20662
20368
 
20663
20369
  function simple(additionalPackages, options) {
20664
- var pks = assign$2({}, packages, additionalPackages);
20370
+ var pks = assign$1({}, packages, additionalPackages);
20665
20371
 
20666
20372
  return new BpmnModdle(pks, options);
20667
20373
  }
@@ -20685,7 +20391,7 @@
20685
20391
  }
20686
20392
 
20687
20393
  var argLen = arguments.length;
20688
- if (argLen >= 1 && isFunction$1(arguments[argLen - 1])) {
20394
+ if (argLen >= 1 && isFunction(arguments[argLen - 1])) {
20689
20395
 
20690
20396
  var callback = arguments[argLen - 1];
20691
20397
 
@@ -20726,7 +20432,7 @@
20726
20432
  function ensureCompatDiRef(businessObject) {
20727
20433
 
20728
20434
  // bpmnElement can have multiple independent DIs
20729
- if (!has$3(businessObject, 'di')) {
20435
+ if (!has$1(businessObject, 'di')) {
20730
20436
  Object.defineProperty(businessObject, 'di', {
20731
20437
  enumerable: false,
20732
20438
  get: function() {
@@ -20754,7 +20460,7 @@
20754
20460
  * correctly specify one.
20755
20461
  */
20756
20462
  function findDisplayCandidate(definitions) {
20757
- return find$1(definitions.rootElements, function(e) {
20463
+ return find(definitions.rootElements, function(e) {
20758
20464
  return is(e, 'bpmn:Process') || is(e, 'bpmn:Collaboration');
20759
20465
  });
20760
20466
  }
@@ -20861,7 +20567,7 @@
20861
20567
  function handlePlane(plane) {
20862
20568
  registerDi(plane);
20863
20569
 
20864
- forEach$3(plane.planeElement, handlePlaneElement);
20570
+ forEach$1(plane.planeElement, handlePlaneElement);
20865
20571
  }
20866
20572
 
20867
20573
  function handlePlaneElement(planeElement) {
@@ -20986,7 +20692,7 @@
20986
20692
  // walk through all processes that have not yet been drawn and draw them
20987
20693
  // if they contain lanes with DI information.
20988
20694
  // we do this to pass the free-floating lane test cases in the MIWG test suite
20989
- var processes = filter$1(rootElements, function(e) {
20695
+ var processes = filter(rootElements, function(e) {
20990
20696
  return !isHandled(e) && is(e, 'bpmn:Process') && e.laneSets;
20991
20697
  });
20992
20698
 
@@ -20998,7 +20704,7 @@
20998
20704
  }
20999
20705
 
21000
20706
  function handleMessageFlows(messageFlows, context) {
21001
- forEach$3(messageFlows, contextual(handleMessageFlow, context));
20707
+ forEach$1(messageFlows, contextual(handleMessageFlow, context));
21002
20708
  }
21003
20709
 
21004
20710
  function handleDataAssociation(association, context) {
@@ -21024,7 +20730,7 @@
21024
20730
 
21025
20731
  function handleArtifacts(artifacts, context) {
21026
20732
 
21027
- forEach$3(artifacts, function(e) {
20733
+ forEach$1(artifacts, function(e) {
21028
20734
  if (is(e, 'bpmn:Association')) {
21029
20735
  deferred.push(function() {
21030
20736
  handleArtifact(e, context);
@@ -21041,8 +20747,8 @@
21041
20747
  return;
21042
20748
  }
21043
20749
 
21044
- forEach$3(ioSpecification.dataInputs, contextual(handleDataInput, context));
21045
- forEach$3(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
20750
+ forEach$1(ioSpecification.dataInputs, contextual(handleDataInput, context));
20751
+ forEach$1(ioSpecification.dataOutputs, contextual(handleDataOutput, context));
21046
20752
  }
21047
20753
 
21048
20754
  function handleSubProcess(subProcess, context) {
@@ -21069,8 +20775,8 @@
21069
20775
  // * bpmn:CatchEvent
21070
20776
  //
21071
20777
  deferred.push(function() {
21072
- forEach$3(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
21073
- forEach$3(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
20778
+ forEach$1(flowNode.dataInputAssociations, contextual(handleDataAssociation, context));
20779
+ forEach$1(flowNode.dataOutputAssociations, contextual(handleDataAssociation, context));
21074
20780
  });
21075
20781
  }
21076
20782
 
@@ -21097,11 +20803,11 @@
21097
20803
  }
21098
20804
 
21099
20805
  function handleLaneSet(laneSet, context) {
21100
- forEach$3(laneSet.lanes, contextual(handleLane, context));
20806
+ forEach$1(laneSet.lanes, contextual(handleLane, context));
21101
20807
  }
21102
20808
 
21103
20809
  function handleLaneSets(laneSets, context) {
21104
- forEach$3(laneSets, contextual(handleLaneSet, context));
20810
+ forEach$1(laneSets, contextual(handleLaneSet, context));
21105
20811
  }
21106
20812
 
21107
20813
  function handleFlowElementsContainer(container, context) {
@@ -21113,7 +20819,7 @@
21113
20819
  }
21114
20820
 
21115
20821
  function handleFlowElements(flowElements, context) {
21116
- forEach$3(flowElements, function(e) {
20822
+ forEach$1(flowElements, function(e) {
21117
20823
  if (is(e, 'bpmn:SequenceFlow')) {
21118
20824
  deferred.push(function() {
21119
20825
  handleSequenceFlow(e, context);
@@ -21151,7 +20857,7 @@
21151
20857
 
21152
20858
  function handleCollaboration(collaboration, context) {
21153
20859
 
21154
- forEach$3(collaboration.participants, contextual(handleParticipant, context));
20860
+ forEach$1(collaboration.participants, contextual(handleParticipant, context));
21155
20861
 
21156
20862
  handleArtifacts(collaboration.artifacts, context);
21157
20863
 
@@ -21165,7 +20871,7 @@
21165
20871
  function wireFlowNodeRefs(lane) {
21166
20872
 
21167
20873
  // wire the virtual flowNodeRefs <-> relationship
21168
- forEach$3(lane.flowNodeRef, function(flowNode) {
20874
+ forEach$1(lane.flowNodeRef, function(flowNode) {
21169
20875
  var lanes = flowNode.get('lanes');
21170
20876
 
21171
20877
  if (lanes) {
@@ -21259,7 +20965,7 @@
21259
20965
 
21260
20966
  // traverse BPMN 2.0 document model,
21261
20967
  // starting at definitions
21262
- forEach$3(diagramsToImport, function(diagram) {
20968
+ forEach$1(diagramsToImport, function(diagram) {
21263
20969
  walker.handleDefinitions(definitions, diagram);
21264
20970
  });
21265
20971
 
@@ -21326,12 +21032,12 @@
21326
21032
  if (is$1(rootElement, 'bpmn:Collaboration')) {
21327
21033
  collaboration = rootElement;
21328
21034
  } else {
21329
- collaboration = find$1(definitions.rootElements, function(element) {
21035
+ collaboration = find(definitions.rootElements, function(element) {
21330
21036
  if (!is$1(element, 'bpmn:Collaboration')) {
21331
21037
  return;
21332
21038
  }
21333
21039
 
21334
- return find$1(element.participants, function(participant) {
21040
+ return find(element.participants, function(participant) {
21335
21041
  return participant.processRef === rootElement;
21336
21042
  });
21337
21043
  });
@@ -21355,7 +21061,7 @@
21355
21061
  var diagramsToImport = [ bpmnDiagram ];
21356
21062
  var handledElements = [ bpmnElement ];
21357
21063
 
21358
- forEach$3(definitions.diagrams, function(diagram) {
21064
+ forEach$1(definitions.diagrams, function(diagram) {
21359
21065
  var businessObject = diagram.plane.bpmnElement;
21360
21066
 
21361
21067
  if (
@@ -21374,7 +21080,7 @@
21374
21080
  function selfAndAllFlowElements(elements) {
21375
21081
  var result = [];
21376
21082
 
21377
- forEach$3(elements, function(element) {
21083
+ forEach$1(elements, function(element) {
21378
21084
  if (!element) {
21379
21085
  return;
21380
21086
  }
@@ -21469,11 +21175,11 @@
21469
21175
  function createLightbox() {
21470
21176
  lightbox = domify$1(LIGHTBOX_MARKUP);
21471
21177
 
21472
- assign$3(lightbox, LIGHTBOX_STYLES);
21473
- assign$3(query('svg', lightbox), LOGO_STYLES);
21474
- assign$3(query('.backdrop', lightbox), BACKDROP_STYLES);
21475
- assign$3(query('.notice', lightbox), NOTICE_STYLES);
21476
- assign$3(query('.link', lightbox), LINK_STYLES, {
21178
+ assign(lightbox, LIGHTBOX_STYLES);
21179
+ assign(query('svg', lightbox), LOGO_STYLES);
21180
+ assign(query('.backdrop', lightbox), BACKDROP_STYLES);
21181
+ assign(query('.notice', lightbox), NOTICE_STYLES);
21182
+ assign(query('.link', lightbox), LINK_STYLES, {
21477
21183
  'margin': '15px 20px 15px 10px',
21478
21184
  'alignSelf': 'center'
21479
21185
  });
@@ -21515,7 +21221,7 @@
21515
21221
  */
21516
21222
  function BaseViewer(options) {
21517
21223
 
21518
- options = assign$4({}, DEFAULT_OPTIONS, options);
21224
+ options = assign$1({}, DEFAULT_OPTIONS, options);
21519
21225
 
21520
21226
  this._moddle = this._createModdle(options);
21521
21227
 
@@ -22057,8 +21763,8 @@
22057
21763
 
22058
21764
  const diagramModules = [].concat(staticModules, baseModules, additionalModules);
22059
21765
 
22060
- const diagramOptions = assign$4(omit(options, [ 'additionalModules' ]), {
22061
- canvas: assign$4({}, options.canvas, { container: container }),
21766
+ const diagramOptions = assign$1(omit(options, [ 'additionalModules' ]), {
21767
+ canvas: assign$1({}, options.canvas, { container: container }),
22062
21768
  modules: diagramModules
22063
21769
  });
22064
21770
 
@@ -22086,7 +21792,7 @@
22086
21792
 
22087
21793
  const container = domify$1('<div class="bjs-container"></div>');
22088
21794
 
22089
- assign$3(container, {
21795
+ assign(container, {
22090
21796
  width: ensureUnit(options.width),
22091
21797
  height: ensureUnit(options.height),
22092
21798
  position: options.position
@@ -22096,7 +21802,7 @@
22096
21802
  };
22097
21803
 
22098
21804
  BaseViewer.prototype._createModdle = function(options) {
22099
- const moddleOptions = assign$4({}, this._moddleExtensions, options.moddleExtensions);
21805
+ const moddleOptions = assign$1({}, this._moddleExtensions, options.moddleExtensions);
22100
21806
 
22101
21807
  return new simple(moddleOptions);
22102
21808
  };
@@ -22155,7 +21861,7 @@
22155
21861
  return null;
22156
21862
  }
22157
21863
 
22158
- return find$1(definitions.diagrams, function(element) {
21864
+ return find(definitions.diagrams, function(element) {
22159
21865
  return element.id === diagramId;
22160
21866
  }) || null;
22161
21867
  }
@@ -22182,8 +21888,8 @@
22182
21888
 
22183
21889
  const linkElement = domify$1(linkMarkup);
22184
21890
 
22185
- assign$3(query('svg', linkElement), LOGO_STYLES);
22186
- assign$3(linkElement, LINK_STYLES, {
21891
+ assign(query('svg', linkElement), LOGO_STYLES);
21892
+ assign(linkElement, LINK_STYLES, {
22187
21893
  position: 'absolute',
22188
21894
  bottom: '15px',
22189
21895
  right: '15px',
@@ -22305,7 +22011,7 @@
22305
22011
  * @param {KeyboardEvent} event
22306
22012
  */
22307
22013
  function isKey(keys, event) {
22308
- keys = isArray$4(keys) ? keys : [ keys ];
22014
+ keys = isArray$2(keys) ? keys : [ keys ];
22309
22015
 
22310
22016
  return keys.indexOf(event.key) !== -1 || keys.indexOf(event.keyCode) !== -1;
22311
22017
  }
@@ -22499,7 +22205,7 @@
22499
22205
  * @param {string} type
22500
22206
  */
22501
22207
  Keyboard.prototype.addListener = function(priority, listener, type) {
22502
- if (isFunction$1(priority)) {
22208
+ if (isFunction(priority)) {
22503
22209
  type = listener;
22504
22210
  listener = priority;
22505
22211
  priority = DEFAULT_PRIORITY;
@@ -22715,7 +22421,7 @@
22715
22421
 
22716
22422
  var self = this;
22717
22423
 
22718
- this._config = assign$4({}, DEFAULT_CONFIG, config || {});
22424
+ this._config = assign$1({}, DEFAULT_CONFIG, config || {});
22719
22425
 
22720
22426
  keyboard.addListener(arrowsListener);
22721
22427
 
@@ -23044,7 +22750,7 @@
23044
22750
  this._canvas = canvas;
23045
22751
  this._container = canvas._container;
23046
22752
 
23047
- this._handleWheel = bind$3(this._handleWheel, this);
22753
+ this._handleWheel = bind$2(this._handleWheel, this);
23048
22754
 
23049
22755
  this._totalDelta = 0;
23050
22756
  this._scale = config.scale || DEFAULT_SCALE;