@pie-element/inline-dropdown 10.1.1 → 10.1.2-next.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 (262) hide show
  1. package/configure.js +2 -0
  2. package/controller.js +1 -0
  3. package/dist/author/defaults.d.ts +194 -0
  4. package/dist/author/defaults.js +130 -0
  5. package/dist/author/index.d.ts +43 -0
  6. package/dist/author/index.js +83 -0
  7. package/dist/author/inline-dropdown-toolbar.d.ts +48 -0
  8. package/dist/author/inline-dropdown-toolbar.js +269 -0
  9. package/dist/author/main.d.ts +49 -0
  10. package/dist/author/main.js +384 -0
  11. package/dist/author/markupUtils.d.ts +12 -0
  12. package/dist/author/markupUtils.js +23 -0
  13. package/dist/author/response-area.d.ts +20 -0
  14. package/dist/author/response-area.js +32 -0
  15. package/dist/author/utils.d.ts +10 -0
  16. package/dist/author/utils.js +10 -0
  17. package/dist/browser/Close-CMvmRhfL.js +9015 -0
  18. package/dist/browser/Close-CMvmRhfL.js.map +1 -0
  19. package/dist/browser/author/index.js +41184 -0
  20. package/dist/browser/author/index.js.map +1 -0
  21. package/dist/browser/controller/index.js +215 -0
  22. package/dist/browser/controller/index.js.map +1 -0
  23. package/dist/browser/delivery/index.js +2714 -0
  24. package/dist/browser/delivery/index.js.map +1 -0
  25. package/dist/browser/inline-dropdown.css +2 -0
  26. package/dist/browser/isEmpty-BAznrYT5.js +433 -0
  27. package/dist/browser/isEmpty-BAznrYT5.js.map +1 -0
  28. package/dist/browser/reduce-2sGcZtv4.js +446 -0
  29. package/dist/browser/reduce-2sGcZtv4.js.map +1 -0
  30. package/dist/controller/defaults.d.ts +27 -0
  31. package/dist/controller/defaults.js +21 -0
  32. package/dist/controller/index.d.ts +54 -0
  33. package/dist/controller/index.js +126 -0
  34. package/dist/controller/utils.d.ts +12 -0
  35. package/dist/controller/utils.js +13 -0
  36. package/dist/delivery/index.d.ts +20 -0
  37. package/dist/delivery/index.js +60 -0
  38. package/dist/delivery/inline-dropdown.d.ts +38 -0
  39. package/dist/delivery/inline-dropdown.js +109 -0
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.iife.d.ts +8 -0
  42. package/dist/index.iife.js +148 -0
  43. package/dist/index.js +2 -0
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +12 -0
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +8 -0
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +6 -0
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js +11 -0
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +8 -0
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGt.js +6 -0
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +26 -0
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +11 -0
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js +8 -0
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +8 -0
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -0
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castFunction.js +7 -0
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +12 -0
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_escapeHtmlChar.js +11 -0
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +16 -0
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +12 -0
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
  163. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
  164. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
  165. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
  166. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
  167. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
  168. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
  169. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
  170. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
  171. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +13 -0
  172. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
  173. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
  174. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
  175. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
  176. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +6 -0
  177. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -0
  178. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
  179. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
  180. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
  181. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
  182. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
  183. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
  184. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
  185. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
  186. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
  187. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +8 -0
  188. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -0
  189. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
  190. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/escape.js +9 -0
  191. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/forEach.js +10 -0
  192. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
  193. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
  194. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
  195. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
  196. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
  197. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
  198. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
  199. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
  200. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
  201. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
  202. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
  203. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
  204. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
  205. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
  206. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
  207. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
  208. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
  209. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isUndefined.js +6 -0
  210. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
  211. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
  212. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +10 -0
  213. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/max.js +9 -0
  214. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
  215. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
  216. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +12 -0
  217. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
  218. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
  219. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
  220. package/package.json +79 -18
  221. package/CHANGELOG.json +0 -1082
  222. package/CHANGELOG.md +0 -2185
  223. package/LICENSE.md +0 -5
  224. package/README.md +0 -1
  225. package/configure/CHANGELOG.json +0 -647
  226. package/configure/CHANGELOG.md +0 -1942
  227. package/configure/lib/defaults.js +0 -192
  228. package/configure/lib/defaults.js.map +0 -1
  229. package/configure/lib/index.js +0 -135
  230. package/configure/lib/index.js.map +0 -1
  231. package/configure/lib/inline-dropdown-toolbar.js +0 -457
  232. package/configure/lib/inline-dropdown-toolbar.js.map +0 -1
  233. package/configure/lib/main.js +0 -603
  234. package/configure/lib/main.js.map +0 -1
  235. package/configure/lib/markupUtils.js +0 -50
  236. package/configure/lib/markupUtils.js.map +0 -1
  237. package/configure/lib/response-area.js +0 -48
  238. package/configure/lib/response-area.js.map +0 -1
  239. package/configure/lib/utils.js +0 -22
  240. package/configure/lib/utils.js.map +0 -1
  241. package/configure/package.json +0 -24
  242. package/controller/CHANGELOG.json +0 -467
  243. package/controller/CHANGELOG.md +0 -1283
  244. package/controller/lib/defaults.js +0 -25
  245. package/controller/lib/defaults.js.map +0 -1
  246. package/controller/lib/index.js +0 -295
  247. package/controller/lib/index.js.map +0 -1
  248. package/controller/lib/utils.js +0 -32
  249. package/controller/lib/utils.js.map +0 -1
  250. package/controller/package.json +0 -16
  251. package/docs/config-schema.json +0 -2854
  252. package/docs/config-schema.json.md +0 -2106
  253. package/docs/demo/config.js +0 -8
  254. package/docs/demo/generate.js +0 -76
  255. package/docs/demo/index.html +0 -1
  256. package/docs/demo/session.js +0 -11
  257. package/docs/pie-schema.json +0 -1152
  258. package/docs/pie-schema.json.md +0 -814
  259. package/lib/index.js +0 -85
  260. package/lib/index.js.map +0 -1
  261. package/lib/inline-dropdown.js +0 -176
  262. package/lib/inline-dropdown.js.map +0 -1
@@ -1,192 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _default = exports.default = {
8
- model: {
9
- alternateResponse: {},
10
- choiceRationaleEnabled: true,
11
- choices: {},
12
- disabled: false,
13
- displayType: 'block',
14
- markup: '',
15
- mode: 'gather',
16
- prompt: '',
17
- promptEnabled: true,
18
- rationale: '',
19
- rationaleEnabled: true,
20
- shuffle: true,
21
- studentInstructionsEnabled: true,
22
- teacherInstructions: '',
23
- teacherInstructionsEnabled: true,
24
- toolbarEditorPosition: 'bottom'
25
- },
26
- configuration: {
27
- baseInputConfiguration: {
28
- audio: {
29
- disabled: false
30
- },
31
- video: {
32
- disabled: false
33
- },
34
- image: {
35
- disabled: false
36
- },
37
- h3: {
38
- disabled: true
39
- },
40
- blockquote: {
41
- disabled: true
42
- },
43
- textAlign: {
44
- disabled: true
45
- },
46
- showParagraphs: {
47
- disabled: false
48
- },
49
- separateParagraphs: {
50
- disabled: true
51
- }
52
- },
53
- prompt: {
54
- settings: true,
55
- label: 'Prompt',
56
- required: false,
57
- inputConfiguration: {
58
- audio: {
59
- disabled: false
60
- },
61
- video: {
62
- disabled: false
63
- },
64
- image: {
65
- disabled: false
66
- }
67
- }
68
- },
69
- responseAreaInputConfiguration: {
70
- inputConfiguration: {
71
- audio: {
72
- disabled: true
73
- },
74
- video: {
75
- disabled: true
76
- },
77
- image: {
78
- disabled: true
79
- },
80
- table: {
81
- disabled: true
82
- },
83
- ul_list: {
84
- disabled: true
85
- },
86
- ol_list: {
87
- disabled: true
88
- }
89
- }
90
- },
91
- settingsPanelDisabled: false,
92
- spellCheck: {
93
- label: 'Spellcheck',
94
- settings: false,
95
- enabled: true
96
- },
97
- lockChoiceOrder: {
98
- settings: true,
99
- label: 'Lock Choice Order'
100
- },
101
- partialScoring: {
102
- settings: false,
103
- label: 'Allow Partial Scoring'
104
- },
105
- rationale: {
106
- settings: true,
107
- label: 'Rationale',
108
- required: false,
109
- inputConfiguration: {
110
- audio: {
111
- disabled: false
112
- },
113
- video: {
114
- disabled: false
115
- },
116
- image: {
117
- disabled: false
118
- },
119
- textAlign: {
120
- disabled: true
121
- }
122
- }
123
- },
124
- teacherInstructions: {
125
- settings: true,
126
- label: 'Teacher Instructions',
127
- required: false,
128
- inputConfiguration: {
129
- audio: {
130
- disabled: false
131
- },
132
- video: {
133
- disabled: false
134
- },
135
- image: {
136
- disabled: false
137
- }
138
- }
139
- },
140
- template: {
141
- inputConfiguration: {
142
- audio: {
143
- disabled: false
144
- },
145
- video: {
146
- disabled: false
147
- },
148
- image: {
149
- disabled: false
150
- }
151
- }
152
- },
153
- choiceRationale: {
154
- settings: true,
155
- label: 'Choice Rationale'
156
- },
157
- toolbarEditorPosition: {
158
- settings: false,
159
- label: 'Toolbar Editor Position'
160
- },
161
- maxResponseAreas: 10,
162
- maxResponseAreaChoices: 10,
163
- maxImageWidth: {
164
- teacherInstructions: 300,
165
- prompt: 300,
166
- rationale: 300
167
- },
168
- maxImageHeight: {
169
- teacherInstructions: 300,
170
- prompt: 300,
171
- rationale: 300
172
- },
173
- withRubric: {
174
- settings: false,
175
- label: 'Add Rubric'
176
- },
177
- mathMlOptions: {
178
- mmlOutput: false,
179
- mmlEditing: false
180
- },
181
- language: {
182
- settings: false,
183
- label: 'Specify Language',
184
- enabled: false
185
- },
186
- languageChoices: {
187
- label: 'Language Choices',
188
- options: []
189
- }
190
- }
191
- };
192
- //# sourceMappingURL=defaults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults.js","names":["model","alternateResponse","choiceRationaleEnabled","choices","disabled","displayType","markup","mode","prompt","promptEnabled","rationale","rationaleEnabled","shuffle","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","toolbarEditorPosition","configuration","baseInputConfiguration","audio","video","image","h3","blockquote","textAlign","showParagraphs","separateParagraphs","settings","label","required","inputConfiguration","responseAreaInputConfiguration","table","ul_list","ol_list","settingsPanelDisabled","spellCheck","enabled","lockChoiceOrder","partialScoring","template","choiceRationale","maxResponseAreas","maxResponseAreaChoices","maxImageWidth","maxImageHeight","withRubric","mathMlOptions","mmlOutput","mmlEditing","language","languageChoices","options"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n model: {\n alternateResponse: {},\n choiceRationaleEnabled: true,\n choices: {},\n disabled: false,\n displayType: 'block',\n markup: '',\n mode: 'gather',\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n shuffle: true,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n baseInputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n h3: { disabled: true },\n blockquote: { disabled: true },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n responseAreaInputConfiguration: {\n inputConfiguration: {\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: true },\n table: { disabled: true },\n ul_list: { disabled: true },\n ol_list: { disabled: true },\n },\n },\n settingsPanelDisabled: false,\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n lockChoiceOrder: {\n settings: true,\n label: 'Lock Choice Order',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n },\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n template: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n choiceRationale: {\n settings: true,\n label: 'Choice Rationale',\n },\n toolbarEditorPosition: {\n settings: false,\n label: 'Toolbar Editor Position',\n },\n maxResponseAreas: 10,\n maxResponseAreaChoices: 10,\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n },\n};\n"],"mappings":";;;;;;iCAAe;EACbA,KAAK,EAAE;IACLC,iBAAiB,EAAE,CAAC,CAAC;IACrBC,sBAAsB,EAAE,IAAI;IAC5BC,OAAO,EAAE,CAAC,CAAC;IACXC,QAAQ,EAAE,KAAK;IACfC,WAAW,EAAE,OAAO;IACpBC,MAAM,EAAE,EAAE;IACVC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,EAAE;IACVC,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE,EAAE;IACbC,gBAAgB,EAAE,IAAI;IACtBC,OAAO,EAAE,IAAI;IACbC,0BAA0B,EAAE,IAAI;IAChCC,mBAAmB,EAAE,EAAE;IACvBC,0BAA0B,EAAE,IAAI;IAChCC,qBAAqB,EAAE;EACzB,CAAC;EACDC,aAAa,EAAE;IAC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E;IAC1BC,aAAa,EAAE;MACb9B,mBAAmB,EAAE,GAAG;MACxBN,MAAM,EAAE,GAAG;MACXE,SAAS,EAAE;IACb,CAAC;IACDmC,cAAc,EAAE;MACd/B,mBAAmB,EAAE,GAAG;MACxBN,MAAM,EAAE,GAAG;MACXE,SAAS,EAAE;IACb,CAAC;IACDoC,UAAU,EAAE;MACVnB,QAAQ,EAAE,KAAK;MACfC,KAAK,EAAE;IACT,CAAC;IACDmB,aAAa,EAAE;MACbC,SAAS,EAAE,KAAK;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,QAAQ,EAAE;MACRvB,QAAQ,EAAE,KAAK;MACfC,KAAK,EAAE,kBAAkB;MACzBS,OAAO,EAAE;IACX,CAAC;IACDc,eAAe,EAAE;MACfvB,KAAK,EAAE,kBAAkB;MACzBwB,OAAO,EAAE;IACX;EACF;AACF,CAAC","ignoreList":[]}
@@ -1,135 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _pieConfigureEvents = require("@pie-framework/pie-configure-events");
10
- var _react = _interopRequireDefault(require("react"));
11
- var _client = require("react-dom/client");
12
- var _main = _interopRequireDefault(require("./main"));
13
- var _debug = _interopRequireDefault(require("debug"));
14
- var _lodashEs = require("lodash-es");
15
- var _defaults = _interopRequireDefault(require("./defaults"));
16
- var _markupUtils = require("./markupUtils");
17
- const log = (0, _debug.default)('multiple-choice:configure');
18
- class InlineDropdown extends HTMLElement {
19
- constructor() {
20
- super();
21
- this._root = null;
22
- this._model = InlineDropdown.prepareModel();
23
- this._configuration = _defaults.default.configuration;
24
- this.onModelChanged = this.onModelChanged.bind(this);
25
- this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
26
- }
27
- set model(s) {
28
- this._model = InlineDropdown.prepareModel(s);
29
- this._render();
30
- }
31
- set configuration(c) {
32
- this._configuration = (0, _lodashEs.defaults)(c, _defaults.default.configuration);
33
-
34
- // if language:enabled is true, then the corresponding default item model should include a language value;
35
- // if it is false, then the language field should be omitted from the item model.
36
- // if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,
37
- // then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).
38
- if (c.language?.enabled) {
39
- if (c.languageChoices?.options?.length) {
40
- this._model.language = c.languageChoices.options[0].value;
41
- }
42
- } else if (c.language.settings && this._model.language) {
43
- this._configuration.language.enabled = true;
44
- if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {
45
- this._configuration.languageChoices.options = [];
46
- }
47
-
48
- // check if the language is already included in the languageChoices.options array
49
- // and if not, then add it.
50
- if (!this._configuration.languageChoices.options.find(option => option.value === this._model.language)) {
51
- this._configuration.languageChoices.options.push({
52
- value: this._model.language,
53
- label: this._model.language
54
- });
55
- }
56
- } else {
57
- delete this._model.language;
58
- }
59
- this._render();
60
- }
61
- set disableSidePanel(s) {
62
- this._disableSidePanel = s;
63
- this._render();
64
- }
65
- dispatchModelUpdated(reset) {
66
- const resetValue = !!reset;
67
- this.dispatchEvent(new _pieConfigureEvents.ModelUpdatedEvent(this._model, resetValue));
68
- }
69
- onModelChanged(m, reset) {
70
- this._model = InlineDropdown.prepareModel(m);
71
- this._render();
72
- this.dispatchModelUpdated(reset);
73
- }
74
- onConfigurationChanged(c) {
75
- this._configuration = c;
76
- this._render();
77
- }
78
-
79
- /** @param {done, progress, file} handler */
80
- insertImage(handler) {
81
- this.dispatchEvent(new _pieConfigureEvents.InsertImageEvent(handler));
82
- }
83
- onDeleteImage(src, done) {
84
- this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
85
- }
86
- insertSound(handler) {
87
- this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
88
- }
89
- onDeleteSound(src, done) {
90
- this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
91
- }
92
- _render() {
93
- log('_render');
94
- let element = /*#__PURE__*/_react.default.createElement(_main.default, {
95
- model: this._model,
96
- configuration: this._configuration,
97
- onModelChanged: this.onModelChanged,
98
- onConfigurationChanged: this.onConfigurationChanged,
99
- disableSidePanel: this._disableSidePanel,
100
- imageSupport: {
101
- add: this.insertImage.bind(this),
102
- delete: this.onDeleteImage.bind(this)
103
- },
104
- uploadSoundSupport: {
105
- add: this.insertSound.bind(this),
106
- delete: this.onDeleteSound.bind(this)
107
- }
108
- });
109
- if (!this._root) {
110
- this._root = (0, _client.createRoot)(this);
111
- }
112
- this._root.render(element);
113
- }
114
- disconnectedCallback() {
115
- if (this._root) {
116
- this._root.unmount();
117
- }
118
- }
119
- }
120
- exports.default = InlineDropdown;
121
- (0, _defineProperty2.default)(InlineDropdown, "prepareModel", (model = {}) => {
122
- const currModal = {
123
- ..._defaults.default.model,
124
- ...model
125
- };
126
- const slateMarkup = model.slateMarkup || (0, _markupUtils.createSlateMarkup)(currModal.markup, currModal.choices);
127
- const markup = (0, _markupUtils.processMarkup)(slateMarkup);
128
- return {
129
- ...currModal,
130
- slateMarkup,
131
- markup
132
- /*...processedMarkup,*/
133
- };
134
- });
135
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_pieConfigureEvents","require","_react","_interopRequireDefault","_client","_main","_debug","_lodashEs","_defaults","_markupUtils","log","debug","InlineDropdown","HTMLElement","constructor","_root","_model","prepareModel","_configuration","sensibleDefaults","configuration","onModelChanged","bind","onConfigurationChanged","model","s","_render","c","defaults","language","enabled","languageChoices","options","length","value","settings","find","option","push","label","disableSidePanel","_disableSidePanel","dispatchModelUpdated","reset","resetValue","dispatchEvent","ModelUpdatedEvent","m","insertImage","handler","InsertImageEvent","onDeleteImage","src","done","DeleteImageEvent","insertSound","InsertSoundEvent","onDeleteSound","DeleteSoundEvent","element","React","createElement","Main","imageSupport","add","delete","uploadSoundSupport","createRoot","render","disconnectedCallback","unmount","exports","default","_defineProperty2","currModal","slateMarkup","createSlateMarkup","markup","choices","processMarkup"],"sources":["../src/index.js"],"sourcesContent":["import {\n ModelUpdatedEvent,\n DeleteImageEvent,\n InsertImageEvent,\n InsertSoundEvent,\n DeleteSoundEvent,\n} from '@pie-framework/pie-configure-events';\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport Main from './main';\nimport debug from 'debug';\nimport { defaults } from 'lodash-es';\n\nimport sensibleDefaults from './defaults';\nimport { processMarkup, createSlateMarkup } from './markupUtils';\n\nconst log = debug('multiple-choice:configure');\n\nexport default class InlineDropdown extends HTMLElement {\n static prepareModel = (model = {}) => {\n const currModal = {\n ...sensibleDefaults.model,\n ...model,\n };\n const slateMarkup = model.slateMarkup || createSlateMarkup(currModal.markup, currModal.choices);\n const markup = processMarkup(slateMarkup);\n\n return {\n ...currModal,\n slateMarkup,\n markup,\n /*...processedMarkup,*/\n };\n };\n\n constructor() {\n super();\n this._root = null;\n this._model = InlineDropdown.prepareModel();\n this._configuration = sensibleDefaults.configuration;\n this.onModelChanged = this.onModelChanged.bind(this);\n this.onConfigurationChanged = this.onConfigurationChanged.bind(this);\n }\n\n set model(s) {\n this._model = InlineDropdown.prepareModel(s);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = defaults(c, sensibleDefaults.configuration);\n\n // if language:enabled is true, then the corresponding default item model should include a language value;\n // if it is false, then the language field should be omitted from the item model.\n // if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,\n // then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).\n if (c.language?.enabled) {\n if (c.languageChoices?.options?.length) {\n this._model.language = c.languageChoices.options[0].value;\n }\n } else if (c.language.settings && this._model.language) {\n this._configuration.language.enabled = true;\n\n if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {\n this._configuration.languageChoices.options = [];\n }\n\n // check if the language is already included in the languageChoices.options array\n // and if not, then add it.\n if (!this._configuration.languageChoices.options.find(option => option.value === this._model.language)) {\n this._configuration.languageChoices.options.push({\n value: this._model.language,\n label: this._model.language,\n });\n }\n } else {\n delete this._model.language;\n }\n\n this._render();\n }\n\n set disableSidePanel(s) {\n this._disableSidePanel = s;\n this._render();\n }\n\n dispatchModelUpdated(reset) {\n const resetValue = !!reset;\n\n this.dispatchEvent(new ModelUpdatedEvent(this._model, resetValue));\n }\n\n onModelChanged(m, reset) {\n this._model = InlineDropdown.prepareModel(m);\n this._render();\n this.dispatchModelUpdated(reset);\n }\n\n onConfigurationChanged(c) {\n this._configuration = c;\n this._render();\n }\n\n /** @param {done, progress, file} handler */\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n _render() {\n log('_render');\n let element = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n disableSidePanel: this._disableSidePanel,\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this),\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(element);\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;A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