@cloudflare/realtimekit-ui 1.0.0-staging.7 → 1.0.0-staging.9

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 (532) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/cjs/{TextMessage-cbe10d86.js → TextMessage-e9ca06aa.js} +1 -1
  3. package/dist/cjs/{chat-412ceea4.js → chat-46e7e4fe.js} +1 -1
  4. package/dist/cjs/{config-985d77d0.js → config-dba24e25.js} +7 -1
  5. package/dist/cjs/{index-b47380e3.js → index-daae8cee.js} +1 -1
  6. package/dist/cjs/index.cjs.js +4 -4
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{notification-7af436af.js → notification-1948ed2f.js} +1 -1
  9. package/dist/cjs/realtimekit-ui.cjs.js +1 -1
  10. package/dist/cjs/rtk-ai-toggle.cjs.entry.js +2 -2
  11. package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +2 -2
  12. package/dist/cjs/rtk-ai.cjs.entry.js +2 -2
  13. package/dist/cjs/rtk-audio-grid.cjs.entry.js +2 -2
  14. package/dist/cjs/rtk-audio-tile.cjs.entry.js +2 -2
  15. package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +3 -3
  16. package/dist/cjs/rtk-avatar_54.cjs.entry.js +29 -19
  17. package/dist/cjs/rtk-breakout-rooms-toggle.cjs.entry.js +2 -2
  18. package/dist/cjs/rtk-camera-selector_2.cjs.entry.js +4 -4
  19. package/dist/cjs/rtk-camera-toggle.cjs.entry.js +2 -2
  20. package/dist/cjs/rtk-caption-toggle.cjs.entry.js +2 -2
  21. package/dist/cjs/rtk-channel-selector-ui.cjs.entry.js +4 -4
  22. package/dist/cjs/rtk-chat-composer-ui.cjs.entry.js +3 -3
  23. package/dist/cjs/rtk-chat-selector-ui.cjs.entry.js +3 -3
  24. package/dist/cjs/rtk-chat-toggle.cjs.entry.js +3 -3
  25. package/dist/cjs/rtk-clock.cjs.entry.js +7 -6
  26. package/dist/cjs/rtk-controlbar-button.cjs.entry.js +2 -2
  27. package/dist/cjs/rtk-controlbar.cjs.entry.js +2 -2
  28. package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +2 -2
  29. package/dist/cjs/rtk-ended-screen.cjs.entry.js +2 -2
  30. package/dist/cjs/rtk-file-dropzone.cjs.entry.js +2 -2
  31. package/dist/cjs/rtk-fullscreen-toggle.cjs.entry.js +2 -2
  32. package/dist/cjs/rtk-grid-pagination.cjs.entry.js +4 -4
  33. package/dist/cjs/rtk-grid.cjs.entry.js +2 -2
  34. package/dist/cjs/rtk-header.cjs.entry.js +2 -2
  35. package/dist/cjs/rtk-idle-screen.cjs.entry.js +2 -2
  36. package/dist/cjs/rtk-image-viewer.cjs.entry.js +2 -2
  37. package/dist/cjs/rtk-information-tooltip.cjs.entry.js +2 -2
  38. package/dist/cjs/rtk-leave-button.cjs.entry.js +2 -2
  39. package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +6 -6
  40. package/dist/cjs/rtk-livestream-toggle.cjs.entry.js +2 -2
  41. package/dist/cjs/rtk-meeting-title.cjs.entry.js +5 -5
  42. package/dist/cjs/rtk-message-list-view.cjs.entry.js +2 -2
  43. package/dist/cjs/rtk-mic-toggle.cjs.entry.js +2 -2
  44. package/dist/cjs/rtk-mixed-grid.cjs.entry.js +2 -2
  45. package/dist/cjs/rtk-more-toggle.cjs.entry.js +2 -2
  46. package/dist/cjs/rtk-mute-all-button.cjs.entry.js +2 -2
  47. package/dist/cjs/rtk-name-tag.cjs.entry.js +2 -2
  48. package/dist/cjs/rtk-network-indicator.cjs.entry.js +2 -2
  49. package/dist/cjs/rtk-participant-count.cjs.entry.js +4 -4
  50. package/dist/cjs/rtk-participant-setup.cjs.entry.js +4 -4
  51. package/dist/cjs/rtk-participant_2.cjs.entry.js +4 -4
  52. package/dist/cjs/rtk-participants-audio.cjs.entry.js +3 -3
  53. package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +3 -3
  54. package/dist/cjs/rtk-participants-toggle.cjs.entry.js +3 -3
  55. package/dist/cjs/rtk-participants.cjs.entry.js +2 -2
  56. package/dist/cjs/rtk-pip-toggle.cjs.entry.js +2 -2
  57. package/dist/cjs/rtk-plugin-main_2.cjs.entry.js +2 -2
  58. package/dist/cjs/rtk-plugins-toggle.cjs.entry.js +3 -3
  59. package/dist/cjs/rtk-plugins_2.cjs.entry.js +6 -6
  60. package/dist/cjs/rtk-poll_2.cjs.entry.js +5 -5
  61. package/dist/cjs/rtk-polls-toggle.cjs.entry.js +3 -3
  62. package/dist/cjs/rtk-recording-indicator.cjs.entry.js +4 -4
  63. package/dist/cjs/rtk-recording-toggle.cjs.entry.js +2 -2
  64. package/dist/cjs/rtk-screen-share-toggle.cjs.entry.js +2 -2
  65. package/dist/cjs/rtk-screenshare-view.cjs.entry.js +7 -7
  66. package/dist/cjs/rtk-settings-audio_2.cjs.entry.js +2 -2
  67. package/dist/cjs/rtk-settings-toggle.cjs.entry.js +3 -3
  68. package/dist/cjs/rtk-settings.cjs.entry.js +2 -2
  69. package/dist/cjs/rtk-setup-screen.cjs.entry.js +4 -4
  70. package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +2 -2
  71. package/dist/cjs/rtk-sidebar.cjs.entry.js +3 -3
  72. package/dist/cjs/rtk-simple-grid.cjs.entry.js +3 -3
  73. package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +4 -4
  74. package/dist/cjs/rtk-spotlight-indicator.cjs.entry.js +2 -2
  75. package/dist/cjs/rtk-stage-toggle.cjs.entry.js +2 -2
  76. package/dist/cjs/rtk-stage.cjs.entry.js +3 -3
  77. package/dist/cjs/rtk-transcript.cjs.entry.js +3 -3
  78. package/dist/cjs/rtk-transcripts.cjs.entry.js +2 -2
  79. package/dist/cjs/rtk-ui-provider.cjs.entry.js +3 -3
  80. package/dist/cjs/rtk-waiting-screen.cjs.entry.js +3 -3
  81. package/dist/cjs/{sidebar-023f63fc.js → sidebar-a3c87828.js} +1 -1
  82. package/dist/cjs/{ui-store-1d132800.js → ui-store-3ddce955.js} +6 -0
  83. package/dist/collection/components/rtk-clock/rtk-clock.css +5 -4
  84. package/dist/collection/components/rtk-clock/rtk-clock.js +4 -3
  85. package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.css +5 -9
  86. package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.js +1 -1
  87. package/dist/collection/components/rtk-livestream-indicator/rtk-livestream-indicator.css +5 -0
  88. package/dist/collection/components/rtk-livestream-indicator/rtk-livestream-indicator.js +1 -1
  89. package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.css +5 -2
  90. package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.js +2 -2
  91. package/dist/collection/components/rtk-notification/rtk-notification.css +26 -18
  92. package/dist/collection/components/rtk-notification/rtk-notification.js +34 -4
  93. package/dist/collection/components/rtk-notifications/rtk-notifications.js +4 -2
  94. package/dist/collection/components/rtk-overlay-modal/rtk-overlay-modal.js +1 -1
  95. package/dist/collection/components/rtk-participant-count/rtk-participant-count.css +5 -4
  96. package/dist/collection/components/rtk-participant-count/rtk-participant-count.js +1 -1
  97. package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.js +2 -2
  98. package/dist/collection/components/rtk-participant-tile/rtk-participant-tile.js +2 -2
  99. package/dist/collection/components/rtk-participants-audio/rtk-participants-audio.js +1 -1
  100. package/dist/collection/components/rtk-participants-stage-list/rtk-participants-stage-list.js +1 -1
  101. package/dist/collection/components/rtk-permissions-message/rtk-permissions-message.js +1 -1
  102. package/dist/collection/components/rtk-plugins/rtk-plugins.js +1 -1
  103. package/dist/collection/components/rtk-poll/rtk-poll.js +1 -1
  104. package/dist/collection/components/rtk-poll-form/rtk-poll-form.js +2 -2
  105. package/dist/collection/components/rtk-polls/rtk-polls.js +3 -3
  106. package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.css +5 -2
  107. package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.js +1 -1
  108. package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +5 -5
  109. package/dist/collection/components/rtk-settings-toggle/rtk-settings-toggle.js +1 -1
  110. package/dist/collection/components/rtk-setup-screen/rtk-setup-screen.js +2 -2
  111. package/dist/collection/components/rtk-simple-grid/rtk-simple-grid.js +1 -1
  112. package/dist/collection/components/rtk-spinner/rtk-spinner.js +1 -1
  113. package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +2 -2
  114. package/dist/collection/components/rtk-stage/rtk-stage.js +1 -1
  115. package/dist/collection/components/rtk-switch/rtk-switch.js +1 -1
  116. package/dist/collection/components/rtk-text-composer-view/rtk-text-composer-view.js +1 -1
  117. package/dist/collection/components/rtk-text-message/rtk-text-message.js +2 -2
  118. package/dist/collection/components/rtk-text-message-view/rtk-text-message-view.js +1 -1
  119. package/dist/collection/components/rtk-transcript/rtk-transcript.js +1 -1
  120. package/dist/collection/components/rtk-ui-provider/rtk-ui-provider.js +1 -1
  121. package/dist/collection/components/rtk-viewer-count/rtk-viewer-count.css +5 -4
  122. package/dist/collection/components/rtk-viewer-count/rtk-viewer-count.js +1 -1
  123. package/dist/collection/components/rtk-virtualized-list/rtk-virtualized-participant-list.js +2 -2
  124. package/dist/collection/components/rtk-waiting-screen/rtk-waiting-screen.js +1 -1
  125. package/dist/collection/lib/default-ui-config.js +6 -0
  126. package/dist/collection/utils/config.js +6 -0
  127. package/dist/components/index.js +5 -5
  128. package/dist/components/{p-65afebd3.js → p-0a9d8224.js} +4 -4
  129. package/dist/components/{p-cb4940e9.js → p-0c4a1808.js} +12 -12
  130. package/dist/components/{p-5c7262b7.js → p-0c94b402.js} +14 -14
  131. package/dist/components/{p-e114de57.js → p-0ea515b2.js} +4 -4
  132. package/dist/components/{p-d55da893.js → p-0eab3933.js} +5 -5
  133. package/dist/components/{p-8db0a4da.js → p-10182034.js} +2 -2
  134. package/dist/components/{p-793ed5cb.js → p-10759cad.js} +2 -2
  135. package/dist/components/{p-40ad6638.js → p-135d5d2f.js} +3 -3
  136. package/dist/components/{p-ddc286c8.js → p-175b365f.js} +3 -3
  137. package/dist/components/{p-b40adc00.js → p-1a546cf4.js} +10 -8
  138. package/dist/components/{p-9977f17c.js → p-24e9b37b.js} +7 -7
  139. package/dist/components/{p-129cc75c.js → p-24ffce5a.js} +2 -2
  140. package/dist/components/{p-61d7cfae.js → p-25770e4e.js} +25 -25
  141. package/dist/components/{p-a9b1e3dd.js → p-260b86da.js} +6 -6
  142. package/dist/components/{p-df6f544a.js → p-28f65402.js} +9 -9
  143. package/dist/components/{p-94417a57.js → p-2ecf028f.js} +4 -4
  144. package/dist/components/{p-456299a7.js → p-2f2fb96d.js} +1 -1
  145. package/dist/components/{p-2973e211.js → p-31a1dc4d.js} +2 -2
  146. package/dist/components/{p-c921dfb0.js → p-31ce3b90.js} +2 -2
  147. package/dist/components/{p-b99df227.js → p-32d788e7.js} +3 -3
  148. package/dist/components/{p-3b2f5ba8.js → p-35d6211b.js} +4 -4
  149. package/dist/components/{p-ec0d1a77.js → p-3d845f44.js} +3 -3
  150. package/dist/components/{p-2e04d08a.js → p-406292be.js} +4 -4
  151. package/dist/components/{p-95c03709.js → p-4096426e.js} +5 -5
  152. package/dist/components/{p-94d33473.js → p-4608147b.js} +5 -5
  153. package/dist/components/{p-7b48ba5a.js → p-46690510.js} +2 -2
  154. package/dist/components/{p-7ef7b528.js → p-4880c342.js} +14 -14
  155. package/dist/components/{p-b2771f98.js → p-4a436e2d.js} +7 -1
  156. package/dist/components/{p-56f3354e.js → p-4cc0e9a5.js} +1 -1
  157. package/dist/components/{p-0083965b.js → p-4cedc9e8.js} +2 -2
  158. package/dist/components/{p-ea04d205.js → p-4e3d7f9d.js} +3 -3
  159. package/dist/components/{p-6234f3c4.js → p-50ecaaf1.js} +1 -1
  160. package/dist/components/{p-c4f19df7.js → p-55598b38.js} +3 -3
  161. package/dist/components/{p-10a05286.js → p-563bc723.js} +10 -10
  162. package/dist/components/{p-083710da.js → p-59ea0ce1.js} +4 -4
  163. package/dist/components/{p-d0306d37.js → p-59fb6900.js} +5 -5
  164. package/dist/components/{p-6cada312.js → p-5ffcbba3.js} +2 -2
  165. package/dist/components/{p-00c52995.js → p-606ca241.js} +6 -6
  166. package/dist/components/{p-15c3dd0e.js → p-62a6b783.js} +2 -2
  167. package/dist/components/{p-929d11f5.js → p-68b6f23b.js} +5 -5
  168. package/dist/components/{p-9e617955.js → p-6acaa07e.js} +4 -4
  169. package/dist/components/{p-3819cd85.js → p-71e0f6f2.js} +4 -4
  170. package/dist/components/{p-45386cf3.js → p-734a10e4.js} +4 -4
  171. package/dist/components/{p-281e2d8b.js → p-7a7d1710.js} +6 -6
  172. package/dist/components/{p-1f182a69.js → p-80bef3b5.js} +5 -5
  173. package/dist/components/{p-531aad34.js → p-81f4e985.js} +4 -4
  174. package/dist/components/{p-0536e520.js → p-898da6ae.js} +14 -14
  175. package/dist/components/{p-8720d374.js → p-922f201f.js} +5 -5
  176. package/dist/components/{p-90dc317b.js → p-935b5e0f.js} +5 -5
  177. package/dist/components/{p-c4bae3c7.js → p-965a4bd9.js} +4 -4
  178. package/dist/components/{p-40528bcd.js → p-9c17c7ce.js} +4 -4
  179. package/dist/components/{p-74c4573e.js → p-9cace38c.js} +6 -6
  180. package/dist/components/{p-ea4ce54a.js → p-9cfe5c7c.js} +5 -5
  181. package/dist/components/{p-56ceecc0.js → p-9da5b9d0.js} +6 -6
  182. package/dist/components/{p-f7a87f51.js → p-a24309fd.js} +4 -4
  183. package/dist/components/{p-02d2b0fd.js → p-a41e1b94.js} +3 -3
  184. package/dist/components/{p-164424cd.js → p-aa9ee9a5.js} +7 -7
  185. package/dist/components/{p-27988e7d.js → p-ab87c5be.js} +6 -6
  186. package/dist/components/{p-df65f9e5.js → p-ae239151.js} +2 -2
  187. package/dist/components/{p-f894e365.js → p-b12e5011.js} +5 -5
  188. package/dist/components/{p-d64c69c2.js → p-b3537ccc.js} +4 -4
  189. package/dist/components/{p-a9598bcb.js → p-b373da43.js} +8 -8
  190. package/dist/components/{p-96dc9653.js → p-b39c779d.js} +4 -4
  191. package/dist/components/{p-168b17a0.js → p-bcb91396.js} +1 -1
  192. package/dist/components/{p-f27b3e2b.js → p-bd9a0ef8.js} +4 -4
  193. package/dist/components/{p-ecf5520f.js → p-c11b2f37.js} +1 -1
  194. package/dist/components/{p-b05351e6.js → p-c2723ebb.js} +12 -12
  195. package/dist/components/{p-8d377d94.js → p-c27c353f.js} +5 -5
  196. package/dist/components/{p-79e3eeee.js → p-c7dcb441.js} +2 -2
  197. package/dist/components/{p-e897d0cb.js → p-c939f92d.js} +8 -8
  198. package/dist/components/{p-15594b6b.js → p-d5791958.js} +1 -1
  199. package/dist/components/{p-f6f7191a.js → p-ddf6148a.js} +8 -8
  200. package/dist/components/{p-5d748ac6.js → p-e2b78972.js} +4 -4
  201. package/dist/components/{p-dcd9f0d2.js → p-e3b59650.js} +1 -1
  202. package/dist/components/{p-5dd6a99e.js → p-e3ffbf6c.js} +5 -5
  203. package/dist/components/{p-0a514f3f.js → p-e4241aa9.js} +7 -7
  204. package/dist/components/{p-0ecdf806.js → p-e4376670.js} +8 -8
  205. package/dist/components/{p-1e5c8aa3.js → p-e542eda6.js} +7 -7
  206. package/dist/components/{p-9fe29f26.js → p-e6d09c50.js} +6 -0
  207. package/dist/components/{p-6d518dc3.js → p-eb10c563.js} +10 -10
  208. package/dist/components/{p-3237d36e.js → p-eca2ab2e.js} +53 -53
  209. package/dist/components/p-ece96324.js +107 -0
  210. package/dist/components/{p-be1b951d.js → p-ef376a73.js} +5 -5
  211. package/dist/components/{p-789d49ad.js → p-f0dfdfea.js} +4 -4
  212. package/dist/components/{p-d27979d5.js → p-f33bb583.js} +10 -10
  213. package/dist/components/{p-41c73a61.js → p-f6046472.js} +5 -5
  214. package/dist/components/{p-f9546c57.js → p-fe278fba.js} +3 -3
  215. package/dist/components/rtk-ai-toggle.js +5 -5
  216. package/dist/components/rtk-ai-transcriptions.js +1 -1
  217. package/dist/components/rtk-ai.js +5 -5
  218. package/dist/components/rtk-audio-grid.js +2 -2
  219. package/dist/components/rtk-audio-tile.js +6 -6
  220. package/dist/components/rtk-audio-visualizer.js +1 -1
  221. package/dist/components/rtk-avatar.js +1 -1
  222. package/dist/components/rtk-breakout-room-manager.js +1 -1
  223. package/dist/components/rtk-breakout-room-participants.js +1 -1
  224. package/dist/components/rtk-breakout-rooms-manager.js +1 -1
  225. package/dist/components/rtk-breakout-rooms-toggle.js +5 -5
  226. package/dist/components/rtk-broadcast-message-modal.js +1 -1
  227. package/dist/components/rtk-button.js +1 -1
  228. package/dist/components/rtk-camera-selector.js +1 -1
  229. package/dist/components/rtk-camera-toggle.js +6 -6
  230. package/dist/components/rtk-caption-toggle.js +5 -5
  231. package/dist/components/rtk-channel-creator.js +1 -1
  232. package/dist/components/rtk-channel-details.js +1 -1
  233. package/dist/components/rtk-channel-header.js +1 -1
  234. package/dist/components/rtk-channel-selector-ui.js +6 -6
  235. package/dist/components/rtk-channel-selector-view.js +1 -1
  236. package/dist/components/rtk-chat-composer-ui.js +8 -8
  237. package/dist/components/rtk-chat-composer-view.js +1 -1
  238. package/dist/components/rtk-chat-message.js +1 -1
  239. package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
  240. package/dist/components/rtk-chat-messages-ui.js +1 -1
  241. package/dist/components/rtk-chat-search-results.js +1 -1
  242. package/dist/components/rtk-chat-selector-ui.js +3 -3
  243. package/dist/components/rtk-chat-toggle.js +6 -6
  244. package/dist/components/rtk-chat.js +1 -1
  245. package/dist/components/rtk-clock.js +8 -7
  246. package/dist/components/rtk-confirmation-modal.js +1 -1
  247. package/dist/components/rtk-controlbar-button.js +1 -1
  248. package/dist/components/rtk-controlbar.js +2 -2
  249. package/dist/components/rtk-counter.js +1 -1
  250. package/dist/components/rtk-debugger-audio.js +1 -1
  251. package/dist/components/rtk-debugger-screenshare.js +1 -1
  252. package/dist/components/rtk-debugger-system.js +1 -1
  253. package/dist/components/rtk-debugger-toggle.js +5 -5
  254. package/dist/components/rtk-debugger-video.js +1 -1
  255. package/dist/components/rtk-debugger.js +1 -1
  256. package/dist/components/rtk-dialog-manager.js +1 -1
  257. package/dist/components/rtk-dialog.js +1 -1
  258. package/dist/components/rtk-draft-attachment-view.js +1 -1
  259. package/dist/components/rtk-emoji-picker-button.js +1 -1
  260. package/dist/components/rtk-emoji-picker.js +1 -1
  261. package/dist/components/rtk-ended-screen.js +4 -4
  262. package/dist/components/rtk-file-dropzone.js +3 -3
  263. package/dist/components/rtk-file-message-view.js +1 -1
  264. package/dist/components/rtk-file-message.js +1 -1
  265. package/dist/components/rtk-file-picker-button.js +1 -1
  266. package/dist/components/rtk-fullscreen-toggle.js +1 -1
  267. package/dist/components/rtk-grid-pagination.js +7 -7
  268. package/dist/components/rtk-grid.js +10 -10
  269. package/dist/components/rtk-header.js +2 -2
  270. package/dist/components/rtk-icon.js +1 -1
  271. package/dist/components/rtk-idle-screen.js +5 -5
  272. package/dist/components/rtk-image-message-view.js +1 -1
  273. package/dist/components/rtk-image-message.js +1 -1
  274. package/dist/components/rtk-image-viewer.js +4 -4
  275. package/dist/components/rtk-information-tooltip.js +3 -3
  276. package/dist/components/rtk-join-stage.js +1 -1
  277. package/dist/components/rtk-leave-button.js +5 -5
  278. package/dist/components/rtk-leave-meeting.js +1 -1
  279. package/dist/components/rtk-livestream-indicator.js +1 -1
  280. package/dist/components/rtk-livestream-player.js +1 -1
  281. package/dist/components/rtk-livestream-toggle.js +5 -5
  282. package/dist/components/rtk-logo.js +1 -1
  283. package/dist/components/rtk-meeting-title.js +6 -6
  284. package/dist/components/rtk-meeting.js +55 -55
  285. package/dist/components/rtk-menu-item.js +1 -1
  286. package/dist/components/rtk-menu-list.js +1 -1
  287. package/dist/components/rtk-menu.js +1 -1
  288. package/dist/components/rtk-message-list-view.js +4 -4
  289. package/dist/components/rtk-message-view.js +1 -1
  290. package/dist/components/rtk-mic-toggle.js +6 -6
  291. package/dist/components/rtk-microphone-selector.js +1 -1
  292. package/dist/components/rtk-mixed-grid.js +8 -8
  293. package/dist/components/rtk-more-toggle.js +5 -5
  294. package/dist/components/rtk-mute-all-button.js +6 -6
  295. package/dist/components/rtk-mute-all-confirmation.js +1 -1
  296. package/dist/components/rtk-name-tag.js +1 -1
  297. package/dist/components/rtk-network-indicator.js +3 -3
  298. package/dist/components/rtk-notification.js +1 -1
  299. package/dist/components/rtk-notifications.js +1 -1
  300. package/dist/components/rtk-overlay-modal.js +1 -1
  301. package/dist/components/rtk-paginated-list.js +1 -1
  302. package/dist/components/rtk-participant-count.js +5 -5
  303. package/dist/components/rtk-participant-setup.js +4 -4
  304. package/dist/components/rtk-participant-tile.js +1 -1
  305. package/dist/components/rtk-participant.js +1 -1
  306. package/dist/components/rtk-participants-audio.js +6 -6
  307. package/dist/components/rtk-participants-stage-list.js +1 -1
  308. package/dist/components/rtk-participants-stage-queue.js +1 -1
  309. package/dist/components/rtk-participants-toggle.js +6 -6
  310. package/dist/components/rtk-participants-viewer-list.js +1 -1
  311. package/dist/components/rtk-participants-waiting-list.js +1 -1
  312. package/dist/components/rtk-participants.js +16 -16
  313. package/dist/components/rtk-permissions-message.js +1 -1
  314. package/dist/components/rtk-pip-toggle.js +5 -5
  315. package/dist/components/rtk-plugin-main.js +1 -1
  316. package/dist/components/rtk-plugins-toggle.js +6 -6
  317. package/dist/components/rtk-plugins.js +1 -1
  318. package/dist/components/rtk-poll-form.js +1 -1
  319. package/dist/components/rtk-poll.js +1 -1
  320. package/dist/components/rtk-polls-toggle.js +6 -6
  321. package/dist/components/rtk-polls.js +1 -1
  322. package/dist/components/rtk-recording-indicator.js +5 -5
  323. package/dist/components/rtk-recording-toggle.js +5 -5
  324. package/dist/components/rtk-screen-share-toggle.js +6 -6
  325. package/dist/components/rtk-screenshare-view.js +10 -10
  326. package/dist/components/rtk-settings-audio.js +1 -1
  327. package/dist/components/rtk-settings-toggle.js +6 -6
  328. package/dist/components/rtk-settings-video.js +1 -1
  329. package/dist/components/rtk-settings.js +12 -12
  330. package/dist/components/rtk-setup-screen.js +10 -10
  331. package/dist/components/rtk-sidebar-ui.js +1 -1
  332. package/dist/components/rtk-sidebar.js +11 -11
  333. package/dist/components/rtk-simple-grid.js +3 -3
  334. package/dist/components/rtk-speaker-selector.js +1 -1
  335. package/dist/components/rtk-spinner.js +1 -1
  336. package/dist/components/rtk-spotlight-grid.js +4 -4
  337. package/dist/components/rtk-spotlight-indicator.js +1 -1
  338. package/dist/components/rtk-stage-toggle.js +6 -6
  339. package/dist/components/rtk-stage.js +3 -3
  340. package/dist/components/rtk-switch.js +1 -1
  341. package/dist/components/rtk-tab-bar.js +1 -1
  342. package/dist/components/rtk-text-composer-view.js +1 -1
  343. package/dist/components/rtk-text-message-view.js +1 -1
  344. package/dist/components/rtk-text-message.js +1 -1
  345. package/dist/components/rtk-tooltip.js +1 -1
  346. package/dist/components/rtk-transcript.js +1 -1
  347. package/dist/components/rtk-transcripts.js +3 -3
  348. package/dist/components/rtk-ui-provider.js +3 -3
  349. package/dist/components/rtk-viewer-count.js +1 -1
  350. package/dist/components/rtk-virtualized-participant-list.js +1 -1
  351. package/dist/components/rtk-waiting-screen.js +4 -4
  352. package/dist/docs/docs-components.json +24 -1
  353. package/dist/docs/docs-vscode.json +4 -0
  354. package/dist/esm/{TextMessage-de672e39.js → TextMessage-efd224db.js} +1 -1
  355. package/dist/esm/{chat-e970cf90.js → chat-c25836b0.js} +1 -1
  356. package/dist/esm/{config-d4ed799b.js → config-1ca1ba30.js} +7 -1
  357. package/dist/esm/{index-d0112c6b.js → index-6aaa85ca.js} +1 -1
  358. package/dist/esm/index.js +6 -6
  359. package/dist/esm/loader.js +85 -62
  360. package/dist/esm/{notification-b7669c56.js → notification-800f2bcd.js} +1 -1
  361. package/dist/esm/realtimekit-ui.js +1 -1
  362. package/dist/esm/rtk-ai-toggle.entry.js +2 -2
  363. package/dist/esm/rtk-ai-transcriptions.entry.js +2 -2
  364. package/dist/esm/rtk-ai.entry.js +2 -2
  365. package/dist/esm/rtk-audio-grid.entry.js +2 -2
  366. package/dist/esm/rtk-audio-tile.entry.js +2 -2
  367. package/dist/esm/rtk-audio-visualizer_4.entry.js +3 -3
  368. package/dist/esm/rtk-avatar_54.entry.js +29 -19
  369. package/dist/esm/rtk-breakout-rooms-toggle.entry.js +2 -2
  370. package/dist/esm/rtk-camera-selector_2.entry.js +4 -4
  371. package/dist/esm/rtk-camera-toggle.entry.js +2 -2
  372. package/dist/esm/rtk-caption-toggle.entry.js +2 -2
  373. package/dist/esm/rtk-channel-selector-ui.entry.js +4 -4
  374. package/dist/esm/rtk-chat-composer-ui.entry.js +3 -3
  375. package/dist/esm/rtk-chat-selector-ui.entry.js +3 -3
  376. package/dist/esm/rtk-chat-toggle.entry.js +3 -3
  377. package/dist/esm/rtk-clock.entry.js +7 -6
  378. package/dist/esm/rtk-controlbar-button.entry.js +2 -2
  379. package/dist/esm/rtk-controlbar.entry.js +2 -2
  380. package/dist/esm/rtk-debugger-toggle.entry.js +2 -2
  381. package/dist/esm/rtk-ended-screen.entry.js +2 -2
  382. package/dist/esm/rtk-file-dropzone.entry.js +2 -2
  383. package/dist/esm/rtk-fullscreen-toggle.entry.js +2 -2
  384. package/dist/esm/rtk-grid-pagination.entry.js +4 -4
  385. package/dist/esm/rtk-grid.entry.js +2 -2
  386. package/dist/esm/rtk-header.entry.js +2 -2
  387. package/dist/esm/rtk-idle-screen.entry.js +2 -2
  388. package/dist/esm/rtk-image-viewer.entry.js +2 -2
  389. package/dist/esm/rtk-information-tooltip.entry.js +2 -2
  390. package/dist/esm/rtk-leave-button.entry.js +2 -2
  391. package/dist/esm/rtk-livestream-indicator_3.entry.js +6 -6
  392. package/dist/esm/rtk-livestream-toggle.entry.js +2 -2
  393. package/dist/esm/rtk-meeting-title.entry.js +5 -5
  394. package/dist/esm/rtk-message-list-view.entry.js +2 -2
  395. package/dist/esm/rtk-mic-toggle.entry.js +2 -2
  396. package/dist/esm/rtk-mixed-grid.entry.js +2 -2
  397. package/dist/esm/rtk-more-toggle.entry.js +2 -2
  398. package/dist/esm/rtk-mute-all-button.entry.js +2 -2
  399. package/dist/esm/rtk-name-tag.entry.js +2 -2
  400. package/dist/esm/rtk-network-indicator.entry.js +2 -2
  401. package/dist/esm/rtk-participant-count.entry.js +4 -4
  402. package/dist/esm/rtk-participant-setup.entry.js +4 -4
  403. package/dist/esm/rtk-participant_2.entry.js +4 -4
  404. package/dist/esm/rtk-participants-audio.entry.js +3 -3
  405. package/dist/esm/rtk-participants-stage-list_4.entry.js +3 -3
  406. package/dist/esm/rtk-participants-toggle.entry.js +3 -3
  407. package/dist/esm/rtk-participants.entry.js +2 -2
  408. package/dist/esm/rtk-pip-toggle.entry.js +2 -2
  409. package/dist/esm/rtk-plugin-main_2.entry.js +2 -2
  410. package/dist/esm/rtk-plugins-toggle.entry.js +3 -3
  411. package/dist/esm/rtk-plugins_2.entry.js +6 -6
  412. package/dist/esm/rtk-poll_2.entry.js +5 -5
  413. package/dist/esm/rtk-polls-toggle.entry.js +3 -3
  414. package/dist/esm/rtk-recording-indicator.entry.js +4 -4
  415. package/dist/esm/rtk-recording-toggle.entry.js +2 -2
  416. package/dist/esm/rtk-screen-share-toggle.entry.js +2 -2
  417. package/dist/esm/rtk-screenshare-view.entry.js +7 -7
  418. package/dist/esm/rtk-settings-audio_2.entry.js +2 -2
  419. package/dist/esm/rtk-settings-toggle.entry.js +3 -3
  420. package/dist/esm/rtk-settings.entry.js +2 -2
  421. package/dist/esm/rtk-setup-screen.entry.js +4 -4
  422. package/dist/esm/rtk-sidebar-ui.entry.js +2 -2
  423. package/dist/esm/rtk-sidebar.entry.js +3 -3
  424. package/dist/esm/rtk-simple-grid.entry.js +3 -3
  425. package/dist/esm/rtk-spotlight-grid.entry.js +4 -4
  426. package/dist/esm/rtk-spotlight-indicator.entry.js +2 -2
  427. package/dist/esm/rtk-stage-toggle.entry.js +2 -2
  428. package/dist/esm/rtk-stage.entry.js +3 -3
  429. package/dist/esm/rtk-transcript.entry.js +3 -3
  430. package/dist/esm/rtk-transcripts.entry.js +2 -2
  431. package/dist/esm/rtk-ui-provider.entry.js +3 -3
  432. package/dist/esm/rtk-waiting-screen.entry.js +3 -3
  433. package/dist/esm/{sidebar-8b5e88e0.js → sidebar-cafaa8d3.js} +1 -1
  434. package/dist/esm/{ui-store-0f6095db.js → ui-store-b453cdf2.js} +6 -0
  435. package/dist/realtimekit-ui/index.esm.js +1 -1
  436. package/dist/realtimekit-ui/{p-2c575cd8.entry.js → p-01f5aba6.entry.js} +1 -1
  437. package/dist/realtimekit-ui/{p-7c147408.entry.js → p-03a04390.entry.js} +1 -1
  438. package/dist/realtimekit-ui/{p-b5e01d07.entry.js → p-050f0b1f.entry.js} +1 -1
  439. package/dist/realtimekit-ui/{p-570a7910.entry.js → p-0a1d9e02.entry.js} +1 -1
  440. package/dist/realtimekit-ui/{p-1c0358f4.entry.js → p-0d4db84d.entry.js} +1 -1
  441. package/dist/realtimekit-ui/{p-73d6823a.entry.js → p-0e777b3f.entry.js} +1 -1
  442. package/dist/realtimekit-ui/{p-7ea7c01d.entry.js → p-131b1e94.entry.js} +1 -1
  443. package/dist/realtimekit-ui/{p-a7bed91d.entry.js → p-139da463.entry.js} +1 -1
  444. package/dist/realtimekit-ui/{p-612e7cfa.entry.js → p-18fdb6bb.entry.js} +1 -1
  445. package/dist/realtimekit-ui/{p-06d64de4.entry.js → p-235b7aa8.entry.js} +1 -1
  446. package/dist/realtimekit-ui/{p-2776bf3b.entry.js → p-238a19f8.entry.js} +1 -1
  447. package/dist/realtimekit-ui/{p-7352c128.entry.js → p-29802710.entry.js} +1 -1
  448. package/dist/realtimekit-ui/p-2aa242f4.js +1 -0
  449. package/dist/realtimekit-ui/p-2bfa32da.entry.js +1 -0
  450. package/dist/realtimekit-ui/{p-1f94b76a.entry.js → p-3ed1c004.entry.js} +1 -1
  451. package/dist/realtimekit-ui/{p-1c87e187.entry.js → p-3fd79328.entry.js} +1 -1
  452. package/dist/realtimekit-ui/{p-d1225160.entry.js → p-42a64cbb.entry.js} +1 -1
  453. package/dist/realtimekit-ui/{p-acab6548.entry.js → p-44915a3b.entry.js} +1 -1
  454. package/dist/realtimekit-ui/p-457a0412.entry.js +1 -0
  455. package/dist/realtimekit-ui/{p-0f27bd13.js → p-4b882b41.js} +1 -1
  456. package/dist/realtimekit-ui/{p-21f1348d.entry.js → p-4d8ab9a5.entry.js} +1 -1
  457. package/dist/realtimekit-ui/{p-ba05218f.entry.js → p-4f2ec64b.entry.js} +1 -1
  458. package/dist/realtimekit-ui/{p-bb563d65.entry.js → p-4f45e362.entry.js} +1 -1
  459. package/dist/realtimekit-ui/{p-288e8b44.entry.js → p-4ff47eb0.entry.js} +1 -1
  460. package/dist/realtimekit-ui/{p-12f2bd64.entry.js → p-5325b5e5.entry.js} +1 -1
  461. package/dist/realtimekit-ui/{p-38136f6d.entry.js → p-55040827.entry.js} +1 -1
  462. package/dist/realtimekit-ui/{p-18284fd7.entry.js → p-55503b00.entry.js} +1 -1
  463. package/dist/realtimekit-ui/{p-4e85f3b7.entry.js → p-556db3a1.entry.js} +1 -1
  464. package/dist/realtimekit-ui/{p-acf5b77f.entry.js → p-560c3d93.entry.js} +1 -1
  465. package/dist/realtimekit-ui/{p-bf8ee4dc.entry.js → p-5b15e3cf.entry.js} +1 -1
  466. package/dist/realtimekit-ui/{p-8c6e8627.entry.js → p-61c38e05.entry.js} +1 -1
  467. package/dist/realtimekit-ui/{p-a3df14dd.entry.js → p-621a7265.entry.js} +1 -1
  468. package/dist/realtimekit-ui/{p-dd28e235.entry.js → p-679bd218.entry.js} +1 -1
  469. package/dist/realtimekit-ui/{p-d8ef9c71.entry.js → p-6be9be47.entry.js} +1 -1
  470. package/dist/realtimekit-ui/p-6c238609.entry.js +1 -0
  471. package/dist/realtimekit-ui/{p-eef2d66b.js → p-6ededa68.js} +1 -1
  472. package/dist/realtimekit-ui/{p-3020ebef.entry.js → p-73bc3abd.entry.js} +1 -1
  473. package/dist/realtimekit-ui/{p-7ef6ba98.entry.js → p-7536cb87.entry.js} +1 -1
  474. package/dist/realtimekit-ui/{p-4c0282cf.entry.js → p-7c1a2584.entry.js} +1 -1
  475. package/dist/realtimekit-ui/{p-60bd5711.entry.js → p-7dbd2a25.entry.js} +1 -1
  476. package/dist/realtimekit-ui/{p-cc349e60.entry.js → p-807dd186.entry.js} +1 -1
  477. package/dist/realtimekit-ui/{p-dafa21f4.entry.js → p-85ff4a34.entry.js} +1 -1
  478. package/dist/realtimekit-ui/p-89f6a08a.entry.js +1 -0
  479. package/dist/realtimekit-ui/p-8fe6b03c.entry.js +1 -0
  480. package/dist/realtimekit-ui/{p-99f0d02d.entry.js → p-917f2951.entry.js} +1 -1
  481. package/dist/realtimekit-ui/{p-efd16e73.entry.js → p-93f881e2.entry.js} +1 -1
  482. package/dist/realtimekit-ui/{p-fe993d97.entry.js → p-9435f236.entry.js} +1 -1
  483. package/dist/realtimekit-ui/{p-193e4084.entry.js → p-94b739b4.entry.js} +1 -1
  484. package/dist/realtimekit-ui/{p-580a9089.entry.js → p-950454b7.entry.js} +1 -1
  485. package/dist/realtimekit-ui/{p-d2e08aa3.entry.js → p-9946b484.entry.js} +1 -1
  486. package/dist/realtimekit-ui/p-9bbe1d7c.entry.js +1 -0
  487. package/dist/realtimekit-ui/{p-83d064c4.entry.js → p-9ff45356.entry.js} +1 -1
  488. package/dist/realtimekit-ui/{p-91555d3d.entry.js → p-a5d22edf.entry.js} +1 -1
  489. package/dist/realtimekit-ui/p-a6f03681.entry.js +1 -0
  490. package/dist/realtimekit-ui/p-a738a7b3.entry.js +1 -0
  491. package/dist/realtimekit-ui/{p-9a30eb32.js → p-aaba206b.js} +1 -1
  492. package/dist/realtimekit-ui/{p-8f4aa500.entry.js → p-ac91f9f9.entry.js} +1 -1
  493. package/dist/realtimekit-ui/{p-14697cc8.entry.js → p-affaaf1a.entry.js} +1 -1
  494. package/dist/realtimekit-ui/{p-f14df538.entry.js → p-b14563cb.entry.js} +1 -1
  495. package/dist/realtimekit-ui/{p-15979e9d.js → p-b16cee89.js} +1 -1
  496. package/dist/realtimekit-ui/{p-77c89c11.entry.js → p-b62f9abb.entry.js} +1 -1
  497. package/dist/realtimekit-ui/{p-5b40b871.entry.js → p-b80f1bed.entry.js} +1 -1
  498. package/dist/realtimekit-ui/{p-526d3453.entry.js → p-bc17c582.entry.js} +1 -1
  499. package/dist/realtimekit-ui/{p-002a2c69.entry.js → p-bf56688f.entry.js} +1 -1
  500. package/dist/realtimekit-ui/{p-aae30d94.entry.js → p-c6f7cd03.entry.js} +1 -1
  501. package/dist/realtimekit-ui/{p-3acd31e4.entry.js → p-c8f8b690.entry.js} +1 -1
  502. package/dist/realtimekit-ui/{p-65cd7711.entry.js → p-d013442a.entry.js} +1 -1
  503. package/dist/realtimekit-ui/{p-fa90fbe2.entry.js → p-d075d673.entry.js} +1 -1
  504. package/dist/realtimekit-ui/p-d77f7f22.entry.js +1 -0
  505. package/dist/realtimekit-ui/{p-bed5abea.entry.js → p-d9217d24.entry.js} +1 -1
  506. package/dist/realtimekit-ui/p-d9e81b11.entry.js +1 -0
  507. package/dist/realtimekit-ui/p-dbb95589.entry.js +1 -0
  508. package/dist/realtimekit-ui/{p-28d56c8d.entry.js → p-e13b5128.entry.js} +1 -1
  509. package/dist/realtimekit-ui/{p-39c6795d.entry.js → p-e171b1c4.entry.js} +1 -1
  510. package/dist/realtimekit-ui/{p-8e4d1601.entry.js → p-e80cf367.entry.js} +1 -1
  511. package/dist/realtimekit-ui/p-ee167b96.js +1 -0
  512. package/dist/realtimekit-ui/{p-801bdf55.entry.js → p-f7c6931d.entry.js} +1 -1
  513. package/dist/realtimekit-ui/{p-523d7f94.js → p-fc36f92c.js} +1 -1
  514. package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
  515. package/dist/types/components/rtk-notification/rtk-notification.d.ts +4 -0
  516. package/dist/types/components/rtk-notifications/rtk-notifications.d.ts +1 -0
  517. package/dist/types/components.d.ts +8 -0
  518. package/package.json +1 -1
  519. package/dist/components/p-2cfccf90.js +0 -96
  520. package/dist/realtimekit-ui/p-150c1647.entry.js +0 -1
  521. package/dist/realtimekit-ui/p-1b792ded.entry.js +0 -1
  522. package/dist/realtimekit-ui/p-2698a644.entry.js +0 -1
  523. package/dist/realtimekit-ui/p-424c9c68.entry.js +0 -1
  524. package/dist/realtimekit-ui/p-76d7fd68.entry.js +0 -1
  525. package/dist/realtimekit-ui/p-a1278d45.js +0 -1
  526. package/dist/realtimekit-ui/p-ae00b85e.entry.js +0 -1
  527. package/dist/realtimekit-ui/p-b3f93f40.entry.js +0 -1
  528. package/dist/realtimekit-ui/p-b4a51176.entry.js +0 -1
  529. package/dist/realtimekit-ui/p-b9281511.js +0 -1
  530. package/dist/realtimekit-ui/p-be75700c.entry.js +0 -1
  531. package/dist/realtimekit-ui/p-ddc1d2af.entry.js +0 -1
  532. package/dist/realtimekit-ui/p-f1a12dce.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as a,h as r,H as e}from"./p-0ee570cd.js";import{d as i,a as s,c as o}from"./p-b9281511.js";import{S as c}from"./p-a1278d45.js";import{d as n}from"./p-a08b5a59.js";import"./p-2c3cda13.js";var p=function(t,a,r,e){var i,s=arguments.length,o=s<3?a:null===e?e=Object.getOwnPropertyDescriptor(a,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,a,r,e);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(o=(s<3?i(o):s>3?i(a,r,o):i(a,r))||o);return s>3&&o&&Object.defineProperty(a,r,o),o};const d=class{constructor(e){t(this,e),this.stateUpdate=a(this,"rtkStateUpdate",7),this.config=i,this.iconPack=s,this.defaultParticipantsTabId="stage-list",this.t=o(),this.currentParticipantsTabId=this.defaultParticipantsTabId,this.tabs=[],this.hasRequests=!1,this.search="",this.updateParticipantCountsInTabs=n((()=>{var t;let a=(null===(t=this.meeting.participants.waitlisted)||void 0===t?void 0:t.size)||0,e=0,i=0;this.meeting.participants.joined.toArray().forEach((t=>{"ON_STAGE"===t.stageStatus&&e++,"OFF_STAGE"===t.stageStatus&&i++,"REQUESTED_TO_JOIN_STAGE"===t.stageStatus&&(a++,i++),"ACCEPTED_TO_JOIN_STAGE"===t.stageStatus&&i++})),"ON_STAGE"===this.meeting.self.stageStatus&&e++,"OFF_STAGE"===this.meeting.self.stageStatus&&i++,"REQUESTED_TO_JOIN_STAGE"===this.meeting.self.stageStatus&&(a++,i++),"ACCEPTED_TO_JOIN_STAGE"===this.meeting.self.stageStatus&&i++;const s=[];this.shouldShowRequestsTab()&&s.push({id:"requests",name:r("span",null,this.t("requests")," ",r("span",{class:`tab-participant-count-badge ${a>0?"requests-pending":""} ${"requests"===this.currentParticipantsTabId?"selected-tab":""}`},a))}),s.push({id:"stage-list",name:r("span",null,this.t("participants")," ",r("span",{class:"tab-participant-count-badge "+("stage-list"===this.currentParticipantsTabId?"selected-tab":"")},e))}),this.shouldShowViewersTab()&&s.push({id:"viewer-list",name:r("span",null,this.t("viewers")," ",r("span",{class:"tab-participant-count-badge "+("viewer-list"===this.currentParticipantsTabId?"selected-tab":"")},i))}),this.tabs=s,this.hasRequests=a>0})),this.onSearchInput=t=>{this.search=t.target.value},this.shouldShowViewersTab=()=>{var t,a,r;return null===(r=null===(a=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===a?void 0:a.permissions)||void 0===r?void 0:r.stageEnabled},this.shouldShowRequestsTab=()=>{var t;let a=!1;return a="LIVESTREAM"!==this.meeting.meta.viewType&&(null===(t=this.meeting.self.config.waitingRoom)||void 0===t?void 0:t.isEnabled)&&this.meeting.self.permissions.acceptWaitingRequests,this.meeting.self.permissions.stageEnabled&&this.meeting.self.permissions.acceptStageRequests||a},this.viewSection=t=>{this.currentParticipantsTabId=t}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){null!=this.meeting&&(this.meeting.participants.joined.off("participantJoined",this.updateParticipantCountsInTabs),this.meeting.participants.joined.off("participantsUpdate",this.updateParticipantCountsInTabs),this.meeting.participants.joined.off("participantLeft",this.updateParticipantCountsInTabs),this.meeting.participants.joined.off("stageStatusUpdate",this.updateParticipantCountsInTabs),this.meeting.stage.off("stageStatusUpdate",this.updateParticipantCountsInTabs),this.meeting.participants.waitlisted.off("participantJoined",this.updateParticipantCountsInTabs),this.meeting.participants.waitlisted.off("participantLeft",this.updateParticipantCountsInTabs),this.meeting.participants.waitlisted.off("stageStatusUpdate",this.updateParticipantCountsInTabs))}meetingChanged(t){null!=t&&(t.participants.joined.on("participantJoined",this.updateParticipantCountsInTabs),t.participants.joined.on("participantsUpdate",this.updateParticipantCountsInTabs),t.participants.joined.on("participantLeft",this.updateParticipantCountsInTabs),t.participants.joined.on("stageStatusUpdate",this.updateParticipantCountsInTabs),t.stage.on("stageStatusUpdate",this.updateParticipantCountsInTabs),t.participants.waitlisted.on("participantJoined",this.updateParticipantCountsInTabs),t.participants.waitlisted.on("participantLeft",this.updateParticipantCountsInTabs),t.participants.waitlisted.on("stageStatusUpdate",this.updateParticipantCountsInTabs),this.updateParticipantCountsInTabs())}currentParticipantsTabIdChanged(){this.stateUpdate.emit({participantsTabId:this.currentParticipantsTabId}),this.updateParticipantCountsInTabs()}render(){const t={meeting:this.meeting,states:this.states,config:this.config,size:this.size,iconPack:this.iconPack,t:this.t};return r(e,{key:"9957561cf7ae9a0a28d62bce7102dbb6145aaeda"},r("div",{key:"5960602654c8d993afc99ce22582514d1438182b",class:"search",part:"search"},r("rtk-icon",{key:"cc94e5fd1e5540b893f2bdb5b4ad4e3563d37424",icon:this.iconPack.search,part:"search-icon"}),r("input",{key:"c0a723db1be4d4a8c91907f24078678561a9bfb9",type:"search",autocomplete:"off",placeholder:this.t("search"),onInput:this.onSearchInput,part:"search-input"})),r("slot",{key:"7f145408b13056ad7e95b3469dc009ae46e73978",name:"start"}),r("div",{key:"465b74c71cd0239832ef60a0973537c71b394007",class:"ctr scrollbar "+("requests"!==this.currentParticipantsTabId?"virtualised":""),part:"container"},r("rtk-sidebar-ui",{key:"c6395b16482d114f82af07df85faeb1dc2584c4a",tabs:this.tabs,currentTab:this.currentParticipantsTabId,view:"full-screen",hideHeader:!0,hideCloseAction:!0,style:{position:"relative"},onTabChange:t=>{this.viewSection(t.detail),t.stopPropagation()}},(!this.currentParticipantsTabId||"stage-list"===this.currentParticipantsTabId)&&r("div",{key:"20d7a91bed3ea3047614d52ba30c5e832db6fce1",slot:"stage-list",style:{marginTop:"10px",height:"100%"}},r("rtk-participants-stage-list",Object.assign({key:"160ddba969e95e270e1443f11d48d989b4ee8561"},t,{search:this.search,hideHeader:!0}))),"requests"===this.currentParticipantsTabId&&r("div",{key:"52d4eae9480d00972b61c0e2964fcb8fc5498c89",slot:"requests",style:{marginTop:"10px",height:"100%"}},!this.hasRequests&&r("div",{key:"5690208be803224c202d81563be0fae45396dbeb",class:"no-pending-requests"},this.t("participants.no_pending_requests")),r("rtk-participants-stage-queue",Object.assign({key:"db4763d312a191c48279fa25168a1f363f574edc"},t)),r("rtk-participants-waiting-list",Object.assign({key:"f2b4ad3ad303b1c8a5314b5dd55de16c9c168c19"},t))),"viewer-list"===this.currentParticipantsTabId&&r("div",{key:"a262369c69afd77e101ec10934a9d4065590e748",slot:"viewer-list",style:{marginTop:"10px",height:"100%"}},r("rtk-participants-viewer-list",Object.assign({key:"0142b3855f357213ba24260091e5e7d48acb268d"},t,{search:this.search,hideHeader:!0}))))),r("slot",{key:"eae12c410cbe1282da2107420b4d44f66af5dd35",name:"end"}))}static get watchers(){return{meeting:["meetingChanged"],currentParticipantsTabId:["currentParticipantsTabIdChanged"]}}};p([c()],d.prototype,"meeting",void 0),p([c()],d.prototype,"states",void 0),p([c()],d.prototype,"size",void 0),p([c()],d.prototype,"iconPack",void 0),p([c()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;height:100%;width:100%;flex-direction:column;font-size:14px}*{box-sizing:border-box}.ctr{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);box-sizing:border-box;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-0, 0px);padding-bottom:var(--rtk-space-0, 0px);overflow-y:auto;flex-grow:1;flex-basis:0}.ctr.virtualised{overflow-y:hidden}.search{position:sticky;box-sizing:border-box;display:flex;align-items:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));margin-left:var(--rtk-space-3, 12px);margin-right:var(--rtk-space-3, 12px);margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-0, 0px)}.search rtk-icon{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px);color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}.search input{box-sizing:border-box;height:var(--rtk-space-9, 36px);width:100%;padding-right:var(--rtk-space-2, 8px);border-width:var(--rtk-border-width-none, 0);border-style:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));outline:2px solid transparent;outline-offset:2px;border-radius:var(--rtk-border-radius-sm, 4px);font-size:14px}.search input::-moz-placeholder{color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.search input::placeholder{color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}:host([size='md']) .search{margin-top:var(--rtk-space-4, 16px) !important;margin-bottom:var(--rtk-space-4, 16px) !important}:host([size='sm']) .search{margin-top:var(--rtk-space-4, 16px) !important;margin-bottom:var(--rtk-space-4, 16px) !important}.no-pending-requests{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);text-align:center;font-size:12px;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}";export{d as rtk_participants}
1
+ import{r as t,c as a,h as r,H as e}from"./p-0ee570cd.js";import{d as i,a as s,c as o}from"./p-ee167b96.js";import{S as c}from"./p-2aa242f4.js";import{d as n}from"./p-a08b5a59.js";import"./p-2c3cda13.js";var p=function(t,a,r,e){var i,s=arguments.length,o=s<3?a:null===e?e=Object.getOwnPropertyDescriptor(a,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,a,r,e);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(o=(s<3?i(o):s>3?i(a,r,o):i(a,r))||o);return s>3&&o&&Object.defineProperty(a,r,o),o};const d=class{constructor(e){t(this,e),this.stateUpdate=a(this,"rtkStateUpdate",7),this.config=i,this.iconPack=s,this.defaultParticipantsTabId="stage-list",this.t=o(),this.currentParticipantsTabId=this.defaultParticipantsTabId,this.tabs=[],this.hasRequests=!1,this.search="",this.updateParticipantCountsInTabs=n((()=>{var t;let a=(null===(t=this.meeting.participants.waitlisted)||void 0===t?void 0:t.size)||0,e=0,i=0;this.meeting.participants.joined.toArray().forEach((t=>{"ON_STAGE"===t.stageStatus&&e++,"OFF_STAGE"===t.stageStatus&&i++,"REQUESTED_TO_JOIN_STAGE"===t.stageStatus&&(a++,i++),"ACCEPTED_TO_JOIN_STAGE"===t.stageStatus&&i++})),"ON_STAGE"===this.meeting.self.stageStatus&&e++,"OFF_STAGE"===this.meeting.self.stageStatus&&i++,"REQUESTED_TO_JOIN_STAGE"===this.meeting.self.stageStatus&&(a++,i++),"ACCEPTED_TO_JOIN_STAGE"===this.meeting.self.stageStatus&&i++;const s=[];this.shouldShowRequestsTab()&&s.push({id:"requests",name:r("span",null,this.t("requests")," ",r("span",{class:`tab-participant-count-badge ${a>0?"requests-pending":""} ${"requests"===this.currentParticipantsTabId?"selected-tab":""}`},a))}),s.push({id:"stage-list",name:r("span",null,this.t("participants")," ",r("span",{class:"tab-participant-count-badge "+("stage-list"===this.currentParticipantsTabId?"selected-tab":"")},e))}),this.shouldShowViewersTab()&&s.push({id:"viewer-list",name:r("span",null,this.t("viewers")," ",r("span",{class:"tab-participant-count-badge "+("viewer-list"===this.currentParticipantsTabId?"selected-tab":"")},i))}),this.tabs=s,this.hasRequests=a>0})),this.onSearchInput=t=>{this.search=t.target.value},this.shouldShowViewersTab=()=>{var t,a,r;return null===(r=null===(a=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===a?void 0:a.permissions)||void 0===r?void 0:r.stageEnabled},this.shouldShowRequestsTab=()=>{var t;let a=!1;return a="LIVESTREAM"!==this.meeting.meta.viewType&&(null===(t=this.meeting.self.config.waitingRoom)||void 0===t?void 0:t.isEnabled)&&this.meeting.self.permissions.acceptWaitingRequests,this.meeting.self.permissions.stageEnabled&&this.meeting.self.permissions.acceptStageRequests||a},this.viewSection=t=>{this.currentParticipantsTabId=t}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){null!=this.meeting&&(this.meeting.participants.joined.off("participantJoined",this.updateParticipantCountsInTabs),this.meeting.participants.joined.off("participantsUpdate",this.updateParticipantCountsInTabs),this.meeting.participants.joined.off("participantLeft",this.updateParticipantCountsInTabs),this.meeting.participants.joined.off("stageStatusUpdate",this.updateParticipantCountsInTabs),this.meeting.stage.off("stageStatusUpdate",this.updateParticipantCountsInTabs),this.meeting.participants.waitlisted.off("participantJoined",this.updateParticipantCountsInTabs),this.meeting.participants.waitlisted.off("participantLeft",this.updateParticipantCountsInTabs),this.meeting.participants.waitlisted.off("stageStatusUpdate",this.updateParticipantCountsInTabs))}meetingChanged(t){null!=t&&(t.participants.joined.on("participantJoined",this.updateParticipantCountsInTabs),t.participants.joined.on("participantsUpdate",this.updateParticipantCountsInTabs),t.participants.joined.on("participantLeft",this.updateParticipantCountsInTabs),t.participants.joined.on("stageStatusUpdate",this.updateParticipantCountsInTabs),t.stage.on("stageStatusUpdate",this.updateParticipantCountsInTabs),t.participants.waitlisted.on("participantJoined",this.updateParticipantCountsInTabs),t.participants.waitlisted.on("participantLeft",this.updateParticipantCountsInTabs),t.participants.waitlisted.on("stageStatusUpdate",this.updateParticipantCountsInTabs),this.updateParticipantCountsInTabs())}currentParticipantsTabIdChanged(){this.stateUpdate.emit({participantsTabId:this.currentParticipantsTabId}),this.updateParticipantCountsInTabs()}render(){const t={meeting:this.meeting,states:this.states,config:this.config,size:this.size,iconPack:this.iconPack,t:this.t};return r(e,{key:"9957561cf7ae9a0a28d62bce7102dbb6145aaeda"},r("div",{key:"5960602654c8d993afc99ce22582514d1438182b",class:"search",part:"search"},r("rtk-icon",{key:"cc94e5fd1e5540b893f2bdb5b4ad4e3563d37424",icon:this.iconPack.search,part:"search-icon"}),r("input",{key:"c0a723db1be4d4a8c91907f24078678561a9bfb9",type:"search",autocomplete:"off",placeholder:this.t("search"),onInput:this.onSearchInput,part:"search-input"})),r("slot",{key:"7f145408b13056ad7e95b3469dc009ae46e73978",name:"start"}),r("div",{key:"465b74c71cd0239832ef60a0973537c71b394007",class:"ctr scrollbar "+("requests"!==this.currentParticipantsTabId?"virtualised":""),part:"container"},r("rtk-sidebar-ui",{key:"c6395b16482d114f82af07df85faeb1dc2584c4a",tabs:this.tabs,currentTab:this.currentParticipantsTabId,view:"full-screen",hideHeader:!0,hideCloseAction:!0,style:{position:"relative"},onTabChange:t=>{this.viewSection(t.detail),t.stopPropagation()}},(!this.currentParticipantsTabId||"stage-list"===this.currentParticipantsTabId)&&r("div",{key:"20d7a91bed3ea3047614d52ba30c5e832db6fce1",slot:"stage-list",style:{marginTop:"10px",height:"100%"}},r("rtk-participants-stage-list",Object.assign({key:"160ddba969e95e270e1443f11d48d989b4ee8561"},t,{search:this.search,hideHeader:!0}))),"requests"===this.currentParticipantsTabId&&r("div",{key:"52d4eae9480d00972b61c0e2964fcb8fc5498c89",slot:"requests",style:{marginTop:"10px",height:"100%"}},!this.hasRequests&&r("div",{key:"5690208be803224c202d81563be0fae45396dbeb",class:"no-pending-requests"},this.t("participants.no_pending_requests")),r("rtk-participants-stage-queue",Object.assign({key:"db4763d312a191c48279fa25168a1f363f574edc"},t)),r("rtk-participants-waiting-list",Object.assign({key:"f2b4ad3ad303b1c8a5314b5dd55de16c9c168c19"},t))),"viewer-list"===this.currentParticipantsTabId&&r("div",{key:"a262369c69afd77e101ec10934a9d4065590e748",slot:"viewer-list",style:{marginTop:"10px",height:"100%"}},r("rtk-participants-viewer-list",Object.assign({key:"0142b3855f357213ba24260091e5e7d48acb268d"},t,{search:this.search,hideHeader:!0}))))),r("slot",{key:"eae12c410cbe1282da2107420b4d44f66af5dd35",name:"end"}))}static get watchers(){return{meeting:["meetingChanged"],currentParticipantsTabId:["currentParticipantsTabIdChanged"]}}};p([c()],d.prototype,"meeting",void 0),p([c()],d.prototype,"states",void 0),p([c()],d.prototype,"size",void 0),p([c()],d.prototype,"iconPack",void 0),p([c()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;height:100%;width:100%;flex-direction:column;font-size:14px}*{box-sizing:border-box}.ctr{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);box-sizing:border-box;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-0, 0px);padding-bottom:var(--rtk-space-0, 0px);overflow-y:auto;flex-grow:1;flex-basis:0}.ctr.virtualised{overflow-y:hidden}.search{position:sticky;box-sizing:border-box;display:flex;align-items:center;border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));margin-left:var(--rtk-space-3, 12px);margin-right:var(--rtk-space-3, 12px);margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-0, 0px)}.search rtk-icon{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px);color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}.search input{box-sizing:border-box;height:var(--rtk-space-9, 36px);width:100%;padding-right:var(--rtk-space-2, 8px);border-width:var(--rtk-border-width-none, 0);border-style:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255));outline:2px solid transparent;outline-offset:2px;border-radius:var(--rtk-border-radius-sm, 4px);font-size:14px}.search input::-moz-placeholder{color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}.search input::placeholder{color:rgb(var(--rtk-colors-text-800, 255 255 255 / 0.76))}:host([size='md']) .search{margin-top:var(--rtk-space-4, 16px) !important;margin-bottom:var(--rtk-space-4, 16px) !important}:host([size='sm']) .search{margin-top:var(--rtk-space-4, 16px) !important;margin-bottom:var(--rtk-space-4, 16px) !important}.no-pending-requests{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);text-align:center;font-size:12px;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}";export{d as rtk_participants}
@@ -0,0 +1 @@
1
+ import{a as n}from"./p-0ee570cd.js";import{m as t,n as o,u as s}from"./p-ee167b96.js";function c(){return function(c,i){const{connectedCallback:e,disconnectedCallback:r}=c;c.connectedCallback=function(){const o=n(this);return o[i]||(o[i]=s.state[i],t(i,o)),null==e?void 0:e.call(this)},c.disconnectedCallback=function(){return o(i,n(this)),null==r?void 0:r.call(this)}}}export{c as S}
@@ -0,0 +1 @@
1
+ import{r as t,h as i,H as e}from"./p-0ee570cd.js";import{c as a,a as r}from"./p-ee167b96.js";import{S as n}from"./p-2aa242f4.js";var s=function(t,i,e,a){var r,n=arguments.length,s=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,a);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(s=(n<3?r(s):n>3?r(i,e,s):r(i,e))||s);return n>3&&s&&Object.defineProperty(i,e,s),s};const c=class{constructor(i){t(this,i),this.t=a(),this.iconPack=r,this.setIsRecording=t=>{this.isRecording="RECORDING"===t}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null===(t=this.meeting)||void 0===t||t.recording.removeListener("recordingUpdate",this.updateRecordingStatus)}meetingChanged(t){null!=t&&(this.setIsRecording(t.recording.recordingState),this.updateRecordingStatus=t=>{this.setIsRecording(t)},t.recording.addListener("recordingUpdate",this.updateRecordingStatus))}render(){return i(e,{key:"3919ce20c5524d477536f62b9dd5abe8c1d49c37","data-hidden":!this.isRecording},this.isRecording&&i("div",{key:"c482fdc00ff90f8ae2841f8d469f3b54704b6615",class:"indicator","aria-label":this.t("recording.indicator"),part:"indicator"},i("rtk-icon",{key:"75663e533fe47c5ad2e5d55db5d8a027fc12220c",icon:this.iconPack.recording,"aria-hidden":!0,tabIndex:-1,part:"icon"}),i("span",{key:"99d4cc0c9ce7388808b643b0bcce27883d2b4643"},this.t("recording.label"))))}static get watchers(){return{meeting:["meetingChanged"]}}};s([n()],c.prototype,"meeting",void 0),s([n()],c.prototype,"size",void 0),s([n()],c.prototype,"t",void 0),s([n()],c.prototype,"iconPack",void 0),c.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}:host([data-hidden]){display:none}:host[size='sm']{margin-left:var(--rtk-space-1, 4px);margin-right:var(--rtk-space-1, 4px)}.indicator{display:flex;flex-direction:row;align-items:center;font-size:14px;--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}rtk-icon{margin-right:var(--rtk-space-1, 4px);height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px);animation:blink 4s linear infinite}:host([size='sm']) rtk-icon{height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px)}:host([size='sm']) .indicator span{display:none}@keyframes blink{0%,10%{opacity:0}11%,100%{opacity:1}}";export{c as rtk_recording_indicator}
@@ -1 +1 @@
1
- import{r as t,h as r,H as o}from"./p-0ee570cd.js";import{a}from"./p-b9281511.js";import{S as i}from"./p-a1278d45.js";var e=function(t,r,o,a){var i,e=arguments.length,n=e<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,o,a);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(n=(e<3?i(n):e>3?i(r,o,n):i(r,o))||n);return e>3&&n&&Object.defineProperty(r,o,n),n};const n=class{constructor(r){t(this,r),this.variant="button",this.showWarning=!1,this.disabled=!1,this.iconPack=a,this.brandIcon=!1}render(){return r(o,{key:"9a1150fd8a0fbd0022f33f325e7413d0670d0820"},r("button",{key:"0fabd8a63a8013e1630dd3838f0c2f1378f423f7","aria-label":this.label,part:"button"},this.isLoading?r("rtk-spinner",{id:"icon",part:"spinner",iconPack:this.iconPack}):r("rtk-icon",{id:"icon",icon:this.icon,tabIndex:-1,"aria-hidden":!0,part:"icon"}),r("span",{key:"117f1bff41fb719a832ef89d000b2abef6f1388a",class:"label",part:"label"},this.label),this.showWarning&&r("rtk-icon",{key:"4d8b9170c833a930e013613089755ec768df0695",id:"warning-indicator",icon:this.iconPack.warning,part:"warning-indicator"})))}static get delegatesFocus(){return!0}};e([i()],n.prototype,"size",void 0),e([i()],n.prototype,"iconPack",void 0),n.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{--background-color:var(\n --rtk-controlbar-button-background-color,\n rgb(var(--rtk-colors-background-1000, 8 8 8))\n );--icon-size:var(--rtk-controlbar-button-icon-size, var(--rtk-space-7, 28px));position:relative;box-sizing:border-box;display:inline-flex;height:100%;width:auto;min-width:var(--rtk-space-20, 80px);-webkit-user-select:none;-moz-user-select:none;user-select:none;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgb(var(--rtk-colors-text-1000, 255 255 255));background-color:var(--background-color)}button{padding:var(--rtk-space-1, 4px)}:host(.red-icon) #icon{--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}:host([disabled]){color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}button{box-sizing:border-box;display:inline-flex;height:100%;width:100%;flex:1 1 0%;flex-direction:column;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-1, 4px);padding-right:var(--rtk-space-1, 4px);align-items:center;justify-content:center;cursor:pointer;border-radius:var(--rtk-border-radius-md, 8px);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;color:inherit;outline-offset:-2px;border:var(--rtk-border-width-md, 2px) solid transparent}.label{text-align:center;font-size:12px;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}#warning-indicator{position:absolute;top:var(--rtk-space-1, 4px);right:var(--rtk-space-2, 8px);height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);--tw-text-opacity:1;color:rgba(var(--rtk-colors-warning, 255 205 7) / var(--tw-text-opacity))}:host([size='sm']) #warning-indicator{right:var(--rtk-space-0, 0px);top:var(--rtk-space-0, 0px);height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px)}:host(:hover) button{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}#icon{width:var(--icon-size);height:var(--icon-size)}:host(.leave:hover) button{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity));border:var(--rtk-border-width-md, 2px) solid rgb(var(--rtk-colors-danger, 255 45 45))}:host(.active) button{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-400, 53 110 253) / var(--tw-text-opacity));border:var(--rtk-border-width-md, 2px) solid rgb(var(--rtk-colors-brand-400, 53 110 253))}button:focus-visible{outline:2px solid rgb(var(--rtk-colors-brand-400, 53 110 253))}:host(.active-livestream){--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}:host([size='sm']){min-width:var(--rtk-space-14, 56px)}:host([size='sm']) .label{display:none}:host([variant='horizontal']){width:100%}:host([variant='horizontal']) button{border-radius:7px;height:var(--rtk-space-12, 48px);width:100%;padding-left:var(--rtk-space-5, 20px);padding-right:var(--rtk-space-5, 20px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);flex-direction:row;justify-content:flex-start;gap:var(--rtk-space-3, 12px)}:host([variant='horizontal']) #icon{width:var(--rtk-space-6, 24px)}:host([variant='horizontal']) .label{display:block;font-size:14px;line-height:1.25rem}:host([variant='horizontal']) #warning-indicator{right:auto;left:var(--rtk-space-4, 16px)}:host([brand-icon]) rtk-icon#icon{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}@media only screen and (max-device-height: 480px) and (orientation: landscape){:host .label{display:none}:slotted(rtk-icon){height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px)}}";export{n as rtk_controlbar_button}
1
+ import{r as t,h as r,H as o}from"./p-0ee570cd.js";import{a}from"./p-ee167b96.js";import{S as i}from"./p-2aa242f4.js";var e=function(t,r,o,a){var i,e=arguments.length,n=e<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,r,o,a);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(n=(e<3?i(n):e>3?i(r,o,n):i(r,o))||n);return e>3&&n&&Object.defineProperty(r,o,n),n};const n=class{constructor(r){t(this,r),this.variant="button",this.showWarning=!1,this.disabled=!1,this.iconPack=a,this.brandIcon=!1}render(){return r(o,{key:"9a1150fd8a0fbd0022f33f325e7413d0670d0820"},r("button",{key:"0fabd8a63a8013e1630dd3838f0c2f1378f423f7","aria-label":this.label,part:"button"},this.isLoading?r("rtk-spinner",{id:"icon",part:"spinner",iconPack:this.iconPack}):r("rtk-icon",{id:"icon",icon:this.icon,tabIndex:-1,"aria-hidden":!0,part:"icon"}),r("span",{key:"117f1bff41fb719a832ef89d000b2abef6f1388a",class:"label",part:"label"},this.label),this.showWarning&&r("rtk-icon",{key:"4d8b9170c833a930e013613089755ec768df0695",id:"warning-indicator",icon:this.iconPack.warning,part:"warning-indicator"})))}static get delegatesFocus(){return!0}};e([i()],n.prototype,"size",void 0),e([i()],n.prototype,"iconPack",void 0),n.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{--background-color:var(\n --rtk-controlbar-button-background-color,\n rgb(var(--rtk-colors-background-1000, 8 8 8))\n );--icon-size:var(--rtk-controlbar-button-icon-size, var(--rtk-space-7, 28px));position:relative;box-sizing:border-box;display:inline-flex;height:100%;width:auto;min-width:var(--rtk-space-20, 80px);-webkit-user-select:none;-moz-user-select:none;user-select:none;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;color:rgb(var(--rtk-colors-text-1000, 255 255 255));background-color:var(--background-color)}button{padding:var(--rtk-space-1, 4px)}:host(.red-icon) #icon{--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}:host([disabled]){color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52))}button{box-sizing:border-box;display:inline-flex;height:100%;width:100%;flex:1 1 0%;flex-direction:column;gap:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-1, 4px);padding-right:var(--rtk-space-1, 4px);align-items:center;justify-content:center;cursor:pointer;border-radius:var(--rtk-border-radius-md, 8px);border-width:var(--rtk-border-width-none, 0);border-style:none;background-color:transparent;color:inherit;outline-offset:-2px;border:var(--rtk-border-width-md, 2px) solid transparent}.label{text-align:center;font-size:12px;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}#warning-indicator{position:absolute;top:var(--rtk-space-1, 4px);right:var(--rtk-space-2, 8px);height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);--tw-text-opacity:1;color:rgba(var(--rtk-colors-warning, 255 205 7) / var(--tw-text-opacity))}:host([size='sm']) #warning-indicator{right:var(--rtk-space-0, 0px);top:var(--rtk-space-0, 0px);height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px)}:host(:hover) button{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}#icon{width:var(--icon-size);height:var(--icon-size)}:host(.leave:hover) button{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity));border:var(--rtk-border-width-md, 2px) solid rgb(var(--rtk-colors-danger, 255 45 45))}:host(.active) button{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-400, 53 110 253) / var(--tw-text-opacity));border:var(--rtk-border-width-md, 2px) solid rgb(var(--rtk-colors-brand-400, 53 110 253))}button:focus-visible{outline:2px solid rgb(var(--rtk-colors-brand-400, 53 110 253))}:host(.active-livestream){--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}:host([size='sm']){min-width:var(--rtk-space-14, 56px)}:host([size='sm']) .label{display:none}:host([variant='horizontal']){width:100%}:host([variant='horizontal']) button{border-radius:7px;height:var(--rtk-space-12, 48px);width:100%;padding-left:var(--rtk-space-5, 20px);padding-right:var(--rtk-space-5, 20px);padding-top:var(--rtk-space-3, 12px);padding-bottom:var(--rtk-space-3, 12px);flex-direction:row;justify-content:flex-start;gap:var(--rtk-space-3, 12px)}:host([variant='horizontal']) #icon{width:var(--rtk-space-6, 24px)}:host([variant='horizontal']) .label{display:block;font-size:14px;line-height:1.25rem}:host([variant='horizontal']) #warning-indicator{right:auto;left:var(--rtk-space-4, 16px)}:host([brand-icon]) rtk-icon#icon{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}@media only screen and (max-device-height: 480px) and (orientation: landscape){:host .label{display:none}:slotted(rtk-icon){height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px)}}";export{n as rtk_controlbar_button}
@@ -1 +1 @@
1
- import{r as t,c as r,w as e,h as a,H as i}from"./p-0ee570cd.js";import{a as s,c as o,k as c}from"./p-b9281511.js";import{r as n,h as d,k as l,j as h,s as p,M as b}from"./p-9a30eb32.js";import{S as k}from"./p-a1278d45.js";var v=function(t,r,e,a){var i,s=arguments.length,o=s<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,r,e,a);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(o=(s<3?i(o):s>3?i(r,e,o):i(r,e))||o);return s>3&&o&&Object.defineProperty(r,e,o),o};const g="@",f=class{constructor(i){t(this,i),this.onNewMessage=r(this,"rtkNewMessage",7),this.onEditMessage=r(this,"rtkEditMessage",7),this.onEditCancelled=r(this,"rtkEditCancelled",7),this.canSendTextMessage=!1,this.canSendFiles=!1,this.iconPack=s,this.t=o(),this.disableEmojiPicker=!1,this.prefill={},this.members=[],this.emojiPickerActive=!1,this.mentionQuery="",this.focusedMemberIndex=0,this.filePreview=null,this.fileReader=new FileReader,this.fileToUpload=null,this.handleKeyDown=t=>{if(t.key===g&&[void 0," "].includes(this.$textArea.value.at(-1))&&(this.mentionQuery=g),"ArrowDown"===t.key&&(this.focusedMemberIndex=Math.min(this.focusedMemberIndex+1,this.getFilteredMembers().length-1)),"ArrowUp"===t.key&&(this.focusedMemberIndex=Math.max(0,this.focusedMemberIndex-1)),("Escape"===t.key||"Backspace"===t.key&&this.mentionQuery===g)&&(this.mentionQuery=""),["Enter","Tab"," "].includes(t.key)&&""!==this.mentionQuery){const r=this.getFilteredMembers()[this.focusedMemberIndex];return this.onMemberSelect(r),void t.preventDefault()}"Enter"===t.key&&t.shiftKey?this.$textArea.clientHeight<200&&(this.$textArea.style.height=this.$textArea.clientHeight+20+"px"):"Enter"===t.key?(t.preventDefault(),this.prefill.editMessage?this.handleEditMessage():this.handleSendMessage()):"Backspace"===t.key&&(this.$textArea.value.endsWith("\n")?this.$textArea.style.height=this.$textArea.clientHeight-20+"px":""===this.$textArea.value&&(this.$textArea.style.height="auto"))},this.handleKeyUp=()=>{if(""!==this.mentionQuery){const t=n(this.$textArea.value.trim()),r=t.substring(0,t.indexOf(g));this.mentionQuery=`${g}${n(r)}`}},this.onPaste=t=>{const r=t.clipboardData||t.originalEvent.clipboardData;e((()=>{r&&r.items&&r.items.length>0&&(d(r.items,this.generateFilePreview),this.$textArea.value="")}))},this.generateFilePreview=(t,r)=>{this.fileToUpload={type:t,image:r,file:r},"image"===t?this.fileReader.readAsDataURL(r):"file"===t&&(this.filePreview=r.name)},this.sendFile=()=>{this.canSendFiles&&(this.onNewMessage.emit("image"===this.fileToUpload.type?{type:"image",file:this.fileToUpload.image,image:this.fileToUpload.image}:{type:"file",file:this.fileToUpload.file}),this.cleanUpFileUpload())},this.handleSendMessage=()=>{if(!this.canSendTextMessage)return;if(null!==this.fileToUpload)return void this.sendFile();const t=this.$textArea.value.trim();t.length>0&&(this.onNewMessage.emit(this.prefill.replyMessage?{type:"text",message:t,replyTo:this.prefill.replyMessage}:{type:"text",message:t}),this.cleanup())},this.cleanup=()=>{this.mentionQuery="",this.focusedMemberIndex=0,this.$textArea.value="",this.$textArea.style.height="auto",c.setItem(this.storageKey,"")},this.handleEditMessage=()=>{var t;let r=this.$textArea.value.trim();(null===(t=this.prefill.editMessage)||void 0===t?void 0:t.message)&&l.test(this.prefill.editMessage.message)&&(r=`${h(this.prefill.editMessage.message)}\n\n${r}`),this.onEditMessage.emit({id:this.prefill.editMessage.id,message:r,channelId:this.prefill.editMessage.channelId}),this.cleanup()},this.handleEditCancel=()=>{this.onEditCancelled.emit(),this.cleanup()},this.initializeTextField=t=>{this.$textArea=t;const r=c.getItem(this.storageKey)||"";this.$textArea.value=r},this.onMemberSelect=t=>{const r=n(this.mentionQuery),a=n(this.$textArea.value.trim()).replace(r,"");this.$textArea.value=n(a)+`${g}${t.name} `,this.mentionQuery="",this.focusedMemberIndex=0,e((()=>this.$textArea.focus()))},this.getFilteredMembers=()=>{const t=this.mentionQuery.replace(g,"");return this.members.filter((r=>r.name.toLowerCase().includes(t.toLowerCase())))},this.cleanUpFileUpload=()=>{this.filePreview=null,this.fileToUpload=null},this.renderSuggestedReplies=()=>{if(this.prefill.suggestedReplies&&0!==this.prefill.suggestedReplies.length)return a("ul",{class:"suggested-replies scrollbar"},this.prefill.suggestedReplies.map((t=>a("rtk-tooltip",{label:this.t("chat.click_to_send")},a("li",{onClick:()=>this.onNewMessage.emit({type:"text",message:t})},t)))))},this.renderMenu=()=>{if(0===this.mentionQuery.length)return;const t=this.getFilteredMembers();return 0!==t.length?a("ul",{class:"member-list scrollbar"},t.map(((t,r)=>a("li",{class:{member:!0,selected:r===this.focusedMemberIndex},onClick:()=>this.onMemberSelect(t),ref:t=>{r===this.focusedMemberIndex&&e((()=>{t&&t.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}))}},a("rtk-avatar",{participant:{name:t.name,picture:t.picture},size:"sm"}),a("span",null,t.name))))):void 0}}connectedCallback(){this.fileReader.onload=t=>{"string"==typeof t.target.result&&(this.filePreview=t.target.result)}}onChannelChanged(){this.mentionQuery="",this.focusedMemberIndex=0;const t=c.getItem(this.storageKey)||"";this.$textArea.value=t,this.emojiPickerActive=!1}componentDidRender(){(this.prefill.editMessage||this.prefill.replyMessage)&&e((()=>this.$textArea.focus()))}get storageKey(){return this.channelId?`rtk-text-message-${this.channelId}`:"rtk-text-message"}uploadFile(t){const r=document.createElement("input");r.type="file","image"===t&&(r.accept="image/*"),r.onchange=r=>{const{validity:e,files:[a]}=r.target;e.valid&&this.generateFilePreview(t,a)},r.click()}renderFilePreview(){if("string"==typeof this.filePreview)return a("div",{class:"preview-overlay"},a("div",{class:"file-preview"},a("rtk-tooltip",{label:this.t("chat.cancel_upload")},a("rtk-button",{variant:"secondary",kind:"icon",onClick:this.cleanUpFileUpload},a("rtk-icon",{icon:this.iconPack.dismiss}))),"image"===this.fileToUpload.type?a("img",{class:"preview-image",src:this.filePreview}):a("div",{class:"preview-file"},a("span",null,this.filePreview))))}render(){var t;let r="";return(null===(t=this.prefill.editMessage)||void 0===t?void 0:t.message)&&(r=p(this.prefill.editMessage.message)),a(i,{key:"8f0ee810fac56aa1c62254d3d8a997941475bb3a"},this.canSendTextMessage&&this.emojiPickerActive&&a("rtk-emoji-picker",{key:"368bdbbe0e995aafd13e70d12f62b59979a5691b",part:"emoji-picker",onPickerClose:()=>{this.emojiPickerActive=!1},onRtkEmojiClicked:t=>{this.$textArea.value+=t.detail,this.$textArea.focus()},t:this.t}),this.renderSuggestedReplies(),a("slot",{key:"166872db8c0b07d2ec2e407de0fddfce7f3d4969",name:"chat-addon"}),a("slot",{key:"b383df2de3320e69fe2cb35a22296d1ee53b08df",name:"quote-block"}),a("div",{key:"89d5fdf625bf212acda92276e9ec10b60b55a179",class:"chat-input",part:"chat-input"},this.renderMenu(),this.canSendTextMessage&&a("textarea",{key:"55192f10820a161189d42b6150819be6a346d1e9",class:"scrollbar",part:"textarea",ref:this.initializeTextField,autoFocus:!0,placeholder:this.fileToUpload?"":this.t("chat.message_placeholder"),value:r,onPaste:this.onPaste,maxLength:b,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onInput:t=>{c.setItem(this.storageKey,t.target.value)},disabled:!!this.filePreview}),a("div",{key:"6c3a94c43257041fdeed496c7bd8b57ce4be6510",class:"chat-buttons",part:"chat-buttons"},a("div",{key:"76e6f7923484ee6a58359b6554e5e51009bc317f",class:"left",part:"chat-buttons-left"},!this.prefill.editMessage&&this.canSendFiles&&[a("rtk-tooltip",{key:"dbc04471a85d1fe2987c7d18dd0781e61f85fa35",label:this.t("chat.send_file")},a("rtk-button",{key:"cb54c65b81559d4a00a316aacf2f4bb368f30799",variant:"ghost",kind:"icon",onClick:()=>this.uploadFile("file"),title:this.t("chat.send_file")},a("rtk-icon",{key:"d3c542b0b1260ac305de3cfd5fbf5396f18d1f0e",icon:this.iconPack.attach}))),a("rtk-tooltip",{key:"6aac421a0d9149fd6c188bcce25bf4152cb8c0dd",label:this.t("chat.send_img")},a("rtk-button",{key:"5460407db51e83ab379bb8ade5af7d87bd04b64d",variant:"ghost",kind:"icon",onClick:()=>this.uploadFile("image"),title:this.t("chat.send_img")},a("rtk-icon",{key:"3f8732882dc03b5ddf23c59bdbe96329e551b070",icon:this.iconPack.image})))],!this.prefill.editMessage&&this.canSendTextMessage&&!this.disableEmojiPicker&&a("rtk-tooltip",{key:"8d032069a031d6a3b3e4847953a8e027eb5b3400",label:this.t("chat.send_emoji")},a("rtk-button",{key:"b96b0791ac68f142408f269354bde5385c08a4da",variant:"ghost",kind:"icon",class:{active:this.emojiPickerActive},title:this.t("chat.send_emoji"),onClick:()=>{this.emojiPickerActive=!this.emojiPickerActive}},a("rtk-icon",{key:"cd9ac09500ed1151dad94ed285db35bea6260ed8",icon:this.iconPack.emoji_multiple})))),!!this.filePreview&&this.renderFilePreview(),this.canSendTextMessage&&a("div",{key:"43b9f9232a7476b5600519fb3517d6342143d76f",class:"right",part:"chat-buttons-right"},!this.prefill.editMessage&&a("rtk-tooltip",{key:"ec757e58571a0ff2e4ab9b1006ab388b334a77d3",variant:"primary",label:this.t("chat.send_msg"),delay:2e3},a("rtk-button",{key:"054e7b52bfcfe852ca53ce96c6b498585924e616",kind:"icon",onClick:()=>this.handleSendMessage(),title:this.t("chat.send_msg")},a("rtk-icon",{key:"d085d0aae594a8e08f29d200e4cb0818c0eabdfd",icon:this.iconPack.send}))),this.prefill.editMessage&&a("div",{key:"7926d7cf394a7989d2fbae97c1ab5a974834b431",class:"edit-buttons"},a("rtk-tooltip",{key:"66029024ca595880cc72fdb28999f8380a8a37fc",variant:"secondary",label:this.t("cancel"),delay:2e3},a("rtk-button",{key:"cba0e1460d33a0b20593009acc588ba4e385d782",kind:"icon",variant:"secondary",onClick:()=>this.handleEditCancel(),title:this.t("cancel")},a("rtk-icon",{key:"2155257dea8a5660b6b2d9d9510da153192be16e",icon:this.iconPack.dismiss}))),a("rtk-tooltip",{key:"b296276e6f08c128ec3ba3cc292f6637e3550a34",variant:"primary",label:this.t("chat.update_msg"),delay:2e3},a("rtk-button",{key:"e3c50822510811d254f3e8d65ed967b70be97037",kind:"icon",onClick:()=>this.handleEditMessage(),title:this.t("chat.send_msg")},a("rtk-icon",{key:"016e23547285b95c2545784d627a37fb8c6359d5",icon:this.iconPack.checkmark}))))))))}static get watchers(){return{channelId:["onChannelChanged"]}}};v([k()],f.prototype,"size",void 0),v([k()],f.prototype,"iconPack",void 0),v([k()],f.prototype,"t",void 0),f.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity))}.chat-input{position:relative;margin:var(--rtk-space-2, 8px);z-index:10;box-sizing:border-box;display:flex;flex-direction:column;border-radius:var(--rtk-border-radius-md, 8px);border:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60))}textarea{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));box-sizing:border-box;padding:var(--rtk-space-3, 12px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}textarea::-moz-placeholder{color:rgb(var(--rtk-colors-text-1000, 255 255 255))}textarea::placeholder{color:rgb(var(--rtk-colors-text-1000, 255 255 255))}textarea{border-top-left-radius:var(--rtk-border-radius-md, 8px);border-top-right-radius:var(--rtk-border-radius-md, 8px);font-family:var(--rtk-font-family, sans-serif);outline:2px solid transparent;outline-offset:2px;resize:none;overflow-y:auto;border-width:var(--rtk-border-width-none, 0);border-style:none;min-height:60px;font-size:14px}.chat-buttons{border-bottom-right-radius:var(--rtk-border-radius-md, 8px);border-bottom-left-radius:var(--rtk-border-radius-md, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));display:flex;height:var(--rtk-space-8, 32px);align-items:center;justify-content:space-between;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px)}.chat-buttons .left rtk-button{margin-right:var(--rtk-space-1, 4px)}.chat-buttons .left rtk-button rtk-icon{height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px)}.chat-buttons .right{z-index:10}.chat-buttons .right .edit-buttons{display:flex;gap:var(--rtk-space-2, 8px)}.chat-buttons>div{display:flex;align-items:center}rtk-emoji-picker{z-index:0;position:absolute;bottom:var(--rtk-space-32, 128px);border-top:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));animation:0.3s slide-up ease}@keyframes slide-up{from{transform:translateY(100%)}to{transform:translateY(0%)}}.member-list{margin:var(--rtk-space-0, 0px);margin-top:var(--rtk-space-1, 4px);max-height:var(--rtk-space-28, 112px);min-width:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);padding:var(--rtk-space-0, 0px);position:absolute;bottom:var(--rtk-space-28, 112px);list-style-type:none;overflow-y:auto;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));border-radius:var(--rtk-border-radius-sm, 4px);--tw-border-spacing-x:var(--rtk-space-2, 8px);--tw-border-spacing-y:var(--rtk-space-2, 8px);border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y);border-style:solid;border-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / 0.5)}.member-list .member{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-4, 16px);cursor:pointer}.member-list .member rtk-avatar{flex-shrink:0;height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px);font-size:14px;color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.member-list .member span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-list .member:hover,.member-list .member.selected{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-700, 2 70 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.suggested-replies{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-3, 12px);display:flex;flex-wrap:nowrap;gap:var(--rtk-space-2, 8px);list-style-type:none;overflow-x:auto}.suggested-replies rtk-tooltip{flex-shrink:0}.suggested-replies li{padding:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-md, 8px);background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / 0.75);color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));cursor:pointer}.suggested-replies li:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity))}.preview-overlay{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));border-radius:var(--rtk-border-radius-md, 8px)}.file-preview{position:absolute;top:var(--rtk-space-4, 16px);left:var(--rtk-space-4, 16px);max-width:-moz-fit-content;max-width:fit-content;max-height:var(--rtk-space-20, 80px)}.file-preview:hover rtk-tooltip{display:block}.file-preview rtk-tooltip{position:absolute;top:calc(var(--rtk-space-1, 4px) * -1);left:calc(var(--rtk-space-1, 4px) * -1);display:none;margin-left:calc(var(--rtk-space-1, 4px) * -1);margin-top:calc(var(--rtk-space-1, 4px) * -1)}.file-preview rtk-button{display:flex;height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));border:1px solid rgb(var(--rtk-colors-text-1000, 255 255 255))}.file-preview rtk-icon{height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.preview-image{height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px);-o-object-fit:cover;object-fit:cover;max-height:100%;max-width:100%;overflow:clip;border-radius:var(--rtk-border-radius-md, 8px)}.preview-file{padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:var(--rtk-border-radius-md, 8px);max-width:200px}@keyframes scroll-text{0%{transform:translateX(0%)}70%{transform:translateX(-100%)}80%{transform:translateX(0%)}100%{transform:translateX(0%)}}";export{f as rtk_chat_composer_ui}
1
+ import{r as t,c as r,w as e,h as a,H as i}from"./p-0ee570cd.js";import{a as s,c as o,k as c}from"./p-ee167b96.js";import{r as n,h as d,k as l,j as h,s as p,M as b}from"./p-aaba206b.js";import{S as k}from"./p-2aa242f4.js";var v=function(t,r,e,a){var i,s=arguments.length,o=s<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,r,e,a);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(o=(s<3?i(o):s>3?i(r,e,o):i(r,e))||o);return s>3&&o&&Object.defineProperty(r,e,o),o};const g="@",f=class{constructor(i){t(this,i),this.onNewMessage=r(this,"rtkNewMessage",7),this.onEditMessage=r(this,"rtkEditMessage",7),this.onEditCancelled=r(this,"rtkEditCancelled",7),this.canSendTextMessage=!1,this.canSendFiles=!1,this.iconPack=s,this.t=o(),this.disableEmojiPicker=!1,this.prefill={},this.members=[],this.emojiPickerActive=!1,this.mentionQuery="",this.focusedMemberIndex=0,this.filePreview=null,this.fileReader=new FileReader,this.fileToUpload=null,this.handleKeyDown=t=>{if(t.key===g&&[void 0," "].includes(this.$textArea.value.at(-1))&&(this.mentionQuery=g),"ArrowDown"===t.key&&(this.focusedMemberIndex=Math.min(this.focusedMemberIndex+1,this.getFilteredMembers().length-1)),"ArrowUp"===t.key&&(this.focusedMemberIndex=Math.max(0,this.focusedMemberIndex-1)),("Escape"===t.key||"Backspace"===t.key&&this.mentionQuery===g)&&(this.mentionQuery=""),["Enter","Tab"," "].includes(t.key)&&""!==this.mentionQuery){const r=this.getFilteredMembers()[this.focusedMemberIndex];return this.onMemberSelect(r),void t.preventDefault()}"Enter"===t.key&&t.shiftKey?this.$textArea.clientHeight<200&&(this.$textArea.style.height=this.$textArea.clientHeight+20+"px"):"Enter"===t.key?(t.preventDefault(),this.prefill.editMessage?this.handleEditMessage():this.handleSendMessage()):"Backspace"===t.key&&(this.$textArea.value.endsWith("\n")?this.$textArea.style.height=this.$textArea.clientHeight-20+"px":""===this.$textArea.value&&(this.$textArea.style.height="auto"))},this.handleKeyUp=()=>{if(""!==this.mentionQuery){const t=n(this.$textArea.value.trim()),r=t.substring(0,t.indexOf(g));this.mentionQuery=`${g}${n(r)}`}},this.onPaste=t=>{const r=t.clipboardData||t.originalEvent.clipboardData;e((()=>{r&&r.items&&r.items.length>0&&(d(r.items,this.generateFilePreview),this.$textArea.value="")}))},this.generateFilePreview=(t,r)=>{this.fileToUpload={type:t,image:r,file:r},"image"===t?this.fileReader.readAsDataURL(r):"file"===t&&(this.filePreview=r.name)},this.sendFile=()=>{this.canSendFiles&&(this.onNewMessage.emit("image"===this.fileToUpload.type?{type:"image",file:this.fileToUpload.image,image:this.fileToUpload.image}:{type:"file",file:this.fileToUpload.file}),this.cleanUpFileUpload())},this.handleSendMessage=()=>{if(!this.canSendTextMessage)return;if(null!==this.fileToUpload)return void this.sendFile();const t=this.$textArea.value.trim();t.length>0&&(this.onNewMessage.emit(this.prefill.replyMessage?{type:"text",message:t,replyTo:this.prefill.replyMessage}:{type:"text",message:t}),this.cleanup())},this.cleanup=()=>{this.mentionQuery="",this.focusedMemberIndex=0,this.$textArea.value="",this.$textArea.style.height="auto",c.setItem(this.storageKey,"")},this.handleEditMessage=()=>{var t;let r=this.$textArea.value.trim();(null===(t=this.prefill.editMessage)||void 0===t?void 0:t.message)&&l.test(this.prefill.editMessage.message)&&(r=`${h(this.prefill.editMessage.message)}\n\n${r}`),this.onEditMessage.emit({id:this.prefill.editMessage.id,message:r,channelId:this.prefill.editMessage.channelId}),this.cleanup()},this.handleEditCancel=()=>{this.onEditCancelled.emit(),this.cleanup()},this.initializeTextField=t=>{this.$textArea=t;const r=c.getItem(this.storageKey)||"";this.$textArea.value=r},this.onMemberSelect=t=>{const r=n(this.mentionQuery),a=n(this.$textArea.value.trim()).replace(r,"");this.$textArea.value=n(a)+`${g}${t.name} `,this.mentionQuery="",this.focusedMemberIndex=0,e((()=>this.$textArea.focus()))},this.getFilteredMembers=()=>{const t=this.mentionQuery.replace(g,"");return this.members.filter((r=>r.name.toLowerCase().includes(t.toLowerCase())))},this.cleanUpFileUpload=()=>{this.filePreview=null,this.fileToUpload=null},this.renderSuggestedReplies=()=>{if(this.prefill.suggestedReplies&&0!==this.prefill.suggestedReplies.length)return a("ul",{class:"suggested-replies scrollbar"},this.prefill.suggestedReplies.map((t=>a("rtk-tooltip",{label:this.t("chat.click_to_send")},a("li",{onClick:()=>this.onNewMessage.emit({type:"text",message:t})},t)))))},this.renderMenu=()=>{if(0===this.mentionQuery.length)return;const t=this.getFilteredMembers();return 0!==t.length?a("ul",{class:"member-list scrollbar"},t.map(((t,r)=>a("li",{class:{member:!0,selected:r===this.focusedMemberIndex},onClick:()=>this.onMemberSelect(t),ref:t=>{r===this.focusedMemberIndex&&e((()=>{t&&t.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}))}},a("rtk-avatar",{participant:{name:t.name,picture:t.picture},size:"sm"}),a("span",null,t.name))))):void 0}}connectedCallback(){this.fileReader.onload=t=>{"string"==typeof t.target.result&&(this.filePreview=t.target.result)}}onChannelChanged(){this.mentionQuery="",this.focusedMemberIndex=0;const t=c.getItem(this.storageKey)||"";this.$textArea.value=t,this.emojiPickerActive=!1}componentDidRender(){(this.prefill.editMessage||this.prefill.replyMessage)&&e((()=>this.$textArea.focus()))}get storageKey(){return this.channelId?`rtk-text-message-${this.channelId}`:"rtk-text-message"}uploadFile(t){const r=document.createElement("input");r.type="file","image"===t&&(r.accept="image/*"),r.onchange=r=>{const{validity:e,files:[a]}=r.target;e.valid&&this.generateFilePreview(t,a)},r.click()}renderFilePreview(){if("string"==typeof this.filePreview)return a("div",{class:"preview-overlay"},a("div",{class:"file-preview"},a("rtk-tooltip",{label:this.t("chat.cancel_upload")},a("rtk-button",{variant:"secondary",kind:"icon",onClick:this.cleanUpFileUpload},a("rtk-icon",{icon:this.iconPack.dismiss}))),"image"===this.fileToUpload.type?a("img",{class:"preview-image",src:this.filePreview}):a("div",{class:"preview-file"},a("span",null,this.filePreview))))}render(){var t;let r="";return(null===(t=this.prefill.editMessage)||void 0===t?void 0:t.message)&&(r=p(this.prefill.editMessage.message)),a(i,{key:"8f0ee810fac56aa1c62254d3d8a997941475bb3a"},this.canSendTextMessage&&this.emojiPickerActive&&a("rtk-emoji-picker",{key:"368bdbbe0e995aafd13e70d12f62b59979a5691b",part:"emoji-picker",onPickerClose:()=>{this.emojiPickerActive=!1},onRtkEmojiClicked:t=>{this.$textArea.value+=t.detail,this.$textArea.focus()},t:this.t}),this.renderSuggestedReplies(),a("slot",{key:"166872db8c0b07d2ec2e407de0fddfce7f3d4969",name:"chat-addon"}),a("slot",{key:"b383df2de3320e69fe2cb35a22296d1ee53b08df",name:"quote-block"}),a("div",{key:"89d5fdf625bf212acda92276e9ec10b60b55a179",class:"chat-input",part:"chat-input"},this.renderMenu(),this.canSendTextMessage&&a("textarea",{key:"55192f10820a161189d42b6150819be6a346d1e9",class:"scrollbar",part:"textarea",ref:this.initializeTextField,autoFocus:!0,placeholder:this.fileToUpload?"":this.t("chat.message_placeholder"),value:r,onPaste:this.onPaste,maxLength:b,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onInput:t=>{c.setItem(this.storageKey,t.target.value)},disabled:!!this.filePreview}),a("div",{key:"6c3a94c43257041fdeed496c7bd8b57ce4be6510",class:"chat-buttons",part:"chat-buttons"},a("div",{key:"76e6f7923484ee6a58359b6554e5e51009bc317f",class:"left",part:"chat-buttons-left"},!this.prefill.editMessage&&this.canSendFiles&&[a("rtk-tooltip",{key:"dbc04471a85d1fe2987c7d18dd0781e61f85fa35",label:this.t("chat.send_file")},a("rtk-button",{key:"cb54c65b81559d4a00a316aacf2f4bb368f30799",variant:"ghost",kind:"icon",onClick:()=>this.uploadFile("file"),title:this.t("chat.send_file")},a("rtk-icon",{key:"d3c542b0b1260ac305de3cfd5fbf5396f18d1f0e",icon:this.iconPack.attach}))),a("rtk-tooltip",{key:"6aac421a0d9149fd6c188bcce25bf4152cb8c0dd",label:this.t("chat.send_img")},a("rtk-button",{key:"5460407db51e83ab379bb8ade5af7d87bd04b64d",variant:"ghost",kind:"icon",onClick:()=>this.uploadFile("image"),title:this.t("chat.send_img")},a("rtk-icon",{key:"3f8732882dc03b5ddf23c59bdbe96329e551b070",icon:this.iconPack.image})))],!this.prefill.editMessage&&this.canSendTextMessage&&!this.disableEmojiPicker&&a("rtk-tooltip",{key:"8d032069a031d6a3b3e4847953a8e027eb5b3400",label:this.t("chat.send_emoji")},a("rtk-button",{key:"b96b0791ac68f142408f269354bde5385c08a4da",variant:"ghost",kind:"icon",class:{active:this.emojiPickerActive},title:this.t("chat.send_emoji"),onClick:()=>{this.emojiPickerActive=!this.emojiPickerActive}},a("rtk-icon",{key:"cd9ac09500ed1151dad94ed285db35bea6260ed8",icon:this.iconPack.emoji_multiple})))),!!this.filePreview&&this.renderFilePreview(),this.canSendTextMessage&&a("div",{key:"43b9f9232a7476b5600519fb3517d6342143d76f",class:"right",part:"chat-buttons-right"},!this.prefill.editMessage&&a("rtk-tooltip",{key:"ec757e58571a0ff2e4ab9b1006ab388b334a77d3",variant:"primary",label:this.t("chat.send_msg"),delay:2e3},a("rtk-button",{key:"054e7b52bfcfe852ca53ce96c6b498585924e616",kind:"icon",onClick:()=>this.handleSendMessage(),title:this.t("chat.send_msg")},a("rtk-icon",{key:"d085d0aae594a8e08f29d200e4cb0818c0eabdfd",icon:this.iconPack.send}))),this.prefill.editMessage&&a("div",{key:"7926d7cf394a7989d2fbae97c1ab5a974834b431",class:"edit-buttons"},a("rtk-tooltip",{key:"66029024ca595880cc72fdb28999f8380a8a37fc",variant:"secondary",label:this.t("cancel"),delay:2e3},a("rtk-button",{key:"cba0e1460d33a0b20593009acc588ba4e385d782",kind:"icon",variant:"secondary",onClick:()=>this.handleEditCancel(),title:this.t("cancel")},a("rtk-icon",{key:"2155257dea8a5660b6b2d9d9510da153192be16e",icon:this.iconPack.dismiss}))),a("rtk-tooltip",{key:"b296276e6f08c128ec3ba3cc292f6637e3550a34",variant:"primary",label:this.t("chat.update_msg"),delay:2e3},a("rtk-button",{key:"e3c50822510811d254f3e8d65ed967b70be97037",kind:"icon",onClick:()=>this.handleEditMessage(),title:this.t("chat.send_msg")},a("rtk-icon",{key:"016e23547285b95c2545784d627a37fb8c6359d5",icon:this.iconPack.checkmark}))))))))}static get watchers(){return{channelId:["onChannelChanged"]}}};v([k()],f.prototype,"size",void 0),v([k()],f.prototype,"iconPack",void 0),v([k()],f.prototype,"t",void 0),f.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{display:flex;flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity))}.chat-input{position:relative;margin:var(--rtk-space-2, 8px);z-index:10;box-sizing:border-box;display:flex;flex-direction:column;border-radius:var(--rtk-border-radius-md, 8px);border:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60))}textarea{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));box-sizing:border-box;padding:var(--rtk-space-3, 12px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}textarea::-moz-placeholder{color:rgb(var(--rtk-colors-text-1000, 255 255 255))}textarea::placeholder{color:rgb(var(--rtk-colors-text-1000, 255 255 255))}textarea{border-top-left-radius:var(--rtk-border-radius-md, 8px);border-top-right-radius:var(--rtk-border-radius-md, 8px);font-family:var(--rtk-font-family, sans-serif);outline:2px solid transparent;outline-offset:2px;resize:none;overflow-y:auto;border-width:var(--rtk-border-width-none, 0);border-style:none;min-height:60px;font-size:14px}.chat-buttons{border-bottom-right-radius:var(--rtk-border-radius-md, 8px);border-bottom-left-radius:var(--rtk-border-radius-md, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));display:flex;height:var(--rtk-space-8, 32px);align-items:center;justify-content:space-between;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px)}.chat-buttons .left rtk-button{margin-right:var(--rtk-space-1, 4px)}.chat-buttons .left rtk-button rtk-icon{height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px)}.chat-buttons .right{z-index:10}.chat-buttons .right .edit-buttons{display:flex;gap:var(--rtk-space-2, 8px)}.chat-buttons>div{display:flex;align-items:center}rtk-emoji-picker{z-index:0;position:absolute;bottom:var(--rtk-space-32, 128px);border-top:var(--rtk-border-width-sm, 1px) solid rgb(var(--rtk-colors-background-600, 60 60 60));animation:0.3s slide-up ease}@keyframes slide-up{from{transform:translateY(100%)}to{transform:translateY(0%)}}.member-list{margin:var(--rtk-space-0, 0px);margin-top:var(--rtk-space-1, 4px);max-height:var(--rtk-space-28, 112px);min-width:var(--rtk-space-40, 160px);max-width:var(--rtk-space-64, 256px);padding:var(--rtk-space-0, 0px);position:absolute;bottom:var(--rtk-space-28, 112px);list-style-type:none;overflow-y:auto;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));border-radius:var(--rtk-border-radius-sm, 4px);--tw-border-spacing-x:var(--rtk-space-2, 8px);--tw-border-spacing-y:var(--rtk-space-2, 8px);border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y);border-style:solid;border-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / 0.5)}.member-list .member{display:flex;align-items:center;gap:var(--rtk-space-1, 4px);padding:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-4, 16px);cursor:pointer}.member-list .member rtk-avatar{flex-shrink:0;height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px);font-size:14px;color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.member-list .member span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-list .member:hover,.member-list .member.selected{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-700, 2 70 253) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)))}.suggested-replies{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-3, 12px);display:flex;flex-wrap:nowrap;gap:var(--rtk-space-2, 8px);list-style-type:none;overflow-x:auto}.suggested-replies rtk-tooltip{flex-shrink:0}.suggested-replies li{padding:var(--rtk-space-2, 8px);border-radius:var(--rtk-border-radius-md, 8px);background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / 0.75);color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));cursor:pointer}.suggested-replies li:hover{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-bg-opacity))}.preview-overlay{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-0, 0px);bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));border-radius:var(--rtk-border-radius-md, 8px)}.file-preview{position:absolute;top:var(--rtk-space-4, 16px);left:var(--rtk-space-4, 16px);max-width:-moz-fit-content;max-width:fit-content;max-height:var(--rtk-space-20, 80px)}.file-preview:hover rtk-tooltip{display:block}.file-preview rtk-tooltip{position:absolute;top:calc(var(--rtk-space-1, 4px) * -1);left:calc(var(--rtk-space-1, 4px) * -1);display:none;margin-left:calc(var(--rtk-space-1, 4px) * -1);margin-top:calc(var(--rtk-space-1, 4px) * -1)}.file-preview rtk-button{display:flex;height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));border:1px solid rgb(var(--rtk-colors-text-1000, 255 255 255))}.file-preview rtk-icon{height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.preview-image{height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px);-o-object-fit:cover;object-fit:cover;max-height:100%;max-width:100%;overflow:clip;border-radius:var(--rtk-border-radius-md, 8px)}.preview-file{padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:var(--rtk-border-radius-md, 8px);max-width:200px}@keyframes scroll-text{0%{transform:translateX(0%)}70%{transform:translateX(-100%)}80%{transform:translateX(0%)}100%{transform:translateX(0%)}}";export{f as rtk_chat_composer_ui}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,H as e}from"./p-0ee570cd.js";import{a,c as o}from"./p-b9281511.js";import{d as r}from"./p-15979e9d.js";import{S as n}from"./p-a1278d45.js";var l=function(t,s,i,e){var a,o=arguments.length,r=o<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,i,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(r=(o<3?a(r):o>3?a(s,i,r):a(s,i))||r);return o>3&&r&&Object.defineProperty(s,i,r),r};const h=class{constructor(i){t(this,i),this.stateUpdate=s(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=a,this.t=o(),this.pollsActive=!1,this.unreadPollsCount=0,this.canViewPolls=!1,this.onPollsUpdate=({newPoll:t})=>{!0===t&&(this.unreadPollsCount+=1)},this.updateCanView=()=>{this.canViewPolls=r(this.meeting)}}connectedCallback(){this.meetingChanged(this.meeting),this.statesChanged(this.states)}disconnectedCallback(){var t,s,i,e,a,o;null===(s=null===(t=this.meeting)||void 0===t?void 0:t.polls)||void 0===s||s.removeListener("pollsUpdate",this.onPollsUpdate),null===(e=null===(i=this.meeting)||void 0===i?void 0:i.self)||void 0===e||e.permissions.removeListener("pollsUpdate",this.updateCanView),null===(o=null===(a=this.meeting)||void 0===a?void 0:a.stage)||void 0===o||o.removeListener("stageStatusUpdate",this.updateCanView)}meetingChanged(t){var s,i;t&&t.polls&&(this.unreadPollsCount=t.polls.items.length,this.meeting.polls.addListener("pollsUpdate",this.onPollsUpdate),null===(s=null==t?void 0:t.self)||void 0===s||s.permissions.addListener("pollsUpdate",this.updateCanView),this.canViewPolls=r(t),null===(i=null==t?void 0:t.stage)||void 0===i||i.on("stageStatusUpdate",this.updateCanView))}statesChanged(t){null!=t&&(this.pollsActive=!0===t.activeSidebar&&"polls"===t.sidebar)}togglePollsTab(){const t=this.states;this.unreadPollsCount=0,this.pollsActive=!((null==t?void 0:t.activeSidebar)&&"polls"===(null==t?void 0:t.sidebar)),this.stateUpdate.emit({activeSidebar:this.pollsActive,sidebar:this.pollsActive?"polls":void 0,activeMoreMenu:!1,activeAI:!1})}handlePollsActiveChange(){this.pollsActive||this.states.activeSidebar||this.buttonEl.focus()}render(){if(!this.canViewPolls)return i(e,{"data-hidden":!0});const t=this.t("polls");return i(e,{title:t},0!==this.unreadPollsCount&&!this.pollsActive&&i("div",{class:"unread-count",part:"unread-count"},i("span",null,this.unreadPollsCount<=100?this.unreadPollsCount:"99+")),i("rtk-controlbar-button",{ref:t=>this.buttonEl=t,part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.pollsActive},onClick:()=>this.togglePollsTab(),icon:this.iconPack.poll,label:t,variant:this.variant}))}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"],pollsActive:["handlePollsActiveChange"]}}};l([n()],h.prototype,"meeting",void 0),l([n()],h.prototype,"states",void 0),l([n()],h.prototype,"size",void 0),l([n()],h.prototype,"iconPack",void 0),l([n()],h.prototype,"t",void 0),h.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:relative;display:block}:host([data-hidden]){display:none}.unread-count{position:absolute;right:var(--rtk-space-3, 12px);box-sizing:border-box;padding:var(--rtk-space-0\\.5, 2px);-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));font-size:12px;color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));display:flex;height:var(--rtk-space-5, 20px);min-width:var(--rtk-space-5, 20px);align-items:center;justify-content:center;border-radius:9999px;z-index:1}:host([variant='horizontal']) .unread-count{right:var(--rtk-space-4, 16px);top:50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}";export{h as rtk_polls_toggle}
1
+ import{r as t,c as s,h as i,H as e}from"./p-0ee570cd.js";import{a,c as o}from"./p-ee167b96.js";import{d as r}from"./p-b16cee89.js";import{S as n}from"./p-2aa242f4.js";var l=function(t,s,i,e){var a,o=arguments.length,r=o<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,i,e);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(r=(o<3?a(r):o>3?a(s,i,r):a(s,i))||r);return o>3&&r&&Object.defineProperty(s,i,r),r};const h=class{constructor(i){t(this,i),this.stateUpdate=s(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=a,this.t=o(),this.pollsActive=!1,this.unreadPollsCount=0,this.canViewPolls=!1,this.onPollsUpdate=({newPoll:t})=>{!0===t&&(this.unreadPollsCount+=1)},this.updateCanView=()=>{this.canViewPolls=r(this.meeting)}}connectedCallback(){this.meetingChanged(this.meeting),this.statesChanged(this.states)}disconnectedCallback(){var t,s,i,e,a,o;null===(s=null===(t=this.meeting)||void 0===t?void 0:t.polls)||void 0===s||s.removeListener("pollsUpdate",this.onPollsUpdate),null===(e=null===(i=this.meeting)||void 0===i?void 0:i.self)||void 0===e||e.permissions.removeListener("pollsUpdate",this.updateCanView),null===(o=null===(a=this.meeting)||void 0===a?void 0:a.stage)||void 0===o||o.removeListener("stageStatusUpdate",this.updateCanView)}meetingChanged(t){var s,i;t&&t.polls&&(this.unreadPollsCount=t.polls.items.length,this.meeting.polls.addListener("pollsUpdate",this.onPollsUpdate),null===(s=null==t?void 0:t.self)||void 0===s||s.permissions.addListener("pollsUpdate",this.updateCanView),this.canViewPolls=r(t),null===(i=null==t?void 0:t.stage)||void 0===i||i.on("stageStatusUpdate",this.updateCanView))}statesChanged(t){null!=t&&(this.pollsActive=!0===t.activeSidebar&&"polls"===t.sidebar)}togglePollsTab(){const t=this.states;this.unreadPollsCount=0,this.pollsActive=!((null==t?void 0:t.activeSidebar)&&"polls"===(null==t?void 0:t.sidebar)),this.stateUpdate.emit({activeSidebar:this.pollsActive,sidebar:this.pollsActive?"polls":void 0,activeMoreMenu:!1,activeAI:!1})}handlePollsActiveChange(){this.pollsActive||this.states.activeSidebar||this.buttonEl.focus()}render(){if(!this.canViewPolls)return i(e,{"data-hidden":!0});const t=this.t("polls");return i(e,{title:t},0!==this.unreadPollsCount&&!this.pollsActive&&i("div",{class:"unread-count",part:"unread-count"},i("span",null,this.unreadPollsCount<=100?this.unreadPollsCount:"99+")),i("rtk-controlbar-button",{ref:t=>this.buttonEl=t,part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.pollsActive},onClick:()=>this.togglePollsTab(),icon:this.iconPack.poll,label:t,variant:this.variant}))}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"],pollsActive:["handlePollsActiveChange"]}}};l([n()],h.prototype,"meeting",void 0),l([n()],h.prototype,"states",void 0),l([n()],h.prototype,"size",void 0),l([n()],h.prototype,"iconPack",void 0),l([n()],h.prototype,"t",void 0),h.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:relative;display:block}:host([data-hidden]){display:none}.unread-count{position:absolute;right:var(--rtk-space-3, 12px);box-sizing:border-box;padding:var(--rtk-space-0\\.5, 2px);-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));font-size:12px;color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));display:flex;height:var(--rtk-space-5, 20px);min-width:var(--rtk-space-5, 20px);align-items:center;justify-content:center;border-radius:9999px;z-index:1}:host([variant='horizontal']) .unread-count{right:var(--rtk-space-4, 16px);top:50%;--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}";export{h as rtk_polls_toggle}
@@ -1 +1 @@
1
- import{r as t,h as a,H as e}from"./p-0ee570cd.js";import{d as i,a as r,c as s}from"./p-b9281511.js";import{R as o}from"./p-c8eaa707.js";import{S as n}from"./p-a1278d45.js";var c=function(t,a,e,i){var r,s=arguments.length,o=s<3?a:null===i?i=Object.getOwnPropertyDescriptor(a,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,a,e,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(a,e,o):r(a,e))||o);return s>3&&o&&Object.defineProperty(a,e,o),o};const p=class{constructor(a){t(this,a),this.variant="solid",this.disableRender=!1,this.config=i,this.iconPack=r,this.t=s()}render(){return a(e,{key:"03a753b729584aee302a0e76f7961ae057dc0746"},!this.disableRender&&a(o,{key:"488995338fff693e38de3f98f72a656cd71a5882",element:"rtk-controlbar",defaults:{meeting:this.meeting,config:this.config,states:this.states,t:this.t,iconPack:this.iconPack,size:this.size},onlyChildren:!0}),a("slot",{key:"6fb547f8c56b9a610c532d66aa3582d16b3b40ef"}))}};c([n()],p.prototype,"meeting",void 0),c([n()],p.prototype,"states",void 0),c([n()],p.prototype,"iconPack",void 0),c([n()],p.prototype,"t",void 0),c([n()],p.prototype,"size",void 0),p.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{box-sizing:border-box;display:flex;align-items:center;gap:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);position:relative;z-index:10}@media only screen and (max-device-height: 480px) and (orientation: landscape){:host{padding-top:var(--rtk-space-0, 0px) !important}}";export{p as rtk_controlbar}
1
+ import{r as t,h as a,H as e}from"./p-0ee570cd.js";import{d as i,a as r,c as s}from"./p-ee167b96.js";import{R as o}from"./p-c8eaa707.js";import{S as n}from"./p-2aa242f4.js";var c=function(t,a,e,i){var r,s=arguments.length,o=s<3?a:null===i?i=Object.getOwnPropertyDescriptor(a,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,a,e,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(a,e,o):r(a,e))||o);return s>3&&o&&Object.defineProperty(a,e,o),o};const p=class{constructor(a){t(this,a),this.variant="solid",this.disableRender=!1,this.config=i,this.iconPack=r,this.t=s()}render(){return a(e,{key:"03a753b729584aee302a0e76f7961ae057dc0746"},!this.disableRender&&a(o,{key:"488995338fff693e38de3f98f72a656cd71a5882",element:"rtk-controlbar",defaults:{meeting:this.meeting,config:this.config,states:this.states,t:this.t,iconPack:this.iconPack,size:this.size},onlyChildren:!0}),a("slot",{key:"6fb547f8c56b9a610c532d66aa3582d16b3b40ef"}))}};c([n()],p.prototype,"meeting",void 0),c([n()],p.prototype,"states",void 0),c([n()],p.prototype,"iconPack",void 0),c([n()],p.prototype,"t",void 0),c([n()],p.prototype,"size",void 0),p.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{box-sizing:border-box;display:flex;align-items:center;gap:var(--rtk-space-0\\.5, 2px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-1000, 8 8 8) / var(--tw-bg-opacity));padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);position:relative;z-index:10}@media only screen and (max-device-height: 480px) and (orientation: landscape){:host{padding-top:var(--rtk-space-0, 0px) !important}}";export{p as rtk_controlbar}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as i}from"./p-0ee570cd.js";import{a as o,c as r}from"./p-ee167b96.js";import{S as a}from"./p-2aa242f4.js";var n=function(t,e,i,o){var r,a=arguments.length,n=a<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(n=(a<3?r(n):a>3?r(e,i,n):r(e,i))||n);return a>3&&n&&Object.defineProperty(e,i,n),n};const s=class{constructor(e){t(this,e),this.iconPack=o,this.t=r()}render(){var t;const o=null===(t=this.meeting)||void 0===t?void 0:t.meta.meetingTitle;return null==o?e(i,{"data-hidden":!0}):e(i,{role:"banner","aria-label":o},e("rtk-tooltip",{label:o,part:"tooltip"},e("div",{class:"title",part:"title"},o)))}};n([a()],s.prototype,"meeting",void 0),n([a()],s.prototype,"iconPack",void 0),n([a()],s.prototype,"t",void 0),s.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:16px;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}:host([data-hidden]){display:none}.title{text-align:center;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}:host([size='sm']){font-size:12px}";export{s as rtk_meeting_title}
@@ -1 +1 @@
1
- import{h as r}from"./p-0ee570cd.js";import{M as e,j as n,s,f as t}from"./p-9a30eb32.js";const l=e=>e.map((e=>{switch(e.type){case"a":if("string"==typeof e.content)return r("a",{class:"link",href:n=e.content,target:"_blank",rel:"noopener noreferrer"},n);case"b":return(e=>r("b",null,"string"==typeof e?e:l(e)))(e.content);case"i":return(e=>r("i",null,"string"==typeof e?e:l(e)))(e.content);case"s":return(e=>"string"==typeof e?r("s",null,e):r("b",null,l(e)))(e.content);case"q":return r("span",{class:"block-quote"});default:return(e=>"string"==typeof e?e:r("p",null,l(e)))(e.content)}var n})),a=({message:a})=>{const o=a.slice(0,e),u=n(o,!0),p=s(o);return r("p",null,0!==u.length&&r("blockquote",null,u.split("\n").map((e=>{const n=t(e);return r("p",null,l(n))}))),p.split("\n").map((e=>{const n=t(e);return r("p",null,l(n))})))};export{a as T}
1
+ import{h as r}from"./p-0ee570cd.js";import{M as e,j as n,s,f as t}from"./p-aaba206b.js";const l=e=>e.map((e=>{switch(e.type){case"a":if("string"==typeof e.content)return r("a",{class:"link",href:n=e.content,target:"_blank",rel:"noopener noreferrer"},n);case"b":return(e=>r("b",null,"string"==typeof e?e:l(e)))(e.content);case"i":return(e=>r("i",null,"string"==typeof e?e:l(e)))(e.content);case"s":return(e=>"string"==typeof e?r("s",null,e):r("b",null,l(e)))(e.content);case"q":return r("span",{class:"block-quote"});default:return(e=>"string"==typeof e?e:r("p",null,l(e)))(e.content)}var n})),a=({message:a})=>{const o=a.slice(0,e),u=n(o,!0),p=s(o);return r("p",null,0!==u.length&&r("blockquote",null,u.split("\n").map((e=>{const n=t(e);return r("p",null,l(n))}))),p.split("\n").map((e=>{const n=t(e);return r("p",null,l(n))})))};export{a as T}
@@ -1 +1 @@
1
- import{r as t,c as i,h as r,H as e}from"./p-0ee570cd.js";import{a as o,c as a,v as s,w as n}from"./p-b9281511.js";import{S as c}from"./p-a1278d45.js";var l=function(t,i,r,e){var o,a=arguments.length,s=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,r,e);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(s=(a<3?o(s):a>3?o(i,r,s):o(i,r))||s);return a>3&&s&&Object.defineProperty(i,r,s),s};const d=class{constructor(r){t(this,r),this.stateUpdate=i(this,"rtkStateUpdate",7),this.iconPack=o,this.t=a()}render(){var t,i;if(null==this.meeting)return null;const o={meeting:this.meeting,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},a=this.states,c=!0===(null===(t=null==a?void 0:a.prefs)||void 0===t?void 0:t.muteNotificationSounds)||"true"===s("mute-notification-sounds");return r(e,null,r("rtk-microphone-selector",Object.assign({},o),r("rtk-audio-visualizer",{participant:null===(i=this.meeting)||void 0===i?void 0:i.self,iconPack:this.iconPack,t:this.t,slot:"indicator"})),r("rtk-speaker-selector",Object.assign({},o)),r("div",{class:"group",part:"notification-toggle"},r("div",{class:"row"},r("label",{htmlFor:"notification-toggle"},this.t("settings.notification_sound")),r("rtk-switch",{id:"notification-toggle",checked:!c,onRtkChange:t=>{const{checked:i}=t.target,r=!i;this.stateUpdate.emit({prefs:{muteNotificationSounds:r}}),n("mute-notification-sounds",r)},iconPack:this.iconPack,t:this.t}))))}};l([c()],d.prototype,"meeting",void 0),l([c()],d.prototype,"states",void 0),l([c()],d.prototype,"size",void 0),l([c()],d.prototype,"iconPack",void 0),l([c()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;width:100%;flex-direction:column}audio{visibility:hidden}.group{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px)}.group>*{margin-bottom:var(--rtk-space-2, 8px)}.group>*:last-child{margin-bottom:var(--rtk-space-0, 0px)}.group select{flex:1 1 0%}rtk-audio-visualizer{flex-shrink:0}rtk-button{border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}rtk-button rtk-icon{margin-right:var(--rtk-space-2, 8px)}";var p=function(t,i,r,e){var o,a=arguments.length,s=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,r,e);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(s=(a<3?o(s):a>3?o(i,r,s):o(i,r))||s);return a>3&&s&&Object.defineProperty(i,r,s),s};const h=class{constructor(r){t(this,r),this.stateUpdate=i(this,"rtkStateUpdate",7),this.iconPack=o,this.t=a(),this.onVideoUpdate=t=>{this.videoEnabled=t.videoEnabled}}componentDidLoad(){this.meetingChanged(this.meeting)}meetingChanged(t){var i;null!=t&&(this.videoEnabled=t.self.videoEnabled,null===(i=t.self)||void 0===i||i.addListener("videoUpdate",this.onVideoUpdate))}disconnectedCallback(){var t;null===(t=this.meeting.self)||void 0===t||t.removeListener("videoUpdate",this.onVideoUpdate)}render(){var t,i,o;if(null==this.meeting)return null;const a={meeting:this.meeting,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},c=this.states,l=!0===(null===(t=null==c?void 0:c.prefs)||void 0===t?void 0:t.mirrorVideo)||"true"===s("mirror-video");return r(e,null,r("div",{class:"section",part:"tile-preview"},r("div",{class:"group",part:"tile-preview"},!0===this.videoEnabled?r("rtk-participant-tile",{meeting:this.meeting,participant:null===(i=this.meeting)||void 0===i?void 0:i.self,iconPack:this.iconPack,t:this.t,states:c,size:this.size,isPreview:!0}):r("div",{class:"camera-off-helper"},r("rtk-participant-tile",{meeting:this.meeting,participant:null===(o=this.meeting)||void 0===o?void 0:o.self,size:this.size},r("div",null,r("rtk-icon",{id:"icon",icon:this.iconPack.video_off,tabIndex:-1,"aria-hidden":!0}),r("div",null,this.t("settings.camera_off"))))))),r("rtk-camera-selector",Object.assign({},a)),r("div",{class:"group",part:"mirror-toggle"},r("div",{class:"row"},r("label",{htmlFor:"mirror-toggle"},this.t("settings.mirror_video")),r("rtk-switch",{checked:l,iconPack:this.iconPack,t:this.t,onRtkChange:t=>{const{checked:i}=t.target;this.stateUpdate.emit({prefs:{mirrorVideo:i}}),n("mirror-video",i)}}))))}static get watchers(){return{meeting:["meetingChanged"]}}};p([c()],h.prototype,"meeting",void 0),p([c()],h.prototype,"states",void 0),p([c()],h.prototype,"size",void 0),p([c()],h.prototype,"iconPack",void 0),p([c()],h.prototype,"t",void 0),h.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.rtk-select{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.rtk-select:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.rtk-select{display:block;border-radius:var(--rtk-border-radius-sm, 4px);border-width:var(--rtk-border-width-none, 0);border-style:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--rtk-space-3, 12px);font-size:16px;--icon-size:var(--rtk-select-chevron-size, var(--rtk-space-6, 24px));--icon-right-position:var(--rtk-select-chevron-right-position, var(--rtk-space-2, 8px));background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-position:right var(--icon-right-position) center;background-repeat:no-repeat;background-size:var(--icon-size) var(--icon-size);padding-right:calc(var(--icon-right-position) * 5)}:host{display:flex;width:100%;flex-direction:column}.rtk-select{width:100%;text-overflow:ellipsis}rtk-participant-tile{margin-left:auto;margin-right:auto;margin-bottom:var(--rtk-space-4, 16px);max-width:100%}#icon{padding-bottom:var(--rtk-space-1, 4px)}.apply-button{height:var(--rtk-space-10, 40px)}label{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:14px}.group{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px)}.group>*{margin-bottom:var(--rtk-space-2, 8px)}.group>*:last-child{margin-bottom:var(--rtk-space-0, 0px)}.group select{flex:1 1 0%}.row{display:flex;align-items:center;justify-content:space-between;gap:var(--rtk-space-3, 12px)}.section{display:flex;flex-direction:column}@media only screen and (max-height: 480px) and (orientation: landscape){:host{flex-direction:row}:host([size='sm']){flex-direction:row}.section[part='tile-preview']{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);max-height:90%;max-width:40%;flex-shrink:1}.section[part='video-settings']{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);flex-grow:1}}";export{d as rtk_settings_audio,h as rtk_settings_video}
1
+ import{r as t,c as i,h as r,H as e}from"./p-0ee570cd.js";import{a as o,c as a,v as s,w as n}from"./p-ee167b96.js";import{S as c}from"./p-2aa242f4.js";var l=function(t,i,r,e){var o,a=arguments.length,s=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,r,e);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(s=(a<3?o(s):a>3?o(i,r,s):o(i,r))||s);return a>3&&s&&Object.defineProperty(i,r,s),s};const p=class{constructor(r){t(this,r),this.stateUpdate=i(this,"rtkStateUpdate",7),this.iconPack=o,this.t=a()}render(){var t,i;if(null==this.meeting)return null;const o={meeting:this.meeting,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},a=this.states,c=!0===(null===(t=null==a?void 0:a.prefs)||void 0===t?void 0:t.muteNotificationSounds)||"true"===s("mute-notification-sounds");return r(e,null,r("rtk-microphone-selector",Object.assign({},o),r("rtk-audio-visualizer",{participant:null===(i=this.meeting)||void 0===i?void 0:i.self,iconPack:this.iconPack,t:this.t,slot:"indicator"})),r("rtk-speaker-selector",Object.assign({},o)),r("div",{class:"group",part:"notification-toggle"},r("div",{class:"row"},r("label",{htmlFor:"notification-toggle"},this.t("settings.notification_sound")),r("rtk-switch",{id:"notification-toggle",checked:!c,onRtkChange:t=>{const{checked:i}=t.target,r=!i;this.stateUpdate.emit({prefs:{muteNotificationSounds:r}}),n("mute-notification-sounds",r)},iconPack:this.iconPack,t:this.t}))))}};l([c()],p.prototype,"meeting",void 0),l([c()],p.prototype,"states",void 0),l([c()],p.prototype,"size",void 0),l([c()],p.prototype,"iconPack",void 0),l([c()],p.prototype,"t",void 0),p.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;width:100%;flex-direction:column}audio{visibility:hidden}.group{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px)}.group>*{margin-bottom:var(--rtk-space-2, 8px)}.group>*:last-child{margin-bottom:var(--rtk-space-0, 0px)}.group select{flex:1 1 0%}rtk-audio-visualizer{flex-shrink:0}rtk-button{border-radius:var(--rtk-border-radius-sm, 4px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}rtk-button rtk-icon{margin-right:var(--rtk-space-2, 8px)}";var d=function(t,i,r,e){var o,a=arguments.length,s=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,r,e);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(s=(a<3?o(s):a>3?o(i,r,s):o(i,r))||s);return a>3&&s&&Object.defineProperty(i,r,s),s};const h=class{constructor(r){t(this,r),this.stateUpdate=i(this,"rtkStateUpdate",7),this.iconPack=o,this.t=a(),this.onVideoUpdate=t=>{this.videoEnabled=t.videoEnabled}}componentDidLoad(){this.meetingChanged(this.meeting)}meetingChanged(t){var i;null!=t&&(this.videoEnabled=t.self.videoEnabled,null===(i=t.self)||void 0===i||i.addListener("videoUpdate",this.onVideoUpdate))}disconnectedCallback(){var t;null===(t=this.meeting.self)||void 0===t||t.removeListener("videoUpdate",this.onVideoUpdate)}render(){var t,i,o;if(null==this.meeting)return null;const a={meeting:this.meeting,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},c=this.states,l=!0===(null===(t=null==c?void 0:c.prefs)||void 0===t?void 0:t.mirrorVideo)||"true"===s("mirror-video");return r(e,null,r("div",{class:"section",part:"tile-preview"},r("div",{class:"group",part:"tile-preview"},!0===this.videoEnabled?r("rtk-participant-tile",{meeting:this.meeting,participant:null===(i=this.meeting)||void 0===i?void 0:i.self,iconPack:this.iconPack,t:this.t,states:c,size:this.size,isPreview:!0}):r("div",{class:"camera-off-helper"},r("rtk-participant-tile",{meeting:this.meeting,participant:null===(o=this.meeting)||void 0===o?void 0:o.self,size:this.size},r("div",null,r("rtk-icon",{id:"icon",icon:this.iconPack.video_off,tabIndex:-1,"aria-hidden":!0}),r("div",null,this.t("settings.camera_off"))))))),r("rtk-camera-selector",Object.assign({},a)),r("div",{class:"group",part:"mirror-toggle"},r("div",{class:"row"},r("label",{htmlFor:"mirror-toggle"},this.t("settings.mirror_video")),r("rtk-switch",{checked:l,iconPack:this.iconPack,t:this.t,onRtkChange:t=>{const{checked:i}=t.target;this.stateUpdate.emit({prefs:{mirrorVideo:i}}),n("mirror-video",i)}}))))}static get watchers(){return{meeting:["meetingChanged"]}}};d([c()],h.prototype,"meeting",void 0),d([c()],h.prototype,"states",void 0),d([c()],h.prototype,"size",void 0),d([c()],h.prototype,"iconPack",void 0),d([c()],h.prototype,"t",void 0),h.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.rtk-select{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.rtk-select:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.rtk-select{display:block;border-radius:var(--rtk-border-radius-sm, 4px);border-width:var(--rtk-border-width-none, 0);border-style:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--rtk-space-3, 12px);font-size:16px;--icon-size:var(--rtk-select-chevron-size, var(--rtk-space-6, 24px));--icon-right-position:var(--rtk-select-chevron-right-position, var(--rtk-space-2, 8px));background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-position:right var(--icon-right-position) center;background-repeat:no-repeat;background-size:var(--icon-size) var(--icon-size);padding-right:calc(var(--icon-right-position) * 5)}:host{display:flex;width:100%;flex-direction:column}.rtk-select{width:100%;text-overflow:ellipsis}rtk-participant-tile{margin-left:auto;margin-right:auto;margin-bottom:var(--rtk-space-4, 16px);max-width:100%}#icon{padding-bottom:var(--rtk-space-1, 4px)}.apply-button{height:var(--rtk-space-10, 40px)}label{-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:14px}.group{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px)}.group>*{margin-bottom:var(--rtk-space-2, 8px)}.group>*:last-child{margin-bottom:var(--rtk-space-0, 0px)}.group select{flex:1 1 0%}.row{display:flex;align-items:center;justify-content:space-between;gap:var(--rtk-space-3, 12px)}.section{display:flex;flex-direction:column}@media only screen and (max-height: 480px) and (orientation: landscape){:host{flex-direction:row}:host([size='sm']){flex-direction:row}.section[part='tile-preview']{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);max-height:90%;max-width:40%;flex-shrink:1}.section[part='video-settings']{margin-left:var(--rtk-space-2, 8px);margin-right:var(--rtk-space-2, 8px);flex-grow:1}}";export{p as rtk_settings_audio,h as rtk_settings_video}
@@ -1 +1 @@
1
- import{r as t,c as r,h as a,H as i}from"./p-0ee570cd.js";import{d as s,a as e,c as o}from"./p-b9281511.js";import{S as l}from"./p-a1278d45.js";import{s as n}from"./p-0752f2ba.js";var c=function(t,r,a,i){var s,e=arguments.length,o=e<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,r,a,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(o=(e<3?s(o):e>3?s(r,a,o):s(r,a))||o);return e>3&&o&&Object.defineProperty(r,a,o),o};const d=class{constructor(a){t(this,a),this.stateUpdate=r(this,"rtkStateUpdate",7),this.config=s,this.iconPack=e,this.t=o(),this.plugins=[],this.canStartPlugins=!1,this.canClosePlugins=!1,this.activatedPluginsId=[],this.close=()=>{this.stateUpdate.emit({activeSidebar:!1,sidebar:void 0})}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null===(t=this.meeting)||void 0===t||t.plugins.all.removeListener("stateUpdate",this.updateActivePlugins)}meetingChanged(t){null!=t&&(this.canStartPlugins=t.self.permissions.plugins.canStart,this.canClosePlugins=t.self.permissions.plugins.canClose,this.plugins=t.plugins.all.toArray().filter((r=>{var a;return!(null===(a=t.self.config.disabledPlugins)||void 0===a?void 0:a.includes(r.id))})),this.updateActivePlugins=()=>{this.activatedPluginsId=t.plugins.active.toArray().map((t=>t.id))},this.updateActivePlugins(),t.plugins.all.addListener("stateUpdate",this.updateActivePlugins))}render(){return a(i,{key:"a4ef27530f9e18bc63f0c419219eb4ad0314a213"},a("ul",{key:"348783b9aa3feb3a215a73a1f7fc1bb749c17da0",class:"scrollbar"},this.plugins.map((t=>a("li",{key:t.name,class:"plugin"},a("div",{class:"metadata"},a("img",{src:t.picture}),a("div",{class:"name"},t.name)),!this.activatedPluginsId.includes(t.id)&&this.canStartPlugins&&a("div",{class:"buttons"},a("rtk-button",{kind:"icon",size:"lg",onClick:()=>{t.activate(),this.close()},"aria-label":`${this.t("activate")} ${t.name}`},a("rtk-icon",{icon:this.iconPack.rocket,tabIndex:-1,"aria-hidden":!0}))),this.activatedPluginsId.includes(t.id)&&this.canClosePlugins&&a("div",{class:"buttons"},a("rtk-button",{kind:"icon",size:"lg",onClick:()=>{t.deactivate()},"aria-label":`${this.t("close")} ${t.name}`},a("rtk-icon",{icon:this.iconPack.dismiss,tabIndex:-1,"aria-hidden":!0}))))))))}static get watchers(){return{meeting:["meetingChanged"]}}};c([l()],d.prototype,"meeting",void 0),c([l()],d.prototype,"size",void 0),c([l()],d.prototype,"iconPack",void 0),c([l()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);display:flex;height:100%;width:100%;flex-direction:column;font-size:14px;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}h3{margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);display:block;padding:var(--rtk-space-0, 0px);font-size:16px;font-weight:400;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));text-align:center}ul{overflow-y:auto;padding:var(--rtk-space-0, 0px);flex-grow:1;flex-basis:0}.metadata{display:flex;align-items:center}.metadata img{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-sm, 4px)}.metadata .name{margin-left:var(--rtk-space-2, 8px);font-weight:500}.plugin{display:flex;align-items:center;justify-content:space-between;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px)}.plugin .buttons{display:flex;align-items:center}rtk-button:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-ring-opacity));--tw-ring-offset-width:2px;--tw-ring-offset-color:rgb(var(--rtk-colors-background-1000, 8 8 8))}";var p=function(t,r,a,i){var s,e=arguments.length,o=e<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,r,a,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(o=(e<3?s(o):e>3?s(r,a,o):s(r,a))||o);return e>3&&o&&Object.defineProperty(r,a,o),o};const h=class{constructor(r){t(this,r),this.config=s,this.iconPack=e,this.t=o(),this.create=!1,this.onPollsUpdate=t=>{this.polls=[...t.polls]},this.onUpdatePermissions=()=>{this.permissions=this.meeting.self.permissions}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null!=this.meeting&&(null===(t=this.meeting.polls)||void 0===t||t.removeListener("pollsUpdate",this.onPollsUpdate),this.meeting.self.permissions.removeListener("pollsUpdate",this.onUpdatePermissions))}meetingChanged(t){null!=t&&(t&&!t.polls||(this.permissions=this.meeting.self.permissions,this.polls=[...t.polls.items],t.polls.addListener("pollsUpdate",this.onPollsUpdate),this.meeting.self.permissions.addListener("pollsUpdate",this.onUpdatePermissions),this.onCreate=async r=>{this.create=!1,await t.polls.create(r.question,r.options,r.anonymous,r.hideVotes)},this.onVote=async(r,a)=>{await t.polls.vote(r,a)}))}toggleCreateState(){this.create=!this.create}componentDidRender(){n(this.pollEl)}render(){return a(i,{key:"90670e63e9732cdaf7fb40b8fc5c83d23169ffc2"},a("div",{key:"e1b10652531d40deef0753eba00f5e42a6ace030",class:"ctr",part:"container"},a("div",{key:"ff8549851c499d5e52c7ea44ff02542a9216463b",class:"polls-view scrollbar",ref:t=>this.pollEl=t,part:"polls"},0==this.polls.length&&!0!==this.create&&a("div",{key:"cd06ef857955de65e4aaa60ee1b5419c379e1a9c",class:"empty-polls"},this.t("polls.empty")),this.polls.map((t=>{var r;return a("rtk-poll",{key:t.id,poll:t,onRtkVotePoll:t=>{this.onVote(t.detail.id,t.detail.index)},self:null===(r=this.meeting)||void 0===r?void 0:r.self.userId,iconPack:this.iconPack,t:this.t,permissions:this.permissions})})),this.create&&a("rtk-poll-form",{key:"41f8908f7485faf89738cea1f2ccb816fb6c094f",part:"poll-form",onRtkCreatePoll:t=>{this.onCreate(t.detail)},iconPack:this.iconPack,t:this.t})),this.permissions.polls.canCreate&&a("rtk-button",{key:"d2b90f8c13da232af950d2653c1322f334df8181",kind:"wide",onClick:()=>this.toggleCreateState(),variant:this.create?"secondary":"primary",part:"button"},this.t(this.create?"polls.cancel":"polls.create"))))}static get watchers(){return{meeting:["meetingChanged"]}}};p([l()],h.prototype,"meeting",void 0),p([l()],h.prototype,"size",void 0),p([l()],h.prototype,"iconPack",void 0),p([l()],h.prototype,"t",void 0),h.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{margin-top:var(--rtk-space-2, 8px);display:flex;height:100%;width:100%;flex-direction:column;font-size:14px}*{box-sizing:border-box}.ctr{box-sizing:border-box;padding:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-0, 0px);display:flex;flex:1 1 0%;flex-direction:column}.polls-view{overflow-y:auto;flex:1 1 0%;flex-basis:0}.empty-polls{display:flex;height:100%;width:100%;align-items:center;justify-content:center}";export{d as rtk_plugins,h as rtk_polls}
1
+ import{r as t,c as r,h as a,H as i}from"./p-0ee570cd.js";import{d as s,a as e,c as o}from"./p-ee167b96.js";import{S as l}from"./p-2aa242f4.js";import{s as n}from"./p-0752f2ba.js";var c=function(t,r,a,i){var s,e=arguments.length,o=e<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,r,a,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(o=(e<3?s(o):e>3?s(r,a,o):s(r,a))||o);return e>3&&o&&Object.defineProperty(r,a,o),o};const d=class{constructor(a){t(this,a),this.stateUpdate=r(this,"rtkStateUpdate",7),this.config=s,this.iconPack=e,this.t=o(),this.plugins=[],this.canStartPlugins=!1,this.canClosePlugins=!1,this.activatedPluginsId=[],this.close=()=>{this.stateUpdate.emit({activeSidebar:!1,sidebar:void 0})}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null===(t=this.meeting)||void 0===t||t.plugins.all.removeListener("stateUpdate",this.updateActivePlugins)}meetingChanged(t){null!=t&&(this.canStartPlugins=t.self.permissions.plugins.canStart,this.canClosePlugins=t.self.permissions.plugins.canClose,this.plugins=t.plugins.all.toArray().filter((r=>{var a;return!(null===(a=t.self.config.disabledPlugins)||void 0===a?void 0:a.includes(r.id))})),this.updateActivePlugins=()=>{this.activatedPluginsId=t.plugins.active.toArray().map((t=>t.id))},this.updateActivePlugins(),t.plugins.all.addListener("stateUpdate",this.updateActivePlugins))}render(){return a(i,{key:"74f2d9af55a0670b4ae5406f73b333187e8c3d92"},a("ul",{key:"955e4e2a9d101b5027ef725175996c8e72a94b30",class:"scrollbar"},this.plugins.map((t=>a("li",{key:t.name,class:"plugin"},a("div",{class:"metadata"},a("img",{src:t.picture}),a("div",{class:"name"},t.name)),!this.activatedPluginsId.includes(t.id)&&this.canStartPlugins&&a("div",{class:"buttons"},a("rtk-button",{kind:"icon",size:"lg",onClick:()=>{t.activate(),this.close()},"aria-label":`${this.t("activate")} ${t.name}`},a("rtk-icon",{icon:this.iconPack.rocket,tabIndex:-1,"aria-hidden":!0}))),this.activatedPluginsId.includes(t.id)&&this.canClosePlugins&&a("div",{class:"buttons"},a("rtk-button",{kind:"icon",size:"lg",onClick:()=>{t.deactivate()},"aria-label":`${this.t("close")} ${t.name}`},a("rtk-icon",{icon:this.iconPack.dismiss,tabIndex:-1,"aria-hidden":!0}))))))))}static get watchers(){return{meeting:["meetingChanged"]}}};c([l()],d.prototype,"meeting",void 0),c([l()],d.prototype,"size",void 0),c([l()],d.prototype,"iconPack",void 0),c([l()],d.prototype,"t",void 0),d.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);display:flex;height:100%;width:100%;flex-direction:column;font-size:14px;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}h3{margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);display:block;padding:var(--rtk-space-0, 0px);font-size:16px;font-weight:400;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88));text-align:center}ul{overflow-y:auto;padding:var(--rtk-space-0, 0px);flex-grow:1;flex-basis:0}.metadata{display:flex;align-items:center}.metadata img{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);border-radius:var(--rtk-border-radius-sm, 4px)}.metadata .name{margin-left:var(--rtk-space-2, 8px);font-weight:500}.plugin{display:flex;align-items:center;justify-content:space-between;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px);padding-top:var(--rtk-space-2, 8px);padding-bottom:var(--rtk-space-2, 8px)}.plugin .buttons{display:flex;align-items:center}rtk-button:hover{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-ring-opacity));--tw-ring-offset-width:2px;--tw-ring-offset-color:rgb(var(--rtk-colors-background-1000, 8 8 8))}";var p=function(t,r,a,i){var s,e=arguments.length,o=e<3?r:null===i?i=Object.getOwnPropertyDescriptor(r,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,r,a,i);else for(var l=t.length-1;l>=0;l--)(s=t[l])&&(o=(e<3?s(o):e>3?s(r,a,o):s(r,a))||o);return e>3&&o&&Object.defineProperty(r,a,o),o};const h=class{constructor(r){t(this,r),this.config=s,this.iconPack=e,this.t=o(),this.create=!1,this.onPollsUpdate=t=>{this.polls=[...t.polls]},this.onUpdatePermissions=()=>{this.permissions=this.meeting.self.permissions}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null!=this.meeting&&(null===(t=this.meeting.polls)||void 0===t||t.removeListener("pollsUpdate",this.onPollsUpdate),this.meeting.self.permissions.removeListener("pollsUpdate",this.onUpdatePermissions))}meetingChanged(t){null!=t&&(t&&!t.polls||(this.permissions=this.meeting.self.permissions,this.polls=[...t.polls.items],t.polls.addListener("pollsUpdate",this.onPollsUpdate),this.meeting.self.permissions.addListener("pollsUpdate",this.onUpdatePermissions),this.onCreate=async r=>{this.create=!1,await t.polls.create(r.question,r.options,r.anonymous,r.hideVotes)},this.onVote=async(r,a)=>{await t.polls.vote(r,a)}))}toggleCreateState(){this.create=!this.create}componentDidRender(){n(this.pollEl)}render(){return a(i,{key:"aac0c84486146fa17436746fb6def9cc4e539a2c"},a("div",{key:"179c4496372623a2ea2f7c0b555b84ea1cae12ee",class:"ctr",part:"container"},a("div",{key:"07b09fc28d75b1d40dec83eecae3661dfca1dbd2",class:"polls-view scrollbar",ref:t=>this.pollEl=t,part:"polls"},0==this.polls.length&&!0!==this.create&&a("div",{key:"841f91b0da755e48498c520a8234cf6b926b058c",class:"empty-polls"},this.t("polls.empty")),this.polls.map((t=>{var r;return a("rtk-poll",{key:t.id,poll:t,onRtkVotePoll:t=>{this.onVote(t.detail.id,t.detail.index)},self:null===(r=this.meeting)||void 0===r?void 0:r.self.userId,iconPack:this.iconPack,t:this.t,permissions:this.permissions})})),this.create&&a("rtk-poll-form",{key:"c6545dffc24f5409417666404ab73bf546834a8b",part:"poll-form",onRtkCreatePoll:t=>{this.onCreate(t.detail)},iconPack:this.iconPack,t:this.t})),this.permissions.polls.canCreate&&a("rtk-button",{key:"69651546ee9a00f9b9c467e0f2307f5ce2dc1383",kind:"wide",onClick:()=>this.toggleCreateState(),variant:this.create?"secondary":"primary",part:"button"},this.t(this.create?"polls.cancel":"polls.create"))))}static get watchers(){return{meeting:["meetingChanged"]}}};p([l()],h.prototype,"meeting",void 0),p([l()],h.prototype,"size",void 0),p([l()],h.prototype,"iconPack",void 0),p([l()],h.prototype,"t",void 0),h.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}.scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{margin-top:var(--rtk-space-2, 8px);display:flex;height:100%;width:100%;flex-direction:column;font-size:14px}*{box-sizing:border-box}.ctr{box-sizing:border-box;padding:var(--rtk-space-3, 12px);padding-top:var(--rtk-space-0, 0px);display:flex;flex:1 1 0%;flex-direction:column}.polls-view{overflow-y:auto;flex:1 1 0%;flex-basis:0}.empty-polls{display:flex;height:100%;width:100%;align-items:center;justify-content:center}";export{d as rtk_plugins,h as rtk_polls}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i,H as e}from"./p-0ee570cd.js";import{a as h,c as a}from"./p-b9281511.js";import{l as r}from"./p-5605a420.js";import{S as n}from"./p-a1278d45.js";var o=function(t,s,i,e){var h,a=arguments.length,r=a<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,i,e);else for(var n=t.length-1;n>=0;n--)(h=t[n])&&(r=(a<3?h(r):a>3?h(s,i,r):h(s,i))||r);return a>3&&r&&Object.defineProperty(s,i,r),r};const c=()=>"undefined"!=typeof navigator&&void 0!==navigator.mediaDevices&&"getDisplayMedia"in navigator.mediaDevices,l=class{constructor(i){t(this,i),this.stateUpdate=s(this,"rtkStateUpdate",7),this.apiError=s(this,"rtkApiError",7),this.variant="button",this.iconPack=h,this.t=a(),this.maxScreenShareCount=-1,this.screenShareCount=0,this.screenShareEnabled=!1,this.canScreenShare=!1,this.shareScreenPermission="NOT_REQUESTED",this.screenShareState={tooltipLabel:this.t("screenshare.start"),label:this.t("screenshare.start"),icon:this.iconPack.share_screen_start,classList:{},showWarning:!1,disable:!1},this.stageStatus="OFF_STAGE",this.screenShareListener=()=>{const t=this.meeting.participants.active.toArray().filter((t=>t.screenShareEnabled)).length;this.screenShareCount=t+(this.meeting.self.screenShareEnabled?1:0),this.screenShareEnabled=this.meeting.self.screenShareEnabled,this.getState(),this.meeting.__internals__.logger.info("rtkScreenShare::screenShareUpdate",{media:{screenshare:{enabled:this.screenShareEnabled,count:this.screenShareCount}}})},this.participantLeftListener=({screenShareEnabled:t})=>{t&&(this.screenShareCount=Math.max(this.screenShareCount-1,0),this.getState(),this.meeting.__internals__.logger.info("rtkScreenShare::screenShareUpdate",{media:{screenshare:{enabled:this.screenShareEnabled,count:this.screenShareCount}}}))},this.stageStatusListener=()=>{this.stageStatus=this.meeting.stage.status,this.canScreenShare="ALLOWED"===this.meeting.self.permissions.canProduceScreenshare},this.mediaPermissionUpdateListener=({kind:t,message:s})=>{"screenshare"===t&&(this.shareScreenPermission=s,this.getState(),"COULD_NOT_START"===s&&this.apiError.emit({trace:this.t("screenshare.permissions"),message:this.t("screenshare.error.unknown")}),this.hasPermissionError())&&this.stateUpdate.emit({activePermissionsMessage:{enabled:!0,kind:"screenshare"}})},this.reachedMaxScreenShares=()=>this.maxScreenShareCount>0&&this.screenShareCount>=this.maxScreenShareCount,this.toggleScreenShare=async()=>{var t;if(this.screenShareState.disable)return;if(this.hasPermissionError())return this.stateUpdate.emit({activePermissionsMessage:{enabled:!0,kind:"screenshare"}}),!1;const s=null===(t=this.meeting)||void 0===t?void 0:t.self;this.screenShareEnabled?s.disableScreenShare():null==s||!this.canScreenShare||this.reachedMaxScreenShares()||this.hasPermissionError()||(this.screenShareState=Object.assign(Object.assign({},this.screenShareState),{disable:!0}),await s.enableScreenShare(),this.screenShareState=Object.assign(Object.assign({},this.screenShareState),{disable:!1}),this.stateUpdate.emit({activeMoreMenu:!1}))}}connectedCallback(){c()?this.meetingChanged(this.meeting):r.error("[rtk-screenshare-toggle] Device does not support screensharing.")}disconnectedCallback(){var t,s,i,e,h,a;null===(t=this.meeting)||void 0===t||t.participants.joined.removeListener("screenShareUpdate",this.screenShareListener),null===(s=this.meeting)||void 0===s||s.participants.joined.removeListener("participantLeft",this.participantLeftListener),null===(i=this.meeting)||void 0===i||i.self.removeListener("screenShareUpdate",this.screenShareListener),null===(e=this.meeting)||void 0===e||e.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null===(a=null===(h=this.meeting)||void 0===h?void 0:h.stage)||void 0===a||a.removeListener("stageStatusUpdate",this.stageStatusListener)}meetingChanged(t){if(null!=t){const{self:s,stage:i}=t;this.canScreenShare="ALLOWED"===this.meeting.self.permissions.canProduceScreenshare,this.maxScreenShareCount=s.config.maxScreenShareCount,this.screenShareEnabled=s.screenShareEnabled;let e=0;for(const s of t.participants.joined.toArray())s.screenShareEnabled&&e++;this.screenShareCount=e,this.getState(),t.__internals__.logger.info("rtkScreenShare::initialise",{media:{screenshare:{enabled:this.screenShareEnabled,count:this.screenShareCount,maxAllowedCount:this.maxScreenShareCount}}}),this.stageStatus=t.stage.status,t.participants.joined.addListener("screenShareUpdate",this.screenShareListener),t.participants.joined.addListener("participantLeft",this.participantLeftListener),s.addListener("screenShareUpdate",this.screenShareListener),s.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null==i||i.addListener("stageStatusUpdate",this.stageStatusListener)}}hasPermissionError(){return"SYSTEM_DENIED"===this.shareScreenPermission||"DENIED"===this.shareScreenPermission}getState(){let t="",s="",i="",e={};const h=this.hasPermissionError()&&!this.screenShareEnabled,a=this.reachedMaxScreenShares()&&!this.screenShareEnabled,r="COULD_NOT_START"===this.shareScreenPermission;this.screenShareEnabled&&!h?(s=this.t("screenshare.stop"),i=this.iconPack.share_screen_stop,e["red-icon"]=!0):(s=this.t("screenshare.start"),i=this.iconPack.share_screen_start),"SYSTEM_DENIED"===this.shareScreenPermission?(t=this.t("perm_sys_denied.screenshare"),e["red-icon"]=!0):"DENIED"===this.shareScreenPermission?(t=this.t("perm_denied.screenshare"),e["red-icon"]=!0):t=s,a&&(t=this.t("screenshare.error.max_count")),r&&(t=this.t("screenshare.error.unknown")),this.screenShareState={tooltipLabel:t,label:s,icon:i,classList:e,disable:h||a,showWarning:h||a||r}}render(){return c()&&this.canScreenShare&&!["OFF_STAGE","REQUESTED_TO_JOIN_STAGE"].includes(this.stageStatus)?i(e,{title:this.screenShareState.label},i("rtk-tooltip",{placement:"top",kind:"block",label:this.screenShareState.tooltipLabel,delay:600,part:"tooltip"},i("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,variant:this.variant,label:this.screenShareState.label,icon:this.screenShareState.icon,class:this.screenShareState.classList,onClick:this.toggleScreenShare,disabled:this.screenShareState.disable,showWarning:this.screenShareState.showWarning}))):i(e,{"data-hidden":!0})}static get watchers(){return{meeting:["meetingChanged"]}}};o([n()],l.prototype,"states",void 0),o([n()],l.prototype,"meeting",void 0),o([n()],l.prototype,"size",void 0),o([n()],l.prototype,"iconPack",void 0),o([n()],l.prototype,"t",void 0),l.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}:host([data-hidden]){display:none}";export{l as rtk_screen_share_toggle}
1
+ import{r as t,c as s,h as i,H as e}from"./p-0ee570cd.js";import{a as h,c as a}from"./p-ee167b96.js";import{l as r}from"./p-5605a420.js";import{S as n}from"./p-2aa242f4.js";var o=function(t,s,i,e){var h,a=arguments.length,r=a<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,i,e);else for(var n=t.length-1;n>=0;n--)(h=t[n])&&(r=(a<3?h(r):a>3?h(s,i,r):h(s,i))||r);return a>3&&r&&Object.defineProperty(s,i,r),r};const c=()=>"undefined"!=typeof navigator&&void 0!==navigator.mediaDevices&&"getDisplayMedia"in navigator.mediaDevices,l=class{constructor(i){t(this,i),this.stateUpdate=s(this,"rtkStateUpdate",7),this.apiError=s(this,"rtkApiError",7),this.variant="button",this.iconPack=h,this.t=a(),this.maxScreenShareCount=-1,this.screenShareCount=0,this.screenShareEnabled=!1,this.canScreenShare=!1,this.shareScreenPermission="NOT_REQUESTED",this.screenShareState={tooltipLabel:this.t("screenshare.start"),label:this.t("screenshare.start"),icon:this.iconPack.share_screen_start,classList:{},showWarning:!1,disable:!1},this.stageStatus="OFF_STAGE",this.screenShareListener=()=>{const t=this.meeting.participants.active.toArray().filter((t=>t.screenShareEnabled)).length;this.screenShareCount=t+(this.meeting.self.screenShareEnabled?1:0),this.screenShareEnabled=this.meeting.self.screenShareEnabled,this.getState(),this.meeting.__internals__.logger.info("rtkScreenShare::screenShareUpdate",{media:{screenshare:{enabled:this.screenShareEnabled,count:this.screenShareCount}}})},this.participantLeftListener=({screenShareEnabled:t})=>{t&&(this.screenShareCount=Math.max(this.screenShareCount-1,0),this.getState(),this.meeting.__internals__.logger.info("rtkScreenShare::screenShareUpdate",{media:{screenshare:{enabled:this.screenShareEnabled,count:this.screenShareCount}}}))},this.stageStatusListener=()=>{this.stageStatus=this.meeting.stage.status,this.canScreenShare="ALLOWED"===this.meeting.self.permissions.canProduceScreenshare},this.mediaPermissionUpdateListener=({kind:t,message:s})=>{"screenshare"===t&&(this.shareScreenPermission=s,this.getState(),"COULD_NOT_START"===s&&this.apiError.emit({trace:this.t("screenshare.permissions"),message:this.t("screenshare.error.unknown")}),this.hasPermissionError())&&this.stateUpdate.emit({activePermissionsMessage:{enabled:!0,kind:"screenshare"}})},this.reachedMaxScreenShares=()=>this.maxScreenShareCount>0&&this.screenShareCount>=this.maxScreenShareCount,this.toggleScreenShare=async()=>{var t;if(this.screenShareState.disable)return;if(this.hasPermissionError())return this.stateUpdate.emit({activePermissionsMessage:{enabled:!0,kind:"screenshare"}}),!1;const s=null===(t=this.meeting)||void 0===t?void 0:t.self;this.screenShareEnabled?s.disableScreenShare():null==s||!this.canScreenShare||this.reachedMaxScreenShares()||this.hasPermissionError()||(this.screenShareState=Object.assign(Object.assign({},this.screenShareState),{disable:!0}),await s.enableScreenShare(),this.screenShareState=Object.assign(Object.assign({},this.screenShareState),{disable:!1}),this.stateUpdate.emit({activeMoreMenu:!1}))}}connectedCallback(){c()?this.meetingChanged(this.meeting):r.error("[rtk-screenshare-toggle] Device does not support screensharing.")}disconnectedCallback(){var t,s,i,e,h,a;null===(t=this.meeting)||void 0===t||t.participants.joined.removeListener("screenShareUpdate",this.screenShareListener),null===(s=this.meeting)||void 0===s||s.participants.joined.removeListener("participantLeft",this.participantLeftListener),null===(i=this.meeting)||void 0===i||i.self.removeListener("screenShareUpdate",this.screenShareListener),null===(e=this.meeting)||void 0===e||e.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null===(a=null===(h=this.meeting)||void 0===h?void 0:h.stage)||void 0===a||a.removeListener("stageStatusUpdate",this.stageStatusListener)}meetingChanged(t){if(null!=t){const{self:s,stage:i}=t;this.canScreenShare="ALLOWED"===this.meeting.self.permissions.canProduceScreenshare,this.maxScreenShareCount=s.config.maxScreenShareCount,this.screenShareEnabled=s.screenShareEnabled;let e=0;for(const s of t.participants.joined.toArray())s.screenShareEnabled&&e++;this.screenShareCount=e,this.getState(),t.__internals__.logger.info("rtkScreenShare::initialise",{media:{screenshare:{enabled:this.screenShareEnabled,count:this.screenShareCount,maxAllowedCount:this.maxScreenShareCount}}}),this.stageStatus=t.stage.status,t.participants.joined.addListener("screenShareUpdate",this.screenShareListener),t.participants.joined.addListener("participantLeft",this.participantLeftListener),s.addListener("screenShareUpdate",this.screenShareListener),s.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null==i||i.addListener("stageStatusUpdate",this.stageStatusListener)}}hasPermissionError(){return"SYSTEM_DENIED"===this.shareScreenPermission||"DENIED"===this.shareScreenPermission}getState(){let t="",s="",i="",e={};const h=this.hasPermissionError()&&!this.screenShareEnabled,a=this.reachedMaxScreenShares()&&!this.screenShareEnabled,r="COULD_NOT_START"===this.shareScreenPermission;this.screenShareEnabled&&!h?(s=this.t("screenshare.stop"),i=this.iconPack.share_screen_stop,e["red-icon"]=!0):(s=this.t("screenshare.start"),i=this.iconPack.share_screen_start),"SYSTEM_DENIED"===this.shareScreenPermission?(t=this.t("perm_sys_denied.screenshare"),e["red-icon"]=!0):"DENIED"===this.shareScreenPermission?(t=this.t("perm_denied.screenshare"),e["red-icon"]=!0):t=s,a&&(t=this.t("screenshare.error.max_count")),r&&(t=this.t("screenshare.error.unknown")),this.screenShareState={tooltipLabel:t,label:s,icon:i,classList:e,disable:h||a,showWarning:h||a||r}}render(){return c()&&this.canScreenShare&&!["OFF_STAGE","REQUESTED_TO_JOIN_STAGE"].includes(this.stageStatus)?i(e,{title:this.screenShareState.label},i("rtk-tooltip",{placement:"top",kind:"block",label:this.screenShareState.tooltipLabel,delay:600,part:"tooltip"},i("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,variant:this.variant,label:this.screenShareState.label,icon:this.screenShareState.icon,class:this.screenShareState.classList,onClick:this.toggleScreenShare,disabled:this.screenShareState.disable,showWarning:this.screenShareState.showWarning}))):i(e,{"data-hidden":!0})}static get watchers(){return{meeting:["meetingChanged"]}}};o([n()],l.prototype,"states",void 0),o([n()],l.prototype,"meeting",void 0),o([n()],l.prototype,"size",void 0),o([n()],l.prototype,"iconPack",void 0),o([n()],l.prototype,"t",void 0),l.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}:host([data-hidden]){display:none}";export{l as rtk_screen_share_toggle}
@@ -1 +1 @@
1
- import{r as t,w as r,h as i,H as a,c as e}from"./p-0ee570cd.js";import{a as o,c as s,d as n}from"./p-b9281511.js";import{S as c}from"./p-a1278d45.js";import{f as l,s as p}from"./p-338c7261.js";var d=function(t,r,i,a){var e,o=arguments.length,s=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,r,i,a);else for(var n=t.length-1;n>=0;n--)(e=t[n])&&(s=(o<3?e(s):o>3?e(r,i,s):e(r,i))||s);return o>3&&s&&Object.defineProperty(r,i,s),s};const h=class{constructor(r){t(this,r),this.iconPack=o,this.t=s(),this.canClosePlugin=!1,this.viewModeEnabled=!1,this.onIframeRef=t=>{var r;t!==this.iframeEl&&(this.iframeEl=t,null===(r=this.plugin)||void 0===r||r.addPluginView(t,"plugin-main"))},this.canInteractWithPlugin=()=>{const t=this.plugin.id;if(!t)return!0;const r=this.meeting.self.permissions.plugins.config[t];return!r||!r.accessControl||"FULL_ACCESS"===r.accessControl}}componentDidLoad(){this.meetingChanged(this.meeting),this.pluginChanged(this.plugin)}meetingChanged(t){if(null==t)return;const i=this.canInteractWithPlugin();this.viewModeEnabled=!i,r((()=>{this.canClosePlugin=t.self.permissions.plugins.canClose||this.plugin.enabledBy===t.self.id}))}pluginChanged(t){this.toggleViewModeListener=t=>{this.canInteractWithPlugin()||(this.viewModeEnabled=t)},null!=t&&(this.iframeEl&&t.addPluginView(this.iframeEl,"plugin-main"),t.addListener("toggleViewMode",this.toggleViewModeListener))}disconnectedCallback(){var t,r;null===(t=this.plugin)||void 0===t||t.removePluginView("plugin-main"),null===(r=this.plugin)||void 0===r||r.removeListener("toggleViewMode",this.toggleViewModeListener)}render(){return null==this.plugin?null:i(a,null,i("header",{part:"header"},i("div",null,this.plugin.name),this.canClosePlugin&&i("div",null,i("rtk-button",{kind:"icon",onClick:()=>this.plugin.deactivate(),part:"button"},i("rtk-icon",{icon:this.iconPack.dismiss})))),i("div",{class:"iframe-container"},!this.canInteractWithPlugin()&&this.viewModeEnabled?i("div",{class:"block-inputs"}):null,i("iframe",{ref:t=>this.onIframeRef(t),part:"iframe"})))}static get watchers(){return{meeting:["meetingChanged"],plugin:["pluginChanged"]}}};d([c()],h.prototype,"meeting",void 0),d([c()],h.prototype,"iconPack",void 0),d([c()],h.prototype,"t",void 0),h.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:100%;width:100%;flex-direction:column;overflow:hidden;border-radius:var(--rtk-border-radius-lg, 12px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}header{display:flex;height:var(--rtk-space-8, 32px);align-items:center;justify-content:space-between;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity))}header>div{display:flex;align-items:center}rtk-button{display:flex;height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px);flex-direction:column;align-items:center;border-radius:9999px}rtk-button rtk-icon{height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px)}iframe{display:block;flex:1 1 0%;margin:var(--rtk-space-0, 0px);border-width:var(--rtk-border-width-none, 0);border-style:none;padding:var(--rtk-space-0, 0px);outline:2px solid transparent;outline-offset:2px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-video-bg, 24 24 24) / var(--tw-bg-opacity))}.iframe-container{position:relative;height:100%;width:100%}.block-inputs{position:absolute;z-index:10;height:100%;width:100%;border-left-width:var(--rtk-border-width-none, 0);border-top-width:var(--rtk-border-width-lg, 4px);border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-border-opacity))}iframe{height:100%;width:100%}";var v=function(t,r,i,a){var e,o=arguments.length,s=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,r,i,a);else for(var n=t.length-1;n>=0;n--)(e=t[n])&&(s=(o<3?e(s):o>3?e(r,i,s):e(r,i))||s);return o>3&&s&&Object.defineProperty(r,i,s),s};const g=class{constructor(r){t(this,r),this.tabChange=e(this,"tabChange",7),this.config=n,this.layout="row",this.iconPack=o,this.t=s(),this.tabs=[]}render(){return i(a,{key:"d80fd5c45bdae491e9bfe398f7ba9d7ede356e02"},i("rtk-spotlight-indicator",{key:"17d7a10e6d34c0b89fe5b7b5270eb24116e1c237",meeting:this.meeting,iconPack:this.iconPack,t:this.t,size:this.size}),this.tabs.map((t=>{var r,a,e,o,s;let n=!1;if(("plugin"===(null===(r=this.activeTab)||void 0===r?void 0:r.type)&&t.plugin&&(null===(a=this.activeTab)||void 0===a?void 0:a.plugin.id)===t.plugin.id||"screenshare"===(null===(e=this.activeTab)||void 0===e?void 0:e.type)&&t.participant&&(null===(o=this.activeTab)||void 0===o?void 0:o.participant.id)===t.participant.id)&&(n=!0),"screenshare"===t.type){const r=t.participant,a=l(r.name);return i("rtk-button",{title:`${a}'s Screen Share`,key:t.participant.id,kind:"icon",variant:n?"primary":"secondary",class:{tab:!0,active:n},onClick:()=>this.tabChange.emit(t)},i("div",{class:"center col"},i("rtk-icon",{icon:this.iconPack.share_screen_person}),i("span",{class:"name"},r.id===(null===(s=this.meeting)||void 0===s?void 0:s.self.id)?this.t("you"):p(a,6))))}if("plugin"===t.type){const r=t.plugin;return i("rtk-button",{title:r.name,key:r.id,kind:"icon",variant:n?"primary":"secondary",class:{tab:!0,active:n},onClick:()=>this.tabChange.emit(t)},i("div",{class:"center col"},i("img",{src:r.picture}),i("span",{class:"name"},p(r.name,6))))}})))}};v([c()],g.prototype,"size",void 0),v([c()],g.prototype,"meeting",void 0),v([c()],g.prototype,"states",void 0),v([c()],g.prototype,"iconPack",void 0),v([c()],g.prototype,"t",void 0),g.style=".scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{box-sizing:border-box;display:flex;height:100%;width:var(--rtk-space-16, 64px);flex-direction:column;gap:var(--rtk-space-2, 8px);overflow-y:auto;font-family:var(--rtk-font-family, sans-serif)}rtk-button{z-index:10}.col{display:flex;flex-direction:column;align-items:center}.tab{display:flex;height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px);align-items:center;justify-content:center;margin-bottom:var(--rtk-space-2, 8px);font-size:12px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}.tab.active{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity))}.tab img{height:var(--rtk-space-7, 28px);width:var(--rtk-space-7, 28px);border-radius:var(--rtk-border-radius-sm, 4px)}.tab .name{margin-top:var(--rtk-space-0\\.5, 2px)}:host([size='sm']){flex-direction:column;margin-top:var(--rtk-space-4, 16px);height:var(--rtk-space-16, 64px);width:100%;flex-direction:row;gap:var(--rtk-space-2, 8px);overflow-x:auto}:host([size='sm']) .tab{margin:var(--rtk-space-0, 0px);text-overflow:clip;min-width:100px;height:40px}:host([size='sm']) .tab .col{display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-2, 8px)}:host([size='sm']) .tab .col img,:host([size='sm']) .tab .col rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host([size='sm']) .tab .col .name{gap:var(--rtk-space-1, 4px)}:host([layout='column']){flex-direction:column}:host([layout='column']) .aside{flex:2;max-width:100%;width:100%}@media (orientation: portrait){:host([size='sm']){margin-top:var(--rtk-space-2, 8px);height:var(--rtk-space-16, 64px);width:100%;flex-direction:row;transition:all 0.3s linear}:host([size='md']){height:var(--rtk-space-24, 96px);width:100%;flex-direction:row;transition:all 0.3s linear}:host .tab{margin:var(--rtk-space-0, 0px)}}@media (orientation: landscape){:host([size='sm']){margin-right:var(--rtk-space-4, 16px);height:100%;width:var(--rtk-space-14, 56px);flex-direction:row;gap:var(--rtk-space-2, 8px);overflow-y:auto;overflow-x:hidden;transition:all 0.3s linear}:host([size='md']){margin-right:var(--rtk-space-4, 16px);height:100%;width:var(--rtk-space-14, 56px);flex-direction:row;gap:var(--rtk-space-2, 8px);overflow-y:auto;overflow-x:hidden;transition:all 0.3s linear}:host .tab{margin:var(--rtk-space-0, 0px)}:host([size='sm']) .tab{margin:var(--rtk-space-0, 0px);width:100%;text-overflow:clip;min-width:0px;min-height:40px}:host([size='sm']) .tab .col{display:flex;flex-direction:column;align-items:center;gap:var(--rtk-space-2, 8px);font-size:10px}:host([size='sm']) .tab .col img,:host([size='sm']) .tab .col rtk-icon{height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px)}:host([size='sm']) .tab .col .name{gap:var(--rtk-space-1, 4px)}}";export{h as rtk_plugin_main,g as rtk_tab_bar}
1
+ import{r as t,w as r,h as i,H as a,c as e}from"./p-0ee570cd.js";import{a as o,c as s,d as n}from"./p-ee167b96.js";import{S as c}from"./p-2aa242f4.js";import{f as l,s as p}from"./p-338c7261.js";var d=function(t,r,i,a){var e,o=arguments.length,s=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,r,i,a);else for(var n=t.length-1;n>=0;n--)(e=t[n])&&(s=(o<3?e(s):o>3?e(r,i,s):e(r,i))||s);return o>3&&s&&Object.defineProperty(r,i,s),s};const h=class{constructor(r){t(this,r),this.iconPack=o,this.t=s(),this.canClosePlugin=!1,this.viewModeEnabled=!1,this.onIframeRef=t=>{var r;t!==this.iframeEl&&(this.iframeEl=t,null===(r=this.plugin)||void 0===r||r.addPluginView(t,"plugin-main"))},this.canInteractWithPlugin=()=>{const t=this.plugin.id;if(!t)return!0;const r=this.meeting.self.permissions.plugins.config[t];return!r||!r.accessControl||"FULL_ACCESS"===r.accessControl}}componentDidLoad(){this.meetingChanged(this.meeting),this.pluginChanged(this.plugin)}meetingChanged(t){if(null==t)return;const i=this.canInteractWithPlugin();this.viewModeEnabled=!i,r((()=>{this.canClosePlugin=t.self.permissions.plugins.canClose||this.plugin.enabledBy===t.self.id}))}pluginChanged(t){this.toggleViewModeListener=t=>{this.canInteractWithPlugin()||(this.viewModeEnabled=t)},null!=t&&(this.iframeEl&&t.addPluginView(this.iframeEl,"plugin-main"),t.addListener("toggleViewMode",this.toggleViewModeListener))}disconnectedCallback(){var t,r;null===(t=this.plugin)||void 0===t||t.removePluginView("plugin-main"),null===(r=this.plugin)||void 0===r||r.removeListener("toggleViewMode",this.toggleViewModeListener)}render(){return null==this.plugin?null:i(a,null,i("header",{part:"header"},i("div",null,this.plugin.name),this.canClosePlugin&&i("div",null,i("rtk-button",{kind:"icon",onClick:()=>this.plugin.deactivate(),part:"button"},i("rtk-icon",{icon:this.iconPack.dismiss})))),i("div",{class:"iframe-container"},!this.canInteractWithPlugin()&&this.viewModeEnabled?i("div",{class:"block-inputs"}):null,i("iframe",{ref:t=>this.onIframeRef(t),part:"iframe"})))}static get watchers(){return{meeting:["meetingChanged"],plugin:["pluginChanged"]}}};d([c()],h.prototype,"meeting",void 0),d([c()],h.prototype,"iconPack",void 0),d([c()],h.prototype,"t",void 0),h.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:100%;width:100%;flex-direction:column;overflow:hidden;border-radius:var(--rtk-border-radius-lg, 12px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}header{display:flex;height:var(--rtk-space-8, 32px);align-items:center;justify-content:space-between;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity))}header>div{display:flex;align-items:center}rtk-button{display:flex;height:var(--rtk-space-5, 20px);width:var(--rtk-space-5, 20px);flex-direction:column;align-items:center;border-radius:9999px}rtk-button rtk-icon{height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px)}iframe{display:block;flex:1 1 0%;margin:var(--rtk-space-0, 0px);border-width:var(--rtk-border-width-none, 0);border-style:none;padding:var(--rtk-space-0, 0px);outline:2px solid transparent;outline-offset:2px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-video-bg, 24 24 24) / var(--tw-bg-opacity))}.iframe-container{position:relative;height:100%;width:100%}.block-inputs{position:absolute;z-index:10;height:100%;width:100%;border-left-width:var(--rtk-border-width-none, 0);border-top-width:var(--rtk-border-width-lg, 4px);border-style:solid;--tw-border-opacity:1;border-color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-border-opacity))}iframe{height:100%;width:100%}";var v=function(t,r,i,a){var e,o=arguments.length,s=o<3?r:null===a?a=Object.getOwnPropertyDescriptor(r,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,r,i,a);else for(var n=t.length-1;n>=0;n--)(e=t[n])&&(s=(o<3?e(s):o>3?e(r,i,s):e(r,i))||s);return o>3&&s&&Object.defineProperty(r,i,s),s};const g=class{constructor(r){t(this,r),this.tabChange=e(this,"tabChange",7),this.config=n,this.layout="row",this.iconPack=o,this.t=s(),this.tabs=[]}render(){return i(a,{key:"d80fd5c45bdae491e9bfe398f7ba9d7ede356e02"},i("rtk-spotlight-indicator",{key:"17d7a10e6d34c0b89fe5b7b5270eb24116e1c237",meeting:this.meeting,iconPack:this.iconPack,t:this.t,size:this.size}),this.tabs.map((t=>{var r,a,e,o,s;let n=!1;if(("plugin"===(null===(r=this.activeTab)||void 0===r?void 0:r.type)&&t.plugin&&(null===(a=this.activeTab)||void 0===a?void 0:a.plugin.id)===t.plugin.id||"screenshare"===(null===(e=this.activeTab)||void 0===e?void 0:e.type)&&t.participant&&(null===(o=this.activeTab)||void 0===o?void 0:o.participant.id)===t.participant.id)&&(n=!0),"screenshare"===t.type){const r=t.participant,a=l(r.name);return i("rtk-button",{title:`${a}'s Screen Share`,key:t.participant.id,kind:"icon",variant:n?"primary":"secondary",class:{tab:!0,active:n},onClick:()=>this.tabChange.emit(t)},i("div",{class:"center col"},i("rtk-icon",{icon:this.iconPack.share_screen_person}),i("span",{class:"name"},r.id===(null===(s=this.meeting)||void 0===s?void 0:s.self.id)?this.t("you"):p(a,6))))}if("plugin"===t.type){const r=t.plugin;return i("rtk-button",{title:r.name,key:r.id,kind:"icon",variant:n?"primary":"secondary",class:{tab:!0,active:n},onClick:()=>this.tabChange.emit(t)},i("div",{class:"center col"},i("img",{src:r.picture}),i("span",{class:"name"},p(r.name,6))))}})))}};v([c()],g.prototype,"size",void 0),v([c()],g.prototype,"meeting",void 0),v([c()],g.prototype,"states",void 0),v([c()],g.prototype,"iconPack",void 0),v([c()],g.prototype,"t",void 0),g.style=".scrollbar{scrollbar-width:thin;scrollbar-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))\n var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar{height:var(--rtk-space-1\\.5, 6px);width:var(--rtk-space-1\\.5, 6px);border-radius:9999px;background-color:var(--rtk-scrollbar-background, transparent)}.scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;background-color:var(--rtk-scrollbar-color, rgb(var(--rtk-colors-background-600, 60 60 60)))}:host{box-sizing:border-box;display:flex;height:100%;width:var(--rtk-space-16, 64px);flex-direction:column;gap:var(--rtk-space-2, 8px);overflow-y:auto;font-family:var(--rtk-font-family, sans-serif)}rtk-button{z-index:10}.col{display:flex;flex-direction:column;align-items:center}.tab{display:flex;height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px);align-items:center;justify-content:center;margin-bottom:var(--rtk-space-2, 8px);font-size:12px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}.tab.active{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity))}.tab img{height:var(--rtk-space-7, 28px);width:var(--rtk-space-7, 28px);border-radius:var(--rtk-border-radius-sm, 4px)}.tab .name{margin-top:var(--rtk-space-0\\.5, 2px)}:host([size='sm']){flex-direction:column;margin-top:var(--rtk-space-4, 16px);height:var(--rtk-space-16, 64px);width:100%;flex-direction:row;gap:var(--rtk-space-2, 8px);overflow-x:auto}:host([size='sm']) .tab{margin:var(--rtk-space-0, 0px);text-overflow:clip;min-width:100px;height:40px}:host([size='sm']) .tab .col{display:flex;flex-direction:row;align-items:center;gap:var(--rtk-space-2, 8px)}:host([size='sm']) .tab .col img,:host([size='sm']) .tab .col rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host([size='sm']) .tab .col .name{gap:var(--rtk-space-1, 4px)}:host([layout='column']){flex-direction:column}:host([layout='column']) .aside{flex:2;max-width:100%;width:100%}@media (orientation: portrait){:host([size='sm']){margin-top:var(--rtk-space-2, 8px);height:var(--rtk-space-16, 64px);width:100%;flex-direction:row;transition:all 0.3s linear}:host([size='md']){height:var(--rtk-space-24, 96px);width:100%;flex-direction:row;transition:all 0.3s linear}:host .tab{margin:var(--rtk-space-0, 0px)}}@media (orientation: landscape){:host([size='sm']){margin-right:var(--rtk-space-4, 16px);height:100%;width:var(--rtk-space-14, 56px);flex-direction:row;gap:var(--rtk-space-2, 8px);overflow-y:auto;overflow-x:hidden;transition:all 0.3s linear}:host([size='md']){margin-right:var(--rtk-space-4, 16px);height:100%;width:var(--rtk-space-14, 56px);flex-direction:row;gap:var(--rtk-space-2, 8px);overflow-y:auto;overflow-x:hidden;transition:all 0.3s linear}:host .tab{margin:var(--rtk-space-0, 0px)}:host([size='sm']) .tab{margin:var(--rtk-space-0, 0px);width:100%;text-overflow:clip;min-width:0px;min-height:40px}:host([size='sm']) .tab .col{display:flex;flex-direction:column;align-items:center;gap:var(--rtk-space-2, 8px);font-size:10px}:host([size='sm']) .tab .col img,:host([size='sm']) .tab .col rtk-icon{height:var(--rtk-space-3, 12px);width:var(--rtk-space-3, 12px)}:host([size='sm']) .tab .col .name{gap:var(--rtk-space-1, 4px)}}";export{h as rtk_plugin_main,g as rtk_tab_bar}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e,a}from"./p-0ee570cd.js";import{a as h,c as n,d as c,F as o}from"./p-b9281511.js";import{l as r,R as d}from"./p-c8eaa707.js";import{f as l,s as f}from"./p-338c7261.js";import{c as p,b,o as v,s as k,h as m}from"./p-31964573.js";import{S as u}from"./p-a1278d45.js";import{d as g}from"./p-a08b5a59.js";import"./p-2c3cda13.js";var y=function(t,i,s,e){var a,h=arguments.length,n=h<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,s,e);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(n=(h<3?a(n):h>3?a(i,s,n):a(i,s))||n);return h>3&&n&&Object.defineProperty(i,s,n),n};const x=class{constructor(s){t(this,s),this.rtkSendNotification=i(this,"rtkSendNotification",7),this.pinnedListener=({isPinned:t})=>{this.isPinned=t},this.toggleTileListener=({hidden:t})=>{this.isHidden=t},this.stageListener=({stageStatus:t})=>{this.isOnStage="ON_STAGE"===t},this.view="sidebar",this.iconPack=h,this.t=n(),this.config=c,this.audioEnabled=!1,this.videoEnabled=!1,this.isPinned=!1,this.isHidden=!1,this.isOnStage=!1,this.canDisableParticipantAudio=!1,this.canDisableParticipantVideo=!1,this.canKickParticipant=!1,this.canPinParticipant=!1,this.canAllowParticipantOnStage=!1,this.menuOpen=!1,this.permissionsUpdateListener=()=>{this.meetingChanged(this.meeting)},this.inviteToStageToggle=async()=>{const t=this.participant,{stage:i}=this.meeting;"ACCEPTED_TO_JOIN_STAGE"!==t.stageStatus?(this.isOnStage?(t.isPinned&&t.unpin(),await i.kick([t.userId])):(await i.grantAccess([t.userId]),this.rtkSendNotification.emit({message:`${t.name} ${this.t("stage.invited_notification")}`,trace:`join-stage-invite-${t.id}`})),this.isOnStage="ON_STAGE"===t.stageStatus):this.rtkSendNotification.emit({message:`${t.name} ${this.t("stage.invited_notification")}`,trace:`join-stage-${t.id}`})},this.handleOutsideClick=t=>{!t.composedPath().includes(this.host)&&this.menuOpen&&(this.menuOpen=!1)},this.update=()=>{const t=this.host.shadowRoot.getElementById("trigger"),i=this.host.shadowRoot.getElementById("menu-list");p(t,i,{placement:"bottom-end",middleware:[b({allowedPlacements:["bottom-end","top-end"],alignment:"end"}),v(4),k({padding:8}),m()]}).then((({x:t,y:s,placement:e})=>{let a=null;a="bottom-end"===e?{right:`${t}px`,top:`${s}px`}:{right:`${t}px`,bottom:`${s}px`},Object.assign(i.style,a)}))},this.onMenuToggle=()=>{this.menuOpen=!this.menuOpen,this.menuOpen&&this.update()}}connectedCallback(){this.meetingChanged(this.meeting),this.participantChanged(this.participant),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){var t;document.removeEventListener("click",this.handleOutsideClick),null===(t=this.meeting)||void 0===t||t.self.permissions.removeListener("permissionsUpdate",this.permissionsUpdateListener),null!=this.participant&&null!=this.participant.removeListener&&(this.audioUpdateListener&&this.participant.removeListener("audioUpdate",this.audioUpdateListener),this.videoUpdateListener&&this.participant.removeListener("videoUpdate",this.videoUpdateListener),this.participant.removeListener("pinned",this.pinnedListener),this.participant.removeListener("unpinned",this.pinnedListener),this.participant.removeListener("stageStatusUpdate",this.stageListener),this.participant.removeListener("toggleTile",this.toggleTileListener))}meetingChanged(t){var i,s,e,a,h,n,c;if(null!=t){const{self:r}=t;this.canDisableParticipantAudio=r.permissions.canAllowParticipantAudio||r.permissions.canDisableParticipantAudio,this.canDisableParticipantVideo=r.permissions.canAllowParticipantVideo||r.permissions.canDisableParticipantVideo,this.canKickParticipant=r.permissions.kickParticipant&&!0!==(null===(i=this.meeting)||void 0===i?void 0:i.__internals__.features.hasFeature(o.DISABLE_KICKING))&&(!0!==(null===(s=this.meeting)||void 0===s?void 0:s.__internals__.features.hasFeature(o.ADMIN_CANTREMOVE_ADMIN))||"webinar_admin"!==(null===(e=this.participant)||void 0===e?void 0:e.presetName)),this.canPinParticipant=r.permissions.pinParticipant,this.canAllowParticipantOnStage=r.permissions.acceptStageRequests&&r.permissions.stageEnabled&&(!0!==(null===(a=this.meeting)||void 0===a?void 0:a.__internals__.features.hasFeature(o.ADMIN_CANTREMOVE_ADMIN))||"webinar_admin"!==(null===(h=this.participant)||void 0===h?void 0:h.presetName))&&(!0!==(null===(n=this.meeting)||void 0===n?void 0:n.__internals__.features.hasFeature(o.CANTINVITE_VIEWER))||"webinar_viewer"!==(null===(c=this.participant)||void 0===c?void 0:c.presetName)),t.self.permissions.addListener("permissionsUpdate",this.permissionsUpdateListener)}}participantChanged(t){var i;if(null!=t){if(this.audioEnabled=t.audioEnabled,this.videoEnabled=t.videoEnabled,this.isPinned=t.isPinned,this.isHidden=null!==(i=t.hidden)&&void 0!==i&&i,this.isOnStage="ON_STAGE"===t.stageStatus,this.audioUpdateListener=({audioEnabled:t})=>{this.audioEnabled=t},this.videoUpdateListener=({videoEnabled:t})=>{this.videoEnabled=t},null==t.addListener)return;t.addListener("audioUpdate",this.audioUpdateListener),t.addListener("videoUpdate",this.videoUpdateListener),t.addListener("pinned",this.pinnedListener),t.addListener("unpinned",this.pinnedListener),t.addListener("stageStatusUpdate",this.stageListener),this.participant.addListener("toggleTile",this.toggleTileListener)}}render(){var t,i,a,h,n,c,o,p,b;const v="AUDIO_ROOM"===(null===(t=this.meeting)||void 0===t?void 0:t.meta.viewType),k=(null===(i=this.meeting)||void 0===i?void 0:i.self.id)===this.participant.id,m=this.canDisableParticipantAudio&&this.audioEnabled||this.canDisableParticipantVideo&&this.videoEnabled&&!v||this.canKickParticipant||this.canPinParticipant&&this.isOnStage||this.canAllowParticipantOnStage,u=l((null===(a=this.participant)||void 0===a?void 0:a.name)||""),g=this.isOnStage||["GROUP_CALL","AUDIO_ROOM"].includes(null===(h=this.meeting)||void 0===h?void 0:h.meta.viewType),y={meeting:this.meeting,size:"sm",states:this.states,config:this.config,iconPack:this.iconPack,t:this.t};return s(e,{key:"9a717049edf15cfec3e497a30a37f873dcb37fd8"},s("div",{class:"left",key:null===(n=this.participant)||void 0===n?void 0:n.id},s("rtk-avatar",{key:"4e161f74ce11be1050c95556065867289ab618b2",participant:this.participant,size:"sm",iconPack:this.iconPack,t:this.t}),s("p",{key:"c1e71db1ba1ed2e8defbbb9802c22df8b64670fc",class:"name",title:u},f(u,16)," ",(null===(c=this.meeting)||void 0===c?void 0:c.self.id)===(null===(o=this.participant)||void 0===o?void 0:o.id)&&this.t("(you)"))),"sidebar"===this.view&&s("div",{key:"165e14ba9f5e063820c6f440dc9eb03344e7bcdf",class:"right"},g&&s("rtk-icon",{key:"d6651dc9e7eb12ed56742f08096ef239bd4429c1",class:{red:!this.audioEnabled},icon:this.audioEnabled?this.iconPack.mic_on:this.iconPack.mic_off}),g&&!v&&s("rtk-icon",{key:"89506d158acdb3e2629a7a2ab51aef475f9f3b75",class:{red:!this.videoEnabled},icon:this.videoEnabled?this.iconPack.video_on:this.iconPack.video_off}),(m||r({element:"rtk-participant",defaults:y,childProps:{participant:this.participant}})>0)&&s("div",{key:"202a957dfe004c8c1f2195bf93c9ce9ce167a96f",class:"menu"},s("span",{key:"a01163f9da5fab4a1d7922f8abfe5a2e4a4dcf2c",id:"trigger",onClick:this.onMenuToggle},s("rtk-button",{key:"144e0c418b6a038d560f8087825471b649229ecb",variant:"ghost",kind:"icon",slot:"trigger"},s("rtk-icon",{key:"18abb20a0969e0332d8fe2b5dcfe41bfc66955f7",class:"more",icon:this.iconPack.more_vertical}))),s("span",{key:"3a22ebe5a21228b6ea6e15933d961b24085dce44",id:"menu-list"},this.menuOpen&&s("rtk-menu-list",{key:"86688ad10d1440c5b534fe2f002225e0368ae24a",iconPack:this.iconPack,t:this.t},this.canPinParticipant&&g&&!v&&s("rtk-menu-item",{key:"c22833b86d8583bdaec723a269afa7298cb0ca0d",onClick:()=>{this.isPinned?this.participant.unpin():this.participant.pin()},iconPack:this.iconPack,t:this.t},s("rtk-icon",{key:"9cdde53aaffca1f0042a69048b77f31fc10c69d6",icon:this.isPinned?this.iconPack.pin_off:this.iconPack.pin,slot:"start"}),this.t(this.isPinned?"unpin":"pin")),k&&s("rtk-menu-item",{key:"b651953a9b02065ca223c46dd7dbadedc8401031",iconPack:this.iconPack,t:this.t,onClick:()=>{this.isHidden?this.participant.show():this.participant.hide()}},s("rtk-icon",{key:"e63383cca42314f8ac0a9a03d13948b4eb5ced8c",icon:this.isHidden?this.iconPack.minimize:this.iconPack.maximize,slot:"start"}),this.t(this.meeting.self.hidden?"maximize":"minimize")),this.canDisableParticipantAudio&&g&&this.audioEnabled&&s("rtk-menu-item",{key:"86f670083fa1000cc99c5a57d4da2cb789c88aee",iconPack:this.iconPack,t:this.t,onClick:()=>{this.participant.disableAudio()}},s("rtk-icon",{key:"d75504ef4431c83efea2d281baad6a10c8a2e3b3",icon:this.iconPack.mic_off,slot:"start"}),this.t("mute")),this.canDisableParticipantVideo&&g&&this.videoEnabled&&s("rtk-menu-item",{key:"2634fae26bc72fec773f3a7f85fad7ebc1cfca11",iconPack:this.iconPack,t:this.t,onClick:()=>{this.participant.disableVideo()}},s("rtk-icon",{key:"57d51380b52a20a8f9dfc51931401712f4d67f26",icon:this.iconPack.video_off,slot:"start"}),this.t("participants.turn_off_video")),this.canAllowParticipantOnStage&&(null===(p=this.participant)||void 0===p?void 0:p.id)!==(null===(b=this.meeting)||void 0===b?void 0:b.self.id)&&s("rtk-menu-item",{key:"64ab2f51f494b8d3d445ae9aece430e8c0fca673",iconPack:this.iconPack,t:this.t,class:this.isOnStage?"red":"",onClick:this.inviteToStageToggle},s("rtk-icon",{key:"5633f66f3679bfc3b6e87a55cfb884e63260767c",icon:this.isOnStage?this.iconPack.leave_stage:this.iconPack.join_stage,slot:"start"}),this.t(this.isOnStage?"stage.remove_from_stage":"stage.add_to_stage")),!k&&this.canKickParticipant&&s("rtk-menu-item",{key:"664e9b1c843aa0cc7a47062b4f353a8e1105a368",iconPack:this.iconPack,t:this.t,class:"red",onClick:()=>{var t,i;null===(t=this.meeting)||void 0===t||t.participants.kick(null===(i=this.participant)||void 0===i?void 0:i.id)}},s("rtk-icon",{key:"10cb3a42b4c861241d983d9cb1ebfe594500fbc3",icon:this.iconPack.dismiss,slot:"start"}),this.t("kick")),s("slot",{key:"ed681666f5bb8bf06a6fac4b929853d9b6bc704c"},s(d,{key:"8177a2248bf03ffbe26a7f0f560eb81439a00fb3",element:"rtk-participant",defaults:y,childProps:{participant:this.participant},deepProps:!0,onlyChildren:!0})))))))}get host(){return a(this)}static get watchers(){return{meeting:["meetingChanged"],participant:["participantChanged"]}}};y([u()],x.prototype,"meeting",void 0),y([u()],x.prototype,"states",void 0),y([u()],x.prototype,"iconPack",void 0),y([u()],x.prototype,"t",void 0),x.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:relative;display:flex;height:var(--rtk-space-14, 56px);align-items:center;justify-content:space-between;cursor:pointer;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}:host rtk-avatar{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);font-size:14px}.left{display:flex;align-items:center}.left>*{margin-right:var(--rtk-space-2, 8px)}.left>*:last-child{margin-right:var(--rtk-space-0, 0px)}.right{display:flex;align-items:center;justify-content:flex-end}.right>*{margin-left:var(--rtk-space-2, 8px)}.right>*:first-child{margin-left:var(--rtk-space-0, 0px)}.name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}rtk-icon.red{--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}rtk-icon.more{cursor:pointer}.menu{position:relative;display:inline-block;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}#menu-list{position:absolute;top:var(--rtk-space-8, 32px) !important;right:var(--rtk-space-4, 16px) !important;z-index:20}";const w=class{constructor(i){t(this,i),this.items=[],this.itemHeight=55,this.bufferedItemsCount=5,this.emptyListElement=null,this.visibleStart=0,this.visibleEnd=0,this.containerHeight=0,this.lastScrollTop=0,this.recalculatePositioning=()=>{this.updateContainerHeight(),requestAnimationFrame((()=>{this.updateItemHeight()}))},this.updateContainerHeight=()=>{this.el.querySelector(".virtual-list-container").clientHeight&&(requestAnimationFrame((()=>{this.updateItemHeight()})),this.containerHeight=this.el.querySelector(".virtual-list-container").clientHeight,this.updateVisibleRange())},this.onScroll=g((()=>{const t=this.el.querySelector(".virtual-list-container").scrollTop;t>this.lastScrollTop&&this.visibleEnd===this.items.length||(this.lastScrollTop=t,this.updateVisibleRange())}))}itemsChanged(){this.recalculatePositioning()}componentDidLoad(){this.recalculatePositioning(),this.el.querySelector(".virtual-list-container").addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.recalculatePositioning)}componentDidUpdate(){this.updateItemHeight()}disconnectedCallback(){this.el.querySelector(".virtual-list-container").removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.recalculatePositioning)}updateVisibleRange(){const t=this.el.querySelector(".virtual-list-container").scrollTop,i=Math.floor(t/this.itemHeight),s=Math.ceil(this.containerHeight/this.itemHeight),e=Math.min(this.items.length,i+s+this.bufferedItemsCount);this.visibleStart=i,this.visibleEnd=e,this.el.querySelector(".virtual-list-container").scrollTop=this.lastScrollTop}updateItemHeight(){const t=this.el.querySelector(".virtual-list-item");if(t){const i=t.style.height;t.style.height="auto";const s=t.getBoundingClientRect().height;i&&(t.style.height=i),s&&Math.floor(s)!==Math.floor(this.itemHeight)&&(this.itemHeight=s)}}renderItems(){return this.items.slice(this.visibleStart,this.visibleEnd).map(((t,i)=>{const e=this.visibleStart+i;return s("div",{class:"virtual-list-item",key:t.id,style:{position:"absolute",top:e*this.itemHeight+"px",height:`${this.itemHeight}px`,width:"100%"}},this.renderItem(t,e))}))}render(){var t;return s("div",{key:"f46088e437f2da25f0599d9050d3b45f01a08323",class:"virtual-list-container",style:{position:"relative",height:"100%",overflowX:"hidden",overflowY:"auto"}},s("div",{key:"b980284407bddc11ba6b9a365eff13601b694732",style:{height:this.items.length*this.itemHeight+"px",position:"relative"}},(null===(t=this.items)||void 0===t?void 0:t.length)?this.renderItems():this.emptyListElement),s("div",{key:"aca29d6c447481589c4928ad04ced0f2f926681b",style:{height:`${this.itemHeight}px`}}))}get el(){return a(this)}static get watchers(){return{items:["itemsChanged"]}}};w.style=":host{height:100%;width:100%}";export{x as rtk_participant,w as rtk_virtualized_participant_list}
1
+ import{r as t,c as i,h as s,H as e,a}from"./p-0ee570cd.js";import{a as h,c as n,d as c,F as o}from"./p-ee167b96.js";import{l as r,R as d}from"./p-c8eaa707.js";import{f as l,s as f}from"./p-338c7261.js";import{c as p,b,o as v,s as k,h as m}from"./p-31964573.js";import{S as u}from"./p-2aa242f4.js";import{d as g}from"./p-a08b5a59.js";import"./p-2c3cda13.js";var y=function(t,i,s,e){var a,h=arguments.length,n=h<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,s,e);else for(var c=t.length-1;c>=0;c--)(a=t[c])&&(n=(h<3?a(n):h>3?a(i,s,n):a(i,s))||n);return h>3&&n&&Object.defineProperty(i,s,n),n};const x=class{constructor(s){t(this,s),this.rtkSendNotification=i(this,"rtkSendNotification",7),this.pinnedListener=({isPinned:t})=>{this.isPinned=t},this.toggleTileListener=({hidden:t})=>{this.isHidden=t},this.stageListener=({stageStatus:t})=>{this.isOnStage="ON_STAGE"===t},this.view="sidebar",this.iconPack=h,this.t=n(),this.config=c,this.audioEnabled=!1,this.videoEnabled=!1,this.isPinned=!1,this.isHidden=!1,this.isOnStage=!1,this.canDisableParticipantAudio=!1,this.canDisableParticipantVideo=!1,this.canKickParticipant=!1,this.canPinParticipant=!1,this.canAllowParticipantOnStage=!1,this.menuOpen=!1,this.permissionsUpdateListener=()=>{this.meetingChanged(this.meeting)},this.inviteToStageToggle=async()=>{const t=this.participant,{stage:i}=this.meeting;"ACCEPTED_TO_JOIN_STAGE"!==t.stageStatus?(this.isOnStage?(t.isPinned&&t.unpin(),await i.kick([t.userId])):(await i.grantAccess([t.userId]),this.rtkSendNotification.emit({message:`${t.name} ${this.t("stage.invited_notification")}`,trace:`join-stage-invite-${t.id}`})),this.isOnStage="ON_STAGE"===t.stageStatus):this.rtkSendNotification.emit({message:`${t.name} ${this.t("stage.invited_notification")}`,trace:`join-stage-${t.id}`})},this.handleOutsideClick=t=>{!t.composedPath().includes(this.host)&&this.menuOpen&&(this.menuOpen=!1)},this.update=()=>{const t=this.host.shadowRoot.getElementById("trigger"),i=this.host.shadowRoot.getElementById("menu-list");p(t,i,{placement:"bottom-end",middleware:[b({allowedPlacements:["bottom-end","top-end"],alignment:"end"}),v(4),k({padding:8}),m()]}).then((({x:t,y:s,placement:e})=>{let a=null;a="bottom-end"===e?{right:`${t}px`,top:`${s}px`}:{right:`${t}px`,bottom:`${s}px`},Object.assign(i.style,a)}))},this.onMenuToggle=()=>{this.menuOpen=!this.menuOpen,this.menuOpen&&this.update()}}connectedCallback(){this.meetingChanged(this.meeting),this.participantChanged(this.participant),document.addEventListener("click",this.handleOutsideClick)}disconnectedCallback(){var t;document.removeEventListener("click",this.handleOutsideClick),null===(t=this.meeting)||void 0===t||t.self.permissions.removeListener("permissionsUpdate",this.permissionsUpdateListener),null!=this.participant&&null!=this.participant.removeListener&&(this.audioUpdateListener&&this.participant.removeListener("audioUpdate",this.audioUpdateListener),this.videoUpdateListener&&this.participant.removeListener("videoUpdate",this.videoUpdateListener),this.participant.removeListener("pinned",this.pinnedListener),this.participant.removeListener("unpinned",this.pinnedListener),this.participant.removeListener("stageStatusUpdate",this.stageListener),this.participant.removeListener("toggleTile",this.toggleTileListener))}meetingChanged(t){var i,s,e,a,h,n,c;if(null!=t){const{self:r}=t;this.canDisableParticipantAudio=r.permissions.canAllowParticipantAudio||r.permissions.canDisableParticipantAudio,this.canDisableParticipantVideo=r.permissions.canAllowParticipantVideo||r.permissions.canDisableParticipantVideo,this.canKickParticipant=r.permissions.kickParticipant&&!0!==(null===(i=this.meeting)||void 0===i?void 0:i.__internals__.features.hasFeature(o.DISABLE_KICKING))&&(!0!==(null===(s=this.meeting)||void 0===s?void 0:s.__internals__.features.hasFeature(o.ADMIN_CANTREMOVE_ADMIN))||"webinar_admin"!==(null===(e=this.participant)||void 0===e?void 0:e.presetName)),this.canPinParticipant=r.permissions.pinParticipant,this.canAllowParticipantOnStage=r.permissions.acceptStageRequests&&r.permissions.stageEnabled&&(!0!==(null===(a=this.meeting)||void 0===a?void 0:a.__internals__.features.hasFeature(o.ADMIN_CANTREMOVE_ADMIN))||"webinar_admin"!==(null===(h=this.participant)||void 0===h?void 0:h.presetName))&&(!0!==(null===(n=this.meeting)||void 0===n?void 0:n.__internals__.features.hasFeature(o.CANTINVITE_VIEWER))||"webinar_viewer"!==(null===(c=this.participant)||void 0===c?void 0:c.presetName)),t.self.permissions.addListener("permissionsUpdate",this.permissionsUpdateListener)}}participantChanged(t){var i;if(null!=t){if(this.audioEnabled=t.audioEnabled,this.videoEnabled=t.videoEnabled,this.isPinned=t.isPinned,this.isHidden=null!==(i=t.hidden)&&void 0!==i&&i,this.isOnStage="ON_STAGE"===t.stageStatus,this.audioUpdateListener=({audioEnabled:t})=>{this.audioEnabled=t},this.videoUpdateListener=({videoEnabled:t})=>{this.videoEnabled=t},null==t.addListener)return;t.addListener("audioUpdate",this.audioUpdateListener),t.addListener("videoUpdate",this.videoUpdateListener),t.addListener("pinned",this.pinnedListener),t.addListener("unpinned",this.pinnedListener),t.addListener("stageStatusUpdate",this.stageListener),this.participant.addListener("toggleTile",this.toggleTileListener)}}render(){var t,i,a,h,n,c,o,p,b;const v="AUDIO_ROOM"===(null===(t=this.meeting)||void 0===t?void 0:t.meta.viewType),k=(null===(i=this.meeting)||void 0===i?void 0:i.self.id)===this.participant.id,m=this.canDisableParticipantAudio&&this.audioEnabled||this.canDisableParticipantVideo&&this.videoEnabled&&!v||this.canKickParticipant||this.canPinParticipant&&this.isOnStage||this.canAllowParticipantOnStage,u=l((null===(a=this.participant)||void 0===a?void 0:a.name)||""),g=this.isOnStage||["GROUP_CALL","AUDIO_ROOM"].includes(null===(h=this.meeting)||void 0===h?void 0:h.meta.viewType),y={meeting:this.meeting,size:"sm",states:this.states,config:this.config,iconPack:this.iconPack,t:this.t};return s(e,{key:"9a717049edf15cfec3e497a30a37f873dcb37fd8"},s("div",{class:"left",key:null===(n=this.participant)||void 0===n?void 0:n.id},s("rtk-avatar",{key:"4e161f74ce11be1050c95556065867289ab618b2",participant:this.participant,size:"sm",iconPack:this.iconPack,t:this.t}),s("p",{key:"c1e71db1ba1ed2e8defbbb9802c22df8b64670fc",class:"name",title:u},f(u,16)," ",(null===(c=this.meeting)||void 0===c?void 0:c.self.id)===(null===(o=this.participant)||void 0===o?void 0:o.id)&&this.t("(you)"))),"sidebar"===this.view&&s("div",{key:"165e14ba9f5e063820c6f440dc9eb03344e7bcdf",class:"right"},g&&s("rtk-icon",{key:"d6651dc9e7eb12ed56742f08096ef239bd4429c1",class:{red:!this.audioEnabled},icon:this.audioEnabled?this.iconPack.mic_on:this.iconPack.mic_off}),g&&!v&&s("rtk-icon",{key:"89506d158acdb3e2629a7a2ab51aef475f9f3b75",class:{red:!this.videoEnabled},icon:this.videoEnabled?this.iconPack.video_on:this.iconPack.video_off}),(m||r({element:"rtk-participant",defaults:y,childProps:{participant:this.participant}})>0)&&s("div",{key:"202a957dfe004c8c1f2195bf93c9ce9ce167a96f",class:"menu"},s("span",{key:"a01163f9da5fab4a1d7922f8abfe5a2e4a4dcf2c",id:"trigger",onClick:this.onMenuToggle},s("rtk-button",{key:"144e0c418b6a038d560f8087825471b649229ecb",variant:"ghost",kind:"icon",slot:"trigger"},s("rtk-icon",{key:"18abb20a0969e0332d8fe2b5dcfe41bfc66955f7",class:"more",icon:this.iconPack.more_vertical}))),s("span",{key:"3a22ebe5a21228b6ea6e15933d961b24085dce44",id:"menu-list"},this.menuOpen&&s("rtk-menu-list",{key:"86688ad10d1440c5b534fe2f002225e0368ae24a",iconPack:this.iconPack,t:this.t},this.canPinParticipant&&g&&!v&&s("rtk-menu-item",{key:"c22833b86d8583bdaec723a269afa7298cb0ca0d",onClick:()=>{this.isPinned?this.participant.unpin():this.participant.pin()},iconPack:this.iconPack,t:this.t},s("rtk-icon",{key:"9cdde53aaffca1f0042a69048b77f31fc10c69d6",icon:this.isPinned?this.iconPack.pin_off:this.iconPack.pin,slot:"start"}),this.t(this.isPinned?"unpin":"pin")),k&&s("rtk-menu-item",{key:"b651953a9b02065ca223c46dd7dbadedc8401031",iconPack:this.iconPack,t:this.t,onClick:()=>{this.isHidden?this.participant.show():this.participant.hide()}},s("rtk-icon",{key:"e63383cca42314f8ac0a9a03d13948b4eb5ced8c",icon:this.isHidden?this.iconPack.minimize:this.iconPack.maximize,slot:"start"}),this.t(this.meeting.self.hidden?"maximize":"minimize")),this.canDisableParticipantAudio&&g&&this.audioEnabled&&s("rtk-menu-item",{key:"86f670083fa1000cc99c5a57d4da2cb789c88aee",iconPack:this.iconPack,t:this.t,onClick:()=>{this.participant.disableAudio()}},s("rtk-icon",{key:"d75504ef4431c83efea2d281baad6a10c8a2e3b3",icon:this.iconPack.mic_off,slot:"start"}),this.t("mute")),this.canDisableParticipantVideo&&g&&this.videoEnabled&&s("rtk-menu-item",{key:"2634fae26bc72fec773f3a7f85fad7ebc1cfca11",iconPack:this.iconPack,t:this.t,onClick:()=>{this.participant.disableVideo()}},s("rtk-icon",{key:"57d51380b52a20a8f9dfc51931401712f4d67f26",icon:this.iconPack.video_off,slot:"start"}),this.t("participants.turn_off_video")),this.canAllowParticipantOnStage&&(null===(p=this.participant)||void 0===p?void 0:p.id)!==(null===(b=this.meeting)||void 0===b?void 0:b.self.id)&&s("rtk-menu-item",{key:"64ab2f51f494b8d3d445ae9aece430e8c0fca673",iconPack:this.iconPack,t:this.t,class:this.isOnStage?"red":"",onClick:this.inviteToStageToggle},s("rtk-icon",{key:"5633f66f3679bfc3b6e87a55cfb884e63260767c",icon:this.isOnStage?this.iconPack.leave_stage:this.iconPack.join_stage,slot:"start"}),this.t(this.isOnStage?"stage.remove_from_stage":"stage.add_to_stage")),!k&&this.canKickParticipant&&s("rtk-menu-item",{key:"664e9b1c843aa0cc7a47062b4f353a8e1105a368",iconPack:this.iconPack,t:this.t,class:"red",onClick:()=>{var t,i;null===(t=this.meeting)||void 0===t||t.participants.kick(null===(i=this.participant)||void 0===i?void 0:i.id)}},s("rtk-icon",{key:"10cb3a42b4c861241d983d9cb1ebfe594500fbc3",icon:this.iconPack.dismiss,slot:"start"}),this.t("kick")),s("slot",{key:"ed681666f5bb8bf06a6fac4b929853d9b6bc704c"},s(d,{key:"8177a2248bf03ffbe26a7f0f560eb81439a00fb3",element:"rtk-participant",defaults:y,childProps:{participant:this.participant},deepProps:!0,onlyChildren:!0})))))))}get host(){return a(this)}static get watchers(){return{meeting:["meetingChanged"],participant:["participantChanged"]}}};y([u()],x.prototype,"meeting",void 0),y([u()],x.prototype,"states",void 0),y([u()],x.prototype,"iconPack",void 0),y([u()],x.prototype,"t",void 0),x.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{position:relative;display:flex;height:var(--rtk-space-14, 56px);align-items:center;justify-content:space-between;cursor:pointer;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}:host rtk-avatar{height:var(--rtk-space-8, 32px);width:var(--rtk-space-8, 32px);font-size:14px}.left{display:flex;align-items:center}.left>*{margin-right:var(--rtk-space-2, 8px)}.left>*:last-child{margin-right:var(--rtk-space-0, 0px)}.right{display:flex;align-items:center;justify-content:flex-end}.right>*{margin-left:var(--rtk-space-2, 8px)}.right>*:first-child{margin-left:var(--rtk-space-0, 0px)}.name{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}rtk-icon.red{--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}rtk-icon.more{cursor:pointer}.menu{position:relative;display:inline-block;color:rgb(var(--rtk-colors-text-1000, 255 255 255))}#menu-list{position:absolute;top:var(--rtk-space-8, 32px) !important;right:var(--rtk-space-4, 16px) !important;z-index:20}";const w=class{constructor(i){t(this,i),this.items=[],this.itemHeight=55,this.bufferedItemsCount=5,this.emptyListElement=null,this.visibleStart=0,this.visibleEnd=0,this.containerHeight=0,this.lastScrollTop=0,this.recalculatePositioning=()=>{this.updateContainerHeight(),requestAnimationFrame((()=>{this.updateItemHeight()}))},this.updateContainerHeight=()=>{this.el.querySelector(".virtual-list-container").clientHeight&&(requestAnimationFrame((()=>{this.updateItemHeight()})),this.containerHeight=this.el.querySelector(".virtual-list-container").clientHeight,this.updateVisibleRange())},this.onScroll=g((()=>{const t=this.el.querySelector(".virtual-list-container").scrollTop;t>this.lastScrollTop&&this.visibleEnd===this.items.length||(this.lastScrollTop=t,this.updateVisibleRange())}))}itemsChanged(){this.recalculatePositioning()}componentDidLoad(){this.recalculatePositioning(),this.el.querySelector(".virtual-list-container").addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.recalculatePositioning)}componentDidUpdate(){this.updateItemHeight()}disconnectedCallback(){this.el.querySelector(".virtual-list-container").removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.recalculatePositioning)}updateVisibleRange(){const t=this.el.querySelector(".virtual-list-container").scrollTop,i=Math.floor(t/this.itemHeight),s=Math.ceil(this.containerHeight/this.itemHeight),e=Math.min(this.items.length,i+s+this.bufferedItemsCount);this.visibleStart=i,this.visibleEnd=e,this.el.querySelector(".virtual-list-container").scrollTop=this.lastScrollTop}updateItemHeight(){const t=this.el.querySelector(".virtual-list-item");if(t){const i=t.style.height;t.style.height="auto";const s=t.getBoundingClientRect().height;i&&(t.style.height=i),s&&Math.floor(s)!==Math.floor(this.itemHeight)&&(this.itemHeight=s)}}renderItems(){return this.items.slice(this.visibleStart,this.visibleEnd).map(((t,i)=>{const e=this.visibleStart+i;return s("div",{class:"virtual-list-item",key:t.id,style:{position:"absolute",top:e*this.itemHeight+"px",height:`${this.itemHeight}px`,width:"100%"}},this.renderItem(t,e))}))}render(){var t;return s("div",{key:"1a35b2155ffba410d278513dbdfeb7fd238443d8",class:"virtual-list-container",style:{position:"relative",height:"100%",overflowX:"hidden",overflowY:"auto"}},s("div",{key:"90f445de9af8464c23dbd931f46600e015839d4f",style:{height:this.items.length*this.itemHeight+"px",position:"relative"}},(null===(t=this.items)||void 0===t?void 0:t.length)?this.renderItems():this.emptyListElement),s("div",{key:"b7acc66cc75273c722b5a9c78949c67d785d5725",style:{height:`${this.itemHeight}px`}}))}get el(){return a(this)}static get watchers(){return{items:["itemsChanged"]}}};w.style=":host{height:100%;width:100%}";export{x as rtk_participant,w as rtk_virtualized_participant_list}
@@ -1 +1 @@
1
- import{r as t,h as i,H as s,a as e}from"./p-0ee570cd.js";import{d as a,a as d,c as h}from"./p-b9281511.js";import{d as r}from"./p-b13ddb7d.js";import{R as o}from"./p-c8eaa707.js";import{S as m}from"./p-a1278d45.js";var c=function(t,i,s,e){var a,d=arguments.length,h=d<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,i,s,e);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(h=(d<3?a(h):d>3?a(i,s,h):a(i,s))||h);return d>3&&h&&Object.defineProperty(i,s,h),h};const n=class{constructor(i){t(this,i),this.layout="row",this.participants=[],this.pinnedParticipants=[],this.aspectRatio="16:9",this.gap=8,this.config=a,this.iconPack=d,this.t=h(),this.gridSize=r,this.getAdaptiveSize=t=>"sm"===this.size||t>3||"md"===this.size?"sm":"md"}render(){const t={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},e=this.participants.filter((t=>this.pinnedParticipants.some((i=>i.id!=t.id))));return i(s,{key:"f969a4a4e84d759236f508c76b1f17f2ca6c86fc"},i("main",{key:"2b3a1b073a00b9a4ce2ef52ac16135032c5bca16",part:"main"},i(o,{key:"0173d3ee87d82e2aa2cfd67d4c4a9539545c725d",element:"rtk-simple-grid",defaults:t,props:{part:"main-grid",participants:this.pinnedParticipants,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(this.pinnedParticipants.length)}})),e.length>0&&i("aside",{key:"f6432185ad98bf81d7c76cd9abb26a17973692f8",part:"aside",class:this.gridSize.spotlight?`grid-width-${this.gridSize.spotlight}`:"grid-width-md"},i(o,{key:"504cc9d09a30d0fb00533aa9bfbd33353b0bd08a",element:"rtk-simple-grid",defaults:t,props:{part:"aside-grid",participants:e,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(e.length)}})))}get host(){return e(this)}};c([m()],n.prototype,"size",void 0),c([m()],n.prototype,"meeting",void 0),c([m()],n.prototype,"states",void 0),c([m()],n.prototype,"iconPack",void 0),c([m()],n.prototype,"t",void 0),n.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:100%;width:100%}main{flex:1 1 0%}.grid-width-sm{width:25%}.grid-width-md{width:50%}.grid-width-lg{width:66.666667%}:host([size='sm']),:host([size='md']){flex-direction:column}:host([size='md']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='md']) .grid-width-sm{height:25%}:host([size='md']) .grid-width-md{height:50%}:host([size='md']) .grid-width-lg{height:66.666667%}:host([size='sm']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='sm']) .grid-width-sm,:host([size='sm']) .grid-width-md,:host([size='sm']) .grid-width-lg{height:50%}:host([size='xl']) .grid-width-sm,:host([size='xl']) .grid-width-md,:host([size='xl']) .grid-width-lg{width:400px}:host([layout='column']){flex-direction:column}:host([layout='column']) main{flex:4}:host([layout='column']) aside{flex:2;max-width:100%;width:100%}";export{n as rtk_spotlight_grid}
1
+ import{r as t,h as i,H as s,a as e}from"./p-0ee570cd.js";import{d as a,a as h,c as d}from"./p-ee167b96.js";import{d as r}from"./p-b13ddb7d.js";import{R as o}from"./p-c8eaa707.js";import{S as m}from"./p-2aa242f4.js";var c=function(t,i,s,e){var a,h=arguments.length,d=h<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(t,i,s,e);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(d=(h<3?a(d):h>3?a(i,s,d):a(i,s))||d);return h>3&&d&&Object.defineProperty(i,s,d),d};const n=class{constructor(i){t(this,i),this.layout="row",this.participants=[],this.pinnedParticipants=[],this.aspectRatio="16:9",this.gap=8,this.config=a,this.iconPack=h,this.t=d(),this.gridSize=r,this.getAdaptiveSize=t=>"sm"===this.size||t>3||"md"===this.size?"sm":"md"}render(){const t={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},e=this.participants.filter((t=>this.pinnedParticipants.some((i=>i.id!=t.id))));return i(s,{key:"78a47e090097d8c758b7e78678c60c66231559e4"},i("main",{key:"405ea4039c11b49abe9b7636f94b966b2a02388f",part:"main"},i(o,{key:"bff026528181c24c2c761aa354678cb61aa01169",element:"rtk-simple-grid",defaults:t,props:{part:"main-grid",participants:this.pinnedParticipants,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(this.pinnedParticipants.length)}})),e.length>0&&i("aside",{key:"f2f77d8371fef0a83c5682d0dd7bf4d6c57ea69b",part:"aside",class:this.gridSize.spotlight?`grid-width-${this.gridSize.spotlight}`:"grid-width-md"},i(o,{key:"ba9e91c14b812c650275c4ae99bd602fb0f16aa0",element:"rtk-simple-grid",defaults:t,props:{part:"aside-grid",participants:e,aspectRatio:this.aspectRatio,gap:this.gap,size:this.getAdaptiveSize(e.length)}})))}get host(){return e(this)}};c([m()],n.prototype,"size",void 0),c([m()],n.prototype,"meeting",void 0),c([m()],n.prototype,"states",void 0),c([m()],n.prototype,"iconPack",void 0),c([m()],n.prototype,"t",void 0),n.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:flex;height:100%;width:100%}main{flex:1 1 0%}.grid-width-sm{width:25%}.grid-width-md{width:50%}.grid-width-lg{width:66.666667%}:host([size='sm']),:host([size='md']){flex-direction:column}:host([size='md']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='md']) .grid-width-sm{height:25%}:host([size='md']) .grid-width-md{height:50%}:host([size='md']) .grid-width-lg{height:66.666667%}:host([size='sm']) aside{max-height:var(--rtk-space-96, 384px);width:100%;max-width:100%}:host([size='sm']) .grid-width-sm,:host([size='sm']) .grid-width-md,:host([size='sm']) .grid-width-lg{height:50%}:host([size='xl']) .grid-width-sm,:host([size='xl']) .grid-width-md,:host([size='xl']) .grid-width-lg{width:400px}:host([layout='column']){flex-direction:column}:host([layout='column']) main{flex:4}:host([layout='column']) aside{flex:2;max-width:100%;width:100%}";export{n as rtk_spotlight_grid}
@@ -1 +1 @@
1
- import{r as t,h as i,H as r}from"./p-0ee570cd.js";import{a as e,c as s}from"./p-b9281511.js";import{S as a}from"./p-a1278d45.js";var o=function(t,i,r,e){var s,a=arguments.length,o=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,r,e);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(o=(a<3?s(o):a>3?s(i,r,o):s(i,r))||o);return a>3&&o&&Object.defineProperty(i,r,o),o};const n=class{constructor(i){t(this,i),this.iconPack=e,this.t=s(),this.permissionsUpdateListener=()=>{this.canSpotlight=this.meeting.self.permissions.canSpotlight}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null===(t=this.meeting)||void 0===t||t.self.permissions.removeListener("permissionsUpdate",this.permissionsUpdateListener)}meetingChanged(t){var i,r;null!=t&&(this.canSpotlight=t.self.permissions.canSpotlight,this.isSpotlighted=null!==(r=null===(i=t.meta)||void 0===i?void 0:i.broadcastTabChanges)&&void 0!==r&&r,t.self.permissions.addListener("permissionsUpdate",this.permissionsUpdateListener))}updateSpotlightState(t){var i;try{null===(i=this.meeting.meta)||void 0===i||i.setBroadcastTabChanges(t),this.isSpotlighted=t}catch(t){console.error(t)}}render(){if(this.canSpotlight)return i(r,null,i("rtk-tooltip",{size:"md",label:this.t("remote_access.indicator")},i("div",{id:"sync-button",class:{tab:!0,active:this.isSpotlighted},onClick:()=>this.updateSpotlightState(!this.isSpotlighted)},i("span",{class:"name"},"Sync"),i("rtk-icon",{id:"icon",icon:this.isSpotlighted?this.iconPack.checkmark:this.iconPack.warning,tabIndex:-1,"aria-hidden":!0}))))}static get watchers(){return{meeting:["meetingChanged"]}}};o([a()],n.prototype,"meeting",void 0),o([a()],n.prototype,"iconPack",void 0),o([a()],n.prototype,"t",void 0),o([a()],n.prototype,"size",void 0),n.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{font-size:12px}#sync-button{flex-direction:row;border-radius:var(--rtk-border-radius-sm, 4px);padding-left:var(--rtk-space-1, 4px);display:flex;align-items:center;justify-content:center;margin-bottom:var(--rtk-space-1, 4px);font-size:12px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}:host([size='sm']) rtk-tooltip,:host([size='md']) rtk-tooltip{width:100%}:host([size='sm'])>#sync-button{height:var(--rtk-space-8, 32px);width:var(--rtk-space-16, 64px);padding-left:var(--rtk-space-0, 0px)}:host([size='md'])>#sync-button{height:var(--rtk-space-8, 32px);width:var(--rtk-space-16, 64px)}:host([size='lg'])>#sync-button{flex-direction:row;height:var(--rtk-space-8, 32px);width:var(--rtk-space-16, 64px)}@media (orientation: portrait){:host([size='lg']) #sync-button{flex-direction:column-reverse;height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px)}:host([size='md']) #sync-button{height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px)}:host([size='sm']) #sync-button{height:var(--rtk-space-10, 40px);width:var(--rtk-space-16, 64px);flex-direction:row}}#sync-button>rtk-icon{max-height:14px}#sync-button rtk-icon{--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}:host([size='sm']) #sync-button>rtk-icon{width:auto}#sync-button.active rtk-icon{color:rgb(var(--rtk-colors-text-1000, 255 255 255))}div{align-content:center;line-height:2rem}rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-8, 32px)}#sync-button.active{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-success, 98 165 4) / var(--tw-bg-opacity))}";export{n as rtk_spotlight_indicator}
1
+ import{r as t,h as i,H as r}from"./p-0ee570cd.js";import{a as e,c as s}from"./p-ee167b96.js";import{S as a}from"./p-2aa242f4.js";var o=function(t,i,r,e){var s,a=arguments.length,o=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,r,e);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(o=(a<3?s(o):a>3?s(i,r,o):s(i,r))||o);return a>3&&o&&Object.defineProperty(i,r,o),o};const n=class{constructor(i){t(this,i),this.iconPack=e,this.t=s(),this.permissionsUpdateListener=()=>{this.canSpotlight=this.meeting.self.permissions.canSpotlight}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null===(t=this.meeting)||void 0===t||t.self.permissions.removeListener("permissionsUpdate",this.permissionsUpdateListener)}meetingChanged(t){var i,r;null!=t&&(this.canSpotlight=t.self.permissions.canSpotlight,this.isSpotlighted=null!==(r=null===(i=t.meta)||void 0===i?void 0:i.broadcastTabChanges)&&void 0!==r&&r,t.self.permissions.addListener("permissionsUpdate",this.permissionsUpdateListener))}updateSpotlightState(t){var i;try{null===(i=this.meeting.meta)||void 0===i||i.setBroadcastTabChanges(t),this.isSpotlighted=t}catch(t){console.error(t)}}render(){if(this.canSpotlight)return i(r,null,i("rtk-tooltip",{size:"md",label:this.t("remote_access.indicator")},i("div",{id:"sync-button",class:{tab:!0,active:this.isSpotlighted},onClick:()=>this.updateSpotlightState(!this.isSpotlighted)},i("span",{class:"name"},"Sync"),i("rtk-icon",{id:"icon",icon:this.isSpotlighted?this.iconPack.checkmark:this.iconPack.warning,tabIndex:-1,"aria-hidden":!0}))))}static get watchers(){return{meeting:["meetingChanged"]}}};o([a()],n.prototype,"meeting",void 0),o([a()],n.prototype,"iconPack",void 0),o([a()],n.prototype,"t",void 0),o([a()],n.prototype,"size",void 0),n.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{font-size:12px}#sync-button{flex-direction:row;border-radius:var(--rtk-border-radius-sm, 4px);padding-left:var(--rtk-space-1, 4px);display:flex;align-items:center;justify-content:center;margin-bottom:var(--rtk-space-1, 4px);font-size:12px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity))}:host([size='sm']) rtk-tooltip,:host([size='md']) rtk-tooltip{width:100%}:host([size='sm'])>#sync-button{height:var(--rtk-space-8, 32px);width:var(--rtk-space-16, 64px);padding-left:var(--rtk-space-0, 0px)}:host([size='md'])>#sync-button{height:var(--rtk-space-8, 32px);width:var(--rtk-space-16, 64px)}:host([size='lg'])>#sync-button{flex-direction:row;height:var(--rtk-space-8, 32px);width:var(--rtk-space-16, 64px)}@media (orientation: portrait){:host([size='lg']) #sync-button{flex-direction:column-reverse;height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px)}:host([size='md']) #sync-button{height:var(--rtk-space-16, 64px);width:var(--rtk-space-16, 64px)}:host([size='sm']) #sync-button{height:var(--rtk-space-10, 40px);width:var(--rtk-space-16, 64px);flex-direction:row}}#sync-button>rtk-icon{max-height:14px}#sync-button rtk-icon{--tw-text-opacity:1;color:rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-text-opacity))}:host([size='sm']) #sync-button>rtk-icon{width:auto}#sync-button.active rtk-icon{color:rgb(var(--rtk-colors-text-1000, 255 255 255))}div{align-content:center;line-height:2rem}rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-8, 32px)}#sync-button.active{--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-success, 98 165 4) / var(--tw-bg-opacity))}";export{n as rtk_spotlight_indicator}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{d as a,a as n,c as o}from"./p-b9281511.js";import{S as r}from"./p-a1278d45.js";var c=function(t,i,s,e){var a,n=arguments.length,o=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(n<3?a(o):n>3?a(i,s,o):a(i,s))||o);return n>3&&o&&Object.defineProperty(i,s,o),o};const l=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.config=a,this.iconPack=n,this.t=o(),this.captionEnabled=!1,this.permissionsUpdateListener=()=>{var t;this.captionEnabled=null!==(t=this.meeting.self.permissions.transcriptionEnabled)&&void 0!==t&&t}}connectedCallback(){this.meetingChanged(this.meeting)}meetingChanged(t){null!==t&&(this.permissionsUpdateListener(),this.meeting.self.permissions.addListener("permissionsUpdate",this.permissionsUpdateListener))}disconnectedCallback(){var t;null===(t=this.meeting)||void 0===t||t.self.permissions.removeListener("permissionsUpdate",this.permissionsUpdateListener)}toggleCaptions(){this.stateUpdate.emit({activeCaptions:!this.states.activeCaptions,activeMoreMenu:!1})}render(){if(!this.captionEnabled)return null;const t=this.states.activeCaptions;return s(e,{tabIndex:0,role:"log","aria-label":"Picture-in-Picture mode"},s("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,onClick:()=>this.toggleCaptions(),icon:t?this.iconPack.captionsOff:this.iconPack.captionsOn,label:this.t(t?"transcript.off":"transcript.on"),variant:this.variant}))}static get watchers(){return{meeting:["meetingChanged"]}}};c([r()],l.prototype,"meeting",void 0),c([r()],l.prototype,"states",void 0),c([r()],l.prototype,"iconPack",void 0),c([r()],l.prototype,"size",void 0),c([r()],l.prototype,"t",void 0),l.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}";export{l as rtk_caption_toggle}
1
+ import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{d as a,a as n,c as o}from"./p-ee167b96.js";import{S as r}from"./p-2aa242f4.js";var c=function(t,i,s,e){var a,n=arguments.length,o=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(n<3?a(o):n>3?a(i,s,o):a(i,s))||o);return n>3&&o&&Object.defineProperty(i,s,o),o};const l=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.config=a,this.iconPack=n,this.t=o(),this.captionEnabled=!1,this.permissionsUpdateListener=()=>{var t;this.captionEnabled=null!==(t=this.meeting.self.permissions.transcriptionEnabled)&&void 0!==t&&t}}connectedCallback(){this.meetingChanged(this.meeting)}meetingChanged(t){null!==t&&(this.permissionsUpdateListener(),this.meeting.self.permissions.addListener("permissionsUpdate",this.permissionsUpdateListener))}disconnectedCallback(){var t;null===(t=this.meeting)||void 0===t||t.self.permissions.removeListener("permissionsUpdate",this.permissionsUpdateListener)}toggleCaptions(){this.stateUpdate.emit({activeCaptions:!this.states.activeCaptions,activeMoreMenu:!1})}render(){if(!this.captionEnabled)return null;const t=this.states.activeCaptions;return s(e,{tabIndex:0,role:"log","aria-label":"Picture-in-Picture mode"},s("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,onClick:()=>this.toggleCaptions(),icon:t?this.iconPack.captionsOff:this.iconPack.captionsOn,label:this.t(t?"transcript.off":"transcript.on"),variant:this.variant}))}static get watchers(){return{meeting:["meetingChanged"]}}};c([r()],l.prototype,"meeting",void 0),c([r()],l.prototype,"states",void 0),c([r()],l.prototype,"iconPack",void 0),c([r()],l.prototype,"size",void 0),c([r()],l.prototype,"t",void 0),l.style=":host{line-height:initial;font-family:var(--rtk-font-family, sans-serif);font-feature-settings:normal;font-variation-settings:normal}p{margin:var(--rtk-space-0, 0px);padding:var(--rtk-space-0, 0px)}:host{display:block}";export{l as rtk_caption_toggle}