lido-player 0.0.2-beta-12 → 0.0.2-beta-14

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.
Files changed (37) hide show
  1. package/dist/cjs/{decode-Crs_HEl6.js → decode-BLUeYhas.js} +1 -1
  2. package/dist/cjs/{index-B0mGS0S6.js → index-CNWniNnt.js} +13 -7
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/lido-avatar_22.cjs.entry.js +10 -10
  5. package/dist/collection/components/calculator/lido-calculator.js +4 -4
  6. package/dist/collection/components/home/lido-home.js +1 -1
  7. package/dist/collection/components/keyboard/lido-keyboard.js +1 -1
  8. package/dist/collection/components/shape/lido-shape.css +34 -3
  9. package/dist/collection/components/trace/lido-trace.js +2 -2
  10. package/dist/collection/utils/customEvents.js +2 -0
  11. package/dist/collection/utils/utils.js +9 -5
  12. package/dist/collection/utils/utilsHandlers/animationHandler.js +3 -3
  13. package/dist/collection/utils/utilsHandlers/floatHandler.js +1 -1
  14. package/dist/components/index.js +1 -1
  15. package/dist/components/lido-calculator.js +1 -1
  16. package/dist/components/lido-home.js +1 -1
  17. package/dist/components/lido-keyboard.js +1 -1
  18. package/dist/components/lido-root.js +1 -1
  19. package/dist/components/lido-shape.js +1 -1
  20. package/dist/components/lido-trace.js +1 -1
  21. package/dist/components/{p-BQDV5KnV.js → p-CRzTmKDJ.js} +1 -1
  22. package/dist/components/{p-CAVEAbqc.js → p-CayICx4g.js} +1 -1
  23. package/dist/components/{p-Bzo_dEFM.js → p-CwIlwnQk.js} +1 -1
  24. package/dist/components/p-DaMpzrMk.js +1 -0
  25. package/dist/components/{p-w6P3MDO0.js → p-DbZeFECr.js} +2 -2
  26. package/dist/esm/{decode-Ddbv8H7S.js → decode-DpcU-915.js} +1 -1
  27. package/dist/esm/{index-Lc0ZIqng.js → index-Dki_0kla.js} +13 -7
  28. package/dist/esm/index.js +1 -1
  29. package/dist/esm/lido-avatar_22.entry.js +10 -10
  30. package/dist/lido-player/index.esm.js +1 -1
  31. package/dist/lido-player/lido-player.esm.js +1 -1
  32. package/dist/lido-player/{p-99a3608f.entry.js → p-476aaf0e.entry.js} +2 -2
  33. package/dist/lido-player/{p-saGcdHVH.js → p-BZv5PD3F.js} +1 -1
  34. package/dist/lido-player/p-pxe3GMFr.js +1 -0
  35. package/package.json +1 -1
  36. package/dist/components/p-BTUmA-7x.js +0 -1
  37. package/dist/lido-player/p-0j7Yo3TF.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0mGS0S6.js');
3
+ var index = require('./index-CNWniNnt.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  m.forEach(function (e) {
@@ -140,6 +140,7 @@ function toSerializableDetail(detail) {
140
140
  function dispatchActivityEndEvent(totalIndex, currentIndex, score, rightMoves, wrongMoves, timeSpentForActivity, lessonTrackingParams, gameCompleted) {
141
141
  dispatchCustomEvent(ActivityEndKey, Object.assign(Object.assign({ currentIndex, totalIndex, score, rightMoves, wrongMoves, timeSpentForActivity }, lessonTrackingParams), { gameCompleted }));
142
142
  dispatchCustomEvent(MicroProblemEndKey, Object.assign(Object.assign({ currentIndex, totalIndex, score, rightMoves, wrongMoves, timeSpentForActivity }, lessonTrackingParams), { gameCompleted }));
143
+ console.log(`[Activity End]Activity ${currentIndex + 1}/${totalIndex} - Time Spent: ${timeSpentForActivity}`);
143
144
  }
144
145
  function dispatchLessonEndEvent(totalIndex, rightMoves, wrongMoves, finalScore, timeSpendForLesson, lessonTrackingParams) {
145
146
  dispatchCustomEvent(MicroLessonEndKey, Object.assign({ totalIndex, rightMoves, wrongMoves, finalScore, score: finalScore, timeSpendForLesson }, lessonTrackingParams));
@@ -147,6 +148,7 @@ function dispatchLessonEndEvent(totalIndex, rightMoves, wrongMoves, finalScore,
147
148
  return;
148
149
  }
149
150
  dispatchCustomEvent(LessonEndKey, Object.assign({ totalIndex, rightMoves, wrongMoves, finalScore, score: finalScore, timeSpendForLesson }, lessonTrackingParams));
151
+ console.log(`[Lesson End] Lesson: ${lessonTrackingParams === null || lessonTrackingParams === void 0 ? void 0 : lessonTrackingParams.lessonName} (${lessonTrackingParams === null || lessonTrackingParams === void 0 ? void 0 : lessonTrackingParams.lessonId}) - Total Time Spent: ${timeSpendForLesson}`);
150
152
  }
151
153
  function dispatchNextContainerEvent() {
152
154
  dispatchCustomEvent(NextContainerKey, {});
@@ -305,8 +307,8 @@ function dragDropAnimation(container, dragElement, dropElement) {
305
307
  // isCorrect=true;
306
308
  const onCorrect = (container === null || container === void 0 ? void 0 : container.getAttribute('onCorrect')) || '';
307
309
  await executeActions(onCorrect, container);
308
- window.dispatchEvent(new CustomEvent(NextContainerKey));
309
310
  calculateScore();
311
+ triggerNextContainer();
310
312
  tempVanishedValues.length = 0;
311
313
  })();
312
314
  }
@@ -71759,8 +71761,8 @@ async function handleElementClick(element) {
71759
71761
  container.style.pointerEvents = 'none';
71760
71762
  if (!container.getAttribute('game-completed') || container.getAttribute('game-completed') === 'false' || container.getAttribute('game-completed') === null || container.getAttribute('game-completed') === undefined || container.getAttribute('game-completed') === '') {
71761
71763
  container.setAttribute('game-completed', 'true');
71762
- triggerNextContainer();
71763
71764
  calculateScore();
71765
+ triggerNextContainer();
71764
71766
  }
71765
71767
  }
71766
71768
  else {
@@ -73055,11 +73057,12 @@ const storeActivityScore = (score) => {
73055
73057
  const activityScoreKey = index.toString();
73056
73058
  activityScore[activityScoreKey] = score;
73057
73059
  //send Custom Event to parent
73058
- // window.dispatchEvent(new CustomEvent(ActivityEndKey, { detail: { index: index, totalIndex: totalIndex, score: score } }));
73059
- const timeSpendForActivity = Math.floor(Timer.getI().getElapsed() / 1000);
73060
- ACTIVYTY_TIME_SPEND_ARRAY.push(timeSpendForActivity);
73060
+ // window.dispatchEvent(new CustomEvent(ActivityEndKey, { detail: { index: index, totalIndex: totalIndex, score: score } }));
73061
+ const actualActivitySeconds = Math.ceil(Timer.getI().getElapsed() / 1000);
73062
+ ACTIVYTY_TIME_SPEND_ARRAY.push(actualActivitySeconds);
73063
+ console.log(`[Utils][Activity Time] Activity ${index + 1}/${totalIndex} - Time spent: ${actualActivitySeconds}s`);
73061
73064
  const lessonTrackingParams = getLessonTrackingParams();
73062
- dispatchActivityEndEvent(totalIndex, index, score, gameScore.rightMoves, gameScore.wrongMoves, timeSpendForActivity, lessonTrackingParams, true);
73065
+ dispatchActivityEndEvent(totalIndex, index, score, gameScore.rightMoves, gameScore.wrongMoves, actualActivitySeconds, lessonTrackingParams, true);
73063
73066
  localStorage.setItem(ActivityScoreKey, JSON.stringify(activityScore));
73064
73067
  if (totalIndex - 1 == index) {
73065
73068
  const scoresArray = Object.values(activityScore);
@@ -73068,11 +73071,13 @@ const storeActivityScore = (score) => {
73068
73071
  console.log('Total Score : ', gameScore.finalScore);
73069
73072
  // window.dispatchEvent(new CustomEvent(LessonEndKey, { detail: { score: finalScore } }));
73070
73073
  const timeSpendForLesson = ACTIVYTY_TIME_SPEND_ARRAY.reduce((sum, current) => sum + current, 0);
73074
+ console.log(`[Utils][Lesson Time] Total lesson time spent: ${timeSpendForLesson}s`);
73071
73075
  dispatchLessonEndEvent(totalIndex, gameScore.totalRightMovesCount, gameScore.totalWrongMovesCount, finalScore, timeSpendForLesson, lessonTrackingParams);
73072
73076
  gameScore.totalRightMovesCount = 0;
73073
73077
  gameScore.totalWrongMovesCount = 0;
73074
73078
  dispatchGameCompletedEvent();
73075
73079
  localStorage.removeItem(ActivityScoreKey);
73080
+ ACTIVYTY_TIME_SPEND_ARRAY.length = 0;
73076
73081
  }
73077
73082
  };
73078
73083
  const handleShowCheck = () => {
@@ -73117,6 +73122,7 @@ const validateObjectiveStatus = async () => {
73117
73122
  }
73118
73123
  storingEachActivityScore(true);
73119
73124
  storeActivityScore(100);
73125
+ gameScore.totalRightMovesCount++;
73120
73126
  gameScore.rightMoves = 0;
73121
73127
  gameScore.wrongMoves = 0;
73122
73128
  triggerNextContainer();
@@ -73173,8 +73179,8 @@ const validateObjectiveStatus = async () => {
73173
73179
  }
73174
73180
  if (!isContinueOnCorrect) {
73175
73181
  container.setAttribute("game-completed", "true");
73176
- calculateScore();
73177
73182
  await executeActions(onCorrect, container);
73183
+ calculateScore();
73178
73184
  triggerNextContainer();
73179
73185
  }
73180
73186
  else {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-B0mGS0S6.js');
3
+ var index = require('./index-CNWniNnt.js');
4
4
  require('./index-CS8kGcZo.js');
5
5
 
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-CS8kGcZo.js');
4
- var index$1 = require('./index-B0mGS0S6.js');
4
+ var index$1 = require('./index-CNWniNnt.js');
5
5
 
6
6
  var rive$1 = {exports: {}};
7
7
 
@@ -8539,7 +8539,7 @@ const LidoCalculator = class {
8539
8539
  if (!hasScrollAction) {
8540
8540
  if (!isMultiObjective) {
8541
8541
  index$1.calculateScore();
8542
- window.dispatchEvent(new CustomEvent(index$1.NextContainerKey));
8542
+ index$1.triggerNextContainer();
8543
8543
  }
8544
8544
  else {
8545
8545
  const objectives = this.objective.split(',').map(obj => obj.trim());
@@ -8547,7 +8547,7 @@ const LidoCalculator = class {
8547
8547
  if (allSolved) {
8548
8548
  container.setAttribute("game-completed", "true");
8549
8549
  index$1.calculateScore();
8550
- window.dispatchEvent(new CustomEvent(index$1.NextContainerKey));
8550
+ index$1.triggerNextContainer();
8551
8551
  }
8552
8552
  }
8553
8553
  }
@@ -8575,7 +8575,7 @@ const LidoCalculator = class {
8575
8575
  }
8576
8576
  render() {
8577
8577
  const numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '←', '0', 'OK'];
8578
- return (index.h(index.Host, { key: '2468a15e8d76cffb514f96df722fe578ef859f7d', onEntry: this.onEntry, id: "lidoCalculator", style: { width: this.width, height: this.height, backgroundColor: this.bgColor, left: this.x, top: this.y } }, index.h("lido-cell", { key: '702120d00bb5c4b8dd5dd75f0f7c356721873d6b', visible: "true", height: "94px", width: "60px" }, index.h("lido-text", { key: 'e989ec834d9c12037e67719a1107e76622c8285c', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "204%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, index.h("img", { key: '5c202b3dbebf5542d073f6ab344ae677927f9861', src: index$1.convertUrlToRelative(this.penIcon), alt: "pen", style: { width: '100%', height: '100%' } }))), index.h("div", { key: '28062294c543d0fee819a5ac73a29e9d2a6dbe62', class: "lido-calculator-displayParent" }, index.h("div", { key: '1b168648592aba9221c66f1ed1d7bd3a64a3e5d2', class: "lido-calculator-display" }, this.displayValue)), index.h("div", { key: '5503ae1ef2725bf0aa0853b8dbc1f6b9a0f60ec0', class: "lido-calculator-buttons" }, numbers.map((num, i) => (index.h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
8578
+ return (index.h(index.Host, { key: '31b6e68af8ff06dd33c65b47018fb7e39e49a9bf', onEntry: this.onEntry, id: "lidoCalculator", style: { width: this.width, height: this.height, backgroundColor: this.bgColor, left: this.x, top: this.y } }, index.h("lido-cell", { key: '95fdc2b980c2dc020b86409a48fd2605349aba04', visible: "true", height: "94px", width: "60px" }, index.h("lido-text", { key: '85535797b5642a6f44c872ca88807cfbe5f7422f', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "204%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, index.h("img", { key: 'fbe08c53b97fd65a09ad43808184a40024654abb', src: index$1.convertUrlToRelative(this.penIcon), alt: "pen", style: { width: '100%', height: '100%' } }))), index.h("div", { key: 'f4a0fd8e6879013e394467dccd0f8c6f6f41309e', class: "lido-calculator-displayParent" }, index.h("div", { key: 'c132ae40e0cb1f387e6bf2184f51e4f1a750a681', class: "lido-calculator-display" }, this.displayValue)), index.h("div", { key: 'a9e01475d5fba0b54fc62150972ab3e48c4d1cf2', class: "lido-calculator-buttons" }, numbers.map((num, i) => (index.h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
8579
8579
  'lido-calculator-btn-special': num === '←' || num === 'OK',
8580
8580
  'lido-calculator-btn-default': num !== '←' && num !== 'OK'
8581
8581
  }, onClick: () => this.handleClick(num) }))))));
@@ -12829,7 +12829,6 @@ const LidoHome = class {
12829
12829
  this.exitFlag = false;
12830
12830
  if (alertElement) {
12831
12831
  if (comment === 'exit') {
12832
- index$1.dispatchGameExitEvent();
12833
12832
  index$1.AudioPlayer.getI().stop();
12834
12833
  index$1.Timer.getI().stop();
12835
12834
  gameScore.rightMoves = 0;
@@ -12840,6 +12839,7 @@ const LidoHome = class {
12840
12839
  // clearmemoryStorage();
12841
12840
  alertElement.remove();
12842
12841
  this.currentContainerIndex = 0;
12842
+ index$1.dispatchGameExitEvent();
12843
12843
  }
12844
12844
  else {
12845
12845
  alertElement.remove();
@@ -12952,7 +12952,7 @@ const LidoHome = class {
12952
12952
  }
12953
12953
  // Pure-JS fallback (no wasm asset required)
12954
12954
  try {
12955
- const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-Crs_HEl6.js'); }).then(function (n) { return n.decode; });
12955
+ const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-BLUeYhas.js'); }).then(function (n) { return n.decode; });
12956
12956
  const brotliDecompressBuffer = brotliDecodeModule.BrotliDecompressBuffer || ((_a = brotliDecodeModule.default) === null || _a === void 0 ? void 0 : _a.BrotliDecompressBuffer);
12957
12957
  if (typeof brotliDecompressBuffer !== 'function') {
12958
12958
  throw new Error('BrotliDecompressBuffer function not found in brotli/dec/decode');
@@ -16600,10 +16600,10 @@ const LidoKeyboard = class {
16600
16600
  this.numberOfClick++;
16601
16601
  localStorage.removeItem(index$1.SelectedValuesKey);
16602
16602
  if (this.numberOfClick === this.letterLength) {
16603
- index$1.calculateScore();
16604
16603
  const onCorrrect = container.getAttribute('onCorrect');
16605
16604
  container.style.pointerEvents = 'none';
16606
16605
  await index$1.executeActions(onCorrrect, this.el);
16606
+ index$1.calculateScore();
16607
16607
  index$1.triggerNextContainer();
16608
16608
  }
16609
16609
  else {
@@ -17364,7 +17364,7 @@ const LidoRow = class {
17364
17364
  };
17365
17365
  LidoRow.style = lidoRowCss();
17366
17366
 
17367
- const lidoShapeCss = () => `.lido-shape{position:absolute;top:var(--y);left:var(--x);display:var(--display);z-index:var(--z);justify-content:center;align-items:center}.lido-rectangle{border-radius:0}.lido-circle{width:var(--width);height:var(--width);border-radius:50%;background-color:var(--bgColor)}.lido-ellipse{width:var(--width);height:var(--height);border-radius:50%;background-color:var(--bgColor)}.lido-triangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(50% 0%, 100% 100%, 0% 100%)}.lido-rightTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(100% 0%, 100% 100%, 0% 100%)}.lido-leftTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--triangleBgColor);clip-path:polygon(0% 0%, 100% 100%, 0% 100%)}.lido-parallelogram{width:var(--paralleWidth);height:var(--paralleHeight);transform:skew(20deg)}.lido-trapezoid{width:var(--trapezoidWidth);height:var(--trapezoidHeight);background-color:var(--bgColor);clip-path:polygon( 20% 0%, 80% 0%, 100% 100%, 0% 100% )}.lido-hexagon{width:var(--hexagonWidth);height:var(--hexagonHeight);background-color:var(--bgColor);clip-path:polygon( 25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50% )}.lido-cone{width:var(--coneWidth);height:var(--coneHeight);background-color:var(--bgColor);clip-path:polygon( 15% 10%, 25% 4%, 35% 1%, 50% 0%, 65% 1%, 75% 4%, 85% 10%, 50% 100% )}.lido-star{width:var(--starWidth);height:var(--starHeight);background-color:var(--starBgColor);clip-path:polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)}.lido-pentagon{width:var(--pentagonWidth);height:var(--pentagonHeight);background-color:var(--pentagonBgColor);clip-path:polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)}.lido-heptagon{width:var(--heptagonWidth);height:var(--heptagonHeight);background-color:var(--heptagonBgColor);clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}.lido-octagon{width:var(--octagonWidth);height:var(--octagonHeight);background-color:var(--octagonBgColor);clip-path:polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%)}.lido-rhombus{width:var(--rhombusWidth);height:var(--rhombusHeight);background-color:var(--rhombusBgColor);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)}.lido-heart{height:var(--heartHeight);width:var(--heartWidth);border-image:radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;clip-path:polygon(-41% 0, 50% 91%, 141% 0)}.cube{width:100%;height:100%;position:relative;transform-style:preserve-3d;transform:rotateX(-20deg) rotateY(45deg)}.face{position:absolute;width:var(--face-width,150px);height:var(--face-width,150px);background:var(--face-bg-color,150px);box-shadow:inset -20px -20px 40px rgba(0,0,0,0.3)}.front{transform:rotateY( 0deg) translateZ(var(--face-translate, 75px))}.back{transform:rotateY(180deg) translateZ(var(--face-translate, 75px))}.right{transform:rotateY( 90deg) translateZ(var(--face-translate, 75px))}.left{transform:rotateY(-90deg) translateZ(var(--face-translate, 75px))}.top{transform:rotateX( 90deg) translateZ(var(--face-translate, 75px))}.bottom{transform:rotateX(-90deg) translateZ(var(--face-translate, 75px))}.lido-cylinder{width:var(--width);height:var(--height);border-radius:100% / 80px;background:radial-gradient(50% 40px at 50% 40px, #0003 99.99%, #0000 0), radial-gradient(50% 40px at 50% calc(100% - 40px), #fff3 99.99%, #0000 0), red}`;
17367
+ const lidoShapeCss = () => `.lido-shape{position:absolute;top:var(--y);left:var(--x);display:var(--display);z-index:var(--z);justify-content:center;align-items:center}.lido-rectangle{border-radius:0}.lido-circle{width:var(--width);height:var(--width);border-radius:50%;background-color:var(--bgColor)}.lido-ellipse{width:var(--width);height:var(--height);border-radius:50%;background-color:var(--bgColor)}.lido-triangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(50% 0%, 100% 100%, 0% 100%)}.lido-rightTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(100% 0%, 100% 100%, 0% 100%)}.lido-leftTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--triangleBgColor);clip-path:polygon(0% 0%, 100% 100%, 0% 100%)}.lido-parallelogram{width:var(--paralleWidth);height:var(--paralleHeight);transform:skew(20deg)}.lido-trapezium{width:var(--trapeziumWidth);height:var(--trapeziumHeight);background-color:var(--bgColor);clip-path:polygon( 20% 0%, 80% 0%, 100% 100%, 0% 100% )}.lido-hexagon{width:var(--hexagonWidth);height:var(--hexagonHeight);background-color:var(--bgColor);clip-path:polygon( 25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50% )}.lido-cone{width:var(--coneWidth);height:var(--coneHeight);background-color:var(--bgColor);clip-path:polygon( 15% 10%, 25% 4%, 35% 1%, 50% 0%, 65% 1%, 75% 4%, 85% 10%, 50% 100% )}.lido-star{width:var(--starWidth);height:var(--starHeight);background-color:var(--starBgColor);clip-path:polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)}.lido-pentagon{width:var(--pentagonWidth);height:var(--pentagonHeight);background-color:var(--pentagonBgColor);clip-path:polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)}.lido-heptagon{width:var(--heptagonWidth);height:var(--heptagonHeight);background-color:var(--heptagonBgColor);clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}.lido-octagon{width:var(--octagonWidth);height:var(--octagonHeight);background-color:var(--octagonBgColor);clip-path:polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%)}.lido-rhombus{width:var(--rhombusWidth);height:var(--rhombusHeight);background-color:var(--rhombusBgColor);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)}.lido-heart{height:var(--heartHeight);width:var(--heartWidth);border-image:radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;clip-path:polygon(-41% 0, 50% 91%, 141% 0)}.cube{width:100%;height:100%;position:relative;transform-style:preserve-3d;transform:rotateX(-20deg) rotateY(45deg)}.face{position:absolute;width:var(--face-width,150px);height:var(--face-width,150px);background:var(--face-bg-color,150px);box-shadow:inset -20px -20px 40px rgba(0,0,0,0.3)}.front{transform:rotateY( 0deg) translateZ(var(--face-translate, 75px))}.back{transform:rotateY(180deg) translateZ(var(--face-translate, 75px))}.right{transform:rotateY( 90deg) translateZ(var(--face-translate, 75px))}.left{transform:rotateY(-90deg) translateZ(var(--face-translate, 75px))}.top{transform:rotateX( 90deg) translateZ(var(--face-translate, 75px))}.bottom{transform:rotateX(-90deg) translateZ(var(--face-translate, 75px))}.lido-cylinder{width:var(--width);height:var(--height);border-radius:100% / 80px;background:radial-gradient(50% 40px at 50% 40px, #0003 99.99%, #0000 0), radial-gradient(50% 40px at 50% calc(100% - 40px), #fff3 99.99%, #0000 0), red}.lido-sphere{position:relative;width:var(--width);height:var(--width);border-radius:50%;background:radial-gradient(circle at 30% 18%, #22d4ff 0%, #18c2f4 9%, rgba(24, 194, 244, 0.2) 18%, transparent 30%), radial-gradient(circle at 36% 26%, #0f8fff 0%, #0b67e6 30%, #083fbe 62%, #120084 100%);box-shadow:inset -22px -26px 40px rgba(5, 0, 70, 0.38), inset 14px 14px 24px rgba(255, 255, 255, 0.05), 0 4px 2px rgba(0, 0, 0, 0.78);overflow:visible}.lido-sphere::after{content:'';position:absolute;top:50%;left:50%;width:100%;height:16%;border-radius:50%;border-top:2px dashed rgba(0, 0, 0, 0.65);border-bottom:3px solid rgba(0, 0, 0, 0.85);box-sizing:border-box;transform:translate(-50%, -50%);pointer-events:none}`;
17368
17368
 
17369
17369
  const LidoShape = class {
17370
17370
  constructor(hostRef) {
@@ -18798,13 +18798,13 @@ const LidoTrace = class {
18798
18798
  }
18799
18799
  return;
18800
18800
  }
18801
- index$1.calculateScore();
18802
18801
  const container = document.querySelector(index$1.LidoContainer);
18803
18802
  const containerOnCorrect = container.getAttribute("onCorrect");
18804
18803
  if (container && containerOnCorrect) {
18805
18804
  await new Promise(resolve => setTimeout(resolve, delay));
18806
18805
  await index$1.executeActions(containerOnCorrect, this.el);
18807
18806
  }
18807
+ index$1.calculateScore();
18808
18808
  index$1.triggerNextContainer();
18809
18809
  }
18810
18810
  // Get the pointer position relative to the SVG
@@ -19076,7 +19076,7 @@ const LidoTrace = class {
19076
19076
  };
19077
19077
  }
19078
19078
  render() {
19079
- return (index.h(index.Host, { key: '4b222cb2258577dded95e977943898a4a4514ff4', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, index.h("div", { key: 'a6decd11c691dda6528c927b1a01a05bdf5e56d9', style: this.style, id: "lido-svgContainer" })));
19079
+ return (index.h(index.Host, { key: '89c30e4e8be379c026c6b241e240e343df91ec7c', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, index.h("div", { key: '0d7c35704f98084d7c6b571d653f9a578d4011e2', style: this.style, id: "lido-svgContainer" })));
19080
19080
  }
19081
19081
  static get assetsDirs() { return ["svg", "images"]; }
19082
19082
  get el() { return index.getElement(this); }
@@ -1,6 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { executeActions, equationCheck, storingEachActivityScore, calculateScore, triggerNextContainer, convertUrlToRelative } from "../../utils/utils";
3
- import { NextContainerKey, SelectedValuesKey, CalculatorOk } from "../../utils/constants";
3
+ import { SelectedValuesKey, CalculatorOk } from "../../utils/constants";
4
4
  import { AudioPlayer } from "../../utils/audioPlayer";
5
5
  export class LidoCalculator {
6
6
  constructor() {
@@ -146,7 +146,7 @@ export class LidoCalculator {
146
146
  if (!hasScrollAction) {
147
147
  if (!isMultiObjective) {
148
148
  calculateScore();
149
- window.dispatchEvent(new CustomEvent(NextContainerKey));
149
+ triggerNextContainer();
150
150
  }
151
151
  else {
152
152
  const objectives = this.objective.split(',').map(obj => obj.trim());
@@ -154,7 +154,7 @@ export class LidoCalculator {
154
154
  if (allSolved) {
155
155
  container.setAttribute("game-completed", "true");
156
156
  calculateScore();
157
- window.dispatchEvent(new CustomEvent(NextContainerKey));
157
+ triggerNextContainer();
158
158
  }
159
159
  }
160
160
  }
@@ -182,7 +182,7 @@ export class LidoCalculator {
182
182
  }
183
183
  render() {
184
184
  const numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '←', '0', 'OK'];
185
- return (h(Host, { key: '2468a15e8d76cffb514f96df722fe578ef859f7d', onEntry: this.onEntry, id: "lidoCalculator", style: { width: this.width, height: this.height, backgroundColor: this.bgColor, left: this.x, top: this.y } }, h("lido-cell", { key: '702120d00bb5c4b8dd5dd75f0f7c356721873d6b', visible: "true", height: "94px", width: "60px" }, h("lido-text", { key: 'e989ec834d9c12037e67719a1107e76622c8285c', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "204%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, h("img", { key: '5c202b3dbebf5542d073f6ab344ae677927f9861', src: convertUrlToRelative(this.penIcon), alt: "pen", style: { width: '100%', height: '100%' } }))), h("div", { key: '28062294c543d0fee819a5ac73a29e9d2a6dbe62', class: "lido-calculator-displayParent" }, h("div", { key: '1b168648592aba9221c66f1ed1d7bd3a64a3e5d2', class: "lido-calculator-display" }, this.displayValue)), h("div", { key: '5503ae1ef2725bf0aa0853b8dbc1f6b9a0f60ec0', class: "lido-calculator-buttons" }, numbers.map((num, i) => (h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
185
+ return (h(Host, { key: '31b6e68af8ff06dd33c65b47018fb7e39e49a9bf', onEntry: this.onEntry, id: "lidoCalculator", style: { width: this.width, height: this.height, backgroundColor: this.bgColor, left: this.x, top: this.y } }, h("lido-cell", { key: '95fdc2b980c2dc020b86409a48fd2605349aba04', visible: "true", height: "94px", width: "60px" }, h("lido-text", { key: '85535797b5642a6f44c872ca88807cfbe5f7422f', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "204%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, h("img", { key: 'fbe08c53b97fd65a09ad43808184a40024654abb', src: convertUrlToRelative(this.penIcon), alt: "pen", style: { width: '100%', height: '100%' } }))), h("div", { key: 'f4a0fd8e6879013e394467dccd0f8c6f6f41309e', class: "lido-calculator-displayParent" }, h("div", { key: 'c132ae40e0cb1f387e6bf2184f51e4f1a750a681', class: "lido-calculator-display" }, this.displayValue)), h("div", { key: 'a9e01475d5fba0b54fc62150972ab3e48c4d1cf2', class: "lido-calculator-buttons" }, numbers.map((num, i) => (h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
186
186
  'lido-calculator-btn-special': num === '←' || num === 'OK',
187
187
  'lido-calculator-btn-default': num !== '←' && num !== 'OK'
188
188
  }, onClick: () => this.handleClick(num) }))))));
@@ -192,7 +192,6 @@ export class LidoHome {
192
192
  this.exitFlag = false;
193
193
  if (alertElement) {
194
194
  if (comment === 'exit') {
195
- dispatchGameExitEvent();
196
195
  AudioPlayer.getI().stop();
197
196
  Timer.getI().stop();
198
197
  gameScore.rightMoves = 0;
@@ -203,6 +202,7 @@ export class LidoHome {
203
202
  // clearmemoryStorage();
204
203
  alertElement.remove();
205
204
  this.currentContainerIndex = 0;
205
+ dispatchGameExitEvent();
206
206
  }
207
207
  else {
208
208
  alertElement.remove();
@@ -71,10 +71,10 @@ export class LidoKeyboard {
71
71
  this.numberOfClick++;
72
72
  localStorage.removeItem(SelectedValuesKey);
73
73
  if (this.numberOfClick === this.letterLength) {
74
- calculateScore();
75
74
  const onCorrrect = container.getAttribute('onCorrect');
76
75
  container.style.pointerEvents = 'none';
77
76
  await executeActions(onCorrrect, this.el);
77
+ calculateScore();
78
78
  triggerNextContainer();
79
79
  }
80
80
  else {
@@ -55,9 +55,9 @@
55
55
  transform: skew(20deg);
56
56
  }
57
57
 
58
- .lido-trapezoid {
59
- width: var(--trapezoidWidth);
60
- height: var(--trapezoidHeight);
58
+ .lido-trapezium {
59
+ width: var(--trapeziumWidth);
60
+ height: var(--trapeziumHeight);
61
61
  background-color: var(--bgColor);
62
62
  clip-path: polygon(
63
63
  20% 0%, /* top left */
@@ -183,4 +183,35 @@
183
183
  radial-gradient(50% 40px at 50% 40px, #0003 99.99%, #0000 0),
184
184
  radial-gradient(50% 40px at 50% calc(100% - 40px), #fff3 99.99%, #0000 0),
185
185
  red;
186
+ }
187
+
188
+ /* sphere */
189
+ .lido-sphere {
190
+ position: relative;
191
+ width: var(--width);
192
+ height: var(--width);
193
+ border-radius: 50%;
194
+ background:
195
+ radial-gradient(circle at 30% 18%, #22d4ff 0%, #18c2f4 9%, rgba(24, 194, 244, 0.2) 18%, transparent 30%),
196
+ radial-gradient(circle at 36% 26%, #0f8fff 0%, #0b67e6 30%, #083fbe 62%, #120084 100%);
197
+ box-shadow:
198
+ inset -22px -26px 40px rgba(5, 0, 70, 0.38),
199
+ inset 14px 14px 24px rgba(255, 255, 255, 0.05),
200
+ 0 4px 2px rgba(0, 0, 0, 0.78);
201
+ overflow: visible;
202
+ }
203
+
204
+ .lido-sphere::after {
205
+ content: '';
206
+ position: absolute;
207
+ top: 50%;
208
+ left: 50%;
209
+ width: 100%;
210
+ height: 16%;
211
+ border-radius: 50%;
212
+ border-top: 2px dashed rgba(0, 0, 0, 0.65);
213
+ border-bottom: 3px solid rgba(0, 0, 0, 0.85);
214
+ box-sizing: border-box;
215
+ transform: translate(-50%, -50%);
216
+ pointer-events: none;
186
217
  }
@@ -769,13 +769,13 @@ export class LidoTrace {
769
769
  }
770
770
  return;
771
771
  }
772
- calculateScore();
773
772
  const container = document.querySelector(LidoContainer);
774
773
  const containerOnCorrect = container.getAttribute("onCorrect");
775
774
  if (container && containerOnCorrect) {
776
775
  await new Promise(resolve => setTimeout(resolve, delay));
777
776
  await executeActions(containerOnCorrect, this.el);
778
777
  }
778
+ calculateScore();
779
779
  triggerNextContainer();
780
780
  }
781
781
  // Get the pointer position relative to the SVG
@@ -1047,7 +1047,7 @@ export class LidoTrace {
1047
1047
  };
1048
1048
  }
1049
1049
  render() {
1050
- return (h(Host, { key: '4b222cb2258577dded95e977943898a4a4514ff4', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, h("div", { key: 'a6decd11c691dda6528c927b1a01a05bdf5e56d9', style: this.style, id: "lido-svgContainer" })));
1050
+ return (h(Host, { key: '89c30e4e8be379c026c6b241e240e343df91ec7c', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, h("div", { key: '0d7c35704f98084d7c6b571d653f9a578d4011e2', style: this.style, id: "lido-svgContainer" })));
1051
1051
  }
1052
1052
  static get is() { return "lido-trace"; }
1053
1053
  static get originalStyleUrls() {
@@ -24,6 +24,7 @@ function toSerializableDetail(detail) {
24
24
  export function dispatchActivityEndEvent(totalIndex, currentIndex, score, rightMoves, wrongMoves, timeSpentForActivity, lessonTrackingParams, gameCompleted) {
25
25
  dispatchCustomEvent(ActivityEndKey, Object.assign(Object.assign({ currentIndex, totalIndex, score, rightMoves, wrongMoves, timeSpentForActivity }, lessonTrackingParams), { gameCompleted }));
26
26
  dispatchCustomEvent(MicroProblemEndKey, Object.assign(Object.assign({ currentIndex, totalIndex, score, rightMoves, wrongMoves, timeSpentForActivity }, lessonTrackingParams), { gameCompleted }));
27
+ console.log(`[Activity End]Activity ${currentIndex + 1}/${totalIndex} - Time Spent: ${timeSpentForActivity}`);
27
28
  }
28
29
  export function dispatchLessonEndEvent(totalIndex, rightMoves, wrongMoves, finalScore, timeSpendForLesson, lessonTrackingParams) {
29
30
  dispatchCustomEvent(MicroLessonEndKey, Object.assign({ totalIndex, rightMoves, wrongMoves, finalScore, score: finalScore, timeSpendForLesson }, lessonTrackingParams));
@@ -31,6 +32,7 @@ export function dispatchLessonEndEvent(totalIndex, rightMoves, wrongMoves, final
31
32
  return;
32
33
  }
33
34
  dispatchCustomEvent(LessonEndKey, Object.assign({ totalIndex, rightMoves, wrongMoves, finalScore, score: finalScore, timeSpendForLesson }, lessonTrackingParams));
35
+ console.log(`[Lesson End] Lesson: ${lessonTrackingParams === null || lessonTrackingParams === void 0 ? void 0 : lessonTrackingParams.lessonName} (${lessonTrackingParams === null || lessonTrackingParams === void 0 ? void 0 : lessonTrackingParams.lessonId}) - Total Time Spent: ${timeSpendForLesson}`);
34
36
  }
35
37
  export function dispatchNextContainerEvent() {
36
38
  dispatchCustomEvent(NextContainerKey, {});
@@ -702,11 +702,12 @@ const storeActivityScore = (score) => {
702
702
  const activityScoreKey = index.toString();
703
703
  activityScore[activityScoreKey] = score;
704
704
  //send Custom Event to parent
705
- // window.dispatchEvent(new CustomEvent(ActivityEndKey, { detail: { index: index, totalIndex: totalIndex, score: score } }));
706
- const timeSpendForActivity = Math.floor(Timer.getI().getElapsed() / 1000);
707
- ACTIVYTY_TIME_SPEND_ARRAY.push(timeSpendForActivity);
705
+ // window.dispatchEvent(new CustomEvent(ActivityEndKey, { detail: { index: index, totalIndex: totalIndex, score: score } }));
706
+ const actualActivitySeconds = Math.ceil(Timer.getI().getElapsed() / 1000);
707
+ ACTIVYTY_TIME_SPEND_ARRAY.push(actualActivitySeconds);
708
+ console.log(`[Utils][Activity Time] Activity ${index + 1}/${totalIndex} - Time spent: ${actualActivitySeconds}s`);
708
709
  const lessonTrackingParams = getLessonTrackingParams();
709
- dispatchActivityEndEvent(totalIndex, index, score, gameScore.rightMoves, gameScore.wrongMoves, timeSpendForActivity, lessonTrackingParams, true);
710
+ dispatchActivityEndEvent(totalIndex, index, score, gameScore.rightMoves, gameScore.wrongMoves, actualActivitySeconds, lessonTrackingParams, true);
710
711
  localStorage.setItem(ActivityScoreKey, JSON.stringify(activityScore));
711
712
  if (totalIndex - 1 == index) {
712
713
  const scoresArray = Object.values(activityScore);
@@ -715,11 +716,13 @@ const storeActivityScore = (score) => {
715
716
  console.log('Total Score : ', gameScore.finalScore);
716
717
  // window.dispatchEvent(new CustomEvent(LessonEndKey, { detail: { score: finalScore } }));
717
718
  const timeSpendForLesson = ACTIVYTY_TIME_SPEND_ARRAY.reduce((sum, current) => sum + current, 0);
719
+ console.log(`[Utils][Lesson Time] Total lesson time spent: ${timeSpendForLesson}s`);
718
720
  dispatchLessonEndEvent(totalIndex, gameScore.totalRightMovesCount, gameScore.totalWrongMovesCount, finalScore, timeSpendForLesson, lessonTrackingParams);
719
721
  gameScore.totalRightMovesCount = 0;
720
722
  gameScore.totalWrongMovesCount = 0;
721
723
  dispatchGameCompletedEvent();
722
724
  localStorage.removeItem(ActivityScoreKey);
725
+ ACTIVYTY_TIME_SPEND_ARRAY.length = 0;
723
726
  }
724
727
  };
725
728
  export const handleShowCheck = () => {
@@ -765,6 +768,7 @@ export const validateObjectiveStatus = async () => {
765
768
  }
766
769
  storingEachActivityScore(true);
767
770
  storeActivityScore(100);
771
+ gameScore.totalRightMovesCount++;
768
772
  gameScore.rightMoves = 0;
769
773
  gameScore.wrongMoves = 0;
770
774
  triggerNextContainer();
@@ -821,8 +825,8 @@ export const validateObjectiveStatus = async () => {
821
825
  }
822
826
  if (!isContinueOnCorrect) {
823
827
  container.setAttribute("game-completed", "true");
824
- calculateScore();
825
828
  await executeActions(onCorrect, container);
829
+ calculateScore();
826
830
  triggerNextContainer();
827
831
  }
828
832
  else {
@@ -1,5 +1,5 @@
1
- import { NextContainerKey, SelectedValuesKey } from "../constants";
2
- import { calculateScore, executeActions } from "../utils";
1
+ import { SelectedValuesKey } from "../constants";
2
+ import { calculateScore, executeActions, triggerNextContainer } from "../utils";
3
3
  const tempVanishedValues = [];
4
4
  export function dragDropAnimation(container, dragElement, dropElement) {
5
5
  container.style.pointerEvents = "none";
@@ -47,8 +47,8 @@ export function dragDropAnimation(container, dragElement, dropElement) {
47
47
  // isCorrect=true;
48
48
  const onCorrect = (container === null || container === void 0 ? void 0 : container.getAttribute('onCorrect')) || '';
49
49
  await executeActions(onCorrect, container);
50
- window.dispatchEvent(new CustomEvent(NextContainerKey));
51
50
  calculateScore();
51
+ triggerNextContainer();
52
52
  tempVanishedValues.length = 0;
53
53
  })();
54
54
  }
@@ -29,8 +29,8 @@ export async function handleElementClick(element) {
29
29
  container.style.pointerEvents = 'none';
30
30
  if (!container.getAttribute('game-completed') || container.getAttribute('game-completed') === 'false' || container.getAttribute('game-completed') === null || container.getAttribute('game-completed') === undefined || container.getAttribute('game-completed') === '') {
31
31
  container.setAttribute('game-completed', 'true');
32
- triggerNextContainer();
33
32
  calculateScore();
33
+ triggerNextContainer();
34
34
  }
35
35
  }
36
36
  else {