@teselagen/ove 0.8.18 → 0.8.20

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 CHANGED
@@ -8349,6 +8349,15 @@ function baseLt(value, other) {
8349
8349
  return value < other;
8350
8350
  }
8351
8351
  __name(baseLt, "baseLt");
8352
+ function mapValues$1(object3, iteratee) {
8353
+ var result = {};
8354
+ iteratee = baseIteratee(iteratee);
8355
+ baseForOwn(object3, function(value, key, object4) {
8356
+ baseAssignValue(result, key, iteratee(value, key, object4));
8357
+ });
8358
+ return result;
8359
+ }
8360
+ __name(mapValues$1, "mapValues$1");
8352
8361
  function baseExtremum(array2, iteratee, comparator) {
8353
8362
  var index2 = -1, length = array2.length;
8354
8363
  while (++index2 < length) {
@@ -13213,12 +13222,12 @@ var getComputedStyleX;
13213
13222
  if (typeof window !== "undefined") {
13214
13223
  getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;
13215
13224
  }
13216
- function each$2(arr, fn4) {
13225
+ function each(arr, fn4) {
13217
13226
  for (var i = 0; i < arr.length; i++) {
13218
13227
  fn4(arr[i]);
13219
13228
  }
13220
13229
  }
13221
- __name(each$2, "each$2");
13230
+ __name(each, "each");
13222
13231
  function isBorderBoxFn(elem) {
13223
13232
  return getComputedStyleX(elem, "boxSizing") === "border-box";
13224
13233
  }
@@ -13273,7 +13282,7 @@ function isWindow(obj) {
13273
13282
  }
13274
13283
  __name(isWindow, "isWindow");
13275
13284
  var domUtils = {};
13276
- each$2(["Width", "Height"], function(name2) {
13285
+ each(["Width", "Height"], function(name2) {
13277
13286
  domUtils["doc".concat(name2)] = function(refWin) {
13278
13287
  var d2 = refWin.document;
13279
13288
  return Math.max(
@@ -13369,7 +13378,7 @@ function css(el, name2, v2) {
13369
13378
  return getComputedStyleX(el, name2);
13370
13379
  }
13371
13380
  __name(css, "css");
13372
- each$2(["width", "height"], function(name2) {
13381
+ each(["width", "height"], function(name2) {
13373
13382
  var first = name2.charAt(0).toUpperCase() + name2.slice(1);
13374
13383
  domUtils["outer".concat(first)] = function(el, includeMargin) {
13375
13384
  return el && getWHIgnoreDisplay(el, name2, includeMargin ? MARGIN_INDEX : BORDER_INDEX);
@@ -13420,7 +13429,7 @@ var util$2 = _objectSpread2$2({
13420
13429
  }
13421
13430
  }, "offset"),
13422
13431
  isWindow,
13423
- each: each$2,
13432
+ each,
13424
13433
  css,
13425
13434
  clone: /* @__PURE__ */ __name(function clone(obj) {
13426
13435
  var ret = {};
@@ -75209,17 +75218,25 @@ function tidyUpSequenceData(pSeqData, options = {}) {
75209
75218
  });
75210
75219
  if (!noTranslationData) {
75211
75220
  seqData.translations = flatMap(seqData.translations, (translation) => {
75221
+ var _a2, _b2;
75212
75222
  if (noCdsTranslations && translation.translationType === "CDS Feature") {
75213
75223
  return [];
75214
75224
  }
75215
- if (!translation.aminoAcids && !seqData.noSequence) {
75216
- translation.aminoAcids = getAminoAcidDataForEachBaseOfDna(
75225
+ const codonStart = ((_b2 = (_a2 = translation == null ? void 0 : translation.notes) == null ? void 0 : _a2.codon_start) == null ? void 0 : _b2[0]) - 1 || 0;
75226
+ const expandedRange = expandOrContractRangeByLength(
75227
+ translation,
75228
+ -codonStart,
75229
+ true,
75230
+ seqData.sequence.length
75231
+ );
75232
+ if (!expandedRange.aminoAcids && !seqData.noSequence) {
75233
+ expandedRange.aminoAcids = getAminoAcidDataForEachBaseOfDna(
75217
75234
  seqData.sequence,
75218
- translation.forward,
75219
- translation
75235
+ expandedRange.forward,
75236
+ expandedRange
75220
75237
  );
75221
75238
  }
75222
- return translation;
75239
+ return expandedRange;
75223
75240
  });
75224
75241
  }
75225
75242
  if (annotationsAsObjects) {
@@ -84332,6 +84349,160 @@ function calculateNebTm(sequence2, { monovalentCationConc = 0.05, primerConc = 5
84332
84349
  }
84333
84350
  }
84334
84351
  __name(calculateNebTm, "calculateNebTm");
84352
+ const PRIMER3_PARAMS = {
84353
+ saltMonovalent: 50,
84354
+ // mM
84355
+ saltDivalent: 1.5,
84356
+ // mM
84357
+ dntpConc: 0.6,
84358
+ // mM
84359
+ dnaConc: 50,
84360
+ // nM
84361
+ R: 1.987
84362
+ // Gas constant (cal/K·mol)
84363
+ };
84364
+ const SANTA_LUCIA_NN = {
84365
+ AA: { dH: -7.9, dS: -22.2 },
84366
+ TT: { dH: -7.9, dS: -22.2 },
84367
+ AT: { dH: -7.2, dS: -20.4 },
84368
+ TA: { dH: -7.2, dS: -21.3 },
84369
+ CA: { dH: -8.5, dS: -22.7 },
84370
+ TG: { dH: -8.5, dS: -22.7 },
84371
+ GT: { dH: -8.4, dS: -22.4 },
84372
+ AC: { dH: -8.4, dS: -22.4 },
84373
+ CT: { dH: -7.8, dS: -21 },
84374
+ AG: { dH: -7.8, dS: -21 },
84375
+ GA: { dH: -8.2, dS: -22.2 },
84376
+ TC: { dH: -8.2, dS: -22.2 },
84377
+ CG: { dH: -10.6, dS: -27.2 },
84378
+ GC: { dH: -9.8, dS: -24.4 },
84379
+ GG: { dH: -8, dS: -19.9 },
84380
+ CC: { dH: -8, dS: -19.9 }
84381
+ };
84382
+ const SANTA_LUCIA_INIT = {
84383
+ GC: { dH: 0.1, dS: -2.8 },
84384
+ // initiation with terminal GC
84385
+ AT: { dH: 2.3, dS: 4.1 }
84386
+ // initiation with terminal AT
84387
+ };
84388
+ function getEffectiveMonovalentConc() {
84389
+ let effectiveMono = PRIMER3_PARAMS.saltMonovalent;
84390
+ {
84391
+ const freeMg = Math.max(
84392
+ 0,
84393
+ PRIMER3_PARAMS.saltDivalent - PRIMER3_PARAMS.dntpConc
84394
+ );
84395
+ effectiveMono += 120 * Math.sqrt(freeMg);
84396
+ }
84397
+ return effectiveMono;
84398
+ }
84399
+ __name(getEffectiveMonovalentConc, "getEffectiveMonovalentConc");
84400
+ function applySaltCorrection(deltaS, nnPairs) {
84401
+ const effectiveMono = getEffectiveMonovalentConc();
84402
+ return deltaS + 0.368 * nnPairs * Math.log(effectiveMono / 1e3);
84403
+ }
84404
+ __name(applySaltCorrection, "applySaltCorrection");
84405
+ function isValidSequence(sequence2) {
84406
+ return /^[ATGCN]+$/.test(sequence2);
84407
+ }
84408
+ __name(isValidSequence, "isValidSequence");
84409
+ function calculateSantaLuciaTm(sequence2) {
84410
+ try {
84411
+ sequence2 = sequence2 == null ? void 0 : sequence2.toUpperCase().trim();
84412
+ if (!isValidSequence(sequence2)) {
84413
+ throw new Error("Invalid sequence: contains non-DNA characters");
84414
+ }
84415
+ if (sequence2.length < 2) {
84416
+ throw new Error("Sequence too short: minimum length is 2 bases");
84417
+ }
84418
+ let deltaH = 0;
84419
+ let deltaS = 0;
84420
+ for (let i = 0; i < sequence2.length - 1; i++) {
84421
+ const dinucleotide = sequence2.substring(i, i + 2);
84422
+ if (dinucleotide.includes("N")) {
84423
+ continue;
84424
+ }
84425
+ const params = SANTA_LUCIA_NN[dinucleotide];
84426
+ if (params) {
84427
+ deltaH += params.dH;
84428
+ deltaS += params.dS;
84429
+ }
84430
+ }
84431
+ const firstBase = sequence2[0];
84432
+ const lastBase = sequence2[sequence2.length - 1];
84433
+ if (firstBase === "G" || firstBase === "C") {
84434
+ deltaH += SANTA_LUCIA_INIT.GC.dH;
84435
+ deltaS += SANTA_LUCIA_INIT.GC.dS;
84436
+ } else {
84437
+ deltaH += SANTA_LUCIA_INIT.AT.dH;
84438
+ deltaS += SANTA_LUCIA_INIT.AT.dS;
84439
+ }
84440
+ if (lastBase === "G" || lastBase === "C") {
84441
+ deltaH += SANTA_LUCIA_INIT.GC.dH;
84442
+ deltaS += SANTA_LUCIA_INIT.GC.dS;
84443
+ } else {
84444
+ deltaH += SANTA_LUCIA_INIT.AT.dH;
84445
+ deltaS += SANTA_LUCIA_INIT.AT.dS;
84446
+ }
84447
+ const nnPairs = sequence2.length - 1;
84448
+ deltaS = applySaltCorrection(deltaS, nnPairs);
84449
+ const C = PRIMER3_PARAMS.dnaConc * 1e-9;
84450
+ const Tm = deltaH * 1e3 / (deltaS + PRIMER3_PARAMS.R * Math.log(C / 4));
84451
+ return Tm - 273.15;
84452
+ } catch (e) {
84453
+ return `Error calculating Tm for sequence ${sequence2}. ${e}`;
84454
+ }
84455
+ }
84456
+ __name(calculateSantaLuciaTm, "calculateSantaLuciaTm");
84457
+ function calculateEndStability(sequence2) {
84458
+ try {
84459
+ sequence2 = sequence2 == null ? void 0 : sequence2.toUpperCase().trim();
84460
+ if (!isValidSequence(sequence2)) {
84461
+ throw new Error("Invalid sequence: contains non-DNA characters");
84462
+ }
84463
+ if (sequence2.length < 5) {
84464
+ throw new Error(
84465
+ "Sequence too short: minimum length is 5 bases for end stability calculation"
84466
+ );
84467
+ }
84468
+ const last5Bases = sequence2.substring(sequence2.length - 5);
84469
+ let deltaH = 0;
84470
+ let deltaS = 0;
84471
+ for (let i = 0; i < 4; i++) {
84472
+ const dinucleotide = last5Bases.substring(i, i + 2);
84473
+ if (dinucleotide.includes("N")) {
84474
+ continue;
84475
+ }
84476
+ const params = SANTA_LUCIA_NN[dinucleotide];
84477
+ if (params) {
84478
+ deltaH += params.dH;
84479
+ deltaS += params.dS;
84480
+ }
84481
+ }
84482
+ const firstBase = last5Bases[0];
84483
+ const lastBase = last5Bases[last5Bases.length - 1];
84484
+ if (firstBase === "G" || firstBase === "C") {
84485
+ deltaH += SANTA_LUCIA_INIT.GC.dH;
84486
+ deltaS += SANTA_LUCIA_INIT.GC.dS;
84487
+ } else {
84488
+ deltaH += SANTA_LUCIA_INIT.AT.dH;
84489
+ deltaS += SANTA_LUCIA_INIT.AT.dS;
84490
+ }
84491
+ if (lastBase === "G" || lastBase === "C") {
84492
+ deltaH += SANTA_LUCIA_INIT.GC.dH;
84493
+ deltaS += SANTA_LUCIA_INIT.GC.dS;
84494
+ } else {
84495
+ deltaH += SANTA_LUCIA_INIT.AT.dH;
84496
+ deltaS += SANTA_LUCIA_INIT.AT.dS;
84497
+ }
84498
+ const T2 = 310.15;
84499
+ const deltaG = deltaH - T2 * deltaS / 1e3;
84500
+ return Math.round(Math.abs(deltaG) * 100) / 100;
84501
+ } catch (e) {
84502
+ return `Error calculating end stability for sequence ${sequence2}. ${e}`;
84503
+ }
84504
+ }
84505
+ __name(calculateEndStability, "calculateEndStability");
84335
84506
  function convertAACaretPositionOrRangeToDna(rangeOrCaret) {
84336
84507
  if (typeof rangeOrCaret === "object" && rangeOrCaret !== null) {
84337
84508
  return convertAARangeToDnaRange(__spreadProps(__spreadValues({}, rangeOrCaret), {
@@ -97810,32 +97981,6 @@ const orfsSelector = createSelector(
97810
97981
  (state2) => state2.useAdditionalOrfStartCodons,
97811
97982
  findOrfsInPlasmid
97812
97983
  );
97813
- var forEach_1;
97814
- var hasRequiredForEach;
97815
- function requireForEach() {
97816
- if (hasRequiredForEach) return forEach_1;
97817
- hasRequiredForEach = 1;
97818
- var arrayEach2 = require_arrayEach(), baseEach2 = require_baseEach(), castFunction2 = require_castFunction(), isArray2 = requireIsArray();
97819
- function forEach3(collection, iteratee) {
97820
- var func = isArray2(collection) ? arrayEach2 : baseEach2;
97821
- return func(collection, castFunction2(iteratee));
97822
- }
97823
- __name(forEach3, "forEach");
97824
- forEach_1 = forEach3;
97825
- return forEach_1;
97826
- }
97827
- __name(requireForEach, "requireForEach");
97828
- var each$1;
97829
- var hasRequiredEach;
97830
- function requireEach() {
97831
- if (hasRequiredEach) return each$1;
97832
- hasRequiredEach = 1;
97833
- each$1 = requireForEach();
97834
- return each$1;
97835
- }
97836
- __name(requireEach, "requireEach");
97837
- var eachExports = requireEach();
97838
- const each = /* @__PURE__ */ getDefaultExportFromCjs(eachExports);
97839
97984
  function translationsRawSelector(sequenceData2) {
97840
97985
  return sequenceData2.translations;
97841
97986
  }
@@ -98002,14 +98147,22 @@ function translationsSelector(isCircular, translationSearchMatches, sequence2, o
98002
98147
  },
98003
98148
  {}
98004
98149
  ));
98005
- each(translationsToPass, function(translation) {
98006
- translation.aminoAcids = getAminoAcidDataForEachBaseOfDna(
98150
+ return mapValues$1(translationsToPass, (translation) => {
98151
+ var _a2, _b2;
98152
+ const codonStart = ((_b2 = (_a2 = translation == null ? void 0 : translation.notes) == null ? void 0 : _a2.codon_start) == null ? void 0 : _b2[0]) - 1 || 0;
98153
+ const expandedRange = expandOrContractRangeByLength(
98154
+ translation,
98155
+ -codonStart,
98156
+ true,
98157
+ sequence2.length
98158
+ );
98159
+ expandedRange.aminoAcids = getAminoAcidDataForEachBaseOfDna(
98007
98160
  sequence2,
98008
- translation.forward,
98009
- translation
98161
+ expandedRange.forward,
98162
+ expandedRange
98010
98163
  );
98164
+ return expandedRange;
98011
98165
  });
98012
- return translationsToPass;
98013
98166
  }
98014
98167
  __name(translationsSelector, "translationsSelector");
98015
98168
  const translationsSelector$1 = createSelector(
@@ -109885,6 +110038,21 @@ function Orf(props) {
109885
110038
  );
109886
110039
  }
109887
110040
  __name(Orf, "Orf");
110041
+ var forEach_1;
110042
+ var hasRequiredForEach;
110043
+ function requireForEach() {
110044
+ if (hasRequiredForEach) return forEach_1;
110045
+ hasRequiredForEach = 1;
110046
+ var arrayEach2 = require_arrayEach(), baseEach2 = require_baseEach(), castFunction2 = require_castFunction(), isArray2 = requireIsArray();
110047
+ function forEach3(collection, iteratee) {
110048
+ var func = isArray2(collection) ? arrayEach2 : baseEach2;
110049
+ return func(collection, castFunction2(iteratee));
110050
+ }
110051
+ __name(forEach3, "forEach");
110052
+ forEach_1 = forEach3;
110053
+ return forEach_1;
110054
+ }
110055
+ __name(requireForEach, "requireForEach");
109888
110056
  var forEachExports = requireForEach();
109889
110057
  const forEach2 = /* @__PURE__ */ getDefaultExportFromCjs(forEachExports);
109890
110058
  var lib = {};
@@ -116640,7 +116808,7 @@ function showFileDialog({ multiple = false, onSelect }) {
116640
116808
  input.click();
116641
116809
  }
116642
116810
  __name(showFileDialog, "showFileDialog");
116643
- const version = "0.8.17";
116811
+ const version = "0.8.19";
116644
116812
  const packageJson = {
116645
116813
  version
116646
116814
  };
@@ -124292,6 +124460,7 @@ const __LinearView = class __LinearView extends React.Component {
124292
124460
  RowItem$1,
124293
124461
  __spreadProps(__spreadValues({}, __spreadValues(__spreadProps(__spreadValues({}, rest), {
124294
124462
  editorName,
124463
+ showAminoAcidUnitAsCodon,
124295
124464
  onScroll: /* @__PURE__ */ __name(() => {
124296
124465
  this.easyStore.viewportWidth = width;
124297
124466
  const row = this.linearView.querySelector(".veRowItemWrapper");
@@ -137339,7 +137508,7 @@ function MeltingTemp({
137339
137508
  /* , setMonovalentCationConc */
137340
137509
  ] = React.useState(0.05);
137341
137510
  const [tmType, setTmType] = useTmType();
137342
- let tm = (tmType === "neb_tm" ? calculateNebTm : calculateTm)(sequence2, {
137511
+ let tm = (tmType === "neb_tm" ? calculateNebTm : tmType === "default" ? calculateSantaLuciaTm : calculateTm)(sequence2, {
137343
137512
  monovalentCationConc,
137344
137513
  primerConc
137345
137514
  });
@@ -137364,8 +137533,9 @@ function MeltingTemp({
137364
137533
  {
137365
137534
  label: "Choose Tm Type:",
137366
137535
  options: [
137367
- { value: "default", label: "Default Tm (Breslauer)" },
137368
- { value: "neb_tm", label: "NEB Tm (SantaLucia)" }
137536
+ { value: "default", label: "Santa Lucia (Default)" },
137537
+ { value: "breslauer", label: "Breslauer" },
137538
+ { value: "neb_tm", label: "NEB Tm" }
137369
137539
  ],
137370
137540
  onChange: /* @__PURE__ */ __name((e) => setTmType(e.target.value), "onChange"),
137371
137541
  selectedValue: tmType
@@ -137379,7 +137549,7 @@ function MeltingTemp({
137379
137549
  }
137380
137550
  ), hasWarning, /* @__PURE__ */ React.createElement("br", null), /* @__PURE__ */ React.createElement("br", null), "Try using the Default Tm"))
137381
137551
  },
137382
- /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InnerWrapper, null, "Melting Temp: ", Number(tm) || 0, " "), hasWarning && /* @__PURE__ */ React.createElement(
137552
+ /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(InnerWrapper, null, "Melting Temp: ", Number(tm) || 0, "°C"), hasWarning && /* @__PURE__ */ React.createElement(
137383
137553
  core.Icon,
137384
137554
  {
137385
137555
  style: { marginLeft: 5, marginRight: 5 },
@@ -137643,12 +137813,24 @@ const RenderBases = /* @__PURE__ */ __name((props) => {
137643
137813
  )), /* @__PURE__ */ React.createElement(
137644
137814
  MeltingTemp,
137645
137815
  {
137646
- InnerWrapper: InnerWrapperMeltingTemp,
137816
+ InnerWrapper: TextInnerWrapper,
137647
137817
  sequence: bases
137648
137818
  }
137649
- ))
137819
+ ), /* @__PURE__ */ React.createElement(TextInnerWrapper, null, "GC content: ", bases && calculatePercentGC(bases).toFixed(1), "%"), /* @__PURE__ */ React.createElement(TextInnerWrapper, null, "3' Stability: ", bases && calculateEndStability(bases), " kcal/mol"))
137650
137820
  );
137651
137821
  }, "RenderBases");
137822
+ const TextInnerWrapper = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React.createElement(
137823
+ "div",
137824
+ {
137825
+ className: "bp3-text-muted bp3-text-small",
137826
+ style: {
137827
+ marginBottom: 15,
137828
+ marginTop: -5,
137829
+ fontStyle: "italic"
137830
+ }
137831
+ },
137832
+ p2.children
137833
+ ), "TextInnerWrapper");
137652
137834
  const AddOrEditPrimerDialog = AddOrEditAnnotationDialog$1({
137653
137835
  formName: "AddOrEditPrimerDialog",
137654
137836
  getProps: /* @__PURE__ */ __name((props) => ({
@@ -137657,14 +137839,6 @@ const AddOrEditPrimerDialog = AddOrEditAnnotationDialog$1({
137657
137839
  RenderBases
137658
137840
  }), "getProps")
137659
137841
  });
137660
- const InnerWrapperMeltingTemp = /* @__PURE__ */ __name((p2) => /* @__PURE__ */ React.createElement(
137661
- "div",
137662
- {
137663
- className: "bp3-text-muted bp3-text-small",
137664
- style: { marginBottom: 15, marginTop: -5, fontStyle: "italic" }
137665
- },
137666
- p2.children
137667
- ), "InnerWrapperMeltingTemp");
137668
137842
  const Dialogs = {
137669
137843
  RenameSequenceDialog,
137670
137844
  PrintDialog: PrintDialog$1,
@@ -138096,7 +138270,7 @@ const PropertySidePanel = /* @__PURE__ */ __name(({ properties: properties2, set
138096
138270
  item: selection && selection.start > -1 ? /* @__PURE__ */ React.createElement("span", null, selection.start + 1, " - ", selection.end + 1) : /* @__PURE__ */ React.createElement("span", null, "1 - ", isProtein2 ? proteinSize : size),
138097
138271
  title: "Region"
138098
138272
  }
138099
- )), /* @__PURE__ */ React.createElement("h5", null, isProtein2 ? "Amino Acid" : "Base Pair", " Frequencies"), /* @__PURE__ */ React.createElement("div", { className: "sidebar-table" }, /* @__PURE__ */ React.createElement("div", { className: "sidebar-row" }, /* @__PURE__ */ React.createElement("div", { className: "sidebar-cell" }, "Amino Acid"), /* @__PURE__ */ React.createElement("div", { className: "sidebar-cell" }, "Count"), /* @__PURE__ */ React.createElement("div", { className: "sidebar-cell" }, "Percentage")), frequencyEntries.map(([aa, data], idx) => {
138273
+ )), /* @__PURE__ */ React.createElement("h5", null, isProtein2 ? "Amino Acid" : "Base Pair", " Frequencies"), /* @__PURE__ */ React.createElement("div", { className: "sidebar-table" }, /* @__PURE__ */ React.createElement("div", { className: "sidebar-row" }, /* @__PURE__ */ React.createElement("div", { className: "sidebar-cell" }, isProtein2 ? "Amino Acid" : "Base"), /* @__PURE__ */ React.createElement("div", { className: "sidebar-cell" }, "Count"), /* @__PURE__ */ React.createElement("div", { className: "sidebar-cell" }, "Percentage")), frequencyEntries.map(([aa, data], idx) => {
138100
138274
  return /* @__PURE__ */ React.createElement("div", { className: `sidebar-row property-amino-acid-${idx}` }, /* @__PURE__ */ React.createElement("div", { className: "sidebar-cell" }, aa, " ", isProtein2 ? `(${aminoAcidShortNames[aa]})` : ""), /* @__PURE__ */ React.createElement("div", { className: "sidebar-cell" }, data.count), /* @__PURE__ */ React.createElement("div", { className: "sidebar-cell" }, data.percentage.toFixed(1), "%"));
138101
138275
  })));
138102
138276
  } else {
@@ -138596,7 +138770,11 @@ ${seqDataToCopy}\r
138596
138770
  }, [alignmentTracks, id2, store2]);
138597
138771
  React.useEffect(() => {
138598
138772
  const handleAlignmentCopy = /* @__PURE__ */ __name((event) => {
138773
+ var _a3, _b2, _c;
138599
138774
  if (event.key === "c" && !event.shiftKey && (event.metaKey === true || event.ctrlKey === true)) {
138775
+ if (!((_a3 = document.activeElement) == null ? void 0 : _a3.classList.contains("alignmentView"))) {
138776
+ return;
138777
+ }
138600
138778
  const input = document.createElement("textarea");
138601
138779
  document.body.appendChild(input);
138602
138780
  const seqDataToCopy = getAllAlignmentsFastaText();
@@ -138610,6 +138788,8 @@ ${seqDataToCopy}\r
138610
138788
  }
138611
138789
  document.body.removeChild(input);
138612
138790
  event.preventDefault();
138791
+ (_b2 = document.activeElement) == null ? void 0 : _b2.blur();
138792
+ (_c = document.querySelector(".alignmentView")) == null ? void 0 : _c.focus();
138613
138793
  }
138614
138794
  }, "handleAlignmentCopy");
138615
138795
  document.addEventListener("keydown", handleAlignmentCopy);
@@ -139768,6 +139948,7 @@ ${seqDataToCopy}\r
139768
139948
  position: "relative",
139769
139949
  overflowY: "auto"
139770
139950
  }, style2),
139951
+ tabIndex: 0,
139771
139952
  className: "alignmentView"
139772
139953
  },
139773
139954
  /* @__PURE__ */ React.createElement(