@nethesis/phone-island 1.1.3 → 1.1.5-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 (463) 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 +1 -1
  60. package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
  61. package/dist/components/Socket.js +1 -1
  62. package/dist/components/Socket.js.map +1 -1
  63. package/dist/components/SwitchDeviceView/index.js +1 -1
  64. package/dist/components/SwitchDeviceView/index.js.map +1 -1
  65. package/dist/components/SwitchInputView/DropdownContent.js +1 -1
  66. package/dist/components/SwitchInputView/DropdownContent.js.map +1 -1
  67. package/dist/components/SwitchInputView/Index.js +1 -1
  68. package/dist/components/TextScroll.js +1 -1
  69. package/dist/components/TextScroll.js.map +1 -1
  70. package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
  71. package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
  72. package/dist/components/VideoStreamingEmptyState/index.js +1 -1
  73. package/dist/components/VideoStreamingEmptyState/index.js.map +1 -1
  74. package/dist/components/VideoStreamingSkeleton/index.js +1 -1
  75. package/dist/components/VideoStreamingSkeleton/index.js.map +1 -1
  76. package/dist/components/VideoView/index.js +1 -1
  77. package/dist/components/VideoView/index.js.map +1 -1
  78. package/dist/components/WebRTC.js +1 -1
  79. package/dist/components/WebRTC.js.map +1 -1
  80. package/dist/events/SocketEvents.js.map +1 -1
  81. package/dist/lib/i18n.js +1 -1
  82. package/dist/lib/i18n.js.map +1 -1
  83. package/dist/lib/phone/call.js +1 -1
  84. package/dist/lib/phone/call.js.map +1 -1
  85. package/dist/lib/phone/counterpartDevice.js +1 -1
  86. package/dist/lib/phone/counterpartDevice.js.map +1 -1
  87. package/dist/lib/phone/screenShare.js +2 -0
  88. package/dist/lib/phone/screenShare.js.map +1 -0
  89. package/dist/lib/phone/video.js.map +1 -1
  90. package/dist/lib/player/audio.js.map +1 -1
  91. package/dist/lib/user/default_device.js.map +1 -1
  92. package/dist/lib/user/extensions.js.map +1 -1
  93. package/dist/models/currentCall.js.map +1 -1
  94. package/dist/models/island.js.map +1 -1
  95. package/dist/models/player.js +1 -1
  96. package/dist/models/player.js.map +1 -1
  97. package/dist/node_modules/classnames/index.js +1 -1
  98. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
  99. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
  100. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  101. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  102. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
  103. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
  104. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
  105. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
  106. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js.map +1 -1
  107. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.mjs.js.map +1 -1
  109. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.js.map +1 -1
  110. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.js.map +1 -1
  111. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js +1 -1
  112. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js.map +1 -1
  113. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js.map +1 -1
  114. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
  115. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
  116. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
  117. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
  118. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  119. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  120. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
  121. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
  122. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js +1 -1
  123. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js.map +1 -1
  124. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
  125. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
  126. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
  127. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
  128. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  129. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  130. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.js.map +1 -1
  131. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
  132. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
  133. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
  134. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
  135. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js +1 -1
  136. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js.map +1 -1
  137. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
  138. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
  139. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js +1 -1
  140. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js.map +1 -1
  141. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js +1 -1
  142. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js.map +1 -1
  143. package/dist/node_modules/i18next/dist/esm/i18next.js +1 -1
  144. package/dist/node_modules/i18next/dist/esm/i18next.js.map +1 -1
  145. package/dist/node_modules/js-base64/base64.mjs.js +1 -1
  146. package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
  147. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  148. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  151. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  152. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  153. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js +1 -1
  154. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js.map +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js.map +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +1 -1
  158. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -1
  159. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  160. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  161. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
  162. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  163. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
  164. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js +1 -1
  166. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js.map +1 -1
  167. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
  169. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js +1 -1
  170. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js.map +1 -1
  171. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +1 -1
  172. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -1
  173. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
  178. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -1
  179. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  180. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  181. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
  182. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  183. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
  184. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
  185. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js +1 -1
  186. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js.map +1 -1
  187. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
  188. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
  189. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js.map +1 -1
  191. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js +1 -1
  192. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js.map +1 -1
  193. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
  194. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
  195. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
  196. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
  197. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js +1 -1
  198. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -1
  199. package/dist/node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs.js +2 -0
  200. package/dist/node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs.js.map +1 -0
  201. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs.js +2 -0
  202. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs.js.map +1 -0
  203. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
  204. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
  205. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js +2 -0
  206. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/TransformAnimation.mjs.js.map +1 -0
  207. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js +2 -0
  208. package/dist/node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs.js.map +1 -0
  209. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +1 -1
  210. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -1
  211. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js +2 -0
  212. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/needs-mixer.mjs.js.map +1 -0
  213. package/dist/node_modules/motion-dom/dist/es/events/add-pointer-event.mjs.js +2 -0
  214. package/dist/node_modules/motion-dom/dist/es/events/add-pointer-event.mjs.js.map +1 -0
  215. package/dist/node_modules/motion-dom/dist/es/events/event-info.mjs.js +2 -0
  216. package/dist/node_modules/motion-dom/dist/es/events/event-info.mjs.js.map +1 -0
  217. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
  218. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
  219. package/dist/node_modules/motion-dom/dist/es/frameloop/frame-data.mjs.js +2 -0
  220. package/dist/node_modules/motion-dom/dist/es/frameloop/frame-data.mjs.js.map +1 -0
  221. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js +1 -1
  222. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js.map +1 -1
  223. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
  224. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
  225. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js +1 -1
  226. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js.map +1 -1
  227. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js +2 -0
  228. package/dist/node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -0
  229. package/dist/node_modules/motion-dom/dist/es/gestures/drag/utils/constraints.mjs.js +2 -0
  230. package/dist/node_modules/motion-dom/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -0
  231. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
  232. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
  233. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js +2 -0
  234. package/dist/node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs.js.map +1 -0
  235. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  236. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  237. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js +1 -1
  238. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
  239. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js +1 -1
  240. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js.map +1 -1
  241. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +1 -1
  242. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -1
  243. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
  244. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
  245. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
  246. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
  247. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
  248. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
  249. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js +2 -0
  250. package/dist/node_modules/motion-dom/dist/es/projection/geometry/round.mjs.js.map +1 -0
  251. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js +1 -1
  252. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -1
  253. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js +1 -1
  254. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -1
  255. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
  256. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
  257. package/dist/node_modules/motion-dom/dist/es/projection/node/root.mjs.js +2 -0
  258. package/dist/node_modules/motion-dom/dist/es/projection/node/root.mjs.js.map +1 -0
  259. package/dist/node_modules/motion-dom/dist/es/projection/styles/default-scale-correctors.mjs.js +2 -0
  260. package/dist/node_modules/motion-dom/dist/es/projection/styles/default-scale-correctors.mjs.js.map +1 -0
  261. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js +1 -1
  262. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js.map +1 -1
  263. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js +1 -1
  264. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -1
  265. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.js.map +1 -1
  266. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
  267. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
  268. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js +1 -1
  269. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js.map +1 -1
  270. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
  271. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
  272. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -1
  273. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
  274. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
  275. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
  276. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
  277. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +1 -1
  278. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -1
  279. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js +1 -1
  280. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js.map +1 -1
  281. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +1 -1
  282. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -1
  283. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js +1 -1
  284. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +1 -1
  285. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
  286. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
  287. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js +1 -1
  288. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map +1 -1
  289. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js +1 -1
  290. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js.map +1 -1
  291. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js +1 -1
  292. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +1 -1
  293. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js +1 -1
  294. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js.map +1 -1
  295. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js +1 -1
  296. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js.map +1 -1
  297. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js +1 -1
  298. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js.map +1 -1
  299. package/dist/node_modules/motion-dom/dist/es/scope/active.mjs.js +2 -0
  300. package/dist/node_modules/motion-dom/dist/es/scope/active.mjs.js.map +1 -0
  301. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js +2 -0
  302. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js.map +1 -0
  303. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +1 -1
  304. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -1
  305. package/dist/node_modules/motion-dom/dist/es/utils/distance.mjs.js.map +1 -0
  306. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
  307. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  308. package/dist/node_modules/motion-dom/dist/es/utils/is-ref-object.mjs.js.map +1 -0
  309. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
  310. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
  311. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
  312. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
  313. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js +1 -1
  314. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js.map +1 -1
  315. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js +1 -1
  316. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
  317. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  318. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  319. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js +1 -1
  320. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js.map +1 -1
  321. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  322. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  323. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js +1 -1
  324. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js.map +1 -1
  325. package/dist/node_modules/motion-dom/dist/es/value/utils/as-number.mjs.js +2 -0
  326. package/dist/node_modules/motion-dom/dist/es/value/utils/as-number.mjs.js.map +1 -0
  327. package/dist/node_modules/motion-utils/dist/es/easing/circ.mjs.js.map +1 -1
  328. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js +1 -1
  329. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js.map +1 -1
  330. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js +1 -1
  331. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
  332. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js +1 -1
  333. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js.map +1 -1
  334. package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js +1 -1
  335. package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js.map +1 -1
  336. package/dist/node_modules/react-i18next/dist/es/context.js +1 -1
  337. package/dist/node_modules/react-i18next/dist/es/context.js.map +1 -1
  338. package/dist/node_modules/react-i18next/dist/es/defaults.js +1 -1
  339. package/dist/node_modules/react-i18next/dist/es/defaults.js.map +1 -1
  340. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +1 -1
  341. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js.map +1 -1
  342. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +1 -1
  343. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js.map +1 -1
  344. package/dist/node_modules/react-i18next/dist/es/unescape.js +1 -1
  345. package/dist/node_modules/react-i18next/dist/es/unescape.js.map +1 -1
  346. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +1 -1
  347. package/dist/node_modules/react-i18next/dist/es/useTranslation.js.map +1 -1
  348. package/dist/node_modules/react-i18next/dist/es/utils.js +1 -1
  349. package/dist/node_modules/react-i18next/dist/es/utils.js.map +1 -1
  350. package/dist/node_modules/react-redux/node_modules/react-is/index.js +1 -1
  351. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +1 -1
  352. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +1 -1
  353. package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
  354. package/dist/package.json.js +1 -1
  355. package/dist/services/astproxy.js +1 -1
  356. package/dist/services/astproxy.js.map +1 -1
  357. package/dist/services/phonebook.js +1 -1
  358. package/dist/services/phonebook.js.map +1 -1
  359. package/dist/utils/customHooks/useLocalStorage.js.map +1 -1
  360. package/dist/utils/deviceUtils.js.map +1 -1
  361. package/package.json +6 -6
  362. package/dist/_virtual/arrayLikeToArray.js +0 -2
  363. package/dist/_virtual/arrayLikeToArray.js.map +0 -1
  364. package/dist/_virtual/arrayWithHoles.js +0 -2
  365. package/dist/_virtual/arrayWithHoles.js.map +0 -1
  366. package/dist/_virtual/classCallCheck.js +0 -2
  367. package/dist/_virtual/classCallCheck.js.map +0 -1
  368. package/dist/_virtual/createClass.js +0 -2
  369. package/dist/_virtual/createClass.js.map +0 -1
  370. package/dist/_virtual/defineProperty.js +0 -2
  371. package/dist/_virtual/defineProperty.js.map +0 -1
  372. package/dist/_virtual/iterableToArrayLimit.js +0 -2
  373. package/dist/_virtual/iterableToArrayLimit.js.map +0 -1
  374. package/dist/_virtual/nonIterableRest.js +0 -2
  375. package/dist/_virtual/nonIterableRest.js.map +0 -1
  376. package/dist/_virtual/objectWithoutProperties.js +0 -2
  377. package/dist/_virtual/objectWithoutProperties.js.map +0 -1
  378. package/dist/_virtual/objectWithoutPropertiesLoose.js +0 -2
  379. package/dist/_virtual/objectWithoutPropertiesLoose.js.map +0 -1
  380. package/dist/_virtual/slicedToArray.js +0 -2
  381. package/dist/_virtual/slicedToArray.js.map +0 -1
  382. package/dist/_virtual/toPrimitive.js +0 -2
  383. package/dist/_virtual/toPrimitive.js.map +0 -1
  384. package/dist/_virtual/toPropertyKey.js +0 -2
  385. package/dist/_virtual/toPropertyKey.js.map +0 -1
  386. package/dist/_virtual/typeof.js +0 -2
  387. package/dist/_virtual/typeof.js.map +0 -1
  388. package/dist/_virtual/unsupportedIterableToArray.js +0 -2
  389. package/dist/_virtual/unsupportedIterableToArray.js.map +0 -1
  390. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -2
  391. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +0 -1
  392. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -2
  393. package/dist/node_modules/@babel/runtime/helpers/arrayWithHoles.js.map +0 -1
  394. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -2
  395. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js.map +0 -1
  396. package/dist/node_modules/@babel/runtime/helpers/createClass.js +0 -2
  397. package/dist/node_modules/@babel/runtime/helpers/createClass.js.map +0 -1
  398. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js +0 -2
  399. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js.map +0 -1
  400. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -2
  401. package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +0 -1
  402. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -2
  403. package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js.map +0 -1
  404. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -2
  405. package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +0 -1
  406. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -2
  407. package/dist/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js.map +0 -1
  408. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -2
  409. package/dist/node_modules/@babel/runtime/helpers/esm/inherits.js.map +0 -1
  410. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -2
  411. package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +0 -1
  412. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -2
  413. package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js.map +0 -1
  414. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -2
  415. package/dist/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js.map +0 -1
  416. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -2
  417. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
  418. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -2
  419. package/dist/node_modules/@babel/runtime/helpers/esm/toArray.js.map +0 -1
  420. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -2
  421. package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +0 -1
  422. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -2
  423. package/dist/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js.map +0 -1
  424. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -2
  425. package/dist/node_modules/@babel/runtime/helpers/nonIterableRest.js.map +0 -1
  426. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -2
  427. package/dist/node_modules/@babel/runtime/helpers/objectWithoutProperties.js.map +0 -1
  428. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -2
  429. package/dist/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js.map +0 -1
  430. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -2
  431. package/dist/node_modules/@babel/runtime/helpers/slicedToArray.js.map +0 -1
  432. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -2
  433. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +0 -1
  434. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -2
  435. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js.map +0 -1
  436. package/dist/node_modules/@babel/runtime/helpers/typeof.js +0 -2
  437. package/dist/node_modules/@babel/runtime/helpers/typeof.js.map +0 -1
  438. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -2
  439. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +0 -1
  440. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js +0 -2
  441. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js.map +0 -1
  442. package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js +0 -2
  443. package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js.map +0 -1
  444. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +0 -2
  445. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +0 -1
  446. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +0 -2
  447. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +0 -1
  448. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +0 -2
  449. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +0 -1
  450. package/dist/node_modules/framer-motion/dist/es/utils/distance.mjs.js.map +0 -1
  451. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +0 -2
  452. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +0 -1
  453. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.js.map +0 -1
  454. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js +0 -2
  455. package/dist/node_modules/html-parse-stringify/dist/html-parse-stringify.js.map +0 -1
  456. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js +0 -2
  457. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js.map +0 -1
  458. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js +0 -2
  459. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js.map +0 -1
  460. package/dist/node_modules/void-elements/index.js +0 -2
  461. package/dist/node_modules/void-elements/index.js.map +0 -1
  462. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/distance.mjs.js +0 -0
  463. /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 e=require("../node_modules/tslib/tslib.es6.js"),r=require("../node_modules/@rematch/core/dist/core.esm.js"),a=require("../lib/phone/audio.js"),u=require("../events/PlayerEvents.js"),n={audioPlayer:null,audioPlayerPlaying:!1,audioPlayerPaused:!1,audioPlayerLoop:!1,audioPlayerTrackType:null,audioPlayerTrackName:null,audioPlayerTrackDuration:null,localAudio:null,remoteAudio:null,localVideo:null,largeRemoteVideo:null,smallRemoteVideo:null,localScreen:null,remoteScreen:null},i=r.createModel()({state:n,reducers:{updatePlayer:function(r,a){return e.__assign(e.__assign({},r),a)},updateAudioPlayerTrackDuration:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerTrackDuration:a})},updateAudioPlayerSrc:function(e,r){return e.audioPlayer&&e.audioPlayer.current&&(e.audioPlayer.current.src=r),e},stopAudioPlayer:function(r){if(r.audioPlayer&&r.audioPlayer.current)return r.audioPlayer.current.pause(),r.audioPlayer.current.currentTime=0,"function"==typeof r.audioPlayer.current.setSinkId&&r.audioPlayer.current.setSinkId("default").catch(function(e){console.warn("Failed to reset audio output device to default:",e)}),e.__assign(e.__assign({},r),{audioPlayerPlaying:!1})},emergencyStopAudioPlayer:function(r){if(r.audioPlayer&&r.audioPlayer.current)try{r.audioPlayer.current.pause(),r.audioPlayer.current.currentTime=0,r.audioPlayer.current.src="","function"==typeof r.audioPlayer.current.setSinkId&&r.audioPlayer.current.setSinkId("default").catch(function(e){console.warn("Failed to reset audio output device to default:",e)})}catch(e){console.error("Error in emergency stop audio player:",e)}return e.__assign(e.__assign({},r),{audioPlayerPlaying:!1,audioPlayerPaused:!1,audioPlayerLoop:!1,audioPlayerTrackType:null,audioPlayerTrackName:null})},pauseAudioPlayer:function(r){if(r.audioPlayer&&r.audioPlayer.current)return r.audioPlayer.current.pause(),e.__assign(e.__assign({},r),{audioPlayerPaused:!0,audioPlayerPlaying:!1})},setAudioPlayerPaused:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerPaused:a})},setAudioPlayerLoop:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerLoop:a})},setAudioPlayerType:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerTrackType:a})},setAudioPlayerPlaying:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerPlaying:a})},resetAudioPlayerType:function(r){return e.__assign(e.__assign({},r),{audioPlayerTrackType:null})},setAudioPlayerTrackName:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerTrackName:a})},playRemoteAudio:function(e){var r;e.remoteAudio&&(null===(r=e.remoteAudio.current)||void 0===r||r.play())},pauseRemoteAudio:function(e){var r;e.remoteAudio&&(null===(r=e.remoteAudio.current)||void 0===r||r.pause())},setAudioPlayerCurrentTime:function(e,r){e.audioPlayer&&e.audioPlayer.current&&(e.audioPlayer.current.currentTime=r)},reset:function(){return n}},effects:function(r){return{startAudioPlayer:function(e,a){if(a.player.audioPlayer&&a.player.audioPlayer.current){a.player.audioPlayerPlaying&&(a.player.audioPlayer.current.pause(),a.player.audioPlayer.current.currentTime=0);var n=function(){r.player.setAudioPlayerPlaying(!1),a.player.audioPlayer.current.removeEventListener("ended",n),e()};a.player.audioPlayer.current.addEventListener("ended",n),a.player.audioPlayer.current.play(),r.player.setAudioPlayerPlaying(!0),r.player.setAudioPlayerPaused(!1),"player"===a.island.view&&u.dispatchAudioPlayerStarted()}},updateStartAudioPlayer:function(u,n){var i=u.src,o=u.loop,t=void 0!==o&&o,l=u.useRingtoneOutput,d=void 0!==l&&l;return e.__awaiter(void 0,void 0,void 0,function(){var u,o,l,s,c;return e.__generator(this,function(e){switch(e.label){case 0:if(r.player.setAudioPlayerLoop(t),!(u=d?null===(s=n.ringtones)||void 0===s?void 0:s.outputDeviceId:null)||!(null===(c=n.player.audioPlayer)||void 0===c?void 0:c.current)||"function"!=typeof n.player.audioPlayer.current.setSinkId)return[3,8];e.label=1;case 1:return e.trys.push([1,3,,8]),[4,n.player.audioPlayer.current.setSinkId(u)];case 2:return e.sent(),console.info("Ringtone output device applied:",u),[3,8];case 3:o=e.sent(),console.warn("Failed to set ringtone output device, trying fallback to default:",o),e.label=4;case 4:return e.trys.push([4,6,,7]),[4,n.player.audioPlayer.current.setSinkId("default")];case 5:return e.sent(),console.info("Ringtone output fallback to default successful"),r.ringtones.setOutputDeviceId("default"),[3,7];case 6:return l=e.sent(),console.error("Even default device failed for ringtone:",l),[3,7];case 7:return[3,8];case 8:return[4,a.updateAudioPlayerSource("data:audio/ogg;base64, ".concat(i))];case 9:return e.sent(),r.player.startAudioPlayer(function(){}),[2]}})})}}}});exports.player=i;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../node_modules/tslib/tslib.es6.js"),r=require("../node_modules/@rematch/core/dist/core.esm.js"),a=require("../lib/phone/audio.js"),u=require("../events/PlayerEvents.js"),n={audioPlayer:null,audioPlayerPlaying:!1,audioPlayerPaused:!1,audioPlayerLoop:!1,audioPlayerTrackType:null,audioPlayerTrackName:null,audioPlayerTrackDuration:null,localAudio:null,remoteAudio:null,localVideo:null,largeRemoteVideo:null,smallRemoteVideo:null,localScreen:null,remoteScreen:null},i=r.createModel()({state:n,reducers:{updatePlayer:function(r,a){return e.__assign(e.__assign({},r),a)},updateAudioPlayerTrackDuration:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerTrackDuration:a})},updateAudioPlayerSrc:function(e,r){return e.audioPlayer&&e.audioPlayer.current&&(e.audioPlayer.current.src=r),e},stopAudioPlayer:function(r){if(r.audioPlayer&&r.audioPlayer.current)return r.audioPlayer.current.pause(),r.audioPlayer.current.currentTime=0,"function"==typeof r.audioPlayer.current.setSinkId&&r.audioPlayer.current.setSinkId("default").catch(function(e){console.warn("Failed to reset audio output device to default:",e)}),e.__assign(e.__assign({},r),{audioPlayerPlaying:!1})},emergencyStopAudioPlayer:function(r){if(r.audioPlayer&&r.audioPlayer.current)try{r.audioPlayer.current.pause(),r.audioPlayer.current.currentTime=0,r.audioPlayer.current.src="","function"==typeof r.audioPlayer.current.setSinkId&&r.audioPlayer.current.setSinkId("default").catch(function(e){console.warn("Failed to reset audio output device to default:",e)})}catch(e){console.error("Error in emergency stop audio player:",e)}return e.__assign(e.__assign({},r),{audioPlayerPlaying:!1,audioPlayerPaused:!1,audioPlayerLoop:!1,audioPlayerTrackType:null,audioPlayerTrackName:null})},pauseAudioPlayer:function(r){if(r.audioPlayer&&r.audioPlayer.current)return r.audioPlayer.current.pause(),e.__assign(e.__assign({},r),{audioPlayerPaused:!0,audioPlayerPlaying:!1})},setAudioPlayerPaused:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerPaused:a})},setAudioPlayerLoop:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerLoop:a})},setAudioPlayerType:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerTrackType:a})},setAudioPlayerPlaying:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerPlaying:a})},resetAudioPlayerType:function(r){return e.__assign(e.__assign({},r),{audioPlayerTrackType:null})},setAudioPlayerTrackName:function(r,a){return e.__assign(e.__assign({},r),{audioPlayerTrackName:a})},playRemoteAudio:function(e){var r;e.remoteAudio&&(null===(r=e.remoteAudio.current)||void 0===r||r.play())},pauseRemoteAudio:function(e){var r;e.remoteAudio&&(null===(r=e.remoteAudio.current)||void 0===r||r.pause())},setAudioPlayerCurrentTime:function(e,r){e.audioPlayer&&e.audioPlayer.current&&(e.audioPlayer.current.currentTime=r)},reset:function(){return n}},effects:function(r){return{startAudioPlayer:function(e,a){if(a.player.audioPlayer&&a.player.audioPlayer.current){a.player.audioPlayerPlaying&&(a.player.audioPlayer.current.pause(),a.player.audioPlayer.current.currentTime=0);var n=function(){r.player.setAudioPlayerPlaying(!1),a.player.audioPlayer.current.removeEventListener("ended",n),e()};a.player.audioPlayer.current.addEventListener("ended",n),a.player.audioPlayer.current.play(),r.player.setAudioPlayerPlaying(!0),r.player.setAudioPlayerPaused(!1),"player"===a.island.view&&u.dispatchAudioPlayerStarted()}},updateStartAudioPlayer:function(u,n){return e.__awaiter(void 0,[u,n],void 0,function(u,n){var i,o,t,l,d,s=u.src,c=u.loop,y=void 0!==c&&c,P=u.useRingtoneOutput,p=void 0!==P&&P;return e.__generator(this,function(e){switch(e.label){case 0:if(r.player.setAudioPlayerLoop(y),!(i=p?null===(l=n.ringtones)||void 0===l?void 0:l.outputDeviceId:null)||!(null===(d=n.player.audioPlayer)||void 0===d?void 0:d.current)||"function"!=typeof n.player.audioPlayer.current.setSinkId)return[3,8];e.label=1;case 1:return e.trys.push([1,3,,8]),[4,n.player.audioPlayer.current.setSinkId(i)];case 2:return e.sent(),console.info("Ringtone output device applied:",i),[3,8];case 3:o=e.sent(),console.warn("Failed to set ringtone output device, trying fallback to default:",o),e.label=4;case 4:return e.trys.push([4,6,,7]),[4,n.player.audioPlayer.current.setSinkId("default")];case 5:return e.sent(),console.info("Ringtone output fallback to default successful"),r.ringtones.setOutputDeviceId("default"),[3,7];case 6:return t=e.sent(),console.error("Even default device failed for ringtone:",t),[3,7];case 7:return[3,8];case 8:return[4,a.updateAudioPlayerSource("data:audio/ogg;base64, ".concat(s))];case 9:return e.sent(),r.player.startAudioPlayer(function(){}),[2]}})})}}}});exports.player=i;
2
2
  //# sourceMappingURL=player.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"player.js","sources":["../../src/models/player.ts"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { createModel } from '@rematch/core'\nimport type { RootModel } from '.'\nimport { updateAudioPlayerSource } from '../lib/phone/audio'\nimport { dispatchAudioPlayerStarted } from '../events/PlayerEvents'\nimport { type TypeTypes } from '../types'\nimport { RefObject } from 'react'\n\nconst defaultState: PlayerTypes = {\n audioPlayer: null,\n audioPlayerPlaying: false,\n audioPlayerPaused: false,\n audioPlayerLoop: false,\n audioPlayerTrackType: null,\n audioPlayerTrackName: null,\n audioPlayerTrackDuration: null,\n localAudio: null,\n remoteAudio: null,\n localVideo: null,\n largeRemoteVideo: null,\n smallRemoteVideo: null,\n localScreen: null,\n remoteScreen: null,\n}\n\nexport const player = createModel<RootModel>()({\n state: defaultState,\n reducers: {\n updatePlayer: (state, payload: PlayerTypes) => {\n return {\n ...state,\n ...payload,\n }\n },\n updateAudioPlayerTrackDuration: (state, payload: number) => {\n return {\n ...state,\n audioPlayerTrackDuration: payload,\n }\n },\n updateAudioPlayerSrc: (state, payload: string) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.src = payload\n }\n return state\n },\n stopAudioPlayer: (state) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n // Pause audio\n state.audioPlayer.current.pause()\n state.audioPlayer.current.currentTime = 0\n \n // Reset audio output device to default to avoid affecting other sounds\n if (typeof (state.audioPlayer.current as any).setSinkId === 'function') {\n (state.audioPlayer.current as any).setSinkId('default').catch((err: any) => {\n console.warn('Failed to reset audio output device to default:', err)\n })\n }\n \n return {\n ...state,\n audioPlayerPlaying: false,\n }\n }\n },\n emergencyStopAudioPlayer: (state) => {\n // Emergency stop: force reset everything audio-related\n if (state.audioPlayer && state.audioPlayer.current) {\n try {\n state.audioPlayer.current.pause()\n state.audioPlayer.current.currentTime = 0\n state.audioPlayer.current.src = ''\n \n // Reset audio output device to default\n if (typeof (state.audioPlayer.current as any).setSinkId === 'function') {\n (state.audioPlayer.current as any).setSinkId('default').catch((err: any) => {\n console.warn('Failed to reset audio output device to default:', err)\n })\n }\n } catch (err) {\n console.error('Error in emergency stop audio player:', err)\n }\n }\n \n return {\n ...state,\n audioPlayerPlaying: false,\n audioPlayerPaused: false,\n audioPlayerLoop: false,\n audioPlayerTrackType: null,\n audioPlayerTrackName: null,\n }\n },\n pauseAudioPlayer: (state) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.pause()\n return {\n ...state,\n audioPlayerPaused: true,\n audioPlayerPlaying: false,\n }\n }\n },\n setAudioPlayerPaused: (state, payload: boolean) => {\n return {\n ...state,\n audioPlayerPaused: payload,\n }\n },\n setAudioPlayerLoop: (state, payload: boolean) => ({\n ...state,\n audioPlayerLoop: payload,\n }),\n setAudioPlayerType: (state, payload: TypeTypes) => ({\n ...state,\n audioPlayerTrackType: payload,\n }),\n setAudioPlayerPlaying: (state, payload: boolean) => ({\n ...state,\n audioPlayerPlaying: payload,\n }),\n resetAudioPlayerType: (state) => ({\n ...state,\n audioPlayerTrackType: null,\n }),\n setAudioPlayerTrackName: (state, payload: string) => ({\n ...state,\n audioPlayerTrackName: payload,\n }),\n playRemoteAudio: (state) => {\n state.remoteAudio && state.remoteAudio.current?.play()\n },\n pauseRemoteAudio: (state) => {\n state.remoteAudio && state.remoteAudio.current?.pause()\n },\n setAudioPlayerCurrentTime: (state, payload: number) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.currentTime = payload\n }\n },\n reset: () => {\n return defaultState\n },\n },\n effects: (dispatch) => ({\n startAudioPlayer: (endedEventCallback: () => void, rootState) => {\n if (rootState.player.audioPlayer && rootState.player.audioPlayer.current) {\n // Check if is playing\n if (rootState.player.audioPlayerPlaying) {\n rootState.player.audioPlayer.current.pause()\n rootState.player.audioPlayer.current.currentTime = 0\n }\n const endedCallback = () => {\n dispatch.player.setAudioPlayerPlaying(false)\n rootState.player!.audioPlayer!.current!.removeEventListener('ended', endedCallback)\n endedEventCallback()\n }\n // Handle playing ended event\n rootState.player.audioPlayer.current.addEventListener('ended', endedCallback)\n // Play the audio\n rootState.player.audioPlayer.current.play()\n dispatch.player.setAudioPlayerPlaying(true)\n dispatch.player.setAudioPlayerPaused(false)\n // Dispatch the event\n if (rootState.island.view === 'player') {\n dispatchAudioPlayerStarted()\n }\n }\n },\n // This function is recommended for playing audio with base64 sources\n // Set useRingtoneOutput=true only for incoming call ringtones and previews\n updateStartAudioPlayer: async (\n { src, loop = false, useRingtoneOutput = false }: { src: string; loop?: boolean; useRingtoneOutput?: boolean },\n rootState,\n ) => {\n dispatch.player.setAudioPlayerLoop(loop)\n\n // Apply ringtone output device ONLY when explicitly requested (incoming calls & previews)\n const ringtoneOutputDeviceId = useRingtoneOutput ? rootState.ringtones?.outputDeviceId : null\n if (\n ringtoneOutputDeviceId &&\n rootState.player.audioPlayer?.current &&\n typeof (rootState.player.audioPlayer.current as any).setSinkId === 'function'\n ) {\n try {\n await (rootState.player.audioPlayer.current as any).setSinkId(ringtoneOutputDeviceId)\n console.info('Ringtone output device applied:', ringtoneOutputDeviceId)\n } catch (err) {\n console.warn('Failed to set ringtone output device, trying fallback to default:', err)\n // Fallback to default device if the saved device is not available\n try {\n await (rootState.player.audioPlayer.current as any).setSinkId('default')\n console.info('Ringtone output fallback to default successful')\n // Update store to reflect the fallback\n dispatch.ringtones.setOutputDeviceId('default')\n } catch (fallbackErr) {\n console.error('Even default device failed for ringtone:', fallbackErr)\n }\n }\n }\n\n // Update the audio source\n await updateAudioPlayerSource(`data:audio/ogg;base64, ${src}`)\n // Play the outgoing ringtone when ready\n dispatch.player.startAudioPlayer(() => {})\n },\n }),\n})\n\ninterface PlayerTypes {\n audioPlayer?: RefObject<HTMLAudioElement> | null\n audioPlayerPlaying?: boolean\n audioPlayerPaused?: boolean\n audioPlayerLoop?: boolean\n audioPlayerTrackType?: TypeTypes | null\n audioPlayerTrackName?: string | null\n audioPlayerTrackDuration?: number | null\n localAudio?: RefObject<HTMLAudioElement> | null\n remoteAudio?: RefObject<HTMLAudioElement> | null\n localVideo?: RefObject<HTMLVideoElement> | null\n largeRemoteVideo?: RefObject<HTMLVideoElement> | null\n smallRemoteVideo?: RefObject<HTMLVideoElement> | null\n localScreen?: RefObject<HTMLVideoElement> | null\n remoteScreen?: RefObject<HTMLVideoElement> | null\n}\n"],"names":["defaultState","audioPlayer","audioPlayerPlaying","audioPlayerPaused","audioPlayerLoop","audioPlayerTrackType","audioPlayerTrackName","audioPlayerTrackDuration","localAudio","remoteAudio","localVideo","largeRemoteVideo","smallRemoteVideo","localScreen","remoteScreen","player","createModel","state","reducers","updatePlayer","payload","__assign","updateAudioPlayerTrackDuration","updateAudioPlayerSrc","current","src","stopAudioPlayer","pause","currentTime","setSinkId","catch","err","console","warn","emergencyStopAudioPlayer","error","pauseAudioPlayer","setAudioPlayerPaused","setAudioPlayerLoop","setAudioPlayerType","setAudioPlayerPlaying","resetAudioPlayerType","setAudioPlayerTrackName","playRemoteAudio","_a","play","pauseRemoteAudio","setAudioPlayerCurrentTime","reset","effects","dispatch","startAudioPlayer","endedEventCallback","rootState","endedCallback_1","removeEventListener","addEventListener","island","view","dispatchAudioPlayerStarted","updateStartAudioPlayer","_b","loop","_c","useRingtoneOutput","ringtoneOutputDeviceId","_d","ringtones","outputDeviceId","_e","_f","sent","info","err_1","setOutputDeviceId","fallbackErr_1","updateAudioPlayerSource","concat"],"mappings":"8PAUMA,EAA4B,CAChCC,YAAa,KACbC,oBAAoB,EACpBC,mBAAmB,EACnBC,iBAAiB,EACjBC,qBAAsB,KACtBC,qBAAsB,KACtBC,yBAA0B,KAC1BC,WAAY,KACZC,YAAa,KACbC,WAAY,KACZC,iBAAkB,KAClBC,iBAAkB,KAClBC,YAAa,KACbC,aAAc,MAGHC,EAASC,EAAWA,aAAXA,CAAyB,CAC7CC,MAAOjB,EACPkB,SAAU,CACRC,aAAc,SAACF,EAAOG,GACpB,OACKC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,GACAG,EAEN,EACDE,+BAAgC,SAACL,EAAOG,GACtC,OAAAC,EAAAA,SAAAA,EAAAA,SAAA,GACKJ,GAAK,CACRV,yBAA0Ba,GAE7B,EACDG,qBAAsB,SAACN,EAAOG,GAI5B,OAHIH,EAAMhB,aAAegB,EAAMhB,YAAYuB,UACzCP,EAAMhB,YAAYuB,QAAQC,IAAML,GAE3BH,CACR,EACDS,gBAAiB,SAACT,GAChB,GAAIA,EAAMhB,aAAegB,EAAMhB,YAAYuB,QAYzC,OAVAP,EAAMhB,YAAYuB,QAAQG,QAC1BV,EAAMhB,YAAYuB,QAAQI,YAAc,EAGoB,mBAAhDX,EAAMhB,YAAYuB,QAAgBK,WAC3CZ,EAAMhB,YAAYuB,QAAgBK,UAAU,WAAWC,MAAM,SAACC,GAC7DC,QAAQC,KAAK,kDAAmDF,EAClE,GAGFV,EAAAA,SAAAA,EAAAA,SAAA,GACKJ,GAAK,CACRf,oBAAoB,GAGzB,EACDgC,yBAA0B,SAACjB,GAEzB,GAAIA,EAAMhB,aAAegB,EAAMhB,YAAYuB,QACzC,IACEP,EAAMhB,YAAYuB,QAAQG,QAC1BV,EAAMhB,YAAYuB,QAAQI,YAAc,EACxCX,EAAMhB,YAAYuB,QAAQC,IAAM,GAG4B,mBAAhDR,EAAMhB,YAAYuB,QAAgBK,WAC3CZ,EAAMhB,YAAYuB,QAAgBK,UAAU,WAAWC,MAAM,SAACC,GAC7DC,QAAQC,KAAK,kDAAmDF,EAClE,EAEH,CAAC,MAAOA,GACPC,QAAQG,MAAM,wCAAyCJ,EACxD,CAGH,OACKV,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHf,oBAAoB,EACpBC,mBAAmB,EACnBC,iBAAiB,EACjBC,qBAAsB,KACtBC,qBAAsB,MAEzB,EACD8B,iBAAkB,SAACnB,GACjB,GAAIA,EAAMhB,aAAegB,EAAMhB,YAAYuB,QAEzC,OADAP,EAAMhB,YAAYuB,QAAQG,QAErBN,WAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHd,mBAAmB,EACnBD,oBAAoB,GAGzB,EACDmC,qBAAsB,SAACpB,EAAOG,GAC5B,OAAAC,EAAAA,SAAAA,EAAAA,SAAA,GACKJ,GAAK,CACRd,kBAAmBiB,GAEtB,EACDkB,mBAAoB,SAACrB,EAAOG,GAAqB,OAC5CC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHb,gBAAiBgB,GACjB,EACFmB,mBAAoB,SAACtB,EAAOG,GAAuB,OAC9CC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHZ,qBAAsBe,GACtB,EACFoB,sBAAuB,SAACvB,EAAOG,GAAqB,OAC/CC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHf,mBAAoBkB,GACpB,EACFqB,qBAAsB,SAACxB,GAAU,OAAAI,EAAAA,SAAAA,EAAAA,SAAA,GAC5BJ,GAAK,CACRZ,qBAAsB,MACtB,EACFqC,wBAAyB,SAACzB,EAAOG,GAAoB,OAChDC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHX,qBAAsBc,GACtB,EACFuB,gBAAiB,SAAC1B,SAChBA,EAAMR,cAAwC,QAAzBmC,EAAA3B,EAAMR,YAAYe,eAAO,IAAAoB,GAAAA,EAAEC,OACjD,EACDC,iBAAkB,SAAC7B,SACjBA,EAAMR,cAAwC,QAAzBmC,EAAA3B,EAAMR,YAAYe,eAAO,IAAAoB,GAAAA,EAAEjB,QACjD,EACDoB,0BAA2B,SAAC9B,EAAOG,GAC7BH,EAAMhB,aAAegB,EAAMhB,YAAYuB,UACzCP,EAAMhB,YAAYuB,QAAQI,YAAcR,EAE3C,EACD4B,MAAO,WACL,OAAOhD,CACR,GAEHiD,QAAS,SAACC,GAAa,MAAC,CACtBC,iBAAkB,SAACC,EAAgCC,GACjD,GAAIA,EAAUtC,OAAOd,aAAeoD,EAAUtC,OAAOd,YAAYuB,QAAS,CAEpE6B,EAAUtC,OAAOb,qBACnBmD,EAAUtC,OAAOd,YAAYuB,QAAQG,QACrC0B,EAAUtC,OAAOd,YAAYuB,QAAQI,YAAc,GAErD,IAAM0B,EAAgB,WACpBJ,EAASnC,OAAOyB,uBAAsB,GACtCa,EAAUtC,OAAQd,YAAauB,QAAS+B,oBAAoB,QAASD,GACrEF,GACF,EAEAC,EAAUtC,OAAOd,YAAYuB,QAAQgC,iBAAiB,QAASF,GAE/DD,EAAUtC,OAAOd,YAAYuB,QAAQqB,OACrCK,EAASnC,OAAOyB,uBAAsB,GACtCU,EAASnC,OAAOsB,sBAAqB,GAEP,WAA1BgB,EAAUI,OAAOC,MACnBC,EAAAA,4BAEH,CACF,EAGDC,uBAAwB,SACtBhB,EACAS,GADE,IAAA5B,EAAGmB,EAAAnB,IAAEoC,EAAYjB,EAAAkB,KAAZA,OAAO,IAAAD,GAAKA,EAAEE,EAAyBnB,EAAAoB,kBAAzBA,OAAiB,IAAAD,GAAQA,gIAQ5C,GALFb,EAASnC,OAAOuB,mBAAmBwB,KAG7BG,EAAyBD,UAAoBE,EAAAb,EAAUc,gCAAWC,eAAiB,SAG3D,QAA5BC,EAAAhB,EAAUtC,OAAOd,mBAAW,IAAAoE,OAAA,EAAAA,EAAE7C,UACqC,mBAA3D6B,EAAUtC,OAAOd,YAAYuB,QAAgBK,UAFrD,MAE6E,CAAA,EAAA,oBAG3E,6BAAA,CAAA,EAAOwB,EAAUtC,OAAOd,YAAYuB,QAAgBK,UAAUoC,kBAA9DK,EAAAC,OACAvC,QAAQwC,KAAK,kCAAmCP,2BAEhDjC,QAAQC,KAAK,oEAAqEwC,oBAGhF,6BAAA,CAAA,EAAOpB,EAAUtC,OAAOd,YAAYuB,QAAgBK,UAAU,0BAA9DyC,EAAAC,OACAvC,QAAQwC,KAAK,kDAEbtB,EAASiB,UAAUO,kBAAkB,0CAErC1C,QAAQG,MAAM,2CAA4CwC,mCAMhE,MAAA,CAAA,EAAMC,EAAuBA,wBAAC,0BAA0BC,OAAApD,mBAAxD6C,EAAAC,OAEArB,EAASnC,OAAOoC,iBAAiB,WAAQ,WAC1C,EACD"}
1
+ {"version":3,"file":"player.js","sources":["../../src/models/player.ts"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { createModel } from '@rematch/core'\nimport type { RootModel } from '.'\nimport { updateAudioPlayerSource } from '../lib/phone/audio'\nimport { dispatchAudioPlayerStarted } from '../events/PlayerEvents'\nimport { type TypeTypes } from '../types'\nimport { RefObject } from 'react'\n\nconst defaultState: PlayerTypes = {\n audioPlayer: null,\n audioPlayerPlaying: false,\n audioPlayerPaused: false,\n audioPlayerLoop: false,\n audioPlayerTrackType: null,\n audioPlayerTrackName: null,\n audioPlayerTrackDuration: null,\n localAudio: null,\n remoteAudio: null,\n localVideo: null,\n largeRemoteVideo: null,\n smallRemoteVideo: null,\n localScreen: null,\n remoteScreen: null,\n}\n\nexport const player = createModel<RootModel>()({\n state: defaultState,\n reducers: {\n updatePlayer: (state, payload: PlayerTypes) => {\n return {\n ...state,\n ...payload,\n }\n },\n updateAudioPlayerTrackDuration: (state, payload: number) => {\n return {\n ...state,\n audioPlayerTrackDuration: payload,\n }\n },\n updateAudioPlayerSrc: (state, payload: string) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.src = payload\n }\n return state\n },\n stopAudioPlayer: (state) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n // Pause audio\n state.audioPlayer.current.pause()\n state.audioPlayer.current.currentTime = 0\n \n // Reset audio output device to default to avoid affecting other sounds\n if (typeof (state.audioPlayer.current as any).setSinkId === 'function') {\n (state.audioPlayer.current as any).setSinkId('default').catch((err: any) => {\n console.warn('Failed to reset audio output device to default:', err)\n })\n }\n \n return {\n ...state,\n audioPlayerPlaying: false,\n }\n }\n },\n emergencyStopAudioPlayer: (state) => {\n // Emergency stop: force reset everything audio-related\n if (state.audioPlayer && state.audioPlayer.current) {\n try {\n state.audioPlayer.current.pause()\n state.audioPlayer.current.currentTime = 0\n state.audioPlayer.current.src = ''\n \n // Reset audio output device to default\n if (typeof (state.audioPlayer.current as any).setSinkId === 'function') {\n (state.audioPlayer.current as any).setSinkId('default').catch((err: any) => {\n console.warn('Failed to reset audio output device to default:', err)\n })\n }\n } catch (err) {\n console.error('Error in emergency stop audio player:', err)\n }\n }\n \n return {\n ...state,\n audioPlayerPlaying: false,\n audioPlayerPaused: false,\n audioPlayerLoop: false,\n audioPlayerTrackType: null,\n audioPlayerTrackName: null,\n }\n },\n pauseAudioPlayer: (state) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.pause()\n return {\n ...state,\n audioPlayerPaused: true,\n audioPlayerPlaying: false,\n }\n }\n },\n setAudioPlayerPaused: (state, payload: boolean) => {\n return {\n ...state,\n audioPlayerPaused: payload,\n }\n },\n setAudioPlayerLoop: (state, payload: boolean) => ({\n ...state,\n audioPlayerLoop: payload,\n }),\n setAudioPlayerType: (state, payload: TypeTypes) => ({\n ...state,\n audioPlayerTrackType: payload,\n }),\n setAudioPlayerPlaying: (state, payload: boolean) => ({\n ...state,\n audioPlayerPlaying: payload,\n }),\n resetAudioPlayerType: (state) => ({\n ...state,\n audioPlayerTrackType: null,\n }),\n setAudioPlayerTrackName: (state, payload: string) => ({\n ...state,\n audioPlayerTrackName: payload,\n }),\n playRemoteAudio: (state) => {\n state.remoteAudio && state.remoteAudio.current?.play()\n },\n pauseRemoteAudio: (state) => {\n state.remoteAudio && state.remoteAudio.current?.pause()\n },\n setAudioPlayerCurrentTime: (state, payload: number) => {\n if (state.audioPlayer && state.audioPlayer.current) {\n state.audioPlayer.current.currentTime = payload\n }\n },\n reset: () => {\n return defaultState\n },\n },\n effects: (dispatch) => ({\n startAudioPlayer: (endedEventCallback: () => void, rootState) => {\n if (rootState.player.audioPlayer && rootState.player.audioPlayer.current) {\n // Check if is playing\n if (rootState.player.audioPlayerPlaying) {\n rootState.player.audioPlayer.current.pause()\n rootState.player.audioPlayer.current.currentTime = 0\n }\n const endedCallback = () => {\n dispatch.player.setAudioPlayerPlaying(false)\n rootState.player!.audioPlayer!.current!.removeEventListener('ended', endedCallback)\n endedEventCallback()\n }\n // Handle playing ended event\n rootState.player.audioPlayer.current.addEventListener('ended', endedCallback)\n // Play the audio\n rootState.player.audioPlayer.current.play()\n dispatch.player.setAudioPlayerPlaying(true)\n dispatch.player.setAudioPlayerPaused(false)\n // Dispatch the event\n if (rootState.island.view === 'player') {\n dispatchAudioPlayerStarted()\n }\n }\n },\n // This function is recommended for playing audio with base64 sources\n // Set useRingtoneOutput=true only for incoming call ringtones and previews\n updateStartAudioPlayer: async (\n { src, loop = false, useRingtoneOutput = false }: { src: string; loop?: boolean; useRingtoneOutput?: boolean },\n rootState,\n ) => {\n dispatch.player.setAudioPlayerLoop(loop)\n\n // Apply ringtone output device ONLY when explicitly requested (incoming calls & previews)\n const ringtoneOutputDeviceId = useRingtoneOutput ? rootState.ringtones?.outputDeviceId : null\n if (\n ringtoneOutputDeviceId &&\n rootState.player.audioPlayer?.current &&\n typeof (rootState.player.audioPlayer.current as any).setSinkId === 'function'\n ) {\n try {\n await (rootState.player.audioPlayer.current as any).setSinkId(ringtoneOutputDeviceId)\n console.info('Ringtone output device applied:', ringtoneOutputDeviceId)\n } catch (err) {\n console.warn('Failed to set ringtone output device, trying fallback to default:', err)\n // Fallback to default device if the saved device is not available\n try {\n await (rootState.player.audioPlayer.current as any).setSinkId('default')\n console.info('Ringtone output fallback to default successful')\n // Update store to reflect the fallback\n dispatch.ringtones.setOutputDeviceId('default')\n } catch (fallbackErr) {\n console.error('Even default device failed for ringtone:', fallbackErr)\n }\n }\n }\n\n // Update the audio source\n await updateAudioPlayerSource(`data:audio/ogg;base64, ${src}`)\n // Play the outgoing ringtone when ready\n dispatch.player.startAudioPlayer(() => {})\n },\n }),\n})\n\ninterface PlayerTypes {\n audioPlayer?: RefObject<HTMLAudioElement> | null\n audioPlayerPlaying?: boolean\n audioPlayerPaused?: boolean\n audioPlayerLoop?: boolean\n audioPlayerTrackType?: TypeTypes | null\n audioPlayerTrackName?: string | null\n audioPlayerTrackDuration?: number | null\n localAudio?: RefObject<HTMLAudioElement> | null\n remoteAudio?: RefObject<HTMLAudioElement> | null\n localVideo?: RefObject<HTMLVideoElement> | null\n largeRemoteVideo?: RefObject<HTMLVideoElement> | null\n smallRemoteVideo?: RefObject<HTMLVideoElement> | null\n localScreen?: RefObject<HTMLVideoElement> | null\n remoteScreen?: RefObject<HTMLVideoElement> | null\n}\n"],"names":["defaultState","audioPlayer","audioPlayerPlaying","audioPlayerPaused","audioPlayerLoop","audioPlayerTrackType","audioPlayerTrackName","audioPlayerTrackDuration","localAudio","remoteAudio","localVideo","largeRemoteVideo","smallRemoteVideo","localScreen","remoteScreen","player","createModel","state","reducers","updatePlayer","payload","__assign","updateAudioPlayerTrackDuration","updateAudioPlayerSrc","current","src","stopAudioPlayer","pause","currentTime","setSinkId","catch","err","console","warn","emergencyStopAudioPlayer","error","pauseAudioPlayer","setAudioPlayerPaused","setAudioPlayerLoop","setAudioPlayerType","setAudioPlayerPlaying","resetAudioPlayerType","setAudioPlayerTrackName","playRemoteAudio","_a","play","pauseRemoteAudio","setAudioPlayerCurrentTime","reset","effects","dispatch","startAudioPlayer","endedEventCallback","rootState","endedCallback_1","removeEventListener","addEventListener","island","view","dispatchAudioPlayerStarted","updateStartAudioPlayer","rootState_1","__awaiter","_b","_e","loop","_f","useRingtoneOutput","ringtoneOutputDeviceId","_c","ringtones","outputDeviceId","_d","_g","sent","info","err_1","setOutputDeviceId","fallbackErr_1","updateAudioPlayerSource","concat"],"mappings":"8PAUMA,EAA4B,CAChCC,YAAa,KACbC,oBAAoB,EACpBC,mBAAmB,EACnBC,iBAAiB,EACjBC,qBAAsB,KACtBC,qBAAsB,KACtBC,yBAA0B,KAC1BC,WAAY,KACZC,YAAa,KACbC,WAAY,KACZC,iBAAkB,KAClBC,iBAAkB,KAClBC,YAAa,KACbC,aAAc,MAGHC,EAASC,EAAWA,aAAXA,CAAyB,CAC7CC,MAAOjB,EACPkB,SAAU,CACRC,aAAc,SAACF,EAAOG,GACpB,OACKC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,GACAG,EAEN,EACDE,+BAAgC,SAACL,EAAOG,GACtC,OAAAC,EAAAA,SAAAA,EAAAA,SAAA,GACKJ,GAAK,CACRV,yBAA0Ba,GAE7B,EACDG,qBAAsB,SAACN,EAAOG,GAI5B,OAHIH,EAAMhB,aAAegB,EAAMhB,YAAYuB,UACzCP,EAAMhB,YAAYuB,QAAQC,IAAML,GAE3BH,CACR,EACDS,gBAAiB,SAACT,GAChB,GAAIA,EAAMhB,aAAegB,EAAMhB,YAAYuB,QAYzC,OAVAP,EAAMhB,YAAYuB,QAAQG,QAC1BV,EAAMhB,YAAYuB,QAAQI,YAAc,EAGoB,mBAAhDX,EAAMhB,YAAYuB,QAAgBK,WAC3CZ,EAAMhB,YAAYuB,QAAgBK,UAAU,WAAWC,MAAM,SAACC,GAC7DC,QAAQC,KAAK,kDAAmDF,EAClE,GAGFV,EAAAA,SAAAA,EAAAA,SAAA,GACKJ,GAAK,CACRf,oBAAoB,GAGzB,EACDgC,yBAA0B,SAACjB,GAEzB,GAAIA,EAAMhB,aAAegB,EAAMhB,YAAYuB,QACzC,IACEP,EAAMhB,YAAYuB,QAAQG,QAC1BV,EAAMhB,YAAYuB,QAAQI,YAAc,EACxCX,EAAMhB,YAAYuB,QAAQC,IAAM,GAG4B,mBAAhDR,EAAMhB,YAAYuB,QAAgBK,WAC3CZ,EAAMhB,YAAYuB,QAAgBK,UAAU,WAAWC,MAAM,SAACC,GAC7DC,QAAQC,KAAK,kDAAmDF,EAClE,EAEH,CAAC,MAAOA,GACPC,QAAQG,MAAM,wCAAyCJ,EACxD,CAGH,OACKV,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHf,oBAAoB,EACpBC,mBAAmB,EACnBC,iBAAiB,EACjBC,qBAAsB,KACtBC,qBAAsB,MAEzB,EACD8B,iBAAkB,SAACnB,GACjB,GAAIA,EAAMhB,aAAegB,EAAMhB,YAAYuB,QAEzC,OADAP,EAAMhB,YAAYuB,QAAQG,QAErBN,WAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHd,mBAAmB,EACnBD,oBAAoB,GAGzB,EACDmC,qBAAsB,SAACpB,EAAOG,GAC5B,OAAAC,EAAAA,SAAAA,EAAAA,SAAA,GACKJ,GAAK,CACRd,kBAAmBiB,GAEtB,EACDkB,mBAAoB,SAACrB,EAAOG,GAAqB,OAC5CC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHb,gBAAiBgB,GACjB,EACFmB,mBAAoB,SAACtB,EAAOG,GAAuB,OAC9CC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHZ,qBAAsBe,GACtB,EACFoB,sBAAuB,SAACvB,EAAOG,GAAqB,OAC/CC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHf,mBAAoBkB,GACpB,EACFqB,qBAAsB,SAACxB,GAAU,OAAAI,EAAAA,SAAAA,EAAAA,SAAA,GAC5BJ,GAAK,CACRZ,qBAAsB,MACtB,EACFqC,wBAAyB,SAACzB,EAAOG,GAAoB,OAChDC,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EAAAJ,IACHX,qBAAsBc,GACtB,EACFuB,gBAAiB,SAAC1B,SAChBA,EAAMR,cAAwC,QAAzBmC,EAAA3B,EAAMR,YAAYe,eAAO,IAAAoB,GAAAA,EAAEC,OACjD,EACDC,iBAAkB,SAAC7B,SACjBA,EAAMR,cAAwC,QAAzBmC,EAAA3B,EAAMR,YAAYe,eAAO,IAAAoB,GAAAA,EAAEjB,QACjD,EACDoB,0BAA2B,SAAC9B,EAAOG,GAC7BH,EAAMhB,aAAegB,EAAMhB,YAAYuB,UACzCP,EAAMhB,YAAYuB,QAAQI,YAAcR,EAE3C,EACD4B,MAAO,WACL,OAAOhD,CACR,GAEHiD,QAAS,SAACC,GAAa,MAAC,CACtBC,iBAAkB,SAACC,EAAgCC,GACjD,GAAIA,EAAUtC,OAAOd,aAAeoD,EAAUtC,OAAOd,YAAYuB,QAAS,CAEpE6B,EAAUtC,OAAOb,qBACnBmD,EAAUtC,OAAOd,YAAYuB,QAAQG,QACrC0B,EAAUtC,OAAOd,YAAYuB,QAAQI,YAAc,GAErD,IAAM0B,EAAgB,WACpBJ,EAASnC,OAAOyB,uBAAsB,GACtCa,EAAUtC,OAAQd,YAAauB,QAAS+B,oBAAoB,QAASD,GACrEF,GACF,EAEAC,EAAUtC,OAAOd,YAAYuB,QAAQgC,iBAAiB,QAASF,GAE/DD,EAAUtC,OAAOd,YAAYuB,QAAQqB,OACrCK,EAASnC,OAAOyB,uBAAsB,GACtCU,EAASnC,OAAOsB,sBAAqB,GAEP,WAA1BgB,EAAUI,OAAOC,MACnBC,EAAAA,4BAEH,CACF,EAGDC,uBAAwB,SAAAhB,EAAAiB,GAAA,OAAAC,EAAAA,eAAA,EAAA,CAAAlB,EAAAiB,QAAA,EAAA,SACtBE,EACAV,iBADE5B,EAAGsC,EAAAtC,IAAEuC,EAAYD,EAAAE,KAAZA,OAAO,IAAAD,GAAKA,EAAEE,EAAyBH,EAAAI,kBAAzBA,OAAiB,IAAAD,GAAQA,+DAQ5C,GALFhB,EAASnC,OAAOuB,mBAAmB2B,KAG7BG,EAAyBD,UAAoBE,EAAAhB,EAAUiB,gCAAWC,eAAiB,SAG3D,QAA5BC,EAAAnB,EAAUtC,OAAOd,mBAAW,IAAAuE,OAAA,EAAAA,EAAEhD,UACqC,mBAA3D6B,EAAUtC,OAAOd,YAAYuB,QAAgBK,UAFrD,MAE6E,CAAA,EAAA,oBAG3E,6BAAA,CAAA,EAAOwB,EAAUtC,OAAOd,YAAYuB,QAAgBK,UAAUuC,kBAA9DK,EAAAC,OACA1C,QAAQ2C,KAAK,kCAAmCP,2BAEhDpC,QAAQC,KAAK,oEAAqE2C,oBAGhF,6BAAA,CAAA,EAAOvB,EAAUtC,OAAOd,YAAYuB,QAAgBK,UAAU,0BAA9D4C,EAAAC,OACA1C,QAAQ2C,KAAK,kDAEbzB,EAASoB,UAAUO,kBAAkB,0CAErC7C,QAAQG,MAAM,2CAA4C2C,mCAMhE,MAAA,CAAA,EAAMC,EAAuBA,wBAAC,0BAA0BC,OAAAvD,mBAAxDgD,EAAAC,OAEAxB,EAASnC,OAAOoC,iBAAiB,WAAQ,SAC1C,EAAA,EACD"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("../../_virtual/index2.js");
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("../../_virtual/index3.js");
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-utils/dist/es/errors.mjs.js"),t=require("../../../../../motion-dom/dist/es/animation/interfaces/visual-element.mjs.js"),r=require("../../../../../motion-dom/dist/es/render/utils/setters.mjs.js");function s(e,t){[...t].reverse().forEach(o=>{const n=e.getVariant(o);n&&r.setTarget(e,n),e.variantChildren&&e.variantChildren.forEach(e=>{s(e,t)})})}function o(e,t){return Array.isArray(t)?s(e,t):"string"==typeof t?s(e,[t]):void r.setTarget(e,t)}exports.animationControls=function(){let r=!1;const s=new Set,n={subscribe:e=>(s.add(e),()=>{s.delete(e)}),start(o,n){e.invariant(r,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const a=[];return s.forEach(e=>{a.push(t.animateVisualElement(e,o,{transitionOverride:n}))}),Promise.all(a)},set:t=>(e.invariant(r,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),s.forEach(e=>{o(e,t)})),stop(){s.forEach(e=>{!function(e){e.values.forEach(e=>e.stop())}(e)})},mount:()=>(r=!0,()=>{r=!1,n.stop()})};return n},exports.setValues=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-utils/dist/es/errors.mjs.js"),t=require("../../../../../motion-dom/dist/es/animation/interfaces/visual-element.mjs.js"),r=require("../../../../../motion-dom/dist/es/render/utils/setters.mjs.js");function o(e,t){[...t].reverse().forEach(s=>{const n=e.getVariant(s);n&&r.setTarget(e,n),e.variantChildren&&e.variantChildren.forEach(e=>{o(e,t)})})}function s(e,t){return Array.isArray(t)?o(e,t):"string"==typeof t?o(e,[t]):void r.setTarget(e,t)}exports.animationControls=function(){let r=!1;const o=new Set,n={subscribe:e=>(o.add(e),()=>{o.delete(e)}),start(s,n){"production"!==process.env.NODE_ENV&&e.invariant(r,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const i=[];return o.forEach(e=>{i.push(t.animateVisualElement(e,s,{transitionOverride:n}))}),Promise.all(i)},set:t=>("production"!==process.env.NODE_ENV&&e.invariant(r,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),o.forEach(e=>{s(e,t)})),stop(){o.forEach(e=>{!function(e){e.values.forEach(e=>e.stop())}(e)})},mount:()=>(r=!0,()=>{r=!1,n.stop()})};return n},exports.setValues=s;
2
2
  //# sourceMappingURL=animation-controls.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"animation-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs"],"sourcesContent":["import { animateVisualElement, setTarget } from 'motion-dom';\nimport { invariant } from 'motion-utils';\n\nfunction stopAnimation(visualElement) {\n visualElement.values.forEach((value) => value.stop());\n}\nfunction setVariants(visualElement, variantLabels) {\n const reversedLabels = [...variantLabels].reverse();\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels);\n });\n }\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\n/**\n * @public\n */\nfunction animationControls() {\n /**\n * Track whether the host component has mounted.\n */\n let hasMounted = false;\n /**\n * A collection of linked component animation controls.\n */\n const subscribers = new Set();\n const controls = {\n subscribe(visualElement) {\n subscribers.add(visualElement);\n return () => void subscribers.delete(visualElement);\n },\n start(definition, transitionOverride) {\n invariant(hasMounted, \"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n const animations = [];\n subscribers.forEach((visualElement) => {\n animations.push(animateVisualElement(visualElement, definition, {\n transitionOverride,\n }));\n });\n return Promise.all(animations);\n },\n set(definition) {\n invariant(hasMounted, \"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n return subscribers.forEach((visualElement) => {\n setValues(visualElement, definition);\n });\n },\n stop() {\n subscribers.forEach((visualElement) => {\n stopAnimation(visualElement);\n });\n },\n mount() {\n hasMounted = true;\n return () => {\n hasMounted = false;\n controls.stop();\n };\n },\n };\n return controls;\n}\n\nexport { animationControls, setValues };\n//# sourceMappingURL=animation-controls.mjs.map\n"],"names":["setVariants","visualElement","variantLabels","reverse","forEach","key","variant","getVariant","setTarget","variantChildren","child","setValues","definition","Array","isArray","animationControls","hasMounted","subscribers","Set","controls","subscribe","add","delete","start","transitionOverride","invariant","animations","push","animateVisualElement","Promise","all","set","stop","values","value","stopAnimation","mount"],"mappings":"4SAaA,SAASA,EAAYC,EAA8BC,GACxB,IAAIA,GAAeC,UAE3BC,QAASC,IACpB,MAAMC,EAAUL,EAAcM,WAAWF,GACzCC,GAAWE,EAASA,UAACP,EAAeK,GAEhCL,EAAcQ,iBACdR,EAAcQ,gBAAgBL,QAASM,IACnCV,EAAYU,EAAOR,MAInC,CAEM,SAAUS,EACZV,EACAW,GAEA,OAAIC,MAAMC,QAAQF,GACPZ,EAAYC,EAAeW,GACL,iBAAfA,EACPZ,EAAYC,EAAe,CAACW,SAEnCJ,YAAUP,EAAeW,EAEjC,2BAKgBG,WAIZ,IAAIC,GAAa,EAKjB,MAAMC,EAAc,IAAIC,IAElBC,EAAoC,CACtCC,UAAUnB,IACNgB,EAAYI,IAAIpB,GACT,KAAWgB,EAAYK,OAAOrB,KAGzCsB,KAAAA,CAAMX,EAAYY,GACdC,YACIT,EACA,mHAGJ,MAAMU,EAAkC,GASxC,OARAT,EAAYb,QAASH,IACjByB,EAAWC,KACPC,uBAAqB3B,EAAeW,EAAY,CAC5CY,0BAKLK,QAAQC,IAAIJ,EACtB,EAEDK,IAAInB,IACAa,YACIT,EACA,iHAGGC,EAAYb,QAASH,IACxBU,EAAUV,EAAeW,MAIjCoB,IAAAA,GACIf,EAAYb,QAASH,KAlFjC,SAAuBA,GACnBA,EAAcgC,OAAO7B,QAAS8B,GAAUA,EAAMF,OAClD,CAiFgBG,CAAclC,IAErB,EAEDmC,MAAKA,KACDpB,GAAa,EAEN,KACHA,GAAa,EACbG,EAASa,UAKrB,OAAOb,CACX"}
1
+ {"version":3,"file":"animation-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs"],"sourcesContent":["import { animateVisualElement, setTarget } from 'motion-dom';\nimport { invariant } from 'motion-utils';\n\nfunction stopAnimation(visualElement) {\n visualElement.values.forEach((value) => value.stop());\n}\nfunction setVariants(visualElement, variantLabels) {\n const reversedLabels = [...variantLabels].reverse();\n reversedLabels.forEach((key) => {\n const variant = visualElement.getVariant(key);\n variant && setTarget(visualElement, variant);\n if (visualElement.variantChildren) {\n visualElement.variantChildren.forEach((child) => {\n setVariants(child, variantLabels);\n });\n }\n });\n}\nfunction setValues(visualElement, definition) {\n if (Array.isArray(definition)) {\n return setVariants(visualElement, definition);\n }\n else if (typeof definition === \"string\") {\n return setVariants(visualElement, [definition]);\n }\n else {\n setTarget(visualElement, definition);\n }\n}\n/**\n * @public\n */\nfunction animationControls() {\n /**\n * Track whether the host component has mounted.\n */\n let hasMounted = false;\n /**\n * A collection of linked component animation controls.\n */\n const subscribers = new Set();\n const controls = {\n subscribe(visualElement) {\n subscribers.add(visualElement);\n return () => void subscribers.delete(visualElement);\n },\n start(definition, transitionOverride) {\n process.env.NODE_ENV !== \"production\" &&\n invariant(hasMounted, \"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n const animations = [];\n subscribers.forEach((visualElement) => {\n animations.push(animateVisualElement(visualElement, definition, {\n transitionOverride,\n }));\n });\n return Promise.all(animations);\n },\n set(definition) {\n process.env.NODE_ENV !== \"production\" &&\n invariant(hasMounted, \"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.\");\n return subscribers.forEach((visualElement) => {\n setValues(visualElement, definition);\n });\n },\n stop() {\n subscribers.forEach((visualElement) => {\n stopAnimation(visualElement);\n });\n },\n mount() {\n hasMounted = true;\n return () => {\n hasMounted = false;\n controls.stop();\n };\n },\n };\n return controls;\n}\n\nexport { animationControls, setValues };\n//# sourceMappingURL=animation-controls.mjs.map\n"],"names":["setVariants","visualElement","variantLabels","reverse","forEach","key","variant","getVariant","setTarget","variantChildren","child","setValues","definition","Array","isArray","animationControls","hasMounted","subscribers","Set","controls","subscribe","add","delete","start","transitionOverride","process","env","NODE_ENV","invariant","animations","push","animateVisualElement","Promise","all","set","stop","values","value","stopAnimation","mount"],"mappings":"4SAaA,SAASA,EAAYC,EAA8BC,GACxB,IAAIA,GAAeC,UAE3BC,QAASC,IACpB,MAAMC,EAAUL,EAAcM,WAAWF,GACzCC,GAAWE,EAASA,UAACP,EAAeK,GAEhCL,EAAcQ,iBACdR,EAAcQ,gBAAgBL,QAASM,IACnCV,EAAYU,EAAOR,MAInC,CAEM,SAAUS,EACZV,EACAW,GAEA,OAAIC,MAAMC,QAAQF,GACPZ,EAAYC,EAAeW,GACL,iBAAfA,EACPZ,EAAYC,EAAe,CAACW,SAEnCJ,YAAUP,EAAeW,EAEjC,2BAKgBG,WAIZ,IAAIC,GAAa,EAKjB,MAAMC,EAAc,IAAIC,IAElBC,EAAoC,CACtCC,UAAUnB,IACNgB,EAAYI,IAAIpB,GACT,KAAWgB,EAAYK,OAAOrB,KAGzCsB,KAAAA,CAAMX,EAAYY,GACW,eAAzBC,QAAQC,IAAIC,UACRC,EAAAA,UACIZ,EACA,mHAGR,MAAMa,EAAkC,GASxC,OARAZ,EAAYb,QAASH,IACjB4B,EAAWC,KACPC,uBAAqB9B,EAAeW,EAAY,CAC5CY,0BAKLQ,QAAQC,IAAIJ,EACtB,EAEDK,IAAItB,IACyB,eAAzBa,QAAQC,IAAIC,UACRC,EAAAA,UACIZ,EACA,iHAGDC,EAAYb,QAASH,IACxBU,EAAUV,EAAeW,MAIjCuB,IAAAA,GACIlB,EAAYb,QAASH,KApFjC,SAAuBA,GACnBA,EAAcmC,OAAOhC,QAASiC,GAAUA,EAAMF,OAClD,CAmFgBG,CAAcrC,IAErB,EAEDsC,MAAKA,KACDvB,GAAa,EAEN,KACHA,GAAa,EACbG,EAASgB,UAKrB,OAAOhB,CACX"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../context/MotionConfigContext.mjs.js"),o=require("../../utils/use-composed-ref.mjs.js"),r=require("../../../../../motion-dom/dist/es/utils/is-html-element.mjs.js"),n=require("../../../../../../_virtual/jsx-runtime.js");function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}}),t.default=e,Object.freeze(t)}var s=i(e);class p extends s.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(r.isHTMLElement(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,o=r.isHTMLElement(e)&&e.offsetWidth||0,n=r.isHTMLElement(e)&&e.offsetHeight||0,i=getComputedStyle(t),s=this.props.sizeRef.current;s.height=parseFloat(i.height),s.width=parseFloat(i.width),s.top=t.offsetTop,s.left=t.offsetLeft,s.right=o-s.width-s.left,s.bottom=n-s.height-s.top,s.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}}exports.PopChild=function({children:r,isPresent:i,anchorX:c,anchorY:u,root:f,pop:d}){const l=e.useId(),h=e.useRef(null),a=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:m}=e.useContext(t.MotionConfigContext),g=!1!==d?r.props?.ref??r?.ref:void 0,j=o.useComposedRefs(h,g);return e.useInsertionEffect(()=>{const{width:e,height:t,top:o,left:r,right:n,bottom:s,direction:p}=a.current;if(i||!1===d||!h.current||!e||!t)return;const g="rtl"===p,j="left"===c?g?`right: ${n}`:`left: ${r}`:g?`left: ${r}`:`right: ${n}`,x="bottom"===u?`bottom: ${s}`:`top: ${o}`;h.current.dataset.motionPopId=l;const b=document.createElement("style");m&&(b.nonce=m);const C=f??document.head;return C.appendChild(b),b.sheet&&b.sheet.insertRule(`\n [data-motion-pop-id="${l}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${j}px !important;\n ${x}px !important;\n }\n `),()=>{h.current?.removeAttribute("data-motion-pop-id"),C.contains(b)&&C.removeChild(b)}},[i]),n.exports.jsx(p,{isPresent:i,childRef:h,sizeRef:a,pop:d,children:!1===d?r:s.cloneElement(r,{ref:j})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var t=require("react"),e=require("../../context/MotionConfigContext.mjs.js"),o=require("../../utils/use-composed-ref.mjs.js"),r=require("../../../../../motion-dom/dist/es/frameloop/microtask.mjs.js"),n=require("../../../../../motion-dom/dist/es/utils/is-html-element.mjs.js"),i=require("../../../../../../_virtual/jsx-runtime.js");function s(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(o){if("default"!==o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}}),e.default=t,Object.freeze(e)}var p=s(t);const c=t=>{const{width:e,height:o}=t?.getBoundingClientRect()||{};return[e/t?.offsetWidth||1,o/t?.offsetHeight||1]},u=t=>{let{left:e,top:o}=t.getBoundingClientRect(),r=t;for(;r=r.parentElement||r.parentNode?.host;){const{scrollLeft:t,scrollTop:n}=r;if(t||n){const[i,s]=c(r);e+=t*i,o+=n*s}if("fixed"===getComputedStyle(r).position)break}const[n,i]=c(t.offsetParent);return[e/n,o/i]};class l extends p.Component{getSnapshotBeforeUpdate(t){const e=this.props.getElement();if(n.isHTMLElement(e)&&t.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const t=e.offsetParent,o=n.isHTMLElement(t)&&t.offsetWidth||0,r=n.isHTMLElement(t)&&t.offsetHeight||0,i=getComputedStyle(e),s=this.props.sizeRef.current;s.height=parseFloat(i.height),s.width=parseFloat(i.width),s.top=e.offsetTop,s.left=e.offsetLeft,s.right=o-s.width-s.left,s.bottom=r-s.height-s.top,s.direction=i.direction,s.point=u(e)}return null}componentDidUpdate(){}render(){return this.props.children}}exports.PopChild=function({children:n,isPresent:s,anchorX:c,anchorY:f,root:d,pop:h,popNode:a}){const m=t.useId(),g=t.useRef(null),j=t.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:b}=t.useContext(e.MotionConfigContext),x=!1!==h?n.props?.ref??n?.ref:void 0,C=o.useComposedRefs(g,x),P=()=>g.current||a?.current?.current,$=t=>{const{width:e,height:o,top:r,left:n,right:i,bottom:s,direction:p}=j.current,u="rtl"===p,l="left"===c?u?`right:${i}`:`left:${n}`:u?`left:${n}`:`right:${i}`,d="bottom"===f?`bottom:${s}`:`top:${r}`;t?.insertRule(`[data-motion-pop-id="${m}"]{position:absolute!important;width:${e}px!important;height:${o}px!important;${l}px!important;${d}px!important}`)};return t.useInsertionEffect(()=>{const{width:t,height:e}=j.current,o=P();if(s||!1===h||!o||!t||!e)return;o.dataset.motionPopId=m;const n=o.ownerDocument,i=n.createElement("style");b&&(i.nonce=b);const p=d??n.head;p.appendChild(i),$(i.sheet);let c=0,l=0;return r.microtask.setup(()=>{const[t,e]=u(o);c=j.current.point[0]-t,l=j.current.point[1]-e}),r.microtask.read(()=>{const{sheet:t}=i;if(!t||!c&&!l)return;const e=j.current;e.left+=c,e.right-=c,e.top+=l,e.bottom-=l,t.deleteRule(0),$(t)}),()=>{o.removeAttribute("data-motion-pop-id"),p.contains(i)&&p.removeChild(i)}},[s]),i.exports.jsx(l,{isPresent:s,getElement:P,sizeRef:j,pop:h,children:!1===h?n:p.cloneElement(n,{ref:C})})};
2
2
  //# sourceMappingURL=PopChild.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { useComposedRefs } from '../../utils/use-composed-ref.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0;\n const computedStyle = getComputedStyle(element);\n const size = this.props.sizeRef.current;\n size.height = parseFloat(computedStyle.height);\n size.width = parseFloat(computedStyle.width);\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n size.bottom = parentHeight - size.height - size.top;\n size.direction = computedStyle.direction;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n *\n * The composed ref is only used when popping the child out (pop !== false),\n * so we avoid reading children.props.ref otherwise. In React 18.3 that read\n * triggers a spurious \"`ref` is not a prop\" warning getter (#3745).\n */\n const childRef = pop !== false\n ? (children.props?.ref ??\n children?.ref)\n : undefined;\n const composedRef = useComposedRefs(ref, childRef);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left, right, bottom, direction } = size.current;\n if (isPresent || pop === false || !ref.current || !width || !height)\n return;\n const isRTL = direction === \"rtl\";\n const x = anchorX === \"left\"\n ? (isRTL ? `right: ${right}` : `left: ${left}`)\n : (isRTL ? `left: ${left}` : `right: ${right}`);\n const y = anchorY === \"bottom\" ? `bottom: ${bottom}` : `top: ${top}`;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n const parent = root ?? document.head;\n parent.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n ${x}px !important;\n ${y}px !important;\n }\n `);\n }\n return () => {\n ref.current?.removeAttribute(\"data-motion-pop-id\");\n if (parent.contains(style)) {\n parent.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false\n ? children\n : React.cloneElement(children, { ref: composedRef }) }));\n}\n\nexport { PopChild };\n//# sourceMappingURL=PopChild.mjs.map\n"],"names":["PopChildMeasure","React","Component","getSnapshotBeforeUpdate","prevProps","parent","element","offsetParent","parentWidth","isHTMLElement","offsetWidth","parentHeight","offsetHeight","computedStyle","getComputedStyle","size","top","offsetTop","left","offsetLeft","right","width","bottom","height","direction","componentDidUpdate","props","children","isPresent","anchorX","anchorY","root","pop","id","useId","ref","useRef","childRef","current","isRTL","x","y","nonce","style","document","head","appendChild","sheet","insertRule","removeAttribute","contains","removeChild","cloneElement","composedRef"],"mappings":"4pBAqCA,MAAAA,UAAAC,EAAAC,UACIC,uBAAAA,CAAAC,uHAGQ,MAAAC,EAAAC,EAAAC,aACAC,EAAAC,EAAAA,cAAAJ,IACIA,EAAAK,eAEJC,EAAAF,EAAAA,cAAAJ,IACIA,EAAAO,gBAGJC,EAAAC,iBAAAR,0FAIAS,EAAAC,IAAAV,EAAAW,UACAF,EAAAG,KAAAZ,EAAAa,WACAJ,EAAAK,MAAAZ,EAAAO,EAAAM,MAAAN,EAAAG,KACAH,EAAAO,OAAAX,EAAAI,EAAAQ,OAAAR,EAAAC,IACAD,EAAAS,UAAAX,EAAAW,UAGJ,OAAA,KAMJC,kBAAAA,GAAA,UAGI,OAAAC,KAAAA,MAAAC,2BAIF,UAAAA,SAAAA,EAAAC,UAAAA,EAAAC,QAAAA,EAAAC,QAAAA,EAAAC,KAAAA,EAAAC,IAAAA,IACF,MAAAC,EAAAC,EAAAA,QACAC,EAAAC,SAAA,kBAEIf,MAAA,EACAE,OAAA,EACAP,IAAA,EACAE,KAAA,EACAE,MAAA,EACAE,OAAA,EACAE,UAAA,sDAWJa,GAAA,IAAAL,EAEQL,EAAAD,OAAAS,6EAeJ,MAAAd,MAAAA,EAAAE,OAAAA,EAAAP,IAAAA,EAAAE,KAAAA,EAAAE,MAAAA,EAAAE,OAAAA,EAAAE,UAAAA,GAAAT,EAAAuB,QACA,GAAAV,IAAAO,IAAAH,IAAAG,EAAAG,UAAAjB,IAAAE,SAEA,MAAAgB,EAAA,QAAAf,EACAgB,EAAA,SAAAX,EACIU,EAAAnB,UAAAA,IAAAF,SAAAA,IACAqB,EAAArB,SAAAA,cAAAE,IACJqB,EAAAnB,WAAAQ,EAAAR,WAAAA,YAAAN,4EAKA0B,IAAWC,EAAAD,MAAAA,GAEX,MAAArC,EAAA0B,GAAAa,SAAAC,KAeA,OAdAxC,EAAAyC,YAAAH,GAEAA,EAAAI,OACIJ,EAAAI,MAAAC,WAAA,+PAWJ,KACIb,EAAAG,SAAAW,gBAAA,sBACA5C,EAAA6C,SAAAP,IACItC,EAAA8C,YAAAR,KAGZ,CAAAf,4DAKYD,UAAAA,IAAAA,EAAAA,EACA1B,EAAAmD,aAAAzB,EAAA,CAAAQ,IAAAkB,KAGhB"}
1
+ {"version":3,"file":"PopChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport { microtask, isHTMLElement } from 'motion-dom';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\nimport { useComposedRefs } from '../../utils/use-composed-ref.mjs';\n\n/**\n * How much an element's transforms, and its ancestors', scale it on screen.\n */\nconst measureScale = (element) => {\n const { width, height } = element?.getBoundingClientRect() || {};\n return [\n width / element?.offsetWidth || 1,\n height / element?.offsetHeight || 1,\n ];\n};\n/**\n * The element's position in the space it scrolls in, as the projection\n * system measures it (see measurePageBox and removeElementScroll): its\n * viewport position, plus its scroll containers' scroll (across shadow\n * roots), plus the window's (the root's) scroll. Like checkIsScrollRoot, a\n * fixed ancestor is a scroll root: it doesn't scroll with anything above it,\n * so a fixed container is measured relative to the viewport.\n *\n * So a scroll position clamped by content shrinking reads as the element\n * moving only if it doesn't scroll with that content.\n *\n * Scroll offsets are in their container's coordinate space, so are scaled\n * onto the screen, and the result is returned in the offsetParent's\n * coordinate space, which the pop rule's offsets are in.\n */\nconst measurePoint = (element) => {\n let { left, top } = element.getBoundingClientRect();\n let node = element;\n while ((node = (node.parentElement ||\n node.parentNode?.host))) {\n const { scrollLeft, scrollTop } = node;\n if (scrollLeft || scrollTop) {\n const [x, y] = measureScale(node);\n left += scrollLeft * x;\n top += scrollTop * y;\n }\n if (getComputedStyle(node).position === \"fixed\")\n break;\n }\n const [x, y] = measureScale(element.offsetParent);\n return [left / x, top / y];\n};\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.getElement();\n if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {\n const parent = element.offsetParent;\n const parentWidth = isHTMLElement(parent)\n ? parent.offsetWidth || 0\n : 0;\n const parentHeight = isHTMLElement(parent)\n ? parent.offsetHeight || 0\n : 0;\n const computedStyle = getComputedStyle(element);\n const size = this.props.sizeRef.current;\n size.height = parseFloat(computedStyle.height);\n size.width = parseFloat(computedStyle.width);\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n size.right = parentWidth - size.width - size.left;\n size.bottom = parentHeight - size.height - size.top;\n size.direction = computedStyle.direction;\n size.point = measurePoint(element);\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent, anchorX, anchorY, root, pop, popNode }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n direction: \"ltr\",\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * In React 19, refs are passed via props.ref instead of element.ref.\n * We check props.ref first (React 19) and fall back to element.ref (React 18).\n *\n * The composed ref is only used when popping the child out (pop !== false),\n * so we avoid reading children.props.ref otherwise. In React 18.3 that read\n * triggers a spurious \"`ref` is not a prop\" warning getter (#3745).\n */\n const childRef = pop !== false\n ? (children.props?.ref ??\n children?.ref)\n : undefined;\n const composedRef = useComposedRefs(ref, childRef);\n /**\n * The child's element: the one our ref reached or, if the child can't\n * be given a ref (for instance a function component that doesn't\n * forward it), its outermost motion component's element (#2503).\n */\n const getElement = () => ref.current || popNode?.current?.current;\n const insertPopRule = (sheet) => {\n const { width, height, top, left, right, bottom, direction } = size.current;\n const isRTL = direction === \"rtl\";\n const x = anchorX === \"left\"\n ? (isRTL ? `right:${right}` : `left:${left}`)\n : (isRTL ? `left:${left}` : `right:${right}`);\n const y = anchorY === \"bottom\" ? `bottom:${bottom}` : `top:${top}`;\n sheet?.insertRule(`[data-motion-pop-id=\"${id}\"]{position:absolute!important;width:${width}px!important;height:${height}px!important;${x}px!important;${y}px!important}`);\n };\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height } = size.current;\n const element = getElement();\n if (isPresent || pop === false || !element || !width || !height)\n return;\n element.dataset.motionPopId = id;\n /**\n * Use the element's own document so this works when rendering\n * into another window or iframe (e.g. via window.open()).\n */\n const doc = element.ownerDocument;\n const style = doc.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n const parent = root ?? doc.head;\n parent.appendChild(style);\n insertPopRule(style.sheet);\n /**\n * Popping the element out of the layout can move its offsetParent,\n * which we've pinned it to. For instance, a bottom-anchored or\n * centred container shrinks around its remaining children (#2348).\n * So once the whole commit is in the DOM, measure how far the\n * element moved and offset it back.\n *\n * This runs on the microtask frameloop, so before paint even if\n * this commit happens within an animation frame. Every popped\n * element is measured in its first step, then corrected at the\n * start of the read step: before the projection system, which\n * schedules its layout measurement there from layout effects, so\n * layout animations see the corrected position.\n */\n let dx = 0;\n let dy = 0;\n microtask.setup(() => {\n const [x, y] = measurePoint(element);\n dx = size.current.point[0] - x;\n dy = size.current.point[1] - y;\n });\n microtask.read(() => {\n /**\n * The style has no sheet if it's been removed since, because\n * the element is present again.\n */\n const { sheet } = style;\n if (!sheet || (!dx && !dy))\n return;\n const s = size.current;\n s.left += dx;\n s.right -= dx;\n s.top += dy;\n s.bottom -= dy;\n sheet.deleteRule(0);\n insertPopRule(sheet);\n });\n return () => {\n element.removeAttribute(\"data-motion-pop-id\");\n if (parent.contains(style)) {\n parent.removeChild(style);\n }\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, getElement: getElement, sizeRef: size, pop: pop, children: pop === false\n ? children\n : React.cloneElement(children, { ref: composedRef }) }));\n}\n\nexport { PopChild };\n//# sourceMappingURL=PopChild.mjs.map\n"],"names":["measureScale","element","width","height","getBoundingClientRect","offsetWidth","offsetHeight","measurePoint","node","parentElement","parentNode","host","scrollLeft","scrollTop","left","x","top","y","getComputedStyle","position","offsetParent","PopChildMeasure","React","Component","getSnapshotBeforeUpdate","prevProps","parent","parentWidth","isHTMLElement","parentHeight","computedStyle","size","offsetTop","offsetLeft","right","bottom","direction","point","componentDidUpdate","props","children","id","useId","ref","useRef","childRef","pop","getElement","current","popNode","insertPopRule","sheet","isRTL","anchorX","anchorY","insertRule","isPresent","dataset","motionPopId","doc","ownerDocument","nonce","style","root","head","appendChild","microtask","setup","read","s","dx","dy","deleteRule","removeAttribute","contains","removeChild","cloneElement","composedRef"],"mappings":"suBAsCA,MAAAA,EAAAC,IACI,MAAAC,MAAAA,EAAAC,OAAAA,GAAAF,GAAAG,yBAAA,UAGIF,EAAAD,GAAAI,aAAA,EACAF,EAAAF,GAAAK,kBAmBRC,EAAAN,oDAGI,KAAAO,EAAAA,EAAAC,eAESD,EAAAE,YAAAC,MAAA,CAEL,MAAAC,WAAAA,EAAAC,UAAAA,GAAAL,EACA,GAAAI,GAAAC,EAAA,iBAEIC,GAAAF,EAAAG,EACAC,GAAAH,EAAAI,EAEJ,aAAAC,iBAAAV,GAAAW,eAEJ,MAAAJ,EAAAE,GAAAjB,EAAAC,EAAAmB,+BAQJ,MAAAC,UAAAC,EAAAC,UACIC,uBAAAA,CAAAC,mHAGQ,MAAAC,EAAAzB,EAAAmB,aACAO,EAAAC,EAAAA,cAAAF,IACIA,EAAArB,eAEJwB,EAAAD,EAAAA,cAAAF,IACIA,EAAApB,gBAGJwB,EAAAZ,iBAAAjB,0FAIA8B,EAAAf,IAAAf,EAAA+B,UACAD,EAAAjB,KAAAb,EAAAgC,WACAF,EAAAG,MAAAP,EAAAI,EAAA7B,MAAA6B,EAAAjB,KACAiB,EAAAI,OAAAN,EAAAE,EAAA5B,OAAA4B,EAAAf,IACAe,EAAAK,UAAAN,EAAAM,UACAL,EAAAM,MAAA9B,EAAAN,GAGJ,OAAA,KAMJqC,kBAAAA,GAAA,UAGI,OAAAC,KAAAA,MAAAC,yGAKJ,MAAAC,EAAAC,EAAAA,QACAC,EAAAC,SAAA,kBAEI1C,MAAA,EACAC,OAAA,EACAa,IAAA,EACAF,KAAA,EACAoB,MAAA,EACAC,OAAA,EACAC,UAAA,sDAWJS,GAAA,IAAAC,EAEQN,EAAAD,OAAAI,4CAURI,EAAAA,IAAAJ,EAAAK,SAAAC,GAAAD,SAAAA,QAGAE,EAAAC,IACI,MAAAjD,MAAAA,EAAAC,OAAAA,EAAAa,IAAAA,EAAAF,KAAAA,EAAAoB,MAAAA,EAAAC,OAAAA,EAAAC,UAAAA,GAAAL,EAAAiB,QACAI,EAAA,QAAAhB,EACArB,EAAA,SAAAsC,EACID,EAAAlB,SAAAA,IAAApB,QAAAA,IACAsC,EAAAtC,QAAAA,aAAAoB,IACJjB,EAAAkB,WAAAmB,EAAAnB,UAAAA,WAAAnB,IAEAmC,GAAAI,WAAA,wBAAAd,yCAAAvC,wBAAAC,iBAAAY,iBAAAE,sFAgBAhB,EAAA8C,IACA,GAAAS,IAAA,IAAAV,IAAA7C,IAAAC,IAAAC,SAEAF,EAAAwD,QAAAC,YAAAjB,EAMA,MAAAkB,EAAA1D,EAAA2D,yCAEAC,IAAWC,EAAAD,MAAAA,GAEX,MAAAnC,EAAAqC,GAAAJ,EAAAK,KACAtC,EAAAuC,YAAAH,GAEAZ,EAAAY,EAAAX,mBAuCA,OArBAe,EAAAA,UAAAC,MAAA,qEAKAD,EAAAA,UAAAE,KAAA,KAKI,MAAAjB,MAAAA,GAAAW,uBAEA,MAAAO,EAAAtC,EAAAiB,QACAqB,EAAAvD,MAAAwD,EACAD,EAAAnC,OAAAoC,EACAD,EAAArD,KAAAuD,EACAF,EAAAlC,QAAAoC,EACApB,EAAAqB,WAAA,UAIJ,KACIvE,EAAAwE,gBAAA,sBACA/C,EAAAgD,SAAAZ,IACIpC,EAAAiD,YAAAb,KAGZ,CAAAN,8DAKYhB,UAAAA,IAAAA,EAAAA,EACAlB,EAAAsD,aAAApC,EAAA,CAAAG,IAAAkC,KAGhB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),r=require("../../context/PresenceContext.mjs.js"),t=require("../../utils/use-constant.mjs.js"),s=require("../../utils/use-isomorphic-effect.mjs.js"),o=require("./PopChild.mjs.js"),n=require("../../../../../../_virtual/jsx-runtime.js");function u(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,Object.freeze(r)}var i=u(e);function c(){return new Map}exports.PresenceChild=({children:u,initial:a,isPresent:f,onExitComplete:l,custom:j,presenceAffectsLayout:p,mode:d,anchorX:m,anchorY:h,root:x})=>{const P=t.useConstant(c),v=e.useId(),C=e.useRef(f),b=e.useRef(l);s.useIsomorphicLayoutEffect(()=>{C.current=f,b.current=l});let q=!0,y=e.useMemo(()=>(q=!1,{id:v,initial:a,isPresent:f,custom:j,onExitComplete:e=>{P.set(e,!0);for(const e of P.values())if(!e)return;l&&l()},register:e=>(P.set(e,!1),()=>{P.delete(e),!C.current&&!P.size&&b.current?.()})}),[f,P,l]);return p&&q&&(y={...y}),e.useMemo(()=>{P.forEach((e,r)=>P.set(r,!1))},[f]),i.useEffect(()=>{!f&&!P.size&&l&&l()},[f]),u=n.exports.jsx(o.PopChild,{pop:"popLayout"===d,isPresent:f,anchorX:m,anchorY:h,root:x,children:u}),n.exports.jsx(r.PresenceContext.Provider,{value:y,children:u})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),r=require("../../context/PresenceContext.mjs.js"),t=require("../../utils/use-constant.mjs.js"),s=require("../../utils/use-isomorphic-effect.mjs.js"),n=require("./PopChild.mjs.js"),o=require("../../../../../../_virtual/jsx-runtime.js");function u(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,Object.freeze(r)}var i=u(e);function c(){return new Map}exports.PresenceChild=({children:u,initial:a,isPresent:f,onExitComplete:l,custom:p,presenceAffectsLayout:j,mode:d,anchorX:m,anchorY:h,root:x})=>{const P=t.useConstant(c),v=e.useId(),C=e.useRef(),b=e.useRef(f),q=e.useRef(l);s.useIsomorphicLayoutEffect(()=>{b.current=f,q.current=l});let y=!0,O=e.useMemo(()=>(y=!1,{id:v,initial:a,isPresent:f,custom:p,onExitComplete:e=>{P.set(e,!0);for(const e of P.values())if(!e)return;l&&l()},register:(e,r)=>(P.set(e,!1),r&&r.parent?.presenceContext?.id!==v&&(C.current=r),()=>{P.delete(e),!b.current&&!P.size&&q.current?.()})}),[f,P,l]);return j&&y&&(O={...O}),e.useMemo(()=>{P.forEach((e,r)=>P.set(r,!1))},[f]),i.useEffect(()=>{!f&&!P.size&&l&&l()},[f]),u=o.exports.jsx(n.PopChild,{pop:"popLayout"===d,isPresent:f,anchorX:m,anchorY:h,root:x,popNode:C,children:u}),o.exports.jsx(r.PresenceContext.Provider,{value:O,children:u})};
2
2
  //# sourceMappingURL=PresenceChild.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PresenceChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n // Written in a layout effect (not render) so discarded concurrent\n // renders can't leave the refs pointing at uncommitted state.\n const isPresentRef = useRef(isPresent);\n const onExitCompleteRef = useRef(onExitComplete);\n useIsomorphicLayoutEffect(() => {\n isPresentRef.current = isPresent;\n onExitCompleteRef.current = onExitComplete;\n });\n let isReusedContext = true;\n let context = useMemo(() => {\n isReusedContext = false;\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => {\n presenceChildren.delete(childId);\n !isPresentRef.current &&\n !presenceChildren.size &&\n onExitCompleteRef.current?.();\n };\n },\n };\n }, [isPresent, presenceChildren, onExitComplete]);\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n if (presenceAffectsLayout && isReusedContext) {\n context = { ...context };\n }\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n children = (jsx(PopChild, { pop: mode === \"popLayout\", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, children: children }));\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n//# sourceMappingURL=PresenceChild.mjs.map\n"],"names":["newChildrenMap","PresenceChild","children","initial","isPresent","onExitComplete","custom","presenceAffectsLayout","mode","anchorX","anchorY","root","presenceChildren","useConstant","id","useId","isPresentRef","useRef","onExitCompleteRef","current","context","useMemo","childId","set","isComplete","register","delete","isReusedContext","forEach","_","key","React","useEffect","jsx","exports","PopChild","pop","PresenceContext","Provider","value"],"mappings":"6pBAoHA,SAAAA,kBAEA,uBA5FOC,EAAAC,WAAAC,UAAAC,YAAAC,iBAAAC,SAAAC,wBAAAC,OAAAC,UAAAC,UAAAC,WAYH,MAAAC,EAAAC,cAAAb,GACAc,EAAAC,EAAAA,QAIAC,EAAAC,SAAAb,GACAc,EAAAD,SAAAZ,oCAEIW,EAAAG,QAAAf,EACAc,EAAAC,QAAAd,aAIJe,EAAAC,EAAAA,QAAA,+CAOQhB,eAAAiB,IACIV,EAAAW,IAAAD,GAAA,6BAGI,IAAAE,EAAiB,eAKzBC,SAAAH,IACIV,EAAAW,IAAAD,GAAA,GACA,KACIV,EAAAc,OAAAJ,IAGIJ,EAAAA,UAAAA,EAAAA,MAAAA,EAAAC,yBAoCpB,OAzBAZ,GAAAoB,IACIP,EAAA,IAAAA,mBAIAR,EAAAgB,QAAA,CAAAC,EAAAC,IAAAlB,EAAAW,IAAAO,GAAA,KACJ,CAAA1B,IAMA2B,EAAAC,UAAA,MACI5B,eAGIC,KACR,CAAAD,IAEAF,EAAA+B,EAAAC,QAAAD,IAAAE,WAAA,CAAAC,IAAA,cAAA5B,EAAAJ,UAAAA,EAAAK,QAAAA,EAAAC,QAAAA,EAAAC,KAAAA,EAAAT,SAAAA,IAMA+B,EAAAC,QAAAD,IAAAI,EAAAA,gBAAAC,SAAA,CAAAC,MAAAnB,EAAAlB,SAAAA"}
1
+ {"version":3,"file":"PresenceChild.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs"],"sourcesContent":["\"use client\";\nimport { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, anchorX, anchorY, root }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n /**\n * The outermost motion component within this child. popLayout falls\n * back to its element when the child can't be given a ref, for instance\n * a function component that doesn't forward refs (#2503).\n */\n const popNode = useRef();\n // Written in a layout effect (not render) so discarded concurrent\n // renders can't leave the refs pointing at uncommitted state.\n const isPresentRef = useRef(isPresent);\n const onExitCompleteRef = useRef(onExitComplete);\n useIsomorphicLayoutEffect(() => {\n isPresentRef.current = isPresent;\n onExitCompleteRef.current = onExitComplete;\n });\n let isReusedContext = true;\n let context = useMemo(() => {\n isReusedContext = false;\n return {\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId, node) => {\n presenceChildren.set(childId, false);\n if (node && node.parent?.presenceContext?.id !== id) {\n popNode.current = node;\n }\n return () => {\n presenceChildren.delete(childId);\n !isPresentRef.current &&\n !presenceChildren.size &&\n onExitCompleteRef.current?.();\n };\n },\n };\n }, [isPresent, presenceChildren, onExitComplete]);\n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n if (presenceAffectsLayout && isReusedContext) {\n context = { ...context };\n }\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n children = (jsx(PopChild, { pop: mode === \"popLayout\", isPresent: isPresent, anchorX: anchorX, anchorY: anchorY, root: root, popNode: popNode, children: children }));\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n//# sourceMappingURL=PresenceChild.mjs.map\n"],"names":["newChildrenMap","PresenceChild","children","initial","isPresent","onExitComplete","custom","presenceAffectsLayout","mode","anchorX","anchorY","root","presenceChildren","useConstant","id","useId","popNode","useRef","isPresentRef","onExitCompleteRef","current","context","useMemo","childId","set","isComplete","register","node","parent","presenceContext","delete","isReusedContext","forEach","_","key","React","useEffect","jsx","exports","PopChild","pop","PresenceContext","Provider","value"],"mappings":"6pBA+HA,SAAAA,kBAEA,uBAtGOC,EAAAC,WAAAC,UAAAC,YAAAC,iBAAAC,SAAAC,wBAAAC,OAAAC,UAAAC,UAAAC,WAYH,MAAAC,EAAAC,cAAAb,GACAc,EAAAC,EAAAA,QAOAC,EAAAC,EAAAA,SAIAC,EAAAD,SAAAb,GACAe,EAAAF,SAAAZ,oCAEIa,EAAAE,QAAAhB,EACAe,EAAAC,QAAAf,aAIJgB,EAAAC,EAAAA,QAAA,+CAOQjB,eAAAkB,IACIX,EAAAY,IAAAD,GAAA,6BAGI,IAAAE,EAAiB,eAKzBC,SAAAA,CAAAH,EAAAI,KACIf,EAAAY,IAAAD,GAAA,GACAI,GAAAA,EAAAC,QAAAC,iBAAAf,KAAAA,IACIE,EAAAI,QAAAO,GAEJ,KACIf,EAAAkB,OAAAP,IAGIJ,EAAAA,UAAAA,EAAAA,MAAAA,EAAAC,yBAoCpB,OAzBAb,GAAAwB,IACIV,EAAA,IAAAA,mBAIAT,EAAAoB,QAAA,CAAAC,EAAAC,IAAAtB,EAAAY,IAAAU,GAAA,KACJ,CAAA9B,IAMA+B,EAAAC,UAAA,MACIhC,eAGIC,KACR,CAAAD,IAEAF,EAAAmC,EAAAC,QAAAD,IAAAE,WAAA,CAAAC,IAAA,cAAAhC,EAAAJ,UAAAA,EAAAK,QAAAA,EAAAC,QAAAA,EAAAC,KAAAA,EAAAK,QAAAA,EAAAd,SAAAA,IAMAmC,EAAAC,QAAAD,IAAAI,EAAAA,gBAAAC,SAAA,CAAAC,MAAAtB,EAAAnB,SAAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../context/LayoutGroupContext.mjs.js"),r=require("../../utils/use-constant.mjs.js"),s=require("../../utils/use-isomorphic-effect.mjs.js"),n=require("./PresenceChild.mjs.js"),o=require("./use-presence.mjs.js"),i=require("./utils.mjs.js"),u=require("../../../../../../_virtual/jsx-runtime.js");exports.AnimatePresence=({children:c,custom:l,initial:a=!0,onExitComplete:d,presenceAffectsLayout:h=!0,mode:m="sync",propagate:p=!1,anchorX:f="left",anchorY:j="top",root:x})=>{const[g,y]=o.usePresence(p),C=e.useMemo(()=>i.onlyElements(c),[c]),q=p&&!g?[]:C.map(i.getChildKey),v=e.useRef(!0),w=e.useRef(C),E=r.useConstant(()=>new Map),P=e.useRef(new Set),[L,A]=e.useState(C),[K,R]=e.useState(C);s.useIsomorphicLayoutEffect(()=>{v.current=!1,w.current=C;for(let e=0;e<K.length;e++){const t=i.getChildKey(K[e]);q.includes(t)?(E.delete(t),P.current.delete(t)):!0!==E.get(t)&&E.set(t,!1)}},[K,q.length,q.join("-")]);const _=[];if(C!==L){let e=[...C];for(let t=0;t<K.length;t++){const r=K[t],s=i.getChildKey(r);q.includes(s)||(e.splice(t,0,r),_.push(r))}return"wait"===m&&_.length&&(e=_),R(i.onlyElements(e)),A(C),null}"production"!==process.env.NODE_ENV&&"wait"===m&&K.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:b}=e.useContext(t.LayoutGroupContext);return u.exports.jsx(u.exports.Fragment,{children:K.map(e=>{const t=i.getChildKey(e),r=!(p&&!g)&&(C===K||q.includes(t));return u.exports.jsx(n.PresenceChild,{isPresent:r,initial:!(v.current&&!a)&&void 0,custom:l,presenceAffectsLayout:h,mode:m,root:x,onExitComplete:r?void 0:()=>{if(P.current.has(t))return;if(!E.has(t))return;P.current.add(t),E.set(t,!0);let e=!0;E.forEach(t=>{t||(e=!1)}),e&&(b?.(),R(w.current),p&&y?.(),d&&d())},anchorX:f,anchorY:j,children:e},t)})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../../react/jsx-runtime.js");var e=require("react"),t=require("../../context/LayoutGroupContext.mjs.js"),r=require("../../utils/use-constant.mjs.js"),s=require("../../utils/use-isomorphic-effect.mjs.js"),n=require("./PresenceChild.mjs.js"),o=require("./use-presence.mjs.js"),i=require("./utils.mjs.js"),u=require("../../../../../../_virtual/jsx-runtime.js");exports.AnimatePresence=({children:c,custom:l,initial:a=!0,onExitComplete:d,presenceAffectsLayout:h=!0,mode:m="sync",propagate:p=!1,anchorX:f="left",anchorY:j="top",root:g})=>{const[x,y]=o.usePresence(p),C=e.useMemo(()=>i.onlyElements(c),[c]),v=p&&!x?[]:C.map(i.getChildKey),E=e.useRef(!0),q=r.useConstant(()=>new Map),w=e.useRef(new Set),[P,L]=e.useState(C),[K,A]=e.useState(C);s.useIsomorphicLayoutEffect(()=>{!p||x||K.length||y?.()},[x,p,K.length,y]);const R=e.useRef();e.useEffect(()=>()=>{const e=R.current;R.current=void 0,e?.()},[K]),s.useIsomorphicLayoutEffect(()=>{E.current=!1;for(let e=0;e<K.length;e++){const t=i.getChildKey(K[e]);v.includes(t)?(q.delete(t),w.current.delete(t)):!0!==q.get(t)&&q.set(t,!1)}},[K,v.length,v.join("-")]);const _=[];if(C!==P){let e=[...C],t=0;for(const r of K){const s=v.indexOf(i.getChildKey(r));-1===s?(e.splice(t++,0,r),_.push(r)):t=s+_.length+1}return _.every(e=>q.get(i.getChildKey(e)))?e=C:"wait"===m&&(e=_),A(i.onlyElements(e)),L(C),null}"production"!==process.env.NODE_ENV&&"wait"===m&&K.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:b}=e.useContext(t.LayoutGroupContext);return u.exports.jsx(u.exports.Fragment,{children:K.map(e=>{const t=i.getChildKey(e),r=!(p&&!x)&&(C===K||v.includes(t));return u.exports.jsx(n.PresenceChild,{isPresent:r,initial:!(E.current&&!a)&&void 0,custom:l,presenceAffectsLayout:h,mode:m,root:g,onExitComplete:r?void 0:()=>{if(w.current.has(t))return;if(!q.has(t))return;w.current.add(t),q.set(t,!0);let e=!0;q.forEach(t=>{t||(e=!1)}),e&&(b?.(),L([]),p&&y?.(),R.current=d)},anchorX:f,anchorY:j,children:e},t)})})};
2
2
  //# sourceMappingURL=index.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { useMemo, useRef, useState, useContext } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { usePresence } from './use-presence.mjs';\nimport { onlyElements, getChildKey } from './utils.mjs';\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = \"sync\", propagate = false, anchorX = \"left\", anchorY = \"top\", root }) => {\n const [isParentPresent, safeToRemove] = usePresence(propagate);\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children]);\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true);\n /**\n * A ref containing the currently present children. When all exit animations\n * are complete, we use this to re-render the component with the latest children\n * *committed* rather than the latest children *rendered*.\n */\n const pendingPresentChildren = useRef(presentChildren);\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map());\n /**\n * Track which components are currently processing exit to prevent duplicate processing.\n */\n const exitingComponents = useRef(new Set());\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n pendingPresentChildren.current = presentChildren;\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n }\n else {\n exitComplete.delete(key);\n exitingComponents.current.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n const exitingChildren = [];\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const child = renderedChildren[i];\n const key = getChildKey(child);\n if (!presentKeys.includes(key)) {\n nextChildren.splice(i, 0, child);\n exitingChildren.push(child);\n }\n }\n /**\n * If we're in \"wait\" mode, and we have exiting children, we want to\n * only render these until they've all exited.\n */\n if (mode === \"wait\" && exitingChildren.length) {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return null;\n }\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext);\n return (jsx(Fragment, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent = propagate && !isParentPresent\n ? false\n : presentChildren === renderedChildren ||\n presentKeys.includes(key);\n const onExit = () => {\n if (exitingComponents.current.has(key)) {\n return;\n }\n if (exitComplete.has(key)) {\n exitingComponents.current.add(key);\n exitComplete.set(key, true);\n }\n else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete)\n isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender?.();\n setRenderedChildren(pendingPresentChildren.current);\n propagate && safeToRemove?.();\n onExitComplete && onExitComplete();\n }\n };\n return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial\n ? undefined\n : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key));\n }) }));\n};\n\nexport { AnimatePresence };\n//# sourceMappingURL=index.mjs.map\n"],"names":["AnimatePresence","children","custom","initial","onExitComplete","presenceAffectsLayout","mode","propagate","anchorX","anchorY","root","presentChildren","useMemo","onlyElements","presentKeys","isParentPresent","map","getChildKey","isInitialRender","useRef","pendingPresentChildren","current","i","renderedChildren","length","exitComplete","delete","key","exitingComponents","set","join","diffedChildren","nextChildren","child","exitingChildren","push","setRenderedChildren","process","env","NODE_ENV","console","warn","isPresent","includes","jsx","PresenceChild","undefined","has","add","forEach","isExitComplete","safeToRemove"],"mappings":"odA6COA,EAAAC,WAAAC,SAAAC,WAAA,EAAAC,iBAAAC,yBAAA,EAAAC,OAAA,OAAAC,aAAA,EAAAC,UAAA,OAAAC,UAAA,MAAAC,uCAkBHC,EAAAC,EAAAA,QAAA,IAAAC,EAAAA,aAAAZ,IAAAA,IAMAa,EAAAP,IAAAQ,KAAAJ,EAAAK,IAAAC,EAAAA,aAMAC,EAAAC,UAAA,GAOAC,EAAAD,SAAAR,6HAoBIO,EAAAG,SAAA,EACAD,EAAAC,QAAAV,EAKA,IAAAW,IAAAA,IAAAA,EAAAC,EAAAC,OAAAF,IAAA,4CAQQG,EAAAC,OAAAC,GACAC,EAAAP,QAAAK,OAAAC,mBAJIF,EAAAI,IAAAF,GAAA,KAOhBJ,CAAAA,EAAAT,EAAAU,OAAAV,EAAAgB,KAAA,kBAIA,GAAAnB,IAAAoB,EAAA,CACI,IAAAC,MAAArB,GAMA,IAAAW,IAAAA,IAAAA,EAAAC,EAAAC,OAAAF,IAAA,CACI,MAAAW,EAAAV,EAAAD,GACAK,EAAAV,cAAAgB,mCAIIC,EAAAC,KAAAF,IAmBR,kCAPAG,EAAAvB,EAAAA,aAAAmB,SAOA,oBAGJK,QAAAC,IAAAC,UAEI,SAAAjC,GACAiB,EAAAC,OAAA,GAEAgB,QAAAC,KAAA,sQAeQ,MAAAd,EAAAV,cAAAgB,GAEAS,IAAAnC,IAAAQ,YAIUD,EAAA6B,SAAAhB,IA6BV,OAAAiB,EAAAA,QAAAA,IAAAC,EAAAA,cAAA,CAAAH,UAAAA,EAAAvC,UAAAe,EAAAG,UAAAlB,SAMgB2C,yGA5BZ,IAAArB,EAAAsB,IAAApB,UACIC,EAAAP,QAAA2B,IAAArB,GACAF,EAAAI,IAAAF,GAAA,YAMJF,EAAAwB,QAAAC,IACIA,sBAKAd,EAAAhB,EAAAC,SAEAd,GAAA4C"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs"],"sourcesContent":["\"use client\";\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { useMemo, useRef, useState, useEffect, useContext } from 'react';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { usePresence } from './use-presence.mjs';\nimport { onlyElements, getChildKey } from './utils.mjs';\n\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * <AnimatePresence>\n * {items.map(item => (\n * <motion.div\n * key={item.id}\n * initial={{ opacity: 0 }}\n * animate={{ opacity: 1 }}\n * exit={{ opacity: 0 }}\n * />\n * ))}\n * </AnimatePresence>\n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, presenceAffectsLayout = true, mode = \"sync\", propagate = false, anchorX = \"left\", anchorY = \"top\", root }) => {\n const [isParentPresent, safeToRemove] = usePresence(propagate);\n /**\n * Filter any children that aren't ReactElements. We can only track components\n * between renders with a props.key.\n */\n const presentChildren = useMemo(() => onlyElements(children), [children]);\n /**\n * Track the keys of the currently rendered children. This is used to\n * determine which children are exiting.\n */\n const presentKeys = propagate && !isParentPresent ? [] : presentChildren.map(getChildKey);\n /**\n * If `initial={false}` we only want to pass this to components in the first render.\n */\n const isInitialRender = useRef(true);\n /**\n * Track which exiting children have finished animating out.\n */\n const exitComplete = useConstant(() => new Map());\n /**\n * Track which components are currently processing exit to prevent duplicate processing.\n */\n const exitingComponents = useRef(new Set());\n /**\n * Save children to render as React state. To ensure this component is concurrent-safe,\n * we check for exiting children via an effect.\n */\n const [diffedChildren, setDiffedChildren] = useState(presentChildren);\n const [renderedChildren, setRenderedChildren] = useState(presentChildren);\n useIsomorphicLayoutEffect(() => {\n if (propagate && !isParentPresent && !renderedChildren.length) {\n safeToRemove?.();\n }\n }, [isParentPresent, propagate, renderedChildren.length, safeToRemove]);\n /**\n * When every exit completes, we re-render to remove the exited children\n * and store onExitComplete here. It fires from the cleanup of an effect\n * keyed on the rendered children, so it runs in the commit that removes\n * them (or when we unmount), after their own effect cleanups.\n */\n const pendingExitComplete = useRef();\n useEffect(() => () => {\n const callback = pendingExitComplete.current;\n pendingExitComplete.current = undefined;\n callback?.();\n }, [renderedChildren]);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n /**\n * Update complete status of exiting children.\n */\n for (let i = 0; i < renderedChildren.length; i++) {\n const key = getChildKey(renderedChildren[i]);\n if (!presentKeys.includes(key)) {\n if (exitComplete.get(key) !== true) {\n exitComplete.set(key, false);\n }\n }\n else {\n exitComplete.delete(key);\n exitingComponents.current.delete(key);\n }\n }\n }, [renderedChildren, presentKeys.length, presentKeys.join(\"-\")]);\n const exitingChildren = [];\n if (presentChildren !== diffedChildren) {\n let nextChildren = [...presentChildren];\n /**\n * Loop through all the currently rendered components and decide which\n * are exiting.\n *\n * Exiting children are reinserted directly after the child they\n * previously followed. Splicing at their index within the previously\n * rendered children, as we used to, indexes into the wrong list: it\n * can interleave them with entering children and push present children\n * to new positions, remounting them (#3746).\n */\n let insertionIndex = 0;\n for (const child of renderedChildren) {\n const presentIndex = presentKeys.indexOf(getChildKey(child));\n if (presentIndex === -1) {\n nextChildren.splice(insertionIndex++, 0, child);\n exitingChildren.push(child);\n }\n else {\n insertionIndex = presentIndex + exitingChildren.length + 1;\n }\n }\n /**\n * Once every exiting child has finished animating out, remove them\n * all at once. Otherwise, if we're in \"wait\" mode, we want to only\n * render the exiting children until they've all exited.\n */\n if (exitingChildren.every((child) => exitComplete.get(getChildKey(child)))) {\n nextChildren = presentChildren;\n }\n else if (mode === \"wait\") {\n nextChildren = exitingChildren;\n }\n setRenderedChildren(onlyElements(nextChildren));\n setDiffedChildren(presentChildren);\n /**\n * Early return to ensure once we've set state with the latest diffed\n * children, we can immediately re-render.\n */\n return null;\n }\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n renderedChildren.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n /**\n * If we've been provided a forceRender function by the LayoutGroupContext,\n * we can use it to force a re-render amongst all surrounding components once\n * all components have finished animating out.\n */\n const { forceRender } = useContext(LayoutGroupContext);\n return (jsx(Fragment, { children: renderedChildren.map((child) => {\n const key = getChildKey(child);\n const isPresent = propagate && !isParentPresent\n ? false\n : presentChildren === renderedChildren ||\n presentKeys.includes(key);\n const onExit = () => {\n if (exitingComponents.current.has(key)) {\n return;\n }\n if (exitComplete.has(key)) {\n exitingComponents.current.add(key);\n exitComplete.set(key, true);\n }\n else {\n return;\n }\n let isEveryExitComplete = true;\n exitComplete.forEach((isExitComplete) => {\n if (!isExitComplete)\n isEveryExitComplete = false;\n });\n if (isEveryExitComplete) {\n forceRender?.();\n /**\n * Re-diff rather than setting the children to render\n * directly: this update can be applied after a\n * transition has committed new children, so any\n * children read now could be stale by then.\n */\n setDiffedChildren([]);\n propagate && safeToRemove?.();\n pendingExitComplete.current = onExitComplete;\n }\n };\n return (jsx(PresenceChild, { isPresent: isPresent, initial: !isInitialRender.current || initial\n ? undefined\n : false, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, root: root, onExitComplete: isPresent ? undefined : onExit, anchorX: anchorX, anchorY: anchorY, children: child }, key));\n }) }));\n};\n\nexport { AnimatePresence };\n//# sourceMappingURL=index.mjs.map\n"],"names":["AnimatePresence","children","custom","initial","onExitComplete","presenceAffectsLayout","mode","propagate","anchorX","anchorY","root","presentChildren","useMemo","onlyElements","presentKeys","isParentPresent","map","getChildKey","isInitialRender","useRef","renderedChildren","length","safeToRemove","pendingExitComplete","useEffect","callback","current","undefined","i","exitComplete","delete","key","exitingComponents","set","join","diffedChildren","nextChildren","child","presentIndex","exitingChildren","push","setRenderedChildren","process","env","NODE_ENV","console","warn","isPresent","includes","jsx","PresenceChild","has","add","forEach","isExitComplete"],"mappings":"odA6COA,EAAAC,WAAAC,SAAAC,WAAA,EAAAC,iBAAAC,yBAAA,EAAAC,OAAA,OAAAC,aAAA,EAAAC,UAAA,OAAAC,UAAA,MAAAC,uCAkBHC,EAAAC,EAAAA,QAAA,IAAAC,EAAAA,aAAAZ,IAAAA,IAMAa,EAAAP,IAAAQ,KAAAJ,EAAAK,IAAAC,EAAAA,aAMAC,EAAAC,UAAA,qJAuBAJ,CAAAA,EAAAR,EAAAa,EAAAC,OAAAC,IAQA,MAAAC,EAAAJ,EAAAA,SAEAK,EAAAA,UAAA,IAAA,KAEQ,MAAAC,EAAAF,EAAAG,QACAH,EAAAG,aAAAC,SAEJ,CAAAP,qCAKAF,EAAAQ,SAAA,EAKA,IAAAE,IAAAA,IAAAA,EAAAR,EAAAC,OAAAO,IAAA,4CAQQC,EAAAC,OAAAC,GACAC,EAAAN,QAAAI,OAAAC,mBAJIF,EAAAI,IAAAF,GAAA,KAOhBX,CAAAA,EAAAN,EAAAO,OAAAP,EAAAoB,KAAA,kBAIA,GAAAvB,IAAAwB,EAAA,CACI,IAAAC,MAAAzB,OAcA,IAAA0B,MAAAA,KAAAjB,EAAA,sCAGI,IAAAkB,qBAEIC,EAAAC,KAAAH,mBA4BR,+CAXO,SAAA/B,SAIPmC,EAAA5B,EAAAA,aAAAuB,SAOA,oBAGJM,QAAAC,IAAAC,UAEI,SAAAtC,GACAc,EAAAC,OAAA,GAEAwB,QAAAC,KAAA,sQAeQ,MAAAf,EAAAd,cAAAoB,GAEAU,IAAAxC,IAAAQ,YAIUD,EAAAkC,SAAAjB,IAmCV,OAAAkB,EAAAA,QAAAA,IAAAC,EAAAA,cAAA,CAAAH,UAAAA,EAAA5C,UAAAe,EAAAQ,UAAAvB,SAMgBwB,yGAlCZ,IAAAE,EAAAsB,IAAApB,UACIC,EAAAN,QAAA0B,IAAArB,GACAF,EAAAI,IAAAF,GAAA,YAMJF,EAAAwB,QAAAC,IACIA,4BAaA/C,GAAAe,MAEAC,EAAAG,QAAAtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n\nexport { getChildKey, onlyElements };\n//# sourceMappingURL=utils.mjs.map\n"],"names":["child","key","children","filtered","Children","forEach","isValidElement","push"],"mappings":"+GAI4BA,GACxBA,EAAMC,KAAO,wBAEX,SAAuBC,GACzB,MAAMC,EAAgC,GAOtC,OAJAC,WAASC,QAAQH,EAAWF,IACpBM,EAAAA,eAAeN,IAAQG,EAASI,KAAKP,KAGtCG,CACX"}
1
+ {"version":3,"file":"utils.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs"],"sourcesContent":["import { Children, isValidElement } from 'react';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by prepending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n\nexport { getChildKey, onlyElements };\n//# sourceMappingURL=utils.mjs.map\n"],"names":["child","key","children","filtered","Children","forEach","isValidElement","push"],"mappings":"+GAI4BA,GACxBA,EAAMC,KAAO,wBAEX,SAAuBC,GACzB,MAAMC,EAAgC,GAOtC,OAJAC,WAASC,QAAQH,EAAWF,IACpBM,EAAAA,eAAeN,IAAQG,EAASI,KAAKP,KAGtCG,CACX"}
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutGroupContext.mjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"LayoutGroupContext.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs"],"sourcesContent":["\"use client\";\nimport { createContext } from 'react';\n\nconst LayoutGroupContext = \n/* @__PURE__ */ createContext({});\n\nexport { LayoutGroupContext };\n//# sourceMappingURL=LayoutGroupContext.mjs.map\n"],"names":["LayoutGroupContext","createContext"],"mappings":"oEAYI,MAAAA,mBAAAC,cAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"LazyContext.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/context/LazyContext.mjs"],"sourcesContent":["\"use client\";\nimport { createContext } from 'react';\n\nconst LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n//# sourceMappingURL=LazyContext.mjs.map\n"],"names":["LazyContext","createContext","strict"],"mappings":"oEAUOA,MAAAA,mBAAAC,cAAA,CAAAC,QAAA"}
1
+ {"version":3,"file":"LazyContext.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/context/LazyContext.mjs"],"sourcesContent":["\"use client\";\nimport { createContext } from 'react';\n\nconst LazyContext = /* @__PURE__ */ createContext({\n strict: false,\n});\n\nexport { LazyContext };\n//# sourceMappingURL=LazyContext.mjs.map\n"],"names":["LazyContext","createContext","strict"],"mappings":"oEAUOA,MAAAA,mBAAAC,cAAA,CACHC,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MotionConfigContext.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs"],"sourcesContent":["\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n//# sourceMappingURL=MotionConfigContext.mjs.map\n"],"names":["MotionConfigContext","createContext","transformPagePoint","p","isStatic","reducedMotion"],"mappings":"oEA4DOA,MAAAA,mBAAAC,cAAA,CACHC,mBAAAC,GAAAA,EACAC,UAAA,EACAC,cAAA"}
1
+ {"version":3,"file":"MotionConfigContext.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs"],"sourcesContent":["\"use client\";\nimport { createContext } from 'react';\n\n/**\n * @public\n */\nconst MotionConfigContext = \n/* @__PURE__ */ createContext({\n transformPagePoint: (p) => p,\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n//# sourceMappingURL=MotionConfigContext.mjs.map\n"],"names":["MotionConfigContext","createContext","transformPagePoint","p","isStatic","reducedMotion"],"mappings":"oEAqEI,MAAAA,mBAAAC,cAAA,CACIC,mBAAAC,GAAAA,EACAC,UAAA,EACAC,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchLayoutGroupContext.mjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"SwitchLayoutGroupContext.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs"],"sourcesContent":["\"use client\";\nimport { createContext } from 'react';\n\n/**\n * Internal, exported only for usage in Framer\n */\nconst SwitchLayoutGroupContext = \n/* @__PURE__ */ createContext({});\n\nexport { SwitchLayoutGroupContext };\n//# sourceMappingURL=SwitchLayoutGroupContext.mjs.map\n"],"names":["SwitchLayoutGroupContext","createContext"],"mappings":"oEA6BI,MAAAA,mBAAAC,cAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("./VisualElementDragControls.mjs.js"),o=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../motion-utils/dist/es/noop.mjs.js");class r extends o.Feature{constructor(o){super(o),this.removeGroupControls=e.noop,this.removeListeners=e.noop,this.controls=new s.VisualElementDragControls(o)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||e.noop}update(){const{dragControls:s}=this.node.getProps(),{dragControls:o}=this.node.prevProps||{};s!==o&&(this.removeGroupControls(),s&&(this.removeGroupControls=s.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}exports.DragGesture=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),o=require("../../../../../motion-utils/dist/es/noop.mjs.js"),e=require("../../../../../motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs.js");class r extends s.Feature{constructor(s){super(s),this.removeGroupControls=o.noop,this.removeListeners=o.noop,this.controls=new e.VisualElementDragControls(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||o.noop}update(){const{dragControls:s,drag:o}=this.node.getProps(),{dragControls:e,drag:r}=this.node.prevProps||{};s!==e&&(this.removeGroupControls(),s&&(this.removeGroupControls=s.subscribe(this.controls))),r&&!o&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}exports.DragGesture=r;
2
2
  //# sourceMappingURL=index.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/index.mjs"],"sourcesContent":["import { Feature } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { VisualElementDragControls } from './VisualElementDragControls.mjs';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n update() {\n const { dragControls } = this.node.getProps();\n const { dragControls: prevDragControls } = this.node.prevProps || {};\n if (dragControls !== prevDragControls) {\n this.removeGroupControls();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n }\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n /**\n * In React 19, during list reorder reconciliation, components may\n * briefly unmount and remount while the drag is still active. If we're\n * actively dragging, we should NOT end the pan session - it will\n * continue tracking pointer events via its window-level listeners.\n *\n * The pan session will be properly cleaned up when:\n * 1. The drag ends naturally (pointerup/pointercancel)\n * 2. The component is truly removed from the DOM\n */\n if (!this.controls.isDragging) {\n this.controls.endPanSession();\n }\n }\n}\n\nexport { DragGesture };\n//# sourceMappingURL=index.mjs.map\n"],"names":["DragGesture","Feature","constructor","node","super","this","removeGroupControls","noop","removeListeners","controls","VisualElementDragControls","mount","dragControls","getProps","subscribe","addListeners","update","prevDragControls","prevProps","unmount","isDragging","endPanSession"],"mappings":"0PAIM,MAAOA,UAAoBC,EAAAA,QAM7BC,WAAAA,CAAYC,GACRC,MAAMD,GAJVE,KAAAC,oBAAgCC,OAChCF,KAAAG,gBAA4BD,OAIxBF,KAAKI,SAAW,IAAIC,EAAyBA,0BAACP,EAClD,CAEAQ,KAAAA,GAGI,MAAMC,aAAEA,GAAiBP,KAAKF,KAAKU,WAE/BD,IACAP,KAAKC,oBAAsBM,EAAaE,UAAUT,KAAKI,WAG3DJ,KAAKG,gBAAkBH,KAAKI,SAASM,gBAAkBR,EAAAA,IAC3D,CAEAS,MAAAA,GACI,MAAMJ,aAAEA,GAAiBP,KAAKF,KAAKU,YAC3BD,aAAcK,GAAqBZ,KAAKF,KAAKe,WAAa,GAE9DN,IAAiBK,IACjBZ,KAAKC,sBACDM,IACAP,KAAKC,oBAAsBM,EAAaE,UAAUT,KAAKI,WAGnE,CAEAU,OAAAA,GACId,KAAKC,sBACLD,KAAKG,kBAWAH,KAAKI,SAASW,YACff,KAAKI,SAASY,eAEtB"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/index.mjs"],"sourcesContent":["import { Feature, VisualElementDragControls } from 'motion-dom';\nimport { noop } from 'motion-utils';\n\nclass DragGesture extends Feature {\n constructor(node) {\n super(node);\n this.removeGroupControls = noop;\n this.removeListeners = noop;\n this.controls = new VisualElementDragControls(node);\n }\n mount() {\n // If we've been provided a DragControls for manual control over the drag gesture,\n // subscribe this component to it on mount.\n const { dragControls } = this.node.getProps();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n this.removeListeners = this.controls.addListeners() || noop;\n }\n update() {\n const { dragControls, drag } = this.node.getProps();\n const { dragControls: prevDragControls, drag: prevDrag } = this.node.prevProps || {};\n if (dragControls !== prevDragControls) {\n this.removeGroupControls();\n if (dragControls) {\n this.removeGroupControls = dragControls.subscribe(this.controls);\n }\n }\n /**\n * If drag is disabled mid-gesture, for instance from onDrag, end the\n * gesture as if released. This must happen before this render's\n * layout change is processed, otherwise the element is still\n * animation-blocked, so it jumps to its new layout and keeps that\n * jump as a drag offset, which release wouldn't animate away as\n * drag is now disabled.\n */\n if (prevDrag && !drag)\n this.controls.stop(undefined, undefined, prevDrag);\n }\n unmount() {\n this.removeGroupControls();\n this.removeListeners();\n /**\n * In React 19, during list reorder reconciliation, components may\n * briefly unmount and remount while the drag is still active. If we're\n * actively dragging, we should NOT end the pan session - it will\n * continue tracking pointer events via its window-level listeners.\n *\n * The pan session will be properly cleaned up when:\n * 1. The drag ends naturally (pointerup/pointercancel)\n * 2. The component is truly removed from the DOM\n */\n if (!this.controls.isDragging) {\n this.controls.endPanSession();\n }\n }\n}\n\nexport { DragGesture };\n//# sourceMappingURL=index.mjs.map\n"],"names":["DragGesture","Feature","constructor","node","super","this","removeGroupControls","noop","removeListeners","controls","VisualElementDragControls","mount","dragControls","getProps","subscribe","addListeners","update","drag","prevDragControls","prevDrag","prevProps","stop","undefined","unmount","isDragging","endPanSession"],"mappings":"wSAOM,MAAOA,UAAoBC,EAAAA,QAM7BC,WAAAA,CAAYC,GACRC,MAAMD,GAJVE,KAAAC,oBAAgCC,OAChCF,KAAAG,gBAA4BD,OAIxBF,KAAKI,SAAW,IAAIC,EAAyBA,0BAACP,EAClD,CAEAQ,KAAAA,GAGI,MAAMC,aAAEA,GAAiBP,KAAKF,KAAKU,WAE/BD,IACAP,KAAKC,oBAAsBM,EAAaE,UAAUT,KAAKI,WAG3DJ,KAAKG,gBAAkBH,KAAKI,SAASM,gBAAkBR,EAAAA,IAC3D,CAEAS,MAAAA,GACI,MAAMJ,aAAEA,EAAYK,KAAEA,GAASZ,KAAKF,KAAKU,YACjCD,aAAcM,EAAkBD,KAAME,GAC1Cd,KAAKF,KAAKiB,WAAa,GAEvBR,IAAiBM,IACjBb,KAAKC,sBACDM,IACAP,KAAKC,oBAAsBM,EAAaE,UAAUT,KAAKI,YAY3DU,IAAaF,GACbZ,KAAKI,SAASY,UAAKC,OAAWA,EAAWH,EACjD,CAEAI,OAAAA,GACIlB,KAAKC,sBACLD,KAAKG,kBAWAH,KAAKI,SAASe,YACfnB,KAAKI,SAASgB,eAEtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-drag-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs"],"sourcesContent":["import { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nclass DragControls {\n constructor() {\n this.componentControls = new Set();\n }\n /**\n * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.\n *\n * @internal\n */\n subscribe(controls) {\n this.componentControls.add(controls);\n return () => this.componentControls.delete(controls);\n }\n /**\n * Start a drag gesture on every `motion` component that has this set of drag controls\n * passed into it via the `dragControls` prop.\n *\n * ```jsx\n * dragControls.start(e, {\n * snapToCursor: true\n * })\n * ```\n *\n * @param event - PointerEvent\n * @param options - Options\n *\n * @public\n */\n start(event, options) {\n this.componentControls.forEach((controls) => {\n controls.start(event.nativeEvent || event, options);\n });\n }\n /**\n * Cancels a drag gesture.\n *\n * ```jsx\n * dragControls.cancel()\n * ```\n *\n * @public\n */\n cancel() {\n this.componentControls.forEach((controls) => {\n controls.cancel();\n });\n }\n /**\n * Stops a drag gesture.\n *\n * ```jsx\n * dragControls.stop()\n * ```\n *\n * @public\n */\n stop() {\n this.componentControls.forEach((controls) => {\n controls.stop();\n });\n }\n}\nconst createDragControls = () => new DragControls();\n/**\n * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop\n * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we\n * might want to initiate that dragging from a different component than the draggable one.\n *\n * By creating a `dragControls` using the `useDragControls` hook, we can pass this into\n * the draggable component's `dragControls` prop. It exposes a `start` method\n * that can start dragging from pointer events on other components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nfunction useDragControls() {\n return useConstant(createDragControls);\n}\n\nexport { DragControls, useDragControls };\n//# sourceMappingURL=use-drag-controls.mjs.map\n"],"names":["DragControls","constructor","this","componentControls","Set","subscribe","controls","add","delete","start","event","options","forEach","nativeEvent","cancel","stop","createDragControls","useDragControls","useConstant"],"mappings":"2HA2BaA,EAAbC,WAAAA,GACYC,KAAAC,kBAAoB,IAAIC,GAqEpC,CA9DIC,SAAAA,CAAUC,GAGN,OAFAJ,KAAKC,kBAAkBI,IAAID,GAEpB,IAAMJ,KAAKC,kBAAkBK,OAAOF,EAC/C,CAiBAG,KAAAA,CACIC,EACAC,GAEAT,KAAKC,kBAAkBS,QAASN,IAC5BA,EAASG,MACJC,EAA6BG,aAAeH,EAC7CC,IAGZ,CAWAG,MAAAA,GACIZ,KAAKC,kBAAkBS,QAASN,IAC5BA,EAASQ,UAEjB,CAWAC,IAAAA,GACIb,KAAKC,kBAAkBS,QAASN,IAC5BA,EAASS,QAEjB,EAGJ,MAAMC,EAAqBA,IAAM,IAAIhB,iDA4BrBiB,WACZ,OAAOC,EAAAA,YAAYF,EACvB"}
1
+ {"version":3,"file":"use-drag-controls.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs"],"sourcesContent":["import { useConstant } from '../../utils/use-constant.mjs';\n\n/**\n * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nclass DragControls {\n constructor() {\n this.componentControls = new Set();\n }\n /**\n * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.\n *\n * @internal\n */\n subscribe(controls) {\n this.componentControls.add(controls);\n return () => this.componentControls.delete(controls);\n }\n /**\n * Start a drag gesture on every `motion` component that has this set of drag controls\n * passed into it via the `dragControls` prop.\n *\n * ```jsx\n * dragControls.start(e, {\n * snapToCursor: true\n * })\n * ```\n *\n * @param event - PointerEvent\n * @param options - Options\n *\n * @public\n */\n start(event, options) {\n this.componentControls.forEach((controls) => {\n controls.start(event.nativeEvent || event, options);\n });\n }\n /**\n * Cancels a drag gesture.\n *\n * ```jsx\n * dragControls.cancel()\n * ```\n *\n * @public\n */\n cancel() {\n this.componentControls.forEach((controls) => {\n controls.cancel();\n });\n }\n /**\n * Stops a drag gesture.\n *\n * ```jsx\n * dragControls.stop()\n * ```\n *\n * @public\n */\n stop() {\n this.componentControls.forEach((controls) => {\n controls.stop();\n });\n }\n}\nconst createDragControls = () => new DragControls();\n/**\n * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop\n * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we\n * might want to initiate that dragging from a different component than the draggable one.\n *\n * By creating a `dragControls` using the `useDragControls` hook, we can pass this into\n * the draggable component's `dragControls` prop. It exposes a `start` method\n * that can start dragging from pointer events on other components.\n *\n * ```jsx\n * const dragControls = useDragControls()\n *\n * function startDrag(event) {\n * dragControls.start(event, { snapToCursor: true })\n * }\n *\n * return (\n * <>\n * <div onPointerDown={startDrag} />\n * <motion.div drag=\"x\" dragControls={dragControls} />\n * </>\n * )\n * ```\n *\n * @public\n */\nfunction useDragControls() {\n return useConstant(createDragControls);\n}\n\nexport { DragControls, useDragControls };\n//# sourceMappingURL=use-drag-controls.mjs.map\n"],"names":["DragControls","constructor","this","componentControls","Set","subscribe","controls","add","delete","start","event","options","forEach","nativeEvent","cancel","stop","createDragControls","useDragControls","useConstant"],"mappings":"2HAwBaA,EAAbC,WAAAA,GACYC,KAAAC,kBAAoB,IAAIC,GAqEpC,CA9DIC,SAAAA,CAAUC,GAGN,OAFAJ,KAAKC,kBAAkBI,IAAID,GAEpB,IAAMJ,KAAKC,kBAAkBK,OAAOF,EAC/C,CAiBAG,KAAAA,CACIC,EACAC,GAEAT,KAAKC,kBAAkBS,QAASN,IAC5BA,EAASG,MACJC,EAA6BG,aAAeH,EAC7CC,IAGZ,CAWAG,MAAAA,GACIZ,KAAKC,kBAAkBS,QAASN,IAC5BA,EAASQ,UAEjB,CAWAC,IAAAA,GACIb,KAAKC,kBAAkBS,QAASN,IAC5BA,EAASS,QAEjB,EAGJ,MAAMC,EAAqBA,IAAM,IAAIhB,iDA4BrBiB,WACZ,OAAOC,EAAAA,YAAYF,EACvB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),o=require("../../../../motion-dom/dist/es/gestures/hover.mjs.js"),r=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js");function s(t,o,s){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===s);const i=n["onHover"+s];i&&r.frame.postRender(()=>i(o,e.extractEventInfo(o)))}class n extends t.Feature{mount(){const{current:e}=this.node;e&&(this.unmount=o.hover(e,(e,t)=>(s(this.node,t,"Start"),e=>s(this.node,e,"End"))))}unmount(){}}exports.HoverGesture=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),t=require("../../../../motion-dom/dist/es/gestures/hover.mjs.js"),o=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),s=require("../../../../motion-dom/dist/es/events/event-info.mjs.js");function r(e,t,r,n,i){const{props:m}=e,u="while"+r;!i&&e.animationState&&m[u]&&e.animationState.setActive(u,"Start"===n);const a=m["on"+r+n];a&&o.frame.postRender(()=>a(t,s.extractEventInfo(t)))}class n extends e.Feature{mount(){const{current:e}=this.node;e&&(this.unmount=t.hover(e,(e,t)=>(r(this.node,t,"Hover","Start"),e=>r(this.node,e,"Hover","End"))))}unmount(){}}exports.HoverGesture=n,exports.handleGestureEvent=r;
2
2
  //# sourceMappingURL=hover.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { Feature, hover, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handleHoverEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.animationState && props.whileHover) {\n node.animationState.setActive(\"whileHover\", lifecycle === \"Start\");\n }\n const eventName = (\"onHover\" + lifecycle);\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (_element, startEvent) => {\n handleHoverEvent(this.node, startEvent, \"Start\");\n return (endEvent) => handleHoverEvent(this.node, endEvent, \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture };\n//# sourceMappingURL=hover.mjs.map\n"],"names":["handleHoverEvent","node","event","lifecycle","props","animationState","whileHover","setActive","callback","frame","postRender","extractEventInfo","HoverGesture","Feature","mount","current","this","unmount","hover","_element","startEvent","endEvent"],"mappings":"wTAGA,SAASA,EACLC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUH,EAEdA,EAAKI,gBAAkBD,EAAME,YAC7BL,EAAKI,eAAeE,UAAU,aAA4B,UAAdJ,GAGhD,MACMK,EAAWJ,EADE,UAAYD,GAE3BK,GACAC,EAAKA,MAACC,WAAW,IAAMF,EAASN,EAAOS,mBAAiBT,IAEhE,CAEM,MAAOU,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMC,QAAEA,GAAYC,KAAKf,KACpBc,IAELC,KAAKC,QAAUC,EAAKA,MAACH,EAAS,CAACI,EAAUC,KACrCpB,EAAiBgB,KAAKf,KAAMmB,EAAY,SAEhCC,GAAarB,EAAiBgB,KAAKf,KAAMoB,EAAU,SAEnE,CAEAJ,OAAAA,GAAW"}
1
+ {"version":3,"file":"hover.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/hover.mjs"],"sourcesContent":["import { Feature, hover, frame, extractEventInfo } from 'motion-dom';\n\n/**\n * Toggle `while{gesture}` and fire `on{gesture}{lifecycle}`, e.g.\n * `onHoverStart` or, with an empty lifecycle, `onTap`. A repeat fires the\n * callback but leaves `while{gesture}` active.\n */\nfunction handleGestureEvent(node, event, gesture, lifecycle, isRepeat) {\n const { props } = node;\n const whileKey = (\"while\" + gesture);\n if (!isRepeat && node.animationState && props[whileKey]) {\n node.animationState.setActive(whileKey, lifecycle === \"Start\");\n }\n const callback = props[(\"on\" + gesture + lifecycle)];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass HoverGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.unmount = hover(current, (_element, startEvent) => {\n handleGestureEvent(this.node, startEvent, \"Hover\", \"Start\");\n return (endEvent) => handleGestureEvent(this.node, endEvent, \"Hover\", \"End\");\n });\n }\n unmount() { }\n}\n\nexport { HoverGesture, handleGestureEvent };\n//# sourceMappingURL=hover.mjs.map\n"],"names":["handleGestureEvent","node","event","gesture","lifecycle","isRepeat","props","whileKey","animationState","setActive","callback","frame","postRender","extractEventInfo","HoverGesture","Feature","mount","current","this","unmount","hover","_element","startEvent","endEvent"],"mappings":"oVAaM,SAAUA,EACZC,EACAC,EACAC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUL,EACZM,EAAY,QAAUJ,GAEvBE,GAAYJ,EAAKO,gBAAkBF,EAAMC,IAC1CN,EAAKO,eAAeC,UAAUF,EAAwB,UAAdH,GAG5C,MAAMM,EAAWJ,EAAO,KAAOH,EAAUC,GAGrCM,GACAC,EAAKA,MAACC,WAAW,IAAMF,EAASR,EAAOW,mBAAiBX,IAEhE,CAEM,MAAOY,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMC,QAAEA,GAAYC,KAAKjB,KACpBgB,IAELC,KAAKC,QAAUC,EAAKA,MAACH,EAAS,CAACI,EAAUC,KACrCtB,EAAmBkB,KAAKjB,KAAMqB,EAAY,QAAS,SAE3CC,GACJvB,EAAmBkB,KAAKjB,KAAMsB,EAAU,QAAS,SAE7D,CAEAJ,OAAAA,GAAW"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../events/add-pointer-event.mjs.js"),n=require("../../utils/get-context-window.mjs.js"),s=require("./PanSession.mjs.js"),t=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),o=require("../../../../../motion-utils/dist/es/noop.mjs.js"),r=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js");const i=e=>(n,s)=>{e&&r.frame.update(()=>e(n,s),!1,!0)};class a extends t.Feature{constructor(){super(...arguments),this.removePointerDownListener=o.noop}onPointerDown(e){this.session=new s.PanSession(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:n.getContextWindow(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:t}=this.node.getProps();return{onSessionStart:i(e),onStart:i(n),onMove:i(s),onEnd:(e,n)=>{delete this.session,t&&r.frame.postRender(()=>t(e,n))}}}mount(){this.removePointerDownListener=e.addPointerEvent(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}exports.PanGesture=a;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../motion-dom/dist/es/render/Feature.mjs.js"),n=require("../../../../../motion-utils/dist/es/noop.mjs.js"),t=require("../../../../../motion-dom/dist/es/gestures/pan/PanSession.mjs.js"),s=require("../../../../../motion-dom/dist/es/frameloop/frame.mjs.js"),o=require("../../../../../motion-dom/dist/es/events/add-pointer-event.mjs.js");const r=e=>(n,t)=>{e&&s.frame.update(()=>e(n,t),!1,!0)};class i extends e.Feature{constructor(){super(...arguments),this.removePointerDownListener=n.noop}onPointerDown(e){this.session=new t.PanSession(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:t,onPanEnd:o}=this.node.getProps();return{onSessionStart:r(e),onStart:r(n),onMove:r(t),onEnd:(e,n)=>{delete this.session,o&&s.frame.postRender(()=>o(e,n))}}}mount(){this.removePointerDownListener=o.addPointerEvent(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}}exports.PanGesture=i;
2
2
  //# sourceMappingURL=index.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { Feature, frame } from 'motion-dom';\nimport { noop } from 'motion-utils';\nimport { addPointerEvent } from '../../events/add-pointer-event.mjs';\nimport { getContextWindow } from '../../utils/get-context-window.mjs';\nimport { PanSession } from './PanSession.mjs';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true);\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n contextWindow: getContextWindow(this.node),\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: asyncHandler(onPan),\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session && this.session.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session && this.session.end();\n }\n}\n\nexport { PanGesture };\n//# sourceMappingURL=index.mjs.map\n"],"names":["asyncHandler","handler","event","info","frame","update","PanGesture","Feature","constructor","this","removePointerDownListener","noop","onPointerDown","pointerDownEvent","session","PanSession","createPanHandlers","transformPagePoint","node","getTransformPagePoint","contextWindow","getContextWindow","onPanSessionStart","onPanStart","onPan","onPanEnd","getProps","onSessionStart","onStart","onMove","onEnd","postRender","mount","addPointerEvent","current","updateHandlers","unmount","end"],"mappings":"uZAOA,MAAMA,EACDC,GAA8B,CAACC,EAAqBC,KAC7CF,GACAG,QAAMC,OAAO,IAAMJ,EAAQC,EAAOC,IAAO,GAAO,IAItD,MAAOG,UAAmBC,EAAAA,QAAhCC,WAAAA,uBAGYC,KAAAC,0BAAsCC,MA8ClD,CA5CIC,aAAAA,CAAcC,GACVJ,KAAKK,QAAU,IAAIC,EAAAA,WACfF,EACAJ,KAAKO,oBACL,CACIC,mBAAoBR,KAAKS,KAAKC,wBAC9BC,cAAeC,EAAAA,iBAAiBZ,KAAKS,OAGjD,CAEAF,iBAAAA,GACI,MAAMM,kBAAEA,EAAiBC,WAAEA,EAAUC,MAAEA,EAAKC,SAAEA,GAC1ChB,KAAKS,KAAKQ,WAEd,MAAO,CACHC,eAAgB3B,EAAasB,GAC7BM,QAAS5B,EAAauB,GACtBM,OAAQ7B,EAAawB,GACrBM,MAAOA,CAAC5B,EAAqBC,YAClBM,KAAKK,QACRW,GACArB,EAAKA,MAAC2B,WAAW,IAAMN,EAASvB,EAAOC,KAIvD,CAEA6B,KAAAA,GACIvB,KAAKC,0BAA4BuB,kBAC7BxB,KAAKS,KAAKgB,QACV,cACChC,GAAwBO,KAAKG,cAAcV,GAEpD,CAEAG,MAAAA,GACII,KAAKK,SAAWL,KAAKK,QAAQqB,eAAe1B,KAAKO,oBACrD,CAEAoB,OAAAA,GACI3B,KAAKC,4BACLD,KAAKK,SAAWL,KAAKK,QAAQuB,KACjC"}
1
+ {"version":3,"file":"index.mjs.js","sources":["../../../../../../../node_modules/framer-motion/dist/es/gestures/pan/index.mjs"],"sourcesContent":["import { Feature, PanSession, frame, addPointerEvent } from 'motion-dom';\nimport { noop } from 'motion-utils';\n\nconst asyncHandler = (handler) => (event, info) => {\n if (handler) {\n frame.update(() => handler(event, info), false, true);\n }\n};\nclass PanGesture extends Feature {\n constructor() {\n super(...arguments);\n this.removePointerDownListener = noop;\n }\n onPointerDown(pointerDownEvent) {\n this.session = new PanSession(pointerDownEvent, this.createPanHandlers(), {\n transformPagePoint: this.node.getTransformPagePoint(),\n // Fixes https://github.com/motiondivision/motion/issues/2270\n contextWindow: this.node.current?.ownerDocument.defaultView,\n });\n }\n createPanHandlers() {\n const { onPanSessionStart, onPanStart, onPan, onPanEnd } = this.node.getProps();\n return {\n onSessionStart: asyncHandler(onPanSessionStart),\n onStart: asyncHandler(onPanStart),\n onMove: asyncHandler(onPan),\n onEnd: (event, info) => {\n delete this.session;\n if (onPanEnd) {\n frame.postRender(() => onPanEnd(event, info));\n }\n },\n };\n }\n mount() {\n this.removePointerDownListener = addPointerEvent(this.node.current, \"pointerdown\", (event) => this.onPointerDown(event));\n }\n update() {\n this.session?.updateHandlers(this.createPanHandlers());\n }\n unmount() {\n this.removePointerDownListener();\n this.session?.end();\n }\n}\n\nexport { PanGesture };\n//# sourceMappingURL=index.mjs.map\n"],"names":["asyncHandler","handler","event","info","frame","update","PanGesture","Feature","constructor","this","removePointerDownListener","noop","onPointerDown","pointerDownEvent","session","PanSession","createPanHandlers","transformPagePoint","node","getTransformPagePoint","contextWindow","current","ownerDocument","defaultView","onPanSessionStart","onPanStart","onPan","onPanEnd","getProps","onSessionStart","onStart","onMove","onEnd","postRender","mount","addPointerEvent","updateHandlers","unmount","end"],"mappings":"6aAUA,MAAMA,EACDC,GAA8B,CAACC,EAAqBC,KAC7CF,GACAG,QAAMC,OAAO,IAAMJ,EAAQC,EAAOC,IAAO,GAAO,IAItD,MAAOG,UAAmBC,EAAAA,QAAhCC,WAAAA,uBAGYC,KAAAC,0BAAsCC,MA+ClD,CA7CIC,aAAAA,CAAcC,GACVJ,KAAKK,QAAU,IAAIC,EAAAA,WACfF,EACAJ,KAAKO,oBACL,CACIC,mBAAoBR,KAAKS,KAAKC,wBAE9BC,cAAeX,KAAKS,KAAKG,SAASC,cAAcC,aAG5D,CAEAP,iBAAAA,GACI,MAAMQ,kBAAEA,EAAiBC,WAAEA,EAAUC,MAAEA,EAAKC,SAAEA,GAC1ClB,KAAKS,KAAKU,WAEd,MAAO,CACHC,eAAgB7B,EAAawB,GAC7BM,QAAS9B,EAAayB,GACtBM,OAAQ/B,EAAa0B,GACrBM,MAAOA,CAAC9B,EAAqBC,YAClBM,KAAKK,QACRa,GACAvB,EAAKA,MAAC6B,WAAW,IAAMN,EAASzB,EAAOC,KAIvD,CAEA+B,KAAAA,GACIzB,KAAKC,0BAA4ByB,kBAC7B1B,KAAKS,KAAKG,QACV,cACCnB,GAAwBO,KAAKG,cAAcV,GAEpD,CAEAG,MAAAA,GACII,KAAKK,SAASsB,eAAe3B,KAAKO,oBACtC,CAEAqB,OAAAA,GACI5B,KAAKC,4BACLD,KAAKK,SAASwB,KAClB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../events/event-info.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),s=require("../../../../motion-dom/dist/es/gestures/press/index.mjs.js"),n=require("../../../../motion-dom/dist/es/frameloop/frame.mjs.js");function r(t,s,r){const{props:o}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&o.whileTap&&t.animationState.setActive("whileTap","Start"===r);const a=o["onTap"+("End"===r?"":r)];a&&n.frame.postRender(()=>a(s,e.extractEventInfo(s)))}class o extends t.Feature{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=s.press(e,(e,t)=>(r(this.node,t,"Start"),(e,{success:t})=>r(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}exports.PressGesture=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./hover.mjs.js"),t=require("../../../../motion-dom/dist/es/render/Feature.mjs.js"),s=require("../../../../motion-dom/dist/es/gestures/press/index.mjs.js");function o(t,s,o,n){t.current instanceof HTMLButtonElement&&t.current.disabled||e.handleGestureEvent(t,s,"Tap",o,n)}class n extends t.Feature{constructor(){super(...arguments),this.options={}}mount(){const{current:e}=this.node;e&&(this.update(),this.unmount=s.press(e,(e,t)=>(o(this.node,t,"Start"),{onComplete:(e,{success:t})=>o(this.node,e,t?"":"Cancel"),onRepeat:()=>o(this.node,t,"",!0)}),this.options))}update(){const{options:e,node:t}=this,{globalTapTarget:s,propagate:o,tap:n}=t.props;for(const t in e)delete e[t];Object.assign(e,n,{useGlobalTarget:s,stopPropagation:!1===o?.tap})}unmount(){}}exports.PressGesture=n;
2
2
  //# sourceMappingURL=press.mjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"press.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { Feature, press, frame } from 'motion-dom';\nimport { extractEventInfo } from '../events/event-info.mjs';\n\nfunction handlePressEvent(node, event, lifecycle) {\n const { props } = node;\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return;\n }\n if (node.animationState && props.whileTap) {\n node.animationState.setActive(\"whileTap\", lifecycle === \"Start\");\n }\n const eventName = (\"onTap\" + (lifecycle === \"End\" ? \"\" : lifecycle));\n const callback = props[eventName];\n if (callback) {\n frame.postRender(() => callback(event, extractEventInfo(event)));\n }\n}\nclass PressGesture extends Feature {\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n const { globalTapTarget, propagate } = this.node.props;\n this.unmount = press(current, (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"End\" : \"Cancel\");\n }, {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n//# sourceMappingURL=press.mjs.map\n"],"names":["handlePressEvent","node","event","lifecycle","props","current","HTMLButtonElement","disabled","animationState","whileTap","setActive","callback","frame","postRender","extractEventInfo","PressGesture","Feature","mount","this","globalTapTarget","propagate","unmount","press","_element","startEvent","endEvent","success","useGlobalTarget","stopPropagation","tap"],"mappings":"8TAGA,SAASA,EACLC,EACAC,EACAC,GAEA,MAAMC,MAAEA,GAAUH,EAElB,GAAIA,EAAKI,mBAAmBC,mBAAqBL,EAAKI,QAAQE,SAC1D,OAGAN,EAAKO,gBAAkBJ,EAAMK,UAC7BR,EAAKO,eAAeE,UAAU,WAA0B,UAAdP,GAG9C,MAKMQ,EAAWP,EALE,SAAyB,QAAdD,EAAsB,GAAKA,IAMrDQ,GACAC,EAAKA,MAACC,WAAW,IAAMF,EAAST,EAAOY,mBAAiBZ,IAEhE,CAEM,MAAOa,UAAqBC,EAAAA,QAC9BC,KAAAA,GACI,MAAMZ,QAAEA,GAAYa,KAAKjB,KACzB,IAAKI,EAAS,OAEd,MAAMc,gBAAEA,EAAeC,UAAEA,GAAcF,KAAKjB,KAAKG,MAEjDc,KAAKG,QAAUC,EAAKA,MAChBjB,EACA,CAACkB,EAAUC,KACPxB,EAAiBkB,KAAKjB,KAAMuB,EAAY,SAEjC,CAACC,GAAYC,aAChB1B,EACIkB,KAAKjB,KACLwB,EACAC,EAAU,MAAQ,WAG9B,CACIC,gBAAiBR,EACjBS,iBAAoC,IAAnBR,GAAWS,KAGxC,CAEAR,OAAAA,GAAW"}
1
+ {"version":3,"file":"press.mjs.js","sources":["../../../../../../node_modules/framer-motion/dist/es/gestures/press.mjs"],"sourcesContent":["import { Feature, press } from 'motion-dom';\nimport { handleGestureEvent } from './hover.mjs';\n\nfunction handlePressEvent(node, event, lifecycle, isRepeat) {\n if (node.current instanceof HTMLButtonElement && node.current.disabled) {\n return;\n }\n handleGestureEvent(node, event, \"Tap\", lifecycle, isRepeat);\n}\nclass PressGesture extends Feature {\n constructor() {\n super(...arguments);\n /**\n * press() reads its options on each press, so this object is kept\n * and updated in place when props change.\n */\n this.options = {};\n }\n mount() {\n const { current } = this.node;\n if (!current)\n return;\n this.update();\n this.unmount = press(current, (_element, startEvent) => {\n handlePressEvent(this.node, startEvent, \"Start\");\n return {\n onComplete: (endEvent, { success }) => handlePressEvent(this.node, endEvent, success ? \"\" : \"Cancel\"),\n onRepeat: () => handlePressEvent(this.node, startEvent, \"\", true),\n };\n }, this.options);\n }\n update() {\n const { options, node } = this;\n const { globalTapTarget, propagate, tap } = node.props;\n for (const key in options)\n delete options[key];\n Object.assign(options, tap, {\n useGlobalTarget: globalTapTarget,\n stopPropagation: propagate?.tap === false,\n });\n }\n unmount() { }\n}\n\nexport { PressGesture };\n//# sourceMappingURL=press.mjs.map\n"],"names":["handlePressEvent","node","event","lifecycle","isRepeat","current","HTMLButtonElement","disabled","handleGestureEvent","PressGesture","Feature","constructor","this","options","mount","update","unmount","press","_element","startEvent","onComplete","endEvent","success","onRepeat","globalTapTarget","propagate","tap","props","key","Object","assign","useGlobalTarget","stopPropagation"],"mappings":"8OAQA,SAASA,EACLC,EACAC,EACAC,EACAC,GAEIH,EAAKI,mBAAmBC,mBAAqBL,EAAKI,QAAQE,UAI9DC,EAAkBA,mBAACP,EAAMC,EAAO,MAAOC,EAAWC,EACtD,CAEM,MAAOK,UAAqBC,EAAAA,QAAlCC,WAAAA,uBAKYC,KAAAC,QAA+B,EAyC3C,CAvCIC,KAAAA,GACI,MAAMT,QAAEA,GAAYO,KAAKX,KACpBI,IAELO,KAAKG,SAELH,KAAKI,QAAUC,EAAKA,MAChBZ,EACA,CAACa,EAAUC,KACPnB,EAAiBY,KAAKX,KAAMkB,EAAY,SAEjC,CACHC,WAAYA,CAACC,GAAYC,aACrBtB,EACIY,KAAKX,KACLoB,EACAC,EAAU,GAAK,UAEvBC,SAAUA,IACNvB,EAAiBY,KAAKX,KAAMkB,EAAY,IAAI,KAGxDP,KAAKC,SAEb,CAEAE,MAAAA,GACI,MAAMF,QAAEA,EAAOZ,KAAEA,GAASW,MACpBY,gBAAEA,EAAeC,UAAEA,EAASC,IAAEA,GAAQzB,EAAK0B,MAEjD,IAAK,MAAMC,KAAOf,SAAgBA,EAAQe,GAE1CC,OAAOC,OAAOjB,EAASa,EAAK,CACxBK,gBAAiBP,EACjBQ,iBAAoC,IAAnBP,GAAWC,KAEpC,CAEAV,OAAAA,GAAW"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js");let i=0;class s extends t.Feature{constructor(){super(...arguments),this.id=i++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:i}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;if(t&&!1===s){if(this.isExitComplete){const{initial:t,custom:i}=this.node.getProps();if("string"==typeof t||"object"==typeof t&&null!==t&&!Array.isArray(t)){const s=e.resolveVariant(this.node,t,i);if(s){const{transition:t,transitionEnd:e,...i}=s;for(const t in i)this.node.getValue(t)?.jump(i[t])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const n=this.node.animationState.setActive("exit",!t);i&&!t&&n.then(()=>{this.isExitComplete=!0,i(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}exports.ExitAnimationFeature=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../../../../../motion-dom/dist/es/render/Feature.mjs.js"),e=require("../../../../../../motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js");let i=0;class s extends t.Feature{constructor(){super(...arguments),this.id=i++}update(){const{presenceContext:t,animationState:i}=this.node;if(!t||!i)return;const{isPresent:s,onExitComplete:n}=t;if(s===!this.exit)return;if(s){if(!0===this.exit){const{initial:t}=this.node.getProps();if(t&&!Array.isArray(t)){const{transition:i,transitionEnd:s,...n}=e.resolveVariant(this.node,t)||{};for(const t in n)this.node.getValue(t)?.jump(n[t])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);return void(this.exit=void 0)}const o=this.exit=i.setActive("exit",!0);n&&o.then(()=>{this.exit===o&&(this.exit=!0,n(this.id))})}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id,this.node)),this.update()}unmount(){}}exports.ExitAnimationFeature=s;
2
2
  //# sourceMappingURL=exit.mjs.js.map