@cloudflare/realtimekit-ui 1.1.0-staging.11 → 1.1.0-staging.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (727) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/cjs/{ChatHead-e13f3b0e.js → ChatHead-777e6a2d.js} +1 -1
  3. package/dist/cjs/{TextMessage-75b55b60.js → TextMessage-b9322340.js} +2 -2
  4. package/dist/cjs/{chat-90670f84.js → chat-f1a9fd6e.js} +1 -1
  5. package/dist/cjs/{config-60d594e2.js → config-86164f93.js} +2 -2
  6. package/dist/cjs/{debounce-677e65cb.js → debounce-267777c1.js} +1 -1
  7. package/dist/cjs/index-2e5758b6.js +4403 -0
  8. package/dist/cjs/{index-821d14b7.js → index-6f8c1928.js} +1 -1
  9. package/dist/cjs/{index-5442bdba.js → index-92947ea7.js} +2 -2
  10. package/dist/cjs/index.cjs.js +6 -6
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/{merge-7ce7986a.js → merge-bb096d88.js} +1 -1
  13. package/dist/cjs/{notification-b9d42aa0.js → notification-ef397c71.js} +1 -1
  14. package/dist/cjs/realtimekit-ui.cjs.js +30 -3
  15. package/dist/cjs/rtk-ai-toggle.cjs.entry.js +3 -3
  16. package/dist/cjs/rtk-ai-transcriptions.cjs.entry.js +4 -4
  17. package/dist/cjs/rtk-ai.cjs.entry.js +3 -3
  18. package/dist/cjs/rtk-audio-grid.cjs.entry.js +4 -4
  19. package/dist/cjs/rtk-audio-tile.cjs.entry.js +3 -3
  20. package/dist/cjs/rtk-audio-visualizer_4.cjs.entry.js +4 -4
  21. package/dist/cjs/{rtk-avatar_23.cjs.entry.js → rtk-avatar_26.cjs.entry.js} +563 -255
  22. package/dist/cjs/rtk-breakout-room-manager_3.cjs.entry.js +6 -6
  23. package/dist/cjs/rtk-breakout-rooms-manager_9.cjs.entry.js +10 -10
  24. package/dist/cjs/rtk-breakout-rooms-toggle.cjs.entry.js +3 -3
  25. package/dist/cjs/rtk-camera-selector_2.cjs.entry.js +4 -4
  26. package/dist/cjs/rtk-camera-toggle.cjs.entry.js +3 -3
  27. package/dist/cjs/rtk-caption-toggle.cjs.entry.js +3 -3
  28. package/dist/cjs/rtk-chat-composer-ui.cjs.entry.js +11 -11
  29. package/dist/cjs/rtk-chat-message.cjs.entry.js +6 -6
  30. package/dist/cjs/rtk-chat-messages-ui.cjs.entry.js +13 -7
  31. package/dist/cjs/rtk-chat-search-results.cjs.entry.js +4 -4
  32. package/dist/cjs/rtk-chat-selector-ui.cjs.entry.js +4 -4
  33. package/dist/cjs/rtk-chat-toggle.cjs.entry.js +9 -5
  34. package/dist/cjs/rtk-clock.cjs.entry.js +6 -6
  35. package/dist/cjs/rtk-controlbar-button.cjs.entry.js +3 -3
  36. package/dist/cjs/rtk-controlbar.cjs.entry.js +5 -5
  37. package/dist/cjs/rtk-debugger-audio_4.cjs.entry.js +3 -3
  38. package/dist/cjs/rtk-debugger-toggle.cjs.entry.js +4 -4
  39. package/dist/cjs/rtk-dialog-manager.cjs.entry.js +4 -4
  40. package/dist/cjs/rtk-dialog.cjs.entry.js +4 -4
  41. package/dist/cjs/rtk-ended-screen.cjs.entry.js +3 -3
  42. package/dist/cjs/rtk-file-dropzone.cjs.entry.js +4 -4
  43. package/dist/cjs/rtk-file-message_3.cjs.entry.js +14 -14
  44. package/dist/cjs/rtk-fullscreen-toggle.cjs.entry.js +3 -3
  45. package/dist/cjs/rtk-grid-pagination.cjs.entry.js +4 -4
  46. package/dist/cjs/rtk-grid.cjs.entry.js +4 -4
  47. package/dist/cjs/rtk-header.cjs.entry.js +5 -5
  48. package/dist/cjs/rtk-idle-screen.cjs.entry.js +4 -4
  49. package/dist/cjs/rtk-image-viewer.cjs.entry.js +4 -4
  50. package/dist/cjs/rtk-information-tooltip.cjs.entry.js +4 -4
  51. package/dist/cjs/rtk-leave-button.cjs.entry.js +4 -4
  52. package/dist/cjs/rtk-livestream-indicator_3.cjs.entry.js +2477 -1450
  53. package/dist/cjs/rtk-livestream-toggle.cjs.entry.js +3 -3
  54. package/dist/cjs/rtk-logo.cjs.entry.js +3 -3
  55. package/dist/cjs/rtk-meeting-title.cjs.entry.js +3 -3
  56. package/dist/cjs/rtk-message-list-view.cjs.entry.js +7 -7
  57. package/dist/cjs/rtk-mic-toggle.cjs.entry.js +3 -3
  58. package/dist/cjs/rtk-mixed-grid.cjs.entry.js +4 -4
  59. package/dist/cjs/rtk-more-toggle.cjs.entry.js +5 -5
  60. package/dist/cjs/rtk-mute-all-button.cjs.entry.js +3 -3
  61. package/dist/cjs/rtk-name-tag.cjs.entry.js +3 -3
  62. package/dist/cjs/rtk-network-indicator.cjs.entry.js +3 -3
  63. package/dist/cjs/rtk-notification.cjs.entry.js +7 -7
  64. package/dist/cjs/rtk-notifications.cjs.entry.js +5 -5
  65. package/dist/cjs/rtk-participant-count.cjs.entry.js +3 -3
  66. package/dist/cjs/rtk-participant-setup.cjs.entry.js +5 -5
  67. package/dist/cjs/rtk-participant_2.cjs.entry.js +7 -7
  68. package/dist/cjs/rtk-participants-audio.cjs.entry.js +4 -4
  69. package/dist/cjs/rtk-participants-stage-list_4.cjs.entry.js +5 -5
  70. package/dist/cjs/rtk-participants-toggle.cjs.entry.js +4 -4
  71. package/dist/cjs/rtk-participants.cjs.entry.js +4 -4
  72. package/dist/cjs/rtk-pip-toggle.cjs.entry.js +3 -3
  73. package/dist/cjs/rtk-plugin-main_2.cjs.entry.js +3 -3
  74. package/dist/cjs/rtk-plugins-toggle.cjs.entry.js +4 -4
  75. package/dist/cjs/rtk-plugins_2.cjs.entry.js +7 -7
  76. package/dist/cjs/rtk-poll_2.cjs.entry.js +6 -6
  77. package/dist/cjs/rtk-polls-toggle.cjs.entry.js +4 -4
  78. package/dist/cjs/rtk-recording-indicator.cjs.entry.js +4 -4
  79. package/dist/cjs/rtk-recording-toggle.cjs.entry.js +3 -3
  80. package/dist/cjs/rtk-screen-share-toggle.cjs.entry.js +3 -3
  81. package/dist/cjs/rtk-screenshare-view.cjs.entry.js +8 -8
  82. package/dist/cjs/rtk-settings-audio_2.cjs.entry.js +3 -3
  83. package/dist/cjs/rtk-settings-toggle.cjs.entry.js +4 -4
  84. package/dist/cjs/rtk-settings.cjs.entry.js +3 -3
  85. package/dist/cjs/rtk-setup-screen.cjs.entry.js +5 -5
  86. package/dist/cjs/rtk-sidebar-ui.cjs.entry.js +3 -3
  87. package/dist/cjs/rtk-sidebar.cjs.entry.js +5 -5
  88. package/dist/cjs/rtk-simple-grid.cjs.entry.js +4 -4
  89. package/dist/cjs/rtk-spotlight-grid.cjs.entry.js +6 -6
  90. package/dist/cjs/rtk-spotlight-indicator.cjs.entry.js +3 -3
  91. package/dist/cjs/rtk-stage-toggle.cjs.entry.js +3 -3
  92. package/dist/cjs/rtk-stage.cjs.entry.js +4 -4
  93. package/dist/cjs/rtk-transcript.cjs.entry.js +4 -4
  94. package/dist/cjs/rtk-transcripts.cjs.entry.js +3 -3
  95. package/dist/cjs/rtk-ui-provider.cjs.entry.js +3 -3
  96. package/dist/cjs/rtk-waiting-screen.cjs.entry.js +4 -4
  97. package/dist/cjs/{sidebar-e172c4ae.js → sidebar-7df66d80.js} +1 -1
  98. package/dist/cjs/{ui-store-594688bf.js → ui-store-d0e80f30.js} +112 -27
  99. package/dist/collection/collection-manifest.json +4 -1
  100. package/dist/collection/components/rtk-ai/rtk-ai.js +2 -2
  101. package/dist/collection/components/rtk-ai-toggle/rtk-ai-toggle.js +2 -2
  102. package/dist/collection/components/rtk-ai-transcriptions/rtk-ai-transcriptions.js +2 -2
  103. package/dist/collection/components/rtk-audio-grid/rtk-audio-grid.js +2 -2
  104. package/dist/collection/components/rtk-audio-tile/rtk-audio-tile.js +3 -3
  105. package/dist/collection/components/rtk-audio-visualizer/rtk-audio-visualizer.js +2 -2
  106. package/dist/collection/components/rtk-avatar/rtk-avatar.js +2 -2
  107. package/dist/collection/components/rtk-breakout-room-manager/rtk-breakout-room-manager.js +2 -2
  108. package/dist/collection/components/rtk-breakout-room-participants/rtk-breakout-room-participants.js +2 -2
  109. package/dist/collection/components/rtk-breakout-room-toggle/rtk-breakout-rooms-toggle.js +3 -3
  110. package/dist/collection/components/rtk-breakout-rooms-manager/rtk-breakout-rooms-manager.js +3 -3
  111. package/dist/collection/components/rtk-broadcast-message-modal/rtk-broadcast-message-modal.js +2 -2
  112. package/dist/collection/components/rtk-camera-selector/rtk-camera-selector.js +2 -2
  113. package/dist/collection/components/rtk-camera-toggle/rtk-camera-toggle.js +2 -2
  114. package/dist/collection/components/rtk-caption-toggle/rtk-caption-toggle.js +2 -2
  115. package/dist/collection/components/rtk-chat/rtk-chat.css +2 -0
  116. package/dist/collection/components/rtk-chat/rtk-chat.js +27 -240
  117. package/dist/collection/components/rtk-chat-composer-ui/rtk-chat-composer-ui.js +12 -11
  118. package/dist/collection/components/rtk-chat-composer-view/rtk-chat-composer-view.js +1 -1
  119. package/dist/collection/components/rtk-chat-header/rtk-chat-header.css +75 -0
  120. package/dist/collection/components/rtk-chat-header/rtk-chat-header.js +32 -0
  121. package/dist/collection/components/rtk-chat-message/rtk-chat-message.css +0 -2
  122. package/dist/collection/components/rtk-chat-message/rtk-chat-message.js +8 -8
  123. package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.css +0 -2
  124. package/dist/collection/components/rtk-chat-messages-ui/rtk-chat-messages-ui.js +5 -5
  125. package/dist/collection/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.js +91 -33
  126. package/dist/collection/components/rtk-chat-search-results/rtk-chat-search-results.js +3 -3
  127. package/dist/collection/components/rtk-chat-selector/rtk-chat-selector.css +142 -0
  128. package/dist/collection/components/rtk-chat-selector/rtk-chat-selector.js +445 -0
  129. package/dist/collection/components/rtk-chat-selector-ui/rtk-chat-selector-ui.js +1 -1
  130. package/dist/collection/components/rtk-chat-toggle/rtk-chat-toggle.js +7 -3
  131. package/dist/collection/components/rtk-clock/rtk-clock.js +4 -4
  132. package/dist/collection/components/rtk-confirmation-modal/rtk-confirmation-modal.js +3 -3
  133. package/dist/collection/components/rtk-controlbar/rtk-controlbar.js +3 -3
  134. package/dist/collection/components/rtk-counter/rtk-counter.css +0 -2
  135. package/dist/collection/components/rtk-counter/rtk-counter.js +3 -3
  136. package/dist/collection/components/rtk-debugger/rtk-debugger.js +2 -2
  137. package/dist/collection/components/rtk-debugger-audio/rtk-debugger-audio.js +2 -2
  138. package/dist/collection/components/rtk-debugger-screenshare/rtk-debugger-screenshare.js +2 -2
  139. package/dist/collection/components/rtk-debugger-system/rtk-debugger-system.js +2 -2
  140. package/dist/collection/components/rtk-debugger-toggle/rtk-debugger-toggle.js +3 -3
  141. package/dist/collection/components/rtk-debugger-video/rtk-debugger-video.js +2 -2
  142. package/dist/collection/components/rtk-dialog/rtk-dialog.css +1 -2
  143. package/dist/collection/components/rtk-dialog/rtk-dialog.js +2 -2
  144. package/dist/collection/components/rtk-dialog-manager/rtk-dialog-manager.js +2 -2
  145. package/dist/collection/components/rtk-draft-attachment-view/rtk-draft-attachment-view.js +2 -2
  146. package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.css +0 -2
  147. package/dist/collection/components/rtk-emoji-picker/rtk-emoji-picker.js +2 -2
  148. package/dist/collection/components/rtk-emoji-picker-button/rtk-emoji-picker-button.js +2 -2
  149. package/dist/collection/components/rtk-ended-screen/rtk-ended-screen.js +2 -2
  150. package/dist/collection/components/rtk-file-dropzone/rtk-file-dropzone.js +2 -2
  151. package/dist/collection/components/rtk-file-message/rtk-file-message.js +4 -4
  152. package/dist/collection/components/rtk-file-message-view/rtk-file-message-view.js +1 -1
  153. package/dist/collection/components/rtk-file-picker-button/rtk-file-picker-button.js +3 -3
  154. package/dist/collection/components/rtk-fullscreen-toggle/rtk-fullscreen-toggle.js +1 -1
  155. package/dist/collection/components/rtk-grid/rtk-grid.js +2 -2
  156. package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.css +0 -2
  157. package/dist/collection/components/rtk-grid-pagination/rtk-grid-pagination.js +2 -2
  158. package/dist/collection/components/rtk-header/rtk-header.js +3 -3
  159. package/dist/collection/components/rtk-idle-screen/rtk-idle-screen.js +3 -3
  160. package/dist/collection/components/rtk-image-message/rtk-image-message.js +6 -6
  161. package/dist/collection/components/rtk-image-message-view/rtk-image-message-view.js +4 -4
  162. package/dist/collection/components/rtk-image-viewer/rtk-image-viewer.js +3 -3
  163. package/dist/collection/components/rtk-information-tooltip/rtk-information-tooltip.js +1 -1
  164. package/dist/collection/components/rtk-join-stage/rtk-join-stage.js +2 -2
  165. package/dist/collection/components/rtk-leave-button/rtk-leave-button.js +2 -2
  166. package/dist/collection/components/rtk-leave-meeting/rtk-leave-meeting.js +4 -4
  167. package/dist/collection/components/rtk-livestream-indicator/rtk-livestream-indicator.js +2 -2
  168. package/dist/collection/components/rtk-livestream-player/rtk-livestream-player.js +2 -2
  169. package/dist/collection/components/rtk-livestream-toggle/rtk-livestream-toggle.js +2 -2
  170. package/dist/collection/components/rtk-logo/rtk-logo.js +2 -2
  171. package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.css +1 -0
  172. package/dist/collection/components/rtk-markdown-view/rtk-markdown-view.js +1 -1
  173. package/dist/collection/components/rtk-meeting/rtk-meeting.js +2 -2
  174. package/dist/collection/components/rtk-meeting-title/rtk-meeting-title.js +2 -2
  175. package/dist/collection/components/rtk-menu/rtk-menu.js +3 -3
  176. package/dist/collection/components/rtk-menu-item/rtk-menu-item.css +1 -1
  177. package/dist/collection/components/rtk-menu-item/rtk-menu-item.js +2 -2
  178. package/dist/collection/components/rtk-menu-list/rtk-menu-list.css +3 -3
  179. package/dist/collection/components/rtk-menu-list/rtk-menu-list.js +2 -2
  180. package/dist/collection/components/rtk-message-list-view/rtk-message-list-view.js +3 -3
  181. package/dist/collection/components/rtk-message-view/rtk-message-view.js +1 -1
  182. package/dist/collection/components/rtk-mic-toggle/rtk-mic-toggle.js +2 -2
  183. package/dist/collection/components/rtk-microphone-selector/rtk-microphone-selector.js +2 -2
  184. package/dist/collection/components/rtk-mixed-grid/rtk-mixed-grid.js +4 -4
  185. package/dist/collection/components/rtk-more-toggle/rtk-more-toggle.js +3 -3
  186. package/dist/collection/components/rtk-mute-all-button/rtk-mute-all-button.js +2 -2
  187. package/dist/collection/components/rtk-mute-all-confirmation/rtk-mute-all-confirmation.js +3 -3
  188. package/dist/collection/components/rtk-name-tag/rtk-name-tag.js +3 -3
  189. package/dist/collection/components/rtk-network-indicator/rtk-network-indicator.js +3 -3
  190. package/dist/collection/components/rtk-notification/rtk-notification.js +3 -3
  191. package/dist/collection/components/rtk-notifications/rtk-notifications.js +2 -2
  192. package/dist/collection/components/rtk-overlay-modal/rtk-overlay-modal.js +3 -3
  193. package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.css +96 -2
  194. package/dist/collection/components/rtk-paginated-list/rtk-paginated-list.js +72 -26
  195. package/dist/collection/components/rtk-participant/rtk-participant.js +3 -3
  196. package/dist/collection/components/rtk-participant-count/rtk-participant-count.js +2 -2
  197. package/dist/collection/components/rtk-participant-setup/rtk-participant-setup.js +4 -4
  198. package/dist/collection/components/rtk-participant-tile/rtk-participant-tile.js +4 -4
  199. package/dist/collection/components/rtk-participants/rtk-participants.js +2 -2
  200. package/dist/collection/components/rtk-participants-audio/rtk-participants-audio.js +3 -3
  201. package/dist/collection/components/rtk-participants-stage-list/rtk-participants-stage-list.js +3 -3
  202. package/dist/collection/components/rtk-participants-stage-queue/rtk-participants-stage-queue.js +2 -2
  203. package/dist/collection/components/rtk-participants-toggle/rtk-participants-toggle.js +2 -2
  204. package/dist/collection/components/rtk-participants-viewer-list/rtk-participants-viewer-list.js +2 -2
  205. package/dist/collection/components/rtk-participants-waiting-list/rtk-participants-waiting-list.js +2 -2
  206. package/dist/collection/components/rtk-permissions-message/rtk-permissions-message.js +3 -3
  207. package/dist/collection/components/rtk-pinned-message-selector/rtk-pinned-message-selector.css +112 -0
  208. package/dist/collection/components/rtk-pinned-message-selector/rtk-pinned-message-selector.js +319 -0
  209. package/dist/collection/components/rtk-pip-toggle/rtk-pip-toggle.js +2 -2
  210. package/dist/collection/components/rtk-plugin-main/rtk-plugin-main.js +4 -4
  211. package/dist/collection/components/rtk-plugins/rtk-plugins.js +3 -3
  212. package/dist/collection/components/rtk-plugins-toggle/rtk-plugins-toggle.js +2 -2
  213. package/dist/collection/components/rtk-poll/rtk-poll.js +4 -4
  214. package/dist/collection/components/rtk-poll-form/rtk-poll-form.js +3 -3
  215. package/dist/collection/components/rtk-polls/rtk-polls.js +5 -5
  216. package/dist/collection/components/rtk-polls-toggle/rtk-polls-toggle.js +2 -2
  217. package/dist/collection/components/rtk-recording-indicator/rtk-recording-indicator.js +3 -3
  218. package/dist/collection/components/rtk-recording-toggle/rtk-recording-toggle.js +2 -2
  219. package/dist/collection/components/rtk-screen-share-toggle/rtk-screen-share-toggle.js +2 -2
  220. package/dist/collection/components/rtk-screenshare-view/rtk-screenshare-view.js +8 -8
  221. package/dist/collection/components/rtk-settings/rtk-settings.js +2 -2
  222. package/dist/collection/components/rtk-settings-audio/rtk-settings-audio.js +2 -2
  223. package/dist/collection/components/rtk-settings-toggle/rtk-settings-toggle.js +2 -2
  224. package/dist/collection/components/rtk-settings-video/rtk-settings-video.js +2 -2
  225. package/dist/collection/components/rtk-setup-screen/rtk-setup-screen.css +0 -2
  226. package/dist/collection/components/rtk-setup-screen/rtk-setup-screen.js +2 -2
  227. package/dist/collection/components/rtk-sidebar/rtk-sidebar.js +2 -2
  228. package/dist/collection/components/rtk-sidebar-ui/rtk-sidebar-ui.js +1 -1
  229. package/dist/collection/components/rtk-simple-grid/rtk-simple-grid.js +2 -2
  230. package/dist/collection/components/rtk-speaker-selector/rtk-speaker-selector.js +2 -2
  231. package/dist/collection/components/rtk-spinner/rtk-spinner.js +1 -1
  232. package/dist/collection/components/rtk-spotlight-grid/rtk-spotlight-grid.js +4 -4
  233. package/dist/collection/components/rtk-spotlight-indicator/rtk-spotlight-indicator.js +2 -2
  234. package/dist/collection/components/rtk-stage/rtk-stage.js +2 -2
  235. package/dist/collection/components/rtk-stage-toggle/rtk-stage-toggle.js +2 -2
  236. package/dist/collection/components/rtk-switch/rtk-switch.js +2 -2
  237. package/dist/collection/components/rtk-tab-bar/rtk-tab-bar.js +2 -2
  238. package/dist/collection/components/rtk-text-composer-view/rtk-text-composer-view.js +2 -2
  239. package/dist/collection/components/rtk-text-message/rtk-text-message.js +4 -4
  240. package/dist/collection/components/rtk-text-message-view/rtk-text-message-view.js +1 -1
  241. package/dist/collection/components/rtk-transcript/rtk-transcript.js +2 -2
  242. package/dist/collection/components/rtk-transcripts/rtk-transcripts.js +2 -2
  243. package/dist/collection/components/rtk-ui-provider/rtk-ui-provider.js +2 -2
  244. package/dist/collection/components/rtk-viewer-count/rtk-viewer-count.js +2 -2
  245. package/dist/collection/components/rtk-virtualized-list/rtk-virtualized-participant-list.js +2 -2
  246. package/dist/collection/components/rtk-waiting-screen/rtk-waiting-screen.js +3 -3
  247. package/dist/collection/lib/lang/default-language.js +1 -1
  248. package/dist/collection/lib/overrides.js +1 -0
  249. package/dist/collection/utils/flags.js +0 -1
  250. package/dist/components/index.js +8 -8
  251. package/dist/components/{p-777aa628.js → p-06de876f.js} +7 -7
  252. package/dist/components/{p-f5a3ee43.js → p-08351fd6.js} +8 -8
  253. package/dist/components/{p-c643c410.js → p-0a36cb4b.js} +11 -11
  254. package/dist/components/{p-addb4be5.js → p-0db812c2.js} +1 -1
  255. package/dist/components/{p-1e9999d7.js → p-1099c0fe.js} +5 -5
  256. package/dist/components/{p-33db910f.js → p-128566e8.js} +43 -15
  257. package/dist/components/{p-b69a05ad.js → p-12b59b72.js} +4 -4
  258. package/dist/components/{p-63c79efa.js → p-15156a2c.js} +1 -1
  259. package/dist/components/{p-52e95364.js → p-154bed23.js} +6 -6
  260. package/dist/components/{p-caaca684.js → p-1b26fbf7.js} +3 -3
  261. package/dist/components/{p-1c678eab.js → p-2232de67.js} +2482 -1455
  262. package/dist/components/{p-c0942317.js → p-22827c53.js} +6 -6
  263. package/dist/components/{p-7a424d82.js → p-2305aa2d.js} +1 -1
  264. package/dist/components/{p-c402a1db.js → p-2690645d.js} +3 -3
  265. package/dist/components/{p-63e51be4.js → p-2976fcb0.js} +8 -8
  266. package/dist/components/{p-ac80e7fc.js → p-32a673c0.js} +82 -210
  267. package/dist/components/{p-6614c9e7.js → p-345a07e8.js} +8 -8
  268. package/dist/components/p-3a9d16e3.js +86 -0
  269. package/dist/components/{p-93db20a6.js → p-401ce922.js} +5 -5
  270. package/dist/components/{p-5791a91d.js → p-41bf1c3d.js} +5 -5
  271. package/dist/components/{p-21becaf3.js → p-45a9a385.js} +11 -11
  272. package/dist/components/{p-cd8f62c9.js → p-4942bfd2.js} +9 -9
  273. package/dist/components/{p-23d37f65.js → p-4a1144e2.js} +8 -8
  274. package/dist/components/{p-f8a13473.js → p-4a5d3b4c.js} +7 -7
  275. package/dist/components/{p-645b761e.js → p-52d9029f.js} +7 -7
  276. package/dist/components/{p-a72d3d19.js → p-583f9282.js} +1 -1
  277. package/dist/components/p-5f33c184.js +260 -0
  278. package/dist/components/{p-7f790526.js → p-6ac87493.js} +6 -6
  279. package/dist/components/{p-bbffc0e1.js → p-6e373d96.js} +4 -4
  280. package/dist/components/{p-56134994.js → p-707dced6.js} +2 -2
  281. package/dist/components/{p-b92c53c7.js → p-71fb663b.js} +4 -4
  282. package/dist/components/{p-51ef5a21.js → p-71fbfb8b.js} +7 -7
  283. package/dist/components/{p-f5101af9.js → p-7384c20c.js} +9 -9
  284. package/dist/components/{p-63e06c50.js → p-73db39b8.js} +2 -2
  285. package/dist/components/{p-6e10fc42.js → p-76c443b7.js} +3 -3
  286. package/dist/components/{p-2ec120cd.js → p-7adb3504.js} +5 -5
  287. package/dist/components/{p-410cef02.js → p-7f3bfc54.js} +6 -6
  288. package/dist/components/{p-d3414935.js → p-862ec1f9.js} +9 -9
  289. package/dist/components/{p-541e6de7.js → p-8861d5a3.js} +4 -4
  290. package/dist/components/{p-e583a838.js → p-88aded7d.js} +11 -11
  291. package/dist/components/{p-fe648db5.js → p-8a66a347.js} +5 -5
  292. package/dist/components/{p-1c5cc842.js → p-8cea6257.js} +1 -1
  293. package/dist/components/{p-aeba1c02.js → p-95a1fa70.js} +5 -5
  294. package/dist/components/{p-770c0fd7.js → p-9bcd6297.js} +80 -35
  295. package/dist/components/{p-24481cb4.js → p-9e1478a0.js} +7 -7
  296. package/dist/components/{p-91bc86f4.js → p-9f481b70.js} +5 -5
  297. package/dist/components/{p-73baf5ba.js → p-a3cc7425.js} +1 -1
  298. package/dist/components/{p-e09955f3.js → p-a4d13056.js} +10 -10
  299. package/dist/components/{p-e60aa036.js → p-a6c93f34.js} +5 -5
  300. package/dist/components/{p-c66a52b7.js → p-a74caccd.js} +4 -4
  301. package/dist/components/{p-a89ee2d2.js → p-a8d77615.js} +16 -16
  302. package/dist/components/{p-f247cacc.js → p-abf952f5.js} +5 -5
  303. package/dist/components/{p-b2904963.js → p-ac6a5fc5.js} +7 -7
  304. package/dist/components/{p-7c84212d.js → p-af2b1476.js} +8 -8
  305. package/dist/components/{p-565c8389.js → p-b226a124.js} +5 -5
  306. package/dist/components/{p-0899c09f.js → p-b2d5329f.js} +5 -5
  307. package/dist/components/{p-f7a8a2d8.js → p-b3240843.js} +5 -5
  308. package/dist/components/{p-4c82be72.js → p-bfc86230.js} +3 -3
  309. package/dist/components/{p-a54b82e9.js → p-c0790538.js} +1 -1
  310. package/dist/components/{p-b37f2227.js → p-c0ad28ff.js} +9 -9
  311. package/dist/components/{p-901c2375.js → p-c6c4c24e.js} +4 -4
  312. package/dist/components/{p-cec4d080.js → p-c9db1b82.js} +5 -5
  313. package/dist/components/{p-66d10db2.js → p-cd6656bf.js} +8 -8
  314. package/dist/components/{p-7e6ca4af.js → p-cd6f04ae.js} +5 -5
  315. package/dist/components/{p-3245ace2.js → p-d029dd2f.js} +8 -8
  316. package/dist/components/{p-8e285a44.js → p-d0f54eea.js} +3 -3
  317. package/dist/components/{p-a99b0889.js → p-d22fc130.js} +7 -7
  318. package/dist/components/{p-34654ffc.js → p-d2cbc2d1.js} +11 -11
  319. package/dist/components/{p-f95c314b.js → p-d6024528.js} +4 -4
  320. package/dist/components/{p-5194f4d6.js → p-d9626191.js} +6 -6
  321. package/dist/components/{p-66ba4031.js → p-dacaa250.js} +3 -3
  322. package/dist/components/{p-8222af8c.js → p-dd7832d2.js} +4 -4
  323. package/dist/components/{p-206acdcd.js → p-dd8a892e.js} +5 -5
  324. package/dist/components/{p-19d83dd6.js → p-dfdbb665.js} +5 -5
  325. package/dist/components/{p-1ea0d406.js → p-e0ef3893.js} +7 -7
  326. package/dist/components/{p-1391bef0.js → p-e229128b.js} +1 -1
  327. package/dist/components/{p-9c3c75a9.js → p-e334e15c.js} +2 -2
  328. package/dist/components/p-e39ec88e.js +218 -0
  329. package/dist/components/{p-71f12515.js → p-e544a590.js} +6 -6
  330. package/dist/components/{p-a6aea524.js → p-e73faa5e.js} +3 -3
  331. package/dist/components/{p-951a67af.js → p-e7b7abfe.js} +5 -5
  332. package/dist/components/{p-97d1dcb7.js → p-eb2c2c21.js} +15 -15
  333. package/dist/components/{p-efbfe5a0.js → p-ecbb4e46.js} +6 -6
  334. package/dist/components/{p-b4a37662.js → p-eff3c856.js} +6 -6
  335. package/dist/components/{p-dc9dde66.js → p-f19b4abc.js} +113 -28
  336. package/dist/components/{p-60fdbd75.js → p-f3c261ec.js} +1 -1
  337. package/dist/components/{p-b65d1760.js → p-fa8cf270.js} +3 -3
  338. package/dist/components/p-fdad14c9.js +4028 -0
  339. package/dist/components/{p-93947678.js → p-fe0d125b.js} +4 -4
  340. package/dist/components/rtk-ai-toggle.js +6 -6
  341. package/dist/components/rtk-ai-transcriptions.js +1 -1
  342. package/dist/components/rtk-ai.js +6 -6
  343. package/dist/components/rtk-audio-grid.js +4 -4
  344. package/dist/components/rtk-audio-tile.js +7 -7
  345. package/dist/components/rtk-audio-visualizer.js +1 -1
  346. package/dist/components/rtk-avatar.js +1 -1
  347. package/dist/components/rtk-breakout-room-manager.js +1 -1
  348. package/dist/components/rtk-breakout-room-participants.js +1 -1
  349. package/dist/components/rtk-breakout-rooms-manager.js +1 -1
  350. package/dist/components/rtk-breakout-rooms-toggle.js +6 -6
  351. package/dist/components/rtk-broadcast-message-modal.js +1 -1
  352. package/dist/components/rtk-button.js +1 -1
  353. package/dist/components/rtk-camera-selector.js +1 -1
  354. package/dist/components/rtk-camera-toggle.js +7 -7
  355. package/dist/components/rtk-caption-toggle.js +6 -6
  356. package/dist/components/rtk-chat-composer-ui.js +17 -17
  357. package/dist/components/rtk-chat-composer-view.js +1 -1
  358. package/dist/components/rtk-chat-header.d.ts +11 -0
  359. package/dist/components/rtk-chat-header.js +6 -0
  360. package/dist/components/rtk-chat-message.js +1 -1
  361. package/dist/components/rtk-chat-messages-ui-paginated.js +1 -1
  362. package/dist/components/rtk-chat-messages-ui.js +26 -20
  363. package/dist/components/rtk-chat-search-results.js +16 -16
  364. package/dist/components/rtk-chat-selector-ui.js +5 -5
  365. package/dist/components/rtk-chat-selector.d.ts +11 -0
  366. package/dist/components/rtk-chat-selector.js +6 -0
  367. package/dist/components/rtk-chat-toggle.js +12 -8
  368. package/dist/components/rtk-chat.js +1 -1
  369. package/dist/components/rtk-clock.js +7 -7
  370. package/dist/components/rtk-confirmation-modal.js +1 -1
  371. package/dist/components/rtk-controlbar-button.js +1 -1
  372. package/dist/components/rtk-controlbar.js +5 -5
  373. package/dist/components/rtk-counter.js +1 -1
  374. package/dist/components/rtk-debugger-audio.js +1 -1
  375. package/dist/components/rtk-debugger-screenshare.js +1 -1
  376. package/dist/components/rtk-debugger-system.js +1 -1
  377. package/dist/components/rtk-debugger-toggle.js +7 -7
  378. package/dist/components/rtk-debugger-video.js +1 -1
  379. package/dist/components/rtk-debugger.js +1 -1
  380. package/dist/components/rtk-dialog-manager.js +26 -26
  381. package/dist/components/rtk-dialog.js +1 -1
  382. package/dist/components/rtk-draft-attachment-view.js +1 -1
  383. package/dist/components/rtk-emoji-picker-button.js +1 -1
  384. package/dist/components/rtk-emoji-picker.js +1 -1
  385. package/dist/components/rtk-ended-screen.js +5 -5
  386. package/dist/components/rtk-file-dropzone.js +5 -5
  387. package/dist/components/rtk-file-message-view.js +1 -1
  388. package/dist/components/rtk-file-message.js +1 -1
  389. package/dist/components/rtk-file-picker-button.js +1 -1
  390. package/dist/components/rtk-fullscreen-toggle.js +1 -1
  391. package/dist/components/rtk-grid-pagination.js +7 -7
  392. package/dist/components/rtk-grid.js +12 -12
  393. package/dist/components/rtk-header.js +5 -5
  394. package/dist/components/rtk-icon.js +1 -1
  395. package/dist/components/rtk-idle-screen.js +7 -7
  396. package/dist/components/rtk-image-message-view.js +1 -1
  397. package/dist/components/rtk-image-message.js +1 -1
  398. package/dist/components/rtk-image-viewer.js +6 -6
  399. package/dist/components/rtk-information-tooltip.js +5 -5
  400. package/dist/components/rtk-join-stage.js +1 -1
  401. package/dist/components/rtk-leave-button.js +7 -7
  402. package/dist/components/rtk-leave-meeting.js +1 -1
  403. package/dist/components/rtk-livestream-indicator.js +1 -1
  404. package/dist/components/rtk-livestream-player.js +1 -1
  405. package/dist/components/rtk-livestream-toggle.js +6 -6
  406. package/dist/components/rtk-logo.js +1 -1
  407. package/dist/components/rtk-markdown-view.js +1 -1
  408. package/dist/components/rtk-meeting-title.js +4 -4
  409. package/dist/components/rtk-meeting.js +63 -45
  410. package/dist/components/rtk-menu-item.js +1 -1
  411. package/dist/components/rtk-menu-list.js +1 -1
  412. package/dist/components/rtk-menu.js +1 -1
  413. package/dist/components/rtk-message-list-view.js +8 -8
  414. package/dist/components/rtk-message-view.js +1 -1
  415. package/dist/components/rtk-mic-toggle.js +7 -7
  416. package/dist/components/rtk-microphone-selector.js +1 -1
  417. package/dist/components/rtk-mixed-grid.js +10 -10
  418. package/dist/components/rtk-more-toggle.js +8 -8
  419. package/dist/components/rtk-mute-all-button.js +7 -7
  420. package/dist/components/rtk-mute-all-confirmation.js +1 -1
  421. package/dist/components/rtk-name-tag.js +1 -1
  422. package/dist/components/rtk-network-indicator.js +4 -4
  423. package/dist/components/rtk-notification.js +1 -1
  424. package/dist/components/rtk-notifications.js +8 -8
  425. package/dist/components/rtk-overlay-modal.js +1 -1
  426. package/dist/components/rtk-paginated-list.js +1 -1
  427. package/dist/components/rtk-participant-count.js +4 -4
  428. package/dist/components/rtk-participant-setup.js +5 -5
  429. package/dist/components/rtk-participant-tile.js +1 -1
  430. package/dist/components/rtk-participant.js +1 -1
  431. package/dist/components/rtk-participants-audio.js +7 -7
  432. package/dist/components/rtk-participants-stage-list.js +1 -1
  433. package/dist/components/rtk-participants-stage-queue.js +1 -1
  434. package/dist/components/rtk-participants-toggle.js +7 -7
  435. package/dist/components/rtk-participants-viewer-list.js +1 -1
  436. package/dist/components/rtk-participants-waiting-list.js +1 -1
  437. package/dist/components/rtk-participants.js +17 -17
  438. package/dist/components/rtk-permissions-message.js +1 -1
  439. package/dist/components/rtk-pinned-message-selector.d.ts +11 -0
  440. package/dist/components/rtk-pinned-message-selector.js +6 -0
  441. package/dist/components/rtk-pip-toggle.js +6 -6
  442. package/dist/components/rtk-plugin-main.js +1 -1
  443. package/dist/components/rtk-plugins-toggle.js +7 -7
  444. package/dist/components/rtk-plugins.js +1 -1
  445. package/dist/components/rtk-poll-form.js +1 -1
  446. package/dist/components/rtk-poll.js +1 -1
  447. package/dist/components/rtk-polls-toggle.js +7 -7
  448. package/dist/components/rtk-polls.js +1 -1
  449. package/dist/components/rtk-recording-indicator.js +5 -5
  450. package/dist/components/rtk-recording-toggle.js +6 -6
  451. package/dist/components/rtk-screen-share-toggle.js +7 -7
  452. package/dist/components/rtk-screenshare-view.js +11 -11
  453. package/dist/components/rtk-settings-audio.js +1 -1
  454. package/dist/components/rtk-settings-toggle.js +7 -7
  455. package/dist/components/rtk-settings-video.js +1 -1
  456. package/dist/components/rtk-settings.js +13 -13
  457. package/dist/components/rtk-setup-screen.js +11 -11
  458. package/dist/components/rtk-sidebar-ui.js +1 -1
  459. package/dist/components/rtk-sidebar.js +13 -13
  460. package/dist/components/rtk-simple-grid.js +4 -4
  461. package/dist/components/rtk-speaker-selector.js +1 -1
  462. package/dist/components/rtk-spinner.js +1 -1
  463. package/dist/components/rtk-spotlight-grid.js +6 -6
  464. package/dist/components/rtk-spotlight-indicator.js +1 -1
  465. package/dist/components/rtk-stage-toggle.js +7 -7
  466. package/dist/components/rtk-stage.js +4 -4
  467. package/dist/components/rtk-switch.js +1 -1
  468. package/dist/components/rtk-tab-bar.js +1 -1
  469. package/dist/components/rtk-text-composer-view.js +1 -1
  470. package/dist/components/rtk-text-message-view.js +1 -1
  471. package/dist/components/rtk-text-message.js +1 -1
  472. package/dist/components/rtk-tooltip.js +1 -1
  473. package/dist/components/rtk-transcript.js +1 -1
  474. package/dist/components/rtk-transcripts.js +4 -4
  475. package/dist/components/rtk-ui-provider.js +3 -3
  476. package/dist/components/rtk-viewer-count.js +1 -1
  477. package/dist/components/rtk-virtualized-participant-list.js +1 -1
  478. package/dist/components/rtk-waiting-screen.js +5 -5
  479. package/dist/docs/docs-components.json +12543 -8721
  480. package/dist/docs/docs-vscode.json +46 -15
  481. package/dist/esm/{ChatHead-15c2f8d4.js → ChatHead-148558a8.js} +1 -1
  482. package/dist/esm/{TextMessage-0aed30b2.js → TextMessage-cdf76ced.js} +2 -2
  483. package/dist/esm/{chat-a170fc58.js → chat-12f27725.js} +2 -2
  484. package/dist/esm/{config-cea9cd37.js → config-74c02ff0.js} +2 -2
  485. package/dist/esm/{debounce-b7ba967e.js → debounce-0c6e63e9.js} +1 -1
  486. package/dist/esm/{index-d31a2e33.js → index-3f51790f.js} +1 -1
  487. package/dist/esm/index-55463a54.js +4365 -0
  488. package/dist/esm/{index-d08145ca.js → index-e677f28b.js} +2 -2
  489. package/dist/esm/index.js +8 -8
  490. package/dist/esm/loader.js +5582 -1981
  491. package/dist/esm/{merge-88832ad1.js → merge-df16b7d2.js} +1 -1
  492. package/dist/esm/{notification-6fa40b68.js → notification-dd8b1d52.js} +1 -1
  493. package/dist/esm/realtimekit-ui.js +31 -4
  494. package/dist/esm/rtk-ai-toggle.entry.js +3 -3
  495. package/dist/esm/rtk-ai-transcriptions.entry.js +4 -4
  496. package/dist/esm/rtk-ai.entry.js +3 -3
  497. package/dist/esm/rtk-audio-grid.entry.js +4 -4
  498. package/dist/esm/rtk-audio-tile.entry.js +3 -3
  499. package/dist/esm/rtk-audio-visualizer_4.entry.js +4 -4
  500. package/dist/esm/{rtk-avatar_23.entry.js → rtk-avatar_26.entry.js} +561 -256
  501. package/dist/esm/rtk-breakout-room-manager_3.entry.js +6 -6
  502. package/dist/esm/rtk-breakout-rooms-manager_9.entry.js +10 -10
  503. package/dist/esm/rtk-breakout-rooms-toggle.entry.js +3 -3
  504. package/dist/esm/rtk-camera-selector_2.entry.js +4 -4
  505. package/dist/esm/rtk-camera-toggle.entry.js +3 -3
  506. package/dist/esm/rtk-caption-toggle.entry.js +3 -3
  507. package/dist/esm/rtk-chat-composer-ui.entry.js +11 -11
  508. package/dist/esm/rtk-chat-message.entry.js +6 -6
  509. package/dist/esm/rtk-chat-messages-ui.entry.js +13 -7
  510. package/dist/esm/rtk-chat-search-results.entry.js +4 -4
  511. package/dist/esm/rtk-chat-selector-ui.entry.js +4 -4
  512. package/dist/esm/rtk-chat-toggle.entry.js +9 -5
  513. package/dist/esm/rtk-clock.entry.js +6 -6
  514. package/dist/esm/rtk-controlbar-button.entry.js +3 -3
  515. package/dist/esm/rtk-controlbar.entry.js +5 -5
  516. package/dist/esm/rtk-debugger-audio_4.entry.js +3 -3
  517. package/dist/esm/rtk-debugger-toggle.entry.js +4 -4
  518. package/dist/esm/rtk-dialog-manager.entry.js +4 -4
  519. package/dist/esm/rtk-dialog.entry.js +4 -4
  520. package/dist/esm/rtk-ended-screen.entry.js +3 -3
  521. package/dist/esm/rtk-file-dropzone.entry.js +4 -4
  522. package/dist/esm/rtk-file-message_3.entry.js +14 -14
  523. package/dist/esm/rtk-fullscreen-toggle.entry.js +3 -3
  524. package/dist/esm/rtk-grid-pagination.entry.js +4 -4
  525. package/dist/esm/rtk-grid.entry.js +4 -4
  526. package/dist/esm/rtk-header.entry.js +5 -5
  527. package/dist/esm/rtk-idle-screen.entry.js +4 -4
  528. package/dist/esm/rtk-image-viewer.entry.js +4 -4
  529. package/dist/esm/rtk-information-tooltip.entry.js +4 -4
  530. package/dist/esm/rtk-leave-button.entry.js +4 -4
  531. package/dist/esm/rtk-livestream-indicator_3.entry.js +2477 -1450
  532. package/dist/esm/rtk-livestream-toggle.entry.js +3 -3
  533. package/dist/esm/rtk-logo.entry.js +3 -3
  534. package/dist/esm/rtk-meeting-title.entry.js +3 -3
  535. package/dist/esm/rtk-message-list-view.entry.js +7 -7
  536. package/dist/esm/rtk-mic-toggle.entry.js +3 -3
  537. package/dist/esm/rtk-mixed-grid.entry.js +4 -4
  538. package/dist/esm/rtk-more-toggle.entry.js +5 -5
  539. package/dist/esm/rtk-mute-all-button.entry.js +3 -3
  540. package/dist/esm/rtk-name-tag.entry.js +3 -3
  541. package/dist/esm/rtk-network-indicator.entry.js +3 -3
  542. package/dist/esm/rtk-notification.entry.js +7 -7
  543. package/dist/esm/rtk-notifications.entry.js +5 -5
  544. package/dist/esm/rtk-participant-count.entry.js +3 -3
  545. package/dist/esm/rtk-participant-setup.entry.js +5 -5
  546. package/dist/esm/rtk-participant_2.entry.js +7 -7
  547. package/dist/esm/rtk-participants-audio.entry.js +4 -4
  548. package/dist/esm/rtk-participants-stage-list_4.entry.js +5 -5
  549. package/dist/esm/rtk-participants-toggle.entry.js +4 -4
  550. package/dist/esm/rtk-participants.entry.js +4 -4
  551. package/dist/esm/rtk-pip-toggle.entry.js +3 -3
  552. package/dist/esm/rtk-plugin-main_2.entry.js +3 -3
  553. package/dist/esm/rtk-plugins-toggle.entry.js +4 -4
  554. package/dist/esm/rtk-plugins_2.entry.js +7 -7
  555. package/dist/esm/rtk-poll_2.entry.js +6 -6
  556. package/dist/esm/rtk-polls-toggle.entry.js +4 -4
  557. package/dist/esm/rtk-recording-indicator.entry.js +4 -4
  558. package/dist/esm/rtk-recording-toggle.entry.js +3 -3
  559. package/dist/esm/rtk-screen-share-toggle.entry.js +3 -3
  560. package/dist/esm/rtk-screenshare-view.entry.js +8 -8
  561. package/dist/esm/rtk-settings-audio_2.entry.js +3 -3
  562. package/dist/esm/rtk-settings-toggle.entry.js +4 -4
  563. package/dist/esm/rtk-settings.entry.js +3 -3
  564. package/dist/esm/rtk-setup-screen.entry.js +5 -5
  565. package/dist/esm/rtk-sidebar-ui.entry.js +3 -3
  566. package/dist/esm/rtk-sidebar.entry.js +5 -5
  567. package/dist/esm/rtk-simple-grid.entry.js +4 -4
  568. package/dist/esm/rtk-spotlight-grid.entry.js +6 -6
  569. package/dist/esm/rtk-spotlight-indicator.entry.js +3 -3
  570. package/dist/esm/rtk-stage-toggle.entry.js +3 -3
  571. package/dist/esm/rtk-stage.entry.js +4 -4
  572. package/dist/esm/rtk-transcript.entry.js +4 -4
  573. package/dist/esm/rtk-transcripts.entry.js +3 -3
  574. package/dist/esm/rtk-ui-provider.entry.js +3 -3
  575. package/dist/esm/rtk-waiting-screen.entry.js +4 -4
  576. package/dist/esm/{sidebar-dd9a38aa.js → sidebar-293fd302.js} +1 -1
  577. package/dist/esm/{ui-store-5a66fa71.js → ui-store-644e4cb0.js} +113 -28
  578. package/dist/realtimekit-ui/index.esm.js +1 -1
  579. package/dist/realtimekit-ui/p-01ef7b4d.entry.js +1 -0
  580. package/dist/realtimekit-ui/p-06dcd55e.entry.js +1 -0
  581. package/dist/realtimekit-ui/p-0c3f571f.entry.js +1 -0
  582. package/dist/realtimekit-ui/{p-2be75f31.entry.js → p-0cfee5d3.entry.js} +1 -1
  583. package/dist/realtimekit-ui/p-10d4354c.entry.js +1 -0
  584. package/dist/realtimekit-ui/p-14dc10b8.entry.js +1 -0
  585. package/dist/realtimekit-ui/p-1517b428.entry.js +1 -0
  586. package/dist/realtimekit-ui/{p-d9117aa2.entry.js → p-15297e89.entry.js} +1 -1
  587. package/dist/realtimekit-ui/p-1e16ecb3.entry.js +1 -0
  588. package/dist/realtimekit-ui/{p-c77d9110.entry.js → p-1feec027.entry.js} +1 -1
  589. package/dist/realtimekit-ui/{p-fa39a651.entry.js → p-2251059d.entry.js} +1 -1
  590. package/dist/realtimekit-ui/p-25f3e66a.entry.js +1 -0
  591. package/dist/realtimekit-ui/{p-7c9ac5df.entry.js → p-26b4e422.entry.js} +1 -1
  592. package/dist/realtimekit-ui/p-29549a05.entry.js +1 -0
  593. package/dist/realtimekit-ui/{p-ab5b09f9.entry.js → p-29d3f735.entry.js} +1 -1
  594. package/dist/realtimekit-ui/{p-d543f03a.entry.js → p-2b47921e.entry.js} +1 -1
  595. package/dist/realtimekit-ui/p-2f93d90b.entry.js +1 -0
  596. package/dist/realtimekit-ui/{p-3a14da51.js → p-2ff77d78.js} +1 -1
  597. package/dist/realtimekit-ui/p-309b8a96.entry.js +1 -0
  598. package/dist/realtimekit-ui/{p-d679ea25.entry.js → p-30a3007c.entry.js} +1 -1
  599. package/dist/realtimekit-ui/{p-1ff96b0f.js → p-315cd380.js} +1 -1
  600. package/dist/realtimekit-ui/{p-9b5c6928.entry.js → p-36f7accb.entry.js} +1 -1
  601. package/dist/realtimekit-ui/{p-136d3fe2.entry.js → p-3ec85ff3.entry.js} +1 -1
  602. package/dist/realtimekit-ui/{p-0d6b6c0d.entry.js → p-40ab8b0f.entry.js} +1 -1
  603. package/dist/realtimekit-ui/{p-aef75bbb.entry.js → p-43fa4d95.entry.js} +1 -1
  604. package/dist/realtimekit-ui/{p-3229431b.entry.js → p-4814e742.entry.js} +1 -1
  605. package/dist/realtimekit-ui/{p-75087c10.entry.js → p-4a5e203d.entry.js} +1 -1
  606. package/dist/realtimekit-ui/{p-731bcf94.entry.js → p-4e604bf1.entry.js} +1 -1
  607. package/dist/realtimekit-ui/p-4ec77793.js +1 -0
  608. package/dist/realtimekit-ui/{p-186d21ad.entry.js → p-50aaac81.entry.js} +1 -1
  609. package/dist/realtimekit-ui/{p-2e996dd5.entry.js → p-5a425dac.entry.js} +1 -1
  610. package/dist/realtimekit-ui/{p-904119a0.entry.js → p-5ef7cf76.entry.js} +1 -1
  611. package/dist/realtimekit-ui/p-60b3fbb2.entry.js +1 -0
  612. package/dist/realtimekit-ui/{p-6acda400.entry.js → p-6573487e.entry.js} +1 -1
  613. package/dist/realtimekit-ui/p-67c674d4.entry.js +1 -0
  614. package/dist/realtimekit-ui/p-6acdcb4f.entry.js +1 -0
  615. package/dist/realtimekit-ui/{p-5cd2b5e0.entry.js → p-6c2ef845.entry.js} +1 -1
  616. package/dist/realtimekit-ui/{p-6407dc7e.entry.js → p-6f913b9b.entry.js} +1 -1
  617. package/dist/realtimekit-ui/p-71393f37.entry.js +1 -0
  618. package/dist/realtimekit-ui/{p-d7b92a52.js → p-77e5605f.js} +1 -1
  619. package/dist/realtimekit-ui/{p-b89736c6.entry.js → p-8329d4ae.entry.js} +1 -1
  620. package/dist/realtimekit-ui/{p-38fb340d.entry.js → p-84476389.entry.js} +1 -1
  621. package/dist/realtimekit-ui/{p-1dbbb8cb.entry.js → p-879459bb.entry.js} +1 -1
  622. package/dist/realtimekit-ui/{p-f19fe2c3.entry.js → p-8e867ba8.entry.js} +1 -1
  623. package/dist/realtimekit-ui/p-8fb52437.entry.js +1 -0
  624. package/dist/realtimekit-ui/p-8fc79c56.js +1 -0
  625. package/dist/realtimekit-ui/p-9599b2e4.entry.js +1 -0
  626. package/dist/realtimekit-ui/{p-f0054be9.entry.js → p-975cbc2e.entry.js} +1 -1
  627. package/dist/realtimekit-ui/p-9ff0dfdb.entry.js +1 -0
  628. package/dist/realtimekit-ui/{p-9b206390.entry.js → p-a43a7ffb.entry.js} +1 -1
  629. package/dist/realtimekit-ui/p-a599f720.js +2 -0
  630. package/dist/realtimekit-ui/{p-8bd79e77.entry.js → p-abbee273.entry.js} +1 -1
  631. package/dist/realtimekit-ui/p-ad11a64a.entry.js +1 -0
  632. package/dist/realtimekit-ui/p-aee32120.entry.js +1 -0
  633. package/dist/realtimekit-ui/{p-574fa8db.entry.js → p-b0eaeddc.entry.js} +1 -1
  634. package/dist/realtimekit-ui/{p-f89bb70f.js → p-b5e5e206.js} +1 -1
  635. package/dist/realtimekit-ui/p-bb907330.entry.js +1 -0
  636. package/dist/realtimekit-ui/{p-f6cd4525.entry.js → p-bbaf3e7d.entry.js} +1 -1
  637. package/dist/realtimekit-ui/p-be0cae77.entry.js +1 -0
  638. package/dist/realtimekit-ui/{p-91d15089.js → p-be0d2b90.js} +1 -1
  639. package/dist/realtimekit-ui/{p-c09f774c.entry.js → p-bea3ee08.entry.js} +1 -1
  640. package/dist/realtimekit-ui/{p-194ca93a.entry.js → p-c0e5ddd4.entry.js} +1 -1
  641. package/dist/realtimekit-ui/{p-9b35d38b.entry.js → p-c794adf9.entry.js} +1 -1
  642. package/dist/realtimekit-ui/p-c7ddf9a9.entry.js +1 -0
  643. package/dist/realtimekit-ui/{p-91efc377.entry.js → p-c8239122.entry.js} +1 -1
  644. package/dist/realtimekit-ui/p-c8f0b23e.entry.js +1 -0
  645. package/dist/realtimekit-ui/{p-dfd41e7d.entry.js → p-cbbb09a2.entry.js} +1 -1
  646. package/dist/realtimekit-ui/p-cbfe61b9.entry.js +1 -0
  647. package/dist/realtimekit-ui/p-cc71c33f.entry.js +1 -0
  648. package/dist/realtimekit-ui/{p-7aa48099.entry.js → p-cd086077.entry.js} +1 -1
  649. package/dist/realtimekit-ui/{p-3a309e80.entry.js → p-cedff249.entry.js} +1 -1
  650. package/dist/realtimekit-ui/p-d107248e.entry.js +1 -0
  651. package/dist/realtimekit-ui/{p-3c003b71.entry.js → p-d10fe6c7.entry.js} +1 -1
  652. package/dist/realtimekit-ui/p-d1256212.entry.js +1 -0
  653. package/dist/realtimekit-ui/p-d24dd330.entry.js +1 -0
  654. package/dist/realtimekit-ui/{p-d6071b1d.entry.js → p-d3d4e6de.entry.js} +1 -1
  655. package/dist/realtimekit-ui/p-d432c842.entry.js +1 -0
  656. package/dist/realtimekit-ui/p-d6126ff7.js +1 -0
  657. package/dist/realtimekit-ui/p-d8e64814.entry.js +1 -0
  658. package/dist/realtimekit-ui/{p-79731cb6.js → p-ddcb6b8b.js} +1 -1
  659. package/dist/realtimekit-ui/{p-a417984b.entry.js → p-de253745.entry.js} +1 -1
  660. package/dist/realtimekit-ui/{p-605e418e.entry.js → p-de2fd3a4.entry.js} +1 -1
  661. package/dist/realtimekit-ui/{p-a71320ec.entry.js → p-e6fc5935.entry.js} +1 -1
  662. package/dist/realtimekit-ui/{p-c8eaa707.js → p-eccb6d78.js} +1 -1
  663. package/dist/realtimekit-ui/p-f1c4d507.entry.js +1 -0
  664. package/dist/realtimekit-ui/{p-6560e903.entry.js → p-f42001bb.entry.js} +1 -1
  665. package/dist/realtimekit-ui/{p-a6bccc60.entry.js → p-f423e125.entry.js} +1 -1
  666. package/dist/realtimekit-ui/{p-bf87c56f.entry.js → p-f46787e0.entry.js} +1 -1
  667. package/dist/realtimekit-ui/p-f4e8a0b3.entry.js +1 -0
  668. package/dist/realtimekit-ui/{p-0e513482.js → p-f6fdb3c3.js} +1 -1
  669. package/dist/realtimekit-ui/p-f8089097.entry.js +1 -0
  670. package/dist/realtimekit-ui/p-fc0eb2e6.entry.js +1 -0
  671. package/dist/realtimekit-ui/p-ff86148c.entry.js +1 -0
  672. package/dist/realtimekit-ui/{p-1b6b75a7.entry.js → p-ffac36ba.entry.js} +1 -1
  673. package/dist/realtimekit-ui/realtimekit-ui.esm.js +1 -1
  674. package/dist/types/components/rtk-chat/rtk-chat.d.ts +5 -30
  675. package/dist/types/components/rtk-chat-composer-ui/rtk-chat-composer-ui.d.ts +1 -0
  676. package/dist/types/components/rtk-chat-header/rtk-chat-header.d.ts +7 -0
  677. package/dist/types/components/rtk-chat-messages-ui-paginated/rtk-chat-messages-ui-paginated.d.ts +5 -4
  678. package/dist/types/components/rtk-chat-selector/rtk-chat-selector.d.ts +54 -0
  679. package/dist/types/components/rtk-paginated-list/rtk-paginated-list.d.ts +8 -2
  680. package/dist/types/components/rtk-pinned-message-selector/rtk-pinned-message-selector.d.ts +40 -0
  681. package/dist/types/components.d.ts +190 -44
  682. package/dist/types/lib/overrides.d.ts +5 -0
  683. package/dist/types/utils/flags.d.ts +0 -1
  684. package/package.json +1 -1
  685. package/dist/cjs/index-05554ce6.js +0 -2235
  686. package/dist/components/p-c3592601.js +0 -1641
  687. package/dist/esm/index-c1fb98bb.js +0 -2202
  688. package/dist/realtimekit-ui/p-00fbc77d.entry.js +0 -1
  689. package/dist/realtimekit-ui/p-085b70ca.entry.js +0 -1
  690. package/dist/realtimekit-ui/p-0a6840aa.entry.js +0 -1
  691. package/dist/realtimekit-ui/p-0a9761b4.entry.js +0 -1
  692. package/dist/realtimekit-ui/p-0d173282.entry.js +0 -1
  693. package/dist/realtimekit-ui/p-0ee570cd.js +0 -2
  694. package/dist/realtimekit-ui/p-1d9ba38f.entry.js +0 -1
  695. package/dist/realtimekit-ui/p-1e8a9290.entry.js +0 -1
  696. package/dist/realtimekit-ui/p-245c5d74.entry.js +0 -1
  697. package/dist/realtimekit-ui/p-25a5687a.entry.js +0 -1
  698. package/dist/realtimekit-ui/p-29c66766.entry.js +0 -1
  699. package/dist/realtimekit-ui/p-2afa0984.entry.js +0 -1
  700. package/dist/realtimekit-ui/p-328d53bd.js +0 -1
  701. package/dist/realtimekit-ui/p-334f3f6d.entry.js +0 -1
  702. package/dist/realtimekit-ui/p-3cc15c7a.entry.js +0 -1
  703. package/dist/realtimekit-ui/p-3eb5a72d.entry.js +0 -1
  704. package/dist/realtimekit-ui/p-423ff132.entry.js +0 -1
  705. package/dist/realtimekit-ui/p-55074d37.entry.js +0 -1
  706. package/dist/realtimekit-ui/p-59ac307d.entry.js +0 -1
  707. package/dist/realtimekit-ui/p-5b2d97fc.js +0 -1
  708. package/dist/realtimekit-ui/p-63c32e2d.entry.js +0 -1
  709. package/dist/realtimekit-ui/p-6f8f175b.entry.js +0 -1
  710. package/dist/realtimekit-ui/p-740444e7.entry.js +0 -1
  711. package/dist/realtimekit-ui/p-8000d8de.entry.js +0 -1
  712. package/dist/realtimekit-ui/p-81beeff4.entry.js +0 -1
  713. package/dist/realtimekit-ui/p-872a05b0.entry.js +0 -1
  714. package/dist/realtimekit-ui/p-9c7449a0.entry.js +0 -1
  715. package/dist/realtimekit-ui/p-a37a936c.entry.js +0 -1
  716. package/dist/realtimekit-ui/p-ae9de69a.js +0 -1
  717. package/dist/realtimekit-ui/p-c0b75ca2.entry.js +0 -1
  718. package/dist/realtimekit-ui/p-c33b0b90.entry.js +0 -1
  719. package/dist/realtimekit-ui/p-c4fada74.entry.js +0 -1
  720. package/dist/realtimekit-ui/p-cb72ae59.entry.js +0 -1
  721. package/dist/realtimekit-ui/p-d644eed7.entry.js +0 -1
  722. package/dist/realtimekit-ui/p-d7c040f0.entry.js +0 -1
  723. package/dist/realtimekit-ui/p-e16f5890.entry.js +0 -1
  724. package/dist/realtimekit-ui/p-e1f2d163.entry.js +0 -1
  725. package/dist/realtimekit-ui/p-e829a20f.entry.js +0 -1
  726. package/dist/realtimekit-ui/p-f39b89a3.entry.js +0 -1
  727. package/dist/realtimekit-ui/p-f4025c97.entry.js +0 -1
@@ -0,0 +1,4403 @@
1
+ 'use strict';
2
+
3
+ function _interopNamespace(e) {
4
+ if (e && e.__esModule) return e;
5
+ var n = Object.create(null);
6
+ if (e) {
7
+ Object.keys(e).forEach(function (k) {
8
+ if (k !== 'default') {
9
+ var d = Object.getOwnPropertyDescriptor(e, k);
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: function () {
13
+ return e[k];
14
+ }
15
+ });
16
+ }
17
+ });
18
+ }
19
+ n['default'] = e;
20
+ return Object.freeze(n);
21
+ }
22
+
23
+ const NAMESPACE = 'realtimekit-ui';
24
+ const BUILD = /* realtimekit-ui */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
25
+ const Env = /* realtimekit-ui */ {};
26
+
27
+ /*
28
+ Stencil Client Platform v4.27.2 | MIT Licensed | https://stenciljs.com
29
+ */
30
+ var __defProp = Object.defineProperty;
31
+ var __export = (target, all) => {
32
+ for (var name in all)
33
+ __defProp(target, name, { get: all[name], enumerable: true });
34
+ };
35
+ var Build = {
36
+ isDev: BUILD.isDev ? true : false,
37
+ isBrowser: true,
38
+ isServer: false,
39
+ isTesting: BUILD.isTesting ? true : false
40
+ };
41
+
42
+ // src/utils/constants.ts
43
+ var SVG_NS = "http://www.w3.org/2000/svg";
44
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
45
+
46
+ // src/utils/es2022-rewire-class-members.ts
47
+ var reWireGetterSetter = (instance, hostRef) => {
48
+ var _a;
49
+ const cmpMeta = hostRef.$cmpMeta$;
50
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
51
+ members.map(([memberName, [memberFlags]]) => {
52
+ if ((BUILD.state || BUILD.prop) && (memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
53
+ const ogValue = instance[memberName];
54
+ const ogDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(instance), memberName);
55
+ Object.defineProperty(instance, memberName, {
56
+ get() {
57
+ return ogDescriptor.get.call(this);
58
+ },
59
+ set(newValue) {
60
+ ogDescriptor.set.call(this, newValue);
61
+ },
62
+ configurable: true,
63
+ enumerable: true
64
+ });
65
+ instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
66
+ }
67
+ });
68
+ };
69
+
70
+ // src/client/client-host-ref.ts
71
+ var getHostRef = (ref) => {
72
+ if (ref.__stencil__getHostRef) {
73
+ return ref.__stencil__getHostRef();
74
+ }
75
+ return void 0;
76
+ };
77
+ var registerInstance = (lazyInstance, hostRef) => {
78
+ lazyInstance.__stencil__getHostRef = () => hostRef;
79
+ hostRef.$lazyInstance$ = lazyInstance;
80
+ if (BUILD.modernPropertyDecls && (BUILD.state || BUILD.prop)) {
81
+ reWireGetterSetter(lazyInstance, hostRef);
82
+ }
83
+ };
84
+ var registerHost = (hostElement, cmpMeta) => {
85
+ const hostRef = {
86
+ $flags$: 0,
87
+ $hostElement$: hostElement,
88
+ $cmpMeta$: cmpMeta,
89
+ $instanceValues$: /* @__PURE__ */ new Map()
90
+ };
91
+ if (BUILD.isDev) {
92
+ hostRef.$renderCount$ = 0;
93
+ }
94
+ if (BUILD.method && BUILD.lazyLoad) {
95
+ hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
96
+ }
97
+ if (BUILD.asyncLoading) {
98
+ hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
99
+ hostElement["s-p"] = [];
100
+ hostElement["s-rc"] = [];
101
+ }
102
+ const ref = hostRef;
103
+ hostElement.__stencil__getHostRef = () => ref;
104
+ if (!BUILD.lazyLoad && BUILD.modernPropertyDecls && (BUILD.state || BUILD.prop)) {
105
+ reWireGetterSetter(hostElement, hostRef);
106
+ }
107
+ return ref;
108
+ };
109
+ var isMemberInElement = (elm, memberName) => memberName in elm;
110
+ var customError;
111
+ var consoleError = (e, el) => (customError || console.error)(e, el);
112
+ var STENCIL_DEV_MODE = BUILD.isTesting ? ["STENCIL:"] : [
113
+ "%cstencil",
114
+ "color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"
115
+ ];
116
+ var consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);
117
+ var consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);
118
+ var consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);
119
+ var setErrorHandler = (handler) => customError = handler;
120
+
121
+ // src/client/client-load-module.ts
122
+ var cmpModules = /* @__PURE__ */ new Map();
123
+ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
124
+ const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
125
+ const bundleId = cmpMeta.$lazyBundleId$;
126
+ if (BUILD.isDev && typeof bundleId !== "string") {
127
+ consoleDevError(
128
+ `Trying to lazily load component <${cmpMeta.$tagName$}> with style mode "${hostRef.$modeName$}", but it does not exist.`
129
+ );
130
+ return void 0;
131
+ } else if (!bundleId) {
132
+ return void 0;
133
+ }
134
+ const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;
135
+ if (module) {
136
+ return module[exportName];
137
+ }
138
+
139
+ if (!hmrVersionId || !BUILD.hotModuleReplacement) {
140
+ const processMod = importedModule => {
141
+ cmpModules.set(bundleId, importedModule);
142
+ return importedModule[exportName];
143
+ }
144
+ switch(bundleId) {
145
+
146
+ case 'rtk-avatar_26.cjs':
147
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
148
+ /* webpackMode: "lazy" */
149
+ './rtk-avatar_26.cjs.entry.js')); }).then(processMod, consoleError);
150
+ case 'rtk-ai.cjs':
151
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
152
+ /* webpackMode: "lazy" */
153
+ './rtk-ai.cjs.entry.js')); }).then(processMod, consoleError);
154
+ case 'rtk-ai-toggle.cjs':
155
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
156
+ /* webpackMode: "lazy" */
157
+ './rtk-ai-toggle.cjs.entry.js')); }).then(processMod, consoleError);
158
+ case 'rtk-audio-grid.cjs':
159
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
160
+ /* webpackMode: "lazy" */
161
+ './rtk-audio-grid.cjs.entry.js')); }).then(processMod, consoleError);
162
+ case 'rtk-audio-tile.cjs':
163
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
164
+ /* webpackMode: "lazy" */
165
+ './rtk-audio-tile.cjs.entry.js')); }).then(processMod, consoleError);
166
+ case 'rtk-breakout-rooms-toggle.cjs':
167
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
168
+ /* webpackMode: "lazy" */
169
+ './rtk-breakout-rooms-toggle.cjs.entry.js')); }).then(processMod, consoleError);
170
+ case 'rtk-camera-toggle.cjs':
171
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
172
+ /* webpackMode: "lazy" */
173
+ './rtk-camera-toggle.cjs.entry.js')); }).then(processMod, consoleError);
174
+ case 'rtk-caption-toggle.cjs':
175
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
176
+ /* webpackMode: "lazy" */
177
+ './rtk-caption-toggle.cjs.entry.js')); }).then(processMod, consoleError);
178
+ case 'rtk-chat-composer-ui.cjs':
179
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
180
+ /* webpackMode: "lazy" */
181
+ './rtk-chat-composer-ui.cjs.entry.js')); }).then(processMod, consoleError);
182
+ case 'rtk-chat-messages-ui.cjs':
183
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
184
+ /* webpackMode: "lazy" */
185
+ './rtk-chat-messages-ui.cjs.entry.js')); }).then(processMod, consoleError);
186
+ case 'rtk-chat-search-results.cjs':
187
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
188
+ /* webpackMode: "lazy" */
189
+ './rtk-chat-search-results.cjs.entry.js')); }).then(processMod, consoleError);
190
+ case 'rtk-chat-selector-ui.cjs':
191
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
192
+ /* webpackMode: "lazy" */
193
+ './rtk-chat-selector-ui.cjs.entry.js')); }).then(processMod, consoleError);
194
+ case 'rtk-chat-toggle.cjs':
195
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
196
+ /* webpackMode: "lazy" */
197
+ './rtk-chat-toggle.cjs.entry.js')); }).then(processMod, consoleError);
198
+ case 'rtk-clock.cjs':
199
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
200
+ /* webpackMode: "lazy" */
201
+ './rtk-clock.cjs.entry.js')); }).then(processMod, consoleError);
202
+ case 'rtk-controlbar.cjs':
203
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
204
+ /* webpackMode: "lazy" */
205
+ './rtk-controlbar.cjs.entry.js')); }).then(processMod, consoleError);
206
+ case 'rtk-debugger-toggle.cjs':
207
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
208
+ /* webpackMode: "lazy" */
209
+ './rtk-debugger-toggle.cjs.entry.js')); }).then(processMod, consoleError);
210
+ case 'rtk-dialog-manager.cjs':
211
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
212
+ /* webpackMode: "lazy" */
213
+ './rtk-dialog-manager.cjs.entry.js')); }).then(processMod, consoleError);
214
+ case 'rtk-ended-screen.cjs':
215
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
216
+ /* webpackMode: "lazy" */
217
+ './rtk-ended-screen.cjs.entry.js')); }).then(processMod, consoleError);
218
+ case 'rtk-file-dropzone.cjs':
219
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
220
+ /* webpackMode: "lazy" */
221
+ './rtk-file-dropzone.cjs.entry.js')); }).then(processMod, consoleError);
222
+ case 'rtk-grid.cjs':
223
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
224
+ /* webpackMode: "lazy" */
225
+ './rtk-grid.cjs.entry.js')); }).then(processMod, consoleError);
226
+ case 'rtk-grid-pagination.cjs':
227
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
228
+ /* webpackMode: "lazy" */
229
+ './rtk-grid-pagination.cjs.entry.js')); }).then(processMod, consoleError);
230
+ case 'rtk-header.cjs':
231
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
232
+ /* webpackMode: "lazy" */
233
+ './rtk-header.cjs.entry.js')); }).then(processMod, consoleError);
234
+ case 'rtk-idle-screen.cjs':
235
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
236
+ /* webpackMode: "lazy" */
237
+ './rtk-idle-screen.cjs.entry.js')); }).then(processMod, consoleError);
238
+ case 'rtk-image-viewer.cjs':
239
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
240
+ /* webpackMode: "lazy" */
241
+ './rtk-image-viewer.cjs.entry.js')); }).then(processMod, consoleError);
242
+ case 'rtk-information-tooltip.cjs':
243
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
244
+ /* webpackMode: "lazy" */
245
+ './rtk-information-tooltip.cjs.entry.js')); }).then(processMod, consoleError);
246
+ case 'rtk-leave-button.cjs':
247
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
248
+ /* webpackMode: "lazy" */
249
+ './rtk-leave-button.cjs.entry.js')); }).then(processMod, consoleError);
250
+ case 'rtk-livestream-toggle.cjs':
251
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
252
+ /* webpackMode: "lazy" */
253
+ './rtk-livestream-toggle.cjs.entry.js')); }).then(processMod, consoleError);
254
+ case 'rtk-meeting-title.cjs':
255
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
256
+ /* webpackMode: "lazy" */
257
+ './rtk-meeting-title.cjs.entry.js')); }).then(processMod, consoleError);
258
+ case 'rtk-message-list-view.cjs':
259
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
260
+ /* webpackMode: "lazy" */
261
+ './rtk-message-list-view.cjs.entry.js')); }).then(processMod, consoleError);
262
+ case 'rtk-mic-toggle.cjs':
263
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
264
+ /* webpackMode: "lazy" */
265
+ './rtk-mic-toggle.cjs.entry.js')); }).then(processMod, consoleError);
266
+ case 'rtk-mixed-grid.cjs':
267
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
268
+ /* webpackMode: "lazy" */
269
+ './rtk-mixed-grid.cjs.entry.js')); }).then(processMod, consoleError);
270
+ case 'rtk-more-toggle.cjs':
271
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
272
+ /* webpackMode: "lazy" */
273
+ './rtk-more-toggle.cjs.entry.js')); }).then(processMod, consoleError);
274
+ case 'rtk-mute-all-button.cjs':
275
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
276
+ /* webpackMode: "lazy" */
277
+ './rtk-mute-all-button.cjs.entry.js')); }).then(processMod, consoleError);
278
+ case 'rtk-network-indicator.cjs':
279
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
280
+ /* webpackMode: "lazy" */
281
+ './rtk-network-indicator.cjs.entry.js')); }).then(processMod, consoleError);
282
+ case 'rtk-notifications.cjs':
283
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
284
+ /* webpackMode: "lazy" */
285
+ './rtk-notifications.cjs.entry.js')); }).then(processMod, consoleError);
286
+ case 'rtk-participant-count.cjs':
287
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
288
+ /* webpackMode: "lazy" */
289
+ './rtk-participant-count.cjs.entry.js')); }).then(processMod, consoleError);
290
+ case 'rtk-participant-setup.cjs':
291
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
292
+ /* webpackMode: "lazy" */
293
+ './rtk-participant-setup.cjs.entry.js')); }).then(processMod, consoleError);
294
+ case 'rtk-participants.cjs':
295
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
296
+ /* webpackMode: "lazy" */
297
+ './rtk-participants.cjs.entry.js')); }).then(processMod, consoleError);
298
+ case 'rtk-participants-audio.cjs':
299
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
300
+ /* webpackMode: "lazy" */
301
+ './rtk-participants-audio.cjs.entry.js')); }).then(processMod, consoleError);
302
+ case 'rtk-participants-toggle.cjs':
303
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
304
+ /* webpackMode: "lazy" */
305
+ './rtk-participants-toggle.cjs.entry.js')); }).then(processMod, consoleError);
306
+ case 'rtk-pip-toggle.cjs':
307
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
308
+ /* webpackMode: "lazy" */
309
+ './rtk-pip-toggle.cjs.entry.js')); }).then(processMod, consoleError);
310
+ case 'rtk-plugins-toggle.cjs':
311
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
312
+ /* webpackMode: "lazy" */
313
+ './rtk-plugins-toggle.cjs.entry.js')); }).then(processMod, consoleError);
314
+ case 'rtk-polls-toggle.cjs':
315
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
316
+ /* webpackMode: "lazy" */
317
+ './rtk-polls-toggle.cjs.entry.js')); }).then(processMod, consoleError);
318
+ case 'rtk-recording-indicator.cjs':
319
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
320
+ /* webpackMode: "lazy" */
321
+ './rtk-recording-indicator.cjs.entry.js')); }).then(processMod, consoleError);
322
+ case 'rtk-recording-toggle.cjs':
323
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
324
+ /* webpackMode: "lazy" */
325
+ './rtk-recording-toggle.cjs.entry.js')); }).then(processMod, consoleError);
326
+ case 'rtk-screen-share-toggle.cjs':
327
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
328
+ /* webpackMode: "lazy" */
329
+ './rtk-screen-share-toggle.cjs.entry.js')); }).then(processMod, consoleError);
330
+ case 'rtk-screenshare-view.cjs':
331
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
332
+ /* webpackMode: "lazy" */
333
+ './rtk-screenshare-view.cjs.entry.js')); }).then(processMod, consoleError);
334
+ case 'rtk-settings.cjs':
335
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
336
+ /* webpackMode: "lazy" */
337
+ './rtk-settings.cjs.entry.js')); }).then(processMod, consoleError);
338
+ case 'rtk-settings-toggle.cjs':
339
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
340
+ /* webpackMode: "lazy" */
341
+ './rtk-settings-toggle.cjs.entry.js')); }).then(processMod, consoleError);
342
+ case 'rtk-setup-screen.cjs':
343
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
344
+ /* webpackMode: "lazy" */
345
+ './rtk-setup-screen.cjs.entry.js')); }).then(processMod, consoleError);
346
+ case 'rtk-sidebar.cjs':
347
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
348
+ /* webpackMode: "lazy" */
349
+ './rtk-sidebar.cjs.entry.js')); }).then(processMod, consoleError);
350
+ case 'rtk-simple-grid.cjs':
351
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
352
+ /* webpackMode: "lazy" */
353
+ './rtk-simple-grid.cjs.entry.js')); }).then(processMod, consoleError);
354
+ case 'rtk-spotlight-grid.cjs':
355
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
356
+ /* webpackMode: "lazy" */
357
+ './rtk-spotlight-grid.cjs.entry.js')); }).then(processMod, consoleError);
358
+ case 'rtk-stage.cjs':
359
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
360
+ /* webpackMode: "lazy" */
361
+ './rtk-stage.cjs.entry.js')); }).then(processMod, consoleError);
362
+ case 'rtk-stage-toggle.cjs':
363
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
364
+ /* webpackMode: "lazy" */
365
+ './rtk-stage-toggle.cjs.entry.js')); }).then(processMod, consoleError);
366
+ case 'rtk-transcripts.cjs':
367
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
368
+ /* webpackMode: "lazy" */
369
+ './rtk-transcripts.cjs.entry.js')); }).then(processMod, consoleError);
370
+ case 'rtk-ui-provider.cjs':
371
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
372
+ /* webpackMode: "lazy" */
373
+ './rtk-ui-provider.cjs.entry.js')); }).then(processMod, consoleError);
374
+ case 'rtk-waiting-screen.cjs':
375
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
376
+ /* webpackMode: "lazy" */
377
+ './rtk-waiting-screen.cjs.entry.js')); }).then(processMod, consoleError);
378
+ case 'rtk-ai-transcriptions.cjs':
379
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
380
+ /* webpackMode: "lazy" */
381
+ './rtk-ai-transcriptions.cjs.entry.js')); }).then(processMod, consoleError);
382
+ case 'rtk-breakout-rooms-manager_9.cjs':
383
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
384
+ /* webpackMode: "lazy" */
385
+ './rtk-breakout-rooms-manager_9.cjs.entry.js')); }).then(processMod, consoleError);
386
+ case 'rtk-chat-message.cjs':
387
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
388
+ /* webpackMode: "lazy" */
389
+ './rtk-chat-message.cjs.entry.js')); }).then(processMod, consoleError);
390
+ case 'rtk-livestream-indicator_3.cjs':
391
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
392
+ /* webpackMode: "lazy" */
393
+ './rtk-livestream-indicator_3.cjs.entry.js')); }).then(processMod, consoleError);
394
+ case 'rtk-name-tag.cjs':
395
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
396
+ /* webpackMode: "lazy" */
397
+ './rtk-name-tag.cjs.entry.js')); }).then(processMod, consoleError);
398
+ case 'rtk-notification.cjs':
399
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
400
+ /* webpackMode: "lazy" */
401
+ './rtk-notification.cjs.entry.js')); }).then(processMod, consoleError);
402
+ case 'rtk-participants-stage-list_4.cjs':
403
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
404
+ /* webpackMode: "lazy" */
405
+ './rtk-participants-stage-list_4.cjs.entry.js')); }).then(processMod, consoleError);
406
+ case 'rtk-plugin-main_2.cjs':
407
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
408
+ /* webpackMode: "lazy" */
409
+ './rtk-plugin-main_2.cjs.entry.js')); }).then(processMod, consoleError);
410
+ case 'rtk-plugins_2.cjs':
411
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
412
+ /* webpackMode: "lazy" */
413
+ './rtk-plugins_2.cjs.entry.js')); }).then(processMod, consoleError);
414
+ case 'rtk-settings-audio_2.cjs':
415
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
416
+ /* webpackMode: "lazy" */
417
+ './rtk-settings-audio_2.cjs.entry.js')); }).then(processMod, consoleError);
418
+ case 'rtk-transcript.cjs':
419
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
420
+ /* webpackMode: "lazy" */
421
+ './rtk-transcript.cjs.entry.js')); }).then(processMod, consoleError);
422
+ case 'rtk-audio-visualizer_4.cjs':
423
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
424
+ /* webpackMode: "lazy" */
425
+ './rtk-audio-visualizer_4.cjs.entry.js')); }).then(processMod, consoleError);
426
+ case 'rtk-breakout-room-manager_3.cjs':
427
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
428
+ /* webpackMode: "lazy" */
429
+ './rtk-breakout-room-manager_3.cjs.entry.js')); }).then(processMod, consoleError);
430
+ case 'rtk-debugger-audio_4.cjs':
431
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
432
+ /* webpackMode: "lazy" */
433
+ './rtk-debugger-audio_4.cjs.entry.js')); }).then(processMod, consoleError);
434
+ case 'rtk-dialog.cjs':
435
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
436
+ /* webpackMode: "lazy" */
437
+ './rtk-dialog.cjs.entry.js')); }).then(processMod, consoleError);
438
+ case 'rtk-file-message_3.cjs':
439
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
440
+ /* webpackMode: "lazy" */
441
+ './rtk-file-message_3.cjs.entry.js')); }).then(processMod, consoleError);
442
+ case 'rtk-fullscreen-toggle.cjs':
443
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
444
+ /* webpackMode: "lazy" */
445
+ './rtk-fullscreen-toggle.cjs.entry.js')); }).then(processMod, consoleError);
446
+ case 'rtk-participant_2.cjs':
447
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
448
+ /* webpackMode: "lazy" */
449
+ './rtk-participant_2.cjs.entry.js')); }).then(processMod, consoleError);
450
+ case 'rtk-camera-selector_2.cjs':
451
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
452
+ /* webpackMode: "lazy" */
453
+ './rtk-camera-selector_2.cjs.entry.js')); }).then(processMod, consoleError);
454
+ case 'rtk-poll_2.cjs':
455
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
456
+ /* webpackMode: "lazy" */
457
+ './rtk-poll_2.cjs.entry.js')); }).then(processMod, consoleError);
458
+ case 'rtk-sidebar-ui.cjs':
459
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
460
+ /* webpackMode: "lazy" */
461
+ './rtk-sidebar-ui.cjs.entry.js')); }).then(processMod, consoleError);
462
+ case 'rtk-spotlight-indicator.cjs':
463
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
464
+ /* webpackMode: "lazy" */
465
+ './rtk-spotlight-indicator.cjs.entry.js')); }).then(processMod, consoleError);
466
+ case 'rtk-logo.cjs':
467
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
468
+ /* webpackMode: "lazy" */
469
+ './rtk-logo.cjs.entry.js')); }).then(processMod, consoleError);
470
+ case 'rtk-controlbar-button.cjs':
471
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
472
+ /* webpackMode: "lazy" */
473
+ './rtk-controlbar-button.cjs.entry.js')); }).then(processMod, consoleError);
474
+ }
475
+ }
476
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
477
+ /* @vite-ignore */
478
+ /* webpackInclude: /\.entry\.js$/ */
479
+ /* webpackExclude: /\.system\.entry\.js$/ */
480
+ /* webpackMode: "lazy" */
481
+ `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVersionId ? "?s-hmr=" + hmrVersionId : ""}`
482
+ )); }).then(
483
+ (importedModule) => {
484
+ if (!BUILD.hotModuleReplacement) {
485
+ cmpModules.set(bundleId, importedModule);
486
+ }
487
+ return importedModule[exportName];
488
+ },
489
+ (e) => {
490
+ consoleError(e, hostRef.$hostElement$);
491
+ }
492
+ );
493
+ };
494
+
495
+ // src/client/client-style.ts
496
+ var styles = /* @__PURE__ */ new Map();
497
+ var modeResolutionChain = [];
498
+
499
+ // src/runtime/runtime-constants.ts
500
+ var CONTENT_REF_ID = "r";
501
+ var ORG_LOCATION_ID = "o";
502
+ var SLOT_NODE_ID = "s";
503
+ var TEXT_NODE_ID = "t";
504
+ var COMMENT_NODE_ID = "c";
505
+ var HYDRATE_ID = "s-id";
506
+ var HYDRATED_STYLE_ID = "sty-id";
507
+ var HYDRATE_CHILD_ID = "c-id";
508
+ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
509
+ var STENCIL_DOC_DATA = "_stencilDocData";
510
+ var DEFAULT_DOC_DATA = {
511
+ hostIds: 0,
512
+ rootLevelIds: 0,
513
+ staticComponents: /* @__PURE__ */ new Set()
514
+ };
515
+ var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
516
+ var XLINK_NS = "http://www.w3.org/1999/xlink";
517
+ var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
518
+ "formAssociatedCallback",
519
+ "formResetCallback",
520
+ "formDisabledCallback",
521
+ "formStateRestoreCallback"
522
+ ];
523
+ var win = typeof window !== "undefined" ? window : {};
524
+ var H = win.HTMLElement || class {
525
+ };
526
+ var plt = {
527
+ $flags$: 0,
528
+ $resourcesUrl$: "",
529
+ jmp: (h2) => h2(),
530
+ raf: (h2) => requestAnimationFrame(h2),
531
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
532
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
533
+ ce: (eventName, opts) => new CustomEvent(eventName, opts)
534
+ };
535
+ var setPlatformHelpers = (helpers) => {
536
+ Object.assign(plt, helpers);
537
+ };
538
+ var supportsShadow = BUILD.shadowDom;
539
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
540
+ var _a;
541
+ let supportsListenerOptions2 = false;
542
+ try {
543
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
544
+ "e",
545
+ null,
546
+ Object.defineProperty({}, "passive", {
547
+ get() {
548
+ supportsListenerOptions2 = true;
549
+ }
550
+ })
551
+ );
552
+ } catch (e) {
553
+ }
554
+ return supportsListenerOptions2;
555
+ })();
556
+ var promiseResolve = (v) => Promise.resolve(v);
557
+ var supportsConstructableStylesheets = BUILD.constructableCSS ? /* @__PURE__ */ (() => {
558
+ try {
559
+ new CSSStyleSheet();
560
+ return typeof new CSSStyleSheet().replaceSync === "function";
561
+ } catch (e) {
562
+ }
563
+ return false;
564
+ })() : false;
565
+
566
+ // src/client/client-task-queue.ts
567
+ var queueCongestion = 0;
568
+ var queuePending = false;
569
+ var queueDomReads = [];
570
+ var queueDomWrites = [];
571
+ var queueDomWritesLow = [];
572
+ var queueTask = (queue, write) => (cb) => {
573
+ queue.push(cb);
574
+ if (!queuePending) {
575
+ queuePending = true;
576
+ if (write && plt.$flags$ & 4 /* queueSync */) {
577
+ nextTick(flush);
578
+ } else {
579
+ plt.raf(flush);
580
+ }
581
+ }
582
+ };
583
+ var consume = (queue) => {
584
+ for (let i2 = 0; i2 < queue.length; i2++) {
585
+ try {
586
+ queue[i2](performance.now());
587
+ } catch (e) {
588
+ consoleError(e);
589
+ }
590
+ }
591
+ queue.length = 0;
592
+ };
593
+ var consumeTimeout = (queue, timeout) => {
594
+ let i2 = 0;
595
+ let ts = 0;
596
+ while (i2 < queue.length && (ts = performance.now()) < timeout) {
597
+ try {
598
+ queue[i2++](ts);
599
+ } catch (e) {
600
+ consoleError(e);
601
+ }
602
+ }
603
+ if (i2 === queue.length) {
604
+ queue.length = 0;
605
+ } else if (i2 !== 0) {
606
+ queue.splice(0, i2);
607
+ }
608
+ };
609
+ var flush = () => {
610
+ if (BUILD.asyncQueue) {
611
+ queueCongestion++;
612
+ }
613
+ consume(queueDomReads);
614
+ if (BUILD.asyncQueue) {
615
+ const timeout = (plt.$flags$ & 6 /* queueMask */) === 2 /* appLoaded */ ? performance.now() + 14 * Math.ceil(queueCongestion * (1 / 10)) : Infinity;
616
+ consumeTimeout(queueDomWrites, timeout);
617
+ consumeTimeout(queueDomWritesLow, timeout);
618
+ if (queueDomWrites.length > 0) {
619
+ queueDomWritesLow.push(...queueDomWrites);
620
+ queueDomWrites.length = 0;
621
+ }
622
+ if (queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0) {
623
+ plt.raf(flush);
624
+ } else {
625
+ queueCongestion = 0;
626
+ }
627
+ } else {
628
+ consume(queueDomWrites);
629
+ if (queuePending = queueDomReads.length > 0) {
630
+ plt.raf(flush);
631
+ }
632
+ }
633
+ };
634
+ var nextTick = (cb) => promiseResolve().then(cb);
635
+ var readTask = /* @__PURE__ */ queueTask(queueDomReads, false);
636
+ var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
637
+
638
+ // src/runtime/asset-path.ts
639
+ var getAssetPath = (path) => {
640
+ const assetUrl = new URL(path, plt.$resourcesUrl$);
641
+ return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
642
+ };
643
+ var setAssetPath = (path) => plt.$resourcesUrl$ = path;
644
+
645
+ // src/utils/helpers.ts
646
+ var isDef = (v) => v != null && v !== void 0;
647
+ var isComplexType = (o) => {
648
+ o = typeof o;
649
+ return o === "object" || o === "function";
650
+ };
651
+
652
+ // src/utils/query-nonce-meta-tag-content.ts
653
+ function queryNonceMetaTagContent(doc) {
654
+ var _a, _b, _c;
655
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
656
+ }
657
+
658
+ // src/utils/regular-expression.ts
659
+ var escapeRegExpSpecialCharacters = (text) => {
660
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
661
+ };
662
+
663
+ // src/utils/result.ts
664
+ var result_exports = {};
665
+ __export(result_exports, {
666
+ err: () => err,
667
+ map: () => map,
668
+ ok: () => ok,
669
+ unwrap: () => unwrap,
670
+ unwrapErr: () => unwrapErr
671
+ });
672
+ var ok = (value) => ({
673
+ isOk: true,
674
+ isErr: false,
675
+ value
676
+ });
677
+ var err = (value) => ({
678
+ isOk: false,
679
+ isErr: true,
680
+ value
681
+ });
682
+ function map(result, fn) {
683
+ if (result.isOk) {
684
+ const val = fn(result.value);
685
+ if (val instanceof Promise) {
686
+ return val.then((newVal) => ok(newVal));
687
+ } else {
688
+ return ok(val);
689
+ }
690
+ }
691
+ if (result.isErr) {
692
+ const value = result.value;
693
+ return err(value);
694
+ }
695
+ throw "should never get here";
696
+ }
697
+ var unwrap = (result) => {
698
+ if (result.isOk) {
699
+ return result.value;
700
+ } else {
701
+ throw result.value;
702
+ }
703
+ };
704
+ var unwrapErr = (result) => {
705
+ if (result.isErr) {
706
+ return result.value;
707
+ } else {
708
+ throw result.value;
709
+ }
710
+ };
711
+ var updateFallbackSlotVisibility = (elm) => {
712
+ const childNodes = internalCall(elm, "childNodes");
713
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
714
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
715
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
716
+ if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
717
+ slotNode.hidden = true;
718
+ } else {
719
+ slotNode.hidden = false;
720
+ }
721
+ }
722
+ });
723
+ }
724
+ let i2 = 0;
725
+ for (i2 = 0; i2 < childNodes.length; i2++) {
726
+ const childNode = childNodes[i2];
727
+ if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
728
+ updateFallbackSlotVisibility(childNode);
729
+ }
730
+ }
731
+ };
732
+ var getSlottedChildNodes = (childNodes) => {
733
+ const result = [];
734
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
735
+ const slottedNode = childNodes[i2]["s-nr"] || void 0;
736
+ if (slottedNode && slottedNode.isConnected) {
737
+ result.push(slottedNode);
738
+ }
739
+ }
740
+ return result;
741
+ };
742
+ function getHostSlotNodes(childNodes, hostName, slotName) {
743
+ let i2 = 0;
744
+ let slottedNodes = [];
745
+ let childNode;
746
+ for (; i2 < childNodes.length; i2++) {
747
+ childNode = childNodes[i2];
748
+ if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
749
+ slottedNodes.push(childNode);
750
+ if (typeof slotName !== "undefined") return slottedNodes;
751
+ }
752
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
753
+ }
754
+ return slottedNodes;
755
+ }
756
+ var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
757
+ const childNodes = [];
758
+ if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
759
+ let node = slot;
760
+ while (node = node.nextSibling) {
761
+ if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
762
+ }
763
+ return childNodes;
764
+ };
765
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
766
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
767
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
768
+ return true;
769
+ }
770
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
771
+ return true;
772
+ }
773
+ return false;
774
+ }
775
+ if (nodeToRelocate["s-sn"] === slotName) {
776
+ return true;
777
+ }
778
+ return slotName === "";
779
+ };
780
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
781
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
782
+ return;
783
+ }
784
+ const slottedNodeLocation = document.createTextNode("");
785
+ slottedNodeLocation["s-nr"] = newChild;
786
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
787
+ const parent = slotNode["s-cr"].parentNode;
788
+ const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
789
+ if (BUILD.hydrateClientSide && typeof position !== "undefined") {
790
+ slottedNodeLocation["s-oo"] = position;
791
+ const childNodes = internalCall(parent, "childNodes");
792
+ const slotRelocateNodes = [slottedNodeLocation];
793
+ childNodes.forEach((n) => {
794
+ if (n["s-nr"]) slotRelocateNodes.push(n);
795
+ });
796
+ slotRelocateNodes.sort((a, b) => {
797
+ if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
798
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
799
+ return 0;
800
+ });
801
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
802
+ } else {
803
+ appendMethod.call(parent, slottedNodeLocation);
804
+ }
805
+ newChild["s-ol"] = slottedNodeLocation;
806
+ newChild["s-sh"] = slotNode["s-hn"];
807
+ };
808
+ var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
809
+ function patchSlotNode(node) {
810
+ if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
811
+ const assignedFactory = (elementsOnly) => (function(opts) {
812
+ const toReturn = [];
813
+ const slotName = this["s-sn"];
814
+ if (opts == null ? void 0 : opts.flatten) {
815
+ console.error(`
816
+ Flattening is not supported for Stencil non-shadow slots.
817
+ You can use \`.childNodes\` to nested slot fallback content.
818
+ If you have a particular use case, please open an issue on the Stencil repo.
819
+ `);
820
+ }
821
+ const parent = this["s-cr"].parentElement;
822
+ const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
823
+ slottedNodes.forEach((n) => {
824
+ if (slotName === getSlotName(n)) {
825
+ toReturn.push(n);
826
+ }
827
+ });
828
+ if (elementsOnly) {
829
+ return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
830
+ }
831
+ return toReturn;
832
+ }).bind(node);
833
+ node.assignedElements = assignedFactory(true);
834
+ node.assignedNodes = assignedFactory(false);
835
+ }
836
+ function dispatchSlotChangeEvent(elm) {
837
+ elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
838
+ }
839
+ function findSlotFromSlottedNode(slottedNode, parentHost) {
840
+ var _a;
841
+ parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
842
+ if (!parentHost) return { slotNode: null, slotName: "" };
843
+ const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
844
+ const childNodes = internalCall(parentHost, "childNodes");
845
+ const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
846
+ return { slotNode, slotName };
847
+ }
848
+
849
+ // src/runtime/dom-extras.ts
850
+ var patchPseudoShadowDom = (hostElementPrototype) => {
851
+ patchCloneNode(hostElementPrototype);
852
+ patchSlotAppendChild(hostElementPrototype);
853
+ patchSlotAppend(hostElementPrototype);
854
+ patchSlotPrepend(hostElementPrototype);
855
+ patchSlotInsertAdjacentElement(hostElementPrototype);
856
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
857
+ patchSlotInsertAdjacentText(hostElementPrototype);
858
+ patchInsertBefore(hostElementPrototype);
859
+ patchTextContent(hostElementPrototype);
860
+ patchChildSlotNodes(hostElementPrototype);
861
+ patchSlotRemoveChild(hostElementPrototype);
862
+ };
863
+ var patchCloneNode = (HostElementPrototype) => {
864
+ const orgCloneNode = HostElementPrototype.cloneNode;
865
+ HostElementPrototype.cloneNode = function(deep) {
866
+ const srcNode = this;
867
+ const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
868
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
869
+ if (BUILD.slot && !isShadowDom && deep) {
870
+ let i2 = 0;
871
+ let slotted, nonStencilNode;
872
+ const stencilPrivates = [
873
+ "s-id",
874
+ "s-cr",
875
+ "s-lr",
876
+ "s-rc",
877
+ "s-sc",
878
+ "s-p",
879
+ "s-cn",
880
+ "s-sr",
881
+ "s-sn",
882
+ "s-hn",
883
+ "s-ol",
884
+ "s-nr",
885
+ "s-si",
886
+ "s-rf",
887
+ "s-scs"
888
+ ];
889
+ const childNodes = this.__childNodes || this.childNodes;
890
+ for (; i2 < childNodes.length; i2++) {
891
+ slotted = childNodes[i2]["s-nr"];
892
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
893
+ if (slotted) {
894
+ if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {
895
+ clonedNode.__appendChild(slotted.cloneNode(true));
896
+ } else {
897
+ clonedNode.appendChild(slotted.cloneNode(true));
898
+ }
899
+ }
900
+ if (nonStencilNode) {
901
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
902
+ }
903
+ }
904
+ }
905
+ return clonedNode;
906
+ };
907
+ };
908
+ var patchSlotAppendChild = (HostElementPrototype) => {
909
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
910
+ HostElementPrototype.appendChild = function(newChild) {
911
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
912
+ if (slotNode) {
913
+ addSlotRelocateNode(newChild, slotNode);
914
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
915
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
916
+ const parent = internalCall(appendAfter, "parentNode");
917
+ const insertedNode = internalCall(parent, "insertBefore")(newChild, appendAfter.nextSibling);
918
+ dispatchSlotChangeEvent(slotNode);
919
+ updateFallbackSlotVisibility(this);
920
+ return insertedNode;
921
+ }
922
+ return this.__appendChild(newChild);
923
+ };
924
+ };
925
+ var patchSlotRemoveChild = (ElementPrototype) => {
926
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
927
+ ElementPrototype.removeChild = function(toRemove) {
928
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
929
+ const childNodes = this.__childNodes || this.childNodes;
930
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
931
+ if (slotNode && toRemove.isConnected) {
932
+ toRemove.remove();
933
+ updateFallbackSlotVisibility(this);
934
+ return;
935
+ }
936
+ }
937
+ return this.__removeChild(toRemove);
938
+ };
939
+ };
940
+ var patchSlotPrepend = (HostElementPrototype) => {
941
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
942
+ HostElementPrototype.prepend = function(...newChildren) {
943
+ newChildren.forEach((newChild) => {
944
+ if (typeof newChild === "string") {
945
+ newChild = this.ownerDocument.createTextNode(newChild);
946
+ }
947
+ const slotName = (newChild["s-sn"] = getSlotName(newChild)) || "";
948
+ const childNodes = internalCall(this, "childNodes");
949
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
950
+ if (slotNode) {
951
+ addSlotRelocateNode(newChild, slotNode, true);
952
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
953
+ const appendAfter = slotChildNodes[0];
954
+ const parent = internalCall(appendAfter, "parentNode");
955
+ const toReturn = internalCall(parent, "insertBefore")(newChild, internalCall(appendAfter, "nextSibling"));
956
+ dispatchSlotChangeEvent(slotNode);
957
+ return toReturn;
958
+ }
959
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
960
+ newChild.hidden = true;
961
+ }
962
+ return HostElementPrototype.__prepend(newChild);
963
+ });
964
+ };
965
+ };
966
+ var patchSlotAppend = (HostElementPrototype) => {
967
+ HostElementPrototype.__append = HostElementPrototype.append;
968
+ HostElementPrototype.append = function(...newChildren) {
969
+ newChildren.forEach((newChild) => {
970
+ if (typeof newChild === "string") {
971
+ newChild = this.ownerDocument.createTextNode(newChild);
972
+ }
973
+ this.appendChild(newChild);
974
+ });
975
+ };
976
+ };
977
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
978
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
979
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
980
+ if (position !== "afterbegin" && position !== "beforeend") {
981
+ return originalInsertAdjacentHtml.call(this, position, text);
982
+ }
983
+ const container = this.ownerDocument.createElement("_");
984
+ let node;
985
+ container.innerHTML = text;
986
+ if (position === "afterbegin") {
987
+ while (node = container.firstChild) {
988
+ this.prepend(node);
989
+ }
990
+ } else if (position === "beforeend") {
991
+ while (node = container.firstChild) {
992
+ this.append(node);
993
+ }
994
+ }
995
+ };
996
+ };
997
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
998
+ HostElementPrototype.insertAdjacentText = function(position, text) {
999
+ this.insertAdjacentHTML(position, text);
1000
+ };
1001
+ };
1002
+ var patchInsertBefore = (HostElementPrototype) => {
1003
+ const eleProto = HostElementPrototype;
1004
+ if (eleProto.__insertBefore) return;
1005
+ eleProto.__insertBefore = HostElementPrototype.insertBefore;
1006
+ HostElementPrototype.insertBefore = function(newChild, currentChild) {
1007
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
1008
+ const slottedNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1009
+ if (slotNode) {
1010
+ let found = false;
1011
+ slottedNodes.forEach((childNode) => {
1012
+ if (childNode === currentChild || currentChild === null) {
1013
+ found = true;
1014
+ if (currentChild === null || slotName !== currentChild["s-sn"]) {
1015
+ this.appendChild(newChild);
1016
+ return;
1017
+ }
1018
+ if (slotName === currentChild["s-sn"]) {
1019
+ addSlotRelocateNode(newChild, slotNode);
1020
+ const parent = internalCall(currentChild, "parentNode");
1021
+ internalCall(parent, "insertBefore")(newChild, currentChild);
1022
+ dispatchSlotChangeEvent(slotNode);
1023
+ }
1024
+ return;
1025
+ }
1026
+ });
1027
+ if (found) return newChild;
1028
+ }
1029
+ const parentNode = currentChild == null ? void 0 : currentChild.__parentNode;
1030
+ if (parentNode && !this.isSameNode(parentNode)) {
1031
+ return this.appendChild(newChild);
1032
+ }
1033
+ return this.__insertBefore(newChild, currentChild);
1034
+ };
1035
+ };
1036
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1037
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1038
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
1039
+ if (position !== "afterbegin" && position !== "beforeend") {
1040
+ return originalInsertAdjacentElement.call(this, position, element);
1041
+ }
1042
+ if (position === "afterbegin") {
1043
+ this.prepend(element);
1044
+ return element;
1045
+ } else if (position === "beforeend") {
1046
+ this.append(element);
1047
+ return element;
1048
+ }
1049
+ return element;
1050
+ };
1051
+ };
1052
+ var patchTextContent = (hostElementPrototype) => {
1053
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
1054
+ Object.defineProperty(hostElementPrototype, "textContent", {
1055
+ get: function() {
1056
+ let text = "";
1057
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1058
+ childNodes.forEach((node) => text += node.textContent || "");
1059
+ return text;
1060
+ },
1061
+ set: function(value) {
1062
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1063
+ childNodes.forEach((node) => {
1064
+ if (node["s-ol"]) node["s-ol"].remove();
1065
+ node.remove();
1066
+ });
1067
+ this.insertAdjacentHTML("beforeend", value);
1068
+ }
1069
+ });
1070
+ };
1071
+ var patchChildSlotNodes = (elm) => {
1072
+ class FakeNodeList extends Array {
1073
+ item(n) {
1074
+ return this[n];
1075
+ }
1076
+ }
1077
+ patchHostOriginalAccessor("children", elm);
1078
+ Object.defineProperty(elm, "children", {
1079
+ get() {
1080
+ return this.childNodes.filter((n) => n.nodeType === 1);
1081
+ }
1082
+ });
1083
+ Object.defineProperty(elm, "childElementCount", {
1084
+ get() {
1085
+ return this.children.length;
1086
+ }
1087
+ });
1088
+ patchHostOriginalAccessor("firstChild", elm);
1089
+ Object.defineProperty(elm, "firstChild", {
1090
+ get() {
1091
+ return this.childNodes[0];
1092
+ }
1093
+ });
1094
+ patchHostOriginalAccessor("lastChild", elm);
1095
+ Object.defineProperty(elm, "lastChild", {
1096
+ get() {
1097
+ return this.childNodes[this.childNodes.length - 1];
1098
+ }
1099
+ });
1100
+ patchHostOriginalAccessor("childNodes", elm);
1101
+ Object.defineProperty(elm, "childNodes", {
1102
+ get() {
1103
+ const result = new FakeNodeList();
1104
+ result.push(...getSlottedChildNodes(this.__childNodes));
1105
+ return result;
1106
+ }
1107
+ });
1108
+ };
1109
+ var patchSlottedNode = (node) => {
1110
+ if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
1111
+ patchNextSibling(node);
1112
+ patchPreviousSibling(node);
1113
+ patchParentNode(node);
1114
+ if (node.nodeType === Node.ELEMENT_NODE) {
1115
+ patchNextElementSibling(node);
1116
+ patchPreviousElementSibling(node);
1117
+ }
1118
+ };
1119
+ var patchNextSibling = (node) => {
1120
+ if (!node || node.__nextSibling) return;
1121
+ patchHostOriginalAccessor("nextSibling", node);
1122
+ Object.defineProperty(node, "nextSibling", {
1123
+ get: function() {
1124
+ var _a;
1125
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1126
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1127
+ if (parentNodes && index > -1) {
1128
+ return parentNodes[index + 1];
1129
+ }
1130
+ return this.__nextSibling;
1131
+ }
1132
+ });
1133
+ };
1134
+ var patchNextElementSibling = (element) => {
1135
+ if (!element || element.__nextElementSibling) return;
1136
+ patchHostOriginalAccessor("nextElementSibling", element);
1137
+ Object.defineProperty(element, "nextElementSibling", {
1138
+ get: function() {
1139
+ var _a;
1140
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1141
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1142
+ if (parentEles && index > -1) {
1143
+ return parentEles[index + 1];
1144
+ }
1145
+ return this.__nextElementSibling;
1146
+ }
1147
+ });
1148
+ };
1149
+ var patchPreviousSibling = (node) => {
1150
+ if (!node || node.__previousSibling) return;
1151
+ patchHostOriginalAccessor("previousSibling", node);
1152
+ Object.defineProperty(node, "previousSibling", {
1153
+ get: function() {
1154
+ var _a;
1155
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1156
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1157
+ if (parentNodes && index > -1) {
1158
+ return parentNodes[index - 1];
1159
+ }
1160
+ return this.__previousSibling;
1161
+ }
1162
+ });
1163
+ };
1164
+ var patchPreviousElementSibling = (element) => {
1165
+ if (!element || element.__previousElementSibling) return;
1166
+ patchHostOriginalAccessor("previousElementSibling", element);
1167
+ Object.defineProperty(element, "previousElementSibling", {
1168
+ get: function() {
1169
+ var _a;
1170
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1171
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1172
+ if (parentNodes && index > -1) {
1173
+ return parentNodes[index - 1];
1174
+ }
1175
+ return this.__previousElementSibling;
1176
+ }
1177
+ });
1178
+ };
1179
+ var patchParentNode = (node) => {
1180
+ if (!node || node.__parentNode) return;
1181
+ patchHostOriginalAccessor("parentNode", node);
1182
+ Object.defineProperty(node, "parentNode", {
1183
+ get: function() {
1184
+ var _a;
1185
+ return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
1186
+ },
1187
+ set: function(value) {
1188
+ this.__parentNode = value;
1189
+ }
1190
+ });
1191
+ };
1192
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1193
+ var validNodesPatches = [
1194
+ "childNodes",
1195
+ "firstChild",
1196
+ "lastChild",
1197
+ "nextSibling",
1198
+ "previousSibling",
1199
+ "textContent",
1200
+ "parentNode"
1201
+ ];
1202
+ function patchHostOriginalAccessor(accessorName, node) {
1203
+ let accessor;
1204
+ if (validElementPatches.includes(accessorName)) {
1205
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1206
+ } else if (validNodesPatches.includes(accessorName)) {
1207
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1208
+ }
1209
+ if (!accessor) {
1210
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1211
+ }
1212
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1213
+ }
1214
+ function internalCall(node, method) {
1215
+ if ("__" + method in node) {
1216
+ const toReturn = node["__" + method];
1217
+ if (typeof toReturn !== "function") return toReturn;
1218
+ return toReturn.bind(node);
1219
+ } else {
1220
+ if (typeof node[method] !== "function") return node[method];
1221
+ return node[method].bind(node);
1222
+ }
1223
+ }
1224
+ var i = 0;
1225
+ var createTime = (fnName, tagName = "") => {
1226
+ if (BUILD.profile && performance.mark) {
1227
+ const key = `st:${fnName}:${tagName}:${i++}`;
1228
+ performance.mark(key);
1229
+ return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
1230
+ } else {
1231
+ return () => {
1232
+ return;
1233
+ };
1234
+ }
1235
+ };
1236
+ var uniqueTime = (key, measureText) => {
1237
+ if (BUILD.profile && performance.mark) {
1238
+ if (performance.getEntriesByName(key, "mark").length === 0) {
1239
+ performance.mark(key);
1240
+ }
1241
+ return () => {
1242
+ if (performance.getEntriesByName(measureText, "measure").length === 0) {
1243
+ performance.measure(measureText, key);
1244
+ }
1245
+ };
1246
+ } else {
1247
+ return () => {
1248
+ return;
1249
+ };
1250
+ }
1251
+ };
1252
+ var inspect = (ref) => {
1253
+ const hostRef = getHostRef(ref);
1254
+ if (!hostRef) {
1255
+ return void 0;
1256
+ }
1257
+ const flags = hostRef.$flags$;
1258
+ const hostElement = hostRef.$hostElement$;
1259
+ return {
1260
+ renderCount: hostRef.$renderCount$,
1261
+ flags: {
1262
+ hasRendered: !!(flags & 2 /* hasRendered */),
1263
+ hasConnected: !!(flags & 1 /* hasConnected */),
1264
+ isWaitingForChildren: !!(flags & 4 /* isWaitingForChildren */),
1265
+ isConstructingInstance: !!(flags & 8 /* isConstructingInstance */),
1266
+ isQueuedForUpdate: !!(flags & 16 /* isQueuedForUpdate */),
1267
+ hasInitializedComponent: !!(flags & 32 /* hasInitializedComponent */),
1268
+ hasLoadedComponent: !!(flags & 64 /* hasLoadedComponent */),
1269
+ isWatchReady: !!(flags & 128 /* isWatchReady */),
1270
+ isListenReady: !!(flags & 256 /* isListenReady */),
1271
+ needsRerender: !!(flags & 512 /* needsRerender */)
1272
+ },
1273
+ instanceValues: hostRef.$instanceValues$,
1274
+ ancestorComponent: hostRef.$ancestorComponent$,
1275
+ hostElement,
1276
+ lazyInstance: hostRef.$lazyInstance$,
1277
+ vnode: hostRef.$vnode$,
1278
+ modeName: hostRef.$modeName$,
1279
+ onReadyPromise: hostRef.$onReadyPromise$,
1280
+ onReadyResolve: hostRef.$onReadyResolve$,
1281
+ onInstancePromise: hostRef.$onInstancePromise$,
1282
+ onInstanceResolve: hostRef.$onInstanceResolve$,
1283
+ onRenderResolve: hostRef.$onRenderResolve$,
1284
+ queuedListeners: hostRef.$queuedListeners$,
1285
+ rmListeners: hostRef.$rmListeners$,
1286
+ ["s-id"]: hostElement["s-id"],
1287
+ ["s-cr"]: hostElement["s-cr"],
1288
+ ["s-lr"]: hostElement["s-lr"],
1289
+ ["s-p"]: hostElement["s-p"],
1290
+ ["s-rc"]: hostElement["s-rc"],
1291
+ ["s-sc"]: hostElement["s-sc"]
1292
+ };
1293
+ };
1294
+ var installDevTools = () => {
1295
+ if (BUILD.devTools) {
1296
+ const stencil = win.stencil = win.stencil || {};
1297
+ const originalInspect = stencil.inspect;
1298
+ stencil.inspect = (ref) => {
1299
+ let result = inspect(ref);
1300
+ if (!result && typeof originalInspect === "function") {
1301
+ result = originalInspect(ref);
1302
+ }
1303
+ return result;
1304
+ };
1305
+ }
1306
+ };
1307
+ var h = (nodeName, vnodeData, ...children) => {
1308
+ let child = null;
1309
+ let key = null;
1310
+ let slotName = null;
1311
+ let simple = false;
1312
+ let lastSimple = false;
1313
+ const vNodeChildren = [];
1314
+ const walk = (c) => {
1315
+ for (let i2 = 0; i2 < c.length; i2++) {
1316
+ child = c[i2];
1317
+ if (Array.isArray(child)) {
1318
+ walk(child);
1319
+ } else if (child != null && typeof child !== "boolean") {
1320
+ if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
1321
+ child = String(child);
1322
+ } else if (BUILD.isDev && typeof nodeName !== "function" && child.$flags$ === void 0) {
1323
+ consoleDevError(`vNode passed as children has unexpected type.
1324
+ Make sure it's using the correct h() function.
1325
+ Empty objects can also be the cause, look for JSX comments that became objects.`);
1326
+ }
1327
+ if (simple && lastSimple) {
1328
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
1329
+ } else {
1330
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
1331
+ }
1332
+ lastSimple = simple;
1333
+ }
1334
+ }
1335
+ };
1336
+ walk(children);
1337
+ if (vnodeData) {
1338
+ if (BUILD.isDev && nodeName === "input") {
1339
+ validateInputProperties(vnodeData);
1340
+ }
1341
+ if (BUILD.vdomKey && vnodeData.key) {
1342
+ key = vnodeData.key;
1343
+ }
1344
+ if (BUILD.slotRelocation && vnodeData.name) {
1345
+ slotName = vnodeData.name;
1346
+ }
1347
+ if (BUILD.vdomClass) {
1348
+ const classData = vnodeData.className || vnodeData.class;
1349
+ if (classData) {
1350
+ vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
1351
+ }
1352
+ }
1353
+ }
1354
+ if (BUILD.isDev && vNodeChildren.some(isHost)) {
1355
+ consoleDevError(`The <Host> must be the single root component. Make sure:
1356
+ - You are NOT using hostData() and <Host> in the same component.
1357
+ - <Host> is used once, and it's the single root component of the render() function.`);
1358
+ }
1359
+ if (BUILD.vdomFunctional && typeof nodeName === "function") {
1360
+ return nodeName(
1361
+ vnodeData === null ? {} : vnodeData,
1362
+ vNodeChildren,
1363
+ vdomFnUtils
1364
+ );
1365
+ }
1366
+ const vnode = newVNode(nodeName, null);
1367
+ vnode.$attrs$ = vnodeData;
1368
+ if (vNodeChildren.length > 0) {
1369
+ vnode.$children$ = vNodeChildren;
1370
+ }
1371
+ if (BUILD.vdomKey) {
1372
+ vnode.$key$ = key;
1373
+ }
1374
+ if (BUILD.slotRelocation) {
1375
+ vnode.$name$ = slotName;
1376
+ }
1377
+ return vnode;
1378
+ };
1379
+ var newVNode = (tag, text) => {
1380
+ const vnode = {
1381
+ $flags$: 0,
1382
+ $tag$: tag,
1383
+ $text$: text,
1384
+ $elm$: null,
1385
+ $children$: null
1386
+ };
1387
+ if (BUILD.vdomAttribute) {
1388
+ vnode.$attrs$ = null;
1389
+ }
1390
+ if (BUILD.vdomKey) {
1391
+ vnode.$key$ = null;
1392
+ }
1393
+ if (BUILD.slotRelocation) {
1394
+ vnode.$name$ = null;
1395
+ }
1396
+ return vnode;
1397
+ };
1398
+ var Host = {};
1399
+ var isHost = (node) => node && node.$tag$ === Host;
1400
+ var vdomFnUtils = {
1401
+ forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
1402
+ map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
1403
+ };
1404
+ var convertToPublic = (node) => ({
1405
+ vattrs: node.$attrs$,
1406
+ vchildren: node.$children$,
1407
+ vkey: node.$key$,
1408
+ vname: node.$name$,
1409
+ vtag: node.$tag$,
1410
+ vtext: node.$text$
1411
+ });
1412
+ var convertToPrivate = (node) => {
1413
+ if (typeof node.vtag === "function") {
1414
+ const vnodeData = { ...node.vattrs };
1415
+ if (node.vkey) {
1416
+ vnodeData.key = node.vkey;
1417
+ }
1418
+ if (node.vname) {
1419
+ vnodeData.name = node.vname;
1420
+ }
1421
+ return h(node.vtag, vnodeData, ...node.vchildren || []);
1422
+ }
1423
+ const vnode = newVNode(node.vtag, node.vtext);
1424
+ vnode.$attrs$ = node.vattrs;
1425
+ vnode.$children$ = node.vchildren;
1426
+ vnode.$key$ = node.vkey;
1427
+ vnode.$name$ = node.vname;
1428
+ return vnode;
1429
+ };
1430
+ var validateInputProperties = (inputElm) => {
1431
+ const props = Object.keys(inputElm);
1432
+ const value = props.indexOf("value");
1433
+ if (value === -1) {
1434
+ return;
1435
+ }
1436
+ const typeIndex = props.indexOf("type");
1437
+ const minIndex = props.indexOf("min");
1438
+ const maxIndex = props.indexOf("max");
1439
+ const stepIndex = props.indexOf("step");
1440
+ if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) {
1441
+ consoleDevWarn(`The "value" prop of <input> should be set after "min", "max", "type" and "step"`);
1442
+ }
1443
+ };
1444
+
1445
+ // src/runtime/client-hydrate.ts
1446
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1447
+ const endHydrate = createTime("hydrateClient", tagName);
1448
+ const shadowRoot = hostElm.shadowRoot;
1449
+ const childRenderNodes = [];
1450
+ const slotNodes = [];
1451
+ const slottedNodes = [];
1452
+ const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;
1453
+ const vnode = newVNode(tagName, null);
1454
+ vnode.$elm$ = hostElm;
1455
+ let scopeId2;
1456
+ if (BUILD.scoped) {
1457
+ const cmpMeta = hostRef.$cmpMeta$;
1458
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1459
+ scopeId2 = hostElm["s-sc"];
1460
+ hostElm.classList.add(scopeId2 + "-h");
1461
+ } else if (hostElm["s-sc"]) {
1462
+ delete hostElm["s-sc"];
1463
+ }
1464
+ }
1465
+ if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
1466
+ initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1467
+ }
1468
+ hostElm[HYDRATE_ID] = hostId;
1469
+ hostElm.removeAttribute(HYDRATE_ID);
1470
+ hostRef.$vnode$ = clientHydrate(
1471
+ vnode,
1472
+ childRenderNodes,
1473
+ slotNodes,
1474
+ shadowRootNodes,
1475
+ hostElm,
1476
+ hostElm,
1477
+ hostId,
1478
+ slottedNodes
1479
+ );
1480
+ let crIndex = 0;
1481
+ const crLength = childRenderNodes.length;
1482
+ let childRenderNode;
1483
+ for (crIndex; crIndex < crLength; crIndex++) {
1484
+ childRenderNode = childRenderNodes[crIndex];
1485
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
1486
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1487
+ const node = childRenderNode.$elm$;
1488
+ if (!shadowRoot) {
1489
+ node["s-hn"] = tagName.toUpperCase();
1490
+ if (childRenderNode.$tag$ === "slot") {
1491
+ node["s-cr"] = hostElm["s-cr"];
1492
+ }
1493
+ }
1494
+ if (childRenderNode.$tag$ === "slot") {
1495
+ childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
1496
+ if (childRenderNode.$children$) {
1497
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1498
+ if (!childRenderNode.$elm$.childNodes.length) {
1499
+ childRenderNode.$children$.forEach((c) => {
1500
+ childRenderNode.$elm$.appendChild(c.$elm$);
1501
+ });
1502
+ }
1503
+ } else {
1504
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1505
+ }
1506
+ }
1507
+ if (orgLocationNode && orgLocationNode.isConnected) {
1508
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1509
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1510
+ }
1511
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1512
+ if (!shadowRoot) {
1513
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1514
+ }
1515
+ }
1516
+ plt.$orgLocNodes$.delete(orgLocationId);
1517
+ }
1518
+ const hosts = [];
1519
+ const snLen = slottedNodes.length;
1520
+ let snIndex = 0;
1521
+ let slotGroup;
1522
+ let snGroupIdx;
1523
+ let snGroupLen;
1524
+ let slottedItem;
1525
+ for (snIndex; snIndex < snLen; snIndex++) {
1526
+ slotGroup = slottedNodes[snIndex];
1527
+ if (!slotGroup || !slotGroup.length) continue;
1528
+ snGroupLen = slotGroup.length;
1529
+ snGroupIdx = 0;
1530
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1531
+ slottedItem = slotGroup[snGroupIdx];
1532
+ if (!hosts[slottedItem.hostId]) {
1533
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1534
+ }
1535
+ if (!hosts[slottedItem.hostId]) continue;
1536
+ const hostEle = hosts[slottedItem.hostId];
1537
+ if (!hostEle.shadowRoot || !shadowRoot) {
1538
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1539
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1540
+ slottedItem.slot["s-cr"] = hostEle;
1541
+ } else {
1542
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1543
+ }
1544
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1545
+ if (BUILD.experimentalSlotFixes) {
1546
+ patchSlottedNode(slottedItem.node);
1547
+ }
1548
+ }
1549
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1550
+ hostEle.appendChild(slottedItem.node);
1551
+ }
1552
+ }
1553
+ }
1554
+ if (BUILD.scoped && scopeId2 && slotNodes.length) {
1555
+ slotNodes.forEach((slot) => {
1556
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1557
+ });
1558
+ }
1559
+ if (BUILD.shadowDom && shadowRoot && !shadowRoot.childNodes.length) {
1560
+ let rnIdex = 0;
1561
+ const rnLen = shadowRootNodes.length;
1562
+ if (rnLen) {
1563
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1564
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1565
+ }
1566
+ Array.from(hostElm.childNodes).forEach((node) => {
1567
+ if (typeof node["s-sn"] !== "string") {
1568
+ if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
1569
+ node.removeAttribute("hidden");
1570
+ } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1571
+ node.parentNode.removeChild(node);
1572
+ }
1573
+ }
1574
+ });
1575
+ }
1576
+ }
1577
+ plt.$orgLocNodes$.delete(hostElm["s-id"]);
1578
+ hostRef.$hostElement$ = hostElm;
1579
+ endHydrate();
1580
+ };
1581
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
1582
+ let childNodeType;
1583
+ let childIdSplt;
1584
+ let childVNode;
1585
+ let i2;
1586
+ const scopeId2 = hostElm["s-sc"];
1587
+ if (node.nodeType === 1 /* ElementNode */) {
1588
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1589
+ if (childNodeType) {
1590
+ childIdSplt = childNodeType.split(".");
1591
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1592
+ childVNode = createSimpleVNode({
1593
+ $flags$: 0,
1594
+ $hostId$: childIdSplt[0],
1595
+ $nodeId$: childIdSplt[1],
1596
+ $depth$: childIdSplt[2],
1597
+ $index$: childIdSplt[3],
1598
+ $tag$: node.tagName.toLowerCase(),
1599
+ $elm$: node,
1600
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1601
+ // won't try to reconcile them. Classes set on the node will be blown away.
1602
+ $attrs$: { class: node.className || "" }
1603
+ });
1604
+ childRenderNodes.push(childVNode);
1605
+ node.removeAttribute(HYDRATE_CHILD_ID);
1606
+ if (!parentVNode.$children$) {
1607
+ parentVNode.$children$ = [];
1608
+ }
1609
+ if (BUILD.scoped && scopeId2) {
1610
+ node["s-si"] = scopeId2;
1611
+ childVNode.$attrs$.class += " " + scopeId2;
1612
+ }
1613
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1614
+ if (typeof slotName === "string") {
1615
+ if (childVNode.$tag$ === "slot-fb") {
1616
+ addSlot(
1617
+ slotName,
1618
+ childIdSplt[2],
1619
+ childVNode,
1620
+ node,
1621
+ parentVNode,
1622
+ childRenderNodes,
1623
+ slotNodes,
1624
+ shadowRootNodes,
1625
+ slottedNodes
1626
+ );
1627
+ if (BUILD.scoped && scopeId2) {
1628
+ node.classList.add(scopeId2);
1629
+ }
1630
+ }
1631
+ childVNode.$elm$["s-sn"] = slotName;
1632
+ childVNode.$elm$.removeAttribute("s-sn");
1633
+ }
1634
+ if (childVNode.$index$ !== void 0) {
1635
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1636
+ }
1637
+ parentVNode = childVNode;
1638
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1639
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1640
+ }
1641
+ }
1642
+ }
1643
+ if (node.shadowRoot) {
1644
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1645
+ clientHydrate(
1646
+ parentVNode,
1647
+ childRenderNodes,
1648
+ slotNodes,
1649
+ shadowRootNodes,
1650
+ hostElm,
1651
+ node.shadowRoot.childNodes[i2],
1652
+ hostId,
1653
+ slottedNodes
1654
+ );
1655
+ }
1656
+ }
1657
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1658
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1659
+ clientHydrate(
1660
+ parentVNode,
1661
+ childRenderNodes,
1662
+ slotNodes,
1663
+ shadowRootNodes,
1664
+ hostElm,
1665
+ nonShadowNodes[i2],
1666
+ hostId,
1667
+ slottedNodes
1668
+ );
1669
+ }
1670
+ } else if (node.nodeType === 8 /* CommentNode */) {
1671
+ childIdSplt = node.nodeValue.split(".");
1672
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1673
+ childNodeType = childIdSplt[0];
1674
+ childVNode = createSimpleVNode({
1675
+ $hostId$: childIdSplt[1],
1676
+ $nodeId$: childIdSplt[2],
1677
+ $depth$: childIdSplt[3],
1678
+ $index$: childIdSplt[4] || "0",
1679
+ $elm$: node,
1680
+ $attrs$: null,
1681
+ $children$: null,
1682
+ $key$: null,
1683
+ $name$: null,
1684
+ $tag$: null,
1685
+ $text$: null
1686
+ });
1687
+ if (childNodeType === TEXT_NODE_ID) {
1688
+ childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
1689
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1690
+ childVNode.$text$ = childVNode.$elm$.textContent;
1691
+ childRenderNodes.push(childVNode);
1692
+ node.remove();
1693
+ if (hostId === childVNode.$hostId$) {
1694
+ if (!parentVNode.$children$) {
1695
+ parentVNode.$children$ = [];
1696
+ }
1697
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1698
+ }
1699
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1700
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1701
+ }
1702
+ }
1703
+ } else if (childNodeType === COMMENT_NODE_ID) {
1704
+ childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
1705
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1706
+ childRenderNodes.push(childVNode);
1707
+ node.remove();
1708
+ }
1709
+ } else if (childVNode.$hostId$ === hostId) {
1710
+ if (childNodeType === SLOT_NODE_ID) {
1711
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1712
+ addSlot(
1713
+ slotName,
1714
+ childIdSplt[2],
1715
+ childVNode,
1716
+ node,
1717
+ parentVNode,
1718
+ childRenderNodes,
1719
+ slotNodes,
1720
+ shadowRootNodes,
1721
+ slottedNodes
1722
+ );
1723
+ } else if (childNodeType === CONTENT_REF_ID) {
1724
+ if (BUILD.shadowDom && shadowRootNodes) {
1725
+ node.remove();
1726
+ } else if (BUILD.slotRelocation) {
1727
+ hostElm["s-cr"] = node;
1728
+ node["s-cn"] = true;
1729
+ }
1730
+ }
1731
+ }
1732
+ }
1733
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
1734
+ const vnode = newVNode(null, node.textContent);
1735
+ vnode.$elm$ = node;
1736
+ vnode.$index$ = "0";
1737
+ parentVNode.$children$ = [vnode];
1738
+ } else {
1739
+ if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1740
+ node.remove();
1741
+ }
1742
+ }
1743
+ return parentVNode;
1744
+ };
1745
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
1746
+ if (node.nodeType === 1 /* ElementNode */) {
1747
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1748
+ if (componentId) {
1749
+ orgLocNodes.set(componentId, node);
1750
+ }
1751
+ let i2 = 0;
1752
+ if (node.shadowRoot) {
1753
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1754
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1755
+ }
1756
+ }
1757
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1758
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1759
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1760
+ }
1761
+ } else if (node.nodeType === 8 /* CommentNode */) {
1762
+ const childIdSplt = node.nodeValue.split(".");
1763
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
1764
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1765
+ node.nodeValue = "";
1766
+ node["s-en"] = childIdSplt[3];
1767
+ }
1768
+ }
1769
+ };
1770
+ var createSimpleVNode = (vnode) => {
1771
+ const defaultVNode = {
1772
+ $flags$: 0,
1773
+ $hostId$: null,
1774
+ $nodeId$: null,
1775
+ $depth$: null,
1776
+ $index$: "0",
1777
+ $elm$: null,
1778
+ $attrs$: null,
1779
+ $children$: null,
1780
+ $key$: null,
1781
+ $name$: null,
1782
+ $tag$: null,
1783
+ $text$: null
1784
+ };
1785
+ return { ...defaultVNode, ...vnode };
1786
+ };
1787
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1788
+ node["s-sr"] = true;
1789
+ childVNode.$name$ = slotName || null;
1790
+ childVNode.$tag$ = "slot";
1791
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1792
+ if (BUILD.shadowDom && shadowRootNodes && win.document) {
1793
+ const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1794
+ if (childVNode.$name$) {
1795
+ childVNode.$elm$.setAttribute("name", slotName);
1796
+ }
1797
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1798
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1799
+ } else {
1800
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1801
+ }
1802
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1803
+ node.remove();
1804
+ if (childVNode.$depth$ === "0") {
1805
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1806
+ }
1807
+ } else {
1808
+ const slot = childVNode.$elm$;
1809
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1810
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1811
+ patchSlotNode(node);
1812
+ if (shouldMove) {
1813
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1814
+ }
1815
+ childRenderNodes.push(childVNode);
1816
+ }
1817
+ slotNodes.push(childVNode);
1818
+ if (!parentVNode.$children$) {
1819
+ parentVNode.$children$ = [];
1820
+ }
1821
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1822
+ }
1823
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1824
+ let slottedNode = slotNode.nextSibling;
1825
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1826
+ while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
1827
+ slottedNode["s-sn"] = slotName;
1828
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1829
+ slottedNode = slottedNode.nextSibling;
1830
+ }
1831
+ };
1832
+ var findCorrespondingNode = (node, type) => {
1833
+ let sibling = node;
1834
+ do {
1835
+ sibling = sibling.nextSibling;
1836
+ } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
1837
+ return sibling;
1838
+ };
1839
+
1840
+ // src/utils/shadow-css.ts
1841
+ /**
1842
+ * @license
1843
+ * Copyright Google Inc. All Rights Reserved.
1844
+ *
1845
+ * Use of this source code is governed by an MIT-style license that can be
1846
+ * found in the LICENSE file at https://angular.io/license
1847
+ *
1848
+ * This file is a port of shadowCSS from `webcomponents.js` to TypeScript.
1849
+ * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
1850
+ * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
1851
+ */
1852
+ var safeSelector = (selector) => {
1853
+ const placeholders = [];
1854
+ let index = 0;
1855
+ selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
1856
+ const replaceBy = `__ph-${index}__`;
1857
+ placeholders.push(keep);
1858
+ index++;
1859
+ return replaceBy;
1860
+ });
1861
+ const content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
1862
+ const replaceBy = `__ph-${index}__`;
1863
+ placeholders.push(exp);
1864
+ index++;
1865
+ return pseudo + replaceBy;
1866
+ });
1867
+ const ss = {
1868
+ content,
1869
+ placeholders
1870
+ };
1871
+ return ss;
1872
+ };
1873
+ var restoreSafeSelector = (placeholders, content) => {
1874
+ return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
1875
+ };
1876
+ var _polyfillHost = "-shadowcsshost";
1877
+ var _polyfillSlotted = "-shadowcssslotted";
1878
+ var _polyfillHostContext = "-shadowcsscontext";
1879
+ var _parenSuffix = ")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";
1880
+ var _cssColonHostRe = new RegExp("(" + _polyfillHost + _parenSuffix, "gim");
1881
+ var _cssColonHostContextRe = new RegExp("(" + _polyfillHostContext + _parenSuffix, "gim");
1882
+ var _cssColonSlottedRe = new RegExp("(" + _polyfillSlotted + _parenSuffix, "gim");
1883
+ var _polyfillHostNoCombinator = _polyfillHost + "-no-combinator";
1884
+ var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
1885
+ var _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
1886
+ var _selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$";
1887
+ var _polyfillHostRe = /-shadowcsshost/gim;
1888
+ var createSupportsRuleRe = (selector) => new RegExp(`((?<!(^@supports(.*)))|(?<={.*))(${selector}\\b)`, "gim");
1889
+ var _colonSlottedRe = createSupportsRuleRe("::slotted");
1890
+ var _colonHostRe = createSupportsRuleRe(":host");
1891
+ var _colonHostContextRe = createSupportsRuleRe(":host-context");
1892
+ var _commentRe = /\/\*\s*[\s\S]*?\*\//g;
1893
+ var stripComments = (input) => {
1894
+ return input.replace(_commentRe, "");
1895
+ };
1896
+ var _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
1897
+ var extractCommentsWithHash = (input) => {
1898
+ return input.match(_commentWithHashRe) || [];
1899
+ };
1900
+ var _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
1901
+ var _curlyRe = /([{}])/g;
1902
+ var _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
1903
+ var OPEN_CURLY = "{";
1904
+ var CLOSE_CURLY = "}";
1905
+ var BLOCK_PLACEHOLDER = "%BLOCK%";
1906
+ var processRules = (input, ruleCallback) => {
1907
+ const inputWithEscapedBlocks = escapeBlocks(input);
1908
+ let nextBlockIndex = 0;
1909
+ return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
1910
+ const selector = m[2];
1911
+ let content = "";
1912
+ let suffix = m[4];
1913
+ let contentPrefix = "";
1914
+ if (suffix && suffix.startsWith("{" + BLOCK_PLACEHOLDER)) {
1915
+ content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
1916
+ suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
1917
+ contentPrefix = "{";
1918
+ }
1919
+ const cssRule = {
1920
+ selector,
1921
+ content
1922
+ };
1923
+ const rule = ruleCallback(cssRule);
1924
+ return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
1925
+ });
1926
+ };
1927
+ var escapeBlocks = (input) => {
1928
+ const inputParts = input.split(_curlyRe);
1929
+ const resultParts = [];
1930
+ const escapedBlocks = [];
1931
+ let bracketCount = 0;
1932
+ let currentBlockParts = [];
1933
+ for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
1934
+ const part = inputParts[partIndex];
1935
+ if (part === CLOSE_CURLY) {
1936
+ bracketCount--;
1937
+ }
1938
+ if (bracketCount > 0) {
1939
+ currentBlockParts.push(part);
1940
+ } else {
1941
+ if (currentBlockParts.length > 0) {
1942
+ escapedBlocks.push(currentBlockParts.join(""));
1943
+ resultParts.push(BLOCK_PLACEHOLDER);
1944
+ currentBlockParts = [];
1945
+ }
1946
+ resultParts.push(part);
1947
+ }
1948
+ if (part === OPEN_CURLY) {
1949
+ bracketCount++;
1950
+ }
1951
+ }
1952
+ if (currentBlockParts.length > 0) {
1953
+ escapedBlocks.push(currentBlockParts.join(""));
1954
+ resultParts.push(BLOCK_PLACEHOLDER);
1955
+ }
1956
+ const strEscapedBlocks = {
1957
+ escapedString: resultParts.join(""),
1958
+ blocks: escapedBlocks
1959
+ };
1960
+ return strEscapedBlocks;
1961
+ };
1962
+ var insertPolyfillHostInCssText = (cssText) => {
1963
+ cssText = cssText.replace(_colonHostContextRe, `$1${_polyfillHostContext}`).replace(_colonHostRe, `$1${_polyfillHost}`).replace(_colonSlottedRe, `$1${_polyfillSlotted}`);
1964
+ return cssText;
1965
+ };
1966
+ var convertColonRule = (cssText, regExp, partReplacer) => {
1967
+ return cssText.replace(regExp, (...m) => {
1968
+ if (m[2]) {
1969
+ const parts = m[2].split(",");
1970
+ const r = [];
1971
+ for (let i2 = 0; i2 < parts.length; i2++) {
1972
+ const p = parts[i2].trim();
1973
+ if (!p) break;
1974
+ r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
1975
+ }
1976
+ return r.join(",");
1977
+ } else {
1978
+ return _polyfillHostNoCombinator + m[3];
1979
+ }
1980
+ });
1981
+ };
1982
+ var colonHostPartReplacer = (host, part, suffix) => {
1983
+ return host + part.replace(_polyfillHost, "") + suffix;
1984
+ };
1985
+ var convertColonHost = (cssText) => {
1986
+ return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
1987
+ };
1988
+ var colonHostContextPartReplacer = (host, part, suffix) => {
1989
+ if (part.indexOf(_polyfillHost) > -1) {
1990
+ return colonHostPartReplacer(host, part, suffix);
1991
+ } else {
1992
+ return host + part + suffix + ", " + part + " " + host + suffix;
1993
+ }
1994
+ };
1995
+ var convertColonSlotted = (cssText, slotScopeId) => {
1996
+ const slotClass = "." + slotScopeId + " > ";
1997
+ const selectors = [];
1998
+ cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
1999
+ if (m[2]) {
2000
+ const compound = m[2].trim();
2001
+ const suffix = m[3];
2002
+ const slottedSelector = slotClass + compound + suffix;
2003
+ let prefixSelector = "";
2004
+ for (let i2 = m[4] - 1; i2 >= 0; i2--) {
2005
+ const char = m[5][i2];
2006
+ if (char === "}" || char === ",") {
2007
+ break;
2008
+ }
2009
+ prefixSelector = char + prefixSelector;
2010
+ }
2011
+ const orgSelector = (prefixSelector + slottedSelector).trim();
2012
+ const addedSelector = `${prefixSelector.trimEnd()}${slottedSelector.trim()}`.trim();
2013
+ if (orgSelector !== addedSelector) {
2014
+ const updatedSelector = `${addedSelector}, ${orgSelector}`;
2015
+ selectors.push({
2016
+ orgSelector,
2017
+ updatedSelector
2018
+ });
2019
+ }
2020
+ return slottedSelector;
2021
+ } else {
2022
+ return _polyfillHostNoCombinator + m[3];
2023
+ }
2024
+ });
2025
+ return {
2026
+ selectors,
2027
+ cssText
2028
+ };
2029
+ };
2030
+ var convertColonHostContext = (cssText) => {
2031
+ return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
2032
+ };
2033
+ var convertShadowDOMSelectors = (cssText) => {
2034
+ return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, " "), cssText);
2035
+ };
2036
+ var makeScopeMatcher = (scopeSelector2) => {
2037
+ const lre = /\[/g;
2038
+ const rre = /\]/g;
2039
+ scopeSelector2 = scopeSelector2.replace(lre, "\\[").replace(rre, "\\]");
2040
+ return new RegExp("^(" + scopeSelector2 + ")" + _selectorReSuffix, "m");
2041
+ };
2042
+ var selectorNeedsScoping = (selector, scopeSelector2) => {
2043
+ const re = makeScopeMatcher(scopeSelector2);
2044
+ return !re.test(selector);
2045
+ };
2046
+ var injectScopingSelector = (selector, scopingSelector) => {
2047
+ return selector.replace(_selectorPartsRe, (_, before = "", _colonGroup, colon = "", after = "") => {
2048
+ return before + scopingSelector + colon + after;
2049
+ });
2050
+ };
2051
+ var applySimpleSelectorScope = (selector, scopeSelector2, hostSelector) => {
2052
+ _polyfillHostRe.lastIndex = 0;
2053
+ if (_polyfillHostRe.test(selector)) {
2054
+ const replaceBy = `.${hostSelector}`;
2055
+ return selector.replace(_polyfillHostNoCombinatorRe, (_, selector2) => injectScopingSelector(selector2, replaceBy)).replace(_polyfillHostRe, replaceBy + " ");
2056
+ }
2057
+ return scopeSelector2 + " " + selector;
2058
+ };
2059
+ var applyStrictSelectorScope = (selector, scopeSelector2, hostSelector) => {
2060
+ const isRe = /\[is=([^\]]*)\]/g;
2061
+ scopeSelector2 = scopeSelector2.replace(isRe, (_, ...parts) => parts[0]);
2062
+ const className = "." + scopeSelector2;
2063
+ const _scopeSelectorPart = (p) => {
2064
+ let scopedP = p.trim();
2065
+ if (!scopedP) {
2066
+ return "";
2067
+ }
2068
+ if (p.indexOf(_polyfillHostNoCombinator) > -1) {
2069
+ scopedP = applySimpleSelectorScope(p, scopeSelector2, hostSelector);
2070
+ } else {
2071
+ const t = p.replace(_polyfillHostRe, "");
2072
+ if (t.length > 0) {
2073
+ scopedP = injectScopingSelector(t, className);
2074
+ }
2075
+ }
2076
+ return scopedP;
2077
+ };
2078
+ const safeContent = safeSelector(selector);
2079
+ selector = safeContent.content;
2080
+ let scopedSelector = "";
2081
+ let startIndex = 0;
2082
+ let res;
2083
+ const sep = /( |>|\+|~(?!=))\s*/g;
2084
+ const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
2085
+ let shouldScope = !hasHost;
2086
+ while ((res = sep.exec(selector)) !== null) {
2087
+ const separator = res[1];
2088
+ const part2 = selector.slice(startIndex, res.index).trim();
2089
+ shouldScope = shouldScope || part2.indexOf(_polyfillHostNoCombinator) > -1;
2090
+ const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
2091
+ scopedSelector += `${scopedPart} ${separator} `;
2092
+ startIndex = sep.lastIndex;
2093
+ }
2094
+ const part = selector.substring(startIndex);
2095
+ shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
2096
+ scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
2097
+ return restoreSafeSelector(safeContent.placeholders, scopedSelector);
2098
+ };
2099
+ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
2100
+ return selector.split(",").map((shallowPart) => {
2101
+ if (slotSelector && shallowPart.indexOf("." + slotSelector) > -1) {
2102
+ return shallowPart.trim();
2103
+ }
2104
+ if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
2105
+ return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
2106
+ } else {
2107
+ return shallowPart.trim();
2108
+ }
2109
+ }).join(", ");
2110
+ };
2111
+ var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
2112
+ return processRules(cssText, (rule) => {
2113
+ let selector = rule.selector;
2114
+ let content = rule.content;
2115
+ if (rule.selector[0] !== "@") {
2116
+ selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
2117
+ } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
2118
+ content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
2119
+ }
2120
+ const cssRule = {
2121
+ selector: selector.replace(/\s{2,}/g, " ").trim(),
2122
+ content
2123
+ };
2124
+ return cssRule;
2125
+ });
2126
+ };
2127
+ var scopeCssText = (cssText, scopeId2, hostScopeId, slotScopeId, commentOriginalSelector) => {
2128
+ cssText = insertPolyfillHostInCssText(cssText);
2129
+ cssText = convertColonHost(cssText);
2130
+ cssText = convertColonHostContext(cssText);
2131
+ const slotted = convertColonSlotted(cssText, slotScopeId);
2132
+ cssText = slotted.cssText;
2133
+ cssText = convertShadowDOMSelectors(cssText);
2134
+ if (scopeId2) {
2135
+ cssText = scopeSelectors(cssText, scopeId2, hostScopeId, slotScopeId);
2136
+ }
2137
+ cssText = replaceShadowCssHost(cssText, hostScopeId);
2138
+ cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, " $1 ");
2139
+ return {
2140
+ cssText: cssText.trim(),
2141
+ // We need to replace the shadow CSS host string in each of these selectors since we created
2142
+ // them prior to the replacement happening in the components CSS text.
2143
+ slottedSelectors: slotted.selectors.map((ref) => ({
2144
+ orgSelector: replaceShadowCssHost(ref.orgSelector, hostScopeId),
2145
+ updatedSelector: replaceShadowCssHost(ref.updatedSelector, hostScopeId)
2146
+ }))
2147
+ };
2148
+ };
2149
+ var replaceShadowCssHost = (cssText, hostScopeId) => {
2150
+ return cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
2151
+ };
2152
+ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
2153
+ const hostScopeId = scopeId2 + "-h";
2154
+ const slotScopeId = scopeId2 + "-s";
2155
+ const commentsWithHash = extractCommentsWithHash(cssText);
2156
+ cssText = stripComments(cssText);
2157
+ const orgSelectors = [];
2158
+ if (commentOriginalSelector) {
2159
+ const processCommentedSelector = (rule) => {
2160
+ const placeholder = `/*!@___${orgSelectors.length}___*/`;
2161
+ const comment = `/*!@${rule.selector}*/`;
2162
+ orgSelectors.push({ placeholder, comment });
2163
+ rule.selector = placeholder + rule.selector;
2164
+ return rule;
2165
+ };
2166
+ cssText = processRules(cssText, (rule) => {
2167
+ if (rule.selector[0] !== "@") {
2168
+ return processCommentedSelector(rule);
2169
+ } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
2170
+ rule.content = processRules(rule.content, processCommentedSelector);
2171
+ return rule;
2172
+ }
2173
+ return rule;
2174
+ });
2175
+ }
2176
+ const scoped = scopeCssText(cssText, scopeId2, hostScopeId, slotScopeId);
2177
+ cssText = [scoped.cssText, ...commentsWithHash].join("\n");
2178
+ if (commentOriginalSelector) {
2179
+ orgSelectors.forEach(({ placeholder, comment }) => {
2180
+ cssText = cssText.replace(placeholder, comment);
2181
+ });
2182
+ }
2183
+ scoped.slottedSelectors.forEach((slottedSelector) => {
2184
+ const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector), "g");
2185
+ cssText = cssText.replace(regex, slottedSelector.updatedSelector);
2186
+ });
2187
+ return cssText;
2188
+ };
2189
+
2190
+ // src/runtime/mode.ts
2191
+ var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
2192
+ var setMode = (handler) => modeResolutionChain.push(handler);
2193
+ var getMode = (ref) => getHostRef(ref).$modeName$;
2194
+ var parsePropertyValue = (propValue, propType) => {
2195
+ if (propValue != null && !isComplexType(propValue)) {
2196
+ if (BUILD.propBoolean && propType & 4 /* Boolean */) {
2197
+ return propValue === "false" ? false : propValue === "" || !!propValue;
2198
+ }
2199
+ if (BUILD.propNumber && propType & 2 /* Number */) {
2200
+ return parseFloat(propValue);
2201
+ }
2202
+ if (BUILD.propString && propType & 1 /* String */) {
2203
+ return String(propValue);
2204
+ }
2205
+ return propValue;
2206
+ }
2207
+ return propValue;
2208
+ };
2209
+ var getElement = (ref) => BUILD.lazyLoad ? getHostRef(ref).$hostElement$ : ref;
2210
+
2211
+ // src/runtime/event-emitter.ts
2212
+ var createEvent = (ref, name, flags) => {
2213
+ const elm = getElement(ref);
2214
+ return {
2215
+ emit: (detail) => {
2216
+ if (BUILD.isDev && !elm.isConnected) {
2217
+ consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
2218
+ }
2219
+ return emitEvent(elm, name, {
2220
+ bubbles: !!(flags & 4 /* Bubbles */),
2221
+ composed: !!(flags & 2 /* Composed */),
2222
+ cancelable: !!(flags & 1 /* Cancellable */),
2223
+ detail
2224
+ });
2225
+ }
2226
+ };
2227
+ };
2228
+ var emitEvent = (elm, name, opts) => {
2229
+ const ev = plt.ce(name, opts);
2230
+ elm.dispatchEvent(ev);
2231
+ return ev;
2232
+ };
2233
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2234
+ var registerStyle = (scopeId2, cssText, allowCS) => {
2235
+ let style = styles.get(scopeId2);
2236
+ if (supportsConstructableStylesheets && allowCS) {
2237
+ style = style || new CSSStyleSheet();
2238
+ if (typeof style === "string") {
2239
+ style = cssText;
2240
+ } else {
2241
+ style.replaceSync(cssText);
2242
+ }
2243
+ } else {
2244
+ style = cssText;
2245
+ }
2246
+ styles.set(scopeId2, style);
2247
+ };
2248
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2249
+ var _a;
2250
+ const scopeId2 = getScopeId(cmpMeta, mode);
2251
+ const style = styles.get(scopeId2);
2252
+ if (!BUILD.attachStyles || !win.document) {
2253
+ return scopeId2;
2254
+ }
2255
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
2256
+ if (style) {
2257
+ if (typeof style === "string") {
2258
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
2259
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
2260
+ let styleElm;
2261
+ if (!appliedStyles) {
2262
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2263
+ }
2264
+ if (!appliedStyles.has(scopeId2)) {
2265
+ if (BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
2266
+ styleElm.innerHTML = style;
2267
+ } else {
2268
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
2269
+ styleElm.innerHTML = style;
2270
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2271
+ if (nonce != null) {
2272
+ styleElm.setAttribute("nonce", nonce);
2273
+ }
2274
+ if ((BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
2275
+ styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
2276
+ }
2277
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
2278
+ if (styleContainerNode.nodeName === "HEAD") {
2279
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
2280
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
2281
+ styleContainerNode.insertBefore(
2282
+ styleElm,
2283
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
2284
+ );
2285
+ } else if ("host" in styleContainerNode) {
2286
+ if (supportsConstructableStylesheets) {
2287
+ const stylesheet = new CSSStyleSheet();
2288
+ stylesheet.replaceSync(style);
2289
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
2290
+ } else {
2291
+ const existingStyleContainer = styleContainerNode.querySelector("style");
2292
+ if (existingStyleContainer) {
2293
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
2294
+ } else {
2295
+ styleContainerNode.prepend(styleElm);
2296
+ }
2297
+ }
2298
+ } else {
2299
+ styleContainerNode.append(styleElm);
2300
+ }
2301
+ }
2302
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2303
+ styleContainerNode.insertBefore(styleElm, null);
2304
+ }
2305
+ }
2306
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2307
+ styleElm.innerHTML += SLOT_FB_CSS;
2308
+ }
2309
+ if (appliedStyles) {
2310
+ appliedStyles.add(scopeId2);
2311
+ }
2312
+ }
2313
+ } else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
2314
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
2315
+ }
2316
+ }
2317
+ return scopeId2;
2318
+ };
2319
+ var attachStyles = (hostRef) => {
2320
+ const cmpMeta = hostRef.$cmpMeta$;
2321
+ const elm = hostRef.$hostElement$;
2322
+ const flags = cmpMeta.$flags$;
2323
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2324
+ const scopeId2 = addStyle(
2325
+ BUILD.shadowDom && supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2326
+ cmpMeta,
2327
+ hostRef.$modeName$
2328
+ );
2329
+ if ((BUILD.shadowDom || BUILD.scoped) && BUILD.cssAnnotations && (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
2330
+ elm["s-sc"] = scopeId2;
2331
+ elm.classList.add(scopeId2 + "-h");
2332
+ }
2333
+ endAttachStyles();
2334
+ };
2335
+ var getScopeId = (cmp, mode) => "sc-" + (BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
2336
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
2337
+ var hydrateScopedToShadow = () => {
2338
+ if (!win.document) {
2339
+ return;
2340
+ }
2341
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2342
+ let i2 = 0;
2343
+ for (; i2 < styles2.length; i2++) {
2344
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
2345
+ }
2346
+ };
2347
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
2348
+ if (oldValue === newValue) {
2349
+ return;
2350
+ }
2351
+ let isProp = isMemberInElement(elm, memberName);
2352
+ let ln = memberName.toLowerCase();
2353
+ if (BUILD.vdomClass && memberName === "class") {
2354
+ const classList = elm.classList;
2355
+ const oldClasses = parseClassList(oldValue);
2356
+ let newClasses = parseClassList(newValue);
2357
+ if (BUILD.hydrateClientSide && elm["s-si"] && initialRender) {
2358
+ newClasses.push(elm["s-si"]);
2359
+ oldClasses.forEach((c) => {
2360
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
2361
+ });
2362
+ newClasses = [...new Set(newClasses)];
2363
+ classList.add(...newClasses);
2364
+ } else {
2365
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
2366
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
2367
+ }
2368
+ } else if (BUILD.vdomStyle && memberName === "style") {
2369
+ if (BUILD.updatable) {
2370
+ for (const prop in oldValue) {
2371
+ if (!newValue || newValue[prop] == null) {
2372
+ if (!BUILD.hydrateServerSide && prop.includes("-")) {
2373
+ elm.style.removeProperty(prop);
2374
+ } else {
2375
+ elm.style[prop] = "";
2376
+ }
2377
+ }
2378
+ }
2379
+ }
2380
+ for (const prop in newValue) {
2381
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
2382
+ if (!BUILD.hydrateServerSide && prop.includes("-")) {
2383
+ elm.style.setProperty(prop, newValue[prop]);
2384
+ } else {
2385
+ elm.style[prop] = newValue[prop];
2386
+ }
2387
+ }
2388
+ }
2389
+ } else if (BUILD.vdomKey && memberName === "key") ; else if (BUILD.vdomRef && memberName === "ref") {
2390
+ if (newValue) {
2391
+ newValue(elm);
2392
+ }
2393
+ } else if (BUILD.vdomListener && (BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
2394
+ if (memberName[2] === "-") {
2395
+ memberName = memberName.slice(3);
2396
+ } else if (isMemberInElement(win, ln)) {
2397
+ memberName = ln.slice(2);
2398
+ } else {
2399
+ memberName = ln[2] + memberName.slice(3);
2400
+ }
2401
+ if (oldValue || newValue) {
2402
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
2403
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
2404
+ if (oldValue) {
2405
+ plt.rel(elm, memberName, oldValue, capture);
2406
+ }
2407
+ if (newValue) {
2408
+ plt.ael(elm, memberName, newValue, capture);
2409
+ }
2410
+ }
2411
+ } else if (BUILD.vdomPropOrAttr) {
2412
+ const isComplex = isComplexType(newValue);
2413
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
2414
+ try {
2415
+ if (!elm.tagName.includes("-")) {
2416
+ const n = newValue == null ? "" : newValue;
2417
+ if (memberName === "list") {
2418
+ isProp = false;
2419
+ } else if (oldValue == null || elm[memberName] != n) {
2420
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
2421
+ elm[memberName] = n;
2422
+ } else {
2423
+ elm.setAttribute(memberName, n);
2424
+ }
2425
+ }
2426
+ } else if (elm[memberName] !== newValue) {
2427
+ elm[memberName] = newValue;
2428
+ }
2429
+ } catch (e) {
2430
+ }
2431
+ }
2432
+ let xlink = false;
2433
+ if (BUILD.vdomXlink) {
2434
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
2435
+ memberName = ln;
2436
+ xlink = true;
2437
+ }
2438
+ }
2439
+ if (newValue == null || newValue === false) {
2440
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
2441
+ if (BUILD.vdomXlink && xlink) {
2442
+ elm.removeAttributeNS(XLINK_NS, memberName);
2443
+ } else {
2444
+ elm.removeAttribute(memberName);
2445
+ }
2446
+ }
2447
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
2448
+ newValue = newValue === true ? "" : newValue;
2449
+ if (BUILD.vdomXlink && xlink) {
2450
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
2451
+ } else {
2452
+ elm.setAttribute(memberName, newValue);
2453
+ }
2454
+ }
2455
+ }
2456
+ };
2457
+ var parseClassListRegex = /\s/;
2458
+ var parseClassList = (value) => {
2459
+ if (typeof value === "object" && value && "baseVal" in value) {
2460
+ value = value.baseVal;
2461
+ }
2462
+ if (!value || typeof value !== "string") {
2463
+ return [];
2464
+ }
2465
+ return value.split(parseClassListRegex);
2466
+ };
2467
+ var CAPTURE_EVENT_SUFFIX = "Capture";
2468
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
2469
+
2470
+ // src/runtime/vdom/update-element.ts
2471
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
2472
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
2473
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
2474
+ const newVnodeAttrs = newVnode.$attrs$ || {};
2475
+ if (BUILD.updatable) {
2476
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
2477
+ if (!(memberName in newVnodeAttrs)) {
2478
+ setAccessor(
2479
+ elm,
2480
+ memberName,
2481
+ oldVnodeAttrs[memberName],
2482
+ void 0,
2483
+ isSvgMode2,
2484
+ newVnode.$flags$,
2485
+ isInitialRender
2486
+ );
2487
+ }
2488
+ }
2489
+ }
2490
+ for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
2491
+ setAccessor(
2492
+ elm,
2493
+ memberName,
2494
+ oldVnodeAttrs[memberName],
2495
+ newVnodeAttrs[memberName],
2496
+ isSvgMode2,
2497
+ newVnode.$flags$,
2498
+ isInitialRender
2499
+ );
2500
+ }
2501
+ };
2502
+ function sortedAttrNames(attrNames) {
2503
+ return attrNames.includes("ref") ? (
2504
+ // we need to sort these to ensure that `'ref'` is the last attr
2505
+ [...attrNames.filter((attr) => attr !== "ref"), "ref"]
2506
+ ) : (
2507
+ // no need to sort, return the original array
2508
+ attrNames
2509
+ );
2510
+ }
2511
+
2512
+ // src/runtime/vdom/vdom-render.ts
2513
+ var scopeId;
2514
+ var contentRef;
2515
+ var hostTagName;
2516
+ var useNativeShadowDom = false;
2517
+ var checkSlotFallbackVisibility = false;
2518
+ var checkSlotRelocate = false;
2519
+ var isSvgMode = false;
2520
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2521
+ var _a;
2522
+ const newVNode2 = newParentVNode.$children$[childIndex];
2523
+ let i2 = 0;
2524
+ let elm;
2525
+ let childNode;
2526
+ let oldVNode;
2527
+ if (BUILD.slotRelocation && !useNativeShadowDom) {
2528
+ checkSlotRelocate = true;
2529
+ if (newVNode2.$tag$ === "slot") {
2530
+ newVNode2.$flags$ |= newVNode2.$children$ ? (
2531
+ // slot element has fallback content
2532
+ // still create an element that "mocks" the slot element
2533
+ 2 /* isSlotFallback */
2534
+ ) : (
2535
+ // slot element does not have fallback content
2536
+ // create an html comment we'll use to always reference
2537
+ // where actual slot content should sit next to
2538
+ 1 /* isSlotReference */
2539
+ );
2540
+ }
2541
+ }
2542
+ if (BUILD.isDev && newVNode2.$elm$) {
2543
+ consoleDevError(
2544
+ `The JSX ${newVNode2.$text$ !== null ? `"${newVNode2.$text$}" text` : `"${newVNode2.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`
2545
+ );
2546
+ }
2547
+ if (BUILD.vdomText && newVNode2.$text$ !== null) {
2548
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
2549
+ } else if (BUILD.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
2550
+ elm = newVNode2.$elm$ = BUILD.isDebug || BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : win.document.createTextNode("");
2551
+ if (BUILD.vdomAttribute) {
2552
+ updateElement(null, newVNode2, isSvgMode);
2553
+ }
2554
+ } else {
2555
+ if (BUILD.svg && !isSvgMode) {
2556
+ isSvgMode = newVNode2.$tag$ === "svg";
2557
+ }
2558
+ if (!win.document) {
2559
+ throw new Error(
2560
+ "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
2561
+ );
2562
+ }
2563
+ elm = newVNode2.$elm$ = BUILD.svg ? win.document.createElementNS(
2564
+ isSvgMode ? SVG_NS : HTML_NS,
2565
+ !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
2566
+ ) : win.document.createElement(
2567
+ !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
2568
+ );
2569
+ if (BUILD.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
2570
+ isSvgMode = false;
2571
+ }
2572
+ if (BUILD.vdomAttribute) {
2573
+ updateElement(null, newVNode2, isSvgMode);
2574
+ }
2575
+ if (BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
2576
+ elm.classList.add(elm["s-si"] = scopeId);
2577
+ }
2578
+ if (newVNode2.$children$) {
2579
+ for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
2580
+ childNode = createElm(oldParentVNode, newVNode2, i2);
2581
+ if (childNode) {
2582
+ elm.appendChild(childNode);
2583
+ }
2584
+ }
2585
+ }
2586
+ if (BUILD.svg) {
2587
+ if (newVNode2.$tag$ === "svg") {
2588
+ isSvgMode = false;
2589
+ } else if (elm.tagName === "foreignObject") {
2590
+ isSvgMode = true;
2591
+ }
2592
+ }
2593
+ }
2594
+ elm["s-hn"] = hostTagName;
2595
+ if (BUILD.slotRelocation) {
2596
+ if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
2597
+ elm["s-sr"] = true;
2598
+ elm["s-cr"] = contentRef;
2599
+ elm["s-sn"] = newVNode2.$name$ || "";
2600
+ elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
2601
+ patchSlotNode(elm);
2602
+ oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
2603
+ if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
2604
+ if (BUILD.experimentalSlotFixes) {
2605
+ relocateToHostRoot(oldParentVNode.$elm$);
2606
+ } else {
2607
+ putBackInOriginalLocation(oldParentVNode.$elm$, false);
2608
+ }
2609
+ }
2610
+ if (BUILD.scoped) {
2611
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
2612
+ }
2613
+ }
2614
+ }
2615
+ return elm;
2616
+ };
2617
+ var relocateToHostRoot = (parentElm) => {
2618
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
2619
+ const host = parentElm.closest(hostTagName.toLowerCase());
2620
+ if (host != null) {
2621
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
2622
+ (ref) => ref["s-cr"]
2623
+ );
2624
+ const childNodeArray = Array.from(
2625
+ parentElm.__childNodes || parentElm.childNodes
2626
+ );
2627
+ for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
2628
+ if (childNode["s-sh"] != null) {
2629
+ insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
2630
+ childNode["s-sh"] = void 0;
2631
+ checkSlotRelocate = true;
2632
+ }
2633
+ }
2634
+ }
2635
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
2636
+ };
2637
+ var putBackInOriginalLocation = (parentElm, recursive) => {
2638
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
2639
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
2640
+ if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
2641
+ let node = parentElm;
2642
+ while (node = node.nextSibling) {
2643
+ if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
2644
+ oldSlotChildNodes.push(node);
2645
+ }
2646
+ }
2647
+ }
2648
+ for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
2649
+ const childNode = oldSlotChildNodes[i2];
2650
+ if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
2651
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
2652
+ childNode["s-ol"].remove();
2653
+ childNode["s-ol"] = void 0;
2654
+ childNode["s-sh"] = void 0;
2655
+ checkSlotRelocate = true;
2656
+ }
2657
+ if (recursive) {
2658
+ putBackInOriginalLocation(childNode, recursive);
2659
+ }
2660
+ }
2661
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
2662
+ };
2663
+ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
2664
+ let containerElm = BUILD.slotRelocation && parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
2665
+ let childNode;
2666
+ if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
2667
+ containerElm = containerElm.shadowRoot;
2668
+ }
2669
+ for (; startIdx <= endIdx; ++startIdx) {
2670
+ if (vnodes[startIdx]) {
2671
+ childNode = createElm(null, parentVNode, startIdx);
2672
+ if (childNode) {
2673
+ vnodes[startIdx].$elm$ = childNode;
2674
+ insertBefore(containerElm, childNode, BUILD.slotRelocation ? referenceNode(before) : before);
2675
+ }
2676
+ }
2677
+ }
2678
+ };
2679
+ var removeVnodes = (vnodes, startIdx, endIdx) => {
2680
+ for (let index = startIdx; index <= endIdx; ++index) {
2681
+ const vnode = vnodes[index];
2682
+ if (vnode) {
2683
+ const elm = vnode.$elm$;
2684
+ nullifyVNodeRefs(vnode);
2685
+ if (elm) {
2686
+ if (BUILD.slotRelocation) {
2687
+ checkSlotFallbackVisibility = true;
2688
+ if (elm["s-ol"]) {
2689
+ elm["s-ol"].remove();
2690
+ } else {
2691
+ putBackInOriginalLocation(elm, true);
2692
+ }
2693
+ }
2694
+ elm.remove();
2695
+ }
2696
+ }
2697
+ }
2698
+ };
2699
+ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
2700
+ let oldStartIdx = 0;
2701
+ let newStartIdx = 0;
2702
+ let idxInOld = 0;
2703
+ let i2 = 0;
2704
+ let oldEndIdx = oldCh.length - 1;
2705
+ let oldStartVnode = oldCh[0];
2706
+ let oldEndVnode = oldCh[oldEndIdx];
2707
+ let newEndIdx = newCh.length - 1;
2708
+ let newStartVnode = newCh[0];
2709
+ let newEndVnode = newCh[newEndIdx];
2710
+ let node;
2711
+ let elmToMove;
2712
+ while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
2713
+ if (oldStartVnode == null) {
2714
+ oldStartVnode = oldCh[++oldStartIdx];
2715
+ } else if (oldEndVnode == null) {
2716
+ oldEndVnode = oldCh[--oldEndIdx];
2717
+ } else if (newStartVnode == null) {
2718
+ newStartVnode = newCh[++newStartIdx];
2719
+ } else if (newEndVnode == null) {
2720
+ newEndVnode = newCh[--newEndIdx];
2721
+ } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
2722
+ patch(oldStartVnode, newStartVnode, isInitialRender);
2723
+ oldStartVnode = oldCh[++oldStartIdx];
2724
+ newStartVnode = newCh[++newStartIdx];
2725
+ } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
2726
+ patch(oldEndVnode, newEndVnode, isInitialRender);
2727
+ oldEndVnode = oldCh[--oldEndIdx];
2728
+ newEndVnode = newCh[--newEndIdx];
2729
+ } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
2730
+ if (BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
2731
+ putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
2732
+ }
2733
+ patch(oldStartVnode, newEndVnode, isInitialRender);
2734
+ insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
2735
+ oldStartVnode = oldCh[++oldStartIdx];
2736
+ newEndVnode = newCh[--newEndIdx];
2737
+ } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
2738
+ if (BUILD.slotRelocation && (oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
2739
+ putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
2740
+ }
2741
+ patch(oldEndVnode, newStartVnode, isInitialRender);
2742
+ insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
2743
+ oldEndVnode = oldCh[--oldEndIdx];
2744
+ newStartVnode = newCh[++newStartIdx];
2745
+ } else {
2746
+ idxInOld = -1;
2747
+ if (BUILD.vdomKey) {
2748
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
2749
+ if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
2750
+ idxInOld = i2;
2751
+ break;
2752
+ }
2753
+ }
2754
+ }
2755
+ if (BUILD.vdomKey && idxInOld >= 0) {
2756
+ elmToMove = oldCh[idxInOld];
2757
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
2758
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
2759
+ } else {
2760
+ patch(elmToMove, newStartVnode, isInitialRender);
2761
+ oldCh[idxInOld] = void 0;
2762
+ node = elmToMove.$elm$;
2763
+ }
2764
+ newStartVnode = newCh[++newStartIdx];
2765
+ } else {
2766
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
2767
+ newStartVnode = newCh[++newStartIdx];
2768
+ }
2769
+ if (node) {
2770
+ if (BUILD.slotRelocation) {
2771
+ insertBefore(
2772
+ referenceNode(oldStartVnode.$elm$).parentNode,
2773
+ node,
2774
+ referenceNode(oldStartVnode.$elm$)
2775
+ );
2776
+ } else {
2777
+ insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
2778
+ }
2779
+ }
2780
+ }
2781
+ }
2782
+ if (oldStartIdx > oldEndIdx) {
2783
+ addVnodes(
2784
+ parentElm,
2785
+ newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
2786
+ newVNode2,
2787
+ newCh,
2788
+ newStartIdx,
2789
+ newEndIdx
2790
+ );
2791
+ } else if (BUILD.updatable && newStartIdx > newEndIdx) {
2792
+ removeVnodes(oldCh, oldStartIdx, oldEndIdx);
2793
+ }
2794
+ };
2795
+ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
2796
+ if (leftVNode.$tag$ === rightVNode.$tag$) {
2797
+ if (BUILD.slotRelocation && leftVNode.$tag$ === "slot") {
2798
+ return leftVNode.$name$ === rightVNode.$name$;
2799
+ }
2800
+ if (BUILD.vdomKey && !isInitialRender) {
2801
+ return leftVNode.$key$ === rightVNode.$key$;
2802
+ }
2803
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
2804
+ leftVNode.$key$ = rightVNode.$key$;
2805
+ }
2806
+ return true;
2807
+ }
2808
+ return false;
2809
+ };
2810
+ var referenceNode = (node) => node && node["s-ol"] || node;
2811
+ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
2812
+ const elm = newVNode2.$elm$ = oldVNode.$elm$;
2813
+ const oldChildren = oldVNode.$children$;
2814
+ const newChildren = newVNode2.$children$;
2815
+ const tag = newVNode2.$tag$;
2816
+ const text = newVNode2.$text$;
2817
+ let defaultHolder;
2818
+ if (!BUILD.vdomText || text === null) {
2819
+ if (BUILD.svg) {
2820
+ isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
2821
+ }
2822
+ if (BUILD.vdomAttribute || BUILD.reflect) {
2823
+ if (BUILD.slot && tag === "slot" && !useNativeShadowDom) {
2824
+ if (BUILD.experimentalSlotFixes && oldVNode.$name$ !== newVNode2.$name$) {
2825
+ newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
2826
+ relocateToHostRoot(newVNode2.$elm$.parentElement);
2827
+ }
2828
+ }
2829
+ updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
2830
+ }
2831
+ if (BUILD.updatable && oldChildren !== null && newChildren !== null) {
2832
+ updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
2833
+ } else if (newChildren !== null) {
2834
+ if (BUILD.updatable && BUILD.vdomText && oldVNode.$text$ !== null) {
2835
+ elm.textContent = "";
2836
+ }
2837
+ addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
2838
+ } else if (
2839
+ // don't do this on initial render as it can cause non-hydrated content to be removed
2840
+ !isInitialRender && BUILD.updatable && oldChildren !== null
2841
+ ) {
2842
+ removeVnodes(oldChildren, 0, oldChildren.length - 1);
2843
+ }
2844
+ if (BUILD.svg && isSvgMode && tag === "svg") {
2845
+ isSvgMode = false;
2846
+ }
2847
+ } else if (BUILD.vdomText && BUILD.slotRelocation && (defaultHolder = elm["s-cr"])) {
2848
+ defaultHolder.parentNode.textContent = text;
2849
+ } else if (BUILD.vdomText && oldVNode.$text$ !== text) {
2850
+ elm.data = text;
2851
+ }
2852
+ };
2853
+ var relocateNodes = [];
2854
+ var markSlotContentForRelocation = (elm) => {
2855
+ let node;
2856
+ let hostContentNodes;
2857
+ let j;
2858
+ const children = elm.__childNodes || elm.childNodes;
2859
+ for (const childNode of children) {
2860
+ if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
2861
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
2862
+ const slotName = childNode["s-sn"];
2863
+ for (j = hostContentNodes.length - 1; j >= 0; j--) {
2864
+ node = hostContentNodes[j];
2865
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD.experimentalSlotFixes || !node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
2866
+ if (isNodeLocatedInSlot(node, slotName)) {
2867
+ let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
2868
+ checkSlotFallbackVisibility = true;
2869
+ node["s-sn"] = node["s-sn"] || slotName;
2870
+ if (relocateNodeData) {
2871
+ relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
2872
+ relocateNodeData.$slotRefNode$ = childNode;
2873
+ } else {
2874
+ node["s-sh"] = childNode["s-hn"];
2875
+ relocateNodes.push({
2876
+ $slotRefNode$: childNode,
2877
+ $nodeToRelocate$: node
2878
+ });
2879
+ }
2880
+ if (node["s-sr"]) {
2881
+ relocateNodes.map((relocateNode) => {
2882
+ if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
2883
+ relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
2884
+ if (relocateNodeData && !relocateNode.$slotRefNode$) {
2885
+ relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
2886
+ }
2887
+ }
2888
+ });
2889
+ }
2890
+ } else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
2891
+ relocateNodes.push({
2892
+ $nodeToRelocate$: node
2893
+ });
2894
+ }
2895
+ }
2896
+ }
2897
+ }
2898
+ if (childNode.nodeType === 1 /* ElementNode */) {
2899
+ markSlotContentForRelocation(childNode);
2900
+ }
2901
+ }
2902
+ };
2903
+ var nullifyVNodeRefs = (vNode) => {
2904
+ if (BUILD.vdomRef) {
2905
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
2906
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
2907
+ }
2908
+ };
2909
+ var insertBefore = (parent, newNode, reference) => {
2910
+ if (BUILD.scoped && typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
2911
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
2912
+ } else if (BUILD.experimentalSlotFixes && typeof newNode["s-sn"] === "string") {
2913
+ if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
2914
+ patchParentNode(newNode);
2915
+ }
2916
+ parent.insertBefore(newNode, reference);
2917
+ const { slotNode } = findSlotFromSlottedNode(newNode);
2918
+ if (slotNode) dispatchSlotChangeEvent(slotNode);
2919
+ return newNode;
2920
+ }
2921
+ if (BUILD.experimentalSlotFixes && parent.__insertBefore) {
2922
+ return parent.__insertBefore(newNode, reference);
2923
+ } else {
2924
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
2925
+ }
2926
+ };
2927
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
2928
+ var _a, _b;
2929
+ let scopeId2;
2930
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
2931
+ const scopeName = slotNode["s-sn"];
2932
+ const hostName = slotNode["s-hn"];
2933
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
2934
+ if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
2935
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
2936
+ let found = false;
2937
+ while (child) {
2938
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
2939
+ found = true;
2940
+ break;
2941
+ }
2942
+ child = child.nextSibling;
2943
+ }
2944
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
2945
+ }
2946
+ }
2947
+ }
2948
+ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2949
+ var _a, _b, _c, _d, _e;
2950
+ const hostElm = hostRef.$hostElement$;
2951
+ const cmpMeta = hostRef.$cmpMeta$;
2952
+ const oldVNode = hostRef.$vnode$ || newVNode(null, null);
2953
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
2954
+ hostTagName = hostElm.tagName;
2955
+ if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
2956
+ throw new Error(`The <Host> must be the single root component.
2957
+ Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
2958
+
2959
+ The render() function should look like this instead:
2960
+
2961
+ render() {
2962
+ // Do not return an array
2963
+ return (
2964
+ <Host>{content}</Host>
2965
+ );
2966
+ }
2967
+ `);
2968
+ }
2969
+ if (BUILD.reflect && cmpMeta.$attrsToReflect$) {
2970
+ rootVnode.$attrs$ = rootVnode.$attrs$ || {};
2971
+ cmpMeta.$attrsToReflect$.map(
2972
+ ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
2973
+ );
2974
+ }
2975
+ if (isInitialLoad && rootVnode.$attrs$) {
2976
+ for (const key of Object.keys(rootVnode.$attrs$)) {
2977
+ if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
2978
+ rootVnode.$attrs$[key] = hostElm[key];
2979
+ }
2980
+ }
2981
+ }
2982
+ rootVnode.$tag$ = null;
2983
+ rootVnode.$flags$ |= 4 /* isHost */;
2984
+ hostRef.$vnode$ = rootVnode;
2985
+ rootVnode.$elm$ = oldVNode.$elm$ = BUILD.shadowDom ? hostElm.shadowRoot || hostElm : hostElm;
2986
+ if (BUILD.scoped || BUILD.shadowDom) {
2987
+ scopeId = hostElm["s-sc"];
2988
+ }
2989
+ useNativeShadowDom = supportsShadow && !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
2990
+ if (BUILD.slotRelocation) {
2991
+ contentRef = hostElm["s-cr"];
2992
+ checkSlotFallbackVisibility = false;
2993
+ }
2994
+ patch(oldVNode, rootVnode, isInitialLoad);
2995
+ if (BUILD.slotRelocation) {
2996
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
2997
+ if (checkSlotRelocate) {
2998
+ markSlotContentForRelocation(rootVnode.$elm$);
2999
+ for (const relocateData of relocateNodes) {
3000
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
3001
+ if (!nodeToRelocate["s-ol"] && win.document) {
3002
+ const orgLocationNode = BUILD.isDebug || BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : win.document.createTextNode("");
3003
+ orgLocationNode["s-nr"] = nodeToRelocate;
3004
+ insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
3005
+ }
3006
+ }
3007
+ for (const relocateData of relocateNodes) {
3008
+ const nodeToRelocate = relocateData.$nodeToRelocate$;
3009
+ const slotRefNode = relocateData.$slotRefNode$;
3010
+ if (slotRefNode) {
3011
+ const parentNodeRef = slotRefNode.parentNode;
3012
+ let insertBeforeNode = slotRefNode.nextSibling;
3013
+ if (!BUILD.hydrateServerSide && (!BUILD.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
3014
+ let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
3015
+ while (orgLocationNode) {
3016
+ let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
3017
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
3018
+ refNode = refNode.nextSibling;
3019
+ while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
3020
+ refNode = refNode == null ? void 0 : refNode.nextSibling;
3021
+ }
3022
+ if (!refNode || !refNode["s-nr"]) {
3023
+ insertBeforeNode = refNode;
3024
+ break;
3025
+ }
3026
+ }
3027
+ orgLocationNode = orgLocationNode.previousSibling;
3028
+ }
3029
+ }
3030
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
3031
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
3032
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
3033
+ if (nodeToRelocate !== insertBeforeNode) {
3034
+ if (!BUILD.experimentalSlotFixes && !nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
3035
+ nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
3036
+ }
3037
+ insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
3038
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
3039
+ nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
3040
+ }
3041
+ }
3042
+ }
3043
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
3044
+ } else {
3045
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
3046
+ if (isInitialLoad) {
3047
+ nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
3048
+ }
3049
+ nodeToRelocate.hidden = true;
3050
+ }
3051
+ }
3052
+ }
3053
+ }
3054
+ if (checkSlotFallbackVisibility) {
3055
+ updateFallbackSlotVisibility(rootVnode.$elm$);
3056
+ }
3057
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
3058
+ relocateNodes.length = 0;
3059
+ }
3060
+ if (BUILD.experimentalScopedSlotChanges && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3061
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
3062
+ for (const childNode of children) {
3063
+ if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
3064
+ if (isInitialLoad && childNode["s-ih"] == null) {
3065
+ childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
3066
+ }
3067
+ childNode.hidden = true;
3068
+ }
3069
+ }
3070
+ }
3071
+ contentRef = void 0;
3072
+ };
3073
+ var slotReferenceDebugNode = (slotVNode) => {
3074
+ var _a;
3075
+ return (_a = win.document) == null ? void 0 : _a.createComment(
3076
+ `<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
3077
+ );
3078
+ };
3079
+ var originalLocationDebugNode = (nodeToRelocate) => {
3080
+ var _a;
3081
+ return (_a = win.document) == null ? void 0 : _a.createComment(
3082
+ `org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
3083
+ );
3084
+ };
3085
+
3086
+ // src/runtime/update-component.ts
3087
+ var attachToAncestor = (hostRef, ancestorComponent) => {
3088
+ if (BUILD.asyncLoading && ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
3089
+ const index = ancestorComponent["s-p"].push(
3090
+ new Promise(
3091
+ (r) => hostRef.$onRenderResolve$ = () => {
3092
+ ancestorComponent["s-p"].splice(index - 1, 1);
3093
+ r();
3094
+ }
3095
+ )
3096
+ );
3097
+ }
3098
+ };
3099
+ var scheduleUpdate = (hostRef, isInitialLoad) => {
3100
+ if (BUILD.taskQueue && BUILD.updatable) {
3101
+ hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
3102
+ }
3103
+ if (BUILD.asyncLoading && hostRef.$flags$ & 4 /* isWaitingForChildren */) {
3104
+ hostRef.$flags$ |= 512 /* needsRerender */;
3105
+ return;
3106
+ }
3107
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$);
3108
+ const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
3109
+ return BUILD.taskQueue ? writeTask(dispatch) : dispatch();
3110
+ };
3111
+ var dispatchHooks = (hostRef, isInitialLoad) => {
3112
+ const elm = hostRef.$hostElement$;
3113
+ const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
3114
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
3115
+ if (!instance) {
3116
+ throw new Error(
3117
+ `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`
3118
+ );
3119
+ }
3120
+ let maybePromise;
3121
+ if (isInitialLoad) {
3122
+ if (BUILD.lazyLoad && BUILD.hostListener) {
3123
+ hostRef.$flags$ |= 256 /* isListenReady */;
3124
+ if (hostRef.$queuedListeners$) {
3125
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
3126
+ hostRef.$queuedListeners$ = void 0;
3127
+ }
3128
+ }
3129
+ emitLifecycleEvent(elm, "componentWillLoad");
3130
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
3131
+ } else {
3132
+ emitLifecycleEvent(elm, "componentWillUpdate");
3133
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
3134
+ }
3135
+ emitLifecycleEvent(elm, "componentWillRender");
3136
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
3137
+ endSchedule();
3138
+ return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
3139
+ };
3140
+ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
3141
+ console.error(err2);
3142
+ fn();
3143
+ }) : fn();
3144
+ var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
3145
+ var updateComponent = async (hostRef, instance, isInitialLoad) => {
3146
+ var _a;
3147
+ const elm = hostRef.$hostElement$;
3148
+ const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
3149
+ const rc = elm["s-rc"];
3150
+ if (BUILD.style && isInitialLoad) {
3151
+ attachStyles(hostRef);
3152
+ }
3153
+ const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
3154
+ if (BUILD.isDev) {
3155
+ hostRef.$flags$ |= 1024 /* devOnRender */;
3156
+ }
3157
+ if (BUILD.hydrateServerSide) {
3158
+ await callRender(hostRef, instance, elm, isInitialLoad);
3159
+ } else {
3160
+ callRender(hostRef, instance, elm, isInitialLoad);
3161
+ }
3162
+ if (BUILD.isDev) {
3163
+ hostRef.$renderCount$ = hostRef.$renderCount$ === void 0 ? 1 : hostRef.$renderCount$ + 1;
3164
+ hostRef.$flags$ &= ~1024 /* devOnRender */;
3165
+ }
3166
+ if (BUILD.hydrateServerSide) {
3167
+ try {
3168
+ serverSideConnected(elm);
3169
+ if (isInitialLoad) {
3170
+ if (hostRef.$cmpMeta$.$flags$ & 1 /* shadowDomEncapsulation */) {
3171
+ elm["s-en"] = "";
3172
+ } else if (hostRef.$cmpMeta$.$flags$ & 2 /* scopedCssEncapsulation */) {
3173
+ elm["s-en"] = "c";
3174
+ }
3175
+ }
3176
+ } catch (e) {
3177
+ consoleError(e, elm);
3178
+ }
3179
+ }
3180
+ if (BUILD.asyncLoading && rc) {
3181
+ rc.map((cb) => cb());
3182
+ elm["s-rc"] = void 0;
3183
+ }
3184
+ endRender();
3185
+ endUpdate();
3186
+ if (BUILD.asyncLoading) {
3187
+ const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
3188
+ const postUpdate = () => postUpdateComponent(hostRef);
3189
+ if (childrenPromises.length === 0) {
3190
+ postUpdate();
3191
+ } else {
3192
+ Promise.all(childrenPromises).then(postUpdate);
3193
+ hostRef.$flags$ |= 4 /* isWaitingForChildren */;
3194
+ childrenPromises.length = 0;
3195
+ }
3196
+ } else {
3197
+ postUpdateComponent(hostRef);
3198
+ }
3199
+ };
3200
+ var renderingRef = null;
3201
+ var callRender = (hostRef, instance, elm, isInitialLoad) => {
3202
+ const allRenderFn = BUILD.allRenderFn ? true : false;
3203
+ const lazyLoad = BUILD.lazyLoad ? true : false;
3204
+ const taskQueue = BUILD.taskQueue ? true : false;
3205
+ const updatable = BUILD.updatable ? true : false;
3206
+ try {
3207
+ renderingRef = instance;
3208
+ instance = allRenderFn ? instance.render() : instance.render && instance.render();
3209
+ if (updatable && taskQueue) {
3210
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
3211
+ }
3212
+ if (updatable || lazyLoad) {
3213
+ hostRef.$flags$ |= 2 /* hasRendered */;
3214
+ }
3215
+ if (BUILD.hasRenderFn || BUILD.reflect) {
3216
+ if (BUILD.vdomRender || BUILD.reflect) {
3217
+ if (BUILD.hydrateServerSide) {
3218
+ return Promise.resolve(instance).then((value) => renderVdom(hostRef, value, isInitialLoad));
3219
+ } else {
3220
+ renderVdom(hostRef, instance, isInitialLoad);
3221
+ }
3222
+ } else {
3223
+ const shadowRoot = elm.shadowRoot;
3224
+ if (hostRef.$cmpMeta$.$flags$ & 1 /* shadowDomEncapsulation */) {
3225
+ shadowRoot.textContent = instance;
3226
+ } else {
3227
+ elm.textContent = instance;
3228
+ }
3229
+ }
3230
+ }
3231
+ } catch (e) {
3232
+ consoleError(e, hostRef.$hostElement$);
3233
+ }
3234
+ renderingRef = null;
3235
+ return null;
3236
+ };
3237
+ var getRenderingRef = () => renderingRef;
3238
+ var postUpdateComponent = (hostRef) => {
3239
+ const tagName = hostRef.$cmpMeta$.$tagName$;
3240
+ const elm = hostRef.$hostElement$;
3241
+ const endPostUpdate = createTime("postUpdate", tagName);
3242
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
3243
+ const ancestorComponent = hostRef.$ancestorComponent$;
3244
+ if (BUILD.isDev) {
3245
+ hostRef.$flags$ |= 1024 /* devOnRender */;
3246
+ }
3247
+ safeCall(instance, "componentDidRender", void 0, elm);
3248
+ if (BUILD.isDev) {
3249
+ hostRef.$flags$ &= ~1024 /* devOnRender */;
3250
+ }
3251
+ emitLifecycleEvent(elm, "componentDidRender");
3252
+ if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
3253
+ hostRef.$flags$ |= 64 /* hasLoadedComponent */;
3254
+ if (BUILD.asyncLoading && BUILD.cssAnnotations) {
3255
+ addHydratedFlag(elm);
3256
+ }
3257
+ if (BUILD.isDev) {
3258
+ hostRef.$flags$ |= 2048 /* devOnDidLoad */;
3259
+ }
3260
+ safeCall(instance, "componentDidLoad", void 0, elm);
3261
+ if (BUILD.isDev) {
3262
+ hostRef.$flags$ &= ~2048 /* devOnDidLoad */;
3263
+ }
3264
+ emitLifecycleEvent(elm, "componentDidLoad");
3265
+ endPostUpdate();
3266
+ if (BUILD.asyncLoading) {
3267
+ hostRef.$onReadyResolve$(elm);
3268
+ if (!ancestorComponent) {
3269
+ appDidLoad(tagName);
3270
+ }
3271
+ }
3272
+ } else {
3273
+ if (BUILD.isDev) {
3274
+ hostRef.$flags$ |= 1024 /* devOnRender */;
3275
+ }
3276
+ safeCall(instance, "componentDidUpdate", void 0, elm);
3277
+ if (BUILD.isDev) {
3278
+ hostRef.$flags$ &= ~1024 /* devOnRender */;
3279
+ }
3280
+ emitLifecycleEvent(elm, "componentDidUpdate");
3281
+ endPostUpdate();
3282
+ }
3283
+ if (BUILD.method && BUILD.lazyLoad) {
3284
+ hostRef.$onInstanceResolve$(elm);
3285
+ }
3286
+ if (BUILD.asyncLoading) {
3287
+ if (hostRef.$onRenderResolve$) {
3288
+ hostRef.$onRenderResolve$();
3289
+ hostRef.$onRenderResolve$ = void 0;
3290
+ }
3291
+ if (hostRef.$flags$ & 512 /* needsRerender */) {
3292
+ nextTick(() => scheduleUpdate(hostRef, false));
3293
+ }
3294
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
3295
+ }
3296
+ };
3297
+ var forceUpdate = (ref) => {
3298
+ if (BUILD.updatable && (Build.isBrowser || Build.isTesting)) {
3299
+ const hostRef = getHostRef(ref);
3300
+ const isConnected = hostRef.$hostElement$.isConnected;
3301
+ if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
3302
+ scheduleUpdate(hostRef, false);
3303
+ }
3304
+ return isConnected;
3305
+ }
3306
+ return false;
3307
+ };
3308
+ var appDidLoad = (who) => {
3309
+ if (BUILD.asyncQueue) {
3310
+ plt.$flags$ |= 2 /* appLoaded */;
3311
+ }
3312
+ nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
3313
+ if (BUILD.profile && performance.measure) {
3314
+ performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, "st:app:start");
3315
+ }
3316
+ };
3317
+ var safeCall = (instance, method, arg, elm) => {
3318
+ if (instance && instance[method]) {
3319
+ try {
3320
+ return instance[method](arg);
3321
+ } catch (e) {
3322
+ consoleError(e, elm);
3323
+ }
3324
+ }
3325
+ return void 0;
3326
+ };
3327
+ var emitLifecycleEvent = (elm, lifecycleName) => {
3328
+ if (BUILD.lifecycleDOMEvents) {
3329
+ emitEvent(elm, "stencil_" + lifecycleName, {
3330
+ bubbles: true,
3331
+ composed: true,
3332
+ detail: {
3333
+ namespace: NAMESPACE
3334
+ }
3335
+ });
3336
+ }
3337
+ };
3338
+ var addHydratedFlag = (elm) => {
3339
+ var _a, _b;
3340
+ return BUILD.hydratedClass ? elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") : BUILD.hydratedAttribute ? elm.setAttribute((_b = BUILD.hydratedSelectorName) != null ? _b : "hydrated", "") : void 0;
3341
+ };
3342
+ var serverSideConnected = (elm) => {
3343
+ const children = elm.children;
3344
+ if (children != null) {
3345
+ for (let i2 = 0, ii = children.length; i2 < ii; i2++) {
3346
+ const childElm = children[i2];
3347
+ if (typeof childElm.connectedCallback === "function") {
3348
+ childElm.connectedCallback();
3349
+ }
3350
+ serverSideConnected(childElm);
3351
+ }
3352
+ }
3353
+ };
3354
+
3355
+ // src/runtime/set-value.ts
3356
+ var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
3357
+ var setValue = (ref, propName, newVal, cmpMeta) => {
3358
+ const hostRef = getHostRef(ref);
3359
+ if (BUILD.lazyLoad && !hostRef) {
3360
+ throw new Error(
3361
+ `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
3362
+ );
3363
+ }
3364
+ const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : ref;
3365
+ const oldVal = hostRef.$instanceValues$.get(propName);
3366
+ const flags = hostRef.$flags$;
3367
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
3368
+ newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
3369
+ const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
3370
+ const didValueChange = newVal !== oldVal && !areBothNaN;
3371
+ if ((!BUILD.lazyLoad || !(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
3372
+ hostRef.$instanceValues$.set(propName, newVal);
3373
+ if (BUILD.isDev) {
3374
+ if (hostRef.$flags$ & 1024 /* devOnRender */) {
3375
+ consoleDevWarn(
3376
+ `The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`,
3377
+ "\nElement",
3378
+ elm,
3379
+ "\nNew value",
3380
+ newVal,
3381
+ "\nOld value",
3382
+ oldVal
3383
+ );
3384
+ } else if (hostRef.$flags$ & 2048 /* devOnDidLoad */) {
3385
+ consoleDevWarn(
3386
+ `The state/prop "${propName}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`,
3387
+ "\nElement",
3388
+ elm,
3389
+ "\nNew value",
3390
+ newVal,
3391
+ "\nOld value",
3392
+ oldVal
3393
+ );
3394
+ }
3395
+ }
3396
+ if (!BUILD.lazyLoad || instance) {
3397
+ if (BUILD.watchCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
3398
+ const watchMethods = cmpMeta.$watchers$[propName];
3399
+ if (watchMethods) {
3400
+ watchMethods.map((watchMethodName) => {
3401
+ try {
3402
+ instance[watchMethodName](newVal, oldVal, propName);
3403
+ } catch (e) {
3404
+ consoleError(e, elm);
3405
+ }
3406
+ });
3407
+ }
3408
+ }
3409
+ if (BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
3410
+ if (instance.componentShouldUpdate) {
3411
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
3412
+ return;
3413
+ }
3414
+ }
3415
+ scheduleUpdate(hostRef, false);
3416
+ }
3417
+ }
3418
+ }
3419
+ };
3420
+
3421
+ // src/runtime/proxy-component.ts
3422
+ var proxyComponent = (Cstr, cmpMeta, flags) => {
3423
+ var _a, _b;
3424
+ const prototype = Cstr.prototype;
3425
+ if (BUILD.isTesting) {
3426
+ if (prototype.__stencilAugmented) {
3427
+ return;
3428
+ }
3429
+ prototype.__stencilAugmented = true;
3430
+ }
3431
+ if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
3432
+ FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
3433
+ const originalFormAssociatedCallback = prototype[cbName];
3434
+ Object.defineProperty(prototype, cbName, {
3435
+ value(...args) {
3436
+ const hostRef = getHostRef(this);
3437
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : this;
3438
+ if (!instance) {
3439
+ hostRef.$onReadyPromise$.then((asyncInstance) => {
3440
+ const cb = asyncInstance[cbName];
3441
+ typeof cb === "function" && cb.call(asyncInstance, ...args);
3442
+ });
3443
+ } else {
3444
+ const cb = BUILD.lazyLoad ? instance[cbName] : originalFormAssociatedCallback;
3445
+ typeof cb === "function" && cb.call(instance, ...args);
3446
+ }
3447
+ }
3448
+ });
3449
+ });
3450
+ }
3451
+ if (BUILD.member && cmpMeta.$members$ || BUILD.watchCallback && (cmpMeta.$watchers$ || Cstr.watchers)) {
3452
+ if (BUILD.watchCallback && Cstr.watchers && !cmpMeta.$watchers$) {
3453
+ cmpMeta.$watchers$ = Cstr.watchers;
3454
+ }
3455
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
3456
+ members.map(([memberName, [memberFlags]]) => {
3457
+ if ((BUILD.prop || BUILD.state) && (memberFlags & 31 /* Prop */ || (!BUILD.lazyLoad || flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
3458
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
3459
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
3460
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
3461
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
3462
+ Object.defineProperty(prototype, memberName, {
3463
+ get() {
3464
+ if (BUILD.lazyLoad) {
3465
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
3466
+ return getValue(this, memberName);
3467
+ }
3468
+ const ref = getHostRef(this);
3469
+ const instance = ref ? ref.$lazyInstance$ : prototype;
3470
+ if (!instance) return;
3471
+ return instance[memberName];
3472
+ }
3473
+ if (!BUILD.lazyLoad) {
3474
+ return origGetter ? origGetter.apply(this) : getValue(this, memberName);
3475
+ }
3476
+ },
3477
+ configurable: true,
3478
+ enumerable: true
3479
+ });
3480
+ }
3481
+ Object.defineProperty(prototype, memberName, {
3482
+ set(newValue) {
3483
+ const ref = getHostRef(this);
3484
+ if (BUILD.isDev) {
3485
+ if (
3486
+ // we are proxying the instance (not element)
3487
+ (flags & 1 /* isElementConstructor */) === 0 && // if the class has a setter, then the Element can update instance values, so ignore
3488
+ (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0 && // the element is not constructing
3489
+ (ref && ref.$flags$ & 8 /* isConstructingInstance */) === 0 && // the member is a prop
3490
+ (memberFlags & 31 /* Prop */) !== 0 && // the member is not mutable
3491
+ (memberFlags & 1024 /* Mutable */) === 0
3492
+ ) {
3493
+ consoleDevWarn(
3494
+ `@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.
3495
+ More information: https://stenciljs.com/docs/properties#prop-mutability`
3496
+ );
3497
+ }
3498
+ }
3499
+ if (origSetter) {
3500
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
3501
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
3502
+ newValue = ref.$instanceValues$.get(memberName);
3503
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
3504
+ ref.$instanceValues$.set(memberName, currentValue);
3505
+ }
3506
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
3507
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
3508
+ setValue(this, memberName, newValue, cmpMeta);
3509
+ return;
3510
+ }
3511
+ if (!BUILD.lazyLoad) {
3512
+ setValue(this, memberName, newValue, cmpMeta);
3513
+ return;
3514
+ }
3515
+ if (BUILD.lazyLoad) {
3516
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
3517
+ setValue(this, memberName, newValue, cmpMeta);
3518
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
3519
+ ref.$onReadyPromise$.then(() => {
3520
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
3521
+ ref.$lazyInstance$[memberName] = newValue;
3522
+ }
3523
+ });
3524
+ }
3525
+ return;
3526
+ }
3527
+ const setterSetVal = () => {
3528
+ const currentValue = ref.$lazyInstance$[memberName];
3529
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
3530
+ ref.$instanceValues$.set(memberName, currentValue);
3531
+ }
3532
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
3533
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
3534
+ };
3535
+ if (ref.$lazyInstance$) {
3536
+ setterSetVal();
3537
+ } else {
3538
+ ref.$onReadyPromise$.then(() => setterSetVal());
3539
+ }
3540
+ }
3541
+ }
3542
+ });
3543
+ } else if (BUILD.lazyLoad && BUILD.method && flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
3544
+ Object.defineProperty(prototype, memberName, {
3545
+ value(...args) {
3546
+ var _a2;
3547
+ const ref = getHostRef(this);
3548
+ return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
3549
+ var _a3;
3550
+ return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
3551
+ });
3552
+ }
3553
+ });
3554
+ }
3555
+ });
3556
+ if (BUILD.observeAttribute && (!BUILD.lazyLoad || flags & 1 /* isElementConstructor */)) {
3557
+ const attrNameToPropName = /* @__PURE__ */ new Map();
3558
+ prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
3559
+ plt.jmp(() => {
3560
+ var _a2;
3561
+ const propName = attrNameToPropName.get(attrName);
3562
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
3563
+ newValue = this[propName];
3564
+ delete this[propName];
3565
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
3566
+ this[propName] == newValue) {
3567
+ return;
3568
+ } else if (propName == null) {
3569
+ const hostRef = getHostRef(this);
3570
+ const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
3571
+ if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
3572
+ const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;
3573
+ const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
3574
+ const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
3575
+ entry == null ? void 0 : entry.forEach((callbackName) => {
3576
+ if (instance[callbackName] != null) {
3577
+ instance[callbackName].call(instance, newValue, oldValue, attrName);
3578
+ }
3579
+ });
3580
+ }
3581
+ return;
3582
+ }
3583
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
3584
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
3585
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
3586
+ this[propName] = newValue;
3587
+ }
3588
+ });
3589
+ };
3590
+ Cstr.observedAttributes = Array.from(
3591
+ /* @__PURE__ */ new Set([
3592
+ ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
3593
+ ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
3594
+ var _a2;
3595
+ const attrName = m[1] || propName;
3596
+ attrNameToPropName.set(attrName, propName);
3597
+ if (BUILD.reflect && m[0] & 512 /* ReflectAttr */) {
3598
+ (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
3599
+ }
3600
+ return attrName;
3601
+ })
3602
+ ])
3603
+ );
3604
+ }
3605
+ }
3606
+ return Cstr;
3607
+ };
3608
+
3609
+ // src/runtime/initialize-component.ts
3610
+ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
3611
+ let Cstr;
3612
+ if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
3613
+ hostRef.$flags$ |= 32 /* hasInitializedComponent */;
3614
+ const bundleId = cmpMeta.$lazyBundleId$;
3615
+ if (BUILD.lazyLoad && bundleId) {
3616
+ const CstrImport = loadModule(cmpMeta, hostRef, hmrVersionId);
3617
+ if (CstrImport && "then" in CstrImport) {
3618
+ const endLoad = uniqueTime(
3619
+ `st:load:${cmpMeta.$tagName$}:${hostRef.$modeName$}`,
3620
+ `[Stencil] Load module for <${cmpMeta.$tagName$}>`
3621
+ );
3622
+ Cstr = await CstrImport;
3623
+ endLoad();
3624
+ } else {
3625
+ Cstr = CstrImport;
3626
+ }
3627
+ if (!Cstr) {
3628
+ throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
3629
+ }
3630
+ if (BUILD.member && !Cstr.isProxied) {
3631
+ if (BUILD.watchCallback) {
3632
+ cmpMeta.$watchers$ = Cstr.watchers;
3633
+ }
3634
+ proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
3635
+ Cstr.isProxied = true;
3636
+ }
3637
+ const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
3638
+ if (BUILD.member) {
3639
+ hostRef.$flags$ |= 8 /* isConstructingInstance */;
3640
+ }
3641
+ try {
3642
+ new Cstr(hostRef);
3643
+ } catch (e) {
3644
+ consoleError(e, elm);
3645
+ }
3646
+ if (BUILD.member) {
3647
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
3648
+ }
3649
+ if (BUILD.watchCallback) {
3650
+ hostRef.$flags$ |= 128 /* isWatchReady */;
3651
+ }
3652
+ endNewInstance();
3653
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
3654
+ } else {
3655
+ Cstr = elm.constructor;
3656
+ const cmpTag = elm.localName;
3657
+ customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
3658
+ }
3659
+ if (BUILD.style && Cstr && Cstr.style) {
3660
+ let style;
3661
+ if (typeof Cstr.style === "string") {
3662
+ style = Cstr.style;
3663
+ } else if (BUILD.mode && typeof Cstr.style !== "string") {
3664
+ hostRef.$modeName$ = computeMode(elm);
3665
+ if (hostRef.$modeName$) {
3666
+ style = Cstr.style[hostRef.$modeName$];
3667
+ }
3668
+ if (BUILD.hydrateServerSide && hostRef.$modeName$) {
3669
+ elm.setAttribute("s-mode", hostRef.$modeName$);
3670
+ }
3671
+ }
3672
+ const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
3673
+ if (!styles.has(scopeId2)) {
3674
+ const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
3675
+ if (BUILD.hydrateServerSide && BUILD.shadowDom && cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */) {
3676
+ style = scopeCss(style, scopeId2, true);
3677
+ }
3678
+ registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
3679
+ endRegisterStyles();
3680
+ }
3681
+ }
3682
+ }
3683
+ const ancestorComponent = hostRef.$ancestorComponent$;
3684
+ const schedule = () => scheduleUpdate(hostRef, true);
3685
+ if (BUILD.asyncLoading && ancestorComponent && ancestorComponent["s-rc"]) {
3686
+ ancestorComponent["s-rc"].push(schedule);
3687
+ } else {
3688
+ schedule();
3689
+ }
3690
+ };
3691
+ var fireConnectedCallback = (instance, elm) => {
3692
+ if (BUILD.lazyLoad) {
3693
+ safeCall(instance, "connectedCallback", void 0, elm);
3694
+ }
3695
+ };
3696
+
3697
+ // src/runtime/connected-callback.ts
3698
+ var connectedCallback = (elm) => {
3699
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
3700
+ const hostRef = getHostRef(elm);
3701
+ const cmpMeta = hostRef.$cmpMeta$;
3702
+ const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
3703
+ if (BUILD.hostListenerTargetParent) {
3704
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
3705
+ }
3706
+ if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
3707
+ hostRef.$flags$ |= 1 /* hasConnected */;
3708
+ let hostId;
3709
+ if (BUILD.hydrateClientSide) {
3710
+ hostId = elm.getAttribute(HYDRATE_ID);
3711
+ if (hostId) {
3712
+ if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3713
+ const scopeId2 = BUILD.mode ? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) : addStyle(elm.shadowRoot, cmpMeta);
3714
+ elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
3715
+ } else if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3716
+ const scopeId2 = getScopeId(cmpMeta, BUILD.mode ? elm.getAttribute("s-mode") : void 0);
3717
+ elm["s-sc"] = scopeId2;
3718
+ }
3719
+ initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
3720
+ }
3721
+ }
3722
+ if (BUILD.slotRelocation && !hostId) {
3723
+ if (BUILD.hydrateServerSide || (BUILD.slot || BUILD.shadowDom) && // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
3724
+ cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
3725
+ setContentReference(elm);
3726
+ }
3727
+ }
3728
+ if (BUILD.asyncLoading) {
3729
+ let ancestorComponent = elm;
3730
+ while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
3731
+ if (BUILD.hydrateClientSide && ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
3732
+ attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
3733
+ break;
3734
+ }
3735
+ }
3736
+ }
3737
+ if (BUILD.prop && !BUILD.hydrateServerSide && cmpMeta.$members$) {
3738
+ Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
3739
+ if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
3740
+ const value = elm[memberName];
3741
+ delete elm[memberName];
3742
+ elm[memberName] = value;
3743
+ }
3744
+ });
3745
+ }
3746
+ if (BUILD.initializeNextTick) {
3747
+ nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
3748
+ } else {
3749
+ initializeComponent(elm, hostRef, cmpMeta);
3750
+ }
3751
+ } else {
3752
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, false);
3753
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
3754
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
3755
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
3756
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
3757
+ }
3758
+ }
3759
+ endConnected();
3760
+ }
3761
+ };
3762
+ var setContentReference = (elm) => {
3763
+ if (!win.document) {
3764
+ return;
3765
+ }
3766
+ const contentRefElm = elm["s-cr"] = win.document.createComment(
3767
+ BUILD.isDebug ? `content-ref (host=${elm.localName})` : ""
3768
+ );
3769
+ contentRefElm["s-cn"] = true;
3770
+ insertBefore(elm, contentRefElm, elm.firstChild);
3771
+ };
3772
+ var disconnectInstance = (instance, elm) => {
3773
+ if (BUILD.lazyLoad) {
3774
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
3775
+ }
3776
+ };
3777
+ var disconnectedCallback = async (elm) => {
3778
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
3779
+ const hostRef = getHostRef(elm);
3780
+ if (BUILD.hostListener) {
3781
+ if (hostRef.$rmListeners$) {
3782
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
3783
+ hostRef.$rmListeners$ = void 0;
3784
+ }
3785
+ }
3786
+ if (!BUILD.lazyLoad) {
3787
+ disconnectInstance(elm);
3788
+ } else if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
3789
+ disconnectInstance(hostRef.$lazyInstance$, elm);
3790
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
3791
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
3792
+ }
3793
+ }
3794
+ if (rootAppliedStyles.has(elm)) {
3795
+ rootAppliedStyles.delete(elm);
3796
+ }
3797
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
3798
+ rootAppliedStyles.delete(elm.shadowRoot);
3799
+ }
3800
+ };
3801
+
3802
+ // src/runtime/bootstrap-custom-element.ts
3803
+ var defineCustomElement = (Cstr, compactMeta) => {
3804
+ customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));
3805
+ };
3806
+ var proxyCustomElement = (Cstr, compactMeta) => {
3807
+ const cmpMeta = {
3808
+ $flags$: compactMeta[0],
3809
+ $tagName$: compactMeta[1]
3810
+ };
3811
+ if (BUILD.member) {
3812
+ cmpMeta.$members$ = compactMeta[2];
3813
+ }
3814
+ if (BUILD.hostListener) {
3815
+ cmpMeta.$listeners$ = compactMeta[3];
3816
+ }
3817
+ if (BUILD.watchCallback) {
3818
+ cmpMeta.$watchers$ = Cstr.$watchers$;
3819
+ }
3820
+ if (BUILD.reflect) {
3821
+ cmpMeta.$attrsToReflect$ = [];
3822
+ }
3823
+ if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3824
+ cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
3825
+ }
3826
+ if (BUILD.experimentalSlotFixes) {
3827
+ if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3828
+ patchPseudoShadowDom(Cstr.prototype);
3829
+ }
3830
+ } else {
3831
+ if (BUILD.slotChildNodesFix) {
3832
+ patchChildSlotNodes(Cstr.prototype);
3833
+ }
3834
+ if (BUILD.cloneNodeFix) {
3835
+ patchCloneNode(Cstr.prototype);
3836
+ }
3837
+ if (BUILD.appendChildSlotFix) {
3838
+ patchSlotAppendChild(Cstr.prototype);
3839
+ }
3840
+ if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
3841
+ patchTextContent(Cstr.prototype);
3842
+ }
3843
+ }
3844
+ if (BUILD.hydrateClientSide && BUILD.shadowDom) {
3845
+ hydrateScopedToShadow();
3846
+ }
3847
+ const originalConnectedCallback = Cstr.prototype.connectedCallback;
3848
+ const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
3849
+ Object.assign(Cstr.prototype, {
3850
+ __hasHostListenerAttached: false,
3851
+ __registerHost() {
3852
+ registerHost(this, cmpMeta);
3853
+ },
3854
+ connectedCallback() {
3855
+ if (!this.__hasHostListenerAttached) {
3856
+ const hostRef = getHostRef(this);
3857
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
3858
+ this.__hasHostListenerAttached = true;
3859
+ }
3860
+ connectedCallback(this);
3861
+ if (originalConnectedCallback) {
3862
+ originalConnectedCallback.call(this);
3863
+ }
3864
+ },
3865
+ disconnectedCallback() {
3866
+ disconnectedCallback(this);
3867
+ if (originalDisconnectedCallback) {
3868
+ originalDisconnectedCallback.call(this);
3869
+ }
3870
+ },
3871
+ __attachShadow() {
3872
+ if (supportsShadow) {
3873
+ if (!this.shadowRoot) {
3874
+ if (BUILD.shadowDelegatesFocus) {
3875
+ this.attachShadow({
3876
+ mode: "open",
3877
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
3878
+ });
3879
+ } else {
3880
+ this.attachShadow({ mode: "open" });
3881
+ }
3882
+ } else {
3883
+ if (this.shadowRoot.mode !== "open") {
3884
+ throw new Error(
3885
+ `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`
3886
+ );
3887
+ }
3888
+ }
3889
+ } else {
3890
+ this.shadowRoot = this;
3891
+ }
3892
+ }
3893
+ });
3894
+ Cstr.is = cmpMeta.$tagName$;
3895
+ return proxyComponent(Cstr, cmpMeta, 1 /* isElementConstructor */ | 2 /* proxyState */);
3896
+ };
3897
+ var forceModeUpdate = (elm) => {
3898
+ if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {
3899
+ const mode = computeMode(elm);
3900
+ const hostRef = getHostRef(elm);
3901
+ if (hostRef.$modeName$ !== mode) {
3902
+ const cmpMeta = hostRef.$cmpMeta$;
3903
+ const oldScopeId = elm["s-sc"];
3904
+ const scopeId2 = getScopeId(cmpMeta, mode);
3905
+ const style = elm.constructor.style[mode];
3906
+ const flags = cmpMeta.$flags$;
3907
+ if (style) {
3908
+ if (!styles.has(scopeId2)) {
3909
+ registerStyle(scopeId2, style, !!(flags & 1 /* shadowDomEncapsulation */));
3910
+ }
3911
+ hostRef.$modeName$ = mode;
3912
+ elm.classList.remove(oldScopeId + "-h", oldScopeId + "-s");
3913
+ attachStyles(hostRef);
3914
+ forceUpdate(elm);
3915
+ }
3916
+ }
3917
+ }
3918
+ };
3919
+
3920
+ // src/runtime/hmr-component.ts
3921
+ var hmrStart = (hostElement, cmpMeta, hmrVersionId) => {
3922
+ const hostRef = getHostRef(hostElement);
3923
+ hostRef.$flags$ = 1 /* hasConnected */;
3924
+ initializeComponent(hostElement, hostRef, cmpMeta, hmrVersionId);
3925
+ };
3926
+
3927
+ // src/runtime/bootstrap-lazy.ts
3928
+ var bootstrapLazy = (lazyBundles, options = {}) => {
3929
+ var _a;
3930
+ if (BUILD.profile && performance.mark) {
3931
+ performance.mark("st:app:start");
3932
+ }
3933
+ installDevTools();
3934
+ if (!win.document) {
3935
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
3936
+ return;
3937
+ }
3938
+ const endBootstrap = createTime("bootstrapLazy");
3939
+ const cmpTags = [];
3940
+ const exclude = options.exclude || [];
3941
+ const customElements2 = win.customElements;
3942
+ const head = win.document.head;
3943
+ const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
3944
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
3945
+ const deferredConnectedCallbacks = [];
3946
+ let appLoadFallback;
3947
+ let isBootstrapping = true;
3948
+ Object.assign(plt, options);
3949
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
3950
+ if (BUILD.asyncQueue) {
3951
+ if (options.syncQueue) {
3952
+ plt.$flags$ |= 4 /* queueSync */;
3953
+ }
3954
+ }
3955
+ if (BUILD.hydrateClientSide) {
3956
+ plt.$flags$ |= 2 /* appLoaded */;
3957
+ }
3958
+ if (BUILD.hydrateClientSide && BUILD.shadowDom) {
3959
+ hydrateScopedToShadow();
3960
+ }
3961
+ let hasSlotRelocation = false;
3962
+ lazyBundles.map((lazyBundle) => {
3963
+ lazyBundle[1].map((compactMeta) => {
3964
+ var _a2;
3965
+ const cmpMeta = {
3966
+ $flags$: compactMeta[0],
3967
+ $tagName$: compactMeta[1],
3968
+ $members$: compactMeta[2],
3969
+ $listeners$: compactMeta[3]
3970
+ };
3971
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
3972
+ hasSlotRelocation = true;
3973
+ }
3974
+ if (BUILD.member) {
3975
+ cmpMeta.$members$ = compactMeta[2];
3976
+ }
3977
+ if (BUILD.hostListener) {
3978
+ cmpMeta.$listeners$ = compactMeta[3];
3979
+ }
3980
+ if (BUILD.reflect) {
3981
+ cmpMeta.$attrsToReflect$ = [];
3982
+ }
3983
+ if (BUILD.watchCallback) {
3984
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
3985
+ }
3986
+ if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3987
+ cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
3988
+ }
3989
+ const tagName = BUILD.transformTagName && options.transformTagName ? options.transformTagName(cmpMeta.$tagName$) : cmpMeta.$tagName$;
3990
+ const HostElement = class extends HTMLElement {
3991
+ // StencilLazyHost
3992
+ constructor(self) {
3993
+ super(self);
3994
+ this.hasRegisteredEventListeners = false;
3995
+ self = this;
3996
+ registerHost(self, cmpMeta);
3997
+ if (BUILD.shadowDom && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3998
+ if (supportsShadow) {
3999
+ if (!self.shadowRoot) {
4000
+ if (BUILD.shadowDelegatesFocus) {
4001
+ self.attachShadow({
4002
+ mode: "open",
4003
+ delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
4004
+ });
4005
+ } else {
4006
+ self.attachShadow({ mode: "open" });
4007
+ }
4008
+ } else {
4009
+ if (self.shadowRoot.mode !== "open") {
4010
+ throw new Error(
4011
+ `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
4012
+ );
4013
+ }
4014
+ }
4015
+ } else if (!BUILD.hydrateServerSide && !("shadowRoot" in self)) {
4016
+ self.shadowRoot = self;
4017
+ }
4018
+ }
4019
+ }
4020
+ connectedCallback() {
4021
+ const hostRef = getHostRef(this);
4022
+ if (!this.hasRegisteredEventListeners) {
4023
+ this.hasRegisteredEventListeners = true;
4024
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$, false);
4025
+ }
4026
+ if (appLoadFallback) {
4027
+ clearTimeout(appLoadFallback);
4028
+ appLoadFallback = null;
4029
+ }
4030
+ if (isBootstrapping) {
4031
+ deferredConnectedCallbacks.push(this);
4032
+ } else {
4033
+ plt.jmp(() => connectedCallback(this));
4034
+ }
4035
+ }
4036
+ disconnectedCallback() {
4037
+ plt.jmp(() => disconnectedCallback(this));
4038
+ plt.raf(() => {
4039
+ var _a3;
4040
+ const hostRef = getHostRef(this);
4041
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
4042
+ if (i2 > -1) {
4043
+ deferredConnectedCallbacks.splice(i2, 1);
4044
+ }
4045
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
4046
+ delete hostRef.$vnode$.$elm$;
4047
+ }
4048
+ });
4049
+ }
4050
+ componentOnReady() {
4051
+ return getHostRef(this).$onReadyPromise$;
4052
+ }
4053
+ };
4054
+ if (BUILD.experimentalSlotFixes) {
4055
+ if (BUILD.scoped && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
4056
+ patchPseudoShadowDom(HostElement.prototype);
4057
+ }
4058
+ } else {
4059
+ if (BUILD.slotChildNodesFix) {
4060
+ patchChildSlotNodes(HostElement.prototype);
4061
+ }
4062
+ if (BUILD.cloneNodeFix) {
4063
+ patchCloneNode(HostElement.prototype);
4064
+ }
4065
+ if (BUILD.appendChildSlotFix) {
4066
+ patchSlotAppendChild(HostElement.prototype);
4067
+ }
4068
+ if (BUILD.scopedSlotTextContentFix && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
4069
+ patchTextContent(HostElement.prototype);
4070
+ }
4071
+ }
4072
+ if (BUILD.formAssociated && cmpMeta.$flags$ & 64 /* formAssociated */) {
4073
+ HostElement.formAssociated = true;
4074
+ }
4075
+ if (BUILD.hotModuleReplacement) {
4076
+ HostElement.prototype["s-hmr"] = function(hmrVersionId) {
4077
+ hmrStart(this, cmpMeta, hmrVersionId);
4078
+ };
4079
+ }
4080
+ cmpMeta.$lazyBundleId$ = lazyBundle[0];
4081
+ if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
4082
+ cmpTags.push(tagName);
4083
+ customElements2.define(
4084
+ tagName,
4085
+ proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
4086
+ );
4087
+ }
4088
+ });
4089
+ });
4090
+ if (cmpTags.length > 0) {
4091
+ if (hasSlotRelocation) {
4092
+ dataStyles.textContent += SLOT_FB_CSS;
4093
+ }
4094
+ if (BUILD.invisiblePrehydration && (BUILD.hydratedClass || BUILD.hydratedAttribute)) {
4095
+ dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
4096
+ }
4097
+ if (dataStyles.innerHTML.length) {
4098
+ dataStyles.setAttribute("data-styles", "");
4099
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
4100
+ if (nonce != null) {
4101
+ dataStyles.setAttribute("nonce", nonce);
4102
+ }
4103
+ head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
4104
+ }
4105
+ }
4106
+ isBootstrapping = false;
4107
+ if (deferredConnectedCallbacks.length) {
4108
+ deferredConnectedCallbacks.map((host) => host.connectedCallback());
4109
+ } else {
4110
+ if (BUILD.profile) {
4111
+ plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30, "timeout"));
4112
+ } else {
4113
+ plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
4114
+ }
4115
+ }
4116
+ endBootstrap();
4117
+ };
4118
+
4119
+ // src/runtime/fragment.ts
4120
+ var Fragment = (_, children) => children;
4121
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
4122
+ if (BUILD.hostListener && listeners && win.document) {
4123
+ if (BUILD.hostListenerTargetParent) {
4124
+ if (attachParentListeners) {
4125
+ listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
4126
+ } else {
4127
+ listeners = listeners.filter(([flags]) => !(flags & 32 /* TargetParent */));
4128
+ }
4129
+ }
4130
+ listeners.map(([flags, name, method]) => {
4131
+ const target = BUILD.hostListenerTarget ? getHostListenerTarget(win.document, elm, flags) : elm;
4132
+ const handler = hostListenerProxy(hostRef, method);
4133
+ const opts = hostListenerOpts(flags);
4134
+ plt.ael(target, name, handler, opts);
4135
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
4136
+ });
4137
+ }
4138
+ };
4139
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
4140
+ var _a;
4141
+ try {
4142
+ if (BUILD.lazyLoad) {
4143
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
4144
+ (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
4145
+ } else {
4146
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
4147
+ }
4148
+ } else {
4149
+ hostRef.$hostElement$[methodName](ev);
4150
+ }
4151
+ } catch (e) {
4152
+ consoleError(e, hostRef.$hostElement$);
4153
+ }
4154
+ };
4155
+ var getHostListenerTarget = (doc, elm, flags) => {
4156
+ if (BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) {
4157
+ return doc;
4158
+ }
4159
+ if (BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) {
4160
+ return win;
4161
+ }
4162
+ if (BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) {
4163
+ return doc.body;
4164
+ }
4165
+ if (BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement) {
4166
+ return elm.parentElement;
4167
+ }
4168
+ return elm;
4169
+ };
4170
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
4171
+ passive: (flags & 1 /* Passive */) !== 0,
4172
+ capture: (flags & 2 /* Capture */) !== 0
4173
+ } : (flags & 2 /* Capture */) !== 0;
4174
+
4175
+ // src/runtime/nonce.ts
4176
+ var setNonce = (nonce) => plt.$nonce$ = nonce;
4177
+
4178
+ // src/runtime/platform-options.ts
4179
+ var setPlatformOptions = (opts) => Object.assign(plt, opts);
4180
+
4181
+ // src/runtime/vdom/vdom-annotations.ts
4182
+ var insertVdomAnnotations = (doc, staticComponents) => {
4183
+ if (doc != null) {
4184
+ const docData = STENCIL_DOC_DATA in doc ? doc[STENCIL_DOC_DATA] : { ...DEFAULT_DOC_DATA };
4185
+ docData.staticComponents = new Set(staticComponents);
4186
+ const orgLocationNodes = [];
4187
+ parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
4188
+ orgLocationNodes.forEach((orgLocationNode) => {
4189
+ var _a;
4190
+ if (orgLocationNode != null && orgLocationNode["s-nr"]) {
4191
+ const nodeRef = orgLocationNode["s-nr"];
4192
+ let hostId = nodeRef["s-host-id"];
4193
+ let nodeId = nodeRef["s-node-id"];
4194
+ let childId = `${hostId}.${nodeId}`;
4195
+ if (hostId == null) {
4196
+ hostId = 0;
4197
+ docData.rootLevelIds++;
4198
+ nodeId = docData.rootLevelIds;
4199
+ childId = `${hostId}.${nodeId}`;
4200
+ if (nodeRef.nodeType === 1 /* ElementNode */) {
4201
+ nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
4202
+ if (typeof nodeRef["s-sn"] === "string" && !nodeRef.getAttribute("slot")) {
4203
+ nodeRef.setAttribute("s-sn", nodeRef["s-sn"]);
4204
+ }
4205
+ } else if (nodeRef.nodeType === 3 /* TextNode */) {
4206
+ if (hostId === 0) {
4207
+ const textContent = (_a = nodeRef.nodeValue) == null ? void 0 : _a.trim();
4208
+ if (textContent === "") {
4209
+ orgLocationNode.remove();
4210
+ return;
4211
+ }
4212
+ }
4213
+ const commentBeforeTextNode = doc.createComment(childId);
4214
+ commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
4215
+ insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
4216
+ } else if (nodeRef.nodeType === 8 /* CommentNode */) {
4217
+ const commentBeforeTextNode = doc.createComment(childId);
4218
+ commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
4219
+ nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
4220
+ }
4221
+ }
4222
+ let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
4223
+ const orgLocationParentNode = orgLocationNode.parentElement;
4224
+ if (orgLocationParentNode) {
4225
+ if (orgLocationParentNode["s-en"] === "") {
4226
+ orgLocationNodeId += `.`;
4227
+ } else if (orgLocationParentNode["s-en"] === "c") {
4228
+ orgLocationNodeId += `.c`;
4229
+ }
4230
+ }
4231
+ orgLocationNode.nodeValue = orgLocationNodeId;
4232
+ }
4233
+ });
4234
+ }
4235
+ };
4236
+ var parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
4237
+ var _a;
4238
+ if (node == null) {
4239
+ return;
4240
+ }
4241
+ if (node["s-nr"] != null) {
4242
+ orgLocationNodes.push(node);
4243
+ }
4244
+ if (node.nodeType === 1 /* ElementNode */) {
4245
+ const childNodes = [...Array.from(node.childNodes), ...Array.from(((_a = node.shadowRoot) == null ? void 0 : _a.childNodes) || [])];
4246
+ childNodes.forEach((childNode) => {
4247
+ const hostRef = getHostRef(childNode);
4248
+ if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
4249
+ const cmpData = {
4250
+ nodeIds: 0
4251
+ };
4252
+ insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);
4253
+ }
4254
+ parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);
4255
+ });
4256
+ }
4257
+ };
4258
+ var insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
4259
+ if (vnode != null) {
4260
+ const hostId = ++docData.hostIds;
4261
+ hostElm.setAttribute(HYDRATE_ID, hostId);
4262
+ if (hostElm["s-cr"] != null) {
4263
+ hostElm["s-cr"].nodeValue = `${CONTENT_REF_ID}.${hostId}`;
4264
+ }
4265
+ if (vnode.$children$ != null) {
4266
+ const depth = 0;
4267
+ vnode.$children$.forEach((vnodeChild, index) => {
4268
+ insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);
4269
+ });
4270
+ }
4271
+ if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {
4272
+ const parent = hostElm.parentElement;
4273
+ if (parent && parent.childNodes) {
4274
+ const parentChildNodes = Array.from(parent.childNodes);
4275
+ const comment = parentChildNodes.find(
4276
+ (node) => node.nodeType === 8 /* CommentNode */ && node["s-sr"]
4277
+ );
4278
+ if (comment) {
4279
+ const index = parentChildNodes.indexOf(hostElm) - 1;
4280
+ vnode.$elm$.setAttribute(
4281
+ HYDRATE_CHILD_ID,
4282
+ `${comment["s-host-id"]}.${comment["s-node-id"]}.0.${index}`
4283
+ );
4284
+ }
4285
+ }
4286
+ }
4287
+ }
4288
+ };
4289
+ var insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {
4290
+ const childElm = vnodeChild.$elm$;
4291
+ if (childElm == null) {
4292
+ return;
4293
+ }
4294
+ const nodeId = cmpData.nodeIds++;
4295
+ const childId = `${hostId}.${nodeId}.${depth}.${index}`;
4296
+ childElm["s-host-id"] = hostId;
4297
+ childElm["s-node-id"] = nodeId;
4298
+ if (childElm.nodeType === 1 /* ElementNode */) {
4299
+ childElm.setAttribute(HYDRATE_CHILD_ID, childId);
4300
+ if (typeof childElm["s-sn"] === "string" && !childElm.getAttribute("slot")) {
4301
+ childElm.setAttribute("s-sn", childElm["s-sn"]);
4302
+ }
4303
+ } else if (childElm.nodeType === 3 /* TextNode */) {
4304
+ const parentNode = childElm.parentNode;
4305
+ const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
4306
+ if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
4307
+ const textNodeId = `${TEXT_NODE_ID}.${childId}`;
4308
+ const commentBeforeTextNode = doc.createComment(textNodeId);
4309
+ insertBefore(parentNode, commentBeforeTextNode, childElm);
4310
+ }
4311
+ } else if (childElm.nodeType === 8 /* CommentNode */) {
4312
+ if (childElm["s-sr"]) {
4313
+ const slotName = childElm["s-sn"] || "";
4314
+ const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;
4315
+ childElm.nodeValue = slotNodeId;
4316
+ }
4317
+ }
4318
+ if (vnodeChild.$children$ != null) {
4319
+ const childDepth = depth + 1;
4320
+ vnodeChild.$children$.forEach((vnode, index2) => {
4321
+ insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index2);
4322
+ });
4323
+ }
4324
+ };
4325
+
4326
+ const StencilCore = /*#__PURE__*/Object.freeze({
4327
+ __proto__: null,
4328
+ BUILD: BUILD,
4329
+ Build: Build,
4330
+ Env: Env,
4331
+ Fragment: Fragment,
4332
+ H: H,
4333
+ HTMLElement: H,
4334
+ Host: Host,
4335
+ NAMESPACE: NAMESPACE,
4336
+ STENCIL_DEV_MODE: STENCIL_DEV_MODE,
4337
+ addHostEventListeners: addHostEventListeners,
4338
+ bootstrapLazy: bootstrapLazy,
4339
+ cmpModules: cmpModules,
4340
+ connectedCallback: connectedCallback,
4341
+ consoleDevError: consoleDevError,
4342
+ consoleDevInfo: consoleDevInfo,
4343
+ consoleDevWarn: consoleDevWarn,
4344
+ consoleError: consoleError,
4345
+ createEvent: createEvent,
4346
+ defineCustomElement: defineCustomElement,
4347
+ disconnectedCallback: disconnectedCallback,
4348
+ forceModeUpdate: forceModeUpdate,
4349
+ forceUpdate: forceUpdate,
4350
+ getAssetPath: getAssetPath,
4351
+ getElement: getElement,
4352
+ getHostRef: getHostRef,
4353
+ getMode: getMode,
4354
+ getRenderingRef: getRenderingRef,
4355
+ getValue: getValue,
4356
+ h: h,
4357
+ insertVdomAnnotations: insertVdomAnnotations,
4358
+ isMemberInElement: isMemberInElement,
4359
+ loadModule: loadModule,
4360
+ modeResolutionChain: modeResolutionChain,
4361
+ nextTick: nextTick,
4362
+ parsePropertyValue: parsePropertyValue,
4363
+ plt: plt,
4364
+ postUpdateComponent: postUpdateComponent,
4365
+ promiseResolve: promiseResolve,
4366
+ proxyComponent: proxyComponent,
4367
+ proxyCustomElement: proxyCustomElement,
4368
+ readTask: readTask,
4369
+ registerHost: registerHost,
4370
+ registerInstance: registerInstance,
4371
+ renderVdom: renderVdom,
4372
+ setAssetPath: setAssetPath,
4373
+ setErrorHandler: setErrorHandler,
4374
+ setMode: setMode,
4375
+ setNonce: setNonce,
4376
+ setPlatformHelpers: setPlatformHelpers,
4377
+ setPlatformOptions: setPlatformOptions,
4378
+ setValue: setValue,
4379
+ styles: styles,
4380
+ supportsConstructableStylesheets: supportsConstructableStylesheets,
4381
+ supportsListenerOptions: supportsListenerOptions,
4382
+ supportsShadow: supportsShadow,
4383
+ win: win,
4384
+ writeTask: writeTask
4385
+ });
4386
+
4387
+ exports.BUILD = BUILD;
4388
+ exports.Build = Build;
4389
+ exports.Fragment = Fragment;
4390
+ exports.H = H;
4391
+ exports.Host = Host;
4392
+ exports.NAMESPACE = NAMESPACE;
4393
+ exports.StencilCore = StencilCore;
4394
+ exports.bootstrapLazy = bootstrapLazy;
4395
+ exports.consoleDevInfo = consoleDevInfo;
4396
+ exports.createEvent = createEvent;
4397
+ exports.getElement = getElement;
4398
+ exports.h = h;
4399
+ exports.promiseResolve = promiseResolve;
4400
+ exports.registerInstance = registerInstance;
4401
+ exports.setNonce = setNonce;
4402
+ exports.win = win;
4403
+ exports.writeTask = writeTask;