@cloudflare/realtimekit-ui 1.0.4-staging.1 → 1.0.4-staging.3
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.
- package/dist/browser.js +1 -1
- package/dist/cjs/{TextMessage-b9599251.js → TextMessage-87a57af2.js} +1 -1
- package/dist/cjs/{chat-aac81e73.js → chat-5f3ed9c3.js} +1 -1
- package/dist/cjs/{debounce-8ebb7833.js → debounce-d5375a75.js} +1 -1
- package/dist/cjs/{index-2ae99c70.js → index-618e08d7.js} +10 -2
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/{merge-ee976be5.js → merge-b6b71419.js} +250 -1
- package/dist/cjs/{notification-541b7cfa.js → notification-bc9915bb.js} +4 -252
- package/dist/cjs/rtk-ai-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +2 -2
- package/dist/cjs/rtk-ai.cjs.entry.js +2 -2
- package/dist/cjs/rtk-audio-grid.cjs.entry.js +2 -2
- package/dist/cjs/rtk-audio-tile.cjs.entry.js +2 -2
- package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +2 -2
- package/dist/cjs/rtk-avatar_54.cjs.entry.js +9 -9
- package/dist/cjs/rtk-breakout-rooms-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-camera-selector_2.cjs.entry.js +2 -2
- package/dist/cjs/rtk-camera-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-caption-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-channel-selector-ui.cjs.entry.js +4 -4
- package/dist/cjs/rtk-chat-composer-ui.cjs.entry.js +3 -3
- package/dist/cjs/rtk-chat-selector-ui.cjs.entry.js +3 -3
- package/dist/cjs/rtk-chat-toggle.cjs.entry.js +3 -3
- package/dist/cjs/rtk-clock.cjs.entry.js +2 -2
- package/dist/cjs/rtk-controlbar-button.cjs.entry.js +2 -2
- package/dist/cjs/rtk-controlbar.cjs.entry.js +2 -2
- package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-ended-screen.cjs.entry.js +2 -2
- package/dist/cjs/rtk-file-dropzone.cjs.entry.js +2 -2
- package/dist/cjs/rtk-fullscreen-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-grid-pagination.cjs.entry.js +2 -2
- package/dist/cjs/rtk-grid.cjs.entry.js +2 -2
- package/dist/cjs/rtk-header.cjs.entry.js +2 -2
- package/dist/cjs/rtk-idle-screen.cjs.entry.js +2 -2
- package/dist/cjs/rtk-image-viewer.cjs.entry.js +2 -2
- package/dist/cjs/rtk-information-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/rtk-leave-button.cjs.entry.js +2 -2
- package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +2 -2
- package/dist/cjs/rtk-livestream-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-meeting-title.cjs.entry.js +2 -2
- package/dist/cjs/rtk-message-list-view.cjs.entry.js +3 -3
- package/dist/cjs/rtk-mic-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-mixed-grid.cjs.entry.js +2 -2
- package/dist/cjs/rtk-more-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-mute-all-button.cjs.entry.js +2 -2
- package/dist/cjs/rtk-name-tag.cjs.entry.js +2 -2
- package/dist/cjs/rtk-network-indicator.cjs.entry.js +2 -2
- package/dist/cjs/rtk-participant-count.cjs.entry.js +2 -2
- package/dist/cjs/rtk-participant-setup.cjs.entry.js +2 -2
- package/dist/cjs/rtk-participant_2.cjs.entry.js +3 -3
- package/dist/cjs/rtk-participants-audio.cjs.entry.js +2 -2
- package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +2 -2
- package/dist/cjs/rtk-participants-toggle.cjs.entry.js +3 -3
- package/dist/cjs/rtk-participants.cjs.entry.js +3 -3
- package/dist/cjs/rtk-pip-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-plugin-main_2.cjs.entry.js +2 -2
- package/dist/cjs/rtk-plugins-toggle.cjs.entry.js +3 -3
- package/dist/cjs/rtk-plugins_2.cjs.entry.js +2 -2
- package/dist/cjs/rtk-poll_2.cjs.entry.js +2 -2
- package/dist/cjs/rtk-polls-toggle.cjs.entry.js +3 -3
- package/dist/cjs/rtk-recording-indicator.cjs.entry.js +2 -2
- package/dist/cjs/rtk-recording-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-screen-share-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-screenshare-view.cjs.entry.js +2 -2
- package/dist/cjs/rtk-settings-audio_2.cjs.entry.js +2 -2
- package/dist/cjs/rtk-settings-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-settings.cjs.entry.js +2 -2
- package/dist/cjs/rtk-setup-screen.cjs.entry.js +2 -2
- package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +2 -2
- package/dist/cjs/rtk-sidebar.cjs.entry.js +3 -3
- package/dist/cjs/rtk-simple-grid.cjs.entry.js +2 -2
- package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +2 -2
- package/dist/cjs/rtk-spotlight-indicator.cjs.entry.js +2 -2
- package/dist/cjs/rtk-stage-toggle.cjs.entry.js +2 -2
- package/dist/cjs/rtk-stage.cjs.entry.js +2 -2
- package/dist/cjs/rtk-transcript.cjs.entry.js +2 -2
- package/dist/cjs/rtk-transcripts.cjs.entry.js +2 -2
- package/dist/cjs/rtk-ui-provider.cjs.entry.js +7 -2
- package/dist/cjs/rtk-waiting-screen.cjs.entry.js +2 -2
- package/dist/cjs/{sidebar-8b82a470.js → sidebar-d8acee5c.js} +1 -1
- package/dist/cjs/{ui-store-af000a8e.js → ui-store-e94b055c.js} +4 -4
- package/dist/collection/components/rtk-ui-provider/rtk-ui-provider.js +6 -1
- package/dist/collection/utils/sync-with-store/index.js +9 -1
- package/dist/collection/utils/sync-with-store/ui-store.js +4 -4
- package/dist/components/index.js +6 -5
- package/dist/components/{p-99303d10.js → p-00525429.js} +1 -1
- package/dist/components/{p-b8baba9f.js → p-0321cc25.js} +52 -52
- package/dist/components/{p-24c3ffc2.js → p-0748e03c.js} +3 -3
- package/dist/components/{p-0c855484.js → p-0b4e9e8e.js} +5 -5
- package/dist/components/{p-bf72bb45.js → p-167d8f4f.js} +10 -10
- package/dist/components/{p-557d4076.js → p-16e69e08.js} +7 -7
- package/dist/components/{p-4bb5e9bb.js → p-1813d589.js} +12 -12
- package/dist/components/{p-6b4eccd6.js → p-186d395c.js} +5 -5
- package/dist/components/{p-fc56c6ea.js → p-186daafc.js} +4 -4
- package/dist/components/{p-0a0515d9.js → p-191793b5.js} +3 -3
- package/dist/components/{p-a10339f4.js → p-1c0cb465.js} +3 -3
- package/dist/components/{p-96362151.js → p-1fe1a8f3.js} +5 -5
- package/dist/components/{p-52628938.js → p-22ea80c5.js} +3 -3
- package/dist/components/{p-0b9cf1da.js → p-26dd55cb.js} +4 -4
- package/dist/components/{p-388b17ad.js → p-288c22bd.js} +3 -3
- package/dist/components/{p-c65aaf73.js → p-2942a50f.js} +13 -13
- package/dist/components/{p-2d58e36e.js → p-385b713f.js} +5 -5
- package/dist/components/{p-93355c43.js → p-3a795fe6.js} +1 -1
- package/dist/components/{p-310a03ac.js → p-3ce582b1.js} +13 -13
- package/dist/components/{p-3081fabf.js → p-4093562b.js} +4 -4
- package/dist/components/{p-f1a781b0.js → p-4151f04e.js} +3 -3
- package/dist/components/{p-c254f63b.js → p-41c98037.js} +4 -4
- package/dist/components/{p-2ee6390c.js → p-49481600.js} +2 -2
- package/dist/components/{p-938ee31c.js → p-4a0b3b5c.js} +3 -3
- package/dist/components/{p-f8594d8e.js → p-52511dc3.js} +2 -2
- package/dist/components/{p-96e2ff79.js → p-52ab94d1.js} +7 -7
- package/dist/components/{p-bee7d918.js → p-589a900d.js} +8 -8
- package/dist/components/{p-acbb932e.js → p-5c2b1ba2.js} +1 -1
- package/dist/components/{p-384919de.js → p-5c7742d3.js} +14 -14
- package/dist/components/{p-12e64755.js → p-60981c2e.js} +3 -3
- package/dist/components/{p-7ac93e47.js → p-65f8f581.js} +2 -2
- package/dist/components/{p-04dc0331.js → p-69488ced.js} +9 -9
- package/dist/components/{p-17ac0da7.js → p-6eba9a98.js} +2 -2
- package/dist/components/{p-7f4b9092.js → p-6efe5771.js} +8 -8
- package/dist/components/{p-4f585ec2.js → p-6f9489ac.js} +11 -11
- package/dist/components/{p-54de25c6.js → p-74f9ac6e.js} +2 -2
- package/dist/components/{p-7764b66b.js → p-779cbb7f.js} +25 -25
- package/dist/components/{p-87ae32cb.js → p-853eb11a.js} +9 -9
- package/dist/components/{p-1035acb6.js → p-863cd01a.js} +2 -2
- package/dist/components/{p-fbe523dc.js → p-8a617c86.js} +6 -6
- package/dist/components/{p-3968315b.js → p-8bbaf6c2.js} +10 -2
- package/dist/components/{p-8320939f.js → p-8dbab1d8.js} +8 -8
- package/dist/components/{p-09ec425b.js → p-8e257589.js} +4 -4
- package/dist/components/{p-36b8529e.js → p-9115e02b.js} +4 -4
- package/dist/components/{p-792de3bc.js → p-928df9d1.js} +2 -2
- package/dist/components/{p-8d93417e.js → p-932be1f6.js} +6 -6
- package/dist/components/{p-0f10661d.js → p-93907842.js} +2 -2
- package/dist/components/{p-32584f88.js → p-94df3a16.js} +4 -4
- package/dist/components/{p-80efd900.js → p-9b702bd2.js} +6 -6
- package/dist/components/{p-5677f439.js → p-9fdacb6b.js} +3 -3
- package/dist/components/{p-d1084f45.js → p-a8f83ab1.js} +2 -2
- package/dist/components/{p-57973e22.js → p-a9755f31.js} +4 -4
- package/dist/components/{p-2f9525bf.js → p-ac30ed19.js} +2 -2
- package/dist/components/{p-47f6fdfa.js → p-adafaabb.js} +3 -3
- package/dist/components/{p-f3fbe2fb.js → p-b2a9a468.js} +4 -4
- package/dist/components/{p-ea160150.js → p-b38b3c28.js} +2 -2
- package/dist/components/{p-483894c7.js → p-b6951b1c.js} +4 -4
- package/dist/components/{p-616cfbd8.js → p-b6b43c4a.js} +7 -7
- package/dist/components/{p-b8fe19b6.js → p-ba0e5882.js} +249 -2
- package/dist/components/{p-f44a0212.js → p-bb54487e.js} +3 -3
- package/dist/components/{p-7d95084a.js → p-bb69bba9.js} +5 -5
- package/dist/components/{p-8afd3f68.js → p-bb8050bc.js} +4 -4
- package/dist/components/{p-37f70cfb.js → p-bdae67ed.js} +4 -4
- package/dist/components/{p-f31839f4.js → p-bfc8d680.js} +4 -4
- package/dist/components/{p-9f86929b.js → p-c21c02e9.js} +5 -5
- package/dist/components/{p-cadee920.js → p-c722ac0b.js} +1 -1
- package/dist/components/{p-1f5e21d0.js → p-cc23c4f1.js} +6 -6
- package/dist/components/{p-e10e8a56.js → p-cc39d855.js} +5 -5
- package/dist/components/{p-65980189.js → p-cccd3ae4.js} +7 -7
- package/dist/components/{p-4c2acc5c.js → p-ce2007d7.js} +1 -1
- package/dist/components/{p-9f843e5a.js → p-cecf2f70.js} +8 -8
- package/dist/components/{p-7525d343.js → p-cfbca110.js} +2 -2
- package/dist/components/{p-d4f3d3d2.js → p-d40480b3.js} +3 -3
- package/dist/components/{p-885dad3e.js → p-e381240e.js} +3 -3
- package/dist/components/{p-c5fd7cc6.js → p-e595c078.js} +3 -250
- package/dist/components/{p-f3f1b0c0.js → p-e956f8f7.js} +2 -2
- package/dist/components/{p-5255d2f8.js → p-eb71b424.js} +6 -6
- package/dist/components/{p-fb038bd0.js → p-efa4bd9d.js} +4 -4
- package/dist/components/{p-2b523e10.js → p-f367f8a7.js} +5 -5
- package/dist/components/{p-81a13bf2.js → p-f40dc5a5.js} +4 -4
- package/dist/components/{p-889bc7b9.js → p-f5f209ef.js} +5 -5
- package/dist/components/{p-47a6f5a0.js → p-fa52dc04.js} +2 -2
- package/dist/components/{p-6c351e40.js → p-fa82d418.js} +7 -7
- package/dist/components/{p-b53c309c.js → p-faac8c00.js} +5 -5
- package/dist/components/{p-40870ba7.js → p-fc7e870e.js} +5 -5
- package/dist/components/{p-ab84cfbb.js → p-fd370f5f.js} +4 -4
- package/dist/components/rtk-ai-toggle.js +5 -5
- package/dist/components/rtk-ai-transcriptions.js +1 -1
- package/dist/components/rtk-ai.js +5 -5
- package/dist/components/rtk-audio-grid.js +2 -2
- package/dist/components/rtk-audio-tile.js +6 -6
- package/dist/components/rtk-audio-visualizer.js +1 -1
- package/dist/components/rtk-avatar.js +1 -1
- package/dist/components/rtk-breakout-room-manager.js +1 -1
- package/dist/components/rtk-breakout-room-participants.js +1 -1
- package/dist/components/rtk-breakout-rooms-manager.js +1 -1
- package/dist/components/rtk-breakout-rooms-toggle.js +5 -5
- package/dist/components/rtk-broadcast-message-modal.js +1 -1
- package/dist/components/rtk-button.js +1 -1
- package/dist/components/rtk-camera-selector.js +1 -1
- package/dist/components/rtk-camera-toggle.js +6 -6
- package/dist/components/rtk-caption-toggle.js +5 -5
- package/dist/components/rtk-channel-creator.js +1 -1
- package/dist/components/rtk-channel-details.js +1 -1
- package/dist/components/rtk-channel-header.js +1 -1
- package/dist/components/rtk-channel-selector-ui.js +6 -6
- package/dist/components/rtk-channel-selector-view.js +1 -1
- package/dist/components/rtk-chat-composer-ui.js +8 -8
- package/dist/components/rtk-chat-composer-view.js +1 -1
- package/dist/components/rtk-chat-message.js +1 -1
- package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
- package/dist/components/rtk-chat-messages-ui.js +1 -1
- package/dist/components/rtk-chat-search-results.js +1 -1
- package/dist/components/rtk-chat-selector-ui.js +3 -3
- package/dist/components/rtk-chat-toggle.js +6 -6
- package/dist/components/rtk-chat.js +1 -1
- package/dist/components/rtk-clock.js +3 -3
- package/dist/components/rtk-confirmation-modal.js +1 -1
- package/dist/components/rtk-controlbar-button.js +1 -1
- package/dist/components/rtk-controlbar.js +2 -2
- package/dist/components/rtk-counter.js +1 -1
- package/dist/components/rtk-debugger-audio.js +1 -1
- package/dist/components/rtk-debugger-screenshare.js +1 -1
- package/dist/components/rtk-debugger-system.js +1 -1
- package/dist/components/rtk-debugger-toggle.js +5 -5
- package/dist/components/rtk-debugger-video.js +1 -1
- package/dist/components/rtk-debugger.js +1 -1
- package/dist/components/rtk-dialog-manager.js +1 -1
- package/dist/components/rtk-dialog.js +1 -1
- package/dist/components/rtk-draft-attachment-view.js +1 -1
- package/dist/components/rtk-emoji-picker-button.js +1 -1
- package/dist/components/rtk-emoji-picker.js +1 -1
- package/dist/components/rtk-ended-screen.js +4 -4
- package/dist/components/rtk-file-dropzone.js +3 -3
- package/dist/components/rtk-file-message-view.js +1 -1
- package/dist/components/rtk-file-message.js +1 -1
- package/dist/components/rtk-file-picker-button.js +1 -1
- package/dist/components/rtk-fullscreen-toggle.js +1 -1
- package/dist/components/rtk-grid-pagination.js +5 -5
- package/dist/components/rtk-grid.js +10 -10
- package/dist/components/rtk-header.js +2 -2
- package/dist/components/rtk-icon.js +1 -1
- package/dist/components/rtk-idle-screen.js +5 -5
- package/dist/components/rtk-image-message-view.js +1 -1
- package/dist/components/rtk-image-message.js +1 -1
- package/dist/components/rtk-image-viewer.js +4 -4
- package/dist/components/rtk-information-tooltip.js +3 -3
- package/dist/components/rtk-join-stage.js +1 -1
- package/dist/components/rtk-leave-button.js +5 -5
- package/dist/components/rtk-leave-meeting.js +1 -1
- package/dist/components/rtk-livestream-indicator.js +1 -1
- package/dist/components/rtk-livestream-player.js +1 -1
- package/dist/components/rtk-livestream-toggle.js +5 -5
- package/dist/components/rtk-logo.js +1 -1
- package/dist/components/rtk-meeting-title.js +3 -3
- package/dist/components/rtk-meeting.js +54 -54
- package/dist/components/rtk-menu-item.js +1 -1
- package/dist/components/rtk-menu-list.js +1 -1
- package/dist/components/rtk-menu.js +1 -1
- package/dist/components/rtk-message-list-view.js +4 -4
- package/dist/components/rtk-message-view.js +1 -1
- package/dist/components/rtk-mic-toggle.js +6 -6
- package/dist/components/rtk-microphone-selector.js +1 -1
- package/dist/components/rtk-mixed-grid.js +8 -8
- package/dist/components/rtk-more-toggle.js +5 -5
- package/dist/components/rtk-mute-all-button.js +6 -6
- package/dist/components/rtk-mute-all-confirmation.js +1 -1
- package/dist/components/rtk-name-tag.js +1 -1
- package/dist/components/rtk-network-indicator.js +3 -3
- package/dist/components/rtk-notification.js +1 -1
- package/dist/components/rtk-notifications.js +1 -1
- package/dist/components/rtk-overlay-modal.js +1 -1
- package/dist/components/rtk-paginated-list.js +1 -1
- package/dist/components/rtk-participant-count.js +3 -3
- package/dist/components/rtk-participant-setup.js +2 -2
- package/dist/components/rtk-participant-tile.js +1 -1
- package/dist/components/rtk-participant.js +1 -1
- package/dist/components/rtk-participants-audio.js +5 -5
- package/dist/components/rtk-participants-stage-list.js +1 -1
- package/dist/components/rtk-participants-stage-queue.js +1 -1
- package/dist/components/rtk-participants-toggle.js +6 -6
- package/dist/components/rtk-participants-viewer-list.js +1 -1
- package/dist/components/rtk-participants-waiting-list.js +1 -1
- package/dist/components/rtk-participants.js +15 -15
- package/dist/components/rtk-permissions-message.js +1 -1
- package/dist/components/rtk-pip-toggle.js +5 -5
- package/dist/components/rtk-plugin-main.js +1 -1
- package/dist/components/rtk-plugins-toggle.js +6 -6
- package/dist/components/rtk-plugins.js +1 -1
- package/dist/components/rtk-poll-form.js +1 -1
- package/dist/components/rtk-poll.js +1 -1
- package/dist/components/rtk-polls-toggle.js +6 -6
- package/dist/components/rtk-polls.js +1 -1
- package/dist/components/rtk-recording-indicator.js +3 -3
- package/dist/components/rtk-recording-toggle.js +5 -5
- package/dist/components/rtk-screen-share-toggle.js +6 -6
- package/dist/components/rtk-screenshare-view.js +5 -5
- package/dist/components/rtk-settings-audio.js +1 -1
- package/dist/components/rtk-settings-toggle.js +5 -5
- package/dist/components/rtk-settings-video.js +1 -1
- package/dist/components/rtk-settings.js +12 -12
- package/dist/components/rtk-setup-screen.js +8 -8
- package/dist/components/rtk-sidebar-ui.js +1 -1
- package/dist/components/rtk-sidebar.js +11 -11
- package/dist/components/rtk-simple-grid.js +2 -2
- package/dist/components/rtk-speaker-selector.js +1 -1
- package/dist/components/rtk-spinner.js +1 -1
- package/dist/components/rtk-spotlight-grid.js +2 -2
- package/dist/components/rtk-spotlight-indicator.js +1 -1
- package/dist/components/rtk-stage-toggle.js +6 -6
- package/dist/components/rtk-stage.js +2 -2
- package/dist/components/rtk-switch.js +1 -1
- package/dist/components/rtk-tab-bar.js +1 -1
- package/dist/components/rtk-text-composer-view.js +1 -1
- package/dist/components/rtk-text-message.js +1 -1
- package/dist/components/rtk-tooltip.js +1 -1
- package/dist/components/rtk-transcript.js +1 -1
- package/dist/components/rtk-transcripts.js +3 -3
- package/dist/components/rtk-ui-provider.js +7 -2
- package/dist/components/rtk-viewer-count.js +1 -1
- package/dist/components/rtk-waiting-screen.js +3 -3
- package/dist/docs/docs-components.json +1 -1
- package/dist/esm/{TextMessage-a699d8da.js → TextMessage-8f228811.js} +1 -1
- package/dist/esm/{chat-0fec85e9.js → chat-923c5f59.js} +1 -1
- package/dist/esm/{debounce-29e3a983.js → debounce-5b758f09.js} +1 -1
- package/dist/esm/{index-21637ec2.js → index-02905f52.js} +10 -2
- package/dist/esm/index.js +6 -6
- package/dist/esm/loader.js +265 -252
- package/dist/esm/{merge-ef938315.js → merge-1a2358a4.js} +249 -2
- package/dist/esm/{notification-deef1123.js → notification-c1e1a387.js} +3 -250
- package/dist/esm/rtk-ai-toggle.entry.js +2 -2
- package/dist/esm/rtk-ai-transcriptions.entry.js +2 -2
- package/dist/esm/rtk-ai.entry.js +2 -2
- package/dist/esm/rtk-audio-grid.entry.js +2 -2
- package/dist/esm/rtk-audio-tile.entry.js +2 -2
- package/dist/esm/rtk-audio-visualizer_4.entry.js +2 -2
- package/dist/esm/rtk-avatar_54.entry.js +7 -7
- package/dist/esm/rtk-breakout-rooms-toggle.entry.js +2 -2
- package/dist/esm/rtk-camera-selector_2.entry.js +2 -2
- package/dist/esm/rtk-camera-toggle.entry.js +2 -2
- package/dist/esm/rtk-caption-toggle.entry.js +2 -2
- package/dist/esm/rtk-channel-selector-ui.entry.js +4 -4
- package/dist/esm/rtk-chat-composer-ui.entry.js +3 -3
- package/dist/esm/rtk-chat-selector-ui.entry.js +3 -3
- package/dist/esm/rtk-chat-toggle.entry.js +3 -3
- package/dist/esm/rtk-clock.entry.js +2 -2
- package/dist/esm/rtk-controlbar-button.entry.js +2 -2
- package/dist/esm/rtk-controlbar.entry.js +2 -2
- package/dist/esm/rtk-debugger-toggle.entry.js +2 -2
- package/dist/esm/rtk-ended-screen.entry.js +2 -2
- package/dist/esm/rtk-file-dropzone.entry.js +2 -2
- package/dist/esm/rtk-fullscreen-toggle.entry.js +2 -2
- package/dist/esm/rtk-grid-pagination.entry.js +2 -2
- package/dist/esm/rtk-grid.entry.js +2 -2
- package/dist/esm/rtk-header.entry.js +2 -2
- package/dist/esm/rtk-idle-screen.entry.js +2 -2
- package/dist/esm/rtk-image-viewer.entry.js +2 -2
- package/dist/esm/rtk-information-tooltip.entry.js +2 -2
- package/dist/esm/rtk-leave-button.entry.js +2 -2
- package/dist/esm/rtk-livestream-indicator_3.entry.js +2 -2
- package/dist/esm/rtk-livestream-toggle.entry.js +2 -2
- package/dist/esm/rtk-meeting-title.entry.js +2 -2
- package/dist/esm/rtk-message-list-view.entry.js +3 -3
- package/dist/esm/rtk-mic-toggle.entry.js +2 -2
- package/dist/esm/rtk-mixed-grid.entry.js +2 -2
- package/dist/esm/rtk-more-toggle.entry.js +2 -2
- package/dist/esm/rtk-mute-all-button.entry.js +2 -2
- package/dist/esm/rtk-name-tag.entry.js +2 -2
- package/dist/esm/rtk-network-indicator.entry.js +2 -2
- package/dist/esm/rtk-participant-count.entry.js +2 -2
- package/dist/esm/rtk-participant-setup.entry.js +2 -2
- package/dist/esm/rtk-participant_2.entry.js +3 -3
- package/dist/esm/rtk-participants-audio.entry.js +2 -2
- package/dist/esm/rtk-participants-stage-list_4.entry.js +2 -2
- package/dist/esm/rtk-participants-toggle.entry.js +3 -3
- package/dist/esm/rtk-participants.entry.js +3 -3
- package/dist/esm/rtk-pip-toggle.entry.js +2 -2
- package/dist/esm/rtk-plugin-main_2.entry.js +2 -2
- package/dist/esm/rtk-plugins-toggle.entry.js +3 -3
- package/dist/esm/rtk-plugins_2.entry.js +2 -2
- package/dist/esm/rtk-poll_2.entry.js +2 -2
- package/dist/esm/rtk-polls-toggle.entry.js +3 -3
- package/dist/esm/rtk-recording-indicator.entry.js +2 -2
- package/dist/esm/rtk-recording-toggle.entry.js +2 -2
- package/dist/esm/rtk-screen-share-toggle.entry.js +2 -2
- package/dist/esm/rtk-screenshare-view.entry.js +2 -2
- package/dist/esm/rtk-settings-audio_2.entry.js +2 -2
- package/dist/esm/rtk-settings-toggle.entry.js +2 -2
- package/dist/esm/rtk-settings.entry.js +2 -2
- package/dist/esm/rtk-setup-screen.entry.js +2 -2
- package/dist/esm/rtk-sidebar-ui.entry.js +2 -2
- package/dist/esm/rtk-sidebar.entry.js +3 -3
- package/dist/esm/rtk-simple-grid.entry.js +2 -2
- package/dist/esm/rtk-spotlight-grid.entry.js +2 -2
- package/dist/esm/rtk-spotlight-indicator.entry.js +2 -2
- package/dist/esm/rtk-stage-toggle.entry.js +2 -2
- package/dist/esm/rtk-stage.entry.js +2 -2
- package/dist/esm/rtk-transcript.entry.js +2 -2
- package/dist/esm/rtk-transcripts.entry.js +2 -2
- package/dist/esm/rtk-ui-provider.entry.js +7 -2
- package/dist/esm/rtk-waiting-screen.entry.js +2 -2
- package/dist/esm/{sidebar-c47b86b4.js → sidebar-c1c11b00.js} +1 -1
- package/dist/esm/{ui-store-fabf2b32.js → ui-store-51db54bf.js} +5 -5
- package/dist/realtimekit-ui/index.esm.js +1 -1
- package/dist/realtimekit-ui/{p-3b14c478.entry.js → p-031768d2.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-fdc0d8cc.entry.js → p-032bc8ec.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-de42b31f.entry.js → p-041ccf2d.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-f7cc7f81.entry.js → p-044d1450.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-59cd209a.entry.js → p-0f0395d8.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-3956d569.js → p-1109b664.js} +1 -1
- package/dist/realtimekit-ui/{p-ef3ac9e9.entry.js → p-12a74bef.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-f2af9690.entry.js → p-14b02cf2.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-82520fc0.entry.js → p-16740763.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-af95d40e.entry.js → p-19519e2f.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-86d3632a.entry.js → p-19d80239.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-30fe4bbf.entry.js → p-19fc2b31.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-309def3e.entry.js → p-1d10833d.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-33c173a8.entry.js → p-222314de.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-e8e68c22.entry.js → p-23ed9798.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-ad5fc6df.entry.js → p-250f499c.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-9b8a0f9b.entry.js → p-2e4037c8.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-e48166db.entry.js → p-2e7f8a0f.entry.js} +1 -1
- package/dist/realtimekit-ui/p-3146a35e.entry.js +1 -0
- package/dist/realtimekit-ui/{p-af81e9cf.entry.js → p-38491702.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-2d0676a9.entry.js → p-388e2f79.entry.js} +1 -1
- package/dist/realtimekit-ui/p-390dc08f.js +1 -0
- package/dist/realtimekit-ui/{p-a02141f1.entry.js → p-395391d7.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-59837fe1.entry.js → p-3d2ef042.entry.js} +1 -1
- package/dist/realtimekit-ui/p-449677c1.entry.js +1 -0
- package/dist/realtimekit-ui/{p-67ff2615.entry.js → p-4f2175a1.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-05b3a3fa.entry.js → p-51a4f593.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-e77e5cef.entry.js → p-5ab26b36.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-f16ed5c8.entry.js → p-5ea5ea4c.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-375c10a2.entry.js → p-60d7e2c8.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-a29ad4d8.entry.js → p-63636a8d.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-cde200c4.entry.js → p-699eb823.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-23893740.entry.js → p-6c8231d7.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-1f3bfcdb.js → p-6cfb6e51.js} +1 -1
- package/dist/realtimekit-ui/p-6f182ec9.js +1 -0
- package/dist/realtimekit-ui/{p-e872d214.entry.js → p-6f507413.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-881f7e61.entry.js → p-70aaf146.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-542f52e9.entry.js → p-71224b79.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-199f622a.entry.js → p-7137eecf.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-37a218a8.entry.js → p-75800b61.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-458b4f23.entry.js → p-767e2042.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-9c5cb84c.entry.js → p-7909526f.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-87a8cbc2.entry.js → p-7e5c5598.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-17c4a39a.entry.js → p-8434ab99.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-08628c03.entry.js → p-857772f2.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-a80ce945.entry.js → p-8dc49c21.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-eae4e83b.js → p-912c0afc.js} +1 -1
- package/dist/realtimekit-ui/{p-0f5681eb.entry.js → p-9253e9de.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-393ff18f.entry.js → p-94e84860.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-4265c450.entry.js → p-9c6b98e6.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-ff4f156f.entry.js → p-a4897c11.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-6cd96b58.js → p-a72b4dcc.js} +1 -1
- package/dist/realtimekit-ui/p-aa3acda3.entry.js +1 -0
- package/dist/realtimekit-ui/{p-116eabc9.entry.js → p-ab5dff6b.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-a5512788.entry.js → p-ab63d245.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-18ca0ccd.entry.js → p-afa01352.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-76bcc78d.entry.js → p-b213af17.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-d2998b1e.entry.js → p-b2e11d64.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-18618102.entry.js → p-b54302a9.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-28ac7dfd.entry.js → p-b5e5e509.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-e0303097.entry.js → p-baebb0a9.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-586b8e78.entry.js → p-c0b19188.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-e368f30f.entry.js → p-c3d7db06.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-c31bcf97.entry.js → p-c8f43c80.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-d0ec8218.entry.js → p-c9462f98.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-420629b1.entry.js → p-cba3e470.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-c2f35fc7.entry.js → p-cceb1491.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-4a2d51d2.entry.js → p-d123b26e.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-a6802383.entry.js → p-d26b4447.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-b616deb3.entry.js → p-d3807280.entry.js} +1 -1
- package/dist/realtimekit-ui/p-d7d8af87.js +1 -0
- package/dist/realtimekit-ui/{p-bd103adc.entry.js → p-d7f0ac1e.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-6f24d78f.entry.js → p-dbabfce1.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-a33714b1.entry.js → p-e3f333c8.entry.js} +1 -1
- package/dist/realtimekit-ui/p-f243302d.js +1 -0
- package/dist/realtimekit-ui/{p-5d60f101.entry.js → p-f422cd58.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-3eb310d3.entry.js → p-f71f017f.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-efc9cddb.entry.js → p-f851a5e5.entry.js} +1 -1
- package/dist/realtimekit-ui/{p-38c18a6b.entry.js → p-fbe67582.entry.js} +1 -1
- package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
- package/package.json +1 -1
- package/dist/realtimekit-ui/p-2bd5be73.js +0 -1
- package/dist/realtimekit-ui/p-51fd9745.js +0 -1
- package/dist/realtimekit-ui/p-526f1a76.js +0 -1
- package/dist/realtimekit-ui/p-52b25934.js +0 -1
- package/dist/realtimekit-ui/p-716f90a3.entry.js +0 -1
- package/dist/realtimekit-ui/p-7bae9d05.entry.js +0 -1
- package/dist/realtimekit-ui/p-fdec3315.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as r,H as a}from"./p-0ee570cd.js";import{h as s}from"./p-
|
|
1
|
+
import{r as t,c as e,h as r,H as a}from"./p-0ee570cd.js";import{h as s}from"./p-912c0afc.js";import{S as o}from"./p-f243302d.js";const i=class{constructor(r){t(this,r),this.dismiss=e(this,"rtkTranscriptDismiss",7),this.t=s()}connectedCallback(){this.transcriptChanged(this.transcript)}transcriptChanged(t,e){if((null==e?void 0:e.renderedId)===t.renderedId&&(null==e?void 0:e.transcript)===t.transcript)return;if(clearTimeout(this.timeout),!(null==t?void 0:t.name)||!(null==t?void 0:t.transcript))return;const{id:r,renderedId:a}=t;this.timeout=setTimeout((()=>{this.dismiss.emit({id:r,renderedId:a})}),1e4)}render(){return r(a,{key:"178bec61ca4e702446a1d8ef9cc700d614e473cb"},r("div",{key:"cc7f9847399f373bb93b74d5b56acb2636df3668",class:"ctr"},r("p",{key:"c8d6e26e1ce9038b73ca69e5ca75e658e9df2465",class:"message"},r("span",{key:"1138ba7e3f8c131fb4c22315791ec480b8233e24",class:"name"},this.transcript.name),": ",this.transcript.transcript)))}static get watchers(){return{transcript:["transcriptChanged"]}}};(function(t,e,r,a){var s,o=arguments.length,i=o<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,r):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,a);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(i=(o<3?s(i):o>3?s(e,r,i):s(e,r))||i);o>3&&i&&Object.defineProperty(e,r,i)})([o()],i.prototype,"t",void 0),i.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{pointer-events:none;display:block;color:rgb(var(--rtk-colors-text-1000, 255 255 255));display:flex;justify-content:center;vertical-align:middle;animation:show 0.4s ease;transition:0.4s;z-index:5;width:100%}.ctr{box-sizing:border-box;display:inline-flex;height:100%;align-items:center;padding-left:var(--rtk-space-3, 12px);padding-right:var(--rtk-space-3, 12px);-webkit-user-select:none;-moz-user-select:none;user-select:none;border-radius:var(--rtk-border-radius-md, 8px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));--tw-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);--tw-shadow-color:rgb(var(--rtk-colors-background-1000, 8 8 8));--tw-shadow:var(--tw-shadow-colored);pointer-events:auto;padding:var(--rtk-space-3, 12px);overflow:auto;max-width:50%}.message{margin:var(--rtk-space-0, 0px);display:inline-block;justify-content:center;max-width:100%;text-wrap:wrap;line-height:1.5rem}.message .name{font-weight:bold}:host(.exit){animation:exit 0.4s ease}@keyframes show{0%{opacity:0;transform:translateY(120px)}100%{opacity:1;transform:translateY(0px)}}@keyframes exit{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-120px)}}:host([size='sm']){font-size:14px}";export{i as rtk_transcript}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as
|
|
1
|
+
import{r as t,h as i,H as a}from"./p-0ee570cd.js";import{h as e,e as r}from"./p-912c0afc.js";import{S as n}from"./p-f243302d.js";var s=function(t,i,a,e){var r,n=arguments.length,s=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,a):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,a,e);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(s=(n<3?r(s):n>3?r(i,a,s):r(i,a))||s);return n>3&&s&&Object.defineProperty(i,a,s),s};const c=class{constructor(i){t(this,i),this.t=e(),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(a,{key:"f03d6c21768c58cfec4c24c8bfc20b9b9e53db7a","data-hidden":!this.isRecording},this.isRecording&&i("div",{key:"79da404a6fcbd7d4bf40ed5c20e547965d77368c",class:"indicator","aria-label":this.t("recording.indicator"),part:"indicator"},i("rtk-icon",{key:"57d06ed7f629117aa7240e126bd8571c50bd29cd",icon:this.iconPack.recording,"aria-hidden":!0,tabIndex:-1,part:"icon"}),i("span",{key:"2a6e1788962bf044fc12194bc20fbe8b6300babc"},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 n,c as t,w as e,h as a,H as i,a as r}from"./p-0ee570cd.js";import{e as o,h as s}from"./p-eae4e83b.js";import{i as c,r as d,e as l,a as p}from"./p-02f19345.js";import{S as h}from"./p-52b25934.js";var f=function(n,t,e,a){var i,r=arguments.length,o=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,t,e,a);else for(var s=n.length-1;s>=0;s--)(i=n[s])&&(o=(r<3?i(o):r>3?i(t,e,o):i(t,e))||o);return r>3&&o&&Object.defineProperty(t,e,o),o};const g=class{constructor(e){n(this,e),this.stateUpdate=t(this,"rtkStateUpdate",7),this.play=t(this,"screensharePlay",7),this.fullScreenListener=()=>{this.isFullScreen=c()},this.participantScreenshareUpdate=n=>{n.id===this.participant.id&&this.screenShareListener(n)},this.hideFullScreenButton=!1,this.nameTagPosition="bottom-left",this.variant="solid",this.iconPack=o,this.t=s(),this.videoExpanded=!1,this.screenShareEnabled=!1,this.isFullScreen=!1,this.toggleFullScreen=()=>{this.isFullScreen?(l(),this.isFullScreen=!1):(d(this.host),this.isFullScreen=!0)}}connectedCallback(){null===window||void 0===window||window.addEventListener("fullscreenchange",this.fullScreenListener),null===window||void 0===window||window.addEventListener("webkitfullscreenchange",this.fullScreenListener)}componentDidLoad(){this.participantChanged(this.participant)}disconnectedCallback(){if(!this.meeting)return;const{self:n}=this.meeting;this.participant.id===n.id&&this.screenShareListener?this.participant.removeListener("screenShareUpdate",this.screenShareListener):this.meeting.participants.joined.removeListener("screenShareUpdate",this.participantScreenshareUpdate),null===window||void 0===window||window.removeEventListener("fullscreenchange",this.fullScreenListener),null===window||void 0===window||window.removeEventListener("webkitfullscreenchange",this.fullScreenListener)}participantChanged(n){if(null!=n&&this.meeting){const{self:t}=this.meeting;this.screenShareListener=({screenShareEnabled:n,screenShareTracks:t})=>{const a=n&&null!=t.video;if(e((()=>{this.screenShareEnabled=a})),a){const n=new MediaStream;n.addTrack(t.video),null!=this.videoEl&&(this.videoEl.srcObject=n,this.videoEl.play())}else null!=this.videoEl&&(this.videoEl.srcObject=void 0)},this.screenShareListener(n),n.id===t.id?n.addListener("screenShareUpdate",this.screenShareListener):this.meeting.participants.joined.addListener("screenShareUpdate",this.participantScreenshareUpdate)}}render(){var n,t;const e=(null===(n=this.participant)||void 0===n?void 0:n.id)===(null===(t=this.meeting)||void 0===t?void 0:t.self.id),r=this.t(this.isFullScreen?"full_screen.exit":"full_screen"),o=this.isFullScreen?this.iconPack.full_screen_minimize:this.iconPack.full_screen_maximize;return a(i,{key:"6a5ebc40a55de43aecd8702d5bc533e90508b8cd",class:{isSelf:e}},a("div",{key:"video-container",id:"video-container",class:{expand:this.videoExpanded}},a("video",{key:"4fe5a1579a1d784f4c143addad2c3c6e5b19d28f",ref:n=>this.videoEl=n,class:{visible:this.screenShareEnabled,"fit-in-container":this.participant.supportsRemoteControl},playsInline:!0,onPlay:()=>{this.play.emit({screenshareParticipant:this.participant,participant:this.meeting.self})},autoPlay:!0,muted:!0,id:`screen-share-video-${this.participant.id}`})),a("div",{id:"controls",key:"controls"},!this.hideFullScreenButton&&!e&&p()&&a("rtk-tooltip",{key:"026ab58307907fc9106a823c27904e35239a91a7",label:r},a("rtk-button",{key:"0d616d404206dbb52c0d72c06010e9a874d6d052",id:"full-screen-btn",kind:"icon",onClick:this.toggleFullScreen,title:r},a("rtk-icon",{key:"04a5f3fd8a4e8df00adb445d915dfc3bfc89e64e",icon:o,"aria-hidden":!0,tabIndex:-1})))),e&&a("div",{id:"self-message",key:"self-message"},a("h3",{key:"7f9938cd1dedc670f9444b288dc4c24e4a8923bd"},this.t("screenshare.shared")),a("div",{key:"282a4af783c69b5250cd69aaf0980ea0949875ea",class:"actions"},null!=this.meeting&&a("rtk-button",{key:"39015fd91d870057943efb0bf55c8f8447056add",variant:"danger",onClick:()=>{this.meeting.self.disableScreenShare()}},a("rtk-icon",{key:"4f8e142e8b4ea413357433f9eff8877b2eccfa2d",icon:this.iconPack.share_screen_stop,slot:"start"}),this.t("screenshare.stop")),a("rtk-button",{key:"9761017f05ee5cf0c48894686cdc92c9012e8004",variant:"secondary",id:"expand-btn",onClick:()=>{this.videoExpanded=!this.videoExpanded}},a("rtk-icon",{key:"ae93172f0163dbb25bc7bd021d780b940b3abc93",icon:this.videoExpanded?this.iconPack.full_screen_minimize:this.iconPack.full_screen_maximize,slot:"start"}),this.t(this.videoExpanded?"screenshare.min_preview":"screenshare.max_preview")))),a("slot",{key:"d7c9383b2d7098009f58864a68eaa156bc2adc19"}))}get host(){return r(this)}static get watchers(){return{participant:["participantChanged"]}}};f([h()],g.prototype,"meeting",void 0),f([h()],g.prototype,"size",void 0),f([h()],g.prototype,"iconPack",void 0),f([h()],g.prototype,"t",void 0),g.style=":host {\n line-height: initial;\n font-family: var(--rtk-font-family, sans-serif);\n\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n\n:host {\n height: 100%;\n width: 100%;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-radius: var(--rtk-border-radius-lg, 12px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-video-bg, 24 24 24) / var(--tw-bg-opacity));\n container-type: inline-size;\n container-name: screentile;\n}\n\n::slotted(rtk-name-tag) {\n position: absolute;\n left: var(--rtk-space-3, 12px);\n bottom: var(--rtk-space-3, 12px);\n opacity: 0.8;\n}\n\n#video-container {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n}\n\n#video-container .fit-in-container {\n -o-object-fit: fill;\n object-fit: fill;\n}\n\nvideo {\n height: 100%;\n width: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n\n:host([variant='gradient']) ::slotted(rtk-audio-visualizer) {\n position: absolute;\n top: var(--rtk-space-2, 8px);\n right: var(--rtk-space-2, 8px);\n border-radius: 9999px;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n padding: var(--rtk-space-2, 8px);\n}\n\n:host([variant='gradient']) ::slotted(rtk-name-tag) {\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n text-align: center;\n background-color: transparent;\n background-image: linear-gradient(to top, var(--tw-gradient-stops));\n --tw-gradient-from: rgb(var(--rtk-colors-background-1000, 8 8 8));\n --tw-gradient-to: rgba(var(--rtk-colors-background-1000, 8 8 8) / 0);\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);\n --tw-gradient-to: transparent;\n}\n\n:host([size='sm'][variant='gradient']) ::slotted(rtk-audio-visualizer) {\n height: var(--rtk-space-5, 20px);\n width: var(--rtk-space-5, 20px);\n}\n\nvideo.visible {\n animation: video-fadein 0.4s ease;\n}\n\n#controls {\n display: none;\n position: absolute;\n top: var(--rtk-space-3, 12px);\n right: var(--rtk-space-3, 12px);\n align-items: center;\n justify-content: flex-end;\n gap: var(--rtk-space-2, 8px);\n}\n\n:host(:hover) #controls, \n:host(:active) #controls, \n:host(:focus-visible) #controls {\n display: flex;\n}\n\n#full-screen-btn {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));\n}\n\n/** For self view */\n\nh3 {\n margin-top: var(--rtk-space-10, 40px);\n margin-bottom: var(--rtk-space-6, 24px);\n text-align: center;\n font-size: 20px;\n font-weight: 500;\n}\n\n:host([size='sm']) h3 {\n font-size: 16px;\n}\n\n#self-message {\n padding-left: var(--rtk-space-4, 16px);\n padding-right: var(--rtk-space-4, 16px);\n}\n\n:host(.isSelf) #self-view {\n flex: 1 1 0%;\n}\n\n:host(.isSelf) #video-container {\n position: static;\n aspect-ratio: auto;\n height: auto;\n width: 50%;\n max-width: var(--rtk-space-96, 384px);\n border-radius: var(--rtk-border-radius-md, 8px);\n transition: 0.6s ease;\n}\n\n:host(.isSelf) #video-container.expand {\n width: 60%;\n max-width: 100%;\n}\n\n.actions {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--rtk-space-2, 8px);\n}\n\n:host([size='sm'].isSelf) #video-container,\n:host([size='md'].isSelf) #video-container,\n:host([size='sm'].isSelf) #expand-btn,\n:host([size='md'].isSelf) #expand-btn {\n /** Hide video, fullscreen buttons in sm and md breakpoints */\n display: none;\n}\n\n/** Remote control */\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n.remote-control {\n z-index: 10;\n height: 100%;\n max-height: 100%;\n flex: 0 1 auto;\n}\n\n#remote-control-self {\n position: absolute;\n top: var(--rtk-space-0, 0px);\n left: 50%;\n z-index: 10;\n width: -moz-max-content;\n width: max-content;\n max-width: 100%;\n box-sizing: border-box;\n display: flex;\n height: var(--rtk-space-8, 32px);\n align-items: center;\n overflow: hidden;\n border-radius: var(--rtk-border-radius-sm, 4px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-warning, 255 205 7) / var(--tw-bg-opacity));\n font-size: 12px;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n transform: translateX(-50%);\n}\n\n#remote-control-self p {\n padding-left: var(--rtk-space-3, 12px);\n padding-right: var(--rtk-space-3, 12px);\n padding-top: var(--rtk-space-2, 8px);\n padding-bottom: var(--rtk-space-2, 8px);\n}\n\n#remote-control-self rtk-button {\n height: 100%;\n border-radius: var(--rtk-border-radius-none, 0);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-bg-opacity));\n font-size: 12px;\n}\n\n:host([size='sm']) #remote-control-self {\n height: auto;\n flex-direction: column;\n}\n\n:host([size='sm']) #remote-control-self rtk-button {\n width: 100%;\n padding-top: var(--rtk-space-1, 4px);\n padding-bottom: var(--rtk-space-1, 4px);\n}\n\n/** Name tag positions */\n\n:host([name-tag-position='bottom-right']) ::slotted(rtk-name-tag) {\n left: auto;\n right: var(--rtk-space-3, 12px);\n}\n\n:host([name-tag-position='bottom-center']) ::slotted(rtk-name-tag) {\n left: auto;\n right: auto;\n}\n\n:host([name-tag-position='top-left']) ::slotted(rtk-name-tag) {\n top: var(--rtk-space-3, 12px);\n bottom: auto;\n}\n\n:host([name-tag-position='top-right']) ::slotted(rtk-name-tag) {\n top: var(--rtk-space-3, 12px);\n right: var(--rtk-space-3, 12px);\n left: auto;\n bottom: auto;\n}\n\n:host([name-tag-position='top-center']) ::slotted(rtk-name-tag) {\n left: auto;\n right: auto;\n bottom: auto;\n top: var(--rtk-space-3, 12px);\n}\n\n/** Keyframes */\n\n@keyframes video-fadein {\n 0% {\n opacity: 0;\n transform: scale(1.4) translateY(20px);\n }\n\n 100% {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n\n::slotted(rtk-network-indicator) {\n position: absolute;\n right: var(--rtk-space-3, 12px);\n bottom: var(--rtk-space-3, 12px);\n}\n\n@media only screen and (max-height: 480px) and (orientation: landscape) {\n :host([size='sm'][variant='solid']) ::slotted(rtk-name-tag), \n :host([size='sm'][variant='solid']) rtk-name-tag {\n left: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n border-radius: var(--rtk-border-radius-none, 0);\n transform-origin: 0% 110%;\n transform: scale(0.6);\n }\n}\n\n@container screentile (max-width: 400px) {\n ::slotted(rtk-name-tag) {\n transform-origin: 0 130%;\n transform: scale(0.7);\n }\n}\n";export{g as rtk_screenshare_view}
|
|
1
|
+
import{r as n,c as t,w as e,h as a,H as i,a as r}from"./p-0ee570cd.js";import{e as o,h as s}from"./p-912c0afc.js";import{i as c,r as d,e as l,a as p}from"./p-02f19345.js";import{S as h}from"./p-f243302d.js";var f=function(n,t,e,a){var i,r=arguments.length,o=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(n,t,e,a);else for(var s=n.length-1;s>=0;s--)(i=n[s])&&(o=(r<3?i(o):r>3?i(t,e,o):i(t,e))||o);return r>3&&o&&Object.defineProperty(t,e,o),o};const g=class{constructor(e){n(this,e),this.stateUpdate=t(this,"rtkStateUpdate",7),this.play=t(this,"screensharePlay",7),this.fullScreenListener=()=>{this.isFullScreen=c()},this.participantScreenshareUpdate=n=>{n.id===this.participant.id&&this.screenShareListener(n)},this.hideFullScreenButton=!1,this.nameTagPosition="bottom-left",this.variant="solid",this.iconPack=o,this.t=s(),this.videoExpanded=!1,this.screenShareEnabled=!1,this.isFullScreen=!1,this.toggleFullScreen=()=>{this.isFullScreen?(l(),this.isFullScreen=!1):(d(this.host),this.isFullScreen=!0)}}connectedCallback(){null===window||void 0===window||window.addEventListener("fullscreenchange",this.fullScreenListener),null===window||void 0===window||window.addEventListener("webkitfullscreenchange",this.fullScreenListener)}componentDidLoad(){this.participantChanged(this.participant)}disconnectedCallback(){if(!this.meeting)return;const{self:n}=this.meeting;this.participant.id===n.id&&this.screenShareListener?this.participant.removeListener("screenShareUpdate",this.screenShareListener):this.meeting.participants.joined.removeListener("screenShareUpdate",this.participantScreenshareUpdate),null===window||void 0===window||window.removeEventListener("fullscreenchange",this.fullScreenListener),null===window||void 0===window||window.removeEventListener("webkitfullscreenchange",this.fullScreenListener)}participantChanged(n){if(null!=n&&this.meeting){const{self:t}=this.meeting;this.screenShareListener=({screenShareEnabled:n,screenShareTracks:t})=>{const a=n&&null!=t.video;if(e((()=>{this.screenShareEnabled=a})),a){const n=new MediaStream;n.addTrack(t.video),null!=this.videoEl&&(this.videoEl.srcObject=n,this.videoEl.play())}else null!=this.videoEl&&(this.videoEl.srcObject=void 0)},this.screenShareListener(n),n.id===t.id?n.addListener("screenShareUpdate",this.screenShareListener):this.meeting.participants.joined.addListener("screenShareUpdate",this.participantScreenshareUpdate)}}render(){var n,t;const e=(null===(n=this.participant)||void 0===n?void 0:n.id)===(null===(t=this.meeting)||void 0===t?void 0:t.self.id),r=this.t(this.isFullScreen?"full_screen.exit":"full_screen"),o=this.isFullScreen?this.iconPack.full_screen_minimize:this.iconPack.full_screen_maximize;return a(i,{key:"6a5ebc40a55de43aecd8702d5bc533e90508b8cd",class:{isSelf:e}},a("div",{key:"video-container",id:"video-container",class:{expand:this.videoExpanded}},a("video",{key:"4fe5a1579a1d784f4c143addad2c3c6e5b19d28f",ref:n=>this.videoEl=n,class:{visible:this.screenShareEnabled,"fit-in-container":this.participant.supportsRemoteControl},playsInline:!0,onPlay:()=>{this.play.emit({screenshareParticipant:this.participant,participant:this.meeting.self})},autoPlay:!0,muted:!0,id:`screen-share-video-${this.participant.id}`})),a("div",{id:"controls",key:"controls"},!this.hideFullScreenButton&&!e&&p()&&a("rtk-tooltip",{key:"026ab58307907fc9106a823c27904e35239a91a7",label:r},a("rtk-button",{key:"0d616d404206dbb52c0d72c06010e9a874d6d052",id:"full-screen-btn",kind:"icon",onClick:this.toggleFullScreen,title:r},a("rtk-icon",{key:"04a5f3fd8a4e8df00adb445d915dfc3bfc89e64e",icon:o,"aria-hidden":!0,tabIndex:-1})))),e&&a("div",{id:"self-message",key:"self-message"},a("h3",{key:"7f9938cd1dedc670f9444b288dc4c24e4a8923bd"},this.t("screenshare.shared")),a("div",{key:"282a4af783c69b5250cd69aaf0980ea0949875ea",class:"actions"},null!=this.meeting&&a("rtk-button",{key:"39015fd91d870057943efb0bf55c8f8447056add",variant:"danger",onClick:()=>{this.meeting.self.disableScreenShare()}},a("rtk-icon",{key:"4f8e142e8b4ea413357433f9eff8877b2eccfa2d",icon:this.iconPack.share_screen_stop,slot:"start"}),this.t("screenshare.stop")),a("rtk-button",{key:"9761017f05ee5cf0c48894686cdc92c9012e8004",variant:"secondary",id:"expand-btn",onClick:()=>{this.videoExpanded=!this.videoExpanded}},a("rtk-icon",{key:"ae93172f0163dbb25bc7bd021d780b940b3abc93",icon:this.videoExpanded?this.iconPack.full_screen_minimize:this.iconPack.full_screen_maximize,slot:"start"}),this.t(this.videoExpanded?"screenshare.min_preview":"screenshare.max_preview")))),a("slot",{key:"d7c9383b2d7098009f58864a68eaa156bc2adc19"}))}get host(){return r(this)}static get watchers(){return{participant:["participantChanged"]}}};f([h()],g.prototype,"meeting",void 0),f([h()],g.prototype,"size",void 0),f([h()],g.prototype,"iconPack",void 0),f([h()],g.prototype,"t",void 0),g.style=":host {\n line-height: initial;\n font-family: var(--rtk-font-family, sans-serif);\n\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n\n:host {\n height: 100%;\n width: 100%;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-radius: var(--rtk-border-radius-lg, 12px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-video-bg, 24 24 24) / var(--tw-bg-opacity));\n container-type: inline-size;\n container-name: screentile;\n}\n\n::slotted(rtk-name-tag) {\n position: absolute;\n left: var(--rtk-space-3, 12px);\n bottom: var(--rtk-space-3, 12px);\n opacity: 0.8;\n}\n\n#video-container {\n position: absolute;\n display: block;\n height: 100%;\n width: 100%;\n}\n\n#video-container .fit-in-container {\n -o-object-fit: fill;\n object-fit: fill;\n}\n\nvideo {\n height: 100%;\n width: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n\n:host([variant='gradient']) ::slotted(rtk-audio-visualizer) {\n position: absolute;\n top: var(--rtk-space-2, 8px);\n right: var(--rtk-space-2, 8px);\n border-radius: 9999px;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n padding: var(--rtk-space-2, 8px);\n}\n\n:host([variant='gradient']) ::slotted(rtk-name-tag) {\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n text-align: center;\n background-color: transparent;\n background-image: linear-gradient(to top, var(--tw-gradient-stops));\n --tw-gradient-from: rgb(var(--rtk-colors-background-1000, 8 8 8));\n --tw-gradient-to: rgba(var(--rtk-colors-background-1000, 8 8 8) / 0);\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);\n --tw-gradient-to: transparent;\n}\n\n:host([size='sm'][variant='gradient']) ::slotted(rtk-audio-visualizer) {\n height: var(--rtk-space-5, 20px);\n width: var(--rtk-space-5, 20px);\n}\n\nvideo.visible {\n animation: video-fadein 0.4s ease;\n}\n\n#controls {\n display: none;\n position: absolute;\n top: var(--rtk-space-3, 12px);\n right: var(--rtk-space-3, 12px);\n align-items: center;\n justify-content: flex-end;\n gap: var(--rtk-space-2, 8px);\n}\n\n:host(:hover) #controls, \n:host(:active) #controls, \n:host(:focus-visible) #controls {\n display: flex;\n}\n\n#full-screen-btn {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-700, 44 44 44) / var(--tw-bg-opacity));\n}\n\n/** For self view */\n\nh3 {\n margin-top: var(--rtk-space-10, 40px);\n margin-bottom: var(--rtk-space-6, 24px);\n text-align: center;\n font-size: 20px;\n font-weight: 500;\n}\n\n:host([size='sm']) h3 {\n font-size: 16px;\n}\n\n#self-message {\n padding-left: var(--rtk-space-4, 16px);\n padding-right: var(--rtk-space-4, 16px);\n}\n\n:host(.isSelf) #self-view {\n flex: 1 1 0%;\n}\n\n:host(.isSelf) #video-container {\n position: static;\n aspect-ratio: auto;\n height: auto;\n width: 50%;\n max-width: var(--rtk-space-96, 384px);\n border-radius: var(--rtk-border-radius-md, 8px);\n transition: 0.6s ease;\n}\n\n:host(.isSelf) #video-container.expand {\n width: 60%;\n max-width: 100%;\n}\n\n.actions {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--rtk-space-2, 8px);\n}\n\n:host([size='sm'].isSelf) #video-container,\n:host([size='md'].isSelf) #video-container,\n:host([size='sm'].isSelf) #expand-btn,\n:host([size='md'].isSelf) #expand-btn {\n /** Hide video, fullscreen buttons in sm and md breakpoints */\n display: none;\n}\n\n/** Remote control */\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n.remote-control {\n z-index: 10;\n height: 100%;\n max-height: 100%;\n flex: 0 1 auto;\n}\n\n#remote-control-self {\n position: absolute;\n top: var(--rtk-space-0, 0px);\n left: 50%;\n z-index: 10;\n width: -moz-max-content;\n width: max-content;\n max-width: 100%;\n box-sizing: border-box;\n display: flex;\n height: var(--rtk-space-8, 32px);\n align-items: center;\n overflow: hidden;\n border-radius: var(--rtk-border-radius-sm, 4px);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-warning, 255 205 7) / var(--tw-bg-opacity));\n font-size: 12px;\n color: rgb(var(--rtk-colors-text-1000, 255 255 255));\n transform: translateX(-50%);\n}\n\n#remote-control-self p {\n padding-left: var(--rtk-space-3, 12px);\n padding-right: var(--rtk-space-3, 12px);\n padding-top: var(--rtk-space-2, 8px);\n padding-bottom: var(--rtk-space-2, 8px);\n}\n\n#remote-control-self rtk-button {\n height: 100%;\n border-radius: var(--rtk-border-radius-none, 0);\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-danger, 255 45 45) / var(--tw-bg-opacity));\n font-size: 12px;\n}\n\n:host([size='sm']) #remote-control-self {\n height: auto;\n flex-direction: column;\n}\n\n:host([size='sm']) #remote-control-self rtk-button {\n width: 100%;\n padding-top: var(--rtk-space-1, 4px);\n padding-bottom: var(--rtk-space-1, 4px);\n}\n\n/** Name tag positions */\n\n:host([name-tag-position='bottom-right']) ::slotted(rtk-name-tag) {\n left: auto;\n right: var(--rtk-space-3, 12px);\n}\n\n:host([name-tag-position='bottom-center']) ::slotted(rtk-name-tag) {\n left: auto;\n right: auto;\n}\n\n:host([name-tag-position='top-left']) ::slotted(rtk-name-tag) {\n top: var(--rtk-space-3, 12px);\n bottom: auto;\n}\n\n:host([name-tag-position='top-right']) ::slotted(rtk-name-tag) {\n top: var(--rtk-space-3, 12px);\n right: var(--rtk-space-3, 12px);\n left: auto;\n bottom: auto;\n}\n\n:host([name-tag-position='top-center']) ::slotted(rtk-name-tag) {\n left: auto;\n right: auto;\n bottom: auto;\n top: var(--rtk-space-3, 12px);\n}\n\n/** Keyframes */\n\n@keyframes video-fadein {\n 0% {\n opacity: 0;\n transform: scale(1.4) translateY(20px);\n }\n\n 100% {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n\n::slotted(rtk-network-indicator) {\n position: absolute;\n right: var(--rtk-space-3, 12px);\n bottom: var(--rtk-space-3, 12px);\n}\n\n@media only screen and (max-height: 480px) and (orientation: landscape) {\n :host([size='sm'][variant='solid']) ::slotted(rtk-name-tag), \n :host([size='sm'][variant='solid']) rtk-name-tag {\n left: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n border-radius: var(--rtk-border-radius-none, 0);\n transform-origin: 0% 110%;\n transform: scale(0.6);\n }\n}\n\n@container screentile (max-width: 400px) {\n ::slotted(rtk-name-tag) {\n transform-origin: 0 130%;\n transform: scale(0.7);\n }\n}\n";export{g as rtk_screenshare_view}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as i}from"./p-0ee570cd.js";import{c as r,e as a,h as o}from"./p-
|
|
1
|
+
import{r as t,h as e,H as i}from"./p-0ee570cd.js";import{c as r,e as a,h as o}from"./p-912c0afc.js";import{S as s}from"./p-f243302d.js";var n=function(t,e,i,r){var a,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var n=t.length-1;n>=0;n--)(a=t[n])&&(s=(o<3?a(s):o>3?a(e,i,s):a(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s};const d=class{constructor(e){t(this,e),this.isPinned=!1,this.nameTagPosition="bottom-left",this.isPreview=!1,this.config=r(),this.variant="solid",this.iconPack=a,this.t=o(),this.onVideoUpdate=t=>{this.videoState=t}}connectedCallback(){this.participantsChanged(this.participant)}componentDidLoad(){this.videoStateChanged(this.videoState)}disconnectedCallback(){null!=this.participant&&this.participant.removeListener("videoUpdate",this.onVideoUpdate)}async participantsChanged(t){null!=t&&(this.videoState={videoEnabled:t.videoEnabled,videoTrack:t.videoTrack},this.isPinned=t.isPinned,t.addListener("videoUpdate",this.onVideoUpdate))}videoStateChanged(t){if(null!=t&&null!=this.videoEl)if(t.videoEnabled){const e=new MediaStream;e.addTrack(t.videoTrack),this.videoEl.srcObject=e}else this.videoEl.srcObject=void 0}isMirrored(){var t;if(null!=this.participant&&("preview"in this.participant||this.isPreview)){const e=this.states,i=null===(t=null==e?void 0:e.prefs)||void 0===t?void 0:t.mirrorVideo;if("boolean"==typeof i)return i}return!1}render(){var t,r,a,o;return e(i,{key:"a3dd1a3fccf6d3e2a9298039098a11869beee9e2"},e("video",{key:"8b14e504969e4eaad73760e6e2ce0180671e7ced",ref:t=>this.videoEl=t,class:{visible:null===(t=this.videoState)||void 0===t?void 0:t.videoEnabled,mirror:this.isMirrored(),[null!==(o=null===(a=null===(r=this.config)||void 0===r?void 0:r.config)||void 0===a?void 0:a.videoFit)&&void 0!==o?o:"cover"]:!0},autoPlay:!0,playsInline:!0,muted:!0}),e("slot",{key:"e6938a22c8cd8e0c38b4724923ceb9808fff3a01"}))}static get watchers(){return{participant:["participantsChanged"],videoState:["videoStateChanged"]}}};n([s()],d.prototype,"states",void 0),n([s()],d.prototype,"config",void 0),n([s()],d.prototype,"size",void 0),n([s()],d.prototype,"iconPack",void 0),n([s()],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{position:relative;display:flex;align-items:center;justify-content:center;aspect-ratio:16 / 9;height:var(--rtk-space-56, 224px);overflow:hidden;border-radius:var(--rtk-border-radius-lg, 12px);-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-video-bg, 24 24 24) / var(--tw-bg-opacity));transition-property:var(--rtk-transition-property, all);transition-duration:150ms}@media (prefers-reduced-motion){:host{--rtk-transition-property:none}}:host([size='sm'][variant='solid']) ::slotted(rtk-name-tag){left:var(--rtk-space-2, 8px);bottom:var(--rtk-space-2, 8px);height:var(--rtk-space-4, 16px)}video{display:none;position:absolute;height:100%;width:100%;border-radius:var(--rtk-border-radius-lg, 12px)}video.contain{-o-object-fit:contain;object-fit:contain}video.cover{-o-object-fit:cover;object-fit:cover}video.visible{display:block}video::-webkit-media-controls{display:none !important}:host([variant='gradient']) ::slotted(rtk-audio-visualizer){position:absolute;top:var(--rtk-space-2, 8px);right:var(--rtk-space-2, 8px);border-radius:9999px;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));padding:var(--rtk-space-2, 8px)}:host([variant='gradient']) ::slotted(rtk-name-tag){bottom:var(--rtk-space-0, 0px);left:var(--rtk-space-0, 0px);display:flex;width:100%;align-items:center;justify-content:center;text-align:center;background-color:transparent;background-image:linear-gradient(to top, var(--tw-gradient-stops));--tw-gradient-from:rgb(var(--rtk-colors-background-1000, 8 8 8));--tw-gradient-to:rgba(var(--rtk-colors-background-1000, 8 8 8) / 0);--tw-gradient-stops:var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to:transparent}video.mirror{transform:scaleX(-1)}@media (orientation: portrait){:host{height:var(--rtk-space-44, 176px)}}";export{d as rtk_participant_setup}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as s,a as e}from"./p-0ee570cd.js";import{c as a,e as r,h}from"./p-
|
|
1
|
+
import{r as t,h as i,H as s,a as e}from"./p-0ee570cd.js";import{c as a,e as r,h}from"./p-912c0afc.js";import{d as n}from"./p-b13ddb7d.js";import{R as d}from"./p-c8eaa707.js";import{S as o}from"./p-f243302d.js";var l=function(t,i,s,e){var a,r=arguments.length,h=r<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 n=t.length-1;n>=0;n--)(a=t[n])&&(h=(r<3?a(h):r>3?a(i,s,h):a(i,s))||h);return r>3&&h&&Object.defineProperty(i,s,h),h};const p=class{constructor(i){t(this,i),this.layout="row",this.participants=[],this.pinnedParticipants=[],this.screenShareParticipants=[],this.plugins=[],this.aspectRatio="16:9",this.gap=8,this.config=a(),this.iconPack=r,this.t=h(),this.gridSize=n}componentWillLoad(){this.initialised=!1,this.screenShareParticipantsChanged(this.screenShareParticipants),this.pluginsChanged(this.plugins),this.initialised=!0}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t;null===(t=this.meeting.meta)||void 0===t||t.removeListener("activeTabUpdate",this.activeTabUpdateListener)}meetingChanged(t){var i,s,e,a;null!=t&&(null!=(null===(i=t.meta)||void 0===i?void 0:i.selfActiveTab)&&this.onActiveTabUpdate(null===(s=t.meta.selfActiveTab)||void 0===s?void 0:s.type,null===(e=t.meta.selfActiveTab)||void 0===e?void 0:e.id),this.activeTabUpdateListener=t=>{this.onActiveTabUpdate(null==t?void 0:t.type,null==t?void 0:t.id)},null===(a=t.meta)||void 0===a||a.addListener("activeTabUpdate",this.activeTabUpdateListener))}screenShareParticipantsChanged(t=[]){(this.initialised||null==this.activeTab)&&(null==this.activeTab&&t.length>0?this.setActiveTab({type:"screenshare",participant:t[0]}):this.revalidateActiveTab())}pluginsChanged(t){(this.initialised||null==this.activeTab)&&(t.length>0?this.setActiveTab({type:"plugin",plugin:t[t.length-1]}):this.revalidateActiveTab())}revalidateActiveTab(){if(null!=this.activeTab)if("screenshare"===this.activeTab.type){const{participant:t}=this.activeTab;this.screenShareParticipants.some((i=>i.id===t.id))||this.reassignActiveTab()}else{const{plugin:t}=this.activeTab;this.plugins.some((i=>i.id===t.id))||this.reassignActiveTab()}}setActiveTab(t,i=!0){var s;this.activeTab=t,i&&(null===(s=this.meeting.meta)||void 0===s||s.setSelfActiveTab({type:t.type,id:"screenshare"===t.type?t.participant.id:t.plugin.id},0))}reassignActiveTab(){this.screenShareParticipants.length>0?this.setActiveTab({type:"screenshare",participant:this.screenShareParticipants[0]}):this.plugins.length>0&&this.setActiveTab({type:"plugin",plugin:this.plugins[this.plugins.length-1]})}onActiveTabUpdate(t,i){if(null!=t&&null!=i)switch(t){case"plugin":const t=this.plugins.find((t=>t.id===i));null!=t&&this.setActiveTab({type:"plugin",plugin:t},!1);break;case"screenshare":const s=this.screenShareParticipants.find((t=>t.id===i));null!=s&&this.setActiveTab({type:"screenshare",participant:s},!1)}}getTabs(){const t=this.screenShareParticipants.map((t=>({type:"screenshare",participant:t}))),i=this.plugins.map((t=>({type:"plugin",plugin:t})));return t.concat(i)}render(){var t,e;if(!this.meeting)return null;const a={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t};return i(s,null,i("main",{id:"main-view",part:"main-view"},(null===(t=this.getTabs())||void 0===t?void 0:t.length)>1&&i("rtk-tab-bar",Object.assign({activeTab:this.activeTab,tabs:this.getTabs(),onTabChange:t=>this.setActiveTab(t.detail)},a)),i("div",{id:"tabs",key:"tabs"},this.screenShareParticipants.map((t=>{var s,e;return i(d,{element:"rtk-screenshare-view",defaults:a,props:{participant:t,key:t.id,style:{display:"screenshare"===(null===(s=this.activeTab)||void 0===s?void 0:s.type)&&(null===(e=this.activeTab)||void 0===e?void 0:e.participant.id)===t.id?"flex":"none"}},childProps:{participant:t,isScreenShare:!0},deepProps:!0})})),this.plugins.map((t=>{var s,e;return i("rtk-plugin-main",Object.assign({},a,{plugin:t,key:t.id,style:{display:"plugin"===(null===(s=this.activeTab)||void 0===s?void 0:s.type)&&(null===(e=this.activeTab)||void 0===e?void 0:e.plugin.id)===t.id?"flex":"none"}}))})))),i(d,{element:"rtk-mixed-grid",defaults:a,childProps:{part:"participants-grid",class:this.gridSize.mixed?`grid-width-${this.gridSize.mixed}`:"grid-width-lg",participants:this.participants,pinnedParticipants:this.pinnedParticipants,screenShareParticipants:this.screenShareParticipants,plugins:this.plugins,aspectRatio:this.aspectRatio,gap:this.gap,size:"AUDIO_ROOM"===(null===(e=this.meeting.meta)||void 0===e?void 0:e.viewType)?"md":"sm",layout:"row"},onlyChildren:!0}))}get host(){return e(this)}static get watchers(){return{meeting:["meetingChanged"],screenShareParticipants:["screenShareParticipantsChanged"],plugins:["pluginsChanged"]}}};l([o()],p.prototype,"size",void 0),l([o()],p.prototype,"meeting",void 0),l([o()],p.prototype,"states",void 0),l([o()],p.prototype,"config",void 0),l([o()],p.prototype,"iconPack",void 0),l([o()],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:block;height:100%;width:100%;display:flex}main{display:flex;flex:1 1 0%;padding-left:var(--rtk-space-4, 16px)}:host([layout='column']) main{padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}main rtk-tab-bar{margin-right:var(--rtk-space-4, 16px);box-sizing:border-box;display:flex;height:100%;width:var(--rtk-space-16, 64px);flex-direction:column}main #tabs{height:100%;flex:1 1 0%}rtk-button{z-index:10}.grid-width-sm{width:25%}.grid-width-md{width:50%}.grid-width-lg{width:66.666667%}.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)}:host([size='sm']){flex-direction:column}:host([size='sm']) .grid-width-lg,:host([size='sm']) .grid-width-md{height:50%;width:100%;max-width:100%}:host([size='sm']) .grid-width-sm{height:33.333333%;width:100%;max-width:100%}:host([size='sm']) main{display:flex;flex:1 1 0%;flex-direction:column;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='sm']) rtk-tab-bar{height:var(--rtk-space-12, 48px);width:100%;flex-direction:row}:host([size='sm']) #tabs{flex:1 1 0%}:host([size='sm']) .tab{margin:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-2, 8px)}:host([layout='column']){flex-direction:column}:host([layout='column']) main{display:flex;flex:1 1 0%}:host([layout='column']) .grid-width-lg,:host([layout='column']) .grid-width-md{height:50%;max-width:100%;width:100%}:host([layout='column']) .grid-width-sm{height:33.333333%;max-width:100%;width:100%}@media (orientation: portrait){:host{flex-direction:column}:host .grid-width-lg{height:50%;width:100%;max-width:100%}:host .grid-width-md{height:33.333333%;width:100%;max-width:100%}:host .grid-width-sm{height:25%;width:100%;max-width:100%}:host main{flex:1 1 0%;flex-direction:column;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='md']) main{flex:1 1 0%;flex-direction:column;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host rtk-tab-bar{height:var(--rtk-space-16, 64px);width:100%;flex-direction:row}:host #tabs{flex:1 1 0%}:host .tab{margin:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-2, 8px)}}@media (orientation: landscape){:host{flex-direction:row}:host([size='sm']){flex-direction:row}:host .grid-width-lg{height:50%;width:100%;max-width:100%}:host([size='sm']) .grid-width-sm{height:100%;max-height:100%;width:16.666667%}:host([size='sm']) main{flex:1 1 0%;flex-direction:row;padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px)}:host([size='md']) main{flex:1 1 0%;flex-direction:row;padding-left:var(--rtk-space-4, 16px);padding-right:var(--rtk-space-4, 16px)}:host([size='sm']) rtk-tab-bar{margin-right:var(--rtk-space-2, 8px);height:100%;width:var(--rtk-space-12, 48px);flex-direction:column}:host #tabs{flex:1 1 0%}:host .tab{margin:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-2, 8px)}}";export{p as rtk_mixed_grid}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as a,a as r}from"./p-0ee570cd.js";import{e,h as s}from"./p-
|
|
1
|
+
import{r as t,h as i,H as a,a as r}from"./p-0ee570cd.js";import{e,h as s}from"./p-912c0afc.js";import{S as o}from"./p-f243302d.js";import{R as c}from"./p-c8eaa707.js";var n=function(t,i,a,r){var e,s=arguments.length,o=s<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,a):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,a,r);else for(var c=t.length-1;c>=0;c--)(e=t[c])&&(o=(s<3?e(o):s>3?e(i,a,o):e(i,a))||o);return s>3&&o&&Object.defineProperty(i,a,o),o};const l=class{constructor(i){t(this,i),this.iconPack=e,this.t=s(),this.hideSelf=!1,this.activeParticipants=[],this.onStageParticipants=[],this.offStageParticipants=[],this.onParticipantListUpdate=()=>{if(!this.meeting)return;let t=this.meeting.participants.active.toArray();this.hideSelf||(t=[...t,this.meeting.self]);let i=this.meeting.participants.joined.toArray().filter((i=>!t.some((t=>t.id===i.id))));this.activeParticipants=t,this.onStageParticipants=i}}connectedCallback(){this.meetingChanged(this.meeting)}meetingChanged(t){t&&"AUDIO_ROOM"===t.self.config.viewType&&(this.onParticipantListUpdate(),t.participants.active.addListener("participantJoined",this.onParticipantListUpdate),t.participants.active.addListener("participantLeft",this.onParticipantListUpdate),t.participants.joined.addListener("participantJoined",this.onParticipantListUpdate),t.participants.joined.addListener("participantLeft",this.onParticipantListUpdate))}disconnectedCallback(){this.resizeObserver.disconnect(),this.resizeObserver=void 0,this.meeting.participants.active.removeListener("participantJoined",this.onParticipantListUpdate),this.meeting.participants.active.removeListener("participantLeft",this.onParticipantListUpdate),this.meeting.participants.joined.removeListener("participantJoined",this.onParticipantListUpdate),this.meeting.participants.joined.removeListener("participantLeft",this.onParticipantListUpdate)}renderGrid(t=[]){const a={meeting:this.meeting,size:this.size,config:this.config,t:this.t,iconPack:this.iconPack,states:this.states};return t.map((t=>i(c,{element:"rtk-audio-tile",defaults:a,props:{key:t.id,participant:t},childProps:{participant:t},deepProps:!0})))}render(){const t=this.activeParticipants.concat(this.onStageParticipants);return i(a,{key:"168d23a466cf3b4c7b25d2a95968a559cbe67e51"},i("div",{key:"cff2b9f9bf08c9d83d076e12b8b0cd0d7b054c49",class:"content scrollbar"},i("div",{key:"2e4ea5563eb9de04310049a2ed945c851037c1b8",class:"stage grid"},this.renderGrid(t)),this.offStageParticipants.length>0&&i("div",{key:"4c8042d69fbb0c6b23ee1ba92da96f759e9fb216",class:"waitlist-area"},i("div",{key:"a6a7acd1f3dbee1dc70ab631fa55ea6637810748",class:"listening-title"},this.offStageParticipants.length," ",this.t("grid.listening")),i("div",{key:"41fa24716a2d8e3ebc72b133a1a40cb45e4a7070",class:"waitlist-grid grid"},this.renderGrid(this.offStageParticipants)))),i("slot",{key:"304b5ed0cb1f7f8b2beaf13814442f912b91a46d"}))}get host(){return r(this)}static get watchers(){return{meeting:["meetingChanged"]}}};n([o()],l.prototype,"meeting",void 0),n([o()],l.prototype,"config",void 0),n([o()],l.prototype,"states",void 0),n([o()],l.prototype,"iconPack",void 0),n([o()],l.prototype,"size",void 0),n([o()],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)}.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{position:relative;height:100%;width:100%;box-sizing:border-box}.content{position:relative;display:flex;height:100%;width:100%;flex-direction:column;overflow-y:auto}.waitlist-area{display:flex;flex-direction:column;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity))}.listening-title{text-align:center;margin-top:var(--rtk-space-5, 20px);margin-bottom:var(--rtk-space-4, 16px)}.waitlist-grid{flex:1 1 0%}.grid{box-sizing:border-box;flex:1 1 0%;gap:var(--rtk-space-6, 24px);display:flex;align-content:center;justify-content:center;flex-wrap:wrap}:host([size='md']) .grid{gap:var(--rtk-space-4, 16px)}:host([size='sm']) .grid{gap:var(--rtk-space-3, 12px)}rtk-audio-tile{aspect-ratio:1 / 1;flex:none;width:calc(20%);max-width:var(--rtk-space-48, 192px);transition:all 0.3s}rtk-audio-tile[size='md']{width:100%;max-width:var(--rtk-space-36, 144px)}rtk-audio-tile[size='sm']{width:100%;max-width:var(--rtk-space-24, 96px)}";export{l as rtk_audio_grid}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as a}from"./p-0ee570cd.js";import{e,h as n}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as a}from"./p-0ee570cd.js";import{e,h as n}from"./p-912c0afc.js";import{a as r}from"./p-a72b4dcc.js";import{S as h}from"./p-f243302d.js";var o=function(t,i,s,a){var e,n=arguments.length,r=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,s):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,a);else for(var h=t.length-1;h>=0;h--)(e=t[h])&&(r=(n<3?e(r):n>3?e(i,s,r):e(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};const c=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=e,this.t=n(),this.participantsActive=!1,this.waitlistedParticipants=[],this.stageRequestedParticipants=[],this.badgeCount=0,this.canViewParticipants=!1,this.updateStageRequests=async t=>{var i,s,a;t||(t=null!==(a=null===(s=null===(i=this.meeting.stage)||void 0===i?void 0:i.getAccessRequests())||void 0===s?void 0:s.stageRequests)&&void 0!==a?a:[]),this.stageRequestedParticipants=t,this.stageRequestedParticipants="REQUESTED_TO_JOIN_STAGE"===this.meeting.stage.status?[this.meeting.self,...t]:t,this.updateBadgeCount()},this.updateBadgeCount=()=>{this.badgeCount=this.waitlistedParticipants.length+this.stageRequestedParticipants.length},this.updateCanView=()=>{this.canViewParticipants=r(this.meeting)}}connectedCallback(){this.meetingChanged(this.meeting),this.statesChanged(this.states)}disconnectedCallback(){var t,i,s;this.meeting&&(null===(i=null===(t=this.meeting)||void 0===t?void 0:t.stage)||void 0===i||i.removeListener("stageStatusUpdate",this.updateCanView),this.waitlistedParticipantJoinedListener&&this.meeting.participants.waitlisted.removeListener("participantJoined",this.waitlistedParticipantJoinedListener),this.waitlistedParticipantLeftListener&&this.meeting.participants.waitlisted.removeListener("participantLeft",this.waitlistedParticipantLeftListener),null===(s=this.meeting.stage)||void 0===s||s.removeListener("stageAccessRequestUpdate",this.updateStageRequests))}meetingChanged(t){var i;t&&(this.canViewParticipants=r(t),null===(i=null==t?void 0:t.stage)||void 0===i||i.on("stageStatusUpdate",this.updateCanView),t.self.permissions.acceptWaitingRequests&&(this.waitlistedParticipants=t.participants.waitlisted.toArray(),this.waitlistedParticipantJoinedListener=t=>{this.waitlistedParticipants.some((i=>i.id===t.id))||(this.waitlistedParticipants=[...this.waitlistedParticipants,t],this.updateBadgeCount())},this.waitlistedParticipantLeftListener=t=>{this.waitlistedParticipants=this.waitlistedParticipants.filter((i=>i.id!==t.id)),this.updateBadgeCount()},t.participants.waitlisted.addListener("participantJoined",this.waitlistedParticipantJoinedListener),t.participants.waitlisted.addListener("participantLeft",this.waitlistedParticipantLeftListener)),this.meeting.self.permissions.stageEnabled&&this.meeting.self.permissions.acceptStageRequests&&(this.updateStageRequests(),null==t||t.stage.on("stageAccessRequestUpdate",this.updateStageRequests)),this.updateBadgeCount())}statesChanged(t){null!=t&&(this.participantsActive=!0===t.activeSidebar&&"participants"===t.sidebar)}toggleParticipantsTab(){const t=this.states;this.participantsActive=!((null==t?void 0:t.activeSidebar)&&"participants"===(null==t?void 0:t.sidebar)),this.stateUpdate.emit({activeSidebar:this.participantsActive,sidebar:this.participantsActive?"participants":void 0,activeMoreMenu:!1,activeAI:!1})}handleParticipantsActiveChange(){this.participantsActive||this.states.activeSidebar||this.buttonEl.focus()}render(){if(!this.canViewParticipants)return s(a,{"data-hidden":!0});const t=this.t("participants");return s(a,{title:t},0!==this.badgeCount&&!this.participantsActive&&s("div",{class:"waiting-participants-count",part:"waiting-participants-count"},s("span",null,this.badgeCount<=100?this.badgeCount:"99+")),s("rtk-controlbar-button",{ref:t=>this.buttonEl=t,part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.participantsActive},onClick:()=>this.toggleParticipantsTab(),icon:this.iconPack.participants,label:t,variant:this.variant}))}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"],participantsActive:["handleParticipantsActiveChange"]}}};o([h()],c.prototype,"meeting",void 0),o([h()],c.prototype,"states",void 0),o([h()],c.prototype,"size",void 0),o([h()],c.prototype,"iconPack",void 0),o([h()],c.prototype,"t",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{position:relative;display:block}:host([data-hidden]){display:none}.waiting-participants-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;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']) .waiting-participants-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{c as rtk_participants_toggle}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as s,H as e}from"./p-0ee570cd.js";import{e as o,h as l}from"./p-
|
|
1
|
+
import{r as i,c as t,h as s,H as e}from"./p-0ee570cd.js";import{e as o,h as l}from"./p-912c0afc.js";import{S as n}from"./p-f243302d.js";var a=function(i,t,s,e){var o,l=arguments.length,n=l<3?t:null===e?e=Object.getOwnPropertyDescriptor(t,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(i,t,s,e);else for(var a=i.length-1;a>=0;a--)(o=i[a])&&(n=(l<3?o(n):l>3?o(t,s,n):o(t,s))||n);return l>3&&n&&Object.defineProperty(t,s,n),n};const d=class{constructor(s){i(this,s),this.stateUpdate=t(this,"rtkStateUpdate",7),this.videoUpdateListener=({videoEnabled:i})=>{this.videoEnabled=i},this.stageStatusListener=()=>{this.stageStatus=this.meeting.stage.status,this.canProduceVideo="ALLOWED"===this.meeting.self.permissions.canProduceVideo},this.mediaPermissionUpdateListener=({kind:i,message:t})=>{"video"===i&&(this.cameraPermission=t)},this.meetingPermissionsUpdateListener=i=>{var t;(null===(t=null==i?void 0:i.media)||void 0===t?void 0:t.video)&&(this.canProduceVideo="ALLOWED"===this.meeting.self.permissions.canProduceVideo)},this.variant="button",this.iconPack=o,this.t=l(),this.videoEnabled=!1,this.canProduceVideo=!1,this.cameraPermission="NOT_REQUESTED",this.stageStatus="OFF_STAGE",this.toggleCamera=()=>{var i,t,s,e,o,l,n,a,d,h,r;if(null===(i=this.meeting)||void 0===i||i.__internals__.logger.info("rtkCameraToggle::toggleCamera",{media:{video:{enabled:Boolean(null===(s=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===s?void 0:s.videoEnabled),permission:this.cameraPermission,canProduce:null===(l=null===(o=null===(e=this.meeting)||void 0===e?void 0:e.self)||void 0===o?void 0:o.permissions)||void 0===l?void 0:l.canProduceVideo}},webinar:{stageStatus:null===(n=this.meeting)||void 0===n?void 0:n.stage.status},livestream:{stageStatus:null===(d=null===(a=this.meeting)||void 0===a?void 0:a.stage)||void 0===d?void 0:d.status},moduleExists:{self:Boolean(null===(h=this.meeting)||void 0===h?void 0:h.self)}}),this.hasPermissionError())return this.stateUpdate.emit({activePermissionsMessage:{enabled:!0,kind:"video"}}),!1;const v=null===(r=this.meeting)||void 0===r?void 0:r.self;null!=v&&this.canProduceVideo&&(v.videoEnabled?v.disableVideo():v.enableVideo())}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var i,t,s,e,o,l,n;null===(i=this.meeting)||void 0===i||i.self.removeListener("videoUpdate",this.videoUpdateListener),null===(t=this.meeting)||void 0===t||t.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null===(e=null===(s=this.meeting)||void 0===s?void 0:s.stage)||void 0===e||e.removeListener("stageStatusUpdate",this.stageStatusListener),null===(n=null===(l=null===(o=this.meeting)||void 0===o?void 0:o.self)||void 0===l?void 0:l.permissions)||void 0===n||n.removeListener("permissionsUpdate",this.meetingPermissionsUpdateListener)}meetingChanged(i){var t,s;if(null!=i){const{self:e,stage:o}=i;this.canProduceVideo="ALLOWED"===this.meeting.self.permissions.canProduceVideo,this.cameraPermission=e.mediaPermissions.video||"NOT_REQUESTED",this.videoEnabled=e.videoEnabled,this.stageStatus=i.stage.status,e.addListener("videoUpdate",this.videoUpdateListener),e.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),null==o||o.addListener("stageStatusUpdate",this.stageStatusListener),null===(s=null===(t=null==i?void 0:i.self)||void 0===t?void 0:t.permissions)||void 0===s||s.addListener("permissionsUpdate",this.meetingPermissionsUpdateListener)}}hasPermissionError(){return"DENIED"===this.cameraPermission||"SYSTEM_DENIED"===this.cameraPermission}getState(){let i="",t="",s="",e={},o=this.hasPermissionError(),l="COULD_NOT_START"===this.cameraPermission;return this.videoEnabled&&!o?(t=this.t("video_on"),s=this.iconPack.video_on):(t=this.t("video_off"),s=this.iconPack.video_off,e["red-icon"]=!0),i=this.t(l?"perm_could_not_start.video":"SYSTEM_DENIED"===this.cameraPermission?"perm_sys_denied.video":"DENIED"===this.cameraPermission?"perm_denied.video":this.videoEnabled?"disable_video":"enable_video"),{tooltipLabel:i,label:t,icon:s,classList:e,showWarning:o||l,disable:o}}render(){var i;if(!this.meeting)return null;if(!this.canProduceVideo||"AUDIO_ROOM"===(null===(i=this.meeting)||void 0===i?void 0:i.meta.viewType)||["OFF_STAGE","REQUESTED_TO_JOIN_STAGE"].includes(this.stageStatus))return s(e,{"data-hidden":!0});const{tooltipLabel:t,label:o,icon:l,classList:n,showWarning:a,disable:d}=this.getState();return s(e,{title:o},s("rtk-tooltip",{kind:"block",label:t,part:"tooltip"},s("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:n,variant:this.variant,label:o,icon:l,onClick:this.toggleCamera,showWarning:a,disabled:d})))}static get watchers(){return{meeting:["meetingChanged"]}}};a([n()],d.prototype,"meeting",void 0),a([n()],d.prototype,"size",void 0),a([n()],d.prototype,"iconPack",void 0),a([n()],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:block}:host([data-hidden]){display:none}";export{d as rtk_camera_toggle}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as a,H as s}from"./p-0ee570cd.js";import{e,h as r,K as o}from"./p-
|
|
1
|
+
import{r as t,c as i,h as a,H as s}from"./p-0ee570cd.js";import{e,h as r,K as o}from"./p-912c0afc.js";import{c as n}from"./p-a72b4dcc.js";import{S as l}from"./p-f243302d.js";var h=function(t,i,a,s){var e,r=arguments.length,o=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,a):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,a,s);else for(var n=t.length-1;n>=0;n--)(e=t[n])&&(o=(r<3?e(o):r>3?e(i,a,o):e(i,a))||o);return r>3&&o&&Object.defineProperty(i,a,o),o};const c=class{constructor(a){t(this,a),this.stateUpdate=i(this,"rtkStateUpdate",7),this.unreadMessageCount=0,this.variant="button",this.iconPack=e,this.t=r(),this.chatActive=!1,this.canViewChat=!1,this.hasNewMessages=!1,this.onChatUpdate=({action:t,message:i})=>{var a;this.chatActive||"add"===t&&i.userId!==(null===(a=this.meeting)||void 0===a?void 0:a.self.userId)&&(this.hasNewMessages=!0,this.unreadMessageCount+=1)},this.toggleChat=()=>{const t=this.states;this.chatActive=!((null==t?void 0:t.activeSidebar)&&"chat"===(null==t?void 0:t.sidebar)),this.chatActive&&(this.unreadMessageCount=0,this.hasNewMessages=!1),this.stateUpdate.emit({activeSidebar:this.chatActive,sidebar:this.chatActive?"chat":void 0,activeMoreMenu:!1,activeAI:!1})},this.updateCanView=()=>{this.canViewChat=n(this.meeting)}}connectedCallback(){this.meetingChanged(this.meeting),this.statesChanged(this.states)}disconnectedCallback(){var t,i,a,s,e,r;null===(i=null===(t=this.meeting)||void 0===t?void 0:t.chat)||void 0===i||i.removeListener("chatUpdate",this.onChatUpdate),null===(s=null===(a=this.meeting)||void 0===a?void 0:a.stage)||void 0===s||s.removeListener("stageStatusUpdate",this.updateCanView),null===(r=null===(e=this.meeting)||void 0===e?void 0:e.self)||void 0===r||r.permissions.removeListener("chatUpdate",this.updateCanView)}meetingChanged(t){var i,a,s,e,r,l,h;if(!t)return;o(t)&&(null===(i=t.chat)||void 0===i||i.getMessages((new Date).getTime(),1,!0).then((t=>{var i;(null===(i=null==t?void 0:t.messages)||void 0===i?void 0:i.length)&&(this.hasNewMessages=!0)})));const c=null!==(s=null===(a=t.meta)||void 0===a?void 0:a.meetingStartedTimestamp.getTime())&&void 0!==s?s:0,d=null===(e=t.chat)||void 0===e?void 0:e.messages.filter((t=>t.timeMs>c));this.unreadMessageCount=d.length||0,null===(r=t.chat)||void 0===r||r.addListener("chatUpdate",this.onChatUpdate),this.canViewChat=n(t),null===(l=null==t?void 0:t.stage)||void 0===l||l.on("stageStatusUpdate",this.updateCanView),null===(h=null==t?void 0:t.self)||void 0===h||h.permissions.on("chatUpdate",this.updateCanView)}statesChanged(t){null!=t&&(this.chatActive=!0===t.activeSidebar&&"chat"===t.sidebar)}handleChatActiveChange(){this.chatActive||this.states.activeSidebar||this.buttonEl.focus()}render(){return this.meeting?this.canViewChat?a(s,{title:this.t("chat")},o(this.meeting)?this.hasNewMessages&&a("div",{class:"unread-count-dot",part:"unread-count-dot"}):0!==this.unreadMessageCount&&!this.chatActive&&a("div",{class:"unread-count",part:"unread-count"},a("span",null,this.unreadMessageCount<=100?this.unreadMessageCount:"99+")),a("rtk-controlbar-button",{ref:t=>this.buttonEl=t,part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.chatActive},onClick:this.toggleChat,icon:this.iconPack.chat,label:this.t("chat"),variant:this.variant})):a(s,{"data-hidden":!0}):null}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"],chatActive:["handleChatActiveChange"]}}};h([l()],c.prototype,"meeting",void 0),h([l()],c.prototype,"states",void 0),h([l()],c.prototype,"size",void 0),h([l()],c.prototype,"iconPack",void 0),h([l()],c.prototype,"t",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{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}.unread-count-dot{position:absolute;right:var(--rtk-space-3, 12px);z-index:10;--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));border-radius:50%;display:flex;height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);align-items:center;justify-content:center}: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{c as rtk_chat_toggle}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{e as
|
|
1
|
+
import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{e as a,h as n}from"./p-912c0afc.js";import{b as o}from"./p-a72b4dcc.js";import{S as l}from"./p-f243302d.js";var h=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 l=t.length-1;l>=0;l--)(a=t[l])&&(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 r=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=a,this.t=n(),this.pluginsActive=!1,this.canViewPlugins=!1,this.updateCanView=()=>{this.canViewPlugins=o(this.meeting)}}disconnectedCallback(){var t,i,s,e;null===(i=null===(t=this.meeting)||void 0===t?void 0:t.stage)||void 0===i||i.removeListener("stageStatusUpdate",this.updateCanView),null===(e=null===(s=this.meeting)||void 0===s?void 0:s.self)||void 0===e||e.permissions.removeListener("pluginsUpdate",this.updateCanView)}connectedCallback(){this.statesChanged(this.states),this.meetingChanged(this.meeting)}meetingChanged(t){var i,s;t&&(this.canViewPlugins=o(t),null===(i=null==t?void 0:t.stage)||void 0===i||i.on("stageStatusUpdate",this.updateCanView),null===(s=null==t?void 0:t.self)||void 0===s||s.permissions.addListener("pluginsUpdate",this.updateCanView))}statesChanged(t){null!=t&&(this.pluginsActive=!0===t.activeSidebar&&"plugins"===t.sidebar)}togglePlugins(){const t=this.states;this.pluginsActive=!((null==t?void 0:t.activeSidebar)&&"plugins"===(null==t?void 0:t.sidebar)),this.stateUpdate.emit({activeSidebar:this.pluginsActive,sidebar:this.pluginsActive?"plugins":void 0,activeMoreMenu:!1,activeAI:!1})}handlePluginsActiveChange(){this.pluginsActive||this.states.activeSidebar||this.buttonEl.focus()}render(){if(!this.canViewPlugins)return s(e,{"data-hidden":!0});const t=this.t("plugins");return s(e,{title:t},s("rtk-controlbar-button",{ref:t=>this.buttonEl=t,part:"controlbar-button",size:this.size,iconPack:this.iconPack,class:{active:this.pluginsActive},onClick:()=>this.togglePlugins(),icon:this.iconPack.rocket,label:t,variant:this.variant}))}static get watchers(){return{meeting:["meetingChanged"],states:["statesChanged"],pluginsActive:["handlePluginsActiveChange"]}}};h([l()],r.prototype,"meeting",void 0),h([l()],r.prototype,"states",void 0),h([l()],r.prototype,"size",void 0),h([l()],r.prototype,"iconPack",void 0),h([l()],r.prototype,"t",void 0),r.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{r as rtk_plugins_toggle}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{c as n,e as a,h as o}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{c as n,e as a,h as o}from"./p-912c0afc.js";import{S as r}from"./p-f243302d.js";var c=function(t,i,s,e){var n,a=arguments.length,o=a<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--)(n=t[r])&&(o=(a<3?n(o):a>3?n(i,s,o):n(i,s))||o);return a>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=n(),this.iconPack=a,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.meeting)return null;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,"config",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 +1 @@
|
|
|
1
|
-
import{r as n,c as t,h as e,H as a}from"./p-0ee570cd.js";import{S as r}from"./p-
|
|
1
|
+
import{r as n,c as t,h as e,H as a}from"./p-0ee570cd.js";import{S as r}from"./p-f243302d.js";import{e as o,h as i}from"./p-912c0afc.js";const s=class{constructor(e){n(this,e),this.tabChange=t(this,"tabChange",7),this.sidebarClose=t(this,"sidebarClose",7),this.view="sidebar",this.tabs=[],this.hideHeader=!1,this.hideCloseAction=!1,this.iconPack=o,this.focusCloseButton=!0,this.t=i(),this.onClose=()=>{this.sidebarClose.emit()}}componentDidLoad(){this.keydownListener=n=>{"Escape"===n.key&&this.onClose()},this.hostEl.addEventListener("keydown",this.keydownListener),this.handleFocusCloseButton()}handleFocusCloseButton(){"chat"===this.currentTab||this.hideCloseAction||this.closeButton.focus()}disconnectedCallback(){this.hostEl.removeEventListener("keydown",this.keydownListener)}render(){const n="full-screen"===this.view,t=this.tabs.find((n=>n.id===this.currentTab));return e(a,{key:"4afc881e8aeb5f51014817e1287aed7700bb56fb",ref:n=>this.hostEl=n,class:this.view},!this.hideCloseAction&&e("rtk-button",{key:"e95b2c25d32535630e0ccf30b46f067395c41a7f",ref:n=>this.closeButton=n,variant:"ghost",kind:"icon",class:"close",onClick:this.onClose,"aria-label":this.t("close")},e("rtk-icon",{key:"0d6398171fbebd8d9b0895fc2e9f0b08e7980ab2",icon:this.iconPack.dismiss})),t&&!this.hideHeader&&e("header",{key:"e92a6c60fa280a36b4643873d48adca3210e3c51",class:"main-header"},e("h3",{key:"8097b3e815c3005c7750c7076eb54242406034a9"},t.name),e("slot",{key:"f91814a6fb62726790ae5c91111be0f6d1ea121c",name:"pinned-state"})),n&&e("header",{key:"5ec434bbc22ffa7acf8a76361e02718080c7a99d",class:"mobile-tabs"},this.tabs.map((n=>e("button",{onClick:()=>{this.tabChange.emit(n.id)},class:{active:this.currentTab===n.id}},n.name)))),e("slot",{key:"77ee9da399e6991cc7bf3e0d979ffeec47e4b769",name:this.currentTab}))}static get watchers(){return{currentTab:["handleFocusCloseButton"]}}};(function(n,t,e,a){var r,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(n,t,e,a);else for(var s=n.length-1;s>=0;s--)(r=n[s])&&(i=(o<3?r(i):o>3?r(t,e,i):r(t,e))||i);o>3&&i&&Object.defineProperty(t,e,i)})([r()],s.prototype,"t",void 0),s.style=":host {\n line-height: initial;\n font-family: var(--rtk-font-family, sans-serif);\n\n font-feature-settings: normal;\n font-variation-settings: normal;\n}\n\np {\n margin: var(--rtk-space-0, 0px);\n padding: var(--rtk-space-0, 0px);\n}\n\n\n:host {\n position: relative;\n height: 100%;\n width: 100%;\n font-family: var(--rtk-font-family, sans-serif);\n z-index: 50;\n display: flex;\n flex-direction: column;\n\n container-type: size;\n container-name: sidebarui;\n}\n\n@container sidebarui (height < 370px) {\n .main-header {\n height: var(--rtk-space-8, 32px) !important;\n }\n .close {\n top: var(--rtk-space-0\\.5, 2px) !important;\n left: var(--rtk-space-0, 0px) !important;\n color: rgba(var(--rtk-colors-danger, 255 45 45) / 0.6);\n }\n}\n\n:host([view='sidebar']) {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-900, 26 26 26) / var(--tw-bg-opacity));\n}\n\n:host([view='full-screen']) {\n position: absolute;\n top: var(--rtk-space-0, 0px);\n right: var(--rtk-space-0, 0px);\n bottom: var(--rtk-space-0, 0px);\n left: var(--rtk-space-0, 0px);\n max-width: 100%;\n border: none;\n}\n\n::slotted(*) {\n flex-grow: 1;\n}\n\n.close {\n position: absolute;\n top: var(--rtk-space-2, 8px);\n left: var(--rtk-space-2, 8px);\n z-index: 10;\n}\n\n.main-header {\n position: relative;\n display: flex;\n height: var(--rtk-space-12, 48px);\n place-items: center;\n justify-content: center;\n}\n\n.main-header, \n.mobile-tabs {\n flex-shrink: 0;\n}\n\n.mobile-tabs {\n display: flex;\n place-items: center;\n justify-content: space-evenly;\n border-bottom: 1px solid rgb(var(--rtk-colors-background-700, 44 44 44));\n}\n\n.mobile-tabs button {\n margin: var(--rtk-space-0, 0px);\n border-width: var(--rtk-border-width-none, 0);\n border-style: none;\n background-color: transparent;\n padding: var(--rtk-space-0, 0px);\n color: rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));\n height: var(--rtk-space-10, 40px);\n cursor: pointer;\n padding-left: var(--rtk-space-4, 16px);\n padding-right: var(--rtk-space-4, 16px);\n font-weight: 500;\n border-bottom: 1px solid transparent;\n}\n\n.mobile-tabs button.active {\n --tw-border-opacity: 1;\n border-color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-border-opacity));\n --tw-text-opacity: 1;\n color: rgba(var(--rtk-colors-brand-300, 73 124 253) / var(--tw-text-opacity));\n}\n\nheader h3 {\n font-size: 14px;\n font-weight: 500;\n}\n\n@media only screen and (max-device-height: 480px) and (orientation: landscape) {\n .main-header {\n display: none !important;\n }\n}\n\n.tab-participant-count-badge {\n display: inline-block;\n padding: 2px 5px;\n border-radius: 9999px;\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity));\n font-size: 12px;\n color: rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64));\n}\n\n.tab-participant-count-badge:not(.selected-tab) {\n --tw-bg-opacity: 1;\n background-color: rgba(var(--rtk-colors-background-600, 60 60 60) / var(--tw-bg-opacity));\n}\n\n.tab-participant-count-badge.requests-pending{\n background-color: rgba(var(--rtk-colors-danger));\n}\n";export{s as rtk_sidebar_ui}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as t}from"./p-912c0afc.js";const n=t=>{let n=null;try{const e=JSON.parse(t.message),{target:s,message:r}=e;n=void 0===s||void 0===r?t:Object.assign(Object.assign({},t),{targetUserIds:s,message:r})}catch(e){n=t}return n};function e(t,n){return t.localeCompare(n)}function s(t){return t.sort(((t,n)=>t.localeCompare(n))).join("_")}function r(t,n){if(null==t)return!0;for(const e of t)if("file"===e.kind){const t=e.getAsFile();e.type.startsWith("image/")?n("image",t):n("file",t)}}function o({messages:t,participants:e,selfUserId:r}){const o={};for(const t of e)o[s([t.userId,r])]=[];return t.forEach((t=>{var e;const r=n(t);let c="everyone";if((null===(e=r.targetUserIds)||void 0===e?void 0:e.length)>0){const t=new Set([r.userId,...r.targetUserIds]);c=s(Array.from(t))}o[c]||(o[c]=[]),o[c].push({type:"chat",message:r})})),o}function c({messages:n,selfUserId:e,selectedGroupId:s,participants:r}){var c;const a=o({messages:n,selfUserId:e,participants:r}),i={};for(const n in a){const r=null!==(c=t[n])&&void 0!==c?c:0;n===s?(i[n]=0,t[n]=new Date):i[n]=a[n].filter((t=>"chat"==t.type&&t.message.time>r&&t.message.userId!==e)).length}return i}function a({groupId:t,selfUserId:n}){return t.split("_").find((t=>t!=n))}const i="dm__";function u(t){return t.isDirectMessage}function f(t){return[...new Set(t)].sort(e).join("<>")}function l(t){return t.split("").reverse().join("")}const p=/^\*([^*\s]+)\*/,d=/^_([^_\s]+)_/,g=/^~([^~\s]+)~/,m=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.,~#?&//=]*)/,_=/<blockquote>[.\s\S]*<\/blockquote>\n\n/m;function b(t,n=!1){if(!_.test(t))return"";let e=0,s=13;return n&&(e=12,s=0),t.substring(t.indexOf("<blockquote>")+e,t.indexOf("</blockquote>")+s)}function v(t){return t.replace(_,"")}const q=2e3,I=["<a>","<b>","<i>","<q>","<s>"];function w(t){t=(t=t.split(" ").map((t=>{if(m.test(t)){const n=m.exec(t);t=t.replace(n[0],`<a>${n[0]}</a>`)}else{if(p.test(t)){const n=p.exec(t);t=t.replace(n[0],`<b>${n[1]}</b>`)}if(d.test(t)){const n=d.exec(t);t=t.replace(n[0],`<i>${n[1]}</i>`)}if(g.test(t)){const n=g.exec(t);t=t.replace(n[0],`<s>${n[1]}</s>`)}}return t})).join(" ")).split(" ").map(((t,n)=>">"!==t||0!==n&&">"!==t[n-1]?t:"<q></q>")).join(" ");const[n]=y(t);return n}function y(t,n=""){const e=[];if(0===t.length)return[e,0];let s=0;for(;s<t.length;){if(n.length&&n===t.substring(s,s+n.length))return[e,s+n.length];if(I.includes(t.substring(s,s+3))){const[n,r]=y(t.substring(s+3),`</${t[s+1]}>`);e.push({type:t[s+1],content:1===n.length&&"plain_text"===n[0].type?n[0].content:n}),s+=r+3}else{let n=e[e.length-1];n&&"plain_text"===n.type||(e.push({type:"plain_text",content:""}),n=e[e.length-1]),n.content+=t[s],s++}}return[e,s]}export{q as M,i as T,o as a,c as b,a as c,e as d,f as e,w as f,s as g,r as h,u as i,b as j,_ as k,n as p,l as r,v as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{e as o,h as a,R as r}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{e as o,h as a,R as r}from"./p-912c0afc.js";import{S as n}from"./p-f243302d.js";var c=function(t,i,s,e){var o,a=arguments.length,r=a<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(r=(a<3?o(r):a>3?o(i,s,r):o(i,s))||r);return a>3&&r&&Object.defineProperty(i,s,r),r};const l=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.variant="button",this.iconPack=o,this.t=a(),this.canToggle=!1,this.permissionsUpdateListener=()=>{this.canToggle=r(this.meeting)},this.breakoutRoomToggle=()=>{var t,i;this.stateUpdate.emit({activeBreakoutRoomsManager:{active:!(null===(i=null===(t=this.states)||void 0===t?void 0:t.activeBreakoutRoomsManager)||void 0===i?void 0:i.active),mode:this.meeting.connectedMeetings.isActive?"view":"create"}})}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t,i,s;null===(s=null===(i=null===(t=this.meeting)||void 0===t?void 0:t.self)||void 0===i?void 0:i.permissions)||void 0===s||s.off("permissionsUpdate",this.permissionsUpdateListener)}meetingChanged(t){t&&(this.canToggle=r(t),t.self.permissions.on("permissionsUpdate",this.permissionsUpdateListener))}render(){return this.meeting?this.canToggle?s(e,{title:this.t("breakout_rooms")},s("rtk-controlbar-button",{part:"controlbar-button",size:this.size,iconPack:this.iconPack,onClick:this.breakoutRoomToggle,icon:this.iconPack.breakout_rooms,label:this.t("breakout_rooms"),variant:this.variant})):void 0:null}static get watchers(){return{meeting:["meetingChanged"]}}};c([n()],l.prototype,"meeting",void 0),c([n()],l.prototype,"states",void 0),c([n()],l.prototype,"size",void 0),c([n()],l.prototype,"iconPack",void 0),c([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}";export{l as rtk_breakout_rooms_toggle}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as s,a as e}from"./p-0ee570cd.js";import{c as n,e as o,h as a}from"./p-
|
|
1
|
+
import{r as t,h as i,H as s,a as e}from"./p-0ee570cd.js";import{c as n,e as o,h as a}from"./p-912c0afc.js";import{R as h}from"./p-c8eaa707.js";import{u as r}from"./p-b13ddb7d.js";import{i as c}from"./p-f47d4fe8.js";import{S as p}from"./p-f243302d.js";var l=function(t,i,s,e){var n,o=arguments.length,a=o<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,s,e);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(a=(o<3?n(a):o>3?n(i,s,a):n(i,s))||a);return o>3&&a&&Object.defineProperty(i,s,a),a};const d=class{constructor(i){t(this,i),this.participants=[],this.aspectRatio="16:9",this.gap=8,this.config=n(),this.iconPack=o,this.t=a(),this.dimensions={width:0,height:0},this.setHostDimensions=()=>{const{clientWidth:t,clientHeight:i}=this.host;this.dimensions={width:t,height:i}}}connectedCallback(){this.resizeObserver=new c(this.setHostDimensions),this.resizeObserver.observe(this.host),this.meetingChanged(this.meeting)}meetingChanged(t){const i=null==t?void 0:t.meta;i&&(this.mediaConnection=Object.assign({},i.mediaState))}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}render(){if(!this.meeting)return null;const t={meeting:this.meeting,config:this.config,states:this.states,size:this.size,iconPack:this.iconPack,t:this.t},{width:e,height:n,getPosition:o}=r({dimensions:this.dimensions,count:this.participants.length,aspectRatio:this.aspectRatio,gap:this.gap});return i(s,null,i("slot",null,this.participants.map(((s,a)=>{const{top:r,left:c}=o(a);return i(h,{element:"rtk-participant-tile",defaults:t,props:{participant:s,style:{position:"absolute",top:`${r}px`,left:`${c}px`,width:`${e}px`,height:`${n}px`},key:s.id,"data-participant":s.id,mediaConnection:this.mediaConnection},childProps:{participant:s},deepProps:!0})}))))}get host(){return e(this)}static get watchers(){return{meeting:["meetingChanged"]}}};l([p()],d.prototype,"size",void 0),l([p()],d.prototype,"meeting",void 0),l([p()],d.prototype,"states",void 0),l([p()],d.prototype,"config",void 0),l([p()],d.prototype,"iconPack",void 0),l([p()],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{position:relative;display:block;height:100%;width:100%}";export{d as rtk_simple_grid}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,w as a,c as r}from"./p-0ee570cd.js";import{h as s}from"./p-3f882e7c.js";import{e as o,h as n,j as c}from"./p-eae4e83b.js";import{S as l}from"./p-52b25934.js";const d=(t,e)=>{if(null==t)return;const i=Math.round(1.5),a=[...Array(3)].map(((t,a)=>{let r=a;return r>i-1&&(r=3-r-1),Math.round((r+1)/(i+1)*e)})),{width:r,height:s}=t,o=t.getContext("2d");let n=2;const c=1*r/a.length,l=c-4;o.clearRect(0,0,r,s),o.fillStyle="rgb(0,0,0,0.0)",o.fillRect(0,0,r,s);const d=getComputedStyle(t).getPropertyValue("color");o.fillStyle=d,o.strokeStyle=d,o.lineCap="round",o.lineWidth=4,o.beginPath();for(const t of a){const e=Math.min(-Math.abs(1.2*t/10*s)+s/2,s/2-2.5),i=Math.max(2*(s/2-e),5);o.moveTo(n+l/2,e),o.lineTo(n+l/2,e+i),n+=c}o.stroke()};var h=function(t,e,i,a){var r,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const p=class{constructor(e){t(this,e),this.variant="bars",this.iconPack=o,this.t=n(),this.hideMuted=!1,this.isScreenShare=!1,this.volume=0}connectedCallback(){this.participantChanged(this.participant)}componentDidLoad(){d(this.visualizer,0)}disconnectedCallback(){var t,e,i;null===(t=this.hark)||void 0===t||t.stop(),this.audioUpdateListener&&(null===(e=this.participant)||void 0===e||e.removeListener("audioUpdate",this.audioUpdateListener)),this.screenShareUpdateListener&&(null===(i=this.participant)||void 0===i||i.removeListener("screenShareUpdate",this.screenShareUpdateListener))}participantChanged(t){null!=t&&(this.audioUpdateListener=({audioEnabled:t,audioTrack:e})=>{var i;if(null===(i=this.hark)||void 0===i||i.stop(),t&&null!=e){this.audioEnabled=!0;const t=new MediaStream;t.addTrack(e),this.calcVolume(t),d(this.visualizer,0)}else this.volume=0,this.audioEnabled=!1},this.isScreenShare?(this.screenShareUpdateListener=({screenShareEnabled:t,screenShareTracks:e})=>{this.audioUpdateListener({audioEnabled:t&&null!=e.audio,audioTrack:e.audio})},this.screenShareUpdateListener({screenShareEnabled:t.screenShareEnabled,screenShareTracks:{audio:t.screenShareTracks.audio,video:t.screenShareTracks.video}}),t.addListener("screenShareUpdate",this.screenShareUpdateListener)):(this.audioUpdateListener(t),t.addListener("audioUpdate",this.audioUpdateListener)))}calcVolume(t){this.hark=s(t,{play:!1,interval:100}),this.hark.on("volume_change",(t=>{const e=this.volume;let i=Math.round(10**(t/115)*10);i<3&&(i=0);let a=Math.round((2*e+i)/3);e!==a&&(this.volume=a,d(this.visualizer,this.volume))}))}render(){return e(i,{key:"ee4ec36b4c9828a6e064e68d00e31c4e17a465e8"},e("div",{key:"e07d2ff77cbb1c9f70df5324db43e2356952e0b9",class:{hideMuted:this.hideMuted}},e("canvas",{key:"4699a67cfbc1cdc2867d41483f384bc8582721fc",width:"24",height:"24",class:{bars:!0,visible:this.audioEnabled},ref:t=>this.visualizer=t,part:"canvas"}),!this.isScreenShare&&!this.audioEnabled&&!0!==this.hideMuted&&e("rtk-icon",{key:"45aae6d22e0f15b49c8bbdbe6d754fe1bb30e669",icon:this.iconPack.mic_off,part:"mic-off-icon"})))}static get watchers(){return{participant:["participantChanged"]}}};h([l()],p.prototype,"size",void 0),h([l()],p.prototype,"iconPack",void 0),h([l()],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:block;width:-moz-fit-content;width:fit-content}.hideMuted{padding:var(--rtk-space-1, 4px)}canvas,rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host([size='sm']){transform:scale(0.9)}canvas{display:none}canvas.visible{display:block}canvas.bars{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}";var v=function(t,e,i,a){var r,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const g=class{constructor(e){t(this,e),this.iconPack=o,this.variant="full",this.t=n(),this.audioinputDevices=[],this.canProduceAudio=!0,this.currentDevices={audio:void 0},this.stageStateListener=()=>{this.canProduceAudio="ALLOWED"===this.meeting.self.permissions.canProduceAudio},this.deviceListUpdateListener=async()=>{const t=await this.meeting.self.getAudioDevices();this.audioinputDevices=t},this.deviceUpdateListener=({device:t})=>{"audioinput"===t.kind&&(this.currentDevices={audio:t})},this.mediaPermissionUpdateListener=async({kind:t,message:e})=>{this.meeting&&"audio"===t&&"ACCEPTED"===e&&(this.audioinputDevices=await this.meeting.self.getAudioDevices())}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t,e,i,a,r;null===(e=null===(t=this.meeting)||void 0===t?void 0:t.stage)||void 0===e||e.removeListener("stageStatusUpdate",this.stageStateListener),null===(i=this.meeting)||void 0===i||i.self.removeListener("deviceListUpdate",this.deviceListUpdateListener),null===(a=this.meeting)||void 0===a||a.self.removeListener("deviceUpdate",this.deviceUpdateListener),null===(r=this.meeting)||void 0===r||r.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener)}meetingChanged(t){t&&a((async()=>{var e,i;const{self:a,stage:r}=t,s=await t.self.getAudioDevices(),o=null===(e=t.self.getCurrentDevices())||void 0===e?void 0:e.audio;this.currentDevices={audio:o},this.canProduceAudio="ALLOWED"===t.self.permissions.canProduceAudio,null==r||r.addListener("stageStatusUpdate",this.stageStateListener),a.addListener("deviceListUpdate",this.deviceListUpdateListener),a.addListener("deviceUpdate",this.deviceUpdateListener),a.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),this.audioinputDevices=null!=o?[null!==(i=s.find((t=>t.deviceId===o.deviceId)))&&void 0!==i?i:o,...s.filter((t=>t.deviceId!==o.deviceId))]:s}))}setDevice(t){var e;if(c(this.meeting))return;const i=this.audioinputDevices.find((e=>e.deviceId===t));null!=i&&(this.currentDevices={audio:i},null===(e=this.meeting)||void 0===e||e.self.setDevice(i))}render(){if(!this.meeting)return null;let t=0;return e(i,null,this.canProduceAudio&&e("div",{part:"microphone-selection",class:"group container "+this.variant},e("label",{slot:"label"},"inline"!==this.variant&&this.t("settings.microphone_input"),e("rtk-icon",{icon:this.iconPack.mic_on,size:"sm"})),e("div",{class:"row"},e("select",{class:"rtk-select",onChange:t=>this.setDevice(t.target.value)},this.audioinputDevices.map((({deviceId:i,label:a})=>{var r;return e("option",{value:i,selected:(null===(r=this.currentDevices.audio)||void 0===r?void 0:r.deviceId)===i},a||"Microphone "+ ++t)}))),e("slot",{name:"indicator"}))))}static get watchers(){return{meeting:["meetingChanged"]}}};v([l()],g.prototype,"meeting",void 0),v([l()],g.prototype,"size",void 0),v([l()],g.prototype,"iconPack",void 0),v([l()],g.prototype,"t",void 0),g.style=".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);width:100%;max-width:100%;text-overflow:ellipsis}.inline .rtk-select{margin-top:var(--rtk-space-1, 4px);width:100%;padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-8, 32px);font-size:14px}.row{margin-bottom:var(--rtk-space-2, 8px);display:flex;width:100%;align-items:center;justify-content:space-between;gap:var(--rtk-space-3, 12px)}.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%}.inline.group{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-0\\.5, 2px)}.inline.group>*{margin-bottom:var(--rtk-space-0, 0px)}label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;gap:var(--rtk-space-1, 4px);font-size:14px}.inline.container{display:flex;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px)}";var u=function(t,e,i,a){var r,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const k=class{constructor(e){t(this,e),this.variant="full",this.iconPack=o,this.t=n(),this.speakerDevices=[],this.currentDevices={speaker:void 0},this.deviceListUpdateListener=async()=>{const t=await this.meeting.self.getSpeakerDevices();this.speakerDevices=t},this.deviceUpdateListener=({device:t})=>{"audiooutput"===t.kind&&(this.currentDevices={speaker:t})},this.mediaPermissionUpdate=async({kind:t,message:e})=>{this.meeting&&"audio"===t&&"ACCEPTED"===e&&(this.speakerDevices=await this.meeting.self.getSpeakerDevices())}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t,e,i;null===(t=this.meeting)||void 0===t||t.self.removeListener("deviceListUpdate",this.deviceListUpdateListener),null===(e=this.meeting)||void 0===e||e.self.removeListener("deviceUpdate",this.deviceUpdateListener),null===(i=this.meeting)||void 0===i||i.self.addListener("mediaPermissionUpdate",this.mediaPermissionUpdate)}meetingChanged(t){t&&a((async()=>{var e,i;const{self:a}=t,r=await t.self.getSpeakerDevices(),s=null===(e=t.self.getCurrentDevices())||void 0===e?void 0:e.speaker;this.currentDevices={speaker:s},a.addListener("deviceListUpdate",this.deviceListUpdateListener),a.addListener("deviceUpdate",this.deviceUpdateListener),a.addListener("mediaPermissionUpdate",this.mediaPermissionUpdate),this.speakerDevices=null!=s?[null!==(i=r.find((t=>t.deviceId===s.deviceId)))&&void 0!==i?i:s,...r.filter((t=>t.deviceId!==s.deviceId))]:r}))}testAudio(){var t;null===(t=this.testAudioEl)||void 0===t||t.play()}setDevice(t){var e,i;if(c(this.meeting))return;const a=this.speakerDevices.find((e=>e.deviceId===t));this.currentDevices={speaker:a},null!=a&&(null===(e=this.meeting)||void 0===e||e.self.setDevice(a),null===(i=this.testAudioEl)||void 0===i||i.setSinkId(a.deviceId))}render(){if(!this.meeting)return null;let t=0;return e(i,null,e("audio",{preload:"auto",src:"https://assets.dyte.io/ui-kit/speaker-test.mp3",ref:t=>this.testAudioEl=t}),e("div",{class:"group "+this.variant,part:"speaker-selection"},this.speakerDevices.length>0&&!c(this.meeting)&&e("div",{class:"container"},e("label",null,"inline"!==this.variant&&this.t("settings.speaker_output"),e("rtk-icon",{icon:this.iconPack.speaker,size:"sm"})),e("div",{class:"row"},e("select",{class:"rtk-select",onChange:t=>this.setDevice(t.target.value)},this.speakerDevices.map((({deviceId:i,label:a})=>{var r;return e("option",{value:i,selected:(null===(r=this.currentDevices.speaker)||void 0===r?void 0:r.deviceId)===i},a||"Speaker "+ ++t)}))))),"full"===this.variant&&e("rtk-button",{variant:"secondary",onClick:()=>this.testAudio()},e("rtk-icon",{icon:this.iconPack.speaker,slot:"start"}),this.t("test"))))}static get watchers(){return{meeting:["meetingChanged"]}}};u([l()],k.prototype,"meeting",void 0),u([l()],k.prototype,"states",void 0),u([l()],k.prototype,"size",void 0),u([l()],k.prototype,"iconPack",void 0),u([l()],k.prototype,"t",void 0),k.style=".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);width:100%;max-width:100%;text-overflow:ellipsis}.inline .rtk-select{margin-top:var(--rtk-space-1, 4px);width:100%;padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-8, 32px);font-size:14px}.row{display:flex;width:100%;align-items:center;justify-content:space-between;gap:var(--rtk-space-3, 12px)}.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%}.inline.group{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-0\\.5, 2px)}.inline.group>*{margin-bottom:var(--rtk-space-0, 0px)}label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;gap:var(--rtk-space-1, 4px);font-size:14px}.inline .container{display:flex;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px)}";var f=function(t,e,i,a){var r,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const b=class{constructor(e){t(this,e),this.onChange=r(this,"rtkChange",4),this.checked=!1,this.readonly=!1,this.disabled=!1,this.iconPack=o,this.t=n(),this.onClick=()=>{this.readonly||this.disabled||(this.checked=!this.checked)},this.onKeyPress=t=>{if(!this.readonly)switch(t.key){case"Enter":case" ":this.checked=!this.checked}}}connectedCallback(){this.checkedChange(this.checked)}checkedChange(t){this.checked=t,this.onChange.emit(t)}render(){return e(i,{key:"c2724826e576f196f000b31cb74ff24a7169c316",role:"switch",tabIndex:this.disabled&&0,"aria-readonly":this.readonly,"aria-checked":this.checked,"aria-disabled":this.disabled,class:{checked:this.checked},onClick:this.onClick,onKeyPress:this.onKeyPress},e("div",{key:"e7a8fec98fb7bc6e2bee20e8b6bd8c45b8cd0bdf",class:"switch",part:"switch"}))}static get watchers(){return{checked:["checkedChange"]}}};f([l()],b.prototype,"iconPack",void 0),f([l()],b.prototype,"t",void 0),b.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:inline-flex;height:var(--rtk-space-6, 24px);width:var(--rtk-space-10, 40px);align-items:center;padding:var(--rtk-space-1, 4px);border-radius:9999px;background-color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));cursor:pointer}.switch{box-sizing:border-box;height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);background-color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));border-radius:9999px;transition-property:var(--rtk-transition-property, all);transition-duration:200ms}:host(.checked){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity))}:host(.checked) .switch{transform:translateX(100%)}:host([readonly]),:host([disabled]){cursor:not-allowed;opacity:0.6}";export{p as rtk_audio_visualizer,g as rtk_microphone_selector,k as rtk_speaker_selector,b as rtk_switch}
|
|
1
|
+
import{r as t,h as e,H as i,w as a,c as r}from"./p-0ee570cd.js";import{h as s}from"./p-3f882e7c.js";import{e as o,h as n,F as c}from"./p-912c0afc.js";import{S as l}from"./p-f243302d.js";const d=(t,e)=>{if(null==t)return;const i=Math.round(1.5),a=[...Array(3)].map(((t,a)=>{let r=a;return r>i-1&&(r=3-r-1),Math.round((r+1)/(i+1)*e)})),{width:r,height:s}=t,o=t.getContext("2d");let n=2;const c=1*r/a.length,l=c-4;o.clearRect(0,0,r,s),o.fillStyle="rgb(0,0,0,0.0)",o.fillRect(0,0,r,s);const d=getComputedStyle(t).getPropertyValue("color");o.fillStyle=d,o.strokeStyle=d,o.lineCap="round",o.lineWidth=4,o.beginPath();for(const t of a){const e=Math.min(-Math.abs(1.2*t/10*s)+s/2,s/2-2.5),i=Math.max(2*(s/2-e),5);o.moveTo(n+l/2,e),o.lineTo(n+l/2,e+i),n+=c}o.stroke()};var h=function(t,e,i,a){var r,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const p=class{constructor(e){t(this,e),this.variant="bars",this.iconPack=o,this.t=n(),this.hideMuted=!1,this.isScreenShare=!1,this.volume=0}connectedCallback(){this.participantChanged(this.participant)}componentDidLoad(){d(this.visualizer,0)}disconnectedCallback(){var t,e,i;null===(t=this.hark)||void 0===t||t.stop(),this.audioUpdateListener&&(null===(e=this.participant)||void 0===e||e.removeListener("audioUpdate",this.audioUpdateListener)),this.screenShareUpdateListener&&(null===(i=this.participant)||void 0===i||i.removeListener("screenShareUpdate",this.screenShareUpdateListener))}participantChanged(t){null!=t&&(this.audioUpdateListener=({audioEnabled:t,audioTrack:e})=>{var i;if(null===(i=this.hark)||void 0===i||i.stop(),t&&null!=e){this.audioEnabled=!0;const t=new MediaStream;t.addTrack(e),this.calcVolume(t),d(this.visualizer,0)}else this.volume=0,this.audioEnabled=!1},this.isScreenShare?(this.screenShareUpdateListener=({screenShareEnabled:t,screenShareTracks:e})=>{this.audioUpdateListener({audioEnabled:t&&null!=e.audio,audioTrack:e.audio})},this.screenShareUpdateListener({screenShareEnabled:t.screenShareEnabled,screenShareTracks:{audio:t.screenShareTracks.audio,video:t.screenShareTracks.video}}),t.addListener("screenShareUpdate",this.screenShareUpdateListener)):(this.audioUpdateListener(t),t.addListener("audioUpdate",this.audioUpdateListener)))}calcVolume(t){this.hark=s(t,{play:!1,interval:100}),this.hark.on("volume_change",(t=>{const e=this.volume;let i=Math.round(10**(t/115)*10);i<3&&(i=0);let a=Math.round((2*e+i)/3);e!==a&&(this.volume=a,d(this.visualizer,this.volume))}))}render(){return e(i,{key:"ee4ec36b4c9828a6e064e68d00e31c4e17a465e8"},e("div",{key:"e07d2ff77cbb1c9f70df5324db43e2356952e0b9",class:{hideMuted:this.hideMuted}},e("canvas",{key:"4699a67cfbc1cdc2867d41483f384bc8582721fc",width:"24",height:"24",class:{bars:!0,visible:this.audioEnabled},ref:t=>this.visualizer=t,part:"canvas"}),!this.isScreenShare&&!this.audioEnabled&&!0!==this.hideMuted&&e("rtk-icon",{key:"45aae6d22e0f15b49c8bbdbe6d754fe1bb30e669",icon:this.iconPack.mic_off,part:"mic-off-icon"})))}static get watchers(){return{participant:["participantChanged"]}}};h([l()],p.prototype,"size",void 0),h([l()],p.prototype,"iconPack",void 0),h([l()],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:block;width:-moz-fit-content;width:fit-content}.hideMuted{padding:var(--rtk-space-1, 4px)}canvas,rtk-icon{height:var(--rtk-space-6, 24px);width:var(--rtk-space-6, 24px)}:host([size='sm']){transform:scale(0.9)}canvas{display:none}canvas.visible{display:block}canvas.bars{--tw-text-opacity:1;color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-text-opacity))}";var v=function(t,e,i,a){var r,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const g=class{constructor(e){t(this,e),this.iconPack=o,this.variant="full",this.t=n(),this.audioinputDevices=[],this.canProduceAudio=!0,this.currentDevices={audio:void 0},this.stageStateListener=()=>{this.canProduceAudio="ALLOWED"===this.meeting.self.permissions.canProduceAudio},this.deviceListUpdateListener=async()=>{const t=await this.meeting.self.getAudioDevices();this.audioinputDevices=t},this.deviceUpdateListener=({device:t})=>{"audioinput"===t.kind&&(this.currentDevices={audio:t})},this.mediaPermissionUpdateListener=async({kind:t,message:e})=>{this.meeting&&"audio"===t&&"ACCEPTED"===e&&(this.audioinputDevices=await this.meeting.self.getAudioDevices())}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t,e,i,a,r;null===(e=null===(t=this.meeting)||void 0===t?void 0:t.stage)||void 0===e||e.removeListener("stageStatusUpdate",this.stageStateListener),null===(i=this.meeting)||void 0===i||i.self.removeListener("deviceListUpdate",this.deviceListUpdateListener),null===(a=this.meeting)||void 0===a||a.self.removeListener("deviceUpdate",this.deviceUpdateListener),null===(r=this.meeting)||void 0===r||r.self.removeListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener)}meetingChanged(t){t&&a((async()=>{var e,i;const{self:a,stage:r}=t,s=await t.self.getAudioDevices(),o=null===(e=t.self.getCurrentDevices())||void 0===e?void 0:e.audio;this.currentDevices={audio:o},this.canProduceAudio="ALLOWED"===t.self.permissions.canProduceAudio,null==r||r.addListener("stageStatusUpdate",this.stageStateListener),a.addListener("deviceListUpdate",this.deviceListUpdateListener),a.addListener("deviceUpdate",this.deviceUpdateListener),a.addListener("mediaPermissionUpdate",this.mediaPermissionUpdateListener),this.audioinputDevices=null!=o?[null!==(i=s.find((t=>t.deviceId===o.deviceId)))&&void 0!==i?i:o,...s.filter((t=>t.deviceId!==o.deviceId))]:s}))}setDevice(t){var e;if(c(this.meeting))return;const i=this.audioinputDevices.find((e=>e.deviceId===t));null!=i&&(this.currentDevices={audio:i},null===(e=this.meeting)||void 0===e||e.self.setDevice(i))}render(){if(!this.meeting)return null;let t=0;return e(i,null,this.canProduceAudio&&e("div",{part:"microphone-selection",class:"group container "+this.variant},e("label",{slot:"label"},"inline"!==this.variant&&this.t("settings.microphone_input"),e("rtk-icon",{icon:this.iconPack.mic_on,size:"sm"})),e("div",{class:"row"},e("select",{class:"rtk-select",onChange:t=>this.setDevice(t.target.value)},this.audioinputDevices.map((({deviceId:i,label:a})=>{var r;return e("option",{value:i,selected:(null===(r=this.currentDevices.audio)||void 0===r?void 0:r.deviceId)===i},a||"Microphone "+ ++t)}))),e("slot",{name:"indicator"}))))}static get watchers(){return{meeting:["meetingChanged"]}}};v([l()],g.prototype,"meeting",void 0),v([l()],g.prototype,"size",void 0),v([l()],g.prototype,"iconPack",void 0),v([l()],g.prototype,"t",void 0),g.style=".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);width:100%;max-width:100%;text-overflow:ellipsis}.inline .rtk-select{margin-top:var(--rtk-space-1, 4px);width:100%;padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-8, 32px);font-size:14px}.row{margin-bottom:var(--rtk-space-2, 8px);display:flex;width:100%;align-items:center;justify-content:space-between;gap:var(--rtk-space-3, 12px)}.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%}.inline.group{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-0\\.5, 2px)}.inline.group>*{margin-bottom:var(--rtk-space-0, 0px)}label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;gap:var(--rtk-space-1, 4px);font-size:14px}.inline.container{display:flex;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px)}";var u=function(t,e,i,a){var r,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const k=class{constructor(e){t(this,e),this.variant="full",this.iconPack=o,this.t=n(),this.speakerDevices=[],this.currentDevices={speaker:void 0},this.deviceListUpdateListener=async()=>{const t=await this.meeting.self.getSpeakerDevices();this.speakerDevices=t},this.deviceUpdateListener=({device:t})=>{"audiooutput"===t.kind&&(this.currentDevices={speaker:t})},this.mediaPermissionUpdate=async({kind:t,message:e})=>{this.meeting&&"audio"===t&&"ACCEPTED"===e&&(this.speakerDevices=await this.meeting.self.getSpeakerDevices())}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){var t,e,i;null===(t=this.meeting)||void 0===t||t.self.removeListener("deviceListUpdate",this.deviceListUpdateListener),null===(e=this.meeting)||void 0===e||e.self.removeListener("deviceUpdate",this.deviceUpdateListener),null===(i=this.meeting)||void 0===i||i.self.addListener("mediaPermissionUpdate",this.mediaPermissionUpdate)}meetingChanged(t){t&&a((async()=>{var e,i;const{self:a}=t,r=await t.self.getSpeakerDevices(),s=null===(e=t.self.getCurrentDevices())||void 0===e?void 0:e.speaker;this.currentDevices={speaker:s},a.addListener("deviceListUpdate",this.deviceListUpdateListener),a.addListener("deviceUpdate",this.deviceUpdateListener),a.addListener("mediaPermissionUpdate",this.mediaPermissionUpdate),this.speakerDevices=null!=s?[null!==(i=r.find((t=>t.deviceId===s.deviceId)))&&void 0!==i?i:s,...r.filter((t=>t.deviceId!==s.deviceId))]:r}))}testAudio(){var t;null===(t=this.testAudioEl)||void 0===t||t.play()}setDevice(t){var e,i;if(c(this.meeting))return;const a=this.speakerDevices.find((e=>e.deviceId===t));this.currentDevices={speaker:a},null!=a&&(null===(e=this.meeting)||void 0===e||e.self.setDevice(a),null===(i=this.testAudioEl)||void 0===i||i.setSinkId(a.deviceId))}render(){if(!this.meeting)return null;let t=0;return e(i,null,e("audio",{preload:"auto",src:"https://assets.dyte.io/ui-kit/speaker-test.mp3",ref:t=>this.testAudioEl=t}),e("div",{class:"group "+this.variant,part:"speaker-selection"},this.speakerDevices.length>0&&!c(this.meeting)&&e("div",{class:"container"},e("label",null,"inline"!==this.variant&&this.t("settings.speaker_output"),e("rtk-icon",{icon:this.iconPack.speaker,size:"sm"})),e("div",{class:"row"},e("select",{class:"rtk-select",onChange:t=>this.setDevice(t.target.value)},this.speakerDevices.map((({deviceId:i,label:a})=>{var r;return e("option",{value:i,selected:(null===(r=this.currentDevices.speaker)||void 0===r?void 0:r.deviceId)===i},a||"Speaker "+ ++t)}))))),"full"===this.variant&&e("rtk-button",{variant:"secondary",onClick:()=>this.testAudio()},e("rtk-icon",{icon:this.iconPack.speaker,slot:"start"}),this.t("test"))))}static get watchers(){return{meeting:["meetingChanged"]}}};u([l()],k.prototype,"meeting",void 0),u([l()],k.prototype,"states",void 0),u([l()],k.prototype,"size",void 0),u([l()],k.prototype,"iconPack",void 0),u([l()],k.prototype,"t",void 0),k.style=".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);width:100%;max-width:100%;text-overflow:ellipsis}.inline .rtk-select{margin-top:var(--rtk-space-1, 4px);width:100%;padding-top:var(--rtk-space-1, 4px);padding-bottom:var(--rtk-space-1, 4px);padding-left:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-1\\.5, 6px);padding-right:var(--rtk-space-8, 32px);font-size:14px}.row{display:flex;width:100%;align-items:center;justify-content:space-between;gap:var(--rtk-space-3, 12px)}.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%}.inline.group{margin-top:var(--rtk-space-0, 0px);margin-bottom:var(--rtk-space-0\\.5, 2px)}.inline.group>*{margin-bottom:var(--rtk-space-0, 0px)}label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;gap:var(--rtk-space-1, 4px);font-size:14px}.inline .container{display:flex;align-items:center;justify-content:flex-start;gap:var(--rtk-space-2, 8px);padding-left:var(--rtk-space-2, 8px);padding-right:var(--rtk-space-2, 8px)}";var f=function(t,e,i,a){var r,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const b=class{constructor(e){t(this,e),this.onChange=r(this,"rtkChange",4),this.checked=!1,this.readonly=!1,this.disabled=!1,this.iconPack=o,this.t=n(),this.onClick=()=>{this.readonly||this.disabled||(this.checked=!this.checked)},this.onKeyPress=t=>{if(!this.readonly)switch(t.key){case"Enter":case" ":this.checked=!this.checked}}}connectedCallback(){this.checkedChange(this.checked)}checkedChange(t){this.checked=t,this.onChange.emit(t)}render(){return e(i,{key:"c2724826e576f196f000b31cb74ff24a7169c316",role:"switch",tabIndex:this.disabled&&0,"aria-readonly":this.readonly,"aria-checked":this.checked,"aria-disabled":this.disabled,class:{checked:this.checked},onClick:this.onClick,onKeyPress:this.onKeyPress},e("div",{key:"e7a8fec98fb7bc6e2bee20e8b6bd8c45b8cd0bdf",class:"switch",part:"switch"}))}static get watchers(){return{checked:["checkedChange"]}}};f([l()],b.prototype,"iconPack",void 0),f([l()],b.prototype,"t",void 0),b.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:inline-flex;height:var(--rtk-space-6, 24px);width:var(--rtk-space-10, 40px);align-items:center;padding:var(--rtk-space-1, 4px);border-radius:9999px;background-color:rgb(var(--rtk-colors-text-600, 255 255 255 / 0.52));cursor:pointer}.switch{box-sizing:border-box;height:var(--rtk-space-4, 16px);width:var(--rtk-space-4, 16px);background-color:rgb(var(--rtk-colors-text-on-brand-1000, var(--rtk-colors-text-1000, 255 255 255)));border-radius:9999px;transition-property:var(--rtk-transition-property, all);transition-duration:200ms}:host(.checked){--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-brand-500, 33 96 253) / var(--tw-bg-opacity))}:host(.checked) .switch{transform:translateX(100%)}:host([readonly]),:host([disabled]){cursor:not-allowed;opacity:0.6}";export{p as rtk_audio_visualizer,g as rtk_microphone_selector,k as rtk_speaker_selector,b as rtk_switch}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./p-0ee570cd.js";import{u as t,O as o,P as r}from"./p-912c0afc.js";function n(){return function(n,s){const{connectedCallback:c,disconnectedCallback:d}=n;n.connectedCallback=function(){const n=e(this),d=n[s];n[`_rtkStoreToCleanup-${s}`]=t,d||(n[s]=t.state[s],o(s,n,t));const a=e=>{if(e.detail.requestId===n._storeRequestId){const c=e.detail.store.state[s];n.componentOnReady().then((()=>{n[s]=c})),o(s,n,e.detail.store),n[`_rtkStoreToCleanup-${s}`]=e.detail.store,r(s,n,t),document.removeEventListener("rtkProvideStore",a)}};n[`_rtkStoreResponseListener-${s}`]=a,document.addEventListener("rtkProvideStore",a);const u=`${n.tagName}-${Date.now()}-${Math.random()}`;n._storeRequestId=u;const i=new CustomEvent("rtkRequestStore",{detail:{element:n,propName:s,requestId:u},bubbles:!0,composed:!0});n.dispatchEvent(i);const k=()=>{const e=`${n.tagName}-${Date.now()}-${Math.random().toString(36)}`;n._storeRequestId=e;const t=new CustomEvent("rtkRequestStore",{detail:{element:n,propName:s,requestId:e},bubbles:!0,composed:!0});n.dispatchEvent(t),document.removeEventListener("rtkPeerStoreReady",k)};return n[`_rtkStoreReadyListener-${s}`]=k,document.addEventListener("rtkPeerStoreReady",k),null==c?void 0:c.call(this)},n.disconnectedCallback=function(){const t=e(this);r(s,t,t[`_rtkStoreToCleanup-${s}`]);const o=t[`_rtkStoreResponseListener-${s}`];o&&(document.removeEventListener("rtkProvideStore",o),delete t[`_rtkStoreResponseListener-${s}`]);const n=t[`_rtkStoreReadyListener-${s}`];return n&&(document.removeEventListener("rtkPeerStoreReady",n),delete t[`_rtkStoreReadyListener-${s}`]),null==d?void 0:d.call(this)}}}export{n as S}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{c as a,e as n,h as r,T as h}from"./p-eae4e83b.js";import{d as o}from"./p-cbdd7a99.js";import{R as p}from"./p-c8eaa707.js";import{S as c}from"./p-52b25934.js";import{d}from"./p-b13ddb7d.js";var l=function(t,i,s,e){var a,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,e);else for(var h=t.length-1;h>=0;h--)(a=t[h])&&(r=(n<3?a(r):n>3?a(i,s,r):a(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};const g=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.hideSelf=!1,this.participants=[],this.pinnedParticipants=[],this.screenShareParticipants=[],this.plugins=[],this.emptyStage=!1,this.showLiveStreamPlayer=!1,this.canCurrentPeerHost=!1,this.pipSupported=!1,this.pipEnabled=!1,this.hidden=!1,this.layout="row",this.aspectRatio="16:9",this.gap=8,this.config=a(),this.iconPack=n,this.t=r(),this.gridSize=d,this.overrides={},this.invalidRoomStates=["init","waitlisted","ended","kicked","rejected"],this.filterParticipants=t=>{var i;if(this.overrides&&(null===(i=this.overrides)||void 0===i?void 0:i.videoUnsubscribed)){const i=this.overrides.videoUnsubscribed.preset;i.length>0&&(t=t.filter((t=>!i.some((i=>void 0!==t.presetName&&t.presetName.match(i))))))}return t},this.onViewModeChanged=()=>{this.meeting&&this.updateActiveParticipants()},this.onParticipantJoined=o((()=>{this.updateActiveParticipants()}),50),this.onParticipantLeft=o((()=>{this.updateActiveParticipants()}),50),this.stageStatusListener=()=>{this.updateActiveParticipants(),this.showLiveStreamPlayer=h(this.meeting),"ON_STAGE"!==this.meeting.stage.status&&this.removeScreenShare(this.meeting.self)},this.peerStageStatusListener=t=>{this.updateActiveParticipants(),"ON_STAGE"!==this.meeting.stage.status&&(this.removePinned(t),this.removeScreenShare(t))},this.onScreenShareUpdate=t=>{t.screenShareEnabled?this.addScreenShare(t):this.removeScreenShare(t)},this.onSelfScreenShareUpdate=({screenShareEnabled:t})=>{t?this.addScreenShare(this.meeting.self):this.removeScreenShare(this.meeting.self)},this.toggleTileListener=({hidden:t})=>{this.hidden=t,this.updateActiveParticipants()},this.onPluginStateUpdate=(t,{active:i})=>{i?this.plugins.some((i=>i.id===t.id))||(this.plugins=[...this.plugins,t]):this.plugins=this.plugins.filter((i=>i.id!==t.id))},this.onParticipantPinned=()=>{this.updateActiveParticipants()},this.onParticipantUnpinned=()=>{this.updateActiveParticipants()},this.updateRoomStateListener=()=>{this.roomState=this.meeting.self.roomState}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){this.disconnectMeeting(this.meeting)}disconnectMeeting(t){var i;if(!t)return;this.participants=[],this.plugins=[];const{self:s,participants:e,plugins:a}=t;s.removeListener("pinned",this.onParticipantPinned),s.removeListener("unpinned",this.onParticipantUnpinned),s.removeListener("roomLeft",this.updateRoomStateListener),s.removeListener("roomJoined",this.updateRoomStateListener),s.removeListener("screenShareUpdate",this.onSelfScreenShareUpdate),s.removeListener("toggleTile",this.toggleTileListener),null==a||a.all.removeListener("stateUpdate",this.onPluginStateUpdate),null===(i=t.stage)||void 0===i||i.removeListener("stageStatusUpdate",this.stageStatusListener),e.removeListener("viewModeChanged",this.onViewModeChanged),e.active.removeListener("participantLeft",this.onParticipantLeft),e.active.removeListener("participantJoined",this.onParticipantJoined),e.pinned.removeListener("participantJoined",this.onParticipantPinned),e.pinned.removeListener("participantLeft",this.onParticipantUnpinned),e.joined.removeListener("screenShareUpdate",this.onScreenShareUpdate),e.joined.removeListener("stageStatusUpdate",this.peerStageStatusListener)}meetingChanged(t,i){var s,e,a,n;if(null!==i&&this.disconnectMeeting(i),null!=t){const{self:i,participants:r,plugins:h,stage:o}=t;this.pipSupported=(null===(s=this.meeting.participants.pip)||void 0===s?void 0:s.isSupported())&&(null===(e=t.self.config)||void 0===e?void 0:e.pipMode),this.pipSupported&&this.meeting.participants.pip.init();const{permissions:p}=i;this.roomState=i.roomState,this.hideSelf="ON_STAGE"!==this.meeting.stage.status||(null==p?void 0:p.isRecorder)||p.hiddenParticipant,this.participants=this.filterParticipants([...r.active.toArray(),...i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...r.pinned.toArray(),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=r.joined.toArray().filter((t=>t.screenShareEnabled)),this.plugins=(null==h?void 0:h.active.toArray())||[],(null==p?void 0:p.stageEnabled)&&(this.canCurrentPeerHost=p.acceptStageRequests||p.canPresent,this.updateStage()),this.hidden=t.self.hidden,i.addListener("roomLeft",this.updateRoomStateListener),i.addListener("roomJoined",this.updateRoomStateListener),i.addListener("screenShareUpdate",this.onSelfScreenShareUpdate),i.addListener("pinned",this.onParticipantPinned),i.addListener("unpinned",this.onParticipantUnpinned),i.addListener("toggleTile",this.toggleTileListener),null==o||o.addListener("stageStatusUpdate",this.stageStatusListener),null==h||h.all.addListener("stateUpdate",this.onPluginStateUpdate),r.addListener("viewModeChanged",this.onViewModeChanged),r.active.addListener("participantLeft",this.onParticipantLeft),null===(a=null==r?void 0:r.joined)||void 0===a||a.on("stageStatusUpdate",this.peerStageStatusListener),r.joined.addListener("screenShareUpdate",this.onScreenShareUpdate),r.active.addListener("participantJoined",this.onParticipantJoined),r.pinned.addListener("participantJoined",this.onParticipantPinned),r.pinned.addListener("participantLeft",this.onParticipantUnpinned),(null===(n=t.stage)||void 0===n?void 0:n.status)&&this.stageStatusListener()}}overridesChanged(t){this.updateActiveParticipants()}screenShareParticipantsChanged(t){const i=t.length>0;!!this.states.activeScreenShare!==i&&(this.stateUpdate.emit({activeScreenShare:i}),this.states.activeScreenShare=i)}pluginsChanged(t){const i=t.length>0;!!this.states.activePlugin!==i&&(this.stateUpdate.emit({activePlugin:i}),this.states.activePlugin=i)}pinnedParticipantsChanged(t){const i=t.length>0;!!this.states.activeSpotlight!==i&&(this.stateUpdate.emit({activeSpotlight:i}),this.states.activeSpotlight=i)}updateActiveParticipants(){var t;const{self:i,participants:s,stage:e}=this.meeting;this.hideSelf=this.hidden||"ON_STAGE"!==e.status||(null===(t=i.permissions)||void 0===t?void 0:t.isRecorder)||i.permissions.hiddenParticipant,this.participants=this.filterParticipants([...s.active.toArray().filter((t=>t.id!==i.id)),..."ACTIVE_GRID"!==s.viewMode||i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...s.pinned.toArray().filter((t=>t.id!==i.id)),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=s.joined.toArray().filter((t=>t.screenShareEnabled)),i.screenShareEnabled&&(this.screenShareParticipants=this.screenShareParticipants.concat([i])),this.updateStage()}updateStage(){var t;const{self:i}=this.meeting;this.meeting&&(this.emptyStage=!!(null===(t=null==i?void 0:i.permissions)||void 0===t?void 0:t.stageEnabled)&&0===this.participants.length&&0===this.pinnedParticipants.length)}addScreenShare(t){this.screenShareParticipants.some((i=>i.id===t.id))||(this.screenShareParticipants=[...this.screenShareParticipants,t])}removeScreenShare(t){this.screenShareParticipants=this.screenShareParticipants.filter((i=>i.id!==t.id))}removePinned(t){this.pinnedParticipants=this.pinnedParticipants.filter((i=>i.id!==t.id))}render(){const t={meeting:this.meeting,size:this.size,states:this.states,config:this.config,iconPack:this.iconPack,t:this.t};return this.invalidRoomStates.includes(this.roomState)?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.join_stage,size:"xl"}),s("h3",null,this.t("disconnected")),s("p",null,this.t("disconnected.description")))):"disconnected"===this.roomState?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),s("h3",null,this.t("offline")),s("p",null,this.t("offline.description")))):"failed"===this.roomState?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),s("h3",null,this.t("failed")),s("p",null,this.t("failed.description")))):this.showLiveStreamPlayer?s(e,null,s("rtk-livestream-player",{meeting:this.meeting,size:this.size}),s("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),s("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t})):this.emptyStage?s(e,null,s("div",{class:"webinar-stage"},s("div",{class:"center"},this.canCurrentPeerHost&&s("div",{class:"ctr",part:"container"},s("p",{class:"message",part:"message"},this.t("stage.empty_host")),s("span",{class:"description",part:"description"},this.t("stage.empty_host_summary"))),!this.canCurrentPeerHost&&s("div",{class:"ctr",part:"container"},s("p",{class:"message",part:"message"},this.t("stage.empty_viewer")))))):s(e,null,s(p,{element:"rtk-grid",defaults:t,childProps:{participants:this.participants,screenShareParticipants:this.screenShareParticipants,plugins:this.plugins,pinnedParticipants:this.pinnedParticipants,aspectRatio:this.aspectRatio,gap:this.gap,layout:this.layout,gridSize:this.gridSize},onlyChildren:!0}),s("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),s("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t}))}static get watchers(){return{meeting:["meetingChanged"],overrides:["overridesChanged"],screenShareParticipants:["screenShareParticipantsChanged"],plugins:["pluginsChanged"],pinnedParticipants:["pinnedParticipantsChanged"]}}};l([c()],g.prototype,"meeting",void 0),l([c()],g.prototype,"size",void 0),l([c()],g.prototype,"states",void 0),l([c()],g.prototype,"config",void 0),l([c()],g.prototype,"iconPack",void 0),l([c()],g.prototype,"t",void 0),g.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;height:100%;width:100%}.offline-grid{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}.offline-grid h3{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);font-size:20px;font-weight:500;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.offline-grid p{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);text-align:center;font-size:16px;font-weight:400;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.offline-grid rtk-icon{margin-bottom:var(--rtk-space-2, 8px)}.webinar-stage{box-sizing:border-box;height:100%;display:flex;align-content:center;align-items:center;justify-content:center;text-align:center}.webinar-stage h2{margin:var(--rtk-space-0, 0px);font-weight:normal}rtk-viewer-count{display:none}.ctr{display:flex;flex-direction:column;align-items:center}.message{font-size:16px;border-radius:var(--rtk-border-radius-lg, 12px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));padding-left:var(--rtk-space-8, 32px);padding-right:var(--rtk-space-8, 32px);padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.description{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);font-size:14px}rtk-livestream-indicator{display:none}@media only screen and (max-device-height: 480px) and (orientation: landscape){rtk-viewer-count[variant='embedded']{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-2, 8px);z-index:20;margin-top:var(--rtk-space-0, 0px);margin-left:var(--rtk-space-0, 0px);display:flex}rtk-livestream-indicator{position:absolute;top:var(--rtk-space-0, 0px);left:var(--rtk-space-2, 8px);z-index:20;margin-top:var(--rtk-space-0, 0px);margin-left:var(--rtk-space-0, 0px);display:flex}}";export{g as rtk_grid}
|
|
1
|
+
import{r as t,c as i,h as s,H as e}from"./p-0ee570cd.js";import{c as a,e as n,h as r,T as h}from"./p-912c0afc.js";import{d as o}from"./p-cbdd7a99.js";import{R as c}from"./p-c8eaa707.js";import{S as p}from"./p-f243302d.js";import{d}from"./p-b13ddb7d.js";var l=function(t,i,s,e){var a,n=arguments.length,r=n<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,i,s,e);else for(var h=t.length-1;h>=0;h--)(a=t[h])&&(r=(n<3?a(r):n>3?a(i,s,r):a(i,s))||r);return n>3&&r&&Object.defineProperty(i,s,r),r};const g=class{constructor(s){t(this,s),this.stateUpdate=i(this,"rtkStateUpdate",7),this.hideSelf=!1,this.participants=[],this.pinnedParticipants=[],this.screenShareParticipants=[],this.plugins=[],this.emptyStage=!1,this.showLiveStreamPlayer=!1,this.canCurrentPeerHost=!1,this.pipSupported=!1,this.pipEnabled=!1,this.hidden=!1,this.layout="row",this.aspectRatio="16:9",this.gap=8,this.config=a(),this.iconPack=n,this.t=r(),this.gridSize=d,this.overrides={},this.invalidRoomStates=["init","waitlisted","ended","kicked","rejected"],this.filterParticipants=t=>{var i;if(this.overrides&&(null===(i=this.overrides)||void 0===i?void 0:i.videoUnsubscribed)){const i=this.overrides.videoUnsubscribed.preset;i.length>0&&(t=t.filter((t=>!i.some((i=>void 0!==t.presetName&&t.presetName.match(i))))))}return t},this.onViewModeChanged=()=>{this.meeting&&this.updateActiveParticipants()},this.onParticipantJoined=o((()=>{this.updateActiveParticipants()}),50),this.onParticipantLeft=o((()=>{this.updateActiveParticipants()}),50),this.stageStatusListener=()=>{this.updateActiveParticipants(),this.showLiveStreamPlayer=h(this.meeting),"ON_STAGE"!==this.meeting.stage.status&&this.removeScreenShare(this.meeting.self)},this.peerStageStatusListener=t=>{this.updateActiveParticipants(),"ON_STAGE"!==this.meeting.stage.status&&(this.removePinned(t),this.removeScreenShare(t))},this.onScreenShareUpdate=t=>{t.screenShareEnabled?this.addScreenShare(t):this.removeScreenShare(t)},this.onSelfScreenShareUpdate=({screenShareEnabled:t})=>{t?this.addScreenShare(this.meeting.self):this.removeScreenShare(this.meeting.self)},this.toggleTileListener=({hidden:t})=>{this.hidden=t,this.updateActiveParticipants()},this.onPluginStateUpdate=(t,{active:i})=>{i?this.plugins.some((i=>i.id===t.id))||(this.plugins=[...this.plugins,t]):this.plugins=this.plugins.filter((i=>i.id!==t.id))},this.onParticipantPinned=()=>{this.updateActiveParticipants()},this.onParticipantUnpinned=()=>{this.updateActiveParticipants()},this.updateRoomStateListener=()=>{this.roomState=this.meeting.self.roomState}}connectedCallback(){this.meetingChanged(this.meeting)}disconnectedCallback(){this.disconnectMeeting(this.meeting)}disconnectMeeting(t){var i;if(!t)return;this.participants=[],this.plugins=[];const{self:s,participants:e,plugins:a}=t;s.removeListener("pinned",this.onParticipantPinned),s.removeListener("unpinned",this.onParticipantUnpinned),s.removeListener("roomLeft",this.updateRoomStateListener),s.removeListener("roomJoined",this.updateRoomStateListener),s.removeListener("screenShareUpdate",this.onSelfScreenShareUpdate),s.removeListener("toggleTile",this.toggleTileListener),null==a||a.all.removeListener("stateUpdate",this.onPluginStateUpdate),null===(i=t.stage)||void 0===i||i.removeListener("stageStatusUpdate",this.stageStatusListener),e.removeListener("viewModeChanged",this.onViewModeChanged),e.active.removeListener("participantLeft",this.onParticipantLeft),e.active.removeListener("participantJoined",this.onParticipantJoined),e.pinned.removeListener("participantJoined",this.onParticipantPinned),e.pinned.removeListener("participantLeft",this.onParticipantUnpinned),e.joined.removeListener("screenShareUpdate",this.onScreenShareUpdate),e.joined.removeListener("stageStatusUpdate",this.peerStageStatusListener)}meetingChanged(t,i){var s,e,a,n;if(null!==i&&this.disconnectMeeting(i),null!=t){const{self:i,participants:r,plugins:h,stage:o}=t;this.pipSupported=(null===(s=this.meeting.participants.pip)||void 0===s?void 0:s.isSupported())&&(null===(e=t.self.config)||void 0===e?void 0:e.pipMode),this.pipSupported&&this.meeting.participants.pip.init();const{permissions:c}=i;this.roomState=i.roomState,this.hideSelf="ON_STAGE"!==this.meeting.stage.status||(null==c?void 0:c.isRecorder)||c.hiddenParticipant,this.participants=this.filterParticipants([...r.active.toArray(),...i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...r.pinned.toArray(),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=r.joined.toArray().filter((t=>t.screenShareEnabled)),this.plugins=(null==h?void 0:h.active.toArray())||[],(null==c?void 0:c.stageEnabled)&&(this.canCurrentPeerHost=c.acceptStageRequests||c.canPresent,this.updateStage()),this.hidden=t.self.hidden,i.addListener("roomLeft",this.updateRoomStateListener),i.addListener("roomJoined",this.updateRoomStateListener),i.addListener("screenShareUpdate",this.onSelfScreenShareUpdate),i.addListener("pinned",this.onParticipantPinned),i.addListener("unpinned",this.onParticipantUnpinned),i.addListener("toggleTile",this.toggleTileListener),null==o||o.addListener("stageStatusUpdate",this.stageStatusListener),null==h||h.all.addListener("stateUpdate",this.onPluginStateUpdate),r.addListener("viewModeChanged",this.onViewModeChanged),r.active.addListener("participantLeft",this.onParticipantLeft),null===(a=null==r?void 0:r.joined)||void 0===a||a.on("stageStatusUpdate",this.peerStageStatusListener),r.joined.addListener("screenShareUpdate",this.onScreenShareUpdate),r.active.addListener("participantJoined",this.onParticipantJoined),r.pinned.addListener("participantJoined",this.onParticipantPinned),r.pinned.addListener("participantLeft",this.onParticipantUnpinned),(null===(n=t.stage)||void 0===n?void 0:n.status)&&this.stageStatusListener()}}overridesChanged(t){this.updateActiveParticipants()}screenShareParticipantsChanged(t){const i=t.length>0;!!this.states.activeScreenShare!==i&&(this.stateUpdate.emit({activeScreenShare:i}),this.states.activeScreenShare=i)}pluginsChanged(t){const i=t.length>0;!!this.states.activePlugin!==i&&(this.stateUpdate.emit({activePlugin:i}),this.states.activePlugin=i)}pinnedParticipantsChanged(t){const i=t.length>0;!!this.states.activeSpotlight!==i&&(this.stateUpdate.emit({activeSpotlight:i}),this.states.activeSpotlight=i)}updateActiveParticipants(){var t;const{self:i,participants:s,stage:e}=this.meeting;this.hideSelf=this.hidden||"ON_STAGE"!==e.status||(null===(t=i.permissions)||void 0===t?void 0:t.isRecorder)||i.permissions.hiddenParticipant,this.participants=this.filterParticipants([...s.active.toArray().filter((t=>t.id!==i.id)),..."ACTIVE_GRID"!==s.viewMode||i.isPinned||this.hideSelf?[]:[i]]),this.pinnedParticipants=[...s.pinned.toArray().filter((t=>t.id!==i.id)),...i.isPinned&&!this.hideSelf?[i]:[]],this.screenShareParticipants=s.joined.toArray().filter((t=>t.screenShareEnabled)),i.screenShareEnabled&&(this.screenShareParticipants=this.screenShareParticipants.concat([i])),this.updateStage()}updateStage(){var t;const{self:i}=this.meeting;this.meeting&&(this.emptyStage=!!(null===(t=null==i?void 0:i.permissions)||void 0===t?void 0:t.stageEnabled)&&0===this.participants.length&&0===this.pinnedParticipants.length)}addScreenShare(t){this.screenShareParticipants.some((i=>i.id===t.id))||(this.screenShareParticipants=[...this.screenShareParticipants,t])}removeScreenShare(t){this.screenShareParticipants=this.screenShareParticipants.filter((i=>i.id!==t.id))}removePinned(t){this.pinnedParticipants=this.pinnedParticipants.filter((i=>i.id!==t.id))}render(){const t={meeting:this.meeting,size:this.size,states:this.states,config:this.config,iconPack:this.iconPack,t:this.t};return this.invalidRoomStates.includes(this.roomState)?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.join_stage,size:"xl"}),s("h3",null,this.t("disconnected")),s("p",null,this.t("disconnected.description")))):"disconnected"===this.roomState?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),s("h3",null,this.t("offline")),s("p",null,this.t("offline.description")))):"failed"===this.roomState?s(e,null,s("div",{class:"offline-grid"},s("rtk-icon",{icon:this.iconPack.disconnected,size:"xl"}),s("h3",null,this.t("failed")),s("p",null,this.t("failed.description")))):this.showLiveStreamPlayer?s(e,null,s("rtk-livestream-player",{meeting:this.meeting,size:this.size}),s("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),s("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t})):this.emptyStage?s(e,null,s("div",{class:"webinar-stage"},s("div",{class:"center"},this.canCurrentPeerHost&&s("div",{class:"ctr",part:"container"},s("p",{class:"message",part:"message"},this.t("stage.empty_host")),s("span",{class:"description",part:"description"},this.t("stage.empty_host_summary"))),!this.canCurrentPeerHost&&s("div",{class:"ctr",part:"container"},s("p",{class:"message",part:"message"},this.t("stage.empty_viewer")))))):s(e,null,s(c,{element:"rtk-grid",defaults:t,childProps:{participants:this.participants,screenShareParticipants:this.screenShareParticipants,plugins:this.plugins,pinnedParticipants:this.pinnedParticipants,aspectRatio:this.aspectRatio,gap:this.gap,layout:this.layout,gridSize:this.gridSize},onlyChildren:!0}),s("rtk-livestream-indicator",{meeting:this.meeting,size:"sm",t:this.t}),s("rtk-viewer-count",{meeting:this.meeting,variant:"embedded",t:this.t}))}static get watchers(){return{meeting:["meetingChanged"],overrides:["overridesChanged"],screenShareParticipants:["screenShareParticipantsChanged"],plugins:["pluginsChanged"],pinnedParticipants:["pinnedParticipantsChanged"]}}};l([p()],g.prototype,"meeting",void 0),l([p()],g.prototype,"size",void 0),l([p()],g.prototype,"states",void 0),l([p()],g.prototype,"config",void 0),l([p()],g.prototype,"iconPack",void 0),l([p()],g.prototype,"t",void 0),g.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;height:100%;width:100%}.offline-grid{display:flex;height:100%;width:100%;flex-direction:column;align-items:center;justify-content:center}.offline-grid h3{margin-top:var(--rtk-space-2, 8px);margin-bottom:var(--rtk-space-2, 8px);margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);font-size:20px;font-weight:500;color:rgb(var(--rtk-colors-text-900, 255 255 255 / 0.88))}.offline-grid p{margin-top:var(--rtk-space-1, 4px);margin-bottom:var(--rtk-space-1, 4px);margin-left:var(--rtk-space-0, 0px);margin-right:var(--rtk-space-0, 0px);text-align:center;font-size:16px;font-weight:400;color:rgb(var(--rtk-colors-text-700, 255 255 255 / 0.64))}.offline-grid rtk-icon{margin-bottom:var(--rtk-space-2, 8px)}.webinar-stage{box-sizing:border-box;height:100%;display:flex;align-content:center;align-items:center;justify-content:center;text-align:center}.webinar-stage h2{margin:var(--rtk-space-0, 0px);font-weight:normal}rtk-viewer-count{display:none}.ctr{display:flex;flex-direction:column;align-items:center}.message{font-size:16px;border-radius:var(--rtk-border-radius-lg, 12px);--tw-bg-opacity:1;background-color:rgba(var(--rtk-colors-background-800, 30 30 30) / var(--tw-bg-opacity));padding-left:var(--rtk-space-8, 32px);padding-right:var(--rtk-space-8, 32px);padding-top:var(--rtk-space-4, 16px);padding-bottom:var(--rtk-space-4, 16px);color:rgb(var(--rtk-colors-text-1000, 255 255 255))}.description{margin-top:var(--rtk-space-4, 16px);margin-bottom:var(--rtk-space-4, 16px);font-size:14px}rtk-livestream-indicator{display:none}@media only screen and (max-device-height: 480px) and (orientation: landscape){rtk-viewer-count[variant='embedded']{position:absolute;top:var(--rtk-space-0, 0px);right:var(--rtk-space-2, 8px);z-index:20;margin-top:var(--rtk-space-0, 0px);margin-left:var(--rtk-space-0, 0px);display:flex}rtk-livestream-indicator{position:absolute;top:var(--rtk-space-0, 0px);left:var(--rtk-space-2, 8px);z-index:20;margin-top:var(--rtk-space-0, 0px);margin-left:var(--rtk-space-0, 0px);display:flex}}";export{g as rtk_grid}
|