lido-player 0.0.2-alpha-53-dev → 0.0.2-alpha-55-dev
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/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/lido-avatar_22.cjs.entry.js +4 -2
- package/dist/cjs/{utils-3c1ce74e.js → utils-4b44610b.js} +23 -2
- package/dist/collection/components/calculator/lido-calculator.js +4 -2
- package/dist/collection/utils/customEvents.js +1 -0
- package/dist/collection/utils/utils.js +2 -0
- package/dist/collection/utils/utilsHandlers/animationHandler.js +21 -1
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +0 -2
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-balance.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.js +1 -1
- package/dist/components/lido-cell.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-flash-card.js +1 -1
- package/dist/components/lido-float.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-image.js +1 -1
- package/dist/components/lido-keyboard.js +1 -1
- package/dist/components/lido-math-matrix.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +22 -22
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.js +1 -1
- package/dist/components/lido-slide-fill.js +1 -1
- package/dist/components/lido-text.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/lido-wrap.js +1 -1
- package/dist/components/{p-b3e67e7f.js → p-0be6b5d5.js} +1 -1
- package/dist/components/{p-df1af62c.js → p-2c518dbe.js} +1 -1
- package/dist/components/{p-92b9ae9e.js → p-2e023f67.js} +1 -1
- package/dist/components/{p-511377d2.js → p-36c2e21a.js} +23 -3
- package/dist/components/{p-cca545f9.js → p-3fc01453.js} +1 -1
- package/dist/components/{p-875c1411.js → p-43d79c61.js} +1 -1
- package/dist/components/{p-9ea1a67d.js → p-5078599e.js} +1 -1
- package/dist/components/{p-09b3b152.js → p-590ce2c9.js} +1 -1
- package/dist/components/{p-567983a9.js → p-67a24ad4.js} +2 -2
- package/dist/components/{p-3f0e4436.js → p-72d6a594.js} +1 -1
- package/dist/components/{p-004adc43.js → p-73b2bd74.js} +6 -4
- package/dist/components/{p-8774f517.js → p-9acf0fcc.js} +1 -1
- package/dist/components/{p-90f7dd48.js → p-b095de27.js} +1 -1
- package/dist/components/{p-057fb7b8.js → p-b0dbee97.js} +21 -21
- package/dist/components/{p-3e8ae1c5.js → p-b847f269.js} +1 -1
- package/dist/components/{p-71ded596.js → p-bc5202db.js} +2 -2
- package/dist/components/{p-d2fe2bb6.js → p-c296051d.js} +1 -1
- package/dist/components/{p-6beee44b.js → p-c69ef266.js} +1 -1
- package/dist/components/{p-d568d595.js → p-ca8aea4b.js} +1 -1
- package/dist/components/{p-561908ec.js → p-de2193c5.js} +1 -1
- package/dist/components/{p-23549651.js → p-e534ea52.js} +1 -1
- package/dist/components/{p-0733b277.js → p-f8c00485.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +4 -2
- package/dist/esm/{utils-eefe4a1c.js → utils-ae1eb036.js} +23 -3
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-589fc3b8.js → p-a632e2ce.js} +2 -2
- package/dist/lido-player/p-f1b879f6.entry.js +1 -0
- package/package.json +1 -1
- package/dist/lido-player/p-4d9ad047.entry.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-baff5c15.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-4b44610b.js');
|
|
7
7
|
|
|
8
8
|
var rive = {exports: {}};
|
|
9
9
|
|
|
@@ -6835,10 +6835,12 @@ const LidoCalculator = class {
|
|
|
6835
6835
|
await utils.executeActions(onCorrect, container);
|
|
6836
6836
|
if (onCorrect.includes('scrollCellAfterEquationSolved')) {
|
|
6837
6837
|
if (this.objective.length === 0) {
|
|
6838
|
+
utils.calculateScore();
|
|
6838
6839
|
window.dispatchEvent(new CustomEvent(utils.NextContainerKey));
|
|
6839
6840
|
}
|
|
6840
6841
|
}
|
|
6841
6842
|
else {
|
|
6843
|
+
utils.calculateScore();
|
|
6842
6844
|
window.dispatchEvent(new CustomEvent(utils.NextContainerKey));
|
|
6843
6845
|
}
|
|
6844
6846
|
}
|
|
@@ -6851,7 +6853,7 @@ const LidoCalculator = class {
|
|
|
6851
6853
|
}
|
|
6852
6854
|
render() {
|
|
6853
6855
|
const numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '←', '0', 'OK'];
|
|
6854
|
-
return (index.h(index.Host, { key: '
|
|
6856
|
+
return (index.h(index.Host, { key: '394177b08965252a6008cce3284475c6176eca3d', 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: '1c79a951e666ad4171b686400f0ba391783e693f', visible: "true", height: "94px", width: "60px" }, index.h("lido-text", { key: '70da4a0990c7ae72367f8d61026c1d4e6f682d48', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "176%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, index.h("img", { key: 'c510e7f1cc6ec5d34683030fff988054ac721225', src: this.penIcon, alt: "pen", style: { width: '100%', height: '100%' } }))), index.h("div", { key: '790d7bd307e296cc8e05e29705ebf4bfdda49906', class: "lido-calculator-displayParent" }, index.h("div", { key: 'f0195ce772bffdee06483da524f8a392dffdde38', class: "lido-calculator-display" }, this.displayValue)), index.h("div", { key: '00fda79dab52a801acafe6006db0dd50923ea74b', class: "lido-calculator-buttons" }, numbers.map((num, i) => (index.h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
|
|
6855
6857
|
'lido-calculator-btn-special': num === '←' || num === 'OK',
|
|
6856
6858
|
'lido-calculator-btn-default': num !== '←' && num !== 'OK'
|
|
6857
6859
|
}, onClick: () => this.handleClick(num) }))))));
|
|
@@ -53,6 +53,7 @@ const speakUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/pub
|
|
|
53
53
|
const fingerUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Tracing-hand.svg';
|
|
54
54
|
|
|
55
55
|
function dispatchCustomEvent(eventName, detail) {
|
|
56
|
+
console.log("👍Event Name : ", eventName, "Detail : ", detail.toString());
|
|
56
57
|
const event = new CustomEvent(eventName, { detail });
|
|
57
58
|
window.dispatchEvent(event);
|
|
58
59
|
}
|
|
@@ -226,9 +227,11 @@ function balanceResult(container, objectiveString) {
|
|
|
226
227
|
return res;
|
|
227
228
|
}
|
|
228
229
|
|
|
230
|
+
const tempVanishedValues = [];
|
|
229
231
|
function dragDropAnimation(container, dragElement, dropElement) {
|
|
230
|
-
container.style.pointerEvents =
|
|
232
|
+
container.style.pointerEvents = "none";
|
|
231
233
|
setTimeout(() => {
|
|
234
|
+
var _a, _b, _c;
|
|
232
235
|
const div = document.createElement('div');
|
|
233
236
|
container.append(div);
|
|
234
237
|
div.classList.add('after-drop-popup-container');
|
|
@@ -237,6 +240,11 @@ function dragDropAnimation(container, dragElement, dropElement) {
|
|
|
237
240
|
const allDragElements = container.querySelectorAll('[type="drag"]');
|
|
238
241
|
const dragParents = Array.from(allDragElements).map(el => el.parentElement);
|
|
239
242
|
const allSameParent = dragParents.every(parent => parent === dragElement.parentElement);
|
|
243
|
+
JSON.parse((_a = container.getAttribute(SelectedValuesKey)) !== null && _a !== void 0 ? _a : '[]');
|
|
244
|
+
const vanishedValue = (_b = dragElement.getAttribute('value')) !== null && _b !== void 0 ? _b : (_c = dragElement.textContent) === null || _c === void 0 ? void 0 : _c.trim();
|
|
245
|
+
if (vanishedValue) {
|
|
246
|
+
tempVanishedValues.push(vanishedValue);
|
|
247
|
+
}
|
|
240
248
|
// Remove from old parents
|
|
241
249
|
if (allSameParent) {
|
|
242
250
|
dragElement.remove();
|
|
@@ -260,6 +268,17 @@ function dragDropAnimation(container, dragElement, dropElement) {
|
|
|
260
268
|
setTimeout(() => {
|
|
261
269
|
div.remove();
|
|
262
270
|
container.style.pointerEvents = 'auto';
|
|
271
|
+
const objective = container.getAttribute('objective');
|
|
272
|
+
if (objective && tempVanishedValues.map(v => v.trim()).sort().join(',') === objective.split(',').map(v => v.trim()).sort().join(',')) {
|
|
273
|
+
(async () => {
|
|
274
|
+
// isCorrect=true;
|
|
275
|
+
const onCorrect = (container === null || container === void 0 ? void 0 : container.getAttribute('onCorrect')) || '';
|
|
276
|
+
await executeActions(onCorrect, container);
|
|
277
|
+
window.dispatchEvent(new CustomEvent(NextContainerKey));
|
|
278
|
+
calculateScore();
|
|
279
|
+
tempVanishedValues.length = 0;
|
|
280
|
+
})();
|
|
281
|
+
}
|
|
263
282
|
}, 800); // match animation duration
|
|
264
283
|
}, 2000); // stay for 2 seconds
|
|
265
284
|
}, 250);
|
|
@@ -968,7 +987,6 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
968
987
|
dispatchElementDropEvent(dragElement, dropElement, isCorrect);
|
|
969
988
|
// storingEachActivityScore(isCorrect);
|
|
970
989
|
dragElement.style.opacity = '1';
|
|
971
|
-
await onActivityComplete(dragElement, dropElement);
|
|
972
990
|
const allDropElements = document.querySelectorAll('.drop-element');
|
|
973
991
|
allDropElements.forEach(el => updateDropBorder(el));
|
|
974
992
|
await onActivityComplete(dragElement, dropElement);
|
|
@@ -69056,6 +69074,8 @@ async function onActivityComplete(dragElement, dropElement) {
|
|
|
69056
69074
|
await executeActions("this.alignMatch='true'", dropElement, dragElement);
|
|
69057
69075
|
if (dragElement && dropElement) {
|
|
69058
69076
|
const isCorrect = dropElement['value'].toLowerCase().includes(dragElement['value'].toLowerCase());
|
|
69077
|
+
// storing each activity score based on isCorrect for (all drag-drop events)
|
|
69078
|
+
storingEachActivityScore(isCorrect);
|
|
69059
69079
|
if (isCorrect) {
|
|
69060
69080
|
const onCorrect = dropElement.getAttribute('onCorrect');
|
|
69061
69081
|
if (onCorrect) {
|
|
@@ -69886,6 +69906,7 @@ exports.RiveService = RiveService;
|
|
|
69886
69906
|
exports.SelectedValuesKey = SelectedValuesKey;
|
|
69887
69907
|
exports.attachSpeakIcon = attachSpeakIcon;
|
|
69888
69908
|
exports.calculateScale = calculateScale;
|
|
69909
|
+
exports.calculateScore = calculateScore;
|
|
69889
69910
|
exports.commonjsGlobal = commonjsGlobal;
|
|
69890
69911
|
exports.convertUrlToRelative = convertUrlToRelative;
|
|
69891
69912
|
exports.dispatchActivityChangeEvent = dispatchActivityChangeEvent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { executeActions, equationCheck, storingEachActivityScore } from "../../utils/utils";
|
|
2
|
+
import { executeActions, equationCheck, storingEachActivityScore, calculateScore } from "../../utils/utils";
|
|
3
3
|
import { NextContainerKey } from "../../utils/constants";
|
|
4
4
|
export class LidoCalculator {
|
|
5
5
|
constructor() {
|
|
@@ -101,10 +101,12 @@ export class LidoCalculator {
|
|
|
101
101
|
await executeActions(onCorrect, container);
|
|
102
102
|
if (onCorrect.includes('scrollCellAfterEquationSolved')) {
|
|
103
103
|
if (this.objective.length === 0) {
|
|
104
|
+
calculateScore();
|
|
104
105
|
window.dispatchEvent(new CustomEvent(NextContainerKey));
|
|
105
106
|
}
|
|
106
107
|
}
|
|
107
108
|
else {
|
|
109
|
+
calculateScore();
|
|
108
110
|
window.dispatchEvent(new CustomEvent(NextContainerKey));
|
|
109
111
|
}
|
|
110
112
|
}
|
|
@@ -117,7 +119,7 @@ export class LidoCalculator {
|
|
|
117
119
|
}
|
|
118
120
|
render() {
|
|
119
121
|
const numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '←', '0', 'OK'];
|
|
120
|
-
return (h(Host, { key: '
|
|
122
|
+
return (h(Host, { key: '394177b08965252a6008cce3284475c6176eca3d', 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: '1c79a951e666ad4171b686400f0ba391783e693f', visible: "true", height: "94px", width: "60px" }, h("lido-text", { key: '70da4a0990c7ae72367f8d61026c1d4e6f682d48', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "176%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, h("img", { key: 'c510e7f1cc6ec5d34683030fff988054ac721225', src: this.penIcon, alt: "pen", style: { width: '100%', height: '100%' } }))), h("div", { key: '790d7bd307e296cc8e05e29705ebf4bfdda49906', class: "lido-calculator-displayParent" }, h("div", { key: 'f0195ce772bffdee06483da524f8a392dffdde38', class: "lido-calculator-display" }, this.displayValue)), h("div", { key: '00fda79dab52a801acafe6006db0dd50923ea74b', class: "lido-calculator-buttons" }, numbers.map((num, i) => (h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
|
|
121
123
|
'lido-calculator-btn-special': num === '←' || num === 'OK',
|
|
122
124
|
'lido-calculator-btn-default': num !== '←' && num !== 'OK'
|
|
123
125
|
}, onClick: () => this.handleClick(num) }))))));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ActivityChangeKey, ActivityEndKey, ElementClickKey, ElementDropKey, GameCompletedKey, GameExitKey, LessonEndKey, NextContainerKey, PrevContainerKey } from "./constants";
|
|
2
2
|
function dispatchCustomEvent(eventName, detail) {
|
|
3
|
+
console.log("👍Event Name : ", eventName, "Detail : ", detail.toString());
|
|
3
4
|
const event = new CustomEvent(eventName, { detail });
|
|
4
5
|
window.dispatchEvent(event);
|
|
5
6
|
}
|
|
@@ -575,6 +575,8 @@ export async function onActivityComplete(dragElement, dropElement) {
|
|
|
575
575
|
await executeActions("this.alignMatch='true'", dropElement, dragElement);
|
|
576
576
|
if (dragElement && dropElement) {
|
|
577
577
|
const isCorrect = dropElement['value'].toLowerCase().includes(dragElement['value'].toLowerCase());
|
|
578
|
+
// storing each activity score based on isCorrect for (all drag-drop events)
|
|
579
|
+
storingEachActivityScore(isCorrect);
|
|
578
580
|
if (isCorrect) {
|
|
579
581
|
const onCorrect = dropElement.getAttribute('onCorrect');
|
|
580
582
|
if (onCorrect) {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { NextContainerKey, SelectedValuesKey } from "../constants";
|
|
2
|
+
import { calculateScore, executeActions } from "../utils";
|
|
3
|
+
const tempVanishedValues = [];
|
|
1
4
|
export function dragDropAnimation(container, dragElement, dropElement) {
|
|
2
|
-
container.style.pointerEvents =
|
|
5
|
+
container.style.pointerEvents = "none";
|
|
3
6
|
setTimeout(() => {
|
|
7
|
+
var _a, _b, _c;
|
|
4
8
|
const div = document.createElement('div');
|
|
5
9
|
container.append(div);
|
|
6
10
|
div.classList.add('after-drop-popup-container');
|
|
@@ -9,6 +13,11 @@ export function dragDropAnimation(container, dragElement, dropElement) {
|
|
|
9
13
|
const allDragElements = container.querySelectorAll('[type="drag"]');
|
|
10
14
|
const dragParents = Array.from(allDragElements).map(el => el.parentElement);
|
|
11
15
|
const allSameParent = dragParents.every(parent => parent === dragElement.parentElement);
|
|
16
|
+
const selectedValues = JSON.parse((_a = container.getAttribute(SelectedValuesKey)) !== null && _a !== void 0 ? _a : '[]');
|
|
17
|
+
const vanishedValue = (_b = dragElement.getAttribute('value')) !== null && _b !== void 0 ? _b : (_c = dragElement.textContent) === null || _c === void 0 ? void 0 : _c.trim();
|
|
18
|
+
if (vanishedValue) {
|
|
19
|
+
tempVanishedValues.push(vanishedValue);
|
|
20
|
+
}
|
|
12
21
|
// Remove from old parents
|
|
13
22
|
if (allSameParent) {
|
|
14
23
|
dragElement.remove();
|
|
@@ -32,6 +41,17 @@ export function dragDropAnimation(container, dragElement, dropElement) {
|
|
|
32
41
|
setTimeout(() => {
|
|
33
42
|
div.remove();
|
|
34
43
|
container.style.pointerEvents = 'auto';
|
|
44
|
+
const objective = container.getAttribute('objective');
|
|
45
|
+
if (objective && tempVanishedValues.map(v => v.trim()).sort().join(',') === objective.split(',').map(v => v.trim()).sort().join(',')) {
|
|
46
|
+
(async () => {
|
|
47
|
+
// isCorrect=true;
|
|
48
|
+
const onCorrect = (container === null || container === void 0 ? void 0 : container.getAttribute('onCorrect')) || '';
|
|
49
|
+
await executeActions(onCorrect, container);
|
|
50
|
+
window.dispatchEvent(new CustomEvent(NextContainerKey));
|
|
51
|
+
calculateScore();
|
|
52
|
+
tempVanishedValues.length = 0;
|
|
53
|
+
})();
|
|
54
|
+
}
|
|
35
55
|
}, 800); // match animation duration
|
|
36
56
|
}, 2000); // stay for 2 seconds
|
|
37
57
|
}, 250);
|
|
@@ -490,7 +490,6 @@ export function handleResetDragElement(dragElement, dropElement, dropHasDrag, se
|
|
|
490
490
|
});
|
|
491
491
|
handleShowCheck();
|
|
492
492
|
}
|
|
493
|
-
const tempVanishedValues = [];
|
|
494
493
|
export async function onElementDropComplete(dragElement, dropElement) {
|
|
495
494
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
496
495
|
const container = document.getElementById(LidoContainer);
|
|
@@ -717,7 +716,6 @@ export async function onElementDropComplete(dragElement, dropElement) {
|
|
|
717
716
|
dispatchElementDropEvent(dragElement, dropElement, isCorrect);
|
|
718
717
|
// storingEachActivityScore(isCorrect);
|
|
719
718
|
dragElement.style.opacity = '1';
|
|
720
|
-
await onActivityComplete(dragElement, dropElement);
|
|
721
719
|
const allDropElements = document.querySelectorAll('.drop-element');
|
|
722
720
|
allDropElements.forEach(el => updateDropBorder(el));
|
|
723
721
|
await onActivityComplete(dragElement, dropElement);
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-
|
|
1
|
+
export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-36c2e21a.js';
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-36c2e21a.js';
|
|
2
2
|
import { i as instance } from './p-73e3f0f4.js';
|
|
3
|
-
import { d as defineCustomElement$m } from './p-
|
|
4
|
-
import { d as defineCustomElement$l } from './p-
|
|
5
|
-
import { d as defineCustomElement$k } from './p-
|
|
6
|
-
import { d as defineCustomElement$j } from './p-
|
|
7
|
-
import { d as defineCustomElement$i } from './p-
|
|
8
|
-
import { d as defineCustomElement$h } from './p-
|
|
9
|
-
import { d as defineCustomElement$g } from './p-
|
|
10
|
-
import { d as defineCustomElement$f } from './p-
|
|
11
|
-
import { d as defineCustomElement$e } from './p-
|
|
12
|
-
import { d as defineCustomElement$d } from './p-
|
|
13
|
-
import { d as defineCustomElement$c } from './p-
|
|
14
|
-
import { d as defineCustomElement$b } from './p-
|
|
15
|
-
import { d as defineCustomElement$a } from './p-
|
|
16
|
-
import { d as defineCustomElement$9 } from './p-
|
|
17
|
-
import { d as defineCustomElement$8 } from './p-
|
|
18
|
-
import { d as defineCustomElement$7 } from './p-
|
|
19
|
-
import { d as defineCustomElement$6 } from './p-
|
|
20
|
-
import { d as defineCustomElement$5 } from './p-
|
|
21
|
-
import { d as defineCustomElement$4 } from './p-
|
|
22
|
-
import { d as defineCustomElement$3 } from './p-
|
|
23
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$m } from './p-2c518dbe.js';
|
|
4
|
+
import { d as defineCustomElement$l } from './p-590ce2c9.js';
|
|
5
|
+
import { d as defineCustomElement$k } from './p-73b2bd74.js';
|
|
6
|
+
import { d as defineCustomElement$j } from './p-67a24ad4.js';
|
|
7
|
+
import { d as defineCustomElement$i } from './p-c296051d.js';
|
|
8
|
+
import { d as defineCustomElement$h } from './p-72d6a594.js';
|
|
9
|
+
import { d as defineCustomElement$g } from './p-5078599e.js';
|
|
10
|
+
import { d as defineCustomElement$f } from './p-9acf0fcc.js';
|
|
11
|
+
import { d as defineCustomElement$e } from './p-ca8aea4b.js';
|
|
12
|
+
import { d as defineCustomElement$d } from './p-b0dbee97.js';
|
|
13
|
+
import { d as defineCustomElement$c } from './p-c69ef266.js';
|
|
14
|
+
import { d as defineCustomElement$b } from './p-bc5202db.js';
|
|
15
|
+
import { d as defineCustomElement$a } from './p-e534ea52.js';
|
|
16
|
+
import { d as defineCustomElement$9 } from './p-3fc01453.js';
|
|
17
|
+
import { d as defineCustomElement$8 } from './p-43d79c61.js';
|
|
18
|
+
import { d as defineCustomElement$7 } from './p-de2193c5.js';
|
|
19
|
+
import { d as defineCustomElement$6 } from './p-f8c00485.js';
|
|
20
|
+
import { d as defineCustomElement$5 } from './p-b095de27.js';
|
|
21
|
+
import { d as defineCustomElement$4 } from './p-0be6b5d5.js';
|
|
22
|
+
import { d as defineCustomElement$3 } from './p-b847f269.js';
|
|
23
|
+
import { d as defineCustomElement$2 } from './p-2e023f67.js';
|
|
24
24
|
|
|
25
25
|
const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
|
|
26
26
|
constructor() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement,
|
|
1
|
+
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, t as attachSpeakIcon, e as convertUrlToRelative, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
import { i as instance } from './p-73e3f0f4.js';
|
|
3
3
|
|
|
4
4
|
const lidoTextCss = ".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.text-letters{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-letters.letter-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-letter-bounce 0.4s}.text-words{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-words.word-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-word-bounce 0.4s}@keyframes text-letter-bounce{0%{transform:scale(1)}60%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes text-word-bounce{0%{transform:scale(1)}60%{transform:scale(1.3)}100%{transform:scale(1)}}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as commonjsGlobal, p as proxyCustomElement, H, g as getAssetPath, d as setVisibilityWithDelay, i as initEventsForElement, e as convertUrlToRelative, h, j as Host, R as RiveService } from './p-
|
|
1
|
+
import { c as commonjsGlobal, p as proxyCustomElement, H, g as getAssetPath, d as setVisibilityWithDelay, i as initEventsForElement, e as convertUrlToRelative, h, j as Host, R as RiveService } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
var rive = {exports: {}};
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement,
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoWrapCss = ".lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;background-color:var(--child-bg-color, #f0f0f0);box-sizing:border-box}.lido-flex{display:flex;flex-wrap:wrap;align-content:flex-start;gap:10px}";
|
|
4
4
|
const LidoWrapStyle0 = lidoWrapCss;
|
|
@@ -1418,6 +1418,7 @@ const speakUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/pub
|
|
|
1418
1418
|
const fingerUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Tracing-hand.svg';
|
|
1419
1419
|
|
|
1420
1420
|
function dispatchCustomEvent(eventName, detail) {
|
|
1421
|
+
console.log("👍Event Name : ", eventName, "Detail : ", detail.toString());
|
|
1421
1422
|
const event = new CustomEvent(eventName, { detail });
|
|
1422
1423
|
window.dispatchEvent(event);
|
|
1423
1424
|
}
|
|
@@ -1665,9 +1666,11 @@ function balanceResult(container, objectiveString) {
|
|
|
1665
1666
|
return res;
|
|
1666
1667
|
}
|
|
1667
1668
|
|
|
1669
|
+
const tempVanishedValues = [];
|
|
1668
1670
|
function dragDropAnimation(container, dragElement, dropElement) {
|
|
1669
|
-
container.style.pointerEvents =
|
|
1671
|
+
container.style.pointerEvents = "none";
|
|
1670
1672
|
setTimeout(() => {
|
|
1673
|
+
var _a, _b, _c;
|
|
1671
1674
|
const div = document.createElement('div');
|
|
1672
1675
|
container.append(div);
|
|
1673
1676
|
div.classList.add('after-drop-popup-container');
|
|
@@ -1676,6 +1679,11 @@ function dragDropAnimation(container, dragElement, dropElement) {
|
|
|
1676
1679
|
const allDragElements = container.querySelectorAll('[type="drag"]');
|
|
1677
1680
|
const dragParents = Array.from(allDragElements).map(el => el.parentElement);
|
|
1678
1681
|
const allSameParent = dragParents.every(parent => parent === dragElement.parentElement);
|
|
1682
|
+
JSON.parse((_a = container.getAttribute(SelectedValuesKey)) !== null && _a !== void 0 ? _a : '[]');
|
|
1683
|
+
const vanishedValue = (_b = dragElement.getAttribute('value')) !== null && _b !== void 0 ? _b : (_c = dragElement.textContent) === null || _c === void 0 ? void 0 : _c.trim();
|
|
1684
|
+
if (vanishedValue) {
|
|
1685
|
+
tempVanishedValues.push(vanishedValue);
|
|
1686
|
+
}
|
|
1679
1687
|
// Remove from old parents
|
|
1680
1688
|
if (allSameParent) {
|
|
1681
1689
|
dragElement.remove();
|
|
@@ -1699,6 +1707,17 @@ function dragDropAnimation(container, dragElement, dropElement) {
|
|
|
1699
1707
|
setTimeout(() => {
|
|
1700
1708
|
div.remove();
|
|
1701
1709
|
container.style.pointerEvents = 'auto';
|
|
1710
|
+
const objective = container.getAttribute('objective');
|
|
1711
|
+
if (objective && tempVanishedValues.map(v => v.trim()).sort().join(',') === objective.split(',').map(v => v.trim()).sort().join(',')) {
|
|
1712
|
+
(async () => {
|
|
1713
|
+
// isCorrect=true;
|
|
1714
|
+
const onCorrect = (container === null || container === void 0 ? void 0 : container.getAttribute('onCorrect')) || '';
|
|
1715
|
+
await executeActions(onCorrect, container);
|
|
1716
|
+
window.dispatchEvent(new CustomEvent(NextContainerKey));
|
|
1717
|
+
calculateScore();
|
|
1718
|
+
tempVanishedValues.length = 0;
|
|
1719
|
+
})();
|
|
1720
|
+
}
|
|
1702
1721
|
}, 800); // match animation duration
|
|
1703
1722
|
}, 2000); // stay for 2 seconds
|
|
1704
1723
|
}, 250);
|
|
@@ -2407,7 +2426,6 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
2407
2426
|
dispatchElementDropEvent(dragElement, dropElement, isCorrect);
|
|
2408
2427
|
// storingEachActivityScore(isCorrect);
|
|
2409
2428
|
dragElement.style.opacity = '1';
|
|
2410
|
-
await onActivityComplete(dragElement, dropElement);
|
|
2411
2429
|
const allDropElements = document.querySelectorAll('.drop-element');
|
|
2412
2430
|
allDropElements.forEach(el => updateDropBorder(el));
|
|
2413
2431
|
await onActivityComplete(dragElement, dropElement);
|
|
@@ -70495,6 +70513,8 @@ async function onActivityComplete(dragElement, dropElement) {
|
|
|
70495
70513
|
await executeActions("this.alignMatch='true'", dropElement, dragElement);
|
|
70496
70514
|
if (dragElement && dropElement) {
|
|
70497
70515
|
const isCorrect = dropElement['value'].toLowerCase().includes(dragElement['value'].toLowerCase());
|
|
70516
|
+
// storing each activity score based on isCorrect for (all drag-drop events)
|
|
70517
|
+
storingEachActivityScore(isCorrect);
|
|
70498
70518
|
if (isCorrect) {
|
|
70499
70519
|
const onCorrect = dropElement.getAttribute('onCorrect');
|
|
70500
70520
|
if (onCorrect) {
|
|
@@ -71316,4 +71336,4 @@ const updateCalculatorAnswer = (el) => {
|
|
|
71316
71336
|
el.setAttribute('string', value);
|
|
71317
71337
|
};
|
|
71318
71338
|
|
|
71319
|
-
export { ActivityScoreKey as A,
|
|
71339
|
+
export { ActivityScoreKey as A, AudioPlayer as B, generateUUIDFallback as C, exitUrl as D, prevUrl as E, nextUrl as F, speakUrl as G, H, getCancelBtnPopup as I, matchStringPattern as J, triggerNextContainer as K, LidoContainer as L, triggerPrevcontainer as M, NextContainerKey as N, setCancelBtnPopup as O, PrevContainerKey as P, getDefaultExportFromCjs as Q, RiveService as R, SelectedValuesKey as S, tinyColor as T, DropAction as U, validateObjectiveStatus as V, fraction as W, TraceMode as X, speakIcon as Y, fingerUrl as Z, setNonce as a, setPlatformOptions as b, commonjsGlobal as c, setVisibilityWithDelay as d, convertUrlToRelative as e, format as f, getAssetPath$1 as g, h, initEventsForElement as i, Host as j, parseProp as k, createEvent as l, equationCheck as m, storingEachActivityScore as n, executeActions as o, proxyCustomElement as p, calculateScore as q, handlingChildElements as r, setAssetPath as s, attachSpeakIcon as t, calculateScale as u, handleFloatElementPosition as v, handleElementClick as w, dispatchActivityChangeEvent as x, dispatchGameCompletedEvent as y, dispatchGameExitEvent as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoPosCss = ".lido-pos{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);display:flex;justify-content:space-around;flex-direction:column;position:fixed}.lido-pos>*{position:absolute}";
|
|
4
4
|
const LidoPosStyle0 = lidoPosCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H,
|
|
1
|
+
import { p as proxyCustomElement, H, t as attachSpeakIcon, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoRandomCss = ".lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}";
|
|
4
4
|
const LidoRandomStyle0 = lidoRandomCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H,
|
|
1
|
+
import { p as proxyCustomElement, H, u as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
import { i as instance } from './p-73e3f0f4.js';
|
|
3
3
|
|
|
4
4
|
const lidoContainerCss = ".lido-container{position:relative;height:100%;width:100%;background-color:var(--bgColor, transparent);display:flex;flex-direction:column;justify-content:center;align-items:center}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoBalanceCss = "#lido-balance{position:relative;height:500px;width:1205px;top:20%;left:-91px;z-index:0}.lido-balance-symbol{position:absolute;top:64%;left:50%;transform:translate(-50%, -50%);font-size:5vw;font-weight:bold;color:black;pointer-events:none;z-index:999}@media (orientation: portrait){.lido-balance-shadow{height:100px;position:absolute;top:80%;left:28%}}@media (orientation: landscape){.lido-balance-shadow{height:100px;position:absolute;top:90%;left:33%}}@media (orientation: portrait){#pivotimg{position:absolute;height:auto;width:23%;bottom:18%;left:38%;z-index:100}}#pivotimg::after{content:\"\";position:absolute;bottom:-30px;left:50%;transform:translateX(-50%);width:120%;height:60px;background-image:url(\"https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/balancing/Shadow.svg\");background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:none;z-index:10}@media (orientation: landscape){#pivotimg{position:absolute;height:auto;width:23%;bottom:8%;left:38%;z-index:100}}.lido-balance .pivot svg{width:100%;height:auto}#scaleimg{position:absolute;width:73%;height:auto;top:61%;left:14%;z-index:90}.lido-balance .scale svg{width:100%;height:auto}@media (orientation: landscape){#handlerimg{position:absolute;width:35%;height:auto;top:49%;left:2%}}@media (orientation:portrait ){#handlerimg{position:absolute;width:35%;height:auto;top:53%;left:2%}}.lido-balance .handler svg{width:100%;height:auto;fill:brown}@media (orientation: landscape){#handimg{position:absolute;width:35%;height:auto;top:49%;right:2%}}@media (orientation:portrait){#handimg{position:absolute;width:35%;height:auto;top:53%;right:2%}}.lido-balance .hand svg{width:100%;height:auto;fill:brown}.pivot svg path:nth-of-type(1){fill:brown}.pivot svg path[d^=\"M78.9414\"]{fill:white}";
|
|
4
4
|
const LidoBalanceStyle0 = lidoBalanceCss;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, k as parseProp, h, j as Host } from './p-
|
|
2
|
-
import { d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
|
+
import { d as defineCustomElement$1 } from './p-0be6b5d5.js';
|
|
3
3
|
|
|
4
4
|
const lidoCanvasCss = ":host{display:flex;justify-content:center;align-items:center}.lido-canvas{background:red;border:2px solid #ccc;border-radius:8px;display:flex;flex-direction:column;overflow:hidden;position:relative}#lido-exit-button{padding:6px 14px;border:none;background:transparent;color:#fff;border-radius:6px;cursor:pointer;font-size:14px;position:relative;top:-43%;left:18%;z-index:10}canvas{touch-action:none;display:block}";
|
|
5
5
|
const LidoCanvasStyle0 = lidoCanvasCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement,
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, e as convertUrlToRelative, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoColCss = ".lido-col{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);padding:15px;border-radius:10px;display:flex;justify-content:space-around;flex-direction:column;align-items:center}.lido-col>*{}";
|
|
4
4
|
const LidoColStyle0 = lidoColCss;
|