lido-player 0.0.2-beta-18-dev → 0.0.2-beta-19-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.
Files changed (229) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{decode-DUZYNXIv.js → decode-Bny56MQ9.js} +1 -1
  3. package/dist/cjs/{index-BEjUmVtH.js → index-BY9fvbr8.js} +137 -64
  4. package/dist/cjs/{index-DnqQXD5x.js → index-DjsCseV8.js} +16 -10
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/lido-avatar_22.cjs.entry.js +33 -33
  7. package/dist/cjs/lido-player.cjs.js +2 -2
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/collection-manifest.json +1 -1
  10. package/dist/collection/components/avatar/lido-avatar.css +4 -4
  11. package/dist/collection/components/avatar/lido-avatar.js +1 -1
  12. package/dist/collection/components/avatar/lido-avatar.tsx +207 -207
  13. package/dist/collection/components/avatar/readme.md +49 -49
  14. package/dist/collection/components/calculator/lido-calculator.css +89 -89
  15. package/dist/collection/components/calculator/lido-calculator.js +2 -2
  16. package/dist/collection/components/canvas/lido-canvas.css +33 -33
  17. package/dist/collection/components/canvas/lido-canvas.js +1 -1
  18. package/dist/collection/components/cell/lido-cell.css +100 -100
  19. package/dist/collection/components/cell/lido-cell.js +12 -12
  20. package/dist/collection/components/column/lido-col.css +19 -19
  21. package/dist/collection/components/column/lido-col.js +6 -6
  22. package/dist/collection/components/container/lido-container.css +10 -10
  23. package/dist/collection/components/container/lido-container.js +8 -8
  24. package/dist/collection/components/flashCard/lido-flash-card.css +28 -28
  25. package/dist/collection/components/flashCard/lido-flash-card.js +4 -4
  26. package/dist/collection/components/float/lido-float.css +30 -30
  27. package/dist/collection/components/float/lido-float.js +2 -2
  28. package/dist/collection/components/home/lido-home.css +309 -309
  29. package/dist/collection/components/home/lido-home.js +5 -5
  30. package/dist/collection/components/image/lido-image.css +17 -17
  31. package/dist/collection/components/image/lido-image.js +6 -6
  32. package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
  33. package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
  34. package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
  35. package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
  36. package/dist/collection/components/position/lido-pos.css +16 -16
  37. package/dist/collection/components/position/lido-pos.js +2 -2
  38. package/dist/collection/components/random/lido-random.css +8 -8
  39. package/dist/collection/components/random/lido-random.js +2 -2
  40. package/dist/collection/components/root/lido-root.js +5 -5
  41. package/dist/collection/components/row/lido-row.css +10 -10
  42. package/dist/collection/components/row/lido-row.js +6 -6
  43. package/dist/collection/components/scale/assets/Shadow.svg +9 -9
  44. package/dist/collection/components/scale/lido-balance.css +145 -145
  45. package/dist/collection/components/scale/lido-balance.js +13 -13
  46. package/dist/collection/components/shape/lido-shape.css +216 -216
  47. package/dist/collection/components/shape/lido-shape.js +6 -6
  48. package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
  49. package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
  50. package/dist/collection/components/text/lido-text.css +53 -53
  51. package/dist/collection/components/text/lido-text.js +5 -5
  52. package/dist/collection/components/trace/assets/Tracing-hand.svg +8 -8
  53. package/dist/collection/components/trace/lido-trace.css +97 -97
  54. package/dist/collection/components/trace/lido-trace.js +2 -2
  55. package/dist/collection/components/wrap/lido-wrap.css +18 -18
  56. package/dist/collection/components/wrap/lido-wrap.js +6 -6
  57. package/dist/collection/css/animation.css +211 -211
  58. package/dist/collection/css/index.css +324 -315
  59. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +61 -61
  60. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
  61. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +48 -48
  62. package/dist/collection/stories/Templates/Tag/tagGame.stories.js +39 -39
  63. package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +44 -44
  64. package/dist/collection/stories/Templates/balancing/balancing.stories.js +35 -35
  65. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
  66. package/dist/collection/stories/Templates/blender/blender.stories.js +59 -59
  67. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  68. package/dist/collection/stories/Templates/calculator/calculator.stories.js +28 -28
  69. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  70. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  71. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +29 -29
  72. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  73. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  74. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  75. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +43 -43
  76. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  77. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
  78. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  79. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  80. package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +44 -44
  81. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  82. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  83. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  84. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  85. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +84 -84
  86. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +31 -31
  87. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  88. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  89. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +57 -57
  90. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +53 -53
  91. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +46 -46
  92. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +45 -45
  93. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +56 -56
  94. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +53 -53
  95. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +127 -127
  96. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +47 -47
  97. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +38 -38
  98. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +97 -97
  99. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
  100. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +63 -63
  101. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +45 -45
  102. package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +63 -63
  103. package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +79 -79
  104. package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +32 -32
  105. package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +42 -42
  106. package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +63 -63
  107. package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +44 -44
  108. package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +34 -34
  109. package/dist/collection/stories/Templates/palEgraWordMatch/palEgraWordMatch.stories.js +52 -52
  110. package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +33 -33
  111. package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +40 -40
  112. package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +48 -48
  113. package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +48 -48
  114. package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +18 -18
  115. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +44 -44
  116. package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +34 -34
  117. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +36 -36
  118. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +30 -30
  119. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  120. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  121. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +58 -58
  122. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  123. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  124. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  125. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +631 -631
  126. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  127. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +47 -47
  128. package/dist/collection/stories/Templates/sentenceMatch/sentenceMatch.stories.js +29 -29
  129. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +64 -64
  130. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -62
  131. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +106 -106
  132. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +50 -50
  133. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  134. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  135. package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +62 -62
  136. package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +42 -42
  137. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +50 -50
  138. package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +88 -88
  139. package/dist/collection/stories/Templates/total/total.stories.js +28 -28
  140. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +35 -35
  141. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +34 -34
  142. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +31 -31
  143. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +58 -58
  144. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -44
  145. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +31 -31
  146. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +34 -34
  147. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  148. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  149. package/dist/collection/stories/components/slider.stories.js +4 -4
  150. package/dist/collection/stories/components/trace.stories.js +5 -5
  151. package/dist/collection/utils/audioPlayer.js +2 -5
  152. package/dist/collection/utils/utils.js +49 -9
  153. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +10 -10
  154. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  155. package/dist/collection/utils/utilsHandlers/sortHandler.js +53 -15
  156. package/dist/components/index.js +1 -1
  157. package/dist/components/lido-avatar.js +1 -1
  158. package/dist/components/lido-balance.js +1 -1
  159. package/dist/components/lido-calculator.js +1 -1
  160. package/dist/components/lido-canvas.js +1 -1
  161. package/dist/components/lido-cell.js +1 -1
  162. package/dist/components/lido-col.js +1 -1
  163. package/dist/components/lido-container.js +1 -1
  164. package/dist/components/lido-flash-card.js +1 -1
  165. package/dist/components/lido-float.js +1 -1
  166. package/dist/components/lido-home.js +1 -1
  167. package/dist/components/lido-keyboard.js +1 -1
  168. package/dist/components/lido-math-matrix.js +1 -1
  169. package/dist/components/lido-pos.js +1 -1
  170. package/dist/components/lido-random.js +1 -1
  171. package/dist/components/lido-root.js +1 -1
  172. package/dist/components/lido-row.js +1 -1
  173. package/dist/components/lido-shape.js +1 -1
  174. package/dist/components/lido-slide-fill.js +1 -1
  175. package/dist/components/lido-text.js +1 -1
  176. package/dist/components/lido-trace.js +1 -1
  177. package/dist/components/lido-wrap.js +1 -1
  178. package/dist/components/{p-yT7udDfd.js → p-B4YAipq-.js} +1 -1
  179. package/dist/components/{p-DdQ1eqJr.js → p-B8nzzM8c.js} +1 -1
  180. package/dist/components/{p-Sl9R-E6h.js → p-BBHM059l.js} +1 -1
  181. package/dist/components/{p-SPZTb5fI.js → p-BJMjg5wu.js} +1 -1
  182. package/dist/components/{p-Cj-6tqzU.js → p-BOQDbCrm.js} +1 -1
  183. package/dist/components/{p-CwDTdXe5.js → p-BeRr8u5m.js} +1 -1
  184. package/dist/components/{p-CjdDpXfk.js → p-BfqihbR6.js} +1 -1
  185. package/dist/components/{p-CPYnt0P-.js → p-C5WmmkI6.js} +1 -1
  186. package/dist/components/{p-useuhkjH.js → p-C70ykycD.js} +1 -1
  187. package/dist/components/{p-BE25wHoo.js → p-CCR42e0i.js} +1 -1
  188. package/dist/components/{p-BfwUqpXc.js → p-CTlcpv4a.js} +1 -1
  189. package/dist/components/{p-BNNX1Pew.js → p-CWwymnbk.js} +2 -2
  190. package/dist/components/{p-CyGxEcn7.js → p-CXHPZN3m.js} +1 -1
  191. package/dist/components/{p-Bw-OC9iR.js → p-CgsPIpg0.js} +1 -1
  192. package/dist/components/{p-D54c-ybm.js → p-CljvnHkI.js} +1 -1
  193. package/dist/components/p-CwIlwnQk.js +1 -0
  194. package/dist/components/p-DLyacZap.js +1 -0
  195. package/dist/components/p-DONbWJGn.js +1 -0
  196. package/dist/components/p-DVTigdH_.js +1 -0
  197. package/dist/components/{p-CTlwn9r7.js → p-DYFVwyRr.js} +1 -1
  198. package/dist/esm/{decode-BgBfbPZu.js → decode-Buyq-Iy5.js} +1 -1
  199. package/dist/esm/{index-D-29PaRa.js → index-CQXciux9.js} +137 -64
  200. package/dist/esm/{index-BeHFCsWf.js → index-DQZfuGjI.js} +16 -10
  201. package/dist/esm/index.js +2 -2
  202. package/dist/esm/lido-avatar_22.entry.js +33 -33
  203. package/dist/esm/lido-player.js +3 -3
  204. package/dist/esm/loader.js +2 -2
  205. package/dist/lido-player/assets/Shadow.svg +9 -9
  206. package/dist/lido-player/assets/Tracing-hand.svg +8 -8
  207. package/dist/lido-player/index.esm.js +1 -1
  208. package/dist/lido-player/lido-avatar.css +4 -4
  209. package/dist/lido-player/lido-avatar.tsx +207 -207
  210. package/dist/lido-player/lido-player.css +8 -8
  211. package/dist/lido-player/lido-player.esm.js +1 -1
  212. package/dist/lido-player/{p-856e1956.entry.js → p-37736e11.entry.js} +2 -2
  213. package/dist/lido-player/p-3Ry570XH.js +1 -0
  214. package/dist/lido-player/{p-BA2X6O7O.js → p-CFtq4Thh.js} +1 -1
  215. package/dist/lido-player/p-DQZfuGjI.js +3 -0
  216. package/dist/lido-player/readme.md +49 -49
  217. package/dist/types/stencil-public-runtime.d.ts +61 -55
  218. package/dist/types/types/json.d.ts +3 -3
  219. package/dist/types/utils/utils.d.ts +1 -1
  220. package/dist/types/utils/utilsHandlers/dragDropHandler.d.ts +1 -0
  221. package/dist/types/utils/utilsHandlers/sortHandler.d.ts +2 -0
  222. package/package.json +73 -73
  223. package/readme.md +113 -113
  224. package/dist/components/p-BSV5U72F.js +0 -1
  225. package/dist/components/p-D-B1groh.js +0 -1
  226. package/dist/components/p-DbR5sNOj.js +0 -1
  227. package/dist/components/p-leIEepjl.js +0 -1
  228. package/dist/lido-player/p-BeHFCsWf.js +0 -3
  229. package/dist/lido-player/p-TuBmCgtK.js +0 -1
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-CwDTdXe5.js";const p=o,r=s;export{p as LidoAvatar,r as defineCustomElement}
1
+ import{L as o,d as r}from"./p-BeRr8u5m.js";const s=o,m=r;export{s as LidoAvatar,m as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as p}from"./p-CjdDpXfk.js";const s=o,r=p;export{s as LidoBalance,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-BfqihbR6.js";const p=o,r=s;export{p as LidoBalance,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-yT7udDfd.js";const d=o,p=s;export{d as LidoCalculator,p as defineCustomElement}
1
+ import{L as o,d as p}from"./p-B4YAipq-.js";const s=o,r=p;export{s as LidoCalculator,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-CPYnt0P-.js";const t=o,p=s;export{t as LidoCanvas,p as defineCustomElement}
1
+ import{L as m,d as o}from"./p-C5WmmkI6.js";const s=m,p=o;export{s as LidoCanvas,p as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-Bw-OC9iR.js";const p=o,r=s;export{p as LidoCell,r as defineCustomElement}
1
+ import{L as s,d as o}from"./p-CgsPIpg0.js";const p=s,r=o;export{p as LidoCell,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as p}from"./p-BfwUqpXc.js";const s=o,r=p;export{s as LidoCol,r as defineCustomElement}
1
+ import{L as o,d as p}from"./p-CTlcpv4a.js";const s=o,a=p;export{s as LidoCol,a as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-D54c-ybm.js";const m=o,p=s;export{m as LidoContainer,p as defineCustomElement}
1
+ import{L as o,d as s}from"./p-CljvnHkI.js";const p=o,r=s;export{p as LidoContainer,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as r}from"./p-D-B1groh.js";const s=o,p=r;export{s as LidoFlashCard,p as defineCustomElement}
1
+ import{L as o,d as s}from"./p-DVTigdH_.js";const p=o,r=s;export{p as LidoFlashCard,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as s,d as o}from"./p-DbR5sNOj.js";const p=s,r=o;export{p as LidoFloat,r as defineCustomElement}
1
+ import{L as a,d as o}from"./p-DLyacZap.js";const p=a,s=o;export{p as LidoFloat,s as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-BNNX1Pew.js";const p=o,r=s;export{p as LidoHome,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-CWwymnbk.js";const m=o,p=s;export{m as LidoHome,p as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-SPZTb5fI.js";const p=o,r=s;export{p as LidoKeyboard,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-BJMjg5wu.js";const p=o,r=s;export{p as LidoKeyboard,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as r}from"./p-DdQ1eqJr.js";const s=o,p=r;export{s as LidoMathMatrix,p as defineCustomElement}
1
+ import{L as o,d as s}from"./p-B8nzzM8c.js";const p=o,r=s;export{p as LidoMathMatrix,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-CyGxEcn7.js";const p=o,r=s;export{p as LidoPos,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-CXHPZN3m.js";const m=o,p=s;export{m as LidoPos,p as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as p}from"./p-leIEepjl.js";const s=o,e=p;export{s as LidoRandom,e as defineCustomElement}
1
+ import{L as o,d as s}from"./p-DONbWJGn.js";const p=o,r=s;export{p as LidoRandom,r as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as s,H as o,getAssetPath as e,h as a}from"./index.js";import{d as i,i as l}from"./p-Cj-6tqzU.js";import{d as r}from"./p-CwDTdXe5.js";import{d as m}from"./p-CjdDpXfk.js";import{d as n}from"./p-yT7udDfd.js";import{d}from"./p-CPYnt0P-.js";import{d as c}from"./p-Bw-OC9iR.js";import{d as p}from"./p-BfwUqpXc.js";import{d as u}from"./p-D54c-ybm.js";import{d as h}from"./p-D-B1groh.js";import{d as f}from"./p-DbR5sNOj.js";import{d as b}from"./p-BNNX1Pew.js";import{d as E}from"./p-C5jvgiPE.js";import{d as k}from"./p-SPZTb5fI.js";import{d as j}from"./p-DdQ1eqJr.js";import{d as x}from"./p-CyGxEcn7.js";import{d as g}from"./p-leIEepjl.js";import{d as v}from"./p-useuhkjH.js";import{d as w}from"./p-BSV5U72F.js";import{d as U}from"./p-Sl9R-E6h.js";import{d as B}from"./p-CTlwn9r7.js";import{d as C}from"./p-BE25wHoo.js";const L=s(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.Lang="",this.xmlPath="",this.initialIndex=0,this.margin="",this.canplay=!0,this.baseUrl="",this.zipUrl=""}connectedCallback(){this.setLanguage(this.Lang)}onLangChange(t){this.setLanguage(t)}setLanguage(t){l.changeLanguage(t||l.language)}async componentWillLoad(){var t,s;if(this.zipUrl)return void(this.xmlData="");const o=null!==(t=this.xmlPath)&&void 0!==t?t:this.baseUrl+((null===(s=this.baseUrl)||void 0===s?void 0:s.endsWith("/"))?"index.xml":"/index.xml");try{const t=o.startsWith("http")?o:e(o),s=await fetch(t);if(!s.ok)throw Error("Failed to fetch XML data: "+s.statusText);const a=await s.text();this.xmlData=a}catch(t){console.error("Error fetching XML data:",t),this.xmlData=null}}render(){return void 0===this.xmlData?a("div",null,"Loading..."):null===this.xmlData?a("div",null,"Error loading XML data. Please check the path or URL."):a("lido-home",Object.assign({showNav:!0,activeContainerIndexes:[],initialIndex:this.initialIndex,canplay:this.canplay,xmlData:this.xmlData,baseUrl:this.baseUrl},this.zipUrl?{zipUrl:this.zipUrl}:{},{exitButtonUrl:this.exitButtonUrl,prevButtonUrl:this.prevButtonUrl,nextButtonUrl:this.nextButtonUrl,speakerButtonUrl:this.speakerButtonUrl}))}static get assetsDirs(){return["assets"]}static get watchers(){return{Lang:[{onLangChange:0}]}}},[0,"lido-root",{Lang:[1,"lang"],xmlPath:[1,"xml-path"],initialIndex:[2,"initial-index"],margin:[1],canplay:[4],baseUrl:[1,"base-url"],zipUrl:[1,"zip-url"],exitButtonUrl:[1,"exit-button-url"],prevButtonUrl:[1,"prev-button-url"],nextButtonUrl:[1,"next-button-url"],speakerButtonUrl:[1,"speaker-button-url"],xmlData:[32]},void 0,{Lang:[{onLangChange:0}]}]);function y(){"undefined"!=typeof customElements&&["lido-root","lido-avatar","lido-balance","lido-calculator","lido-canvas","lido-cell","lido-col","lido-container","lido-flash-card","lido-float","lido-home","lido-image","lido-keyboard","lido-math-matrix","lido-pos","lido-random","lido-row","lido-shape","lido-slide-fill","lido-text","lido-trace","lido-wrap"].forEach((s=>{switch(s){case"lido-root":customElements.get(t(s))||customElements.define(t(s),L);break;case"lido-avatar":customElements.get(t(s))||r();break;case"lido-balance":customElements.get(t(s))||m();break;case"lido-calculator":customElements.get(t(s))||n();break;case"lido-canvas":customElements.get(t(s))||d();break;case"lido-cell":customElements.get(t(s))||c();break;case"lido-col":customElements.get(t(s))||p();break;case"lido-container":customElements.get(t(s))||u();break;case"lido-flash-card":customElements.get(t(s))||h();break;case"lido-float":customElements.get(t(s))||f();break;case"lido-home":customElements.get(t(s))||b();break;case"lido-image":customElements.get(t(s))||E();break;case"lido-keyboard":customElements.get(t(s))||k();break;case"lido-math-matrix":customElements.get(t(s))||j();break;case"lido-pos":customElements.get(t(s))||x();break;case"lido-random":customElements.get(t(s))||g();break;case"lido-row":customElements.get(t(s))||v();break;case"lido-shape":customElements.get(t(s))||w();break;case"lido-slide-fill":customElements.get(t(s))||U();break;case"lido-text":customElements.get(t(s))||i();break;case"lido-trace":customElements.get(t(s))||B();break;case"lido-wrap":customElements.get(t(s))||C()}}))}y();const D=L,P=y;export{D as LidoRoot,P as defineCustomElement}
1
+ import{t,p as s,H as o,getAssetPath as e,h as a}from"./index.js";import{d as i,i as l}from"./p-BOQDbCrm.js";import{d as r}from"./p-BeRr8u5m.js";import{d as m}from"./p-BfqihbR6.js";import{d as n}from"./p-B4YAipq-.js";import{d}from"./p-C5WmmkI6.js";import{d as c}from"./p-CgsPIpg0.js";import{d as p}from"./p-CTlcpv4a.js";import{d as u}from"./p-CljvnHkI.js";import{d as h}from"./p-DVTigdH_.js";import{d as b}from"./p-DLyacZap.js";import{d as f}from"./p-CWwymnbk.js";import{d as k}from"./p-C5jvgiPE.js";import{d as E}from"./p-BJMjg5wu.js";import{d as j}from"./p-B8nzzM8c.js";import{d as g}from"./p-CXHPZN3m.js";import{d as x}from"./p-DONbWJGn.js";import{d as v}from"./p-C70ykycD.js";import{d as C}from"./p-CwIlwnQk.js";import{d as B}from"./p-BBHM059l.js";import{d as w}from"./p-DYFVwyRr.js";import{d as L}from"./p-CCR42e0i.js";const U=s(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.Lang="",this.xmlPath="",this.initialIndex=0,this.margin="",this.canplay=!0,this.baseUrl="",this.zipUrl=""}connectedCallback(){this.setLanguage(this.Lang)}onLangChange(t){this.setLanguage(t)}setLanguage(t){l.changeLanguage(t||l.language)}async componentWillLoad(){var t,s;if(this.zipUrl)return void(this.xmlData="");const o=null!==(t=this.xmlPath)&&void 0!==t?t:this.baseUrl+((null===(s=this.baseUrl)||void 0===s?void 0:s.endsWith("/"))?"index.xml":"/index.xml");try{const t=o.startsWith("http")?o:e(o),s=await fetch(t);if(!s.ok)throw Error("Failed to fetch XML data: "+s.statusText);const a=await s.text();this.xmlData=a}catch(t){console.error("Error fetching XML data:",t),this.xmlData=null}}render(){return void 0===this.xmlData?a("div",null,"Loading..."):null===this.xmlData?a("div",null,"Error loading XML data. Please check the path or URL."):a("lido-home",Object.assign({showNav:!0,activeContainerIndexes:[],initialIndex:this.initialIndex,canplay:this.canplay,xmlData:this.xmlData,baseUrl:this.baseUrl},this.zipUrl?{zipUrl:this.zipUrl}:{},{exitButtonUrl:this.exitButtonUrl,prevButtonUrl:this.prevButtonUrl,nextButtonUrl:this.nextButtonUrl,speakerButtonUrl:this.speakerButtonUrl}))}static get assetsDirs(){return["assets"]}static get watchers(){return{Lang:[{onLangChange:0}]}}},[0,"lido-root",{Lang:[1,"lang"],xmlPath:[1,"xml-path"],initialIndex:[2,"initial-index"],margin:[1],canplay:[4],baseUrl:[1,"base-url"],zipUrl:[1,"zip-url"],exitButtonUrl:[1,"exit-button-url"],prevButtonUrl:[1,"prev-button-url"],nextButtonUrl:[1,"next-button-url"],speakerButtonUrl:[1,"speaker-button-url"],xmlData:[32]},void 0,{Lang:[{onLangChange:0}]}]);function y(){"undefined"!=typeof customElements&&["lido-root","lido-avatar","lido-balance","lido-calculator","lido-canvas","lido-cell","lido-col","lido-container","lido-flash-card","lido-float","lido-home","lido-image","lido-keyboard","lido-math-matrix","lido-pos","lido-random","lido-row","lido-shape","lido-slide-fill","lido-text","lido-trace","lido-wrap"].forEach((s=>{switch(s){case"lido-root":customElements.get(t(s))||customElements.define(t(s),U);break;case"lido-avatar":customElements.get(t(s))||r();break;case"lido-balance":customElements.get(t(s))||m();break;case"lido-calculator":customElements.get(t(s))||n();break;case"lido-canvas":customElements.get(t(s))||d();break;case"lido-cell":customElements.get(t(s))||c();break;case"lido-col":customElements.get(t(s))||p();break;case"lido-container":customElements.get(t(s))||u();break;case"lido-flash-card":customElements.get(t(s))||h();break;case"lido-float":customElements.get(t(s))||b();break;case"lido-home":customElements.get(t(s))||f();break;case"lido-image":customElements.get(t(s))||k();break;case"lido-keyboard":customElements.get(t(s))||E();break;case"lido-math-matrix":customElements.get(t(s))||j();break;case"lido-pos":customElements.get(t(s))||g();break;case"lido-random":customElements.get(t(s))||x();break;case"lido-row":customElements.get(t(s))||v();break;case"lido-shape":customElements.get(t(s))||C();break;case"lido-slide-fill":customElements.get(t(s))||B();break;case"lido-text":customElements.get(t(s))||i();break;case"lido-trace":customElements.get(t(s))||w();break;case"lido-wrap":customElements.get(t(s))||L()}}))}y();const D=U,I=y;export{D as LidoRoot,I as defineCustomElement}
@@ -1 +1 @@
1
- import{L as s,d as o}from"./p-useuhkjH.js";const p=s,r=o;export{p as LidoRow,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-C70ykycD.js";const p=o,r=s;export{p as LidoRow,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-BSV5U72F.js";const p=o,r=s;export{p as LidoShape,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-CwIlwnQk.js";const p=o,r=s;export{p as LidoShape,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-Sl9R-E6h.js";const p=o,r=s;export{p as LidoSlideFill,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-BBHM059l.js";const p=o,r=s;export{p as LidoSlideFill,r as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-Cj-6tqzU.js";const t=o,p=s;export{t as LidoText,p as defineCustomElement}
1
+ import{L as o,d as r}from"./p-BOQDbCrm.js";const s=o,m=r;export{s as LidoText,m as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as r}from"./p-CTlwn9r7.js";const s=o,p=r;export{s as LidoTrace,p as defineCustomElement}
1
+ import{L as o,d as r}from"./p-DYFVwyRr.js";const s=o,p=r;export{s as LidoTrace,p as defineCustomElement}
@@ -1 +1 @@
1
- import{L as o,d as s}from"./p-BE25wHoo.js";const p=o,r=s;export{p as LidoWrap,r as defineCustomElement}
1
+ import{L as o,d as s}from"./p-CCR42e0i.js";const p=o,r=s;export{p as LidoWrap,r as defineCustomElement}
@@ -1 +1 @@
1
- import{t,p as i,H as o,d as e,e as s,S as a,s as r,C as l,A as n,f as c,g as d,j as h,h as u,c as p,b}from"./index.js";import{d as f}from"./p-Bw-OC9iR.js";import{d as m}from"./p-Cj-6tqzU.js";const x=i(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.onOk=e(this,"onOk"),this.width="479px",this.visible=!1,this.height="711px",this.objective="",this.onEntry="",this.x="0px",this.y="0px",this.bgColor="#60DADA",this.penIcon="",this.displayValue="",this.style={},this.userAnswers=[],this.tempInputs=[]}updateValueAttr(){this.el.setAttribute("value",this.displayValue)}componentWillLoad(){if(!this.objective){const t=this.el.closest("lido-container");t&&(this.objective=(t.getAttribute("objective")||"").replace("=","").trim())}this.updateValueAttr()}handleClick(t){"OK"===t?this.verifyAnswer():"←"===t?this.displayValue=this.displayValue.slice(0,-1):this.displayValue.length<8&&(this.displayValue+=t),this.updateValueAttr()}async verifyAnswer(){var t;const i=this.displayValue.trim();if(!i)return;let o=!1;const e=this.el.closest("lido-container");if(!e)return;if(this.objective&&""!=this.objective&&!this.objective.includes(","))o=Number(i)===Number(this.objective);else if(this.objective&&this.objective.includes(",")){const t="true"===e.getAttribute("is-continue-on-correct"),s=this.objective.split(",").map((t=>t.trim())),a=this.userAnswers.length;a<s.length&&Number(i)===Number(s[a])&&(o=!0),t?o&&this.userAnswers.push(Number(i)):this.userAnswers.push(Number(i))}else if(""===this.objective){const t=e.getAttribute("equationCheck")||"";if(!t)return;try{const e=s(t);o=Number(e)===Number(i.trim())}catch(t){console.error("Error evaluating equation:",t),o=!1}}this.onOk.emit(o);const u=document.getElementById("btn-11");if(o){const s="nimbleTable"===e.getAttribute("template-id"),p=this.objective.includes(",");s&&p||e.setAttribute("game-completed","true"),this.tempInputs.push(i);const b=JSON.parse(null!==(t=e.getAttribute(a))&&void 0!==t?t:"[]"),f=Array.isArray(b)?b.filter((t=>""!==String(t).trim())):[],m=this.tempInputs[this.tempInputs.length-1];if(""!==String(m).trim()&&f.push(m),e.setAttribute(a,JSON.stringify(f)),u.style.pointerEvents="none",this.displayValue="",r(o,l),s&&p){const t=e.querySelector("[type='calculate']");t&&(t.getAttribute("audio")||"").trim()&&(t.style.boxShadow="none !important",t.setAttribute("onCorrect","this.speak='true'"),n.getI().play(t))}const x=(null==e?void 0:e.getAttribute("onCorrect"))||"";if(await c(x,e),!x.includes("scrollCellAfterEquationSolved"))if(p){const t=this.objective.split(",").map((t=>t.trim()));this.userAnswers.length>=t.length&&(e.setAttribute("game-completed","true"),d(),h())}else d(),h()}else{u.style.pointerEvents="none",this.displayValue="",r(o,l);const t=(null==e?void 0:e.getAttribute("onInCorrect"))||"",i=(null==e?void 0:e.getAttribute("onCorrect"))||"",s="true"===e.getAttribute("is-continue-on-correct");s?await c(t,e):await c(i,e),s||(e.setAttribute("game-completed","true"),d(),h())}u.style.pointerEvents="auto"}render(){return u(b,{key:"e8249dda090212d327b68b47d42a123de6a890c9",onEntry:this.onEntry,id:"lidoCalculator",style:{width:this.width,height:this.height,backgroundColor:this.bgColor,left:this.x,top:this.y}},u("lido-cell",{key:"54d093a3dd6a6e5850c881d224290bd6cf9c3690",visible:"true",height:"94px",width:"60px"},u("lido-text",{key:"7145c80b2477493a8a87f6d098164293732861bf",visible:"true",id:"lido-calculator-penIcon",type:"click",height:"80px",x:"204%",width:"89px",onEntry:"this.position='relative';",class:"top-icon"},u("img",{key:"7242feedd5172b555df683c747bbef778a9cdcd7",src:p(this.penIcon),alt:"pen",style:{width:"100%",height:"100%"}}))),u("div",{key:"6145a4f89da352c3576e6d51a1e260e335778fbb",class:"lido-calculator-displayParent"},u("div",{key:"04e07b724d912d43b08c7a1e15c605d0fd30c7be",class:"lido-calculator-display"},this.displayValue)),u("div",{key:"19839d02863ca1e27fddb4093f191171e237f143",class:"lido-calculator-buttons"},["1","2","3","4","5","6","7","8","9","←","0","OK"].map(((t,i)=>u("lido-text",{id:`btn-${i}`,string:t,visible:"true",type:"click",class:{"lido-calculator-btn-special":"←"===t||"OK"===t,"lido-calculator-btn-default":"←"!==t&&"OK"!==t},onClick:()=>this.handleClick(t)})))))}get el(){return this}static get style(){return"#lidoCalculator{border-radius:19px;border:5px solid #029A9A;position:relative;display:flex;flex-direction:column;padding:2%;box-sizing:border-box}.lido-calculator-btn-special{--btn-bg-color:#014D4D !important;background-color:#014D4D !important;--btn-shadow-color:#0a2f2f !important}.lido-calculator-btn-default{--btn-bg-color:#029A9A !important;background-color:#029A9A !important;color:#000;--btn-shadow-color:#0f4242 !important}#lido-calculator-penIcon{--btn-bg-color:#FB7038 !important;--btn-shadow-px:0 8px 0 !important;--btn-shadow-color:#D74B12 !important;border-radius:5px !important}.lido-calculator-displayParent{width:89%;height:107px;background-color:rgb(68, 186, 186);border-radius:5px;margin:14px auto 17px auto;overflow:hidden;display:flex;align-items:end}.lido-calculator-display{width:97%;height:94px;background:#029A9A;color:#fff;text-align:right;display:flex;justify-content:flex-end;align-items:center;font-size:72px;font-weight:700;font-family:'Baloo Bhai 2', serif;border-radius:5px 0px 0px 5px;box-sizing:border-box;margin:0 0px -6px auto}.lido-calculator-buttons{flex:1;display:grid;grid-template-columns:repeat(3, 1fr);grid-auto-rows:1fr;gap:0%;width:100%;justify-items:center;align-items:center;position:relative;top:-1%}.lido-calculator-buttons lido-text{display:flex !important;justify-content:center;align-items:center;width:100px !important;height:88px !important;font-size:80px !important;font-weight:700 !important;color:#fff;border-radius:5px !important;cursor:pointer;text-align:center;line-height:1;box-sizing:border-box;transition:transform 0.1s}.lido-calculator-buttons lido-text:active{transform:scale(0.95)}"}},[0,"lido-calculator",{width:[1],visible:[8],height:[1],objective:[1],onEntry:[1,"on-entry"],x:[1],y:[1],bgColor:[1,"bg-color"],penIcon:[1,"pen-icon"],displayValue:[32],style:[32]}]);function g(){"undefined"!=typeof customElements&&["lido-calculator","lido-cell","lido-text"].forEach((i=>{switch(i){case"lido-calculator":customElements.get(t(i))||customElements.define(t(i),x);break;case"lido-cell":customElements.get(t(i))||f();break;case"lido-text":customElements.get(t(i))||m()}}))}g();export{x as L,g as d}
1
+ import{t,p as i,H as o,d as e,e as s,S as a,s as r,C as l,A as n,f as c,g as d,j as h,h as u,c as p,b}from"./index.js";import{d as f}from"./p-CgsPIpg0.js";import{d as m}from"./p-BOQDbCrm.js";const x=i(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.onOk=e(this,"onOk"),this.width="479px",this.visible=!1,this.height="711px",this.objective="",this.onEntry="",this.x="0px",this.y="0px",this.bgColor="#60DADA",this.penIcon="",this.displayValue="",this.style={},this.userAnswers=[],this.tempInputs=[]}updateValueAttr(){this.el.setAttribute("value",this.displayValue)}componentWillLoad(){if(!this.objective){const t=this.el.closest("lido-container");t&&(this.objective=(t.getAttribute("objective")||"").replace("=","").trim())}this.updateValueAttr()}handleClick(t){"OK"===t?this.verifyAnswer():"←"===t?this.displayValue=this.displayValue.slice(0,-1):this.displayValue.length<8&&(this.displayValue+=t),this.updateValueAttr()}async verifyAnswer(){var t;const i=this.displayValue.trim();if(!i)return;let o=!1;const e=this.el.closest("lido-container");if(!e)return;if(this.objective&&""!=this.objective&&!this.objective.includes(","))o=Number(i)===Number(this.objective);else if(this.objective&&this.objective.includes(",")){const t="true"===e.getAttribute("is-continue-on-correct"),s=this.objective.split(",").map((t=>t.trim())),a=this.userAnswers.length;a<s.length&&Number(i)===Number(s[a])&&(o=!0),t?o&&this.userAnswers.push(Number(i)):this.userAnswers.push(Number(i))}else if(""===this.objective){const t=e.getAttribute("equationCheck")||"";if(!t)return;try{const e=s(t);o=Number(e)===Number(i.trim())}catch(t){console.error("Error evaluating equation:",t),o=!1}}this.onOk.emit(o);const u=document.getElementById("btn-11");if(o){const s="nimbleTable"===e.getAttribute("template-id"),p=this.objective.includes(",");s&&p||e.setAttribute("game-completed","true"),this.tempInputs.push(i);const b=JSON.parse(null!==(t=e.getAttribute(a))&&void 0!==t?t:"[]"),f=Array.isArray(b)?b.filter((t=>""!==String(t).trim())):[],m=this.tempInputs[this.tempInputs.length-1];if(""!==String(m).trim()&&f.push(m),e.setAttribute(a,JSON.stringify(f)),u.style.pointerEvents="none",this.displayValue="",r(o,l),s&&p){const t=e.querySelector("[type='calculate']");t&&(t.getAttribute("audio")||"").trim()&&(t.style.boxShadow="none !important",t.setAttribute("onCorrect","this.speak='true'"),n.getI().play(t))}const x=(null==e?void 0:e.getAttribute("onCorrect"))||"";if(await c(x,e),!x.includes("scrollCellAfterEquationSolved"))if(p){const t=this.objective.split(",").map((t=>t.trim()));this.userAnswers.length>=t.length&&(e.setAttribute("game-completed","true"),d(),h())}else d(),h()}else{u.style.pointerEvents="none",this.displayValue="",r(o,l);const t=(null==e?void 0:e.getAttribute("onInCorrect"))||"",i=(null==e?void 0:e.getAttribute("onCorrect"))||"",s="true"===e.getAttribute("is-continue-on-correct");s?await c(t,e):await c(i,e),s||(e.setAttribute("game-completed","true"),d(),h())}u.style.pointerEvents="auto"}render(){return u(b,{key:"ae833326069dd4cf9588701995962b0d1b3b0091",onEntry:this.onEntry,id:"lidoCalculator",style:{width:this.width,height:this.height,backgroundColor:this.bgColor,left:this.x,top:this.y}},u("lido-cell",{key:"135b08be24862393217a0a93d4afd3ec8647547c",visible:"true",height:"94px",width:"60px"},u("lido-text",{key:"e6fb20b06bef347d68e427748669bb176c30b7a3",visible:"true",id:"lido-calculator-penIcon",type:"click",height:"80px",x:"204%",width:"89px",onEntry:"this.position='relative';",class:"top-icon"},u("img",{key:"2b6077ffad1046fdedb816402fdcb906539afa5c",src:p(this.penIcon),alt:"pen",style:{width:"100%",height:"100%"}}))),u("div",{key:"96dfabdab176f66e16d6b03efb2e8ecad74c9d45",class:"lido-calculator-displayParent"},u("div",{key:"9c711dd53ada73ca9ddac1c37b0719c5c746a591",class:"lido-calculator-display"},this.displayValue)),u("div",{key:"5d595bf410fc1a75fa57c485fd08a8e97064016a",class:"lido-calculator-buttons"},["1","2","3","4","5","6","7","8","9","←","0","OK"].map(((t,i)=>u("lido-text",{id:`btn-${i}`,string:t,visible:"true",type:"click",class:{"lido-calculator-btn-special":"←"===t||"OK"===t,"lido-calculator-btn-default":"←"!==t&&"OK"!==t},onClick:()=>this.handleClick(t)})))))}get el(){return this}static get style(){return"#lidoCalculator{border-radius:19px;border:5px solid #029A9A;position:relative;display:flex;flex-direction:column;padding:2%;box-sizing:border-box}.lido-calculator-btn-special{--btn-bg-color:#014D4D !important;background-color:#014D4D !important;--btn-shadow-color:#0a2f2f !important}.lido-calculator-btn-default{--btn-bg-color:#029A9A !important;background-color:#029A9A !important;color:#000;--btn-shadow-color:#0f4242 !important}#lido-calculator-penIcon{--btn-bg-color:#FB7038 !important;--btn-shadow-px:0 8px 0 !important;--btn-shadow-color:#D74B12 !important;border-radius:5px !important}.lido-calculator-displayParent{width:89%;height:107px;background-color:rgb(68, 186, 186);border-radius:5px;margin:14px auto 17px auto;overflow:hidden;display:flex;align-items:end}.lido-calculator-display{width:97%;height:94px;background:#029A9A;color:#fff;text-align:right;display:flex;justify-content:flex-end;align-items:center;font-size:72px;font-weight:700;font-family:'Baloo Bhai 2', serif;border-radius:5px 0px 0px 5px;box-sizing:border-box;margin:0 0px -6px auto}.lido-calculator-buttons{flex:1;display:grid;grid-template-columns:repeat(3, 1fr);grid-auto-rows:1fr;gap:0%;width:100%;justify-items:center;align-items:center;position:relative;top:-1%}.lido-calculator-buttons lido-text{display:flex !important;justify-content:center;align-items:center;width:100px !important;height:88px !important;font-size:80px !important;font-weight:700 !important;color:#fff;border-radius:5px !important;cursor:pointer;text-align:center;line-height:1;box-sizing:border-box;transition:transform 0.1s}.lido-calculator-buttons lido-text:active{transform:scale(0.95)}"}},[0,"lido-calculator",{width:[1],visible:[8],height:[1],objective:[1],onEntry:[1,"on-entry"],x:[1],y:[1],bgColor:[1,"bg-color"],penIcon:[1,"pen-icon"],displayValue:[32],style:[32]}]);function g(){"undefined"!=typeof customElements&&["lido-calculator","lido-cell","lido-text"].forEach((i=>{switch(i){case"lido-calculator":customElements.get(t(i))||customElements.define(t(i),x);break;case"lido-cell":customElements.get(t(i))||f();break;case"lido-text":customElements.get(t(i))||m()}}))}g();export{x as L,g as d}
@@ -1 +1 @@
1
- import{t,p as i,H as e,i as s,c as o,w as n,a as l,e as a,s as h,y as r,h as c,b as d}from"./index.js";const u=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.rows="10",this.cols="10",this.defualtFill=0,this.leftIndex=!1,this.topIndex=!1,this.bottomIndex=!1,this.clickable=!0,this.activeOnlyVisible=!1,this.activeBgColor="transparent",this.deactiveBgColor="transparent",this.border="2px solid green",this.height="100%",this.width="100%",this.borderRadius="5px",this.visible="false",this.previousFilledSlot=-1,this.previousFilledSlotElement=null,this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}updateValue(t){this.el.setAttribute("value",t)}componentDidLoad(){const t=this.el.querySelectorAll(".slot");s(this.el,this.type),t.forEach((t=>{const i=t;i.style.setProperty("--active-bg-color",this.activeBgColor),i.style.setProperty("--deactive-bg-color",this.deactiveBgColor),i.style.pointerEvents=this.clickable?"":"none",i.style.border=this.border,i.style.color=this.fontColor,i.className.includes("slot-active")?(i.style.visibility="",this.matrixImage&&i.style.setProperty("--bg-image",`url(${o(this.matrixImage)})`)):this.activeOnlyVisible&&(i.style.visibility="hidden")})),this.updateSlots(),this.updateStyles()}componentWillLoad(){this.updateStyles(),this.updateSlots(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateSlots(){const t=this.el.querySelectorAll(".slot"),i=this.el.querySelector(".slot");if(!t.length||!i)return;const e=document.getElementById(n);let s=this.rows,o=this.cols;e&&"multiplyBeeds"===e.getAttribute("template-id")&&(o="9",s="1");const l=Number(s)<Number(o)?this.el.offsetHeight:this.el.offsetWidth,a=Number(s)>Number(o)?Number(s):Number(o),h=this.el.querySelectorAll(".slot-parent"),r=l/a;h.forEach((t=>{t.style.width=`${r}px`,Array.from(t.children).forEach((t=>{const i=t;i.style.width=`${r}px`,i.style.height=`${r}px`,"drop"!==this.type&&"drag"!==this.type&&"checkerBlock"!==this.type||(this.el.style.width="auto",this.el.style.height="auto"),(!this.topIndex&&i.classList.contains("topIndex")||!this.leftIndex&&i.classList.contains("leftIndex")||!this.bottomIndex&&i.classList.contains("bottomIndex"))&&(i.classList.contains("leftIndex")&&i.parentElement.remove(),i.remove())}))}))}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:l(this.height,t),width:l(this.width,t),zIndex:this.z,display:"true"===l(`${this.visible}`,t)?"flex":"none",borderRadius:l(this.borderRadius,t),left:l(this.x,t),top:l(this.y,t),cols:l(`${this.cols}`,t),rows:l(`${this.rows}`,t)}}handleClickSlot(t){const i=parseInt(t.className.split(" ")[1].split("-")[1]),e=this.el.querySelectorAll(".slot");if(e.forEach(((t,e)=>{const s=t;e<i?(s.classList.add("slot-active"),s.classList.remove("slot-inactive"),this.matrixImage&&s.style.setProperty("--bg-image",`url(${o(this.matrixImage)})`)):(s.classList.remove("slot-active"),s.classList.add("slot-inactive"))})),-1!==this.previousFilledSlot&&null!==this.previousFilledSlotElement&&(this.previousFilledSlotElement.textContent=""),t.textContent=i.toString(),this.previousFilledSlot=i,this.previousFilledSlotElement=t,i===e.length)try{const t=new CustomEvent("math-matrix-bottom-click",{detail:{matrix:this.el,cols:this.style.cols,rows:this.style.rows},bubbles:!0,composed:!0});this.el.dispatchEvent(t)}catch(t){console.warn("Error dispatching math-matrix-bottom-click from handleClickSlot",t)}this.updateValue(i.toString());const s=document.getElementById(n);if(this.clickable&&"checkerBlock"===this.type&&"mat1"===this.el.id&&(null==s?void 0:s.getAttribute("equationCheck"))&&s){const t=!!a(s.getAttribute("equationCheck"));console.log("Write Set checkerBlock click:",{result:t}),h(t)}r()}getSlotData(){const t={};return this.text?(this.text.split(",").forEach(((i,e)=>{const[s,o]=i.split("-"),n=parseInt(s.trim());isNaN(n)||(t[e]={text:s.trim(),color:null==o?void 0:o.trim()})})),t):t}render(){let t=1;const i=this.getSlotData();return c(d,{key:"8a17727416da00fda95c401c3a005cdea1e732d0",class:"math-matrix",style:{height:this.style.height,width:this.style.width,z:this.style.z,display:this.style.display,top:this.style.top,left:this.style.left},type:this.type,value:this.value,"tab-index":this.tabIndex,rows:this.style.rows,cols:this.style.cols,text:this.text,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry},Array.from({length:parseInt(this.style.rows)+1},((e,s)=>c("div",{class:"slot-parent",key:`row-${s}`},c("div",{style:0===s&&{visibility:"hidden"},class:"topIndex"},s),Array.from({length:parseInt(this.style.cols)},((e,o)=>{var n,l;return 0===s?c("div",{class:"leftIndex"},++o):c("div",{class:`slot slot-${t} ${this.defualtFill>=t?"slot-active":"slot-inactive"}`,onClick:t=>this.handleClickSlot(t.currentTarget),key:`slot-${s}-${o}`,style:{borderRadius:this.style.borderRadius,backgroundColor:(null===(n=i[t-1])||void 0===n?void 0:n.color)||""}},null===(l=i[t-1])||void 0===l?void 0:l.text,t++&&null)})),c("div",{style:0===s&&{visibility:"hidden"},class:"bottomIndex"},parseInt(this.style.cols)*s)))))}get el(){return this}static get style(){return".math-matrix{width:100%;height:100%;display:flex;justify-content:center}.slot{width:100%;height:100%;text-align:center;align-content:center;font-size:42px;font-weight:800;font-family:'Baloo Bhai 2';box-sizing:content-box}.slot:hover{opacity:0.7}.slot-parent{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.slot-active{background-color:var(--active-bg-color);background-image:var(--bg-image);background-size:contain;background-position:center;background-repeat:no-repeat}.slot-inactive{background-color:var(--deactive-bg-color);background-size:cover;background-position:center;background-repeat:no-repeat}.topIndex,.leftIndex,.bottomIndex{height:100%;width:100%;text-align:center;align-content:center;font-size:30px;font-weight:600;font-family:'Baloo Bhai 2'}"}},[0,"lido-math-matrix",{rows:[1],cols:[1],defualtFill:[1538,"defualt-fill"],leftIndex:[4,"left-index"],topIndex:[4,"top-index"],bottomIndex:[4,"bottom-index"],clickable:[4],activeOnlyVisible:[4,"active-only-visible"],matrixImage:[1,"matrix-image"],activeBgColor:[1537,"active-bg-color"],deactiveBgColor:[1537,"deactive-bg-color"],border:[1537],height:[1537],width:[1537],borderRadius:[1,"border-radius"],z:[1],margin:[1],padding:[1],visible:[1],text:[1],type:[1],value:[1],tabIndex:[2,"tab-index"],x:[1],y:[1],fontColor:[1,"font-color"],onCorrect:[1,"on-correct"],onInCorrect:[1,"on-in-correct"],onEntry:[1,"on-entry"],previousFilledSlot:[32],previousFilledSlotElement:[32],style:[32]}]);function m(){"undefined"!=typeof customElements&&["lido-math-matrix"].forEach((i=>{"lido-math-matrix"===i&&(customElements.get(t(i))||customElements.define(t(i),u))}))}m();export{u as L,m as d}
1
+ import{t,p as i,H as e,i as s,c as o,w as n,a as l,e as a,s as h,y as r,h as c,b as d}from"./index.js";const u=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.rows="10",this.cols="10",this.defualtFill=0,this.leftIndex=!1,this.topIndex=!1,this.bottomIndex=!1,this.clickable=!0,this.activeOnlyVisible=!1,this.activeBgColor="transparent",this.deactiveBgColor="transparent",this.border="2px solid green",this.height="100%",this.width="100%",this.borderRadius="5px",this.visible="false",this.previousFilledSlot=-1,this.previousFilledSlotElement=null,this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}updateValue(t){this.el.setAttribute("value",t)}componentDidLoad(){const t=this.el.querySelectorAll(".slot");s(this.el,this.type),t.forEach((t=>{const i=t;i.style.setProperty("--active-bg-color",this.activeBgColor),i.style.setProperty("--deactive-bg-color",this.deactiveBgColor),i.style.pointerEvents=this.clickable?"":"none",i.style.border=this.border,i.style.color=this.fontColor,i.className.includes("slot-active")?(i.style.visibility="",this.matrixImage&&i.style.setProperty("--bg-image",`url(${o(this.matrixImage)})`)):this.activeOnlyVisible&&(i.style.visibility="hidden")})),this.updateSlots(),this.updateStyles()}componentWillLoad(){this.updateStyles(),this.updateSlots(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateSlots(){const t=this.el.querySelectorAll(".slot"),i=this.el.querySelector(".slot");if(!t.length||!i)return;const e=document.getElementById(n);let s=this.rows,o=this.cols;e&&"multiplyBeeds"===e.getAttribute("template-id")&&(o="9",s="1");const l=Number(s)<Number(o)?this.el.offsetHeight:this.el.offsetWidth,a=Number(s)>Number(o)?Number(s):Number(o),h=this.el.querySelectorAll(".slot-parent"),r=l/a;h.forEach((t=>{t.style.width=`${r}px`,Array.from(t.children).forEach((t=>{const i=t;i.style.width=`${r}px`,i.style.height=`${r}px`,"drop"!==this.type&&"drag"!==this.type&&"checkerBlock"!==this.type||(this.el.style.width="auto",this.el.style.height="auto"),(!this.topIndex&&i.classList.contains("topIndex")||!this.leftIndex&&i.classList.contains("leftIndex")||!this.bottomIndex&&i.classList.contains("bottomIndex"))&&(i.classList.contains("leftIndex")&&i.parentElement.remove(),i.remove())}))}))}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:l(this.height,t),width:l(this.width,t),zIndex:this.z,display:"true"===l(`${this.visible}`,t)?"flex":"none",borderRadius:l(this.borderRadius,t),left:l(this.x,t),top:l(this.y,t),cols:l(`${this.cols}`,t),rows:l(`${this.rows}`,t)}}handleClickSlot(t){const i=parseInt(t.className.split(" ")[1].split("-")[1]),e=this.el.querySelectorAll(".slot");if(e.forEach(((t,e)=>{const s=t;e<i?(s.classList.add("slot-active"),s.classList.remove("slot-inactive"),this.matrixImage&&s.style.setProperty("--bg-image",`url(${o(this.matrixImage)})`)):(s.classList.remove("slot-active"),s.classList.add("slot-inactive"))})),-1!==this.previousFilledSlot&&null!==this.previousFilledSlotElement&&(this.previousFilledSlotElement.textContent=""),t.textContent=i.toString(),this.previousFilledSlot=i,this.previousFilledSlotElement=t,i===e.length)try{const t=new CustomEvent("math-matrix-bottom-click",{detail:{matrix:this.el,cols:this.style.cols,rows:this.style.rows},bubbles:!0,composed:!0});this.el.dispatchEvent(t)}catch(t){console.warn("Error dispatching math-matrix-bottom-click from handleClickSlot",t)}this.updateValue(i.toString());const s=document.getElementById(n);if(this.clickable&&"checkerBlock"===this.type&&"mat1"===this.el.id&&(null==s?void 0:s.getAttribute("equationCheck"))&&s){const t=!!a(s.getAttribute("equationCheck"));console.log("Write Set checkerBlock click:",{result:t}),h(t)}r()}getSlotData(){const t={};return this.text?(this.text.split(",").forEach(((i,e)=>{const[s,o]=i.split("-"),n=parseInt(s.trim());isNaN(n)||(t[e]={text:s.trim(),color:null==o?void 0:o.trim()})})),t):t}render(){let t=1;const i=this.getSlotData();return c(d,{key:"2ef30835855363ba9fc7932122d1d505a451e055",class:"math-matrix",style:{height:this.style.height,width:this.style.width,z:this.style.z,display:this.style.display,top:this.style.top,left:this.style.left},type:this.type,value:this.value,"tab-index":this.tabIndex,rows:this.style.rows,cols:this.style.cols,text:this.text,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry},Array.from({length:parseInt(this.style.rows)+1},((e,s)=>c("div",{class:"slot-parent",key:`row-${s}`},c("div",{style:0===s&&{visibility:"hidden"},class:"topIndex"},s),Array.from({length:parseInt(this.style.cols)},((e,o)=>{var n,l;return 0===s?c("div",{class:"leftIndex"},++o):c("div",{class:`slot slot-${t} ${this.defualtFill>=t?"slot-active":"slot-inactive"}`,onClick:t=>this.handleClickSlot(t.currentTarget),key:`slot-${s}-${o}`,style:{borderRadius:this.style.borderRadius,backgroundColor:(null===(n=i[t-1])||void 0===n?void 0:n.color)||""}},null===(l=i[t-1])||void 0===l?void 0:l.text,t++&&null)})),c("div",{style:0===s&&{visibility:"hidden"},class:"bottomIndex"},parseInt(this.style.cols)*s)))))}get el(){return this}static get style(){return".math-matrix{width:100%;height:100%;display:flex;justify-content:center}.slot{width:100%;height:100%;text-align:center;align-content:center;font-size:42px;font-weight:800;font-family:'Baloo Bhai 2';box-sizing:content-box}.slot:hover{opacity:0.7}.slot-parent{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.slot-active{background-color:var(--active-bg-color);background-image:var(--bg-image);background-size:contain;background-position:center;background-repeat:no-repeat}.slot-inactive{background-color:var(--deactive-bg-color);background-size:cover;background-position:center;background-repeat:no-repeat}.topIndex,.leftIndex,.bottomIndex{height:100%;width:100%;text-align:center;align-content:center;font-size:30px;font-weight:600;font-family:'Baloo Bhai 2'}"}},[0,"lido-math-matrix",{rows:[1],cols:[1],defualtFill:[1538,"defualt-fill"],leftIndex:[4,"left-index"],topIndex:[4,"top-index"],bottomIndex:[4,"bottom-index"],clickable:[4],activeOnlyVisible:[4,"active-only-visible"],matrixImage:[1,"matrix-image"],activeBgColor:[1537,"active-bg-color"],deactiveBgColor:[1537,"deactive-bg-color"],border:[1537],height:[1537],width:[1537],borderRadius:[1,"border-radius"],z:[1],margin:[1],padding:[1],visible:[1],text:[1],type:[1],value:[1],tabIndex:[2,"tab-index"],x:[1],y:[1],fontColor:[1,"font-color"],onCorrect:[1,"on-correct"],onInCorrect:[1,"on-in-correct"],onEntry:[1,"on-entry"],previousFilledSlot:[32],previousFilledSlotElement:[32],style:[32]}]);function m(){"undefined"!=typeof customElements&&["lido-math-matrix"].forEach((i=>{"lido-math-matrix"===i&&(customElements.get(t(i))||customElements.define(t(i),u))}))}m();export{u as L,m as d}
@@ -1 +1 @@
1
- import{t as i,p as t,H as s,c as e,k as n,i as h,a as l,z as o,h as a,b as r}from"./index.js";const d=t(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.id="lido-slide-fill",this.padding="",this.borderRadius="0px",this.numberType="integer",this.min=0,this.division=5,this.max=10,this.type="",this.onEntry="",this.svgContent="",this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1,this.originalHeight=null,this.originalY=null}async componentWillLoad(){await this.renderSVG(),this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}async onSrcChange(){await this.renderSVG(),this.onPropChange()}async renderSVG(){const i=await fetch(e(this.src));if(i.ok){let t=await i.text(),s=0;t=t.replace(/<path([^>]*)>/g,((i,t)=>(s++,`<path id="${1===s?"glassPath":2===s?"rulerPath":`path${s}`}"${t}>`))),t=t.replace(/<svg([^>]*)>/,'<svg class="lido-slide-svg"$1>\n \n <clipPath id="clipGlass">\n <use xlink:href="#glassPath" />\n </clipPath>\n \n '),t=t.replace(/<rect([^>]*)\/?>/,'<rect id="fillArea" $1 clip-path="url(#clipGlass)" />'),this.svgContent=t}}componentDidLoad(){n(this.el,this.delayVisible),h(this.el,this.type),this.updateFill(),this.addRulerNumbers()}updateStyles(){const i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:l(this.height,i),width:l(this.width,i),backgroundColor:l(this.bgColor,i),top:l(this.y,i),left:l(this.x,i),zIndex:this.z,display:l(`${this.visible}`,i)?"flex":"none",alignItems:"center",justifyContent:"center",margin:l(this.margin,i),padding:l(this.padding,i),borderRadius:this.borderRadius}}onPropChange(){this.updateFill(),this.addRulerNumbers()}updateFill(){var i;const t=null===(i=this.el.querySelector(".lido-svg-element"))||void 0===i?void 0:i.querySelector("svg");if(!t)return;const s=t.querySelector("#fillArea");if(!s)return;const e=this.fillDirection;let n,h;"vertical"===this.fillDirection?(null!==this.originalHeight&&null!==this.originalY||(this.originalHeight=+s.getAttribute("height")||100,this.originalY=+s.getAttribute("y")||0),n=this.originalHeight,h=this.originalY):(null!==this.originalHeight&&null!==this.originalY||(this.originalHeight=+s.getAttribute("width")||100,this.originalY=+s.getAttribute("x")||0),n=this.originalHeight,h=this.originalY);const l=n,o=h;let a=0;if("string"==typeof this.fill){const i=this.fill.match(/^(\d+(?:\.\d+)?)%$/);if(i)a=Math.min(Math.max(parseFloat(i[1])/100,0),1);else{const i=this.fill.match(/^(\d+(?:\.\d+)?)$/);i&&(a=Math.min(Math.max(parseFloat(i[1])/100,0),1))}}const r=l*a,d="vertical"===e?o+(l-r):o;"vertical"===e?(s.setAttribute("height",r.toString()),s.setAttribute("y",d.toString())):(s.setAttribute("width",r.toString()),s.setAttribute("x","0"))}addRulerNumbers(){var i;const t=null===(i=this.el.querySelector(".lido-svg-element"))||void 0===i?void 0:i.querySelector("svg");if(!t)return;const s=t.querySelector("#rulerPath");if(!s)return;t.querySelectorAll(".ruler-number").forEach((i=>i.remove()));const e=this.division,n=e+1,h=s.getTotalLength(),l=(this.max-this.min)/e;for(let i=0;i<n;i++){let n=0;"vertical"===this.fillDirection?n=this.max-i*l:"horizontal"===this.fillDirection&&(n=this.min+i*l);const a=s.getPointAtLength(h/e*i),r=document.createElementNS("http://www.w3.org/2000/svg","text"),d=o(n/this.max);n="integer"===this.numberType?Math.round(n):"decimal"===this.numberType?parseFloat(n.toFixed(1)):d.toFraction(!0),r.classList.add("ruler-number"),r.setAttribute("x",a.x.toString()),r.setAttribute("y",(a.y+15).toString()),r.setAttribute("text-anchor","end"),r.setAttribute("font-size","40"),r.setAttribute("fill","#333"),r.textContent=n.toString(),t.appendChild(r)}}render(){return a(r,{key:"a19d35ba055a5ed9ab38adb02f37c9cb634c272d",id:this.id,class:"lido-slide-fill",src:this.src,fill:this.fill,fillDirection:this.fillDirection,slider:this.slider,style:this.style,min:this.min,max:this.max,division:this.division,numberType:this.numberType,onEntry:this.onEntry,type:this.type,"disable-speak":this.disableSpeak},a("div",{key:"987f42b3c213f570714b2ddf600243e83c3b12ad",innerHTML:this.svgContent,class:"lido-svg-element"}))}get el(){return this}static get watchers(){return{src:[{onSrcChange:0}],fill:[{onPropChange:0}],division:[{onPropChange:0}],fillDirection:[{onPropChange:0}],numberType:[{onPropChange:0}],min:[{onPropChange:0}],max:[{onPropChange:0}]}}static get style(){return".lido-svg-element,.lido-slide-svg{width:100%;height:100%}"}},[0,"lido-slide-fill",{id:[1],width:[1],height:[1],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],visible:[8],margin:[1],padding:[1],borderRadius:[1,"border-radius"],fill:[1],numberType:[1,"number-type"],min:[2],division:[2],max:[2],slider:[4],src:[1],fillDirection:[1,"fill-direction"],type:[1],onEntry:[1,"on-entry"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],svgContent:[32],style:[32]},void 0,{src:[{onSrcChange:0}],fill:[{onPropChange:0}],division:[{onPropChange:0}],fillDirection:[{onPropChange:0}],numberType:[{onPropChange:0}],min:[{onPropChange:0}],max:[{onPropChange:0}]}]);function c(){"undefined"!=typeof customElements&&["lido-slide-fill"].forEach((t=>{"lido-slide-fill"===t&&(customElements.get(i(t))||customElements.define(i(t),d))}))}c();export{d as L,c as d}
1
+ import{t as i,p as t,H as s,c as e,k as n,i as h,a as l,z as a,h as o,b as r}from"./index.js";const d=t(class extends s{constructor(i){super(),!1!==i&&this.__registerHost(),this.id="lido-slide-fill",this.padding="",this.borderRadius="0px",this.numberType="integer",this.min=0,this.division=5,this.max=10,this.type="",this.onEntry="",this.svgContent="",this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles(),this.delayVisible="",this.disableSpeak=!1,this.originalHeight=null,this.originalY=null}async componentWillLoad(){await this.renderSVG(),this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}async onSrcChange(){await this.renderSVG(),this.onPropChange()}async renderSVG(){const i=await fetch(e(this.src));if(i.ok){let t=await i.text(),s=0;t=t.replace(/<path([^>]*)>/g,((i,t)=>(s++,`<path id="${1===s?"glassPath":2===s?"rulerPath":`path${s}`}"${t}>`))),t=t.replace(/<svg([^>]*)>/,'<svg class="lido-slide-svg"$1>\n \n <clipPath id="clipGlass">\n <use xlink:href="#glassPath" />\n </clipPath>\n \n '),t=t.replace(/<rect([^>]*)\/?>/,'<rect id="fillArea" $1 clip-path="url(#clipGlass)" />'),this.svgContent=t}}componentDidLoad(){n(this.el,this.delayVisible),h(this.el,this.type),this.updateFill(),this.addRulerNumbers()}updateStyles(){const i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:l(this.height,i),width:l(this.width,i),backgroundColor:l(this.bgColor,i),top:l(this.y,i),left:l(this.x,i),zIndex:this.z,display:l(`${this.visible}`,i)?"flex":"none",alignItems:"center",justifyContent:"center",margin:l(this.margin,i),padding:l(this.padding,i),borderRadius:this.borderRadius}}onPropChange(){this.updateFill(),this.addRulerNumbers()}updateFill(){var i;const t=null===(i=this.el.querySelector(".lido-svg-element"))||void 0===i?void 0:i.querySelector("svg");if(!t)return;const s=t.querySelector("#fillArea");if(!s)return;const e=this.fillDirection;let n,h;"vertical"===this.fillDirection?(null!==this.originalHeight&&null!==this.originalY||(this.originalHeight=+s.getAttribute("height")||100,this.originalY=+s.getAttribute("y")||0),n=this.originalHeight,h=this.originalY):(null!==this.originalHeight&&null!==this.originalY||(this.originalHeight=+s.getAttribute("width")||100,this.originalY=+s.getAttribute("x")||0),n=this.originalHeight,h=this.originalY);const l=n,a=h;let o=0;if("string"==typeof this.fill){const i=this.fill.match(/^(\d+(?:\.\d+)?)%$/);if(i)o=Math.min(Math.max(parseFloat(i[1])/100,0),1);else{const i=this.fill.match(/^(\d+(?:\.\d+)?)$/);i&&(o=Math.min(Math.max(parseFloat(i[1])/100,0),1))}}const r=l*o,d="vertical"===e?a+(l-r):a;"vertical"===e?(s.setAttribute("height",r.toString()),s.setAttribute("y",d.toString())):(s.setAttribute("width",r.toString()),s.setAttribute("x","0"))}addRulerNumbers(){var i;const t=null===(i=this.el.querySelector(".lido-svg-element"))||void 0===i?void 0:i.querySelector("svg");if(!t)return;const s=t.querySelector("#rulerPath");if(!s)return;t.querySelectorAll(".ruler-number").forEach((i=>i.remove()));const e=this.division,n=e+1,h=s.getTotalLength(),l=(this.max-this.min)/e;for(let i=0;i<n;i++){let n=0;"vertical"===this.fillDirection?n=this.max-i*l:"horizontal"===this.fillDirection&&(n=this.min+i*l);const o=s.getPointAtLength(h/e*i),r=document.createElementNS("http://www.w3.org/2000/svg","text"),d=a(n/this.max);n="integer"===this.numberType?Math.round(n):"decimal"===this.numberType?parseFloat(n.toFixed(1)):d.toFraction(!0),r.classList.add("ruler-number"),r.setAttribute("x",o.x.toString()),r.setAttribute("y",(o.y+15).toString()),r.setAttribute("text-anchor","end"),r.setAttribute("font-size","40"),r.setAttribute("fill","#333"),r.textContent=n.toString(),t.appendChild(r)}}render(){return o(r,{key:"ba987e7ba4a36b96763c6e434be58f5e64f59d88",id:this.id,class:"lido-slide-fill",src:this.src,fill:this.fill,fillDirection:this.fillDirection,slider:this.slider,style:this.style,min:this.min,max:this.max,division:this.division,numberType:this.numberType,onEntry:this.onEntry,type:this.type,"disable-speak":this.disableSpeak},o("div",{key:"904d482335451cf420b56a24f0ca3a279db4abc8",innerHTML:this.svgContent,class:"lido-svg-element"}))}get el(){return this}static get watchers(){return{src:[{onSrcChange:0}],fill:[{onPropChange:0}],division:[{onPropChange:0}],fillDirection:[{onPropChange:0}],numberType:[{onPropChange:0}],min:[{onPropChange:0}],max:[{onPropChange:0}]}}static get style(){return".lido-svg-element,.lido-slide-svg{width:100%;height:100%}"}},[0,"lido-slide-fill",{id:[1],width:[1],height:[1],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],visible:[8],margin:[1],padding:[1],borderRadius:[1,"border-radius"],fill:[1],numberType:[1,"number-type"],min:[2],division:[2],max:[2],slider:[4],src:[1],fillDirection:[1,"fill-direction"],type:[1],onEntry:[1,"on-entry"],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],svgContent:[32],style:[32]},void 0,{src:[{onSrcChange:0}],fill:[{onPropChange:0}],division:[{onPropChange:0}],fillDirection:[{onPropChange:0}],numberType:[{onPropChange:0}],min:[{onPropChange:0}],max:[{onPropChange:0}]}]);function c(){"undefined"!=typeof customElements&&["lido-slide-fill"].forEach((t=>{"lido-slide-fill"===t&&(customElements.get(i(t))||customElements.define(i(t),d))}))}c();export{d as L,c as d}
@@ -1 +1 @@
1
- import{t,p as e,H as i,w as s,S as o,s as n,A as a,x as r,f as d,g as l,j as h,u as c,D as p,a as u,h as b,b as f}from"./index.js";import{d as y}from"./p-Cj-6tqzU.js";const g=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.keys="",this.gap="10px",this.bgColor="",this.borderRadius="",this.keyboardInput=!1,this.columns="10",this.disableSpeak=!1,this.numberOfClick=0,this.inputString="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}async inputValidation(t){if("click"!==this.type)return;const e=document.getElementById(s);if(!t.target.getAttribute("value"))return;let i=JSON.parse(localStorage.getItem(o))||"";localStorage.setItem(o,JSON.stringify(i));const p=document.body.getBoundingClientRect(),u=Array.from(e.querySelectorAll(".bubble-element")).filter((t=>{const e=t.getBoundingClientRect();return e.left<p.right&&e.right>p.left&&e.top<p.bottom&&e.bottom>p.top})).find((t=>{const e=t.getAttribute("value");return(null==e?void 0:e.startsWith(this.inputString.toLowerCase()))?t:null}));if(u){if(this.inputString.toLowerCase()===u.getAttribute("value").toLowerCase()){n(!0),a.getI().play(u),r(u),setTimeout((()=>{this.inputString=""}),1e3);const t=u.getAttribute("onCorrect");if(await d(t,u),u.style.animation="none",u.style.pointerEvents="none",this.numberOfClick++,localStorage.removeItem(o),this.numberOfClick===this.letterLength){const t=e.getAttribute("onCorrect");e.style.pointerEvents="none",await d(t,this.el),l(),h()}else c(u)}}else{n(!1),setTimeout((()=>{this.inputString=""}),1e3),localStorage.removeItem(o);const t=e.getAttribute("onInCorrect");await d(t,this.el)}}componentDidLoad(){if(document.getElementById(s).getAttribute("drop-action")===p.InfiniteDrop){const t=this.el.querySelectorAll(".key-button"),e=t[0];t.forEach((t=>{t.style.width=e.offsetWidth+"px",t.style.height=e.offsetHeight+"px"}))}}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:u(this.height,t),width:u(this.width,t),backgroundColor:u(this.bgColor,t),top:u(this.y,t),left:u(this.x,t),zIndex:this.z,fontSize:u(this.fontSize,t),fontFamily:this.fontFamily,color:u(this.fontColor,t),display:"true"===u(`${this.visible}`,t)?"flex":"none",margin:u(this.margin,t),padding:u(this.padding,t),borderRadius:u(this.borderRadius,t),columns:u(`${this.columns}`,t),gap:u(this.gap,t)}}render(){const t=this.keys.split(",").map((t=>t.trim())),e="true"===document.getElementById(s).getAttribute("show-check");return b(f,{key:"4de3b75fa2905744ad610d147d9b4fe9912dd732",class:"lido-keyboard",style:{width:this.style.width,height:this.style.height,position:"relative",margin:this.style.margin,zIndex:this.z}},this.keyboardInput&&b("div",{key:"7b5d293c52747700cde9c1069cfbbdae065e64f9",class:"input-area"},b("input",{key:"03a91cd87e6bb4f09bf698087258426dd9232f67",type:"text",value:this.inputString,class:"input-area",readonly:!0}),b("lido-text",{key:"d30e033a055df52b30b2f2775c2b3410ee37df63",visible:e?"true":"false",string:"<<","bg-color":"black","font-color":"white","border-radius":"20px","font-size":"30px",width:"100px",height:"70px",type:"click",onClick:()=>{this.inputString=this.inputString.slice(0,-1),this.inputValidation(event)}}),b("lido-text",{key:"70d78aed7dedbe7d03a05c13c4c320029280bb03",visible:e?"true":"false",id:"lido-checkButton",string:"Enter","bg-color":"green","font-color":"white","border-radius":"20px","font-size":"30px",width:"150px",height:"70px",type:"click"})),this.letterLength&&b("lido-text",{key:"19306cd12bd98dc8dc7b54b20bad3f2f0318116f",visible:"true",string:`${this.numberOfClick}/${this.letterLength}`,"font-size":"60px","font-color":"white",onEntry:"this.position='absolute'; this.right='0'; this.fontWeight='800';",x:"unset"}),b("div",{key:"826900d6ba26175eb45d2e7e4c02fccce2004db3",class:"keyboard-wrapper",style:{display:"flex",flexWrap:"wrap",justifyContent:"center",alignContent:"stretch",gap:this.gap,width:"100%",height:"100%"}},t.map(((t,e)=>{const[i,s]=t.split("-"),o="disable"===s;let n="Space"===i?" ":i;return b("lido-text",{id:"key-button-"+e,style:{flex:`0 0 calc(${100/parseInt(this.style.columns)}% - ${this.style.gap})`},visible:"true","font-size":this.style.fontSize,"font-color":this.fontColor,"font-family":this.fontFamily,"bg-color":this.bgColor,string:i,onEntry:this.onEntry,"border-radius":this.style.borderRadius,value:i.toLowerCase(),type:this.type,class:"key-button"+(o?" disabled":""),onClick:()=>{this.inputString+=n,this.inputValidation(event)},"disable-speak":this.disableSpeak})}))))}get el(){return this}static get style(){return'.lido-keyboard{display:flex;flex-direction:column;align-items:center;gap:30px}.input-area{display:flex;gap:15px}input[type="text"]{font-size:30px;font-weight:600;padding-left:20px;width:300px;height:70px;border:2px solid;background:whitesmoke;border-radius:20px;text-align:center}.keyboard-wrapper{justify-content:center;width:700px}.disabled{opacity:0.5;pointer-events:none}.key-button{background:aquamarine;font-weight:600}'}},[0,"lido-keyboard",{keys:[1],width:[1],height:[1],fontSize:[1,"font-size"],fontColor:[1,"font-color"],fontFamily:[1,"font-family"],gap:[1],bgColor:[1,"bg-color"],borderRadius:[1,"border-radius"],y:[1],x:[1],z:[1],margin:[1],padding:[1],visible:[1],onEntry:[1,"on-entry"],type:[1],keyboardInput:[4,"keyboard-input"],columns:[1],letterLength:[2,"letter-length"],disableSpeak:[4,"disable-speak"],numberOfClick:[32],inputString:[32],style:[32]}]);function x(){"undefined"!=typeof customElements&&["lido-keyboard","lido-text"].forEach((e=>{switch(e){case"lido-keyboard":customElements.get(t(e))||customElements.define(t(e),g);break;case"lido-text":customElements.get(t(e))||y()}}))}x();export{g as L,x as d}
1
+ import{t,p as e,H as i,w as s,S as o,s as n,A as a,x as r,f as l,g as d,j as h,u as c,D as p,a as u,h as b,b as f}from"./index.js";import{d as y}from"./p-BOQDbCrm.js";const g=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.keys="",this.gap="10px",this.bgColor="",this.borderRadius="",this.keyboardInput=!1,this.columns="10",this.disableSpeak=!1,this.numberOfClick=0,this.inputString="",this.style={},this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}async inputValidation(t){if("click"!==this.type)return;const e=document.getElementById(s);if(!t.target.getAttribute("value"))return;let i=JSON.parse(localStorage.getItem(o))||"";localStorage.setItem(o,JSON.stringify(i));const p=document.body.getBoundingClientRect(),u=Array.from(e.querySelectorAll(".bubble-element")).filter((t=>{const e=t.getBoundingClientRect();return e.left<p.right&&e.right>p.left&&e.top<p.bottom&&e.bottom>p.top})).find((t=>{const e=t.getAttribute("value");return(null==e?void 0:e.startsWith(this.inputString.toLowerCase()))?t:null}));if(u){if(this.inputString.toLowerCase()===u.getAttribute("value").toLowerCase()){n(!0),a.getI().play(u),r(u),setTimeout((()=>{this.inputString=""}),1e3);const t=u.getAttribute("onCorrect");if(await l(t,u),u.style.animation="none",u.style.pointerEvents="none",this.numberOfClick++,localStorage.removeItem(o),this.numberOfClick===this.letterLength){const t=e.getAttribute("onCorrect");e.style.pointerEvents="none",await l(t,this.el),d(),h()}else c(u)}}else{n(!1),setTimeout((()=>{this.inputString=""}),1e3),localStorage.removeItem(o);const t=e.getAttribute("onInCorrect");await l(t,this.el)}}componentDidLoad(){if(document.getElementById(s).getAttribute("drop-action")===p.InfiniteDrop){const t=this.el.querySelectorAll(".key-button"),e=t[0];t.forEach((t=>{t.style.width=e.offsetWidth+"px",t.style.height=e.offsetHeight+"px"}))}}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:u(this.height,t),width:u(this.width,t),backgroundColor:u(this.bgColor,t),top:u(this.y,t),left:u(this.x,t),zIndex:this.z,fontSize:u(this.fontSize,t),fontFamily:this.fontFamily,color:u(this.fontColor,t),display:"true"===u(`${this.visible}`,t)?"flex":"none",margin:u(this.margin,t),padding:u(this.padding,t),borderRadius:u(this.borderRadius,t),columns:u(`${this.columns}`,t),gap:u(this.gap,t)}}render(){const t=this.keys.split(",").map((t=>t.trim())),e="true"===document.getElementById(s).getAttribute("show-check");return b(f,{key:"5773e8189c512e90d63217048f9372d00e4a7fe9",class:"lido-keyboard",style:{width:this.style.width,height:this.style.height,position:"relative",margin:this.style.margin,zIndex:this.z}},this.keyboardInput&&b("div",{key:"136fa3a2b0459a9a63e14ac8e212997e4bd32224",class:"input-area"},b("input",{key:"d9a1dc064d615b40b1e0e2b008dbf79ec70eb19b",type:"text",value:this.inputString,class:"input-area",readonly:!0}),b("lido-text",{key:"e6c53ea590c607b355d1f57d445d078c0bcf9085",visible:e?"true":"false",string:"<<","bg-color":"black","font-color":"white","border-radius":"20px","font-size":"30px",width:"100px",height:"70px",type:"click",onClick:()=>{this.inputString=this.inputString.slice(0,-1),this.inputValidation(event)}}),b("lido-text",{key:"815877bd027aa3540871c511df5937cfb0b6f149",visible:e?"true":"false",id:"lido-checkButton",string:"Enter","bg-color":"green","font-color":"white","border-radius":"20px","font-size":"30px",width:"150px",height:"70px",type:"click"})),this.letterLength&&b("lido-text",{key:"73c08eac4f9c154f47371e812fb337de26b10691",visible:"true",string:`${this.numberOfClick}/${this.letterLength}`,"font-size":"60px","font-color":"white",onEntry:"this.position='absolute'; this.right='0'; this.fontWeight='800';",x:"unset"}),b("div",{key:"1e7855724f15fdb432320f6186fc356518a29224",class:"keyboard-wrapper",style:{display:"flex",flexWrap:"wrap",justifyContent:"center",alignContent:"stretch",gap:this.gap,width:"100%",height:"100%"}},t.map(((t,e)=>{const[i,s]=t.split("-"),o="disable"===s;let n="Space"===i?" ":i;return b("lido-text",{id:"key-button-"+e,style:{flex:`0 0 calc(${100/parseInt(this.style.columns)}% - ${this.style.gap})`},visible:"true","font-size":this.style.fontSize,"font-color":this.fontColor,"font-family":this.fontFamily,"bg-color":this.bgColor,string:i,onEntry:this.onEntry,"border-radius":this.style.borderRadius,value:i.toLowerCase(),type:this.type,class:"key-button"+(o?" disabled":""),onClick:()=>{this.inputString+=n,this.inputValidation(event)},"disable-speak":this.disableSpeak})}))))}get el(){return this}static get style(){return'.lido-keyboard{display:flex;flex-direction:column;align-items:center;gap:30px}.input-area{display:flex;gap:15px}input[type="text"]{font-size:30px;font-weight:600;padding-left:20px;width:300px;height:70px;border:2px solid;background:whitesmoke;border-radius:20px;text-align:center}.keyboard-wrapper{justify-content:center;width:700px}.disabled{opacity:0.5;pointer-events:none}.key-button{background:aquamarine;font-weight:600}'}},[0,"lido-keyboard",{keys:[1],width:[1],height:[1],fontSize:[1,"font-size"],fontColor:[1,"font-color"],fontFamily:[1,"font-family"],gap:[1],bgColor:[1,"bg-color"],borderRadius:[1,"border-radius"],y:[1],x:[1],z:[1],margin:[1],padding:[1],visible:[1],onEntry:[1,"on-entry"],type:[1],keyboardInput:[4,"keyboard-input"],columns:[1],letterLength:[2,"letter-length"],disableSpeak:[4,"disable-speak"],numberOfClick:[32],inputString:[32],style:[32]}]);function x(){"undefined"!=typeof customElements&&["lido-keyboard","lido-text"].forEach((e=>{switch(e){case"lido-keyboard":customElements.get(t(e))||customElements.define(t(e),g);break;case"lido-text":customElements.get(t(e))||y()}}))}x();export{g as L,x as d}