@teselagen/ove 0.3.24 → 0.3.26
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/index.cjs.js +1731 -1476
- package/index.es.js +1731 -1476
- package/index.umd.js +1287 -1076
- package/package.json +2 -2
- package/src/AlignmentView/index.js +2 -2
- package/src/CircularView/Labels/index.js +9 -4
- package/src/CircularView/drawAnnotations.js +7 -5
- package/src/RowItem/Translations/Translation.js +3 -5
- package/src/commands/index.js +1 -1
- package/src/helperComponents/withHover.js +38 -14
- package/style.css +12 -0
package/index.umd.js
CHANGED
|
@@ -23198,11 +23198,174 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23198
23198
|
}
|
|
23199
23199
|
}, "effect")
|
|
23200
23200
|
});
|
|
23201
|
+
var mouseCoords = {
|
|
23202
|
+
clientX: 0,
|
|
23203
|
+
clientY: 0
|
|
23204
|
+
};
|
|
23205
|
+
var activeInstances = [];
|
|
23206
|
+
function storeMouseCoords(_ref) {
|
|
23207
|
+
var clientX = _ref.clientX, clientY = _ref.clientY;
|
|
23208
|
+
mouseCoords = {
|
|
23209
|
+
clientX,
|
|
23210
|
+
clientY
|
|
23211
|
+
};
|
|
23212
|
+
}
|
|
23213
|
+
__name(storeMouseCoords, "storeMouseCoords");
|
|
23214
|
+
function addMouseCoordsListener(doc) {
|
|
23215
|
+
doc.addEventListener("mousemove", storeMouseCoords);
|
|
23216
|
+
}
|
|
23217
|
+
__name(addMouseCoordsListener, "addMouseCoordsListener");
|
|
23218
|
+
function removeMouseCoordsListener(doc) {
|
|
23219
|
+
doc.removeEventListener("mousemove", storeMouseCoords);
|
|
23220
|
+
}
|
|
23221
|
+
__name(removeMouseCoordsListener, "removeMouseCoordsListener");
|
|
23222
|
+
var followCursor = {
|
|
23223
|
+
name: "followCursor",
|
|
23224
|
+
defaultValue: false,
|
|
23225
|
+
fn: /* @__PURE__ */ __name(function fn2(instance) {
|
|
23226
|
+
var reference2 = instance.reference;
|
|
23227
|
+
var doc = getOwnerDocument(instance.props.triggerTarget || reference2);
|
|
23228
|
+
var isInternalUpdate = false;
|
|
23229
|
+
var wasFocusEvent = false;
|
|
23230
|
+
var isUnmounted = true;
|
|
23231
|
+
var prevProps = instance.props;
|
|
23232
|
+
function getIsInitialBehavior() {
|
|
23233
|
+
return instance.props.followCursor === "initial" && instance.state.isVisible;
|
|
23234
|
+
}
|
|
23235
|
+
__name(getIsInitialBehavior, "getIsInitialBehavior");
|
|
23236
|
+
function addListener() {
|
|
23237
|
+
doc.addEventListener("mousemove", onMouseMove);
|
|
23238
|
+
}
|
|
23239
|
+
__name(addListener, "addListener");
|
|
23240
|
+
function removeListener() {
|
|
23241
|
+
doc.removeEventListener("mousemove", onMouseMove);
|
|
23242
|
+
}
|
|
23243
|
+
__name(removeListener, "removeListener");
|
|
23244
|
+
function unsetGetReferenceClientRect() {
|
|
23245
|
+
isInternalUpdate = true;
|
|
23246
|
+
instance.setProps({
|
|
23247
|
+
getReferenceClientRect: null
|
|
23248
|
+
});
|
|
23249
|
+
isInternalUpdate = false;
|
|
23250
|
+
}
|
|
23251
|
+
__name(unsetGetReferenceClientRect, "unsetGetReferenceClientRect");
|
|
23252
|
+
function onMouseMove(event) {
|
|
23253
|
+
var isCursorOverReference = event.target ? reference2.contains(event.target) : true;
|
|
23254
|
+
var followCursor2 = instance.props.followCursor;
|
|
23255
|
+
var clientX = event.clientX, clientY = event.clientY;
|
|
23256
|
+
var rect = reference2.getBoundingClientRect();
|
|
23257
|
+
var relativeX = clientX - rect.left;
|
|
23258
|
+
var relativeY = clientY - rect.top;
|
|
23259
|
+
if (isCursorOverReference || !instance.props.interactive) {
|
|
23260
|
+
instance.setProps({
|
|
23261
|
+
// @ts-ignore - unneeded DOMRect properties
|
|
23262
|
+
getReferenceClientRect: /* @__PURE__ */ __name(function getReferenceClientRect() {
|
|
23263
|
+
var rect2 = reference2.getBoundingClientRect();
|
|
23264
|
+
var x2 = clientX;
|
|
23265
|
+
var y2 = clientY;
|
|
23266
|
+
if (followCursor2 === "initial") {
|
|
23267
|
+
x2 = rect2.left + relativeX;
|
|
23268
|
+
y2 = rect2.top + relativeY;
|
|
23269
|
+
}
|
|
23270
|
+
var top2 = followCursor2 === "horizontal" ? rect2.top : y2;
|
|
23271
|
+
var right2 = followCursor2 === "vertical" ? rect2.right : x2;
|
|
23272
|
+
var bottom2 = followCursor2 === "horizontal" ? rect2.bottom : y2;
|
|
23273
|
+
var left2 = followCursor2 === "vertical" ? rect2.left : x2;
|
|
23274
|
+
return {
|
|
23275
|
+
width: right2 - left2,
|
|
23276
|
+
height: bottom2 - top2,
|
|
23277
|
+
top: top2,
|
|
23278
|
+
right: right2,
|
|
23279
|
+
bottom: bottom2,
|
|
23280
|
+
left: left2
|
|
23281
|
+
};
|
|
23282
|
+
}, "getReferenceClientRect")
|
|
23283
|
+
});
|
|
23284
|
+
}
|
|
23285
|
+
}
|
|
23286
|
+
__name(onMouseMove, "onMouseMove");
|
|
23287
|
+
function create2() {
|
|
23288
|
+
if (instance.props.followCursor) {
|
|
23289
|
+
activeInstances.push({
|
|
23290
|
+
instance,
|
|
23291
|
+
doc
|
|
23292
|
+
});
|
|
23293
|
+
addMouseCoordsListener(doc);
|
|
23294
|
+
}
|
|
23295
|
+
}
|
|
23296
|
+
__name(create2, "create");
|
|
23297
|
+
function destroy2() {
|
|
23298
|
+
activeInstances = activeInstances.filter(function(data) {
|
|
23299
|
+
return data.instance !== instance;
|
|
23300
|
+
});
|
|
23301
|
+
if (activeInstances.filter(function(data) {
|
|
23302
|
+
return data.doc === doc;
|
|
23303
|
+
}).length === 0) {
|
|
23304
|
+
removeMouseCoordsListener(doc);
|
|
23305
|
+
}
|
|
23306
|
+
}
|
|
23307
|
+
__name(destroy2, "destroy");
|
|
23308
|
+
return {
|
|
23309
|
+
onCreate: create2,
|
|
23310
|
+
onDestroy: destroy2,
|
|
23311
|
+
onBeforeUpdate: /* @__PURE__ */ __name(function onBeforeUpdate() {
|
|
23312
|
+
prevProps = instance.props;
|
|
23313
|
+
}, "onBeforeUpdate"),
|
|
23314
|
+
onAfterUpdate: /* @__PURE__ */ __name(function onAfterUpdate(_2, _ref2) {
|
|
23315
|
+
var followCursor2 = _ref2.followCursor;
|
|
23316
|
+
if (isInternalUpdate) {
|
|
23317
|
+
return;
|
|
23318
|
+
}
|
|
23319
|
+
if (followCursor2 !== void 0 && prevProps.followCursor !== followCursor2) {
|
|
23320
|
+
destroy2();
|
|
23321
|
+
if (followCursor2) {
|
|
23322
|
+
create2();
|
|
23323
|
+
if (instance.state.isMounted && !wasFocusEvent && !getIsInitialBehavior()) {
|
|
23324
|
+
addListener();
|
|
23325
|
+
}
|
|
23326
|
+
} else {
|
|
23327
|
+
removeListener();
|
|
23328
|
+
unsetGetReferenceClientRect();
|
|
23329
|
+
}
|
|
23330
|
+
}
|
|
23331
|
+
}, "onAfterUpdate"),
|
|
23332
|
+
onMount: /* @__PURE__ */ __name(function onMount() {
|
|
23333
|
+
if (instance.props.followCursor && !wasFocusEvent) {
|
|
23334
|
+
if (isUnmounted) {
|
|
23335
|
+
onMouseMove(mouseCoords);
|
|
23336
|
+
isUnmounted = false;
|
|
23337
|
+
}
|
|
23338
|
+
if (!getIsInitialBehavior()) {
|
|
23339
|
+
addListener();
|
|
23340
|
+
}
|
|
23341
|
+
}
|
|
23342
|
+
}, "onMount"),
|
|
23343
|
+
onTrigger: /* @__PURE__ */ __name(function onTrigger(_2, event) {
|
|
23344
|
+
if (isMouseEvent$1(event)) {
|
|
23345
|
+
mouseCoords = {
|
|
23346
|
+
clientX: event.clientX,
|
|
23347
|
+
clientY: event.clientY
|
|
23348
|
+
};
|
|
23349
|
+
}
|
|
23350
|
+
wasFocusEvent = event.type === "focus";
|
|
23351
|
+
}, "onTrigger"),
|
|
23352
|
+
onHidden: /* @__PURE__ */ __name(function onHidden() {
|
|
23353
|
+
if (instance.props.followCursor) {
|
|
23354
|
+
unsetGetReferenceClientRect();
|
|
23355
|
+
removeListener();
|
|
23356
|
+
isUnmounted = true;
|
|
23357
|
+
}
|
|
23358
|
+
}, "onHidden")
|
|
23359
|
+
};
|
|
23360
|
+
}, "fn")
|
|
23361
|
+
};
|
|
23201
23362
|
tippy$1.setDefaultProps({
|
|
23202
23363
|
render: render$1
|
|
23203
23364
|
});
|
|
23204
23365
|
const tippy = "";
|
|
23205
23366
|
let tippys = [];
|
|
23367
|
+
let recentlyHidden = false;
|
|
23368
|
+
let clearMe;
|
|
23206
23369
|
(function() {
|
|
23207
23370
|
let lastMouseOverElement = null;
|
|
23208
23371
|
document.addEventListener("mouseover", function(event) {
|
|
@@ -23223,21 +23386,63 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23223
23386
|
lastMouseOverElement = element2;
|
|
23224
23387
|
const id2 = "tippyEllipsizedEl";
|
|
23225
23388
|
let innerRun = false;
|
|
23226
|
-
const inner2 = /* @__PURE__ */ __name((content2, el22) => {
|
|
23389
|
+
const inner2 = /* @__PURE__ */ __name((content2, el22, { dataTitle, dataAvoid, dataAvoidBackup }) => {
|
|
23390
|
+
var _a3, _b3;
|
|
23227
23391
|
innerRun = true;
|
|
23228
23392
|
document.querySelectorAll(`.${id2}`).forEach((elem) => {
|
|
23229
23393
|
elem.classList.remove(id2);
|
|
23230
23394
|
});
|
|
23231
23395
|
el22.classList.add(id2);
|
|
23232
|
-
const inst = tippy$1(`.${id2}`, {
|
|
23396
|
+
const inst = tippy$1(`.${id2}`, __spreadValues(__spreadProps(__spreadValues({
|
|
23397
|
+
plugins: [followCursor],
|
|
23233
23398
|
content: content2,
|
|
23234
|
-
delay: [0, 0],
|
|
23399
|
+
delay: dataTitle && !recentlyHidden ? [1300, 1300] : dataTitle ? [150, 150] : [0, 0],
|
|
23235
23400
|
allowHTML: true
|
|
23236
|
-
}
|
|
23401
|
+
}, dataTitle && {
|
|
23402
|
+
followCursor: dataTitle ? "initial" : false
|
|
23403
|
+
}), {
|
|
23404
|
+
onHidden() {
|
|
23405
|
+
recentlyHidden = true;
|
|
23406
|
+
clearMe && clearTimeout(clearMe);
|
|
23407
|
+
clearMe = setTimeout(() => {
|
|
23408
|
+
if (tippys.length === 0)
|
|
23409
|
+
recentlyHidden = false;
|
|
23410
|
+
}, 700);
|
|
23411
|
+
}
|
|
23412
|
+
}), dataAvoid && {
|
|
23413
|
+
popperOptions: {
|
|
23414
|
+
modifiers: [
|
|
23415
|
+
{
|
|
23416
|
+
name: "myModifier",
|
|
23417
|
+
enabled: true,
|
|
23418
|
+
phase: "beforeWrite",
|
|
23419
|
+
requires: ["computeStyles"],
|
|
23420
|
+
requiresIfExists: ["offset"],
|
|
23421
|
+
fn({ state: state2 }) {
|
|
23422
|
+
const customBoundary = document.querySelector(dataAvoid) || document.querySelector(dataAvoidBackup);
|
|
23423
|
+
if (!customBoundary)
|
|
23424
|
+
return;
|
|
23425
|
+
const a2 = customBoundary.getBoundingClientRect();
|
|
23426
|
+
if (a2.top < state2.rects.reference.y) {
|
|
23427
|
+
const b3 = Math.abs(
|
|
23428
|
+
Math.abs(a2.top - state2.rects.reference.y) - 10
|
|
23429
|
+
);
|
|
23430
|
+
state2.styles.popper.bottom = b3 + "px";
|
|
23431
|
+
}
|
|
23432
|
+
}
|
|
23433
|
+
}
|
|
23434
|
+
]
|
|
23435
|
+
}
|
|
23436
|
+
}));
|
|
23437
|
+
if (dataTitle) {
|
|
23438
|
+
(_b3 = (_a3 = inst[0]) == null ? void 0 : _a3.popper) == null ? void 0 : _b3.classList.add("isDataTitle");
|
|
23439
|
+
}
|
|
23237
23440
|
clearOldTippys(...inst);
|
|
23238
|
-
|
|
23239
|
-
|
|
23240
|
-
|
|
23441
|
+
if (!dataTitle) {
|
|
23442
|
+
inst.forEach((i2) => {
|
|
23443
|
+
i2.show();
|
|
23444
|
+
});
|
|
23445
|
+
}
|
|
23241
23446
|
tippys = [...tippys, ...inst];
|
|
23242
23447
|
if (content2 === el22.getAttribute("title")) {
|
|
23243
23448
|
el22.removeAttribute("title");
|
|
@@ -23252,14 +23457,22 @@ var __async = (__this, __arguments, generator) => {
|
|
|
23252
23457
|
const style2 = window.getComputedStyle(el2);
|
|
23253
23458
|
const whiteSpace = style2.getPropertyValue("white-space");
|
|
23254
23459
|
const textOverflow = style2.getPropertyValue("text-overflow");
|
|
23255
|
-
|
|
23460
|
+
const dataTitle = el2.getAttribute("data-title");
|
|
23461
|
+
const dataAvoid = el2.getAttribute("data-avoid");
|
|
23462
|
+
const dataAvoidBackup = el2.getAttribute("data-avoid-backup");
|
|
23463
|
+
dataTip = el2.getAttribute("data-tip") || dataTitle;
|
|
23256
23464
|
const isEllipsized = whiteSpace === "nowrap" && textOverflow === "ellipsis";
|
|
23465
|
+
const opts2 = {
|
|
23466
|
+
dataTitle,
|
|
23467
|
+
dataAvoid,
|
|
23468
|
+
dataAvoidBackup
|
|
23469
|
+
};
|
|
23257
23470
|
if (dataTip) {
|
|
23258
|
-
inner2(dataTip, el2);
|
|
23471
|
+
inner2(dataTip, el2, opts2);
|
|
23259
23472
|
break;
|
|
23260
23473
|
} else if (isEllipsized && el2.offsetWidth < el2.scrollWidth - 4 && //the -4 is adding a teeny bit of tolerance to fix issues with the column headers getting tooltips even when fully visible
|
|
23261
23474
|
!el2.classList.contains("no-data-tip") && el2.textContent && ((_b2 = (_a2 = el2.textContent) == null ? void 0 : _a2.trim) == null ? void 0 : _b2.call(_a2).length) !== 0) {
|
|
23262
|
-
inner2(el2.textContent, el2);
|
|
23475
|
+
inner2(el2.textContent, el2, opts2);
|
|
23263
23476
|
break;
|
|
23264
23477
|
} else if (isEllipsized && el2.offsetWidth >= el2.scrollWidth)
|
|
23265
23478
|
;
|
|
@@ -26907,10 +27120,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
26907
27120
|
/* istanbul ignore next */
|
|
26908
27121
|
Object.getOwnPropertyNames
|
|
26909
27122
|
);
|
|
26910
|
-
function toPrimitive$
|
|
27123
|
+
function toPrimitive$3(value) {
|
|
26911
27124
|
return value === null ? null : typeof value === "object" ? "" + value : value;
|
|
26912
27125
|
}
|
|
26913
|
-
__name(toPrimitive$
|
|
27126
|
+
__name(toPrimitive$3, "toPrimitive$3");
|
|
26914
27127
|
function hasProp(target, prop2) {
|
|
26915
27128
|
return objectPrototype$2.hasOwnProperty.call(target, prop2);
|
|
26916
27129
|
}
|
|
@@ -27807,7 +28020,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
27807
28020
|
return this.name_ + "[" + this.value_ + "]";
|
|
27808
28021
|
}, "toString");
|
|
27809
28022
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
27810
|
-
return toPrimitive$
|
|
28023
|
+
return toPrimitive$3(this.get());
|
|
27811
28024
|
}, "valueOf");
|
|
27812
28025
|
_proto[_Symbol$toPrimitive] = function() {
|
|
27813
28026
|
return this.valueOf();
|
|
@@ -27992,7 +28205,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
27992
28205
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
27993
28206
|
}, "toString");
|
|
27994
28207
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
27995
|
-
return toPrimitive$
|
|
28208
|
+
return toPrimitive$3(this.get());
|
|
27996
28209
|
}, "valueOf");
|
|
27997
28210
|
_proto[_Symbol$toPrimitive$1] = function() {
|
|
27998
28211
|
return this.valueOf();
|
|
@@ -44680,20 +44893,11 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44680
44893
|
return _domCreate;
|
|
44681
44894
|
}
|
|
44682
44895
|
__name(require_domCreate, "require_domCreate");
|
|
44683
|
-
var _ie8DomDefine
|
|
44684
|
-
|
|
44685
|
-
|
|
44686
|
-
|
|
44687
|
-
|
|
44688
|
-
hasRequired_ie8DomDefine = 1;
|
|
44689
|
-
_ie8DomDefine = !require_descriptors() && !_fails(function() {
|
|
44690
|
-
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
44691
|
-
return 7;
|
|
44692
|
-
} }).a != 7;
|
|
44693
|
-
});
|
|
44694
|
-
return _ie8DomDefine;
|
|
44695
|
-
}
|
|
44696
|
-
__name(require_ie8DomDefine, "require_ie8DomDefine");
|
|
44896
|
+
var _ie8DomDefine = !require_descriptors() && !_fails(function() {
|
|
44897
|
+
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
44898
|
+
return 7;
|
|
44899
|
+
} }).a != 7;
|
|
44900
|
+
});
|
|
44697
44901
|
var isObject$6 = _isObject;
|
|
44698
44902
|
var _toPrimitive$1 = /* @__PURE__ */ __name(function(it, S2) {
|
|
44699
44903
|
if (!isObject$6(it))
|
|
@@ -44707,33 +44911,25 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44707
44911
|
return val2;
|
|
44708
44912
|
throw TypeError("Can't convert object to primitive value");
|
|
44709
44913
|
}, "_toPrimitive$1");
|
|
44710
|
-
var
|
|
44711
|
-
|
|
44712
|
-
|
|
44713
|
-
|
|
44714
|
-
|
|
44715
|
-
|
|
44716
|
-
|
|
44717
|
-
|
|
44718
|
-
|
|
44719
|
-
|
|
44720
|
-
|
|
44721
|
-
|
|
44722
|
-
|
|
44723
|
-
|
|
44724
|
-
|
|
44725
|
-
|
|
44726
|
-
|
|
44727
|
-
|
|
44728
|
-
|
|
44729
|
-
throw TypeError("Accessors not supported!");
|
|
44730
|
-
if ("value" in Attributes)
|
|
44731
|
-
O2[P2] = Attributes.value;
|
|
44732
|
-
return O2;
|
|
44733
|
-
}, "defineProperty");
|
|
44734
|
-
return _objectDp;
|
|
44735
|
-
}
|
|
44736
|
-
__name(require_objectDp, "require_objectDp");
|
|
44914
|
+
var anObject$5 = _anObject;
|
|
44915
|
+
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
44916
|
+
var toPrimitive$2 = _toPrimitive$1;
|
|
44917
|
+
var dP$3 = Object.defineProperty;
|
|
44918
|
+
_objectDp.f = require_descriptors() ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
|
|
44919
|
+
anObject$5(O2);
|
|
44920
|
+
P2 = toPrimitive$2(P2, true);
|
|
44921
|
+
anObject$5(Attributes);
|
|
44922
|
+
if (IE8_DOM_DEFINE$1)
|
|
44923
|
+
try {
|
|
44924
|
+
return dP$3(O2, P2, Attributes);
|
|
44925
|
+
} catch (e2) {
|
|
44926
|
+
}
|
|
44927
|
+
if ("get" in Attributes || "set" in Attributes)
|
|
44928
|
+
throw TypeError("Accessors not supported!");
|
|
44929
|
+
if ("value" in Attributes)
|
|
44930
|
+
O2[P2] = Attributes.value;
|
|
44931
|
+
return O2;
|
|
44932
|
+
}, "defineProperty");
|
|
44737
44933
|
var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
44738
44934
|
return {
|
|
44739
44935
|
enumerable: !(bitmap & 1),
|
|
@@ -44742,7 +44938,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44742
44938
|
value
|
|
44743
44939
|
};
|
|
44744
44940
|
}, "_propertyDesc");
|
|
44745
|
-
var dP$2 =
|
|
44941
|
+
var dP$2 = _objectDp;
|
|
44746
44942
|
var createDesc$3 = _propertyDesc;
|
|
44747
44943
|
var _hide = require_descriptors() ? function(object2, key2, value) {
|
|
44748
44944
|
return dP$2.f(object2, key2, createDesc$3(1, value));
|
|
@@ -44816,25 +45012,16 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44816
45012
|
var _cof = /* @__PURE__ */ __name(function(it) {
|
|
44817
45013
|
return toString$4.call(it).slice(8, -1);
|
|
44818
45014
|
}, "_cof");
|
|
44819
|
-
var
|
|
44820
|
-
var
|
|
44821
|
-
|
|
44822
|
-
|
|
44823
|
-
return _iobject;
|
|
44824
|
-
hasRequired_iobject = 1;
|
|
44825
|
-
var cof2 = _cof;
|
|
44826
|
-
_iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
|
|
44827
|
-
return cof2(it) == "String" ? it.split("") : Object(it);
|
|
44828
|
-
};
|
|
44829
|
-
return _iobject;
|
|
44830
|
-
}
|
|
44831
|
-
__name(require_iobject, "require_iobject");
|
|
45015
|
+
var cof$2 = _cof;
|
|
45016
|
+
var _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
|
|
45017
|
+
return cof$2(it) == "String" ? it.split("") : Object(it);
|
|
45018
|
+
};
|
|
44832
45019
|
var _defined = /* @__PURE__ */ __name(function(it) {
|
|
44833
45020
|
if (it == void 0)
|
|
44834
45021
|
throw TypeError("Can't call method on " + it);
|
|
44835
45022
|
return it;
|
|
44836
45023
|
}, "_defined");
|
|
44837
|
-
var IObject =
|
|
45024
|
+
var IObject = _iobject;
|
|
44838
45025
|
var defined$2 = _defined;
|
|
44839
45026
|
var _toIobject = /* @__PURE__ */ __name(function(it) {
|
|
44840
45027
|
return IObject(defined$2(it));
|
|
@@ -44931,15 +45118,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44931
45118
|
var _objectGops = {};
|
|
44932
45119
|
_objectGops.f = Object.getOwnPropertySymbols;
|
|
44933
45120
|
var _objectPie = {};
|
|
44934
|
-
|
|
44935
|
-
function require_objectPie() {
|
|
44936
|
-
if (hasRequired_objectPie)
|
|
44937
|
-
return _objectPie;
|
|
44938
|
-
hasRequired_objectPie = 1;
|
|
44939
|
-
_objectPie.f = {}.propertyIsEnumerable;
|
|
44940
|
-
return _objectPie;
|
|
44941
|
-
}
|
|
44942
|
-
__name(require_objectPie, "require_objectPie");
|
|
45121
|
+
_objectPie.f = {}.propertyIsEnumerable;
|
|
44943
45122
|
var defined$1 = _defined;
|
|
44944
45123
|
var _toObject = /* @__PURE__ */ __name(function(it) {
|
|
44945
45124
|
return Object(defined$1(it));
|
|
@@ -44953,9 +45132,9 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
44953
45132
|
var DESCRIPTORS2 = require_descriptors();
|
|
44954
45133
|
var getKeys2 = _objectKeys;
|
|
44955
45134
|
var gOPS2 = _objectGops;
|
|
44956
|
-
var pIE2 =
|
|
45135
|
+
var pIE2 = _objectPie;
|
|
44957
45136
|
var toObject2 = _toObject;
|
|
44958
|
-
var IObject2 =
|
|
45137
|
+
var IObject2 = _iobject;
|
|
44959
45138
|
var $assign = Object.assign;
|
|
44960
45139
|
_objectAssign = !$assign || _fails(function() {
|
|
44961
45140
|
var A2 = {};
|
|
@@ -45016,7 +45195,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45016
45195
|
}, "_iterStep");
|
|
45017
45196
|
var _iterators = {};
|
|
45018
45197
|
var _redefine = _hide;
|
|
45019
|
-
var dP$1 =
|
|
45198
|
+
var dP$1 = _objectDp;
|
|
45020
45199
|
var anObject$4 = _anObject;
|
|
45021
45200
|
var getKeys$1 = _objectKeys;
|
|
45022
45201
|
var _objectDps = require_descriptors() ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties2) {
|
|
@@ -45086,7 +45265,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45086
45265
|
};
|
|
45087
45266
|
$exports.store = store$2;
|
|
45088
45267
|
var _wksExports = _wks.exports;
|
|
45089
|
-
var def =
|
|
45268
|
+
var def = _objectDp.f;
|
|
45090
45269
|
var has$b = _has;
|
|
45091
45270
|
var TAG$1 = _wksExports("toStringTag");
|
|
45092
45271
|
var _setToStringTag = /* @__PURE__ */ __name(function(it, tag, stat) {
|
|
@@ -45359,7 +45538,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45359
45538
|
var _isArrayIter = /* @__PURE__ */ __name(function(it) {
|
|
45360
45539
|
return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
45361
45540
|
}, "_isArrayIter");
|
|
45362
|
-
var $defineProperty$1 =
|
|
45541
|
+
var $defineProperty$1 = _objectDp;
|
|
45363
45542
|
var createDesc$2 = _propertyDesc;
|
|
45364
45543
|
var _createProperty = /* @__PURE__ */ __name(function(object2, index2, value) {
|
|
45365
45544
|
if (index2 in object2)
|
|
@@ -45488,7 +45667,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45488
45667
|
}
|
|
45489
45668
|
}, "_default$8");
|
|
45490
45669
|
var $export$3 = _export;
|
|
45491
|
-
$export$3($export$3.S + $export$3.F * !require_descriptors(), "Object", { defineProperty:
|
|
45670
|
+
$export$3($export$3.S + $export$3.F * !require_descriptors(), "Object", { defineProperty: _objectDp.f });
|
|
45492
45671
|
var $Object$1 = _coreExports.Object;
|
|
45493
45672
|
var defineProperty$6 = /* @__PURE__ */ __name(function defineProperty2(it, key2, desc) {
|
|
45494
45673
|
return $Object$1.defineProperty(it, key2, desc);
|
|
@@ -45529,7 +45708,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45529
45708
|
var META$1 = _uid("meta");
|
|
45530
45709
|
var isObject$5 = _isObject;
|
|
45531
45710
|
var has$9 = _has;
|
|
45532
|
-
var setDesc =
|
|
45711
|
+
var setDesc = _objectDp.f;
|
|
45533
45712
|
var id$1 = 0;
|
|
45534
45713
|
var isExtensible = Object.isExtensible || function() {
|
|
45535
45714
|
return true;
|
|
@@ -45582,7 +45761,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45582
45761
|
var _metaExports = _meta.exports;
|
|
45583
45762
|
var core = _coreExports;
|
|
45584
45763
|
var wksExt$1 = _wksExt;
|
|
45585
|
-
var defineProperty$4 =
|
|
45764
|
+
var defineProperty$4 = _objectDp.f;
|
|
45586
45765
|
var _wksDefine = /* @__PURE__ */ __name(function(name2) {
|
|
45587
45766
|
var $Symbol2 = core.Symbol || (core.Symbol = {});
|
|
45588
45767
|
if (name2.charAt(0) != "_" && !(name2 in $Symbol2))
|
|
@@ -45590,7 +45769,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45590
45769
|
}, "_wksDefine");
|
|
45591
45770
|
var getKeys = _objectKeys;
|
|
45592
45771
|
var gOPS$1 = _objectGops;
|
|
45593
|
-
var pIE$1 =
|
|
45772
|
+
var pIE$1 = _objectPie;
|
|
45594
45773
|
var _enumKeys = /* @__PURE__ */ __name(function(it) {
|
|
45595
45774
|
var result = getKeys(it);
|
|
45596
45775
|
var getSymbols2 = gOPS$1.f;
|
|
@@ -45631,12 +45810,12 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45631
45810
|
return windowNames && toString$3.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
|
|
45632
45811
|
}, "getOwnPropertyNames");
|
|
45633
45812
|
var _objectGopd = {};
|
|
45634
|
-
var pIE =
|
|
45813
|
+
var pIE = _objectPie;
|
|
45635
45814
|
var createDesc$1 = _propertyDesc;
|
|
45636
45815
|
var toIObject$1 = _toIobject;
|
|
45637
45816
|
var toPrimitive$1 = _toPrimitive$1;
|
|
45638
45817
|
var has$8 = _has;
|
|
45639
|
-
var IE8_DOM_DEFINE =
|
|
45818
|
+
var IE8_DOM_DEFINE = _ie8DomDefine;
|
|
45640
45819
|
var gOPD$2 = Object.getOwnPropertyDescriptor;
|
|
45641
45820
|
_objectGopd.f = require_descriptors() ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor2(O2, P2) {
|
|
45642
45821
|
O2 = toIObject$1(O2);
|
|
@@ -45674,7 +45853,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45674
45853
|
var gOPNExt = _objectGopnExt;
|
|
45675
45854
|
var $GOPD = _objectGopd;
|
|
45676
45855
|
var $GOPS = _objectGops;
|
|
45677
|
-
var $DP =
|
|
45856
|
+
var $DP = _objectDp;
|
|
45678
45857
|
var $keys$1 = _objectKeys;
|
|
45679
45858
|
var gOPD$1 = $GOPD.f;
|
|
45680
45859
|
var dP = $DP.f;
|
|
@@ -45811,7 +45990,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
45811
45990
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
45812
45991
|
$DP.f = $defineProperty;
|
|
45813
45992
|
_objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
|
|
45814
|
-
|
|
45993
|
+
_objectPie.f = $propertyIsEnumerable;
|
|
45815
45994
|
$GOPS.f = $getOwnPropertySymbols;
|
|
45816
45995
|
if (DESCRIPTORS && !_library) {
|
|
45817
45996
|
redefine(ObjectProto, "propertyIsEnumerable", $propertyIsEnumerable);
|
|
@@ -88405,12 +88584,13 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
88405
88584
|
tabIndex: -1,
|
|
88406
88585
|
onKeyDown: (e2) => {
|
|
88407
88586
|
var _a2, _b2, _c2, _d2, _e, _f;
|
|
88408
|
-
const
|
|
88409
|
-
|
|
88587
|
+
const isTabKey = e2.keyCode === 9;
|
|
88588
|
+
const isArrowKey = e2.keyCode >= 37 && e2.keyCode <= 40;
|
|
88589
|
+
if (isArrowKey && ((_a2 = e2.target) == null ? void 0 : _a2.tagName) !== "INPUT" || isTabKey) {
|
|
88410
88590
|
const { schema: schema22, entities: entities2 } = computePresets(this.props);
|
|
88411
88591
|
const left2 = e2.keyCode === 37;
|
|
88412
88592
|
const up = e2.keyCode === 38;
|
|
88413
|
-
const down = e2.keyCode === 40;
|
|
88593
|
+
const down = e2.keyCode === 40 || e2.keyCode === 13;
|
|
88414
88594
|
let cellIdToUse = this.getPrimarySelectedCellId();
|
|
88415
88595
|
const pathToIndex = getFieldPathToIndex(schema22);
|
|
88416
88596
|
const entityMap = getEntityIdToEntity(entities2);
|
|
@@ -101120,6 +101300,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101120
101300
|
// called when a file link in the filelist is clicked
|
|
101121
101301
|
dropzoneProps = {},
|
|
101122
101302
|
overflowList,
|
|
101303
|
+
autoUnzip,
|
|
101123
101304
|
disabled,
|
|
101124
101305
|
initializeForm,
|
|
101125
101306
|
showFilesCount,
|
|
@@ -101144,7 +101325,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101144
101325
|
validateAgainstSchema = validateAgainstSchemaStore.current;
|
|
101145
101326
|
}
|
|
101146
101327
|
const accept = !_accept ? void 0 : lodashExports.isPlainObject(_accept) ? [_accept] : lodashExports.isArray(_accept) ? _accept : _accept.split(",").map((a2) => ({ type: a2 }));
|
|
101147
|
-
if (
|
|
101328
|
+
if ((validateAgainstSchema || autoUnzip) && accept && !accept.some((a2) => a2.type === "zip")) {
|
|
101148
101329
|
accept == null ? void 0 : accept.unshift({
|
|
101149
101330
|
type: "zip",
|
|
101150
101331
|
description: "Any of the following types, just compressed"
|
|
@@ -101505,7 +101686,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101505
101686
|
var _a3, _b3;
|
|
101506
101687
|
let acceptedFiles = [];
|
|
101507
101688
|
for (const file of _acceptedFiles) {
|
|
101508
|
-
if (validateAgainstSchema && isZipFile(file)) {
|
|
101689
|
+
if ((validateAgainstSchema || autoUnzip) && isZipFile(file)) {
|
|
101509
101690
|
const files = yield filterFilesInZip(
|
|
101510
101691
|
file,
|
|
101511
101692
|
((_a3 = simpleAccept == null ? void 0 : simpleAccept.split(", ")) == null ? void 0 : _a3.map((a2) => a2.startsWith(".") ? a2 : "." + a2)) || []
|
|
@@ -101530,9 +101711,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101530
101711
|
if (!acceptedFiles.length)
|
|
101531
101712
|
return;
|
|
101532
101713
|
setLoading(true);
|
|
101533
|
-
|
|
101534
|
-
acceptedFiles = acceptedFiles.slice(0, fileLimit);
|
|
101535
|
-
}
|
|
101714
|
+
acceptedFiles = trimFiles(acceptedFiles, fileLimit);
|
|
101536
101715
|
acceptedFiles.forEach((file) => {
|
|
101537
101716
|
file.preview = URL.createObjectURL(file);
|
|
101538
101717
|
file.loading = true;
|
|
@@ -101718,9 +101897,9 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101718
101897
|
`It looks like there wasn't any data in your file. Please add some data and try again`
|
|
101719
101898
|
);
|
|
101720
101899
|
}
|
|
101721
|
-
const cleanedFileList =
|
|
101722
|
-
|
|
101723
|
-
fileLimit
|
|
101900
|
+
const cleanedFileList = trimFiles(
|
|
101901
|
+
[...toKeep, ...fileListToUse],
|
|
101902
|
+
fileLimit
|
|
101724
101903
|
);
|
|
101725
101904
|
handleSecondHalfOfUpload({ acceptedFiles, cleanedFileList });
|
|
101726
101905
|
})
|
|
@@ -101968,6 +102147,18 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
101968
102147
|
__name(stripId, "stripId");
|
|
101969
102148
|
const manualEnterMessage = "Build CSV File";
|
|
101970
102149
|
const manualEnterSubMessage = "Paste or type data to build a CSV file";
|
|
102150
|
+
function trimFiles(incomingFiles, fileLimit) {
|
|
102151
|
+
if (fileLimit) {
|
|
102152
|
+
if (fileLimit && incomingFiles.length > fileLimit) {
|
|
102153
|
+
window.toastr && window.toastr.warning(
|
|
102154
|
+
`Detected additional files in your upload that we are ignoring. You can only upload ${fileLimit} file${fileLimit > 1 ? "s" : ""} at a time.`
|
|
102155
|
+
);
|
|
102156
|
+
}
|
|
102157
|
+
return incomingFiles.slice(0, fileLimit);
|
|
102158
|
+
}
|
|
102159
|
+
return incomingFiles;
|
|
102160
|
+
}
|
|
102161
|
+
__name(trimFiles, "trimFiles");
|
|
101971
102162
|
const style$w = "";
|
|
101972
102163
|
function DNALoader({ style: style2, className }) {
|
|
101973
102164
|
return /* @__PURE__ */ React$2.createElement("div", { className: classNames$1("dna-loader", className), style: style2 }, /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }), /* @__PURE__ */ React$2.createElement("div", { className: "nucleobase" }));
|
|
@@ -150444,8 +150635,23 @@ ${seq.sequence}
|
|
|
150444
150635
|
}, hoveredAnnotationActions)
|
|
150445
150636
|
),
|
|
150446
150637
|
withHandlers({
|
|
150447
|
-
onMouseOver: (props) => (e2)
|
|
150638
|
+
onMouseOver: (props) => function(e2) {
|
|
150448
150639
|
var _a2;
|
|
150640
|
+
const target = e2.target;
|
|
150641
|
+
let alreadyHandled = false;
|
|
150642
|
+
let currentElement = target;
|
|
150643
|
+
while (currentElement) {
|
|
150644
|
+
if (currentElement === e2.currentTarget) {
|
|
150645
|
+
break;
|
|
150646
|
+
}
|
|
150647
|
+
if (currentElement.classList.contains("hoverHelper")) {
|
|
150648
|
+
alreadyHandled = true;
|
|
150649
|
+
break;
|
|
150650
|
+
}
|
|
150651
|
+
currentElement = currentElement.parentElement;
|
|
150652
|
+
}
|
|
150653
|
+
if (alreadyHandled)
|
|
150654
|
+
return;
|
|
150449
150655
|
const { editorName, id: id2, hoveredAnnotationUpdate: hoveredAnnotationUpdate2 } = props;
|
|
150450
150656
|
const isIdHashmap = typeof id2 === "object";
|
|
150451
150657
|
const idToPass = isIdHashmap ? Object.keys(id2)[0] : id2;
|
|
@@ -150455,7 +150661,6 @@ ${seq.sequence}
|
|
|
150455
150661
|
}
|
|
150456
150662
|
if (window.__veDragging || window.__veScrolling)
|
|
150457
150663
|
return;
|
|
150458
|
-
e2.stopPropagation();
|
|
150459
150664
|
hoveredAnnotationUpdate2 && hoveredAnnotationUpdate2(idToPass, { editorName });
|
|
150460
150665
|
},
|
|
150461
150666
|
onMouseLeave: (props) => (e2) => {
|
|
@@ -154974,7 +155179,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
154974
155179
|
}
|
|
154975
155180
|
__name(showFileDialog, "showFileDialog");
|
|
154976
155181
|
const name = "@teselagen/ove";
|
|
154977
|
-
const version = "0.3.
|
|
155182
|
+
const version = "0.3.25";
|
|
154978
155183
|
const main = "./src/index.js";
|
|
154979
155184
|
const exports$1 = {
|
|
154980
155185
|
".": {
|
|
@@ -155727,8 +155932,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
155727
155932
|
});
|
|
155728
155933
|
props.annotationVisibilityShow("translations");
|
|
155729
155934
|
},
|
|
155730
|
-
isHidden: (props) => isProtein(props) || !props.annotationsToSupport ||
|
|
155731
|
-
!props.annotationsToSupport.translations,
|
|
155935
|
+
isHidden: (props) => isProtein(props) || !props.annotationsToSupport || props.readOnly || !props.annotationsToSupport.translations,
|
|
155732
155936
|
isDisabled: (props) => (
|
|
155733
155937
|
/* (props.readOnly && readOnlyDisabledTooltip) || */
|
|
155734
155938
|
props.sequenceLength === 0 || noSelection(props)
|
|
@@ -161864,438 +162068,18 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
161864
162068
|
}
|
|
161865
162069
|
__name(combineLabels, "combineLabels");
|
|
161866
162070
|
const style$f = "";
|
|
161867
|
-
|
|
161868
|
-
|
|
161869
|
-
|
|
161870
|
-
|
|
161871
|
-
|
|
161872
|
-
|
|
161873
|
-
|
|
161874
|
-
|
|
161875
|
-
|
|
161876
|
-
|
|
161877
|
-
extraSideSpace,
|
|
161878
|
-
smartCircViewLabelRender,
|
|
161879
|
-
radius: outerRadius,
|
|
161880
|
-
editorName,
|
|
161881
|
-
noRedux,
|
|
161882
|
-
rotationRadians,
|
|
161883
|
-
textScalingFactor,
|
|
161884
|
-
labelLineIntensity: labelLineIntensity2,
|
|
161885
|
-
labelSize: labelSize2 = 8,
|
|
161886
|
-
fontHeightMultiplier = 2.4,
|
|
161887
|
-
circularViewWidthVsHeightRatio,
|
|
161888
|
-
//width of the circular view
|
|
161889
|
-
condenseOverflowingXLabels = true
|
|
161890
|
-
//set to true to make labels tha
|
|
161891
|
-
}) {
|
|
161892
|
-
if (!labels2.length) {
|
|
161893
|
-
return {
|
|
161894
|
-
component: null,
|
|
161895
|
-
height: 15
|
|
161896
|
-
};
|
|
161897
|
-
}
|
|
161898
|
-
const originalOuterRadius = outerRadius;
|
|
161899
|
-
outerRadius += smartCircViewLabelRender ? 10 : 25;
|
|
161900
|
-
const radius = outerRadius;
|
|
161901
|
-
const outerPointRadius = outerRadius - 20;
|
|
161902
|
-
const fontWidth = labelSize2 * (textScalingFactor < 1 ? textScalingFactor : 1);
|
|
161903
|
-
const fontHeight = fontWidth * lodashExports.clamp(fontHeightMultiplier, 1.5, 3.5);
|
|
161904
|
-
const labelPoints = labels2.map(function(label) {
|
|
161905
|
-
const {
|
|
161906
|
-
annotationCenterAngle: _annotationCenterAngle,
|
|
161907
|
-
annotationCenterRadius
|
|
161908
|
-
} = label;
|
|
161909
|
-
const annotationCenterAngle = _annotationCenterAngle + (rotationRadians || 0);
|
|
161910
|
-
return __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, label), {
|
|
161911
|
-
width: getTextLength(label.text) * fontWidth,
|
|
161912
|
-
//three points define the label:
|
|
161913
|
-
innerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(
|
|
161914
|
-
annotationCenterRadius,
|
|
161915
|
-
annotationCenterAngle
|
|
161916
|
-
)), {
|
|
161917
|
-
radius: annotationCenterRadius,
|
|
161918
|
-
angle: annotationCenterAngle
|
|
161919
|
-
}),
|
|
161920
|
-
truncatedInnerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(
|
|
161921
|
-
outerPointRadius - 15,
|
|
161922
|
-
annotationCenterAngle
|
|
161923
|
-
)), {
|
|
161924
|
-
radius: outerPointRadius - 15,
|
|
161925
|
-
angle: annotationCenterAngle
|
|
161926
|
-
}),
|
|
161927
|
-
outerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(outerPointRadius, annotationCenterAngle)), {
|
|
161928
|
-
radius: outerPointRadius,
|
|
161929
|
-
angle: annotationCenterAngle
|
|
161930
|
-
})
|
|
161931
|
-
}), polarToSpecialCartesian$1(radius, annotationCenterAngle)), {
|
|
161932
|
-
radius: radius + 10,
|
|
161933
|
-
angle: annotationCenterAngle
|
|
161934
|
-
});
|
|
161935
|
-
}).map(function(label) {
|
|
161936
|
-
label.labelAndSublabels = [label];
|
|
161937
|
-
label.labelIds = { [label.id]: true };
|
|
161938
|
-
return label;
|
|
161939
|
-
});
|
|
161940
|
-
let maxRadius = 1;
|
|
161941
|
-
const groupedLabels = relaxLabelAngles(labelPoints, fontHeight, outerRadius).filter((l2) => !!l2).map((originalLabel) => {
|
|
161942
|
-
if (smartCircViewLabelRender) {
|
|
161943
|
-
const newR = Math.sqrt(
|
|
161944
|
-
Math.pow(
|
|
161945
|
-
Math.abs(originalLabel.x) + Math.max(0, originalLabel.text.length * 11 - extraSideSpace / 2),
|
|
161946
|
-
2
|
|
161947
|
-
) + Math.pow(Math.abs(originalLabel.y), 2)
|
|
161948
|
-
);
|
|
161949
|
-
if (newR > maxRadius)
|
|
161950
|
-
maxRadius = newR;
|
|
161951
|
-
}
|
|
161952
|
-
if (originalLabel.highPriorityLabel) {
|
|
161953
|
-
return originalLabel;
|
|
161954
|
-
}
|
|
161955
|
-
const _highPrioritySublabel = originalLabel.labelAndSublabels.find(
|
|
161956
|
-
(l2) => l2.highPriorityLabel
|
|
161957
|
-
);
|
|
161958
|
-
if (_highPrioritySublabel) {
|
|
161959
|
-
const highPrioritySublabel = lodashExports.cloneDeep(_highPrioritySublabel);
|
|
161960
|
-
[
|
|
161961
|
-
"angle",
|
|
161962
|
-
"annotationCenterAngle",
|
|
161963
|
-
"annotationCenterRadius",
|
|
161964
|
-
"innerPoint",
|
|
161965
|
-
"labelAndSublabels",
|
|
161966
|
-
"labelIds",
|
|
161967
|
-
"outerPoint",
|
|
161968
|
-
"radius",
|
|
161969
|
-
"truncatedInnerPoint",
|
|
161970
|
-
"x",
|
|
161971
|
-
"y"
|
|
161972
|
-
].forEach((k2) => {
|
|
161973
|
-
highPrioritySublabel[k2] = originalLabel[k2];
|
|
161974
|
-
});
|
|
161975
|
-
delete originalLabel.labelAndSublabels;
|
|
161976
|
-
return highPrioritySublabel;
|
|
161977
|
-
}
|
|
161978
|
-
return originalLabel;
|
|
161979
|
-
});
|
|
161980
|
-
window.isLabelGroupOpen = false;
|
|
161981
|
-
return {
|
|
161982
|
-
component: /* @__PURE__ */ React$2.createElement(
|
|
161983
|
-
"g",
|
|
161984
|
-
{
|
|
161985
|
-
key: "veLabels",
|
|
161986
|
-
className: "veLabels ve-monospace-font",
|
|
161987
|
-
transform: `rotate(-${rotationRadians * 180 / Math.PI})`
|
|
161988
|
-
},
|
|
161989
|
-
/* @__PURE__ */ React$2.createElement(
|
|
161990
|
-
DrawGroupedLabels,
|
|
161991
|
-
__spreadValues({}, {
|
|
161992
|
-
editorName,
|
|
161993
|
-
noRedux,
|
|
161994
|
-
groupedLabels,
|
|
161995
|
-
circularViewWidthVsHeightRatio,
|
|
161996
|
-
fontWidth,
|
|
161997
|
-
fontHeight,
|
|
161998
|
-
condenseOverflowingXLabels,
|
|
161999
|
-
outerRadius,
|
|
162000
|
-
labelLineIntensity: labelLineIntensity2
|
|
162001
|
-
})
|
|
162002
|
-
)
|
|
162003
|
-
),
|
|
162004
|
-
//we use the <use> tag to position the hovered label group at the top of the stack
|
|
162005
|
-
//point events: none is to fix a click bug..
|
|
162006
|
-
//http://stackoverflow.com/questions/24078524/svg-click-events-not-firing-bubbling-when-using-use-element
|
|
162007
|
-
height: smartCircViewLabelRender ? Math.min(105, maxRadius - originalOuterRadius) : 120
|
|
162008
|
-
};
|
|
162009
|
-
}
|
|
162010
|
-
__name(Labels, "Labels");
|
|
162011
|
-
const DrawLabelGroup = withHover(function({
|
|
162012
|
-
hovered,
|
|
162013
|
-
className,
|
|
162014
|
-
label,
|
|
162015
|
-
labelAndSublabels,
|
|
162016
|
-
fontWidth,
|
|
162017
|
-
noRedux,
|
|
162018
|
-
fontHeight,
|
|
162019
|
-
outerRadius,
|
|
162020
|
-
onMouseLeave,
|
|
162021
|
-
onMouseOver,
|
|
162022
|
-
editorName,
|
|
162023
|
-
circularViewWidthVsHeightRatio,
|
|
162024
|
-
condenseOverflowingXLabels,
|
|
162025
|
-
hoveredId,
|
|
162026
|
-
labelLineIntensity: labelLineIntensity2,
|
|
162027
|
-
// labelIds,
|
|
162028
|
-
multipleLabels
|
|
162029
|
-
// isIdHashmap,
|
|
162030
|
-
}) {
|
|
162031
|
-
let { text: text2 = "Unlabeled" } = label;
|
|
162032
|
-
const textLength = getTextLength(text2);
|
|
162033
|
-
let groupLabelXStart;
|
|
162034
|
-
if (label.labelAndSublabels && label.labelAndSublabels.length > 1) {
|
|
162035
|
-
text2 = "+" + (label.labelAndSublabels.length - 1) + "," + text2;
|
|
162036
|
-
}
|
|
162037
|
-
const labelLength = textLength * fontWidth;
|
|
162038
|
-
const maxLabelLength = labelAndSublabels.reduce(function(currentLength, { text: text22 = "Unlabeled" }) {
|
|
162039
|
-
const _textLength = getTextLength(text22);
|
|
162040
|
-
if (_textLength > currentLength) {
|
|
162041
|
-
return _textLength;
|
|
162042
|
-
}
|
|
162043
|
-
return currentLength;
|
|
162044
|
-
}, 0);
|
|
162045
|
-
const maxLabelWidth = maxLabelLength * fontWidth;
|
|
162046
|
-
const labelOnLeft = label.angle > Math.PI;
|
|
162047
|
-
let labelXStart = label.x - (labelOnLeft ? labelLength : 0);
|
|
162048
|
-
if (condenseOverflowingXLabels) {
|
|
162049
|
-
const distancePastBoundary = Math.abs(label.x + (labelOnLeft ? -labelLength : labelLength)) - (outerRadius + 90) * Math.max(1, circularViewWidthVsHeightRatio);
|
|
162050
|
-
if (distancePastBoundary > 0) {
|
|
162051
|
-
const numberOfCharsToChop = Math.ceil(distancePastBoundary / fontWidth) + 2;
|
|
162052
|
-
text2 = text2.slice(0, -numberOfCharsToChop) + "..";
|
|
162053
|
-
groupLabelXStart = labelXStart + (labelOnLeft ? distancePastBoundary : -distancePastBoundary);
|
|
162054
|
-
labelXStart += labelOnLeft ? distancePastBoundary : 0;
|
|
162055
|
-
}
|
|
162056
|
-
}
|
|
162057
|
-
const dy = fontHeight;
|
|
162058
|
-
const textYStart = label.y + dy / 2;
|
|
162059
|
-
let content2;
|
|
162060
|
-
const labelClass = ` veLabelText veCircularViewLabelText clickable ${label.color} `;
|
|
162061
|
-
if ((multipleLabels || groupLabelXStart !== void 0) && hovered) {
|
|
162062
|
-
window.isLabelGroupOpen = true;
|
|
162063
|
-
let hoveredLabel;
|
|
162064
|
-
if (groupLabelXStart !== void 0) {
|
|
162065
|
-
labelXStart = groupLabelXStart;
|
|
162066
|
-
}
|
|
162067
|
-
labelAndSublabels.some(function(label2) {
|
|
162068
|
-
if (label2.id === hoveredId) {
|
|
162069
|
-
hoveredLabel = label2;
|
|
162070
|
-
return true;
|
|
162071
|
-
}
|
|
162072
|
-
return false;
|
|
162073
|
-
});
|
|
162074
|
-
if (!hoveredLabel) {
|
|
162075
|
-
hoveredLabel = label;
|
|
162076
|
-
}
|
|
162077
|
-
let labelYStart = label.y;
|
|
162078
|
-
const labelGroupHeight = labelAndSublabels.length * dy;
|
|
162079
|
-
const labelGroupBottom = label.y + labelGroupHeight;
|
|
162080
|
-
if (labelGroupBottom > outerRadius + 20) {
|
|
162081
|
-
labelYStart -= (label.labelAndSublabels.length - 1) * dy;
|
|
162082
|
-
}
|
|
162083
|
-
const line = LabelLine(
|
|
162084
|
-
[
|
|
162085
|
-
hoveredLabel.innerPoint,
|
|
162086
|
-
// hoveredLabel.labelAndSublabels &&
|
|
162087
|
-
// hoveredLabel.labelAndSublabels.length > 0
|
|
162088
|
-
// ? hoveredLabel.outerPoint
|
|
162089
|
-
// : {},
|
|
162090
|
-
label
|
|
162091
|
-
],
|
|
162092
|
-
{ style: { opacity: 1 }, strokeWidth: 2 }
|
|
162093
|
-
);
|
|
162094
|
-
content2 = [
|
|
162095
|
-
line,
|
|
162096
|
-
/* @__PURE__ */ React$2.createElement(PutMyParentOnTop, { editorName, key: "gGroup" }, /* @__PURE__ */ React$2.createElement("g", { className: className + " topLevelLabelGroup" }, /* @__PURE__ */ React$2.createElement(
|
|
162097
|
-
"rect",
|
|
162098
|
-
{
|
|
162099
|
-
onMouseOver: cancelFn,
|
|
162100
|
-
x: labelXStart - 4,
|
|
162101
|
-
y: labelYStart - dy / 2,
|
|
162102
|
-
width: maxLabelWidth + 24,
|
|
162103
|
-
height: labelGroupHeight + 4,
|
|
162104
|
-
fill: "white",
|
|
162105
|
-
stroke: "black"
|
|
162106
|
-
}
|
|
162107
|
-
), /* @__PURE__ */ React$2.createElement(
|
|
162108
|
-
"text",
|
|
162109
|
-
{
|
|
162110
|
-
x: labelXStart,
|
|
162111
|
-
y: labelYStart,
|
|
162112
|
-
style: {
|
|
162113
|
-
fontSize: fontWidth * fontWidthToFontSize,
|
|
162114
|
-
fontStyle: label.fontStyle
|
|
162115
|
-
}
|
|
162116
|
-
},
|
|
162117
|
-
labelAndSublabels.map(function(label2, index2) {
|
|
162118
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162119
|
-
DrawGroupInnerLabel,
|
|
162120
|
-
__spreadValues({
|
|
162121
|
-
isSubLabel: true,
|
|
162122
|
-
noRedux,
|
|
162123
|
-
editorName,
|
|
162124
|
-
logHover: true,
|
|
162125
|
-
key: "labelItem" + index2,
|
|
162126
|
-
className: (label2.className || "") + labelClass + " veDrawGroupInnerLabel",
|
|
162127
|
-
id: label2.id
|
|
162128
|
-
}, { labelXStart, label: label2, fontWidth, index: index2, dy })
|
|
162129
|
-
);
|
|
162130
|
-
})
|
|
162131
|
-
)))
|
|
162132
|
-
];
|
|
162133
|
-
} else {
|
|
162134
|
-
content2 = [
|
|
162135
|
-
/* @__PURE__ */ React$2.createElement("title", { key: "labeltitle" }, label.title || label.text),
|
|
162136
|
-
/* @__PURE__ */ React$2.createElement(
|
|
162137
|
-
"text",
|
|
162138
|
-
{
|
|
162139
|
-
key: "text",
|
|
162140
|
-
x: labelXStart,
|
|
162141
|
-
textLength: getTextLength(text2) * fontWidth,
|
|
162142
|
-
lengthAdjust: "spacing",
|
|
162143
|
-
className: labelClass + label.className + (hovered ? " veAnnotationHovered" : ""),
|
|
162144
|
-
y: textYStart,
|
|
162145
|
-
style: {
|
|
162146
|
-
fontSize: fontWidth * fontWidthToFontSize,
|
|
162147
|
-
fontStyle: label.fontStyle,
|
|
162148
|
-
fill: label.color || "black"
|
|
162149
|
-
// stroke: label.color ? label.color : "black"
|
|
162150
|
-
}
|
|
162151
|
-
},
|
|
162152
|
-
text2
|
|
162153
|
-
),
|
|
162154
|
-
LabelLine(
|
|
162155
|
-
[
|
|
162156
|
-
label.innerPoint,
|
|
162157
|
-
// hovered || label.annotationType === "part" //because parts live on the outside of the sequence, we don't need to show the truncated point, we can just point to them directly
|
|
162158
|
-
// ? label.innerPoint
|
|
162159
|
-
// : label.truncatedInnerPoint,
|
|
162160
|
-
label.outerPoint,
|
|
162161
|
-
label
|
|
162162
|
-
],
|
|
162163
|
-
hovered ? { style: { opacity: 1 }, strokeWidth: 2 } : { style: { opacity: labelLineIntensity2 } }
|
|
162164
|
-
)
|
|
162165
|
-
];
|
|
162166
|
-
}
|
|
162167
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162168
|
-
"g",
|
|
162169
|
-
__spreadValues(__spreadValues({}, { onMouseLeave, onMouseOver }), {
|
|
162170
|
-
onClick: label.onClick,
|
|
162171
|
-
onDoubleClick: label.onDoubleClick || lodashExports.noop,
|
|
162172
|
-
onContextMenu: label.onContextMenu || lodashExports.noop
|
|
162173
|
-
}),
|
|
162174
|
-
content2
|
|
162175
|
-
);
|
|
162176
|
-
});
|
|
162177
|
-
function LabelLine(pointArray, options) {
|
|
162178
|
-
let points = "";
|
|
162179
|
-
pointArray.forEach(function({ x: x2, y: y2 }) {
|
|
162180
|
-
if (!x2 && x2 !== 0)
|
|
162181
|
-
return;
|
|
162182
|
-
points += `${x2},${y2} `;
|
|
162183
|
-
});
|
|
162184
|
-
return /* @__PURE__ */ React$2.createElement(React$2.Fragment, { key: "labelLine" }, /* @__PURE__ */ React$2.createElement(
|
|
162185
|
-
"polyline",
|
|
162186
|
-
__spreadValues({}, __spreadValues({
|
|
162187
|
-
key: "polyline-long",
|
|
162188
|
-
points,
|
|
162189
|
-
stroke: "black",
|
|
162190
|
-
fill: "none",
|
|
162191
|
-
strokeWidth: 1,
|
|
162192
|
-
className: "veLabelLine"
|
|
162193
|
-
}, options))
|
|
162194
|
-
));
|
|
162195
|
-
}
|
|
162196
|
-
__name(LabelLine, "LabelLine");
|
|
162197
|
-
const DrawGroupInnerLabel = withHover(
|
|
162198
|
-
({ className, labelXStart, label, fontWidth, onMouseOver, index: index2, dy }) => {
|
|
162199
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162200
|
-
"tspan",
|
|
162201
|
-
__spreadProps(__spreadValues({
|
|
162202
|
-
x: labelXStart,
|
|
162203
|
-
textLength: getTextLength(label.text) * fontWidth,
|
|
162204
|
-
lengthAdjust: "spacing",
|
|
162205
|
-
onClick: label.onClick,
|
|
162206
|
-
onDoubleClick: (e2) => {
|
|
162207
|
-
e2.stopPropagation();
|
|
162208
|
-
label.onDoubleClick && label.onDoubleClick(e2);
|
|
162209
|
-
},
|
|
162210
|
-
onContextMenu: label.onContextMenu,
|
|
162211
|
-
dy: index2 === 0 ? dy / 2 : dy,
|
|
162212
|
-
style: {
|
|
162213
|
-
fill: label.color ? label.color : "black",
|
|
162214
|
-
fontStyle: label.fontStyle
|
|
162215
|
-
}
|
|
162216
|
-
}, { onMouseOver }), {
|
|
162217
|
-
className
|
|
162218
|
-
}),
|
|
162219
|
-
/* @__PURE__ */ React$2.createElement("title", null, label.title),
|
|
162220
|
-
label.text
|
|
162221
|
-
);
|
|
162222
|
-
}
|
|
162223
|
-
);
|
|
162224
|
-
const DrawGroupedLabels = /* @__PURE__ */ __name(function DrawGroupedLabelsInner({
|
|
162225
|
-
groupedLabels,
|
|
162226
|
-
circularViewWidthVsHeightRatio,
|
|
162227
|
-
fontWidth,
|
|
162228
|
-
noRedux,
|
|
162229
|
-
fontHeight,
|
|
162230
|
-
condenseOverflowingXLabels,
|
|
162231
|
-
outerRadius,
|
|
162232
|
-
editorName,
|
|
162233
|
-
labelLineIntensity: labelLineIntensity2
|
|
162234
|
-
}) {
|
|
162235
|
-
return groupedLabels.map(function(label, i2) {
|
|
162236
|
-
const { labelAndSublabels, labelIds } = label;
|
|
162237
|
-
const multipleLabels = labelAndSublabels.length > 1;
|
|
162238
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162239
|
-
DrawLabelGroup,
|
|
162240
|
-
__spreadValues({
|
|
162241
|
-
key: i2,
|
|
162242
|
-
id: labelIds
|
|
162243
|
-
}, {
|
|
162244
|
-
label,
|
|
162245
|
-
noRedux,
|
|
162246
|
-
passHoveredId: true,
|
|
162247
|
-
//needed to get the hoveredId
|
|
162248
|
-
isLabelGroup: true,
|
|
162249
|
-
className: "DrawLabelGroup",
|
|
162250
|
-
multipleLabels,
|
|
162251
|
-
labelAndSublabels,
|
|
162252
|
-
labelIds,
|
|
162253
|
-
circularViewWidthVsHeightRatio,
|
|
162254
|
-
fontWidth,
|
|
162255
|
-
editorName,
|
|
162256
|
-
fontHeight,
|
|
162257
|
-
condenseOverflowingXLabels,
|
|
162258
|
-
outerRadius,
|
|
162259
|
-
labelLineIntensity: labelLineIntensity2
|
|
162260
|
-
})
|
|
162261
|
-
);
|
|
162262
|
-
});
|
|
162263
|
-
}, "DrawGroupedLabelsInner");
|
|
162264
|
-
function cancelFn(e2) {
|
|
162265
|
-
e2.stopPropagation();
|
|
162266
|
-
}
|
|
162267
|
-
__name(cancelFn, "cancelFn");
|
|
162268
|
-
const _PutMyParentOnTop = class _PutMyParentOnTop extends React$2.Component {
|
|
162269
|
-
componentDidMount() {
|
|
162270
|
-
const { editorName } = this.props;
|
|
162271
|
-
try {
|
|
162272
|
-
const el2 = document.querySelector(
|
|
162273
|
-
`.veEditor.${editorName} .topLevelLabelGroup`
|
|
162274
|
-
);
|
|
162275
|
-
const parent2 = el2.parentElement.parentElement;
|
|
162276
|
-
const i2 = Array.prototype.indexOf.call(parent2.children, el2.parentElement);
|
|
162277
|
-
parent2.insertBefore(parent2.children[i2], null);
|
|
162278
|
-
} catch (error) {
|
|
162279
|
-
console.warn(
|
|
162280
|
-
"OVE-975239 - hit an error trying to re-order labels:",
|
|
162281
|
-
error
|
|
162282
|
-
);
|
|
162283
|
-
}
|
|
162284
|
-
}
|
|
162285
|
-
render() {
|
|
162286
|
-
return this.props.children;
|
|
162287
|
-
}
|
|
162288
|
-
};
|
|
162289
|
-
__name(_PutMyParentOnTop, "PutMyParentOnTop");
|
|
162290
|
-
let PutMyParentOnTop = _PutMyParentOnTop;
|
|
162291
|
-
var baseGetTag = _baseGetTag, isObjectLike = isObjectLike_1;
|
|
162292
|
-
var numberTag = "[object Number]";
|
|
162293
|
-
function isNumber(value) {
|
|
162294
|
-
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
|
|
162071
|
+
function getRangeAnglesSpecial() {
|
|
162072
|
+
const _a2 = getRangeAngles.apply(
|
|
162073
|
+
this,
|
|
162074
|
+
arguments
|
|
162075
|
+
), { endAngle, totalAngle } = _a2, rest = __objRest(_a2, ["endAngle", "totalAngle"]);
|
|
162076
|
+
return __spreadValues({
|
|
162077
|
+
endAngle: endAngle - 1e-5,
|
|
162078
|
+
//we subtract a tiny amount because an angle of 2PI will cause nothing to be drawn!
|
|
162079
|
+
totalAngle: totalAngle - 1e-5
|
|
162080
|
+
}, rest);
|
|
162295
162081
|
}
|
|
162296
|
-
__name(
|
|
162297
|
-
var isNumber_1 = isNumber;
|
|
162298
|
-
const isNumber$1 = /* @__PURE__ */ getDefaultExportFromCjs(isNumber_1);
|
|
162082
|
+
__name(getRangeAnglesSpecial, "getRangeAnglesSpecial");
|
|
162299
162083
|
function PositionAnnotationOnCircle(_z) {
|
|
162300
162084
|
var _A = _z, {
|
|
162301
162085
|
children,
|
|
@@ -162326,60 +162110,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
162326
162110
|
return React$2.cloneElement(children, props);
|
|
162327
162111
|
}
|
|
162328
162112
|
__name(PositionAnnotationOnCircle, "PositionAnnotationOnCircle");
|
|
162329
|
-
function Caret({
|
|
162330
|
-
caretPosition: caretPosition2,
|
|
162331
|
-
sequenceLength,
|
|
162332
|
-
className,
|
|
162333
|
-
onClick,
|
|
162334
|
-
isSelection,
|
|
162335
|
-
innerRadius,
|
|
162336
|
-
outerRadius,
|
|
162337
|
-
isProtein: isProtein2,
|
|
162338
|
-
selectionMessage
|
|
162339
|
-
}) {
|
|
162340
|
-
const { startAngle, endAngle } = getRangeAngles(
|
|
162341
|
-
{ start: caretPosition2, end: caretPosition2 },
|
|
162342
|
-
sequenceLength || 1
|
|
162343
|
-
);
|
|
162344
|
-
if (!isNumber$1(startAngle)) {
|
|
162345
|
-
console.error("we've got a problem!");
|
|
162346
|
-
}
|
|
162347
|
-
const { transform: transform2 } = PositionAnnotationOnCircle({
|
|
162348
|
-
sAngle: startAngle,
|
|
162349
|
-
eAngle: endAngle,
|
|
162350
|
-
height: 0
|
|
162351
|
-
});
|
|
162352
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
162353
|
-
"g",
|
|
162354
|
-
{
|
|
162355
|
-
onClick,
|
|
162356
|
-
transform: transform2,
|
|
162357
|
-
className: className + " veCaret " + draggableClassnames.caret
|
|
162358
|
-
},
|
|
162359
|
-
/* @__PURE__ */ React$2.createElement("title", null, selectionMessage || getSelectionMessage({ caretPosition: caretPosition2, isProtein: isProtein2, sequenceLength })),
|
|
162360
|
-
/* @__PURE__ */ React$2.createElement(
|
|
162361
|
-
"line",
|
|
162362
|
-
{
|
|
162363
|
-
strokeWidth: "1.5px",
|
|
162364
|
-
x1: 0,
|
|
162365
|
-
y1: -innerRadius,
|
|
162366
|
-
x2: 0,
|
|
162367
|
-
y2: -outerRadius
|
|
162368
|
-
}
|
|
162369
|
-
),
|
|
162370
|
-
isSelection ? /* @__PURE__ */ React$2.createElement(
|
|
162371
|
-
"polygon",
|
|
162372
|
-
{
|
|
162373
|
-
className: "vePolygonCaretHandle",
|
|
162374
|
-
fill: "black",
|
|
162375
|
-
points: `0,${-outerRadius + 2} 5,${-outerRadius - 10} -5,${-outerRadius - 10}`
|
|
162376
|
-
}
|
|
162377
|
-
) : null
|
|
162378
|
-
);
|
|
162379
|
-
}
|
|
162380
|
-
__name(Caret, "Caret");
|
|
162381
|
-
const Caret$1 = pure(Caret);
|
|
162382
|
-
var sector$1 = { exports: {} };
|
|
162383
162113
|
var path = { exports: {} };
|
|
162384
162114
|
var geom = { exports: {} };
|
|
162385
162115
|
(function(module2, exports3) {
|
|
@@ -162988,407 +162718,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
162988
162718
|
})(path, path.exports);
|
|
162989
162719
|
var pathExports = path.exports;
|
|
162990
162720
|
const Path = /* @__PURE__ */ getDefaultExportFromCjs(pathExports);
|
|
162991
|
-
var ops = {};
|
|
162992
|
-
(function(exports3) {
|
|
162993
|
-
Object.defineProperty(exports3, "__esModule", {
|
|
162994
|
-
value: true
|
|
162995
|
-
});
|
|
162996
|
-
var _slicedToArray2 = function() {
|
|
162997
|
-
function sliceIterator(arr, i2) {
|
|
162998
|
-
var _arr = [];
|
|
162999
|
-
var _n = true;
|
|
163000
|
-
var _d2 = false;
|
|
163001
|
-
var _e = void 0;
|
|
163002
|
-
try {
|
|
163003
|
-
for (var _i = arr[Symbol.iterator](), _s2; !(_n = (_s2 = _i.next()).done); _n = true) {
|
|
163004
|
-
_arr.push(_s2.value);
|
|
163005
|
-
if (i2 && _arr.length === i2)
|
|
163006
|
-
break;
|
|
163007
|
-
}
|
|
163008
|
-
} catch (err2) {
|
|
163009
|
-
_d2 = true;
|
|
163010
|
-
_e = err2;
|
|
163011
|
-
} finally {
|
|
163012
|
-
try {
|
|
163013
|
-
if (!_n && _i["return"])
|
|
163014
|
-
_i["return"]();
|
|
163015
|
-
} finally {
|
|
163016
|
-
if (_d2)
|
|
163017
|
-
throw _e;
|
|
163018
|
-
}
|
|
163019
|
-
}
|
|
163020
|
-
return _arr;
|
|
163021
|
-
}
|
|
163022
|
-
__name(sliceIterator, "sliceIterator");
|
|
163023
|
-
return function(arr, i2) {
|
|
163024
|
-
if (Array.isArray(arr)) {
|
|
163025
|
-
return arr;
|
|
163026
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
163027
|
-
return sliceIterator(arr, i2);
|
|
163028
|
-
} else {
|
|
163029
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
163030
|
-
}
|
|
163031
|
-
};
|
|
163032
|
-
}();
|
|
163033
|
-
var sum2 = /* @__PURE__ */ __name(function sum3(xs) {
|
|
163034
|
-
return xs.reduce(function(a2, b3) {
|
|
163035
|
-
return a2 + b3;
|
|
163036
|
-
}, 0);
|
|
163037
|
-
}, "sum");
|
|
163038
|
-
var min2 = /* @__PURE__ */ __name(function min3(xs) {
|
|
163039
|
-
return xs.reduce(function(a2, b3) {
|
|
163040
|
-
return Math.min(a2, b3);
|
|
163041
|
-
});
|
|
163042
|
-
}, "min");
|
|
163043
|
-
var max2 = /* @__PURE__ */ __name(function max3(xs) {
|
|
163044
|
-
return xs.reduce(function(a2, b3) {
|
|
163045
|
-
return Math.max(a2, b3);
|
|
163046
|
-
});
|
|
163047
|
-
}, "max");
|
|
163048
|
-
var sumBy = /* @__PURE__ */ __name(function sumBy2(xs, f2) {
|
|
163049
|
-
return xs.reduce(function(a2, b3) {
|
|
163050
|
-
return a2 + f2(b3);
|
|
163051
|
-
}, 0);
|
|
163052
|
-
}, "sumBy");
|
|
163053
|
-
var minBy = /* @__PURE__ */ __name(function minBy2(xs, f2) {
|
|
163054
|
-
return xs.reduce(function(a2, b3) {
|
|
163055
|
-
return Math.min(a2, f2(b3));
|
|
163056
|
-
}, Infinity);
|
|
163057
|
-
}, "minBy");
|
|
163058
|
-
var maxBy = /* @__PURE__ */ __name(function maxBy2(xs, f2) {
|
|
163059
|
-
return xs.reduce(function(a2, b3) {
|
|
163060
|
-
return Math.max(a2, f2(b3));
|
|
163061
|
-
}, -Infinity);
|
|
163062
|
-
}, "maxBy");
|
|
163063
|
-
var plus = /* @__PURE__ */ __name(function plus2(_ref, _ref3) {
|
|
163064
|
-
var _ref2 = _slicedToArray2(_ref, 2);
|
|
163065
|
-
var a2 = _ref2[0];
|
|
163066
|
-
var b3 = _ref2[1];
|
|
163067
|
-
var _ref32 = _slicedToArray2(_ref3, 2);
|
|
163068
|
-
var c2 = _ref32[0];
|
|
163069
|
-
var d2 = _ref32[1];
|
|
163070
|
-
return [a2 + c2, b3 + d2];
|
|
163071
|
-
}, "plus");
|
|
163072
|
-
var minus = /* @__PURE__ */ __name(function minus2(_ref4, _ref5) {
|
|
163073
|
-
var _ref42 = _slicedToArray2(_ref4, 2);
|
|
163074
|
-
var a2 = _ref42[0];
|
|
163075
|
-
var b3 = _ref42[1];
|
|
163076
|
-
var _ref52 = _slicedToArray2(_ref5, 2);
|
|
163077
|
-
var c2 = _ref52[0];
|
|
163078
|
-
var d2 = _ref52[1];
|
|
163079
|
-
return [a2 - c2, b3 - d2];
|
|
163080
|
-
}, "minus");
|
|
163081
|
-
var times = /* @__PURE__ */ __name(function times2(k2, _ref6) {
|
|
163082
|
-
var _ref62 = _slicedToArray2(_ref6, 2);
|
|
163083
|
-
var a2 = _ref62[0];
|
|
163084
|
-
var b3 = _ref62[1];
|
|
163085
|
-
return [k2 * a2, k2 * b3];
|
|
163086
|
-
}, "times");
|
|
163087
|
-
var length = /* @__PURE__ */ __name(function length2(_ref7) {
|
|
163088
|
-
var _ref72 = _slicedToArray2(_ref7, 2);
|
|
163089
|
-
var a2 = _ref72[0];
|
|
163090
|
-
var b3 = _ref72[1];
|
|
163091
|
-
return Math.sqrt(a2 * a2 + b3 * b3);
|
|
163092
|
-
}, "length");
|
|
163093
|
-
var sumVectors = /* @__PURE__ */ __name(function sumVectors2(xs) {
|
|
163094
|
-
return xs.reduce(plus, [0, 0]);
|
|
163095
|
-
}, "sumVectors");
|
|
163096
|
-
var average = /* @__PURE__ */ __name(function average2(points) {
|
|
163097
|
-
return times(1 / points.length, points.reduce(plus));
|
|
163098
|
-
}, "average");
|
|
163099
|
-
var onCircle = /* @__PURE__ */ __name(function onCircle2(r2, angle2) {
|
|
163100
|
-
return times(r2, [Math.sin(angle2), -Math.cos(angle2)]);
|
|
163101
|
-
}, "onCircle");
|
|
163102
|
-
var enhance = /* @__PURE__ */ __name(function enhance2(compute, curve) {
|
|
163103
|
-
var obj = compute || {};
|
|
163104
|
-
for (var key2 in obj) {
|
|
163105
|
-
var method = obj[key2];
|
|
163106
|
-
curve[key2] = method(curve.index, curve.item, curve.group);
|
|
163107
|
-
}
|
|
163108
|
-
return curve;
|
|
163109
|
-
}, "enhance");
|
|
163110
|
-
var range2 = /* @__PURE__ */ __name(function range3(a2, b3, inclusive) {
|
|
163111
|
-
var result = [];
|
|
163112
|
-
for (var i2 = a2; i2 < b3; i2++) {
|
|
163113
|
-
result.push(i2);
|
|
163114
|
-
}
|
|
163115
|
-
if (inclusive) {
|
|
163116
|
-
result.push(b3);
|
|
163117
|
-
}
|
|
163118
|
-
return result;
|
|
163119
|
-
}, "range");
|
|
163120
|
-
var mapObject = /* @__PURE__ */ __name(function mapObject2(obj, f2) {
|
|
163121
|
-
var result = [];
|
|
163122
|
-
var _iteratorNormalCompletion = true;
|
|
163123
|
-
var _didIteratorError = false;
|
|
163124
|
-
var _iteratorError = void 0;
|
|
163125
|
-
try {
|
|
163126
|
-
for (var _iterator3 = Object.keys(obj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator3.next()).done); _iteratorNormalCompletion = true) {
|
|
163127
|
-
var k2 = _step.value;
|
|
163128
|
-
var v2 = obj[k2];
|
|
163129
|
-
result.push(f2(k2, v2));
|
|
163130
|
-
}
|
|
163131
|
-
} catch (err2) {
|
|
163132
|
-
_didIteratorError = true;
|
|
163133
|
-
_iteratorError = err2;
|
|
163134
|
-
} finally {
|
|
163135
|
-
try {
|
|
163136
|
-
if (!_iteratorNormalCompletion && _iterator3["return"]) {
|
|
163137
|
-
_iterator3["return"]();
|
|
163138
|
-
}
|
|
163139
|
-
} finally {
|
|
163140
|
-
if (_didIteratorError) {
|
|
163141
|
-
throw _iteratorError;
|
|
163142
|
-
}
|
|
163143
|
-
}
|
|
163144
|
-
}
|
|
163145
|
-
return result;
|
|
163146
|
-
}, "mapObject");
|
|
163147
|
-
var pairs = /* @__PURE__ */ __name(function pairs2(obj) {
|
|
163148
|
-
return mapObject(obj, function(k2, v2) {
|
|
163149
|
-
return [k2, v2];
|
|
163150
|
-
});
|
|
163151
|
-
}, "pairs");
|
|
163152
|
-
var id2 = /* @__PURE__ */ __name(function id3(x2) {
|
|
163153
|
-
return x2;
|
|
163154
|
-
}, "id");
|
|
163155
|
-
exports3.sum = sum2;
|
|
163156
|
-
exports3.min = min2;
|
|
163157
|
-
exports3.max = max2;
|
|
163158
|
-
exports3.sumBy = sumBy;
|
|
163159
|
-
exports3.minBy = minBy;
|
|
163160
|
-
exports3.maxBy = maxBy;
|
|
163161
|
-
exports3.plus = plus;
|
|
163162
|
-
exports3.minus = minus;
|
|
163163
|
-
exports3.times = times;
|
|
163164
|
-
exports3.id = id2;
|
|
163165
|
-
exports3.length = length;
|
|
163166
|
-
exports3.sumVectors = sumVectors;
|
|
163167
|
-
exports3.average = average;
|
|
163168
|
-
exports3.onCircle = onCircle;
|
|
163169
|
-
exports3.enhance = enhance;
|
|
163170
|
-
exports3.range = range2;
|
|
163171
|
-
exports3.mapObject = mapObject;
|
|
163172
|
-
exports3.pairs = pairs;
|
|
163173
|
-
exports3["default"] = {
|
|
163174
|
-
sum: sum2,
|
|
163175
|
-
min: min2,
|
|
163176
|
-
max: max2,
|
|
163177
|
-
sumBy,
|
|
163178
|
-
minBy,
|
|
163179
|
-
maxBy,
|
|
163180
|
-
plus,
|
|
163181
|
-
minus,
|
|
163182
|
-
times,
|
|
163183
|
-
id: id2,
|
|
163184
|
-
length,
|
|
163185
|
-
sumVectors,
|
|
163186
|
-
average,
|
|
163187
|
-
onCircle,
|
|
163188
|
-
enhance,
|
|
163189
|
-
range: range2,
|
|
163190
|
-
mapObject,
|
|
163191
|
-
pairs
|
|
163192
|
-
};
|
|
163193
|
-
})(ops);
|
|
163194
|
-
(function(module2, exports3) {
|
|
163195
|
-
Object.defineProperty(exports3, "__esModule", {
|
|
163196
|
-
value: true
|
|
163197
|
-
});
|
|
163198
|
-
function _interopRequireDefault2(obj) {
|
|
163199
|
-
return obj && obj.__esModule ? obj : { "default": obj };
|
|
163200
|
-
}
|
|
163201
|
-
__name(_interopRequireDefault2, "_interopRequireDefault");
|
|
163202
|
-
function _toConsumableArray2(arr) {
|
|
163203
|
-
if (Array.isArray(arr)) {
|
|
163204
|
-
for (var i2 = 0, arr2 = Array(arr.length); i2 < arr.length; i2++)
|
|
163205
|
-
arr2[i2] = arr[i2];
|
|
163206
|
-
return arr2;
|
|
163207
|
-
} else {
|
|
163208
|
-
return Array.from(arr);
|
|
163209
|
-
}
|
|
163210
|
-
}
|
|
163211
|
-
__name(_toConsumableArray2, "_toConsumableArray");
|
|
163212
|
-
var _path = pathExports;
|
|
163213
|
-
var _path2 = _interopRequireDefault2(_path);
|
|
163214
|
-
var _ops = ops;
|
|
163215
|
-
exports3["default"] = function(_ref) {
|
|
163216
|
-
var _Path$moveto$arc$lineto, _Path$moveto$arc, _Path$moveto, _Path;
|
|
163217
|
-
var center = _ref.center;
|
|
163218
|
-
var r2 = _ref.r;
|
|
163219
|
-
var R2 = _ref.R;
|
|
163220
|
-
var start2 = _ref.start;
|
|
163221
|
-
var end2 = _ref.end;
|
|
163222
|
-
var epsilon = 1e-4;
|
|
163223
|
-
if (Math.abs(end2 - 2 * Math.PI) < epsilon) {
|
|
163224
|
-
end2 = 2 * Math.PI - epsilon;
|
|
163225
|
-
}
|
|
163226
|
-
var a2 = (0, _ops.plus)(center, (0, _ops.onCircle)(R2, start2));
|
|
163227
|
-
var b3 = (0, _ops.plus)(center, (0, _ops.onCircle)(R2, end2));
|
|
163228
|
-
var c2 = (0, _ops.plus)(center, (0, _ops.onCircle)(r2, end2));
|
|
163229
|
-
var d2 = (0, _ops.plus)(center, (0, _ops.onCircle)(r2, start2));
|
|
163230
|
-
var large = end2 - start2 > Math.PI ? 1 : 0;
|
|
163231
|
-
var path2 = (_Path$moveto$arc$lineto = (_Path$moveto$arc = (_Path$moveto = (_Path = (0, _path2["default"])()).moveto.apply(_Path, _toConsumableArray2(a2))).arc.apply(_Path$moveto, [R2, R2, 0, large, 1].concat(_toConsumableArray2(b3)))).lineto.apply(_Path$moveto$arc, _toConsumableArray2(c2))).arc.apply(_Path$moveto$arc$lineto, [r2, r2, 0, large, 0].concat(_toConsumableArray2(d2))).closepath();
|
|
163232
|
-
var midAngle = (start2 + end2) / 2;
|
|
163233
|
-
var midRadius = (r2 + R2) / 2;
|
|
163234
|
-
var centroid = (0, _ops.plus)(center, (0, _ops.onCircle)(midRadius, midAngle));
|
|
163235
|
-
return {
|
|
163236
|
-
path: path2,
|
|
163237
|
-
centroid
|
|
163238
|
-
};
|
|
163239
|
-
};
|
|
163240
|
-
module2.exports = exports3["default"];
|
|
163241
|
-
})(sector$1, sector$1.exports);
|
|
163242
|
-
var sectorExports = sector$1.exports;
|
|
163243
|
-
const sector = /* @__PURE__ */ getDefaultExportFromCjs(sectorExports);
|
|
163244
|
-
function getRangeAnglesSpecial() {
|
|
163245
|
-
const _a2 = getRangeAngles.apply(
|
|
163246
|
-
this,
|
|
163247
|
-
arguments
|
|
163248
|
-
), { endAngle, totalAngle } = _a2, rest = __objRest(_a2, ["endAngle", "totalAngle"]);
|
|
163249
|
-
return __spreadValues({
|
|
163250
|
-
endAngle: endAngle - 1e-5,
|
|
163251
|
-
//we subtract a tiny amount because an angle of 2PI will cause nothing to be drawn!
|
|
163252
|
-
totalAngle: totalAngle - 1e-5
|
|
163253
|
-
}, rest);
|
|
163254
|
-
}
|
|
163255
|
-
__name(getRangeAnglesSpecial, "getRangeAnglesSpecial");
|
|
163256
|
-
function SelectionLayer({
|
|
163257
|
-
isDraggable,
|
|
163258
|
-
selectionLayer: selectionLayer2,
|
|
163259
|
-
sequenceLength,
|
|
163260
|
-
radius,
|
|
163261
|
-
hideTitle,
|
|
163262
|
-
innerRadius,
|
|
163263
|
-
onRightClicked,
|
|
163264
|
-
onClick,
|
|
163265
|
-
index: index2,
|
|
163266
|
-
isProtein: isProtein2
|
|
163267
|
-
}) {
|
|
163268
|
-
const {
|
|
163269
|
-
color: color2,
|
|
163270
|
-
start: start2,
|
|
163271
|
-
end: end2,
|
|
163272
|
-
hideCarets = false,
|
|
163273
|
-
style: style2,
|
|
163274
|
-
className
|
|
163275
|
-
} = selectionLayer2;
|
|
163276
|
-
const { startAngle, endAngle, totalAngle } = getRangeAnglesSpecial(
|
|
163277
|
-
selectionLayer2,
|
|
163278
|
-
sequenceLength
|
|
163279
|
-
);
|
|
163280
|
-
const section = sector({
|
|
163281
|
-
center: [0, 0],
|
|
163282
|
-
//the center is always 0,0 for our annotations :) we rotate later!
|
|
163283
|
-
r: innerRadius,
|
|
163284
|
-
R: radius,
|
|
163285
|
-
start: 0,
|
|
163286
|
-
end: totalAngle
|
|
163287
|
-
});
|
|
163288
|
-
const selectionMessage = getSelectionMessage({
|
|
163289
|
-
sequenceLength,
|
|
163290
|
-
selectionLayer: selectionLayer2,
|
|
163291
|
-
isProtein: isProtein2
|
|
163292
|
-
});
|
|
163293
|
-
const { transform: transform2 } = PositionAnnotationOnCircle({
|
|
163294
|
-
sAngle: startAngle,
|
|
163295
|
-
eAngle: endAngle,
|
|
163296
|
-
height: 0
|
|
163297
|
-
});
|
|
163298
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
163299
|
-
"g",
|
|
163300
|
-
{
|
|
163301
|
-
onContextMenu: (event) => {
|
|
163302
|
-
onRightClicked && onRightClicked({
|
|
163303
|
-
annotation: selectionLayer2,
|
|
163304
|
-
event
|
|
163305
|
-
});
|
|
163306
|
-
},
|
|
163307
|
-
onClick: onClick ? (event) => {
|
|
163308
|
-
onClick({
|
|
163309
|
-
annotation: selectionLayer2,
|
|
163310
|
-
event
|
|
163311
|
-
});
|
|
163312
|
-
} : void 0,
|
|
163313
|
-
key: "veSelectionLayer" + index2,
|
|
163314
|
-
className: "veSelectionLayer " + (className || "")
|
|
163315
|
-
},
|
|
163316
|
-
!hideTitle && /* @__PURE__ */ React$2.createElement("title", null, selectionMessage),
|
|
163317
|
-
/* @__PURE__ */ React$2.createElement(
|
|
163318
|
-
"path",
|
|
163319
|
-
{
|
|
163320
|
-
transform: transform2,
|
|
163321
|
-
className: "selectionLayer",
|
|
163322
|
-
style: __spreadValues({ opacity: 0.3 }, style2),
|
|
163323
|
-
d: section.path.print(),
|
|
163324
|
-
fill: color2
|
|
163325
|
-
}
|
|
163326
|
-
),
|
|
163327
|
-
!hideCarets && /* @__PURE__ */ React$2.createElement(
|
|
163328
|
-
Caret$1,
|
|
163329
|
-
{
|
|
163330
|
-
key: "caret1",
|
|
163331
|
-
className: className + " selectionLayerCaret " + (isDraggable ? draggableClassnames.selectionStart : ""),
|
|
163332
|
-
isSelection: true,
|
|
163333
|
-
onClick: onClick ? noop$4 : preventDefaultStopPropagation,
|
|
163334
|
-
selectionMessage,
|
|
163335
|
-
caretPosition: start2,
|
|
163336
|
-
sequenceLength,
|
|
163337
|
-
innerRadius,
|
|
163338
|
-
outerRadius: radius
|
|
163339
|
-
}
|
|
163340
|
-
),
|
|
163341
|
-
!hideCarets && /* @__PURE__ */ React$2.createElement(
|
|
163342
|
-
Caret$1,
|
|
163343
|
-
{
|
|
163344
|
-
key: "caret2",
|
|
163345
|
-
className: className + " selectionLayerCaret " + (isDraggable ? draggableClassnames.selectionEnd : ""),
|
|
163346
|
-
isSelection: true,
|
|
163347
|
-
onClick: onClick ? noop$4 : preventDefaultStopPropagation,
|
|
163348
|
-
selectionMessage,
|
|
163349
|
-
caretPosition: end2 + 1,
|
|
163350
|
-
sequenceLength,
|
|
163351
|
-
innerRadius,
|
|
163352
|
-
outerRadius: radius
|
|
163353
|
-
}
|
|
163354
|
-
)
|
|
163355
|
-
);
|
|
163356
|
-
}
|
|
163357
|
-
__name(SelectionLayer, "SelectionLayer");
|
|
163358
|
-
const SelectionLayer$1 = pure(SelectionLayer);
|
|
163359
|
-
function Axis({
|
|
163360
|
-
radius,
|
|
163361
|
-
showAxisNumbers,
|
|
163362
|
-
tickMarkHeight = 5,
|
|
163363
|
-
textOffset = 15,
|
|
163364
|
-
ringThickness = 4,
|
|
163365
|
-
zoomLevel
|
|
163366
|
-
}) {
|
|
163367
|
-
const height2 = (ringThickness + (showAxisNumbers ? textOffset + tickMarkHeight : 0)) / zoomLevel;
|
|
163368
|
-
const radiusToUse = showAxisNumbers ? radius + textOffset + tickMarkHeight : radius;
|
|
163369
|
-
const component = /* @__PURE__ */ React$2.createElement("g", { key: "veAxis", className: "veAxis" }, /* @__PURE__ */ React$2.createElement(
|
|
163370
|
-
"circle",
|
|
163371
|
-
{
|
|
163372
|
-
className: "veAxisLine veAxisOuter",
|
|
163373
|
-
key: "circleOuter",
|
|
163374
|
-
r: radiusToUse + ringThickness,
|
|
163375
|
-
style: { fill: "#ffffff00", stroke: "black", strokeWidth: 0.5 }
|
|
163376
|
-
}
|
|
163377
|
-
), /* @__PURE__ */ React$2.createElement(
|
|
163378
|
-
"circle",
|
|
163379
|
-
{
|
|
163380
|
-
className: "veAxisLine veAxisInner",
|
|
163381
|
-
key: "circle",
|
|
163382
|
-
r: radiusToUse,
|
|
163383
|
-
style: { fill: "#ffffff00", stroke: "black", strokeWidth: 0.5 }
|
|
163384
|
-
}
|
|
163385
|
-
));
|
|
163386
|
-
return {
|
|
163387
|
-
component,
|
|
163388
|
-
height: height2
|
|
163389
|
-
};
|
|
163390
|
-
}
|
|
163391
|
-
__name(Axis, "Axis");
|
|
163392
162721
|
function polarToSpecialCartesian(radius, angleInRadians) {
|
|
163393
162722
|
return {
|
|
163394
162723
|
x: radius * Math.cos(angleInRadians - Math.PI / 2),
|
|
@@ -163504,30 +162833,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
163504
162833
|
return path2;
|
|
163505
162834
|
}
|
|
163506
162835
|
__name(drawDirectedPiePiece, "drawDirectedPiePiece");
|
|
163507
|
-
function CircularPrimer$1({
|
|
163508
|
-
color: color2 = "orange",
|
|
163509
|
-
radius,
|
|
163510
|
-
annotationHeight,
|
|
163511
|
-
totalAngle
|
|
163512
|
-
}) {
|
|
163513
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
163514
|
-
"path",
|
|
163515
|
-
{
|
|
163516
|
-
className: "veOrf",
|
|
163517
|
-
strokeWidth: ".5",
|
|
163518
|
-
stroke: color2,
|
|
163519
|
-
fill: color2,
|
|
163520
|
-
d: drawDirectedPiePiece({
|
|
163521
|
-
radius,
|
|
163522
|
-
annotationHeight,
|
|
163523
|
-
totalAngle,
|
|
163524
|
-
arrowheadLength: 0.4,
|
|
163525
|
-
tailThickness: 0.4
|
|
163526
|
-
}).print()
|
|
163527
|
-
}
|
|
163528
|
-
);
|
|
163529
|
-
}
|
|
163530
|
-
__name(CircularPrimer$1, "CircularPrimer$1");
|
|
163531
162836
|
function getInternalLabel({
|
|
163532
162837
|
ellipsizedName,
|
|
163533
162838
|
id: id2,
|
|
@@ -163641,58 +162946,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
163641
162946
|
})));
|
|
163642
162947
|
}
|
|
163643
162948
|
__name(Feature, "Feature");
|
|
163644
|
-
function CircularPrimer(props) {
|
|
163645
|
-
const {
|
|
163646
|
-
color: color2 = "orange",
|
|
163647
|
-
radius,
|
|
163648
|
-
arrowheadLength = 0.5,
|
|
163649
|
-
annotationHeight,
|
|
163650
|
-
totalAngle,
|
|
163651
|
-
id: id2,
|
|
163652
|
-
labelNeedsFlip,
|
|
163653
|
-
ellipsizedName
|
|
163654
|
-
} = props;
|
|
163655
|
-
const [path2, textPath] = drawDirectedPiePiece({
|
|
163656
|
-
radius,
|
|
163657
|
-
annotationHeight,
|
|
163658
|
-
totalAngle,
|
|
163659
|
-
arrowheadLength,
|
|
163660
|
-
tailThickness: 1,
|
|
163661
|
-
//feature specific
|
|
163662
|
-
returnTextPath: true,
|
|
163663
|
-
hasLabel: ellipsizedName,
|
|
163664
|
-
labelNeedsFlip
|
|
163665
|
-
});
|
|
163666
|
-
return /* @__PURE__ */ React$2.createElement(React$2.Fragment, null, getStripedPattern({ color: color2 }), /* @__PURE__ */ React$2.createElement(
|
|
163667
|
-
"path",
|
|
163668
|
-
{
|
|
163669
|
-
className: "vePrimer veCircularViewPrimer",
|
|
163670
|
-
id: id2,
|
|
163671
|
-
strokeWidth: ".5",
|
|
163672
|
-
stroke: "black",
|
|
163673
|
-
fill: "url(#diagonalHatch)",
|
|
163674
|
-
d: path2.print()
|
|
163675
|
-
}
|
|
163676
|
-
), getInternalLabel(__spreadProps(__spreadValues({}, props), { colorToUse: color2, textPath })));
|
|
163677
|
-
}
|
|
163678
|
-
__name(CircularPrimer, "CircularPrimer");
|
|
163679
|
-
function Cutsite({
|
|
163680
|
-
annotationHeight,
|
|
163681
|
-
radius
|
|
163682
|
-
// totalAngle,
|
|
163683
|
-
// ...rest
|
|
163684
|
-
}) {
|
|
163685
|
-
return /* @__PURE__ */ React$2.createElement(
|
|
163686
|
-
"rect",
|
|
163687
|
-
{
|
|
163688
|
-
className: "veCutsite",
|
|
163689
|
-
width: 1,
|
|
163690
|
-
y: -radius - 4,
|
|
163691
|
-
height: annotationHeight
|
|
163692
|
-
}
|
|
163693
|
-
);
|
|
163694
|
-
}
|
|
163695
|
-
__name(Cutsite, "Cutsite");
|
|
163696
162949
|
function drawAnnotations(props) {
|
|
163697
162950
|
const {
|
|
163698
162951
|
readOnly: readOnly2,
|
|
@@ -163973,7 +163226,6 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
163973
163226
|
onMouseLeave,
|
|
163974
163227
|
onMouseOver
|
|
163975
163228
|
};
|
|
163976
|
-
const title = /* @__PURE__ */ React$2.createElement("title", null, titleText);
|
|
163977
163229
|
function getInner({
|
|
163978
163230
|
startAngle: startAngle2,
|
|
163979
163231
|
endAngle: endAngle2,
|
|
@@ -163990,11 +163242,12 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
163990
163242
|
});
|
|
163991
163243
|
return /* @__PURE__ */ React$2.createElement(
|
|
163992
163244
|
"g",
|
|
163993
|
-
__spreadValues({
|
|
163245
|
+
__spreadValues(__spreadProps(__spreadValues({
|
|
163994
163246
|
transform: transform2,
|
|
163247
|
+
"data-title": noTitle ? null : titleText
|
|
163248
|
+
}, avoidOverlapWith), {
|
|
163995
163249
|
key: isNotLocation ? "notLocation" : "location--" + annotation.id + "--" + i2
|
|
163996
|
-
}, sharedProps),
|
|
163997
|
-
noTitle ? null : title,
|
|
163250
|
+
}), sharedProps),
|
|
163998
163251
|
/* @__PURE__ */ React$2.createElement(
|
|
163999
163252
|
Annotation,
|
|
164000
163253
|
__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, passAnnotation && { annotation }), {
|
|
@@ -164027,6 +163280,964 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
|
|
|
164027
163280
|
}
|
|
164028
163281
|
__name(DrawAnnotationInner, "DrawAnnotationInner");
|
|
164029
163282
|
const DrawAnnotation = withHover(DrawAnnotationInner);
|
|
163283
|
+
const avoidOverlapWith = {
|
|
163284
|
+
"data-avoid": ".topLevelLabelGroup",
|
|
163285
|
+
"data-avoid-backup": ".veLabel.veAnnotationHovered"
|
|
163286
|
+
};
|
|
163287
|
+
const fontWidthToFontSize = 1.75;
|
|
163288
|
+
const getTextLength = /* @__PURE__ */ __name((text2) => {
|
|
163289
|
+
let len2 = (text2 || "Unlabeled").length;
|
|
163290
|
+
const nonEnInputReg = /[^\x00-\xff]+/g;
|
|
163291
|
+
const nonEnStrings = (text2 || "Unlabeled").match(nonEnInputReg) || [];
|
|
163292
|
+
nonEnStrings.forEach((str) => len2 += str.length * 0.5);
|
|
163293
|
+
return len2;
|
|
163294
|
+
}, "getTextLength");
|
|
163295
|
+
function Labels({
|
|
163296
|
+
labels: labels2 = [],
|
|
163297
|
+
extraSideSpace,
|
|
163298
|
+
smartCircViewLabelRender,
|
|
163299
|
+
radius: outerRadius,
|
|
163300
|
+
editorName,
|
|
163301
|
+
noRedux,
|
|
163302
|
+
rotationRadians,
|
|
163303
|
+
textScalingFactor,
|
|
163304
|
+
labelLineIntensity: labelLineIntensity2,
|
|
163305
|
+
labelSize: labelSize2 = 8,
|
|
163306
|
+
fontHeightMultiplier = 2.4,
|
|
163307
|
+
circularViewWidthVsHeightRatio,
|
|
163308
|
+
//width of the circular view
|
|
163309
|
+
condenseOverflowingXLabels = true
|
|
163310
|
+
//set to true to make labels tha
|
|
163311
|
+
}) {
|
|
163312
|
+
if (!labels2.length) {
|
|
163313
|
+
return {
|
|
163314
|
+
component: null,
|
|
163315
|
+
height: 15
|
|
163316
|
+
};
|
|
163317
|
+
}
|
|
163318
|
+
const originalOuterRadius = outerRadius;
|
|
163319
|
+
outerRadius += smartCircViewLabelRender ? 10 : 25;
|
|
163320
|
+
const radius = outerRadius;
|
|
163321
|
+
const outerPointRadius = outerRadius - 20;
|
|
163322
|
+
const fontWidth = labelSize2 * (textScalingFactor < 1 ? textScalingFactor : 1);
|
|
163323
|
+
const fontHeight = fontWidth * lodashExports.clamp(fontHeightMultiplier, 1.5, 3.5);
|
|
163324
|
+
const labelPoints = labels2.map(function(label) {
|
|
163325
|
+
const {
|
|
163326
|
+
annotationCenterAngle: _annotationCenterAngle,
|
|
163327
|
+
annotationCenterRadius
|
|
163328
|
+
} = label;
|
|
163329
|
+
const annotationCenterAngle = _annotationCenterAngle + (rotationRadians || 0);
|
|
163330
|
+
return __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, label), {
|
|
163331
|
+
width: getTextLength(label.text) * fontWidth,
|
|
163332
|
+
//three points define the label:
|
|
163333
|
+
innerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(
|
|
163334
|
+
annotationCenterRadius,
|
|
163335
|
+
annotationCenterAngle
|
|
163336
|
+
)), {
|
|
163337
|
+
radius: annotationCenterRadius,
|
|
163338
|
+
angle: annotationCenterAngle
|
|
163339
|
+
}),
|
|
163340
|
+
truncatedInnerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(
|
|
163341
|
+
outerPointRadius - 15,
|
|
163342
|
+
annotationCenterAngle
|
|
163343
|
+
)), {
|
|
163344
|
+
radius: outerPointRadius - 15,
|
|
163345
|
+
angle: annotationCenterAngle
|
|
163346
|
+
}),
|
|
163347
|
+
outerPoint: __spreadProps(__spreadValues({}, polarToSpecialCartesian$1(outerPointRadius, annotationCenterAngle)), {
|
|
163348
|
+
radius: outerPointRadius,
|
|
163349
|
+
angle: annotationCenterAngle
|
|
163350
|
+
})
|
|
163351
|
+
}), polarToSpecialCartesian$1(radius, annotationCenterAngle)), {
|
|
163352
|
+
radius: radius + 10,
|
|
163353
|
+
angle: annotationCenterAngle
|
|
163354
|
+
});
|
|
163355
|
+
}).map(function(label) {
|
|
163356
|
+
label.labelAndSublabels = [label];
|
|
163357
|
+
label.labelIds = { [label.id]: true };
|
|
163358
|
+
return label;
|
|
163359
|
+
});
|
|
163360
|
+
let maxRadius = 1;
|
|
163361
|
+
const groupedLabels = relaxLabelAngles(labelPoints, fontHeight, outerRadius).filter((l2) => !!l2).map((originalLabel) => {
|
|
163362
|
+
if (smartCircViewLabelRender) {
|
|
163363
|
+
const newR = Math.sqrt(
|
|
163364
|
+
Math.pow(
|
|
163365
|
+
Math.abs(originalLabel.x) + Math.max(0, originalLabel.text.length * 11 - extraSideSpace / 2),
|
|
163366
|
+
2
|
|
163367
|
+
) + Math.pow(Math.abs(originalLabel.y), 2)
|
|
163368
|
+
);
|
|
163369
|
+
if (newR > maxRadius)
|
|
163370
|
+
maxRadius = newR;
|
|
163371
|
+
}
|
|
163372
|
+
if (originalLabel.highPriorityLabel) {
|
|
163373
|
+
return originalLabel;
|
|
163374
|
+
}
|
|
163375
|
+
const _highPrioritySublabel = originalLabel.labelAndSublabels.find(
|
|
163376
|
+
(l2) => l2.highPriorityLabel
|
|
163377
|
+
);
|
|
163378
|
+
if (_highPrioritySublabel) {
|
|
163379
|
+
const highPrioritySublabel = lodashExports.cloneDeep(_highPrioritySublabel);
|
|
163380
|
+
[
|
|
163381
|
+
"angle",
|
|
163382
|
+
"annotationCenterAngle",
|
|
163383
|
+
"annotationCenterRadius",
|
|
163384
|
+
"innerPoint",
|
|
163385
|
+
"labelAndSublabels",
|
|
163386
|
+
"labelIds",
|
|
163387
|
+
"outerPoint",
|
|
163388
|
+
"radius",
|
|
163389
|
+
"truncatedInnerPoint",
|
|
163390
|
+
"x",
|
|
163391
|
+
"y"
|
|
163392
|
+
].forEach((k2) => {
|
|
163393
|
+
highPrioritySublabel[k2] = originalLabel[k2];
|
|
163394
|
+
});
|
|
163395
|
+
delete originalLabel.labelAndSublabels;
|
|
163396
|
+
return highPrioritySublabel;
|
|
163397
|
+
}
|
|
163398
|
+
return originalLabel;
|
|
163399
|
+
});
|
|
163400
|
+
window.isLabelGroupOpen = false;
|
|
163401
|
+
return {
|
|
163402
|
+
component: /* @__PURE__ */ React$2.createElement(
|
|
163403
|
+
"g",
|
|
163404
|
+
{
|
|
163405
|
+
key: "veLabels",
|
|
163406
|
+
className: "veLabels ve-monospace-font",
|
|
163407
|
+
transform: `rotate(-${rotationRadians * 180 / Math.PI})`
|
|
163408
|
+
},
|
|
163409
|
+
/* @__PURE__ */ React$2.createElement(
|
|
163410
|
+
DrawGroupedLabels,
|
|
163411
|
+
__spreadValues({}, {
|
|
163412
|
+
editorName,
|
|
163413
|
+
noRedux,
|
|
163414
|
+
groupedLabels,
|
|
163415
|
+
circularViewWidthVsHeightRatio,
|
|
163416
|
+
fontWidth,
|
|
163417
|
+
fontHeight,
|
|
163418
|
+
condenseOverflowingXLabels,
|
|
163419
|
+
outerRadius,
|
|
163420
|
+
labelLineIntensity: labelLineIntensity2
|
|
163421
|
+
})
|
|
163422
|
+
)
|
|
163423
|
+
),
|
|
163424
|
+
//we use the <use> tag to position the hovered label group at the top of the stack
|
|
163425
|
+
//point events: none is to fix a click bug..
|
|
163426
|
+
//http://stackoverflow.com/questions/24078524/svg-click-events-not-firing-bubbling-when-using-use-element
|
|
163427
|
+
height: smartCircViewLabelRender ? Math.min(105, maxRadius - originalOuterRadius) : 120
|
|
163428
|
+
};
|
|
163429
|
+
}
|
|
163430
|
+
__name(Labels, "Labels");
|
|
163431
|
+
const DrawLabelGroup = withHover(function({
|
|
163432
|
+
hovered,
|
|
163433
|
+
className,
|
|
163434
|
+
label,
|
|
163435
|
+
labelAndSublabels,
|
|
163436
|
+
fontWidth,
|
|
163437
|
+
noRedux,
|
|
163438
|
+
fontHeight,
|
|
163439
|
+
outerRadius,
|
|
163440
|
+
onMouseLeave,
|
|
163441
|
+
onMouseOver,
|
|
163442
|
+
editorName,
|
|
163443
|
+
circularViewWidthVsHeightRatio,
|
|
163444
|
+
condenseOverflowingXLabels,
|
|
163445
|
+
hoveredId,
|
|
163446
|
+
labelLineIntensity: labelLineIntensity2,
|
|
163447
|
+
// labelIds,
|
|
163448
|
+
multipleLabels
|
|
163449
|
+
// isIdHashmap,
|
|
163450
|
+
}) {
|
|
163451
|
+
let { text: text2 = "Unlabeled" } = label;
|
|
163452
|
+
const textLength = getTextLength(text2);
|
|
163453
|
+
let groupLabelXStart;
|
|
163454
|
+
if (label.labelAndSublabels && label.labelAndSublabels.length > 1) {
|
|
163455
|
+
text2 = "+" + (label.labelAndSublabels.length - 1) + "," + text2;
|
|
163456
|
+
}
|
|
163457
|
+
const labelLength = textLength * fontWidth;
|
|
163458
|
+
const maxLabelLength = labelAndSublabels.reduce(function(currentLength, { text: text22 = "Unlabeled" }) {
|
|
163459
|
+
const _textLength = getTextLength(text22);
|
|
163460
|
+
if (_textLength > currentLength) {
|
|
163461
|
+
return _textLength;
|
|
163462
|
+
}
|
|
163463
|
+
return currentLength;
|
|
163464
|
+
}, 0);
|
|
163465
|
+
const maxLabelWidth = maxLabelLength * fontWidth;
|
|
163466
|
+
const labelOnLeft = label.angle > Math.PI;
|
|
163467
|
+
let labelXStart = label.x - (labelOnLeft ? labelLength : 0);
|
|
163468
|
+
if (condenseOverflowingXLabels) {
|
|
163469
|
+
const distancePastBoundary = Math.abs(label.x + (labelOnLeft ? -labelLength : labelLength)) - (outerRadius + 90) * Math.max(1, circularViewWidthVsHeightRatio);
|
|
163470
|
+
if (distancePastBoundary > 0) {
|
|
163471
|
+
const numberOfCharsToChop = Math.ceil(distancePastBoundary / fontWidth) + 2;
|
|
163472
|
+
text2 = text2.slice(0, -numberOfCharsToChop) + "..";
|
|
163473
|
+
groupLabelXStart = labelXStart + (labelOnLeft ? distancePastBoundary : -distancePastBoundary);
|
|
163474
|
+
labelXStart += labelOnLeft ? distancePastBoundary : 0;
|
|
163475
|
+
}
|
|
163476
|
+
}
|
|
163477
|
+
const dy = fontHeight;
|
|
163478
|
+
const textYStart = label.y + dy / 2;
|
|
163479
|
+
let content2;
|
|
163480
|
+
const labelClass = ` veLabelText veLabel veCircularViewLabelText clickable ${label.color} `;
|
|
163481
|
+
if ((multipleLabels || groupLabelXStart !== void 0) && hovered) {
|
|
163482
|
+
window.isLabelGroupOpen = true;
|
|
163483
|
+
let hoveredLabel;
|
|
163484
|
+
if (groupLabelXStart !== void 0) {
|
|
163485
|
+
labelXStart = groupLabelXStart;
|
|
163486
|
+
}
|
|
163487
|
+
labelAndSublabels.some(function(label2) {
|
|
163488
|
+
if (label2.id === hoveredId) {
|
|
163489
|
+
hoveredLabel = label2;
|
|
163490
|
+
return true;
|
|
163491
|
+
}
|
|
163492
|
+
return false;
|
|
163493
|
+
});
|
|
163494
|
+
if (!hoveredLabel) {
|
|
163495
|
+
hoveredLabel = label;
|
|
163496
|
+
}
|
|
163497
|
+
let labelYStart = label.y;
|
|
163498
|
+
const labelGroupHeight = labelAndSublabels.length * dy;
|
|
163499
|
+
const labelGroupBottom = label.y + labelGroupHeight;
|
|
163500
|
+
if (labelGroupBottom > outerRadius + 20) {
|
|
163501
|
+
labelYStart -= (label.labelAndSublabels.length - 1) * dy;
|
|
163502
|
+
}
|
|
163503
|
+
const line = LabelLine(
|
|
163504
|
+
[
|
|
163505
|
+
hoveredLabel.innerPoint,
|
|
163506
|
+
// hoveredLabel.labelAndSublabels &&
|
|
163507
|
+
// hoveredLabel.labelAndSublabels.length > 0
|
|
163508
|
+
// ? hoveredLabel.outerPoint
|
|
163509
|
+
// : {},
|
|
163510
|
+
label
|
|
163511
|
+
],
|
|
163512
|
+
{ style: { opacity: 1 }, strokeWidth: 2 }
|
|
163513
|
+
);
|
|
163514
|
+
content2 = [
|
|
163515
|
+
line,
|
|
163516
|
+
/* @__PURE__ */ React$2.createElement(PutMyParentOnTop, { editorName, key: "gGroup" }, /* @__PURE__ */ React$2.createElement("g", { className: className + " veLabel topLevelLabelGroup" }, /* @__PURE__ */ React$2.createElement(
|
|
163517
|
+
"rect",
|
|
163518
|
+
{
|
|
163519
|
+
onMouseOver: cancelFn,
|
|
163520
|
+
x: labelXStart - 4,
|
|
163521
|
+
y: labelYStart - dy / 2,
|
|
163522
|
+
width: maxLabelWidth + 24,
|
|
163523
|
+
height: labelGroupHeight + 4,
|
|
163524
|
+
fill: "white",
|
|
163525
|
+
stroke: "black"
|
|
163526
|
+
}
|
|
163527
|
+
), /* @__PURE__ */ React$2.createElement(
|
|
163528
|
+
"text",
|
|
163529
|
+
{
|
|
163530
|
+
x: labelXStart,
|
|
163531
|
+
y: labelYStart,
|
|
163532
|
+
style: {
|
|
163533
|
+
fontSize: fontWidth * fontWidthToFontSize,
|
|
163534
|
+
fontStyle: label.fontStyle
|
|
163535
|
+
}
|
|
163536
|
+
},
|
|
163537
|
+
labelAndSublabels.map(function(label2, index2) {
|
|
163538
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163539
|
+
DrawGroupInnerLabel,
|
|
163540
|
+
__spreadValues({
|
|
163541
|
+
isSubLabel: true,
|
|
163542
|
+
noRedux,
|
|
163543
|
+
editorName,
|
|
163544
|
+
logHover: true,
|
|
163545
|
+
key: "labelItem" + index2,
|
|
163546
|
+
className: (label2.className || "") + labelClass + " veDrawGroupInnerLabel",
|
|
163547
|
+
id: label2.id
|
|
163548
|
+
}, { labelXStart, label: label2, fontWidth, index: index2, dy })
|
|
163549
|
+
);
|
|
163550
|
+
})
|
|
163551
|
+
)))
|
|
163552
|
+
];
|
|
163553
|
+
} else {
|
|
163554
|
+
content2 = [
|
|
163555
|
+
// <title key="labeltitle">{label.title || label.text}</title>,
|
|
163556
|
+
/* @__PURE__ */ React$2.createElement(
|
|
163557
|
+
"text",
|
|
163558
|
+
__spreadProps(__spreadValues({
|
|
163559
|
+
key: "text",
|
|
163560
|
+
"data-title": label.title || label.text
|
|
163561
|
+
}, avoidOverlapWith), {
|
|
163562
|
+
x: labelXStart,
|
|
163563
|
+
textLength: getTextLength(text2) * fontWidth,
|
|
163564
|
+
lengthAdjust: "spacing",
|
|
163565
|
+
className: labelClass + label.className + (hovered ? " veAnnotationHovered" : ""),
|
|
163566
|
+
y: textYStart,
|
|
163567
|
+
style: {
|
|
163568
|
+
fontSize: fontWidth * fontWidthToFontSize,
|
|
163569
|
+
fontStyle: label.fontStyle,
|
|
163570
|
+
fill: label.color || "black"
|
|
163571
|
+
// stroke: label.color ? label.color : "black"
|
|
163572
|
+
}
|
|
163573
|
+
}),
|
|
163574
|
+
text2
|
|
163575
|
+
),
|
|
163576
|
+
LabelLine(
|
|
163577
|
+
[
|
|
163578
|
+
label.innerPoint,
|
|
163579
|
+
// hovered || label.annotationType === "part" //because parts live on the outside of the sequence, we don't need to show the truncated point, we can just point to them directly
|
|
163580
|
+
// ? label.innerPoint
|
|
163581
|
+
// : label.truncatedInnerPoint,
|
|
163582
|
+
label.outerPoint,
|
|
163583
|
+
label
|
|
163584
|
+
],
|
|
163585
|
+
hovered ? { style: { opacity: 1 }, strokeWidth: 2 } : { style: { opacity: labelLineIntensity2 } }
|
|
163586
|
+
)
|
|
163587
|
+
];
|
|
163588
|
+
}
|
|
163589
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163590
|
+
"g",
|
|
163591
|
+
__spreadValues(__spreadValues({}, { onMouseLeave, onMouseOver }), {
|
|
163592
|
+
onClick: label.onClick,
|
|
163593
|
+
onDoubleClick: label.onDoubleClick || lodashExports.noop,
|
|
163594
|
+
onContextMenu: label.onContextMenu || lodashExports.noop
|
|
163595
|
+
}),
|
|
163596
|
+
content2
|
|
163597
|
+
);
|
|
163598
|
+
});
|
|
163599
|
+
function LabelLine(pointArray, options) {
|
|
163600
|
+
let points = "";
|
|
163601
|
+
pointArray.forEach(function({ x: x2, y: y2 }) {
|
|
163602
|
+
if (!x2 && x2 !== 0)
|
|
163603
|
+
return;
|
|
163604
|
+
points += `${x2},${y2} `;
|
|
163605
|
+
});
|
|
163606
|
+
return /* @__PURE__ */ React$2.createElement(React$2.Fragment, { key: "labelLine" }, /* @__PURE__ */ React$2.createElement(
|
|
163607
|
+
"polyline",
|
|
163608
|
+
__spreadValues({}, __spreadValues({
|
|
163609
|
+
key: "polyline-long",
|
|
163610
|
+
points,
|
|
163611
|
+
stroke: "black",
|
|
163612
|
+
fill: "none",
|
|
163613
|
+
strokeWidth: 1,
|
|
163614
|
+
className: "veLabelLine"
|
|
163615
|
+
}, options))
|
|
163616
|
+
));
|
|
163617
|
+
}
|
|
163618
|
+
__name(LabelLine, "LabelLine");
|
|
163619
|
+
const DrawGroupInnerLabel = withHover(
|
|
163620
|
+
({ className, labelXStart, label, fontWidth, onMouseOver, index: index2, dy }) => {
|
|
163621
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163622
|
+
"tspan",
|
|
163623
|
+
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
163624
|
+
"data-title": label.title
|
|
163625
|
+
}, avoidOverlapWith), {
|
|
163626
|
+
x: labelXStart,
|
|
163627
|
+
textLength: getTextLength(label.text) * fontWidth,
|
|
163628
|
+
lengthAdjust: "spacing",
|
|
163629
|
+
onClick: label.onClick,
|
|
163630
|
+
onDoubleClick: (e2) => {
|
|
163631
|
+
e2.stopPropagation();
|
|
163632
|
+
label.onDoubleClick && label.onDoubleClick(e2);
|
|
163633
|
+
},
|
|
163634
|
+
onContextMenu: label.onContextMenu,
|
|
163635
|
+
dy: index2 === 0 ? dy / 2 : dy,
|
|
163636
|
+
style: {
|
|
163637
|
+
fill: label.color ? label.color : "black",
|
|
163638
|
+
fontStyle: label.fontStyle
|
|
163639
|
+
}
|
|
163640
|
+
}), { onMouseOver }), {
|
|
163641
|
+
className
|
|
163642
|
+
}),
|
|
163643
|
+
label.text
|
|
163644
|
+
);
|
|
163645
|
+
}
|
|
163646
|
+
);
|
|
163647
|
+
const DrawGroupedLabels = /* @__PURE__ */ __name(function DrawGroupedLabelsInner({
|
|
163648
|
+
groupedLabels,
|
|
163649
|
+
circularViewWidthVsHeightRatio,
|
|
163650
|
+
fontWidth,
|
|
163651
|
+
noRedux,
|
|
163652
|
+
fontHeight,
|
|
163653
|
+
condenseOverflowingXLabels,
|
|
163654
|
+
outerRadius,
|
|
163655
|
+
editorName,
|
|
163656
|
+
labelLineIntensity: labelLineIntensity2
|
|
163657
|
+
}) {
|
|
163658
|
+
return groupedLabels.map(function(label, i2) {
|
|
163659
|
+
const { labelAndSublabels, labelIds } = label;
|
|
163660
|
+
const multipleLabels = labelAndSublabels.length > 1;
|
|
163661
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163662
|
+
DrawLabelGroup,
|
|
163663
|
+
__spreadValues({
|
|
163664
|
+
key: i2,
|
|
163665
|
+
id: labelIds
|
|
163666
|
+
}, {
|
|
163667
|
+
label,
|
|
163668
|
+
noRedux,
|
|
163669
|
+
passHoveredId: true,
|
|
163670
|
+
//needed to get the hoveredId
|
|
163671
|
+
isLabelGroup: true,
|
|
163672
|
+
className: "DrawLabelGroup",
|
|
163673
|
+
multipleLabels,
|
|
163674
|
+
labelAndSublabels,
|
|
163675
|
+
labelIds,
|
|
163676
|
+
circularViewWidthVsHeightRatio,
|
|
163677
|
+
fontWidth,
|
|
163678
|
+
editorName,
|
|
163679
|
+
fontHeight,
|
|
163680
|
+
condenseOverflowingXLabels,
|
|
163681
|
+
outerRadius,
|
|
163682
|
+
labelLineIntensity: labelLineIntensity2
|
|
163683
|
+
})
|
|
163684
|
+
);
|
|
163685
|
+
});
|
|
163686
|
+
}, "DrawGroupedLabelsInner");
|
|
163687
|
+
function cancelFn(e2) {
|
|
163688
|
+
e2.stopPropagation();
|
|
163689
|
+
}
|
|
163690
|
+
__name(cancelFn, "cancelFn");
|
|
163691
|
+
const _PutMyParentOnTop = class _PutMyParentOnTop extends React$2.Component {
|
|
163692
|
+
componentDidMount() {
|
|
163693
|
+
const { editorName } = this.props;
|
|
163694
|
+
try {
|
|
163695
|
+
const el2 = document.querySelector(
|
|
163696
|
+
`.veEditor.${editorName} .topLevelLabelGroup`
|
|
163697
|
+
);
|
|
163698
|
+
const parent2 = el2.parentElement.parentElement;
|
|
163699
|
+
const i2 = Array.prototype.indexOf.call(parent2.children, el2.parentElement);
|
|
163700
|
+
parent2.insertBefore(parent2.children[i2], null);
|
|
163701
|
+
} catch (error) {
|
|
163702
|
+
console.warn(
|
|
163703
|
+
"OVE-975239 - hit an error trying to re-order labels:",
|
|
163704
|
+
error
|
|
163705
|
+
);
|
|
163706
|
+
}
|
|
163707
|
+
}
|
|
163708
|
+
render() {
|
|
163709
|
+
return this.props.children;
|
|
163710
|
+
}
|
|
163711
|
+
};
|
|
163712
|
+
__name(_PutMyParentOnTop, "PutMyParentOnTop");
|
|
163713
|
+
let PutMyParentOnTop = _PutMyParentOnTop;
|
|
163714
|
+
var baseGetTag = _baseGetTag, isObjectLike = isObjectLike_1;
|
|
163715
|
+
var numberTag = "[object Number]";
|
|
163716
|
+
function isNumber(value) {
|
|
163717
|
+
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
|
|
163718
|
+
}
|
|
163719
|
+
__name(isNumber, "isNumber");
|
|
163720
|
+
var isNumber_1 = isNumber;
|
|
163721
|
+
const isNumber$1 = /* @__PURE__ */ getDefaultExportFromCjs(isNumber_1);
|
|
163722
|
+
function Caret({
|
|
163723
|
+
caretPosition: caretPosition2,
|
|
163724
|
+
sequenceLength,
|
|
163725
|
+
className,
|
|
163726
|
+
onClick,
|
|
163727
|
+
isSelection,
|
|
163728
|
+
innerRadius,
|
|
163729
|
+
outerRadius,
|
|
163730
|
+
isProtein: isProtein2,
|
|
163731
|
+
selectionMessage
|
|
163732
|
+
}) {
|
|
163733
|
+
const { startAngle, endAngle } = getRangeAngles(
|
|
163734
|
+
{ start: caretPosition2, end: caretPosition2 },
|
|
163735
|
+
sequenceLength || 1
|
|
163736
|
+
);
|
|
163737
|
+
if (!isNumber$1(startAngle)) {
|
|
163738
|
+
console.error("we've got a problem!");
|
|
163739
|
+
}
|
|
163740
|
+
const { transform: transform2 } = PositionAnnotationOnCircle({
|
|
163741
|
+
sAngle: startAngle,
|
|
163742
|
+
eAngle: endAngle,
|
|
163743
|
+
height: 0
|
|
163744
|
+
});
|
|
163745
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
163746
|
+
"g",
|
|
163747
|
+
{
|
|
163748
|
+
onClick,
|
|
163749
|
+
transform: transform2,
|
|
163750
|
+
className: className + " veCaret " + draggableClassnames.caret
|
|
163751
|
+
},
|
|
163752
|
+
/* @__PURE__ */ React$2.createElement("title", null, selectionMessage || getSelectionMessage({ caretPosition: caretPosition2, isProtein: isProtein2, sequenceLength })),
|
|
163753
|
+
/* @__PURE__ */ React$2.createElement(
|
|
163754
|
+
"line",
|
|
163755
|
+
{
|
|
163756
|
+
strokeWidth: "1.5px",
|
|
163757
|
+
x1: 0,
|
|
163758
|
+
y1: -innerRadius,
|
|
163759
|
+
x2: 0,
|
|
163760
|
+
y2: -outerRadius
|
|
163761
|
+
}
|
|
163762
|
+
),
|
|
163763
|
+
isSelection ? /* @__PURE__ */ React$2.createElement(
|
|
163764
|
+
"polygon",
|
|
163765
|
+
{
|
|
163766
|
+
className: "vePolygonCaretHandle",
|
|
163767
|
+
fill: "black",
|
|
163768
|
+
points: `0,${-outerRadius + 2} 5,${-outerRadius - 10} -5,${-outerRadius - 10}`
|
|
163769
|
+
}
|
|
163770
|
+
) : null
|
|
163771
|
+
);
|
|
163772
|
+
}
|
|
163773
|
+
__name(Caret, "Caret");
|
|
163774
|
+
const Caret$1 = pure(Caret);
|
|
163775
|
+
var sector$1 = { exports: {} };
|
|
163776
|
+
var ops = {};
|
|
163777
|
+
(function(exports3) {
|
|
163778
|
+
Object.defineProperty(exports3, "__esModule", {
|
|
163779
|
+
value: true
|
|
163780
|
+
});
|
|
163781
|
+
var _slicedToArray2 = function() {
|
|
163782
|
+
function sliceIterator(arr, i2) {
|
|
163783
|
+
var _arr = [];
|
|
163784
|
+
var _n = true;
|
|
163785
|
+
var _d2 = false;
|
|
163786
|
+
var _e = void 0;
|
|
163787
|
+
try {
|
|
163788
|
+
for (var _i = arr[Symbol.iterator](), _s2; !(_n = (_s2 = _i.next()).done); _n = true) {
|
|
163789
|
+
_arr.push(_s2.value);
|
|
163790
|
+
if (i2 && _arr.length === i2)
|
|
163791
|
+
break;
|
|
163792
|
+
}
|
|
163793
|
+
} catch (err2) {
|
|
163794
|
+
_d2 = true;
|
|
163795
|
+
_e = err2;
|
|
163796
|
+
} finally {
|
|
163797
|
+
try {
|
|
163798
|
+
if (!_n && _i["return"])
|
|
163799
|
+
_i["return"]();
|
|
163800
|
+
} finally {
|
|
163801
|
+
if (_d2)
|
|
163802
|
+
throw _e;
|
|
163803
|
+
}
|
|
163804
|
+
}
|
|
163805
|
+
return _arr;
|
|
163806
|
+
}
|
|
163807
|
+
__name(sliceIterator, "sliceIterator");
|
|
163808
|
+
return function(arr, i2) {
|
|
163809
|
+
if (Array.isArray(arr)) {
|
|
163810
|
+
return arr;
|
|
163811
|
+
} else if (Symbol.iterator in Object(arr)) {
|
|
163812
|
+
return sliceIterator(arr, i2);
|
|
163813
|
+
} else {
|
|
163814
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
163815
|
+
}
|
|
163816
|
+
};
|
|
163817
|
+
}();
|
|
163818
|
+
var sum2 = /* @__PURE__ */ __name(function sum3(xs) {
|
|
163819
|
+
return xs.reduce(function(a2, b3) {
|
|
163820
|
+
return a2 + b3;
|
|
163821
|
+
}, 0);
|
|
163822
|
+
}, "sum");
|
|
163823
|
+
var min2 = /* @__PURE__ */ __name(function min3(xs) {
|
|
163824
|
+
return xs.reduce(function(a2, b3) {
|
|
163825
|
+
return Math.min(a2, b3);
|
|
163826
|
+
});
|
|
163827
|
+
}, "min");
|
|
163828
|
+
var max2 = /* @__PURE__ */ __name(function max3(xs) {
|
|
163829
|
+
return xs.reduce(function(a2, b3) {
|
|
163830
|
+
return Math.max(a2, b3);
|
|
163831
|
+
});
|
|
163832
|
+
}, "max");
|
|
163833
|
+
var sumBy = /* @__PURE__ */ __name(function sumBy2(xs, f2) {
|
|
163834
|
+
return xs.reduce(function(a2, b3) {
|
|
163835
|
+
return a2 + f2(b3);
|
|
163836
|
+
}, 0);
|
|
163837
|
+
}, "sumBy");
|
|
163838
|
+
var minBy = /* @__PURE__ */ __name(function minBy2(xs, f2) {
|
|
163839
|
+
return xs.reduce(function(a2, b3) {
|
|
163840
|
+
return Math.min(a2, f2(b3));
|
|
163841
|
+
}, Infinity);
|
|
163842
|
+
}, "minBy");
|
|
163843
|
+
var maxBy = /* @__PURE__ */ __name(function maxBy2(xs, f2) {
|
|
163844
|
+
return xs.reduce(function(a2, b3) {
|
|
163845
|
+
return Math.max(a2, f2(b3));
|
|
163846
|
+
}, -Infinity);
|
|
163847
|
+
}, "maxBy");
|
|
163848
|
+
var plus = /* @__PURE__ */ __name(function plus2(_ref, _ref3) {
|
|
163849
|
+
var _ref2 = _slicedToArray2(_ref, 2);
|
|
163850
|
+
var a2 = _ref2[0];
|
|
163851
|
+
var b3 = _ref2[1];
|
|
163852
|
+
var _ref32 = _slicedToArray2(_ref3, 2);
|
|
163853
|
+
var c2 = _ref32[0];
|
|
163854
|
+
var d2 = _ref32[1];
|
|
163855
|
+
return [a2 + c2, b3 + d2];
|
|
163856
|
+
}, "plus");
|
|
163857
|
+
var minus = /* @__PURE__ */ __name(function minus2(_ref4, _ref5) {
|
|
163858
|
+
var _ref42 = _slicedToArray2(_ref4, 2);
|
|
163859
|
+
var a2 = _ref42[0];
|
|
163860
|
+
var b3 = _ref42[1];
|
|
163861
|
+
var _ref52 = _slicedToArray2(_ref5, 2);
|
|
163862
|
+
var c2 = _ref52[0];
|
|
163863
|
+
var d2 = _ref52[1];
|
|
163864
|
+
return [a2 - c2, b3 - d2];
|
|
163865
|
+
}, "minus");
|
|
163866
|
+
var times = /* @__PURE__ */ __name(function times2(k2, _ref6) {
|
|
163867
|
+
var _ref62 = _slicedToArray2(_ref6, 2);
|
|
163868
|
+
var a2 = _ref62[0];
|
|
163869
|
+
var b3 = _ref62[1];
|
|
163870
|
+
return [k2 * a2, k2 * b3];
|
|
163871
|
+
}, "times");
|
|
163872
|
+
var length = /* @__PURE__ */ __name(function length2(_ref7) {
|
|
163873
|
+
var _ref72 = _slicedToArray2(_ref7, 2);
|
|
163874
|
+
var a2 = _ref72[0];
|
|
163875
|
+
var b3 = _ref72[1];
|
|
163876
|
+
return Math.sqrt(a2 * a2 + b3 * b3);
|
|
163877
|
+
}, "length");
|
|
163878
|
+
var sumVectors = /* @__PURE__ */ __name(function sumVectors2(xs) {
|
|
163879
|
+
return xs.reduce(plus, [0, 0]);
|
|
163880
|
+
}, "sumVectors");
|
|
163881
|
+
var average = /* @__PURE__ */ __name(function average2(points) {
|
|
163882
|
+
return times(1 / points.length, points.reduce(plus));
|
|
163883
|
+
}, "average");
|
|
163884
|
+
var onCircle = /* @__PURE__ */ __name(function onCircle2(r2, angle2) {
|
|
163885
|
+
return times(r2, [Math.sin(angle2), -Math.cos(angle2)]);
|
|
163886
|
+
}, "onCircle");
|
|
163887
|
+
var enhance = /* @__PURE__ */ __name(function enhance2(compute, curve) {
|
|
163888
|
+
var obj = compute || {};
|
|
163889
|
+
for (var key2 in obj) {
|
|
163890
|
+
var method = obj[key2];
|
|
163891
|
+
curve[key2] = method(curve.index, curve.item, curve.group);
|
|
163892
|
+
}
|
|
163893
|
+
return curve;
|
|
163894
|
+
}, "enhance");
|
|
163895
|
+
var range2 = /* @__PURE__ */ __name(function range3(a2, b3, inclusive) {
|
|
163896
|
+
var result = [];
|
|
163897
|
+
for (var i2 = a2; i2 < b3; i2++) {
|
|
163898
|
+
result.push(i2);
|
|
163899
|
+
}
|
|
163900
|
+
if (inclusive) {
|
|
163901
|
+
result.push(b3);
|
|
163902
|
+
}
|
|
163903
|
+
return result;
|
|
163904
|
+
}, "range");
|
|
163905
|
+
var mapObject = /* @__PURE__ */ __name(function mapObject2(obj, f2) {
|
|
163906
|
+
var result = [];
|
|
163907
|
+
var _iteratorNormalCompletion = true;
|
|
163908
|
+
var _didIteratorError = false;
|
|
163909
|
+
var _iteratorError = void 0;
|
|
163910
|
+
try {
|
|
163911
|
+
for (var _iterator3 = Object.keys(obj)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator3.next()).done); _iteratorNormalCompletion = true) {
|
|
163912
|
+
var k2 = _step.value;
|
|
163913
|
+
var v2 = obj[k2];
|
|
163914
|
+
result.push(f2(k2, v2));
|
|
163915
|
+
}
|
|
163916
|
+
} catch (err2) {
|
|
163917
|
+
_didIteratorError = true;
|
|
163918
|
+
_iteratorError = err2;
|
|
163919
|
+
} finally {
|
|
163920
|
+
try {
|
|
163921
|
+
if (!_iteratorNormalCompletion && _iterator3["return"]) {
|
|
163922
|
+
_iterator3["return"]();
|
|
163923
|
+
}
|
|
163924
|
+
} finally {
|
|
163925
|
+
if (_didIteratorError) {
|
|
163926
|
+
throw _iteratorError;
|
|
163927
|
+
}
|
|
163928
|
+
}
|
|
163929
|
+
}
|
|
163930
|
+
return result;
|
|
163931
|
+
}, "mapObject");
|
|
163932
|
+
var pairs = /* @__PURE__ */ __name(function pairs2(obj) {
|
|
163933
|
+
return mapObject(obj, function(k2, v2) {
|
|
163934
|
+
return [k2, v2];
|
|
163935
|
+
});
|
|
163936
|
+
}, "pairs");
|
|
163937
|
+
var id2 = /* @__PURE__ */ __name(function id3(x2) {
|
|
163938
|
+
return x2;
|
|
163939
|
+
}, "id");
|
|
163940
|
+
exports3.sum = sum2;
|
|
163941
|
+
exports3.min = min2;
|
|
163942
|
+
exports3.max = max2;
|
|
163943
|
+
exports3.sumBy = sumBy;
|
|
163944
|
+
exports3.minBy = minBy;
|
|
163945
|
+
exports3.maxBy = maxBy;
|
|
163946
|
+
exports3.plus = plus;
|
|
163947
|
+
exports3.minus = minus;
|
|
163948
|
+
exports3.times = times;
|
|
163949
|
+
exports3.id = id2;
|
|
163950
|
+
exports3.length = length;
|
|
163951
|
+
exports3.sumVectors = sumVectors;
|
|
163952
|
+
exports3.average = average;
|
|
163953
|
+
exports3.onCircle = onCircle;
|
|
163954
|
+
exports3.enhance = enhance;
|
|
163955
|
+
exports3.range = range2;
|
|
163956
|
+
exports3.mapObject = mapObject;
|
|
163957
|
+
exports3.pairs = pairs;
|
|
163958
|
+
exports3["default"] = {
|
|
163959
|
+
sum: sum2,
|
|
163960
|
+
min: min2,
|
|
163961
|
+
max: max2,
|
|
163962
|
+
sumBy,
|
|
163963
|
+
minBy,
|
|
163964
|
+
maxBy,
|
|
163965
|
+
plus,
|
|
163966
|
+
minus,
|
|
163967
|
+
times,
|
|
163968
|
+
id: id2,
|
|
163969
|
+
length,
|
|
163970
|
+
sumVectors,
|
|
163971
|
+
average,
|
|
163972
|
+
onCircle,
|
|
163973
|
+
enhance,
|
|
163974
|
+
range: range2,
|
|
163975
|
+
mapObject,
|
|
163976
|
+
pairs
|
|
163977
|
+
};
|
|
163978
|
+
})(ops);
|
|
163979
|
+
(function(module2, exports3) {
|
|
163980
|
+
Object.defineProperty(exports3, "__esModule", {
|
|
163981
|
+
value: true
|
|
163982
|
+
});
|
|
163983
|
+
function _interopRequireDefault2(obj) {
|
|
163984
|
+
return obj && obj.__esModule ? obj : { "default": obj };
|
|
163985
|
+
}
|
|
163986
|
+
__name(_interopRequireDefault2, "_interopRequireDefault");
|
|
163987
|
+
function _toConsumableArray2(arr) {
|
|
163988
|
+
if (Array.isArray(arr)) {
|
|
163989
|
+
for (var i2 = 0, arr2 = Array(arr.length); i2 < arr.length; i2++)
|
|
163990
|
+
arr2[i2] = arr[i2];
|
|
163991
|
+
return arr2;
|
|
163992
|
+
} else {
|
|
163993
|
+
return Array.from(arr);
|
|
163994
|
+
}
|
|
163995
|
+
}
|
|
163996
|
+
__name(_toConsumableArray2, "_toConsumableArray");
|
|
163997
|
+
var _path = pathExports;
|
|
163998
|
+
var _path2 = _interopRequireDefault2(_path);
|
|
163999
|
+
var _ops = ops;
|
|
164000
|
+
exports3["default"] = function(_ref) {
|
|
164001
|
+
var _Path$moveto$arc$lineto, _Path$moveto$arc, _Path$moveto, _Path;
|
|
164002
|
+
var center = _ref.center;
|
|
164003
|
+
var r2 = _ref.r;
|
|
164004
|
+
var R2 = _ref.R;
|
|
164005
|
+
var start2 = _ref.start;
|
|
164006
|
+
var end2 = _ref.end;
|
|
164007
|
+
var epsilon = 1e-4;
|
|
164008
|
+
if (Math.abs(end2 - 2 * Math.PI) < epsilon) {
|
|
164009
|
+
end2 = 2 * Math.PI - epsilon;
|
|
164010
|
+
}
|
|
164011
|
+
var a2 = (0, _ops.plus)(center, (0, _ops.onCircle)(R2, start2));
|
|
164012
|
+
var b3 = (0, _ops.plus)(center, (0, _ops.onCircle)(R2, end2));
|
|
164013
|
+
var c2 = (0, _ops.plus)(center, (0, _ops.onCircle)(r2, end2));
|
|
164014
|
+
var d2 = (0, _ops.plus)(center, (0, _ops.onCircle)(r2, start2));
|
|
164015
|
+
var large = end2 - start2 > Math.PI ? 1 : 0;
|
|
164016
|
+
var path2 = (_Path$moveto$arc$lineto = (_Path$moveto$arc = (_Path$moveto = (_Path = (0, _path2["default"])()).moveto.apply(_Path, _toConsumableArray2(a2))).arc.apply(_Path$moveto, [R2, R2, 0, large, 1].concat(_toConsumableArray2(b3)))).lineto.apply(_Path$moveto$arc, _toConsumableArray2(c2))).arc.apply(_Path$moveto$arc$lineto, [r2, r2, 0, large, 0].concat(_toConsumableArray2(d2))).closepath();
|
|
164017
|
+
var midAngle = (start2 + end2) / 2;
|
|
164018
|
+
var midRadius = (r2 + R2) / 2;
|
|
164019
|
+
var centroid = (0, _ops.plus)(center, (0, _ops.onCircle)(midRadius, midAngle));
|
|
164020
|
+
return {
|
|
164021
|
+
path: path2,
|
|
164022
|
+
centroid
|
|
164023
|
+
};
|
|
164024
|
+
};
|
|
164025
|
+
module2.exports = exports3["default"];
|
|
164026
|
+
})(sector$1, sector$1.exports);
|
|
164027
|
+
var sectorExports = sector$1.exports;
|
|
164028
|
+
const sector = /* @__PURE__ */ getDefaultExportFromCjs(sectorExports);
|
|
164029
|
+
function SelectionLayer({
|
|
164030
|
+
isDraggable,
|
|
164031
|
+
selectionLayer: selectionLayer2,
|
|
164032
|
+
sequenceLength,
|
|
164033
|
+
radius,
|
|
164034
|
+
hideTitle,
|
|
164035
|
+
innerRadius,
|
|
164036
|
+
onRightClicked,
|
|
164037
|
+
onClick,
|
|
164038
|
+
index: index2,
|
|
164039
|
+
isProtein: isProtein2
|
|
164040
|
+
}) {
|
|
164041
|
+
const {
|
|
164042
|
+
color: color2,
|
|
164043
|
+
start: start2,
|
|
164044
|
+
end: end2,
|
|
164045
|
+
hideCarets = false,
|
|
164046
|
+
style: style2,
|
|
164047
|
+
className
|
|
164048
|
+
} = selectionLayer2;
|
|
164049
|
+
const { startAngle, endAngle, totalAngle } = getRangeAnglesSpecial(
|
|
164050
|
+
selectionLayer2,
|
|
164051
|
+
sequenceLength
|
|
164052
|
+
);
|
|
164053
|
+
const section = sector({
|
|
164054
|
+
center: [0, 0],
|
|
164055
|
+
//the center is always 0,0 for our annotations :) we rotate later!
|
|
164056
|
+
r: innerRadius,
|
|
164057
|
+
R: radius,
|
|
164058
|
+
start: 0,
|
|
164059
|
+
end: totalAngle
|
|
164060
|
+
});
|
|
164061
|
+
const selectionMessage = getSelectionMessage({
|
|
164062
|
+
sequenceLength,
|
|
164063
|
+
selectionLayer: selectionLayer2,
|
|
164064
|
+
isProtein: isProtein2
|
|
164065
|
+
});
|
|
164066
|
+
const { transform: transform2 } = PositionAnnotationOnCircle({
|
|
164067
|
+
sAngle: startAngle,
|
|
164068
|
+
eAngle: endAngle,
|
|
164069
|
+
height: 0
|
|
164070
|
+
});
|
|
164071
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
164072
|
+
"g",
|
|
164073
|
+
{
|
|
164074
|
+
onContextMenu: (event) => {
|
|
164075
|
+
onRightClicked && onRightClicked({
|
|
164076
|
+
annotation: selectionLayer2,
|
|
164077
|
+
event
|
|
164078
|
+
});
|
|
164079
|
+
},
|
|
164080
|
+
onClick: onClick ? (event) => {
|
|
164081
|
+
onClick({
|
|
164082
|
+
annotation: selectionLayer2,
|
|
164083
|
+
event
|
|
164084
|
+
});
|
|
164085
|
+
} : void 0,
|
|
164086
|
+
key: "veSelectionLayer" + index2,
|
|
164087
|
+
className: "veSelectionLayer " + (className || "")
|
|
164088
|
+
},
|
|
164089
|
+
!hideTitle && /* @__PURE__ */ React$2.createElement("title", null, selectionMessage),
|
|
164090
|
+
/* @__PURE__ */ React$2.createElement(
|
|
164091
|
+
"path",
|
|
164092
|
+
{
|
|
164093
|
+
transform: transform2,
|
|
164094
|
+
className: "selectionLayer",
|
|
164095
|
+
style: __spreadValues({ opacity: 0.3 }, style2),
|
|
164096
|
+
d: section.path.print(),
|
|
164097
|
+
fill: color2
|
|
164098
|
+
}
|
|
164099
|
+
),
|
|
164100
|
+
!hideCarets && /* @__PURE__ */ React$2.createElement(
|
|
164101
|
+
Caret$1,
|
|
164102
|
+
{
|
|
164103
|
+
key: "caret1",
|
|
164104
|
+
className: className + " selectionLayerCaret " + (isDraggable ? draggableClassnames.selectionStart : ""),
|
|
164105
|
+
isSelection: true,
|
|
164106
|
+
onClick: onClick ? noop$4 : preventDefaultStopPropagation,
|
|
164107
|
+
selectionMessage,
|
|
164108
|
+
caretPosition: start2,
|
|
164109
|
+
sequenceLength,
|
|
164110
|
+
innerRadius,
|
|
164111
|
+
outerRadius: radius
|
|
164112
|
+
}
|
|
164113
|
+
),
|
|
164114
|
+
!hideCarets && /* @__PURE__ */ React$2.createElement(
|
|
164115
|
+
Caret$1,
|
|
164116
|
+
{
|
|
164117
|
+
key: "caret2",
|
|
164118
|
+
className: className + " selectionLayerCaret " + (isDraggable ? draggableClassnames.selectionEnd : ""),
|
|
164119
|
+
isSelection: true,
|
|
164120
|
+
onClick: onClick ? noop$4 : preventDefaultStopPropagation,
|
|
164121
|
+
selectionMessage,
|
|
164122
|
+
caretPosition: end2 + 1,
|
|
164123
|
+
sequenceLength,
|
|
164124
|
+
innerRadius,
|
|
164125
|
+
outerRadius: radius
|
|
164126
|
+
}
|
|
164127
|
+
)
|
|
164128
|
+
);
|
|
164129
|
+
}
|
|
164130
|
+
__name(SelectionLayer, "SelectionLayer");
|
|
164131
|
+
const SelectionLayer$1 = pure(SelectionLayer);
|
|
164132
|
+
function Axis({
|
|
164133
|
+
radius,
|
|
164134
|
+
showAxisNumbers,
|
|
164135
|
+
tickMarkHeight = 5,
|
|
164136
|
+
textOffset = 15,
|
|
164137
|
+
ringThickness = 4,
|
|
164138
|
+
zoomLevel
|
|
164139
|
+
}) {
|
|
164140
|
+
const height2 = (ringThickness + (showAxisNumbers ? textOffset + tickMarkHeight : 0)) / zoomLevel;
|
|
164141
|
+
const radiusToUse = showAxisNumbers ? radius + textOffset + tickMarkHeight : radius;
|
|
164142
|
+
const component = /* @__PURE__ */ React$2.createElement("g", { key: "veAxis", className: "veAxis" }, /* @__PURE__ */ React$2.createElement(
|
|
164143
|
+
"circle",
|
|
164144
|
+
{
|
|
164145
|
+
className: "veAxisLine veAxisOuter",
|
|
164146
|
+
key: "circleOuter",
|
|
164147
|
+
r: radiusToUse + ringThickness,
|
|
164148
|
+
style: { fill: "#ffffff00", stroke: "black", strokeWidth: 0.5 }
|
|
164149
|
+
}
|
|
164150
|
+
), /* @__PURE__ */ React$2.createElement(
|
|
164151
|
+
"circle",
|
|
164152
|
+
{
|
|
164153
|
+
className: "veAxisLine veAxisInner",
|
|
164154
|
+
key: "circle",
|
|
164155
|
+
r: radiusToUse,
|
|
164156
|
+
style: { fill: "#ffffff00", stroke: "black", strokeWidth: 0.5 }
|
|
164157
|
+
}
|
|
164158
|
+
));
|
|
164159
|
+
return {
|
|
164160
|
+
component,
|
|
164161
|
+
height: height2
|
|
164162
|
+
};
|
|
164163
|
+
}
|
|
164164
|
+
__name(Axis, "Axis");
|
|
164165
|
+
function CircularPrimer$1({
|
|
164166
|
+
color: color2 = "orange",
|
|
164167
|
+
radius,
|
|
164168
|
+
annotationHeight,
|
|
164169
|
+
totalAngle
|
|
164170
|
+
}) {
|
|
164171
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
164172
|
+
"path",
|
|
164173
|
+
{
|
|
164174
|
+
className: "veOrf",
|
|
164175
|
+
strokeWidth: ".5",
|
|
164176
|
+
stroke: color2,
|
|
164177
|
+
fill: color2,
|
|
164178
|
+
d: drawDirectedPiePiece({
|
|
164179
|
+
radius,
|
|
164180
|
+
annotationHeight,
|
|
164181
|
+
totalAngle,
|
|
164182
|
+
arrowheadLength: 0.4,
|
|
164183
|
+
tailThickness: 0.4
|
|
164184
|
+
}).print()
|
|
164185
|
+
}
|
|
164186
|
+
);
|
|
164187
|
+
}
|
|
164188
|
+
__name(CircularPrimer$1, "CircularPrimer$1");
|
|
164189
|
+
function CircularPrimer(props) {
|
|
164190
|
+
const {
|
|
164191
|
+
color: color2 = "orange",
|
|
164192
|
+
radius,
|
|
164193
|
+
arrowheadLength = 0.5,
|
|
164194
|
+
annotationHeight,
|
|
164195
|
+
totalAngle,
|
|
164196
|
+
id: id2,
|
|
164197
|
+
labelNeedsFlip,
|
|
164198
|
+
ellipsizedName
|
|
164199
|
+
} = props;
|
|
164200
|
+
const [path2, textPath] = drawDirectedPiePiece({
|
|
164201
|
+
radius,
|
|
164202
|
+
annotationHeight,
|
|
164203
|
+
totalAngle,
|
|
164204
|
+
arrowheadLength,
|
|
164205
|
+
tailThickness: 1,
|
|
164206
|
+
//feature specific
|
|
164207
|
+
returnTextPath: true,
|
|
164208
|
+
hasLabel: ellipsizedName,
|
|
164209
|
+
labelNeedsFlip
|
|
164210
|
+
});
|
|
164211
|
+
return /* @__PURE__ */ React$2.createElement(React$2.Fragment, null, getStripedPattern({ color: color2 }), /* @__PURE__ */ React$2.createElement(
|
|
164212
|
+
"path",
|
|
164213
|
+
{
|
|
164214
|
+
className: "vePrimer veCircularViewPrimer",
|
|
164215
|
+
id: id2,
|
|
164216
|
+
strokeWidth: ".5",
|
|
164217
|
+
stroke: "black",
|
|
164218
|
+
fill: "url(#diagonalHatch)",
|
|
164219
|
+
d: path2.print()
|
|
164220
|
+
}
|
|
164221
|
+
), getInternalLabel(__spreadProps(__spreadValues({}, props), { colorToUse: color2, textPath })));
|
|
164222
|
+
}
|
|
164223
|
+
__name(CircularPrimer, "CircularPrimer");
|
|
164224
|
+
function Cutsite({
|
|
164225
|
+
annotationHeight,
|
|
164226
|
+
radius
|
|
164227
|
+
// totalAngle,
|
|
164228
|
+
// ...rest
|
|
164229
|
+
}) {
|
|
164230
|
+
return /* @__PURE__ */ React$2.createElement(
|
|
164231
|
+
"rect",
|
|
164232
|
+
{
|
|
164233
|
+
className: "veCutsite",
|
|
164234
|
+
width: 1,
|
|
164235
|
+
y: -radius - 4,
|
|
164236
|
+
height: annotationHeight
|
|
164237
|
+
}
|
|
164238
|
+
);
|
|
164239
|
+
}
|
|
164240
|
+
__name(Cutsite, "Cutsite");
|
|
164030
164241
|
const style$e = "";
|
|
164031
164242
|
function c(u2, e2, c2) {
|
|
164032
164243
|
var i2 = this, a2 = reactExports.useRef(null), o2 = reactExports.useRef(0), f2 = reactExports.useRef(null), l2 = reactExports.useRef([]), m2 = reactExports.useRef(), v2 = reactExports.useRef(), d2 = reactExports.useRef(u2), p2 = reactExports.useRef(true);
|
|
@@ -170546,7 +170757,7 @@ ${seqDataToCopy}\r
|
|
|
170546
170757
|
scrollbarWidth: "none",
|
|
170547
170758
|
whiteSpace: "nowrap"
|
|
170548
170759
|
},
|
|
170549
|
-
title: name2,
|
|
170760
|
+
"data-title": name2,
|
|
170550
170761
|
key: i2
|
|
170551
170762
|
},
|
|
170552
170763
|
/* @__PURE__ */ React$2.createElement(
|
|
@@ -171346,7 +171557,7 @@ ${seqDataToCopy}\r
|
|
|
171346
171557
|
textOverflow: "ellipsis",
|
|
171347
171558
|
whiteSpace: "nowrap"
|
|
171348
171559
|
},
|
|
171349
|
-
title: this.props.alignmentType || "Unknown Alignment Type"
|
|
171560
|
+
"data-title": this.props.alignmentType || "Unknown Alignment Type"
|
|
171350
171561
|
},
|
|
171351
171562
|
this.props.alignmentType || "Unknown Alignment Type"
|
|
171352
171563
|
)),
|