@zeniai/web-cockpit-ui 1.14.90-qa → 1.14.91-dev

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 (437) hide show
  1. package/dist/assets/ACHDetailsPage-B6sY0jN6-B0gf8H4B.js +21 -0
  2. package/dist/assets/{AIPerformancePage-DHF_70JI-Byb0JaRY.js → AIPerformancePage-BWK9fXrz-DKsZ1mo0.js} +43 -43
  3. package/dist/assets/AccountInfoPage-DfT5DDiZ-fWZyYCg5.js +18 -0
  4. package/dist/assets/AccountInfoPageContent-nUi26Aww-BYypek4H.js +149 -0
  5. package/dist/assets/AccountLockedInfoModal-BROj4bmE-BVM1T1YI.js +59 -0
  6. package/dist/assets/AccountReconDetailsDrawerPage-C-3FFCQZ-sRbxt9OR.js +239 -0
  7. package/dist/assets/{AccountRow-D2Ypckgj-BVuVsxAI.js → AccountRow-BM2kGWyR-T6iB2hx_.js} +24 -24
  8. package/dist/assets/AccountsPromoCardStack-CNCG5uPJ-CVvmiGCx.js +207 -0
  9. package/dist/assets/AddAddressForCardDrawer-BuAtFO1w-BFBt3SFQ.js +6 -0
  10. package/dist/assets/{AddToWalletPage-CmT5jSb5-BtE7INh2.js → AddToWalletPage-DyrcWdBZ-CvPiU8kF.js} +32 -32
  11. package/dist/assets/{AgingReportsPage-BeUGvj3b-BnHb3lWK.js → AgingReportsPage-CmluxKG3-A44UbSFN.js} +9 -9
  12. package/dist/assets/{AllUserItems-CmlMyz-f-BE3QXVOa.js → AllUserItems-CVZZU-J3-TfKbUj2d.js} +9 -9
  13. package/dist/assets/ApAgingDetailPage-CoNxqskm-DFDFQfze.js +46 -0
  14. package/dist/assets/AppBasePage-CTGNzUtN-DSfPwIJw.js +71 -0
  15. package/dist/assets/AppDrawerContent-59dQVUxu-C64nAWzc.js +91 -0
  16. package/dist/assets/ApprovalRulesSettingsPage-XEW5sdNg-BbhudnSk.js +47 -0
  17. package/dist/assets/ArAgingChart-D3Ym4gVE-BqVBnPwY.js +24 -0
  18. package/dist/assets/ArAgingDetailPage-BLEJSLJJ-DwMAtZnW.js +46 -0
  19. package/dist/assets/AttachmentView-DSP80cjm-UNIl1Ai8.js +101 -0
  20. package/dist/assets/{BankAccountSection-BVZK5jmO-CjTZMznk.js → BankAccountSection-DRrNcA79-hP-Vs5m_.js} +8 -8
  21. package/dist/assets/BankAccountWarningSection-Ub-gsfhE-CrMug0PW.js +51 -0
  22. package/dist/assets/{BankConnectionsSettingsPage-BN3lAARB-B0yEFHuK.js → BankConnectionsSettingsPage-BcTtJTbg-algC_RED.js} +29 -29
  23. package/dist/assets/BillDetailPage-D7AQyxwr-Cr5mMjBH.js +266 -0
  24. package/dist/assets/BillPayApprovalRuleDetailPage-BQWGENO8-OS81cubl.js +27 -0
  25. package/dist/assets/{BillPayApprovalRulesPage-B8HbVvc9-CNKY0-NR.js → BillPayApprovalRulesPage-BbA1Nwqe-BwMbtGVn.js} +17 -17
  26. package/dist/assets/BillPayPromoPage-DSTS_vBW-BNfdixF0.js +84 -0
  27. package/dist/assets/BillPaySetUpPage-CvlVPVCA-C-Yq8DpY.js +42 -0
  28. package/dist/assets/BillingSettingsPage-nKpHtd4C-Bnbrb4t9.js +44 -0
  29. package/dist/assets/BillsBulkReviewDrawerPage-DNHAoceL-Dw8wGAVZ.js +1 -0
  30. package/dist/assets/BoxItem-Bjv3WNXO-DVhc5wWw.js +53 -0
  31. package/dist/assets/BusinessVerificationPage-Bj4D9bX2-BIO97DuN.js +138 -0
  32. package/dist/assets/CardNumberSubText-BYY-Inxd-BdlFsn4_.js +21 -0
  33. package/dist/assets/{CashbackDetailPage-D3WylWVP-D9Vs2ft8.js → CashbackDetailPage-D9UiTqp9-zR6MfAmm.js} +23 -23
  34. package/dist/assets/{ChargeCardDetailPage-BUsGBwBf-B-LmCTsN.js → ChargeCardDetailPage-C5EdiIyl-DLQH13JM.js} +24 -24
  35. package/dist/assets/{ChargeCardListPage-Jhx05dVV-CgbSqG5e.js → ChargeCardListPage-DZwz1qoD-C4LK4t_r.js} +17 -17
  36. package/dist/assets/{ChargeCardListTable-D-eYWaxh-OyS_l2le.js → ChargeCardListTable-D5B05Z1F-BFq9lu6-.js} +21 -21
  37. package/dist/assets/ChargeCardPromoPage-CDJMtGJb-BonChypf.js +222 -0
  38. package/dist/assets/ChargeCardSetupPage-CVV24gS9-Bz9Vbd0f.js +36 -0
  39. package/dist/assets/ChargeCardStatementsPage-CmjBoi5e-CP137h_S.js +60 -0
  40. package/dist/assets/CheckDepositDrawerPage-CYOhT5Qz-Ctri9wNN.js +206 -0
  41. package/dist/assets/{CollapsableReportTable-I40BZv7o-d2_h6r8O.js → CollapsableReportTable-hL_Ycouc-B8J7Q_nq.js} +81 -81
  42. package/dist/assets/{CompanyOfficerDetailsSection-ChsNKXbx-BF5MOIbR.js → CompanyOfficerDetailsSection-DR_6TlQa-eD8A7jcO.js} +23 -23
  43. package/dist/assets/CompanyPassportCard-B4chn7-Q-D5SPmBv_.js +42 -0
  44. package/dist/assets/{CompanyPassportPage-DG1Fa_Uw-Dkbt-nxV.js → CompanyPassportPage-oT9HnnPQ-SX0lC40Z.js} +136 -136
  45. package/dist/assets/CompleteProfile-BgH4v76Z-8UAVvvgt.js +52 -0
  46. package/dist/assets/ConfettiBurst-Cl6jHJ8H-LC2meCe-.js +1 -0
  47. package/dist/assets/{CreateOrEditVendorPage-DVzMO96w-D2_PioHE.js → CreateOrEditVendorPage-CW-u7pJU-p324jU3k.js} +16 -16
  48. package/dist/assets/CreditCardPaymentDrawerPage-D30M7ol4-DoXJ5bDN.js +224 -0
  49. package/dist/assets/CurrencySelectField-DOCEstMc-DZU689ma.js +139 -0
  50. package/dist/assets/CustomerOnboardingActivationPage-DMPNjFL_-ku4Vuy0S.js +88 -0
  51. package/dist/assets/CustomerOnboardingContainerPage-SmOFmXBW-DTgF2r26.js +1 -0
  52. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-C4Z1pDVe-BqoeEQuE.js → CustomerOnboardingDetailPageSkeleton-CBYo4VQn-Dn7fU-s8.js} +20 -20
  53. package/dist/assets/CustomerOnboardingNoStepsPage-EBVRCYfJ-CfvYqECa.js +66 -0
  54. package/dist/assets/{CustomerOnboardingPage-C3FgZjAN-BMoiiOVQ.js → CustomerOnboardingPage-TJK6s-LM-BKRL2lJB.js} +10 -10
  55. package/dist/assets/CustomerOnboardingProductSuitePage-lNIP5gSu-PR2itKHa.js +202 -0
  56. package/dist/assets/{Dashboard-D_oTtu1--DmU_Kxzw.js → Dashboard-WiE9IRrh-Cv0kOt8p.js} +63 -63
  57. package/dist/assets/{DashboardReportPage-Dprj3eUQ-BvCOtKTf.js → DashboardReportPage-BKHl_IVD-C4Ea2qys.js} +21 -21
  58. package/dist/assets/DashboardSidebarBackgroundAnimation-B1mJObim-BrrhB9xn.js +12 -0
  59. package/dist/assets/{DepositAccTransactionItem-C2oP415b-fO_vukRP.js → DepositAccTransactionItem-C8tChaJS-DUssbHtI.js} +12 -12
  60. package/dist/assets/DepositAccTransactionListPage-B6px7upV-CeIhvwtb.js +66 -0
  61. package/dist/assets/DomesticWireDetailsPage-BFQJmzYm-RX-JpFy3.js +21 -0
  62. package/dist/assets/{DownloadOverlay-BwddFmV2-TXwTh2dm.js → DownloadOverlay-DB-qx46O-j8z4pSob.js} +90 -90
  63. package/dist/assets/DrawerPage-Bha9ElcW-B8Be3mMf.js +118 -0
  64. package/dist/assets/EditPeoplePage-B6QD5Vld-jl0Ywq6s.js +55 -0
  65. package/dist/assets/{EditReimbursementDetailPage-DwCiVkeu-CHb4Vx_R.js → EditReimbursementDetailPage-EplOf2mP-0BJtsB6D.js} +20 -20
  66. package/dist/assets/EntityDetailPage-5Cu1qehd-DbU14HUf.js +18 -0
  67. package/dist/assets/EntitySummarySection-D6z6-dM7-CxR6H9p6.js +149 -0
  68. package/dist/assets/{ExpenseAutomationOverviewPage-hl_3Pc0g-DYxAAMa6.js → ExpenseAutomationOverviewPage-DkoxczRc-Nhh5EsPg.js} +27 -27
  69. package/dist/assets/ExpenseAutomationPage-Na3XKgcg-v_T_dNPC.js +1650 -0
  70. package/dist/assets/{ExpressPayPage-BpfkmJ_I-Cr6J8360.js → ExpressPayPage-DWGl_gml-BK4q9z9-.js} +19 -19
  71. package/dist/assets/FeaturePreviewPage-BgkpUPMm-CjuE-Vy6.js +11 -0
  72. package/dist/assets/{FollowStepsSection-Bu3RG_GH-1o9BWCUV.js → FollowStepsSection-64oy2OLD-mYi4qCkY.js} +23 -23
  73. package/dist/assets/{GlobalReviewListPage-D4BD7q-I-IVn_04O3.js → GlobalReviewListPage-DHfTyj2C-jQOPvWvS.js} +48 -48
  74. package/dist/assets/{InformationCardStack-B9wnkR3p-InW9f_7k.js → InformationCardStack-Dw3lhl2I-7einUDdd.js} +8 -8
  75. package/dist/assets/InsightsCardStack-BiEswY1Z-B0ppu_rT.js +79 -0
  76. package/dist/assets/InsightsSection-DvqCilqy-J94KiGaL.js +27 -0
  77. package/dist/assets/IntegrationsSettingsPage-DzVYf5ff-EFzWzTcS.js +57 -0
  78. package/dist/assets/InternationalWireSwiftDetailsPage-DTHcuQsH-DCnTBpNn.js +171 -0
  79. package/dist/assets/{InternationalWireVerificationPage-B8AOwcSX-O5d4_jx5.js → InternationalWireVerificationPage-BzyRqd-m-CtMekcQE.js} +13 -13
  80. package/dist/assets/InviteFormPage-CaJB3ss1-BX5i7EqT.js +312 -0
  81. package/dist/assets/{InvitePageListView-Dw8kwEFd-BOBOJq-T.js → InvitePageListView-8Ltt8tHx-CtYoDyrk.js} +49 -49
  82. package/dist/assets/InvitePeoplePage-A7oKAD7M-BQc_PdIV.js +12 -0
  83. package/dist/assets/InvoiceUploadSection-DomquLut-e92SA0tf.js +140 -0
  84. package/dist/assets/{IssueChargeCardPage-fumweN4Y-CbGa-1Sy.js → IssueChargeCardPage-DtIQ1Buk-DjM4t17X.js} +8 -8
  85. package/dist/assets/LabeledAddressValue-B_9lh-_a-DIizmhzb.js +49 -0
  86. package/dist/assets/LabeledAddressValueField-CC7T3qZQ-m9gvzhHo.js +45 -0
  87. package/dist/assets/LabeledControlledCheckBoxField-CeMM7Ci3-mZLzoQGL.js +16 -0
  88. package/dist/assets/{LabeledCreatableSingleSelectField-CnQsTYWe-BNKI3sBW.js → LabeledCreatableSingleSelectField-DKD0oEl8-gq-eDRMt.js} +12 -12
  89. package/dist/assets/LabeledDocumentField-Dy3jwAiL-49YAoImC.js +41 -0
  90. package/dist/assets/LabeledDropDownFormattedTextField-DDzM3r6s-ECrfBFdw.js +59 -0
  91. package/dist/assets/LabeledText-axaAGyUS-Dng_AeMD.js +42 -0
  92. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-CSEiKb8M-DUVObrd4.js → LabeledUserSingleSelectWithSubtitlesField-UlGND56Y-Bns3vXLL.js} +17 -17
  93. package/dist/assets/{LabeledZeniRolesDropDownField-CS_oKjBG-BYrCH7sg.js → LabeledZeniRolesDropDownField-dpz7g9jK-BS9FUIQq.js} +26 -26
  94. package/dist/assets/LinkJETransactionPage-CJniqVcu-DlmRVmek.js +98 -0
  95. package/dist/assets/{LockCardPage-DqQGGac2-DNRrTsHA.js → LockCardPage-CjO8cr2a-_f0132IP.js} +42 -42
  96. package/dist/assets/LowBalancePopup-DVS-w3b7-DP0lgN2T.js +34 -0
  97. package/dist/assets/MagicLinkACHDetailsPage-CUHMKmcj-B4JK6Tsk.js +1 -0
  98. package/dist/assets/MagicLinkDomesticWireDetailsPage-Dnc7OzKQ-CjkHVZHo.js +1 -0
  99. package/dist/assets/MagicLinkInternationalWireDetailsPage-sBpQkYwP-BFgoRuDp.js +1 -0
  100. package/dist/assets/MagicLinkSuccessPage-DAAoq3iT-c3oKtr_f.js +31 -0
  101. package/dist/assets/MagicLinkTitleSection-FMRBLlRJ-BOWrScDm.js +17 -0
  102. package/dist/assets/MailingDetailsSection-CiJ5JLA6-DddwOxAo.js +21 -0
  103. package/dist/assets/Menu-wpP8R1br-CxnIQs8p.js +17 -0
  104. package/dist/assets/MyBankConnectionsSettingsPage-DIIFgnkE-CogNLqVY.js +110 -0
  105. package/dist/assets/MyPendingActivationChargeCardListPage-Di_KYRgS-DRNBLhDG.js +6 -0
  106. package/dist/assets/MyProfileSettingsPage-m6vaeGgZ-chnTYzOu.js +85 -0
  107. package/dist/assets/NavBarWithPicker-C_qO8mgD-DUpFfabv.js +30 -0
  108. package/dist/assets/{NavigationArrow-Z9PgxZ-c-2tqZ4Fw-.js → NavigationArrow-BXYIj6Wz-DziJLhPd.js} +7 -7
  109. package/dist/assets/NavigationDots-BvKSgdgh-LQiuRx4x.js +15 -0
  110. package/dist/assets/{NewGlobalMerchantPage-YsnX4uQU-D0h-bx1p.js → NewGlobalMerchantPage-Dc3xEoiZ-C2aDiu95.js} +19 -19
  111. package/dist/assets/NoDataChart-C5ZP32zB-Co6FSXzL.js +26 -0
  112. package/dist/assets/NoDataTable-BnBYE8p_-CiELOEE2.js +8 -0
  113. package/dist/assets/NotFoundPage-CZ25GWwU-BIBXUzqs.js +46 -0
  114. package/dist/assets/{NotificationSettingsPage-DlU2NxiC-Dm2QaTZo.js → NotificationSettingsPage-DHvgj7Hu-D3suXG--.js} +28 -28
  115. package/dist/assets/NotificationsListConfig-BBLSv0sd-C4KCM8pw.js +1 -0
  116. package/dist/assets/{NotificationsPage-q0bK_5gs-jK6e_Uyw.js → NotificationsPage-CGVEC-Zc-C8fq9c_9.js} +34 -34
  117. package/dist/assets/{OpExByVendorPage-Boc7U8eu-CVJq9vF2.js → OpExByVendorPage-D55JZne--D9xmj7rz.js} +24 -24
  118. package/dist/assets/OverlayContainerPage-Daz3A7cI-D6qPPmeQ.js +11 -0
  119. package/dist/assets/{PandLWithForecastPage-B2eGvFPp-BaY0fBnf.js → PandLWithForecastPage-fVmttEKP-D6Evs_k0.js} +12 -12
  120. package/dist/assets/{PaymentAccountSetupBillingAddressSection-BP-_59EO-hGRsM6bI.js → PaymentAccountSetupBillingAddressSection-BiU8tQnm-4Kl9uXwr.js} +22 -22
  121. package/dist/assets/{PeoplePage-YMfZIga6-BEib8XAV.js → PeoplePage-QuuuX2AS-CUwuNLCQ.js} +13 -13
  122. package/dist/assets/Preview-D0lKYz6_.js +1 -0
  123. package/dist/assets/ProductsCarousel-zdZkfaiY-CKycG9Wt.js +142 -0
  124. package/dist/assets/{PromoBaseCards-CmOYEhSO-bExxN6kp.js → PromoBaseCards-flFtcbIg-iLyc6jwq.js} +14 -14
  125. package/dist/assets/QBOConnectionDialog-DNB2C1vQ-B6h7mZJt.js +51 -0
  126. package/dist/assets/QBOSetupSection-B59etoGz-Dx4Hkrje.js +79 -0
  127. package/dist/assets/ReimbursementApprovalRuleDetailPage-D7do3o0A-DaR0xdJA.js +32 -0
  128. package/dist/assets/{ReimbursementApprovalRulesPage-BkuYJ6qb-7dFuSzMb.js → ReimbursementApprovalRulesPage-BJ6GewQ2-D7efVmkv.js} +33 -33
  129. package/dist/assets/ReimbursementDetailPage-DKAtYSOy-C-uqjyM_.js +314 -0
  130. package/dist/assets/ReimbursementPromoPage-DKcSHlHp-XcrUKScH.js +84 -0
  131. package/dist/assets/ReimbursementSetUpPage-Y1e_hna--rh2VyUST.js +140 -0
  132. package/dist/assets/ReimbursementsBulkReviewDrawerPage-fgz8s4w9-CzZAxGly.js +1 -0
  133. package/dist/assets/ReloadCard-DjtdPHq5-BoSxtWCb.js +26 -0
  134. package/dist/assets/ReportTableViewSelector-C8e6IEWt-BJN3fro7.js +150 -0
  135. package/dist/assets/{ReportsPage-iJDifG6q-CYAyIPrv.js → ReportsPage-BIe0eDLC-D5ygJVqP.js} +12 -12
  136. package/dist/assets/{RevenueChart-BbOK-HCB-C8qpvMvb.js → RevenueChart-Cc0XrxLL-BB6kfchw.js} +35 -35
  137. package/dist/assets/ReviewDetailsPage-CU1AYWgR--SOiatSS.js +290 -0
  138. package/dist/assets/ReviewOverlay-CruJ9O84-BdMFQyaH.js +152 -0
  139. package/dist/assets/RoleWithToolTip-fC3byzzv-DteZC2-q.js +22 -0
  140. package/dist/assets/ScheduleDetailsFixedAssetsPage-CE3tUYhk-Aj3mnuFr.js +37 -0
  141. package/dist/assets/ScheduleDetailsPage-BhAqJ1Of-BNYzMpaE.js +37 -0
  142. package/dist/assets/{ScheduleSequenceTable-Bb7MJ-zJ-BYUE2OMk.js → ScheduleSequenceTable-NSt1juSD-BtySotUK.js} +21 -21
  143. package/dist/assets/ScreenRoutes-Ofrn7XPK.js +201 -0
  144. package/dist/assets/SetUpAccountSection-C1EnJv1V-nWkvB51T.js +378 -0
  145. package/dist/assets/SignIn-BhIof_Cm-Stp0fHNQ.js +463 -0
  146. package/dist/assets/SignInScreen-ApNcuhAj.js +1 -0
  147. package/dist/assets/SpendManagementListViewPage-BEWNNX_Z-Qf8TDCkQ.js +123 -0
  148. package/dist/assets/{SpendManagementPerTabPage-HzCmGr0--xZeoOzCY.js → SpendManagementPerTabPage-Vs1Eoxgd-DGhcXeqs.js} +43 -43
  149. package/dist/assets/{SpendManagementSection-LzT-Bnhy-7KIDrHzn.js → SpendManagementSection-C38Zpi1z-Hvu4v5m7.js} +16 -16
  150. package/dist/assets/StatementItem-bHInVThd-BfGU3kqj.js +31 -0
  151. package/dist/assets/StatementsPage-CGQhmaXx-CVtkQqM2.js +58 -0
  152. package/dist/assets/{StatusSwitcher-BPKr5BUW-iZy1SY4R.js → StatusSwitcher-7fiKLb5g-cQtYU__8.js} +10 -10
  153. package/dist/assets/{SubTabSwitcher-4dvyyQSv-B0aTRMDP.js → SubTabSwitcher-9AnfZiNy-CobTdTqd.js} +8 -8
  154. package/dist/assets/SummaryCard-DOycYLs1-BLeRuOD7.js +1 -0
  155. package/dist/assets/{TaskManagementPage-BiyyDIWi-DOn8-w1u.js → TaskManagementPage-CehyMnY0-BwJtO-U4.js} +29 -29
  156. package/dist/assets/TimeRangeSwitcher-Dq2FEgFR-DmMi5La_.js +64 -0
  157. package/dist/assets/{TimeframeSwitcher-u606tI8Z-CLiEbUCN.js → TimeframeSwitcher-By3xz_-m-1CBF6COV.js} +4 -4
  158. package/dist/assets/TimeframeSwitcherWithToggle-a3fmbzNR-B9R7QlVw.js +31 -0
  159. package/dist/assets/TopExCard-GEQpp_KY-74e79UYx.js +38 -0
  160. package/dist/assets/{TopExDetailPage-Cla8Hd-1-DK-xuoZs.js → TopExDetailPage-hid1dQYl-WgHXC6hE.js} +31 -31
  161. package/dist/assets/{TransactionDetailPage-BbjtQvBr-FXHAHiFr.js → TransactionDetailPage-CX4JW9WM-DyZTJ1bq.js} +44 -44
  162. package/dist/assets/TransactionList-BixeXh4Y-Il163hc_.js +147 -0
  163. package/dist/assets/{TransactionListBig-BOeu4-R4-o6UH9k2V.js → TransactionListBig-CGMMJQBd-KQNhkGbE.js} +25 -25
  164. package/dist/assets/TransactionListPage-CBVUTX4y-DWsla1LN.js +35 -0
  165. package/dist/assets/TransactionVendorDetailPage-CEbHH_0r-CS6QQqEG.js +80 -0
  166. package/dist/assets/{TransferDrawerPage-BTqCR3Hb-BWfDRvEr.js → TransferDrawerPage-BFd7uQnF-AGu3EQB7.js} +19 -19
  167. package/dist/assets/{TreasuryOverviewPage-CDJtsQsC-BAM2Gg0T.js → TreasuryOverviewPage-Bd58hOy8-P3TIcDYG.js} +50 -50
  168. package/dist/assets/{TreasuryPromoPage-Bqt6DcqL-CXIyIitA.js → TreasuryPromoPage-BvArufHi-B6OSOn5z.js} +10 -10
  169. package/dist/assets/TreasuryStatementsPage-YLCEBbRh-BeAedV0-.js +58 -0
  170. package/dist/assets/TreasuryTaxLetterPage-D_6mgQqi-CO3HXioV.js +58 -0
  171. package/dist/assets/TrendChart-D3dT6hUb-CRyvw86n.js +16 -0
  172. package/dist/assets/TrendWithTransactions-Gj-u5KXi-CpckXM1N.js +116 -0
  173. package/dist/assets/{UncategorizedAccountsMappingPage-CFx4P194-BZZ4iMs4.js → UncategorizedAccountsMappingPage-B3eRYolj-D-Jwo7-l.js} +10 -10
  174. package/dist/assets/UnitIntegrationPage-DpjR9hUu-BIdCIf5k.js +67 -0
  175. package/dist/assets/UploadAdditionalDocumentOverlay-COtszXUY-DBj80beJ.js +38 -0
  176. package/dist/assets/Vendor2FAPopup-C85mhuSb-SCWhQlz7.js +1 -0
  177. package/dist/assets/VendorACHDetailsPage-DeexeWpV-CvETHK8j.js +1 -0
  178. package/dist/assets/{VendorDetailPage-Dy9McuGu-d-ZpZ6aU.js → VendorDetailPage-BrbKfsL4-BYuDBwtU.js} +100 -100
  179. package/dist/assets/VendorDomesticWireDetailsPage-DBChSKlR-4iWeRYsC.js +1 -0
  180. package/dist/assets/{VendorFiling1099EditablePage-Y0hGO4RH-BToJSlm-.js → VendorFiling1099EditablePage-DgBLn3fd-DyXTQ39Q.js} +11 -11
  181. package/dist/assets/{VendorFirstReviewPage-C-pT1M36-D4-Nv1Fg.js → VendorFirstReviewPage-jc7-OExI-CcNlKzIr.js} +66 -66
  182. package/dist/assets/{VendorInternationalWireDetailsPage-CCMramET-BwYsNdGo.js → VendorInternationalWireDetailsPage-c6isgwH2-CfXEdhbK.js} +11 -11
  183. package/dist/assets/VendorInternationalWireSwiftDetailsPage-CywCx8-0-BWyYdePs.js +1 -0
  184. package/dist/assets/VendorsAccountsSection--VfdAF3H-aooc9xax.js +68 -0
  185. package/dist/assets/VerifyDevice-CaifjdR8-CqDImdvA.js +112 -0
  186. package/dist/assets/VideoPlayer-BVR9LPmm-Cf1X7mgb.js +78 -0
  187. package/dist/assets/VideoPopup-BEXc8o78-CxvDyO3n.js +31 -0
  188. package/dist/assets/WarningsDrawerPage-CboqfxzC-BsdL63Q1.js +92 -0
  189. package/dist/assets/{ZeniAccountDetailPage-BF8cg2oa-Df5W17bc.js → ZeniAccountDetailPage-Dujj0-XC-Bs0_mCxO.js} +33 -33
  190. package/dist/assets/{ZeniAccountListViewPage-BkdkYY8j-Bvi6PCOk.js → ZeniAccountListViewPage--SMJDGvC-B9VB-g9k.js} +18 -18
  191. package/dist/assets/ZeniAccountNavBarPieces-DqLJVQ5t-B6EqVL37.js +14 -0
  192. package/dist/assets/{ZeniAccountPromoPage-COAOIU03-B_FVyXMi.js → ZeniAccountPromoPage-BVjJvWsA-D_izrQ3u.js} +29 -29
  193. package/dist/assets/ZeniAccountSetupPage-Dvxst8RT-Dw_0q67c.js +36 -0
  194. package/dist/assets/ZeniCopyright-B88k3pkr-D_GBhPtz.js +1 -0
  195. package/dist/assets/ZeniTransferAmountSlider-1DS0MsTI-D_vM8ORb.js +63 -0
  196. package/dist/assets/add-to-wallet-DgdBD8_G-DvwlYBb0.js +1 -0
  197. package/dist/assets/agingReportHelper-ovKP-qSS-Cx4Hdid-.js +1 -0
  198. package/dist/assets/{analytics-DGBWhVbe.js → analytics-CHPpxU3b.js} +2 -2
  199. package/dist/assets/analyticsHelper-D88-Oppk.js +1 -0
  200. package/dist/assets/analyticsHelper-DmujELNG-B2_5NV-p.js +1 -0
  201. package/dist/assets/arrow-south-east-round-PEovUgvH-D9klpzRU.js +1 -0
  202. package/dist/assets/auto-transfer-rule-mbafm5D3-CHCjFoIN.js +1 -0
  203. package/dist/assets/chartTypes-DRiSljvE-CN4L62GH.js +1 -0
  204. package/dist/assets/commonDimensions-BDftm0gJ-DyUDFvZC.js +1 -0
  205. package/dist/assets/constants-B4Ak6U9p.js +1 -0
  206. package/dist/assets/{core-B-FNbYlu.js → core-CA3j8Axi.js} +13 -13
  207. package/dist/assets/{dash.all.min-BBsvkPzr.js → dash.all.min-Bzta_mrR.js} +11 -11
  208. package/dist/assets/detailCommon-BGgE4mE3-D-w4kHC7.js +38 -0
  209. package/dist/assets/downloadPdf-DCQ9vVZs-Be80rXL-.js +1 -0
  210. package/dist/assets/empty-CrPfQgao.js +1 -0
  211. package/dist/assets/empty-Dn000SHy.js +1 -0
  212. package/dist/assets/epic-C_I3d-Sx.js +2 -0
  213. package/dist/assets/getReferrerType-DjPOy76W-DRP5VHem.js +1 -0
  214. package/dist/assets/gift-box-Cmt9OgIZ-eSACml6z.js +1 -0
  215. package/dist/assets/graphic-no-data-l-DU4J8fDt-BzIPOWHn.js +1 -0
  216. package/dist/assets/graphic-no-data-net-burn-l-CzmycA0m-CtBcTNoa.js +1 -0
  217. package/dist/assets/handshake-BPg58FML-DvA7MfJg.js +1 -0
  218. package/dist/assets/{hls-BA0yQjS5.js → hls-SyH7Grr1.js} +1 -1
  219. package/dist/assets/{index-piC0sJHK.js → index-BG_bOyH4.js} +57 -57
  220. package/dist/assets/index-BWZriWwb.js +1 -0
  221. package/dist/assets/index-BiiqfeFx.js +39 -0
  222. package/dist/assets/index-C-ypGNlB.js +1 -0
  223. package/dist/assets/index-C4-PHmb9.js +1 -0
  224. package/dist/assets/index-C5fdNIhc.js +1 -0
  225. package/dist/assets/{index-Dm9r1f6s.js → index-DJLrbf0F.js} +4190 -4191
  226. package/dist/assets/lexical-dZFDzIA1.js +21 -0
  227. package/dist/assets/{liveblocks-BBTLClA6.js → liveblocks-C2I4vRCJ.js} +15 -15
  228. package/dist/assets/{lottie-gmZDfwf4.js → lottie-B7mXQ-R-.js} +1 -1
  229. package/dist/assets/mapLoadingInProgressToTreeNode-CXP8ZZTG-DkaL-N2A.js +1 -0
  230. package/dist/assets/mapSectionWithAcOnlyToTreeNode-BZSP-VcP-BuUbTOqM.js +1 -0
  231. package/dist/assets/mapSpacerToTreeNode-Bc1S_1ej-BOT7FVTB.js +1 -0
  232. package/dist/assets/mapTimeframeBalancesToTreeNode-ClgcHX26-Cs9gyyXd.js +1 -0
  233. package/dist/assets/mapTimeframeBalancesToTreeNode-Cwp98PMa-tz5P0V5W.js +1 -0
  234. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-BmDRXfMV-Bmf8af15.js +1 -0
  235. package/dist/assets/{mixin-D3UDm--6.js → mixin-BPAPQfSE.js} +3 -3
  236. package/dist/assets/{mui-DLNyBjYF.js → mui-DpJXlk4t.js} +5 -5
  237. package/dist/assets/page-detail-CWX5S47F-Byx36A1h.js +1 -0
  238. package/dist/assets/radio-default-CiSgisfh-HcY1qXLg.js +1 -0
  239. package/dist/assets/react-B2Dtpj08.js +29 -0
  240. package/dist/assets/react-B7zczQTC.js +17 -0
  241. package/dist/assets/react-BuuImry8.js +44 -0
  242. package/dist/assets/react-C5CamjHm.js +16 -0
  243. package/dist/assets/react-CurU10nF.js +37 -0
  244. package/dist/assets/{react-BiH01iGK.js → react-D9gRIIQJ.js} +3 -3
  245. package/dist/assets/react-KsUvriAa.js +31 -0
  246. package/dist/assets/{react-2VG2yH4x.js → react-PdDuKQQV.js} +2 -2
  247. package/dist/assets/{recharts-Cnl2EvUV.js → recharts-BGdJnVo5.js} +1 -1
  248. package/dist/assets/{sentry-EYLV4XmG.js → sentry-BA4piVNf.js} +19 -19
  249. package/dist/assets/shield-DOlUxcFf-DciCHlJY.js +1 -0
  250. package/dist/assets/toCOABalancesWithID--oEGymMJ-DrPkDPTu.js +1 -0
  251. package/dist/assets/toChartData-CavJzP6f-B2iIF7nP.js +1 -0
  252. package/dist/assets/transaction-placeholder-CpOwZAMG-2yCTNaDx.js +1 -0
  253. package/dist/assets/types-DyvtCprH-NFPm5TaG.js +1 -0
  254. package/dist/assets/{uploadAttachment-CeUHLpzO-C_J8w5W4.js → uploadAttachment-BuVCsq0Q-BB-5S1Qg.js} +12 -12
  255. package/dist/assets/uploadReceipts-CPw64UYa-DU-gRzOR.js +1 -0
  256. package/dist/assets/url-Bq2XNMnM.js +1 -0
  257. package/dist/assets/url-RUB1rBsd.js +6 -0
  258. package/dist/assets/useLongPress-GCK2COYQ-Ch-mrcwO.js +1 -0
  259. package/dist/assets/usp-line-BBd1wKwW-BZdA9pHf.js +1 -0
  260. package/dist/assets/{utils-D1zwltK3.js → utils-DUsHM-Uc.js} +1 -1
  261. package/dist/assets/{zeni-epic-state-HWtMOH-U.js → zeni-epic-state-CQt4n3Xe.js} +32 -32
  262. package/dist/index.html +1 -1
  263. package/package.json +15 -13
  264. package/dist/assets/ACHDetailsPage-BUP-_2-W-gKUKs0Pb.js +0 -21
  265. package/dist/assets/AccountInfoPage-pmUIckJ9-CAlO-FHB.js +0 -18
  266. package/dist/assets/AccountInfoPageContent-DLSL1NNm-CTMQNQY3.js +0 -149
  267. package/dist/assets/AccountLockedInfoModal-Bq3y0K0F-Caep-eEi.js +0 -59
  268. package/dist/assets/AccountReconDetailsDrawerPage-CGcZO_qz-DphTR8AG.js +0 -239
  269. package/dist/assets/AccountsPromoCardStack-BVVDCW1H-CHjSEilj.js +0 -207
  270. package/dist/assets/AddAddressForCardDrawer-C8aENofu-_B3noxtJ.js +0 -6
  271. package/dist/assets/ApAgingDetailPage-Dz1_N0Yw-TUc4-BfW.js +0 -46
  272. package/dist/assets/AppBasePage-DX4EGGcT-CA5JIcq8.js +0 -71
  273. package/dist/assets/AppDrawerContent-Brg3Rw4K-Du3ev71U.js +0 -91
  274. package/dist/assets/ApprovalRulesSettingsPage-Bn7KrUl2-C_CZXQYN.js +0 -47
  275. package/dist/assets/ArAgingChart-DQZtCsHS-zcjxKJqm.js +0 -24
  276. package/dist/assets/ArAgingDetailPage-BtF6K5dA-CM34YcdM.js +0 -46
  277. package/dist/assets/AttachmentView-DgPySmB8-B41pIkR9.js +0 -101
  278. package/dist/assets/BankAccountWarningSection-DHdeDi15-M9LQMU5u.js +0 -51
  279. package/dist/assets/BillDetailPage-BuUm6vdf-BEfZuL72.js +0 -266
  280. package/dist/assets/BillPayApprovalRuleDetailPage-BXSdsF2E-BZdDia51.js +0 -27
  281. package/dist/assets/BillPayPromoPage-DkoqXDNt-Jx7NR9vs.js +0 -84
  282. package/dist/assets/BillPaySetUpPage-BommXkLS-CxAPQ6nt.js +0 -42
  283. package/dist/assets/BillingSettingsPage-gHbc5Kq3-6eOgIWo-.js +0 -44
  284. package/dist/assets/BillsBulkReviewDrawerPage-C541rBnx-CpMaFNun.js +0 -1
  285. package/dist/assets/BoxItem-usHxaONy-yqmV2_EE.js +0 -53
  286. package/dist/assets/BusinessVerificationPage-CLsxXy9d-ThEm2-hv.js +0 -138
  287. package/dist/assets/CardNumberSubText-D_fWhc_K-C63mXt5C.js +0 -21
  288. package/dist/assets/ChargeCardPromoPage-CzR82VtA-C4AU7pmq.js +0 -222
  289. package/dist/assets/ChargeCardSetupPage-Ctz8PCuu-CQ_qZ7MK.js +0 -36
  290. package/dist/assets/ChargeCardStatementsPage-EUtRTAX2-C_GDwTRC.js +0 -60
  291. package/dist/assets/CheckDepositDrawerPage-B7DC0HAi-p07KcTOW.js +0 -206
  292. package/dist/assets/CompanyPassportCard-82bbFwk--CB88G7Qo.js +0 -42
  293. package/dist/assets/CompleteProfile-B7bQqLQH-3BvSCHX1.js +0 -52
  294. package/dist/assets/ConfettiBurst-DUyIBnw4-Bzth-g3m.js +0 -1
  295. package/dist/assets/CreditCardPaymentDrawerPage-C03hfKGc-CNfSxnSZ.js +0 -224
  296. package/dist/assets/CurrencySelectField-2hU3oIp_-C4bLV2kj.js +0 -139
  297. package/dist/assets/CustomerOnboardingActivationPage-Dt-Nml2t-B6WqU8lr.js +0 -88
  298. package/dist/assets/CustomerOnboardingContainerPage-Dt-_tVOQ-UhKf7bOm.js +0 -1
  299. package/dist/assets/CustomerOnboardingNoStepsPage-CwI8nL61-fFJJ4fRN.js +0 -66
  300. package/dist/assets/CustomerOnboardingProductSuitePage-BOYu-82S-CVVsk6ik.js +0 -202
  301. package/dist/assets/DashboardSidebarBackgroundAnimation-C6SQaB7q-Dxl5QlMk.js +0 -12
  302. package/dist/assets/DepositAccTransactionListPage-DCvdqAz1-B_wb_nSG.js +0 -66
  303. package/dist/assets/DomesticWireDetailsPage-Da_3EveP-BRE1nKx5.js +0 -21
  304. package/dist/assets/DrawerPage-CGrnrvf2-C0F2USa4.js +0 -118
  305. package/dist/assets/EditPeoplePage-DMgxG2Gd-CCtVDE58.js +0 -55
  306. package/dist/assets/EntityDetailPage-BcRVEfi5-CepotlTP.js +0 -18
  307. package/dist/assets/EntitySummarySection-BaHHLLkE-Drrfo_tg.js +0 -149
  308. package/dist/assets/ExpenseAutomationPage-D70ghitX-sSwqGXv6.js +0 -1650
  309. package/dist/assets/FeaturePreviewPage-Bzi8Bpk3-Drk_uxAx.js +0 -11
  310. package/dist/assets/InsightsCardStack-C1_rd2Sb-Dhs19DDG.js +0 -79
  311. package/dist/assets/InsightsSection-7-T67WeF-R1I0UTTj.js +0 -27
  312. package/dist/assets/IntegrationsSettingsPage-C9YpvDgg-q-aOCVtI.js +0 -57
  313. package/dist/assets/InternationalWireSwiftDetailsPage-C5mI8dEh-B0sOCS9F.js +0 -171
  314. package/dist/assets/InviteFormPage-DuBhhnre-BDO1iW13.js +0 -312
  315. package/dist/assets/InvitePeoplePage-BI_vd7xw-BK1DYXv5.js +0 -12
  316. package/dist/assets/InvoiceUploadSection-9DaovMq8-nY-DuZwJ.js +0 -140
  317. package/dist/assets/LabeledAddressValue-cNf6hI1l-BswrPJcJ.js +0 -49
  318. package/dist/assets/LabeledAddressValueField-CoTtV0RQ-oEM2MjQO.js +0 -45
  319. package/dist/assets/LabeledControlledCheckBoxField-DQwUvKR2-CCQx34pM.js +0 -16
  320. package/dist/assets/LabeledDocumentField-MkryOLQ8-DH1KAWxk.js +0 -41
  321. package/dist/assets/LabeledDropDownFormattedTextField-B-yUtgxR-Svg2dZ6s.js +0 -59
  322. package/dist/assets/LabeledText-BJ3Zvb5p-ndTmW7U8.js +0 -42
  323. package/dist/assets/LinkJETransactionPage-BsszwFNq-CVlh2hC9.js +0 -98
  324. package/dist/assets/LowBalancePopup-BFo5zRk3-mdHe1dcy.js +0 -34
  325. package/dist/assets/MagicLinkACHDetailsPage-wYa3cyyZ-tz2BvffR.js +0 -1
  326. package/dist/assets/MagicLinkDomesticWireDetailsPage-CW4RNKOV-CtiYd2c1.js +0 -1
  327. package/dist/assets/MagicLinkInternationalWireDetailsPage-CX9SeCLl-HVNLuX22.js +0 -1
  328. package/dist/assets/MagicLinkSuccessPage-Dipq1-St-CbeB13LZ.js +0 -31
  329. package/dist/assets/MagicLinkTitleSection-DnN52Uwb-Cs_fy5V9.js +0 -17
  330. package/dist/assets/MailingDetailsSection-DwNF-L2Y-DrhhdeyV.js +0 -21
  331. package/dist/assets/Menu-D0jF6uaE-063ttLpF.js +0 -17
  332. package/dist/assets/MyBankConnectionsSettingsPage-DpM6MKBq-E1-nhC0K.js +0 -110
  333. package/dist/assets/MyPendingActivationChargeCardListPage-BaT55Pwg-Ag6G6vZu.js +0 -6
  334. package/dist/assets/MyProfileSettingsPage-kD1dY6P6-BfZFNoxD.js +0 -85
  335. package/dist/assets/NavBarWithPicker-D-WQJ-tG-Cy7zBv5q.js +0 -30
  336. package/dist/assets/NavigationDots-BT-m0FmS-COkqBkfX.js +0 -15
  337. package/dist/assets/NoDataChart-DMivligx-CY99ibCB.js +0 -26
  338. package/dist/assets/NoDataTable-DwOJY23X-0CWxLk-0.js +0 -8
  339. package/dist/assets/NotFoundPage-DuKXpHos-CG3u4rQy.js +0 -46
  340. package/dist/assets/NotificationsListConfig-BQCb9x9X-CKZiM7oL.js +0 -1
  341. package/dist/assets/OverlayContainerPage-CrZuT2Jj-CY2cJwH_.js +0 -11
  342. package/dist/assets/Preview-BszQHI_F.js +0 -1
  343. package/dist/assets/ProductsCarousel-CUaU5-V7-DTCkPx2F.js +0 -142
  344. package/dist/assets/QBOConnectionDialog-BNiXUEAk-O1EeGUUa.js +0 -51
  345. package/dist/assets/QBOSetupSection-CjjNFfgF-hqHet92Q.js +0 -79
  346. package/dist/assets/ReimbursementApprovalRuleDetailPage-tP7WcKvd-47DORnA2.js +0 -26
  347. package/dist/assets/ReimbursementDetailPage-D5IzqJS5-B19mA4vu.js +0 -314
  348. package/dist/assets/ReimbursementPromoPage-D7n6lZNo-CgdMqXow.js +0 -84
  349. package/dist/assets/ReimbursementSetUpPage-E1elWU5Z-D7O-pf9b.js +0 -140
  350. package/dist/assets/ReimbursementsBulkReviewDrawerPage-HzYNji-G-BjLwNAB4.js +0 -1
  351. package/dist/assets/ReloadCard-DMWwNZ1z-D31XYoZn.js +0 -26
  352. package/dist/assets/ReportTableViewSelector-EU36E1lv-CLM26q4e.js +0 -150
  353. package/dist/assets/ReviewDetailsPage-Bk2vvBn3-CMASDCWv.js +0 -290
  354. package/dist/assets/ReviewOverlay-CJlk2MNH-DksHT3Bn.js +0 -152
  355. package/dist/assets/RoleWithToolTip-B7woUKhj-tuSqaaK3.js +0 -22
  356. package/dist/assets/ScheduleDetailsFixedAssetsPage-B-WjqQN_-lrt0yIGR.js +0 -37
  357. package/dist/assets/ScheduleDetailsPage-ocFBINM3-BDslid8Y.js +0 -37
  358. package/dist/assets/ScreenRoutes-DoE2zy1N.js +0 -201
  359. package/dist/assets/SetUpAccountSection-9zELif-q-jAntwqfL.js +0 -378
  360. package/dist/assets/SignIn-BHHUcLal-B9B7yu5c.js +0 -448
  361. package/dist/assets/SignInScreen-Czg-Wlkz.js +0 -1
  362. package/dist/assets/SpendManagementListViewPage-BAdSW-49-Cy3aFFuZ.js +0 -123
  363. package/dist/assets/StatementItem-BnxTFgdM-BUy1CSEA.js +0 -31
  364. package/dist/assets/StatementsPage-B8X2un5p-Ao0DiWwm.js +0 -58
  365. package/dist/assets/SummaryCard-CiNkV7uy-CyUPIfT8.js +0 -1
  366. package/dist/assets/TimeRangeSwitcher-DEEhq2Us-DC70llJC.js +0 -64
  367. package/dist/assets/TimeframeSwitcherWithToggle-D2sBGHXQ-ChLeBSSB.js +0 -31
  368. package/dist/assets/TopExCard-DbPlohSJ-Dhp9OZxf.js +0 -38
  369. package/dist/assets/TransactionList-BRiHadkm-DPpaSQ1Y.js +0 -147
  370. package/dist/assets/TransactionListPage-ByVvx6ON-CwQjGljA.js +0 -35
  371. package/dist/assets/TransactionVendorDetailPage-DMweGn3b-Dq7toltd.js +0 -80
  372. package/dist/assets/TreasuryStatementsPage-2PsC-PWa-D70yhjS2.js +0 -58
  373. package/dist/assets/TreasuryTaxLetterPage-D6MoHMAo-DmesESI8.js +0 -58
  374. package/dist/assets/TrendChart-DiutckSt-D94T5IZh.js +0 -16
  375. package/dist/assets/TrendWithTransactions-rPwZKHfV-Dtp5jwDW.js +0 -116
  376. package/dist/assets/UnitIntegrationPage-DO8dMzVg-Cd3rb01x.js +0 -67
  377. package/dist/assets/UploadAdditionalDocumentOverlay-Ug3kL02_-DKI6OhwV.js +0 -38
  378. package/dist/assets/Vendor2FAPopup-BdG-Ywma-CO_da9UG.js +0 -1
  379. package/dist/assets/VendorACHDetailsPage-BUNmE_s6-DPSp4E23.js +0 -1
  380. package/dist/assets/VendorDomesticWireDetailsPage-DvACrh7C-BLzpieuI.js +0 -1
  381. package/dist/assets/VendorInternationalWireSwiftDetailsPage-lxD_Z5W--961yvZRp.js +0 -1
  382. package/dist/assets/VendorsAccountsSection-D-3fhQvy-CbP2SER5.js +0 -68
  383. package/dist/assets/VerifyDevice-DDZdWfa8-H5PbdKsY.js +0 -112
  384. package/dist/assets/VideoPlayer-D0GZ_Yml-gee9OAo-.js +0 -78
  385. package/dist/assets/VideoPopup-CEdhfU31-8qrMVIxi.js +0 -31
  386. package/dist/assets/WarningsDrawerPage-CIK9lkT2-D5cDBgQm.js +0 -92
  387. package/dist/assets/ZeniAccountNavBarPieces-FAxN1QDY-C5pMry9_.js +0 -14
  388. package/dist/assets/ZeniAccountSetupPage-QMBiVius-DueIhJzT.js +0 -36
  389. package/dist/assets/ZeniCopyright-CgfP-kcy-DUMhOisg.js +0 -1
  390. package/dist/assets/ZeniTransferAmountSlider-B1fmc3f9-DSYZgQje.js +0 -63
  391. package/dist/assets/add-to-wallet-DgdBD8_G-BctcirlU.js +0 -1
  392. package/dist/assets/agingReportHelper-ovKP-qSS-BPG0U4uX.js +0 -1
  393. package/dist/assets/analyticsHelper-BKtlFOJm-CcPLbTK6.js +0 -1
  394. package/dist/assets/analyticsHelper-BV9ovV44.js +0 -1
  395. package/dist/assets/arrow-south-east-round-PEovUgvH-DFZl4BUT.js +0 -1
  396. package/dist/assets/auto-transfer-rule-mbafm5D3-BCnmjSj0.js +0 -1
  397. package/dist/assets/chartTypes-BZYC5y5J-CVmMioA0.js +0 -1
  398. package/dist/assets/commonDimensions-B-aZt-hB-CP54iB8v.js +0 -1
  399. package/dist/assets/detailCommon-DCtkwfR8-Dr2vx6ZY.js +0 -38
  400. package/dist/assets/downloadPdf-BhQlJMh0-DeqZGQ39.js +0 -1
  401. package/dist/assets/empty-CnIz-OQ7.js +0 -1
  402. package/dist/assets/empty-TjEo4rDg.js +0 -1
  403. package/dist/assets/epic-DMZtehrN.js +0 -2
  404. package/dist/assets/getReferrerType-DjPOy76W-Cm31g4vJ.js +0 -1
  405. package/dist/assets/gift-box-Cmt9OgIZ-aujv_noX.js +0 -1
  406. package/dist/assets/graphic-no-data-l-DU4J8fDt-DTSR9TM8.js +0 -1
  407. package/dist/assets/graphic-no-data-net-burn-l-CzmycA0m-Bw4ambPw.js +0 -1
  408. package/dist/assets/handshake-BPg58FML-BjSDfVm7.js +0 -1
  409. package/dist/assets/index-CFi0iD-l.js +0 -1
  410. package/dist/assets/index-CL_7G35J.js +0 -1
  411. package/dist/assets/index-DdJI4MMd.js +0 -1
  412. package/dist/assets/index-dPPP2cWo.js +0 -1
  413. package/dist/assets/lexical-DPEnH3HH.js +0 -21
  414. package/dist/assets/mapLoadingInProgressToTreeNode-B8iO-fIh-DwG7e-RM.js +0 -1
  415. package/dist/assets/mapSectionWithAcOnlyToTreeNode-PLUfKBDd-BfmC19Y6.js +0 -1
  416. package/dist/assets/mapSpacerToTreeNode-BPbkmHFY-BZPeecIF.js +0 -1
  417. package/dist/assets/mapTimeframeBalancesToTreeNode-B-kK0AfR-0kzYcFSC.js +0 -1
  418. package/dist/assets/mapTimeframeBalancesToTreeNode-BvN4m9TA-DSQ0LTze.js +0 -1
  419. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-BiRfdc4g-C5Cp6P0a.js +0 -1
  420. package/dist/assets/page-detail-CWX5S47F-Dn7FEY9U.js +0 -1
  421. package/dist/assets/radio-default-CiSgisfh-B6CtarQ8.js +0 -1
  422. package/dist/assets/react-Bqj7JUF5.js +0 -29
  423. package/dist/assets/react-CeCWo9lx.js +0 -44
  424. package/dist/assets/react-CwPTei9W.js +0 -17
  425. package/dist/assets/react-CxPSrq5B.js +0 -16
  426. package/dist/assets/react-VfkIuzgx.js +0 -37
  427. package/dist/assets/react-sPv488Z5.js +0 -31
  428. package/dist/assets/shield-DOlUxcFf-DYYbm8md.js +0 -1
  429. package/dist/assets/toCOABalancesWithID-ChMShONK-Cq-mLDe3.js +0 -1
  430. package/dist/assets/toChartData-BUweupH8-sZruIW4t.js +0 -1
  431. package/dist/assets/transaction-placeholder-CpOwZAMG-R9RAntKW.js +0 -1
  432. package/dist/assets/types-DyvtCprH-BcZYcgaq.js +0 -1
  433. package/dist/assets/uploadReceipts-Bkf_PaOH-qo0cBRii.js +0 -1
  434. package/dist/assets/url-DzcuVjHh.js +0 -6
  435. package/dist/assets/url-dmxYLsoS.js +0 -1
  436. package/dist/assets/useLongPress-GCK2COYQ-BC43nxgO.js +0 -1
  437. package/dist/assets/usp-line-BBd1wKwW-_aHpaGit.js +0 -1
@@ -1,6 +1,6 @@
1
- import{S as tn,a as an}from"./core-B-FNbYlu.js";import{g as Zs}from"./mui-DLNyBjYF.js";import{H as hf}from"./hls-BA0yQjS5.js";import{C as An,M as mf}from"./mixin-D3UDm--6.js";var pf=Object.create,em=Object.defineProperty,vf=Object.getOwnPropertyDescriptor,ff=Object.getOwnPropertyNames,Ef=Object.getPrototypeOf,_f=Object.prototype.hasOwnProperty,tm=function(t,e){return function(){return t&&(e=t(t=0)),e}},We=function(t,e){return function(){return e||t((e={exports:{}}).exports,e),e.exports}},bf=function(t,e,i,a){if(e&&typeof e=="object"||typeof e=="function")for(var r=ff(e),n=0,s=r.length,o;n<s;n++)o=r[n],!_f.call(t,o)&&o!==i&&em(t,o,{get:(function(l){return e[l]}).bind(null,o),enumerable:!(a=vf(e,o))||a.enumerable});return t},ot=function(t,e,i){return i=t!=null?pf(Ef(t)):{},bf(!t||!t.__esModule?em(i,"default",{value:t,enumerable:!0}):i,t)},Yt=We(function(t,e){var i;typeof window<"u"?i=window:typeof Zs<"u"?i=Zs:typeof self<"u"?i=self:i={},e.exports=i});function aa(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):aa(t,e)}var ra=tm(function(){ra()});function im(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}var am=tm(function(){}),rm=We(function(t,e){var i=Array.prototype.slice;e.exports=a;function a(r,n){for(("length"in r)||(r=[r]),r=i.call(r);r.length;){var s=r.shift(),o=n(s);if(o)return o;s.childNodes&&s.childNodes.length&&(r=i.call(s.childNodes).concat(r))}}}),gf=We(function(t,e){ra(),e.exports=i;function i(a,r){if(!aa(this,i))return new i(a,r);this.data=a,this.nodeValue=a,this.length=a.length,this.ownerDocument=r||null}i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),yf=We(function(t,e){ra(),e.exports=i;function i(a,r){if(!aa(this,i))return new i(a);this.data=a||"",this.length=this.data.length,this.ownerDocument=r||null}i.prototype.type="DOMTextNode",i.prototype.nodeType=3,i.prototype.nodeName="#text",i.prototype.toString=function(){return this.data},i.prototype.replaceData=function(a,r,n){var s=this.data,o=s.substring(0,a),l=s.substring(a+r,s.length);this.data=o+n+l,this.length=this.data.length}}),nm=We(function(t,e){e.exports=i;function i(a){var r=this,n=a.type;a.target||(a.target=r),r.listeners||(r.listeners={});var s=r.listeners[n];if(s)return s.forEach(function(o){a.currentTarget=r,typeof o=="function"?o(a):o.handleEvent(a)});r.parentNode&&r.parentNode.dispatchEvent(a)}}),sm=We(function(t,e){e.exports=i;function i(a,r){var n=this;n.listeners||(n.listeners={}),n.listeners[a]||(n.listeners[a]=[]),n.listeners[a].indexOf(r)===-1&&n.listeners[a].push(r)}}),om=We(function(t,e){e.exports=i;function i(a,r){var n=this;if(n.listeners&&n.listeners[a]){var s=n.listeners[a],o=s.indexOf(r);o!==-1&&s.splice(o,1)}}}),Tf=We(function(t,e){am(),e.exports=a;var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function a(h){switch(h.nodeType){case 3:return m(h.data);case 8:return"<!--"+h.data+"-->";default:return r(h)}}function r(h){var u=[],v=h.tagName;return h.namespaceURI==="http://www.w3.org/1999/xhtml"&&(v=v.toLowerCase()),u.push("<"+v+d(h)+o(h)),i.indexOf(v)>-1?u.push(" />"):(u.push(">"),h.childNodes.length?u.push.apply(u,h.childNodes.map(a)):h.textContent||h.innerText?u.push(m(h.textContent||h.innerText)):h.innerHTML&&u.push(h.innerHTML),u.push("</"+v+">")),u.join("")}function n(h,u){var v=im(h[u]);return u==="style"&&Object.keys(h.style).length>0?!0:h.hasOwnProperty(u)&&(v==="string"||v==="boolean"||v==="number")&&u!=="nodeName"&&u!=="className"&&u!=="tagName"&&u!=="textContent"&&u!=="innerText"&&u!=="namespaceURI"&&u!=="innerHTML"}function s(h){if(typeof h=="string")return h;var u="";return Object.keys(h).forEach(function(v){var E=h[v];v=v.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}),u+=v+":"+E+";"}),u}function o(h){var u=h.dataset,v=[];for(var E in u)v.push({name:"data-"+E,value:u[E]});return v.length?l(v):""}function l(h){var u=[];return h.forEach(function(v){var E=v.name,g=v.value;E==="style"&&(g=s(g)),u.push(E+'="'+p(g)+'"')}),u.length?" "+u.join(" "):""}function d(h){var u=[];for(var v in h)n(h,v)&&u.push({name:v,value:h[v]});for(var E in h._attributes)for(var g in h._attributes[E]){var y=h._attributes[E][g],T=(y.prefix?y.prefix+":":"")+g;u.push({name:T,value:y.value})}return h.className&&u.push({name:"class",value:h.className}),u.length?l(u):""}function m(h){var u="";return typeof h=="string"?u=h:h&&(u=h.toString()),u.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function p(h){return m(h).replace(/"/g,"&quot;")}}),lm=We(function(t,e){ra();var i=rm(),a=nm(),r=sm(),n=om(),s=Tf(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,m,p){if(!aa(this,l))return new l(d);var h=p===void 0?o:p||null;this.tagName=h===o?String(d).toUpperCase():d,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=m||null,this.namespaceURI=h,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(d){return d.parentNode&&d.parentNode.removeChild(d),this.childNodes.push(d),d.parentNode=this,d},l.prototype.replaceChild=function(d,m){d.parentNode&&d.parentNode.removeChild(d);var p=this.childNodes.indexOf(m);return m.parentNode=null,this.childNodes[p]=d,d.parentNode=this,m},l.prototype.removeChild=function(d){var m=this.childNodes.indexOf(d);return this.childNodes.splice(m,1),d.parentNode=null,d},l.prototype.insertBefore=function(d,m){d.parentNode&&d.parentNode.removeChild(d);var p=m==null?-1:this.childNodes.indexOf(m);return p>-1?this.childNodes.splice(p,0,d):this.childNodes.push(d),d.parentNode=this,d},l.prototype.setAttributeNS=function(d,m,p){var h=null,u=m,v=m.indexOf(":");if(v>-1&&(h=m.substr(0,v),u=m.substr(v+1)),this.tagName==="INPUT"&&m==="type")this.type=p;else{var E=this._attributes[d]||(this._attributes[d]={});E[u]={value:p,prefix:h}}},l.prototype.getAttributeNS=function(d,m){var p=this._attributes[d],h=p&&p[m]&&p[m].value;return this.tagName==="INPUT"&&m==="type"?this.type:typeof h!="string"?null:h},l.prototype.removeAttributeNS=function(d,m){var p=this._attributes[d];p&&delete p[m]},l.prototype.hasAttributeNS=function(d,m){var p=this._attributes[d];return!!p&&m in p},l.prototype.setAttribute=function(d,m){return this.setAttributeNS(null,d,m)},l.prototype.getAttribute=function(d){return this.getAttributeNS(null,d)},l.prototype.removeAttribute=function(d){return this.removeAttributeNS(null,d)},l.prototype.hasAttribute=function(d){return this.hasAttributeNS(null,d)},l.prototype.removeEventListener=n,l.prototype.addEventListener=r,l.prototype.dispatchEvent=a,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(d){var m=d.split(" "),p=[];return i(this,function(h){if(h.nodeType===1){var u=h.className||"",v=u.split(" ");m.every(function(E){return v.indexOf(E)!==-1})&&p.push(h)}}),p},l.prototype.getElementsByTagName=function(d){d=d.toLowerCase();var m=[];return i(this.childNodes,function(p){p.nodeType===1&&(d==="*"||p.tagName.toLowerCase()===d)&&m.push(p)}),m},l.prototype.contains=function(d){return i(this,function(m){return d===m})||!1}}),Af=We(function(t,e){ra();var i=lm();e.exports=a;function a(r){if(!aa(this,a))return new a;this.childNodes=[],this.parentNode=null,this.ownerDocument=r||null}a.prototype.type="DocumentFragment",a.prototype.nodeType=11,a.prototype.nodeName="#document-fragment",a.prototype.appendChild=i.prototype.appendChild,a.prototype.replaceChild=i.prototype.replaceChild,a.prototype.removeChild=i.prototype.removeChild,a.prototype.toString=function(){return this.childNodes.map(function(r){return String(r)}).join("")}}),kf=We(function(t,e){e.exports=i;function i(a){}i.prototype.initEvent=function(a,r,n){this.type=a,this.bubbles=r,this.cancelable=n},i.prototype.preventDefault=function(){}}),Sf=We(function(t,e){ra();var i=rm(),a=gf(),r=yf(),n=lm(),s=Af(),o=kf(),l=nm(),d=sm(),m=om();e.exports=p;function p(){if(!aa(this,p))return new p;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var h=p.prototype;h.createTextNode=function(u){return new r(u,this)},h.createElementNS=function(u,v){var E=u===null?null:String(u);return new n(v,this,E)},h.createElement=function(u){return new n(u,this)},h.createDocumentFragment=function(){return new s(this)},h.createEvent=function(u){return new o(u)},h.createComment=function(u){return new a(u,this)},h.getElementById=function(u){u=String(u);var v=i(this.childNodes,function(E){if(String(E.id)===u)return E});return v||null},h.getElementsByClassName=n.prototype.getElementsByClassName,h.getElementsByTagName=n.prototype.getElementsByTagName,h.contains=n.prototype.contains,h.removeEventListener=m,h.addEventListener=d,h.dispatchEvent=l}),wf=We(function(t,e){var i=Sf();e.exports=new i}),dm=We(function(t,e){var i=typeof Zs<"u"?Zs:typeof window<"u"?window:{},a=wf(),r;typeof document<"u"?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a)),e.exports=r});function If(t){if(Array.isArray(t))return t}function Rf(t,e){var i=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a=[],r=!0,n=!1,s,o;try{for(i=i.call(t);!(r=(s=i.next()).done)&&(a.push(s.value),!(e&&a.length===e));r=!0);}catch(l){n=!0,o=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(n)throw o}}return a}}function Cf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yl(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}function um(t,e){if(t){if(typeof t=="string")return yl(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return yl(t,e)}}function ai(t,e){return If(t)||Rf(t,e)||um(t,e)||Cf()}var qr=ot(Yt()),gc=ot(Yt()),Lf=ot(Yt()),Df={now:function(){var t=Lf.default.performance,e=t&&t.timing,i=e&&e.navigationStart,a=typeof i=="number"&&typeof t.now=="function"?i+t.now():Date.now();return Math.round(a)}},Re=Df,rn=function(){var t,e,i;if(typeof((t=gc.default.crypto)===null||t===void 0?void 0:t.getRandomValues)=="function"){i=new Uint8Array(32),gc.default.crypto.getRandomValues(i);for(var a=0;a<32;a++)i[a]=i[a]%16}else{i=[];for(var r=0;r<32;r++)i[r]=Math.random()*16|0}var n=0;e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(l){var d=l==="x"?i[n]:i[n]&3|8;return n++,d.toString(16)});var s=Re.now(),o=s?.toString(16).substring(3);return o?e.substring(0,28)+o:e},cm=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},ht=function(t){if(t&&typeof t.nodeName<"u")return t.muxId||(t.muxId=cm()),t.muxId;var e;try{e=document.querySelector(t)}catch{}return e&&!e.muxId&&(e.muxId=t),e?.muxId||t},Xs=function(t){var e;t&&typeof t.nodeName<"u"?(e=t,t=ht(e)):e=document.querySelector(t);var i=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,t,i]};function Mf(t){if(Array.isArray(t))return yl(t)}function xf(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Of(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mt(t){return Mf(t)||xf(t)||um(t)||Of()}var Wi={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4},Nf=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,i,a,r,n,s,o=[console,t],l=(i=console.trace).bind.apply(i,mt(o)),d=(a=console.info).bind.apply(a,mt(o)),m=(r=console.debug).bind.apply(r,mt(o)),p=(n=console.warn).bind.apply(n,mt(o)),h=(s=console.error).bind.apply(s,mt(o)),u=e;return{trace:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.TRACE))return l.apply(void 0,mt(E))},debug:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.DEBUG))return m.apply(void 0,mt(E))},info:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.INFO))return d.apply(void 0,mt(E))},warn:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.WARN))return p.apply(void 0,mt(E))},error:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.ERROR))return h.apply(void 0,mt(E))},get level(){return u},set level(v){v!==this.level&&(u=v??e)}}},ee=Nf("[mux]"),jo=ot(Yt());function Tl(){var t=jo.default.doNotTrack||jo.default.navigator&&jo.default.navigator.doNotTrack;return t==="1"}function P(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}ra();function Ae(t,e){if(!aa(t,e))throw new TypeError("Cannot call a class as a function")}function Pf(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function Gt(t,e,i){return e&&Pf(t.prototype,e),t}function w(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Za(t){return Za=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Za(t)}function Uf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Za(t),t!==null););return t}function Kn(t,e,i){return typeof Reflect<"u"&&Reflect.get?Kn=Reflect.get:Kn=function(a,r,n){var s=Uf(a,r);if(s){var o=Object.getOwnPropertyDescriptor(s,r);return o.get?o.get.call(n||a):o.value}},Kn(t,e,i||t)}function Al(t,e){return Al=Object.setPrototypeOf||function(i,a){return i.__proto__=a,i},Al(t,e)}function $f(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Al(t,e)}function Hf(t,e){if(t==null)return{};var i={},a=Object.keys(t),r,n;for(n=0;n<a.length;n++)r=a[n],!(e.indexOf(r)>=0)&&(i[r]=t[r]);return i}function Bf(t,e){if(t==null)return{};var i=Hf(t,e),a,r;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(r=0;r<n.length;r++)a=n[r],!(e.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(i[a]=t[a])}return i}function Wf(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}am();function Ff(t,e){return e&&(im(e)==="object"||typeof e=="function")?e:P(t)}function Kf(t){var e=Wf();return function(){var i=Za(t),a;if(e){var r=Za(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return Ff(this,a)}}var _t=function(t){return nn(t)[0]},nn=function(t){if(typeof t!="string"||t==="")return["localhost"];var e=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,i=t.match(e)||[],a=i[4],r;return a&&(r=(a.match(/[^\.]+\.[^\.]+$/)||[])[0]),[a,r]},Zo=ot(Yt()),Vf={exists:function(){var t=Zo.default.performance,e=t&&t.timing;return e!==void 0},domContentLoadedEventEnd:function(){var t=Zo.default.performance,e=t&&t.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var t=Zo.default.performance,e=t&&t.timing;return e&&e.navigationStart}},Js=Vf;function Te(t,e,i){i=i===void 0?1:i,t[e]=t[e]||0,t[e]+=i}function eo(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},a=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(i).filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable}))),a.forEach(function(r){w(t,r,i[r])})}return t}function qf(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);i.push.apply(i,a)}return i}function $d(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):qf(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}var Yf=["x-cdn","content-type"],hm=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],Gf=Yf.concat(hm);function Hd(t){t=t||"";var e={},i=t.trim().split(/[\r\n]+/);return i.forEach(function(a){if(a){var r=a.split(": "),n=r.shift();n&&(Gf.indexOf(n.toLowerCase())>=0||n.toLowerCase().indexOf("x-litix-")===0)&&(e[n]=r.join(": "))}}),e}function to(t){if(t){var e=hm.find(function(i){return t[i]!==void 0});return e?t[e]:void 0}}var Qf=function(t){var e={};for(var i in t){var a=t[i],r=a["DATA-ID"].search("io.litix.data.");if(r!==-1){var n=a["DATA-ID"].replace("io.litix.data.","");e[n]=a.VALUE}}return e},mm=Qf,kn=function(t){if(!t)return{};var e=Js.navigationStart(),i=t.loading,a=i?i.start:t.trequest,r=i?i.first:t.tfirst,n=i?i.end:t.tload;return{bytesLoaded:t.total,requestStart:Math.round(e+a),responseStart:Math.round(e+r),responseEnd:Math.round(e+n)}},ur=function(t){if(!(!t||typeof t.getAllResponseHeaders!="function"))return Hd(t.getAllResponseHeaders())},zf=function(t,e,i){var a=arguments.length>4?arguments[4]:void 0,r=t.log,n=t.utils.secondsToMs,s=function(g){var y=parseInt(a.version),T;return y===1&&g.programDateTime!==null&&(T=g.programDateTime),y===0&&g.pdt!==null&&(T=g.pdt),T};if(!Js.exists()){r.warn("performance timing not supported. Not tracking HLS.js.");return}var o=function(g,y){return t.emit(e,g,y)},l=function(g,y){var T=y.levels,_=y.audioTracks,S=y.url,C=y.stats,N=y.networkDetails,$=y.sessionData,G={},J={};T.forEach(function(he,Pe){G[Pe]={width:he.width,height:he.height,bitrate:he.bitrate,attrs:he.attrs}}),_.forEach(function(he,Pe){J[Pe]={name:he.name,language:he.lang,bitrate:he.bitrate}});var K=kn(C),U=K.bytesLoaded,Me=K.requestStart,Fe=K.responseStart,Ke=K.responseEnd;o("requestcompleted",$d(eo({},mm($)),{request_event_type:g,request_bytes_loaded:U,request_start:Me,request_response_start:Fe,request_response_end:Ke,request_type:"manifest",request_hostname:_t(S),request_response_headers:ur(N),request_rendition_lists:{media:G,audio:J,video:{}}}))};i.on(a.Events.MANIFEST_LOADED,l);var d=function(g,y){var T=y.details,_=y.level,S=y.networkDetails,C=y.stats,N=kn(C),$=N.bytesLoaded,G=N.requestStart,J=N.responseStart,K=N.responseEnd,U=T.fragments[T.fragments.length-1],Me=s(U)+n(U.duration);o("requestcompleted",{request_event_type:g,request_bytes_loaded:$,request_start:G,request_response_start:J,request_response_end:K,request_current_level:_,request_type:"manifest",request_hostname:_t(T.url),request_response_headers:ur(S),video_holdback:T.holdBack&&n(T.holdBack),video_part_holdback:T.partHoldBack&&n(T.partHoldBack),video_part_target_duration:T.partTarget&&n(T.partTarget),video_target_duration:T.targetduration&&n(T.targetduration),video_source_is_live:T.live,player_manifest_newest_program_time:isNaN(Me)?void 0:Me})};i.on(a.Events.LEVEL_LOADED,d);var m=function(g,y){var T=y.details,_=y.networkDetails,S=y.stats,C=kn(S),N=C.bytesLoaded,$=C.requestStart,G=C.responseStart,J=C.responseEnd;o("requestcompleted",{request_event_type:g,request_bytes_loaded:N,request_start:$,request_response_start:G,request_response_end:J,request_type:"manifest",request_hostname:_t(T.url),request_response_headers:ur(_)})};i.on(a.Events.AUDIO_TRACK_LOADED,m);var p=function(g,y){var T=y.stats,_=y.networkDetails,S=y.frag;T=T||S.stats;var C=kn(T),N=C.bytesLoaded,$=C.requestStart,G=C.responseStart,J=C.responseEnd,K=_?ur(_):void 0,U={request_event_type:g,request_bytes_loaded:N,request_start:$,request_response_start:G,request_response_end:J,request_hostname:_?_t(_.responseURL):void 0,request_id:K?to(K):void 0,request_response_headers:K,request_media_duration:S.duration,request_url:_?.responseURL};S.type==="main"?(U.request_type="media",U.request_current_level=S.level,U.request_video_width=(i.levels[S.level]||{}).width,U.request_video_height=(i.levels[S.level]||{}).height,U.request_labeled_bitrate=(i.levels[S.level]||{}).bitrate):U.request_type=S.type,o("requestcompleted",U)};i.on(a.Events.FRAG_LOADED,p);var h=function(g,y){var T=y.frag,_=T.start,S=s(T),C={currentFragmentPDT:S,currentFragmentStart:n(_)};o("fragmentchange",C)};i.on(a.Events.FRAG_CHANGED,h);var u=function(g,y){var T=y.type,_=y.details,S=y.response,C=y.fatal,N=y.frag,$=y.networkDetails,G=N?.url||y.url||"",J=$?ur($):void 0;if((_===a.ErrorDetails.MANIFEST_LOAD_ERROR||_===a.ErrorDetails.MANIFEST_LOAD_TIMEOUT||_===a.ErrorDetails.FRAG_LOAD_ERROR||_===a.ErrorDetails.FRAG_LOAD_TIMEOUT||_===a.ErrorDetails.LEVEL_LOAD_ERROR||_===a.ErrorDetails.LEVEL_LOAD_TIMEOUT||_===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||_===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||_===a.ErrorDetails.SUBTITLE_LOAD_ERROR||_===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||_===a.ErrorDetails.KEY_LOAD_ERROR||_===a.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:_,request_url:G,request_hostname:_t(G),request_id:J?to(J):void 0,request_type:_===a.ErrorDetails.FRAG_LOAD_ERROR||_===a.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":_===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||_===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":_===a.ErrorDetails.SUBTITLE_LOAD_ERROR||_===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":_===a.ErrorDetails.KEY_LOAD_ERROR||_===a.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:S?.code,request_error_text:S?.text}),C){var K,U="".concat(G?"url: ".concat(G,`
1
+ import{S as an,a as rn}from"./core-CA3j8Axi.js";import{g as Za}from"./mui-DpJXlk4t.js";import{H as hf}from"./hls-SyH7Grr1.js";import{C as kn,M as mf}from"./mixin-BPAPQfSE.js";(function(){try{var t=typeof window<"u"?window:typeof Za<"u"?Za:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c7e127be-d90a-44ac-aced-ac06f61da6f4",t._sentryDebugIdIdentifier="sentry-dbid-c7e127be-d90a-44ac-aced-ac06f61da6f4")}catch{}})();var pf=Object.create,em=Object.defineProperty,vf=Object.getOwnPropertyDescriptor,ff=Object.getOwnPropertyNames,Ef=Object.getPrototypeOf,_f=Object.prototype.hasOwnProperty,tm=function(t,e){return function(){return t&&(e=t(t=0)),e}},We=function(t,e){return function(){return e||t((e={exports:{}}).exports,e),e.exports}},bf=function(t,e,i,a){if(e&&typeof e=="object"||typeof e=="function")for(var r=ff(e),n=0,s=r.length,o;n<s;n++)o=r[n],!_f.call(t,o)&&o!==i&&em(t,o,{get:(function(l){return e[l]}).bind(null,o),enumerable:!(a=vf(e,o))||a.enumerable});return t},ot=function(t,e,i){return i=t!=null?pf(Ef(t)):{},bf(!t||!t.__esModule?em(i,"default",{value:t,enumerable:!0}):i,t)},Yt=We(function(t,e){var i;typeof window<"u"?i=window:typeof Za<"u"?i=Za:typeof self<"u"?i=self:i={},e.exports=i});function aa(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):aa(t,e)}var ra=tm(function(){ra()});function im(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}var am=tm(function(){}),rm=We(function(t,e){var i=Array.prototype.slice;e.exports=a;function a(r,n){for(("length"in r)||(r=[r]),r=i.call(r);r.length;){var s=r.shift(),o=n(s);if(o)return o;s.childNodes&&s.childNodes.length&&(r=i.call(s.childNodes).concat(r))}}}),gf=We(function(t,e){ra(),e.exports=i;function i(a,r){if(!aa(this,i))return new i(a,r);this.data=a,this.nodeValue=a,this.length=a.length,this.ownerDocument=r||null}i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),yf=We(function(t,e){ra(),e.exports=i;function i(a,r){if(!aa(this,i))return new i(a);this.data=a||"",this.length=this.data.length,this.ownerDocument=r||null}i.prototype.type="DOMTextNode",i.prototype.nodeType=3,i.prototype.nodeName="#text",i.prototype.toString=function(){return this.data},i.prototype.replaceData=function(a,r,n){var s=this.data,o=s.substring(0,a),l=s.substring(a+r,s.length);this.data=o+n+l,this.length=this.data.length}}),nm=We(function(t,e){e.exports=i;function i(a){var r=this,n=a.type;a.target||(a.target=r),r.listeners||(r.listeners={});var s=r.listeners[n];if(s)return s.forEach(function(o){a.currentTarget=r,typeof o=="function"?o(a):o.handleEvent(a)});r.parentNode&&r.parentNode.dispatchEvent(a)}}),sm=We(function(t,e){e.exports=i;function i(a,r){var n=this;n.listeners||(n.listeners={}),n.listeners[a]||(n.listeners[a]=[]),n.listeners[a].indexOf(r)===-1&&n.listeners[a].push(r)}}),om=We(function(t,e){e.exports=i;function i(a,r){var n=this;if(n.listeners&&n.listeners[a]){var s=n.listeners[a],o=s.indexOf(r);o!==-1&&s.splice(o,1)}}}),Tf=We(function(t,e){am(),e.exports=a;var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function a(h){switch(h.nodeType){case 3:return m(h.data);case 8:return"<!--"+h.data+"-->";default:return r(h)}}function r(h){var u=[],v=h.tagName;return h.namespaceURI==="http://www.w3.org/1999/xhtml"&&(v=v.toLowerCase()),u.push("<"+v+d(h)+o(h)),i.indexOf(v)>-1?u.push(" />"):(u.push(">"),h.childNodes.length?u.push.apply(u,h.childNodes.map(a)):h.textContent||h.innerText?u.push(m(h.textContent||h.innerText)):h.innerHTML&&u.push(h.innerHTML),u.push("</"+v+">")),u.join("")}function n(h,u){var v=im(h[u]);return u==="style"&&Object.keys(h.style).length>0?!0:h.hasOwnProperty(u)&&(v==="string"||v==="boolean"||v==="number")&&u!=="nodeName"&&u!=="className"&&u!=="tagName"&&u!=="textContent"&&u!=="innerText"&&u!=="namespaceURI"&&u!=="innerHTML"}function s(h){if(typeof h=="string")return h;var u="";return Object.keys(h).forEach(function(v){var E=h[v];v=v.replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()}),u+=v+":"+E+";"}),u}function o(h){var u=h.dataset,v=[];for(var E in u)v.push({name:"data-"+E,value:u[E]});return v.length?l(v):""}function l(h){var u=[];return h.forEach(function(v){var E=v.name,g=v.value;E==="style"&&(g=s(g)),u.push(E+'="'+p(g)+'"')}),u.length?" "+u.join(" "):""}function d(h){var u=[];for(var v in h)n(h,v)&&u.push({name:v,value:h[v]});for(var E in h._attributes)for(var g in h._attributes[E]){var y=h._attributes[E][g],T=(y.prefix?y.prefix+":":"")+g;u.push({name:T,value:y.value})}return h.className&&u.push({name:"class",value:h.className}),u.length?l(u):""}function m(h){var u="";return typeof h=="string"?u=h:h&&(u=h.toString()),u.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function p(h){return m(h).replace(/"/g,"&quot;")}}),lm=We(function(t,e){ra();var i=rm(),a=nm(),r=sm(),n=om(),s=Tf(),o="http://www.w3.org/1999/xhtml";e.exports=l;function l(d,m,p){if(!aa(this,l))return new l(d);var h=p===void 0?o:p||null;this.tagName=h===o?String(d).toUpperCase():d,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=m||null,this.namespaceURI=h,this._attributes={},this.tagName==="INPUT"&&(this.type="text")}l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(d){return d.parentNode&&d.parentNode.removeChild(d),this.childNodes.push(d),d.parentNode=this,d},l.prototype.replaceChild=function(d,m){d.parentNode&&d.parentNode.removeChild(d);var p=this.childNodes.indexOf(m);return m.parentNode=null,this.childNodes[p]=d,d.parentNode=this,m},l.prototype.removeChild=function(d){var m=this.childNodes.indexOf(d);return this.childNodes.splice(m,1),d.parentNode=null,d},l.prototype.insertBefore=function(d,m){d.parentNode&&d.parentNode.removeChild(d);var p=m==null?-1:this.childNodes.indexOf(m);return p>-1?this.childNodes.splice(p,0,d):this.childNodes.push(d),d.parentNode=this,d},l.prototype.setAttributeNS=function(d,m,p){var h=null,u=m,v=m.indexOf(":");if(v>-1&&(h=m.substr(0,v),u=m.substr(v+1)),this.tagName==="INPUT"&&m==="type")this.type=p;else{var E=this._attributes[d]||(this._attributes[d]={});E[u]={value:p,prefix:h}}},l.prototype.getAttributeNS=function(d,m){var p=this._attributes[d],h=p&&p[m]&&p[m].value;return this.tagName==="INPUT"&&m==="type"?this.type:typeof h!="string"?null:h},l.prototype.removeAttributeNS=function(d,m){var p=this._attributes[d];p&&delete p[m]},l.prototype.hasAttributeNS=function(d,m){var p=this._attributes[d];return!!p&&m in p},l.prototype.setAttribute=function(d,m){return this.setAttributeNS(null,d,m)},l.prototype.getAttribute=function(d){return this.getAttributeNS(null,d)},l.prototype.removeAttribute=function(d){return this.removeAttributeNS(null,d)},l.prototype.hasAttribute=function(d){return this.hasAttributeNS(null,d)},l.prototype.removeEventListener=n,l.prototype.addEventListener=r,l.prototype.dispatchEvent=a,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(d){var m=d.split(" "),p=[];return i(this,function(h){if(h.nodeType===1){var u=h.className||"",v=u.split(" ");m.every(function(E){return v.indexOf(E)!==-1})&&p.push(h)}}),p},l.prototype.getElementsByTagName=function(d){d=d.toLowerCase();var m=[];return i(this.childNodes,function(p){p.nodeType===1&&(d==="*"||p.tagName.toLowerCase()===d)&&m.push(p)}),m},l.prototype.contains=function(d){return i(this,function(m){return d===m})||!1}}),Af=We(function(t,e){ra();var i=lm();e.exports=a;function a(r){if(!aa(this,a))return new a;this.childNodes=[],this.parentNode=null,this.ownerDocument=r||null}a.prototype.type="DocumentFragment",a.prototype.nodeType=11,a.prototype.nodeName="#document-fragment",a.prototype.appendChild=i.prototype.appendChild,a.prototype.replaceChild=i.prototype.replaceChild,a.prototype.removeChild=i.prototype.removeChild,a.prototype.toString=function(){return this.childNodes.map(function(r){return String(r)}).join("")}}),kf=We(function(t,e){e.exports=i;function i(a){}i.prototype.initEvent=function(a,r,n){this.type=a,this.bubbles=r,this.cancelable=n},i.prototype.preventDefault=function(){}}),Sf=We(function(t,e){ra();var i=rm(),a=gf(),r=yf(),n=lm(),s=Af(),o=kf(),l=nm(),d=sm(),m=om();e.exports=p;function p(){if(!aa(this,p))return new p;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var h=p.prototype;h.createTextNode=function(u){return new r(u,this)},h.createElementNS=function(u,v){var E=u===null?null:String(u);return new n(v,this,E)},h.createElement=function(u){return new n(u,this)},h.createDocumentFragment=function(){return new s(this)},h.createEvent=function(u){return new o(u)},h.createComment=function(u){return new a(u,this)},h.getElementById=function(u){u=String(u);var v=i(this.childNodes,function(E){if(String(E.id)===u)return E});return v||null},h.getElementsByClassName=n.prototype.getElementsByClassName,h.getElementsByTagName=n.prototype.getElementsByTagName,h.contains=n.prototype.contains,h.removeEventListener=m,h.addEventListener=d,h.dispatchEvent=l}),wf=We(function(t,e){var i=Sf();e.exports=new i}),dm=We(function(t,e){var i=typeof Za<"u"?Za:typeof window<"u"?window:{},a=wf(),r;typeof document<"u"?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=a)),e.exports=r});function If(t){if(Array.isArray(t))return t}function Rf(t,e){var i=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(i!=null){var a=[],r=!0,n=!1,s,o;try{for(i=i.call(t);!(r=(s=i.next()).done)&&(a.push(s.value),!(e&&a.length===e));r=!0);}catch(l){n=!0,o=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(n)throw o}}return a}}function Cf(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yl(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}function um(t,e){if(t){if(typeof t=="string")return yl(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return yl(t,e)}}function ai(t,e){return If(t)||Rf(t,e)||um(t,e)||Cf()}var Yr=ot(Yt()),gc=ot(Yt()),Lf=ot(Yt()),Df={now:function(){var t=Lf.default.performance,e=t&&t.timing,i=e&&e.navigationStart,a=typeof i=="number"&&typeof t.now=="function"?i+t.now():Date.now();return Math.round(a)}},Re=Df,nn=function(){var t,e,i;if(typeof((t=gc.default.crypto)===null||t===void 0?void 0:t.getRandomValues)=="function"){i=new Uint8Array(32),gc.default.crypto.getRandomValues(i);for(var a=0;a<32;a++)i[a]=i[a]%16}else{i=[];for(var r=0;r<32;r++)i[r]=Math.random()*16|0}var n=0;e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(l){var d=l==="x"?i[n]:i[n]&3|8;return n++,d.toString(16)});var s=Re.now(),o=s?.toString(16).substring(3);return o?e.substring(0,28)+o:e},cm=function(){return("000000"+(Math.random()*Math.pow(36,6)<<0).toString(36)).slice(-6)},ht=function(t){if(t&&typeof t.nodeName<"u")return t.muxId||(t.muxId=cm()),t.muxId;var e;try{e=document.querySelector(t)}catch{}return e&&!e.muxId&&(e.muxId=t),e?.muxId||t},Xs=function(t){var e;t&&typeof t.nodeName<"u"?(e=t,t=ht(e)):e=document.querySelector(t);var i=e&&e.nodeName?e.nodeName.toLowerCase():"";return[e,t,i]};function Mf(t){if(Array.isArray(t))return yl(t)}function xf(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Of(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mt(t){return Mf(t)||xf(t)||um(t)||Of()}var Wi={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4},Nf=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,i,a,r,n,s,o=[console,t],l=(i=console.trace).bind.apply(i,mt(o)),d=(a=console.info).bind.apply(a,mt(o)),m=(r=console.debug).bind.apply(r,mt(o)),p=(n=console.warn).bind.apply(n,mt(o)),h=(s=console.error).bind.apply(s,mt(o)),u=e;return{trace:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.TRACE))return l.apply(void 0,mt(E))},debug:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.DEBUG))return m.apply(void 0,mt(E))},info:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.INFO))return d.apply(void 0,mt(E))},warn:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.WARN))return p.apply(void 0,mt(E))},error:function(){for(var v=arguments.length,E=new Array(v),g=0;g<v;g++)E[g]=arguments[g];if(!(u>Wi.ERROR))return h.apply(void 0,mt(E))},get level(){return u},set level(v){v!==this.level&&(u=v??e)}}},ee=Nf("[mux]"),jo=ot(Yt());function Tl(){var t=jo.default.doNotTrack||jo.default.navigator&&jo.default.navigator.doNotTrack;return t==="1"}function P(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}ra();function Ae(t,e){if(!aa(t,e))throw new TypeError("Cannot call a class as a function")}function Pf(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function Gt(t,e,i){return e&&Pf(t.prototype,e),t}function w(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Xa(t){return Xa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xa(t)}function Uf(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Xa(t),t!==null););return t}function Vn(t,e,i){return typeof Reflect<"u"&&Reflect.get?Vn=Reflect.get:Vn=function(a,r,n){var s=Uf(a,r);if(s){var o=Object.getOwnPropertyDescriptor(s,r);return o.get?o.get.call(n||a):o.value}},Vn(t,e,i||t)}function Al(t,e){return Al=Object.setPrototypeOf||function(i,a){return i.__proto__=a,i},Al(t,e)}function $f(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Al(t,e)}function Hf(t,e){if(t==null)return{};var i={},a=Object.keys(t),r,n;for(n=0;n<a.length;n++)r=a[n],!(e.indexOf(r)>=0)&&(i[r]=t[r]);return i}function Bf(t,e){if(t==null)return{};var i=Hf(t,e),a,r;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(r=0;r<n.length;r++)a=n[r],!(e.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(i[a]=t[a])}return i}function Wf(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}am();function Ff(t,e){return e&&(im(e)==="object"||typeof e=="function")?e:P(t)}function Kf(t){var e=Wf();return function(){var i=Xa(t),a;if(e){var r=Xa(this).constructor;a=Reflect.construct(i,arguments,r)}else a=i.apply(this,arguments);return Ff(this,a)}}var _t=function(t){return sn(t)[0]},sn=function(t){if(typeof t!="string"||t==="")return["localhost"];var e=/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,i=t.match(e)||[],a=i[4],r;return a&&(r=(a.match(/[^\.]+\.[^\.]+$/)||[])[0]),[a,r]},Zo=ot(Yt()),Vf={exists:function(){var t=Zo.default.performance,e=t&&t.timing;return e!==void 0},domContentLoadedEventEnd:function(){var t=Zo.default.performance,e=t&&t.timing;return e&&e.domContentLoadedEventEnd},navigationStart:function(){var t=Zo.default.performance,e=t&&t.timing;return e&&e.navigationStart}},Js=Vf;function Te(t,e,i){i=i===void 0?1:i,t[e]=t[e]||0,t[e]+=i}function eo(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},a=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(a=a.concat(Object.getOwnPropertySymbols(i).filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable}))),a.forEach(function(r){w(t,r,i[r])})}return t}function qf(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);i.push.apply(i,a)}return i}function $d(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):qf(Object(e)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}),t}var Yf=["x-cdn","content-type"],hm=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],Gf=Yf.concat(hm);function Hd(t){t=t||"";var e={},i=t.trim().split(/[\r\n]+/);return i.forEach(function(a){if(a){var r=a.split(": "),n=r.shift();n&&(Gf.indexOf(n.toLowerCase())>=0||n.toLowerCase().indexOf("x-litix-")===0)&&(e[n]=r.join(": "))}}),e}function to(t){if(t){var e=hm.find(function(i){return t[i]!==void 0});return e?t[e]:void 0}}var Qf=function(t){var e={};for(var i in t){var a=t[i],r=a["DATA-ID"].search("io.litix.data.");if(r!==-1){var n=a["DATA-ID"].replace("io.litix.data.","");e[n]=a.VALUE}}return e},mm=Qf,Sn=function(t){if(!t)return{};var e=Js.navigationStart(),i=t.loading,a=i?i.start:t.trequest,r=i?i.first:t.tfirst,n=i?i.end:t.tload;return{bytesLoaded:t.total,requestStart:Math.round(e+a),responseStart:Math.round(e+r),responseEnd:Math.round(e+n)}},cr=function(t){if(!(!t||typeof t.getAllResponseHeaders!="function"))return Hd(t.getAllResponseHeaders())},zf=function(t,e,i){var a=arguments.length>4?arguments[4]:void 0,r=t.log,n=t.utils.secondsToMs,s=function(g){var y=parseInt(a.version),T;return y===1&&g.programDateTime!==null&&(T=g.programDateTime),y===0&&g.pdt!==null&&(T=g.pdt),T};if(!Js.exists()){r.warn("performance timing not supported. Not tracking HLS.js.");return}var o=function(g,y){return t.emit(e,g,y)},l=function(g,y){var T=y.levels,_=y.audioTracks,S=y.url,C=y.stats,N=y.networkDetails,$=y.sessionData,G={},J={};T.forEach(function(he,Pe){G[Pe]={width:he.width,height:he.height,bitrate:he.bitrate,attrs:he.attrs}}),_.forEach(function(he,Pe){J[Pe]={name:he.name,language:he.lang,bitrate:he.bitrate}});var K=Sn(C),U=K.bytesLoaded,Me=K.requestStart,Fe=K.responseStart,Ke=K.responseEnd;o("requestcompleted",$d(eo({},mm($)),{request_event_type:g,request_bytes_loaded:U,request_start:Me,request_response_start:Fe,request_response_end:Ke,request_type:"manifest",request_hostname:_t(S),request_response_headers:cr(N),request_rendition_lists:{media:G,audio:J,video:{}}}))};i.on(a.Events.MANIFEST_LOADED,l);var d=function(g,y){var T=y.details,_=y.level,S=y.networkDetails,C=y.stats,N=Sn(C),$=N.bytesLoaded,G=N.requestStart,J=N.responseStart,K=N.responseEnd,U=T.fragments[T.fragments.length-1],Me=s(U)+n(U.duration);o("requestcompleted",{request_event_type:g,request_bytes_loaded:$,request_start:G,request_response_start:J,request_response_end:K,request_current_level:_,request_type:"manifest",request_hostname:_t(T.url),request_response_headers:cr(S),video_holdback:T.holdBack&&n(T.holdBack),video_part_holdback:T.partHoldBack&&n(T.partHoldBack),video_part_target_duration:T.partTarget&&n(T.partTarget),video_target_duration:T.targetduration&&n(T.targetduration),video_source_is_live:T.live,player_manifest_newest_program_time:isNaN(Me)?void 0:Me})};i.on(a.Events.LEVEL_LOADED,d);var m=function(g,y){var T=y.details,_=y.networkDetails,S=y.stats,C=Sn(S),N=C.bytesLoaded,$=C.requestStart,G=C.responseStart,J=C.responseEnd;o("requestcompleted",{request_event_type:g,request_bytes_loaded:N,request_start:$,request_response_start:G,request_response_end:J,request_type:"manifest",request_hostname:_t(T.url),request_response_headers:cr(_)})};i.on(a.Events.AUDIO_TRACK_LOADED,m);var p=function(g,y){var T=y.stats,_=y.networkDetails,S=y.frag;T=T||S.stats;var C=Sn(T),N=C.bytesLoaded,$=C.requestStart,G=C.responseStart,J=C.responseEnd,K=_?cr(_):void 0,U={request_event_type:g,request_bytes_loaded:N,request_start:$,request_response_start:G,request_response_end:J,request_hostname:_?_t(_.responseURL):void 0,request_id:K?to(K):void 0,request_response_headers:K,request_media_duration:S.duration,request_url:_?.responseURL};S.type==="main"?(U.request_type="media",U.request_current_level=S.level,U.request_video_width=(i.levels[S.level]||{}).width,U.request_video_height=(i.levels[S.level]||{}).height,U.request_labeled_bitrate=(i.levels[S.level]||{}).bitrate):U.request_type=S.type,o("requestcompleted",U)};i.on(a.Events.FRAG_LOADED,p);var h=function(g,y){var T=y.frag,_=T.start,S=s(T),C={currentFragmentPDT:S,currentFragmentStart:n(_)};o("fragmentchange",C)};i.on(a.Events.FRAG_CHANGED,h);var u=function(g,y){var T=y.type,_=y.details,S=y.response,C=y.fatal,N=y.frag,$=y.networkDetails,G=N?.url||y.url||"",J=$?cr($):void 0;if((_===a.ErrorDetails.MANIFEST_LOAD_ERROR||_===a.ErrorDetails.MANIFEST_LOAD_TIMEOUT||_===a.ErrorDetails.FRAG_LOAD_ERROR||_===a.ErrorDetails.FRAG_LOAD_TIMEOUT||_===a.ErrorDetails.LEVEL_LOAD_ERROR||_===a.ErrorDetails.LEVEL_LOAD_TIMEOUT||_===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||_===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||_===a.ErrorDetails.SUBTITLE_LOAD_ERROR||_===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||_===a.ErrorDetails.KEY_LOAD_ERROR||_===a.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:_,request_url:G,request_hostname:_t(G),request_id:J?to(J):void 0,request_type:_===a.ErrorDetails.FRAG_LOAD_ERROR||_===a.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":_===a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||_===a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":_===a.ErrorDetails.SUBTITLE_LOAD_ERROR||_===a.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":_===a.ErrorDetails.KEY_LOAD_ERROR||_===a.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:S?.code,request_error_text:S?.text}),C){var K,U="".concat(G?"url: ".concat(G,`
4
4
  `):"")+"".concat(S&&(S.code||S.text)?"response: ".concat(S.code,", ").concat(S.text,`
5
5
  `):"")+"".concat(y.reason?"failure reason: ".concat(y.reason,`
6
6
  `):"")+"".concat(y.level?"level: ".concat(y.level,`
@@ -9,20 +9,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
9
9
  `):"")+"".concat(y.error?"error: ".concat(y.error,`
10
10
  `):"")+"".concat(y.event?"event: ".concat(y.event,`
11
11
  `):"")+"".concat(y.err?"error message: ".concat((K=y.err)===null||K===void 0?void 0:K.message,`
12
- `):"");o("error",{player_error_code:T,player_error_message:_,player_error_context:U})}};i.on(a.Events.ERROR,u);var v=function(g,y){var T=y.frag,_=T&&T._url||"";o("requestcanceled",{request_event_type:g,request_url:_,request_type:"media",request_hostname:_t(_)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v);var E=function(g,y){var T=y.level,_=i.levels[T];if(_&&_.attrs&&_.attrs.BANDWIDTH){var S=_.attrs.BANDWIDTH,C,N=parseFloat(_.attrs["FRAME-RATE"]);isNaN(N)||(C=N),S?o("renditionchange",{video_source_fps:C,video_source_bitrate:S,video_source_width:_.width,video_source_height:_.height,video_source_rendition_name:_.name,video_source_codec:_?.videoCodec}):r.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};i.on(a.Events.LEVEL_SWITCHED,E),i._stopMuxMonitor=function(){i.off(a.Events.MANIFEST_LOADED,l),i.off(a.Events.LEVEL_LOADED,d),i.off(a.Events.AUDIO_TRACK_LOADED,m),i.off(a.Events.FRAG_LOADED,p),i.off(a.Events.FRAG_CHANGED,h),i.off(a.Events.ERROR,u),i.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v),i.off(a.Events.LEVEL_SWITCHED,E),i.off(a.Events.DESTROYING,i._stopMuxMonitor),delete i._stopMuxMonitor},i.on(a.Events.DESTROYING,i._stopMuxMonitor)},jf=function(t){t&&typeof t._stopMuxMonitor=="function"&&t._stopMuxMonitor()},yc=function(t,e){if(!t||!t.requestEndDate)return{};var i=_t(t.url),a=t.url,r=t.bytesLoaded,n=new Date(t.requestStartDate).getTime(),s=new Date(t.firstByteDate).getTime(),o=new Date(t.requestEndDate).getTime(),l=isNaN(t.duration)?0:t.duration,d=typeof e.getMetricsFor=="function"?e.getMetricsFor(t.mediaType).HttpList:e.getDashMetrics().getHttpRequests(t.mediaType),m;d.length>0&&(m=Hd(d[d.length-1]._responseHeaders||""));var p=m?to(m):void 0;return{requestStart:n,requestResponseStart:s,requestResponseEnd:o,requestBytesLoaded:r,requestResponseHeaders:m,requestMediaDuration:l,requestHostname:i,requestUrl:a,requestId:p}},Zf=function(t,e){var i=e.getQualityFor(t),a=e.getCurrentTrackFor(t).bitrateList;return a?{currentLevel:i,renditionWidth:a[i].width||null,renditionHeight:a[i].height||null,renditionBitrate:a[i].bandwidth}:{}},Xf=function(t){var e;return(e=t.match(/.*codecs\*?="(.*)"/))===null||e===void 0?void 0:e[1]},Jf=function(t){try{var e,i,a=(i=t.getVersion)===null||i===void 0||(e=i.call(t))===null||e===void 0?void 0:e.split(".").map(function(r){return parseInt(r)})[0];return a}catch{return!1}},eE=function(t,e,i){var a=t.log;if(!i||!i.on){a.warn("Invalid dash.js player reference. Monitoring blocked.");return}var r=Jf(i),n=function(T,_){return t.emit(e,T,_)},s=function(T){var _=T.type,S=T.data,C=(S||{}).url;n("requestcompleted",{request_event_type:_,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:_t(C),request_url:C})};i.on("manifestLoaded",s);var o={},l=function(T){if(typeof T.getRequests!="function")return null;var _=T.getRequests({state:"executed"});return _.length===0?null:_[_.length-1]},d=function(T){var _=T.type,S=T.fragmentModel,C=T.chunk,N=l(S);m({type:_,request:N,chunk:C})},m=function(T){var _=T.type,S=T.chunk,C=T.request,N=(S||{}).mediaInfo,$=N||{},G=$.type,J=$.bitrateList;J=J||[];var K={};J.forEach(function(Ve,ke){K[ke]={},K[ke].width=Ve.width,K[ke].height=Ve.height,K[ke].bitrate=Ve.bandwidth,K[ke].attrs={}}),G==="video"?o.video=K:G==="audio"?o.audio=K:o.media=K;var U=yc(C,i),Me=U.requestStart,Fe=U.requestResponseStart,Ke=U.requestResponseEnd,he=U.requestResponseHeaders,Pe=U.requestMediaDuration,yt=U.requestHostname,Ue=U.requestUrl,dt=U.requestId;n("requestcompleted",{request_event_type:_,request_start:Me,request_response_start:Fe,request_response_end:Ke,request_bytes_loaded:-1,request_type:G+"_init",request_response_headers:he,request_hostname:yt,request_id:dt,request_url:Ue,request_media_duration:Pe,request_rendition_lists:o})};r>=4?i.on("initFragmentLoaded",m):i.on("initFragmentLoaded",d);var p=function(T){var _=T.type,S=T.fragmentModel,C=T.chunk,N=l(S);h({type:_,request:N,chunk:C})},h=function(T){var _=T.type,S=T.chunk,C=T.request,N=S||{},$=N.mediaInfo,G=N.start,J=$||{},K=J.type,U=yc(C,i),Me=U.requestStart,Fe=U.requestResponseStart,Ke=U.requestResponseEnd,he=U.requestBytesLoaded,Pe=U.requestResponseHeaders,yt=U.requestMediaDuration,Ue=U.requestHostname,dt=U.requestUrl,Ve=U.requestId,ke=Zf(K,i),xe=ke.currentLevel,Je=ke.renditionWidth,na=ke.renditionHeight,yn=ke.renditionBitrate;n("requestcompleted",{request_event_type:_,request_start:Me,request_response_start:Fe,request_response_end:Ke,request_bytes_loaded:he,request_type:K,request_response_headers:Pe,request_hostname:Ue,request_id:Ve,request_url:dt,request_media_start_time:G,request_media_duration:yt,request_current_level:xe,request_labeled_bitrate:yn,request_video_width:Je,request_video_height:na})};r>=4?i.on("mediaFragmentLoaded",h):i.on("mediaFragmentLoaded",p);var u={video:void 0,audio:void 0,totalBitrate:void 0},v=function(){if(u.video&&typeof u.video.bitrate=="number"){if(!(u.video.width&&u.video.height)){a.warn("have bitrate info for video but missing width/height");return}var T=u.video.bitrate;if(u.audio&&typeof u.audio.bitrate=="number"&&(T+=u.audio.bitrate),T!==u.totalBitrate)return u.totalBitrate=T,{video_source_bitrate:T,video_source_height:u.video.height,video_source_width:u.video.width,video_source_codec:Xf(u.video.codec)}}},E=function(T,_,S){if(typeof T.newQuality!="number"){a.warn("missing evt.newQuality in qualityChangeRendered event",T);return}var C=T.mediaType;if(C==="audio"||C==="video"){var N=i.getBitrateInfoListFor(C).find(function(G){var J=G.qualityIndex;return J===T.newQuality});if(!(N&&typeof N.bitrate=="number")){a.warn("missing bitrate info for ".concat(C));return}u[C]=$d(eo({},N),{codec:i.getCurrentTrackFor(C).codec});var $=v();$&&n("renditionchange",$)}};i.on("qualityChangeRendered",E);var g=function(T){var _=T.request,S=T.mediaType;_=_||{},n("requestcanceled",{request_event_type:_.type+"_"+_.action,request_url:_.url,request_type:S,request_hostname:_t(_.url)})};i.on("fragmentLoadingAbandoned",g);var y=function(T){var _=T.error,S,C,N=(_==null||(S=_.data)===null||S===void 0?void 0:S.request)||{},$=(_==null||(C=_.data)===null||C===void 0?void 0:C.response)||{};_?.code===27&&n("requestfailed",{request_error:N.type+"_"+N.action,request_url:N.url,request_hostname:_t(N.url),request_type:N.mediaType,request_error_code:$.status,request_error_text:$.statusText});var G="".concat(N!=null&&N.url?"url: ".concat(N.url,`
12
+ `):"");o("error",{player_error_code:T,player_error_message:_,player_error_context:U})}};i.on(a.Events.ERROR,u);var v=function(g,y){var T=y.frag,_=T&&T._url||"";o("requestcanceled",{request_event_type:g,request_url:_,request_type:"media",request_hostname:_t(_)})};i.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v);var E=function(g,y){var T=y.level,_=i.levels[T];if(_&&_.attrs&&_.attrs.BANDWIDTH){var S=_.attrs.BANDWIDTH,C,N=parseFloat(_.attrs["FRAME-RATE"]);isNaN(N)||(C=N),S?o("renditionchange",{video_source_fps:C,video_source_bitrate:S,video_source_width:_.width,video_source_height:_.height,video_source_rendition_name:_.name,video_source_codec:_?.videoCodec}):r.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};i.on(a.Events.LEVEL_SWITCHED,E),i._stopMuxMonitor=function(){i.off(a.Events.MANIFEST_LOADED,l),i.off(a.Events.LEVEL_LOADED,d),i.off(a.Events.AUDIO_TRACK_LOADED,m),i.off(a.Events.FRAG_LOADED,p),i.off(a.Events.FRAG_CHANGED,h),i.off(a.Events.ERROR,u),i.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,v),i.off(a.Events.LEVEL_SWITCHED,E),i.off(a.Events.DESTROYING,i._stopMuxMonitor),delete i._stopMuxMonitor},i.on(a.Events.DESTROYING,i._stopMuxMonitor)},jf=function(t){t&&typeof t._stopMuxMonitor=="function"&&t._stopMuxMonitor()},yc=function(t,e){if(!t||!t.requestEndDate)return{};var i=_t(t.url),a=t.url,r=t.bytesLoaded,n=new Date(t.requestStartDate).getTime(),s=new Date(t.firstByteDate).getTime(),o=new Date(t.requestEndDate).getTime(),l=isNaN(t.duration)?0:t.duration,d=typeof e.getMetricsFor=="function"?e.getMetricsFor(t.mediaType).HttpList:e.getDashMetrics().getHttpRequests(t.mediaType),m;d.length>0&&(m=Hd(d[d.length-1]._responseHeaders||""));var p=m?to(m):void 0;return{requestStart:n,requestResponseStart:s,requestResponseEnd:o,requestBytesLoaded:r,requestResponseHeaders:m,requestMediaDuration:l,requestHostname:i,requestUrl:a,requestId:p}},Zf=function(t,e){var i=e.getQualityFor(t),a=e.getCurrentTrackFor(t).bitrateList;return a?{currentLevel:i,renditionWidth:a[i].width||null,renditionHeight:a[i].height||null,renditionBitrate:a[i].bandwidth}:{}},Xf=function(t){var e;return(e=t.match(/.*codecs\*?="(.*)"/))===null||e===void 0?void 0:e[1]},Jf=function(t){try{var e,i,a=(i=t.getVersion)===null||i===void 0||(e=i.call(t))===null||e===void 0?void 0:e.split(".").map(function(r){return parseInt(r)})[0];return a}catch{return!1}},eE=function(t,e,i){var a=t.log;if(!i||!i.on){a.warn("Invalid dash.js player reference. Monitoring blocked.");return}var r=Jf(i),n=function(T,_){return t.emit(e,T,_)},s=function(T){var _=T.type,S=T.data,C=(S||{}).url;n("requestcompleted",{request_event_type:_,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:_t(C),request_url:C})};i.on("manifestLoaded",s);var o={},l=function(T){if(typeof T.getRequests!="function")return null;var _=T.getRequests({state:"executed"});return _.length===0?null:_[_.length-1]},d=function(T){var _=T.type,S=T.fragmentModel,C=T.chunk,N=l(S);m({type:_,request:N,chunk:C})},m=function(T){var _=T.type,S=T.chunk,C=T.request,N=(S||{}).mediaInfo,$=N||{},G=$.type,J=$.bitrateList;J=J||[];var K={};J.forEach(function(Ve,ke){K[ke]={},K[ke].width=Ve.width,K[ke].height=Ve.height,K[ke].bitrate=Ve.bandwidth,K[ke].attrs={}}),G==="video"?o.video=K:G==="audio"?o.audio=K:o.media=K;var U=yc(C,i),Me=U.requestStart,Fe=U.requestResponseStart,Ke=U.requestResponseEnd,he=U.requestResponseHeaders,Pe=U.requestMediaDuration,yt=U.requestHostname,Ue=U.requestUrl,dt=U.requestId;n("requestcompleted",{request_event_type:_,request_start:Me,request_response_start:Fe,request_response_end:Ke,request_bytes_loaded:-1,request_type:G+"_init",request_response_headers:he,request_hostname:yt,request_id:dt,request_url:Ue,request_media_duration:Pe,request_rendition_lists:o})};r>=4?i.on("initFragmentLoaded",m):i.on("initFragmentLoaded",d);var p=function(T){var _=T.type,S=T.fragmentModel,C=T.chunk,N=l(S);h({type:_,request:N,chunk:C})},h=function(T){var _=T.type,S=T.chunk,C=T.request,N=S||{},$=N.mediaInfo,G=N.start,J=$||{},K=J.type,U=yc(C,i),Me=U.requestStart,Fe=U.requestResponseStart,Ke=U.requestResponseEnd,he=U.requestBytesLoaded,Pe=U.requestResponseHeaders,yt=U.requestMediaDuration,Ue=U.requestHostname,dt=U.requestUrl,Ve=U.requestId,ke=Zf(K,i),xe=ke.currentLevel,Je=ke.renditionWidth,na=ke.renditionHeight,Tn=ke.renditionBitrate;n("requestcompleted",{request_event_type:_,request_start:Me,request_response_start:Fe,request_response_end:Ke,request_bytes_loaded:he,request_type:K,request_response_headers:Pe,request_hostname:Ue,request_id:Ve,request_url:dt,request_media_start_time:G,request_media_duration:yt,request_current_level:xe,request_labeled_bitrate:Tn,request_video_width:Je,request_video_height:na})};r>=4?i.on("mediaFragmentLoaded",h):i.on("mediaFragmentLoaded",p);var u={video:void 0,audio:void 0,totalBitrate:void 0},v=function(){if(u.video&&typeof u.video.bitrate=="number"){if(!(u.video.width&&u.video.height)){a.warn("have bitrate info for video but missing width/height");return}var T=u.video.bitrate;if(u.audio&&typeof u.audio.bitrate=="number"&&(T+=u.audio.bitrate),T!==u.totalBitrate)return u.totalBitrate=T,{video_source_bitrate:T,video_source_height:u.video.height,video_source_width:u.video.width,video_source_codec:Xf(u.video.codec)}}},E=function(T,_,S){if(typeof T.newQuality!="number"){a.warn("missing evt.newQuality in qualityChangeRendered event",T);return}var C=T.mediaType;if(C==="audio"||C==="video"){var N=i.getBitrateInfoListFor(C).find(function(G){var J=G.qualityIndex;return J===T.newQuality});if(!(N&&typeof N.bitrate=="number")){a.warn("missing bitrate info for ".concat(C));return}u[C]=$d(eo({},N),{codec:i.getCurrentTrackFor(C).codec});var $=v();$&&n("renditionchange",$)}};i.on("qualityChangeRendered",E);var g=function(T){var _=T.request,S=T.mediaType;_=_||{},n("requestcanceled",{request_event_type:_.type+"_"+_.action,request_url:_.url,request_type:S,request_hostname:_t(_.url)})};i.on("fragmentLoadingAbandoned",g);var y=function(T){var _=T.error,S,C,N=(_==null||(S=_.data)===null||S===void 0?void 0:S.request)||{},$=(_==null||(C=_.data)===null||C===void 0?void 0:C.response)||{};_?.code===27&&n("requestfailed",{request_error:N.type+"_"+N.action,request_url:N.url,request_hostname:_t(N.url),request_type:N.mediaType,request_error_code:$.status,request_error_text:$.statusText});var G="".concat(N!=null&&N.url?"url: ".concat(N.url,`
13
13
  `):"")+"".concat($!=null&&$.status||$!=null&&$.statusText?"response: ".concat($?.status,", ").concat($?.statusText,`
14
- `):"");n("error",{player_error_code:_?.code,player_error_message:_?.message,player_error_context:G})};i.on("error",y),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",m),i.off("mediaFragmentLoaded",h),i.off("qualityChangeRendered",E),i.off("error",y),i.off("fragmentLoadingAbandoned",g),delete i._stopMuxMonitor}},tE=function(t){t&&typeof t._stopMuxMonitor=="function"&&t._stopMuxMonitor()},Tc=0,iE=function(){function t(){Ae(this,t),w(this,"_listeners",void 0)}return Gt(t,[{key:"on",value:function(e,i,a){return i._eventEmitterGuid=i._eventEmitterGuid||++Tc,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],a&&(i=i.bind(a)),this._listeners[e].push(i),i}},{key:"off",value:function(e,i){var a=this._listeners&&this._listeners[e];a&&a.forEach(function(r,n){r._eventEmitterGuid===i._eventEmitterGuid&&a.splice(n,1)})}},{key:"one",value:function(e,i,a){var r=this;i._eventEmitterGuid=i._eventEmitterGuid||++Tc;var n=function(){r.off(e,n),i.apply(a||this,arguments)};n._eventEmitterGuid=i._eventEmitterGuid,this.on(e,n)}},{key:"emit",value:function(e,i){var a=this;if(this._listeners){i=i||{};var r=this._listeners["before"+e]||[],n=this._listeners["before*"]||[],s=this._listeners[e]||[],o=this._listeners["after"+e]||[],l=function(d,m){d=d.slice(),d.forEach(function(p){p.call(a,{type:e},m)})};l(r,i),l(n,i),l(s,i),l(o,i)}}}]),t}(),aE=iE,Xo=ot(Yt()),rE=function(){function t(e){var i=this;Ae(this,t),w(this,"_playbackHeartbeatInterval",void 0),w(this,"_playheadShouldBeProgressing",void 0),w(this,"pm",void 0),this.pm=e,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,e.on("playing",function(){i._playheadShouldBeProgressing=!0}),e.on("play",this._startPlaybackHeartbeatInterval.bind(this)),e.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),e.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),e.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("seeked",function(){e.data.player_is_paused?i._stopPlaybackHeartbeatInterval():i._startPlaybackHeartbeatInterval()}),e.on("timeupdate",function(){i._playbackHeartbeatInterval!==null&&e.emit("playbackheartbeat")}),e.on("devicesleep",function(a,r){i._playbackHeartbeatInterval!==null&&(Xo.default.clearInterval(i._playbackHeartbeatInterval),e.emit("playbackheartbeatend",{viewer_time:r.viewer_time}),i._playbackHeartbeatInterval=null)})}return Gt(t,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;this._playbackHeartbeatInterval===null&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=Xo.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,this._playbackHeartbeatInterval!==null&&(Xo.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),t}(),nE=rE,sE=function t(e){var i=this;Ae(this,t),w(this,"viewErrored",void 0),e.on("viewinit",function(){i.viewErrored=!1}),e.on("error",function(a,r){try{var n=e.errorTranslator({player_error_code:r.player_error_code,player_error_message:r.player_error_message,player_error_context:r.player_error_context,player_error_severity:r.player_error_severity,player_error_business_exception:r.player_error_business_exception});n&&(e.data.player_error_code=n.player_error_code||r.player_error_code,e.data.player_error_message=n.player_error_message||r.player_error_message,e.data.player_error_context=n.player_error_context||r.player_error_context,e.data.player_error_severity=n.player_error_severity||r.player_error_severity,e.data.player_error_business_exception=n.player_error_business_exception||r.player_error_business_exception,i.viewErrored=!0)}catch(s){e.mux.log.warn("Exception in error translator callback.",s),i.viewErrored=!0}}),e.on("aftererror",function(){var a,r,n,s,o;(a=e.data)===null||a===void 0||delete a.player_error_code,(r=e.data)===null||r===void 0||delete r.player_error_message,(n=e.data)===null||n===void 0||delete n.player_error_context,(s=e.data)===null||s===void 0||delete s.player_error_severity,(o=e.data)===null||o===void 0||delete o.player_error_business_exception})},oE=sE,lE=function(){function t(e){Ae(this,t),w(this,"_watchTimeTrackerLastCheckedTime",void 0),w(this,"pm",void 0),this.pm=e,this._watchTimeTrackerLastCheckedTime=null,e.on("playbackheartbeat",this._updateWatchTime.bind(this)),e.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return Gt(t,[{key:"_updateWatchTime",value:function(e,i){var a=i.viewer_time;this._watchTimeTrackerLastCheckedTime===null&&(this._watchTimeTrackerLastCheckedTime=a),Te(this.pm.data,"view_watch_time",a-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=a}},{key:"_clearWatchTimeState",value:function(e,i){this._updateWatchTime(e,i),this._watchTimeTrackerLastCheckedTime=null}}]),t}(),dE=lE,uE=function(){function t(e){var i=this;Ae(this,t),w(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),w(this,"_lastTime",void 0),w(this,"_isAdPlaying",void 0),w(this,"_callbackUpdatePlaybackTime",void 0),w(this,"pm",void 0),this.pm=e,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=Re.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,e.on("viewinit",function(){i.pm.data.view_playing_time_ms_cumulative=0});var a=this._startPlaybackTimeTracking.bind(this);e.on("playing",a),e.on("adplaying",a),e.on("seeked",a),e.on("rebufferend",a);var r=this._stopPlaybackTimeTracking.bind(this);e.on("playbackheartbeatend",r),e.on("seeking",r),e.on("rebufferstart",r),e.on("adplaying",function(){i._isAdPlaying=!0}),e.on("adended",function(){i._isAdPlaying=!1}),e.on("adpause",function(){i._isAdPlaying=!1}),e.on("adbreakstart",function(){i._isAdPlaying=!1}),e.on("adbreakend",function(){i._isAdPlaying=!1}),e.on("adplay",function(){i._isAdPlaying=!1}),e.on("viewinit",function(){i._playbackTimeTrackerLastPlayheadPosition=-1,i._lastTime=Re.now(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return Gt(t,[{key:"_startPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime===null&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=Re.now(),this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time||0,i=Re.now(),a=i-this._lastTime,r=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?r=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(r=a),r>0&&r<=1e3&&Te(this.pm.data,"view_content_playback_time",r),this._callbackUpdatePlaybackTime!==null&&a>0&&a<=1e3&&(this._isAdPlaying&&Te(this.pm.data,"ad_playing_time_ms_cumulative",a),Te(this.pm.data,"view_playing_time_ms_cumulative",a)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=i}}]),t}(),cE=uE,hE=function(){function t(e){Ae(this,t),w(this,"pm",void 0),this.pm=e;var i=this._updatePlayheadTime.bind(this);e.on("playbackheartbeat",i),e.on("playbackheartbeatend",i),e.on("timeupdate",i),e.on("destroy",function(){e.off("timeupdate",i)})}return Gt(t,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=typeof this.pm.data.view_max_playhead_position>"u"?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,i){var a=this,r=function(){a.pm.currentFragmentPDT&&a.pm.currentFragmentStart&&(a.pm.data.player_program_time=a.pm.currentFragmentPDT+a.pm.data.player_playhead_time-a.pm.currentFragmentStart)};if(i&&i.player_playhead_time)this.pm.data.player_playhead_time=i.player_playhead_time,r(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var n=this.pm.getPlayheadTime();typeof n<"u"&&(this.pm.data.player_playhead_time=n,r(),this._updateMaxPlayheadPosition())}}}]),t}(),mE=hE,Ac=5*60*1e3,pE=function t(e){if(Ae(this,t),!e.disableRebufferTracking){var i,a=function(n,s){r(s),i=void 0},r=function(n){if(i){var s=n.viewer_time-i;Te(e.data,"view_rebuffer_duration",s),i=n.viewer_time,e.data.view_rebuffer_duration>Ac&&(e.emit("viewend"),e.send("viewend"),e.mux.log.warn("Ending view after rebuffering for longer than ".concat(Ac,"ms, future events will be ignored unless a programchange or videochange occurs.")))}e.data.view_watch_time>=0&&e.data.view_rebuffer_count>0&&(e.data.view_rebuffer_frequency=e.data.view_rebuffer_count/e.data.view_watch_time,e.data.view_rebuffer_percentage=e.data.view_rebuffer_duration/e.data.view_watch_time)};e.on("playbackheartbeat",function(n,s){return r(s)}),e.on("rebufferstart",function(n,s){i||(Te(e.data,"view_rebuffer_count",1),i=s.viewer_time,e.one("rebufferend",a))}),e.on("viewinit",function(){i=void 0,e.off("rebufferend",a)})}},vE=pE,fE=function(){function t(e){var i=this;Ae(this,t),w(this,"_lastCheckedTime",void 0),w(this,"_lastPlayheadTime",void 0),w(this,"_lastPlayheadTimeUpdatedTime",void 0),w(this,"_rebuffering",void 0),w(this,"pm",void 0),this.pm=e,!(e.disableRebufferTracking||e.disablePlayheadRebufferTracking)&&(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,e.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),e.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),e.on("seeking",function(){i._cleanupRebufferTracker(null,{viewer_time:Re.now()})}))}return Gt(t,[{key:"_checkIfRebuffering",value:function(e,i){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing){this._cleanupRebufferTracker(e,i);return}if(this._lastCheckedTime===null){this._prepareRebufferTrackerState(i.viewer_time);return}if(this._lastPlayheadTime!==this.pm.data.player_playhead_time){this._cleanupRebufferTracker(e,i,!0);return}var a=i.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.sustainedRebufferThreshold=="number"&&a>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=i.viewer_time}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:i.viewer_time});else{if(this._lastCheckedTime===null)return;var r=this.pm.data.player_playhead_time-this._lastPlayheadTime,n=i.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.minimumRebufferDuration=="number"&&r>0&&n-r>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+n-r}))}a?this._prepareRebufferTrackerState(i.viewer_time):this._clearRebufferTrackerState()}}]),t}(),EE=fE,_E=function(){function t(e){var i=this;Ae(this,t),w(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){var a=e.data,r=a.view_id;if(!a.view_program_changed){var n=function(s,o){var l=o.viewer_time;(s.type==="playing"&&typeof e.data.view_time_to_first_frame>"u"||s.type==="adplaying"&&(typeof e.data.view_time_to_first_frame>"u"||i._inPrerollPosition()))&&i.calculateTimeToFirstFrame(l||Re.now(),r)};e.one("playing",n),e.one("adplaying",n),e.one("viewend",function(){e.off("playing",n),e.off("adplaying",n)})}})}return Gt(t,[{key:"_inPrerollPosition",value:function(){return typeof this.pm.data.view_content_playback_time>"u"||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,i){i===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.pm.pageLoadInitTime&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.pm.pageLoadInitTime))}}]),t}(),bE=_E,gE=function t(e){var i=this;Ae(this,t),w(this,"_lastPlayerHeight",void 0),w(this,"_lastPlayerWidth",void 0),w(this,"_lastPlayheadPosition",void 0),w(this,"_lastSourceHeight",void 0),w(this,"_lastSourceWidth",void 0),e.on("viewinit",function(){i._lastPlayheadPosition=-1});var a=["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"],r=["playing","hb","renditionchange","orientationchange","playbackmodechange"];a.forEach(function(n){e.on(n,function(){if(i._lastPlayheadPosition>=0&&e.data.player_playhead_time>=0&&i._lastPlayerWidth>=0&&i._lastSourceWidth>0&&i._lastPlayerHeight>=0&&i._lastSourceHeight>0){var s=e.data.player_playhead_time-i._lastPlayheadPosition;if(s<0){i._lastPlayheadPosition=-1;return}var o=Math.min(i._lastPlayerWidth/i._lastSourceWidth,i._lastPlayerHeight/i._lastSourceHeight),l=Math.max(0,o-1),d=Math.max(0,1-o);e.data.view_max_upscale_percentage=Math.max(e.data.view_max_upscale_percentage||0,l),e.data.view_max_downscale_percentage=Math.max(e.data.view_max_downscale_percentage||0,d),Te(e.data,"view_total_content_playback_time",s),Te(e.data,"view_total_upscaling",l*s),Te(e.data,"view_total_downscaling",d*s)}i._lastPlayheadPosition=-1})}),r.forEach(function(n){e.on(n,function(){i._lastPlayheadPosition=e.data.player_playhead_time,i._lastPlayerWidth=e.data.player_width,i._lastPlayerHeight=e.data.player_height,i._lastSourceWidth=e.data.video_source_width,i._lastSourceHeight=e.data.video_source_height})})},yE=gE,TE=2e3,AE=function t(e){var i=this;Ae(this,t),w(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var n=Re.now(),s=(e.data.viewer_time||n)-(a||n);Te(e.data,"view_seek_duration",s),e.data.view_max_seek_time=Math.max(e.data.view_max_seek_time||0,s),i.isSeeking=!1,a=-1};e.on("seeking",function(n,s){if(Object.assign(e.data,s),i.isSeeking&&s.viewer_time-a<=TE){a=s.viewer_time;return}i.isSeeking&&r(),i.isSeeking=!0,a=s.viewer_time,Te(e.data,"view_seek_count",1),e.send("seeking")}),e.on("seeked",function(){r()}),e.on("viewend",function(){i.isSeeking&&(r(),e.send("seeked")),i.isSeeking=!1,a=-1})},kE=AE,kc=function(t,e){t.push(e),t.sort(function(i,a){return i.viewer_time-a.viewer_time})},SE=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],wE=function(){function t(e){var i=this;Ae(this,t),w(this,"_adHasPlayed",void 0),w(this,"_adRequests",void 0),w(this,"_adResponses",void 0),w(this,"_currentAdRequestNumber",void 0),w(this,"_currentAdResponseNumber",void 0),w(this,"_prerollPlayTime",void 0),w(this,"_wouldBeNewAdPlay",void 0),w(this,"isAdBreak",void 0),w(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){i.isAdBreak=!1,i._currentAdRequestNumber=0,i._currentAdResponseNumber=0,i._adRequests=[],i._adResponses=[],i._adHasPlayed=!1,i._wouldBeNewAdPlay=!0,i._prerollPlayTime=void 0}),SE.forEach(function(r){return e.on(r,i._updateAdData.bind(i))});var a=function(){i.isAdBreak=!1};e.on("adbreakstart",function(){i.isAdBreak=!0}),e.on("play",a),e.on("playing",a),e.on("viewend",a),e.on("adrequest",function(r,n){n=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdRequestNumber++},n),kc(i._adRequests,n),Te(e.data,"view_ad_request_count"),i.inPrerollPosition()&&(e.data.view_preroll_requested=!0,i._adHasPlayed||Te(e.data,"view_preroll_request_count"))}),e.on("adresponse",function(r,n){n=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},n),kc(i._adResponses,n);var s=i.findAdRequest(n.ad_request_id);s&&Te(e.data,"view_ad_request_time",Math.max(0,n.viewer_time-s.viewer_time))}),e.on("adplay",function(r,n){i._adHasPlayed=!0,i._wouldBeNewAdPlay&&(i._wouldBeNewAdPlay=!1,Te(e.data,"view_ad_played_count")),i.inPrerollPosition()&&!e.data.view_preroll_played&&(e.data.view_preroll_played=!0,i._adRequests.length>0&&(e.data.view_preroll_request_time=Math.max(0,n.viewer_time-i._adRequests[0].viewer_time)),e.data.view_start&&(e.data.view_startup_preroll_request_time=Math.max(0,n.viewer_time-e.data.view_start)),i._prerollPlayTime=n.viewer_time)}),e.on("adplaying",function(r,n){i.inPrerollPosition()&&typeof e.data.view_preroll_load_time>"u"&&typeof i._prerollPlayTime<"u"&&(e.data.view_preroll_load_time=n.viewer_time-i._prerollPlayTime,e.data.view_startup_preroll_load_time=n.viewer_time-i._prerollPlayTime)}),e.on("adclicked",function(r,n){i._wouldBeNewAdPlay||Te(e.data,"view_ad_clicked_count")}),e.on("adskipped",function(r,n){i._wouldBeNewAdPlay||Te(e.data,"view_ad_skipped_count")}),e.on("adended",function(){i._wouldBeNewAdPlay=!0}),e.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return Gt(t,[{key:"inPrerollPosition",value:function(){return typeof this.pm.data.view_content_playback_time>"u"||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var i=0;i<this._adRequests.length;i++)if(this._adRequests[i].ad_request_id===e)return this._adRequests[i]}},{key:"_updateAdData",value:function(e,i){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&i.ad_tag_url){var a=ai(nn(i.ad_tag_url),2),r=a[0],n=a[1];this.pm.data.view_preroll_ad_tag_domain=n,this.pm.data.view_preroll_ad_tag_hostname=r}if(!this.pm.data.view_preroll_ad_asset_hostname&&i.ad_asset_url){var s=ai(nn(i.ad_asset_url),2),o=s[0],l=s[1];this.pm.data.view_preroll_ad_asset_domain=l,this.pm.data.view_preroll_ad_asset_hostname=o}this.pm.data.ad_type="preroll"}this.pm.data.ad_asset_url=i?.ad_asset_url,this.pm.data.ad_tag_url=i?.ad_tag_url,this.pm.data.ad_creative_id=i?.ad_creative_id,this.pm.data.ad_id=i?.ad_id,this.pm.data.ad_universal_id=i?.ad_universal_id,i!=null&&i.ad_type&&(this.pm.data.ad_type=i?.ad_type)}}]),t}(),IE=wE,RE=function t(e){var i=this;Ae(this,t),w(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=Re.now(),e.on("before*",r)},r=function(n){var s=Re.now(),o=i.lastWallClockTime;i.lastWallClockTime=s,s-o>3e4&&(e.emit("devicesleep",{viewer_time:o}),Object.assign(e.data,{viewer_time:o}),e.send("devicesleep"),e.emit("devicewake",{viewer_time:s}),Object.assign(e.data,{viewer_time:s}),e.send("devicewake"))};e.one("playbackheartbeat",a),e.on("playbackheartbeatend",function(){e.off("before*",r),e.one("playbackheartbeat",a)})},CE=RE,Jo=ot(Yt()),pm=function(t){return t()}(function(){var t=function(){for(var i=0,a={};i<arguments.length;i++){var r=arguments[i];for(var n in r)a[n]=r[n]}return a};function e(i){function a(r,n,s){var o;if(typeof document<"u"){if(arguments.length>1){if(s=t({path:"/"},a.defaults,s),typeof s.expires=="number"){var l=new Date;l.setMilliseconds(l.getMilliseconds()+s.expires*864e5),s.expires=l}try{o=JSON.stringify(n),/^[\{\[]/.test(o)&&(n=o)}catch{}return i.write?n=i.write(n,r):n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),r=encodeURIComponent(String(r)),r=r.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),r=r.replace(/[\(\)]/g,escape),document.cookie=[r,"=",n,s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}r||(o={});for(var d=document.cookie?document.cookie.split("; "):[],m=/(%[0-9A-Z]{2})+/g,p=0;p<d.length;p++){var h=d[p].split("="),u=h.slice(1).join("=");u.charAt(0)==='"'&&(u=u.slice(1,-1));try{var v=h[0].replace(m,decodeURIComponent);if(u=i.read?i.read(u,v):i(u,v)||u.replace(m,decodeURIComponent),this.json)try{u=JSON.parse(u)}catch{}if(r===v){o=u;break}r||(o[v]=u)}catch{}}return o}}return a.set=a,a.get=function(r){return a.call(a,r)},a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(r,n){a(r,"",t(n,{expires:-1}))},a.withConverter=e,a}return e(function(){})}),vm="muxData",LE=function(t){return Object.entries(t).map(function(e){var i=ai(e,2),a=i[0],r=i[1];return"".concat(a,"=").concat(r)}).join("&")},DE=function(t){return t.split("&").reduce(function(e,i){var a=ai(i.split("="),2),r=a[0],n=a[1],s=+n,o=n&&s==n?s:n;return e[r]=o,e},{})},fm=function(){var t;try{t=DE(pm.get(vm)||"")}catch{t={}}return t},Em=function(t){try{pm.set(vm,LE(t),{expires:365})}catch{}},ME=function(){var t=fm();return t.mux_viewer_id=t.mux_viewer_id||rn(),t.msn=t.msn||Math.random(),Em(t),{mux_viewer_id:t.mux_viewer_id,mux_sample_number:t.msn}},xE=function(){var t=fm(),e=Re.now();return t.session_start&&(t.sst=t.session_start,delete t.session_start),t.session_id&&(t.sid=t.session_id,delete t.session_id),t.session_expires&&(t.sex=t.session_expires,delete t.session_expires),(!t.sex||t.sex<e)&&(t.sid=rn(),t.sst=e),t.sex=e+25*60*1e3,Em(t),{session_id:t.sid,session_start:t.sst,session_expires:t.sex}};function OE(t,e){var i=e.beaconCollectionDomain,a=e.beaconDomain;if(i)return"https://"+i;t=t||"inferred";var r=a||"litix.io";return t.match(/^[a-z0-9]+$/)?"https://"+t+"."+r:"https://img.litix.io/a.gif"}var NE=ot(Yt()),_m=function(){var t;switch(bm()){case"cellular":t="cellular";break;case"ethernet":t="wired";break;case"wifi":t="wifi";break;case void 0:break;default:t="other"}return t},bm=function(){var t=NE.default.navigator,e=t&&(t.connection||t.mozConnection||t.webkitConnection);return e&&e.type};_m.getConnectionFromAPI=bm;var PE=_m,UE={a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"},$E=gm(UE),HE={ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cm:"cmcd",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cv:"cumulative",cx:"connection",cz:"context",da:"data",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mp:"mode",ms:"ms",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",pv:"previous",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"},Sc=gm(HE);function gm(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}function kl(t){var e={},i={};return Object.keys(t).forEach(function(a){var r=!1;if(t.hasOwnProperty(a)&&t[a]!==void 0){var n=a.split("_"),s=n[0],o=$E[s];o||(ee.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEach(function(l){l==="url"&&(r=!0),Sc[l]?o+=Sc[l]:Number.isInteger(Number(l))?o+=l:(ee.info("Data key word `"+l+"` not expected in "+a),o+="_"+l+"_")}),r?i[o]=t[a]:e[o]=t[a]}}),Object.assign(e,i)}var Ki=ot(Yt()),BE=ot(dm()),WE={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},FE=56*1024,KE=["hb","requestcompleted","requestfailed","requestcanceled"],VE="https://img.litix.io",ni=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._beaconUrl=t||VE,this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},WE,e)};ni.prototype.queueEvent=function(t,e){var i=Object.assign({},e);return this._eventQueue.length<=this._options.maxQueueLength||t==="eventrateexceeded"?(this._eventQueue.push(i),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength):!1};ni.prototype.flushEvents=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(t&&this._eventQueue.length===1){this._eventQueue.pop();return}this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending()};ni.prototype.destroy=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.destroyed=!0,t?this._clearBeaconQueue():this.flushEvents(),Ki.default.clearTimeout(this._sendTimeout)};ni.prototype._clearBeaconQueue=function(){var t=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,e=this._eventQueue.slice(t);t>0&&Object.assign(e[e.length-1],kl({mux_view_message:"event queue truncated"}));var i=this._createPayload(e);ym(this._beaconUrl,i,!0,function(){})};ni.prototype._sendBeaconQueue=function(){var t=this;if(this._postInFlight){this._resendAfterPost=!0;return}var e=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var i=this._createPayload(e),a=Re.now();ym(this._beaconUrl,i,!1,function(r,n){n?(t._eventQueue=e.concat(t._eventQueue),t._failureCount+=1,ee.info("Error sending beacon: "+n)):t._failureCount=0,t._roundTripTime=Re.now()-a,t._postInFlight=!1,t._resendAfterPost&&(t._resendAfterPost=!1,t._eventQueue.length>0&&t._sendBeaconQueue())})};ni.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var t=Math.pow(2,this._failureCount-1);return t=t*Math.random(),(1+t)*this._options.baseTimeBetweenBeacons};ni.prototype._startBeaconSending=function(){var t=this;Ki.default.clearTimeout(this._sendTimeout),!this.destroyed&&(this._sendTimeout=Ki.default.setTimeout(function(){t._eventQueue.length&&t._sendBeaconQueue(),t._startBeaconSending()},this._getNextBeaconTime()))};ni.prototype._createPayload=function(t){var e=this,i={transmission_timestamp:Math.round(Re.now())};this._roundTripTime&&(i.rtt_ms=Math.round(this._roundTripTime));var a,r,n,s=function(){a=JSON.stringify({metadata:i,events:r||t}),n=a.length/1024},o=function(){return n<=e._options.maxPayloadKBSize};return s(),o()||(ee.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=t.filter(function(l){return KE.indexOf(l.e)===-1}),s()),o()||(ee.info("Payload size still too big ("+n+" kb). Cropping fields.."),r.forEach(function(l){for(var d in l){var m=l[d],p=50*1024;typeof m=="string"&&m.length>p&&(l[d]=m.substring(0,p))}}),s()),a};var qE=typeof BE.default.exitPictureInPicture=="function"?function(t){return t.length<=FE}:function(t){return!1},ym=function(t,e,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(t,e)){a();return}if(Ki.default.fetch){Ki.default.fetch(t,{method:"POST",body:e,headers:{"Content-Type":"text/plain"},keepalive:qE(e)}).then(function(n){return a(null,n.ok?null:"Error")}).catch(function(n){return a(null,n)});return}if(Ki.default.XMLHttpRequest){var r=new Ki.default.XMLHttpRequest;r.onreadystatechange=function(){if(r.readyState===4)return a(null,r.status!==200?"error":void 0)},r.open("POST",t),r.setRequestHeader("Content-Type","text/plain"),r.send(e);return}a()},YE=ni,GE=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception","view_playing_time_ms_cumulative","ad_playing_time_ms_cumulative"],QE=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],zE=["ad_id","ad_creative_id","ad_universal_id"],jE=["viewstart","error","ended","viewend"],ZE=10*60*1e3,XE=function(){function t(e,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ae(this,t);var r,n,s,o,l,d,m,p,h,u,v,E;w(this,"mux",void 0),w(this,"envKey",void 0),w(this,"options",void 0),w(this,"eventQueue",void 0),w(this,"sampleRate",void 0),w(this,"disableCookies",void 0),w(this,"respectDoNotTrack",void 0),w(this,"previousBeaconData",void 0),w(this,"lastEventTime",void 0),w(this,"rateLimited",void 0),w(this,"pageLevelData",void 0),w(this,"viewerData",void 0),this.mux=e,this.envKey=i,this.options=a,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new YE(OE(this.envKey,this.options));var g;this.sampleRate=(g=this.options.sampleRate)!==null&&g!==void 0?g:1;var y;this.disableCookies=(y=this.options.disableCookies)!==null&&y!==void 0?y:!1;var T;this.respectDoNotTrack=(T=this.options.respectDoNotTrack)!==null&&T!==void 0?T:!1,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:(r=this.options.platform)===null||r===void 0?void 0:r.name,viewer_application_version:(n=this.options.platform)===null||n===void 0?void 0:n.version,viewer_application_engine:(s=this.options.platform)===null||s===void 0?void 0:s.layout,viewer_device_name:(o=this.options.platform)===null||o===void 0?void 0:o.product,viewer_device_category:"",viewer_device_manufacturer:(l=this.options.platform)===null||l===void 0?void 0:l.manufacturer,viewer_os_family:(m=this.options.platform)===null||m===void 0||(d=m.os)===null||d===void 0?void 0:d.family,viewer_os_architecture:(h=this.options.platform)===null||h===void 0||(p=h.os)===null||p===void 0?void 0:p.architecture,viewer_os_version:(v=this.options.platform)===null||v===void 0||(u=v.os)===null||u===void 0?void 0:u.version,viewer_connection_type:PE(),page_url:Jo.default===null||Jo.default===void 0||(E=Jo.default.location)===null||E===void 0?void 0:E.href},this.viewerData=this.disableCookies?{}:ME()}return Gt(t,[{key:"send",value:function(e,i){if(!(!e||!(i!=null&&i.view_id))){if(this.respectDoNotTrack&&Tl())return ee.info("Not sending `"+e+"` because Do Not Track is enabled");if(!i||typeof i!="object")return ee.error("A data object was expected in send() but was not provided");var a=this.disableCookies?{}:xE(),r=$d(eo({},this.pageLevelData,i,a,this.viewerData),{event:e,env_key:this.envKey});r.user_id&&(r.viewer_user_id=r.user_id,delete r.user_id);var n,s=((n=r.mux_sample_number)!==null&&n!==void 0?n:0)>=this.sampleRate,o=this._deduplicateBeaconData(e,r),l=kl(o);if(this.lastEventTime=this.mux.utils.now(),s)return ee.info("Not sending event due to sample rate restriction",e,r,l);if(this.envKey||ee.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,r,l),!this.rateLimited)if(ee.info("Sending event",e,r,l),this.rateLimited=!this.eventQueue.queueEvent(e,l),this.mux.WINDOW_UNLOADING&&e==="viewend")this.eventQueue.destroy(!0);else{if(this.mux.WINDOW_HIDDEN&&e==="hb")this.eventQueue.flushEvents(!0);else if(jE.indexOf(e)>=0){if(e==="error"&&i.player_error_severity==="warning")return;this.eventQueue.flushEvents()}if(this.rateLimited)return r.event="eventrateexceeded",l=kl(r),this.eventQueue.queueEvent(r.event,l),ee.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,i){var a=this,r={},n=i.view_id;if(n==="-1"||e==="viewstart"||e==="viewend"||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=ZE)r=eo({},i),n&&(this.previousBeaconData=r),n&&e==="viewend"&&(this.previousBeaconData=null);else{var s=e.indexOf("request")===0;Object.entries(i).forEach(function(o){var l=ai(o,2),d=l[0],m=l[1];a.previousBeaconData&&(m!==a.previousBeaconData[d]||GE.indexOf(d)>-1||a.objectHasChanged(s,d,m,a.previousBeaconData[d])||a.eventRequiresKey(e,d))&&(r[d]=m,a.previousBeaconData[d]=m)})}return r}},{key:"objectHasChanged",value:function(e,i,a,r){return!e||i.indexOf("request_")!==0?!1:i==="request_response_headers"||typeof a!="object"||typeof r!="object"?!0:Object.keys(a||{}).length!==Object.keys(r||{}).length}},{key:"eventRequiresKey",value:function(e,i){return!!(e==="renditionchange"&&i.indexOf("video_source_")===0||zE.includes(i)&&QE.includes(e))}}]),t}(),JE=function t(e){Ae(this,t);var i=0,a=0,r=0,n=0,s=0,o=0,l=0,d=function(h,u){var v=u.request_start,E=u.request_response_start,g=u.request_response_end,y=u.request_bytes_loaded;n++;var T,_;if(E?(T=E-(v??0),_=(g??0)-E):_=(g??0)-(v??0),_>0&&y&&y>0){var S=y/_*8e3;s++,a+=y,r+=_,e.data.view_min_request_throughput=Math.min(e.data.view_min_request_throughput||1/0,S),e.data.view_average_request_throughput=a/r*8e3,e.data.view_request_count=n,T>0&&(i+=T,e.data.view_max_request_latency=Math.max(e.data.view_max_request_latency||0,T),e.data.view_average_request_latency=i/s)}},m=function(h,u){n++,o++,e.data.view_request_count=n,e.data.view_request_failed_count=o},p=function(h,u){n++,l++,e.data.view_request_count=n,e.data.view_request_canceled_count=l};e.on("requestcompleted",d),e.on("requestfailed",m),e.on("requestcanceled",p)},e_=JE,t_=60*60*1e3,i_=function t(e){var i=this;Ae(this,t),w(this,"_lastEventTime",void 0),e.on("before*",function(a,r){var n=r.viewer_time,s=Re.now(),o=i._lastEventTime;if(i._lastEventTime=s,o&&s-o>t_){var l=Object.keys(e.data).reduce(function(m,p){return p.indexOf("video_")===0?Object.assign(m,w({},p,e.data[p])):m},{});e.mux.log.info("Received event after at least an hour inactivity, creating a new view");var d=e.playbackHeartbeat._playheadShouldBeProgressing;e._resetView(Object.assign({viewer_time:n},l)),e.playbackHeartbeat._playheadShouldBeProgressing=d,e.playbackHeartbeat._playheadShouldBeProgressing&&a.type!=="play"&&a.type!=="adbreakstart"&&(e.emit("play",{viewer_time:n}),a.type!=="playing"&&e.emit("playing",{viewer_time:n}))}})},a_=i_,r_=function t(e){Ae(this,t);var i=function(o){var l=n_(o),d=s_(o);if(l!=null&&!wc(l,n)&&s<=d){n=l,s=d;var m={video_cdn:l};e.emit("cdnchange",m)}},a=null,r=null,n=null,s=0;e.on("viewinit",function(){a=null,r=null,n=null,s=0}),e.on("beforecdnchange",function(o,l){var d=l?.video_cdn;d&&(typeof l.video_previous_cdn>"u"||l.video_previous_cdn===null)&&(wc(d,r)?l.video_previous_cdn=a??void 0:(l.video_previous_cdn=r??void 0,a=r,r=d))}),e.on("requestcompleted",function(o,l){i(l)})};function wc(t,e){return t?.toLowerCase()===e?.toLowerCase()}function n_(t){var e;return t!=null&&t.request_type&&(t.request_type==="media"||t.request_type==="video")&&!((e=t.request_response_headers)===null||e===void 0)&&e["x-cdn"]?t.request_response_headers["x-cdn"]:t!=null&&t.video_cdn?t.video_cdn:null}function s_(t){return t!=null&&t.request_start?t.request_start:t!=null&&t.viewer_time?t.viewer_time:Date.now()}var o_=r_,l_=function(t){try{return JSON.parse(t),!0}catch{return!1}},d_=function t(e){var i=this;Ae(this,t),w(this,"_emittingAutomaticEvent",!1),w(this,"_hasInitialized",!1),w(this,"_currentMode","standard"),e.on("viewstart",function(){i._hasInitialized||(i._hasInitialized=!0,i._emittingAutomaticEvent=!0,e.emit("playbackmodechange",{player_playback_mode:i._currentMode,player_playback_mode_data:"{}"}),i._emittingAutomaticEvent=!1)}),e.on("viewend",function(){i._hasInitialized=!1}),e.on("playbackmodechange",function(a,r){i._emittingAutomaticEvent||(r.player_playback_mode_data?l_(r.player_playback_mode_data)||(e.mux.log.warn("Invalid JSON string for player_playback_mode_data"),r.player_playback_mode_data="{}"):r.player_playback_mode_data="{}",e.data.player_playback_mode_data=r.player_playback_mode_data,e.data.player_playback_mode=r.player_playback_mode,i._currentMode=r.player_playback_mode)})},u_=d_,c_=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange","cdnchange","playbackmodechange"],h_=new Set(["requestcompleted","requestfailed","requestcanceled"]),m_=function(t){$f(i,t);var e=Kf(i);function i(a,r,n){Ae(this,i);var s;s=e.call(this),w(P(s),"pageLoadEndTime",void 0),w(P(s),"pageLoadInitTime",void 0),w(P(s),"_destroyed",void 0),w(P(s),"_heartBeatTimeout",void 0),w(P(s),"adTracker",void 0),w(P(s),"dashjs",void 0),w(P(s),"data",void 0),w(P(s),"disablePlayheadRebufferTracking",void 0),w(P(s),"disableRebufferTracking",void 0),w(P(s),"errorTracker",void 0),w(P(s),"errorTranslator",void 0),w(P(s),"emitTranslator",void 0),w(P(s),"getAdData",void 0),w(P(s),"getPlayheadTime",void 0),w(P(s),"getStateData",void 0),w(P(s),"stateDataTranslator",void 0),w(P(s),"hlsjs",void 0),w(P(s),"id",void 0),w(P(s),"longResumeTracker",void 0),w(P(s),"minimumRebufferDuration",void 0),w(P(s),"mux",void 0),w(P(s),"playbackEventDispatcher",void 0),w(P(s),"playbackHeartbeat",void 0),w(P(s),"playbackHeartbeatTime",void 0),w(P(s),"playheadTime",void 0),w(P(s),"seekingTracker",void 0),w(P(s),"sustainedRebufferThreshold",void 0),w(P(s),"watchTimeTracker",void 0),w(P(s),"currentFragmentPDT",void 0),w(P(s),"currentFragmentStart",void 0),s.pageLoadInitTime=Js.navigationStart(),s.pageLoadEndTime=Js.domContentLoadedEventEnd();var o={debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(h){return h},emitTranslator:function(){for(var h=arguments.length,u=new Array(h),v=0;v<h;v++)u[v]=arguments[v];return u},stateDataTranslator:function(h){return h}};s.mux=a,s.id=r,n!=null&&n.beaconDomain&&s.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),n=Object.assign(o,n),n.data=n.data||{},n.data.property_key&&(n.data.env_key=n.data.property_key,delete n.data.property_key),ee.level=n.debug?Wi.DEBUG:Wi.WARN,s.getPlayheadTime=n.getPlayheadTime,s.getStateData=n.getStateData||function(){return{}},s.getAdData=n.getAdData||function(){},s.minimumRebufferDuration=n.minimumRebufferDuration,s.sustainedRebufferThreshold=n.sustainedRebufferThreshold,s.playbackHeartbeatTime=n.playbackHeartbeatTime,s.disableRebufferTracking=n.disableRebufferTracking,s.disableRebufferTracking&&s.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),s.disablePlayheadRebufferTracking=n.disablePlayheadRebufferTracking,s.errorTranslator=n.errorTranslator,s.emitTranslator=n.emitTranslator,s.stateDataTranslator=n.stateDataTranslator,s.playbackEventDispatcher=new XE(a,n.data.env_key,n),s.data={player_instance_id:rn(),mux_sample_rate:n.sampleRate,beacon_domain:n.beaconCollectionDomain||n.beaconDomain},s.data.view_sequence_number=1,s.data.player_sequence_number=1;var l=(function(){typeof this.data.view_start>"u"&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"),this.emit("renditionchange"))}).bind(P(s));if(s.on("viewinit",function(h,u){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,u),this._initializeViewData(),this.one("play",l),this.one("adbreakstart",l)}),s.on("videochange",function(h,u){this._resetView(u)}),s.on("programchange",function(h,u){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),this._resetView(Object.assign(u,{view_program_changed:!0})),l(),this.emit("play"),this.emit("playing")}),s.on("fragmentchange",function(h,u){this.currentFragmentPDT=u.currentFragmentPDT,this.currentFragmentStart=u.currentFragmentStart}),s.on("destroy",s.destroy),typeof window<"u"&&typeof window.addEventListener=="function"&&typeof window.removeEventListener=="function"){var d=function(){var h=typeof s.data.view_start<"u";s.mux.WINDOW_HIDDEN=document.visibilityState==="hidden",h&&s.mux.WINDOW_HIDDEN&&(s.data.player_is_paused||s.emit("hb"))};window.addEventListener("visibilitychange",d,!1);var m=function(h){h.persisted||s.destroy()};window.addEventListener("pagehide",m,!1),s.on("destroy",function(){window.removeEventListener("visibilitychange",d),window.removeEventListener("pagehide",m)})}s.on("playerready",function(h,u){Object.assign(this.data,u)}),c_.forEach(function(h){s.on(h,function(u,v){h.indexOf("ad")!==0&&this._updateStateData(),Object.assign(this.data,v),this._sanitizeData()}),s.on("after"+h,function(){(h!=="error"||this.errorTracker.viewErrored)&&this.send(h)})}),s.on("viewend",function(h,u){Object.assign(s.data,u)});var p=function(h){var u=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=u-this.data.player_init_time),this.pageLoadInitTime=this.data.page_load_init_time||this.pageLoadInitTime,this.pageLoadEndTime=this.data.page_load_end_time||this.pageLoadEndTime,!this.mux.PLAYER_TRACKED&&this.pageLoadInitTime&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.pageLoadEndTime)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.pageLoadEndTime||1/0)-this.pageLoadInitTime)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time};return s.one("playerready",p),s.longResumeTracker=new a_(P(s)),s.errorTracker=new oE(P(s)),new CE(P(s)),s.seekingTracker=new kE(P(s)),s.playheadTime=new mE(P(s)),s.playbackHeartbeat=new nE(P(s)),new yE(P(s)),s.watchTimeTracker=new dE(P(s)),new cE(P(s)),s.adTracker=new IE(P(s)),new EE(P(s)),new vE(P(s)),new bE(P(s)),new e_(P(s)),new o_(P(s)),new u_(P(s)),n.hlsjs&&s.addHLSJS(n),n.dashjs&&s.addDashJS(n),s.emit("viewinit",n.data),s}return Gt(i,[{key:"emit",value:function(a,r){var n,s=Object.assign({viewer_time:this.mux.utils.now()},r),o=[a,s];if(this.emitTranslator)try{o=this.emitTranslator(a,s)}catch(l){this.mux.log.warn("Exception in emit translator callback.",l)}o!=null&&o.length&&(n=Kn(Za(i.prototype),"emit",this)).call.apply(n,[this].concat(mt(o)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,typeof this.data.view_start<"u"&&(this.emit("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(a){if(this.data.view_id){var r=Object.assign({},this.data),n=["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"];if(r.video_source_is_live===void 0&&(r.player_source_duration===1/0||r.video_source_duration===1/0?r.video_source_is_live=!0:(r.player_source_duration>0||r.video_source_duration>0)&&(r.video_source_is_live=!1)),r.video_source_is_live||n.forEach(function(d){r[d]=void 0}),r.video_source_url=r.video_source_url||r.player_source_url,r.video_source_url){var s=ai(nn(r.video_source_url),2),o=s[0],l=s[1];r.video_source_domain=l,r.video_source_hostname=o}delete r.ad_request_id,this.playbackEventDispatcher.send(a,r),this.data.view_sequence_number++,this.data.player_sequence_number++,h_.has(a)||this._restartHeartBeat(),a==="viewend"&&delete this.data.view_id}}},{key:"_resetView",value:function(a){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",a)}},{key:"_updateStateData",value:function(){var a,r=this.getStateData();if(typeof this.stateDataTranslator=="function")try{r=this.stateDataTranslator(r)}catch(s){this.mux.log.warn("Exception in stateDataTranslator translator callback.",s)}if(!((a=this.data)===null||a===void 0)&&a.video_cdn&&r!=null&&r.video_cdn){r.video_cdn;var n=Bf(r,["video_cdn"]);r=n}Object.assign(this.data,r),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var a=this,r=["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"];r.forEach(function(s){var o=parseInt(a.data[s],10);a.data[s]=isNaN(o)?void 0:o});var n=["player_source_url","video_source_url"];n.forEach(function(s){if(a.data[s]){var o=a.data[s].toLowerCase();(o.indexOf("data:")===0||o.indexOf("blob:")===0)&&(a.data[s]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var a=this;Object.keys(this.data).forEach(function(r){r.indexOf("video_")===0&&delete a.data[r]})}},{key:"_resetViewData",value:function(){var a=this;Object.keys(this.data).forEach(function(r){r.indexOf("view_")===0&&delete a.data[r]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var a=this,r=this.data.view_id=rn(),n=function(){r===a.data.view_id&&Te(a.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",n):n()}},{key:"_restartHeartBeat",value:function(){var a=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){a.data.player_is_paused||a.emit("hb")},1e4)}},{key:"addHLSJS",value:function(a){if(!a.hlsjs){this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.");return}if(this.hlsjs){this.mux.log.warn("An instance of HLS.js is already being monitored for this player.");return}this.hlsjs=a.hlsjs,zf(this.mux,this.id,a.hlsjs,{},a.Hls||window.Hls)}},{key:"removeHLSJS",value:function(){this.hlsjs&&(jf(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(a){if(!a.dashjs){this.mux.log.warn("You must pass a valid dashjs instance in order to track it.");return}if(this.dashjs){this.mux.log.warn("An instance of Dash.js is already being monitored for this player.");return}this.dashjs=a.dashjs,eE(this.mux,this.id,a.dashjs)}},{key:"removeDashJS",value:function(){this.dashjs&&(tE(this.dashjs),this.dashjs=void 0)}}]),i}(aE),p_=m_,cr=ot(dm());function el(){return cr.default&&!!(cr.default.fullscreenElement||cr.default.webkitFullscreenElement||cr.default.mozFullScreenElement||cr.default.msFullscreenElement)}var v_=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],f_={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};function E_(t,e,i){var a=ai(Xs(e),3),r=a[0],n=a[1],s=a[2],o=t.log,l=t.utils.getComputedStyle,d=t.utils.secondsToMs,m={automaticErrorTracking:!0};if(r){if(s!=="video"&&s!=="audio")return o.error("The element of `"+n+"` was not a media element.")}else return o.error("No element was found with the `"+n+"` query selector.");r.mux&&(r.mux.destroy(),delete r.mux,o.warn("Already monitoring this video element, replacing existing event listeners"));var p={getPlayheadTime:function(){return d(r.currentTime)},getStateData:function(){var u,v,E,g=((u=(v=this).getPlayheadTime)===null||u===void 0?void 0:u.call(v))||d(r.currentTime),y=this.hlsjs&&this.hlsjs.url,T=this.dashjs&&typeof this.dashjs.getSource=="function"&&this.dashjs.getSource(),_={player_is_paused:r.paused,player_width:parseInt(l(r,"width")),player_height:parseInt(l(r,"height")),player_autoplay_on:r.autoplay,player_preload_on:r.preload,player_language_code:r.lang,player_is_fullscreen:el(),video_poster_url:r.poster,video_source_url:y||T||r.currentSrc,video_source_duration:d(r.duration),video_source_height:r.videoHeight,video_source_width:r.videoWidth,view_dropped_frame_count:r==null||(E=r.getVideoPlaybackQuality)===null||E===void 0?void 0:E.call(r).droppedVideoFrames};if(r.getStartDate&&g>0){var S=r.getStartDate();if(S&&typeof S.getTime=="function"&&S.getTime()){var C=S.getTime();if(_.player_program_time=C+g,r.seekable.length>0){var N=C+r.seekable.end(r.seekable.length-1);_.player_live_edge_program_time=N}}}return _}};i=Object.assign(m,i,p),i.data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:t.VERSION},i.data),r.mux=r.mux||{},r.mux.deleted=!1,r.mux.emit=function(u,v){t.emit(n,u,v)},r.mux.updateData=function(u){r.mux.emit("hb",u)};var h=function(){o.error("The monitor for this video element has already been destroyed.")};r.mux.destroy=function(){Object.keys(r.mux.listeners).forEach(function(u){r.removeEventListener(u,r.mux.listeners[u],!1)}),delete r.mux.listeners,r.mux.fullscreenChangeListener&&(document.removeEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1),delete r.mux.fullscreenChangeListener),r.mux.destroy=h,r.mux.swapElement=h,r.mux.emit=h,r.mux.addHLSJS=h,r.mux.addDashJS=h,r.mux.removeHLSJS=h,r.mux.removeDashJS=h,r.mux.updateData=h,r.mux.setEmitTranslator=h,r.mux.setStateDataTranslator=h,r.mux.setGetPlayheadTime=h,r.mux.deleted=!0,t.emit(n,"destroy")},r.mux.swapElement=function(u){var v=ai(Xs(u),3),E=v[0],g=v[1],y=v[2];if(E){if(y!=="video"&&y!=="audio")return t.log.error("The element of `"+g+"` was not a media element.")}else return t.log.error("No element was found with the `"+g+"` query selector.");E.muxId=r.muxId,delete r.muxId,E.mux=E.mux||{},E.mux.listeners=Object.assign({},r.mux.listeners),delete r.mux.listeners,Object.keys(E.mux.listeners).forEach(function(T){r.removeEventListener(T,E.mux.listeners[T],!1),E.addEventListener(T,E.mux.listeners[T],!1)}),E.mux.fullscreenChangeListener=r.mux.fullscreenChangeListener,delete r.mux.fullscreenChangeListener,E.mux.swapElement=r.mux.swapElement,E.mux.destroy=r.mux.destroy,delete r.mux,r=E},r.mux.addHLSJS=function(u){t.addHLSJS(n,u)},r.mux.addDashJS=function(u){t.addDashJS(n,u)},r.mux.removeHLSJS=function(){t.removeHLSJS(n)},r.mux.removeDashJS=function(){t.removeDashJS(n)},r.mux.setEmitTranslator=function(u){t.setEmitTranslator(n,u)},r.mux.setStateDataTranslator=function(u){t.setStateDataTranslator(n,u)},r.mux.setGetPlayheadTime=function(u){u||(u=i.getPlayheadTime),t.setGetPlayheadTime(n,u)},t.init(n,i),t.emit(n,"playerready"),r.paused||(t.emit(n,"play"),r.readyState>2&&t.emit(n,"playing")),r.mux.listeners={},v_.forEach(function(u){u==="error"&&!i.automaticErrorTracking||(r.mux.listeners[u]=function(){var v={};if(u==="error"){if(!r.error||r.error.code===1)return;v.player_error_code=r.error.code,v.player_error_message=f_[r.error.code]||r.error.message}t.emit(n,u,v)},r.addEventListener(u,r.mux.listeners[u],!1))}),r.mux.listeners.enterpictureinpicture=function(){t.emit(n,"playbackmodechange",{player_playback_mode:"pip",player_playback_mode_data:"{}"})},r.mux.listeners.leavepictureinpicture=function(){var u=el()?"fullscreen":"standard";t.emit(n,"playbackmodechange",{player_playback_mode:u,player_playback_mode_data:"{}"})},r.addEventListener("enterpictureinpicture",r.mux.listeners.enterpictureinpicture,!1),r.addEventListener("leavepictureinpicture",r.mux.listeners.leavepictureinpicture,!1),r.mux.fullscreenChangeListener=function(){var u=el(),v=document.fullscreenElement;if(u&&(v===r||v!=null&&v.contains(r)))t.emit(n,"playbackmodechange",{player_playback_mode:"fullscreen",player_playback_mode_data:"{}"});else if(!u){var E=document.pictureInPictureElement===r,g=E?"pip":"standard";t.emit(n,"playbackmodechange",{player_playback_mode:g,player_playback_mode_data:"{}"})}},document.addEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1)}function __(t,e,i,a){var r=a;if(t&&typeof t[e]=="function")try{r=t[e].apply(t,i)}catch(n){ee.info("safeCall error",n)}return r}var Yr=ot(Yt()),pa;Yr.default&&Yr.default.WeakMap&&(pa=new WeakMap);function b_(t,e){if(!t||!e||!Yr.default||typeof Yr.default.getComputedStyle!="function")return"";var i;return pa&&pa.has(t)&&(i=pa.get(t)),i||(i=Yr.default.getComputedStyle(t,null),pa&&pa.set(t,i)),i.getPropertyValue(e)}function g_(t){return Math.floor(t*1e3)}var Ri={TARGET_DURATION:"#EXT-X-TARGETDURATION",PART_INF:"#EXT-X-PART-INF",SERVER_CONTROL:"#EXT-X-SERVER-CONTROL",INF:"#EXTINF",PROGRAM_DATE_TIME:"#EXT-X-PROGRAM-DATE-TIME",VERSION:"#EXT-X-VERSION",SESSION_DATA:"#EXT-X-SESSION-DATA"},Co=function(t){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(t),this.manifest};Co.prototype.process=function(t){var e;for(this.buffer+=t,e=this.buffer.indexOf(`
14
+ `):"");n("error",{player_error_code:_?.code,player_error_message:_?.message,player_error_context:G})};i.on("error",y),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",m),i.off("mediaFragmentLoaded",h),i.off("qualityChangeRendered",E),i.off("error",y),i.off("fragmentLoadingAbandoned",g),delete i._stopMuxMonitor}},tE=function(t){t&&typeof t._stopMuxMonitor=="function"&&t._stopMuxMonitor()},Tc=0,iE=function(){function t(){Ae(this,t),w(this,"_listeners",void 0)}return Gt(t,[{key:"on",value:function(e,i,a){return i._eventEmitterGuid=i._eventEmitterGuid||++Tc,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],a&&(i=i.bind(a)),this._listeners[e].push(i),i}},{key:"off",value:function(e,i){var a=this._listeners&&this._listeners[e];a&&a.forEach(function(r,n){r._eventEmitterGuid===i._eventEmitterGuid&&a.splice(n,1)})}},{key:"one",value:function(e,i,a){var r=this;i._eventEmitterGuid=i._eventEmitterGuid||++Tc;var n=function(){r.off(e,n),i.apply(a||this,arguments)};n._eventEmitterGuid=i._eventEmitterGuid,this.on(e,n)}},{key:"emit",value:function(e,i){var a=this;if(this._listeners){i=i||{};var r=this._listeners["before"+e]||[],n=this._listeners["before*"]||[],s=this._listeners[e]||[],o=this._listeners["after"+e]||[],l=function(d,m){d=d.slice(),d.forEach(function(p){p.call(a,{type:e},m)})};l(r,i),l(n,i),l(s,i),l(o,i)}}}]),t}(),aE=iE,Xo=ot(Yt()),rE=function(){function t(e){var i=this;Ae(this,t),w(this,"_playbackHeartbeatInterval",void 0),w(this,"_playheadShouldBeProgressing",void 0),w(this,"pm",void 0),this.pm=e,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,e.on("playing",function(){i._playheadShouldBeProgressing=!0}),e.on("play",this._startPlaybackHeartbeatInterval.bind(this)),e.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),e.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),e.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),e.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),e.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),e.on("seeked",function(){e.data.player_is_paused?i._stopPlaybackHeartbeatInterval():i._startPlaybackHeartbeatInterval()}),e.on("timeupdate",function(){i._playbackHeartbeatInterval!==null&&e.emit("playbackheartbeat")}),e.on("devicesleep",function(a,r){i._playbackHeartbeatInterval!==null&&(Xo.default.clearInterval(i._playbackHeartbeatInterval),e.emit("playbackheartbeatend",{viewer_time:r.viewer_time}),i._playbackHeartbeatInterval=null)})}return Gt(t,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;this._playbackHeartbeatInterval===null&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=Xo.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,this._playbackHeartbeatInterval!==null&&(Xo.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),t}(),nE=rE,sE=function t(e){var i=this;Ae(this,t),w(this,"viewErrored",void 0),e.on("viewinit",function(){i.viewErrored=!1}),e.on("error",function(a,r){try{var n=e.errorTranslator({player_error_code:r.player_error_code,player_error_message:r.player_error_message,player_error_context:r.player_error_context,player_error_severity:r.player_error_severity,player_error_business_exception:r.player_error_business_exception});n&&(e.data.player_error_code=n.player_error_code||r.player_error_code,e.data.player_error_message=n.player_error_message||r.player_error_message,e.data.player_error_context=n.player_error_context||r.player_error_context,e.data.player_error_severity=n.player_error_severity||r.player_error_severity,e.data.player_error_business_exception=n.player_error_business_exception||r.player_error_business_exception,i.viewErrored=!0)}catch(s){e.mux.log.warn("Exception in error translator callback.",s),i.viewErrored=!0}}),e.on("aftererror",function(){var a,r,n,s,o;(a=e.data)===null||a===void 0||delete a.player_error_code,(r=e.data)===null||r===void 0||delete r.player_error_message,(n=e.data)===null||n===void 0||delete n.player_error_context,(s=e.data)===null||s===void 0||delete s.player_error_severity,(o=e.data)===null||o===void 0||delete o.player_error_business_exception})},oE=sE,lE=function(){function t(e){Ae(this,t),w(this,"_watchTimeTrackerLastCheckedTime",void 0),w(this,"pm",void 0),this.pm=e,this._watchTimeTrackerLastCheckedTime=null,e.on("playbackheartbeat",this._updateWatchTime.bind(this)),e.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return Gt(t,[{key:"_updateWatchTime",value:function(e,i){var a=i.viewer_time;this._watchTimeTrackerLastCheckedTime===null&&(this._watchTimeTrackerLastCheckedTime=a),Te(this.pm.data,"view_watch_time",a-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=a}},{key:"_clearWatchTimeState",value:function(e,i){this._updateWatchTime(e,i),this._watchTimeTrackerLastCheckedTime=null}}]),t}(),dE=lE,uE=function(){function t(e){var i=this;Ae(this,t),w(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),w(this,"_lastTime",void 0),w(this,"_isAdPlaying",void 0),w(this,"_callbackUpdatePlaybackTime",void 0),w(this,"pm",void 0),this.pm=e,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=Re.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null,e.on("viewinit",function(){i.pm.data.view_playing_time_ms_cumulative=0});var a=this._startPlaybackTimeTracking.bind(this);e.on("playing",a),e.on("adplaying",a),e.on("seeked",a),e.on("rebufferend",a);var r=this._stopPlaybackTimeTracking.bind(this);e.on("playbackheartbeatend",r),e.on("seeking",r),e.on("rebufferstart",r),e.on("adplaying",function(){i._isAdPlaying=!0}),e.on("adended",function(){i._isAdPlaying=!1}),e.on("adpause",function(){i._isAdPlaying=!1}),e.on("adbreakstart",function(){i._isAdPlaying=!1}),e.on("adbreakend",function(){i._isAdPlaying=!1}),e.on("adplay",function(){i._isAdPlaying=!1}),e.on("viewinit",function(){i._playbackTimeTrackerLastPlayheadPosition=-1,i._lastTime=Re.now(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return Gt(t,[{key:"_startPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime===null&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this._lastTime=Re.now(),this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time||0,i=Re.now(),a=i-this._lastTime,r=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?r=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(r=a),r>0&&r<=1e3&&Te(this.pm.data,"view_content_playback_time",r),this._callbackUpdatePlaybackTime!==null&&a>0&&a<=1e3&&(this._isAdPlaying&&Te(this.pm.data,"ad_playing_time_ms_cumulative",a),Te(this.pm.data,"view_playing_time_ms_cumulative",a)),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=i}}]),t}(),cE=uE,hE=function(){function t(e){Ae(this,t),w(this,"pm",void 0),this.pm=e;var i=this._updatePlayheadTime.bind(this);e.on("playbackheartbeat",i),e.on("playbackheartbeatend",i),e.on("timeupdate",i),e.on("destroy",function(){e.off("timeupdate",i)})}return Gt(t,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=typeof this.pm.data.view_max_playhead_position>"u"?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,i){var a=this,r=function(){a.pm.currentFragmentPDT&&a.pm.currentFragmentStart&&(a.pm.data.player_program_time=a.pm.currentFragmentPDT+a.pm.data.player_playhead_time-a.pm.currentFragmentStart)};if(i&&i.player_playhead_time)this.pm.data.player_playhead_time=i.player_playhead_time,r(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var n=this.pm.getPlayheadTime();typeof n<"u"&&(this.pm.data.player_playhead_time=n,r(),this._updateMaxPlayheadPosition())}}}]),t}(),mE=hE,Ac=5*60*1e3,pE=function t(e){if(Ae(this,t),!e.disableRebufferTracking){var i,a=function(n,s){r(s),i=void 0},r=function(n){if(i){var s=n.viewer_time-i;Te(e.data,"view_rebuffer_duration",s),i=n.viewer_time,e.data.view_rebuffer_duration>Ac&&(e.emit("viewend"),e.send("viewend"),e.mux.log.warn("Ending view after rebuffering for longer than ".concat(Ac,"ms, future events will be ignored unless a programchange or videochange occurs.")))}e.data.view_watch_time>=0&&e.data.view_rebuffer_count>0&&(e.data.view_rebuffer_frequency=e.data.view_rebuffer_count/e.data.view_watch_time,e.data.view_rebuffer_percentage=e.data.view_rebuffer_duration/e.data.view_watch_time)};e.on("playbackheartbeat",function(n,s){return r(s)}),e.on("rebufferstart",function(n,s){i||(Te(e.data,"view_rebuffer_count",1),i=s.viewer_time,e.one("rebufferend",a))}),e.on("viewinit",function(){i=void 0,e.off("rebufferend",a)})}},vE=pE,fE=function(){function t(e){var i=this;Ae(this,t),w(this,"_lastCheckedTime",void 0),w(this,"_lastPlayheadTime",void 0),w(this,"_lastPlayheadTimeUpdatedTime",void 0),w(this,"_rebuffering",void 0),w(this,"pm",void 0),this.pm=e,!(e.disableRebufferTracking||e.disablePlayheadRebufferTracking)&&(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,e.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),e.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),e.on("seeking",function(){i._cleanupRebufferTracker(null,{viewer_time:Re.now()})}))}return Gt(t,[{key:"_checkIfRebuffering",value:function(e,i){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing){this._cleanupRebufferTracker(e,i);return}if(this._lastCheckedTime===null){this._prepareRebufferTrackerState(i.viewer_time);return}if(this._lastPlayheadTime!==this.pm.data.player_playhead_time){this._cleanupRebufferTracker(e,i,!0);return}var a=i.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.sustainedRebufferThreshold=="number"&&a>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=i.viewer_time}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:i.viewer_time});else{if(this._lastCheckedTime===null)return;var r=this.pm.data.player_playhead_time-this._lastPlayheadTime,n=i.viewer_time-this._lastPlayheadTimeUpdatedTime;typeof this.pm.minimumRebufferDuration=="number"&&r>0&&n-r>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+n-r}))}a?this._prepareRebufferTrackerState(i.viewer_time):this._clearRebufferTrackerState()}}]),t}(),EE=fE,_E=function(){function t(e){var i=this;Ae(this,t),w(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){var a=e.data,r=a.view_id;if(!a.view_program_changed){var n=function(s,o){var l=o.viewer_time;(s.type==="playing"&&typeof e.data.view_time_to_first_frame>"u"||s.type==="adplaying"&&(typeof e.data.view_time_to_first_frame>"u"||i._inPrerollPosition()))&&i.calculateTimeToFirstFrame(l||Re.now(),r)};e.one("playing",n),e.one("adplaying",n),e.one("viewend",function(){e.off("playing",n),e.off("adplaying",n)})}})}return Gt(t,[{key:"_inPrerollPosition",value:function(){return typeof this.pm.data.view_content_playback_time>"u"||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,i){i===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.pm.pageLoadInitTime&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.pm.pageLoadInitTime))}}]),t}(),bE=_E,gE=function t(e){var i=this;Ae(this,t),w(this,"_lastPlayerHeight",void 0),w(this,"_lastPlayerWidth",void 0),w(this,"_lastPlayheadPosition",void 0),w(this,"_lastSourceHeight",void 0),w(this,"_lastSourceWidth",void 0),e.on("viewinit",function(){i._lastPlayheadPosition=-1});var a=["pause","rebufferstart","seeking","error","adbreakstart","hb","renditionchange","orientationchange","viewend","playbackmodechange"],r=["playing","hb","renditionchange","orientationchange","playbackmodechange"];a.forEach(function(n){e.on(n,function(){if(i._lastPlayheadPosition>=0&&e.data.player_playhead_time>=0&&i._lastPlayerWidth>=0&&i._lastSourceWidth>0&&i._lastPlayerHeight>=0&&i._lastSourceHeight>0){var s=e.data.player_playhead_time-i._lastPlayheadPosition;if(s<0){i._lastPlayheadPosition=-1;return}var o=Math.min(i._lastPlayerWidth/i._lastSourceWidth,i._lastPlayerHeight/i._lastSourceHeight),l=Math.max(0,o-1),d=Math.max(0,1-o);e.data.view_max_upscale_percentage=Math.max(e.data.view_max_upscale_percentage||0,l),e.data.view_max_downscale_percentage=Math.max(e.data.view_max_downscale_percentage||0,d),Te(e.data,"view_total_content_playback_time",s),Te(e.data,"view_total_upscaling",l*s),Te(e.data,"view_total_downscaling",d*s)}i._lastPlayheadPosition=-1})}),r.forEach(function(n){e.on(n,function(){i._lastPlayheadPosition=e.data.player_playhead_time,i._lastPlayerWidth=e.data.player_width,i._lastPlayerHeight=e.data.player_height,i._lastSourceWidth=e.data.video_source_width,i._lastSourceHeight=e.data.video_source_height})})},yE=gE,TE=2e3,AE=function t(e){var i=this;Ae(this,t),w(this,"isSeeking",void 0),this.isSeeking=!1;var a=-1,r=function(){var n=Re.now(),s=(e.data.viewer_time||n)-(a||n);Te(e.data,"view_seek_duration",s),e.data.view_max_seek_time=Math.max(e.data.view_max_seek_time||0,s),i.isSeeking=!1,a=-1};e.on("seeking",function(n,s){if(Object.assign(e.data,s),i.isSeeking&&s.viewer_time-a<=TE){a=s.viewer_time;return}i.isSeeking&&r(),i.isSeeking=!0,a=s.viewer_time,Te(e.data,"view_seek_count",1),e.send("seeking")}),e.on("seeked",function(){r()}),e.on("viewend",function(){i.isSeeking&&(r(),e.send("seeked")),i.isSeeking=!1,a=-1})},kE=AE,kc=function(t,e){t.push(e),t.sort(function(i,a){return i.viewer_time-a.viewer_time})},SE=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],wE=function(){function t(e){var i=this;Ae(this,t),w(this,"_adHasPlayed",void 0),w(this,"_adRequests",void 0),w(this,"_adResponses",void 0),w(this,"_currentAdRequestNumber",void 0),w(this,"_currentAdResponseNumber",void 0),w(this,"_prerollPlayTime",void 0),w(this,"_wouldBeNewAdPlay",void 0),w(this,"isAdBreak",void 0),w(this,"pm",void 0),this.pm=e,e.on("viewinit",function(){i.isAdBreak=!1,i._currentAdRequestNumber=0,i._currentAdResponseNumber=0,i._adRequests=[],i._adResponses=[],i._adHasPlayed=!1,i._wouldBeNewAdPlay=!0,i._prerollPlayTime=void 0}),SE.forEach(function(r){return e.on(r,i._updateAdData.bind(i))});var a=function(){i.isAdBreak=!1};e.on("adbreakstart",function(){i.isAdBreak=!0}),e.on("play",a),e.on("playing",a),e.on("viewend",a),e.on("adrequest",function(r,n){n=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdRequestNumber++},n),kc(i._adRequests,n),Te(e.data,"view_ad_request_count"),i.inPrerollPosition()&&(e.data.view_preroll_requested=!0,i._adHasPlayed||Te(e.data,"view_preroll_request_count"))}),e.on("adresponse",function(r,n){n=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},n),kc(i._adResponses,n);var s=i.findAdRequest(n.ad_request_id);s&&Te(e.data,"view_ad_request_time",Math.max(0,n.viewer_time-s.viewer_time))}),e.on("adplay",function(r,n){i._adHasPlayed=!0,i._wouldBeNewAdPlay&&(i._wouldBeNewAdPlay=!1,Te(e.data,"view_ad_played_count")),i.inPrerollPosition()&&!e.data.view_preroll_played&&(e.data.view_preroll_played=!0,i._adRequests.length>0&&(e.data.view_preroll_request_time=Math.max(0,n.viewer_time-i._adRequests[0].viewer_time)),e.data.view_start&&(e.data.view_startup_preroll_request_time=Math.max(0,n.viewer_time-e.data.view_start)),i._prerollPlayTime=n.viewer_time)}),e.on("adplaying",function(r,n){i.inPrerollPosition()&&typeof e.data.view_preroll_load_time>"u"&&typeof i._prerollPlayTime<"u"&&(e.data.view_preroll_load_time=n.viewer_time-i._prerollPlayTime,e.data.view_startup_preroll_load_time=n.viewer_time-i._prerollPlayTime)}),e.on("adclicked",function(r,n){i._wouldBeNewAdPlay||Te(e.data,"view_ad_clicked_count")}),e.on("adskipped",function(r,n){i._wouldBeNewAdPlay||Te(e.data,"view_ad_skipped_count")}),e.on("adended",function(){i._wouldBeNewAdPlay=!0}),e.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return Gt(t,[{key:"inPrerollPosition",value:function(){return typeof this.pm.data.view_content_playback_time>"u"||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var i=0;i<this._adRequests.length;i++)if(this._adRequests[i].ad_request_id===e)return this._adRequests[i]}},{key:"_updateAdData",value:function(e,i){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&i.ad_tag_url){var a=ai(sn(i.ad_tag_url),2),r=a[0],n=a[1];this.pm.data.view_preroll_ad_tag_domain=n,this.pm.data.view_preroll_ad_tag_hostname=r}if(!this.pm.data.view_preroll_ad_asset_hostname&&i.ad_asset_url){var s=ai(sn(i.ad_asset_url),2),o=s[0],l=s[1];this.pm.data.view_preroll_ad_asset_domain=l,this.pm.data.view_preroll_ad_asset_hostname=o}this.pm.data.ad_type="preroll"}this.pm.data.ad_asset_url=i?.ad_asset_url,this.pm.data.ad_tag_url=i?.ad_tag_url,this.pm.data.ad_creative_id=i?.ad_creative_id,this.pm.data.ad_id=i?.ad_id,this.pm.data.ad_universal_id=i?.ad_universal_id,i!=null&&i.ad_type&&(this.pm.data.ad_type=i?.ad_type)}}]),t}(),IE=wE,RE=function t(e){var i=this;Ae(this,t),w(this,"lastWallClockTime",void 0);var a=function(){i.lastWallClockTime=Re.now(),e.on("before*",r)},r=function(n){var s=Re.now(),o=i.lastWallClockTime;i.lastWallClockTime=s,s-o>3e4&&(e.emit("devicesleep",{viewer_time:o}),Object.assign(e.data,{viewer_time:o}),e.send("devicesleep"),e.emit("devicewake",{viewer_time:s}),Object.assign(e.data,{viewer_time:s}),e.send("devicewake"))};e.one("playbackheartbeat",a),e.on("playbackheartbeatend",function(){e.off("before*",r),e.one("playbackheartbeat",a)})},CE=RE,Jo=ot(Yt()),pm=function(t){return t()}(function(){var t=function(){for(var i=0,a={};i<arguments.length;i++){var r=arguments[i];for(var n in r)a[n]=r[n]}return a};function e(i){function a(r,n,s){var o;if(typeof document<"u"){if(arguments.length>1){if(s=t({path:"/"},a.defaults,s),typeof s.expires=="number"){var l=new Date;l.setMilliseconds(l.getMilliseconds()+s.expires*864e5),s.expires=l}try{o=JSON.stringify(n),/^[\{\[]/.test(o)&&(n=o)}catch{}return i.write?n=i.write(n,r):n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),r=encodeURIComponent(String(r)),r=r.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),r=r.replace(/[\(\)]/g,escape),document.cookie=[r,"=",n,s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("")}r||(o={});for(var d=document.cookie?document.cookie.split("; "):[],m=/(%[0-9A-Z]{2})+/g,p=0;p<d.length;p++){var h=d[p].split("="),u=h.slice(1).join("=");u.charAt(0)==='"'&&(u=u.slice(1,-1));try{var v=h[0].replace(m,decodeURIComponent);if(u=i.read?i.read(u,v):i(u,v)||u.replace(m,decodeURIComponent),this.json)try{u=JSON.parse(u)}catch{}if(r===v){o=u;break}r||(o[v]=u)}catch{}}return o}}return a.set=a,a.get=function(r){return a.call(a,r)},a.getJSON=function(){return a.apply({json:!0},[].slice.call(arguments))},a.defaults={},a.remove=function(r,n){a(r,"",t(n,{expires:-1}))},a.withConverter=e,a}return e(function(){})}),vm="muxData",LE=function(t){return Object.entries(t).map(function(e){var i=ai(e,2),a=i[0],r=i[1];return"".concat(a,"=").concat(r)}).join("&")},DE=function(t){return t.split("&").reduce(function(e,i){var a=ai(i.split("="),2),r=a[0],n=a[1],s=+n,o=n&&s==n?s:n;return e[r]=o,e},{})},fm=function(){var t;try{t=DE(pm.get(vm)||"")}catch{t={}}return t},Em=function(t){try{pm.set(vm,LE(t),{expires:365})}catch{}},ME=function(){var t=fm();return t.mux_viewer_id=t.mux_viewer_id||nn(),t.msn=t.msn||Math.random(),Em(t),{mux_viewer_id:t.mux_viewer_id,mux_sample_number:t.msn}},xE=function(){var t=fm(),e=Re.now();return t.session_start&&(t.sst=t.session_start,delete t.session_start),t.session_id&&(t.sid=t.session_id,delete t.session_id),t.session_expires&&(t.sex=t.session_expires,delete t.session_expires),(!t.sex||t.sex<e)&&(t.sid=nn(),t.sst=e),t.sex=e+25*60*1e3,Em(t),{session_id:t.sid,session_start:t.sst,session_expires:t.sex}};function OE(t,e){var i=e.beaconCollectionDomain,a=e.beaconDomain;if(i)return"https://"+i;t=t||"inferred";var r=a||"litix.io";return t.match(/^[a-z0-9]+$/)?"https://"+t+"."+r:"https://img.litix.io/a.gif"}var NE=ot(Yt()),_m=function(){var t;switch(bm()){case"cellular":t="cellular";break;case"ethernet":t="wired";break;case"wifi":t="wifi";break;case void 0:break;default:t="other"}return t},bm=function(){var t=NE.default.navigator,e=t&&(t.connection||t.mozConnection||t.webkitConnection);return e&&e.type};_m.getConnectionFromAPI=bm;var PE=_m,UE={a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"},$E=gm(UE),HE={ad:"ad",af:"affiliate",ag:"aggregate",ap:"api",al:"application",ao:"audio",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",bn:"brand",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ci:"client",ck:"clicked",cl:"canceled",cm:"cmcd",cn:"config",co:"count",ce:"counter",cp:"complete",cq:"creator",cr:"creative",cs:"captions",ct:"content",cu:"current",cv:"cumulative",cx:"connection",cz:"context",da:"data",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",dy:"dynamic",eb:"enabled",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mp:"mode",ms:"ms",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",or:"origin",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pp:"pip",pr:"preload",ps:"position",pt:"part",pv:"previous",py:"property",px:"pop",pz:"plan",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rg:"range",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sh:"shift",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",ss:"status",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"},Sc=gm(HE);function gm(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}function kl(t){var e={},i={};return Object.keys(t).forEach(function(a){var r=!1;if(t.hasOwnProperty(a)&&t[a]!==void 0){var n=a.split("_"),s=n[0],o=$E[s];o||(ee.info("Data key word `"+n[0]+"` not expected in "+a),o=s+"_"),n.splice(1).forEach(function(l){l==="url"&&(r=!0),Sc[l]?o+=Sc[l]:Number.isInteger(Number(l))?o+=l:(ee.info("Data key word `"+l+"` not expected in "+a),o+="_"+l+"_")}),r?i[o]=t[a]:e[o]=t[a]}}),Object.assign(e,i)}var Ki=ot(Yt()),BE=ot(dm()),WE={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},FE=56*1024,KE=["hb","requestcompleted","requestfailed","requestcanceled"],VE="https://img.litix.io",ni=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._beaconUrl=t||VE,this._eventQueue=[],this._postInFlight=!1,this._resendAfterPost=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},WE,e)};ni.prototype.queueEvent=function(t,e){var i=Object.assign({},e);return this._eventQueue.length<=this._options.maxQueueLength||t==="eventrateexceeded"?(this._eventQueue.push(i),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength):!1};ni.prototype.flushEvents=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(t&&this._eventQueue.length===1){this._eventQueue.pop();return}this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending()};ni.prototype.destroy=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.destroyed=!0,t?this._clearBeaconQueue():this.flushEvents(),Ki.default.clearTimeout(this._sendTimeout)};ni.prototype._clearBeaconQueue=function(){var t=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,e=this._eventQueue.slice(t);t>0&&Object.assign(e[e.length-1],kl({mux_view_message:"event queue truncated"}));var i=this._createPayload(e);ym(this._beaconUrl,i,!0,function(){})};ni.prototype._sendBeaconQueue=function(){var t=this;if(this._postInFlight){this._resendAfterPost=!0;return}var e=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var i=this._createPayload(e),a=Re.now();ym(this._beaconUrl,i,!1,function(r,n){n?(t._eventQueue=e.concat(t._eventQueue),t._failureCount+=1,ee.info("Error sending beacon: "+n)):t._failureCount=0,t._roundTripTime=Re.now()-a,t._postInFlight=!1,t._resendAfterPost&&(t._resendAfterPost=!1,t._eventQueue.length>0&&t._sendBeaconQueue())})};ni.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var t=Math.pow(2,this._failureCount-1);return t=t*Math.random(),(1+t)*this._options.baseTimeBetweenBeacons};ni.prototype._startBeaconSending=function(){var t=this;Ki.default.clearTimeout(this._sendTimeout),!this.destroyed&&(this._sendTimeout=Ki.default.setTimeout(function(){t._eventQueue.length&&t._sendBeaconQueue(),t._startBeaconSending()},this._getNextBeaconTime()))};ni.prototype._createPayload=function(t){var e=this,i={transmission_timestamp:Math.round(Re.now())};this._roundTripTime&&(i.rtt_ms=Math.round(this._roundTripTime));var a,r,n,s=function(){a=JSON.stringify({metadata:i,events:r||t}),n=a.length/1024},o=function(){return n<=e._options.maxPayloadKBSize};return s(),o()||(ee.info("Payload size is too big ("+n+" kb). Removing unnecessary events."),r=t.filter(function(l){return KE.indexOf(l.e)===-1}),s()),o()||(ee.info("Payload size still too big ("+n+" kb). Cropping fields.."),r.forEach(function(l){for(var d in l){var m=l[d],p=50*1024;typeof m=="string"&&m.length>p&&(l[d]=m.substring(0,p))}}),s()),a};var qE=typeof BE.default.exitPictureInPicture=="function"?function(t){return t.length<=FE}:function(t){return!1},ym=function(t,e,i,a){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(t,e)){a();return}if(Ki.default.fetch){Ki.default.fetch(t,{method:"POST",body:e,headers:{"Content-Type":"text/plain"},keepalive:qE(e)}).then(function(n){return a(null,n.ok?null:"Error")}).catch(function(n){return a(null,n)});return}if(Ki.default.XMLHttpRequest){var r=new Ki.default.XMLHttpRequest;r.onreadystatechange=function(){if(r.readyState===4)return a(null,r.status!==200?"error":void 0)},r.open("POST",t),r.setRequestHeader("Content-Type","text/plain"),r.send(e);return}a()},YE=ni,GE=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception","view_playing_time_ms_cumulative","ad_playing_time_ms_cumulative"],QE=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],zE=["ad_id","ad_creative_id","ad_universal_id"],jE=["viewstart","error","ended","viewend"],ZE=10*60*1e3,XE=function(){function t(e,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ae(this,t);var r,n,s,o,l,d,m,p,h,u,v,E;w(this,"mux",void 0),w(this,"envKey",void 0),w(this,"options",void 0),w(this,"eventQueue",void 0),w(this,"sampleRate",void 0),w(this,"disableCookies",void 0),w(this,"respectDoNotTrack",void 0),w(this,"previousBeaconData",void 0),w(this,"lastEventTime",void 0),w(this,"rateLimited",void 0),w(this,"pageLevelData",void 0),w(this,"viewerData",void 0),this.mux=e,this.envKey=i,this.options=a,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new YE(OE(this.envKey,this.options));var g;this.sampleRate=(g=this.options.sampleRate)!==null&&g!==void 0?g:1;var y;this.disableCookies=(y=this.options.disableCookies)!==null&&y!==void 0?y:!1;var T;this.respectDoNotTrack=(T=this.options.respectDoNotTrack)!==null&&T!==void 0?T:!1,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:(r=this.options.platform)===null||r===void 0?void 0:r.name,viewer_application_version:(n=this.options.platform)===null||n===void 0?void 0:n.version,viewer_application_engine:(s=this.options.platform)===null||s===void 0?void 0:s.layout,viewer_device_name:(o=this.options.platform)===null||o===void 0?void 0:o.product,viewer_device_category:"",viewer_device_manufacturer:(l=this.options.platform)===null||l===void 0?void 0:l.manufacturer,viewer_os_family:(m=this.options.platform)===null||m===void 0||(d=m.os)===null||d===void 0?void 0:d.family,viewer_os_architecture:(h=this.options.platform)===null||h===void 0||(p=h.os)===null||p===void 0?void 0:p.architecture,viewer_os_version:(v=this.options.platform)===null||v===void 0||(u=v.os)===null||u===void 0?void 0:u.version,viewer_connection_type:PE(),page_url:Jo.default===null||Jo.default===void 0||(E=Jo.default.location)===null||E===void 0?void 0:E.href},this.viewerData=this.disableCookies?{}:ME()}return Gt(t,[{key:"send",value:function(e,i){if(!(!e||!(i!=null&&i.view_id))){if(this.respectDoNotTrack&&Tl())return ee.info("Not sending `"+e+"` because Do Not Track is enabled");if(!i||typeof i!="object")return ee.error("A data object was expected in send() but was not provided");var a=this.disableCookies?{}:xE(),r=$d(eo({},this.pageLevelData,i,a,this.viewerData),{event:e,env_key:this.envKey});r.user_id&&(r.viewer_user_id=r.user_id,delete r.user_id);var n,s=((n=r.mux_sample_number)!==null&&n!==void 0?n:0)>=this.sampleRate,o=this._deduplicateBeaconData(e,r),l=kl(o);if(this.lastEventTime=this.mux.utils.now(),s)return ee.info("Not sending event due to sample rate restriction",e,r,l);if(this.envKey||ee.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,r,l),!this.rateLimited)if(ee.info("Sending event",e,r,l),this.rateLimited=!this.eventQueue.queueEvent(e,l),this.mux.WINDOW_UNLOADING&&e==="viewend")this.eventQueue.destroy(!0);else{if(this.mux.WINDOW_HIDDEN&&e==="hb")this.eventQueue.flushEvents(!0);else if(jE.indexOf(e)>=0){if(e==="error"&&i.player_error_severity==="warning")return;this.eventQueue.flushEvents()}if(this.rateLimited)return r.event="eventrateexceeded",l=kl(r),this.eventQueue.queueEvent(r.event,l),ee.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,i){var a=this,r={},n=i.view_id;if(n==="-1"||e==="viewstart"||e==="viewend"||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=ZE)r=eo({},i),n&&(this.previousBeaconData=r),n&&e==="viewend"&&(this.previousBeaconData=null);else{var s=e.indexOf("request")===0;Object.entries(i).forEach(function(o){var l=ai(o,2),d=l[0],m=l[1];a.previousBeaconData&&(m!==a.previousBeaconData[d]||GE.indexOf(d)>-1||a.objectHasChanged(s,d,m,a.previousBeaconData[d])||a.eventRequiresKey(e,d))&&(r[d]=m,a.previousBeaconData[d]=m)})}return r}},{key:"objectHasChanged",value:function(e,i,a,r){return!e||i.indexOf("request_")!==0?!1:i==="request_response_headers"||typeof a!="object"||typeof r!="object"?!0:Object.keys(a||{}).length!==Object.keys(r||{}).length}},{key:"eventRequiresKey",value:function(e,i){return!!(e==="renditionchange"&&i.indexOf("video_source_")===0||zE.includes(i)&&QE.includes(e))}}]),t}(),JE=function t(e){Ae(this,t);var i=0,a=0,r=0,n=0,s=0,o=0,l=0,d=function(h,u){var v=u.request_start,E=u.request_response_start,g=u.request_response_end,y=u.request_bytes_loaded;n++;var T,_;if(E?(T=E-(v??0),_=(g??0)-E):_=(g??0)-(v??0),_>0&&y&&y>0){var S=y/_*8e3;s++,a+=y,r+=_,e.data.view_min_request_throughput=Math.min(e.data.view_min_request_throughput||1/0,S),e.data.view_average_request_throughput=a/r*8e3,e.data.view_request_count=n,T>0&&(i+=T,e.data.view_max_request_latency=Math.max(e.data.view_max_request_latency||0,T),e.data.view_average_request_latency=i/s)}},m=function(h,u){n++,o++,e.data.view_request_count=n,e.data.view_request_failed_count=o},p=function(h,u){n++,l++,e.data.view_request_count=n,e.data.view_request_canceled_count=l};e.on("requestcompleted",d),e.on("requestfailed",m),e.on("requestcanceled",p)},e_=JE,t_=60*60*1e3,i_=function t(e){var i=this;Ae(this,t),w(this,"_lastEventTime",void 0),e.on("before*",function(a,r){var n=r.viewer_time,s=Re.now(),o=i._lastEventTime;if(i._lastEventTime=s,o&&s-o>t_){var l=Object.keys(e.data).reduce(function(m,p){return p.indexOf("video_")===0?Object.assign(m,w({},p,e.data[p])):m},{});e.mux.log.info("Received event after at least an hour inactivity, creating a new view");var d=e.playbackHeartbeat._playheadShouldBeProgressing;e._resetView(Object.assign({viewer_time:n},l)),e.playbackHeartbeat._playheadShouldBeProgressing=d,e.playbackHeartbeat._playheadShouldBeProgressing&&a.type!=="play"&&a.type!=="adbreakstart"&&(e.emit("play",{viewer_time:n}),a.type!=="playing"&&e.emit("playing",{viewer_time:n}))}})},a_=i_,r_=function t(e){Ae(this,t);var i=function(o){var l=n_(o),d=s_(o);if(l!=null&&!wc(l,n)&&s<=d){n=l,s=d;var m={video_cdn:l};e.emit("cdnchange",m)}},a=null,r=null,n=null,s=0;e.on("viewinit",function(){a=null,r=null,n=null,s=0}),e.on("beforecdnchange",function(o,l){var d=l?.video_cdn;d&&(typeof l.video_previous_cdn>"u"||l.video_previous_cdn===null)&&(wc(d,r)?l.video_previous_cdn=a??void 0:(l.video_previous_cdn=r??void 0,a=r,r=d))}),e.on("requestcompleted",function(o,l){i(l)})};function wc(t,e){return t?.toLowerCase()===e?.toLowerCase()}function n_(t){var e;return t!=null&&t.request_type&&(t.request_type==="media"||t.request_type==="video")&&!((e=t.request_response_headers)===null||e===void 0)&&e["x-cdn"]?t.request_response_headers["x-cdn"]:t!=null&&t.video_cdn?t.video_cdn:null}function s_(t){return t!=null&&t.request_start?t.request_start:t!=null&&t.viewer_time?t.viewer_time:Date.now()}var o_=r_,l_=function(t){try{return JSON.parse(t),!0}catch{return!1}},d_=function t(e){var i=this;Ae(this,t),w(this,"_emittingAutomaticEvent",!1),w(this,"_hasInitialized",!1),w(this,"_currentMode","standard"),e.on("viewstart",function(){i._hasInitialized||(i._hasInitialized=!0,i._emittingAutomaticEvent=!0,e.emit("playbackmodechange",{player_playback_mode:i._currentMode,player_playback_mode_data:"{}"}),i._emittingAutomaticEvent=!1)}),e.on("viewend",function(){i._hasInitialized=!1}),e.on("playbackmodechange",function(a,r){i._emittingAutomaticEvent||(r.player_playback_mode_data?l_(r.player_playback_mode_data)||(e.mux.log.warn("Invalid JSON string for player_playback_mode_data"),r.player_playback_mode_data="{}"):r.player_playback_mode_data="{}",e.data.player_playback_mode_data=r.player_playback_mode_data,e.data.player_playback_mode=r.player_playback_mode,i._currentMode=r.player_playback_mode)})},u_=d_,c_=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange","cdnchange","playbackmodechange"],h_=new Set(["requestcompleted","requestfailed","requestcanceled"]),m_=function(t){$f(i,t);var e=Kf(i);function i(a,r,n){Ae(this,i);var s;s=e.call(this),w(P(s),"pageLoadEndTime",void 0),w(P(s),"pageLoadInitTime",void 0),w(P(s),"_destroyed",void 0),w(P(s),"_heartBeatTimeout",void 0),w(P(s),"adTracker",void 0),w(P(s),"dashjs",void 0),w(P(s),"data",void 0),w(P(s),"disablePlayheadRebufferTracking",void 0),w(P(s),"disableRebufferTracking",void 0),w(P(s),"errorTracker",void 0),w(P(s),"errorTranslator",void 0),w(P(s),"emitTranslator",void 0),w(P(s),"getAdData",void 0),w(P(s),"getPlayheadTime",void 0),w(P(s),"getStateData",void 0),w(P(s),"stateDataTranslator",void 0),w(P(s),"hlsjs",void 0),w(P(s),"id",void 0),w(P(s),"longResumeTracker",void 0),w(P(s),"minimumRebufferDuration",void 0),w(P(s),"mux",void 0),w(P(s),"playbackEventDispatcher",void 0),w(P(s),"playbackHeartbeat",void 0),w(P(s),"playbackHeartbeatTime",void 0),w(P(s),"playheadTime",void 0),w(P(s),"seekingTracker",void 0),w(P(s),"sustainedRebufferThreshold",void 0),w(P(s),"watchTimeTracker",void 0),w(P(s),"currentFragmentPDT",void 0),w(P(s),"currentFragmentStart",void 0),s.pageLoadInitTime=Js.navigationStart(),s.pageLoadEndTime=Js.domContentLoadedEventEnd();var o={debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(h){return h},emitTranslator:function(){for(var h=arguments.length,u=new Array(h),v=0;v<h;v++)u[v]=arguments[v];return u},stateDataTranslator:function(h){return h}};s.mux=a,s.id=r,n!=null&&n.beaconDomain&&s.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),n=Object.assign(o,n),n.data=n.data||{},n.data.property_key&&(n.data.env_key=n.data.property_key,delete n.data.property_key),ee.level=n.debug?Wi.DEBUG:Wi.WARN,s.getPlayheadTime=n.getPlayheadTime,s.getStateData=n.getStateData||function(){return{}},s.getAdData=n.getAdData||function(){},s.minimumRebufferDuration=n.minimumRebufferDuration,s.sustainedRebufferThreshold=n.sustainedRebufferThreshold,s.playbackHeartbeatTime=n.playbackHeartbeatTime,s.disableRebufferTracking=n.disableRebufferTracking,s.disableRebufferTracking&&s.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),s.disablePlayheadRebufferTracking=n.disablePlayheadRebufferTracking,s.errorTranslator=n.errorTranslator,s.emitTranslator=n.emitTranslator,s.stateDataTranslator=n.stateDataTranslator,s.playbackEventDispatcher=new XE(a,n.data.env_key,n),s.data={player_instance_id:nn(),mux_sample_rate:n.sampleRate,beacon_domain:n.beaconCollectionDomain||n.beaconDomain},s.data.view_sequence_number=1,s.data.player_sequence_number=1;var l=(function(){typeof this.data.view_start>"u"&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"),this.emit("renditionchange"))}).bind(P(s));if(s.on("viewinit",function(h,u){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,u),this._initializeViewData(),this.one("play",l),this.one("adbreakstart",l)}),s.on("videochange",function(h,u){this._resetView(u)}),s.on("programchange",function(h,u){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),this._resetView(Object.assign(u,{view_program_changed:!0})),l(),this.emit("play"),this.emit("playing")}),s.on("fragmentchange",function(h,u){this.currentFragmentPDT=u.currentFragmentPDT,this.currentFragmentStart=u.currentFragmentStart}),s.on("destroy",s.destroy),typeof window<"u"&&typeof window.addEventListener=="function"&&typeof window.removeEventListener=="function"){var d=function(){var h=typeof s.data.view_start<"u";s.mux.WINDOW_HIDDEN=document.visibilityState==="hidden",h&&s.mux.WINDOW_HIDDEN&&(s.data.player_is_paused||s.emit("hb"))};window.addEventListener("visibilitychange",d,!1);var m=function(h){h.persisted||s.destroy()};window.addEventListener("pagehide",m,!1),s.on("destroy",function(){window.removeEventListener("visibilitychange",d),window.removeEventListener("pagehide",m)})}s.on("playerready",function(h,u){Object.assign(this.data,u)}),c_.forEach(function(h){s.on(h,function(u,v){h.indexOf("ad")!==0&&this._updateStateData(),Object.assign(this.data,v),this._sanitizeData()}),s.on("after"+h,function(){(h!=="error"||this.errorTracker.viewErrored)&&this.send(h)})}),s.on("viewend",function(h,u){Object.assign(s.data,u)});var p=function(h){var u=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=u-this.data.player_init_time),this.pageLoadInitTime=this.data.page_load_init_time||this.pageLoadInitTime,this.pageLoadEndTime=this.data.page_load_end_time||this.pageLoadEndTime,!this.mux.PLAYER_TRACKED&&this.pageLoadInitTime&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.pageLoadEndTime)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.pageLoadEndTime||1/0)-this.pageLoadInitTime)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time};return s.one("playerready",p),s.longResumeTracker=new a_(P(s)),s.errorTracker=new oE(P(s)),new CE(P(s)),s.seekingTracker=new kE(P(s)),s.playheadTime=new mE(P(s)),s.playbackHeartbeat=new nE(P(s)),new yE(P(s)),s.watchTimeTracker=new dE(P(s)),new cE(P(s)),s.adTracker=new IE(P(s)),new EE(P(s)),new vE(P(s)),new bE(P(s)),new e_(P(s)),new o_(P(s)),new u_(P(s)),n.hlsjs&&s.addHLSJS(n),n.dashjs&&s.addDashJS(n),s.emit("viewinit",n.data),s}return Gt(i,[{key:"emit",value:function(a,r){var n,s=Object.assign({viewer_time:this.mux.utils.now()},r),o=[a,s];if(this.emitTranslator)try{o=this.emitTranslator(a,s)}catch(l){this.mux.log.warn("Exception in emit translator callback.",l)}o!=null&&o.length&&(n=Vn(Xa(i.prototype),"emit",this)).call.apply(n,[this].concat(mt(o)))}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,typeof this.data.view_start<"u"&&(this.emit("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(a){if(this.data.view_id){var r=Object.assign({},this.data),n=["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"];if(r.video_source_is_live===void 0&&(r.player_source_duration===1/0||r.video_source_duration===1/0?r.video_source_is_live=!0:(r.player_source_duration>0||r.video_source_duration>0)&&(r.video_source_is_live=!1)),r.video_source_is_live||n.forEach(function(d){r[d]=void 0}),r.video_source_url=r.video_source_url||r.player_source_url,r.video_source_url){var s=ai(sn(r.video_source_url),2),o=s[0],l=s[1];r.video_source_domain=l,r.video_source_hostname=o}delete r.ad_request_id,this.playbackEventDispatcher.send(a,r),this.data.view_sequence_number++,this.data.player_sequence_number++,h_.has(a)||this._restartHeartBeat(),a==="viewend"&&delete this.data.view_id}}},{key:"_resetView",value:function(a){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",a)}},{key:"_updateStateData",value:function(){var a,r=this.getStateData();if(typeof this.stateDataTranslator=="function")try{r=this.stateDataTranslator(r)}catch(s){this.mux.log.warn("Exception in stateDataTranslator translator callback.",s)}if(!((a=this.data)===null||a===void 0)&&a.video_cdn&&r!=null&&r.video_cdn){r.video_cdn;var n=Bf(r,["video_cdn"]);r=n}Object.assign(this.data,r),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var a=this,r=["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"];r.forEach(function(s){var o=parseInt(a.data[s],10);a.data[s]=isNaN(o)?void 0:o});var n=["player_source_url","video_source_url"];n.forEach(function(s){if(a.data[s]){var o=a.data[s].toLowerCase();(o.indexOf("data:")===0||o.indexOf("blob:")===0)&&(a.data[s]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var a=this;Object.keys(this.data).forEach(function(r){r.indexOf("video_")===0&&delete a.data[r]})}},{key:"_resetViewData",value:function(){var a=this;Object.keys(this.data).forEach(function(r){r.indexOf("view_")===0&&delete a.data[r]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var a=this,r=this.data.view_id=nn(),n=function(){r===a.data.view_id&&Te(a.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",n):n()}},{key:"_restartHeartBeat",value:function(){var a=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){a.data.player_is_paused||a.emit("hb")},1e4)}},{key:"addHLSJS",value:function(a){if(!a.hlsjs){this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.");return}if(this.hlsjs){this.mux.log.warn("An instance of HLS.js is already being monitored for this player.");return}this.hlsjs=a.hlsjs,zf(this.mux,this.id,a.hlsjs,{},a.Hls||window.Hls)}},{key:"removeHLSJS",value:function(){this.hlsjs&&(jf(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(a){if(!a.dashjs){this.mux.log.warn("You must pass a valid dashjs instance in order to track it.");return}if(this.dashjs){this.mux.log.warn("An instance of Dash.js is already being monitored for this player.");return}this.dashjs=a.dashjs,eE(this.mux,this.id,a.dashjs)}},{key:"removeDashJS",value:function(){this.dashjs&&(tE(this.dashjs),this.dashjs=void 0)}}]),i}(aE),p_=m_,hr=ot(dm());function el(){return hr.default&&!!(hr.default.fullscreenElement||hr.default.webkitFullscreenElement||hr.default.mozFullScreenElement||hr.default.msFullscreenElement)}var v_=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],f_={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};function E_(t,e,i){var a=ai(Xs(e),3),r=a[0],n=a[1],s=a[2],o=t.log,l=t.utils.getComputedStyle,d=t.utils.secondsToMs,m={automaticErrorTracking:!0};if(r){if(s!=="video"&&s!=="audio")return o.error("The element of `"+n+"` was not a media element.")}else return o.error("No element was found with the `"+n+"` query selector.");r.mux&&(r.mux.destroy(),delete r.mux,o.warn("Already monitoring this video element, replacing existing event listeners"));var p={getPlayheadTime:function(){return d(r.currentTime)},getStateData:function(){var u,v,E,g=((u=(v=this).getPlayheadTime)===null||u===void 0?void 0:u.call(v))||d(r.currentTime),y=this.hlsjs&&this.hlsjs.url,T=this.dashjs&&typeof this.dashjs.getSource=="function"&&this.dashjs.getSource(),_={player_is_paused:r.paused,player_width:parseInt(l(r,"width")),player_height:parseInt(l(r,"height")),player_autoplay_on:r.autoplay,player_preload_on:r.preload,player_language_code:r.lang,player_is_fullscreen:el(),video_poster_url:r.poster,video_source_url:y||T||r.currentSrc,video_source_duration:d(r.duration),video_source_height:r.videoHeight,video_source_width:r.videoWidth,view_dropped_frame_count:r==null||(E=r.getVideoPlaybackQuality)===null||E===void 0?void 0:E.call(r).droppedVideoFrames};if(r.getStartDate&&g>0){var S=r.getStartDate();if(S&&typeof S.getTime=="function"&&S.getTime()){var C=S.getTime();if(_.player_program_time=C+g,r.seekable.length>0){var N=C+r.seekable.end(r.seekable.length-1);_.player_live_edge_program_time=N}}}return _}};i=Object.assign(m,i,p),i.data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:t.VERSION},i.data),r.mux=r.mux||{},r.mux.deleted=!1,r.mux.emit=function(u,v){t.emit(n,u,v)},r.mux.updateData=function(u){r.mux.emit("hb",u)};var h=function(){o.error("The monitor for this video element has already been destroyed.")};r.mux.destroy=function(){Object.keys(r.mux.listeners).forEach(function(u){r.removeEventListener(u,r.mux.listeners[u],!1)}),delete r.mux.listeners,r.mux.fullscreenChangeListener&&(document.removeEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1),delete r.mux.fullscreenChangeListener),r.mux.destroy=h,r.mux.swapElement=h,r.mux.emit=h,r.mux.addHLSJS=h,r.mux.addDashJS=h,r.mux.removeHLSJS=h,r.mux.removeDashJS=h,r.mux.updateData=h,r.mux.setEmitTranslator=h,r.mux.setStateDataTranslator=h,r.mux.setGetPlayheadTime=h,r.mux.deleted=!0,t.emit(n,"destroy")},r.mux.swapElement=function(u){var v=ai(Xs(u),3),E=v[0],g=v[1],y=v[2];if(E){if(y!=="video"&&y!=="audio")return t.log.error("The element of `"+g+"` was not a media element.")}else return t.log.error("No element was found with the `"+g+"` query selector.");E.muxId=r.muxId,delete r.muxId,E.mux=E.mux||{},E.mux.listeners=Object.assign({},r.mux.listeners),delete r.mux.listeners,Object.keys(E.mux.listeners).forEach(function(T){r.removeEventListener(T,E.mux.listeners[T],!1),E.addEventListener(T,E.mux.listeners[T],!1)}),E.mux.fullscreenChangeListener=r.mux.fullscreenChangeListener,delete r.mux.fullscreenChangeListener,E.mux.swapElement=r.mux.swapElement,E.mux.destroy=r.mux.destroy,delete r.mux,r=E},r.mux.addHLSJS=function(u){t.addHLSJS(n,u)},r.mux.addDashJS=function(u){t.addDashJS(n,u)},r.mux.removeHLSJS=function(){t.removeHLSJS(n)},r.mux.removeDashJS=function(){t.removeDashJS(n)},r.mux.setEmitTranslator=function(u){t.setEmitTranslator(n,u)},r.mux.setStateDataTranslator=function(u){t.setStateDataTranslator(n,u)},r.mux.setGetPlayheadTime=function(u){u||(u=i.getPlayheadTime),t.setGetPlayheadTime(n,u)},t.init(n,i),t.emit(n,"playerready"),r.paused||(t.emit(n,"play"),r.readyState>2&&t.emit(n,"playing")),r.mux.listeners={},v_.forEach(function(u){u==="error"&&!i.automaticErrorTracking||(r.mux.listeners[u]=function(){var v={};if(u==="error"){if(!r.error||r.error.code===1)return;v.player_error_code=r.error.code,v.player_error_message=f_[r.error.code]||r.error.message}t.emit(n,u,v)},r.addEventListener(u,r.mux.listeners[u],!1))}),r.mux.listeners.enterpictureinpicture=function(){t.emit(n,"playbackmodechange",{player_playback_mode:"pip",player_playback_mode_data:"{}"})},r.mux.listeners.leavepictureinpicture=function(){var u=el()?"fullscreen":"standard";t.emit(n,"playbackmodechange",{player_playback_mode:u,player_playback_mode_data:"{}"})},r.addEventListener("enterpictureinpicture",r.mux.listeners.enterpictureinpicture,!1),r.addEventListener("leavepictureinpicture",r.mux.listeners.leavepictureinpicture,!1),r.mux.fullscreenChangeListener=function(){var u=el(),v=document.fullscreenElement;if(u&&(v===r||v!=null&&v.contains(r)))t.emit(n,"playbackmodechange",{player_playback_mode:"fullscreen",player_playback_mode_data:"{}"});else if(!u){var E=document.pictureInPictureElement===r,g=E?"pip":"standard";t.emit(n,"playbackmodechange",{player_playback_mode:g,player_playback_mode_data:"{}"})}},document.addEventListener("fullscreenchange",r.mux.fullscreenChangeListener,!1)}function __(t,e,i,a){var r=a;if(t&&typeof t[e]=="function")try{r=t[e].apply(t,i)}catch(n){ee.info("safeCall error",n)}return r}var Gr=ot(Yt()),pa;Gr.default&&Gr.default.WeakMap&&(pa=new WeakMap);function b_(t,e){if(!t||!e||!Gr.default||typeof Gr.default.getComputedStyle!="function")return"";var i;return pa&&pa.has(t)&&(i=pa.get(t)),i||(i=Gr.default.getComputedStyle(t,null),pa&&pa.set(t,i)),i.getPropertyValue(e)}function g_(t){return Math.floor(t*1e3)}var Ri={TARGET_DURATION:"#EXT-X-TARGETDURATION",PART_INF:"#EXT-X-PART-INF",SERVER_CONTROL:"#EXT-X-SERVER-CONTROL",INF:"#EXTINF",PROGRAM_DATE_TIME:"#EXT-X-PROGRAM-DATE-TIME",VERSION:"#EXT-X-VERSION",SESSION_DATA:"#EXT-X-SESSION-DATA"},Co=function(t){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(t),this.manifest};Co.prototype.process=function(t){var e;for(this.buffer+=t,e=this.buffer.indexOf(`
15
15
  `);e>-1;e=this.buffer.indexOf(`
16
- `))this.processLine(this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)};Co.prototype.processLine=function(t){var e=t.indexOf(":"),i=k_(t,e),a=i[0],r=i.length===2?Bd(i[1]):void 0;if(a[0]!=="#")this.currentUri.uri=a,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(a){case Ri.TARGET_DURATION:{if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break}case Ri.PART_INF:{tl(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break}case Ri.SERVER_CONTROL:{tl(this.manifest,i),this.setHoldBack();break}case Ri.INF:{r===0?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break}case Ri.PROGRAM_DATE_TIME:{var n=r,s=new Date(n);this.manifest.dateTimeString||(this.manifest.dateTimeString=n,this.manifest.dateTimeObject=s),this.currentUri.dateTimeString=n,this.currentUri.dateTimeObject=s;break}case Ri.VERSION:{tl(this.manifest,i);break}case Ri.SESSION_DATA:{var o=S_(i[1]),l=mm(o);Object.assign(this.manifest.sessionData,l)}}};Co.prototype.setHoldBack=function(){var t=this.manifest,e=t.serverControl,i=t.targetDuration,a=t.partTargetDuration;if(e){var r="holdBack",n="partHoldBack",s=i&&i*3,o=a&&a*2;i&&!e.hasOwnProperty(r)&&(e[r]=s),s&&e[r]<s&&(e[r]=s),a&&!e.hasOwnProperty(n)&&(e[n]=a*3),a&&e[n]<o&&(e[n]=o)}};var tl=function(t,e){var i=Tm(e[0].replace("#EXT-X-","")),a;A_(e[1])?(a={},a=Object.assign(T_(e[1]),a)):a=Bd(e[1]),t[i]=a},Tm=function(t){return t.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},Bd=function(t){if(t.toLowerCase()==="yes"||t.toLowerCase()==="no")return t.toLowerCase()==="yes";var e=t.indexOf(":")!==-1?t:parseFloat(t);return isNaN(e)?t:e},y_=function(t){var e={},i=t.split("=");if(i.length>1){var a=Tm(i[0]);e[a]=Bd(i[1])}return e},T_=function(t){for(var e=t.split(","),i={},a=0;e.length>a;a++){var r=e[a],n=y_(r);i=Object.assign(n,i)}return i},A_=function(t){return t.indexOf("=")>-1},k_=function(t,e){return e===-1?[t]:[t.substring(0,e),t.substring(e+1)]},S_=function(t){var e={};if(t){var i=t.search(","),a=t.slice(0,i),r=t.slice(i+1),n=[a,r];return n.forEach(function(s,o){for(var l=s.replace(/['"]+/g,"").split("="),d=0;d<l.length;d++)l[d]==="DATA-ID"&&(e["DATA-ID"]=l[1-d]),l[d]==="VALUE"&&(e.VALUE=l[1-d])}),{data:e}}},w_=Co,I_={safeCall:__,safeIncrement:Te,getComputedStyle:b_,secondsToMs:g_,assign:Object.assign,headersStringToObject:Hd,cdnHeadersToRequestId:to,extractHostnameAndDomain:nn,extractHostname:_t,manifestParser:w_,generateShortID:cm,generateUUID:rn,now:Re.now,findMediaElement:Xs},R_=I_,C_={PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",PLAYBACK_MODE_CHANGE:"playbackmodechange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled",HEARTBEAT:"hb",DESTROY:"destroy"},L_=C_,D_="mux-embed",M_="5.15.0",x_="2.1",pe={},Ai=function(t){var e=arguments;typeof t=="string"?Ai.hasOwnProperty(t)?qr.default.setTimeout(function(){e=Array.prototype.splice.call(e,1),Ai[t].apply(null,e)},0):ee.warn("`"+t+"` is an unknown task"):typeof t=="function"?qr.default.setTimeout(function(){t(Ai)},0):ee.warn("`"+t+"` is invalid.")},O_={loaded:Re.now(),NAME:D_,VERSION:M_,API_VERSION:x_,PLAYER_TRACKED:!1,monitor:function(t,e){return E_(Ai,t,e)},destroyMonitor:function(t){var e=ai(Xs(t),1),i=e[0];i&&i.mux&&typeof i.mux.destroy=="function"?i.mux.destroy():ee.error("A video element monitor for `"+t+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(t,e){var i=ht(t);pe[i]?pe[i].addHLSJS(e):ee.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(t,e){var i=ht(t);pe[i]?pe[i].addDashJS(e):ee.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(t){var e=ht(t);pe[e]?pe[e].removeHLSJS():ee.error("A monitor for `"+e+"` has not been initialized.")},removeDashJS:function(t){var e=ht(t);pe[e]?pe[e].removeDashJS():ee.error("A monitor for `"+e+"` has not been initialized.")},init:function(t,e){Tl()&&e&&e.respectDoNotTrack&&ee.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=ht(t);pe[i]=new p_(Ai,i,e)},emit:function(t,e,i){var a=ht(t);pe[a]?(pe[a].emit(e,i),e==="destroy"&&delete pe[a]):ee.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(t,e){var i=ht(t);pe[i]?pe[i].emit("hb",e):ee.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(t,e){var i=ht(t);pe[i]?pe[i].emitTranslator=e:ee.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(t,e){var i=ht(t);pe[i]?pe[i].stateDataTranslator=e:ee.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(t,e){var i=ht(t);pe[i]?pe[i].getPlayheadTime=e:ee.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:Tl,log:ee,utils:R_,events:L_,WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(Ai,O_);typeof qr.default<"u"&&typeof qr.default.addEventListener=="function"&&qr.default.addEventListener("pagehide",function(t){t.persisted||(Ai.WINDOW_UNLOADING=!0)},!1);var Wd=Ai;/*!
16
+ `))this.processLine(this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)};Co.prototype.processLine=function(t){var e=t.indexOf(":"),i=k_(t,e),a=i[0],r=i.length===2?Bd(i[1]):void 0;if(a[0]!=="#")this.currentUri.uri=a,this.manifest.segments.push(this.currentUri),this.manifest.targetDuration&&!("duration"in this.currentUri)&&(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(a){case Ri.TARGET_DURATION:{if(!isFinite(r)||r<0)return;this.manifest.targetDuration=r,this.setHoldBack();break}case Ri.PART_INF:{tl(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break}case Ri.SERVER_CONTROL:{tl(this.manifest,i),this.setHoldBack();break}case Ri.INF:{r===0?this.currentUri.duration=.01:r>0&&(this.currentUri.duration=r);break}case Ri.PROGRAM_DATE_TIME:{var n=r,s=new Date(n);this.manifest.dateTimeString||(this.manifest.dateTimeString=n,this.manifest.dateTimeObject=s),this.currentUri.dateTimeString=n,this.currentUri.dateTimeObject=s;break}case Ri.VERSION:{tl(this.manifest,i);break}case Ri.SESSION_DATA:{var o=S_(i[1]),l=mm(o);Object.assign(this.manifest.sessionData,l)}}};Co.prototype.setHoldBack=function(){var t=this.manifest,e=t.serverControl,i=t.targetDuration,a=t.partTargetDuration;if(e){var r="holdBack",n="partHoldBack",s=i&&i*3,o=a&&a*2;i&&!e.hasOwnProperty(r)&&(e[r]=s),s&&e[r]<s&&(e[r]=s),a&&!e.hasOwnProperty(n)&&(e[n]=a*3),a&&e[n]<o&&(e[n]=o)}};var tl=function(t,e){var i=Tm(e[0].replace("#EXT-X-","")),a;A_(e[1])?(a={},a=Object.assign(T_(e[1]),a)):a=Bd(e[1]),t[i]=a},Tm=function(t){return t.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},Bd=function(t){if(t.toLowerCase()==="yes"||t.toLowerCase()==="no")return t.toLowerCase()==="yes";var e=t.indexOf(":")!==-1?t:parseFloat(t);return isNaN(e)?t:e},y_=function(t){var e={},i=t.split("=");if(i.length>1){var a=Tm(i[0]);e[a]=Bd(i[1])}return e},T_=function(t){for(var e=t.split(","),i={},a=0;e.length>a;a++){var r=e[a],n=y_(r);i=Object.assign(n,i)}return i},A_=function(t){return t.indexOf("=")>-1},k_=function(t,e){return e===-1?[t]:[t.substring(0,e),t.substring(e+1)]},S_=function(t){var e={};if(t){var i=t.search(","),a=t.slice(0,i),r=t.slice(i+1),n=[a,r];return n.forEach(function(s,o){for(var l=s.replace(/['"]+/g,"").split("="),d=0;d<l.length;d++)l[d]==="DATA-ID"&&(e["DATA-ID"]=l[1-d]),l[d]==="VALUE"&&(e.VALUE=l[1-d])}),{data:e}}},w_=Co,I_={safeCall:__,safeIncrement:Te,getComputedStyle:b_,secondsToMs:g_,assign:Object.assign,headersStringToObject:Hd,cdnHeadersToRequestId:to,extractHostnameAndDomain:sn,extractHostname:_t,manifestParser:w_,generateShortID:cm,generateUUID:nn,now:Re.now,findMediaElement:Xs},R_=I_,C_={PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",PLAYBACK_MODE_CHANGE:"playbackmodechange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled",HEARTBEAT:"hb",DESTROY:"destroy"},L_=C_,D_="mux-embed",M_="5.15.0",x_="2.1",pe={},Ai=function(t){var e=arguments;typeof t=="string"?Ai.hasOwnProperty(t)?Yr.default.setTimeout(function(){e=Array.prototype.splice.call(e,1),Ai[t].apply(null,e)},0):ee.warn("`"+t+"` is an unknown task"):typeof t=="function"?Yr.default.setTimeout(function(){t(Ai)},0):ee.warn("`"+t+"` is invalid.")},O_={loaded:Re.now(),NAME:D_,VERSION:M_,API_VERSION:x_,PLAYER_TRACKED:!1,monitor:function(t,e){return E_(Ai,t,e)},destroyMonitor:function(t){var e=ai(Xs(t),1),i=e[0];i&&i.mux&&typeof i.mux.destroy=="function"?i.mux.destroy():ee.error("A video element monitor for `"+t+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(t,e){var i=ht(t);pe[i]?pe[i].addHLSJS(e):ee.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(t,e){var i=ht(t);pe[i]?pe[i].addDashJS(e):ee.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(t){var e=ht(t);pe[e]?pe[e].removeHLSJS():ee.error("A monitor for `"+e+"` has not been initialized.")},removeDashJS:function(t){var e=ht(t);pe[e]?pe[e].removeDashJS():ee.error("A monitor for `"+e+"` has not been initialized.")},init:function(t,e){Tl()&&e&&e.respectDoNotTrack&&ee.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=ht(t);pe[i]=new p_(Ai,i,e)},emit:function(t,e,i){var a=ht(t);pe[a]?(pe[a].emit(e,i),e==="destroy"&&delete pe[a]):ee.error("A monitor for `"+a+"` has not been initialized.")},updateData:function(t,e){var i=ht(t);pe[i]?pe[i].emit("hb",e):ee.error("A monitor for `"+i+"` has not been initialized.")},setEmitTranslator:function(t,e){var i=ht(t);pe[i]?pe[i].emitTranslator=e:ee.error("A monitor for `"+i+"` has not been initialized.")},setStateDataTranslator:function(t,e){var i=ht(t);pe[i]?pe[i].stateDataTranslator=e:ee.error("A monitor for `"+i+"` has not been initialized.")},setGetPlayheadTime:function(t,e){var i=ht(t);pe[i]?pe[i].getPlayheadTime=e:ee.error("A monitor for `"+i+"` has not been initialized.")},checkDoNotTrack:Tl,log:ee,utils:R_,events:L_,WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(Ai,O_);typeof Yr.default<"u"&&typeof Yr.default.addEventListener=="function"&&Yr.default.addEventListener("pagehide",function(t){t.persisted||(Ai.WINDOW_UNLOADING=!0)},!1);var Wd=Ai;/*!
17
17
  * JavaScript Cookie v2.1.3
18
18
  * https://github.com/js-cookie/js-cookie
19
19
  *
20
20
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
21
21
  * Released under the MIT license
22
- */var B=hf,te={VIDEO:"video",THUMBNAIL:"thumbnail",STORYBOARD:"storyboard",DRM:"drm"},x={NOT_AN_ERROR:0,NETWORK_OFFLINE:2000002,NETWORK_UNKNOWN_ERROR:2e6,NETWORK_NO_STATUS:2000001,NETWORK_INVALID_URL:24e5,NETWORK_NOT_FOUND:2404e3,NETWORK_NOT_READY:2412e3,NETWORK_GENERIC_SERVER_FAIL:25e5,NETWORK_TOKEN_MISSING:2403201,NETWORK_TOKEN_MALFORMED:2412202,NETWORK_TOKEN_EXPIRED:2403210,NETWORK_TOKEN_AUD_MISSING:2403221,NETWORK_TOKEN_AUD_MISMATCH:2403222,NETWORK_TOKEN_SUB_MISMATCH:2403232,ENCRYPTED_ERROR:5e6,ENCRYPTED_UNSUPPORTED_KEY_SYSTEM:5000001,ENCRYPTED_GENERATE_REQUEST_FAILED:5000002,ENCRYPTED_UPDATE_LICENSE_FAILED:5000003,ENCRYPTED_UPDATE_SERVER_CERT_FAILED:5000004,ENCRYPTED_CDM_ERROR:5000005,ENCRYPTED_OUTPUT_RESTRICTED:5000006,ENCRYPTED_MISSING_TOKEN:5000002},Lo=t=>t===te.VIDEO?"playback":t,ci=class Tr extends Error{constructor(e,i=Tr.MEDIA_ERR_CUSTOM,a,r){var n;super(e),this.name="MediaError",this.code=i,this.context=r,this.fatal=a??(i>=Tr.MEDIA_ERR_NETWORK&&i<=Tr.MEDIA_ERR_ENCRYPTED),this.message||(this.message=(n=Tr.defaultMessages[this.code])!=null?n:"")}};ci.MEDIA_ERR_ABORTED=1,ci.MEDIA_ERR_NETWORK=2,ci.MEDIA_ERR_DECODE=3,ci.MEDIA_ERR_SRC_NOT_SUPPORTED=4,ci.MEDIA_ERR_ENCRYPTED=5,ci.MEDIA_ERR_CUSTOM=100,ci.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail.",3:"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",4:"An unsupported error occurred. The server or network failed, or your browser does not support this format.",5:"The media is encrypted and there are no keys to decrypt it."};var R=ci,N_=t=>t==null,Fd=(t,e)=>N_(e)?!1:t in e,Sl={ANY:"any",MUTED:"muted"},Q={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},Wt={MSE:"mse",NATIVE:"native"},Ar={HEADER:"header",QUERY:"query",NONE:"none"},io=Object.values(Ar),ti={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},Ic={HLS:ti.M3U8};[...Object.values(ti)];var MA={upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"},xA={noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},OA={DESCENDING:"desc"},P_="en",wl={code:P_},fe=(t,e,i,a,r=t)=>{r.addEventListener(e,i,a),t.addEventListener("teardown",()=>{r.removeEventListener(e,i)},{once:!0})};function U_(t,e,i){e&&i>e&&(i=e);for(let a=0;a<t.length;a++)if(t.start(a)<=i&&t.end(a)>=i)return!0;return!1}var Kd=t=>{let e=t.indexOf("?");if(e<0)return[t];let i=t.slice(0,e),a=t.slice(e);return[i,a]},Do=t=>{let{type:e}=t;if(e){let i=e.toUpperCase();return Fd(i,Ic)?Ic[i]:e}return $_(t)},Am=t=>t==="VOD"?Q.ON_DEMAND:Q.LIVE,km=t=>t==="EVENT"?Number.POSITIVE_INFINITY:t==="VOD"?Number.NaN:0,$_=t=>{let{src:e}=t;if(!e)return"";let i="";try{i=new URL(e).pathname}catch{console.error("invalid url")}let a=i.lastIndexOf(".");if(a<0)return B_(t)?ti.M3U8:"";let r=i.slice(a+1).toUpperCase();return Fd(r,ti)?ti[r]:""},H_="mux.com",B_=({src:t,customDomain:e=H_})=>{let i;try{i=new URL(`${t}`)}catch{return!1}let a=i.protocol==="https:",r=i.hostname===`stream.${e}`.toLowerCase(),n=i.pathname.split("/"),s=n.length===2,o=!(n!=null&&n[1].includes("."));return a&&r&&s&&o},Fa=t=>{let e=(t??"").split(".")[1];if(e)try{let i=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(i).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}catch{return}},W_=({exp:t},e=Date.now())=>!t||t*1e3<e,F_=({sub:t},e)=>t!==e,K_=({aud:t},e)=>!t,V_=({aud:t},e)=>t!==e,Sm="en";function D(t,e=!0){var i,a;let r=e&&(a=(i=wl)==null?void 0:i[t])!=null?a:t,n=e?wl.code:Sm;return new q_(r,n)}var q_=class{constructor(t,e=(i=>(i=wl)!=null?i:Sm)()){this.message=t,this.locale=e}format(t){return this.message.replace(/\{(\w+)\}/g,(e,i)=>{var a;return(a=t[i])!=null?a:""})}toString(){return this.message}},Y_=Object.values(Sl),Rc=t=>typeof t=="boolean"||typeof t=="string"&&Y_.includes(t),G_=(t,e,i)=>{let{autoplay:a}=t,r=!1,n=!1,s=Rc(a)?a:!!a,o=()=>{r||fe(e,"playing",()=>{r=!0},{once:!0})};if(o(),fe(e,"loadstart",()=>{r=!1,o(),il(e,s)},{once:!0}),fe(e,"loadstart",()=>{i||(t.streamType&&t.streamType!==Q.UNKNOWN?n=t.streamType===Q.LIVE:n=!Number.isFinite(e.duration)),il(e,s)},{once:!0}),i&&i.once(B.Events.LEVEL_LOADED,(l,d)=>{var m;t.streamType&&t.streamType!==Q.UNKNOWN?n=t.streamType===Q.LIVE:n=(m=d.details.live)!=null?m:!1}),!s){let l=()=>{!n||Number.isFinite(t.startTime)||(i!=null&&i.liveSyncPosition?e.currentTime=i.liveSyncPosition:Number.isFinite(e.seekable.end(0))&&(e.currentTime=e.seekable.end(0)))};i&&fe(e,"play",()=>{e.preload==="metadata"?i.once(B.Events.LEVEL_UPDATED,l):l()},{once:!0})}return l=>{r||(s=Rc(l)?l:!!l,il(e,s))}},il=(t,e)=>{if(!e)return;let i=t.muted,a=()=>t.muted=i;switch(e){case Sl.ANY:t.play().catch(()=>{t.muted=!0,t.play().catch(a)});break;case Sl.MUTED:t.muted=!0,t.play().catch(a);break;default:t.play().catch(()=>{});break}},Q_=({preload:t,src:e},i,a)=>{let r=p=>{p!=null&&["","none","metadata","auto"].includes(p)?i.setAttribute("preload",p):i.removeAttribute("preload")};if(!a)return r(t),r;let n=!1,s=!1,o=a.config.maxBufferLength,l=a.config.maxBufferSize,d=p=>{r(p);let h=p??i.preload;s||h==="none"||(h==="metadata"?(a.config.maxBufferLength=1,a.config.maxBufferSize=1):(a.config.maxBufferLength=o,a.config.maxBufferSize=l),m())},m=()=>{!n&&e&&(n=!0,a.loadSource(e))};return fe(i,"play",()=>{s=!0,a.config.maxBufferLength=o,a.config.maxBufferSize=l,m()},{once:!0}),d(t),d};function z_(t,e){var i;if(!("videoTracks"in t))return;let a=new WeakMap;e.on(B.Events.MANIFEST_PARSED,function(l,d){o();let m=t.addVideoTrack("main");m.selected=!0;for(let[p,h]of d.levels.entries()){let u=m.addRendition(h.url[0],h.width,h.height,h.videoCodec,h.bitrate);a.set(h,`${p}`),u.id=`${p}`}}),e.on(B.Events.AUDIO_TRACKS_UPDATED,function(l,d){s();for(let m of d.audioTracks){let p=m.default?"main":"alternative",h=t.addAudioTrack(p,m.name,m.lang);h.id=`${m.id}`,m.default&&(h.enabled=!0)}}),t.audioTracks.addEventListener("change",()=>{var l;let d=+((l=[...t.audioTracks].find(p=>p.enabled))==null?void 0:l.id),m=e.audioTracks.map(p=>p.id);d!=e.audioTrack&&m.includes(d)&&(e.audioTrack=d)}),e.on(B.Events.LEVELS_UPDATED,function(l,d){var m;let p=t.videoTracks[(m=t.videoTracks.selectedIndex)!=null?m:0];if(!p)return;let h=d.levels.map(u=>a.get(u));for(let u of t.videoRenditions)u.id&&!h.includes(u.id)&&p.removeRendition(u)});let r=l=>{let d=l.target.selectedIndex;d!=e.nextLevel&&(e.nextLevel=d)};(i=t.videoRenditions)==null||i.addEventListener("change",r);let n=()=>{for(let l of t.videoTracks)t.removeVideoTrack(l)},s=()=>{for(let l of t.audioTracks)t.removeAudioTrack(l)},o=()=>{n(),s()};e.once(B.Events.DESTROYING,o)}var al=t=>"time"in t?t.time:t.startTime;function j_(t,e){e.on(B.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(r,{tracks:n})=>{n.forEach(s=>{var o,l;let d=(o=s.subtitleTrack)!=null?o:s.closedCaptions,m=e.subtitleTracks.findIndex(({lang:h,name:u,type:v})=>h==d?.lang&&u===s.label&&v.toLowerCase()===s.kind),p=((l=s._id)!=null?l:s.default)?"default":`${s.kind}${m}`;Vd(t,s.kind,s.label,d?.lang,p,s.default)})});let i=()=>{if(!e.subtitleTracks.length)return;let r=Array.from(t.textTracks).find(o=>o.id&&o.mode==="showing"&&["subtitles","captions"].includes(o.kind));if(!r)return;let n=e.subtitleTracks[e.subtitleTrack],s=n?n.default?"default":`${e.subtitleTracks[e.subtitleTrack].type.toLowerCase()}${e.subtitleTrack}`:void 0;if(e.subtitleTrack<0||r?.id!==s){let o=e.subtitleTracks.findIndex(({lang:l,name:d,type:m,default:p})=>r.id==="default"&&p||l==r.language&&d===r.label&&m.toLowerCase()===r.kind);e.subtitleTrack=o}r?.id===s&&r.cues&&Array.from(r.cues).forEach(o=>{r.addCue(o)})};t.textTracks.addEventListener("change",i),e.on(B.Events.CUES_PARSED,(r,{track:n,cues:s})=>{let o=t.textTracks.getTrackById(n);if(!o)return;let l=o.mode==="disabled";l&&(o.mode="hidden"),s.forEach(d=>{var m;(m=o.cues)!=null&&m.getCueById(d.id)||o.addCue(d)}),l&&(o.mode="disabled")}),e.once(B.Events.DESTROYING,()=>{t.textTracks.removeEventListener("change",i),t.querySelectorAll("track[data-removeondestroy]").forEach(r=>{r.remove()})});let a=()=>{Array.from(t.textTracks).forEach(r=>{var n,s;if(!["subtitles","caption"].includes(r.kind)&&(r.label==="thumbnails"||r.kind==="chapters")){if(!((n=r.cues)!=null&&n.length)){let o="track";r.kind&&(o+=`[kind="${r.kind}"]`),r.label&&(o+=`[label="${r.label}"]`);let l=t.querySelector(o),d=(s=l?.getAttribute("src"))!=null?s:"";l?.removeAttribute("src"),setTimeout(()=>{l?.setAttribute("src",d)},0)}r.mode!=="hidden"&&(r.mode="hidden")}})};e.once(B.Events.MANIFEST_LOADED,a),e.once(B.Events.MEDIA_ATTACHED,a)}function Vd(t,e,i,a,r,n){let s=document.createElement("track");return s.kind=e,s.label=i,a&&(s.srclang=a),r&&(s.id=r),n&&(s.default=!0),s.track.mode=["subtitles","captions"].includes(e)?"disabled":"hidden",s.setAttribute("data-removeondestroy",""),t.append(s),s.track}function Z_(t,e){let i=Array.prototype.find.call(t.querySelectorAll("track"),a=>a.track===e);i?.remove()}function gn(t,e,i){var a;return(a=Array.from(t.querySelectorAll("track")).find(r=>r.track.label===e&&r.track.kind===i))==null?void 0:a.track}async function wm(t,e,i,a){let r=gn(t,i,a);return r||(r=Vd(t,a,i),r.mode="hidden",await new Promise(n=>setTimeout(()=>n(void 0),0))),r.mode!=="hidden"&&(r.mode="hidden"),[...e].sort((n,s)=>al(s)-al(n)).forEach(n=>{var s,o;let l=n.value,d=al(n);if("endTime"in n&&n.endTime!=null)r?.addCue(new VTTCue(d,n.endTime,a==="chapters"?l:JSON.stringify(l??null)));else{let m=Array.prototype.findIndex.call(r?.cues,v=>v.startTime>=d),p=(s=r?.cues)==null?void 0:s[m],h=p?p.startTime:Number.isFinite(t.duration)?t.duration:Number.MAX_SAFE_INTEGER,u=(o=r?.cues)==null?void 0:o[m-1];u&&(u.endTime=d),r?.addCue(new VTTCue(d,h,a==="chapters"?l:JSON.stringify(l??null)))}}),t.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r}var qd="cuepoints",Im=Object.freeze({label:qd});async function Rm(t,e,i=Im){return wm(t,e,i.label,"metadata")}var Il=t=>({time:t.startTime,value:JSON.parse(t.text)});function X_(t,e={label:qd}){let i=gn(t,e.label,"metadata");return i!=null&&i.cues?Array.from(i.cues,a=>Il(a)):[]}function Cm(t,e={label:qd}){var i,a;let r=gn(t,e.label,"metadata");if(!((i=r?.activeCues)!=null&&i.length))return;if(r.activeCues.length===1)return Il(r.activeCues[0]);let{currentTime:n}=t,s=Array.prototype.find.call((a=r.activeCues)!=null?a:[],({startTime:o,endTime:l})=>o<=n&&l>n);return Il(s||r.activeCues[0])}async function J_(t,e=Im){return new Promise(i=>{fe(t,"loadstart",async()=>{let a=await Rm(t,[],e);fe(t,"cuechange",()=>{let r=Cm(t);if(r){let n=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:r});t.dispatchEvent(n)}},{},a),i(a)})})}var Yd="chapters",Lm=Object.freeze({label:Yd}),Rl=t=>({startTime:t.startTime,endTime:t.endTime,value:t.text});async function Dm(t,e,i=Lm){return wm(t,e,i.label,"chapters")}function eb(t,e={label:Yd}){var i;let a=gn(t,e.label,"chapters");return(i=a?.cues)!=null&&i.length?Array.from(a.cues,r=>Rl(r)):[]}function Mm(t,e={label:Yd}){var i,a;let r=gn(t,e.label,"chapters");if(!((i=r?.activeCues)!=null&&i.length))return;if(r.activeCues.length===1)return Rl(r.activeCues[0]);let{currentTime:n}=t,s=Array.prototype.find.call((a=r.activeCues)!=null?a:[],({startTime:o,endTime:l})=>o<=n&&l>n);return Rl(s||r.activeCues[0])}async function tb(t,e=Lm){return new Promise(i=>{fe(t,"loadstart",async()=>{let a=await Dm(t,[],e);fe(t,"cuechange",()=>{let r=Mm(t);if(r){let n=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:r});t.dispatchEvent(n)}},{},a),i(a)})})}function ib(t,e){if(e){let i=e.playingDate;if(i!=null)return new Date(i.getTime()-t.currentTime*1e3)}return typeof t.getStartDate=="function"?t.getStartDate():new Date(NaN)}function ab(t,e){if(e&&e.playingDate)return e.playingDate;if(typeof t.getStartDate=="function"){let i=t.getStartDate();return new Date(i.getTime()+t.currentTime*1e3)}return new Date(NaN)}var Gr={VIDEO:"v",THUMBNAIL:"t",STORYBOARD:"s",DRM:"d"},rb=t=>{if(t===te.VIDEO)return Gr.VIDEO;if(t===te.DRM)return Gr.DRM},nb=(t,e)=>{var i,a;let r=Lo(t),n=`${r}Token`;return(i=e.tokens)!=null&&i[r]?(a=e.tokens)==null?void 0:a[r]:Fd(n,e)?e[n]:void 0},ao=(t,e,i,a,r=!1,n=!(s=>(s=globalThis.navigator)==null?void 0:s.onLine)())=>{var s,o;if(n){let y=D("Your device appears to be offline",r),T,_=R.MEDIA_ERR_NETWORK,S=new R(y,_,!1,T);return S.errorCategory=e,S.muxCode=x.NETWORK_OFFLINE,S.data=t,S}let l="status"in t?t.status:t.code,d=Date.now(),m=R.MEDIA_ERR_NETWORK;if(l===200)return;let p=Lo(e),h=nb(e,i),u=rb(e),[v]=Kd((s=i.playbackId)!=null?s:"");if(!l||!v)return;let E=Fa(h);if(h&&!E){let y=D("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:p}),T=D("Compact JWT string: {token}",r).format({token:h}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_MALFORMED,_.data=t,_}if(l>=500){let y=new R("",m,a??!0);return y.errorCategory=e,y.muxCode=x.NETWORK_UNKNOWN_ERROR,y}if(l===403)if(E){if(W_(E,d)){let y={timeStyle:"medium",dateStyle:"medium"},T=D("The video’s secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:p}),_=D("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",y).format((o=E.exp)!=null?o:0*1e3),currentDate:new Intl.DateTimeFormat("en",y).format(d)}),S=new R(T,m,!0,_);return S.errorCategory=e,S.muxCode=x.NETWORK_TOKEN_EXPIRED,S.data=t,S}if(F_(E,v)){let y=D("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:p}),T=D("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:p,playbackId:v,tokenPlaybackId:E.sub}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_SUB_MISMATCH,_.data=t,_}if(K_(E)){let y=D("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:p}),T=D("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:p,expectedAud:u}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_AUD_MISSING,_.data=t,_}if(V_(E,u)){let y=D("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:p}),T=D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:p,expectedAud:u,aud:E.aud}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_AUD_MISMATCH,_.data=t,_}}else{let y=D("Authorization error trying to access this {category} URL. If this is a signed URL, you might need to provide a {tokenNamePrefix}-token.",r).format({tokenNamePrefix:p,category:e}),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_MISSING,_.data=t,_}if(l===412){let y=D("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_NOT_READY,_.streamType=i.streamType===Q.LIVE?"live":i.streamType===Q.ON_DEMAND?"on-demand":"unknown",_.data=t,_}if(l===404){let y=D("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_NOT_FOUND,_.data=t,_}if(l===400){let y=D("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_INVALID_URL,_.data=t,_}let g=new R("",m,a??!0);return g.errorCategory=e,g.muxCode=x.NETWORK_UNKNOWN_ERROR,g.data=t,g},Cc=B.DefaultConfig.capLevelController,sb={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400};function ob(t){let e=t.toLowerCase().trim();return sb[e]}var Cl=class kr extends Cc{constructor(e){super(e)}static setMaxAutoResolution(e,i){i?kr.maxAutoResolution.set(e,i):kr.maxAutoResolution.delete(e)}getMaxAutoResolution(){var e;let i=this.hls;return(e=kr.maxAutoResolution.get(i))!=null?e:void 0}get levels(){var e;return(e=this.hls.levels)!=null?e:[]}getValidLevels(e){return this.levels.filter((i,a)=>this.isLevelAllowed(i)&&a<=e)}getMaxLevelCapped(e){let i=this.getValidLevels(e),a=this.getMaxAutoResolution();if(!a)return super.getMaxLevel(e);let r=ob(a);if(!r)return super.getMaxLevel(e);let n=i.filter(l=>l.width*l.height<=r),s=n.findIndex(l=>l.width*l.height===r);if(s!==-1){let l=n[s];return i.findIndex(d=>d===l)}if(n.length===0)return 0;let o=n[n.length-1];return i.findIndex(l=>l===o)}getMaxLevel(e){if(this.getMaxAutoResolution()!==void 0)return this.getMaxLevelCapped(e);let i=super.getMaxLevel(e),a=this.getValidLevels(e);if(!a[i])return i;let r=Math.min(a[i].width,a[i].height),n=kr.minMaxResolution;return r>=n?i:Cc.getMaxLevelByMediaSize(a,n*(16/9),n)}};Cl.minMaxResolution=720,Cl.maxAutoResolution=new WeakMap;var lb=Cl,rl=lb,Vn={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine"},db=t=>{if(t.includes("fps"))return Vn.FAIRPLAY;if(t.includes("playready"))return Vn.PLAYREADY;if(t.includes("widevine"))return Vn.WIDEVINE},ub=t=>{let e=t.split(`
22
+ */var B=hf,te={VIDEO:"video",THUMBNAIL:"thumbnail",STORYBOARD:"storyboard",DRM:"drm"},x={NOT_AN_ERROR:0,NETWORK_OFFLINE:2000002,NETWORK_UNKNOWN_ERROR:2e6,NETWORK_NO_STATUS:2000001,NETWORK_INVALID_URL:24e5,NETWORK_NOT_FOUND:2404e3,NETWORK_NOT_READY:2412e3,NETWORK_GENERIC_SERVER_FAIL:25e5,NETWORK_TOKEN_MISSING:2403201,NETWORK_TOKEN_MALFORMED:2412202,NETWORK_TOKEN_EXPIRED:2403210,NETWORK_TOKEN_AUD_MISSING:2403221,NETWORK_TOKEN_AUD_MISMATCH:2403222,NETWORK_TOKEN_SUB_MISMATCH:2403232,ENCRYPTED_ERROR:5e6,ENCRYPTED_UNSUPPORTED_KEY_SYSTEM:5000001,ENCRYPTED_GENERATE_REQUEST_FAILED:5000002,ENCRYPTED_UPDATE_LICENSE_FAILED:5000003,ENCRYPTED_UPDATE_SERVER_CERT_FAILED:5000004,ENCRYPTED_CDM_ERROR:5000005,ENCRYPTED_OUTPUT_RESTRICTED:5000006,ENCRYPTED_MISSING_TOKEN:5000002},Lo=t=>t===te.VIDEO?"playback":t,ci=class Ar extends Error{constructor(e,i=Ar.MEDIA_ERR_CUSTOM,a,r){var n;super(e),this.name="MediaError",this.code=i,this.context=r,this.fatal=a??(i>=Ar.MEDIA_ERR_NETWORK&&i<=Ar.MEDIA_ERR_ENCRYPTED),this.message||(this.message=(n=Ar.defaultMessages[this.code])!=null?n:"")}};ci.MEDIA_ERR_ABORTED=1,ci.MEDIA_ERR_NETWORK=2,ci.MEDIA_ERR_DECODE=3,ci.MEDIA_ERR_SRC_NOT_SUPPORTED=4,ci.MEDIA_ERR_ENCRYPTED=5,ci.MEDIA_ERR_CUSTOM=100,ci.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail.",3:"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",4:"An unsupported error occurred. The server or network failed, or your browser does not support this format.",5:"The media is encrypted and there are no keys to decrypt it."};var R=ci,N_=t=>t==null,Fd=(t,e)=>N_(e)?!1:t in e,Sl={ANY:"any",MUTED:"muted"},Q={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},Wt={MSE:"mse",NATIVE:"native"},kr={HEADER:"header",QUERY:"query",NONE:"none"},io=Object.values(kr),ti={M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"},Ic={HLS:ti.M3U8};[...Object.values(ti)];var MA={upTo720p:"720p",upTo1080p:"1080p",upTo1440p:"1440p",upTo2160p:"2160p"},xA={noLessThan480p:"480p",noLessThan540p:"540p",noLessThan720p:"720p",noLessThan1080p:"1080p",noLessThan1440p:"1440p",noLessThan2160p:"2160p"},OA={DESCENDING:"desc"},P_="en",wl={code:P_},fe=(t,e,i,a,r=t)=>{r.addEventListener(e,i,a),t.addEventListener("teardown",()=>{r.removeEventListener(e,i)},{once:!0})};function U_(t,e,i){e&&i>e&&(i=e);for(let a=0;a<t.length;a++)if(t.start(a)<=i&&t.end(a)>=i)return!0;return!1}var Kd=t=>{let e=t.indexOf("?");if(e<0)return[t];let i=t.slice(0,e),a=t.slice(e);return[i,a]},Do=t=>{let{type:e}=t;if(e){let i=e.toUpperCase();return Fd(i,Ic)?Ic[i]:e}return $_(t)},Am=t=>t==="VOD"?Q.ON_DEMAND:Q.LIVE,km=t=>t==="EVENT"?Number.POSITIVE_INFINITY:t==="VOD"?Number.NaN:0,$_=t=>{let{src:e}=t;if(!e)return"";let i="";try{i=new URL(e).pathname}catch{console.error("invalid url")}let a=i.lastIndexOf(".");if(a<0)return B_(t)?ti.M3U8:"";let r=i.slice(a+1).toUpperCase();return Fd(r,ti)?ti[r]:""},H_="mux.com",B_=({src:t,customDomain:e=H_})=>{let i;try{i=new URL(`${t}`)}catch{return!1}let a=i.protocol==="https:",r=i.hostname===`stream.${e}`.toLowerCase(),n=i.pathname.split("/"),s=n.length===2,o=!(n!=null&&n[1].includes("."));return a&&r&&s&&o},Fa=t=>{let e=(t??"").split(".")[1];if(e)try{let i=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(i).split("").map(function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}catch{return}},W_=({exp:t},e=Date.now())=>!t||t*1e3<e,F_=({sub:t},e)=>t!==e,K_=({aud:t},e)=>!t,V_=({aud:t},e)=>t!==e,Sm="en";function D(t,e=!0){var i,a;let r=e&&(a=(i=wl)==null?void 0:i[t])!=null?a:t,n=e?wl.code:Sm;return new q_(r,n)}var q_=class{constructor(t,e=(i=>(i=wl)!=null?i:Sm)()){this.message=t,this.locale=e}format(t){return this.message.replace(/\{(\w+)\}/g,(e,i)=>{var a;return(a=t[i])!=null?a:""})}toString(){return this.message}},Y_=Object.values(Sl),Rc=t=>typeof t=="boolean"||typeof t=="string"&&Y_.includes(t),G_=(t,e,i)=>{let{autoplay:a}=t,r=!1,n=!1,s=Rc(a)?a:!!a,o=()=>{r||fe(e,"playing",()=>{r=!0},{once:!0})};if(o(),fe(e,"loadstart",()=>{r=!1,o(),il(e,s)},{once:!0}),fe(e,"loadstart",()=>{i||(t.streamType&&t.streamType!==Q.UNKNOWN?n=t.streamType===Q.LIVE:n=!Number.isFinite(e.duration)),il(e,s)},{once:!0}),i&&i.once(B.Events.LEVEL_LOADED,(l,d)=>{var m;t.streamType&&t.streamType!==Q.UNKNOWN?n=t.streamType===Q.LIVE:n=(m=d.details.live)!=null?m:!1}),!s){let l=()=>{!n||Number.isFinite(t.startTime)||(i!=null&&i.liveSyncPosition?e.currentTime=i.liveSyncPosition:Number.isFinite(e.seekable.end(0))&&(e.currentTime=e.seekable.end(0)))};i&&fe(e,"play",()=>{e.preload==="metadata"?i.once(B.Events.LEVEL_UPDATED,l):l()},{once:!0})}return l=>{r||(s=Rc(l)?l:!!l,il(e,s))}},il=(t,e)=>{if(!e)return;let i=t.muted,a=()=>t.muted=i;switch(e){case Sl.ANY:t.play().catch(()=>{t.muted=!0,t.play().catch(a)});break;case Sl.MUTED:t.muted=!0,t.play().catch(a);break;default:t.play().catch(()=>{});break}},Q_=({preload:t,src:e},i,a)=>{let r=p=>{p!=null&&["","none","metadata","auto"].includes(p)?i.setAttribute("preload",p):i.removeAttribute("preload")};if(!a)return r(t),r;let n=!1,s=!1,o=a.config.maxBufferLength,l=a.config.maxBufferSize,d=p=>{r(p);let h=p??i.preload;s||h==="none"||(h==="metadata"?(a.config.maxBufferLength=1,a.config.maxBufferSize=1):(a.config.maxBufferLength=o,a.config.maxBufferSize=l),m())},m=()=>{!n&&e&&(n=!0,a.loadSource(e))};return fe(i,"play",()=>{s=!0,a.config.maxBufferLength=o,a.config.maxBufferSize=l,m()},{once:!0}),d(t),d};function z_(t,e){var i;if(!("videoTracks"in t))return;let a=new WeakMap;e.on(B.Events.MANIFEST_PARSED,function(l,d){o();let m=t.addVideoTrack("main");m.selected=!0;for(let[p,h]of d.levels.entries()){let u=m.addRendition(h.url[0],h.width,h.height,h.videoCodec,h.bitrate);a.set(h,`${p}`),u.id=`${p}`}}),e.on(B.Events.AUDIO_TRACKS_UPDATED,function(l,d){s();for(let m of d.audioTracks){let p=m.default?"main":"alternative",h=t.addAudioTrack(p,m.name,m.lang);h.id=`${m.id}`,m.default&&(h.enabled=!0)}}),t.audioTracks.addEventListener("change",()=>{var l;let d=+((l=[...t.audioTracks].find(p=>p.enabled))==null?void 0:l.id),m=e.audioTracks.map(p=>p.id);d!=e.audioTrack&&m.includes(d)&&(e.audioTrack=d)}),e.on(B.Events.LEVELS_UPDATED,function(l,d){var m;let p=t.videoTracks[(m=t.videoTracks.selectedIndex)!=null?m:0];if(!p)return;let h=d.levels.map(u=>a.get(u));for(let u of t.videoRenditions)u.id&&!h.includes(u.id)&&p.removeRendition(u)});let r=l=>{let d=l.target.selectedIndex;d!=e.nextLevel&&(e.nextLevel=d)};(i=t.videoRenditions)==null||i.addEventListener("change",r);let n=()=>{for(let l of t.videoTracks)t.removeVideoTrack(l)},s=()=>{for(let l of t.audioTracks)t.removeAudioTrack(l)},o=()=>{n(),s()};e.once(B.Events.DESTROYING,o)}var al=t=>"time"in t?t.time:t.startTime;function j_(t,e){e.on(B.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(r,{tracks:n})=>{n.forEach(s=>{var o,l;let d=(o=s.subtitleTrack)!=null?o:s.closedCaptions,m=e.subtitleTracks.findIndex(({lang:h,name:u,type:v})=>h==d?.lang&&u===s.label&&v.toLowerCase()===s.kind),p=((l=s._id)!=null?l:s.default)?"default":`${s.kind}${m}`;Vd(t,s.kind,s.label,d?.lang,p,s.default)})});let i=()=>{if(!e.subtitleTracks.length)return;let r=Array.from(t.textTracks).find(o=>o.id&&o.mode==="showing"&&["subtitles","captions"].includes(o.kind));if(!r)return;let n=e.subtitleTracks[e.subtitleTrack],s=n?n.default?"default":`${e.subtitleTracks[e.subtitleTrack].type.toLowerCase()}${e.subtitleTrack}`:void 0;if(e.subtitleTrack<0||r?.id!==s){let o=e.subtitleTracks.findIndex(({lang:l,name:d,type:m,default:p})=>r.id==="default"&&p||l==r.language&&d===r.label&&m.toLowerCase()===r.kind);e.subtitleTrack=o}r?.id===s&&r.cues&&Array.from(r.cues).forEach(o=>{r.addCue(o)})};t.textTracks.addEventListener("change",i),e.on(B.Events.CUES_PARSED,(r,{track:n,cues:s})=>{let o=t.textTracks.getTrackById(n);if(!o)return;let l=o.mode==="disabled";l&&(o.mode="hidden"),s.forEach(d=>{var m;(m=o.cues)!=null&&m.getCueById(d.id)||o.addCue(d)}),l&&(o.mode="disabled")}),e.once(B.Events.DESTROYING,()=>{t.textTracks.removeEventListener("change",i),t.querySelectorAll("track[data-removeondestroy]").forEach(r=>{r.remove()})});let a=()=>{Array.from(t.textTracks).forEach(r=>{var n,s;if(!["subtitles","caption"].includes(r.kind)&&(r.label==="thumbnails"||r.kind==="chapters")){if(!((n=r.cues)!=null&&n.length)){let o="track";r.kind&&(o+=`[kind="${r.kind}"]`),r.label&&(o+=`[label="${r.label}"]`);let l=t.querySelector(o),d=(s=l?.getAttribute("src"))!=null?s:"";l?.removeAttribute("src"),setTimeout(()=>{l?.setAttribute("src",d)},0)}r.mode!=="hidden"&&(r.mode="hidden")}})};e.once(B.Events.MANIFEST_LOADED,a),e.once(B.Events.MEDIA_ATTACHED,a)}function Vd(t,e,i,a,r,n){let s=document.createElement("track");return s.kind=e,s.label=i,a&&(s.srclang=a),r&&(s.id=r),n&&(s.default=!0),s.track.mode=["subtitles","captions"].includes(e)?"disabled":"hidden",s.setAttribute("data-removeondestroy",""),t.append(s),s.track}function Z_(t,e){let i=Array.prototype.find.call(t.querySelectorAll("track"),a=>a.track===e);i?.remove()}function yn(t,e,i){var a;return(a=Array.from(t.querySelectorAll("track")).find(r=>r.track.label===e&&r.track.kind===i))==null?void 0:a.track}async function wm(t,e,i,a){let r=yn(t,i,a);return r||(r=Vd(t,a,i),r.mode="hidden",await new Promise(n=>setTimeout(()=>n(void 0),0))),r.mode!=="hidden"&&(r.mode="hidden"),[...e].sort((n,s)=>al(s)-al(n)).forEach(n=>{var s,o;let l=n.value,d=al(n);if("endTime"in n&&n.endTime!=null)r?.addCue(new VTTCue(d,n.endTime,a==="chapters"?l:JSON.stringify(l??null)));else{let m=Array.prototype.findIndex.call(r?.cues,v=>v.startTime>=d),p=(s=r?.cues)==null?void 0:s[m],h=p?p.startTime:Number.isFinite(t.duration)?t.duration:Number.MAX_SAFE_INTEGER,u=(o=r?.cues)==null?void 0:o[m-1];u&&(u.endTime=d),r?.addCue(new VTTCue(d,h,a==="chapters"?l:JSON.stringify(l??null)))}}),t.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r}var qd="cuepoints",Im=Object.freeze({label:qd});async function Rm(t,e,i=Im){return wm(t,e,i.label,"metadata")}var Il=t=>({time:t.startTime,value:JSON.parse(t.text)});function X_(t,e={label:qd}){let i=yn(t,e.label,"metadata");return i!=null&&i.cues?Array.from(i.cues,a=>Il(a)):[]}function Cm(t,e={label:qd}){var i,a;let r=yn(t,e.label,"metadata");if(!((i=r?.activeCues)!=null&&i.length))return;if(r.activeCues.length===1)return Il(r.activeCues[0]);let{currentTime:n}=t,s=Array.prototype.find.call((a=r.activeCues)!=null?a:[],({startTime:o,endTime:l})=>o<=n&&l>n);return Il(s||r.activeCues[0])}async function J_(t,e=Im){return new Promise(i=>{fe(t,"loadstart",async()=>{let a=await Rm(t,[],e);fe(t,"cuechange",()=>{let r=Cm(t);if(r){let n=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:r});t.dispatchEvent(n)}},{},a),i(a)})})}var Yd="chapters",Lm=Object.freeze({label:Yd}),Rl=t=>({startTime:t.startTime,endTime:t.endTime,value:t.text});async function Dm(t,e,i=Lm){return wm(t,e,i.label,"chapters")}function eb(t,e={label:Yd}){var i;let a=yn(t,e.label,"chapters");return(i=a?.cues)!=null&&i.length?Array.from(a.cues,r=>Rl(r)):[]}function Mm(t,e={label:Yd}){var i,a;let r=yn(t,e.label,"chapters");if(!((i=r?.activeCues)!=null&&i.length))return;if(r.activeCues.length===1)return Rl(r.activeCues[0]);let{currentTime:n}=t,s=Array.prototype.find.call((a=r.activeCues)!=null?a:[],({startTime:o,endTime:l})=>o<=n&&l>n);return Rl(s||r.activeCues[0])}async function tb(t,e=Lm){return new Promise(i=>{fe(t,"loadstart",async()=>{let a=await Dm(t,[],e);fe(t,"cuechange",()=>{let r=Mm(t);if(r){let n=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:r});t.dispatchEvent(n)}},{},a),i(a)})})}function ib(t,e){if(e){let i=e.playingDate;if(i!=null)return new Date(i.getTime()-t.currentTime*1e3)}return typeof t.getStartDate=="function"?t.getStartDate():new Date(NaN)}function ab(t,e){if(e&&e.playingDate)return e.playingDate;if(typeof t.getStartDate=="function"){let i=t.getStartDate();return new Date(i.getTime()+t.currentTime*1e3)}return new Date(NaN)}var Qr={VIDEO:"v",THUMBNAIL:"t",STORYBOARD:"s",DRM:"d"},rb=t=>{if(t===te.VIDEO)return Qr.VIDEO;if(t===te.DRM)return Qr.DRM},nb=(t,e)=>{var i,a;let r=Lo(t),n=`${r}Token`;return(i=e.tokens)!=null&&i[r]?(a=e.tokens)==null?void 0:a[r]:Fd(n,e)?e[n]:void 0},ao=(t,e,i,a,r=!1,n=!(s=>(s=globalThis.navigator)==null?void 0:s.onLine)())=>{var s,o;if(n){let y=D("Your device appears to be offline",r),T,_=R.MEDIA_ERR_NETWORK,S=new R(y,_,!1,T);return S.errorCategory=e,S.muxCode=x.NETWORK_OFFLINE,S.data=t,S}let l="status"in t?t.status:t.code,d=Date.now(),m=R.MEDIA_ERR_NETWORK;if(l===200)return;let p=Lo(e),h=nb(e,i),u=rb(e),[v]=Kd((s=i.playbackId)!=null?s:"");if(!l||!v)return;let E=Fa(h);if(h&&!E){let y=D("The {tokenNamePrefix}-token provided is invalid or malformed.",r).format({tokenNamePrefix:p}),T=D("Compact JWT string: {token}",r).format({token:h}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_MALFORMED,_.data=t,_}if(l>=500){let y=new R("",m,a??!0);return y.errorCategory=e,y.muxCode=x.NETWORK_UNKNOWN_ERROR,y}if(l===403)if(E){if(W_(E,d)){let y={timeStyle:"medium",dateStyle:"medium"},T=D("The video’s secured {tokenNamePrefix}-token has expired.",r).format({tokenNamePrefix:p}),_=D("Expired at: {expiredDate}. Current time: {currentDate}.",r).format({expiredDate:new Intl.DateTimeFormat("en",y).format((o=E.exp)!=null?o:0*1e3),currentDate:new Intl.DateTimeFormat("en",y).format(d)}),S=new R(T,m,!0,_);return S.errorCategory=e,S.muxCode=x.NETWORK_TOKEN_EXPIRED,S.data=t,S}if(F_(E,v)){let y=D("The video’s playback ID does not match the one encoded in the {tokenNamePrefix}-token.",r).format({tokenNamePrefix:p}),T=D("Specified playback ID: {playbackId} and the playback ID encoded in the {tokenNamePrefix}-token: {tokenPlaybackId}",r).format({tokenNamePrefix:p,playbackId:v,tokenPlaybackId:E.sub}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_SUB_MISMATCH,_.data=t,_}if(K_(E)){let y=D("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:p}),T=D("The {tokenNamePrefix}-token has no aud value. aud value should be {expectedAud}.",r).format({tokenNamePrefix:p,expectedAud:u}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_AUD_MISSING,_.data=t,_}if(V_(E,u)){let y=D("The {tokenNamePrefix}-token is formatted with incorrect information.",r).format({tokenNamePrefix:p}),T=D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.",r).format({tokenNamePrefix:p,expectedAud:u,aud:E.aud}),_=new R(y,m,!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_AUD_MISMATCH,_.data=t,_}}else{let y=D("Authorization error trying to access this {category} URL. If this is a signed URL, you might need to provide a {tokenNamePrefix}-token.",r).format({tokenNamePrefix:p,category:e}),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_TOKEN_MISSING,_.data=t,_}if(l===412){let y=D("This playback-id may belong to a live stream that is not currently active or an asset that is not ready.",r),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_NOT_READY,_.streamType=i.streamType===Q.LIVE?"live":i.streamType===Q.ON_DEMAND?"on-demand":"unknown",_.data=t,_}if(l===404){let y=D("This URL or playback-id does not exist. You may have used an Asset ID or an ID from a different resource.",r),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_NOT_FOUND,_.data=t,_}if(l===400){let y=D("The URL or playback-id was invalid. You may have used an invalid value as a playback-id."),T=D("Specified playback ID: {playbackId}",r).format({playbackId:v}),_=new R(y,m,a??!0,T);return _.errorCategory=e,_.muxCode=x.NETWORK_INVALID_URL,_.data=t,_}let g=new R("",m,a??!0);return g.errorCategory=e,g.muxCode=x.NETWORK_UNKNOWN_ERROR,g.data=t,g},Cc=B.DefaultConfig.capLevelController,sb={"720p":921600,"1080p":2073600,"1440p":4194304,"2160p":8294400};function ob(t){let e=t.toLowerCase().trim();return sb[e]}var Cl=class Sr extends Cc{constructor(e){super(e)}static setMaxAutoResolution(e,i){i?Sr.maxAutoResolution.set(e,i):Sr.maxAutoResolution.delete(e)}getMaxAutoResolution(){var e;let i=this.hls;return(e=Sr.maxAutoResolution.get(i))!=null?e:void 0}get levels(){var e;return(e=this.hls.levels)!=null?e:[]}getValidLevels(e){return this.levels.filter((i,a)=>this.isLevelAllowed(i)&&a<=e)}getMaxLevelCapped(e){let i=this.getValidLevels(e),a=this.getMaxAutoResolution();if(!a)return super.getMaxLevel(e);let r=ob(a);if(!r)return super.getMaxLevel(e);let n=i.filter(l=>l.width*l.height<=r),s=n.findIndex(l=>l.width*l.height===r);if(s!==-1){let l=n[s];return i.findIndex(d=>d===l)}if(n.length===0)return 0;let o=n[n.length-1];return i.findIndex(l=>l===o)}getMaxLevel(e){if(this.getMaxAutoResolution()!==void 0)return this.getMaxLevelCapped(e);let i=super.getMaxLevel(e),a=this.getValidLevels(e);if(!a[i])return i;let r=Math.min(a[i].width,a[i].height),n=Sr.minMaxResolution;return r>=n?i:Cc.getMaxLevelByMediaSize(a,n*(16/9),n)}};Cl.minMaxResolution=720,Cl.maxAutoResolution=new WeakMap;var lb=Cl,rl=lb,qn={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine"},db=t=>{if(t.includes("fps"))return qn.FAIRPLAY;if(t.includes("playready"))return qn.PLAYREADY;if(t.includes("widevine"))return qn.WIDEVINE},ub=t=>{let e=t.split(`
23
23
  `).find((i,a,r)=>a&&r[a-1].startsWith("#EXT-X-STREAM-INF"));return fetch(e).then(i=>i.status!==200?Promise.reject(i):i.text())},cb=t=>{let e=t.split(`
24
24
  `).filter(a=>a.startsWith("#EXT-X-SESSION-DATA"));if(!e.length)return{};let i={};for(let a of e){let r=mb(a),n=r["DATA-ID"];n&&(i[n]={...r})}return{sessionData:i}},hb=/([A-Z0-9-]+)="?(.*?)"?(?:,|$)/g;function mb(t){let e=[...t.matchAll(hb)];return Object.fromEntries(e.map(([,i,a])=>[i,a]))}var pb=t=>{var e,i,a;let r=t.split(`
25
- `),n=(i=((e=r.find(d=>d.startsWith("#EXT-X-PLAYLIST-TYPE")))!=null?e:"").split(":")[1])==null?void 0:i.trim(),s=Am(n),o=km(n),l;if(s===Q.LIVE){let d=r.find(m=>m.startsWith("#EXT-X-PART-INF"));if(d)l=+d.split(":")[1].split("=")[1]*2;else{let m=r.find(h=>h.startsWith("#EXT-X-TARGETDURATION")),p=(a=m?.split(":"))==null?void 0:a[1];l=+(p??6)*3}}return{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}},vb=async(t,e)=>{if(e===ti.MP4)return{streamType:Q.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(e===ti.M3U8){let i=await fetch(t);if(!i.ok)return Promise.reject(i);let a=await i.text(),r=await ub(a);return{...cb(a),...pb(r)}}return console.error(`Media type ${e} is an unrecognized or unsupported type for src ${t}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0,sessionData:void 0}},fb=async(t,e,i=Do({src:t}))=>{var a,r,n,s;let{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:m}=await vb(t,i),p=m?.["com.apple.hls.chapters"];(p!=null&&p.URI||p!=null&&p.VALUE.toLocaleLowerCase().startsWith("http"))&&Gd((a=p.URI)!=null?a:p.VALUE,e),((r=de.get(e))!=null?r:{}).liveEdgeStartOffset=d,((n=de.get(e))!=null?n:{}).targetLiveWindow=l,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((s=de.get(e))!=null?s:{}).streamType=o,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Gd=async(t,e)=>{var i,a;try{let r=await fetch(t);if(!r.ok)throw new Error(`Failed to fetch Mux metadata: ${r.status} ${r.statusText}`);let n=await r.json(),s={};if(!((i=n?.[0])!=null&&i.metadata))return;for(let l of n[0].metadata)l.key&&l.value&&(s[l.key]=l.value);((a=de.get(e))!=null?a:{}).metadata=s;let o=new CustomEvent("muxmetadata");e.dispatchEvent(o)}catch(r){console.error(r)}},Eb=t=>{var e;let i=t.type,a=Am(i),r=km(i),n,s=!!((e=t.partList)!=null&&e.length);return a===Q.LIVE&&(n=s?t.partTarget*2:t.targetduration*3),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:s}},_b=(t,e,i)=>{var a,r,n,s,o,l,d,m;let{streamType:p,targetLiveWindow:h,liveEdgeStartOffset:u,lowLatency:v}=Eb(t);if(p===Q.LIVE){v?(i.config.backBufferLength=(a=i.userConfig.backBufferLength)!=null?a:4,i.config.maxFragLookUpTolerance=(r=i.userConfig.maxFragLookUpTolerance)!=null?r:.001,i.config.abrBandWidthUpFactor=(n=i.userConfig.abrBandWidthUpFactor)!=null?n:i.config.abrBandWidthFactor):i.config.backBufferLength=(s=i.userConfig.backBufferLength)!=null?s:8;let E=Object.freeze({get length(){return e.seekable.length},start(g){return e.seekable.start(g)},end(g){var y;return g>this.length||g<0||Number.isFinite(e.duration)?e.seekable.end(g):(y=i.liveSyncPosition)!=null?y:e.seekable.end(g)}});((o=de.get(e))!=null?o:{}).seekable=E}((l=de.get(e))!=null?l:{}).liveEdgeStartOffset=u,((d=de.get(e))!=null?d:{}).targetLiveWindow=h,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((m=de.get(e))!=null?m:{}).streamType=p,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Lc,Dc,xm=(Dc=(Lc=globalThis?.navigator)==null?void 0:Lc.userAgent)!=null?Dc:"",Mc,xc,Oc,bb=(Oc=(xc=(Mc=globalThis?.navigator)==null?void 0:Mc.userAgentData)==null?void 0:xc.platform)!=null?Oc:"",gb=xm.toLowerCase().includes("android")||["x11","android"].some(t=>bb.toLowerCase().includes(t)),yb=t=>/^((?!chrome|android).)*safari/i.test(xm)&&!!t.canPlayType("application/vnd.apple.mpegurl"),de=new WeakMap,ii="mux.com",Nc,Pc,Om=(Pc=(Nc=B).isSupported)==null?void 0:Pc.call(Nc),Tb=t=>gb||!yb(t),Qd=()=>{if(typeof window<"u")return Wd.utils.now()},Ab=Wd.utils.generateUUID,Ll=({playbackId:t,customDomain:e=ii,maxResolution:i,minResolution:a,renditionOrder:r,programStartTime:n,programEndTime:s,assetStartTime:o,assetEndTime:l,playbackToken:d,tokens:{playback:m=d}={},extraSourceParams:p={}}={})=>{if(!t)return;let[h,u=""]=Kd(t),v=new URL(`https://stream.${e}/${h}.m3u8${u}`);return m||v.searchParams.has("token")?(v.searchParams.forEach((E,g)=>{g!="token"&&v.searchParams.delete(g)}),m&&v.searchParams.set("token",m)):(i&&v.searchParams.set("max_resolution",i),a&&(v.searchParams.set("min_resolution",a),i&&+i.slice(0,-1)<+a.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",a,"maxResolution",i)),r&&v.searchParams.set("rendition_order",r),n&&v.searchParams.set("program_start_time",`${n}`),s&&v.searchParams.set("program_end_time",`${s}`),o&&v.searchParams.set("asset_start_time",`${o}`),l&&v.searchParams.set("asset_end_time",`${l}`),Object.entries(p).forEach(([E,g])=>{g!=null&&v.searchParams.set(E,g)})),v.toString()},Mo=t=>{if(!t)return;let[e]=t.split("?");return e||void 0},zd=t=>{if(!t||!t.startsWith("https://stream."))return;let[e]=new URL(t).pathname.slice(1).split(/\.m3u8|\//);return e||void 0},kb=t=>{var e,i,a;return(e=t?.metadata)!=null&&e.video_id?t.metadata.video_id:Fm(t)&&(a=(i=Mo(t.playbackId))!=null?i:zd(t.src))!=null?a:t.src},Nm=t=>{var e;return(e=de.get(t))==null?void 0:e.error},Sb=t=>{var e;return(e=de.get(t))==null?void 0:e.metadata},Dl=t=>{var e,i;return(i=(e=de.get(t))==null?void 0:e.streamType)!=null?i:Q.UNKNOWN},wb=t=>{var e,i;return(i=(e=de.get(t))==null?void 0:e.targetLiveWindow)!=null?i:Number.NaN},jd=t=>{var e,i;return(i=(e=de.get(t))==null?void 0:e.seekable)!=null?i:t.seekable},Ib=t=>{var e;let i=(e=de.get(t))==null?void 0:e.liveEdgeStartOffset;if(typeof i!="number")return Number.NaN;let a=jd(t);return a.length?a.end(a.length-1)-i:Number.NaN},Zd=.034,Rb=(t,e,i=Zd)=>Math.abs(t-e)<=i,Pm=(t,e,i=Zd)=>t>e||Rb(t,e,i),Cb=(t,e=Zd)=>t.paused&&Pm(t.currentTime,t.duration,e),Um=(t,e)=>{var i,a,r;if(!e||!t.buffered.length)return;if(t.readyState>2)return!1;let n=e.currentLevel>=0?(a=(i=e.levels)==null?void 0:i[e.currentLevel])==null?void 0:a.details:(r=e.levels.find(p=>!!p.details))==null?void 0:r.details;if(!n||n.live)return;let{fragments:s}=n;if(!(s!=null&&s.length))return;if(t.currentTime<t.duration-(n.targetduration+.5))return!1;let o=s[s.length-1];if(t.currentTime<=o.start)return!1;let l=o.start+o.duration/2,d=t.buffered.start(t.buffered.length-1),m=t.buffered.end(t.buffered.length-1);return l>d&&l<m},$m=(t,e)=>t.ended||t.loop?t.ended:e&&Um(t,e)?!0:Cb(t),Lb=(t,e,i)=>{Hm(e,i,t);let{metadata:a={}}=t,{view_session_id:r=Ab()}=a,n=kb(t);a.view_session_id=r,a.video_id=n,t.metadata=a;let s=m=>{var p;(p=e.mux)==null||p.emit("hb",{view_drm_type:m})};t.drmTypeCb=s,de.set(e,{retryCount:0});let o=Db(t,e),l=Q_(t,e,o);t!=null&&t.muxDataKeepSession&&e!=null&&e.mux&&!e.mux.deleted?o&&e.mux.addHLSJS({hlsjs:o,Hls:o?B:void 0}):Ub(t,e,o),$b(t,e,o),J_(e),tb(e);let d=G_(t,e,o);return{engine:o,setAutoplay:d,setPreload:l}},Hm=(t,e,i)=>{let a=e?.engine;t!=null&&t.mux&&!t.mux.deleted&&(i!=null&&i.muxDataKeepSession?a&&t.mux.removeHLSJS():(t.mux.destroy(),delete t.mux)),a&&(a.detachMedia(),a.destroy()),t&&(t.hasAttribute("src")&&(t.removeAttribute("src"),t.load()),t.removeEventListener("error",Vm),t.removeEventListener("error",Ml),t.removeEventListener("durationchange",Km),de.delete(t),t.dispatchEvent(new Event("teardown")))};function Bm(t,e){var i;let a=Do(t);if(a!==ti.M3U8)return!0;let r=!a||((i=e.canPlayType(a))!=null?i:!0),{preferPlayback:n}=t,s=n===Wt.MSE,o=n===Wt.NATIVE,l=Om&&(s||Tb(e));return r&&(o||!l)}var Db=(t,e)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={},maxAutoResolution:l}=t,d=Do(t)===ti.M3U8,m=Bm(t,e);if(d&&!m&&Om){let p={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0},h=Mb(a),u=xb(t),v=[Ar.QUERY,Ar.HEADER].includes(s)?{useHeaders:s===Ar.HEADER,sessionId:n?.view_session_id,contentId:n?.video_id}:void 0,E=o.capLevelToPlayerSize==null?{capLevelController:rl}:{},g=new B({debug:i,startPosition:r,cmcd:v,xhrSetup:(y,T)=>{var _,S;if(s&&s!==Ar.QUERY)return;let C=new URL(T);if(!C.searchParams.has("CMCD"))return;let N=((S=(_=C.searchParams.get("CMCD"))==null?void 0:_.split(","))!=null?S:[]).filter($=>$.startsWith("sid")||$.startsWith("cid")).join(",");C.searchParams.set("CMCD",N),y.open("GET",C)},...E,...p,...h,...u,...o});return E.capLevelController===rl&&l!==void 0&&rl.setMaxAutoResolution(g,l),g.on(B.Events.MANIFEST_PARSED,async function(y,T){var _,S;let C=(_=T.sessionData)==null?void 0:_["com.apple.hls.chapters"];(C!=null&&C.URI||C!=null&&C.VALUE.toLocaleLowerCase().startsWith("http"))&&Gd((S=C?.URI)!=null?S:C?.VALUE,e)}),g}},Mb=t=>t===Q.LIVE?{backBufferLength:8}:{},xb=t=>{let{tokens:{drm:e}={},playbackId:i,drmTypeCb:a}=t,r=Mo(i);return!e||!r?{}:{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:qn(t,"fairplay"),serverCertificateUrl:Wm(t,"fairplay")},"com.widevine.alpha":{licenseUrl:qn(t,"widevine")},"com.microsoft.playready":{licenseUrl:qn(t,"playready")}},requestMediaKeySystemAccessFunc:(n,s)=>(n==="com.widevine.alpha"&&(s=[...s.map(o=>{var l;let d=(l=o.videoCapabilities)==null?void 0:l.map(m=>({...m,robustness:"HW_SECURE_ALL"}));return{...o,videoCapabilities:d}}),...s]),navigator.requestMediaKeySystemAccess(n,s).then(o=>{let l=db(n);return a?.(l),o}))}},Ob=async t=>{let e=await fetch(t);return e.status!==200?Promise.reject(e):await e.arrayBuffer()},Nb=async(t,e)=>{let i=await fetch(e,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:t});if(i.status!==200)return Promise.reject(i);let a=await i.arrayBuffer();return new Uint8Array(a)},Pb=(t,e)=>{let i=async n=>{let s=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[n],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(l=>{var d;return(d=t.drmTypeCb)==null||d.call(t,Vn.FAIRPLAY),l}).catch(()=>{let l=D("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),d=new R(l,R.MEDIA_ERR_ENCRYPTED,!0);d.errorCategory=te.DRM,d.muxCode=x.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,Ze(e,d)});if(!s)return;let o=await s.createMediaKeys();try{let l=await Ob(Wm(t,"fairplay")).catch(d=>{if(d instanceof Response){let m=ao(d,te.DRM,t);return console.error("mediaError",m?.message,m?.context),m?Promise.reject(m):Promise.reject(new Error("Unexpected error in app cert request"))}return Promise.reject(d)});await o.setServerCertificate(l).catch(()=>{let d=D("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),m=new R(d,R.MEDIA_ERR_ENCRYPTED,!0);return m.errorCategory=te.DRM,m.muxCode=x.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(m)})}catch(l){Ze(e,l);return}await e.setMediaKeys(o)},a=n=>{let s;if(n==="internal-error"){let o=D("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");s=new R(o,R.MEDIA_ERR_ENCRYPTED,!0),s.errorCategory=te.DRM,s.muxCode=x.ENCRYPTED_CDM_ERROR}else if(n==="output-restricted"||n==="output-downscaled"){let o=D("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");s=new R(o,R.MEDIA_ERR_ENCRYPTED,!1),s.errorCategory=te.DRM,s.muxCode=x.ENCRYPTED_OUTPUT_RESTRICTED}s&&Ze(e,s)},r=async(n,s)=>{let o=e.mediaKeys.createSession(),l=()=>{o.keyStatuses.forEach(m=>a(m))},d=async m=>{let p=m.message;try{let h=await Nb(p,qn(t,"fairplay"));try{await o.update(h)}catch{let u=D("Failed to update DRM license. This may be an issue with the player or your protected content."),v=new R(u,R.MEDIA_ERR_ENCRYPTED,!0);v.errorCategory=te.DRM,v.muxCode=x.ENCRYPTED_UPDATE_LICENSE_FAILED,Ze(e,v)}}catch(h){if(h instanceof Response){let u=ao(h,te.DRM,t);if(console.error("mediaError",u?.message,u?.context),u){Ze(e,u);return}console.error("Unexpected error in license key request",h);return}console.error(h)}};o.addEventListener("keystatuseschange",l),o.addEventListener("message",d),e.addEventListener("teardown",()=>{o.removeEventListener("keystatuseschange",l),o.removeEventListener("message",d),o.close()},{once:!0}),await o.generateRequest(n,s).catch(m=>{console.error("Failed to generate license request",m);let p=D("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),h=new R(p,R.MEDIA_ERR_ENCRYPTED,!0);return h.errorCategory=te.DRM,h.muxCode=x.ENCRYPTED_GENERATE_REQUEST_FAILED,Promise.reject(h)})};fe(e,"encrypted",async n=>{try{let s=n.initDataType;if(s!=="skd"){console.error(`Received unexpected initialization data type "${s}"`);return}e.mediaKeys||await i(s);let o=n.initData;if(o==null){console.error(`Could not start encrypted playback due to missing initData in ${n.type} event`);return}await r(s,o)}catch(s){Ze(e,s);return}})},qn=({playbackId:t,tokens:{drm:e}={},customDomain:i=ii},a)=>{let r=Mo(t);return`https://license.${i.toLocaleLowerCase().endsWith(ii)?i:ii}/license/${a}/${r}?token=${e}`},Wm=({playbackId:t,tokens:{drm:e}={},customDomain:i=ii},a)=>{let r=Mo(t);return`https://license.${i.toLocaleLowerCase().endsWith(ii)?i:ii}/appcert/${a}/${r}?token=${e}`},Fm=({playbackId:t,src:e,customDomain:i})=>{if(t)return!0;if(typeof e!="string")return!1;let a=window?.location.href,r=new URL(e,a).hostname.toLocaleLowerCase();return r.includes(ii)||!!i&&r.includes(i.toLocaleLowerCase())},Ub=(t,e,i)=>{var a;let{envKey:r,disableTracking:n,muxDataSDK:s=Wd,muxDataSDKOptions:o={}}=t,l=Fm(t);if(!n&&(r||l)){let{playerInitTime:d,playerSoftwareName:m,playerSoftwareVersion:p,beaconCollectionDomain:h,debug:u,disableCookies:v}=t,E={...t.metadata,video_title:((a=t?.metadata)==null?void 0:a.video_title)||void 0},g=y=>typeof y.player_error_code=="string"?!1:typeof t.errorTranslator=="function"?t.errorTranslator(y):y;s.monitor(e,{debug:u,beaconCollectionDomain:h,hlsjs:i,Hls:i?B:void 0,automaticErrorTracking:!1,errorTranslator:g,disableCookies:v,...o,data:{...r?{env_key:r}:{},player_software_name:m,player_software:m,player_software_version:p,player_init_time:d,...E}})}},$b=(t,e,i)=>{var a,r;let n=Bm(t,e),{src:s,customDomain:o=ii}=t,l=()=>{e.ended||t.disablePseudoEnded||!$m(e,i)||(Um(e,i)?e.currentTime=e.buffered.end(e.buffered.length-1):e.dispatchEvent(new Event("ended")))},d,m,p=()=>{let h=jd(e),u,v;h.length>0&&(u=h.start(0),v=h.end(0)),(m!==v||d!==u)&&e.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),d=u,m=v};if(fe(e,"durationchange",p),e&&n){let h=Do(t);if(typeof s=="string"){if(s.endsWith(".mp4")&&s.includes(o)){let E=zd(s),g=new URL(`https://stream.${o}/${E}/metadata.json`);Gd(g.toString(),e)}let u=()=>{if(Dl(e)!==Q.LIVE||Number.isFinite(e.duration))return;let E=setInterval(p,1e3);e.addEventListener("teardown",()=>{clearInterval(E)},{once:!0}),fe(e,"durationchange",()=>{Number.isFinite(e.duration)&&clearInterval(E)})},v=async()=>fb(s,e,h).then(u).catch(E=>{if(E instanceof Response){let g=ao(E,te.VIDEO,t);if(g){Ze(e,g);return}}});if(e.preload==="none"){let E=()=>{v(),e.removeEventListener("loadedmetadata",g)},g=()=>{v(),e.removeEventListener("play",E)};fe(e,"play",E,{once:!0}),fe(e,"loadedmetadata",g,{once:!0})}else v();(a=t.tokens)!=null&&a.drm?Pb(t,e):fe(e,"encrypted",()=>{let E=D("Attempting to play DRM-protected content without providing a DRM token."),g=new R(E,R.MEDIA_ERR_ENCRYPTED,!0);g.errorCategory=te.DRM,g.muxCode=x.ENCRYPTED_MISSING_TOKEN,Ze(e,g)},{once:!0}),e.setAttribute("src",s),t.startTime&&(((r=de.get(e))!=null?r:{}).startTime=t.startTime,e.addEventListener("durationchange",Km,{once:!0}))}else e.removeAttribute("src");e.addEventListener("error",Vm),e.addEventListener("error",Ml),e.addEventListener("emptied",()=>{e.querySelectorAll("track[data-removeondestroy]").forEach(u=>{u.remove()})},{once:!0}),fe(e,"pause",l),fe(e,"seeked",l),fe(e,"play",()=>{e.ended||Pm(e.currentTime,e.duration)&&(e.currentTime=e.seekable.length?e.seekable.start(0):0)})}else i&&s?(i.once(B.Events.LEVEL_LOADED,(h,u)=>{_b(u.details,e,i),p(),Dl(e)===Q.LIVE&&!Number.isFinite(e.duration)&&(i.on(B.Events.LEVEL_UPDATED,p),fe(e,"durationchange",()=>{Number.isFinite(e.duration)&&i.off(B.Events.LEVELS_UPDATED,p)}))}),i.on(B.Events.ERROR,(h,u)=>{var v,E;let g=Hb(u,t);if(g.muxCode===x.NETWORK_NOT_READY){let y=(v=de.get(e))!=null?v:{},T=(E=y.retryCount)!=null?E:0;if(T<6){let _=T===0?5e3:6e4,S=new R(`Retrying in ${_/1e3} seconds...`,g.code,g.fatal);Object.assign(S,g),Ze(e,S),setTimeout(()=>{y.retryCount=T+1,u.details==="manifestLoadError"&&u.url&&i.loadSource(u.url)},_);return}else{y.retryCount=0;let _=new R('Try again later or <a href="#" onclick="window.location.reload(); return false;" style="color: #4a90e2;">click here to retry</a>',g.code,g.fatal);Object.assign(_,g),Ze(e,_);return}}Ze(e,g)}),i.on(B.Events.MANIFEST_LOADED,()=>{let h=de.get(e);h&&h.error&&(h.error=null,h.retryCount=0,e.dispatchEvent(new Event("emptied")),e.dispatchEvent(new Event("loadstart")))}),e.addEventListener("error",Ml),fe(e,"waiting",l),z_(t,i),j_(e,i),i.attachMedia(e)):console.error("It looks like the video you're trying to play will not work on this system! If possible, try upgrading to the newest versions of your browser or software.")};function Km(t){var e;let i=t.target,a=(e=de.get(i))==null?void 0:e.startTime;if(a&&U_(i.seekable,i.duration,a)){let r=i.preload==="auto";r&&(i.preload="none"),i.currentTime=a,r&&(i.preload="auto")}}async function Vm(t){if(!t.isTrusted)return;t.stopImmediatePropagation();let e=t.target;if(!(e!=null&&e.error))return;let{message:i,code:a}=e.error,r=new R(i,a);if(e.src&&a===R.MEDIA_ERR_SRC_NOT_SUPPORTED&&e.readyState===HTMLMediaElement.HAVE_NOTHING){setTimeout(()=>{var n;let s=(n=Nm(e))!=null?n:e.error;s?.code===R.MEDIA_ERR_SRC_NOT_SUPPORTED&&Ze(e,r)},500);return}if(e.src&&(a!==R.MEDIA_ERR_DECODE||a!==void 0))try{let{status:n}=await fetch(e.src);r.data={response:{code:n}}}catch{}Ze(e,r)}function Ze(t,e){var i;e.fatal&&(((i=de.get(t))!=null?i:{}).error=e,t.dispatchEvent(new CustomEvent("error",{detail:e})))}function Ml(t){var e,i;if(!(t instanceof CustomEvent)||!(t.detail instanceof R))return;let a=t.target,r=t.detail;!r||!r.fatal||(((e=de.get(a))!=null?e:{}).error=r,(i=a.mux)==null||i.emit("error",{player_error_code:r.code,player_error_message:r.message,player_error_context:r.context}))}var Hb=(t,e)=>{var i,a,r;t.fatal?console.error("getErrorFromHlsErrorData()",t):e.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",t);let n={[B.ErrorTypes.NETWORK_ERROR]:R.MEDIA_ERR_NETWORK,[B.ErrorTypes.MEDIA_ERROR]:R.MEDIA_ERR_DECODE,[B.ErrorTypes.KEY_SYSTEM_ERROR]:R.MEDIA_ERR_ENCRYPTED},s=m=>[B.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,B.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(m.details)?R.MEDIA_ERR_NETWORK:n[m.type],o=m=>{if(m.type===B.ErrorTypes.KEY_SYSTEM_ERROR)return te.DRM;if(m.type===B.ErrorTypes.NETWORK_ERROR)return te.VIDEO},l,d=s(t);if(d===R.MEDIA_ERR_NETWORK&&t.response){let m=(i=o(t))!=null?i:te.VIDEO;l=(a=ao(t.response,m,e,t.fatal))!=null?a:new R("",d,t.fatal)}else if(d===R.MEDIA_ERR_ENCRYPTED)if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE){let m=D("Attempting to play DRM-protected content without providing a DRM token.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_MISSING_TOKEN}else if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_ACCESS){let m=D("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM}else if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_SESSION){let m=D("Failed to generate a DRM license request. This may be an issue with the player or your protected content.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,!0),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_GENERATE_REQUEST_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED){let m=D("Failed to update DRM license. This may be an issue with the player or your protected content.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UPDATE_LICENSE_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED){let m=D("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UPDATE_SERVER_CERT_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR){let m=D("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_CDM_ERROR}else if(t.details===B.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED){let m=D("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,!1),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_OUTPUT_RESTRICTED}else l=new R(t.error.message,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_ERROR;else l=new R("",d,t.fatal);return l.context||(l.context=`${t.url?`url: ${t.url}
25
+ `),n=(i=((e=r.find(d=>d.startsWith("#EXT-X-PLAYLIST-TYPE")))!=null?e:"").split(":")[1])==null?void 0:i.trim(),s=Am(n),o=km(n),l;if(s===Q.LIVE){let d=r.find(m=>m.startsWith("#EXT-X-PART-INF"));if(d)l=+d.split(":")[1].split("=")[1]*2;else{let m=r.find(h=>h.startsWith("#EXT-X-TARGETDURATION")),p=(a=m?.split(":"))==null?void 0:a[1];l=+(p??6)*3}}return{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}},vb=async(t,e)=>{if(e===ti.MP4)return{streamType:Q.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0,sessionData:void 0};if(e===ti.M3U8){let i=await fetch(t);if(!i.ok)return Promise.reject(i);let a=await i.text(),r=await ub(a);return{...cb(a),...pb(r)}}return console.error(`Media type ${e} is an unrecognized or unsupported type for src ${t}.`),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0,sessionData:void 0}},fb=async(t,e,i=Do({src:t}))=>{var a,r,n,s;let{streamType:o,targetLiveWindow:l,liveEdgeStartOffset:d,sessionData:m}=await vb(t,i),p=m?.["com.apple.hls.chapters"];(p!=null&&p.URI||p!=null&&p.VALUE.toLocaleLowerCase().startsWith("http"))&&Gd((a=p.URI)!=null?a:p.VALUE,e),((r=de.get(e))!=null?r:{}).liveEdgeStartOffset=d,((n=de.get(e))!=null?n:{}).targetLiveWindow=l,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((s=de.get(e))!=null?s:{}).streamType=o,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Gd=async(t,e)=>{var i,a;try{let r=await fetch(t);if(!r.ok)throw new Error(`Failed to fetch Mux metadata: ${r.status} ${r.statusText}`);let n=await r.json(),s={};if(!((i=n?.[0])!=null&&i.metadata))return;for(let l of n[0].metadata)l.key&&l.value&&(s[l.key]=l.value);((a=de.get(e))!=null?a:{}).metadata=s;let o=new CustomEvent("muxmetadata");e.dispatchEvent(o)}catch(r){console.error(r)}},Eb=t=>{var e;let i=t.type,a=Am(i),r=km(i),n,s=!!((e=t.partList)!=null&&e.length);return a===Q.LIVE&&(n=s?t.partTarget*2:t.targetduration*3),{streamType:a,targetLiveWindow:r,liveEdgeStartOffset:n,lowLatency:s}},_b=(t,e,i)=>{var a,r,n,s,o,l,d,m;let{streamType:p,targetLiveWindow:h,liveEdgeStartOffset:u,lowLatency:v}=Eb(t);if(p===Q.LIVE){v?(i.config.backBufferLength=(a=i.userConfig.backBufferLength)!=null?a:4,i.config.maxFragLookUpTolerance=(r=i.userConfig.maxFragLookUpTolerance)!=null?r:.001,i.config.abrBandWidthUpFactor=(n=i.userConfig.abrBandWidthUpFactor)!=null?n:i.config.abrBandWidthFactor):i.config.backBufferLength=(s=i.userConfig.backBufferLength)!=null?s:8;let E=Object.freeze({get length(){return e.seekable.length},start(g){return e.seekable.start(g)},end(g){var y;return g>this.length||g<0||Number.isFinite(e.duration)?e.seekable.end(g):(y=i.liveSyncPosition)!=null?y:e.seekable.end(g)}});((o=de.get(e))!=null?o:{}).seekable=E}((l=de.get(e))!=null?l:{}).liveEdgeStartOffset=u,((d=de.get(e))!=null?d:{}).targetLiveWindow=h,e.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),((m=de.get(e))!=null?m:{}).streamType=p,e.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},Lc,Dc,xm=(Dc=(Lc=globalThis?.navigator)==null?void 0:Lc.userAgent)!=null?Dc:"",Mc,xc,Oc,bb=(Oc=(xc=(Mc=globalThis?.navigator)==null?void 0:Mc.userAgentData)==null?void 0:xc.platform)!=null?Oc:"",gb=xm.toLowerCase().includes("android")||["x11","android"].some(t=>bb.toLowerCase().includes(t)),yb=t=>/^((?!chrome|android).)*safari/i.test(xm)&&!!t.canPlayType("application/vnd.apple.mpegurl"),de=new WeakMap,ii="mux.com",Nc,Pc,Om=(Pc=(Nc=B).isSupported)==null?void 0:Pc.call(Nc),Tb=t=>gb||!yb(t),Qd=()=>{if(typeof window<"u")return Wd.utils.now()},Ab=Wd.utils.generateUUID,Ll=({playbackId:t,customDomain:e=ii,maxResolution:i,minResolution:a,renditionOrder:r,programStartTime:n,programEndTime:s,assetStartTime:o,assetEndTime:l,playbackToken:d,tokens:{playback:m=d}={},extraSourceParams:p={}}={})=>{if(!t)return;let[h,u=""]=Kd(t),v=new URL(`https://stream.${e}/${h}.m3u8${u}`);return m||v.searchParams.has("token")?(v.searchParams.forEach((E,g)=>{g!="token"&&v.searchParams.delete(g)}),m&&v.searchParams.set("token",m)):(i&&v.searchParams.set("max_resolution",i),a&&(v.searchParams.set("min_resolution",a),i&&+i.slice(0,-1)<+a.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",a,"maxResolution",i)),r&&v.searchParams.set("rendition_order",r),n&&v.searchParams.set("program_start_time",`${n}`),s&&v.searchParams.set("program_end_time",`${s}`),o&&v.searchParams.set("asset_start_time",`${o}`),l&&v.searchParams.set("asset_end_time",`${l}`),Object.entries(p).forEach(([E,g])=>{g!=null&&v.searchParams.set(E,g)})),v.toString()},Mo=t=>{if(!t)return;let[e]=t.split("?");return e||void 0},zd=t=>{if(!t||!t.startsWith("https://stream."))return;let[e]=new URL(t).pathname.slice(1).split(/\.m3u8|\//);return e||void 0},kb=t=>{var e,i,a;return(e=t?.metadata)!=null&&e.video_id?t.metadata.video_id:Fm(t)&&(a=(i=Mo(t.playbackId))!=null?i:zd(t.src))!=null?a:t.src},Nm=t=>{var e;return(e=de.get(t))==null?void 0:e.error},Sb=t=>{var e;return(e=de.get(t))==null?void 0:e.metadata},Dl=t=>{var e,i;return(i=(e=de.get(t))==null?void 0:e.streamType)!=null?i:Q.UNKNOWN},wb=t=>{var e,i;return(i=(e=de.get(t))==null?void 0:e.targetLiveWindow)!=null?i:Number.NaN},jd=t=>{var e,i;return(i=(e=de.get(t))==null?void 0:e.seekable)!=null?i:t.seekable},Ib=t=>{var e;let i=(e=de.get(t))==null?void 0:e.liveEdgeStartOffset;if(typeof i!="number")return Number.NaN;let a=jd(t);return a.length?a.end(a.length-1)-i:Number.NaN},Zd=.034,Rb=(t,e,i=Zd)=>Math.abs(t-e)<=i,Pm=(t,e,i=Zd)=>t>e||Rb(t,e,i),Cb=(t,e=Zd)=>t.paused&&Pm(t.currentTime,t.duration,e),Um=(t,e)=>{var i,a,r;if(!e||!t.buffered.length)return;if(t.readyState>2)return!1;let n=e.currentLevel>=0?(a=(i=e.levels)==null?void 0:i[e.currentLevel])==null?void 0:a.details:(r=e.levels.find(p=>!!p.details))==null?void 0:r.details;if(!n||n.live)return;let{fragments:s}=n;if(!(s!=null&&s.length))return;if(t.currentTime<t.duration-(n.targetduration+.5))return!1;let o=s[s.length-1];if(t.currentTime<=o.start)return!1;let l=o.start+o.duration/2,d=t.buffered.start(t.buffered.length-1),m=t.buffered.end(t.buffered.length-1);return l>d&&l<m},$m=(t,e)=>t.ended||t.loop?t.ended:e&&Um(t,e)?!0:Cb(t),Lb=(t,e,i)=>{Hm(e,i,t);let{metadata:a={}}=t,{view_session_id:r=Ab()}=a,n=kb(t);a.view_session_id=r,a.video_id=n,t.metadata=a;let s=m=>{var p;(p=e.mux)==null||p.emit("hb",{view_drm_type:m})};t.drmTypeCb=s,de.set(e,{retryCount:0});let o=Db(t,e),l=Q_(t,e,o);t!=null&&t.muxDataKeepSession&&e!=null&&e.mux&&!e.mux.deleted?o&&e.mux.addHLSJS({hlsjs:o,Hls:o?B:void 0}):Ub(t,e,o),$b(t,e,o),J_(e),tb(e);let d=G_(t,e,o);return{engine:o,setAutoplay:d,setPreload:l}},Hm=(t,e,i)=>{let a=e?.engine;t!=null&&t.mux&&!t.mux.deleted&&(i!=null&&i.muxDataKeepSession?a&&t.mux.removeHLSJS():(t.mux.destroy(),delete t.mux)),a&&(a.detachMedia(),a.destroy()),t&&(t.hasAttribute("src")&&(t.removeAttribute("src"),t.load()),t.removeEventListener("error",Vm),t.removeEventListener("error",Ml),t.removeEventListener("durationchange",Km),de.delete(t),t.dispatchEvent(new Event("teardown")))};function Bm(t,e){var i;let a=Do(t);if(a!==ti.M3U8)return!0;let r=!a||((i=e.canPlayType(a))!=null?i:!0),{preferPlayback:n}=t,s=n===Wt.MSE,o=n===Wt.NATIVE,l=Om&&(s||Tb(e));return r&&(o||!l)}var Db=(t,e)=>{let{debug:i,streamType:a,startTime:r=-1,metadata:n,preferCmcd:s,_hlsConfig:o={},maxAutoResolution:l}=t,d=Do(t)===ti.M3U8,m=Bm(t,e);if(d&&!m&&Om){let p={backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0},h=Mb(a),u=xb(t),v=[kr.QUERY,kr.HEADER].includes(s)?{useHeaders:s===kr.HEADER,sessionId:n?.view_session_id,contentId:n?.video_id}:void 0,E=o.capLevelToPlayerSize==null?{capLevelController:rl}:{},g=new B({debug:i,startPosition:r,cmcd:v,xhrSetup:(y,T)=>{var _,S;if(s&&s!==kr.QUERY)return;let C=new URL(T);if(!C.searchParams.has("CMCD"))return;let N=((S=(_=C.searchParams.get("CMCD"))==null?void 0:_.split(","))!=null?S:[]).filter($=>$.startsWith("sid")||$.startsWith("cid")).join(",");C.searchParams.set("CMCD",N),y.open("GET",C)},...E,...p,...h,...u,...o});return E.capLevelController===rl&&l!==void 0&&rl.setMaxAutoResolution(g,l),g.on(B.Events.MANIFEST_PARSED,async function(y,T){var _,S;let C=(_=T.sessionData)==null?void 0:_["com.apple.hls.chapters"];(C!=null&&C.URI||C!=null&&C.VALUE.toLocaleLowerCase().startsWith("http"))&&Gd((S=C?.URI)!=null?S:C?.VALUE,e)}),g}},Mb=t=>t===Q.LIVE?{backBufferLength:8}:{},xb=t=>{let{tokens:{drm:e}={},playbackId:i,drmTypeCb:a}=t,r=Mo(i);return!e||!r?{}:{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:Yn(t,"fairplay"),serverCertificateUrl:Wm(t,"fairplay")},"com.widevine.alpha":{licenseUrl:Yn(t,"widevine")},"com.microsoft.playready":{licenseUrl:Yn(t,"playready")}},requestMediaKeySystemAccessFunc:(n,s)=>(n==="com.widevine.alpha"&&(s=[...s.map(o=>{var l;let d=(l=o.videoCapabilities)==null?void 0:l.map(m=>({...m,robustness:"HW_SECURE_ALL"}));return{...o,videoCapabilities:d}}),...s]),navigator.requestMediaKeySystemAccess(n,s).then(o=>{let l=db(n);return a?.(l),o}))}},Ob=async t=>{let e=await fetch(t);return e.status!==200?Promise.reject(e):await e.arrayBuffer()},Nb=async(t,e)=>{let i=await fetch(e,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:t});if(i.status!==200)return Promise.reject(i);let a=await i.arrayBuffer();return new Uint8Array(a)},Pb=(t,e)=>{let i=async n=>{let s=await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[n],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(l=>{var d;return(d=t.drmTypeCb)==null||d.call(t,qn.FAIRPLAY),l}).catch(()=>{let l=D("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser."),d=new R(l,R.MEDIA_ERR_ENCRYPTED,!0);d.errorCategory=te.DRM,d.muxCode=x.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM,Ze(e,d)});if(!s)return;let o=await s.createMediaKeys();try{let l=await Ob(Wm(t,"fairplay")).catch(d=>{if(d instanceof Response){let m=ao(d,te.DRM,t);return console.error("mediaError",m?.message,m?.context),m?Promise.reject(m):Promise.reject(new Error("Unexpected error in app cert request"))}return Promise.reject(d)});await o.setServerCertificate(l).catch(()=>{let d=D("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate."),m=new R(d,R.MEDIA_ERR_ENCRYPTED,!0);return m.errorCategory=te.DRM,m.muxCode=x.ENCRYPTED_UPDATE_SERVER_CERT_FAILED,Promise.reject(m)})}catch(l){Ze(e,l);return}await e.setMediaKeys(o)},a=n=>{let s;if(n==="internal-error"){let o=D("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");s=new R(o,R.MEDIA_ERR_ENCRYPTED,!0),s.errorCategory=te.DRM,s.muxCode=x.ENCRYPTED_CDM_ERROR}else if(n==="output-restricted"||n==="output-downscaled"){let o=D("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");s=new R(o,R.MEDIA_ERR_ENCRYPTED,!1),s.errorCategory=te.DRM,s.muxCode=x.ENCRYPTED_OUTPUT_RESTRICTED}s&&Ze(e,s)},r=async(n,s)=>{let o=e.mediaKeys.createSession(),l=()=>{o.keyStatuses.forEach(m=>a(m))},d=async m=>{let p=m.message;try{let h=await Nb(p,Yn(t,"fairplay"));try{await o.update(h)}catch{let u=D("Failed to update DRM license. This may be an issue with the player or your protected content."),v=new R(u,R.MEDIA_ERR_ENCRYPTED,!0);v.errorCategory=te.DRM,v.muxCode=x.ENCRYPTED_UPDATE_LICENSE_FAILED,Ze(e,v)}}catch(h){if(h instanceof Response){let u=ao(h,te.DRM,t);if(console.error("mediaError",u?.message,u?.context),u){Ze(e,u);return}console.error("Unexpected error in license key request",h);return}console.error(h)}};o.addEventListener("keystatuseschange",l),o.addEventListener("message",d),e.addEventListener("teardown",()=>{o.removeEventListener("keystatuseschange",l),o.removeEventListener("message",d),o.close()},{once:!0}),await o.generateRequest(n,s).catch(m=>{console.error("Failed to generate license request",m);let p=D("Failed to generate a DRM license request. This may be an issue with the player or your protected content."),h=new R(p,R.MEDIA_ERR_ENCRYPTED,!0);return h.errorCategory=te.DRM,h.muxCode=x.ENCRYPTED_GENERATE_REQUEST_FAILED,Promise.reject(h)})};fe(e,"encrypted",async n=>{try{let s=n.initDataType;if(s!=="skd"){console.error(`Received unexpected initialization data type "${s}"`);return}e.mediaKeys||await i(s);let o=n.initData;if(o==null){console.error(`Could not start encrypted playback due to missing initData in ${n.type} event`);return}await r(s,o)}catch(s){Ze(e,s);return}})},Yn=({playbackId:t,tokens:{drm:e}={},customDomain:i=ii},a)=>{let r=Mo(t);return`https://license.${i.toLocaleLowerCase().endsWith(ii)?i:ii}/license/${a}/${r}?token=${e}`},Wm=({playbackId:t,tokens:{drm:e}={},customDomain:i=ii},a)=>{let r=Mo(t);return`https://license.${i.toLocaleLowerCase().endsWith(ii)?i:ii}/appcert/${a}/${r}?token=${e}`},Fm=({playbackId:t,src:e,customDomain:i})=>{if(t)return!0;if(typeof e!="string")return!1;let a=window?.location.href,r=new URL(e,a).hostname.toLocaleLowerCase();return r.includes(ii)||!!i&&r.includes(i.toLocaleLowerCase())},Ub=(t,e,i)=>{var a;let{envKey:r,disableTracking:n,muxDataSDK:s=Wd,muxDataSDKOptions:o={}}=t,l=Fm(t);if(!n&&(r||l)){let{playerInitTime:d,playerSoftwareName:m,playerSoftwareVersion:p,beaconCollectionDomain:h,debug:u,disableCookies:v}=t,E={...t.metadata,video_title:((a=t?.metadata)==null?void 0:a.video_title)||void 0},g=y=>typeof y.player_error_code=="string"?!1:typeof t.errorTranslator=="function"?t.errorTranslator(y):y;s.monitor(e,{debug:u,beaconCollectionDomain:h,hlsjs:i,Hls:i?B:void 0,automaticErrorTracking:!1,errorTranslator:g,disableCookies:v,...o,data:{...r?{env_key:r}:{},player_software_name:m,player_software:m,player_software_version:p,player_init_time:d,...E}})}},$b=(t,e,i)=>{var a,r;let n=Bm(t,e),{src:s,customDomain:o=ii}=t,l=()=>{e.ended||t.disablePseudoEnded||!$m(e,i)||(Um(e,i)?e.currentTime=e.buffered.end(e.buffered.length-1):e.dispatchEvent(new Event("ended")))},d,m,p=()=>{let h=jd(e),u,v;h.length>0&&(u=h.start(0),v=h.end(0)),(m!==v||d!==u)&&e.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),d=u,m=v};if(fe(e,"durationchange",p),e&&n){let h=Do(t);if(typeof s=="string"){if(s.endsWith(".mp4")&&s.includes(o)){let E=zd(s),g=new URL(`https://stream.${o}/${E}/metadata.json`);Gd(g.toString(),e)}let u=()=>{if(Dl(e)!==Q.LIVE||Number.isFinite(e.duration))return;let E=setInterval(p,1e3);e.addEventListener("teardown",()=>{clearInterval(E)},{once:!0}),fe(e,"durationchange",()=>{Number.isFinite(e.duration)&&clearInterval(E)})},v=async()=>fb(s,e,h).then(u).catch(E=>{if(E instanceof Response){let g=ao(E,te.VIDEO,t);if(g){Ze(e,g);return}}});if(e.preload==="none"){let E=()=>{v(),e.removeEventListener("loadedmetadata",g)},g=()=>{v(),e.removeEventListener("play",E)};fe(e,"play",E,{once:!0}),fe(e,"loadedmetadata",g,{once:!0})}else v();(a=t.tokens)!=null&&a.drm?Pb(t,e):fe(e,"encrypted",()=>{let E=D("Attempting to play DRM-protected content without providing a DRM token."),g=new R(E,R.MEDIA_ERR_ENCRYPTED,!0);g.errorCategory=te.DRM,g.muxCode=x.ENCRYPTED_MISSING_TOKEN,Ze(e,g)},{once:!0}),e.setAttribute("src",s),t.startTime&&(((r=de.get(e))!=null?r:{}).startTime=t.startTime,e.addEventListener("durationchange",Km,{once:!0}))}else e.removeAttribute("src");e.addEventListener("error",Vm),e.addEventListener("error",Ml),e.addEventListener("emptied",()=>{e.querySelectorAll("track[data-removeondestroy]").forEach(u=>{u.remove()})},{once:!0}),fe(e,"pause",l),fe(e,"seeked",l),fe(e,"play",()=>{e.ended||Pm(e.currentTime,e.duration)&&(e.currentTime=e.seekable.length?e.seekable.start(0):0)})}else i&&s?(i.once(B.Events.LEVEL_LOADED,(h,u)=>{_b(u.details,e,i),p(),Dl(e)===Q.LIVE&&!Number.isFinite(e.duration)&&(i.on(B.Events.LEVEL_UPDATED,p),fe(e,"durationchange",()=>{Number.isFinite(e.duration)&&i.off(B.Events.LEVELS_UPDATED,p)}))}),i.on(B.Events.ERROR,(h,u)=>{var v,E;let g=Hb(u,t);if(g.muxCode===x.NETWORK_NOT_READY){let y=(v=de.get(e))!=null?v:{},T=(E=y.retryCount)!=null?E:0;if(T<6){let _=T===0?5e3:6e4,S=new R(`Retrying in ${_/1e3} seconds...`,g.code,g.fatal);Object.assign(S,g),Ze(e,S),setTimeout(()=>{y.retryCount=T+1,u.details==="manifestLoadError"&&u.url&&i.loadSource(u.url)},_);return}else{y.retryCount=0;let _=new R('Try again later or <a href="#" onclick="window.location.reload(); return false;" style="color: #4a90e2;">click here to retry</a>',g.code,g.fatal);Object.assign(_,g),Ze(e,_);return}}Ze(e,g)}),i.on(B.Events.MANIFEST_LOADED,()=>{let h=de.get(e);h&&h.error&&(h.error=null,h.retryCount=0,e.dispatchEvent(new Event("emptied")),e.dispatchEvent(new Event("loadstart")))}),e.addEventListener("error",Ml),fe(e,"waiting",l),z_(t,i),j_(e,i),i.attachMedia(e)):console.error("It looks like the video you're trying to play will not work on this system! If possible, try upgrading to the newest versions of your browser or software.")};function Km(t){var e;let i=t.target,a=(e=de.get(i))==null?void 0:e.startTime;if(a&&U_(i.seekable,i.duration,a)){let r=i.preload==="auto";r&&(i.preload="none"),i.currentTime=a,r&&(i.preload="auto")}}async function Vm(t){if(!t.isTrusted)return;t.stopImmediatePropagation();let e=t.target;if(!(e!=null&&e.error))return;let{message:i,code:a}=e.error,r=new R(i,a);if(e.src&&a===R.MEDIA_ERR_SRC_NOT_SUPPORTED&&e.readyState===HTMLMediaElement.HAVE_NOTHING){setTimeout(()=>{var n;let s=(n=Nm(e))!=null?n:e.error;s?.code===R.MEDIA_ERR_SRC_NOT_SUPPORTED&&Ze(e,r)},500);return}if(e.src&&(a!==R.MEDIA_ERR_DECODE||a!==void 0))try{let{status:n}=await fetch(e.src);r.data={response:{code:n}}}catch{}Ze(e,r)}function Ze(t,e){var i;e.fatal&&(((i=de.get(t))!=null?i:{}).error=e,t.dispatchEvent(new CustomEvent("error",{detail:e})))}function Ml(t){var e,i;if(!(t instanceof CustomEvent)||!(t.detail instanceof R))return;let a=t.target,r=t.detail;!r||!r.fatal||(((e=de.get(a))!=null?e:{}).error=r,(i=a.mux)==null||i.emit("error",{player_error_code:r.code,player_error_message:r.message,player_error_context:r.context}))}var Hb=(t,e)=>{var i,a,r;t.fatal?console.error("getErrorFromHlsErrorData()",t):e.debug&&console.warn("getErrorFromHlsErrorData() (non-fatal)",t);let n={[B.ErrorTypes.NETWORK_ERROR]:R.MEDIA_ERR_NETWORK,[B.ErrorTypes.MEDIA_ERROR]:R.MEDIA_ERR_DECODE,[B.ErrorTypes.KEY_SYSTEM_ERROR]:R.MEDIA_ERR_ENCRYPTED},s=m=>[B.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,B.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED].includes(m.details)?R.MEDIA_ERR_NETWORK:n[m.type],o=m=>{if(m.type===B.ErrorTypes.KEY_SYSTEM_ERROR)return te.DRM;if(m.type===B.ErrorTypes.NETWORK_ERROR)return te.VIDEO},l,d=s(t);if(d===R.MEDIA_ERR_NETWORK&&t.response){let m=(i=o(t))!=null?i:te.VIDEO;l=(a=ao(t.response,m,e,t.fatal))!=null?a:new R("",d,t.fatal)}else if(d===R.MEDIA_ERR_ENCRYPTED)if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE){let m=D("Attempting to play DRM-protected content without providing a DRM token.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_MISSING_TOKEN}else if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_ACCESS){let m=D("Cannot play DRM-protected content with current security configuration on this browser. Try playing in another browser.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UNSUPPORTED_KEY_SYSTEM}else if(t.details===B.ErrorDetails.KEY_SYSTEM_NO_SESSION){let m=D("Failed to generate a DRM license request. This may be an issue with the player or your protected content.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,!0),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_GENERATE_REQUEST_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED){let m=D("Failed to update DRM license. This may be an issue with the player or your protected content.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UPDATE_LICENSE_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED){let m=D("Your server certificate failed when attempting to set it. This may be an issue with a no longer valid certificate.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_UPDATE_SERVER_CERT_FAILED}else if(t.details===B.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR){let m=D("The DRM Content Decryption Module system had an internal failure. Try reloading the page, upading your browser, or playing in another browser.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_CDM_ERROR}else if(t.details===B.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED){let m=D("DRM playback is being attempted in an environment that is not sufficiently secure. User may see black screen.");l=new R(m,R.MEDIA_ERR_ENCRYPTED,!1),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_OUTPUT_RESTRICTED}else l=new R(t.error.message,R.MEDIA_ERR_ENCRYPTED,t.fatal),l.errorCategory=te.DRM,l.muxCode=x.ENCRYPTED_ERROR;else l=new R("",d,t.fatal);return l.context||(l.context=`${t.url?`url: ${t.url}
26
26
  `:""}${t.response&&(t.response.code||t.response.text)?`response: ${t.response.code}, ${t.response.text}
27
27
  `:""}${t.reason?`failure reason: ${t.reason}
28
28
  `:""}${t.level?`level: ${t.level}
@@ -31,9 +31,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
31
31
  `:""}${t.error?`error: ${t.error}
32
32
  `:""}${t.event?`event: ${t.event}
33
33
  `:""}${t.err?`error message: ${(r=t.err)==null?void 0:r.message}
34
- `:""}`),l.data=t,l},qm=t=>{throw TypeError(t)},Xd=(t,e,i)=>e.has(t)||qm("Cannot "+i),De=(t,e,i)=>(Xd(t,e,"read from private field"),i?i.call(t):e.get(t)),ct=(t,e,i)=>e.has(t)?qm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),at=(t,e,i,a)=>(Xd(t,e,"write to private field"),e.set(t,i),i),Sn=(t,e,i)=>(Xd(t,e,"access private method"),i),Bb=()=>{try{return"0.29.2"}catch{}return"UNKNOWN"},Wb=Bb(),Fb=()=>Wb,Kb=`
35
- <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,b={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo"},Vb=Object.values(b),Uc=Fb(),$c="mux-video",wt,Sr,Yn,wr,Gn,Qn,zn,jn,Zn,Ir,va,Rr,qb=class extends An{constructor(){super(),ct(this,va),ct(this,wt),ct(this,Sr),ct(this,Yn),ct(this,wr,{}),ct(this,Gn,{}),ct(this,Qn),ct(this,zn),ct(this,jn),ct(this,Zn),ct(this,Ir,""),at(this,Yn,Qd()),this.nativeEl.addEventListener("muxmetadata",e=>{var i;let a=Sb(this.nativeEl),r=(i=this.metadata)!=null?i:{};this.metadata={...a,...r},a?.["com.mux.video.branding"]==="mux-free-plan"&&(at(this,Ir,"default"),this.updateLogo())})}static get NAME(){return $c}static get VERSION(){return Uc}static get observedAttributes(){var e;return[...Vb,...(e=An.observedAttributes)!=null?e:[]]}static getLogoHTML(e){return!e||e==="false"?"":e==="default"?Kb:`<img part="logo" src="${e}" />`}static getTemplateHTML(e={}){var i;return`
36
- ${An.getTemplateHTML(e)}
34
+ `:""}`),l.data=t,l},qm=t=>{throw TypeError(t)},Xd=(t,e,i)=>e.has(t)||qm("Cannot "+i),De=(t,e,i)=>(Xd(t,e,"read from private field"),i?i.call(t):e.get(t)),ct=(t,e,i)=>e.has(t)?qm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),at=(t,e,i,a)=>(Xd(t,e,"write to private field"),e.set(t,i),i),wn=(t,e,i)=>(Xd(t,e,"access private method"),i),Bb=()=>{try{return"0.29.2"}catch{}return"UNKNOWN"},Wb=Bb(),Fb=()=>Wb,Kb=`
35
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" part="logo" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2" viewBox="0 0 1600 500"><g fill="#fff"><path d="M994.287 93.486c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m0-93.486c-34.509 0-62.484 27.976-62.484 62.486v187.511c0 68.943-56.09 125.033-125.032 125.033s-125.03-56.09-125.03-125.033V62.486C681.741 27.976 653.765 0 619.256 0s-62.484 27.976-62.484 62.486v187.511C556.772 387.85 668.921 500 806.771 500c137.851 0 250.001-112.15 250.001-250.003V62.486c0-34.51-27.976-62.486-62.485-62.486M1537.51 468.511c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31m-275.883-218.509-143.33 143.329c-24.402 24.402-24.402 63.966 0 88.368 24.402 24.402 63.967 24.402 88.369 0l143.33-143.329 143.328 143.329c24.402 24.4 63.967 24.402 88.369 0 24.403-24.402 24.403-63.966.001-88.368l-143.33-143.329.001-.004 143.329-143.329c24.402-24.402 24.402-63.965 0-88.367s-63.967-24.402-88.369 0L1349.996 161.63 1206.667 18.302c-24.402-24.401-63.967-24.402-88.369 0s-24.402 63.965 0 88.367l143.329 143.329v.004ZM437.511 468.521c-17.121 0-31-13.879-31-31 0-17.121 13.879-31 31-31 17.121 0 31 13.879 31 31 0 17.121-13.879 31-31 31M461.426 4.759C438.078-4.913 411.2.432 393.33 18.303L249.999 161.632 106.669 18.303C88.798.432 61.922-4.913 38.573 4.759 15.224 14.43-.001 37.214-.001 62.488v375.026c0 34.51 27.977 62.486 62.487 62.486 34.51 0 62.486-27.976 62.486-62.486V213.341l80.843 80.844c24.404 24.402 63.965 24.402 88.369 0l80.843-80.844v224.173c0 34.51 27.976 62.486 62.486 62.486s62.486-27.976 62.486-62.486V62.488c0-25.274-15.224-48.058-38.573-57.729" style="fill-rule:nonzero"/></g></svg>`,b={BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",DEBUG:"debug",DISABLE_TRACKING:"disable-tracking",DISABLE_COOKIES:"disable-cookies",DISABLE_PSEUDO_ENDED:"disable-pseudo-ended",DRM_TOKEN:"drm-token",PLAYBACK_TOKEN:"playback-token",ENV_KEY:"env-key",MAX_RESOLUTION:"max-resolution",MIN_RESOLUTION:"min-resolution",MAX_AUTO_RESOLUTION:"max-auto-resolution",RENDITION_ORDER:"rendition-order",PROGRAM_START_TIME:"program-start-time",PROGRAM_END_TIME:"program-end-time",ASSET_START_TIME:"asset-start-time",ASSET_END_TIME:"asset-end-time",METADATA_URL:"metadata-url",PLAYBACK_ID:"playback-id",PLAYER_SOFTWARE_NAME:"player-software-name",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_INIT_TIME:"player-init-time",PREFER_CMCD:"prefer-cmcd",PREFER_PLAYBACK:"prefer-playback",START_TIME:"start-time",STREAM_TYPE:"stream-type",TARGET_LIVE_WINDOW:"target-live-window",LIVE_EDGE_OFFSET:"live-edge-offset",TYPE:"type",LOGO:"logo"},Vb=Object.values(b),Uc=Fb(),$c="mux-video",wt,wr,Gn,Ir,Qn,zn,jn,Zn,Xn,Rr,va,Cr,qb=class extends kn{constructor(){super(),ct(this,va),ct(this,wt),ct(this,wr),ct(this,Gn),ct(this,Ir,{}),ct(this,Qn,{}),ct(this,zn),ct(this,jn),ct(this,Zn),ct(this,Xn),ct(this,Rr,""),at(this,Gn,Qd()),this.nativeEl.addEventListener("muxmetadata",e=>{var i;let a=Sb(this.nativeEl),r=(i=this.metadata)!=null?i:{};this.metadata={...a,...r},a?.["com.mux.video.branding"]==="mux-free-plan"&&(at(this,Rr,"default"),this.updateLogo())})}static get NAME(){return $c}static get VERSION(){return Uc}static get observedAttributes(){var e;return[...Vb,...(e=kn.observedAttributes)!=null?e:[]]}static getLogoHTML(e){return!e||e==="false"?"":e==="default"?Kb:`<img part="logo" src="${e}" />`}static getTemplateHTML(e={}){var i;return`
36
+ ${kn.getTemplateHTML(e)}
37
37
  <style>
38
38
  :host {
39
39
  position: relative;
@@ -60,16 +60,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
60
60
  <slot name="logo">
61
61
  ${this.getLogoHTML((i=e[b.LOGO])!=null?i:"")}
62
62
  </slot>
63
- `}get preferCmcd(){var e;return(e=this.getAttribute(b.PREFER_CMCD))!=null?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?io.includes(e)?this.setAttribute(b.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${io.join()}`):this.removeAttribute(b.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(b.PLAYER_INIT_TIME)?+this.getAttribute(b.PLAYER_INIT_TIME):De(this,Yn)}set playerInitTime(e){e!=this.playerInitTime&&(e==null?this.removeAttribute(b.PLAYER_INIT_TIME):this.setAttribute(b.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return(e=De(this,jn))!=null?e:$c}set playerSoftwareName(e){at(this,jn,e)}get playerSoftwareVersion(){var e;return(e=De(this,zn))!=null?e:Uc}set playerSoftwareVersion(e){at(this,zn,e)}get _hls(){var e;return(e=De(this,wt))==null?void 0:e.engine}get mux(){var e;return(e=this.nativeEl)==null?void 0:e.mux}get error(){var e;return(e=Nm(this.nativeEl))!=null?e:null}get errorTranslator(){return De(this,Zn)}set errorTranslator(e){at(this,Zn,e)}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(e==null?this.removeAttribute("src"):this.setAttribute("src",e))}get type(){var e;return(e=this.getAttribute(b.TYPE))!=null?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(b.TYPE,e):this.removeAttribute(b.TYPE))}get preload(){let e=this.getAttribute("preload");return e===""?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return this.getAttribute(b.DEBUG)!=null}set debug(e){e!==this.debug&&(e?this.setAttribute(b.DEBUG,""):this.removeAttribute(b.DEBUG))}get disableTracking(){return this.hasAttribute(b.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(b.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(b.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(b.DISABLE_COOKIES,""):this.removeAttribute(b.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(b.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(b.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(b.DISABLE_PSEUDO_ENDED))}get startTime(){let e=this.getAttribute(b.START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set startTime(e){e!==this.startTime&&(e==null?this.removeAttribute(b.START_TIME):this.setAttribute(b.START_TIME,`${e}`))}get playbackId(){var e;return this.hasAttribute(b.PLAYBACK_ID)?this.getAttribute(b.PLAYBACK_ID):(e=zd(this.src))!=null?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(b.PLAYBACK_ID,e):this.removeAttribute(b.PLAYBACK_ID))}get maxResolution(){var e;return(e=this.getAttribute(b.MAX_RESOLUTION))!=null?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(b.MAX_RESOLUTION,e):this.removeAttribute(b.MAX_RESOLUTION))}get minResolution(){var e;return(e=this.getAttribute(b.MIN_RESOLUTION))!=null?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(b.MIN_RESOLUTION,e):this.removeAttribute(b.MIN_RESOLUTION))}get maxAutoResolution(){var e;return(e=this.getAttribute(b.MAX_AUTO_RESOLUTION))!=null?e:void 0}set maxAutoResolution(e){e==null?this.removeAttribute(b.MAX_AUTO_RESOLUTION):this.setAttribute(b.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return(e=this.getAttribute(b.RENDITION_ORDER))!=null?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(b.RENDITION_ORDER,e):this.removeAttribute(b.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(b.PROGRAM_START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set programStartTime(e){e==null?this.removeAttribute(b.PROGRAM_START_TIME):this.setAttribute(b.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(b.PROGRAM_END_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set programEndTime(e){e==null?this.removeAttribute(b.PROGRAM_END_TIME):this.setAttribute(b.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(b.ASSET_START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set assetStartTime(e){e==null?this.removeAttribute(b.ASSET_START_TIME):this.setAttribute(b.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(b.ASSET_END_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set assetEndTime(e){e==null?this.removeAttribute(b.ASSET_END_TIME):this.setAttribute(b.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return(e=this.getAttribute(b.CUSTOM_DOMAIN))!=null?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(b.CUSTOM_DOMAIN,e):this.removeAttribute(b.CUSTOM_DOMAIN))}get drmToken(){var e;return(e=this.getAttribute(b.DRM_TOKEN))!=null?e:void 0}set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(b.DRM_TOKEN,e):this.removeAttribute(b.DRM_TOKEN))}get playbackToken(){var e,i,a,r;if(this.hasAttribute(b.PLAYBACK_TOKEN))return(e=this.getAttribute(b.PLAYBACK_TOKEN))!=null?e:void 0;if(this.hasAttribute(b.PLAYBACK_ID)){let[,n]=Kd((i=this.playbackId)!=null?i:"");return(a=new URLSearchParams(n).get("token"))!=null?a:void 0}if(this.src)return(r=new URLSearchParams(this.src).get("token"))!=null?r:void 0}set playbackToken(e){e!==this.playbackToken&&(e?this.setAttribute(b.PLAYBACK_TOKEN,e):this.removeAttribute(b.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(b.PLAYBACK_TOKEN),i=this.getAttribute(b.DRM_TOKEN);return{...De(this,Gn),...e!=null?{playback:e}:{},...i!=null?{drm:i}:{}}}set tokens(e){at(this,Gn,e??{})}get ended(){return $m(this.nativeEl,this._hls)}get envKey(){var e;return(e=this.getAttribute(b.ENV_KEY))!=null?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(b.ENV_KEY,e):this.removeAttribute(b.ENV_KEY))}get beaconCollectionDomain(){var e;return(e=this.getAttribute(b.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(b.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(b.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return(e=this.getAttribute(b.STREAM_TYPE))!=null?e:Dl(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(b.STREAM_TYPE,e):this.removeAttribute(b.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(b.TARGET_LIVE_WINDOW)?+this.getAttribute(b.TARGET_LIVE_WINDOW):wb(this.nativeEl)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(e==null?this.removeAttribute(b.TARGET_LIVE_WINDOW):this.setAttribute(b.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,i;if(this.hasAttribute(b.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:a}=this,r=(e=this.nativeEl.seekable.end(0))!=null?e:0,n=(i=this.nativeEl.seekable.start(0))!=null?i:0;return Math.max(n,r-a)}return Ib(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(b.LIVE_EDGE_OFFSET))return+this.getAttribute(b.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(e==null?this.removeAttribute(b.LIVE_EDGE_OFFSET):this.setAttribute(b.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return jd(this.nativeEl)}async addCuePoints(e){return Rm(this.nativeEl,e)}get activeCuePoint(){return Cm(this.nativeEl)}get cuePoints(){return X_(this.nativeEl)}async addChapters(e){return Dm(this.nativeEl,e)}get activeChapter(){return Mm(this.nativeEl)}get chapters(){return eb(this.nativeEl)}getStartDate(){return ib(this.nativeEl,this._hls)}get currentPdt(){return ab(this.nativeEl,this._hls)}get preferPlayback(){let e=this.getAttribute(b.PREFER_PLAYBACK);if(e===Wt.MSE||e===Wt.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===Wt.MSE||e===Wt.NATIVE?this.setAttribute(b.PREFER_PLAYBACK,e):this.removeAttribute(b.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![b.METADATA_URL].includes(e)).reduce((e,i)=>{let a=this.getAttribute(i);return a!=null&&(e[i.replace(/^metadata-/,"").replace(/-/g,"_")]=a),e},{}),...De(this,wr)}}set metadata(e){at(this,wr,e??{}),this.mux&&this.mux.emit("hb",De(this,wr))}get _hlsConfig(){return De(this,Qn)}set _hlsConfig(e){at(this,Qn,e)}get logo(){var e;return(e=this.getAttribute(b.LOGO))!=null?e:De(this,Ir)}set logo(e){e?this.setAttribute(b.LOGO,e):this.removeAttribute(b.LOGO)}load(){at(this,wt,Lb(this,this.nativeEl,De(this,wt)))}unload(){Hm(this.nativeEl,De(this,wt),this),at(this,wt,void 0)}attributeChangedCallback(e,i,a){var r,n;switch(An.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,i,a),e){case b.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=a??void 0;break;case b.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=a??void 0;break;case"src":{let s=!!i,o=!!a;!s&&o?Sn(this,va,Rr).call(this):s&&!o?this.unload():s&&o&&(this.unload(),Sn(this,va,Rr).call(this));break}case"autoplay":if(a===i)break;(r=De(this,wt))==null||r.setAutoplay(this.autoplay);break;case"preload":if(a===i)break;(n=De(this,wt))==null||n.setPreload(a);break;case b.PLAYBACK_ID:this.src=Ll(this);break;case b.DEBUG:{let s=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=s);break}case b.METADATA_URL:a&&fetch(a).then(s=>s.json()).then(s=>this.metadata=s).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${a}!`));break;case b.STREAM_TYPE:(a==null||a!==i)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case b.TARGET_LIVE_WINDOW:(a==null||a!==i)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case b.LOGO:(a==null||a!==i)&&this.updateLogo();break;case b.DISABLE_TRACKING:{if(a==null||a!==i){let s=this.currentTime,o=this.paused;this.unload(),Sn(this,va,Rr).call(this).then(()=>{this.currentTime=s,o||this.play()})}break}case b.DISABLE_COOKIES:{(a==null||a!==i)&&this.disableCookies&&document.cookie.split(";").forEach(s=>{s.trim().startsWith("muxData")&&(document.cookie=s.replace(/^ +/,"").replace(/=.*/,"=;expires="+new Date().toUTCString()+";path=/"))});break}}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');if(!e)return;let i=this.constructor.getLogoHTML(De(this,Ir)||this.logo);e.innerHTML=i}connectedCallback(){var e;(e=super.connectedCallback)==null||e.call(this),this.nativeEl&&this.src&&!De(this,wt)&&Sn(this,va,Rr).call(this)}disconnectedCallback(){this.unload()}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};wt=new WeakMap,Sr=new WeakMap,Yn=new WeakMap,wr=new WeakMap,Gn=new WeakMap,Qn=new WeakMap,zn=new WeakMap,jn=new WeakMap,Zn=new WeakMap,Ir=new WeakMap,va=new WeakSet,Rr=async function(){De(this,Sr)||(await at(this,Sr,Promise.resolve()),at(this,Sr,null),this.load())};const zi=new WeakMap;class nl extends Error{}class Yb extends Error{}const Gb=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"],Qb=globalThis.WeakRef?class extends Set{add(t){super.add(new WeakRef(t))}forEach(t){super.forEach(e=>{const i=e.deref();i&&t(i)})}}:Set;function zb(t){globalThis.chrome?.cast?.isAvailable?globalThis.cast?.framework?t():customElements.whenDefined("google-cast-button").then(t):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(t)}}function jb(){return globalThis.chrome}function Zb(){const t="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(globalThis.chrome?.cast||document.querySelector(`script[src="${t}"]`))return;const e=document.createElement("script");e.src=t,document.head.append(e)}function Ti(){return globalThis.cast?.framework?.CastContext.getInstance()}function Jd(){return Ti()?.getCurrentSession()}function eu(){return Jd()?.getSessionObj().media[0]}function Xb(t){return new Promise((e,i)=>{eu().editTracksInfo(t,e,i)})}function Jb(t){return new Promise((e,i)=>{eu().getStatus(t,e,i)})}function Hc(t){return Ti().setOptions({...Ym(),...t})}function Ym(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}function eg(t){if(!t)return;const e=/\.([a-zA-Z0-9]+)(?:\?.*)?$/,i=t.match(e);return i?i[1]:null}function tg(t){const e=t.split(`
63
+ `}get preferCmcd(){var e;return(e=this.getAttribute(b.PREFER_CMCD))!=null?e:void 0}set preferCmcd(e){e!==this.preferCmcd&&(e?io.includes(e)?this.setAttribute(b.PREFER_CMCD,e):console.warn(`Invalid value for preferCmcd. Must be one of ${io.join()}`):this.removeAttribute(b.PREFER_CMCD))}get playerInitTime(){return this.hasAttribute(b.PLAYER_INIT_TIME)?+this.getAttribute(b.PLAYER_INIT_TIME):De(this,Gn)}set playerInitTime(e){e!=this.playerInitTime&&(e==null?this.removeAttribute(b.PLAYER_INIT_TIME):this.setAttribute(b.PLAYER_INIT_TIME,`${+e}`))}get playerSoftwareName(){var e;return(e=De(this,Zn))!=null?e:$c}set playerSoftwareName(e){at(this,Zn,e)}get playerSoftwareVersion(){var e;return(e=De(this,jn))!=null?e:Uc}set playerSoftwareVersion(e){at(this,jn,e)}get _hls(){var e;return(e=De(this,wt))==null?void 0:e.engine}get mux(){var e;return(e=this.nativeEl)==null?void 0:e.mux}get error(){var e;return(e=Nm(this.nativeEl))!=null?e:null}get errorTranslator(){return De(this,Xn)}set errorTranslator(e){at(this,Xn,e)}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(e==null?this.removeAttribute("src"):this.setAttribute("src",e))}get type(){var e;return(e=this.getAttribute(b.TYPE))!=null?e:void 0}set type(e){e!==this.type&&(e?this.setAttribute(b.TYPE,e):this.removeAttribute(b.TYPE))}get preload(){let e=this.getAttribute("preload");return e===""?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return this.getAttribute(b.DEBUG)!=null}set debug(e){e!==this.debug&&(e?this.setAttribute(b.DEBUG,""):this.removeAttribute(b.DEBUG))}get disableTracking(){return this.hasAttribute(b.DISABLE_TRACKING)}set disableTracking(e){e!==this.disableTracking&&this.toggleAttribute(b.DISABLE_TRACKING,!!e)}get disableCookies(){return this.hasAttribute(b.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(b.DISABLE_COOKIES,""):this.removeAttribute(b.DISABLE_COOKIES))}get disablePseudoEnded(){return this.hasAttribute(b.DISABLE_PSEUDO_ENDED)}set disablePseudoEnded(e){e!==this.disablePseudoEnded&&(e?this.setAttribute(b.DISABLE_PSEUDO_ENDED,""):this.removeAttribute(b.DISABLE_PSEUDO_ENDED))}get startTime(){let e=this.getAttribute(b.START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set startTime(e){e!==this.startTime&&(e==null?this.removeAttribute(b.START_TIME):this.setAttribute(b.START_TIME,`${e}`))}get playbackId(){var e;return this.hasAttribute(b.PLAYBACK_ID)?this.getAttribute(b.PLAYBACK_ID):(e=zd(this.src))!=null?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(b.PLAYBACK_ID,e):this.removeAttribute(b.PLAYBACK_ID))}get maxResolution(){var e;return(e=this.getAttribute(b.MAX_RESOLUTION))!=null?e:void 0}set maxResolution(e){e!==this.maxResolution&&(e?this.setAttribute(b.MAX_RESOLUTION,e):this.removeAttribute(b.MAX_RESOLUTION))}get minResolution(){var e;return(e=this.getAttribute(b.MIN_RESOLUTION))!=null?e:void 0}set minResolution(e){e!==this.minResolution&&(e?this.setAttribute(b.MIN_RESOLUTION,e):this.removeAttribute(b.MIN_RESOLUTION))}get maxAutoResolution(){var e;return(e=this.getAttribute(b.MAX_AUTO_RESOLUTION))!=null?e:void 0}set maxAutoResolution(e){e==null?this.removeAttribute(b.MAX_AUTO_RESOLUTION):this.setAttribute(b.MAX_AUTO_RESOLUTION,e)}get renditionOrder(){var e;return(e=this.getAttribute(b.RENDITION_ORDER))!=null?e:void 0}set renditionOrder(e){e!==this.renditionOrder&&(e?this.setAttribute(b.RENDITION_ORDER,e):this.removeAttribute(b.RENDITION_ORDER))}get programStartTime(){let e=this.getAttribute(b.PROGRAM_START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set programStartTime(e){e==null?this.removeAttribute(b.PROGRAM_START_TIME):this.setAttribute(b.PROGRAM_START_TIME,`${e}`)}get programEndTime(){let e=this.getAttribute(b.PROGRAM_END_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set programEndTime(e){e==null?this.removeAttribute(b.PROGRAM_END_TIME):this.setAttribute(b.PROGRAM_END_TIME,`${e}`)}get assetStartTime(){let e=this.getAttribute(b.ASSET_START_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set assetStartTime(e){e==null?this.removeAttribute(b.ASSET_START_TIME):this.setAttribute(b.ASSET_START_TIME,`${e}`)}get assetEndTime(){let e=this.getAttribute(b.ASSET_END_TIME);if(e==null)return;let i=+e;return Number.isNaN(i)?void 0:i}set assetEndTime(e){e==null?this.removeAttribute(b.ASSET_END_TIME):this.setAttribute(b.ASSET_END_TIME,`${e}`)}get customDomain(){var e;return(e=this.getAttribute(b.CUSTOM_DOMAIN))!=null?e:void 0}set customDomain(e){e!==this.customDomain&&(e?this.setAttribute(b.CUSTOM_DOMAIN,e):this.removeAttribute(b.CUSTOM_DOMAIN))}get drmToken(){var e;return(e=this.getAttribute(b.DRM_TOKEN))!=null?e:void 0}set drmToken(e){e!==this.drmToken&&(e?this.setAttribute(b.DRM_TOKEN,e):this.removeAttribute(b.DRM_TOKEN))}get playbackToken(){var e,i,a,r;if(this.hasAttribute(b.PLAYBACK_TOKEN))return(e=this.getAttribute(b.PLAYBACK_TOKEN))!=null?e:void 0;if(this.hasAttribute(b.PLAYBACK_ID)){let[,n]=Kd((i=this.playbackId)!=null?i:"");return(a=new URLSearchParams(n).get("token"))!=null?a:void 0}if(this.src)return(r=new URLSearchParams(this.src).get("token"))!=null?r:void 0}set playbackToken(e){e!==this.playbackToken&&(e?this.setAttribute(b.PLAYBACK_TOKEN,e):this.removeAttribute(b.PLAYBACK_TOKEN))}get tokens(){let e=this.getAttribute(b.PLAYBACK_TOKEN),i=this.getAttribute(b.DRM_TOKEN);return{...De(this,Qn),...e!=null?{playback:e}:{},...i!=null?{drm:i}:{}}}set tokens(e){at(this,Qn,e??{})}get ended(){return $m(this.nativeEl,this._hls)}get envKey(){var e;return(e=this.getAttribute(b.ENV_KEY))!=null?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(b.ENV_KEY,e):this.removeAttribute(b.ENV_KEY))}get beaconCollectionDomain(){var e;return(e=this.getAttribute(b.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(b.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(b.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return(e=this.getAttribute(b.STREAM_TYPE))!=null?e:Dl(this.nativeEl)}set streamType(e){e!==this.streamType&&(e?this.setAttribute(b.STREAM_TYPE,e):this.removeAttribute(b.STREAM_TYPE))}get targetLiveWindow(){return this.hasAttribute(b.TARGET_LIVE_WINDOW)?+this.getAttribute(b.TARGET_LIVE_WINDOW):wb(this.nativeEl)}set targetLiveWindow(e){e!=this.targetLiveWindow&&(e==null?this.removeAttribute(b.TARGET_LIVE_WINDOW):this.setAttribute(b.TARGET_LIVE_WINDOW,`${+e}`))}get liveEdgeStart(){var e,i;if(this.hasAttribute(b.LIVE_EDGE_OFFSET)){let{liveEdgeOffset:a}=this,r=(e=this.nativeEl.seekable.end(0))!=null?e:0,n=(i=this.nativeEl.seekable.start(0))!=null?i:0;return Math.max(n,r-a)}return Ib(this.nativeEl)}get liveEdgeOffset(){if(this.hasAttribute(b.LIVE_EDGE_OFFSET))return+this.getAttribute(b.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){e!=this.liveEdgeOffset&&(e==null?this.removeAttribute(b.LIVE_EDGE_OFFSET):this.setAttribute(b.LIVE_EDGE_OFFSET,`${+e}`))}get seekable(){return jd(this.nativeEl)}async addCuePoints(e){return Rm(this.nativeEl,e)}get activeCuePoint(){return Cm(this.nativeEl)}get cuePoints(){return X_(this.nativeEl)}async addChapters(e){return Dm(this.nativeEl,e)}get activeChapter(){return Mm(this.nativeEl)}get chapters(){return eb(this.nativeEl)}getStartDate(){return ib(this.nativeEl,this._hls)}get currentPdt(){return ab(this.nativeEl,this._hls)}get preferPlayback(){let e=this.getAttribute(b.PREFER_PLAYBACK);if(e===Wt.MSE||e===Wt.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===Wt.MSE||e===Wt.NATIVE?this.setAttribute(b.PREFER_PLAYBACK,e):this.removeAttribute(b.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(e=>e.startsWith("metadata-")&&![b.METADATA_URL].includes(e)).reduce((e,i)=>{let a=this.getAttribute(i);return a!=null&&(e[i.replace(/^metadata-/,"").replace(/-/g,"_")]=a),e},{}),...De(this,Ir)}}set metadata(e){at(this,Ir,e??{}),this.mux&&this.mux.emit("hb",De(this,Ir))}get _hlsConfig(){return De(this,zn)}set _hlsConfig(e){at(this,zn,e)}get logo(){var e;return(e=this.getAttribute(b.LOGO))!=null?e:De(this,Rr)}set logo(e){e?this.setAttribute(b.LOGO,e):this.removeAttribute(b.LOGO)}load(){at(this,wt,Lb(this,this.nativeEl,De(this,wt)))}unload(){Hm(this.nativeEl,De(this,wt),this),at(this,wt,void 0)}attributeChangedCallback(e,i,a){var r,n;switch(kn.observedAttributes.includes(e)&&!["src","autoplay","preload"].includes(e)&&super.attributeChangedCallback(e,i,a),e){case b.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=a??void 0;break;case b.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=a??void 0;break;case"src":{let s=!!i,o=!!a;!s&&o?wn(this,va,Cr).call(this):s&&!o?this.unload():s&&o&&(this.unload(),wn(this,va,Cr).call(this));break}case"autoplay":if(a===i)break;(r=De(this,wt))==null||r.setAutoplay(this.autoplay);break;case"preload":if(a===i)break;(n=De(this,wt))==null||n.setPreload(a);break;case b.PLAYBACK_ID:this.src=Ll(this);break;case b.DEBUG:{let s=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=s);break}case b.METADATA_URL:a&&fetch(a).then(s=>s.json()).then(s=>this.metadata=s).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${a}!`));break;case b.STREAM_TYPE:(a==null||a!==i)&&this.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}));break;case b.TARGET_LIVE_WINDOW:(a==null||a!==i)&&this.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0,detail:this.targetLiveWindow}));break;case b.LOGO:(a==null||a!==i)&&this.updateLogo();break;case b.DISABLE_TRACKING:{if(a==null||a!==i){let s=this.currentTime,o=this.paused;this.unload(),wn(this,va,Cr).call(this).then(()=>{this.currentTime=s,o||this.play()})}break}case b.DISABLE_COOKIES:{(a==null||a!==i)&&this.disableCookies&&document.cookie.split(";").forEach(s=>{s.trim().startsWith("muxData")&&(document.cookie=s.replace(/^ +/,"").replace(/=.*/,"=;expires="+new Date().toUTCString()+";path=/"))});break}}}updateLogo(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector('slot[name="logo"]');if(!e)return;let i=this.constructor.getLogoHTML(De(this,Rr)||this.logo);e.innerHTML=i}connectedCallback(){var e;(e=super.connectedCallback)==null||e.call(this),this.nativeEl&&this.src&&!De(this,wt)&&wn(this,va,Cr).call(this)}disconnectedCallback(){this.unload()}handleEvent(e){e.target===this.nativeEl&&this.dispatchEvent(new CustomEvent(e.type,{composed:!0,detail:e.detail}))}};wt=new WeakMap,wr=new WeakMap,Gn=new WeakMap,Ir=new WeakMap,Qn=new WeakMap,zn=new WeakMap,jn=new WeakMap,Zn=new WeakMap,Xn=new WeakMap,Rr=new WeakMap,va=new WeakSet,Cr=async function(){De(this,wr)||(await at(this,wr,Promise.resolve()),at(this,wr,null),this.load())};const zi=new WeakMap;class nl extends Error{}class Yb extends Error{}const Gb=["application/x-mpegURL","application/vnd.apple.mpegurl","audio/mpegurl"],Qb=globalThis.WeakRef?class extends Set{add(t){super.add(new WeakRef(t))}forEach(t){super.forEach(e=>{const i=e.deref();i&&t(i)})}}:Set;function zb(t){globalThis.chrome?.cast?.isAvailable?globalThis.cast?.framework?t():customElements.whenDefined("google-cast-button").then(t):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(t)}}function jb(){return globalThis.chrome}function Zb(){const t="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";if(globalThis.chrome?.cast||document.querySelector(`script[src="${t}"]`))return;const e=document.createElement("script");e.src=t,document.head.append(e)}function Ti(){return globalThis.cast?.framework?.CastContext.getInstance()}function Jd(){return Ti()?.getCurrentSession()}function eu(){return Jd()?.getSessionObj().media[0]}function Xb(t){return new Promise((e,i)=>{eu().editTracksInfo(t,e,i)})}function Jb(t){return new Promise((e,i)=>{eu().getStatus(t,e,i)})}function Hc(t){return Ti().setOptions({...Ym(),...t})}function Ym(){return{receiverApplicationId:"CC1AD845",autoJoinPolicy:"origin_scoped",androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0}}function eg(t){if(!t)return;const e=/\.([a-zA-Z0-9]+)(?:\?.*)?$/,i=t.match(e);return i?i[1]:null}function tg(t){const e=t.split(`
64
64
  `),i=[];for(let a=0;a<e.length;a++)if(e[a].trim().startsWith("#EXT-X-STREAM-INF")){const n=e[a+1]?e[a+1].trim():"";n&&!n.startsWith("#")&&i.push(n)}return i}function ig(t){return t.split(`
65
- `).find(a=>!a.trim().startsWith("#")&&a.trim()!=="")}async function ag(t){try{const i=(await fetch(t,{method:"HEAD"})).headers.get("Content-Type");return Gb.some(a=>i===a)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function rg(t){try{const e=await(await fetch(t)).text();let i=e;const a=tg(e);if(a.length>0){const s=new URL(a[0],t).toString();i=await(await fetch(s)).text()}const r=ig(i);return eg(r)}catch(e){console.error("Error while trying to parse the manifest playlist",e);return}}const Xn=new Qb,oi=new WeakSet;let ge;zb(()=>{if(!globalThis.chrome?.cast?.isAvailable){console.debug("chrome.cast.isAvailable",globalThis.chrome?.cast?.isAvailable);return}ge||(ge=cast.framework,Ti().addEventListener(ge.CastContextEventType.CAST_STATE_CHANGED,t=>{Xn.forEach(e=>zi.get(e).onCastStateChanged?.(t))}),Ti().addEventListener(ge.CastContextEventType.SESSION_STATE_CHANGED,t=>{Xn.forEach(e=>zi.get(e).onSessionStateChanged?.(t))}),Xn.forEach(t=>zi.get(t).init?.()))});let Bc=0;class ng extends EventTarget{#t;#s;#i;#a;#e="disconnected";#r=!1;#o=new Set;#c=new WeakMap;constructor(e){super(),this.#t=e,Xn.add(this),zi.set(this,{init:()=>this.#d(),onCastStateChanged:()=>this.#l(),onSessionStateChanged:()=>this.#p(),getCastPlayer:()=>this.#n}),this.#d()}get#n(){if(oi.has(this.#t))return this.#i}get state(){return this.#e}async watchAvailability(e){if(this.#t.disableRemotePlayback)throw new nl("disableRemotePlayback attribute is present.");return this.#c.set(e,++Bc),this.#o.add(e),queueMicrotask(()=>e(this.#m())),Bc}async cancelWatchAvailability(e){if(this.#t.disableRemotePlayback)throw new nl("disableRemotePlayback attribute is present.");e?this.#o.delete(e):this.#o.clear()}async prompt(){if(this.#t.disableRemotePlayback)throw new nl("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new Yb("The RemotePlayback API is disabled on this platform.");const e=oi.has(this.#t);oi.add(this.#t),Hc(this.#t.castOptions),Object.entries(this.#a).forEach(([i,a])=>{this.#i.controller.addEventListener(i,a)});try{await Ti().requestSession()}catch(i){if(e||oi.delete(this.#t),i==="cancel")return;throw new Error(i)}zi.get(this.#t)?.loadOnPrompt?.()}#h(){oi.has(this.#t)&&(Object.entries(this.#a).forEach(([e,i])=>{this.#i.controller.removeEventListener(e,i)}),oi.delete(this.#t),this.#t.muted=this.#i.isMuted,this.#t.currentTime=this.#i.savedPlayerState.currentTime,this.#i.savedPlayerState.isPaused===!1&&this.#t.play())}#m(){const e=Ti()?.getCastState();return e&&e!=="NO_DEVICES_AVAILABLE"}#l(){const e=Ti().getCastState();if(oi.has(this.#t)&&e==="CONNECTING"&&(this.#e="connecting",this.dispatchEvent(new Event("connecting"))),!this.#r&&e?.includes("CONNECT")){this.#r=!0;for(let i of this.#o)i(!0)}else if(this.#r&&(!e||e==="NO_DEVICES_AVAILABLE")){this.#r=!1;for(let i of this.#o)i(!1)}}async#p(){const{SESSION_RESUMED:e}=ge.SessionState;if(Ti().getSessionState()===e&&this.#t.castSrc===eu()?.media.contentId){oi.add(this.#t),Object.entries(this.#a).forEach(([i,a])=>{this.#i.controller.addEventListener(i,a)});try{await Jb(new chrome.cast.media.GetStatusRequest)}catch(i){console.error(i)}this.#a[ge.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#a[ge.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}#d(){!ge||this.#s||(this.#s=!0,Hc(this.#t.castOptions),this.#t.textTracks.addEventListener("change",()=>this.#u()),this.#l(),this.#i=new ge.RemotePlayer,new ge.RemotePlayerController(this.#i),this.#a={[ge.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{e===!0?(this.#e="connected",this.dispatchEvent(new Event("connect"))):(this.#h(),this.#e="disconnected",this.dispatchEvent(new Event("disconnect")))},[ge.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#t.dispatchEvent(new Event("durationchange"))},[ge.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[ge.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[ge.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#n?.isMediaLoaded&&this.#t.dispatchEvent(new Event("timeupdate"))},[ge.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#t.dispatchEvent(new Event("resize"))},[ge.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#t.dispatchEvent(new Event(this.paused?"pause":"play"))},[ge.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#n?.playerState!==chrome.cast.media.PlayerState.PAUSED&&this.#t.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[this.#n?.playerState]))},[ge.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#n?.isMediaLoaded&&(await Promise.resolve(),this.#v())}})}#v(){this.#u()}async#u(){if(!this.#n)return;const i=(this.#i.mediaInfo?.tracks??[]).filter(({type:p})=>p===chrome.cast.media.TrackType.TEXT),a=[...this.#t.textTracks].filter(({kind:p})=>p==="subtitles"||p==="captions"),r=i.map(({language:p,name:h,trackId:u})=>{const{mode:v}=a.find(E=>E.language===p&&E.label===h)??{};return v?{mode:v,trackId:u}:!1}).filter(Boolean),s=r.filter(({mode:p})=>p!=="showing").map(({trackId:p})=>p),o=r.find(({mode:p})=>p==="showing"),l=Jd()?.getSessionObj().media[0]?.activeTrackIds??[];let d=l;if(l.length&&(d=d.filter(p=>!s.includes(p))),o?.trackId&&(d=[...d,o.trackId]),d=[...new Set(d)],!((p,h)=>p.length===h.length&&p.every(u=>h.includes(u)))(l,d))try{const p=new chrome.cast.media.EditTracksInfoRequest(d);await Xb(p)}catch(p){console.error(p)}}}const sg=t=>class extends t{static observedAttributes=[...t.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#t={paused:!1};#s=Ym();#i;#a;get remote(){return this.#a?this.#a:jb()?(this.disableRemotePlayback||Zb(),zi.set(this,{loadOnPrompt:()=>this.#r()}),this.#a=new ng(this)):super.remote}get#e(){return zi.get(this.remote)?.getCastPlayer?.()}attributeChangedCallback(i,a,r){if(super.attributeChangedCallback(i,a,r),i==="cast-receiver"&&r){this.#s.receiverApplicationId=r;return}if(this.#e)switch(i){case"cast-stream-type":case"cast-src":this.load();break}}async#r(){this.#t.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(i){console.error(i)}}async load(){if(!this.#e)return super.load();const i=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);i.customData=this.castCustomData;const a=[...this.querySelectorAll("track")].filter(({kind:o,src:l})=>l&&(o==="subtitles"||o==="captions")),r=[];let n=0;if(a.length&&(i.tracks=a.map(o=>{const l=++n;r.length===0&&o.track.mode==="showing"&&r.push(l);const d=new chrome.cast.media.Track(l,chrome.cast.media.TrackType.TEXT);return d.trackContentId=o.src,d.trackContentType="text/vtt",d.subtype=o.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,d.name=o.label,d.language=o.srclang,d})),this.castStreamType==="live"?i.streamType=chrome.cast.media.StreamType.LIVE:i.streamType=chrome.cast.media.StreamType.BUFFERED,i.metadata=new chrome.cast.media.GenericMediaMetadata,i.metadata.title=this.title,i.metadata.images=[{url:this.poster}],ag(this.castSrc)){const o=await rg(this.castSrc);o?.includes("m4s")||o?.includes("mp4")?(i.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,i.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):o?.includes("ts")&&(i.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,i.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS)}const s=new chrome.cast.media.LoadRequest(i);s.currentTime=super.currentTime??0,s.autoplay=!this.#t.paused,s.activeTrackIds=r,await Jd()?.loadMedia(s),this.dispatchEvent(new Event("volumechange"))}play(){if(this.#e){this.#e.isPaused&&this.#e.controller?.playOrPause();return}return super.play()}pause(){if(this.#e){this.#e.isPaused||this.#e.controller?.playOrPause();return}super.pause()}get castOptions(){return this.#s}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(i){this.castReceiver!=i&&this.setAttribute("cast-receiver",`${i}`)}get castSrc(){return this.getAttribute("cast-src")??this.querySelector("source")?.src??this.currentSrc}set castSrc(i){this.castSrc!=i&&this.setAttribute("cast-src",`${i}`)}get castContentType(){return this.getAttribute("cast-content-type")??void 0}set castContentType(i){this.setAttribute("cast-content-type",`${i}`)}get castStreamType(){return this.getAttribute("cast-stream-type")??this.streamType??void 0}set castStreamType(i){this.setAttribute("cast-stream-type",`${i}`)}get castCustomData(){return this.#i}set castCustomData(i){const a=typeof i;if(!["object","undefined"].includes(a)){console.error(`castCustomData must be nullish or an object but value was of type ${a}`);return}this.#i=i}get readyState(){if(this.#e)switch(this.#e.playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return this.#e?this.#e.isPaused:super.paused}get muted(){return this.#e?this.#e?.isMuted:super.muted}set muted(i){if(this.#e){(i&&!this.#e.isMuted||!i&&this.#e.isMuted)&&this.#e.controller?.muteOrUnmute();return}super.muted=i}get volume(){return this.#e?this.#e?.volumeLevel??1:super.volume}set volume(i){if(this.#e){this.#e.volumeLevel=+i,this.#e.controller?.setVolumeLevel();return}super.volume=i}get duration(){return this.#e&&this.#e?.isMediaLoaded?this.#e?.duration??NaN:super.duration}get currentTime(){return this.#e&&this.#e?.isMediaLoaded?this.#e?.currentTime??0:super.currentTime}set currentTime(i){if(this.#e){this.#e.currentTime=i,this.#e.controller?.seek();return}super.currentTime=i}};var Gm=t=>{throw TypeError(t)},Qm=(t,e,i)=>e.has(t)||Gm("Cannot "+i),og=(t,e,i)=>(Qm(t,e,"read from private field"),i?i.call(t):e.get(t)),lg=(t,e,i)=>e.has(t)?Gm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),dg=(t,e,i,a)=>(Qm(t,e,"write to private field"),e.set(t,i),i),zm=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment>"u"){class t extends zm{}globalThis.DocumentFragment=t}var ug=class extends zm{},cg={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(ug)}},hg={customElements:cg},mg=typeof window>"u"||typeof globalThis.customElements>"u",sl=mg?hg:globalThis,Jn,Wc=class extends sg(mf(qb)){constructor(){super(...arguments),lg(this,Jn)}get autoplay(){let t=this.getAttribute("autoplay");return t===null?!1:t===""?!0:t}set autoplay(t){let e=this.autoplay;t!==e&&(t?this.setAttribute("autoplay",typeof t=="string"?t:""):this.removeAttribute("autoplay"))}get muxCastCustomData(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}get castCustomData(){var t;return(t=og(this,Jn))!=null?t:this.muxCastCustomData}set castCustomData(t){dg(this,Jn,t)}};Jn=new WeakMap;sl.customElements.get("mux-video")||(sl.customElements.define("mux-video",Wc),sl.MuxVideoElement=Wc);const I={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},Y={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},jm={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},Zm=Object.entries(jm),c=Zm.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{}),pg={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},ri=Zm.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{...pg});Object.entries(ri).reduce((t,[e,i])=>{const a=c[e];return a&&(t[i]=a),t},{userinactivechange:"userinactive"});const vg=Object.entries(c).reduce((t,[e,i])=>{const a=ri[e];return a&&(t[i]=a),t},{userinactive:"userinactivechange"}),Vt={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},Ka={DISABLED:"disabled",SHOWING:"showing"},ol={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Ye={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},Xt={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},fg={FULLSCREEN:"fullscreen"};function Eg(t){return t?.map(bg).join(" ")}function _g(t){return t?.split(/\s+/).map(gg)}function bg(t){if(t){const{id:e,width:i,height:a}=t;return[e,i,a].filter(r=>r!=null).join(":")}}function gg(t){if(t){const[e,i,a]=t.split(":");return{id:e,width:+i,height:+a}}}function yg(t){return t?.map(Ag).join(" ")}function Tg(t){return t?.split(/\s+/).map(kg)}function Ag(t){if(t){const{id:e,kind:i,language:a,label:r}=t;return[e,i,a,r].filter(n=>n!=null).join(":")}}function kg(t){if(t){const[e,i,a,r]=t.split(":");return{id:e,kind:i,language:a,label:r}}}function Sg(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function tu(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function Xm(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))}const Jm=t=>new Promise(e=>setTimeout(e,t)),Fc=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],wg=(t,e)=>{const i=t===1?Fc[e].singular:Fc[e].plural;return`${t} ${i}`},Qr=t=>{if(!tu(t))return"";const e=Math.abs(t),i=e!==t,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((o,l)=>o&&wg(o,l)).filter(o=>o).join(", ")}${i?" remaining":""}`};function ki(t,e){let i=!1;t<0&&(i=!0,t=0-t),t=t<0?0:t;let a=Math.floor(t%60),r=Math.floor(t/60%60),n=Math.floor(t/3600);const s=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(n=r=a="0"),n=n>0||o>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(i?"-":"")+n+r+a}const Ig={"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."};var Kc;const ll={en:Ig};let xl=((Kc=globalThis.navigator)==null?void 0:Kc.language)||"en";const Rg=t=>{xl=t},Cg=t=>{var e,i,a;const[r]=xl.split("-");return((e=ll[xl])==null?void 0:e[t])||((i=ll[r])==null?void 0:i[t])||((a=ll.en)==null?void 0:a[t])||t},L=(t,e={})=>Cg(t).replace(/\{(\w+)\}/g,(i,a)=>a in e?String(e[a]):`{${a}}`);let ep=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}};class tp extends ep{}let Vc=class extends tp{constructor(){super(...arguments),this.role=null}};class Lg{observe(){}unobserve(){}disconnect(){}}const ip={createElement:function(){return new sn.HTMLElement},createElementNS:function(){return new sn.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return!1}},sn={ResizeObserver:Lg,document:ip,Node:tp,Element:Vc,HTMLElement:class extends Vc{constructor(){super(...arguments),this.innerHTML=""}get content(){return new sn.DocumentFragment}},DocumentFragment:class extends ep{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(t){return{matches:!1,media:t}},DOMParser:class{parseFromString(e,i){return{body:{textContent:e}}}}},ap="global"in globalThis&&globalThis?.global===globalThis||typeof window>"u"||typeof window.customElements>"u",rp=Object.keys(sn).every(t=>t in globalThis),f=ap&&!rp?sn:globalThis,_e=ap&&!rp?ip:globalThis.document,qc=new WeakMap,iu=t=>{let e=qc.get(t);return e||qc.set(t,e=new Set),e},np=new f.ResizeObserver(t=>{for(const e of t)for(const i of iu(e.target))i(e)});function Xa(t,e){iu(t).add(e),np.observe(t)}function Ja(t,e){const i=iu(t);i.delete(e),i.size||np.unobserve(t)}function Xe(t){const e={};for(const i of t)e[i.name]=i.value;return e}function Be(t){var e;return(e=Ol(t))!=null?e:rr(t,"media-controller")}function Ol(t){var e;const{MEDIA_CONTROLLER:i}=Y,a=t.getAttribute(i);if(a)return(e=xo(t))==null?void 0:e.getElementById(a)}const sp=(t,e,i=".value")=>{const a=t.querySelector(i);a&&(a.textContent=e)},Dg=(t,e)=>{const i=`slot[name="${e}"]`,a=t.shadowRoot.querySelector(i);return a?a.children:[]},op=(t,e)=>Dg(t,e)[0],si=(t,e)=>!t||!e?!1:t?.contains(e)?!0:si(t,e.getRootNode().host),rr=(t,e)=>{if(!t)return null;const i=t.closest(e);return i||rr(t.getRootNode().host,e)};function au(t=document){var e;const i=t?.activeElement;return i?(e=au(i.shadowRoot))!=null?e:i:null}function xo(t){var e;const i=(e=t?.getRootNode)==null?void 0:e.call(t);return i instanceof ShadowRoot||i instanceof Document?i:null}function lp(t,{depth:e=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=t;for(;r&&e>0;){const n=getComputedStyle(r);if(i&&n.opacity==="0"||a&&n.visibility==="hidden"||n.display==="none")return!1;r=r.parentElement,e--}return!0}function Mg(t,e,i,a){const r=a.x-i.x,n=a.y-i.y,s=r*r+n*n;if(s===0)return 0;const o=((t-i.x)*r+(e-i.y)*n)/s;return Math.max(0,Math.min(1,o))}function ye(t,e){const i=xg(t,a=>a===e);return i||ru(t,e)}function xg(t,e){var i,a;let r;for(r of(i=t.querySelectorAll("style:not([media])"))!=null?i:[]){let n;try{n=(a=r.sheet)==null?void 0:a.cssRules}catch{continue}for(const s of n??[])if(e(s.selectorText))return s}}function ru(t,e){var i,a;const r=(i=t.querySelectorAll("style:not([media])"))!=null?i:[],n=r?.[r.length-1];return n?.sheet?(n?.sheet.insertRule(`${e}{}`,n.sheet.cssRules.length),(a=n.sheet.cssRules)==null?void 0:a[n.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function ie(t,e,i=Number.NaN){const a=t.getAttribute(e);return a!=null?+a:i}function ue(t,e,i){const a=+i;if(i==null||Number.isNaN(a)){t.hasAttribute(e)&&t.removeAttribute(e);return}ie(t,e,void 0)!==a&&t.setAttribute(e,`${a}`)}function W(t,e){return t.hasAttribute(e)}function F(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}W(t,e)!=i&&t.toggleAttribute(e,i)}function ae(t,e,i=null){var a;return(a=t.getAttribute(e))!=null?a:i}function re(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}const a=`${i}`;ae(t,e,void 0)!==a&&t.setAttribute(e,a)}var dp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},li=(t,e,i)=>(dp(t,e,"read from private field"),i?i.call(t):e.get(t)),Og=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},wn=(t,e,i,a)=>(dp(t,e,"write to private field"),e.set(t,i),i),$e;function Ng(t){return`
65
+ `).find(a=>!a.trim().startsWith("#")&&a.trim()!=="")}async function ag(t){try{const i=(await fetch(t,{method:"HEAD"})).headers.get("Content-Type");return Gb.some(a=>i===a)}catch(e){return console.error("Error while trying to get the Content-Type of the manifest",e),!1}}async function rg(t){try{const e=await(await fetch(t)).text();let i=e;const a=tg(e);if(a.length>0){const s=new URL(a[0],t).toString();i=await(await fetch(s)).text()}const r=ig(i);return eg(r)}catch(e){console.error("Error while trying to parse the manifest playlist",e);return}}const Jn=new Qb,oi=new WeakSet;let ge;zb(()=>{if(!globalThis.chrome?.cast?.isAvailable){console.debug("chrome.cast.isAvailable",globalThis.chrome?.cast?.isAvailable);return}ge||(ge=cast.framework,Ti().addEventListener(ge.CastContextEventType.CAST_STATE_CHANGED,t=>{Jn.forEach(e=>zi.get(e).onCastStateChanged?.(t))}),Ti().addEventListener(ge.CastContextEventType.SESSION_STATE_CHANGED,t=>{Jn.forEach(e=>zi.get(e).onSessionStateChanged?.(t))}),Jn.forEach(t=>zi.get(t).init?.()))});let Bc=0;class ng extends EventTarget{#t;#s;#i;#a;#e="disconnected";#r=!1;#o=new Set;#c=new WeakMap;constructor(e){super(),this.#t=e,Jn.add(this),zi.set(this,{init:()=>this.#d(),onCastStateChanged:()=>this.#l(),onSessionStateChanged:()=>this.#p(),getCastPlayer:()=>this.#n}),this.#d()}get#n(){if(oi.has(this.#t))return this.#i}get state(){return this.#e}async watchAvailability(e){if(this.#t.disableRemotePlayback)throw new nl("disableRemotePlayback attribute is present.");return this.#c.set(e,++Bc),this.#o.add(e),queueMicrotask(()=>e(this.#m())),Bc}async cancelWatchAvailability(e){if(this.#t.disableRemotePlayback)throw new nl("disableRemotePlayback attribute is present.");e?this.#o.delete(e):this.#o.clear()}async prompt(){if(this.#t.disableRemotePlayback)throw new nl("disableRemotePlayback attribute is present.");if(!globalThis.chrome?.cast?.isAvailable)throw new Yb("The RemotePlayback API is disabled on this platform.");const e=oi.has(this.#t);oi.add(this.#t),Hc(this.#t.castOptions),Object.entries(this.#a).forEach(([i,a])=>{this.#i.controller.addEventListener(i,a)});try{await Ti().requestSession()}catch(i){if(e||oi.delete(this.#t),i==="cancel")return;throw new Error(i)}zi.get(this.#t)?.loadOnPrompt?.()}#h(){oi.has(this.#t)&&(Object.entries(this.#a).forEach(([e,i])=>{this.#i.controller.removeEventListener(e,i)}),oi.delete(this.#t),this.#t.muted=this.#i.isMuted,this.#t.currentTime=this.#i.savedPlayerState.currentTime,this.#i.savedPlayerState.isPaused===!1&&this.#t.play())}#m(){const e=Ti()?.getCastState();return e&&e!=="NO_DEVICES_AVAILABLE"}#l(){const e=Ti().getCastState();if(oi.has(this.#t)&&e==="CONNECTING"&&(this.#e="connecting",this.dispatchEvent(new Event("connecting"))),!this.#r&&e?.includes("CONNECT")){this.#r=!0;for(let i of this.#o)i(!0)}else if(this.#r&&(!e||e==="NO_DEVICES_AVAILABLE")){this.#r=!1;for(let i of this.#o)i(!1)}}async#p(){const{SESSION_RESUMED:e}=ge.SessionState;if(Ti().getSessionState()===e&&this.#t.castSrc===eu()?.media.contentId){oi.add(this.#t),Object.entries(this.#a).forEach(([i,a])=>{this.#i.controller.addEventListener(i,a)});try{await Jb(new chrome.cast.media.GetStatusRequest)}catch(i){console.error(i)}this.#a[ge.RemotePlayerEventType.IS_PAUSED_CHANGED](),this.#a[ge.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}}#d(){!ge||this.#s||(this.#s=!0,Hc(this.#t.castOptions),this.#t.textTracks.addEventListener("change",()=>this.#u()),this.#l(),this.#i=new ge.RemotePlayer,new ge.RemotePlayerController(this.#i),this.#a={[ge.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:e})=>{e===!0?(this.#e="connected",this.dispatchEvent(new Event("connect"))):(this.#h(),this.#e="disconnected",this.dispatchEvent(new Event("disconnect")))},[ge.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.#t.dispatchEvent(new Event("durationchange"))},[ge.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[ge.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.#t.dispatchEvent(new Event("volumechange"))},[ge.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{this.#n?.isMediaLoaded&&this.#t.dispatchEvent(new Event("timeupdate"))},[ge.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.#t.dispatchEvent(new Event("resize"))},[ge.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.#t.dispatchEvent(new Event(this.paused?"pause":"play"))},[ge.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{this.#n?.playerState!==chrome.cast.media.PlayerState.PAUSED&&this.#t.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[this.#n?.playerState]))},[ge.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{this.#n?.isMediaLoaded&&(await Promise.resolve(),this.#v())}})}#v(){this.#u()}async#u(){if(!this.#n)return;const i=(this.#i.mediaInfo?.tracks??[]).filter(({type:p})=>p===chrome.cast.media.TrackType.TEXT),a=[...this.#t.textTracks].filter(({kind:p})=>p==="subtitles"||p==="captions"),r=i.map(({language:p,name:h,trackId:u})=>{const{mode:v}=a.find(E=>E.language===p&&E.label===h)??{};return v?{mode:v,trackId:u}:!1}).filter(Boolean),s=r.filter(({mode:p})=>p!=="showing").map(({trackId:p})=>p),o=r.find(({mode:p})=>p==="showing"),l=Jd()?.getSessionObj().media[0]?.activeTrackIds??[];let d=l;if(l.length&&(d=d.filter(p=>!s.includes(p))),o?.trackId&&(d=[...d,o.trackId]),d=[...new Set(d)],!((p,h)=>p.length===h.length&&p.every(u=>h.includes(u)))(l,d))try{const p=new chrome.cast.media.EditTracksInfoRequest(d);await Xb(p)}catch(p){console.error(p)}}}const sg=t=>class extends t{static observedAttributes=[...t.observedAttributes??[],"cast-src","cast-content-type","cast-stream-type","cast-receiver"];#t={paused:!1};#s=Ym();#i;#a;get remote(){return this.#a?this.#a:jb()?(this.disableRemotePlayback||Zb(),zi.set(this,{loadOnPrompt:()=>this.#r()}),this.#a=new ng(this)):super.remote}get#e(){return zi.get(this.remote)?.getCastPlayer?.()}attributeChangedCallback(i,a,r){if(super.attributeChangedCallback(i,a,r),i==="cast-receiver"&&r){this.#s.receiverApplicationId=r;return}if(this.#e)switch(i){case"cast-stream-type":case"cast-src":this.load();break}}async#r(){this.#t.paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(i){console.error(i)}}async load(){if(!this.#e)return super.load();const i=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType);i.customData=this.castCustomData;const a=[...this.querySelectorAll("track")].filter(({kind:o,src:l})=>l&&(o==="subtitles"||o==="captions")),r=[];let n=0;if(a.length&&(i.tracks=a.map(o=>{const l=++n;r.length===0&&o.track.mode==="showing"&&r.push(l);const d=new chrome.cast.media.Track(l,chrome.cast.media.TrackType.TEXT);return d.trackContentId=o.src,d.trackContentType="text/vtt",d.subtype=o.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,d.name=o.label,d.language=o.srclang,d})),this.castStreamType==="live"?i.streamType=chrome.cast.media.StreamType.LIVE:i.streamType=chrome.cast.media.StreamType.BUFFERED,i.metadata=new chrome.cast.media.GenericMediaMetadata,i.metadata.title=this.title,i.metadata.images=[{url:this.poster}],ag(this.castSrc)){const o=await rg(this.castSrc);o?.includes("m4s")||o?.includes("mp4")?(i.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.FMP4,i.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.FMP4):o?.includes("ts")&&(i.hlsSegmentFormat=chrome.cast.media.HlsSegmentFormat.TS,i.hlsVideoSegmentFormat=chrome.cast.media.HlsVideoSegmentFormat.TS)}const s=new chrome.cast.media.LoadRequest(i);s.currentTime=super.currentTime??0,s.autoplay=!this.#t.paused,s.activeTrackIds=r,await Jd()?.loadMedia(s),this.dispatchEvent(new Event("volumechange"))}play(){if(this.#e){this.#e.isPaused&&this.#e.controller?.playOrPause();return}return super.play()}pause(){if(this.#e){this.#e.isPaused||this.#e.controller?.playOrPause();return}super.pause()}get castOptions(){return this.#s}get castReceiver(){return this.getAttribute("cast-receiver")??void 0}set castReceiver(i){this.castReceiver!=i&&this.setAttribute("cast-receiver",`${i}`)}get castSrc(){return this.getAttribute("cast-src")??this.querySelector("source")?.src??this.currentSrc}set castSrc(i){this.castSrc!=i&&this.setAttribute("cast-src",`${i}`)}get castContentType(){return this.getAttribute("cast-content-type")??void 0}set castContentType(i){this.setAttribute("cast-content-type",`${i}`)}get castStreamType(){return this.getAttribute("cast-stream-type")??this.streamType??void 0}set castStreamType(i){this.setAttribute("cast-stream-type",`${i}`)}get castCustomData(){return this.#i}set castCustomData(i){const a=typeof i;if(!["object","undefined"].includes(a)){console.error(`castCustomData must be nullish or an object but value was of type ${a}`);return}this.#i=i}get readyState(){if(this.#e)switch(this.#e.playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return this.#e?this.#e.isPaused:super.paused}get muted(){return this.#e?this.#e?.isMuted:super.muted}set muted(i){if(this.#e){(i&&!this.#e.isMuted||!i&&this.#e.isMuted)&&this.#e.controller?.muteOrUnmute();return}super.muted=i}get volume(){return this.#e?this.#e?.volumeLevel??1:super.volume}set volume(i){if(this.#e){this.#e.volumeLevel=+i,this.#e.controller?.setVolumeLevel();return}super.volume=i}get duration(){return this.#e&&this.#e?.isMediaLoaded?this.#e?.duration??NaN:super.duration}get currentTime(){return this.#e&&this.#e?.isMediaLoaded?this.#e?.currentTime??0:super.currentTime}set currentTime(i){if(this.#e){this.#e.currentTime=i,this.#e.controller?.seek();return}super.currentTime=i}};var Gm=t=>{throw TypeError(t)},Qm=(t,e,i)=>e.has(t)||Gm("Cannot "+i),og=(t,e,i)=>(Qm(t,e,"read from private field"),i?i.call(t):e.get(t)),lg=(t,e,i)=>e.has(t)?Gm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),dg=(t,e,i,a)=>(Qm(t,e,"write to private field"),e.set(t,i),i),zm=class{addEventListener(){}removeEventListener(){}dispatchEvent(e){return!0}};if(typeof DocumentFragment>"u"){class t extends zm{}globalThis.DocumentFragment=t}var ug=class extends zm{},cg={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(ug)}},hg={customElements:cg},mg=typeof window>"u"||typeof globalThis.customElements>"u",sl=mg?hg:globalThis,es,Wc=class extends sg(mf(qb)){constructor(){super(...arguments),lg(this,es)}get autoplay(){let t=this.getAttribute("autoplay");return t===null?!1:t===""?!0:t}set autoplay(t){let e=this.autoplay;t!==e&&(t?this.setAttribute("autoplay",typeof t=="string"?t:""):this.removeAttribute("autoplay"))}get muxCastCustomData(){return{mux:{playbackId:this.playbackId,minResolution:this.minResolution,maxResolution:this.maxResolution,renditionOrder:this.renditionOrder,customDomain:this.customDomain,tokens:{drm:this.drmToken},envKey:this.envKey,metadata:this.metadata,disableCookies:this.disableCookies,disableTracking:this.disableTracking,beaconCollectionDomain:this.beaconCollectionDomain,startTime:this.startTime,preferCmcd:this.preferCmcd}}}get castCustomData(){var t;return(t=og(this,es))!=null?t:this.muxCastCustomData}set castCustomData(t){dg(this,es,t)}};es=new WeakMap;sl.customElements.get("mux-video")||(sl.customElements.define("mux-video",Wc),sl.MuxVideoElement=Wc);const I={MEDIA_PLAY_REQUEST:"mediaplayrequest",MEDIA_PAUSE_REQUEST:"mediapauserequest",MEDIA_MUTE_REQUEST:"mediamuterequest",MEDIA_UNMUTE_REQUEST:"mediaunmuterequest",MEDIA_LOOP_REQUEST:"medialooprequest",MEDIA_VOLUME_REQUEST:"mediavolumerequest",MEDIA_SEEK_REQUEST:"mediaseekrequest",MEDIA_AIRPLAY_REQUEST:"mediaairplayrequest",MEDIA_ENTER_FULLSCREEN_REQUEST:"mediaenterfullscreenrequest",MEDIA_EXIT_FULLSCREEN_REQUEST:"mediaexitfullscreenrequest",MEDIA_PREVIEW_REQUEST:"mediapreviewrequest",MEDIA_ENTER_PIP_REQUEST:"mediaenterpiprequest",MEDIA_EXIT_PIP_REQUEST:"mediaexitpiprequest",MEDIA_ENTER_CAST_REQUEST:"mediaentercastrequest",MEDIA_EXIT_CAST_REQUEST:"mediaexitcastrequest",MEDIA_SHOW_TEXT_TRACKS_REQUEST:"mediashowtexttracksrequest",MEDIA_HIDE_TEXT_TRACKS_REQUEST:"mediahidetexttracksrequest",MEDIA_SHOW_SUBTITLES_REQUEST:"mediashowsubtitlesrequest",MEDIA_DISABLE_SUBTITLES_REQUEST:"mediadisablesubtitlesrequest",MEDIA_TOGGLE_SUBTITLES_REQUEST:"mediatogglesubtitlesrequest",MEDIA_PLAYBACK_RATE_REQUEST:"mediaplaybackraterequest",MEDIA_RENDITION_REQUEST:"mediarenditionrequest",MEDIA_AUDIO_TRACK_REQUEST:"mediaaudiotrackrequest",MEDIA_SEEK_TO_LIVE_REQUEST:"mediaseektoliverequest",REGISTER_MEDIA_STATE_RECEIVER:"registermediastatereceiver",UNREGISTER_MEDIA_STATE_RECEIVER:"unregistermediastatereceiver"},Y={MEDIA_CHROME_ATTRIBUTES:"mediachromeattributes",MEDIA_CONTROLLER:"mediacontroller"},jm={MEDIA_AIRPLAY_UNAVAILABLE:"mediaAirplayUnavailable",MEDIA_AUDIO_TRACK_ENABLED:"mediaAudioTrackEnabled",MEDIA_AUDIO_TRACK_LIST:"mediaAudioTrackList",MEDIA_AUDIO_TRACK_UNAVAILABLE:"mediaAudioTrackUnavailable",MEDIA_BUFFERED:"mediaBuffered",MEDIA_CAST_UNAVAILABLE:"mediaCastUnavailable",MEDIA_CHAPTERS_CUES:"mediaChaptersCues",MEDIA_CURRENT_TIME:"mediaCurrentTime",MEDIA_DURATION:"mediaDuration",MEDIA_ENDED:"mediaEnded",MEDIA_ERROR:"mediaError",MEDIA_ERROR_CODE:"mediaErrorCode",MEDIA_ERROR_MESSAGE:"mediaErrorMessage",MEDIA_FULLSCREEN_UNAVAILABLE:"mediaFullscreenUnavailable",MEDIA_HAS_PLAYED:"mediaHasPlayed",MEDIA_HEIGHT:"mediaHeight",MEDIA_IS_AIRPLAYING:"mediaIsAirplaying",MEDIA_IS_CASTING:"mediaIsCasting",MEDIA_IS_FULLSCREEN:"mediaIsFullscreen",MEDIA_IS_PIP:"mediaIsPip",MEDIA_LOADING:"mediaLoading",MEDIA_MUTED:"mediaMuted",MEDIA_LOOP:"mediaLoop",MEDIA_PAUSED:"mediaPaused",MEDIA_PIP_UNAVAILABLE:"mediaPipUnavailable",MEDIA_PLAYBACK_RATE:"mediaPlaybackRate",MEDIA_PREVIEW_CHAPTER:"mediaPreviewChapter",MEDIA_PREVIEW_COORDS:"mediaPreviewCoords",MEDIA_PREVIEW_IMAGE:"mediaPreviewImage",MEDIA_PREVIEW_TIME:"mediaPreviewTime",MEDIA_RENDITION_LIST:"mediaRenditionList",MEDIA_RENDITION_SELECTED:"mediaRenditionSelected",MEDIA_RENDITION_UNAVAILABLE:"mediaRenditionUnavailable",MEDIA_SEEKABLE:"mediaSeekable",MEDIA_STREAM_TYPE:"mediaStreamType",MEDIA_SUBTITLES_LIST:"mediaSubtitlesList",MEDIA_SUBTITLES_SHOWING:"mediaSubtitlesShowing",MEDIA_TARGET_LIVE_WINDOW:"mediaTargetLiveWindow",MEDIA_TIME_IS_LIVE:"mediaTimeIsLive",MEDIA_VOLUME:"mediaVolume",MEDIA_VOLUME_LEVEL:"mediaVolumeLevel",MEDIA_VOLUME_UNAVAILABLE:"mediaVolumeUnavailable",MEDIA_LANG:"mediaLang",MEDIA_WIDTH:"mediaWidth"},Zm=Object.entries(jm),c=Zm.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{}),pg={USER_INACTIVE_CHANGE:"userinactivechange",BREAKPOINTS_CHANGE:"breakpointchange",BREAKPOINTS_COMPUTED:"breakpointscomputed"},ri=Zm.reduce((t,[e,i])=>(t[e]=i.toLowerCase(),t),{...pg});Object.entries(ri).reduce((t,[e,i])=>{const a=c[e];return a&&(t[i]=a),t},{userinactivechange:"userinactive"});const vg=Object.entries(c).reduce((t,[e,i])=>{const a=ri[e];return a&&(t[i]=a),t},{userinactive:"userinactivechange"}),Vt={SUBTITLES:"subtitles",CAPTIONS:"captions",CHAPTERS:"chapters",METADATA:"metadata"},Ka={DISABLED:"disabled",SHOWING:"showing"},ol={MOUSE:"mouse",PEN:"pen",TOUCH:"touch"},Ye={UNAVAILABLE:"unavailable",UNSUPPORTED:"unsupported"},Xt={LIVE:"live",ON_DEMAND:"on-demand",UNKNOWN:"unknown"},fg={FULLSCREEN:"fullscreen"};function Eg(t){return t?.map(bg).join(" ")}function _g(t){return t?.split(/\s+/).map(gg)}function bg(t){if(t){const{id:e,width:i,height:a}=t;return[e,i,a].filter(r=>r!=null).join(":")}}function gg(t){if(t){const[e,i,a]=t.split(":");return{id:e,width:+i,height:+a}}}function yg(t){return t?.map(Ag).join(" ")}function Tg(t){return t?.split(/\s+/).map(kg)}function Ag(t){if(t){const{id:e,kind:i,language:a,label:r}=t;return[e,i,a,r].filter(n=>n!=null).join(":")}}function kg(t){if(t){const[e,i,a,r]=t.split(":");return{id:e,kind:i,language:a,label:r}}}function Sg(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function tu(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}function Xm(t){return typeof t!="string"?!1:!isNaN(t)&&!isNaN(parseFloat(t))}const Jm=t=>new Promise(e=>setTimeout(e,t)),Fc=[{singular:"hour",plural:"hours"},{singular:"minute",plural:"minutes"},{singular:"second",plural:"seconds"}],wg=(t,e)=>{const i=t===1?Fc[e].singular:Fc[e].plural;return`${t} ${i}`},zr=t=>{if(!tu(t))return"";const e=Math.abs(t),i=e!==t,a=new Date(0,0,0,0,0,e,0);return`${[a.getHours(),a.getMinutes(),a.getSeconds()].map((o,l)=>o&&wg(o,l)).filter(o=>o).join(", ")}${i?" remaining":""}`};function ki(t,e){let i=!1;t<0&&(i=!0,t=0-t),t=t<0?0:t;let a=Math.floor(t%60),r=Math.floor(t/60%60),n=Math.floor(t/3600);const s=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(n=r=a="0"),n=n>0||o>0?n+":":"",r=((n||s>=10)&&r<10?"0"+r:r)+":",a=a<10?"0"+a:a,(i?"-":"")+n+r+a}const Ig={"Start airplay":"Start airplay","Stop airplay":"Stop airplay",Audio:"Audio",Captions:"Captions","Enable captions":"Enable captions","Disable captions":"Disable captions","Start casting":"Start casting","Stop casting":"Stop casting","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",Mute:"Mute",Unmute:"Unmute",Loop:"Loop","Enter picture in picture mode":"Enter picture in picture mode","Exit picture in picture mode":"Exit picture in picture mode",Play:"Play",Pause:"Pause","Playback rate":"Playback rate","Playback rate {playbackRate}":"Playback rate {playbackRate}",Quality:"Quality","Seek backward":"Seek backward","Seek forward":"Seek forward",Settings:"Settings",Auto:"Auto","audio player":"audio player","video player":"video player",volume:"volume",seek:"seek","closed captions":"closed captions","current playback rate":"current playback rate","playback time":"playback time","media loading":"media loading",settings:"settings","audio tracks":"audio tracks",quality:"quality",play:"play",pause:"pause",mute:"mute",unmute:"unmute","chapter: {chapterName}":"chapter: {chapterName}",live:"live",Off:"Off","start airplay":"start airplay","stop airplay":"stop airplay","start casting":"start casting","stop casting":"stop casting","enter fullscreen mode":"enter fullscreen mode","exit fullscreen mode":"exit fullscreen mode","enter picture in picture mode":"enter picture in picture mode","exit picture in picture mode":"exit picture in picture mode","seek to live":"seek to live","playing live":"playing live","seek back {seekOffset} seconds":"seek back {seekOffset} seconds","seek forward {seekOffset} seconds":"seek forward {seekOffset} seconds","Network Error":"Network Error","Decode Error":"Decode Error","Source Not Supported":"Source Not Supported","Encryption Error":"Encryption Error","A network error caused the media download to fail.":"A network error caused the media download to fail.","A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.":"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.","An unsupported error occurred. The server or network failed, or your browser does not support this format.":"An unsupported error occurred. The server or network failed, or your browser does not support this format.","The media is encrypted and there are no keys to decrypt it.":"The media is encrypted and there are no keys to decrypt it."};var Kc;const ll={en:Ig};let xl=((Kc=globalThis.navigator)==null?void 0:Kc.language)||"en";const Rg=t=>{xl=t},Cg=t=>{var e,i,a;const[r]=xl.split("-");return((e=ll[xl])==null?void 0:e[t])||((i=ll[r])==null?void 0:i[t])||((a=ll.en)==null?void 0:a[t])||t},L=(t,e={})=>Cg(t).replace(/\{(\w+)\}/g,(i,a)=>a in e?String(e[a]):`{${a}}`);let ep=class{addEventListener(){}removeEventListener(){}dispatchEvent(){return!0}};class tp extends ep{}let Vc=class extends tp{constructor(){super(...arguments),this.role=null}};class Lg{observe(){}unobserve(){}disconnect(){}}const ip={createElement:function(){return new on.HTMLElement},createElementNS:function(){return new on.HTMLElement},addEventListener(){},removeEventListener(){},dispatchEvent(t){return!1}},on={ResizeObserver:Lg,document:ip,Node:tp,Element:Vc,HTMLElement:class extends Vc{constructor(){super(...arguments),this.innerHTML=""}get content(){return new on.DocumentFragment}},DocumentFragment:class extends ep{},customElements:{get:function(){},define:function(){},whenDefined:function(){}},localStorage:{getItem(t){return null},setItem(t,e){},removeItem(t){}},CustomEvent:function(){},getComputedStyle:function(){},navigator:{languages:[],get userAgent(){return""}},matchMedia(t){return{matches:!1,media:t}},DOMParser:class{parseFromString(e,i){return{body:{textContent:e}}}}},ap="global"in globalThis&&globalThis?.global===globalThis||typeof window>"u"||typeof window.customElements>"u",rp=Object.keys(on).every(t=>t in globalThis),f=ap&&!rp?on:globalThis,_e=ap&&!rp?ip:globalThis.document,qc=new WeakMap,iu=t=>{let e=qc.get(t);return e||qc.set(t,e=new Set),e},np=new f.ResizeObserver(t=>{for(const e of t)for(const i of iu(e.target))i(e)});function Ja(t,e){iu(t).add(e),np.observe(t)}function er(t,e){const i=iu(t);i.delete(e),i.size||np.unobserve(t)}function Xe(t){const e={};for(const i of t)e[i.name]=i.value;return e}function Be(t){var e;return(e=Ol(t))!=null?e:nr(t,"media-controller")}function Ol(t){var e;const{MEDIA_CONTROLLER:i}=Y,a=t.getAttribute(i);if(a)return(e=xo(t))==null?void 0:e.getElementById(a)}const sp=(t,e,i=".value")=>{const a=t.querySelector(i);a&&(a.textContent=e)},Dg=(t,e)=>{const i=`slot[name="${e}"]`,a=t.shadowRoot.querySelector(i);return a?a.children:[]},op=(t,e)=>Dg(t,e)[0],si=(t,e)=>!t||!e?!1:t?.contains(e)?!0:si(t,e.getRootNode().host),nr=(t,e)=>{if(!t)return null;const i=t.closest(e);return i||nr(t.getRootNode().host,e)};function au(t=document){var e;const i=t?.activeElement;return i?(e=au(i.shadowRoot))!=null?e:i:null}function xo(t){var e;const i=(e=t?.getRootNode)==null?void 0:e.call(t);return i instanceof ShadowRoot||i instanceof Document?i:null}function lp(t,{depth:e=3,checkOpacity:i=!0,checkVisibilityCSS:a=!0}={}){if(t.checkVisibility)return t.checkVisibility({checkOpacity:i,checkVisibilityCSS:a});let r=t;for(;r&&e>0;){const n=getComputedStyle(r);if(i&&n.opacity==="0"||a&&n.visibility==="hidden"||n.display==="none")return!1;r=r.parentElement,e--}return!0}function Mg(t,e,i,a){const r=a.x-i.x,n=a.y-i.y,s=r*r+n*n;if(s===0)return 0;const o=((t-i.x)*r+(e-i.y)*n)/s;return Math.max(0,Math.min(1,o))}function ye(t,e){const i=xg(t,a=>a===e);return i||ru(t,e)}function xg(t,e){var i,a;let r;for(r of(i=t.querySelectorAll("style:not([media])"))!=null?i:[]){let n;try{n=(a=r.sheet)==null?void 0:a.cssRules}catch{continue}for(const s of n??[])if(e(s.selectorText))return s}}function ru(t,e){var i,a;const r=(i=t.querySelectorAll("style:not([media])"))!=null?i:[],n=r?.[r.length-1];return n?.sheet?(n?.sheet.insertRule(`${e}{}`,n.sheet.cssRules.length),(a=n.sheet.cssRules)==null?void 0:a[n.sheet.cssRules.length-1]):(console.warn("Media Chrome: No style sheet found on style tag of",t),{style:{setProperty:()=>{},removeProperty:()=>"",getPropertyValue:()=>""}})}function ie(t,e,i=Number.NaN){const a=t.getAttribute(e);return a!=null?+a:i}function ue(t,e,i){const a=+i;if(i==null||Number.isNaN(a)){t.hasAttribute(e)&&t.removeAttribute(e);return}ie(t,e,void 0)!==a&&t.setAttribute(e,`${a}`)}function W(t,e){return t.hasAttribute(e)}function F(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}W(t,e)!=i&&t.toggleAttribute(e,i)}function ae(t,e,i=null){var a;return(a=t.getAttribute(e))!=null?a:i}function re(t,e,i){if(i==null){t.hasAttribute(e)&&t.removeAttribute(e);return}const a=`${i}`;ae(t,e,void 0)!==a&&t.setAttribute(e,a)}var dp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},li=(t,e,i)=>(dp(t,e,"read from private field"),i?i.call(t):e.get(t)),Og=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},In=(t,e,i,a)=>(dp(t,e,"write to private field"),e.set(t,i),i),$e;function Ng(t){return`
66
66
  <style>
67
67
  :host {
68
68
  display: var(--media-control-display, var(--media-gesture-receiver-display, inline-block));
69
69
  box-sizing: border-box;
70
70
  }
71
71
  </style>
72
- `}class Oo extends f.HTMLElement{constructor(){if(super(),Og(this,$e,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER,c.MEDIA_PAUSED]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=li(this,$e))==null?void 0:r.unassociateElement)==null||n.call(r,this),wn(this,$e,null)),a&&this.isConnected&&(wn(this,$e,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=li(this,$e))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),wn(this,$e,Pg(this)),this.getAttribute(Y.MEDIA_CONTROLLER)&&((i=(e=li(this,$e))==null?void 0:e.associateElement)==null||i.call(e,this)),(a=li(this,$e))==null||a.addEventListener("pointerdown",this),(r=li(this,$e))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,i,a,r;this.getAttribute(Y.MEDIA_CONTROLLER)&&((i=(e=li(this,$e))==null?void 0:e.unassociateElement)==null||i.call(e,this)),(a=li(this,$e))==null||a.removeEventListener("pointerdown",this),(r=li(this,$e))==null||r.removeEventListener("click",this),wn(this,$e,null)}handleEvent(e){var i;const a=(i=e.composedPath())==null?void 0:i[0];if(["video","media-controller"].includes(a?.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){const{clientX:n,clientY:s}=e,{left:o,top:l,width:d,height:m}=this.getBoundingClientRect(),p=n-o,h=s-l;if(p<0||h<0||p>d||h>m||d===0&&m===0)return;const u=this._pointerType||"mouse";if(this._pointerType=void 0,u===ol.TOUCH){this.handleTap(e);return}else if(u===ol.MOUSE||u===ol.PEN){this.handleMouseClick(e);return}}}}get mediaPaused(){return W(this,c.MEDIA_PAUSED)}set mediaPaused(e){F(this,c.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){const i=this.mediaPaused?I.MEDIA_PLAY_REQUEST:I.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new f.CustomEvent(i,{composed:!0,bubbles:!0}))}}$e=new WeakMap;Oo.shadowRootOptions={mode:"open"};Oo.getTemplateHTML=Ng;function Pg(t){var e;const i=t.getAttribute(Y.MEDIA_CONTROLLER);return i?(e=t.getRootNode())==null?void 0:e.getElementById(i):rr(t,"media-controller")}f.customElements.get("media-gesture-receiver")||f.customElements.define("media-gesture-receiver",Oo);var Yc=Oo,nu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},je=(t,e,i)=>(nu(t,e,"read from private field"),i?i.call(t):e.get(t)),Ge=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Mi=(t,e,i,a)=>(nu(t,e,"write to private field"),e.set(t,i),i),st=(t,e,i)=>(nu(t,e,"access private method"),i),ro,fa,on,Ua,es,Nl,up,Cr,ts,Pl,cp,Ul,hp,ln,No,Po,su,er,dn;const M={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};function Ug(t){return`
72
+ `}class Oo extends f.HTMLElement{constructor(){if(super(),Og(this,$e,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER,c.MEDIA_PAUSED]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=li(this,$e))==null?void 0:r.unassociateElement)==null||n.call(r,this),In(this,$e,null)),a&&this.isConnected&&(In(this,$e,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=li(this,$e))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a,r;this.tabIndex=-1,this.setAttribute("aria-hidden","true"),In(this,$e,Pg(this)),this.getAttribute(Y.MEDIA_CONTROLLER)&&((i=(e=li(this,$e))==null?void 0:e.associateElement)==null||i.call(e,this)),(a=li(this,$e))==null||a.addEventListener("pointerdown",this),(r=li(this,$e))==null||r.addEventListener("click",this)}disconnectedCallback(){var e,i,a,r;this.getAttribute(Y.MEDIA_CONTROLLER)&&((i=(e=li(this,$e))==null?void 0:e.unassociateElement)==null||i.call(e,this)),(a=li(this,$e))==null||a.removeEventListener("pointerdown",this),(r=li(this,$e))==null||r.removeEventListener("click",this),In(this,$e,null)}handleEvent(e){var i;const a=(i=e.composedPath())==null?void 0:i[0];if(["video","media-controller"].includes(a?.localName)){if(e.type==="pointerdown")this._pointerType=e.pointerType;else if(e.type==="click"){const{clientX:n,clientY:s}=e,{left:o,top:l,width:d,height:m}=this.getBoundingClientRect(),p=n-o,h=s-l;if(p<0||h<0||p>d||h>m||d===0&&m===0)return;const u=this._pointerType||"mouse";if(this._pointerType=void 0,u===ol.TOUCH){this.handleTap(e);return}else if(u===ol.MOUSE||u===ol.PEN){this.handleMouseClick(e);return}}}}get mediaPaused(){return W(this,c.MEDIA_PAUSED)}set mediaPaused(e){F(this,c.MEDIA_PAUSED,e)}handleTap(e){}handleMouseClick(e){const i=this.mediaPaused?I.MEDIA_PLAY_REQUEST:I.MEDIA_PAUSE_REQUEST;this.dispatchEvent(new f.CustomEvent(i,{composed:!0,bubbles:!0}))}}$e=new WeakMap;Oo.shadowRootOptions={mode:"open"};Oo.getTemplateHTML=Ng;function Pg(t){var e;const i=t.getAttribute(Y.MEDIA_CONTROLLER);return i?(e=t.getRootNode())==null?void 0:e.getElementById(i):nr(t,"media-controller")}f.customElements.get("media-gesture-receiver")||f.customElements.define("media-gesture-receiver",Oo);var Yc=Oo,nu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},je=(t,e,i)=>(nu(t,e,"read from private field"),i?i.call(t):e.get(t)),Ge=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Mi=(t,e,i,a)=>(nu(t,e,"write to private field"),e.set(t,i),i),st=(t,e,i)=>(nu(t,e,"access private method"),i),ro,fa,ln,Ua,ts,Nl,up,Lr,is,Pl,cp,Ul,hp,dn,No,Po,su,tr,un;const M={AUDIO:"audio",AUTOHIDE:"autohide",BREAKPOINTS:"breakpoints",GESTURES_DISABLED:"gesturesdisabled",KEYBOARD_CONTROL:"keyboardcontrol",NO_AUTOHIDE:"noautohide",USER_INACTIVE:"userinactive",AUTOHIDE_OVER_CONTROLS:"autohideovercontrols"};function Ug(t){return`
73
73
  <style>
74
74
 
75
75
  :host([${c.MEDIA_IS_FULLSCREEN}]) ::slotted([slot=media]) {
@@ -220,7 +220,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
220
220
  <slot part="bottom chrome"></slot>
221
221
  </span>
222
222
  <slot name="dialog" part="layer dialog-layer"></slot>
223
- `}const $g=Object.values(c),Hg="sm:384 md:576 lg:768 xl:960";function Bg(t){mp(t.target,t.contentRect.width)}function mp(t,e){var i;if(!t.isConnected)return;const a=(i=t.getAttribute(M.BREAKPOINTS))!=null?i:Hg,r=Wg(a),n=Fg(r,e);let s=!1;if(Object.keys(r).forEach(o=>{if(n.includes(o)){t.hasAttribute(`breakpoint${o}`)||(t.setAttribute(`breakpoint${o}`,""),s=!0);return}t.hasAttribute(`breakpoint${o}`)&&(t.removeAttribute(`breakpoint${o}`),s=!0)}),s){const o=new CustomEvent(ri.BREAKPOINTS_CHANGE,{detail:n});t.dispatchEvent(o)}t.breakpointsComputed||(t.breakpointsComputed=!0,t.dispatchEvent(new CustomEvent(ri.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}function Wg(t){const e=t.split(/\s+/);return Object.fromEntries(e.map(i=>i.split(":")))}function Fg(t,e){return Object.keys(t).filter(i=>e>=parseInt(t[i]))}class Uo extends f.HTMLElement{constructor(){if(super(),Ge(this,Nl),Ge(this,Pl),Ge(this,Ul),Ge(this,ln),Ge(this,Po),Ge(this,er),Ge(this,ro,0),Ge(this,fa,null),Ge(this,on,null),Ge(this,Ua,void 0),this.breakpointsComputed=!1,Ge(this,es,new MutationObserver(st(this,Nl,up).bind(this))),Ge(this,Cr,!1),Ge(this,ts,i=>{je(this,Cr)||(setTimeout(()=>{Bg(i),Mi(this,Cr,!1)},0),Mi(this,Cr,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const i=Xe(this.attributes),a=this.constructor.getTemplateHTML(i);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(a):this.shadowRoot.innerHTML=a}const e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){je(this,fa)&&this.mediaUnsetCallback(je(this,fa));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[M.AUTOHIDE,M.GESTURES_DISABLED].concat($g).filter(e=>![c.MEDIA_RENDITION_LIST,c.MEDIA_AUDIO_TRACK_LIST,c.MEDIA_CHAPTERS_CUES,c.MEDIA_WIDTH,c.MEDIA_HEIGHT,c.MEDIA_ERROR,c.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,i,a){e.toLowerCase()==M.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return e?.nodeName=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Mi(this,fa,e),e.localName.includes("-")&&await f.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;je(this,es).observe(this,{childList:!0,subtree:!0}),Xa(this,je(this,ts));const i=this.getAttribute(M.AUDIO)!=null,a=L(i?"audio player":"video player");this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(M.USER_INACTIVE,""),mp(this,this.getBoundingClientRect().width),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=f.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;je(this,es).disconnect(),Ja(this,je(this,ts)),this.media&&this.mediaUnsetCallback(this.media),(e=f.window)==null||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){Mi(this,fa,null)}handleEvent(e){switch(e.type){case"pointerdown":Mi(this,ro,e.timeStamp);break;case"pointermove":st(this,Pl,cp).call(this,e);break;case"pointerup":st(this,Ul,hp).call(this,e);break;case"mouseleave":st(this,ln,No).call(this);break;case"mouseup":this.removeAttribute(M.KEYBOARD_CONTROL);break;case"keyup":st(this,er,dn).call(this),this.setAttribute(M.KEYBOARD_CONTROL,"");break}}set autohide(e){const i=Number(e);Mi(this,Ua,isNaN(i)?0:i)}get autohide(){return(je(this,Ua)===void 0?2:je(this,Ua)).toString()}get breakpoints(){return ae(this,M.BREAKPOINTS)}set breakpoints(e){re(this,M.BREAKPOINTS,e)}get audio(){return W(this,M.AUDIO)}set audio(e){F(this,M.AUDIO,e)}get gesturesDisabled(){return W(this,M.GESTURES_DISABLED)}set gesturesDisabled(e){F(this,M.GESTURES_DISABLED,e)}get keyboardControl(){return W(this,M.KEYBOARD_CONTROL)}set keyboardControl(e){F(this,M.KEYBOARD_CONTROL,e)}get noAutohide(){return W(this,M.NO_AUTOHIDE)}set noAutohide(e){F(this,M.NO_AUTOHIDE,e)}get autohideOverControls(){return W(this,M.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){F(this,M.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return W(this,M.USER_INACTIVE)}set userInteractive(e){F(this,M.USER_INACTIVE,e)}}ro=new WeakMap;fa=new WeakMap;on=new WeakMap;Ua=new WeakMap;es=new WeakMap;Nl=new WeakSet;up=function(t){const e=this.media;for(const i of t){if(i.type!=="childList")continue;const a=i.removedNodes;for(const r of a){if(r.slot!="media"||i.target!=this)continue;let n=i.previousSibling&&i.previousSibling.previousElementSibling;if(!n||!e)this.mediaUnsetCallback(r);else{let s=n.slot!=="media";for(;(n=n.previousSibling)!==null;)n.slot=="media"&&(s=!1);s&&this.mediaUnsetCallback(r)}}if(e)for(const r of i.addedNodes)r===e&&this.handleMediaUpdated(e)}};Cr=new WeakMap;ts=new WeakMap;Pl=new WeakSet;cp=function(t){if(t.pointerType!=="mouse"&&t.timeStamp-je(this,ro)<250)return;st(this,Po,su).call(this),clearTimeout(je(this,on));const e=this.hasAttribute(M.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(t.target)||e)&&st(this,er,dn).call(this)};Ul=new WeakSet;hp=function(t){if(t.pointerType==="touch"){const e=!this.hasAttribute(M.USER_INACTIVE);[this,this.media].includes(t.target)&&e?st(this,ln,No).call(this):st(this,er,dn).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e?.localName))&&st(this,er,dn).call(this)};ln=new WeakSet;No=function(){if(je(this,Ua)<0||this.hasAttribute(M.USER_INACTIVE))return;this.setAttribute(M.USER_INACTIVE,"");const t=new f.CustomEvent(ri.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)};Po=new WeakSet;su=function(){if(!this.hasAttribute(M.USER_INACTIVE))return;this.removeAttribute(M.USER_INACTIVE);const t=new f.CustomEvent(ri.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)};er=new WeakSet;dn=function(){st(this,Po,su).call(this),clearTimeout(je(this,on));const t=parseInt(this.autohide);t<0||Mi(this,on,setTimeout(()=>{st(this,ln,No).call(this)},t*1e3))};Uo.shadowRootOptions={mode:"open"};Uo.getTemplateHTML=Ug;f.customElements.get("media-container")||f.customElements.define("media-container",Uo);var pp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ie=(t,e,i)=>(pp(t,e,"read from private field"),i?i.call(t):e.get(t)),hr=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},In=(t,e,i,a)=>(pp(t,e,"write to private field"),e.set(t,i),i),Ea,_a,no,Vi,jt,hi;class ou{constructor(e,i,{defaultValue:a}={defaultValue:void 0}){hr(this,jt),hr(this,Ea,void 0),hr(this,_a,void 0),hr(this,no,void 0),hr(this,Vi,new Set),In(this,Ea,e),In(this,_a,i),In(this,no,new Set(a))}[Symbol.iterator](){return Ie(this,jt,hi).values()}get length(){return Ie(this,jt,hi).size}get value(){var e;return(e=[...Ie(this,jt,hi)].join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(In(this,Vi,new Set),this.add(...(i=e?.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return[...Ie(this,jt,hi)][e]}values(){return Ie(this,jt,hi).values()}forEach(e,i){Ie(this,jt,hi).forEach(e,i)}add(...e){var i,a;e.forEach(r=>Ie(this,Vi).add(r)),!(this.value===""&&!((i=Ie(this,Ea))!=null&&i.hasAttribute(`${Ie(this,_a)}`)))&&((a=Ie(this,Ea))==null||a.setAttribute(`${Ie(this,_a)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>Ie(this,Vi).delete(a)),(i=Ie(this,Ea))==null||i.setAttribute(`${Ie(this,_a)}`,`${this.value}`)}contains(e){return Ie(this,jt,hi).has(e)}toggle(e,i){return typeof i<"u"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){return this.remove(e),this.add(i),e===i}}Ea=new WeakMap;_a=new WeakMap;no=new WeakMap;Vi=new WeakMap;jt=new WeakSet;hi=function(){return Ie(this,Vi).size?Ie(this,Vi):Ie(this,no)};const Kg=(t="")=>t.split(/\s+/),vp=(t="")=>{const[e,i,a]=t.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:e==="cc"?Vt.CAPTIONS:Vt.SUBTITLES,language:i,label:r}},$o=(t="",e={})=>Kg(t).map(i=>{const a=vp(i);return{...e,...a}}),fp=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?vp(e):e):typeof t=="string"?$o(t):[t]:[],$l=({kind:t,label:e,language:i}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${i}:${encodeURIComponent(e)}`:i,un=(t=[])=>Array.prototype.map.call(t,$l).join(" "),Vg=(t,e)=>i=>i[t]===e,Ep=t=>{const e=Object.entries(t).map(([i,a])=>Vg(i,a));return i=>e.every(a=>a(i))},zr=(t,e=[],i=[])=>{const a=fp(i).map(Ep),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=t})},Ho=(t,e=()=>!0)=>{if(!t?.textTracks)return[];const i=typeof e=="function"?e:Ep(e);return Array.from(t.textTracks).filter(i)},_p=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(c.MEDIA_SUBTITLES_SHOWING)},qg=t=>{var e;const{media:i,fullscreenElement:a}=t;try{const r=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(r){const n=(e=a[r])==null?void 0:e.call(a);if(n instanceof Promise)return n.catch(()=>{})}else i?.webkitEnterFullscreen?i.webkitEnterFullscreen():i?.requestFullscreen&&i.requestFullscreen()}catch(r){console.error(r)}},Gc="exitFullscreen"in _e?"exitFullscreen":"webkitExitFullscreen"in _e?"webkitExitFullscreen":"webkitCancelFullScreen"in _e?"webkitCancelFullScreen":void 0,Yg=t=>{var e;const{documentElement:i}=t;if(Gc){const a=(e=i?.[Gc])==null?void 0:e.call(i);if(a instanceof Promise)return a.catch(()=>{})}},Lr="fullscreenElement"in _e?"fullscreenElement":"webkitFullscreenElement"in _e?"webkitFullscreenElement":void 0,Gg=t=>{const{documentElement:e,media:i}=t,a=e?.[Lr];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===fg.FULLSCREEN?i:a},Qg=t=>{var e;const{media:i,documentElement:a,fullscreenElement:r=i}=t;if(!i||!a)return!1;const n=Gg(t);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let s=n.shadowRoot;if(!(Lr in s))return si(n,r);for(;s?.[Lr];){if(s[Lr]===r)return!0;s=(e=s[Lr])==null?void 0:e.shadowRoot}}return!1},zg="fullscreenEnabled"in _e?"fullscreenEnabled":"webkitFullscreenEnabled"in _e?"webkitFullscreenEnabled":void 0,jg=t=>{const{documentElement:e,media:i}=t;return!!e?.[zg]||i&&"webkitSupportsFullscreen"in i};let Rn;const lu=()=>{var t,e;return Rn||(Rn=(e=(t=_e)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),Rn)},Zg=async(t=lu())=>{if(!t)return!1;const e=t.volume;t.volume=e/2+.1;const i=new AbortController,a=await Promise.race([Xg(t,i.signal),Jg(t,e)]);return i.abort(),a},Xg=(t,e)=>new Promise(i=>{t.addEventListener("volumechange",()=>i(!0),{signal:e})}),Jg=async(t,e)=>{for(let i=0;i<10;i++){if(t.volume===e)return!1;await Jm(10)}return t.volume!==e},e0=/.*Version\/.*Safari\/.*/.test(f.navigator.userAgent),bp=(t=lu())=>f.matchMedia("(display-mode: standalone)").matches&&e0?!1:typeof t?.requestPictureInPicture=="function",gp=(t=lu())=>jg({documentElement:_e,media:t}),t0=gp(),i0=bp(),a0=!!f.WebKitPlaybackTargetAvailabilityEvent,r0=!!f.chrome,so=t=>Ho(t.media,e=>[Vt.SUBTITLES,Vt.CAPTIONS].includes(e.kind)).sort((e,i)=>e.kind>=i.kind?1:-1),yp=t=>Ho(t.media,e=>e.mode===Ka.SHOWING&&[Vt.SUBTITLES,Vt.CAPTIONS].includes(e.kind)),Tp=(t,e)=>{const i=so(t),a=yp(t),r=!!a.length;if(i.length){if(e===!1||r&&e!==!0)zr(Ka.DISABLED,i,a);else if(e===!0||!r&&e!==!1){let n=i[0];const{options:s}=t;if(!s?.noSubtitlesLangPref){const m=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),p=m?[m,...globalThis.navigator.languages]:globalThis.navigator.languages,h=i.filter(u=>p.some(v=>u.language.toLowerCase().startsWith(v.split("-")[0]))).sort((u,v)=>{const E=p.findIndex(y=>u.language.toLowerCase().startsWith(y.split("-")[0])),g=p.findIndex(y=>v.language.toLowerCase().startsWith(y.split("-")[0]));return E-g});h[0]&&(n=h[0])}const{language:o,label:l,kind:d}=n;zr(Ka.DISABLED,i,a),zr(Ka.SHOWING,i,[{language:o,label:l,kind:d}])}}},du=(t,e)=>t===e?!0:t==null||e==null||typeof t!=typeof e?!1:typeof t=="number"&&Number.isNaN(t)&&Number.isNaN(e)?!0:typeof t!="object"?!1:Array.isArray(t)?n0(t,e):Object.entries(t).every(([i,a])=>i in e&&du(a,e[i])),n0=(t,e)=>{const i=Array.isArray(t),a=Array.isArray(e);return i!==a?!1:i||a?t.length!==e.length?!1:t.every((r,n)=>du(r,e[n])):!0},s0=Object.values(Xt);let oo;const o0=Zg().then(t=>(oo=t,oo)),l0=async(...t)=>{await Promise.all(t.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof f.HTMLElement))return;const i=e.localName;if(!i.includes("-"))return;const a=f.customElements.get(i);a&&e instanceof a||(await f.customElements.whenDefined(i),f.customElements.upgrade(e))}))},d0=new f.DOMParser,u0=t=>t&&(d0.parseFromString(t,"text/html").body.textContent||t),Dr={mediaError:{get(t,e){const{media:i}=t;if(e?.type!=="playing")return i?.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(t,e){var i;const{media:a}=t;if(e?.type!=="playing")return(i=a?.error)==null?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(t,e){var i,a;const{media:r}=t;if(e?.type!=="playing")return(a=(i=r?.error)==null?void 0:i.message)!=null?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(t){var e;const{media:i}=t;return(e=i?.videoWidth)!=null?e:0},mediaEvents:["resize"]},mediaHeight:{get(t){var e;const{media:i}=t;return(e=i?.videoHeight)!=null?e:0},mediaEvents:["resize"]},mediaPaused:{get(t){var e;const{media:i}=t;return(e=i?.paused)!=null?e:!0},set(t,e){var i;const{media:a}=e;a&&(t?a.pause():(i=a.play())==null||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){const{media:i}=t;return i?e?e.type==="playing":!i.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;const{media:i}=t;return(e=i?.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;const{media:i}=t;return(e=i?.playbackRate)!=null?e:1},set(t,e){const{media:i}=e;i&&Number.isFinite(+t)&&(i.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;const{media:i}=t;return(e=i?.muted)!=null?e:!1},set(t,e){const{media:i,options:{noMutedPref:a}={}}=e;if(i){i.muted=t;try{const r=f.localStorage.getItem("media-chrome-pref-muted")!==null,n=i.hasAttribute("muted");if(a){r&&f.localStorage.removeItem("media-chrome-pref-muted");return}if(n&&!r)return;f.localStorage.setItem("media-chrome-pref-muted",t?"true":"false")}catch(r){console.debug("Error setting muted pref",r)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noMutedPref:i}}=e,{media:a}=e;if(!(!a||a.muted||i))try{const r=f.localStorage.getItem("media-chrome-pref-muted")==="true";Dr.mediaMuted.set(r,e),t(r)}catch(r){console.debug("Error getting muted pref",r)}}]},mediaLoop:{get(t){const{media:e}=t;return e?.loop},set(t,e){const{media:i}=e;i&&(i.loop=t)},mediaEvents:["medialooprequest"]},mediaVolume:{get(t){var e;const{media:i}=t;return(e=i?.volume)!=null?e:1},set(t,e){const{media:i,options:{noVolumePref:a}={}}=e;if(i){try{t==null?f.localStorage.removeItem("media-chrome-pref-volume"):!i.hasAttribute("muted")&&!a&&f.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch(r){console.debug("Error setting volume pref",r)}Number.isFinite(+t)&&(i.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noVolumePref:i}}=e;if(!i)try{const{media:a}=e;if(!a)return;const r=f.localStorage.getItem("media-chrome-pref-volume");if(r==null)return;Dr.mediaVolume.set(+r,e),t(+r)}catch(a){console.debug("Error getting volume pref",a)}}]},mediaVolumeLevel:{get(t){const{media:e}=t;return typeof e?.volume>"u"?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(t){var e;const{media:i}=t;return(e=i?.currentTime)!=null?e:0},set(t,e){const{media:i}=e;!i||!tu(t)||(i.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){const{media:e,options:{defaultDuration:i}={}}=t;return i&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?i:Number.isFinite(e?.duration)?e.duration:Number.NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(t){const{media:e}=t;return e?.readyState<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(t){var e;const{media:i}=t;if(!((e=i?.seekable)!=null&&e.length))return;const a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;const{media:i}=t,a=(e=i?.buffered)!=null?e:[];return Array.from(a).map((r,n)=>[Number(a.start(n).toFixed(3)),Number(a.end(n).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){const{media:e,options:{defaultStreamType:i}={}}=t,a=[Xt.LIVE,Xt.ON_DEMAND].includes(i)?i:void 0;if(!e)return a;const{streamType:r}=e;if(s0.includes(r))return r===Xt.UNKNOWN?a:r;const n=e.duration;return n===1/0?Xt.LIVE:Number.isFinite(n)?Xt.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){const{media:e}=t;if(!e)return Number.NaN;const{targetLiveWindow:i}=e,a=Dr.mediaStreamType.get(t);return(i==null||Number.isNaN(i))&&a===Xt.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){const{media:e,options:{liveEdgeOffset:i=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(Dr.mediaStreamType.get(t)===Xt.LIVE))return!1;const r=e.seekable;if(!r)return!0;if(!r.length)return!1;const n=r.end(r.length-1)-i;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(t){return so(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(t){return yp(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i,a;const{media:r,options:n}=e;if(!r)return;const s=o=>{var l;!n.defaultSubtitles||o&&![Vt.CAPTIONS,Vt.SUBTITLES].includes((l=o?.track)==null?void 0:l.kind)||Tp(e,!0)};return r.addEventListener("loadstart",s),(i=r.textTracks)==null||i.addEventListener("addtrack",s),(a=r.textTracks)==null||a.addEventListener("removetrack",s),()=>{var o,l;r.removeEventListener("loadstart",s),(o=r.textTracks)==null||o.removeEventListener("addtrack",s),(l=r.textTracks)==null||l.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(t){var e;const{media:i}=t;if(!i)return[];const[a]=Ho(i,{kind:Vt.CHAPTERS});return Array.from((e=a?.cues)!=null?e:[]).map(({text:r,startTime:n,endTime:s})=>({text:u0(r),startTime:n,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;if(!a)return;const r=a.querySelector('track[kind="chapters"][default][src]'),n=(i=a.shadowRoot)==null?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return r?.addEventListener("load",t),n?.addEventListener("load",t),()=>{r?.removeEventListener("load",t),n?.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,i;const{media:a,documentElement:r}=t;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return(e=a.localName)!=null&&e.includes("-")?si(a,r.pictureInPictureElement):!1;if(r.pictureInPictureElement.localName.includes("-")){let n=r.pictureInPictureElement.shadowRoot;for(;n?.pictureInPictureElement;){if(n.pictureInPictureElement===a)return!0;n=(i=n.pictureInPictureElement)==null?void 0:i.shadowRoot}}return!1},set(t,e){const{media:i}=e;if(i)if(t){if(!_e.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}const a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(r=>{if(r.code===11){if(!i.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(i.readyState===0&&i.preload==="none"){const n=()=>{i.removeEventListener("loadedmetadata",s),i.preload="none"},s=()=>{i.requestPictureInPicture().catch(a),n()};i.addEventListener("loadedmetadata",s),i.preload="metadata",setTimeout(()=>{i.readyState===0&&a(),n()},1e3)}else throw r}else throw r})}else _e.pictureInPictureElement&&_e.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;const{media:i}=t;return[...(e=i?.videoRenditions)!=null?e:[]].map(a=>({...a}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,i,a;const{media:r}=t;return(a=(i=r?.videoRenditions)==null?void 0:i[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},set(t,e){const{media:i}=e;if(!i?.videoRenditions){console.warn("MediaController: Rendition selection not supported by this media.");return}const a=t,r=Array.prototype.findIndex.call(i.videoRenditions,n=>n.id==a);i.videoRenditions.selectedIndex!=r&&(i.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;const{media:i}=t;return[...(e=i?.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,i;const{media:a}=t;return(i=[...(e=a?.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:i.id},set(t,e){const{media:i}=e;if(!i?.audioTracks){console.warn("MediaChrome: Audio track selection not supported by this media.");return}const a=t;for(const r of i.audioTracks)r.enabled=a==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(t){return Qg(t)},set(t,e,i){var a;t?(qg(e),i.detail&&((a=e.media)==null||a.focus())):Yg(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(t){var e;const{media:i}=t;return!i?.remote||((e=i.remote)==null?void 0:e.state)==="disconnected"?!1:!!i.remote.state},set(t,e){var i,a;const{media:r}=e;if(r&&!(t&&((i=r.remote)==null?void 0:i.state)!=="disconnected")&&!(!t&&((a=r.remote)==null?void 0:a.state)!=="connected")){if(typeof r.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(t,e){const{media:i}=e;if(i){if(!(i.webkitShowPlaybackTargetPicker&&f.WebKitPlaybackTargetAvailabilityEvent)){console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){const{media:e}=t;if(!t0||!gp(e))return Ye.UNSUPPORTED}},mediaPipUnavailable:{get(t){const{media:e}=t;if(!i0||!bp(e))return Ye.UNSUPPORTED;if(e?.disablePictureInPicture)return Ye.UNAVAILABLE}},mediaVolumeUnavailable:{get(t){const{media:e}=t;if(oo===!1||e?.volume==null)return Ye.UNSUPPORTED},stateOwnersUpdateHandlers:[t=>{oo==null&&o0.then(e=>t(e?void 0:Ye.UNSUPPORTED))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var i;const{media:a}=t;if(!r0||!((i=a?.remote)!=null&&i.state))return Ye.UNSUPPORTED;if(!(e==null||e==="available"))return Ye.UNAVAILABLE},stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a?.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a?.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaAirplayUnavailable:{get(t,e){if(!a0)return Ye.UNSUPPORTED;if(e?.availability==="not-available")return Ye.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a?.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a?.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaRenditionUnavailable:{get(t){var e;const{media:i}=t;if(!i?.videoRenditions)return Ye.UNSUPPORTED;if(!((e=i.videoRenditions)!=null&&e.length))return Ye.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,i;const{media:a}=t;if(!a?.audioTracks)return Ye.UNSUPPORTED;if(((i=(e=a.audioTracks)==null?void 0:e.length)!=null?i:0)<=1)return Ye.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(t){const{options:{mediaLang:e}={}}=t;return e??"en"}}},c0={[I.MEDIA_PREVIEW_REQUEST](t,e,{detail:i}){var a,r,n;const{media:s}=e,o=i??void 0;let l,d;if(s&&o!=null){const[u]=Ho(s,{kind:Vt.METADATA,label:"thumbnails"}),v=Array.prototype.find.call((a=u?.cues)!=null?a:[],(E,g,y)=>g===0?E.endTime>o:g===y.length-1?E.startTime<=o:E.startTime<=o&&E.endTime>o);if(v){const E=/'^(?:[a-z]+:)?\/\//i.test(v.text)||(r=s?.querySelector('track[label="thumbnails"]'))==null?void 0:r.src,g=new URL(v.text,E);d=new URLSearchParams(g.hash).get("#xywh").split(",").map(T=>+T),l=g.href}}const m=t.mediaDuration.get(e);let h=(n=t.mediaChaptersCues.get(e).find((u,v,E)=>v===E.length-1&&m===u.endTime?u.startTime<=o&&u.endTime>=o:u.startTime<=o&&u.endTime>o))==null?void 0:n.text;return i!=null&&h==null&&(h=""),{mediaPreviewTime:o,mediaPreviewImage:l,mediaPreviewCoords:d,mediaPreviewChapter:h}},[I.MEDIA_PAUSE_REQUEST](t,e){t["mediaPaused"].set(!0,e)},[I.MEDIA_PLAY_REQUEST](t,e){var i,a,r,n;const s="mediaPaused",l=t.mediaStreamType.get(e)===Xt.LIVE,d=!((i=e.options)!=null&&i.noAutoSeekToLive),m=t.mediaTargetLiveWindow.get(e)>0;if(l&&d&&!m){const p=(a=t.mediaSeekable.get(e))==null?void 0:a[1];if(p){const h=(n=(r=e.options)==null?void 0:r.seekToLiveOffset)!=null?n:0,u=p-h;t.mediaCurrentTime.set(u,e)}}t[s].set(!1,e)},[I.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:i}){const a="mediaPlaybackRate",r=i;t[a].set(r,e)},[I.MEDIA_MUTE_REQUEST](t,e){t["mediaMuted"].set(!0,e)},[I.MEDIA_UNMUTE_REQUEST](t,e){const i="mediaMuted";t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t[i].set(!1,e)},[I.MEDIA_LOOP_REQUEST](t,e,{detail:i}){const a="mediaLoop",r=!!i;return t[a].set(r,e),{mediaLoop:r}},[I.MEDIA_VOLUME_REQUEST](t,e,{detail:i}){const a="mediaVolume",r=i;r&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t[a].set(r,e)},[I.MEDIA_SEEK_REQUEST](t,e,{detail:i}){const a="mediaCurrentTime",r=i;t[a].set(r,e)},[I.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var i,a,r;const n="mediaCurrentTime",s=(i=t.mediaSeekable.get(e))==null?void 0:i[1];if(Number.isNaN(Number(s)))return;const o=(r=(a=e.options)==null?void 0:a.seekToLiveOffset)!=null?r:0,l=s-o;t[n].set(l,e)},[I.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:i}){var a;const{options:r}=e,n=so(e),s=fp(i),o=(a=s[0])==null?void 0:a.language;o&&!r.noSubtitlesLangPref&&f.localStorage.setItem("media-chrome-pref-subtitles-lang",o),zr(Ka.SHOWING,n,s)},[I.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:i}){const a=so(e),r=i??[];zr(Ka.DISABLED,a,r)},[I.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:i}){Tp(e,i)},[I.MEDIA_RENDITION_REQUEST](t,e,{detail:i}){const a="mediaRenditionSelected",r=i;t[a].set(r,e)},[I.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:i}){const a="mediaAudioTrackEnabled",r=i;t[a].set(r,e)},[I.MEDIA_ENTER_PIP_REQUEST](t,e){const i="mediaIsPip";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[I.MEDIA_EXIT_PIP_REQUEST](t,e){t["mediaIsPip"].set(!1,e)},[I.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e,i){const a="mediaIsFullscreen";t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t[a].set(!0,e,i)},[I.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t["mediaIsFullscreen"].set(!1,e)},[I.MEDIA_ENTER_CAST_REQUEST](t,e){const i="mediaIsCasting";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[I.MEDIA_EXIT_CAST_REQUEST](t,e){t["mediaIsCasting"].set(!1,e)},[I.MEDIA_AIRPLAY_REQUEST](t,e){t["mediaIsAirplaying"].set(!0,e)}},h0=({media:t,fullscreenElement:e,documentElement:i,stateMediator:a=Dr,requestMap:r=c0,options:n={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{const o=[],l={options:{...n}};let d=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const m=E=>{E!=null&&(du(E,d)||(d=Object.freeze({...d,...E}),o.forEach(g=>g(d))))},p=()=>{const E=Object.entries(a).reduce((g,[y,{get:T}])=>(g[y]=T(l),g),{});m(E)},h={};let u;const v=async(E,g)=>{var y,T,_,S,C,N,$,G,J,K,U,Me,Fe,Ke,he,Pe;const yt=!!u;if(u={...l,...u??{},...E},yt)return;await l0(...Object.values(E));const Ue=o.length>0&&g===0&&s,dt=l.media!==u.media,Ve=((y=l.media)==null?void 0:y.textTracks)!==((T=u.media)==null?void 0:T.textTracks),ke=((_=l.media)==null?void 0:_.videoRenditions)!==((S=u.media)==null?void 0:S.videoRenditions),xe=((C=l.media)==null?void 0:C.audioTracks)!==((N=u.media)==null?void 0:N.audioTracks),Je=(($=l.media)==null?void 0:$.remote)!==((G=u.media)==null?void 0:G.remote),na=l.documentElement!==u.documentElement,yn=!!l.media&&(dt||Ue),lc=!!((J=l.media)!=null&&J.textTracks)&&(Ve||Ue),dc=!!((K=l.media)!=null&&K.videoRenditions)&&(ke||Ue),uc=!!((U=l.media)!=null&&U.audioTracks)&&(xe||Ue),cc=!!((Me=l.media)!=null&&Me.remote)&&(Je||Ue),hc=!!l.documentElement&&(na||Ue),zo=yn||lc||dc||uc||cc||hc,sa=o.length===0&&g===1&&s,mc=!!u.media&&(dt||sa),pc=!!((Fe=u.media)!=null&&Fe.textTracks)&&(Ve||sa),vc=!!((Ke=u.media)!=null&&Ke.videoRenditions)&&(ke||sa),fc=!!((he=u.media)!=null&&he.audioTracks)&&(xe||sa),Ec=!!((Pe=u.media)!=null&&Pe.remote)&&(Je||sa),_c=!!u.documentElement&&(na||sa),bc=mc||pc||vc||fc||Ec||_c;if(!(zo||bc)){Object.entries(u).forEach(([j,dr])=>{l[j]=dr}),p(),u=void 0;return}Object.entries(a).forEach(([j,{get:dr,mediaEvents:nf=[],textTracksEvents:sf=[],videoRenditionsEvents:of=[],audioTracksEvents:lf=[],remoteEvents:df=[],rootEvents:uf=[],stateOwnersUpdateHandlers:cf=[]}])=>{h[j]||(h[j]={});const qe=se=>{const me=dr(l,se);m({[j]:me})};let Se;Se=h[j].mediaEvents,nf.forEach(se=>{Se&&yn&&(l.media.removeEventListener(se,Se),h[j].mediaEvents=void 0),mc&&(u.media.addEventListener(se,qe),h[j].mediaEvents=qe)}),Se=h[j].textTracksEvents,sf.forEach(se=>{var me,ut;Se&&lc&&((me=l.media.textTracks)==null||me.removeEventListener(se,Se),h[j].textTracksEvents=void 0),pc&&((ut=u.media.textTracks)==null||ut.addEventListener(se,qe),h[j].textTracksEvents=qe)}),Se=h[j].videoRenditionsEvents,of.forEach(se=>{var me,ut;Se&&dc&&((me=l.media.videoRenditions)==null||me.removeEventListener(se,Se),h[j].videoRenditionsEvents=void 0),vc&&((ut=u.media.videoRenditions)==null||ut.addEventListener(se,qe),h[j].videoRenditionsEvents=qe)}),Se=h[j].audioTracksEvents,lf.forEach(se=>{var me,ut;Se&&uc&&((me=l.media.audioTracks)==null||me.removeEventListener(se,Se),h[j].audioTracksEvents=void 0),fc&&((ut=u.media.audioTracks)==null||ut.addEventListener(se,qe),h[j].audioTracksEvents=qe)}),Se=h[j].remoteEvents,df.forEach(se=>{var me,ut;Se&&cc&&((me=l.media.remote)==null||me.removeEventListener(se,Se),h[j].remoteEvents=void 0),Ec&&((ut=u.media.remote)==null||ut.addEventListener(se,qe),h[j].remoteEvents=qe)}),Se=h[j].rootEvents,uf.forEach(se=>{Se&&hc&&(l.documentElement.removeEventListener(se,Se),h[j].rootEvents=void 0),_c&&(u.documentElement.addEventListener(se,qe),h[j].rootEvents=qe)});const Tn=h[j].stateOwnersUpdateHandlers;if(Tn&&zo&&(Array.isArray(Tn)?Tn:[Tn]).forEach(me=>{typeof me=="function"&&me()}),bc){const se=cf.map(me=>me(qe,u)).filter(me=>typeof me=="function");h[j].stateOwnersUpdateHandlers=se.length===1?se[0]:se}else zo&&(h[j].stateOwnersUpdateHandlers=void 0)}),Object.entries(u).forEach(([j,dr])=>{l[j]=dr}),p(),u=void 0};return v({media:t,fullscreenElement:e,documentElement:i,options:n}),{dispatch(E){const{type:g,detail:y}=E;if(r[g]&&d.mediaErrorCode==null){m(r[g](a,l,E));return}g==="mediaelementchangerequest"?v({media:y}):g==="fullscreenelementchangerequest"?v({fullscreenElement:y}):g==="documentelementchangerequest"?v({documentElement:y}):g==="optionschangerequest"&&(Object.entries(y??{}).forEach(([T,_])=>{l.options[T]=_}),p())},getState(){return d},subscribe(E){return v({},o.length+1),o.push(E),E(d),()=>{const g=o.indexOf(E);g>=0&&(v({},o.length-1),o.splice(g,1))}}}};var uu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},O=(t,e,i)=>(uu(t,e,"read from private field"),i?i.call(t):e.get(t)),et=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},It=(t,e,i,a)=>(uu(t,e,"write to private field"),e.set(t,i),i),$t=(t,e,i)=>(uu(t,e,"access private method"),i),gi,Mr,V,qi,xr,Rt,is,Or,as,Hl,ji,Va,rs,Bl,Wl,Ap;const kp=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],Qc=10,zc=.025,jc=.25,m0=.25,p0=2,k={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYS_USED:"keysused",LANG:"lang",LOOP:"loop",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_DEFAULT_STORE:"nodefaultstore",NO_HOTKEYS:"nohotkeys",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_VOLUME_PREF:"novolumepref",SEEK_TO_LIVE_OFFSET:"seektoliveoffset"};class Sp extends Uo{constructor(){super(),et(this,as),et(this,ji),et(this,rs),et(this,Wl),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,et(this,gi,new ou(this,k.HOTKEYS)),et(this,Mr,void 0),et(this,V,void 0),et(this,qi,null),et(this,xr,void 0),et(this,Rt,void 0),et(this,is,i=>{var a;(a=O(this,V))==null||a.dispatch(i)}),et(this,Or,void 0),this.associateElement(this);let e={};It(this,xr,i=>{Object.entries(i).forEach(([a,r])=>{if(a in e&&e[a]===r)return;this.propagateMediaState(a,r);const n=a.toLowerCase(),s=new f.CustomEvent(vg[n],{composed:!0,detail:r});this.dispatchEvent(s)}),e=i}),this.hasAttribute(k.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(k.NO_HOTKEYS,k.HOTKEYS,k.DEFAULT_STREAM_TYPE,k.DEFAULT_SUBTITLES,k.DEFAULT_DURATION,k.NO_MUTED_PREF,k.NO_VOLUME_PREF,k.LANG,k.LOOP)}get mediaStore(){return O(this,V)}set mediaStore(e){var i,a;if(O(this,V)&&((i=O(this,Rt))==null||i.call(this),It(this,Rt,void 0)),It(this,V,e),!O(this,V)&&!this.hasAttribute(k.NO_DEFAULT_STORE)){$t(this,as,Hl).call(this);return}It(this,Rt,(a=O(this,V))==null?void 0:a.subscribe(O(this,xr)))}get fullscreenElement(){var e;return(e=O(this,Mr))!=null?e:this}set fullscreenElement(e){var i;this.hasAttribute(k.FULLSCREEN_ELEMENT)&&this.removeAttribute(k.FULLSCREEN_ELEMENT),It(this,Mr,e),(i=O(this,V))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return W(this,k.DEFAULT_SUBTITLES)}set defaultSubtitles(e){F(this,k.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return ae(this,k.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){re(this,k.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return ie(this,k.DEFAULT_DURATION)}set defaultDuration(e){ue(this,k.DEFAULT_DURATION,e)}get noHotkeys(){return W(this,k.NO_HOTKEYS)}set noHotkeys(e){F(this,k.NO_HOTKEYS,e)}get keysUsed(){return ae(this,k.KEYS_USED)}set keysUsed(e){re(this,k.KEYS_USED,e)}get liveEdgeOffset(){return ie(this,k.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){ue(this,k.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return W(this,k.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){F(this,k.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return W(this,k.NO_VOLUME_PREF)}set noVolumePref(e){F(this,k.NO_VOLUME_PREF,e)}get noMutedPref(){return W(this,k.NO_MUTED_PREF)}set noMutedPref(e){F(this,k.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return W(this,k.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){F(this,k.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return W(this,k.NO_DEFAULT_STORE)}set noDefaultStore(e){F(this,k.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,i,a){var r,n,s,o,l,d,m,p,h,u,v,E;if(super.attributeChangedCallback(e,i,a),e===k.NO_HOTKEYS)a!==i&&a===""?(this.hasAttribute(k.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==i&&a===null&&this.enableHotkeys();else if(e===k.HOTKEYS)O(this,gi).value=a;else if(e===k.DEFAULT_SUBTITLES&&a!==i)(r=O(this,V))==null||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(k.DEFAULT_SUBTITLES)}});else if(e===k.DEFAULT_STREAM_TYPE)(s=O(this,V))==null||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(n=this.getAttribute(k.DEFAULT_STREAM_TYPE))!=null?n:void 0}});else if(e===k.LIVE_EDGE_OFFSET)(o=O(this,V))==null||o.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(k.LIVE_EDGE_OFFSET)?+this.getAttribute(k.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(k.SEEK_TO_LIVE_OFFSET)?void 0:+this.getAttribute(k.LIVE_EDGE_OFFSET)}});else if(e===k.SEEK_TO_LIVE_OFFSET)(l=O(this,V))==null||l.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(k.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(k.SEEK_TO_LIVE_OFFSET):void 0}});else if(e===k.NO_AUTO_SEEK_TO_LIVE)(d=O(this,V))==null||d.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(k.NO_AUTO_SEEK_TO_LIVE)}});else if(e===k.FULLSCREEN_ELEMENT){const g=a?(m=this.getRootNode())==null?void 0:m.getElementById(a):void 0;It(this,Mr,g),(p=O(this,V))==null||p.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===k.LANG&&a!==i?(Rg(a),(h=O(this,V))==null||h.dispatch({type:"optionschangerequest",detail:{mediaLang:a}})):e===k.LOOP&&a!==i?(u=O(this,V))==null||u.dispatch({type:I.MEDIA_LOOP_REQUEST,detail:a!=null}):e===k.NO_VOLUME_PREF&&a!==i?(v=O(this,V))==null||v.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(k.NO_VOLUME_PREF)}}):e===k.NO_MUTED_PREF&&a!==i&&((E=O(this,V))==null||E.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(k.NO_MUTED_PREF)}}))}connectedCallback(){var e,i;!O(this,V)&&!this.hasAttribute(k.NO_DEFAULT_STORE)&&$t(this,as,Hl).call(this),(e=O(this,V))==null||e.dispatch({type:"documentelementchangerequest",detail:_e}),super.connectedCallback(),O(this,V)&&!O(this,Rt)&&It(this,Rt,(i=O(this,V))==null?void 0:i.subscribe(O(this,xr))),O(this,Or)!==void 0&&O(this,V)&&this.media&&setTimeout(()=>{var a,r,n;(r=(a=this.media)==null?void 0:a.textTracks)!=null&&r.length&&((n=O(this,V))==null||n.dispatch({type:I.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:O(this,Or)}))},0),this.hasAttribute(k.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,i,a,r,n;if((e=super.disconnectedCallback)==null||e.call(this),O(this,V)){const s=O(this,V).getState();It(this,Or,!!((i=s.mediaSubtitlesShowing)!=null&&i.length)),(a=O(this,V))==null||a.dispatch({type:"documentelementchangerequest",detail:void 0}),(r=O(this,V))==null||r.dispatch({type:I.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}O(this,Rt)&&((n=O(this,Rt))==null||n.call(this),It(this,Rt,void 0))}mediaSetCallback(e){var i;super.mediaSetCallback(e),(i=O(this,V))==null||i.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var i;super.mediaUnsetCallback(e),(i=O(this,V))==null||i.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,i){Jc(this.mediaStateReceivers,e,i)}associateElement(e){if(!e)return;const{associatedElementSubscriptions:i}=this;if(i.has(e))return;const a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=g0(e,a,r);Object.values(I).forEach(s=>{e.addEventListener(s,O(this,is))}),i.set(e,n)}unassociateElement(e){if(!e)return;const{associatedElementSubscriptions:i}=this;if(!i.has(e))return;i.get(e)(),i.delete(e),Object.values(I).forEach(r=>{e.removeEventListener(r,O(this,is))})}registerMediaStateReceiver(e){if(!e)return;const i=this.mediaStateReceivers;i.indexOf(e)>-1||(i.push(e),O(this,V)&&Object.entries(O(this,V).getState()).forEach(([r,n])=>{Jc([e],r,n)}))}unregisterMediaStateReceiver(e){const i=this.mediaStateReceivers,a=i.indexOf(e);a<0||i.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",$t(this,rs,Bl))}disableHotkeys(){this.removeEventListener("keydown",$t(this,rs,Bl)),this.removeEventListener("keyup",$t(this,ji,Va))}get hotkeys(){return ae(this,k.HOTKEYS)}set hotkeys(e){re(this,k.HOTKEYS,e)}keyboardShortcutHandler(e){var i,a,r,n,s,o,l,d,m;const p=e.target;if(((r=(a=(i=p.getAttribute(k.KEYS_USED))==null?void 0:i.split(" "))!=null?a:p?.keysUsed)!=null?r:[]).map(y=>y==="Space"?" ":y).filter(Boolean).includes(e.key))return;let u,v,E;if(!(O(this,gi).contains(`no${e.key.toLowerCase()}`)||e.key===" "&&O(this,gi).contains("nospace")||e.shiftKey&&(e.key==="/"||e.key==="?")&&O(this,gi).contains("noshift+/")))switch(e.key){case" ":case"k":u=O(this,V).getState().mediaPaused?I.MEDIA_PLAY_REQUEST:I.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new f.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"m":u=this.mediaStore.getState().mediaVolumeLevel==="off"?I.MEDIA_UNMUTE_REQUEST:I.MEDIA_MUTE_REQUEST,this.dispatchEvent(new f.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"f":u=this.mediaStore.getState().mediaIsFullscreen?I.MEDIA_EXIT_FULLSCREEN_REQUEST:I.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new f.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new f.CustomEvent(I.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{const y=this.hasAttribute(k.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(k.KEYBOARD_BACKWARD_SEEK_OFFSET):Qc;v=Math.max(((n=this.mediaStore.getState().mediaCurrentTime)!=null?n:0)-y,0),E=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"ArrowRight":case"l":{const y=this.hasAttribute(k.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(k.KEYBOARD_FORWARD_SEEK_OFFSET):Qc;v=Math.max(((s=this.mediaStore.getState().mediaCurrentTime)!=null?s:0)+y,0),E=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"ArrowUp":{const y=this.hasAttribute(k.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(k.KEYBOARD_UP_VOLUME_STEP):zc;v=Math.min(((o=this.mediaStore.getState().mediaVolume)!=null?o:1)+y,1),E=new f.CustomEvent(I.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"ArrowDown":{const y=this.hasAttribute(k.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(k.KEYBOARD_DOWN_VOLUME_STEP):zc;v=Math.max(((l=this.mediaStore.getState().mediaVolume)!=null?l:1)-y,0),E=new f.CustomEvent(I.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"<":{const y=(d=this.mediaStore.getState().mediaPlaybackRate)!=null?d:1;v=Math.max(y-jc,m0).toFixed(2),E=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case">":{const y=(m=this.mediaStore.getState().mediaPlaybackRate)!=null?m:1;v=Math.min(y+jc,p0).toFixed(2),E=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"/":case"?":{e.shiftKey&&$t(this,Wl,Ap).call(this);break}case"p":{u=this.mediaStore.getState().mediaIsPip?I.MEDIA_EXIT_PIP_REQUEST:I.MEDIA_ENTER_PIP_REQUEST,E=new f.CustomEvent(u,{composed:!0,bubbles:!0}),this.dispatchEvent(E);break}}}}gi=new WeakMap;Mr=new WeakMap;V=new WeakMap;qi=new WeakMap;xr=new WeakMap;Rt=new WeakMap;is=new WeakMap;Or=new WeakMap;as=new WeakSet;Hl=function(){var t;this.mediaStore=h0({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(k.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(k.DEFAULT_DURATION)?+this.getAttribute(k.DEFAULT_DURATION):void 0,defaultStreamType:(t=this.getAttribute(k.DEFAULT_STREAM_TYPE))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(k.LIVE_EDGE_OFFSET)?+this.getAttribute(k.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(k.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(k.SEEK_TO_LIVE_OFFSET):this.hasAttribute(k.LIVE_EDGE_OFFSET)?+this.getAttribute(k.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(k.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(k.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(k.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(k.NO_SUBTITLES_LANG_PREF)}})};ji=new WeakSet;Va=function(t){const{key:e,shiftKey:i}=t;if(!(i&&(e==="/"||e==="?")||kp.includes(e))){this.removeEventListener("keyup",$t(this,ji,Va));return}this.keyboardShortcutHandler(t)};rs=new WeakSet;Bl=function(t){var e;const{metaKey:i,altKey:a,key:r,shiftKey:n}=t,s=n&&(r==="/"||r==="?");if(s&&((e=O(this,qi))!=null&&e.open)){this.removeEventListener("keyup",$t(this,ji,Va));return}if(i||a||!s&&!kp.includes(r)){this.removeEventListener("keyup",$t(this,ji,Va));return}const o=t.target,l=o instanceof HTMLElement&&(o.tagName.toLowerCase()==="media-volume-range"||o.tagName.toLowerCase()==="media-time-range");[" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&!(O(this,gi).contains(`no${r.toLowerCase()}`)||r===" "&&O(this,gi).contains("nospace"))&&!l&&t.preventDefault(),this.addEventListener("keyup",$t(this,ji,Va),{once:!0})};Wl=new WeakSet;Ap=function(){O(this,qi)||(It(this,qi,_e.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(O(this,qi))),O(this,qi).open=!0};const v0=Object.values(c),f0=Object.values(jm),wp=t=>{var e,i,a,r;let{observedAttributes:n}=t.constructor;!n&&((e=t.nodeName)!=null&&e.includes("-"))&&(f.customElements.upgrade(t),{observedAttributes:n}=t.constructor);const s=(r=(a=(i=t?.getAttribute)==null?void 0:i.call(t,Y.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(o=>v0.includes(o)):[]},E0=t=>{var e,i;return(e=t.nodeName)!=null&&e.includes("-")&&f.customElements.get((i=t.nodeName)==null?void 0:i.toLowerCase())&&!(t instanceof f.customElements.get(t.nodeName.toLowerCase()))&&f.customElements.upgrade(t),f0.some(a=>a in t)},Fl=t=>E0(t)||!!wp(t).length,Zc=t=>{var e;return(e=t?.join)==null?void 0:e.call(t,":")},Xc={[c.MEDIA_SUBTITLES_LIST]:un,[c.MEDIA_SUBTITLES_SHOWING]:un,[c.MEDIA_SEEKABLE]:Zc,[c.MEDIA_BUFFERED]:t=>t?.map(Zc).join(" "),[c.MEDIA_PREVIEW_COORDS]:t=>t?.join(" "),[c.MEDIA_RENDITION_LIST]:Eg,[c.MEDIA_AUDIO_TRACK_LIST]:yg},_0=async(t,e,i)=>{var a,r;if(t.isConnected||await Jm(0),typeof i=="boolean"||i==null)return F(t,e,i);if(typeof i=="number")return ue(t,e,i);if(typeof i=="string")return re(t,e,i);if(Array.isArray(i)&&!i.length)return t.removeAttribute(e);const n=(r=(a=Xc[e])==null?void 0:a.call(Xc,i))!=null?r:i;return t.setAttribute(e,n)},b0=t=>{var e;return!!((e=t.closest)!=null&&e.call(t,'*[slot="media"]'))},xi=(t,e)=>{if(b0(t))return;const i=(r,n)=>{var s,o;Fl(r)&&n(r);const{children:l=[]}=r??{},d=(o=(s=r?.shadowRoot)==null?void 0:s.children)!=null?o:[];[...l,...d].forEach(p=>xi(p,n))},a=t?.nodeName.toLowerCase();if(a.includes("-")&&!Fl(t)){f.customElements.whenDefined(a).then(()=>{i(t,e)});return}i(t,e)},Jc=(t,e,i)=>{t.forEach(a=>{if(e in a){a[e]=i;return}const r=wp(a),n=e.toLowerCase();r.includes(n)&&_0(a,n,i)})},g0=(t,e,i)=>{xi(t,e);const a=m=>{var p;const h=(p=m?.composedPath()[0])!=null?p:m.target;e(h)},r=m=>{var p;const h=(p=m?.composedPath()[0])!=null?p:m.target;i(h)};t.addEventListener(I.REGISTER_MEDIA_STATE_RECEIVER,a),t.addEventListener(I.UNREGISTER_MEDIA_STATE_RECEIVER,r);const n=m=>{m.forEach(p=>{const{addedNodes:h=[],removedNodes:u=[],type:v,target:E,attributeName:g}=p;v==="childList"?(Array.prototype.forEach.call(h,y=>xi(y,e)),Array.prototype.forEach.call(u,y=>xi(y,i))):v==="attributes"&&g===Y.MEDIA_CHROME_ATTRIBUTES&&(Fl(E)?e(E):i(E))})};let s=[];const o=m=>{const p=m.target;p.name!=="media"&&(s.forEach(h=>xi(h,i)),s=[...p.assignedElements({flatten:!0})],s.forEach(h=>xi(h,e)))};t.addEventListener("slotchange",o);const l=new MutationObserver(n);return l.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{xi(t,i),t.removeEventListener("slotchange",o),l.disconnect(),t.removeEventListener(I.REGISTER_MEDIA_STATE_RECEIVER,a),t.removeEventListener(I.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};f.customElements.get("media-controller")||f.customElements.define("media-controller",Sp);var y0=Sp;const oa={PLACEMENT:"placement",BOUNDS:"bounds"};function T0(t){return`
223
+ `}const $g=Object.values(c),Hg="sm:384 md:576 lg:768 xl:960";function Bg(t){mp(t.target,t.contentRect.width)}function mp(t,e){var i;if(!t.isConnected)return;const a=(i=t.getAttribute(M.BREAKPOINTS))!=null?i:Hg,r=Wg(a),n=Fg(r,e);let s=!1;if(Object.keys(r).forEach(o=>{if(n.includes(o)){t.hasAttribute(`breakpoint${o}`)||(t.setAttribute(`breakpoint${o}`,""),s=!0);return}t.hasAttribute(`breakpoint${o}`)&&(t.removeAttribute(`breakpoint${o}`),s=!0)}),s){const o=new CustomEvent(ri.BREAKPOINTS_CHANGE,{detail:n});t.dispatchEvent(o)}t.breakpointsComputed||(t.breakpointsComputed=!0,t.dispatchEvent(new CustomEvent(ri.BREAKPOINTS_COMPUTED,{bubbles:!0,composed:!0})))}function Wg(t){const e=t.split(/\s+/);return Object.fromEntries(e.map(i=>i.split(":")))}function Fg(t,e){return Object.keys(t).filter(i=>e>=parseInt(t[i]))}class Uo extends f.HTMLElement{constructor(){if(super(),Ge(this,Nl),Ge(this,Pl),Ge(this,Ul),Ge(this,dn),Ge(this,Po),Ge(this,tr),Ge(this,ro,0),Ge(this,fa,null),Ge(this,ln,null),Ge(this,Ua,void 0),this.breakpointsComputed=!1,Ge(this,ts,new MutationObserver(st(this,Nl,up).bind(this))),Ge(this,Lr,!1),Ge(this,is,i=>{je(this,Lr)||(setTimeout(()=>{Bg(i),Mi(this,Lr,!1)},0),Mi(this,Lr,!0))}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const i=Xe(this.attributes),a=this.constructor.getTemplateHTML(i);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(a):this.shadowRoot.innerHTML=a}const e=this.querySelector(":scope > slot[slot=media]");e&&e.addEventListener("slotchange",()=>{if(!e.assignedElements({flatten:!0}).length){je(this,fa)&&this.mediaUnsetCallback(je(this,fa));return}this.handleMediaUpdated(this.media)})}static get observedAttributes(){return[M.AUTOHIDE,M.GESTURES_DISABLED].concat($g).filter(e=>![c.MEDIA_RENDITION_LIST,c.MEDIA_AUDIO_TRACK_LIST,c.MEDIA_CHAPTERS_CUES,c.MEDIA_WIDTH,c.MEDIA_HEIGHT,c.MEDIA_ERROR,c.MEDIA_ERROR_MESSAGE].includes(e))}attributeChangedCallback(e,i,a){e.toLowerCase()==M.AUTOHIDE&&(this.autohide=a)}get media(){let e=this.querySelector(":scope > [slot=media]");return e?.nodeName=="SLOT"&&(e=e.assignedElements({flatten:!0})[0]),e}async handleMediaUpdated(e){e&&(Mi(this,fa,e),e.localName.includes("-")&&await f.customElements.whenDefined(e.localName),this.mediaSetCallback(e))}connectedCallback(){var e;je(this,ts).observe(this,{childList:!0,subtree:!0}),Ja(this,je(this,is));const i=this.getAttribute(M.AUDIO)!=null,a=L(i?"audio player":"video player");this.setAttribute("role","region"),this.setAttribute("aria-label",a),this.handleMediaUpdated(this.media),this.setAttribute(M.USER_INACTIVE,""),mp(this,this.getBoundingClientRect().width),this.addEventListener("pointerdown",this),this.addEventListener("pointermove",this),this.addEventListener("pointerup",this),this.addEventListener("mouseleave",this),this.addEventListener("keyup",this),(e=f.window)==null||e.addEventListener("mouseup",this)}disconnectedCallback(){var e;je(this,ts).disconnect(),er(this,je(this,is)),this.media&&this.mediaUnsetCallback(this.media),(e=f.window)==null||e.removeEventListener("mouseup",this)}mediaSetCallback(e){}mediaUnsetCallback(e){Mi(this,fa,null)}handleEvent(e){switch(e.type){case"pointerdown":Mi(this,ro,e.timeStamp);break;case"pointermove":st(this,Pl,cp).call(this,e);break;case"pointerup":st(this,Ul,hp).call(this,e);break;case"mouseleave":st(this,dn,No).call(this);break;case"mouseup":this.removeAttribute(M.KEYBOARD_CONTROL);break;case"keyup":st(this,tr,un).call(this),this.setAttribute(M.KEYBOARD_CONTROL,"");break}}set autohide(e){const i=Number(e);Mi(this,Ua,isNaN(i)?0:i)}get autohide(){return(je(this,Ua)===void 0?2:je(this,Ua)).toString()}get breakpoints(){return ae(this,M.BREAKPOINTS)}set breakpoints(e){re(this,M.BREAKPOINTS,e)}get audio(){return W(this,M.AUDIO)}set audio(e){F(this,M.AUDIO,e)}get gesturesDisabled(){return W(this,M.GESTURES_DISABLED)}set gesturesDisabled(e){F(this,M.GESTURES_DISABLED,e)}get keyboardControl(){return W(this,M.KEYBOARD_CONTROL)}set keyboardControl(e){F(this,M.KEYBOARD_CONTROL,e)}get noAutohide(){return W(this,M.NO_AUTOHIDE)}set noAutohide(e){F(this,M.NO_AUTOHIDE,e)}get autohideOverControls(){return W(this,M.AUTOHIDE_OVER_CONTROLS)}set autohideOverControls(e){F(this,M.AUTOHIDE_OVER_CONTROLS,e)}get userInteractive(){return W(this,M.USER_INACTIVE)}set userInteractive(e){F(this,M.USER_INACTIVE,e)}}ro=new WeakMap;fa=new WeakMap;ln=new WeakMap;Ua=new WeakMap;ts=new WeakMap;Nl=new WeakSet;up=function(t){const e=this.media;for(const i of t){if(i.type!=="childList")continue;const a=i.removedNodes;for(const r of a){if(r.slot!="media"||i.target!=this)continue;let n=i.previousSibling&&i.previousSibling.previousElementSibling;if(!n||!e)this.mediaUnsetCallback(r);else{let s=n.slot!=="media";for(;(n=n.previousSibling)!==null;)n.slot=="media"&&(s=!1);s&&this.mediaUnsetCallback(r)}}if(e)for(const r of i.addedNodes)r===e&&this.handleMediaUpdated(e)}};Lr=new WeakMap;is=new WeakMap;Pl=new WeakSet;cp=function(t){if(t.pointerType!=="mouse"&&t.timeStamp-je(this,ro)<250)return;st(this,Po,su).call(this),clearTimeout(je(this,ln));const e=this.hasAttribute(M.AUTOHIDE_OVER_CONTROLS);([this,this.media].includes(t.target)||e)&&st(this,tr,un).call(this)};Ul=new WeakSet;hp=function(t){if(t.pointerType==="touch"){const e=!this.hasAttribute(M.USER_INACTIVE);[this,this.media].includes(t.target)&&e?st(this,dn,No).call(this):st(this,tr,un).call(this)}else t.composedPath().some(e=>["media-play-button","media-fullscreen-button"].includes(e?.localName))&&st(this,tr,un).call(this)};dn=new WeakSet;No=function(){if(je(this,Ua)<0||this.hasAttribute(M.USER_INACTIVE))return;this.setAttribute(M.USER_INACTIVE,"");const t=new f.CustomEvent(ri.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!0});this.dispatchEvent(t)};Po=new WeakSet;su=function(){if(!this.hasAttribute(M.USER_INACTIVE))return;this.removeAttribute(M.USER_INACTIVE);const t=new f.CustomEvent(ri.USER_INACTIVE_CHANGE,{composed:!0,bubbles:!0,detail:!1});this.dispatchEvent(t)};tr=new WeakSet;un=function(){st(this,Po,su).call(this),clearTimeout(je(this,ln));const t=parseInt(this.autohide);t<0||Mi(this,ln,setTimeout(()=>{st(this,dn,No).call(this)},t*1e3))};Uo.shadowRootOptions={mode:"open"};Uo.getTemplateHTML=Ug;f.customElements.get("media-container")||f.customElements.define("media-container",Uo);var pp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ie=(t,e,i)=>(pp(t,e,"read from private field"),i?i.call(t):e.get(t)),mr=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Rn=(t,e,i,a)=>(pp(t,e,"write to private field"),e.set(t,i),i),Ea,_a,no,Vi,jt,hi;class ou{constructor(e,i,{defaultValue:a}={defaultValue:void 0}){mr(this,jt),mr(this,Ea,void 0),mr(this,_a,void 0),mr(this,no,void 0),mr(this,Vi,new Set),Rn(this,Ea,e),Rn(this,_a,i),Rn(this,no,new Set(a))}[Symbol.iterator](){return Ie(this,jt,hi).values()}get length(){return Ie(this,jt,hi).size}get value(){var e;return(e=[...Ie(this,jt,hi)].join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(Rn(this,Vi,new Set),this.add(...(i=e?.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return[...Ie(this,jt,hi)][e]}values(){return Ie(this,jt,hi).values()}forEach(e,i){Ie(this,jt,hi).forEach(e,i)}add(...e){var i,a;e.forEach(r=>Ie(this,Vi).add(r)),!(this.value===""&&!((i=Ie(this,Ea))!=null&&i.hasAttribute(`${Ie(this,_a)}`)))&&((a=Ie(this,Ea))==null||a.setAttribute(`${Ie(this,_a)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>Ie(this,Vi).delete(a)),(i=Ie(this,Ea))==null||i.setAttribute(`${Ie(this,_a)}`,`${this.value}`)}contains(e){return Ie(this,jt,hi).has(e)}toggle(e,i){return typeof i<"u"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){return this.remove(e),this.add(i),e===i}}Ea=new WeakMap;_a=new WeakMap;no=new WeakMap;Vi=new WeakMap;jt=new WeakSet;hi=function(){return Ie(this,Vi).size?Ie(this,Vi):Ie(this,no)};const Kg=(t="")=>t.split(/\s+/),vp=(t="")=>{const[e,i,a]=t.split(":"),r=a?decodeURIComponent(a):void 0;return{kind:e==="cc"?Vt.CAPTIONS:Vt.SUBTITLES,language:i,label:r}},$o=(t="",e={})=>Kg(t).map(i=>{const a=vp(i);return{...e,...a}}),fp=t=>t?Array.isArray(t)?t.map(e=>typeof e=="string"?vp(e):e):typeof t=="string"?$o(t):[t]:[],$l=({kind:t,label:e,language:i}={kind:"subtitles"})=>e?`${t==="captions"?"cc":"sb"}:${i}:${encodeURIComponent(e)}`:i,cn=(t=[])=>Array.prototype.map.call(t,$l).join(" "),Vg=(t,e)=>i=>i[t]===e,Ep=t=>{const e=Object.entries(t).map(([i,a])=>Vg(i,a));return i=>e.every(a=>a(i))},jr=(t,e=[],i=[])=>{const a=fp(i).map(Ep),r=n=>a.some(s=>s(n));Array.from(e).filter(r).forEach(n=>{n.mode=t})},Ho=(t,e=()=>!0)=>{if(!t?.textTracks)return[];const i=typeof e=="function"?e:Ep(e);return Array.from(t.textTracks).filter(i)},_p=t=>{var e;return!!((e=t.mediaSubtitlesShowing)!=null&&e.length)||t.hasAttribute(c.MEDIA_SUBTITLES_SHOWING)},qg=t=>{var e;const{media:i,fullscreenElement:a}=t;try{const r=a&&"requestFullscreen"in a?"requestFullscreen":a&&"webkitRequestFullScreen"in a?"webkitRequestFullScreen":void 0;if(r){const n=(e=a[r])==null?void 0:e.call(a);if(n instanceof Promise)return n.catch(()=>{})}else i?.webkitEnterFullscreen?i.webkitEnterFullscreen():i?.requestFullscreen&&i.requestFullscreen()}catch(r){console.error(r)}},Gc="exitFullscreen"in _e?"exitFullscreen":"webkitExitFullscreen"in _e?"webkitExitFullscreen":"webkitCancelFullScreen"in _e?"webkitCancelFullScreen":void 0,Yg=t=>{var e;const{documentElement:i}=t;if(Gc){const a=(e=i?.[Gc])==null?void 0:e.call(i);if(a instanceof Promise)return a.catch(()=>{})}},Dr="fullscreenElement"in _e?"fullscreenElement":"webkitFullscreenElement"in _e?"webkitFullscreenElement":void 0,Gg=t=>{const{documentElement:e,media:i}=t,a=e?.[Dr];return!a&&"webkitDisplayingFullscreen"in i&&"webkitPresentationMode"in i&&i.webkitDisplayingFullscreen&&i.webkitPresentationMode===fg.FULLSCREEN?i:a},Qg=t=>{var e;const{media:i,documentElement:a,fullscreenElement:r=i}=t;if(!i||!a)return!1;const n=Gg(t);if(!n)return!1;if(n===r||n===i)return!0;if(n.localName.includes("-")){let s=n.shadowRoot;if(!(Dr in s))return si(n,r);for(;s?.[Dr];){if(s[Dr]===r)return!0;s=(e=s[Dr])==null?void 0:e.shadowRoot}}return!1},zg="fullscreenEnabled"in _e?"fullscreenEnabled":"webkitFullscreenEnabled"in _e?"webkitFullscreenEnabled":void 0,jg=t=>{const{documentElement:e,media:i}=t;return!!e?.[zg]||i&&"webkitSupportsFullscreen"in i};let Cn;const lu=()=>{var t,e;return Cn||(Cn=(e=(t=_e)==null?void 0:t.createElement)==null?void 0:e.call(t,"video"),Cn)},Zg=async(t=lu())=>{if(!t)return!1;const e=t.volume;t.volume=e/2+.1;const i=new AbortController,a=await Promise.race([Xg(t,i.signal),Jg(t,e)]);return i.abort(),a},Xg=(t,e)=>new Promise(i=>{t.addEventListener("volumechange",()=>i(!0),{signal:e})}),Jg=async(t,e)=>{for(let i=0;i<10;i++){if(t.volume===e)return!1;await Jm(10)}return t.volume!==e},e0=/.*Version\/.*Safari\/.*/.test(f.navigator.userAgent),bp=(t=lu())=>f.matchMedia("(display-mode: standalone)").matches&&e0?!1:typeof t?.requestPictureInPicture=="function",gp=(t=lu())=>jg({documentElement:_e,media:t}),t0=gp(),i0=bp(),a0=!!f.WebKitPlaybackTargetAvailabilityEvent,r0=!!f.chrome,so=t=>Ho(t.media,e=>[Vt.SUBTITLES,Vt.CAPTIONS].includes(e.kind)).sort((e,i)=>e.kind>=i.kind?1:-1),yp=t=>Ho(t.media,e=>e.mode===Ka.SHOWING&&[Vt.SUBTITLES,Vt.CAPTIONS].includes(e.kind)),Tp=(t,e)=>{const i=so(t),a=yp(t),r=!!a.length;if(i.length){if(e===!1||r&&e!==!0)jr(Ka.DISABLED,i,a);else if(e===!0||!r&&e!==!1){let n=i[0];const{options:s}=t;if(!s?.noSubtitlesLangPref){const m=globalThis.localStorage.getItem("media-chrome-pref-subtitles-lang"),p=m?[m,...globalThis.navigator.languages]:globalThis.navigator.languages,h=i.filter(u=>p.some(v=>u.language.toLowerCase().startsWith(v.split("-")[0]))).sort((u,v)=>{const E=p.findIndex(y=>u.language.toLowerCase().startsWith(y.split("-")[0])),g=p.findIndex(y=>v.language.toLowerCase().startsWith(y.split("-")[0]));return E-g});h[0]&&(n=h[0])}const{language:o,label:l,kind:d}=n;jr(Ka.DISABLED,i,a),jr(Ka.SHOWING,i,[{language:o,label:l,kind:d}])}}},du=(t,e)=>t===e?!0:t==null||e==null||typeof t!=typeof e?!1:typeof t=="number"&&Number.isNaN(t)&&Number.isNaN(e)?!0:typeof t!="object"?!1:Array.isArray(t)?n0(t,e):Object.entries(t).every(([i,a])=>i in e&&du(a,e[i])),n0=(t,e)=>{const i=Array.isArray(t),a=Array.isArray(e);return i!==a?!1:i||a?t.length!==e.length?!1:t.every((r,n)=>du(r,e[n])):!0},s0=Object.values(Xt);let oo;const o0=Zg().then(t=>(oo=t,oo)),l0=async(...t)=>{await Promise.all(t.filter(e=>e).map(async e=>{if(!("localName"in e&&e instanceof f.HTMLElement))return;const i=e.localName;if(!i.includes("-"))return;const a=f.customElements.get(i);a&&e instanceof a||(await f.customElements.whenDefined(i),f.customElements.upgrade(e))}))},d0=new f.DOMParser,u0=t=>t&&(d0.parseFromString(t,"text/html").body.textContent||t),Mr={mediaError:{get(t,e){const{media:i}=t;if(e?.type!=="playing")return i?.error},mediaEvents:["emptied","error","playing"]},mediaErrorCode:{get(t,e){var i;const{media:a}=t;if(e?.type!=="playing")return(i=a?.error)==null?void 0:i.code},mediaEvents:["emptied","error","playing"]},mediaErrorMessage:{get(t,e){var i,a;const{media:r}=t;if(e?.type!=="playing")return(a=(i=r?.error)==null?void 0:i.message)!=null?a:""},mediaEvents:["emptied","error","playing"]},mediaWidth:{get(t){var e;const{media:i}=t;return(e=i?.videoWidth)!=null?e:0},mediaEvents:["resize"]},mediaHeight:{get(t){var e;const{media:i}=t;return(e=i?.videoHeight)!=null?e:0},mediaEvents:["resize"]},mediaPaused:{get(t){var e;const{media:i}=t;return(e=i?.paused)!=null?e:!0},set(t,e){var i;const{media:a}=e;a&&(t?a.pause():(i=a.play())==null||i.catch(()=>{}))},mediaEvents:["play","playing","pause","emptied"]},mediaHasPlayed:{get(t,e){const{media:i}=t;return i?e?e.type==="playing":!i.paused:!1},mediaEvents:["playing","emptied"]},mediaEnded:{get(t){var e;const{media:i}=t;return(e=i?.ended)!=null?e:!1},mediaEvents:["seeked","ended","emptied"]},mediaPlaybackRate:{get(t){var e;const{media:i}=t;return(e=i?.playbackRate)!=null?e:1},set(t,e){const{media:i}=e;i&&Number.isFinite(+t)&&(i.playbackRate=+t)},mediaEvents:["ratechange","loadstart"]},mediaMuted:{get(t){var e;const{media:i}=t;return(e=i?.muted)!=null?e:!1},set(t,e){const{media:i,options:{noMutedPref:a}={}}=e;if(i){i.muted=t;try{const r=f.localStorage.getItem("media-chrome-pref-muted")!==null,n=i.hasAttribute("muted");if(a){r&&f.localStorage.removeItem("media-chrome-pref-muted");return}if(n&&!r)return;f.localStorage.setItem("media-chrome-pref-muted",t?"true":"false")}catch(r){console.debug("Error setting muted pref",r)}}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noMutedPref:i}}=e,{media:a}=e;if(!(!a||a.muted||i))try{const r=f.localStorage.getItem("media-chrome-pref-muted")==="true";Mr.mediaMuted.set(r,e),t(r)}catch(r){console.debug("Error getting muted pref",r)}}]},mediaLoop:{get(t){const{media:e}=t;return e?.loop},set(t,e){const{media:i}=e;i&&(i.loop=t)},mediaEvents:["medialooprequest"]},mediaVolume:{get(t){var e;const{media:i}=t;return(e=i?.volume)!=null?e:1},set(t,e){const{media:i,options:{noVolumePref:a}={}}=e;if(i){try{t==null?f.localStorage.removeItem("media-chrome-pref-volume"):!i.hasAttribute("muted")&&!a&&f.localStorage.setItem("media-chrome-pref-volume",t.toString())}catch(r){console.debug("Error setting volume pref",r)}Number.isFinite(+t)&&(i.volume=+t)}},mediaEvents:["volumechange"],stateOwnersUpdateHandlers:[(t,e)=>{const{options:{noVolumePref:i}}=e;if(!i)try{const{media:a}=e;if(!a)return;const r=f.localStorage.getItem("media-chrome-pref-volume");if(r==null)return;Mr.mediaVolume.set(+r,e),t(+r)}catch(a){console.debug("Error getting volume pref",a)}}]},mediaVolumeLevel:{get(t){const{media:e}=t;return typeof e?.volume>"u"?"high":e.muted||e.volume===0?"off":e.volume<.5?"low":e.volume<.75?"medium":"high"},mediaEvents:["volumechange"]},mediaCurrentTime:{get(t){var e;const{media:i}=t;return(e=i?.currentTime)!=null?e:0},set(t,e){const{media:i}=e;!i||!tu(t)||(i.currentTime=t)},mediaEvents:["timeupdate","loadedmetadata"]},mediaDuration:{get(t){const{media:e,options:{defaultDuration:i}={}}=t;return i&&(!e||!e.duration||Number.isNaN(e.duration)||!Number.isFinite(e.duration))?i:Number.isFinite(e?.duration)?e.duration:Number.NaN},mediaEvents:["durationchange","loadedmetadata","emptied"]},mediaLoading:{get(t){const{media:e}=t;return e?.readyState<3},mediaEvents:["waiting","playing","emptied"]},mediaSeekable:{get(t){var e;const{media:i}=t;if(!((e=i?.seekable)!=null&&e.length))return;const a=i.seekable.start(0),r=i.seekable.end(i.seekable.length-1);if(!(!a&&!r))return[Number(a.toFixed(3)),Number(r.toFixed(3))]},mediaEvents:["loadedmetadata","emptied","progress","seekablechange"]},mediaBuffered:{get(t){var e;const{media:i}=t,a=(e=i?.buffered)!=null?e:[];return Array.from(a).map((r,n)=>[Number(a.start(n).toFixed(3)),Number(a.end(n).toFixed(3))])},mediaEvents:["progress","emptied"]},mediaStreamType:{get(t){const{media:e,options:{defaultStreamType:i}={}}=t,a=[Xt.LIVE,Xt.ON_DEMAND].includes(i)?i:void 0;if(!e)return a;const{streamType:r}=e;if(s0.includes(r))return r===Xt.UNKNOWN?a:r;const n=e.duration;return n===1/0?Xt.LIVE:Number.isFinite(n)?Xt.ON_DEMAND:a},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange"]},mediaTargetLiveWindow:{get(t){const{media:e}=t;if(!e)return Number.NaN;const{targetLiveWindow:i}=e,a=Mr.mediaStreamType.get(t);return(i==null||Number.isNaN(i))&&a===Xt.LIVE?0:i},mediaEvents:["emptied","durationchange","loadedmetadata","streamtypechange","targetlivewindowchange"]},mediaTimeIsLive:{get(t){const{media:e,options:{liveEdgeOffset:i=10}={}}=t;if(!e)return!1;if(typeof e.liveEdgeStart=="number")return Number.isNaN(e.liveEdgeStart)?!1:e.currentTime>=e.liveEdgeStart;if(!(Mr.mediaStreamType.get(t)===Xt.LIVE))return!1;const r=e.seekable;if(!r)return!0;if(!r.length)return!1;const n=r.end(r.length-1)-i;return e.currentTime>=n},mediaEvents:["playing","timeupdate","progress","waiting","emptied"]},mediaSubtitlesList:{get(t){return so(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack"]},mediaSubtitlesShowing:{get(t){return yp(t).map(({kind:e,label:i,language:a})=>({kind:e,label:i,language:a}))},mediaEvents:["loadstart"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i,a;const{media:r,options:n}=e;if(!r)return;const s=o=>{var l;!n.defaultSubtitles||o&&![Vt.CAPTIONS,Vt.SUBTITLES].includes((l=o?.track)==null?void 0:l.kind)||Tp(e,!0)};return r.addEventListener("loadstart",s),(i=r.textTracks)==null||i.addEventListener("addtrack",s),(a=r.textTracks)==null||a.addEventListener("removetrack",s),()=>{var o,l;r.removeEventListener("loadstart",s),(o=r.textTracks)==null||o.removeEventListener("addtrack",s),(l=r.textTracks)==null||l.removeEventListener("removetrack",s)}}]},mediaChaptersCues:{get(t){var e;const{media:i}=t;if(!i)return[];const[a]=Ho(i,{kind:Vt.CHAPTERS});return Array.from((e=a?.cues)!=null?e:[]).map(({text:r,startTime:n,endTime:s})=>({text:u0(r),startTime:n,endTime:s}))},mediaEvents:["loadstart","loadedmetadata"],textTracksEvents:["addtrack","removetrack","change"],stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;if(!a)return;const r=a.querySelector('track[kind="chapters"][default][src]'),n=(i=a.shadowRoot)==null?void 0:i.querySelector(':is(video,audio) > track[kind="chapters"][default][src]');return r?.addEventListener("load",t),n?.addEventListener("load",t),()=>{r?.removeEventListener("load",t),n?.removeEventListener("load",t)}}]},mediaIsPip:{get(t){var e,i;const{media:a,documentElement:r}=t;if(!a||!r||!r.pictureInPictureElement)return!1;if(r.pictureInPictureElement===a)return!0;if(r.pictureInPictureElement instanceof HTMLMediaElement)return(e=a.localName)!=null&&e.includes("-")?si(a,r.pictureInPictureElement):!1;if(r.pictureInPictureElement.localName.includes("-")){let n=r.pictureInPictureElement.shadowRoot;for(;n?.pictureInPictureElement;){if(n.pictureInPictureElement===a)return!0;n=(i=n.pictureInPictureElement)==null?void 0:i.shadowRoot}}return!1},set(t,e){const{media:i}=e;if(i)if(t){if(!_e.pictureInPictureEnabled){console.warn("MediaChrome: Picture-in-picture is not enabled");return}if(!i.requestPictureInPicture){console.warn("MediaChrome: The current media does not support picture-in-picture");return}const a=()=>{console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a readyState > 0.")};i.requestPictureInPicture().catch(r=>{if(r.code===11){if(!i.src){console.warn("MediaChrome: The media is not ready for picture-in-picture. It must have a src set.");return}if(i.readyState===0&&i.preload==="none"){const n=()=>{i.removeEventListener("loadedmetadata",s),i.preload="none"},s=()=>{i.requestPictureInPicture().catch(a),n()};i.addEventListener("loadedmetadata",s),i.preload="metadata",setTimeout(()=>{i.readyState===0&&a(),n()},1e3)}else throw r}else throw r})}else _e.pictureInPictureElement&&_e.exitPictureInPicture()},mediaEvents:["enterpictureinpicture","leavepictureinpicture"]},mediaRenditionList:{get(t){var e;const{media:i}=t;return[...(e=i?.videoRenditions)!=null?e:[]].map(a=>({...a}))},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaRenditionSelected:{get(t){var e,i,a;const{media:r}=t;return(a=(i=r?.videoRenditions)==null?void 0:i[(e=r.videoRenditions)==null?void 0:e.selectedIndex])==null?void 0:a.id},set(t,e){const{media:i}=e;if(!i?.videoRenditions){console.warn("MediaController: Rendition selection not supported by this media.");return}const a=t,r=Array.prototype.findIndex.call(i.videoRenditions,n=>n.id==a);i.videoRenditions.selectedIndex!=r&&(i.videoRenditions.selectedIndex=r)},mediaEvents:["emptied"],videoRenditionsEvents:["addrendition","removerendition","change"]},mediaAudioTrackList:{get(t){var e;const{media:i}=t;return[...(e=i?.audioTracks)!=null?e:[]]},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaAudioTrackEnabled:{get(t){var e,i;const{media:a}=t;return(i=[...(e=a?.audioTracks)!=null?e:[]].find(r=>r.enabled))==null?void 0:i.id},set(t,e){const{media:i}=e;if(!i?.audioTracks){console.warn("MediaChrome: Audio track selection not supported by this media.");return}const a=t;for(const r of i.audioTracks)r.enabled=a==r.id},mediaEvents:["emptied"],audioTracksEvents:["addtrack","removetrack","change"]},mediaIsFullscreen:{get(t){return Qg(t)},set(t,e,i){var a;t?(qg(e),i.detail&&((a=e.media)==null||a.focus())):Yg(e)},rootEvents:["fullscreenchange","webkitfullscreenchange"],mediaEvents:["webkitbeginfullscreen","webkitendfullscreen","webkitpresentationmodechanged"]},mediaIsCasting:{get(t){var e;const{media:i}=t;return!i?.remote||((e=i.remote)==null?void 0:e.state)==="disconnected"?!1:!!i.remote.state},set(t,e){var i,a;const{media:r}=e;if(r&&!(t&&((i=r.remote)==null?void 0:i.state)!=="disconnected")&&!(!t&&((a=r.remote)==null?void 0:a.state)!=="connected")){if(typeof r.remote.prompt!="function"){console.warn("MediaChrome: Casting is not supported in this environment");return}r.remote.prompt().catch(()=>{})}},remoteEvents:["connect","connecting","disconnect"]},mediaIsAirplaying:{get(){return!1},set(t,e){const{media:i}=e;if(i){if(!(i.webkitShowPlaybackTargetPicker&&f.WebKitPlaybackTargetAvailabilityEvent)){console.error("MediaChrome: received a request to select AirPlay but AirPlay is not supported in this environment");return}i.webkitShowPlaybackTargetPicker()}},mediaEvents:["webkitcurrentplaybacktargetiswirelesschanged"]},mediaFullscreenUnavailable:{get(t){const{media:e}=t;if(!t0||!gp(e))return Ye.UNSUPPORTED}},mediaPipUnavailable:{get(t){const{media:e}=t;if(!i0||!bp(e))return Ye.UNSUPPORTED;if(e?.disablePictureInPicture)return Ye.UNAVAILABLE}},mediaVolumeUnavailable:{get(t){const{media:e}=t;if(oo===!1||e?.volume==null)return Ye.UNSUPPORTED},stateOwnersUpdateHandlers:[t=>{oo==null&&o0.then(e=>t(e?void 0:Ye.UNSUPPORTED))}]},mediaCastUnavailable:{get(t,{availability:e="not-available"}={}){var i;const{media:a}=t;if(!r0||!((i=a?.remote)!=null&&i.state))return Ye.UNSUPPORTED;if(!(e==null||e==="available"))return Ye.UNAVAILABLE},stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a?.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a?.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaAirplayUnavailable:{get(t,e){if(!a0)return Ye.UNSUPPORTED;if(e?.availability==="not-available")return Ye.UNAVAILABLE},mediaEvents:["webkitplaybacktargetavailabilitychanged"],stateOwnersUpdateHandlers:[(t,e)=>{var i;const{media:a}=e;return a?(a.disableRemotePlayback||a.hasAttribute("disableremoteplayback")||(i=a?.remote)==null||i.watchAvailability(n=>{t({availability:n?"available":"not-available"})}).catch(n=>{n.name==="NotSupportedError"?t({availability:null}):t({availability:"not-available"})}),()=>{var n;(n=a?.remote)==null||n.cancelWatchAvailability().catch(()=>{})}):void 0}]},mediaRenditionUnavailable:{get(t){var e;const{media:i}=t;if(!i?.videoRenditions)return Ye.UNSUPPORTED;if(!((e=i.videoRenditions)!=null&&e.length))return Ye.UNAVAILABLE},mediaEvents:["emptied","loadstart"],videoRenditionsEvents:["addrendition","removerendition"]},mediaAudioTrackUnavailable:{get(t){var e,i;const{media:a}=t;if(!a?.audioTracks)return Ye.UNSUPPORTED;if(((i=(e=a.audioTracks)==null?void 0:e.length)!=null?i:0)<=1)return Ye.UNAVAILABLE},mediaEvents:["emptied","loadstart"],audioTracksEvents:["addtrack","removetrack"]},mediaLang:{get(t){const{options:{mediaLang:e}={}}=t;return e??"en"}}},c0={[I.MEDIA_PREVIEW_REQUEST](t,e,{detail:i}){var a,r,n;const{media:s}=e,o=i??void 0;let l,d;if(s&&o!=null){const[u]=Ho(s,{kind:Vt.METADATA,label:"thumbnails"}),v=Array.prototype.find.call((a=u?.cues)!=null?a:[],(E,g,y)=>g===0?E.endTime>o:g===y.length-1?E.startTime<=o:E.startTime<=o&&E.endTime>o);if(v){const E=/'^(?:[a-z]+:)?\/\//i.test(v.text)||(r=s?.querySelector('track[label="thumbnails"]'))==null?void 0:r.src,g=new URL(v.text,E);d=new URLSearchParams(g.hash).get("#xywh").split(",").map(T=>+T),l=g.href}}const m=t.mediaDuration.get(e);let h=(n=t.mediaChaptersCues.get(e).find((u,v,E)=>v===E.length-1&&m===u.endTime?u.startTime<=o&&u.endTime>=o:u.startTime<=o&&u.endTime>o))==null?void 0:n.text;return i!=null&&h==null&&(h=""),{mediaPreviewTime:o,mediaPreviewImage:l,mediaPreviewCoords:d,mediaPreviewChapter:h}},[I.MEDIA_PAUSE_REQUEST](t,e){t["mediaPaused"].set(!0,e)},[I.MEDIA_PLAY_REQUEST](t,e){var i,a,r,n;const s="mediaPaused",l=t.mediaStreamType.get(e)===Xt.LIVE,d=!((i=e.options)!=null&&i.noAutoSeekToLive),m=t.mediaTargetLiveWindow.get(e)>0;if(l&&d&&!m){const p=(a=t.mediaSeekable.get(e))==null?void 0:a[1];if(p){const h=(n=(r=e.options)==null?void 0:r.seekToLiveOffset)!=null?n:0,u=p-h;t.mediaCurrentTime.set(u,e)}}t[s].set(!1,e)},[I.MEDIA_PLAYBACK_RATE_REQUEST](t,e,{detail:i}){const a="mediaPlaybackRate",r=i;t[a].set(r,e)},[I.MEDIA_MUTE_REQUEST](t,e){t["mediaMuted"].set(!0,e)},[I.MEDIA_UNMUTE_REQUEST](t,e){const i="mediaMuted";t.mediaVolume.get(e)||t.mediaVolume.set(.25,e),t[i].set(!1,e)},[I.MEDIA_LOOP_REQUEST](t,e,{detail:i}){const a="mediaLoop",r=!!i;return t[a].set(r,e),{mediaLoop:r}},[I.MEDIA_VOLUME_REQUEST](t,e,{detail:i}){const a="mediaVolume",r=i;r&&t.mediaMuted.get(e)&&t.mediaMuted.set(!1,e),t[a].set(r,e)},[I.MEDIA_SEEK_REQUEST](t,e,{detail:i}){const a="mediaCurrentTime",r=i;t[a].set(r,e)},[I.MEDIA_SEEK_TO_LIVE_REQUEST](t,e){var i,a,r;const n="mediaCurrentTime",s=(i=t.mediaSeekable.get(e))==null?void 0:i[1];if(Number.isNaN(Number(s)))return;const o=(r=(a=e.options)==null?void 0:a.seekToLiveOffset)!=null?r:0,l=s-o;t[n].set(l,e)},[I.MEDIA_SHOW_SUBTITLES_REQUEST](t,e,{detail:i}){var a;const{options:r}=e,n=so(e),s=fp(i),o=(a=s[0])==null?void 0:a.language;o&&!r.noSubtitlesLangPref&&f.localStorage.setItem("media-chrome-pref-subtitles-lang",o),jr(Ka.SHOWING,n,s)},[I.MEDIA_DISABLE_SUBTITLES_REQUEST](t,e,{detail:i}){const a=so(e),r=i??[];jr(Ka.DISABLED,a,r)},[I.MEDIA_TOGGLE_SUBTITLES_REQUEST](t,e,{detail:i}){Tp(e,i)},[I.MEDIA_RENDITION_REQUEST](t,e,{detail:i}){const a="mediaRenditionSelected",r=i;t[a].set(r,e)},[I.MEDIA_AUDIO_TRACK_REQUEST](t,e,{detail:i}){const a="mediaAudioTrackEnabled",r=i;t[a].set(r,e)},[I.MEDIA_ENTER_PIP_REQUEST](t,e){const i="mediaIsPip";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[I.MEDIA_EXIT_PIP_REQUEST](t,e){t["mediaIsPip"].set(!1,e)},[I.MEDIA_ENTER_FULLSCREEN_REQUEST](t,e,i){const a="mediaIsFullscreen";t.mediaIsPip.get(e)&&t.mediaIsPip.set(!1,e),t[a].set(!0,e,i)},[I.MEDIA_EXIT_FULLSCREEN_REQUEST](t,e){t["mediaIsFullscreen"].set(!1,e)},[I.MEDIA_ENTER_CAST_REQUEST](t,e){const i="mediaIsCasting";t.mediaIsFullscreen.get(e)&&t.mediaIsFullscreen.set(!1,e),t[i].set(!0,e)},[I.MEDIA_EXIT_CAST_REQUEST](t,e){t["mediaIsCasting"].set(!1,e)},[I.MEDIA_AIRPLAY_REQUEST](t,e){t["mediaIsAirplaying"].set(!0,e)}},h0=({media:t,fullscreenElement:e,documentElement:i,stateMediator:a=Mr,requestMap:r=c0,options:n={},monitorStateOwnersOnlyWithSubscriptions:s=!0})=>{const o=[],l={options:{...n}};let d=Object.freeze({mediaPreviewTime:void 0,mediaPreviewImage:void 0,mediaPreviewCoords:void 0,mediaPreviewChapter:void 0});const m=E=>{E!=null&&(du(E,d)||(d=Object.freeze({...d,...E}),o.forEach(g=>g(d))))},p=()=>{const E=Object.entries(a).reduce((g,[y,{get:T}])=>(g[y]=T(l),g),{});m(E)},h={};let u;const v=async(E,g)=>{var y,T,_,S,C,N,$,G,J,K,U,Me,Fe,Ke,he,Pe;const yt=!!u;if(u={...l,...u??{},...E},yt)return;await l0(...Object.values(E));const Ue=o.length>0&&g===0&&s,dt=l.media!==u.media,Ve=((y=l.media)==null?void 0:y.textTracks)!==((T=u.media)==null?void 0:T.textTracks),ke=((_=l.media)==null?void 0:_.videoRenditions)!==((S=u.media)==null?void 0:S.videoRenditions),xe=((C=l.media)==null?void 0:C.audioTracks)!==((N=u.media)==null?void 0:N.audioTracks),Je=(($=l.media)==null?void 0:$.remote)!==((G=u.media)==null?void 0:G.remote),na=l.documentElement!==u.documentElement,Tn=!!l.media&&(dt||Ue),lc=!!((J=l.media)!=null&&J.textTracks)&&(Ve||Ue),dc=!!((K=l.media)!=null&&K.videoRenditions)&&(ke||Ue),uc=!!((U=l.media)!=null&&U.audioTracks)&&(xe||Ue),cc=!!((Me=l.media)!=null&&Me.remote)&&(Je||Ue),hc=!!l.documentElement&&(na||Ue),zo=Tn||lc||dc||uc||cc||hc,sa=o.length===0&&g===1&&s,mc=!!u.media&&(dt||sa),pc=!!((Fe=u.media)!=null&&Fe.textTracks)&&(Ve||sa),vc=!!((Ke=u.media)!=null&&Ke.videoRenditions)&&(ke||sa),fc=!!((he=u.media)!=null&&he.audioTracks)&&(xe||sa),Ec=!!((Pe=u.media)!=null&&Pe.remote)&&(Je||sa),_c=!!u.documentElement&&(na||sa),bc=mc||pc||vc||fc||Ec||_c;if(!(zo||bc)){Object.entries(u).forEach(([j,ur])=>{l[j]=ur}),p(),u=void 0;return}Object.entries(a).forEach(([j,{get:ur,mediaEvents:nf=[],textTracksEvents:sf=[],videoRenditionsEvents:of=[],audioTracksEvents:lf=[],remoteEvents:df=[],rootEvents:uf=[],stateOwnersUpdateHandlers:cf=[]}])=>{h[j]||(h[j]={});const qe=se=>{const me=ur(l,se);m({[j]:me})};let Se;Se=h[j].mediaEvents,nf.forEach(se=>{Se&&Tn&&(l.media.removeEventListener(se,Se),h[j].mediaEvents=void 0),mc&&(u.media.addEventListener(se,qe),h[j].mediaEvents=qe)}),Se=h[j].textTracksEvents,sf.forEach(se=>{var me,ut;Se&&lc&&((me=l.media.textTracks)==null||me.removeEventListener(se,Se),h[j].textTracksEvents=void 0),pc&&((ut=u.media.textTracks)==null||ut.addEventListener(se,qe),h[j].textTracksEvents=qe)}),Se=h[j].videoRenditionsEvents,of.forEach(se=>{var me,ut;Se&&dc&&((me=l.media.videoRenditions)==null||me.removeEventListener(se,Se),h[j].videoRenditionsEvents=void 0),vc&&((ut=u.media.videoRenditions)==null||ut.addEventListener(se,qe),h[j].videoRenditionsEvents=qe)}),Se=h[j].audioTracksEvents,lf.forEach(se=>{var me,ut;Se&&uc&&((me=l.media.audioTracks)==null||me.removeEventListener(se,Se),h[j].audioTracksEvents=void 0),fc&&((ut=u.media.audioTracks)==null||ut.addEventListener(se,qe),h[j].audioTracksEvents=qe)}),Se=h[j].remoteEvents,df.forEach(se=>{var me,ut;Se&&cc&&((me=l.media.remote)==null||me.removeEventListener(se,Se),h[j].remoteEvents=void 0),Ec&&((ut=u.media.remote)==null||ut.addEventListener(se,qe),h[j].remoteEvents=qe)}),Se=h[j].rootEvents,uf.forEach(se=>{Se&&hc&&(l.documentElement.removeEventListener(se,Se),h[j].rootEvents=void 0),_c&&(u.documentElement.addEventListener(se,qe),h[j].rootEvents=qe)});const An=h[j].stateOwnersUpdateHandlers;if(An&&zo&&(Array.isArray(An)?An:[An]).forEach(me=>{typeof me=="function"&&me()}),bc){const se=cf.map(me=>me(qe,u)).filter(me=>typeof me=="function");h[j].stateOwnersUpdateHandlers=se.length===1?se[0]:se}else zo&&(h[j].stateOwnersUpdateHandlers=void 0)}),Object.entries(u).forEach(([j,ur])=>{l[j]=ur}),p(),u=void 0};return v({media:t,fullscreenElement:e,documentElement:i,options:n}),{dispatch(E){const{type:g,detail:y}=E;if(r[g]&&d.mediaErrorCode==null){m(r[g](a,l,E));return}g==="mediaelementchangerequest"?v({media:y}):g==="fullscreenelementchangerequest"?v({fullscreenElement:y}):g==="documentelementchangerequest"?v({documentElement:y}):g==="optionschangerequest"&&(Object.entries(y??{}).forEach(([T,_])=>{l.options[T]=_}),p())},getState(){return d},subscribe(E){return v({},o.length+1),o.push(E),E(d),()=>{const g=o.indexOf(E);g>=0&&(v({},o.length-1),o.splice(g,1))}}}};var uu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},O=(t,e,i)=>(uu(t,e,"read from private field"),i?i.call(t):e.get(t)),et=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},It=(t,e,i,a)=>(uu(t,e,"write to private field"),e.set(t,i),i),$t=(t,e,i)=>(uu(t,e,"access private method"),i),gi,xr,V,qi,Or,Rt,as,Nr,rs,Hl,ji,Va,ns,Bl,Wl,Ap;const kp=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"," ","f","m","k","c","l","j",">","<","p"],Qc=10,zc=.025,jc=.25,m0=.25,p0=2,k={DEFAULT_SUBTITLES:"defaultsubtitles",DEFAULT_STREAM_TYPE:"defaultstreamtype",DEFAULT_DURATION:"defaultduration",FULLSCREEN_ELEMENT:"fullscreenelement",HOTKEYS:"hotkeys",KEYBOARD_BACKWARD_SEEK_OFFSET:"keyboardbackwardseekoffset",KEYBOARD_FORWARD_SEEK_OFFSET:"keyboardforwardseekoffset",KEYBOARD_DOWN_VOLUME_STEP:"keyboarddownvolumestep",KEYBOARD_UP_VOLUME_STEP:"keyboardupvolumestep",KEYS_USED:"keysused",LANG:"lang",LOOP:"loop",LIVE_EDGE_OFFSET:"liveedgeoffset",NO_AUTO_SEEK_TO_LIVE:"noautoseektolive",NO_DEFAULT_STORE:"nodefaultstore",NO_HOTKEYS:"nohotkeys",NO_MUTED_PREF:"nomutedpref",NO_SUBTITLES_LANG_PREF:"nosubtitleslangpref",NO_VOLUME_PREF:"novolumepref",SEEK_TO_LIVE_OFFSET:"seektoliveoffset"};class Sp extends Uo{constructor(){super(),et(this,rs),et(this,ji),et(this,ns),et(this,Wl),this.mediaStateReceivers=[],this.associatedElementSubscriptions=new Map,et(this,gi,new ou(this,k.HOTKEYS)),et(this,xr,void 0),et(this,V,void 0),et(this,qi,null),et(this,Or,void 0),et(this,Rt,void 0),et(this,as,i=>{var a;(a=O(this,V))==null||a.dispatch(i)}),et(this,Nr,void 0),this.associateElement(this);let e={};It(this,Or,i=>{Object.entries(i).forEach(([a,r])=>{if(a in e&&e[a]===r)return;this.propagateMediaState(a,r);const n=a.toLowerCase(),s=new f.CustomEvent(vg[n],{composed:!0,detail:r});this.dispatchEvent(s)}),e=i}),this.hasAttribute(k.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}static get observedAttributes(){return super.observedAttributes.concat(k.NO_HOTKEYS,k.HOTKEYS,k.DEFAULT_STREAM_TYPE,k.DEFAULT_SUBTITLES,k.DEFAULT_DURATION,k.NO_MUTED_PREF,k.NO_VOLUME_PREF,k.LANG,k.LOOP)}get mediaStore(){return O(this,V)}set mediaStore(e){var i,a;if(O(this,V)&&((i=O(this,Rt))==null||i.call(this),It(this,Rt,void 0)),It(this,V,e),!O(this,V)&&!this.hasAttribute(k.NO_DEFAULT_STORE)){$t(this,rs,Hl).call(this);return}It(this,Rt,(a=O(this,V))==null?void 0:a.subscribe(O(this,Or)))}get fullscreenElement(){var e;return(e=O(this,xr))!=null?e:this}set fullscreenElement(e){var i;this.hasAttribute(k.FULLSCREEN_ELEMENT)&&this.removeAttribute(k.FULLSCREEN_ELEMENT),It(this,xr,e),(i=O(this,V))==null||i.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}get defaultSubtitles(){return W(this,k.DEFAULT_SUBTITLES)}set defaultSubtitles(e){F(this,k.DEFAULT_SUBTITLES,e)}get defaultStreamType(){return ae(this,k.DEFAULT_STREAM_TYPE)}set defaultStreamType(e){re(this,k.DEFAULT_STREAM_TYPE,e)}get defaultDuration(){return ie(this,k.DEFAULT_DURATION)}set defaultDuration(e){ue(this,k.DEFAULT_DURATION,e)}get noHotkeys(){return W(this,k.NO_HOTKEYS)}set noHotkeys(e){F(this,k.NO_HOTKEYS,e)}get keysUsed(){return ae(this,k.KEYS_USED)}set keysUsed(e){re(this,k.KEYS_USED,e)}get liveEdgeOffset(){return ie(this,k.LIVE_EDGE_OFFSET)}set liveEdgeOffset(e){ue(this,k.LIVE_EDGE_OFFSET,e)}get noAutoSeekToLive(){return W(this,k.NO_AUTO_SEEK_TO_LIVE)}set noAutoSeekToLive(e){F(this,k.NO_AUTO_SEEK_TO_LIVE,e)}get noVolumePref(){return W(this,k.NO_VOLUME_PREF)}set noVolumePref(e){F(this,k.NO_VOLUME_PREF,e)}get noMutedPref(){return W(this,k.NO_MUTED_PREF)}set noMutedPref(e){F(this,k.NO_MUTED_PREF,e)}get noSubtitlesLangPref(){return W(this,k.NO_SUBTITLES_LANG_PREF)}set noSubtitlesLangPref(e){F(this,k.NO_SUBTITLES_LANG_PREF,e)}get noDefaultStore(){return W(this,k.NO_DEFAULT_STORE)}set noDefaultStore(e){F(this,k.NO_DEFAULT_STORE,e)}attributeChangedCallback(e,i,a){var r,n,s,o,l,d,m,p,h,u,v,E;if(super.attributeChangedCallback(e,i,a),e===k.NO_HOTKEYS)a!==i&&a===""?(this.hasAttribute(k.HOTKEYS)&&console.warn("Media Chrome: Both `hotkeys` and `nohotkeys` have been set. All hotkeys will be disabled."),this.disableHotkeys()):a!==i&&a===null&&this.enableHotkeys();else if(e===k.HOTKEYS)O(this,gi).value=a;else if(e===k.DEFAULT_SUBTITLES&&a!==i)(r=O(this,V))==null||r.dispatch({type:"optionschangerequest",detail:{defaultSubtitles:this.hasAttribute(k.DEFAULT_SUBTITLES)}});else if(e===k.DEFAULT_STREAM_TYPE)(s=O(this,V))==null||s.dispatch({type:"optionschangerequest",detail:{defaultStreamType:(n=this.getAttribute(k.DEFAULT_STREAM_TYPE))!=null?n:void 0}});else if(e===k.LIVE_EDGE_OFFSET)(o=O(this,V))==null||o.dispatch({type:"optionschangerequest",detail:{liveEdgeOffset:this.hasAttribute(k.LIVE_EDGE_OFFSET)?+this.getAttribute(k.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(k.SEEK_TO_LIVE_OFFSET)?void 0:+this.getAttribute(k.LIVE_EDGE_OFFSET)}});else if(e===k.SEEK_TO_LIVE_OFFSET)(l=O(this,V))==null||l.dispatch({type:"optionschangerequest",detail:{seekToLiveOffset:this.hasAttribute(k.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(k.SEEK_TO_LIVE_OFFSET):void 0}});else if(e===k.NO_AUTO_SEEK_TO_LIVE)(d=O(this,V))==null||d.dispatch({type:"optionschangerequest",detail:{noAutoSeekToLive:this.hasAttribute(k.NO_AUTO_SEEK_TO_LIVE)}});else if(e===k.FULLSCREEN_ELEMENT){const g=a?(m=this.getRootNode())==null?void 0:m.getElementById(a):void 0;It(this,xr,g),(p=O(this,V))==null||p.dispatch({type:"fullscreenelementchangerequest",detail:this.fullscreenElement})}else e===k.LANG&&a!==i?(Rg(a),(h=O(this,V))==null||h.dispatch({type:"optionschangerequest",detail:{mediaLang:a}})):e===k.LOOP&&a!==i?(u=O(this,V))==null||u.dispatch({type:I.MEDIA_LOOP_REQUEST,detail:a!=null}):e===k.NO_VOLUME_PREF&&a!==i?(v=O(this,V))==null||v.dispatch({type:"optionschangerequest",detail:{noVolumePref:this.hasAttribute(k.NO_VOLUME_PREF)}}):e===k.NO_MUTED_PREF&&a!==i&&((E=O(this,V))==null||E.dispatch({type:"optionschangerequest",detail:{noMutedPref:this.hasAttribute(k.NO_MUTED_PREF)}}))}connectedCallback(){var e,i;!O(this,V)&&!this.hasAttribute(k.NO_DEFAULT_STORE)&&$t(this,rs,Hl).call(this),(e=O(this,V))==null||e.dispatch({type:"documentelementchangerequest",detail:_e}),super.connectedCallback(),O(this,V)&&!O(this,Rt)&&It(this,Rt,(i=O(this,V))==null?void 0:i.subscribe(O(this,Or))),O(this,Nr)!==void 0&&O(this,V)&&this.media&&setTimeout(()=>{var a,r,n;(r=(a=this.media)==null?void 0:a.textTracks)!=null&&r.length&&((n=O(this,V))==null||n.dispatch({type:I.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:O(this,Nr)}))},0),this.hasAttribute(k.NO_HOTKEYS)?this.disableHotkeys():this.enableHotkeys()}disconnectedCallback(){var e,i,a,r,n;if((e=super.disconnectedCallback)==null||e.call(this),O(this,V)){const s=O(this,V).getState();It(this,Nr,!!((i=s.mediaSubtitlesShowing)!=null&&i.length)),(a=O(this,V))==null||a.dispatch({type:"documentelementchangerequest",detail:void 0}),(r=O(this,V))==null||r.dispatch({type:I.MEDIA_TOGGLE_SUBTITLES_REQUEST,detail:!1})}O(this,Rt)&&((n=O(this,Rt))==null||n.call(this),It(this,Rt,void 0))}mediaSetCallback(e){var i;super.mediaSetCallback(e),(i=O(this,V))==null||i.dispatch({type:"mediaelementchangerequest",detail:e}),e.hasAttribute("tabindex")||(e.tabIndex=-1)}mediaUnsetCallback(e){var i;super.mediaUnsetCallback(e),(i=O(this,V))==null||i.dispatch({type:"mediaelementchangerequest",detail:void 0})}propagateMediaState(e,i){Jc(this.mediaStateReceivers,e,i)}associateElement(e){if(!e)return;const{associatedElementSubscriptions:i}=this;if(i.has(e))return;const a=this.registerMediaStateReceiver.bind(this),r=this.unregisterMediaStateReceiver.bind(this),n=g0(e,a,r);Object.values(I).forEach(s=>{e.addEventListener(s,O(this,as))}),i.set(e,n)}unassociateElement(e){if(!e)return;const{associatedElementSubscriptions:i}=this;if(!i.has(e))return;i.get(e)(),i.delete(e),Object.values(I).forEach(r=>{e.removeEventListener(r,O(this,as))})}registerMediaStateReceiver(e){if(!e)return;const i=this.mediaStateReceivers;i.indexOf(e)>-1||(i.push(e),O(this,V)&&Object.entries(O(this,V).getState()).forEach(([r,n])=>{Jc([e],r,n)}))}unregisterMediaStateReceiver(e){const i=this.mediaStateReceivers,a=i.indexOf(e);a<0||i.splice(a,1)}enableHotkeys(){this.addEventListener("keydown",$t(this,ns,Bl))}disableHotkeys(){this.removeEventListener("keydown",$t(this,ns,Bl)),this.removeEventListener("keyup",$t(this,ji,Va))}get hotkeys(){return ae(this,k.HOTKEYS)}set hotkeys(e){re(this,k.HOTKEYS,e)}keyboardShortcutHandler(e){var i,a,r,n,s,o,l,d,m;const p=e.target;if(((r=(a=(i=p.getAttribute(k.KEYS_USED))==null?void 0:i.split(" "))!=null?a:p?.keysUsed)!=null?r:[]).map(y=>y==="Space"?" ":y).filter(Boolean).includes(e.key))return;let u,v,E;if(!(O(this,gi).contains(`no${e.key.toLowerCase()}`)||e.key===" "&&O(this,gi).contains("nospace")||e.shiftKey&&(e.key==="/"||e.key==="?")&&O(this,gi).contains("noshift+/")))switch(e.key){case" ":case"k":u=O(this,V).getState().mediaPaused?I.MEDIA_PLAY_REQUEST:I.MEDIA_PAUSE_REQUEST,this.dispatchEvent(new f.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"m":u=this.mediaStore.getState().mediaVolumeLevel==="off"?I.MEDIA_UNMUTE_REQUEST:I.MEDIA_MUTE_REQUEST,this.dispatchEvent(new f.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"f":u=this.mediaStore.getState().mediaIsFullscreen?I.MEDIA_EXIT_FULLSCREEN_REQUEST:I.MEDIA_ENTER_FULLSCREEN_REQUEST,this.dispatchEvent(new f.CustomEvent(u,{composed:!0,bubbles:!0}));break;case"c":this.dispatchEvent(new f.CustomEvent(I.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}));break;case"ArrowLeft":case"j":{const y=this.hasAttribute(k.KEYBOARD_BACKWARD_SEEK_OFFSET)?+this.getAttribute(k.KEYBOARD_BACKWARD_SEEK_OFFSET):Qc;v=Math.max(((n=this.mediaStore.getState().mediaCurrentTime)!=null?n:0)-y,0),E=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"ArrowRight":case"l":{const y=this.hasAttribute(k.KEYBOARD_FORWARD_SEEK_OFFSET)?+this.getAttribute(k.KEYBOARD_FORWARD_SEEK_OFFSET):Qc;v=Math.max(((s=this.mediaStore.getState().mediaCurrentTime)!=null?s:0)+y,0),E=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"ArrowUp":{const y=this.hasAttribute(k.KEYBOARD_UP_VOLUME_STEP)?+this.getAttribute(k.KEYBOARD_UP_VOLUME_STEP):zc;v=Math.min(((o=this.mediaStore.getState().mediaVolume)!=null?o:1)+y,1),E=new f.CustomEvent(I.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"ArrowDown":{const y=this.hasAttribute(k.KEYBOARD_DOWN_VOLUME_STEP)?+this.getAttribute(k.KEYBOARD_DOWN_VOLUME_STEP):zc;v=Math.max(((l=this.mediaStore.getState().mediaVolume)!=null?l:1)-y,0),E=new f.CustomEvent(I.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"<":{const y=(d=this.mediaStore.getState().mediaPlaybackRate)!=null?d:1;v=Math.max(y-jc,m0).toFixed(2),E=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case">":{const y=(m=this.mediaStore.getState().mediaPlaybackRate)!=null?m:1;v=Math.min(y+jc,p0).toFixed(2),E=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:v}),this.dispatchEvent(E);break}case"/":case"?":{e.shiftKey&&$t(this,Wl,Ap).call(this);break}case"p":{u=this.mediaStore.getState().mediaIsPip?I.MEDIA_EXIT_PIP_REQUEST:I.MEDIA_ENTER_PIP_REQUEST,E=new f.CustomEvent(u,{composed:!0,bubbles:!0}),this.dispatchEvent(E);break}}}}gi=new WeakMap;xr=new WeakMap;V=new WeakMap;qi=new WeakMap;Or=new WeakMap;Rt=new WeakMap;as=new WeakMap;Nr=new WeakMap;rs=new WeakSet;Hl=function(){var t;this.mediaStore=h0({media:this.media,fullscreenElement:this.fullscreenElement,options:{defaultSubtitles:this.hasAttribute(k.DEFAULT_SUBTITLES),defaultDuration:this.hasAttribute(k.DEFAULT_DURATION)?+this.getAttribute(k.DEFAULT_DURATION):void 0,defaultStreamType:(t=this.getAttribute(k.DEFAULT_STREAM_TYPE))!=null?t:void 0,liveEdgeOffset:this.hasAttribute(k.LIVE_EDGE_OFFSET)?+this.getAttribute(k.LIVE_EDGE_OFFSET):void 0,seekToLiveOffset:this.hasAttribute(k.SEEK_TO_LIVE_OFFSET)?+this.getAttribute(k.SEEK_TO_LIVE_OFFSET):this.hasAttribute(k.LIVE_EDGE_OFFSET)?+this.getAttribute(k.LIVE_EDGE_OFFSET):void 0,noAutoSeekToLive:this.hasAttribute(k.NO_AUTO_SEEK_TO_LIVE),noVolumePref:this.hasAttribute(k.NO_VOLUME_PREF),noMutedPref:this.hasAttribute(k.NO_MUTED_PREF),noSubtitlesLangPref:this.hasAttribute(k.NO_SUBTITLES_LANG_PREF)}})};ji=new WeakSet;Va=function(t){const{key:e,shiftKey:i}=t;if(!(i&&(e==="/"||e==="?")||kp.includes(e))){this.removeEventListener("keyup",$t(this,ji,Va));return}this.keyboardShortcutHandler(t)};ns=new WeakSet;Bl=function(t){var e;const{metaKey:i,altKey:a,key:r,shiftKey:n}=t,s=n&&(r==="/"||r==="?");if(s&&((e=O(this,qi))!=null&&e.open)){this.removeEventListener("keyup",$t(this,ji,Va));return}if(i||a||!s&&!kp.includes(r)){this.removeEventListener("keyup",$t(this,ji,Va));return}const o=t.target,l=o instanceof HTMLElement&&(o.tagName.toLowerCase()==="media-volume-range"||o.tagName.toLowerCase()==="media-time-range");[" ","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(r)&&!(O(this,gi).contains(`no${r.toLowerCase()}`)||r===" "&&O(this,gi).contains("nospace"))&&!l&&t.preventDefault(),this.addEventListener("keyup",$t(this,ji,Va),{once:!0})};Wl=new WeakSet;Ap=function(){O(this,qi)||(It(this,qi,_e.createElement("media-keyboard-shortcuts-dialog")),this.appendChild(O(this,qi))),O(this,qi).open=!0};const v0=Object.values(c),f0=Object.values(jm),wp=t=>{var e,i,a,r;let{observedAttributes:n}=t.constructor;!n&&((e=t.nodeName)!=null&&e.includes("-"))&&(f.customElements.upgrade(t),{observedAttributes:n}=t.constructor);const s=(r=(a=(i=t?.getAttribute)==null?void 0:i.call(t,Y.MEDIA_CHROME_ATTRIBUTES))==null?void 0:a.split)==null?void 0:r.call(a,/\s+/);return Array.isArray(n||s)?(n||s).filter(o=>v0.includes(o)):[]},E0=t=>{var e,i;return(e=t.nodeName)!=null&&e.includes("-")&&f.customElements.get((i=t.nodeName)==null?void 0:i.toLowerCase())&&!(t instanceof f.customElements.get(t.nodeName.toLowerCase()))&&f.customElements.upgrade(t),f0.some(a=>a in t)},Fl=t=>E0(t)||!!wp(t).length,Zc=t=>{var e;return(e=t?.join)==null?void 0:e.call(t,":")},Xc={[c.MEDIA_SUBTITLES_LIST]:cn,[c.MEDIA_SUBTITLES_SHOWING]:cn,[c.MEDIA_SEEKABLE]:Zc,[c.MEDIA_BUFFERED]:t=>t?.map(Zc).join(" "),[c.MEDIA_PREVIEW_COORDS]:t=>t?.join(" "),[c.MEDIA_RENDITION_LIST]:Eg,[c.MEDIA_AUDIO_TRACK_LIST]:yg},_0=async(t,e,i)=>{var a,r;if(t.isConnected||await Jm(0),typeof i=="boolean"||i==null)return F(t,e,i);if(typeof i=="number")return ue(t,e,i);if(typeof i=="string")return re(t,e,i);if(Array.isArray(i)&&!i.length)return t.removeAttribute(e);const n=(r=(a=Xc[e])==null?void 0:a.call(Xc,i))!=null?r:i;return t.setAttribute(e,n)},b0=t=>{var e;return!!((e=t.closest)!=null&&e.call(t,'*[slot="media"]'))},xi=(t,e)=>{if(b0(t))return;const i=(r,n)=>{var s,o;Fl(r)&&n(r);const{children:l=[]}=r??{},d=(o=(s=r?.shadowRoot)==null?void 0:s.children)!=null?o:[];[...l,...d].forEach(p=>xi(p,n))},a=t?.nodeName.toLowerCase();if(a.includes("-")&&!Fl(t)){f.customElements.whenDefined(a).then(()=>{i(t,e)});return}i(t,e)},Jc=(t,e,i)=>{t.forEach(a=>{if(e in a){a[e]=i;return}const r=wp(a),n=e.toLowerCase();r.includes(n)&&_0(a,n,i)})},g0=(t,e,i)=>{xi(t,e);const a=m=>{var p;const h=(p=m?.composedPath()[0])!=null?p:m.target;e(h)},r=m=>{var p;const h=(p=m?.composedPath()[0])!=null?p:m.target;i(h)};t.addEventListener(I.REGISTER_MEDIA_STATE_RECEIVER,a),t.addEventListener(I.UNREGISTER_MEDIA_STATE_RECEIVER,r);const n=m=>{m.forEach(p=>{const{addedNodes:h=[],removedNodes:u=[],type:v,target:E,attributeName:g}=p;v==="childList"?(Array.prototype.forEach.call(h,y=>xi(y,e)),Array.prototype.forEach.call(u,y=>xi(y,i))):v==="attributes"&&g===Y.MEDIA_CHROME_ATTRIBUTES&&(Fl(E)?e(E):i(E))})};let s=[];const o=m=>{const p=m.target;p.name!=="media"&&(s.forEach(h=>xi(h,i)),s=[...p.assignedElements({flatten:!0})],s.forEach(h=>xi(h,e)))};t.addEventListener("slotchange",o);const l=new MutationObserver(n);return l.observe(t,{childList:!0,attributes:!0,subtree:!0}),()=>{xi(t,i),t.removeEventListener("slotchange",o),l.disconnect(),t.removeEventListener(I.REGISTER_MEDIA_STATE_RECEIVER,a),t.removeEventListener(I.UNREGISTER_MEDIA_STATE_RECEIVER,r)}};f.customElements.get("media-controller")||f.customElements.define("media-controller",Sp);var y0=Sp;const oa={PLACEMENT:"placement",BOUNDS:"bounds"};function T0(t){return`
224
224
  <style>
225
225
  :host {
226
226
  --_tooltip-background-color: var(--media-tooltip-background-color, var(--media-secondary-color, rgba(20, 20, 30, .7)));
@@ -329,7 +329,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
329
329
  </style>
330
330
  <slot></slot>
331
331
  <div id="arrow"></div>
332
- `}class Bo extends f.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!lp(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;const i=this.placement;if(i==="left"||i==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}const a=getComputedStyle(this),r=(e=rr(this,"#"+this.bounds))!=null?e:Be(this);if(!r)return;const{x:n,width:s}=r.getBoundingClientRect(),{x:o,width:l}=this.getBoundingClientRect(),d=o+l,m=n+s,p=a.getPropertyValue("--media-tooltip-offset-x"),h=p?parseFloat(p.replace("px","")):0,u=a.getPropertyValue("--media-tooltip-container-margin"),v=u?parseFloat(u.replace("px","")):0,E=o-n+h-v,g=d-m+h+v;if(E<0){this.style.setProperty("--media-tooltip-offset-x",`${E}px`);return}if(g>0){this.style.setProperty("--media-tooltip-offset-x",`${g}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[oa.PLACEMENT,oa.BOUNDS]}get placement(){return ae(this,oa.PLACEMENT)}set placement(e){re(this,oa.PLACEMENT,e)}get bounds(){return ae(this,oa.BOUNDS)}set bounds(e){re(this,oa.BOUNDS,e)}}Bo.shadowRootOptions={mode:"open"};Bo.getTemplateHTML=T0;f.customElements.get("media-tooltip")||f.customElements.define("media-tooltip",Bo);var eh=Bo,cu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ve=(t,e,i)=>(cu(t,e,"read from private field"),i?i.call(t):e.get(t)),la=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Cn=(t,e,i,a)=>(cu(t,e,"write to private field"),e.set(t,i),i),A0=(t,e,i)=>(cu(t,e,"access private method"),i),Ct,$a,yi,ba,ns,Kl,Ip;const di={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function k0(t,e={}){return`
332
+ `}class Bo extends f.HTMLElement{constructor(){if(super(),this.updateXOffset=()=>{var e;if(!lp(this,{checkOpacity:!1,checkVisibilityCSS:!1}))return;const i=this.placement;if(i==="left"||i==="right"){this.style.removeProperty("--media-tooltip-offset-x");return}const a=getComputedStyle(this),r=(e=nr(this,"#"+this.bounds))!=null?e:Be(this);if(!r)return;const{x:n,width:s}=r.getBoundingClientRect(),{x:o,width:l}=this.getBoundingClientRect(),d=o+l,m=n+s,p=a.getPropertyValue("--media-tooltip-offset-x"),h=p?parseFloat(p.replace("px","")):0,u=a.getPropertyValue("--media-tooltip-container-margin"),v=u?parseFloat(u.replace("px","")):0,E=o-n+h-v,g=d-m+h+v;if(E<0){this.style.setProperty("--media-tooltip-offset-x",`${E}px`);return}if(g>0){this.style.setProperty("--media-tooltip-offset-x",`${g}px`);return}this.style.removeProperty("--media-tooltip-offset-x")},!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}if(this.arrowEl=this.shadowRoot.querySelector("#arrow"),Object.prototype.hasOwnProperty.call(this,"placement")){const e=this.placement;delete this.placement,this.placement=e}}static get observedAttributes(){return[oa.PLACEMENT,oa.BOUNDS]}get placement(){return ae(this,oa.PLACEMENT)}set placement(e){re(this,oa.PLACEMENT,e)}get bounds(){return ae(this,oa.BOUNDS)}set bounds(e){re(this,oa.BOUNDS,e)}}Bo.shadowRootOptions={mode:"open"};Bo.getTemplateHTML=T0;f.customElements.get("media-tooltip")||f.customElements.define("media-tooltip",Bo);var eh=Bo,cu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ve=(t,e,i)=>(cu(t,e,"read from private field"),i?i.call(t):e.get(t)),la=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Ln=(t,e,i,a)=>(cu(t,e,"write to private field"),e.set(t,i),i),A0=(t,e,i)=>(cu(t,e,"access private method"),i),Ct,$a,yi,ba,ss,Kl,Ip;const di={TOOLTIP_PLACEMENT:"tooltipplacement",DISABLED:"disabled",NO_TOOLTIP:"notooltip"};function k0(t,e={}){return`
333
333
  <style>
334
334
  :host {
335
335
  position: relative;
@@ -413,7 +413,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
413
413
  </slot>
414
414
  `}function S0(t,e){return`
415
415
  <slot></slot>
416
- `}function w0(){return""}class Ce extends f.HTMLElement{constructor(){if(super(),la(this,Kl),la(this,Ct,void 0),this.preventClick=!1,this.tooltipEl=null,la(this,$a,e=>{this.preventClick||this.handleClick(e),setTimeout(ve(this,yi),0)}),la(this,yi,()=>{var e,i;(i=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||i.call(e)}),la(this,ba,e=>{const{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",ve(this,ba));return}this.preventClick||this.handleClick(e)}),la(this,ns,e=>{const{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",ve(this,ba));return}this.addEventListener("keyup",ve(this,ba),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",di.TOOLTIP_PLACEMENT,Y.MEDIA_CONTROLLER,c.MEDIA_LANG]}enable(){this.addEventListener("click",ve(this,$a)),this.addEventListener("keydown",ve(this,ns)),this.tabIndex=0}disable(){this.removeEventListener("click",ve(this,$a)),this.removeEventListener("keydown",ve(this,ns)),this.removeEventListener("keyup",ve(this,ba)),this.tabIndex=-1}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER?(i&&((n=(r=ve(this,Ct))==null?void 0:r.unassociateElement)==null||n.call(r,this),Cn(this,Ct,null)),a&&this.isConnected&&(Cn(this,Ct,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=ve(this,Ct))==null?void 0:o.associateElement)==null||l.call(o,this))):e==="disabled"&&a!==i?a==null?this.enable():this.disable():e===di.TOOLTIP_PLACEMENT&&this.tooltipEl&&a!==i?this.tooltipEl.placement=a:e===c.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),ve(this,yi).call(this)}connectedCallback(){var e,i,a;const{style:r}=ye(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");const n=this.getAttribute(Y.MEDIA_CONTROLLER);n&&(Cn(this,Ct,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=ve(this,Ct))==null?void 0:i.associateElement)==null||a.call(i,this)),f.customElements.whenDefined("media-tooltip").then(()=>A0(this,Kl,Ip).call(this))}disconnectedCallback(){var e,i;this.disable(),(i=(e=ve(this,Ct))==null?void 0:e.unassociateElement)==null||i.call(e,this),Cn(this,Ct,null),this.removeEventListener("mouseenter",ve(this,yi)),this.removeEventListener("focus",ve(this,yi)),this.removeEventListener("click",ve(this,$a))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return ae(this,di.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){re(this,di.TOOLTIP_PLACEMENT,e)}get mediaController(){return ae(this,Y.MEDIA_CONTROLLER)}set mediaController(e){re(this,Y.MEDIA_CONTROLLER,e)}get disabled(){return W(this,di.DISABLED)}set disabled(e){F(this,di.DISABLED,e)}get noTooltip(){return W(this,di.NO_TOOLTIP)}set noTooltip(e){F(this,di.NO_TOOLTIP,e)}handleClick(e){}}Ct=new WeakMap;$a=new WeakMap;yi=new WeakMap;ba=new WeakMap;ns=new WeakMap;Kl=new WeakSet;Ip=function(){this.addEventListener("mouseenter",ve(this,yi)),this.addEventListener("focus",ve(this,yi)),this.addEventListener("click",ve(this,$a));const t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)};Ce.shadowRootOptions={mode:"open"};Ce.getTemplateHTML=k0;Ce.getSlotTemplateHTML=S0;Ce.getTooltipContentHTML=w0;f.customElements.get("media-chrome-button")||f.customElements.define("media-chrome-button",Ce);const th=`<svg aria-hidden="true" viewBox="0 0 26 24">
416
+ `}function w0(){return""}class Ce extends f.HTMLElement{constructor(){if(super(),la(this,Kl),la(this,Ct,void 0),this.preventClick=!1,this.tooltipEl=null,la(this,$a,e=>{this.preventClick||this.handleClick(e),setTimeout(ve(this,yi),0)}),la(this,yi,()=>{var e,i;(i=(e=this.tooltipEl)==null?void 0:e.updateXOffset)==null||i.call(e)}),la(this,ba,e=>{const{key:i}=e;if(!this.keysUsed.includes(i)){this.removeEventListener("keyup",ve(this,ba));return}this.preventClick||this.handleClick(e)}),la(this,ss,e=>{const{metaKey:i,altKey:a,key:r}=e;if(i||a||!this.keysUsed.includes(r)){this.removeEventListener("keyup",ve(this,ba));return}this.addEventListener("keyup",ve(this,ba),{once:!0})}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.tooltipEl=this.shadowRoot.querySelector("media-tooltip")}static get observedAttributes(){return["disabled",di.TOOLTIP_PLACEMENT,Y.MEDIA_CONTROLLER,c.MEDIA_LANG]}enable(){this.addEventListener("click",ve(this,$a)),this.addEventListener("keydown",ve(this,ss)),this.tabIndex=0}disable(){this.removeEventListener("click",ve(this,$a)),this.removeEventListener("keydown",ve(this,ss)),this.removeEventListener("keyup",ve(this,ba)),this.tabIndex=-1}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER?(i&&((n=(r=ve(this,Ct))==null?void 0:r.unassociateElement)==null||n.call(r,this),Ln(this,Ct,null)),a&&this.isConnected&&(Ln(this,Ct,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=ve(this,Ct))==null?void 0:o.associateElement)==null||l.call(o,this))):e==="disabled"&&a!==i?a==null?this.enable():this.disable():e===di.TOOLTIP_PLACEMENT&&this.tooltipEl&&a!==i?this.tooltipEl.placement=a:e===c.MEDIA_LANG&&(this.shadowRoot.querySelector('slot[name="tooltip-content"]').innerHTML=this.constructor.getTooltipContentHTML()),ve(this,yi).call(this)}connectedCallback(){var e,i,a;const{style:r}=ye(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),this.hasAttribute("disabled")?this.disable():this.enable(),this.setAttribute("role","button");const n=this.getAttribute(Y.MEDIA_CONTROLLER);n&&(Ln(this,Ct,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=ve(this,Ct))==null?void 0:i.associateElement)==null||a.call(i,this)),f.customElements.whenDefined("media-tooltip").then(()=>A0(this,Kl,Ip).call(this))}disconnectedCallback(){var e,i;this.disable(),(i=(e=ve(this,Ct))==null?void 0:e.unassociateElement)==null||i.call(e,this),Ln(this,Ct,null),this.removeEventListener("mouseenter",ve(this,yi)),this.removeEventListener("focus",ve(this,yi)),this.removeEventListener("click",ve(this,$a))}get keysUsed(){return["Enter"," "]}get tooltipPlacement(){return ae(this,di.TOOLTIP_PLACEMENT)}set tooltipPlacement(e){re(this,di.TOOLTIP_PLACEMENT,e)}get mediaController(){return ae(this,Y.MEDIA_CONTROLLER)}set mediaController(e){re(this,Y.MEDIA_CONTROLLER,e)}get disabled(){return W(this,di.DISABLED)}set disabled(e){F(this,di.DISABLED,e)}get noTooltip(){return W(this,di.NO_TOOLTIP)}set noTooltip(e){F(this,di.NO_TOOLTIP,e)}handleClick(e){}}Ct=new WeakMap;$a=new WeakMap;yi=new WeakMap;ba=new WeakMap;ss=new WeakMap;Kl=new WeakSet;Ip=function(){this.addEventListener("mouseenter",ve(this,yi)),this.addEventListener("focus",ve(this,yi)),this.addEventListener("click",ve(this,$a));const t=this.tooltipPlacement;t&&this.tooltipEl&&(this.tooltipEl.placement=t)};Ce.shadowRootOptions={mode:"open"};Ce.getTemplateHTML=k0;Ce.getSlotTemplateHTML=S0;Ce.getTooltipContentHTML=w0;f.customElements.get("media-chrome-button")||f.customElements.define("media-chrome-button",Ce);const th=`<svg aria-hidden="true" viewBox="0 0 26 24">
417
417
  <path d="M22.13 3H3.87a.87.87 0 0 0-.87.87v13.26a.87.87 0 0 0 .87.87h3.4L9 16H5V5h16v11h-4l1.72 2h3.4a.87.87 0 0 0 .87-.87V3.87a.87.87 0 0 0-.86-.87Zm-8.75 11.44a.5.5 0 0 0-.76 0l-4.91 5.73a.5.5 0 0 0 .38.83h9.82a.501.501 0 0 0 .38-.83l-4.91-5.73Z"/>
418
418
  </svg>
419
419
  `;function I0(t){return`
@@ -468,7 +468,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
468
468
  `}function M0(){return`
469
469
  <slot name="tooltip-enable">${L("Enable captions")}</slot>
470
470
  <slot name="tooltip-disable">${L("Disable captions")}</slot>
471
- `}const ah=t=>{t.setAttribute("aria-checked",_p(t).toString())};class mu extends Ce{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_SUBTITLES_LIST,c.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",L("closed captions")),ah(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_SUBTITLES_SHOWING&&ah(this)}get mediaSubtitlesList(){return rh(this,c.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){nh(this,c.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return rh(this,c.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){nh(this,c.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new f.CustomEvent(I.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}mu.getSlotTemplateHTML=D0;mu.getTooltipContentHTML=M0;const rh=(t,e)=>{const i=t.getAttribute(e);return i?$o(i):[]},nh=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=un(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-button")||f.customElements.define("media-captions-button",mu);const x0='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg>',O0='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>';function N0(t){return`
471
+ `}const ah=t=>{t.setAttribute("aria-checked",_p(t).toString())};class mu extends Ce{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_SUBTITLES_LIST,c.MEDIA_SUBTITLES_SHOWING]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","switch"),this.setAttribute("aria-label",L("closed captions")),ah(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_SUBTITLES_SHOWING&&ah(this)}get mediaSubtitlesList(){return rh(this,c.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){nh(this,c.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return rh(this,c.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){nh(this,c.MEDIA_SUBTITLES_SHOWING,e)}handleClick(){this.dispatchEvent(new f.CustomEvent(I.MEDIA_TOGGLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0}))}}mu.getSlotTemplateHTML=D0;mu.getTooltipContentHTML=M0;const rh=(t,e)=>{const i=t.getAttribute(e);return i?$o(i):[]},nh=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=cn(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-button")||f.customElements.define("media-captions-button",mu);const x0='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/></g></svg>',O0='<svg aria-hidden="true" viewBox="0 0 24 24"><g><path class="cast_caf_icon_arch0" d="M1,18 L1,21 L4,21 C4,19.3 2.66,18 1,18 L1,18 Z"/><path class="cast_caf_icon_arch1" d="M1,14 L1,16 C3.76,16 6,18.2 6,21 L8,21 C8,17.13 4.87,14 1,14 L1,14 Z"/><path class="cast_caf_icon_arch2" d="M1,10 L1,12 C5.97,12 10,16.0 10,21 L12,21 C12,14.92 7.07,10 1,10 L1,10 Z"/><path class="cast_caf_icon_box" d="M21,3 L3,3 C1.9,3 1,3.9 1,5 L1,8 L3,8 L3,5 L21,5 L21,19 L14,19 L14,21 L21,21 C22.1,21 23,20.1 23,19 L23,5 C23,3.9 22.1,3 21,3 L21,3 Z"/><path class="cast_caf_icon_boxfill" d="M5,7 L5,8.63 C8,8.6 13.37,14 13.37,17 L19,17 L19,7 Z"/></g></svg>';function N0(t){return`
472
472
  <style>
473
473
  :host([${c.MEDIA_IS_CASTING}]) slot[name=icon] slot:not([name=exit]) {
474
474
  display: none !important;
@@ -492,7 +492,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
492
492
  `}function P0(){return`
493
493
  <slot name="tooltip-enter">${L("Start casting")}</slot>
494
494
  <slot name="tooltip-exit">${L("Stop casting")}</slot>
495
- `}const sh=t=>{const e=t.mediaIsCasting?L("stop casting"):L("start casting");t.setAttribute("aria-label",e)};class pu extends Ce{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_IS_CASTING,c.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),sh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_IS_CASTING&&sh(this)}get mediaIsCasting(){return W(this,c.MEDIA_IS_CASTING)}set mediaIsCasting(e){F(this,c.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return ae(this,c.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){re(this,c.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const e=this.mediaIsCasting?I.MEDIA_EXIT_CAST_REQUEST:I.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}pu.getSlotTemplateHTML=N0;pu.getTooltipContentHTML=P0;f.customElements.get("media-cast-button")||f.customElements.define("media-cast-button",pu);var vu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Zi=(t,e,i)=>(vu(t,e,"read from private field"),e.get(t)),Qt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},fu=(t,e,i,a)=>(vu(t,e,"write to private field"),e.set(t,i),i),Ci=(t,e,i)=>(vu(t,e,"access private method"),i),lo,cn,ia,ss,Vl,ql,Rp,Yl,Cp,Gl,Lp,Ql,Dp,zl,Mp;function U0(t){return`
495
+ `}const sh=t=>{const e=t.mediaIsCasting?L("stop casting"):L("start casting");t.setAttribute("aria-label",e)};class pu extends Ce{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_IS_CASTING,c.MEDIA_CAST_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),sh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_IS_CASTING&&sh(this)}get mediaIsCasting(){return W(this,c.MEDIA_IS_CASTING)}set mediaIsCasting(e){F(this,c.MEDIA_IS_CASTING,e)}get mediaCastUnavailable(){return ae(this,c.MEDIA_CAST_UNAVAILABLE)}set mediaCastUnavailable(e){re(this,c.MEDIA_CAST_UNAVAILABLE,e)}handleClick(){const e=this.mediaIsCasting?I.MEDIA_EXIT_CAST_REQUEST:I.MEDIA_ENTER_CAST_REQUEST;this.dispatchEvent(new f.CustomEvent(e,{composed:!0,bubbles:!0}))}}pu.getSlotTemplateHTML=N0;pu.getTooltipContentHTML=P0;f.customElements.get("media-cast-button")||f.customElements.define("media-cast-button",pu);var vu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Zi=(t,e,i)=>(vu(t,e,"read from private field"),e.get(t)),Qt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},fu=(t,e,i,a)=>(vu(t,e,"write to private field"),e.set(t,i),i),Ci=(t,e,i)=>(vu(t,e,"access private method"),i),lo,hn,ia,os,Vl,ql,Rp,Yl,Cp,Gl,Lp,Ql,Dp,zl,Mp;function U0(t){return`
496
496
  <style>
497
497
  :host {
498
498
  font: var(--media-font,
@@ -535,7 +535,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
535
535
  ${this.getSlotTemplateHTML(t)}
536
536
  `}function $0(t){return`
537
537
  <slot id="content"></slot>
538
- `}const mr={OPEN:"open",ANCHOR:"anchor"};class nr extends f.HTMLElement{constructor(){super(),Qt(this,ss),Qt(this,ql),Qt(this,Yl),Qt(this,Gl),Qt(this,Ql),Qt(this,zl),Qt(this,lo,!1),Qt(this,cn,null),Qt(this,ia,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[mr.OPEN,mr.ANCHOR]}get open(){return W(this,mr.OPEN)}set open(e){F(this,mr.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":Ci(this,Gl,Lp).call(this,e);break;case"focusout":Ci(this,Ql,Dp).call(this,e);break;case"keydown":Ci(this,zl,Mp).call(this,e);break}}connectedCallback(){Ci(this,ss,Vl).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,i,a){Ci(this,ss,Vl).call(this),e===mr.OPEN&&a!==i&&(this.open?Ci(this,ql,Rp).call(this):Ci(this,Yl,Cp).call(this))}focus(){fu(this,cn,au());const e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),i=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||i)return;const a=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');a?.focus()}get keysUsed(){return["Escape","Tab"]}}lo=new WeakMap;cn=new WeakMap;ia=new WeakMap;ss=new WeakSet;Vl=function(){if(!Zi(this,lo)&&(fu(this,lo,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);const t=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask(()=>{const{style:e}=ye(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}};ql=new WeakSet;Rp=function(){var t;(t=Zi(this,ia))==null||t.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};Yl=new WeakSet;Cp=function(){var t;(t=Zi(this,ia))==null||t.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))};Gl=new WeakSet;Lp=function(t){fu(this,ia,t.relatedTarget),si(this,t.relatedTarget)||(this.open=!this.open)};Ql=new WeakSet;Dp=function(t){var e;si(this,t.relatedTarget)||((e=Zi(this,cn))==null||e.focus(),Zi(this,ia)&&Zi(this,ia)!==t.relatedTarget&&this.open&&(this.open=!1))};zl=new WeakSet;Mp=function(t){var e,i,a,r,n;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=t;o||l||d||this.keysUsed.includes(s)&&(t.preventDefault(),t.stopPropagation(),s==="Tab"?(t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()):s==="Escape"&&((n=Zi(this,cn))==null||n.focus(),this.open=!1))};nr.shadowRootOptions={mode:"open"};nr.getTemplateHTML=U0;nr.getSlotTemplateHTML=$0;f.customElements.get("media-chrome-dialog")||f.customElements.define("media-chrome-dialog",nr);var Eu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},oe=(t,e,i)=>(Eu(t,e,"read from private field"),i?i.call(t):e.get(t)),Le=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},mi=(t,e,i,a)=>(Eu(t,e,"write to private field"),e.set(t,i),i),vt=(t,e,i)=>(Eu(t,e,"access private method"),i),Lt,Wo,os,ls,ft,uo,ds,us,cs,_u,xp,hs,jl,ms,Zl,co,bu,Xl,Op,Jl,Np,ed,Pp,td,Up;function H0(t){return`
538
+ `}const pr={OPEN:"open",ANCHOR:"anchor"};class sr extends f.HTMLElement{constructor(){super(),Qt(this,os),Qt(this,ql),Qt(this,Yl),Qt(this,Gl),Qt(this,Ql),Qt(this,zl),Qt(this,lo,!1),Qt(this,hn,null),Qt(this,ia,null),this.addEventListener("invoke",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this)}static get observedAttributes(){return[pr.OPEN,pr.ANCHOR]}get open(){return W(this,pr.OPEN)}set open(e){F(this,pr.OPEN,e)}handleEvent(e){switch(e.type){case"invoke":Ci(this,Gl,Lp).call(this,e);break;case"focusout":Ci(this,Ql,Dp).call(this,e);break;case"keydown":Ci(this,zl,Mp).call(this,e);break}}connectedCallback(){Ci(this,os,Vl).call(this),this.role||(this.role="dialog")}attributeChangedCallback(e,i,a){Ci(this,os,Vl).call(this),e===pr.OPEN&&a!==i&&(this.open?Ci(this,ql,Rp).call(this):Ci(this,Yl,Cp).call(this))}focus(){fu(this,hn,au());const e=!this.dispatchEvent(new Event("focus",{composed:!0,cancelable:!0})),i=!this.dispatchEvent(new Event("focusin",{composed:!0,bubbles:!0,cancelable:!0}));if(e||i)return;const a=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');a?.focus()}get keysUsed(){return["Escape","Tab"]}}lo=new WeakMap;hn=new WeakMap;ia=new WeakMap;os=new WeakSet;Vl=function(){if(!Zi(this,lo)&&(fu(this,lo,!0),!this.shadowRoot)){this.attachShadow(this.constructor.shadowRootOptions);const t=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(t),queueMicrotask(()=>{const{style:e}=ye(this.shadowRoot,":host");e.setProperty("transition","display .15s, visibility .15s, opacity .15s ease-in, transform .15s ease-in")})}};ql=new WeakSet;Rp=function(){var t;(t=Zi(this,ia))==null||t.setAttribute("aria-expanded","true"),this.dispatchEvent(new Event("open",{composed:!0,bubbles:!0})),this.addEventListener("transitionend",()=>this.focus(),{once:!0})};Yl=new WeakSet;Cp=function(){var t;(t=Zi(this,ia))==null||t.setAttribute("aria-expanded","false"),this.dispatchEvent(new Event("close",{composed:!0,bubbles:!0}))};Gl=new WeakSet;Lp=function(t){fu(this,ia,t.relatedTarget),si(this,t.relatedTarget)||(this.open=!this.open)};Ql=new WeakSet;Dp=function(t){var e;si(this,t.relatedTarget)||((e=Zi(this,hn))==null||e.focus(),Zi(this,ia)&&Zi(this,ia)!==t.relatedTarget&&this.open&&(this.open=!1))};zl=new WeakSet;Mp=function(t){var e,i,a,r,n;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=t;o||l||d||this.keysUsed.includes(s)&&(t.preventDefault(),t.stopPropagation(),s==="Tab"?(t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()):s==="Escape"&&((n=Zi(this,hn))==null||n.focus(),this.open=!1))};sr.shadowRootOptions={mode:"open"};sr.getTemplateHTML=U0;sr.getSlotTemplateHTML=$0;f.customElements.get("media-chrome-dialog")||f.customElements.define("media-chrome-dialog",sr);var Eu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},oe=(t,e,i)=>(Eu(t,e,"read from private field"),i?i.call(t):e.get(t)),Le=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},mi=(t,e,i,a)=>(Eu(t,e,"write to private field"),e.set(t,i),i),vt=(t,e,i)=>(Eu(t,e,"access private method"),i),Lt,Wo,ls,ds,ft,uo,us,cs,hs,_u,xp,ms,jl,ps,Zl,co,bu,Xl,Op,Jl,Np,ed,Pp,td,Up;function H0(t){return`
539
539
  <style>
540
540
  :host {
541
541
  --_focus-box-shadow: var(--media-focus-box-shadow, inset 0 0 0 2px rgb(27 127 204 / .9));
@@ -765,7 +765,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
765
765
  ${this.getContainerTemplateHTML(t)}
766
766
  </div>
767
767
  <div id="rightgap"></div>
768
- `}function B0(t){return""}class sr extends f.HTMLElement{constructor(){if(super(),Le(this,_u),Le(this,hs),Le(this,ms),Le(this,co),Le(this,Xl),Le(this,Jl),Le(this,ed),Le(this,td),Le(this,Lt,void 0),Le(this,Wo,void 0),Le(this,os,void 0),Le(this,ls,void 0),Le(this,ft,{}),Le(this,uo,[]),Le(this,ds,()=>{if(this.range.matches(":focus-visible")){const{style:e}=ye(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),Le(this,us,()=>{const{style:e}=ye(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),Le(this,cs,()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.container=this.shadowRoot.querySelector("#container"),mi(this,os,this.shadowRoot.querySelector("#startpoint")),mi(this,ls,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",Y.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER?(i&&((n=(r=oe(this,Lt))==null?void 0:r.unassociateElement)==null||n.call(r,this),mi(this,Lt,null)),a&&this.isConnected&&(mi(this,Lt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=oe(this,Lt))==null?void 0:o.associateElement)==null||l.call(o,this))):(e==="disabled"||e==="aria-disabled"&&i!==a)&&(a==null?(this.range.removeAttribute(e),vt(this,hs,jl).call(this)):(this.range.setAttribute(e,a),vt(this,ms,Zl).call(this)))}connectedCallback(){var e,i,a;const{style:r}=ye(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),oe(this,ft).pointer=ye(this.shadowRoot,"#pointer"),oe(this,ft).progress=ye(this.shadowRoot,"#progress"),oe(this,ft).thumb=ye(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),oe(this,ft).activeSegment=ye(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const n=this.getAttribute(Y.MEDIA_CONTROLLER);n&&(mi(this,Lt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=oe(this,Lt))==null?void 0:i.associateElement)==null||a.call(i,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",oe(this,ds)),this.shadowRoot.addEventListener("focusout",oe(this,us)),vt(this,hs,jl).call(this),Xa(this.container,oe(this,cs))}disconnectedCallback(){var e,i;vt(this,ms,Zl).call(this),(i=(e=oe(this,Lt))==null?void 0:e.unassociateElement)==null||i.call(e,this),mi(this,Lt,null),this.shadowRoot.removeEventListener("focusin",oe(this,ds)),this.shadowRoot.removeEventListener("focusout",oe(this,us)),Ja(this.container,oe(this,cs))}updatePointerBar(e){var i;(i=oe(this,ft).pointer)==null||i.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,i;const a=this.range.valueAsNumber*100;(e=oe(this,ft).progress)==null||e.style.setProperty("width",`${a}%`),(i=oe(this,ft).thumb)==null||i.style.setProperty("left",`${a}%`)}updateSegments(e){const i=this.shadowRoot.querySelector("#segments-clipping");if(i.textContent="",this.container.classList.toggle("segments",!!e?.length),!e?.length)return;const a=[...new Set([+this.range.min,...e.flatMap(n=>[n.start,n.end]),+this.range.max])];mi(this,uo,[...a]);const r=a.pop();for(const[n,s]of a.entries()){const[o,l]=[n===0,n===a.length-1],d=o?"calc(var(--segments-gap) / -1)":`${s*100}%`,p=`calc(${((l?r:a[n+1])-s)*100}%${o||l?"":" - var(--segments-gap)"})`,h=_e.createElementNS("http://www.w3.org/2000/svg","rect"),u=ru(this.shadowRoot,`#segments-clipping rect:nth-child(${n+1})`);u.style.setProperty("x",d),u.style.setProperty("width",p),i.append(h)}}getPointerRatio(e){return Mg(e.clientX,e.clientY,oe(this,os).getBoundingClientRect(),oe(this,ls).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":vt(this,td,Up).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":vt(this,Xl,Op).call(this,e);break;case"pointerdown":vt(this,co,bu).call(this,e);break;case"pointerup":vt(this,Jl,Np).call(this);break;case"pointerleave":vt(this,ed,Pp).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}Lt=new WeakMap;Wo=new WeakMap;os=new WeakMap;ls=new WeakMap;ft=new WeakMap;uo=new WeakMap;ds=new WeakMap;us=new WeakMap;cs=new WeakMap;_u=new WeakSet;xp=function(t){const e=oe(this,ft).activeSegment;if(!e)return;const i=this.getPointerRatio(t),r=`#segments-clipping rect:nth-child(${oe(this,uo).findIndex((n,s,o)=>{const l=o[s+1];return l!=null&&i>=n&&i<=l})+1})`;(e.selectorText!=r||!e.style.transform)&&(e.selectorText=r,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};hs=new WeakSet;jl=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};ms=new WeakSet;Zl=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(t=f.window)==null||t.removeEventListener("pointerup",this),(e=f.window)==null||e.removeEventListener("pointermove",this)};co=new WeakSet;bu=function(t){var e;mi(this,Wo,t.composedPath().includes(this.range)),(e=f.window)==null||e.addEventListener("pointerup",this)};Xl=new WeakSet;Op=function(t){var e;t.pointerType!=="mouse"&&vt(this,co,bu).call(this,t),this.addEventListener("pointerleave",this),(e=f.window)==null||e.addEventListener("pointermove",this)};Jl=new WeakSet;Np=function(){var t;(t=f.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};ed=new WeakSet;Pp=function(){var t,e;this.removeEventListener("pointerleave",this),(t=f.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=oe(this,ft).activeSegment)==null||e.style.removeProperty("transform")};td=new WeakSet;Up=function(t){t.pointerType==="pen"&&t.buttons===0||(this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),vt(this,_u,xp).call(this,t),this.dragging&&(t.pointerType!=="mouse"||!oe(this,Wo))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))};sr.shadowRootOptions={mode:"open"};sr.getTemplateHTML=H0;sr.getContainerTemplateHTML=B0;f.customElements.get("media-chrome-range")||f.customElements.define("media-chrome-range",sr);var $p=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ln=(t,e,i)=>($p(t,e,"read from private field"),i?i.call(t):e.get(t)),W0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Dn=(t,e,i,a)=>($p(t,e,"write to private field"),e.set(t,i),i),Dt;function F0(t){return`
768
+ `}function B0(t){return""}class or extends f.HTMLElement{constructor(){if(super(),Le(this,_u),Le(this,ms),Le(this,ps),Le(this,co),Le(this,Xl),Le(this,Jl),Le(this,ed),Le(this,td),Le(this,Lt,void 0),Le(this,Wo,void 0),Le(this,ls,void 0),Le(this,ds,void 0),Le(this,ft,{}),Le(this,uo,[]),Le(this,us,()=>{if(this.range.matches(":focus-visible")){const{style:e}=ye(this.shadowRoot,":host");e.setProperty("--_focus-visible-box-shadow","var(--_focus-box-shadow)")}}),Le(this,cs,()=>{const{style:e}=ye(this.shadowRoot,":host");e.removeProperty("--_focus-visible-box-shadow")}),Le(this,hs,()=>{const e=this.shadowRoot.querySelector("#segments-clipping");e&&e.parentNode.append(e)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes),i=this.constructor.getTemplateHTML(e);this.shadowRoot.setHTMLUnsafe?this.shadowRoot.setHTMLUnsafe(i):this.shadowRoot.innerHTML=i}this.container=this.shadowRoot.querySelector("#container"),mi(this,ls,this.shadowRoot.querySelector("#startpoint")),mi(this,ds,this.shadowRoot.querySelector("#endpoint")),this.range=this.shadowRoot.querySelector("#range"),this.appearance=this.shadowRoot.querySelector("#appearance")}static get observedAttributes(){return["disabled","aria-disabled",Y.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER?(i&&((n=(r=oe(this,Lt))==null?void 0:r.unassociateElement)==null||n.call(r,this),mi(this,Lt,null)),a&&this.isConnected&&(mi(this,Lt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=oe(this,Lt))==null?void 0:o.associateElement)==null||l.call(o,this))):(e==="disabled"||e==="aria-disabled"&&i!==a)&&(a==null?(this.range.removeAttribute(e),vt(this,ms,jl).call(this)):(this.range.setAttribute(e,a),vt(this,ps,Zl).call(this)))}connectedCallback(){var e,i,a;const{style:r}=ye(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`),oe(this,ft).pointer=ye(this.shadowRoot,"#pointer"),oe(this,ft).progress=ye(this.shadowRoot,"#progress"),oe(this,ft).thumb=ye(this.shadowRoot,'#thumb, ::slotted([slot="thumb"])'),oe(this,ft).activeSegment=ye(this.shadowRoot,"#segments-clipping rect:nth-child(0)");const n=this.getAttribute(Y.MEDIA_CONTROLLER);n&&(mi(this,Lt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=oe(this,Lt))==null?void 0:i.associateElement)==null||a.call(i,this)),this.updateBar(),this.shadowRoot.addEventListener("focusin",oe(this,us)),this.shadowRoot.addEventListener("focusout",oe(this,cs)),vt(this,ms,jl).call(this),Ja(this.container,oe(this,hs))}disconnectedCallback(){var e,i;vt(this,ps,Zl).call(this),(i=(e=oe(this,Lt))==null?void 0:e.unassociateElement)==null||i.call(e,this),mi(this,Lt,null),this.shadowRoot.removeEventListener("focusin",oe(this,us)),this.shadowRoot.removeEventListener("focusout",oe(this,cs)),er(this.container,oe(this,hs))}updatePointerBar(e){var i;(i=oe(this,ft).pointer)==null||i.style.setProperty("width",`${this.getPointerRatio(e)*100}%`)}updateBar(){var e,i;const a=this.range.valueAsNumber*100;(e=oe(this,ft).progress)==null||e.style.setProperty("width",`${a}%`),(i=oe(this,ft).thumb)==null||i.style.setProperty("left",`${a}%`)}updateSegments(e){const i=this.shadowRoot.querySelector("#segments-clipping");if(i.textContent="",this.container.classList.toggle("segments",!!e?.length),!e?.length)return;const a=[...new Set([+this.range.min,...e.flatMap(n=>[n.start,n.end]),+this.range.max])];mi(this,uo,[...a]);const r=a.pop();for(const[n,s]of a.entries()){const[o,l]=[n===0,n===a.length-1],d=o?"calc(var(--segments-gap) / -1)":`${s*100}%`,p=`calc(${((l?r:a[n+1])-s)*100}%${o||l?"":" - var(--segments-gap)"})`,h=_e.createElementNS("http://www.w3.org/2000/svg","rect"),u=ru(this.shadowRoot,`#segments-clipping rect:nth-child(${n+1})`);u.style.setProperty("x",d),u.style.setProperty("width",p),i.append(h)}}getPointerRatio(e){return Mg(e.clientX,e.clientY,oe(this,ls).getBoundingClientRect(),oe(this,ds).getBoundingClientRect())}get dragging(){return this.hasAttribute("dragging")}handleEvent(e){switch(e.type){case"pointermove":vt(this,td,Up).call(this,e);break;case"input":this.updateBar();break;case"pointerenter":vt(this,Xl,Op).call(this,e);break;case"pointerdown":vt(this,co,bu).call(this,e);break;case"pointerup":vt(this,Jl,Np).call(this);break;case"pointerleave":vt(this,ed,Pp).call(this);break}}get keysUsed(){return["ArrowUp","ArrowRight","ArrowDown","ArrowLeft"]}}Lt=new WeakMap;Wo=new WeakMap;ls=new WeakMap;ds=new WeakMap;ft=new WeakMap;uo=new WeakMap;us=new WeakMap;cs=new WeakMap;hs=new WeakMap;_u=new WeakSet;xp=function(t){const e=oe(this,ft).activeSegment;if(!e)return;const i=this.getPointerRatio(t),r=`#segments-clipping rect:nth-child(${oe(this,uo).findIndex((n,s,o)=>{const l=o[s+1];return l!=null&&i>=n&&i<=l})+1})`;(e.selectorText!=r||!e.style.transform)&&(e.selectorText=r,e.style.setProperty("transform","var(--media-range-segment-hover-transform, scaleY(2))"))};ms=new WeakSet;jl=function(){this.hasAttribute("disabled")||(this.addEventListener("input",this),this.addEventListener("pointerdown",this),this.addEventListener("pointerenter",this))};ps=new WeakSet;Zl=function(){var t,e;this.removeEventListener("input",this),this.removeEventListener("pointerdown",this),this.removeEventListener("pointerenter",this),(t=f.window)==null||t.removeEventListener("pointerup",this),(e=f.window)==null||e.removeEventListener("pointermove",this)};co=new WeakSet;bu=function(t){var e;mi(this,Wo,t.composedPath().includes(this.range)),(e=f.window)==null||e.addEventListener("pointerup",this)};Xl=new WeakSet;Op=function(t){var e;t.pointerType!=="mouse"&&vt(this,co,bu).call(this,t),this.addEventListener("pointerleave",this),(e=f.window)==null||e.addEventListener("pointermove",this)};Jl=new WeakSet;Np=function(){var t;(t=f.window)==null||t.removeEventListener("pointerup",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled")};ed=new WeakSet;Pp=function(){var t,e;this.removeEventListener("pointerleave",this),(t=f.window)==null||t.removeEventListener("pointermove",this),this.toggleAttribute("dragging",!1),this.range.disabled=this.hasAttribute("disabled"),(e=oe(this,ft).activeSegment)==null||e.style.removeProperty("transform")};td=new WeakSet;Up=function(t){t.pointerType==="pen"&&t.buttons===0||(this.toggleAttribute("dragging",t.buttons===1||t.pointerType!=="mouse"),this.updatePointerBar(t),vt(this,_u,xp).call(this,t),this.dragging&&(t.pointerType!=="mouse"||!oe(this,Wo))&&(this.range.disabled=!0,this.range.valueAsNumber=this.getPointerRatio(t),this.range.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))))};or.shadowRootOptions={mode:"open"};or.getTemplateHTML=H0;or.getContainerTemplateHTML=B0;f.customElements.get("media-chrome-range")||f.customElements.define("media-chrome-range",or);var $p=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Dn=(t,e,i)=>($p(t,e,"read from private field"),i?i.call(t):e.get(t)),W0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Mn=(t,e,i,a)=>($p(t,e,"write to private field"),e.set(t,i),i),Dt;function F0(t){return`
769
769
  <style>
770
770
  :host {
771
771
 
@@ -791,7 +791,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
791
791
  </style>
792
792
 
793
793
  <slot></slot>
794
- `}class gu extends f.HTMLElement{constructor(){if(super(),W0(this,Dt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=Ln(this,Dt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Dn(this,Dt,null)),a&&this.isConnected&&(Dn(this,Dt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=Ln(this,Dt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const r=this.getAttribute(Y.MEDIA_CONTROLLER);r&&(Dn(this,Dt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Ln(this,Dt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Ln(this,Dt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Dn(this,Dt,null)}}Dt=new WeakMap;gu.shadowRootOptions={mode:"open"};gu.getTemplateHTML=F0;f.customElements.get("media-control-bar")||f.customElements.define("media-control-bar",gu);var Hp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Mn=(t,e,i)=>(Hp(t,e,"read from private field"),i?i.call(t):e.get(t)),K0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},xn=(t,e,i,a)=>(Hp(t,e,"write to private field"),e.set(t,i),i),Mt;function V0(t,e={}){return`
794
+ `}class gu extends f.HTMLElement{constructor(){if(super(),W0(this,Dt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=Dn(this,Dt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Mn(this,Dt,null)),a&&this.isConnected&&(Mn(this,Dt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=Dn(this,Dt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const r=this.getAttribute(Y.MEDIA_CONTROLLER);r&&(Mn(this,Dt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Dn(this,Dt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Dn(this,Dt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Mn(this,Dt,null)}}Dt=new WeakMap;gu.shadowRootOptions={mode:"open"};gu.getTemplateHTML=F0;f.customElements.get("media-control-bar")||f.customElements.define("media-control-bar",gu);var Hp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},xn=(t,e,i)=>(Hp(t,e,"read from private field"),i?i.call(t):e.get(t)),K0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},On=(t,e,i,a)=>(Hp(t,e,"write to private field"),e.set(t,i),i),Mt;function V0(t,e={}){return`
795
795
  <style>
796
796
  :host {
797
797
  font: var(--media-font,
@@ -827,9 +827,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
827
827
  ${this.getSlotTemplateHTML(t,e)}
828
828
  `}function q0(t,e){return`
829
829
  <slot></slot>
830
- `}class wi extends f.HTMLElement{constructor(){if(super(),K0(this,Mt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=Mn(this,Mt))==null?void 0:r.unassociateElement)==null||n.call(r,this),xn(this,Mt,null)),a&&this.isConnected&&(xn(this,Mt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=Mn(this,Mt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const{style:r}=ye(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const n=this.getAttribute(Y.MEDIA_CONTROLLER);n&&(xn(this,Mt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=Mn(this,Mt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Mn(this,Mt))==null?void 0:e.unassociateElement)==null||i.call(e,this),xn(this,Mt,null)}}Mt=new WeakMap;wi.shadowRootOptions={mode:"open"};wi.getTemplateHTML=V0;wi.getSlotTemplateHTML=q0;f.customElements.get("media-text-display")||f.customElements.define("media-text-display",wi);var Bp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},oh=(t,e,i)=>(Bp(t,e,"read from private field"),i?i.call(t):e.get(t)),Y0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},G0=(t,e,i,a)=>(Bp(t,e,"write to private field"),e.set(t,i),i),Nr;function Q0(t,e){return`
830
+ `}class wi extends f.HTMLElement{constructor(){if(super(),K0(this,Mt,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=xn(this,Mt))==null?void 0:r.unassociateElement)==null||n.call(r,this),On(this,Mt,null)),a&&this.isConnected&&(On(this,Mt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=xn(this,Mt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const{style:r}=ye(this.shadowRoot,":host");r.setProperty("display",`var(--media-control-display, var(--${this.localName}-display, inline-flex))`);const n=this.getAttribute(Y.MEDIA_CONTROLLER);n&&(On(this,Mt,(e=this.getRootNode())==null?void 0:e.getElementById(n)),(a=(i=xn(this,Mt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=xn(this,Mt))==null?void 0:e.unassociateElement)==null||i.call(e,this),On(this,Mt,null)}}Mt=new WeakMap;wi.shadowRootOptions={mode:"open"};wi.getTemplateHTML=V0;wi.getSlotTemplateHTML=q0;f.customElements.get("media-text-display")||f.customElements.define("media-text-display",wi);var Bp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},oh=(t,e,i)=>(Bp(t,e,"read from private field"),i?i.call(t):e.get(t)),Y0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},G0=(t,e,i,a)=>(Bp(t,e,"write to private field"),e.set(t,i),i),Pr;function Q0(t,e){return`
831
831
  <slot>${ki(e.mediaDuration)}</slot>
832
- `}class Wp extends wi{constructor(){var e;super(),Y0(this,Nr,void 0),G0(this,Nr,this.shadowRoot.querySelector("slot")),oh(this,Nr).textContent=ki((e=this.mediaDuration)!=null?e:0)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_DURATION]}attributeChangedCallback(e,i,a){e===c.MEDIA_DURATION&&(oh(this,Nr).textContent=ki(+a)),super.attributeChangedCallback(e,i,a)}get mediaDuration(){return ie(this,c.MEDIA_DURATION)}set mediaDuration(e){ue(this,c.MEDIA_DURATION,e)}}Nr=new WeakMap;Wp.getSlotTemplateHTML=Q0;f.customElements.get("media-duration-display")||f.customElements.define("media-duration-display",Wp);const z0={2:L("Network Error"),3:L("Decode Error"),4:L("Source Not Supported"),5:L("Encryption Error")},j0={2:L("A network error caused the media download to fail."),3:L("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:L("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:L("The media is encrypted and there are no keys to decrypt it.")},Fp=t=>{var e,i;return t.code===1?null:{title:(e=z0[t.code])!=null?e:`Error ${t.code}`,message:(i=j0[t.code])!=null?i:t.message}};var Kp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Z0=(t,e,i)=>(Kp(t,e,"read from private field"),i?i.call(t):e.get(t)),X0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},J0=(t,e,i,a)=>(Kp(t,e,"write to private field"),e.set(t,i),i),ps;function e1(t){return`
832
+ `}class Wp extends wi{constructor(){var e;super(),Y0(this,Pr,void 0),G0(this,Pr,this.shadowRoot.querySelector("slot")),oh(this,Pr).textContent=ki((e=this.mediaDuration)!=null?e:0)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_DURATION]}attributeChangedCallback(e,i,a){e===c.MEDIA_DURATION&&(oh(this,Pr).textContent=ki(+a)),super.attributeChangedCallback(e,i,a)}get mediaDuration(){return ie(this,c.MEDIA_DURATION)}set mediaDuration(e){ue(this,c.MEDIA_DURATION,e)}}Pr=new WeakMap;Wp.getSlotTemplateHTML=Q0;f.customElements.get("media-duration-display")||f.customElements.define("media-duration-display",Wp);const z0={2:L("Network Error"),3:L("Decode Error"),4:L("Source Not Supported"),5:L("Encryption Error")},j0={2:L("A network error caused the media download to fail."),3:L("A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format."),4:L("An unsupported error occurred. The server or network failed, or your browser does not support this format."),5:L("The media is encrypted and there are no keys to decrypt it.")},Fp=t=>{var e,i;return t.code===1?null:{title:(e=z0[t.code])!=null?e:`Error ${t.code}`,message:(i=j0[t.code])!=null?i:t.message}};var Kp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Z0=(t,e,i)=>(Kp(t,e,"read from private field"),i?i.call(t):e.get(t)),X0=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},J0=(t,e,i,a)=>(Kp(t,e,"write to private field"),e.set(t,i),i),vs;function e1(t){return`
833
833
  <style>
834
834
  :host {
835
835
  background: rgb(20 20 30 / .8);
@@ -848,7 +848,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
848
848
  <slot name="error-${t.mediaerrorcode}" id="content">
849
849
  ${Vp({code:+t.mediaerrorcode,message:t.mediaerrormessage})}
850
850
  </slot>
851
- `}function t1(t){return t.code&&Fp(t)!==null}function Vp(t){var e;const{title:i,message:a}=(e=Fp(t))!=null?e:{};let r="";return i&&(r+=`<slot name="error-${t.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${t.code}-message"><p>${a}</p></slot>`),r}const lh=[c.MEDIA_ERROR_CODE,c.MEDIA_ERROR_MESSAGE];class Fo extends nr{constructor(){super(...arguments),X0(this,ps,null)}static get observedAttributes(){return[...super.observedAttributes,...lh]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,i,a){var r;if(super.attributeChangedCallback(e,i,a),!lh.includes(e))return;const n=(r=this.mediaError)!=null?r:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=t1(n),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(n))}get mediaError(){return Z0(this,ps)}set mediaError(e){J0(this,ps,e)}get mediaErrorCode(){return ie(this,"mediaerrorcode")}set mediaErrorCode(e){ue(this,"mediaerrorcode",e)}get mediaErrorMessage(){return ae(this,"mediaerrormessage")}set mediaErrorMessage(e){re(this,"mediaerrormessage",e)}}ps=new WeakMap;Fo.getSlotTemplateHTML=e1;Fo.formatErrorMessage=Vp;f.customElements.get("media-error-dialog")||f.customElements.define("media-error-dialog",Fo);var qp=Fo,i1=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ui=(t,e,i)=>(i1(t,e,"read from private field"),i?i.call(t):e.get(t)),dh=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ga,ya;function a1(t){return`
851
+ `}function t1(t){return t.code&&Fp(t)!==null}function Vp(t){var e;const{title:i,message:a}=(e=Fp(t))!=null?e:{};let r="";return i&&(r+=`<slot name="error-${t.code}-title"><h3>${i}</h3></slot>`),a&&(r+=`<slot name="error-${t.code}-message"><p>${a}</p></slot>`),r}const lh=[c.MEDIA_ERROR_CODE,c.MEDIA_ERROR_MESSAGE];class Fo extends sr{constructor(){super(...arguments),X0(this,vs,null)}static get observedAttributes(){return[...super.observedAttributes,...lh]}formatErrorMessage(e){return this.constructor.formatErrorMessage(e)}attributeChangedCallback(e,i,a){var r;if(super.attributeChangedCallback(e,i,a),!lh.includes(e))return;const n=(r=this.mediaError)!=null?r:{code:this.mediaErrorCode,message:this.mediaErrorMessage};this.open=t1(n),this.open&&(this.shadowRoot.querySelector("slot").name=`error-${this.mediaErrorCode}`,this.shadowRoot.querySelector("#content").innerHTML=this.formatErrorMessage(n))}get mediaError(){return Z0(this,vs)}set mediaError(e){J0(this,vs,e)}get mediaErrorCode(){return ie(this,"mediaerrorcode")}set mediaErrorCode(e){ue(this,"mediaerrorcode",e)}get mediaErrorMessage(){return ae(this,"mediaerrormessage")}set mediaErrorMessage(e){re(this,"mediaerrormessage",e)}}vs=new WeakMap;Fo.getSlotTemplateHTML=e1;Fo.formatErrorMessage=Vp;f.customElements.get("media-error-dialog")||f.customElements.define("media-error-dialog",Fo);var qp=Fo,i1=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ui=(t,e,i)=>(i1(t,e,"read from private field"),i?i.call(t):e.get(t)),dh=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ga,ya;function a1(t){return`
852
852
  <style>
853
853
  :host {
854
854
  position: fixed;
@@ -945,7 +945,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
945
945
  <td class="description">${a}</td>
946
946
  </tr>
947
947
  `).join("")}</table>
948
- `}class Yp extends nr{constructor(){super(...arguments),dh(this,ga,e=>{var i;if(!this.open)return;const a=(i=this.shadowRoot)==null?void 0:i.querySelector("#content");if(!a)return;const r=e.composedPath(),n=r[0]===this||r.includes(this),s=r.includes(a);n&&!s&&(this.open=!1)}),dh(this,ya,e=>{if(!this.open)return;const i=e.shiftKey&&(e.key==="/"||e.key==="?");(e.key==="Escape"||i)&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",ui(this,ga)),document.addEventListener("keydown",ui(this,ya)))}disconnectedCallback(){this.removeEventListener("click",ui(this,ga)),document.removeEventListener("keydown",ui(this,ya))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e==="open"&&(this.open?(this.addEventListener("click",ui(this,ga)),document.addEventListener("keydown",ui(this,ya))):(this.removeEventListener("click",ui(this,ga)),document.removeEventListener("keydown",ui(this,ya))))}}ga=new WeakMap;ya=new WeakMap;Yp.getSlotTemplateHTML=a1;f.customElements.get("media-keyboard-shortcuts-dialog")||f.customElements.define("media-keyboard-shortcuts-dialog",Yp);var Gp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},n1=(t,e,i)=>(Gp(t,e,"read from private field"),e.get(t)),s1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},o1=(t,e,i,a)=>(Gp(t,e,"write to private field"),e.set(t,i),i),vs;const l1=`<svg aria-hidden="true" viewBox="0 0 26 24">
948
+ `}class Yp extends sr{constructor(){super(...arguments),dh(this,ga,e=>{var i;if(!this.open)return;const a=(i=this.shadowRoot)==null?void 0:i.querySelector("#content");if(!a)return;const r=e.composedPath(),n=r[0]===this||r.includes(this),s=r.includes(a);n&&!s&&(this.open=!1)}),dh(this,ya,e=>{if(!this.open)return;const i=e.shiftKey&&(e.key==="/"||e.key==="?");(e.key==="Escape"||i)&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&(this.open=!1,e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),this.open&&(this.addEventListener("click",ui(this,ga)),document.addEventListener("keydown",ui(this,ya)))}disconnectedCallback(){this.removeEventListener("click",ui(this,ga)),document.removeEventListener("keydown",ui(this,ya))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e==="open"&&(this.open?(this.addEventListener("click",ui(this,ga)),document.addEventListener("keydown",ui(this,ya))):(this.removeEventListener("click",ui(this,ga)),document.removeEventListener("keydown",ui(this,ya))))}}ga=new WeakMap;ya=new WeakMap;Yp.getSlotTemplateHTML=a1;f.customElements.get("media-keyboard-shortcuts-dialog")||f.customElements.define("media-keyboard-shortcuts-dialog",Yp);var Gp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},n1=(t,e,i)=>(Gp(t,e,"read from private field"),e.get(t)),s1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},o1=(t,e,i,a)=>(Gp(t,e,"write to private field"),e.set(t,i),i),fs;const l1=`<svg aria-hidden="true" viewBox="0 0 26 24">
949
949
  <path d="M16 3v2.5h3.5V9H22V3h-6ZM4 9h2.5V5.5H10V3H4v6Zm15.5 9.5H16V21h6v-6h-2.5v3.5ZM6.5 15H4v6h6v-2.5H6.5V15Z"/>
950
950
  </svg>`,d1=`<svg aria-hidden="true" viewBox="0 0 26 24">
951
951
  <path d="M18.5 6.5V3H16v6h6V6.5h-3.5ZM16 21h2.5v-3.5H22V15h-6v6ZM4 17.5h3.5V21H10v-6H4v2.5Zm3.5-11H4V9h6V3H7.5v3.5Z"/>
@@ -973,7 +973,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
973
973
  `}function c1(){return`
974
974
  <slot name="tooltip-enter">${L("Enter fullscreen mode")}</slot>
975
975
  <slot name="tooltip-exit">${L("Exit fullscreen mode")}</slot>
976
- `}const uh=t=>{const e=t.mediaIsFullscreen?L("exit fullscreen mode"):L("enter fullscreen mode");t.setAttribute("aria-label",e)};class yu extends Ce{constructor(){super(...arguments),s1(this,vs,null)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_IS_FULLSCREEN,c.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),uh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_IS_FULLSCREEN&&uh(this)}get mediaFullscreenUnavailable(){return ae(this,c.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){re(this,c.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return W(this,c.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){F(this,c.MEDIA_IS_FULLSCREEN,e)}handleClick(e){o1(this,vs,e);const i=n1(this,vs)instanceof PointerEvent,a=this.mediaIsFullscreen?new f.CustomEvent(I.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new f.CustomEvent(I.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:i});this.dispatchEvent(a)}}vs=new WeakMap;yu.getSlotTemplateHTML=u1;yu.getTooltipContentHTML=c1;f.customElements.get("media-fullscreen-button")||f.customElements.define("media-fullscreen-button",yu);const{MEDIA_TIME_IS_LIVE:fs,MEDIA_PAUSED:jr}=c,{MEDIA_SEEK_TO_LIVE_REQUEST:h1,MEDIA_PLAY_REQUEST:m1}=I,p1='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>';function v1(t){return`
976
+ `}const uh=t=>{const e=t.mediaIsFullscreen?L("exit fullscreen mode"):L("enter fullscreen mode");t.setAttribute("aria-label",e)};class yu extends Ce{constructor(){super(...arguments),s1(this,fs,null)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_IS_FULLSCREEN,c.MEDIA_FULLSCREEN_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),uh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_IS_FULLSCREEN&&uh(this)}get mediaFullscreenUnavailable(){return ae(this,c.MEDIA_FULLSCREEN_UNAVAILABLE)}set mediaFullscreenUnavailable(e){re(this,c.MEDIA_FULLSCREEN_UNAVAILABLE,e)}get mediaIsFullscreen(){return W(this,c.MEDIA_IS_FULLSCREEN)}set mediaIsFullscreen(e){F(this,c.MEDIA_IS_FULLSCREEN,e)}handleClick(e){o1(this,fs,e);const i=n1(this,fs)instanceof PointerEvent,a=this.mediaIsFullscreen?new f.CustomEvent(I.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0}):new f.CustomEvent(I.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0,detail:i});this.dispatchEvent(a)}}fs=new WeakMap;yu.getSlotTemplateHTML=u1;yu.getTooltipContentHTML=c1;f.customElements.get("media-fullscreen-button")||f.customElements.define("media-fullscreen-button",yu);const{MEDIA_TIME_IS_LIVE:Es,MEDIA_PAUSED:Zr}=c,{MEDIA_SEEK_TO_LIVE_REQUEST:h1,MEDIA_PLAY_REQUEST:m1}=I,p1='<svg viewBox="0 0 6 12"><circle cx="3" cy="6" r="2"></circle></svg>';function v1(t){return`
977
977
  <style>
978
978
  :host { --media-tooltip-display: none; }
979
979
 
@@ -985,13 +985,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
985
985
  color: var(--media-live-button-icon-color, rgb(140, 140, 140));
986
986
  }
987
987
 
988
- :host([${fs}]:not([${jr}])) slot[name=indicator] > *,
989
- :host([${fs}]:not([${jr}])) ::slotted([slot=indicator]) {
988
+ :host([${Es}]:not([${Zr}])) slot[name=indicator] > *,
989
+ :host([${Es}]:not([${Zr}])) ::slotted([slot=indicator]) {
990
990
  fill: var(--media-live-button-indicator-color, rgb(255, 0, 0));
991
991
  color: var(--media-live-button-indicator-color, rgb(255, 0, 0));
992
992
  }
993
993
 
994
- :host([${fs}]:not([${jr}])) {
994
+ :host([${Es}]:not([${Zr}])) {
995
995
  cursor: var(--media-cursor, not-allowed);
996
996
  }
997
997
 
@@ -1004,7 +1004,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1004
1004
  <slot name="indicator">${p1}</slot>
1005
1005
 
1006
1006
  <slot name="spacer">&nbsp;</slot><slot name="text">${L("live")}</slot>
1007
- `}const ch=t=>{var e;const i=t.mediaPaused||!t.mediaTimeIsLive,a=L(i?"seek to live":"playing live");t.setAttribute("aria-label",a);const r=(e=t.shadowRoot)==null?void 0:e.querySelector('slot[name="text"]');r&&(r.textContent=L("live")),i?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")};class Qp extends Ce{static get observedAttributes(){return[...super.observedAttributes,fs,jr]}connectedCallback(){super.connectedCallback(),ch(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),ch(this)}get mediaPaused(){return W(this,c.MEDIA_PAUSED)}set mediaPaused(e){F(this,c.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return W(this,c.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){F(this,c.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new f.CustomEvent(h1,{composed:!0,bubbles:!0})),this.hasAttribute(jr)&&this.dispatchEvent(new f.CustomEvent(m1,{composed:!0,bubbles:!0})))}}Qp.getSlotTemplateHTML=v1;f.customElements.get("media-live-button")||f.customElements.define("media-live-button",Qp);var zp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},pr=(t,e,i)=>(zp(t,e,"read from private field"),i?i.call(t):e.get(t)),hh=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},vr=(t,e,i,a)=>(zp(t,e,"write to private field"),e.set(t,i),i),xt,Es;const On={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},jp=500,f1=`
1007
+ `}const ch=t=>{var e;const i=t.mediaPaused||!t.mediaTimeIsLive,a=L(i?"seek to live":"playing live");t.setAttribute("aria-label",a);const r=(e=t.shadowRoot)==null?void 0:e.querySelector('slot[name="text"]');r&&(r.textContent=L("live")),i?t.removeAttribute("aria-disabled"):t.setAttribute("aria-disabled","true")};class Qp extends Ce{static get observedAttributes(){return[...super.observedAttributes,Es,Zr]}connectedCallback(){super.connectedCallback(),ch(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),ch(this)}get mediaPaused(){return W(this,c.MEDIA_PAUSED)}set mediaPaused(e){F(this,c.MEDIA_PAUSED,e)}get mediaTimeIsLive(){return W(this,c.MEDIA_TIME_IS_LIVE)}set mediaTimeIsLive(e){F(this,c.MEDIA_TIME_IS_LIVE,e)}handleClick(){!this.mediaPaused&&this.mediaTimeIsLive||(this.dispatchEvent(new f.CustomEvent(h1,{composed:!0,bubbles:!0})),this.hasAttribute(Zr)&&this.dispatchEvent(new f.CustomEvent(m1,{composed:!0,bubbles:!0})))}}Qp.getSlotTemplateHTML=v1;f.customElements.get("media-live-button")||f.customElements.define("media-live-button",Qp);var zp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},vr=(t,e,i)=>(zp(t,e,"read from private field"),i?i.call(t):e.get(t)),hh=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},fr=(t,e,i,a)=>(zp(t,e,"write to private field"),e.set(t,i),i),xt,_s;const Nn={LOADING_DELAY:"loadingdelay",NO_AUTOHIDE:"noautohide"},jp=500,f1=`
1008
1008
  <svg aria-hidden="true" viewBox="0 0 100 100">
1009
1009
  <path d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
1010
1010
  <animateTransform
@@ -1064,7 +1064,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1064
1064
 
1065
1065
  <slot name="icon">${f1}</slot>
1066
1066
  <div id="status" role="status" aria-live="polite">${L("media loading")}</div>
1067
- `}class Tu extends f.HTMLElement{constructor(){if(super(),hh(this,xt,void 0),hh(this,Es,jp),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER,c.MEDIA_PAUSED,c.MEDIA_LOADING,On.LOADING_DELAY]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===On.LOADING_DELAY&&i!==a?this.loadingDelay=Number(a):e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=pr(this,xt))==null?void 0:r.unassociateElement)==null||n.call(r,this),vr(this,xt,null)),a&&this.isConnected&&(vr(this,xt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=pr(this,xt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const r=this.getAttribute(Y.MEDIA_CONTROLLER);r&&(vr(this,xt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=pr(this,xt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=pr(this,xt))==null?void 0:e.unassociateElement)==null||i.call(e,this),vr(this,xt,null)}get loadingDelay(){return pr(this,Es)}set loadingDelay(e){vr(this,Es,e);const{style:i}=ye(this.shadowRoot,":host");i.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return W(this,c.MEDIA_PAUSED)}set mediaPaused(e){F(this,c.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,c.MEDIA_LOADING)}set mediaLoading(e){F(this,c.MEDIA_LOADING,e)}get mediaController(){return ae(this,Y.MEDIA_CONTROLLER)}set mediaController(e){re(this,Y.MEDIA_CONTROLLER,e)}get noAutohide(){return W(this,On.NO_AUTOHIDE)}set noAutohide(e){F(this,On.NO_AUTOHIDE,e)}}xt=new WeakMap;Es=new WeakMap;Tu.shadowRootOptions={mode:"open"};Tu.getTemplateHTML=E1;f.customElements.get("media-loading-indicator")||f.customElements.define("media-loading-indicator",Tu);const _1=`<svg aria-hidden="true" viewBox="0 0 24 24">
1067
+ `}class Tu extends f.HTMLElement{constructor(){if(super(),hh(this,xt,void 0),hh(this,_s,jp),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER,c.MEDIA_PAUSED,c.MEDIA_LOADING,Nn.LOADING_DELAY]}attributeChangedCallback(e,i,a){var r,n,s,o,l;e===Nn.LOADING_DELAY&&i!==a?this.loadingDelay=Number(a):e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=vr(this,xt))==null?void 0:r.unassociateElement)==null||n.call(r,this),fr(this,xt,null)),a&&this.isConnected&&(fr(this,xt,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=vr(this,xt))==null?void 0:o.associateElement)==null||l.call(o,this)))}connectedCallback(){var e,i,a;const r=this.getAttribute(Y.MEDIA_CONTROLLER);r&&(fr(this,xt,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=vr(this,xt))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=vr(this,xt))==null?void 0:e.unassociateElement)==null||i.call(e,this),fr(this,xt,null)}get loadingDelay(){return vr(this,_s)}set loadingDelay(e){fr(this,_s,e);const{style:i}=ye(this.shadowRoot,":host");i.setProperty("--_loading-indicator-delay",`var(--media-loading-indicator-transition-delay, ${e}ms)`)}get mediaPaused(){return W(this,c.MEDIA_PAUSED)}set mediaPaused(e){F(this,c.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,c.MEDIA_LOADING)}set mediaLoading(e){F(this,c.MEDIA_LOADING,e)}get mediaController(){return ae(this,Y.MEDIA_CONTROLLER)}set mediaController(e){re(this,Y.MEDIA_CONTROLLER,e)}get noAutohide(){return W(this,Nn.NO_AUTOHIDE)}set noAutohide(e){F(this,Nn.NO_AUTOHIDE,e)}}xt=new WeakMap;_s=new WeakMap;Tu.shadowRootOptions={mode:"open"};Tu.getTemplateHTML=E1;f.customElements.get("media-loading-indicator")||f.customElements.define("media-loading-indicator",Tu);const _1=`<svg aria-hidden="true" viewBox="0 0 24 24">
1068
1068
  <path d="M16.5 12A4.5 4.5 0 0 0 14 8v2.18l2.45 2.45a4.22 4.22 0 0 0 .05-.63Zm2.5 0a6.84 6.84 0 0 1-.54 2.64L20 16.15A8.8 8.8 0 0 0 21 12a9 9 0 0 0-7-8.77v2.06A7 7 0 0 1 19 12ZM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25A6.92 6.92 0 0 1 14 18.7v2.06A9 9 0 0 0 17.69 19l2 2.05L21 19.73l-9-9L4.27 3ZM12 4 9.91 6.09 12 8.18V4Z"/>
1069
1069
  </svg>`,mh=`<svg aria-hidden="true" viewBox="0 0 24 24">
1070
1070
  <path d="M3 9v6h4l5 5V4L7 9H3Zm13.5 3A4.5 4.5 0 0 0 14 8v8a4.47 4.47 0 0 0 2.5-4Z"/>
@@ -1183,7 +1183,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1183
1183
  </style>
1184
1184
 
1185
1185
  <img part="poster img" aria-hidden="true" id="image"/>
1186
- `}const x1=t=>{t.style.removeProperty("background-image")},O1=(t,e)=>{t.style["background-image"]=`url('${e}')`};class Iu extends f.HTMLElement{static get observedAttributes(){return[Tt.PLACEHOLDER_SRC,Tt.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,i,a){e===Tt.SRC&&(a==null?this.image.removeAttribute(Tt.SRC):this.image.setAttribute(Tt.SRC,a)),e===Tt.PLACEHOLDER_SRC&&(a==null?x1(this.image):O1(this.image,a))}get placeholderSrc(){return ae(this,Tt.PLACEHOLDER_SRC)}set placeholderSrc(e){re(this,Tt.SRC,e)}get src(){return ae(this,Tt.SRC)}set src(e){re(this,Tt.SRC,e)}}Iu.shadowRootOptions={mode:"open"};Iu.getTemplateHTML=M1;f.customElements.get("media-poster-image")||f.customElements.define("media-poster-image",Iu);var Xp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},N1=(t,e,i)=>(Xp(t,e,"read from private field"),i?i.call(t):e.get(t)),P1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},U1=(t,e,i,a)=>(Xp(t,e,"write to private field"),e.set(t,i),i),_s;class $1 extends wi{constructor(){super(),P1(this,_s,void 0),U1(this,_s,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PREVIEW_CHAPTER,c.MEDIA_LANG]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),(e===c.MEDIA_PREVIEW_CHAPTER||e===c.MEDIA_LANG)&&a!==i&&a!=null)if(N1(this,_s).textContent=a,a!==""){const r=L("chapter: {chapterName}",{chapterName:a});this.setAttribute("aria-valuetext",r)}else this.removeAttribute("aria-valuetext")}get mediaPreviewChapter(){return ae(this,c.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){re(this,c.MEDIA_PREVIEW_CHAPTER,e)}}_s=new WeakMap;f.customElements.get("media-preview-chapter-display")||f.customElements.define("media-preview-chapter-display",$1);var Jp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Nn=(t,e,i)=>(Jp(t,e,"read from private field"),i?i.call(t):e.get(t)),H1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Pn=(t,e,i,a)=>(Jp(t,e,"write to private field"),e.set(t,i),i),Ot;function B1(t){return`
1186
+ `}const x1=t=>{t.style.removeProperty("background-image")},O1=(t,e)=>{t.style["background-image"]=`url('${e}')`};class Iu extends f.HTMLElement{static get observedAttributes(){return[Tt.PLACEHOLDER_SRC,Tt.SRC]}constructor(){if(super(),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.image=this.shadowRoot.querySelector("#image")}attributeChangedCallback(e,i,a){e===Tt.SRC&&(a==null?this.image.removeAttribute(Tt.SRC):this.image.setAttribute(Tt.SRC,a)),e===Tt.PLACEHOLDER_SRC&&(a==null?x1(this.image):O1(this.image,a))}get placeholderSrc(){return ae(this,Tt.PLACEHOLDER_SRC)}set placeholderSrc(e){re(this,Tt.SRC,e)}get src(){return ae(this,Tt.SRC)}set src(e){re(this,Tt.SRC,e)}}Iu.shadowRootOptions={mode:"open"};Iu.getTemplateHTML=M1;f.customElements.get("media-poster-image")||f.customElements.define("media-poster-image",Iu);var Xp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},N1=(t,e,i)=>(Xp(t,e,"read from private field"),i?i.call(t):e.get(t)),P1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},U1=(t,e,i,a)=>(Xp(t,e,"write to private field"),e.set(t,i),i),bs;class $1 extends wi{constructor(){super(),P1(this,bs,void 0),U1(this,bs,this.shadowRoot.querySelector("slot"))}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PREVIEW_CHAPTER,c.MEDIA_LANG]}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),(e===c.MEDIA_PREVIEW_CHAPTER||e===c.MEDIA_LANG)&&a!==i&&a!=null)if(N1(this,bs).textContent=a,a!==""){const r=L("chapter: {chapterName}",{chapterName:a});this.setAttribute("aria-valuetext",r)}else this.removeAttribute("aria-valuetext")}get mediaPreviewChapter(){return ae(this,c.MEDIA_PREVIEW_CHAPTER)}set mediaPreviewChapter(e){re(this,c.MEDIA_PREVIEW_CHAPTER,e)}}bs=new WeakMap;f.customElements.get("media-preview-chapter-display")||f.customElements.define("media-preview-chapter-display",$1);var Jp=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Pn=(t,e,i)=>(Jp(t,e,"read from private field"),i?i.call(t):e.get(t)),H1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Un=(t,e,i,a)=>(Jp(t,e,"write to private field"),e.set(t,i),i),Ot;function B1(t){return`
1187
1187
  <style>
1188
1188
  :host {
1189
1189
  box-sizing: border-box;
@@ -1197,7 +1197,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1197
1197
  }
1198
1198
  </style>
1199
1199
  <img crossorigin loading="eager" decoding="async">
1200
- `}class Ko extends f.HTMLElement{constructor(){if(super(),H1(this,Ot,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER,c.MEDIA_PREVIEW_IMAGE,c.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,i,a;const r=this.getAttribute(Y.MEDIA_CONTROLLER);r&&(Pn(this,Ot,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Nn(this,Ot))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Nn(this,Ot))==null?void 0:e.unassociateElement)==null||i.call(e,this),Pn(this,Ot,null)}attributeChangedCallback(e,i,a){var r,n,s,o,l;[c.MEDIA_PREVIEW_IMAGE,c.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=Nn(this,Ot))==null?void 0:r.unassociateElement)==null||n.call(r,this),Pn(this,Ot,null)),a&&this.isConnected&&(Pn(this,Ot,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=Nn(this,Ot))==null?void 0:o.associateElement)==null||l.call(o,this)))}get mediaPreviewImage(){return ae(this,c.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){re(this,c.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(c.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(i=>+i)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(c.MEDIA_PREVIEW_COORDS);return}this.setAttribute(c.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){const e=this.mediaPreviewCoords,i=this.mediaPreviewImage;if(!(e&&i))return;const[a,r,n,s]=e,o=i.split("#")[0],l=getComputedStyle(this),{maxWidth:d,maxHeight:m,minWidth:p,minHeight:h}=l,u=Math.min(parseInt(d)/n,parseInt(m)/s),v=Math.max(parseInt(p)/n,parseInt(h)/s),E=u<1,g=E?u:v>1?v:1,{style:y}=ye(this.shadowRoot,":host"),T=ye(this.shadowRoot,"img").style,_=this.shadowRoot.querySelector("img"),S=E?"min":"max";y.setProperty(`${S}-width`,"initial","important"),y.setProperty(`${S}-height`,"initial","important"),y.width=`${n*g}px`,y.height=`${s*g}px`;const C=()=>{T.width=`${this.imgWidth*g}px`,T.height=`${this.imgHeight*g}px`,T.display="block"};_.src!==o&&(_.onload=()=>{this.imgWidth=_.naturalWidth,this.imgHeight=_.naturalHeight,C()},_.src=o,C()),C(),T.transform=`translate(-${a*g}px, -${r*g}px)`}}Ot=new WeakMap;Ko.shadowRootOptions={mode:"open"};Ko.getTemplateHTML=B1;f.customElements.get("media-preview-thumbnail")||f.customElements.define("media-preview-thumbnail",Ko);var _h=Ko,ev=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},bh=(t,e,i)=>(ev(t,e,"read from private field"),i?i.call(t):e.get(t)),W1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},F1=(t,e,i,a)=>(ev(t,e,"write to private field"),e.set(t,i),i),Pr;class K1 extends wi{constructor(){super(),W1(this,Pr,void 0),F1(this,Pr,this.shadowRoot.querySelector("slot")),bh(this,Pr).textContent=ki(0)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_PREVIEW_TIME&&a!=null&&(bh(this,Pr).textContent=ki(parseFloat(a)))}get mediaPreviewTime(){return ie(this,c.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){ue(this,c.MEDIA_PREVIEW_TIME,e)}}Pr=new WeakMap;f.customElements.get("media-preview-time-display")||f.customElements.define("media-preview-time-display",K1);const ua={SEEK_OFFSET:"seekoffset"},ul=30,V1=t=>`
1200
+ `}class Ko extends f.HTMLElement{constructor(){if(super(),H1(this,Ot,void 0),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}}static get observedAttributes(){return[Y.MEDIA_CONTROLLER,c.MEDIA_PREVIEW_IMAGE,c.MEDIA_PREVIEW_COORDS]}connectedCallback(){var e,i,a;const r=this.getAttribute(Y.MEDIA_CONTROLLER);r&&(Un(this,Ot,(e=this.getRootNode())==null?void 0:e.getElementById(r)),(a=(i=Pn(this,Ot))==null?void 0:i.associateElement)==null||a.call(i,this))}disconnectedCallback(){var e,i;(i=(e=Pn(this,Ot))==null?void 0:e.unassociateElement)==null||i.call(e,this),Un(this,Ot,null)}attributeChangedCallback(e,i,a){var r,n,s,o,l;[c.MEDIA_PREVIEW_IMAGE,c.MEDIA_PREVIEW_COORDS].includes(e)&&this.update(),e===Y.MEDIA_CONTROLLER&&(i&&((n=(r=Pn(this,Ot))==null?void 0:r.unassociateElement)==null||n.call(r,this),Un(this,Ot,null)),a&&this.isConnected&&(Un(this,Ot,(s=this.getRootNode())==null?void 0:s.getElementById(a)),(l=(o=Pn(this,Ot))==null?void 0:o.associateElement)==null||l.call(o,this)))}get mediaPreviewImage(){return ae(this,c.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){re(this,c.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewCoords(){const e=this.getAttribute(c.MEDIA_PREVIEW_COORDS);if(e)return e.split(/\s+/).map(i=>+i)}set mediaPreviewCoords(e){if(!e){this.removeAttribute(c.MEDIA_PREVIEW_COORDS);return}this.setAttribute(c.MEDIA_PREVIEW_COORDS,e.join(" "))}update(){const e=this.mediaPreviewCoords,i=this.mediaPreviewImage;if(!(e&&i))return;const[a,r,n,s]=e,o=i.split("#")[0],l=getComputedStyle(this),{maxWidth:d,maxHeight:m,minWidth:p,minHeight:h}=l,u=Math.min(parseInt(d)/n,parseInt(m)/s),v=Math.max(parseInt(p)/n,parseInt(h)/s),E=u<1,g=E?u:v>1?v:1,{style:y}=ye(this.shadowRoot,":host"),T=ye(this.shadowRoot,"img").style,_=this.shadowRoot.querySelector("img"),S=E?"min":"max";y.setProperty(`${S}-width`,"initial","important"),y.setProperty(`${S}-height`,"initial","important"),y.width=`${n*g}px`,y.height=`${s*g}px`;const C=()=>{T.width=`${this.imgWidth*g}px`,T.height=`${this.imgHeight*g}px`,T.display="block"};_.src!==o&&(_.onload=()=>{this.imgWidth=_.naturalWidth,this.imgHeight=_.naturalHeight,C()},_.src=o,C()),C(),T.transform=`translate(-${a*g}px, -${r*g}px)`}}Ot=new WeakMap;Ko.shadowRootOptions={mode:"open"};Ko.getTemplateHTML=B1;f.customElements.get("media-preview-thumbnail")||f.customElements.define("media-preview-thumbnail",Ko);var _h=Ko,ev=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},bh=(t,e,i)=>(ev(t,e,"read from private field"),i?i.call(t):e.get(t)),W1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},F1=(t,e,i,a)=>(ev(t,e,"write to private field"),e.set(t,i),i),Ur;class K1 extends wi{constructor(){super(),W1(this,Ur,void 0),F1(this,Ur,this.shadowRoot.querySelector("slot")),bh(this,Ur).textContent=ki(0)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PREVIEW_TIME]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_PREVIEW_TIME&&a!=null&&(bh(this,Ur).textContent=ki(parseFloat(a)))}get mediaPreviewTime(){return ie(this,c.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){ue(this,c.MEDIA_PREVIEW_TIME,e)}}Ur=new WeakMap;f.customElements.get("media-preview-time-display")||f.customElements.define("media-preview-time-display",K1);const ua={SEEK_OFFSET:"seekoffset"},ul=30,V1=t=>`
1201
1201
  <svg aria-hidden="true" viewBox="0 0 20 24">
1202
1202
  <defs>
1203
1203
  <style>.text{font-size:8px;font-family:Arial-BoldMT, Arial;font-weight:700;}</style>
@@ -1215,9 +1215,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1215
1215
  <path d="M10 6V3l5.61 4L10 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 10 6Z"/>
1216
1216
  </svg>`;function z1(t,e){return`
1217
1217
  <slot name="icon">${Q1(e.seekOffset)}</slot>
1218
- `}function j1(){return L("Seek forward")}const Z1=0;class Cu extends Ce{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_CURRENT_TIME,ca.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=ie(this,ca.SEEK_OFFSET,cl)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===ca.SEEK_OFFSET&&(this.seekOffset=ie(this,ca.SEEK_OFFSET,cl))}get seekOffset(){return ie(this,ca.SEEK_OFFSET,cl)}set seekOffset(e){ue(this,ca.SEEK_OFFSET,e),this.setAttribute("aria-label",L("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),sp(op(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ie(this,c.MEDIA_CURRENT_TIME,Z1)}set mediaCurrentTime(e){ue(this,c.MEDIA_CURRENT_TIME,e)}handleClick(){const e=this.mediaCurrentTime+this.seekOffset,i=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}}Cu.getSlotTemplateHTML=z1;Cu.getTooltipContentHTML=j1;f.customElements.get("media-seek-forward-button")||f.customElements.define("media-seek-forward-button",Cu);var tv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},hl=(t,e,i)=>(tv(t,e,"read from private field"),i?i.call(t):e.get(t)),X1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},J1=(t,e,i,a)=>(tv(t,e,"write to private field"),e.set(t,i),i),Ta;const Oi={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},gh=[...Object.values(Oi),c.MEDIA_CURRENT_TIME,c.MEDIA_DURATION,c.MEDIA_SEEKABLE],yh=["Enter"," "],ey="&nbsp;/&nbsp;",id=(t,{timesSep:e=ey}={})=>{var i,a;const r=(i=t.mediaCurrentTime)!=null?i:0,[,n]=(a=t.mediaSeekable)!=null?a:[];let s=0;Number.isFinite(t.mediaDuration)?s=t.mediaDuration:Number.isFinite(n)&&(s=n);const o=t.remaining?ki(0-(s-r)):ki(r);return t.showDuration?`${o}${e}${ki(s)}`:o},ty="video not loaded, unknown time.",iy=t=>{var e;const i=t.mediaCurrentTime,[,a]=(e=t.mediaSeekable)!=null?e:[];let r=null;if(Number.isFinite(t.mediaDuration)?r=t.mediaDuration:Number.isFinite(a)&&(r=a),i==null||r===null){t.setAttribute("aria-valuetext",ty);return}const n=t.remaining?Qr(0-(r-i)):Qr(i);if(!t.showDuration){t.setAttribute("aria-valuetext",n);return}const s=Qr(r),o=`${n} of ${s}`;t.setAttribute("aria-valuetext",o)};function ay(t,e){return`
1218
+ `}function j1(){return L("Seek forward")}const Z1=0;class Cu extends Ce{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_CURRENT_TIME,ca.SEEK_OFFSET]}connectedCallback(){super.connectedCallback(),this.seekOffset=ie(this,ca.SEEK_OFFSET,cl)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===ca.SEEK_OFFSET&&(this.seekOffset=ie(this,ca.SEEK_OFFSET,cl))}get seekOffset(){return ie(this,ca.SEEK_OFFSET,cl)}set seekOffset(e){ue(this,ca.SEEK_OFFSET,e),this.setAttribute("aria-label",L("seek forward {seekOffset} seconds",{seekOffset:this.seekOffset})),sp(op(this,"icon"),this.seekOffset)}get mediaCurrentTime(){return ie(this,c.MEDIA_CURRENT_TIME,Z1)}set mediaCurrentTime(e){ue(this,c.MEDIA_CURRENT_TIME,e)}handleClick(){const e=this.mediaCurrentTime+this.seekOffset,i=new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}}Cu.getSlotTemplateHTML=z1;Cu.getTooltipContentHTML=j1;f.customElements.get("media-seek-forward-button")||f.customElements.define("media-seek-forward-button",Cu);var tv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},hl=(t,e,i)=>(tv(t,e,"read from private field"),i?i.call(t):e.get(t)),X1=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},J1=(t,e,i,a)=>(tv(t,e,"write to private field"),e.set(t,i),i),Ta;const Oi={REMAINING:"remaining",SHOW_DURATION:"showduration",NO_TOGGLE:"notoggle"},gh=[...Object.values(Oi),c.MEDIA_CURRENT_TIME,c.MEDIA_DURATION,c.MEDIA_SEEKABLE],yh=["Enter"," "],ey="&nbsp;/&nbsp;",id=(t,{timesSep:e=ey}={})=>{var i,a;const r=(i=t.mediaCurrentTime)!=null?i:0,[,n]=(a=t.mediaSeekable)!=null?a:[];let s=0;Number.isFinite(t.mediaDuration)?s=t.mediaDuration:Number.isFinite(n)&&(s=n);const o=t.remaining?ki(0-(s-r)):ki(r);return t.showDuration?`${o}${e}${ki(s)}`:o},ty="video not loaded, unknown time.",iy=t=>{var e;const i=t.mediaCurrentTime,[,a]=(e=t.mediaSeekable)!=null?e:[];let r=null;if(Number.isFinite(t.mediaDuration)?r=t.mediaDuration:Number.isFinite(a)&&(r=a),i==null||r===null){t.setAttribute("aria-valuetext",ty);return}const n=t.remaining?zr(0-(r-i)):zr(i);if(!t.showDuration){t.setAttribute("aria-valuetext",n);return}const s=zr(r),o=`${n} of ${s}`;t.setAttribute("aria-valuetext",o)};function ay(t,e){return`
1219
1219
  <slot>${id(e)}</slot>
1220
- `}class iv extends wi{constructor(){super(),X1(this,Ta,void 0),J1(this,Ta,this.shadowRoot.querySelector("slot")),hl(this,Ta).innerHTML=`${id(this)}`}static get observedAttributes(){return[...super.observedAttributes,...gh,"disabled"]}connectedCallback(){const{style:e}=ye(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",L("playback time"));const i=a=>{const{key:r}=a;if(!yh.includes(r)){this.removeEventListener("keyup",i);return}this.toggleTimeDisplay()};this.addEventListener("keydown",a=>{const{metaKey:r,altKey:n,key:s}=a;if(r||n||!yh.includes(s)){this.removeEventListener("keyup",i);return}this.addEventListener("keyup",i)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,i,a){gh.includes(e)?this.update():e==="disabled"&&a!==i&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,i,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return W(this,Oi.REMAINING)}set remaining(e){F(this,Oi.REMAINING,e)}get showDuration(){return W(this,Oi.SHOW_DURATION)}set showDuration(e){F(this,Oi.SHOW_DURATION,e)}get noToggle(){return W(this,Oi.NO_TOGGLE)}set noToggle(e){F(this,Oi.NO_TOGGLE,e)}get mediaDuration(){return ie(this,c.MEDIA_DURATION)}set mediaDuration(e){ue(this,c.MEDIA_DURATION,e)}get mediaCurrentTime(){return ie(this,c.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){ue(this,c.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(c.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(c.MEDIA_SEEKABLE);return}this.setAttribute(c.MEDIA_SEEKABLE,e.join(":"))}update(){const e=id(this);iy(this),e!==hl(this,Ta).innerHTML&&(hl(this,Ta).innerHTML=e)}}Ta=new WeakMap;iv.getSlotTemplateHTML=ay;f.customElements.get("media-time-display")||f.customElements.define("media-time-display",iv);var av=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},we=(t,e,i)=>(av(t,e,"read from private field"),e.get(t)),At=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Qe=(t,e,i,a)=>(av(t,e,"write to private field"),e.set(t,i),i),ry=(t,e,i,a)=>({set _(r){Qe(t,e,r)},get _(){return we(t,e)}}),Aa,bs,ka,Ur,gs,ys,Ts,Sa,Ni,As;class ny{constructor(e,i,a){At(this,Aa,void 0),At(this,bs,void 0),At(this,ka,void 0),At(this,Ur,void 0),At(this,gs,void 0),At(this,ys,void 0),At(this,Ts,void 0),At(this,Sa,void 0),At(this,Ni,0),At(this,As,(r=performance.now())=>{Qe(this,Ni,requestAnimationFrame(we(this,As))),Qe(this,Ur,performance.now()-we(this,ka));const n=1e3/this.fps;if(we(this,Ur)>n){Qe(this,ka,r-we(this,Ur)%n);const s=1e3/((r-we(this,bs))/++ry(this,gs)._),o=(r-we(this,ys))/1e3/this.duration;let l=we(this,Ts)+o*this.playbackRate;l-we(this,Aa).valueAsNumber>0?Qe(this,Sa,this.playbackRate/this.duration/s):(Qe(this,Sa,.995*we(this,Sa)),l=we(this,Aa).valueAsNumber+we(this,Sa)),this.callback(l)}}),Qe(this,Aa,e),this.callback=i,this.fps=a}start(){we(this,Ni)===0&&(Qe(this,ka,performance.now()),Qe(this,bs,we(this,ka)),Qe(this,gs,0),we(this,As).call(this))}stop(){we(this,Ni)!==0&&(cancelAnimationFrame(we(this,Ni)),Qe(this,Ni,0))}update({start:e,duration:i,playbackRate:a}){const r=e-we(this,Aa).valueAsNumber,n=Math.abs(i-this.duration);(r>0||r<-.03||n>=.5)&&this.callback(e),Qe(this,Ts,e),Qe(this,ys,performance.now()),this.duration=i,this.playbackRate=a}}Aa=new WeakMap;bs=new WeakMap;ka=new WeakMap;Ur=new WeakMap;gs=new WeakMap;ys=new WeakMap;Ts=new WeakMap;Sa=new WeakMap;Ni=new WeakMap;As=new WeakMap;var Lu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ce=(t,e,i)=>(Lu(t,e,"read from private field"),i?i.call(t):e.get(t)),be=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},it=(t,e,i,a)=>(Lu(t,e,"write to private field"),e.set(t,i),i),Ne=(t,e,i)=>(Lu(t,e,"access private method"),i),wa,Xi,ho,Zr,mo,ks,hn,mn,Ia,Ra,Ca,$r,Du,rv,ad,po,Mu,vo,xu,fo,Ou,rd,nv,pn,Eo,nd,sv;const sy="video not loaded, unknown time.",oy=t=>{const e=t.range,i=Qr(+ov(t)),a=Qr(+t.mediaSeekableEnd),r=i&&a?`${i} of ${a}`:sy;e.setAttribute("aria-valuetext",r)};function ly(t){return`
1220
+ `}class iv extends wi{constructor(){super(),X1(this,Ta,void 0),J1(this,Ta,this.shadowRoot.querySelector("slot")),hl(this,Ta).innerHTML=`${id(this)}`}static get observedAttributes(){return[...super.observedAttributes,...gh,"disabled"]}connectedCallback(){const{style:e}=ye(this.shadowRoot,":host(:hover:not([notoggle]))");e.setProperty("cursor","var(--media-cursor, pointer)"),e.setProperty("background","var(--media-control-hover-background, rgba(50 50 70 / .7))"),this.hasAttribute("disabled")||this.enable(),this.setAttribute("role","progressbar"),this.setAttribute("aria-label",L("playback time"));const i=a=>{const{key:r}=a;if(!yh.includes(r)){this.removeEventListener("keyup",i);return}this.toggleTimeDisplay()};this.addEventListener("keydown",a=>{const{metaKey:r,altKey:n,key:s}=a;if(r||n||!yh.includes(s)){this.removeEventListener("keyup",i);return}this.addEventListener("keyup",i)}),this.addEventListener("click",this.toggleTimeDisplay),super.connectedCallback()}toggleTimeDisplay(){this.noToggle||(this.hasAttribute("remaining")?this.removeAttribute("remaining"):this.setAttribute("remaining",""))}disconnectedCallback(){this.disable(),super.disconnectedCallback()}attributeChangedCallback(e,i,a){gh.includes(e)?this.update():e==="disabled"&&a!==i&&(a==null?this.enable():this.disable()),super.attributeChangedCallback(e,i,a)}enable(){this.tabIndex=0}disable(){this.tabIndex=-1}get remaining(){return W(this,Oi.REMAINING)}set remaining(e){F(this,Oi.REMAINING,e)}get showDuration(){return W(this,Oi.SHOW_DURATION)}set showDuration(e){F(this,Oi.SHOW_DURATION,e)}get noToggle(){return W(this,Oi.NO_TOGGLE)}set noToggle(e){F(this,Oi.NO_TOGGLE,e)}get mediaDuration(){return ie(this,c.MEDIA_DURATION)}set mediaDuration(e){ue(this,c.MEDIA_DURATION,e)}get mediaCurrentTime(){return ie(this,c.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){ue(this,c.MEDIA_CURRENT_TIME,e)}get mediaSeekable(){const e=this.getAttribute(c.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(c.MEDIA_SEEKABLE);return}this.setAttribute(c.MEDIA_SEEKABLE,e.join(":"))}update(){const e=id(this);iy(this),e!==hl(this,Ta).innerHTML&&(hl(this,Ta).innerHTML=e)}}Ta=new WeakMap;iv.getSlotTemplateHTML=ay;f.customElements.get("media-time-display")||f.customElements.define("media-time-display",iv);var av=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},we=(t,e,i)=>(av(t,e,"read from private field"),e.get(t)),At=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Qe=(t,e,i,a)=>(av(t,e,"write to private field"),e.set(t,i),i),ry=(t,e,i,a)=>({set _(r){Qe(t,e,r)},get _(){return we(t,e)}}),Aa,gs,ka,$r,ys,Ts,As,Sa,Ni,ks;class ny{constructor(e,i,a){At(this,Aa,void 0),At(this,gs,void 0),At(this,ka,void 0),At(this,$r,void 0),At(this,ys,void 0),At(this,Ts,void 0),At(this,As,void 0),At(this,Sa,void 0),At(this,Ni,0),At(this,ks,(r=performance.now())=>{Qe(this,Ni,requestAnimationFrame(we(this,ks))),Qe(this,$r,performance.now()-we(this,ka));const n=1e3/this.fps;if(we(this,$r)>n){Qe(this,ka,r-we(this,$r)%n);const s=1e3/((r-we(this,gs))/++ry(this,ys)._),o=(r-we(this,Ts))/1e3/this.duration;let l=we(this,As)+o*this.playbackRate;l-we(this,Aa).valueAsNumber>0?Qe(this,Sa,this.playbackRate/this.duration/s):(Qe(this,Sa,.995*we(this,Sa)),l=we(this,Aa).valueAsNumber+we(this,Sa)),this.callback(l)}}),Qe(this,Aa,e),this.callback=i,this.fps=a}start(){we(this,Ni)===0&&(Qe(this,ka,performance.now()),Qe(this,gs,we(this,ka)),Qe(this,ys,0),we(this,ks).call(this))}stop(){we(this,Ni)!==0&&(cancelAnimationFrame(we(this,Ni)),Qe(this,Ni,0))}update({start:e,duration:i,playbackRate:a}){const r=e-we(this,Aa).valueAsNumber,n=Math.abs(i-this.duration);(r>0||r<-.03||n>=.5)&&this.callback(e),Qe(this,As,e),Qe(this,Ts,performance.now()),this.duration=i,this.playbackRate=a}}Aa=new WeakMap;gs=new WeakMap;ka=new WeakMap;$r=new WeakMap;ys=new WeakMap;Ts=new WeakMap;As=new WeakMap;Sa=new WeakMap;Ni=new WeakMap;ks=new WeakMap;var Lu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},ce=(t,e,i)=>(Lu(t,e,"read from private field"),i?i.call(t):e.get(t)),be=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},it=(t,e,i,a)=>(Lu(t,e,"write to private field"),e.set(t,i),i),Ne=(t,e,i)=>(Lu(t,e,"access private method"),i),wa,Xi,ho,Xr,mo,Ss,mn,pn,Ia,Ra,Ca,Hr,Du,rv,ad,po,Mu,vo,xu,fo,Ou,rd,nv,vn,Eo,nd,sv;const sy="video not loaded, unknown time.",oy=t=>{const e=t.range,i=zr(+ov(t)),a=zr(+t.mediaSeekableEnd),r=i&&a?`${i} of ${a}`:sy;e.setAttribute("aria-valuetext",r)};function ly(t){return`
1221
1221
  <style>
1222
1222
  :host {
1223
1223
  --media-box-border-radius: 4px;
@@ -1434,7 +1434,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1434
1434
 
1435
1435
  </slot>
1436
1436
  </div>
1437
- `}const Un=(t,e=t.mediaCurrentTime)=>{const i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(a))return 0;const r=(e-i)/(a-i);return Math.max(0,Math.min(r,1))},ov=(t,e=t.range.valueAsNumber)=>{const i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(a)?0:e*(a-i)+i};class Nu extends sr{constructor(){super(),be(this,Ca),be(this,Du),be(this,po),be(this,vo),be(this,fo),be(this,rd),be(this,pn),be(this,nd),be(this,wa,void 0),be(this,Xi,void 0),be(this,ho,void 0),be(this,Zr,void 0),be(this,mo,void 0),be(this,ks,void 0),be(this,hn,void 0),be(this,mn,void 0),be(this,Ia,void 0),be(this,Ra,void 0),be(this,ad,a=>{this.dragging||(tu(a)&&(this.range.valueAsNumber=a),ce(this,Ra)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),it(this,ho,this.shadowRoot.querySelectorAll('[part~="box"]')),it(this,mo,this.shadowRoot.querySelector('[part~="preview-box"]')),it(this,ks,this.shadowRoot.querySelector('[part~="current-box"]'));const i=getComputedStyle(this);it(this,hn,parseInt(i.getPropertyValue("--media-box-padding-left"))),it(this,mn,parseInt(i.getPropertyValue("--media-box-padding-right"))),it(this,Xi,new ny(this.range,ce(this,ad),60))}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PAUSED,c.MEDIA_DURATION,c.MEDIA_SEEKABLE,c.MEDIA_CURRENT_TIME,c.MEDIA_PREVIEW_IMAGE,c.MEDIA_PREVIEW_TIME,c.MEDIA_PREVIEW_CHAPTER,c.MEDIA_BUFFERED,c.MEDIA_PLAYBACK_RATE,c.MEDIA_LOADING,c.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",L("seek")),Ne(this,Ca,$r).call(this),it(this,wa,this.getRootNode()),(e=ce(this,wa))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),Ne(this,Ca,$r).call(this),(e=ce(this,wa))==null||e.removeEventListener("transitionstart",this),it(this,wa,null)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),i!=a&&(e===c.MEDIA_CURRENT_TIME||e===c.MEDIA_PAUSED||e===c.MEDIA_ENDED||e===c.MEDIA_LOADING||e===c.MEDIA_DURATION||e===c.MEDIA_SEEKABLE?(ce(this,Xi).update({start:Un(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),Ne(this,Ca,$r).call(this),oy(this)):e===c.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===c.MEDIA_DURATION||e===c.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=ce(this,Ia),this.updateBar()))}get mediaChaptersCues(){return ce(this,Ia)}set mediaChaptersCues(e){var i;it(this,Ia,e),this.updateSegments((i=ce(this,Ia))==null?void 0:i.map(a=>({start:Un(this,a.startTime),end:Un(this,a.endTime)})))}get mediaPaused(){return W(this,c.MEDIA_PAUSED)}set mediaPaused(e){F(this,c.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,c.MEDIA_LOADING)}set mediaLoading(e){F(this,c.MEDIA_LOADING,e)}get mediaDuration(){return ie(this,c.MEDIA_DURATION)}set mediaDuration(e){ue(this,c.MEDIA_DURATION,e)}get mediaCurrentTime(){return ie(this,c.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){ue(this,c.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return ie(this,c.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){ue(this,c.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(c.MEDIA_BUFFERED);return e?e.split(" ").map(i=>i.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(c.MEDIA_BUFFERED);return}const i=e.map(a=>a.join(":")).join(" ");this.setAttribute(c.MEDIA_BUFFERED,i)}get mediaSeekable(){const e=this.getAttribute(c.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(c.MEDIA_SEEKABLE);return}this.setAttribute(c.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;const[,i=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaSeekableStart(){var e;const[i=0]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaPreviewImage(){return ae(this,c.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){re(this,c.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return ie(this,c.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){ue(this,c.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return W(this,c.MEDIA_ENDED)}set mediaEnded(e){F(this,c.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;const i=this.mediaBuffered;if(!i.length)return;let a;if(this.mediaEnded)a=1;else{const n=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=i.find(([o,l])=>o<=n&&n<=l))!=null?e:[];a=Un(this,s)}const{style:r}=ye(this.shadowRoot,"#buffered");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const i=ye(this.shadowRoot,"#current-rail"),a=ye(this.shadowRoot,'[part~="current-box"]'),r=Ne(this,po,Mu).call(this,ce(this,ks)),n=Ne(this,vo,xu).call(this,r,this.range.valueAsNumber),s=Ne(this,fo,Ou).call(this,r,this.range.valueAsNumber);i.style.transform=`translateX(${n})`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${s}`),a.style.setProperty("--_box-width",`${r.box.width}px`),a.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":Ne(this,nd,sv).call(this);break;case"pointermove":Ne(this,rd,nv).call(this,e);break;case"pointerup":ce(this,Ra)&&it(this,Ra,!1);break;case"pointerdown":it(this,Ra,!0);break;case"pointerleave":Ne(this,pn,Eo).call(this,null);break;case"transitionstart":si(e.target,this)&&setTimeout(()=>Ne(this,Ca,$r).call(this),0);break}}}wa=new WeakMap;Xi=new WeakMap;ho=new WeakMap;Zr=new WeakMap;mo=new WeakMap;ks=new WeakMap;hn=new WeakMap;mn=new WeakMap;Ia=new WeakMap;Ra=new WeakMap;Ca=new WeakSet;$r=function(){Ne(this,Du,rv).call(this)?ce(this,Xi).start():ce(this,Xi).stop()};Du=new WeakSet;rv=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&lp(this)};ad=new WeakMap;po=new WeakSet;Mu=function(t){var e;const a=((e=this.getAttribute("bounds")?rr(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),r=this.range.getBoundingClientRect(),n=t.offsetWidth,s=-(r.left-a.left-n/2),o=a.right-r.left-n/2;return{box:{width:n,min:s,max:o},bounds:a,range:r}};vo=new WeakSet;xu=function(t,e){let i=`${e*100}%`;const{width:a,min:r,max:n}=t.box;if(!a)return i;if(Number.isNaN(r)||(i=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`}, ${i})`),!Number.isNaN(n)){const o=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;i=`min(${i}, ${o})`}return i};fo=new WeakSet;Ou=function(t,e){const{width:i,min:a,max:r}=t.box,n=e*t.range.width;if(n<a+ce(this,hn)){const s=t.range.left-t.bounds.left-ce(this,hn);return`${n-i/2+s}px`}if(n>r-ce(this,mn)){const s=t.bounds.right-t.range.right-ce(this,mn);return`${n+i/2-s-t.range.width}px`}return 0};rd=new WeakSet;nv=function(t){const e=[...ce(this,ho)].some(m=>t.composedPath().includes(m));if(!this.dragging&&(e||!t.composedPath().includes(this))){Ne(this,pn,Eo).call(this,null);return}const i=this.mediaSeekableEnd;if(!i)return;const a=ye(this.shadowRoot,"#preview-rail"),r=ye(this.shadowRoot,'[part~="preview-box"]'),n=Ne(this,po,Mu).call(this,ce(this,mo));let s=(t.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));const o=Ne(this,vo,xu).call(this,n,s),l=Ne(this,fo,Ou).call(this,n,s);a.style.transform=`translateX(${o})`,a.style.setProperty("--_range-width",`${n.range.width}`),r.style.setProperty("--_box-shift",`${l}`),r.style.setProperty("--_box-width",`${n.box.width}px`);const d=Math.round(ce(this,Zr))-Math.round(s*i);Math.abs(d)<1&&s>.01&&s<.99||(it(this,Zr,s*i),Ne(this,pn,Eo).call(this,ce(this,Zr)))};pn=new WeakSet;Eo=function(t){this.dispatchEvent(new f.CustomEvent(I.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))};nd=new WeakSet;sv=function(){ce(this,Xi).stop();const t=ov(this);this.dispatchEvent(new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))};Nu.shadowRootOptions={mode:"open"};Nu.getContainerTemplateHTML=ly;f.customElements.get("media-time-range")||f.customElements.define("media-time-range",Nu);const dy=1,uy=t=>t.mediaMuted?0:t.mediaVolume,cy=t=>`${Math.round(t*100)}%`;class hy extends sr{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_VOLUME,c.MEDIA_MUTED,c.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{const e=this.range.value,i=new f.CustomEvent(I.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",L("volume"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===c.MEDIA_VOLUME||e===c.MEDIA_MUTED)&&(this.range.valueAsNumber=uy(this),this.range.setAttribute("aria-valuetext",cy(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return ie(this,c.MEDIA_VOLUME,dy)}set mediaVolume(e){ue(this,c.MEDIA_VOLUME,e)}get mediaMuted(){return W(this,c.MEDIA_MUTED)}set mediaMuted(e){F(this,c.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return ae(this,c.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){re(this,c.MEDIA_VOLUME_UNAVAILABLE,e)}}f.customElements.get("media-volume-range")||f.customElements.define("media-volume-range",hy);function my(t){return`
1437
+ `}const $n=(t,e=t.mediaCurrentTime)=>{const i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;if(Number.isNaN(a))return 0;const r=(e-i)/(a-i);return Math.max(0,Math.min(r,1))},ov=(t,e=t.range.valueAsNumber)=>{const i=Number.isFinite(t.mediaSeekableStart)?t.mediaSeekableStart:0,a=Number.isFinite(t.mediaDuration)?t.mediaDuration:t.mediaSeekableEnd;return Number.isNaN(a)?0:e*(a-i)+i};class Nu extends or{constructor(){super(),be(this,Ca),be(this,Du),be(this,po),be(this,vo),be(this,fo),be(this,rd),be(this,vn),be(this,nd),be(this,wa,void 0),be(this,Xi,void 0),be(this,ho,void 0),be(this,Xr,void 0),be(this,mo,void 0),be(this,Ss,void 0),be(this,mn,void 0),be(this,pn,void 0),be(this,Ia,void 0),be(this,Ra,void 0),be(this,ad,a=>{this.dragging||(tu(a)&&(this.range.valueAsNumber=a),ce(this,Ra)||this.updateBar())}),this.shadowRoot.querySelector("#track").insertAdjacentHTML("afterbegin",'<div id="buffered" part="buffered"></div>'),it(this,ho,this.shadowRoot.querySelectorAll('[part~="box"]')),it(this,mo,this.shadowRoot.querySelector('[part~="preview-box"]')),it(this,Ss,this.shadowRoot.querySelector('[part~="current-box"]'));const i=getComputedStyle(this);it(this,mn,parseInt(i.getPropertyValue("--media-box-padding-left"))),it(this,pn,parseInt(i.getPropertyValue("--media-box-padding-right"))),it(this,Xi,new ny(this.range,ce(this,ad),60))}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PAUSED,c.MEDIA_DURATION,c.MEDIA_SEEKABLE,c.MEDIA_CURRENT_TIME,c.MEDIA_PREVIEW_IMAGE,c.MEDIA_PREVIEW_TIME,c.MEDIA_PREVIEW_CHAPTER,c.MEDIA_BUFFERED,c.MEDIA_PLAYBACK_RATE,c.MEDIA_LOADING,c.MEDIA_ENDED]}connectedCallback(){var e;super.connectedCallback(),this.range.setAttribute("aria-label",L("seek")),Ne(this,Ca,Hr).call(this),it(this,wa,this.getRootNode()),(e=ce(this,wa))==null||e.addEventListener("transitionstart",this)}disconnectedCallback(){var e;super.disconnectedCallback(),Ne(this,Ca,Hr).call(this),(e=ce(this,wa))==null||e.removeEventListener("transitionstart",this),it(this,wa,null)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),i!=a&&(e===c.MEDIA_CURRENT_TIME||e===c.MEDIA_PAUSED||e===c.MEDIA_ENDED||e===c.MEDIA_LOADING||e===c.MEDIA_DURATION||e===c.MEDIA_SEEKABLE?(ce(this,Xi).update({start:$n(this),duration:this.mediaSeekableEnd-this.mediaSeekableStart,playbackRate:this.mediaPlaybackRate}),Ne(this,Ca,Hr).call(this),oy(this)):e===c.MEDIA_BUFFERED&&this.updateBufferedBar(),(e===c.MEDIA_DURATION||e===c.MEDIA_SEEKABLE)&&(this.mediaChaptersCues=ce(this,Ia),this.updateBar()))}get mediaChaptersCues(){return ce(this,Ia)}set mediaChaptersCues(e){var i;it(this,Ia,e),this.updateSegments((i=ce(this,Ia))==null?void 0:i.map(a=>({start:$n(this,a.startTime),end:$n(this,a.endTime)})))}get mediaPaused(){return W(this,c.MEDIA_PAUSED)}set mediaPaused(e){F(this,c.MEDIA_PAUSED,e)}get mediaLoading(){return W(this,c.MEDIA_LOADING)}set mediaLoading(e){F(this,c.MEDIA_LOADING,e)}get mediaDuration(){return ie(this,c.MEDIA_DURATION)}set mediaDuration(e){ue(this,c.MEDIA_DURATION,e)}get mediaCurrentTime(){return ie(this,c.MEDIA_CURRENT_TIME)}set mediaCurrentTime(e){ue(this,c.MEDIA_CURRENT_TIME,e)}get mediaPlaybackRate(){return ie(this,c.MEDIA_PLAYBACK_RATE,1)}set mediaPlaybackRate(e){ue(this,c.MEDIA_PLAYBACK_RATE,e)}get mediaBuffered(){const e=this.getAttribute(c.MEDIA_BUFFERED);return e?e.split(" ").map(i=>i.split(":").map(a=>+a)):[]}set mediaBuffered(e){if(!e){this.removeAttribute(c.MEDIA_BUFFERED);return}const i=e.map(a=>a.join(":")).join(" ");this.setAttribute(c.MEDIA_BUFFERED,i)}get mediaSeekable(){const e=this.getAttribute(c.MEDIA_SEEKABLE);if(e)return e.split(":").map(i=>+i)}set mediaSeekable(e){if(e==null){this.removeAttribute(c.MEDIA_SEEKABLE);return}this.setAttribute(c.MEDIA_SEEKABLE,e.join(":"))}get mediaSeekableEnd(){var e;const[,i=this.mediaDuration]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaSeekableStart(){var e;const[i=0]=(e=this.mediaSeekable)!=null?e:[];return i}get mediaPreviewImage(){return ae(this,c.MEDIA_PREVIEW_IMAGE)}set mediaPreviewImage(e){re(this,c.MEDIA_PREVIEW_IMAGE,e)}get mediaPreviewTime(){return ie(this,c.MEDIA_PREVIEW_TIME)}set mediaPreviewTime(e){ue(this,c.MEDIA_PREVIEW_TIME,e)}get mediaEnded(){return W(this,c.MEDIA_ENDED)}set mediaEnded(e){F(this,c.MEDIA_ENDED,e)}updateBar(){super.updateBar(),this.updateBufferedBar(),this.updateCurrentBox()}updateBufferedBar(){var e;const i=this.mediaBuffered;if(!i.length)return;let a;if(this.mediaEnded)a=1;else{const n=this.mediaCurrentTime,[,s=this.mediaSeekableStart]=(e=i.find(([o,l])=>o<=n&&n<=l))!=null?e:[];a=$n(this,s)}const{style:r}=ye(this.shadowRoot,"#buffered");r.setProperty("width",`${a*100}%`)}updateCurrentBox(){if(!this.shadowRoot.querySelector('slot[name="current"]').assignedElements().length)return;const i=ye(this.shadowRoot,"#current-rail"),a=ye(this.shadowRoot,'[part~="current-box"]'),r=Ne(this,po,Mu).call(this,ce(this,Ss)),n=Ne(this,vo,xu).call(this,r,this.range.valueAsNumber),s=Ne(this,fo,Ou).call(this,r,this.range.valueAsNumber);i.style.transform=`translateX(${n})`,i.style.setProperty("--_range-width",`${r.range.width}`),a.style.setProperty("--_box-shift",`${s}`),a.style.setProperty("--_box-width",`${r.box.width}px`),a.style.setProperty("visibility","initial")}handleEvent(e){switch(super.handleEvent(e),e.type){case"input":Ne(this,nd,sv).call(this);break;case"pointermove":Ne(this,rd,nv).call(this,e);break;case"pointerup":ce(this,Ra)&&it(this,Ra,!1);break;case"pointerdown":it(this,Ra,!0);break;case"pointerleave":Ne(this,vn,Eo).call(this,null);break;case"transitionstart":si(e.target,this)&&setTimeout(()=>Ne(this,Ca,Hr).call(this),0);break}}}wa=new WeakMap;Xi=new WeakMap;ho=new WeakMap;Xr=new WeakMap;mo=new WeakMap;Ss=new WeakMap;mn=new WeakMap;pn=new WeakMap;Ia=new WeakMap;Ra=new WeakMap;Ca=new WeakSet;Hr=function(){Ne(this,Du,rv).call(this)?ce(this,Xi).start():ce(this,Xi).stop()};Du=new WeakSet;rv=function(){return this.isConnected&&!this.mediaPaused&&!this.mediaLoading&&!this.mediaEnded&&this.mediaSeekableEnd>0&&lp(this)};ad=new WeakMap;po=new WeakSet;Mu=function(t){var e;const a=((e=this.getAttribute("bounds")?nr(this,`#${this.getAttribute("bounds")}`):this.parentElement)!=null?e:this).getBoundingClientRect(),r=this.range.getBoundingClientRect(),n=t.offsetWidth,s=-(r.left-a.left-n/2),o=a.right-r.left-n/2;return{box:{width:n,min:s,max:o},bounds:a,range:r}};vo=new WeakSet;xu=function(t,e){let i=`${e*100}%`;const{width:a,min:r,max:n}=t.box;if(!a)return i;if(Number.isNaN(r)||(i=`max(${`calc(1 / var(--_range-width) * 100 * ${r}% + var(--media-box-padding-left))`}, ${i})`),!Number.isNaN(n)){const o=`calc(1 / var(--_range-width) * 100 * ${n}% - var(--media-box-padding-right))`;i=`min(${i}, ${o})`}return i};fo=new WeakSet;Ou=function(t,e){const{width:i,min:a,max:r}=t.box,n=e*t.range.width;if(n<a+ce(this,mn)){const s=t.range.left-t.bounds.left-ce(this,mn);return`${n-i/2+s}px`}if(n>r-ce(this,pn)){const s=t.bounds.right-t.range.right-ce(this,pn);return`${n+i/2-s-t.range.width}px`}return 0};rd=new WeakSet;nv=function(t){const e=[...ce(this,ho)].some(m=>t.composedPath().includes(m));if(!this.dragging&&(e||!t.composedPath().includes(this))){Ne(this,vn,Eo).call(this,null);return}const i=this.mediaSeekableEnd;if(!i)return;const a=ye(this.shadowRoot,"#preview-rail"),r=ye(this.shadowRoot,'[part~="preview-box"]'),n=Ne(this,po,Mu).call(this,ce(this,mo));let s=(t.clientX-n.range.left)/n.range.width;s=Math.max(0,Math.min(1,s));const o=Ne(this,vo,xu).call(this,n,s),l=Ne(this,fo,Ou).call(this,n,s);a.style.transform=`translateX(${o})`,a.style.setProperty("--_range-width",`${n.range.width}`),r.style.setProperty("--_box-shift",`${l}`),r.style.setProperty("--_box-width",`${n.box.width}px`);const d=Math.round(ce(this,Xr))-Math.round(s*i);Math.abs(d)<1&&s>.01&&s<.99||(it(this,Xr,s*i),Ne(this,vn,Eo).call(this,ce(this,Xr)))};vn=new WeakSet;Eo=function(t){this.dispatchEvent(new f.CustomEvent(I.MEDIA_PREVIEW_REQUEST,{composed:!0,bubbles:!0,detail:t}))};nd=new WeakSet;sv=function(){ce(this,Xi).stop();const t=ov(this);this.dispatchEvent(new f.CustomEvent(I.MEDIA_SEEK_REQUEST,{composed:!0,bubbles:!0,detail:t}))};Nu.shadowRootOptions={mode:"open"};Nu.getContainerTemplateHTML=ly;f.customElements.get("media-time-range")||f.customElements.define("media-time-range",Nu);const dy=1,uy=t=>t.mediaMuted?0:t.mediaVolume,cy=t=>`${Math.round(t*100)}%`;class hy extends or{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_VOLUME,c.MEDIA_MUTED,c.MEDIA_VOLUME_UNAVAILABLE]}constructor(){super(),this.range.addEventListener("input",()=>{const e=this.range.value,i=new f.CustomEvent(I.MEDIA_VOLUME_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)})}connectedCallback(){super.connectedCallback(),this.range.setAttribute("aria-label",L("volume"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),(e===c.MEDIA_VOLUME||e===c.MEDIA_MUTED)&&(this.range.valueAsNumber=uy(this),this.range.setAttribute("aria-valuetext",cy(this.range.valueAsNumber)),this.updateBar())}get mediaVolume(){return ie(this,c.MEDIA_VOLUME,dy)}set mediaVolume(e){ue(this,c.MEDIA_VOLUME,e)}get mediaMuted(){return W(this,c.MEDIA_MUTED)}set mediaMuted(e){F(this,c.MEDIA_MUTED,e)}get mediaVolumeUnavailable(){return ae(this,c.MEDIA_VOLUME_UNAVAILABLE)}set mediaVolumeUnavailable(e){re(this,c.MEDIA_VOLUME_UNAVAILABLE,e)}}f.customElements.get("media-volume-range")||f.customElements.define("media-volume-range",hy);function my(t){return`
1438
1438
  <style>
1439
1439
  :host {
1440
1440
  min-width: 4ch;
@@ -1463,7 +1463,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1463
1463
  <path d="m10 15.17 9.193-9.191 1.414 1.414-10.606 10.606-6.364-6.364 1.414-1.414 4.95 4.95Z"/>
1464
1464
  </svg>
1465
1465
  </div>
1466
- `}function py(){return L("Loop")}class Pu extends Ce{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=((e=this.shadowRoot)==null?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=L("Loop"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return W(this,c.MEDIA_LOOP)}set mediaLoop(e){F(this,c.MEDIA_LOOP,e)}handleClick(){const e=!this.mediaLoop,i=new f.CustomEvent(I.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}}Pu.getSlotTemplateHTML=my;Pu.getTooltipContentHTML=py;f.customElements.get("media-loop-button")||f.customElements.define("media-loop-button",Pu);var lv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},H=(t,e,i)=>(lv(t,e,"read from private field"),i?i.call(t):e.get(t)),Ht=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ei=(t,e,i,a)=>(lv(t,e,"write to private field"),e.set(t,i),i),La,Ss,Pi,Hr,vi,fi,Ei,Ui,Da,ws,pt;const Th=1,Ah=0,vy=1,fy={processCallback(t,e,i){if(i){for(const[a,r]of e)if(a in i){const n=i[a];typeof n=="boolean"&&r instanceof gt&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof gt?r.element[r.attributeName]=n:r.value=n}}}};class Vo extends f.DocumentFragment{constructor(e,i,a=fy){var r;super(),Ht(this,La,void 0),Ht(this,Ss,void 0),this.append(e.content.cloneNode(!0)),ei(this,La,dv(this)),ei(this,Ss,a),(r=a.createCallback)==null||r.call(a,this,H(this,La),i),a.processCallback(this,H(this,La),i)}update(e){H(this,Ss).processCallback(this,H(this,La),e)}}La=new WeakMap;Ss=new WeakMap;const dv=(t,e=[])=>{let i,a;for(const r of t.attributes||[])if(r.value.includes("{{")){const n=new _y;for([i,a]of Sh(r.value))if(!i)n.append(a);else{const s=new gt(t,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(const r of t.childNodes)if(r.nodeType===Th&&!(r instanceof HTMLTemplateElement))dv(r,e);else{const n=r.data;if(r.nodeType===Th||n.includes("{{")){const s=[];if(n)for([i,a]of Sh(n))if(!i)s.push(new Text(a));else{const o=new or(t);s.push(o),e.push([a,o])}else if(r instanceof HTMLTemplateElement){const o=new hv(t,r);s.push(o),e.push([o.expression,o])}r.replaceWith(...s.flatMap(o=>o.replacementNodes||[o]))}}return e},kh={},Sh=t=>{let e="",i=0,a=kh[t],r=0,n;if(a)return a;for(a=[];n=t[r];r++)n==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([Ah,e]),e="",r++):n==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([vy,e.trim()]),e="",r++):e+=n||"";return e&&a.push([Ah,(i>0?"{{":"")+e]),kh[t]=a},Ey=11;class uv{get value(){return""}set value(e){}toString(){return this.value}}const cv=new WeakMap;class _y{constructor(){Ht(this,Pi,[])}[Symbol.iterator](){return H(this,Pi).values()}get length(){return H(this,Pi).length}item(e){return H(this,Pi)[e]}append(...e){for(const i of e)i instanceof gt&&cv.set(i,this),H(this,Pi).push(i)}toString(){return H(this,Pi).join("")}}Pi=new WeakMap;class gt extends uv{constructor(e,i,a){super(),Ht(this,Ui),Ht(this,Hr,""),Ht(this,vi,void 0),Ht(this,fi,void 0),Ht(this,Ei,void 0),ei(this,vi,e),ei(this,fi,i),ei(this,Ei,a)}get attributeName(){return H(this,fi)}get attributeNamespace(){return H(this,Ei)}get element(){return H(this,vi)}get value(){return H(this,Hr)}set value(e){H(this,Hr)!==e&&(ei(this,Hr,e),!H(this,Ui,Da)||H(this,Ui,Da).length===1?e==null?H(this,vi).removeAttributeNS(H(this,Ei),H(this,fi)):H(this,vi).setAttributeNS(H(this,Ei),H(this,fi),e):H(this,vi).setAttributeNS(H(this,Ei),H(this,fi),H(this,Ui,Da).toString()))}get booleanValue(){return H(this,vi).hasAttributeNS(H(this,Ei),H(this,fi))}set booleanValue(e){if(!H(this,Ui,Da)||H(this,Ui,Da).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}}Hr=new WeakMap;vi=new WeakMap;fi=new WeakMap;Ei=new WeakMap;Ui=new WeakSet;Da=function(){return cv.get(this)};class or extends uv{constructor(e,i){super(),Ht(this,ws,void 0),Ht(this,pt,void 0),ei(this,ws,e),ei(this,pt,i?[...i]:[new Text])}get replacementNodes(){return H(this,pt)}get parentNode(){return H(this,ws)}get nextSibling(){return H(this,pt)[H(this,pt).length-1].nextSibling}get previousSibling(){return H(this,pt)[0].previousSibling}get value(){return H(this,pt).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){const i=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===Ey?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),ei(this,pt,by(H(this,pt)[0].parentNode,H(this,pt),i,this.nextSibling))}}ws=new WeakMap;pt=new WeakMap;class hv extends or{constructor(e,i){const a=i.getAttribute("directive")||i.getAttribute("type");let r=i.getAttribute("expression")||i.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),this.expression=r,this.template=i,this.directive=a}}function by(t,e,i,a=null){let r=0,n,s,o,l=i.length,d=e.length;for(;r<l&&r<d&&e[r]==i[r];)r++;for(;r<l&&r<d&&i[l-1]==e[d-1];)a=i[--d,--l];if(r==d)for(;r<l;)t.insertBefore(i[r++],a);if(r==l)for(;r<d;)t.removeChild(e[r++]);else{for(n=e[r];r<l;)o=i[r++],s=n?n.nextSibling:a,n==o?n=s:r<l&&i[r]==s?(t.replaceChild(o,n),n=s):t.insertBefore(o,n);for(;n!=a;)s=n.nextSibling,t.removeChild(n),n=s}return i}const wh={string:t=>String(t)};class mv{constructor(e){this.template=e,this.state=void 0}}const Yi=new WeakMap,Gi=new WeakMap,sd={partial:(t,e)=>{e[t.expression]=new mv(t.template)},if:(t,e)=>{var i;if(pv(t.expression,e))if(Yi.get(t)!==t.template){Yi.set(t,t.template);const a=new Vo(t.template,e,Uu);t.replace(a),Gi.set(t,a)}else(i=Gi.get(t))==null||i.update(e);else t.replace(""),Yi.delete(t),Gi.delete(t)}},gy=Object.keys(sd),Uu={processCallback(t,e,i){var a,r;if(i)for(const[n,s]of e){if(s instanceof hv){if(!s.directive){const l=gy.find(d=>s.template.hasAttribute(d));l&&(s.directive=l,s.expression=s.template.getAttribute(l))}(a=sd[s.directive])==null||a.call(sd,s,i);continue}let o=pv(n,i);if(o instanceof mv){Yi.get(s)!==o.template?(Yi.set(s,o.template),o=new Vo(o.template,o.state,Uu),s.value=o,Gi.set(s,o)):(r=Gi.get(s))==null||r.update(o.state);continue}o?(s instanceof gt&&s.attributeName.startsWith("aria-")&&(o=String(o)),s instanceof gt?typeof o=="boolean"?s.booleanValue=o:typeof o=="function"?s.element[s.attributeName]=o:s.value=o:(s.value=o,Yi.delete(s),Gi.delete(s))):s instanceof gt?s.value=void 0:(s.value=void 0,Yi.delete(s),Gi.delete(s))}}},Ih={"!":t=>!t,"!!":t=>!!t,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"??":(t,e)=>t??e,"|":(t,e)=>{var i;return(i=wh[e])==null?void 0:i.call(wh,t)}};function yy(t){return Ty(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function pv(t,e={}){var i,a,r,n,s,o,l;const d=yy(t);if(d.length===0||d.some(({type:m})=>!m))return fr(t);if(((i=d[0])==null?void 0:i.token)===">"){const m=e[(a=d[1])==null?void 0:a.token];if(!m)return fr(t);const p={...e};m.state=p;const h=d.slice(2);for(let u=0;u<h.length;u+=3){const v=(r=h[u])==null?void 0:r.token,E=(n=h[u+1])==null?void 0:n.token,g=(s=h[u+2])==null?void 0:s.token;v&&E==="="&&(p[v]=Er(g,e))}return m}if(d.length===1)return $n(d[0])?Er(d[0].token,e):fr(t);if(d.length===2){const m=(o=d[0])==null?void 0:o.token,p=Ih[m];if(!p||!$n(d[1]))return fr(t);const h=Er(d[1].token,e);return p(h)}if(d.length===3){const m=(l=d[1])==null?void 0:l.token,p=Ih[m];if(!p||!$n(d[0])||!$n(d[2]))return fr(t);const h=Er(d[0].token,e);if(m==="|")return p(h,d[2].token);const u=Er(d[2].token,e);return p(h,u)}}function fr(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function $n({type:t}){return["number","boolean","string","param"].includes(t)}function Er(t,e){const i=t[0],a=t.slice(-1);return t==="true"||t==="false"?t==="true":i===a&&["'",'"'].includes(i)?t.slice(1,-1):Xm(t)?parseFloat(t):e[t]}function Ty(t,e){let i,a,r;const n=[];for(;t;){r=null,i=t.length;for(const s in e)a=e[s].exec(t),a&&a.index<i&&(r={token:a[0],type:s,matches:a.slice(1)},i=a.index);i&&n.push({token:t.substr(0,i),type:void 0}),r&&n.push(r),t=t.substr(i+(r?r.token.length:0))}return n}var $u=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},od=(t,e,i)=>($u(t,e,"read from private field"),i?i.call(t):e.get(t)),_r=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Qi=(t,e,i,a)=>($u(t,e,"write to private field"),e.set(t,i),i),ml=(t,e,i)=>($u(t,e,"access private method"),i),qa,Is,Ya,ld,vv,Rs,dd;const pl={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},fv=_e.createElement("template");fv.innerHTML=`
1466
+ `}function py(){return L("Loop")}class Pu extends Ce{constructor(){super(...arguments),this.container=null}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_LOOP]}connectedCallback(){var e;super.connectedCallback(),this.container=((e=this.shadowRoot)==null?void 0:e.querySelector("#icon"))||null,this.container&&(this.container.textContent=L("Loop"))}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_LOOP&&this.container&&this.setAttribute("aria-checked",this.mediaLoop?"true":"false")}get mediaLoop(){return W(this,c.MEDIA_LOOP)}set mediaLoop(e){F(this,c.MEDIA_LOOP,e)}handleClick(){const e=!this.mediaLoop,i=new f.CustomEvent(I.MEDIA_LOOP_REQUEST,{composed:!0,bubbles:!0,detail:e});this.dispatchEvent(i)}}Pu.getSlotTemplateHTML=my;Pu.getTooltipContentHTML=py;f.customElements.get("media-loop-button")||f.customElements.define("media-loop-button",Pu);var lv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},H=(t,e,i)=>(lv(t,e,"read from private field"),i?i.call(t):e.get(t)),Ht=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ei=(t,e,i,a)=>(lv(t,e,"write to private field"),e.set(t,i),i),La,ws,Pi,Br,vi,fi,Ei,Ui,Da,Is,pt;const Th=1,Ah=0,vy=1,fy={processCallback(t,e,i){if(i){for(const[a,r]of e)if(a in i){const n=i[a];typeof n=="boolean"&&r instanceof gt&&typeof r.element[r.attributeName]=="boolean"?r.booleanValue=n:typeof n=="function"&&r instanceof gt?r.element[r.attributeName]=n:r.value=n}}}};class Vo extends f.DocumentFragment{constructor(e,i,a=fy){var r;super(),Ht(this,La,void 0),Ht(this,ws,void 0),this.append(e.content.cloneNode(!0)),ei(this,La,dv(this)),ei(this,ws,a),(r=a.createCallback)==null||r.call(a,this,H(this,La),i),a.processCallback(this,H(this,La),i)}update(e){H(this,ws).processCallback(this,H(this,La),e)}}La=new WeakMap;ws=new WeakMap;const dv=(t,e=[])=>{let i,a;for(const r of t.attributes||[])if(r.value.includes("{{")){const n=new _y;for([i,a]of Sh(r.value))if(!i)n.append(a);else{const s=new gt(t,r.name,r.namespaceURI);n.append(s),e.push([a,s])}r.value=n.toString()}for(const r of t.childNodes)if(r.nodeType===Th&&!(r instanceof HTMLTemplateElement))dv(r,e);else{const n=r.data;if(r.nodeType===Th||n.includes("{{")){const s=[];if(n)for([i,a]of Sh(n))if(!i)s.push(new Text(a));else{const o=new lr(t);s.push(o),e.push([a,o])}else if(r instanceof HTMLTemplateElement){const o=new hv(t,r);s.push(o),e.push([o.expression,o])}r.replaceWith(...s.flatMap(o=>o.replacementNodes||[o]))}}return e},kh={},Sh=t=>{let e="",i=0,a=kh[t],r=0,n;if(a)return a;for(a=[];n=t[r];r++)n==="{"&&t[r+1]==="{"&&t[r-1]!=="\\"&&t[r+2]&&++i==1?(e&&a.push([Ah,e]),e="",r++):n==="}"&&t[r+1]==="}"&&t[r-1]!=="\\"&&!--i?(a.push([vy,e.trim()]),e="",r++):e+=n||"";return e&&a.push([Ah,(i>0?"{{":"")+e]),kh[t]=a},Ey=11;class uv{get value(){return""}set value(e){}toString(){return this.value}}const cv=new WeakMap;class _y{constructor(){Ht(this,Pi,[])}[Symbol.iterator](){return H(this,Pi).values()}get length(){return H(this,Pi).length}item(e){return H(this,Pi)[e]}append(...e){for(const i of e)i instanceof gt&&cv.set(i,this),H(this,Pi).push(i)}toString(){return H(this,Pi).join("")}}Pi=new WeakMap;class gt extends uv{constructor(e,i,a){super(),Ht(this,Ui),Ht(this,Br,""),Ht(this,vi,void 0),Ht(this,fi,void 0),Ht(this,Ei,void 0),ei(this,vi,e),ei(this,fi,i),ei(this,Ei,a)}get attributeName(){return H(this,fi)}get attributeNamespace(){return H(this,Ei)}get element(){return H(this,vi)}get value(){return H(this,Br)}set value(e){H(this,Br)!==e&&(ei(this,Br,e),!H(this,Ui,Da)||H(this,Ui,Da).length===1?e==null?H(this,vi).removeAttributeNS(H(this,Ei),H(this,fi)):H(this,vi).setAttributeNS(H(this,Ei),H(this,fi),e):H(this,vi).setAttributeNS(H(this,Ei),H(this,fi),H(this,Ui,Da).toString()))}get booleanValue(){return H(this,vi).hasAttributeNS(H(this,Ei),H(this,fi))}set booleanValue(e){if(!H(this,Ui,Da)||H(this,Ui,Da).length===1)this.value=e?"":null;else throw new DOMException("Value is not fully templatized")}}Br=new WeakMap;vi=new WeakMap;fi=new WeakMap;Ei=new WeakMap;Ui=new WeakSet;Da=function(){return cv.get(this)};class lr extends uv{constructor(e,i){super(),Ht(this,Is,void 0),Ht(this,pt,void 0),ei(this,Is,e),ei(this,pt,i?[...i]:[new Text])}get replacementNodes(){return H(this,pt)}get parentNode(){return H(this,Is)}get nextSibling(){return H(this,pt)[H(this,pt).length-1].nextSibling}get previousSibling(){return H(this,pt)[0].previousSibling}get value(){return H(this,pt).map(e=>e.textContent).join("")}set value(e){this.replace(e)}replace(...e){const i=e.flat().flatMap(a=>a==null?[new Text]:a.forEach?[...a]:a.nodeType===Ey?[...a.childNodes]:a.nodeType?[a]:[new Text(a)]);i.length||i.push(new Text),ei(this,pt,by(H(this,pt)[0].parentNode,H(this,pt),i,this.nextSibling))}}Is=new WeakMap;pt=new WeakMap;class hv extends lr{constructor(e,i){const a=i.getAttribute("directive")||i.getAttribute("type");let r=i.getAttribute("expression")||i.getAttribute(a)||"";r.startsWith("{{")&&(r=r.trim().slice(2,-2).trim()),super(e),this.expression=r,this.template=i,this.directive=a}}function by(t,e,i,a=null){let r=0,n,s,o,l=i.length,d=e.length;for(;r<l&&r<d&&e[r]==i[r];)r++;for(;r<l&&r<d&&i[l-1]==e[d-1];)a=i[--d,--l];if(r==d)for(;r<l;)t.insertBefore(i[r++],a);if(r==l)for(;r<d;)t.removeChild(e[r++]);else{for(n=e[r];r<l;)o=i[r++],s=n?n.nextSibling:a,n==o?n=s:r<l&&i[r]==s?(t.replaceChild(o,n),n=s):t.insertBefore(o,n);for(;n!=a;)s=n.nextSibling,t.removeChild(n),n=s}return i}const wh={string:t=>String(t)};class mv{constructor(e){this.template=e,this.state=void 0}}const Yi=new WeakMap,Gi=new WeakMap,sd={partial:(t,e)=>{e[t.expression]=new mv(t.template)},if:(t,e)=>{var i;if(pv(t.expression,e))if(Yi.get(t)!==t.template){Yi.set(t,t.template);const a=new Vo(t.template,e,Uu);t.replace(a),Gi.set(t,a)}else(i=Gi.get(t))==null||i.update(e);else t.replace(""),Yi.delete(t),Gi.delete(t)}},gy=Object.keys(sd),Uu={processCallback(t,e,i){var a,r;if(i)for(const[n,s]of e){if(s instanceof hv){if(!s.directive){const l=gy.find(d=>s.template.hasAttribute(d));l&&(s.directive=l,s.expression=s.template.getAttribute(l))}(a=sd[s.directive])==null||a.call(sd,s,i);continue}let o=pv(n,i);if(o instanceof mv){Yi.get(s)!==o.template?(Yi.set(s,o.template),o=new Vo(o.template,o.state,Uu),s.value=o,Gi.set(s,o)):(r=Gi.get(s))==null||r.update(o.state);continue}o?(s instanceof gt&&s.attributeName.startsWith("aria-")&&(o=String(o)),s instanceof gt?typeof o=="boolean"?s.booleanValue=o:typeof o=="function"?s.element[s.attributeName]=o:s.value=o:(s.value=o,Yi.delete(s),Gi.delete(s))):s instanceof gt?s.value=void 0:(s.value=void 0,Yi.delete(s),Gi.delete(s))}}},Ih={"!":t=>!t,"!!":t=>!!t,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,">":(t,e)=>t>e,">=":(t,e)=>t>=e,"<":(t,e)=>t<e,"<=":(t,e)=>t<=e,"??":(t,e)=>t??e,"|":(t,e)=>{var i;return(i=wh[e])==null?void 0:i.call(wh,t)}};function yy(t){return Ty(t,{boolean:/true|false/,number:/-?\d+\.?\d*/,string:/(["'])((?:\\.|[^\\])*?)\1/,operator:/[!=><][=!]?|\?\?|\|/,ws:/\s+/,param:/[$a-z_][$\w]*/i}).filter(({type:e})=>e!=="ws")}function pv(t,e={}){var i,a,r,n,s,o,l;const d=yy(t);if(d.length===0||d.some(({type:m})=>!m))return Er(t);if(((i=d[0])==null?void 0:i.token)===">"){const m=e[(a=d[1])==null?void 0:a.token];if(!m)return Er(t);const p={...e};m.state=p;const h=d.slice(2);for(let u=0;u<h.length;u+=3){const v=(r=h[u])==null?void 0:r.token,E=(n=h[u+1])==null?void 0:n.token,g=(s=h[u+2])==null?void 0:s.token;v&&E==="="&&(p[v]=_r(g,e))}return m}if(d.length===1)return Hn(d[0])?_r(d[0].token,e):Er(t);if(d.length===2){const m=(o=d[0])==null?void 0:o.token,p=Ih[m];if(!p||!Hn(d[1]))return Er(t);const h=_r(d[1].token,e);return p(h)}if(d.length===3){const m=(l=d[1])==null?void 0:l.token,p=Ih[m];if(!p||!Hn(d[0])||!Hn(d[2]))return Er(t);const h=_r(d[0].token,e);if(m==="|")return p(h,d[2].token);const u=_r(d[2].token,e);return p(h,u)}}function Er(t){return console.warn(`Warning: invalid expression \`${t}\``),!1}function Hn({type:t}){return["number","boolean","string","param"].includes(t)}function _r(t,e){const i=t[0],a=t.slice(-1);return t==="true"||t==="false"?t==="true":i===a&&["'",'"'].includes(i)?t.slice(1,-1):Xm(t)?parseFloat(t):e[t]}function Ty(t,e){let i,a,r;const n=[];for(;t;){r=null,i=t.length;for(const s in e)a=e[s].exec(t),a&&a.index<i&&(r={token:a[0],type:s,matches:a.slice(1)},i=a.index);i&&n.push({token:t.substr(0,i),type:void 0}),r&&n.push(r),t=t.substr(i+(r?r.token.length:0))}return n}var $u=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},od=(t,e,i)=>($u(t,e,"read from private field"),i?i.call(t):e.get(t)),br=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Qi=(t,e,i,a)=>($u(t,e,"write to private field"),e.set(t,i),i),ml=(t,e,i)=>($u(t,e,"access private method"),i),qa,Rs,Ya,ld,vv,Cs,dd;const pl={mediatargetlivewindow:"targetlivewindow",mediastreamtype:"streamtype"},fv=_e.createElement("template");fv.innerHTML=`
1467
1467
  <style>
1468
1468
  :host {
1469
1469
  display: inline-block;
@@ -1490,7 +1490,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1490
1490
  display: none;
1491
1491
  }
1492
1492
  </style>
1493
- `;class qo extends f.HTMLElement{constructor(){super(),_r(this,ld),_r(this,Rs),_r(this,qa,void 0),_r(this,Is,void 0),_r(this,Ya,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());const e=new MutationObserver(i=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||i.some(r=>{const n=r.target;return n===this?!0:n.localName!=="media-controller"?!1:!!(pl[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(ri.BREAKPOINTS_COMPUTED,this.render),ml(this,ld,vv).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=od(this,qa))!=null?e:this.constructor.template}set template(e){if(e===null){this.removeAttribute("template");return}typeof e=="string"?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(Qi(this,qa,e),Qi(this,Ya,null),this.createRenderer())}get props(){var e,i,a;const r=[...Array.from((i=(e=this.mediaController)==null?void 0:e.attributes)!=null?i:[]).filter(({name:s})=>pl[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(const s of r){const o=(a=pl[s.name])!=null?a:Sg(s.name);let{value:l}=s;l!=null?(Xm(l)&&(l=parseFloat(l)),n[o]=l===""?!0:l):n[o]=!1}return n}attributeChangedCallback(e,i,a){e==="template"&&i!=a&&ml(this,Rs,dd).call(this)}connectedCallback(){ml(this,Rs,dd).call(this)}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==od(this,Is)&&(Qi(this,Is,this.template),this.renderer=new Vo(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(fv.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}}qa=new WeakMap;Is=new WeakMap;Ya=new WeakMap;ld=new WeakSet;vv=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}};Rs=new WeakSet;dd=function(){var t;const e=this.getAttribute("template");if(!e||e===od(this,Ya))return;const i=this.getRootNode(),a=(t=i?.getElementById)==null?void 0:t.call(i,e);if(a){Qi(this,Ya,e),Qi(this,qa,a),this.createRenderer();return}Ay(e)&&(Qi(this,Ya,e),ky(e).then(r=>{const n=_e.createElement("template");n.innerHTML=r,Qi(this,qa,n),this.createRenderer()}).catch(console.error))};qo.observedAttributes=["template"];qo.processor=Uu;function Ay(t){if(!/^(\/|\.\/|https?:\/\/)/.test(t))return!1;const e=/^https?:\/\//.test(t)?void 0:location.origin;try{new URL(t,e)}catch{return!1}return!0}async function ky(t){const e=await fetch(t);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}f.customElements.get("media-theme")||f.customElements.define("media-theme",qo);function Sy({anchor:t,floating:e,placement:i}){const a=wy({anchor:t,floating:e}),{x:r,y:n}=Ry(a,i);return{x:r,y:n}}function wy({anchor:t,floating:e}){return{anchor:Iy(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function Iy(t,e){var i;const a=t.getBoundingClientRect(),r=(i=e?.getBoundingClientRect())!=null?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}function Ry({anchor:t,floating:e},i){const a=Cy(i)==="x"?"y":"x",r=a==="y"?"height":"width",n=Ev(i),s=t.x+t.width/2-e.width/2,o=t.y+t.height/2-e.height/2,l=t[r]/2-e[r]/2;let d;switch(n){case"top":d={x:s,y:t.y-e.height};break;case"bottom":d={x:s,y:t.y+t.height};break;case"right":d={x:t.x+t.width,y:o};break;case"left":d={x:t.x-e.width,y:o};break;default:d={x:t.x,y:t.y}}switch(i.split("-")[1]){case"start":d[a]-=l;break;case"end":d[a]+=l;break}return d}function Ev(t){return t.split("-")[0]}function Cy(t){return["top","bottom"].includes(Ev(t))?"y":"x"}class Hu extends Event{constructor({action:e="auto",relatedTarget:i,...a}){super("invoke",a),this.action=e,this.relatedTarget=i}}class Ly extends Event{constructor({newState:e,oldState:i,...a}){super("toggle",a),this.newState=e,this.oldState=i}}var Bu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},q=(t,e,i)=>(Bu(t,e,"read from private field"),i?i.call(t):e.get(t)),Z=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Nt=(t,e,i,a)=>(Bu(t,e,"write to private field"),e.set(t,i),i),X=(t,e,i)=>(Bu(t,e,"access private method"),i),Pt,Ji,Si,Cs,Ls,ea,vn,ud,_v,_o,Wu,bo,Ds,cd,hd,bv,md,gv,pd,yv,Ga,Qa,za,fn,go,Fu,vd,Tv,Ku,Av,fd,kv,Vu,Sv,Ed,wv,_d,Iv,Xr,yo,bd,Rv,Jr,To,Ms,gd;function tr({type:t,text:e,value:i,checked:a}){const r=_e.createElement("media-chrome-menu-item");r.type=t,r.part.add("menu-item"),r.part.add(t),r.value=i,r.checked=a;const n=_e.createElement("span");return n.textContent=e,r.append(n),r}function ta(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if(i?.nodeName=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i=i.cloneNode(!0),i;const a=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return a?a.cloneNode(!0):""}function Dy(t){return`
1493
+ `;class qo extends f.HTMLElement{constructor(){super(),br(this,ld),br(this,Cs),br(this,qa,void 0),br(this,Rs,void 0),br(this,Ya,void 0),this.shadowRoot?this.renderRoot=this.shadowRoot:(this.renderRoot=this.attachShadow({mode:"open"}),this.createRenderer());const e=new MutationObserver(i=>{var a;this.mediaController&&!((a=this.mediaController)!=null&&a.breakpointsComputed)||i.some(r=>{const n=r.target;return n===this?!0:n.localName!=="media-controller"?!1:!!(pl[r.attributeName]||r.attributeName.startsWith("breakpoint"))})&&this.render()});e.observe(this,{attributes:!0}),e.observe(this.renderRoot,{attributes:!0,subtree:!0}),this.addEventListener(ri.BREAKPOINTS_COMPUTED,this.render),ml(this,ld,vv).call(this,"template")}get mediaController(){return this.renderRoot.querySelector("media-controller")}get template(){var e;return(e=od(this,qa))!=null?e:this.constructor.template}set template(e){if(e===null){this.removeAttribute("template");return}typeof e=="string"?this.setAttribute("template",e):e instanceof HTMLTemplateElement&&(Qi(this,qa,e),Qi(this,Ya,null),this.createRenderer())}get props(){var e,i,a;const r=[...Array.from((i=(e=this.mediaController)==null?void 0:e.attributes)!=null?i:[]).filter(({name:s})=>pl[s]||s.startsWith("breakpoint")),...Array.from(this.attributes)],n={};for(const s of r){const o=(a=pl[s.name])!=null?a:Sg(s.name);let{value:l}=s;l!=null?(Xm(l)&&(l=parseFloat(l)),n[o]=l===""?!0:l):n[o]=!1}return n}attributeChangedCallback(e,i,a){e==="template"&&i!=a&&ml(this,Cs,dd).call(this)}connectedCallback(){ml(this,Cs,dd).call(this)}createRenderer(){this.template instanceof HTMLTemplateElement&&this.template!==od(this,Rs)&&(Qi(this,Rs,this.template),this.renderer=new Vo(this.template,this.props,this.constructor.processor),this.renderRoot.textContent="",this.renderRoot.append(fv.content.cloneNode(!0),this.renderer))}render(){var e;(e=this.renderer)==null||e.update(this.props)}}qa=new WeakMap;Rs=new WeakMap;Ya=new WeakMap;ld=new WeakSet;vv=function(t){if(Object.prototype.hasOwnProperty.call(this,t)){const e=this[t];delete this[t],this[t]=e}};Cs=new WeakSet;dd=function(){var t;const e=this.getAttribute("template");if(!e||e===od(this,Ya))return;const i=this.getRootNode(),a=(t=i?.getElementById)==null?void 0:t.call(i,e);if(a){Qi(this,Ya,e),Qi(this,qa,a),this.createRenderer();return}Ay(e)&&(Qi(this,Ya,e),ky(e).then(r=>{const n=_e.createElement("template");n.innerHTML=r,Qi(this,qa,n),this.createRenderer()}).catch(console.error))};qo.observedAttributes=["template"];qo.processor=Uu;function Ay(t){if(!/^(\/|\.\/|https?:\/\/)/.test(t))return!1;const e=/^https?:\/\//.test(t)?void 0:location.origin;try{new URL(t,e)}catch{return!1}return!0}async function ky(t){const e=await fetch(t);if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);return e.text()}f.customElements.get("media-theme")||f.customElements.define("media-theme",qo);function Sy({anchor:t,floating:e,placement:i}){const a=wy({anchor:t,floating:e}),{x:r,y:n}=Ry(a,i);return{x:r,y:n}}function wy({anchor:t,floating:e}){return{anchor:Iy(t,e.offsetParent),floating:{x:0,y:0,width:e.offsetWidth,height:e.offsetHeight}}}function Iy(t,e){var i;const a=t.getBoundingClientRect(),r=(i=e?.getBoundingClientRect())!=null?i:{x:0,y:0};return{x:a.x-r.x,y:a.y-r.y,width:a.width,height:a.height}}function Ry({anchor:t,floating:e},i){const a=Cy(i)==="x"?"y":"x",r=a==="y"?"height":"width",n=Ev(i),s=t.x+t.width/2-e.width/2,o=t.y+t.height/2-e.height/2,l=t[r]/2-e[r]/2;let d;switch(n){case"top":d={x:s,y:t.y-e.height};break;case"bottom":d={x:s,y:t.y+t.height};break;case"right":d={x:t.x+t.width,y:o};break;case"left":d={x:t.x-e.width,y:o};break;default:d={x:t.x,y:t.y}}switch(i.split("-")[1]){case"start":d[a]-=l;break;case"end":d[a]+=l;break}return d}function Ev(t){return t.split("-")[0]}function Cy(t){return["top","bottom"].includes(Ev(t))?"y":"x"}class Hu extends Event{constructor({action:e="auto",relatedTarget:i,...a}){super("invoke",a),this.action=e,this.relatedTarget=i}}class Ly extends Event{constructor({newState:e,oldState:i,...a}){super("toggle",a),this.newState=e,this.oldState=i}}var Bu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},q=(t,e,i)=>(Bu(t,e,"read from private field"),i?i.call(t):e.get(t)),Z=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Nt=(t,e,i,a)=>(Bu(t,e,"write to private field"),e.set(t,i),i),X=(t,e,i)=>(Bu(t,e,"access private method"),i),Pt,Ji,Si,Ls,Ds,ea,fn,ud,_v,_o,Wu,bo,Ms,cd,hd,bv,md,gv,pd,yv,Ga,Qa,za,En,go,Fu,vd,Tv,Ku,Av,fd,kv,Vu,Sv,Ed,wv,_d,Iv,Jr,yo,bd,Rv,en,To,xs,gd;function ir({type:t,text:e,value:i,checked:a}){const r=_e.createElement("media-chrome-menu-item");r.type=t,r.part.add("menu-item"),r.part.add(t),r.value=i,r.checked=a;const n=_e.createElement("span");return n.textContent=e,r.append(n),r}function ta(t,e){let i=t.querySelector(`:scope > [slot="${e}"]`);if(i?.nodeName=="SLOT"&&(i=i.assignedElements({flatten:!0})[0]),i)return i=i.cloneNode(!0),i;const a=t.shadowRoot.querySelector(`[name="${e}"] > svg`);return a?a.cloneNode(!0):""}function Dy(t){return`
1494
1494
  <style>
1495
1495
  :host {
1496
1496
  font: var(--media-font,
@@ -1665,7 +1665,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1665
1665
  <slot></slot>
1666
1666
  </div>
1667
1667
  <slot name="checked-indicator" hidden></slot>
1668
- `}const Li={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"};class lt extends f.HTMLElement{constructor(){if(super(),Z(this,ud),Z(this,_o),Z(this,Ds),Z(this,hd),Z(this,md),Z(this,pd),Z(this,za),Z(this,go),Z(this,vd),Z(this,Ku),Z(this,fd),Z(this,Vu),Z(this,Ed),Z(this,_d),Z(this,Xr),Z(this,bd),Z(this,Jr),Z(this,Ms),Z(this,Pt,null),Z(this,Ji,null),Z(this,Si,null),Z(this,Cs,new Set),Z(this,Ls,void 0),Z(this,ea,!1),Z(this,vn,null),Z(this,bo,()=>{const e=q(this,Cs),i=new Set(this.items);for(const a of e)i.has(a)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:a}));for(const a of i)e.has(a)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:a}));Nt(this,Cs,i)}),Z(this,Ga,()=>{X(this,za,fn).call(this),X(this,go,Fu).call(this,!1)}),Z(this,Qa,()=>{X(this,za,fn).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),Nt(this,Ls,new MutationObserver(q(this,bo))),q(this,Ls).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[Li.DISABLED,Li.HIDDEN,Li.STYLE,Li.ANCHOR,Y.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":X(this,ud,_v).call(this,e);break;case"invoke":X(this,hd,bv).call(this,e);break;case"click":X(this,vd,Tv).call(this,e);break;case"toggle":X(this,fd,kv).call(this,e);break;case"focusout":X(this,Ed,wv).call(this,e);break;case"keydown":X(this,_d,Iv).call(this,e);break}}connectedCallback(){var e,i;Nt(this,vn,ru(this.shadowRoot,":host")),X(this,Ds,cd).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),Nt(this,Pt,Ol(this)),(i=(e=q(this,Pt))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(Xa(En(this),q(this,Ga)),Xa(this,q(this,Qa))),X(this,_o,Wu).call(this)}disconnectedCallback(){var e,i;Ja(En(this),q(this,Ga)),Ja(this,q(this,Qa)),this.disable(),(i=(e=q(this,Pt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Nt(this,Pt,null)}attributeChangedCallback(e,i,a){var r,n,s,o;e===Li.HIDDEN&&a!==i?(q(this,ea)||Nt(this,ea,!0),this.hidden?X(this,pd,yv).call(this):X(this,md,gv).call(this),this.dispatchEvent(new Ly({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===Y.MEDIA_CONTROLLER?(i&&((n=(r=q(this,Pt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Nt(this,Pt,null)),a&&this.isConnected&&(Nt(this,Pt,Ol(this)),(o=(s=q(this,Pt))==null?void 0:s.associateElement)==null||o.call(s,this))):e===Li.DISABLED&&a!==i?a==null?this.enable():this.disable():e===Li.STYLE&&a!==i&&X(this,Ds,cd).call(this)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=xo(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(My)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return(i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){const i=this.items.find(a=>a.value===e);i&&X(this,Ms,gd).call(this,i)}focus(){if(Nt(this,Ji,au()),this.items.length){X(this,Jr,To).call(this,this.items[0]),this.items[0].focus();return}const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e?.focus()}handleSelect(e){var i;const a=X(this,Xr,yo).call(this,e);a&&(X(this,Ms,gd).call(this,a,a.type==="checkbox"),q(this,Si)&&!this.hidden&&((i=q(this,Ji))==null||i.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,a;const{key:r}=e,n=this.items,s=(a=(i=X(this,Xr,yo).call(this,e))!=null?i:X(this,bd,Rv).call(this))!=null?a:n[0],o=n.indexOf(s);let l=Math.max(0,o);r==="ArrowDown"?l++:r==="ArrowUp"?l--:e.key==="Home"?l=0:e.key==="End"&&(l=n.length-1),l<0&&(l=n.length-1),l>n.length-1&&(l=0),X(this,Jr,To).call(this,n[l]),n[l].focus()}}Pt=new WeakMap;Ji=new WeakMap;Si=new WeakMap;Cs=new WeakMap;Ls=new WeakMap;ea=new WeakMap;vn=new WeakMap;ud=new WeakSet;_v=function(t){const e=t.target;for(const i of e.assignedNodes({flatten:!0}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&X(this,_o,Wu).call(this),e.name||q(this,bo).call(this)};_o=new WeakSet;Wu=function(){const t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0};bo=new WeakMap;Ds=new WeakSet;cd=function(){var t;const e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0")};hd=new WeakSet;bv=function(t){Nt(this,Si,t.relatedTarget),si(this,t.relatedTarget)||(this.hidden=!this.hidden)};md=new WeakSet;gv=function(){var t;(t=q(this,Si))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),Xa(En(this),q(this,Ga)),Xa(this,q(this,Qa))};pd=new WeakSet;yv=function(){var t;(t=q(this,Si))==null||t.setAttribute("aria-expanded","false"),Ja(En(this),q(this,Ga)),Ja(this,q(this,Qa))};Ga=new WeakMap;Qa=new WeakMap;za=new WeakSet;fn=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;const{x:e,y:i}=Sy({anchor:this.anchorElement,floating:this,placement:"top-start"});t??(t=this.offsetWidth);const r=En(this).getBoundingClientRect(),n=r.width-e-t,s=r.height-i-this.offsetHeight,{style:o}=q(this,vn);o.setProperty("position","absolute"),o.setProperty("right",`${Math.max(0,n)}px`),o.setProperty("--_menu-bottom",`${s}px`);const l=getComputedStyle(this),m=o.getPropertyValue("--_menu-bottom")===l.bottom?s:parseFloat(l.bottom),p=r.height-m-parseFloat(l.marginBottom);this.style.setProperty("--_menu-max-height",`${p}px`)};go=new WeakSet;Fu=function(t){const e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e?.querySelector('[role="menu"]'),{style:a}=q(this,vn);if(t||a.setProperty("--media-menu-transition-in","none"),i){const r=i.offsetHeight,n=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${n}px`),this.style.setProperty("min-height",`${r}px`),X(this,za,fn).call(this,n)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),X(this,za,fn).call(this);a.removeProperty("--media-menu-transition-in")};vd=new WeakSet;Tv=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(q(this,Ku,Av))){(e=q(this,Ji))==null||e.focus(),this.hidden=!0;return}const i=X(this,Xr,yo).call(this,t);!i||i.hasAttribute("disabled")||(X(this,Jr,To).call(this,i),this.handleSelect(t))};Ku=new WeakSet;Av=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};fd=new WeakSet;kv=function(t){if(t.target===this)return;X(this,Vu,Sv).call(this);const e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(const i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new Hu({relatedTarget:i}));for(const i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);X(this,go,Fu).call(this,!0)};Vu=new WeakSet;Sv=function(){const e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)};Ed=new WeakSet;wv=function(t){var e;si(this,t.relatedTarget)||(q(this,ea)&&((e=q(this,Ji))==null||e.focus()),q(this,Si)&&q(this,Si)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};_d=new WeakSet;Iv=function(t){var e,i,a,r,n;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=t;if(!(o||l||d)&&this.keysUsed.includes(s))if(t.preventDefault(),t.stopPropagation(),s==="Tab"){if(q(this,ea)){this.hidden=!0;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()}else s==="Escape"?((n=q(this,Ji))==null||n.focus(),q(this,ea)&&(this.hidden=!0)):s==="Enter"||s===" "?this.handleSelect(t):this.handleMove(t)};Xr=new WeakSet;yo=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};bd=new WeakSet;Rv=function(){return this.items.find(t=>t.tabIndex===0)};Jr=new WeakSet;To=function(t){for(const e of this.items)e.tabIndex=e===t?0:-1};Ms=new WeakSet;gd=function(t,e){const i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(a=>a.checked=!1),e?t.checked=!t.checked:t.checked=!0,this.checkedItems.some((a,r)=>a!=i[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};lt.shadowRootOptions={mode:"open"};lt.getTemplateHTML=Dy;function My(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t?.role)}function En(t){var e;return(e=t.getAttribute("bounds")?rr(t,`#${t.getAttribute("bounds")}`):Be(t)||t.parentElement)!=null?e:t}f.customElements.get("media-chrome-menu")||f.customElements.define("media-chrome-menu",lt);var qu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ft=(t,e,i)=>(qu(t,e,"read from private field"),i?i.call(t):e.get(t)),zt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},vl=(t,e,i,a)=>(qu(t,e,"write to private field"),e.set(t,i),i),bt=(t,e,i)=>(qu(t,e,"access private method"),i),xs,en,yd,Cv,Ao,Yu,Gu,Lv,Kt,ir,_n,Td,Dv,Os,Ad;function xy(t){return`
1668
+ `}const Li={STYLE:"style",HIDDEN:"hidden",DISABLED:"disabled",ANCHOR:"anchor"};class lt extends f.HTMLElement{constructor(){if(super(),Z(this,ud),Z(this,_o),Z(this,Ms),Z(this,hd),Z(this,md),Z(this,pd),Z(this,za),Z(this,go),Z(this,vd),Z(this,Ku),Z(this,fd),Z(this,Vu),Z(this,Ed),Z(this,_d),Z(this,Jr),Z(this,bd),Z(this,en),Z(this,xs),Z(this,Pt,null),Z(this,Ji,null),Z(this,Si,null),Z(this,Ls,new Set),Z(this,Ds,void 0),Z(this,ea,!1),Z(this,fn,null),Z(this,bo,()=>{const e=q(this,Ls),i=new Set(this.items);for(const a of e)i.has(a)||this.dispatchEvent(new CustomEvent("removemenuitem",{detail:a}));for(const a of i)e.has(a)||this.dispatchEvent(new CustomEvent("addmenuitem",{detail:a}));Nt(this,Ls,i)}),Z(this,Ga,()=>{X(this,za,En).call(this),X(this,go,Fu).call(this,!1)}),Z(this,Qa,()=>{X(this,za,En).call(this)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.container=this.shadowRoot.querySelector("#container"),this.defaultSlot=this.shadowRoot.querySelector("slot:not([name])"),this.shadowRoot.addEventListener("slotchange",this),Nt(this,Ds,new MutationObserver(q(this,bo))),q(this,Ds).observe(this.defaultSlot,{childList:!0})}static get observedAttributes(){return[Li.DISABLED,Li.HIDDEN,Li.STYLE,Li.ANCHOR,Y.MEDIA_CONTROLLER]}static formatMenuItemText(e,i){return e}enable(){this.addEventListener("click",this),this.addEventListener("focusout",this),this.addEventListener("keydown",this),this.addEventListener("invoke",this),this.addEventListener("toggle",this)}disable(){this.removeEventListener("click",this),this.removeEventListener("focusout",this),this.removeEventListener("keyup",this),this.removeEventListener("invoke",this),this.removeEventListener("toggle",this)}handleEvent(e){switch(e.type){case"slotchange":X(this,ud,_v).call(this,e);break;case"invoke":X(this,hd,bv).call(this,e);break;case"click":X(this,vd,Tv).call(this,e);break;case"toggle":X(this,fd,kv).call(this,e);break;case"focusout":X(this,Ed,wv).call(this,e);break;case"keydown":X(this,_d,Iv).call(this,e);break}}connectedCallback(){var e,i;Nt(this,fn,ru(this.shadowRoot,":host")),X(this,Ms,cd).call(this),this.hasAttribute("disabled")||this.enable(),this.role||(this.role="menu"),Nt(this,Pt,Ol(this)),(i=(e=q(this,Pt))==null?void 0:e.associateElement)==null||i.call(e,this),this.hidden||(Ja(_n(this),q(this,Ga)),Ja(this,q(this,Qa))),X(this,_o,Wu).call(this)}disconnectedCallback(){var e,i;er(_n(this),q(this,Ga)),er(this,q(this,Qa)),this.disable(),(i=(e=q(this,Pt))==null?void 0:e.unassociateElement)==null||i.call(e,this),Nt(this,Pt,null)}attributeChangedCallback(e,i,a){var r,n,s,o;e===Li.HIDDEN&&a!==i?(q(this,ea)||Nt(this,ea,!0),this.hidden?X(this,pd,yv).call(this):X(this,md,gv).call(this),this.dispatchEvent(new Ly({oldState:this.hidden?"open":"closed",newState:this.hidden?"closed":"open",bubbles:!0}))):e===Y.MEDIA_CONTROLLER?(i&&((n=(r=q(this,Pt))==null?void 0:r.unassociateElement)==null||n.call(r,this),Nt(this,Pt,null)),a&&this.isConnected&&(Nt(this,Pt,Ol(this)),(o=(s=q(this,Pt))==null?void 0:s.associateElement)==null||o.call(s,this))):e===Li.DISABLED&&a!==i?a==null?this.enable():this.disable():e===Li.STYLE&&a!==i&&X(this,Ms,cd).call(this)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}get anchor(){return this.getAttribute("anchor")}set anchor(e){this.setAttribute("anchor",`${e}`)}get anchorElement(){var e;return this.anchor?(e=xo(this))==null?void 0:e.querySelector(`#${this.anchor}`):null}get items(){return this.defaultSlot.assignedElements({flatten:!0}).filter(My)}get radioGroupItems(){return this.items.filter(e=>e.role==="menuitemradio")}get checkedItems(){return this.items.filter(e=>e.checked)}get value(){var e,i;return(i=(e=this.checkedItems[0])==null?void 0:e.value)!=null?i:""}set value(e){const i=this.items.find(a=>a.value===e);i&&X(this,xs,gd).call(this,i)}focus(){if(Nt(this,Ji,au()),this.items.length){X(this,en,To).call(this,this.items[0]),this.items[0].focus();return}const e=this.querySelector('[autofocus], [tabindex]:not([tabindex="-1"]), [role="menu"]');e?.focus()}handleSelect(e){var i;const a=X(this,Jr,yo).call(this,e);a&&(X(this,xs,gd).call(this,a,a.type==="checkbox"),q(this,Si)&&!this.hidden&&((i=q(this,Ji))==null||i.focus(),this.hidden=!0))}get keysUsed(){return["Enter","Escape","Tab"," ","ArrowDown","ArrowUp","Home","End"]}handleMove(e){var i,a;const{key:r}=e,n=this.items,s=(a=(i=X(this,Jr,yo).call(this,e))!=null?i:X(this,bd,Rv).call(this))!=null?a:n[0],o=n.indexOf(s);let l=Math.max(0,o);r==="ArrowDown"?l++:r==="ArrowUp"?l--:e.key==="Home"?l=0:e.key==="End"&&(l=n.length-1),l<0&&(l=n.length-1),l>n.length-1&&(l=0),X(this,en,To).call(this,n[l]),n[l].focus()}}Pt=new WeakMap;Ji=new WeakMap;Si=new WeakMap;Ls=new WeakMap;Ds=new WeakMap;ea=new WeakMap;fn=new WeakMap;ud=new WeakSet;_v=function(t){const e=t.target;for(const i of e.assignedNodes({flatten:!0}))i.nodeType===3&&i.textContent.trim()===""&&i.remove();["header","title"].includes(e.name)&&X(this,_o,Wu).call(this),e.name||q(this,bo).call(this)};_o=new WeakSet;Wu=function(){const t=this.shadowRoot.querySelector('slot[name="header"]'),e=this.shadowRoot.querySelector('slot[name="title"]');t.hidden=e.assignedNodes().length===0&&t.assignedNodes().length===0};bo=new WeakMap;Ms=new WeakSet;cd=function(){var t;const e=this.shadowRoot.querySelector("#layout-row"),i=(t=getComputedStyle(this).getPropertyValue("--media-menu-layout"))==null?void 0:t.trim();e.setAttribute("media",i==="row"?"":"width:0")};hd=new WeakSet;bv=function(t){Nt(this,Si,t.relatedTarget),si(this,t.relatedTarget)||(this.hidden=!this.hidden)};md=new WeakSet;gv=function(){var t;(t=q(this,Si))==null||t.setAttribute("aria-expanded","true"),this.addEventListener("transitionend",()=>this.focus(),{once:!0}),Ja(_n(this),q(this,Ga)),Ja(this,q(this,Qa))};pd=new WeakSet;yv=function(){var t;(t=q(this,Si))==null||t.setAttribute("aria-expanded","false"),er(_n(this),q(this,Ga)),er(this,q(this,Qa))};Ga=new WeakMap;Qa=new WeakMap;za=new WeakSet;En=function(t){if(this.hasAttribute("mediacontroller")&&!this.anchor||this.hidden||!this.anchorElement)return;const{x:e,y:i}=Sy({anchor:this.anchorElement,floating:this,placement:"top-start"});t??(t=this.offsetWidth);const r=_n(this).getBoundingClientRect(),n=r.width-e-t,s=r.height-i-this.offsetHeight,{style:o}=q(this,fn);o.setProperty("position","absolute"),o.setProperty("right",`${Math.max(0,n)}px`),o.setProperty("--_menu-bottom",`${s}px`);const l=getComputedStyle(this),m=o.getPropertyValue("--_menu-bottom")===l.bottom?s:parseFloat(l.bottom),p=r.height-m-parseFloat(l.marginBottom);this.style.setProperty("--_menu-max-height",`${p}px`)};go=new WeakSet;Fu=function(t){const e=this.querySelector('[role="menuitem"][aria-haspopup][aria-expanded="true"]'),i=e?.querySelector('[role="menu"]'),{style:a}=q(this,fn);if(t||a.setProperty("--media-menu-transition-in","none"),i){const r=i.offsetHeight,n=Math.max(i.offsetWidth,e.offsetWidth);this.style.setProperty("min-width",`${n}px`),this.style.setProperty("min-height",`${r}px`),X(this,za,En).call(this,n)}else this.style.removeProperty("min-width"),this.style.removeProperty("min-height"),X(this,za,En).call(this);a.removeProperty("--media-menu-transition-in")};vd=new WeakSet;Tv=function(t){var e;if(t.stopPropagation(),t.composedPath().includes(q(this,Ku,Av))){(e=q(this,Ji))==null||e.focus(),this.hidden=!0;return}const i=X(this,Jr,yo).call(this,t);!i||i.hasAttribute("disabled")||(X(this,en,To).call(this,i),this.handleSelect(t))};Ku=new WeakSet;Av=function(){var t;return(t=this.shadowRoot.querySelector('slot[name="header"]').assignedElements({flatten:!0}))==null?void 0:t.find(i=>i.matches('button[part~="back"]'))};fd=new WeakSet;kv=function(t){if(t.target===this)return;X(this,Vu,Sv).call(this);const e=Array.from(this.querySelectorAll('[role="menuitem"][aria-haspopup]'));for(const i of e)i.invokeTargetElement!=t.target&&t.newState=="open"&&i.getAttribute("aria-expanded")=="true"&&!i.invokeTargetElement.hidden&&i.invokeTargetElement.dispatchEvent(new Hu({relatedTarget:i}));for(const i of e)i.setAttribute("aria-expanded",`${!i.submenuElement.hidden}`);X(this,go,Fu).call(this,!0)};Vu=new WeakSet;Sv=function(){const e=this.querySelector('[role="menuitem"] > [role="menu"]:not([hidden])');this.container.classList.toggle("has-expanded",!!e)};Ed=new WeakSet;wv=function(t){var e;si(this,t.relatedTarget)||(q(this,ea)&&((e=q(this,Ji))==null||e.focus()),q(this,Si)&&q(this,Si)!==t.relatedTarget&&!this.hidden&&(this.hidden=!0))};_d=new WeakSet;Iv=function(t){var e,i,a,r,n;const{key:s,ctrlKey:o,altKey:l,metaKey:d}=t;if(!(o||l||d)&&this.keysUsed.includes(s))if(t.preventDefault(),t.stopPropagation(),s==="Tab"){if(q(this,ea)){this.hidden=!0;return}t.shiftKey?(i=(e=this.previousElementSibling)==null?void 0:e.focus)==null||i.call(e):(r=(a=this.nextElementSibling)==null?void 0:a.focus)==null||r.call(a),this.blur()}else s==="Escape"?((n=q(this,Ji))==null||n.focus(),q(this,ea)&&(this.hidden=!0)):s==="Enter"||s===" "?this.handleSelect(t):this.handleMove(t)};Jr=new WeakSet;yo=function(t){return t.composedPath().find(e=>["menuitemradio","menuitemcheckbox"].includes(e.role))};bd=new WeakSet;Rv=function(){return this.items.find(t=>t.tabIndex===0)};en=new WeakSet;To=function(t){for(const e of this.items)e.tabIndex=e===t?0:-1};xs=new WeakSet;gd=function(t,e){const i=[...this.checkedItems];t.type==="radio"&&this.radioGroupItems.forEach(a=>a.checked=!1),e?t.checked=!t.checked:t.checked=!0,this.checkedItems.some((a,r)=>a!=i[r])&&this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))};lt.shadowRootOptions={mode:"open"};lt.getTemplateHTML=Dy;function My(t){return["menuitem","menuitemradio","menuitemcheckbox"].includes(t?.role)}function _n(t){var e;return(e=t.getAttribute("bounds")?nr(t,`#${t.getAttribute("bounds")}`):Be(t)||t.parentElement)!=null?e:t}f.customElements.get("media-chrome-menu")||f.customElements.define("media-chrome-menu",lt);var qu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ft=(t,e,i)=>(qu(t,e,"read from private field"),i?i.call(t):e.get(t)),zt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},vl=(t,e,i,a)=>(qu(t,e,"write to private field"),e.set(t,i),i),bt=(t,e,i)=>(qu(t,e,"access private method"),i),Os,tn,yd,Cv,Ao,Yu,Gu,Lv,Kt,ar,bn,Td,Dv,Ns,Ad;function xy(t){return`
1669
1669
  <style>
1670
1670
  :host {
1671
1671
  transition: var(--media-menu-item-transition,
@@ -1783,7 +1783,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1783
1783
  ${this.getSuffixSlotInnerHTML(t)}
1784
1784
  </slot>
1785
1785
  <slot name="submenu"></slot>
1786
- `}function Oy(t){return""}const tt={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"};class Ii extends f.HTMLElement{constructor(){if(super(),zt(this,yd),zt(this,Ao),zt(this,Gu),zt(this,ir),zt(this,Td),zt(this,Os),zt(this,xs,!1),zt(this,en,void 0),zt(this,Kt,()=>{var e,i;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const a=this.shadowRoot.querySelector('slot[name="description"]'),r=(e=this.submenuElement.checkedItems)==null?void 0:e[0],n=(i=r?.dataset.description)!=null?i:r?.text,s=_e.createElement("span");s.textContent=n??"",a.replaceChildren(s)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[tt.TYPE,tt.DISABLED,tt.CHECKED,tt.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),br(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":bt(this,yd,Cv).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":bt(this,Td,Dv).call(this,e);break;case"keyup":bt(this,ir,_n).call(this,e);break}}attributeChangedCallback(e,i,a){e===tt.CHECKED&&br(this)&&!Ft(this,xs)?this.setAttribute("aria-checked",a!=null?"true":"false"):e===tt.TYPE&&a!==i?this.role="menuitem"+a:e===tt.DISABLED&&a!==i&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(tt.DISABLED)||this.enable(),this.role="menuitem"+this.type,vl(this,en,kd(this,this.parentNode)),bt(this,Os,Ad).call(this),this.submenuElement&&bt(this,Ao,Yu).call(this)}disconnectedCallback(){this.disable(),bt(this,Os,Ad).call(this),vl(this,en,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=xo(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(tt.TYPE))!=null?e:""}set type(e){this.setAttribute(tt.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(tt.VALUE))!=null?e:this.text}set value(e){this.setAttribute(tt.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(br(this))return this.getAttribute("aria-checked")==="true"}set checked(e){br(this)&&(vl(this,xs,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){br(this)||this.invokeTargetElement&&si(this,e.target)&&this.invokeTargetElement.dispatchEvent(new Hu({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}xs=new WeakMap;en=new WeakMap;yd=new WeakSet;Cv=function(t){const e=t.target;if(!e?.name)for(const a of e.assignedNodes({flatten:!0}))a instanceof Text&&a.textContent.trim()===""&&a.remove();e.name==="submenu"&&(this.submenuElement?bt(this,Ao,Yu).call(this):bt(this,Gu,Lv).call(this))};Ao=new WeakSet;Yu=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",Ft(this,Kt)),this.submenuElement.addEventListener("addmenuitem",Ft(this,Kt)),this.submenuElement.addEventListener("removemenuitem",Ft(this,Kt)),Ft(this,Kt).call(this)};Gu=new WeakSet;Lv=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",Ft(this,Kt)),this.submenuElement.removeEventListener("addmenuitem",Ft(this,Kt)),this.submenuElement.removeEventListener("removemenuitem",Ft(this,Kt)),Ft(this,Kt).call(this)};Kt=new WeakMap;ir=new WeakSet;_n=function(t){const{key:e}=t;if(!this.keysUsed.includes(e)){this.removeEventListener("keyup",bt(this,ir,_n));return}this.handleClick(t)};Td=new WeakSet;Dv=function(t){const{metaKey:e,altKey:i,key:a}=t;if(e||i||!this.keysUsed.includes(a)){this.removeEventListener("keyup",bt(this,ir,_n));return}this.addEventListener("keyup",bt(this,ir,_n),{once:!0})};Os=new WeakSet;Ad=function(){var t;const e=(t=Ft(this,en))==null?void 0:t.radioGroupItems;if(!e)return;let i=e.filter(a=>a.getAttribute("aria-checked")==="true").pop();i||(i=e[0]);for(const a of e)a.setAttribute("aria-checked","false");i?.setAttribute("aria-checked","true")};Ii.shadowRootOptions={mode:"open"};Ii.getTemplateHTML=xy;Ii.getSuffixSlotInnerHTML=Oy;function br(t){return t.type==="radio"||t.type==="checkbox"}function kd(t,e){if(!t)return null;const{host:i}=t.getRootNode();return!e&&i?kd(t,i):e?.items?e:kd(e,e?.parentNode)}f.customElements.get("media-chrome-menu-item")||f.customElements.define("media-chrome-menu-item",Ii);function Ny(t){return`
1786
+ `}function Oy(t){return""}const tt={TYPE:"type",VALUE:"value",CHECKED:"checked",DISABLED:"disabled"};class Ii extends f.HTMLElement{constructor(){if(super(),zt(this,yd),zt(this,Ao),zt(this,Gu),zt(this,ar),zt(this,Td),zt(this,Ns),zt(this,Os,!1),zt(this,tn,void 0),zt(this,Kt,()=>{var e,i;this.submenuElement.items&&this.setAttribute("submenusize",`${this.submenuElement.items.length}`);const a=this.shadowRoot.querySelector('slot[name="description"]'),r=(e=this.submenuElement.checkedItems)==null?void 0:e[0],n=(i=r?.dataset.description)!=null?i:r?.text,s=_e.createElement("span");s.textContent=n??"",a.replaceChildren(s)}),!this.shadowRoot){this.attachShadow(this.constructor.shadowRootOptions);const e=Xe(this.attributes);this.shadowRoot.innerHTML=this.constructor.getTemplateHTML(e)}this.shadowRoot.addEventListener("slotchange",this)}static get observedAttributes(){return[tt.TYPE,tt.DISABLED,tt.CHECKED,tt.VALUE]}enable(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),gr(this)&&!this.hasAttribute("aria-checked")&&this.setAttribute("aria-checked","false"),this.addEventListener("click",this),this.addEventListener("keydown",this)}disable(){this.removeAttribute("tabindex"),this.removeEventListener("click",this),this.removeEventListener("keydown",this),this.removeEventListener("keyup",this)}handleEvent(e){switch(e.type){case"slotchange":bt(this,yd,Cv).call(this,e);break;case"click":this.handleClick(e);break;case"keydown":bt(this,Td,Dv).call(this,e);break;case"keyup":bt(this,ar,bn).call(this,e);break}}attributeChangedCallback(e,i,a){e===tt.CHECKED&&gr(this)&&!Ft(this,Os)?this.setAttribute("aria-checked",a!=null?"true":"false"):e===tt.TYPE&&a!==i?this.role="menuitem"+a:e===tt.DISABLED&&a!==i&&(a==null?this.enable():this.disable())}connectedCallback(){this.hasAttribute(tt.DISABLED)||this.enable(),this.role="menuitem"+this.type,vl(this,tn,kd(this,this.parentNode)),bt(this,Ns,Ad).call(this),this.submenuElement&&bt(this,Ao,Yu).call(this)}disconnectedCallback(){this.disable(),bt(this,Ns,Ad).call(this),vl(this,tn,null)}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=xo(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):this.submenuElement}get submenuElement(){return this.shadowRoot.querySelector('slot[name="submenu"]').assignedElements({flatten:!0})[0]}get type(){var e;return(e=this.getAttribute(tt.TYPE))!=null?e:""}set type(e){this.setAttribute(tt.TYPE,`${e}`)}get value(){var e;return(e=this.getAttribute(tt.VALUE))!=null?e:this.text}set value(e){this.setAttribute(tt.VALUE,e)}get text(){var e;return((e=this.textContent)!=null?e:"").trim()}get checked(){if(gr(this))return this.getAttribute("aria-checked")==="true"}set checked(e){gr(this)&&(vl(this,Os,!0),this.setAttribute("aria-checked",e?"true":"false"),e?this.part.add("checked"):this.part.remove("checked"))}handleClick(e){gr(this)||this.invokeTargetElement&&si(this,e.target)&&this.invokeTargetElement.dispatchEvent(new Hu({relatedTarget:this}))}get keysUsed(){return["Enter"," "]}}Os=new WeakMap;tn=new WeakMap;yd=new WeakSet;Cv=function(t){const e=t.target;if(!e?.name)for(const a of e.assignedNodes({flatten:!0}))a instanceof Text&&a.textContent.trim()===""&&a.remove();e.name==="submenu"&&(this.submenuElement?bt(this,Ao,Yu).call(this):bt(this,Gu,Lv).call(this))};Ao=new WeakSet;Yu=async function(){this.setAttribute("aria-haspopup","menu"),this.setAttribute("aria-expanded",`${!this.submenuElement.hidden}`),this.submenuElement.addEventListener("change",Ft(this,Kt)),this.submenuElement.addEventListener("addmenuitem",Ft(this,Kt)),this.submenuElement.addEventListener("removemenuitem",Ft(this,Kt)),Ft(this,Kt).call(this)};Gu=new WeakSet;Lv=function(){this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.submenuElement.removeEventListener("change",Ft(this,Kt)),this.submenuElement.removeEventListener("addmenuitem",Ft(this,Kt)),this.submenuElement.removeEventListener("removemenuitem",Ft(this,Kt)),Ft(this,Kt).call(this)};Kt=new WeakMap;ar=new WeakSet;bn=function(t){const{key:e}=t;if(!this.keysUsed.includes(e)){this.removeEventListener("keyup",bt(this,ar,bn));return}this.handleClick(t)};Td=new WeakSet;Dv=function(t){const{metaKey:e,altKey:i,key:a}=t;if(e||i||!this.keysUsed.includes(a)){this.removeEventListener("keyup",bt(this,ar,bn));return}this.addEventListener("keyup",bt(this,ar,bn),{once:!0})};Ns=new WeakSet;Ad=function(){var t;const e=(t=Ft(this,tn))==null?void 0:t.radioGroupItems;if(!e)return;let i=e.filter(a=>a.getAttribute("aria-checked")==="true").pop();i||(i=e[0]);for(const a of e)a.setAttribute("aria-checked","false");i?.setAttribute("aria-checked","true")};Ii.shadowRootOptions={mode:"open"};Ii.getTemplateHTML=xy;Ii.getSuffixSlotInnerHTML=Oy;function gr(t){return t.type==="radio"||t.type==="checkbox"}function kd(t,e){if(!t)return null;const{host:i}=t.getRootNode();return!e&&i?kd(t,i):e?.items?e:kd(e,e?.parentNode)}f.customElements.get("media-chrome-menu-item")||f.customElements.define("media-chrome-menu-item",Ii);function Ny(t){return`
1787
1787
  ${lt.getTemplateHTML(t)}
1788
1788
  <style>
1789
1789
  :host {
@@ -1833,7 +1833,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1833
1833
  <svg aria-hidden="true" viewBox="0 0 20 24">
1834
1834
  <path d="m8.12 17.585-.742-.669 4.2-4.665-4.2-4.666.743-.669 4.803 5.335-4.803 5.334Z"/>
1835
1835
  </svg>
1836
- `}class Yo extends Ii{}Yo.shadowRootOptions={mode:"open"};Yo.getTemplateHTML=Py;Yo.getSuffixSlotInnerHTML=Uy;f.customElements.get("media-settings-menu-item")||f.customElements.define("media-settings-menu-item",Yo);class lr extends Ce{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=xo(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new Hu({relatedTarget:this}))}}f.customElements.get("media-chrome-menu-button")||f.customElements.define("media-chrome-menu-button",lr);function $y(){return`
1836
+ `}class Yo extends Ii{}Yo.shadowRootOptions={mode:"open"};Yo.getTemplateHTML=Py;Yo.getSuffixSlotInnerHTML=Uy;f.customElements.get("media-settings-menu-item")||f.customElements.define("media-settings-menu-item",Yo);class dr extends Ce{connectedCallback(){super.connectedCallback(),this.invokeTargetElement&&this.setAttribute("aria-haspopup","menu")}get invokeTarget(){return this.getAttribute("invoketarget")}set invokeTarget(e){this.setAttribute("invoketarget",`${e}`)}get invokeTargetElement(){var e;return this.invokeTarget?(e=xo(this))==null?void 0:e.querySelector(`#${this.invokeTarget}`):null}handleClick(){var e;(e=this.invokeTargetElement)==null||e.dispatchEvent(new Hu({relatedTarget:this}))}}f.customElements.get("media-chrome-menu-button")||f.customElements.define("media-chrome-menu-button",dr);function $y(){return`
1837
1837
  <style>
1838
1838
  :host([aria-expanded="true"]) slot[name=tooltip] {
1839
1839
  display: none;
@@ -1844,7 +1844,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1844
1844
  <path d="M4.5 14.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm7.5 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"/>
1845
1845
  </svg>
1846
1846
  </slot>
1847
- `}function Hy(){return L("Settings")}class Qu extends lr{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",L("settings"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Be(this).querySelector("media-settings-menu")}}Qu.getSlotTemplateHTML=$y;Qu.getTooltipContentHTML=Hy;f.customElements.get("media-settings-menu-button")||f.customElements.define("media-settings-menu-button",Qu);var zu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},xv=(t,e,i)=>(zu(t,e,"read from private field"),i?i.call(t):e.get(t)),Hn=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Sd=(t,e,i,a)=>(zu(t,e,"write to private field"),e.set(t,i),i),Bn=(t,e,i)=>(zu(t,e,"access private method"),i),Br,ko,Ns,wd,Ps,Id;class By extends lt{constructor(){super(...arguments),Hn(this,Ns),Hn(this,Ps),Hn(this,Br,[]),Hn(this,ko,void 0)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_AUDIO_TRACK_LIST,c.MEDIA_AUDIO_TRACK_ENABLED,c.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_AUDIO_TRACK_ENABLED&&i!==a?this.value=a:e===c.MEDIA_AUDIO_TRACK_LIST&&i!==a&&(Sd(this,Br,Tg(a??"")),Bn(this,Ns,wd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Bn(this,Ps,Id))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Bn(this,Ps,Id))}get anchorElement(){var e;return this.anchor!=="auto"?super.anchorElement:(e=Be(this))==null?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return xv(this,Br)}set mediaAudioTrackList(e){Sd(this,Br,e),Bn(this,Ns,wd).call(this)}get mediaAudioTrackEnabled(){var e;return(e=ae(this,c.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){re(this,c.MEDIA_AUDIO_TRACK_ENABLED,e)}}Br=new WeakMap;ko=new WeakMap;Ns=new WeakSet;wd=function(){if(xv(this,ko)===JSON.stringify(this.mediaAudioTrackList))return;Sd(this,ko,JSON.stringify(this.mediaAudioTrackList));const t=this.mediaAudioTrackList;this.defaultSlot.textContent="",t.sort((e,i)=>e.id.localeCompare(i.id,void 0,{numeric:!0}));for(const e of t){const i=this.formatMenuItemText(e.label,e),a=tr({type:"radio",text:i,value:`${e.id}`,checked:e.enabled});a.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(a)}};Ps=new WeakSet;Id=function(){if(this.value==null)return;const t=new f.CustomEvent(I.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-audio-track-menu")||f.customElements.define("media-audio-track-menu",By);const Wy=`<svg aria-hidden="true" viewBox="0 0 24 24">
1847
+ `}function Hy(){return L("Settings")}class Qu extends dr{static get observedAttributes(){return[...super.observedAttributes,"target"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",L("settings"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Be(this).querySelector("media-settings-menu")}}Qu.getSlotTemplateHTML=$y;Qu.getTooltipContentHTML=Hy;f.customElements.get("media-settings-menu-button")||f.customElements.define("media-settings-menu-button",Qu);var zu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},xv=(t,e,i)=>(zu(t,e,"read from private field"),i?i.call(t):e.get(t)),Bn=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Sd=(t,e,i,a)=>(zu(t,e,"write to private field"),e.set(t,i),i),Wn=(t,e,i)=>(zu(t,e,"access private method"),i),Wr,ko,Ps,wd,Us,Id;class By extends lt{constructor(){super(...arguments),Bn(this,Ps),Bn(this,Us),Bn(this,Wr,[]),Bn(this,ko,void 0)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_AUDIO_TRACK_LIST,c.MEDIA_AUDIO_TRACK_ENABLED,c.MEDIA_AUDIO_TRACK_UNAVAILABLE]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_AUDIO_TRACK_ENABLED&&i!==a?this.value=a:e===c.MEDIA_AUDIO_TRACK_LIST&&i!==a&&(Sd(this,Wr,Tg(a??"")),Wn(this,Ps,wd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Wn(this,Us,Id))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Wn(this,Us,Id))}get anchorElement(){var e;return this.anchor!=="auto"?super.anchorElement:(e=Be(this))==null?void 0:e.querySelector("media-audio-track-menu-button")}get mediaAudioTrackList(){return xv(this,Wr)}set mediaAudioTrackList(e){Sd(this,Wr,e),Wn(this,Ps,wd).call(this)}get mediaAudioTrackEnabled(){var e;return(e=ae(this,c.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){re(this,c.MEDIA_AUDIO_TRACK_ENABLED,e)}}Wr=new WeakMap;ko=new WeakMap;Ps=new WeakSet;wd=function(){if(xv(this,ko)===JSON.stringify(this.mediaAudioTrackList))return;Sd(this,ko,JSON.stringify(this.mediaAudioTrackList));const t=this.mediaAudioTrackList;this.defaultSlot.textContent="",t.sort((e,i)=>e.id.localeCompare(i.id,void 0,{numeric:!0}));for(const e of t){const i=this.formatMenuItemText(e.label,e),a=ir({type:"radio",text:i,value:`${e.id}`,checked:e.enabled});a.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(a)}};Us=new WeakSet;Id=function(){if(this.value==null)return;const t=new f.CustomEvent(I.MEDIA_AUDIO_TRACK_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-audio-track-menu")||f.customElements.define("media-audio-track-menu",By);const Wy=`<svg aria-hidden="true" viewBox="0 0 24 24">
1848
1848
  <path d="M11 17H9.5V7H11v10Zm-3-3H6.5v-4H8v4Zm6-5h-1.5v6H14V9Zm3 7h-1.5V8H17v8Z"/>
1849
1849
  <path d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0Z"/>
1850
1850
  </svg>`;function Fy(){return`
@@ -1854,13 +1854,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1854
1854
  }
1855
1855
  </style>
1856
1856
  <slot name="icon">${Wy}</slot>
1857
- `}function Ky(){return L("Audio")}const Rh=t=>{const e=L("Audio");t.setAttribute("aria-label",e)};class ju extends lr{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_AUDIO_TRACK_ENABLED,c.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Rh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_LANG&&Rh(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Be(this))==null?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return(e=ae(this,c.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){re(this,c.MEDIA_AUDIO_TRACK_ENABLED,e)}}ju.getSlotTemplateHTML=Fy;ju.getTooltipContentHTML=Ky;f.customElements.get("media-audio-track-menu-button")||f.customElements.define("media-audio-track-menu-button",ju);var Zu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Vy=(t,e,i)=>(Zu(t,e,"read from private field"),e.get(t)),fl=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},qy=(t,e,i,a)=>(Zu(t,e,"write to private field"),e.set(t,i),i),Wn=(t,e,i)=>(Zu(t,e,"access private method"),i),So,Us,Rd,$s,Cd;const Yy=`
1857
+ `}function Ky(){return L("Audio")}const Rh=t=>{const e=L("Audio");t.setAttribute("aria-label",e)};class ju extends dr{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_AUDIO_TRACK_ENABLED,c.MEDIA_AUDIO_TRACK_UNAVAILABLE]}connectedCallback(){super.connectedCallback(),Rh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_LANG&&Rh(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Be(this))==null?void 0:e.querySelector("media-audio-track-menu")}get mediaAudioTrackEnabled(){var e;return(e=ae(this,c.MEDIA_AUDIO_TRACK_ENABLED))!=null?e:""}set mediaAudioTrackEnabled(e){re(this,c.MEDIA_AUDIO_TRACK_ENABLED,e)}}ju.getSlotTemplateHTML=Fy;ju.getTooltipContentHTML=Ky;f.customElements.get("media-audio-track-menu-button")||f.customElements.define("media-audio-track-menu-button",ju);var Zu=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Vy=(t,e,i)=>(Zu(t,e,"read from private field"),e.get(t)),fl=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},qy=(t,e,i,a)=>(Zu(t,e,"write to private field"),e.set(t,i),i),Fn=(t,e,i)=>(Zu(t,e,"access private method"),i),So,$s,Rd,Hs,Cd;const Yy=`
1858
1858
  <svg aria-hidden="true" viewBox="0 0 26 24" part="captions-indicator indicator">
1859
1859
  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
1860
1860
  </svg>`;function Gy(t){return`
1861
1861
  ${lt.getTemplateHTML(t)}
1862
1862
  <slot name="captions-indicator" hidden>${Yy}</slot>
1863
- `}class Ov extends lt{constructor(){super(...arguments),fl(this,Us),fl(this,$s),fl(this,So,void 0)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_SUBTITLES_LIST,c.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_SUBTITLES_LIST&&i!==a?Wn(this,Us,Rd).call(this):e===c.MEDIA_SUBTITLES_SHOWING&&i!==a&&(this.value=a||"",Wn(this,Us,Rd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Wn(this,$s,Cd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Wn(this,$s,Cd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return Ch(this,c.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Lh(this,c.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Ch(this,c.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Lh(this,c.MEDIA_SUBTITLES_SHOWING,e)}}So=new WeakMap;Us=new WeakSet;Rd=function(){var t;const e=Vy(this,So)!==JSON.stringify(this.mediaSubtitlesList),i=this.value!==this.getAttribute(c.MEDIA_SUBTITLES_SHOWING);if(!e&&!i)return;qy(this,So,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const a=!this.value,r=tr({type:"radio",text:this.formatMenuItemText(L("Off")),value:"off",checked:a});r.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(r);const n=this.mediaSubtitlesList;for(const s of n){const o=tr({type:"radio",text:this.formatMenuItemText(s.label,s),value:$l(s),checked:this.value==$l(s)});o.prepend(ta(this,"checked-indicator")),((t=s.kind)!=null?t:"subs")==="captions"&&o.append(ta(this,"captions-indicator")),this.defaultSlot.append(o)}};$s=new WeakSet;Cd=function(){const t=this.mediaSubtitlesShowing,e=this.getAttribute(c.MEDIA_SUBTITLES_SHOWING),i=this.value!==e;if(t?.length&&i&&this.dispatchEvent(new f.CustomEvent(I.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!i)return;const a=new f.CustomEvent(I.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};Ov.getTemplateHTML=Gy;const Ch=(t,e)=>{const i=t.getAttribute(e);return i?$o(i):[]},Lh=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=un(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-menu")||f.customElements.define("media-captions-menu",Ov);const Qy=`<svg aria-hidden="true" viewBox="0 0 26 24">
1863
+ `}class Ov extends lt{constructor(){super(...arguments),fl(this,$s),fl(this,Hs),fl(this,So,void 0)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_SUBTITLES_LIST,c.MEDIA_SUBTITLES_SHOWING]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_SUBTITLES_LIST&&i!==a?Fn(this,$s,Rd).call(this):e===c.MEDIA_SUBTITLES_SHOWING&&i!==a&&(this.value=a||"",Fn(this,$s,Rd).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",Fn(this,Hs,Cd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",Fn(this,Hs,Cd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-captions-menu-button")}get mediaSubtitlesList(){return Ch(this,c.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Lh(this,c.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return Ch(this,c.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Lh(this,c.MEDIA_SUBTITLES_SHOWING,e)}}So=new WeakMap;$s=new WeakSet;Rd=function(){var t;const e=Vy(this,So)!==JSON.stringify(this.mediaSubtitlesList),i=this.value!==this.getAttribute(c.MEDIA_SUBTITLES_SHOWING);if(!e&&!i)return;qy(this,So,JSON.stringify(this.mediaSubtitlesList)),this.defaultSlot.textContent="";const a=!this.value,r=ir({type:"radio",text:this.formatMenuItemText(L("Off")),value:"off",checked:a});r.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(r);const n=this.mediaSubtitlesList;for(const s of n){const o=ir({type:"radio",text:this.formatMenuItemText(s.label,s),value:$l(s),checked:this.value==$l(s)});o.prepend(ta(this,"checked-indicator")),((t=s.kind)!=null?t:"subs")==="captions"&&o.append(ta(this,"captions-indicator")),this.defaultSlot.append(o)}};Hs=new WeakSet;Cd=function(){const t=this.mediaSubtitlesShowing,e=this.getAttribute(c.MEDIA_SUBTITLES_SHOWING),i=this.value!==e;if(t?.length&&i&&this.dispatchEvent(new f.CustomEvent(I.MEDIA_DISABLE_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:t})),!this.value||!i)return;const a=new f.CustomEvent(I.MEDIA_SHOW_SUBTITLES_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(a)};Ov.getTemplateHTML=Gy;const Ch=(t,e)=>{const i=t.getAttribute(e);return i?$o(i):[]},Lh=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=cn(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-menu")||f.customElements.define("media-captions-menu",Ov);const Qy=`<svg aria-hidden="true" viewBox="0 0 26 24">
1864
1864
  <path d="M22.83 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.39 9.45a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.92 3.92 0 0 1 .92-2.77 3.18 3.18 0 0 1 2.43-1 2.94 2.94 0 0 1 2.13.78c.364.359.62.813.74 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.17 1.61 1.61 0 0 0-1.29.58 2.79 2.79 0 0 0-.5 1.89 3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.48 1.48 0 0 0 1-.37 2.1 2.1 0 0 0 .59-1.14l1.4.44a3.23 3.23 0 0 1-1.07 1.69Zm7.22 0a3.07 3.07 0 0 1-1.91.57 3.06 3.06 0 0 1-2.34-1 3.75 3.75 0 0 1-.92-2.67 3.88 3.88 0 0 1 .93-2.77 3.14 3.14 0 0 1 2.42-1 3 3 0 0 1 2.16.82 2.8 2.8 0 0 1 .73 1.31l-1.43.35a1.49 1.49 0 0 0-1.51-1.21 1.61 1.61 0 0 0-1.29.58A2.79 2.79 0 0 0 15 12a3 3 0 0 0 .49 1.93 1.61 1.61 0 0 0 1.27.58 1.44 1.44 0 0 0 1-.37 2.1 2.1 0 0 0 .6-1.15l1.4.44a3.17 3.17 0 0 1-1.1 1.7Z"/>
1865
1865
  </svg>`,zy=`<svg aria-hidden="true" viewBox="0 0 26 24">
1866
1866
  <path d="M17.73 14.09a1.4 1.4 0 0 1-1 .37 1.579 1.579 0 0 1-1.27-.58A3 3 0 0 1 15 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34A2.89 2.89 0 0 0 19 9.07a3 3 0 0 0-2.14-.78 3.14 3.14 0 0 0-2.42 1 3.91 3.91 0 0 0-.93 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.17 3.17 0 0 0 1.07-1.74l-1.4-.45c-.083.43-.3.822-.62 1.12Zm-7.22 0a1.43 1.43 0 0 1-1 .37 1.58 1.58 0 0 1-1.27-.58A3 3 0 0 1 7.76 12a2.8 2.8 0 0 1 .5-1.85 1.63 1.63 0 0 1 1.29-.57 1.47 1.47 0 0 1 1.51 1.2l1.43-.34a2.81 2.81 0 0 0-.74-1.32 2.94 2.94 0 0 0-2.13-.78 3.18 3.18 0 0 0-2.43 1 4 4 0 0 0-.92 2.78 3.74 3.74 0 0 0 .92 2.66 3.07 3.07 0 0 0 2.34 1 3.07 3.07 0 0 0 1.91-.57 3.23 3.23 0 0 0 1.07-1.74l-1.4-.45a2.06 2.06 0 0 1-.6 1.07Zm12.32-8.41a2.59 2.59 0 0 0-2.3-2.51C18.72 3.05 15.86 3 13 3c-2.86 0-5.72.05-7.53.17a2.59 2.59 0 0 0-2.3 2.51c-.23 4.207-.23 8.423 0 12.63a2.57 2.57 0 0 0 2.3 2.5c1.81.13 4.67.19 7.53.19 2.86 0 5.72-.06 7.53-.19a2.57 2.57 0 0 0 2.3-2.5c.23-4.207.23-8.423 0-12.63Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.14-.21-8.29 0-12.43a1.11 1.11 0 0 1 .91-1.11C7.24 4.56 10 4.49 13 4.49s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.14.21 8.29 0 12.43Z"/>
@@ -1884,7 +1884,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1884
1884
  <slot name="on">${Qy}</slot>
1885
1885
  <slot name="off">${zy}</slot>
1886
1886
  </slot>
1887
- `}function Zy(){return L("Captions")}const Dh=t=>{t.setAttribute("data-captions-enabled",_p(t).toString())},Mh=t=>{t.setAttribute("aria-label",L("closed captions"))};class Xu extends lr{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_SUBTITLES_LIST,c.MEDIA_SUBTITLES_SHOWING,c.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),Mh(this),Dh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_SUBTITLES_SHOWING?Dh(this):e===c.MEDIA_LANG&&Mh(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Be(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return xh(this,c.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Oh(this,c.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return xh(this,c.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Oh(this,c.MEDIA_SUBTITLES_SHOWING,e)}}Xu.getSlotTemplateHTML=jy;Xu.getTooltipContentHTML=Zy;const xh=(t,e)=>{const i=t.getAttribute(e);return i?$o(i):[]},Oh=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=un(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-menu-button")||f.customElements.define("media-captions-menu-button",Xu);var Nv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ma=(t,e,i)=>(Nv(t,e,"read from private field"),i?i.call(t):e.get(t)),El=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ha=(t,e,i)=>(Nv(t,e,"access private method"),i),bi,xa,Wr,Hs,Ld;const _l={RATES:"rates"};class Xy extends lt{constructor(){super(),El(this,xa),El(this,Hs),El(this,bi,new ou(this,_l.RATES,{defaultValue:Zp})),ha(this,xa,Wr).call(this)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PLAYBACK_RATE,_l.RATES]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_PLAYBACK_RATE&&i!=a?(this.value=a,ha(this,xa,Wr).call(this)):e===_l.RATES&&i!=a&&(Ma(this,bi).value=a,ha(this,xa,Wr).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ha(this,Hs,Ld))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ha(this,Hs,Ld))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-playback-rate-menu-button")}get rates(){return Ma(this,bi)}set rates(e){e?Array.isArray(e)?Ma(this,bi).value=e.join(" "):typeof e=="string"&&(Ma(this,bi).value=e):Ma(this,bi).value="",ha(this,xa,Wr).call(this)}get mediaPlaybackRate(){return ie(this,c.MEDIA_PLAYBACK_RATE,Ha)}set mediaPlaybackRate(e){ue(this,c.MEDIA_PLAYBACK_RATE,e)}}bi=new WeakMap;xa=new WeakSet;Wr=function(){this.defaultSlot.textContent="";const t=this.mediaPlaybackRate,e=new Set(Array.from(Ma(this,bi)).map(a=>Number(a)));t>0&&!e.has(t)&&e.add(t);const i=Array.from(e).sort((a,r)=>a-r);for(const a of i){const r=tr({type:"radio",text:this.formatMenuItemText(`${a}x`,a),value:a.toString(),checked:t===a});r.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(r)}};Hs=new WeakSet;Ld=function(){if(!this.value)return;const t=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-playback-rate-menu")||f.customElements.define("media-playback-rate-menu",Xy);const Bs=1;function Jy(t){return`
1887
+ `}function Zy(){return L("Captions")}const Dh=t=>{t.setAttribute("data-captions-enabled",_p(t).toString())},Mh=t=>{t.setAttribute("aria-label",L("closed captions"))};class Xu extends dr{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_SUBTITLES_LIST,c.MEDIA_SUBTITLES_SHOWING,c.MEDIA_LANG]}connectedCallback(){super.connectedCallback(),Mh(this),Dh(this)}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_SUBTITLES_SHOWING?Dh(this):e===c.MEDIA_LANG&&Mh(this)}get invokeTargetElement(){var e;return this.invokeTarget!=null?super.invokeTargetElement:(e=Be(this))==null?void 0:e.querySelector("media-captions-menu")}get mediaSubtitlesList(){return xh(this,c.MEDIA_SUBTITLES_LIST)}set mediaSubtitlesList(e){Oh(this,c.MEDIA_SUBTITLES_LIST,e)}get mediaSubtitlesShowing(){return xh(this,c.MEDIA_SUBTITLES_SHOWING)}set mediaSubtitlesShowing(e){Oh(this,c.MEDIA_SUBTITLES_SHOWING,e)}}Xu.getSlotTemplateHTML=jy;Xu.getTooltipContentHTML=Zy;const xh=(t,e)=>{const i=t.getAttribute(e);return i?$o(i):[]},Oh=(t,e,i)=>{if(!i?.length){t.removeAttribute(e);return}const a=cn(i);t.getAttribute(e)!==a&&t.setAttribute(e,a)};f.customElements.get("media-captions-menu-button")||f.customElements.define("media-captions-menu-button",Xu);var Nv=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ma=(t,e,i)=>(Nv(t,e,"read from private field"),i?i.call(t):e.get(t)),El=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},ha=(t,e,i)=>(Nv(t,e,"access private method"),i),bi,xa,Fr,Bs,Ld;const _l={RATES:"rates"};class Xy extends lt{constructor(){super(),El(this,xa),El(this,Bs),El(this,bi,new ou(this,_l.RATES,{defaultValue:Zp})),ha(this,xa,Fr).call(this)}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PLAYBACK_RATE,_l.RATES]}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_PLAYBACK_RATE&&i!=a?(this.value=a,ha(this,xa,Fr).call(this)):e===_l.RATES&&i!=a&&(Ma(this,bi).value=a,ha(this,xa,Fr).call(this))}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ha(this,Bs,Ld))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ha(this,Bs,Ld))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-playback-rate-menu-button")}get rates(){return Ma(this,bi)}set rates(e){e?Array.isArray(e)?Ma(this,bi).value=e.join(" "):typeof e=="string"&&(Ma(this,bi).value=e):Ma(this,bi).value="",ha(this,xa,Fr).call(this)}get mediaPlaybackRate(){return ie(this,c.MEDIA_PLAYBACK_RATE,Ha)}set mediaPlaybackRate(e){ue(this,c.MEDIA_PLAYBACK_RATE,e)}}bi=new WeakMap;xa=new WeakSet;Fr=function(){this.defaultSlot.textContent="";const t=this.mediaPlaybackRate,e=new Set(Array.from(Ma(this,bi)).map(a=>Number(a)));t>0&&!e.has(t)&&e.add(t);const i=Array.from(e).sort((a,r)=>a-r);for(const a of i){const r=ir({type:"radio",text:this.formatMenuItemText(`${a}x`,a),value:a.toString(),checked:t===a});r.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(r)}};Bs=new WeakSet;Ld=function(){if(!this.value)return;const t=new f.CustomEvent(I.MEDIA_PLAYBACK_RATE_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-playback-rate-menu")||f.customElements.define("media-playback-rate-menu",Xy);const Ws=1;function Jy(t){return`
1888
1888
  <style>
1889
1889
  :host {
1890
1890
  min-width: 5ch;
@@ -1899,8 +1899,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1899
1899
  display: none;
1900
1900
  }
1901
1901
  </style>
1902
- <slot name="icon">${t.mediaplaybackrate||Bs}x</slot>
1903
- `}function eT(){return L("Playback rate")}class Ju extends lr{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:Bs}x`}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===c.MEDIA_PLAYBACK_RATE){const r=a?+a:Number.NaN,n=Number.isNaN(r)?Bs:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",L("Playback rate {playbackRate}",{playbackRate:n}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Be(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return ie(this,c.MEDIA_PLAYBACK_RATE,Bs)}set mediaPlaybackRate(e){ue(this,c.MEDIA_PLAYBACK_RATE,e)}}Ju.getSlotTemplateHTML=Jy;Ju.getTooltipContentHTML=eT;f.customElements.get("media-playback-rate-menu-button")||f.customElements.define("media-playback-rate-menu-button",Ju);var ec=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Fr=(t,e,i)=>(ec(t,e,"read from private field"),i?i.call(t):e.get(t)),Fn=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Nh=(t,e,i,a)=>(ec(t,e,"write to private field"),e.set(t,i),i),ma=(t,e,i)=>(ec(t,e,"access private method"),i),Kr,Ba,Oa,Vr,Ws,Dd;class tT extends lt{constructor(){super(...arguments),Fn(this,Oa),Fn(this,Ws),Fn(this,Kr,[]),Fn(this,Ba,{})}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_RENDITION_LIST,c.MEDIA_RENDITION_SELECTED,c.MEDIA_RENDITION_UNAVAILABLE,c.MEDIA_HEIGHT]}static formatMenuItemText(e,i){return super.formatMenuItemText(e,i)}static formatRendition(e,{showBitrate:i=!1}={}){const a=`${Math.min(e.width,e.height)}p`;if(i&&e.bitrate){const r=e.bitrate/1e6,n=`${r.toFixed(r<1?1:0)} Mbps`;return`${a} (${n})`}return this.formatMenuItemText(a,e)}static compareRendition(e,i){var a,r;return i.height===e.height?((a=i.bitrate)!=null?a:0)-((r=e.bitrate)!=null?r:0):i.height-e.height}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_RENDITION_SELECTED&&i!==a?(this.value=a??"auto",ma(this,Oa,Vr).call(this)):e===c.MEDIA_RENDITION_LIST&&i!==a?(Nh(this,Kr,_g(a)),ma(this,Oa,Vr).call(this)):e===c.MEDIA_HEIGHT&&i!==a&&ma(this,Oa,Vr).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ma(this,Ws,Dd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ma(this,Ws,Dd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Fr(this,Kr)}set mediaRenditionList(e){Nh(this,Kr,e),ma(this,Oa,Vr).call(this)}get mediaRenditionSelected(){return ae(this,c.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){re(this,c.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ie(this,c.MEDIA_HEIGHT)}set mediaHeight(e){ue(this,c.MEDIA_HEIGHT,e)}compareRendition(e,i){return this.constructor.compareRendition(e,i)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}formatRendition(e,i){return this.constructor.formatRendition(e,i)}showRenditionBitrate(e){return this.mediaRenditionList.some(i=>i!==e&&i.height===e.height&&i.bitrate!==e.bitrate)}}Kr=new WeakMap;Ba=new WeakMap;Oa=new WeakSet;Vr=function(){if(Fr(this,Ba).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&Fr(this,Ba).mediaHeight===this.mediaHeight)return;Fr(this,Ba).mediaRenditionList=JSON.stringify(this.mediaRenditionList),Fr(this,Ba).mediaHeight=this.mediaHeight;const t=this.mediaRenditionList.sort(this.compareRendition.bind(this)),e=t.find(s=>s.id===this.mediaRenditionSelected);for(const s of t)s.selected=s===e;this.defaultSlot.textContent="";const i=!this.mediaRenditionSelected;for(const s of t){const o=this.formatRendition(s,{showBitrate:this.showRenditionBitrate(s)}),l=tr({type:"radio",text:o,value:`${s.id}`,checked:s.selected&&!i});l.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(l)}const a=e&&this.showRenditionBitrate(e),r=i?e?this.formatMenuItemText(`${L("Auto")} • ${this.formatRendition(e,{showBitrate:a})}`,e):this.formatMenuItemText(`${L("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(L("Auto")),n=tr({type:"radio",text:r,value:"auto",checked:i});n.dataset.description=r,n.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(n)};Ws=new WeakSet;Dd=function(){if(this.value==null)return;const t=new f.CustomEvent(I.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-rendition-menu")||f.customElements.define("media-rendition-menu",tT);const iT=`<svg aria-hidden="true" viewBox="0 0 24 24">
1902
+ <slot name="icon">${t.mediaplaybackrate||Ws}x</slot>
1903
+ `}function eT(){return L("Playback rate")}class Ju extends dr{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_PLAYBACK_RATE]}constructor(){var e;super(),this.container=this.shadowRoot.querySelector('slot[name="icon"]'),this.container.innerHTML=`${(e=this.mediaPlaybackRate)!=null?e:Ws}x`}attributeChangedCallback(e,i,a){if(super.attributeChangedCallback(e,i,a),e===c.MEDIA_PLAYBACK_RATE){const r=a?+a:Number.NaN,n=Number.isNaN(r)?Ws:r;this.container.innerHTML=`${n}x`,this.setAttribute("aria-label",L("Playback rate {playbackRate}",{playbackRate:n}))}}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Be(this).querySelector("media-playback-rate-menu")}get mediaPlaybackRate(){return ie(this,c.MEDIA_PLAYBACK_RATE,Ws)}set mediaPlaybackRate(e){ue(this,c.MEDIA_PLAYBACK_RATE,e)}}Ju.getSlotTemplateHTML=Jy;Ju.getTooltipContentHTML=eT;f.customElements.get("media-playback-rate-menu-button")||f.customElements.define("media-playback-rate-menu-button",Ju);var ec=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Kr=(t,e,i)=>(ec(t,e,"read from private field"),i?i.call(t):e.get(t)),Kn=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Nh=(t,e,i,a)=>(ec(t,e,"write to private field"),e.set(t,i),i),ma=(t,e,i)=>(ec(t,e,"access private method"),i),Vr,Ba,Oa,qr,Fs,Dd;class tT extends lt{constructor(){super(...arguments),Kn(this,Oa),Kn(this,Fs),Kn(this,Vr,[]),Kn(this,Ba,{})}static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_RENDITION_LIST,c.MEDIA_RENDITION_SELECTED,c.MEDIA_RENDITION_UNAVAILABLE,c.MEDIA_HEIGHT]}static formatMenuItemText(e,i){return super.formatMenuItemText(e,i)}static formatRendition(e,{showBitrate:i=!1}={}){const a=`${Math.min(e.width,e.height)}p`;if(i&&e.bitrate){const r=e.bitrate/1e6,n=`${r.toFixed(r<1?1:0)} Mbps`;return`${a} (${n})`}return this.formatMenuItemText(a,e)}static compareRendition(e,i){var a,r;return i.height===e.height?((a=i.bitrate)!=null?a:0)-((r=e.bitrate)!=null?r:0):i.height-e.height}attributeChangedCallback(e,i,a){super.attributeChangedCallback(e,i,a),e===c.MEDIA_RENDITION_SELECTED&&i!==a?(this.value=a??"auto",ma(this,Oa,qr).call(this)):e===c.MEDIA_RENDITION_LIST&&i!==a?(Nh(this,Vr,_g(a)),ma(this,Oa,qr).call(this)):e===c.MEDIA_HEIGHT&&i!==a&&ma(this,Oa,qr).call(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("change",ma(this,Fs,Dd))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",ma(this,Fs,Dd))}get anchorElement(){return this.anchor!=="auto"?super.anchorElement:Be(this).querySelector("media-rendition-menu-button")}get mediaRenditionList(){return Kr(this,Vr)}set mediaRenditionList(e){Nh(this,Vr,e),ma(this,Oa,qr).call(this)}get mediaRenditionSelected(){return ae(this,c.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){re(this,c.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ie(this,c.MEDIA_HEIGHT)}set mediaHeight(e){ue(this,c.MEDIA_HEIGHT,e)}compareRendition(e,i){return this.constructor.compareRendition(e,i)}formatMenuItemText(e,i){return this.constructor.formatMenuItemText(e,i)}formatRendition(e,i){return this.constructor.formatRendition(e,i)}showRenditionBitrate(e){return this.mediaRenditionList.some(i=>i!==e&&i.height===e.height&&i.bitrate!==e.bitrate)}}Vr=new WeakMap;Ba=new WeakMap;Oa=new WeakSet;qr=function(){if(Kr(this,Ba).mediaRenditionList===JSON.stringify(this.mediaRenditionList)&&Kr(this,Ba).mediaHeight===this.mediaHeight)return;Kr(this,Ba).mediaRenditionList=JSON.stringify(this.mediaRenditionList),Kr(this,Ba).mediaHeight=this.mediaHeight;const t=this.mediaRenditionList.sort(this.compareRendition.bind(this)),e=t.find(s=>s.id===this.mediaRenditionSelected);for(const s of t)s.selected=s===e;this.defaultSlot.textContent="";const i=!this.mediaRenditionSelected;for(const s of t){const o=this.formatRendition(s,{showBitrate:this.showRenditionBitrate(s)}),l=ir({type:"radio",text:o,value:`${s.id}`,checked:s.selected&&!i});l.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(l)}const a=e&&this.showRenditionBitrate(e),r=i?e?this.formatMenuItemText(`${L("Auto")} • ${this.formatRendition(e,{showBitrate:a})}`,e):this.formatMenuItemText(`${L("Auto")} (${this.mediaHeight}p)`):this.formatMenuItemText(L("Auto")),n=ir({type:"radio",text:r,value:"auto",checked:i});n.dataset.description=r,n.prepend(ta(this,"checked-indicator")),this.defaultSlot.append(n)};Fs=new WeakSet;Dd=function(){if(this.value==null)return;const t=new f.CustomEvent(I.MEDIA_RENDITION_REQUEST,{composed:!0,bubbles:!0,detail:this.value});this.dispatchEvent(t)};f.customElements.get("media-rendition-menu")||f.customElements.define("media-rendition-menu",tT);const iT=`<svg aria-hidden="true" viewBox="0 0 24 24">
1904
1904
  <path d="M13.5 2.5h2v6h-2v-2h-11v-2h11v-2Zm4 2h4v2h-4v-2Zm-12 4h2v6h-2v-2h-3v-2h3v-2Zm4 2h12v2h-12v-2Zm1 4h2v6h-2v-2h-8v-2h8v-2Zm4 2h7v2h-7v-2Z" />
1905
1905
  </svg>`;function aT(){return`
1906
1906
  <style>
@@ -1909,7 +1909,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1909
1909
  }
1910
1910
  </style>
1911
1911
  <slot name="icon">${iT}</slot>
1912
- `}function rT(){return L("Quality")}class tc extends lr{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_RENDITION_SELECTED,c.MEDIA_RENDITION_UNAVAILABLE,c.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",L("quality"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Be(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return ae(this,c.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){re(this,c.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ie(this,c.MEDIA_HEIGHT)}set mediaHeight(e){ue(this,c.MEDIA_HEIGHT,e)}}tc.getSlotTemplateHTML=aT;tc.getTooltipContentHTML=rT;f.customElements.get("media-rendition-menu-button")||f.customElements.define("media-rendition-menu-button",tc);var ic=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ut=(t,e,i)=>(ic(t,e,"read from private field"),i?i.call(t):e.get(t)),kt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Pv=(t,e,i,a)=>(ic(t,e,"write to private field"),e.set(t,i),i),rt=(t,e,i)=>(ic(t,e,"access private method"),i),ar,bn,Go,Fi,Wa,ac,Uv,Fs,Md,Ks,xd,$v,wo,Io,Vs;function nT(t){return`
1912
+ `}function rT(){return L("Quality")}class tc extends dr{static get observedAttributes(){return[...super.observedAttributes,c.MEDIA_RENDITION_SELECTED,c.MEDIA_RENDITION_UNAVAILABLE,c.MEDIA_HEIGHT]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-label",L("quality"))}get invokeTargetElement(){return this.invokeTarget!=null?super.invokeTargetElement:Be(this).querySelector("media-rendition-menu")}get mediaRenditionSelected(){return ae(this,c.MEDIA_RENDITION_SELECTED)}set mediaRenditionSelected(e){re(this,c.MEDIA_RENDITION_SELECTED,e)}get mediaHeight(){return ie(this,c.MEDIA_HEIGHT)}set mediaHeight(e){ue(this,c.MEDIA_HEIGHT,e)}}tc.getSlotTemplateHTML=aT;tc.getTooltipContentHTML=rT;f.customElements.get("media-rendition-menu-button")||f.customElements.define("media-rendition-menu-button",tc);var ic=(t,e,i)=>{if(!e.has(t))throw TypeError("Cannot "+i)},Ut=(t,e,i)=>(ic(t,e,"read from private field"),i?i.call(t):e.get(t)),kt=(t,e,i)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,i)},Pv=(t,e,i,a)=>(ic(t,e,"write to private field"),e.set(t,i),i),rt=(t,e,i)=>(ic(t,e,"access private method"),i),rr,gn,Go,Fi,Wa,ac,Uv,Ks,Md,Vs,xd,$v,wo,Io,qs;function nT(t){return`
1913
1913
  ${lt.getTemplateHTML(t)}
1914
1914
  <style>
1915
1915
  :host {
@@ -1923,7 +1923,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1923
1923
  overflow: hidden;
1924
1924
  }
1925
1925
  </style>
1926
- `}class Hv extends lt{constructor(){super(),kt(this,bn),kt(this,Fi),kt(this,ac),kt(this,Fs),kt(this,xd),kt(this,ar,!1),kt(this,Ks,e=>{const i=e.target,a=i?.nodeName==="VIDEO",r=rt(this,Fs,Md).call(this,i);(a||r)&&(Ut(this,ar)?rt(this,Fi,Wa).call(this):rt(this,xd,$v).call(this,e))}),kt(this,wo,e=>{const i=e.target,a=this.contains(i),r=e.button===2,n=i?.nodeName==="VIDEO",s=rt(this,Fs,Md).call(this,i);a||r&&(n||s)||rt(this,Fi,Wa).call(this)}),kt(this,Io,e=>{e.key==="Escape"&&rt(this,Fi,Wa).call(this)}),kt(this,Vs,e=>{var i,a;const r=e.target;if((i=r.matches)!=null&&i.call(r,'button[invoke="copy"]')){const n=(a=r.closest("media-context-menu-item"))==null?void 0:a.querySelector('input[slot="copy"]');n&&navigator.clipboard.writeText(n.value)}rt(this,Fi,Wa).call(this)}),this.setAttribute("noautohide",""),rt(this,bn,Go).call(this)}connectedCallback(){super.connectedCallback(),Be(this).addEventListener("contextmenu",Ut(this,Ks)),this.addEventListener("click",Ut(this,Vs))}disconnectedCallback(){super.disconnectedCallback(),Be(this).removeEventListener("contextmenu",Ut(this,Ks)),this.removeEventListener("click",Ut(this,Vs)),document.removeEventListener("mousedown",Ut(this,wo)),document.removeEventListener("keydown",Ut(this,Io))}}ar=new WeakMap;bn=new WeakSet;Go=function(){this.hidden=!Ut(this,ar)};Fi=new WeakSet;Wa=function(){Pv(this,ar,!1),rt(this,bn,Go).call(this)};ac=new WeakSet;Uv=function(){document.querySelectorAll("media-context-menu").forEach(e=>{var i;e!==this&&rt(i=e,Fi,Wa).call(i)})};Fs=new WeakSet;Md=function(t){return t?t.hasAttribute("slot")&&t.getAttribute("slot")==="media"?!0:t.nodeName.includes("-")&&t.tagName.includes("-")?t.hasAttribute("src")||t.hasAttribute("poster")||t.hasAttribute("preload")||t.hasAttribute("playsinline"):!1:!1};Ks=new WeakMap;xd=new WeakSet;$v=function(t){t.preventDefault(),rt(this,ac,Uv).call(this),Pv(this,ar,!0),this.style.position="fixed",this.style.left=`${t.clientX}px`,this.style.top=`${t.clientY}px`,rt(this,bn,Go).call(this),document.addEventListener("mousedown",Ut(this,wo),{once:!0}),document.addEventListener("keydown",Ut(this,Io),{once:!0})};wo=new WeakMap;Io=new WeakMap;Vs=new WeakMap;Hv.getTemplateHTML=nT;f.customElements.get("media-context-menu")||f.customElements.define("media-context-menu",Hv);function sT(t){return`
1926
+ `}class Hv extends lt{constructor(){super(),kt(this,gn),kt(this,Fi),kt(this,ac),kt(this,Ks),kt(this,xd),kt(this,rr,!1),kt(this,Vs,e=>{const i=e.target,a=i?.nodeName==="VIDEO",r=rt(this,Ks,Md).call(this,i);(a||r)&&(Ut(this,rr)?rt(this,Fi,Wa).call(this):rt(this,xd,$v).call(this,e))}),kt(this,wo,e=>{const i=e.target,a=this.contains(i),r=e.button===2,n=i?.nodeName==="VIDEO",s=rt(this,Ks,Md).call(this,i);a||r&&(n||s)||rt(this,Fi,Wa).call(this)}),kt(this,Io,e=>{e.key==="Escape"&&rt(this,Fi,Wa).call(this)}),kt(this,qs,e=>{var i,a;const r=e.target;if((i=r.matches)!=null&&i.call(r,'button[invoke="copy"]')){const n=(a=r.closest("media-context-menu-item"))==null?void 0:a.querySelector('input[slot="copy"]');n&&navigator.clipboard.writeText(n.value)}rt(this,Fi,Wa).call(this)}),this.setAttribute("noautohide",""),rt(this,gn,Go).call(this)}connectedCallback(){super.connectedCallback(),Be(this).addEventListener("contextmenu",Ut(this,Vs)),this.addEventListener("click",Ut(this,qs))}disconnectedCallback(){super.disconnectedCallback(),Be(this).removeEventListener("contextmenu",Ut(this,Vs)),this.removeEventListener("click",Ut(this,qs)),document.removeEventListener("mousedown",Ut(this,wo)),document.removeEventListener("keydown",Ut(this,Io))}}rr=new WeakMap;gn=new WeakSet;Go=function(){this.hidden=!Ut(this,rr)};Fi=new WeakSet;Wa=function(){Pv(this,rr,!1),rt(this,gn,Go).call(this)};ac=new WeakSet;Uv=function(){document.querySelectorAll("media-context-menu").forEach(e=>{var i;e!==this&&rt(i=e,Fi,Wa).call(i)})};Ks=new WeakSet;Md=function(t){return t?t.hasAttribute("slot")&&t.getAttribute("slot")==="media"?!0:t.nodeName.includes("-")&&t.tagName.includes("-")?t.hasAttribute("src")||t.hasAttribute("poster")||t.hasAttribute("preload")||t.hasAttribute("playsinline"):!1:!1};Vs=new WeakMap;xd=new WeakSet;$v=function(t){t.preventDefault(),rt(this,ac,Uv).call(this),Pv(this,rr,!0),this.style.position="fixed",this.style.left=`${t.clientX}px`,this.style.top=`${t.clientY}px`,rt(this,gn,Go).call(this),document.addEventListener("mousedown",Ut(this,wo),{once:!0}),document.addEventListener("keydown",Ut(this,Io),{once:!0})};wo=new WeakMap;Io=new WeakMap;qs=new WeakMap;Hv.getTemplateHTML=nT;f.customElements.get("media-context-menu")||f.customElements.define("media-context-menu",Hv);function sT(t){return`
1927
1927
  ${Ii.getTemplateHTML.call(this,t)}
1928
1928
  <style>
1929
1929
  ::slotted(*) {
@@ -1936,8 +1936,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1936
1936
  min-height: var(--media-control-height, 24px);
1937
1937
  }
1938
1938
  </style>
1939
- `}class rc extends Ii{}rc.shadowRootOptions={mode:"open"};rc.getTemplateHTML=sT;f.customElements.get("media-context-menu-item")||f.customElements.define("media-context-menu-item",rc);var Bv=t=>{throw TypeError(t)},nc=(t,e,i)=>e.has(t)||Bv("Cannot "+i),z=(t,e,i)=>(nc(t,e,"read from private field"),i?i.call(t):e.get(t)),Et=(t,e,i)=>e.has(t)?Bv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),qt=(t,e,i,a)=>(nc(t,e,"write to private field"),e.set(t,i),i),Ee=(t,e,i)=>(nc(t,e,"access private method"),i),Qo=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends Qo{}globalThis.DocumentFragment=t}var sc=class extends Qo{},oT=class extends Qo{},lT={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(sc)}},qs,dT=class{constructor(e,i={}){Et(this,qs),qt(this,qs,i?.detail)}get detail(){return z(this,qs)}initCustomEvent(){}};qs=new WeakMap;function uT(t,e){return new sc}var Wv={document:{createElement:uT},DocumentFragment,customElements:lT,CustomEvent:dT,EventTarget:Qo,HTMLElement:sc,HTMLVideoElement:oT},Fv=typeof window>"u"||typeof globalThis.customElements>"u",Bt=Fv?Wv:globalThis,Ro=Fv?Wv.document:globalThis.document;function cT(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${Od(i)}: ${a}; `)}),e?e.trim():void 0}function Od(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Kv(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function ze(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function Vv(t){let e=hT(t).toString();return e?"?"+e:""}function hT(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var qv=(t,e)=>!t||!e?!1:t.contains(e)?!0:qv(t,e.getRootNode().host),Yv="mux.com",mT=()=>{try{return"3.10.2"}catch{}return"UNKNOWN"},pT=mT(),Gv=()=>pT,vT=(t,{token:e,customDomain:i=Yv,thumbnailTime:a,programTime:r}={})=>{var n;let s=e==null?a:void 0,{aud:o}=(n=Fa(e))!=null?n:{};if(!(e&&o!=="t"))return`https://image.${i}/${t}/thumbnail.webp${Vv({token:e,time:s,program_time:r})}`},fT=(t,{token:e,customDomain:i=Yv,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=(n=Fa(e))!=null?n:{};if(!(e&&s!=="s"))return`https://image.${i}/${t}/storyboard.vtt${Vv({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},oc=t=>{if(t){if([Q.LIVE,Q.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return Q.LIVE}},ET={crossorigin:"crossOrigin",playsinline:"playsInline"};function _T(t){var e;return(e=ET[t])!=null?e:Kv(t)}var Na,Pa,He,bT=class{constructor(e,i){Et(this,Na),Et(this,Pa),Et(this,He,[]),qt(this,Na,e),qt(this,Pa,i)}[Symbol.iterator](){return z(this,He).values()}get length(){return z(this,He).length}get value(){var e;return(e=z(this,He).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(qt(this,He,[]),this.add(...(i=e?.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return z(this,He)[e]}values(){return z(this,He).values()}keys(){return z(this,He).keys()}forEach(e){z(this,He).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||z(this,He).push(r)}),!(this.value===""&&!((i=z(this,Na))!=null&&i.hasAttribute(`${z(this,Pa)}`)))&&((a=z(this,Na))==null||a.setAttribute(`${z(this,Pa)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{z(this,He).splice(z(this,He).indexOf(a),1)}),(i=z(this,Na))==null||i.setAttribute(`${z(this,Pa)}`,`${this.value}`)}contains(e){return z(this,He).includes(e)}toggle(e,i){return typeof i<"u"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};Na=new WeakMap,Pa=new WeakMap,He=new WeakMap;var Qv=`[mux-player ${Gv()}]`;function Jt(...t){console.warn(Qv,...t)}function nt(...t){console.error(Qv,...t)}function zv(t){var e;let i=(e=t.message)!=null?e:"";t.context&&(i+=` ${t.context}`),t.file&&(i+=` ${D("Read more: ")}
1940
- https://github.com/muxinc/elements/blob/main/errors/${t.file}`),Jt(i)}var Oe={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},$i={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Ph=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),gT=Object.values(Oe).filter(t=>Oe.PLAYSINLINE!==t),yT=Object.values($i),TT=[...gT,...yT],AT=class extends Bt.HTMLElement{static get observedAttributes(){return TT}constructor(){super()}attributeChangedCallback(t,e,i){var a,r;switch(t){case $i.MUTED:{this.media&&(this.media.muted=i!=null,this.media.defaultMuted=i!=null);return}case $i.VOLUME:{let n=(a=ze(i))!=null?a:1;this.media&&(this.media.volume=n);return}case $i.PLAYBACKRATE:{let n=(r=ze(i))!=null?r:1;this.media&&(this.media.playbackRate=n,this.media.defaultPlaybackRate=n);return}}}play(){var t,e;return(e=(t=this.media)==null?void 0:t.play())!=null?e:Promise.reject()}pause(){var t;(t=this.media)==null||t.pause()}load(){var t;(t=this.media)==null||t.load()}get media(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var t,e;return(e=(t=this.media)==null?void 0:t.paused)!=null?e:!0}get duration(){var t,e;return(e=(t=this.media)==null?void 0:t.duration)!=null?e:NaN}get ended(){var t,e;return(e=(t=this.media)==null?void 0:t.ended)!=null?e:!1}get buffered(){var t,e;return(e=(t=this.media)==null?void 0:t.buffered)!=null?e:Ph}get seekable(){var t,e;return(e=(t=this.media)==null?void 0:t.seekable)!=null?e:Ph}get readyState(){var t,e;return(e=(t=this.media)==null?void 0:t.readyState)!=null?e:0}get videoWidth(){var t,e;return(e=(t=this.media)==null?void 0:t.videoWidth)!=null?e:0}get videoHeight(){var t,e;return(e=(t=this.media)==null?void 0:t.videoHeight)!=null?e:0}get currentSrc(){var t,e;return(e=(t=this.media)==null?void 0:t.currentSrc)!=null?e:""}get currentTime(){var t,e;return(e=(t=this.media)==null?void 0:t.currentTime)!=null?e:0}set currentTime(t){this.media&&(this.media.currentTime=Number(t))}get volume(){var t,e;return(e=(t=this.media)==null?void 0:t.volume)!=null?e:1}set volume(t){this.media&&(this.media.volume=Number(t))}get playbackRate(){var t,e;return(e=(t=this.media)==null?void 0:t.playbackRate)!=null?e:1}set playbackRate(t){this.media&&(this.media.playbackRate=Number(t))}get defaultPlaybackRate(){var t;return(t=ze(this.getAttribute($i.PLAYBACKRATE)))!=null?t:1}set defaultPlaybackRate(t){t!=null?this.setAttribute($i.PLAYBACKRATE,`${t}`):this.removeAttribute($i.PLAYBACKRATE)}get crossOrigin(){return gr(this,Oe.CROSSORIGIN)}set crossOrigin(t){this.setAttribute(Oe.CROSSORIGIN,`${t}`)}get autoplay(){return gr(this,Oe.AUTOPLAY)!=null}set autoplay(t){t?this.setAttribute(Oe.AUTOPLAY,typeof t=="string"?t:""):this.removeAttribute(Oe.AUTOPLAY)}get loop(){return gr(this,Oe.LOOP)!=null}set loop(t){t?this.setAttribute(Oe.LOOP,""):this.removeAttribute(Oe.LOOP)}get muted(){var t,e;return(e=(t=this.media)==null?void 0:t.muted)!=null?e:!1}set muted(t){this.media&&(this.media.muted=!!t)}get defaultMuted(){return gr(this,Oe.MUTED)!=null}set defaultMuted(t){t?this.setAttribute(Oe.MUTED,""):this.removeAttribute(Oe.MUTED)}get playsInline(){return gr(this,Oe.PLAYSINLINE)!=null}set playsInline(t){nt("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(t){["","none","metadata","auto"].includes(t)?this.setAttribute(Oe.PRELOAD,t):this.removeAttribute(Oe.PRELOAD)}};function gr(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Uh=AT,kT=`:host {
1939
+ `}class rc extends Ii{}rc.shadowRootOptions={mode:"open"};rc.getTemplateHTML=sT;f.customElements.get("media-context-menu-item")||f.customElements.define("media-context-menu-item",rc);var Bv=t=>{throw TypeError(t)},nc=(t,e,i)=>e.has(t)||Bv("Cannot "+i),z=(t,e,i)=>(nc(t,e,"read from private field"),i?i.call(t):e.get(t)),Et=(t,e,i)=>e.has(t)?Bv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),qt=(t,e,i,a)=>(nc(t,e,"write to private field"),e.set(t,i),i),Ee=(t,e,i)=>(nc(t,e,"access private method"),i),Qo=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends Qo{}globalThis.DocumentFragment=t}var sc=class extends Qo{},oT=class extends Qo{},lT={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(sc)}},Ys,dT=class{constructor(e,i={}){Et(this,Ys),qt(this,Ys,i?.detail)}get detail(){return z(this,Ys)}initCustomEvent(){}};Ys=new WeakMap;function uT(t,e){return new sc}var Wv={document:{createElement:uT},DocumentFragment,customElements:lT,CustomEvent:dT,EventTarget:Qo,HTMLElement:sc,HTMLVideoElement:oT},Fv=typeof window>"u"||typeof globalThis.customElements>"u",Bt=Fv?Wv:globalThis,Ro=Fv?Wv.document:globalThis.document;function cT(t){let e="";return Object.entries(t).forEach(([i,a])=>{a!=null&&(e+=`${Od(i)}: ${a}; `)}),e?e.trim():void 0}function Od(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Kv(t){return t.replace(/[-_]([a-z])/g,(e,i)=>i.toUpperCase())}function ze(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function Vv(t){let e=hT(t).toString();return e?"?"+e:""}function hT(t){let e={};for(let i in t)t[i]!=null&&(e[i]=t[i]);return new URLSearchParams(e)}var qv=(t,e)=>!t||!e?!1:t.contains(e)?!0:qv(t,e.getRootNode().host),Yv="mux.com",mT=()=>{try{return"3.10.2"}catch{}return"UNKNOWN"},pT=mT(),Gv=()=>pT,vT=(t,{token:e,customDomain:i=Yv,thumbnailTime:a,programTime:r}={})=>{var n;let s=e==null?a:void 0,{aud:o}=(n=Fa(e))!=null?n:{};if(!(e&&o!=="t"))return`https://image.${i}/${t}/thumbnail.webp${Vv({token:e,time:s,program_time:r})}`},fT=(t,{token:e,customDomain:i=Yv,programStartTime:a,programEndTime:r}={})=>{var n;let{aud:s}=(n=Fa(e))!=null?n:{};if(!(e&&s!=="s"))return`https://image.${i}/${t}/storyboard.vtt${Vv({token:e,format:"webp",program_start_time:a,program_end_time:r})}`},oc=t=>{if(t){if([Q.LIVE,Q.ON_DEMAND].includes(t))return t;if(t!=null&&t.includes("live"))return Q.LIVE}},ET={crossorigin:"crossOrigin",playsinline:"playsInline"};function _T(t){var e;return(e=ET[t])!=null?e:Kv(t)}var Na,Pa,He,bT=class{constructor(e,i){Et(this,Na),Et(this,Pa),Et(this,He,[]),qt(this,Na,e),qt(this,Pa,i)}[Symbol.iterator](){return z(this,He).values()}get length(){return z(this,He).length}get value(){var e;return(e=z(this,He).join(" "))!=null?e:""}set value(e){var i;e!==this.value&&(qt(this,He,[]),this.add(...(i=e?.split(" "))!=null?i:[]))}toString(){return this.value}item(e){return z(this,He)[e]}values(){return z(this,He).values()}keys(){return z(this,He).keys()}forEach(e){z(this,He).forEach(e)}add(...e){var i,a;e.forEach(r=>{this.contains(r)||z(this,He).push(r)}),!(this.value===""&&!((i=z(this,Na))!=null&&i.hasAttribute(`${z(this,Pa)}`)))&&((a=z(this,Na))==null||a.setAttribute(`${z(this,Pa)}`,`${this.value}`))}remove(...e){var i;e.forEach(a=>{z(this,He).splice(z(this,He).indexOf(a),1)}),(i=z(this,Na))==null||i.setAttribute(`${z(this,Pa)}`,`${this.value}`)}contains(e){return z(this,He).includes(e)}toggle(e,i){return typeof i<"u"?i?(this.add(e),!0):(this.remove(e),!1):this.contains(e)?(this.remove(e),!1):(this.add(e),!0)}replace(e,i){this.remove(e),this.add(i)}};Na=new WeakMap,Pa=new WeakMap,He=new WeakMap;var Qv=`[mux-player ${Gv()}]`;function Jt(...t){console.warn(Qv,...t)}function nt(...t){console.error(Qv,...t)}function zv(t){var e;let i=(e=t.message)!=null?e:"";t.context&&(i+=` ${t.context}`),t.file&&(i+=` ${D("Read more: ")}
1940
+ https://github.com/muxinc/elements/blob/main/errors/${t.file}`),Jt(i)}var Oe={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",PRELOAD:"preload"},$i={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Ph=Object.freeze({length:0,start(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'start' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0},end(t){let e=t>>>0;if(e>=this.length)throw new DOMException(`Failed to execute 'end' on 'TimeRanges': The index provided (${e}) is greater than or equal to the maximum bound (${this.length}).`);return 0}}),gT=Object.values(Oe).filter(t=>Oe.PLAYSINLINE!==t),yT=Object.values($i),TT=[...gT,...yT],AT=class extends Bt.HTMLElement{static get observedAttributes(){return TT}constructor(){super()}attributeChangedCallback(t,e,i){var a,r;switch(t){case $i.MUTED:{this.media&&(this.media.muted=i!=null,this.media.defaultMuted=i!=null);return}case $i.VOLUME:{let n=(a=ze(i))!=null?a:1;this.media&&(this.media.volume=n);return}case $i.PLAYBACKRATE:{let n=(r=ze(i))!=null?r:1;this.media&&(this.media.playbackRate=n,this.media.defaultPlaybackRate=n);return}}}play(){var t,e;return(e=(t=this.media)==null?void 0:t.play())!=null?e:Promise.reject()}pause(){var t;(t=this.media)==null||t.pause()}load(){var t;(t=this.media)==null||t.load()}get media(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("mux-video")}get audioTracks(){return this.media.audioTracks}get videoTracks(){return this.media.videoTracks}get audioRenditions(){return this.media.audioRenditions}get videoRenditions(){return this.media.videoRenditions}get paused(){var t,e;return(e=(t=this.media)==null?void 0:t.paused)!=null?e:!0}get duration(){var t,e;return(e=(t=this.media)==null?void 0:t.duration)!=null?e:NaN}get ended(){var t,e;return(e=(t=this.media)==null?void 0:t.ended)!=null?e:!1}get buffered(){var t,e;return(e=(t=this.media)==null?void 0:t.buffered)!=null?e:Ph}get seekable(){var t,e;return(e=(t=this.media)==null?void 0:t.seekable)!=null?e:Ph}get readyState(){var t,e;return(e=(t=this.media)==null?void 0:t.readyState)!=null?e:0}get videoWidth(){var t,e;return(e=(t=this.media)==null?void 0:t.videoWidth)!=null?e:0}get videoHeight(){var t,e;return(e=(t=this.media)==null?void 0:t.videoHeight)!=null?e:0}get currentSrc(){var t,e;return(e=(t=this.media)==null?void 0:t.currentSrc)!=null?e:""}get currentTime(){var t,e;return(e=(t=this.media)==null?void 0:t.currentTime)!=null?e:0}set currentTime(t){this.media&&(this.media.currentTime=Number(t))}get volume(){var t,e;return(e=(t=this.media)==null?void 0:t.volume)!=null?e:1}set volume(t){this.media&&(this.media.volume=Number(t))}get playbackRate(){var t,e;return(e=(t=this.media)==null?void 0:t.playbackRate)!=null?e:1}set playbackRate(t){this.media&&(this.media.playbackRate=Number(t))}get defaultPlaybackRate(){var t;return(t=ze(this.getAttribute($i.PLAYBACKRATE)))!=null?t:1}set defaultPlaybackRate(t){t!=null?this.setAttribute($i.PLAYBACKRATE,`${t}`):this.removeAttribute($i.PLAYBACKRATE)}get crossOrigin(){return yr(this,Oe.CROSSORIGIN)}set crossOrigin(t){this.setAttribute(Oe.CROSSORIGIN,`${t}`)}get autoplay(){return yr(this,Oe.AUTOPLAY)!=null}set autoplay(t){t?this.setAttribute(Oe.AUTOPLAY,typeof t=="string"?t:""):this.removeAttribute(Oe.AUTOPLAY)}get loop(){return yr(this,Oe.LOOP)!=null}set loop(t){t?this.setAttribute(Oe.LOOP,""):this.removeAttribute(Oe.LOOP)}get muted(){var t,e;return(e=(t=this.media)==null?void 0:t.muted)!=null?e:!1}set muted(t){this.media&&(this.media.muted=!!t)}get defaultMuted(){return yr(this,Oe.MUTED)!=null}set defaultMuted(t){t?this.setAttribute(Oe.MUTED,""):this.removeAttribute(Oe.MUTED)}get playsInline(){return yr(this,Oe.PLAYSINLINE)!=null}set playsInline(t){nt("playsInline is set to true by default and is not currently supported as a setter.")}get preload(){return this.media?this.media.preload:this.getAttribute("preload")}set preload(t){["","none","metadata","auto"].includes(t)?this.setAttribute(Oe.PRELOAD,t):this.removeAttribute(Oe.PRELOAD)}};function yr(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Uh=AT,kT=`:host {
1941
1941
  --media-control-display: var(--controls);
1942
1942
  --media-loading-indicator-display: var(--loading-indicator);
1943
1943
  --media-dialog-display: var(--dialog);
@@ -2087,13 +2087,13 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2087
2087
  :host([no-tooltips]) {
2088
2088
  --media-tooltip-display: none;
2089
2089
  }
2090
- `,yr=new WeakMap,ST=class jv{constructor(e,i){this.element=e,this.type=i,this.element.addEventListener(this.type,this);let a=yr.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let i=yr.get(this.element);i&&i.delete(this.type)}}static for(e){yr.has(e.element)||yr.set(e.element,new Map);let i=e.attributeName.slice(2),a=yr.get(e.element);return a&&a.has(i)?a.get(i):new jv(e.element,i)}};function wT(t,e){return t instanceof gt&&t.attributeName.startsWith("on")?(ST.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function IT(t,e){return e instanceof Zv&&t instanceof or?(e.renderInto(t),!0):!1}function RT(t,e){return e instanceof DocumentFragment&&t instanceof or?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function CT(t,e){if(t instanceof gt){let i=t.attributeNamespace,a=t.element.getAttributeNS(i,t.attributeName);return String(e)!==a&&(t.value=String(e)),!0}return t.value=String(e),!0}function LT(t,e){if(t instanceof gt&&e instanceof Element){let i=t.element;return i[t.attributeName]!==e&&(t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),i[t.attributeName]=e),!0}return!1}function DT(t,e){if(typeof e=="boolean"&&t instanceof gt){let i=t.attributeNamespace,a=t.element.hasAttributeNS(i,t.attributeName);return e!==a&&(t.booleanValue=e),!0}return!1}function MT(t,e){return e===!1&&t instanceof or?(t.replace(""),!0):!1}function xT(t,e){LT(t,e)||DT(t,e)||wT(t,e)||MT(t,e)||IT(t,e)||RT(t,e)||CT(t,e)}var bl=new Map,$h=new WeakMap,Hh=new WeakMap,Zv=class{constructor(e,i,a){this.strings=e,this.values=i,this.processor=a,this.stringsKey=this.strings.join("")}get template(){if(bl.has(this.stringsKey))return bl.get(this.stringsKey);{let e=Ro.createElement("template"),i=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<i?`{{ ${n} }}`:""),""),bl.set(this.stringsKey,e),e}}renderInto(e){var i;let a=this.template;if($h.get(e)!==a){$h.set(e,a);let n=new Vo(a,this.values,this.processor);Hh.set(e,n),e instanceof or?e.replace(...n.children):e.appendChild(n);return}let r=Hh.get(e);(i=r?.update)==null||i.call(r,this.values)}},OT={processCallback(t,e,i){var a;if(i){for(let[r,n]of e)if(r in i){let s=(a=i[r])!=null?a:"";xT(n,s)}}}};function Ys(t,...e){return new Zv(t,e,OT)}function NT(t,e){t.renderInto(e)}var PT=t=>{let{tokens:e}=t;return e.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""},UT=t=>Ys`
2090
+ `,Tr=new WeakMap,ST=class jv{constructor(e,i){this.element=e,this.type=i,this.element.addEventListener(this.type,this);let a=Tr.get(this.element);a&&a.set(this.type,this)}set(e){if(typeof e=="function")this.handleEvent=e.bind(this.element);else if(typeof e=="object"&&typeof e.handleEvent=="function")this.handleEvent=e.handleEvent.bind(e);else{this.element.removeEventListener(this.type,this);let i=Tr.get(this.element);i&&i.delete(this.type)}}static for(e){Tr.has(e.element)||Tr.set(e.element,new Map);let i=e.attributeName.slice(2),a=Tr.get(e.element);return a&&a.has(i)?a.get(i):new jv(e.element,i)}};function wT(t,e){return t instanceof gt&&t.attributeName.startsWith("on")?(ST.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function IT(t,e){return e instanceof Zv&&t instanceof lr?(e.renderInto(t),!0):!1}function RT(t,e){return e instanceof DocumentFragment&&t instanceof lr?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function CT(t,e){if(t instanceof gt){let i=t.attributeNamespace,a=t.element.getAttributeNS(i,t.attributeName);return String(e)!==a&&(t.value=String(e)),!0}return t.value=String(e),!0}function LT(t,e){if(t instanceof gt&&e instanceof Element){let i=t.element;return i[t.attributeName]!==e&&(t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),i[t.attributeName]=e),!0}return!1}function DT(t,e){if(typeof e=="boolean"&&t instanceof gt){let i=t.attributeNamespace,a=t.element.hasAttributeNS(i,t.attributeName);return e!==a&&(t.booleanValue=e),!0}return!1}function MT(t,e){return e===!1&&t instanceof lr?(t.replace(""),!0):!1}function xT(t,e){LT(t,e)||DT(t,e)||wT(t,e)||MT(t,e)||IT(t,e)||RT(t,e)||CT(t,e)}var bl=new Map,$h=new WeakMap,Hh=new WeakMap,Zv=class{constructor(e,i,a){this.strings=e,this.values=i,this.processor=a,this.stringsKey=this.strings.join("")}get template(){if(bl.has(this.stringsKey))return bl.get(this.stringsKey);{let e=Ro.createElement("template"),i=this.strings.length-1;return e.innerHTML=this.strings.reduce((a,r,n)=>a+r+(n<i?`{{ ${n} }}`:""),""),bl.set(this.stringsKey,e),e}}renderInto(e){var i;let a=this.template;if($h.get(e)!==a){$h.set(e,a);let n=new Vo(a,this.values,this.processor);Hh.set(e,n),e instanceof lr?e.replace(...n.children):e.appendChild(n);return}let r=Hh.get(e);(i=r?.update)==null||i.call(r,this.values)}},OT={processCallback(t,e,i){var a;if(i){for(let[r,n]of e)if(r in i){let s=(a=i[r])!=null?a:"";xT(n,s)}}}};function Gs(t,...e){return new Zv(t,e,OT)}function NT(t,e){t.renderInto(e)}var PT=t=>{let{tokens:e}=t;return e.drm?":host(:not([cast-receiver])) { --_cast-button-drm-display: none; }":""},UT=t=>Gs`
2091
2091
  <style>
2092
2092
  ${PT(t)}
2093
2093
  ${kT}
2094
2094
  </style>
2095
2095
  ${WT(t)}
2096
- `,$T=t=>{let e=t.hotKeys?`${t.hotKeys}`:"";return oc(t.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},HT={TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"},BT=Object.values(HT).join(", "),WT=t=>{var e,i,a,r,n,s,o,l,d,m,p,h,u,v,E,g,y,T,_,S,C,N,$,G,J,K,U,Me,Fe,Ke,he,Pe,yt,Ue,dt,Ve,ke,xe;return Ys`
2096
+ `,$T=t=>{let e=t.hotKeys?`${t.hotKeys}`:"";return oc(t.streamType)==="live"&&(e+=" noarrowleft noarrowright"),e},HT={TOP:"top",CENTER:"center",BOTTOM:"bottom",LAYER:"layer",MEDIA_LAYER:"media-layer",POSTER_LAYER:"poster-layer",VERTICAL_LAYER:"vertical-layer",CENTERED_LAYER:"centered-layer",GESTURE_LAYER:"gesture-layer",CONTROLLER_LAYER:"controller",BUTTON:"button",RANGE:"range",THUMB:"thumb",DISPLAY:"display",CONTROL_BAR:"control-bar",MENU_BUTTON:"menu-button",MENU:"menu",MENU_ITEM:"menu-item",OPTION:"option",POSTER:"poster",LIVE:"live",PLAY:"play",PRE_PLAY:"pre-play",SEEK_BACKWARD:"seek-backward",SEEK_FORWARD:"seek-forward",MUTE:"mute",CAPTIONS:"captions",AIRPLAY:"airplay",PIP:"pip",FULLSCREEN:"fullscreen",CAST:"cast",PLAYBACK_RATE:"playback-rate",VOLUME:"volume",TIME:"time",TITLE:"title",AUDIO_TRACK:"audio-track",RENDITION:"rendition"},BT=Object.values(HT).join(", "),WT=t=>{var e,i,a,r,n,s,o,l,d,m,p,h,u,v,E,g,y,T,_,S,C,N,$,G,J,K,U,Me,Fe,Ke,he,Pe,yt,Ue,dt,Ve,ke,xe;return Gs`
2097
2097
  <media-theme
2098
2098
  template="${t.themeTemplate||!1}"
2099
2099
  defaultstreamtype="${(e=t.defaultStreamType)!=null?e:!1}"
@@ -2150,7 +2150,7 @@ media-poster-image:not([src]):not([placeholdersrc]) {
2150
2150
  disable-pseudo-ended="${(Ve=t.disablePseudoEnded)!=null?Ve:!1}"
2151
2151
  max-auto-resolution="${(ke=t.maxAutoResolution)!=null?ke:!1}"
2152
2152
  >
2153
- ${t.storyboard?Ys`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:Ys``}
2153
+ ${t.storyboard?Gs`<track label="thumbnails" default kind="metadata" src="${t.storyboard}" />`:Gs``}
2154
2154
  <slot></slot>
2155
2155
  </mux-video>
2156
2156
  <slot name="poster" slot="poster">
@@ -3306,5 +3306,5 @@ media-poster-image:not([src]):not([placeholdersrc]) {
3306
3306
  >${(i=a.linkText)!=null?i:a.linkUrl}</a
3307
3307
  >`:""}
3308
3308
  </p>`:""}
3309
- `}return zT(t)};function jT(t){var e,i;let a=t.theme;if(a){let r=(i=(e=t.getRootNode())==null?void 0:e.getElementById)==null?void 0:i.call(e,a);if(r&&r instanceof HTMLTemplateElement)return r;a.startsWith("media-theme-")||(a=`media-theme-${a}`);let n=Bt.customElements.get(a);if(n!=null&&n.template)return n.template}}function ZT(t){var e;let i=(e=t.mediaController)==null?void 0:e.querySelector("media-time-display");return i&&getComputedStyle(i).getPropertyValue("--media-duration-display-display").trim()==="none"}function Kh(t){let e=t.videoTitle?{video_title:t.videoTitle}:{};return t.getAttributeNames().filter(i=>i.startsWith("metadata-")).reduce((i,a)=>{let r=t.getAttribute(a);return r!==null&&(i[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),i},e)}var XT=Object.values(b),JT=Object.values(Zt),eA=Object.values(A),Vh=Gv(),qh="mux-player",Yh={isDialogOpen:!1},tA={redundant_streams:!0},Gs,Qs,zs,Hi,js,ja,le,_i,ef,Ud,Bi,Gh,Qh,zh,jh,iA=class extends Uh{constructor(){super(),Et(this,le),Et(this,Gs),Et(this,Qs,!1),Et(this,zs,{}),Et(this,Hi,!0),Et(this,js,new bT(this,"hotkeys")),Et(this,ja,{...Yh,onCloseErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&Ee(this,le,Ud).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&(qv(this,Ro.activeElement)||t.preventDefault())}}),qt(this,Gs,Qd()),this.attachShadow({mode:"open"}),Ee(this,le,ef).call(this),this.isConnected&&Ee(this,le,_i).call(this)}static get NAME(){return qh}static get VERSION(){return Vh}static get observedAttributes(){var t;return[...(t=Uh.observedAttributes)!=null?t:[],...JT,...XT,...eA]}get mediaTheme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,e;return(e=(t=this.mediaTheme)==null?void 0:t.shadowRoot)==null?void 0:e.querySelector("media-controller")}connectedCallback(){let t=this.media;t&&(t.metadata=Kh(this))}attributeChangedCallback(t,e,i){switch(Ee(this,le,_i).call(this),super.attributeChangedCallback(t,e,i),t){case A.HOTKEYS:z(this,js).value=i;break;case A.THUMBNAIL_TIME:{i!=null&&this.tokens.thumbnail&&Jt(D("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break}case A.THUMBNAIL_TOKEN:{if(i){let a=Fa(i);if(a){let{aud:r}=a,n=Gr.THUMBNAIL;r!==n&&Jt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"thumbnail"}))}}break}case A.STORYBOARD_TOKEN:{if(i){let a=Fa(i);if(a){let{aud:r}=a,n=Gr.STORYBOARD;r!==n&&Jt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"storyboard"}))}}break}case A.DRM_TOKEN:{if(i){let a=Fa(i);if(a){let{aud:r}=a,n=Gr.DRM;r!==n&&Jt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"drm"}))}}break}case b.PLAYBACK_ID:{i!=null&&i.includes("?token")&&nt(D("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break}case b.STREAM_TYPE:{i&&![Q.LIVE,Q.ON_DEMAND,Q.UNKNOWN].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?Number.POSITIVE_INFINITY:0:zv({file:"invalid-stream-type.md",message:D("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):i===Q.LIVE?this.getAttribute(A.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN;break}case A.FULLSCREEN_ELEMENT:{if(i!=null||i!==e){let a=Ro.getElementById(i),r=a?.querySelector("mux-player");this.mediaController&&a&&r&&(this.mediaController.fullscreenElement=a)}break}}[b.PLAYBACK_ID,Zt.SRC,A.PLAYBACK_TOKEN].includes(t)&&e!==i&&qt(this,ja,{...z(this,ja),...Yh}),Ee(this,le,Bi).call(this,{[_T(t)]:i})}async requestFullscreen(t){var e;if(!(!this.mediaController||this.mediaController.hasAttribute(c.MEDIA_IS_FULLSCREEN)))return(e=this.mediaController)==null||e.dispatchEvent(new Bt.CustomEvent(I.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((i,a)=>{var r;(r=this.mediaController)==null||r.addEventListener(ri.MEDIA_IS_FULLSCREEN,()=>i(),{once:!0})})}async exitFullscreen(){var t;if(!(!this.mediaController||!this.mediaController.hasAttribute(c.MEDIA_IS_FULLSCREEN)))return(t=this.mediaController)==null||t.dispatchEvent(new Bt.CustomEvent(I.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,i)=>{var a;(a=this.mediaController)==null||a.addEventListener(ri.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var t;return(t=this.getAttribute(b.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?io.includes(t)?this.setAttribute(b.PREFER_CMCD,t):Jt(`Invalid value for preferCmcd. Must be one of ${io.join()}`):this.removeAttribute(b.PREFER_CMCD))}get hasPlayed(){var t,e;return(e=(t=this.mediaController)==null?void 0:t.hasAttribute(c.MEDIA_HAS_PLAYED))!=null?e:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute(c.MEDIA_TIME_IS_LIVE)}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(A.THEME))!=null?t:GT}set theme(t){this.setAttribute(A.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let e={};for(let i of t.getAttributeNames()){if(Pd.includes(i))continue;let a=t.getAttribute(i);e[Kv(i)]=a===""?!0:a}return e}set themeProps(t){var e,i;Ee(this,le,_i).call(this);let a={...this.themeProps,...t};for(let r in a){if(Pd.includes(r))continue;let n=t?.[r];typeof n=="boolean"||n==null?(e=this.mediaTheme)==null||e.toggleAttribute(Od(r),!!n):(i=this.mediaTheme)==null||i.setAttribute(Od(r),n)}}get playbackId(){var t;return(t=this.getAttribute(b.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(b.PLAYBACK_ID,t):this.removeAttribute(b.PLAYBACK_ID)}get src(){var t,e;return this.playbackId?(t=Di(this,Zt.SRC))!=null?t:void 0:(e=this.getAttribute(Zt.SRC))!=null?e:void 0}set src(t){t?this.setAttribute(Zt.SRC,t):this.removeAttribute(Zt.SRC)}get poster(){var t;let e=this.getAttribute(Zt.POSTER);if(e!=null)return e;let{tokens:i}=this;if(i.playback&&!i.thumbnail){Jt("Missing expected thumbnail token. No poster image will be shown");return}if(this.playbackId&&!this.audio)return vT(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(t=this.thumbnailTime)!=null?t:this.startTime,programTime:this.programStartTime,token:i.thumbnail})}set poster(t){t||t===""?this.setAttribute(Zt.POSTER,t):this.removeAttribute(Zt.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(A.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(A.STORYBOARD_SRC,t):this.removeAttribute(A.STORYBOARD_SRC)}get storyboard(){let{tokens:t}=this;if(this.storyboardSrc&&!t.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[Q.LIVE,Q.UNKNOWN].includes(this.streamType)||t.playback&&!t.storyboard))return fT(this.playbackId,{customDomain:this.customDomain,token:t.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(A.AUDIO)}set audio(t){if(!t){this.removeAttribute(A.AUDIO);return}this.setAttribute(A.AUDIO,"")}get hotkeys(){return z(this,js)}get nohotkeys(){return this.hasAttribute(A.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(A.NOHOTKEYS);return}this.setAttribute(A.NOHOTKEYS,"")}get thumbnailTime(){return ze(this.getAttribute(A.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(A.THUMBNAIL_TIME,`${t}`)}get videoTitle(){var t,e;return(e=(t=this.getAttribute(A.VIDEO_TITLE))!=null?t:this.getAttribute(A.TITLE))!=null?e:""}set videoTitle(t){t!==this.videoTitle&&(t?this.setAttribute(A.VIDEO_TITLE,t):this.removeAttribute(A.VIDEO_TITLE))}get placeholder(){var t;return(t=Di(this,A.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(A.PLACEHOLDER,`${t}`)}get primaryColor(){var t,e;let i=this.getAttribute(A.PRIMARY_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=Bt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_primary-color"))==null?void 0:e.trim(),i))return i}set primaryColor(t){this.setAttribute(A.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var t,e;let i=this.getAttribute(A.SECONDARY_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=Bt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_secondary-color"))==null?void 0:e.trim(),i))return i}set secondaryColor(t){this.setAttribute(A.SECONDARY_COLOR,`${t}`)}get accentColor(){var t,e;let i=this.getAttribute(A.ACCENT_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=Bt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_accent-color"))==null?void 0:e.trim(),i))return i}set accentColor(t){this.setAttribute(A.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(A.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(A.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(A.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(A.PLAYBACK_RATES))return this.getAttribute(A.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,e)=>t-e)}set playbackRates(t){if(!t){this.removeAttribute(A.PLAYBACK_RATES);return}this.setAttribute(A.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=ze(this.getAttribute(A.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(A.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=ze(this.getAttribute(A.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(A.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(A.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(A.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(A.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return ze(this.getAttribute(A.DEFAULT_DURATION))}set defaultDuration(t){t==null?this.removeAttribute(A.DEFAULT_DURATION):this.setAttribute(A.DEFAULT_DURATION,`${t}`)}get playerInitTime(){return this.hasAttribute(b.PLAYER_INIT_TIME)?ze(this.getAttribute(b.PLAYER_INIT_TIME)):z(this,Gs)}set playerInitTime(t){t!=this.playerInitTime&&(t==null?this.removeAttribute(b.PLAYER_INIT_TIME):this.setAttribute(b.PLAYER_INIT_TIME,`${+t}`))}get playerSoftwareName(){var t;return(t=this.getAttribute(b.PLAYER_SOFTWARE_NAME))!=null?t:qh}get playerSoftwareVersion(){var t;return(t=this.getAttribute(b.PLAYER_SOFTWARE_VERSION))!=null?t:Vh}get beaconCollectionDomain(){var t;return(t=this.getAttribute(b.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(b.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(b.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(b.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(b.MAX_RESOLUTION,t):this.removeAttribute(b.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(b.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(b.MIN_RESOLUTION,t):this.removeAttribute(b.MIN_RESOLUTION))}get maxAutoResolution(){var t;return(t=this.getAttribute(b.MAX_AUTO_RESOLUTION))!=null?t:void 0}set maxAutoResolution(t){t==null?this.removeAttribute(b.MAX_AUTO_RESOLUTION):this.setAttribute(b.MAX_AUTO_RESOLUTION,t)}get renditionOrder(){var t;return(t=this.getAttribute(b.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(b.RENDITION_ORDER,t):this.removeAttribute(b.RENDITION_ORDER))}get programStartTime(){return ze(this.getAttribute(b.PROGRAM_START_TIME))}set programStartTime(t){t==null?this.removeAttribute(b.PROGRAM_START_TIME):this.setAttribute(b.PROGRAM_START_TIME,`${t}`)}get programEndTime(){return ze(this.getAttribute(b.PROGRAM_END_TIME))}set programEndTime(t){t==null?this.removeAttribute(b.PROGRAM_END_TIME):this.setAttribute(b.PROGRAM_END_TIME,`${t}`)}get assetStartTime(){return ze(this.getAttribute(b.ASSET_START_TIME))}set assetStartTime(t){t==null?this.removeAttribute(b.ASSET_START_TIME):this.setAttribute(b.ASSET_START_TIME,`${t}`)}get assetEndTime(){return ze(this.getAttribute(b.ASSET_END_TIME))}set assetEndTime(t){t==null?this.removeAttribute(b.ASSET_END_TIME):this.setAttribute(b.ASSET_END_TIME,`${t}`)}get extraSourceParams(){return this.hasAttribute(A.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(A.EXTRA_SOURCE_PARAMS)).entries()].reduce((t,[e,i])=>(t[e]=i,t),{}):tA}set extraSourceParams(t){t==null?this.removeAttribute(A.EXTRA_SOURCE_PARAMS):this.setAttribute(A.EXTRA_SOURCE_PARAMS,new URLSearchParams(t).toString())}get customDomain(){var t;return(t=this.getAttribute(b.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(b.CUSTOM_DOMAIN,t):this.removeAttribute(b.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Di(this,b.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(b.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(A.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(A.NO_VOLUME_PREF,""):this.removeAttribute(A.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(A.NO_MUTED_PREF)}set noMutedPref(t){t?this.setAttribute(A.NO_MUTED_PREF,""):this.removeAttribute(A.NO_MUTED_PREF)}get debug(){return Di(this,b.DEBUG)!=null}set debug(t){t?this.setAttribute(b.DEBUG,""):this.removeAttribute(b.DEBUG)}get disableTracking(){return Di(this,b.DISABLE_TRACKING)!=null}set disableTracking(t){this.toggleAttribute(b.DISABLE_TRACKING,!!t)}get disableCookies(){return Di(this,b.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(b.DISABLE_COOKIES,""):this.removeAttribute(b.DISABLE_COOKIES)}get streamType(){var t,e,i;return(i=(e=this.getAttribute(b.STREAM_TYPE))!=null?e:(t=this.media)==null?void 0:t.streamType)!=null?i:Q.UNKNOWN}set streamType(t){this.setAttribute(b.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,e,i;return(i=(e=this.getAttribute(A.DEFAULT_STREAM_TYPE))!=null?e:(t=this.mediaController)==null?void 0:t.getAttribute(A.DEFAULT_STREAM_TYPE))!=null?i:Q.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(A.DEFAULT_STREAM_TYPE,t):this.removeAttribute(A.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,e;return this.hasAttribute(A.TARGET_LIVE_WINDOW)?+this.getAttribute(A.TARGET_LIVE_WINDOW):(e=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?e:Number.NaN}set targetLiveWindow(t){t==this.targetLiveWindow||Number.isNaN(t)&&Number.isNaN(this.targetLiveWindow)||(t==null?this.removeAttribute(A.TARGET_LIVE_WINDOW):this.setAttribute(A.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return ze(Di(this,b.START_TIME))}set startTime(t){this.setAttribute(b.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(b.PREFER_PLAYBACK);if(t===Wt.MSE||t===Wt.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===Wt.MSE||t===Wt.NATIVE?this.setAttribute(b.PREFER_PLAYBACK,t):this.removeAttribute(b.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...Kh(this),...t}}get _hlsConfig(){var t;return(t=this.media)==null?void 0:t._hlsConfig}set _hlsConfig(t){if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=t}async addCuePoints(t){var e;if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(e=this.media)==null?void 0:e.addCuePoints(t)}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,e;return(e=(t=this.media)==null?void 0:t.cuePoints)!=null?e:[]}addChapters(t){var e;if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to addChapters. chapters will not be added.");return}return(e=this.media)==null?void 0:e.addChapters(t)}get activeChapter(){var t;return(t=this.media)==null?void 0:t.activeChapter}get chapters(){var t,e;return(e=(t=this.media)==null?void 0:t.chapters)!=null?e:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(A.PLAYBACK_TOKEN),e=this.getAttribute(A.DRM_TOKEN),i=this.getAttribute(A.THUMBNAIL_TOKEN),a=this.getAttribute(A.STORYBOARD_TOKEN);return{...z(this,zs),...t!=null?{playback:t}:{},...e!=null?{drm:e}:{},...i!=null?{thumbnail:i}:{},...a!=null?{storyboard:a}:{}}}set tokens(t){qt(this,zs,t??{})}get playbackToken(){var t;return(t=this.getAttribute(A.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(A.PLAYBACK_TOKEN,`${t}`)}get drmToken(){var t;return(t=this.getAttribute(A.DRM_TOKEN))!=null?t:void 0}set drmToken(t){this.setAttribute(A.DRM_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(A.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(A.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(A.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(A.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,e,i,a){var r;let n=(r=this.media)==null?void 0:r.nativeEl;if(n)return Vd(n,t,e,i,a)}removeTextTrack(t){var e;let i=(e=this.media)==null?void 0:e.nativeEl;if(i)return Z_(i,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}get castReceiver(){var t;return(t=this.getAttribute(A.CAST_RECEIVER))!=null?t:void 0}set castReceiver(t){t!==this.castReceiver&&(t?this.setAttribute(A.CAST_RECEIVER,t):this.removeAttribute(A.CAST_RECEIVER))}get castCustomData(){var t;return(t=this.media)==null?void 0:t.castCustomData}set castCustomData(t){if(!this.media){nt("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");return}this.media.castCustomData=t}get noTooltips(){return this.hasAttribute(A.NO_TOOLTIPS)}set noTooltips(t){if(!t){this.removeAttribute(A.NO_TOOLTIPS);return}this.setAttribute(A.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(A.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(t){t?this.setAttribute(A.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(A.PROUDLY_DISPLAY_MUX_BADGE)}};Gs=new WeakMap,Qs=new WeakMap,zs=new WeakMap,Hi=new WeakMap,js=new WeakMap,ja=new WeakMap,le=new WeakSet,_i=function(){var t,e,i,a;if(!z(this,Qs)){qt(this,Qs,!0),Ee(this,le,Bi).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof Bt.HTMLElement))throw""}catch{nt("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{nt("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof y0))throw""}catch{nt("<media-controller> failed to upgrade!")}Ee(this,le,Gh).call(this),Ee(this,le,Qh).call(this),Ee(this,le,zh).call(this),qt(this,Hi,(e=(t=this.mediaController)==null?void 0:t.hasAttribute(M.USER_INACTIVE))!=null?e:!0),Ee(this,le,jh).call(this),(i=this.media)==null||i.addEventListener("streamtypechange",()=>Ee(this,le,Bi).call(this)),(a=this.media)==null||a.addEventListener("loadstart",()=>Ee(this,le,Bi).call(this))}},ef=function(){var t,e;try{(t=window?.CSS)==null||t.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(e=window?.CSS)==null||e.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},Ud=function(t){Object.assign(z(this,ja),t),Ee(this,le,Bi).call(this)},Bi=function(t={}){NT(UT(QT(this,{...z(this,ja),...t})),this.shadowRoot)},Gh=function(){let t=e=>{var i,a;if(!(e!=null&&e.startsWith("theme-")))return;let r=e.replace(/^theme-/,"");if(Pd.includes(r))return;let n=this.getAttribute(e);n!=null?(i=this.mediaTheme)==null||i.setAttribute(r,n):(a=this.mediaTheme)==null||a.removeAttribute(r)};new MutationObserver(e=>{for(let{attributeName:i}of e)t(i)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(t)},Qh=function(){let t=e=>{var i;let a=(i=this.media)==null?void 0:i.error;if(!(a instanceof R)){let{message:n,code:s}=a??{};a=new R(n,s)}if(!(a!=null&&a.fatal)){Jt(a),a.data&&Jt(`${a.name} data:`,a.data);return}let r=Bh(a);r.message&&zv(r),nt(a),a.data&&nt(`${a.name} data:`,a.data),Ee(this,le,Ud).call(this,{isDialogOpen:!0})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(e={})=>{var i,a,r;if(!(((i=this.media)==null?void 0:i.error)instanceof R))return e;let n=Bh((a=this.media)==null?void 0:a.error);return{player_error_code:(r=this.media)==null?void 0:r.error.code,player_error_message:n.message?String(n.message):e.player_error_message,player_error_context:n.context?String(n.context):e.player_error_context}})},zh=function(){var t,e,i,a;let r=()=>Ee(this,le,Bi).call(this);(e=(t=this.media)==null?void 0:t.textTracks)==null||e.addEventListener("addtrack",r),(a=(i=this.media)==null?void 0:i.textTracks)==null||a.addEventListener("removetrack",r)},jh=function(){var t,e;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===Q.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(l,d,m=!1)=>{r()||Array.from(l&&l.activeCues||[]).forEach(p=>{if(!(!p.snapToLines||p.line<-5||p.line>=0&&p.line<10))if(!d||this.paused){let h=p.text.split(`
3310
- `).length,u=-3;this.streamType===Q.LIVE&&(u=-2);let v=u-h;if(p.line===v&&!m)return;a.has(p)||a.set(p,p.line),p.line=v}else setTimeout(()=>{p.line=a.get(p)||"auto"},500)})},s=()=>{var l,d;n(i,(d=(l=this.mediaController)==null?void 0:l.hasAttribute(M.USER_INACTIVE))!=null?d:!1)},o=()=>{var l,d;let m=Array.from(((d=(l=this.mediaController)==null?void 0:l.media)==null?void 0:d.textTracks)||[]).filter(p=>["subtitles","captions"].includes(p.kind)&&p.mode==="showing")[0];m!==i&&i?.removeEventListener("cuechange",s),i=m,i?.addEventListener("cuechange",s),n(i,z(this,Hi))};o(),(t=this.textTracks)==null||t.addEventListener("change",o),(e=this.textTracks)==null||e.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var l,d;let m=(d=(l=this.mediaController)==null?void 0:l.hasAttribute(M.USER_INACTIVE))!=null?d:!0;z(this,Hi)!==m&&(qt(this,Hi,m),n(i,z(this,Hi)))})};function Di(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Zh=iA,tf=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends tf{}globalThis.DocumentFragment=t}var aA=class extends tf{},rA={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(aA)}},nA={customElements:rA},sA=typeof window>"u"||typeof globalThis.customElements>"u",gl=sA?nA:globalThis;gl.customElements.get("mux-player")||(gl.customElements.define("mux-player",Zh),gl.MuxPlayerElement=Zh);var af=parseInt(tn.version)>=19,Xh={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},oA=t=>t==null,lA=(t,e)=>oA(e)?!1:t in e,dA=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),uA=(t,e)=>{if(!(!af&&typeof e=="boolean"&&!e)){if(lA(t,Xh))return Xh[t];if(typeof e<"u")return/[A-Z]/.test(t)?dA(t):t}},cA=(t,e)=>!af&&typeof t=="boolean"?"":t,hA=(t={})=>{let{ref:e,...i}=t;return Object.entries(i).reduce((a,[r,n])=>{let s=uA(r,n);if(!s)return a;let o=cA(n);return a[s]=o,a},{})};function Jh(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function mA(...t){return e=>{let i=!1,a=t.map(r=>{let n=Jh(r,e);return!i&&typeof n=="function"&&(i=!0),n});if(i)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():Jh(t[r],null)}}}}function pA(...t){return an.useCallback(mA(...t),t)}var vA=Object.prototype.hasOwnProperty,fA=(t,e)=>{if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(Array.isArray(t))return!Array.isArray(e)||t.length!==e.length?!1:t.some((r,n)=>e[n]===r);let i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(let r=0;r<i.length;r++)if(!vA.call(e,i[r])||!Object.is(t[i[r]],e[i[r]]))return!1;return!0},rf=(t,e,i)=>!fA(e,t[i]),EA=(t,e,i)=>{t[i]=e},_A=(t,e,i,a=EA,r=rf)=>an.useEffect(()=>{let n=i?.current;n&&r(n,e,t)&&a(n,e,t)},[i?.current,e]),St=_A,bA=()=>{try{return"3.10.2"}catch{}return"UNKNOWN"},gA=bA(),yA=()=>gA,ne=(t,e,i)=>an.useEffect(()=>{let a=e?.current;if(!a||!i)return;let r=t,n=i;return a.addEventListener(r,n),()=>{a.removeEventListener(r,n)}},[e?.current,i,t]),TA=tn.forwardRef(({children:t,...e},i)=>tn.createElement("mux-player",{suppressHydrationWarning:!0,...hA(e),ref:i},t)),AA=(t,e)=>{let{onAbort:i,onCanPlay:a,onCanPlayThrough:r,onEmptied:n,onLoadStart:s,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:m,onVolumeChange:p,onRateChange:h,onResize:u,onWaiting:v,onPlay:E,onPlaying:g,onTimeUpdate:y,onPause:T,onSeeking:_,onSeeked:S,onStalled:C,onSuspend:N,onEnded:$,onError:G,onCuePointChange:J,onChapterChange:K,metadata:U,tokens:Me,paused:Fe,playbackId:Ke,playbackRates:he,currentTime:Pe,themeProps:yt,extraSourceParams:Ue,castCustomData:dt,_hlsConfig:Ve,...ke}=e;return St("tokens",Me,t),St("playbackId",Ke,t),St("playbackRates",he,t),St("metadata",U,t),St("extraSourceParams",Ue,t),St("_hlsConfig",Ve,t),St("themeProps",yt,t),St("castCustomData",dt,t),St("paused",Fe,t,(xe,Je)=>{Je!=null&&(Je?xe.pause():xe.play())},(xe,Je,na)=>xe.hasAttribute("autoplay")&&!xe.hasPlayed?!1:rf(xe,Je,na)),St("currentTime",Pe,t,(xe,Je)=>{Je!=null&&(xe.currentTime=Je)}),ne("abort",t,i),ne("canplay",t,a),ne("canplaythrough",t,r),ne("emptied",t,n),ne("loadstart",t,s),ne("loadeddata",t,o),ne("loadedmetadata",t,l),ne("progress",t,d),ne("durationchange",t,m),ne("volumechange",t,p),ne("ratechange",t,h),ne("resize",t,u),ne("waiting",t,v),ne("play",t,E),ne("playing",t,g),ne("timeupdate",t,y),ne("pause",t,T),ne("seeking",t,_),ne("seeked",t,S),ne("stalled",t,C),ne("suspend",t,N),ne("ended",t,$),ne("error",t,G),ne("cuepointchange",t,J),ne("chapterchange",t,K),[ke]},kA=yA(),SA="mux-player-react",wA=tn.forwardRef((t,e)=>{var i;let a=an.useRef(null),r=pA(a,e),[n]=AA(a,t),[s]=an.useState((i=t.playerInitTime)!=null?i:Qd());return tn.createElement(TA,{ref:r,defaultHiddenCaptions:t.defaultHiddenCaptions,playerSoftwareName:SA,playerSoftwareVersion:kA,playerInitTime:s,...n})}),QA=wA;export{MA as MaxResolution,R as MediaError,xA as MinResolution,OA as RenditionOrder,QA as default,Qd as generatePlayerInitTime,SA as playerSoftwareName,kA as playerSoftwareVersion};
3309
+ `}return zT(t)};function jT(t){var e,i;let a=t.theme;if(a){let r=(i=(e=t.getRootNode())==null?void 0:e.getElementById)==null?void 0:i.call(e,a);if(r&&r instanceof HTMLTemplateElement)return r;a.startsWith("media-theme-")||(a=`media-theme-${a}`);let n=Bt.customElements.get(a);if(n!=null&&n.template)return n.template}}function ZT(t){var e;let i=(e=t.mediaController)==null?void 0:e.querySelector("media-time-display");return i&&getComputedStyle(i).getPropertyValue("--media-duration-display-display").trim()==="none"}function Kh(t){let e=t.videoTitle?{video_title:t.videoTitle}:{};return t.getAttributeNames().filter(i=>i.startsWith("metadata-")).reduce((i,a)=>{let r=t.getAttribute(a);return r!==null&&(i[a.replace(/^metadata-/,"").replace(/-/g,"_")]=r),i},e)}var XT=Object.values(b),JT=Object.values(Zt),eA=Object.values(A),Vh=Gv(),qh="mux-player",Yh={isDialogOpen:!1},tA={redundant_streams:!0},Qs,zs,js,Hi,Zs,ja,le,_i,ef,Ud,Bi,Gh,Qh,zh,jh,iA=class extends Uh{constructor(){super(),Et(this,le),Et(this,Qs),Et(this,zs,!1),Et(this,js,{}),Et(this,Hi,!0),Et(this,Zs,new bT(this,"hotkeys")),Et(this,ja,{...Yh,onCloseErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&Ee(this,le,Ud).call(this,{isDialogOpen:!1})},onFocusInErrorDialog:t=>{var e;((e=t.composedPath()[0])==null?void 0:e.localName)==="media-error-dialog"&&(qv(this,Ro.activeElement)||t.preventDefault())}}),qt(this,Qs,Qd()),this.attachShadow({mode:"open"}),Ee(this,le,ef).call(this),this.isConnected&&Ee(this,le,_i).call(this)}static get NAME(){return qh}static get VERSION(){return Vh}static get observedAttributes(){var t;return[...(t=Uh.observedAttributes)!=null?t:[],...JT,...XT,...eA]}get mediaTheme(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("media-theme")}get mediaController(){var t,e;return(e=(t=this.mediaTheme)==null?void 0:t.shadowRoot)==null?void 0:e.querySelector("media-controller")}connectedCallback(){let t=this.media;t&&(t.metadata=Kh(this))}attributeChangedCallback(t,e,i){switch(Ee(this,le,_i).call(this),super.attributeChangedCallback(t,e,i),t){case A.HOTKEYS:z(this,Zs).value=i;break;case A.THUMBNAIL_TIME:{i!=null&&this.tokens.thumbnail&&Jt(D("Use of thumbnail-time with thumbnail-token is currently unsupported. Ignore thumbnail-time.").toString());break}case A.THUMBNAIL_TOKEN:{if(i){let a=Fa(i);if(a){let{aud:r}=a,n=Qr.THUMBNAIL;r!==n&&Jt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"thumbnail"}))}}break}case A.STORYBOARD_TOKEN:{if(i){let a=Fa(i);if(a){let{aud:r}=a,n=Qr.STORYBOARD;r!==n&&Jt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"storyboard"}))}}break}case A.DRM_TOKEN:{if(i){let a=Fa(i);if(a){let{aud:r}=a,n=Qr.DRM;r!==n&&Jt(D("The {tokenNamePrefix}-token has an incorrect aud value: {aud}. aud value should be {expectedAud}.").format({aud:r,expectedAud:n,tokenNamePrefix:"drm"}))}}break}case b.PLAYBACK_ID:{i!=null&&i.includes("?token")&&nt(D("The specificed playback ID {playbackId} contains a token which must be provided via the playback-token attribute.").format({playbackId:i}));break}case b.STREAM_TYPE:{i&&![Q.LIVE,Q.ON_DEMAND,Q.UNKNOWN].includes(i)?["ll-live","live:dvr","ll-live:dvr"].includes(this.streamType)?this.targetLiveWindow=i.includes("dvr")?Number.POSITIVE_INFINITY:0:zv({file:"invalid-stream-type.md",message:D("Invalid stream-type value supplied: `{streamType}`. Please provide stream-type as either: `on-demand` or `live`").format({streamType:this.streamType})}):i===Q.LIVE?this.getAttribute(A.TARGET_LIVE_WINDOW)==null&&(this.targetLiveWindow=0):this.targetLiveWindow=Number.NaN;break}case A.FULLSCREEN_ELEMENT:{if(i!=null||i!==e){let a=Ro.getElementById(i),r=a?.querySelector("mux-player");this.mediaController&&a&&r&&(this.mediaController.fullscreenElement=a)}break}}[b.PLAYBACK_ID,Zt.SRC,A.PLAYBACK_TOKEN].includes(t)&&e!==i&&qt(this,ja,{...z(this,ja),...Yh}),Ee(this,le,Bi).call(this,{[_T(t)]:i})}async requestFullscreen(t){var e;if(!(!this.mediaController||this.mediaController.hasAttribute(c.MEDIA_IS_FULLSCREEN)))return(e=this.mediaController)==null||e.dispatchEvent(new Bt.CustomEvent(I.MEDIA_ENTER_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((i,a)=>{var r;(r=this.mediaController)==null||r.addEventListener(ri.MEDIA_IS_FULLSCREEN,()=>i(),{once:!0})})}async exitFullscreen(){var t;if(!(!this.mediaController||!this.mediaController.hasAttribute(c.MEDIA_IS_FULLSCREEN)))return(t=this.mediaController)==null||t.dispatchEvent(new Bt.CustomEvent(I.MEDIA_EXIT_FULLSCREEN_REQUEST,{composed:!0,bubbles:!0})),new Promise((e,i)=>{var a;(a=this.mediaController)==null||a.addEventListener(ri.MEDIA_IS_FULLSCREEN,()=>e(),{once:!0})})}get preferCmcd(){var t;return(t=this.getAttribute(b.PREFER_CMCD))!=null?t:void 0}set preferCmcd(t){t!==this.preferCmcd&&(t?io.includes(t)?this.setAttribute(b.PREFER_CMCD,t):Jt(`Invalid value for preferCmcd. Must be one of ${io.join()}`):this.removeAttribute(b.PREFER_CMCD))}get hasPlayed(){var t,e;return(e=(t=this.mediaController)==null?void 0:t.hasAttribute(c.MEDIA_HAS_PLAYED))!=null?e:!1}get inLiveWindow(){var t;return(t=this.mediaController)==null?void 0:t.hasAttribute(c.MEDIA_TIME_IS_LIVE)}get _hls(){var t;return(t=this.media)==null?void 0:t._hls}get mux(){var t;return(t=this.media)==null?void 0:t.mux}get theme(){var t;return(t=this.getAttribute(A.THEME))!=null?t:GT}set theme(t){this.setAttribute(A.THEME,`${t}`)}get themeProps(){let t=this.mediaTheme;if(!t)return;let e={};for(let i of t.getAttributeNames()){if(Pd.includes(i))continue;let a=t.getAttribute(i);e[Kv(i)]=a===""?!0:a}return e}set themeProps(t){var e,i;Ee(this,le,_i).call(this);let a={...this.themeProps,...t};for(let r in a){if(Pd.includes(r))continue;let n=t?.[r];typeof n=="boolean"||n==null?(e=this.mediaTheme)==null||e.toggleAttribute(Od(r),!!n):(i=this.mediaTheme)==null||i.setAttribute(Od(r),n)}}get playbackId(){var t;return(t=this.getAttribute(b.PLAYBACK_ID))!=null?t:void 0}set playbackId(t){t?this.setAttribute(b.PLAYBACK_ID,t):this.removeAttribute(b.PLAYBACK_ID)}get src(){var t,e;return this.playbackId?(t=Di(this,Zt.SRC))!=null?t:void 0:(e=this.getAttribute(Zt.SRC))!=null?e:void 0}set src(t){t?this.setAttribute(Zt.SRC,t):this.removeAttribute(Zt.SRC)}get poster(){var t;let e=this.getAttribute(Zt.POSTER);if(e!=null)return e;let{tokens:i}=this;if(i.playback&&!i.thumbnail){Jt("Missing expected thumbnail token. No poster image will be shown");return}if(this.playbackId&&!this.audio)return vT(this.playbackId,{customDomain:this.customDomain,thumbnailTime:(t=this.thumbnailTime)!=null?t:this.startTime,programTime:this.programStartTime,token:i.thumbnail})}set poster(t){t||t===""?this.setAttribute(Zt.POSTER,t):this.removeAttribute(Zt.POSTER)}get storyboardSrc(){var t;return(t=this.getAttribute(A.STORYBOARD_SRC))!=null?t:void 0}set storyboardSrc(t){t?this.setAttribute(A.STORYBOARD_SRC,t):this.removeAttribute(A.STORYBOARD_SRC)}get storyboard(){let{tokens:t}=this;if(this.storyboardSrc&&!t.storyboard)return this.storyboardSrc;if(!(this.audio||!this.playbackId||!this.streamType||[Q.LIVE,Q.UNKNOWN].includes(this.streamType)||t.playback&&!t.storyboard))return fT(this.playbackId,{customDomain:this.customDomain,token:t.storyboard,programStartTime:this.programStartTime,programEndTime:this.programEndTime})}get audio(){return this.hasAttribute(A.AUDIO)}set audio(t){if(!t){this.removeAttribute(A.AUDIO);return}this.setAttribute(A.AUDIO,"")}get hotkeys(){return z(this,Zs)}get nohotkeys(){return this.hasAttribute(A.NOHOTKEYS)}set nohotkeys(t){if(!t){this.removeAttribute(A.NOHOTKEYS);return}this.setAttribute(A.NOHOTKEYS,"")}get thumbnailTime(){return ze(this.getAttribute(A.THUMBNAIL_TIME))}set thumbnailTime(t){this.setAttribute(A.THUMBNAIL_TIME,`${t}`)}get videoTitle(){var t,e;return(e=(t=this.getAttribute(A.VIDEO_TITLE))!=null?t:this.getAttribute(A.TITLE))!=null?e:""}set videoTitle(t){t!==this.videoTitle&&(t?this.setAttribute(A.VIDEO_TITLE,t):this.removeAttribute(A.VIDEO_TITLE))}get placeholder(){var t;return(t=Di(this,A.PLACEHOLDER))!=null?t:""}set placeholder(t){this.setAttribute(A.PLACEHOLDER,`${t}`)}get primaryColor(){var t,e;let i=this.getAttribute(A.PRIMARY_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=Bt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_primary-color"))==null?void 0:e.trim(),i))return i}set primaryColor(t){this.setAttribute(A.PRIMARY_COLOR,`${t}`)}get secondaryColor(){var t,e;let i=this.getAttribute(A.SECONDARY_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=Bt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_secondary-color"))==null?void 0:e.trim(),i))return i}set secondaryColor(t){this.setAttribute(A.SECONDARY_COLOR,`${t}`)}get accentColor(){var t,e;let i=this.getAttribute(A.ACCENT_COLOR);if(i!=null||this.mediaTheme&&(i=(e=(t=Bt.getComputedStyle(this.mediaTheme))==null?void 0:t.getPropertyValue("--_accent-color"))==null?void 0:e.trim(),i))return i}set accentColor(t){this.setAttribute(A.ACCENT_COLOR,`${t}`)}get defaultShowRemainingTime(){return this.hasAttribute(A.DEFAULT_SHOW_REMAINING_TIME)}set defaultShowRemainingTime(t){t?this.setAttribute(A.DEFAULT_SHOW_REMAINING_TIME,""):this.removeAttribute(A.DEFAULT_SHOW_REMAINING_TIME)}get playbackRates(){if(this.hasAttribute(A.PLAYBACK_RATES))return this.getAttribute(A.PLAYBACK_RATES).trim().split(/\s*,?\s+/).map(t=>Number(t)).filter(t=>!Number.isNaN(t)).sort((t,e)=>t-e)}set playbackRates(t){if(!t){this.removeAttribute(A.PLAYBACK_RATES);return}this.setAttribute(A.PLAYBACK_RATES,t.join(" "))}get forwardSeekOffset(){var t;return(t=ze(this.getAttribute(A.FORWARD_SEEK_OFFSET)))!=null?t:10}set forwardSeekOffset(t){this.setAttribute(A.FORWARD_SEEK_OFFSET,`${t}`)}get backwardSeekOffset(){var t;return(t=ze(this.getAttribute(A.BACKWARD_SEEK_OFFSET)))!=null?t:10}set backwardSeekOffset(t){this.setAttribute(A.BACKWARD_SEEK_OFFSET,`${t}`)}get defaultHiddenCaptions(){return this.hasAttribute(A.DEFAULT_HIDDEN_CAPTIONS)}set defaultHiddenCaptions(t){t?this.setAttribute(A.DEFAULT_HIDDEN_CAPTIONS,""):this.removeAttribute(A.DEFAULT_HIDDEN_CAPTIONS)}get defaultDuration(){return ze(this.getAttribute(A.DEFAULT_DURATION))}set defaultDuration(t){t==null?this.removeAttribute(A.DEFAULT_DURATION):this.setAttribute(A.DEFAULT_DURATION,`${t}`)}get playerInitTime(){return this.hasAttribute(b.PLAYER_INIT_TIME)?ze(this.getAttribute(b.PLAYER_INIT_TIME)):z(this,Qs)}set playerInitTime(t){t!=this.playerInitTime&&(t==null?this.removeAttribute(b.PLAYER_INIT_TIME):this.setAttribute(b.PLAYER_INIT_TIME,`${+t}`))}get playerSoftwareName(){var t;return(t=this.getAttribute(b.PLAYER_SOFTWARE_NAME))!=null?t:qh}get playerSoftwareVersion(){var t;return(t=this.getAttribute(b.PLAYER_SOFTWARE_VERSION))!=null?t:Vh}get beaconCollectionDomain(){var t;return(t=this.getAttribute(b.BEACON_COLLECTION_DOMAIN))!=null?t:void 0}set beaconCollectionDomain(t){t!==this.beaconCollectionDomain&&(t?this.setAttribute(b.BEACON_COLLECTION_DOMAIN,t):this.removeAttribute(b.BEACON_COLLECTION_DOMAIN))}get maxResolution(){var t;return(t=this.getAttribute(b.MAX_RESOLUTION))!=null?t:void 0}set maxResolution(t){t!==this.maxResolution&&(t?this.setAttribute(b.MAX_RESOLUTION,t):this.removeAttribute(b.MAX_RESOLUTION))}get minResolution(){var t;return(t=this.getAttribute(b.MIN_RESOLUTION))!=null?t:void 0}set minResolution(t){t!==this.minResolution&&(t?this.setAttribute(b.MIN_RESOLUTION,t):this.removeAttribute(b.MIN_RESOLUTION))}get maxAutoResolution(){var t;return(t=this.getAttribute(b.MAX_AUTO_RESOLUTION))!=null?t:void 0}set maxAutoResolution(t){t==null?this.removeAttribute(b.MAX_AUTO_RESOLUTION):this.setAttribute(b.MAX_AUTO_RESOLUTION,t)}get renditionOrder(){var t;return(t=this.getAttribute(b.RENDITION_ORDER))!=null?t:void 0}set renditionOrder(t){t!==this.renditionOrder&&(t?this.setAttribute(b.RENDITION_ORDER,t):this.removeAttribute(b.RENDITION_ORDER))}get programStartTime(){return ze(this.getAttribute(b.PROGRAM_START_TIME))}set programStartTime(t){t==null?this.removeAttribute(b.PROGRAM_START_TIME):this.setAttribute(b.PROGRAM_START_TIME,`${t}`)}get programEndTime(){return ze(this.getAttribute(b.PROGRAM_END_TIME))}set programEndTime(t){t==null?this.removeAttribute(b.PROGRAM_END_TIME):this.setAttribute(b.PROGRAM_END_TIME,`${t}`)}get assetStartTime(){return ze(this.getAttribute(b.ASSET_START_TIME))}set assetStartTime(t){t==null?this.removeAttribute(b.ASSET_START_TIME):this.setAttribute(b.ASSET_START_TIME,`${t}`)}get assetEndTime(){return ze(this.getAttribute(b.ASSET_END_TIME))}set assetEndTime(t){t==null?this.removeAttribute(b.ASSET_END_TIME):this.setAttribute(b.ASSET_END_TIME,`${t}`)}get extraSourceParams(){return this.hasAttribute(A.EXTRA_SOURCE_PARAMS)?[...new URLSearchParams(this.getAttribute(A.EXTRA_SOURCE_PARAMS)).entries()].reduce((t,[e,i])=>(t[e]=i,t),{}):tA}set extraSourceParams(t){t==null?this.removeAttribute(A.EXTRA_SOURCE_PARAMS):this.setAttribute(A.EXTRA_SOURCE_PARAMS,new URLSearchParams(t).toString())}get customDomain(){var t;return(t=this.getAttribute(b.CUSTOM_DOMAIN))!=null?t:void 0}set customDomain(t){t!==this.customDomain&&(t?this.setAttribute(b.CUSTOM_DOMAIN,t):this.removeAttribute(b.CUSTOM_DOMAIN))}get envKey(){var t;return(t=Di(this,b.ENV_KEY))!=null?t:void 0}set envKey(t){this.setAttribute(b.ENV_KEY,`${t}`)}get noVolumePref(){return this.hasAttribute(A.NO_VOLUME_PREF)}set noVolumePref(t){t?this.setAttribute(A.NO_VOLUME_PREF,""):this.removeAttribute(A.NO_VOLUME_PREF)}get noMutedPref(){return this.hasAttribute(A.NO_MUTED_PREF)}set noMutedPref(t){t?this.setAttribute(A.NO_MUTED_PREF,""):this.removeAttribute(A.NO_MUTED_PREF)}get debug(){return Di(this,b.DEBUG)!=null}set debug(t){t?this.setAttribute(b.DEBUG,""):this.removeAttribute(b.DEBUG)}get disableTracking(){return Di(this,b.DISABLE_TRACKING)!=null}set disableTracking(t){this.toggleAttribute(b.DISABLE_TRACKING,!!t)}get disableCookies(){return Di(this,b.DISABLE_COOKIES)!=null}set disableCookies(t){t?this.setAttribute(b.DISABLE_COOKIES,""):this.removeAttribute(b.DISABLE_COOKIES)}get streamType(){var t,e,i;return(i=(e=this.getAttribute(b.STREAM_TYPE))!=null?e:(t=this.media)==null?void 0:t.streamType)!=null?i:Q.UNKNOWN}set streamType(t){this.setAttribute(b.STREAM_TYPE,`${t}`)}get defaultStreamType(){var t,e,i;return(i=(e=this.getAttribute(A.DEFAULT_STREAM_TYPE))!=null?e:(t=this.mediaController)==null?void 0:t.getAttribute(A.DEFAULT_STREAM_TYPE))!=null?i:Q.ON_DEMAND}set defaultStreamType(t){t?this.setAttribute(A.DEFAULT_STREAM_TYPE,t):this.removeAttribute(A.DEFAULT_STREAM_TYPE)}get targetLiveWindow(){var t,e;return this.hasAttribute(A.TARGET_LIVE_WINDOW)?+this.getAttribute(A.TARGET_LIVE_WINDOW):(e=(t=this.media)==null?void 0:t.targetLiveWindow)!=null?e:Number.NaN}set targetLiveWindow(t){t==this.targetLiveWindow||Number.isNaN(t)&&Number.isNaN(this.targetLiveWindow)||(t==null?this.removeAttribute(A.TARGET_LIVE_WINDOW):this.setAttribute(A.TARGET_LIVE_WINDOW,`${+t}`))}get liveEdgeStart(){var t;return(t=this.media)==null?void 0:t.liveEdgeStart}get startTime(){return ze(Di(this,b.START_TIME))}set startTime(t){this.setAttribute(b.START_TIME,`${t}`)}get preferPlayback(){let t=this.getAttribute(b.PREFER_PLAYBACK);if(t===Wt.MSE||t===Wt.NATIVE)return t}set preferPlayback(t){t!==this.preferPlayback&&(t===Wt.MSE||t===Wt.NATIVE?this.setAttribute(b.PREFER_PLAYBACK,t):this.removeAttribute(b.PREFER_PLAYBACK))}get metadata(){var t;return(t=this.media)==null?void 0:t.metadata}set metadata(t){if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to set metadata. metadata will not be set.");return}this.media.metadata={...Kh(this),...t}}get _hlsConfig(){var t;return(t=this.media)==null?void 0:t._hlsConfig}set _hlsConfig(t){if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to set _hlsConfig. _hlsConfig will not be set.");return}this.media._hlsConfig=t}async addCuePoints(t){var e;if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to addCuePoints. cuePoints will not be added.");return}return(e=this.media)==null?void 0:e.addCuePoints(t)}get activeCuePoint(){var t;return(t=this.media)==null?void 0:t.activeCuePoint}get cuePoints(){var t,e;return(e=(t=this.media)==null?void 0:t.cuePoints)!=null?e:[]}addChapters(t){var e;if(Ee(this,le,_i).call(this),!this.media){nt("underlying media element missing when trying to addChapters. chapters will not be added.");return}return(e=this.media)==null?void 0:e.addChapters(t)}get activeChapter(){var t;return(t=this.media)==null?void 0:t.activeChapter}get chapters(){var t,e;return(e=(t=this.media)==null?void 0:t.chapters)!=null?e:[]}getStartDate(){var t;return(t=this.media)==null?void 0:t.getStartDate()}get currentPdt(){var t;return(t=this.media)==null?void 0:t.currentPdt}get tokens(){let t=this.getAttribute(A.PLAYBACK_TOKEN),e=this.getAttribute(A.DRM_TOKEN),i=this.getAttribute(A.THUMBNAIL_TOKEN),a=this.getAttribute(A.STORYBOARD_TOKEN);return{...z(this,js),...t!=null?{playback:t}:{},...e!=null?{drm:e}:{},...i!=null?{thumbnail:i}:{},...a!=null?{storyboard:a}:{}}}set tokens(t){qt(this,js,t??{})}get playbackToken(){var t;return(t=this.getAttribute(A.PLAYBACK_TOKEN))!=null?t:void 0}set playbackToken(t){this.setAttribute(A.PLAYBACK_TOKEN,`${t}`)}get drmToken(){var t;return(t=this.getAttribute(A.DRM_TOKEN))!=null?t:void 0}set drmToken(t){this.setAttribute(A.DRM_TOKEN,`${t}`)}get thumbnailToken(){var t;return(t=this.getAttribute(A.THUMBNAIL_TOKEN))!=null?t:void 0}set thumbnailToken(t){this.setAttribute(A.THUMBNAIL_TOKEN,`${t}`)}get storyboardToken(){var t;return(t=this.getAttribute(A.STORYBOARD_TOKEN))!=null?t:void 0}set storyboardToken(t){this.setAttribute(A.STORYBOARD_TOKEN,`${t}`)}addTextTrack(t,e,i,a){var r;let n=(r=this.media)==null?void 0:r.nativeEl;if(n)return Vd(n,t,e,i,a)}removeTextTrack(t){var e;let i=(e=this.media)==null?void 0:e.nativeEl;if(i)return Z_(i,t)}get textTracks(){var t;return(t=this.media)==null?void 0:t.textTracks}get castReceiver(){var t;return(t=this.getAttribute(A.CAST_RECEIVER))!=null?t:void 0}set castReceiver(t){t!==this.castReceiver&&(t?this.setAttribute(A.CAST_RECEIVER,t):this.removeAttribute(A.CAST_RECEIVER))}get castCustomData(){var t;return(t=this.media)==null?void 0:t.castCustomData}set castCustomData(t){if(!this.media){nt("underlying media element missing when trying to set castCustomData. castCustomData will not be set.");return}this.media.castCustomData=t}get noTooltips(){return this.hasAttribute(A.NO_TOOLTIPS)}set noTooltips(t){if(!t){this.removeAttribute(A.NO_TOOLTIPS);return}this.setAttribute(A.NO_TOOLTIPS,"")}get proudlyDisplayMuxBadge(){return this.hasAttribute(A.PROUDLY_DISPLAY_MUX_BADGE)}set proudlyDisplayMuxBadge(t){t?this.setAttribute(A.PROUDLY_DISPLAY_MUX_BADGE,""):this.removeAttribute(A.PROUDLY_DISPLAY_MUX_BADGE)}};Qs=new WeakMap,zs=new WeakMap,js=new WeakMap,Hi=new WeakMap,Zs=new WeakMap,ja=new WeakMap,le=new WeakSet,_i=function(){var t,e,i,a;if(!z(this,zs)){qt(this,zs,!0),Ee(this,le,Bi).call(this);try{if(customElements.upgrade(this.mediaTheme),!(this.mediaTheme instanceof Bt.HTMLElement))throw""}catch{nt("<media-theme> failed to upgrade!")}try{customElements.upgrade(this.media)}catch{nt("underlying media element failed to upgrade!")}try{if(customElements.upgrade(this.mediaController),!(this.mediaController instanceof y0))throw""}catch{nt("<media-controller> failed to upgrade!")}Ee(this,le,Gh).call(this),Ee(this,le,Qh).call(this),Ee(this,le,zh).call(this),qt(this,Hi,(e=(t=this.mediaController)==null?void 0:t.hasAttribute(M.USER_INACTIVE))!=null?e:!0),Ee(this,le,jh).call(this),(i=this.media)==null||i.addEventListener("streamtypechange",()=>Ee(this,le,Bi).call(this)),(a=this.media)==null||a.addEventListener("loadstart",()=>Ee(this,le,Bi).call(this))}},ef=function(){var t,e;try{(t=window?.CSS)==null||t.registerProperty({name:"--media-primary-color",syntax:"<color>",inherits:!0}),(e=window?.CSS)==null||e.registerProperty({name:"--media-secondary-color",syntax:"<color>",inherits:!0})}catch{}},Ud=function(t){Object.assign(z(this,ja),t),Ee(this,le,Bi).call(this)},Bi=function(t={}){NT(UT(QT(this,{...z(this,ja),...t})),this.shadowRoot)},Gh=function(){let t=e=>{var i,a;if(!(e!=null&&e.startsWith("theme-")))return;let r=e.replace(/^theme-/,"");if(Pd.includes(r))return;let n=this.getAttribute(e);n!=null?(i=this.mediaTheme)==null||i.setAttribute(r,n):(a=this.mediaTheme)==null||a.removeAttribute(r)};new MutationObserver(e=>{for(let{attributeName:i}of e)t(i)}).observe(this,{attributes:!0}),this.getAttributeNames().forEach(t)},Qh=function(){let t=e=>{var i;let a=(i=this.media)==null?void 0:i.error;if(!(a instanceof R)){let{message:n,code:s}=a??{};a=new R(n,s)}if(!(a!=null&&a.fatal)){Jt(a),a.data&&Jt(`${a.name} data:`,a.data);return}let r=Bh(a);r.message&&zv(r),nt(a),a.data&&nt(`${a.name} data:`,a.data),Ee(this,le,Ud).call(this,{isDialogOpen:!0})};this.addEventListener("error",t),this.media&&(this.media.errorTranslator=(e={})=>{var i,a,r;if(!(((i=this.media)==null?void 0:i.error)instanceof R))return e;let n=Bh((a=this.media)==null?void 0:a.error);return{player_error_code:(r=this.media)==null?void 0:r.error.code,player_error_message:n.message?String(n.message):e.player_error_message,player_error_context:n.context?String(n.context):e.player_error_context}})},zh=function(){var t,e,i,a;let r=()=>Ee(this,le,Bi).call(this);(e=(t=this.media)==null?void 0:t.textTracks)==null||e.addEventListener("addtrack",r),(a=(i=this.media)==null?void 0:i.textTracks)==null||a.addEventListener("removetrack",r)},jh=function(){var t,e;if(!/Firefox/i.test(navigator.userAgent))return;let i,a=new WeakMap,r=()=>this.streamType===Q.LIVE&&!this.secondaryColor&&this.offsetWidth>=800,n=(l,d,m=!1)=>{r()||Array.from(l&&l.activeCues||[]).forEach(p=>{if(!(!p.snapToLines||p.line<-5||p.line>=0&&p.line<10))if(!d||this.paused){let h=p.text.split(`
3310
+ `).length,u=-3;this.streamType===Q.LIVE&&(u=-2);let v=u-h;if(p.line===v&&!m)return;a.has(p)||a.set(p,p.line),p.line=v}else setTimeout(()=>{p.line=a.get(p)||"auto"},500)})},s=()=>{var l,d;n(i,(d=(l=this.mediaController)==null?void 0:l.hasAttribute(M.USER_INACTIVE))!=null?d:!1)},o=()=>{var l,d;let m=Array.from(((d=(l=this.mediaController)==null?void 0:l.media)==null?void 0:d.textTracks)||[]).filter(p=>["subtitles","captions"].includes(p.kind)&&p.mode==="showing")[0];m!==i&&i?.removeEventListener("cuechange",s),i=m,i?.addEventListener("cuechange",s),n(i,z(this,Hi))};o(),(t=this.textTracks)==null||t.addEventListener("change",o),(e=this.textTracks)==null||e.addEventListener("addtrack",o),this.addEventListener("userinactivechange",()=>{var l,d;let m=(d=(l=this.mediaController)==null?void 0:l.hasAttribute(M.USER_INACTIVE))!=null?d:!0;z(this,Hi)!==m&&(qt(this,Hi,m),n(i,z(this,Hi)))})};function Di(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var Zh=iA,tf=class{addEventListener(){}removeEventListener(){}dispatchEvent(t){return!0}};if(typeof DocumentFragment>"u"){class t extends tf{}globalThis.DocumentFragment=t}var aA=class extends tf{},rA={get(t){},define(t,e,i){},getName(t){return null},upgrade(t){},whenDefined(t){return Promise.resolve(aA)}},nA={customElements:rA},sA=typeof window>"u"||typeof globalThis.customElements>"u",gl=sA?nA:globalThis;gl.customElements.get("mux-player")||(gl.customElements.define("mux-player",Zh),gl.MuxPlayerElement=Zh);var af=parseInt(an.version)>=19,Xh={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},oA=t=>t==null,lA=(t,e)=>oA(e)?!1:t in e,dA=t=>t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),uA=(t,e)=>{if(!(!af&&typeof e=="boolean"&&!e)){if(lA(t,Xh))return Xh[t];if(typeof e<"u")return/[A-Z]/.test(t)?dA(t):t}},cA=(t,e)=>!af&&typeof t=="boolean"?"":t,hA=(t={})=>{let{ref:e,...i}=t;return Object.entries(i).reduce((a,[r,n])=>{let s=uA(r,n);if(!s)return a;let o=cA(n);return a[s]=o,a},{})};function Jh(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function mA(...t){return e=>{let i=!1,a=t.map(r=>{let n=Jh(r,e);return!i&&typeof n=="function"&&(i=!0),n});if(i)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():Jh(t[r],null)}}}}function pA(...t){return rn.useCallback(mA(...t),t)}var vA=Object.prototype.hasOwnProperty,fA=(t,e)=>{if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(Array.isArray(t))return!Array.isArray(e)||t.length!==e.length?!1:t.some((r,n)=>e[n]===r);let i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(let r=0;r<i.length;r++)if(!vA.call(e,i[r])||!Object.is(t[i[r]],e[i[r]]))return!1;return!0},rf=(t,e,i)=>!fA(e,t[i]),EA=(t,e,i)=>{t[i]=e},_A=(t,e,i,a=EA,r=rf)=>rn.useEffect(()=>{let n=i?.current;n&&r(n,e,t)&&a(n,e,t)},[i?.current,e]),St=_A,bA=()=>{try{return"3.10.2"}catch{}return"UNKNOWN"},gA=bA(),yA=()=>gA,ne=(t,e,i)=>rn.useEffect(()=>{let a=e?.current;if(!a||!i)return;let r=t,n=i;return a.addEventListener(r,n),()=>{a.removeEventListener(r,n)}},[e?.current,i,t]),TA=an.forwardRef(({children:t,...e},i)=>an.createElement("mux-player",{suppressHydrationWarning:!0,...hA(e),ref:i},t)),AA=(t,e)=>{let{onAbort:i,onCanPlay:a,onCanPlayThrough:r,onEmptied:n,onLoadStart:s,onLoadedData:o,onLoadedMetadata:l,onProgress:d,onDurationChange:m,onVolumeChange:p,onRateChange:h,onResize:u,onWaiting:v,onPlay:E,onPlaying:g,onTimeUpdate:y,onPause:T,onSeeking:_,onSeeked:S,onStalled:C,onSuspend:N,onEnded:$,onError:G,onCuePointChange:J,onChapterChange:K,metadata:U,tokens:Me,paused:Fe,playbackId:Ke,playbackRates:he,currentTime:Pe,themeProps:yt,extraSourceParams:Ue,castCustomData:dt,_hlsConfig:Ve,...ke}=e;return St("tokens",Me,t),St("playbackId",Ke,t),St("playbackRates",he,t),St("metadata",U,t),St("extraSourceParams",Ue,t),St("_hlsConfig",Ve,t),St("themeProps",yt,t),St("castCustomData",dt,t),St("paused",Fe,t,(xe,Je)=>{Je!=null&&(Je?xe.pause():xe.play())},(xe,Je,na)=>xe.hasAttribute("autoplay")&&!xe.hasPlayed?!1:rf(xe,Je,na)),St("currentTime",Pe,t,(xe,Je)=>{Je!=null&&(xe.currentTime=Je)}),ne("abort",t,i),ne("canplay",t,a),ne("canplaythrough",t,r),ne("emptied",t,n),ne("loadstart",t,s),ne("loadeddata",t,o),ne("loadedmetadata",t,l),ne("progress",t,d),ne("durationchange",t,m),ne("volumechange",t,p),ne("ratechange",t,h),ne("resize",t,u),ne("waiting",t,v),ne("play",t,E),ne("playing",t,g),ne("timeupdate",t,y),ne("pause",t,T),ne("seeking",t,_),ne("seeked",t,S),ne("stalled",t,C),ne("suspend",t,N),ne("ended",t,$),ne("error",t,G),ne("cuepointchange",t,J),ne("chapterchange",t,K),[ke]},kA=yA(),SA="mux-player-react",wA=an.forwardRef((t,e)=>{var i;let a=rn.useRef(null),r=pA(a,e),[n]=AA(a,t),[s]=rn.useState((i=t.playerInitTime)!=null?i:Qd());return an.createElement(TA,{ref:r,defaultHiddenCaptions:t.defaultHiddenCaptions,playerSoftwareName:SA,playerSoftwareVersion:kA,playerInitTime:s,...n})}),QA=wA;export{MA as MaxResolution,R as MediaError,xA as MinResolution,OA as RenditionOrder,QA as default,Qd as generatePlayerInitTime,SA as playerSoftwareName,kA as playerSoftwareVersion};