@pie-element/math-templated 0.1.0

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 (214) hide show
  1. package/dist/author/defaults.d.ts +174 -0
  2. package/dist/author/defaults.d.ts.map +1 -0
  3. package/dist/author/defaults.js +123 -0
  4. package/dist/author/design.d.ts +36 -0
  5. package/dist/author/design.d.ts.map +1 -0
  6. package/dist/author/design.js +494 -0
  7. package/dist/author/index.d.ts +43 -0
  8. package/dist/author/index.d.ts.map +1 -0
  9. package/dist/author/index.js +98 -0
  10. package/dist/author/markupUtils.d.ts +12 -0
  11. package/dist/author/markupUtils.d.ts.map +1 -0
  12. package/dist/author/markupUtils.js +10 -0
  13. package/dist/author/response.d.ts +42 -0
  14. package/dist/author/response.d.ts.map +1 -0
  15. package/dist/author/response.js +342 -0
  16. package/dist/author/utils.d.ts +10 -0
  17. package/dist/author/utils.d.ts.map +1 -0
  18. package/dist/author/utils.js +7 -0
  19. package/dist/controller/defaults.d.ts +30 -0
  20. package/dist/controller/defaults.d.ts.map +1 -0
  21. package/dist/controller/defaults.js +23 -0
  22. package/dist/controller/index.d.ts +38 -0
  23. package/dist/controller/index.d.ts.map +1 -0
  24. package/dist/controller/index.js +125 -0
  25. package/dist/delivery/index.d.ts +21 -0
  26. package/dist/delivery/index.d.ts.map +1 -0
  27. package/dist/delivery/index.js +51 -0
  28. package/dist/delivery/main.d.ts +40 -0
  29. package/dist/delivery/main.d.ts.map +1 -0
  30. package/dist/delivery/main.js +538 -0
  31. package/dist/index.d.ts +2 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.iife.d.ts +9 -0
  34. package/dist/index.iife.d.ts.map +1 -0
  35. package/dist/index.iife.js +224 -0
  36. package/dist/index.js +2 -0
  37. package/dist/math-templated.css +2 -0
  38. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
  39. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
  40. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
  41. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
  42. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
  43. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
  44. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
  45. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +11 -0
  46. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
  47. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
  48. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
  49. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
  50. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
  51. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
  52. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
  53. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  54. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +7 -0
  55. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
  56. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +7 -0
  57. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
  58. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
  59. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
  60. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
  61. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
  62. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
  63. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
  64. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.js +13 -0
  65. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +10 -0
  66. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  67. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
  68. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseHasIn.js +6 -0
  69. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
  70. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +8 -0
  71. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  72. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
  73. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
  74. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
  75. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  76. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
  77. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
  78. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePick.js +10 -0
  79. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePickBy.js +13 -0
  80. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
  81. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSet.js +22 -0
  82. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
  83. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
  84. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +15 -0
  85. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js +8 -0
  86. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
  87. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +6 -0
  88. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +10 -0
  89. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  90. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
  91. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
  92. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
  93. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
  94. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  95. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
  96. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
  97. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
  98. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  99. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
  100. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
  101. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +35 -0
  102. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +35 -0
  103. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +32 -0
  104. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_flatRest.js +9 -0
  105. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
  106. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
  107. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  108. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
  109. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
  110. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
  111. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
  112. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
  113. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  114. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
  115. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
  116. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hasPath.js +18 -0
  117. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
  118. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
  119. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
  120. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
  121. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
  122. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
  123. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
  124. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
  125. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isFlattenable.js +10 -0
  126. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
  127. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
  128. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +11 -0
  129. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
  130. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
  131. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
  132. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
  133. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
  134. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
  135. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
  136. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
  137. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
  138. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  139. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
  140. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
  141. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
  142. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +9 -0
  143. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +11 -0
  144. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
  145. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
  146. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  147. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
  148. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
  149. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
  150. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
  151. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
  152. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +7 -0
  153. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +6 -0
  154. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +9 -0
  155. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
  156. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
  157. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
  158. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
  159. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
  160. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
  161. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
  162. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +10 -0
  163. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +10 -0
  164. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
  165. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
  166. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
  167. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
  168. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/debounce.js +50 -0
  169. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +16 -0
  170. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
  171. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/flatten.js +7 -0
  172. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/hasIn.js +8 -0
  173. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
  174. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
  175. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
  176. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
  177. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
  178. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
  179. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js +7 -0
  180. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
  181. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
  182. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
  183. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
  184. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
  185. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
  186. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +9 -0
  187. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
  188. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
  189. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
  190. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +16 -0
  191. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/now.js +7 -0
  192. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/pick.js +8 -0
  193. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
  194. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
  195. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/throttle.js +15 -0
  196. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js +19 -0
  197. package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toString.js +7 -0
  198. package/dist/print/index.d.ts +16 -0
  199. package/dist/print/index.d.ts.map +1 -0
  200. package/dist/print/index.js +47 -0
  201. package/package.json +80 -0
  202. package/src/author/defaults.ts +133 -0
  203. package/src/author/design.tsx +526 -0
  204. package/src/author/index.ts +195 -0
  205. package/src/author/markupUtils.tsx +55 -0
  206. package/src/author/response.tsx +397 -0
  207. package/src/author/utils.ts +24 -0
  208. package/src/controller/defaults.ts +31 -0
  209. package/src/controller/index.ts +294 -0
  210. package/src/delivery/index.ts +94 -0
  211. package/src/delivery/main.tsx +800 -0
  212. package/src/index.iife.ts +16 -0
  213. package/src/index.ts +1 -0
  214. package/src/print/index.tsx +99 -0
@@ -0,0 +1,51 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/debounce.js";
2
+ import t from "./main.js";
3
+ import n from "react";
4
+ import { createRoot as r } from "react-dom/client";
5
+ import { ModelSetEvent as i, SessionChangedEvent as a } from "@pie-element/shared-player-events";
6
+ //#region src/delivery/index.ts
7
+ var o = class extends HTMLElement {
8
+ constructor() {
9
+ super(), this._root = null, this.sessionChangedEventCaller = e(() => {
10
+ this.dispatchEvent(new a(this.tagName.toLowerCase(), !0));
11
+ }, 1e3);
12
+ }
13
+ set model(e) {
14
+ this._model = e, this.render(), this.dispatchEvent(new i(this.tagName.toLowerCase(), this.isSessionComplete(), this._model !== void 0));
15
+ }
16
+ get model() {
17
+ return this._model;
18
+ }
19
+ set session(e) {
20
+ this._session = e, this.render();
21
+ }
22
+ get session() {
23
+ return this._session;
24
+ }
25
+ isSessionComplete() {
26
+ return !0;
27
+ }
28
+ onSessionChange(e) {
29
+ Object.keys(e).map((t) => {
30
+ this._session[t] = e[t];
31
+ }), this.sessionChangedEventCaller(), this.render();
32
+ }
33
+ connectedCallback() {
34
+ this.render();
35
+ }
36
+ render() {
37
+ if (!(!this._model || !this._session) && this._model && this._session) {
38
+ let e = n.createElement(t, {
39
+ model: this._model,
40
+ session: this._session,
41
+ onSessionChange: this.onSessionChange.bind(this)
42
+ });
43
+ this._root ||= r(this), this._root.render(e);
44
+ }
45
+ }
46
+ disconnectedCallback() {
47
+ this._root && this._root.unmount();
48
+ }
49
+ };
50
+ //#endregion
51
+ export { o as default };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @synced-from pie-elements/packages/math-templated/src/main.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class Main extends React.Component {
12
+ static getResponseKey: (response: any) => any;
13
+ static propTypes: {
14
+ session: PropTypes.Validator<object>;
15
+ onSessionChange: PropTypes.Requireable<(...args: any[]) => any>;
16
+ model: PropTypes.Validator<object>;
17
+ };
18
+ constructor(props: any);
19
+ handleAnswerBlockDomUpdate: any;
20
+ UNSAFE_componentWillReceiveProps(nextProps: any): void;
21
+ shouldComponentUpdate(nextProps: any, nextState: any): boolean;
22
+ componentDidMount(): void;
23
+ componentDidUpdate(): void;
24
+ onSubFieldFocus: any;
25
+ toNodeData: any;
26
+ setInput: any;
27
+ onClick: any;
28
+ callOnSessionChange: any;
29
+ toggleShowCorrect: any;
30
+ subFieldChanged: any;
31
+ getFieldName: any;
32
+ onBlur: any;
33
+ setTooltipRef(ref: any): void;
34
+ renderTeacherInstructions: any;
35
+ renderRationale: any;
36
+ renderPlayerContent: any;
37
+ render(): React.JSX.Element;
38
+ }
39
+ export default Main;
40
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/delivery/main.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAmRnC,qBAAa,IAAK,SAAQ,KAAK,CAAC,SAAS;IAEvC,MAAM,CAAC,cAAc,GAAI,aAAQ,SAAgE;IAEjG,MAAM,CAAC,SAAS;;;;MAId;gBAEU,KAAK,KAAA;IAyCjB,0BAA0B,EAAE,GAAG,CA8B7B;IAEF,gCAAgC,CAAC,SAAS,KAAA;IA+C1C,qBAAqB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA;IAO1C,iBAAiB;IAKjB,kBAAkB;IAIlB,eAAe,EAAE,GAAG,CAElB;IAEF,UAAU,EAAE,GAAG,CAcb;IAEF,QAAQ,EAAE,GAAG,CAEX;IAEF,OAAO,EAAE,GAAG,CAoBV;IAEF,mBAAmB,EAAE,GAAG,CAMtB;IAEF,iBAAiB,EAAE,GAAG,CAEpB;IAEF,eAAe,EAAE,GAAG,CAiBlB;IAEF,YAAY,EAAE,GAAG,CAYf;IAEF,MAAM,EAAE,GAAG,CAuCT;IAGF,aAAa,CAAC,GAAG,KAAA;IAcjB,yBAAyB,EAAE,GAAG,CAuB5B;IAEF,eAAe,EAAE,GAAG,CAiBlB;IAEF,mBAAmB,EAAE,GAAG,CAsHtB;IAEF,MAAM;CAsDP;AAED,eAAe,IAAI,CAAC"}
@@ -0,0 +1,538 @@
1
+ import e from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js";
2
+ import t from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js";
3
+ import n from "react";
4
+ import r from "prop-types";
5
+ import { styled as i } from "@mui/material/styles";
6
+ import a from "@mui/material/Tooltip";
7
+ import { HorizontalKeypad as o, mq as s, updateSpans as c } from "@pie-lib/math-input";
8
+ import { Collapsible as l, PreviewPrompt as u, Readable as d, UiLayout as f, color as p, hasMedia as m, hasText as h } from "@pie-lib/render-ui";
9
+ import { renderMath as g } from "@pie-element/shared-math-rendering-mathjax";
10
+ import { Customizable as _ } from "@pie-lib/mask-markup";
11
+ import v from "@pie-lib/correct-answer-toggle";
12
+ import y from "react-dom";
13
+ import b from "@pie-framework/mathquill";
14
+ import { jsxDEV as x } from "react/jsx-dev-runtime";
15
+ //#region src/delivery/main.tsx
16
+ var S = "/Users/eelco.hillenius/dev/prj/pie/pie-elements-ng/packages/elements-react/math-templated/src/delivery/main.tsx", C = i(f)({
17
+ color: p.text(),
18
+ backgroundColor: p.background(),
19
+ display: "inline-block"
20
+ }), w = i("div")({
21
+ width: "100%",
22
+ position: "relative",
23
+ backgroundColor: p.background(),
24
+ color: p.text()
25
+ }), T = i("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), E = i("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), D = i("div")({
26
+ position: "relative",
27
+ "& > div > div": {
28
+ display: "flex",
29
+ alignItems: "baseline",
30
+ flexWrap: "wrap"
31
+ },
32
+ "& .mq-overarrow-inner": {
33
+ border: "none !important",
34
+ padding: "0 !important"
35
+ },
36
+ "& .mq-overarrow-inner-right": { display: "none !important" },
37
+ "& .mq-overarrow-inner-left": { display: "none !important" },
38
+ "& .mq-overarrow.mq-arrow-both": {
39
+ minWidth: "1.23em",
40
+ "& *": { lineHeight: "1 !important" },
41
+ "&:before": {
42
+ top: "-0.4em",
43
+ left: "-1px"
44
+ },
45
+ "&:after": {
46
+ top: "-2.4em",
47
+ right: "-1px"
48
+ },
49
+ "&.mq-empty:after": { top: "-0.45em" }
50
+ },
51
+ "& .mq-overarrow.mq-arrow-right": { "&:before": {
52
+ top: "-0.4em",
53
+ right: "-1px"
54
+ } },
55
+ "& .mq-longdiv-inner": {
56
+ borderTop: "1px solid !important",
57
+ paddingTop: "1.5px !important"
58
+ },
59
+ "& .mq-parallelogram": { lineHeight: .85 }
60
+ }), O = i("div")(({ theme: e, $incorrect: t, $correct: n, $showCorrectness: r, $correctAnswerShown: i }) => ({
61
+ maxWidth: "fit-content",
62
+ ...t && { borderColor: `${p.incorrect()} !important` },
63
+ ...n && { borderColor: `${p.correct()} !important` },
64
+ ...r && { border: "2px solid" },
65
+ ...i && {
66
+ padding: e.spacing(1),
67
+ letterSpacing: "0.5px"
68
+ },
69
+ "& > .mq-math-mode": {
70
+ "& > .mq-root-block": { "& > .mq-editable-field": {
71
+ minWidth: "10px",
72
+ padding: e.spacing(.25)
73
+ } },
74
+ "& sup": { top: 0 }
75
+ }
76
+ })), k = i(s.Static)({ "& > .mq-root-block": { "& > .mq-editable-field": { borderColor: p.text() } } }), A = i("div")(({ theme: e }) => ({
77
+ zIndex: 10,
78
+ minWidth: "400px",
79
+ marginTop: e.spacing(2)
80
+ })), j = i("div")(({ theme: e }) => ({
81
+ marginBottom: e.spacing(1),
82
+ pointerEvents: "none"
83
+ })), M = i("h2")({
84
+ position: "absolute",
85
+ left: "-10000px",
86
+ top: "auto",
87
+ width: "1px",
88
+ height: "1px",
89
+ overflow: "hidden"
90
+ }), N = i("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), P = i(v)(({ theme: e }) => ({
91
+ color: p.text(),
92
+ marginBottom: e.spacing(2)
93
+ }));
94
+ if (typeof document < "u") {
95
+ let e = "math-templated-main-styles";
96
+ if (!document.getElementById(e)) {
97
+ let t = document.createElement("style");
98
+ t.id = e, t.textContent = `
99
+ .block-container {
100
+ margin: 8px !important;
101
+ display: inline-flex;
102
+ border: 2px solid grey !important;
103
+ }
104
+ .block-response {
105
+ flex: 2;
106
+ color: grey;
107
+ background: rgba(0, 0, 0, 0.04);
108
+ font-size: 0.8rem !important;
109
+ padding: 4px !important;
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ border-right: 2px solid #bdbdbd !important;
114
+ }
115
+ .block-math {
116
+ color: ${p.text()};
117
+ background-color: ${p.background()};
118
+ padding: 4px !important;
119
+ display: flex;
120
+ align-items: center;
121
+ justify-content: center;
122
+ flex: 8;
123
+ }
124
+ .block-math > .mq-math-mode > .mq-hasCursor > .mq-cursor {
125
+ display: none;
126
+ }
127
+ .correct {
128
+ border-color: ${p.correct()} !important;
129
+ }
130
+ .incorrect {
131
+ border-color: ${p.incorrect()} !important;
132
+ }
133
+ `, document.head.appendChild(t);
134
+ }
135
+ }
136
+ var F = /(\{\{\d+\}\})/gm, I = 6, L = !1, R = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
137
+ function z(e = []) {
138
+ let t = (e = "") => e.replace(/\$\$/g, "").replace(/^\$|\$$/g, "").trim();
139
+ return e.map((e) => ({
140
+ name: e,
141
+ latex: t(e),
142
+ write: t(e),
143
+ label: t(e)
144
+ }));
145
+ }
146
+ function B(e = [], t) {
147
+ return Math.floor(e.length / 5) * 30 + (t === "miscellaneous" ? 600 : 500);
148
+ }
149
+ function V(e) {
150
+ return e.split(F).filter((e) => e);
151
+ }
152
+ function H(e, t) {
153
+ let { responses: n, disabled: r, markup: i, printMode: a, alwaysShowCorrect: o } = e || {};
154
+ if (i) return t.showCorrect ? Object.keys(n || {}).reduce((e, t) => (e[t] = n?.[t]?.answer, e), {}) : V(i).reduce((e, n) => {
155
+ if (n.match(F)) {
156
+ let i = U.getResponseKey(n), s = t.session.answers[`r${i}`];
157
+ if (a && !o) {
158
+ let t = "\\ \\ ".repeat(30) + "\\embed{newLine}[] ";
159
+ return {
160
+ ...e,
161
+ [i]: `\\MathQuillMathField[r${i}]{${t.repeat(3)}}`
162
+ };
163
+ }
164
+ return r ? {
165
+ ...e,
166
+ [i]: `\\embed{answerBlock}[r${i}]`
167
+ } : {
168
+ ...e,
169
+ [i]: `\\MathQuillMathField[r${i}]{${s && s.value || ""}}`
170
+ };
171
+ }
172
+ return e;
173
+ }, {});
174
+ }
175
+ var U = class i extends n.Component {
176
+ static getResponseKey = (e) => (e || "").replaceAll("{{", "").replaceAll("}}", "");
177
+ static propTypes = {
178
+ session: r.object.isRequired,
179
+ onSessionChange: r.func,
180
+ model: r.object.isRequired
181
+ };
182
+ constructor(e) {
183
+ super(e);
184
+ let t = {}, { model: r, session: a } = e || {}, { markup: o, alwaysShowCorrect: s } = r || {}, { answers: c } = a || {};
185
+ o && (o || "").replace(F, (e) => {
186
+ let n = i.getResponseKey(e), r = c && c[`r${n}`];
187
+ t[`r${n}`] = { value: r?.value || "" };
188
+ }), this.state = {
189
+ session: {
190
+ ...e.session,
191
+ answers: t
192
+ },
193
+ activeAnswerBlock: "",
194
+ showCorrect: s || !1,
195
+ tooltipContainerRef: n.createRef()
196
+ }, typeof window < "u" && !L && (b.getInterface(2).registerEmbed("answerBlock", (e) => ({
197
+ htmlString: `<div class="block-container">
198
+ <div class="block-response" id="${e}Index">R</div>
199
+ <div class="block-math">
200
+ <span id="${e}"></span>
201
+ </div>
202
+ </div>`,
203
+ text: () => "text",
204
+ latex: () => `\\embed{answerBlock}[${e}]`
205
+ })), L = !0);
206
+ }
207
+ handleAnswerBlockDomUpdate = () => {
208
+ let { model: e } = this.props, { session: t, showCorrect: n } = this.state, r = t.answers;
209
+ this.root && e.disabled && !n && Object.keys(r).forEach((t) => {
210
+ let n = this.root.querySelector(`#${t}`), i = this.root.querySelector(`#${t}Index`);
211
+ if (n) {
212
+ let a = b.getInterface(2), o = r[t];
213
+ n.textContent = o && o.value || "", e.view && (n.parentElement.parentElement.classList.remove("correct"), n.parentElement.parentElement.classList.remove("incorrect")), a.StaticMath(n), i.textContent = "R";
214
+ }
215
+ }), this.root && g(this.root);
216
+ };
217
+ UNSAFE_componentWillReceiveProps(e) {
218
+ let { model: n } = this.props, { model: r = {} } = e || {}, { markup: a = "", env: o = {} } = n || {}, { markup: s = "", env: c = {}, alwaysShowCorrect: l = !1 } = r, u = (e) => e && e.mode === "evaluate";
219
+ (!u(o) || !u(c)) && this.setState((e) => ({
220
+ ...e.session,
221
+ showCorrect: !1
222
+ })), l && this.setState({ showCorrect: !0 });
223
+ let d = a.match(F), f = s.match(F);
224
+ if (!t(d, f)) {
225
+ let e = {}, t = this.state.session.answers;
226
+ (f || []).forEach((n) => {
227
+ let r = i.getResponseKey(n), a = t && t[`r${r}`];
228
+ e[`r${r}`] = { value: a?.value || "" };
229
+ }), this.setState((t) => ({ session: {
230
+ ...t.session,
231
+ answers: e
232
+ } }), () => {
233
+ this.props.onSessionChange(this.state.session), this.handleAnswerBlockDomUpdate();
234
+ });
235
+ }
236
+ }
237
+ shouldComponentUpdate(e, n) {
238
+ let r = t(this.props.model, e.model), i = t(this.state, n);
239
+ return !r || !i;
240
+ }
241
+ componentDidMount() {
242
+ this.handleAnswerBlockDomUpdate(), setTimeout(() => g(this.root), 100);
243
+ }
244
+ componentDidUpdate() {
245
+ this.handleAnswerBlockDomUpdate();
246
+ }
247
+ onSubFieldFocus = (e) => {
248
+ this.setState({ activeAnswerBlock: e });
249
+ };
250
+ toNodeData = (e) => {
251
+ if (!e) return;
252
+ let { type: t, value: n } = e;
253
+ return t === "command" || t === "cursor" ? e : t === "answer" ? {
254
+ type: "answer",
255
+ ...e
256
+ } : n === "clear" ? { type: "clear" } : {
257
+ type: "write",
258
+ value: n
259
+ };
260
+ };
261
+ setInput = (e) => {
262
+ this.input = e;
263
+ };
264
+ onClick = (e) => {
265
+ let t = this.toNodeData(e);
266
+ t.type === "clear" ? this.input.clear() : t.type === "command" ? Array.isArray(t.value) ? t.value.forEach((e) => {
267
+ this.input.cmd(e);
268
+ }) : this.input.cmd(t.value) : t.type === "cursor" ? this.input.keystroke(t.value) : this.input.write(t.value), this.input.focus();
269
+ };
270
+ callOnSessionChange = () => {
271
+ let { onSessionChange: e } = this.props;
272
+ e && e(this.state.session);
273
+ };
274
+ toggleShowCorrect = (e) => {
275
+ this.setState({ showCorrect: e }, this.handleAnswerBlockDomUpdate);
276
+ };
277
+ subFieldChanged = (e, t) => {
278
+ c(), e && this.setState((n) => ({ session: {
279
+ ...n.session,
280
+ answers: {
281
+ ...n.session.answers,
282
+ [e]: { value: t }
283
+ }
284
+ } }), this.callOnSessionChange);
285
+ };
286
+ getFieldName = (e, t) => {
287
+ let { answers: n } = this.state.session;
288
+ if (Object.keys(n || {}).length) return Object.keys(n).find((n) => {
289
+ let r = t[n];
290
+ return r && r.id == e.id;
291
+ });
292
+ };
293
+ onBlur = (e) => {
294
+ let { relatedTarget: t, currentTarget: n } = e || {};
295
+ function r(e, t = 0) {
296
+ if (!e || t >= 16) return null;
297
+ let n = e.offsetParent;
298
+ return n ? n.getAttribute("role") === "tooltip" ? n : r(n, t + 1) : null;
299
+ }
300
+ function i(e, t = 0) {
301
+ if (!e || t >= 4) return null;
302
+ let n = e?.children?.[0];
303
+ return n ? n.attributes && n.attributes["data-keypad"] ? n : i(n, t + 1) : null;
304
+ }
305
+ let a = r(t), o = a ? i(a) : null;
306
+ (!t || !n || !o?.attributes["data-keypad"]) && this.setState({ activeAnswerBlock: "" });
307
+ };
308
+ setTooltipRef(e) {
309
+ setTimeout(() => {
310
+ if (e && R) {
311
+ let e = document.querySelector("[role='tooltip']");
312
+ e && e.firstChild.setAttribute("tabindex", "-1");
313
+ }
314
+ }, 1);
315
+ }
316
+ renderTeacherInstructions = () => {
317
+ let { model: e } = this.props, { teacherInstructions: t, animationsDisabled: n } = e || {}, r = t && (h(t) || m(t)), i = /* @__PURE__ */ x(u, {
318
+ defaultClassName: "teacher-instructions",
319
+ prompt: t
320
+ }, void 0, !1, {
321
+ fileName: S,
322
+ lineNumber: 587,
323
+ columnNumber: 7
324
+ }, this);
325
+ return r && /* @__PURE__ */ x(E, { children: n ? i : /* @__PURE__ */ x(l, {
326
+ labels: {
327
+ hidden: "Show Teacher Instructions",
328
+ visible: "Hide Teacher Instructions"
329
+ },
330
+ children: i
331
+ }, void 0, !1, {
332
+ fileName: S,
333
+ lineNumber: 594,
334
+ columnNumber: 13
335
+ }, this) }, void 0, !1, {
336
+ fileName: S,
337
+ lineNumber: 592,
338
+ columnNumber: 9
339
+ }, this);
340
+ };
341
+ renderRationale = () => {
342
+ let { model: e } = this.props, { rationale: t, animationsDisabled: n } = e || {}, r = /* @__PURE__ */ x(u, { prompt: t }, void 0, !1, {
343
+ fileName: S,
344
+ lineNumber: 608,
345
+ columnNumber: 26
346
+ }, this);
347
+ return t && (h(t) || m(t)) && /* @__PURE__ */ x(E, { children: n ? r : /* @__PURE__ */ x(l, {
348
+ labels: {
349
+ hidden: "Show Rationale",
350
+ visible: "Hide Rationale"
351
+ },
352
+ children: r
353
+ }, void 0, !1, {
354
+ fileName: S,
355
+ lineNumber: 615,
356
+ columnNumber: 13
357
+ }, this) }, void 0, !1, {
358
+ fileName: S,
359
+ lineNumber: 613,
360
+ columnNumber: 9
361
+ }, this);
362
+ };
363
+ renderPlayerContent = () => {
364
+ let { model: t } = this.props, { activeAnswerBlock: n, showCorrect: r, session: i, tooltipContainerRef: s } = this.state, { correctness: c, disabled: l, view: u, responses: d, equationEditor: f, customKeys: p, feedback: m, env: { mode: h } = {}, printMode: g, alwaysShowCorrect: v } = t || {}, y = e(d), b = z(p), C = H(t, this.state) || "", w = g && !v;
365
+ return /* @__PURE__ */ x(D, { children: /* @__PURE__ */ x(_, {
366
+ disabled: l,
367
+ markup: t.markup,
368
+ value: {},
369
+ customMarkMarkupComponent: (e) => {
370
+ let t = h === "evaluate" && m && m[e], d = /* @__PURE__ */ x(k, {
371
+ ref: (e) => {
372
+ this.mqStatic = e || this.mqStatic;
373
+ },
374
+ latex: C[e],
375
+ onSubFieldChange: this.subFieldChanged,
376
+ getFieldName: this.getFieldName,
377
+ setInput: this.setInput,
378
+ onSubFieldFocus: this.onSubFieldFocus,
379
+ onBlur: this.onBlur
380
+ }, void 0, !1, {
381
+ fileName: S,
382
+ lineNumber: 656,
383
+ columnNumber: 15
384
+ }, this);
385
+ return /* @__PURE__ */ x(O, {
386
+ ref: s,
387
+ $incorrect: !y && !t && !r,
388
+ $correct: !y && (t || r),
389
+ $showCorrectness: !y && l && c && !u,
390
+ $correctAnswerShown: r,
391
+ children: /* @__PURE__ */ x(a, {
392
+ ref: (e) => this.setTooltipRef(e),
393
+ enterTouchDelay: 0,
394
+ interactive: !0,
395
+ open: n === `r${e}`,
396
+ slotProps: {
397
+ popper: {
398
+ container: s?.current || void 0,
399
+ placement: "bottom-end",
400
+ sx: {
401
+ backgroundColor: "transparent",
402
+ width: "650px",
403
+ opacity: 1,
404
+ "& .MuiTooltip-arrow": { display: "none" }
405
+ },
406
+ modifiers: {
407
+ preventOverflow: {
408
+ enabled: !0,
409
+ boundariesElement: "body"
410
+ },
411
+ flip: { enabled: !1 }
412
+ }
413
+ },
414
+ tooltip: { sx: {
415
+ fontSize: "initial",
416
+ backgroundColor: "transparent",
417
+ width: "600px",
418
+ marginTop: 0,
419
+ paddingTop: 0,
420
+ boxShadow: "none"
421
+ } }
422
+ },
423
+ title: Object.keys(i.answers).map((e) => e === n && !(r || l) && /* @__PURE__ */ x(A, {
424
+ "data-keypad": !0,
425
+ style: { width: B(b, f) },
426
+ children: /* @__PURE__ */ x(o, {
427
+ additionalKeys: b,
428
+ mode: f || I,
429
+ onClick: this.onClick,
430
+ onRequestClose: () => this.setState({ activeAnswerBlock: "" })
431
+ }, void 0, !1, {
432
+ fileName: S,
433
+ lineNumber: 723,
434
+ columnNumber: 27
435
+ }, this)
436
+ }, e, !1, {
437
+ fileName: S,
438
+ lineNumber: 718,
439
+ columnNumber: 25
440
+ }, this) || null),
441
+ children: w ? /* @__PURE__ */ x(j, { children: d }, void 0, !1, {
442
+ fileName: S,
443
+ lineNumber: 734,
444
+ columnNumber: 39
445
+ }, this) : /* @__PURE__ */ x("div", { children: d }, void 0, !1, {
446
+ fileName: S,
447
+ lineNumber: 734,
448
+ columnNumber: 85
449
+ }, this)
450
+ }, void 0, !1, {
451
+ fileName: S,
452
+ lineNumber: 677,
453
+ columnNumber: 17
454
+ }, this)
455
+ }, void 0, !1, {
456
+ fileName: S,
457
+ lineNumber: 670,
458
+ columnNumber: 15
459
+ }, this);
460
+ }
461
+ }, void 0, !1, {
462
+ fileName: S,
463
+ lineNumber: 647,
464
+ columnNumber: 9
465
+ }, this) }, void 0, !1, {
466
+ fileName: S,
467
+ lineNumber: 646,
468
+ columnNumber: 7
469
+ }, this);
470
+ };
471
+ render() {
472
+ let { model: t } = this.props, { showCorrect: n } = this.state, { prompt: r, env: { mode: i, role: a } = {}, extraCSSRules: o, correctness: s, responses: c, language: l, showNote: f, note: p } = t || {}, m = !e(c) && s && s.correctness !== "correct", h = (n || i === "view" && a === "instructor") && f && p;
473
+ return /* @__PURE__ */ x(C, {
474
+ extraCSSRules: o,
475
+ ref: (e) => {
476
+ this.root = y.findDOMNode(e) || this.root;
477
+ },
478
+ children: /* @__PURE__ */ x(w, { children: [
479
+ i === "gather" && /* @__PURE__ */ x(M, { children: "Math Equation Response Question" }, void 0, !1, {
480
+ fileName: S,
481
+ lineNumber: 773,
482
+ columnNumber: 33
483
+ }, this),
484
+ /* @__PURE__ */ x(w, { children: m && /* @__PURE__ */ x(P, {
485
+ language: l,
486
+ show: !0,
487
+ toggled: n,
488
+ onToggle: this.toggleShowCorrect
489
+ }, void 0, !1, {
490
+ fileName: S,
491
+ lineNumber: 777,
492
+ columnNumber: 15
493
+ }, this) }, void 0, !1, {
494
+ fileName: S,
495
+ lineNumber: 775,
496
+ columnNumber: 11
497
+ }, this),
498
+ this.renderTeacherInstructions(),
499
+ r && /* @__PURE__ */ x(T, { children: /* @__PURE__ */ x(u, { prompt: r }, void 0, !1, {
500
+ fileName: S,
501
+ lineNumber: 785,
502
+ columnNumber: 15
503
+ }, this) }, void 0, !1, {
504
+ fileName: S,
505
+ lineNumber: 784,
506
+ columnNumber: 13
507
+ }, this),
508
+ /* @__PURE__ */ x(d, {
509
+ false: !0,
510
+ children: this.renderPlayerContent()
511
+ }, void 0, !1, {
512
+ fileName: S,
513
+ lineNumber: 789,
514
+ columnNumber: 11
515
+ }, this),
516
+ h && /* @__PURE__ */ x(N, {
517
+ className: "note",
518
+ dangerouslySetInnerHTML: { __html: p }
519
+ }, void 0, !1, {
520
+ fileName: S,
521
+ lineNumber: 791,
522
+ columnNumber: 27
523
+ }, this),
524
+ this.renderRationale()
525
+ ] }, void 0, !0, {
526
+ fileName: S,
527
+ lineNumber: 771,
528
+ columnNumber: 9
529
+ }, this)
530
+ }, void 0, !1, {
531
+ fileName: S,
532
+ lineNumber: 762,
533
+ columnNumber: 7
534
+ }, this);
535
+ }
536
+ };
537
+ //#endregion
538
+ export { U as default };
@@ -0,0 +1,2 @@
1
+ export { default } from './delivery/index.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * IIFE entry point for math-templated element
3
+ * This file is only used for IIFE builds and includes auto-registration
4
+ *
5
+ * @sync-generated - Auto-generated during sync from pie-elements
6
+ */
7
+ import Element from './index';
8
+ export default Element;
9
+ //# sourceMappingURL=index.iife.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.iife.d.ts","sourceRoot":"","sources":["../src/index.iife.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAQ9B,eAAe,OAAO,CAAC"}