bpmn-js 16.0.0 → 16.2.0
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.
- package/README.md +2 -11
- package/dist/bpmn-modeler.development.js +222 -151
- package/dist/bpmn-modeler.production.min.js +35 -35
- package/dist/bpmn-navigated-viewer.development.js +178 -107
- package/dist/bpmn-navigated-viewer.production.min.js +5 -5
- package/dist/bpmn-viewer.development.js +178 -107
- package/dist/bpmn-viewer.production.min.js +5 -5
- package/package.json +4 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-modeler v16.
|
|
2
|
+
* bpmn-js - bpmn-modeler v16.2.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014-present, camunda Services GmbH
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Source Code: https://github.com/bpmn-io/bpmn-js
|
|
10
10
|
*
|
|
11
|
-
* Date: 2023-12-
|
|
11
|
+
* Date: 2023-12-20
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -832,6 +832,58 @@
|
|
|
832
832
|
return Object.assign(target, ...others);
|
|
833
833
|
}
|
|
834
834
|
|
|
835
|
+
/**
|
|
836
|
+
* Sets a nested property of a given object to the specified value.
|
|
837
|
+
*
|
|
838
|
+
* This mutates the object and returns it.
|
|
839
|
+
*
|
|
840
|
+
* @template T
|
|
841
|
+
*
|
|
842
|
+
* @param {T} target The target of the set operation.
|
|
843
|
+
* @param {(string|number)[]} path The path to the nested value.
|
|
844
|
+
* @param {any} value The value to set.
|
|
845
|
+
*
|
|
846
|
+
* @return {T}
|
|
847
|
+
*/
|
|
848
|
+
function set$2(target, path, value) {
|
|
849
|
+
|
|
850
|
+
let currentTarget = target;
|
|
851
|
+
|
|
852
|
+
forEach$1(path, function(key, idx) {
|
|
853
|
+
|
|
854
|
+
if (typeof key !== 'number' && typeof key !== 'string') {
|
|
855
|
+
throw new Error('illegal key type: ' + typeof key + '. Key should be of type number or string.');
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
if (key === 'constructor') {
|
|
859
|
+
throw new Error('illegal key: constructor');
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
if (key === '__proto__') {
|
|
863
|
+
throw new Error('illegal key: __proto__');
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
let nextKey = path[idx + 1];
|
|
867
|
+
let nextTarget = currentTarget[key];
|
|
868
|
+
|
|
869
|
+
if (isDefined(nextKey) && isNil(nextTarget)) {
|
|
870
|
+
nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : [];
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
if (isUndefined$2(nextKey)) {
|
|
874
|
+
if (isUndefined$2(value)) {
|
|
875
|
+
delete currentTarget[key];
|
|
876
|
+
} else {
|
|
877
|
+
currentTarget[key] = value;
|
|
878
|
+
}
|
|
879
|
+
} else {
|
|
880
|
+
currentTarget = nextTarget;
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
|
|
884
|
+
return target;
|
|
885
|
+
}
|
|
886
|
+
|
|
835
887
|
/**
|
|
836
888
|
* Pick properties from the given target.
|
|
837
889
|
*
|
|
@@ -3650,10 +3702,6 @@
|
|
|
3650
3702
|
};
|
|
3651
3703
|
}
|
|
3652
3704
|
|
|
3653
|
-
function getDefaultExportFromCjs (x) {
|
|
3654
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3655
|
-
}
|
|
3656
|
-
|
|
3657
3705
|
/**
|
|
3658
3706
|
* This file contains source code adapted from Snap.svg (licensed Apache-2.0).
|
|
3659
3707
|
*
|
|
@@ -3718,7 +3766,7 @@
|
|
|
3718
3766
|
|
|
3719
3767
|
count.length >= 1e3 && delete cache[count.shift()];
|
|
3720
3768
|
count.push(args);
|
|
3721
|
-
cache[args] = f
|
|
3769
|
+
cache[args] = f(...arguments);
|
|
3722
3770
|
|
|
3723
3771
|
return cache[args];
|
|
3724
3772
|
}
|
|
@@ -3755,13 +3803,13 @@
|
|
|
3755
3803
|
});
|
|
3756
3804
|
|
|
3757
3805
|
if (name == 'm' && params.length > 2) {
|
|
3758
|
-
data.push([b
|
|
3806
|
+
data.push([ b, ...params.splice(0, 2) ]);
|
|
3759
3807
|
name = 'l';
|
|
3760
3808
|
b = b == 'm' ? 'l' : 'L';
|
|
3761
3809
|
}
|
|
3762
3810
|
|
|
3763
3811
|
while (params.length >= paramCounts[name]) {
|
|
3764
|
-
data.push([b
|
|
3812
|
+
data.push([ b, ...params.splice(0, paramCounts[name]) ]);
|
|
3765
3813
|
if (!paramCounts[name]) {
|
|
3766
3814
|
break;
|
|
3767
3815
|
}
|
|
@@ -3844,7 +3892,7 @@
|
|
|
3844
3892
|
|
|
3845
3893
|
function bezierBBox(points) {
|
|
3846
3894
|
|
|
3847
|
-
var bbox = curveBBox
|
|
3895
|
+
var bbox = curveBBox(...points);
|
|
3848
3896
|
|
|
3849
3897
|
return rectBBox(
|
|
3850
3898
|
bbox.x0,
|
|
@@ -3894,8 +3942,8 @@
|
|
|
3894
3942
|
|
|
3895
3943
|
var z2 = z / 2,
|
|
3896
3944
|
n = 12,
|
|
3897
|
-
Tvalues = [-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],
|
|
3898
|
-
Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],
|
|
3945
|
+
Tvalues = [ -.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816 ],
|
|
3946
|
+
Cvalues = [ 0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472 ],
|
|
3899
3947
|
sum = 0;
|
|
3900
3948
|
|
|
3901
3949
|
for (var i = 0; i < n; i++) {
|
|
@@ -3965,8 +4013,8 @@
|
|
|
3965
4013
|
|
|
3966
4014
|
// As an optimization, lines will have only 1 segment
|
|
3967
4015
|
|
|
3968
|
-
var l1 = bezlen
|
|
3969
|
-
l2 = bezlen
|
|
4016
|
+
var l1 = bezlen(...bez1),
|
|
4017
|
+
l2 = bezlen(...bez2),
|
|
3970
4018
|
n1 = isLine(bez1) ? 1 : ~~(l1 / 5) || 1,
|
|
3971
4019
|
n2 = isLine(bez2) ? 1 : ~~(l2 / 5) || 1,
|
|
3972
4020
|
dots1 = [],
|
|
@@ -3975,12 +4023,12 @@
|
|
|
3975
4023
|
res = justCount ? 0 : [];
|
|
3976
4024
|
|
|
3977
4025
|
for (var i = 0; i < n1 + 1; i++) {
|
|
3978
|
-
var p = findDotsAtSegment
|
|
4026
|
+
var p = findDotsAtSegment(...bez1, i / n1);
|
|
3979
4027
|
dots1.push({ x: p.x, y: p.y, t: i / n1 });
|
|
3980
4028
|
}
|
|
3981
4029
|
|
|
3982
4030
|
for (i = 0; i < n2 + 1; i++) {
|
|
3983
|
-
p = findDotsAtSegment
|
|
4031
|
+
p = findDotsAtSegment(...bez2, i / n2);
|
|
3984
4032
|
dots2.push({ x: p.x, y: p.y, t: i / n2 });
|
|
3985
4033
|
}
|
|
3986
4034
|
|
|
@@ -4075,11 +4123,11 @@
|
|
|
4075
4123
|
} else {
|
|
4076
4124
|
|
|
4077
4125
|
if (pi[0] == 'C') {
|
|
4078
|
-
bez1 = [x1, y1
|
|
4126
|
+
bez1 = [ x1, y1, ...pi.slice(1) ];
|
|
4079
4127
|
x1 = bez1[6];
|
|
4080
4128
|
y1 = bez1[7];
|
|
4081
4129
|
} else {
|
|
4082
|
-
bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];
|
|
4130
|
+
bez1 = [ x1, y1, x1, y1, x1m, y1m, x1m, y1m ];
|
|
4083
4131
|
x1 = x1m;
|
|
4084
4132
|
y1 = y1m;
|
|
4085
4133
|
}
|
|
@@ -4093,11 +4141,11 @@
|
|
|
4093
4141
|
} else {
|
|
4094
4142
|
|
|
4095
4143
|
if (pj[0] == 'C') {
|
|
4096
|
-
bez2 = [x2, y2
|
|
4144
|
+
bez2 = [ x2, y2, ...pj.slice(1) ];
|
|
4097
4145
|
x2 = bez2[6];
|
|
4098
4146
|
y2 = bez2[7];
|
|
4099
4147
|
} else {
|
|
4100
|
-
bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];
|
|
4148
|
+
bez2 = [ x2, y2, x2, y2, x2m, y2m, x2m, y2m ];
|
|
4101
4149
|
x2 = x2m;
|
|
4102
4150
|
y2 = y2m;
|
|
4103
4151
|
}
|
|
@@ -4138,7 +4186,7 @@
|
|
|
4138
4186
|
}
|
|
4139
4187
|
|
|
4140
4188
|
if (!pathArray || !pathArray.length) {
|
|
4141
|
-
return [['M', 0, 0]];
|
|
4189
|
+
return [ [ 'M', 0, 0 ] ];
|
|
4142
4190
|
}
|
|
4143
4191
|
|
|
4144
4192
|
var res = [],
|
|
@@ -4155,7 +4203,7 @@
|
|
|
4155
4203
|
mx = x;
|
|
4156
4204
|
my = y;
|
|
4157
4205
|
start++;
|
|
4158
|
-
res[0] = ['M', x, y];
|
|
4206
|
+
res[0] = [ 'M', x, y ];
|
|
4159
4207
|
}
|
|
4160
4208
|
|
|
4161
4209
|
for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {
|
|
@@ -4324,7 +4372,7 @@
|
|
|
4324
4372
|
f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);
|
|
4325
4373
|
x2 = cx + rx * math.cos(f2);
|
|
4326
4374
|
y2 = cy + ry * math.sin(f2);
|
|
4327
|
-
res = arcToCurve(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);
|
|
4375
|
+
res = arcToCurve(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [ f2, f2old, cx, cy ]);
|
|
4328
4376
|
}
|
|
4329
4377
|
|
|
4330
4378
|
df = f2 - f1;
|
|
@@ -4336,18 +4384,18 @@
|
|
|
4336
4384
|
t = math.tan(df / 4),
|
|
4337
4385
|
hx = 4 / 3 * rx * t,
|
|
4338
4386
|
hy = 4 / 3 * ry * t,
|
|
4339
|
-
m1 = [x1, y1],
|
|
4340
|
-
m2 = [x1 + hx * s1, y1 - hy * c1],
|
|
4341
|
-
m3 = [x2 + hx * s2, y2 - hy * c2],
|
|
4342
|
-
m4 = [x2, y2];
|
|
4387
|
+
m1 = [ x1, y1 ],
|
|
4388
|
+
m2 = [ x1 + hx * s1, y1 - hy * c1 ],
|
|
4389
|
+
m3 = [ x2 + hx * s2, y2 - hy * c2 ],
|
|
4390
|
+
m4 = [ x2, y2 ];
|
|
4343
4391
|
|
|
4344
4392
|
m2[0] = 2 * m1[0] - m2[0];
|
|
4345
4393
|
m2[1] = 2 * m1[1] - m2[1];
|
|
4346
4394
|
|
|
4347
4395
|
if (recursive) {
|
|
4348
|
-
return [m2, m3, m4].concat(res);
|
|
4396
|
+
return [ m2, m3, m4 ].concat(res);
|
|
4349
4397
|
} else {
|
|
4350
|
-
res = [m2, m3, m4].concat(res).join().split(',');
|
|
4398
|
+
res = [ m2, m3, m4 ].concat(res).join().split(',');
|
|
4351
4399
|
var newres = [];
|
|
4352
4400
|
|
|
4353
4401
|
for (var i = 0, ii = res.length; i < ii; i++) {
|
|
@@ -4364,7 +4412,7 @@
|
|
|
4364
4412
|
// Modifications: https://github.com/timo22345
|
|
4365
4413
|
function curveBBox(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
4366
4414
|
var tvalues = [],
|
|
4367
|
-
bounds = [[], []],
|
|
4415
|
+
bounds = [ [], [] ],
|
|
4368
4416
|
a, b, c, t, t1, t2, b2ac, sqrtb2ac;
|
|
4369
4417
|
|
|
4370
4418
|
for (var i = 0; i < 2; ++i) {
|
|
@@ -4432,10 +4480,10 @@
|
|
|
4432
4480
|
bounds[0].length = bounds[1].length = jlen + 2;
|
|
4433
4481
|
|
|
4434
4482
|
return {
|
|
4435
|
-
x0: mmin
|
|
4436
|
-
y0: mmin
|
|
4437
|
-
x1: mmax
|
|
4438
|
-
y1: mmax
|
|
4483
|
+
x0: mmin(...bounds[0]),
|
|
4484
|
+
y0: mmin(...bounds[1]),
|
|
4485
|
+
x1: mmax(...bounds[0]),
|
|
4486
|
+
y1: mmax(...bounds[1])
|
|
4439
4487
|
};
|
|
4440
4488
|
}
|
|
4441
4489
|
|
|
@@ -4454,7 +4502,7 @@
|
|
|
4454
4502
|
var nx, ny;
|
|
4455
4503
|
|
|
4456
4504
|
if (!path) {
|
|
4457
|
-
return ['C', d.x, d.y, d.x, d.y, d.x, d.y];
|
|
4505
|
+
return [ 'C', d.x, d.y, d.x, d.y, d.x, d.y ];
|
|
4458
4506
|
}
|
|
4459
4507
|
|
|
4460
4508
|
!(path[0] in { T: 1, Q: 1 }) && (d.qx = d.qy = null);
|
|
@@ -4465,7 +4513,7 @@
|
|
|
4465
4513
|
d.Y = path[2];
|
|
4466
4514
|
break;
|
|
4467
4515
|
case 'A':
|
|
4468
|
-
path = ['C'
|
|
4516
|
+
path = [ 'C', ...arcToCurve(d.x, d.y, ...path.slice(1)) ];
|
|
4469
4517
|
break;
|
|
4470
4518
|
case 'S':
|
|
4471
4519
|
if (pathCommand == 'C' || pathCommand == 'S') {
|
|
@@ -4484,7 +4532,7 @@
|
|
|
4484
4532
|
nx = d.x;
|
|
4485
4533
|
ny = d.y;
|
|
4486
4534
|
}
|
|
4487
|
-
path = ['C', nx, ny
|
|
4535
|
+
path = [ 'C', nx, ny, ...path.slice(1) ];
|
|
4488
4536
|
break;
|
|
4489
4537
|
case 'T':
|
|
4490
4538
|
if (pathCommand == 'Q' || pathCommand == 'T') {
|
|
@@ -4503,24 +4551,24 @@
|
|
|
4503
4551
|
d.qx = d.x;
|
|
4504
4552
|
d.qy = d.y;
|
|
4505
4553
|
}
|
|
4506
|
-
path = ['C'
|
|
4554
|
+
path = [ 'C', ...qubicToCurve(d.x, d.y, d.qx, d.qy, path[1], path[2]) ];
|
|
4507
4555
|
break;
|
|
4508
4556
|
case 'Q':
|
|
4509
4557
|
d.qx = path[1];
|
|
4510
4558
|
d.qy = path[2];
|
|
4511
|
-
path = ['C'
|
|
4559
|
+
path = [ 'C', ...qubicToCurve(d.x, d.y, path[1], path[2], path[3], path[4]) ];
|
|
4512
4560
|
break;
|
|
4513
4561
|
case 'L':
|
|
4514
|
-
path = ['C'
|
|
4562
|
+
path = [ 'C', ...lineToCurve(d.x, d.y, path[1], path[2]) ];
|
|
4515
4563
|
break;
|
|
4516
4564
|
case 'H':
|
|
4517
|
-
path = ['C'
|
|
4565
|
+
path = [ 'C', ...lineToCurve(d.x, d.y, path[1], d.y) ];
|
|
4518
4566
|
break;
|
|
4519
4567
|
case 'V':
|
|
4520
|
-
path = ['C'
|
|
4568
|
+
path = [ 'C', ...lineToCurve(d.x, d.y, d.x, path[1]) ];
|
|
4521
4569
|
break;
|
|
4522
4570
|
case 'Z':
|
|
4523
|
-
path = ['C'
|
|
4571
|
+
path = [ 'C', ...lineToCurve(d.x, d.y, d.X, d.Y) ];
|
|
4524
4572
|
break;
|
|
4525
4573
|
}
|
|
4526
4574
|
|
|
@@ -4535,7 +4583,7 @@
|
|
|
4535
4583
|
|
|
4536
4584
|
while (pi.length) {
|
|
4537
4585
|
pathCommands[i] = 'A'; // if created multiple C:s, their original seg is saved
|
|
4538
|
-
pp.splice(i++, 0, ['C'
|
|
4586
|
+
pp.splice(i++, 0, [ 'C', ...pi.splice(0, 6) ]);
|
|
4539
4587
|
}
|
|
4540
4588
|
|
|
4541
4589
|
pp.splice(i, 1);
|
|
@@ -4578,10 +4626,6 @@
|
|
|
4578
4626
|
return curvedPath;
|
|
4579
4627
|
}
|
|
4580
4628
|
|
|
4581
|
-
var intersect = findPathIntersections;
|
|
4582
|
-
|
|
4583
|
-
var intersectPaths = /*@__PURE__*/getDefaultExportFromCjs(intersect);
|
|
4584
|
-
|
|
4585
4629
|
/**
|
|
4586
4630
|
* Checks whether a value is an instance of Connection.
|
|
4587
4631
|
*
|
|
@@ -4859,7 +4903,7 @@
|
|
|
4859
4903
|
|
|
4860
4904
|
|
|
4861
4905
|
function getIntersections(a, b) {
|
|
4862
|
-
return
|
|
4906
|
+
return findPathIntersections(a, b);
|
|
4863
4907
|
}
|
|
4864
4908
|
|
|
4865
4909
|
|
|
@@ -6646,32 +6690,17 @@
|
|
|
6646
6690
|
}
|
|
6647
6691
|
};
|
|
6648
6692
|
|
|
6649
|
-
var objectRefs = {exports: {}};
|
|
6650
|
-
|
|
6651
|
-
var collection = {};
|
|
6652
|
-
|
|
6653
|
-
/**
|
|
6654
|
-
* An empty collection stub. Use {@link RefsCollection.extend} to extend a
|
|
6655
|
-
* collection with ref semantics.
|
|
6656
|
-
*
|
|
6657
|
-
* @class RefsCollection
|
|
6658
|
-
*/
|
|
6659
|
-
|
|
6660
6693
|
/**
|
|
6661
6694
|
* Extends a collection with {@link Refs} aware methods
|
|
6662
6695
|
*
|
|
6663
|
-
* @
|
|
6664
|
-
* @
|
|
6665
|
-
*
|
|
6666
|
-
* @param
|
|
6667
|
-
* @param {Refs} refs instance
|
|
6668
|
-
* @param {Object} property represented by the collection
|
|
6669
|
-
* @param {Object} target object the collection is attached to
|
|
6696
|
+
* @param {Array<Object>} collection
|
|
6697
|
+
* @param {Refs} refs instance
|
|
6698
|
+
* @param {Object} property represented by the collection
|
|
6699
|
+
* @param {Object} target object the collection is attached to
|
|
6670
6700
|
*
|
|
6671
6701
|
* @return {RefsCollection<Object>} the extended array
|
|
6672
6702
|
*/
|
|
6673
6703
|
function extend(collection, refs, property, target) {
|
|
6674
|
-
|
|
6675
6704
|
var inverseProperty = property.inverse;
|
|
6676
6705
|
|
|
6677
6706
|
/**
|
|
@@ -6682,7 +6711,7 @@
|
|
|
6682
6711
|
* @param {Object} element the element to remove
|
|
6683
6712
|
*/
|
|
6684
6713
|
Object.defineProperty(collection, 'remove', {
|
|
6685
|
-
value: function(element) {
|
|
6714
|
+
value: function (element) {
|
|
6686
6715
|
var idx = this.indexOf(element);
|
|
6687
6716
|
if (idx !== -1) {
|
|
6688
6717
|
this.splice(idx, 1);
|
|
@@ -6690,7 +6719,6 @@
|
|
|
6690
6719
|
// unset inverse
|
|
6691
6720
|
refs.unset(element, inverseProperty, target);
|
|
6692
6721
|
}
|
|
6693
|
-
|
|
6694
6722
|
return element;
|
|
6695
6723
|
}
|
|
6696
6724
|
});
|
|
@@ -6703,7 +6731,7 @@
|
|
|
6703
6731
|
* @param {Object} element the element to check for
|
|
6704
6732
|
*/
|
|
6705
6733
|
Object.defineProperty(collection, 'contains', {
|
|
6706
|
-
value: function(element) {
|
|
6734
|
+
value: function (element) {
|
|
6707
6735
|
return this.indexOf(element) !== -1;
|
|
6708
6736
|
}
|
|
6709
6737
|
});
|
|
@@ -6718,12 +6746,9 @@
|
|
|
6718
6746
|
* (possibly moving other elements around)
|
|
6719
6747
|
*/
|
|
6720
6748
|
Object.defineProperty(collection, 'add', {
|
|
6721
|
-
value: function(element, idx) {
|
|
6722
|
-
|
|
6749
|
+
value: function (element, idx) {
|
|
6723
6750
|
var currentIdx = this.indexOf(element);
|
|
6724
|
-
|
|
6725
6751
|
if (typeof idx === 'undefined') {
|
|
6726
|
-
|
|
6727
6752
|
if (currentIdx !== -1) {
|
|
6728
6753
|
// element already in collection (!)
|
|
6729
6754
|
return;
|
|
@@ -6735,14 +6760,12 @@
|
|
|
6735
6760
|
|
|
6736
6761
|
// handle already in collection
|
|
6737
6762
|
if (currentIdx !== -1) {
|
|
6738
|
-
|
|
6739
6763
|
// remove element from currentIdx
|
|
6740
6764
|
this.splice(currentIdx, 1);
|
|
6741
6765
|
}
|
|
6742
6766
|
|
|
6743
6767
|
// add element at idx
|
|
6744
6768
|
this.splice(idx, 0, element);
|
|
6745
|
-
|
|
6746
6769
|
if (currentIdx === -1) {
|
|
6747
6770
|
// set inverse, unless element was
|
|
6748
6771
|
// in collection already
|
|
@@ -6756,69 +6779,53 @@
|
|
|
6756
6779
|
Object.defineProperty(collection, '__refs_collection', {
|
|
6757
6780
|
value: true
|
|
6758
6781
|
});
|
|
6759
|
-
|
|
6760
6782
|
return collection;
|
|
6761
6783
|
}
|
|
6762
6784
|
|
|
6763
|
-
|
|
6785
|
+
/**
|
|
6786
|
+
* Checks if a given collection is extended
|
|
6787
|
+
*
|
|
6788
|
+
* @param {Array<Object>} collection
|
|
6789
|
+
*
|
|
6790
|
+
* @return {boolean}
|
|
6791
|
+
*/
|
|
6764
6792
|
function isExtended(collection) {
|
|
6765
6793
|
return collection.__refs_collection === true;
|
|
6766
6794
|
}
|
|
6767
6795
|
|
|
6768
|
-
collection.extend = extend;
|
|
6769
|
-
|
|
6770
|
-
collection.isExtended = isExtended;
|
|
6771
|
-
|
|
6772
|
-
var Collection = collection;
|
|
6773
|
-
|
|
6774
6796
|
function hasOwnProperty$1(e, property) {
|
|
6775
6797
|
return Object.prototype.hasOwnProperty.call(e, property.name || property);
|
|
6776
6798
|
}
|
|
6777
|
-
|
|
6778
6799
|
function defineCollectionProperty(ref, property, target) {
|
|
6779
|
-
|
|
6780
|
-
var collection = Collection.extend(target[property.name] || [], ref, property, target);
|
|
6781
|
-
|
|
6800
|
+
var collection = extend(target[property.name] || [], ref, property, target);
|
|
6782
6801
|
Object.defineProperty(target, property.name, {
|
|
6783
6802
|
enumerable: property.enumerable,
|
|
6784
6803
|
value: collection
|
|
6785
6804
|
});
|
|
6786
|
-
|
|
6787
6805
|
if (collection.length) {
|
|
6788
|
-
|
|
6789
|
-
collection.forEach(function(o) {
|
|
6806
|
+
collection.forEach(function (o) {
|
|
6790
6807
|
ref.set(o, property.inverse, target);
|
|
6791
6808
|
});
|
|
6792
6809
|
}
|
|
6793
6810
|
}
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
6811
|
function defineProperty$1(ref, property, target) {
|
|
6797
|
-
|
|
6798
6812
|
var inverseProperty = property.inverse;
|
|
6799
|
-
|
|
6800
6813
|
var _value = target[property.name];
|
|
6801
|
-
|
|
6802
6814
|
Object.defineProperty(target, property.name, {
|
|
6803
6815
|
configurable: property.configurable,
|
|
6804
6816
|
enumerable: property.enumerable,
|
|
6805
|
-
|
|
6806
|
-
get: function() {
|
|
6817
|
+
get: function () {
|
|
6807
6818
|
return _value;
|
|
6808
6819
|
},
|
|
6809
|
-
|
|
6810
|
-
set: function(value) {
|
|
6811
|
-
|
|
6820
|
+
set: function (value) {
|
|
6812
6821
|
// return if we already performed all changes
|
|
6813
6822
|
if (value === _value) {
|
|
6814
6823
|
return;
|
|
6815
6824
|
}
|
|
6816
|
-
|
|
6817
6825
|
var old = _value;
|
|
6818
6826
|
|
|
6819
6827
|
// temporary set null
|
|
6820
6828
|
_value = null;
|
|
6821
|
-
|
|
6822
6829
|
if (old) {
|
|
6823
6830
|
ref.unset(old, inverseProperty, target);
|
|
6824
6831
|
}
|
|
@@ -6830,7 +6837,6 @@
|
|
|
6830
6837
|
ref.set(_value, inverseProperty, target);
|
|
6831
6838
|
}
|
|
6832
6839
|
});
|
|
6833
|
-
|
|
6834
6840
|
}
|
|
6835
6841
|
|
|
6836
6842
|
/**
|
|
@@ -6876,16 +6882,14 @@
|
|
|
6876
6882
|
*
|
|
6877
6883
|
* wheels[0].car // undefined
|
|
6878
6884
|
*/
|
|
6879
|
-
function Refs
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
return new Refs$1(a, b);
|
|
6885
|
+
function Refs(a, b) {
|
|
6886
|
+
if (!(this instanceof Refs)) {
|
|
6887
|
+
return new Refs(a, b);
|
|
6883
6888
|
}
|
|
6884
6889
|
|
|
6885
6890
|
// link
|
|
6886
6891
|
a.inverse = b;
|
|
6887
6892
|
b.inverse = a;
|
|
6888
|
-
|
|
6889
6893
|
this.props = {};
|
|
6890
6894
|
this.props[a.name] = a;
|
|
6891
6895
|
this.props[b.name] = b;
|
|
@@ -6900,43 +6904,34 @@
|
|
|
6900
6904
|
* @param {Object} target
|
|
6901
6905
|
* @param {String} property
|
|
6902
6906
|
*/
|
|
6903
|
-
Refs
|
|
6907
|
+
Refs.prototype.bind = function (target, property) {
|
|
6904
6908
|
if (typeof property === 'string') {
|
|
6905
6909
|
if (!this.props[property]) {
|
|
6906
6910
|
throw new Error('no property <' + property + '> in ref');
|
|
6907
6911
|
}
|
|
6908
6912
|
property = this.props[property];
|
|
6909
6913
|
}
|
|
6910
|
-
|
|
6911
6914
|
if (property.collection) {
|
|
6912
6915
|
defineCollectionProperty(this, property, target);
|
|
6913
6916
|
} else {
|
|
6914
6917
|
defineProperty$1(this, property, target);
|
|
6915
6918
|
}
|
|
6916
6919
|
};
|
|
6917
|
-
|
|
6918
|
-
Refs$1.prototype.ensureRefsCollection = function(target, property) {
|
|
6919
|
-
|
|
6920
|
+
Refs.prototype.ensureRefsCollection = function (target, property) {
|
|
6920
6921
|
var collection = target[property.name];
|
|
6921
|
-
|
|
6922
|
-
if (!Collection.isExtended(collection)) {
|
|
6922
|
+
if (!isExtended(collection)) {
|
|
6923
6923
|
defineCollectionProperty(this, property, target);
|
|
6924
6924
|
}
|
|
6925
|
-
|
|
6926
6925
|
return collection;
|
|
6927
6926
|
};
|
|
6928
|
-
|
|
6929
|
-
Refs$1.prototype.ensureBound = function(target, property) {
|
|
6927
|
+
Refs.prototype.ensureBound = function (target, property) {
|
|
6930
6928
|
if (!hasOwnProperty$1(target, property)) {
|
|
6931
6929
|
this.bind(target, property);
|
|
6932
6930
|
}
|
|
6933
6931
|
};
|
|
6934
|
-
|
|
6935
|
-
Refs$1.prototype.unset = function(target, property, value) {
|
|
6936
|
-
|
|
6932
|
+
Refs.prototype.unset = function (target, property, value) {
|
|
6937
6933
|
if (target) {
|
|
6938
6934
|
this.ensureBound(target, property);
|
|
6939
|
-
|
|
6940
6935
|
if (property.collection) {
|
|
6941
6936
|
this.ensureRefsCollection(target, property).remove(value);
|
|
6942
6937
|
} else {
|
|
@@ -6944,12 +6939,9 @@
|
|
|
6944
6939
|
}
|
|
6945
6940
|
}
|
|
6946
6941
|
};
|
|
6947
|
-
|
|
6948
|
-
Refs$1.prototype.set = function(target, property, value) {
|
|
6949
|
-
|
|
6942
|
+
Refs.prototype.set = function (target, property, value) {
|
|
6950
6943
|
if (target) {
|
|
6951
6944
|
this.ensureBound(target, property);
|
|
6952
|
-
|
|
6953
6945
|
if (property.collection) {
|
|
6954
6946
|
this.ensureRefsCollection(target, property).add(value);
|
|
6955
6947
|
} else {
|
|
@@ -6958,15 +6950,6 @@
|
|
|
6958
6950
|
}
|
|
6959
6951
|
};
|
|
6960
6952
|
|
|
6961
|
-
var refs = Refs$1;
|
|
6962
|
-
|
|
6963
|
-
objectRefs.exports = refs;
|
|
6964
|
-
|
|
6965
|
-
objectRefs.exports.Collection = collection;
|
|
6966
|
-
|
|
6967
|
-
var objectRefsExports = objectRefs.exports;
|
|
6968
|
-
var Refs = /*@__PURE__*/getDefaultExportFromCjs(objectRefsExports);
|
|
6969
|
-
|
|
6970
6953
|
var parentRefs = new Refs({ name: 'children', enumerable: true, collection: true }, { name: 'parent' }),
|
|
6971
6954
|
labelRefs = new Refs({ name: 'labels', enumerable: true, collection: true }, { name: 'labelTarget' }),
|
|
6972
6955
|
attacherRefs = new Refs({ name: 'attachers', collection: true }, { name: 'host' }),
|
|
@@ -8839,6 +8822,17 @@
|
|
|
8839
8822
|
this.idProperty = p;
|
|
8840
8823
|
};
|
|
8841
8824
|
|
|
8825
|
+
DescriptorBuilder.prototype.assertNotTrait = function(typeDescriptor) {
|
|
8826
|
+
|
|
8827
|
+
const _extends = typeDescriptor.extends || [];
|
|
8828
|
+
|
|
8829
|
+
if (_extends.length) {
|
|
8830
|
+
throw new Error(
|
|
8831
|
+
`cannot create <${ typeDescriptor.name }> extending <${ typeDescriptor.extends }>`
|
|
8832
|
+
);
|
|
8833
|
+
}
|
|
8834
|
+
};
|
|
8835
|
+
|
|
8842
8836
|
DescriptorBuilder.prototype.assertNotDefined = function(p, name) {
|
|
8843
8837
|
var propertyName = p.name,
|
|
8844
8838
|
definedProperty = this.propertiesByName[propertyName];
|
|
@@ -8857,6 +8851,10 @@
|
|
|
8857
8851
|
|
|
8858
8852
|
DescriptorBuilder.prototype.addTrait = function(t, inherited) {
|
|
8859
8853
|
|
|
8854
|
+
if (inherited) {
|
|
8855
|
+
this.assertNotTrait(t);
|
|
8856
|
+
}
|
|
8857
|
+
|
|
8860
8858
|
var typesByName = this.allTypesByName,
|
|
8861
8859
|
types = this.allTypes;
|
|
8862
8860
|
|
|
@@ -8990,7 +8988,9 @@
|
|
|
8990
8988
|
});
|
|
8991
8989
|
|
|
8992
8990
|
forEach$1(type.extends, bind$2(function(extendsName) {
|
|
8993
|
-
var
|
|
8991
|
+
var extendsNameNs = parseName(extendsName, ns.prefix);
|
|
8992
|
+
|
|
8993
|
+
var extended = this.typeMap[extendsNameNs.name];
|
|
8994
8994
|
|
|
8995
8995
|
extended.traits = extended.traits || [];
|
|
8996
8996
|
extended.traits.push(name);
|
|
@@ -9019,24 +9019,33 @@
|
|
|
9019
9019
|
|
|
9020
9020
|
var self = this;
|
|
9021
9021
|
|
|
9022
|
+
/**
|
|
9023
|
+
* Traverse the selected super type or trait
|
|
9024
|
+
*
|
|
9025
|
+
* @param {String} cls
|
|
9026
|
+
* @param {Boolean} [trait=false]
|
|
9027
|
+
*/
|
|
9028
|
+
function traverse(cls, trait) {
|
|
9029
|
+
var parentNs = parseName(cls, isBuiltIn(cls) ? '' : nsName.prefix);
|
|
9030
|
+
self.mapTypes(parentNs, iterator, trait);
|
|
9031
|
+
}
|
|
9032
|
+
|
|
9022
9033
|
/**
|
|
9023
9034
|
* Traverse the selected trait.
|
|
9024
9035
|
*
|
|
9025
9036
|
* @param {String} cls
|
|
9026
9037
|
*/
|
|
9027
9038
|
function traverseTrait(cls) {
|
|
9028
|
-
return
|
|
9039
|
+
return traverse(cls, true);
|
|
9029
9040
|
}
|
|
9030
9041
|
|
|
9031
9042
|
/**
|
|
9032
|
-
* Traverse the selected super type
|
|
9043
|
+
* Traverse the selected super type
|
|
9033
9044
|
*
|
|
9034
9045
|
* @param {String} cls
|
|
9035
|
-
* @param {Boolean} [trait=false]
|
|
9036
9046
|
*/
|
|
9037
|
-
function traverseSuper(cls
|
|
9038
|
-
|
|
9039
|
-
self.mapTypes(parentNs, iterator, trait);
|
|
9047
|
+
function traverseSuper(cls) {
|
|
9048
|
+
return traverse(cls, false);
|
|
9040
9049
|
}
|
|
9041
9050
|
|
|
9042
9051
|
if (!type) {
|
|
@@ -9119,7 +9128,7 @@
|
|
|
9119
9128
|
throw new TypeError('property name must be a non-empty string');
|
|
9120
9129
|
}
|
|
9121
9130
|
|
|
9122
|
-
var property = this.
|
|
9131
|
+
var property = this.getProperty(target, name);
|
|
9123
9132
|
|
|
9124
9133
|
var propertyName = property && property.name;
|
|
9125
9134
|
|
|
@@ -9130,7 +9139,7 @@
|
|
|
9130
9139
|
if (property) {
|
|
9131
9140
|
delete target[propertyName];
|
|
9132
9141
|
} else {
|
|
9133
|
-
delete target.$attrs[name];
|
|
9142
|
+
delete target.$attrs[stripGlobal(name)];
|
|
9134
9143
|
}
|
|
9135
9144
|
} else {
|
|
9136
9145
|
|
|
@@ -9143,7 +9152,7 @@
|
|
|
9143
9152
|
defineProperty(target, property, value);
|
|
9144
9153
|
}
|
|
9145
9154
|
} else {
|
|
9146
|
-
target.$attrs[name] = value;
|
|
9155
|
+
target.$attrs[stripGlobal(name)] = value;
|
|
9147
9156
|
}
|
|
9148
9157
|
}
|
|
9149
9158
|
};
|
|
@@ -9158,10 +9167,10 @@
|
|
|
9158
9167
|
*/
|
|
9159
9168
|
Properties.prototype.get = function(target, name) {
|
|
9160
9169
|
|
|
9161
|
-
var property = this.
|
|
9170
|
+
var property = this.getProperty(target, name);
|
|
9162
9171
|
|
|
9163
9172
|
if (!property) {
|
|
9164
|
-
return target.$attrs[name];
|
|
9173
|
+
return target.$attrs[stripGlobal(name)];
|
|
9165
9174
|
}
|
|
9166
9175
|
|
|
9167
9176
|
var propertyName = property.name;
|
|
@@ -9215,6 +9224,44 @@
|
|
|
9215
9224
|
this.define(target, '$model', { value: model });
|
|
9216
9225
|
};
|
|
9217
9226
|
|
|
9227
|
+
/**
|
|
9228
|
+
* Return property with the given name on the element.
|
|
9229
|
+
*
|
|
9230
|
+
* @param {any} target
|
|
9231
|
+
* @param {string} name
|
|
9232
|
+
*
|
|
9233
|
+
* @return {object | null} property
|
|
9234
|
+
*/
|
|
9235
|
+
Properties.prototype.getProperty = function(target, name) {
|
|
9236
|
+
|
|
9237
|
+
var model = this.model;
|
|
9238
|
+
|
|
9239
|
+
var property = model.getPropertyDescriptor(target, name);
|
|
9240
|
+
|
|
9241
|
+
if (property) {
|
|
9242
|
+
return property;
|
|
9243
|
+
}
|
|
9244
|
+
|
|
9245
|
+
if (name.includes(':')) {
|
|
9246
|
+
return null;
|
|
9247
|
+
}
|
|
9248
|
+
|
|
9249
|
+
const strict = model.config.strict;
|
|
9250
|
+
|
|
9251
|
+
if (typeof strict !== 'undefined') {
|
|
9252
|
+
const error = new TypeError(`unknown property <${ name }> on <${ target.$type }>`);
|
|
9253
|
+
|
|
9254
|
+
if (strict) {
|
|
9255
|
+
throw error;
|
|
9256
|
+
} else {
|
|
9257
|
+
|
|
9258
|
+
// eslint-disable-next-line no-undef
|
|
9259
|
+
typeof console !== 'undefined' && console.warn(error);
|
|
9260
|
+
}
|
|
9261
|
+
}
|
|
9262
|
+
|
|
9263
|
+
return null;
|
|
9264
|
+
};
|
|
9218
9265
|
|
|
9219
9266
|
function isUndefined(val) {
|
|
9220
9267
|
return typeof val === 'undefined';
|
|
@@ -9229,6 +9276,10 @@
|
|
|
9229
9276
|
});
|
|
9230
9277
|
}
|
|
9231
9278
|
|
|
9279
|
+
function stripGlobal(name) {
|
|
9280
|
+
return name.replace(/^:/, '');
|
|
9281
|
+
}
|
|
9282
|
+
|
|
9232
9283
|
// Moddle implementation /////////////////////////////////////////////////
|
|
9233
9284
|
|
|
9234
9285
|
/**
|
|
@@ -9251,8 +9302,10 @@
|
|
|
9251
9302
|
* var moddle = new Moddle([pkg]);
|
|
9252
9303
|
*
|
|
9253
9304
|
* @param {Array<Package>} packages the packages to contain
|
|
9305
|
+
*
|
|
9306
|
+
* @param { { strict?: boolean } } [config] moddle configuration
|
|
9254
9307
|
*/
|
|
9255
|
-
function Moddle(packages) {
|
|
9308
|
+
function Moddle(packages, config = {}) {
|
|
9256
9309
|
|
|
9257
9310
|
this.properties = new Properties(this);
|
|
9258
9311
|
|
|
@@ -9260,6 +9313,8 @@
|
|
|
9260
9313
|
this.registry = new Registry(packages, this.properties);
|
|
9261
9314
|
|
|
9262
9315
|
this.typeCache = {};
|
|
9316
|
+
|
|
9317
|
+
this.config = config;
|
|
9263
9318
|
}
|
|
9264
9319
|
|
|
9265
9320
|
|
|
@@ -9353,6 +9408,12 @@
|
|
|
9353
9408
|
$type: name,
|
|
9354
9409
|
$instanceOf: function(type) {
|
|
9355
9410
|
return type === this.$type;
|
|
9411
|
+
},
|
|
9412
|
+
get: function(key) {
|
|
9413
|
+
return this[key];
|
|
9414
|
+
},
|
|
9415
|
+
set: function(key, value) {
|
|
9416
|
+
set$2(this, [ key ], value);
|
|
9356
9417
|
}
|
|
9357
9418
|
};
|
|
9358
9419
|
|
|
@@ -9368,6 +9429,8 @@
|
|
|
9368
9429
|
|
|
9369
9430
|
this.properties.defineDescriptor(element, descriptor);
|
|
9370
9431
|
this.properties.defineModel(element, this);
|
|
9432
|
+
this.properties.define(element, 'get', { enumerable: false, writable: true });
|
|
9433
|
+
this.properties.define(element, 'set', { enumerable: false, writable: true });
|
|
9371
9434
|
this.properties.define(element, '$parent', { enumerable: false, writable: true });
|
|
9372
9435
|
this.properties.define(element, '$instanceOf', { enumerable: false, writable: true });
|
|
9373
9436
|
|
|
@@ -26371,6 +26434,10 @@
|
|
|
26371
26434
|
NavigatedViewer.prototype._navigationModules
|
|
26372
26435
|
);
|
|
26373
26436
|
|
|
26437
|
+
function getDefaultExportFromCjs (x) {
|
|
26438
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
26439
|
+
}
|
|
26440
|
+
|
|
26374
26441
|
var hammer = {exports: {}};
|
|
26375
26442
|
|
|
26376
26443
|
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
@@ -30431,6 +30498,10 @@
|
|
|
30431
30498
|
return (entry.rank || 0) >= 0;
|
|
30432
30499
|
}
|
|
30433
30500
|
|
|
30501
|
+
if (entry.searchable === false) {
|
|
30502
|
+
return false;
|
|
30503
|
+
}
|
|
30504
|
+
|
|
30434
30505
|
const search = [
|
|
30435
30506
|
entry.description || '',
|
|
30436
30507
|
entry.label || '',
|
|
@@ -33728,7 +33799,7 @@
|
|
|
33728
33799
|
*/
|
|
33729
33800
|
function getPathIntersection(waypoints, reference) {
|
|
33730
33801
|
|
|
33731
|
-
var intersections =
|
|
33802
|
+
var intersections = findPathIntersections(circlePath(reference, INTERSECTION_THRESHOLD$1), linePath(waypoints));
|
|
33732
33803
|
|
|
33733
33804
|
var a = intersections[0],
|
|
33734
33805
|
b = intersections[intersections.length - 1],
|