@nethesis/phone-island 1.1.5 → 1.1.6-dev.1

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 (325) hide show
  1. package/dist/App.js.map +1 -1
  2. package/dist/components/AlertView/index.js.map +1 -1
  3. package/dist/components/AudioBars.js.map +1 -1
  4. package/dist/components/AudioPlayerView/PlayerFooterActions.js +1 -1
  5. package/dist/components/AudioPlayerView/PlayerFooterActions.js.map +1 -1
  6. package/dist/components/AudioPlayerView/Progress.js.map +1 -1
  7. package/dist/components/AudioPlayerView/index.js +1 -1
  8. package/dist/components/AudioPlayerView/index.js.map +1 -1
  9. package/dist/components/CallView/Actions.js +1 -1
  10. package/dist/components/CallView/Actions.js.map +1 -1
  11. package/dist/components/CallView/BackCall.js +1 -1
  12. package/dist/components/CallView/BackCall.js.map +1 -1
  13. package/dist/components/CallView/DeviceIcon.js +1 -1
  14. package/dist/components/CallView/DeviceIcon.js.map +1 -1
  15. package/dist/components/CallView/DisplayName.js +1 -1
  16. package/dist/components/CallView/DisplayName.js.map +1 -1
  17. package/dist/components/CallView/DisplayNameUtils.js.map +1 -1
  18. package/dist/components/CallView/Number.js +1 -1
  19. package/dist/components/CallView/Number.js.map +1 -1
  20. package/dist/components/CallView/NumberPopover.js +1 -1
  21. package/dist/components/CallView/NumberPopover.js.map +1 -1
  22. package/dist/components/CallView/index.js +1 -1
  23. package/dist/components/CallView/index.js.map +1 -1
  24. package/dist/components/ConferenceView/ConferenceUsersList.js +1 -1
  25. package/dist/components/ConferenceView/ConferenceUsersList.js.map +1 -1
  26. package/dist/components/ConferenceView/index.js +1 -1
  27. package/dist/components/ConferenceView/index.js.map +1 -1
  28. package/dist/components/ContactView/ContactListView.js +1 -1
  29. package/dist/components/ContactView/ContactListView.js.map +1 -1
  30. package/dist/components/ContactView/SelectContactNumberView.js +1 -1
  31. package/dist/components/ContactView/SelectContactNumberView.js.map +1 -1
  32. package/dist/components/ContactView/TransferActions.js +1 -1
  33. package/dist/components/ContactView/TransferActions.js.map +1 -1
  34. package/dist/components/Hangup.js +1 -1
  35. package/dist/components/Hangup.js.map +1 -1
  36. package/dist/components/KeypadView/index.js +1 -1
  37. package/dist/components/KeypadView/index.js.map +1 -1
  38. package/dist/components/OperatorBusyView/index.js +1 -1
  39. package/dist/components/OperatorBusyView/index.js.map +1 -1
  40. package/dist/components/PhysicalRecorderView/index.js +1 -1
  41. package/dist/components/PhysicalRecorderView/index.js.map +1 -1
  42. package/dist/components/RecorderView/Actions.js +1 -1
  43. package/dist/components/RecorderView/Actions.js.map +1 -1
  44. package/dist/components/RecorderView/BarsGroup.js.map +1 -1
  45. package/dist/components/RecorderView/index.js +1 -1
  46. package/dist/components/RecorderView/index.js.map +1 -1
  47. package/dist/components/SettingsView/AudioView.js +1 -1
  48. package/dist/components/SettingsView/AudioView.js.map +1 -1
  49. package/dist/components/SettingsView/MicrophoneView.js +1 -1
  50. package/dist/components/SettingsView/MicrophoneView.js.map +1 -1
  51. package/dist/components/SettingsView/SettingsHeader.js +1 -1
  52. package/dist/components/SettingsView/SettingsHeader.js.map +1 -1
  53. package/dist/components/SettingsView/ThemeView.js +1 -1
  54. package/dist/components/SettingsView/ThemeView.js.map +1 -1
  55. package/dist/components/SettingsView/index.js +1 -1
  56. package/dist/components/SettingsView/index.js.map +1 -1
  57. package/dist/components/SideView/SideView.js +1 -1
  58. package/dist/components/SideView/SideView.js.map +1 -1
  59. package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
  60. package/dist/components/Socket.js.map +1 -1
  61. package/dist/components/SwitchDeviceView/index.js +1 -1
  62. package/dist/components/SwitchDeviceView/index.js.map +1 -1
  63. package/dist/components/SwitchInputView/DropdownContent.js +1 -1
  64. package/dist/components/SwitchInputView/DropdownContent.js.map +1 -1
  65. package/dist/components/SwitchInputView/Index.js +1 -1
  66. package/dist/components/TextScroll.js +1 -1
  67. package/dist/components/TextScroll.js.map +1 -1
  68. package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
  69. package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
  70. package/dist/components/VideoStreamingEmptyState/index.js +1 -1
  71. package/dist/components/VideoStreamingEmptyState/index.js.map +1 -1
  72. package/dist/components/VideoStreamingSkeleton/index.js +1 -1
  73. package/dist/components/VideoStreamingSkeleton/index.js.map +1 -1
  74. package/dist/components/VideoView/index.js.map +1 -1
  75. package/dist/components/WebRTC.js.map +1 -1
  76. package/dist/events/SocketEvents.js.map +1 -1
  77. package/dist/lib/i18n.js +1 -1
  78. package/dist/lib/i18n.js.map +1 -1
  79. package/dist/lib/phone/call.js +1 -1
  80. package/dist/lib/phone/call.js.map +1 -1
  81. package/dist/lib/phone/counterpartDevice.js.map +1 -1
  82. package/dist/lib/phone/video.js.map +1 -1
  83. package/dist/lib/player/audio.js.map +1 -1
  84. package/dist/lib/user/default_device.js.map +1 -1
  85. package/dist/lib/user/extensions.js.map +1 -1
  86. package/dist/models/currentCall.js.map +1 -1
  87. package/dist/models/island.js.map +1 -1
  88. package/dist/models/player.js +1 -1
  89. package/dist/models/player.js.map +1 -1
  90. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
  91. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
  92. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  93. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  94. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
  95. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
  96. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
  97. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
  98. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  99. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  100. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
  101. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
  102. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js +1 -1
  103. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js.map +1 -1
  104. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
  105. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
  106. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
  107. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  109. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  110. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
  111. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
  112. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
  113. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
  114. package/dist/node_modules/i18next/dist/esm/i18next.js +1 -1
  115. package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
  116. package/dist/node_modules/js-base64/base64.mjs.js +1 -1
  117. package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
  118. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  119. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  120. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  121. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  122. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  123. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  124. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js +1 -1
  125. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js.map +1 -1
  126. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  127. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  128. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
  129. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  130. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
  131. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
  132. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
  133. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
  134. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  135. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  136. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  137. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
  138. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
  139. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
  140. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
  141. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
  142. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
  143. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js +1 -1
  144. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -1
  145. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
  146. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
  147. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js +1 -1
  148. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js.map +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js.map +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +1 -1
  151. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -1
  152. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js +2 -0
  153. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js.map +1 -0
  154. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
  158. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  159. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  160. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js +1 -1
  161. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
  162. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +1 -1
  163. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -1
  164. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
  166. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
  167. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
  169. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
  170. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js +2 -0
  171. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js.map +1 -0
  172. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js +1 -1
  173. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
  178. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js +1 -1
  179. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -1
  180. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
  181. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
  182. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js +1 -1
  183. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js.map +1 -1
  184. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
  185. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
  186. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
  187. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
  188. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
  189. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +1 -1
  191. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -1
  192. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
  193. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
  194. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js +2 -0
  195. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js.map +1 -0
  196. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
  197. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  198. package/dist/node_modules/motion-dom/dist/es/utils/is-ref-object.mjs.js.map +1 -0
  199. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
  200. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
  201. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
  202. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
  203. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
  204. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  205. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  206. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js +1 -1
  207. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js.map +1 -1
  208. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  209. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  210. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js +1 -1
  211. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js.map +1 -1
  212. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js +1 -1
  213. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
  214. package/dist/node_modules/react-i18next/dist/es/context.js +1 -1
  215. package/dist/node_modules/react-i18next/dist/es/context.js.map +1 -1
  216. package/dist/node_modules/react-i18next/dist/es/defaults.js +1 -1
  217. package/dist/node_modules/react-i18next/dist/es/defaults.js.map +1 -1
  218. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +1 -1
  219. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js.map +1 -1
  220. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +1 -1
  221. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js.map +1 -1
  222. package/dist/node_modules/react-i18next/dist/es/unescape.js +1 -1
  223. package/dist/node_modules/react-i18next/dist/es/unescape.js.map +1 -1
  224. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +1 -1
  225. package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
  226. package/dist/node_modules/react-i18next/dist/es/utils.js +1 -1
  227. package/dist/node_modules/react-i18next/dist/es/utils.js.map +1 -1
  228. package/dist/node_modules/react-redux/node_modules/react-is/index.js +1 -1
  229. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +1 -1
  230. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +1 -1
  231. package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
  232. package/dist/package.json.js +1 -1
  233. package/dist/services/astproxy.js +1 -1
  234. package/dist/services/astproxy.js.map +1 -1
  235. package/dist/services/phonebook.js +1 -1
  236. package/dist/services/phonebook.js.map +1 -1
  237. package/dist/utils/customHooks/useLocalStorage.js.map +1 -1
  238. package/dist/utils/deviceUtils.js.map +1 -1
  239. package/package.json +10 -5
  240. package/dist/_virtual/arrayLikeToArray.js +0 -2
  241. package/dist/_virtual/arrayLikeToArray.js.map +0 -1
  242. package/dist/_virtual/arrayWithHoles.js +0 -2
  243. package/dist/_virtual/arrayWithHoles.js.map +0 -1
  244. package/dist/_virtual/classCallCheck.js +0 -2
  245. package/dist/_virtual/classCallCheck.js.map +0 -1
  246. package/dist/_virtual/createClass.js +0 -2
  247. package/dist/_virtual/createClass.js.map +0 -1
  248. package/dist/_virtual/defineProperty.js +0 -2
  249. package/dist/_virtual/defineProperty.js.map +0 -1
  250. package/dist/_virtual/iterableToArrayLimit.js +0 -2
  251. package/dist/_virtual/iterableToArrayLimit.js.map +0 -1
  252. package/dist/_virtual/nonIterableRest.js +0 -2
  253. package/dist/_virtual/nonIterableRest.js.map +0 -1
  254. package/dist/_virtual/objectWithoutProperties.js +0 -2
  255. package/dist/_virtual/objectWithoutProperties.js.map +0 -1
  256. package/dist/_virtual/objectWithoutPropertiesLoose.js +0 -2
  257. package/dist/_virtual/objectWithoutPropertiesLoose.js.map +0 -1
  258. package/dist/_virtual/slicedToArray.js +0 -2
  259. package/dist/_virtual/slicedToArray.js.map +0 -1
  260. package/dist/_virtual/toPrimitive.js +0 -2
  261. package/dist/_virtual/toPrimitive.js.map +0 -1
  262. package/dist/_virtual/toPropertyKey.js +0 -2
  263. package/dist/_virtual/toPropertyKey.js.map +0 -1
  264. package/dist/_virtual/typeof.js +0 -2
  265. package/dist/_virtual/typeof.js.map +0 -1
  266. package/dist/_virtual/unsupportedIterableToArray.js +0 -2
  267. package/dist/_virtual/unsupportedIterableToArray.js.map +0 -1
  268. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -2
  269. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +0 -1
  270. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -2
  271. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js.map +0 -1
  272. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -2
  273. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js.map +0 -1
  274. package/dist/node_modules/@babel/runtime/helpers/createClass.js +0 -2
  275. package/dist/node_modules/@babel/runtime/helpers/createClass.js.map +0 -1
  276. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js +0 -2
  277. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js.map +0 -1
  278. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -2
  279. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +0 -1
  280. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -2
  281. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +0 -1
  282. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -2
  283. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +0 -1
  284. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -2
  285. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js.map +0 -1
  286. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -2
  287. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js.map +0 -1
  288. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -2
  289. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +0 -1
  290. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -2
  291. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +0 -1
  292. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -2
  293. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +0 -1
  294. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -2
  295. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
  296. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -2
  297. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js.map +0 -1
  298. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -2
  299. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +0 -1
  300. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -2
  301. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js.map +0 -1
  302. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -2
  303. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js.map +0 -1
  304. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -2
  305. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js.map +0 -1
  306. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -2
  307. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js.map +0 -1
  308. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -2
  309. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js.map +0 -1
  310. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -2
  311. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +0 -1
  312. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -2
  313. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js.map +0 -1
  314. package/dist/node_modules/@babel/runtime/helpers/typeof.js +0 -2
  315. package/dist/node_modules/@babel/runtime/helpers/typeof.js.map +0 -1
  316. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -2
  317. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +0 -1
  318. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +0 -2
  319. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +0 -1
  320. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.js.map +0 -1
  321. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js +0 -2
  322. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js.map +0 -1
  323. package/dist/node_modules/void-elements/index.js +0 -2
  324. package/dist/node_modules/void-elements/index.js.map +0 -1
  325. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/is-ref-object.mjs.js +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../animation/animate/single-value.mjs.js"),e=require("../../animation/utils/notify-inspector.mjs.js"),i=require("../../animation/optimized-appear/get-appear-id.mjs.js"),s=require("../../animation/utils/get-value-transition.mjs.js"),o=require("../../frameloop/microtask.mjs.js"),a=require("../../frameloop/sync-time.mjs.js"),r=require("../styles/scale-correction.mjs.js"),n=require("../../utils/delay.mjs.js"),l=require("../../utils/is-svg-element.mjs.js"),h=require("../../utils/is-svg-svg-element.mjs.js"),c=require("../../utils/mix/number.mjs.js"),u=require("../../value/index.mjs.js"),m=require("../../value/utils/resolve-motion-value.mjs.js"),d=require("../animation/mix-values.mjs.js"),p=require("../../animation/waapi/transforms/groups.mjs.js"),y=require("../geometry/copy.mjs.js"),g=require("../geometry/delta-apply.mjs.js"),f=require("../geometry/delta-calc.mjs.js"),v=require("../geometry/delta-remove.mjs.js"),x=require("../geometry/models.mjs.js"),j=require("../geometry/utils.mjs.js"),T=require("../shared/stack.mjs.js"),D=require("../styles/default-scale-correctors.mjs.js"),B=require("../styles/transform.mjs.js"),P=require("../utils/each-axis.mjs.js"),S=require("../utils/flat-tree.mjs.js"),A=require("../utils/has-transform.mjs.js"),R=require("./state.mjs.js"),L=require("../../frameloop/frame.mjs.js"),V=require("../../frameloop/frame-data.mjs.js"),E=require("../../../../../motion-utils/dist/es/noop.mjs.js"),k=require("../../../../../motion-utils/dist/es/subscription-manager.mjs.js"),C=require("../../../../../motion-utils/dist/es/clamp.mjs.js");const w=["","X","Y","Z"];let I=0;function U(t,e,i,s){const{latestValues:o}=e;o[t]&&(i[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}const q=({instance:t})=>t&&p.transformGroups.get(t)?.demote();function F(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=i.getOptimisedAppearId(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",L.frame,!(e||i))}const{parent:o}=t;o&&!o.hasCheckedOptimisedAppear&&F(o)}function b(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:i}=t,s=i?.isAnimationBlocked&&i.layout;if(!e||!s||t.resumeFrom||t.isAnimationBlocked)return;const o=i.dragSnapshot;P.eachAxis(t=>g.translateAxis(e.layoutBox[t],s.layoutBox[t].min-o.layoutBox[t].min))}(t)}function O(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:o}=t.options,a=e.source!==t.layout.source;if("size"===o)P.eachAxis(t=>{const s=a?e.measuredBox[t]:e.layoutBox[t],o=f.calcLength(s);s.min=i[t].min,s.max=s.min+o});else if("x"===o||"y"===o){const t="x"===o?"y":"x";y.copyAxisInto(a?e.measuredBox[t]:e.layoutBox[t],i[t])}else nt(o,e.layoutBox,i)&&P.eachAxis(s=>{const o=a?e.measuredBox[s]:e.layoutBox[s],r=f.calcLength(i[s]);o.max=o.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)});const r=x.createDelta();f.calcBoxDelta(r,i,e.layoutBox);const n=x.createDelta();a?f.calcBoxDelta(n,t.applyTransform(s,!0),e.measuredBox):f.calcBoxDelta(n,i,e.layoutBox);const l=!j.isDeltaZero(r);let h=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:o,layout:a}=s;if(o&&a){const r=t.options.layoutAnchor||void 0,n=x.createBox();f.calcRelativePosition(n,e.layoutBox,o.layoutBox,r);const l=x.createBox();f.calcRelativePosition(l,i,a.layoutBox,r),j.boxEqualsRounded(n,l)||(h=!0),s.options.layoutRoot&&(t.relativeTarget=l,t.relativeTargetOrigin=n,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:n,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function M(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function N(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function z(t){t.clearSnapshot()}function H(t){t.clearMeasurements()}function W(t){t.isLayoutDirty=!0,t.updateLayout()}function G(t){t.isLayoutDirty=!1}function Z(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function $(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function X(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Y(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function _(t){t.resolveTargetDelta()}function J(t){t.calcProjection()}function K(t){t.resetSkewAndRotation()}function Q(t,e,i){t.translate=c.mixNumber(e.translate,0,i),t.scale=c.mixNumber(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function tt(t,e,i,s){t.min=c.mixNumber(e.min,i.min,s),t.max=c.mixNumber(e.max,i.max,s)}function et(t,e,i,s){tt(t.x,e.x,i.x,s),tt(t.y,e.y,i.y,s)}function it(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const st={duration:.45,ease:[.4,0,.1,1]},ot=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),at=ot("applewebkit/")&&!ot("chrome/")?Math.round:E.noop;function rt(t){t.min=at(t.min),t.max=at(t.max)}function nt(t,e,i){return"position"===t||"preserve-aspect"===t&&!f.isNear(j.aspectRatio(e),j.aspectRatio(i),.2)}function lt(t){return t!==t.root&&t.scroll?.wasRoot}exports.cleanDirtyNodes=N,exports.createProjectionNode=function({attachResizeListener:i,defaultParent:p,measureScroll:P,checkIsScrollRoot:E,resetTransform:tt}){return Object.assign(r.scaleCorrectors,{...D.defaultScaleCorrectors,...r.scaleCorrectors}),class{constructor(t={},e=p?.()){this.id=I++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(M),this.nodes.forEach(_),this.nodes.forEach(J),this.nodes.forEach(N)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new S.FlatTree)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new k.SubscriptionManager),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(t){if(this.instance)return;this.isSVG=l.isSVGElement(t)&&!h.isSVGSVGElement(t),this.instance=t;const{layoutId:e,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||e)&&(this.isLayoutDirty=!0),i){let e,s=0;const o=()=>this.root.updateBlockedByResize=!1;L.frame.read(()=>{s=window.innerWidth}),i(t,()=>{const t=window.innerWidth;t!==s&&(s=t,this.root.updateBlockedByResize=!0,e&&e(),e=n.delay(o,250),R.globalProjectionState.hasAnimatedSinceResize&&(R.globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(Y)))})}e&&this.root.registerSharedNode(e,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:i,animate:o}=this.options;this.instance&&!this.hasLayoutListener&&!1!==o&&i&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:o,layout:a})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||i.getDefaultTransition()||st,{onLayoutAnimationStart:n,onLayoutAnimationComplete:l}=i.getProps(),h=!this.targetLayout||!j.boxEqualsRounded(this.targetLayout,a),c=!e&&o;if(this.options.layoutRoot||this.resumeFrom||c||e&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...s.getValueTransition(r,"layout"),onPlay:n,onComplete:l};(i.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||Y(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=a}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,L.cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(K),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&F(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;q(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,q(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}const{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach(W),void this.nodes.forEach(H)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(G);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Z),this.nodes.forEach($),this.nodes.forEach(X),this.nodes.forEach(b),this.nodes.forEach(O)):this.nodes.forEach(G),this.clearAllSnapshots();const t=a.time.now();V.frameData.delta=C.clamp(0,1e3/60,t-V.frameData.timestamp),V.frameData.timestamp=t,V.frameData.isProcessing=!0,L.frameSteps.update.process(V.frameData),L.frameSteps.preRender.process(V.frameData),L.frameSteps.render.process(V.frameData),V.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,o.microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(z),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||f.calcLength(this.snapshot.measuredBox.x)||f.calcLength(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected=x.createBox()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=E(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:P(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!tt)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&q(this);const e=this.projectionDelta&&!j.isDeltaZero(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&this.instance&&(e||A.hasTransform(this.latestValues)||o)&&(tt(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let i=this.removeElementScroll(e);var s;return t&&(i=this.removeTransform(i)),rt((s=i).x),rt(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:i,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return x.createBox();const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(lt))){const{scroll:t}=this.root;t&&(g.translateAxis(e.x,t.offset.x),g.translateAxis(e.y,t.offset.y))}return e}removeElementScroll(t){const e=x.createBox();if(y.copyBoxInto(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){const s=this.path[i],{scroll:o,options:a}=s;s!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&y.copyBoxInto(e,t),g.translateAxis(e.x,o.offset.x),g.translateAxis(e.y,o.offset.y))}return e}applyTransform(t,e=!1,i,s){const o=i||x.createBox();y.copyBoxInto(o,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(g.translateAxis(o.x,-i.scroll.offset.x),g.translateAxis(o.y,-i.scroll.offset.y)),A.hasTransform(i.latestValues)&&g.transformBox(o,i.latestValues,i.layout?.layoutBox)}return!s&&A.hasTransform(this.latestValues)&&g.transformBox(o,this.latestValues,this.layout?.layoutBox),o}removeTransform(t){const e=x.createBox();y.copyBoxInto(e,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];if(!A.hasTransform(i.latestValues))continue;let s;i.instance&&(A.hasScale(i.latestValues)&&i.updateSnapshot(),s=x.createBox(),y.copyBoxInto(s,i.measurePageBox())),v.removeBoxTransforms(e,i.latestValues,i.snapshot?.layoutBox,s)}return A.hasTransform(this.latestValues)&&v.removeBoxTransforms(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==V.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=V.frameData.timestamp;const a=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=x.createBox(),this.targetWithTransforms=x.createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),f.calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):y.copyBoxInto(this.target,this.layout.layoutBox),g.applyBoxDelta(this.target,this.targetDelta)):y.copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&a&&Boolean(a.resumingFrom)===Boolean(this.resumingFrom)&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!A.hasScale(this.parent.latestValues)&&!A.has2DTranslate(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=x.createBox(),this.relativeTargetOrigin=x.createBox(),f.calcRelativePosition(this.relativeTargetOrigin,e,i,this.options.layoutAnchor||void 0),y.copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===V.frameData.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;y.copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,r=this.treeScale.y;g.applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=x.createBox());const{target:n}=t;n?(this.projectionDelta&&this.prevProjectionDelta?(y.copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),y.copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),f.calcBoxDelta(this.projectionDelta,this.layoutCorrected,n,this.latestValues),this.treeScale.x===a&&this.treeScale.y===r&&j.axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)&&j.axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",n))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=x.createDelta(),this.projectionDelta=x.createDelta(),this.projectionDeltaWithTransform=x.createDelta()}setAnimationOrigin(t,e=!1,i){const s=this.snapshot,o=s?s.latestValues:{},a={...this.latestValues},r=x.createDelta();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const n=x.createBox(),l=(s?s.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,m=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(it));let p;this.animationProgress=0;const g=i?.interpolateProjection(t);this.mixTargetDelta=e=>{const i=e/1e3,s=g?.(i);s?(r.x.translate=s.x,r.x.scale=c.mixNumber(t.x.scale,1,i),r.x.origin=t.x.origin,r.x.originPoint=t.x.originPoint,r.y.translate=s.y,r.y.scale=c.mixNumber(t.y.scale,1,i),r.y.origin=t.y.origin,r.y.originPoint=t.y.originPoint):(Q(r.x,t.x,i),Q(r.y,t.y,i)),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(f.calcRelativePosition(n,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),et(this.relativeTarget,this.relativeTargetOrigin,n,i),p&&j.boxEquals(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=x.createBox()),y.copyBoxInto(p,this.relativeTarget)),l&&(this.animationValues=a,d.mixValues(a,o,this.latestValues,i,m,u)),s&&void 0!==s.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=s.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(L.cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.frame.update(()=>{R.globalProjectionState.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=u.motionValue(0)),this.motionValue.jump(0,!1),this.currentAnimation=t.animateSingleValue(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),e.notifyLayoutAnimationStart(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:i,latestValues:s}=t;let{target:o}=t;if(e&&o&&i){if(this!==t&&this.layout&&i&&nt(this.options.animationType,this.layout.layoutBox,i.layoutBox)){o=this.target||x.createBox();const e=f.calcLength(this.layout.layoutBox.x);o.x.min=t.target.x.min,o.x.max=o.x.min+e;const i=f.calcLength(this.layout.layoutBox.y);o.y.min=t.target.y.min,o.y.max=o.y.min+i}y.copyBoxInto(e,o),g.transformBox(e,s),f.calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new T.NodeStack);this.sharedNodes.get(t).add(e);const i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){const s=this.getStack();s&&s.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;const s={};i.z&&U("z",t,s,this.animationValues);for(let e=0;e<w.length;e++)U(`rotate${w[e]}`,t,s,this.animationValues),U(`skew${w[e]}`,t,s,this.animationValues);t.render();for(const e in s)t.setStaticValue(e,s[e]),this.animationValues&&(this.animationValues[e]=s[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=m.resolveMotionValue(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");const s=this.getLead();if(!this.projectionDelta||!this.layout||!s.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=m.resolveMotionValue(e?.pointerEvents)||""),void(this.hasProjected&&!A.hasTransform(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const o=s.animationValues||s.latestValues;this.applyTransformsToTarget();let a=B.buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,o);i&&(a=i(o,a)),t.transform=a;const{x:n,y:l}=this.projectionDelta;t.transformOrigin=`${100*n.origin}% ${100*l.origin}% 0`,s.animationValues?t.opacity=s===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:t.opacity=s===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const e in r.scaleCorrectors){if(void 0===o[e])continue;const{correct:i,applyTo:n,isCSSVariable:l}=r.scaleCorrectors[e],h="none"===a?o[e]:i(o[e],s);if(n){const e=n.length;for(let i=0;i<e;i++)t[n[i]]=h}else l?this.options.visualElement.renderState.vars[e]=h:t[e]=h}this.options.layoutId&&(t.pointerEvents=s===this?m.resolveMotionValue(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(H),this.root.sharedNodes.clear()}}},exports.mixAxis=tt,exports.mixBox=et,exports.propagateDirtyNodes=M;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../animation/animate/single-value.mjs.js"),e=require("../../animation/utils/notify-inspector.mjs.js"),i=require("../../animation/optimized-appear/get-appear-id.mjs.js"),s=require("../../animation/utils/get-value-transition.mjs.js"),o=require("../../frameloop/microtask.mjs.js"),a=require("../../frameloop/sync-time.mjs.js"),r=require("../styles/scale-correction.mjs.js"),n=require("../../stats/buffer.mjs.js"),l=require("../../utils/delay.mjs.js"),h=require("../../utils/is-ref-object.mjs.js"),c=require("../../utils/is-svg-element.mjs.js"),u=require("../../utils/is-svg-svg-element.mjs.js"),d=require("../../utils/mix/number.mjs.js"),m=require("../../value/index.mjs.js"),p=require("../../value/utils/resolve-motion-value.mjs.js"),y=require("../animation/mix-values.mjs.js"),g=require("../../animation/waapi/transforms/groups.mjs.js"),f=require("../geometry/copy.mjs.js"),v=require("../geometry/delta-apply.mjs.js"),j=require("../geometry/delta-calc.mjs.js"),x=require("../geometry/delta-remove.mjs.js"),T=require("../geometry/round.mjs.js"),D=require("../geometry/models.mjs.js"),B=require("../geometry/utils.mjs.js"),P=require("../shared/stack.mjs.js"),S=require("../styles/default-scale-correctors.mjs.js"),A=require("../styles/transform.mjs.js"),R=require("../utils/each-axis.mjs.js"),L=require("../utils/flat-tree.mjs.js"),V=require("../utils/has-transform.mjs.js"),k=require("./state.mjs.js"),E=require("../../frameloop/frame.mjs.js"),w=require("../../frameloop/frame-data.mjs.js"),C=require("../../../../../motion-utils/dist/es/subscription-manager.mjs.js"),U=require("../../../../../motion-utils/dist/es/clamp.mjs.js");const I=["z","skew","skewZ"];let q=0;function F(t,e,i,s){const{latestValues:o}=e;o[t]&&(i[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}const b=t=>t.instance&&g.transformGroups.get(t.instance)?.demote()&&t.resetSkewAndRotation();function O(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=i.getOptimisedAppearId(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",E.frame,!(e||i))}const{parent:o}=t;o&&!o.hasCheckedOptimisedAppear&&O(o)}function M(t){if(t)return!1!==t.options.allowProjection?t.projection:M(t.parent)}function N(t){t.updateLayout(),function(t){const{snapshot:e,dragAncestor:i}=t,s=i?.isAnimationBlocked&&i.layout;if(!e||!s||t.resumeFrom||t.isAnimationBlocked)return;const o=i.dragSnapshot;R.eachAxis(t=>v.translateAxis(e.layoutBox[t],s.layoutBox[t].min-o.layoutBox[t].min))}(t)}function z(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:o}=t.options,a=e.source!==t.layout.source,r=(s,a)=>{if("size"===o)R.eachAxis(t=>{const e=j.calcLength(s[t]);s[t].min=a[t].min,s[t].max=s[t].min+e});else if("x"===o||"y"===o){const t="x"===o?"y":"x";f.copyAxisInto(s[t],a[t])}else lt(o,e.layoutBox,i)&&R.eachAxis(e=>{const i=j.calcLength(a[e]);s[e].max=s[e].min+i,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[e].max=t.relativeTarget[e].min+i)})},n=a?e.measuredBox:e.layoutBox;r(n,i);const l=D.createDelta();j.calcBoxDelta(l,i,e.layoutBox);const h=D.createDelta();j.calcBoxDelta(h,a?t.applyTransform(s,!0):i,n);const c=!B.isDeltaZero(l);let u=!1;const d=t.getClosestProjectingParent();if((!a||d?.options.layoutRoot&&t.resumeFrom?.path.includes(d))&&d&&!d.resumeFrom){const{snapshot:s,layout:o}=d;if(s&&o){const n=t.options.layoutAnchor||void 0,l=D.createBox();j.calcRelativePosition(l,a?t.resumeFrom.applyTransform(e.layoutBox,!0,void 0,!0,d.depth+1):e.layoutBox,s.layoutBox,n);const h=D.createBox();j.calcRelativePosition(h,i,o.layoutBox,n),a&&r(l,h),B.boxEqualsRounded(l,h)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=h,t.relativeTargetOrigin=l,t.relativeParent=d)}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:h,layoutDelta:l,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else t.isLead()&&t.options.onExitComplete?.();t.options.transition=void 0}function H(t){n.statsBuffer.countProjection?.(0),t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function W(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function G(t){t.clearSnapshot()}function Z(t){t.clearMeasurements()}function $(t){t.isLayoutDirty=!0,t.updateLayout()}function _(t){t.isLayoutDirty=!1}function J(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.dragSnapshot||t.layout,t.isLayoutDirty=!0)}function K(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function Q(t){const{visualElement:e}=t.options;e?.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function X(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Y(t){t.resolveTargetDelta()}function tt(t){t.calcProjection()}function et(t){t.resetSkewAndRotation()}function it(t,e,i){t.translate=d.mixNumber(e.translate,0,i),t.scale=d.mixNumber(e.scale,1,i),t.origin=e.origin,t.originPoint=e.originPoint}function st(t,e,i,s){t.min=d.mixNumber(e.min,i.min,s),t.max=d.mixNumber(e.max,i.max,s)}function ot(t,e,i,s){st(t.x,e.x,i.x,s),st(t.y,e.y,i.y,s)}function at(t){return void 0!==t.animationValues?.opacityExit}const rt={duration:.45,ease:[.4,0,.1,1]};function nt(t,e,i){t.max=j.calcLength(i)+(t.min=e.min)}function lt(t,e,i){return"position"===t||"preserve-aspect"===t&&!j.isNear(B.aspectRatio(e),B.aspectRatio(i),.2)}function ht(t){return t!==t.root&&t.scroll?.wasRoot}exports.cleanDirtyNodes=W,exports.createProjectionNode=function({attachResizeListener:i,defaultParent:d,measureScroll:g,checkIsScrollRoot:R,resetTransform:st}){return Object.assign(r.scaleCorrectors,{...S.defaultScaleCorrectors,...r.scaleCorrectors}),class{static create(t,e,i){const{layoutId:s,layout:o,drag:a,dragConstraints:r,layoutScroll:n,layoutRoot:l,layoutAnchor:c,layoutCrossfade:u}=e,d=t.projection=new this(t.latestValues,e["data-framer-portal-id"]?void 0:M(t.parent));d.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(a)||r&&h.isRefObject(r),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,crossfade:u,layoutScroll:n,layoutRoot:l,layoutAnchor:c});const m=d.getStack()?.lead;m&&!d.root.isUpdateBlocked()&&(m.willUpdate(),m.scheduleCheckAfterUnmount())}constructor(t={},e=d?.()){this.id=q++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(H),this.nodes.forEach(Y),this.nodes.forEach(tt),this.nodes.forEach(W),n.statsBuffer.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new L.FlatTree)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new C.SubscriptionManager),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){this.eventHandlers.get(t)?.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(t){if(this.instance)return;this.isSVG=c.isSVGElement(t)&&!u.isSVGSVGElement(t),this.instance=t;const{layoutId:e,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(s||e)&&(this.isLayoutDirty=!0),i){let e,s=0;const o=()=>this.root.updateBlockedByResize=!1;E.frame.read(()=>{s=window.innerWidth}),i(t,()=>{const t=window.innerWidth;t!==s&&(s=t,this.root.updateBlockedByResize=!0,e?.(),e=l.delay(o,250),k.globalProjectionState.hasAnimatedSinceResize&&(k.globalProjectionState.hasAnimatedSinceResize=!1,this.nodes.forEach(X)))})}e&&this.root.registerSharedNode(e,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:t,layout:e,visualElement:i,animate:o}=this.options;this.instance&&!this.hasLayoutListener&&!1!==o&&i&&(t||e)&&(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:o,layout:a})=>{if(this.isAnimationBlocked)return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||i.getDefaultTransition()||rt,{onLayoutAnimationStart:n,onLayoutAnimationComplete:l}=i.getProps(),h=!this.targetLayout||!B.boxEqualsRounded(this.targetLayout,a),c=!e&&o;if(this.options.layoutRoot||this.resumeFrom||c||e&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...s.getValueTransition(r,"layout"),onPlay:n,onComplete:l};(i.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,c,e.path)}else e||X(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=a}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,E.cancelFrame(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(et),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void this.options.onExitComplete?.();if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&O(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;b(this),this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,b(e),"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1),e.isAnimationBlocked&&(e.dragSnapshot||(e.dragSnapshot=e.measure()),this.dragAncestor=e)}const{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;const s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const t=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),t&&this.nodes.forEach($),void this.nodes.forEach(Z)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(_);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(J),this.nodes.forEach(K),this.nodes.forEach(Q),this.nodes.forEach(N),this.nodes.forEach(z)):this.nodes.forEach(_),this.clearAllSnapshots();const t=a.time.now();w.frameData.delta=U.clamp(0,1e3/60,t-w.frameData.timestamp),w.frameData.timestamp=t,w.frameData.isProcessing=!0,E.frameSteps.update.process(w.frameData),E.frameSteps.preRender.process(w.frameData),E.frameSteps.render.process(w.frameData),w.frameData.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,o.microtask.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(G),this.sharedNodes.forEach((t,e)=>t.members.length?t.removeLeadSnapshot():this.sharedNodes.delete(e))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.frame.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.frame.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||j.calcLength(this.snapshot.measuredBox.x)||j.calcLength(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected=D.createBox()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e?.notify("LayoutMeasure",this.layout.layoutBox,t?.layoutBox)}updateScroll(t="measure"){const{scroll:e,instance:i}=this,{animationId:s}=this.root;if(this.options.layoutScroll&&i&&(!e||e.animationId!==s||e.phase!==t)){const o=R(i);this.scroll={animationId:s,phase:t,isRoot:o,offset:g(i),wasRoot:e?e.isRoot:o}}}resetTransform(){if(!st)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;t&&b(this);const e=this.projectionDelta&&!B.isDeltaZero(this.projectionDelta),i=this.getTransformTemplate(),s=i?i(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&this.instance&&(e||V.hasTransform(this.latestValues)||o)&&(st(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let i=this.removeElementScroll(e);return t&&(i=this.removeTransform(i)),T.roundBox(i),{animationId:this.root.animationId,measuredBox:e,layoutBox:i,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return D.createBox();const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ht))){const{scroll:t}=this.root;t&&(v.translateAxis(e.x,t.offset.x),v.translateAxis(e.y,t.offset.y))}return e}removeElementScroll(t){const e=D.createBox();if(f.copyBoxInto(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){const s=this.path[i],{scroll:o,options:a}=s;s!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&f.copyBoxInto(e,t),v.translateAxis(e.x,o.offset.x),v.translateAxis(e.y,o.offset.y))}return e}applyTransform(t,e=!1,i,s,o=0){const a=i||D.createBox();f.copyBoxInto(a,t);for(let t=o;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(v.translateAxis(a.x,-i.scroll.offset.x),v.translateAxis(a.y,-i.scroll.offset.y)),V.hasTransform(i.latestValues)&&v.transformBox(a,i.latestValues,i.layout?.layoutBox)}return!s&&V.hasTransform(this.latestValues)&&v.transformBox(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(t){const e=D.createBox();f.copyBoxInto(e,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];if(!V.hasTransform(i.latestValues))continue;let s;i.instance&&(V.hasScale(i.latestValues)&&i.updateSnapshot(),s=D.createBox(),f.copyBoxInto(s,i.measurePageBox())),x.removeBoxTransforms(e,i.latestValues,i.snapshot?.layoutBox,s)}return V.hasTransform(this.latestValues)&&x.removeBoxTransforms(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade},this.addLayoutListener()}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==w.frameData.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=w.frameData.timestamp;const a=this.getClosestProjectingParent();this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=D.createBox(),this.targetWithTransforms=D.createBox()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),j.calcRelativeBox(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):f.copyBoxInto(this.target,this.layout.layoutBox),v.applyBoxDelta(this.target,this.targetDelta)):f.copyBoxInto(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),n.statsBuffer.countProjection?.(1))}getClosestProjectingParent(){if(this.parent&&!V.hasScale(this.parent.latestValues)&&!V.has2DTranslate(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D.createBox(),this.relativeTargetOrigin=D.createBox(),j.calcRelativePosition(this.relativeTargetOrigin,e,i,this.options.layoutAnchor||void 0),f.copyBoxInto(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===w.frameData.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;f.copyBoxInto(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,r=this.treeScale.y;v.applyTreeDeltas(this.layoutCorrected,this.treeScale,this.path,e&&(!(t.relativeTarget&&!t.relativeParent.resumingFrom)||t.relativeParent)),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=D.createBox());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(f.copyAxisDeltaInto(this.prevProjectionDelta.x,this.projectionDelta.x),f.copyAxisDeltaInto(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),j.calcBoxDelta(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===a&&this.treeScale.y===r&&B.axisDeltaEquals(this.projectionDelta.x,this.prevProjectionDelta.x)&&B.axisDeltaEquals(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),n.statsBuffer.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){this.options.visualElement?.scheduleRender(),t&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=D.createDelta(),this.projectionDelta=D.createDelta(),this.projectionDeltaWithTransform=D.createDelta()}setAnimationOrigin(t,e=!1,i){const s=this.snapshot,o=s?s.latestValues:{},a={...this.latestValues},r=D.createDelta();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const n=D.createBox(),l=s?.source!==this.layout?.source,h=this.getStack(),c=!h||h.members.length<=1,u=Boolean(l&&!c&&!0===this.options.crossfade&&!this.path.some(at));let d;this.animationProgress=0;const m=i?.interpolateProjection(t);this.mixTargetDelta=e=>{const i=e/1e3,s=m?.(i);it(r.x,t.x,i),it(r.y,t.y,i),s&&(r.x.translate=s.x,r.y.translate=s.y),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(j.calcRelativePosition(n,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ot(this.relativeTarget,this.relativeTargetOrigin,n,i),d&&B.boxEquals(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=D.createBox()),f.copyBoxInto(d,this.relativeTarget)),l&&(this.animationValues=a,y.mixValues(a,o,this.latestValues,i,u,c)),void 0!==s?.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=s.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(E.cancelFrame(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.frame.update(()=>{k.globalProjectionState.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=m.motionValue(0)),this.motionValue.jump(0,!1),this.currentAnimation=t.animateSingleValue(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),i.onUpdate&&i.onUpdate(t)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),e.notifyLayoutAnimationStart(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead(),{targetWithTransforms:e,layout:i,latestValues:s}=t;let{target:o}=t;if(e&&o&&i){if(this!==t&&this.layout&&i&&lt(this.options.animationType,this.layout.layoutBox,i.layoutBox)){const{layoutBox:t}=this.layout,e=o;o=this.target||D.createBox(),nt(o.x,e.x,t.x),nt(o.y,e.y,t.y)}f.copyBoxInto(e,o),v.transformBox(e,s),j.calcBoxDelta(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new P.NodeStack);this.sharedNodes.get(t).add(e);const i=e.options.initialPromotionConfig;e.promote({transition:i?.transition,preserveFollowOpacity:i?.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){this.getStack()?.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;const{latestValues:e}=t;if(!V.hasDistortingTransform(e))return;const i={};for(let e=0;e<I.length;e++)F(I[e],t,i,this.animationValues);for(let e=0;e<V.angleTransforms.length;e++)F(V.angleTransforms[e],t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;const i=this.getLead();if(!this.isVisible&&i!==this)return void(t.visibility="hidden");const s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=p.resolveMotionValue(e?.pointerEvents)||"",void(t.transform=s?s(this.latestValues,""):"none");if(!this.projectionDelta||!this.layout||!i.target)return(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,t.visibility="",t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=p.resolveMotionValue(e?.pointerEvents)||""),void(this.hasProjected&&!V.hasTransform(this.latestValues)&&(t.transform=s?s({},""):"none",this.hasProjected=!1));t.visibility="";const o=i.animationValues||i.latestValues;this.applyTransformsToTarget();let a=A.buildProjectionTransform(this.projectionDeltaWithTransform,this.treeScale,o);s&&(a=s(o,a)),t.transform=a;const{x:n,y:l}=this.projectionDelta;t.transformOrigin=`${100*n.origin}% ${100*l.origin}% 0`,i.animationValues?t.opacity=i===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:t.opacity=i===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const e in r.scaleCorrectors){if(void 0===o[e])continue;const{correct:s,applyTo:n,isCSSVariable:l}=r.scaleCorrectors[e],h="none"===a?o[e]:s(o[e],i);if(n){const e=n.length;for(let i=0;i<e;i++)t[n[i]]=h}else l?this.options.visualElement.renderState.vars[e]=h:t[e]=h}this.options.layoutId&&(t.pointerEvents=i===this?p.resolveMotionValue(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Z),this.root.sharedNodes.clear()}}},exports.mixAxis=st,exports.mixBox=ot,exports.propagateDirtyNodes=H;
2
2
  //# sourceMappingURL=create-projection-node.mjs.js.map