@pie-element/hotspot 11.1.2-next.0 → 11.1.2-next.10

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 (162) hide show
  1. package/dist/author/hotspot-container.js +2 -2
  2. package/dist/author/hotspot-drawable.js +120 -120
  3. package/dist/author/hotspot-polygon.js +2 -2
  4. package/dist/author/index.d.ts +1 -0
  5. package/dist/author/index.js +5 -2
  6. package/dist/author/root.js +52 -52
  7. package/dist/author/utils.js +10 -10
  8. package/dist/browser/{ReactKonva-Z9-1H-UZ.js → ReactKonva-Cj44B3Ds.js} +3504 -3535
  9. package/dist/browser/ReactKonva-Cj44B3Ds.js.map +1 -0
  10. package/dist/browser/author/index.js +24223 -22027
  11. package/dist/browser/author/index.js.map +1 -1
  12. package/dist/browser/{browser-CfnAFove.js → browser-D4gLESxz.js} +22 -6
  13. package/dist/browser/{browser-CfnAFove.js.map → browser-D4gLESxz.js.map} +1 -1
  14. package/dist/browser/controller/index.js +32 -32
  15. package/dist/browser/controller/index.js.map +1 -1
  16. package/dist/browser/delivery/index.js +628 -519
  17. package/dist/browser/delivery/index.js.map +1 -1
  18. package/dist/browser/dist-CJeYAWp3.js +100 -0
  19. package/dist/browser/dist-CJeYAWp3.js.map +1 -0
  20. package/dist/controller/index.js +51 -51
  21. package/dist/controller/utils.d.ts +1 -1
  22. package/dist/controller/utils.js +2 -3
  23. package/dist/delivery/hotspot/circle.d.ts +3 -0
  24. package/dist/delivery/hotspot/circle.js +40 -27
  25. package/dist/delivery/hotspot/container.d.ts +5 -0
  26. package/dist/delivery/hotspot/container.js +163 -96
  27. package/dist/delivery/hotspot/index.d.ts +1 -0
  28. package/dist/delivery/hotspot/index.js +41 -36
  29. package/dist/delivery/hotspot/polygon.d.ts +3 -0
  30. package/dist/delivery/hotspot/polygon.js +39 -26
  31. package/dist/delivery/hotspot/rectangle.d.ts +3 -0
  32. package/dist/delivery/hotspot/rectangle.js +40 -28
  33. package/dist/delivery/index.js +3 -3
  34. package/dist/index.iife.js +40 -40
  35. package/dist/runtime-support.d.ts +12 -0
  36. package/dist/runtime-support.js +12 -0
  37. package/package.json +20 -17
  38. package/dist/browser/ReactKonva-Z9-1H-UZ.js.map +0 -1
  39. package/dist/browser/isEqual-D3CTSc6W.js +0 -601
  40. package/dist/browser/isEqual-D3CTSc6W.js.map +0 -1
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
  53. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
  54. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
  55. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  56. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
  57. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
  58. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
  59. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
  60. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
  61. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
  62. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
  63. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
  64. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
  65. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  66. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  67. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  68. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
  69. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
  70. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
  71. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  72. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
  73. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  74. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
  75. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  76. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  77. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  78. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
  79. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  80. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
  81. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
  82. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
  83. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
  84. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  85. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
  86. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
  87. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
  88. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
  89. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  90. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  91. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
  92. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
  93. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
  94. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  95. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
  96. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
  97. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
  98. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  99. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
  100. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  101. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
  102. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
  103. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
  104. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  105. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
  106. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
  107. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
  108. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
  109. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
  110. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
  111. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
  112. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
  113. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  114. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
  115. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  116. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  117. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
  118. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
  119. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
  120. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
  121. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
  122. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
  123. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
  124. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
  125. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
  126. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
  127. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
  128. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
  129. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
  130. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  131. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  132. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  133. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
  134. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  135. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
  136. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
  137. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
  138. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
  139. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
  140. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
  141. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
  142. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
  143. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  144. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
  145. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  146. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  147. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  148. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  149. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  150. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
  151. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
  152. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  153. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  154. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
  155. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  156. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  157. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
  158. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  159. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
  160. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  161. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
  162. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
@@ -1,6 +1,6 @@
1
1
  import e from "./hotspot-palette.js";
2
2
  import { generateValidationMessage as t, getAllShapes as n, getUpdatedShapes as r, groupShapes as i, updateImageDimensions as a } from "./utils.js";
3
- import o from "./hotspot-container.js";
3
+ import { Container as o } from "./hotspot-container.js";
4
4
  import s from "react";
5
5
  import c from "prop-types";
6
6
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
@@ -8,10 +8,10 @@ import { styled as d } from "@mui/material/styles";
8
8
  import { InputContainer as f, NumberTextField as p, layout as m, settings as h } from "@pie-lib/config-ui";
9
9
  import g from "@pie-lib/editable-html-tip-tap";
10
10
  import _ from "@mui/material/Typography";
11
- import v from "@mui/icons-material/Info";
12
- import y from "@mui/material/Tooltip";
11
+ import ee from "@mui/icons-material/Info";
12
+ import v from "@mui/material/Tooltip";
13
13
  //#region src/author/root.tsx
14
- var { Panel: ee, toggle: b, dropdown: te } = h, ne = d("div")(({ theme: e }) => ({
14
+ var { Panel: te, toggle: y, dropdown: b } = h, ne = (e) => e != null, re = d("div")(({ theme: e }) => ({
15
15
  display: "flex",
16
16
  marginBottom: e.spacing(1.5)
17
17
  })), x = d("div")({
@@ -22,18 +22,18 @@ var { Panel: ee, toggle: b, dropdown: te } = h, ne = d("div")(({ theme: e }) =>
22
22
  marginTop: e.spacing(2),
23
23
  marginBottom: e.spacing(2),
24
24
  width: "100%"
25
- })), C = d(_)(({ theme: e }) => ({ marginRight: e.spacing(1) })), re = d("div")({
25
+ })), ie = d(_)(({ theme: e }) => ({ marginRight: e.spacing(1) })), ae = d("div")({
26
26
  display: "flex",
27
27
  alignItems: "center"
28
- }), ie = d(y)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
28
+ }), oe = d(v)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
29
29
  fontSize: e.typography.fontSize - 2,
30
30
  whiteSpace: "pre",
31
31
  maxWidth: "500px"
32
- } })), w = d("div")(({ theme: e }) => ({
32
+ } })), C = d("div")(({ theme: e }) => ({
33
33
  fontSize: e.typography.fontSize - 2,
34
34
  color: e.palette.error.main,
35
35
  paddingTop: e.spacing(1)
36
- })), T = class extends s.Component {
36
+ })), w = class extends s.Component {
37
37
  handleColorChange = (e, t) => {
38
38
  let { onColorChanged: n } = this.props;
39
39
  n(`${e}Color`, t);
@@ -46,56 +46,56 @@ var { Panel: ee, toggle: b, dropdown: te } = h, ne = d("div")(({ theme: e }) =>
46
46
  u(i(r(o, d, n(s)))), l(d);
47
47
  };
48
48
  render() {
49
- let { configuration: n, model: r, imageSupport: i, uploadSoundSupport: a, onConfigurationChanged: c, onImageUpload: d, onModelChangedByConfig: f, onPromptChanged: h, onRationaleChanged: y, onUpdateImageDimension: T, onTeacherInstructionsChanged: ae, onUpdateShapes: E } = this.props, { baseInputConfiguration: oe = {}, contentDimensions: se = {}, maxImageWidth: D = {}, maxImageHeight: O = {}, multipleCorrect: k = {}, partialScoring: A = {}, preserveAspectRatio: j = {}, prompt: M = {}, rationale: N = {}, settingsPanelDisabled: ce, spellCheck: P = {}, teacherInstructions: F = {}, withRubric: I = {}, mathMlOptions: L = {}, language: R = {}, languageChoices: z = {} } = n || {}, { errors: B, extraCSSRules: V, promptEnabled: H, rationaleEnabled: U, spellCheckEnabled: W, teacherInstructionsEnabled: le, toolbarEditorPosition: ue } = r || {}, { prompt: G, rationale: K, shapes: q, selections: J, teacherInstructions: Y } = B || {}, de = t(n), X = D && D.prompt, Z = O && O.prompt, Q = { position: ue === "top" ? "top" : "bottom" }, fe = {
50
- multipleCorrect: k.settings && b(k.label),
51
- partialScoring: A.settings && b(A.label),
52
- promptEnabled: M.settings && b(M.label),
53
- "language.enabled": R.settings && b(R.label, !0),
54
- language: R.settings && R.enabled && te(z.label, z.options)
55
- }, pe = {
56
- teacherInstructionsEnabled: F.settings && b(F.label),
57
- rationaleEnabled: N.settings && b(N.label),
58
- spellCheckEnabled: P.settings && b(P.label),
59
- rubricEnabled: I?.settings && b(I?.label)
49
+ let { configuration: n, model: r, imageSupport: i, uploadSoundSupport: a, onConfigurationChanged: c, onImageUpload: d, onModelChangedByConfig: f, onPromptChanged: h, onRationaleChanged: v, onUpdateImageDimension: w, onTeacherInstructionsChanged: se, onUpdateShapes: ce } = this.props, { baseInputConfiguration: le = {}, contentDimensions: T = {}, maxImageWidth: E = {}, maxImageHeight: D = {}, multipleCorrect: O = {}, partialScoring: k = {}, preserveAspectRatio: A = {}, prompt: j = {}, rationale: M = {}, settingsPanelDisabled: N, spellCheck: P = {}, teacherInstructions: F = {}, withRubric: I = {}, mathMlOptions: L = {}, language: R = {}, languageChoices: z = {} } = n || {}, { errors: B, extraCSSRules: V, promptEnabled: H, rationaleEnabled: U, spellCheckEnabled: W, teacherInstructionsEnabled: ue, toolbarEditorPosition: de } = r || {}, { prompt: G, rationale: K, shapes: q, selections: J, teacherInstructions: Y } = B || {}, fe = t(n), X = E && E.prompt, Z = D && D.prompt, Q = { position: de === "top" ? "top" : "bottom" }, pe = {
50
+ multipleCorrect: O.settings && y(O.label),
51
+ partialScoring: k.settings && y(k.label),
52
+ promptEnabled: j.settings && y(j.label),
53
+ "language.enabled": R.settings && y(R.label, !0),
54
+ language: R.settings && R.enabled && b(z.label, z.options)
55
+ }, me = {
56
+ teacherInstructionsEnabled: F.settings && y(F.label),
57
+ rationaleEnabled: M.settings && y(M.label),
58
+ spellCheckEnabled: P.settings && y(P.label),
59
+ rubricEnabled: I?.settings && y(I?.label)
60
60
  }, $ = (e = {}) => ({
61
- ...oe,
61
+ ...le,
62
62
  ...e
63
63
  });
64
64
  return /* @__PURE__ */ u(m.ConfigLayout, {
65
65
  extraCSSRules: V,
66
- dimensions: se,
67
- hideSettings: ce,
68
- settings: /* @__PURE__ */ l(ee, {
66
+ dimensions: T,
67
+ hideSettings: N,
68
+ settings: /* @__PURE__ */ l(te, {
69
69
  model: r,
70
70
  onChangeModel: f,
71
71
  configuration: n,
72
72
  onChangeConfiguration: c,
73
73
  groups: {
74
- Settings: fe,
75
- Properties: pe
74
+ Settings: pe,
75
+ Properties: me
76
76
  }
77
77
  }),
78
78
  children: [
79
- le && /* @__PURE__ */ u(S, {
79
+ ue && /* @__PURE__ */ u(S, {
80
80
  label: F.label,
81
81
  children: [/* @__PURE__ */ l(g, {
82
82
  markup: r.teacherInstructions || "",
83
- onChange: ae,
83
+ onChange: se,
84
84
  imageSupport: i,
85
85
  nonEmpty: !1,
86
86
  error: Y,
87
87
  toolbarOpts: Q,
88
88
  pluginProps: $(F?.inputConfiguration),
89
89
  spellCheck: W,
90
- maxImageWidth: D && D.teacherInstructions || X,
91
- maxImageHeight: O && O.teacherInstructions || Z,
90
+ maxImageWidth: E && E.teacherInstructions || X,
91
+ maxImageHeight: D && D.teacherInstructions || Z,
92
92
  uploadSoundSupport: a,
93
93
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
94
94
  mathMlOptions: L
95
- }), Y && /* @__PURE__ */ l(w, { children: Y })]
95
+ }), Y && /* @__PURE__ */ l(C, { children: Y })]
96
96
  }),
97
97
  H && /* @__PURE__ */ u(S, {
98
- label: M.label,
98
+ label: j.label,
99
99
  children: [/* @__PURE__ */ l(g, {
100
100
  markup: r.prompt || "",
101
101
  onChange: h,
@@ -103,24 +103,24 @@ var { Panel: ee, toggle: b, dropdown: te } = h, ne = d("div")(({ theme: e }) =>
103
103
  nonEmpty: !1,
104
104
  error: G,
105
105
  toolbarOpts: Q,
106
- pluginProps: $(M?.inputConfiguration),
106
+ pluginProps: $(j?.inputConfiguration),
107
107
  spellCheck: W,
108
108
  maxImageWidth: X,
109
109
  maxImageHeight: Z,
110
110
  uploadSoundSupport: a,
111
111
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
112
112
  mathMlOptions: L
113
- }), G && /* @__PURE__ */ l(w, { children: G })]
113
+ }), G && /* @__PURE__ */ l(C, { children: G })]
114
114
  }),
115
- /* @__PURE__ */ u(re, { children: [/* @__PURE__ */ l(C, {
115
+ /* @__PURE__ */ u(ae, { children: [/* @__PURE__ */ l(ie, {
116
116
  variant: "h6",
117
117
  children: "Define Hotspot"
118
- }), /* @__PURE__ */ l(ie, {
118
+ }), /* @__PURE__ */ l(oe, {
119
119
  disableFocusListener: !0,
120
120
  disableTouchListener: !0,
121
121
  placement: "left",
122
- title: de,
123
- children: /* @__PURE__ */ l(v, {
122
+ title: fe,
123
+ children: /* @__PURE__ */ l(ee, {
124
124
  fontSize: "small",
125
125
  color: "primary",
126
126
  style: { float: "right" }
@@ -142,21 +142,21 @@ var { Panel: ee, toggle: b, dropdown: te } = h, ne = d("div")(({ theme: e }) =>
142
142
  hotspotColor: r.hotspotColor,
143
143
  outlineColor: r.outlineColor,
144
144
  selectedHotspotColor: r.selectedHotspotColor,
145
- hoverOutlineColor: r.hoverOutlineColor,
146
- onUpdateImageDimension: T,
147
- onUpdateShapes: E,
145
+ hoverOutlineColor: ne(r.hoverOutlineColor) ? r.hoverOutlineColor : "black",
146
+ onUpdateImageDimension: w,
147
+ onUpdateShapes: ce,
148
148
  onImageUpload: d,
149
149
  shapes: r.shapes,
150
150
  strokeWidth: r.strokeWidth,
151
- preserveAspectRatioEnabled: j.enabled,
151
+ preserveAspectRatioEnabled: A.enabled,
152
152
  insertImage: i && i.add
153
153
  }),
154
- q && /* @__PURE__ */ l(w, { children: q }),
155
- J && /* @__PURE__ */ l(w, { children: J }),
154
+ q && /* @__PURE__ */ l(C, { children: q }),
155
+ J && /* @__PURE__ */ l(C, { children: J }),
156
156
  r.imageUrl && /* @__PURE__ */ u(s.Fragment, { children: [/* @__PURE__ */ l(_, {
157
157
  variant: "h6",
158
158
  children: "Image Dimensions"
159
- }), /* @__PURE__ */ u(ne, { children: [/* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(p, {
159
+ }), /* @__PURE__ */ u(re, { children: [/* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(p, {
160
160
  label: "Width",
161
161
  value: r.dimensions.width,
162
162
  min: 0,
@@ -170,27 +170,27 @@ var { Panel: ee, toggle: b, dropdown: te } = h, ne = d("div")(({ theme: e }) =>
170
170
  showErrorWhenOutsideRange: !0
171
171
  }, "hotspot-manual-height") })] })] }),
172
172
  U && /* @__PURE__ */ u(S, {
173
- label: N.label,
173
+ label: M.label,
174
174
  children: [/* @__PURE__ */ l(g, {
175
175
  markup: r.rationale || "",
176
- onChange: y,
176
+ onChange: v,
177
177
  imageSupport: i,
178
178
  error: K,
179
179
  toolbarOpts: Q,
180
- pluginProps: $(N?.inputConfiguration),
180
+ pluginProps: $(M?.inputConfiguration),
181
181
  spellCheck: W,
182
- maxImageWidth: D && D.rationale || X,
183
- maxImageHeight: O && O.rationale || Z,
182
+ maxImageWidth: E && E.rationale || X,
183
+ maxImageHeight: D && D.rationale || Z,
184
184
  uploadSoundSupport: a,
185
185
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
186
186
  mathMlOptions: L
187
- }), K && /* @__PURE__ */ l(w, { children: K })]
187
+ }), K && /* @__PURE__ */ l(C, { children: K })]
188
188
  })
189
189
  ]
190
190
  });
191
191
  }
192
192
  };
193
- T.propTypes = {
193
+ w.propTypes = {
194
194
  configuration: c.object,
195
195
  model: c.object.isRequired,
196
196
  imageSupport: c.shape({
@@ -212,4 +212,4 @@ T.propTypes = {
212
212
  onTeacherInstructionsChanged: c.func.isRequired
213
213
  };
214
214
  //#endregion
215
- export { T as default };
215
+ export { w as Root, w as default };
@@ -1,5 +1,5 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
2
- import { SHAPE_GROUPS as t } from "./shapes/utils.js";
1
+ import { SHAPE_GROUPS as e } from "./shapes/utils.js";
2
+ import { cloneDeep as t } from "@pie-element/shared-lodash";
3
3
  //#region src/author/utils.ts
4
4
  var n = (e, t, n, r) => {
5
5
  if (n) {
@@ -33,10 +33,10 @@ var n = (e, t, n, r) => {
33
33
  x: r(e.width, t.width, n.x),
34
34
  y: r(e.height, t.height, n.y)
35
35
  }))
36
- }), s = (e, n, r) => r.map((r) => {
37
- if (r.group === t.RECTANGLES) return i(e, n, r);
38
- if (r.group === t.POLYGONS) return o(e, n, r);
39
- if (r.group === t.CIRCLES) return a(e, n, r);
36
+ }), s = (t, n, r) => r.map((r) => {
37
+ if (r.group === e.RECTANGLES) return i(t, n, r);
38
+ if (r.group === e.POLYGONS) return o(t, n, r);
39
+ if (r.group === e.CIRCLES) return a(t, n, r);
40
40
  }), c = (e) => {
41
41
  e ||= {};
42
42
  let t = [], n = Object.keys(e);
@@ -45,14 +45,14 @@ var n = (e, t, n, r) => {
45
45
  group: n,
46
46
  index: e.index || t.length + r
47
47
  })) : []), t) : t;
48
- }, l = (t) => {
49
- t ||= [];
48
+ }, l = (e) => {
49
+ e ||= [];
50
50
  let n = {
51
51
  rectangles: [],
52
52
  polygons: [],
53
53
  circles: []
54
54
  };
55
- return t.length ? t.reduce((e, { group: t, ...n }) => (e[t] = [...e[t] || [], n], e), n) : e(n);
55
+ return e.length ? e.reduce((e, { group: t, ...n }) => (e[t] = [...e[t] || [], n], e), n) : t(n);
56
56
  }, u = (e, t, n) => {
57
57
  let r = !1;
58
58
  if (!e || e.length <= 0) return r;
@@ -80,4 +80,4 @@ var n = (e, t, n, r) => {
80
80
  return "Validation requirements:" + i + a;
81
81
  };
82
82
  //#endregion
83
- export { d as calculate, f as generateValidationMessage, c as getAllShapes, s as getUpdatedShapes, l as groupShapes, n as updateImageDimensions };
83
+ export { d as calculate, f as generateValidationMessage, c as getAllShapes, o as getUpdatedPolygon, i as getUpdatedRectangle, s as getUpdatedShapes, l as groupShapes, u as isPointInsidePolygon, n as updateImageDimensions };