@opendesign-plus-test/components 0.0.1-rc.21 → 0.0.1-rc.23

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 (149) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +428 -137
  3. package/dist/components/OBanner.vue.d.ts +10 -1
  4. package/dist/components/OFooter.vue.d.ts +1 -1
  5. package/dist/components/OHeaderSearch.vue.d.ts +4 -4
  6. package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
  7. package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
  8. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +578 -0
  9. package/dist/components/activity/config.d.ts +15 -0
  10. package/dist/components/activity/data.d.ts +51 -0
  11. package/dist/components/activity/index.d.ts +623 -0
  12. package/dist/components/activity/types.d.ts +76 -0
  13. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +309 -0
  14. package/dist/components/meeting/OMeetingForm.vue.d.ts +156 -0
  15. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +582 -0
  16. package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
  17. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +27 -0
  18. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
  19. package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +12 -0
  20. package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
  21. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
  22. package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
  23. package/dist/components/meeting/config.d.ts +27 -0
  24. package/dist/components/meeting/types.d.ts +140 -0
  25. package/dist/components/meeting/utils.d.ts +21 -0
  26. package/dist/components.cjs.js +224 -3
  27. package/dist/components.css +1 -1
  28. package/dist/components.es.js +43544 -2307
  29. package/dist/index.d.ts +2 -0
  30. package/package.json +6 -3
  31. package/scripts/generate-components-index.js +4 -0
  32. package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
  33. package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
  34. package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
  35. package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
  36. package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
  37. package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
  38. package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
  39. package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
  40. package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
  41. package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
  42. package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
  43. package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
  44. package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
  45. package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
  46. package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
  47. package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
  48. package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
  49. package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
  50. package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
  51. package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
  52. package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
  53. package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
  54. package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
  55. package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
  56. package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
  57. package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
  58. package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
  59. package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
  60. package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
  61. package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
  62. package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
  63. package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
  64. package/src/assets/meeting/transparent.png +0 -0
  65. package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
  66. package/src/assets/svg-icons/icon-filter.svg +3 -0
  67. package/src/assets/svg-icons/icon-loading.svg +4 -0
  68. package/src/assets/svg-icons/icon-search.svg +3 -0
  69. package/src/assets/svg-icons/icon-tips.svg +3 -0
  70. package/src/components/OBanner.vue +11 -3
  71. package/src/components/OFooter.vue +1 -1
  72. package/src/components/activity/OActivityApproval.vue +775 -0
  73. package/src/components/activity/OActivityForm.vue +465 -0
  74. package/src/components/activity/OMyActivityCalendar.vue +1342 -0
  75. package/src/components/activity/config.ts +130 -0
  76. package/src/components/activity/data.ts +365 -0
  77. package/src/components/activity/index.ts +24 -0
  78. package/src/components/activity/types.ts +83 -0
  79. package/src/components/common/MoreText.vue +119 -0
  80. package/src/components/common/ThFilter.vue +326 -0
  81. package/src/components/events/OEventsApply.vue +2 -86
  82. package/src/components/events/OEventsCalendar.vue +0 -25
  83. package/src/components/events/OEventsList.vue +0 -51
  84. package/src/components/events/index.ts +1 -0
  85. package/src/components/meeting/OMeetingCalendar.vue +865 -0
  86. package/src/components/meeting/OMeetingForm.vue +1035 -0
  87. package/src/components/meeting/OMeetingPlayback.vue +439 -0
  88. package/src/components/meeting/OMyMeetingCalendar.vue +1501 -0
  89. package/src/components/meeting/OSigMeetingCalendar.vue +411 -0
  90. package/src/components/meeting/components/OMeetingCalendarList.vue +462 -0
  91. package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
  92. package/src/components/meeting/components/OMeetingDetail.vue +189 -0
  93. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
  94. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
  95. package/src/components/meeting/components/OMyCalendarWrapper.vue +160 -0
  96. package/src/components/meeting/components/OSigMeetingAside.vue +197 -0
  97. package/src/components/meeting/config.ts +110 -0
  98. package/src/components/meeting/index.ts +45 -0
  99. package/src/components/meeting/types.ts +167 -0
  100. package/src/components/meeting/utils.ts +106 -0
  101. package/src/draft/Footer.vue +4 -4
  102. package/src/env.d.ts +15 -0
  103. package/src/i18n/en.ts +140 -0
  104. package/src/i18n/index.ts +18 -4
  105. package/src/i18n/zh.ts +140 -0
  106. package/src/index.ts +2 -0
  107. package/tsconfig.json +6 -2
  108. package/vite.config.ts +25 -9
  109. package/npmcachae/_cacache/content-v2/sha512/05/f7/dd881de8b21208ea65cfce17c65f29964c3897505819f81151b9798a3a6ab1a1114324192354ead15cd2c8d93f76cc9929af168066ec9cc7878d0fd87578 +0 -1
  110. package/npmcachae/_cacache/content-v2/sha512/08/b7/879230f8c2f3765920a6fd6113f4687141f1f645f96af7d95a0dee9113d1095d000fb78a5dd55c1860bbfb9b698ef6281b3874b03b2384222f61fe055fc4 +0 -1
  111. package/npmcachae/_cacache/content-v2/sha512/10/a0/a6626613c03ee052925a762e8675878efdf83dac64fafea43beb2a875f7d7c3907bb0ee30761253cd16021fd58911449594e1d3358675cbb7c48e62f220a +0 -1
  112. package/npmcachae/_cacache/content-v2/sha512/2e/a6/7cbcf55a98bbe2ca881d10e982ebf59211a0ec051eaf46eb1914df66cc35ae502ed6888850e51d8f45cd92695bac16961a642bc41508f8d5160a9ab617ab +0 -1
  113. package/npmcachae/_cacache/content-v2/sha512/92/8d/e5259c5d5cc2a625247f3c4d809192ca9482467e23683d74924a11e91a7997ad890b3d26adaf34df66d5329cc7a5fbde6713110cad05107a0b504e4fd4e8 +0 -1
  114. package/npmcachae/_cacache/content-v2/sha512/e9/45/9597d870127c35681155cec5fe52fde4e1aa0f778b996ee371e856aca850ee4c13aba74b0c3d3a89ff0ea4c9e1d33e64e53c31dc9cede0b31012695ee659 +0 -1
  115. package/npmcachae/_cacache/index-v5/16/4a/7195fcc6857299c4ab7e26014a8ae6e3c396507a2c8db3da1b74b005d574 +0 -3
  116. package/npmcachae/_cacache/index-v5/58/f0/4fe556f104b09be642895a82afa463fe560d9a0dc8f507efeef825a6905e +0 -3
  117. package/npmcachae/_cacache/index-v5/67/7d/0b50dc4c09555fc922ccf43c46994f1a0a5ff47dc0a5d5cf41437ac2d3e6 +0 -3
  118. package/npmcachae/_cacache/index-v5/8f/28/353f8839e030ab11aab3e7d9f1b8c053403e9f593cf6d4aa6ec8fdd7610d +0 -3
  119. package/npmcachae/_cacache/index-v5/97/10/0fcf20eb29d0726bd820822f6729718464b591b0e6901217c956740e943c +0 -3
  120. package/npmcachae/_cacache/index-v5/db/89/a0a4f35f593105624ab39339962d9e9b5cc65ed0c346b0732fb8dd73721d +0 -3
  121. package/npmcachae/_logs/2026-03-26T14_10_35_885Z-debug-0.log +0 -171
  122. package/npmcachae/_logs/2026-03-26T14_10_38_617Z-debug-0.log +0 -4227
  123. package/npmcachae/_logs/2026-03-26T14_10_45_316Z-debug-0.log +0 -4228
  124. package/npmcachae/_logs/2026-03-26T14_10_48_169Z-debug-0.log +0 -4228
  125. package/npmcachae/_logs/2026-03-26T14_10_51_306Z-debug-0.log +0 -464
  126. package/npmcachae/_logs/2026-03-26T14_10_53_911Z-debug-0.log +0 -464
  127. package/npmcachae/_logs/2026-03-26T14_10_56_398Z-debug-0.log +0 -464
  128. package/npmcachae/_logs/2026-03-26T14_10_58_861Z-debug-0.log +0 -464
  129. package/npmcachae/_logs/2026-03-26T14_11_01_337Z-debug-0.log +0 -464
  130. package/npmcachae/_logs/2026-03-26T14_11_03_851Z-debug-0.log +0 -464
  131. package/npmcachae/_logs/2026-03-26T14_11_08_024Z-debug-0.log +0 -464
  132. package/npmcachae/_update-notifier-last-checked +0 -0
  133. package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/3e/17/1865217b9acb9f4921c53a09b5c76587cd2ab748beb2699ff6cfb1341d73b1aa56ed91ffc5ab2c9c9b3fbe626103b35d9a79ff29ff6b8cbb8d89755fe1a2 +0 -1
  134. package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/a6/15/47bb7552ec9248079e839a5feecc1742d4de19524fdf041cf581701cf4760a5025106036145e279ba193b07c8fa5b07ae3d75f1b6032f0cb2219115b6167 +0 -1
  135. package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/d1/4c/133b32e09c97101a27a07cc4432f94e470cff02d120d21babcea77c3f5cd436793516dc1a8e282ee1a568f923c148b1a48f4a43233462a530d35e8b41c67 +0 -1
  136. package/src/components/meeting/npmcachae/_cacache/index-v5/54/0d/a4909047714a0a7198bb9bd37020992464e47c79a791889919b84d90aab0 +0 -3
  137. package/src/components/meeting/npmcachae/_cacache/index-v5/8e/2b/21a79778e2ac08cf5663baf83cb35f951995a496007eb2e2f7fba54021a4 +0 -3
  138. package/src/components/meeting/npmcachae/_cacache/index-v5/eb/a0/b70c8132e5b57a0f1e129b8cc941796420a9c147c0baa680710083740898 +0 -2
  139. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_54_955Z-debug-0.log +0 -277
  140. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_57_842Z-debug-0.log +0 -277
  141. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_00_016Z-debug-0.log +0 -277
  142. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_02_191Z-debug-0.log +0 -277
  143. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_04_425Z-debug-0.log +0 -277
  144. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_06_642Z-debug-0.log +0 -277
  145. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_08_826Z-debug-0.log +0 -277
  146. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_36_140Z-debug-0.log +0 -433
  147. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_39_573Z-debug-0.log +0 -433
  148. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_42_134Z-debug-0.log +0 -212
  149. package/src/components/meeting/npmcachae/_update-notifier-last-checked +0 -0
@@ -1,3 +1,224 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@opensig/opendesign"),Q=require("@opendesign-plus/composables"),H=require("./chunk-OElCookieNotice.cjs.js"),pt=require("@vueuse/core"),_o=require("element-plus"),yo=e.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(o){const t=Symbol("default"),r=o,l=e.computed(()=>r.verticalPadding?i.isBoolean(r.verticalPadding)?t:i.isString(r.verticalPadding)?r.verticalPadding:r.verticalPadding[0]:0),a=e.computed(()=>r.verticalPadding?i.isBoolean(r.verticalPadding)?t:i.isString(r.verticalPadding)?r.verticalPadding:i.isUndefined(r.verticalPadding[1])?r.verticalPadding[0]:r.verticalPadding[1]:0);return(c,m)=>(e.openBlock(),e.createElementBlock("div",{class:"content-wrapper",style:e.normalizeStyle({"--content-wrapper-vertical-paddingTop":l.value===e.unref(t)?void 0:l.value,"--content-wrapper-vertical-paddingBottom":a.value===e.unref(t)?void 0:a.value})},[e.renderSlot(c.$slots,"default",{},void 0,!0)],4))}}),ve=H._export_sfc(yo,[["__scopeId","data-v-29de9f52"]]),Eo={key:0},Bo={class:"banner-content"},No=["src"],wo={key:1,class:"banner-title"},Vo={key:2,class:"banner-subtitle"},So={key:4,class:"banner-opts"},bo=e.defineComponent({__name:"OBanner",props:{options:void 0,size:"large",contentJustifyCenter:!1},setup(o){const t=o,{isLight:r}=Q.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:l}=Q.useScreen(),a=e.computed(()=>t.options),c=e.ref(""),m=s=>{setTimeout(()=>{c.value=a.value[s].bg_theme??"light"},100)},p=(s,y)=>{s&&!y&&window.open(s)};return(s,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["home-banner",o.size])},[o.size==="tiny"?(e.openBlock(),e.createElementBlock("div",Eo,e.toDisplayString(a.value[1].title),1)):e.unref(l)?(e.openBlock(),e.createBlock(e.unref(i.OCarousel),{key:2,class:"banner-carousel",effect:"gallery","indicator-click":"","data-o-theme":c.value,arrow:"never","auto-play":!0,onBeforeChange:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,h)=>(e.openBlock(),e.createBlock(e.unref(i.OCarouselItem),{class:e.normalizeClass(["banner-item",`banner-item${h}`])},{default:e.withCtx(()=>[e.createVNode(ve,{class:"banner-wrapper"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OFigure),{class:"banner-bg",src:u.bg,onClick:V=>p(u.href)},null,8,["src","onClick"])]),_:2},1024)]),_:2},1032,["class"]))),256))]),_:1},8,["data-o-theme"])):(e.openBlock(),e.createBlock(e.unref(i.OCarousel),{key:1,class:"banner-carousel",effect:"toggle","active-class":"current-slide","indicator-click":"","auto-play":!0,"data-o-theme":c.value,onBeforeChange:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,h)=>(e.openBlock(),e.createBlock(e.unref(i.OCarouselItem),{key:h,class:e.normalizeClass(["banner-item",`banner-item${h}`])},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OFigure),{class:e.normalizeClass(["banner-bg",{"with-sticky-bg":u.withStickyBg,"in-dark":!e.unref(r),"cursor-pointer":u.href&&!u.btn}]),src:u.bg,style:e.normalizeStyle({"--pad-offset":u.pad_offset}),onClick:V=>p(u.href,u.btn)},{default:e.withCtx(()=>[e.createVNode(ve,{class:e.normalizeClass(["banner-wrapper",["banner-wrapper",o.contentJustifyCenter?"content-center":""]])},{default:e.withCtx(()=>[e.createElementVNode("div",Bo,[!e.unref(l)&&u.attach?(e.openBlock(),e.createElementBlock("img",{key:0,src:u.attach,class:"banner-attach"},null,8,No)):e.createCommentVNode("",!0),u.title?(e.openBlock(),e.createElementBlock("div",wo,e.toDisplayString(u.title),1)):e.createCommentVNode("",!0),u.subtitle?(e.openBlock(),e.createElementBlock("div",Vo,e.toDisplayString(u.subtitle),1)):e.createCommentVNode("",!0),u.bg_text?(e.openBlock(),e.createElementBlock("div",{key:3,class:"banner-text",style:e.normalizeStyle({backgroundImage:`url(${u.bg_text})`,"--pc-width":u.pc_text_width,"--pc-height":u.pc_text_height,"--pad-width":u.pad_text_width,"--pad-height":u.pad_text_height})},null,4)):e.createCommentVNode("",!0),u.btn?(e.openBlock(),e.createElementBlock("div",So,[e.createVNode(e.unref(i.OButton),{href:u.href,target:"_blank",variant:"solid",color:"primary",size:o.size},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.btn),1)]),_:2},1032,["href","size"])])):e.createCommentVNode("",!0)])]),_:2},1032,["class"])]),_:2},1032,["src","class","style","onClick"])]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"]))],2))}}),Zt=H._export_sfc(bo,[["__scopeId","data-v-a5902620"]]),Lo={key:0,class:"cookie-notice"},Oo={class:"cookie-notice-content"},$o=["type"],Do={class:"cookie-notice-left"},xo={key:0,class:"cookie-desc",style:{"margin-top":"0"}},To=["href"],Ao={class:"cookie-title"},Io={class:"cookie-desc"},Mo=["href"],Ro={key:0,class:"cookie-notice-right"},zo={class:"cookie-dlg-title"},Fo={class:"cookie-dlg-content"},Po={class:"content-item"},Ho={class:"item-header"},Uo={class:"item-title"},Wo={class:"item-extra"},Go={class:"item-detail"},jo={class:"content-item"},qo={class:"item-header"},Ko={class:"item-title"},Zo={class:"item-extra"},Yo={class:"item-detail"},Xo="0",At="1",Jo="2",Ae="3",Qo="agreed-cookiepolicy-zh",en="agreed-cookiepolicy-en",tn=e.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},enableGrid:{type:Boolean},community:{},detailUrl:{},wrapper:{},cookieDomain:{}},emits:["update:visible"],setup(o,{expose:t,emit:r}){const l=o,a=r,{lePadV:c,leLaptop:m}=Q.useScreen(),{locale:p,t:s}=H.useI18n(),y=e.computed(()=>p.value==="zh"),u=e.computed(()=>y.value?Qo:en),h=e.ref(!1),V=pt.useVModel(l,"visible",a,{defaultValue:!1}),E=z=>{const I=document.cookie.split(";").find(D=>D.split("=")[0].trim()===encodeURIComponent(z));return I?decodeURIComponent(I.split("=")[1]):null},N=(z,I,D,C)=>{const B=`; max-age=${D*24*60*60}`;document.cookie=`${encodeURIComponent(z)}=${encodeURIComponent(I)}${B}; path=/; domain=${C}`},w=(z,I)=>{document.cookie=`${encodeURIComponent(z)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${I}`},k=z=>{typeof z=="boolean"?V.value=z:V.value=!V.value,e.nextTick(()=>{!V.value&&y.value&&E(u.value)!==Ae&&N(u.value,Ae,180,l.cookieDomain??location.hostname)})},S=e.ref(!1),R=z=>{typeof z=="boolean"?S.value=z:S.value=!S.value},g=()=>y.value?E(u.value)!==Ae:(E(u.value)??"0")===Xo,L=()=>y.value?E(u.value)===Ae:E(u.value)===At;e.onMounted(()=>{g()&&k(!0)}),e.watch(p,()=>{k(g())});const O=()=>{h.value=!0,w(u.value,l.cookieDomain??location.hostname),N(u.value,At,180,l.cookieDomain??location.hostname),k(!1)},$=()=>{h.value=!1,w(u.value,l.cookieDomain??location.hostname),N(u.value,Jo,180,l.cookieDomain??location.hostname),k(!1)},F=e.computed(()=>[{id:"save",color:"primary",label:s("cookie.saveSetting"),variant:"outline",size:"large",round:"pill",onClick:()=>{h.value?O():$(),R(!1)}},{id:"allowAll",color:"primary",label:s("cookie.acceptAll"),variant:"outline",size:"large",round:"pill",onClick:()=>{h.value=!0,O(),R(!1)}}]),ne=z=>{z&&(h.value=L())};return t({check(){L()===V.value&&k()}}),(z,I)=>(e.openBlock(),e.createBlock(e.unref(H.ClientOnly),null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:o.wrapper||"#app"},[e.unref(V)?(e.openBlock(),e.createElementBlock("div",Lo,[e.createElementVNode("div",Oo,[e.createElementVNode("div",{type:e.unref(p),class:e.normalizeClass({"cookie-notice-wrap-grid":o.enableGrid,"cookie-notice-wrap":!o.enableGrid})},[e.createElementVNode("div",Do,[y.value?(e.openBlock(),e.createElementBlock("p",xo,[e.createTextVNode(e.toDisplayString(e.unref(s)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:o.detailUrl,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(s)("cookie.about")),9,To)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("p",Ao,e.toDisplayString(e.unref(s)("cookie.title",[o.community])),1),e.createElementVNode("p",Io,[e.createTextVNode(e.toDisplayString(e.unref(s)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:o.detailUrl,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(s)("cookie.about")),9,Mo),I[4]||(I[4]=e.createTextVNode(". ",-1))])],64))]),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ro,[e.createVNode(e.unref(i.OButton),{round:"pill",variant:"outline",color:"primary",onClick:O},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("cookie.acceptAll")),1)]),_:1}),e.createVNode(e.unref(i.OButton),{round:"pill",variant:"outline",color:"primary",onClick:$},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("cookie.rejectAll")),1)]),_:1}),e.createVNode(e.unref(i.OButton),{round:"pill",variant:"outline",color:"primary",onClick:I[0]||(I[0]=D=>R(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("cookie.manage")),1)]),_:1})])),e.createVNode(e.unref(i.OIcon),{class:"cookie-notice-close",type:e.unref(p),onClick:I[1]||(I[1]=D=>k(!1))},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OIconClose))]),_:1},8,["type"])],10,$o)]),e.createVNode(e.unref(i.ODialog),{visible:S.value,"onUpdate:visible":I[3]||(I[3]=D=>S.value=D),size:e.unref(m)?"medium":"large","phone-half-full":e.unref(c),class:"cookie-dlg",actions:F.value,onChange:ne},{header:e.withCtx(()=>[e.createElementVNode("span",zo,e.toDisplayString(e.unref(s)("cookie.manage")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",Fo,[e.createElementVNode("div",Po,[e.createElementVNode("div",Ho,[e.createElementVNode("span",Uo,e.toDisplayString(e.unref(s)("cookie.necessaryCookie")),1),e.createElementVNode("span",Wo,e.toDisplayString(e.unref(s)("cookie.alwaysOn")),1)]),e.createElementVNode("div",Go,e.toDisplayString(e.unref(s)("cookie.necessaryCookieDetail")),1)]),e.createElementVNode("div",jo,[e.createElementVNode("div",qo,[e.createElementVNode("span",Ko,e.toDisplayString(e.unref(s)("cookie.analyticalCookie")),1),e.createElementVNode("span",Zo,[e.createVNode(e.unref(i.OSwitch),{modelValue:h.value,"onUpdate:modelValue":I[2]||(I[2]=D=>h.value=D)},null,8,["modelValue"])])]),e.createElementVNode("div",Yo,e.toDisplayString(e.unref(s)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","actions"])])):e.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),Yt=H._export_sfc(tn,[["__scopeId","data-v-f1dd144c"]]),on={key:0,class:"atom"},nn={class:"atom-text"},rn=["href"],an=["src"],ln={key:0,class:"quick-nav"},cn={class:"category-title"},sn={class:"navs"},dn=["href"],un={key:0,class:"friendship-link"},mn={class:"friendship-link-title"},pn={class:"friendship-link-box"},fn=["href"],hn={key:0,class:"footer-logo"},vn=["src"],kn=["src"],gn=["href"],Cn={key:1,class:"footer-option"},_n={class:"footer-option-item"},yn=["href"],En={class:"license"},Bn={class:"copyright"},Nn={class:"filing"},wn=["href"],Vn=["src"],Sn={key:2,class:"footer-right"},bn={key:0,class:"code-box"},Ln=["src"],On={class:"code-layer"},$n=["src"],Dn={class:"txt"},xn={class:"app-footer-pc"},Tn={key:0,class:"footer-left"},An=["href"],In=["src"],Mn={key:0,class:"footer-right"},Rn=["href"],zn={class:"app-footer-mb"},Fn={key:0,class:"links"},Pn=["href"],Hn={class:"copyright"},Un={key:0,class:"approval"},Wn=["href"],Gn=["src"],jn=e.defineComponent({__name:"OFooter",props:{simple:!1,atom:void 0,lang:void 0,quickNav:void 0,friendshipLink:void 0,footerLogo:void 0,footerOption:void 0,qrcode:void 0,footerBg:void 0},setup(o){const t=o;return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([t.simple?"app-footer-simple":"app-footer"])},[t.simple?(e.openBlock(),e.createBlock(ve,{key:1},{default:e.withCtx(()=>[e.createElementVNode("div",xn,[r.$slots.left||t.footerOption?e.renderSlot(r.$slots,"left",{key:0},()=>[t.footerOption?(e.openBlock(),e.createElementBlock("div",Tn,[e.createElementVNode("span",null,e.toDisplayString(t.footerOption[t.lang].copyright),1),e.createElementVNode("a",{class:"approval",href:t.footerOption[t.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(t.footerOption[t.lang].beianInfo1),9,An),e.createElementVNode("img",{class:"police-img",src:t.footerOption[t.lang].policeIcon},null,8,In),e.createElementVNode("span",null,e.toDisplayString(t.footerOption[t.lang].beianInfo2),1)])):e.createCommentVNode("",!0)],!0):e.createCommentVNode("",!0),r.$slots.right||t.footerOption?e.renderSlot(r.$slots,"right",{key:1},()=>[t.footerOption?(e.openBlock(),e.createElementBlock("div",Mn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.footerOption[t.lang].link,(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.url},[e.createElementVNode("a",{target:"_blank",href:a.url,class:"link"},e.toDisplayString(a.name),9,Rn),c!==t.footerOption[t.lang].link.length-1?(e.openBlock(),e.createBlock(e.unref(i.ODivider),{key:0,direction:"v"})):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],!0):e.createCommentVNode("",!0)]),e.createElementVNode("div",zn,[r.$slots.right||t.footerOption?e.renderSlot(r.$slots,"right",{key:0},()=>[t.footerOption?(e.openBlock(),e.createElementBlock("div",Fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.footerOption[t.lang].link,(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.url},[e.createElementVNode("a",{target:"_blank",href:a.url,class:"link"},e.toDisplayString(a.name),9,Pn),c!==t.footerOption[t.lang].link.length-1?(e.openBlock(),e.createBlock(e.unref(i.ODivider),{key:0,direction:"v"})):e.createCommentVNode("",!0)],64))),128))])):e.createCommentVNode("",!0)],!0):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"copyright",{},()=>[e.createElementVNode("div",Hn,e.toDisplayString(t.footerOption[t.lang].copyright),1)],!0),r.$slots.left||t.footerOption?e.renderSlot(r.$slots,"left",{key:1},()=>[t.footerOption?(e.openBlock(),e.createElementBlock("div",Un,[e.createElementVNode("a",{href:t.footerOption[t.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(t.footerOption[t.lang].beianInfo1),9,Wn),e.createElementVNode("img",{class:"police-img",src:t.footerOption[t.lang].policeIcon},null,8,Gn),e.createElementVNode("span",null,e.toDisplayString(t.footerOption[t.lang].beianInfo2),1)])):e.createCommentVNode("",!0)],!0):e.createCommentVNode("",!0)])]),_:3})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[r.$slots.atom||t.atom?(e.openBlock(),e.createBlock(ve,{key:0},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"atom",{},()=>[t.atom?(e.openBlock(),e.createElementBlock("div",on,[e.createElementVNode("p",nn,e.toDisplayString(t.atom[t.lang].title),1),e.createElementVNode("a",{href:t.atom[t.lang].href,target:"_blank"},[e.createElementVNode("img",{src:t.atom[t.lang].img,class:"atom-logo",alt:""},null,8,an)],8,rn)])):e.createCommentVNode("",!0),e.createVNode(e.unref(i.ODivider),{class:"atom-divider"})],!0)]),_:3})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"footer-content",style:e.normalizeStyle({backgroundImage:`url(${t.footerBg})`})},[e.createVNode(ve,null,{default:e.withCtx(()=>[r.$slots.quickNav||t.quickNav?e.renderSlot(r.$slots,"quickNav",{key:0},()=>[t.quickNav?(e.openBlock(),e.createElementBlock("div",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.quickNav[t.lang],a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"category"},[e.createElementVNode("div",cn,e.toDisplayString(a.title),1),e.createElementVNode("ul",sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.list,c=>(e.openBlock(),e.createElementBlock("li",{key:c.title,class:"nav"},[e.createElementVNode("a",{href:c.link,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(c.title),9,dn)]))),128))])]))),128))])):e.createCommentVNode("",!0)],!0):e.createCommentVNode("",!0),r.$slots.friendshipLink||t.friendshipLink?e.renderSlot(r.$slots,"friendshipLink",{key:1},()=>[t.friendshipLink?(e.openBlock(),e.createElementBlock("div",un,[e.createElementVNode("div",mn,e.toDisplayString(t.friendshipLink.title[t.lang]),1),e.createElementVNode("div",pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.friendshipLink.link[t.lang],a=>(e.openBlock(),e.createElementBlock("a",{href:a.link,key:a.link,target:"_blank"},e.toDisplayString(a.title),9,fn))),128))])])):e.createCommentVNode("",!0)],!0):e.createCommentVNode("",!0),e.renderSlot(r.$slots,"footer",{},()=>[e.createElementVNode("div",{class:e.normalizeClass(["inner",{"inner-en":t.lang==="en"}])},[t.footerLogo?(e.openBlock(),e.createElementBlock("div",hn,[e.createElementVNode("img",{class:"show-pc",src:t.footerLogo.logo,alt:""},null,8,vn),e.createElementVNode("img",{class:"show-mo",src:t.footerLogo.logoMb,alt:""},null,8,kn),e.createElementVNode("p",null,[e.createElementVNode("a",{class:"email",href:`mailto:${t.footerLogo.email}`,target:"_blank"},e.toDisplayString(t.footerLogo.email),9,gn)])])):e.createCommentVNode("",!0),t.footerOption?(e.openBlock(),e.createElementBlock("div",Cn,[e.createElementVNode("div",_n,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.footerOption[t.lang].link,(a,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.url},[e.createElementVNode("a",{target:"_blank",href:a.url},e.toDisplayString(a.name),9,yn),c!==t.footerOption[t.lang].link.length-1?(e.openBlock(),e.createBlock(e.unref(i.ODivider),{key:0,style:{"--o-divider-bd-color":"var(--o-color-info3-inverse)","--o-divider-label-gap":"0 8px"},direction:"v"})):e.createCommentVNode("",!0)],64))),128))]),e.createElementVNode("p",En,[e.createElementVNode("span",null,e.toDisplayString(t.footerOption[t.lang].licenseText),1),e.createTextVNode(" "+e.toDisplayString(t.footerOption[t.lang].licenseInfo),1)]),e.createElementVNode("div",Bn,[e.createElementVNode("p",null,e.toDisplayString(t.footerOption[t.lang].copyright),1),e.createElementVNode("div",Nn,[e.createElementVNode("a",{href:t.footerOption[t.lang].beianLink,target:"_blank"},e.toDisplayString(t.footerOption[t.lang].beianInfo1),9,wn),e.createElementVNode("img",{src:t.footerOption[t.lang].policeIcon,class:"filing-img"},null,8,Vn),e.createElementVNode("p",null,e.toDisplayString(t.footerOption[t.lang].beianInfo2),1)])])])):e.createCommentVNode("",!0),t.qrcode?(e.openBlock(),e.createElementBlock("div",Sn,[t.lang==="zh"?(e.openBlock(),e.createElementBlock("div",bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.qrcode,(a,c)=>(e.openBlock(),e.createElementBlock("div",{key:c,class:"code-pop"},[e.createElementVNode("img",{src:a.img,class:"code-img",alt:""},null,8,Ln),e.createElementVNode("div",On,[e.createElementVNode("img",{src:a.code,alt:""},null,8,$n),e.createElementVNode("p",Dn,e.toDisplayString(a.label),1)])]))),128))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),Xt=H._export_sfc(jn,[["__scopeId","data-v-f095d641"]]),qn={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Kn(o,t){return e.openBlock(),e.createElementBlock("svg",qn,[...t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M9.461 11.616l4.719-3.932c0.212-0.177 0.527-0.148 0.704 0.064 0.075 0.090 0.116 0.203 0.116 0.32v7.865c0 0.276-0.224 0.5-0.5 0.5-0.117 0-0.23-0.041-0.32-0.116l-4.719-3.932c-0.212-0.177-0.241-0.492-0.064-0.704 0.019-0.023 0.041-0.045 0.064-0.064z"},null,-1)])])}const Zn={name:"components-icon-caret-left",render:Kn},Yn={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Xn(o,t){return e.openBlock(),e.createElementBlock("svg",Yn,[...t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M14.539 11.616l-4.719-3.932c-0.212-0.177-0.527-0.148-0.704 0.064-0.075 0.090-0.116 0.203-0.116 0.32v7.865c0 0.276 0.224 0.5 0.5 0.5 0.117 0 0.23-0.041 0.32-0.116l4.719-3.932c0.212-0.177 0.241-0.492 0.064-0.704-0.019-0.023-0.041-0.045-0.064-0.064z"},null,-1)])])}const Jn={name:"components-icon-caret-right",render:Xn},Qn={class:"header-content"},er={key:0,class:"right-icon"},tr=["onMouseenter"],or=["id"],nr={class:"nav-drop-content"},rr={class:"nav-sub-content"},ar={class:"content-left"},lr={class:"content-label"},cr={class:"content-container"},sr=["onClick"],ir={class:"item-name"},dr={key:0,class:"desc-container"},ur=["title"],mr={key:0,class:"split-line"},pr={key:1,class:"content-right"},fr=["onClick"],hr=["onClick"],vr=["src"],kr={class:"review-content"},gr={class:"review-label"},Cr={class:"review-property"},_r={key:1,class:"right-icon"},yr=e.defineComponent({__name:"HeaderEulerNav",props:{navData:void 0,bgLeft:void 0,bgRight:void 0},setup(o){const t=o,{locale:r}=Q.useLocale(),{theme:l,isDark:a}=Q.useTheme(),c=e.ref(),m=e.ref(),p=e.ref(null),s=e.ref(!1),y=e.ref(!1),u=e.ref(!1),h=e.ref(),V=e.ref([]),E=e.ref([]),N=e.ref(!1),w=pt.useDebounceFn(function($){$===null?(h.value="",u.value=!1,N.value=!1):(h.value=$.id,u.value=!0,V.value=$.children,E.value=$.shortcut,N.value=$.withPicture)},100),k=($,F)=>{window.open($,F),h.value="",u.value=!1},S=e.ref(!1),R=$=>{!$||!$.target||(S.value=$.target.clientHeight<$.target.scrollHeight)},g=()=>{y.value=!0,e.nextTick(()=>{c.value.scrollTo({left:c.value.clientWidth,behavior:"smooth"})})},L=()=>{c.value.scrollTo({left:0,behavior:"smooth"}),y.value=!1},O=()=>{var $,F;(($=c.value)==null?void 0:$.clientWidth)<((F=m.value)==null?void 0:F.clientWidth)&&(s.value=!0)};return e.onMounted(()=>{window.addEventListener("resize",O),e.nextTick(()=>{O(),p.value=setTimeout(()=>{O()},1e3)})}),e.onUnmounted(()=>{window.removeEventListener("resize",O),clearTimeout(p.value)}),($,F)=>(e.openBlock(),e.createElementBlock("div",Qn,[e.createElementVNode("div",{class:e.normalizeClass(["header-nav",{"header-nav-scroll":y.value}])},[y.value?(e.openBlock(),e.createElementBlock("div",er,[e.createVNode(e.unref(i.OIcon),{onClick:L},{default:e.withCtx(()=>[e.createVNode(e.unref(Zn))]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("nav",{ref_key:"navRef",ref:c,class:e.normalizeClass(["o-nav",{"o-nav-scroll":y.value||!s.value,dark:e.unref(a)}])},[e.createElementVNode("ul",{ref_key:"navListRef",ref:m,class:"o-nav-list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.navData,ne=>(e.openBlock(),e.createElementBlock("li",{key:ne.id,onMouseenter:z=>e.unref(w)(ne),onMouseleave:F[1]||(F[1]=z=>e.unref(w)(null))},[e.createElementVNode("span",{id:"tour_headerNav_"+ne.ID,class:"nav-item"},e.toDisplayString(ne.label),9,or),e.createVNode(e.Transition,{name:"transition"},{default:e.withCtx(()=>[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["nav-dropdown",h.value,e.unref(l),`${h.value}-${e.unref(r)}`])},[e.createElementVNode("div",nr,[e.createElementVNode("div",{class:"nav-background-left",style:e.normalizeStyle({backgroundImage:`url(${t.bgLeft})`})},null,4),e.createElementVNode("div",{class:"nav-background-right",style:e.normalizeStyle({backgroundImage:`url(${t.bgRight})`})},null,4),e.createVNode(e.unref(i.OScroller),{class:"nav-scroller","show-type":"always",size:"small","disabled-y":""},{default:e.withCtx(()=>{var z,I;return[e.createElementVNode("div",rr,[e.createElementVNode("div",ar,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(D,C)=>(e.openBlock(),e.createElementBlock("div",{class:"item-sub",key:C},[e.createElementVNode("span",lr,e.toDisplayString(D.label),1),e.createElementVNode("div",cr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.children,B=>(e.openBlock(),e.createElementBlock("div",{key:B.label,class:"content-item"},[e.createElementVNode("a",{onClick:M=>k(B.href,"_self"),rel:"noopener noreferrer",class:"item-label"},[e.createElementVNode("span",ir,e.toDisplayString(B.label),1),B.icon?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B.icon),{class:"icon"}))]),_:2},1024)):e.createCommentVNode("",!0),B.tag?(e.openBlock(),e.createBlock(e.unref(i.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.tag),1)]),_:2},1024)):e.createCommentVNode("",!0)],8,sr),B.description?(e.openBlock(),e.createElementBlock("div",dr,[e.createElementVNode("p",{class:"item-desc",title:S.value?B.description:null,onMouseenter:F[0]||(F[0]=M=>R(M))},e.toDisplayString(B.description),41,ur)])):e.createCommentVNode("",!0)]))),128))])]))),128))]),(z=E.value)!=null&&z.length?(e.openBlock(),e.createElementBlock("div",mr)):e.createCommentVNode("",!0),(I=E.value)!=null&&I.length?(e.openBlock(),e.createElementBlock("div",pr,[F[2]||(F[2]=e.createElementVNode("span",{class:"content-label"},"快捷链接",-1)),N.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(E.value,D=>(e.openBlock(),e.createElementBlock("a",{key:D.label,onClick:C=>k(D.href,"_self"),rel:"noopener noreferrer",class:"review"},[e.createElementVNode("img",{src:D.picture,class:"review-picture"},null,8,vr),e.createElementVNode("div",kr,[e.createElementVNode("p",gr,e.toDisplayString(D.label),1),e.createElementVNode("div",Cr,[e.createElementVNode("span",null,e.toDisplayString(D.remark),1)])])],8,hr))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(E.value,D=>(e.openBlock(),e.createElementBlock("div",{key:D.label,class:"shortcut"},[e.createElementVNode("a",{onClick:C=>k(D.href,"_self"),rel:"noopener noreferrer",class:"shortcut-link"},[e.createElementVNode("span",null,e.toDisplayString(D.label),1),D.icon?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D.icon),{class:"icon"}))]),_:2},1024)):e.createCommentVNode("",!0)],8,fr)]))),128))])):e.createCommentVNode("",!0)])]}),_:1})])],2)):e.createCommentVNode("",!0)]),_:1})],40,tr))),128))],512)],2),s.value&&!y.value?(e.openBlock(),e.createElementBlock("div",_r,[e.createVNode(e.unref(i.OIcon),{onClick:g},{default:e.withCtx(()=>[e.createVNode(e.unref(Jn))]),_:1})])):e.createCommentVNode("",!0)],2)]))}}),Er=H._export_sfc(yr,[["__scopeId","data-v-d3d0a9ef"]]),Br=["id","onMouseenter","onMouseleave"],Nr=["href"],wr={key:1,class:"info-wrap"},Vr={class:"dropdown-wrapper"},Sr={key:0,class:"tab-disabled"},br={key:1,class:"tab-expand"},Lr=["href","target","rel"],Or={class:"dropdown-body-wrapper",style:{display:"none !important"}},$r=["onMouseenter"],Dr={key:0,class:"dropdown-item"},xr={class:"tab-disabled"},Tr={key:1,class:"dropdown-item"},Ar=["href","target","rel"],Be="more",Ir=e.defineComponent({__name:"HeaderUbmcNav",props:{navData:void 0,hasPerm:void 0,tagMap:void 0,currentPath:void 0},setup(o){const t=o,{locale:r}=Q.useLocale(),{lePadV:l}=Q.useScreen(),a={},c=e.ref({}),m=e.ref(-1),p=C=>{m.value=C},s=C=>{var B;m.value=-1,(B=c.value[C])==null||B.clearCheckedNodes()},y=e.ref(-1),u=()=>{var B;const C=(B=a==null?void 0:a.fullPath)==null?void 0:B.split("/").slice(0,3).join("/");y.value=[...N.value,E.value].findIndex(M=>{var A,X;const x=C==null?void 0:C.indexOf("#");return F.value.length&&!F.value.includes(M.id)&&M.id!==Be?!1:D(M.href)===C||((A=M.children)==null?void 0:A.some(_=>{var ce;return(ce=_.children)!=null&&ce.length?_.children.some(le=>D(le.href)===C):D(_.href)===C}))||((X=M.keys)==null?void 0:X.includes(C==null?void 0:C.slice(1,x!==-1?x:C==null?void 0:C.length)))})};e.onMounted(()=>{u()}),e.watch(()=>a.path,()=>{u()});const h=(C,B)=>{let M=!0;return C&&(M=M&&new Date(C).getTime()>=Date.now()),B&&(M=M&&r.value===B),M},V=(C,B)=>C.checkPermKey?B[C.checkPermKey]:!0,E=e.computed(()=>({id:Be,label:"更多",children:N.value.filter(C=>!F.value.includes(C.id))||[]})),N=e.computed(()=>{const C=[];let B=[];const M={meeting:t.hasPerm};try{B=t.navData.filter(x=>V(x,M)).map(function x(A){C.push(A.label);const X={...A,_path:[...C]};return A.children&&(X.children=A.children.filter(_=>V(_,M)).map(x)),C.pop(),X})}catch{B=t.navData}return B});let w=0,k=0;const S=C=>{const B=Date.now()-w,M=k+1;if(w=0,k=0,C._path){const x={};return C._path.forEach((A,X)=>{x[`level${X+1}`]=A}),{properties:{module:"navigation",timeUsed:B,steps:M,...x}}}},R=C=>{if(k++,!w)return w=Date.now(),{event:"hover",properties:{module:"navigation",target:C.label}}},g=()=>{w=0,k=0},L=C=>C?C.startsWith("http"):!1,O=e.ref(null),$=e.ref(null),F=e.ref([]),ne=e.ref(null),z=e.ref(0),I=()=>{if(!O.value)return;if(F.value=[],z.value=O.value.clientWidth,l.value&&(F.value=N.value.map(A=>A.id)),O.value.clientWidth>=$.value.clientWidth){F.value=N.value.map(A=>A.id);return}z.value=0;const C=$.value.querySelector(`li.nav-item#${Be}`);let B=O.value.clientWidth-C.clientWidth;const M=$.value.querySelectorAll("li.nav-item");let x=!1;[...M].forEach((A,X)=>{A.id!==Be&&B>A.clientWidth&&!x?(B-=A.clientWidth,F.value.push(N.value[X].id),z.value+=A.clientWidth):x=!0})};e.onMounted(()=>{window.addEventListener("resize",I),e.nextTick(()=>{I(),ne.value=setTimeout(()=>{I()},1e3)})}),e.onUnmounted(()=>{window.removeEventListener("resize",I),clearTimeout(ne.value)}),e.watch(()=>N.value,()=>{e.nextTick(()=>{I()})},{deep:!0});const D=C=>(C==="/"&&(C=""),L(C)?C:`/${r.value}${C}`);return(C,B)=>{const M=e.resolveDirective("analytics");return e.openBlock(),e.createElementBlock("nav",{class:"header-nav-ubmc",ref_key:"wrapperRef",ref:O},[e.createElementVNode("ul",{class:"nav-list",onMouseleave:g,ref_key:"listRef",ref:$,style:e.normalizeStyle({"--more-left":z.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList([...N.value,E.value],(x,A)=>{var X;return e.withDirectives((e.openBlock(),e.createElementBlock("li",{key:x.id,id:x.id,class:e.normalizeClass(["nav-item",{"is-selected":y.value===A,"is-active":m.value===A,hidden:!F.value.includes(x.id)&&x.id!==Be||x.id===Be&&x.children.length===0}]),onMouseenter:_=>p(A),onMouseleave:_=>s(A)},[!((X=x.children)!=null&&X.length)&&x.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"info-wrap clickable",href:D(x.href)},[e.createElementVNode("span",null,[e.createElementVNode("span",null,e.toDisplayString(x.label),1)])],8,Nr)):(e.openBlock(),e.createElementBlock("div",wr,[e.createElementVNode("span",null,[e.createElementVNode("span",null,e.toDisplayString(x.label),1)]),e.createElementVNode("div",Vr,[e.createVNode(e.unref(_o.ElCascaderPanel),{options:x.children,value:"id",expandTrigger:"hover",ref_for:!0,ref:_=>c.value[A]=_},{default:e.withCtx(({data:_})=>{var ce;return[_.disabled?(e.openBlock(),e.createElementBlock("div",Sr,[e.createElementVNode("span",null,e.toDisplayString(_.label),1),B[0]||(B[0]=e.createElementVNode("span",{class:"disabled-tag"},"待上线",-1))])):_!=null&&_.children?(e.openBlock(),e.createElementBlock("div",br,[e.createElementVNode("span",null,e.toDisplayString(_.label),1),e.createVNode(e.unref(i.OIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(i.OIconChevronRight))]),_:1})])):(e.openBlock(),e.createElementBlock("a",{key:2,href:D(_.href),class:"dropdown-link",target:L(_.href)?"_blank":"_self",rel:L(_.href)?"noopener noreferrer":""},[e.createElementVNode("span",null,e.toDisplayString(_.label),1),(o.tagMap[(ce=_==null?void 0:_.href)==null?void 0:ce.slice(1)]||_.tag)&&h(_.tagExpire,_.tagLang)?(e.openBlock(),e.createBlock(e.unref(i.OTag),{key:0,color:"danger",size:"small",round:"pill"},{default:e.withCtx(()=>{var le;return[e.createTextVNode(e.toDisplayString(o.tagMap[(le=_==null?void 0:_.href)==null?void 0:le.slice(1)]||_.tag),1)]}),_:2},1024)):e.createCommentVNode("",!0),_.icon?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:1,class:"jump-out-icon"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.icon),{class:"icon"}))]),_:2},1024)):e.createCommentVNode("",!0)],8,Lr))]}),_:1},8,["options"]),e.createElementVNode("div",Or,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.children,(_,ce)=>{var le;return e.openBlock(),e.createElementBlock("div",{class:"dropdown-body",key:ce,onMouseenter:Ne=>p(A),onMouseleave:s},[_.disabled?(e.openBlock(),e.createElementBlock("div",Dr,[e.createElementVNode("div",xr,[e.createElementVNode("span",null,e.toDisplayString(_.label),1),B[1]||(B[1]=e.createElementVNode("span",{class:"disabled-tag"},"待上线",-1))])])):e.withDirectives((e.openBlock(),e.createElementBlock("div",Tr,[e.createElementVNode("a",{href:D(_.href),class:"dropdown-link",target:L(_.href)?"_blank":"_self",rel:L(_.href)?"noopener noreferrer":""},[e.createElementVNode("span",null,e.toDisplayString(_.label),1),(o.tagMap[(le=_==null?void 0:_.href)==null?void 0:le.slice(1)]||_.tag)&&h(_.tagExpire,_.tagLang)?(e.openBlock(),e.createBlock(e.unref(i.OTag),{key:0,color:"danger",size:"small",round:"pill"},{default:e.withCtx(()=>{var Ne;return[e.createTextVNode(e.toDisplayString(o.tagMap[(Ne=_==null?void 0:_.href)==null?void 0:Ne.slice(1)]||_.tag),1)]}),_:2},1024)):e.createCommentVNode("",!0),_.icon?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:1,class:"jump-out-icon"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_.icon),{class:"icon"}))]),_:2},1024)):e.createCommentVNode("",!0)],8,Ar)])),[[M,()=>S(_)]])],40,$r)}),128))])])]))],42,Br)),[[M,()=>R(x),"mouseenter"]])}),128))],36)],512)}}}),Mr=H._export_sfc(Ir,[["__scopeId","data-v-d7d33a36"]]),Rr={class:"header"},zr=["src"],Fr={key:0,class:"header-nav"},Pr={key:1,class:"header-content"},Hr={key:2,class:"header-toolbar"},Ur=e.defineComponent({__name:"OHeader",props:{logo:void 0,lang:void 0,community:void 0,navData:void 0,bgLeft:void 0,bgRight:void 0,tagMap:void 0},emits:["go-home"],setup(o,{emit:t}){const r=t,l=o,a=()=>{r("go-home")};return(c,m)=>(e.openBlock(),e.createElementBlock("div",Rr,[e.createVNode(ve,{class:"header-wrap"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"header-logo",onClick:a},[e.renderSlot(c.$slots,"logo",{},()=>[l.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:l.logo},null,8,zr)):e.createCommentVNode("",!0)],!0)]),l.community==="openEuler"?(e.openBlock(),e.createElementBlock("div",Fr,[e.renderSlot(c.$slots,"nav",{},()=>[l.navData?(e.openBlock(),e.createBlock(Er,{key:0,"nav-data":l.navData,"bg-left":l.bgLeft,"bg-right":l.bgRight},null,8,["nav-data","bg-left","bg-right"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),l.community==="openUBMC"?(e.openBlock(),e.createElementBlock("div",Pr,[e.renderSlot(c.$slots,"nav",{},()=>[l.navData?(e.openBlock(),e.createBlock(Mr,{key:0,"nav-data":l.navData,"has-perm":!0,"tag-map":o.tagMap},null,8,["nav-data","tag-map"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),c.$slots.toolbar?(e.openBlock(),e.createElementBlock("div",Hr,[e.renderSlot(c.$slots,"toolbar",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3})]))}}),Jt=H._export_sfc(Ur,[["__scopeId","data-v-af43105c"]]),Wr={class:"header-content-mb"},Gr={class:"o-nav"},jr={class:"o-nav-list"},qr=["onClick"],Kr={class:"nav-aside"},Zr={key:0,class:"nav-aside-wrapper"},Yr=["value","title"],Xr={class:"content-label"},Jr={class:"container-mobile"},Qr=["onClick"],ea={class:"item-label"},ta={class:"desc-container"},oa={class:"item-desc"},na=["onClick"],ra={class:"item-label"},aa={key:1,class:"nav-aside-wrapper"},la=["onClick"],ca={class:"header-tool"},sa={key:1},ia=e.defineComponent({__name:"HeaderNavMoblie",props:{menuShow:{type:Boolean,default(){return!1}},navData:void 0,codeData:void 0},emits:["link-click"],setup(o,{emit:t}){const r=o,l=e.ref(""),a=e.ref({}),c=s=>{s?(l.value=s.id,a.value=s):(l.value="source_code",a.value=r.codeData)},m=t,p=(s,y)=>{window.open(s,y),m("link-click")};return e.onMounted(()=>{l.value=r.navData[0].id,a.value=r.navData[0]}),e.watch(()=>r.navData||r.codeData,()=>{a.value=l.value==="source_code"?r.codeData:r.navData.find(s=>s.id===l.value)},{deep:!0}),(s,y)=>(e.openBlock(),e.createElementBlock("div",Wr,[e.createElementVNode("div",{class:e.normalizeClass(["header-nav",{active:o.menuShow}])},[e.createElementVNode("div",Gr,[e.createElementVNode("ul",jr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.navData,u=>(e.openBlock(),e.createElementBlock("li",{key:u.id,class:e.normalizeClass({active:l.value===u.id})},[e.createElementVNode("span",{onClick:h=>c(u)},e.toDisplayString(u.label),9,qr)],2))),128))]),e.createElementVNode("div",Kr,[l.value!=="source_code"?(e.openBlock(),e.createElementBlock("ul",Zr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value.children,u=>(e.openBlock(),e.createElementBlock("li",{value:u.label,title:u.label,key:u.label,class:"nav-aside-content"},[u!=null&&u.children?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("p",Xr,e.toDisplayString(u.label),1),e.createElementVNode("div",Jr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u==null?void 0:u.children,h=>(e.openBlock(),e.createElementBlock("div",{key:h.label,class:"content-container-mobile"},[e.createElementVNode("a",{onClick:V=>p(h.href,"_blank"),rel:"noopener noreferrer",class:"content-subtitle"},[e.createElementVNode("span",ea,e.toDisplayString(h.label),1),h.icon?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.icon),{class:"icon"}))]),_:2},1024)):e.createCommentVNode("",!0),h.tag?(e.openBlock(),e.createBlock(e.unref(i.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.tag),1)]),_:2},1024)):e.createCommentVNode("",!0)],8,Qr),e.createElementVNode("div",ta,[e.createElementVNode("p",oa,e.toDisplayString(h.description),1)])]))),128))])],64)):(e.openBlock(),e.createElementBlock("a",{key:1,onClick:h=>p(u.href,"_blank"),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[e.createElementVNode("span",ra,e.toDisplayString(u.label),1),u.icon?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon),{class:"icon"}))]),_:2},1024)):e.createCommentVNode("",!0),u.tag?(e.openBlock(),e.createBlock(e.unref(i.OTag),{key:1,round:"pill",color:"danger",size:"small"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.tag),1)]),_:2},1024)):e.createCommentVNode("",!0)],8,na))],8,Yr))),128))])):(e.openBlock(),e.createElementBlock("div",aa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,u=>(e.openBlock(),e.createElementBlock("a",{key:u.label,onClick:h=>p(u.href,"_blank"),class:"source-code-item"},[e.createElementVNode("span",null,e.toDisplayString(u.label),1),u.icon?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.icon),{class:"icon"}))]),_:2},1024)):e.createCommentVNode("",!0)],8,la))),128))]))])]),e.createElementVNode("div",ca,[o.codeData?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["header-tool-code",{active:l.value==="source_code"}]),onClick:y[0]||(y[0]=u=>c(null))}," 源码 ",2)):e.createCommentVNode("",!0),s.$slots.tool?(e.openBlock(),e.createElementBlock("div",sa,[e.renderSlot(s.$slots,"tool",{},void 0,!0)])):e.createCommentVNode("",!0)])],2)]))}}),da=H._export_sfc(ia,[["__scopeId","data-v-bd38af58"]]),ua={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function ma(o,t){return e.openBlock(),e.createElementBlock("svg",ua,[...t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.528 5.472c0.246 0.246 0.271 0.63 0.074 0.903l-0.074 0.087-5.54 5.538 0.006 0.006-0.989 0.989-0.006-0.006-5.538 5.54c-0.273 0.273-0.717 0.273-0.99 0-0.246-0.246-0.271-0.63-0.074-0.903l0.074-0.087 5.538-5.539-5.538-5.538-0.074-0.087c-0.197-0.274-0.172-0.657 0.074-0.903s0.63-0.271 0.903-0.074l0.087 0.074 5.538 5.539 5.539-5.539c0.273-0.273 0.717-0.273 0.99 0zM14.551 13.561l3.978 3.978 0.074 0.087c0.197 0.274 0.172 0.657-0.074 0.903s-0.63 0.271-0.903 0.074l-0.087-0.074-3.978-3.978c-0.273-0.273-0.273-0.717 0-0.99v0c0.273-0.273 0.717-0.273 0.99 0z"},null,-1)])])}const Qt={name:"components-icon-close",render:ma},pa={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function fa(o,t){return e.openBlock(),e.createElementBlock("svg",pa,[...t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M3.8 5h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 11h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 17h16.4c0.442 0 0.8 0.358 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.359-0.8-0.8s0.358-0.8 0.8-0.8z"},null,-1)])])}const ha={name:"components-icon-header-menu",render:fa},va={class:"header"},ka={key:0,class:"header-simple"},ga={class:"simple-header-left"},Ca={key:0,class:"header-title"},_a={key:0,class:"simple-header-right"},ya={class:"header-left"},Ea={class:"header-center"},Ba=["src"],Na={class:"header-right"},wa=e.defineComponent({__name:"OHeaderMoblie",props:{logo:void 0,navData:void 0,codeData:void 0,isSimpleHeader:void 0,headerTitle:void 0},emits:["go-back","go-home"],setup(o,{emit:t}){const r=t,l=o,a=()=>{r("go-back")},c=()=>{r("go-home")},m=e.ref(!1),p=()=>{setTimeout(()=>{m.value=!m.value,document.body.style.overflow=m.value?"hidden":""},200)},s=()=>{p()};return(y,u)=>(e.openBlock(),e.createElementBlock("div",va,[e.createVNode(ve,{class:"header-wrap"},{default:e.withCtx(()=>[o.isSimpleHeader?(e.openBlock(),e.createElementBlock("div",ka,[e.createElementVNode("div",ga,[e.createVNode(e.unref(i.OIcon),{onClick:a},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OIconArrowLeft))]),_:1}),o.headerTitle?(e.openBlock(),e.createElementBlock("div",Ca,e.toDisplayString(o.headerTitle),1)):e.createCommentVNode("",!0)]),y.$slots.rightConfig?(e.openBlock(),e.createElementBlock("div",_a,[e.renderSlot(y.$slots,"rightConfig",{},void 0,!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",ya,[e.createVNode(e.unref(i.OIcon),{onClick:p},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock(e.unref(Qt),{key:1})):(e.openBlock(),e.createBlock(e.unref(ha),{key:0}))]),_:1})]),e.createVNode(da,{ref:"mobileNav","nav-data":o.navData,"code-data":o.codeData,"menu-show":m.value,onLinkClick:s},{tool:e.withCtx(()=>[e.renderSlot(y.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","menu-show"]),e.createElementVNode("div",Ea,[e.createElementVNode("div",{class:"header-logo",onClick:c},[e.renderSlot(y.$slots,"logo",{},()=>[l.logo?(e.openBlock(),e.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:l.logo},null,8,Ba)):e.createCommentVNode("",!0)],!0)])]),e.createElementVNode("div",Na,[e.renderSlot(y.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]))}}),eo=H._export_sfc(wa,[["__scopeId","data-v-bf633ce0"]]),Va={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Sa(o,t){return e.openBlock(),e.createElementBlock("svg",Va,[...t[0]||(t[0]=[e.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M13.215 0.524c-7.048 0-12.762 5.714-12.762 12.762s5.714 12.762 12.762 12.762c7.048 0 12.762-5.714 12.762-12.762s-5.714-12.762-12.762-12.762zM13.215 2.809c5.786 0 10.476 4.69 10.476 10.476s-4.69 10.476-10.476 10.476c-5.786 0-10.476-4.69-10.476-10.476s4.69-10.476 10.476-10.476z"},null,-1),e.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M23.33 23.22c0.446-0.447 1.169-0.448 1.616-0.002l4.771 4.759c0.447 0.446 0.448 1.169 0.002 1.616s-1.169 0.448-1.616 0.002l-4.771-4.759c-0.447-0.446-0.448-1.169-0.002-1.616z"},null,-1)])])}const It={name:"components-icon-header-search",render:Sa},ba={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function La(o,t){return e.openBlock(),e.createElementBlock("svg",ba,[...t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M10.858 22.41c-0.349 0.349-0.915 0.349-1.263 0-0.314-0.314-0.345-0.804-0.094-1.153l0.094-0.111 5.146-5.15-5.177-5.178c-0.274-0.305-0.3-0.755-0.077-1.087l0.111-0.135c0.347-0.347 0.91-0.347 1.257 0l5.142 5.143 5.15-5.146c0.349-0.349 0.915-0.349 1.263 0 0.314 0.314 0.345 0.804 0.094 1.153l-0.094 0.111-11.552 11.552zM17.89 16.634l4.551 4.552c0.313 0.349 0.302 0.886-0.034 1.222-0.347 0.347-0.91 0.347-1.257 0l-4.516-4.518 1.256-1.256z"},null,-1)])])}const Oa={name:"components-icon-header-delete",render:La},$a={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Da(o,t){return e.openBlock(),e.createElementBlock("svg",$a,[...t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M19.154 5.295c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006-12.201-0.001 0.001 12.413c0 0.17 0.12 0.311 0.28 0.344l0.071 0.007h9.39c0.17 0 0.311-0.12 0.344-0.28l0.007-0.071v-10.47c0-0.387 0.313-0.7 0.7-0.7 0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v10.47c0 0.919-0.708 1.672-1.608 1.745l-0.144 0.006h-9.39c-0.919 0-1.672-0.708-1.745-1.608l-0.006-0.144-0.001-12.413-0.707 0.001c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h14.308zM10.011 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.953 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.652 3.189c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006h-3.972c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h3.972z"},null,-1)])])}const xa={name:"components-icon-delete",render:Da},Ta={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function Aa(o,t){return e.openBlock(),e.createElementBlock("svg",Ta,[...t[0]||(t[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M5.886 19.111l10.672 10.677c0.46 0.524 0.44 1.322-0.060 1.822s-1.298 0.52-1.822 0.060l-0.064-0.060-12.498-12.498h3.772zM14.613 0.391c0.521-0.521 1.365-0.521 1.886 0 0.5 0.5 0.52 1.298 0.060 1.822l-0.060 0.064-12.391 12.391h29.67c0.71 0 1.291 0.555 1.331 1.255l0.002 0.078c0 0.71-0.555 1.291-1.255 1.331l-0.078 0.002h-31.816c-0.472 0-0.924-0.187-1.257-0.521-0.671-0.671-0.694-1.745-0.067-2.443l0.067-0.071 13.908-13.908z"},null,-1)])])}const Ia={name:"components-icon-header-back",render:Aa},Ma={class:"o-header-search"},Ra={class:"o-header-search-drawer"},za={key:0,class:"o-header-search-recommend-container"},Fa=["onClick"],Pa={key:1,class:"o-header-search-history-container"},Ha={class:"o-header-search-history-header"},Ua={class:"o-header-search-history-header-title"},Wa={class:"o-header-search-history-item-container"},Ga=["onClick"],ja={class:"o-header-search-history-item-text"},qa={key:3,class:"o-header-search-hot-container"},Ka={class:"o-header-search-hot-header"},Za={class:"o-header-search-hot-item-container"},Ya=["onClick"],Xa=e.defineComponent({__name:"OHeaderSearch",props:{modelValue:{default:""},placeholder:{},expandedPlaceholder:{},expandDirection:{default:"left"},clearable:{type:Boolean,default:!0},historyItems:{default:()=>[]},maxHistoryCount:{default:6},storeHistory:{type:Boolean,default:!1},historyTitle:{},storageKey:{default:"search-history"},hotItems:{default:()=>[]},hotTitle:{},recommendItems:{default:()=>[]},searchUrl:{},searchUrlOpenBlank:{type:Boolean,default:!0},searchTextMobile:{}},emits:["update:modelValue","update:historyItems","clear","search","delete-history","delete-history-item"],setup(o,{emit:t}){const{lePadV:r}=Q.useScreen(),{t:l}=H.useI18n(),a=o,c=t,m=e.ref(a.modelValue),p=e.ref(a.historyItems),s=e.ref(!1),y=e.ref(),u=e.computed(()=>!r.value&&s.value||r.value&&m.value);e.watch(()=>a.modelValue,g=>{m.value!==g&&(m.value=g)}),e.watch(()=>m.value,g=>{c("update:modelValue",g)}),e.watch(()=>a.historyItems,g=>{p.value!==g&&(p.value=g)}),e.watch(()=>p.value,g=>{c("update:historyItems",g)}),e.onMounted(()=>{if(a.storeHistory&&a.storageKey)try{const g=JSON.parse(localStorage.getItem(a.storageKey)||"[]");Array.isArray(g)&&g.length&&(p.value=Array.from(new Set([...p.value,...g])))}catch{}});const h=()=>{s.value=!0},V=()=>{const g=m.value.trim();g&&(s.value=!1,p.value.unshift(g),p.value=Array.from(new Set(p.value)),p.value.length>a.maxHistoryCount&&p.value.pop(),a.storeHistory&&a.storeHistory&&localStorage.setItem(a.storageKey,JSON.stringify(p.value)),c("search",g),a.searchUrl&&window.open(a.searchUrl+g,a.searchUrlOpenBlank?"_blank":"_self","noopener noreferrer"))},E=()=>{m.value="",c("clear"),r.value||(s.value=!1)},N=()=>{const g=[...p.value];p.value=[],a.storeHistory&&a.storeHistory&&localStorage.removeItem(a.storageKey),c("delete-history",g)},w=g=>{p.value=p.value.filter(L=>L!==g),a.storeHistory&&a.storeHistory&&(p.value.length?localStorage.setItem(a.storageKey,JSON.stringify(p.value)):localStorage.removeItem(a.storageKey)),c("delete-history-item",g)},k=g=>{m.value=g,V()},S=()=>{m.value="",s.value=!1},R=e.ref();return pt.onClickOutside(R,E),(g,L)=>(e.openBlock(),e.createElementBlock("div",Ma,[e.createElementVNode("div",{ref_key:"posWrapper",ref:R,class:e.normalizeClass({"o-header-search-input-pc-wrapper":!e.unref(r),"o-header-search-input-pc-wrapper-left":!e.unref(r)&&o.expandDirection==="left","o-header-search-input-pc-wrapper-right":!e.unref(r)&&o.expandDirection==="right","o-header-search-input-mobile-wrapper":e.unref(r),focus:s.value})},[e.createElementVNode("div",{class:e.normalizeClass(["o-header-search-input-wrapper",{focus:s.value}])},[e.unref(r)&&s.value?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,class:"o-header-search-icon",onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(Ia))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i.OInput),{ref_key:"inputRef",ref:y,modelValue:m.value,"onUpdate:modelValue":L[0]||(L[0]=O=>m.value=O),class:"o-header-search-input",placeholder:s.value?o.expandedPlaceholder??e.unref(l)("search.expandedPlaceholder"):o.placeholder??e.unref(l)("search.placeholder"),onFocus:h,onKeyup:e.withKeys(V,["enter"])},{prefix:e.withCtx(()=>[e.renderSlot(g.$slots,"input-prefix",{},()=>[e.createVNode(e.unref(i.OIcon),{class:"o-header-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(It))]),_:1})],!0)]),suffix:e.withCtx(()=>[e.renderSlot(g.$slots,"input-suffix",{},()=>[o.clearable&&u.value?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,class:"o-header-search-icon close",onClick:E},{default:e.withCtx(()=>[e.createVNode(e.unref(Qt))]),_:1})):e.createCommentVNode("",!0)],!0)]),_:3},8,["modelValue","placeholder"]),e.unref(r)&&s.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:V},e.toDisplayString(o.searchTextMobile??e.unref(l)("search")),1)):e.createCommentVNode("",!0)],2),e.withDirectives(e.createElementVNode("div",Ra,[e.renderSlot(g.$slots,"drawer",{recommendItems:o.recommendItems,historyItems:p.value,hotItems:o.hotItems},()=>[o.recommendItems.length?(e.openBlock(),e.createElementBlock("div",za,[e.renderSlot(g.$slots,"recommend-header",{recommend:o.recommendItems},void 0,!0),e.renderSlot(g.$slots,"recommend-content",{recommend:o.recommendItems},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.recommendItems,O=>(e.openBlock(),e.createElementBlock("div",{class:"o-header-search-recommend-item",key:O,onClick:$=>k(O)},e.toDisplayString(O),9,Fa))),128))],!0)])):p.value.length?(e.openBlock(),e.createElementBlock("div",Pa,[e.renderSlot(g.$slots,"history-header",{history:p.value},()=>[e.createElementVNode("div",Ha,[e.createElementVNode("span",Ua,e.toDisplayString(o.historyTitle??e.unref(l)("search.history")),1),e.createVNode(e.unref(i.OIcon),{class:"o-header-search-icon",onClick:N},{default:e.withCtx(()=>[e.createVNode(e.unref(xa))]),_:1})])],!0),e.renderSlot(g.$slots,"history-content",{history:p.value},()=>[e.createElementVNode("div",Wa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,O=>(e.openBlock(),e.createElementBlock("div",{key:O,class:"o-header-search-history-item",onClick:$=>k(O)},[e.createElementVNode("span",ja,e.toDisplayString(O),1),e.createVNode(e.unref(i.OIcon),{class:"o-header-search-history-item-icon",onClick:e.withModifiers($=>w(O),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(Oa),{class:"icon-delete"})]),_:1},8,["onClick"])],8,Ga))),128))])],!0)])):e.createCommentVNode("",!0),(o.recommendItems.length||p.value.length)&&o.hotItems.length?(e.openBlock(),e.createBlock(e.unref(i.ODivider),{key:2,class:"o-header-search-drawer-divider"})):e.createCommentVNode("",!0),o.hotItems.length?(e.openBlock(),e.createElementBlock("div",qa,[e.renderSlot(g.$slots,"hot-header",{hot:o.hotItems},()=>[e.createElementVNode("div",Ka,e.toDisplayString(o.hotTitle??e.unref(l)("search.hot")),1)],!0),e.renderSlot(g.$slots,"hot-content",{hot:o.hotItems},()=>[e.createElementVNode("div",Za,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.hotItems,O=>(e.openBlock(),e.createElementBlock("div",{key:O,class:"o-header-search-hot-item",onClick:$=>k(O)},e.toDisplayString(O),9,Ya))),128))])],!0)])):e.createCommentVNode("",!0)],!0)],512),[[e.vShow,s.value]])],2),e.unref(r)?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,class:"o-header-search-icon-mobile",onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(It))]),_:1})):e.createCommentVNode("",!0)]))}}),to=H._export_sfc(Xa,[["__scopeId","data-v-9f1bd8fc"]]),Ja=["src"],Qa=e.defineComponent({__name:"AppAvatar",props:{avatar:{type:String,default:""},name:{type:String,default:"",required:!0},size:{type:String,default:"medium"},customSize:{type:Number,default:0},variant:{type:String,default:"round"}},setup(o){const t=o,r=["#058EF0","#FA7305","#03B5A5"],l=e.computed(()=>{var c;return(c=t.name)==null?void 0:c.charAt(0).toUpperCase()}),a=e.computed(()=>{var p;const c={"background-color":"",width:"32px",height:"32px","font-size":"20px"};c["background-color"]=t.name?r[((p=t.name)==null?void 0:p.length)%r.length]:"transparent";let m=0;return t.customSize?m=Number(t.customSize):m={mini:16,small:24,medium:40,large:64}[t.size],c.height=`${m}px`,c.width=`${m}px`,c["font-size"]=`${m/2}px`,c});return(c,m)=>o.avatar&&!o.avatar.includes("gitcode")?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.avatar,class:e.normalizeClass(["img-avatar",o.variant]),style:e.normalizeStyle(a.value),alt:""},null,14,Ja)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["word-avatar",o.variant]),style:e.normalizeStyle(a.value)},e.toDisplayString(l.value),7))}}),Mt=H._export_sfc(Qa,[["__scopeId","data-v-340348ce"]]),el={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function tl(o,t){return e.openBlock(),e.createElementBlock("svg",el,[...t[0]||(t[0]=[e.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M9.412 10.332c0 2.188 1.066 4.127 2.708 5.326-4.858 1.582-8.364 6.052-8.364 11.328 0 0.515 0.418 0.933 0.933 0.933s0.933-0.418 0.933-0.933c0-5.465 4.487-9.922 10.092-10.070 0.095 0.004 0.191 0.006 0.288 0.006 3.639 0 6.59-2.95 6.59-6.59s-2.951-6.59-6.59-6.59-6.59 2.95-6.59 6.59zM16.088 15.049c-0.028-0.003-0.057-0.004-0.087-0.004-0.061 0-0.122 0-0.183 0.001-2.524-0.096-4.541-2.172-4.541-4.72 0-2.608 2.115-4.723 4.723-4.723s4.723 2.115 4.723 4.723c0 2.579-2.067 4.676-4.635 4.722zM21.784 16.465c3.945 2.064 6.463 6.077 6.463 10.528 0 0.515-0.418 0.933-0.933 0.933s-0.933-0.418-0.933-0.933c0-3.744-2.123-7.127-5.462-8.874-0.457-0.239-0.633-0.803-0.394-1.26s0.803-0.633 1.26-0.394z"},null,-1)])])}const ol={name:"components-icon-avatar-line",render:tl},nl={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function rl(o,t){return e.openBlock(),e.createElementBlock("svg",nl,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M5.759 8.873c0.251-0.251 0.644-0.271 0.918-0.063l0.072 0.063 5.016 5.016c0.1 0.1 0.254 0.115 0.37 0.043l0.054-0.043 5.062-5.062c0.273-0.273 0.717-0.273 0.99 0 0.251 0.251 0.271 0.644 0.063 0.918l-0.063 0.072-5.062 5.062c-0.629 0.629-1.628 0.662-2.296 0.099l-0.108-0.099-5.016-5.016c-0.273-0.273-0.273-0.717 0-0.99z"},null,-1)])])}const oo={name:"components-icon-chevron-down",render:rl},al={class:"header-user"},ll={key:0,class:"user-info"},cl={class:"info-wrap hover-icon-rotate"},sl={class:"user-account"},il={key:0,class:"user-info-dropdown"},dl={class:"right-info"},ul={class:"user-account"},ml={key:1},pl=e.defineComponent({__name:"OHeaderUser",props:{token:{default:void 0},lang:{default:void 0},noticeTotal:{default:void 0},userInfo:{default:void 0},userInfoVisible:{type:Boolean,default:void 0},options:{default:void 0}},emits:["login","logout"],setup(o,{emit:t}){const{lePadV:r}=Q.useScreen(),l=t,a=()=>{l("login")},c=m=>{m!=null&&m.logout?l("logout"):window.open(m.url,m.target)};return(m,p)=>(e.openBlock(),e.createElementBlock("div",al,[o.token?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,onClick:a,class:"avatar-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ol))]),_:1})),e.createVNode(e.Transition,{name:"header-user-zoom-in"},{default:e.withCtx(()=>[o.token?(e.openBlock(),e.createElementBlock("div",ll,[e.createVNode(e.unref(i.ODropdown),{trigger:e.unref(r)?"click":"hover",optionPosition:e.unref(r)?"br":"bottom","option-wrap-class":`user-dropdown ${o.lang==="en"?"is-en":""} user-dropdown${o.userInfoVisible?"-info":""}`},{dropdown:e.withCtx(()=>[o.userInfoVisible?(e.openBlock(),e.createElementBlock("div",il,[e.createVNode(Mt,{avatar:o.userInfo.photo,name:o.userInfo.username,"custom-size":32},null,8,["avatar","name"]),e.createElementVNode("div",dl,[p[0]||(p[0]=e.createElementVNode("p",{class:"user-fullname"},"用户名",-1)),e.createElementVNode("p",ul,e.toDisplayString(o.userInfo.username),1)])])):e.createCommentVNode("",!0),o.userInfoVisible?(e.openBlock(),e.createBlock(e.unref(i.ODivider),{key:1,style:{"--o-divider-gap":"6px"}})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,s=>(e.openBlock(),e.createBlock(e.unref(i.ODropdownItem),{key:s.label,style:e.normalizeStyle({"--dropdown-item-justify":o.userInfoVisible?"flex-start":"center"}),onClick:y=>c(s)},{default:e.withCtx(()=>[s!=null&&s.icon?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(e.unref(i.OBadge),{value:s.total,color:"danger",class:e.normalizeClass(["header-message icon-message",{"notice-not":!s.total}])},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.icon),{class:"icon"}))]),_:2},1024)]),_:2},1032,["value","class"]),e.createElementVNode("span",null,e.toDisplayString(s.label),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[s!=null&&s.total?(e.openBlock(),e.createBlock(e.unref(i.OBadge),{key:0,value:s.total,color:"danger",class:e.normalizeClass(["header-message message",{"notice-not":!s.total}])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.label),1)]),_:2},1032,["value","class"])):(e.openBlock(),e.createElementBlock("span",ml,e.toDisplayString(s.label),1))],64))]),_:2},1032,["style","onClick"]))),128))]),default:e.withCtx(()=>[e.createElementVNode("div",cl,[e.createVNode(e.unref(i.OBadge),{value:o.noticeTotal,color:"danger",class:e.normalizeClass(["header-message user-avatar",{"notice-not":!o.noticeTotal}])},{default:e.withCtx(()=>[e.createVNode(Mt,{avatar:o.userInfo.photo,name:o.userInfo.username,"custom-size":e.unref(r)?24:32},null,8,["avatar","name","custom-size"])]),_:1},8,["value","class"]),e.createElementVNode("p",sl,e.toDisplayString(o.userInfo.username),1),e.createVNode(e.unref(i.OIcon),{class:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(oo))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):e.createCommentVNode("",!0)]),_:1})]))}}),no=H._export_sfc(pl,[["__scopeId","data-v-66736d3f"]]),fl={locale:"zh-CN","common.empty":"暂无数据","common.loading":"加载中...","pagination.goto":"前往","pagination.page":"页","pagination.countPerPage":"条/页","pagination.total":"共 {0} 条","upload.buttonLabel":"点击上传","upload.drag":"点击或拖拽文件到此处上传","upload.dragHover":"释放文件并开始上传","upload.retry":"点击重试","upload.delete":"删除","upload.preview":"预览","upload.edit":"编辑","select.cancel":"取消","select.confirm":"确定","input.limit":"<b>{0}</b>/{1}"},hl={locale:"en-US","common.empty":"No Data","common.loading":"Loading...","pagination.goto":"Go to","pagination.page":"Page","pagination.countPerPage":"/page","pagination.total":"Total: {0}","upload.buttonLabel":"Upload","upload.drag":"Click or drag file to this area to upload","upload.dragHover":"Release to upload","upload.retry":"Click to retry","upload.delete":"Delete","upload.preview":"Preview","upload.edit":"Edit","select.cancel":"Cancel","select.confirm":"Ok","input.limit":"<b>{0}</b>/{1}"},ro=e.defineComponent({__name:"OPlusConfigProvider",props:{locale:{},theme:{default:"light"}},setup(o){const t=o,r=e.reactive({locale:e.computed(()=>t.locale),theme:e.computed(()=>t.theme)});return e.provide(H.configProviderInjectKey,r),(l,a)=>(e.openBlock(),e.createBlock(e.unref(i.OConfigProvider),{locale:o.locale==="zh"?e.unref(fl):e.unref(hl)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},8,["locale"]))}}),vl={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function kl(o,t){return e.openBlock(),e.createElementBlock("svg",vl,[...t[0]||(t[0]=[e.createElementVNode("path",{d:"M9.246 5.764c-0.251 0.251-0.271 0.644-0.063 0.918l0.063 0.072 5.016 5.016c0.1 0.1 0.115 0.254 0.043 0.37l-0.043 0.054-5.062 5.062c-0.273 0.273-0.273 0.717 0 0.99 0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.062-5.062c0.629-0.629 0.662-1.628 0.099-2.296l-0.099-0.108-5.016-5.016c-0.273-0.273-0.717-0.273-0.99 0z"},null,-1)])])}const gl={name:"components-icon-chevron-right",render:kl},Cl={class:"section-wrapper"},_l={key:1,class:"section-title"},yl={key:2,class:"section-subtitle"},El={key:1,class:"section-body"},Bl={key:2,class:"section-footer"},Nl=e.defineComponent({__name:"OSection",props:{title:{default:void 0},subtitle:{default:void 0},full:{type:Boolean,default:!1},headerJustifyCenter:{type:Boolean,default:!0},footer:{default:void 0},footerHref:{default:void 0}},setup(o){const t=o;return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["app-section",{"is-full":t.full}])},[e.createElementVNode("div",Cl,[e.renderSlot(r.$slots,"main",{},()=>[r.$slots.header||t.title||t.subtitle?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["section-header",{"is-left":!t.headerJustifyCenter}])},[e.renderSlot(r.$slots,"header",{},()=>[e.unref(i.isArray)(t.title)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.title,a=>(e.openBlock(),e.createElementBlock("h2",{key:a,class:"section-title"},e.toDisplayString(a),1))),128)):r.$slots.title||t.title?(e.openBlock(),e.createElementBlock("h2",_l,[e.renderSlot(r.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),r.$slots.subtitle||t.subtitle?(e.openBlock(),e.createElementBlock("p",yl,[e.renderSlot(r.$slots,"subtitle",{},()=>[e.createTextVNode(e.toDisplayString(t.subtitle),1)],!0)])):e.createCommentVNode("",!0)],!0)],2)):e.createCommentVNode("",!0),r.$slots.default?(e.openBlock(),e.createElementBlock("div",El,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),r.$slots.footer||t.footer?(e.openBlock(),e.createElementBlock("div",Bl,[e.renderSlot(r.$slots,"footer",{},()=>[e.createVNode(e.unref(i.OLink),{href:t.footerHref,target:"_blank"},{suffix:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"footer-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(gl))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.footer)+" ",1)]),_:1},8,["href"])],!0)])):e.createCommentVNode("",!0)],!0)])],2))}}),ao=H._export_sfc(Nl,[["__scopeId","data-v-2fc90e8a"]]),wl={class:"source-code"},Vl={key:0,class:"info-wrap"},Sl={class:"title"},bl={class:"info-wrap hover-icon-rotate"},Ll={class:"title"},Ol=e.defineComponent({__name:"OSourceCode",props:{title:{default:void 0},options:{default:void 0},url:{default:void 0},icon:{default:void 0},justify:{default:"center"}},setup(o){const t=a=>{window.open(a.url,"_blank")},r=e.ref(!1),l=a=>{r.value=a};return(a,c)=>(e.openBlock(),e.createElementBlock("div",wl,[o.url?(e.openBlock(),e.createElementBlock("div",Vl,[e.createElementVNode("span",Sl,e.toDisplayString(o.title),1),o.icon?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon),{class:"icon"}))]),_:1})):e.createCommentVNode("",!0)])):(e.openBlock(),e.createBlock(e.unref(i.ODropdown),{key:1,trigger:"hover",optionPosition:"bottom","option-wrap-class":"dropdown",class:e.normalizeClass({"dropdown-active":r.value}),onVisibleChange:l},{dropdown:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options,m=>(e.openBlock(),e.createBlock(e.unref(i.ODropdownItem),{onClick:p=>t(m),key:m.url,class:"list",style:e.normalizeStyle({"--dropdown-item-justify":o.justify})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.label)+" ",1),m.icon?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m.icon),{class:"icon"}))]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1032,["onClick","style"]))),128))]),default:e.withCtx(()=>[e.createElementVNode("div",bl,[e.createElementVNode("span",Ll,e.toDisplayString(o.title),1),e.createVNode(e.unref(i.OIcon),{class:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(oo))]),_:1})])]),_:1},8,["class"]))]))}}),lo=H._export_sfc(Ol,[["__scopeId","data-v-bbe28df5"]]),$l={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Dl(o,t){return e.openBlock(),e.createElementBlock("svg",$l,[...t[0]||(t[0]=[e.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 1.992c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7zM6.769 6.747c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.136 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM18.192 6.747c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM5.3 12c0-3.7 3-6.7 6.7-6.7s6.7 3 6.7 6.7-3 6.7-6.7 6.7c-3.7 0-6.7-3-6.7-6.7zM17.3 12c0-2.927-2.373-5.3-5.3-5.3s-5.3 2.373-5.3 5.3c0 2.927 2.373 5.3 5.3 5.3s5.3-2.373 5.3-5.3zM4.594 11.969c0 0.387-0.313 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.386 0 0.7 0.313 0.7 0.7zM21.977 11.999c0 0.387-0.314 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.387 0 0.7 0.313 0.7 0.7zM5.921 19.060c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM19.041 19.060c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM11.971 19.376c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7z"},null,-1)])])}const ot={name:"components-icon-sun",render:Dl},xl={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Tl(o,t){return e.openBlock(),e.createElementBlock("svg",xl,[...t[0]||(t[0]=[e.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 2.3c5.357 0 9.7 4.343 9.7 9.7s-4.343 9.7-9.7 9.7c-4.651 0-8.622-3.298-9.515-7.806-0.101-0.509 0.369-0.948 0.87-0.812 0.531 0.144 1.082 0.218 1.645 0.218 3.479 0 6.3-2.82 6.3-6.3 0-1.276-0.379-2.494-1.079-3.527-0.291-0.43-0.029-1.016 0.486-1.086 0.425-0.057 0.857-0.086 1.293-0.086zM12 3.7l-0.042 0.001 0.058 0.121c0.402 0.887 0.634 1.85 0.677 2.845l0.007 0.333c0 4.253-3.447 7.7-7.7 7.7-0.229 0-0.457-0.010-0.682-0.030l-0.186-0.021 0.076 0.218c1.147 3.123 4.102 5.321 7.528 5.429l0.264 0.004c4.584 0 8.3-3.716 8.3-8.3s-3.716-8.3-8.3-8.3z"},null,-1)])])}const nt={name:"components-icon-moon",render:Tl},Al={class:"o-theme-switcher"},Il={key:1,class:"o-theme-switcher-mobile"},Ml=e.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},lightIcon:{default:ot},darkIcon:{default:nt}},emits:["update:theme","change"],setup(o,{emit:t}){const r=o,l=t,{gtPhone:a}=Q.useScreen(),c=e.computed({get(){return r.theme},set(s){l("update:theme",s),l("change",s)}}),m=e.computed(()=>r.type==="common"||r.type==="auto"&&a.value),p=()=>{c.value=c.value===r.lightValue?r.darkValue:r.lightValue};return(s,y)=>(e.openBlock(),e.createElementBlock("div",Al,[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"o-theme-switcher-common",onClick:p},[e.createVNode(e.unref(i.OIcon),{class:"o-theme-icon"},{default:e.withCtx(()=>[c.value===o.lightValue?(e.openBlock(),e.createBlock(e.unref(nt),{key:0})):(e.openBlock(),e.createBlock(e.unref(ot),{key:1}))]),_:1})])):(e.openBlock(),e.createElementBlock("div",Il,[e.createVNode(e.unref(i.OSwitch),{modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=u=>c.value=u),class:"o-theme-switch","checked-value":o.darkValue,"unchecked-value":o.lightValue},{on:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"o-theme-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ot))]),_:1})]),off:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"o-theme-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(nt))]),_:1})]),_:1},8,["modelValue","checked-value","unchecked-value"])]))]))}}),co=H._export_sfc(Ml,[["__scopeId","data-v-9aaa2610"]]);/*! @license DOMPurify 2.5.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.9/LICENSE */function ue(o){"@babel/helpers - typeof";return ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(o)}function dt(o,t){return dt=Object.setPrototypeOf||function(l,a){return l.__proto__=a,l},dt(o,t)}function Rl(){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}}function ze(o,t,r){return Rl()?ze=Reflect.construct:ze=function(a,c,m){var p=[null];p.push.apply(p,c);var s=Function.bind.apply(a,p),y=new s;return m&&dt(y,m.prototype),y},ze.apply(null,arguments)}function ae(o){return zl(o)||Fl(o)||Pl(o)||Hl()}function zl(o){if(Array.isArray(o))return ut(o)}function Fl(o){if(typeof Symbol<"u"&&o[Symbol.iterator]!=null||o["@@iterator"]!=null)return Array.from(o)}function Pl(o,t){if(o){if(typeof o=="string")return ut(o,t);var r=Object.prototype.toString.call(o).slice(8,-1);if(r==="Object"&&o.constructor&&(r=o.constructor.name),r==="Map"||r==="Set")return Array.from(o);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ut(o,t)}}function ut(o,t){(t==null||t>o.length)&&(t=o.length);for(var r=0,l=new Array(t);r<t;r++)l[r]=o[r];return l}function Hl(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ul=Object.hasOwnProperty,Rt=Object.setPrototypeOf,Wl=Object.isFrozen,Gl=Object.getPrototypeOf,jl=Object.getOwnPropertyDescriptor,Y=Object.freeze,te=Object.seal,ql=Object.create,so=typeof Reflect<"u"&&Reflect,Pe=so.apply,mt=so.construct;Pe||(Pe=function(t,r,l){return t.apply(r,l)});Y||(Y=function(t){return t});te||(te=function(t){return t});mt||(mt=function(t,r){return ze(t,ae(r))});var Kl=oe(Array.prototype.forEach),zt=oe(Array.prototype.pop),be=oe(Array.prototype.push),Fe=oe(String.prototype.toLowerCase),rt=oe(String.prototype.toString),Ft=oe(String.prototype.match),re=oe(String.prototype.replace),Zl=oe(String.prototype.indexOf),Yl=oe(String.prototype.trim),K=oe(RegExp.prototype.test),at=Xl(TypeError);function oe(o){return function(t){for(var r=arguments.length,l=new Array(r>1?r-1:0),a=1;a<r;a++)l[a-1]=arguments[a];return Pe(o,t,l)}}function Xl(o){return function(){for(var t=arguments.length,r=new Array(t),l=0;l<t;l++)r[l]=arguments[l];return mt(o,r)}}function b(o,t,r){var l;r=(l=r)!==null&&l!==void 0?l:Fe,Rt&&Rt(o,null);for(var a=t.length;a--;){var c=t[a];if(typeof c=="string"){var m=r(c);m!==c&&(Wl(t)||(t[a]=m),c=m)}o[c]=!0}return o}function he(o){var t=ql(null),r;for(r in o)Pe(Ul,o,[r])===!0&&(t[r]=o[r]);return t}function Ie(o,t){for(;o!==null;){var r=jl(o,t);if(r){if(r.get)return oe(r.get);if(typeof r.value=="function")return oe(r.value)}o=Gl(o)}function l(a){return console.warn("fallback value for",a),null}return l}var Pt=Y(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lt=Y(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ct=Y(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Jl=Y(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),st=Y(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Ql=Y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ht=Y(["#text"]),Ut=Y(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),it=Y(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Wt=Y(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Me=Y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),e1=te(/\{\{[\w\W]*|[\w\W]*\}\}/gm),t1=te(/<%[\w\W]*|[\w\W]*%>/gm),o1=te(/\${[\w\W]*}/gm),n1=te(/^data-[\-\w.\u00B7-\uFFFF]+$/),r1=te(/^aria-[\-\w]+$/),a1=te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),l1=te(/^(?:\w+script|data):/i),c1=te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),s1=te(/^html$/i),i1=te(/^[a-z][.\w]*(-[.\w]+)+$/i),d1=function(){return typeof window>"u"?null:window},u1=function(t,r){if(ue(t)!=="object"||typeof t.createPolicy!="function")return null;var l=null,a="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(a)&&(l=r.currentScript.getAttribute(a));var c="dompurify"+(l?"#"+l:"");try{return t.createPolicy(c,{createHTML:function(p){return p},createScriptURL:function(p){return p}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}};function io(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d1(),t=function(n){return io(n)};if(t.version="2.5.9",t.removed=[],!o||!o.document||o.document.nodeType!==9)return t.isSupported=!1,t;var r=o.document,l=o.document,a=o.DocumentFragment,c=o.HTMLTemplateElement,m=o.Node,p=o.Element,s=o.NodeFilter,y=o.NamedNodeMap,u=y===void 0?o.NamedNodeMap||o.MozNamedAttrMap:y,h=o.HTMLFormElement,V=o.DOMParser,E=o.trustedTypes,N=p.prototype,w=Ie(N,"cloneNode"),k=Ie(N,"nextSibling"),S=Ie(N,"childNodes"),R=Ie(N,"parentNode");if(typeof c=="function"){var g=l.createElement("template");g.content&&g.content.ownerDocument&&(l=g.content.ownerDocument)}var L=u1(E,r),O=L?L.createHTML(""):"",$=l,F=$.implementation,ne=$.createNodeIterator,z=$.createDocumentFragment,I=$.getElementsByTagName,D=r.importNode,C={};try{C=he(l).documentMode?l.documentMode:{}}catch{}var B={};t.isSupported=typeof R=="function"&&F&&F.createHTMLDocument!==void 0&&C!==9;var M=e1,x=t1,A=o1,X=n1,_=r1,ce=l1,le=c1,Ne=i1,He=a1,W=null,ft=b({},[].concat(ae(Pt),ae(lt),ae(ct),ae(st),ae(Ht))),G=null,ht=b({},[].concat(ae(Ut),ae(it),ae(Wt),ae(Me))),P=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,Ue=null,vt=!0,We=!0,kt=!1,gt=!0,ke=!1,Ge=!0,me=!1,je=!1,qe=!1,ge=!1,Le=!1,Oe=!1,Ct=!0,_t=!1,mo="user-content-",Ke=!0,Ve=!1,Ce={},_e=null,yt=b({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Et=null,Bt=b({},["audio","video","img","source","image","track"]),Ze=null,Nt=b({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",De="http://www.w3.org/2000/svg",se="http://www.w3.org/1999/xhtml",ye=se,Ye=!1,Xe=null,po=b({},[$e,De,se],rt),pe,fo=["application/xhtml+xml","text/html"],ho="text/html",j,Ee=null,vo=l.createElement("form"),wt=function(n){return n instanceof RegExp||n instanceof Function},Je=function(n){Ee&&Ee===n||((!n||ue(n)!=="object")&&(n={}),n=he(n),pe=fo.indexOf(n.PARSER_MEDIA_TYPE)===-1?pe=ho:pe=n.PARSER_MEDIA_TYPE,j=pe==="application/xhtml+xml"?rt:Fe,W="ALLOWED_TAGS"in n?b({},n.ALLOWED_TAGS,j):ft,G="ALLOWED_ATTR"in n?b({},n.ALLOWED_ATTR,j):ht,Xe="ALLOWED_NAMESPACES"in n?b({},n.ALLOWED_NAMESPACES,rt):po,Ze="ADD_URI_SAFE_ATTR"in n?b(he(Nt),n.ADD_URI_SAFE_ATTR,j):Nt,Et="ADD_DATA_URI_TAGS"in n?b(he(Bt),n.ADD_DATA_URI_TAGS,j):Bt,_e="FORBID_CONTENTS"in n?b({},n.FORBID_CONTENTS,j):yt,we="FORBID_TAGS"in n?b({},n.FORBID_TAGS,j):{},Ue="FORBID_ATTR"in n?b({},n.FORBID_ATTR,j):{},Ce="USE_PROFILES"in n?n.USE_PROFILES:!1,vt=n.ALLOW_ARIA_ATTR!==!1,We=n.ALLOW_DATA_ATTR!==!1,kt=n.ALLOW_UNKNOWN_PROTOCOLS||!1,gt=n.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ke=n.SAFE_FOR_TEMPLATES||!1,Ge=n.SAFE_FOR_XML!==!1,me=n.WHOLE_DOCUMENT||!1,ge=n.RETURN_DOM||!1,Le=n.RETURN_DOM_FRAGMENT||!1,Oe=n.RETURN_TRUSTED_TYPE||!1,qe=n.FORCE_BODY||!1,Ct=n.SANITIZE_DOM!==!1,_t=n.SANITIZE_NAMED_PROPS||!1,Ke=n.KEEP_CONTENT!==!1,Ve=n.IN_PLACE||!1,He=n.ALLOWED_URI_REGEXP||He,ye=n.NAMESPACE||se,P=n.CUSTOM_ELEMENT_HANDLING||{},n.CUSTOM_ELEMENT_HANDLING&&wt(n.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(P.tagNameCheck=n.CUSTOM_ELEMENT_HANDLING.tagNameCheck),n.CUSTOM_ELEMENT_HANDLING&&wt(n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(P.attributeNameCheck=n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),n.CUSTOM_ELEMENT_HANDLING&&typeof n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(P.allowCustomizedBuiltInElements=n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(We=!1),Le&&(ge=!0),Ce&&(W=b({},ae(Ht)),G=[],Ce.html===!0&&(b(W,Pt),b(G,Ut)),Ce.svg===!0&&(b(W,lt),b(G,it),b(G,Me)),Ce.svgFilters===!0&&(b(W,ct),b(G,it),b(G,Me)),Ce.mathMl===!0&&(b(W,st),b(G,Wt),b(G,Me))),n.ADD_TAGS&&(W===ft&&(W=he(W)),b(W,n.ADD_TAGS,j)),n.ADD_ATTR&&(G===ht&&(G=he(G)),b(G,n.ADD_ATTR,j)),n.ADD_URI_SAFE_ATTR&&b(Ze,n.ADD_URI_SAFE_ATTR,j),n.FORBID_CONTENTS&&(_e===yt&&(_e=he(_e)),b(_e,n.FORBID_CONTENTS,j)),Ke&&(W["#text"]=!0),me&&b(W,["html","head","body"]),W.table&&(b(W,["tbody"]),delete we.tbody),Y&&Y(n),Ee=n)},Vt=b({},["mi","mo","mn","ms","mtext"]),St=b({},["annotation-xml"]),ko=b({},["title","style","font","a","script"]),xe=b({},lt);b(xe,ct),b(xe,Jl);var Qe=b({},st);b(Qe,Ql);var go=function(n){var d=R(n);(!d||!d.tagName)&&(d={namespaceURI:ye,tagName:"template"});var f=Fe(n.tagName),T=Fe(d.tagName);return Xe[n.namespaceURI]?n.namespaceURI===De?d.namespaceURI===se?f==="svg":d.namespaceURI===$e?f==="svg"&&(T==="annotation-xml"||Vt[T]):!!xe[f]:n.namespaceURI===$e?d.namespaceURI===se?f==="math":d.namespaceURI===De?f==="math"&&St[T]:!!Qe[f]:n.namespaceURI===se?d.namespaceURI===De&&!St[T]||d.namespaceURI===$e&&!Vt[T]?!1:!Qe[f]&&(ko[f]||!xe[f]):!!(pe==="application/xhtml+xml"&&Xe[n.namespaceURI]):!1},ee=function(n){be(t.removed,{element:n});try{n.parentNode.removeChild(n)}catch{try{n.outerHTML=O}catch{n.remove()}}},Te=function(n,d){try{be(t.removed,{attribute:d.getAttributeNode(n),from:d})}catch{be(t.removed,{attribute:null,from:d})}if(d.removeAttribute(n),n==="is"&&!G[n])if(ge||Le)try{ee(d)}catch{}else try{d.setAttribute(n,"")}catch{}},bt=function(n){var d,f;if(qe)n="<remove></remove>"+n;else{var T=Ft(n,/^[\r\n\t ]+/);f=T&&T[0]}pe==="application/xhtml+xml"&&ye===se&&(n='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+n+"</body></html>");var J=L?L.createHTML(n):n;if(ye===se)try{d=new V().parseFromString(J,pe)}catch{}if(!d||!d.documentElement){d=F.createDocument(ye,"template",null);try{d.documentElement.innerHTML=Ye?O:J}catch{}}var Z=d.body||d.documentElement;return n&&f&&Z.insertBefore(l.createTextNode(f),Z.childNodes[0]||null),ye===se?I.call(d,me?"html":"body")[0]:me?d.documentElement:Z},Lt=function(n){return ne.call(n.ownerDocument||n,n,s.SHOW_ELEMENT|s.SHOW_COMMENT|s.SHOW_TEXT|s.SHOW_PROCESSING_INSTRUCTION|s.SHOW_CDATA_SECTION,null,!1)},et=function(n){return n instanceof h&&(typeof n.nodeName!="string"||typeof n.textContent!="string"||typeof n.removeChild!="function"||!(n.attributes instanceof u)||typeof n.removeAttribute!="function"||typeof n.setAttribute!="function"||typeof n.namespaceURI!="string"||typeof n.insertBefore!="function"||typeof n.hasChildNodes!="function")},Se=function(n){return ue(m)==="object"?n instanceof m:n&&ue(n)==="object"&&typeof n.nodeType=="number"&&typeof n.nodeName=="string"},ie=function(n,d,f){B[n]&&Kl(B[n],function(T){T.call(t,d,f,Ee)})},Ot=function(n){var d;if(ie("beforeSanitizeElements",n,null),et(n)||K(/[\u0080-\uFFFF]/,n.nodeName))return ee(n),!0;var f=j(n.nodeName);if(ie("uponSanitizeElement",n,{tagName:f,allowedTags:W}),n.hasChildNodes()&&!Se(n.firstElementChild)&&(!Se(n.content)||!Se(n.content.firstElementChild))&&K(/<[/\w]/g,n.innerHTML)&&K(/<[/\w]/g,n.textContent)||f==="select"&&K(/<template/i,n.innerHTML)||n.nodeType===7||Ge&&n.nodeType===8&&K(/<[/\w]/g,n.data))return ee(n),!0;if(!W[f]||we[f]){if(!we[f]&&Dt(f)&&(P.tagNameCheck instanceof RegExp&&K(P.tagNameCheck,f)||P.tagNameCheck instanceof Function&&P.tagNameCheck(f)))return!1;if(Ke&&!_e[f]){var T=R(n)||n.parentNode,J=S(n)||n.childNodes;if(J&&T)for(var Z=J.length,q=Z-1;q>=0;--q){var fe=w(J[q],!0);fe.__removalCount=(n.__removalCount||0)+1,T.insertBefore(fe,k(n))}}return ee(n),!0}return n instanceof p&&!go(n)||(f==="noscript"||f==="noembed"||f==="noframes")&&K(/<\/no(script|embed|frames)/i,n.innerHTML)?(ee(n),!0):(ke&&n.nodeType===3&&(d=n.textContent,d=re(d,M," "),d=re(d,x," "),d=re(d,A," "),n.textContent!==d&&(be(t.removed,{element:n.cloneNode()}),n.textContent=d)),ie("afterSanitizeElements",n,null),!1)},$t=function(n,d,f){if(Ct&&(d==="id"||d==="name")&&(f in l||f in vo))return!1;if(!(We&&!Ue[d]&&K(X,d))){if(!(vt&&K(_,d))){if(!G[d]||Ue[d]){if(!(Dt(n)&&(P.tagNameCheck instanceof RegExp&&K(P.tagNameCheck,n)||P.tagNameCheck instanceof Function&&P.tagNameCheck(n))&&(P.attributeNameCheck instanceof RegExp&&K(P.attributeNameCheck,d)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(d))||d==="is"&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&K(P.tagNameCheck,f)||P.tagNameCheck instanceof Function&&P.tagNameCheck(f))))return!1}else if(!Ze[d]){if(!K(He,re(f,le,""))){if(!((d==="src"||d==="xlink:href"||d==="href")&&n!=="script"&&Zl(f,"data:")===0&&Et[n])){if(!(kt&&!K(ce,re(f,le,"")))){if(f)return!1}}}}}}return!0},Dt=function(n){return n!=="annotation-xml"&&Ft(n,Ne)},xt=function(n){var d,f,T,J;ie("beforeSanitizeAttributes",n,null);var Z=n.attributes;if(!(!Z||et(n))){var q={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G};for(J=Z.length;J--;){d=Z[J];var fe=d,U=fe.name,tt=fe.namespaceURI;if(f=U==="value"?d.value:Yl(d.value),T=j(U),q.attrName=T,q.attrValue=f,q.keepAttr=!0,q.forceKeepAttr=void 0,ie("uponSanitizeAttribute",n,q),f=q.attrValue,!q.forceKeepAttr&&(Te(U,n),!!q.keepAttr)){if(!gt&&K(/\/>/i,f)){Te(U,n);continue}ke&&(f=re(f,M," "),f=re(f,x," "),f=re(f,A," "));var Tt=j(n.nodeName);if($t(Tt,T,f)){if(_t&&(T==="id"||T==="name")&&(Te(U,n),f=mo+f),Ge&&K(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Te(U,n);continue}if(L&&ue(E)==="object"&&typeof E.getAttributeType=="function"&&!tt)switch(E.getAttributeType(Tt,T)){case"TrustedHTML":{f=L.createHTML(f);break}case"TrustedScriptURL":{f=L.createScriptURL(f);break}}try{tt?n.setAttributeNS(tt,U,f):n.setAttribute(U,f),et(n)?ee(n):zt(t.removed)}catch{}}}}ie("afterSanitizeAttributes",n,null)}},Co=function v(n){var d,f=Lt(n);for(ie("beforeSanitizeShadowDOM",n,null);d=f.nextNode();)ie("uponSanitizeShadowNode",d,null),Ot(d),xt(d),d.content instanceof a&&v(d.content);ie("afterSanitizeShadowDOM",n,null)};return t.sanitize=function(v){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d,f,T,J,Z;if(Ye=!v,Ye&&(v="<!-->"),typeof v!="string"&&!Se(v))if(typeof v.toString=="function"){if(v=v.toString(),typeof v!="string")throw at("dirty is not a string, aborting")}else throw at("toString is not a function");if(!t.isSupported){if(ue(o.toStaticHTML)==="object"||typeof o.toStaticHTML=="function"){if(typeof v=="string")return o.toStaticHTML(v);if(Se(v))return o.toStaticHTML(v.outerHTML)}return v}if(je||Je(n),t.removed=[],typeof v=="string"&&(Ve=!1),Ve){if(v.nodeName){var q=j(v.nodeName);if(!W[q]||we[q])throw at("root node is forbidden and cannot be sanitized in-place")}}else if(v instanceof m)d=bt("<!---->"),f=d.ownerDocument.importNode(v,!0),f.nodeType===1&&f.nodeName==="BODY"||f.nodeName==="HTML"?d=f:d.appendChild(f);else{if(!ge&&!ke&&!me&&v.indexOf("<")===-1)return L&&Oe?L.createHTML(v):v;if(d=bt(v),!d)return ge?null:Oe?O:""}d&&qe&&ee(d.firstChild);for(var fe=Lt(Ve?v:d);T=fe.nextNode();)T.nodeType===3&&T===J||(Ot(T),xt(T),T.content instanceof a&&Co(T.content),J=T);if(J=null,Ve)return v;if(ge){if(Le)for(Z=z.call(d.ownerDocument);d.firstChild;)Z.appendChild(d.firstChild);else Z=d;return(G.shadowroot||G.shadowrootmod)&&(Z=D.call(r,Z,!0)),Z}var U=me?d.outerHTML:d.innerHTML;return me&&W["!doctype"]&&d.ownerDocument&&d.ownerDocument.doctype&&d.ownerDocument.doctype.name&&K(s1,d.ownerDocument.doctype.name)&&(U="<!DOCTYPE "+d.ownerDocument.doctype.name+`>
3
- `+U),ke&&(U=re(U,M," "),U=re(U,x," "),U=re(U,A," ")),L&&Oe?L.createHTML(U):U},t.setConfig=function(v){Je(v),je=!0},t.clearConfig=function(){Ee=null,je=!1},t.isValidAttribute=function(v,n,d){Ee||Je({});var f=j(v),T=j(n);return $t(f,T,d)},t.addHook=function(v,n){typeof n=="function"&&(B[v]=B[v]||[],be(B[v],n))},t.removeHook=function(v){if(B[v])return zt(B[v])},t.removeHooks=function(v){B[v]&&(B[v]=[])},t.removeAllHooks=function(){B={}},t}var m1=io();function p1(o,t){const r=o.hooks??{};let l;for(l in r){const a=r[l];a!==void 0&&t.addHook(l,a)}}function f1(){return m1()}function uo(o={},t=f1){const r=t();p1(o,r);const l=function(a,c){const m=c.value;if(c.oldValue===m)return;const p=`${m}`,s=c.arg,y=o.namedConfigurations,u=o.default??{};if(y&&s!==void 0){a.innerHTML=r.sanitize(p,y[s]??u);return}a.innerHTML=r.sanitize(p,u)};return{mounted:l,updated:l}}const h1={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function v1(o,t){return e.openBlock(),e.createElementBlock("svg",h1,[...t[0]||(t[0]=[e.createElementVNode("rect",{id:"峰会",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),e.createElementVNode("path",{id:"矢量 425",d:"M8.36719 4.75439L8.36523 4.75537L8.36523 4.75537C7.63184 5.05518 6.93555 5.44629 6.27734 5.9292C6.00098 6.13184 5.94238 6.5083 6.14551 6.78516C6.34766 7.06201 6.72461 7.11963 7.00098 6.91699C7.61035 6.47119 8.25391 6.11475 8.93262 5.84766C9.05371 5.7998 9.17676 5.75488 9.30078 5.71289C9.73242 5.56641 10.1699 5.45752 10.6143 5.38672C10.6191 5.38574 10.624 5.38525 10.6289 5.38428L10.6289 5.38428C11.0439 5.31836 11.4639 5.28564 11.8896 5.28564C12.3193 5.28564 12.7451 5.31934 13.1641 5.38672L13.165 5.38672C13.6084 5.45752 14.0459 5.56641 14.4775 5.71289C14.6016 5.75488 14.7246 5.7998 14.8457 5.84766C15.5254 6.11475 16.1689 6.47119 16.7773 6.91699C17.0537 7.11963 17.4307 7.06201 17.6328 6.78516C17.8359 6.5083 17.7783 6.13184 17.501 5.9292C16.8418 5.4458 16.1455 5.0542 15.4111 4.75439C15.2334 4.68213 15.0537 4.61475 14.8711 4.55273C14.376 4.38477 13.873 4.25977 13.3643 4.17773C12.8789 4.09961 12.3877 4.06055 11.8896 4.06055C11.3916 4.06055 10.8994 4.09961 10.4141 4.17773L10.4141 4.17773C9.90527 4.25977 9.40332 4.38477 8.90723 4.55273C8.72559 4.61475 8.54492 4.68213 8.36719 4.75439L8.36719 4.75439ZM20.377 14.2979L20.377 13.4229C20.377 13.0801 20.1074 12.8105 19.7646 12.8105C19.4219 12.8105 19.1523 13.0801 19.1523 13.4229L19.1523 14.2979C19.1523 14.334 19.1455 14.3677 19.1328 14.3984L19.1328 14.3989C19.1074 14.4243 19.0215 14.5283 18.9902 14.5415C18.96 14.5542 18.9258 14.5605 18.8896 14.5605L4.88965 14.5605C4.85352 14.5605 4.82031 14.5542 4.78906 14.5415C4.76367 14.5156 4.65918 14.4297 4.64648 14.3989C4.63379 14.3677 4.62695 14.3345 4.62695 14.2979L4.62695 9.04785C4.62695 9.01172 4.63379 8.97803 4.64648 8.94727C4.67188 8.92188 4.75781 8.81738 4.78906 8.80469L4.78906 8.80469C4.82031 8.79199 4.85352 8.78564 4.88965 8.78564L18.8896 8.78564C18.9258 8.78564 18.96 8.79199 18.9902 8.80469C19.0166 8.83057 19.1201 8.9165 19.1328 8.94727C19.1455 8.97803 19.1523 9.01172 19.1523 9.04785L19.1523 11.6729C19.1523 12.0161 19.4219 12.2856 19.7646 12.2856C20.1074 12.2856 20.377 12.0161 20.377 11.6729L20.377 9.04785C20.377 8.94141 20.3662 8.83691 20.3447 8.73535L20.3447 8.73438L20.3447 8.73389C20.3252 8.64355 20.2969 8.55518 20.2598 8.46875C20.2236 8.3833 20.1807 8.30225 20.1299 8.22559C20.0752 8.14355 20.0127 8.06738 19.9414 7.99609C19.8701 7.92529 19.7939 7.8623 19.7119 7.80811C19.6357 7.75732 19.5547 7.71387 19.4688 7.67773C19.3828 7.64111 19.2939 7.61328 19.2041 7.59375C19.1016 7.57178 18.9971 7.56055 18.8896 7.56055L4.88965 7.56055C4.78418 7.56055 4.68066 7.57129 4.5791 7.59277L4.5791 7.59277C4.57812 7.59326 4.57715 7.59326 4.57617 7.59375L4.5752 7.59375C4.48535 7.61328 4.39746 7.64111 4.31055 7.67773C4.22461 7.71387 4.14355 7.75732 4.06738 7.80811C3.98535 7.8623 3.90918 7.92529 3.83789 7.99609C3.7666 8.06738 3.7041 8.14355 3.64941 8.22559C3.64941 8.22656 3.64844 8.22705 3.64844 8.22803C3.59863 8.30371 3.55566 8.38379 3.51953 8.46875C3.48242 8.55518 3.45508 8.64355 3.43555 8.73389C3.41309 8.83643 3.40234 8.94092 3.40234 9.04785L3.40234 14.2979C3.40234 14.4053 3.41309 14.5098 3.43555 14.6123C3.45508 14.7021 3.48242 14.7905 3.51953 14.8774C3.55566 14.9629 3.59961 15.0439 3.64941 15.1201C3.7041 15.2021 3.7666 15.2788 3.83789 15.3501C3.90918 15.4209 3.98535 15.4834 4.06738 15.5381C4.14355 15.5889 4.22461 15.6323 4.31055 15.6685C4.39746 15.7051 4.48535 15.7329 4.5752 15.7524C4.67773 15.7744 4.78223 15.7856 4.88965 15.7856L18.8896 15.7856C18.9971 15.7856 19.1016 15.7744 19.2041 15.7524C19.2939 15.7329 19.3828 15.7051 19.4688 15.6685C19.5547 15.6318 19.6357 15.5889 19.7119 15.5381C19.7939 15.4834 19.8701 15.4209 19.9414 15.3501C20.0127 15.2788 20.0752 15.2021 20.1299 15.1201C20.1807 15.0439 20.2236 14.9629 20.2598 14.8774C20.2969 14.7905 20.3252 14.7021 20.3447 14.6123C20.3662 14.5098 20.377 14.4053 20.377 14.2979ZM14.8291 16.3438L14.8291 16.3438C14.9189 16.3633 15.0078 16.3911 15.0938 16.4277C15.1797 16.4639 15.2607 16.5073 15.3369 16.5581C15.4189 16.6123 15.4951 16.6753 15.5664 16.7461C15.6377 16.8174 15.7002 16.8936 15.7549 16.9756C15.8057 17.0522 15.8486 17.1328 15.8848 17.2188C15.9219 17.3052 15.9502 17.3936 15.9697 17.4839C15.9912 17.5864 16.002 17.6909 16.002 17.7979C16.002 17.9053 15.9912 18.0098 15.9697 18.1123C15.9502 18.2021 15.9219 18.2905 15.8848 18.3774C15.8486 18.4629 15.8057 18.5439 15.7549 18.6201C15.7002 18.7021 15.6377 18.7788 15.5664 18.8501C15.4951 18.9209 15.4189 18.9834 15.3369 19.0381C15.2607 19.0889 15.1797 19.1318 15.0938 19.1685C15.0078 19.2051 14.9189 19.2329 14.8291 19.2524C14.7266 19.2744 14.6221 19.2856 14.5146 19.2856L9.26465 19.2856C9.1582 19.2856 9.05273 19.2744 8.9502 19.2524C8.86035 19.2329 8.77246 19.2051 8.68555 19.1685C8.59961 19.1318 8.51855 19.0889 8.44238 19.0381C8.36035 18.9834 8.28418 18.9209 8.21289 18.8501C8.1416 18.7788 8.0791 18.7021 8.02441 18.6201C7.97461 18.5439 7.93066 18.4629 7.89453 18.3774C7.85742 18.2905 7.83008 18.2021 7.81055 18.1123C7.78809 18.0098 7.77734 17.9053 7.77734 17.7979C7.77734 17.6909 7.78809 17.5864 7.81055 17.4839C7.83008 17.3936 7.85742 17.3052 7.89453 17.2188C7.93066 17.1328 7.97461 17.0522 8.02441 16.9756C8.0791 16.8936 8.1416 16.8174 8.21289 16.7461C8.28418 16.6753 8.36035 16.6123 8.44238 16.5581C8.51855 16.5073 8.59961 16.4639 8.68555 16.4277C8.77246 16.3911 8.86035 16.3633 8.9502 16.3438C9.05273 16.3218 9.1582 16.3105 9.26465 16.3105L14.5146 16.3105C14.6221 16.3105 14.7266 16.3218 14.8291 16.3438ZM9.2666 17.5352L14.5166 17.5352C14.5527 17.5352 14.5859 17.5415 14.6172 17.5547C14.6426 17.5801 14.7471 17.666 14.7598 17.6973C14.7725 17.728 14.7793 17.7617 14.7793 17.7979C14.7793 17.834 14.7725 17.8677 14.7598 17.8984C14.7344 17.9243 14.6484 18.0283 14.6172 18.041C14.5859 18.0542 14.5527 18.0605 14.5166 18.0605L9.2666 18.0605C9.23047 18.0605 9.19629 18.0542 9.16602 18.041C9.13965 18.0156 9.03613 17.9297 9.02344 17.8984C9.01074 17.8677 9.00391 17.834 9.00391 17.7979C9.00391 17.7617 9.01074 17.728 9.02344 17.6973C9.04883 17.6714 9.13477 17.5674 9.16602 17.5547C9.19629 17.5415 9.23047 17.5352 9.2666 17.5352Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const k1={name:"events-icon-summit",render:v1},g1={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function C1(o,t){return e.openBlock(),e.createElementBlock("svg",g1,[...t[0]||(t[0]=[e.createElementVNode("rect",{id:"活动",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),e.createElementVNode("path",{id:"矢量 426",d:"M18.3065 11.0924L17.7206 11.6295C17.455 11.8722 17.4384 12.2711 17.6806 12.5362C17.9237 12.8009 18.3221 12.8185 18.5868 12.5758L19.1737 12.0387L20.0418 11.2433C20.1746 11.1217 20.2811 10.9859 20.3631 10.8365C20.4256 10.7198 20.4735 10.5948 20.5057 10.4615C20.5369 10.3316 20.5516 10.2017 20.5496 10.0723C20.5467 9.92 20.5213 9.76765 20.4725 9.61531C20.4237 9.46345 20.3553 9.32478 20.2684 9.19978C20.1942 9.09333 20.1063 8.99665 20.0057 8.90925C19.9012 8.81989 19.7899 8.74616 19.6698 8.68854C19.5165 8.61481 19.3504 8.56744 19.1717 8.54645L15.3212 8.09185C15.2997 8.08355 15.2119 8.05572 15.1923 8.04156C15.1777 8.02398 15.1142 7.9566 15.1044 7.93511L13.4697 4.43751C13.3945 4.27638 13.2978 4.13477 13.1816 4.0127L13.1816 4.0127C13.0898 3.91797 12.9853 3.83496 12.8691 3.76416C12.7549 3.69531 12.6367 3.64209 12.5137 3.60498L12.5137 3.60498C12.3682 3.56104 12.2168 3.53906 12.0586 3.53906C11.8994 3.53906 11.7481 3.56104 11.6025 3.60498L11.6025 3.60498C11.4795 3.64209 11.3613 3.69531 11.2471 3.76416C11.1309 3.83496 11.0264 3.91797 10.9356 4.0127C10.8184 4.13477 10.7217 4.27589 10.6465 4.43751L9.01178 7.93511C8.99713 7.95269 8.94342 8.0274 8.92389 8.04156C8.90241 8.04986 8.81843 8.08892 8.79499 8.09185L4.94448 8.54645C4.76577 8.56744 4.59976 8.61481 4.44644 8.68854L4.44644 8.68854C4.32731 8.74616 4.215 8.81989 4.11149 8.90925C4.00993 8.99665 3.92204 9.09333 3.8488 9.19978C3.76091 9.32478 3.69353 9.46345 3.64373 9.61531C3.5949 9.76765 3.56951 9.92 3.56658 10.0723C3.56463 10.2017 3.57927 10.3316 3.61052 10.4615C3.64275 10.5948 3.6906 10.7198 3.75407 10.8365C3.83513 10.9859 3.94157 11.1217 4.07438 11.2433L6.90635 13.837C6.91807 13.8566 6.97374 13.9313 6.98155 13.9542C6.98155 13.9606 6.98252 13.9713 6.98448 13.9845L6.98448 13.986C6.98838 14.0226 6.99327 14.0763 6.98936 14.0939L6.2384 17.8488C6.20324 18.0241 6.19738 18.196 6.21985 18.3635C6.23645 18.4948 6.2716 18.6232 6.32434 18.7497C6.37512 18.8727 6.43957 18.986 6.51671 19.0891C6.60851 19.2106 6.71788 19.3181 6.84679 19.4118C6.97471 19.5061 7.11045 19.5778 7.254 19.6281C7.37607 19.6711 7.50302 19.698 7.63583 19.7097C7.77157 19.7209 7.90438 19.7155 8.03524 19.6926L8.03524 19.6926C8.20223 19.6628 8.36336 19.6047 8.52058 19.5183L11.9248 17.6369C11.9473 17.631 12.0342 17.6022 12.0586 17.6022C12.0801 17.6081 12.1709 17.6252 12.1914 17.6369L15.5117 19.4719C15.6718 19.5603 15.8368 19.6189 16.0068 19.6481L16.0077 19.6481C16.1396 19.6706 16.2743 19.675 16.412 19.6618C16.5468 19.6491 16.6747 19.6203 16.7968 19.5754C16.9423 19.5222 17.079 19.447 17.2079 19.3488C17.3368 19.2512 17.4462 19.1394 17.537 19.0139C17.6132 18.9079 17.6747 18.7917 17.7235 18.6662C17.7733 18.5368 17.8046 18.4055 17.8182 18.2722C17.8368 18.1008 17.8241 17.926 17.7821 17.7482L16.3495 11.7125C16.2665 11.3629 15.9267 11.1534 15.5771 11.2359C15.2275 11.3189 15.0175 11.6593 15.1005 12.0089L16.5331 18.0446C16.5468 18.1027 16.5458 18.155 16.5292 18.2023C16.5116 18.2492 16.4794 18.2907 16.4325 18.3268C16.3847 18.363 16.3359 18.383 16.286 18.3864C16.2362 18.3903 16.1855 18.3776 16.1327 18.3488L12.8115 16.5133C12.6943 16.4489 12.5732 16.4001 12.4473 16.3678L12.4473 16.3678C12.3223 16.3351 12.1924 16.319 12.0586 16.319C11.9238 16.319 11.794 16.3351 11.669 16.3678C11.543 16.4001 11.4219 16.4489 11.3047 16.5133L7.8995 18.3952C7.84872 18.4235 7.79794 18.4362 7.74911 18.4328C7.69931 18.4299 7.65146 18.4108 7.60458 18.3762C7.55673 18.342 7.52451 18.3015 7.50693 18.2556C7.48837 18.2097 7.48545 18.1579 7.49716 18.1003L8.24813 14.3453C8.27449 14.2116 8.28426 14.0792 8.27644 13.9474C8.26863 13.816 8.24324 13.6852 8.20125 13.5558C8.15926 13.4259 8.10262 13.3058 8.03036 13.1949C7.95907 13.0841 7.87313 12.983 7.77255 12.8907L4.94155 10.297C4.89761 10.2569 4.87026 10.213 4.85757 10.1651C4.84487 10.1173 4.8478 10.0655 4.86538 10.0094C4.88393 9.95369 4.91128 9.90975 4.94936 9.8785C4.98842 9.84676 5.03628 9.82771 5.09487 9.82088L8.94538 9.36628C9.07916 9.35066 9.20709 9.31892 9.32916 9.27155C9.45025 9.22419 9.56646 9.16071 9.67583 9.0821C9.7852 9.003 9.8809 8.91315 9.96391 8.81256C10.0479 8.71198 10.1172 8.60065 10.1748 8.47858L11.8086 4.98097C11.834 4.92824 11.8672 4.88869 11.9082 4.86183C11.9502 4.83546 12 4.82228 12.0586 4.82228C12.1162 4.82228 12.166 4.83546 12.208 4.86183C12.25 4.88869 12.2822 4.92824 12.3076 4.98097L13.9414 8.47858C13.999 8.60065 14.0693 8.71198 14.1523 8.81256C14.2353 8.91315 14.332 9.003 14.4414 9.0821C14.5507 9.16071 14.666 9.22419 14.7871 9.27155C14.9091 9.31892 15.0371 9.35066 15.1708 9.36628L19.0213 9.82088C19.0799 9.82771 19.1278 9.84676 19.1668 9.8785C19.2049 9.90975 19.2333 9.95369 19.2508 10.0094C19.2694 10.0655 19.2713 10.1173 19.2586 10.1651C19.2459 10.213 19.2186 10.2569 19.1747 10.297L18.3065 11.0924ZM9.31256 13.2311L7.93856 11.8561C7.68368 11.6017 7.68368 11.2027 7.93856 10.9483C8.19246 10.6944 8.59187 10.6944 8.84577 10.9483L10.2207 12.3233C10.4746 12.5777 10.4746 12.9772 10.2207 13.2311C9.96586 13.485 9.56743 13.485 9.31256 13.2311Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const _1={name:"events-icon-events",render:C1},y1={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function E1(o,t){return e.openBlock(),e.createElementBlock("svg",y1,[...t[0]||(t[0]=[e.createElementVNode("rect",{id:"高校 & 比赛",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),e.createElementVNode("path",{id:"矢量 578",d:"M3.05078 7.51904L11.6914 4.13965C11.8086 4.09424 11.9219 4.07178 12.0391 4.07178C12.1523 4.07178 12.2695 4.09473 12.3867 4.14062L20.9609 7.51953C21.0625 7.55957 21.1523 7.61328 21.2305 7.67969C21.2969 7.73779 21.3555 7.80566 21.4062 7.88379C21.5078 8.03857 21.5586 8.20898 21.5625 8.39502C21.5625 8.58057 21.5156 8.75195 21.418 8.9082C21.3125 9.07861 21.1641 9.20264 20.9766 9.28076L19.457 9.91309L19.457 12.2915C19.457 12.6558 19.168 12.9419 18.8047 12.9419C18.4414 12.9419 18.1562 12.6558 18.1562 12.292L18.1562 10.4531L16.0742 11.3188L16.0742 14.7134C16.2852 14.897 16.418 15.1675 16.418 15.4692C16.418 16.0215 15.9688 16.4692 15.418 16.4692C14.8672 16.4692 14.418 16.0215 14.418 15.4692C14.418 15.1626 14.5547 14.8887 14.7734 14.7051L14.7734 11.8589L12.4023 12.8442C12.2852 12.8926 12.1641 12.917 12.0391 12.917C11.9141 12.9175 11.793 12.8936 11.6758 12.8452L5.63281 10.354L5.61328 17.6836C5.61328 17.7285 5.62109 17.771 5.63281 17.8101C5.65234 17.854 5.67969 17.894 5.71484 17.9307C5.75 17.9658 5.78906 17.9917 5.83203 18.0088C5.87109 18.0259 5.91797 18.0342 5.96484 18.0342L17.7812 18.0342C17.832 18.0342 17.875 18.0254 17.918 18.0083C17.957 17.9912 17.9961 17.9658 18.0312 17.9316C18.0625 17.8975 18.0898 17.8599 18.1055 17.8184C18.125 17.7773 18.1328 17.7324 18.1328 17.6841L18.1328 14.1411C18.1328 13.7773 18.418 13.4912 18.7812 13.4912C19.1445 13.4912 19.4336 13.7773 19.4336 14.1411L19.4336 17.6841C19.4336 17.8032 19.418 17.9194 19.3945 18.0332C19.375 18.1333 19.3438 18.231 19.3008 18.3267C19.2188 18.5239 19.1016 18.6987 18.9492 18.8511C18.8711 18.9297 18.7852 18.9995 18.6953 19.0596C18.6094 19.1157 18.5195 19.1641 18.4258 19.2041C18.3281 19.2446 18.2305 19.2759 18.1328 19.2974L18.1328 19.2974C18.0156 19.3218 17.9023 19.334 17.7812 19.334L5.96484 19.334C5.84375 19.334 5.73047 19.3218 5.61719 19.2979C5.51562 19.2759 5.41797 19.2446 5.32031 19.2036C5.12109 19.1201 4.94922 19.002 4.79688 18.8501C4.64453 18.6978 4.52734 18.5225 4.44141 18.3252C4.35547 18.1196 4.3125 17.9048 4.3125 17.6797L4.33594 9.81836L3.03125 9.28174C2.84375 9.2041 2.69531 9.08008 2.58984 8.90967C2.54297 8.83496 2.50781 8.75684 2.48438 8.67578C2.45703 8.58643 2.44531 8.49268 2.44531 8.39502C2.44531 8.29736 2.46094 8.20361 2.48828 8.11475C2.51562 8.03369 2.55078 7.95654 2.59766 7.8833C2.65234 7.80469 2.71094 7.73682 2.77734 7.67871C2.85547 7.61182 2.94922 7.55859 3.05078 7.51904ZM18.5547 8.87891L15.457 10.1665L11.5 8.05322C11.1758 7.88184 10.7891 7.99951 10.6172 8.32031C10.4492 8.6416 10.5664 9.02832 10.8867 9.19971L13.9062 10.8115L12.0352 11.5884L5.23438 8.78271L4.33594 8.41211L12.0352 5.40039L19.6797 8.41211L18.5547 8.87891Z",fill:"rgb(255,254.745,254.745)","fill-rule":"evenodd"},null,-1)])])}const B1={name:"events-icon-competition",render:E1},N1={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function w1(o,t){return e.openBlock(),e.createElementBlock("svg",N1,[...t[0]||(t[0]=[e.createElementVNode("rect",{id:"版本发布计划",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),e.createElementVNode("path",{id:"矢量 579",d:"M8.94922 6.90332L8.94922 6.3335C8.94922 6.23779 8.95703 6.14404 8.97656 6.05225L8.97656 6.05225C8.99609 5.97119 9.01953 5.89209 9.05469 5.81396C9.08594 5.7373 9.125 5.66455 9.17188 5.59619C9.21875 5.52246 9.27734 5.4541 9.33984 5.39062C9.40234 5.32715 9.47266 5.271 9.54297 5.22217L9.54297 5.22217L9.54297 5.22217C9.61328 5.17676 9.6875 5.1377 9.76172 5.10498C9.83984 5.07227 9.91797 5.04688 10 5.02979L10 5.02979C10.0938 5.00977 10.1875 5 10.2812 5L18.668 5C18.7617 5 18.8555 5.00977 18.9492 5.02979L18.9492 5.02979C19.0273 5.04688 19.1094 5.07227 19.1875 5.10498C19.2617 5.1377 19.3359 5.17676 19.4023 5.22217C19.4766 5.271 19.5469 5.32715 19.6094 5.39062C19.6719 5.4541 19.7305 5.52246 19.7773 5.59619L19.7773 5.59619C19.8242 5.66455 19.8633 5.7373 19.8945 5.81396C19.9297 5.89209 19.9531 5.97119 19.9688 6.05225C19.9883 6.14404 20 6.23779 20 6.3335L20 12.2441C20 12.3398 19.9883 12.4336 19.9688 12.5249C19.9531 12.606 19.9297 12.6855 19.8945 12.7632C19.8633 12.8403 19.8242 12.9131 19.7773 12.9814C19.7305 13.0547 19.6719 13.123 19.6094 13.187C19.5469 13.2505 19.4766 13.3066 19.4023 13.3555C19.3359 13.4009 19.2617 13.4399 19.1875 13.4722C19.1094 13.5054 19.0273 13.5303 18.9492 13.5479C18.8555 13.5674 18.7617 13.5771 18.668 13.5771L18.3906 13.5771C18.0664 13.5771 17.8125 13.3232 17.8125 13C17.8125 12.6768 18.0664 12.4229 18.3906 12.4229L18.668 12.4229C18.6914 12.4229 18.7734 12.3789 18.793 12.3701C18.8086 12.353 18.8359 12.2651 18.8438 12.2441L18.8438 6.3335C18.8438 6.30859 18.8008 6.22803 18.793 6.20703C18.7773 6.18945 18.6875 6.16357 18.668 6.15479L10.2812 6.15479C10.2578 6.15479 10.1758 6.19824 10.1562 6.20703C10.1367 6.22461 10.1133 6.3125 10.1016 6.3335L10.1016 6.90332C10.1016 7.22656 9.84766 7.48047 9.52734 7.48047C9.20312 7.48047 8.94922 7.22656 8.94922 6.90332ZM6.47266 9.39307L6.47266 9.21973C6.47266 9.12402 6.48438 9.03027 6.50391 8.93896C6.51953 8.85791 6.54688 8.77832 6.57812 8.70068C6.61328 8.62354 6.65234 8.55127 6.69531 8.48242C6.74609 8.40918 6.80078 8.34082 6.86328 8.27734C6.92969 8.21338 6.99609 8.15723 7.07031 8.10889C7.13672 8.06299 7.21094 8.02441 7.28906 7.9917C7.36719 7.9585 7.44531 7.93359 7.52734 7.91602C7.61719 7.89648 7.71094 7.88672 7.80859 7.88672L16.1914 7.88672C16.2891 7.88672 16.3828 7.89648 16.4727 7.91602C16.5547 7.93359 16.6328 7.9585 16.7109 7.9917C16.7891 8.02441 16.8594 8.06299 16.9297 8.1084C17.0039 8.15723 17.0703 8.21338 17.1367 8.27734C17.1992 8.34082 17.2539 8.40918 17.3047 8.48242C17.3477 8.55127 17.3867 8.62354 17.4219 8.70068C17.4531 8.77832 17.4805 8.85791 17.4961 8.93896C17.5156 9.03027 17.5273 9.12402 17.5273 9.21973L17.5273 15.1304C17.5273 15.2266 17.5156 15.3198 17.4961 15.4116C17.4805 15.4927 17.4531 15.5718 17.4219 15.6499C17.3867 15.7266 17.3477 15.7993 17.3047 15.8682C17.2539 15.9414 17.1992 16.0098 17.1367 16.0732C17.0703 16.1367 17.0039 16.1929 16.9297 16.2417C16.8633 16.2871 16.7891 16.3262 16.7109 16.3589C16.6328 16.3916 16.5547 16.417 16.4727 16.4346C16.3828 16.4541 16.2891 16.4639 16.1914 16.4639L15.8789 16.4639C15.5547 16.4639 15.3008 16.21 15.3008 15.8867C15.3008 15.5635 15.5547 15.3091 15.8789 15.3091L16.1914 15.3091C16.2188 15.3091 16.2969 15.2656 16.3203 15.2568C16.3359 15.2393 16.3633 15.1519 16.3711 15.1304L16.3711 9.21973C16.3711 9.19531 16.3281 9.11475 16.3203 9.09375C16.3008 9.07617 16.2148 9.0498 16.1914 9.04102L7.80859 9.04102C7.78125 9.04102 7.70312 9.08496 7.67969 9.09375C7.66406 9.11084 7.63672 9.19873 7.62891 9.21973L7.62891 9.39307C7.62891 9.71631 7.375 9.97021 7.05078 9.97021C6.72656 9.97021 6.47266 9.71631 6.47266 9.39307ZM14 10.3901C13.9062 10.3706 13.8125 10.3608 13.7188 10.3608L5.33203 10.3608C5.23828 10.3608 5.14453 10.3706 5.05078 10.3901L5.05078 10.3901C4.97266 10.4077 4.89062 10.4331 4.8125 10.4658C4.73828 10.4985 4.66406 10.5376 4.59766 10.583L4.59766 10.583L4.59766 10.583C4.52344 10.6318 4.45312 10.688 4.39062 10.7515C4.32812 10.8149 4.26953 10.8833 4.22266 10.957C4.17578 11.0254 4.13672 11.0981 4.10547 11.1748C4.07031 11.2529 4.04688 11.332 4.03125 11.4131L4.03125 11.4131C4.01172 11.5049 4 11.5981 4 11.6943L4 17.605C4 17.7007 4.01172 17.7944 4.03125 17.8857C4.04688 17.9668 4.07031 18.0464 4.10547 18.124C4.13672 18.2012 4.17578 18.2739 4.22266 18.3423C4.26953 18.4155 4.32812 18.4839 4.39062 18.5479C4.45312 18.6113 4.52344 18.6675 4.59766 18.7163C4.66406 18.7617 4.73828 18.8008 4.8125 18.833C4.89062 18.8662 4.97266 18.8911 5.05078 18.9087L5.05078 18.9087C5.14453 18.9282 5.23828 18.938 5.33203 18.938L13.7188 18.938C13.8125 18.938 13.9062 18.9282 14 18.9087C14.082 18.8911 14.1602 18.8662 14.2383 18.833C14.3125 18.8008 14.3867 18.7617 14.457 18.7163C14.5273 18.6675 14.5977 18.6113 14.6602 18.5479C14.7227 18.4839 14.7812 18.4155 14.8281 18.3423C14.875 18.2739 14.9141 18.2012 14.9453 18.124C14.9805 18.0464 15.0039 17.9668 15.0234 17.8857C15.043 17.7944 15.0508 17.7007 15.0508 17.605L15.0508 11.6943C15.0508 11.5981 15.043 11.5049 15.0234 11.4131C15.0039 11.332 14.9805 11.2529 14.9453 11.1748C14.9141 11.0981 14.875 11.0254 14.8281 10.957C14.7812 10.8833 14.7227 10.8149 14.6602 10.7515C14.5977 10.688 14.5273 10.6318 14.457 10.583C14.3867 10.5376 14.3125 10.4985 14.2383 10.4658C14.1602 10.4331 14.082 10.4077 14 10.3901ZM5.33203 11.5156L13.7188 11.5156C13.7383 11.5244 13.8281 11.5503 13.8438 11.5679C13.8516 11.5889 13.8984 11.6694 13.8984 11.6943L13.8984 17.605C13.8867 17.626 13.8633 17.7139 13.8438 17.731C13.8242 17.7397 13.7422 17.7837 13.7188 17.7837L5.33203 17.7837C5.3125 17.7749 5.22266 17.7485 5.20703 17.731C5.19922 17.71 5.15625 17.6294 5.15625 17.605L5.15625 11.6943C5.16406 11.6733 5.19141 11.5854 5.20703 11.5679C5.22266 11.5503 5.3125 11.5244 5.33203 11.5156ZM11 12.7754C10.8086 12.5776 10.5 12.5742 10.3008 12.7676C10.1055 12.9614 10.1016 13.2695 10.293 13.4678L11 14.1875L8.36719 14.1875C8.08984 14.1875 7.87109 14.4053 7.87109 14.6826C7.87109 14.9595 8.08984 15.1772 8.36719 15.1772L10.9414 15.1772L10.2969 15.8286C10.1016 16.0254 10.1016 16.3335 10.3008 16.5283C10.4961 16.7236 10.8047 16.7222 11 16.5254L12.5039 15.0078C12.6172 14.8926 12.6758 14.7769 12.6758 14.6611C12.6758 14.5459 12.6172 14.4297 12.5039 14.3135L11 12.7754ZM7.39453 13.6792L7.39453 15.9336C7.39453 16.2109 7.17969 16.4287 6.90234 16.4287C6.625 16.4287 6.40625 16.2109 6.40625 15.9336L6.40625 13.6792C6.40625 13.4019 6.625 13.1841 6.90234 13.1841C7.17969 13.1841 7.39453 13.4019 7.39453 13.6792Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const V1={name:"events-icon-release",render:w1},S1={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},b1={events:_1,competition:B1,release:V1,summit:k1},Re={上海:"https://infrastructure-website.osinfra.cn/picture/city/shanghai.jpg",北京:"https://infrastructure-website.osinfra.cn/picture/city/beijing.jpg",南京:"https://infrastructure-website.osinfra.cn/picture/city/nanjing.jpg",天津:"https://infrastructure-website.osinfra.cn/picture/city/tianjin.jpg",成都:"https://infrastructure-website.osinfra.cn/picture/city/chengdu.jpg",无锡:"https://infrastructure-website.osinfra.cn/picture/city/wuxi.jpg",杭州:"https://infrastructure-website.osinfra.cn/picture/city/hangzhou.jpg",深圳:["https://infrastructure-website.osinfra.cn/picture/city/shenzhen1.jpg","https://infrastructure-website.osinfra.cn/picture/city/shenzhen2.jpg"],苏州:"https://infrastructure-website.osinfra.cn/picture/city/suzhou.jpg",西安:"https://infrastructure-website.osinfra.cn/picture/city/xian.jpg",郑州:"https://infrastructure-website.osinfra.cn/picture/city/zhengzhou.jpg",武汉:"https://infrastructure-website.osinfra.cn/picture/city/wuhan.jpg"},L1="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",O1={class:"o-events-calendar"},$1={key:0,class:"month-list"},D1={class:"collapse-header"},x1={class:"collapse-title"},T1={key:0,class:"collapse-desc"},A1={key:0,class:"month-content month-content-span"},I1={key:0,class:"event-location"},M1={class:"event-name"},R1={key:1},z1={key:0,class:"month-content-row"},F1={class:"month-name"},P1={class:"event-name"},H1={class:"event-location"},U1={class:"event-name"},W1={class:"event-location"},G1={key:1,class:"month-content month-content-column"},j1={class:"event-location"},q1={class:"event-name"},K1={key:1},Gt=e.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(o){const t=uo(),{lePadV:r}=Q.useScreen(),l=o,a=["JAN","FEB","MAR","Apr","May","JUN","Jul","Aug","Sep","Oct","Nov","Dec"],c=e.ref([]);e.watch([()=>l.data,()=>r.value],()=>{var h;l.data.length?r.value?c.value=[(h=l.data[0])==null?void 0:h.name]:c.value=l.data.map(V=>V.name):c.value=[]},{immediate:!0});const m=h=>{const V=h.split("/");return parseInt(V[1],10)},p=h=>{const V=new Array(12).fill(0),E=[];return h.forEach((N,w)=>{const[k,S]=Array.isArray(N.date)?[m(N.date[0]),m(N.date[1])]:[m(N.date),m(N.date)];let R=0;for(let L=k-1;L<S;L++)R=Math.max(R,V[L]);const g=R+1;for(let L=k-1;L<S;L++)V[L]=g;E.push({event:N,row:g,eventIndex:w,start:k,end:S})}),E},s=h=>{const V=Array.from({length:12},()=>[]);return h.forEach(E=>{const N=Array.isArray(E.date)?m(E.date[0]):m(E.date);V[N-1].push(E)}),V},y=h=>{const V=h.color||S1[h.type];return V!=null&&V.startsWith("--")?`var(${V})`:V},u=h=>h.icon?h.icon:b1[h.type];return(h,V)=>(e.openBlock(),e.createElementBlock("div",O1,[e.unref(r)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",$1,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(a,E=>e.createElementVNode("div",{class:"month-header",key:E},e.toDisplayString(E),1)),64))])),e.createVNode(e.unref(i.OCollapse),{modelValue:c.value,"onUpdate:modelValue":V[0]||(V[0]=E=>c.value=E)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.data,(E,N)=>(e.openBlock(),e.createBlock(e.unref(i.OCollapseItem),{key:N,value:E.name},{title:e.withCtx(()=>[e.createElementVNode("div",D1,[e.createElementVNode("div",x1,[e.createElementVNode("div",{class:"title-icon",style:e.normalizeStyle({"--bg-color":y(E)})},[e.createVNode(e.unref(i.OIcon),null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(E))))]),_:2},1024)],4),e.createElementVNode("span",null,e.toDisplayString(E.name),1)]),E.desc?(e.openBlock(),e.createElementBlock("div",T1,[e.withDirectives(e.createElementVNode("div",null,null,512),[[e.unref(t),E.desc]])])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[E.isSpanMonth?(e.openBlock(),e.createElementBlock("div",A1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p(E.data),({event:w,row:k,eventIndex:S,start:R,end:g})=>(e.openBlock(),e.createElementBlock("div",{key:S,class:e.normalizeClass(["event-item",{"event-item-center":w.align==="center","has-link":w.link}]),style:e.normalizeStyle({gridColumn:`${R} / ${g+1}`,gridRow:k,"--bg-color":y(E)||void 0})},[w.location?(e.openBlock(),e.createElementBlock("div",I1,e.toDisplayString(w.location),1)):e.createCommentVNode("",!0),e.createElementVNode("div",M1,[w.link?(e.openBlock(),e.createBlock(e.unref(i.OLink),e.mergeProps({key:0,href:w.link,target:"_blank"},{ref_for:!0},w.linkProps||{}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.name),1)]),_:2},1040,["href"])):(e.openBlock(),e.createElementBlock("span",R1,e.toDisplayString(w.name),1))])],6))),128))])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.unref(r)?(e.openBlock(),e.createElementBlock("div",z1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s(E.data),(w,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:e.normalizeClass(["month-row",{"empty-month":w.length===0}])},[e.createElementVNode("div",F1,e.toDisplayString(a[k]),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w,(S,R)=>(e.openBlock(),e.createElementBlock("div",{key:R,class:e.normalizeClass(["event-item",S.link?"has-link":""]),style:e.normalizeStyle({"--bd-color":y(E)||void 0})},[S.link?(e.openBlock(),e.createBlock(e.unref(i.OLink),{key:0,href:S.link,target:"_blank"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("div",P1,[e.createElementVNode("span",null,e.toDisplayString(S.name),1)]),e.createElementVNode("div",H1,e.toDisplayString(S.location),1)]),e.createVNode(e.unref(i.OIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(i.OIconChevronRight))]),_:1})]),_:2},1032,["href"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",U1,e.toDisplayString(S.name),1),e.createElementVNode("div",W1,e.toDisplayString(S.location),1)],64))],6))),128))],2))),128))])):(e.openBlock(),e.createElementBlock("div",G1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s(E.data),(w,k)=>(e.openBlock(),e.createElementBlock("div",{key:k,class:"month-column"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w,(S,R)=>(e.openBlock(),e.createElementBlock("div",{key:R,class:e.normalizeClass(["event-item",S.link?"has-link":""]),style:e.normalizeStyle({"--bg-color":y(E)||void 0})},[e.createElementVNode("div",j1,e.toDisplayString(S.location),1),e.createElementVNode("div",q1,[S.link?(e.openBlock(),e.createBlock(e.unref(i.OLink),{key:0,href:S.link,target:"_blank"},{suffix:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(i.OIconChevronRight))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(S.name),1)]),_:2},1032,["href"])):(e.openBlock(),e.createElementBlock("span",K1,e.toDisplayString(S.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var de=(o=>(o.FINISH="finish",o.ING="ing",o.ALL="",o))(de||{});const jt=(o,t)=>new Date(o).getTime()>new Date(t).getTime(),Z1={class:"o-events-list"},Y1={class:"filter-wrapper"},X1={class:"filter-left"},J1={class:"list-content"},Q1={class:"event-name"},ec={class:"event-desc"},tc={class:"event-date"},oc={key:0,class:"event-location"},qt=e.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(o,{emit:t}){const{t:r}=H.useI18n(),{lePadV:l}=Q.useScreen(),a=o,c=[{label:r("events.statusAll"),value:de.ALL},{label:r("events.statusIng"),value:de.ING},{label:r("events.statusFinish"),value:de.FINISH}],m=t,p=e.ref(de.ALL),s=e.ref(""),y=e.ref(""),u=(N={})=>{m("search",Object.assign({page:a.page,pageSize:a.pageSize,status:p.value,keyword:y.value},N))},h=()=>{u()},V=()=>{y.value=s.value,u()},E=e.computed(()=>a.data.map(N=>({...N,status:jt(new Date,N.date)?de.FINISH:de.ING})).sort((N,w)=>jt(N.date,w.date)?-1:1).map(N=>{var S,R,g;const w=(g=(R=(S=N.city)==null?void 0:S.replace("市",""))==null?void 0:R.replace("中国",""))==null?void 0:g.replaceAll(" ","");let k=null;return Array.isArray(Re[w])?k=Re[w][N.name.length%Re[w].length]:k=Re[w],k||(k=L1),{...N,cover:k}}));return(N,w)=>(e.openBlock(),e.createElementBlock("div",Z1,[e.createElementVNode("div",Y1,[e.createElementVNode("div",X1,[e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("events.status")),1),e.createVNode(e.unref(i.ORadioGroup),{modelValue:p.value,"onUpdate:modelValue":w[0]||(w[0]=k=>p.value=k),style:{"--radio-group-gap":"8px"},onChange:h},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(c,k=>e.createVNode(e.unref(i.ORadio),{key:k.value,value:k.value},{radio:e.withCtx(({checked:S})=>[e.createVNode(e.unref(i.OToggle),{checked:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),e.createVNode(e.unref(i.OInput),{modelValue:s.value,"onUpdate:modelValue":w[1]||(w[1]=k=>s.value=k),placeholder:e.unref(r)("events.searchPlaceholder"),onPressEnter:V,onClear:V,clearable:""},{prefix:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"input-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OIconSearch))]),_:1})]),_:1},8,["modelValue","placeholder"])]),e.createElementVNode("div",J1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,k=>(e.openBlock(),e.createBlock(e.unref(i.OCard),{key:k.name,cover:k.cover,href:k.link},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OTag),{class:"event-status"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(k.status===e.unref(de).ING?e.unref(r)("events.statusIng"):e.unref(r)("events.statusFinish")),1)]),_:2},1024),e.createElementVNode("div",Q1,e.toDisplayString(k.name),1),e.createElementVNode("div",ec,[e.createElementVNode("div",tc,e.toDisplayString(k.date),1),e.createVNode(e.unref(i.ODivider),{direction:"v"}),k.city?(e.openBlock(),e.createElementBlock("div",oc,e.toDisplayString(k.city),1)):e.createCommentVNode("",!0)])]),_:2},1032,["cover","href"]))),128))]),E.value.length?e.createCommentVNode("",!0):e.renderSlot(N.$slots,"empty",{key:0}),o.total>8?(e.openBlock(),e.createBlock(e.unref(i.OPagination),{key:1,page:o.page,simple:e.unref(l),"show-total":!0,pageSize:o.pageSize,total:o.total,onChange:u,pageSizes:[4,12,24,36,48]},null,8,["page","simple","pageSize","total"])):e.createCommentVNode("",!0)]))}}),nc={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function rc(o,t){return e.openBlock(),e.createElementBlock("svg",nc,[...t[0]||(t[0]=[e.createElementVNode("path",{fill:"#1da9ff",d:"M20.4 5.95c0.27-0.27 0.71-0.27 0.99 0 0.24 0.25 0.27 0.63 0.070 0.91l-0.070 0.080-10.5 10.47c-0.53 0.53-1.36 0.56-1.93 0.1l-0.11-0.1-5.23-5.2c-0.28-0.28-0.28-0.72-0.010-0.99 0.25-0.25 0.63-0.28 0.91-0.080l0.080 0.070 5.24 5.21c0.010 0.010 0.030 0.010 0.040 0.010l0.030-0.010 10.49-10.47z"},null,-1)])])}const ac={name:"events-icon-checked",render:rc},lc={class:"o-events-apply"},cc={class:"events-apply-grid"},sc={class:"timeline-number"},ic={class:"number-circle"},dc={class:"step-title"},uc={class:"step-idx"},mc={class:"step-desc"},pc={key:0},fc={class:"desc-list-wrapper"},hc={key:0,class:"desc-list-title"},vc={class:"desc-list-content"},kc={class:"desc-list-item-title"},gc={class:"desc-list-item-desc"},Kt=e.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(o){const{isDark:t}=Q.useTheme(),r=uo();return(l,a)=>(e.openBlock(),e.createElementBlock("div",lc,[e.createElementVNode("div",cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.steps,(c,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:m},[e.createElementVNode("div",sc,[e.createElementVNode("div",ic,e.toDisplayString(m+1),1)]),e.createElementVNode("div",{class:e.normalizeClass(["step-item",`step-${m+1} ${e.unref(t)?"is-dark":""}`]),style:{}},[e.createElementVNode("div",dc,[e.createElementVNode("div",uc,e.toDisplayString(m+1),1),e.createElementVNode("span",null,e.toDisplayString(c.title),1)]),e.createElementVNode("div",mc,[c.desc?e.withDirectives((e.openBlock(),e.createElementBlock("div",pc,null,512)),[[e.unref(r),c.desc]]):e.createCommentVNode("",!0),e.renderSlot(l.$slots,`step${m+1}`),e.createElementVNode("div",fc,[c.listTitle?(e.openBlock(),e.createElementBlock("div",hc,e.toDisplayString(c.listTitle),1)):e.createCommentVNode("",!0),e.createElementVNode("div",vc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.list,(p,s)=>(e.openBlock(),e.createElementBlock("div",{class:"desc-list-item",key:s},[e.createElementVNode("div",kc,[e.createVNode(e.unref(i.OIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ac))]),_:1}),e.createElementVNode("span",null,e.toDisplayString(p.title),1)]),e.createElementVNode("div",gc,e.toDisplayString(p.desc),1)]))),128))])])]),c.img?(e.openBlock(),e.createElementBlock("div",{key:0,class:"img-wrapper",style:e.normalizeStyle({backgroundImage:`url(${c.img})`})},null,4)):e.createCommentVNode("",!0),c.imgPhone?(e.openBlock(),e.createElementBlock("div",{key:1,class:"img-wrapper-phone",style:e.normalizeStyle({backgroundImage:`url(${c.imgPhone})`})},null,4)):e.createCommentVNode("",!0)],2)],64))),128))])]))}}),Cc=Object.assign(Gt,{install(o){o.component("OEventsCalendar",Gt)}}),_c=Object.assign(qt,{install(o){o.component("OEventsList",qt)}}),yc=Object.assign(Kt,{install(o){o.component("OEventsApply",Kt)}}),Ec={OBanner:Zt,OCookieNotice:Yt,OFooter:Xt,OHeader:Jt,OHeaderMoblie:eo,OHeaderSearch:to,OHeaderUser:no,OPlusConfigProvider:ro,OSection:ao,OSourceCode:lo,OThemeSwitcher:co},Bc={install:o=>{Object.entries(Ec).forEach(([t,r])=>{o.component(t,r)})}};exports.OElCookieNotice=H.OElCookieNotice;exports.EventsStatusT=de;exports.OBanner=Zt;exports.OCookieNotice=Yt;exports.OEventsApply=yc;exports.OEventsCalendar=Cc;exports.OEventsList=_c;exports.OFooter=Xt;exports.OHeader=Jt;exports.OHeaderMoblie=eo;exports.OHeaderSearch=to;exports.OHeaderUser=no;exports.OPlusConfigProvider=ro;exports.OSection=ao;exports.OSourceCode=lo;exports.OThemeSwitcher=co;exports.default=Bc;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),I=require("@opensig/opendesign"),Et=require("@opendesign-plus/composables"),Ke=require("./chunk-OElCookieNotice.cjs.js"),sn=require("@vueuse/core"),it=require("element-plus"),Xm=require("@opensig/opendesign/es/locale/lang/zh-cn"),Km=require("@opensig/opendesign/es/locale/lang/en-us"),Qm=n.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(s){const e=Symbol("default"),i=s,r=n.computed(()=>i.verticalPadding?I.isBoolean(i.verticalPadding)?e:I.isString(i.verticalPadding)?i.verticalPadding:i.verticalPadding[0]:0),a=n.computed(()=>i.verticalPadding?I.isBoolean(i.verticalPadding)?e:I.isString(i.verticalPadding)?i.verticalPadding:I.isUndefined(i.verticalPadding[1])?i.verticalPadding[0]:i.verticalPadding[1]:0);return(o,l)=>(n.openBlock(),n.createElementBlock("div",{class:"content-wrapper",style:n.normalizeStyle({"--content-wrapper-vertical-paddingTop":r.value===n.unref(e)?void 0:r.value,"--content-wrapper-vertical-paddingBottom":a.value===n.unref(e)?void 0:a.value})},[n.renderSlot(o.$slots,"default",{},void 0,!0)],4))}}),On=Ke._export_sfc(Qm,[["__scopeId","data-v-29de9f52"]]),Zm={key:0},Jm={class:"banner-content"},eg=["src"],tg={key:1,class:"banner-title"},ig={key:2,class:"banner-subtitle"},ng={key:4,class:"banner-opts"},rg=n.defineComponent({__name:"OBanner",props:{options:{default:void 0},size:{default:"large"},contentJustifyCenter:{type:Boolean,default:!1}},setup(s){const e=s,{isLight:i}=Et.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:r}=Et.useScreen(),a=n.computed(()=>e.options),o=n.ref(""),l=d=>{setTimeout(()=>{o.value=a.value[d].bg_theme??"light"},100)},u=(d,f)=>{d&&!f&&window.open(d)};return(d,f)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["home-banner",s.size])},[s.size==="tiny"?(n.openBlock(),n.createElementBlock("div",Zm,n.toDisplayString(a.value[1].title),1)):n.unref(r)?n.unref(r)?(n.openBlock(),n.createBlock(n.unref(I.OCarousel),{key:2,class:"banner-carousel",effect:"gallery","indicator-click":"","data-o-theme":o.value,arrow:"never","auto-play":!0,onBeforeChange:l},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,(g,v)=>(n.openBlock(),n.createBlock(n.unref(I.OCarouselItem),{class:n.normalizeClass(["banner-item",`banner-item${v}`]),key:v},{default:n.withCtx(()=>[n.createVNode(On,{class:"banner-wrapper"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OFigure),{class:"banner-bg",src:g.bg,onClick:S=>u(g.href)},null,8,["src","onClick"])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"])):n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(I.OCarousel),{key:1,class:"banner-carousel",effect:"toggle","active-class":"current-slide","indicator-click":"","auto-play":!0,"data-o-theme":o.value,onBeforeChange:l},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,(g,v)=>(n.openBlock(),n.createBlock(n.unref(I.OCarouselItem),{key:v,class:n.normalizeClass(["banner-item",`banner-item${v}`])},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OFigure),{class:n.normalizeClass(["banner-bg",{"with-sticky-bg":g.withStickyBg,"in-dark":!n.unref(i),"cursor-pointer":g.href&&!g.btn}]),src:g.bg,style:n.normalizeStyle({"--pad-offset":g.pad_offset}),onClick:S=>u(g.href,g.btn)},{default:n.withCtx(()=>[n.createVNode(On,{class:n.normalizeClass(["banner-wrapper",["banner-wrapper",s.contentJustifyCenter?"content-center":""]])},{default:n.withCtx(()=>[n.createElementVNode("div",Jm,[!n.unref(r)&&g.attach?(n.openBlock(),n.createElementBlock("img",{key:0,src:g.attach,class:"banner-attach"},null,8,eg)):n.createCommentVNode("",!0),g.title?(n.openBlock(),n.createElementBlock("div",tg,n.toDisplayString(g.title),1)):n.createCommentVNode("",!0),g.subtitle?(n.openBlock(),n.createElementBlock("div",ig,n.toDisplayString(g.subtitle),1)):n.createCommentVNode("",!0),g.bg_text?(n.openBlock(),n.createElementBlock("div",{key:3,class:"banner-text",style:n.normalizeStyle({backgroundImage:`url(${g.bg_text})`,"--pc-width":g.pc_text_width,"--pc-height":g.pc_text_height,"--pad-width":g.pad_text_width,"--pad-height":g.pad_text_height})},null,4)):n.createCommentVNode("",!0),g.btn?(n.openBlock(),n.createElementBlock("div",ng,[n.createVNode(n.unref(I.OButton),{href:g.href,target:"_blank",variant:"solid",color:"primary",size:s.size},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(g.btn),1)]),_:2},1032,["href","size"])])):n.createCommentVNode("",!0)])]),_:2},1032,["class"])]),_:2},1032,["src","class","style","onClick"])]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"]))],2))}}),uh=Ke._export_sfc(rg,[["__scopeId","data-v-2356da15"]]),sg={key:0,class:"cookie-notice"},ag={class:"cookie-notice-content"},og=["type"],lg={class:"cookie-notice-left"},ug={key:0,class:"cookie-desc",style:{"margin-top":"0"}},cg=["href"],dg={class:"cookie-title"},hg={class:"cookie-desc"},fg=["href"],pg={key:0,class:"cookie-notice-right"},mg={class:"cookie-dlg-title"},gg={class:"cookie-dlg-content"},vg={class:"content-item"},_g={class:"item-header"},yg={class:"item-title"},Tg={class:"item-extra"},bg={class:"item-detail"},xg={class:"content-item"},Cg={class:"item-header"},Eg={class:"item-title"},Sg={class:"item-extra"},kg={class:"item-detail"},wg="0",rc="1",Dg="2",Ps="3",Ag="agreed-cookiepolicy-zh",Ng="agreed-cookiepolicy-en",Ig=n.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},enableGrid:{type:Boolean},community:{},detailUrl:{},wrapper:{},cookieDomain:{}},emits:["update:visible"],setup(s,{expose:e,emit:i}){const r=s,a=i,{lePadV:o,leLaptop:l}=Et.useScreen(),{locale:u,t:d}=Ke.useI18n(),f=n.computed(()=>u.value==="zh"),g=n.computed(()=>f.value?Ag:Ng),v=n.ref(!1),S=sn.useVModel(r,"visible",a,{defaultValue:!1}),C=b=>{const x=document.cookie.split(";").find(q=>q.split("=")[0].trim()===encodeURIComponent(b));return x?decodeURIComponent(x.split("=")[1]):null},O=(b,x,q,H)=>{const k=`; max-age=${q*24*60*60}`;document.cookie=`${encodeURIComponent(b)}=${encodeURIComponent(x)}${k}; path=/; domain=${H}`},T=(b,x)=>{document.cookie=`${encodeURIComponent(b)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${x}`},w=b=>{typeof b=="boolean"?S.value=b:S.value=!S.value,n.nextTick(()=>{!S.value&&f.value&&C(g.value)!==Ps&&O(g.value,Ps,180,r.cookieDomain??location.hostname)})},R=n.ref(!1),L=b=>{typeof b=="boolean"?R.value=b:R.value=!R.value},D=()=>f.value?C(g.value)!==Ps:(C(g.value)??"0")===wg,M=()=>f.value?C(g.value)===Ps:C(g.value)===rc;n.onMounted(()=>{D()&&w(!0)}),n.watch(u,()=>{w(D())});const U=()=>{v.value=!0,T(g.value,r.cookieDomain??location.hostname),O(g.value,rc,180,r.cookieDomain??location.hostname),w(!1)},Y=()=>{v.value=!1,T(g.value,r.cookieDomain??location.hostname),O(g.value,Dg,180,r.cookieDomain??location.hostname),w(!1)},P=n.computed(()=>[{id:"save",color:"primary",label:d("cookie.saveSetting"),variant:"outline",size:"large",round:"pill",onClick:()=>{v.value?U():Y(),L(!1)}},{id:"allowAll",color:"primary",label:d("cookie.acceptAll"),variant:"outline",size:"large",round:"pill",onClick:()=>{v.value=!0,U(),L(!1)}}]),J=b=>{b&&(v.value=M())};return e({check(){M()===S.value&&w()}}),(b,x)=>(n.openBlock(),n.createBlock(n.unref(Ke.ClientOnly),null,{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.Teleport,{to:s.wrapper||"#app"},[n.unref(S)?(n.openBlock(),n.createElementBlock("div",sg,[n.createElementVNode("div",ag,[n.createElementVNode("div",{type:n.unref(u),class:n.normalizeClass({"cookie-notice-wrap-grid":s.enableGrid,"cookie-notice-wrap":!s.enableGrid})},[n.createElementVNode("div",lg,[f.value?(n.openBlock(),n.createElementBlock("p",ug,[n.createTextVNode(n.toDisplayString(n.unref(d)("cookie.desc"))+" ",1),n.createElementVNode("a",{href:s.detailUrl,target:"_blank",rel:"noopener noreferrer"},n.toDisplayString(n.unref(d)("cookie.about")),9,cg)])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createElementVNode("p",dg,n.toDisplayString(n.unref(d)("cookie.title",[s.community])),1),n.createElementVNode("p",hg,[n.createTextVNode(n.toDisplayString(n.unref(d)("cookie.desc"))+" ",1),n.createElementVNode("a",{href:s.detailUrl,target:"_blank",rel:"noopener noreferrer"},n.toDisplayString(n.unref(d)("cookie.about")),9,fg),x[4]||(x[4]=n.createTextVNode(". ",-1))])],64))]),f.value?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",pg,[n.createVNode(n.unref(I.OButton),{round:"pill",variant:"outline",color:"primary",onClick:U},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(d)("cookie.acceptAll")),1)]),_:1}),n.createVNode(n.unref(I.OButton),{round:"pill",variant:"outline",color:"primary",onClick:Y},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(d)("cookie.rejectAll")),1)]),_:1}),n.createVNode(n.unref(I.OButton),{round:"pill",variant:"outline",color:"primary",onClick:x[0]||(x[0]=q=>L(!0))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(d)("cookie.manage")),1)]),_:1})])),n.createVNode(n.unref(I.OIcon),{class:"cookie-notice-close",type:n.unref(u),onClick:x[1]||(x[1]=q=>w(!1))},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconClose))]),_:1},8,["type"])],10,og)]),n.createVNode(n.unref(I.ODialog),{visible:R.value,"onUpdate:visible":x[3]||(x[3]=q=>R.value=q),size:n.unref(l)?"medium":"large","phone-half-full":n.unref(o),class:"cookie-dlg",actions:P.value,onChange:J},{header:n.withCtx(()=>[n.createElementVNode("span",mg,n.toDisplayString(n.unref(d)("cookie.manage")),1)]),default:n.withCtx(()=>[n.createElementVNode("div",gg,[n.createElementVNode("div",vg,[n.createElementVNode("div",_g,[n.createElementVNode("span",yg,n.toDisplayString(n.unref(d)("cookie.necessaryCookie")),1),n.createElementVNode("span",Tg,n.toDisplayString(n.unref(d)("cookie.alwaysOn")),1)]),n.createElementVNode("div",bg,n.toDisplayString(n.unref(d)("cookie.necessaryCookieDetail")),1)]),n.createElementVNode("div",xg,[n.createElementVNode("div",Cg,[n.createElementVNode("span",Eg,n.toDisplayString(n.unref(d)("cookie.analyticalCookie")),1),n.createElementVNode("span",Sg,[n.createVNode(n.unref(I.OSwitch),{modelValue:v.value,"onUpdate:modelValue":x[2]||(x[2]=q=>v.value=q)},null,8,["modelValue"])])]),n.createElementVNode("div",kg,n.toDisplayString(n.unref(d)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","actions"])])):n.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),ch=Ke._export_sfc(Ig,[["__scopeId","data-v-f1dd144c"]]),Og={key:0,class:"atom"},Bg={class:"atom-text"},Lg=["href"],Pg=["src"],Mg={key:0,class:"quick-nav"},Rg={class:"category-title"},Vg={class:"navs"},Fg=["href"],$g={key:0,class:"friendship-link"},Ug={class:"friendship-link-title"},qg={class:"friendship-link-box"},jg=["href"],Hg={key:0,class:"footer-logo"},zg=["src"],Gg=["src"],Wg=["href"],Yg={key:1,class:"footer-option"},Xg={class:"footer-option-item"},Kg=["href"],Qg={class:"license"},Zg={class:"copyright"},Jg={class:"filing"},e1=["href"],t1=["src"],i1={key:2,class:"footer-right"},n1={key:0,class:"code-box"},r1=["src"],s1={class:"code-layer"},a1=["src"],o1={class:"txt"},l1={class:"app-footer-pc"},u1={key:0,class:"footer-left"},c1=["href"],d1=["src"],h1={key:0,class:"footer-right"},f1=["href"],p1={class:"app-footer-mb"},m1={key:0,class:"links"},g1=["href"],v1={class:"copyright"},_1={key:0,class:"approval"},y1=["href"],T1=["src"],b1=n.defineComponent({__name:"OFooter",setup(s){const e=s;return(i,r)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([e.simple?"app-footer-simple":"app-footer"])},[e.simple?(n.openBlock(),n.createBlock(On,{key:1},{default:n.withCtx(()=>[n.createElementVNode("div",l1,[i.$slots.left||e.footerOption?n.renderSlot(i.$slots,"left",{key:0},()=>[e.footerOption?(n.openBlock(),n.createElementBlock("div",u1,[n.createElementVNode("span",null,n.toDisplayString(e.footerOption[e.lang].copyright),1),n.createElementVNode("a",{class:"approval",href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},n.toDisplayString(e.footerOption[e.lang].beianInfo1),9,c1),n.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,d1),n.createElementVNode("span",null,n.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):n.createCommentVNode("",!0)],!0):n.createCommentVNode("",!0),i.$slots.right||e.footerOption?n.renderSlot(i.$slots,"right",{key:1},()=>[e.footerOption?(n.openBlock(),n.createElementBlock("div",h1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.footerOption[e.lang].link,(a,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:a.url},[n.createElementVNode("a",{target:"_blank",href:a.url,class:"link"},n.toDisplayString(a.name),9,f1),o!==e.footerOption[e.lang].link.length-1?(n.openBlock(),n.createBlock(n.unref(I.ODivider),{key:0,direction:"v"})):n.createCommentVNode("",!0)],64))),128))])):n.createCommentVNode("",!0)],!0):n.createCommentVNode("",!0)]),n.createElementVNode("div",p1,[i.$slots.right||e.footerOption?n.renderSlot(i.$slots,"right",{key:0},()=>[e.footerOption?(n.openBlock(),n.createElementBlock("div",m1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.footerOption[e.lang].link,(a,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:a.url},[n.createElementVNode("a",{target:"_blank",href:a.url,class:"link"},n.toDisplayString(a.name),9,g1),o!==e.footerOption[e.lang].link.length-1?(n.openBlock(),n.createBlock(n.unref(I.ODivider),{key:0,direction:"v"})):n.createCommentVNode("",!0)],64))),128))])):n.createCommentVNode("",!0)],!0):n.createCommentVNode("",!0),n.renderSlot(i.$slots,"copyright",{},()=>[n.createElementVNode("div",v1,n.toDisplayString(e.footerOption[e.lang].copyright),1)],!0),i.$slots.left||e.footerOption?n.renderSlot(i.$slots,"left",{key:1},()=>[e.footerOption?(n.openBlock(),n.createElementBlock("div",_1,[n.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},n.toDisplayString(e.footerOption[e.lang].beianInfo1),9,y1),n.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,T1),n.createElementVNode("span",null,n.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):n.createCommentVNode("",!0)],!0):n.createCommentVNode("",!0)])]),_:3})):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[i.$slots.atom||e.atom?(n.openBlock(),n.createBlock(On,{key:0},{default:n.withCtx(()=>[n.renderSlot(i.$slots,"atom",{},()=>[e.atom?(n.openBlock(),n.createElementBlock("div",Og,[n.createElementVNode("p",Bg,n.toDisplayString(e.atom[e.lang].title),1),n.createElementVNode("a",{href:e.atom[e.lang].href,target:"_blank"},[n.createElementVNode("img",{src:e.atom[e.lang].img,class:"atom-logo",alt:""},null,8,Pg)],8,Lg)])):n.createCommentVNode("",!0),n.createVNode(n.unref(I.ODivider),{class:"atom-divider"})],!0)]),_:3})):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"footer-content",style:n.normalizeStyle({backgroundImage:`url(${e.footerBg})`})},[n.createVNode(On,null,{default:n.withCtx(()=>[i.$slots.quickNav||e.quickNav?n.renderSlot(i.$slots,"quickNav",{key:0},()=>[e.quickNav?(n.openBlock(),n.createElementBlock("div",Mg,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.quickNav[e.lang],a=>(n.openBlock(),n.createElementBlock("div",{key:a.title,class:"category"},[n.createElementVNode("div",Rg,n.toDisplayString(a.title),1),n.createElementVNode("ul",Vg,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.list,o=>(n.openBlock(),n.createElementBlock("li",{key:o.title,class:"nav"},[n.createElementVNode("a",{href:o.link,target:"_blank",rel:"noopener noreferrer"},n.toDisplayString(o.title),9,Fg)]))),128))])]))),128))])):n.createCommentVNode("",!0)],!0):n.createCommentVNode("",!0),i.$slots.friendshipLink||e.friendshipLink?n.renderSlot(i.$slots,"friendshipLink",{key:1},()=>[e.friendshipLink?(n.openBlock(),n.createElementBlock("div",$g,[n.createElementVNode("div",Ug,n.toDisplayString(e.friendshipLink.title[e.lang]),1),n.createElementVNode("div",qg,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.friendshipLink.link[e.lang],a=>(n.openBlock(),n.createElementBlock("a",{href:a.link,key:a.link,target:"_blank"},n.toDisplayString(a.title),9,jg))),128))])])):n.createCommentVNode("",!0)],!0):n.createCommentVNode("",!0),n.renderSlot(i.$slots,"footer",{},()=>[n.createElementVNode("div",{class:n.normalizeClass(["inner",{"inner-en":e.lang==="en"}])},[e.footerLogo?(n.openBlock(),n.createElementBlock("div",Hg,[n.createElementVNode("img",{class:"show-pc",src:e.footerLogo.logo,alt:""},null,8,zg),n.createElementVNode("img",{class:"show-mo",src:e.footerLogo.logoMb,alt:""},null,8,Gg),n.createElementVNode("p",null,[n.createElementVNode("a",{class:"email",href:`mailto:${e.footerLogo.email}`,target:"_blank"},n.toDisplayString(e.footerLogo.email),9,Wg)])])):n.createCommentVNode("",!0),e.footerOption?(n.openBlock(),n.createElementBlock("div",Yg,[n.createElementVNode("div",Xg,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.footerOption[e.lang].link,(a,o)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:a.url},[n.createElementVNode("a",{target:"_blank",href:a.url},n.toDisplayString(a.name),9,Kg),o!==e.footerOption[e.lang].link.length-1?(n.openBlock(),n.createBlock(n.unref(I.ODivider),{key:0,style:{"--o-divider-bd-color":"var(--o-color-info3-inverse)","--o-divider-label-gap":"0 8px"},direction:"v"})):n.createCommentVNode("",!0)],64))),128))]),n.createElementVNode("p",Qg,[n.createElementVNode("span",null,n.toDisplayString(e.footerOption[e.lang].licenseText),1),n.createTextVNode(" "+n.toDisplayString(e.footerOption[e.lang].licenseInfo),1)]),n.createElementVNode("div",Zg,[n.createElementVNode("p",null,n.toDisplayString(e.footerOption[e.lang].copyright),1),n.createElementVNode("div",Jg,[n.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank"},n.toDisplayString(e.footerOption[e.lang].beianInfo1),9,e1),n.createElementVNode("img",{src:e.footerOption[e.lang].policeIcon,class:"filing-img"},null,8,t1),n.createElementVNode("p",null,n.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])])])):n.createCommentVNode("",!0),e.qrcode?(n.openBlock(),n.createElementBlock("div",i1,[e.lang==="zh"?(n.openBlock(),n.createElementBlock("div",n1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.qrcode,(a,o)=>(n.openBlock(),n.createElementBlock("div",{key:o,class:"code-pop"},[n.createElementVNode("img",{src:a.img,class:"code-img",alt:""},null,8,r1),n.createElementVNode("div",s1,[n.createElementVNode("img",{src:a.code,alt:""},null,8,a1),n.createElementVNode("p",o1,n.toDisplayString(a.label),1)])]))),128))])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),dh=Ke._export_sfc(b1,[["__scopeId","data-v-e3abaa88"]]),x1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function C1(s,e){return n.openBlock(),n.createElementBlock("svg",x1,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"currentColor",d:"M9.461 11.616l4.719-3.932c0.212-0.177 0.527-0.148 0.704 0.064 0.075 0.090 0.116 0.203 0.116 0.32v7.865c0 0.276-0.224 0.5-0.5 0.5-0.117 0-0.23-0.041-0.32-0.116l-4.719-3.932c-0.212-0.177-0.241-0.492-0.064-0.704 0.019-0.023 0.041-0.045 0.064-0.064z"},null,-1)])])}const E1={name:"components-icon-caret-left",render:C1},S1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function k1(s,e){return n.openBlock(),n.createElementBlock("svg",S1,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"currentColor",d:"M14.539 11.616l-4.719-3.932c-0.212-0.177-0.527-0.148-0.704 0.064-0.075 0.090-0.116 0.203-0.116 0.32v7.865c0 0.276 0.224 0.5 0.5 0.5 0.117 0 0.23-0.041 0.32-0.116l4.719-3.932c0.212-0.177 0.241-0.492 0.064-0.704-0.019-0.023-0.041-0.045-0.064-0.064z"},null,-1)])])}const w1={name:"components-icon-caret-right",render:k1},D1={class:"header-content"},A1={key:0,class:"right-icon"},N1=["onMouseenter"],I1=["id"],O1={class:"nav-drop-content"},B1={class:"nav-sub-content"},L1={class:"content-left"},P1={class:"content-label"},M1={class:"content-container"},R1=["onClick"],V1={class:"item-name"},F1={key:0,class:"desc-container"},$1=["title"],U1={key:0,class:"split-line"},q1={key:1,class:"content-right"},j1=["onClick"],H1=["onClick"],z1=["src"],G1={class:"review-content"},W1={class:"review-label"},Y1={class:"review-property"},X1={key:1,class:"right-icon"},K1=n.defineComponent({__name:"HeaderEulerNav",props:{navData:void 0,bgLeft:void 0,bgRight:void 0},setup(s){const e=s,{locale:i}=Et.useLocale(),{theme:r,isDark:a}=Et.useTheme(),o=n.ref(),l=n.ref(),u=n.ref(null),d=n.ref(!1),f=n.ref(!1),g=n.ref(!1),v=n.ref(),S=n.ref([]),C=n.ref([]),O=n.ref(!1),T=sn.useDebounceFn(function(Y){Y===null?(v.value="",g.value=!1,O.value=!1):(v.value=Y.id,g.value=!0,S.value=Y.children,C.value=Y.shortcut,O.value=Y.withPicture)},100),w=(Y,P)=>{window.open(Y,P),v.value="",g.value=!1},R=n.ref(!1),L=Y=>{!Y||!Y.target||(R.value=Y.target.clientHeight<Y.target.scrollHeight)},D=()=>{f.value=!0,n.nextTick(()=>{o.value.scrollTo({left:o.value.clientWidth,behavior:"smooth"})})},M=()=>{o.value.scrollTo({left:0,behavior:"smooth"}),f.value=!1},U=()=>{var Y,P;((Y=o.value)==null?void 0:Y.clientWidth)<((P=l.value)==null?void 0:P.clientWidth)&&(d.value=!0)};return n.onMounted(()=>{window.addEventListener("resize",U),n.nextTick(()=>{U(),u.value=setTimeout(()=>{U()},1e3)})}),n.onUnmounted(()=>{window.removeEventListener("resize",U),clearTimeout(u.value)}),(Y,P)=>(n.openBlock(),n.createElementBlock("div",D1,[n.createElementVNode("div",{class:n.normalizeClass(["header-nav",{"header-nav-scroll":f.value}])},[f.value?(n.openBlock(),n.createElementBlock("div",A1,[n.createVNode(n.unref(I.OIcon),{onClick:M},{default:n.withCtx(()=>[n.createVNode(n.unref(E1))]),_:1})])):n.createCommentVNode("",!0),n.createElementVNode("nav",{ref_key:"navRef",ref:o,class:n.normalizeClass(["o-nav",{"o-nav-scroll":f.value||!d.value,dark:n.unref(a)}])},[n.createElementVNode("ul",{ref_key:"navListRef",ref:l,class:"o-nav-list"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.navData,J=>(n.openBlock(),n.createElementBlock("li",{key:J.id,onMouseenter:b=>n.unref(T)(J),onMouseleave:P[1]||(P[1]=b=>n.unref(T)(null))},[n.createElementVNode("span",{id:"tour_headerNav_"+J.ID,class:"nav-item"},n.toDisplayString(J.label),9,I1),n.createVNode(n.Transition,{name:"transition"},{default:n.withCtx(()=>[g.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["nav-dropdown",v.value,n.unref(r),`${v.value}-${n.unref(i)}`])},[n.createElementVNode("div",O1,[n.createElementVNode("div",{class:"nav-background-left",style:n.normalizeStyle({backgroundImage:`url(${e.bgLeft})`})},null,4),n.createElementVNode("div",{class:"nav-background-right",style:n.normalizeStyle({backgroundImage:`url(${e.bgRight})`})},null,4),n.createVNode(n.unref(I.OScroller),{class:"nav-scroller","show-type":"always",size:"small","disabled-y":""},{default:n.withCtx(()=>{var b,x;return[n.createElementVNode("div",B1,[n.createElementVNode("div",L1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(S.value,(q,H)=>(n.openBlock(),n.createElementBlock("div",{class:"item-sub",key:H},[n.createElementVNode("span",P1,n.toDisplayString(q.label),1),n.createElementVNode("div",M1,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(q.children,k=>(n.openBlock(),n.createElementBlock("div",{key:k.label,class:"content-item"},[n.createElementVNode("a",{onClick:A=>w(k.href,"_self"),rel:"noopener noreferrer",class:"item-label"},[n.createElementVNode("span",V1,n.toDisplayString(k.label),1),k.icon?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(k.icon),{class:"icon"}))]),_:2},1024)):n.createCommentVNode("",!0),k.tag?(n.openBlock(),n.createBlock(n.unref(I.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(k.tag),1)]),_:2},1024)):n.createCommentVNode("",!0)],8,R1),k.description?(n.openBlock(),n.createElementBlock("div",F1,[n.createElementVNode("p",{class:"item-desc",title:R.value?k.description:null,onMouseenter:P[0]||(P[0]=A=>L(A))},n.toDisplayString(k.description),41,$1)])):n.createCommentVNode("",!0)]))),128))])]))),128))]),(b=C.value)!=null&&b.length?(n.openBlock(),n.createElementBlock("div",U1)):n.createCommentVNode("",!0),(x=C.value)!=null&&x.length?(n.openBlock(),n.createElementBlock("div",q1,[P[2]||(P[2]=n.createElementVNode("span",{class:"content-label"},"快捷链接",-1)),O.value?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:1},n.renderList(C.value,q=>(n.openBlock(),n.createElementBlock("a",{key:q.label,onClick:H=>w(q.href,"_self"),rel:"noopener noreferrer",class:"review"},[n.createElementVNode("img",{src:q.picture,class:"review-picture"},null,8,z1),n.createElementVNode("div",G1,[n.createElementVNode("p",W1,n.toDisplayString(q.label),1),n.createElementVNode("div",Y1,[n.createElementVNode("span",null,n.toDisplayString(q.remark),1)])])],8,H1))),128)):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(C.value,q=>(n.openBlock(),n.createElementBlock("div",{key:q.label,class:"shortcut"},[n.createElementVNode("a",{onClick:H=>w(q.href,"_self"),rel:"noopener noreferrer",class:"shortcut-link"},[n.createElementVNode("span",null,n.toDisplayString(q.label),1),q.icon?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(q.icon),{class:"icon"}))]),_:2},1024)):n.createCommentVNode("",!0)],8,j1)]))),128))])):n.createCommentVNode("",!0)])]}),_:1})])],2)):n.createCommentVNode("",!0)]),_:1})],40,N1))),128))],512)],2),d.value&&!f.value?(n.openBlock(),n.createElementBlock("div",X1,[n.createVNode(n.unref(I.OIcon),{onClick:D},{default:n.withCtx(()=>[n.createVNode(n.unref(w1))]),_:1})])):n.createCommentVNode("",!0)],2)]))}}),Q1=Ke._export_sfc(K1,[["__scopeId","data-v-d3d0a9ef"]]),Z1=["id","onMouseenter","onMouseleave"],J1=["href"],e2={key:1,class:"info-wrap"},t2={class:"dropdown-wrapper"},i2={key:0,class:"tab-disabled"},n2={key:1,class:"tab-expand"},r2=["href","target","rel"],s2={class:"dropdown-body-wrapper",style:{display:"none !important"}},a2=["onMouseenter"],o2={key:0,class:"dropdown-item"},l2={class:"tab-disabled"},u2={key:1,class:"dropdown-item"},c2=["href","target","rel"],Hn="more",d2=n.defineComponent({__name:"HeaderUbmcNav",props:{navData:void 0,hasPerm:void 0,tagMap:void 0,currentPath:void 0},setup(s){const e=s,{locale:i}=Et.useLocale(),{lePadV:r}=Et.useScreen(),a={},o=n.ref({}),l=n.ref(-1),u=H=>{l.value=H},d=H=>{var k;l.value=-1,(k=o.value[H])==null||k.clearCheckedNodes()},f=n.ref(-1),g=()=>{var k;const H=(k=a==null?void 0:a.fullPath)==null?void 0:k.split("/").slice(0,3).join("/");f.value=[...O.value,C.value].findIndex(A=>{var K,j;const $=H==null?void 0:H.indexOf("#");return P.value.length&&!P.value.includes(A.id)&&A.id!==Hn?!1:q(A.href)===H||((K=A.children)==null?void 0:K.some(F=>{var G;return(G=F.children)!=null&&G.length?F.children.some(Z=>q(Z.href)===H):q(F.href)===H}))||((j=A.keys)==null?void 0:j.includes(H==null?void 0:H.slice(1,$!==-1?$:H==null?void 0:H.length)))})};n.onMounted(()=>{g()}),n.watch(()=>a.path,()=>{g()});const v=(H,k)=>{let A=!0;return H&&(A=A&&new Date(H).getTime()>=Date.now()),k&&(A=A&&i.value===k),A},S=(H,k)=>H.checkPermKey?k[H.checkPermKey]:!0,C=n.computed(()=>({id:Hn,label:"更多",children:O.value.filter(H=>!P.value.includes(H.id))||[]})),O=n.computed(()=>{const H=[];let k=[];const A={meeting:e.hasPerm};try{k=e.navData.filter($=>S($,A)).map(function $(K){H.push(K.label);const j={...K,_path:[...H]};return K.children&&(j.children=K.children.filter(F=>S(F,A)).map($)),H.pop(),j})}catch{k=e.navData}return k});let T=0,w=0;const R=H=>{const k=Date.now()-T,A=w+1;if(T=0,w=0,H._path){const $={};return H._path.forEach((K,j)=>{$[`level${j+1}`]=K}),{properties:{module:"navigation",timeUsed:k,steps:A,...$}}}},L=H=>{if(w++,!T)return T=Date.now(),{event:"hover",properties:{module:"navigation",target:H.label}}},D=()=>{T=0,w=0},M=H=>H?H.startsWith("http"):!1,U=n.ref(null),Y=n.ref(null),P=n.ref([]),J=n.ref(null),b=n.ref(0),x=()=>{if(!U.value)return;if(P.value=[],b.value=U.value.clientWidth,r.value&&(P.value=O.value.map(K=>K.id)),U.value.clientWidth>=Y.value.clientWidth){P.value=O.value.map(K=>K.id);return}b.value=0;const H=Y.value.querySelector(`li.nav-item#${Hn}`);let k=U.value.clientWidth-H.clientWidth;const A=Y.value.querySelectorAll("li.nav-item");let $=!1;[...A].forEach((K,j)=>{K.id!==Hn&&k>K.clientWidth&&!$?(k-=K.clientWidth,P.value.push(O.value[j].id),b.value+=K.clientWidth):$=!0})};n.onMounted(()=>{window.addEventListener("resize",x),n.nextTick(()=>{x(),J.value=setTimeout(()=>{x()},1e3)})}),n.onUnmounted(()=>{window.removeEventListener("resize",x),clearTimeout(J.value)}),n.watch(()=>O.value,()=>{n.nextTick(()=>{x()})},{deep:!0});const q=H=>(H==="/"&&(H=""),M(H)?H:`/${i.value}${H}`);return(H,k)=>{const A=n.resolveDirective("analytics");return n.openBlock(),n.createElementBlock("nav",{class:"header-nav-ubmc",ref_key:"wrapperRef",ref:U},[n.createElementVNode("ul",{class:"nav-list",onMouseleave:D,ref_key:"listRef",ref:Y,style:n.normalizeStyle({"--more-left":b.value})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList([...O.value,C.value],($,K)=>{var j;return n.withDirectives((n.openBlock(),n.createElementBlock("li",{key:$.id,id:$.id,class:n.normalizeClass(["nav-item",{"is-selected":f.value===K,"is-active":l.value===K,hidden:!P.value.includes($.id)&&$.id!==Hn||$.id===Hn&&$.children.length===0}]),onMouseenter:F=>u(K),onMouseleave:F=>d(K)},[!((j=$.children)!=null&&j.length)&&$.href?(n.openBlock(),n.createElementBlock("a",{key:0,class:"info-wrap clickable",href:q($.href)},[n.createElementVNode("span",null,[n.createElementVNode("span",null,n.toDisplayString($.label),1)])],8,J1)):(n.openBlock(),n.createElementBlock("div",e2,[n.createElementVNode("span",null,[n.createElementVNode("span",null,n.toDisplayString($.label),1)]),n.createElementVNode("div",t2,[n.createVNode(n.unref(it.ElCascaderPanel),{options:$.children,value:"id",expandTrigger:"hover",ref_for:!0,ref:F=>o.value[K]=F},{default:n.withCtx(({data:F})=>{var G;return[F.disabled?(n.openBlock(),n.createElementBlock("div",i2,[n.createElementVNode("span",null,n.toDisplayString(F.label),1),k[0]||(k[0]=n.createElementVNode("span",{class:"disabled-tag"},"待上线",-1))])):F!=null&&F.children?(n.openBlock(),n.createElementBlock("div",n2,[n.createElementVNode("span",null,n.toDisplayString(F.label),1),n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1})])):(n.openBlock(),n.createElementBlock("a",{key:2,href:q(F.href),class:"dropdown-link",target:M(F.href)?"_blank":"_self",rel:M(F.href)?"noopener noreferrer":""},[n.createElementVNode("span",null,n.toDisplayString(F.label),1),(s.tagMap[(G=F==null?void 0:F.href)==null?void 0:G.slice(1)]||F.tag)&&v(F.tagExpire,F.tagLang)?(n.openBlock(),n.createBlock(n.unref(I.OTag),{key:0,color:"danger",size:"small",round:"pill"},{default:n.withCtx(()=>{var Z;return[n.createTextVNode(n.toDisplayString(s.tagMap[(Z=F==null?void 0:F.href)==null?void 0:Z.slice(1)]||F.tag),1)]}),_:2},1024)):n.createCommentVNode("",!0),F.icon?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:1,class:"jump-out-icon"},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(F.icon),{class:"icon"}))]),_:2},1024)):n.createCommentVNode("",!0)],8,r2))]}),_:1},8,["options"]),n.createElementVNode("div",s2,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList($.children,(F,G)=>{var Z;return n.openBlock(),n.createElementBlock("div",{class:"dropdown-body",key:G,onMouseenter:ee=>u(K),onMouseleave:d},[F.disabled?(n.openBlock(),n.createElementBlock("div",o2,[n.createElementVNode("div",l2,[n.createElementVNode("span",null,n.toDisplayString(F.label),1),k[1]||(k[1]=n.createElementVNode("span",{class:"disabled-tag"},"待上线",-1))])])):n.withDirectives((n.openBlock(),n.createElementBlock("div",u2,[n.createElementVNode("a",{href:q(F.href),class:"dropdown-link",target:M(F.href)?"_blank":"_self",rel:M(F.href)?"noopener noreferrer":""},[n.createElementVNode("span",null,n.toDisplayString(F.label),1),(s.tagMap[(Z=F==null?void 0:F.href)==null?void 0:Z.slice(1)]||F.tag)&&v(F.tagExpire,F.tagLang)?(n.openBlock(),n.createBlock(n.unref(I.OTag),{key:0,color:"danger",size:"small",round:"pill"},{default:n.withCtx(()=>{var ee;return[n.createTextVNode(n.toDisplayString(s.tagMap[(ee=F==null?void 0:F.href)==null?void 0:ee.slice(1)]||F.tag),1)]}),_:2},1024)):n.createCommentVNode("",!0),F.icon?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:1,class:"jump-out-icon"},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(F.icon),{class:"icon"}))]),_:2},1024)):n.createCommentVNode("",!0)],8,c2)])),[[A,()=>R(F)]])],40,a2)}),128))])])]))],42,Z1)),[[A,()=>L($),"mouseenter"]])}),128))],36)],512)}}}),h2=Ke._export_sfc(d2,[["__scopeId","data-v-d7d33a36"]]),f2={class:"header"},p2=["src"],m2={key:0,class:"header-nav"},g2={key:1,class:"header-content"},v2={key:2,class:"header-toolbar"},_2=n.defineComponent({__name:"OHeader",props:{logo:void 0,lang:void 0,community:void 0,navData:void 0,bgLeft:void 0,bgRight:void 0,tagMap:void 0},emits:["go-home"],setup(s,{emit:e}){const i=e,r=s,a=()=>{i("go-home")};return(o,l)=>(n.openBlock(),n.createElementBlock("div",f2,[n.createVNode(On,{class:"header-wrap"},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"header-logo",onClick:a},[n.renderSlot(o.$slots,"logo",{},()=>[r.logo?(n.openBlock(),n.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:r.logo},null,8,p2)):n.createCommentVNode("",!0)],!0)]),r.community==="openEuler"?(n.openBlock(),n.createElementBlock("div",m2,[n.renderSlot(o.$slots,"nav",{},()=>[r.navData?(n.openBlock(),n.createBlock(Q1,{key:0,"nav-data":r.navData,"bg-left":r.bgLeft,"bg-right":r.bgRight},null,8,["nav-data","bg-left","bg-right"])):n.createCommentVNode("",!0)],!0)])):n.createCommentVNode("",!0),r.community==="openUBMC"?(n.openBlock(),n.createElementBlock("div",g2,[n.renderSlot(o.$slots,"nav",{},()=>[r.navData?(n.openBlock(),n.createBlock(h2,{key:0,"nav-data":r.navData,"has-perm":!0,"tag-map":s.tagMap},null,8,["nav-data","tag-map"])):n.createCommentVNode("",!0)],!0)])):n.createCommentVNode("",!0),o.$slots.toolbar?(n.openBlock(),n.createElementBlock("div",v2,[n.renderSlot(o.$slots,"toolbar",{},void 0,!0)])):n.createCommentVNode("",!0)]),_:3})]))}}),hh=Ke._export_sfc(_2,[["__scopeId","data-v-af43105c"]]),y2={class:"header-content-mb"},T2={class:"o-nav"},b2={class:"o-nav-list"},x2=["onClick"],C2={class:"nav-aside"},E2={key:0,class:"nav-aside-wrapper"},S2=["value","title"],k2={class:"content-label"},w2={class:"container-mobile"},D2=["onClick"],A2={class:"item-label"},N2={class:"desc-container"},I2={class:"item-desc"},O2=["onClick"],B2={class:"item-label"},L2={key:1,class:"nav-aside-wrapper"},P2=["onClick"],M2={class:"header-tool"},R2={key:1},V2=n.defineComponent({__name:"HeaderNavMoblie",props:{menuShow:{type:Boolean,default(){return!1}},navData:void 0,codeData:void 0},emits:["link-click"],setup(s,{emit:e}){const i=s,r=n.ref(""),a=n.ref({}),o=d=>{d?(r.value=d.id,a.value=d):(r.value="source_code",a.value=i.codeData)},l=e,u=(d,f)=>{window.open(d,f),l("link-click")};return n.onMounted(()=>{r.value=i.navData[0].id,a.value=i.navData[0]}),n.watch(()=>i.navData||i.codeData,()=>{a.value=r.value==="source_code"?i.codeData:i.navData.find(d=>d.id===r.value)},{deep:!0}),(d,f)=>(n.openBlock(),n.createElementBlock("div",y2,[n.createElementVNode("div",{class:n.normalizeClass(["header-nav",{active:s.menuShow}])},[n.createElementVNode("div",T2,[n.createElementVNode("ul",b2,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.navData,g=>(n.openBlock(),n.createElementBlock("li",{key:g.id,class:n.normalizeClass({active:r.value===g.id})},[n.createElementVNode("span",{onClick:v=>o(g)},n.toDisplayString(g.label),9,x2)],2))),128))]),n.createElementVNode("div",C2,[r.value!=="source_code"?(n.openBlock(),n.createElementBlock("ul",E2,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value.children,g=>(n.openBlock(),n.createElementBlock("li",{value:g.label,title:g.label,key:g.label,class:"nav-aside-content"},[g!=null&&g.children?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("p",k2,n.toDisplayString(g.label),1),n.createElementVNode("div",w2,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(g==null?void 0:g.children,v=>(n.openBlock(),n.createElementBlock("div",{key:v.label,class:"content-container-mobile"},[n.createElementVNode("a",{onClick:S=>u(v.href,"_blank"),rel:"noopener noreferrer",class:"content-subtitle"},[n.createElementVNode("span",A2,n.toDisplayString(v.label),1),v.icon?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(v.icon),{class:"icon"}))]),_:2},1024)):n.createCommentVNode("",!0),v.tag?(n.openBlock(),n.createBlock(n.unref(I.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(v.tag),1)]),_:2},1024)):n.createCommentVNode("",!0)],8,D2),n.createElementVNode("div",N2,[n.createElementVNode("p",I2,n.toDisplayString(v.description),1)])]))),128))])],64)):(n.openBlock(),n.createElementBlock("a",{key:1,onClick:v=>u(g.href,"_blank"),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[n.createElementVNode("span",B2,n.toDisplayString(g.label),1),g.icon?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):n.createCommentVNode("",!0),g.tag?(n.openBlock(),n.createBlock(n.unref(I.OTag),{key:1,round:"pill",color:"danger",size:"small"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(g.tag),1)]),_:2},1024)):n.createCommentVNode("",!0)],8,O2))],8,S2))),128))])):(n.openBlock(),n.createElementBlock("div",L2,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.value,g=>(n.openBlock(),n.createElementBlock("a",{key:g.label,onClick:v=>u(g.href,"_blank"),class:"source-code-item"},[n.createElementVNode("span",null,n.toDisplayString(g.label),1),g.icon?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):n.createCommentVNode("",!0)],8,P2))),128))]))])]),n.createElementVNode("div",M2,[s.codeData?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["header-tool-code",{active:r.value==="source_code"}]),onClick:f[0]||(f[0]=g=>o(null))}," 源码 ",2)):n.createCommentVNode("",!0),d.$slots.tool?(n.openBlock(),n.createElementBlock("div",R2,[n.renderSlot(d.$slots,"tool",{},void 0,!0)])):n.createCommentVNode("",!0)])],2)]))}}),F2=Ke._export_sfc(V2,[["__scopeId","data-v-bd38af58"]]),$2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function U2(s,e){return n.openBlock(),n.createElementBlock("svg",$2,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"currentColor",d:"M18.528 5.472c0.246 0.246 0.271 0.63 0.074 0.903l-0.074 0.087-5.54 5.538 0.006 0.006-0.989 0.989-0.006-0.006-5.538 5.54c-0.273 0.273-0.717 0.273-0.99 0-0.246-0.246-0.271-0.63-0.074-0.903l0.074-0.087 5.538-5.539-5.538-5.538-0.074-0.087c-0.197-0.274-0.172-0.657 0.074-0.903s0.63-0.271 0.903-0.074l0.087 0.074 5.538 5.539 5.539-5.539c0.273-0.273 0.717-0.273 0.99 0zM14.551 13.561l3.978 3.978 0.074 0.087c0.197 0.274 0.172 0.657-0.074 0.903s-0.63 0.271-0.903 0.074l-0.087-0.074-3.978-3.978c-0.273-0.273-0.273-0.717 0-0.99v0c0.273-0.273 0.717-0.273 0.99 0z"},null,-1)])])}const Dl={name:"components-icon-close",render:U2},q2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function j2(s,e){return n.openBlock(),n.createElementBlock("svg",q2,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"currentColor",d:"M3.8 5h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 11h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 17h16.4c0.442 0 0.8 0.358 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.359-0.8-0.8s0.358-0.8 0.8-0.8z"},null,-1)])])}const H2={name:"components-icon-header-menu",render:j2},z2={class:"header"},G2={key:0,class:"header-simple"},W2={class:"simple-header-left"},Y2={key:0,class:"header-title"},X2={key:0,class:"simple-header-right"},K2={class:"header-left"},Q2={class:"header-center"},Z2=["src"],J2={class:"header-right"},ev=n.defineComponent({__name:"OHeaderMoblie",props:{logo:void 0,navData:void 0,codeData:void 0,isSimpleHeader:void 0,headerTitle:void 0},emits:["go-back","go-home"],setup(s,{emit:e}){const i=e,r=s,a=()=>{i("go-back")},o=()=>{i("go-home")},l=n.ref(!1),u=()=>{setTimeout(()=>{l.value=!l.value,document.body.style.overflow=l.value?"hidden":""},200)},d=()=>{u()};return(f,g)=>(n.openBlock(),n.createElementBlock("div",z2,[n.createVNode(On,{class:"header-wrap"},{default:n.withCtx(()=>[s.isSimpleHeader?(n.openBlock(),n.createElementBlock("div",G2,[n.createElementVNode("div",W2,[n.createVNode(n.unref(I.OIcon),{onClick:a},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconArrowLeft))]),_:1}),s.headerTitle?(n.openBlock(),n.createElementBlock("div",Y2,n.toDisplayString(s.headerTitle),1)):n.createCommentVNode("",!0)]),f.$slots.rightConfig?(n.openBlock(),n.createElementBlock("div",X2,[n.renderSlot(f.$slots,"rightConfig",{},void 0,!0)])):n.createCommentVNode("",!0)])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createElementVNode("div",K2,[n.createVNode(n.unref(I.OIcon),{onClick:u},{default:n.withCtx(()=>[l.value?(n.openBlock(),n.createBlock(n.unref(Dl),{key:1})):(n.openBlock(),n.createBlock(n.unref(H2),{key:0}))]),_:1})]),n.createVNode(F2,{ref:"mobileNav","nav-data":s.navData,"code-data":s.codeData,"menu-show":l.value,onLinkClick:d},{tool:n.withCtx(()=>[n.renderSlot(f.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","menu-show"]),n.createElementVNode("div",Q2,[n.createElementVNode("div",{class:"header-logo",onClick:o},[n.renderSlot(f.$slots,"logo",{},()=>[r.logo?(n.openBlock(),n.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:r.logo},null,8,Z2)):n.createCommentVNode("",!0)],!0)])]),n.createElementVNode("div",J2,[n.renderSlot(f.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]))}}),fh=Ke._export_sfc(ev,[["__scopeId","data-v-bf633ce0"]]),tv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function iv(s,e){return n.openBlock(),n.createElementBlock("svg",tv,[...e[0]||(e[0]=[n.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M13.215 0.524c-7.048 0-12.762 5.714-12.762 12.762s5.714 12.762 12.762 12.762c7.048 0 12.762-5.714 12.762-12.762s-5.714-12.762-12.762-12.762zM13.215 2.809c5.786 0 10.476 4.69 10.476 10.476s-4.69 10.476-10.476 10.476c-5.786 0-10.476-4.69-10.476-10.476s4.69-10.476 10.476-10.476z"},null,-1),n.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M23.33 23.22c0.446-0.447 1.169-0.448 1.616-0.002l4.771 4.759c0.447 0.446 0.448 1.169 0.002 1.616s-1.169 0.448-1.616 0.002l-4.771-4.759c-0.447-0.446-0.448-1.169-0.002-1.616z"},null,-1)])])}const sc={name:"components-icon-header-search",render:iv},nv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function rv(s,e){return n.openBlock(),n.createElementBlock("svg",nv,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"currentColor",d:"M10.858 22.41c-0.349 0.349-0.915 0.349-1.263 0-0.314-0.314-0.345-0.804-0.094-1.153l0.094-0.111 5.146-5.15-5.177-5.178c-0.274-0.305-0.3-0.755-0.077-1.087l0.111-0.135c0.347-0.347 0.91-0.347 1.257 0l5.142 5.143 5.15-5.146c0.349-0.349 0.915-0.349 1.263 0 0.314 0.314 0.345 0.804 0.094 1.153l-0.094 0.111-11.552 11.552zM17.89 16.634l4.551 4.552c0.313 0.349 0.302 0.886-0.034 1.222-0.347 0.347-0.91 0.347-1.257 0l-4.516-4.518 1.256-1.256z"},null,-1)])])}const sv={name:"components-icon-header-delete",render:rv},av={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function ov(s,e){return n.openBlock(),n.createElementBlock("svg",av,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"currentColor",d:"M19.154 5.295c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006-12.201-0.001 0.001 12.413c0 0.17 0.12 0.311 0.28 0.344l0.071 0.007h9.39c0.17 0 0.311-0.12 0.344-0.28l0.007-0.071v-10.47c0-0.387 0.313-0.7 0.7-0.7 0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v10.47c0 0.919-0.708 1.672-1.608 1.745l-0.144 0.006h-9.39c-0.919 0-1.672-0.708-1.745-1.608l-0.006-0.144-0.001-12.413-0.707 0.001c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h14.308zM10.011 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.953 9.744c0.354 0 0.647 0.263 0.694 0.605l0.006 0.095v5.68c0 0.387-0.313 0.7-0.7 0.7-0.354 0-0.647-0.263-0.694-0.605l-0.006-0.095v-5.68c0-0.387 0.313-0.7 0.7-0.7zM13.652 3.189c0.387 0 0.7 0.313 0.7 0.7 0 0.354-0.263 0.647-0.605 0.694l-0.095 0.006h-3.972c-0.387 0-0.7-0.313-0.7-0.7 0-0.354 0.263-0.647 0.605-0.694l0.095-0.006h3.972z"},null,-1)])])}const lv={name:"components-icon-delete",render:ov},uv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function cv(s,e){return n.openBlock(),n.createElementBlock("svg",uv,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"currentColor",d:"M5.886 19.111l10.672 10.677c0.46 0.524 0.44 1.322-0.060 1.822s-1.298 0.52-1.822 0.060l-0.064-0.060-12.498-12.498h3.772zM14.613 0.391c0.521-0.521 1.365-0.521 1.886 0 0.5 0.5 0.52 1.298 0.060 1.822l-0.060 0.064-12.391 12.391h29.67c0.71 0 1.291 0.555 1.331 1.255l0.002 0.078c0 0.71-0.555 1.291-1.255 1.331l-0.078 0.002h-31.816c-0.472 0-0.924-0.187-1.257-0.521-0.671-0.671-0.694-1.745-0.067-2.443l0.067-0.071 13.908-13.908z"},null,-1)])])}const dv={name:"components-icon-header-back",render:cv},hv={class:"o-header-search"},fv={class:"o-header-search-drawer"},pv={key:0,class:"o-header-search-recommend-container"},mv=["onClick"],gv={key:1,class:"o-header-search-history-container"},vv={class:"o-header-search-history-header"},_v={class:"o-header-search-history-header-title"},yv={class:"o-header-search-history-item-container"},Tv=["onClick"],bv={class:"o-header-search-history-item-text"},xv={key:3,class:"o-header-search-hot-container"},Cv={class:"o-header-search-hot-header"},Ev={class:"o-header-search-hot-item-container"},Sv=["onClick"],kv=n.defineComponent({__name:"OHeaderSearch",props:{modelValue:{default:""},placeholder:{},expandedPlaceholder:{},expandDirection:{default:"left"},clearable:{type:Boolean,default:!0},historyItems:{default:()=>[]},maxHistoryCount:{default:6},storeHistory:{type:Boolean,default:!1},historyTitle:{},storageKey:{default:"search-history"},hotItems:{default:()=>[]},hotTitle:{},recommendItems:{default:()=>[]},searchUrl:{},searchUrlOpenBlank:{type:Boolean,default:!0},searchTextMobile:{}},emits:["update:modelValue","update:historyItems","clear","search","delete-history","delete-history-item"],setup(s,{emit:e}){const{lePadV:i}=Et.useScreen(),{t:r}=Ke.useI18n(),a=s,o=e,l=n.ref(a.modelValue),u=n.ref(a.historyItems),d=n.ref(!1),f=n.ref(),g=n.computed(()=>!i.value&&d.value||i.value&&l.value);n.watch(()=>a.modelValue,D=>{l.value!==D&&(l.value=D)}),n.watch(()=>l.value,D=>{o("update:modelValue",D)}),n.watch(()=>a.historyItems,D=>{u.value!==D&&(u.value=D)}),n.watch(()=>u.value,D=>{o("update:historyItems",D)}),n.onMounted(()=>{if(a.storeHistory&&a.storageKey)try{const D=JSON.parse(localStorage.getItem(a.storageKey)||"[]");Array.isArray(D)&&D.length&&(u.value=Array.from(new Set([...u.value,...D])))}catch{}});const v=()=>{d.value=!0},S=()=>{const D=l.value.trim();D&&(d.value=!1,u.value.unshift(D),u.value=Array.from(new Set(u.value)),u.value.length>a.maxHistoryCount&&u.value.pop(),a.storeHistory&&a.storeHistory&&localStorage.setItem(a.storageKey,JSON.stringify(u.value)),o("search",D),a.searchUrl&&window.open(a.searchUrl+D,a.searchUrlOpenBlank?"_blank":"_self","noopener noreferrer"))},C=()=>{l.value="",o("clear"),i.value||(d.value=!1)},O=()=>{const D=[...u.value];u.value=[],a.storeHistory&&a.storeHistory&&localStorage.removeItem(a.storageKey),o("delete-history",D)},T=D=>{u.value=u.value.filter(M=>M!==D),a.storeHistory&&a.storeHistory&&(u.value.length?localStorage.setItem(a.storageKey,JSON.stringify(u.value)):localStorage.removeItem(a.storageKey)),o("delete-history-item",D)},w=D=>{l.value=D,S()},R=()=>{l.value="",d.value=!1},L=n.ref();return sn.onClickOutside(L,C),(D,M)=>(n.openBlock(),n.createElementBlock("div",hv,[n.createElementVNode("div",{ref_key:"posWrapper",ref:L,class:n.normalizeClass({"o-header-search-input-pc-wrapper":!n.unref(i),"o-header-search-input-pc-wrapper-left":!n.unref(i)&&s.expandDirection==="left","o-header-search-input-pc-wrapper-right":!n.unref(i)&&s.expandDirection==="right","o-header-search-input-mobile-wrapper":n.unref(i),focus:d.value})},[n.createElementVNode("div",{class:n.normalizeClass(["o-header-search-input-wrapper",{focus:d.value}])},[n.unref(i)&&d.value?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0,class:"o-header-search-icon",onClick:R},{default:n.withCtx(()=>[n.createVNode(n.unref(dv))]),_:1})):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OInput),{ref_key:"inputRef",ref:f,modelValue:l.value,"onUpdate:modelValue":M[0]||(M[0]=U=>l.value=U),class:"o-header-search-input",placeholder:d.value?s.expandedPlaceholder??n.unref(r)("search.expandedPlaceholder"):s.placeholder??n.unref(r)("search.placeholder"),onFocus:v,onKeyup:n.withKeys(S,["enter"])},{prefix:n.withCtx(()=>[n.renderSlot(D.$slots,"input-prefix",{},()=>[n.createVNode(n.unref(I.OIcon),{class:"o-header-search-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(sc))]),_:1})],!0)]),suffix:n.withCtx(()=>[n.renderSlot(D.$slots,"input-suffix",{},()=>[s.clearable&&g.value?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0,class:"o-header-search-icon close",onClick:C},{default:n.withCtx(()=>[n.createVNode(n.unref(Dl))]),_:1})):n.createCommentVNode("",!0)],!0)]),_:3},8,["modelValue","placeholder"]),n.unref(i)&&d.value?(n.openBlock(),n.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:S},n.toDisplayString(s.searchTextMobile??n.unref(r)("search")),1)):n.createCommentVNode("",!0)],2),n.withDirectives(n.createElementVNode("div",fv,[n.renderSlot(D.$slots,"drawer",{recommendItems:s.recommendItems,historyItems:u.value,hotItems:s.hotItems},()=>[s.recommendItems.length?(n.openBlock(),n.createElementBlock("div",pv,[n.renderSlot(D.$slots,"recommend-header",{recommend:s.recommendItems},void 0,!0),n.renderSlot(D.$slots,"recommend-content",{recommend:s.recommendItems},()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.recommendItems,U=>(n.openBlock(),n.createElementBlock("div",{class:"o-header-search-recommend-item",key:U,onClick:Y=>w(U)},n.toDisplayString(U),9,mv))),128))],!0)])):u.value.length?(n.openBlock(),n.createElementBlock("div",gv,[n.renderSlot(D.$slots,"history-header",{history:u.value},()=>[n.createElementVNode("div",vv,[n.createElementVNode("span",_v,n.toDisplayString(s.historyTitle??n.unref(r)("search.history")),1),n.createVNode(n.unref(I.OIcon),{class:"o-header-search-icon",onClick:O},{default:n.withCtx(()=>[n.createVNode(n.unref(lv))]),_:1})])],!0),n.renderSlot(D.$slots,"history-content",{history:u.value},()=>[n.createElementVNode("div",yv,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.value,U=>(n.openBlock(),n.createElementBlock("div",{key:U,class:"o-header-search-history-item",onClick:Y=>w(U)},[n.createElementVNode("span",bv,n.toDisplayString(U),1),n.createVNode(n.unref(I.OIcon),{class:"o-header-search-history-item-icon",onClick:n.withModifiers(Y=>T(U),["stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(sv),{class:"icon-delete"})]),_:1},8,["onClick"])],8,Tv))),128))])],!0)])):n.createCommentVNode("",!0),(s.recommendItems.length||u.value.length)&&s.hotItems.length?(n.openBlock(),n.createBlock(n.unref(I.ODivider),{key:2,class:"o-header-search-drawer-divider"})):n.createCommentVNode("",!0),s.hotItems.length?(n.openBlock(),n.createElementBlock("div",xv,[n.renderSlot(D.$slots,"hot-header",{hot:s.hotItems},()=>[n.createElementVNode("div",Cv,n.toDisplayString(s.hotTitle??n.unref(r)("search.hot")),1)],!0),n.renderSlot(D.$slots,"hot-content",{hot:s.hotItems},()=>[n.createElementVNode("div",Ev,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.hotItems,U=>(n.openBlock(),n.createElementBlock("div",{key:U,class:"o-header-search-hot-item",onClick:Y=>w(U)},n.toDisplayString(U),9,Sv))),128))])],!0)])):n.createCommentVNode("",!0)],!0)],512),[[n.vShow,d.value]])],2),n.unref(i)?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0,class:"o-header-search-icon-mobile",onClick:v},{default:n.withCtx(()=>[n.createVNode(n.unref(sc))]),_:1})):n.createCommentVNode("",!0)]))}}),ph=Ke._export_sfc(kv,[["__scopeId","data-v-9f1bd8fc"]]),wv=["src"],Dv=n.defineComponent({__name:"AppAvatar",props:{avatar:{type:String,default:""},name:{type:String,default:"",required:!0},size:{type:String,default:"medium"},customSize:{type:Number,default:0},variant:{type:String,default:"round"}},setup(s){const e=s,i=["#058EF0","#FA7305","#03B5A5"],r=n.computed(()=>{var o;return(o=e.name)==null?void 0:o.charAt(0).toUpperCase()}),a=n.computed(()=>{var u;const o={"background-color":"",width:"32px",height:"32px","font-size":"20px"};o["background-color"]=e.name?i[((u=e.name)==null?void 0:u.length)%i.length]:"transparent";let l=0;return e.customSize?l=Number(e.customSize):l={mini:16,small:24,medium:40,large:64}[e.size],o.height=`${l}px`,o.width=`${l}px`,o["font-size"]=`${l/2}px`,o});return(o,l)=>s.avatar&&!s.avatar.includes("gitcode")?(n.openBlock(),n.createElementBlock("img",{key:0,src:s.avatar,class:n.normalizeClass(["img-avatar",s.variant]),style:n.normalizeStyle(a.value),alt:""},null,14,wv)):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["word-avatar",s.variant]),style:n.normalizeStyle(a.value)},n.toDisplayString(r.value),7))}}),ac=Ke._export_sfc(Dv,[["__scopeId","data-v-340348ce"]]),Av={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Nv(s,e){return n.openBlock(),n.createElementBlock("svg",Av,[...e[0]||(e[0]=[n.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M9.412 10.332c0 2.188 1.066 4.127 2.708 5.326-4.858 1.582-8.364 6.052-8.364 11.328 0 0.515 0.418 0.933 0.933 0.933s0.933-0.418 0.933-0.933c0-5.465 4.487-9.922 10.092-10.070 0.095 0.004 0.191 0.006 0.288 0.006 3.639 0 6.59-2.95 6.59-6.59s-2.951-6.59-6.59-6.59-6.59 2.95-6.59 6.59zM16.088 15.049c-0.028-0.003-0.057-0.004-0.087-0.004-0.061 0-0.122 0-0.183 0.001-2.524-0.096-4.541-2.172-4.541-4.72 0-2.608 2.115-4.723 4.723-4.723s4.723 2.115 4.723 4.723c0 2.579-2.067 4.676-4.635 4.722zM21.784 16.465c3.945 2.064 6.463 6.077 6.463 10.528 0 0.515-0.418 0.933-0.933 0.933s-0.933-0.418-0.933-0.933c0-3.744-2.123-7.127-5.462-8.874-0.457-0.239-0.633-0.803-0.394-1.26s0.803-0.633 1.26-0.394z"},null,-1)])])}const Iv={name:"components-icon-avatar-line",render:Nv},Ov={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Bv(s,e){return n.openBlock(),n.createElementBlock("svg",Ov,[...e[0]||(e[0]=[n.createElementVNode("path",{d:"M5.759 8.873c0.251-0.251 0.644-0.271 0.918-0.063l0.072 0.063 5.016 5.016c0.1 0.1 0.254 0.115 0.37 0.043l0.054-0.043 5.062-5.062c0.273-0.273 0.717-0.273 0.99 0 0.251 0.251 0.271 0.644 0.063 0.918l-0.063 0.072-5.062 5.062c-0.629 0.629-1.628 0.662-2.296 0.099l-0.108-0.099-5.016-5.016c-0.273-0.273-0.273-0.717 0-0.99z"},null,-1)])])}const Al={name:"components-icon-chevron-down",render:Bv},Lv={class:"header-user"},Pv={key:0,class:"user-info"},Mv={class:"info-wrap hover-icon-rotate"},Rv={class:"user-account"},Vv={key:0,class:"user-info-dropdown"},Fv={class:"right-info"},$v={class:"user-account"},Uv={key:1},qv=n.defineComponent({__name:"OHeaderUser",props:{token:{default:void 0},lang:{default:void 0},noticeTotal:{default:void 0},userInfo:{default:void 0},userInfoVisible:{type:Boolean,default:void 0},options:{default:void 0}},emits:["login","logout"],setup(s,{emit:e}){const{lePadV:i}=Et.useScreen(),r=e,a=()=>{r("login")},o=l=>{l!=null&&l.logout?r("logout"):window.open(l.url,l.target)};return(l,u)=>(n.openBlock(),n.createElementBlock("div",Lv,[s.token?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0,onClick:a,class:"avatar-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(Iv))]),_:1})),n.createVNode(n.Transition,{name:"header-user-zoom-in"},{default:n.withCtx(()=>[s.token?(n.openBlock(),n.createElementBlock("div",Pv,[n.createVNode(n.unref(I.ODropdown),{trigger:n.unref(i)?"click":"hover",optionPosition:n.unref(i)?"br":"bottom","option-wrap-class":`user-dropdown ${s.lang==="en"?"is-en":""} user-dropdown${s.userInfoVisible?"-info":""}`},{dropdown:n.withCtx(()=>[s.userInfoVisible?(n.openBlock(),n.createElementBlock("div",Vv,[n.createVNode(ac,{avatar:s.userInfo.photo,name:s.userInfo.username,"custom-size":32},null,8,["avatar","name"]),n.createElementVNode("div",Fv,[u[0]||(u[0]=n.createElementVNode("p",{class:"user-fullname"},"用户名",-1)),n.createElementVNode("p",$v,n.toDisplayString(s.userInfo.username),1)])])):n.createCommentVNode("",!0),s.userInfoVisible?(n.openBlock(),n.createBlock(n.unref(I.ODivider),{key:1,style:{"--o-divider-gap":"6px"}})):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.options,d=>(n.openBlock(),n.createBlock(n.unref(I.ODropdownItem),{key:d.label,style:n.normalizeStyle({"--dropdown-item-justify":s.userInfoVisible?"flex-start":"center"}),onClick:f=>o(d)},{default:n.withCtx(()=>[d!=null&&d.icon?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(n.unref(I.OBadge),{value:d.total,color:"danger",class:n.normalizeClass(["header-message icon-message",{"notice-not":!d.total}])},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.icon),{class:"icon"}))]),_:2},1024)]),_:2},1032,["value","class"]),n.createElementVNode("span",null,n.toDisplayString(d.label),1)],64)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[d!=null&&d.total?(n.openBlock(),n.createBlock(n.unref(I.OBadge),{key:0,value:d.total,color:"danger",class:n.normalizeClass(["header-message message",{"notice-not":!d.total}])},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(d.label),1)]),_:2},1032,["value","class"])):(n.openBlock(),n.createElementBlock("span",Uv,n.toDisplayString(d.label),1))],64))]),_:2},1032,["style","onClick"]))),128))]),default:n.withCtx(()=>[n.createElementVNode("div",Mv,[n.createVNode(n.unref(I.OBadge),{value:s.noticeTotal,color:"danger",class:n.normalizeClass(["header-message user-avatar",{"notice-not":!s.noticeTotal}])},{default:n.withCtx(()=>[n.createVNode(ac,{avatar:s.userInfo.photo,name:s.userInfo.username,"custom-size":n.unref(i)?24:32},null,8,["avatar","name","custom-size"])]),_:1},8,["value","class"]),n.createElementVNode("p",Rv,n.toDisplayString(s.userInfo.username),1),n.createVNode(n.unref(I.OIcon),{class:"icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(Al))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):n.createCommentVNode("",!0)]),_:1})]))}}),mh=Ke._export_sfc(qv,[["__scopeId","data-v-66736d3f"]]),gh=n.defineComponent({__name:"OPlusConfigProvider",props:{locale:{},theme:{default:"light"}},setup(s){const e=s,i=n.reactive({locale:n.computed(()=>e.locale),theme:n.computed(()=>e.theme)});return n.provide(Ke.configProviderInjectKey,i),(r,a)=>(n.openBlock(),n.createBlock(n.unref(I.OConfigProvider),{locale:s.locale==="zh"?n.unref(Xm):n.unref(Km)},{default:n.withCtx(()=>[n.renderSlot(r.$slots,"default")]),_:3},8,["locale"]))}}),jv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Hv(s,e){return n.openBlock(),n.createElementBlock("svg",jv,[...e[0]||(e[0]=[n.createElementVNode("path",{d:"M9.246 5.764c-0.251 0.251-0.271 0.644-0.063 0.918l0.063 0.072 5.016 5.016c0.1 0.1 0.115 0.254 0.043 0.37l-0.043 0.054-5.062 5.062c-0.273 0.273-0.273 0.717 0 0.99 0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.062-5.062c0.629-0.629 0.662-1.628 0.099-2.296l-0.099-0.108-5.016-5.016c-0.273-0.273-0.717-0.273-0.99 0z"},null,-1)])])}const Ws={name:"components-icon-chevron-right",render:Hv},zv={class:"section-wrapper"},Gv={key:1,class:"section-title"},Wv={key:2,class:"section-subtitle"},Yv={key:1,class:"section-body"},Xv={key:2,class:"section-footer"},Kv=n.defineComponent({__name:"OSection",props:{title:{default:void 0},subtitle:{default:void 0},full:{type:Boolean,default:!1},headerJustifyCenter:{type:Boolean,default:!0},footer:{default:void 0},footerHref:{default:void 0}},setup(s){const e=s;return(i,r)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["app-section",{"is-full":e.full}])},[n.createElementVNode("div",zv,[n.renderSlot(i.$slots,"main",{},()=>[i.$slots.header||e.title||e.subtitle?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["section-header",{"is-left":!e.headerJustifyCenter}])},[n.renderSlot(i.$slots,"header",{},()=>[n.unref(I.isArray)(e.title)?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(e.title,a=>(n.openBlock(),n.createElementBlock("h2",{key:a,class:"section-title"},n.toDisplayString(a),1))),128)):i.$slots.title||e.title?(n.openBlock(),n.createElementBlock("h2",Gv,[n.renderSlot(i.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(e.title),1)],!0)])):n.createCommentVNode("",!0),i.$slots.subtitle||e.subtitle?(n.openBlock(),n.createElementBlock("p",Wv,[n.renderSlot(i.$slots,"subtitle",{},()=>[n.createTextVNode(n.toDisplayString(e.subtitle),1)],!0)])):n.createCommentVNode("",!0)],!0)],2)):n.createCommentVNode("",!0),i.$slots.default?(n.openBlock(),n.createElementBlock("div",Yv,[n.renderSlot(i.$slots,"default",{},void 0,!0)])):n.createCommentVNode("",!0),i.$slots.footer||e.footer?(n.openBlock(),n.createElementBlock("div",Xv,[n.renderSlot(i.$slots,"footer",{},()=>[n.createVNode(n.unref(I.OLink),{href:e.footerHref,target:"_blank"},{suffix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),{class:"footer-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(Ws))]),_:1})]),default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(e.footer)+" ",1)]),_:1},8,["href"])],!0)])):n.createCommentVNode("",!0)],!0)])],2))}}),vh=Ke._export_sfc(Kv,[["__scopeId","data-v-2fc90e8a"]]),Qv={class:"source-code"},Zv={key:0,class:"info-wrap"},Jv={class:"title"},e_={class:"info-wrap hover-icon-rotate"},t_={class:"title"},i_=n.defineComponent({__name:"OSourceCode",props:{title:{default:void 0},options:{default:void 0},url:{default:void 0},icon:{default:void 0},justify:{default:"center"}},setup(s){const e=a=>{window.open(a.url,"_blank")},i=n.ref(!1),r=a=>{i.value=a};return(a,o)=>(n.openBlock(),n.createElementBlock("div",Qv,[s.url?(n.openBlock(),n.createElementBlock("div",Zv,[n.createElementVNode("span",Jv,n.toDisplayString(s.title),1),s.icon?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.icon),{class:"icon"}))]),_:1})):n.createCommentVNode("",!0)])):(n.openBlock(),n.createBlock(n.unref(I.ODropdown),{key:1,trigger:"hover",optionPosition:"bottom","option-wrap-class":"dropdown",class:n.normalizeClass({"dropdown-active":i.value}),onVisibleChange:r},{dropdown:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.options,l=>(n.openBlock(),n.createBlock(n.unref(I.ODropdownItem),{onClick:u=>e(l),key:l.url,class:"list",style:n.normalizeStyle({"--dropdown-item-justify":s.justify})},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(l.label)+" ",1),l.icon?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(l.icon),{class:"icon"}))]),_:2},1024)):n.createCommentVNode("",!0)]),_:2},1032,["onClick","style"]))),128))]),default:n.withCtx(()=>[n.createElementVNode("div",e_,[n.createElementVNode("span",t_,n.toDisplayString(s.title),1),n.createVNode(n.unref(I.OIcon),{class:"icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(Al))]),_:1})])]),_:1},8,["class"]))]))}}),_h=Ke._export_sfc(i_,[["__scopeId","data-v-bbe28df5"]]),n_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function r_(s,e){return n.openBlock(),n.createElementBlock("svg",n_,[...e[0]||(e[0]=[n.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 1.992c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7zM6.769 6.747c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.136 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM18.192 6.747c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM5.3 12c0-3.7 3-6.7 6.7-6.7s6.7 3 6.7 6.7-3 6.7-6.7 6.7c-3.7 0-6.7-3-6.7-6.7zM17.3 12c0-2.927-2.373-5.3-5.3-5.3s-5.3 2.373-5.3 5.3c0 2.927 2.373 5.3 5.3 5.3s5.3-2.373 5.3-5.3zM4.594 11.969c0 0.387-0.313 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.386 0 0.7 0.313 0.7 0.7zM21.977 11.999c0 0.387-0.314 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.387 0 0.7 0.313 0.7 0.7zM5.921 19.060c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM19.041 19.060c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM11.971 19.376c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7z"},null,-1)])])}const so={name:"components-icon-sun",render:r_},s_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function a_(s,e){return n.openBlock(),n.createElementBlock("svg",s_,[...e[0]||(e[0]=[n.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 2.3c5.357 0 9.7 4.343 9.7 9.7s-4.343 9.7-9.7 9.7c-4.651 0-8.622-3.298-9.515-7.806-0.101-0.509 0.369-0.948 0.87-0.812 0.531 0.144 1.082 0.218 1.645 0.218 3.479 0 6.3-2.82 6.3-6.3 0-1.276-0.379-2.494-1.079-3.527-0.291-0.43-0.029-1.016 0.486-1.086 0.425-0.057 0.857-0.086 1.293-0.086zM12 3.7l-0.042 0.001 0.058 0.121c0.402 0.887 0.634 1.85 0.677 2.845l0.007 0.333c0 4.253-3.447 7.7-7.7 7.7-0.229 0-0.457-0.010-0.682-0.030l-0.186-0.021 0.076 0.218c1.147 3.123 4.102 5.321 7.528 5.429l0.264 0.004c4.584 0 8.3-3.716 8.3-8.3s-3.716-8.3-8.3-8.3z"},null,-1)])])}const ao={name:"components-icon-moon",render:a_},o_={class:"o-theme-switcher"},l_={key:1,class:"o-theme-switcher-mobile"},u_=n.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},lightIcon:{default:so},darkIcon:{default:ao}},emits:["update:theme","change"],setup(s,{emit:e}){const i=s,r=e,{gtPhone:a}=Et.useScreen(),o=n.computed({get(){return i.theme},set(d){r("update:theme",d),r("change",d)}}),l=n.computed(()=>i.type==="common"||i.type==="auto"&&a.value),u=()=>{o.value=o.value===i.lightValue?i.darkValue:i.lightValue};return(d,f)=>(n.openBlock(),n.createElementBlock("div",o_,[l.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"o-theme-switcher-common",onClick:u},[n.createVNode(n.unref(I.OIcon),{class:"o-theme-icon"},{default:n.withCtx(()=>[o.value===s.lightValue?(n.openBlock(),n.createBlock(n.unref(ao),{key:0})):(n.openBlock(),n.createBlock(n.unref(so),{key:1}))]),_:1})])):(n.openBlock(),n.createElementBlock("div",l_,[n.createVNode(n.unref(I.OSwitch),{modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=g=>o.value=g),class:"o-theme-switch","checked-value":s.darkValue,"unchecked-value":s.lightValue},{on:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),{class:"o-theme-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(so))]),_:1})]),off:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),{class:"o-theme-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(ao))]),_:1})]),_:1},8,["modelValue","checked-value","unchecked-value"])]))]))}}),yh=Ke._export_sfc(u_,[["__scopeId","data-v-9aaa2610"]]),Ko=new Map([[1,{label:"线下",value:1}],[2,{label:"线上",value:2}],[3,{label:"线上与线下",value:3}]]),oc=/^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w ./?%&=-]*)?$/,An=new Map([[1,{id:"draft",label:"草稿",text:"草稿",value:1}],[2,{id:"under-review",label:"审核中",text:"未审核",value:2}],[3,{id:"registration",label:"报名中",text:"审核通过",value:3}],[4,{id:"in-progress",label:"进行中",text:"审核通过",value:4}],[5,{id:"ended",label:"已结束",text:"已结束",value:5}],[6,{id:"modified",label:"已修改",text:"已修改",value:6}],[7,{id:"reject",label:"审核驳回",text:"审核驳回",value:7}]]),c_=new Map([["all",{label:"全部",value:"all"}],["rejected",{label:"审核驳回",value:"rejected"}],["approved",{label:"审核通过",value:"approved"}],["publish",{label:"未审核",value:"publish"}],["cancel",{label:"已取消",value:"cancel"}]]),d_={class:"o-activity-form"},h_={class:"time-config"},f_={class:"form-btns"},lc=n.defineComponent({__name:"OActivityForm",props:{data:{},creatActivity:{},editActivity:{},admins:{},status:{}},emits:["confirm","close"],setup(s,{expose:e,emit:i}){const r=i,a=I.useMessage(null),{lePadV:o}=Et.useScreen(),l=s,u=n.computed(()=>!!l.data),d=n.ref({title:"",start_date:"",end_date:"",register_end_date:"",activity_type:"",synopsis:"",register_url:"",content_url:"",address:"",start:"",end:"",is_publish:"true",approver:""}),f=n.ref(),g=n.ref(!1),v=n.ref({title:[{required:!0,message:"请输入活动名称"},{validator:D=>{if(D.length>50)return{type:"danger",message:"活动名称不能超过50个字符"}}}],activity_type:[{required:!0,message:"请选择活动类型"}],start_date:[{required:!0,message:"请选择活动时间"},{validator:D=>{const{start_date:M,end_date:U}=d.value,Y=M.split(" "),P=U.split(" ");if(!M||!U)return{type:"danger",message:"请选择活动日期"};const J=Y[1].split(":").map(Number),b=P[1].split(":").map(Number);if(J[0]<8||J[0]>21||b[0]<8||b[0]>21)return{type:"danger",message:"开始和结束时间必须在8:00-22:00点之间"};if(it.dayjs(M).valueOf()>it.dayjs(U).valueOf())return{type:"danger",message:"结束日期必须大于起始日期"};d.value.start_date=Y[0],d.value.end_date=P[0],d.value.start=Y[1],d.value.end=P[1]},triggers:["blur","change"]}],register_end_date:[{required:!0,message:"请选择报名截止时间"},{validator:()=>{const{register_end_date:D,end_date:M,end:U}=d.value;if(it.dayjs(`${M} ${U}`).valueOf()<it.dayjs(D).valueOf())return{type:"danger",message:"报名截止日期必须小于结束日期"}},triggers:["blur","change"]}],address:[{required:!0,message:"请输入活动地址"},{validator:D=>{if(D.length>255)return{type:"danger",message:"活动名称不能超过255个字符"}}}],register_url:[{required:!0,message:"请输入报名网址"},{validator:D=>{const M=D.replaceAll(" ","")||"";if(M.length&&(M.split(";")||[]).some(Y=>!oc.test(Y)))return{type:"danger",message:"请输入正确的报名网址"}},triggers:["blur","change"]}],content_url:[{required:!0,message:"请输入活动详情网址"},{validator:D=>{const M=D.replaceAll(" ","")||"";if(M.length&&(M.split(";")||[]).some(Y=>!oc.test(Y)))return{type:"danger",message:"请输入正确的活动详情网址"}},triggers:["blur","change"]}],approver:[{required:!0,message:"请选择活动审批人"}]}),S=n.computed(()=>l.admin||[]),C=n.ref(""),O=n.ref([]);Ko.forEach(D=>{O.value.push(D)});const T=D=>{const M=O.value.find(U=>U.label===D);d.value.activity_type=M==null?void 0:M.value},w=D=>D.getTime()<Date.now()-1440*60*1e3;n.watch(()=>l.data,D=>{var M;if(D){const{title:U,start_date:Y,end_date:P,register_end_date:J,activity_type:b,register_url:x,content_url:q,address:H,start:k,end:A,is_publish:$,approver:K,update_activity_id:j}=D;let F={title:U,start_date:Y,end_date:P,register_end_date:J,activity_type:b,register_url:x,content_url:q,address:H,start:k,end:A,is_publish:$,approver:K,update_activity_id:j};d.value={...F},C.value=(M=Ko.get(D.activity_type))==null?void 0:M.label,d.value.start_date=`${d.value.start_date} ${d.value.start}`,d.value.end_date=`${d.value.end_date} ${d.value.end}`}},{immediate:!0,deep:!0});const R=async D=>{var U,Y,P,J,b;let M=u.value?"修改":D?"创建":"保存草稿";try{if((await((U=f.value)==null?void 0:U.validate())).some(H=>!!H))return;g.value=!0,d.value.is_publish=`${D}`,u.value&&l.status===3?(d.value.update_activity_id=(Y=l.data)==null?void 0:Y.id,await((P=l.creatActivity)==null?void 0:P.call(l,d.value))):u.value?await((J=l.editActivity)==null?void 0:J.call(l,l.data.id,d.value)):await((b=l.creatActivity)==null?void 0:b.call(l,d.value));const q=`“${d.value.title}”活动${M}成功`;a.success({content:q}),L(),r("confirm")}catch{g.value=!1,d.value.start_date=`${d.value.start_date} ${d.value.start}`,d.value.end_date=`${d.value.end_date} ${d.value.end}`;const x=`“${d.value.title}”活动${M}失败`;a.danger({content:x})}},L=()=>{d.value={},r("close")};return e({confirm:R}),(D,M)=>(n.openBlock(),n.createElementBlock("div",d_,[n.createVNode(n.unref(I.OForm),{model:d.value,ref_key:"formRef",ref:f,"has-required":"","label-width":"108px",layout:n.unref(o)?"v":"h",class:"form-wrapper"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OFormItem),{rules:v.value.title,label:"活动名称",field:"title"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OInput),{size:"large",placeholder:"请输入活动名称",modelValue:d.value.title,"onUpdate:modelValue":M[0]||(M[0]=U=>d.value.title=U)},null,8,["modelValue"])]),_:1},8,["rules"]),n.createVNode(n.unref(I.OFormItem),{rules:v.value.title,label:"活动主办方",field:"title"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OInput),{size:"large",placeholder:"请输入活动名称",modelValue:d.value.title,"onUpdate:modelValue":M[1]||(M[1]=U=>d.value.title=U)},null,8,["modelValue"])]),_:1},8,["rules"]),n.createVNode(n.unref(I.OFormItem),{rules:v.value.activity_type,label:"活动类型",field:"activity_type"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OSelect),{placeholder:"请选择活动类型",size:"large",modelValue:C.value,"onUpdate:modelValue":M[2]||(M[2]=U=>C.value=U),onChange:T},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(O.value,U=>(n.openBlock(),n.createBlock(n.unref(I.OOption),{key:U.value,value:U.label},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(U.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["rules"]),d.value.activity_type===1||d.value.activity_type===3?(n.openBlock(),n.createBlock(n.unref(I.OFormItem),{key:0,rules:v.value.address,label:"活动地址",field:"address"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OInput),{size:"large",placeholder:"请输入活动地址",modelValue:d.value.address,"onUpdate:modelValue":M[3]||(M[3]=U=>d.value.address=U)},null,8,["modelValue"])]),_:1},8,["rules"])):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OFormItem),{rules:v.value.start_date,label:"活动时间",field:"start_date",required:""},{default:n.withCtx(()=>[n.createElementVNode("div",h_,[n.createVNode(n.unref(I.OFormItem),{label:"起始日期",field:"start_date"},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElDatePicker),{size:"large",modelValue:d.value.start_date,"onUpdate:modelValue":M[4]||(M[4]=U=>d.value.start_date=U),type:"datetime",placeholder:"请选择日期",format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":w,clearable:!1,class:"date-activity"},null,8,["modelValue"])]),_:1}),n.createVNode(n.unref(I.OFormItem),{label:"结束日期",field:"end_date"},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElDatePicker),{size:"large",modelValue:d.value.end_date,"onUpdate:modelValue":M[5]||(M[5]=U=>d.value.end_date=U),type:"datetime",placeholder:"请选择日期",format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":w,clearable:!1,class:"date-activity"},null,8,["modelValue"])]),_:1})])]),_:1},8,["rules"]),n.createVNode(n.unref(I.OFormItem),{rules:v.value.register_end_date,label:"报名截止时间",field:"register_end_date"},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElDatePicker),{size:"large",modelValue:d.value.register_end_date,"onUpdate:modelValue":M[6]||(M[6]=U=>d.value.register_end_date=U),type:"datetime",placeholder:"请选择报名截止时间",format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm",clearable:!1,class:"date-activity"},null,8,["modelValue"])]),_:1},8,["rules"]),n.createVNode(n.unref(I.OFormItem),{rules:v.value.register_url,label:"报名网址",field:"register_url"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OInput),{size:"large",placeholder:"请输入报名网址",modelValue:d.value.register_url,"onUpdate:modelValue":M[7]||(M[7]=U=>d.value.register_url=U)},null,8,["modelValue"])]),_:1},8,["rules"]),n.createVNode(n.unref(I.OFormItem),{rules:v.value.content_url,label:"活动详情网址",field:"content_url"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OInput),{size:"large",placeholder:"请输入活动详情网址",modelValue:d.value.content_url,"onUpdate:modelValue":M[8]||(M[8]=U=>d.value.content_url=U)},null,8,["modelValue"])]),_:1},8,["rules"]),n.createVNode(n.unref(I.OFormItem),{rules:v.value.approver,label:"活动审批人",field:"approver"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OSelect),{placeholder:"请选择活动审批人",size:"large",modelValue:d.value.approver,"onUpdate:modelValue":M[9]||(M[9]=U=>d.value.approver=U)},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(S.value,U=>(n.openBlock(),n.createBlock(n.unref(I.OOption),{key:U,value:U},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(U),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),n.createElementVNode("div",f_,[n.createVNode(n.unref(I.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:M[10]||(M[10]=U=>R(!0)),loading:g.value},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(u.value?"保存":"创建"),1)]),_:1},8,["loading"]),u.value?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(I.OButton),{key:0,color:"primary",variant:"outline",round:"pill",size:"large",onClick:M[11]||(M[11]=U=>R(!1)),loading:g.value},{default:n.withCtx(()=>[...M[12]||(M[12]=[n.createTextVNode(" 保存草稿 ",-1)])]),_:1},8,["loading"])),n.createVNode(n.unref(I.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:L},{default:n.withCtx(()=>[...M[13]||(M[13]=[n.createTextVNode("取消",-1)])]),_:1})])]))}}),p_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function m_(s,e){return n.openBlock(),n.createElementBlock("svg",p_,[...e[0]||(e[0]=[n.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M17.286 5c0.676 0 1.213 0.546 1.213 1.21 0 0.227-0.064 0.449-0.184 0.641l-0.065 0.093-1.24 1.62c-0.149 0.194-0.433 0.236-0.634 0.092-0.181-0.129-0.234-0.364-0.134-0.551l0.039-0.060 1.24-1.62c0.046-0.060 0.071-0.136 0.071-0.214 0-0.169-0.113-0.302-0.253-0.329l-0.054-0.005h-10.573c-0.064 0-0.126 0.022-0.179 0.064-0.126 0.099-0.162 0.281-0.092 0.426l0.036 0.059 4.207 5.495c0.138 0.18 0.221 0.394 0.243 0.617l0.006 0.112 0.015 3.985c0 0.088 0.033 0.171 0.087 0.232l0.045 0.042 1.525 1.158c0.052 0.040 0.114 0.060 0.176 0.060 0.146-0.001 0.274-0.116 0.301-0.275l0.005-0.062-0.020-5.134c-0.001-0.228 0.063-0.452 0.184-0.645l0.065-0.094 1.804-2.357c0.149-0.194 0.433-0.236 0.634-0.092 0.181 0.129 0.234 0.364 0.134 0.551l-0.039 0.060-1.805 2.357c-0.035 0.045-0.058 0.099-0.067 0.157l-0.005 0.059 0.020 5.134c0.003 0.663-0.533 1.212-1.209 1.214-0.23 0.001-0.454-0.063-0.647-0.183l-0.094-0.064-1.525-1.158c-0.267-0.203-0.436-0.506-0.471-0.834l-0.007-0.124-0.015-3.985c-0-0.059-0.015-0.115-0.041-0.165l-0.030-0.047-4.207-5.495c-0.401-0.523-0.308-1.272 0.211-1.682 0.183-0.145 0.405-0.234 0.637-0.256l0.117-0.006h10.573z"},null,-1)])])}const uc={name:"components-icon-filter",render:m_},g_={class:"th-filter-wrapper",ref:"filterRef"},v_={key:1,class:"list-content-wrapper"},__={class:"btn-wrapper"},cc=n.defineComponent({__name:"ThFilter",props:{modelValue:{},list:{default:()=>[]},multiple:{type:Boolean,default:!1},tableWidth:{}},emits:["update:model-value","confirm"],setup(s,{emit:e}){const{t:i}=Et.useLocale(),r=s,a=e,o=n.computed(()=>r.list.some(D=>{var M;return(M=D.children)==null?void 0:M.length})),l=n.computed(()=>r.list.map(D=>{const M=(D.children||[]).map(U=>({label:U.label,value:U.value}));return{label:D.label,value:D.value,children:o.value?M:void 0}})),u=n.ref(!1);n.watch(()=>r.modelValue,D=>{r.multiple?d.value=D:v.value=D});const d=n.ref([]),f=D=>{d.value=D},g=n.ref([]),v=n.ref(null),S=D=>{v.value===D?v.value=null:v.value=D,O()},C=()=>{d.value=[],g.value=[],v.value=null,O()},O=()=>{let D=null;r.multiple?o.value?D=g.value:D=d.value:D=v.value,a("update:model-value",D),u.value=!0,n.nextTick(()=>{a("confirm"),u.value=!1})},T=n.computed(()=>d.value.length||g.value.length||v.value||r.modelValue),w=n.ref(null),R=async D=>{var Y,P;const M=D.target.parentElement.parentElement;await n.nextTick();const U=M.querySelector("input");U.click(),await n.nextTick(),(Y=U.change)==null||Y.call(U,U),await n.nextTick(),(P=w.value)==null||P.$forceUpdate(),g.value=JSON.parse(JSON.stringify(g.value))},L=({data:D})=>n.h("span",{onclick:R},D.label);return(D,M)=>{const U=n.resolveComponent("ElCascaderPanel"),Y=n.resolveDirective("dompurify-html");return n.openBlock(),n.createElementBlock("div",g_,[n.createElementVNode("span",null,[n.renderSlot(D.$slots,"default")]),s.multiple?(n.openBlock(),n.createBlock(n.unref(I.OPopover),{key:0,visible:u.value,position:"bottom",wrapClass:"th-filter-popover",trigger:"click",anchor:!1},{target:n.withCtx(()=>[n.createElementVNode("div",{class:n.normalizeClass(["filter-wrapper",T.value&&"has-checked"])},[n.createVNode(n.unref(I.OIcon),{class:"filter-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(uc))]),_:1})],2)]),default:n.withCtx(()=>[o.value?(n.openBlock(),n.createElementBlock("div",v_,[n.createVNode(U,{ref_key:"aref",ref:w,expandTrigger:"hover",renderLabel:L,modelValue:g.value,"onUpdate:modelValue":M[1]||(M[1]=P=>g.value=P),style:{width:"fit-content"},options:l.value,props:{multiple:!0,expandTrigger:"hover"}},null,8,["modelValue","options"])])):(n.openBlock(),n.createBlock(n.unref(I.OScroller),{key:0,class:"content-wrapper","show-type":"hover","disabled-x":""},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OCheckboxGroup),{direction:"v",onChange:f,modelValue:d.value,"onUpdate:modelValue":M[0]||(M[0]=P=>d.value=P)},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,P=>(n.openBlock(),n.createBlock(n.unref(I.OCheckbox),{key:P.value,value:P.value},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("span",null,null,512),[[Y,P.label]])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})),n.createVNode(n.unref(I.ODivider)),n.createElementVNode("div",__,[n.createVNode(n.unref(I.OLink),{onClick:C},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("common.reset")),1)]),_:1}),n.createVNode(n.unref(I.OLink),{onClick:O},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("common.confirm")),1)]),_:1})])]),_:1},8,["visible"])):(n.openBlock(),n.createBlock(n.unref(I.ODropdown),{key:1,optionPosition:"bottom",optionWrapClass:"th-filter-dropdown",modelValue:v.value,"onUpdate:modelValue":M[3]||(M[3]=P=>v.value=P)},{dropdown:n.withCtx(()=>[l.value.length?(n.openBlock(),n.createBlock(n.unref(I.OScroller),{key:0,"disabled-x":"",style:{"max-height":"300px"},"show-type":"always"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.ODropdownItem),{style:n.normalizeStyle({"--table-width":s.tableWidth}),class:n.normalizeClass([{"is-active":s.modelValue===""}]),value:"''",label:n.unref(i)("common.all"),onClick:M[2]||(M[2]=P=>S(""))},null,8,["style","class","label"]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,P=>(n.openBlock(),n.createBlock(n.unref(I.ODropdownItem),{style:n.normalizeStyle({"--table-width":s.tableWidth}),class:n.normalizeClass([{"is-active":P.value===s.modelValue}]),key:P.value,value:P.value,onClick:J=>S(P.value)},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("span",null,null,512),[[Y,P.label]])]),_:2},1032,["style","class","value","onClick"]))),128))]),_:1})):n.createCommentVNode("",!0),l.value.length?n.createCommentVNode("",!0):n.renderSlot(D.$slots,"empty",{key:1})]),default:n.withCtx(()=>[n.createElementVNode("div",{class:n.normalizeClass(["filter-wrapper",T.value&&"has-checked"])},[n.createVNode(n.unref(I.OIcon),{class:"filter-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(uc))]),_:1})],2)]),_:3},8,["modelValue"]))],512)}}}),y_={class:"o-activity-table"},T_={key:0,class:"table-wrapper"},b_={class:"expand-detail"},x_={class:"sort-btn"},C_={class:"activity-btn"},E_={key:0,class:"pagination-wrapper"},S_={key:1,class:"collapse-wrapper"},k_={class:"title-top"},w_={class:"act-title"},D_={class:"act-sponsor"},A_={class:"sponsor"},N_={class:"activity-btn"},I_={class:"activity-detail"},O_={key:0,class:"pagination"},B_={class:"dialog-content"},L_={class:"dialog-footer"},P_={class:"dialog-content"},M_={class:"dialog-footer"},R_=n.defineComponent({__name:"OActivityApproval",props:{getTableDataRequest:{},applicantList:{},cancelActivityRequest:{},deleteActivityRequest:{},approveActivityRequest:{},rejectActivityRequest:{},getActivityDetailRequest:{}},setup(s){const e=I.useMessage(null),{isPhone:i,lePadV:r}=Et.useScreen(),a=s,o=n.reactive({page:1,size:10,status:"",is_delete:0,search:"",sponsor:"",order_by:""}),l=n.ref(""),u=n.ref([]),d=()=>{o.sponsor=l.value.join(",")},f=n.ref("desc"),g=()=>{f.value=f.value==="asc"?"desc":"asc",o.order_by=f.value},v=n.ref(),S=n.ref([]);c_.forEach(De=>{S.value.push(De)});const C=()=>{o.status=v.value,v.value==="cancel"?o.is_delete=1:o.is_delete=0},O=n.ref([]),T=n.ref(0),w=[10,20,30,40],R=async()=>{const{page:De,size:ye,status:Ne,sponsor:$e,order_by:Ee,search:le,is_delete:ce}=o;let me={page:De,size:ye,sponsor:$e,order_by:Ee,search:le};if(Ne==="cancel"?(me.is_delete=ce,me.status=""):me.status=Ne,!a.getTableDataRequest)return;const Ie=await a.getTableDataRequest(me);O.value=(Ie.data||[]).map(he=>{const{start_date:Ve,end_date:ze,start:dt,end:ge}=he;return[{...he,time:`${Ve}-${ge}`,start_date_time:`${Ve} ${dt}`,end_date_time:`${ze} ${ge}`,type:"activity",dateRange:`${Ve} ${dt}-${ze} ${ge}`}]}).flat(),T.value=Ie.total},L=De=>{De.pageSize!==o.size?o.page=1:o.page=De.page,o.size=De.pageSize,R()},D=n.ref({reason:""}),M=n.ref(),U=n.ref(!1),Y=n.ref(null),P=n.ref(""),J=n.ref(0),b=n.ref(!1),x=n.ref({reason:[{required:!0,message:"请输入审核的备注信息"}]}),q=async()=>{var ye,Ne,$e;if(!a.approveActivityRequest||!a.rejectActivityRequest)return;const De=J.value===1?"审核通过":"审核驳回";try{if(U.value=!0,(await((ye=M.value)==null?void 0:ye.validate())).some(le=>!!le)){U.value=!1;return}J.value===1?await a.approveActivityRequest(Y.value.id,D.value):await a.rejectActivityRequest(Y.value.id,D.value),R(),H(),e.success({content:`“${(Ne=Y.value)==null?void 0:Ne.title}”活动${De}成功`})}catch{b.value=!1,U.value=!1,e.danger({content:`“${($e=Y.value)==null?void 0:$e.title}”活动${De}失败`})}},H=()=>{b.value=!1,A.value=!1,U.value=!1,D.value.reason=""},k=async()=>{var De,ye;if(!a.deleteActivityRequest||!a.cancelActivityRequest)try{U.value=!0,j.value===1?await a.cancelActivityRequest(Y.value.id,D.value):await a.deleteActivityRequest(Y.value.id,D.value),R(),H(),e.success({content:`“${(De=Y.value)==null?void 0:De.title}”活动${K.value}成功`})}catch{U.value=!1,A.value=!1,e.danger({content:`“${(ye=Y.value)==null?void 0:ye.title}”活动${K.value}失败`})}},A=n.ref(!1),$=n.ref(""),K=n.ref(""),j=n.ref(0),F=De=>{$.value="删除活动",K.value="删除",Y.value=De,j.value=0,A.value=!0},G=De=>{$.value="取消活动",K.value="取消",Y.value=De,j.value=1,A.value=!0},Z=De=>{Y.value=De,P.value="审核通过",J.value=1,b.value=!0},ee=De=>{Y.value=De,P.value="审核驳回",J.value=0,b.value=!0},se=n.ref([]),de=n.ref([]),fe=De=>{if(!a.getActivityDetailRequest)return;se.value.includes(De)||(se.value.push(De),a.getActivityDetailRequest(De).then(Ne=>{var $e;($e=O.value)==null||$e.forEach(Ee=>{Ee.id===Ne.id&&(Ee.approve_record=Ne.approve_record,Ee.approver=Ne.approver)})}));const ye=de.value.indexOf(De);de.value.includes(De)?de.value.splice(ye,1):de.value.push(De)},pe=De=>{fe(De.id)},je=De=>De.id,Be=n.ref([]),Le=De=>{De.length&&De.forEach(ye=>{fe(ye)})},Qe=n.ref({}),Ue=(De,ye)=>{De&&ye&&(Qe.value[ye]=De)};return n.onMounted(()=>{R()}),n.watch(()=>[o.status,o.sponsor,o.order_by,o.search,o.is_delete],()=>{R()},{deep:!0}),(De,ye)=>{const Ne=n.resolveComponent("MeetingDetail"),$e=n.resolveComponent("OCollapseItem");return n.openBlock(),n.createElementBlock("div",y_,[n.unref(i)?(n.openBlock(),n.createElementBlock("div",S_,[n.createVNode(n.unref(I.OCollapse),{modelValue:Be.value,"onUpdate:modelValue":ye[2]||(ye[2]=Ee=>Be.value=Ee),accordion:n.unref(i),onChange:Le},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(O.value,(Ee,le)=>{var ce;return n.openBlock(),n.createElementBlock(n.Fragment,{key:Ee.id},[n.createElementVNode("div",k_,[n.createElementVNode("p",w_,n.toDisplayString(Ee.title),1),Ee.is_delete!==1?(n.openBlock(),n.createBlock(n.unref(I.OTag),{key:0,color:"primary",variant:"outline",class:n.normalizeClass([`tag-${(ce=n.unref(An).get(Ee.status))==null?void 0:ce.id}`])},{default:n.withCtx(()=>{var me;return[n.createTextVNode(n.toDisplayString((me=n.unref(An).get(Ee.status))==null?void 0:me.text),1)]}),_:2},1032,["class"])):(n.openBlock(),n.createBlock(n.unref(I.OTag),{key:1,color:"primary",variant:"outline",class:"tag-calcel"},{default:n.withCtx(()=>[...ye[14]||(ye[14]=[n.createTextVNode("已取消",-1)])]),_:1}))]),n.createVNode($e,{value:Ee.id},{title:n.withCtx(()=>[n.createElementVNode("div",D_,[n.createElementVNode("p",A_,n.toDisplayString(Ee.sponsor),1),n.createElementVNode("p",null,n.toDisplayString(n.unref(it.dayjs)(Ee.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),n.createElementVNode("div",N_,[Ee.status===7||Ee.is_delete?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:0,color:"danger",variant:"text",onClick:n.withModifiers(me=>F(Ee),["stop"])},{default:n.withCtx(()=>[...ye[15]||(ye[15]=[n.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0),(Ee.status===3||Ee.status===4)&&Ee.is_delete!==1?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:1,color:"danger",variant:"text",onClick:n.withModifiers(me=>G(Ee),["stop"])},{default:n.withCtx(()=>[...ye[16]||(ye[16]=[n.createTextVNode(" 取消活动 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0),Ee.status===2?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:2,color:"primary",variant:"text",onClick:n.withModifiers(me=>Z(Ee),["stop"])},{default:n.withCtx(()=>[...ye[17]||(ye[17]=[n.createTextVNode(" 通过 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0),Ee.status===2?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:3,color:"primary",variant:"text",onClick:n.withModifiers(me=>ee(Ee),["stop"])},{default:n.withCtx(()=>[...ye[18]||(ye[18]=[n.createTextVNode(" 驳回 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0)])]),default:n.withCtx(()=>[n.createElementVNode("div",I_,[n.createVNode(Ne,{show:Be.value.includes(Ee.id),data:Ee,ref_for:!0,ref:me=>Ue(me,Ee.id),page:"approval"},null,8,["show","data"])])]),_:2},1032,["value"])],64)}),128))]),_:1},8,["modelValue","accordion"]),T.value>w[0]?(n.openBlock(),n.createElementBlock("div",O_,[n.createVNode(n.unref(I.OPagination),{total:T.value,page:o.page,"page-size":o.size,"page-sizes":w,layout:["total","jumper","pager","pagesize"],"show-more":!1,simple:!0,onChange:L},null,8,["total","page","page-size"])])):n.createCommentVNode("",!0)])):(n.openBlock(),n.createElementBlock("div",T_,[n.createVNode(n.unref(it.ElTable),{data:O.value,onExpandChange:pe,"row-key":je,"expand-row-keys":de.value},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElTableColumn),{type:"expand"},{default:n.withCtx(Ee=>[n.createElementVNode("div",b_,[n.createVNode(Ne,{data:Ee.row,page:"approval"},null,8,["data"])])]),_:1}),n.createVNode(n.unref(it.ElTableColumn),{label:"活动名称",prop:"title"}),n.createVNode(n.unref(it.ElTableColumn),{prop:"sponsor"},{header:n.withCtx(()=>[n.createVNode(cc,{modelValue:l.value,"onUpdate:modelValue":ye[0]||(ye[0]=Ee=>l.value=Ee),onConfirm:d,list:u.value,multiple:!0},{empty:n.withCtx(()=>[n.renderSlot(De.$slots,"filter-empty",{},void 0,!0)]),default:n.withCtx(()=>[ye[6]||(ye[6]=n.createTextVNode(" 申请人 ",-1))]),_:3},8,["modelValue","list"])]),_:3}),n.createVNode(n.unref(it.ElTableColumn),{prop:"create_time"},{header:n.withCtx(()=>[n.createElementVNode("div",{class:"sort-time",onClick:g},[ye[7]||(ye[7]=n.createElementVNode("span",null,"申请时间",-1)),n.createElementVNode("div",x_,[n.createElementVNode("div",{class:n.normalizeClass(["sort-asc sort-item",{active:f.value==="asc"}])},null,2),n.createElementVNode("div",{class:n.normalizeClass(["sort-desc sort-item",{active:f.value==="desc"}])},null,2)])])]),default:n.withCtx(Ee=>[n.createTextVNode(n.toDisplayString(n.unref(it.dayjs)(Ee.row.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),_:1}),n.createVNode(n.unref(it.ElTableColumn),{prop:"status",width:"90px"},{header:n.withCtx(()=>[n.createVNode(cc,{modelValue:v.value,"onUpdate:modelValue":ye[1]||(ye[1]=Ee=>v.value=Ee),onConfirm:C,list:S.value},{empty:n.withCtx(()=>[n.renderSlot(De.$slots,"filter-empty",{},void 0,!0)]),default:n.withCtx(()=>[ye[8]||(ye[8]=n.createTextVNode(" 状态 ",-1))]),_:3},8,["modelValue","list"])]),default:n.withCtx(Ee=>{var le;return[Ee.row.is_delete!==1?(n.openBlock(),n.createBlock(n.unref(I.OTag),{key:0,color:"primary",variant:"outline",class:n.normalizeClass([`tag-${(le=n.unref(An).get(Ee.row.status))==null?void 0:le.id}`])},{default:n.withCtx(()=>{var ce;return[n.createTextVNode(n.toDisplayString((ce=n.unref(An).get(Ee.row.status))==null?void 0:ce.text),1)]}),_:2},1032,["class"])):(n.openBlock(),n.createBlock(n.unref(I.OTag),{key:1,color:"primary",variant:"outline",class:"tag-calcel"},{default:n.withCtx(()=>[...ye[9]||(ye[9]=[n.createTextVNode("已取消",-1)])]),_:1}))]}),_:3}),n.createVNode(n.unref(it.ElTableColumn),{label:"操作"},{default:n.withCtx(Ee=>[n.createElementVNode("div",C_,[Ee.row.status===7||Ee.row.is_delete?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:0,color:"danger",onClick:le=>F(Ee.row)},{default:n.withCtx(()=>[...ye[10]||(ye[10]=[n.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0),(Ee.row.status===3||Ee.row.status===4)&&Ee.row.is_delete!==1?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:1,color:"danger",onClick:le=>G(Ee.row)},{default:n.withCtx(()=>[...ye[11]||(ye[11]=[n.createTextVNode(" 取消活动 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0),Ee.row.status===2?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:2,color:"primary",onClick:le=>Z(Ee.row)},{default:n.withCtx(()=>[...ye[12]||(ye[12]=[n.createTextVNode(" 通过 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0),Ee.row.status===2?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:3,color:"primary",onClick:le=>ee(Ee.row)},{default:n.withCtx(()=>[...ye[13]||(ye[13]=[n.createTextVNode(" 驳回 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0)])]),_:1})]),_:3},8,["data","expand-row-keys"]),T.value>w[0]?(n.openBlock(),n.createElementBlock("div",E_,[n.createVNode(n.unref(I.OPagination),{total:T.value,page:o.page,"page-size":o.size,"page-sizes":w,layout:["total","jumper","pager","pagesize"],"show-more":!1,onChange:L},null,8,["total","page","page-size"])])):n.createCommentVNode("",!0)])),n.createVNode(n.unref(I.ODialog),{visible:b.value,"onUpdate:visible":ye[4]||(ye[4]=Ee=>b.value=Ee),"phone-half-full":n.unref(r),"main-class":"handle-dialog-approval review-dialog"},{header:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(P.value),1)]),footer:n.withCtx(()=>[n.createElementVNode("div",L_,[n.createVNode(n.unref(I.OButton),{color:"primary",variant:n.unref(r)?"text":"solid",size:"large",onClick:q,loading:U.value},{default:n.withCtx(()=>[...ye[19]||(ye[19]=[n.createTextVNode("确定 ",-1)])]),_:1},8,["variant","loading"]),n.unref(r)?(n.openBlock(),n.createBlock(n.unref(I.ODivider),{key:0,direction:"v"})):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OButton),{color:"primary",variant:n.unref(r)?"text":"outline",size:"large",onClick:H},{default:n.withCtx(()=>[...ye[20]||(ye[20]=[n.createTextVNode("取消",-1)])]),_:1},8,["variant"])])]),default:n.withCtx(()=>[n.createElementVNode("div",B_,[n.createVNode(n.unref(I.OForm),{model:D.value,ref_key:"formRef",ref:M,"has-required":"",layout:"v",class:"form-wrapper"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OFormItem),{rules:x.value.reason,label:"审核备注:",field:"reason"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OTextarea),{size:"large",placeholder:"请输入审核的备注信息",style:{width:"100%"},rows:4,resize:"none","max-length":1e3,"input-on-outlimit":!1,modelValue:D.value.reason,"onUpdate:modelValue":ye[3]||(ye[3]=Ee=>D.value.reason=Ee)},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["model"])])]),_:1},8,["visible","phone-half-full"]),n.createVNode(n.unref(I.ODialog),{visible:A.value,"onUpdate:visible":ye[5]||(ye[5]=Ee=>A.value=Ee),"phone-half-full":n.unref(r),"main-class":"handle-dialog-approval"},{header:n.withCtx(()=>[n.createTextVNode(n.toDisplayString($.value),1)]),footer:n.withCtx(()=>[n.createElementVNode("div",M_,[n.createVNode(n.unref(I.OButton),{color:"primary",variant:n.unref(r)?"text":"outline",size:"large",onClick:k,loading:U.value},{default:n.withCtx(()=>[...ye[21]||(ye[21]=[n.createTextVNode("确定 ",-1)])]),_:1},8,["variant","loading"]),n.unref(r)?(n.openBlock(),n.createBlock(n.unref(I.ODivider),{key:0,direction:"v"})):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OButton),{color:"primary",variant:n.unref(r)?"text":"solid",size:"large",onClick:H},{default:n.withCtx(()=>[...ye[22]||(ye[22]=[n.createTextVNode("取消",-1)])]),_:1},8,["variant"])])]),default:n.withCtx(()=>[n.createElementVNode("div",P_,"是否确认"+n.toDisplayString(K.value)+"“"+n.toDisplayString(Y.value.title)+"”活动?取消后将不在会议首页呈现,且已报名的数据也会被清空,请谨慎操作。 ",1)]),_:1},8,["visible","phone-half-full"])])}}}),dc=Ke._export_sfc(R_,[["__scopeId","data-v-a5030c38"]]);var ta=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gr(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function V_(s){if(Object.prototype.hasOwnProperty.call(s,"__esModule"))return s;var e=s.default;if(typeof e=="function"){var i=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var a=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(i,r,a.get?a:{enumerable:!0,get:function(){return s[r]}})}),i}var Ys={exports:{}},F_=Ys.exports,hc;function $_(){return hc||(hc=1,(function(s,e){(function(i,r){s.exports=r()})(F_,(function(){var i=1e3,r=6e4,a=36e5,o="millisecond",l="second",u="minute",d="hour",f="day",g="week",v="month",S="quarter",C="year",O="date",T="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,L={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var $=["th","st","nd","rd"],K=A%100;return"["+A+($[(K-20)%10]||$[K]||$[0])+"]"}},D=function(A,$,K){var j=String(A);return!j||j.length>=$?A:""+Array($+1-j.length).join(K)+A},M={s:D,z:function(A){var $=-A.utcOffset(),K=Math.abs($),j=Math.floor(K/60),F=K%60;return($<=0?"+":"-")+D(j,2,"0")+":"+D(F,2,"0")},m:function A($,K){if($.date()<K.date())return-A(K,$);var j=12*(K.year()-$.year())+(K.month()-$.month()),F=$.clone().add(j,v),G=K-F<0,Z=$.clone().add(j+(G?-1:1),v);return+(-(j+(K-F)/(G?F-Z:Z-F))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:v,y:C,w:g,d:f,D:O,h:d,m:u,s:l,ms:o,Q:S}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},U="en",Y={};Y[U]=L;var P="$isDayjsObject",J=function(A){return A instanceof H||!(!A||!A[P])},b=function A($,K,j){var F;if(!$)return U;if(typeof $=="string"){var G=$.toLowerCase();Y[G]&&(F=G),K&&(Y[G]=K,F=G);var Z=$.split("-");if(!F&&Z.length>1)return A(Z[0])}else{var ee=$.name;Y[ee]=$,F=ee}return!j&&F&&(U=F),F||!j&&U},x=function(A,$){if(J(A))return A.clone();var K=typeof $=="object"?$:{};return K.date=A,K.args=arguments,new H(K)},q=M;q.l=b,q.i=J,q.w=function(A,$){return x(A,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var H=(function(){function A(K){this.$L=b(K.locale,null,!0),this.parse(K),this.$x=this.$x||K.x||{},this[P]=!0}var $=A.prototype;return $.parse=function(K){this.$d=(function(j){var F=j.date,G=j.utc;if(F===null)return new Date(NaN);if(q.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var Z=F.match(w);if(Z){var ee=Z[2]-1||0,se=(Z[7]||"0").substring(0,3);return G?new Date(Date.UTC(Z[1],ee,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,se)):new Date(Z[1],ee,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,se)}}return new Date(F)})(K),this.init()},$.init=function(){var K=this.$d;this.$y=K.getFullYear(),this.$M=K.getMonth(),this.$D=K.getDate(),this.$W=K.getDay(),this.$H=K.getHours(),this.$m=K.getMinutes(),this.$s=K.getSeconds(),this.$ms=K.getMilliseconds()},$.$utils=function(){return q},$.isValid=function(){return this.$d.toString()!==T},$.isSame=function(K,j){var F=x(K);return this.startOf(j)<=F&&F<=this.endOf(j)},$.isAfter=function(K,j){return x(K)<this.startOf(j)},$.isBefore=function(K,j){return this.endOf(j)<x(K)},$.$g=function(K,j,F){return q.u(K)?this[j]:this.set(F,K)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(K,j){var F=this,G=!!q.u(j)||j,Z=q.p(K),ee=function(Qe,Ue){var De=q.w(F.$u?Date.UTC(F.$y,Ue,Qe):new Date(F.$y,Ue,Qe),F);return G?De:De.endOf(f)},se=function(Qe,Ue){return q.w(F.toDate()[Qe].apply(F.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(Ue)),F)},de=this.$W,fe=this.$M,pe=this.$D,je="set"+(this.$u?"UTC":"");switch(Z){case C:return G?ee(1,0):ee(31,11);case v:return G?ee(1,fe):ee(0,fe+1);case g:var Be=this.$locale().weekStart||0,Le=(de<Be?de+7:de)-Be;return ee(G?pe-Le:pe+(6-Le),fe);case f:case O:return se(je+"Hours",0);case d:return se(je+"Minutes",1);case u:return se(je+"Seconds",2);case l:return se(je+"Milliseconds",3);default:return this.clone()}},$.endOf=function(K){return this.startOf(K,!1)},$.$set=function(K,j){var F,G=q.p(K),Z="set"+(this.$u?"UTC":""),ee=(F={},F[f]=Z+"Date",F[O]=Z+"Date",F[v]=Z+"Month",F[C]=Z+"FullYear",F[d]=Z+"Hours",F[u]=Z+"Minutes",F[l]=Z+"Seconds",F[o]=Z+"Milliseconds",F)[G],se=G===f?this.$D+(j-this.$W):j;if(G===v||G===C){var de=this.clone().set(O,1);de.$d[ee](se),de.init(),this.$d=de.set(O,Math.min(this.$D,de.daysInMonth())).$d}else ee&&this.$d[ee](se);return this.init(),this},$.set=function(K,j){return this.clone().$set(K,j)},$.get=function(K){return this[q.p(K)]()},$.add=function(K,j){var F,G=this;K=Number(K);var Z=q.p(j),ee=function(fe){var pe=x(G);return q.w(pe.date(pe.date()+Math.round(fe*K)),G)};if(Z===v)return this.set(v,this.$M+K);if(Z===C)return this.set(C,this.$y+K);if(Z===f)return ee(1);if(Z===g)return ee(7);var se=(F={},F[u]=r,F[d]=a,F[l]=i,F)[Z]||1,de=this.$d.getTime()+K*se;return q.w(de,this)},$.subtract=function(K,j){return this.add(-1*K,j)},$.format=function(K){var j=this,F=this.$locale();if(!this.isValid())return F.invalidDate||T;var G=K||"YYYY-MM-DDTHH:mm:ssZ",Z=q.z(this),ee=this.$H,se=this.$m,de=this.$M,fe=F.weekdays,pe=F.months,je=F.meridiem,Be=function(Ue,De,ye,Ne){return Ue&&(Ue[De]||Ue(j,G))||ye[De].slice(0,Ne)},Le=function(Ue){return q.s(ee%12||12,Ue,"0")},Qe=je||function(Ue,De,ye){var Ne=Ue<12?"AM":"PM";return ye?Ne.toLowerCase():Ne};return G.replace(R,(function(Ue,De){return De||(function(ye){switch(ye){case"YY":return String(j.$y).slice(-2);case"YYYY":return q.s(j.$y,4,"0");case"M":return de+1;case"MM":return q.s(de+1,2,"0");case"MMM":return Be(F.monthsShort,de,pe,3);case"MMMM":return Be(pe,de);case"D":return j.$D;case"DD":return q.s(j.$D,2,"0");case"d":return String(j.$W);case"dd":return Be(F.weekdaysMin,j.$W,fe,2);case"ddd":return Be(F.weekdaysShort,j.$W,fe,3);case"dddd":return fe[j.$W];case"H":return String(ee);case"HH":return q.s(ee,2,"0");case"h":return Le(1);case"hh":return Le(2);case"a":return Qe(ee,se,!0);case"A":return Qe(ee,se,!1);case"m":return String(se);case"mm":return q.s(se,2,"0");case"s":return String(j.$s);case"ss":return q.s(j.$s,2,"0");case"SSS":return q.s(j.$ms,3,"0");case"Z":return Z}return null})(Ue)||Z.replace(":","")}))},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(K,j,F){var G,Z=this,ee=q.p(j),se=x(K),de=(se.utcOffset()-this.utcOffset())*r,fe=this-se,pe=function(){return q.m(Z,se)};switch(ee){case C:G=pe()/12;break;case v:G=pe();break;case S:G=pe()/3;break;case g:G=(fe-de)/6048e5;break;case f:G=(fe-de)/864e5;break;case d:G=fe/a;break;case u:G=fe/r;break;case l:G=fe/i;break;default:G=fe}return F?G:q.a(G)},$.daysInMonth=function(){return this.endOf(v).$D},$.$locale=function(){return Y[this.$L]},$.locale=function(K,j){if(!K)return this.$L;var F=this.clone(),G=b(K,j,!0);return G&&(F.$L=G),F},$.clone=function(){return q.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},A})(),k=H.prototype;return x.prototype=k,[["$ms",o],["$s",l],["$m",u],["$H",d],["$W",f],["$M",v],["$y",C],["$D",O]].forEach((function(A){k[A[1]]=function($){return this.$g($,A[0],A[1])}})),x.extend=function(A,$){return A.$i||(A($,H,x),A.$i=!0),x},x.locale=b,x.isDayjs=J,x.unix=function(A){return x(1e3*A)},x.en=Y[U],x.Ls=Y,x.p={},x}))})(Ys)),Ys.exports}var U_=$_();const xe=gr(U_),q_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function j_(s,e){return n.openBlock(),n.createElementBlock("svg",q_,[...e[0]||(e[0]=[n.createElementVNode("path",{d:"M25.088 14.216l-0.852 0.781c-0.385 0.353-0.411 0.933-0.058 1.319s0.933 0.411 1.319 0.058l2.116-1.938c0.193-0.177 0.349-0.374 0.467-0.591 0.092-0.17 0.162-0.351 0.208-0.546 0.045-0.189 0.067-0.378 0.063-0.566-0.004-0.222-0.041-0.444-0.112-0.665s-0.17-0.423-0.297-0.605c-0.107-0.155-0.235-0.295-0.382-0.422-0.151-0.13-0.314-0.237-0.488-0.321-0.223-0.107-0.464-0.176-0.724-0.207l-5.601-0.661c-0.031-0.012-0.159-0.053-0.187-0.073-0.021-0.026-0.113-0.124-0.128-0.155l-2.377-5.087c-0.11-0.235-0.25-0.441-0.42-0.618v0c-0.133-0.138-0.285-0.259-0.454-0.362-0.165-0.1-0.338-0.177-0.517-0.232v0c-0.211-0.064-0.432-0.096-0.662-0.096s-0.451 0.032-0.662 0.096v0c-0.179 0.054-0.352 0.131-0.517 0.232-0.17 0.103-0.321 0.224-0.454 0.362-0.17 0.177-0.31 0.383-0.42 0.618l-2.377 5.087c-0.021 0.026-0.1 0.135-0.128 0.155-0.031 0.012-0.153 0.069-0.187 0.073l-5.601 0.661c-0.26 0.031-0.501 0.1-0.724 0.207v0c-0.174 0.084-0.336 0.191-0.488 0.321-0.147 0.127-0.275 0.267-0.382 0.422-0.127 0.182-0.226 0.384-0.297 0.605s-0.109 0.443-0.112 0.665c-0.003 0.188 0.018 0.377 0.063 0.566 0.047 0.194 0.116 0.376 0.208 0.546 0.118 0.217 0.274 0.414 0.467 0.591l4.119 3.773c0.018 0.029 0.099 0.137 0.11 0.171 0.001 0.009 0.002 0.025 0.004 0.044 0.005 0.054 0.013 0.133 0.008 0.159l-1.093 5.462c-0.051 0.255-0.060 0.505-0.028 0.749 0.025 0.191 0.076 0.378 0.152 0.562 0.074 0.179 0.168 0.343 0.28 0.493 0.133 0.177 0.293 0.333 0.479 0.47s0.384 0.241 0.593 0.315c0.177 0.062 0.362 0.101 0.555 0.118 0.198 0.017 0.392 0.009 0.581-0.025h0.001c0.242-0.043 0.478-0.127 0.705-0.253l4.953-2.737c0.032-0.008 0.159-0.050 0.193-0.050 0.032 0.008 0.163 0.033 0.193 0.050l4.831 2.669c0.233 0.129 0.473 0.214 0.72 0.256h0.001c0.192 0.033 0.388 0.039 0.588 0.020 0.195-0.019 0.382-0.061 0.56-0.126v0c0.211-0.077 0.411-0.187 0.598-0.329s0.347-0.305 0.478-0.488c0.111-0.154 0.201-0.323 0.271-0.506 0.072-0.188 0.119-0.379 0.139-0.573 0.026-0.25 0.008-0.504-0.053-0.762l-2.084-8.779c-0.121-0.509-0.615-0.813-1.124-0.693s-0.813 0.615-0.693 1.124l2.084 8.779c0.020 0.084 0.018 0.161-0.007 0.229s-0.071 0.129-0.141 0.181c-0.069 0.053-0.14 0.081-0.213 0.087s-0.147-0.013-0.223-0.055l-4.831-2.669c-0.171-0.094-0.347-0.165-0.53-0.212v0c-0.183-0.047-0.372-0.071-0.566-0.071s-0.384 0.024-0.566 0.071c-0.183 0.047-0.359 0.118-0.53 0.212l-4.953 2.737c-0.075 0.041-0.148 0.059-0.219 0.055s-0.142-0.032-0.21-0.082c-0.069-0.050-0.116-0.109-0.142-0.176s-0.031-0.142-0.014-0.226l1.093-5.462c0.039-0.195 0.053-0.387 0.041-0.579s-0.048-0.381-0.109-0.57c-0.062-0.189-0.144-0.363-0.248-0.525s-0.229-0.309-0.375-0.443l-4.119-3.773c-0.063-0.058-0.104-0.122-0.122-0.191s-0.014-0.145 0.012-0.227c0.026-0.081 0.067-0.145 0.123-0.191s0.126-0.074 0.211-0.084l5.601-0.661c0.195-0.023 0.381-0.069 0.558-0.138s0.345-0.161 0.504-0.276c0.159-0.115 0.299-0.245 0.42-0.392s0.223-0.308 0.306-0.486l2.377-5.087c0.036-0.077 0.084-0.135 0.145-0.173s0.133-0.058 0.218-0.058c0.085 0 0.157 0.019 0.218 0.058s0.109 0.096 0.144 0.173l2.377 5.087c0.083 0.178 0.185 0.34 0.306 0.486s0.261 0.277 0.42 0.392c0.159 0.115 0.327 0.207 0.504 0.276s0.363 0.115 0.558 0.138l5.601 0.661c0.085 0.010 0.155 0.038 0.211 0.084s0.097 0.109 0.123 0.191c0.026 0.081 0.030 0.157 0.012 0.227s-0.059 0.133-0.122 0.191l-1.263 1.157zM10.007 15.327l2 2c0.369 0.37 0.95 0.37 1.32 0s0.37-0.95 0-1.32l-2-2c-0.369-0.37-0.95-0.37-1.32 0s-0.37 0.95 0 1.32z"},null,-1)])])}const Nl={name:"meeting-icon-event",render:j_},H_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function z_(s,e){return n.openBlock(),n.createElementBlock("svg",H_,[...e[0]||(e[0]=[n.createElementVNode("path",{d:"M10 14.267c-0.413 0-0.817-0.043-1.211-0.131h-0.001c-0.329-0.073-0.652-0.176-0.968-0.31-0.318-0.135-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.211s0.044-0.817 0.131-1.212v0c0.073-0.33 0.176-0.652 0.31-0.968 0.134-0.318 0.295-0.618 0.482-0.902v0c0.207-0.314 0.446-0.607 0.718-0.878s0.564-0.511 0.878-0.718c0.283-0.187 0.584-0.347 0.902-0.482 0.316-0.134 0.639-0.237 0.968-0.31v0c0.394-0.087 0.798-0.131 1.211-0.131s0.817 0.044 1.212 0.131v0c0.33 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878v0c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968v0.001c0.087 0.394 0.131 0.798 0.131 1.211v4.667c0 0.129-0.023 0.248-0.068 0.358v0c-0.046 0.11-0.114 0.21-0.205 0.302s-0.192 0.159-0.302 0.205v0c-0.11 0.046-0.229 0.068-0.358 0.068h-4.667zM16.4 13.333c0 0.129 0.023 0.248 0.068 0.358s0.114 0.211 0.205 0.302c0.091 0.091 0.192 0.159 0.302 0.205v0c0.11 0.046 0.229 0.068 0.358 0.068h4.667c0.413 0 0.817-0.044 1.212-0.131v0c0.329-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968v0c0.087-0.394 0.131-0.798 0.131-1.211s-0.044-0.817-0.131-1.212c-0.073-0.33-0.176-0.652-0.31-0.968-0.134-0.318-0.295-0.618-0.482-0.902v0c-0.207-0.314-0.447-0.607-0.718-0.878s-0.564-0.511-0.878-0.718c-0.283-0.187-0.584-0.347-0.902-0.482-0.316-0.134-0.639-0.237-0.968-0.31-0.394-0.087-0.798-0.131-1.212-0.131s-0.817 0.044-1.212 0.131c-0.33 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.902-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212v4.667zM22 12.4h-3.733v-3.733c0-0.287 0.031-0.568 0.094-0.84 0.048-0.208 0.114-0.413 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.303-0.416 0.489-0.601s0.386-0.349 0.601-0.489l0.001-0.001c0.184-0.12 0.379-0.224 0.585-0.311 0.2-0.085 0.404-0.151 0.612-0.199 0.273-0.063 0.553-0.094 0.84-0.094s0.567 0.031 0.84 0.094c0.208 0.048 0.413 0.114 0.613 0.199 0.206 0.087 0.401 0.191 0.586 0.311 0.215 0.14 0.416 0.304 0.601 0.489s0.349 0.386 0.489 0.601c0.12 0.184 0.224 0.38 0.311 0.586 0.085 0.2 0.151 0.404 0.199 0.612 0.063 0.273 0.094 0.553 0.094 0.84s-0.031 0.568-0.094 0.84c-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.586v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.613 0.199h-0.001c-0.273 0.063-0.552 0.094-0.84 0.094zM13.733 12.4v-3.733c0-0.287-0.031-0.568-0.094-0.84-0.048-0.208-0.114-0.413-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.14-0.215-0.303-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.612-0.199-0.273-0.063-0.553-0.094-0.841-0.094s-0.567 0.031-0.84 0.094c-0.208 0.048-0.413 0.114-0.612 0.199-0.206 0.087-0.401 0.191-0.586 0.311v0c-0.215 0.14-0.416 0.303-0.601 0.489s-0.349 0.386-0.489 0.601v0c-0.12 0.184-0.224 0.38-0.311 0.586-0.085 0.2-0.151 0.404-0.199 0.612-0.063 0.273-0.094 0.553-0.094 0.84s0.031 0.568 0.094 0.84c0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.304 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.38 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199v0c0.273 0.063 0.553 0.094 0.84 0.094h3.733zM16.4 16c0-0.258 0.091-0.478 0.273-0.66 0.091-0.091 0.192-0.159 0.302-0.205s0.229-0.068 0.358-0.068h4.667c0.414 0 0.817 0.044 1.212 0.131 0.329 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968 0.087 0.394 0.131 0.798 0.131 1.212s-0.044 0.817-0.131 1.212c-0.073 0.33-0.176 0.652-0.31 0.968-0.134 0.318-0.295 0.618-0.482 0.902-0.207 0.314-0.447 0.607-0.718 0.878s-0.564 0.511-0.878 0.718c-0.283 0.187-0.584 0.347-0.902 0.482-0.316 0.134-0.639 0.237-0.968 0.31-0.394 0.087-0.798 0.131-1.212 0.131s-0.817-0.044-1.212-0.131c-0.33-0.073-0.652-0.176-0.968-0.31-0.318-0.134-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.212v-4.667zM10 15.067c-0.413 0-0.817 0.044-1.212 0.131v0c-0.329 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.901-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212s0.044 0.817 0.131 1.212c0.073 0.329 0.176 0.652 0.31 0.968 0.134 0.318 0.295 0.618 0.482 0.902v0c0.207 0.314 0.446 0.607 0.718 0.878s0.564 0.511 0.878 0.718c0.283 0.187 0.584 0.347 0.902 0.482 0.316 0.134 0.639 0.237 0.968 0.31 0.394 0.087 0.798 0.131 1.212 0.131s0.817-0.044 1.212-0.131v0c0.33-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968 0.087-0.394 0.131-0.798 0.131-1.212v-4.667c0-0.258-0.091-0.478-0.273-0.66-0.091-0.091-0.192-0.159-0.302-0.205s-0.229-0.068-0.358-0.068h-4.667zM13.733 16.933v3.733c0 0.287-0.031 0.567-0.094 0.84-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.585v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.612 0.199-0.273 0.063-0.553 0.094-0.841 0.094s-0.567-0.031-0.84-0.094h-0.001c-0.208-0.048-0.412-0.114-0.612-0.199-0.206-0.087-0.401-0.191-0.586-0.311v0c-0.215-0.14-0.416-0.303-0.601-0.489s-0.349-0.386-0.489-0.601c-0.12-0.184-0.224-0.38-0.311-0.586-0.085-0.2-0.151-0.404-0.199-0.612-0.063-0.273-0.094-0.553-0.094-0.84s0.031-0.568 0.094-0.841c0.048-0.208 0.114-0.412 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.304-0.416 0.489-0.601s0.386-0.349 0.601-0.489c0.184-0.12 0.38-0.224 0.586-0.311 0.2-0.085 0.404-0.151 0.612-0.199h0.001c0.273-0.063 0.553-0.094 0.84-0.094h3.733zM22 16.933h-3.733v3.733c0 0.287 0.031 0.567 0.094 0.84 0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.303 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.379 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199 0.273 0.063 0.553 0.094 0.84 0.094s0.567-0.031 0.84-0.094c0.208-0.048 0.413-0.114 0.613-0.199 0.206-0.087 0.401-0.191 0.586-0.311 0.215-0.141 0.416-0.304 0.601-0.489s0.349-0.386 0.489-0.601c0.12-0.184 0.224-0.38 0.311-0.586 0.085-0.2 0.151-0.404 0.199-0.612 0.063-0.273 0.094-0.553 0.094-0.84s-0.031-0.568-0.094-0.841c-0.048-0.208-0.114-0.412-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.141-0.215-0.304-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.613-0.199-0.273-0.063-0.553-0.094-0.84-0.094z"},null,-1)])])}const G_={name:"meeting-icon-all",render:z_},W_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Y_(s,e){return n.openBlock(),n.createElementBlock("svg",W_,[...e[0]||(e[0]=[n.createElementVNode("path",{d:"M16.933 4v1.733h8.4c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.242 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.098 0.266 0.128 0.404 0.034 0.156 0.050 0.315 0.050 0.479v7.222c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-7.222c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-18.667c-0.055 0-0.106 0.010-0.153 0.029v0 0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v13.333c0 0.055 0.010 0.106 0.029 0.153v0c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h18.667c0.055 0 0.107-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153v-2.953c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933v2.953c0 0.163-0.017 0.323-0.050 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.266 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-0.44l2.42 2.42c0.37 0.37 0.37 0.95 0 1.32s-0.95 0.37-1.32 0l-3.74-3.74h-12.507l-3.74 3.74c-0.37 0.37-0.95 0.37-1.32 0s-0.369-0.95 0-1.32l2.42-2.42h-0.44c-0.163 0-0.323-0.017-0.479-0.050v0c-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.122-0.37-0.199v0c-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35v0c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404v0c-0.034-0.156-0.050-0.315-0.050-0.479v-13.333c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h8.4v-1.733c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM18.72 17.392l4.615-4.741c0.365-0.374 0.357-0.955-0.018-1.32s-0.955-0.357-1.32 0.018l-3.906 4.012-3.532-4.067c-0.195-0.169-0.421-0.244-0.678-0.225s-0.47 0.125-0.639 0.32l-4.615 5.333c-0.342 0.395-0.3 0.975 0.095 1.317s0.974 0.3 1.316-0.095l3.91-4.518 3.397 3.925c0.169 0.195 0.381 0.302 0.639 0.32s0.541-0.111 0.736-0.28z"},null,-1)])])}const Il={name:"meeting-icon-meet",render:Y_},X_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function K_(s,e){return n.openBlock(),n.createElementBlock("svg",X_,[...e[0]||(e[0]=[n.createElementVNode("path",{d:"M10.633 5.457c-1.119 0.457-2.181 1.053-3.185 1.79-0.422 0.309-0.51 0.883-0.201 1.305s0.883 0.51 1.305 0.201c0.927-0.68 1.908-1.223 2.943-1.629 0.185-0.073 0.373-0.141 0.562-0.205 0.658-0.223 1.325-0.389 2.001-0.497 0.64-0.103 1.287-0.154 1.943-0.154s1.304 0.051 1.943 0.154v0c0.676 0.108 1.343 0.274 2.001 0.497 0.189 0.064 0.376 0.133 0.562 0.205v0c1.035 0.407 2.015 0.95 2.943 1.629 0.421 0.309 0.996 0.221 1.305-0.201s0.221-0.996-0.201-1.305c-1.005-0.736-2.067-1.333-3.185-1.79-0.271-0.111-0.545-0.213-0.823-0.307-0.755-0.256-1.52-0.447-2.297-0.572-0.739-0.119-1.488-0.179-2.247-0.179s-1.508 0.060-2.247 0.179v0c-0.776 0.125-1.541 0.316-2.296 0.572-0.277 0.094-0.552 0.197-0.823 0.307v0zM28.933 18.667v1.333c0 0.163-0.017 0.323-0.051 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.099-0.404 0.128-0.156 0.034-0.315 0.050-0.479 0.050h-21.333c-0.163 0-0.323-0.017-0.479-0.050-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37s-0.098-0.266-0.128-0.404c-0.034-0.156-0.050-0.315-0.050-0.479v-8c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404s0.121-0.254 0.199-0.37c0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h21.333c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.241 0.178 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.050 0.315 0.050 0.478v4c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-4c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-21.333c-0.055 0-0.106 0.010-0.153 0.029v0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v8c0 0.055 0.010 0.106 0.029 0.154s0.178 0.178 0.217 0.217c0.047 0.020 0.098 0.029 0.153 0.029h21.333c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.154v-1.333c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM20.479 23.117v0c0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.121 0.37 0.199 0.125 0.083 0.241 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.051 0.316 0.051 0.479s-0.017 0.323-0.051 0.479c-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-8c-0.163 0-0.323-0.017-0.479-0.051-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.179-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404-0.034-0.156-0.050-0.315-0.050-0.479s0.017-0.323 0.050-0.479c0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.241 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.099 0.404-0.128 0.156-0.034 0.316-0.050 0.479-0.050h8c0.163 0 0.323 0.017 0.479 0.050zM20 24.933h-8c-0.055 0-0.106 0.010-0.153 0.029s-0.178 0.178-0.217 0.217c-0.020 0.047-0.029 0.098-0.029 0.154s0.010 0.106 0.029 0.153c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h8c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153s-0.010-0.106-0.029-0.154v0c-0.020-0.047-0.178-0.178-0.217-0.217-0.047-0.019-0.098-0.029-0.154-0.029z"},null,-1)])])}const Th={name:"meeting-icon-summit",render:K_};var et=(s=>(s.ALL="all",s.MEETING="meeting",s.EVENTS="events",s.SUMMIT="summit",s))(et||{});const{t:Pt}=Ke.useI18n(),oo={summit:"var(--o-color-warning1)",events:"rgba(var(--o-cyan-6))",meeting:"var(--o-color-primary1)"},ia=[{label:Pt("meeting.meetingTypeAll"),value:et.ALL,icon:G_},{label:Pt("meeting.meetingTypeMeet"),value:et.MEETING,icon:Il,color:oo.meeting,zIndex:3},{label:Pt("meeting.meetingTypeEvents"),value:et.EVENTS,icon:Nl,color:oo.events,zIndex:2},{label:Pt("meeting.meetingTypeSummit"),value:et.SUMMIT,icon:Th,color:oo.summit,zIndex:1}],gn=0,vn=1,nn=2,Q_=[{label:Pt("meeting.day0"),value:gn,max:7},{label:Pt("meeting.week0"),value:vn,max:2},{label:Pt("meeting.month0"),value:nn,max:1}];Pt("meeting.day"),Pt("meeting.week"),Pt("meeting.month");const bh=[Pt("meeting.sunday"),Pt("meeting.monday"),Pt("meeting.tuesday"),Pt("meeting.wednesday"),Pt("meeting.thursday"),Pt("meeting.friday"),Pt("meeting.saturday")],Z_=()=>{const s=[];for(let e=1;e<=7;e++){const i=e%7;s.push({value:i,label:bh[i]})}return s},Xs=Z_(),J_=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,ey=["var(--o-color-primary1)","var(--o-color-warning1)","var(--o-color-success1)"],{t:fc}=Ke.useI18n(),Mt=(s=new Date,e="YYYY-MM-DD")=>{let i=s;return i||(i=new Date),xe(new Date(i)).isValid()?xe(new Date(i)).format(e):i},xh=(s,e,i="label",r="value")=>{const a=e.find(o=>o[r]===s);return(a==null?void 0:a[i])||s},Qn=(s,e)=>s===vn?e.sort((i,r)=>{const a=Xs.findIndex(l=>l.value===i),o=Xs.findIndex(l=>l.value===r);return a-o}).map(i=>xh(i,Xs)).join(fc("meeting.cycleSplit")):s===nn?e.join(fc("meeting.cycleSplit")):"",ty=s=>{const e=/\d+/g,i=s.match(e)||"";return parseInt(i[0])},Bn=s=>{const e=s.split(":");if(e.length>3||!e.length)return 0;let i=0,r=1;for(;e.length>0;){const a=e.pop();i+=parseInt(a)*r,r*=60}return i},lo=s=>s<0?"Invalid number":s>=10?`${s}`:`0${s}`,pc=s=>{if(s>1440*60)return"Invalid date";const e=Math.floor(s/60/60),i=Math.floor((s-e*60*60)/60),r=s%60;return`${lo(e)}:${lo(i)}:${lo(r)}`},Qo=s=>{const e=s.split(":"),i=e[e.length-3]?parseInt(e[e.length-3]):0,r=parseInt(e[e.length-2]),a=parseFloat(e[e.length-1]);return i*60*60+r*60+a},iy=s=>{const e=Math.floor(s/3600),i=Math.floor((s-e*3600)/60),r=Math.floor(s-e*3600-i*60);return`${e?`${e.toString().padStart(2,"0")}:`:""}${i.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`},si=(s,e)=>{const i=ia.find(r=>r.value===s);return(i==null?void 0:i[e])||""},ny={class:"more-text-wrapper"},ry={key:0},sy={key:1},ay=n.defineComponent({__name:"MoreText",props:{text:{default:""},link:{type:Boolean,default:!1},lines:{default:3},show:{type:Boolean,default:!1}},setup(s){const e=s,i=n.ref(!1),r=n.ref(!1),a=n.ref(0),o=n.ref(null);n.onMounted(()=>{l()}),n.watch([()=>e.text,()=>e.show],()=>{l()});const l=()=>{n.nextTick(()=>{const d=o.value;if(d){const f=document.createRange();f.setStart(d,0),f.setEnd(d,d.childNodes.length),r.value=f.getBoundingClientRect().height>d.offsetHeight+10||d.scrollHeight>d.offsetHeight+10,a.value=f.getBoundingClientRect().height||d.scrollHeight}else r.value=!1})},u=()=>{console.log(e.link),console.log("判断是否使用a标签")};return(d,f)=>(n.openBlock(),n.createElementBlock("div",ny,[n.createElementVNode("div",{class:n.normalizeClass(["more-text-content",s.link&&"is-link"]),ref_key:"contentRef",ref:o,style:n.normalizeStyle({"max-height":i.value?a.value+"px":"66px","-webkit-line-clamp":i.value?"initial":s.lines}),onClick:u},n.toDisplayString(s.text),7),r.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"more-text-btn",onClick:f[0]||(f[0]=g=>i.value=!i.value)},[i.value?(n.openBlock(),n.createElementBlock("div",sy,[n.createElementVNode("span",null,n.toDisplayString(d.t("common.collapse")),1),n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronUp))]),_:1})])):(n.openBlock(),n.createElementBlock("div",ry,[n.createElementVNode("span",null,n.toDisplayString(d.t("common.expand")),1),n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronDown))]),_:1})]))])):n.createCommentVNode("",!0)]))}}),oy=Ke._export_sfc(ay,[["__scopeId","data-v-51795609"]]),ly={class:"o-meeting-detail"},uy={class:"label"},cy={key:2,class:"value"},dy={key:0,class:"extra"},hy=n.defineComponent({__name:"OMeetingDetail",props:{data:{},from:{},show:{type:Boolean}},setup(s,{expose:e}){const i=s,{t:r,locale:a}=Ke.useI18n(),o=n.computed(()=>a.value===Ke.Locales.ZH),l=n.computed(()=>[{label:r("meeting.meetingDetail"),key:"agenda",ellipsis:!0},{label:r("meeting.meetingCreator"),key:"sponsor"},{label:r("meeting.meetingDate2"),key:"timeRange",extra:"date"},{label:r("meeting.meetingId"),key:"mid"},{label:r("meeting.meetingPlatform"),key:"platform"},{label:r("meeting.meetingLink"),key:"join_url",isLink:!0},{label:r("meeting.meetingEtherpad"),key:"etherpad",isLink:!0},{label:r("meeting.meetingReplay"),key:"replay_url",isLink:!0}].slice(0,i.from==="my"?7:8)),u=n.computed(()=>[{label:"起始日期",key:"start_date_time"},{label:"结束日期",key:"end_date_time"},{label:"报名截止时间",key:"register_end_date"},{label:"活动详情地址",key:"content_url",isLink:!0},{label:"活动地点",key:"address"},{label:"活动审批人",key:"approver"},{label:"审核备注",key:"approve_record",isRecord:!0}].slice(0,i.from==="home"?4:7)),d=n.computed(()=>[{label:"活动类型",key:"activity_type",isType:!0},{label:"活动地点",key:"address"},{label:"起始日期",key:"start_date_time"},{label:"结束日期",key:"end_date_time"},{label:"报名截止时间",key:"register_end_date"},{label:"报名网址",key:"register_url",isLink:!0},{label:"活动详情地址",key:"content_url",isLink:!0},{label:"活动审批人",key:"approver"},{label:"审核备注",key:"approve_record",isRecord:!0}]),f=n.computed(()=>i.data.type==="activity"?i.page==="approval"?d.value:u.value:l.value),g=n.ref([]);return e({copyInfo:()=>{try{let S=`${r("meeting.meetingTopic")+i.data.topic}
2
+ `;return S+=[...g.value].reduce((C,O)=>`${C}${O.textContent}
3
+ `,""),navigator.clipboard.writeText(S),Promise.resolve()}catch(S){return Promise.reject(S)}}}),(S,C)=>(n.openBlock(),n.createElementBlock("div",ly,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(f.value,(O,T)=>(n.openBlock(),n.createElementBlock("div",{ref_for:!0,ref_key:"domRef",ref:g,class:n.normalizeClass(["label-item",`label-item_${s.data.id} type_${s.data.type} `]),key:T},[s.data[O.key]?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("span",uy,[n.createTextVNode(n.toDisplayString(O.label),1),n.createElementVNode("i",null,n.toDisplayString(o.value?":":":"),1)]),O.ellipsis?(n.openBlock(),n.createBlock(oy,{key:0,show:s.show,text:s.data[O.key]||"-"},null,8,["show","text"])):O.isLink?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:1,target:"_blank",class:"value",color:"primary","hover-underline":"",href:s.data[O.key]},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(s.data[O.key]),1)]),_:2},1032,["href"])):(n.openBlock(),n.createElementBlock("span",cy,[O.extra?(n.openBlock(),n.createElementBlock("i",dy,n.toDisplayString(s.data[O.extra]),1)):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(s.data[O.key]||"-"),1)]))],64)):n.createCommentVNode("",!0)],2))),128))]))}}),Ol=Ke._export_sfc(hy,[["__scopeId","data-v-511cf902"]]),fy={class:"o-my-activity-calendar"},py={class:"activity-list"},my={key:0,class:"list-calendar-mb"},gy={class:"left-calendar"},vy=["onClick"],_y={class:"date-cell-text"},yy={class:"right-meeting"},Ty={class:"list-body"},by=["id"],xy={class:"item-header-left"},Cy={class:"header-info"},Ey={class:"title-text"},Sy={class:"act-info"},ky={class:"date-range"},wy={key:0,class:"item-header-right"},Dy={class:"activity-detail"},Ay={key:0,class:"activity-btn"},Ny={key:0,class:"load-text"},Iy={class:"dialog-content"},Oy={class:"dialog-footer"},By={class:"dialog-content"},Ly={class:"dialog-footer"},mc=n.defineComponent({__name:"OMyActivityCalendar",props:{getListRequest:{},revokeActivityRequest:{},deleteActivityRequest:{},editActivityRequest:{},getActivityDetailRequest:{}},emits:["edit"],setup(s,{emit:e}){const i=I.useMessage(null),{isPhone:r}=Et.useScreen(),a=s,o=e,l=n.ref([]),u=n.ref([]),d=n.ref(1),f=n.ref(50),g=n.ref(null),v=n.ref(!1),S=n.ref([]),C=n.ref(!1),O=n.ref(!1),T=n.computed(()=>u.value.length<g.value||g.value===null),w=async()=>{if(a.getListRequest&&!C.value)try{if(g.value>0&&(d.value-1)*f.value>g.value)return;if(!T.value&&r.value){k("next-month");return}C.value=!0;const le=await a.getListRequest({page:d.value,size:f.value});console.log(le);const ce=(le.data||[]).map(me=>{const{start_date:Ie,end_date:he,start:Ve,end:ze}=me;return[{...me,time:`${Ie}-${ze}`,start_date_time:`${Ie} ${Ve}`,end_date_time:`${he} ${ze}`,type:"activity",dateRange:`${Ie} ${Ve}-${he} ${ze}`,isExpired:xe(`${Ie} ${Ve}`).isBefore(xe())}]}).flat().filter(me=>(console.log(me.start_date,Mt(J.value,"YYYY-MM-DD")),me.start_date.slice(0,7)===Mt(J.value,"YYYY-MM-DD").slice(0,7)));v.value?(u.value=le.data||[],l.value=ce,console.log(l.value)):d.value===1&&!r.value?(u.value=le.data||[],l.value=ce):(u.value=[...u.value,...le.data||[]],l.value=[...l.value,...ce]),l.value.sort((me,Ie)=>me.start_date===Ie.start_date?Bn(me.start)>Bn(Ie.start)?1:-1:xe(me.start_date).isAfter(xe(Ie.start_date))?1:-1),g.value=(le==null?void 0:le.total)||0,n.nextTick(()=>{q(),j.value&&!r.value&&Y()})}finally{C.value=!1,O.value=!1,v.value=!1}},R=n.ref([]),L=le=>{a.getActivityDetailRequest&&(R.value.includes(le)||(R.value.push(le),a.getActivityDetailRequest(le).then(ce=>{var me;(me=l.value)==null||me.forEach(Ie=>{Ie.id===ce.id&&(Ie.approve_record=ce.approve_record)})})))},D=le=>{le.length&&le.forEach(ce=>{L(ce)})},M=le=>{const ce=l.value.filter(me=>me.start_date===le);return ce.length&&ce.every(me=>me.status===3||me.status===4)},U=le=>{const ce=le.target;if(!ce)return;const me=ce.scrollTop,Ie=ce.scrollHeight,he=ce.clientHeight;me+he>=Ie&&G()},Y=()=>{j.value.getContainerEl().addEventListener("scroll",U)},P=n.ref(),J=n.ref(),b=n.computed(()=>[...new Set(l.value.map(le=>le.start_date))].sort((le,ce)=>xe(le).isBefore(xe(ce))?-1:1)),x=n.computed(()=>[...new Set(l.value.filter(le=>!le.isExpired&&!le.is_delete).map(le=>le.start_date))].sort((le,ce)=>xe(le).isBefore(xe(ce))?-1:1)),q=()=>{var me;const le=x.value.find(Ie=>!xe(Ie).isBefore(xe(new Date).format("YYYY-MM-DD")));le?J.value=le:J.value||(J.value=xe().format("YYYY-MM-DD")),(me=P.value)==null||me.pickDay(xe(J.value)),J.value=xe(J.value).format("YYYY-MM-DD");const ce=l.value.find(Ie=>Ie.start_date===J.value&&!Ie.isExpired&&!Ie.is_delete);ce&&(L(ce.id),S.value=[ce.id])},H=(le,ce)=>{var me;(!ce||!((me=le.target)!=null&&me.className.includes("date-cell-text")))&&(le.stopPropagation(),le.preventDefault())},k=le=>{P.value&&(d.value=1,g.value=null,R.value=[],window.scrollTo({top:0,behavior:"smooth"}),P.value.selectDate(le),v.value=!0,n.nextTick(()=>{J.value=xe(P.value.selectedDay).format("YYYY-MM-DD"),w()}))},A=n.computed(()=>l.value.reduce((le,ce)=>{if(le.length){const me=le.at(-1);return(me==null?void 0:me.start_date)===ce.start_date?me==null||me.list.push(ce):le.push({start_date:ce.start_date,list:[ce]}),le}else return[{start_date:ce.start_date,list:[ce]}]},[])),$=n.ref({}),K=(le,ce)=>{le&&ce&&($.value[ce]=le)},j=n.ref(),F=le=>{var Ie,he,Ve;const ce=xe(le).format("YYYY-MM-DD"),me=document.querySelector(`#group-title-${ce}`);me&&(r.value?window.scrollTo({top:(((Ie=me.parentElement)==null?void 0:Ie.offsetTop)||0)-52,behavior:"smooth"}):(Ve=j.value)==null||Ve.scrollTo({top:((he=me.parentElement)==null?void 0:he.offsetTop)||0,behavior:"smooth"}))};n.watch(()=>J.value,()=>{F(J.value)});const G=sn.useDebounceFn(()=>{T.value&&(r.value||(O.value=!0,d.value++,w()))},200),Z=n.ref(!1),ee=n.ref(null),se=n.ref(!1),de=le=>{ee.value=le,se.value=!0},fe=()=>{var le;a.revokeActivityRequest&&(Z.value=!0,a.revokeActivityRequest((le=ee.value)==null?void 0:le.id).then(()=>{i.success({content:`“${ee.value.title}”活动撤销审核成功`}),v.value=!0,w()}).catch(()=>{i.danger({content:`“${ee.value.title}”活动撤销审核失败`})}).finally(()=>{se.value=!1,Z.value=!1}))},pe=()=>{se.value=!1},je=le=>{o("edit",le)},Be=le=>{if(!a.editActivityRequest)return;const{title:ce,start_date:me,end_date:Ie,register_end_date:he,activity_type:Ve,synopsis:ze,register_url:dt,content_url:ge,address:be,start:Ce,end:He,approver:Oe}=le;let pt={title:ce,start_date:me,end_date:Ie,register_end_date:he,activity_type:Ve,synopsis:ze,register_url:dt,content_url:ge,address:be,start:Ce,end:He,approver:Oe,is_publish:"true"};a.editActivityRequest(le.id,pt).then(()=>{i.success({content:`“${le.title}”活动提交审核成功`}),v.value=!0,w()}).catch(()=>{i.danger({content:`“${le.title}”活动提交审核失败`})})},Le=n.ref(!1),Qe=le=>{ee.value=le,Le.value=!0},Ue=()=>{var le;a.deleteActivityRequest&&(Z.value=!0,a.deleteActivityRequest((le=ee.value)==null?void 0:le.id).then(()=>{i.success({content:`“${ee.value.title}”活动删除成功`}),v.value=!0,w()}).catch(()=>{i.danger({content:`“${ee.value.title}”活动删除失败`})}).finally(()=>{Le.value=!1,Z.value=!1}))},De=()=>{Le.value=!1},ye=n.ref(),Ne=n.ref(0),$e=()=>{var le;Ne.value=((le=ye.value)==null?void 0:le.clientHeight)||0},Ee=sn.useDebounceFn(()=>{if(!T.value||!r.value)return;const le=window.scrollY||window.pageYOffset,ce=window.innerHeight;document.documentElement.scrollHeight-(le+ce)<=300&&!C.value&&(O.value=!0,d.value++,w())},200);return n.onMounted(()=>{w(),window.addEventListener("scroll",Ee),window.addEventListener("resize",Ee),$e(),window.addEventListener("resize",$e)}),n.onUnmounted(()=>{var ce;window.removeEventListener("scroll",Ee),window.removeEventListener("resize",Ee),window.removeEventListener("resize",$e);const le=(ce=j.value)==null?void 0:ce.getContainerEl();le==null||le.removeEventListener("scroll",U)}),(le,ce)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("div",fy,[n.createElementVNode("div",py,[n.unref(r)?(n.openBlock(),n.createElementBlock("div",my,[n.createElementVNode("span",null,n.toDisplayString((J.value?n.unref(xe)(new Date(J.value)):n.unref(xe)()).format("YYYY MM月")),1),n.createElementVNode("span",null,[n.createVNode(n.unref(I.OIcon),{onClick:ce[0]||(ce[0]=me=>k("prev-month"))},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconArrowLeft))]),_:1}),n.createVNode(n.unref(I.OIcon),{onClick:ce[1]||(ce[1]=me=>k("next-month"))},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconArrowRight))]),_:1})])])):n.createCommentVNode("",!0),n.createElementVNode("div",gy,[n.createVNode(n.unref(it.ElCalendar),{ref_key:"calendarRef",ref:P},{header:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString((J.value?n.unref(xe)(new Date(J.value)):n.unref(xe)()).format("YYYY MM月")),1),n.createElementVNode("div",null,[n.createVNode(n.unref(I.OIcon),{onClick:ce[2]||(ce[2]=me=>k("prev-month"))},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconArrowLeft))]),_:1}),n.createVNode(n.unref(I.OIcon),{onClick:ce[3]||(ce[3]=me=>k("next-month"))},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconArrowRight))]),_:1})])]),"date-cell":n.withCtx(({data:me})=>[n.createElementVNode("div",{onClick:Ie=>H(Ie,b.value.includes(me.day)),class:n.normalizeClass({"date-cell":!0,"is-selected":me.isSelected,"is-today":n.unref(Mt)(me.day)===n.unref(Mt)(),clickable:b.value.includes(me.day),approved:M(me.day)})},[n.createElementVNode("div",_y,n.toDisplayString(Number(me.day.split("-")[2])),1)],10,vy)]),_:1},512)]),n.createElementVNode("div",yy,[l.value.length?(n.openBlock(),n.createBlock(n.unref(I.OScroller),{key:0,ref_key:"scrollerRef",ref:j,onScrollend:n.unref(G),style:n.normalizeStyle({"--header-height":Ne.value}),"show-type":"hover",class:"scroller-container"},{default:n.withCtx(()=>[n.createElementVNode("div",Ty,[n.createVNode(n.unref(I.OCollapse),{modelValue:S.value,"onUpdate:modelValue":ce[6]||(ce[6]=me=>S.value=me),accordion:n.unref(r),onChange:D},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(A.value,(me,Ie)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:me.start_date},[Ie===0?(n.openBlock(),n.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ce[4]||(ce[4]=he=>k("prev-month"))},[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronLeft))]),_:1}),ce[9]||(ce[9]=n.createElementVNode("span",null,"上个月",-1))])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["act-item",Ie===A.value.length-1&&"last-item"])},[n.createElementVNode("div",{class:n.normalizeClass({"act-bar":!0,"is-active":n.unref(xe)(J.value).format("YYYY-MM-DD")===me.start_date,"is-end":me.list.every(he=>he.isExpired),approved:me.list.every(he=>he.status===3||he.status===4)})},[...ce[10]||(ce[10]=[n.createElementVNode("div",{class:"act-bar-line"},null,-1),n.createElementVNode("div",{class:"act-bar-dot"},null,-1)])],2),n.createElementVNode("div",{class:n.normalizeClass({"group-title":!0,"is-end":me.list.every(he=>he.isExpired)}),id:`group-title-${n.unref(xe)(new Date(me.start_date)).format("YYYY-MM-DD")}`},n.toDisplayString(n.unref(xe)(me.start_date).format("MM/DD")),11,by),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(me.list,(he,Ve)=>(n.openBlock(),n.createBlock(n.unref(I.OCollapseItem),{key:he.sub_id||he.id,value:he.sub_id||he.id,class:n.normalizeClass({"last-item":Ie===A.value.length-1&&Ve===me.list.length-1})},{title:n.withCtx(()=>{var ze,dt,ge;return[n.createElementVNode("div",xy,[n.createElementVNode("div",{class:n.normalizeClass(["act-icon",[`act-icon-${he.is_delete?"delete":(ze=n.unref(An).get(he.status))==null?void 0:ze.id}`]])},[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Nl))]),_:1})],2),n.createElementVNode("div",Cy,[n.createElementVNode("div",{class:n.normalizeClass({"act-title":!0,"is-delete":he.is_delete,"is-end":he.isExpired})},[n.createElementVNode("div",Ey,n.toDisplayString(he.title),1),n.createVNode(n.unref(I.OTag),{color:"primary",variant:"outline",class:n.normalizeClass([`tag-${he.is_delete?"delete":(dt=n.unref(An).get(he.status))==null?void 0:dt.id}`])},{default:n.withCtx(()=>{var be;return[n.createTextVNode(n.toDisplayString(he.is_delete===1?"已取消":(be=n.unref(An).get(he.status))==null?void 0:be.text),1)]}),_:2},1032,["class"])],2),n.createElementVNode("div",Sy,[n.createElementVNode("span",ky,n.toDisplayString(he.dateRange),1),n.createVNode(n.unref(I.ODivider),{direction:"v"}),n.createElementVNode("span",null,n.toDisplayString((ge=n.unref(Ko).get(he.activity_type))==null?void 0:ge.label),1)])])]),he.is_delete?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",wy,[he.status===3||he.status===4||he.status===2&&he.update_activity_id&&new Date(he.register_end_date).getTime()>new Date().getTime()?(n.openBlock(),n.createBlock(n.unref(I.OButton),{key:0,color:"primary",href:he.register_url,target:"_blank",rel:"noopener noreferrer"},{default:n.withCtx(()=>[...ce[11]||(ce[11]=[n.createTextVNode("我要报名 ",-1)])]),_:1},8,["href"])):n.createCommentVNode("",!0)]))]}),default:n.withCtx(()=>[n.createElementVNode("div",Dy,[n.createVNode(Ol,{show:S.value.includes(he.id),data:he,ref_for:!0,ref:ze=>K(ze,he.id)},null,8,["show","data"]),!he.isExpired&&!he.is_delete?(n.openBlock(),n.createElementBlock("div",Ay,[he.status===2?(n.openBlock(),n.createBlock(n.unref(I.OButton),{key:0,variant:"text",onClick:ze=>de(he)},{default:n.withCtx(()=>[...ce[12]||(ce[12]=[n.createTextVNode("撤销审核 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0),he.status===1||he.status===3||he.status===4||he.status===7?(n.openBlock(),n.createBlock(n.unref(I.OButton),{key:1,variant:"text",onClick:ze=>je(he)},{default:n.withCtx(()=>[...ce[13]||(ce[13]=[n.createTextVNode("修改活动 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0),he.status===1||he.status===7?(n.openBlock(),n.createBlock(n.unref(I.OButton),{key:2,variant:"text",onClick:ze=>Qe(he)},{default:n.withCtx(()=>[...ce[14]||(ce[14]=[n.createTextVNode("删除活动 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0),he.status===1||he.status===7?(n.openBlock(),n.createBlock(n.unref(I.OButton),{key:3,variant:"text",onClick:ze=>Be(he)},{default:n.withCtx(()=>[...ce[15]||(ce[15]=[n.createTextVNode("提交审核 ",-1)])]),_:1},8,["onClick"])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ce[16]||(ce[16]=n.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Ie===A.value.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[O.value?(n.openBlock(),n.createElementBlock("div",Ny,"加载中···")):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"list-month-change next-month",onClick:ce[5]||(ce[5]=he=>k("next-month"))},[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1}),ce[17]||(ce[17]=n.createElementVNode("span",null,"下个月",-1))])],64)):n.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):n.renderSlot(le.$slots,"empty",{key:1})])])]),n.createVNode(n.unref(I.ODialog),{visible:se.value,"onUpdate:visible":ce[7]||(ce[7]=me=>se.value=me),"main-class":"handle-dialog-active"},{header:n.withCtx(()=>[...ce[18]||(ce[18]=[n.createTextVNode("撤销审核",-1)])]),footer:n.withCtx(()=>[n.createElementVNode("div",Oy,[n.createVNode(n.unref(I.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:fe,loading:Z.value},{default:n.withCtx(()=>[...ce[19]||(ce[19]=[n.createTextVNode(" 确定 ",-1)])]),_:1},8,["loading"]),n.createVNode(n.unref(I.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:pe},{default:n.withCtx(()=>[...ce[20]||(ce[20]=[n.createTextVNode("取消",-1)])]),_:1})])]),default:n.withCtx(()=>[n.createElementVNode("div",Iy,"是否确认要撤销“"+n.toDisplayString(ee.value.title)+"”活动?撤销审核后活动将变成草稿状态。",1)]),_:1},8,["visible"]),n.createVNode(n.unref(I.ODialog),{visible:Le.value,"onUpdate:visible":ce[8]||(ce[8]=me=>Le.value=me),"main-class":"handle-dialog-active"},{header:n.withCtx(()=>[...ce[21]||(ce[21]=[n.createTextVNode("删除活动",-1)])]),footer:n.withCtx(()=>[n.createElementVNode("div",Ly,[n.createVNode(n.unref(I.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:Ue,loading:Z.value},{default:n.withCtx(()=>[...ce[22]||(ce[22]=[n.createTextVNode("确定 ",-1)])]),_:1},8,["loading"]),n.createVNode(n.unref(I.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:De},{default:n.withCtx(()=>[...ce[23]||(ce[23]=[n.createTextVNode("取消",-1)])]),_:1})])]),default:n.withCtx(()=>[n.createElementVNode("div",By,"是否确认删除“"+n.toDisplayString(ee.value.title)+"”活动?删除后记录将不再我的个人中心呈现。",1)]),_:1},8,["visible"])],64))}}),Py=Object.assign(lc,{install(s){s.component("OActivityForm",lc)}}),My=Object.assign(dc,{install(s){s.component("OActivityApproval",dc)}}),Ry=Object.assign(mc,{install(s){s.component("OMyActivityCalendar",mc)}});/*! @license DOMPurify 2.5.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.9/LICENSE */function mn(s){"@babel/helpers - typeof";return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(s)}function Zo(s,e){return Zo=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},Zo(s,e)}function Vy(){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}}function Ks(s,e,i){return Vy()?Ks=Reflect.construct:Ks=function(a,o,l){var u=[null];u.push.apply(u,o);var d=Function.bind.apply(a,u),f=new d;return l&&Zo(f,l.prototype),f},Ks.apply(null,arguments)}function Ii(s){return Fy(s)||$y(s)||Uy(s)||qy()}function Fy(s){if(Array.isArray(s))return Jo(s)}function $y(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function Uy(s,e){if(s){if(typeof s=="string")return Jo(s,e);var i=Object.prototype.toString.call(s).slice(8,-1);if(i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set")return Array.from(s);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Jo(s,e)}}function Jo(s,e){(e==null||e>s.length)&&(e=s.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=s[i];return r}function qy(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var jy=Object.hasOwnProperty,gc=Object.setPrototypeOf,Hy=Object.isFrozen,zy=Object.getPrototypeOf,Gy=Object.getOwnPropertyDescriptor,ei=Object.freeze,vi=Object.seal,Wy=Object.create,Ch=typeof Reflect<"u"&&Reflect,na=Ch.apply,el=Ch.construct;na||(na=function(e,i,r){return e.apply(i,r)});ei||(ei=function(e){return e});vi||(vi=function(e){return e});el||(el=function(e,i){return Ks(e,Ii(i))});var Yy=_i(Array.prototype.forEach),vc=_i(Array.prototype.pop),qr=_i(Array.prototype.push),Qs=_i(String.prototype.toLowerCase),uo=_i(String.prototype.toString),_c=_i(String.prototype.match),Ni=_i(String.prototype.replace),Xy=_i(String.prototype.indexOf),Ky=_i(String.prototype.trim),Bt=_i(RegExp.prototype.test),co=Qy(TypeError);function _i(s){return function(e){for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];return na(s,e,r)}}function Qy(s){return function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return el(s,i)}}function Ye(s,e,i){var r;i=(r=i)!==null&&r!==void 0?r:Qs,gc&&gc(s,null);for(var a=e.length;a--;){var o=e[a];if(typeof o=="string"){var l=i(o);l!==o&&(Hy(e)||(e[a]=l),o=l)}s[o]=!0}return s}function En(s){var e=Wy(null),i;for(i in s)na(jy,s,[i])===!0&&(e[i]=s[i]);return e}function Ms(s,e){for(;s!==null;){var i=Gy(s,e);if(i){if(i.get)return _i(i.get);if(typeof i.value=="function")return _i(i.value)}s=zy(s)}function r(a){return console.warn("fallback value for",a),null}return r}var yc=ei(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ho=ei(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fo=ei(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Zy=ei(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),po=ei(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Jy=ei(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tc=ei(["#text"]),bc=ei(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),mo=ei(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),xc=ei(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Rs=ei(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),e3=vi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),t3=vi(/<%[\w\W]*|[\w\W]*%>/gm),i3=vi(/\${[\w\W]*}/gm),n3=vi(/^data-[\-\w.\u00B7-\uFFFF]+$/),r3=vi(/^aria-[\-\w]+$/),s3=vi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),a3=vi(/^(?:\w+script|data):/i),o3=vi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),l3=vi(/^html$/i),u3=vi(/^[a-z][.\w]*(-[.\w]+)+$/i),c3=function(){return typeof window>"u"?null:window},d3=function(e,i){if(mn(e)!=="object"||typeof e.createPolicy!="function")return null;var r=null,a="data-tt-policy-suffix";i.currentScript&&i.currentScript.hasAttribute(a)&&(r=i.currentScript.getAttribute(a));var o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML:function(u){return u},createScriptURL:function(u){return u}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Eh(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c3(),e=function(te){return Eh(te)};if(e.version="2.5.9",e.removed=[],!s||!s.document||s.document.nodeType!==9)return e.isSupported=!1,e;var i=s.document,r=s.document,a=s.DocumentFragment,o=s.HTMLTemplateElement,l=s.Node,u=s.Element,d=s.NodeFilter,f=s.NamedNodeMap,g=f===void 0?s.NamedNodeMap||s.MozNamedAttrMap:f,v=s.HTMLFormElement,S=s.DOMParser,C=s.trustedTypes,O=u.prototype,T=Ms(O,"cloneNode"),w=Ms(O,"nextSibling"),R=Ms(O,"childNodes"),L=Ms(O,"parentNode");if(typeof o=="function"){var D=r.createElement("template");D.content&&D.content.ownerDocument&&(r=D.content.ownerDocument)}var M=d3(C,i),U=M?M.createHTML(""):"",Y=r,P=Y.implementation,J=Y.createNodeIterator,b=Y.createDocumentFragment,x=Y.getElementsByTagName,q=i.importNode,H={};try{H=En(r).documentMode?r.documentMode:{}}catch{}var k={};e.isSupported=typeof L=="function"&&P&&P.createHTMLDocument!==void 0&&H!==9;var A=e3,$=t3,K=i3,j=n3,F=r3,G=a3,Z=o3,ee=u3,se=s3,de=null,fe=Ye({},[].concat(Ii(yc),Ii(ho),Ii(fo),Ii(po),Ii(Tc))),pe=null,je=Ye({},[].concat(Ii(bc),Ii(mo),Ii(xc),Ii(Rs))),Be=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,Qe=null,Ue=!0,De=!0,ye=!1,Ne=!0,$e=!1,Ee=!0,le=!1,ce=!1,me=!1,Ie=!1,he=!1,Ve=!1,ze=!0,dt=!1,ge="user-content-",be=!0,Ce=!1,He={},Oe=null,pt=Ye({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Rt=null,Pi=Ye({},["audio","video","img","source","image","track"]),Ze=null,xi=Ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ht="http://www.w3.org/1998/Math/MathML",Ci="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml",ti=yt,ui=!1,zt=null,Yi=Ye({},[Ht,Ci,yt],uo),Vt,Ei=["application/xhtml+xml","text/html"],E="text/html",N,Q=null,re=r.createElement("form"),Te=function(te){return te instanceof RegExp||te instanceof Function},Me=function(te){Q&&Q===te||((!te||mn(te)!=="object")&&(te={}),te=En(te),Vt=Ei.indexOf(te.PARSER_MEDIA_TYPE)===-1?Vt=E:Vt=te.PARSER_MEDIA_TYPE,N=Vt==="application/xhtml+xml"?uo:Qs,de="ALLOWED_TAGS"in te?Ye({},te.ALLOWED_TAGS,N):fe,pe="ALLOWED_ATTR"in te?Ye({},te.ALLOWED_ATTR,N):je,zt="ALLOWED_NAMESPACES"in te?Ye({},te.ALLOWED_NAMESPACES,uo):Yi,Ze="ADD_URI_SAFE_ATTR"in te?Ye(En(xi),te.ADD_URI_SAFE_ATTR,N):xi,Rt="ADD_DATA_URI_TAGS"in te?Ye(En(Pi),te.ADD_DATA_URI_TAGS,N):Pi,Oe="FORBID_CONTENTS"in te?Ye({},te.FORBID_CONTENTS,N):pt,Le="FORBID_TAGS"in te?Ye({},te.FORBID_TAGS,N):{},Qe="FORBID_ATTR"in te?Ye({},te.FORBID_ATTR,N):{},He="USE_PROFILES"in te?te.USE_PROFILES:!1,Ue=te.ALLOW_ARIA_ATTR!==!1,De=te.ALLOW_DATA_ATTR!==!1,ye=te.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=te.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$e=te.SAFE_FOR_TEMPLATES||!1,Ee=te.SAFE_FOR_XML!==!1,le=te.WHOLE_DOCUMENT||!1,Ie=te.RETURN_DOM||!1,he=te.RETURN_DOM_FRAGMENT||!1,Ve=te.RETURN_TRUSTED_TYPE||!1,me=te.FORCE_BODY||!1,ze=te.SANITIZE_DOM!==!1,dt=te.SANITIZE_NAMED_PROPS||!1,be=te.KEEP_CONTENT!==!1,Ce=te.IN_PLACE||!1,se=te.ALLOWED_URI_REGEXP||se,ti=te.NAMESPACE||yt,Be=te.CUSTOM_ELEMENT_HANDLING||{},te.CUSTOM_ELEMENT_HANDLING&&Te(te.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Be.tagNameCheck=te.CUSTOM_ELEMENT_HANDLING.tagNameCheck),te.CUSTOM_ELEMENT_HANDLING&&Te(te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Be.attributeNameCheck=te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),te.CUSTOM_ELEMENT_HANDLING&&typeof te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Be.allowCustomizedBuiltInElements=te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),$e&&(De=!1),he&&(Ie=!0),He&&(de=Ye({},Ii(Tc)),pe=[],He.html===!0&&(Ye(de,yc),Ye(pe,bc)),He.svg===!0&&(Ye(de,ho),Ye(pe,mo),Ye(pe,Rs)),He.svgFilters===!0&&(Ye(de,fo),Ye(pe,mo),Ye(pe,Rs)),He.mathMl===!0&&(Ye(de,po),Ye(pe,xc),Ye(pe,Rs))),te.ADD_TAGS&&(de===fe&&(de=En(de)),Ye(de,te.ADD_TAGS,N)),te.ADD_ATTR&&(pe===je&&(pe=En(pe)),Ye(pe,te.ADD_ATTR,N)),te.ADD_URI_SAFE_ATTR&&Ye(Ze,te.ADD_URI_SAFE_ATTR,N),te.FORBID_CONTENTS&&(Oe===pt&&(Oe=En(Oe)),Ye(Oe,te.FORBID_CONTENTS,N)),be&&(de["#text"]=!0),le&&Ye(de,["html","head","body"]),de.table&&(Ye(de,["tbody"]),delete Le.tbody),ei&&ei(te),Q=te)},nt=Ye({},["mi","mo","mn","ms","mtext"]),St=Ye({},["annotation-xml"]),Gt=Ye({},["title","style","font","a","script"]),Ft=Ye({},ho);Ye(Ft,fo),Ye(Ft,Zy);var Ot=Ye({},po);Ye(Ot,Jy);var ii=function(te){var ve=L(te);(!ve||!ve.tagName)&&(ve={namespaceURI:ti,tagName:"template"});var we=Qs(te.tagName),tt=Qs(ve.tagName);return zt[te.namespaceURI]?te.namespaceURI===Ci?ve.namespaceURI===yt?we==="svg":ve.namespaceURI===Ht?we==="svg"&&(tt==="annotation-xml"||nt[tt]):!!Ft[we]:te.namespaceURI===Ht?ve.namespaceURI===yt?we==="math":ve.namespaceURI===Ci?we==="math"&&St[tt]:!!Ot[we]:te.namespaceURI===yt?ve.namespaceURI===Ci&&!St[tt]||ve.namespaceURI===Ht&&!nt[tt]?!1:!Ot[we]&&(Gt[we]||!Ft[we]):!!(Vt==="application/xhtml+xml"&&zt[te.namespaceURI]):!1},Je=function(te){qr(e.removed,{element:te});try{te.parentNode.removeChild(te)}catch{try{te.outerHTML=U}catch{te.remove()}}},ni=function(te,ve){try{qr(e.removed,{attribute:ve.getAttributeNode(te),from:ve})}catch{qr(e.removed,{attribute:null,from:ve})}if(ve.removeAttribute(te),te==="is"&&!pe[te])if(Ie||he)try{Je(ve)}catch{}else try{ve.setAttribute(te,"")}catch{}},Wt=function(te){var ve,we;if(me)te="<remove></remove>"+te;else{var tt=_c(te,/^[\r\n\t ]+/);we=tt&&tt[0]}Vt==="application/xhtml+xml"&&ti===yt&&(te='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+te+"</body></html>");var $t=M?M.createHTML(te):te;if(ti===yt)try{ve=new S().parseFromString($t,Vt)}catch{}if(!ve||!ve.documentElement){ve=P.createDocument(ti,"template",null);try{ve.documentElement.innerHTML=ui?U:$t}catch{}}var wt=ve.body||ve.documentElement;return te&&we&&wt.insertBefore(r.createTextNode(we),wt.childNodes[0]||null),ti===yt?x.call(ve,le?"html":"body")[0]:le?ve.documentElement:wt},Yt=function(te){return J.call(te.ownerDocument||te,te,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null,!1)},kt=function(te){return te instanceof v&&(typeof te.nodeName!="string"||typeof te.textContent!="string"||typeof te.removeChild!="function"||!(te.attributes instanceof g)||typeof te.removeAttribute!="function"||typeof te.setAttribute!="function"||typeof te.namespaceURI!="string"||typeof te.insertBefore!="function"||typeof te.hasChildNodes!="function")},lt=function(te){return mn(l)==="object"?te instanceof l:te&&mn(te)==="object"&&typeof te.nodeType=="number"&&typeof te.nodeName=="string"},We=function(te,ve,we){k[te]&&Yy(k[te],function(tt){tt.call(e,ve,we,Q)})},Si=function(te){var ve;if(We("beforeSanitizeElements",te,null),kt(te)||Bt(/[\u0080-\uFFFF]/,te.nodeName))return Je(te),!0;var we=N(te.nodeName);if(We("uponSanitizeElement",te,{tagName:we,allowedTags:de}),te.hasChildNodes()&&!lt(te.firstElementChild)&&(!lt(te.content)||!lt(te.content.firstElementChild))&&Bt(/<[/\w]/g,te.innerHTML)&&Bt(/<[/\w]/g,te.textContent)||we==="select"&&Bt(/<template/i,te.innerHTML)||te.nodeType===7||Ee&&te.nodeType===8&&Bt(/<[/\w]/g,te.data))return Je(te),!0;if(!de[we]||Le[we]){if(!Le[we]&&bn(we)&&(Be.tagNameCheck instanceof RegExp&&Bt(Be.tagNameCheck,we)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(we)))return!1;if(be&&!Oe[we]){var tt=L(te)||te.parentNode,$t=R(te)||te.childNodes;if($t&&tt)for(var wt=$t.length,Tt=wt-1;Tt>=0;--Tt){var ki=T($t[Tt],!0);ki.__removalCount=(te.__removalCount||0)+1,tt.insertBefore(ki,w(te))}}return Je(te),!0}return te instanceof u&&!ii(te)||(we==="noscript"||we==="noembed"||we==="noframes")&&Bt(/<\/no(script|embed|frames)/i,te.innerHTML)?(Je(te),!0):($e&&te.nodeType===3&&(ve=te.textContent,ve=Ni(ve,A," "),ve=Ni(ve,$," "),ve=Ni(ve,K," "),te.textContent!==ve&&(qr(e.removed,{element:te.cloneNode()}),te.textContent=ve)),We("afterSanitizeElements",te,null),!1)},Mi=function(te,ve,we){if(ze&&(ve==="id"||ve==="name")&&(we in r||we in re))return!1;if(!(De&&!Qe[ve]&&Bt(j,ve))){if(!(Ue&&Bt(F,ve))){if(!pe[ve]||Qe[ve]){if(!(bn(te)&&(Be.tagNameCheck instanceof RegExp&&Bt(Be.tagNameCheck,te)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(te))&&(Be.attributeNameCheck instanceof RegExp&&Bt(Be.attributeNameCheck,ve)||Be.attributeNameCheck instanceof Function&&Be.attributeNameCheck(ve))||ve==="is"&&Be.allowCustomizedBuiltInElements&&(Be.tagNameCheck instanceof RegExp&&Bt(Be.tagNameCheck,we)||Be.tagNameCheck instanceof Function&&Be.tagNameCheck(we))))return!1}else if(!Ze[ve]){if(!Bt(se,Ni(we,Z,""))){if(!((ve==="src"||ve==="xlink:href"||ve==="href")&&te!=="script"&&Xy(we,"data:")===0&&Rt[te])){if(!(ye&&!Bt(G,Ni(we,Z,"")))){if(we)return!1}}}}}}return!0},bn=function(te){return te!=="annotation-xml"&&_c(te,ee)},ps=function(te){var ve,we,tt,$t;We("beforeSanitizeAttributes",te,null);var wt=te.attributes;if(!(!wt||kt(te))){var Tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:pe};for($t=wt.length;$t--;){ve=wt[$t];var ki=ve,vt=ki.name,Er=ki.namespaceURI;if(we=vt==="value"?ve.value:Ky(ve.value),tt=N(vt),Tt.attrName=tt,Tt.attrValue=we,Tt.keepAttr=!0,Tt.forceKeepAttr=void 0,We("uponSanitizeAttribute",te,Tt),we=Tt.attrValue,!Tt.forceKeepAttr&&(ni(vt,te),!!Tt.keepAttr)){if(!Ne&&Bt(/\/>/i,we)){ni(vt,te);continue}$e&&(we=Ni(we,A," "),we=Ni(we,$," "),we=Ni(we,K," "));var ms=N(te.nodeName);if(Mi(ms,tt,we)){if(dt&&(tt==="id"||tt==="name")&&(ni(vt,te),we=ge+we),Ee&&Bt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,we)){ni(vt,te);continue}if(M&&mn(C)==="object"&&typeof C.getAttributeType=="function"&&!Er)switch(C.getAttributeType(ms,tt)){case"TrustedHTML":{we=M.createHTML(we);break}case"TrustedScriptURL":{we=M.createScriptURL(we);break}}try{Er?te.setAttributeNS(Er,vt,we):te.setAttribute(vt,we),kt(te)?Je(te):vc(e.removed)}catch{}}}}We("afterSanitizeAttributes",te,null)}},Xi=function Se(te){var ve,we=Yt(te);for(We("beforeSanitizeShadowDOM",te,null);ve=we.nextNode();)We("uponSanitizeShadowNode",ve,null),Si(ve),ps(ve),ve.content instanceof a&&Se(ve.content);We("afterSanitizeShadowDOM",te,null)};return e.sanitize=function(Se){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve,we,tt,$t,wt;if(ui=!Se,ui&&(Se="<!-->"),typeof Se!="string"&&!lt(Se))if(typeof Se.toString=="function"){if(Se=Se.toString(),typeof Se!="string")throw co("dirty is not a string, aborting")}else throw co("toString is not a function");if(!e.isSupported){if(mn(s.toStaticHTML)==="object"||typeof s.toStaticHTML=="function"){if(typeof Se=="string")return s.toStaticHTML(Se);if(lt(Se))return s.toStaticHTML(Se.outerHTML)}return Se}if(ce||Me(te),e.removed=[],typeof Se=="string"&&(Ce=!1),Ce){if(Se.nodeName){var Tt=N(Se.nodeName);if(!de[Tt]||Le[Tt])throw co("root node is forbidden and cannot be sanitized in-place")}}else if(Se instanceof l)ve=Wt("<!---->"),we=ve.ownerDocument.importNode(Se,!0),we.nodeType===1&&we.nodeName==="BODY"||we.nodeName==="HTML"?ve=we:ve.appendChild(we);else{if(!Ie&&!$e&&!le&&Se.indexOf("<")===-1)return M&&Ve?M.createHTML(Se):Se;if(ve=Wt(Se),!ve)return Ie?null:Ve?U:""}ve&&me&&Je(ve.firstChild);for(var ki=Yt(Ce?Se:ve);tt=ki.nextNode();)tt.nodeType===3&&tt===$t||(Si(tt),ps(tt),tt.content instanceof a&&Xi(tt.content),$t=tt);if($t=null,Ce)return Se;if(Ie){if(he)for(wt=b.call(ve.ownerDocument);ve.firstChild;)wt.appendChild(ve.firstChild);else wt=ve;return(pe.shadowroot||pe.shadowrootmod)&&(wt=q.call(i,wt,!0)),wt}var vt=le?ve.outerHTML:ve.innerHTML;return le&&de["!doctype"]&&ve.ownerDocument&&ve.ownerDocument.doctype&&ve.ownerDocument.doctype.name&&Bt(l3,ve.ownerDocument.doctype.name)&&(vt="<!DOCTYPE "+ve.ownerDocument.doctype.name+`>
5
+ `+vt),$e&&(vt=Ni(vt,A," "),vt=Ni(vt,$," "),vt=Ni(vt,K," ")),M&&Ve?M.createHTML(vt):vt},e.setConfig=function(Se){Me(Se),ce=!0},e.clearConfig=function(){Q=null,ce=!1},e.isValidAttribute=function(Se,te,ve){Q||Me({});var we=N(Se),tt=N(te);return Mi(we,tt,ve)},e.addHook=function(Se,te){typeof te=="function"&&(k[Se]=k[Se]||[],qr(k[Se],te))},e.removeHook=function(Se){if(k[Se])return vc(k[Se])},e.removeHooks=function(Se){k[Se]&&(k[Se]=[])},e.removeAllHooks=function(){k={}},e}var h3=Eh();function f3(s,e){const i=s.hooks??{};let r;for(r in i){const a=i[r];a!==void 0&&e.addHook(r,a)}}function p3(){return h3()}function Bl(s={},e=p3){const i=e();f3(s,i);const r=function(a,o){const l=o.value;if(o.oldValue===l)return;const u=`${l}`,d=o.arg,f=s.namedConfigurations,g=s.default??{};if(f&&d!==void 0){a.innerHTML=i.sanitize(u,f[d]??g);return}a.innerHTML=i.sanitize(u,g)};return{mounted:r,updated:r}}const m3={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function g3(s,e){return n.openBlock(),n.createElementBlock("svg",m3,[...e[0]||(e[0]=[n.createElementVNode("rect",{id:"峰会",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),n.createElementVNode("path",{id:"矢量 425",d:"M8.36719 4.75439L8.36523 4.75537L8.36523 4.75537C7.63184 5.05518 6.93555 5.44629 6.27734 5.9292C6.00098 6.13184 5.94238 6.5083 6.14551 6.78516C6.34766 7.06201 6.72461 7.11963 7.00098 6.91699C7.61035 6.47119 8.25391 6.11475 8.93262 5.84766C9.05371 5.7998 9.17676 5.75488 9.30078 5.71289C9.73242 5.56641 10.1699 5.45752 10.6143 5.38672C10.6191 5.38574 10.624 5.38525 10.6289 5.38428L10.6289 5.38428C11.0439 5.31836 11.4639 5.28564 11.8896 5.28564C12.3193 5.28564 12.7451 5.31934 13.1641 5.38672L13.165 5.38672C13.6084 5.45752 14.0459 5.56641 14.4775 5.71289C14.6016 5.75488 14.7246 5.7998 14.8457 5.84766C15.5254 6.11475 16.1689 6.47119 16.7773 6.91699C17.0537 7.11963 17.4307 7.06201 17.6328 6.78516C17.8359 6.5083 17.7783 6.13184 17.501 5.9292C16.8418 5.4458 16.1455 5.0542 15.4111 4.75439C15.2334 4.68213 15.0537 4.61475 14.8711 4.55273C14.376 4.38477 13.873 4.25977 13.3643 4.17773C12.8789 4.09961 12.3877 4.06055 11.8896 4.06055C11.3916 4.06055 10.8994 4.09961 10.4141 4.17773L10.4141 4.17773C9.90527 4.25977 9.40332 4.38477 8.90723 4.55273C8.72559 4.61475 8.54492 4.68213 8.36719 4.75439L8.36719 4.75439ZM20.377 14.2979L20.377 13.4229C20.377 13.0801 20.1074 12.8105 19.7646 12.8105C19.4219 12.8105 19.1523 13.0801 19.1523 13.4229L19.1523 14.2979C19.1523 14.334 19.1455 14.3677 19.1328 14.3984L19.1328 14.3989C19.1074 14.4243 19.0215 14.5283 18.9902 14.5415C18.96 14.5542 18.9258 14.5605 18.8896 14.5605L4.88965 14.5605C4.85352 14.5605 4.82031 14.5542 4.78906 14.5415C4.76367 14.5156 4.65918 14.4297 4.64648 14.3989C4.63379 14.3677 4.62695 14.3345 4.62695 14.2979L4.62695 9.04785C4.62695 9.01172 4.63379 8.97803 4.64648 8.94727C4.67188 8.92188 4.75781 8.81738 4.78906 8.80469L4.78906 8.80469C4.82031 8.79199 4.85352 8.78564 4.88965 8.78564L18.8896 8.78564C18.9258 8.78564 18.96 8.79199 18.9902 8.80469C19.0166 8.83057 19.1201 8.9165 19.1328 8.94727C19.1455 8.97803 19.1523 9.01172 19.1523 9.04785L19.1523 11.6729C19.1523 12.0161 19.4219 12.2856 19.7646 12.2856C20.1074 12.2856 20.377 12.0161 20.377 11.6729L20.377 9.04785C20.377 8.94141 20.3662 8.83691 20.3447 8.73535L20.3447 8.73438L20.3447 8.73389C20.3252 8.64355 20.2969 8.55518 20.2598 8.46875C20.2236 8.3833 20.1807 8.30225 20.1299 8.22559C20.0752 8.14355 20.0127 8.06738 19.9414 7.99609C19.8701 7.92529 19.7939 7.8623 19.7119 7.80811C19.6357 7.75732 19.5547 7.71387 19.4688 7.67773C19.3828 7.64111 19.2939 7.61328 19.2041 7.59375C19.1016 7.57178 18.9971 7.56055 18.8896 7.56055L4.88965 7.56055C4.78418 7.56055 4.68066 7.57129 4.5791 7.59277L4.5791 7.59277C4.57812 7.59326 4.57715 7.59326 4.57617 7.59375L4.5752 7.59375C4.48535 7.61328 4.39746 7.64111 4.31055 7.67773C4.22461 7.71387 4.14355 7.75732 4.06738 7.80811C3.98535 7.8623 3.90918 7.92529 3.83789 7.99609C3.7666 8.06738 3.7041 8.14355 3.64941 8.22559C3.64941 8.22656 3.64844 8.22705 3.64844 8.22803C3.59863 8.30371 3.55566 8.38379 3.51953 8.46875C3.48242 8.55518 3.45508 8.64355 3.43555 8.73389C3.41309 8.83643 3.40234 8.94092 3.40234 9.04785L3.40234 14.2979C3.40234 14.4053 3.41309 14.5098 3.43555 14.6123C3.45508 14.7021 3.48242 14.7905 3.51953 14.8774C3.55566 14.9629 3.59961 15.0439 3.64941 15.1201C3.7041 15.2021 3.7666 15.2788 3.83789 15.3501C3.90918 15.4209 3.98535 15.4834 4.06738 15.5381C4.14355 15.5889 4.22461 15.6323 4.31055 15.6685C4.39746 15.7051 4.48535 15.7329 4.5752 15.7524C4.67773 15.7744 4.78223 15.7856 4.88965 15.7856L18.8896 15.7856C18.9971 15.7856 19.1016 15.7744 19.2041 15.7524C19.2939 15.7329 19.3828 15.7051 19.4688 15.6685C19.5547 15.6318 19.6357 15.5889 19.7119 15.5381C19.7939 15.4834 19.8701 15.4209 19.9414 15.3501C20.0127 15.2788 20.0752 15.2021 20.1299 15.1201C20.1807 15.0439 20.2236 14.9629 20.2598 14.8774C20.2969 14.7905 20.3252 14.7021 20.3447 14.6123C20.3662 14.5098 20.377 14.4053 20.377 14.2979ZM14.8291 16.3438L14.8291 16.3438C14.9189 16.3633 15.0078 16.3911 15.0938 16.4277C15.1797 16.4639 15.2607 16.5073 15.3369 16.5581C15.4189 16.6123 15.4951 16.6753 15.5664 16.7461C15.6377 16.8174 15.7002 16.8936 15.7549 16.9756C15.8057 17.0522 15.8486 17.1328 15.8848 17.2188C15.9219 17.3052 15.9502 17.3936 15.9697 17.4839C15.9912 17.5864 16.002 17.6909 16.002 17.7979C16.002 17.9053 15.9912 18.0098 15.9697 18.1123C15.9502 18.2021 15.9219 18.2905 15.8848 18.3774C15.8486 18.4629 15.8057 18.5439 15.7549 18.6201C15.7002 18.7021 15.6377 18.7788 15.5664 18.8501C15.4951 18.9209 15.4189 18.9834 15.3369 19.0381C15.2607 19.0889 15.1797 19.1318 15.0938 19.1685C15.0078 19.2051 14.9189 19.2329 14.8291 19.2524C14.7266 19.2744 14.6221 19.2856 14.5146 19.2856L9.26465 19.2856C9.1582 19.2856 9.05273 19.2744 8.9502 19.2524C8.86035 19.2329 8.77246 19.2051 8.68555 19.1685C8.59961 19.1318 8.51855 19.0889 8.44238 19.0381C8.36035 18.9834 8.28418 18.9209 8.21289 18.8501C8.1416 18.7788 8.0791 18.7021 8.02441 18.6201C7.97461 18.5439 7.93066 18.4629 7.89453 18.3774C7.85742 18.2905 7.83008 18.2021 7.81055 18.1123C7.78809 18.0098 7.77734 17.9053 7.77734 17.7979C7.77734 17.6909 7.78809 17.5864 7.81055 17.4839C7.83008 17.3936 7.85742 17.3052 7.89453 17.2188C7.93066 17.1328 7.97461 17.0522 8.02441 16.9756C8.0791 16.8936 8.1416 16.8174 8.21289 16.7461C8.28418 16.6753 8.36035 16.6123 8.44238 16.5581C8.51855 16.5073 8.59961 16.4639 8.68555 16.4277C8.77246 16.3911 8.86035 16.3633 8.9502 16.3438C9.05273 16.3218 9.1582 16.3105 9.26465 16.3105L14.5146 16.3105C14.6221 16.3105 14.7266 16.3218 14.8291 16.3438ZM9.2666 17.5352L14.5166 17.5352C14.5527 17.5352 14.5859 17.5415 14.6172 17.5547C14.6426 17.5801 14.7471 17.666 14.7598 17.6973C14.7725 17.728 14.7793 17.7617 14.7793 17.7979C14.7793 17.834 14.7725 17.8677 14.7598 17.8984C14.7344 17.9243 14.6484 18.0283 14.6172 18.041C14.5859 18.0542 14.5527 18.0605 14.5166 18.0605L9.2666 18.0605C9.23047 18.0605 9.19629 18.0542 9.16602 18.041C9.13965 18.0156 9.03613 17.9297 9.02344 17.8984C9.01074 17.8677 9.00391 17.834 9.00391 17.7979C9.00391 17.7617 9.01074 17.728 9.02344 17.6973C9.04883 17.6714 9.13477 17.5674 9.16602 17.5547C9.19629 17.5415 9.23047 17.5352 9.2666 17.5352Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const v3={name:"events-icon-summit",render:g3},_3={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function y3(s,e){return n.openBlock(),n.createElementBlock("svg",_3,[...e[0]||(e[0]=[n.createElementVNode("rect",{id:"活动",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),n.createElementVNode("path",{id:"矢量 426",d:"M18.3065 11.0924L17.7206 11.6295C17.455 11.8722 17.4384 12.2711 17.6806 12.5362C17.9237 12.8009 18.3221 12.8185 18.5868 12.5758L19.1737 12.0387L20.0418 11.2433C20.1746 11.1217 20.2811 10.9859 20.3631 10.8365C20.4256 10.7198 20.4735 10.5948 20.5057 10.4615C20.5369 10.3316 20.5516 10.2017 20.5496 10.0723C20.5467 9.92 20.5213 9.76765 20.4725 9.61531C20.4237 9.46345 20.3553 9.32478 20.2684 9.19978C20.1942 9.09333 20.1063 8.99665 20.0057 8.90925C19.9012 8.81989 19.7899 8.74616 19.6698 8.68854C19.5165 8.61481 19.3504 8.56744 19.1717 8.54645L15.3212 8.09185C15.2997 8.08355 15.2119 8.05572 15.1923 8.04156C15.1777 8.02398 15.1142 7.9566 15.1044 7.93511L13.4697 4.43751C13.3945 4.27638 13.2978 4.13477 13.1816 4.0127L13.1816 4.0127C13.0898 3.91797 12.9853 3.83496 12.8691 3.76416C12.7549 3.69531 12.6367 3.64209 12.5137 3.60498L12.5137 3.60498C12.3682 3.56104 12.2168 3.53906 12.0586 3.53906C11.8994 3.53906 11.7481 3.56104 11.6025 3.60498L11.6025 3.60498C11.4795 3.64209 11.3613 3.69531 11.2471 3.76416C11.1309 3.83496 11.0264 3.91797 10.9356 4.0127C10.8184 4.13477 10.7217 4.27589 10.6465 4.43751L9.01178 7.93511C8.99713 7.95269 8.94342 8.0274 8.92389 8.04156C8.90241 8.04986 8.81843 8.08892 8.79499 8.09185L4.94448 8.54645C4.76577 8.56744 4.59976 8.61481 4.44644 8.68854L4.44644 8.68854C4.32731 8.74616 4.215 8.81989 4.11149 8.90925C4.00993 8.99665 3.92204 9.09333 3.8488 9.19978C3.76091 9.32478 3.69353 9.46345 3.64373 9.61531C3.5949 9.76765 3.56951 9.92 3.56658 10.0723C3.56463 10.2017 3.57927 10.3316 3.61052 10.4615C3.64275 10.5948 3.6906 10.7198 3.75407 10.8365C3.83513 10.9859 3.94157 11.1217 4.07438 11.2433L6.90635 13.837C6.91807 13.8566 6.97374 13.9313 6.98155 13.9542C6.98155 13.9606 6.98252 13.9713 6.98448 13.9845L6.98448 13.986C6.98838 14.0226 6.99327 14.0763 6.98936 14.0939L6.2384 17.8488C6.20324 18.0241 6.19738 18.196 6.21985 18.3635C6.23645 18.4948 6.2716 18.6232 6.32434 18.7497C6.37512 18.8727 6.43957 18.986 6.51671 19.0891C6.60851 19.2106 6.71788 19.3181 6.84679 19.4118C6.97471 19.5061 7.11045 19.5778 7.254 19.6281C7.37607 19.6711 7.50302 19.698 7.63583 19.7097C7.77157 19.7209 7.90438 19.7155 8.03524 19.6926L8.03524 19.6926C8.20223 19.6628 8.36336 19.6047 8.52058 19.5183L11.9248 17.6369C11.9473 17.631 12.0342 17.6022 12.0586 17.6022C12.0801 17.6081 12.1709 17.6252 12.1914 17.6369L15.5117 19.4719C15.6718 19.5603 15.8368 19.6189 16.0068 19.6481L16.0077 19.6481C16.1396 19.6706 16.2743 19.675 16.412 19.6618C16.5468 19.6491 16.6747 19.6203 16.7968 19.5754C16.9423 19.5222 17.079 19.447 17.2079 19.3488C17.3368 19.2512 17.4462 19.1394 17.537 19.0139C17.6132 18.9079 17.6747 18.7917 17.7235 18.6662C17.7733 18.5368 17.8046 18.4055 17.8182 18.2722C17.8368 18.1008 17.8241 17.926 17.7821 17.7482L16.3495 11.7125C16.2665 11.3629 15.9267 11.1534 15.5771 11.2359C15.2275 11.3189 15.0175 11.6593 15.1005 12.0089L16.5331 18.0446C16.5468 18.1027 16.5458 18.155 16.5292 18.2023C16.5116 18.2492 16.4794 18.2907 16.4325 18.3268C16.3847 18.363 16.3359 18.383 16.286 18.3864C16.2362 18.3903 16.1855 18.3776 16.1327 18.3488L12.8115 16.5133C12.6943 16.4489 12.5732 16.4001 12.4473 16.3678L12.4473 16.3678C12.3223 16.3351 12.1924 16.319 12.0586 16.319C11.9238 16.319 11.794 16.3351 11.669 16.3678C11.543 16.4001 11.4219 16.4489 11.3047 16.5133L7.8995 18.3952C7.84872 18.4235 7.79794 18.4362 7.74911 18.4328C7.69931 18.4299 7.65146 18.4108 7.60458 18.3762C7.55673 18.342 7.52451 18.3015 7.50693 18.2556C7.48837 18.2097 7.48545 18.1579 7.49716 18.1003L8.24813 14.3453C8.27449 14.2116 8.28426 14.0792 8.27644 13.9474C8.26863 13.816 8.24324 13.6852 8.20125 13.5558C8.15926 13.4259 8.10262 13.3058 8.03036 13.1949C7.95907 13.0841 7.87313 12.983 7.77255 12.8907L4.94155 10.297C4.89761 10.2569 4.87026 10.213 4.85757 10.1651C4.84487 10.1173 4.8478 10.0655 4.86538 10.0094C4.88393 9.95369 4.91128 9.90975 4.94936 9.8785C4.98842 9.84676 5.03628 9.82771 5.09487 9.82088L8.94538 9.36628C9.07916 9.35066 9.20709 9.31892 9.32916 9.27155C9.45025 9.22419 9.56646 9.16071 9.67583 9.0821C9.7852 9.003 9.8809 8.91315 9.96391 8.81256C10.0479 8.71198 10.1172 8.60065 10.1748 8.47858L11.8086 4.98097C11.834 4.92824 11.8672 4.88869 11.9082 4.86183C11.9502 4.83546 12 4.82228 12.0586 4.82228C12.1162 4.82228 12.166 4.83546 12.208 4.86183C12.25 4.88869 12.2822 4.92824 12.3076 4.98097L13.9414 8.47858C13.999 8.60065 14.0693 8.71198 14.1523 8.81256C14.2353 8.91315 14.332 9.003 14.4414 9.0821C14.5507 9.16071 14.666 9.22419 14.7871 9.27155C14.9091 9.31892 15.0371 9.35066 15.1708 9.36628L19.0213 9.82088C19.0799 9.82771 19.1278 9.84676 19.1668 9.8785C19.2049 9.90975 19.2333 9.95369 19.2508 10.0094C19.2694 10.0655 19.2713 10.1173 19.2586 10.1651C19.2459 10.213 19.2186 10.2569 19.1747 10.297L18.3065 11.0924ZM9.31256 13.2311L7.93856 11.8561C7.68368 11.6017 7.68368 11.2027 7.93856 10.9483C8.19246 10.6944 8.59187 10.6944 8.84577 10.9483L10.2207 12.3233C10.4746 12.5777 10.4746 12.9772 10.2207 13.2311C9.96586 13.485 9.56743 13.485 9.31256 13.2311Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const T3={name:"events-icon-events",render:y3},b3={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function x3(s,e){return n.openBlock(),n.createElementBlock("svg",b3,[...e[0]||(e[0]=[n.createElementVNode("rect",{id:"高校 & 比赛",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),n.createElementVNode("path",{id:"矢量 578",d:"M3.05078 7.51904L11.6914 4.13965C11.8086 4.09424 11.9219 4.07178 12.0391 4.07178C12.1523 4.07178 12.2695 4.09473 12.3867 4.14062L20.9609 7.51953C21.0625 7.55957 21.1523 7.61328 21.2305 7.67969C21.2969 7.73779 21.3555 7.80566 21.4062 7.88379C21.5078 8.03857 21.5586 8.20898 21.5625 8.39502C21.5625 8.58057 21.5156 8.75195 21.418 8.9082C21.3125 9.07861 21.1641 9.20264 20.9766 9.28076L19.457 9.91309L19.457 12.2915C19.457 12.6558 19.168 12.9419 18.8047 12.9419C18.4414 12.9419 18.1562 12.6558 18.1562 12.292L18.1562 10.4531L16.0742 11.3188L16.0742 14.7134C16.2852 14.897 16.418 15.1675 16.418 15.4692C16.418 16.0215 15.9688 16.4692 15.418 16.4692C14.8672 16.4692 14.418 16.0215 14.418 15.4692C14.418 15.1626 14.5547 14.8887 14.7734 14.7051L14.7734 11.8589L12.4023 12.8442C12.2852 12.8926 12.1641 12.917 12.0391 12.917C11.9141 12.9175 11.793 12.8936 11.6758 12.8452L5.63281 10.354L5.61328 17.6836C5.61328 17.7285 5.62109 17.771 5.63281 17.8101C5.65234 17.854 5.67969 17.894 5.71484 17.9307C5.75 17.9658 5.78906 17.9917 5.83203 18.0088C5.87109 18.0259 5.91797 18.0342 5.96484 18.0342L17.7812 18.0342C17.832 18.0342 17.875 18.0254 17.918 18.0083C17.957 17.9912 17.9961 17.9658 18.0312 17.9316C18.0625 17.8975 18.0898 17.8599 18.1055 17.8184C18.125 17.7773 18.1328 17.7324 18.1328 17.6841L18.1328 14.1411C18.1328 13.7773 18.418 13.4912 18.7812 13.4912C19.1445 13.4912 19.4336 13.7773 19.4336 14.1411L19.4336 17.6841C19.4336 17.8032 19.418 17.9194 19.3945 18.0332C19.375 18.1333 19.3438 18.231 19.3008 18.3267C19.2188 18.5239 19.1016 18.6987 18.9492 18.8511C18.8711 18.9297 18.7852 18.9995 18.6953 19.0596C18.6094 19.1157 18.5195 19.1641 18.4258 19.2041C18.3281 19.2446 18.2305 19.2759 18.1328 19.2974L18.1328 19.2974C18.0156 19.3218 17.9023 19.334 17.7812 19.334L5.96484 19.334C5.84375 19.334 5.73047 19.3218 5.61719 19.2979C5.51562 19.2759 5.41797 19.2446 5.32031 19.2036C5.12109 19.1201 4.94922 19.002 4.79688 18.8501C4.64453 18.6978 4.52734 18.5225 4.44141 18.3252C4.35547 18.1196 4.3125 17.9048 4.3125 17.6797L4.33594 9.81836L3.03125 9.28174C2.84375 9.2041 2.69531 9.08008 2.58984 8.90967C2.54297 8.83496 2.50781 8.75684 2.48438 8.67578C2.45703 8.58643 2.44531 8.49268 2.44531 8.39502C2.44531 8.29736 2.46094 8.20361 2.48828 8.11475C2.51562 8.03369 2.55078 7.95654 2.59766 7.8833C2.65234 7.80469 2.71094 7.73682 2.77734 7.67871C2.85547 7.61182 2.94922 7.55859 3.05078 7.51904ZM18.5547 8.87891L15.457 10.1665L11.5 8.05322C11.1758 7.88184 10.7891 7.99951 10.6172 8.32031C10.4492 8.6416 10.5664 9.02832 10.8867 9.19971L13.9062 10.8115L12.0352 11.5884L5.23438 8.78271L4.33594 8.41211L12.0352 5.40039L19.6797 8.41211L18.5547 8.87891Z",fill:"rgb(255,254.745,254.745)","fill-rule":"evenodd"},null,-1)])])}const C3={name:"events-icon-competition",render:x3},E3={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function S3(s,e){return n.openBlock(),n.createElementBlock("svg",E3,[...e[0]||(e[0]=[n.createElementVNode("rect",{id:"版本发布计划",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),n.createElementVNode("path",{id:"矢量 579",d:"M8.94922 6.90332L8.94922 6.3335C8.94922 6.23779 8.95703 6.14404 8.97656 6.05225L8.97656 6.05225C8.99609 5.97119 9.01953 5.89209 9.05469 5.81396C9.08594 5.7373 9.125 5.66455 9.17188 5.59619C9.21875 5.52246 9.27734 5.4541 9.33984 5.39062C9.40234 5.32715 9.47266 5.271 9.54297 5.22217L9.54297 5.22217L9.54297 5.22217C9.61328 5.17676 9.6875 5.1377 9.76172 5.10498C9.83984 5.07227 9.91797 5.04688 10 5.02979L10 5.02979C10.0938 5.00977 10.1875 5 10.2812 5L18.668 5C18.7617 5 18.8555 5.00977 18.9492 5.02979L18.9492 5.02979C19.0273 5.04688 19.1094 5.07227 19.1875 5.10498C19.2617 5.1377 19.3359 5.17676 19.4023 5.22217C19.4766 5.271 19.5469 5.32715 19.6094 5.39062C19.6719 5.4541 19.7305 5.52246 19.7773 5.59619L19.7773 5.59619C19.8242 5.66455 19.8633 5.7373 19.8945 5.81396C19.9297 5.89209 19.9531 5.97119 19.9688 6.05225C19.9883 6.14404 20 6.23779 20 6.3335L20 12.2441C20 12.3398 19.9883 12.4336 19.9688 12.5249C19.9531 12.606 19.9297 12.6855 19.8945 12.7632C19.8633 12.8403 19.8242 12.9131 19.7773 12.9814C19.7305 13.0547 19.6719 13.123 19.6094 13.187C19.5469 13.2505 19.4766 13.3066 19.4023 13.3555C19.3359 13.4009 19.2617 13.4399 19.1875 13.4722C19.1094 13.5054 19.0273 13.5303 18.9492 13.5479C18.8555 13.5674 18.7617 13.5771 18.668 13.5771L18.3906 13.5771C18.0664 13.5771 17.8125 13.3232 17.8125 13C17.8125 12.6768 18.0664 12.4229 18.3906 12.4229L18.668 12.4229C18.6914 12.4229 18.7734 12.3789 18.793 12.3701C18.8086 12.353 18.8359 12.2651 18.8438 12.2441L18.8438 6.3335C18.8438 6.30859 18.8008 6.22803 18.793 6.20703C18.7773 6.18945 18.6875 6.16357 18.668 6.15479L10.2812 6.15479C10.2578 6.15479 10.1758 6.19824 10.1562 6.20703C10.1367 6.22461 10.1133 6.3125 10.1016 6.3335L10.1016 6.90332C10.1016 7.22656 9.84766 7.48047 9.52734 7.48047C9.20312 7.48047 8.94922 7.22656 8.94922 6.90332ZM6.47266 9.39307L6.47266 9.21973C6.47266 9.12402 6.48438 9.03027 6.50391 8.93896C6.51953 8.85791 6.54688 8.77832 6.57812 8.70068C6.61328 8.62354 6.65234 8.55127 6.69531 8.48242C6.74609 8.40918 6.80078 8.34082 6.86328 8.27734C6.92969 8.21338 6.99609 8.15723 7.07031 8.10889C7.13672 8.06299 7.21094 8.02441 7.28906 7.9917C7.36719 7.9585 7.44531 7.93359 7.52734 7.91602C7.61719 7.89648 7.71094 7.88672 7.80859 7.88672L16.1914 7.88672C16.2891 7.88672 16.3828 7.89648 16.4727 7.91602C16.5547 7.93359 16.6328 7.9585 16.7109 7.9917C16.7891 8.02441 16.8594 8.06299 16.9297 8.1084C17.0039 8.15723 17.0703 8.21338 17.1367 8.27734C17.1992 8.34082 17.2539 8.40918 17.3047 8.48242C17.3477 8.55127 17.3867 8.62354 17.4219 8.70068C17.4531 8.77832 17.4805 8.85791 17.4961 8.93896C17.5156 9.03027 17.5273 9.12402 17.5273 9.21973L17.5273 15.1304C17.5273 15.2266 17.5156 15.3198 17.4961 15.4116C17.4805 15.4927 17.4531 15.5718 17.4219 15.6499C17.3867 15.7266 17.3477 15.7993 17.3047 15.8682C17.2539 15.9414 17.1992 16.0098 17.1367 16.0732C17.0703 16.1367 17.0039 16.1929 16.9297 16.2417C16.8633 16.2871 16.7891 16.3262 16.7109 16.3589C16.6328 16.3916 16.5547 16.417 16.4727 16.4346C16.3828 16.4541 16.2891 16.4639 16.1914 16.4639L15.8789 16.4639C15.5547 16.4639 15.3008 16.21 15.3008 15.8867C15.3008 15.5635 15.5547 15.3091 15.8789 15.3091L16.1914 15.3091C16.2188 15.3091 16.2969 15.2656 16.3203 15.2568C16.3359 15.2393 16.3633 15.1519 16.3711 15.1304L16.3711 9.21973C16.3711 9.19531 16.3281 9.11475 16.3203 9.09375C16.3008 9.07617 16.2148 9.0498 16.1914 9.04102L7.80859 9.04102C7.78125 9.04102 7.70312 9.08496 7.67969 9.09375C7.66406 9.11084 7.63672 9.19873 7.62891 9.21973L7.62891 9.39307C7.62891 9.71631 7.375 9.97021 7.05078 9.97021C6.72656 9.97021 6.47266 9.71631 6.47266 9.39307ZM14 10.3901C13.9062 10.3706 13.8125 10.3608 13.7188 10.3608L5.33203 10.3608C5.23828 10.3608 5.14453 10.3706 5.05078 10.3901L5.05078 10.3901C4.97266 10.4077 4.89062 10.4331 4.8125 10.4658C4.73828 10.4985 4.66406 10.5376 4.59766 10.583L4.59766 10.583L4.59766 10.583C4.52344 10.6318 4.45312 10.688 4.39062 10.7515C4.32812 10.8149 4.26953 10.8833 4.22266 10.957C4.17578 11.0254 4.13672 11.0981 4.10547 11.1748C4.07031 11.2529 4.04688 11.332 4.03125 11.4131L4.03125 11.4131C4.01172 11.5049 4 11.5981 4 11.6943L4 17.605C4 17.7007 4.01172 17.7944 4.03125 17.8857C4.04688 17.9668 4.07031 18.0464 4.10547 18.124C4.13672 18.2012 4.17578 18.2739 4.22266 18.3423C4.26953 18.4155 4.32812 18.4839 4.39062 18.5479C4.45312 18.6113 4.52344 18.6675 4.59766 18.7163C4.66406 18.7617 4.73828 18.8008 4.8125 18.833C4.89062 18.8662 4.97266 18.8911 5.05078 18.9087L5.05078 18.9087C5.14453 18.9282 5.23828 18.938 5.33203 18.938L13.7188 18.938C13.8125 18.938 13.9062 18.9282 14 18.9087C14.082 18.8911 14.1602 18.8662 14.2383 18.833C14.3125 18.8008 14.3867 18.7617 14.457 18.7163C14.5273 18.6675 14.5977 18.6113 14.6602 18.5479C14.7227 18.4839 14.7812 18.4155 14.8281 18.3423C14.875 18.2739 14.9141 18.2012 14.9453 18.124C14.9805 18.0464 15.0039 17.9668 15.0234 17.8857C15.043 17.7944 15.0508 17.7007 15.0508 17.605L15.0508 11.6943C15.0508 11.5981 15.043 11.5049 15.0234 11.4131C15.0039 11.332 14.9805 11.2529 14.9453 11.1748C14.9141 11.0981 14.875 11.0254 14.8281 10.957C14.7812 10.8833 14.7227 10.8149 14.6602 10.7515C14.5977 10.688 14.5273 10.6318 14.457 10.583C14.3867 10.5376 14.3125 10.4985 14.2383 10.4658C14.1602 10.4331 14.082 10.4077 14 10.3901ZM5.33203 11.5156L13.7188 11.5156C13.7383 11.5244 13.8281 11.5503 13.8438 11.5679C13.8516 11.5889 13.8984 11.6694 13.8984 11.6943L13.8984 17.605C13.8867 17.626 13.8633 17.7139 13.8438 17.731C13.8242 17.7397 13.7422 17.7837 13.7188 17.7837L5.33203 17.7837C5.3125 17.7749 5.22266 17.7485 5.20703 17.731C5.19922 17.71 5.15625 17.6294 5.15625 17.605L5.15625 11.6943C5.16406 11.6733 5.19141 11.5854 5.20703 11.5679C5.22266 11.5503 5.3125 11.5244 5.33203 11.5156ZM11 12.7754C10.8086 12.5776 10.5 12.5742 10.3008 12.7676C10.1055 12.9614 10.1016 13.2695 10.293 13.4678L11 14.1875L8.36719 14.1875C8.08984 14.1875 7.87109 14.4053 7.87109 14.6826C7.87109 14.9595 8.08984 15.1772 8.36719 15.1772L10.9414 15.1772L10.2969 15.8286C10.1016 16.0254 10.1016 16.3335 10.3008 16.5283C10.4961 16.7236 10.8047 16.7222 11 16.5254L12.5039 15.0078C12.6172 14.8926 12.6758 14.7769 12.6758 14.6611C12.6758 14.5459 12.6172 14.4297 12.5039 14.3135L11 12.7754ZM7.39453 13.6792L7.39453 15.9336C7.39453 16.2109 7.17969 16.4287 6.90234 16.4287C6.625 16.4287 6.40625 16.2109 6.40625 15.9336L6.40625 13.6792C6.40625 13.4019 6.625 13.1841 6.90234 13.1841C7.17969 13.1841 7.39453 13.4019 7.39453 13.6792Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const k3={name:"events-icon-release",render:S3},w3={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},D3={events:T3,competition:C3,release:k3,summit:v3},Vs={上海:"https://infrastructure-website.osinfra.cn/picture/city/shanghai.jpg",北京:"https://infrastructure-website.osinfra.cn/picture/city/beijing.jpg",南京:"https://infrastructure-website.osinfra.cn/picture/city/nanjing.jpg",天津:"https://infrastructure-website.osinfra.cn/picture/city/tianjin.jpg",成都:"https://infrastructure-website.osinfra.cn/picture/city/chengdu.jpg",无锡:"https://infrastructure-website.osinfra.cn/picture/city/wuxi.jpg",杭州:"https://infrastructure-website.osinfra.cn/picture/city/hangzhou.jpg",深圳:["https://infrastructure-website.osinfra.cn/picture/city/shenzhen1.jpg","https://infrastructure-website.osinfra.cn/picture/city/shenzhen2.jpg"],苏州:"https://infrastructure-website.osinfra.cn/picture/city/suzhou.jpg",西安:"https://infrastructure-website.osinfra.cn/picture/city/xian.jpg",郑州:"https://infrastructure-website.osinfra.cn/picture/city/zhengzhou.jpg",武汉:"https://infrastructure-website.osinfra.cn/picture/city/wuhan.jpg"},A3="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",N3={class:"o-events-calendar"},I3={key:0,class:"month-list"},O3={class:"collapse-header"},B3={class:"collapse-title"},L3={key:0,class:"collapse-desc"},P3={key:0,class:"month-content month-content-span"},M3={key:0,class:"event-location"},R3={class:"event-name"},V3={key:1},F3={key:0,class:"month-content-row"},$3={class:"month-name"},U3={class:"event-name"},q3={class:"event-location"},j3={class:"event-name"},H3={class:"event-location"},z3={key:1,class:"month-content month-content-column"},G3={class:"event-location"},W3={class:"event-name"},Y3={key:1},Cc=n.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(s){const e=Bl(),{lePadV:i}=Et.useScreen(),r=s,a=["JAN","FEB","MAR","Apr","May","JUN","Jul","Aug","Sep","Oct","Nov","Dec"],o=n.ref([]);n.watch([()=>r.data,()=>i.value],()=>{var v;r.data.length?i.value?o.value=[(v=r.data[0])==null?void 0:v.name]:o.value=r.data.map(S=>S.name):o.value=[]},{immediate:!0});const l=v=>{const S=v.split("/");return parseInt(S[1],10)},u=v=>{const S=new Array(12).fill(0),C=[];return v.forEach((O,T)=>{const[w,R]=Array.isArray(O.date)?[l(O.date[0]),l(O.date[1])]:[l(O.date),l(O.date)];let L=0;for(let M=w-1;M<R;M++)L=Math.max(L,S[M]);const D=L+1;for(let M=w-1;M<R;M++)S[M]=D;C.push({event:O,row:D,eventIndex:T,start:w,end:R})}),C},d=v=>{const S=Array.from({length:12},()=>[]);return v.forEach(C=>{const O=Array.isArray(C.date)?l(C.date[0]):l(C.date);S[O-1].push(C)}),S},f=v=>{const S=v.color||w3[v.type];return S!=null&&S.startsWith("--")?`var(${S})`:S},g=v=>v.icon?v.icon:D3[v.type];return(v,S)=>(n.openBlock(),n.createElementBlock("div",N3,[n.unref(i)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",I3,[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(a,C=>n.createElementVNode("div",{class:"month-header",key:C},n.toDisplayString(C),1)),64))])),n.createVNode(n.unref(I.OCollapse),{modelValue:o.value,"onUpdate:modelValue":S[0]||(S[0]=C=>o.value=C)},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.data,(C,O)=>(n.openBlock(),n.createBlock(n.unref(I.OCollapseItem),{key:O,value:C.name},{title:n.withCtx(()=>[n.createElementVNode("div",O3,[n.createElementVNode("div",B3,[n.createElementVNode("div",{class:"title-icon",style:n.normalizeStyle({"--bg-color":f(C)})},[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(g(C))))]),_:2},1024)],4),n.createElementVNode("span",null,n.toDisplayString(C.name),1)]),C.desc?(n.openBlock(),n.createElementBlock("div",L3,[n.withDirectives(n.createElementVNode("div",null,null,512),[[n.unref(e),C.desc]])])):n.createCommentVNode("",!0)])]),default:n.withCtx(()=>[C.isSpanMonth?(n.openBlock(),n.createElementBlock("div",P3,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u(C.data),({event:T,row:w,eventIndex:R,start:L,end:D})=>(n.openBlock(),n.createElementBlock("div",{key:R,class:n.normalizeClass(["event-item",{"event-item-center":T.align==="center","has-link":T.link}]),style:n.normalizeStyle({gridColumn:`${L} / ${D+1}`,gridRow:w,"--bg-color":f(C)||void 0})},[T.location?(n.openBlock(),n.createElementBlock("div",M3,n.toDisplayString(T.location),1)):n.createCommentVNode("",!0),n.createElementVNode("div",R3,[T.link?(n.openBlock(),n.createBlock(n.unref(I.OLink),n.mergeProps({key:0,href:T.link,target:"_blank"},{ref_for:!0},T.linkProps||{}),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(T.name),1)]),_:2},1040,["href"])):(n.openBlock(),n.createElementBlock("span",V3,n.toDisplayString(T.name),1))])],6))),128))])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.unref(i)?(n.openBlock(),n.createElementBlock("div",F3,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d(C.data),(T,w)=>(n.openBlock(),n.createElementBlock("div",{key:w,class:n.normalizeClass(["month-row",{"empty-month":T.length===0}])},[n.createElementVNode("div",$3,n.toDisplayString(a[w]),1),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(T,(R,L)=>(n.openBlock(),n.createElementBlock("div",{key:L,class:n.normalizeClass(["event-item",R.link?"has-link":""]),style:n.normalizeStyle({"--bd-color":f(C)||void 0})},[R.link?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:0,href:R.link,target:"_blank"},{default:n.withCtx(()=>[n.createElementVNode("div",null,[n.createElementVNode("div",U3,[n.createElementVNode("span",null,n.toDisplayString(R.name),1)]),n.createElementVNode("div",q3,n.toDisplayString(R.location),1)]),n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1})]),_:2},1032,["href"])):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createElementVNode("div",j3,n.toDisplayString(R.name),1),n.createElementVNode("div",H3,n.toDisplayString(R.location),1)],64))],6))),128))],2))),128))])):(n.openBlock(),n.createElementBlock("div",z3,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d(C.data),(T,w)=>(n.openBlock(),n.createElementBlock("div",{key:w,class:"month-column"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(T,(R,L)=>(n.openBlock(),n.createElementBlock("div",{key:L,class:n.normalizeClass(["event-item",R.link?"has-link":""]),style:n.normalizeStyle({"--bg-color":f(C)||void 0})},[n.createElementVNode("div",G3,n.toDisplayString(R.location),1),n.createElementVNode("div",W3,[R.link?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:0,href:R.link,target:"_blank"},{suffix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(R.name),1)]),_:2},1032,["href"])):(n.openBlock(),n.createElementBlock("span",Y3,n.toDisplayString(R.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var Ji=(s=>(s.FINISH="finish",s.ING="ing",s.ALL="",s))(Ji||{});const Ec=(s,e)=>new Date(s).getTime()>new Date(e).getTime(),X3={class:"o-events-list"},K3={class:"filter-wrapper"},Q3={class:"filter-left"},Z3={class:"list-content"},J3={class:"event-name"},eT={class:"event-desc"},tT={class:"event-date"},iT={key:0,class:"event-location"},Sc=n.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(s,{emit:e}){const{t:i}=Ke.useI18n(),{lePadV:r}=Et.useScreen(),a=s,o=[{label:i("events.statusAll"),value:Ji.ALL},{label:i("events.statusIng"),value:Ji.ING},{label:i("events.statusFinish"),value:Ji.FINISH}],l=e,u=n.ref(Ji.ALL),d=n.ref(""),f=n.ref(""),g=(O={})=>{l("search",Object.assign({page:a.page,pageSize:a.pageSize,status:u.value,keyword:f.value},O))},v=()=>{g()},S=()=>{f.value=d.value,g()},C=n.computed(()=>a.data.map(O=>({...O,status:Ec(new Date,O.date)?Ji.FINISH:Ji.ING})).sort((O,T)=>Ec(O.date,T.date)?-1:1).map(O=>{var R,L,D;const T=(D=(L=(R=O.city)==null?void 0:R.replace("市",""))==null?void 0:L.replace("中国",""))==null?void 0:D.replaceAll(" ","");let w=null;return Array.isArray(Vs[T])?w=Vs[T][O.name.length%Vs[T].length]:w=Vs[T],w||(w=A3),{...O,cover:w}}));return(O,T)=>(n.openBlock(),n.createElementBlock("div",X3,[n.createElementVNode("div",K3,[n.createElementVNode("div",Q3,[n.createElementVNode("span",null,n.toDisplayString(n.unref(i)("events.status")),1),n.createVNode(n.unref(I.ORadioGroup),{modelValue:u.value,"onUpdate:modelValue":T[0]||(T[0]=w=>u.value=w),style:{"--radio-group-gap":"8px"},onChange:v},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(o,w=>n.createVNode(n.unref(I.ORadio),{key:w.value,value:w.value},{radio:n.withCtx(({checked:R})=>[n.createVNode(n.unref(I.OToggle),{checked:R},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(w.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),n.createVNode(n.unref(I.OInput),{modelValue:d.value,"onUpdate:modelValue":T[1]||(T[1]=w=>d.value=w),placeholder:n.unref(i)("events.searchPlaceholder"),onPressEnter:S,onClear:S,clearable:""},{prefix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),{class:"input-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconSearch))]),_:1})]),_:1},8,["modelValue","placeholder"])]),n.createElementVNode("div",Z3,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(C.value,w=>(n.openBlock(),n.createBlock(n.unref(I.OCard),{key:w.name,cover:w.cover,href:w.link},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OTag),{class:"event-status"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(w.status===n.unref(Ji).ING?n.unref(i)("events.statusIng"):n.unref(i)("events.statusFinish")),1)]),_:2},1024),n.createElementVNode("div",J3,n.toDisplayString(w.name),1),n.createElementVNode("div",eT,[n.createElementVNode("div",tT,n.toDisplayString(w.date),1),n.createVNode(n.unref(I.ODivider),{direction:"v"}),w.city?(n.openBlock(),n.createElementBlock("div",iT,n.toDisplayString(w.city),1)):n.createCommentVNode("",!0)])]),_:2},1032,["cover","href"]))),128))]),C.value.length?n.createCommentVNode("",!0):n.renderSlot(O.$slots,"empty",{key:0}),s.total>8?(n.openBlock(),n.createBlock(n.unref(I.OPagination),{key:1,page:s.page,simple:n.unref(r),"show-total":!0,pageSize:s.pageSize,total:s.total,onChange:g,pageSizes:[4,12,24,36,48]},null,8,["page","simple","pageSize","total"])):n.createCommentVNode("",!0)]))}}),nT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function rT(s,e){return n.openBlock(),n.createElementBlock("svg",nT,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"#1da9ff",d:"M20.4 5.95c0.27-0.27 0.71-0.27 0.99 0 0.24 0.25 0.27 0.63 0.070 0.91l-0.070 0.080-10.5 10.47c-0.53 0.53-1.36 0.56-1.93 0.1l-0.11-0.1-5.23-5.2c-0.28-0.28-0.28-0.72-0.010-0.99 0.25-0.25 0.63-0.28 0.91-0.080l0.080 0.070 5.24 5.21c0.010 0.010 0.030 0.010 0.040 0.010l0.030-0.010 10.49-10.47z"},null,-1)])])}const sT={name:"events-icon-checked",render:rT},aT={class:"o-events-apply"},oT={class:"events-apply-grid"},lT={class:"timeline-number"},uT={class:"number-circle"},cT={class:"step-title"},dT={class:"step-idx"},hT={class:"step-desc"},fT={key:0},pT={class:"desc-list-wrapper"},mT={key:0,class:"desc-list-title"},gT={class:"desc-list-content"},vT={class:"desc-list-item-title"},_T={class:"desc-list-item-desc"},kc=n.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(s){const{isDark:e}=Et.useTheme(),i=Bl();return(r,a)=>(n.openBlock(),n.createElementBlock("div",aT,[n.createElementVNode("div",oT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.steps,(o,l)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:l},[n.createElementVNode("div",lT,[n.createElementVNode("div",uT,n.toDisplayString(l+1),1)]),n.createElementVNode("div",{class:n.normalizeClass(["step-item",`step-${l+1} ${n.unref(e)?"is-dark":""}`]),style:{}},[n.createElementVNode("div",cT,[n.createElementVNode("div",dT,n.toDisplayString(l+1),1),n.createElementVNode("span",null,n.toDisplayString(o.title),1)]),n.createElementVNode("div",hT,[o.desc?n.withDirectives((n.openBlock(),n.createElementBlock("div",fT,null,512)),[[n.unref(i),o.desc]]):n.createCommentVNode("",!0),n.renderSlot(r.$slots,`step${l+1}`),n.createElementVNode("div",pT,[o.listTitle?(n.openBlock(),n.createElementBlock("div",mT,n.toDisplayString(o.listTitle),1)):n.createCommentVNode("",!0),n.createElementVNode("div",gT,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.list,(u,d)=>(n.openBlock(),n.createElementBlock("div",{class:"desc-list-item",key:d},[n.createElementVNode("div",vT,[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(sT))]),_:1}),n.createElementVNode("span",null,n.toDisplayString(u.title),1)]),n.createElementVNode("div",_T,n.toDisplayString(u.desc),1)]))),128))])])]),o.img?(n.openBlock(),n.createElementBlock("div",{key:0,class:"img-wrapper",style:n.normalizeStyle({backgroundImage:`url(${o.img})`})},null,4)):n.createCommentVNode("",!0),o.imgPhone?(n.openBlock(),n.createElementBlock("div",{key:1,class:"img-wrapper-phone",style:n.normalizeStyle({backgroundImage:`url(${o.imgPhone})`})},null,4)):n.createCommentVNode("",!0)],2)],64))),128))])]))}}),yT=Object.assign(Cc,{install(s){s.component("OEventsCalendar",Cc)}}),TT=Object.assign(Sc,{install(s){s.component("OEventsList",Sc)}}),bT=Object.assign(kc,{install(s){s.component("OEventsApply",kc)}}),xT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"32",viewBox:"0 0 30 32"};function CT(s,e){return n.openBlock(),n.createElementBlock("svg",xT,[...e[0]||(e[0]=[n.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M12.983 5.523c0.341 0 0.667 0.14 0.902 0.388l6.569 6.917c0.142 0.15 0.243 0.331 0.297 0.526 0.054 0.141 0.085 0.295 0.085 0.457 0 0.108-0.014 0.213-0.040 0.314l-0 13.942c0 1.964-1.592 3.556-3.556 3.556h-13.296c-1.964 0-3.556-1.592-3.556-3.556v-18.987c0-1.964 1.592-3.556 3.556-3.556zM11.528 8.011l-7.582 0.001c-0.589 0-1.067 0.478-1.067 1.067v18.987c0 0.589 0.478 1.067 1.067 1.067h13.296c0.589 0 1.067-0.478 1.067-1.067l-0.002-13.012-3.149 0.002c-1.935 0-3.515-1.547-3.555-3.482l-0.075-3.561zM9.777 24.987c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-4.432c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h4.432zM26.256 0.269c1.964 0 3.556 1.592 3.556 3.556v18.012c0 1.964-1.592 3.556-3.556 3.556h-2.586c-0.687 0-1.244-0.557-1.244-1.244s0.557-1.244 1.244-1.244h2.586c0.589 0 1.067-0.478 1.067-1.067v-18.012c0-0.589-0.478-1.067-1.067-1.067h-13.27c-0.496 0-0.912 0.338-1.032 0.796l-2.514 0.002c0.137-1.838 1.672-3.287 3.546-3.287h13.27zM12.112 21.432c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-6.743c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h6.743zM14.234 17.876c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-8.853c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h8.853zM14.052 9.7l0.039 1.821c0.012 0.58 0.486 1.045 1.066 1.045l1.617-0.002-2.722-2.864z"},null,-1)])])}const Sh={name:"meeting-icon-copy",render:CT},ET=["title"],ST={class:"text"},kT={key:0,class:"tag-wrapper"},wT={class:"start-time"},DT={class:"calendar-info"},kh=n.defineComponent({__name:"OMeetingCalendarList",props:{list:{default:()=>[]}},setup(s){const e=s,{t:i,locale:r}=Ke.useI18n(),a=n.ref([]),o=I.useMessage(),l=async S=>{await a.value[S].copyInfo(),o.success({content:i("common.copySuccess")})},u=n.ref([]),d={SIG_GROUP:`${i("meeting.sigs")}: `,NEW_DATE:i("meeting.latestMeeting"),EMPTY_TEXT:i("meeting.meetingEmptyText"),LEARN_MORE:i("common.seeMore"),JOIN_MEETING:i("meeting.joinMeeting"),SIGN:i("meeting.sign")},f=n.ref(),g=new ResizeObserver(S=>{for(let C of S){const{height:O}=C.contentRect;C.target.classList.remove("hidden-divider"),O>=30&&C.target.classList.add("hidden-divider")}});n.watch(()=>e.list,()=>{e.list.length===1?u.value=[e.list[0].id]:u.value=[],n.nextTick(()=>{var S;(S=f.value)==null||S.forEach(C=>{g.observe(C)})})});const v=n.computed(()=>e.list.map(S=>{var A;const C=S.type;let O="";if(["events","summit"].includes(C))return O=`${Mt(S.start_date,"YYYY/MM/DD HH:mm")} ${Mt(S.end_date,"YYYY/MM/DD HH:mm")}`,{...S,dateRange:O};const{is_cycle:T,date:w,start:R,end:L,cycle_start_date:D,cycle_end_date:M,cycle_start:U,cycle_end:Y,cycle_type:P,cycle_interval:J,cycle_point:b}=S;O=`${Mt(w)} ${R} - ${L}`,T&&(O=`${Mt(D)} - ${Mt(M)}`);let x=`${R} - ${L}`,q=null,H=!1;const k=((A=S.obs_data)==null?void 0:A.filter($=>$.text_video_url))||[];if(T){let $="";P===gn&&($=i("meeting.cycleDay")),P===vn&&(J>1?$=i("meeting.cycleWeek.other",[Qn(P,b),J]):$=i("meeting.cycleWeek.one",[Qn(P,b)])),P===nn&&($=i("meeting.cycleMonth",[Qn(P,b)])),x=i("meeting.cycleMeetingText2",{startDate:D,endDate:M,startTime:U,endTime:Y,cycleType:$}),H=k.some(K=>{var j;return K.sub_id===((j=S.cycle_sub.find(F=>F.date===w))==null?void 0:j.sub_id)})}else H=k.length>0;return H&&(q=`${location.origin}/${r.value}/video/${S.group_name}/${S.mid}/${w}`),{...S,dateRange:O,timeRange:x,replay_url:q}}));return(S,C)=>{var O,T;return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["o-meeting-calendar-list",(O=v.value)!=null&&O.length?"":"is-empty"])},[(T=v.value)!=null&&T.length?(n.openBlock(),n.createBlock(n.unref(I.OCollapse),{key:1,modelValue:u.value,"onUpdate:modelValue":C[0]||(C[0]=w=>u.value=w),style:{"--collapse-padding":"0"}},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(v.value,(w,R)=>(n.openBlock(),n.createBlock(n.unref(I.OCollapseItem),{key:w.id,value:w.id},{title:n.withCtx(()=>[n.createElementVNode("div",{class:"meet-title",title:w.topic||w.name},[n.createVNode(n.unref(I.OIcon),{style:n.normalizeStyle({backgroundColor:`${n.unref(si)(w.type,"color")}`})},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(si)(w.type,"icon"))))]),_:2},1032,["style"]),n.createElementVNode("div",ST,n.toDisplayString(w.topic||w.name),1),w.is_cycle?(n.openBlock(),n.createElementBlock("div",kT,[n.createVNode(n.unref(I.OTag),{color:"primary",variant:"outline"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("meeting.cycle")),1)]),_:1})])):n.createCommentVNode("",!0)],8,ET),n.createElementVNode("div",{class:"meet-info",ref_for:!0,ref_key:"meetInfoRef",ref:f},[n.createElementVNode("span",wT,[n.createElementVNode("span",null,n.toDisplayString(w.dateRange),1)]),n.createVNode(n.unref(I.ODivider),{direction:"v"}),n.createElementVNode("div",null,[w.group_name?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(d.SIG_GROUP)+" "+n.toDisplayString(w.group_name),1)],64)):n.createCommentVNode("",!0),w.activity_type?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[n.createTextVNode(n.toDisplayString(w.activity_type),1)],64)):n.createCommentVNode("",!0)])],512),w.url?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:0,href:w.url,target:"_blank",class:"jump-detail-link"},{suffix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Ws))]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(d.LEARN_MORE),1)]),_:1},8,["href"])):n.createCommentVNode("",!0),w.join_url?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:1,href:w.join_url,target:"_blank",class:"jump-detail-link"},{suffix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Ws))]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(d.JOIN_MEETING),1)]),_:1},8,["href"])):n.createCommentVNode("",!0),w.signUrl?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:2,href:w.signUrl,target:"_blank",class:"jump-detail-link"},{suffix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Ws))]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(d.SIGN),1)]),_:1},8,["href"])):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OIcon),{onClick:n.withModifiers(()=>l(R),["stop"]),class:"copy-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(Sh))]),_:1},8,["onClick"])]),default:n.withCtx(()=>[n.createElementVNode("div",DT,[n.createVNode(Ol,{show:u.value.includes(w.id),data:w,ref_for:!0,ref:L=>a.value[R]=L,from:"home"},null,8,["show","data"])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):n.renderSlot(S.$slots,"empty",{key:0})],2)}}}),AT={class:"o-meeting-calendar"},NT={class:"calendar-header"},IT={class:"calendar-body"},OT={class:"calender-header-left"},BT={class:"left-title"},LT={class:"month-date"},PT={class:"right-title"},MT=["onClick"],RT={class:"day-box"},VT={class:"icon-box"},FT={class:"detail-list"},$T={class:"current-day"},UT={class:"right-title"},qT={class:"title-list"},jT="2021-01-01",wc=n.defineComponent({__name:"OMeetingCalendar",props:{getDateListRequest:{},getMeetingListRequest:{},getSummitListRequest:{default:async()=>[]},getEventsListRequest:{default:async()=>[]},hiddenEvents:{type:Boolean,default:!1},hiddenSummit:{type:Boolean,default:!1},createDesc:{}},emits:["create"],setup(s,{emit:e}){n.useCssVars(G=>({v3b57d20e:T.value}));const i=s,{t:r,locale:a}=Ke.useI18n(),o=n.computed(()=>a.value===Ke.Locales.EN);n.computed(()=>a.value===Ke.Locales.ZH);const l=n.ref(""),u=n.ref([]),d=n.ref([]),f=n.ref([]),g=n.ref([]),v=n.ref([]),S=n.ref(ia[0].value),C=n.computed(()=>{let G=ia;return i.hiddenEvents&&(G=G.filter(Z=>Z.value!==et.EVENTS)),i.hiddenSummit&&(G=G.filter(Z=>Z.value!==et.SUMMIT)),G.filter(Z=>Z.value!==et.ALL).length===1?[]:G});n.watch(()=>C.value,()=>{var G;S.value=((G=C.value[0])==null?void 0:G.value)??et.MEETING});const O=n.ref(),T=n.ref("407px"),w=n.ref(!1),R=n.ref(""),L=n.ref(""),D=n.ref([]),M=async G=>{i.getSummitListRequest?d.value=await i.getSummitListRequest(G):d.value=[]},U=async G=>{i.getEventsListRequest?f.value=await i.getEventsListRequest(G):f.value=[]},Y=async G=>{i.getDateListRequest?u.value=await i.getDateListRequest(G):u.value=[]},P=async G=>{if(i.getMeetingListRequest&&G.date)try{const Z=await i.getMeetingListRequest(G.date,L.value);v.value=Z.map(ee=>({...ee,time:`${ee.start}-${ee.end}`,type:"meeting",date:ee.date||G.date})).sort((ee,se)=>{var de,fe;return parseInt((de=ee.start||ee.cycle_start)==null?void 0:de.replace(":",""))-parseInt(se.end||((fe=se.cycle_end)==null?void 0:fe.replace(":","")))}),D.value=[...new Set(v.value.map(ee=>ee.group_name))].map(ee=>({group_name:ee})),D.value.find(ee=>ee.group_name===L.value)||(L.value="")}catch{v.value=[]}},J=n.computed(()=>[...v.value.filter(G=>!L.value||G.group_name===L.value),...f.value.filter(G=>G.dates.includes(R.value)),...d.value.filter(G=>G.dates.includes(R.value))].filter(G=>S.value==="all"?!0:G.type===S.value)),b=async G=>{const Z=xe(G).format("YYYY-MM-DD");if(M(Z),U(Z),Y(Z),g.value=[...new Set([...u.value,...d.value.map(ee=>ee.dates),...f.value.map(ee=>ee.dates)])].flat().sort((ee,se)=>xe(ee).isAfter(xe(se))?1:-1),!G)if(!g.value.length)l.value=Mt(new Date);else{let ee=[...g.value].reverse().find(se=>xe().isAfter(xe(se)));ee||(ee=g.value.find(se=>xe(se).isAfter(xe()))),l.value=Mt(ee)}P({date:Z,type:S.value}),R.value=Z};n.watch([()=>S.value,()=>C.value],()=>{x()});function x(){n.nextTick(()=>{P({date:R.value,type:S.value})})}function q(G,Z){if(new Date(G).getTime()/1e3<1610380800){Z==null||Z.stopPropagation();return}b(G)}const H=(G,Z)=>{if(Mt(Z)===Mt(jT)&&G==="prev-month"){w.value=!0;return}w.value=!1,O.value.selectDate(G),q(O.value.selectedDay)},k=G=>G.replace(/^0+(?=\d)/,""),A=G=>{new MutationObserver(function(){T.value=`${G.offsetHeight-2}px`}).observe(G,{childList:!0,subtree:!0,characterData:!0})};n.onMounted(()=>{const G=document.querySelector(".calendar-body .el-calendar__body");G&&(A(G),T.value=`${G.offsetHeight-2}px`),b()});const $=n.watch(()=>g.value.length,()=>{I.isClient&&n.nextTick(()=>{const G=document.querySelector(".is-today .out-box");G&&(G.click(),$())})}),K=G=>o.value?G.split(" ").reverse().join(" "):G,j=e,F=()=>{j("create")};return(G,Z)=>(n.openBlock(),n.createElementBlock("div",AT,[n.createElementVNode("div",NT,[n.createElementVNode("span",null,n.toDisplayString(s.createDesc||""),1),n.createVNode(n.unref(I.OButton),{color:"primary",variant:"solid",round:"pill",onClick:F},{default:n.withCtx(()=>[...Z[3]||(Z[3]=[n.createTextVNode("预定会议",-1)])]),_:1})]),n.createElementVNode("div",IT,[n.createVNode(n.unref(it.ElCalendar),{ref_key:"calendar",ref:O,class:"calender"},{header:n.withCtx(({date:ee})=>[n.createElementVNode("div",OT,[n.createElementVNode("div",BT,[n.createVNode(n.unref(I.OIcon),{onClick:se=>H("prev-month",ee)},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronLeft),{class:n.normalizeClass({disable:w.value})},null,8,["class"])]),_:1},8,["onClick"]),n.createElementVNode("span",LT,n.toDisplayString(K(ee)),1),n.createVNode(n.unref(I.OIcon),{onClick:se=>H("next-month",ee)},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1},8,["onClick"])]),n.createVNode(n.unref(I.OSelect),{modelValue:L.value,"onUpdate:modelValue":Z[0]||(Z[0]=se=>L.value=se),placeholder:n.unref(r)("meeting.allSigs"),clearable:""},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(D.value,se=>(n.openBlock(),n.createBlock(n.unref(I.OOption),{value:se.group_name,key:se.group_name},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(se.group_name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])]),n.createElementVNode("div",PT,[n.createTextVNode(n.toDisplayString(n.unref(r)("meeting.latestMeeting"))+"  ",1),n.createElementVNode("span",null,n.toDisplayString(n.unref(xe)(l.value).format("YYYY/MM/DD")),1)])]),"date-cell":n.withCtx(({data:ee})=>[n.createElementVNode("div",{class:n.normalizeClass(["out-box",{"has-calender":g.value.includes(ee.day)}]),onClick:se=>q(ee.day,se)},[n.createElementVNode("div",RT,[n.createElementVNode("p",{class:n.normalizeClass([ee.isSelected?"is-selected":"","date-calender"])},n.toDisplayString(k(ee.day.split("-").at(-1)||"")),3),n.createElementVNode("div",VT,[(S.value===n.unref(et).ALL||S.value===n.unref(et).MEETING)&&u.value.includes(ee.day)?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0,class:"meeting",style:n.normalizeStyle({zIndex:n.unref(si)(n.unref(et).MEETING,"zIndex"),backgroundColor:n.unref(si)(n.unref(et).MEETING,"color")})},{default:n.withCtx(()=>[n.createVNode(n.unref(Il))]),_:1},8,["style"])):n.createCommentVNode("",!0),(S.value===n.unref(et).ALL||S.value===n.unref(et).EVENTS)&&f.value.some(se=>se.dates.includes(ee.day))?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:1,class:"events",style:n.normalizeStyle({zIndex:n.unref(si)(n.unref(et).EVENTS,"zIndex"),backgroundColor:n.unref(si)(n.unref(et).EVENTS,"color")})},{default:n.withCtx(()=>[n.createVNode(n.unref(Nl))]),_:1},8,["style"])):n.createCommentVNode("",!0),(S.value===n.unref(et).ALL||S.value===n.unref(et).SUMMIT)&&d.value.some(se=>se.dates.includes(ee.day))?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:2,class:"summit",style:n.normalizeStyle({zIndex:n.unref(si)(n.unref(et).SUMMIT,"zIndex"),backgroundColor:n.unref(si)(n.unref(et).SUMMIT,"color")})},{default:n.withCtx(()=>[n.createVNode(n.unref(Th))]),_:1},8,["style"])):n.createCommentVNode("",!0)])])],10,MT)]),_:1},512),n.createElementVNode("div",FT,[n.createElementVNode("div",$T,[n.createTextVNode(n.toDisplayString(n.unref(r)("meeting.latestMeeting"))+"  ",1),n.createElementVNode("span",null,n.toDisplayString(n.unref(xe)(R.value).format("YYYY/MM/DD")),1)]),n.createElementVNode("div",UT,[n.createElementVNode("div",qT,[n.createVNode(n.unref(I.OSelect),{modelValue:L.value,"onUpdate:modelValue":Z[1]||(Z[1]=ee=>L.value=ee),placeholder:n.unref(r)("meeting.allSigs"),clearable:""},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(D.value,ee=>(n.openBlock(),n.createBlock(n.unref(I.OOption),{value:ee.group_name,key:ee.group_name},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(ee.group_name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"]),n.createVNode(n.unref(I.OTab),{modelValue:S.value,"onUpdate:modelValue":Z[2]||(Z[2]=ee=>S.value=ee),line:!1},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(C.value,ee=>(n.openBlock(),n.createBlock(n.unref(I.OTabPane),{key:ee.value,value:ee.value},{nav:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(ee.icon)))]),_:2},1024),n.createTextVNode(" "+n.toDisplayString(ee.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),n.createElementVNode("div",null,[n.createVNode(n.unref(I.OScroller),{class:"meeting-list","show-type":"hover",size:"small"},{default:n.withCtx(()=>[n.createVNode(kh,{list:J.value},{empty:n.withCtx(()=>[n.renderSlot(G.$slots,"empty")]),_:3},8,["list"])]),_:3})])])])]))}}),HT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function zT(s,e){return n.openBlock(),n.createElementBlock("svg",HT,[...e[0]||(e[0]=[n.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M16 0.371c1.623 0 3.214 0.248 4.731 0.729 0.59 0.187 0.916 0.817 0.729 1.406s-0.817 0.916-1.406 0.729c-1.299-0.412-2.662-0.624-4.054-0.624-7.394 0-13.389 5.994-13.389 13.389s5.994 13.389 13.389 13.389c7.394 0 13.389-5.994 13.389-13.389 0-4.287-2.027-8.235-5.402-10.747-0.496-0.369-0.599-1.071-0.23-1.567s1.071-0.599 1.567-0.23c3.937 2.931 6.305 7.541 6.305 12.544 0 8.632-6.997 15.629-15.629 15.629s-15.629-6.997-15.629-15.629c0-8.632 6.997-15.629 15.629-15.629zM16 22.816c1.002 0 1.814 0.812 1.814 1.814s-0.812 1.814-1.814 1.814c-1.002 0-1.814-0.812-1.814-1.814s0.812-1.814 1.814-1.814zM16.349 6.831c3.423 0 6.198 2.775 6.198 6.198 0 3.086-2.268 5.689-5.196 6.114-0.085 0.020-0.255 0.278-0.302 0.479 0 0-0.004 0.031-0.012 0.094v1.317c0 0.619-0.501 1.12-1.12 1.12-0.567 0-1.036-0.421-1.11-0.968 0 0-0.003-0.051-0.010-0.152v-1.317c0-1.154 0.814-2.461 2.133-2.77 1.929-0.283 3.378-1.946 3.378-3.916 0-2.186-1.772-3.958-3.958-3.958s-3.958 1.772-3.958 3.958c0 0.619-0.501 1.12-1.12 1.12s-1.12-0.501-1.12-1.12c0-3.423 2.775-6.198 6.198-6.198z"},null,-1)])])}const Dc={name:"meeting-icon-help",render:zT},GT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function WT(s,e){return n.openBlock(),n.createElementBlock("svg",GT,[...e[0]||(e[0]=[n.createElementVNode("path",{opacity:"0.6",fill:"#000",d:"M16.050 0.559c2.61 0 5.13 0.646 7.377 1.862 0.544 0.294 0.746 0.974 0.452 1.518s-0.974 0.746-1.518 0.452c-1.922-1.040-4.075-1.592-6.31-1.592-7.334 0-13.28 5.946-13.28 13.28s5.946 13.28 13.28 13.28c7.334 0 13.28-5.946 13.28-13.28 0-3.3-1.207-6.409-3.355-8.824-0.411-0.462-0.37-1.17 0.092-1.581s1.17-0.37 1.581 0.092c2.51 2.821 3.922 6.459 3.922 10.313 0 8.571-6.949 15.52-15.52 15.52s-15.52-6.949-15.52-15.52c0-8.571 6.949-15.52 15.52-15.52zM16.024 11.822c0.567 0.002 1.034 0.425 1.106 0.972l0.010 0.152-0.040 10.822c-0.002 0.619-0.506 1.118-1.124 1.116-0.567-0.002-1.034-0.425-1.106-0.972l-0.010-0.152 0.040-10.822c0.002-0.619 0.506-1.118 1.124-1.116zM16 7.232c1.001 0 1.813 0.812 1.813 1.813s-0.812 1.813-1.813 1.813c-1.001 0-1.813-0.812-1.813-1.813s0.812-1.813 1.813-1.813z"},null,-1)])])}const Ac={name:"meeting-icon-tip",render:WT},YT=n.defineComponent({__name:"OMeetingCalendarSelector",props:{modelValue:{default:()=>[]},multiple:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(s,{emit:e}){const{t:i}=Ke.useI18n(),r=s,a=e,o=()=>{let T=[];for(let w=1;w<=31;w++)T.push(w);return T},l=n.computed(()=>o()),u=n.ref([]),d=n.ref([]),f=n.ref(null),g=()=>{u.value=[...r.modelValue],d.value=[...r.modelValue]};n.watchEffect(()=>{g()});const v=()=>{a("update:modelValue",d.value),f.value.expanded=!1},S=()=>{g(),f.value.expanded=!1},C=T=>{if(r.multiple){const w=d.value.indexOf(T);w===-1?d.value.push(T):d.value.splice(w,1),d.value.sort()}else d.value=[T],v()},O=T=>{r.multiple?C(T):d.value=[],v()};return(T,w)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["calendar-selector",!s.multiple&&"is-single"])},[n.createVNode(n.unref(it.ElSelect),{ref_key:"selectorRef",ref:f,"popper-class":"calendar-selector-popper",placeholder:n.unref(i)("meeting.selectRepeatDate"),size:"large",multiple:"",collapseTags:"",maxCollapseTags:"3",modelValue:u.value,onRemoveTag:O},n.createSlots({default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.value,R=>(n.openBlock(),n.createBlock(n.unref(it.ElOption),{key:R,label:R,value:R,onClick:L=>C(R),class:n.normalizeClass(d.value.includes(R)&&"is-checked")},null,8,["label","value","onClick","class"]))),128))]),_:2},[s.multiple?{name:"footer",fn:n.withCtx(()=>[n.createVNode(n.unref(I.OButton),{round:"pill",color:"primary",variant:"outline",onClick:v},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("common.confirm")),1)]),_:1}),n.createVNode(n.unref(I.OButton),{variant:"text",onClick:S},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("common.cancel")),1)]),_:1})]),key:"0"}:void 0]),1032,["placeholder","modelValue"])],2))}}),XT=Ke._export_sfc(YT,[["__scopeId","data-v-7b619c59"]]),KT={class:"o-meeting-form"},QT={class:"label-wrapper"},ZT={class:"o-meeting-form-popover-content etherpad"},JT={class:"repeat-config-wrapper"},eb={class:"repeat-config"},tb={class:"repeat-config-item"},ib={class:"time-select-wrapper"},nb={key:1},rb={key:1,class:"switch-wrapper"},sb={class:"switch-text"},ab={key:1,class:"switch-wrapper"},ob={class:"switch-text"},lb={class:"label-wrapper"},ub={class:"o-meeting-form-popover-content"},cb=["href"],db={key:0,class:"form-btns"},Nc=n.defineComponent({__name:"OMeetingForm",props:{data:{},isSub:{type:Boolean,default:!1},isEdit:{type:Boolean,default:!1},subId:{},createMeetingRequest:{},editMeetingRequest:{},editSubMeetingRequest:{},getPlatformsRequest:{},getGroupsRequest:{},showBtns:{type:Boolean,default:!0}},emits:["confirm","cancel"],setup(s,{expose:e,emit:i}){const{t:r,locale:a}=Ke.useI18n(),o=s,l=I.useMessage(),u=n.ref(Q_),d=n.ref(Xs),f=n.computed(()=>xh(v.value.cycle_type,u.value,"max")),g={is_record:!1,agenda:"",email_list:"",platform:"",topic:"",group_name:"",etherpad:"",date:"",date_range:[],start:"",end:"",time:"",is_cycle:!1,cycle_interval:1,cycle_type:gn,cycle_point:[]},v=n.ref(Object.assign({},g)),S=n.ref(null),C=n.ref(!1),O=n.ref({topic:[{required:!0,message:r("meeting.enterMeetingName")},{validator:H=>{if(H.length>128)return{type:"danger",message:r("meeting.meetingNameTooLong")}}}],agenda:[{validator:H=>{if(H.length>4096)return{type:"danger",message:r("meeting.meetingAgendaTooLong")}}}],group_name:[{required:!0,message:r("meeting.selectSig")}],etherpad:[{required:!0,message:r("meeting.enterEtherpad")}],date:[{required:!0,message:r("meeting.selectDate")}],time:[{validator:H=>{var Z;const{is_cycle:k,cycle_type:A,cycle_interval:$,cycle_point:K,date:j,date_range:F}=v.value;if(k){const ee={type:"danger",message:r("meeting.finishMeetingConfig")};if(A===gn&&!$||A===vn&&(!$||!(K!=null&&K.length))||A===nn&&(!$||!(K!=null&&K.length)))return ee;if(!(F!=null&&F.length))return{type:"danger",message:r("meeting.selectMeetingDate")};const se=r("meeting.invalidMeetingDuration");let de=F[0];const fe=F[1];if(A===vn){const pe=new Set;for(;!xe(de).isAfter(xe(fe));)pe.add(xe(de).day()),de=xe(de).add(1,"day");if(K.every(je=>!pe.has(je)))return{type:"danger",message:se}}if(A===nn){const pe=new Set;for(;!xe(de).isAfter(xe(fe));)pe.add(xe(de).date()),de=xe(de).add(1,"day");if(K.every(je=>!pe.has(je)))return{type:"danger",message:se}}}else if(!j)return{type:"danger",message:r("meeting.selectMeetingDate")};if(!((Z=H==null?void 0:H.trim())!=null&&Z.length))return{type:"danger",message:r("meeting.selectMeetingTime")};const G=H.split("-").map(ee=>ee.split(":").map(Number));if(G[0][0]>G[1][0]||G[0][0]===G[1][0]&&G[0][1]>=G[1][1])return{type:"danger",message:r("meeting.endTimeAfterStartTime")};if(!v.value.is_cycle&&v.value.date&&v.value.start){const ee=xe(`${v.value.date} ${v.value.start}`);if(new Date(ee).getTime()<new Date().getTime())return{type:"danger",message:r("meeting.startTimeBeforeEndTime")}}},triggers:["blur","change"]}],platform:[{required:!0,message:r("meeting.selectPlatform")}],email_list:[{validator:H=>{if(o.isEdit)return{};const k=H.replaceAll(" ","")||"";if(k.length){if(k.length>1020)return{type:"danger",message:r("meeting.emailTooLong")};const A=k.split(";")||[];if(A.some($=>!J_.test($)))return{type:"danger",message:r("meeting.emailInvalid")};if(A.some($=>$.length>50))return{type:"danger",message:r("meeting.singleEmailTooLong")};if(A.length>20)return{type:"danger",message:r("meeting.emailCountTooLong")}}},triggers:["blur","change"]}]}),T=n.ref([]),w=async()=>{if(!o.getGroupsRequest)return;const H=await o.getGroupsRequest();T.value=H.map(k=>({label:k.group_name,value:k.group_name,...k})),o.data&&b(v.value.group_name)},R=n.ref([]),L=async()=>{if(!o.getPlatformsRequest)return;const H=await o.getPlatformsRequest();R.value=H.map(k=>({label:k,value:k})),o.data||(v.value.platform=R.value[0].value)},D=i;n.watch(()=>o.data,H=>{var k;if(H){const A=((k=H==null?void 0:H.cycle_sub)==null?void 0:k.find(Z=>Z.sub_id===o.subId))||{},{mid:$,date:K,start:j,end:F,sub_id:G}=A;Object.assign(v.value,H,o.isSub?{is_cycle:!1,mid:$,date:K,start:j,end:F,sub_id:G}:{})}else{const A=xe().format("YYYY-MM-DD"),$=xe().format("HH:mm");let K="",j="";const F=Bn($);if(F<=Bn("08:00"))K="08:00",j="09:00";else if(Bn("22:15")<=F)K="08:00",j="09:00";else{let[Z,ee]=$.split(":").map(Number);ee>=45?(Z++,ee=0):ee=(Math.floor(ee/15)+1)*15,K=pc(Z*60+ee).slice(3),j=pc(Z*60+ee+60).slice(3)}const G=[xe().format("YYYY-MM-DD"),xe().add(1,"month").format("YYYY-MM-DD")];Object.assign(v.value,{date:A,start:K,end:j,time:`${K}-${j}`,date_range:G})}},{immediate:!0,deep:!0});const M=()=>{v.value=Object.assign({},g),S.value.clearValidate(),S.value.resetFields(),D("cancel")},U=()=>{v.value.cycle_point=[],v.value.cycle_interval=1},Y=()=>{v.value.platform="WELINK"},{lePadV:P}=Et.useScreen(),J=async()=>{let H=o.isEdit?r("meeting.editSuccess"):r("meeting.booSuccess");try{if(C.value=!0,(await S.value.validate()).some(Ue=>!!Ue))return;const{topic:A,etherpad:$,group_name:K,platform:j,date:F,start:G,end:Z,agenda:ee,is_record:se,is_cycle:de,date_range:fe,cycle_type:pe,cycle_interval:je,cycle_point:Be}=v.value;let Le={topic:A,etherpad:$,agenda:ee,is_record:se,group_name:K,platform:j,is_cycle:de};if(de?(Le={...Le,cycle_interval:je,cycle_type:pe,cycle_start_date:(fe==null?void 0:fe[0])||"",cycle_end_date:(fe==null?void 0:fe[1])||"",cycle_start:G,cycle_end:Z},pe!==gn&&(Le={...Le,cycle_point:Be.join(",")})):Le={...Le,date:(F==null?void 0:F.split(" ")[0])||"",start:G,end:Z},o.isEdit)if(o.isSub){const{mid:Ue,sub_id:De}=v.value,{date:ye,start:Ne,end:$e}=Le;await(o==null?void 0:o.editSubMeetingRequest(De,{mid:Ue,date:ye,start:Ne,end:$e,is_notify:!0}))}else{const{email_list:Ue,platform:De,group_name:ye,etherpad:Ne,...$e}=Le;await(o==null?void 0:o.editMeetingRequest(o.data.id,{...$e,is_notify:!0}))}else await(o==null?void 0:o.creatMeetingRequest({...Le,email_list:v.value.email_list.replaceAll(" ","")}));const Qe=r("meeting.meetingHandleSuccess",[v.value.topic,H]);l.success({content:Qe}),D("confirm")}finally{C.value=!1}};n.onMounted(()=>{w(),L()});const b=H=>{const k=T.value.find(A=>A.value===H);o.isEdit||(v.value.etherpad=(k==null?void 0:k.etherpad)||"",v.value.email_list=(k==null?void 0:k.email_list)||"")},x=H=>H.getTime()<Date.now()-1440*60*1e3,q=()=>{v.value.start&&v.value.end?v.value.time=`${v.value.start}-${v.value.end}`:v.value.time=""};return e({confirm:J}),(H,k)=>(n.openBlock(),n.createElementBlock("div",KT,[n.createVNode(n.unref(I.OForm),{model:v.value,ref_key:"formRef",ref:S,"has-required":"",layout:n.unref(P)?"v":"h",class:"form-wrapper"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OFormItem),{rules:O.value.topic,label:n.unref(r)("meeting.meetingName"),field:"topic"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OInput),{disabled:s.isSub,size:"large",placeholder:n.unref(r)("meeting.enterMeetingName"),style:{width:"100%"},modelValue:v.value.topic,"onUpdate:modelValue":k[0]||(k[0]=A=>v.value.topic=A)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),n.createVNode(n.unref(I.OFormItem),{rules:O.value.group_name,label:n.unref(r)("meeting.meetingSig"),field:"group_name"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OSelect),{disabled:s.isEdit,placeholder:n.unref(r)("meeting.selectSig"),size:"large",style:{width:"100%"},modelValue:v.value.group_name,"onUpdate:modelValue":k[1]||(k[1]=A=>v.value.group_name=A),onChange:b},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(T.value,A=>(n.openBlock(),n.createBlock(n.unref(I.OOption),{key:A.value,value:A.value},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(A.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),v.value.group_name?(n.openBlock(),n.createBlock(n.unref(I.OFormItem),{key:0,rules:O.value.etherpad,label:"Etherpad",field:"etherpad"},{label:n.withCtx(()=>[n.createElementVNode("div",QT,[k[17]||(k[17]=n.createElementVNode("span",null,"Etherpad ",-1)),n.createVNode(n.unref(I.OPopover),null,{target:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Dc))]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("div",ZT,n.toDisplayString(n.unref(r)("meeting.etherpadDesc")),1)]),_:1})])]),default:n.withCtx(()=>[n.createVNode(n.unref(I.OInput),{disabled:s.isEdit,size:"large",placeholder:n.unref(r)("meeting.enterEtherpad"),style:{width:"100%"},modelValue:v.value.etherpad,"onUpdate:modelValue":k[2]||(k[2]=A=>v.value.etherpad=A)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OFormItem),{label:n.unref(r)("meeting.meetingTime"),field:"time",rules:O.value.time,class:"repeat-row",required:""},{default:n.withCtx(()=>[n.createElementVNode("div",JT,[s.isSub?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(I.OFormItem),{key:0,field:"repeat",class:"repeat-item"},{default:n.withCtx(()=>[n.createVNode(n.unref(I.ORadioGroup),{modelValue:v.value.is_cycle,"onUpdate:modelValue":k[3]||(k[3]=A=>v.value.is_cycle=A),onChange:Y,disabled:s.isEdit},{default:n.withCtx(()=>[n.createVNode(n.unref(I.ORadio),{value:!1},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(r)("meeting.nonRepeat")),1)]),_:1}),n.createVNode(n.unref(I.ORadio),{value:!0},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(r)("meeting.isRepeat")),1)]),_:1})]),_:1},8,["modelValue","disabled"])]),_:1})),n.createElementVNode("div",eb,[v.value.is_cycle?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(n.unref(I.OFormItem),{label:n.unref(r)("meeting.every"),class:"full-width-item"},{default:n.withCtx(()=>[n.createElementVNode("div",tb,[v.value.cycle_type!==n.unref(nn)?(n.openBlock(),n.createBlock(n.unref(I.OFormItem),{key:0},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElInputNumber),{size:"large",modelValue:v.value.cycle_interval,"onUpdate:modelValue":k[4]||(k[4]=A=>v.value.cycle_interval=A),min:1,max:f.value},null,8,["modelValue","max"])]),_:1})):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OFormItem),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OSelect),{size:"large",modelValue:v.value.cycle_type,"onUpdate:modelValue":k[5]||(k[5]=A=>v.value.cycle_type=A),class:"interval-select",optionWrapClass:"o-meeting-form-interval-select-options",onChange:U},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.value,A=>(n.openBlock(),n.createBlock(n.unref(I.OOption),{key:A.value,value:A.value,label:A.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1},8,["label"]),v.value.cycle_type!==n.unref(gn)?(n.openBlock(),n.createBlock(n.unref(I.OFormItem),{key:0,label:n.unref(r)("meeting.in"),field:"cycle_point",class:"point-item"},{default:n.withCtx(()=>[v.value.cycle_type===n.unref(vn)?(n.openBlock(),n.createBlock(n.unref(I.OSelect),{key:0,size:"large",multiple:"",modelValue:v.value.cycle_point,"onUpdate:modelValue":k[6]||(k[6]=A=>v.value.cycle_point=A),placeholder:n.unref(r)("meeting.selectRepeatDate"),"max-tag-count":1},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,A=>(n.openBlock(),n.createBlock(n.unref(I.OOption),{key:A.value,value:A.value,label:A.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])):n.createCommentVNode("",!0),v.value.cycle_type===n.unref(nn)?(n.openBlock(),n.createBlock(XT,{key:1,modelValue:v.value.cycle_point,"onUpdate:modelValue":k[7]||(k[7]=A=>v.value.cycle_point=A)},null,8,["modelValue"])):n.createCommentVNode("",!0)]),_:1},8,["label"])):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OFormItem),{label:n.unref(r)("meeting.meetingDuration"),field:"date_range"},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElDatePicker),{size:"large",modelValue:v.value.date_range,"onUpdate:modelValue":k[8]||(k[8]=A=>v.value.date_range=A),"start-placeholder":n.unref(r)("meeting.startDate"),"end-placeholder":n.unref(r)("meeting.endDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":x,clearable:!1,type:"daterange","popper-class":"o-meeting-form-date-picker-popper"},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"])],64)):(n.openBlock(),n.createBlock(n.unref(I.OFormItem),{key:1,label:n.unref(r)("meeting.meetingDate"),field:"date"},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElDatePicker),{"popper-class":"o-meeting-form-date-picker-popper",size:"large",modelValue:v.value.date,"onUpdate:modelValue":k[9]||(k[9]=A=>v.value.date=A),placeholder:n.unref(r)("meeting.selectDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":x,clearable:!1},null,8,["modelValue","placeholder"])]),_:1},8,["label"])),n.createVNode(n.unref(I.OFormItem),{label:n.unref(r)("meeting.meetingTime")},{default:n.withCtx(()=>[n.createElementVNode("div",ib,[n.createVNode(n.unref(I.OFormItem),{field:"start"},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:n.unref(r)("meeting.startTime"),modelValue:v.value.start,"onUpdate:modelValue":k[10]||(k[10]=A=>v.value.start=A),size:"large",clearable:!1,onChange:q},null,8,["placeholder","modelValue"])]),_:1}),k[18]||(k[18]=n.createElementVNode("span",null,"-",-1)),n.createVNode(n.unref(I.OFormItem),{field:"end"},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:n.unref(r)("meeting.endTime"),modelValue:v.value.end,"onUpdate:modelValue":k[11]||(k[11]=A=>v.value.end=A),size:"large",clearable:!1,onChange:q},null,8,["placeholder","modelValue"])]),_:1}),n.createVNode(n.unref(I.OIconTime))])]),_:1},8,["label"])])])]),_:1},8,["label","rules"]),n.createVNode(n.unref(I.OFormItem),{label:n.unref(r)("meeting.meetingPlatform"),field:"platform",rules:O.value.platform},{default:n.withCtx(()=>[s.data?(n.openBlock(),n.createElementBlock("span",nb,n.toDisplayString(v.value.platform),1)):(n.openBlock(),n.createBlock(n.unref(I.ORadioGroup),{key:0,modelValue:v.value.platform,"onUpdate:modelValue":k[12]||(k[12]=A=>v.value.platform=A),disabled:v.value.is_cycle},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(R.value,A=>(n.openBlock(),n.createBlock(n.unref(I.ORadio),{key:A.value,value:A.value},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(A.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled"]))]),_:1},8,["label","rules"]),n.createVNode(n.unref(I.OFormItem),{field:"agenda",label:n.unref(r)("meeting.meetingAgenda"),rules:O.value.genda},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OTextarea),{disabled:s.isSub,size:"large",placeholder:n.unref(r)("meeting.enterMeetingAgenda"),style:{width:"100%"},rows:4,modelValue:v.value.agenda,"onUpdate:modelValue":k[13]||(k[13]=A=>v.value.agenda=A)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label","rules"]),n.createVNode(n.unref(I.OFormItem),{label:n.unref(r)("meeting.meetingRecord"),field:"is_record",class:"record-item full-width-item"},{default:n.withCtx(()=>[n.unref(P)?(n.openBlock(),n.createBlock(n.unref(I.OSwitch),{key:0,modelValue:v.value.is_record,"onUpdate:modelValue":k[14]||(k[14]=A=>v.value.is_record=A),disabled:s.isSub},null,8,["modelValue","disabled"])):(n.openBlock(),n.createElementBlock("div",rb,[n.createVNode(n.unref(I.OSwitch),{modelValue:v.value.is_record,"onUpdate:modelValue":k[15]||(k[15]=A=>v.value.is_record=A),disabled:s.isSub},null,8,["modelValue","disabled"]),n.createElementVNode("div",sb,[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Ac))]),_:1}),n.createElementVNode("span",null,n.toDisplayString(n.unref(r)("meeting.meetingRecordDesc",[v.value.platform])),1)])]))]),_:1},8,["label"]),n.unref(P)?(n.openBlock(),n.createElementBlock("div",ab,[n.createElementVNode("div",ob,[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Ac))]),_:1}),n.createElementVNode("span",null,n.toDisplayString(n.unref(r)("meeting.meetingRecordDesc",[v.value.platform])),1)])])):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OFormItem),{field:"email_list",rules:O.value.email_list},{label:n.withCtx(()=>[n.createElementVNode("div",lb,[n.createElementVNode("span",null,n.toDisplayString(n.unref(r)("meeting.meetingEmail"))+" ",1),n.createVNode(n.unref(I.OPopover),null,{target:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Dc))]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("div",ub,[n.createTextVNode(n.toDisplayString(n.unref(r)("meeting.meetingEmailDesc"))+" ",1),n.createElementVNode("a",{class:"link-text",href:`/${n.unref(a)}/sig`},n.toDisplayString(n.unref(r)("meeting.sigGroupEmail")),9,cb)])]),_:1})])]),default:n.withCtx(()=>[n.createVNode(n.unref(I.OTextarea),{disabled:s.isEdit,size:"large",placeholder:n.unref(r)("meeting.enterEmail"),style:{width:"100%"},rows:4,modelValue:v.value.email_list,"onUpdate:modelValue":k[16]||(k[16]=A=>v.value.email_list=A)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),s.showBtns?(n.openBlock(),n.createElementBlock("div",db,[n.createVNode(n.unref(I.OButton),{color:"primary",variant:"solid",size:"large",onClick:J,loading:C.value},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(s.isEdit?n.unref(r)("common.save"):n.unref(r)("meeting.book")),1)]),_:1},8,["loading"]),n.createVNode(n.unref(I.OButton),{color:"primary",variant:"outline",size:"large",onClick:M},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(r)("common.cancel")),1)]),_:1})])):n.createCommentVNode("",!0)]))}}),hb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function fb(s,e){return n.openBlock(),n.createElementBlock("svg",hb,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"#0071f3",d:"M9.669 4.029l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM12.669 7.526l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM6.669 8.52l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM15.669 9.531l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM3.669 11.023l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM18.669 11.777l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM20.349 13.234l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM5.349 13.989l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM17.349 15.497l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM8.349 16.474l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM14.349 17.486l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM11.349 20.486l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857z"},null,-1),n.createElementVNode("path",{fill:"none",stroke:"#0071f3","stroke-linejoin":"round","stroke-linecap":"round","stroke-miterlimit":"4","stroke-width":"1.71",d:"M4.491 10.989v3M7.491 8.486v7.989M10.491 3.994v16.491M13.491 7.491v9.994M16.491 9.497v6M19.491 11.743v1.491"},null,-1),n.createElementVNode("path",{fill:"#0071f3",d:"M22.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497zM1.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497z"},null,-1)])])}const pb={name:"meeting-icon-playing",render:fb},mb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function gb(s,e){return n.openBlock(),n.createElementBlock("svg",mb,[...e[0]||(e[0]=[n.createElementVNode("path",{d:"M23.399 22.031l0.116 0.099 3.68 3.672c0.365 0.364 0.365 0.955 0.001 1.32-0.328 0.328-0.839 0.361-1.204 0.1l-0.116-0.099-3.68-3.672c-0.365-0.364-0.365-0.955-0.001-1.32 0.328-0.328 0.839-0.361 1.204-0.1zM14.428 4.605c5.465 0 9.897 4.431 9.897 9.897s-4.431 9.897-9.897 9.897c-5.465 0-9.897-4.431-9.897-9.897s4.431-9.897 9.897-9.897zM14.428 6.472c-4.435 0-8.031 3.595-8.031 8.031s3.595 8.031 8.031 8.031c4.435 0 8.031-3.595 8.031-8.031s-3.595-8.031-8.031-8.031z"},null,-1)])])}const vb={name:"components-icon-search",render:gb},_b={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function yb(s,e){return n.openBlock(),n.createElementBlock("svg",_b,[...e[0]||(e[0]=[n.createElementVNode("path",{fill:"currentColor",d:"M5.759 15.127c0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.016-5.016c0.1-0.1 0.254-0.115 0.37-0.043l0.054 0.043 5.062 5.062c0.273 0.273 0.717 0.273 0.99 0 0.251-0.251 0.271-0.644 0.063-0.918l-0.063-0.072-5.062-5.062c-0.629-0.629-1.628-0.662-2.296-0.099l-0.108 0.099-5.016 5.016c-0.273 0.273-0.273 0.717 0 0.99z"},null,-1)])])}const Tb={name:"components-icon-chevron-up",render:yb},bb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function xb(s,e){return n.openBlock(),n.createElementBlock("svg",bb,[...e[0]||(e[0]=[n.createElementVNode("path",{d:"M3.42 6.060c0-2.52 2.040-4.575 4.575-4.575 2.52 0 4.575 2.055 4.575 4.575s-2.055 4.575-4.575 4.575c-2.535 0-4.575-2.055-4.575-4.575zM15.015 10.47c0-1.8 1.455-3.27 3.255-3.27 1.815 0 3.27 1.47 3.27 3.27s-1.455 3.27-3.27 3.27c-1.8 0-3.255-1.47-3.255-3.27zM4.56 12.915h6.855c2.535 0 4.575 2.055 4.575 4.575 0 0.255-0.015 0.51-0.060 0.75-0.36 2.16-2.235 3.825-4.515 3.825h-6.855c-2.52 0-4.575-2.055-4.575-4.575s2.055-4.575 4.575-4.575zM17.595 17.49c0-0.75-0.135-1.455-0.375-2.115h3.51c1.8 0 3.255 1.455 3.255 3.255s-1.455 3.27-3.255 3.27h-4.995c1.155-1.125 1.86-2.685 1.86-4.41z"},null,-1)])])}const Cb={name:"meeting-icon-speaker",render:xb},Eb={class:"o-meeting-playback-subtitles"},Sb={class:"search-captions"},kb={key:0,class:"suffix-box"},wb={class:"right-handle"},Db=["onClick"],Ab={class:"info"},Nb={class:"num"},Ib={class:"speaker"},Ob={class:"start-time"},Bb={class:"text"},Lb={key:1},Pb=n.defineComponent({__name:"OMeetingPlaybackSubtitles",props:{captions:{default:()=>[]},instance:{},trackIdx:{}},setup(s){const e=Bl(),i=s,{t:r}=Ke.useI18n(),a=n.computed(()=>i.trackIdx),o=n.ref(),l=n.ref(!1),u=()=>{l.value=!0},d=sn.useDebounceFn(()=>{l.value=!1},3e3);n.watch(()=>l.value,k=>{k&&d()});const f=n.ref([]);n.watch(()=>i.captions,()=>{f.value=i.captions||[],n.nextTick(()=>{var k;o.value&&((k=o.value)==null||k.scrollTo({top:0,behavior:"smooth"}))})},{immediate:!0,deep:!0});const g=k=>`00:${k.split(".")[0]}`.slice(-8),v=k=>{const A=k.split(":"),$=A[A.length-3]?parseInt(A[A.length-3]):0,K=parseInt(A[A.length-2]),j=parseFloat(A[A.length-1]);return $*60*60+K*60+j};n.onMounted(()=>{var k;o.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(k=o.value)==null||k.addEventListener("wheel",u)}),n.watch(()=>f.value,()=>{var k;o.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(k=o.value)==null||k.addEventListener("wheel",u)});const S=n.ref(0),C=()=>{},O=k=>{const A=i.instance;if(!A)return;const $=v(k);A.currentTime($)},T=n.ref(""),w=n.ref(0),R=n.ref(0),L=n.ref([]),D=r("common.all"),M=n.computed(()=>[...new Set(i.captions.map(k=>k.speakerLabel).sort().reverse())]);n.watch(()=>a.value,()=>{var A,$;if(l.value&&T.value)return;const k=(A=o.value)==null?void 0:A.querySelectorAll(".captions-item")[a.value-1];($=o.value)==null||$.scrollTo({top:(k==null?void 0:k.offsetTop)-16,behavior:"smooth"})}),n.onUnmounted(()=>{o.value&&o.value.removeEventListener("wheel",u)});const U=(k,A)=>{var G,Z,ee,se,de,fe;const $=document.getElementsByClassName("light-keyword")[k-1],K=document.getElementsByClassName("light-keyword")[k-A];K==null||K.classList.remove("light-keyword-active"),$==null||$.classList.add("light-keyword-active");const j=$.offsetTop+$.offsetHeight<((G=o.value)==null?void 0:G.scrollTop),F=$.offsetTop>((Z=o.value)==null?void 0:Z.offsetHeight)+((ee=o.value)==null?void 0:ee.scrollTop);(j||F)&&((fe=o.value)==null||fe.scrollTo({top:(de=(se=$.parentElement)==null?void 0:se.parentElement)==null?void 0:de.offsetTop,behavior:"smooth"}))},Y=()=>{!w.value||R.value===1||(R.value--,U(R.value,0))},P=k=>{k!=null&&k.shiftKey||!w.value||R.value===w.value||(R.value++,U(R.value,2))},J=k=>{f.value=i.captions.filter(A=>L.value.includes(A.speakerLabel)).map(A=>({...A,contentHtml:k?A.contentHtml.replaceAll(k,`<span class="light-keyword">${k}</span>`):A.contentHtml})),n.nextTick(()=>{var $;const A=document.getElementsByClassName("light-keyword");w.value=A.length,w.value?P():($=o.value)==null||$.scrollTo({top:0,behavior:"smooth"})})},b=sn.useDebounceFn(J,300);n.watch(()=>T.value,k=>{R.value=0,b(k)}),n.watch(()=>M.value,k=>{L.value=k},{immediate:!0});const x=n.ref(!1),q=n.ref(!1),H=k=>{q.value=!1,k?L.value=M.value:L.value=[]};return n.watch(()=>L.value,k=>{k.length===0?(x.value=!1,q.value=!1):k.length===M.value.length?(x.value=!0,q.value=!1):q.value=!0,b(T.value)},{deep:!0}),(k,A)=>(n.openBlock(),n.createElementBlock("div",Eb,[n.createElementVNode("div",Sb,[n.createVNode(n.unref(I.OInput),{modelValue:T.value,"onUpdate:modelValue":A[1]||(A[1]=$=>T.value=$),onKeydown:[n.withKeys(P,["enter"]),n.withKeys(n.withModifiers(Y,["shift","stop"]),["enter"])],placeholder:n.unref(r)("meeting.searchSubtitlePlaceholder"),size:"large",class:"input-captions"},{prefix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(vb))]),_:1})]),suffix:n.withCtx(()=>[T.value?(n.openBlock(),n.createElementBlock("div",kb,[n.createElementVNode("span",null,n.toDisplayString(R.value)+"/"+n.toDisplayString(w.value),1),n.createVNode(n.unref(I.OIcon),{onClick:Y},{default:n.withCtx(()=>[n.createVNode(n.unref(Tb))]),_:1}),n.createVNode(n.unref(I.OIcon),{onClick:P},{default:n.withCtx(()=>[n.createVNode(n.unref(Al))]),_:1}),n.createVNode(n.unref(I.ODivider),{direction:"v"}),n.createVNode(n.unref(I.OIcon),{class:"hover-close",onClick:A[0]||(A[0]=$=>T.value="")},{default:n.withCtx(()=>[n.createVNode(n.unref(Dl))]),_:1})])):n.createCommentVNode("",!0)]),_:1},8,["modelValue","onKeydown","placeholder"]),n.createElementVNode("div",wb,[n.createVNode(n.unref(it.ElSelect),{multiple:"",modelValue:L.value,"onUpdate:modelValue":A[3]||(A[3]=$=>L.value=$),"popper-class":"speakers-selector-popper",class:"speakers-selector",placement:"bottom"},{prefix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Cb))]),_:1})]),header:n.withCtx(()=>[n.createVNode(n.unref(it.ElCheckbox),{modelValue:x.value,"onUpdate:modelValue":A[2]||(A[2]=$=>x.value=$),indeterminate:q.value,onChange:H},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(D)),1)]),_:1},8,["modelValue","indeterminate"])]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(M.value,$=>(n.openBlock(),n.createBlock(n.unref(it.ElOption),{key:$,label:$,value:$},{default:n.withCtx(()=>[n.createVNode(n.unref(it.ElCheckbox),{"model-value":L.value.includes($)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString($),1)]),_:2},1032,["model-value"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),n.createVNode(n.unref(I.OTab),{modelValue:S.value,"onUpdate:modelValue":A[4]||(A[4]=$=>S.value=$),variant:"text",class:"captions-tab",onChange:C},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OTabPane),{value:0,label:n.unref(r)("meeting.audioToText")},{default:n.withCtx(()=>[f.value.length?(n.openBlock(),n.createBlock(n.unref(I.OScroller),{key:0,id:"captionsScrollDom",class:"captions-scroller","show-type":"hover",size:"small","disabled-x":""},{default:n.withCtx(()=>[n.createVNode(n.unref(I.ORow),{gap:"0 12px",wrap:"wrap"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(f.value,($,K)=>(n.openBlock(),n.createBlock(n.unref(I.OCol),{flex:"0 0 100%",key:K},{default:n.withCtx(()=>[n.createElementVNode("div",{class:n.normalizeClass(["captions-item",{"captions-item-active":a.value===K+1}]),onClick:j=>O($.start_time)},[n.createElementVNode("div",Ab,[n.createElementVNode("div",Nb,n.toDisplayString($.speakerIdx),1),n.createElementVNode("div",Ib,n.toDisplayString($.speakerLabel),1),n.createElementVNode("div",Ob,n.toDisplayString(g($.start_time)),1),a.value===K+1?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0,class:"playing initial-fill"},{default:n.withCtx(()=>[n.createVNode(n.unref(pb))]),_:1})):n.createCommentVNode("",!0)]),n.withDirectives(n.createElementVNode("div",Bb,null,512),[[n.unref(e),$.contentHtml]])],10,Db)]),_:2},1024))),128))]),_:1})]),_:1})):(n.openBlock(),n.createElementBlock("div",Lb,"111"))]),_:1},8,["label"])]),_:1},8,["modelValue"])]))}});var go,Ic;function Ea(){if(Ic)return go;Ic=1;var s;return typeof window<"u"?s=window:typeof ta<"u"?s=ta:typeof self<"u"?s=self:s={},go=s,go}var Mb=Ea();const W=gr(Mb),Rb={},Vb=Object.freeze(Object.defineProperty({__proto__:null,default:Rb},Symbol.toStringTag,{value:"Module"})),Fb=V_(Vb);var vo,Oc;function wh(){if(Oc)return vo;Oc=1;var s=typeof ta<"u"?ta:typeof window<"u"?window:{},e=Fb,i;return typeof document<"u"?i=document:(i=s["__GLOBAL_DOCUMENT_CACHE@4"],i||(i=s["__GLOBAL_DOCUMENT_CACHE@4"]=e)),vo=i,vo}var $b=wh();const _e=gr($b);var Fs={exports:{}},_o={exports:{}},Bc;function Ub(){return Bc||(Bc=1,(function(s){function e(){return s.exports=e=Object.assign?Object.assign.bind():function(i){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var o in a)({}).hasOwnProperty.call(a,o)&&(i[o]=a[o])}return i},s.exports.__esModule=!0,s.exports.default=s.exports,e.apply(null,arguments)}s.exports=e,s.exports.__esModule=!0,s.exports.default=s.exports})(_o)),_o.exports}var yo,Lc;function qb(){if(Lc)return yo;Lc=1,yo=e;var s=Object.prototype.toString;function e(i){if(!i)return!1;var r=s.call(i);return r==="[object Function]"||typeof i=="function"&&r!=="[object RegExp]"||typeof window<"u"&&(i===window.setTimeout||i===window.alert||i===window.confirm||i===window.prompt)}return yo}var To,Pc;function jb(){if(Pc)return To;Pc=1;function s(a,o){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(l)return(l=l.call(a)).next.bind(l);if(Array.isArray(a)||(l=e(a))||o){l&&(a=l);var u=0;return function(){return u>=a.length?{done:!0}:{done:!1,value:a[u++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e(a,o){if(a){if(typeof a=="string")return i(a,o);var l=Object.prototype.toString.call(a).slice(8,-1);if(l==="Object"&&a.constructor&&(l=a.constructor.name),l==="Map"||l==="Set")return Array.from(a);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return i(a,o)}}function i(a,o){(o==null||o>a.length)&&(o=a.length);for(var l=0,u=new Array(o);l<o;l++)u[l]=a[l];return u}var r=(function(){function a(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var o=a.prototype;return o.getIsEnabled=function(){return this.enabled_},o.enable=function(){this.enabled_=!0},o.disable=function(){this.enabled_=!1},o.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},o.addInterceptor=function(u,d){this.typeToInterceptorsMap_.has(u)||this.typeToInterceptorsMap_.set(u,new Set);var f=this.typeToInterceptorsMap_.get(u);return f.has(d)?!1:(f.add(d),!0)},o.removeInterceptor=function(u,d){var f=this.typeToInterceptorsMap_.get(u);return f&&f.has(d)?(f.delete(d),!0):!1},o.clearInterceptorsByType=function(u){var d=this.typeToInterceptorsMap_.get(u);return d?(this.typeToInterceptorsMap_.delete(u),this.typeToInterceptorsMap_.set(u,new Set),!0):!1},o.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},o.getForType=function(u){return this.typeToInterceptorsMap_.get(u)||new Set},o.execute=function(u,d){for(var f=this.getForType(u),g=s(f),v;!(v=g()).done;){var S=v.value;try{d=S(d)}catch{}}return d},a})();return To=r,To}var bo,Mc;function Hb(){if(Mc)return bo;Mc=1;var s=(function(){function i(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var r=i.prototype;return r.getIsEnabled=function(){return this.enabled_},r.enable=function(){this.enabled_=!0},r.disable=function(){this.enabled_=!1},r.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},r.getMaxAttempts=function(){return this.maxAttempts_},r.setMaxAttempts=function(o){this.maxAttempts_=o},r.getDelayFactor=function(){return this.delayFactor_},r.setDelayFactor=function(o){this.delayFactor_=o},r.getFuzzFactor=function(){return this.fuzzFactor_},r.setFuzzFactor=function(o){this.fuzzFactor_=o},r.getInitialDelay=function(){return this.initialDelay_},r.setInitialDelay=function(o){this.initialDelay_=o},r.createRetry=function(o){var l=o===void 0?{}:o,u=l.maxAttempts,d=l.delayFactor,f=l.fuzzFactor,g=l.initialDelay;return new e({maxAttempts:u||this.maxAttempts_,delayFactor:d||this.delayFactor_,fuzzFactor:f||this.fuzzFactor_,initialDelay:g||this.initialDelay_})},i})(),e=(function(){function i(a){this.maxAttempts_=a.maxAttempts,this.delayFactor_=a.delayFactor,this.fuzzFactor_=a.fuzzFactor,this.currentDelay_=a.initialDelay,this.currentAttempt_=1}var r=i.prototype;return r.moveToNextAttempt=function(){this.currentAttempt_++;var o=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+o},r.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},r.getCurrentDelay=function(){return this.currentDelay_},r.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},r.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},r.getCurrentFuzzedDelay=function(){var o=this.getCurrentMinPossibleDelay(),l=this.getCurrentMaxPossibleDelay();return o+Math.random()*(l-o)},i})();return bo=s,bo}var xo,Rc;function zb(){if(Rc)return xo;Rc=1;var s=Ea(),e=function(a,o){return o===void 0&&(o=!1),function(l,u,d){if(l){a(l);return}if(u.statusCode>=400&&u.statusCode<=599){var f=d;if(o)if(s.TextDecoder){var g=i(u.headers&&u.headers["content-type"]);try{f=new TextDecoder(g).decode(d)}catch{}}else f=String.fromCharCode.apply(null,new Uint8Array(d));a({cause:f});return}a(null,d)}};function i(r){return r===void 0&&(r=""),r.toLowerCase().split(";").reduce(function(a,o){var l=o.split("="),u=l[0],d=l[1];return u.trim()==="charset"?d.trim():a},"utf-8")}return xo=e,xo}var Vc;function Gb(){if(Vc)return Fs.exports;Vc=1;var s=Ea(),e=Ub(),i=qb(),r=jb(),a=Hb();f.httpHandler=zb(),f.requestInterceptorsStorage=new r,f.responseInterceptorsStorage=new r,f.retryManager=new a;/**
7
+ * @license
8
+ * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
9
+ * Copyright (c) 2014 David Björklund
10
+ * Available under the MIT license
11
+ * <https://github.com/kesla/parse-headers/blob/master/LICENCE>
12
+ */var o=function(O){var T={};return O&&O.trim().split(`
13
+ `).forEach(function(w){var R=w.indexOf(":"),L=w.slice(0,R).trim().toLowerCase(),D=w.slice(R+1).trim();typeof T[L]>"u"?T[L]=D:Array.isArray(T[L])?T[L].push(D):T[L]=[T[L],D]}),T};Fs.exports=f,Fs.exports.default=f,f.XMLHttpRequest=s.XMLHttpRequest||S,f.XDomainRequest="withCredentials"in new f.XMLHttpRequest?f.XMLHttpRequest:s.XDomainRequest,l(["get","put","post","patch","head","delete"],function(C){f[C==="delete"?"del":C]=function(O,T,w){return T=d(O,T,w),T.method=C.toUpperCase(),g(T)}});function l(C,O){for(var T=0;T<C.length;T++)O(C[T])}function u(C){for(var O in C)if(C.hasOwnProperty(O))return!1;return!0}function d(C,O,T){var w=C;return i(O)?(T=O,typeof C=="string"&&(w={uri:C})):w=e({},O,{uri:C}),w.callback=T,w}function f(C,O,T){return O=d(C,O,T),g(O)}function g(C){if(typeof C.callback>"u")throw new Error("callback argument missing");if(C.requestType&&f.requestInterceptorsStorage.getIsEnabled()){var O={uri:C.uri||C.url,headers:C.headers||{},body:C.body,metadata:C.metadata||{},retry:C.retry,timeout:C.timeout},T=f.requestInterceptorsStorage.execute(C.requestType,O);C.uri=T.uri,C.headers=T.headers,C.body=T.body,C.metadata=T.metadata,C.retry=T.retry,C.timeout=T.timeout}var w=!1,R=function(F,G,Z){w||(w=!0,C.callback(F,G,Z))};function L(){Y.readyState===4&&!f.responseInterceptorsStorage.getIsEnabled()&&setTimeout(U,0)}function D(){var j=void 0;if(Y.response?j=Y.response:j=Y.responseText||v(Y),A)try{j=JSON.parse(j)}catch{}return j}function M(j){if(clearTimeout($),clearTimeout(C.retryTimeout),j instanceof Error||(j=new Error(""+(j||"Unknown XMLHttpRequest Error"))),j.statusCode=0,!J&&f.retryManager.getIsEnabled()&&C.retry&&C.retry.shouldRetry()){C.retryTimeout=setTimeout(function(){C.retry.moveToNextAttempt(),C.xhr=Y,g(C)},C.retry.getCurrentFuzzedDelay());return}if(C.requestType&&f.responseInterceptorsStorage.getIsEnabled()){var F={headers:K.headers||{},body:K.body,responseUrl:Y.responseURL,responseType:Y.responseType},G=f.responseInterceptorsStorage.execute(C.requestType,F);K.body=G.body,K.headers=G.headers}return R(j,K)}function U(){if(!J){var j;clearTimeout($),clearTimeout(C.retryTimeout),C.useXDR&&Y.status===void 0?j=200:j=Y.status===1223?204:Y.status;var F=K,G=null;if(j!==0?(F={body:D(),statusCode:j,method:x,headers:{},url:b,rawRequest:Y},Y.getAllResponseHeaders&&(F.headers=o(Y.getAllResponseHeaders()))):G=new Error("Internal XMLHttpRequest Error"),C.requestType&&f.responseInterceptorsStorage.getIsEnabled()){var Z={headers:F.headers||{},body:F.body,responseUrl:Y.responseURL,responseType:Y.responseType},ee=f.responseInterceptorsStorage.execute(C.requestType,Z);F.body=ee.body,F.headers=ee.headers}return R(G,F,F.body)}}var Y=C.xhr||null;Y||(C.cors||C.useXDR?Y=new f.XDomainRequest:Y=new f.XMLHttpRequest);var P,J,b=Y.url=C.uri||C.url,x=Y.method=C.method||"GET",q=C.body||C.data,H=Y.headers=C.headers||{},k=!!C.sync,A=!1,$,K={body:void 0,headers:{},statusCode:0,method:x,url:b,rawRequest:Y};if("json"in C&&C.json!==!1&&(A=!0,H.accept||H.Accept||(H.Accept="application/json"),x!=="GET"&&x!=="HEAD"&&(H["content-type"]||H["Content-Type"]||(H["Content-Type"]="application/json"),q=JSON.stringify(C.json===!0?q:C.json))),Y.onreadystatechange=L,Y.onload=U,Y.onerror=M,Y.onprogress=function(){},Y.onabort=function(){J=!0,clearTimeout(C.retryTimeout)},Y.ontimeout=M,Y.open(x,b,!k,C.username,C.password),k||(Y.withCredentials=!!C.withCredentials),!k&&C.timeout>0&&($=setTimeout(function(){if(!J){J=!0,Y.abort("timeout");var j=new Error("XMLHttpRequest timeout");j.code="ETIMEDOUT",M(j)}},C.timeout)),Y.setRequestHeader)for(P in H)H.hasOwnProperty(P)&&Y.setRequestHeader(P,H[P]);else if(C.headers&&!u(C.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in C&&(Y.responseType=C.responseType),"beforeSend"in C&&typeof C.beforeSend=="function"&&C.beforeSend(Y),Y.send(q||null),Y}function v(C){try{if(C.responseType==="document")return C.responseXML;var O=C.responseXML&&C.responseXML.documentElement.nodeName==="parsererror";if(C.responseType===""&&!O)return C.responseXML}catch{}return null}function S(){}return Fs.exports}var Wb=Gb();const Dh=gr(Wb);var Co={exports:{}},Eo,Fc;function Yb(){if(Fc)return Eo;Fc=1;var s=wh(),e=Object.create||(function(){function b(){}return function(x){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return b.prototype=x,new b}})();function i(b,x){this.name="ParsingError",this.code=b.code,this.message=x||b.message}i.prototype=e(Error.prototype),i.prototype.constructor=i,i.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function r(b){function x(H,k,A,$){return(H|0)*3600+(k|0)*60+(A|0)+($|0)/1e3}var q=b.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return q?q[3]?x(q[1],q[2],q[3].replace(":",""),q[4]):q[1]>59?x(q[1],q[2],0,q[4]):x(0,q[1],q[2],q[4]):null}function a(){this.values=e(null)}a.prototype={set:function(b,x){!this.get(b)&&x!==""&&(this.values[b]=x)},get:function(b,x,q){return q?this.has(b)?this.values[b]:x[q]:this.has(b)?this.values[b]:x},has:function(b){return b in this.values},alt:function(b,x,q){for(var H=0;H<q.length;++H)if(x===q[H]){this.set(b,x);break}},integer:function(b,x){/^-?\d+$/.test(x)&&this.set(b,parseInt(x,10))},percent:function(b,x){return x.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(x=parseFloat(x),x>=0&&x<=100)?(this.set(b,x),!0):!1}};function o(b,x,q,H){var k=H?b.split(H):[b];for(var A in k)if(typeof k[A]=="string"){var $=k[A].split(q);if($.length===2){var K=$[0].trim(),j=$[1].trim();x(K,j)}}}function l(b,x,q){var H=b;function k(){var K=r(b);if(K===null)throw new i(i.Errors.BadTimeStamp,"Malformed timestamp: "+H);return b=b.replace(/^[^\sa-zA-Z-]+/,""),K}function A(K,j){var F=new a;o(K,function(G,Z){switch(G){case"region":for(var ee=q.length-1;ee>=0;ee--)if(q[ee].id===Z){F.set(G,q[ee].region);break}break;case"vertical":F.alt(G,Z,["rl","lr"]);break;case"line":var se=Z.split(","),de=se[0];F.integer(G,de),F.percent(G,de)&&F.set("snapToLines",!1),F.alt(G,de,["auto"]),se.length===2&&F.alt("lineAlign",se[1],["start","center","end"]);break;case"position":se=Z.split(","),F.percent(G,se[0]),se.length===2&&F.alt("positionAlign",se[1],["start","center","end"]);break;case"size":F.percent(G,Z);break;case"align":F.alt(G,Z,["start","center","end","left","right"]);break}},/:/,/\s/),j.region=F.get("region",null),j.vertical=F.get("vertical","");try{j.line=F.get("line","auto")}catch{}j.lineAlign=F.get("lineAlign","start"),j.snapToLines=F.get("snapToLines",!0),j.size=F.get("size",100);try{j.align=F.get("align","center")}catch{j.align=F.get("align","middle")}try{j.position=F.get("position","auto")}catch{j.position=F.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},j.align)}j.positionAlign=F.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},j.align)}function $(){b=b.replace(/^\s+/,"")}if($(),x.startTime=k(),$(),b.substr(0,3)!=="-->")throw new i(i.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+H);b=b.substr(3),$(),x.endTime=k(),$(),A(b,x)}var u=s.createElement&&s.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},f={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},g={v:"title",lang:"lang"},v={rt:"ruby"};function S(b,x){function q(){if(!x)return null;function de(pe){return x=x.substr(pe.length),pe}var fe=x.match(/^([^<]*)(<[^>]*>?)?/);return de(fe[1]?fe[1]:fe[2])}function H(de){return u.innerHTML=de,de=u.textContent,u.textContent="",de}function k(de,fe){return!v[fe.localName]||v[fe.localName]===de.localName}function A(de,fe){var pe=d[de];if(!pe)return null;var je=b.document.createElement(pe),Be=g[de];return Be&&fe&&(je[Be]=fe.trim()),je}for(var $=b.document.createElement("div"),K=$,j,F=[];(j=q())!==null;){if(j[0]==="<"){if(j[1]==="/"){F.length&&F[F.length-1]===j.substr(2).replace(">","")&&(F.pop(),K=K.parentNode);continue}var G=r(j.substr(1,j.length-2)),Z;if(G){Z=b.document.createProcessingInstruction("timestamp",G),K.appendChild(Z);continue}var ee=j.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!ee||(Z=A(ee[1],ee[3]),!Z)||!k(K,Z))continue;if(ee[2]){var se=ee[2].split(".");se.forEach(function(de){var fe=/^bg_/.test(de),pe=fe?de.slice(3):de;if(f.hasOwnProperty(pe)){var je=fe?"background-color":"color",Be=f[pe];Z.style[je]=Be}}),Z.className=se.join(" ")}F.push(ee[1]),K.appendChild(Z),K=Z;continue}K.appendChild(b.document.createTextNode(H(j)))}return $}var C=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function O(b){for(var x=0;x<C.length;x++){var q=C[x];if(b>=q[0]&&b<=q[1])return!0}return!1}function T(b){var x=[],q="",H;if(!b||!b.childNodes)return"ltr";function k(K,j){for(var F=j.childNodes.length-1;F>=0;F--)K.push(j.childNodes[F])}function A(K){if(!K||!K.length)return null;var j=K.pop(),F=j.textContent||j.innerText;if(F){var G=F.match(/^.*(\n|\r)/);return G?(K.length=0,G[0]):F}if(j.tagName==="ruby")return A(K);if(j.childNodes)return k(K,j),A(K)}for(k(x,b);q=A(x);)for(var $=0;$<q.length;$++)if(H=q.charCodeAt($),O(H))return"rtl";return"ltr"}function w(b){if(typeof b.line=="number"&&(b.snapToLines||b.line>=0&&b.line<=100))return b.line;if(!b.track||!b.track.textTrackList||!b.track.textTrackList.mediaElement)return-1;for(var x=b.track,q=x.textTrackList,H=0,k=0;k<q.length&&q[k]!==x;k++)q[k].mode==="showing"&&H++;return++H*-1}function R(){}R.prototype.applyStyles=function(b,x){x=x||this.div;for(var q in b)b.hasOwnProperty(q)&&(x.style[q]=b[q])},R.prototype.formatStyle=function(b,x){return b===0?0:b+x};function L(b,x,q){R.call(this),this.cue=x,this.cueDiv=S(b,x.text);var H={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:x.vertical===""?"horizontal-tb":x.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(H,this.cueDiv),this.div=b.document.createElement("div"),H={direction:T(this.cueDiv),writingMode:x.vertical===""?"horizontal-tb":x.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:x.align==="middle"?"center":x.align,font:q.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(H),this.div.appendChild(this.cueDiv);var k=0;switch(x.positionAlign){case"start":case"line-left":k=x.position;break;case"center":k=x.position-x.size/2;break;case"end":case"line-right":k=x.position-x.size;break}x.vertical===""?this.applyStyles({left:this.formatStyle(k,"%"),width:this.formatStyle(x.size,"%")}):this.applyStyles({top:this.formatStyle(k,"%"),height:this.formatStyle(x.size,"%")}),this.move=function(A){this.applyStyles({top:this.formatStyle(A.top,"px"),bottom:this.formatStyle(A.bottom,"px"),left:this.formatStyle(A.left,"px"),right:this.formatStyle(A.right,"px"),height:this.formatStyle(A.height,"px"),width:this.formatStyle(A.width,"px")})}}L.prototype=e(R.prototype),L.prototype.constructor=L;function D(b){var x,q,H,k;if(b.div){q=b.div.offsetHeight,H=b.div.offsetWidth,k=b.div.offsetTop;var A=(A=b.div.childNodes)&&(A=A[0])&&A.getClientRects&&A.getClientRects();b=b.div.getBoundingClientRect(),x=A?Math.max(A[0]&&A[0].height||0,b.height/A.length):0}this.left=b.left,this.right=b.right,this.top=b.top||k,this.height=b.height||q,this.bottom=b.bottom||k+(b.height||q),this.width=b.width||H,this.lineHeight=x!==void 0?x:b.lineHeight}D.prototype.move=function(b,x){switch(x=x!==void 0?x:this.lineHeight,b){case"+x":this.left+=x,this.right+=x;break;case"-x":this.left-=x,this.right-=x;break;case"+y":this.top+=x,this.bottom+=x;break;case"-y":this.top-=x,this.bottom-=x;break}},D.prototype.overlaps=function(b){return this.left<b.right&&this.right>b.left&&this.top<b.bottom&&this.bottom>b.top},D.prototype.overlapsAny=function(b){for(var x=0;x<b.length;x++)if(this.overlaps(b[x]))return!0;return!1},D.prototype.within=function(b){return this.top>=b.top&&this.bottom<=b.bottom&&this.left>=b.left&&this.right<=b.right},D.prototype.overlapsOppositeAxis=function(b,x){switch(x){case"+x":return this.left<b.left;case"-x":return this.right>b.right;case"+y":return this.top<b.top;case"-y":return this.bottom>b.bottom}},D.prototype.intersectPercentage=function(b){var x=Math.max(0,Math.min(this.right,b.right)-Math.max(this.left,b.left)),q=Math.max(0,Math.min(this.bottom,b.bottom)-Math.max(this.top,b.top)),H=x*q;return H/(this.height*this.width)},D.prototype.toCSSCompatValues=function(b){return{top:this.top-b.top,bottom:b.bottom-this.bottom,left:this.left-b.left,right:b.right-this.right,height:this.height,width:this.width}},D.getSimpleBoxPosition=function(b){var x=b.div?b.div.offsetHeight:b.tagName?b.offsetHeight:0,q=b.div?b.div.offsetWidth:b.tagName?b.offsetWidth:0,H=b.div?b.div.offsetTop:b.tagName?b.offsetTop:0;b=b.div?b.div.getBoundingClientRect():b.tagName?b.getBoundingClientRect():b;var k={left:b.left,right:b.right,top:b.top||H,height:b.height||x,bottom:b.bottom||H+(b.height||x),width:b.width||q};return k};function M(b,x,q,H){function k(pe,je){for(var Be,Le=new D(pe),Qe=1,Ue=0;Ue<je.length;Ue++){for(;pe.overlapsOppositeAxis(q,je[Ue])||pe.within(q)&&pe.overlapsAny(H);)pe.move(je[Ue]);if(pe.within(q))return pe;var De=pe.intersectPercentage(q);Qe>De&&(Be=new D(pe),Qe=De),pe=new D(Le)}return Be||Le}var A=new D(x),$=x.cue,K=w($),j=[];if($.snapToLines){var F;switch($.vertical){case"":j=["+y","-y"],F="height";break;case"rl":j=["+x","-x"],F="width";break;case"lr":j=["-x","+x"],F="width";break}var G=A.lineHeight,Z=G*Math.round(K),ee=q[F]+G,se=j[0];Math.abs(Z)>ee&&(Z=Z<0?-1:1,Z*=Math.ceil(ee/G)*G),K<0&&(Z+=$.vertical===""?q.height:q.width,j=j.reverse()),A.move(se,Z)}else{var de=A.lineHeight/q.height*100;switch($.lineAlign){case"center":K-=de/2;break;case"end":K-=de;break}switch($.vertical){case"":x.applyStyles({top:x.formatStyle(K,"%")});break;case"rl":x.applyStyles({left:x.formatStyle(K,"%")});break;case"lr":x.applyStyles({right:x.formatStyle(K,"%")});break}j=["+y","-x","+x","-y"],A=new D(x)}var fe=k(A,j);x.move(fe.toCSSCompatValues(q))}function U(){}U.StringDecoder=function(){return{decode:function(b){if(!b)return"";if(typeof b!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(b))}}},U.convertCueToDOMTree=function(b,x){return!b||!x?null:S(b,x)};var Y=.05,P="sans-serif",J="1.5%";return U.processCues=function(b,x,q){if(!b||!x||!q)return null;for(;q.firstChild;)q.removeChild(q.firstChild);var H=b.document.createElement("div");H.style.position="absolute",H.style.left="0",H.style.right="0",H.style.top="0",H.style.bottom="0",H.style.margin=J,q.appendChild(H);function k(G){for(var Z=0;Z<G.length;Z++)if(G[Z].hasBeenReset||!G[Z].displayState)return!0;return!1}if(!k(x)){for(var A=0;A<x.length;A++)H.appendChild(x[A].displayState);return}var $=[],K=D.getSimpleBoxPosition(H),j=Math.round(K.height*Y*100)/100,F={font:j+"px "+P};(function(){for(var G,Z,ee=0;ee<x.length;ee++)Z=x[ee],G=new L(b,Z,F),H.appendChild(G.div),M(b,G,K,$),Z.displayState=G.div,$.push(D.getSimpleBoxPosition(G))})()},U.Parser=function(b,x,q){q||(q=x,x={}),x||(x={}),this.window=b,this.vttjs=x,this.state="INITIAL",this.buffer="",this.decoder=q||new TextDecoder("utf8"),this.regionList=[]},U.Parser.prototype={reportOrThrowError:function(b){if(b instanceof i)this.onparsingerror&&this.onparsingerror(b);else throw b},parse:function(b){var x=this;b&&(x.buffer+=x.decoder.decode(b,{stream:!0}));function q(){for(var G=x.buffer,Z=0;Z<G.length&&G[Z]!=="\r"&&G[Z]!==`
14
+ `;)++Z;var ee=G.substr(0,Z);return G[Z]==="\r"&&++Z,G[Z]===`
15
+ `&&++Z,x.buffer=G.substr(Z),ee}function H(G){var Z=new a;if(o(G,function(se,de){switch(se){case"id":Z.set(se,de);break;case"width":Z.percent(se,de);break;case"lines":Z.integer(se,de);break;case"regionanchor":case"viewportanchor":var fe=de.split(",");if(fe.length!==2)break;var pe=new a;if(pe.percent("x",fe[0]),pe.percent("y",fe[1]),!pe.has("x")||!pe.has("y"))break;Z.set(se+"X",pe.get("x")),Z.set(se+"Y",pe.get("y"));break;case"scroll":Z.alt(se,de,["up"]);break}},/=/,/\s/),Z.has("id")){var ee=new(x.vttjs.VTTRegion||x.window.VTTRegion);ee.width=Z.get("width",100),ee.lines=Z.get("lines",3),ee.regionAnchorX=Z.get("regionanchorX",0),ee.regionAnchorY=Z.get("regionanchorY",100),ee.viewportAnchorX=Z.get("viewportanchorX",0),ee.viewportAnchorY=Z.get("viewportanchorY",100),ee.scroll=Z.get("scroll",""),x.onregion&&x.onregion(ee),x.regionList.push({id:Z.get("id"),region:ee})}}function k(G){var Z=new a;o(G,function(ee,se){switch(ee){case"MPEGT":Z.integer(ee+"S",se);break;case"LOCA":Z.set(ee+"L",r(se));break}},/[^\d]:/,/,/),x.ontimestampmap&&x.ontimestampmap({MPEGTS:Z.get("MPEGTS"),LOCAL:Z.get("LOCAL")})}function A(G){G.match(/X-TIMESTAMP-MAP/)?o(G,function(Z,ee){switch(Z){case"X-TIMESTAMP-MAP":k(ee);break}},/=/):o(G,function(Z,ee){switch(Z){case"Region":H(ee);break}},/:/)}try{var $;if(x.state==="INITIAL"){if(!/\r\n|\n/.test(x.buffer))return this;$=q();var K=$.match(/^WEBVTT([ \t].*)?$/);if(!K||!K[0])throw new i(i.Errors.BadSignature);x.state="HEADER"}for(var j=!1;x.buffer;){if(!/\r\n|\n/.test(x.buffer))return this;switch(j?j=!1:$=q(),x.state){case"HEADER":/:/.test($)?A($):$||(x.state="ID");continue;case"NOTE":$||(x.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test($)){x.state="NOTE";break}if(!$)continue;x.cue=new(x.vttjs.VTTCue||x.window.VTTCue)(0,0,"");try{x.cue.align="center"}catch{x.cue.align="middle"}if(x.state="CUE",$.indexOf("-->")===-1){x.cue.id=$;continue}case"CUE":try{l($,x.cue,x.regionList)}catch(G){x.reportOrThrowError(G),x.cue=null,x.state="BADCUE";continue}x.state="CUETEXT";continue;case"CUETEXT":var F=$.indexOf("-->")!==-1;if(!$||F&&(j=!0)){x.oncue&&x.oncue(x.cue),x.cue=null,x.state="ID";continue}x.cue.text&&(x.cue.text+=`
16
+ `),x.cue.text+=$.replace(/\u2028/g,`
17
+ `).replace(/u2029/g,`
18
+ `);continue;case"BADCUE":$||(x.state="ID");continue}}}catch(G){x.reportOrThrowError(G),x.state==="CUETEXT"&&x.cue&&x.oncue&&x.oncue(x.cue),x.cue=null,x.state=x.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var b=this;try{if(b.buffer+=b.decoder.decode(),(b.cue||b.state==="HEADER")&&(b.buffer+=`
19
+
20
+ `,b.parse()),b.state==="INITIAL")throw new i(i.Errors.BadSignature)}catch(x){b.reportOrThrowError(x)}return b.onflush&&b.onflush(),this}},Eo=U,Eo}var So,$c;function Xb(){if($c)return So;$c=1;var s="auto",e={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(l){if(typeof l!="string")return!1;var u=e[l.toLowerCase()];return u?l.toLowerCase():!1}function a(l){if(typeof l!="string")return!1;var u=i[l.toLowerCase()];return u?l.toLowerCase():!1}function o(l,u,d){this.hasBeenReset=!1;var f="",g=!1,v=l,S=u,C=d,O=null,T="",w=!0,R="auto",L="start",D="auto",M="auto",U=100,Y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return f},set:function(P){f=""+P}},pauseOnExit:{enumerable:!0,get:function(){return g},set:function(P){g=!!P}},startTime:{enumerable:!0,get:function(){return v},set:function(P){if(typeof P!="number")throw new TypeError("Start time must be set to a number.");v=P,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return S},set:function(P){if(typeof P!="number")throw new TypeError("End time must be set to a number.");S=P,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return C},set:function(P){C=""+P,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return O},set:function(P){O=P,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return T},set:function(P){var J=r(P);if(J===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");T=J,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return w},set:function(P){w=!!P,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return R},set:function(P){if(typeof P!="number"&&P!==s)throw new SyntaxError("Line: an invalid number or illegal string was specified.");R=P,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return L},set:function(P){var J=a(P);J?(L=J,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return D},set:function(P){if(P<0||P>100)throw new Error("Position must be between 0 and 100.");D=P,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return M},set:function(P){var J=a(P);J?(M=J,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return U},set:function(P){if(P<0||P>100)throw new Error("Size must be between 0 and 100.");U=P,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return Y},set:function(P){var J=a(P);if(!J)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");Y=J,this.hasBeenReset=!0}}}),this.displayState=void 0}return o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},So=o,So}var ko,Uc;function Kb(){if(Uc)return ko;Uc=1;var s={"":!0,up:!0};function e(a){if(typeof a!="string")return!1;var o=s[a.toLowerCase()];return o?a.toLowerCase():!1}function i(a){return typeof a=="number"&&a>=0&&a<=100}function r(){var a=100,o=3,l=0,u=100,d=0,f=100,g="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return a},set:function(v){if(!i(v))throw new Error("Width must be between 0 and 100.");a=v}},lines:{enumerable:!0,get:function(){return o},set:function(v){if(typeof v!="number")throw new TypeError("Lines must be set to a number.");o=v}},regionAnchorY:{enumerable:!0,get:function(){return u},set:function(v){if(!i(v))throw new Error("RegionAnchorX must be between 0 and 100.");u=v}},regionAnchorX:{enumerable:!0,get:function(){return l},set:function(v){if(!i(v))throw new Error("RegionAnchorY must be between 0 and 100.");l=v}},viewportAnchorY:{enumerable:!0,get:function(){return f},set:function(v){if(!i(v))throw new Error("ViewportAnchorY must be between 0 and 100.");f=v}},viewportAnchorX:{enumerable:!0,get:function(){return d},set:function(v){if(!i(v))throw new Error("ViewportAnchorX must be between 0 and 100.");d=v}},scroll:{enumerable:!0,get:function(){return g},set:function(v){var S=e(v);S===!1?console.warn("Scroll: an invalid or illegal string was specified."):g=S}}})}return ko=r,ko}var qc;function Qb(){if(qc)return Co.exports;qc=1;var s=Ea(),e=Co.exports={WebVTT:Yb(),VTTCue:Xb(),VTTRegion:Kb()};s.vttjs=e,s.WebVTT=e.WebVTT;var i=e.VTTCue,r=e.VTTRegion,a=s.VTTCue,o=s.VTTRegion;return e.shim=function(){s.VTTCue=i,s.VTTRegion=r},e.restore=function(){s.VTTCue=a,s.VTTRegion=o},s.VTTCue||e.shim(),Co.exports}var Zb=Qb();const jc=gr(Zb);function xt(){return xt=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)({}).hasOwnProperty.call(i,r)&&(s[r]=i[r])}return s},xt.apply(null,arguments)}var Hc="https://example.com",Sa=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=W.location&&W.location.href||"");var r=/^\/\//.test(e),a=!W.location&&!/\/\//i.test(e);e=new W.URL(e,W.location||Hc);var o=new URL(i,e);return a?o.href.slice(Hc.length):r?o.href.slice(o.protocol.length):o.href},Ll=(function(){function s(){this.listeners={}}var e=s.prototype;return e.on=function(r,a){this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push(a)},e.off=function(r,a){if(!this.listeners[r])return!1;var o=this.listeners[r].indexOf(a);return this.listeners[r]=this.listeners[r].slice(0),this.listeners[r].splice(o,1),o>-1},e.trigger=function(r){var a=this.listeners[r];if(a)if(arguments.length===2)for(var o=a.length,l=0;l<o;++l)a[l].call(this,arguments[1]);else for(var u=Array.prototype.slice.call(arguments,1),d=a.length,f=0;f<d;++f)a[f].apply(this,u)},e.dispose=function(){this.listeners={}},e.pipe=function(r){this.on("data",function(a){r.push(a)})},s})(),Jb=function(e){return W.atob?W.atob(e):Buffer.from(e,"base64").toString("binary")};function Ah(s){for(var e=Jb(s),i=new Uint8Array(e.length),r=0;r<e.length;r++)i[r]=e.charCodeAt(r);return i}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class e4 extends Ll{constructor(){super(),this.buffer=""}push(e){let i;for(this.buffer+=e,i=this.buffer.indexOf(`
21
+ `);i>-1;i=this.buffer.indexOf(`
22
+ `))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1)}}const t4=" ",wo=function(s){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(s||""),i={};return e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),i},i4=function(){const i="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+i+")")},Kt=function(s){const e={};if(!s)return e;const i=s.split(i4());let r=i.length,a;for(;r--;)i[r]!==""&&(a=/([^=]*)=(.*)/.exec(i[r]).slice(1),a[0]=a[0].replace(/^\s+|\s+$/g,""),a[1]=a[1].replace(/^\s+|\s+$/g,""),a[1]=a[1].replace(/^['"](.*)['"]$/g,"$1"),e[a[0]]=a[1]);return e},zc=s=>{const e=s.split("x"),i={};return e[0]&&(i.width=parseInt(e[0],10)),e[1]&&(i.height=parseInt(e[1],10)),i};class n4 extends Ll{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let i,r;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((o,l)=>{const u=l(e);return u===e?o:o.concat([u])},[e]).forEach(o=>{for(let l=0;l<this.customParsers.length;l++)if(this.customParsers[l].call(this,o))return;if(o.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:o.slice(1)});return}if(o=o.replace("\r",""),i=/^#EXTM3U/.exec(o),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(o),i){r={type:"tag",tagType:"inf"},i[1]&&(r.duration=parseFloat(i[1])),i[2]&&(r.title=i[2]),this.trigger("data",r);return}if(i=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(o),i){r={type:"tag",tagType:"targetduration"},i[1]&&(r.duration=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-VERSION:([0-9.]*)?/.exec(o),i){r={type:"tag",tagType:"version"},i[1]&&(r.version=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(o),i){r={type:"tag",tagType:"media-sequence"},i[1]&&(r.number=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(o),i){r={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(r.number=parseInt(i[1],10)),this.trigger("data",r);return}if(i=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(o),i){r={type:"tag",tagType:"playlist-type"},i[1]&&(r.playlistType=i[1]),this.trigger("data",r);return}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(o),i){r=xt(wo(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",r);return}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(o),i){r={type:"tag",tagType:"allow-cache"},i[1]&&(r.allowed=!/NO/.test(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-MAP:(.*)$/.exec(o),i){if(r={type:"tag",tagType:"map"},i[1]){const l=Kt(i[1]);l.URI&&(r.uri=l.URI),l.BYTERANGE&&(r.byterange=wo(l.BYTERANGE))}this.trigger("data",r);return}if(i=/^#EXT-X-STREAM-INF:(.*)$/.exec(o),i){r={type:"tag",tagType:"stream-inf"},i[1]&&(r.attributes=Kt(i[1]),r.attributes.RESOLUTION&&(r.attributes.RESOLUTION=zc(r.attributes.RESOLUTION)),r.attributes.BANDWIDTH&&(r.attributes.BANDWIDTH=parseInt(r.attributes.BANDWIDTH,10)),r.attributes["FRAME-RATE"]&&(r.attributes["FRAME-RATE"]=parseFloat(r.attributes["FRAME-RATE"])),r.attributes["PROGRAM-ID"]&&(r.attributes["PROGRAM-ID"]=parseInt(r.attributes["PROGRAM-ID"],10))),this.trigger("data",r);return}if(i=/^#EXT-X-MEDIA:(.*)$/.exec(o),i){r={type:"tag",tagType:"media"},i[1]&&(r.attributes=Kt(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-ENDLIST/.exec(o),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(o),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(o),i){r={type:"tag",tagType:"program-date-time"},i[1]&&(r.dateTimeString=i[1],r.dateTimeObject=new Date(i[1])),this.trigger("data",r);return}if(i=/^#EXT-X-KEY:(.*)$/.exec(o),i){r={type:"tag",tagType:"key"},i[1]&&(r.attributes=Kt(i[1]),r.attributes.IV&&(r.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(r.attributes.IV=r.attributes.IV.substring(2)),r.attributes.IV=r.attributes.IV.match(/.{8}/g),r.attributes.IV[0]=parseInt(r.attributes.IV[0],16),r.attributes.IV[1]=parseInt(r.attributes.IV[1],16),r.attributes.IV[2]=parseInt(r.attributes.IV[2],16),r.attributes.IV[3]=parseInt(r.attributes.IV[3],16),r.attributes.IV=new Uint32Array(r.attributes.IV))),this.trigger("data",r);return}if(i=/^#EXT-X-START:(.*)$/.exec(o),i){r={type:"tag",tagType:"start"},i[1]&&(r.attributes=Kt(i[1]),r.attributes["TIME-OFFSET"]=parseFloat(r.attributes["TIME-OFFSET"]),r.attributes.PRECISE=/YES/.test(r.attributes.PRECISE)),this.trigger("data",r);return}if(i=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(o),i){r={type:"tag",tagType:"cue-out-cont"},i[1]?r.data=i[1]:r.data="",this.trigger("data",r);return}if(i=/^#EXT-X-CUE-OUT:(.*)?$/.exec(o),i){r={type:"tag",tagType:"cue-out"},i[1]?r.data=i[1]:r.data="",this.trigger("data",r);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(o),i){r={type:"tag",tagType:"cue-in"},i[1]?r.data=i[1]:r.data="",this.trigger("data",r);return}if(i=/^#EXT-X-SKIP:(.*)$/.exec(o),i&&i[1]){r={type:"tag",tagType:"skip"},r.attributes=Kt(i[1]),r.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(r.attributes["SKIPPED-SEGMENTS"]=parseInt(r.attributes["SKIPPED-SEGMENTS"],10)),r.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(r.attributes["RECENTLY-REMOVED-DATERANGES"]=r.attributes["RECENTLY-REMOVED-DATERANGES"].split(t4)),this.trigger("data",r);return}if(i=/^#EXT-X-PART:(.*)$/.exec(o),i&&i[1]){r={type:"tag",tagType:"part"},r.attributes=Kt(i[1]),["DURATION"].forEach(function(l){r.attributes.hasOwnProperty(l)&&(r.attributes[l]=parseFloat(r.attributes[l]))}),["INDEPENDENT","GAP"].forEach(function(l){r.attributes.hasOwnProperty(l)&&(r.attributes[l]=/YES/.test(r.attributes[l]))}),r.attributes.hasOwnProperty("BYTERANGE")&&(r.attributes.byterange=wo(r.attributes.BYTERANGE)),this.trigger("data",r);return}if(i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(o),i&&i[1]){r={type:"tag",tagType:"server-control"},r.attributes=Kt(i[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(l){r.attributes.hasOwnProperty(l)&&(r.attributes[l]=parseFloat(r.attributes[l]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(l){r.attributes.hasOwnProperty(l)&&(r.attributes[l]=/YES/.test(r.attributes[l]))}),this.trigger("data",r);return}if(i=/^#EXT-X-PART-INF:(.*)$/.exec(o),i&&i[1]){r={type:"tag",tagType:"part-inf"},r.attributes=Kt(i[1]),["PART-TARGET"].forEach(function(l){r.attributes.hasOwnProperty(l)&&(r.attributes[l]=parseFloat(r.attributes[l]))}),this.trigger("data",r);return}if(i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(o),i&&i[1]){r={type:"tag",tagType:"preload-hint"},r.attributes=Kt(i[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(l){if(r.attributes.hasOwnProperty(l)){r.attributes[l]=parseInt(r.attributes[l],10);const u=l==="BYTERANGE-LENGTH"?"length":"offset";r.attributes.byterange=r.attributes.byterange||{},r.attributes.byterange[u]=r.attributes[l],delete r.attributes[l]}}),this.trigger("data",r);return}if(i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(o),i&&i[1]){r={type:"tag",tagType:"rendition-report"},r.attributes=Kt(i[1]),["LAST-MSN","LAST-PART"].forEach(function(l){r.attributes.hasOwnProperty(l)&&(r.attributes[l]=parseInt(r.attributes[l],10))}),this.trigger("data",r);return}if(i=/^#EXT-X-DATERANGE:(.*)$/.exec(o),i&&i[1]){r={type:"tag",tagType:"daterange"},r.attributes=Kt(i[1]),["ID","CLASS"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=String(r.attributes[u]))}),["START-DATE","END-DATE"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=new Date(r.attributes[u]))}),["DURATION","PLANNED-DURATION"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=parseFloat(r.attributes[u]))}),["END-ON-NEXT"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=/YES/i.test(r.attributes[u]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(u){r.attributes.hasOwnProperty(u)&&(r.attributes[u]=r.attributes[u].toString(16))});const l=/^X-([A-Z]+-)+[A-Z]+$/;for(const u in r.attributes){if(!l.test(u))continue;const d=/[0-9A-Fa-f]{6}/g.test(r.attributes[u]),f=/^\d+(\.\d+)?$/.test(r.attributes[u]);r.attributes[u]=d?r.attributes[u].toString(16):f?parseFloat(r.attributes[u]):String(r.attributes[u])}this.trigger("data",r);return}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(o),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(o),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(o),i){r={type:"tag",tagType:"content-steering"},r.attributes=Kt(i[1]),this.trigger("data",r);return}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(o),i){r={type:"tag",tagType:"i-frame-playlist"},r.attributes=Kt(i[1]),r.attributes.URI&&(r.uri=r.attributes.URI),r.attributes.BANDWIDTH&&(r.attributes.BANDWIDTH=parseInt(r.attributes.BANDWIDTH,10)),r.attributes.RESOLUTION&&(r.attributes.RESOLUTION=zc(r.attributes.RESOLUTION)),r.attributes["AVERAGE-BANDWIDTH"]&&(r.attributes["AVERAGE-BANDWIDTH"]=parseInt(r.attributes["AVERAGE-BANDWIDTH"],10)),r.attributes["FRAME-RATE"]&&(r.attributes["FRAME-RATE"]=parseFloat(r.attributes["FRAME-RATE"])),this.trigger("data",r);return}if(i=/^#EXT-X-DEFINE:(.*)$/.exec(o),i){r={type:"tag",tagType:"define"},r.attributes=Kt(i[1]),this.trigger("data",r);return}this.trigger("data",{type:"tag",data:o.slice(4)})})}addParser({expression:e,customType:i,dataParser:r,segment:a}){typeof r!="function"&&(r=o=>o),this.customParsers.push(o=>{if(e.exec(o))return this.trigger("data",{type:"custom",data:r(o),customType:i,segment:a}),!0})}addTagMapper({expression:e,map:i}){const r=a=>e.test(a)?i(a):a;this.tagMappers.push(r)}}const r4=s=>s.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),cn=function(s){const e={};return Object.keys(s).forEach(function(i){e[r4(i)]=s[i]}),e},Do=function(s){const{serverControl:e,targetDuration:i,partTargetDuration:r}=s;if(!e)return;const a="#EXT-X-SERVER-CONTROL",o="holdBack",l="partHoldBack",u=i&&i*3,d=r&&r*2;i&&!e.hasOwnProperty(o)&&(e[o]=u,this.trigger("info",{message:`${a} defaulting HOLD-BACK to targetDuration * 3 (${u}).`})),u&&e[o]<u&&(this.trigger("warn",{message:`${a} clamping HOLD-BACK (${e[o]}) to targetDuration * 3 (${u})`}),e[o]=u),r&&!e.hasOwnProperty(l)&&(e[l]=r*3,this.trigger("info",{message:`${a} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[l]}).`})),r&&e[l]<d&&(this.trigger("warn",{message:`${a} clamping PART-HOLD-BACK (${e[l]}) to partTargetDuration * 2 (${d}).`}),e[l]=d)};class s4 extends Ll{constructor(e={}){super(),this.lineStream=new e4,this.parseStream=new n4,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const i=this,r=[];let a={},o,l,u=!1;const d=function(){},f={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},g="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let v=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let S=0,C=0;const O={};this.on("end",()=>{a.uri||!a.parts&&!a.preloadHints||(!a.map&&o&&(a.map=o),!a.key&&l&&(a.key=l),!a.timeline&&typeof v=="number"&&(a.timeline=v),this.manifest.preloadSegment=a)}),this.parseStream.on("data",function(T){let w,R;if(i.manifest.definitions){for(const L in i.manifest.definitions)if(T.uri&&(T.uri=T.uri.replace(`{$${L}}`,i.manifest.definitions[L])),T.attributes)for(const D in T.attributes)typeof T.attributes[D]=="string"&&(T.attributes[D]=T.attributes[D].replace(`{$${L}}`,i.manifest.definitions[L]))}({tag(){({version(){T.version&&(this.manifest.version=T.version)},"allow-cache"(){this.manifest.allowCache=T.allowed,"allowed"in T||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const L={};"length"in T&&(a.byterange=L,L.length=T.length,"offset"in T||(T.offset=S)),"offset"in T&&(a.byterange=L,L.offset=T.offset),S=L.offset+L.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),T.title&&(a.title=T.title),T.duration>0&&(a.duration=T.duration),T.duration===0&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=r},key(){if(!T.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(T.attributes.METHOD==="NONE"){l=null;return}if(!T.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(T.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:T.attributes};return}if(T.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:T.attributes.URI};return}if(T.attributes.KEYFORMAT===g){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(T.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(T.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),T.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(T.attributes.KEYID&&T.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:T.attributes.KEYFORMAT,keyId:T.attributes.KEYID.substring(2)},pssh:Ah(T.attributes.URI.split(",")[1])};return}T.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:T.attributes.METHOD||"AES-128",uri:T.attributes.URI},typeof T.attributes.IV<"u"&&(l.iv=T.attributes.IV)},"media-sequence"(){if(!isFinite(T.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+T.number});return}this.manifest.mediaSequence=T.number},"discontinuity-sequence"(){if(!isFinite(T.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+T.number});return}this.manifest.discontinuitySequence=T.number,v=T.number},"playlist-type"(){if(!/VOD|EVENT/.test(T.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+T.playlist});return}this.manifest.playlistType=T.playlistType},map(){o={},T.uri&&(o.uri=T.uri),T.byterange&&(o.byterange=T.byterange),l&&(o.key=l)},"stream-inf"(){if(this.manifest.playlists=r,this.manifest.mediaGroups=this.manifest.mediaGroups||f,!T.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}a.attributes||(a.attributes={}),xt(a.attributes,T.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||f,!(T.attributes&&T.attributes.TYPE&&T.attributes["GROUP-ID"]&&T.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const L=this.manifest.mediaGroups[T.attributes.TYPE];L[T.attributes["GROUP-ID"]]=L[T.attributes["GROUP-ID"]]||{},w=L[T.attributes["GROUP-ID"]],R={default:/yes/i.test(T.attributes.DEFAULT)},R.default?R.autoselect=!0:R.autoselect=/yes/i.test(T.attributes.AUTOSELECT),T.attributes.LANGUAGE&&(R.language=T.attributes.LANGUAGE),T.attributes.URI&&(R.uri=T.attributes.URI),T.attributes["INSTREAM-ID"]&&(R.instreamId=T.attributes["INSTREAM-ID"]),T.attributes.CHARACTERISTICS&&(R.characteristics=T.attributes.CHARACTERISTICS),T.attributes.FORCED&&(R.forced=/yes/i.test(T.attributes.FORCED)),w[T.attributes.NAME]=R},discontinuity(){v+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(r.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=T.dateTimeString,this.manifest.dateTimeObject=T.dateTimeObject),a.dateTimeString=T.dateTimeString,a.dateTimeObject=T.dateTimeObject;const{lastProgramDateTime:L}=this;this.lastProgramDateTime=new Date(T.dateTimeString).getTime(),L===null&&this.manifest.segments.reduceRight((D,M)=>(M.programDateTime=D-M.duration*1e3,M.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(T.duration)||T.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+T.duration});return}this.manifest.targetDuration=T.duration,Do.call(this,this.manifest)},start(){if(!T.attributes||isNaN(T.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:T.attributes["TIME-OFFSET"],precise:T.attributes.PRECISE}},"cue-out"(){a.cueOut=T.data},"cue-out-cont"(){a.cueOutCont=T.data},"cue-in"(){a.cueIn=T.data},skip(){this.manifest.skip=cn(T.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",T.attributes,["SKIPPED-SEGMENTS"])},part(){u=!0;const L=this.manifest.segments.length,D=cn(T.attributes);a.parts=a.parts||[],a.parts.push(D),D.byterange&&(D.byterange.hasOwnProperty("offset")||(D.byterange.offset=C),C=D.byterange.offset+D.byterange.length);const M=a.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${M} for segment #${L}`,T.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((U,Y)=>{U.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${Y} lacks required attribute(s): LAST-PART`})})},"server-control"(){const L=this.manifest.serverControl=cn(T.attributes);L.hasOwnProperty("canBlockReload")||(L.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Do.call(this,this.manifest),L.canSkipDateranges&&!L.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const L=this.manifest.segments.length,D=cn(T.attributes),M=D.type&&D.type==="PART";a.preloadHints=a.preloadHints||[],a.preloadHints.push(D),D.byterange&&(D.byterange.hasOwnProperty("offset")||(D.byterange.offset=M?C:0,M&&(C=D.byterange.offset+D.byterange.length)));const U=a.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${U} for segment #${L}`,T.attributes,["TYPE","URI"]),!!D.type)for(let Y=0;Y<a.preloadHints.length-1;Y++){const P=a.preloadHints[Y];P.type&&P.type===D.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${U} for segment #${L} has the same TYPE ${D.type} as preload hint #${Y}`})}},"rendition-report"(){const L=cn(T.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(L);const D=this.manifest.renditionReports.length-1,M=["LAST-MSN","URI"];u&&M.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${D}`,T.attributes,M)},"part-inf"(){this.manifest.partInf=cn(T.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",T.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Do.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(cn(T.attributes));const L=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${L}`,T.attributes,["ID","START-DATE"]);const D=this.manifest.dateRanges[L];D.endDate&&D.startDate&&new Date(D.endDate)<new Date(D.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),D.duration&&D.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),D.plannedDuration&&D.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const M=!!D.endOnNext;if(M&&!D.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),M&&(D.duration||D.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),D.duration&&D.endDate){const Y=D.startDate.getTime()+D.duration*1e3;this.manifest.dateRanges[L].endDate=new Date(Y)}if(!O[D.id])O[D.id]=D;else{for(const Y in O[D.id])if(D[Y]&&JSON.stringify(O[D.id][Y])!==JSON.stringify(D[Y])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const U=this.manifest.dateRanges.findIndex(Y=>Y.id===D.id);this.manifest.dateRanges[U]=xt(this.manifest.dateRanges[U],D),O[D.id]=xt(O[D.id],D),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=cn(T.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",T.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const L=(D,M)=>{if(D in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${D}`});return}this.manifest.definitions[D]=M};if("QUERYPARAM"in T.attributes){if("NAME"in T.attributes||"IMPORT"in T.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const D=this.params.get(T.attributes.QUERYPARAM);if(!D){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${T.attributes.QUERYPARAM}`});return}L(T.attributes.QUERYPARAM,decodeURIComponent(D));return}if("NAME"in T.attributes){if("IMPORT"in T.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in T.attributes)||typeof T.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${T.attributes.NAME}`});return}L(T.attributes.NAME,T.attributes.VALUE);return}if("IMPORT"in T.attributes){if(!this.mainDefinitions[T.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${T.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}L(T.attributes.IMPORT,this.mainDefinitions[T.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:T.attributes,uri:T.uri,timeline:v}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",T.attributes,["BANDWIDTH","URI"])}}[T.tagType]||d).call(i)},uri(){a.uri=T.uri,r.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),l&&(a.key=l),a.timeline=v,o&&(a.map=o),C=0,this.lastProgramDateTime!==null&&(a.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=a.duration*1e3),a={}},comment(){},custom(){T.segment?(a.custom=a.custom||{},a.custom[T.customType]=T.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[T.customType]=T.data)}})[T.type].call(i)})}requiredCompatibilityversion(e,i){(e<i||!e)&&this.trigger("warn",{message:`manifest must be at least version ${i}`})}warnOnMissingAttributes_(e,i,r){const a=[];r.forEach(function(o){i.hasOwnProperty(o)||a.push(o)}),a.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${a.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(`
23
+ `),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var Ln={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a4=["video","audio","text"],Gc=["Video","Audio","Text"],Nh=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,r,a){var o=("00"+Number(r).toString(16)).slice(-2),l=("00"+Number(a).toString(16)).slice(-2);return"avc1."+o+"00"+l})},Fi=function(e){e===void 0&&(e="");var i=e.split(","),r=[];return i.forEach(function(a){a=a.trim();var o;a4.forEach(function(l){var u=Ln[l].exec(a.toLowerCase());if(!(!u||u.length<=1)){o=l;var d=a.substring(0,u[1].length),f=a.replace(d,"");r.push({type:d,details:f,mediaType:l})}}),o||r.push({type:a,details:"",mediaType:"unknown"})}),r},o4=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var r=e.mediaGroups.AUDIO[i];if(!r)return null;for(var a in r){var o=r[a];if(o.default&&o.playlists)return Fi(o.playlists[0].attributes.CODECS)}return null},Ih=function(e){return e===void 0&&(e=""),Ln.audio.test(e.trim().toLowerCase())},l4=function(e){return e===void 0&&(e=""),Ln.text.test(e.trim().toLowerCase())},or=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(o){return Nh(o.trim())}),r="video";i.length===1&&Ih(i[0])?r="audio":i.length===1&&l4(i[0])&&(r="application");var a="mp4";return i.every(function(o){return Ln.mp4.test(o)})?a="mp4":i.every(function(o){return Ln.webm.test(o)})?a="webm":i.every(function(o){return Ln.ogg.test(o)})&&(a="ogg"),r+"/"+a+';codecs="'+e+'"'}},Qr=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),W.MediaSource&&W.MediaSource.isTypeSupported&&W.MediaSource.isTypeSupported(or(e))||i&&W.ManagedMediaSource&&W.ManagedMediaSource.isTypeSupported&&W.ManagedMediaSource.isTypeSupported(or(e))||!1},Ao=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var r=0;r<Gc.length;r++){var a=Gc[r];if(Ln["muxer"+a].test(i))return!0}return!1})},Wc="mp4a.40.2",u4="avc1.4d400d",c4=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,d4=/^application\/dash\+xml/i,Oh=function(e){return c4.test(e)?"hls":d4.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},h4=function(e){return e.toString(2).length},f4=function(e){return Math.ceil(h4(e)/8)},Bh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},p4=function(e){return Bh(e)},Re=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!p4(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Lt=W.BigInt||Number,tl=[Lt("0x1"),Lt("0x100"),Lt("0x10000"),Lt("0x1000000"),Lt("0x100000000"),Lt("0x10000000000"),Lt("0x1000000000000"),Lt("0x100000000000000"),Lt("0x10000000000000000")];(function(){var s=new Uint16Array([65484]),e=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var m4=function(e,i){var r=i===void 0?{}:i,a=r.signed,o=a===void 0?!1:a,l=r.le,u=l===void 0?!1:l;e=Re(e);var d=u?"reduce":"reduceRight",f=e[d]?e[d]:Array.prototype[d],g=f.call(e,function(S,C,O){var T=u?O:Math.abs(O+1-e.length);return S+Lt(C)*tl[T]},Lt(0));if(o){var v=tl[e.length]/Lt(2)-Lt(1);g=Lt(g),g>v&&(g-=v,g-=v,g-=Lt(2))}return Number(g)},g4=function(e,i){var r={},a=r.le,o=a===void 0?!1:a;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Lt(e);for(var l=f4(e),u=new Uint8Array(new ArrayBuffer(l)),d=0;d<l;d++){var f=o?d:Math.abs(d+1-u.length);u[f]=Number(e/tl[d]&Lt(255)),e<0&&(u[f]=Math.abs(~u[f]),u[f]-=d===0?1:2)}return u},Lh=function(e,i){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;i||(e=unescape(encodeURIComponent(e)));for(var r=new Uint8Array(e.length),a=0;a<e.length;a++)r[a]=e.charCodeAt(a);return r},v4=function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];if(i=i.filter(function(u){return u&&(u.byteLength||u.length)&&typeof u!="string"}),i.length<=1)return Re(i[0]);var a=i.reduce(function(u,d,f){return u+(d.byteLength||d.length)},0),o=new Uint8Array(a),l=0;return i.forEach(function(u){u=Re(u),o.set(u,l),l+=u.byteLength}),o},ht=function(e,i,r){var a=r===void 0?{}:r,o=a.offset,l=o===void 0?0:o,u=a.mask,d=u===void 0?[]:u;e=Re(e),i=Re(i);var f=i.every?i.every:Array.prototype.every;return i.length&&e.length-l>=i.length&&f.call(i,function(g,v){var S=d[v]?d[v]&e[l+v]:e[l+v];return g===S})},_4=function(e,i,r){i.forEach(function(a){for(var o in e.mediaGroups[a])for(var l in e.mediaGroups[a][o]){var u=e.mediaGroups[a][o][l];r(u,a,o,l)}})},jr={},Qi={},Sn={},Yc;function ka(){if(Yc)return Sn;Yc=1;function s(o,l,u){if(u===void 0&&(u=Array.prototype),o&&typeof u.find=="function")return u.find.call(o,l);for(var d=0;d<o.length;d++)if(Object.prototype.hasOwnProperty.call(o,d)){var f=o[d];if(l.call(void 0,f,d,o))return f}}function e(o,l){return l===void 0&&(l=Object),l&&typeof l.freeze=="function"?l.freeze(o):o}function i(o,l){if(o===null||typeof o!="object")throw new TypeError("target is not an object");for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(o[u]=l[u]);return o}var r=e({HTML:"text/html",isHTML:function(o){return o===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),a=e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(o){return o===a.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return Sn.assign=i,Sn.find=s,Sn.freeze=e,Sn.MIME_TYPE=r,Sn.NAMESPACE=a,Sn}var Xc;function Ph(){if(Xc)return Qi;Xc=1;var s=ka(),e=s.find,i=s.NAMESPACE;function r(E){return E!==""}function a(E){return E?E.split(/[\t\n\f\r ]+/).filter(r):[]}function o(E,N){return E.hasOwnProperty(N)||(E[N]=!0),E}function l(E){if(!E)return[];var N=a(E);return Object.keys(N.reduce(o,{}))}function u(E){return function(N){return E&&E.indexOf(N)!==-1}}function d(E,N){for(var Q in E)Object.prototype.hasOwnProperty.call(E,Q)&&(N[Q]=E[Q])}function f(E,N){var Q=E.prototype;if(!(Q instanceof N)){let re=function(){};re.prototype=N.prototype,re=new re,d(Q,re),E.prototype=Q=re}Q.constructor!=E&&(typeof E!="function"&&console.error("unknown Class:"+E),Q.constructor=E)}var g={},v=g.ELEMENT_NODE=1,S=g.ATTRIBUTE_NODE=2,C=g.TEXT_NODE=3,O=g.CDATA_SECTION_NODE=4,T=g.ENTITY_REFERENCE_NODE=5,w=g.ENTITY_NODE=6,R=g.PROCESSING_INSTRUCTION_NODE=7,L=g.COMMENT_NODE=8,D=g.DOCUMENT_NODE=9,M=g.DOCUMENT_TYPE_NODE=10,U=g.DOCUMENT_FRAGMENT_NODE=11,Y=g.NOTATION_NODE=12,P={},J={};P.INDEX_SIZE_ERR=(J[1]="Index size error",1),P.DOMSTRING_SIZE_ERR=(J[2]="DOMString size error",2);var b=P.HIERARCHY_REQUEST_ERR=(J[3]="Hierarchy request error",3);P.WRONG_DOCUMENT_ERR=(J[4]="Wrong document",4);var x=P.INVALID_CHARACTER_ERR=(J[5]="Invalid character",5);P.NO_DATA_ALLOWED_ERR=(J[6]="No data allowed",6),P.NO_MODIFICATION_ALLOWED_ERR=(J[7]="No modification allowed",7);var q=P.NOT_FOUND_ERR=(J[8]="Not found",8);P.NOT_SUPPORTED_ERR=(J[9]="Not supported",9);var H=P.INUSE_ATTRIBUTE_ERR=(J[10]="Attribute in use",10);P.INVALID_STATE_ERR=(J[11]="Invalid state",11),P.SYNTAX_ERR=(J[12]="Syntax error",12),P.INVALID_MODIFICATION_ERR=(J[13]="Invalid modification",13),P.NAMESPACE_ERR=(J[14]="Invalid namespace",14),P.INVALID_ACCESS_ERR=(J[15]="Invalid access",15);function k(E,N){if(N instanceof Error)var Q=N;else Q=this,Error.call(this,J[E]),this.message=J[E],Error.captureStackTrace&&Error.captureStackTrace(this,k);return Q.code=E,N&&(this.message=this.message+": "+N),Q}k.prototype=Error.prototype,d(P,k);function A(){}A.prototype={length:0,item:function(E){return E>=0&&E<this.length?this[E]:null},toString:function(E,N){for(var Q=[],re=0;re<this.length;re++)zt(this[re],Q,E,N);return Q.join("")},filter:function(E){return Array.prototype.filter.call(this,E)},indexOf:function(E){return Array.prototype.indexOf.call(this,E)}};function $(E,N){this._node=E,this._refresh=N,K(this)}function K(E){var N=E._node._inc||E._node.ownerDocument._inc;if(E._inc!==N){var Q=E._refresh(E._node);if(Ei(E,"length",Q.length),!E.$$length||Q.length<E.$$length)for(var re=Q.length;re in E;re++)Object.prototype.hasOwnProperty.call(E,re)&&delete E[re];d(Q,E),E._inc=N}}$.prototype.item=function(E){return K(this),this[E]||null},f($,A);function j(){}function F(E,N){for(var Q=E.length;Q--;)if(E[Q]===N)return Q}function G(E,N,Q,re){if(re?N[F(N,re)]=Q:N[N.length++]=Q,E){Q.ownerElement=E;var Te=E.ownerDocument;Te&&(re&&Be(Te,E,re),je(Te,E,Q))}}function Z(E,N,Q){var re=F(N,Q);if(re>=0){for(var Te=N.length-1;re<Te;)N[re]=N[++re];if(N.length=Te,E){var Me=E.ownerDocument;Me&&(Be(Me,E,Q),Q.ownerElement=null)}}else throw new k(q,new Error(E.tagName+"@"+Q))}j.prototype={length:0,item:A.prototype.item,getNamedItem:function(E){for(var N=this.length;N--;){var Q=this[N];if(Q.nodeName==E)return Q}},setNamedItem:function(E){var N=E.ownerElement;if(N&&N!=this._ownerElement)throw new k(H);var Q=this.getNamedItem(E.nodeName);return G(this._ownerElement,this,E,Q),Q},setNamedItemNS:function(E){var N=E.ownerElement,Q;if(N&&N!=this._ownerElement)throw new k(H);return Q=this.getNamedItemNS(E.namespaceURI,E.localName),G(this._ownerElement,this,E,Q),Q},removeNamedItem:function(E){var N=this.getNamedItem(E);return Z(this._ownerElement,this,N),N},removeNamedItemNS:function(E,N){var Q=this.getNamedItemNS(E,N);return Z(this._ownerElement,this,Q),Q},getNamedItemNS:function(E,N){for(var Q=this.length;Q--;){var re=this[Q];if(re.localName==N&&re.namespaceURI==E)return re}return null}};function ee(){}ee.prototype={hasFeature:function(E,N){return!0},createDocument:function(E,N,Q){var re=new pe;if(re.implementation=this,re.childNodes=new A,re.doctype=Q||null,Q&&re.appendChild(Q),N){var Te=re.createElementNS(E,N);re.appendChild(Te)}return re},createDocumentType:function(E,N,Q){var re=new pt;return re.name=E,re.nodeName=E,re.publicId=N||"",re.systemId=Q||"",re}};function se(){}se.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(E,N){return he(this,E,N)},replaceChild:function(E,N){he(this,E,N,Ie),N&&this.removeChild(N)},removeChild:function(E){return Qe(this,E)},appendChild:function(E){return this.insertBefore(E,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(E){return Vt(this.ownerDocument||this,this,E)},normalize:function(){for(var E=this.firstChild;E;){var N=E.nextSibling;N&&N.nodeType==C&&E.nodeType==C?(this.removeChild(N),E.appendData(N.data)):(E.normalize(),E=N)}},isSupported:function(E,N){return this.ownerDocument.implementation.hasFeature(E,N)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(E){for(var N=this;N;){var Q=N._nsMap;if(Q){for(var re in Q)if(Object.prototype.hasOwnProperty.call(Q,re)&&Q[re]===E)return re}N=N.nodeType==S?N.ownerDocument:N.parentNode}return null},lookupNamespaceURI:function(E){for(var N=this;N;){var Q=N._nsMap;if(Q&&Object.prototype.hasOwnProperty.call(Q,E))return Q[E];N=N.nodeType==S?N.ownerDocument:N.parentNode}return null},isDefaultNamespace:function(E){var N=this.lookupPrefix(E);return N==null}};function de(E){return E=="<"&&"&lt;"||E==">"&&"&gt;"||E=="&"&&"&amp;"||E=='"'&&"&quot;"||"&#"+E.charCodeAt()+";"}d(g,se),d(g,se.prototype);function fe(E,N){if(N(E))return!0;if(E=E.firstChild)do if(fe(E,N))return!0;while(E=E.nextSibling)}function pe(){this.ownerDocument=this}function je(E,N,Q){E&&E._inc++;var re=Q.namespaceURI;re===i.XMLNS&&(N._nsMap[Q.prefix?Q.localName:""]=Q.value)}function Be(E,N,Q,re){E&&E._inc++;var Te=Q.namespaceURI;Te===i.XMLNS&&delete N._nsMap[Q.prefix?Q.localName:""]}function Le(E,N,Q){if(E&&E._inc){E._inc++;var re=N.childNodes;if(Q)re[re.length++]=Q;else{for(var Te=N.firstChild,Me=0;Te;)re[Me++]=Te,Te=Te.nextSibling;re.length=Me,delete re[re.length]}}}function Qe(E,N){var Q=N.previousSibling,re=N.nextSibling;return Q?Q.nextSibling=re:E.firstChild=re,re?re.previousSibling=Q:E.lastChild=Q,N.parentNode=null,N.previousSibling=null,N.nextSibling=null,Le(E.ownerDocument,E),N}function Ue(E){return E&&(E.nodeType===se.DOCUMENT_NODE||E.nodeType===se.DOCUMENT_FRAGMENT_NODE||E.nodeType===se.ELEMENT_NODE)}function De(E){return E&&(Ne(E)||$e(E)||ye(E)||E.nodeType===se.DOCUMENT_FRAGMENT_NODE||E.nodeType===se.COMMENT_NODE||E.nodeType===se.PROCESSING_INSTRUCTION_NODE)}function ye(E){return E&&E.nodeType===se.DOCUMENT_TYPE_NODE}function Ne(E){return E&&E.nodeType===se.ELEMENT_NODE}function $e(E){return E&&E.nodeType===se.TEXT_NODE}function Ee(E,N){var Q=E.childNodes||[];if(e(Q,Ne)||ye(N))return!1;var re=e(Q,ye);return!(N&&re&&Q.indexOf(re)>Q.indexOf(N))}function le(E,N){var Q=E.childNodes||[];function re(Me){return Ne(Me)&&Me!==N}if(e(Q,re))return!1;var Te=e(Q,ye);return!(N&&Te&&Q.indexOf(Te)>Q.indexOf(N))}function ce(E,N,Q){if(!Ue(E))throw new k(b,"Unexpected parent node type "+E.nodeType);if(Q&&Q.parentNode!==E)throw new k(q,"child not in parent");if(!De(N)||ye(N)&&E.nodeType!==se.DOCUMENT_NODE)throw new k(b,"Unexpected node type "+N.nodeType+" for parent node type "+E.nodeType)}function me(E,N,Q){var re=E.childNodes||[],Te=N.childNodes||[];if(N.nodeType===se.DOCUMENT_FRAGMENT_NODE){var Me=Te.filter(Ne);if(Me.length>1||e(Te,$e))throw new k(b,"More than one element or text in fragment");if(Me.length===1&&!Ee(E,Q))throw new k(b,"Element in fragment can not be inserted before doctype")}if(Ne(N)&&!Ee(E,Q))throw new k(b,"Only one element can be added and only after doctype");if(ye(N)){if(e(re,ye))throw new k(b,"Only one doctype is allowed");var nt=e(re,Ne);if(Q&&re.indexOf(nt)<re.indexOf(Q))throw new k(b,"Doctype can only be inserted before an element");if(!Q&&nt)throw new k(b,"Doctype can not be appended since element is present")}}function Ie(E,N,Q){var re=E.childNodes||[],Te=N.childNodes||[];if(N.nodeType===se.DOCUMENT_FRAGMENT_NODE){var Me=Te.filter(Ne);if(Me.length>1||e(Te,$e))throw new k(b,"More than one element or text in fragment");if(Me.length===1&&!le(E,Q))throw new k(b,"Element in fragment can not be inserted before doctype")}if(Ne(N)&&!le(E,Q))throw new k(b,"Only one element can be added and only after doctype");if(ye(N)){if(e(re,function(Gt){return ye(Gt)&&Gt!==Q}))throw new k(b,"Only one doctype is allowed");var nt=e(re,Ne);if(Q&&re.indexOf(nt)<re.indexOf(Q))throw new k(b,"Doctype can only be inserted before an element")}}function he(E,N,Q,re){ce(E,N,Q),E.nodeType===se.DOCUMENT_NODE&&(re||me)(E,N,Q);var Te=N.parentNode;if(Te&&Te.removeChild(N),N.nodeType===U){var Me=N.firstChild;if(Me==null)return N;var nt=N.lastChild}else Me=nt=N;var St=Q?Q.previousSibling:E.lastChild;Me.previousSibling=St,nt.nextSibling=Q,St?St.nextSibling=Me:E.firstChild=Me,Q==null?E.lastChild=nt:Q.previousSibling=nt;do{Me.parentNode=E;var Gt=E.ownerDocument||E;Ve(Me,Gt)}while(Me!==nt&&(Me=Me.nextSibling));return Le(E.ownerDocument||E,E),N.nodeType==U&&(N.firstChild=N.lastChild=null),N}function Ve(E,N){if(E.ownerDocument!==N){if(E.ownerDocument=N,E.nodeType===v&&E.attributes)for(var Q=0;Q<E.attributes.length;Q++){var re=E.attributes.item(Q);re&&(re.ownerDocument=N)}for(var Te=E.firstChild;Te;)Ve(Te,N),Te=Te.nextSibling}}function ze(E,N){N.parentNode&&N.parentNode.removeChild(N),N.parentNode=E,N.previousSibling=E.lastChild,N.nextSibling=null,N.previousSibling?N.previousSibling.nextSibling=N:E.firstChild=N,E.lastChild=N,Le(E.ownerDocument,E,N);var Q=E.ownerDocument||E;return Ve(N,Q),N}pe.prototype={nodeName:"#document",nodeType:D,doctype:null,documentElement:null,_inc:1,insertBefore:function(E,N){if(E.nodeType==U){for(var Q=E.firstChild;Q;){var re=Q.nextSibling;this.insertBefore(Q,N),Q=re}return E}return he(this,E,N),Ve(E,this),this.documentElement===null&&E.nodeType===v&&(this.documentElement=E),E},removeChild:function(E){return this.documentElement==E&&(this.documentElement=null),Qe(this,E)},replaceChild:function(E,N){he(this,E,N,Ie),Ve(E,this),N&&this.removeChild(N),Ne(E)&&(this.documentElement=E)},importNode:function(E,N){return Yi(this,E,N)},getElementById:function(E){var N=null;return fe(this.documentElement,function(Q){if(Q.nodeType==v&&Q.getAttribute("id")==E)return N=Q,!0}),N},getElementsByClassName:function(E){var N=l(E);return new $(this,function(Q){var re=[];return N.length>0&&fe(Q.documentElement,function(Te){if(Te!==Q&&Te.nodeType===v){var Me=Te.getAttribute("class");if(Me){var nt=E===Me;if(!nt){var St=l(Me);nt=N.every(u(St))}nt&&re.push(Te)}}}),re})},createElement:function(E){var N=new dt;N.ownerDocument=this,N.nodeName=E,N.tagName=E,N.localName=E,N.childNodes=new A;var Q=N.attributes=new j;return Q._ownerElement=N,N},createDocumentFragment:function(){var E=new xi;return E.ownerDocument=this,E.childNodes=new A,E},createTextNode:function(E){var N=new Ce;return N.ownerDocument=this,N.appendData(E),N},createComment:function(E){var N=new He;return N.ownerDocument=this,N.appendData(E),N},createCDATASection:function(E){if(E.indexOf("]]>")!==-1)throw new k(x,'data contains "]]>"');var N=new Oe;return N.ownerDocument=this,N.appendData(E),N},createProcessingInstruction:function(E,N){var Q=new Ht;return Q.ownerDocument=this,Q.tagName=Q.nodeName=Q.target=E,Q.nodeValue=Q.data=N,Q},createAttribute:function(E){var N=new ge;return N.ownerDocument=this,N.name=E,N.nodeName=E,N.localName=E,N.specified=!0,N},createEntityReference:function(E){var N=new Ze;return N.ownerDocument=this,N.nodeName=E,N},createElementNS:function(E,N){var Q=new dt,re=N.split(":"),Te=Q.attributes=new j;return Q.childNodes=new A,Q.ownerDocument=this,Q.nodeName=N,Q.tagName=N,Q.namespaceURI=E,re.length==2?(Q.prefix=re[0],Q.localName=re[1]):Q.localName=N,Te._ownerElement=Q,Q},createAttributeNS:function(E,N){var Q=new ge,re=N.split(":");return Q.ownerDocument=this,Q.nodeName=N,Q.name=N,Q.namespaceURI=E,Q.specified=!0,re.length==2?(Q.prefix=re[0],Q.localName=re[1]):Q.localName=N,Q}},f(pe,se);function dt(){this._nsMap={}}dt.prototype={nodeType:v,hasAttribute:function(E){return this.getAttributeNode(E)!=null},getAttribute:function(E){var N=this.getAttributeNode(E);return N&&N.value||""},getAttributeNode:function(E){return this.attributes.getNamedItem(E)},setAttribute:function(E,N){var Q=this.ownerDocument.createAttribute(E);Q.value=Q.nodeValue=""+N,this.setAttributeNode(Q)},removeAttribute:function(E){var N=this.getAttributeNode(E);N&&this.removeAttributeNode(N)},appendChild:function(E){return E.nodeType===U?this.insertBefore(E,null):ze(this,E)},setAttributeNode:function(E){return this.attributes.setNamedItem(E)},setAttributeNodeNS:function(E){return this.attributes.setNamedItemNS(E)},removeAttributeNode:function(E){return this.attributes.removeNamedItem(E.nodeName)},removeAttributeNS:function(E,N){var Q=this.getAttributeNodeNS(E,N);Q&&this.removeAttributeNode(Q)},hasAttributeNS:function(E,N){return this.getAttributeNodeNS(E,N)!=null},getAttributeNS:function(E,N){var Q=this.getAttributeNodeNS(E,N);return Q&&Q.value||""},setAttributeNS:function(E,N,Q){var re=this.ownerDocument.createAttributeNS(E,N);re.value=re.nodeValue=""+Q,this.setAttributeNode(re)},getAttributeNodeNS:function(E,N){return this.attributes.getNamedItemNS(E,N)},getElementsByTagName:function(E){return new $(this,function(N){var Q=[];return fe(N,function(re){re!==N&&re.nodeType==v&&(E==="*"||re.tagName==E)&&Q.push(re)}),Q})},getElementsByTagNameNS:function(E,N){return new $(this,function(Q){var re=[];return fe(Q,function(Te){Te!==Q&&Te.nodeType===v&&(E==="*"||Te.namespaceURI===E)&&(N==="*"||Te.localName==N)&&re.push(Te)}),re})}},pe.prototype.getElementsByTagName=dt.prototype.getElementsByTagName,pe.prototype.getElementsByTagNameNS=dt.prototype.getElementsByTagNameNS,f(dt,se);function ge(){}ge.prototype.nodeType=S,f(ge,se);function be(){}be.prototype={data:"",substringData:function(E,N){return this.data.substring(E,E+N)},appendData:function(E){E=this.data+E,this.nodeValue=this.data=E,this.length=E.length},insertData:function(E,N){this.replaceData(E,0,N)},appendChild:function(E){throw new Error(J[b])},deleteData:function(E,N){this.replaceData(E,N,"")},replaceData:function(E,N,Q){var re=this.data.substring(0,E),Te=this.data.substring(E+N);Q=re+Q+Te,this.nodeValue=this.data=Q,this.length=Q.length}},f(be,se);function Ce(){}Ce.prototype={nodeName:"#text",nodeType:C,splitText:function(E){var N=this.data,Q=N.substring(E);N=N.substring(0,E),this.data=this.nodeValue=N,this.length=N.length;var re=this.ownerDocument.createTextNode(Q);return this.parentNode&&this.parentNode.insertBefore(re,this.nextSibling),re}},f(Ce,be);function He(){}He.prototype={nodeName:"#comment",nodeType:L},f(He,be);function Oe(){}Oe.prototype={nodeName:"#cdata-section",nodeType:O},f(Oe,be);function pt(){}pt.prototype.nodeType=M,f(pt,se);function Rt(){}Rt.prototype.nodeType=Y,f(Rt,se);function Pi(){}Pi.prototype.nodeType=w,f(Pi,se);function Ze(){}Ze.prototype.nodeType=T,f(Ze,se);function xi(){}xi.prototype.nodeName="#document-fragment",xi.prototype.nodeType=U,f(xi,se);function Ht(){}Ht.prototype.nodeType=R,f(Ht,se);function Ci(){}Ci.prototype.serializeToString=function(E,N,Q){return yt.call(E,N,Q)},se.prototype.toString=yt;function yt(E,N){var Q=[],re=this.nodeType==9&&this.documentElement||this,Te=re.prefix,Me=re.namespaceURI;if(Me&&Te==null){var Te=re.lookupPrefix(Me);if(Te==null)var nt=[{namespace:Me,prefix:null}]}return zt(this,Q,E,N,nt),Q.join("")}function ti(E,N,Q){var re=E.prefix||"",Te=E.namespaceURI;if(!Te||re==="xml"&&Te===i.XML||Te===i.XMLNS)return!1;for(var Me=Q.length;Me--;){var nt=Q[Me];if(nt.prefix===re)return nt.namespace!==Te}return!0}function ui(E,N,Q){E.push(" ",N,'="',Q.replace(/[<>&"\t\n\r]/g,de),'"')}function zt(E,N,Q,re,Te){if(Te||(Te=[]),re)if(E=re(E),E){if(typeof E=="string"){N.push(E);return}}else return;switch(E.nodeType){case v:var Me=E.attributes,nt=Me.length,lt=E.firstChild,St=E.tagName;Q=i.isHTML(E.namespaceURI)||Q;var Gt=St;if(!Q&&!E.prefix&&E.namespaceURI){for(var Ft,Ot=0;Ot<Me.length;Ot++)if(Me.item(Ot).name==="xmlns"){Ft=Me.item(Ot).value;break}if(!Ft)for(var ii=Te.length-1;ii>=0;ii--){var Je=Te[ii];if(Je.prefix===""&&Je.namespace===E.namespaceURI){Ft=Je.namespace;break}}if(Ft!==E.namespaceURI)for(var ii=Te.length-1;ii>=0;ii--){var Je=Te[ii];if(Je.namespace===E.namespaceURI){Je.prefix&&(Gt=Je.prefix+":"+St);break}}}N.push("<",Gt);for(var ni=0;ni<nt;ni++){var Wt=Me.item(ni);Wt.prefix=="xmlns"?Te.push({prefix:Wt.localName,namespace:Wt.value}):Wt.nodeName=="xmlns"&&Te.push({prefix:"",namespace:Wt.value})}for(var ni=0;ni<nt;ni++){var Wt=Me.item(ni);if(ti(Wt,Q,Te)){var Yt=Wt.prefix||"",kt=Wt.namespaceURI;ui(N,Yt?"xmlns:"+Yt:"xmlns",kt),Te.push({prefix:Yt,namespace:kt})}zt(Wt,N,Q,re,Te)}if(St===Gt&&ti(E,Q,Te)){var Yt=E.prefix||"",kt=E.namespaceURI;ui(N,Yt?"xmlns:"+Yt:"xmlns",kt),Te.push({prefix:Yt,namespace:kt})}if(lt||Q&&!/^(?:meta|link|img|br|hr|input)$/i.test(St)){if(N.push(">"),Q&&/^script$/i.test(St))for(;lt;)lt.data?N.push(lt.data):zt(lt,N,Q,re,Te.slice()),lt=lt.nextSibling;else for(;lt;)zt(lt,N,Q,re,Te.slice()),lt=lt.nextSibling;N.push("</",Gt,">")}else N.push("/>");return;case D:case U:for(var lt=E.firstChild;lt;)zt(lt,N,Q,re,Te.slice()),lt=lt.nextSibling;return;case S:return ui(N,E.name,E.value);case C:return N.push(E.data.replace(/[<&>]/g,de));case O:return N.push("<![CDATA[",E.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case L:return N.push("<!--",E.data,"-->");case M:var We=E.publicId,Si=E.systemId;if(N.push("<!DOCTYPE ",E.name),We)N.push(" PUBLIC ",We),Si&&Si!="."&&N.push(" ",Si),N.push(">");else if(Si&&Si!=".")N.push(" SYSTEM ",Si,">");else{var Mi=E.internalSubset;Mi&&N.push(" [",Mi,"]"),N.push(">")}return;case R:return N.push("<?",E.target," ",E.data,"?>");case T:return N.push("&",E.nodeName,";");default:N.push("??",E.nodeName)}}function Yi(E,N,Q){var re;switch(N.nodeType){case v:re=N.cloneNode(!1),re.ownerDocument=E;case U:break;case S:Q=!0;break}if(re||(re=N.cloneNode(!1)),re.ownerDocument=E,re.parentNode=null,Q)for(var Te=N.firstChild;Te;)re.appendChild(Yi(E,Te,Q)),Te=Te.nextSibling;return re}function Vt(E,N,Q){var re=new N.constructor;for(var Te in N)if(Object.prototype.hasOwnProperty.call(N,Te)){var Me=N[Te];typeof Me!="object"&&Me!=re[Te]&&(re[Te]=Me)}switch(N.childNodes&&(re.childNodes=new A),re.ownerDocument=E,re.nodeType){case v:var nt=N.attributes,St=re.attributes=new j,Gt=nt.length;St._ownerElement=re;for(var Ft=0;Ft<Gt;Ft++)re.setAttributeNode(Vt(E,nt.item(Ft),!0));break;case S:Q=!0}if(Q)for(var Ot=N.firstChild;Ot;)re.appendChild(Vt(E,Ot,Q)),Ot=Ot.nextSibling;return re}function Ei(E,N,Q){E[N]=Q}try{if(Object.defineProperty){let E=function(N){switch(N.nodeType){case v:case U:var Q=[];for(N=N.firstChild;N;)N.nodeType!==7&&N.nodeType!==8&&Q.push(E(N)),N=N.nextSibling;return Q.join("");default:return N.nodeValue}};Object.defineProperty($.prototype,"length",{get:function(){return K(this),this.$$length}}),Object.defineProperty(se.prototype,"textContent",{get:function(){return E(this)},set:function(N){switch(this.nodeType){case v:case U:for(;this.firstChild;)this.removeChild(this.firstChild);(N||String(N))&&this.appendChild(this.ownerDocument.createTextNode(N));break;default:this.data=N,this.value=N,this.nodeValue=N}}}),Ei=function(N,Q,re){N["$$"+Q]=re}}}catch{}return Qi.DocumentType=pt,Qi.DOMException=k,Qi.DOMImplementation=ee,Qi.Element=dt,Qi.Node=se,Qi.NodeList=A,Qi.XMLSerializer=Ci,Qi}var Hr={},No={},Kc;function y4(){return Kc||(Kc=1,(function(s){var e=ka().freeze;s.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),s.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
24
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),s.entityMap=s.HTML_ENTITIES})(No)),No}var $s={},Qc;function T4(){if(Qc)return $s;Qc=1;var s=ka().NAMESPACE,e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),r=new RegExp("^"+e.source+i.source+"*(?::"+e.source+i.source+"*)?$"),a=0,o=1,l=2,u=3,d=4,f=5,g=6,v=7;function S(b,x){this.message=b,this.locator=x,Error.captureStackTrace&&Error.captureStackTrace(this,S)}S.prototype=new Error,S.prototype.name=S.name;function C(){}C.prototype={parse:function(b,x,q){var H=this.domBuilder;H.startDocument(),M(x,x={}),O(b,x,q,H,this.errorHandler),H.endDocument()}};function O(b,x,q,H,k){function A(Ve){if(Ve>65535){Ve-=65536;var ze=55296+(Ve>>10),dt=56320+(Ve&1023);return String.fromCharCode(ze,dt)}else return String.fromCharCode(Ve)}function $(Ve){var ze=Ve.slice(1,-1);return Object.hasOwnProperty.call(q,ze)?q[ze]:ze.charAt(0)==="#"?A(parseInt(ze.substr(1).replace("x","0x"))):(k.error("entity not found:"+Ve),Ve)}function K(Ve){if(Ve>fe){var ze=b.substring(fe,Ve).replace(/&#?\w+;/g,$);ee&&j(fe),H.characters(ze,0,Ve-fe),fe=Ve}}function j(Ve,ze){for(;Ve>=G&&(ze=Z.exec(b));)F=ze.index,G=F+ze[0].length,ee.lineNumber++;ee.columnNumber=Ve-F+1}for(var F=0,G=0,Z=/.*(?:\r\n?|\n)|.*$/g,ee=H.locator,se=[{currentNSMap:x}],de={},fe=0;;){try{var pe=b.indexOf("<",fe);if(pe<0){if(!b.substr(fe).match(/^\s*$/)){var je=H.doc,Be=je.createTextNode(b.substr(fe));je.appendChild(Be),H.currentElement=Be}return}switch(pe>fe&&K(pe),b.charAt(pe+1)){case"/":var le=b.indexOf(">",pe+3),Le=b.substring(pe+2,le).replace(/[ \t\n\r]+$/g,""),Qe=se.pop();le<0?(Le=b.substring(pe+2).replace(/[\s<].*/,""),k.error("end tag name: "+Le+" is not complete:"+Qe.tagName),le=pe+1+Le.length):Le.match(/\s</)&&(Le=Le.replace(/[\s<].*/,""),k.error("end tag name: "+Le+" maybe not complete"),le=pe+1+Le.length);var Ue=Qe.localNSMap,De=Qe.tagName==Le,ye=De||Qe.tagName&&Qe.tagName.toLowerCase()==Le.toLowerCase();if(ye){if(H.endElement(Qe.uri,Qe.localName,Le),Ue)for(var Ne in Ue)Object.prototype.hasOwnProperty.call(Ue,Ne)&&H.endPrefixMapping(Ne);De||k.fatalError("end tag name: "+Le+" is not match the current start tagName:"+Qe.tagName)}else se.push(Qe);le++;break;case"?":ee&&j(pe),le=Y(b,pe,H);break;case"!":ee&&j(pe),le=U(b,pe,H,k);break;default:ee&&j(pe);var $e=new P,Ee=se[se.length-1].currentNSMap,le=w(b,pe,$e,Ee,$,k),ce=$e.length;if(!$e.closed&&D(b,le,$e.tagName,de)&&($e.closed=!0,q.nbsp||k.warning("unclosed xml attribute")),ee&&ce){for(var me=T(ee,{}),Ie=0;Ie<ce;Ie++){var he=$e[Ie];j(he.offset),he.locator=T(ee,{})}H.locator=me,R($e,H,Ee)&&se.push($e),H.locator=ee}else R($e,H,Ee)&&se.push($e);s.isHTML($e.uri)&&!$e.closed?le=L(b,le,$e.tagName,$,H):le++}}catch(Ve){if(Ve instanceof S)throw Ve;k.error("element parse error: "+Ve),le=-1}le>fe?fe=le:K(Math.max(pe,fe)+1)}}function T(b,x){return x.lineNumber=b.lineNumber,x.columnNumber=b.columnNumber,x}function w(b,x,q,H,k,A){function $(ee,se,de){q.attributeNames.hasOwnProperty(ee)&&A.fatalError("Attribute "+ee+" redefined"),q.addValue(ee,se.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,k),de)}for(var K,j,F=++x,G=a;;){var Z=b.charAt(F);switch(Z){case"=":if(G===o)K=b.slice(x,F),G=u;else if(G===l)G=u;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(G===u||G===o)if(G===o&&(A.warning('attribute value must after "="'),K=b.slice(x,F)),x=F+1,F=b.indexOf(Z,x),F>0)j=b.slice(x,F),$(K,j,x-1),G=f;else throw new Error("attribute value no end '"+Z+"' match");else if(G==d)j=b.slice(x,F),$(K,j,x),A.warning('attribute "'+K+'" missed start quot('+Z+")!!"),x=F+1,G=f;else throw new Error('attribute value must after "="');break;case"/":switch(G){case a:q.setTagName(b.slice(x,F));case f:case g:case v:G=v,q.closed=!0;case d:case o:break;case l:q.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return A.error("unexpected end of input"),G==a&&q.setTagName(b.slice(x,F)),F;case">":switch(G){case a:q.setTagName(b.slice(x,F));case f:case g:case v:break;case d:case o:j=b.slice(x,F),j.slice(-1)==="/"&&(q.closed=!0,j=j.slice(0,-1));case l:G===l&&(j=K),G==d?(A.warning('attribute "'+j+'" missed quot(")!'),$(K,j,x)):((!s.isHTML(H[""])||!j.match(/^(?:disabled|checked|selected)$/i))&&A.warning('attribute "'+j+'" missed value!! "'+j+'" instead!!'),$(j,j,x));break;case u:throw new Error("attribute value missed!!")}return F;case"€":Z=" ";default:if(Z<=" ")switch(G){case a:q.setTagName(b.slice(x,F)),G=g;break;case o:K=b.slice(x,F),G=l;break;case d:var j=b.slice(x,F);A.warning('attribute "'+j+'" missed quot(")!!'),$(K,j,x);case f:G=g;break}else switch(G){case l:q.tagName,(!s.isHTML(H[""])||!K.match(/^(?:disabled|checked|selected)$/i))&&A.warning('attribute "'+K+'" missed value!! "'+K+'" instead2!!'),$(K,K,x),x=F,G=o;break;case f:A.warning('attribute space is required"'+K+'"!!');case g:G=o,x=F;break;case u:G=d,x=F;break;case v:throw new Error("elements closed character '/' and '>' must be connected to")}}F++}}function R(b,x,q){for(var H=b.tagName,k=null,Z=b.length;Z--;){var A=b[Z],$=A.qName,K=A.value,ee=$.indexOf(":");if(ee>0)var j=A.prefix=$.slice(0,ee),F=$.slice(ee+1),G=j==="xmlns"&&F;else F=$,j=null,G=$==="xmlns"&&"";A.localName=F,G!==!1&&(k==null&&(k={},M(q,q={})),q[G]=k[G]=K,A.uri=s.XMLNS,x.startPrefixMapping(G,K))}for(var Z=b.length;Z--;){A=b[Z];var j=A.prefix;j&&(j==="xml"&&(A.uri=s.XML),j!=="xmlns"&&(A.uri=q[j||""]))}var ee=H.indexOf(":");ee>0?(j=b.prefix=H.slice(0,ee),F=b.localName=H.slice(ee+1)):(j=null,F=b.localName=H);var se=b.uri=q[j||""];if(x.startElement(se,F,H,b),b.closed){if(x.endElement(se,F,H),k)for(j in k)Object.prototype.hasOwnProperty.call(k,j)&&x.endPrefixMapping(j)}else return b.currentNSMap=q,b.localNSMap=k,!0}function L(b,x,q,H,k){if(/^(?:script|textarea)$/i.test(q)){var A=b.indexOf("</"+q+">",x),$=b.substring(x+1,A);if(/[&<]/.test($))return/^script$/i.test(q)?(k.characters($,0,$.length),A):($=$.replace(/&#?\w+;/g,H),k.characters($,0,$.length),A)}return x+1}function D(b,x,q,H){var k=H[q];return k==null&&(k=b.lastIndexOf("</"+q+">"),k<x&&(k=b.lastIndexOf("</"+q)),H[q]=k),k<x}function M(b,x){for(var q in b)Object.prototype.hasOwnProperty.call(b,q)&&(x[q]=b[q])}function U(b,x,q,H){var k=b.charAt(x+2);switch(k){case"-":if(b.charAt(x+3)==="-"){var A=b.indexOf("-->",x+4);return A>x?(q.comment(b,x+4,A-x-4),A+3):(H.error("Unclosed comment"),-1)}else return-1;default:if(b.substr(x+3,6)=="CDATA["){var A=b.indexOf("]]>",x+9);return q.startCDATA(),q.characters(b,x+9,A-x-9),q.endCDATA(),A+3}var $=J(b,x),K=$.length;if(K>1&&/!doctype/i.test($[0][0])){var j=$[1][0],F=!1,G=!1;K>3&&(/^public$/i.test($[2][0])?(F=$[3][0],G=K>4&&$[4][0]):/^system$/i.test($[2][0])&&(G=$[3][0]));var Z=$[K-1];return q.startDTD(j,F,G),q.endDTD(),Z.index+Z[0].length}}return-1}function Y(b,x,q){var H=b.indexOf("?>",x);if(H){var k=b.substring(x,H).match(/^<\?(\S*)\s*([\s\S]*?)$/);return k?(k[0].length,q.processingInstruction(k[1],k[2]),H+2):-1}return-1}function P(){this.attributeNames={}}P.prototype={setTagName:function(b){if(!r.test(b))throw new Error("invalid tagName:"+b);this.tagName=b},addValue:function(b,x,q){if(!r.test(b))throw new Error("invalid attribute:"+b);this.attributeNames[b]=this.length,this[this.length++]={qName:b,value:x,offset:q}},length:0,getLocalName:function(b){return this[b].localName},getLocator:function(b){return this[b].locator},getQName:function(b){return this[b].qName},getURI:function(b){return this[b].uri},getValue:function(b){return this[b].value}};function J(b,x){var q,H=[],k=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(k.lastIndex=x,k.exec(b);q=k.exec(b);)if(H.push(q),q[1])return H}return $s.XMLReader=C,$s.ParseError=S,$s}var Zc;function b4(){if(Zc)return Hr;Zc=1;var s=ka(),e=Ph(),i=y4(),r=T4(),a=e.DOMImplementation,o=s.NAMESPACE,l=r.ParseError,u=r.XMLReader;function d(w){return w.replace(/\r[\n\u0085]/g,`
25
+ `).replace(/[\r\u0085\u2028]/g,`
26
+ `)}function f(w){this.options=w||{locator:{}}}f.prototype.parseFromString=function(w,R){var L=this.options,D=new u,M=L.domBuilder||new v,U=L.errorHandler,Y=L.locator,P=L.xmlns||{},J=/\/x?html?$/.test(R),b=J?i.HTML_ENTITIES:i.XML_ENTITIES;Y&&M.setDocumentLocator(Y),D.errorHandler=g(U,M,Y),D.domBuilder=L.domBuilder||M,J&&(P[""]=o.HTML),P.xml=P.xml||o.XML;var x=L.normalizeLineEndings||d;return w&&typeof w=="string"?D.parse(x(w),P,b):D.errorHandler.error("invalid doc source"),M.doc};function g(w,R,L){if(!w){if(R instanceof v)return R;w=R}var D={},M=w instanceof Function;L=L||{};function U(Y){var P=w[Y];!P&&M&&(P=w.length==2?function(J){w(Y,J)}:w),D[Y]=P&&function(J){P("[xmldom "+Y+"] "+J+C(L))}||function(){}}return U("warning"),U("error"),U("fatalError"),D}function v(){this.cdata=!1}function S(w,R){R.lineNumber=w.lineNumber,R.columnNumber=w.columnNumber}v.prototype={startDocument:function(){this.doc=new a().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(w,R,L,D){var M=this.doc,U=M.createElementNS(w,L||R),Y=D.length;T(this,U),this.currentElement=U,this.locator&&S(this.locator,U);for(var P=0;P<Y;P++){var w=D.getURI(P),J=D.getValue(P),L=D.getQName(P),b=M.createAttributeNS(w,L);this.locator&&S(D.getLocator(P),b),b.value=b.nodeValue=J,U.setAttributeNode(b)}},endElement:function(w,R,L){var D=this.currentElement;D.tagName,this.currentElement=D.parentNode},startPrefixMapping:function(w,R){},endPrefixMapping:function(w){},processingInstruction:function(w,R){var L=this.doc.createProcessingInstruction(w,R);this.locator&&S(this.locator,L),T(this,L)},ignorableWhitespace:function(w,R,L){},characters:function(w,R,L){if(w=O.apply(this,arguments),w){if(this.cdata)var D=this.doc.createCDATASection(w);else var D=this.doc.createTextNode(w);this.currentElement?this.currentElement.appendChild(D):/^\s*$/.test(w)&&this.doc.appendChild(D),this.locator&&S(this.locator,D)}},skippedEntity:function(w){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(w){(this.locator=w)&&(w.lineNumber=0)},comment:function(w,R,L){w=O.apply(this,arguments);var D=this.doc.createComment(w);this.locator&&S(this.locator,D),T(this,D)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(w,R,L){var D=this.doc.implementation;if(D&&D.createDocumentType){var M=D.createDocumentType(w,R,L);this.locator&&S(this.locator,M),T(this,M),this.doc.doctype=M}},warning:function(w){console.warn("[xmldom warning] "+w,C(this.locator))},error:function(w){console.error("[xmldom error] "+w,C(this.locator))},fatalError:function(w){throw new l(w,this.locator)}};function C(w){if(w)return`
27
+ @`+(w.systemId||"")+"#[line:"+w.lineNumber+",col:"+w.columnNumber+"]"}function O(w,R,L){return typeof w=="string"?w.substr(R,L):w.length>=R+L||R?new java.lang.String(w,R,L)+"":w}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(w){v.prototype[w]=function(){return null}});function T(w,R){w.currentElement?w.currentElement.appendChild(R):w.doc.appendChild(R)}return Hr.__DOMHandler=v,Hr.normalizeLineEndings=d,Hr.DOMParser=f,Hr}var Jc;function x4(){if(Jc)return jr;Jc=1;var s=Ph();return jr.DOMImplementation=s.DOMImplementation,jr.XMLSerializer=s.XMLSerializer,jr.DOMParser=b4().DOMParser,jr}var C4=x4();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const ed=s=>!!s&&typeof s=="object",Nt=(...s)=>s.reduce((e,i)=>(typeof i!="object"||Object.keys(i).forEach(r=>{Array.isArray(e[r])&&Array.isArray(i[r])?e[r]=e[r].concat(i[r]):ed(e[r])&&ed(i[r])?e[r]=Nt(e[r],i[r]):e[r]=i[r]}),e),{}),Mh=s=>Object.keys(s).map(e=>s[e]),E4=(s,e)=>{const i=[];for(let r=s;r<e;r++)i.push(r);return i},lr=s=>s.reduce((e,i)=>e.concat(i),[]),Rh=s=>{if(!s.length)return[];const e=[];for(let i=0;i<s.length;i++)e.push(s[i]);return e},S4=(s,e)=>s.reduce((i,r,a)=>(r[e]&&i.push(a),i),[]),k4=(s,e)=>Mh(s.reduce((i,r)=>(r.forEach(a=>{i[e(a)]=a}),i),{}));var ur={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const ns=({baseUrl:s="",source:e="",range:i="",indexRange:r=""})=>{const a={uri:e,resolvedUri:Sa(s||"",e)};if(i||r){const l=(i||r).split("-");let u=W.BigInt?W.BigInt(l[0]):parseInt(l[0],10),d=W.BigInt?W.BigInt(l[1]):parseInt(l[1],10);u<Number.MAX_SAFE_INTEGER&&typeof u=="bigint"&&(u=Number(u)),d<Number.MAX_SAFE_INTEGER&&typeof d=="bigint"&&(d=Number(d));let f;typeof d=="bigint"||typeof u=="bigint"?f=W.BigInt(d)-W.BigInt(u)+W.BigInt(1):f=d-u+1,typeof f=="bigint"&&f<Number.MAX_SAFE_INTEGER&&(f=Number(f)),a.byterange={length:f,offset:u}}return a},w4=s=>{let e;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=W.BigInt(s.offset)+W.BigInt(s.length)-W.BigInt(1):e=s.offset+s.length-1,`${s.offset}-${e}`},td=s=>(s&&typeof s!="number"&&(s=parseInt(s,10)),isNaN(s)?null:s),D4={static(s){const{duration:e,timescale:i=1,sourceDuration:r,periodDuration:a}=s,o=td(s.endNumber),l=e/i;return typeof o=="number"?{start:0,end:o}:typeof a=="number"?{start:0,end:a/l}:{start:0,end:r/l}},dynamic(s){const{NOW:e,clientOffset:i,availabilityStartTime:r,timescale:a=1,duration:o,periodStart:l=0,minimumUpdatePeriod:u=0,timeShiftBufferDepth:d=1/0}=s,f=td(s.endNumber),g=(e+i)/1e3,v=r+l,C=g+u-v,O=Math.ceil(C*a/o),T=Math.floor((g-v-d)*a/o),w=Math.floor((g-v)*a/o);return{start:Math.max(0,T),end:typeof f=="number"?f:Math.min(O,w)}}},A4=s=>e=>{const{duration:i,timescale:r=1,periodStart:a,startNumber:o=1}=s;return{number:o+e,duration:i/r,timeline:a,time:e*i}},Pl=s=>{const{type:e,duration:i,timescale:r=1,periodDuration:a,sourceDuration:o}=s,{start:l,end:u}=D4[e](s),d=E4(l,u).map(A4(s));if(e==="static"){const f=d.length-1,g=typeof a=="number"?a:o;d[f].duration=g-i/r*f}return d},Vh=s=>{const{baseUrl:e,initialization:i={},sourceDuration:r,indexRange:a="",periodStart:o,presentationTime:l,number:u=0,duration:d}=s;if(!e)throw new Error(ur.NO_BASE_URL);const f=ns({baseUrl:e,source:i.sourceURL,range:i.range}),g=ns({baseUrl:e,source:e,indexRange:a});if(g.map=f,d){const v=Pl(s);v.length&&(g.duration=v[0].duration,g.timeline=v[0].timeline)}else r&&(g.duration=r,g.timeline=o);return g.presentationTime=l||o,g.number=u,[g]},Ml=(s,e,i)=>{const r=s.sidx.map?s.sidx.map:null,a=s.sidx.duration,o=s.timeline||0,l=s.sidx.byterange,u=l.offset+l.length,d=e.timescale,f=e.references.filter(w=>w.referenceType!==1),g=[],v=s.endList?"static":"dynamic",S=s.sidx.timeline;let C=S,O=s.mediaSequence||0,T;typeof e.firstOffset=="bigint"?T=W.BigInt(u)+e.firstOffset:T=u+e.firstOffset;for(let w=0;w<f.length;w++){const R=e.references[w],L=R.referencedSize,D=R.subsegmentDuration;let M;typeof T=="bigint"?M=T+W.BigInt(L)-W.BigInt(1):M=T+L-1;const U=`${T}-${M}`,P=Vh({baseUrl:i,timescale:d,timeline:o,periodStart:S,presentationTime:C,number:O,duration:D,sourceDuration:a,indexRange:U,type:v})[0];r&&(P.map=r),g.push(P),typeof T=="bigint"?T+=W.BigInt(L):T+=L,C+=D/d,O++}return s.segments=g,s},N4=["AUDIO","SUBTITLES"],I4=1/60,Fh=s=>k4(s,({timeline:e})=>e).sort((e,i)=>e.timeline>i.timeline?1:-1),O4=(s,e)=>{for(let i=0;i<s.length;i++)if(s[i].attributes.NAME===e)return s[i];return null},id=s=>{let e=[];return _4(s,N4,(i,r,a,o)=>{e=e.concat(i.playlists||[])}),e},nd=({playlist:s,mediaSequence:e})=>{s.mediaSequence=e,s.segments.forEach((i,r)=>{i.number=s.mediaSequence+r})},B4=({oldPlaylists:s,newPlaylists:e,timelineStarts:i})=>{e.forEach(r=>{r.discontinuitySequence=i.findIndex(function({timeline:d}){return d===r.timeline});const a=O4(s,r.attributes.NAME);if(!a||r.sidx)return;const o=r.segments[0],l=a.segments.findIndex(function(d){return Math.abs(d.presentationTime-o.presentationTime)<I4});if(l===-1){nd({playlist:r,mediaSequence:a.mediaSequence+a.segments.length}),r.segments[0].discontinuity=!0,r.discontinuityStarts.unshift(0),(!a.segments.length&&r.timeline>a.timeline||a.segments.length&&r.timeline>a.segments[a.segments.length-1].timeline)&&r.discontinuitySequence--;return}a.segments[l].discontinuity&&!o.discontinuity&&(o.discontinuity=!0,r.discontinuityStarts.unshift(0),r.discontinuitySequence--),nd({playlist:r,mediaSequence:a.segments[l].number})})},L4=({oldManifest:s,newManifest:e})=>{const i=s.playlists.concat(id(s)),r=e.playlists.concat(id(e));return e.timelineStarts=Fh([s.timelineStarts,e.timelineStarts]),B4({oldPlaylists:i,newPlaylists:r,timelineStarts:e.timelineStarts}),e},wa=s=>s&&s.uri+"-"+w4(s.byterange),Io=s=>{const e=s.reduce(function(r,a){return r[a.attributes.baseUrl]||(r[a.attributes.baseUrl]=[]),r[a.attributes.baseUrl].push(a),r},{});let i=[];return Object.values(e).forEach(r=>{const a=Mh(r.reduce((o,l)=>{const u=l.attributes.id+(l.attributes.lang||"");return o[u]?(l.segments&&(l.segments[0]&&(l.segments[0].discontinuity=!0),o[u].segments.push(...l.segments)),l.attributes.contentProtection&&(o[u].attributes.contentProtection=l.attributes.contentProtection)):(o[u]=l,o[u].attributes.timelineStarts=[]),o[u].attributes.timelineStarts.push({start:l.attributes.periodStart,timeline:l.attributes.periodStart}),o},{}));i=i.concat(a)}),i.map(r=>(r.discontinuityStarts=S4(r.segments||[],"discontinuity"),r))},Rl=(s,e)=>{const i=wa(s.sidx),r=i&&e[i]&&e[i].sidx;return r&&Ml(s,r,s.sidx.resolvedUri),s},P4=(s,e={})=>{if(!Object.keys(e).length)return s;for(const i in s)s[i]=Rl(s[i],e);return s},M4=({attributes:s,segments:e,sidx:i,mediaSequence:r,discontinuitySequence:a,discontinuityStarts:o},l)=>{const u={attributes:{NAME:s.id,BANDWIDTH:s.bandwidth,CODECS:s.codecs,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuitySequence:a,discontinuityStarts:o,timelineStarts:s.timelineStarts,mediaSequence:r,segments:e};return s.contentProtection&&(u.contentProtection=s.contentProtection),s.serviceLocation&&(u.attributes.serviceLocation=s.serviceLocation),i&&(u.sidx=i),l&&(u.attributes.AUDIO="audio",u.attributes.SUBTITLES="subs"),u},R4=({attributes:s,segments:e,mediaSequence:i,discontinuityStarts:r,discontinuitySequence:a})=>{typeof e>"u"&&(e=[{uri:s.baseUrl,timeline:s.periodStart,resolvedUri:s.baseUrl||"",duration:s.sourceDuration,number:0}],s.duration=s.sourceDuration);const o={NAME:s.id,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1};s.codecs&&(o.CODECS=s.codecs);const l={attributes:o,uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,timelineStarts:s.timelineStarts,discontinuityStarts:r,discontinuitySequence:a,mediaSequence:i,segments:e};return s.serviceLocation&&(l.attributes.serviceLocation=s.serviceLocation),l},V4=(s,e={},i=!1)=>{let r;const a=s.reduce((o,l)=>{const u=l.attributes.role&&l.attributes.role.value||"",d=l.attributes.lang||"";let f=l.attributes.label||"main";if(d&&!l.attributes.label){const v=u?` (${u})`:"";f=`${l.attributes.lang}${v}`}o[f]||(o[f]={language:d,autoselect:!0,default:u==="main",playlists:[],uri:""});const g=Rl(M4(l,i),e);return o[f].playlists.push(g),typeof r>"u"&&u==="main"&&(r=l,r.default=!0),o},{});if(!r){const o=Object.keys(a)[0];a[o].default=!0}return a},F4=(s,e={})=>s.reduce((i,r)=>{const a=r.attributes.label||r.attributes.lang||"text",o=r.attributes.lang||"und";return i[a]||(i[a]={language:o,default:!1,autoselect:!1,playlists:[],uri:""}),i[a].playlists.push(Rl(R4(r),e)),i},{}),$4=s=>s.reduce((e,i)=>(i&&i.forEach(r=>{const{channel:a,language:o}=r;e[o]={autoselect:!1,default:!1,instreamId:a,language:o},r.hasOwnProperty("aspectRatio")&&(e[o].aspectRatio=r.aspectRatio),r.hasOwnProperty("easyReader")&&(e[o].easyReader=r.easyReader),r.hasOwnProperty("3D")&&(e[o]["3D"]=r["3D"])}),e),{}),U4=({attributes:s,segments:e,sidx:i,discontinuityStarts:r})=>{const a={attributes:{NAME:s.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:s.width,height:s.height},CODECS:s.codecs,BANDWIDTH:s.bandwidth,"PROGRAM-ID":1},uri:"",endList:s.type==="static",timeline:s.periodStart,resolvedUri:s.baseUrl||"",targetDuration:s.duration,discontinuityStarts:r,timelineStarts:s.timelineStarts,segments:e};return s.frameRate&&(a.attributes["FRAME-RATE"]=s.frameRate),s.contentProtection&&(a.contentProtection=s.contentProtection),s.serviceLocation&&(a.attributes.serviceLocation=s.serviceLocation),i&&(a.sidx=i),a},q4=({attributes:s})=>s.mimeType==="video/mp4"||s.mimeType==="video/webm"||s.contentType==="video",j4=({attributes:s})=>s.mimeType==="audio/mp4"||s.mimeType==="audio/webm"||s.contentType==="audio",H4=({attributes:s})=>s.mimeType==="text/vtt"||s.contentType==="text",z4=(s,e)=>{s.forEach(i=>{i.mediaSequence=0,i.discontinuitySequence=e.findIndex(function({timeline:r}){return r===i.timeline}),i.segments&&i.segments.forEach((r,a)=>{r.number=a})})},rd=s=>s?Object.keys(s).reduce((e,i)=>{const r=s[i];return e.concat(r.playlists)},[]):[],G4=({dashPlaylists:s,locations:e,contentSteering:i,sidxMapping:r={},previousManifest:a,eventStream:o})=>{if(!s.length)return{};const{sourceDuration:l,type:u,suggestedPresentationDelay:d,minimumUpdatePeriod:f}=s[0].attributes,g=Io(s.filter(q4)).map(U4),v=Io(s.filter(j4)),S=Io(s.filter(H4)),C=s.map(M=>M.attributes.captionServices).filter(Boolean),O={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:l,playlists:P4(g,r)};f>=0&&(O.minimumUpdatePeriod=f*1e3),e&&(O.locations=e),i&&(O.contentSteering=i),u==="dynamic"&&(O.suggestedPresentationDelay=d),o&&o.length>0&&(O.eventStream=o);const T=O.playlists.length===0,w=v.length?V4(v,r,T):null,R=S.length?F4(S,r):null,L=g.concat(rd(w),rd(R)),D=L.map(({timelineStarts:M})=>M);return O.timelineStarts=Fh(D),z4(L,O.timelineStarts),w&&(O.mediaGroups.AUDIO.audio=w),R&&(O.mediaGroups.SUBTITLES.subs=R),C.length&&(O.mediaGroups["CLOSED-CAPTIONS"].cc=$4(C)),a?L4({oldManifest:a,newManifest:O}):O},W4=(s,e,i)=>{const{NOW:r,clientOffset:a,availabilityStartTime:o,timescale:l=1,periodStart:u=0,minimumUpdatePeriod:d=0}=s,f=(r+a)/1e3,g=o+u,S=f+d-g;return Math.ceil((S*l-e)/i)},$h=(s,e)=>{const{type:i,minimumUpdatePeriod:r=0,media:a="",sourceDuration:o,timescale:l=1,startNumber:u=1,periodStart:d}=s,f=[];let g=-1;for(let v=0;v<e.length;v++){const S=e[v],C=S.d,O=S.r||0,T=S.t||0;g<0&&(g=T),T&&T>g&&(g=T);let w;if(O<0){const D=v+1;D===e.length?i==="dynamic"&&r>0&&a.indexOf("$Number$")>0?w=W4(s,g,C):w=(o*l-g)/C:w=(e[D].t-g)/C}else w=O+1;const R=u+f.length+w;let L=u+f.length;for(;L<R;)f.push({number:L,duration:C/l,time:g,timeline:d}),g+=C,L++}return f},Y4=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,X4=s=>(e,i,r,a)=>{if(e==="$$")return"$";if(typeof s[i]>"u")return e;const o=""+s[i];return i==="RepresentationID"||(r?a=parseInt(a,10):a=1,o.length>=a)?o:`${new Array(a-o.length+1).join("0")}${o}`},sd=(s,e)=>s.replace(Y4,X4(e)),K4=(s,e)=>!s.duration&&!e?[{number:s.startNumber||1,duration:s.sourceDuration,time:0,timeline:s.periodStart}]:s.duration?Pl(s):$h(s,e),Q4=(s,e)=>{const i={RepresentationID:s.id,Bandwidth:s.bandwidth||0},{initialization:r={sourceURL:"",range:""}}=s,a=ns({baseUrl:s.baseUrl,source:sd(r.sourceURL,i),range:r.range});return K4(s,e).map(l=>{i.Number=l.number,i.Time=l.time;const u=sd(s.media||"",i),d=s.timescale||1,f=s.presentationTimeOffset||0,g=s.periodStart+(l.time-f)/d;return{uri:u,timeline:l.timeline,duration:l.duration,resolvedUri:Sa(s.baseUrl||"",u),map:a,number:l.number,presentationTime:g}})},Z4=(s,e)=>{const{baseUrl:i,initialization:r={}}=s,a=ns({baseUrl:i,source:r.sourceURL,range:r.range}),o=ns({baseUrl:i,source:e.media,range:e.mediaRange});return o.map=a,o},J4=(s,e)=>{const{duration:i,segmentUrls:r=[],periodStart:a}=s;if(!i&&!e||i&&e)throw new Error(ur.SEGMENT_TIME_UNSPECIFIED);const o=r.map(d=>Z4(s,d));let l;return i&&(l=Pl(s)),e&&(l=$h(s,e)),l.map((d,f)=>{if(o[f]){const g=o[f],v=s.timescale||1,S=s.presentationTimeOffset||0;return g.timeline=d.timeline,g.duration=d.duration,g.number=d.number,g.presentationTime=a+(d.time-S)/v,g}}).filter(d=>d)},e8=({attributes:s,segmentInfo:e})=>{let i,r;e.template?(r=Q4,i=Nt(s,e.template)):e.base?(r=Vh,i=Nt(s,e.base)):e.list&&(r=J4,i=Nt(s,e.list));const a={attributes:s};if(!r)return a;const o=r(i,e.segmentTimeline);if(i.duration){const{duration:l,timescale:u=1}=i;i.duration=l/u}else o.length?i.duration=o.reduce((l,u)=>Math.max(l,Math.ceil(u.duration)),0):i.duration=0;return a.attributes=i,a.segments=o,e.base&&i.indexRange&&(a.sidx=o[0],a.segments=[]),a},t8=s=>s.map(e8),ft=(s,e)=>Rh(s.childNodes).filter(({tagName:i})=>i===e),ls=s=>s.textContent.trim(),i8=s=>parseFloat(s.split("/").reduce((e,i)=>e/i)),zn=s=>{const u=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(s);if(!u)return 0;const[d,f,g,v,S,C]=u.slice(1);return parseFloat(d||0)*31536e3+parseFloat(f||0)*2592e3+parseFloat(g||0)*86400+parseFloat(v||0)*3600+parseFloat(S||0)*60+parseFloat(C||0)},n8=s=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(s)&&(s+="Z"),Date.parse(s)),ad={mediaPresentationDuration(s){return zn(s)},availabilityStartTime(s){return n8(s)/1e3},minimumUpdatePeriod(s){return zn(s)},suggestedPresentationDelay(s){return zn(s)},type(s){return s},timeShiftBufferDepth(s){return zn(s)},start(s){return zn(s)},width(s){return parseInt(s,10)},height(s){return parseInt(s,10)},bandwidth(s){return parseInt(s,10)},frameRate(s){return i8(s)},startNumber(s){return parseInt(s,10)},timescale(s){return parseInt(s,10)},presentationTimeOffset(s){return parseInt(s,10)},duration(s){const e=parseInt(s,10);return isNaN(e)?zn(s):e},d(s){return parseInt(s,10)},t(s){return parseInt(s,10)},r(s){return parseInt(s,10)},presentationTime(s){return parseInt(s,10)},DEFAULT(s){return s}},Ct=s=>s&&s.attributes?Rh(s.attributes).reduce((e,i)=>{const r=ad[i.name]||ad.DEFAULT;return e[i.name]=r(i.value),e},{}):{},r8={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Da=(s,e)=>e.length?lr(s.map(function(i){return e.map(function(r){const a=ls(r),o=Sa(i.baseUrl,a),l=Nt(Ct(r),{baseUrl:o});return o!==a&&!l.serviceLocation&&i.serviceLocation&&(l.serviceLocation=i.serviceLocation),l})})):s,Vl=s=>{const e=ft(s,"SegmentTemplate")[0],i=ft(s,"SegmentList")[0],r=i&&ft(i,"SegmentURL").map(v=>Nt({tag:"SegmentURL"},Ct(v))),a=ft(s,"SegmentBase")[0],o=i||e,l=o&&ft(o,"SegmentTimeline")[0],u=i||a||e,d=u&&ft(u,"Initialization")[0],f=e&&Ct(e);f&&d?f.initialization=d&&Ct(d):f&&f.initialization&&(f.initialization={sourceURL:f.initialization});const g={template:f,segmentTimeline:l&&ft(l,"S").map(v=>Ct(v)),list:i&&Nt(Ct(i),{segmentUrls:r,initialization:Ct(d)}),base:a&&Nt(Ct(a),{initialization:Ct(d)})};return Object.keys(g).forEach(v=>{g[v]||delete g[v]}),g},s8=(s,e,i)=>r=>{const a=ft(r,"BaseURL"),o=Da(e,a),l=Nt(s,Ct(r)),u=Vl(r);return o.map(d=>({segmentInfo:Nt(i,u),attributes:Nt(l,d)}))},a8=s=>s.reduce((e,i)=>{const r=Ct(i);r.schemeIdUri&&(r.schemeIdUri=r.schemeIdUri.toLowerCase());const a=r8[r.schemeIdUri];if(a){e[a]={attributes:r};const o=ft(i,"cenc:pssh")[0];if(o){const l=ls(o);e[a].pssh=l&&Ah(l)}}return e},{}),o8=s=>{if(s.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(i=>{let r,a;return a=i,/^CC\d=/.test(i)?[r,a]=i.split("="):/^CC\d$/.test(i)&&(r=i),{channel:r,language:a}});if(s.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof s.value!="string"?[]:s.value.split(";")).map(i=>{const r={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(i)){const[a,o=""]=i.split("=");r.channel=a,r.language=i,o.split(",").forEach(l=>{const[u,d]=l.split(":");u==="lang"?r.language=d:u==="er"?r.easyReader=Number(d):u==="war"?r.aspectRatio=Number(d):u==="3D"&&(r["3D"]=Number(d))})}else r.language=i;return r.channel&&(r.channel="SERVICE"+r.channel),r})},l8=s=>lr(ft(s.node,"EventStream").map(e=>{const i=Ct(e),r=i.schemeIdUri;return ft(e,"Event").map(a=>{const o=Ct(a),l=o.presentationTime||0,u=i.timescale||1,d=o.duration||0,f=l/u+s.attributes.start;return{schemeIdUri:r,value:i.value,id:o.id,start:f,end:f+d/u,messageData:ls(a)||o.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),u8=(s,e,i)=>r=>{const a=Ct(r),o=Da(e,ft(r,"BaseURL")),l=ft(r,"Role")[0],u={role:Ct(l)};let d=Nt(s,a,u);const f=ft(r,"Accessibility")[0],g=o8(Ct(f));g&&(d=Nt(d,{captionServices:g}));const v=ft(r,"Label")[0];if(v&&v.childNodes.length){const w=v.childNodes[0].nodeValue.trim();d=Nt(d,{label:w})}const S=a8(ft(r,"ContentProtection"));Object.keys(S).length&&(d=Nt(d,{contentProtection:S}));const C=Vl(r),O=ft(r,"Representation"),T=Nt(i,C);return lr(O.map(s8(d,o,T)))},c8=(s,e)=>(i,r)=>{const a=Da(e,ft(i.node,"BaseURL")),o=Nt(s,{periodStart:i.attributes.start});typeof i.attributes.duration=="number"&&(o.periodDuration=i.attributes.duration);const l=ft(i.node,"AdaptationSet"),u=Vl(i.node);return lr(l.map(u8(o,a,u)))},d8=(s,e)=>{if(s.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!s.length)return null;const i=Nt({serverURL:ls(s[0])},Ct(s[0]));return i.queryBeforeStart=i.queryBeforeStart==="true",i},h8=({attributes:s,priorPeriodAttributes:e,mpdType:i})=>typeof s.start=="number"?s.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&i==="static"?0:null,f8=(s,e={})=>{const{manifestUri:i="",NOW:r=Date.now(),clientOffset:a=0,eventHandler:o=function(){}}=e,l=ft(s,"Period");if(!l.length)throw new Error(ur.INVALID_NUMBER_OF_PERIOD);const u=ft(s,"Location"),d=Ct(s),f=Da([{baseUrl:i}],ft(s,"BaseURL")),g=ft(s,"ContentSteering");d.type=d.type||"static",d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=r,d.clientOffset=a,u.length&&(d.locations=u.map(ls));const v=[];return l.forEach((S,C)=>{const O=Ct(S),T=v[C-1];O.start=h8({attributes:O,priorPeriodAttributes:T?T.attributes:null,mpdType:d.type}),v.push({node:S,attributes:O})}),{locations:d.locations,contentSteeringInfo:d8(g,o),representationInfo:lr(v.map(c8(d,f))),eventStream:lr(v.map(l8))}},Uh=s=>{if(s==="")throw new Error(ur.DASH_EMPTY_MANIFEST);const e=new C4.DOMParser;let i,r;try{i=e.parseFromString(s,"application/xml"),r=i&&i.documentElement.tagName==="MPD"?i.documentElement:null}catch{}if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(ur.DASH_INVALID_XML);return r},p8=s=>{const e=ft(s,"UTCTiming")[0];if(!e)return null;const i=Ct(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ur.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},m8=(s,e={})=>{const i=f8(Uh(s),e),r=t8(i.representationInfo);return G4({dashPlaylists:r,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:i.eventStream})},g8=s=>p8(Uh(s));var Oo,od;function v8(){if(od)return Oo;od=1;var s=Math.pow(2,32),e=function(i){var r=new DataView(i.buffer,i.byteOffset,i.byteLength),a;return r.getBigUint64?(a=r.getBigUint64(0),a<Number.MAX_SAFE_INTEGER?Number(a):a):r.getUint32(0)*s+r.getUint32(4)};return Oo={getUint64:e,MAX_UINT32:s},Oo}var Bo,ld;function _8(){if(ld)return Bo;ld=1;var s=v8().getUint64,e=function(i){var r=new DataView(i.buffer,i.byteOffset,i.byteLength),a={version:i[0],flags:new Uint8Array(i.subarray(1,4)),references:[],referenceId:r.getUint32(4),timescale:r.getUint32(8)},o=12;a.version===0?(a.earliestPresentationTime=r.getUint32(o),a.firstOffset=r.getUint32(o+4),o+=8):(a.earliestPresentationTime=s(i.subarray(o)),a.firstOffset=s(i.subarray(o+8)),o+=16),o+=2;var l=r.getUint16(o);for(o+=2;l>0;o+=12,l--)a.references.push({referenceType:(i[o]&128)>>>7,referencedSize:r.getUint32(o)&2147483647,subsegmentDuration:r.getUint32(o+4),startsWithSap:!!(i[o+8]&128),sapType:(i[o+8]&112)>>>4,sapDeltaTime:r.getUint32(o+8)&268435455});return a};return Bo=e,Bo}var y8=_8();const T8=gr(y8);var b8=Re([73,68,51]),x8=function(e,i){i===void 0&&(i=0),e=Re(e);var r=e[i+5],a=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],o=(r&16)>>4;return o?a+20:a+10},Yr=function s(e,i){return i===void 0&&(i=0),e=Re(e),e.length-i<10||!ht(e,b8,{offset:i})?i:(i+=x8(e,i),s(e,i))},ud=function(e){return typeof e=="string"?Lh(e):e},C8=function(e){return Array.isArray(e)?e.map(function(i){return ud(i)}):[ud(e)]},E8=function s(e,i,r){r===void 0&&(r=!1),i=C8(i),e=Re(e);var a=[];if(!i.length)return a;for(var o=0;o<e.length;){var l=(e[o]<<24|e[o+1]<<16|e[o+2]<<8|e[o+3])>>>0,u=e.subarray(o+4,o+8);if(l===0)break;var d=o+l;if(d>e.length){if(r)break;d=e.length}var f=e.subarray(o+8,d);ht(u,i[0])&&(i.length===1?a.push(f):a.push.apply(a,s(f,i.slice(1),r))),o=d}return a},Us={EBML:Re([26,69,223,163]),DocType:Re([66,130]),Segment:Re([24,83,128,103]),SegmentInfo:Re([21,73,169,102]),Tracks:Re([22,84,174,107]),Track:Re([174]),TrackNumber:Re([215]),DefaultDuration:Re([35,227,131]),TrackEntry:Re([174]),TrackType:Re([131]),FlagDefault:Re([136]),CodecID:Re([134]),CodecPrivate:Re([99,162]),VideoTrack:Re([224]),AudioTrack:Re([225]),Cluster:Re([31,67,182,117]),Timestamp:Re([231]),TimestampScale:Re([42,215,177]),BlockGroup:Re([160]),BlockDuration:Re([155]),Block:Re([161]),SimpleBlock:Re([163])},il=[128,64,32,16,8,4,2,1],S8=function(e){for(var i=1,r=0;r<il.length&&!(e&il[r]);r++)i++;return i},ra=function(e,i,r,a){r===void 0&&(r=!0),a===void 0&&(a=!1);var o=S8(e[i]),l=e.subarray(i,i+o);return r&&(l=Array.prototype.slice.call(e,i,i+o),l[0]^=il[o-1]),{length:o,value:m4(l,{signed:a}),bytes:l}},cd=function s(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return s(i)}):typeof e=="number"?g4(e):e},k8=function(e){return Array.isArray(e)?e.map(function(i){return cd(i)}):[cd(e)]},w8=function s(e,i,r){if(r>=i.length)return i.length;var a=ra(i,r,!1);if(ht(e.bytes,a.bytes))return r;var o=ra(i,r+a.length);return s(e,i,r+o.length+o.value+a.length)},dd=function s(e,i){i=k8(i),e=Re(e);var r=[];if(!i.length)return r;for(var a=0;a<e.length;){var o=ra(e,a,!1),l=ra(e,a+o.length),u=a+o.length+l.length;l.value===127&&(l.value=w8(o,e,u),l.value!==e.length&&(l.value-=u));var d=u+l.value>e.length?e.length:u+l.value,f=e.subarray(u,d);ht(i[0],o.bytes)&&(i.length===1?r.push(f):r=r.concat(s(f,i.slice(1))));var g=o.length+l.length+f.length;a+=g}return r},D8=Re([0,0,0,1]),A8=Re([0,0,1]),N8=Re([0,0,3]),I8=function(e){for(var i=[],r=1;r<e.length-2;)ht(e.subarray(r,r+3),N8)&&(i.push(r+2),r++),r++;if(i.length===0)return e;var a=e.length-i.length,o=new Uint8Array(a),l=0;for(r=0;r<a;l++,r++)l===i[0]&&(l++,i.shift()),o[r]=e[l];return o},qh=function(e,i,r,a){e=Re(e),r=[].concat(r);for(var o=0,l,u=0;o<e.length&&(u<a||l);){var d=void 0;if(ht(e.subarray(o),D8)?d=4:ht(e.subarray(o),A8)&&(d=3),!d){o++;continue}if(u++,l)return I8(e.subarray(l,o));var f=void 0;i==="h264"?f=e[o+d]&31:i==="h265"&&(f=e[o+d]>>1&63),r.indexOf(f)!==-1&&(l=o+d),o+=d+(i==="h264"?1:2)}return e.subarray(0,0)},O8=function(e,i,r){return qh(e,"h264",i,r)},B8=function(e,i,r){return qh(e,"h265",i,r)},Qt={webm:Re([119,101,98,109]),matroska:Re([109,97,116,114,111,115,107,97]),flac:Re([102,76,97,67]),ogg:Re([79,103,103,83]),ac3:Re([11,119]),riff:Re([82,73,70,70]),avi:Re([65,86,73]),wav:Re([87,65,86,69]),"3gp":Re([102,116,121,112,51,103]),mp4:Re([102,116,121,112]),fmp4:Re([115,116,121,112]),mov:Re([102,116,121,112,113,116]),moov:Re([109,111,111,118]),moof:Re([109,111,111,102])},cr={aac:function(e){var i=Yr(e);return ht(e,[255,16],{offset:i,mask:[255,22]})},mp3:function(e){var i=Yr(e);return ht(e,[255,2],{offset:i,mask:[255,6]})},webm:function(e){var i=dd(e,[Us.EBML,Us.DocType])[0];return ht(i,Qt.webm)},mkv:function(e){var i=dd(e,[Us.EBML,Us.DocType])[0];return ht(i,Qt.matroska)},mp4:function(e){if(cr["3gp"](e)||cr.mov(e))return!1;if(ht(e,Qt.mp4,{offset:4})||ht(e,Qt.fmp4,{offset:4})||ht(e,Qt.moof,{offset:4})||ht(e,Qt.moov,{offset:4}))return!0},mov:function(e){return ht(e,Qt.mov,{offset:4})},"3gp":function(e){return ht(e,Qt["3gp"],{offset:4})},ac3:function(e){var i=Yr(e);return ht(e,Qt.ac3,{offset:i})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var i=0;i+188<e.length&&i<188;){if(e[i]===71&&e[i+188]===71)return!0;i+=1}return!1},flac:function(e){var i=Yr(e);return ht(e,Qt.flac,{offset:i})},ogg:function(e){return ht(e,Qt.ogg)},avi:function(e){return ht(e,Qt.riff)&&ht(e,Qt.avi,{offset:8})},wav:function(e){return ht(e,Qt.riff)&&ht(e,Qt.wav,{offset:8})},h264:function(e){return O8(e,7,3).length},h265:function(e){return B8(e,[32,33],3).length}},nl=Object.keys(cr).filter(function(s){return s!=="ts"&&s!=="h264"&&s!=="h265"}).concat(["ts","h264","h265"]);nl.forEach(function(s){var e=cr[s];cr[s]=function(i){return e(Re(i))}});var L8=cr,Fl=function(e){e=Re(e);for(var i=0;i<nl.length;i++){var r=nl[i];if(L8[r](e))return r}return""},P8=function(e){return E8(e,["moof"]).length>0},Lo,hd;function M8(){if(hd)return Lo;hd=1;var s=9e4,e,i,r,a,o,l,u;return e=function(d){return d*s},i=function(d,f){return d*f},r=function(d){return d/s},a=function(d,f){return d/f},o=function(d,f){return e(a(d,f))},l=function(d,f){return i(r(d),f)},u=function(d,f,g){return r(g?d:d-f)},Lo={ONE_SECOND_IN_TS:s,secondsToVideoTs:e,secondsToAudioTs:i,videoTsToSeconds:r,audioTsToSeconds:a,audioTsToVideoTs:o,videoTsToAudioTs:l,metadataTsToSeconds:u},Lo}var Nn=M8();/**
28
+ * @license
29
+ * Video.js 8.23.7 <http://videojs.com/>
30
+ * Copyright 2010-present Video.js contributors
31
+ * Available under Apache License Version 2.0
32
+ * <https://github.com/videojs/video.js/blob/main/LICENSE>
33
+ *
34
+ * Includes vtt.js <https://github.com/mozilla/vtt.js>
35
+ * Available under Apache License Version 2.0
36
+ * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
37
+ */var rl="8.23.7";const en={},_n=function(s,e){return en[s]=en[s]||[],e&&(en[s]=en[s].concat(e)),en[s]},R8=function(s,e){_n(s,e)},jh=function(s,e){const i=_n(s).indexOf(e);return i<=-1?!1:(en[s]=en[s].slice(),en[s].splice(i,1),!0)},V8=function(s,e){_n(s,[].concat(e).map(i=>{const r=(...a)=>(jh(s,r),i(...a));return r}))},sa={prefixed:!0},Zs=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],fd=Zs[0];let Xr;for(let s=0;s<Zs.length;s++)if(Zs[s][1]in _e){Xr=Zs[s];break}if(Xr){for(let s=0;s<Xr.length;s++)sa[fd[s]]=Xr[s];sa.prefixed=Xr[0]!==fd[0]}let ri=[];const F8=(s,e,i)=>(r,a,o)=>{const l=e.levels[a],u=new RegExp(`^(${l})$`);let d=s;if(r!=="log"&&o.unshift(r.toUpperCase()+":"),i&&(d=`%c${s}`,o.unshift(i)),o.unshift(d+":"),ri){ri.push([].concat(o));const g=ri.length-1e3;ri.splice(0,g>0?g:0)}if(!W.console)return;let f=W.console[r];!f&&r==="debug"&&(f=W.console.info||W.console.log),!(!f||!l||!u.test(r))&&f[Array.isArray(o)?"apply":"call"](W.console,o)};function sl(s,e=":",i=""){let r="info",a;function o(...l){a("log",r,l)}return a=F8(s,o,i),o.createLogger=(l,u,d)=>{const f=u!==void 0?u:e,g=d!==void 0?d:i,v=`${s} ${f} ${l}`;return sl(v,f,g)},o.createNewLogger=(l,u,d)=>sl(l,u,d),o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},o.level=l=>{if(typeof l=="string"){if(!o.levels.hasOwnProperty(l))throw new Error(`"${l}" in not a valid log level`);r=l}return r},o.history=()=>ri?[].concat(ri):[],o.history.filter=l=>(ri||[]).filter(u=>new RegExp(`.*${l}.*`).test(u[0])),o.history.clear=()=>{ri&&(ri.length=0)},o.history.disable=()=>{ri!==null&&(ri.length=0,ri=null)},o.history.enable=()=>{ri===null&&(ri=[])},o.error=(...l)=>a("error",r,l),o.warn=(...l)=>a("warn",r,l),o.debug=(...l)=>a("debug",r,l),o}const Xe=sl("VIDEOJS"),Hh=Xe.createLogger,$8=Object.prototype.toString,zh=function(s){return zi(s)?Object.keys(s):[]};function Zn(s,e){zh(s).forEach(i=>e(s[i],i))}function Gh(s,e,i=0){return zh(s).reduce((r,a)=>e(r,s[a],a),i)}function zi(s){return!!s&&typeof s=="object"}function dr(s){return zi(s)&&$8.call(s)==="[object Object]"&&s.constructor===Object}function ot(...s){const e={};return s.forEach(i=>{i&&Zn(i,(r,a)=>{if(!dr(r)){e[a]=r;return}dr(e[a])||(e[a]={}),e[a]=ot(e[a],r)})}),e}function Wh(s={}){const e=[];for(const i in s)if(s.hasOwnProperty(i)){const r=s[i];e.push(r)}return e}function Aa(s,e,i,r=!0){const a=l=>Object.defineProperty(s,e,{value:l,enumerable:!0,writable:!0}),o={configurable:!0,enumerable:!0,get(){const l=i();return a(l),l}};return r&&(o.set=a),Object.defineProperty(s,e,o)}var U8=Object.freeze({__proto__:null,each:Zn,reduce:Gh,isObject:zi,isPlain:dr,merge:ot,values:Wh,defineLazyProperty:Aa});let $l=!1,Yh=null,Bi=!1,Xh,Kh=!1,Jn=!1,er=!1,Gi=!1,Ul=null,Na=null;const q8=!!(W.cast&&W.cast.framework&&W.cast.framework.CastReceiverContext);let Qh=null,aa=!1,Ia=!1,oa=!1,Oa=!1,la=!1,ua=!1,ca=!1;const rs=!!(vr()&&("ontouchstart"in W||W.navigator.maxTouchPoints||W.DocumentTouch&&W.document instanceof W.DocumentTouch)),dn=W.navigator&&W.navigator.userAgentData;dn&&dn.platform&&dn.brands&&(Bi=dn.platform==="Android",Jn=!!dn.brands.find(s=>s.brand==="Microsoft Edge"),er=!!dn.brands.find(s=>s.brand==="Chromium"),Gi=!Jn&&er,Ul=Na=(dn.brands.find(s=>s.brand==="Chromium")||{}).version||null,Ia=dn.platform==="Windows");if(!er){const s=W.navigator&&W.navigator.userAgent||"";$l=/iPod/i.test(s),Yh=(function(){const e=s.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null})(),Bi=/Android/i.test(s),Xh=(function(){const e=s.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const i=e[1]&&parseFloat(e[1]),r=e[2]&&parseFloat(e[2]);return i&&r?parseFloat(e[1]+"."+e[2]):i||null})(),Kh=/Firefox/i.test(s),Jn=/Edg/i.test(s),er=/Chrome/i.test(s)||/CriOS/i.test(s),Gi=!Jn&&er,Ul=Na=(function(){const e=s.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null})(),Qh=(function(){const e=/MSIE\s(\d+)\.\d/.exec(s);let i=e&&parseFloat(e[1]);return!i&&/Trident\/7.0/i.test(s)&&/rv:11.0/.test(s)&&(i=11),i})(),la=/Tizen/i.test(s),ua=/Web0S/i.test(s),ca=la||ua,aa=/Safari/i.test(s)&&!Gi&&!Bi&&!Jn&&!ca,Ia=/Windows/i.test(s),oa=/iPad/i.test(s)||aa&&rs&&!/iPhone/i.test(s),Oa=/iPhone/i.test(s)&&!oa}const Ut=Oa||oa||$l,Ba=(aa||Ut)&&!Gi;var Zh=Object.freeze({__proto__:null,get IS_IPOD(){return $l},get IOS_VERSION(){return Yh},get IS_ANDROID(){return Bi},get ANDROID_VERSION(){return Xh},get IS_FIREFOX(){return Kh},get IS_EDGE(){return Jn},get IS_CHROMIUM(){return er},get IS_CHROME(){return Gi},get CHROMIUM_VERSION(){return Ul},get CHROME_VERSION(){return Na},IS_CHROMECAST_RECEIVER:q8,get IE_VERSION(){return Qh},get IS_SAFARI(){return aa},get IS_WINDOWS(){return Ia},get IS_IPAD(){return oa},get IS_IPHONE(){return Oa},get IS_TIZEN(){return la},get IS_WEBOS(){return ua},get IS_SMART_TV(){return ca},TOUCH_ENABLED:rs,IS_IOS:Ut,IS_ANY_SAFARI:Ba});function pd(s){return typeof s=="string"&&!!s.trim()}function j8(s){if(s.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function vr(){return _e===W.document}function _r(s){return zi(s)&&s.nodeType===1}function Jh(){try{return W.parent!==W.self}catch{return!0}}function e0(s){return function(e,i){if(!pd(e))return _e[s](null);pd(i)&&(i=_e.querySelector(i));const r=_r(i)?i:_e;return r[s]&&r[s](e)}}function Fe(s="div",e={},i={},r){const a=_e.createElement(s);return Object.getOwnPropertyNames(e).forEach(function(o){const l=e[o];o==="textContent"?Tn(a,l):(a[o]!==l||o==="tabIndex")&&(a[o]=l)}),Object.getOwnPropertyNames(i).forEach(function(o){a.setAttribute(o,i[o])}),r&&ql(a,r),a}function Tn(s,e){return typeof s.textContent>"u"?s.innerText=e:s.textContent=e,s}function al(s,e){e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}function Zr(s,e){return j8(e),s.classList.contains(e)}function Pn(s,...e){return s.classList.add(...e.reduce((i,r)=>i.concat(r.split(/\s+/)),[])),s}function La(s,...e){return s?(s.classList.remove(...e.reduce((i,r)=>i.concat(r.split(/\s+/)),[])),s):(Xe.warn("removeClass was called with an element that doesn't exist"),null)}function t0(s,e,i){return typeof i=="function"&&(i=i(s,e)),typeof i!="boolean"&&(i=void 0),e.split(/\s+/).forEach(r=>s.classList.toggle(r,i)),s}function i0(s,e){Object.getOwnPropertyNames(e).forEach(function(i){const r=e[i];r===null||typeof r>"u"||r===!1?s.removeAttribute(i):s.setAttribute(i,r===!0?"":r)})}function fn(s){const e={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(s&&s.attributes&&s.attributes.length>0){const r=s.attributes;for(let a=r.length-1;a>=0;a--){const o=r[a].name;let l=r[a].value;i.includes(o)&&(l=l!==null),e[o]=l}}return e}function n0(s,e){return s.getAttribute(e)}function hr(s,e,i){s.setAttribute(e,i)}function Pa(s,e){s.removeAttribute(e)}function r0(){_e.body.focus(),_e.onselectstart=function(){return!1}}function s0(){_e.onselectstart=function(){return!0}}function fr(s){if(s&&s.getBoundingClientRect&&s.parentNode){const e=s.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(r=>{e[r]!==void 0&&(i[r]=e[r])}),i.height||(i.height=parseFloat(pr(s,"height"))),i.width||(i.width=parseFloat(pr(s,"width"))),i}}function ss(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};const e=s.offsetWidth,i=s.offsetHeight;let r=0,a=0;for(;s.offsetParent&&s!==_e[sa.fullscreenElement];)r+=s.offsetLeft,a+=s.offsetTop,s=s.offsetParent;return{left:r,top:a,width:e,height:i}}function Ma(s,e){const i={x:0,y:0};if(Ut){let g=s;for(;g&&g.nodeName.toLowerCase()!=="html";){const v=pr(g,"transform");if(/^matrix/.test(v)){const S=v.slice(7,-1).split(/,\s/).map(Number);i.x+=S[4],i.y+=S[5]}else if(/^matrix3d/.test(v)){const S=v.slice(9,-1).split(/,\s/).map(Number);i.x+=S[12],i.y+=S[13]}if(g.assignedSlot&&g.assignedSlot.parentElement&&W.WebKitCSSMatrix){const S=W.getComputedStyle(g.assignedSlot.parentElement).transform,C=new W.WebKitCSSMatrix(S);i.x+=C.m41,i.y+=C.m42}g=g.parentNode||g.host}}const r={},a=ss(e.target),o=ss(s),l=o.width,u=o.height;let d=e.offsetY-(o.top-a.top),f=e.offsetX-(o.left-a.left);return e.changedTouches&&(f=e.changedTouches[0].pageX-o.left,d=e.changedTouches[0].pageY+o.top,Ut&&(f-=i.x,d-=i.y)),r.y=1-Math.max(0,Math.min(1,d/u)),r.x=Math.max(0,Math.min(1,f/l)),r}function a0(s){return zi(s)&&s.nodeType===3}function Ra(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function o0(s){return typeof s=="function"&&(s=s()),(Array.isArray(s)?s:[s]).map(e=>{if(typeof e=="function"&&(e=e()),_r(e)||a0(e))return e;if(typeof e=="string"&&/\S/.test(e))return _e.createTextNode(e)}).filter(e=>e)}function ql(s,e){return o0(e).forEach(i=>s.appendChild(i)),s}function l0(s,e){return ql(Ra(s),e)}function as(s){return s.button===void 0&&s.buttons===void 0||s.button===0&&s.buttons===void 0||s.type==="mouseup"&&s.button===0&&s.buttons===0||s.type==="mousedown"&&s.button===0&&s.buttons===0?!0:!(s.button!==0||s.buttons!==1)}const yn=e0("querySelector"),u0=e0("querySelectorAll");function pr(s,e){if(!s||!e)return"";if(typeof W.getComputedStyle=="function"){let i;try{i=W.getComputedStyle(s)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}function c0(s){[..._e.styleSheets].forEach(e=>{try{const i=[...e.cssRules].map(a=>a.cssText).join(""),r=_e.createElement("style");r.textContent=i,s.document.head.appendChild(r)}catch{const r=_e.createElement("link");r.rel="stylesheet",r.type=e.type,r.media=e.media.mediaText,r.href=e.href,s.document.head.appendChild(r)}})}var d0=Object.freeze({__proto__:null,isReal:vr,isEl:_r,isInFrame:Jh,createEl:Fe,textContent:Tn,prependTo:al,hasClass:Zr,addClass:Pn,removeClass:La,toggleClass:t0,setAttributes:i0,getAttributes:fn,getAttribute:n0,setAttribute:hr,removeAttribute:Pa,blockTextSelection:r0,unblockTextSelection:s0,getBoundingClientRect:fr,findPosition:ss,getPointerPosition:Ma,isTextNode:a0,emptyEl:Ra,normalizeContent:o0,appendContent:ql,insertContent:l0,isSingleLeftClick:as,$:yn,$$:u0,computedStyle:pr,copyStyleSheetsToWindow:c0});let h0=!1,ol;const H8=function(){if(ol.options.autoSetup===!1)return;const s=Array.prototype.slice.call(_e.getElementsByTagName("video")),e=Array.prototype.slice.call(_e.getElementsByTagName("audio")),i=Array.prototype.slice.call(_e.getElementsByTagName("video-js")),r=s.concat(e,i);if(r&&r.length>0)for(let a=0,o=r.length;a<o;a++){const l=r[a];if(l&&l.getAttribute)l.player===void 0&&l.getAttribute("data-setup")!==null&&ol(l);else{ll(1);break}}else h0||ll(1)};function ll(s,e){vr()&&(e&&(ol=e),W.setTimeout(H8,s))}function ul(){h0=!0,W.removeEventListener("load",ul)}vr()&&(_e.readyState==="complete"?ul():W.addEventListener("load",ul));const f0=function(s){const e=_e.createElement("style");return e.className=s,e},p0=function(s,e){s.styleSheet?s.styleSheet.cssText=e:s.textContent=e};var Jt=new WeakMap;const z8=3;let G8=z8;function yi(){return G8++}function md(s,e){if(!Jt.has(s))return;const i=Jt.get(s);i.handlers[e].length===0&&(delete i.handlers[e],s.removeEventListener?s.removeEventListener(e,i.dispatcher,!1):s.detachEvent&&s.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),Object.getOwnPropertyNames(i).length===0&&Jt.delete(s)}function jl(s,e,i,r){i.forEach(function(a){s(e,a,r)})}function Va(s){if(s.fixed_)return s;function e(){return!0}function i(){return!1}if(!s||!s.isPropagationStopped||!s.isImmediatePropagationStopped){const r=s||W.event;s={};const a=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const o in r)a.includes(o)||o==="returnValue"&&r.preventDefault||(s[o]=r[o]);if(s.target||(s.target=s.srcElement||_e),s.relatedTarget||(s.relatedTarget=s.fromElement===s.target?s.toElement:s.fromElement),s.preventDefault=function(){r.preventDefault&&r.preventDefault(),s.returnValue=!1,r.returnValue=!1,s.defaultPrevented=!0},s.defaultPrevented=!1,s.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),s.cancelBubble=!0,r.cancelBubble=!0,s.isPropagationStopped=e},s.isPropagationStopped=i,s.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),s.isImmediatePropagationStopped=e,s.stopPropagation()},s.isImmediatePropagationStopped=i,s.clientX!==null&&s.clientX!==void 0){const o=_e.documentElement,l=_e.body;s.pageX=s.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0),s.pageY=s.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}s.which=s.charCode||s.keyCode,s.button!==null&&s.button!==void 0&&(s.button=s.button&1?0:s.button&4?1:s.button&2?2:0)}return s.fixed_=!0,s}let qs;const W8=function(){if(typeof qs!="boolean"){qs=!1;try{const s=Object.defineProperty({},"passive",{get(){qs=!0}});W.addEventListener("test",null,s),W.removeEventListener("test",null,s)}catch{}}return qs},Y8=["touchstart","touchmove"];function fi(s,e,i){if(Array.isArray(e))return jl(fi,s,e,i);Jt.has(s)||Jt.set(s,{});const r=Jt.get(s);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),i.guid||(i.guid=yi()),r.handlers[e].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(a,o){if(r.disabled)return;a=Va(a);const l=r.handlers[a.type];if(l){const u=l.slice(0);for(let d=0,f=u.length;d<f&&!a.isImmediatePropagationStopped();d++)try{u[d].call(s,a,o)}catch(g){Xe.error(g)}}}),r.handlers[e].length===1)if(s.addEventListener){let a=!1;W8()&&Y8.indexOf(e)>-1&&(a={passive:!0}),s.addEventListener(e,r.dispatcher,a)}else s.attachEvent&&s.attachEvent("on"+e,r.dispatcher)}function qt(s,e,i){if(!Jt.has(s))return;const r=Jt.get(s);if(!r.handlers)return;if(Array.isArray(e))return jl(qt,s,e,i);const a=function(l,u){r.handlers[u]=[],md(l,u)};if(e===void 0){for(const l in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},l)&&a(s,l);return}const o=r.handlers[e];if(o){if(!i){a(s,e);return}if(i.guid)for(let l=0;l<o.length;l++)o[l].guid===i.guid&&o.splice(l--,1);md(s,e)}}function yr(s,e,i){const r=Jt.has(s)?Jt.get(s):{},a=s.parentNode||s.ownerDocument;if(typeof e=="string"?e={type:e,target:s}:e.target||(e.target=s),e=Va(e),r.dispatcher&&r.dispatcher.call(s,e,i),a&&!e.isPropagationStopped()&&e.bubbles===!0)yr.call(null,a,e,i);else if(!a&&!e.defaultPrevented&&e.target&&e.target[e.type]){Jt.has(e.target)||Jt.set(e.target,{});const o=Jt.get(e.target);e.target[e.type]&&(o.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function Fa(s,e,i){if(Array.isArray(e))return jl(Fa,s,e,i);const r=function(){qt(s,e,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||yi(),fi(s,e,r)}function Hl(s,e,i){const r=function(){qt(s,e,r),i.apply(this,arguments)};r.guid=i.guid=i.guid||yi(),fi(s,e,r)}var X8=Object.freeze({__proto__:null,fixEvent:Va,on:fi,off:qt,trigger:yr,one:Fa,any:Hl});const Ti=30,ut=function(s,e,i){e.guid||(e.guid=yi());const r=e.bind(s);return r.guid=i?i+"_"+e.guid:e.guid,r},Wi=function(s,e){let i=W.performance.now();return function(...a){const o=W.performance.now();o-i>=e&&(s(...a),i=o)}},m0=function(s,e,i,r=W){let a;const o=()=>{r.clearTimeout(a),a=null},l=function(){const u=this,d=arguments;let f=function(){a=null,f=null,i||s.apply(u,d)};!a&&i&&s.apply(u,d),r.clearTimeout(a),a=r.setTimeout(f,e)};return l.cancel=o,l};var K8=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Ti,bind_:ut,throttle:Wi,debounce:m0});let zr;class pi{on(e,i){const r=this.addEventListener;this.addEventListener=()=>{},fi(this,e,i),this.addEventListener=r}off(e,i){qt(this,e,i)}one(e,i){const r=this.addEventListener;this.addEventListener=()=>{},Fa(this,e,i),this.addEventListener=r}any(e,i){const r=this.addEventListener;this.addEventListener=()=>{},Hl(this,e,i),this.addEventListener=r}trigger(e){const i=e.type||e;typeof e=="string"&&(e={type:i}),e=Va(e),this.allowedEvents_[i]&&this["on"+i]&&this["on"+i](e),yr(this,e)}queueTrigger(e){zr||(zr=new Map);const i=e.type||e;let r=zr.get(this);r||(r=new Map,zr.set(this,r));const a=r.get(i);r.delete(i),W.clearTimeout(a);const o=W.setTimeout(()=>{r.delete(i),r.size===0&&(r=null,zr.delete(this)),this.trigger(e)},0);r.set(i,o)}}pi.prototype.allowedEvents_={};pi.prototype.addEventListener=pi.prototype.on;pi.prototype.removeEventListener=pi.prototype.off;pi.prototype.dispatchEvent=pi.prototype.trigger;const $a=s=>typeof s.name=="function"?s.name():typeof s.name=="string"?s.name:s.name_?s.name_:s.constructor&&s.constructor.name?s.constructor.name:typeof s,rn=s=>s instanceof pi||!!s.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof s[e]=="function"),Q8=(s,e)=>{rn(s)?e():(s.eventedCallbacks||(s.eventedCallbacks=[]),s.eventedCallbacks.push(e))},cl=s=>typeof s=="string"&&/\S/.test(s)||Array.isArray(s)&&!!s.length,da=(s,e,i)=>{if(!s||!s.nodeName&&!rn(s))throw new Error(`Invalid target for ${$a(e)}#${i}; must be a DOM node or evented object.`)},g0=(s,e,i)=>{if(!cl(s))throw new Error(`Invalid event type for ${$a(e)}#${i}; must be a non-empty string or array.`)},v0=(s,e,i)=>{if(typeof s!="function")throw new Error(`Invalid listener for ${$a(e)}#${i}; must be a function.`)},Po=(s,e,i)=>{const r=e.length<3||e[0]===s||e[0]===s.eventBusEl_;let a,o,l;return r?(a=s.eventBusEl_,e.length>=3&&e.shift(),[o,l]=e):(a=e[0],o=e[1],l=e[2]),da(a,s,i),g0(o,s,i),v0(l,s,i),l=ut(s,l),{isTargetingSelf:r,target:a,type:o,listener:l}},kn=(s,e,i,r)=>{da(s,s,e),s.nodeName?X8[e](s,i,r):s[e](i,r)},Z8={on(...s){const{isTargetingSelf:e,target:i,type:r,listener:a}=Po(this,s,"on");if(kn(i,"on",r,a),!e){const o=()=>this.off(i,r,a);o.guid=a.guid;const l=()=>this.off("dispose",o);l.guid=a.guid,kn(this,"on","dispose",o),kn(i,"on","dispose",l)}},one(...s){const{isTargetingSelf:e,target:i,type:r,listener:a}=Po(this,s,"one");if(e)kn(i,"one",r,a);else{const o=(...l)=>{this.off(i,r,o),a.apply(null,l)};o.guid=a.guid,kn(i,"one",r,o)}},any(...s){const{isTargetingSelf:e,target:i,type:r,listener:a}=Po(this,s,"any");if(e)kn(i,"any",r,a);else{const o=(...l)=>{this.off(i,r,o),a.apply(null,l)};o.guid=a.guid,kn(i,"any",r,o)}},off(s,e,i){if(!s||cl(s))qt(this.eventBusEl_,s,e);else{const r=s,a=e;da(r,this,"off"),g0(a,this,"off"),v0(i,this,"off"),i=ut(this,i),this.off("dispose",i),r.nodeName?(qt(r,a,i),qt(r,"dispose",i)):rn(r)&&(r.off(a,i),r.off("dispose",i))}},trigger(s,e){da(this.eventBusEl_,this,"trigger");const i=s&&typeof s!="string"?s.type:s;if(!cl(i))throw new Error(`Invalid event type for ${$a(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return yr(this.eventBusEl_,s,e)}};function zl(s,e={}){const{eventBusKey:i}=e;if(i){if(!s[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);s.eventBusEl_=s[i]}else s.eventBusEl_=Fe("span",{className:"vjs-event-bus"});return Object.assign(s,Z8),s.eventedCallbacks&&s.eventedCallbacks.forEach(r=>{r()}),s.on("dispose",()=>{s.off(),[s,s.el_,s.eventBusEl_].forEach(function(r){r&&Jt.has(r)&&Jt.delete(r)}),W.setTimeout(()=>{s.eventBusEl_=null},0)}),s}const J8={state:{},setState(s){typeof s=="function"&&(s=s());let e;return Zn(s,(i,r)=>{this.state[r]!==i&&(e=e||{},e[r]={from:this.state[r],to:i}),this.state[r]=i}),e&&rn(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function _0(s,e){return Object.assign(s,J8),s.state=Object.assign({},s.state,e),typeof s.handleStateChanged=="function"&&rn(s)&&s.on("statechanged",s.handleStateChanged),s}const Jr=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toLowerCase())},_t=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},y0=function(s,e){return _t(s)===_t(e)};var ex=Object.freeze({__proto__:null,toLowerCase:Jr,toTitleCase:_t,titleCaseEquals:y0});class oe{constructor(e,i,r){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=ot({},this.options_),i=this.options_=ot(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){const a=e&&e.id&&e.id()||"no_player";this.id_=`${a}_component_${yi()}`}this.name_=i.name||null,i.el?this.el_=i.el:i.createEl!==!1&&(this.el_=this.createEl()),i.className&&this.el_&&i.className.split(" ").forEach(a=>this.addClass(a)),["on","off","one","any","trigger"].forEach(a=>{this[a]=void 0}),i.evented!==!1&&(zl(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),_0(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,i.initChildren!==!1&&this.initChildren(),this.ready(r),i.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=ot(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,i,r){return Fe(e,i,r)}localize(e,i,r=e){const a=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),l=o&&o[a],u=a&&a.split("-")[0],d=o&&o[u];let f=r;return l&&l[e]?f=l[e]:d&&d[e]&&(f=d[e]),i&&(f=f.replace(/\{(\d+)\}/g,function(g,v){const S=i[v-1];let C=S;return typeof S>"u"&&(C=g),C})),f}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((r,a)=>r.concat(a),[]);let i=this;for(let r=0;r<e.length;r++)if(i=i.getChild(e[r]),!i||!i.getChild)return;return i}setIcon(e,i=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const r="http://www.w3.org/2000/svg",a=Fe("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),o=_e.createElementNS(r,"svg");o.setAttributeNS(null,"viewBox","0 0 512 512");const l=_e.createElementNS(r,"use");return o.appendChild(l),l.setAttributeNS(null,"href",`#vjs-icon-${e}`),a.appendChild(o),this.iconIsSet_?i.replaceChild(a,i.querySelector(".vjs-icon-placeholder")):i.appendChild(a),this.iconIsSet_=!0,a}addChild(e,i={},r=this.children_.length){let a,o;if(typeof e=="string"){o=_t(e);const l=i.componentClass||o;i.name=o;const u=oe.getComponent(l);if(!u)throw new Error(`Component ${l} does not exist`);if(typeof u!="function")return null;a=new u(this.player_||this,i)}else a=e;if(a.parentComponent_&&a.parentComponent_.removeChild(a),this.children_.splice(r,0,a),a.parentComponent_=this,typeof a.id=="function"&&(this.childIndex_[a.id()]=a),o=o||a.name&&_t(a.name()),o&&(this.childNameIndex_[o]=a,this.childNameIndex_[Jr(o)]=a),typeof a.el=="function"&&a.el()){let l=null;this.children_[r+1]&&(this.children_[r+1].el_?l=this.children_[r+1].el_:_r(this.children_[r+1])&&(l=this.children_[r+1])),this.contentEl().insertBefore(a.el(),l)}return a}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let i=!1;for(let a=this.children_.length-1;a>=0;a--)if(this.children_[a]===e){i=!0,this.children_.splice(a,1);break}if(!i)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[_t(e.name())]=null,this.childNameIndex_[Jr(e.name())]=null;const r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const i=this.options_,r=l=>{const u=l.name;let d=l.opts;if(i[u]!==void 0&&(d=i[u]),d===!1)return;d===!0&&(d={}),d.playerOptions=this.options_.playerOptions;const f=this.addChild(u,d);f&&(this[u]=f)};let a;const o=oe.getComponent("Tech");Array.isArray(e)?a=e:a=Object.keys(e),a.concat(Object.keys(this.options_).filter(function(l){return!a.some(function(u){return typeof u=="string"?l===u:l===u.name})})).map(l=>{let u,d;return typeof l=="string"?(u=l,d=e[u]||this.options_[u]||{}):(u=l.name,d=l),{name:u,opts:d}}).filter(l=>{const u=oe.getComponent(l.opts.componentClass||_t(l.name));return u&&!o.isTech(u)}).forEach(r)}}buildCSSClass(){return""}ready(e,i=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}i?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(i){i.call(this)},this),this.trigger("ready")},1)}$(e,i){return yn(e,i||this.contentEl())}$$(e,i){return u0(e,i||this.contentEl())}hasClass(e){return Zr(this.el_,e)}addClass(...e){Pn(this.el_,...e)}removeClass(...e){La(this.el_,...e)}toggleClass(e,i){t0(this.el_,e,i)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return n0(this.el_,e)}setAttribute(e,i){hr(this.el_,e,i)}removeAttribute(e){Pa(this.el_,e)}width(e,i){return this.dimension("width",e,i)}height(e,i){return this.dimension("height",e,i)}dimensions(e,i){this.width(e,!0),this.height(i)}dimension(e,i,r){if(i!==void 0){(i===null||i!==i)&&(i=0),(""+i).indexOf("%")!==-1||(""+i).indexOf("px")!==-1?this.el_.style[e]=i:i==="auto"?this.el_.style[e]="":this.el_.style[e]=i+"px",r||this.trigger("componentresize");return}if(!this.el_)return 0;const a=this.el_.style[e],o=a.indexOf("px");return parseInt(o!==-1?a.slice(0,o):this.el_["offset"+_t(e)],10)}currentDimension(e){let i=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(i=pr(this.el_,e),i=parseFloat(i),i===0||isNaN(i)){const r=`offset${_t(e)}`;i=this.el_[r]}return i}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect(),i={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},r={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:i,center:r}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,i=null;const r=10,a=200;let o;this.on("touchstart",function(u){u.touches.length===1&&(i={pageX:u.touches[0].pageX,pageY:u.touches[0].pageY},e=W.performance.now(),o=!0)}),this.on("touchmove",function(u){if(u.touches.length>1)o=!1;else if(i){const d=u.touches[0].pageX-i.pageX,f=u.touches[0].pageY-i.pageY;Math.sqrt(d*d+f*f)>r&&(o=!1)}});const l=function(){o=!1};this.on("touchleave",l),this.on("touchcancel",l),this.on("touchend",function(u){i=null,o===!0&&W.performance.now()-e<a&&(u.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=ut(this.player(),this.player().reportUserActivity);let i;this.on("touchstart",function(){e(),this.clearInterval(i),i=this.setInterval(e,250)});const r=function(a){e(),this.clearInterval(i)};this.on("touchmove",e),this.on("touchend",r),this.on("touchcancel",r)}setTimeout(e,i){var r;return e=ut(this,e),this.clearTimersOnDispose_(),r=W.setTimeout(()=>{this.setTimeoutIds_.has(r)&&this.setTimeoutIds_.delete(r),e()},i),this.setTimeoutIds_.add(r),r}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),W.clearTimeout(e)),e}setInterval(e,i){e=ut(this,e),this.clearTimersOnDispose_();const r=W.setInterval(e,i);return this.setIntervalIds_.add(r),r}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),W.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=ut(this,e),i=W.requestAnimationFrame(()=>{this.rafIds_.has(i)&&this.rafIds_.delete(i),e()}),this.rafIds_.add(i),i}requestNamedAnimationFrame(e,i){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),i=ut(this,i);const r=this.requestAnimationFrame(()=>{i(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,r),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),W.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,i])=>{this[e].forEach((r,a)=>this[i](a))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function i(o){const l=W.getComputedStyle(o,null),u=l.getPropertyValue("visibility");return l.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(u)}function r(o){return!(!i(o.parentElement)||!i(o)||o.style.opacity==="0"||W.getComputedStyle(o).height==="0px"||W.getComputedStyle(o).width==="0px")}function a(o){if(o.offsetWidth+o.offsetHeight+o.getBoundingClientRect().height+o.getBoundingClientRect().width===0)return!1;const l={x:o.getBoundingClientRect().left+o.offsetWidth/2,y:o.getBoundingClientRect().top+o.offsetHeight/2};if(l.x<0||l.x>(_e.documentElement.clientWidth||W.innerWidth)||l.y<0||l.y>(_e.documentElement.clientHeight||W.innerHeight))return!1;let u=_e.elementFromPoint(l.x,l.y);for(;u;){if(u===o)return!0;if(u.parentNode)u=u.parentNode;else return!1}}return e||(e=this.el()),!!(a(e)&&r(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,i){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const r=oe.getComponent("Tech"),a=r&&r.isTech(i),o=oe===i||oe.prototype.isPrototypeOf(i.prototype);if(a||!o){let u;throw a?u="techs must be registered using Tech.registerTech()":u="must be a Component subclass",new Error(`Illegal component, "${e}"; ${u}.`)}e=_t(e),oe.components_||(oe.components_={});const l=oe.getComponent("Player");if(e==="Player"&&l&&l.players){const u=l.players,d=Object.keys(u);if(u&&d.length>0){for(let f=0;f<d.length;f++)if(u[d[f]]!==null)throw new Error("Can not register Player component after player has been created.")}}return oe.components_[e]=i,oe.components_[Jr(e)]=i,i}static getComponent(e){if(!(!e||!oe.components_))return oe.components_[e]}}oe.registerComponent("Component",oe);function tx(s,e,i){if(typeof e!="number"||e<0||e>i)throw new Error(`Failed to execute '${s}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${i}).`)}function gd(s,e,i,r){return tx(s,r,i.length-1),i[r][e]}function Mo(s){let e;return s===void 0||s.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:s.length,start:gd.bind(null,"start",0,s),end:gd.bind(null,"end",1,s)},W.Symbol&&W.Symbol.iterator&&(e[W.Symbol.iterator]=()=>(s||[]).values()),e}function Oi(s,e){return Array.isArray(s)?Mo(s):s===void 0||e===void 0?Mo():Mo([[s,e]])}const T0=function(s,e){s=s<0?0:s;let i=Math.floor(s%60),r=Math.floor(s/60%60),a=Math.floor(s/3600);const o=Math.floor(e/60%60),l=Math.floor(e/3600);return(isNaN(s)||s===1/0)&&(a=r=i="-"),a=a>0||l>0?a+":":"",r=((a||o>=10)&&r<10?"0"+r:r)+":",i=i<10?"0"+i:i,a+r+i};let Gl=T0;function b0(s){Gl=s}function x0(){Gl=T0}function Fn(s,e=s){return Gl(s,e)}var ix=Object.freeze({__proto__:null,createTimeRanges:Oi,createTimeRange:Oi,setFormatTime:b0,resetFormatTime:x0,formatTime:Fn});function C0(s,e){let i=0,r,a;if(!e)return 0;(!s||!s.length)&&(s=Oi(0,0));for(let o=0;o<s.length;o++)r=s.start(o),a=s.end(o),a>e&&(a=e),i+=a-r;return i/e}function gt(s){if(s instanceof gt)return s;typeof s=="number"?this.code=s:typeof s=="string"?this.message=s:zi(s)&&(typeof s.code=="number"&&(this.code=s.code),Object.assign(this,s)),this.message||(this.message=gt.defaultMessages[this.code]||"")}gt.prototype.code=0;gt.prototype.message="";gt.prototype.status=null;gt.prototype.metadata=null;gt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];gt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};gt.MEDIA_ERR_CUSTOM=0;gt.prototype.MEDIA_ERR_CUSTOM=0;gt.MEDIA_ERR_ABORTED=1;gt.prototype.MEDIA_ERR_ABORTED=1;gt.MEDIA_ERR_NETWORK=2;gt.prototype.MEDIA_ERR_NETWORK=2;gt.MEDIA_ERR_DECODE=3;gt.prototype.MEDIA_ERR_DECODE=3;gt.MEDIA_ERR_SRC_NOT_SUPPORTED=4;gt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;gt.MEDIA_ERR_ENCRYPTED=5;gt.prototype.MEDIA_ERR_ENCRYPTED=5;function es(s){return s!=null&&typeof s.then=="function"}function Ui(s){es(s)&&s.then(null,e=>{})}const dl=function(s){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((i,r,a)=>(s[r]&&(i[r]=s[r]),i),{cues:s.cues&&Array.prototype.map.call(s.cues,function(i){return{startTime:i.startTime,endTime:i.endTime,text:i.text,id:i.id}})})},nx=function(s){const e=s.$$("track"),i=Array.prototype.map.call(e,a=>a.track);return Array.prototype.map.call(e,function(a){const o=dl(a.track);return a.src&&(o.src=a.src),o}).concat(Array.prototype.filter.call(s.textTracks(),function(a){return i.indexOf(a)===-1}).map(dl))},rx=function(s,e){return s.forEach(function(i){const r=e.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(a=>r.addCue(a))}),e.textTracks()};var hl={textTracksToJson:nx,jsonToTextTracks:rx,trackToJson:dl};const Ro="vjs-modal-dialog";class Tr extends oe{constructor(e,i){super(e,i),this.handleKeyDown_=r=>this.handleKeyDown(r),this.close_=r=>this.close(r),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Fe("div",{className:`${Ro}-content`},{role:"document"}),this.descEl_=Fe("p",{className:`${Ro}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Tn(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Ro} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const i=this.closeable_=!!e;let r=this.getChild("closeButton");if(i&&!r){const a=this.contentEl_;this.contentEl_=this.el_,r=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=a,this.on(r,"close",this.close_)}!i&&r&&(this.off(r,"close",this.close_),this.removeChild(r),r.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const i=this.contentEl(),r=i.parentNode,a=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,r.removeChild(i),this.empty(),l0(i,e),this.trigger("modalfill"),a?r.insertBefore(i,a):r.appendChild(i);const o=this.getChild("closeButton");o&&r.appendChild(o.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),Ra(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=_e.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null,(i.contains(e)||i===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;const i=this.focusableEls_(),r=this.el_.querySelector(":focus");let a;for(let o=0;o<i.length;o++)if(r===i[o]){a=o;break}_e.activeElement===this.el_&&(a=0),e.shiftKey&&a===0?(i[i.length-1].focus(),e.preventDefault()):!e.shiftKey&&a===i.length-1&&(i[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,i=>(i instanceof W.HTMLAnchorElement||i instanceof W.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof W.HTMLInputElement||i instanceof W.HTMLSelectElement||i instanceof W.HTMLTextAreaElement||i instanceof W.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof W.HTMLIFrameElement||i instanceof W.HTMLObjectElement||i instanceof W.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable"))}}Tr.prototype.options_={pauseOnOpen:!0,temporary:!0};oe.registerComponent("ModalDialog",Tr);class $n extends pi{constructor(e=[]){super(),this.tracks_=[];for(let i=0;i<e.length;i++)this.addTrack(e[i])}get length(){return this.tracks_.length}addTrack(e){const i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.tracks_[i]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},rn(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let i;for(let r=0,a=this.length;r<a;r++)if(this[r]===e){i=this[r],i.off&&i.off(),this.tracks_.splice(r,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})}getTrackById(e){let i=null;for(let r=0,a=this.length;r<a;r++){const o=this[r];if(o.id===e){i=o;break}}return i}}$n.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const s in $n.prototype.allowedEvents_)$n.prototype["on"+s]=null;const Vo=function(s,e){for(let i=0;i<s.length;i++)!Object.keys(s[i]).length||e.id===s[i].id||(s[i].enabled=!1)};class E0 extends $n{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){Vo(e,e[i]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Vo(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Vo(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const Fo=function(s,e){for(let i=0;i<s.length;i++)!Object.keys(s[i]).length||e.id===s[i].id||(s[i].selected=!1)};class S0 extends $n{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){Fo(e,e[i]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let i=0;i<this.length;i++)if(this[i].selected)return i;return-1},set(){}})}addTrack(e){e.selected&&Fo(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Fo(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class Wl extends $n{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class sx{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let i=0,r=e.length;i<r;i++)this.addTrackElement_(e[i])}addTrackElement_(e){const i=this.trackElements_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.trackElements_[i]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let i;for(let r=0,a=this.trackElements_.length;r<a;r++)if(e===this.trackElements_[r].track){i=this.trackElements_[r];break}return i}removeTrackElement_(e){for(let i=0,r=this.trackElements_.length;i<r;i++)if(e===this.trackElements_[i]){this.trackElements_[i].track&&typeof this.trackElements_[i].track.off=="function"&&this.trackElements_[i].track.off(),typeof this.trackElements_[i].off=="function"&&this.trackElements_[i].off(),this.trackElements_.splice(i,1);break}}}class ha{constructor(e){ha.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const i=this.length||0;let r=0;const a=e.length;this.cues_=e,this.length_=e.length;const o=function(l){""+l in this||Object.defineProperty(this,""+l,{get(){return this.cues_[l]}})};if(i<a)for(r=i;r<a;r++)o.call(this,r)}getCueById(e){let i=null;for(let r=0,a=this.length;r<a;r++){const o=this[r];if(o.id===e){i=o;break}}return i}}const ax={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ox={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},lx={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},vd={disabled:"disabled",hidden:"hidden",showing:"showing"};class Yl extends pi{constructor(e={}){super();const i={id:e.id||"vjs_track_"+yi(),kind:e.kind||"",language:e.language||""};let r=e.label||"";for(const a in i)Object.defineProperty(this,a,{get(){return i[a]},set(){}});Object.defineProperty(this,"label",{get(){return r},set(a){a!==r&&(r=a,this.trigger("labelchange"))}})}}const Xl=function(s){return new URL(s,_e.baseURI)},k0=function(s){return new URL(s,_e.baseURI).href},Kl=function(s){if(typeof s=="string"){const i=s.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():""}return""},Ua=function(s,e=W.location){return Xl(s).origin!==e.origin};var ux=Object.freeze({__proto__:null,parseUrl:Xl,getAbsoluteURL:k0,getFileExtension:Kl,isCrossOrigin:Ua});const _d=function(s,e){const i=new W.WebVTT.Parser(W,W.vttjs,W.WebVTT.StringDecoder()),r=[];i.oncue=function(a){e.addCue(a)},i.onparsingerror=function(a){r.push(a)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(s),r.length>0&&(W.console&&W.console.groupCollapsed&&W.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),r.forEach(a=>Xe.error(a)),W.console&&W.console.groupEnd&&W.console.groupEnd()),i.flush()},yd=function(s,e){const i={uri:s},r=Ua(s);r&&(i.cors=r);const a=e.tech_.crossOrigin()==="use-credentials";a&&(i.withCredentials=a),Dh(i,ut(this,function(o,l,u){if(o)return Xe.error(o,l);e.loaded_=!0,typeof W.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],d=>{if(d.type==="vttjserror"){Xe.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return _d(u,e)}):_d(u,e)}))};class us extends Yl{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const i=ot(e,{kind:lx[e.kind]||"subtitles",language:e.language||e.srclang||""});let r=vd[i.mode]||"disabled";const a=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(r="hidden"),super(i),this.tech_=i.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const o=new ha(this.cues_),l=new ha(this.activeCues_);let u=!1;this.timeupdateHandler=ut(this,function(f={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){f.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1),f.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const d=()=>{this.stopTracking()};this.tech_.one("dispose",d),r!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return a},set(){}},mode:{get(){return r},set(f){vd[f]&&r!==f&&(r=f,!this.preload_&&r!=="disabled"&&this.cues.length===0&&yd(this.src,this),this.stopTracking(),r!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?o:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return l;const f=this.tech_.currentTime(),g=[];for(let v=0,S=this.cues.length;v<S;v++){const C=this.cues[v];C.startTime<=f&&C.endTime>=f&&g.push(C)}if(u=!1,g.length!==this.activeCues_.length)u=!0;else for(let v=0;v<g.length;v++)this.activeCues_.indexOf(g[v])===-1&&(u=!0);return this.activeCues_=g,l.setCues_(this.activeCues_),l},set(){}}}),i.src?(this.src=i.src,this.preload_||(this.loaded_=!0),(this.preload_||i.kind!=="subtitles"&&i.kind!=="captions")&&yd(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let i=e;if(!("getCueAsHTML"in i)){i=new W.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const a in e)a in i||(i[a]=e[a]);i.id=e.id,i.originalCue_=e}const r=this.tech_.textTracks();for(let a=0;a<r.length;a++)r[a]!==this&&r[a].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_)}toJSON(){return hl.trackToJson(this)}removeCue(e){let i=this.cues_.length;for(;i--;){const r=this.cues_[i];if(r===e||r.originalCue_&&r.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}}}us.prototype.allowedEvents_={cuechange:"cuechange"};class w0 extends Yl{constructor(e={}){const i=ot(e,{kind:ox[e.kind]||""});super(i);let r=!1;Object.defineProperty(this,"enabled",{get(){return r},set(a){typeof a!="boolean"||a===r||(r=a,this.trigger("enabledchange"))}}),i.enabled&&(this.enabled=i.enabled),this.loaded_=!0}}class D0 extends Yl{constructor(e={}){const i=ot(e,{kind:ax[e.kind]||""});super(i);let r=!1;Object.defineProperty(this,"selected",{get(){return r},set(a){typeof a!="boolean"||a===r||(r=a,this.trigger("selectedchange"))}}),i.selected&&(this.selected=i.selected)}}class an extends pi{constructor(e={}){super();let i;const r=new us(e);this.kind=r.kind,this.src=r.src,this.srclang=r.language,this.label=r.label,this.default=r.default,Object.defineProperties(this,{readyState:{get(){return i}},track:{get(){return r}}}),i=an.NONE,r.addEventListener("loadeddata",()=>{i=an.LOADED,this.trigger({type:"load",target:this})})}}an.prototype.allowedEvents_={load:"load"};an.NONE=0;an.LOADING=1;an.LOADED=2;an.ERROR=3;const gi={audio:{ListClass:E0,TrackClass:w0,capitalName:"Audio"},video:{ListClass:S0,TrackClass:D0,capitalName:"Video"},text:{ListClass:Wl,TrackClass:us,capitalName:"Text"}};Object.keys(gi).forEach(function(s){gi[s].getterName=`${s}Tracks`,gi[s].privateName=`${s}Tracks_`});const mr={remoteText:{ListClass:Wl,TrackClass:us,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:sx,TrackClass:an,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Zt=Object.assign({},gi,mr);mr.names=Object.keys(mr);gi.names=Object.keys(gi);Zt.names=[].concat(mr.names).concat(gi.names);function cx(s,e,i,r,a={}){const o=s.textTracks();a.kind=e,i&&(a.label=i),r&&(a.language=r),a.tech=s;const l=new Zt.text.TrackClass(a);return o.addTrack(l),l}class qe extends oe{constructor(e={},i=function(){}){e.reportTouchActivity=!1,super(null,e,i),this.onDurationChange_=r=>this.onDurationChange(r),this.trackProgress_=r=>this.trackProgress(r),this.trackCurrentTime_=r=>this.trackCurrentTime(r),this.stopTrackingCurrentTime_=r=>this.stopTrackingCurrentTime(r),this.disposeSourceHandler_=r=>this.disposeSourceHandler(r),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),Zt.names.forEach(r=>{const a=Zt[r];e&&e[a.getterName]&&(this[a.privateName]=e[a.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(r=>{e[`native${r}Tracks`]===!1&&(this[`featuresNative${r}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new Zt.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ut(this,function(){const i=this.bufferedPercent();this.bufferedPercent_!==i&&this.trigger("progress"),this.bufferedPercent_=i,i===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Oi(0,0)}bufferedPercent(){return C0(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(gi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(i=>{const r=this[`${i}Tracks`]()||[];let a=r.length;for(;a--;){const o=r[a];i==="text"&&this.removeRemoteTextTrack(o),r.removeTrack(o)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let i=e.length;for(;i--;){const r=e[i];this.removeRemoteTextTrack(r)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new gt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Oi(0,0):Oi()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){gi.names.forEach(e=>{const i=gi[e],r=()=>{this.trigger(`${e}trackchange`)},a=this[i.getterName]();a.addEventListener("removetrack",r),a.addEventListener("addtrack",r),this.on("dispose",()=>{a.removeEventListener("removetrack",r),a.removeEventListener("addtrack",r)})})}addWebVttScript_(){if(!W.WebVTT)if(_e.body.contains(this.el())){if(!this.options_["vtt.js"]&&dr(jc)&&Object.keys(jc).length>0){this.trigger("vttjsloaded");return}const e=_e.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),W.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),i=this.remoteTextTracks(),r=u=>e.addTrack(u.track),a=u=>e.removeTrack(u.track);i.on("addtrack",r),i.on("removetrack",a),this.addWebVttScript_();const o=()=>this.trigger("texttrackchange"),l=()=>{o();for(let u=0;u<e.length;u++){const d=e[u];d.removeEventListener("cuechange",o),d.mode==="showing"&&d.addEventListener("cuechange",o)}};l(),e.addEventListener("change",l),e.addEventListener("addtrack",l),e.addEventListener("removetrack",l),this.on("dispose",function(){i.off("addtrack",r),i.off("removetrack",a),e.removeEventListener("change",l),e.removeEventListener("addtrack",l),e.removeEventListener("removetrack",l);for(let u=0;u<e.length;u++)e[u].removeEventListener("cuechange",o)})}addTextTrack(e,i,r){if(!e)throw new Error("TextTrack kind is required but was not provided");return cx(this,e,i,r)}createRemoteTextTrack(e){const i=ot(e,{tech:this});return new mr.remoteTextEl.TrackClass(i)}addRemoteTextTrack(e={},i){const r=this.createRemoteTextTrack(e);return typeof i!="boolean"&&(i=!1),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),i===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(r.track)),r}removeRemoteTextTrack(e){const i=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(i),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const i=yi();return!this.isReady_||this.paused()?(this.queuedHanders_.add(i),this.one("playing",()=>{this.queuedHanders_.has(i)&&(this.queuedHanders_.delete(i),e())})):this.requestNamedAnimationFrame(i,e),i}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,i){return qe.canPlayType(e.type)}static isTech(e){return e.prototype instanceof qe||e instanceof qe||e===qe}static registerTech(e,i){if(qe.techs_||(qe.techs_={}),!qe.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!qe.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!qe.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=_t(e),qe.techs_[e]=i,qe.techs_[Jr(e)]=i,e!=="Tech"&&qe.defaultTechOrder_.push(e),i}static getTech(e){if(e){if(qe.techs_&&qe.techs_[e])return qe.techs_[e];if(e=_t(e),W&&W.videojs&&W.videojs[e])return Xe.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),W.videojs[e]}}}Zt.names.forEach(function(s){const e=Zt[s];qe.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});qe.prototype.featuresVolumeControl=!0;qe.prototype.featuresMuteControl=!0;qe.prototype.featuresFullscreenResize=!1;qe.prototype.featuresPlaybackRate=!1;qe.prototype.featuresProgressEvents=!1;qe.prototype.featuresSourceset=!1;qe.prototype.featuresTimeupdateEvents=!1;qe.prototype.featuresNativeTextTracks=!1;qe.prototype.featuresVideoFrameCallback=!1;qe.withSourceHandlers=function(s){s.registerSourceHandler=function(i,r){let a=s.sourceHandlers;a||(a=s.sourceHandlers=[]),r===void 0&&(r=a.length),a.splice(r,0,i)},s.canPlayType=function(i){const r=s.sourceHandlers||[];let a;for(let o=0;o<r.length;o++)if(a=r[o].canPlayType(i),a)return a;return""},s.selectSourceHandler=function(i,r){const a=s.sourceHandlers||[];let o;for(let l=0;l<a.length;l++)if(o=a[l].canHandleSource(i,r),o)return a[l];return null},s.canPlaySource=function(i,r){const a=s.selectSourceHandler(i,r);return a?a.canHandleSource(i,r):""},["seekable","seeking","duration"].forEach(function(i){const r=this[i];typeof r=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):r.apply(this,arguments)})},s.prototype),s.prototype.setSource=function(i){let r=s.selectSourceHandler(i,this.options_);r||(s.nativeSourceHandler?r=s.nativeSourceHandler:Xe.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),r!==s.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=r.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},s.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};oe.registerComponent("Tech",qe);qe.registerTech("Tech",qe);qe.defaultTechOrder_=[];const Mn={},fa={},pa={};function dx(s,e){Mn[s]=Mn[s]||[],Mn[s].push(e)}function hx(s,e,i){s.setTimeout(()=>wn(e,Mn[e.type],i,s),1)}function fx(s,e){s.forEach(i=>i.setTech&&i.setTech(e))}function px(s,e,i){return s.reduceRight(Ql(i),e[i]())}function mx(s,e,i,r){return e[i](s.reduce(Ql(i),r))}function Td(s,e,i,r=null){const a="call"+_t(i),o=s.reduce(Ql(a),r),l=o===pa,u=l?null:e[i](o);return _x(s,i,u,l),u}const gx={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},vx={setCurrentTime:1,setMuted:1,setVolume:1},bd={play:1,pause:1};function Ql(s){return(e,i)=>e===pa?pa:i[s]?i[s](e):e}function _x(s,e,i,r){for(let a=s.length-1;a>=0;a--){const o=s[a];o[e]&&o[e](r,i)}}function yx(s){fa.hasOwnProperty(s.id())&&delete fa[s.id()]}function Tx(s,e){const i=fa[s.id()];let r=null;if(i==null)return r=e(s),fa[s.id()]=[[e,r]],r;for(let a=0;a<i.length;a++){const[o,l]=i[a];o===e&&(r=l)}return r===null&&(r=e(s),i.push([e,r])),r}function wn(s={},e=[],i,r,a=[],o=!1){const[l,...u]=e;if(typeof l=="string")wn(s,Mn[l],i,r,a,o);else if(l){const d=Tx(r,l);if(!d.setSource)return a.push(d),wn(s,u,i,r,a,o);d.setSource(Object.assign({},s),function(f,g){if(f)return wn(s,u,i,r,a,o);a.push(d),wn(g,s.type===g.type?u:Mn[g.type],i,r,a,o)})}else u.length?wn(s,u,i,r,a,o):o?i(s,a):wn(s,Mn["*"],i,r,a,!0)}const bx={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},ma=function(s=""){const e=Kl(s);return bx[e.toLowerCase()]||""},xx=(s,e)=>{if(!e)return"";if(s.cache_.source.src===e&&s.cache_.source.type)return s.cache_.source.type;const i=s.cache_.sources.filter(a=>a.src===e);if(i.length)return i[0].type;const r=s.$$("source");for(let a=0;a<r.length;a++){const o=r[a];if(o.type&&o.src&&o.src===e)return o.type}return ma(e)},A0=function(s){if(Array.isArray(s)){let e=[];s.forEach(function(i){i=A0(i),Array.isArray(i)?e=e.concat(i):zi(i)&&e.push(i)}),s=e}else typeof s=="string"&&s.trim()?s=[xd({src:s})]:zi(s)&&typeof s.src=="string"&&s.src&&s.src.trim()?s=[xd(s)]:s=[];return s};function xd(s){if(!s.type){const e=ma(s.src);e&&(s.type=e)}return s}var Cx=`<svg xmlns="http://www.w3.org/2000/svg">
38
+ <defs>
39
+ <symbol viewBox="0 0 48 48" id="vjs-icon-play">
40
+ <path d="M16 10v28l22-14z"></path>
41
+ </symbol>
42
+ <symbol viewBox="0 0 48 48" id="vjs-icon-pause">
43
+ <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>
44
+ </symbol>
45
+ <symbol viewBox="0 0 48 48" id="vjs-icon-audio">
46
+ <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>
47
+ </symbol>
48
+ <symbol viewBox="0 0 48 48" id="vjs-icon-captions">
49
+ <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>
50
+ </symbol>
51
+ <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">
52
+ <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>
53
+ </symbol>
54
+ <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">
55
+ <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>
56
+ </symbol>
57
+ <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">
58
+ <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>
59
+ </symbol>
60
+ <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">
61
+ <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
62
+ </symbol>
63
+ <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">
64
+ <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>
65
+ </symbol>
66
+ <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">
67
+ <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>
68
+ </symbol>
69
+ <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">
70
+ <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>
71
+ </symbol>
72
+ <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">
73
+ <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>
74
+ </symbol>
75
+ <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">
76
+ <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>
77
+ </symbol>
78
+ <symbol viewBox="0 0 24 24" id="vjs-icon-hd">
79
+ <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>
80
+ </symbol>
81
+ <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">
82
+ <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>
83
+ </symbol>
84
+ <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">
85
+ <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>
86
+ </symbol>
87
+ <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">
88
+ <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>
89
+ </symbol>
90
+ <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">
91
+ <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>
92
+ </symbol>
93
+ <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">
94
+ <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>
95
+ </symbol>
96
+ <symbol viewBox="0 0 48 48" id="vjs-icon-share">
97
+ <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>
98
+ </symbol>
99
+ <symbol viewBox="0 0 48 48" id="vjs-icon-cog">
100
+ <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>
101
+ </symbol>
102
+ <symbol viewBox="0 0 48 48" id="vjs-icon-square">
103
+ <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>
104
+ </symbol>
105
+ <symbol viewBox="0 0 48 48" id="vjs-icon-circle">
106
+ <circle cx="24" cy="24" r="20"></circle>
107
+ </symbol>
108
+ <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">
109
+ <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>
110
+ </symbol>
111
+ <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">
112
+ <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>
113
+ </symbol>
114
+ <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">
115
+ <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>
116
+ </symbol>
117
+ <symbol viewBox="0 0 48 48" id="vjs-icon-replay">
118
+ <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>
119
+ </symbol>
120
+ <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">
121
+ <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>
122
+ </symbol>
123
+ <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">
124
+ <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>
125
+ </symbol>
126
+ <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">
127
+ <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>
128
+ </symbol>
129
+ <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">
130
+ <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>
131
+ </symbol>
132
+ <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">
133
+ <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>
134
+ </symbol>
135
+ <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">
136
+ <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>
137
+ </symbol>
138
+ <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">
139
+ <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>
140
+ </symbol>
141
+ <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">
142
+ <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>
143
+ </symbol>
144
+ <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">
145
+ <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>
146
+ </symbol>
147
+ <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">
148
+ <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>
149
+ </symbol>
150
+ <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">
151
+ <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>
152
+ </symbol>
153
+ <symbol viewBox="0 0 48 48" id="vjs-icon-cast">
154
+ <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>
155
+ </symbol>
156
+ <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">
157
+ <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>
158
+ </symbol>
159
+ <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">
160
+ <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>
161
+ <path fill="none" d="M-1-3h24v24H-1z"></path>
162
+ </symbol>
163
+ <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">
164
+ <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>
165
+ </symbol>
166
+ <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">
167
+ <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>
168
+ </symbol>
169
+ <symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">
170
+ <path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>
171
+ </symbol>
172
+ <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">
173
+ <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>
174
+ </symbol>
175
+ <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">
176
+ <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
177
+ </symbol>
178
+ </defs>
179
+ </svg>`;const Cd=la?10009:ua?461:8,Gn={codes:{play:415,pause:19,ff:417,rw:412,back:Cd},names:{415:"play",19:"pause",417:"ff",412:"rw",[Cd]:"back"},isEventKey(s,e){return e=e.toLowerCase(),!!(this.names[s.keyCode]&&this.names[s.keyCode]===e)},getEventName(s){if(this.names[s.keyCode])return this.names[s.keyCode];if(this.codes[s.code]){const e=this.codes[s.code];return this.names[e]}return null}},Ed=5;class Ex extends pi{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const i=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i.key)){if(this.isPaused_)return;i.preventDefault();const r=i.key.substring(5).toLowerCase();this.move(r)}else if(Gn.isEventKey(i,"play")||Gn.isEventKey(i,"pause")||Gn.isEventKey(i,"ff")||Gn.isEventKey(i,"rw")){i.preventDefault();const r=Gn.getEventName(i);this.performMediaAction_(r)}else Gn.isEventKey(i,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(i.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+Ed);break;case"rw":this.userSeek_(this.player_.currentTime()-Ed);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const i=e.relatedTarget;let r=null;const a=this.getCurrentComponent(e.target);i&&(r=!!i.closest(".video-js"),i.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!r||!i)&&(a&&a.name()==="CloseButton"?this.refocusComponent():(this.pause(),a&&a.el()&&(this.lastFocusedComponent_=a)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,i=[];function r(a){for(const o of a)o.hasOwnProperty("el_")&&o.getIsFocusable()&&o.getIsAvailableToBeFocused(o.el())&&i.push(o),o.hasOwnProperty("children_")&&o.children_.length>0&&r(o.children_)}return e.children_.forEach(a=>{if(a.hasOwnProperty("el_"))if(a.getIsFocusable&&a.getIsAvailableToBeFocused&&a.getIsFocusable()&&a.getIsAvailableToBeFocused(a.el())){i.push(a);return}else a.hasOwnProperty("children_")&&a.children_.length>0?r(a.children_):a.hasOwnProperty("items")&&a.items.length>0?r(a.items):this.findSuitableDOMChild(a)&&i.push(a);if(a.name_==="ErrorDisplay"&&a.opened_){const o=a.el_.querySelector(".vjs-errors-ok-button-container");o&&o.querySelectorAll("button").forEach((u,d)=>{i.push({name:()=>"ModalButton"+(d+1),el:()=>u,getPositions:()=>{const f=u.getBoundingClientRect(),g={x:f.x,y:f.y,width:f.width,height:f.height,top:f.top,right:f.right,bottom:f.bottom,left:f.left},v={x:f.left+f.width/2,y:f.top+f.height/2,width:0,height:0,top:f.top+f.height/2,right:f.left+f.width/2,bottom:f.top+f.height/2,left:f.left+f.width/2};return{boundingClientRect:g,center:v}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:f=>!0,focus:()=>u.focus()})})}}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){function i(r){if(e.getIsFocusable(r)&&e.getIsAvailableToBeFocused(r))return r;for(let a=0;a<r.children.length;a++){const o=r.children[a],l=i(o);if(l)return l}return null}return e.el()?i(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const i=e||document.activeElement;if(this.focusableComponents.length){for(const r of this.focusableComponents)if(r.el()===i)return r}}add(e){const i=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&i.push(e),this.focusableComponents=i,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let i=0;i<this.focusableComponents.length;i++)if(this.focusableComponents[i].name()===e.name()){this.focusableComponents.splice(i,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const i=this.getCurrentComponent();if(!i)return;const r=i.getPositions(),a=this.focusableComponents.filter(l=>l!==i&&this.isInDirection_(r.boundingClientRect,l.getPositions().boundingClientRect,e)),o=this.findBestCandidate_(r.center,a,e);o?this.focus(o):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:i})}findBestCandidate_(e,i,r){let a=1/0,o=null;for(const l of i){const u=l.getPositions().center,d=this.calculateDistance_(e,u,r);d<a&&(a=d,o=l)}return o}isInDirection_(e,i,r){switch(r){case"right":return i.left>=e.right;case"left":return i.right<=e.left;case"down":return i.top>=e.bottom;case"up":return i.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,i,r){const a=Math.abs(e.x-i.x),o=Math.abs(e.y-i.y);let l;switch(r){case"right":case"left":l=a+o*100;break;case"up":l=o*2+a*.5;break;case"down":l=o*5+a;break;default:l=a+o}return l}searchForTrackSelect_(){const e=this;for(const i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break}}}class Sx extends oe{constructor(e,i,r){const a=ot({createEl:!1},i);if(super(e,a,r),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let o=0,l=i.playerOptions.techOrder;o<l.length;o++){const u=_t(l[o]);let d=qe.getTech(u);if(u||(d=oe.getComponent(u)),d&&d.isSupported()){e.loadTech_(u);break}}else e.src(i.playerOptions.sources)}}oe.registerComponent("MediaLoader",Sx);class qa extends oe{constructor(e,i){super(e,i),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=r=>this.handleMouseOver(r),this.handleMouseOut_=r=>this.handleMouseOut(r),this.handleClick_=r=>this.handleClick(r),this.handleKeyDown_=r=>this.handleKeyDown(r),this.emitTapEvents(),this.enable()}createEl(e="div",i={},r={}){i=Object.assign({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&Xe.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),r=Object.assign({role:"button"},r),this.tabIndex_=i.tabIndex;const a=Fe(e,i,r);return this.player_.options_.experimentalSvgIcons||a.appendChild(Fe("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(a),a}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Fe("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,i=this.el()){if(e===void 0)return this.controlText_||"Need Text";const r=this.localize(e);this.controlText_=e,Tn(this.controlTextEl_,r),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",r)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}oe.registerComponent("ClickableComponent",qa);class fl extends qa{constructor(e,i){super(e,i),this.update(),this.update_=r=>this.update(r),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Fe("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const i=this.player().poster();this.setSrc(i),i?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Fe("picture",{className:"vjs-poster",tabIndex:-1},{},Fe("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Ui(this.player_.play()):this.player_.pause())}}fl.prototype.crossorigin=fl.prototype.crossOrigin;oe.registerComponent("PosterImage",fl);const mi="#222",Sd="#ccc",kx={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function $o(s,e){let i;if(s.length===4)i=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else if(s.length===7)i=s.slice(1);else throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function Vi(s,e,i){try{s.style[e]=i}catch{return}}function kd(s){return s?`${s}px`:""}class wx extends oe{constructor(e,i,r){super(e,i,r);const a=l=>this.updateDisplay(l),o=l=>{this.updateDisplayOverlay(),this.updateDisplay(l)};e.on("loadstart",l=>this.toggleDisplay(l)),e.on("useractive",a),e.on("userinactive",a),e.on("texttrackchange",a),e.on("loadedmetadata",l=>{this.updateDisplayOverlay(),this.preselectTrack(l)}),e.ready(ut(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",o),e.on("playerresize",o);const l=W.screen.orientation||W,u=W.screen.orientation?"change":"orientationchange";l.addEventListener(u,o),e.on("dispose",()=>l.removeEventListener(u,o));const d=this.options_.playerOptions.tracks||[];for(let f=0;f<d.length;f++)this.player_.addRemoteTextTrack(d[f],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},i=this.player_.textTracks(),r=this.player_.cache_.selectedLanguage;let a,o,l;for(let u=0;u<i.length;u++){const d=i[u];r&&r.enabled&&r.language&&r.language===d.language&&d.kind in e?d.kind===r.kind?l=d:l||(l=d):r&&!r.enabled?(l=null,a=null,o=null):d.default&&(d.kind==="descriptions"&&!a?a=d:d.kind in e&&!o&&(o=d))}l?l.mode="showing":o?o.mode="showing":a&&(a.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof W.WebVTT=="function"&&W.WebVTT.processCues(W,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),i=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),i){const l=[];for(let u=0;u<e.length;++u){const d=e[u];d.mode==="showing"&&l.push(d)}this.updateForTrack(l);return}let r=null,a=null,o=e.length;for(;o--;){const l=e[o];l.mode==="showing"&&(l.kind==="descriptions"?r=l:a=l)}if(a?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):r&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(r)),!(W.CSS!==void 0&&W.CSS.supports("inset","10px"))){const l=this.el_,u=l.querySelectorAll(".vjs-text-track-cue"),d=this.player_.controlBar.el_.getBoundingClientRect().height,f=this.player_.el_.getBoundingClientRect().height;l.style="",Vi(l,"position","relative"),Vi(l,"height",f-d+"px"),Vi(l,"top","unset"),ca?Vi(l,"bottom",f+"px"):Vi(l,"bottom","0px"),u.length>0&&u.forEach(g=>{if(g.style.inset){const v=g.style.inset.split(" ");v.length===3&&Object.assign(g.style,{top:v[0],right:v[1],bottom:v[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!(W.CSS!==void 0&&W.CSS.supports("inset-inline: 10px")))return;const e=this.player_.currentWidth(),i=this.player_.currentHeight(),r=e/i,a=this.player_.videoWidth()/this.player_.videoHeight();let o=0,l=0;Math.abs(r-a)>.1&&(r>a?o=Math.round((e-i*a)/2):l=Math.round((i-e/a)/2)),Vi(this.el_,"insetInline",kd(o)),Vi(this.el_,"insetBlock",kd(l))}updateDisplayState(e){const i=this.player_.textTrackSettings.getValues(),r=e.activeCues;let a=r.length;for(;a--;){const o=r[a];if(!o)continue;const l=o.displayState;if(i.color&&(l.firstChild.style.color=i.color),i.textOpacity&&Vi(l.firstChild,"color",$o(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(l.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Vi(l.firstChild,"backgroundColor",$o(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Vi(l,"backgroundColor",$o(i.windowColor,i.windowOpacity)):l.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?l.firstChild.style.textShadow=`2px 2px 3px ${mi}, 2px 2px 4px ${mi}, 2px 2px 5px ${mi}`:i.edgeStyle==="raised"?l.firstChild.style.textShadow=`1px 1px ${mi}, 2px 2px ${mi}, 3px 3px ${mi}`:i.edgeStyle==="depressed"?l.firstChild.style.textShadow=`1px 1px ${Sd}, 0 1px ${Sd}, -1px -1px ${mi}, 0 -1px ${mi}`:i.edgeStyle==="uniform"&&(l.firstChild.style.textShadow=`0 0 4px ${mi}, 0 0 4px ${mi}, 0 0 4px ${mi}, 0 0 4px ${mi}`)),i.fontPercent&&i.fontPercent!==1){const u=W.parseFloat(l.style.fontSize);l.style.fontSize=u*i.fontPercent+"px",l.style.height="auto",l.style.top="auto"}i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?l.firstChild.style.fontVariant="small-caps":l.firstChild.style.fontFamily=kx[i.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof W.WebVTT!="function"||e.every(r=>!r.activeCues))return;const i=[];for(let r=0;r<e.length;++r){const a=e[r];for(let o=0;o<a.activeCues.length;++o)i.push(a.activeCues[o])}W.WebVTT.processCues(W,i,this.el_);for(let r=0;r<e.length;++r){const a=e[r];for(let o=0;o<a.activeCues.length;++o){const l=a.activeCues[o].displayState;Pn(l,"vjs-text-track-cue","vjs-text-track-cue-"+(a.language?a.language:r)),a.language&&hr(l,"lang",a.language)}this.player_.textTrackSettings&&this.updateDisplayState(a)}}}oe.registerComponent("TextTrackDisplay",wx);class Dx extends oe{createEl(){const e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),r=Fe("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),a=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return a.appendChild(r),a}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}oe.registerComponent("LoadingSpinner",Dx);class jt extends qa{createEl(e,i={},r={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),r=Object.assign({type:"button"},r);const a=Fe(e,i,r);return this.player_.options_.experimentalSvgIcons||a.appendChild(Fe("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(a),a}addChild(e,i={}){const r=this.constructor.name;return Xe.warn(`Adding an actionable (user controllable) child to a Button (${r}) is not supported; use a ClickableComponent instead.`),oe.prototype.addChild.call(this,e,i)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}}oe.registerComponent("Button",jt);class N0 extends jt{constructor(e,i){super(e,i),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",r=>this.handleMouseDown(r))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const i=this.player_.play();if(e.type==="tap"||this.mouseused_&&"clientX"in e&&"clientY"in e){Ui(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const r=this.player_.getChild("controlBar"),a=r&&r.getChild("playToggle");if(!a){this.player_.tech(!0).focus();return}const o=()=>a.focus();es(i)?i.then(o,()=>{}):this.setTimeout(o,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}N0.prototype.controlText_="Play Video";oe.registerComponent("BigPlayButton",N0);class Ax extends jt{constructor(e,i){super(e,i),this.setIcon("cancel"),this.controlText(i&&i.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}oe.registerComponent("CloseButton",Ax);class I0 extends jt{constructor(e,i={}){super(e,i),i.replay=i.replay===void 0||i.replay,this.setIcon("play"),this.on(e,"play",r=>this.handlePlay(r)),this.on(e,"pause",r=>this.handlePause(r)),i.replay&&this.on(e,"ended",r=>this.handleEnded(r))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Ui(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",i=>this.handleSeeked(i))}}I0.prototype.controlText_="Play";oe.registerComponent("PlayToggle",I0);class br extends oe{constructor(e,i){super(e,i),this.on(e,["timeupdate","ended","seeking"],r=>this.update(r)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),i=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),r=Fe("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return i.appendChild(r),this.contentEl_=Fe("span",{className:`${e}-display`},{role:"presentation"}),i.appendChild(this.contentEl_),i}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=Fn(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let i=this.textNode_;i&&this.contentEl_.firstChild!==i&&(i=null,Xe.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=_e.createTextNode(this.formattedTime_),this.textNode_&&(i?this.contentEl_.replaceChild(this.textNode_,i):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}br.prototype.labelText_="Time";br.prototype.controlText_="Time";oe.registerComponent("TimeDisplay",br);class Zl extends br{buildCSSClass(){return"vjs-current-time"}updateContent(e){let i;this.player_.ended()?i=this.player_.duration():e&&e.target&&typeof e.target.pendingSeekTime=="function"&&e.target.pendingSeekTime()!==null?i=e.target.pendingSeekTime():i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i)}}Zl.prototype.labelText_="Current Time";Zl.prototype.controlText_="Current Time";oe.registerComponent("CurrentTimeDisplay",Zl);class Jl extends br{constructor(e,i){super(e,i);const r=a=>this.updateContent(a);this.on(e,"durationchange",r),this.on(e,"loadstart",r),this.on(e,"loadedmetadata",r)}buildCSSClass(){return"vjs-duration"}updateContent(e){const i=this.player_.duration();this.updateTextNode_(i)}}Jl.prototype.labelText_="Duration";Jl.prototype.controlText_="Duration";oe.registerComponent("DurationDisplay",Jl);class Nx extends oe{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=super.createEl("div"),r=super.createEl("span",{textContent:"/"});return i.appendChild(r),e.appendChild(i),e}}oe.registerComponent("TimeDivider",Nx);class eu extends br{constructor(e,i){super(e,i),this.on(e,"durationchange",r=>this.updateContent(r))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Fe("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let i;this.player_.ended()?i=0:this.player_.remainingTimeDisplay?i=this.player_.remainingTimeDisplay():i=this.player_.remainingTime(),this.updateTextNode_(i)}}eu.prototype.labelText_="Remaining Time";eu.prototype.controlText_="Remaining Time";oe.registerComponent("RemainingTimeDisplay",eu);class Ix extends oe{constructor(e,i){super(e,i),this.updateShowing(),this.on(this.player(),"durationchange",r=>this.updateShowing(r))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Fe("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Fe("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(_e.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}oe.registerComponent("LiveDisplay",Ix);class O0 extends jt{constructor(e,i){super(e,i),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=r=>this.updateLiveEdgeStatus(r),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Fe("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}O0.prototype.controlText_="Seek to live, currently playing live";oe.registerComponent("SeekToLive",O0);function cs(s,e,i){return s=Number(s),Math.min(i,Math.max(e,isNaN(s)?e:s))}var Ox=Object.freeze({__proto__:null,clamp:cs});class tu extends oe{constructor(e,i){super(e,i),this.handleMouseDown_=r=>this.handleMouseDown(r),this.handleMouseUp_=r=>this.handleMouseUp(r),this.handleKeyDown_=r=>this.handleKeyDown(r),this.handleClick_=r=>this.handleClick(r),this.handleMouseMove_=r=>this.handleMouseMove(r),this.update_=r=>this.update(r),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,i={},r={}){return i.className=i.className+" vjs-slider",i=Object.assign({tabIndex:0},i),r=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},r),super.createEl(e,i,r)}handleMouseDown(e){const i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!Gi&&e.preventDefault(),r0(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove_),this.on(i,"mouseup",this.handleMouseUp_),this.on(i,"touchmove",this.handleMouseMove_),this.on(i,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const i=this.bar.el_.ownerDocument;s0(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(i,"mousemove",this.handleMouseMove_),this.off(i,"mouseup",this.handleMouseUp_),this.off(i,"touchmove",this.handleMouseMove_),this.off(i,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const i=this.vertical()?"height":"width";this.bar.el().style[i]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(cs(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const i=Ma(this.el_,e);return this.vertical()?i.y:i.x}handleKeyDown(e){const i=this.options_.playerOptions.spatialNavigation,r=i&&i.enabled,a=i&&i.horizontalSeek;r?a&&e.key==="ArrowLeft"||!a&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):a&&e.key==="ArrowRight"||!a&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}oe.registerComponent("Slider",tu);const Uo=(s,e)=>cs(s/e*100,0,100).toFixed(2)+"%";class Bx extends oe{constructor(e,i){super(e,i),this.partEls_=[],this.on(e,"progress",r=>this.update(r))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),i=Fe("span",{className:"vjs-control-text"}),r=Fe("span",{textContent:this.localize("Loaded")}),a=_e.createTextNode(": ");return this.percentageEl_=Fe("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(r),i.appendChild(a),i.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const i=this.player_.liveTracker,r=this.player_.buffered(),a=i&&i.isLive()?i.seekableEnd():this.player_.duration(),o=this.player_.bufferedEnd(),l=this.partEls_,u=Uo(o,a);this.percent_!==u&&(this.el_.style.width=u,Tn(this.percentageEl_,u),this.percent_=u);for(let d=0;d<r.length;d++){const f=r.start(d),g=r.end(d);let v=l[d];v||(v=this.el_.appendChild(Fe()),l[d]=v),!(v.dataset.start===f&&v.dataset.end===g)&&(v.dataset.start=f,v.dataset.end=g,v.style.left=Uo(f,o),v.style.width=Uo(g-f,o))}for(let d=l.length;d>r.length;d--)this.el_.removeChild(l[d-1]);l.length=r.length})}}oe.registerComponent("LoadProgressBar",Bx);class Lx extends oe{constructor(e,i){super(e,i),this.update=Wi(ut(this,this.update),Ti)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,i,r){const a=ss(this.el_),o=fr(this.player_.el()),l=e.width*i;if(!o||!a)return;let u=e.left-o.left+l,d=e.width-l+(o.right-e.right);d||(d=e.width-l,u=l);let f=a.width/2;u<f?f+=f-u:d<f&&(f=d),f<0?f=0:f>a.width&&(f=a.width),f=Math.round(f),this.el_.style.right=`-${f}px`,this.write(r)}write(e){Tn(this.el_,e)}updateTime(e,i,r,a){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let o;const l=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const u=this.player_.liveTracker.liveWindow(),d=u-i*u;o=(d<1?"":"-")+Fn(d,u)}else o=Fn(r,l);this.update(e,i,o),a&&a()})}}oe.registerComponent("TimeTooltip",Lx);class iu extends oe{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=Wi(ut(this,this.update),Ti)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,i,r){const a=this.getChild("timeTooltip");if(!a)return;const o=r&&r.target&&typeof r.target.pendingSeekTime=="function"?r.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.updateTime(e,i,o)}}iu.prototype.options_={children:[]};!Ut&&!Bi&&iu.prototype.options_.children.push("timeTooltip");oe.registerComponent("PlayProgressBar",iu);class B0 extends oe{constructor(e,i){super(e,i),this.update=Wi(ut(this,this.update),Ti)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i){const r=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,r,()=>{this.el_.style.left=`${e.width*i}px`})}}B0.prototype.options_={children:["timeTooltip"]};oe.registerComponent("MouseTimeDisplay",B0);class ja extends tu{constructor(e,i){i=ot(ja.prototype.options_,i),i.children=[...i.children];const r=e.options_.disableSeekWhileScrubbingOnMobile&&(Ut||Bi)||e.options_.disableSeekWhileScrubbingOnSTV;(!Ut&&!Bi||r)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=r,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=ut(this,this.update),this.update=Wi(this.update_,Ti),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in _e&&"visibilityState"in _e&&this.on(_e,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){_e.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Ti))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(_e.visibilityState==="hidden")return;const i=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const r=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),a=this.player_.liveTracker;let o=this.player_.duration();a&&a.isLive()&&(o=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==r||this.duration_!==o)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Fn(r,o),Fn(o,o)],"{1} of {2}")),this.currentTime_=r,this.duration_=o),this.bar&&this.bar.update(fr(this.el()),this.getProgress(),e)}),i}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(e!==void 0)if(e!==null){const i=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,i))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let i;const r=this.player_.liveTracker;return r&&r.isLive()?(i=(e-r.seekableStart())/r.liveWindow(),r.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i}handleMouseDown(e){as(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,i=!1){if(!as(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let r;const a=this.calculateDistance(e),o=this.player_.liveTracker;if(!o||!o.isLive())r=a*this.player_.duration(),r===this.player_.duration()&&(r=r-.1);else{if(a>=.99){o.seekToLiveEdge();return}const l=o.seekableStart(),u=o.liveCurrentTime();if(r=l+a*o.liveWindow(),r>=u&&(r=u),r<=l&&(r=l+.1),r===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(r):this.userSeek_(r),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Ui(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const i=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(i+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const i=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const r=parseInt(e.key,10)*.1;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in _e&&"visibilityState"in _e&&this.off(_e,"visibilitychange",this.toggleVisibility_),super.dispose()}}ja.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12};oe.registerComponent("SeekBar",ja);class L0 extends oe{constructor(e,i){super(e,i),this.handleMouseMove=Wi(ut(this,this.handleMouseMove),Ti),this.throttledHandleMouseSeek=Wi(ut(this,this.handleMouseSeek),Ti),this.handleMouseUpHandler_=r=>this.handleMouseUp(r),this.handleMouseDownHandler_=r=>this.handleMouseDown(r),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const i=this.getChild("seekBar");if(!i)return;const r=i.getChild("playProgressBar"),a=i.getChild("mouseTimeDisplay");if(!r&&!a)return;const o=i.el(),l=ss(o);let u=Ma(o,e).x;u=cs(u,0,1),a&&a.update(l,u),r&&r.update(l,i.getProgress())}handleMouseSeek(e){const i=this.getChild("seekBar");i&&i.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Ui(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const i=this.el_.ownerDocument,r=this.getChild("seekBar");r&&r.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}L0.prototype.options_={children:["seekBar"]};oe.registerComponent("ProgressControl",L0);class P0 extends jt{constructor(e,i){super(e,i),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],r=>this.handlePictureInPictureChange(r)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],r=>this.handlePictureInPictureEnabledChange(r)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){_e.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in W?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof _e.exitPictureInPicture=="function"&&super.show()}}P0.prototype.controlText_="Picture-in-Picture";oe.registerComponent("PictureInPictureToggle",P0);class M0 extends jt{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",r=>this.handleFullscreenChange(r)),_e[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}M0.prototype.controlText_="Fullscreen";oe.registerComponent("FullscreenToggle",M0);const Px=function(s,e){e.tech_&&!e.tech_.featuresVolumeControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class Mx extends oe{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}oe.registerComponent("VolumeLevel",Mx);class Rx extends oe{constructor(e,i){super(e,i),this.update=Wi(ut(this,this.update),Ti)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,i,r,a){if(!r){const o=fr(this.el_),l=fr(this.player_.el()),u=e.width*i;if(!l||!o)return;const d=e.left-l.left+u,f=e.width-u+(l.right-e.right);let g=o.width/2;d<g?g+=g-d:f<g&&(g=f),g<0?g=0:g>o.width&&(g=o.width),this.el_.style.right=`-${g}px`}this.write(`${a}%`)}write(e){Tn(this.el_,e)}updateVolume(e,i,r,a,o){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,r,a.toFixed(0)),o&&o()})}}oe.registerComponent("VolumeLevelTooltip",Rx);class R0 extends oe{constructor(e,i){super(e,i),this.update=Wi(ut(this,this.update),Ti)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i,r){const a=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,r,a,()=>{r?this.el_.style.bottom=`${e.height*i}px`:this.el_.style.left=`${e.width*i}px`})}}R0.prototype.options_={children:["volumeLevelTooltip"]};oe.registerComponent("MouseVolumeLevelDisplay",R0);class Ha extends tu{constructor(e,i){super(e,i),this.on("slideractive",r=>this.updateLastVolume_(r)),this.on(e,"volumechange",r=>this.updateARIAAttributes(r)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){as(e)&&super.handleMouseDown(e)}handleMouseMove(e){const i=this.getChild("mouseVolumeLevelDisplay");if(i){const r=this.el(),a=fr(r),o=this.vertical();let l=Ma(r,e);l=o?l.y:l.x,l=cs(l,0,1),i.update(a,l,o)}as(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}Ha.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!Ut&&!Bi&&Ha.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");Ha.prototype.playerEvent="volumechange";oe.registerComponent("VolumeBar",Ha);class V0 extends oe{constructor(e,i={}){i.vertical=i.vertical||!1,(typeof i.volumeBar>"u"||dr(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),super(e,i),Px(this,e),this.throttledHandleMouseMove=Wi(ut(this,this.handleMouseMove),Ti),this.handleMouseUpHandler_=r=>this.handleMouseUp(r),this.on("mousedown",r=>this.handleMouseDown(r)),this.on("touchstart",r=>this.handleMouseDown(r)),this.on("mousemove",r=>this.handleMouseMove(r)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}V0.prototype.options_={children:["volumeBar"]};oe.registerComponent("VolumeControl",V0);const Vx=function(s,e){e.tech_&&!e.tech_.featuresMuteControl&&s.addClass("vjs-hidden"),s.on(e,"loadstart",function(){e.tech_.featuresMuteControl?s.removeClass("vjs-hidden"):s.addClass("vjs-hidden")})};class F0 extends jt{constructor(e,i){super(e,i),Vx(this,e),this.on(e,["loadstart","volumechange"],r=>this.update(r))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.volume(),r=this.player_.lastVolume_();if(i===0){const a=r<.1?.1:r;this.player_.volume(a),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let i=3;this.setIcon("volume-high"),Ut&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),i=0):e<.33?(this.setIcon("volume-low"),i=1):e<.67&&(this.setIcon("volume-medium"),i=2),La(this.el_,[0,1,2,3].reduce((r,a)=>r+`${a?" ":""}vjs-vol-${a}`,"")),Pn(this.el_,`vjs-vol-${i}`)}updateControlText_(){const i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)}}F0.prototype.controlText_="Mute";oe.registerComponent("MuteToggle",F0);class $0 extends oe{constructor(e,i={}){typeof i.inline<"u"?i.inline=i.inline:i.inline=!0,(typeof i.volumeControl>"u"||dr(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),super(e,i),this.handleKeyPressHandler_=r=>this.handleKeyPress(r),this.on(e,["loadstart"],r=>this.volumePanelState_(r)),this.on(this.muteToggle,"keyup",r=>this.handleKeyPress(r)),this.on(this.volumeControl,"keyup",r=>this.handleVolumeControlKeyUp(r)),this.on("keydown",r=>this.handleKeyPress(r)),this.on("mouseover",r=>this.handleMouseOver(r)),this.on("mouseout",r=>this.handleMouseOut(r)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),fi(_e,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),qt(_e,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}$0.prototype.options_={children:["muteToggle","volumeControl"]};oe.registerComponent("VolumePanel",$0);class U0 extends jt{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const i=this.player_.currentTime(),r=this.player_.liveTracker,a=r&&r.isLive()?r.seekableEnd():this.player_.duration();let o;i+this.skipTime<=a?o=i+this.skipTime:o=a,this.player_.currentTime(o)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}U0.prototype.controlText_="Skip Forward";oe.registerComponent("SkipForward",U0);class q0 extends jt{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.currentTime(),r=this.player_.liveTracker,a=r&&r.isLive()&&r.seekableStart();let o;a&&i-this.skipTime<=a?o=a:i>=this.skipTime?o=i-this.skipTime:o=0,this.player_.currentTime(o)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}q0.prototype.controlText_="Skip Backward";oe.registerComponent("SkipBackward",q0);class j0 extends oe{constructor(e,i){super(e,i),i&&(this.menuButton_=i.menuButton),this.focusedChild_=-1,this.on("keydown",r=>this.handleKeyDown(r)),this.boundHandleBlur_=r=>this.handleBlur(r),this.boundHandleTapClick_=r=>this.handleTapClick(r)}addEventListenerForItem(e){e instanceof oe&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof oe&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const i=this.addChild(e);i&&this.addEventListenerForItem(i)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Fe(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const i=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),fi(i,"click",function(r){r.preventDefault(),r.stopImmediatePropagation()}),i}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const i=e.relatedTarget||_e.activeElement;if(!this.children().some(r=>r.el()===i)){const r=this.menuButton_;r&&r.buttonPressed_&&i!==r.el().firstChild&&r.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const i=this.children();if(!Array.isArray(i))return;const r=i.filter(a=>a.el()===e.target)[0];if(!r)return;r.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const i=this.children().slice();i.length&&i[0].hasClass("vjs-menu-title")&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus())}}oe.registerComponent("Menu",j0);class nu extends oe{constructor(e,i={}){super(e,i),this.menuButton_=new jt(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const r=jt.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+r,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const a=o=>this.handleClick(o);this.handleMenuKeyUp_=o=>this.handleMenuKeyUp(o),this.on(this.menuButton_,"tap",a),this.on(this.menuButton_,"click",a),this.on(this.menuButton_,"keydown",o=>this.handleKeyDown(o)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),fi(_e,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",o=>this.handleMouseLeave(o)),this.on("keydown",o=>this.handleSubmenuKeyDown(o))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new j0(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=Fe("li",{className:"vjs-menu-title",textContent:_t(this.options_.title),tabIndex:-1}),r=new oe(this.player_,{el:i});e.addItem(r)}if(this.items=this.createItems(),this.items)for(let i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){return super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";const i=jt.prototype.buildCSSClass();return`vjs-menu-button ${e} ${i} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,i=this.menuButton_.el()){return this.menuButton_.controlText(e,i)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),qt(_e,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Escape"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Escape"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Escape"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Ut&&Jh())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}oe.registerComponent("MenuButton",nu);class ru extends nu{constructor(e,i){const r=i.tracks;if(super(e,i),this.items.length<=1&&this.hide(),!r)return;const a=ut(this,this.update);r.addEventListener("removetrack",a),r.addEventListener("addtrack",a),r.addEventListener("labelchange",a),this.player_.on("ready",a),this.player_.on("dispose",function(){r.removeEventListener("removetrack",a),r.removeEventListener("addtrack",a),r.removeEventListener("labelchange",a)})}}oe.registerComponent("TrackButton",ru);class ds extends qa{constructor(e,i){super(e,i),this.selectable=i.selectable,this.isSelected_=i.selected||!1,this.multiSelectable=i.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,i,r){this.nonIconControl=!0;const a=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},i),r),o=Fe("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?a.appendChild(o):a.replaceChild(o,a.querySelector(".vjs-icon-placeholder")),a}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}oe.registerComponent("MenuItem",ds);class hs extends ds{constructor(e,i){const r=i.track,a=e.textTracks();i.label=r.label||r.language||"Unknown",i.selected=r.mode==="showing",super(e,i),this.track=r,this.kinds=(i.kinds||[i.kind||this.track.kind]).filter(Boolean);const o=(...u)=>{this.handleTracksChange.apply(this,u)},l=(...u)=>{this.handleSelectedLanguageChange.apply(this,u)};if(e.on(["loadstart","texttrackchange"],o),a.addEventListener("change",o),a.addEventListener("selectedlanguagechange",l),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],o),a.removeEventListener("change",o),a.removeEventListener("selectedlanguagechange",l)}),a.onchange===void 0){let u;this.on(["tap","click"],function(){if(typeof W.Event!="object")try{u=new W.Event("change")}catch{}u||(u=_e.createEvent("Event"),u.initEvent("change",!0,!0)),a.dispatchEvent(u)})}this.handleTracksChange()}handleClick(e){const i=this.track,r=this.player_.textTracks();if(super.handleClick(e),!!r)for(let a=0;a<r.length;a++){const o=r[a];this.kinds.indexOf(o.kind)!==-1&&(o===i?o.mode!=="showing"&&(o.mode="showing"):o.mode!=="disabled"&&(o.mode="disabled"))}}handleTracksChange(e){const i=this.track.mode==="showing";i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const i=this.player_.cache_.selectedLanguage;if(i&&i.enabled&&i.language===this.track.language&&i.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}oe.registerComponent("TextTrackMenuItem",hs);class H0 extends hs{constructor(e,i){i.track={player:e,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,super(e,i)}handleTracksChange(e){const i=this.player().textTracks();let r=!0;for(let a=0,o=i.length;a<o;a++){const l=i[a];if(this.options_.kinds.indexOf(l.kind)>-1&&l.mode==="showing"){r=!1;break}}r!==this.isSelected_&&this.selected(r)}handleSelectedLanguageChange(e){const i=this.player().textTracks();let r=!0;for(let a=0,o=i.length;a<o;a++){const l=i[a];if(["captions","descriptions","subtitles"].indexOf(l.kind)>-1&&l.mode==="showing"){r=!1;break}}r&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}oe.registerComponent("OffTextTrackMenuItem",H0);class xr extends ru{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i)}createItems(e=[],i=hs){let r;this.label_&&(r=`${this.label_} off`),e.push(new H0(this.player_,{kinds:this.kinds_,kind:this.kind_,label:r})),this.hideThreshold_+=1;const a=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let o=0;o<a.length;o++){const l=a[o];if(this.kinds_.indexOf(l.kind)>-1){const u=new i(this.player_,{track:l,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});u.addClass(`vjs-${l.kind}-menu-item`),e.push(u)}}return e}}oe.registerComponent("TextTrackButton",xr);class z0 extends ds{constructor(e,i){const r=i.track,a=i.cue,o=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=a.text,i.selected=a.startTime<=o&&o<a.endTime,super(e,i),this.track=r,this.cue=a}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}oe.registerComponent("ChaptersTrackMenuItem",z0);class su extends xr{constructor(e,i,r){super(e,i,r),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(a=>{a.selected(this.track_.activeCues[0]===a.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const i=this.findChaptersTrack();i!==this.track_?(this.setTrack(i),super.update()):(!this.items||i&&i.cues&&i.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let i=e.length-1;i>=0;i--){const r=e[i];if(r.kind===this.kind_)return r}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(_t(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const i=this.track_.cues;if(!i)return e;for(let r=0,a=i.length;r<a;r++){const o=i[r],l=new z0(this.player_,{track:this.track_,cue:o});e.push(l)}return e}}su.prototype.kind_="chapters";su.prototype.controlText_="Chapters";oe.registerComponent("ChaptersButton",su);class au extends xr{constructor(e,i,r){super(e,i,r),this.setIcon("audio-description");const a=e.textTracks(),o=ut(this,this.handleTracksChange);a.addEventListener("change",o),this.on("dispose",function(){a.removeEventListener("change",o)})}handleTracksChange(e){const i=this.player().textTracks();let r=!1;for(let a=0,o=i.length;a<o;a++){const l=i[a];if(l.kind!==this.kind_&&l.mode==="showing"){r=!0;break}}r?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}au.prototype.kind_="descriptions";au.prototype.controlText_="Descriptions";oe.registerComponent("DescriptionsButton",au);class ou extends xr{constructor(e,i,r){super(e,i,r),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}ou.prototype.kind_="subtitles";ou.prototype.controlText_="Subtitles";oe.registerComponent("SubtitlesButton",ou);class lu extends hs{constructor(e,i){i.track={player:e,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",super(e,i),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+i.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}oe.registerComponent("CaptionSettingsMenuItem",lu);class uu extends xr{constructor(e,i,r){super(e,i,r),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new lu(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}uu.prototype.kind_="captions";uu.prototype.controlText_="Captions";oe.registerComponent("CaptionsButton",uu);class G0 extends hs{createEl(e,i,r){const a=super.createEl(e,i,r),o=a.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",a):o.appendChild(Fe("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),o.appendChild(Fe("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),a}}oe.registerComponent("SubsCapsMenuItem",G0);class cu extends xr{constructor(e,i={}){super(e,i),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(_t(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new lu(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,G0),e}}cu.prototype.kinds_=["captions","subtitles"];cu.prototype.controlText_="Subtitles";oe.registerComponent("SubsCapsButton",cu);class W0 extends ds{constructor(e,i){const r=i.track,a=e.audioTracks();i.label=r.label||r.language||"Unknown",i.selected=r.enabled,super(e,i),this.track=r,this.addClass(`vjs-${r.kind}-menu-item`);const o=(...l)=>{this.handleTracksChange.apply(this,l)};a.addEventListener("change",o),this.on("dispose",()=>{a.removeEventListener("change",o)})}createEl(e,i,r){const a=super.createEl(e,i,r),o=a.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(o.appendChild(Fe("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),o.appendChild(Fe("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),a}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const i=this.player_.audioTracks();for(let r=0;r<i.length;r++){const a=i[r];a!==this.track&&(a.enabled=a===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}oe.registerComponent("AudioTrackMenuItem",W0);class Y0 extends ru{constructor(e,i={}){i.tracks=e.audioTracks(),super(e,i),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const i=this.player_.audioTracks();for(let r=0;r<i.length;r++){const a=i[r];e.push(new W0(this.player_,{track:a,selectable:!0,multiSelectable:!1}))}return e}}Y0.prototype.controlText_="Audio Track";oe.registerComponent("AudioTrackButton",Y0);class du extends ds{constructor(e,i){const r=i.rate,a=parseFloat(r,10);i.label=r,i.selected=a===e.playbackRate(),i.selectable=!0,i.multiSelectable=!1,super(e,i),this.label=r,this.rate=a,this.on(e,"ratechange",o=>this.update(o))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}du.prototype.contentElType="button";oe.registerComponent("PlaybackRateMenuItem",du);class X0 extends nu{constructor(e,i){super(e,i),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",r=>this.updateVisibility(r)),this.on(e,"ratechange",r=>this.updateLabel(r)),this.on(e,"playbackrateschange",r=>this.handlePlaybackRateschange(r))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Fe("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),i=[];for(let r=e.length-1;r>=0;r--)i.push(new du(this.player(),{rate:e[r]+"x"}));return i}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}X0.prototype.controlText_="Playback Rate";oe.registerComponent("PlaybackRateMenuButton",X0);class K0 extends oe{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",i={},r={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,r)}}oe.registerComponent("Spacer",K0);class Fx extends K0{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}oe.registerComponent("CustomControlSpacer",Fx);class Q0 extends oe{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}Q0.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};oe.registerComponent("ControlBar",Q0);class Z0 extends Tr{constructor(e,i){super(e,i),this.on(e,"error",r=>{this.open(r)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}Z0.prototype.options_=Object.assign({},Tr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});oe.registerComponent("ErrorDisplay",Z0);class J0 extends oe{constructor(e,i={}){super(e,i),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Fe("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{const r=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${yi()}`)+"-"+i[1].replace(/\W+/g,""),a=Fe("option",{id:r,value:this.localize(i[0]),textContent:this.localize(i[1])});return a.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${r}`),a}))}}oe.registerComponent("TextTrackSelect",J0);class Rn extends oe{constructor(e,i={}){super(e,i);const r=Fe("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(r);const a=this.options_.selects;for(const o of a){const l=this.options_.selectConfigs[o],u=l.className,d=l.id.replace("%s",this.options_.id_);let f=null;const g=`vjs_select_${yi()}`;if(this.options_.type==="colors"){f=Fe("span",{className:u});const S=Fe("label",{id:d,className:"vjs-label",textContent:this.localize(l.label)});S.setAttribute("for",g),f.appendChild(S)}const v=new J0(e,{SelectOptions:l.options,legendId:this.options_.legendId,id:g,labelId:d});this.addChild(v),this.options_.type==="colors"&&(f.appendChild(v.el()),this.el().appendChild(f))}}createEl(){return Fe("fieldset",{className:this.options_.className})}}oe.registerComponent("TextTrackFieldset",Rn);class ef extends oe{constructor(e,i={}){super(e,i);const r=this.options_.textTrackComponentid,a=new Rn(e,{id_:r,legendId:`captions-text-legend-${r}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(a);const o=new Rn(e,{id_:r,legendId:`captions-background-${r}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(o);const l=new Rn(e,{id_:r,legendId:`captions-window-${r}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(l)}createEl(){return Fe("div",{className:"vjs-track-settings-colors"})}}oe.registerComponent("TextTrackSettingsColors",ef);class tf extends oe{constructor(e,i={}){super(e,i);const r=this.options_.textTrackComponentid,a=new Rn(e,{id_:r,legendId:`captions-font-size-${r}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(a);const o=new Rn(e,{id_:r,legendId:`captions-edge-style-${r}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(o);const l=new Rn(e,{id_:r,legendId:`captions-font-family-${r}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(l)}createEl(){return Fe("div",{className:"vjs-track-settings-font"})}}oe.registerComponent("TextTrackSettingsFont",tf);class nf extends oe{constructor(e,i={}){super(e,i);const r=new jt(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});r.el().classList.remove("vjs-control","vjs-button"),r.el().textContent=this.localize("Reset"),this.addChild(r);const a=this.localize("Done"),o=new jt(e,{controlText:a,className:"vjs-done-button"});o.el().classList.remove("vjs-control","vjs-button"),o.el().textContent=a,this.addChild(o)}createEl(){return Fe("div",{className:"vjs-track-settings-controls"})}}oe.registerComponent("TrackSettingsControls",nf);const qo="vjs-text-track-settings",wd=["#000","Black"],Dd=["#00F","Blue"],Ad=["#0FF","Cyan"],Nd=["#0F0","Green"],Id=["#F0F","Magenta"],Od=["#F00","Red"],Bd=["#FFF","White"],Ld=["#FF0","Yellow"],jo=["1","Opaque"],Ho=["0.5","Semi-Transparent"],Pd=["0","Transparent"],pn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[wd,Bd,Od,Nd,Dd,Ld,Id,Ad],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[jo,Ho,Pd],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Bd,wd,Od,Nd,Dd,Ld,Id,Ad],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:s=>s==="1.00"?null:Number(s)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[jo,Ho],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[Pd,Ho,jo],className:"vjs-window-opacity vjs-opacity"}};pn.windowColor.options=pn.backgroundColor.options;function rf(s,e){if(e&&(s=e(s)),s&&s!=="none")return s}function $x(s,e){const i=s.options[s.options.selectedIndex].value;return rf(i,e)}function Ux(s,e,i){if(e){for(let r=0;r<s.options.length;r++)if(rf(s.options[r].value,i)===e){s.selectedIndex=r;break}}}class qx extends Tr{constructor(e,i){i.temporary=!1,super(e,i),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Fe("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),i.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const i=new ef(e,{textTrackComponentid:this.id_,selectConfigs:pn,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);const r=new tf(e,{textTrackComponentid:this.id_,selectConfigs:pn,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(r);const a=new nf(e);this.addChild(a)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),Zn(pn,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return Gh(pn,(e,i,r)=>{const a=$x(this.$(i.selector),i.parser);return a!==void 0&&(e[r]=a),e},{})}setValues(e){Zn(pn,(i,r)=>{Ux(this.$(i.selector),e[r],i.parser)})}setDefaults(){Zn(pn,e=>{const i=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=i})}restoreSettings(){let e;try{e=JSON.parse(W.localStorage.getItem(qo))}catch(i){Xe.warn(i)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?W.localStorage.setItem(qo,JSON.stringify(e)):W.localStorage.removeItem(qo)}catch(i){Xe.warn(i)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}oe.registerComponent("TextTrackSettings",qx);class jx extends oe{constructor(e,i){let r=i.ResizeObserver||W.ResizeObserver;i.ResizeObserver===null&&(r=!1);const a=ot({createEl:!r,reportTouchActivity:!1},i);super(e,a),this.ResizeObserver=i.ResizeObserver||W.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=m0(()=>{this.resizeHandler()},100,!1,this),r?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const o=this.debouncedHandler_;let l=this.unloadListener_=function(){qt(this,"resize",o),qt(this,"unload",l),l=null};fi(this.el_.contentWindow,"unload",l),fi(this.el_.contentWindow,"resize",o)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}oe.registerComponent("ResizeManager",jx);const Hx={trackingThreshold:20,liveTolerance:15};class zx extends oe{constructor(e,i){const r=ot(Hx,i,{createEl:!1});super(e,r),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=a=>this.handlePlay(a),this.handleFirstTimeupdate_=a=>this.handleFirstTimeupdate(a),this.handleSeeked_=a=>this.handleSeeked(a),this.seekToLiveEdge_=a=>this.seekToLiveEdge(a),this.reset_(),this.on(this.player_,"durationchange",a=>this.handleDurationchange(a)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const i=Number(W.performance.now().toFixed(4)),r=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+r;const a=this.liveCurrentTime(),o=this.player_.currentTime();let l=this.player_.paused()||this.seekedBehindLive_||Math.abs(a-o)>this.options_.liveTolerance;(!this.timeupdateSeen_||a===1/0)&&(l=!1),l!==this.behindLiveEdge_&&(this.behindLiveEdge_=l,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Ti),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),i=[];let r=e?e.length:0;for(;r--;)i.push(e.end(r));return i.length?i.sort()[i.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),i=[];let r=e?e.length:0;for(;r--;)i.push(e.start(r));return i.length?i.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}oe.registerComponent("LiveTracker",zx);class Gx extends oe{constructor(e,i){super(e,i),this.on("statechanged",r=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Fe("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${yi()}`}),description:Fe("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${yi()}`})},Fe("div",{className:"vjs-title-bar"},{},Wh(this.els))}updateDom_(){const e=this.player_.tech_,i=e&&e.el_,r={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(a=>{const o=this.state[a],l=this.els[a],u=r[a];Ra(l),o&&Tn(l,o),i&&(i.removeAttribute(u),o&&i.setAttribute(u,l.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,i=e&&e.el_;i&&(i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}oe.registerComponent("TitleBar",Gx);const Wx={initialDisplay:4e3,position:[],takeFocus:!1};class Yx extends jt{constructor(e,i){i=ot(Wx,i),super(e,i),this.controlText(i.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],r=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=Fe("button",{},{type:"button",class:this.buildCSSClass()},Fe("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}oe.registerComponent("TransientButton",Yx);const pl=s=>{const e=s.el();if(e.hasAttribute("src"))return s.triggerSourceset(e.src),!0;const i=s.$$("source"),r=[];let a="";if(!i.length)return!1;for(let o=0;o<i.length;o++){const l=i[o].src;l&&r.indexOf(l)===-1&&r.push(l)}return r.length?(r.length===1&&(a=r[0]),s.triggerSourceset(a),!0):!1},Xx=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(s){const e=_e.createElement(this.nodeName.toLowerCase());e.innerHTML=s;const i=_e.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",W.Element.prototype.appendChild.call(this,i),this.innerHTML}}),sf=(s,e)=>{let i={};for(let r=0;r<s.length&&(i=Object.getOwnPropertyDescriptor(s[r],e),!(i&&i.set&&i.get));r++);return i.enumerable=!0,i.configurable=!0,i},Kx=s=>sf([s.el(),W.HTMLMediaElement.prototype,W.Element.prototype,Xx],"innerHTML"),Md=function(s){const e=s.el();if(e.resetSourceWatch_)return;const i={},r=Kx(s),a=o=>(...l)=>{const u=o.apply(e,l);return pl(s),u};["append","appendChild","insertAdjacentHTML"].forEach(o=>{e[o]&&(i[o]=e[o],e[o]=a(i[o]))}),Object.defineProperty(e,"innerHTML",ot(r,{set:a(r.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(i).forEach(o=>{e[o]=i[o]}),Object.defineProperty(e,"innerHTML",r)},s.one("sourceset",e.resetSourceWatch_)},Qx=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?k0(W.Element.prototype.getAttribute.call(this,"src")):""},set(s){return W.Element.prototype.setAttribute.call(this,"src",s),s}}),Zx=s=>sf([s.el(),W.HTMLMediaElement.prototype,Qx],"src"),Jx=function(s){if(!s.featuresSourceset)return;const e=s.el();if(e.resetSourceset_)return;const i=Zx(s),r=e.setAttribute,a=e.load;Object.defineProperty(e,"src",ot(i,{set:o=>{const l=i.set.call(e,o);return s.triggerSourceset(e.src),l}})),e.setAttribute=(o,l)=>{const u=r.call(e,o,l);return/src/i.test(o)&&s.triggerSourceset(e.src),u},e.load=()=>{const o=a.call(e);return pl(s)||(s.triggerSourceset(""),Md(s)),o},e.currentSrc?s.triggerSourceset(e.currentSrc):pl(s)||Md(s),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=a,e.setAttribute=r,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}};class Ae extends qe{constructor(e,i){super(e,i);const r=e.source;let a=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",r&&(this.el_.currentSrc!==r.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(r):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const o=this.el_.childNodes;let l=o.length;const u=[];for(;l--;){const d=o[l];d.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(d),this.remoteTextTracks().addTrack(d.track),this.textTracks().addTrack(d.track),!a&&!this.el_.hasAttribute("crossorigin")&&Ua(d.src)&&(a=!0)):u.push(d))}for(let d=0;d<u.length;d++)this.el_.removeChild(u[d])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&a&&Xe.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
180
+ This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(rs||Oa)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Ae.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){Jx(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let i;const r=()=>{i=[];for(let o=0;o<e.length;o++){const l=e[o];l.kind==="metadata"&&i.push({track:l,storedMode:l.mode})}};r(),e.addEventListener("change",r),this.on("dispose",()=>e.removeEventListener("change",r));const a=()=>{for(let o=0;o<i.length;o++){const l=i[o];l.track.mode==="disabled"&&l.track.mode!==l.storedMode&&(l.track.mode=l.storedMode)}e.removeEventListener("change",a)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",r),e.removeEventListener("change",a),e.addEventListener("change",a)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",r),e.addEventListener("change",r),e.removeEventListener("change",a)})}overrideNative_(e,i){if(i!==this[`featuresNative${e}Tracks`])return;const r=e.toLowerCase();this[`${r}TracksListeners_`]&&Object.keys(this[`${r}TracksListeners_`]).forEach(a=>{this.el()[`${r}Tracks`].removeEventListener(a,this[`${r}TracksListeners_`][a])}),this[`featuresNative${e}Tracks`]=!i,this[`${r}TracksListeners_`]=null,this.proxyNativeTracksForType_(r)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const i=gi[e],r=this.el()[i.getterName],a=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!r||!r.addEventListener)return;const o={change:u=>{const d={type:"change",target:a,currentTarget:a,srcElement:a};a.trigger(d),e==="text"&&this[mr.remoteText.getterName]().trigger(d)},addtrack(u){a.addTrack(u.track)},removetrack(u){a.removeTrack(u.track)}},l=function(){const u=[];for(let d=0;d<a.length;d++){let f=!1;for(let g=0;g<r.length;g++)if(r[g]===a[d]){f=!0;break}f||u.push(a[d])}for(;u.length;)a.removeTrack(u.shift())};this[i.getterName+"Listeners_"]=o,Object.keys(o).forEach(u=>{const d=o[u];r.addEventListener(u,d),this.on("dispose",f=>r.removeEventListener(u,d))}),this.on("loadstart",l),this.on("dispose",u=>this.off("loadstart",l))}proxyNativeTracks_(){gi.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const r=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(r,e),Ae.disposeMediaElement(e),e=r}else{e=_e.createElement("video");const r=this.options_.tag&&fn(this.options_.tag),a=ot({},r);(!rs||this.options_.nativeControlsForTouch!==!0)&&delete a.controls,i0(e,Object.assign(a,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&hr(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const i=["loop","muted","playsinline","autoplay"];for(let r=0;r<i.length;r++){const a=i[r],o=this.options_[a];typeof o<"u"&&(o?hr(e,a,a):Pa(e,a),e[a]=o)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let r=!1;const a=function(){r=!0};this.on("loadstart",a);const o=function(){r||this.trigger("loadstart")};this.on("loadedmetadata",o),this.ready(function(){this.off("loadstart",a),this.off("loadedmetadata",o),r||this.trigger("loadstart")});return}const i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(r){this.trigger(r)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Ba?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){Xe(i,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Bi&&Gi&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},i=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",()=>{this.off("webkitbeginfullscreen",i),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Ui(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},0);else try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}addSourceElement(e,i){if(!e)return Xe.error("Invalid source URL."),!1;const r={src:e};i&&(r.type=i);const a=Fe("source",{},r);return this.el_.appendChild(a),!0}removeSourceElement(e){if(!e)return Xe.error("Source URL is required to remove the source element."),!1;const i=this.el_.querySelectorAll("source");for(const r of i)if(r.src===e)return this.el_.removeChild(r),!0;return Xe.warn(`No matching source element found with src: ${e}`),!1}reset(){Ae.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,i,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,r):super.addTextTrack(e,i,r)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const i=_e.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i}addRemoteTextTrack(e,i){const r=super.addRemoteTextTrack(e,i);return this.featuresNativeTextTracks&&this.el().appendChild(r),r}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const i=this.$$("track");let r=i.length;for(;r--;)(e===i[r]||e===i[r].track)&&this.el().removeChild(i[r])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),W.performance&&(e.creationTime=W.performance.now()),e}}Aa(Ae,"TEST_VID",function(){if(!vr())return;const s=_e.createElement("video"),e=_e.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",s.appendChild(e),s});Ae.isSupported=function(){try{Ae.TEST_VID.volume=.5}catch{return!1}return!!(Ae.TEST_VID&&Ae.TEST_VID.canPlayType)};Ae.canPlayType=function(s){return Ae.TEST_VID.canPlayType(s)};Ae.canPlaySource=function(s,e){return Ae.canPlayType(s.type)};Ae.canControlVolume=function(){try{const s=Ae.TEST_VID.volume;Ae.TEST_VID.volume=s/2+.1;const e=s!==Ae.TEST_VID.volume;return e&&Ut?(W.setTimeout(()=>{Ae&&Ae.prototype&&(Ae.prototype.featuresVolumeControl=s!==Ae.TEST_VID.volume)}),!1):e}catch{return!1}};Ae.canMuteVolume=function(){try{const s=Ae.TEST_VID.muted;return Ae.TEST_VID.muted=!s,Ae.TEST_VID.muted?hr(Ae.TEST_VID,"muted","muted"):Pa(Ae.TEST_VID,"muted","muted"),s!==Ae.TEST_VID.muted}catch{return!1}};Ae.canControlPlaybackRate=function(){if(Bi&&Gi&&Na<58)return!1;try{const s=Ae.TEST_VID.playbackRate;return Ae.TEST_VID.playbackRate=s/2+.1,s!==Ae.TEST_VID.playbackRate}catch{return!1}};Ae.canOverrideAttributes=function(){try{const s=()=>{};Object.defineProperty(_e.createElement("video"),"src",{get:s,set:s}),Object.defineProperty(_e.createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(_e.createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(_e.createElement("audio"),"innerHTML",{get:s,set:s})}catch{return!1}return!0};Ae.supportsNativeTextTracks=function(){return Ba||Ut&&Gi};Ae.supportsNativeVideoTracks=function(){return!!(Ae.TEST_VID&&Ae.TEST_VID.videoTracks)};Ae.supportsNativeAudioTracks=function(){return!!(Ae.TEST_VID&&Ae.TEST_VID.audioTracks)};Ae.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([s,e]){Aa(Ae.prototype,s,()=>Ae[e](),!0)});Ae.prototype.featuresVolumeControl=Ae.canControlVolume();Ae.prototype.movingMediaElementInDOM=!Ut;Ae.prototype.featuresFullscreenResize=!0;Ae.prototype.featuresProgressEvents=!0;Ae.prototype.featuresTimeupdateEvents=!0;Ae.prototype.featuresVideoFrameCallback=!!(Ae.TEST_VID&&Ae.TEST_VID.requestVideoFrameCallback);Ae.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),typeof s.load=="function"&&(function(){try{s.load()}catch{}})()}};Ae.resetMediaElement=function(s){if(!s)return;const e=s.querySelectorAll("source");let i=e.length;for(;i--;)s.removeChild(e[i]);s.removeAttribute("src"),typeof s.load=="function"&&(function(){try{s.load()}catch{}})()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){Ae.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){Ae.prototype["set"+_t(s)]=function(e){this.el_[s]=e,e?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){Ae.prototype[s]=function(){return this.el_[s]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){Ae.prototype["set"+_t(s)]=function(e){this.el_[s]=e}});["pause","load","play"].forEach(function(s){Ae.prototype[s]=function(){return this.el_[s]()}});qe.withSourceHandlers(Ae);Ae.nativeSourceHandler={};Ae.nativeSourceHandler.canPlayType=function(s){try{return Ae.TEST_VID.canPlayType(s)}catch{return""}};Ae.nativeSourceHandler.canHandleSource=function(s,e){if(s.type)return Ae.nativeSourceHandler.canPlayType(s.type);if(s.src){const i=Kl(s.src);return Ae.nativeSourceHandler.canPlayType(`video/${i}`)}return""};Ae.nativeSourceHandler.handleSource=function(s,e,i){e.setSrc(s.src)};Ae.nativeSourceHandler.dispose=function(){};Ae.registerSourceHandler(Ae.nativeSourceHandler);qe.registerTech("Html5",Ae);const af=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],zo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ml=["tiny","xsmall","small","medium","large","xlarge","huge"],Js={};ml.forEach(s=>{const e=s.charAt(0)==="x"?`x-${s.substring(1)}`:s;Js[s]=`vjs-layout-${e}`});const eC={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class rt extends oe{constructor(e,i,r){if(e.id=e.id||i.id||`vjs_video_${yi()}`,i=Object.assign(rt.getTagSettings(e),i),i.initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language){const l=e.closest("[lang]");l&&(i.language=l.getAttribute("lang"))}if(super(null,i,r),this.boundDocumentFullscreenChange_=l=>this.documentFullscreenChange_(l),this.boundFullWindowOnEscKey_=l=>this.fullWindowOnEscKey(l),this.boundUpdateStyleEl_=l=>this.updateStyleEl_(l),this.boundApplyInitTime_=l=>this.applyInitTime_(l),this.boundUpdateCurrentBreakpoint_=l=>this.updateCurrentBreakpoint_(l),this.boundHandleTechClick_=l=>this.handleTechClick_(l),this.boundHandleTechDoubleClick_=l=>this.handleTechDoubleClick_(l),this.boundHandleTechTouchStart_=l=>this.handleTechTouchStart_(l),this.boundHandleTechTouchMove_=l=>this.handleTechTouchMove_(l),this.boundHandleTechTouchEnd_=l=>this.handleTechTouchEnd_(l),this.boundHandleTechTap_=l=>this.handleTechTap_(l),this.boundUpdatePlayerHeightOnAudioOnlyMode_=l=>this.updatePlayerHeightOnAudioOnlyMode_(l),this.isFullscreen_=!1,this.log=Hh(this.id_),this.fsApi_=sa,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&fn(e),this.language(this.options_.language),i.languages){const l={};Object.getOwnPropertyNames(i.languages).forEach(function(u){l[u.toLowerCase()]=i.languages[u]}),this.languages_=l}else this.languages_=rt.prototype.options_.languages;this.resetCache_(),this.poster_=i.poster||"",this.controls_=!!i.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(l=>{if(typeof this[l]!="function")throw new Error(`plugin "${l}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),zl(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(fi(_e,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const a=ot(this.options_);if(i.plugins&&Object.keys(i.plugins).forEach(l=>{this[l](i.plugins[l])}),i.debug&&this.debug(!0),this.options_.playerOptions=a,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons){const u=new W.DOMParser().parseFromString(Cx,"image/svg+xml");if(u.querySelector("parsererror"))Xe.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const f=u.documentElement;f.style.display="none",this.el_.appendChild(f),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),i.spatialNavigation&&i.spatialNavigation.enabled&&(this.spatialNavigation=new Ex(this),this.addClass("vjs-spatial-navigation-enabled")),rs&&this.addClass("vjs-touch-enabled"),Ut||this.addClass("vjs-workinghover"),rt.players[this.id_]=this;const o=rl.split(".")[0];this.addClass(`vjs-v${o}`),this.userActive(!0),this.reportUserActivity(),this.one("play",l=>this.listenForUserActivity_(l)),this.on("keydown",l=>this.handleKeyDown(l)),this.on("languagechange",l=>this.handleLanguagechange(l)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),qt(_e,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),qt(_e,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),rt.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),yx(this),Zt.names.forEach(e=>{const i=Zt[e],r=this[i.getterName]();r&&r.off&&r.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,i,r=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const a=this.tag.tagName.toLowerCase()==="video-js";r?i=this.el_=e.parentNode:a||(i=this.el_=super.createEl("div"));const o=fn(e);if(a){for(i=this.el_=e,e=this.tag=_e.createElement("video");i.children.length;)e.appendChild(i.firstChild);Zr(i,"video-js")||Pn(i,"video-js"),i.appendChild(e),r=this.playerElIngest_=i,Object.keys(i).forEach(d=>{try{e[d]=i[d]}catch{}})}e.setAttribute("tabindex","-1"),o.tabindex="-1",Gi&&Ia&&(e.setAttribute("role","application"),o.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach(function(d){a&&d==="class"||i.setAttribute(d,o[d]),a&&e.setAttribute(d,o[d])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused");const l=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(d=>Zh[d]).map(d=>"vjs-device-"+d.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...l),W.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=f0("vjs-styles-dimensions");const d=yn(".vjs-styles-defaults"),f=yn("head");f.insertBefore(this.styleEl_,d?d.nextSibling:f.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const u=e.getElementsByTagName("a");for(let d=0;d<u.length;d++){const f=u.item(d);Pn(f,"vjs-hidden"),f.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!r&&e.parentNode.insertBefore(i,e),al(e,i),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=i,i}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){Xe.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,i){const r=e+"_";if(i===void 0)return this[r]||0;if(i===""||i==="auto"){this[r]=void 0,this.updateStyleEl_();return}const a=parseFloat(i);if(isNaN(a)){Xe.error(`Improper value "${i}" supplied for for ${e}`);return}this[r]=a,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,rn(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),Q8(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(W.VIDEOJS_NO_DYNAMIC_STYLE===!0){const u=typeof this.width_=="number"?this.width_:this.options_.width,d=typeof this.height_=="number"?this.height_:this.options_.height,f=this.tech_&&this.tech_.el();f&&(u>=0&&(f.width=u),d>=0&&(f.height=d));return}let e,i,r,a;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?r=this.aspectRatio_:this.videoWidth()>0?r=this.videoWidth()+":"+this.videoHeight():r="16:9";const o=r.split(":"),l=o[1]/o[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/l:e=this.videoWidth()||300,this.height_!==void 0?i=this.height_:i=e*l,/^[^a-zA-Z]/.test(this.id())?a="dimensions-"+this.id():a=this.id()+"-dimensions",this.addClass(a),p0(this.styleEl_,`
181
+ .${a} {
182
+ width: ${e}px;
183
+ height: ${i}px;
184
+ }
185
+
186
+ .${a}.vjs-fluid:not(.vjs-audio-only-mode) {
187
+ padding-top: ${l*100}%;
188
+ }
189
+ `)}loadTech_(e,i){this.tech_&&this.unloadTech_();const r=_t(e),a=e.charAt(0).toLowerCase()+e.slice(1);r!=="Html5"&&this.tag&&(qe.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;let o=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(o=!1);const l={source:i,autoplay:o,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${a}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Zt.names.forEach(d=>{const f=Zt[d];l[f.getterName]=this[f.privateName]}),Object.assign(l,this.options_[r]),Object.assign(l,this.options_[a]),Object.assign(l,this.options_[e.toLowerCase()]),this.tag&&(l.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(l.startTime=this.cache_.currentTime);const u=qe.getTech(e);if(!u)throw new Error(`No Tech named '${r}' exists! '${r}' should be registered using videojs.registerTech()'`);this.tech_=new u(l),this.tech_.ready(ut(this,this.handleTechReady_),!0),hl.jsonToTextTracks(this.textTracksJson_||[],this.tech_),af.forEach(d=>{this.on(this.tech_,d,f=>this[`handleTech${_t(d)}_`](f))}),Object.keys(zo).forEach(d=>{this.on(this.tech_,d,f=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${zo[d]}_`].bind(this),event:f});return}this[`handleTech${zo[d]}_`](f)})}),this.on(this.tech_,"loadstart",d=>this.handleTechLoadStart_(d)),this.on(this.tech_,"sourceset",d=>this.handleTechSourceset_(d)),this.on(this.tech_,"waiting",d=>this.handleTechWaiting_(d)),this.on(this.tech_,"ended",d=>this.handleTechEnded_(d)),this.on(this.tech_,"seeking",d=>this.handleTechSeeking_(d)),this.on(this.tech_,"play",d=>this.handleTechPlay_(d)),this.on(this.tech_,"pause",d=>this.handleTechPause_(d)),this.on(this.tech_,"durationchange",d=>this.handleTechDurationChange_(d)),this.on(this.tech_,"fullscreenchange",(d,f)=>this.handleTechFullscreenChange_(d,f)),this.on(this.tech_,"fullscreenerror",(d,f)=>this.handleTechFullscreenError_(d,f)),this.on(this.tech_,"enterpictureinpicture",d=>this.handleTechEnterPictureInPicture_(d)),this.on(this.tech_,"leavepictureinpicture",d=>this.handleTechLeavePictureInPicture_(d)),this.on(this.tech_,"error",d=>this.handleTechError_(d)),this.on(this.tech_,"posterchange",d=>this.handleTechPosterChange_(d)),this.on(this.tech_,"textdata",d=>this.handleTechTextData_(d)),this.on(this.tech_,"ratechange",d=>this.handleTechRateChange_(d)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(r!=="Html5"||!this.tag)&&al(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Zt.names.forEach(e=>{const i=Zt[e];this[i.privateName]=this[i.getterName]()}),this.textTracksJson_=hl.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&Xe.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
190
+ See https://github.com/videojs/video.js/issues/2617 for more info.
191
+ `),this.tech_}version(){return{"video.js":rl}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const i=()=>{const a=this.muted();this.muted(!0);const o=()=>{this.muted(a)};this.playTerminatedQueue_.push(o);const l=this.play();if(es(l))return l.catch(u=>{throw o(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${u||""}`)})};let r;if(e==="any"&&!this.muted()?(r=this.play(),es(r)&&(r=r.catch(i))):e==="muted"&&!this.muted()?r=i():r=this.play(),!!es(r))return r.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let i=e,r="";typeof i!="string"&&(i=e.src,r=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!r&&(r=xx(this,i)),this.cache_.source=ot({},e,{src:i,type:r});const a=this.cache_.sources.filter(d=>d.src&&d.src===i),o=[],l=this.$$("source"),u=[];for(let d=0;d<l.length;d++){const f=fn(l[d]);o.push(f),f.src&&f.src===i&&u.push(f.src)}u.length&&!a.length?this.cache_.sources=o:a.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i}handleTechSourceset_(e){if(!this.changingSrc_){let i=o=>this.updateSourceCaches_(o);const r=this.currentSource().src,a=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(a)&&(!this.lastSource_||this.lastSource_.tech!==a&&this.lastSource_.player!==r)&&(i=()=>{}),i(a),e.src||this.tech_.any(["sourceset","loadstart"],o=>{if(o.type==="sourceset")return;const l=this.techGet_("currentSrc");this.lastSource_.tech=l,this.updateSourceCaches_(l)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),i=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",i))};this.on("timeupdate",i)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Ui(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),r=>r.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!_e.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const i=e.target.player;if(i&&i!==this)return;const r=this.el();let a=_e[this.fsApi_.fullscreenElement]===r;!a&&r.matches&&(a=r.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(a)}handleTechFullscreenChange_(e,i){i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(i.isFullscreen))}handleTechFullscreenError_(e,i){this.trigger("fullscreenerror",i)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,i){this.ready(function(){if(e in vx)return mx(this.middleware_,this.tech_,e,i);if(e in bd)return Td(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(r){throw Xe(r),r}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in gx)return px(this.middleware_,this.tech_,e);if(e in bd)return Td(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw this.tech_[e]===void 0?(Xe(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(Xe(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(Xe(i),i)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Ui){this.playCallbacks_.push(e);const i=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),r=!!(Ba||Ut);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i){this.waitToPlay_=l=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!i&&r&&this.load();return}const a=this.techGet_("play");r&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),a===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(a)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i()})}runPlayCallbacks_(e){const i=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(r){r(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||Oi(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=Oi(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=Oi(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return C0(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),i=this.duration();let r=e.end(e.length-1);return r>i&&(r=i),r}volume(e){let i;if(e!==void 0){i=Math.max(0,Math.min(1,e)),this.cache_.volume=i,this.techCall_("setVolume",i),i>0&&this.lastVolume_(i);return}return i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const i=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const i=this;return new Promise((r,a)=>{function o(){i.off("fullscreenerror",u),i.off("fullscreenchange",l)}function l(){o(),r()}function u(f,g){o(),a(g)}i.one("fullscreenchange",l),i.one("fullscreenerror",u);const d=i.requestFullscreenHelper_(e);d&&(d.then(o,o),d.then(r,a))})}requestFullscreenHelper_(e){let i;if(this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(i=e)),this.fsApi_.requestFullscreen){const r=this.el_[this.fsApi_.requestFullscreen](i);return r&&r.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),r}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((i,r)=>{function a(){e.off("fullscreenerror",l),e.off("fullscreenchange",o)}function o(){a(),i()}function l(d,f){a(),r(f)}e.one("fullscreenchange",o),e.one("fullscreenerror",l);const u=e.exitFullscreenHelper_();u&&(u.then(a,a),u.then(i,r))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=_e[this.fsApi_.exitFullscreen]();return e&&Ui(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=_e.documentElement.style.overflow,fi(_e,"keydown",this.boundFullWindowOnEscKey_),_e.documentElement.style.overflow="hidden",Pn(_e.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,qt(_e,"keydown",this.boundFullWindowOnEscKey_),_e.documentElement.style.overflow=this.docOrigOverflow,La(_e.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&W.documentPictureInPicture){const e=_e.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Fe("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),W.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(c0(i),this.el_.parentNode.insertBefore(e,this.el_),i.document.body.appendChild(this.el_),i.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:i}),i.addEventListener("pagehide",r=>{const a=r.target.querySelector(".video-js");e.parentNode.replaceChild(a,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),i))}return"pictureInPictureEnabled"in _e&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(W.documentPictureInPicture&&W.documentPictureInPicture.window)return W.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in _e)return _e.exitPictureInPicture()}handleKeyDown(e){const{userActions:i}=this.options_;!i||!i.hotkeys||(a=>{const o=a.tagName.toLowerCase();if(a.isContentEditable)return!0;const l=["button","checkbox","hidden","radio","reset","submit"];return o==="input"?l.indexOf(a.type)===-1:["textarea"].indexOf(o)!==-1})(this.el_.ownerDocument.activeElement)||(typeof i.hotkeys=="function"?i.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const i=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:r=l=>e.key.toLowerCase()==="f",muteKey:a=l=>e.key.toLowerCase()==="m",playPauseKey:o=l=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();const l=oe.getComponent("FullscreenToggle");_e[this.fsApi_.fullscreenEnabled]!==!1&&l.prototype.handleClick.call(this,e)}else a.call(this,e)?(e.preventDefault(),e.stopPropagation(),oe.getComponent("MuteToggle").prototype.handleClick.call(this,e)):o.call(this,e)&&(e.preventDefault(),e.stopPropagation(),oe.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let i;for(let r=0,a=this.options_.techOrder;r<a.length;r++){const o=a[r];let l=qe.getTech(o);if(l||(l=oe.getComponent(o)),!l){Xe.error(`The "${o}" tech is undefined. Skipped browser support check for that tech.`);continue}if(l.isSupported()&&(i=l.canPlayType(e),i))return i}return""}selectSource(e){const i=this.options_.techOrder.map(u=>[u,qe.getTech(u)]).filter(([u,d])=>d?d.isSupported():(Xe.error(`The "${u}" tech is undefined. Skipped browser support check for that tech.`),!1)),r=function(u,d,f){let g;return u.some(v=>d.some(S=>{if(g=f(v,S),g)return!0})),g};let a;const o=u=>(d,f)=>u(f,d),l=([u,d],f)=>{if(d.canPlaySource(f,this.options_[u.toLowerCase()]))return{source:f,tech:u}};return this.options_.sourceOrder?a=r(e,i,o(l)):a=r(i,e,l),a||!1}handleSrc_(e,i){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const r=A0(e);if(!r.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,i||(this.cache_.sources=r),this.updateSourceCaches_(r[0]),hx(this,r[0],(a,o)=>{if(this.middleware_=o,i||(this.cache_.sources=r),this.updateSourceCaches_(a),this.src_(a)){if(r.length>1)return this.handleSrc_(r.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}fx(o,this.tech_)}),r.length>1){const a=()=>{this.error(null),this.handleSrc_(r.slice(1),!0)},o=()=>{this.off("error",a)};this.one("error",a),this.one("playing",o),this.resetRetryOnError_=()=>{this.off("error",a),this.off("playing",o)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const i=this.selectSource([e]);return i?y0(i.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,i){return this.tech_?this.tech_.addSourceElement(e,i):!1}removeSourceElement(e){return this.tech_?this.tech_.removeSourceElement(e):!1}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();Ui(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),rn(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:i,progressControl:r,remainingTimeDisplay:a}=this.controlBar||{},{seekBar:o}=r||{};e&&e.updateContent(),i&&i.updateContent(),a&&a.updateContent(),o&&(o.update(),o.loadProgressBar&&o.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),i=[];return Object.keys(e).length!==0&&i.push(e),this.cache_.sources||i}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let i;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),i=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,i=typeof i>"u"?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(_n("beforeerror").forEach(i=>{const r=i(this,e);if(!(zi(r)&&!Array.isArray(r)||typeof r=="string"||typeof r=="number"||r===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=r}),this.options_.suppressNotSupportedError&&e&&e.code===4){const i=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],i),this.one("loadstart",function(){this.off(["click","touchstart"],i)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new gt(e),this.addClass("vjs-error"),Xe.error(`(CODE:${this.error_.code} ${gt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),_n("error").forEach(i=>i(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,i,r;const a=ut(this,this.reportUserActivity),o=function(v){(v.screenX!==i||v.screenY!==r)&&(i=v.screenX,r=v.screenY,a())},l=function(){a(),this.clearInterval(e),e=this.setInterval(a,250)},u=function(v){a(),this.clearInterval(e)};this.on("mousedown",l),this.on("mousemove",o),this.on("mouseup",u),this.on("mouseleave",u);const d=this.getChild("controlBar");d&&!Ut&&!Bi&&(d.on("mouseenter",function(v){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),d.on("mouseleave",function(v){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",a),this.on("keyup",a);let f;const g=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(f);const v=this.options_.inactivityTimeout;v<=0||(f=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},v))};this.setInterval(g,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),i=this.getChild("ControlBar"),r=i&&i.currentHeight();e.forEach(a=>{a!==i&&a.el_&&!a.hasClass("vjs-hidden")&&(a.hide(),this.audioOnlyCache_.hiddenChildren.push(a))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=r,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(r),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const i=[];return this.isInPictureInPicture()&&i.push(this.exitPictureInPicture()),this.isFullscreen()&&i.push(this.exitFullscreen()),this.audioPosterMode()&&i.push(this.audioPosterMode(!1)),Promise.all(i).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,i,r){if(this.tech_)return this.tech_.addTextTrack(e,i,r)}addRemoteTextTrack(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i)}removeRemoteTextTrack(e={}){let{track:i}=e;if(i||(i=e),this.tech_)return this.tech_.removeRemoteTextTrack(i)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),rn(this)&&this.trigger("languagechange"))}languages(){return ot(rt.prototype.options_.languages,this.languages_)}toJSON(){const e=ot(this.options_),i=e.tracks;e.tracks=[];for(let r=0;r<i.length;r++){let a=i[r];a=ot(a),a.player=void 0,e.tracks[r]=a}return e}createModal(e,i){i=i||{},i.content=e||"";const r=new Tr(this,i);return this.addChild(r),r.on("dispose",()=>{this.removeChild(r)}),r.open(),r}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),i=this.currentWidth();for(let r=0;r<ml.length;r++){const a=ml[r],o=this.breakpoints_[a];if(i<=o){if(e===a)return;e&&this.removeClass(Js[e]),this.addClass(Js[a]),this.breakpoint_=a;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},eC,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const i=this.responsive_;if(e!==i)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Js[this.breakpoint_]||""}loadMedia(e,i){if(!e||typeof e!="object")return;const r=this.crossOrigin();this.reset(),this.cache_.media=ot(e);const{artist:a,artwork:o,description:l,poster:u,src:d,textTracks:f,title:g}=this.cache_.media;!o&&u&&(this.cache_.media.artwork=[{src:u,type:ma(u)}]),r&&this.crossOrigin(r),d&&this.src(d),u&&this.poster(u),Array.isArray(f)&&f.forEach(v=>this.addRemoteTextTrack(v,!1)),this.titleBar&&this.titleBar.update({title:g,description:l||a||""}),this.ready(i)}getMedia(){if(!this.cache_.media){const e=this.poster(),i=this.currentSources(),r=Array.prototype.map.call(this.remoteTextTracks(),o=>({kind:o.kind,label:o.label,language:o.language,src:o.src})),a={src:i,textTracks:r};return e&&(a.poster=e,a.artwork=[{src:a.poster,type:ma(a.poster)}]),a}return ot(this.cache_.media)}static getTagSettings(e){const i={sources:[],tracks:[]},r=fn(e),a=r["data-setup"];if(Zr(e,"vjs-fill")&&(r.fill=!0),Zr(e,"vjs-fluid")&&(r.fluid=!0),a!==null)try{Object.assign(r,JSON.parse(a||"{}"))}catch(o){Xe.error("data-setup",o)}if(Object.assign(i,r),e.hasChildNodes()){const o=e.childNodes;for(let l=0,u=o.length;l<u;l++){const d=o[l],f=d.nodeName.toLowerCase();f==="source"?i.sources.push(fn(d)):f==="track"&&i.tracks.push(fn(d))}}return i}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(i=>typeof i=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}rt.prototype.videoTracks=()=>{};rt.prototype.audioTracks=()=>{};rt.prototype.textTracks=()=>{};rt.prototype.remoteTextTracks=()=>{};rt.prototype.remoteTextTrackEls=()=>{};Zt.names.forEach(function(s){const e=Zt[s];rt.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});rt.prototype.crossorigin=rt.prototype.crossOrigin;rt.players={};const Gr=W.navigator;rt.prototype.options_={techOrder:qe.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Gr&&(Gr.languages&&Gr.languages[0]||Gr.userLanguage||Gr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1};af.forEach(function(s){rt.prototype[`handleTech${_t(s)}_`]=function(){return this.trigger(s)}});oe.registerComponent("Player",rt);const ga="plugin",tr="activePlugins_",Yn={},va=s=>Yn.hasOwnProperty(s),ea=s=>va(s)?Yn[s]:void 0,of=(s,e)=>{s[tr]=s[tr]||{},s[tr][e]=!0},_a=(s,e,i)=>{const r=(i?"before":"")+"pluginsetup";s.trigger(r,e),s.trigger(r+":"+e.name,e)},tC=function(s,e){const i=function(){_a(this,{name:s,plugin:e,instance:null},!0);const r=e.apply(this,arguments);return of(this,s),_a(this,{name:s,plugin:e,instance:r}),r};return Object.keys(e).forEach(function(r){i[r]=e[r]}),i},Rd=(s,e)=>(e.prototype.name=s,function(...i){_a(this,{name:s,plugin:e,instance:null},!0);const r=new e(this,...i);return this[s]=()=>r,_a(this,r.getEventHash()),r});class li{constructor(e){if(this.constructor===li)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),zl(this),delete this.trigger,_0(this,this.constructor.defaultState),of(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,i={}){return yr(this.eventBusEl_,e,this.getEventHash(i))}handleStateChanged(e){}dispose(){const{name:e,player:i}=this;this.trigger("dispose"),this.off(),i.off("dispose",this.dispose),i[tr][e]=!1,this.player=this.state=null,i[e]=Rd(e,Yn[e])}static isBasic(e){const i=typeof e=="string"?ea(e):e;return typeof i=="function"&&!li.prototype.isPrototypeOf(i.prototype)}static registerPlugin(e,i){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(va(e))Xe.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(rt.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof i!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof i}.`);return Yn[e]=i,e!==ga&&(li.isBasic(i)?rt.prototype[e]=tC(e,i):rt.prototype[e]=Rd(e,i)),i}static deregisterPlugin(e){if(e===ga)throw new Error("Cannot de-register base plugin.");va(e)&&(delete Yn[e],delete rt.prototype[e])}static getPlugins(e=Object.keys(Yn)){let i;return e.forEach(r=>{const a=ea(r);a&&(i=i||{},i[r]=a)}),i}static getPluginVersion(e){const i=ea(e);return i&&i.VERSION||""}}li.getPlugin=ea;li.BASE_PLUGIN_NAME=ga;li.registerPlugin(ga,li);rt.prototype.usingPlugin=function(s){return!!this[tr]&&this[tr][s]===!0};rt.prototype.hasPlugin=function(s){return!!va(s)};function iC(s,e){let i=!1;return function(...r){return i||Xe.warn(s),i=!0,e.apply(this,r)}}function Li(s,e,i,r){return iC(`${e} is deprecated and will be removed in ${s}.0; please use ${i} instead.`,r)}var nC={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const lf=s=>s.indexOf("#")===0?s.slice(1):s;function ne(s,e,i){let r=ne.getPlayer(s);if(r)return e&&Xe.warn(`Player "${s}" is already initialised. Options will not be applied.`),i&&r.ready(i),r;const a=typeof s=="string"?yn("#"+lf(s)):s;if(!_r(a))throw new TypeError("The element or ID supplied is not valid. (videojs)");const l=("getRootNode"in a?a.getRootNode()instanceof W.ShadowRoot:!1)?a.getRootNode():a.ownerDocument.body;(!a.ownerDocument.defaultView||!l.contains(a))&&Xe.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(a.parentNode&&a.parentNode.hasAttribute&&a.parentNode.hasAttribute("data-vjs-player")?a.parentNode:a).cloneNode(!0)),_n("beforesetup").forEach(d=>{const f=d(a,ot(e));if(!zi(f)||Array.isArray(f)){Xe.error("please return an object in beforesetup hooks");return}e=ot(e,f)});const u=oe.getComponent("Player");return r=new u(a,e,i),_n("setup").forEach(d=>d(r)),r}ne.hooks_=en;ne.hooks=_n;ne.hook=R8;ne.hookOnce=V8;ne.removeHook=jh;if(W.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&vr()){let s=yn(".vjs-styles-defaults");if(!s){s=f0("vjs-styles-defaults");const e=yn("head");e&&e.insertBefore(s,e.firstChild),p0(s,`
192
+ .video-js {
193
+ width: 300px;
194
+ height: 150px;
195
+ }
196
+
197
+ .vjs-fluid:not(.vjs-audio-only-mode) {
198
+ padding-top: 56.25%
199
+ }
200
+ `)}}ll(1,ne);ne.VERSION=rl;ne.options=rt.prototype.options_;ne.getPlayers=()=>rt.players;ne.getPlayer=s=>{const e=rt.players;let i;if(typeof s=="string"){const r=lf(s),a=e[r];if(a)return a;i=yn("#"+r)}else i=s;if(_r(i)){const{player:r,playerId:a}=i;if(r||e[a])return r||e[a]}};ne.getAllPlayers=()=>Object.keys(rt.players).map(s=>rt.players[s]).filter(Boolean);ne.players=rt.players;ne.getComponent=oe.getComponent;ne.registerComponent=(s,e)=>(qe.isTech(e)&&Xe.warn(`The ${s} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),oe.registerComponent.call(oe,s,e));ne.getTech=qe.getTech;ne.registerTech=qe.registerTech;ne.use=dx;Object.defineProperty(ne,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(ne.middleware,"TERMINATOR",{value:pa,writeable:!1,enumerable:!0});ne.browser=Zh;ne.obj=U8;ne.mergeOptions=Li(9,"videojs.mergeOptions","videojs.obj.merge",ot);ne.defineLazyProperty=Li(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Aa);ne.bind=Li(9,"videojs.bind","native Function.prototype.bind",ut);ne.registerPlugin=li.registerPlugin;ne.deregisterPlugin=li.deregisterPlugin;ne.plugin=(s,e)=>(Xe.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),li.registerPlugin(s,e));ne.getPlugins=li.getPlugins;ne.getPlugin=li.getPlugin;ne.getPluginVersion=li.getPluginVersion;ne.addLanguage=function(s,e){return s=(""+s).toLowerCase(),ne.options.languages=ot(ne.options.languages,{[s]:e}),ne.options.languages[s]};ne.log=Xe;ne.createLogger=Hh;ne.time=ix;ne.createTimeRange=Li(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Oi);ne.createTimeRanges=Li(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Oi);ne.formatTime=Li(9,"videojs.formatTime","videojs.time.formatTime",Fn);ne.setFormatTime=Li(9,"videojs.setFormatTime","videojs.time.setFormatTime",b0);ne.resetFormatTime=Li(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",x0);ne.parseUrl=Li(9,"videojs.parseUrl","videojs.url.parseUrl",Xl);ne.isCrossOrigin=Li(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",Ua);ne.EventTarget=pi;ne.any=Hl;ne.on=fi;ne.one=Fa;ne.off=qt;ne.trigger=yr;ne.xhr=Dh;ne.TrackList=$n;ne.TextTrack=us;ne.TextTrackList=Wl;ne.AudioTrack=w0;ne.AudioTrackList=E0;ne.VideoTrack=D0;ne.VideoTrackList=S0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(s=>{ne[s]=function(){return Xe.warn(`videojs.${s}() is deprecated; use videojs.dom.${s}() instead`),d0[s].apply(null,arguments)}});ne.computedStyle=Li(9,"videojs.computedStyle","videojs.dom.computedStyle",pr);ne.dom=d0;ne.fn=K8;ne.num=Ox;ne.str=ex;ne.url=ux;ne.Error=nC;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class rC{constructor(e){let i=this;return i.id=e.id,i.label=i.id,i.width=e.width,i.height=e.height,i.bitrate=e.bandwidth,i.frameRate=e.frameRate,i.enabled_=e.enabled,Object.defineProperty(i,"enabled",{get(){return i.enabled_()},set(r){i.enabled_(r)}}),i}}class ya extends ne.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let i=this.getQualityLevelById(e.id);if(i)return i;const r=this.levels_.length;return i=new rC(e),""+r in this||Object.defineProperty(this,r,{get(){return this.levels_[r]}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i}removeQualityLevel(e){let i=null;for(let r=0,a=this.length;r<a;r++)if(this[r]===e){i=this.levels_.splice(r,1)[0],this.selectedIndex_===r?this.selectedIndex_=-1:this.selectedIndex_>r&&this.selectedIndex_--;break}return i&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),i}getQualityLevelById(e){for(let i=0,r=this.length;i<r;i++){const a=this[i];if(a.id===e)return a}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}ya.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const s in ya.prototype.allowedEvents_)ya.prototype["on"+s]=null;var uf="4.1.0";const sC=function(s,e){const i=s.qualityLevels,r=new ya,a=function(){r.dispose(),s.qualityLevels=i,s.off("dispose",a)};return s.on("dispose",a),s.qualityLevels=()=>r,s.qualityLevels.VERSION=uf,r},cf=function(s){return sC(this,ne.obj.merge({},s))};ne.registerPlugin("qualityLevels",cf);cf.VERSION=uf;/*! @name @videojs/http-streaming @version 3.17.3 @license Apache-2.0 */const ai=Sa,Ta=(s,e)=>e&&e.responseURL&&s!==e.responseURL?e.responseURL:s,bi=s=>ne.log.debug?ne.log.debug.bind(ne,"VHS:",`${s} >`):function(){};function st(...s){const e=ne.obj||ne;return(e.merge||e.mergeOptions).apply(e,s)}function It(...s){const e=ne.time||ne;return(e.createTimeRanges||e.createTimeRanges).apply(e,s)}function aC(s){if(s.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
201
+ `;for(let i=0;i<s.length;i++){const r=s.start(i),a=s.end(i);e+=`${r} --> ${a}. Duration (${a-r})
202
+ `}return e}const qi=1/30,ji=qi*3,df=function(s,e){const i=[];let r;if(s&&s.length)for(r=0;r<s.length;r++)e(s.start(r),s.end(r))&&i.push([s.start(r),s.end(r)]);return It(i)},Xn=function(s,e){return df(s,function(i,r){return i-ji<=e&&r+ji>=e})},js=function(s,e){return df(s,function(i){return i-qi>=e})},oC=function(s){if(s.length<2)return It();const e=[];for(let i=1;i<s.length;i++){const r=s.end(i-1),a=s.start(i);e.push([r,a])}return It(e)},lC=function(s,e){let i=null,r=null,a=0;const o=[],l=[];if(!s||!s.length||!e||!e.length)return It();let u=s.length;for(;u--;)o.push({time:s.start(u),type:"start"}),o.push({time:s.end(u),type:"end"});for(u=e.length;u--;)o.push({time:e.start(u),type:"start"}),o.push({time:e.end(u),type:"end"});for(o.sort(function(d,f){return d.time-f.time}),u=0;u<o.length;u++)o[u].type==="start"?(a++,a===2&&(i=o[u].time)):o[u].type==="end"&&(a--,a===1&&(r=o[u].time)),i!==null&&r!==null&&(l.push([i,r]),i=null,r=null);return It(l)},hf=s=>{const e=[];if(!s||!s.length)return"";for(let i=0;i<s.length;i++)e.push(s.start(i)+" => "+s.end(i));return e.join(", ")},uC=function(s,e,i=1){return((s.length?s.end(s.length-1):0)-e)/i},In=s=>{const e=[];for(let i=0;i<s.length;i++)e.push({start:s.start(i),end:s.end(i)});return e},cC=function(s,e){if(s===e)return!1;if(!s&&e||!e&&s||s.length!==e.length)return!0;for(let i=0;i<s.length;i++)if(s.start(i)!==e.start(i)||s.end(i)!==e.end(i))return!0;return!1},Go=function(s){if(!(!s||!s.length||!s.end))return s.end(s.length-1)},hu=function(s,e){let i=0;if(!s||!s.length)return i;for(let r=0;r<s.length;r++){const a=s.start(r),o=s.end(r);if(!(e>o)){if(e>a&&e<=o){i+=o-e;continue}i+=o-a}}return i},fu=(s,e)=>{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(r){i+=r.duration}),(e.preloadHints||[]).forEach(function(r){r.type==="PART"&&(i+=s.partTargetDuration)}),i},gl=s=>(s.segments||[]).reduce((e,i,r)=>(i.parts?i.parts.forEach(function(a,o){e.push({duration:a.duration,segmentIndex:r,partIndex:o,part:a,segment:i})}):e.push({duration:i.duration,segmentIndex:r,partIndex:null,segment:i,part:null}),e),[]),ff=s=>{const e=s.segments&&s.segments.length&&s.segments[s.segments.length-1];return e&&e.parts||[]},pf=({preloadSegment:s})=>{if(!s)return;const{parts:e,preloadHints:i}=s;let r=(i||[]).reduce((a,o)=>a+(o.type==="PART"?1:0),0);return r+=e&&e.length?e.length:0,r},mf=(s,e)=>{if(e.endList)return 0;if(s&&s.suggestedPresentationDelay)return s.suggestedPresentationDelay;const i=ff(e).length>0;return i&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:i&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},dC=function(s,e){let i=0,r=e-s.mediaSequence,a=s.segments[r];if(a){if(typeof a.start<"u")return{result:a.start,precise:!0};if(typeof a.end<"u")return{result:a.end-a.duration,precise:!0}}for(;r--;){if(a=s.segments[r],typeof a.end<"u")return{result:i+a.end,precise:!0};if(i+=fu(s,a),typeof a.start<"u")return{result:i+a.start,precise:!0}}return{result:i,precise:!1}},hC=function(s,e){let i=0,r,a=e-s.mediaSequence;for(;a<s.segments.length;a++){if(r=s.segments[a],typeof r.start<"u")return{result:r.start-i,precise:!0};if(i+=fu(s,r),typeof r.end<"u")return{result:r.end-i,precise:!0}}return{result:-1,precise:!1}},gf=function(s,e,i){if(typeof e>"u"&&(e=s.mediaSequence+s.segments.length),e<s.mediaSequence)return 0;const r=dC(s,e);if(r.precise)return r.result;const a=hC(s,e);return a.precise?a.result:r.result+i},vf=function(s,e,i){if(!s)return 0;if(typeof i!="number"&&(i=0),typeof e>"u"){if(s.totalDuration)return s.totalDuration;if(!s.endList)return W.Infinity}return gf(s,e,i)},ts=function({defaultDuration:s,durationList:e,startIndex:i,endIndex:r}){let a=0;if(i>r&&([i,r]=[r,i]),i<0){for(let o=i;o<Math.min(0,r);o++)a+=s;i=0}for(let o=i;o<r;o++)a+=e[o].duration;return a},_f=function(s,e,i,r){if(!s||!s.segments)return null;if(s.endList)return vf(s);if(e===null)return null;e=e||0;let a=gf(s,s.mediaSequence+s.segments.length,e);return i&&(r=typeof r=="number"?r:mf(null,s),a-=r),Math.max(0,a)},fC=function(s,e,i){const a=e||0;let o=_f(s,e,!0,i);return o===null?It():(o<a&&(o=a),It(a,o))},pC=function({playlist:s,currentTime:e,startingSegmentIndex:i,startingPartIndex:r,startTime:a,exactManifestTimings:o}){let l=e-a;const u=gl(s);let d=0;for(let f=0;f<u.length;f++){const g=u[f];if(i===g.segmentIndex&&!(typeof r=="number"&&typeof g.partIndex=="number"&&r!==g.partIndex)){d=f;break}}if(l<0){if(d>0)for(let f=d-1;f>=0;f--){const g=u[f];if(l+=g.duration,o){if(l<0)continue}else if(l+qi<=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:a-ts({defaultDuration:s.targetDuration,durationList:u,startIndex:d,endIndex:f})}}return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:e}}if(d<0){for(let f=d;f<0;f++)if(l-=s.targetDuration,l<0)return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:e};d=0}for(let f=d;f<u.length;f++){const g=u[f];l-=g.duration;const v=g.duration>qi,S=l===0,C=v&&l+qi>=0;if(!((S||C)&&f!==u.length-1)){if(o){if(l>0)continue}else if(l-qi>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:a+ts({defaultDuration:s.targetDuration,durationList:u,startIndex:d,endIndex:f})}}}return{segmentIndex:u[u.length-1].segmentIndex,partIndex:u[u.length-1].partIndex,startTime:e}},yf=function(s){return s.excludeUntil&&s.excludeUntil>Date.now()},pu=function(s){return s.excludeUntil&&s.excludeUntil===1/0},za=function(s){const e=yf(s);return!s.disabled&&!e},mC=function(s){return s.disabled},gC=function(s){for(let e=0;e<s.segments.length;e++)if(s.segments[e].key)return!0;return!1},Tf=function(s,e){return e.attributes&&e.attributes[s]},vC=function(s,e,i,r=0){return Tf("BANDWIDTH",i)?(s*i.attributes.BANDWIDTH-r*8)/e:NaN},vl=(s,e)=>{if(s.playlists.length===1)return!0;const i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return s.playlists.filter(r=>za(r)?(r.attributes.BANDWIDTH||0)<i:!1).length===0},mu=(s,e)=>!s&&!e||!s&&e||s&&!e?!1:!!(s===e||s.id&&e.id&&s.id===e.id||s.resolvedUri&&e.resolvedUri&&s.resolvedUri===e.resolvedUri||s.uri&&e.uri&&s.uri===e.uri),Vd=function(s,e){const i=s&&s.mediaGroups&&s.mediaGroups.AUDIO||{};let r=!1;for(const a in i){for(const o in i[a])if(r=e(i[a][o]),r)break;if(r)break}return!!r},fs=s=>{if(!s||!s.playlists||!s.playlists.length)return Vd(s,i=>i.playlists&&i.playlists.length||i.uri);for(let e=0;e<s.playlists.length;e++){const i=s.playlists[e],r=i.attributes&&i.attributes.CODECS;if(!(r&&r.split(",").every(o=>Ih(o))||Vd(s,o=>mu(i,o))))return!1}return!0};var oi={liveEdgeDelay:mf,duration:vf,seekable:fC,getMediaInfoForTime:pC,isEnabled:za,isDisabled:mC,isExcluded:yf,isIncompatible:pu,playlistEnd:_f,isAes:gC,hasAttribute:Tf,estimateSegmentRequestTime:vC,isLowestEnabledRendition:vl,isAudioOnly:fs,playlistMatch:mu,segmentDurationWithParts:fu};const{log:bf}=ne,ir=(s,e)=>`${s}-${e}`,xf=(s,e,i)=>`placeholder-uri-${s}-${e}-${i}`,_C=({onwarn:s,oninfo:e,manifestString:i,customTagParsers:r=[],customTagMappers:a=[],llhls:o})=>{const l=new s4;s&&l.on("warn",s),e&&l.on("info",e),r.forEach(f=>l.addParser(f)),a.forEach(f=>l.addTagMapper(f)),l.push(i),l.end();const u=l.manifest;if(o||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(f){u.hasOwnProperty(f)&&delete u[f]}),u.segments&&u.segments.forEach(function(f){["parts","preloadHints"].forEach(function(g){f.hasOwnProperty(g)&&delete f[g]})})),!u.targetDuration){let f=10;u.segments&&u.segments.length&&(f=u.segments.reduce((g,v)=>Math.max(g,v.duration),0)),s&&s({message:`manifest has no targetDuration defaulting to ${f}`}),u.targetDuration=f}const d=ff(u);if(d.length&&!u.partTargetDuration){const f=d.reduce((g,v)=>Math.max(g,v.duration),0);s&&(s({message:`manifest has no partTargetDuration defaulting to ${f}`}),bf.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),u.partTargetDuration=f}return u},Cr=(s,e)=>{s.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(s.mediaGroups[i])for(const r in s.mediaGroups[i])for(const a in s.mediaGroups[i][r]){const o=s.mediaGroups[i][r][a];e(o,i,r,a)}})},Cf=({playlist:s,uri:e,id:i})=>{s.id=i,s.playlistErrors_=0,e&&(s.uri=e),s.attributes=s.attributes||{}},yC=s=>{let e=s.playlists.length;for(;e--;){const i=s.playlists[e];Cf({playlist:i,id:ir(e,i.uri)}),i.resolvedUri=ai(s.uri,i.uri),s.playlists[i.id]=i,s.playlists[i.uri]=i,i.attributes.BANDWIDTH||bf.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},TC=s=>{Cr(s,e=>{e.uri&&(e.resolvedUri=ai(s.uri,e.uri))})},bC=(s,e)=>{const i=ir(0,e),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:W.location.href,resolvedUri:W.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return r.playlists[i]=r.playlists[0],r.playlists[e]=r.playlists[0],r},Ef=(s,e,i=xf)=>{s.uri=e;for(let a=0;a<s.playlists.length;a++)if(!s.playlists[a].uri){const o=`placeholder-uri-${a}`;s.playlists[a].uri=o}const r=fs(s);Cr(s,(a,o,l,u)=>{if(!a.playlists||!a.playlists.length){if(r&&o==="AUDIO"&&!a.uri)for(let d=0;d<s.playlists.length;d++){const f=s.playlists[d];if(f.attributes&&f.attributes.AUDIO&&f.attributes.AUDIO===l)return}a.playlists=[xt({},a)]}a.playlists.forEach(function(d,f){const g=i(o,l,u,d),v=ir(f,g);d.uri?d.resolvedUri=d.resolvedUri||ai(s.uri,d.uri):(d.uri=f===0?g:v,d.resolvedUri=d.uri),d.id=d.id||v,d.attributes=d.attributes||{},s.playlists[d.id]=d,s.playlists[d.uri]=d})}),yC(s),TC(s)};class Fd{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[i]=e;i.programDateTime!==void 0&&(this.offset_=i.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[i]=e,r=i.startDate.getTime();this.trimProcessedDateRanges_(r),this.pendingDateRanges_=e.reduce((a,o)=>(a.set(o.id,o),a),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},i=[];this.pendingDateRanges_.forEach((r,a)=>{if(!this.processedDateRanges_.has(a)&&(r.startTime=r.startDate.getTime()/1e3-this.offset_,r.processDateRange=()=>this.processDateRange(r),i.push(r),!!r.class))if(e[r.class]){const o=e[r.class].push(r);r.classListIndex=o-1}else e[r.class]=[r],r.classListIndex=0});for(const r of i){const a=e[r.class]||[];r.endDate?r.endTime=r.endDate.getTime()/1e3-this.offset_:r.endOnNext&&a[r.classListIndex+1]?r.endTime=a[r.classListIndex+1].startTime:r.duration?r.endTime=r.startTime+r.duration:r.plannedDuration?r.endTime=r.startTime+r.plannedDuration:r.endTime=r.startTime}return i}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((r,a)=>{r.startDate.getTime()<e&&this.processedDateRanges_.delete(a)})}}const Sf=22,Vn=({requestType:s,request:e,error:i,parseFailure:r})=>{const a=e.status<200||e.status>299,o=e.status>=400&&e.status<=499,l={uri:e.uri,requestType:s},u=a&&!o||r;if(i&&o)l.error=xt({},i),l.errorType=ne.Error.NetworkRequestFailed;else if(e.aborted)l.errorType=ne.Error.NetworkRequestAborted;else if(e.timedout)l.errorType=ne.Error.NetworkRequestTimeout;else if(u){const d=r?ne.Error.NetworkBodyParserFailed:ne.Error.NetworkBadStatus;l.errorType=d,l.status=e.status,l.headers=e.headers}return l},xC=bi("CodecUtils"),kf=function(s){const e=s.attributes||{};if(e.CODECS)return Fi(e.CODECS)},wf=(s,e)=>{const i=e.attributes||{};return s&&s.mediaGroups&&s.mediaGroups.AUDIO&&i.AUDIO&&s.mediaGroups.AUDIO[i.AUDIO]},CC=(s,e)=>{if(!wf(s,e))return!0;const i=e.attributes||{},r=s.mediaGroups.AUDIO[i.AUDIO];for(const a in r)if(!r[a].uri&&!r[a].playlists)return!0;return!1},os=function(s){const e={};return s.forEach(({mediaType:i,type:r,details:a})=>{e[i]=e[i]||[],e[i].push(Nh(`${r}${a}`))}),Object.keys(e).forEach(function(i){if(e[i].length>1){xC(`multiple ${i} codecs found as attributes: ${e[i].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[i]=null;return}e[i]=e[i][0]}),e},$d=function(s){let e=0;return s.audio&&e++,s.video&&e++,e},is=function(s,e){const i=e.attributes||{},r=os(kf(e)||[]);if(wf(s,e)&&!r.audio&&!CC(s,e)){const a=os(o4(s,i.AUDIO)||[]);a.audio&&(r.audio=a.audio)}return r},{EventTarget:EC}=ne,SC=(s,e)=>{if(e.endList||!e.serverControl)return s;const i={};if(e.serverControl.canBlockReload){const{preloadSegment:r}=e;let a=e.mediaSequence+e.segments.length;if(r){const o=r.parts||[],l=pf(e)-1;l>-1&&l!==o.length-1&&(i._HLS_part=l),(l>-1||o.length)&&a--}i._HLS_msn=a}if(e.serverControl&&e.serverControl.canSkipUntil&&(i._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const r=new W.URL(s);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(a){i.hasOwnProperty(a)&&r.searchParams.set(a,i[a])}),s=r.toString()}return s},kC=(s,e)=>{if(!s)return e;const i=st(s,e);if(s.preloadHints&&!e.preloadHints&&delete i.preloadHints,s.parts&&!e.parts)delete i.parts;else if(s.parts&&e.parts)for(let r=0;r<e.parts.length;r++)s.parts&&s.parts[r]&&(i.parts[r]=st(s.parts[r],e.parts[r]));return!s.skipped&&e.skipped&&(i.skipped=!1),s.preload&&!e.preload&&(i.preload=!1),i},wC=(s,e,i)=>{const r=s.slice(),a=e.slice();i=i||0;const o=[];let l;for(let u=0;u<a.length;u++){const d=r[u+i],f=a[u];d?(l=d.map||l,o.push(kC(d,f))):(l&&!f.map&&(f.map=l),o.push(f))}return o},Df=(s,e)=>{!s.resolvedUri&&s.uri&&(s.resolvedUri=ai(e,s.uri)),s.key&&!s.key.resolvedUri&&(s.key.resolvedUri=ai(e,s.key.uri)),s.map&&!s.map.resolvedUri&&(s.map.resolvedUri=ai(e,s.map.uri)),s.map&&s.map.key&&!s.map.key.resolvedUri&&(s.map.key.resolvedUri=ai(e,s.map.key.uri)),s.parts&&s.parts.length&&s.parts.forEach(i=>{i.resolvedUri||(i.resolvedUri=ai(e,i.uri))}),s.preloadHints&&s.preloadHints.length&&s.preloadHints.forEach(i=>{i.resolvedUri||(i.resolvedUri=ai(e,i.uri))})},Af=function(s){const e=s.segments||[],i=s.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints){for(let r=0;r<i.preloadHints.length;r++)if(i.preloadHints[r].type==="MAP")return e}i.duration=s.targetDuration,i.preload=!0,e.push(i)}return e},Nf=(s,e)=>s===e||s.segments&&e.segments&&s.segments.length===e.segments.length&&s.endList===e.endList&&s.mediaSequence===e.mediaSequence&&s.preloadSegment===e.preloadSegment,_l=(s,e,i=Nf)=>{const r=st(s,{}),a=r.playlists[e.id];if(!a||i(a,e))return null;e.segments=Af(e);const o=st(a,e);if(o.preloadSegment&&!e.preloadSegment&&delete o.preloadSegment,a.segments){if(e.skip){e.segments=e.segments||[];for(let l=0;l<e.skip.skippedSegments;l++)e.segments.unshift({skipped:!0})}o.segments=wC(a.segments,e.segments,e.mediaSequence-a.mediaSequence)}o.segments.forEach(l=>{Df(l,o.resolvedUri)});for(let l=0;l<r.playlists.length;l++)r.playlists[l].id===e.id&&(r.playlists[l]=o);return r.playlists[e.id]=o,r.playlists[e.uri]=o,Cr(s,(l,u,d,f)=>{if(l.playlists)for(let g=0;g<l.playlists.length;g++)e.id===l.playlists[g].id&&(l.playlists[g]=o)}),r},yl=(s,e)=>{const i=s.segments||[],r=i[i.length-1],a=r&&r.parts&&r.parts[r.parts.length-1],o=a&&a.duration||r&&r.duration;return e&&o?o*1e3:(s.partTargetDuration||s.targetDuration||10)*500},Ud=(s,e,i)=>{if(!s)return;const r=[];return s.forEach(a=>{if(!a.attributes)return;const{BANDWIDTH:o,RESOLUTION:l,CODECS:u}=a.attributes;r.push({id:a.id,bandwidth:o,resolution:l,codecs:u})}),{type:e,isLive:i,renditions:r}};class Kn extends EC{constructor(e,i,r={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=bi("PlaylistLoader");const{withCredentials:a=!1}=r;this.src=e,this.vhs_=i,this.withCredentials=a,this.addDateRangesToTextTrack_=r.addDateRangesToTextTrack;const o=i.options_;this.customTagParsers=o&&o.customTagParsers||[],this.customTagMappers=o&&o.customTagMappers||[],this.llhls=o&&o.llhls,this.dateRangesStorage_=new Fd,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const i=this.dateRangesStorage_.getDateRangesToProcess();!i.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(i)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let i=ai(this.main.uri,e.uri);this.llhls&&(i=SC(i,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials,requestType:"hls-playlist"},(r,a)=>{if(this.request){if(r)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,i,r){const{uri:a,id:o}=i;this.request=null,r&&(this.state=r),this.error={playlist:this.main.playlists[o],status:e.status,message:`HLS playlist request error at URL: ${a}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Vn({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:i}){try{const r=_C({onwarn:({message:a})=>this.logger_(`m3u8-parser warn for ${e}: ${a}`),oninfo:({message:a})=>this.logger_(`m3u8-parser info for ${e}: ${a}`),manifestString:i,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!r.playlists||!r.playlists.length||this.excludeAudioOnlyVariants(r.playlists),r}catch(r){this.error=r,this.error.metadata={errorType:ne.Error.StreamingHlsPlaylistParserError,error:r}}}excludeAudioOnlyVariants(e){const i=r=>{const a=r.attributes||{},{width:o,height:l}=a.RESOLUTION||{};if(o&&l)return!0;const u=kf(r)||[];return!!os(u).video};e.some(i)&&e.forEach(r=>{i(r)||(r.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:i,url:r,id:a}){this.request=null,this.state="HAVE_METADATA";const o={playlistInfo:{type:"media",uri:r}};this.trigger({type:"playlistparsestart",metadata:o});const l=i||this.parseManifest_({url:r,manifestString:e});l.lastRequest=Date.now(),Cf({playlist:l,uri:r,id:a});const u=_l(this.main,l);this.targetDuration=l.partTargetDuration||l.targetDuration,this.pendingMedia_=null,u?(this.main=u,this.media_=this.main.playlists[a]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(yl(this.media(),!!u)),o.parsedPlaylist=Ud(this.main.playlists,o.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:o}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),W.clearTimeout(this.mediaUpdateTimeout),W.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Fd,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,i){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(W.clearTimeout(this.finalRenditionTimeout),i){const u=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=W.setTimeout(this.media.bind(this,e,!1),u);return}const r=this.state,a=!this.media_||e.id!==this.media_.id,o=this.main.playlists[e.id];if(o&&o.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,a&&(this.trigger("mediachanging"),r==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(yl(e,!0)),!a)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const l={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:l}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(u,d)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=Ta(e.resolvedUri,d),u)return this.playlistRequestError(this.request,e,r);this.trigger({type:"playlistrequestcomplete",metadata:l}),this.haveMetadata({playlistString:d.responseText,url:e.uri,id:e.id}),r==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(W.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(W.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const i=this.media();if(e){const r=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=W.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},r);return}if(!this.started){this.start();return}i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(W.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=W.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=W.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,r)=>{if(!this.request)return;if(this.request=null,i)return this.error={status:r.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:r.responseText,code:2,metadata:Vn({requestType:r.requestType,request:r,error:i})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=Ta(this.src,r),this.trigger({type:"playlistparsestart",metadata:e});const a=this.parseManifest_({manifestString:r.responseText,url:this.src});e.parsedPlaylist=Ud(a.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(a)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,Ef(this.main,this.srcUri()),e.playlists.forEach(r=>{r.segments=Af(r),r.segments.forEach(a=>{Df(a,r.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const i=this.srcUri()||W.location.href;this.main=bC(e,i),this.haveMetadata({playlistObject:e,url:i,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,i){const r=this.main,a=e.ID;let o=r.playlists.length;for(;o--;){const l=r.playlists[o];if(l.attributes["PATHWAY-ID"]===a){const u=l.resolvedUri,d=l.id;if(i){const f=this.createCloneURI_(l.resolvedUri,e),g=ir(a,f),v=this.createCloneAttributes_(a,l.attributes),S=this.createClonePlaylist_(l,g,e,v);r.playlists[o]=S,r.playlists[g]=S,r.playlists[f]=S}else r.playlists.splice(o,1);delete r.playlists[d],delete r.playlists[u]}}this.updateOrDeleteCloneMedia(e,i)}updateOrDeleteCloneMedia(e,i){const r=this.main,a=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(o=>{if(!(!r.mediaGroups[o]||!r.mediaGroups[o][a])){for(const l in r.mediaGroups[o])if(l===a){for(const u in r.mediaGroups[o][l])r.mediaGroups[o][l][u].playlists.forEach((f,g)=>{const v=r.playlists[f.id],S=v.id,C=v.resolvedUri;delete r.playlists[S],delete r.playlists[C]});delete r.mediaGroups[o][l]}}}),i&&this.createClonedMediaGroups_(e)}addClonePathway(e,i={}){const r=this.main,a=r.playlists.length,o=this.createCloneURI_(i.resolvedUri,e),l=ir(e.ID,o),u=this.createCloneAttributes_(e.ID,i.attributes),d=this.createClonePlaylist_(i,l,e,u);r.playlists[a]=d,r.playlists[l]=d,r.playlists[o]=d,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const i=e.ID,r=e["BASE-ID"],a=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(o=>{if(!(!a.mediaGroups[o]||a.mediaGroups[o][i]))for(const l in a.mediaGroups[o]){if(l===r)a.mediaGroups[o][i]={};else continue;for(const u in a.mediaGroups[o][l]){const d=a.mediaGroups[o][l][u];a.mediaGroups[o][i][u]=xt({},d);const f=a.mediaGroups[o][i][u],g=this.createCloneURI_(d.resolvedUri,e);f.resolvedUri=g,f.uri=g,f.playlists=[],d.playlists.forEach((v,S)=>{const C=a.playlists[v.id],O=xf(o,i,u),T=ir(i,O);if(C&&!a.playlists[T]){const w=this.createClonePlaylist_(C,T,e),R=w.resolvedUri;a.playlists[T]=w,a.playlists[R]=w}f.playlists[S]=this.createClonePlaylist_(v,T,e)})}}})}createClonePlaylist_(e,i,r,a){const o=this.createCloneURI_(e.resolvedUri,r),l={resolvedUri:o,uri:o,id:i};return e.segments&&(l.segments=[]),a&&(l.attributes=a),st(e,l)}createCloneURI_(e,i){const r=new URL(e);r.hostname=i["URI-REPLACEMENT"].HOST;const a=i["URI-REPLACEMENT"].PARAMS;for(const o of Object.keys(a))r.searchParams.set(o,a[o]);return r.href}createCloneAttributes_(e,i){const r={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{i[a]&&(r[a]=e)}),r}getKeyIdSet(e){const i=new Set;if(!e||!e.contentProtection)return i;for(const r in e.contentProtection)if(e.contentProtection[r]&&e.contentProtection[r].attributes&&e.contentProtection[r].attributes.keyId){const a=e.contentProtection[r].attributes.keyId;i.add(a.toLowerCase())}return i}}const Tl=function(s,e,i,r){const a=s.responseType==="arraybuffer"?s.response:s.responseText;!e&&a&&(s.responseTime=Date.now(),s.roundTripTime=s.responseTime-s.requestTime,s.bytesReceived=a.byteLength||a.length,s.bandwidth||(s.bandwidth=Math.floor(s.bytesReceived/s.roundTripTime*8*1e3))),i.headers&&(s.responseHeaders=i.headers),e&&e.code==="ETIMEDOUT"&&(s.timedout=!0),!e&&!s.aborted&&i.statusCode!==200&&i.statusCode!==206&&i.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(s&&(a||s.responseText)))),r(e,s)},DC=(s,e)=>{if(!s||!s.size)return;let i=e;return s.forEach(r=>{i=r(i)}),i},AC=(s,e,i,r)=>{!s||!s.size||s.forEach(a=>{a(e,i,r)})},If=function(){const s=function e(i,r){i=st({timeout:45e3},i);const a=e.beforeRequest||ne.Vhs.xhr.beforeRequest,o=e._requestCallbackSet||ne.Vhs.xhr._requestCallbackSet||new Set,l=e._responseCallbackSet||ne.Vhs.xhr._responseCallbackSet;a&&typeof a=="function"&&(ne.log.warn("beforeRequest is deprecated, use onRequest instead."),o.add(a));const u=ne.Vhs.xhr.original===!0?ne.xhr:ne.Vhs.xhr,d=DC(o,i);o.delete(a);const f=u(d||i,function(v,S){return AC(l,f,v,S),Tl(f,v,S,r)}),g=f.abort;return f.abort=function(){return f.aborted=!0,g.apply(f,arguments)},f.uri=i.uri,f.requestType=i.requestType,f.requestTime=Date.now(),f};return s.original=!0,s},NC=function(s){let e;const i=s.offset;return typeof s.offset=="bigint"||typeof s.length=="bigint"?e=W.BigInt(s.offset)+W.BigInt(s.length)-W.BigInt(1):e=s.offset+s.length-1,"bytes="+i+"-"+e},bl=function(s){const e={};return s.byterange&&(e.Range=NC(s.byterange)),e},IC=function(s,e){return s.start(e)+"-"+s.end(e)},OC=function(s,e){const i=s.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},BC=function(s){return s>=32&&s<126?String.fromCharCode(s):"."},Of=function(s){const e={};return Object.keys(s).forEach(i=>{const r=s[i];Bh(r)?e[i]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:e[i]=r}),e},ba=function(s){const e=s.byterange||{length:1/0,offset:0};return[e.length,e.offset,s.resolvedUri].join(",")},Bf=function(s){return s.resolvedUri},Lf=s=>{const e=Array.prototype.slice.call(s),i=16;let r="",a,o;for(let l=0;l<e.length/i;l++)a=e.slice(l*i,l*i+i).map(OC).join(""),o=e.slice(l*i,l*i+i).map(BC).join(""),r+=a+" "+o+`
203
+ `;return r},LC=({bytes:s})=>Lf(s),PC=s=>{let e="",i;for(i=0;i<s.length;i++)e+=IC(s,i)+" ";return e};var MC=Object.freeze({__proto__:null,createTransferableMessage:Of,initSegmentId:ba,segmentKeyId:Bf,hexDump:Lf,tagDump:LC,textRanges:PC});const Pf=.25,RC=(s,e)=>{if(!e.dateTimeObject)return null;const i=e.videoTimingInfo.transmuxerPrependedSeconds,a=e.videoTimingInfo.transmuxedPresentationStart+i,o=s-a;return new Date(e.dateTimeObject.getTime()+o*1e3)},VC=s=>s.transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds,FC=(s,e)=>{let i;try{i=new Date(s)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let r=e.segments[0];if(i<new Date(r.dateTimeObject))return null;for(let d=0;d<e.segments.length-1;d++){r=e.segments[d];const f=new Date(e.segments[d+1].dateTimeObject);if(i<f)break}const a=e.segments[e.segments.length-1],o=a.dateTimeObject,l=a.videoTimingInfo?VC(a.videoTimingInfo):a.duration+a.duration*Pf,u=new Date(o.getTime()+l*1e3);return i>u?null:(i>new Date(o)&&(r=a),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:oi.duration(e,e.mediaSequence+e.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})},$C=(s,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let i=0,r;for(let o=0;o<e.segments.length&&(r=e.segments[o],i=r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationEnd:i+r.duration,!(s<=i));o++);const a=e.segments[e.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<s)return null;if(s>i){if(s>i+a.duration*Pf)return null;r=a}return{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:i-r.duration,type:r.videoTimingInfo?"accurate":"estimate"}},UC=(s,e)=>{let i,r;try{i=new Date(s),r=new Date(e)}catch{}const a=i.getTime();return(r.getTime()-a)/1e3},qC=s=>{if(!s.segments||s.segments.length===0)return!1;for(let e=0;e<s.segments.length;e++)if(!s.segments[e].dateTimeObject)return!1;return!0},jC=({playlist:s,time:e=void 0,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!s||e===void 0)return i({message:"getProgramTime: playlist and time must be provided"});const r=$C(e,s);if(!r)return i({message:"valid programTime was not found"});if(r.type==="estimate")return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:r.estimatedStart});const a={mediaSeconds:e},o=RC(e,r.segment);return o&&(a.programDateTime=o.toISOString()),i(null,a)},Mf=({programTime:s,playlist:e,retryCount:i=2,seekTo:r,pauseAfterSeek:a=!0,tech:o,callback:l})=>{if(!l)throw new Error("seekToProgramTime: callback must be provided");if(typeof s>"u"||!e||!r)return l({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!o.hasStarted_)return l({message:"player must be playing a live stream to start buffering"});if(!qC(e))return l({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const u=FC(s,e);if(!u)return l({message:`${s} was not found in the stream`});const d=u.segment,f=UC(d.dateTimeObject,s);if(u.type==="estimate"){if(i===0)return l({message:`${s} is not buffered yet. Try again`});r(u.estimatedStart+f),o.one("seeked",()=>{Mf({programTime:s,playlist:e,retryCount:i-1,seekTo:r,pauseAfterSeek:a,tech:o,callback:l})});return}const g=d.start+f,v=()=>l(null,o.currentTime());o.one("seeked",v),a&&o.pause(),r(g)},Wo=(s,e)=>{if(s.readyState===4)return e()},HC=(s,e,i,r)=>{let a=[],o,l=!1;const u=function(v,S,C,O){return S.abort(),l=!0,i(v,S,C,O)},d=function(v,S){if(l)return;if(v)return v.metadata=Vn({requestType:r,request:S,error:v}),u(v,S,"",a);const C=S.responseText.substring(a&&a.byteLength||0,S.responseText.length);if(a=v4(a,Lh(C,!0)),o=o||Yr(a),a.length<10||o&&a.length<o+2)return Wo(S,()=>u(v,S,"",a));const O=Fl(a);return O==="ts"&&a.length<188?Wo(S,()=>u(v,S,"",a)):!O&&a.length<376?Wo(S,()=>u(v,S,"",a)):u(null,S,O,a)},g=e({uri:s,beforeSend(v){v.overrideMimeType("text/plain; charset=x-user-defined"),v.addEventListener("progress",function({total:S,loaded:C}){return Tl(v,null,{statusCode:v.status},d)})}},function(v,S){return Tl(g,v,S,d)});return g},{EventTarget:zC}=ne,qd=function(s,e){if(!Nf(s,e)||s.sidx&&e.sidx&&(s.sidx.offset!==e.sidx.offset||s.sidx.length!==e.sidx.length))return!1;if(!s.sidx&&e.sidx||s.sidx&&!e.sidx||s.segments&&!e.segments||!s.segments&&e.segments)return!1;if(!s.segments&&!e.segments)return!0;for(let i=0;i<s.segments.length;i++){const r=s.segments[i],a=e.segments[i];if(r.uri!==a.uri)return!1;if(!r.byterange&&!a.byterange)continue;const o=r.byterange,l=a.byterange;if(o&&!l||!o&&l||o.offset!==l.offset||o.length!==l.length)return!1}return!0},GC=(s,e,i,r)=>{const a=r.attributes.NAME||i;return`placeholder-uri-${s}-${e}-${a}`},WC=({mainXml:s,srcUrl:e,clientOffset:i,sidxMapping:r,previousManifest:a})=>{const o=m8(s,{manifestUri:e,clientOffset:i,sidxMapping:r,previousManifest:a});return Ef(o,e,GC),o},YC=(s,e)=>{Cr(s,(i,r,a,o)=>{(!e.mediaGroups[r][a]||!(o in e.mediaGroups[r][a]))&&delete s.mediaGroups[r][a][o]})},XC=(s,e,i)=>{let r=!0,a=st(s,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let o=0;o<e.playlists.length;o++){const l=e.playlists[o];if(l.sidx){const d=wa(l.sidx);i&&i[d]&&i[d].sidx&&Ml(l,i[d].sidx,l.sidx.resolvedUri)}const u=_l(a,l,qd);u&&(a=u,r=!1)}return Cr(e,(o,l,u,d)=>{if(o.playlists&&o.playlists.length){const f=o.playlists[0].id,g=_l(a,o.playlists[0],qd);g&&(a=g,d in a.mediaGroups[l][u]||(a.mediaGroups[l][u][d]=o),a.mediaGroups[l][u][d].playlists[0]=a.playlists[f],r=!1)}}),YC(a,e),e.minimumUpdatePeriod!==s.minimumUpdatePeriod&&(r=!1),r?null:a},KC=(s,e)=>(!s.map&&!e.map||!!(s.map&&e.map&&s.map.byterange.offset===e.map.byterange.offset&&s.map.byterange.length===e.map.byterange.length))&&s.uri===e.uri&&s.byterange.offset===e.byterange.offset&&s.byterange.length===e.byterange.length,jd=(s,e)=>{const i={};for(const r in s){const o=s[r].sidx;if(o){const l=wa(o);if(!e[l])break;const u=e[l].sidxInfo;KC(u,o)&&(i[l]=e[l])}}return i},QC=(s,e)=>{let r=jd(s.playlists,e);return Cr(s,(a,o,l,u)=>{if(a.playlists&&a.playlists.length){const d=a.playlists;r=st(r,jd(d,e))}}),r};class xl extends zC{constructor(e,i,r={},a){super(),this.isPaused_=!0,this.mainPlaylistLoader_=a||this,a||(this.isMain_=!0);const{withCredentials:o=!1}=r;if(this.vhs_=i,this.withCredentials=o,this.addMetadataToTextTrack=r.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=bi("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,i,r){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:i.status,message:"DASH request error at URL: "+i.uri,response:i.response,code:2,metadata:e.metadata},r&&(this.state=r),this.trigger("error"),!0}addSidxSegments_(e,i,r){const a=e.sidx&&wa(e.sidx);if(!e.sidx||!a||this.mainPlaylistLoader_.sidxMapping_[a]){W.clearTimeout(this.mediaRequest_),this.mediaRequest_=W.setTimeout(()=>r(!1),0);return}const o=Ta(e.sidx.resolvedUri),l=(d,f)=>{if(this.requestErrored_(d,f,i))return;const g=this.mainPlaylistLoader_.sidxMapping_,{requestType:v}=f;let S;try{S=T8(Re(f.response).subarray(8))}catch(C){C.metadata=Vn({requestType:v,request:f,parseFailure:!0}),this.requestErrored_(C,f,i);return}return g[a]={sidxInfo:e.sidx,sidx:S},Ml(e,S,e.sidx.resolvedUri),r(!0)},u="dash-sidx";this.request=HC(o,this.vhs_.xhr,(d,f,g,v)=>{if(d)return l(d,f);if(!g||g!=="mp4"){const O=g||"unknown";return l({status:f.status,message:`Unsupported ${O} container type for sidx segment at URL: ${o}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},f)}const{offset:S,length:C}=e.sidx.byterange;if(v.length>=C+S)return l(d,{response:v.subarray(S,S+C),status:f.status,uri:f.uri});this.request=this.vhs_.xhr({uri:o,responseType:"arraybuffer",requestType:"dash-sidx",headers:bl({byterange:e.sidx.byterange})},l)},u)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},W.clearTimeout(this.minimumUpdatePeriodTimeout_),W.clearTimeout(this.mediaRequest_),W.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const i=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,r&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,a=>{this.haveMetadata({startingState:i,playlist:e})}))}haveMetadata({startingState:e,playlist:i}){this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,W.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(i.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),W.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(W.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,W.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const i=this.media();if(e){const r=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=W.setTimeout(()=>this.load(),r);return}if(!this.started){this.start();return}i&&!i.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){W.clearTimeout(this.mediaRequest_),this.mediaRequest_=W.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,i)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(r,a)=>{if(r){const{requestType:l}=a;r.metadata=Vn({requestType:l,request:a,error:r})}if(this.requestErrored_(r,a)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:i});const o=a.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=a.responseText,a.responseHeaders&&a.responseHeaders.date?this.mainLoaded_=Date.parse(a.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=Ta(this.mainPlaylistLoader_.srcUrl,a),o){this.handleMain_(),this.syncClientServerClock_(()=>e(a,o));return}return e(a,o)})}syncClientServerClock_(e){const i=g8(this.mainPlaylistLoader_.mainXml_);if(i===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(i.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=i.value-Date.now(),e();this.request=this.vhs_.xhr({uri:ai(this.mainPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(r,a)=>{if(!this.request)return;if(r){const{requestType:l}=a;return this.error.metadata=Vn({requestType:l,request:a,error:r}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let o;i.method==="HEAD"?!a.responseHeaders||!a.responseHeaders.date?o=this.mainLoaded_:o=Date.parse(a.responseHeaders.date):o=Date.parse(a.responseText),this.mainPlaylistLoader_.clientOffset_=o-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){W.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:i});let r;try{r=WC({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(o){this.error=o,this.error.metadata={errorType:ne.Error.StreamingDashManifestParserError,error:o},this.trigger("error")}e&&(r=XC(e,r,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=r||e;const a=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(a&&a!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=a),(!e||r&&r.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(r),r){const{duration:o,endList:l}=r,u=[];r.playlists.forEach(f=>{u.push({id:f.id,bandwidth:f.attributes.BANDWIDTH,resolution:f.attributes.RESOLUTION,codecs:f.attributes.CODECS})});const d={duration:o,isLive:!l,renditions:u};i.parsedManifest=d,this.trigger({type:"manifestparsecomplete",metadata:i})}return!!r}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(W.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let i=e.main&&e.main.minimumUpdatePeriod;if(i===0&&(e.media()?i=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof i!="number"||i<=0){i<0&&this.logger_(`found invalid minimumUpdatePeriod of ${i}, not setting a timeout`);return}this.createMUPTimeout_(i)}createMUPTimeout_(e){const i=this.mainPlaylistLoader_;i.minimumUpdatePeriodTimeout_=W.setTimeout(()=>{i.minimumUpdatePeriodTimeout_=null,i.trigger("minimumUpdatePeriod"),i.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,i)=>{i&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=QC(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,r=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const i=this.mainPlaylistLoader_.main.playlists,r=!this.media_||this.media_!==i[e];if(r?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const a=()=>{this.media().endList||(this.mediaUpdateTimeout=W.setTimeout(()=>{this.trigger("mediaupdatetimeout"),a()},yl(this.media(),!!r)))};a()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const i=this.mainPlaylistLoader_.main.eventStream.map(r=>({cueTime:r.start,frames:[{data:r.messageData}]}));this.addMetadataToTextTrack("EventStream",i,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const r in e.contentProtection){const a=e.contentProtection[r].attributes["cenc:default_KID"];a&&i.add(a.replace(/-/g,"").toLowerCase())}return i}}}var At={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const ZC=s=>{const e=new Uint8Array(new ArrayBuffer(s.length));for(let i=0;i<s.length;i++)e[i]=s.charCodeAt(i);return e.buffer},Rf=function(s){return s.on=s.addEventListener,s.off=s.removeEventListener,s},JC=function(s){try{return URL.createObjectURL(new Blob([s],{type:"application/javascript"}))}catch{const i=new BlobBuilder;return i.append(s),URL.createObjectURL(i.getBlob())}},Vf=function(s){return function(){const e=JC(s),i=Rf(new Worker(e));i.objURL=e;const r=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(e),r.call(this)},i}},Ff=function(s){return`var browserWorkerPolyFill = ${Rf.toString()};
204
+ browserWorkerPolyFill(self);
205
+ `+s},$f=function(s){return s.toString().replace(/^function.+?{/,"").slice(0,-1)},e5=Ff($f(function(){var s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var c={};this.on=function(h,m){c[h]||(c[h]=[]),c[h]=c[h].concat(m)},this.off=function(h,m){var p;return c[h]?(p=c[h].indexOf(m),c[h]=c[h].slice(),c[h].splice(p,1),p>-1):!1},this.trigger=function(h){var m,p,_,y;if(m=c[h],!!m)if(arguments.length===2)for(_=m.length,p=0;p<_;++p)m[p].call(this,arguments[1]);else{for(y=[],p=arguments.length,p=1;p<arguments.length;++p)y.push(arguments[p]);for(_=m.length,p=0;p<_;++p)m[p].apply(this,y)}},this.dispose=function(){c={}}}};e.prototype.pipe=function(c){return this.on("data",function(h){c.push(h)}),this.on("done",function(h){c.flush(h)}),this.on("partialdone",function(h){c.partialFlush(h)}),this.on("endedtimeline",function(h){c.endTimeline(h)}),this.on("reset",function(h){c.reset(h)}),c},e.prototype.push=function(c){this.trigger("data",c)},e.prototype.flush=function(c){this.trigger("done",c)},e.prototype.partialFlush=function(c){this.trigger("partialdone",c)},e.prototype.endTimeline=function(c){this.trigger("endedtimeline",c)},e.prototype.reset=function(c){this.trigger("reset",c)};var i=e,r=Math.pow(2,32),a=function(c){var h=new DataView(c.buffer,c.byteOffset,c.byteLength),m;return h.getBigUint64?(m=h.getBigUint64(0),m<Number.MAX_SAFE_INTEGER?Number(m):m):h.getUint32(0)*r+h.getUint32(4)},o={getUint64:a,MAX_UINT32:r},l=o.MAX_UINT32,u,d,f,g,v,S,C,O,T,w,R,L,D,M,U,Y,P,J,b,x,q,H,k,A,$,K,j,F,G,Z,ee,se,de,fe,pe,je;(function(){var c;if(k={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(c in k)k.hasOwnProperty(c)&&(k[c]=[c.charCodeAt(0),c.charCodeAt(1),c.charCodeAt(2),c.charCodeAt(3)]);A=new Uint8Array([105,115,111,109]),K=new Uint8Array([97,118,99,49]),$=new Uint8Array([0,0,0,1]),j=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),F=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),G={video:j,audio:F},se=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),ee=new Uint8Array([0,0,0,0,0,0,0,0]),de=new Uint8Array([0,0,0,0,0,0,0,0]),fe=de,pe=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),je=de,Z=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),u=function(c){var h=[],m=0,p,_,y;for(p=1;p<arguments.length;p++)h.push(arguments[p]);for(p=h.length;p--;)m+=h[p].byteLength;for(_=new Uint8Array(m+8),y=new DataView(_.buffer,_.byteOffset,_.byteLength),y.setUint32(0,_.byteLength),_.set(c,4),p=0,m=8;p<h.length;p++)_.set(h[p],m),m+=h[p].byteLength;return _},d=function(){return u(k.dinf,u(k.dref,se))},f=function(c){return u(k.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,c.audioobjecttype<<3|c.samplingfrequencyindex>>>1,c.samplingfrequencyindex<<7|c.channelcount<<3,6,1,2]))},g=function(){return u(k.ftyp,A,$,A,K)},Y=function(c){return u(k.hdlr,G[c])},v=function(c){return u(k.mdat,c)},U=function(c){var h=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,c.duration>>>24&255,c.duration>>>16&255,c.duration>>>8&255,c.duration&255,85,196,0,0]);return c.samplerate&&(h[12]=c.samplerate>>>24&255,h[13]=c.samplerate>>>16&255,h[14]=c.samplerate>>>8&255,h[15]=c.samplerate&255),u(k.mdhd,h)},M=function(c){return u(k.mdia,U(c),Y(c.type),C(c))},S=function(c){return u(k.mfhd,new Uint8Array([0,0,0,0,(c&4278190080)>>24,(c&16711680)>>16,(c&65280)>>8,c&255]))},C=function(c){return u(k.minf,c.type==="video"?u(k.vmhd,Z):u(k.smhd,ee),d(),J(c))},O=function(c,h){for(var m=[],p=h.length;p--;)m[p]=x(h[p]);return u.apply(null,[k.moof,S(c)].concat(m))},T=function(c){for(var h=c.length,m=[];h--;)m[h]=L(c[h]);return u.apply(null,[k.moov,R(4294967295)].concat(m).concat(w(c)))},w=function(c){for(var h=c.length,m=[];h--;)m[h]=q(c[h]);return u.apply(null,[k.mvex].concat(m))},R=function(c){var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(c&4278190080)>>24,(c&16711680)>>16,(c&65280)>>8,c&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return u(k.mvhd,h)},P=function(c){var h=c.samples||[],m=new Uint8Array(4+h.length),p,_;for(_=0;_<h.length;_++)p=h[_].flags,m[_+4]=p.dependsOn<<4|p.isDependedOn<<2|p.hasRedundancy;return u(k.sdtp,m)},J=function(c){return u(k.stbl,b(c),u(k.stts,je),u(k.stsc,fe),u(k.stsz,pe),u(k.stco,de))},(function(){var c,h;b=function(m){return u(k.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),m.type==="video"?c(m):h(m))},c=function(m){var p=m.sps||[],_=m.pps||[],y=[],B=[],V,z;for(V=0;V<p.length;V++)y.push((p[V].byteLength&65280)>>>8),y.push(p[V].byteLength&255),y=y.concat(Array.prototype.slice.call(p[V]));for(V=0;V<_.length;V++)B.push((_[V].byteLength&65280)>>>8),B.push(_[V].byteLength&255),B=B.concat(Array.prototype.slice.call(_[V]));if(z=[k.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(m.width&65280)>>8,m.width&255,(m.height&65280)>>8,m.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u(k.avcC,new Uint8Array([1,m.profileIdc,m.profileCompatibility,m.levelIdc,255].concat([p.length],y,[_.length],B))),u(k.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],m.sarRatio){var X=m.sarRatio[0],ie=m.sarRatio[1];z.push(u(k.pasp,new Uint8Array([(X&4278190080)>>24,(X&16711680)>>16,(X&65280)>>8,X&255,(ie&4278190080)>>24,(ie&16711680)>>16,(ie&65280)>>8,ie&255])))}return u.apply(null,z)},h=function(m){return u(k.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(m.channelcount&65280)>>8,m.channelcount&255,(m.samplesize&65280)>>8,m.samplesize&255,0,0,0,0,(m.samplerate&65280)>>8,m.samplerate&255,0,0]),f(m))}})(),D=function(c){var h=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(c.id&4278190080)>>24,(c.id&16711680)>>16,(c.id&65280)>>8,c.id&255,0,0,0,0,(c.duration&4278190080)>>24,(c.duration&16711680)>>16,(c.duration&65280)>>8,c.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(c.width&65280)>>8,c.width&255,0,0,(c.height&65280)>>8,c.height&255,0,0]);return u(k.tkhd,h)},x=function(c){var h,m,p,_,y,B,V;return h=u(k.tfhd,new Uint8Array([0,0,0,58,(c.id&4278190080)>>24,(c.id&16711680)>>16,(c.id&65280)>>8,c.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),B=Math.floor(c.baseMediaDecodeTime/l),V=Math.floor(c.baseMediaDecodeTime%l),m=u(k.tfdt,new Uint8Array([1,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,V>>>24&255,V>>>16&255,V>>>8&255,V&255])),y=92,c.type==="audio"?(p=H(c,y),u(k.traf,h,m,p)):(_=P(c),p=H(c,_.length+y),u(k.traf,h,m,p,_))},L=function(c){return c.duration=c.duration||4294967295,u(k.trak,D(c),M(c))},q=function(c){var h=new Uint8Array([0,0,0,0,(c.id&4278190080)>>24,(c.id&16711680)>>16,(c.id&65280)>>8,c.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return c.type!=="video"&&(h[h.length-1]=0),u(k.trex,h)},(function(){var c,h,m;m=function(p,_){var y=0,B=0,V=0,z=0;return p.length&&(p[0].duration!==void 0&&(y=1),p[0].size!==void 0&&(B=2),p[0].flags!==void 0&&(V=4),p[0].compositionTimeOffset!==void 0&&(z=8)),[0,0,y|B|V|z,1,(p.length&4278190080)>>>24,(p.length&16711680)>>>16,(p.length&65280)>>>8,p.length&255,(_&4278190080)>>>24,(_&16711680)>>>16,(_&65280)>>>8,_&255]},h=function(p,_){var y,B,V,z,X,ie;for(z=p.samples||[],_+=20+16*z.length,V=m(z,_),B=new Uint8Array(V.length+z.length*16),B.set(V),y=V.length,ie=0;ie<z.length;ie++)X=z[ie],B[y++]=(X.duration&4278190080)>>>24,B[y++]=(X.duration&16711680)>>>16,B[y++]=(X.duration&65280)>>>8,B[y++]=X.duration&255,B[y++]=(X.size&4278190080)>>>24,B[y++]=(X.size&16711680)>>>16,B[y++]=(X.size&65280)>>>8,B[y++]=X.size&255,B[y++]=X.flags.isLeading<<2|X.flags.dependsOn,B[y++]=X.flags.isDependedOn<<6|X.flags.hasRedundancy<<4|X.flags.paddingValue<<1|X.flags.isNonSyncSample,B[y++]=X.flags.degradationPriority&61440,B[y++]=X.flags.degradationPriority&15,B[y++]=(X.compositionTimeOffset&4278190080)>>>24,B[y++]=(X.compositionTimeOffset&16711680)>>>16,B[y++]=(X.compositionTimeOffset&65280)>>>8,B[y++]=X.compositionTimeOffset&255;return u(k.trun,B)},c=function(p,_){var y,B,V,z,X,ie;for(z=p.samples||[],_+=20+8*z.length,V=m(z,_),y=new Uint8Array(V.length+z.length*8),y.set(V),B=V.length,ie=0;ie<z.length;ie++)X=z[ie],y[B++]=(X.duration&4278190080)>>>24,y[B++]=(X.duration&16711680)>>>16,y[B++]=(X.duration&65280)>>>8,y[B++]=X.duration&255,y[B++]=(X.size&4278190080)>>>24,y[B++]=(X.size&16711680)>>>16,y[B++]=(X.size&65280)>>>8,y[B++]=X.size&255;return u(k.trun,y)},H=function(p,_){return p.type==="audio"?c(p,_):h(p,_)}})();var Be={ftyp:g,mdat:v,moof:O,moov:T,initSegment:function(c){var h=g(),m=T(c),p;return p=new Uint8Array(h.byteLength+m.byteLength),p.set(h),p.set(m,h.byteLength),p}},Le=function(c){var h,m,p=[],_=[];for(_.byteLength=0,_.nalCount=0,_.duration=0,p.byteLength=0,h=0;h<c.length;h++)m=c[h],m.nalUnitType==="access_unit_delimiter_rbsp"?(p.length&&(p.duration=m.dts-p.dts,_.byteLength+=p.byteLength,_.nalCount+=p.length,_.duration+=p.duration,_.push(p)),p=[m],p.byteLength=m.data.byteLength,p.pts=m.pts,p.dts=m.dts):(m.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(p.keyFrame=!0),p.duration=m.dts-p.dts,p.byteLength+=m.data.byteLength,p.push(m));return _.length&&(!p.duration||p.duration<=0)&&(p.duration=_[_.length-1].duration),_.byteLength+=p.byteLength,_.nalCount+=p.length,_.duration+=p.duration,_.push(p),_},Qe=function(c){var h,m,p=[],_=[];for(p.byteLength=0,p.nalCount=0,p.duration=0,p.pts=c[0].pts,p.dts=c[0].dts,_.byteLength=0,_.nalCount=0,_.duration=0,_.pts=c[0].pts,_.dts=c[0].dts,h=0;h<c.length;h++)m=c[h],m.keyFrame?(p.length&&(_.push(p),_.byteLength+=p.byteLength,_.nalCount+=p.nalCount,_.duration+=p.duration),p=[m],p.nalCount=m.length,p.byteLength=m.byteLength,p.pts=m.pts,p.dts=m.dts,p.duration=m.duration):(p.duration+=m.duration,p.nalCount+=m.length,p.byteLength+=m.byteLength,p.push(m));return _.length&&p.duration<=0&&(p.duration=_[_.length-1].duration),_.byteLength+=p.byteLength,_.nalCount+=p.nalCount,_.duration+=p.duration,_.push(p),_},Ue=function(c){var h;return!c[0][0].keyFrame&&c.length>1&&(h=c.shift(),c.byteLength-=h.byteLength,c.nalCount-=h.nalCount,c[0][0].dts=h.dts,c[0][0].pts=h.pts,c[0][0].duration+=h.duration),c},De=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},ye=function(c,h){var m=De();return m.dataOffset=h,m.compositionTimeOffset=c.pts-c.dts,m.duration=c.duration,m.size=4*c.length,m.size+=c.byteLength,c.keyFrame&&(m.flags.dependsOn=2,m.flags.isNonSyncSample=0),m},Ne=function(c,h){var m,p,_,y,B,V=h||0,z=[];for(m=0;m<c.length;m++)for(y=c[m],p=0;p<y.length;p++)B=y[p],_=ye(B,V),V+=_.size,z.push(_);return z},$e=function(c){var h,m,p,_,y,B,V=0,z=c.byteLength,X=c.nalCount,ie=z+4*X,ae=new Uint8Array(ie),ke=new DataView(ae.buffer);for(h=0;h<c.length;h++)for(_=c[h],m=0;m<_.length;m++)for(y=_[m],p=0;p<y.length;p++)B=y[p],ke.setUint32(V,B.data.byteLength),V+=4,ae.set(B.data,V),V+=B.data.byteLength;return ae},Ee=function(c,h){var m,p=h||0,_=[];return m=ye(c,p),_.push(m),_},le=function(c){var h,m,p=0,_=c.byteLength,y=c.length,B=_+4*y,V=new Uint8Array(B),z=new DataView(V.buffer);for(h=0;h<c.length;h++)m=c[h],z.setUint32(p,m.data.byteLength),p+=4,V.set(m.data,p),p+=m.data.byteLength;return V},ce={groupNalsIntoFrames:Le,groupFramesIntoGops:Qe,extendFirstKeyFrame:Ue,generateSampleTable:Ne,concatenateNalData:$e,generateSampleTableForFrame:Ee,concatenateNalDataForFrame:le},me=[33,16,5,32,164,27],Ie=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],he=function(c){for(var h=[];c--;)h.push(0);return h},Ve=function(c){return Object.keys(c).reduce(function(h,m){return h[m]=new Uint8Array(c[m].reduce(function(p,_){return p.concat(_)},[])),h},{})},ze,dt=function(){if(!ze){var c={96e3:[me,[227,64],he(154),[56]],88200:[me,[231],he(170),[56]],64e3:[me,[248,192],he(240),[56]],48e3:[me,[255,192],he(268),[55,148,128],he(54),[112]],44100:[me,[255,192],he(268),[55,163,128],he(84),[112]],32e3:[me,[255,192],he(268),[55,234],he(226),[112]],24e3:[me,[255,192],he(268),[55,255,128],he(268),[111,112],he(126),[224]],16e3:[me,[255,192],he(268),[55,255,128],he(268),[111,255],he(269),[223,108],he(195),[1,192]],12e3:[Ie,he(268),[3,127,248],he(268),[6,255,240],he(268),[13,255,224],he(268),[27,253,128],he(259),[56]],11025:[Ie,he(268),[3,127,248],he(268),[6,255,240],he(268),[13,255,224],he(268),[27,255,192],he(268),[55,175,128],he(108),[112]],8e3:[Ie,he(268),[3,121,16],he(47),[7]]};ze=Ve(c)}return ze},ge=9e4,be,Ce,He,Oe,pt,Rt,Pi;be=function(c){return c*ge},Ce=function(c,h){return c*h},He=function(c){return c/ge},Oe=function(c,h){return c/h},pt=function(c,h){return be(Oe(c,h))},Rt=function(c,h){return Ce(He(c),h)},Pi=function(c,h,m){return He(m?c:c-h)};var Ze={ONE_SECOND_IN_TS:ge,secondsToVideoTs:be,secondsToAudioTs:Ce,videoTsToSeconds:He,audioTsToSeconds:Oe,audioTsToVideoTs:pt,videoTsToAudioTs:Rt,metadataTsToSeconds:Pi},xi=dt,Ht=Ze,Ci=function(c){var h,m,p=0;for(h=0;h<c.length;h++)m=c[h],p+=m.data.byteLength;return p},yt=function(c,h,m,p){var _,y=0,B=0,V=0,z=0,X,ie,ae;if(h.length&&(_=Ht.audioTsToVideoTs(c.baseMediaDecodeTime,c.samplerate),y=Math.ceil(Ht.ONE_SECOND_IN_TS/(c.samplerate/1024)),m&&p&&(B=_-Math.max(m,p),V=Math.floor(B/y),z=V*y),!(V<1||z>Ht.ONE_SECOND_IN_TS/2))){for(X=xi()[c.samplerate],X||(X=h[0].data),ie=0;ie<V;ie++)ae=h[0],h.splice(0,0,{data:X,dts:ae.dts-y,pts:ae.pts-y});return c.baseMediaDecodeTime-=Math.floor(Ht.videoTsToAudioTs(z,c.samplerate)),z}},ti=function(c,h,m){return h.minSegmentDts>=m?c:(h.minSegmentDts=1/0,c.filter(function(p){return p.dts>=m?(h.minSegmentDts=Math.min(h.minSegmentDts,p.dts),h.minSegmentPts=h.minSegmentDts,!0):!1}))},ui=function(c){var h,m,p=[];for(h=0;h<c.length;h++)m=c[h],p.push({size:m.data.byteLength,duration:1024});return p},zt=function(c){var h,m,p=0,_=new Uint8Array(Ci(c));for(h=0;h<c.length;h++)m=c[h],_.set(m.data,p),p+=m.data.byteLength;return _},Yi={prefixWithSilence:yt,trimAdtsFramesByEarliestDts:ti,generateSampleTable:ui,concatenateFrameData:zt},Vt=Ze.ONE_SECOND_IN_TS,Ei=function(c,h){typeof h.pts=="number"&&(c.timelineStartInfo.pts===void 0&&(c.timelineStartInfo.pts=h.pts),c.minSegmentPts===void 0?c.minSegmentPts=h.pts:c.minSegmentPts=Math.min(c.minSegmentPts,h.pts),c.maxSegmentPts===void 0?c.maxSegmentPts=h.pts:c.maxSegmentPts=Math.max(c.maxSegmentPts,h.pts)),typeof h.dts=="number"&&(c.timelineStartInfo.dts===void 0&&(c.timelineStartInfo.dts=h.dts),c.minSegmentDts===void 0?c.minSegmentDts=h.dts:c.minSegmentDts=Math.min(c.minSegmentDts,h.dts),c.maxSegmentDts===void 0?c.maxSegmentDts=h.dts:c.maxSegmentDts=Math.max(c.maxSegmentDts,h.dts))},E=function(c){delete c.minSegmentDts,delete c.maxSegmentDts,delete c.minSegmentPts,delete c.maxSegmentPts},N=function(c,h){var m,p,_=c.minSegmentDts;return h||(_-=c.timelineStartInfo.dts),m=c.timelineStartInfo.baseMediaDecodeTime,m+=_,m=Math.max(0,m),c.type==="audio"&&(p=c.samplerate/Vt,m*=p,m=Math.floor(m)),m},Q={clearDtsInfo:E,calculateTrackBaseMediaDecodeTime:N,collectDtsInfo:Ei},re=4,Te=128,Me=function(c){for(var h=0,m={payloadType:-1,payloadSize:0},p=0,_=0;h<c.byteLength&&c[h]!==Te;){for(;c[h]===255;)p+=255,h++;for(p+=c[h++];c[h]===255;)_+=255,h++;if(_+=c[h++],!m.payload&&p===re){var y=String.fromCharCode(c[h+3],c[h+4],c[h+5],c[h+6]);if(y==="GA94"){m.payloadType=p,m.payloadSize=_,m.payload=c.subarray(h,h+_);break}else m.payload=void 0}h+=_,p=0,_=0}return m},nt=function(c){return c.payload[0]!==181||(c.payload[1]<<8|c.payload[2])!==49||String.fromCharCode(c.payload[3],c.payload[4],c.payload[5],c.payload[6])!=="GA94"||c.payload[7]!==3?null:c.payload.subarray(8,c.payload.length-1)},St=function(c,h){var m=[],p,_,y,B;if(!(h[0]&64))return m;for(_=h[0]&31,p=0;p<_;p++)y=p*3,B={type:h[y+2]&3,pts:c},h[y+2]&4&&(B.ccData=h[y+3]<<8|h[y+4],m.push(B));return m},Gt=function(c){for(var h=c.byteLength,m=[],p=1,_,y;p<h-2;)c[p]===0&&c[p+1]===0&&c[p+2]===3?(m.push(p+2),p+=2):p++;if(m.length===0)return c;_=h-m.length,y=new Uint8Array(_);var B=0;for(p=0;p<_;B++,p++)B===m[0]&&(B++,m.shift()),y[p]=c[B];return y},Ft={parseSei:Me,parseUserData:nt,parseCaptionPackets:St,discardEmulationPreventionBytes:Gt,USER_DATA_REGISTERED_ITU_T_T35:re},Ot=i,ii=Ft,Je=function(c){c=c||{},Je.prototype.init.call(this),this.parse708captions_=typeof c.parse708captions=="boolean"?c.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Se(0,0),new Se(0,1),new Se(1,0),new Se(1,1)],this.parse708captions_&&(this.cc708Stream_=new We({captionServices:c.captionServices})),this.reset(),this.ccStreams_.forEach(function(h){h.on("data",this.trigger.bind(this,"data")),h.on("partialdone",this.trigger.bind(this,"partialdone")),h.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Je.prototype=new Ot,Je.prototype.push=function(c){var h,m,p;if(c.nalUnitType==="sei_rbsp"&&(h=ii.parseSei(c.escapedRBSP),!!h.payload&&h.payloadType===ii.USER_DATA_REGISTERED_ITU_T_T35&&(m=ii.parseUserData(h),!!m))){if(c.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(c.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}p=ii.parseCaptionPackets(c.pts,m),this.captionPackets_=this.captionPackets_.concat(p),this.latestDts_!==c.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=c.dts}},Je.prototype.flushCCStreams=function(c){this.ccStreams_.forEach(function(h){return c==="flush"?h.flush():h.partialFlush()},this)},Je.prototype.flushStream=function(c){if(!this.captionPackets_.length){this.flushCCStreams(c);return}this.captionPackets_.forEach(function(h,m){h.presortIndex=m}),this.captionPackets_.sort(function(h,m){return h.pts===m.pts?h.presortIndex-m.presortIndex:h.pts-m.pts}),this.captionPackets_.forEach(function(h){h.type<2?this.dispatchCea608Packet(h):this.dispatchCea708Packet(h)},this),this.captionPackets_.length=0,this.flushCCStreams(c)},Je.prototype.flush=function(){return this.flushStream("flush")},Je.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Je.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(c){c.reset()})},Je.prototype.dispatchCea608Packet=function(c){this.setsTextOrXDSActive(c)?this.activeCea608Channel_[c.type]=null:this.setsChannel1Active(c)?this.activeCea608Channel_[c.type]=0:this.setsChannel2Active(c)&&(this.activeCea608Channel_[c.type]=1),this.activeCea608Channel_[c.type]!==null&&this.ccStreams_[(c.type<<1)+this.activeCea608Channel_[c.type]].push(c)},Je.prototype.setsChannel1Active=function(c){return(c.ccData&30720)===4096},Je.prototype.setsChannel2Active=function(c){return(c.ccData&30720)===6144},Je.prototype.setsTextOrXDSActive=function(c){return(c.ccData&28928)===256||(c.ccData&30974)===4138||(c.ccData&30974)===6186},Je.prototype.dispatchCea708Packet=function(c){this.parse708captions_&&this.cc708Stream_.push(c)};var ni={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Wt=function(c){var h=ni[c]||c;return c&4096&&c===h?"":String.fromCharCode(h)},Yt=function(c){return 32<=c&&c<=127||160<=c&&c<=255},kt=function(c){this.windowNum=c,this.reset()};kt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},kt.prototype.getText=function(){return this.rows.join(`
206
+ `)},kt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},kt.prototype.newLine=function(c){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(c),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},kt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},kt.prototype.addText=function(c){this.rows[this.rowIdx]+=c},kt.prototype.backspace=function(){if(!this.isEmpty()){var c=this.rows[this.rowIdx];this.rows[this.rowIdx]=c.substr(0,c.length-1)}};var lt=function(c,h,m){this.serviceNum=c,this.text="",this.currentWindow=new kt(-1),this.windows=[],this.stream=m,typeof h=="string"&&this.createTextDecoder(h)};lt.prototype.init=function(c,h){this.startPts=c;for(var m=0;m<8;m++)this.windows[m]=new kt(m),typeof h=="function"&&(this.windows[m].beforeRowOverflow=h)},lt.prototype.setCurrentWindow=function(c){this.currentWindow=this.windows[c]},lt.prototype.createTextDecoder=function(c){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(c)}catch(h){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+c+" encoding. "+h})}};var We=function(c){c=c||{},We.prototype.init.call(this);var h=this,m=c.captionServices||{},p={},_;Object.keys(m).forEach(y=>{_=m[y],/^SERVICE/.test(y)&&(p[y]=_.encoding)}),this.serviceEncodings=p,this.current708Packet=null,this.services={},this.push=function(y){y.type===3?(h.new708Packet(),h.add708Bytes(y)):(h.current708Packet===null&&h.new708Packet(),h.add708Bytes(y))}};We.prototype=new Ot,We.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},We.prototype.add708Bytes=function(c){var h=c.ccData,m=h>>>8,p=h&255;this.current708Packet.ptsVals.push(c.pts),this.current708Packet.data.push(m),this.current708Packet.data.push(p)},We.prototype.push708Packet=function(){var c=this.current708Packet,h=c.data,m=null,p=null,_=0,y=h[_++];for(c.seq=y>>6,c.sizeCode=y&63;_<h.length;_++)y=h[_++],m=y>>5,p=y&31,m===7&&p>0&&(y=h[_++],m=y),this.pushServiceBlock(m,_,p),p>0&&(_+=p-1)},We.prototype.pushServiceBlock=function(c,h,m){var p,_=h,y=this.current708Packet.data,B=this.services[c];for(B||(B=this.initService(c,_));_<h+m&&_<y.length;_++)p=y[_],Yt(p)?_=this.handleText(_,B):p===24?_=this.multiByteCharacter(_,B):p===16?_=this.extendedCommands(_,B):128<=p&&p<=135?_=this.setCurrentWindow(_,B):152<=p&&p<=159?_=this.defineWindow(_,B):p===136?_=this.clearWindows(_,B):p===140?_=this.deleteWindows(_,B):p===137?_=this.displayWindows(_,B):p===138?_=this.hideWindows(_,B):p===139?_=this.toggleWindows(_,B):p===151?_=this.setWindowAttributes(_,B):p===144?_=this.setPenAttributes(_,B):p===145?_=this.setPenColor(_,B):p===146?_=this.setPenLocation(_,B):p===143?B=this.reset(_,B):p===8?B.currentWindow.backspace():p===12?B.currentWindow.clearText():p===13?B.currentWindow.pendingNewLine=!0:p===14?B.currentWindow.clearText():p===141&&_++},We.prototype.extendedCommands=function(c,h){var m=this.current708Packet.data,p=m[++c];return Yt(p)&&(c=this.handleText(c,h,{isExtended:!0})),c},We.prototype.getPts=function(c){return this.current708Packet.ptsVals[Math.floor(c/2)]},We.prototype.initService=function(c,h){var p="SERVICE"+c,m=this,p,_;return p in this.serviceEncodings&&(_=this.serviceEncodings[p]),this.services[c]=new lt(c,_,m),this.services[c].init(this.getPts(h),function(y){m.flushDisplayed(y,m.services[c])}),this.services[c]},We.prototype.handleText=function(c,h,m){var p=m&&m.isExtended,_=m&&m.isMultiByte,y=this.current708Packet.data,B=p?4096:0,V=y[c],z=y[c+1],X=h.currentWindow,ie,ae;function ke(ue){return ue.map(Pe=>("0"+(Pe&255).toString(16)).slice(-2)).join("")}if(_?(ae=[V,z],c++):ae=[V],h.textDecoder_&&!p)ie=h.textDecoder_.decode(new Uint8Array(ae));else if(_){const ue=ke(ae);ie=String.fromCharCode(parseInt(ue,16))}else ie=Wt(B|V);return X.pendingNewLine&&!X.isEmpty()&&X.newLine(this.getPts(c)),X.pendingNewLine=!1,X.addText(ie),c},We.prototype.multiByteCharacter=function(c,h){var m=this.current708Packet.data,p=m[c+1],_=m[c+2];return Yt(p)&&Yt(_)&&(c=this.handleText(++c,h,{isMultiByte:!0})),c},We.prototype.setCurrentWindow=function(c,h){var m=this.current708Packet.data,p=m[c],_=p&7;return h.setCurrentWindow(_),c},We.prototype.defineWindow=function(c,h){var m=this.current708Packet.data,p=m[c],_=p&7;h.setCurrentWindow(_);var y=h.currentWindow;return p=m[++c],y.visible=(p&32)>>5,y.rowLock=(p&16)>>4,y.columnLock=(p&8)>>3,y.priority=p&7,p=m[++c],y.relativePositioning=(p&128)>>7,y.anchorVertical=p&127,p=m[++c],y.anchorHorizontal=p,p=m[++c],y.anchorPoint=(p&240)>>4,y.rowCount=p&15,p=m[++c],y.columnCount=p&63,p=m[++c],y.windowStyle=(p&56)>>3,y.penStyle=p&7,y.virtualRowCount=y.rowCount+1,c},We.prototype.setWindowAttributes=function(c,h){var m=this.current708Packet.data,p=m[c],_=h.currentWindow.winAttr;return p=m[++c],_.fillOpacity=(p&192)>>6,_.fillRed=(p&48)>>4,_.fillGreen=(p&12)>>2,_.fillBlue=p&3,p=m[++c],_.borderType=(p&192)>>6,_.borderRed=(p&48)>>4,_.borderGreen=(p&12)>>2,_.borderBlue=p&3,p=m[++c],_.borderType+=(p&128)>>5,_.wordWrap=(p&64)>>6,_.printDirection=(p&48)>>4,_.scrollDirection=(p&12)>>2,_.justify=p&3,p=m[++c],_.effectSpeed=(p&240)>>4,_.effectDirection=(p&12)>>2,_.displayEffect=p&3,c},We.prototype.flushDisplayed=function(c,h){for(var m=[],p=0;p<8;p++)h.windows[p].visible&&!h.windows[p].isEmpty()&&m.push(h.windows[p].getText());h.endPts=c,h.text=m.join(`
207
+
208
+ `),this.pushCaption(h),h.startPts=c},We.prototype.pushCaption=function(c){c.text!==""&&(this.trigger("data",{startPts:c.startPts,endPts:c.endPts,text:c.text,stream:"cc708_"+c.serviceNum}),c.text="",c.startPts=c.endPts)},We.prototype.displayWindows=function(c,h){var m=this.current708Packet.data,p=m[++c],_=this.getPts(c);this.flushDisplayed(_,h);for(var y=0;y<8;y++)p&1<<y&&(h.windows[y].visible=1);return c},We.prototype.hideWindows=function(c,h){var m=this.current708Packet.data,p=m[++c],_=this.getPts(c);this.flushDisplayed(_,h);for(var y=0;y<8;y++)p&1<<y&&(h.windows[y].visible=0);return c},We.prototype.toggleWindows=function(c,h){var m=this.current708Packet.data,p=m[++c],_=this.getPts(c);this.flushDisplayed(_,h);for(var y=0;y<8;y++)p&1<<y&&(h.windows[y].visible^=1);return c},We.prototype.clearWindows=function(c,h){var m=this.current708Packet.data,p=m[++c],_=this.getPts(c);this.flushDisplayed(_,h);for(var y=0;y<8;y++)p&1<<y&&h.windows[y].clearText();return c},We.prototype.deleteWindows=function(c,h){var m=this.current708Packet.data,p=m[++c],_=this.getPts(c);this.flushDisplayed(_,h);for(var y=0;y<8;y++)p&1<<y&&h.windows[y].reset();return c},We.prototype.setPenAttributes=function(c,h){var m=this.current708Packet.data,p=m[c],_=h.currentWindow.penAttr;return p=m[++c],_.textTag=(p&240)>>4,_.offset=(p&12)>>2,_.penSize=p&3,p=m[++c],_.italics=(p&128)>>7,_.underline=(p&64)>>6,_.edgeType=(p&56)>>3,_.fontStyle=p&7,c},We.prototype.setPenColor=function(c,h){var m=this.current708Packet.data,p=m[c],_=h.currentWindow.penColor;return p=m[++c],_.fgOpacity=(p&192)>>6,_.fgRed=(p&48)>>4,_.fgGreen=(p&12)>>2,_.fgBlue=p&3,p=m[++c],_.bgOpacity=(p&192)>>6,_.bgRed=(p&48)>>4,_.bgGreen=(p&12)>>2,_.bgBlue=p&3,p=m[++c],_.edgeRed=(p&48)>>4,_.edgeGreen=(p&12)>>2,_.edgeBlue=p&3,c},We.prototype.setPenLocation=function(c,h){var m=this.current708Packet.data,p=m[c],_=h.currentWindow.penLoc;return h.currentWindow.pendingNewLine=!0,p=m[++c],_.row=p&15,p=m[++c],_.column=p&63,c},We.prototype.reset=function(c,h){var m=this.getPts(c);return this.flushDisplayed(m,h),this.initService(h.serviceNum,c)};var Si={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Mi=function(c){return c===null?"":(c=Si[c]||c,String.fromCharCode(c))},bn=14,ps=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Xi=function(){for(var c=[],h=bn+1;h--;)c.push({text:"",indent:0,offset:0});return c},Se=function(c,h){Se.prototype.init.call(this),this.field_=c||0,this.dataChannel_=h||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(m){var p,_,y,B,V;if(p=m.ccData&32639,p===this.lastControlCode_){this.lastControlCode_=null;return}if((p&61440)===4096?this.lastControlCode_=p:p!==this.PADDING_&&(this.lastControlCode_=null),y=p>>>8,B=p&255,p!==this.PADDING_)if(p===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(p===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(m.pts),this.flushDisplayed(m.pts),_=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=_,this.startPts_=m.pts;else if(p===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(m.pts);else if(p===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(m.pts);else if(p===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(m.pts);else if(p===this.CARRIAGE_RETURN_)this.clearFormatting(m.pts),this.flushDisplayed(m.pts),this.shiftRowsUp_(),this.startPts_=m.pts;else if(p===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(p===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(m.pts),this.displayed_=Xi();else if(p===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Xi();else if(p===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(m.pts),this.displayed_=Xi()),this.mode_="paintOn",this.startPts_=m.pts;else if(this.isSpecialCharacter(y,B))y=(y&3)<<8,V=Mi(y|B),this[this.mode_](m.pts,V),this.column_++;else if(this.isExtCharacter(y,B))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),y=(y&3)<<8,V=Mi(y|B),this[this.mode_](m.pts,V),this.column_++;else if(this.isMidRowCode(y,B))this.clearFormatting(m.pts),this[this.mode_](m.pts," "),this.column_++,(B&14)===14&&this.addFormatting(m.pts,["i"]),(B&1)===1&&this.addFormatting(m.pts,["u"]);else if(this.isOffsetControlCode(y,B)){const X=B&3;this.nonDisplayed_[this.row_].offset=X,this.column_+=X}else if(this.isPAC(y,B)){var z=ps.indexOf(p&7968);if(this.mode_==="rollUp"&&(z-this.rollUpRows_+1<0&&(z=this.rollUpRows_-1),this.setRollUp(m.pts,z)),z!==this.row_&&z>=0&&z<=14&&(this.clearFormatting(m.pts),this.row_=z),B&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(m.pts,["u"]),(p&16)===16){const X=(p&14)>>1;this.column_=X*4,this.nonDisplayed_[this.row_].indent+=X}this.isColorPAC(B)&&(B&14)===14&&this.addFormatting(m.pts,["i"])}else this.isNormalChar(y)&&(B===0&&(B=null),V=Mi(y),V+=Mi(B),this[this.mode_](m.pts,V),this.column_+=V.length)}};Se.prototype=new Ot,Se.prototype.flushDisplayed=function(c){const h=p=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+p+"."})},m=[];this.displayed_.forEach((p,_)=>{if(p&&p.text&&p.text.length){try{p.text=p.text.trim()}catch{h(_)}p.text.length&&m.push({text:p.text,line:_+1,position:10+Math.min(70,p.indent*10)+p.offset*2.5})}else p==null&&h(_)}),m.length&&this.trigger("data",{startPts:this.startPts_,endPts:c,content:m,stream:this.name_})},Se.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Xi(),this.nonDisplayed_=Xi(),this.lastControlCode_=null,this.column_=0,this.row_=bn,this.rollUpRows_=2,this.formatting_=[]},Se.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Se.prototype.isSpecialCharacter=function(c,h){return c===this.EXT_&&h>=48&&h<=63},Se.prototype.isExtCharacter=function(c,h){return(c===this.EXT_+1||c===this.EXT_+2)&&h>=32&&h<=63},Se.prototype.isMidRowCode=function(c,h){return c===this.EXT_&&h>=32&&h<=47},Se.prototype.isOffsetControlCode=function(c,h){return c===this.OFFSET_&&h>=33&&h<=35},Se.prototype.isPAC=function(c,h){return c>=this.BASE_&&c<this.BASE_+8&&h>=64&&h<=127},Se.prototype.isColorPAC=function(c){return c>=64&&c<=79||c>=96&&c<=127},Se.prototype.isNormalChar=function(c){return c>=32&&c<=127},Se.prototype.setRollUp=function(c,h){if(this.mode_!=="rollUp"&&(this.row_=bn,this.mode_="rollUp",this.flushDisplayed(c),this.nonDisplayed_=Xi(),this.displayed_=Xi()),h!==void 0&&h!==this.row_)for(var m=0;m<this.rollUpRows_;m++)this.displayed_[h-m]=this.displayed_[this.row_-m],this.displayed_[this.row_-m]={text:"",indent:0,offset:0};h===void 0&&(h=this.row_),this.topRow_=h-this.rollUpRows_+1},Se.prototype.addFormatting=function(c,h){this.formatting_=this.formatting_.concat(h);var m=h.reduce(function(p,_){return p+"<"+_+">"},"");this[this.mode_](c,m)},Se.prototype.clearFormatting=function(c){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(m,p){return m+"</"+p+">"},"");this.formatting_=[],this[this.mode_](c,h)}},Se.prototype.popOn=function(c,h){var m=this.nonDisplayed_[this.row_].text;m+=h,this.nonDisplayed_[this.row_].text=m},Se.prototype.rollUp=function(c,h){var m=this.displayed_[this.row_].text;m+=h,this.displayed_[this.row_].text=m},Se.prototype.shiftRowsUp_=function(){var c;for(c=0;c<this.topRow_;c++)this.displayed_[c]={text:"",indent:0,offset:0};for(c=this.row_+1;c<bn+1;c++)this.displayed_[c]={text:"",indent:0,offset:0};for(c=this.topRow_;c<this.row_;c++)this.displayed_[c]=this.displayed_[c+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Se.prototype.paintOn=function(c,h){var m=this.displayed_[this.row_].text;m+=h,this.displayed_[this.row_].text=m};var te={CaptionStream:Je,Cea608Stream:Se,Cea708Stream:We},ve={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},we=i,tt=8589934592,$t=4294967296,wt="shared",Tt=function(c,h){var m=1;for(c>h&&(m=-1);Math.abs(h-c)>$t;)c+=m*tt;return c},ki=function(c){var h,m;ki.prototype.init.call(this),this.type_=c||wt,this.push=function(p){if(p.type==="metadata"){this.trigger("data",p);return}this.type_!==wt&&p.type!==this.type_||(m===void 0&&(m=p.dts),p.dts=Tt(p.dts,m),p.pts=Tt(p.pts,m),h=p.dts,this.trigger("data",p))},this.flush=function(){m=h,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){m=void 0,h=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};ki.prototype=new we;var vt={TimestampRolloverStream:ki,handleRollover:Tt},Er=(c,h,m)=>{if(!c)return-1;for(var p=m;p<c.length;p++)if(c[p]===h)return p;return-1},ms={typedArrayIndexOf:Er},Sr=ms.typedArrayIndexOf,gs={Utf8:3},_u=function(c,h,m){var p,_="";for(p=h;p<m;p++)_+="%"+("00"+c[p].toString(16)).slice(-2);return _},kr=function(c,h,m){return decodeURIComponent(_u(c,h,m))},wr=function(c,h,m){return unescape(_u(c,h,m))},Dr=function(c){return c[0]<<21|c[1]<<14|c[2]<<7|c[3]},Ar={APIC:function(c){var h=1,m,p,_="-->";c.data[0]===gs.Utf8&&(m=Sr(c.data,0,h),!(m<0)&&(c.mimeType=wr(c.data,h,m),h=m+1,c.pictureType=c.data[h],h++,p=Sr(c.data,0,h),!(p<0)&&(c.description=kr(c.data,h,p),h=p+1,c.mimeType===_?c.url=wr(c.data,h,c.data.length):c.pictureData=c.data.subarray(h,c.data.length))))},"T*":function(c){c.data[0]===gs.Utf8&&(c.value=kr(c.data,1,c.data.length).replace(/\0*$/,""),c.values=c.value.split("\0"))},TXXX:function(c){var h;c.data[0]===gs.Utf8&&(h=Sr(c.data,0,1),h!==-1&&(c.description=kr(c.data,1,h),c.value=kr(c.data,h+1,c.data.length).replace(/\0*$/,""),c.data=c.value))},"W*":function(c){c.url=wr(c.data,0,c.data.length).replace(/\0.*$/,"")},WXXX:function(c){var h;c.data[0]===gs.Utf8&&(h=Sr(c.data,0,1),h!==-1&&(c.description=kr(c.data,1,h),c.url=wr(c.data,h+1,c.data.length).replace(/\0.*$/,"")))},PRIV:function(c){var h;for(h=0;h<c.data.length;h++)if(c.data[h]===0){c.owner=wr(c.data,0,h);break}c.privateData=c.data.subarray(h+1),c.data=c.privateData}},fp=function(c){var h,m,p=10,_=0,y=[];if(!(c.length<10||c[0]!==73||c[1]!==68||c[2]!==51)){_=Dr(c.subarray(6,10)),_+=10;var B=c[5]&64;B&&(p+=4,p+=Dr(c.subarray(10,14)),_-=Dr(c.subarray(16,20)));do{if(h=Dr(c.subarray(p+4,p+8)),h<1)break;m=String.fromCharCode(c[p],c[p+1],c[p+2],c[p+3]);var V={id:m,data:c.subarray(p+10,p+h+10)};V.key=V.id,Ar[V.id]?Ar[V.id](V):V.id[0]==="T"?Ar["T*"](V):V.id[0]==="W"&&Ar["W*"](V),y.push(V),p+=10,p+=h}while(p<_);return y}},yu={parseId3Frames:fp,parseSyncSafeInteger:Dr,frameParsers:Ar},pp=i,mp=ve,on=yu,vs;vs=function(c){var h={descriptor:c&&c.descriptor},m=0,p=[],_=0,y;if(vs.prototype.init.call(this),this.dispatchType=mp.METADATA_STREAM_TYPE.toString(16),h.descriptor)for(y=0;y<h.descriptor.length;y++)this.dispatchType+=("00"+h.descriptor[y].toString(16)).slice(-2);this.push=function(B){var V,z,X,ie,ae,ke;if(B.type==="timed-metadata"){if(B.dataAlignmentIndicator&&(_=0,p.length=0),p.length===0&&(B.data.length<10||B.data[0]!==73||B.data[1]!==68||B.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(p.push(B),_+=B.data.byteLength,p.length===1&&(m=on.parseSyncSafeInteger(B.data.subarray(6,10)),m+=10),!(_<m)){for(V={data:new Uint8Array(m),frames:[],pts:p[0].pts,dts:p[0].dts},ae=0;ae<m;)V.data.set(p[0].data.subarray(0,m-ae),ae),ae+=p[0].data.byteLength,_-=p[0].data.byteLength,p.shift();z=10,V.data[5]&64&&(z+=4,z+=on.parseSyncSafeInteger(V.data.subarray(10,14)),m-=on.parseSyncSafeInteger(V.data.subarray(16,20)));do{if(X=on.parseSyncSafeInteger(V.data.subarray(z+4,z+8)),X<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(ke=String.fromCharCode(V.data[z],V.data[z+1],V.data[z+2],V.data[z+3]),ie={id:ke,data:V.data.subarray(z+10,z+X+10)},ie.key=ie.id,on.frameParsers[ie.id]?on.frameParsers[ie.id](ie):ie.id[0]==="T"?on.frameParsers["T*"](ie):ie.id[0]==="W"&&on.frameParsers["W*"](ie),ie.owner==="com.apple.streaming.transportStreamTimestamp"){var ue=ie.data,Pe=(ue[3]&1)<<30|ue[4]<<22|ue[5]<<14|ue[6]<<6|ue[7]>>>2;Pe*=4,Pe+=ue[7]&3,ie.timeStamp=Pe,V.pts===void 0&&V.dts===void 0&&(V.pts=ie.timeStamp,V.dts=ie.timeStamp),this.trigger("timestamp",ie)}V.frames.push(ie),z+=10,z+=X}while(z<m);this.trigger("data",V)}}}},vs.prototype=new pp;var gp=vs,Ga=i,Wa=te,wi=ve,vp=vt.TimestampRolloverStream,_s,Nr,ys,Un=188,Ya=71;_s=function(){var c=new Uint8Array(Un),h=0;_s.prototype.init.call(this),this.push=function(m){var p=0,_=Un,y;for(h?(y=new Uint8Array(m.byteLength+h),y.set(c.subarray(0,h)),y.set(m,h),h=0):y=m;_<y.byteLength;){if(y[p]===Ya&&y[_]===Ya){this.trigger("data",y.subarray(p,_)),p+=Un,_+=Un;continue}p++,_++}p<y.byteLength&&(c.set(y.subarray(p),0),h=y.byteLength-p)},this.flush=function(){h===Un&&c[0]===Ya&&(this.trigger("data",c),h=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){h=0,this.trigger("reset")}},_s.prototype=new Ga,Nr=function(){var c,h,m,p;Nr.prototype.init.call(this),p=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,c=function(_,y){var B=0;y.payloadUnitStartIndicator&&(B+=_[B]+1),y.type==="pat"?h(_.subarray(B),y):m(_.subarray(B),y)},h=function(_,y){y.section_number=_[7],y.last_section_number=_[8],p.pmtPid=(_[10]&31)<<8|_[11],y.pmtPid=p.pmtPid},m=function(_,y){var B,V,z,X;if(_[5]&1){for(p.programMapTable={video:null,audio:null,"timed-metadata":{}},B=(_[1]&15)<<8|_[2],V=3+B-4,z=(_[10]&15)<<8|_[11],X=12+z;X<V;){var ie=_[X],ae=(_[X+1]&31)<<8|_[X+2];ie===wi.H264_STREAM_TYPE&&p.programMapTable.video===null?p.programMapTable.video=ae:ie===wi.ADTS_STREAM_TYPE&&p.programMapTable.audio===null?p.programMapTable.audio=ae:ie===wi.METADATA_STREAM_TYPE&&(p.programMapTable["timed-metadata"][ae]=ie),X+=((_[X+3]&15)<<8|_[X+4])+5}y.programMapTable=p.programMapTable}},this.push=function(_){var y={},B=4;if(y.payloadUnitStartIndicator=!!(_[1]&64),y.pid=_[1]&31,y.pid<<=8,y.pid|=_[2],(_[3]&48)>>>4>1&&(B+=_[B]+1),y.pid===0)y.type="pat",c(_.subarray(B),y),this.trigger("data",y);else if(y.pid===this.pmtPid)for(y.type="pmt",c(_.subarray(B),y),this.trigger("data",y);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([_,B,y]):this.processPes_(_,B,y)},this.processPes_=function(_,y,B){B.pid===this.programMapTable.video?B.streamType=wi.H264_STREAM_TYPE:B.pid===this.programMapTable.audio?B.streamType=wi.ADTS_STREAM_TYPE:B.streamType=this.programMapTable["timed-metadata"][B.pid],B.type="pes",B.data=_.subarray(y),this.trigger("data",B)}},Nr.prototype=new Ga,Nr.STREAM_TYPES={h264:27,adts:15},ys=function(){var c=this,h=!1,m={data:[],size:0},p={data:[],size:0},_={data:[],size:0},y,B=function(z,X){var ie;const ae=z[0]<<16|z[1]<<8|z[2];X.data=new Uint8Array,ae===1&&(X.packetLength=6+(z[4]<<8|z[5]),X.dataAlignmentIndicator=(z[6]&4)!==0,ie=z[7],ie&192&&(X.pts=(z[9]&14)<<27|(z[10]&255)<<20|(z[11]&254)<<12|(z[12]&255)<<5|(z[13]&254)>>>3,X.pts*=4,X.pts+=(z[13]&6)>>>1,X.dts=X.pts,ie&64&&(X.dts=(z[14]&14)<<27|(z[15]&255)<<20|(z[16]&254)<<12|(z[17]&255)<<5|(z[18]&254)>>>3,X.dts*=4,X.dts+=(z[18]&6)>>>1)),X.data=z.subarray(9+z[8]))},V=function(z,X,ie){var ae=new Uint8Array(z.size),ke={type:X},ue=0,Pe=0,Ge=!1,Dt;if(!(!z.data.length||z.size<9)){for(ke.trackId=z.data[0].pid,ue=0;ue<z.data.length;ue++)Dt=z.data[ue],ae.set(Dt.data,Pe),Pe+=Dt.data.byteLength;B(ae,ke),Ge=X==="video"||ke.packetLength<=z.size,(ie||Ge)&&(z.size=0,z.data.length=0),Ge&&c.trigger("data",ke)}};ys.prototype.init.call(this),this.push=function(z){({pat:function(){},pes:function(){var X,ie;switch(z.streamType){case wi.H264_STREAM_TYPE:X=m,ie="video";break;case wi.ADTS_STREAM_TYPE:X=p,ie="audio";break;case wi.METADATA_STREAM_TYPE:X=_,ie="timed-metadata";break;default:return}z.payloadUnitStartIndicator&&V(X,ie,!0),X.data.push(z),X.size+=z.data.byteLength},pmt:function(){var X={type:"metadata",tracks:[]};y=z.programMapTable,y.video!==null&&X.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),y.audio!==null&&X.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),h=!0,c.trigger("data",X)}})[z.type]()},this.reset=function(){m.size=0,m.data.length=0,p.size=0,p.data.length=0,this.trigger("reset")},this.flushStreams_=function(){V(m,"video"),V(p,"audio"),V(_,"timed-metadata")},this.flush=function(){if(!h&&y){var z={type:"metadata",tracks:[]};y.video!==null&&z.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),y.audio!==null&&z.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),c.trigger("data",z)}h=!1,this.flushStreams_(),this.trigger("done")}},ys.prototype=new Ga;var Tu={PAT_PID:0,MP2T_PACKET_LENGTH:Un,TransportPacketStream:_s,TransportParseStream:Nr,ElementaryStream:ys,TimestampRolloverStream:vp,CaptionStream:Wa.CaptionStream,Cea608Stream:Wa.Cea608Stream,Cea708Stream:Wa.Cea708Stream,MetadataStream:gp};for(var Xa in wi)wi.hasOwnProperty(Xa)&&(Tu[Xa]=wi[Xa]);var _p=Tu,yp=i,Tp=Ze.ONE_SECOND_IN_TS,Ts,bu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Ts=function(c){var h,m=0;Ts.prototype.init.call(this),this.skipWarn_=function(p,_){this.trigger("log",{level:"warn",message:`adts skiping bytes ${p} to ${_} in frame ${m} outside syncword`})},this.push=function(p){var _=0,y,B,V,z,X;if(c||(m=0),p.type==="audio"){h&&h.length?(V=h,h=new Uint8Array(V.byteLength+p.data.byteLength),h.set(V),h.set(p.data,V.byteLength)):h=p.data;for(var ie;_+7<h.length;){if(h[_]!==255||(h[_+1]&246)!==240){typeof ie!="number"&&(ie=_),_++;continue}if(typeof ie=="number"&&(this.skipWarn_(ie,_),ie=null),B=(~h[_+1]&1)*2,y=(h[_+3]&3)<<11|h[_+4]<<3|(h[_+5]&224)>>5,z=((h[_+6]&3)+1)*1024,X=z*Tp/bu[(h[_+2]&60)>>>2],h.byteLength-_<y)break;this.trigger("data",{pts:p.pts+m*X,dts:p.dts+m*X,sampleCount:z,audioobjecttype:(h[_+2]>>>6&3)+1,channelcount:(h[_+2]&1)<<2|(h[_+3]&192)>>>6,samplerate:bu[(h[_+2]&60)>>>2],samplingfrequencyindex:(h[_+2]&60)>>>2,samplesize:16,data:h.subarray(_+7+B,_+y)}),m++,_+=y}typeof ie=="number"&&(this.skipWarn_(ie,_),ie=null),h=h.subarray(_)}},this.flush=function(){m=0,this.trigger("done")},this.reset=function(){h=void 0,this.trigger("reset")},this.endTimeline=function(){h=void 0,this.trigger("endedtimeline")}},Ts.prototype=new yp;var bp=Ts,xu;xu=function(c){var h=c.byteLength,m=0,p=0;this.length=function(){return 8*h},this.bitsAvailable=function(){return 8*h+p},this.loadWord=function(){var _=c.byteLength-h,y=new Uint8Array(4),B=Math.min(4,h);if(B===0)throw new Error("no bytes available");y.set(c.subarray(_,_+B)),m=new DataView(y.buffer).getUint32(0),p=B*8,h-=B},this.skipBits=function(_){var y;p>_?(m<<=_,p-=_):(_-=p,y=Math.floor(_/8),_-=y*8,h-=y,this.loadWord(),m<<=_,p-=_)},this.readBits=function(_){var y=Math.min(p,_),B=m>>>32-y;return p-=y,p>0?m<<=y:h>0&&this.loadWord(),y=_-y,y>0?B<<y|this.readBits(y):B},this.skipLeadingZeros=function(){var _;for(_=0;_<p;++_)if((m&2147483648>>>_)!==0)return m<<=_,p-=_,_;return this.loadWord(),_+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var _=this.skipLeadingZeros();return this.readBits(_+1)-1},this.readExpGolomb=function(){var _=this.readUnsignedExpGolomb();return 1&_?1+_>>>1:-1*(_>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var xp=xu,Cu=i,Cp=xp,bs,xs,Eu;xs=function(){var c=0,h,m;xs.prototype.init.call(this),this.push=function(p){var _;m?(_=new Uint8Array(m.byteLength+p.data.byteLength),_.set(m),_.set(p.data,m.byteLength),m=_):m=p.data;for(var y=m.byteLength;c<y-3;c++)if(m[c+2]===1){h=c+5;break}for(;h<y;)switch(m[h]){case 0:if(m[h-1]!==0){h+=2;break}else if(m[h-2]!==0){h++;break}c+3!==h-2&&this.trigger("data",m.subarray(c+3,h-2));do h++;while(m[h]!==1&&h<y);c=h-2,h+=3;break;case 1:if(m[h-1]!==0||m[h-2]!==0){h+=3;break}this.trigger("data",m.subarray(c+3,h-2)),c=h-2,h+=3;break;default:h+=3;break}m=m.subarray(c),h-=c,c=0},this.reset=function(){m=null,c=0,this.trigger("reset")},this.flush=function(){m&&m.byteLength>3&&this.trigger("data",m.subarray(c+3)),m=null,c=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},xs.prototype=new Cu,Eu={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},bs=function(){var c=new xs,h,m,p,_,y,B,V;bs.prototype.init.call(this),h=this,this.push=function(z){z.type==="video"&&(m=z.trackId,p=z.pts,_=z.dts,c.push(z))},c.on("data",function(z){var X={trackId:m,pts:p,dts:_,data:z,nalUnitTypeCode:z[0]&31};switch(X.nalUnitTypeCode){case 5:X.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:X.nalUnitType="sei_rbsp",X.escapedRBSP=y(z.subarray(1));break;case 7:X.nalUnitType="seq_parameter_set_rbsp",X.escapedRBSP=y(z.subarray(1)),X.config=B(X.escapedRBSP);break;case 8:X.nalUnitType="pic_parameter_set_rbsp";break;case 9:X.nalUnitType="access_unit_delimiter_rbsp";break}h.trigger("data",X)}),c.on("done",function(){h.trigger("done")}),c.on("partialdone",function(){h.trigger("partialdone")}),c.on("reset",function(){h.trigger("reset")}),c.on("endedtimeline",function(){h.trigger("endedtimeline")}),this.flush=function(){c.flush()},this.partialFlush=function(){c.partialFlush()},this.reset=function(){c.reset()},this.endTimeline=function(){c.endTimeline()},V=function(z,X){var ie=8,ae=8,ke,ue;for(ke=0;ke<z;ke++)ae!==0&&(ue=X.readExpGolomb(),ae=(ie+ue+256)%256),ie=ae===0?ie:ae},y=function(z){for(var X=z.byteLength,ie=[],ae=1,ke,ue;ae<X-2;)z[ae]===0&&z[ae+1]===0&&z[ae+2]===3?(ie.push(ae+2),ae+=2):ae++;if(ie.length===0)return z;ke=X-ie.length,ue=new Uint8Array(ke);var Pe=0;for(ae=0;ae<ke;Pe++,ae++)Pe===ie[0]&&(Pe++,ie.shift()),ue[ae]=z[Pe];return ue},B=function(z){var X=0,ie=0,ae=0,ke=0,ue,Pe,Ge,Dt,ci,un,Rr,Vr,Fr,$r,Ls,ct=[1,1],Ur,Ai;if(ue=new Cp(z),Pe=ue.readUnsignedByte(),Dt=ue.readUnsignedByte(),Ge=ue.readUnsignedByte(),ue.skipUnsignedExpGolomb(),Eu[Pe]&&(ci=ue.readUnsignedExpGolomb(),ci===3&&ue.skipBits(1),ue.skipUnsignedExpGolomb(),ue.skipUnsignedExpGolomb(),ue.skipBits(1),ue.readBoolean()))for(Ls=ci!==3?8:12,Ai=0;Ai<Ls;Ai++)ue.readBoolean()&&(Ai<6?V(16,ue):V(64,ue));if(ue.skipUnsignedExpGolomb(),un=ue.readUnsignedExpGolomb(),un===0)ue.readUnsignedExpGolomb();else if(un===1)for(ue.skipBits(1),ue.skipExpGolomb(),ue.skipExpGolomb(),Rr=ue.readUnsignedExpGolomb(),Ai=0;Ai<Rr;Ai++)ue.skipExpGolomb();if(ue.skipUnsignedExpGolomb(),ue.skipBits(1),Vr=ue.readUnsignedExpGolomb(),Fr=ue.readUnsignedExpGolomb(),$r=ue.readBits(1),$r===0&&ue.skipBits(1),ue.skipBits(1),ue.readBoolean()&&(X=ue.readUnsignedExpGolomb(),ie=ue.readUnsignedExpGolomb(),ae=ue.readUnsignedExpGolomb(),ke=ue.readUnsignedExpGolomb()),ue.readBoolean()&&ue.readBoolean()){switch(Ur=ue.readUnsignedByte(),Ur){case 1:ct=[1,1];break;case 2:ct=[12,11];break;case 3:ct=[10,11];break;case 4:ct=[16,11];break;case 5:ct=[40,33];break;case 6:ct=[24,11];break;case 7:ct=[20,11];break;case 8:ct=[32,11];break;case 9:ct=[80,33];break;case 10:ct=[18,11];break;case 11:ct=[15,11];break;case 12:ct=[64,33];break;case 13:ct=[160,99];break;case 14:ct=[4,3];break;case 15:ct=[3,2];break;case 16:ct=[2,1];break;case 255:{ct=[ue.readUnsignedByte()<<8|ue.readUnsignedByte(),ue.readUnsignedByte()<<8|ue.readUnsignedByte()];break}}ct&&ct[0]/ct[1]}return{profileIdc:Pe,levelIdc:Ge,profileCompatibility:Dt,width:(Vr+1)*16-X*2-ie*2,height:(2-$r)*(Fr+1)*16-ae*2-ke*2,sarRatio:ct}}},bs.prototype=new Cu;var Ep={H264Stream:bs},Sp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Su=function(c,h){var m=c[h+6]<<21|c[h+7]<<14|c[h+8]<<7|c[h+9],p=c[h+5],_=(p&16)>>4;return m=m>=0?m:0,_?m+20:m+10},ku=function(c,h){return c.length-h<10||c[h]!==73||c[h+1]!==68||c[h+2]!==51?h:(h+=Su(c,h),ku(c,h))},kp=function(c){var h=ku(c,0);return c.length>=h+2&&(c[h]&255)===255&&(c[h+1]&240)===240&&(c[h+1]&22)===16},wu=function(c){return c[0]<<21|c[1]<<14|c[2]<<7|c[3]},wp=function(c,h,m){var p,_="";for(p=h;p<m;p++)_+="%"+("00"+c[p].toString(16)).slice(-2);return _},Dp=function(c,h,m){return unescape(wp(c,h,m))},Ap=function(c,h){var m=(c[h+5]&224)>>5,p=c[h+4]<<3,_=c[h+3]&6144;return _|p|m},Np=function(c,h){return c[h]===73&&c[h+1]===68&&c[h+2]===51?"timed-metadata":c[h]&!0&&(c[h+1]&240)===240?"audio":null},Ip=function(c){for(var h=0;h+5<c.length;){if(c[h]!==255||(c[h+1]&246)!==240){h++;continue}return Sp[(c[h+2]&60)>>>2]}return null},Op=function(c){var h,m,p,_;h=10,c[5]&64&&(h+=4,h+=wu(c.subarray(10,14)));do{if(m=wu(c.subarray(h+4,h+8)),m<1)return null;if(_=String.fromCharCode(c[h],c[h+1],c[h+2],c[h+3]),_==="PRIV"){p=c.subarray(h+10,h+m+10);for(var y=0;y<p.byteLength;y++)if(p[y]===0){var B=Dp(p,0,y);if(B==="com.apple.streaming.transportStreamTimestamp"){var V=p.subarray(y+1),z=(V[3]&1)<<30|V[4]<<22|V[5]<<14|V[6]<<6|V[7]>>>2;return z*=4,z+=V[7]&3,z}break}}h+=10,h+=m}while(h<c.byteLength);return null},Ka={isLikelyAacData:kp,parseId3TagSize:Su,parseAdtsSize:Ap,parseType:Np,parseSampleRate:Ip,parseAacTimestamp:Op},Bp=i,Du=Ka,Cs;Cs=function(){var c=new Uint8Array,h=0;Cs.prototype.init.call(this),this.setTimestamp=function(m){h=m},this.push=function(m){var p=0,_=0,y,B,V,z;for(c.length?(z=c.length,c=new Uint8Array(m.byteLength+z),c.set(c.subarray(0,z)),c.set(m,z)):c=m;c.length-_>=3;){if(c[_]===73&&c[_+1]===68&&c[_+2]===51){if(c.length-_<10||(p=Du.parseId3TagSize(c,_),_+p>c.length))break;B={type:"timed-metadata",data:c.subarray(_,_+p)},this.trigger("data",B),_+=p;continue}else if((c[_]&255)===255&&(c[_+1]&240)===240){if(c.length-_<7||(p=Du.parseAdtsSize(c,_),_+p>c.length))break;V={type:"audio",data:c.subarray(_,_+p),pts:h,dts:h},this.trigger("data",V),_+=p;continue}_++}y=c.length-_,y>0?c=c.subarray(_):c=new Uint8Array},this.reset=function(){c=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){c=new Uint8Array,this.trigger("endedtimeline")}},Cs.prototype=new Bp;var Lp=Cs,Pp=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Mp=Pp,Rp=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Vp=Rp,Es=i,Ir=Be,Or=ce,Ss=Yi,Di=Q,Ki=_p,ks=Ze,Au=bp,Fp=Ep.H264Stream,$p=Lp,Up=Ka.isLikelyAacData,qp=Ze.ONE_SECOND_IN_TS,Nu=Mp,Iu=Vp,ws,Br,Ds,xn,jp=function(c,h){h.stream=c,this.trigger("log",h)},Ou=function(c,h){for(var m=Object.keys(h),p=0;p<m.length;p++){var _=m[p];_==="headOfPipeline"||!h[_].on||h[_].on("log",jp.bind(c,_))}},Bu=function(c,h){var m;if(c.length!==h.length)return!1;for(m=0;m<c.length;m++)if(c[m]!==h[m])return!1;return!0},Lu=function(c,h,m,p,_,y){var B=m-h,V=p-h,z=_-m;return{start:{dts:c,pts:c+B},end:{dts:c+V,pts:c+z},prependedContentDuration:y,baseMediaDecodeTime:c}};Br=function(c,h){var m=[],p,_=0,y=0,B=1/0;h=h||{},p=h.firstSequenceNumber||0,Br.prototype.init.call(this),this.push=function(V){Di.collectDtsInfo(c,V),c&&Nu.forEach(function(z){c[z]=V[z]}),m.push(V)},this.setEarliestDts=function(V){_=V},this.setVideoBaseMediaDecodeTime=function(V){B=V},this.setAudioAppendStart=function(V){y=V},this.flush=function(){var V,z,X,ie,ae,ke,ue;if(m.length===0){this.trigger("done","AudioSegmentStream");return}V=Ss.trimAdtsFramesByEarliestDts(m,c,_),c.baseMediaDecodeTime=Di.calculateTrackBaseMediaDecodeTime(c,h.keepOriginalTimestamps),ue=Ss.prefixWithSilence(c,V,y,B),c.samples=Ss.generateSampleTable(V),X=Ir.mdat(Ss.concatenateFrameData(V)),m=[],z=Ir.moof(p,[c]),ie=new Uint8Array(z.byteLength+X.byteLength),p++,ie.set(z),ie.set(X,z.byteLength),Di.clearDtsInfo(c),ae=Math.ceil(qp*1024/c.samplerate),V.length&&(ke=V.length*ae,this.trigger("segmentTimingInfo",Lu(ks.audioTsToVideoTs(c.baseMediaDecodeTime,c.samplerate),V[0].dts,V[0].pts,V[0].dts+ke,V[0].pts+ke,ue||0)),this.trigger("timingInfo",{start:V[0].pts,end:V[0].pts+ke})),this.trigger("data",{track:c,boxes:ie}),this.trigger("done","AudioSegmentStream")},this.reset=function(){Di.clearDtsInfo(c),m=[],this.trigger("reset")}},Br.prototype=new Es,ws=function(c,h){var m,p=[],_=[],y,B;h=h||{},m=h.firstSequenceNumber||0,ws.prototype.init.call(this),delete c.minPTS,this.gopCache_=[],this.push=function(V){Di.collectDtsInfo(c,V),V.nalUnitType==="seq_parameter_set_rbsp"&&!y&&(y=V.config,c.sps=[V.data],Iu.forEach(function(z){c[z]=y[z]},this)),V.nalUnitType==="pic_parameter_set_rbsp"&&!B&&(B=V.data,c.pps=[V.data]),p.push(V)},this.flush=function(){for(var V,z,X,ie,ae,ke,ue=0,Pe,Ge;p.length&&p[0].nalUnitType!=="access_unit_delimiter_rbsp";)p.shift();if(p.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(V=Or.groupNalsIntoFrames(p),X=Or.groupFramesIntoGops(V),X[0][0].keyFrame||(z=this.getGopForFusion_(p[0],c),z?(ue=z.duration,X.unshift(z),X.byteLength+=z.byteLength,X.nalCount+=z.nalCount,X.pts=z.pts,X.dts=z.dts,X.duration+=z.duration):X=Or.extendFirstKeyFrame(X)),_.length){var Dt;if(h.alignGopsAtEnd?Dt=this.alignGopsAtEnd_(X):Dt=this.alignGopsAtStart_(X),!Dt){this.gopCache_.unshift({gop:X.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),p=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}Di.clearDtsInfo(c),X=Dt}Di.collectDtsInfo(c,X),c.samples=Or.generateSampleTable(X),ae=Ir.mdat(Or.concatenateNalData(X)),c.baseMediaDecodeTime=Di.calculateTrackBaseMediaDecodeTime(c,h.keepOriginalTimestamps),this.trigger("processedGopsInfo",X.map(function(ci){return{pts:ci.pts,dts:ci.dts,byteLength:ci.byteLength}})),Pe=X[0],Ge=X[X.length-1],this.trigger("segmentTimingInfo",Lu(c.baseMediaDecodeTime,Pe.dts,Pe.pts,Ge.dts+Ge.duration,Ge.pts+Ge.duration,ue)),this.trigger("timingInfo",{start:X[0].pts,end:X[X.length-1].pts+X[X.length-1].duration}),this.gopCache_.unshift({gop:X.pop(),pps:c.pps,sps:c.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),p=[],this.trigger("baseMediaDecodeTime",c.baseMediaDecodeTime),this.trigger("timelineStartInfo",c.timelineStartInfo),ie=Ir.moof(m,[c]),ke=new Uint8Array(ie.byteLength+ae.byteLength),m++,ke.set(ie),ke.set(ae,ie.byteLength),this.trigger("data",{track:c,boxes:ke}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),p=[],this.gopCache_.length=0,_.length=0,this.trigger("reset")},this.resetStream_=function(){Di.clearDtsInfo(c),y=void 0,B=void 0},this.getGopForFusion_=function(V){var z=45e3,X=1/0,ie,ae,ke,ue,Pe;for(Pe=0;Pe<this.gopCache_.length;Pe++)ue=this.gopCache_[Pe],ke=ue.gop,!(!(c.pps&&Bu(c.pps[0],ue.pps[0]))||!(c.sps&&Bu(c.sps[0],ue.sps[0])))&&(ke.dts<c.timelineStartInfo.dts||(ie=V.dts-ke.dts-ke.duration,ie>=-1e4&&ie<=z&&(!ae||X>ie)&&(ae=ue,X=ie)));return ae?ae.gop:null},this.alignGopsAtStart_=function(V){var z,X,ie,ae,ke,ue,Pe,Ge;for(ke=V.byteLength,ue=V.nalCount,Pe=V.duration,z=X=0;z<_.length&&X<V.length&&(ie=_[z],ae=V[X],ie.pts!==ae.pts);){if(ae.pts>ie.pts){z++;continue}X++,ke-=ae.byteLength,ue-=ae.nalCount,Pe-=ae.duration}return X===0?V:X===V.length?null:(Ge=V.slice(X),Ge.byteLength=ke,Ge.duration=Pe,Ge.nalCount=ue,Ge.pts=Ge[0].pts,Ge.dts=Ge[0].dts,Ge)},this.alignGopsAtEnd_=function(V){var z,X,ie,ae,ke,ue;for(z=_.length-1,X=V.length-1,ke=null,ue=!1;z>=0&&X>=0;){if(ie=_[z],ae=V[X],ie.pts===ae.pts){ue=!0;break}if(ie.pts>ae.pts){z--;continue}z===_.length-1&&(ke=X),X--}if(!ue&&ke===null)return null;var Pe;if(ue?Pe=X:Pe=ke,Pe===0)return V;var Ge=V.slice(Pe),Dt=Ge.reduce(function(ci,un){return ci.byteLength+=un.byteLength,ci.duration+=un.duration,ci.nalCount+=un.nalCount,ci},{byteLength:0,duration:0,nalCount:0});return Ge.byteLength=Dt.byteLength,Ge.duration=Dt.duration,Ge.nalCount=Dt.nalCount,Ge.pts=Ge[0].pts,Ge.dts=Ge[0].dts,Ge},this.alignGopsWith=function(V){_=V}},ws.prototype=new Es,xn=function(c,h){this.numberOfTracks=0,this.metadataStream=h,c=c||{},typeof c.remux<"u"?this.remuxTracks=!!c.remux:this.remuxTracks=!0,typeof c.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=c.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,xn.prototype.init.call(this),this.push=function(m){if(m.content||m.text)return this.pendingCaptions.push(m);if(m.frames)return this.pendingMetadata.push(m);this.pendingTracks.push(m.track),this.pendingBytes+=m.boxes.byteLength,m.track.type==="video"&&(this.videoTrack=m.track,this.pendingBoxes.push(m.boxes)),m.track.type==="audio"&&(this.audioTrack=m.track,this.pendingBoxes.unshift(m.boxes))}},xn.prototype=new Es,xn.prototype.flush=function(c){var h=0,m={captions:[],captionStreams:{},metadata:[],info:{}},p,_,y,B=0,V;if(this.pendingTracks.length<this.numberOfTracks){if(c!=="VideoSegmentStream"&&c!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(B=this.videoTrack.timelineStartInfo.pts,Iu.forEach(function(z){m.info[z]=this.videoTrack[z]},this)):this.audioTrack&&(B=this.audioTrack.timelineStartInfo.pts,Nu.forEach(function(z){m.info[z]=this.audioTrack[z]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?m.type=this.pendingTracks[0].type:m.type="combined",this.emittedTracks+=this.pendingTracks.length,y=Ir.initSegment(this.pendingTracks),m.initSegment=new Uint8Array(y.byteLength),m.initSegment.set(y),m.data=new Uint8Array(this.pendingBytes),V=0;V<this.pendingBoxes.length;V++)m.data.set(this.pendingBoxes[V],h),h+=this.pendingBoxes[V].byteLength;for(V=0;V<this.pendingCaptions.length;V++)p=this.pendingCaptions[V],p.startTime=ks.metadataTsToSeconds(p.startPts,B,this.keepOriginalTimestamps),p.endTime=ks.metadataTsToSeconds(p.endPts,B,this.keepOriginalTimestamps),m.captionStreams[p.stream]=!0,m.captions.push(p);for(V=0;V<this.pendingMetadata.length;V++)_=this.pendingMetadata[V],_.cueTime=ks.metadataTsToSeconds(_.pts,B,this.keepOriginalTimestamps),m.metadata.push(_);for(m.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",m),V=0;V<m.captions.length;V++)p=m.captions[V],this.trigger("caption",p);for(V=0;V<m.metadata.length;V++)_=m.metadata[V],this.trigger("id3Frame",_)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},xn.prototype.setRemux=function(c){this.remuxTracks=c},Ds=function(c){var h=this,m=!0,p,_;Ds.prototype.init.call(this),c=c||{},this.baseMediaDecodeTime=c.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="aac",y.metadataStream=new Ki.MetadataStream,y.aacStream=new $p,y.audioTimestampRolloverStream=new Ki.TimestampRolloverStream("audio"),y.timedMetadataTimestampRolloverStream=new Ki.TimestampRolloverStream("timed-metadata"),y.adtsStream=new Au,y.coalesceStream=new xn(c,y.metadataStream),y.headOfPipeline=y.aacStream,y.aacStream.pipe(y.audioTimestampRolloverStream).pipe(y.adtsStream),y.aacStream.pipe(y.timedMetadataTimestampRolloverStream).pipe(y.metadataStream).pipe(y.coalesceStream),y.metadataStream.on("timestamp",function(B){y.aacStream.setTimestamp(B.timeStamp)}),y.aacStream.on("data",function(B){B.type!=="timed-metadata"&&B.type!=="audio"||y.audioSegmentStream||(_=_||{timelineStartInfo:{baseMediaDecodeTime:h.baseMediaDecodeTime},codec:"adts",type:"audio"},y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new Br(_,c),y.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream),h.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!p}))}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Ou(this,y)},this.setupTsPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="ts",y.metadataStream=new Ki.MetadataStream,y.packetStream=new Ki.TransportPacketStream,y.parseStream=new Ki.TransportParseStream,y.elementaryStream=new Ki.ElementaryStream,y.timestampRolloverStream=new Ki.TimestampRolloverStream,y.adtsStream=new Au,y.h264Stream=new Fp,y.captionStream=new Ki.CaptionStream(c),y.coalesceStream=new xn(c,y.metadataStream),y.headOfPipeline=y.packetStream,y.packetStream.pipe(y.parseStream).pipe(y.elementaryStream).pipe(y.timestampRolloverStream),y.timestampRolloverStream.pipe(y.h264Stream),y.timestampRolloverStream.pipe(y.adtsStream),y.timestampRolloverStream.pipe(y.metadataStream).pipe(y.coalesceStream),y.h264Stream.pipe(y.captionStream).pipe(y.coalesceStream),y.elementaryStream.on("data",function(B){var V;if(B.type==="metadata"){for(V=B.tracks.length;V--;)!p&&B.tracks[V].type==="video"?(p=B.tracks[V],p.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime):!_&&B.tracks[V].type==="audio"&&(_=B.tracks[V],_.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime);p&&!y.videoSegmentStream&&(y.coalesceStream.numberOfTracks++,y.videoSegmentStream=new ws(p,c),y.videoSegmentStream.on("log",h.getLogTrigger_("videoSegmentStream")),y.videoSegmentStream.on("timelineStartInfo",function(z){_&&!c.keepOriginalTimestamps&&(_.timelineStartInfo=z,y.audioSegmentStream.setEarliestDts(z.dts-h.baseMediaDecodeTime))}),y.videoSegmentStream.on("processedGopsInfo",h.trigger.bind(h,"gopInfo")),y.videoSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"videoSegmentTimingInfo")),y.videoSegmentStream.on("baseMediaDecodeTime",function(z){_&&y.audioSegmentStream.setVideoBaseMediaDecodeTime(z)}),y.videoSegmentStream.on("timingInfo",h.trigger.bind(h,"videoTimingInfo")),y.h264Stream.pipe(y.videoSegmentStream).pipe(y.coalesceStream)),_&&!y.audioSegmentStream&&(y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new Br(_,c),y.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),y.audioSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"audioSegmentTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream)),h.trigger("trackinfo",{hasAudio:!!_,hasVideo:!!p})}}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("id3Frame",function(B){B.dispatchType=y.metadataStream.dispatchType,h.trigger("id3Frame",B)}),y.coalesceStream.on("caption",this.trigger.bind(this,"caption")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Ou(this,y)},this.setBaseMediaDecodeTime=function(y){var B=this.transmuxPipeline_;c.keepOriginalTimestamps||(this.baseMediaDecodeTime=y),_&&(_.timelineStartInfo.dts=void 0,_.timelineStartInfo.pts=void 0,Di.clearDtsInfo(_),B.audioTimestampRolloverStream&&B.audioTimestampRolloverStream.discontinuity()),p&&(B.videoSegmentStream&&(B.videoSegmentStream.gopCache_=[]),p.timelineStartInfo.dts=void 0,p.timelineStartInfo.pts=void 0,Di.clearDtsInfo(p),B.captionStream.reset()),B.timestampRolloverStream&&B.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(y){_&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(y)},this.setRemux=function(y){var B=this.transmuxPipeline_;c.remux=y,B&&B.coalesceStream&&B.coalesceStream.setRemux(y)},this.alignGopsWith=function(y){p&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(y)},this.getLogTrigger_=function(y){var B=this;return function(V){V.stream=y,B.trigger("log",V)}},this.push=function(y){if(m){var B=Up(y);B&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!B&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),m=!1}this.transmuxPipeline_.headOfPipeline.push(y)},this.flush=function(){m=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},Ds.prototype=new Es;var Hp={Transmuxer:Ds},zp=function(c){return c>>>0},Gp=function(c){return("00"+c.toString(16)).slice(-2)},As={toUnsigned:zp,toHexString:Gp},Wp=function(c){var h="";return h+=String.fromCharCode(c[0]),h+=String.fromCharCode(c[1]),h+=String.fromCharCode(c[2]),h+=String.fromCharCode(c[3]),h},Pu=Wp,Yp=As.toUnsigned,Xp=Pu,Mu=function(c,h){var m=[],p,_,y,B,V;if(!h.length)return null;for(p=0;p<c.byteLength;)_=Yp(c[p]<<24|c[p+1]<<16|c[p+2]<<8|c[p+3]),y=Xp(c.subarray(p+4,p+8)),B=_>1?p+_:c.byteLength,y===h[0]&&(h.length===1?m.push(c.subarray(p+8,B)):(V=Mu(c.subarray(p+8,B),h.slice(1)),V.length&&(m=m.concat(V)))),p=B;return m},Qa=Mu,Kp=As.toUnsigned,Qp=o.getUint64,Zp=function(c){var h={version:c[0],flags:new Uint8Array(c.subarray(1,4))};return h.version===1?h.baseMediaDecodeTime=Qp(c.subarray(4)):h.baseMediaDecodeTime=Kp(c[4]<<24|c[5]<<16|c[6]<<8|c[7]),h},Za=Zp,Jp=function(c){var h=new DataView(c.buffer,c.byteOffset,c.byteLength),m={version:c[0],flags:new Uint8Array(c.subarray(1,4)),trackId:h.getUint32(4)},p=m.flags[2]&1,_=m.flags[2]&2,y=m.flags[2]&8,B=m.flags[2]&16,V=m.flags[2]&32,z=m.flags[0]&65536,X=m.flags[0]&131072,ie;return ie=8,p&&(ie+=4,m.baseDataOffset=h.getUint32(12),ie+=4),_&&(m.sampleDescriptionIndex=h.getUint32(ie),ie+=4),y&&(m.defaultSampleDuration=h.getUint32(ie),ie+=4),B&&(m.defaultSampleSize=h.getUint32(ie),ie+=4),V&&(m.defaultSampleFlags=h.getUint32(ie)),z&&(m.durationIsEmpty=!0),!p&&X&&(m.baseDataOffsetIsMoof=!0),m},Ru=Jp,em=function(c){return{isLeading:(c[0]&12)>>>2,dependsOn:c[0]&3,isDependedOn:(c[1]&192)>>>6,hasRedundancy:(c[1]&48)>>>4,paddingValue:(c[1]&14)>>>1,isNonSyncSample:c[1]&1,degradationPriority:c[2]<<8|c[3]}},tm=em,Vu=tm,im=function(c){var h={version:c[0],flags:new Uint8Array(c.subarray(1,4)),samples:[]},m=new DataView(c.buffer,c.byteOffset,c.byteLength),p=h.flags[2]&1,_=h.flags[2]&4,y=h.flags[1]&1,B=h.flags[1]&2,V=h.flags[1]&4,z=h.flags[1]&8,X=m.getUint32(4),ie=8,ae;for(p&&(h.dataOffset=m.getInt32(ie),ie+=4),_&&X&&(ae={flags:Vu(c.subarray(ie,ie+4))},ie+=4,y&&(ae.duration=m.getUint32(ie),ie+=4),B&&(ae.size=m.getUint32(ie),ie+=4),z&&(h.version===1?ae.compositionTimeOffset=m.getInt32(ie):ae.compositionTimeOffset=m.getUint32(ie),ie+=4),h.samples.push(ae),X--);X--;)ae={},y&&(ae.duration=m.getUint32(ie),ie+=4),B&&(ae.size=m.getUint32(ie),ie+=4),V&&(ae.flags=Vu(c.subarray(ie,ie+4)),ie+=4),z&&(h.version===1?ae.compositionTimeOffset=m.getInt32(ie):ae.compositionTimeOffset=m.getUint32(ie),ie+=4),h.samples.push(ae);return h},Fu=im,$u={tfdt:Za,trun:Fu},Uu={parseTfdt:$u.tfdt,parseTrun:$u.trun},nm=function(c){for(var h=0,m=String.fromCharCode(c[h]),p="";m!=="\0";)p+=m,h++,m=String.fromCharCode(c[h]);return p+=m,p},rm={uint8ToCString:nm},Ns=rm.uint8ToCString,sm=o.getUint64,am=function(c){var h=4,m=c[0],p,_,y,B,V,z,X,ie;if(m===0){p=Ns(c.subarray(h)),h+=p.length,_=Ns(c.subarray(h)),h+=_.length;var ae=new DataView(c.buffer);y=ae.getUint32(h),h+=4,V=ae.getUint32(h),h+=4,z=ae.getUint32(h),h+=4,X=ae.getUint32(h),h+=4}else if(m===1){var ae=new DataView(c.buffer);y=ae.getUint32(h),h+=4,B=sm(c.subarray(h)),h+=8,z=ae.getUint32(h),h+=4,X=ae.getUint32(h),h+=4,p=Ns(c.subarray(h)),h+=p.length,_=Ns(c.subarray(h)),h+=_.length}ie=new Uint8Array(c.subarray(h,c.byteLength));var ke={scheme_id_uri:p,value:_,timescale:y||1,presentation_time:B,presentation_time_delta:V,event_duration:z,id:X,message_data:ie};return lm(m,ke)?ke:void 0},om=function(c,h,m,p){return c||c===0?c/h:p+m/h},lm=function(c,h){var m=h.scheme_id_uri!=="\0",p=c===0&&qu(h.presentation_time_delta)&&m,_=c===1&&qu(h.presentation_time)&&m;return!(c>1)&&p||_},qu=function(c){return c!==void 0||c!==null},um={parseEmsgBox:am,scaleTime:om},Lr;typeof window<"u"?Lr=window:typeof s<"u"?Lr=s:typeof self<"u"?Lr=self:Lr={};var ju=Lr,Is=As.toUnsigned,Pr=As.toHexString,bt=Qa,qn=Pu,Ja=um,cm=Ru,dm=Fu,hm=Za,fm=o.getUint64,Hu,zu,Gu,Wu,Yu,eo,Xu,to=ju,pm=yu.parseId3Frames;Hu=function(c){var h={},m=bt(c,["moov","trak"]);return m.reduce(function(p,_){var y,B,V,z,X;return y=bt(_,["tkhd"])[0],!y||(B=y[0],V=B===0?12:20,z=Is(y[V]<<24|y[V+1]<<16|y[V+2]<<8|y[V+3]),X=bt(_,["mdia","mdhd"])[0],!X)?null:(B=X[0],V=B===0?12:20,p[z]=Is(X[V]<<24|X[V+1]<<16|X[V+2]<<8|X[V+3]),p)},h)},zu=function(c,h){var m;m=bt(h,["moof","traf"]);var p=m.reduce(function(_,y){var B=bt(y,["tfhd"])[0],V=Is(B[4]<<24|B[5]<<16|B[6]<<8|B[7]),z=c[V]||9e4,X=bt(y,["tfdt"])[0],ie=new DataView(X.buffer,X.byteOffset,X.byteLength),ae;X[0]===1?ae=fm(X.subarray(4,12)):ae=ie.getUint32(4);let ke;return typeof ae=="bigint"?ke=ae/to.BigInt(z):typeof ae=="number"&&!isNaN(ae)&&(ke=ae/z),ke<Number.MAX_SAFE_INTEGER&&(ke=Number(ke)),ke<_&&(_=ke),_},1/0);return typeof p=="bigint"||isFinite(p)?p:0},Gu=function(c,h){var m=bt(h,["moof","traf"]),p=0,_=0,y;if(m&&m.length){var B=bt(m[0],["tfhd"])[0],V=bt(m[0],["trun"])[0],z=bt(m[0],["tfdt"])[0];if(B){var X=cm(B);y=X.trackId}if(z){var ie=hm(z);p=ie.baseMediaDecodeTime}if(V){var ae=dm(V);ae.samples&&ae.samples.length&&(_=ae.samples[0].compositionTimeOffset||0)}}var ke=c[y]||9e4;typeof p=="bigint"&&(_=to.BigInt(_),ke=to.BigInt(ke));var ue=(p+_)/ke;return typeof ue=="bigint"&&ue<Number.MAX_SAFE_INTEGER&&(ue=Number(ue)),ue},Wu=function(c){var h=bt(c,["moov","trak"]),m=[];return h.forEach(function(p){var _=bt(p,["mdia","hdlr"]),y=bt(p,["tkhd"]);_.forEach(function(B,V){var z=qn(B.subarray(8,12)),X=y[V],ie,ae,ke;z==="vide"&&(ie=new DataView(X.buffer,X.byteOffset,X.byteLength),ae=ie.getUint8(0),ke=ae===0?ie.getUint32(12):ie.getUint32(20),m.push(ke))})}),m},eo=function(c){var h=c[0],m=h===0?12:20;return Is(c[m]<<24|c[m+1]<<16|c[m+2]<<8|c[m+3])},Yu=function(c){var h=bt(c,["moov","trak"]),m=[];return h.forEach(function(p){var _={},y=bt(p,["tkhd"])[0],B,V;y&&(B=new DataView(y.buffer,y.byteOffset,y.byteLength),V=B.getUint8(0),_.id=V===0?B.getUint32(12):B.getUint32(20));var z=bt(p,["mdia","hdlr"])[0];if(z){var X=qn(z.subarray(8,12));X==="vide"?_.type="video":X==="soun"?_.type="audio":_.type=X}var ie=bt(p,["mdia","minf","stbl","stsd"])[0];if(ie){var ae=ie.subarray(8);_.codec=qn(ae.subarray(4,8));var ke=bt(ae,[_.codec])[0],ue,Pe;ke&&(/^[asm]vc[1-9]$/i.test(_.codec)?(ue=ke.subarray(78),Pe=qn(ue.subarray(4,8)),Pe==="avcC"&&ue.length>11?(_.codec+=".",_.codec+=Pr(ue[9]),_.codec+=Pr(ue[10]),_.codec+=Pr(ue[11])):_.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(_.codec)?(ue=ke.subarray(28),Pe=qn(ue.subarray(4,8)),Pe==="esds"&&ue.length>20&&ue[19]!==0?(_.codec+="."+Pr(ue[19]),_.codec+="."+Pr(ue[20]>>>2&63).replace(/^0/,"")):_.codec="mp4a.40.2"):_.codec=_.codec.toLowerCase())}var Ge=bt(p,["mdia","mdhd"])[0];Ge&&(_.timescale=eo(Ge)),m.push(_)}),m},Xu=function(c,h=0){var m=bt(c,["emsg"]);return m.map(p=>{var _=Ja.parseEmsgBox(new Uint8Array(p)),y=pm(_.message_data);return{cueTime:Ja.scaleTime(_.presentation_time,_.timescale,_.presentation_time_delta,h),duration:Ja.scaleTime(_.event_duration,_.timescale),frames:y}})};var Mr={findBox:bt,parseType:qn,timescale:Hu,startTime:zu,compositionStartTime:Gu,videoTrackIds:Wu,tracks:Yu,getTimescaleFromMediaHeader:eo,getEmsgID3:Xu};const{parseTrun:mm}=Uu,{findBox:Ku}=Mr;var Qu=ju,gm=function(c){var h=Ku(c,["moof","traf"]),m=Ku(c,["mdat"]),p=[];return m.forEach(function(_,y){var B=h[y];p.push({mdat:_,traf:B})}),p},vm=function(c,h,m){var p=h,_=m.defaultSampleDuration||0,y=m.defaultSampleSize||0,B=m.trackId,V=[];return c.forEach(function(z){var X=mm(z),ie=X.samples;ie.forEach(function(ae){ae.duration===void 0&&(ae.duration=_),ae.size===void 0&&(ae.size=y),ae.trackId=B,ae.dts=p,ae.compositionTimeOffset===void 0&&(ae.compositionTimeOffset=0),typeof p=="bigint"?(ae.pts=p+Qu.BigInt(ae.compositionTimeOffset),p+=Qu.BigInt(ae.duration)):(ae.pts=p+ae.compositionTimeOffset,p+=ae.duration)}),V=V.concat(ie)}),V},Zu={getMdatTrafPairs:gm,parseSamples:vm},_m=Ft.discardEmulationPreventionBytes,ym=te.CaptionStream,io=Qa,Tm=Za,bm=Ru,{getMdatTrafPairs:xm,parseSamples:Cm}=Zu,Em=function(c,h){for(var m=c,p=0;p<h.length;p++){var _=h[p];if(m<_.size)return _;m-=_.size}return null},Sm=function(c,h,m){var p=new DataView(c.buffer,c.byteOffset,c.byteLength),_={logs:[],seiNals:[]},y,B,V,z;for(B=0;B+4<c.length;B+=V)if(V=p.getUint32(B),B+=4,!(V<=0))switch(c[B]&31){case 6:var X=c.subarray(B+1,B+1+V),ie=Em(B,h);if(y={nalUnitType:"sei_rbsp",size:V,data:X,escapedRBSP:_m(X),trackId:m},ie)y.pts=ie.pts,y.dts=ie.dts,z=ie;else if(z)y.pts=z.pts,y.dts=z.dts;else{_.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+B+" for trackId "+m+". See mux.js#223."});break}_.seiNals.push(y);break}return _},km=function(c,h){var m={},p=xm(c);return p.forEach(function(_){var y=_.mdat,B=_.traf,V=io(B,["tfhd"]),z=bm(V[0]),X=z.trackId,ie=io(B,["tfdt"]),ae=ie.length>0?Tm(ie[0]).baseMediaDecodeTime:0,ke=io(B,["trun"]),ue,Pe;h===X&&ke.length>0&&(ue=Cm(ke,ae,z),Pe=Sm(y,ue,X),m[X]||(m[X]={seiNals:[],logs:[]}),m[X].seiNals=m[X].seiNals.concat(Pe.seiNals),m[X].logs=m[X].logs.concat(Pe.logs))}),m},wm=function(c,h,m){var p;if(h===null)return null;p=km(c,h);var _=p[h]||{};return{seiNals:_.seiNals,logs:_.logs,timescale:m}},Dm=function(){var c=!1,h,m,p,_,y,B;this.isInitialized=function(){return c},this.init=function(V){h=new ym,c=!0,B=V?V.isPartial:!1,h.on("data",function(z){z.startTime=z.startPts/_,z.endTime=z.endPts/_,y.captions.push(z),y.captionStreams[z.stream]=!0}),h.on("log",function(z){y.logs.push(z)})},this.isNewInit=function(V,z){return V&&V.length===0||z&&typeof z=="object"&&Object.keys(z).length===0?!1:p!==V[0]||_!==z[p]},this.parse=function(V,z,X){var ie;if(this.isInitialized()){if(!z||!X)return null;if(this.isNewInit(z,X))p=z[0],_=X[p];else if(p===null||!_)return m.push(V),null}else return null;for(;m.length>0;){var ae=m.shift();this.parse(ae,z,X)}return ie=wm(V,p,_),ie&&ie.logs&&(y.logs=y.logs.concat(ie.logs)),ie===null||!ie.seiNals?y.logs.length?{logs:y.logs,captions:[],captionStreams:[]}:null:(this.pushNals(ie.seiNals),this.flushStream(),y)},this.pushNals=function(V){if(!this.isInitialized()||!V||V.length===0)return null;V.forEach(function(z){h.push(z)})},this.flushStream=function(){if(!this.isInitialized())return null;B?h.partialFlush():h.flush()},this.clearParsedCaptions=function(){y.captions=[],y.captionStreams={},y.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;h.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){m=[],p=null,_=null,y?this.clearParsedCaptions():y={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Am=Dm;const{parseTfdt:Nm}=Uu,ln=Qa,{getTimescaleFromMediaHeader:Im}=Mr,{parseSamples:Om,getMdatTrafPairs:Bm}=Zu;var Ju=function(){let c=9e4;this.init=function(h){const m=ln(h,["moov","trak","mdia","mdhd"])[0];m&&(c=Im(m))},this.parseSegment=function(h){const m=[],p=Bm(h);let _=0;return p.forEach(function(y){const B=y.mdat,V=y.traf,z=ln(V,["tfdt"])[0],X=ln(V,["tfhd"])[0],ie=ln(V,["trun"]);if(z&&(_=Nm(z).baseMediaDecodeTime),ie.length&&X){const ae=Om(ie,_,X);let ke=0;ae.forEach(function(ue){const Pe="utf-8",Ge=new TextDecoder(Pe),Dt=B.slice(ke,ke+ue.size);if(ln(Dt,["vtte"])[0]){ke+=ue.size;return}ln(Dt,["vttc"]).forEach(function(Rr){const Vr=ln(Rr,["payl"])[0],Fr=ln(Rr,["sttg"])[0],$r=ue.pts/c,Ls=(ue.pts+ue.duration)/c;let ct,Ur;if(Vr)try{ct=Ge.decode(Vr)}catch(Ai){console.error(Ai)}if(Fr)try{Ur=Ge.decode(Fr)}catch(Ai){console.error(Ai)}ue.duration&&ct&&m.push({cueText:ct,start:$r,end:Ls,settings:Ur})}),ke+=ue.size})}}),m}},no=ve,ec=function(c){var h=c[1]&31;return h<<=8,h|=c[2],h},Os=function(c){return!!(c[1]&64)},Bs=function(c){var h=0;return(c[3]&48)>>>4>1&&(h+=c[4]+1),h},Lm=function(c,h){var m=ec(c);return m===0?"pat":m===h?"pmt":h?"pes":null},Pm=function(c){var h=Os(c),m=4+Bs(c);return h&&(m+=c[m]+1),(c[m+10]&31)<<8|c[m+11]},Mm=function(c){var h={},m=Os(c),p=4+Bs(c);if(m&&(p+=c[p]+1),!!(c[p+5]&1)){var _,y,B;_=(c[p+1]&15)<<8|c[p+2],y=3+_-4,B=(c[p+10]&15)<<8|c[p+11];for(var V=12+B;V<y;){var z=p+V;h[(c[z+1]&31)<<8|c[z+2]]=c[z],V+=((c[z+3]&15)<<8|c[z+4])+5}return h}},Rm=function(c,h){var m=ec(c),p=h[m];switch(p){case no.H264_STREAM_TYPE:return"video";case no.ADTS_STREAM_TYPE:return"audio";case no.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Vm=function(c){var h=Os(c);if(!h)return null;var m=4+Bs(c);if(m>=c.byteLength)return null;var p=null,_;return _=c[m+7],_&192&&(p={},p.pts=(c[m+9]&14)<<27|(c[m+10]&255)<<20|(c[m+11]&254)<<12|(c[m+12]&255)<<5|(c[m+13]&254)>>>3,p.pts*=4,p.pts+=(c[m+13]&6)>>>1,p.dts=p.pts,_&64&&(p.dts=(c[m+14]&14)<<27|(c[m+15]&255)<<20|(c[m+16]&254)<<12|(c[m+17]&255)<<5|(c[m+18]&254)>>>3,p.dts*=4,p.dts+=(c[m+18]&6)>>>1)),p},ro=function(c){switch(c){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Fm=function(c){for(var h=4+Bs(c),m=c.subarray(h),p=0,_=0,y=!1,B;_<m.byteLength-3;_++)if(m[_+2]===1){p=_+5;break}for(;p<m.byteLength;)switch(m[p]){case 0:if(m[p-1]!==0){p+=2;break}else if(m[p-2]!==0){p++;break}_+3!==p-2&&(B=ro(m[_+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0));do p++;while(m[p]!==1&&p<m.length);_=p-2,p+=3;break;case 1:if(m[p-1]!==0||m[p-2]!==0){p+=3;break}B=ro(m[_+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0),_=p-2,p+=3;break;default:p+=3;break}return m=m.subarray(_),p-=_,_=0,m&&m.byteLength>3&&(B=ro(m[_+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0)),y},$m={parseType:Lm,parsePat:Pm,parsePmt:Mm,parsePayloadUnitStartIndicator:Os,parsePesType:Rm,parsePesTime:Vm,videoPacketContainsKeyFrame:Fm},tc=ve,jn=vt.handleRollover,at={};at.ts=$m,at.aac=Ka;var Cn=Ze.ONE_SECOND_IN_TS,Xt=188,Ri=71,Um=function(c,h){for(var m=0,p=Xt,_,y;p<c.byteLength;){if(c[m]===Ri&&c[p]===Ri){switch(_=c.subarray(m,p),y=at.ts.parseType(_,h.pid),y){case"pat":h.pid=at.ts.parsePat(_);break;case"pmt":var B=at.ts.parsePmt(_);h.table=h.table||{},Object.keys(B).forEach(function(V){h.table[V]=B[V]});break}m+=Xt,p+=Xt;continue}m++,p++}},ic=function(c,h,m){for(var p=0,_=Xt,y,B,V,z,X,ie=!1;_<=c.byteLength;){if(c[p]===Ri&&(c[_]===Ri||_===c.byteLength)){switch(y=c.subarray(p,_),B=at.ts.parseType(y,h.pid),B){case"pes":V=at.ts.parsePesType(y,h.table),z=at.ts.parsePayloadUnitStartIndicator(y),V==="audio"&&z&&(X=at.ts.parsePesTime(y),X&&(X.type="audio",m.audio.push(X),ie=!0));break}if(ie)break;p+=Xt,_+=Xt;continue}p++,_++}for(_=c.byteLength,p=_-Xt,ie=!1;p>=0;){if(c[p]===Ri&&(c[_]===Ri||_===c.byteLength)){switch(y=c.subarray(p,_),B=at.ts.parseType(y,h.pid),B){case"pes":V=at.ts.parsePesType(y,h.table),z=at.ts.parsePayloadUnitStartIndicator(y),V==="audio"&&z&&(X=at.ts.parsePesTime(y),X&&(X.type="audio",m.audio.push(X),ie=!0));break}if(ie)break;p-=Xt,_-=Xt;continue}p--,_--}},qm=function(c,h,m){for(var p=0,_=Xt,y,B,V,z,X,ie,ae,ke,ue=!1,Pe={data:[],size:0};_<c.byteLength;){if(c[p]===Ri&&c[_]===Ri){switch(y=c.subarray(p,_),B=at.ts.parseType(y,h.pid),B){case"pes":if(V=at.ts.parsePesType(y,h.table),z=at.ts.parsePayloadUnitStartIndicator(y),V==="video"&&(z&&!ue&&(X=at.ts.parsePesTime(y),X&&(X.type="video",m.video.push(X),ue=!0)),!m.firstKeyFrame)){if(z&&Pe.size!==0){for(ie=new Uint8Array(Pe.size),ae=0;Pe.data.length;)ke=Pe.data.shift(),ie.set(ke,ae),ae+=ke.byteLength;if(at.ts.videoPacketContainsKeyFrame(ie)){var Ge=at.ts.parsePesTime(ie);Ge?(m.firstKeyFrame=Ge,m.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Pe.size=0}Pe.data.push(y),Pe.size+=y.byteLength}break}if(ue&&m.firstKeyFrame)break;p+=Xt,_+=Xt;continue}p++,_++}for(_=c.byteLength,p=_-Xt,ue=!1;p>=0;){if(c[p]===Ri&&c[_]===Ri){switch(y=c.subarray(p,_),B=at.ts.parseType(y,h.pid),B){case"pes":V=at.ts.parsePesType(y,h.table),z=at.ts.parsePayloadUnitStartIndicator(y),V==="video"&&z&&(X=at.ts.parsePesTime(y),X&&(X.type="video",m.video.push(X),ue=!0));break}if(ue)break;p-=Xt,_-=Xt;continue}p--,_--}},jm=function(c,h){if(c.audio&&c.audio.length){var m=h;(typeof m>"u"||isNaN(m))&&(m=c.audio[0].dts),c.audio.forEach(function(y){y.dts=jn(y.dts,m),y.pts=jn(y.pts,m),y.dtsTime=y.dts/Cn,y.ptsTime=y.pts/Cn})}if(c.video&&c.video.length){var p=h;if((typeof p>"u"||isNaN(p))&&(p=c.video[0].dts),c.video.forEach(function(y){y.dts=jn(y.dts,p),y.pts=jn(y.pts,p),y.dtsTime=y.dts/Cn,y.ptsTime=y.pts/Cn}),c.firstKeyFrame){var _=c.firstKeyFrame;_.dts=jn(_.dts,p),_.pts=jn(_.pts,p),_.dtsTime=_.dts/Cn,_.ptsTime=_.pts/Cn}}},Hm=function(c){for(var h=!1,m=0,p=null,_=null,y=0,B=0,V;c.length-B>=3;){var z=at.aac.parseType(c,B);switch(z){case"timed-metadata":if(c.length-B<10){h=!0;break}if(y=at.aac.parseId3TagSize(c,B),y>c.length){h=!0;break}_===null&&(V=c.subarray(B,B+y),_=at.aac.parseAacTimestamp(V)),B+=y;break;case"audio":if(c.length-B<7){h=!0;break}if(y=at.aac.parseAdtsSize(c,B),y>c.length){h=!0;break}p===null&&(V=c.subarray(B,B+y),p=at.aac.parseSampleRate(V)),m++,B+=y;break;default:B++;break}if(h)return null}if(p===null||_===null)return null;var X=Cn/p,ie={audio:[{type:"audio",dts:_,pts:_},{type:"audio",dts:_+m*1024*X,pts:_+m*1024*X}]};return ie},zm=function(c){var h={pid:null,table:null},m={};Um(c,h);for(var p in h.table)if(h.table.hasOwnProperty(p)){var _=h.table[p];switch(_){case tc.H264_STREAM_TYPE:m.video=[],qm(c,h,m),m.video.length===0&&delete m.video;break;case tc.ADTS_STREAM_TYPE:m.audio=[],ic(c,h,m),m.audio.length===0&&delete m.audio;break}}return m},Gm=function(c,h){var m=at.aac.isLikelyAacData(c),p;return m?p=Hm(c):p=zm(c),!p||!p.audio&&!p.video?null:(jm(p,h),p)},Wm={inspect:Gm,parseAudioPes_:ic};const Ym=function(c,h){h.on("data",function(m){const p=m.initSegment;m.initSegment={data:p.buffer,byteOffset:p.byteOffset,byteLength:p.byteLength};const _=m.data;m.data=_.buffer,c.postMessage({action:"data",segment:m,byteOffset:_.byteOffset,byteLength:_.byteLength},[m.data])}),h.on("done",function(m){c.postMessage({action:"done"})}),h.on("gopInfo",function(m){c.postMessage({action:"gopInfo",gopInfo:m})}),h.on("videoSegmentTimingInfo",function(m){const p={start:{decode:Ze.videoTsToSeconds(m.start.dts),presentation:Ze.videoTsToSeconds(m.start.pts)},end:{decode:Ze.videoTsToSeconds(m.end.dts),presentation:Ze.videoTsToSeconds(m.end.pts)},baseMediaDecodeTime:Ze.videoTsToSeconds(m.baseMediaDecodeTime)};m.prependedContentDuration&&(p.prependedContentDuration=Ze.videoTsToSeconds(m.prependedContentDuration)),c.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:p})}),h.on("audioSegmentTimingInfo",function(m){const p={start:{decode:Ze.videoTsToSeconds(m.start.dts),presentation:Ze.videoTsToSeconds(m.start.pts)},end:{decode:Ze.videoTsToSeconds(m.end.dts),presentation:Ze.videoTsToSeconds(m.end.pts)},baseMediaDecodeTime:Ze.videoTsToSeconds(m.baseMediaDecodeTime)};m.prependedContentDuration&&(p.prependedContentDuration=Ze.videoTsToSeconds(m.prependedContentDuration)),c.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:p})}),h.on("id3Frame",function(m){c.postMessage({action:"id3Frame",id3Frame:m})}),h.on("caption",function(m){c.postMessage({action:"caption",caption:m})}),h.on("trackinfo",function(m){c.postMessage({action:"trackinfo",trackInfo:m})}),h.on("audioTimingInfo",function(m){c.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Ze.videoTsToSeconds(m.start),end:Ze.videoTsToSeconds(m.end)}})}),h.on("videoTimingInfo",function(m){c.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Ze.videoTsToSeconds(m.start),end:Ze.videoTsToSeconds(m.end)}})}),h.on("log",function(m){c.postMessage({action:"log",log:m})})};class nc{constructor(h,m){this.options=m||{},this.self=h,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Hp.Transmuxer(this.options),Ym(this.self,this.transmuxer)}pushMp4Captions(h){this.captionParser||(this.captionParser=new Am,this.captionParser.init());const m=new Uint8Array(h.data,h.byteOffset,h.byteLength),p=this.captionParser.parse(m,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:p&&p.captions||[],logs:p&&p.logs||[],data:m.buffer},[m.buffer])}initMp4WebVttParser(h){this.webVttParser||(this.webVttParser=new Ju);const m=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.webVttParser.init(m)}getMp4WebVttText(h){this.webVttParser||(this.webVttParser=new Ju);const m=new Uint8Array(h.data,h.byteOffset,h.byteLength),p=this.webVttParser.parseSegment(m);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:p||[],data:m.buffer},[m.buffer])}probeMp4StartTime({timescales:h,data:m}){const p=Mr.startTime(h,m);this.self.postMessage({action:"probeMp4StartTime",startTime:p,data:m},[m.buffer])}probeMp4Tracks({data:h}){const m=Mr.tracks(h);this.self.postMessage({action:"probeMp4Tracks",tracks:m,data:h},[h.buffer])}probeEmsgID3({data:h,offset:m}){const p=Mr.getEmsgID3(h,m);this.self.postMessage({action:"probeEmsgID3",id3Frames:p,emsgData:h},[h.buffer])}probeTs({data:h,baseStartTime:m}){const p=typeof m=="number"&&!isNaN(m)?m*Ze.ONE_SECOND_IN_TS:void 0,_=Wm.inspect(h,p);let y=null;_&&(y={hasVideo:_.video&&_.video.length===2||!1,hasAudio:_.audio&&_.audio.length===2||!1},y.hasVideo&&(y.videoStart=_.video[0].ptsTime),y.hasAudio&&(y.audioStart=_.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:y,data:h},[h.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(h){const m=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(m)}reset(){this.transmuxer.reset()}setTimestampOffset(h){const m=h.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Ze.secondsToVideoTs(m)))}setAudioAppendStart(h){this.transmuxer.setAudioAppendStart(Math.ceil(Ze.secondsToVideoTs(h.appendStart)))}setRemux(h){this.transmuxer.setRemux(h.remux)}flush(h){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(h){this.transmuxer.alignGopsWith(h.gopsToAlignWith.slice())}}self.onmessage=function(c){if(c.data.action==="init"&&c.data.options){this.messageHandlers=new nc(self,c.data.options);return}this.messageHandlers||(this.messageHandlers=new nc(self)),c.data&&c.data.action&&c.data.action!=="init"&&this.messageHandlers[c.data.action]&&this.messageHandlers[c.data.action](c.data)}}));var t5=Vf(e5);const i5=(s,e,i)=>{const{type:r,initSegment:a,captions:o,captionStreams:l,metadata:u,videoFrameDtsTime:d,videoFramePtsTime:f}=s.data.segment;e.buffer.push({captions:o,captionStreams:l,metadata:u});const g=s.data.segment.boxes||{data:s.data.segment.data},v={type:r,data:new Uint8Array(g.data,g.data.byteOffset,g.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};typeof d<"u"&&(v.videoFrameDtsTime=d),typeof f<"u"&&(v.videoFramePtsTime=f),i(v)},n5=({transmuxedData:s,callback:e})=>{s.buffer=[],e(s)},r5=(s,e)=>{e.gopInfo=s.data.gopInfo},Uf=s=>{const{transmuxer:e,bytes:i,audioAppendStart:r,gopsToAlignWith:a,remux:o,onData:l,onTrackInfo:u,onAudioTimingInfo:d,onVideoTimingInfo:f,onVideoSegmentTimingInfo:g,onAudioSegmentTimingInfo:v,onId3:S,onCaptions:C,onDone:O,onEndedTimeline:T,onTransmuxerLog:w,isEndOfTimeline:R,segment:L,triggerSegmentEventFn:D}=s,M={buffer:[]};let U=R;const Y=J=>{e.currentTransmux===s&&(J.data.action==="data"&&i5(J,M,l),J.data.action==="trackinfo"&&u(J.data.trackInfo),J.data.action==="gopInfo"&&r5(J,M),J.data.action==="audioTimingInfo"&&d(J.data.audioTimingInfo),J.data.action==="videoTimingInfo"&&f(J.data.videoTimingInfo),J.data.action==="videoSegmentTimingInfo"&&g(J.data.videoSegmentTimingInfo),J.data.action==="audioSegmentTimingInfo"&&v(J.data.audioSegmentTimingInfo),J.data.action==="id3Frame"&&S([J.data.id3Frame],J.data.id3Frame.dispatchType),J.data.action==="caption"&&C(J.data.caption),J.data.action==="endedtimeline"&&(U=!1,T()),J.data.action==="log"&&w(J.data.log),J.data.type==="transmuxed"&&(U||(e.onmessage=null,n5({transmuxedData:M,callback:O}),qf(e))))},P=()=>{const J={message:"Received an error message from the transmuxer worker",metadata:{errorType:ne.Error.StreamingFailedToTransmuxSegment,segmentInfo:Dn({segment:L})}};O(null,J)};if(e.onmessage=Y,e.onerror=P,r&&e.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(a)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:a}),typeof o<"u"&&e.postMessage({action:"setRemux",remux:o}),i.byteLength){const J=i instanceof ArrayBuffer?i:i.buffer,b=i instanceof ArrayBuffer?0:i.byteOffset;D({type:"segmenttransmuxingstart",segment:L}),e.postMessage({action:"push",data:J,byteOffset:b,byteLength:i.byteLength},[J])}R&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},qf=s=>{s.currentTransmux=null,s.transmuxQueue.length&&(s.currentTransmux=s.transmuxQueue.shift(),typeof s.currentTransmux=="function"?s.currentTransmux():Uf(s.currentTransmux))},Hd=(s,e)=>{s.postMessage({action:e}),qf(s)},jf=(s,e)=>{if(!e.currentTransmux){e.currentTransmux=s,Hd(e,s);return}e.transmuxQueue.push(Hd.bind(null,e,s))},s5=s=>{jf("reset",s)},a5=s=>{jf("endTimeline",s)},Hf=s=>{if(!s.transmuxer.currentTransmux){s.transmuxer.currentTransmux=s,Uf(s);return}s.transmuxer.transmuxQueue.push(s)},o5=s=>{const e=new t5;e.currentTransmux=null,e.transmuxQueue=[];const i=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,i.call(e)),e.postMessage({action:"init",options:s}),e};var Yo={reset:s5,endTimeline:a5,transmux:Hf,createTransmuxer:o5};const nr=function(s){const e=s.transmuxer,i=s.endAction||s.action,r=s.callback,a=xt({},s,{endAction:null,transmuxer:null,callback:null}),o=l=>{l.data.action===i&&(e.removeEventListener("message",o),l.data.data&&(l.data.data=new Uint8Array(l.data.data,s.byteOffset||0,s.byteLength||l.data.data.byteLength),s.data&&(s.data=l.data.data)),r(l.data))};if(e.addEventListener("message",o),s.data){const l=s.data instanceof ArrayBuffer;a.byteOffset=l?0:s.data.byteOffset,a.byteLength=s.data.byteLength;const u=[l?s.data:s.data.buffer];e.postMessage(a,u)}else e.postMessage(a)},Hi={FAILURE:2,TIMEOUT:-101,ABORTED:-102},zf="wvtt",Cl=s=>{s.forEach(e=>{e.abort()})},l5=s=>({bandwidth:s.bandwidth,bytesReceived:s.bytesReceived||0,roundTripTime:s.roundTripTime||0}),u5=s=>{const e=s.target,r={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return r.bytesReceived=s.loaded,r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3),r},gu=(s,e)=>{const{requestType:i}=e,r=Vn({requestType:i,request:e,error:s});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Hi.TIMEOUT,xhr:e,metadata:r}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Hi.ABORTED,xhr:e,metadata:r}:s?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Hi.FAILURE,xhr:e,metadata:r}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:Hi.FAILURE,xhr:e,metadata:r}:null},zd=(s,e,i,r)=>(a,o)=>{const l=o.response,u=gu(a,o);if(u)return i(u,s);if(l.byteLength!==16)return i({status:o.status,message:"Invalid HLS key at URL: "+o.uri,code:Hi.FAILURE,xhr:o},s);const d=new DataView(l),f=new Uint32Array([d.getUint32(0),d.getUint32(4),d.getUint32(8),d.getUint32(12)]);for(let v=0;v<e.length;v++)e[v].bytes=f;const g={uri:o.uri};return r({type:"segmentkeyloadcomplete",segment:s,keyInfo:g}),i(null,s)},c5=(s,e)=>{e===zf&&s.transmuxer.postMessage({action:"initMp4WebVttParser",data:s.map.bytes})},d5=(s,e,i)=>{e===zf&&nr({action:"getMp4WebVttText",data:s.bytes,transmuxer:s.transmuxer,callback:({data:r,mp4VttCues:a})=>{s.bytes=r,i(null,s,{mp4VttCues:a})}})},Gf=(s,e)=>{const i=Fl(s.map.bytes);if(i!=="mp4"){const r=s.map.resolvedUri||s.map.uri,a=i||"unknown";return e({internal:!0,message:`Found unsupported ${a} container for initialization segment at URL: ${r}`,code:Hi.FAILURE,metadata:{mediaType:a}})}nr({action:"probeMp4Tracks",data:s.map.bytes,transmuxer:s.transmuxer,callback:({tracks:r,data:a})=>(s.map.bytes=a,r.forEach(function(o){s.map.tracks=s.map.tracks||{},!s.map.tracks[o.type]&&(s.map.tracks[o.type]=o,typeof o.id=="number"&&o.timescale&&(s.map.timescales=s.map.timescales||{},s.map.timescales[o.id]=o.timescale),o.type==="text"&&c5(s,o.codec))}),e(null))})},h5=({segment:s,finishProcessingFn:e,triggerSegmentEventFn:i})=>(r,a)=>{const o=gu(r,a);if(o)return e(o,s);const l=new Uint8Array(a.response);if(i({type:"segmentloaded",segment:s}),s.map.key)return s.map.encryptedBytes=l,e(null,s);s.map.bytes=l,Gf(s,function(u){if(u)return u.xhr=a,u.status=a.status,e(u,s);e(null,s)})},f5=({segment:s,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:r})=>(a,o)=>{const l=gu(a,o);if(l)return e(l,s);r({type:"segmentloaded",segment:s});const u=i==="arraybuffer"||!o.responseText?o.response:ZC(o.responseText.substring(s.lastReachedChar||0));return s.stats=l5(o),s.key?s.encryptedBytes=new Uint8Array(u):s.bytes=new Uint8Array(u),e(null,s)},p5=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:g,doneFn:v,onTransmuxerLog:S,triggerSegmentEventFn:C})=>{const O=s.map&&s.map.tracks||{},T=!!(O.audio&&O.video);let w=r.bind(null,s,"audio","start");const R=r.bind(null,s,"audio","end");let L=r.bind(null,s,"video","start");const D=r.bind(null,s,"video","end"),M=()=>Hf({bytes:e,transmuxer:s.transmuxer,audioAppendStart:s.audioAppendStart,gopsToAlignWith:s.gopsToAlignWith,remux:T,onData:U=>{U.type=U.type==="combined"?"video":U.type,g(s,U)},onTrackInfo:U=>{i&&(T&&(U.isMuxed=!0),i(s,U))},onAudioTimingInfo:U=>{w&&typeof U.start<"u"&&(w(U.start),w=null),R&&typeof U.end<"u"&&R(U.end)},onVideoTimingInfo:U=>{L&&typeof U.start<"u"&&(L(U.start),L=null),D&&typeof U.end<"u"&&D(U.end)},onVideoSegmentTimingInfo:U=>{const Y={pts:{start:U.start.presentation,end:U.end.presentation},dts:{start:U.start.decode,end:U.end.decode}};C({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:Y}),a(U)},onAudioSegmentTimingInfo:U=>{const Y={pts:{start:U.start.pts,end:U.end.pts},dts:{start:U.start.dts,end:U.end.dts}};C({type:"segmenttransmuxingtiminginfoavailable",segment:s,timingInfo:Y}),o(U)},onId3:(U,Y)=>{l(s,U,Y)},onCaptions:U=>{u(s,[U])},isEndOfTimeline:d,onEndedTimeline:()=>{f()},onTransmuxerLog:S,onDone:(U,Y)=>{v&&(U.type=U.type==="combined"?"video":U.type,C({type:"segmenttransmuxingcomplete",segment:s}),v(Y,s,U))},segment:s,triggerSegmentEventFn:C});nr({action:"probeTs",transmuxer:s.transmuxer,data:e,baseStartTime:s.baseStartTime,callback:U=>{s.bytes=e=U.data;const Y=U.result;Y&&(i(s,{hasAudio:Y.hasAudio,hasVideo:Y.hasVideo,isMuxed:T}),i=null),M()}})},Wf=({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:g,doneFn:v,onTransmuxerLog:S,triggerSegmentEventFn:C})=>{let O=new Uint8Array(e);if(P8(O)){s.isFmp4=!0;const{tracks:T}=s.map;if(T.text&&(!T.audio||!T.video)){g(s,{data:O,type:"text"}),d5(s,T.text.codec,v);return}const R={isFmp4:!0,hasVideo:!!T.video,hasAudio:!!T.audio};T.audio&&T.audio.codec&&T.audio.codec!=="enca"&&(R.audioCodec=T.audio.codec),T.video&&T.video.codec&&T.video.codec!=="encv"&&(R.videoCodec=T.video.codec),T.video&&T.audio&&(R.isMuxed=!0),i(s,R);const L=(D,M)=>{g(s,{data:O,type:R.hasAudio&&!R.isMuxed?"audio":"video"}),M&&M.length&&l(s,M),D&&D.length&&u(s,D),v(null,s,{})};nr({action:"probeMp4StartTime",timescales:s.map.timescales,data:O,transmuxer:s.transmuxer,callback:({data:D,startTime:M})=>{e=D.buffer,s.bytes=O=D,R.hasAudio&&!R.isMuxed&&r(s,"audio","start",M),R.hasVideo&&r(s,"video","start",M),nr({action:"probeEmsgID3",data:O,transmuxer:s.transmuxer,offset:M,callback:({emsgData:U,id3Frames:Y})=>{if(e=U.buffer,s.bytes=O=U,!T.video||!U.byteLength||!s.transmuxer){L(void 0,Y);return}nr({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:s.transmuxer,data:O,timescales:s.map.timescales,trackIds:[T.video.id],callback:P=>{e=P.data.buffer,s.bytes=O=P.data,P.logs.forEach(function(J){S(st(J,{stream:"mp4CaptionParser"}))}),L(P.captions,Y)}})}})}});return}if(!s.transmuxer){v(null,s,{});return}if(typeof s.container>"u"&&(s.container=Fl(O)),s.container!=="ts"&&s.container!=="aac"){i(s,{hasAudio:!1,hasVideo:!1}),v(null,s,{});return}p5({segment:s,bytes:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:g,doneFn:v,onTransmuxerLog:S,triggerSegmentEventFn:C})},Yf=function({id:s,key:e,encryptedBytes:i,decryptionWorker:r,segment:a,doneFn:o},l){const u=f=>{if(f.data.source===s){r.removeEventListener("message",u);const g=f.data.decrypted;l(new Uint8Array(g.bytes,g.byteOffset,g.byteLength))}};r.onerror=()=>{const f="An error occurred in the decryption worker",g=Dn({segment:a}),v={message:f,metadata:{error:new Error(f),errorType:ne.Error.StreamingFailedToDecryptSegment,segmentInfo:g,keyInfo:{uri:a.key.resolvedUri||a.map.key.resolvedUri}}};o(v,a)},r.addEventListener("message",u);let d;e.bytes.slice?d=e.bytes.slice():d=new Uint32Array(Array.prototype.slice.call(e.bytes)),r.postMessage(Of({source:s,encrypted:i,key:d,iv:e.iv}),[i.buffer,d.buffer])},m5=({decryptionWorker:s,segment:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:g,doneFn:v,onTransmuxerLog:S,triggerSegmentEventFn:C})=>{C({type:"segmentdecryptionstart"}),Yf({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:s,segment:e,doneFn:v},O=>{e.bytes=O,C({type:"segmentdecryptioncomplete",segment:e}),Wf({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:g,doneFn:v,onTransmuxerLog:S,triggerSegmentEventFn:C})})},g5=({activeXhrs:s,decryptionWorker:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:g,doneFn:v,onTransmuxerLog:S,triggerSegmentEventFn:C})=>{let O=0,T=!1;return(w,R)=>{if(!T){if(w)return T=!0,Cl(s),v(w,R);if(O+=1,O===s.length){const L=function(){if(R.encryptedBytes)return m5({decryptionWorker:e,segment:R,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:g,doneFn:v,onTransmuxerLog:S,triggerSegmentEventFn:C});Wf({segment:R,bytes:R.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:g,doneFn:v,onTransmuxerLog:S,triggerSegmentEventFn:C})};if(R.endOfAllRequests=Date.now(),R.map&&R.map.encryptedBytes&&!R.map.bytes)return C({type:"segmentdecryptionstart",segment:R}),Yf({decryptionWorker:e,id:R.requestId+"-init",encryptedBytes:R.map.encryptedBytes,key:R.map.key,segment:R,doneFn:v},D=>{R.map.bytes=D,C({type:"segmentdecryptioncomplete",segment:R}),Gf(R,M=>{if(M)return Cl(s),v(M,R);L()})});L()}}}},v5=({loadendState:s,abortFn:e})=>i=>{i.target.aborted&&e&&!s.calledAbortFn&&(e(),s.calledAbortFn=!0)},_5=({segment:s,progressFn:e,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:g})=>v=>{if(!v.target.aborted)return s.stats=st(s.stats,u5(v)),!s.stats.firstBytesReceivedAt&&s.stats.bytesReceived&&(s.stats.firstBytesReceivedAt=Date.now()),e(v,s)},y5=({xhr:s,xhrOptions:e,decryptionWorker:i,segment:r,abortFn:a,progressFn:o,trackInfoFn:l,timingInfoFn:u,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:f,id3Fn:g,captionsFn:v,isEndOfTimeline:S,endedTimelineFn:C,dataFn:O,doneFn:T,onTransmuxerLog:w,triggerSegmentEventFn:R})=>{const L=[],D=g5({activeXhrs:L,decryptionWorker:i,trackInfoFn:l,timingInfoFn:u,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:f,id3Fn:g,captionsFn:v,isEndOfTimeline:S,endedTimelineFn:C,dataFn:O,doneFn:T,onTransmuxerLog:w,triggerSegmentEventFn:R});if(r.key&&!r.key.bytes){const J=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&J.push(r.map.key);const b=st(e,{uri:r.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),x=zd(r,J,D,R),q={uri:r.key.resolvedUri};R({type:"segmentkeyloadstart",segment:r,keyInfo:q});const H=s(b,x);L.push(H)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){const H=st(e,{uri:r.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),k=zd(r,[r.map.key],D,R),A={uri:r.map.key.resolvedUri};R({type:"segmentkeyloadstart",segment:r,keyInfo:A});const $=s(H,k);L.push($)}const b=st(e,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:bl(r.map),requestType:"segment-media-initialization"}),x=h5({segment:r,finishProcessingFn:D,triggerSegmentEventFn:R});R({type:"segmentloadstart",segment:r});const q=s(b,x);L.push(q)}const M=st(e,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:bl(r),requestType:"segment"}),U=f5({segment:r,finishProcessingFn:D,responseType:M.responseType,triggerSegmentEventFn:R});R({type:"segmentloadstart",segment:r});const Y=s(M,U);Y.addEventListener("progress",_5({segment:r,progressFn:o,trackInfoFn:l,timingInfoFn:u,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:f,id3Fn:g,captionsFn:v,isEndOfTimeline:S,endedTimelineFn:C,dataFn:O})),L.push(Y);const P={};return L.forEach(J=>{J.addEventListener("loadend",v5({loadendState:P,abortFn:a}))}),()=>Cl(L)},Hs=bi("PlaylistSelector"),Gd=function(s){if(!s||!s.playlist)return;const e=s.playlist;return JSON.stringify({id:e.id,bandwidth:s.bandwidth,width:s.width,height:s.height,codecs:e.attributes&&e.attributes.CODECS||""})},rr=function(s,e){if(!s)return"";const i=W.getComputedStyle(s);return i?i[e]:""},sr=function(s,e){const i=s.slice();s.sort(function(r,a){const o=e(r,a);return o===0?i.indexOf(r)-i.indexOf(a):o})},vu=function(s,e){let i,r;return s.attributes.BANDWIDTH&&(i=s.attributes.BANDWIDTH),i=i||W.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(r=e.attributes.BANDWIDTH),r=r||W.Number.MAX_VALUE,i-r},T5=function(s,e){let i,r;return s.attributes.RESOLUTION&&s.attributes.RESOLUTION.width&&(i=s.attributes.RESOLUTION.width),i=i||W.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(r=e.attributes.RESOLUTION.width),r=r||W.Number.MAX_VALUE,i===r&&s.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?s.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-r};let Xf=function(s){const{main:e,bandwidth:i,playerWidth:r,playerHeight:a,playerObjectFit:o,limitRenditionByPlayerDimensions:l,playlistController:u}=s;if(!e)return;const d={bandwidth:i,width:r,height:a,limitRenditionByPlayerDimensions:l};let f=e.playlists;oi.isAudioOnly(e)&&(f=u.getAudioTrackPlaylists_(),d.audioOnly=!0);let g=f.map(P=>{let J;const b=P.attributes&&P.attributes.RESOLUTION&&P.attributes.RESOLUTION.width,x=P.attributes&&P.attributes.RESOLUTION&&P.attributes.RESOLUTION.height;return J=P.attributes&&P.attributes.BANDWIDTH,J=J||W.Number.MAX_VALUE,{bandwidth:J,width:b,height:x,playlist:P}});sr(g,(P,J)=>P.bandwidth-J.bandwidth),g=g.filter(P=>!oi.isIncompatible(P.playlist));let v=g.filter(P=>oi.isEnabled(P.playlist));v.length||(v=g.filter(P=>!oi.isDisabled(P.playlist)));const S=v.filter(P=>P.bandwidth*At.BANDWIDTH_VARIANCE<i);let C=S[S.length-1];const O=S.filter(P=>P.bandwidth===C.bandwidth)[0];if(l===!1){const P=O||v[0]||g[0];if(P&&P.playlist){let J="sortedPlaylistReps";return O&&(J="bandwidthBestRep"),v[0]&&(J="enabledPlaylistReps"),Hs(`choosing ${Gd(P)} using ${J} with options`,d),P.playlist}return Hs("could not choose a playlist with options",d),null}const T=S.filter(P=>P.width&&P.height);sr(T,(P,J)=>P.width-J.width);const w=T.filter(P=>P.width===r&&P.height===a);C=w[w.length-1];const R=w.filter(P=>P.bandwidth===C.bandwidth)[0];let L,D,M;R||(L=T.filter(P=>o==="cover"?P.width>r&&P.height>a:P.width>r||P.height>a),D=L.filter(P=>P.width===L[0].width&&P.height===L[0].height),C=D[D.length-1],M=D.filter(P=>P.bandwidth===C.bandwidth)[0]);let U;if(u.leastPixelDiffSelector){const P=T.map(J=>(J.pixelDiff=Math.abs(J.width-r)+Math.abs(J.height-a),J));sr(P,(J,b)=>J.pixelDiff===b.pixelDiff?b.bandwidth-J.bandwidth:J.pixelDiff-b.pixelDiff),U=P[0]}const Y=U||M||R||O||v[0]||g[0];if(Y&&Y.playlist){let P="sortedPlaylistReps";return U?P="leastPixelDiffRep":M?P="resolutionPlusOneRep":R?P="resolutionBestRep":O?P="bandwidthBestRep":v[0]&&(P="enabledPlaylistReps"),Hs(`choosing ${Gd(Y)} using ${P} with options`,d),Y.playlist}return Hs("could not choose a playlist with options",d),null};const Wd=function(){let s=this.useDevicePixelRatio&&W.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(s=this.customPixelRatio),Xf({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(rr(this.tech_.el(),"width"),10)*s,playerHeight:parseInt(rr(this.tech_.el(),"height"),10)*s,playerObjectFit:this.usePlayerObjectFit?rr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},b5=function(s){let e=-1,i=-1;if(s<0||s>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let r=this.useDevicePixelRatio&&W.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),e<0&&(e=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(e=s*this.systemBandwidth+(1-s)*e,i=this.systemBandwidth),Xf({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(rr(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(rr(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?rr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},x5=function(s){const{main:e,currentTime:i,bandwidth:r,duration:a,segmentDuration:o,timeUntilRebuffer:l,currentTimeline:u,syncController:d}=s,f=e.playlists.filter(O=>!oi.isIncompatible(O));let g=f.filter(oi.isEnabled);g.length||(g=f.filter(O=>!oi.isDisabled(O)));const S=g.filter(oi.hasAttribute.bind(null,"BANDWIDTH")).map(O=>{const w=d.getSyncPoint(O,a,u,i)?1:2,L=oi.estimateSegmentRequestTime(o,r,O)*w-l;return{playlist:O,rebufferingImpact:L}}),C=S.filter(O=>O.rebufferingImpact<=0);return sr(C,(O,T)=>vu(T.playlist,O.playlist)),C.length?C[0]:(sr(S,(O,T)=>O.rebufferingImpact-T.rebufferingImpact),S[0]||null)},C5=function(){const s=this.playlists.main.playlists.filter(oi.isEnabled);return sr(s,(i,r)=>vu(i,r)),s.filter(i=>!!is(this.playlists.main,i).video)[0]||null},E5=s=>{let e=0,i;return s.bytes&&(i=new Uint8Array(s.bytes),s.segments.forEach(r=>{i.set(r,e),e+=r.byteLength})),i};function Kf(s){try{return new URL(s).pathname.split("/").slice(-2).join("/")}catch{return""}}const S5=function(s,e,i){if(!s[i]){e.trigger({type:"usage",name:"vhs-608"});let r=i;/^cc708_/.test(i)&&(r="SERVICE"+i.split("_")[1]);const a=e.textTracks().getTrackById(r);if(a)s[i]=a;else{const o=e.options_.vhs&&e.options_.vhs.captionServices||{};let l=i,u=i,d=!1;const f=o[r];f&&(l=f.label,u=f.language,d=f.default),s[i]=e.addRemoteTextTrack({kind:"captions",id:r,default:d,label:l,language:u},!1).track}}},k5=function({inbandTextTracks:s,captionArray:e,timestampOffset:i}){if(!e)return;const r=W.WebKitDataCue||W.VTTCue;e.forEach(a=>{const o=a.stream;a.content?a.content.forEach(l=>{const u=new r(a.startTime+i,a.endTime+i,l.text);u.line=l.line,u.align="left",u.position=l.position,u.positionAlign="line-left",s[o].addCue(u)}):s[o].addCue(new r(a.startTime+i,a.endTime+i,a.text))})},w5=function(s){Object.defineProperties(s.frame,{id:{get(){return ne.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),s.value.key}},value:{get(){return ne.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),s.value.data}},privateData:{get(){return ne.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),s.value.data}}})},D5=({inbandTextTracks:s,metadataArray:e,timestampOffset:i,videoDuration:r})=>{if(!e)return;const a=W.WebKitDataCue||W.VTTCue,o=s.metadataTrack_;if(!o||(e.forEach(g=>{const v=g.cueTime+i;typeof v!="number"||W.isNaN(v)||v<0||!(v<1/0)||!g.frames||!g.frames.length||g.frames.forEach(S=>{const C=new a(v,v,S.value||S.url||S.data||"");C.frame=S,C.value=S,w5(C),o.addCue(C)})}),!o.cues||!o.cues.length))return;const l=o.cues,u=[];for(let g=0;g<l.length;g++)l[g]&&u.push(l[g]);const d=u.reduce((g,v)=>{const S=g[v.startTime]||[];return S.push(v),g[v.startTime]=S,g},{}),f=Object.keys(d).sort((g,v)=>Number(g)-Number(v));f.forEach((g,v)=>{const S=d[g],C=isFinite(r)?r:g,O=Number(f[v+1])||C;S.forEach(T=>{T.endTime=O})})},A5={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},N5=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),I5=({inbandTextTracks:s,dateRanges:e})=>{const i=s.metadataTrack_;if(!i)return;const r=W.WebKitDataCue||W.VTTCue;e.forEach(a=>{for(const o of Object.keys(a)){if(N5.has(o))continue;const l=new r(a.startTime,a.endTime,"");l.id=a.id,l.type="com.apple.quicktime.HLS",l.value={key:A5[o],data:a[o]},(o==="scte35Out"||o==="scte35In")&&(l.value.data=new Uint8Array(l.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(l)}a.processDateRange()})},Yd=(s,e,i)=>{s.metadataTrack_||(s.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ne.browser.IS_ANY_SAFARI||(s.metadataTrack_.inBandMetadataTrackDispatchType=e))},Kr=function(s,e,i){let r,a;if(i&&i.cues)for(r=i.cues.length;r--;)a=i.cues[r],a.startTime>=s&&a.endTime<=e&&i.removeCue(a)},O5=function(s){const e=s.cues;if(!e)return;const i={};for(let r=e.length-1;r>=0;r--){const a=e[r],o=`${a.startTime}-${a.endTime}-${a.text}`;i[o]?s.removeCue(a):i[o]=a}},B5=(s,e,i)=>{if(typeof e>"u"||e===null||!s.length)return[];const r=Math.ceil((e-i+3)*Nn.ONE_SECOND_IN_TS);let a;for(a=0;a<s.length&&!(s[a].pts>r);a++);return s.slice(a)},L5=(s,e,i)=>{if(!e.length)return s;if(i)return e.slice();const r=e[0].pts;let a=0;for(a;a<s.length&&!(s[a].pts>=r);a++);return s.slice(0,a).concat(e)},P5=(s,e,i,r)=>{const a=Math.ceil((e-r)*Nn.ONE_SECOND_IN_TS),o=Math.ceil((i-r)*Nn.ONE_SECOND_IN_TS),l=s.slice();let u=s.length;for(;u--&&!(s[u].pts<=o););if(u===-1)return l;let d=u+1;for(;d--&&!(s[d].pts<=a););return d=Math.max(d,0),l.splice(d,u-d+1),l},M5=function(s,e){if(!s&&!e||!s&&e||s&&!e)return!1;if(s===e)return!0;const i=Object.keys(s).sort(),r=Object.keys(e).sort();if(i.length!==r.length)return!1;for(let a=0;a<i.length;a++){const o=i[a];if(o!==r[a]||s[o]!==e[o])return!1}return!0},R5=function(s,e,i){e=e||[];const r=[];let a=0;for(let o=0;o<e.length;o++){const l=e[o];if(s===l.timeline&&(r.push(o),a+=l.duration,a>i))return o}return r.length===0?0:r[r.length-1]},Wr=1,V5=500,Xd=s=>typeof s=="number"&&isFinite(s),zs=1/60,F5=(s,e,i)=>s!=="main"||!e||!i?null:!i.hasAudio&&!i.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,$5=(s,e,i)=>{let r=e-At.BACK_BUFFER_LENGTH;s.length&&(r=Math.max(r,s.start(0)));const a=e-i;return Math.min(a,r)},Wn=s=>{const{startOfSegment:e,duration:i,segment:r,part:a,playlist:{mediaSequence:o,id:l,segments:u=[]},mediaIndex:d,partIndex:f,timeline:g}=s,v=u.length-1;let S="mediaIndex/partIndex increment";s.getMediaInfoForTime?S=`getMediaInfoForTime (${s.getMediaInfoForTime})`:s.isSyncRequest&&(S="getSyncSegmentCandidate (isSyncRequest)"),s.independent&&(S+=` with independent ${s.independent}`);const C=typeof f=="number",O=s.segment.uri?"segment":"pre-segment",T=C?pf({preloadSegment:r})-1:0;return`${O} [${o+d}/${o+v}]`+(C?` part [${f}/${T}]`:"")+` segment start/end [${r.start} => ${r.end}]`+(C?` part start/end [${a.start} => ${a.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${g}] selected by [${S}] playlist [${l}]`},Kd=s=>`${s}TimingInfo`,U5=({segmentTimeline:s,currentTimeline:e,startOfSegment:i,buffered:r,overrideCheck:a})=>!a&&s===e?null:s<e?i:r.length?r.end(r.length-1):i,El=({timelineChangeController:s,currentTimeline:e,segmentTimeline:i,loaderType:r,audioDisabled:a})=>{if(e===i)return!1;if(r==="audio"){const o=s.lastTimelineChange({type:"main"});return!o||o.to!==i}if(r==="main"&&a){const o=s.pendingTimelineChange({type:"audio"});return!(o&&o.to===i)}return!1},q5=s=>{if(!s)return!1;const e=s.pendingTimelineChange({type:"audio"}),i=s.pendingTimelineChange({type:"main"}),r=e&&i,a=r&&e.to!==i.to;return!!(r&&e.from!==-1&&i.from!==-1&&a)},j5=s=>{const e=s.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=s.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to},hn=s=>{const e=s.pendingSegment_;if(!e)return;if(El({timelineChangeController:s.timelineChangeController_,currentTimeline:s.currentTimeline_,segmentTimeline:e.timeline,loaderType:s.loaderType_,audioDisabled:s.audioDisabled_})&&q5(s.timelineChangeController_)){if(j5(s)){s.timelineChangeController_.trigger("audioTimelineBehind");return}s.timelineChangeController_.trigger("fixBadTimelineChange")}},H5=s=>{let e=0;return["video","audio"].forEach(function(i){const r=s[`${i}TimingInfo`];if(!r)return;const{start:a,end:o}=r;let l;typeof a=="bigint"||typeof o=="bigint"?l=W.BigInt(o)-W.BigInt(a):typeof a=="number"&&typeof o=="number"&&(l=o-a),typeof l<"u"&&l>e&&(e=l)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},Qd=({segmentDuration:s,maxDuration:e})=>s?Math.round(s)>e+qi:!1,z5=(s,e)=>{if(e!=="hls")return null;const i=H5({audioTimingInfo:s.audioTimingInfo,videoTimingInfo:s.videoTimingInfo});if(!i)return null;const r=s.playlist.targetDuration,a=Qd({segmentDuration:i,maxDuration:r*2}),o=Qd({segmentDuration:i,maxDuration:r}),l=`Segment with index ${s.mediaIndex} from playlist ${s.playlist.id} has a duration of ${i} when the reported duration is ${s.duration} and the target duration is ${r}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return a||o?{severity:a?"warn":"info",message:l}:null},Dn=({type:s,segment:e})=>{if(!e)return;const i=!!(e.key||e.map&&e.map.ke),r=!!(e.map&&!e.map.bytes),a=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:s||e.type,uri:e.resolvedUri||e.uri,start:a,duration:e.duration,isEncrypted:i,isMediaInitialization:r}};class Sl extends ne.EventTarget{constructor(e,i={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=bi(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(r){r!==this.state_&&(this.logger_(`${this.state_} -> ${r}`),this.state_=r,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this)}),this.sourceUpdater_.on("codecschange",r=>{this.trigger(xt({type:"codecschange"},r))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",r=>{this.trigger(xt({type:"timelinechange"},r)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():hn(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Yo.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&W.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,W.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Yo.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return It();if(this.loaderType_==="main"){const{hasAudio:i,hasVideo:r,isMuxed:a}=e;if(r&&i&&!this.audioDisabled_&&!a)return this.sourceUpdater_.buffered();if(r)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,i=!1){if(!e)return null;const r=ba(e);let a=this.initSegments_[r];return i&&!a&&e.bytes&&(this.initSegments_[r]=a={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),a||e}segmentKey(e,i=!1){if(!e)return null;const r=Bf(e);let a=this.keyCache_[r];this.cacheEncryptionKeys_&&i&&!a&&e.bytes&&(this.keyCache_[r]=a={resolvedUri:e.resolvedUri,bytes:e.bytes});const o={resolvedUri:(a||e).resolvedUri};return a&&(o.bytes=a.bytes),o}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,i={}){if(!e||this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const r=this.playlist_,a=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let o=null;if(r&&(r.id?o=r.id:r.uri&&(o=r.uri)),this.logger_(`playlist update [${o} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
209
+ currentTime: ${this.currentTime_()}
210
+ bufferedEnd: ${Go(this.buffered_())}
211
+ `,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!r||r.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const l=e.mediaSequence-r.mediaSequence;if(this.logger_(`live window shift [${l}]`),this.mediaIndex!==null)if(this.mediaIndex-=l,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const u=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!u.parts||!u.parts.length||!u.parts[this.partIndex])){const d=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=d}}a&&(a.mediaIndex-=l,a.mediaIndex<0?(a.mediaIndex=null,a.partIndex=null):(a.mediaIndex>=0&&(a.segment=e.segments[a.mediaIndex]),a.partIndex>=0&&a.segment.parts&&(a.part=a.segment.parts[a.partIndex]))),this.syncController_.saveExpiredSegmentInfo(r,e)}pause(){this.checkBufferTimeout_&&(W.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Yo.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,i,r=()=>{},a=!1){if(i===1/0&&(i=this.duration_()),i<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let o=1;const l=()=>{o--,o===0&&r()};(a||!this.audioDisabled_)&&(o++,this.sourceUpdater_.removeAudio(e,i,l)),(a||this.loaderType_==="main")&&(this.gopBuffer_=P5(this.gopBuffer_,e,i,this.timeMapping_),o++,this.sourceUpdater_.removeVideo(e,i,l));for(const u in this.inbandTextTracks_)Kr(e,i,this.inbandTextTracks_[u]);Kr(e,i,this.segmentMetadataTrack_),l()}monitorBuffer_(){this.checkBufferTimeout_&&W.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=W.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&W.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=W.setTimeout(this.monitorBufferTick_.bind(this),V5)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const i={segmentInfo:Dn({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:i}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,i=this.playlist_,r=this.partIndex){if(!i||!this.mediaSource_)return!1;const a=typeof e=="number"&&i.segments[e],o=e+1===i.segments.length,l=!a||!a.parts||r+1===a.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&o&&l}chooseNextRequest_(){const e=this.buffered_(),i=Go(e)||0,r=hu(e,this.currentTime_()),a=!this.hasPlayed_()&&r>=1,o=r>=this.goalBufferLength_(),l=this.playlist_.segments;if(!l.length||a||o)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const u={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(u.isSyncRequest)u.mediaIndex=R5(this.currentTimeline_,l,i),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${u.mediaIndex}`);else if(this.mediaIndex!==null){const S=l[this.mediaIndex],C=typeof this.partIndex=="number"?this.partIndex:-1;u.startOfSegment=S.end?S.end:i,S.parts&&S.parts[C+1]?(u.mediaIndex=this.mediaIndex,u.partIndex=C+1):u.mediaIndex=this.mediaIndex+1}else{let S,C,O;const T=this.fetchAtBuffer_?i:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
212
+ For TargetTime: ${T}.
213
+ CurrentTime: ${this.currentTime_()}
214
+ BufferedEnd: ${i}
215
+ Fetch At Buffer: ${this.fetchAtBuffer_}
216
+ `,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const w=this.getSyncInfoFromMediaSequenceSync_(T);if(!w){const R="No sync info found while using media sequence sync";return this.error({message:R,metadata:{errorType:ne.Error.StreamingFailedToSelectNextSegment,error:new Error(R)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${w.start} --> ${w.end})`),S=w.segmentIndex,C=w.partIndex,O=w.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const w=oi.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:T,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});S=w.segmentIndex,C=w.partIndex,O=w.startTime}u.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${T}`:`currentTime ${T}`,u.mediaIndex=S,u.startOfSegment=O,u.partIndex=C,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${u.mediaIndex} `)}const d=l[u.mediaIndex];let f=d&&typeof u.partIndex=="number"&&d.parts&&d.parts[u.partIndex];if(!d||typeof u.partIndex=="number"&&!f)return null;typeof u.partIndex!="number"&&d.parts&&(u.partIndex=0,f=d.parts[0]);const g=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!r&&f&&!g&&!f.independent)if(u.partIndex===0){const S=l[u.mediaIndex-1],C=S.parts&&S.parts.length&&S.parts[S.parts.length-1];C&&C.independent&&(u.mediaIndex-=1,u.partIndex=S.parts.length-1,u.independent="previous segment")}else d.parts[u.partIndex-1].independent&&(u.partIndex-=1,u.independent="previous part");const v=this.mediaSource_&&this.mediaSource_.readyState==="ended";return u.mediaIndex>=l.length-1&&v&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,u.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(u))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const i=Math.max(e,this.mediaSequenceSync_.start);e!==i&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${i}`);const r=this.mediaSequenceSync_.getSyncInfoForTime(i);if(!r)return null;if(!r.isAppended)return r;const a=this.mediaSequenceSync_.getSyncInfoForTime(r.end);return a?(a.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),a):null}generateSegmentInfo_(e){const{independent:i,playlist:r,mediaIndex:a,startOfSegment:o,isSyncRequest:l,partIndex:u,forceTimestampOffset:d,getMediaInfoForTime:f}=e,g=r.segments[a],v=typeof u=="number"&&g.parts[u],S={requestId:"segment-loader-"+Math.random(),uri:v&&v.resolvedUri||g.resolvedUri,mediaIndex:a,partIndex:v?u:null,isSyncRequest:l,startOfSegment:o,playlist:r,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:g.timeline,duration:v&&v.duration||g.duration,segment:g,part:v,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:f,independent:i},C=typeof d<"u"?d:this.isPendingTimestampOffset_;S.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:g.timeline,currentTimeline:this.currentTimeline_,startOfSegment:o,buffered:this.buffered_(),overrideCheck:C});const O=Go(this.sourceUpdater_.audioBuffered());return typeof O=="number"&&(S.audioAppendStart=O-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(S.gopsToAlignWith=B5(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),S}timestampOffsetForSegment_(e){return U5(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const i=this.currentTime_(),r=e.bandwidth,a=this.pendingSegment_.duration,o=oi.estimateSegmentRequestTime(a,r,this.playlist_,e.bytesReceived),l=uC(this.buffered_(),i,this.vhs_.tech_.playbackRate())-1;if(o<=l)return;const u=x5({main:this.vhs_.playlists.main,currentTime:i,bandwidth:r,duration:this.duration_(),segmentDuration:a,timeUntilRebuffer:l,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!u)return;const f=o-l-u.rebufferingImpact;let g=.5;l<=qi&&(g=1),!(!u.playlist||u.playlist.uri===this.playlist_.uri||f<g)&&(this.bandwidth=u.playlist.attributes.BANDWIDTH*At.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Wn(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,i){this.earlyAbortWhenNeeded_(i.stats),!this.checkForAbort_(i.requestId)&&this.trigger("progress")}handleTrackInfo_(e,i){const{hasAudio:r,hasVideo:a}=i,o={segmentInfo:Dn({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:r,hasVideo:a}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:o}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(i)||(i=i||{},M5(this.currentMediaInfo_,i)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=i,this.currentMediaInfo_=i,this.logger_("trackinfo update",i),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=i,this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this))))}handleTimingInfo_(e,i,r,a){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const o=this.pendingSegment_,l=Kd(i);o[l]=o[l]||{},o[l][r]=a,this.logger_(`timinginfo: ${i} - ${r} - ${a}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this)}handleCaptions_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(i.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,i));return}const a=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),o={};i.forEach(l=>{o[l.stream]=o[l.stream]||{startTime:1/0,captions:[],endTime:0};const u=o[l.stream];u.startTime=Math.min(u.startTime,l.startTime+a),u.endTime=Math.max(u.endTime,l.endTime+a),u.captions.push(l)}),Object.keys(o).forEach(l=>{const{startTime:u,endTime:d,captions:f}=o[l],g=this.inbandTextTracks_;this.logger_(`adding cues from ${u} -> ${d} for ${l}`),S5(g,this.vhs_.tech_,l),Kr(u,d,g[l]),k5({captionArray:f,inbandTextTracks:g,timestampOffset:a})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,i,r){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,r));return}this.addMetadataToTextTrack(r,i,this.duration_())}processMetadataQueue_(){this.metadataQueue_.id3.forEach(e=>e()),this.metadataQueue_.caption.forEach(e=>e()),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach(i=>i())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(i=>i())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!El({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,i=this.getCurrentMediaInfo_();if(!e||!i)return!1;const{hasAudio:r,hasVideo:a,isMuxed:o}=i;return!(a&&!e.videoTimingInfo||r&&!this.audioDisabled_&&!o&&!e.audioTimingInfo||El({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,i){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){hn(this),this.callQueue_.push(this.handleData_.bind(this,e,i));return}const r=this.pendingSegment_;if(this.setTimeMapping_(r.timeline),this.updateMediaSecondsLoaded_(r.part||r.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),r.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),r.isFmp4=e.isFmp4,r.timingInfo=r.timingInfo||{},r.isFmp4)this.trigger("fmp4"),r.timingInfo.start=r[Kd(i.type)].start;else{const a=this.getCurrentMediaInfo_(),o=this.loaderType_==="main"&&a&&a.hasVideo;let l;o&&(l=r.videoTimingInfo.start),r.timingInfo.start=this.trueSegmentStart_({currentStart:r.timingInfo.start,playlist:r.playlist,mediaIndex:r.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:o,firstVideoFrameTimeForData:l,videoTimingInfo:r.videoTimingInfo,audioTimingInfo:r.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(r,i.type),this.updateSourceBufferTimestampOffset_(r),r.isSyncRequest){this.updateTimingInfoEnd_(r),this.syncController_.saveSegmentTimingInfo({segmentInfo:r,shouldSaveTimelineMapping:this.loaderType_==="main"});const a=this.chooseNextRequest_();if(a.mediaIndex!==r.mediaIndex||a.partIndex!==r.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}r.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(r,i)}}updateAppendInitSegmentStatus(e,i){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[i]!==e.playlist&&(this.appendInitSegment_[i]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:i,map:r,playlist:a}){if(r){const o=ba(r);if(this.activeInitSegmentId_===o)return null;i=this.initSegmentForMap(r,!0).bytes,this.activeInitSegmentId_=o}return i&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=a,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,i):null}handleQuotaExceededError_({segmentInfo:e,type:i,bytes:r},a){const o=this.sourceUpdater_.audioBuffered(),l=this.sourceUpdater_.videoBuffered();o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+In(o).join(", ")),l.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+In(l).join(", "));const u=o.length?o.start(0):0,d=o.length?o.end(o.length-1):0,f=l.length?l.start(0):0,g=l.length?l.end(l.length-1):0;if(d-u<=Wr&&g-f<=Wr){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${r.byteLength}, audio buffer: ${In(o).join(", ")}, video buffer: ${In(l).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:i,bytes:r}));const S=this.currentTime_()-Wr;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${S}`),this.remove(0,S,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Wr}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=W.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Wr*1e3)},!0)}handleAppendError_({segmentInfo:e,type:i,bytes:r},a){if(a){if(a.code===Sf){this.handleQuotaExceededError_({segmentInfo:e,type:i,bytes:r});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",a),this.error({message:`${i} append of ${r.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:ne.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:r,data:a,bytes:o}){if(!o){const u=[a];let d=a.byteLength;r&&(u.unshift(r),d+=r.byteLength),o=E5({bytes:d,segments:u})}const l={segmentInfo:Dn({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:l}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:i,bytes:o},this.handleAppendError_.bind(this,{segmentInfo:e,type:i,bytes:o}))}handleSegmentTimingInfo_(e,i,r){if(!this.pendingSegment_||i!==this.pendingSegment_.requestId)return;const a=this.pendingSegment_.segment,o=`${e}TimingInfo`;a[o]||(a[o]={}),a[o].transmuxerPrependedSeconds=r.prependedContentDuration||0,a[o].transmuxedPresentationStart=r.start.presentation,a[o].transmuxedDecodeStart=r.start.decode,a[o].transmuxedPresentationEnd=r.end.presentation,a[o].transmuxedDecodeEnd=r.end.decode,a[o].baseMediaDecodeTime=r.baseMediaDecodeTime}appendData_(e,i){const{type:r,data:a}=i;if(!a||!a.byteLength||r==="audio"&&this.audioDisabled_)return;const o=this.getInitSegmentAndUpdateState_({type:r,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:r,initSegment:o,data:a})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){hn(this),this.loadQueue_.push(()=>{const i=xt({},e,{forceTimestampOffset:!0});xt(e,this.generateSegmentInfo_(i)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));const i=this.createSimplifiedSegmentObj_(e),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),a=this.mediaIndex!==null,o=e.timeline!==this.currentTimeline_&&e.timeline>0,l=r||a&&o;this.logger_(`Requesting
217
+ ${Kf(e.uri)}
218
+ ${Wn(e)}`),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=y5({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:i,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:l,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:u,level:d,stream:f})=>{this.logger_(`${Wn(e)} logged from transmuxer stream ${f} as a ${d}: ${u}`)},triggerSegmentEventFn:({type:u,segment:d,keyInfo:f,trackInfo:g,timingInfo:v})=>{const C={segmentInfo:Dn({segment:d})};f&&(C.keyInfo=f),g&&(C.trackInfo=g),v&&(C.timingInfo=v),this.trigger({type:u,metadata:C})}})}trimBackBuffer_(e){const i=$5(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i)}createSimplifiedSegmentObj_(e){const i=e.segment,r=e.part,a=e.segment.key||e.segment.map&&e.segment.map.key,o=e.segment.map&&!e.segment.map.bytes,l={resolvedUri:r?r.resolvedUri:i.resolvedUri,byterange:r?r.byterange:i.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:a,isMediaInitialization:o},u=e.playlist.segments[e.mediaIndex-1];if(u&&u.timeline===i.timeline&&(u.videoTimingInfo?l.baseStartTime=u.videoTimingInfo.transmuxedDecodeEnd:u.audioTimingInfo&&(l.baseStartTime=u.audioTimingInfo.transmuxedDecodeEnd)),i.key){const d=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);l.key=this.segmentKey(i.key),l.key.iv=d}return i.map&&(l.map=this.initSegmentForMap(i.map)),l}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,i){if(this.pendingSegment_.byteLength=i.bytesReceived,e<zs){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${zs}`);return}const r={bandwidthInfo:{from:this.bandwidth,to:i.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:r}),this.bandwidth=i.bandwidth,this.roundTrip=i.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,i,r){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,i,r));return}if(this.saveTransferStats_(i.stats),!this.pendingSegment_||i.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Hi.ABORTED)return;if(this.pause(),e.code===Hi.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const a=this.pendingSegment_;this.saveBandwidthRelatedStats_(a.duration,i.stats),a.endOfAllRequests=i.endOfAllRequests,r.gopInfo&&(this.gopBuffer_=L5(this.gopBuffer_,r.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(a)}setTimeMapping_(e){const i=this.syncController_.mappingForTimeline(e);i!==null&&(this.timeMapping_=i)}updateMediaSecondsLoaded_(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()}trueSegmentStart_({currentStart:e,playlist:i,mediaIndex:r,firstVideoFrameTimeForData:a,currentVideoTimestampOffset:o,useVideoTimingInfo:l,videoTimingInfo:u,audioTimingInfo:d}){if(typeof e<"u")return e;if(!l)return d.start;const f=i.segments[r-1];return r===0||!f||typeof f.start>"u"||f.end!==a+o?a:u.start}waitForAppendsToComplete_(e){const i=this.getCurrentMediaInfo_(e);if(!i){this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),this.trigger("error");return}const{hasAudio:r,hasVideo:a,isMuxed:o}=i,l=this.loaderType_==="main"&&a,u=!this.audioDisabled_&&r&&!o;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}l&&e.waitingOnAppends++,u&&e.waitingOnAppends++,l&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),u&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const i=F5(this.loaderType_,this.getCurrentMediaInfo_(),e);return i?(this.error({message:i,playlistExclusionDuration:1/0}),this.trigger("error"),!0):!1}updateSourceBufferTimestampOffset_(e){if(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")return;let i=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),i=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),i=!0),i&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:i,timingInfo:r}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:i&&typeof i.transmuxedDecodeStart=="number"?i.transmuxedDecodeStart:r.start:r.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const i=this.getMediaInfo_(),a=this.loaderType_==="main"&&i&&i.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;a&&(e.timingInfo.end=typeof a.end=="number"?a.end:a.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const d={segmentInfo:Dn({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:d})}if(!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});const i=z5(e,this.sourceType_);if(i&&(i.severity==="warn"?ne.log.warn(i.message):this.logger_(i.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_(`Throwing away un-appended sync request ${Wn(e)}`);return}this.logger_(`Appended ${Wn(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const r=e.segment,a=e.part,o=r.end&&this.currentTime_()-r.end>e.playlist.targetDuration*3,l=a&&a.end&&this.currentTime_()-a.end>e.playlist.partTargetDuration*3;if(o||l){this.logger_(`bad ${o?"segment":"part"} ${Wn(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<zs){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${zs}`);return}const i=this.throughput.rate,r=Date.now()-e.endOfAllRequests+1,a=Math.floor(e.byteLength/r*8*1e3);this.throughput.rate+=(a-i)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const i=e.segment,r=i.start,a=i.end;if(!Xd(r)||!Xd(a))return;Kr(r,a,this.segmentMetadataTrack_);const o=W.WebKitDataCue||W.VTTCue,l={custom:i.custom,dateTimeObject:i.dateTimeObject,dateTimeString:i.dateTimeString,programDateTime:i.programDateTime,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:r,end:a},u=JSON.stringify(l),d=new o(r,a,u);d.value=l,this.segmentMetadataTrack_.addCue(d)}}function tn(){}const Qf=function(s){return typeof s!="string"?s:s.replace(/./,e=>e.toUpperCase())},G5=["video","audio"],kl=(s,e)=>{const i=e[`${s}Buffer`];return i&&i.updating||e.queuePending[s]},W5=(s,e)=>{for(let i=0;i<e.length;i++){const r=e[i];if(r.type==="mediaSource")return null;if(r.type===s)return i}return null},ar=(s,e)=>{if(e.queue.length===0)return;let i=0,r=e.queue[i];if(r.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),r.action(e),r.doneFn&&r.doneFn(),ar("audio",e),ar("video",e));return}if(s!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||kl(s,e))){if(r.type!==s){if(i=W5(s,e.queue),i===null)return;r=e.queue[i]}if(e.queue.splice(i,1),e.queuePending[s]=r,r.action(s,e),!r.doneFn){e.queuePending[s]=null,ar(s,e);return}}},Zf=(s,e)=>{const i=e[`${s}Buffer`],r=Qf(s);i&&(i.removeEventListener("updateend",e[`on${r}UpdateEnd_`]),i.removeEventListener("error",e[`on${r}Error_`]),e.codecs[s]=null,e[`${s}Buffer`]=null)},$i=(s,e)=>s&&e&&Array.prototype.indexOf.call(s.sourceBuffers,e)!==-1,di={appendBuffer:(s,e,i)=>(r,a)=>{const o=a[`${r}Buffer`];if($i(a.mediaSource,o)){a.logger_(`Appending segment ${e.mediaIndex}'s ${s.length} bytes to ${r}Buffer`);try{o.appendBuffer(s)}catch(l){a.logger_(`Error with code ${l.code} `+(l.code===Sf?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${r}Buffer`),a.queuePending[r]=null,i(l)}}},remove:(s,e)=>(i,r)=>{const a=r[`${i}Buffer`];if($i(r.mediaSource,a)){r.logger_(`Removing ${s} to ${e} from ${i}Buffer`);try{a.remove(s,e)}catch{r.logger_(`Remove ${s} to ${e} from ${i}Buffer failed`)}}},timestampOffset:s=>(e,i)=>{const r=i[`${e}Buffer`];$i(i.mediaSource,r)&&(i.logger_(`Setting ${e}timestampOffset to ${s}`),r.timestampOffset=s)},callback:s=>(e,i)=>{s()},endOfStream:s=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${s||""})`);try{e.mediaSource.endOfStream(s)}catch(i){ne.log.warn("Failed to call media source endOfStream",i)}}},duration:s=>e=>{e.logger_(`Setting mediaSource duration to ${s}`);try{e.mediaSource.duration=s}catch(i){ne.log.warn("Failed to set media source duration",i)}},abort:()=>(s,e)=>{if(e.mediaSource.readyState!=="open")return;const i=e[`${s}Buffer`];if($i(e.mediaSource,i)){e.logger_(`calling abort on ${s}Buffer`);try{i.abort()}catch(r){ne.log.warn(`Failed to abort on ${s}Buffer`,r)}}},addSourceBuffer:(s,e)=>i=>{const r=Qf(s),a=or(e);i.logger_(`Adding ${s}Buffer with codec ${e} to mediaSource`);const o=i.mediaSource.addSourceBuffer(a);o.addEventListener("updateend",i[`on${r}UpdateEnd_`]),o.addEventListener("error",i[`on${r}Error_`]),i.codecs[s]=e,i[`${s}Buffer`]=o},removeSourceBuffer:s=>e=>{const i=e[`${s}Buffer`];if(Zf(s,e),!!$i(e.mediaSource,i)){e.logger_(`Removing ${s}Buffer with codec ${e.codecs[s]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(i)}catch(r){ne.log.warn(`Failed to removeSourceBuffer ${s}Buffer`,r)}}},changeType:s=>(e,i)=>{const r=i[`${e}Buffer`],a=or(s);if(!$i(i.mediaSource,r))return;const o=s.substring(0,s.indexOf(".")),l=i.codecs[e];if(l.substring(0,l.indexOf("."))===o)return;const d={codecsChangeInfo:{from:l,to:s}};i.trigger({type:"codecschange",metadata:d}),i.logger_(`changing ${e}Buffer codec from ${l} to ${s}`);try{r.changeType(a),i.codecs[e]=s}catch(f){d.errorType=ne.Error.StreamingCodecsChangeError,d.error=f,f.metadata=d,i.error_=f,i.trigger("error"),ne.log.warn(`Failed to changeType on ${e}Buffer`,f)}}},hi=({type:s,sourceUpdater:e,action:i,doneFn:r,name:a})=>{e.queue.push({type:s,action:i,doneFn:r,name:a}),ar(s,e)},Zd=(s,e)=>i=>{const r=e[`${s}Buffered`](),a=aC(r);if(e.logger_(`received "updateend" event for ${s} Source Buffer: `,a),e.queuePending[s]){const o=e.queuePending[s].doneFn;e.queuePending[s]=null,o&&o(e[`${s}Error_`])}ar(s,e)};class Jf extends ne.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>ar("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=bi("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Zd("video",this),this.onAudioUpdateEnd_=Zd("audio",this),this.onVideoError_=i=>{this.videoError_=i},this.onAudioError_=i=>{this.audioError_=i},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,i){hi({type:"mediaSource",sourceUpdater:this,action:di.addSourceBuffer(e,i),name:"addSourceBuffer"})}abort(e){hi({type:e,sourceUpdater:this,action:di.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){ne.log.error("removeSourceBuffer is not supported!");return}hi({type:"mediaSource",sourceUpdater:this,action:di.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!ne.browser.IS_FIREFOX&&W.MediaSource&&W.MediaSource.prototype&&typeof W.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return W.SourceBuffer&&W.SourceBuffer.prototype&&typeof W.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,i){if(!this.canChangeType()){ne.log.error("changeType is not supported!");return}hi({type:e,sourceUpdater:this,action:di.changeType(i),name:"changeType"})}addOrChangeSourceBuffers(e){if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(i=>{const r=e[i];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(i,r);this.canChangeType()&&this.changeType(i,r)})}appendBuffer(e,i){const{segmentInfo:r,type:a,bytes:o}=e;if(this.processedAppend_=!0,a==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,i]),this.logger_(`delayed audio append of ${o.length} until video append`);return}const l=i;if(hi({type:a,sourceUpdater:this,action:di.appendBuffer(o,r||{mediaIndex:-1},l),doneFn:i,name:"appendBuffer"}),a==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const u=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${u.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,u.forEach(d=>{this.appendBuffer.apply(this,d)})}}audioBuffered(){return $i(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:It()}videoBuffered(){return $i(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:It()}buffered(){const e=$i(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,i=$i(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return i&&!e?this.audioBuffered():e&&!i?this.videoBuffered():lC(this.audioBuffered(),this.videoBuffered())}setDuration(e,i=tn){hi({type:"mediaSource",sourceUpdater:this,action:di.duration(e),name:"duration",doneFn:i})}endOfStream(e=null,i=tn){typeof e!="string"&&(e=void 0),hi({type:"mediaSource",sourceUpdater:this,action:di.endOfStream(e),name:"endOfStream",doneFn:i})}removeAudio(e,i,r=tn){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){r();return}hi({type:"audio",sourceUpdater:this,action:di.remove(e,i),doneFn:r,name:"remove"})}removeVideo(e,i,r=tn){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){r();return}hi({type:"video",sourceUpdater:this,action:di.remove(e,i),doneFn:r,name:"remove"})}updating(){return!!(kl("audio",this)||kl("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(hi({type:"audio",sourceUpdater:this,action:di.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(hi({type:"video",sourceUpdater:this,action:di.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&hi({type:"audio",sourceUpdater:this,action:di.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&hi({type:"video",sourceUpdater:this,action:di.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),G5.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Zf(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Jd=s=>decodeURIComponent(escape(String.fromCharCode.apply(null,s))),Y5=s=>{const e=new Uint8Array(s);return Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("")},eh=new Uint8Array(`
219
+
220
+ `.split("").map(s=>s.charCodeAt(0)));class X5 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class K5 extends Sl{constructor(e,i={}){super(e,i),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return It();const e=this.subtitlesTrack_.cues,i=e[0].startTime,r=e[e.length-1].startTime;return It([[i,r]])}initSegmentForMap(e,i=!1){if(!e)return null;const r=ba(e);let a=this.initSegments_[r];if(i&&!a&&e.bytes){const o=eh.byteLength+e.bytes.byteLength,l=new Uint8Array(o);l.set(e.bytes),l.set(eh,e.bytes.byteLength),this.initSegments_[r]=a={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:l}}return a||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)}remove(e,i){Kr(e,i,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const i=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",i),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,i,r){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(i.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===Hi.TIMEOUT&&this.handleTimeout_(),e.code===Hi.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const a=this.pendingSegment_,o=r.mp4VttCues&&r.mp4VttCues.length;o&&(a.mp4VttCues=r.mp4VttCues),this.saveBandwidthRelatedStats_(a.duration,i.stats),i.key&&this.segmentKey(i.key,!0),this.state="APPENDING",this.trigger("appending");const l=a.segment;if(l.map&&(l.map.bytes=i.map.bytes),a.bytes=i.bytes,typeof W.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,i,r),()=>this.stopForError({message:"Error loading vtt.js"}));return}l.requested=!0;try{this.parseVTTCues_(a)}catch(u){this.stopForError({message:u.message,metadata:{errorType:ne.Error.StreamingVttParserError,error:u}});return}if(o||this.updateTimeMapping_(a,this.syncController_.timelines[a.timeline],this.playlist_),a.cues.length?a.timingInfo={start:a.cues[0].startTime,end:a.cues[a.cues.length-1].endTime}:a.timingInfo={start:a.startOfSegment,end:a.startOfSegment+a.duration},a.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}a.byteLength=a.bytes.byteLength,this.mediaSecondsLoaded+=l.duration,a.cues.forEach(u=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new W.VTTCue(u.startTime,u.endTime,u.text):u)}),O5(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,i){const r=e&&e.type==="vtt",a=i&&i.type==="text";r&&a&&super.handleData_(e,i)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const i=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(r=>{const a=r.start+i,o=r.end+i,l=new W.VTTCue(a,o,r.cueText);r.settings&&r.settings.split(" ").forEach(u=>{const d=u.split(":"),f=d[0],g=d[1];l[f]=isNaN(g)?g:Number(g)}),e.cues.push(l)})}parseVTTCues_(e){let i,r=!1;if(typeof W.WebVTT!="function")throw new X5;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof W.TextDecoder=="function"?i=new W.TextDecoder("utf8"):(i=W.WebVTT.StringDecoder(),r=!0);const a=new W.WebVTT.Parser(W,W.vttjs,i);if(a.oncue=e.cues.push.bind(e.cues),a.ontimestampmap=l=>{e.timestampmap=l},a.onparsingerror=l=>{ne.log.warn("Error encountered when parsing cues: "+l.message)},e.segment.map){let l=e.segment.map.bytes;r&&(l=Jd(l)),a.parse(l)}let o=e.bytes;r&&(o=Jd(o)),a.parse(o),a.flush()}updateTimeMapping_(e,i,r){const a=e.segment;if(!i)return;if(!e.cues.length){a.empty=!0;return}const{MPEGTS:o,LOCAL:l}=e.timestampmap,d=o/Nn.ONE_SECOND_IN_TS-l+i.mapping;if(e.cues.forEach(f=>{const g=f.endTime-f.startTime,v=this.handleRollover_(f.startTime+d,i.time);f.startTime=Math.max(v,0),f.endTime=Math.max(v+g,0)}),!r.syncInfo){const f=e.cues[0].startTime,g=e.cues[e.cues.length-1].startTime;r.syncInfo={mediaSequence:r.mediaSequence+e.mediaIndex,time:Math.min(f,g-a.duration)}}}handleRollover_(e,i){if(i===null)return e;let r=e*Nn.ONE_SECOND_IN_TS;const a=i*Nn.ONE_SECOND_IN_TS;let o;for(a<r?o=-8589934592:o=8589934592;Math.abs(r-a)>4294967296;)r+=o;return r/Nn.ONE_SECOND_IN_TS}}const Q5=function(s,e){const i=s.cues;for(let r=0;r<i.length;r++){const a=i[r];if(e>=a.adStartTime&&e<=a.adEndTime)return a}return null},Z5=function(s,e,i=0){if(!s.segments)return;let r=i,a;for(let o=0;o<s.segments.length;o++){const l=s.segments[o];if(a||(a=Q5(e,r+l.duration/2)),a){if("cueIn"in l){a.endTime=r,a.adEndTime=r,r+=l.duration,a=null;continue}if(r<a.endTime){r+=l.duration;continue}a.endTime+=l.duration}else if("cueOut"in l&&(a=new W.VTTCue(r,r+l.duration,l.cueOut),a.adStartTime=r,a.adEndTime=r+parseFloat(l.cueOut),e.addCue(a)),"cueOutCont"in l){const[u,d]=l.cueOutCont.split("/").map(parseFloat);a=new W.VTTCue(r,r+l.duration,""),a.adStartTime=r-u,a.adEndTime=a.adStartTime+d,e.addCue(a)}r+=l.duration}};class th{constructor({start:e,end:i,segmentIndex:r,partIndex:a=null,appended:o=!1}){this.start_=e,this.end_=i,this.segmentIndex_=r,this.partIndex_=a,this.appended_=o}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class J5{constructor(e,i=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=i}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach(e=>e.resetAppendedStatus())}}class ep{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach(e=>e.resetAppendStatus())}update(e,i){const{mediaSequence:r,segments:a}=e;if(this.isReliable_=this.isReliablePlaylist_(r,a),!!this.isReliable_)return this.updateStorage_(a,r,this.calculateBaseTime_(r,a,i))}getSyncInfoForTime(e){for(const{segmentSyncInfo:i,partsSyncInfo:r}of this.storage_.values())if(r.length){for(const a of r)if(a.isInRange(e))return a}else if(i.isInRange(e))return i;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,i,r){const a=new Map;let o=`
221
+ `,l=r,u=i;this.start_=l,e.forEach((d,f)=>{const g=this.storage_.get(u),v=l,S=v+d.duration,C=!!(g&&g.segmentSyncInfo&&g.segmentSyncInfo.isAppended),O=new th({start:v,end:S,appended:C,segmentIndex:f});d.syncInfo=O;let T=l;const w=(d.parts||[]).map((R,L)=>{const D=T,M=T+R.duration,U=!!(g&&g.partsSyncInfo&&g.partsSyncInfo[L]&&g.partsSyncInfo[L].isAppended),Y=new th({start:D,end:M,appended:U,segmentIndex:f,partIndex:L});return T=M,o+=`Media Sequence: ${u}.${L} | Range: ${D} --> ${M} | Appended: ${U}
222
+ `,R.syncInfo=Y,Y});a.set(u,new J5(O,w)),o+=`${Kf(d.resolvedUri)} | Media Sequence: ${u} | Range: ${v} --> ${S} | Appended: ${C}
223
+ `,u++,l=S}),this.end_=l,this.storage_=a,this.diagnostics_=o}calculateBaseTime_(e,i,r){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const a=Math.min(...this.storage_.keys());if(e<a){const o=a-e;let l=this.storage_.get(a).segmentSyncInfo.start;for(let u=0;u<o;u++){const d=i[u];l-=d.duration}return l}return r}isReliablePlaylist_(e,i){return e!=null&&Array.isArray(i)&&i.length}}class ih extends ep{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,i,r){if(!this.storage_.size){const a=this.parent_.getSyncInfoForMediaSequence(e);return a?a.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,i,r)}}const eE=86400,Xo=[{name:"VOD",run:(s,e,i,r,a)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(s,e,i,r,a,o)=>{const l=s.getMediaSequenceSync(o);if(!l||!l.isReliable)return null;const u=l.getSyncInfoForTime(a);return u?{time:u.start,partIndex:u.partIndex,segmentIndex:u.segmentIndex}:null}},{name:"ProgramDateTime",run:(s,e,i,r,a)=>{if(!Object.keys(s.timelineToDatetimeMappings).length)return null;let o=null,l=null;const u=gl(e);a=a||0;for(let d=0;d<u.length;d++){const f=e.endList||a===0?d:u.length-(d+1),g=u[f],v=g.segment,S=s.timelineToDatetimeMappings[v.timeline];if(!S||!v.dateTimeObject)continue;let O=v.dateTimeObject.getTime()/1e3+S;if(v.parts&&typeof g.partIndex=="number")for(let w=0;w<g.partIndex;w++)O+=v.parts[w].duration;const T=Math.abs(a-O);if(l!==null&&(T===0||l<T))break;l=T,o={time:O,segmentIndex:g.segmentIndex,partIndex:g.partIndex}}return o}},{name:"Segment",run:(s,e,i,r,a)=>{let o=null,l=null;a=a||0;const u=gl(e);for(let d=0;d<u.length;d++){const f=e.endList||a===0?d:u.length-(d+1),g=u[f],v=g.segment,S=g.part&&g.part.start||v&&v.start;if(v.timeline===r&&typeof S<"u"){const C=Math.abs(a-S);if(l!==null&&l<C)break;(!o||l===null||l>=C)&&(l=C,o={time:S,segmentIndex:g.segmentIndex,partIndex:g.partIndex})}}return o}},{name:"Discontinuity",run:(s,e,i,r,a)=>{let o=null;if(a=a||0,e.discontinuityStarts&&e.discontinuityStarts.length){let l=null;for(let u=0;u<e.discontinuityStarts.length;u++){const d=e.discontinuityStarts[u],f=e.discontinuitySequence+u+1,g=s.discontinuities[f];if(g){const v=Math.abs(a-g.time);if(l!==null&&l<v)break;(!o||l===null||l>=v)&&(l=v,o={time:g.time,segmentIndex:d,partIndex:null})}}}return o}},{name:"Playlist",run:(s,e,i,r,a)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class tE extends ne.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const i=new ep,r=new ih(i),a=new ih(i);this.mediaSequenceStorage_={main:i,audio:r,vtt:a},this.logger_=bi("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,i,r,a,o){if(i!==1/0)return Xo.find(({name:d})=>d==="VOD").run(this,e,i);const l=this.runStrategies_(e,i,r,a,o);if(!l.length)return null;for(const u of l){const{syncPoint:d,strategy:f}=u,{segmentIndex:g,time:v}=d;if(g<0)continue;const S=e.segments[g],C=v,O=C+S.duration;if(this.logger_(`Strategy: ${f}. Current time: ${a}. selected segment: ${g}. Time: [${C} -> ${O}]}`),a>=C&&a<O)return this.logger_("Found sync point with exact match: ",d),d}return this.selectSyncPoint_(l,{key:"time",value:a})}getExpiredTime(e,i){if(!e||!e.segments)return null;const r=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!r.length)return null;const a=this.selectSyncPoint_(r,{key:"segmentIndex",value:0});return a.segmentIndex>0&&(a.time*=-1),Math.abs(a.time+ts({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:a.segmentIndex,endIndex:0}))}runStrategies_(e,i,r,a,o){const l=[];for(let u=0;u<Xo.length;u++){const d=Xo[u],f=d.run(this,e,i,r,a,o);f&&(f.strategy=d.name,l.push({strategy:d.name,syncPoint:f}))}return l}selectSyncPoint_(e,i){let r=e[0].syncPoint,a=Math.abs(e[0].syncPoint[i.key]-i.value),o=e[0].strategy;for(let l=1;l<e.length;l++){const u=Math.abs(e[l].syncPoint[i.key]-i.value);u<a&&(a=u,r=e[l].syncPoint,o=e[l].strategy)}return this.logger_(`syncPoint for [${i.key}: ${i.value}] chosen with strategy [${o}]: [time:${r.time}, segmentIndex:${r.segmentIndex}`+(typeof r.partIndex=="number"?`,partIndex:${r.partIndex}`:"")+"]"),r}saveExpiredSegmentInfo(e,i){const r=i.mediaSequence-e.mediaSequence;if(r>eE){ne.log.warn(`Not saving expired segment info. Media sequence gap ${r} is too large.`);return}for(let a=r-1;a>=0;a--){const o=e.segments[a];if(o&&typeof o.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+a,time:o.start},this.logger_(`playlist refresh sync: [time:${i.syncInfo.time}, mediaSequence: ${i.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const i=e.segments[0],r=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-r}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:i}){const r=this.calculateSegmentTimeMapping_(e,e.timingInfo,i),a=e.segment;r&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:a.start}));const o=a.dateTimeObject;a.discontinuity&&i&&o&&(this.timelineToDatetimeMappings[a.timeline]=-(o.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,i,r){const a=e.segment,o=e.part;let l=this.timelines[e.timeline],u,d;if(typeof e.timestampOffset=="number")l={time:e.startOfSegment,mapping:e.startOfSegment-i.start},r&&(this.timelines[e.timeline]=l,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${l.time}] [mapping: ${l.mapping}]`)),u=e.startOfSegment,d=i.end+l.mapping;else if(l)u=i.start+l.mapping,d=i.end+l.mapping;else return!1;return o&&(o.start=u,o.end=d),(!a.start||u<a.start)&&(a.start=u),a.end=d,!0}saveDiscontinuitySyncInfo_(e){const i=e.playlist,r=e.segment;if(r.discontinuity)this.discontinuities[r.timeline]={time:r.start,accuracy:0};else if(i.discontinuityStarts&&i.discontinuityStarts.length)for(let a=0;a<i.discontinuityStarts.length;a++){const o=i.discontinuityStarts[a],l=i.discontinuitySequence+a+1,u=o-e.mediaIndex,d=Math.abs(u);if(!this.discontinuities[l]||this.discontinuities[l].accuracy>d){let f;u<0?f=r.start-ts({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:o}):f=r.end+ts({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:o}),this.discontinuities[l]={time:f,accuracy:d}}}}dispose(){this.trigger("dispose"),this.off()}}class iE extends ne.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:i,to:r}){return typeof i=="number"&&typeof r=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:i,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:i,to:r}){if(typeof i=="number"&&typeof r=="number"){this.lastTimelineChanges_[e]={type:e,from:i,to:r},delete this.pendingTimelineChanges_[e];const a={timelineChangeInfo:{from:i,to:r}};this.trigger({type:"timelinechange",metadata:a})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const nE=Ff($f(function(){var s=(function(){function T(){this.listeners={}}var w=T.prototype;return w.on=function(L,D){this.listeners[L]||(this.listeners[L]=[]),this.listeners[L].push(D)},w.off=function(L,D){if(!this.listeners[L])return!1;var M=this.listeners[L].indexOf(D);return this.listeners[L]=this.listeners[L].slice(0),this.listeners[L].splice(M,1),M>-1},w.trigger=function(L){var D=this.listeners[L];if(D)if(arguments.length===2)for(var M=D.length,U=0;U<M;++U)D[U].call(this,arguments[1]);else for(var Y=Array.prototype.slice.call(arguments,1),P=D.length,J=0;J<P;++J)D[J].apply(this,Y)},w.dispose=function(){this.listeners={}},w.pipe=function(L){this.on("data",function(D){L.push(D)})},T})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(T){return T.subarray(0,T.byteLength-T[T.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const i=function(){const T=[[[],[],[],[],[]],[[],[],[],[],[]]],w=T[0],R=T[1],L=w[4],D=R[4];let M,U,Y;const P=[],J=[];let b,x,q,H,k,A;for(M=0;M<256;M++)J[(P[M]=M<<1^(M>>7)*283)^M]=M;for(U=Y=0;!L[U];U^=b||1,Y=J[Y]||1)for(H=Y^Y<<1^Y<<2^Y<<3^Y<<4,H=H>>8^H&255^99,L[U]=H,D[H]=U,q=P[x=P[b=P[U]]],A=q*16843009^x*65537^b*257^U*16843008,k=P[H]*257^H*16843008,M=0;M<4;M++)w[M][U]=k=k<<24^k>>>8,R[M][H]=A=A<<24^A>>>8;for(M=0;M<5;M++)w[M]=w[M].slice(0),R[M]=R[M].slice(0);return T};let r=null;class a{constructor(w){r||(r=i()),this._tables=[[r[0][0].slice(),r[0][1].slice(),r[0][2].slice(),r[0][3].slice(),r[0][4].slice()],[r[1][0].slice(),r[1][1].slice(),r[1][2].slice(),r[1][3].slice(),r[1][4].slice()]];let R,L,D;const M=this._tables[0][4],U=this._tables[1],Y=w.length;let P=1;if(Y!==4&&Y!==6&&Y!==8)throw new Error("Invalid aes key size");const J=w.slice(0),b=[];for(this._key=[J,b],R=Y;R<4*Y+28;R++)D=J[R-1],(R%Y===0||Y===8&&R%Y===4)&&(D=M[D>>>24]<<24^M[D>>16&255]<<16^M[D>>8&255]<<8^M[D&255],R%Y===0&&(D=D<<8^D>>>24^P<<24,P=P<<1^(P>>7)*283)),J[R]=J[R-Y]^D;for(L=0;R;L++,R--)D=J[L&3?R:R-4],R<=4||L<4?b[L]=D:b[L]=U[0][M[D>>>24]]^U[1][M[D>>16&255]]^U[2][M[D>>8&255]]^U[3][M[D&255]]}decrypt(w,R,L,D,M,U){const Y=this._key[1];let P=w^Y[0],J=D^Y[1],b=L^Y[2],x=R^Y[3],q,H,k;const A=Y.length/4-2;let $,K=4;const j=this._tables[1],F=j[0],G=j[1],Z=j[2],ee=j[3],se=j[4];for($=0;$<A;$++)q=F[P>>>24]^G[J>>16&255]^Z[b>>8&255]^ee[x&255]^Y[K],H=F[J>>>24]^G[b>>16&255]^Z[x>>8&255]^ee[P&255]^Y[K+1],k=F[b>>>24]^G[x>>16&255]^Z[P>>8&255]^ee[J&255]^Y[K+2],x=F[x>>>24]^G[P>>16&255]^Z[J>>8&255]^ee[b&255]^Y[K+3],K+=4,P=q,J=H,b=k;for($=0;$<4;$++)M[(3&-$)+U]=se[P>>>24]<<24^se[J>>16&255]<<16^se[b>>8&255]<<8^se[x&255]^Y[K++],q=P,P=J,J=b,b=x,x=q}}class o extends s{constructor(){super(s),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(w){this.jobs.push(w),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const l=function(T){return T<<24|(T&65280)<<8|(T&16711680)>>8|T>>>24},u=function(T,w,R){const L=new Int32Array(T.buffer,T.byteOffset,T.byteLength>>2),D=new a(Array.prototype.slice.call(w)),M=new Uint8Array(T.byteLength),U=new Int32Array(M.buffer);let Y,P,J,b,x,q,H,k,A;for(Y=R[0],P=R[1],J=R[2],b=R[3],A=0;A<L.length;A+=4)x=l(L[A]),q=l(L[A+1]),H=l(L[A+2]),k=l(L[A+3]),D.decrypt(x,q,H,k,U,A),U[A]=l(U[A]^Y),U[A+1]=l(U[A+1]^P),U[A+2]=l(U[A+2]^J),U[A+3]=l(U[A+3]^b),Y=x,P=q,J=H,b=k;return M};class d{constructor(w,R,L,D){const M=d.STEP,U=new Int32Array(w.buffer),Y=new Uint8Array(w.byteLength);let P=0;for(this.asyncStream_=new o,this.asyncStream_.push(this.decryptChunk_(U.subarray(P,P+M),R,L,Y)),P=M;P<U.length;P+=M)L=new Uint32Array([l(U[P-4]),l(U[P-3]),l(U[P-2]),l(U[P-1])]),this.asyncStream_.push(this.decryptChunk_(U.subarray(P,P+M),R,L,Y));this.asyncStream_.push(function(){D(null,e(Y))})}static get STEP(){return 32e3}decryptChunk_(w,R,L,D){return function(){const M=u(w,R,L);D.set(M,w.byteOffset)}}}var f=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},g;typeof window<"u"?g=window:typeof f<"u"?g=f:typeof self<"u"?g=self:g={};var v=g,S=function(w){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(w):w&&w.buffer instanceof ArrayBuffer},C=v.BigInt||Number;C("0x1"),C("0x100"),C("0x10000"),C("0x1000000"),C("0x100000000"),C("0x10000000000"),C("0x1000000000000"),C("0x100000000000000"),C("0x10000000000000000"),(function(){var T=new Uint16Array([65484]),w=new Uint8Array(T.buffer,T.byteOffset,T.byteLength);return w[0]===255?"big":w[0]===204?"little":"unknown"})();const O=function(T){const w={};return Object.keys(T).forEach(R=>{const L=T[R];S(L)?w[R]={bytes:L.buffer,byteOffset:L.byteOffset,byteLength:L.byteLength}:w[R]=L}),w};self.onmessage=function(T){const w=T.data,R=new Uint8Array(w.encrypted.bytes,w.encrypted.byteOffset,w.encrypted.byteLength),L=new Uint32Array(w.key.bytes,w.key.byteOffset,w.key.byteLength/4),D=new Uint32Array(w.iv.bytes,w.iv.byteOffset,w.iv.byteLength/4);new d(R,L,D,function(M,U){self.postMessage(O({source:w.source,decrypted:U}),[U.buffer])})}}));var rE=Vf(nE);const sE=s=>{let e=s.default?"main":"alternative";return s.characteristics&&s.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},tp=(s,e)=>{s.abort(),s.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},wl=(s,e)=>{e.activePlaylistLoader=s,s.load()},aE=(s,e)=>()=>{const{segmentLoaders:{[s]:i,main:r},mediaTypes:{[s]:a}}=e,o=a.activeTrack(),l=a.getActiveGroup(),u=a.activePlaylistLoader,d=a.lastGroup_;if(!(l&&d&&l.id===d.id)&&(a.lastGroup_=l,a.lastTrack_=o,tp(i,a),!(!l||l.isMainPlaylist))){if(!l.playlistLoader){u&&r.resetEverything();return}i.resyncLoader(),wl(l.playlistLoader,a)}},oE=(s,e)=>()=>{const{segmentLoaders:{[s]:i},mediaTypes:{[s]:r}}=e;r.lastGroup_=null,i.abort(),i.pause()},lE=(s,e)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[s]:r,main:a},mediaTypes:{[s]:o}}=e,l=o.activeTrack(),u=o.getActiveGroup(),d=o.activePlaylistLoader,f=o.lastTrack_;if(!(f&&l&&f.id===l.id)&&(o.lastGroup_=u,o.lastTrack_=l,tp(r,o),!!u)){if(u.isMainPlaylist){if(!l||!f||l.id===f.id)return;const g=e.vhs.playlistController_,v=g.selectPlaylist();if(g.media()===v)return;o.logger_(`track change. Switching main audio from ${f.id} to ${l.id}`),i.pause(),a.resetEverything(),g.fastQualityChange_(v);return}if(s==="AUDIO"){if(!u.playlistLoader){a.setAudio(!0),a.resetEverything();return}r.setAudio(!0),a.setAudio(!1)}if(d===u.playlistLoader){wl(u.playlistLoader,o);return}r.track&&r.track(l),r.resetEverything(),wl(u.playlistLoader,o)}},xa={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:i},excludePlaylist:r}=e,a=i.activeTrack(),o=i.activeGroup(),l=(o.filter(d=>d.default)[0]||o[0]).id,u=i.tracks[l];if(a===u){r({error:{message:"Problem encountered loading the default audio track."}});return}ne.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const d in i.tracks)i.tracks[d].enabled=i.tracks[d]===u;i.onTrackChanged()},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:i}}=e;ne.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const r=i.activeTrack();r&&(r.mode="disabled"),i.onTrackChanged()}},nh={AUDIO:(s,e,i)=>{if(!e)return;const{tech:r,requestOptions:a,segmentLoaders:{[s]:o}}=i;e.on("loadedmetadata",()=>{const l=e.media();o.playlist(l,a),(!r.paused()||l.endList&&r.preload()!=="none")&&o.load()}),e.on("loadedplaylist",()=>{o.playlist(e.media(),a),r.paused()||o.load()}),e.on("error",xa[s](s,i))},SUBTITLES:(s,e,i)=>{const{tech:r,requestOptions:a,segmentLoaders:{[s]:o},mediaTypes:{[s]:l}}=i;e.on("loadedmetadata",()=>{const u=e.media();o.playlist(u,a),o.track(l.activeTrack()),(!r.paused()||u.endList&&r.preload()!=="none")&&o.load()}),e.on("loadedplaylist",()=>{o.playlist(e.media(),a),r.paused()||o.load()}),e.on("error",xa[s](s,i))}},uE={AUDIO:(s,e)=>{const{vhs:i,sourceType:r,segmentLoaders:{[s]:a},requestOptions:o,main:{mediaGroups:l},mediaTypes:{[s]:{groups:u,tracks:d,logger_:f}},mainPlaylistLoader:g}=e,v=fs(g.main);(!l[s]||Object.keys(l[s]).length===0)&&(l[s]={main:{default:{default:!0}}},v&&(l[s].main.default.playlists=g.main.playlists));for(const S in l[s]){u[S]||(u[S]=[]);for(const C in l[s][S]){let O=l[s][S][C],T;if(v?(f(`AUDIO group '${S}' label '${C}' is a main playlist`),O.isMainPlaylist=!0,T=null):r==="vhs-json"&&O.playlists?T=new Kn(O.playlists[0],i,o):O.resolvedUri?T=new Kn(O.resolvedUri,i,o):O.playlists&&r==="dash"?T=new xl(O.playlists[0],i,o,g):T=null,O=st({id:C,playlistLoader:T},O),nh[s](s,O.playlistLoader,e),u[S].push(O),typeof d[C]>"u"){const w=new ne.AudioTrack({id:C,kind:sE(O),enabled:!1,language:O.language,default:O.default,label:C});d[C]=w}}}a.on("error",xa[s](s,e))},SUBTITLES:(s,e)=>{const{tech:i,vhs:r,sourceType:a,segmentLoaders:{[s]:o},requestOptions:l,main:{mediaGroups:u},mediaTypes:{[s]:{groups:d,tracks:f}},mainPlaylistLoader:g}=e;for(const v in u[s]){d[v]||(d[v]=[]);for(const S in u[s][v]){if(!r.options_.useForcedSubtitles&&u[s][v][S].forced)continue;let C=u[s][v][S],O;if(a==="hls")O=new Kn(C.resolvedUri,r,l);else if(a==="dash"){if(!C.playlists.filter(w=>w.excludeUntil!==1/0).length)return;O=new xl(C.playlists[0],r,l,g)}else a==="vhs-json"&&(O=new Kn(C.playlists?C.playlists[0]:C.resolvedUri,r,l));if(C=st({id:S,playlistLoader:O},C),nh[s](s,C.playlistLoader,e),d[v].push(C),typeof f[S]>"u"){const T=i.addRemoteTextTrack({id:S,kind:"subtitles",default:C.default&&C.autoselect,language:C.language,label:S},!1).track;f[S]=T}}}o.on("error",xa[s](s,e))},"CLOSED-CAPTIONS":(s,e)=>{const{tech:i,main:{mediaGroups:r},mediaTypes:{[s]:{groups:a,tracks:o}}}=e;for(const l in r[s]){a[l]||(a[l]=[]);for(const u in r[s][l]){const d=r[s][l][u];if(!/^(?:CC|SERVICE)/.test(d.instreamId))continue;const f=i.options_.vhs&&i.options_.vhs.captionServices||{};let g={label:u,language:d.language,instreamId:d.instreamId,default:d.default&&d.autoselect};if(f[g.instreamId]&&(g=st(g,f[g.instreamId])),g.default===void 0&&delete g.default,a[l].push(st({id:u},d)),typeof o[u]>"u"){const v=i.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;o[u]=v}}}}},ip=(s,e)=>{for(let i=0;i<s.length;i++)if(mu(e,s[i])||s[i].playlists&&ip(s[i].playlists,e))return!0;return!1},cE=(s,e)=>i=>{const{mainPlaylistLoader:r,mediaTypes:{[s]:{groups:a}}}=e,o=r.media();if(!o)return null;let l=null;o.attributes[s]&&(l=a[o.attributes[s]]);const u=Object.keys(a);if(!l)if(s==="AUDIO"&&u.length>1&&fs(e.main))for(let d=0;d<u.length;d++){const f=a[u[d]];if(ip(f,o)){l=f;break}}else a.main?l=a.main:u.length===1&&(l=a[u[0]]);return typeof i>"u"?l:i===null||!l?null:l.filter(d=>d.id===i.id)[0]||null},dE={AUDIO:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:i}}}=e;for(const r in i)if(i[r].enabled)return i[r];return null},SUBTITLES:(s,e)=>()=>{const{mediaTypes:{[s]:{tracks:i}}}=e;for(const r in i)if(i[r].mode==="showing"||i[r].mode==="hidden")return i[r];return null}},hE=(s,{mediaTypes:e})=>()=>{const i=e[s].activeTrack();return i?e[s].activeGroup(i):null},fE=s=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(f=>{uE[f](f,s)});const{mediaTypes:e,mainPlaylistLoader:i,tech:r,vhs:a,segmentLoaders:{["AUDIO"]:o,main:l}}=s;["AUDIO","SUBTITLES"].forEach(f=>{e[f].activeGroup=cE(f,s),e[f].activeTrack=dE[f](f,s),e[f].onGroupChanged=aE(f,s),e[f].onGroupChanging=oE(f,s),e[f].onTrackChanged=lE(f,s),e[f].getActiveGroup=hE(f,s)});const u=e.AUDIO.activeGroup();if(u){const f=(u.filter(v=>v.default)[0]||u[0]).id;e.AUDIO.tracks[f].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(l.setAudio(!1),o.setAudio(!0)):l.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(f=>e[f].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(f=>e[f].onGroupChanging())});const d=()=>{e.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"})};r.audioTracks().addEventListener("change",d),r.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),a.on("dispose",()=>{r.audioTracks().removeEventListener("change",d),r.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),r.clearTracks("audio");for(const f in e.AUDIO.tracks)r.audioTracks().addTrack(e.AUDIO.tracks[f])},pE=()=>{const s={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{s[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:tn,activeTrack:tn,getActiveGroup:tn,onGroupChanged:tn,onTrackChanged:tn,lastTrack_:null,logger_:bi(`MediaGroups[${e}]`)}}),s};class rh{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ai(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(i=>[i.ID,i])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class mE extends ne.EventTarget{constructor(e,i){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new rh,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=bi("Content Steering"),this.xhr_=e,this.getBandwidth_=i}assignTagProperties(e,i){this.manifestType_=i.serverUri?"HLS":"DASH";const r=i.serverUri||i.serverURL;if(!r){this.logger_(`steering manifest URL is ${r}, cannot request steering manifest.`),this.trigger("error");return}if(r.startsWith("data:")){this.decodeDataUriManifest_(r.substring(r.indexOf(",")+1));return}this.steeringManifest.reloadUri=ai(e,r),this.defaultPathway=i.pathwayId||i.defaultServiceLocation,this.queryBeforeStart=i.queryBeforeStart,this.proxyServerUrl_=i.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const i=this.steeringManifest.reloadUri;if(!i)return;const r=e?i:this.getRequestURI(i);if(!r){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const a={contentSteeringInfo:{uri:r}};this.trigger({type:"contentsteeringloadstart",metadata:a}),this.request_=this.xhr_({uri:r,requestType:"content-steering-manifest"},(o,l)=>{if(o){if(l.status===410){this.logger_(`manifest request 410 ${o}.`),this.logger_(`There will be no more content steering requests to ${r} this session.`),this.excludedSteeringManifestURLs.add(r);return}if(l.status===429){const f=l.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${o}.`),this.logger_(`content steering will retry in ${f} seconds.`),this.startTTLTimeout_(parseInt(f,10));return}this.logger_(`manifest failed to load ${o}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:a});let u;try{u=JSON.parse(this.request_.responseText)}catch(f){const g={errorType:ne.Error.StreamingContentSteeringParserError,error:f};this.trigger({type:"error",metadata:g})}this.assignSteeringProperties_(u);const d={contentSteeringInfo:a.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:d}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const i=new W.URL(e),r=new W.URL(this.proxyServerUrl_);return r.searchParams.set("url",encodeURI(i.toString())),this.setSteeringParams_(r.toString())}decodeDataUriManifest_(e){const i=JSON.parse(W.atob(e));this.assignSteeringProperties_(i)}setSteeringParams_(e){const i=new W.URL(e),r=this.getPathway(),a=this.getBandwidth_();if(r){const o=`_${this.manifestType_}_pathway`;i.searchParams.set(o,r)}if(a){const o=`_${this.manifestType_}_throughput`;i.searchParams.set(o,a)}return i.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const r=(a=>{for(const o of a)if(this.availablePathways_.has(o))return o;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==r&&(this.currentPathway=r,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const i=a=>this.excludedSteeringManifestURLs.has(a);if(this.proxyServerUrl_){const a=this.setProxyServerUrl_(e);if(!i(a))return a}const r=this.setSteeringParams_(e);return i(r)?null:r}startTTLTimeout_(e=this.steeringManifest.ttl){const i=e*1e3;this.ttlTimeout_=W.setTimeout(()=>{this.requestSteeringManifest()},i)}clearTTLTimeout_(){W.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new rh}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,i){return!i&&this.steeringManifest.reloadUri||i&&(ai(e,i.serverURL)!==this.steeringManifest.reloadUri||i.defaultServiceLocation!==this.defaultPathway||i.queryBeforeStart!==this.queryBeforeStart||i.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const gE=(s,e)=>{let i=null;return(...r)=>{clearTimeout(i),i=setTimeout(()=>{s.apply(null,r)},e)}},vE=10;let Zi;const _E=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],yE=function(s){return this.audioSegmentLoader_[s]+this.mainSegmentLoader_[s]},TE=function({currentPlaylist:s,buffered:e,currentTime:i,nextPlaylist:r,bufferLowWaterLine:a,bufferHighWaterLine:o,duration:l,bufferBasedABR:u,log:d}){if(!r)return ne.log.warn("We received no playlist to switch to. Please check your stream."),!1;const f=`allowing switch ${s&&s.id||"null"} -> ${r.id}`;if(!s)return d(`${f} as current playlist is not set`),!0;if(r.id===s.id)return!1;const g=!!Xn(e,i).length;if(!s.endList)return!g&&typeof s.partTargetDuration=="number"?(d(`not ${f} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(d(`${f} as current playlist is live`),!0);const v=hu(e,i),S=u?At.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:At.MAX_BUFFER_LOW_WATER_LINE;if(l<S)return d(`${f} as duration < max low water line (${l} < ${S})`),!0;const C=r.attributes.BANDWIDTH,O=s.attributes.BANDWIDTH;if(C<O&&(!u||v<o)){let T=`${f} as next bandwidth < current bandwidth (${C} < ${O})`;return u&&(T+=` and forwardBuffer < bufferHighWaterLine (${v} < ${o})`),d(T),!0}if((!u||C>O)&&v>=a){let T=`${f} as forwardBuffer >= bufferLowWaterLine (${v} >= ${a})`;return u&&(T+=` and next bandwidth > current bandwidth (${C} > ${O})`),d(T),!0}return d(`not ${f} as no switching criteria met`),!1};class bE extends ne.EventTarget{constructor(e){super(),this.fastQualityChange_=gE(this.fastQualityChange_.bind(this),100);const{src:i,withCredentials:r,tech:a,bandwidth:o,externVhs:l,useCueTags:u,playlistExclusionDuration:d,enableLowInitialPlaylist:f,sourceType:g,cacheEncryptionKeys:v,bufferBasedABR:S,leastPixelDiffSelector:C,captionServices:O,experimentalUseMMS:T}=e;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:w}=e;(w===null||typeof w>"u")&&(w=1/0),Zi=l,this.bufferBasedABR=!!S,this.leastPixelDiffSelector=!!C,this.withCredentials=r,this.tech_=a,this.vhs_=a.vhs,this.player_=e.player_,this.sourceType_=g,this.useCueTags_=u,this.playlistExclusionDuration=d,this.maxPlaylistRetries=w,this.enableLowInitialPlaylist=f,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:r,maxPlaylistRetries:w,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=pE(),T&&W.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new W.ManagedMediaSource,this.usingManagedMediaSource_=!0,ne.log("Using ManagedMediaSource")):W.MediaSource&&(this.mediaSource=new W.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=It(),this.hasPlayed_=!1,this.syncController_=new tE(e),this.segmentMetadataTrack_=a.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new rE,this.sourceUpdater_=new Jf(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new iE,this.keyStatusMap_=new Map;const R={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:O,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:o,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:v,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new xl(i,this.vhs_,st(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Kn(i,this.vhs_,st(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Sl(st(R,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Sl(st(R,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new K5(st(R,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((M,U)=>{function Y(){a.off("vttjserror",P),M()}function P(){a.off("vttjsloaded",Y),U()}a.one("vttjsloaded",Y),a.one("vttjserror",P),a.addWebVttScript_()})}),e);const L=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new mE(this.vhs_.xhr,L),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),_E.forEach(M=>{this[M+"_"]=yE.bind(this,M)}),this.logger_=bi("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const D=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(D,()=>{const M=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-M,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),i=this.audioAppendsToLoadedData_();return e===-1||i===-1?-1:e+i}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const i=this.selectPlaylist();i&&this.shouldSwitchToMedia_(i)&&this.switchMedia_(i,e)}switchMedia_(e,i,r){const a=this.media(),o=a&&(a.id||a.uri),l=e&&(e.id||e.uri);if(o&&o!==l){this.logger_(`switch media ${o} -> ${l} from ${i}`);const u={renditionInfo:{id:l,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:i};this.trigger({type:"renditionselected",metadata:u}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${i}`})}this.mainPlaylistLoader_.media(e,r)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const i=this.mediaTypes_[e],r=i?i.activeGroup():null,a=this.contentSteeringController_.getPathway();if(r&&a){const l=(r.length?r[0].playlists:r.playlists).filter(u=>u.attributes.serviceLocation===a);l.length&&this.mediaTypes_[e].activePlaylistLoader.media(l[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=W.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(W.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),i=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return i;const r=e.mediaGroups.AUDIO,a=Object.keys(r);let o;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)o=this.mediaTypes_.AUDIO.activeTrack();else{const u=r.main||a.length&&r[a[0]];for(const d in u)if(u[d].default){o={label:d};break}}if(!o)return i;const l=[];for(const u in r)if(r[u][o.label]){const d=r[u][o.label];if(d.playlists&&d.playlists.length)l.push.apply(l,d.playlists);else if(d.uri)l.push(d);else if(e.playlists.length)for(let f=0;f<e.playlists.length;f++){const g=e.playlists[f];g.attributes&&g.attributes.AUDIO&&g.attributes.AUDIO===u&&l.push(g)}}return l.length?l:i}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const i=this.mainPlaylistLoader_.media(),r=i.targetDuration*1.5*1e3;vl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,i.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.mainSegmentLoader_.load()),fE({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),i),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let i=this.mainPlaylistLoader_.media();if(!i){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let r;if(this.enableLowInitialPlaylist&&(r=this.selectInitialPlaylist()),r||(r=this.selectPlaylist()),!r||!this.shouldSwitchToMedia_(r)||(this.initialMedia_=r,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;i=this.initialMedia_}this.handleUpdatedMediaPlaylist(i)}),this.mainPlaylistLoader_.on("error",()=>{const i=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:i.playlist,error:i})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const i=this.mainPlaylistLoader_.media(),r=i.targetDuration*1.5*1e3;vl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=r,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const i=this.mainPlaylistLoader_.media();if(i.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(i)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(i=>{this.mainPlaylistLoader_.on(i,r=>{this.player_.trigger(xt({},r))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,i){const r=e.mediaGroups||{};let a=!0;const o=Object.keys(r.AUDIO);for(const l in r.AUDIO)for(const u in r.AUDIO[l])r.AUDIO[l][u].uri||(a=!1);a&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(r.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Zi.Playlist.isAes(i)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),o.length&&Object.keys(r.AUDIO[o[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const i=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,r=this.tech_.currentTime(),a=this.bufferLowWaterLine(),o=this.bufferHighWaterLine(),l=this.tech_.buffered();return TE({buffered:l,currentTime:r,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:a,bufferHighWaterLine:o,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const r=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:r.playlist,error:r})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const r=this.audioSegmentLoader_.pendingSegment_;if(!r||!r.segment||!r.segment.syncInfo)return;const a=r.segment.syncInfo.end+.01;this.tech_.setCurrentTime(a)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",r=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:vE}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const r=this.getCodecsOrExclude_();r&&this.sourceUpdater_.addOrChangeSourceBuffers(r)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(r=>{this.mainSegmentLoader_.on(r,a=>{this.player_.trigger(xt({},a))}),this.audioSegmentLoader_.on(r,a=>{this.player_.trigger(xt({},a))}),this.subtitleSegmentLoader_.on(r,a=>{this.player_.trigger(xt({},a))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const i=this.seekable();if(!i.length)return!1;const r=i.end(0);let a=r;if(e.start){const o=e.start.timeOffset;if(o<0){const l=this.mainPlaylistLoader_.main,u=Zi.Playlist.liveEdgeDelay(l,e),d=r+u;a=Math.max(Math.min(d+o,r),i.start(0))}else a=Math.min(r,o)}this.trigger("firstplay"),this.tech_.setCurrentTime(a)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,i=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const i=this.duration();e[e.length-1].endTime=isNaN(i)||Math.abs(i)===1/0?Number.MAX_VALUE:i}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const i=this.mainSegmentLoader_.getCurrentMediaInfo_();!i||i.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const r=this.syncController_.getExpiredTime(e,this.duration());if(r===null)return!1;const a=Zi.Playlist.playlistEnd(e,r),o=this.tech_.currentTime(),l=this.tech_.buffered();if(!l.length)return a-o<=ji;const u=l.end(l.length-1);return u-o<=ji&&a-u<=ji}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:i={},playlistExclusionDuration:r}){if(e=e||this.mainPlaylistLoader_.media(),r=r||i.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=i,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const a=this.mainPlaylistLoader_.main.playlists,o=a.filter(za),l=o.length===1&&o[0]===e;if(a.length===1&&r!==1/0)return ne.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(l);if(l){if(this.main().contentSteering){const O=this.pathwayAttribute_(e),T=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(O),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(O)},T);return}let C=!1;a.forEach(O=>{if(O===e)return;const T=O.excludeUntil;typeof T<"u"&&T!==1/0&&(C=!0,delete O.excludeUntil)}),C&&(ne.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let u;e.playlistErrors_>this.maxPlaylistRetries?u=1/0:u=Date.now()+r*1e3,e.excludeUntil=u,i.reason&&(e.lastExcludeReason_=i.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const d=this.selectPlaylist();if(!d){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const f=i.internal?this.logger_:ne.log.warn,g=i.message?" "+i.message:"";f(`${i.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${g} Switching to playlist ${d.id}.`),d.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),d.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const v=d.targetDuration/2*1e3||5*1e3,S=typeof d.lastRequest=="number"&&Date.now()-d.lastRequest<=v;return this.switchMedia_(d,"exclude",l||S)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,i){const r=[],a=e==="all";(a||e==="main")&&r.push(this.mainPlaylistLoader_);const o=[];(a||e==="audio")&&o.push("AUDIO"),(a||e==="subtitle")&&(o.push("CLOSED-CAPTIONS"),o.push("SUBTITLES")),o.forEach(l=>{const u=this.mediaTypes_[l]&&this.mediaTypes_[l].activePlaylistLoader;u&&r.push(u)}),["main","audio","subtitle"].forEach(l=>{const u=this[`${l}SegmentLoader_`];u&&(e===l||e==="all")&&r.push(u)}),r.forEach(l=>i.forEach(u=>{typeof l[u]=="function"&&l[u]()}))}setCurrentTime(e){const i=Xn(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(i&&i.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Zi.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,i){const r=e.media();if(!r)return null;const a=this.syncController_.getMediaSequenceSync(i);if(a&&a.isReliable){const u=a.start,d=a.end;if(!isFinite(u)||!isFinite(d))return null;const f=Zi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,r),g=Math.max(u,d-f);return It([[u,g]])}const o=this.syncController_.getExpiredTime(r,this.duration());if(o===null)return null;const l=Zi.Playlist.seekable(r,o,Zi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,r));return l.length?l:null}computeFinalSeekable_(e,i){if(!i)return e;const r=e.start(0),a=e.end(0),o=i.start(0),l=i.end(0);return o>a||r>l?e:It([[Math.max(r,o),Math.min(a,l)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let i;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(i=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!i))return;const r=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,i),!this.seekable_||r&&r.length&&this.seekable_.length&&r.start(0)===this.seekable_.start(0)&&r.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${hf(this.seekable_)}]`);const a={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:a}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const a=this.seekable();if(!a.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<a.end(a.length-1))&&this.sourceUpdater_.setDuration(a.end(a.length-1));return}const i=this.tech_.buffered();let r=Zi.Playlist.duration(this.mainPlaylistLoader_.media());i.length>0&&(r=Math.max(r,i.end(i.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const i=this.mediaTypes_[e].groups;for(const r in i)i[r].forEach(a=>{a.playlistLoader&&a.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,i=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),r=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!i||!r)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},i=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const r=is(this.main(),i),a={},o=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(a.video=r.video||e.main.videoCodec||u4),e.main.isMuxed&&(a.video+=`,${r.audio||e.main.audioCodec||Wc}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||o)&&(a.audio=r.audio||e.main.audioCodec||e.audio.audioCodec||Wc,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!a.audio&&!a.video){this.excludePlaylist({playlistToExclude:i,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const l=(f,g)=>f?Qr(g,this.usingManagedMediaSource_):Ao(g),u={};let d;if(["video","audio"].forEach(function(f){if(a.hasOwnProperty(f)&&!l(e[f].isFmp4,a[f])){const g=e[f].isFmp4?"browser":"muxer";u[g]=u[g]||[],u[g].push(a[f]),f==="audio"&&(d=g)}}),o&&d&&i.attributes.AUDIO){const f=i.attributes.AUDIO;this.main().playlists.forEach(g=>{(g.attributes&&g.attributes.AUDIO)===f&&g!==i&&(g.excludeUntil=1/0)}),this.logger_(`excluding audio group ${f} as ${d} does not support codec(s): "${a.audio}"`)}if(Object.keys(u).length){const f=Object.keys(u).reduce((g,v)=>(g&&(g+=", "),g+=`${v} does not support codec(s): "${u[v].join(",")}"`,g),"")+".";this.excludePlaylist({playlistToExclude:i,error:{internal:!0,message:f},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const f=[];if(["video","audio"].forEach(g=>{const v=(Fi(this.sourceUpdater_.codecs[g]||"")[0]||{}).type,S=(Fi(a[g]||"")[0]||{}).type;v&&S&&v.toLowerCase()!==S.toLowerCase()&&f.push(`"${this.sourceUpdater_.codecs[g]}" -> "${a[g]}"`)}),f.length){this.excludePlaylist({playlistToExclude:i,error:{message:`Codec switching not supported: ${f.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return a}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const i=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(i)}excludeUnsupportedVariants_(){const e=this.main().playlists,i=[];Object.keys(e).forEach(r=>{const a=e[r];if(i.indexOf(a.id)!==-1)return;i.push(a.id);const o=is(this.main,a),l=[];o.audio&&!Ao(o.audio)&&!Qr(o.audio,this.usingManagedMediaSource_)&&l.push(`audio codec ${o.audio}`),o.video&&!Ao(o.video)&&!Qr(o.video,this.usingManagedMediaSource_)&&l.push(`video codec ${o.video}`),o.text&&o.text==="stpp.ttml.im1t"&&l.push(`text codec ${o.text}`),l.length&&(a.excludeUntil=1/0,this.logger_(`excluding ${a.id} for unsupported: ${l.join(", ")}`))})}excludeIncompatibleVariants_(e){const i=[],r=this.main().playlists,a=os(Fi(e)),o=$d(a),l=a.video&&Fi(a.video)[0]||null,u=a.audio&&Fi(a.audio)[0]||null;Object.keys(r).forEach(d=>{const f=r[d];if(i.indexOf(f.id)!==-1||f.excludeUntil===1/0)return;i.push(f.id);const g=[],v=is(this.mainPlaylistLoader_.main,f),S=$d(v);if(!(!v.audio&&!v.video)){if(S!==o&&g.push(`codec count "${S}" !== "${o}"`),!this.sourceUpdater_.canChangeType()){const C=v.video&&Fi(v.video)[0]||null,O=v.audio&&Fi(v.audio)[0]||null;C&&l&&C.type.toLowerCase()!==l.type.toLowerCase()&&g.push(`video codec "${C.type}" !== "${l.type}"`),O&&u&&O.type.toLowerCase()!==u.type.toLowerCase()&&g.push(`audio codec "${O.type}" !== "${u.type}"`)}g.length&&(f.excludeUntil=1/0,this.logger_(`excluding ${f.id}: ${g.join(" && ")}`))}})}updateAdCues_(e){let i=0;const r=this.seekable();r.length&&(i=r.start(0)),Z5(e,this.cueTagsTrack_,i)}goalBufferLength(){const e=this.tech_.currentTime(),i=At.GOAL_BUFFER_LENGTH,r=At.GOAL_BUFFER_LENGTH_RATE,a=Math.max(i,At.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*r,a)}bufferLowWaterLine(){const e=this.tech_.currentTime(),i=At.BUFFER_LOW_WATER_LINE,r=At.BUFFER_LOW_WATER_LINE_RATE,a=Math.max(i,At.MAX_BUFFER_LOW_WATER_LINE),o=Math.max(i,At.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*r,this.bufferBasedABR?o:a)}bufferHighWaterLine(){return At.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Yd(this.inbandTextTracks_,"com.apple.streaming",this.tech_),I5({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,i,r){const a=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Yd(this.inbandTextTracks_,e,this.tech_),D5({inbandTextTracks:this.inbandTextTracks_,metadataArray:i,timestampOffset:a,videoDuration:r})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const i of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(i));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(i=>{this.contentSteeringController_.on(i,r=>{this.trigger(xt({},r))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const i=this.main();(this.contentSteeringController_.didDASHTagChange(i.uri,i.contentSteering)||(()=>{const o=this.contentSteeringController_.getAvailablePathways(),l=[];for(const u of i.playlists){const d=u.attributes.serviceLocation;if(d&&(l.push(d),!o.has(d)))return!0}return!!(!l.length&&o.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const r=this.main().playlists,a=new Set;let o=!1;Object.keys(r).forEach(l=>{const u=r[l],d=this.pathwayAttribute_(u),f=d&&e!==d;u.excludeUntil===1/0&&u.lastExcludeReason_==="content-steering"&&!f&&(delete u.excludeUntil,delete u.lastExcludeReason_,o=!0);const v=!u.excludeUntil&&u.excludeUntil!==1/0;!a.has(u.id)&&f&&v&&(a.add(u.id),u.excludeUntil=1/0,u.lastExcludeReason_="content-steering",this.logger_(`excluding ${u.id} for ${u.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(l=>{const u=this.mediaTypes_[l];if(u.activePlaylistLoader){const d=u.activePlaylistLoader.media_;d&&d.attributes.serviceLocation!==e&&(o=!0)}}),o&&this.changeSegmentPathway_()}handlePathwayClones_(){const i=this.main().playlists,r=this.contentSteeringController_.currentPathwayClones,a=this.contentSteeringController_.nextPathwayClones;if(r&&r.size||a&&a.size){for(const[l,u]of r.entries())a.get(l)||(this.mainPlaylistLoader_.updateOrDeleteClone(u),this.contentSteeringController_.excludePathway(l));for(const[l,u]of a.entries()){const d=r.get(l);if(!d){i.filter(g=>g.attributes["PATHWAY-ID"]===u["BASE-ID"]).forEach(g=>{this.mainPlaylistLoader_.addClonePathway(u,g)}),this.contentSteeringController_.addAvailablePathway(l);continue}this.equalPathwayClones_(d,u)||(this.mainPlaylistLoader_.updateOrDeleteClone(u,!0),this.contentSteeringController_.addAvailablePathway(l))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...a])))}}equalPathwayClones_(e,i){if(e["BASE-ID"]!==i["BASE-ID"]||e.ID!==i.ID||e["URI-REPLACEMENT"].HOST!==i["URI-REPLACEMENT"].HOST)return!1;const r=e["URI-REPLACEMENT"].PARAMS,a=i["URI-REPLACEMENT"].PARAMS;for(const o in r)if(r[o]!==a[o])return!1;for(const o in a)if(r[o]!==a[o])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const i="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(r=>{const a=this.mainPlaylistLoader_.getKeyIdSet(r);!a||!a.size||a.forEach(o=>{const l="usable",u=this.keyStatusMap_.has(o)&&this.keyStatusMap_.get(o)===l,d=r.lastExcludeReason_===i&&r.excludeUntil===1/0;u?u&&d&&(delete r.excludeUntil,delete r.lastExcludeReason_,this.logger_(`enabling playlist ${r.id} because key ID ${o} is ${l}`)):(r.excludeUntil!==1/0&&r.lastExcludeReason_!==i&&(r.excludeUntil=1/0,r.lastExcludeReason_=i,this.logger_(`excluding playlist ${r.id} because the key ID ${o} doesn't exist in the keyStatusMap or is not ${l}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(r=>{const a=r&&r.attributes&&r.attributes.RESOLUTION&&r.attributes.RESOLUTION.height<720,o=r.excludeUntil===1/0&&r.lastExcludeReason_===i;a&&o&&(delete r.excludeUntil,ne.log.warn(`enabling non-HD playlist ${r.id} because all playlists were excluded due to ${i} key IDs`))})}addKeyStatus_(e,i){const o=(typeof e=="string"?e:Y5(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${i}' with key ID ${o} added to the keyStatusMap`),this.keyStatusMap_.set(o,i)}updatePlaylistByKeyStatus(e,i){this.addKeyStatus_(e,i),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const xE=(s,e,i)=>r=>{const a=s.main.playlists[e],o=pu(a),l=za(a);if(typeof r>"u")return l;r?delete a.disabled:a.disabled=!0;const u={renditionInfo:{id:e,bandwidth:a.attributes.BANDWIDTH,resolution:a.attributes.RESOLUTION,codecs:a.attributes.CODECS},cause:"fast-quality"};return r!==l&&!o&&(r?(i(a),s.trigger({type:"renditionenabled",metadata:u})):s.trigger({type:"renditiondisabled",metadata:u})),r};class CE{constructor(e,i,r){const{playlistController_:a}=e,o=a.fastQualityChange_.bind(a);if(i.attributes){const l=i.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=i.attributes.BANDWIDTH,this.frameRate=i.attributes["FRAME-RATE"]}this.codecs=is(a.main(),i),this.playlist=i,this.id=r,this.enabled=xE(e.playlists,i.id,o)}}const EE=function(s){s.representations=()=>{const e=s.playlistController_.main(),i=fs(e)?s.playlistController_.getAudioTrackPlaylists_():e.playlists;return i?i.filter(r=>!pu(r)).map((r,a)=>new CE(s,r,r.id)):[]}},sh=["seeking","seeked","pause","playing","error"];class SE extends ne.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=bi("PlaybackWatcher"),this.logger_("initialize");const i=()=>this.monitorCurrentTime_(),r=()=>this.monitorCurrentTime_(),a=()=>this.techWaiting_(),o=()=>this.resetTimeUpdate_(),l=this.playlistController_,u=["main","subtitle","audio"],d={};u.forEach(g=>{d[g]={reset:()=>this.resetSegmentDownloads_(g),updateend:()=>this.checkSegmentDownloads_(g)},l[`${g}SegmentLoader_`].on("appendsdone",d[g].updateend),l[`${g}SegmentLoader_`].on("playlistupdate",d[g].reset),this.tech_.on(["seeked","seeking"],d[g].reset)});const f=g=>{["main","audio"].forEach(v=>{l[`${v}SegmentLoader_`][g]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),f("off"))},this.clearSeekingAppendCheck_=()=>f("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),f("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",a),this.tech_.on(sh,o),this.tech_.on("canplay",r),this.tech_.one("play",i),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",a),this.tech_.off(sh,o),this.tech_.off("canplay",r),this.tech_.off("play",i),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),u.forEach(g=>{l[`${g}SegmentLoader_`].off("appendsdone",d[g].updateend),l[`${g}SegmentLoader_`].off("playlistupdate",d[g].reset),this.tech_.off(["seeked","seeking"],d[g].reset)}),this.checkCurrentTimeTimeout_&&W.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&W.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=W.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const i=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=i.buffered_()}checkSegmentDownloads_(e){const i=this.playlistController_,r=i[`${e}SegmentLoader_`],a=r.buffered_(),o=cC(this[`${e}Buffered_`],a);if(this[`${e}Buffered_`]=a,o){const l={bufferedRanges:a};i.trigger({type:"bufferedrangeschanged",metadata:l}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:r.playlist_&&r.playlist_.id,buffered:In(a)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&i.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),i=this.tech_.buffered();if(this.lastRecordedTime===e&&(!i.length||e+ji>=i.end(i.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(It([this.lastRecordedTime,e]));const r={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:r}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const i=this.seekable(),r=this.tech_.currentTime(),a=this.afterSeekableWindow_(i,r,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let o;if(a&&(o=i.end(i.length-1)),this.beforeSeekableWindow_(i,r)){const O=i.start(0);o=O+(O===i.end(0)?0:ji)}if(typeof o<"u")return this.logger_(`Trying to seek outside of seekable at time ${r} with seekable range ${hf(i)}. Seeking to ${o}.`),this.tech_.setCurrentTime(o),!0;const l=this.playlistController_.sourceUpdater_,u=this.tech_.buffered(),d=l.audioBuffer?l.audioBuffered():null,f=l.videoBuffer?l.videoBuffered():null,g=this.media(),v=g.partTargetDuration?g.partTargetDuration:(g.targetDuration-qi)*2,S=[d,f];for(let O=0;O<S.length;O++){if(!S[O])continue;if(hu(S[O],r)<v)return!1}const C=js(u,r);return C.length===0?!1:(o=C.start(0)+ji,this.logger_(`Buffered region starts (${C.start(0)}) just beyond seek point (${r}). Seeking to ${o}.`),this.tech_.setCurrentTime(o),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),i=this.tech_.buffered(),r=Xn(i,e);if(r.length&&e+3<=r.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${r.start(0)} -> ${r.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),i=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,i)){const u=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${i}. Seeking to live point (seekable end) ${u}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(u),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const r=this.tech_.vhs.playlistController_.sourceUpdater_,a=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:i}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const l=js(a,i);return l.length>0?(this.logger_(`Stopped at ${i} and seeking to ${l.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(i),!0):!1}afterSeekableWindow_(e,i,r,a=!1){if(!e.length)return!1;let o=e.end(e.length-1)+ji;const l=!r.endList,u=typeof r.partTargetDuration=="number";return l&&(u||a)&&(o=e.end(e.length-1)+r.targetDuration*3),i>o}beforeSeekableWindow_(e,i){return!!(e.length&&e.start(0)>0&&i<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:i,currentTime:r}){if(!e)return;let a;if(e.length&&i.length){const o=Xn(e,r-3),l=Xn(e,r),u=Xn(i,r);u.length&&!l.length&&o.length&&(a={start:o.end(0),end:u.end(0)})}else js(e,r).length||(a=this.gapFromVideoUnderflow_(e,r));return a?(this.logger_(`Encountered a gap in video from ${a.start} to ${a.end}. Seeking to current time ${r}`),!0):!1}skipTheGap_(e){const i=this.tech_.buffered(),r=this.tech_.currentTime(),a=js(i,r);if(this.resetTimeUpdate_(),a.length===0||r!==e)return;this.logger_("skipTheGap_:","currentTime:",r,"scheduled currentTime:",e,"nextRange start:",a.start(0)),this.tech_.setCurrentTime(a.start(0)+qi);const o={gapInfo:{from:r,to:a.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:o}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,i){const r=oC(e);for(let a=0;a<r.length;a++){const o=r.start(a),l=r.end(a);if(i-o<4&&i-o>2)return{start:o,end:l}}return null}}const kE={errorInterval:30,getSource(s){const i=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return s(i)}},np=function(s,e){let i=0,r=0;const a=st(kE,e);s.ready(()=>{s.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const o=function(){r&&s.currentTime(r)},l=function(g){g!=null&&(r=s.duration()!==1/0&&s.currentTime()||0,s.one("loadedmetadata",o),s.src(g),s.trigger({type:"usage",name:"vhs-error-reload"}),s.play())},u=function(){if(Date.now()-i<a.errorInterval*1e3){s.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!a.getSource||typeof a.getSource!="function"){ne.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return i=Date.now(),a.getSource.call(s,l)},d=function(){s.off("loadedmetadata",o),s.off("error",u),s.off("dispose",d)},f=function(g){d(),np(s,g)};s.on("error",u),s.on("dispose",d),s.reloadSourceOnError=f},wE=function(s){np(this,s)};var rp="3.17.3",DE="7.1.0",AE="1.3.1",NE="7.2.0",IE="4.0.2";const mt={PlaylistLoader:Kn,Playlist:oi,utils:MC,STANDARD_PLAYLIST_SELECTOR:Wd,INITIAL_PLAYLIST_SELECTOR:C5,lastBandwidthSelector:Wd,movingAverageBandwidthSelector:b5,comparePlaylistBandwidth:vu,comparePlaylistResolution:T5,xhr:If()};Object.keys(At).forEach(s=>{Object.defineProperty(mt,s,{get(){return ne.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),At[s]},set(e){if(ne.log.warn(`using Vhs.${s} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){ne.log.warn(`value of Vhs.${s} must be greater than or equal to 0`);return}At[s]=e}})});const sp="videojs-vhs",ap=function(s,e){const i=e.media();let r=-1;for(let a=0;a<s.length;a++)if(s[a].id===i.id){r=a;break}s.selectedIndex_=r,s.trigger({selectedIndex:r,type:"change"})},OE=function(s,e){e.representations().forEach(i=>{s.addQualityLevel(i)}),ap(s,e.playlists)};mt.canPlaySource=function(){return ne.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const BE=(s,e,i)=>{if(!s)return s;let r={};e&&e.attributes&&e.attributes.CODECS&&(r=os(Fi(e.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(r.audio=i.attributes.CODECS);const a=or(r.video),o=or(r.audio),l={};for(const u in s)l[u]={},o&&(l[u].audioContentType=o),a&&(l[u].videoContentType=a),e.contentProtection&&e.contentProtection[u]&&e.contentProtection[u].pssh&&(l[u].pssh=e.contentProtection[u].pssh),typeof s[u]=="string"&&(l[u].url=s[u]);return st(s,l)},LE=(s,e)=>s.reduce((i,r)=>{if(!r.contentProtection)return i;const a=e.reduce((o,l)=>{const u=r.contentProtection[l];return u&&u.pssh&&(o[l]={pssh:u.pssh}),o},{});return Object.keys(a).length&&i.push(a),i},[]),PE=({player:s,sourceKeySystems:e,audioMedia:i,mainPlaylists:r})=>{if(!s.eme.initializeMediaKeys)return Promise.resolve();const a=i?r.concat([i]):r,o=LE(a,Object.keys(e)),l=[],u=[];return o.forEach(d=>{u.push(new Promise((f,g)=>{s.tech_.one("keysessioncreated",f)})),l.push(new Promise((f,g)=>{s.eme.initializeMediaKeys({keySystems:d},v=>{if(v){g(v);return}f()})}))}),Promise.race([Promise.all(l),Promise.race(u)])},ME=({player:s,sourceKeySystems:e,media:i,audioMedia:r})=>{const a=BE(e,i,r);return a?(s.currentSource().keySystems=a,a&&!s.eme?(ne.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},op=()=>{if(!W.localStorage)return null;const s=W.localStorage.getItem(sp);if(!s)return null;try{return JSON.parse(s)}catch{return null}},RE=s=>{if(!W.localStorage)return!1;let e=op();e=e?st(e,s):s;try{W.localStorage.setItem(sp,JSON.stringify(e))}catch{return!1}return e},VE=s=>s.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(s.substring(s.indexOf(",")+1)):s,lp=(s,e)=>{s._requestCallbackSet||(s._requestCallbackSet=new Set),s._requestCallbackSet.add(e)},up=(s,e)=>{s._responseCallbackSet||(s._responseCallbackSet=new Set),s._responseCallbackSet.add(e)},cp=(s,e)=>{s._requestCallbackSet&&(s._requestCallbackSet.delete(e),s._requestCallbackSet.size||delete s._requestCallbackSet)},dp=(s,e)=>{s._responseCallbackSet&&(s._responseCallbackSet.delete(e),s._responseCallbackSet.size||delete s._responseCallbackSet)};mt.supportsNativeHls=(function(){if(!_e||!_e.createElement)return!1;const s=_e.createElement("video");return ne.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(i){return/maybe|probably/i.test(s.canPlayType(i))}):!1})();mt.supportsNativeDash=(function(){return!_e||!_e.createElement||!ne.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(_e.createElement("video").canPlayType("application/dash+xml"))})();mt.supportsTypeNatively=s=>s==="hls"?mt.supportsNativeHls:s==="dash"?mt.supportsNativeDash:!1;mt.isSupported=function(){return ne.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};mt.xhr.onRequest=function(s){lp(mt.xhr,s)};mt.xhr.onResponse=function(s){up(mt.xhr,s)};mt.xhr.offRequest=function(s){cp(mt.xhr,s)};mt.xhr.offResponse=function(s){dp(mt.xhr,s)};const FE=ne.getComponent("Component");class hp extends FE{constructor(e,i,r){if(super(i,r.vhs),typeof r.initialBandwidth=="number"&&(this.options_.bandwidth=r.initialBandwidth),this.logger_=bi("VhsHandler"),i.options_&&i.options_.playerId){const a=ne.getPlayer(i.options_.playerId);this.player_=a}if(this.tech_=i,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(_e,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],a=>{const o=_e.fullscreenElement||_e.webkitFullscreenElement||_e.mozFullScreenElement||_e.msFullscreenElement;o&&o.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=st(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const r=op();r&&r.bandwidth&&(this.options_.bandwidth=r.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),r&&r.throughput&&(this.options_.throughput=r.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=At.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===At.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(r=>{typeof this.source_[r]<"u"&&(this.options_[r]=this.source_[r])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const i=this.options_.customPixelRatio;typeof i=="number"&&i>=0&&(this.customPixelRatio=i)}setOptions(e={}){this.setOptions_(e)}src(e,i){if(!e)return;this.setOptions_(),this.options_.src=VE(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=mt,this.options_.sourceType=Oh(i),this.options_.seekTo=o=>{this.tech_.setCurrentTime(o)},this.options_.player_=this.player_,this.playlistController_=new bE(this.options_);const r=st({liveRangeSafeTimeDelta:ji},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new SE(r),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const o=ne.players[this.tech_.options_.playerId];let l=this.playlistController_.error;typeof l=="object"&&!l.code?l.code=3:typeof l=="string"&&(l={message:l,code:3}),o.error(l)});const a=this.options_.bufferBasedABR?mt.movingAverageBandwidthSelector(.55):mt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):a.bind(this),this.playlistController_.selectInitialPlaylist=mt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(o){this.playlistController_.selectPlaylist=o.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(o){this.playlistController_.mainSegmentLoader_.throughput.rate=o,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let o=this.playlistController_.mainSegmentLoader_.bandwidth;const l=W.navigator.connection||W.navigator.mozConnection||W.navigator.webkitConnection,u=1e7;if(this.options_.useNetworkInformationApi&&l){const d=l.downlink*1e3*1e3;d>=u&&o>=u?o=Math.max(o,d):o=d}return o},set(o){this.playlistController_.mainSegmentLoader_.bandwidth=o,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const o=1/(this.bandwidth||1);let l;return this.throughput>0?l=1/this.throughput:l=0,Math.floor(1/(o+l))},set(){ne.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>In(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>In(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&RE({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{EE(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=W.URL.createObjectURL(this.playlistController_.mediaSource),(ne.browser.IS_ANY_SAFARI||ne.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),PE({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(i=>{this.logger_("error while creating EME key session",i),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=ME({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",r=>{this.playlistController_.updatePlaylistByKeyStatus(r.keyId,r.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!i){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=ne.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{OE(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{ap(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":rp,"mux.js":DE,"mpd-parser":AE,"m3u8-parser":NE,"aes-decrypter":IE}}version(){return this.constructor.version()}canChangeType(){return Jf.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&W.URL.revokeObjectURL&&(W.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,i){return jC({playlist:this.playlistController_.media(),time:e,callback:i})}seekToProgramTime(e,i,r=!0,a=2){return Mf({programTime:e,playlist:this.playlistController_.media(),retryCount:a,pauseAfterSeek:r,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})}setupXhrHooks_(){this.xhr.onRequest=e=>{lp(this.xhr,e)},this.xhr.onResponse=e=>{up(this.xhr,e)},this.xhr.offRequest=e=>{cp(this.xhr,e)},this.xhr.offResponse=e=>{dp(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],i=["gapjumped","playedrangeschanged"];e.forEach(r=>{this.playlistController_.on(r,a=>{this.player_.trigger(xt({},a))})}),i.forEach(r=>{this.playbackWatcher_.on(r,a=>{this.player_.trigger(xt({},a))})})}}const Ca={name:"videojs-http-streaming",VERSION:rp,canHandleSource(s,e={}){const i=st(ne.options,e);return!i.vhs.experimentalUseMMS&&!Qr("avc1.4d400d,mp4a.40.2",!1)?!1:Ca.canPlayType(s.type,i)},handleSource(s,e,i={}){const r=st(ne.options,i);return e.vhs=new hp(s,e,r),e.vhs.xhr=If(),e.vhs.setupXhrHooks_(),e.vhs.src(s.src,s.type),e.vhs},canPlayType(s,e){const i=Oh(s);if(!i)return"";const r=Ca.getOverrideNative(e);return!mt.supportsTypeNatively(i)||r?"maybe":""},getOverrideNative(s={}){const{vhs:e={}}=s,i=!(ne.browser.IS_ANY_SAFARI||ne.browser.IS_IOS),{overrideNative:r=i}=e;return r}},$E=()=>Qr("avc1.4d400d,mp4a.40.2",!0);$E()&&ne.getTech("Html5").registerSourceHandler(Ca,0);ne.VhsHandler=hp;ne.VhsSourceHandler=Ca;ne.Vhs=mt;ne.use||ne.registerComponent("Vhs",mt);ne.options.vhs=ne.options.vhs||{};(!ne.getPlugin||!ne.getPlugin("reloadSourceOnError"))&&ne.registerPlugin("reloadSourceOnError",wE);const UE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4AQMAAADSHVMAAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAASYSURBVHic7c8BDQAgDMAw7t80Lk5SVgXbnM/M64BtDesa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNay7Fz0EOVPDeGwAAAAASUVORK5CYII=",qE={class:"o-meeting-playback-video"},jE={key:0,class:"poster-title"},HE=n.defineComponent({__name:"OMeetingPlaybackVideo",props:{src:{default:""},vtt:{default:""},captions:{default:()=>[]},poster:{},posterTitle:{},instance:{},trackIdx:{}},emits:["getDuration","getInstance","setTrackIdx"],setup(s,{expose:e,emit:i}){const r=s,a=n.ref(),o=n.ref(),l=n.ref(),u=i,d=n.ref(!1),f=()=>{d.value=!1},g=(T,w=!1)=>{var D,M;const R=r.instance;if(!R)return;const L=(D=T.activeCues)==null?void 0:D[0];if(a.value&&clearInterval(a.value),L){L.text=((M=L==null?void 0:L.text)==null?void 0:M.replace(/\[(SPEAKER_)\d+]: /g,""))||"";const U=L.text.split(`
224
+ `),Y=U.length,P=L.endTime-L.startTime,J=parseFloat((P/Y).toFixed(3));let b=0;if(w){const H=(R.currentTime()-L.startTime)/(L.endTime-L.startTime);for(;(b+1)/Y<H;)b++}b<Y?L.text=U.length?U[b]:L==null?void 0:L.text:L.text=U.length?U[0]:L==null?void 0:L.text;let x=J*1e3;const q=()=>{a.value=setInterval(()=>{T.mode="hidden",b++,b>U.length-1?clearInterval(a.value):b===U.length-1?(L.text=U[b],clearInterval(a.value),x=J*(Y-b)*1e3,q()):L.text=U[b],T.mode="showing"},x)};q()}},v=n.ref([]);n.watch(()=>v.value,T=>{const w=r.instance;if(w){const R=w.textTracks();for(let L=0;L<R.length;L++)R[L].kind==="subtitles"&&(g(R[L],!0),R[L].mode=T.length?"showing":"hidden")}},{deep:!0});const S=n.ref(!1),C=n.ref("init"),O=async()=>{if(!r.src)return;const T=ne("playerId",{controls:!0,autoplay:!1,preload:"auto",fluid:!0,poster:r.poster||UE,playbackRates:[.5,.75,1,1.25,1.5,2],controlBar:{skipButtons:{backward:5,forward:5},children:{playToggle:!0,SkipBackward:{backward:5},skipForward:{forward:5},currentTimeDisplay:!0,timeDivider:!0,durationDisplay:!0,progressControl:!0,PlaybackRateMenuButton:!0,volumePanel:{inline:!1},FullscreenToggle:!0}}});u("getInstance",T),T.src(r.src),T.addRemoteTextTrack({kind:"subtitles",src:r.vtt,srclang:"zh",label:"中文",default:!1}),S.value=!0;class w extends ne.getComponent("Button"){constructor(D,M){super(D,M),this.addClass("vjs-subtitle-toggle-button","vjs-subtitle-hidden"),this.controlText("Toggle Subtitles")}buildCSSClass(){return`vjs-subtitle-toggle-button ${super.buildCSSClass()}`}handleClick(){const D=this.player().textTracks();for(let M=0;M<D.length;M++)D[M].kind==="subtitles"&&(g(D[M],!0),D[M].mode=D[M].mode==="showing"?"hidden":"showing",D[M].mode==="showing"?(this.removeClass("vjs-subtitle-hidden"),this.addClass("vjs-subtitle-showing")):(this.removeClass("vjs-subtitle-showing"),this.addClass("vjs-subtitle-hidden")))}}r.vtt&&(ne.registerComponent("SubtitleToggleButton",w),T.controlBar.children_.some(L=>L.name_==="SubtitleToggleButton")||T.controlBar.addChild("SubtitleToggleButton",{},8)),(T==null?void 0:T.textTracks().tracks_).forEach(L=>{L==null||L.addEventListener("cuechange",()=>{g(L)})}),T.on("play",()=>{C.value="playing"}),T.on("timeupdate",()=>{const L=T.currentTime()||0,D=r.captions.findIndex(M=>Qo(M.start_time)>L);u("setTrackIdx",D)}),T.one("loadedmetadata",()=>{u("getDuration",T.duration())}),n.nextTick(()=>{const L=document.getElementsByClassName("o-meeting-playback-video")[0];o.value=L.offsetHeight}),l.value=T};return n.onMounted(()=>{O(),document.addEventListener("click",f)}),n.watch(()=>r.src,()=>{O()}),n.onUnmounted(()=>{var T;(T=r==null?void 0:r.instance)==null||T.dispose(),document.removeEventListener("click",f)}),e({changeTime:T=>{var w;(w=l.value)==null||w.currentTime(T)}}),(T,w)=>(n.openBlock(),n.createElementBlock("div",qE,[n.createElementVNode("div",{class:n.normalizeClass(["video-placeholder",{loaded:S.value,"no-poster":!s.poster,[C.value]:!0}])},[w[0]||(w[0]=n.createElementVNode("video",{class:"video-js",id:"playerId"},null,-1)),s.posterTitle?(n.openBlock(),n.createElementBlock("div",jE,n.toDisplayString(s.posterTitle),1)):n.createCommentVNode("",!0)],2)]))}}),zE={class:"o-meeting-playback"},GE={class:"video-header"},WE={class:"video-title"},YE={class:"video-content"},XE={class:"info-wrapper"},KE={class:"tab-content"},QE={key:0,class:"base-info"},ZE={class:"info-item"},JE={class:"info-item"},eS={class:"info-item"},tS={class:"info-item"},iS={key:1,class:"subject-list"},nS={class:"subject-title"},rS={key:0,class:"subject-progress"},sS=["data-start","data-end"],ah=n.defineComponent({__name:"OMeetingPlayback",props:{dates:{default:()=>[]},detail:{default:()=>({})},data:{default:()=>({})}},emits:["change-date"],setup(s,{emit:e}){const i=s,r=e,a=n.ref(null),o=j=>{a.value=j},l=n.ref(0),u=j=>{l.value=j},d=n.ref([]),f=async j=>{const G=await(await fetch(j)).json();d.value=(G.segments||[]).map(Z=>{const ee=ty(Z.speaker);return{...Z,contentHtml:Z.content,speakerIdx:ee,speakerLabel:`${t("meeting.speaker")}${ee}`}})},g=n.ref([]),v=j=>ey[j%3],S=n.ref(0),C=j=>{S.value=j},O=n.ref(),T=n.ref(""),w=n.ref([0,0]);function R(j,F){const G=F.getBoundingClientRect(),ee=(j.clientX-G.left)/G.width;return w.value[1]=`${F.offsetTop+F.parentElement.offsetTop}px`,w.value[0]=`${ee*100}%`,ee*S.value}const L=j=>{let F=j;for(;F&&F.className!=="subject-progress";)F=F.parentElement;return F},D=j=>{let F=L(j.target);F&&(T.value=iy(R(j,F)))},M=()=>{T.value=""},U=j=>{var G;let F=L(j.target);F&&((G=O.value)==null||G.changeTime(R(j,F)))},Y=async j=>{const G=await(await fetch(j)).json();g.value=(G||[]).map(Z=>({...Z,startTime:Qo(Z.startTime),endTime:Qo(Z.endTime)}))},P=n.ref("info"),J=n.computed(()=>{const j=[{label:t("meeting.baseInfo"),value:"info"}];return g.value.length&&j.push({label:t("meeting.subject"),value:"subject"}),j}),b=()=>{i.data&&(i.data.textJson&&f(i.data.textJson),i.data.topicJson&&Y(i.data.topicJson))};n.watchEffect(()=>{b()});const x=j=>{r("change-date",j)},q=n.ref(null),H=n.ref("auto");let k=null,A=null;const $=()=>{q.value&&(H.value=`${q.value.offsetHeight}px`)},K=()=>{cancelAnimationFrame(A),A=requestAnimationFrame($)};return n.onMounted(()=>{q.value&&(k=new ResizeObserver(K),k.observe(q.value),$())}),n.onUnmounted(()=>{cancelAnimationFrame(A),k==null||k.disconnect()}),(j,F)=>{var G,Z,ee,se,de;return n.openBlock(),n.createElementBlock("div",zE,[n.createElementVNode("div",{class:"left-card card-wrapper",ref_key:"leftRef",ref:q},[n.createElementVNode("div",GE,[n.createElementVNode("div",WE,n.toDisplayString((G=s.detail)==null?void 0:G.topic)+"("+n.toDisplayString((Z=s.detail)==null?void 0:Z.date)+")",1),(ee=s.dates)!=null&&ee.length?(n.openBlock(),n.createBlock(n.unref(I.OSelect),{key:0,size:"large",clearable:!1,"model-value":(se=s.detail)==null?void 0:se.date,placeholder:j.t("meeting.selectDate"),onChange:x},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.dates,fe=>(n.openBlock(),n.createBlock(n.unref(I.OOption),{key:fe,value:fe,label:fe},null,8,["value","label"]))),128))]),_:1},8,["model-value","placeholder"])):n.createCommentVNode("",!0)]),n.createElementVNode("div",YE,[s.data?(n.openBlock(),n.createBlock(HE,{key:0,ref_key:"playerRef",ref:O,src:s.data.video,vtt:s.data.textVtt,poster:s.data.poster,captions:d.value,onGetDuration:C,instance:a.value,onGetInstance:o,trackIdx:l.value,onSetTrackIdx:u},null,8,["src","vtt","poster","captions","instance","trackIdx"])):n.createCommentVNode("",!0)]),n.createElementVNode("div",XE,[n.createVNode(n.unref(I.OTab),{modelValue:P.value,"onUpdate:modelValue":F[0]||(F[0]=fe=>P.value=fe)},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(J.value,fe=>(n.openBlock(),n.createBlock(n.unref(I.OTabPane),{key:fe.value,value:fe.value,label:fe.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]),n.createElementVNode("div",KE,[P.value===J.value[0].value?(n.openBlock(),n.createElementBlock("div",QE,[n.createElementVNode("div",ZE,[n.createElementVNode("span",null,n.toDisplayString(j.t("meeting.item1")),1),n.createElementVNode("span",null,n.toDisplayString(s.detail.sponsor),1)]),n.createElementVNode("div",JE,[n.createElementVNode("span",null,n.toDisplayString(j.t("meeting.item2")),1),n.createElementVNode("span",null,n.toDisplayString(s.detail.groupName),1)]),n.createElementVNode("div",eS,[n.createElementVNode("span",null,n.toDisplayString(j.t("meeting.item3")),1),n.createElementVNode("span",null,n.toDisplayString(s.detail.date)+"  "+n.toDisplayString(s.detail.start)+"~"+n.toDisplayString(s.detail.end),1)]),n.createElementVNode("div",tS,[n.createElementVNode("span",null,n.toDisplayString(j.t("meeting.item4")),1),n.createElementVNode("span",null,n.toDisplayString(s.detail.agenda||"-"),1)])])):n.createCommentVNode("",!0),P.value===((de=J.value[1])==null?void 0:de.value)?(n.openBlock(),n.createElementBlock("div",iS,[T.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"mouse-current-time",style:n.normalizeStyle({top:w.value[1],left:w.value[0]})},n.toDisplayString(T.value),5)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(g.value,(fe,pe)=>(n.openBlock(),n.createElementBlock("div",{class:"subject-item",key:fe.title},[n.createElementVNode("div",nS,n.toDisplayString(fe.title),1),S.value?(n.openBlock(),n.createElementBlock("div",rS,[n.createElementVNode("div",{class:"subject-progress-item",onClick:U,onMousemove:D,onMouseleave:M,"data-start":fe.startTime,"data-end":fe.endTime,style:n.normalizeStyle({"--start":(fe.startTime<0?0:fe.startTime)/S.value,"--end":(fe.endTime>S.value?S.value:fe.endTime)/S.value,background:v(pe)})},null,44,sS)])):n.createCommentVNode("",!0)]))),128))])):n.createCommentVNode("",!0)])])],512),n.createElementVNode("div",{class:"right-card card-wrapper",style:n.normalizeStyle({height:H.value})},[n.createVNode(Pb,{captions:d.value,trackIdx:l.value,instance:a.value},null,8,["captions","trackIdx","instance"])],4)])}}}),aS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function oS(s,e){return n.openBlock(),n.createElementBlock("svg",aS,[...e[0]||(e[0]=[n.createElementVNode("path",{d:"M12.032 2.355c1.632 0 3.205 0.404 4.611 1.166 0.34 0.182 0.466 0.609 0.281 0.949s-0.609 0.463-0.949 0.281c-1.201-0.65-2.546-0.996-3.943-0.996-4.585 0-8.3 3.715-8.3 8.297 0 4.588 3.715 8.303 8.3 8.303s8.3-3.715 8.3-8.303c0-2.063-0.753-4.002-2.098-5.514-0.258-0.287-0.231-0.732 0.059-0.984 0.287-0.258 0.729-0.234 0.987 0.053 1.57 1.764 2.452 4.037 2.452 6.445 0 5.361-4.342 9.703-9.7 9.703s-9.7-4.342-9.7-9.703c0-5.355 4.342-9.697 9.7-9.697zM10.866 7.658c0-0.627 0.507-1.131 1.134-1.131s1.134 0.504 1.134 1.131c0 0.627-0.507 1.131-1.134 1.131s-1.134-0.504-1.134-1.131zM12.706 10.002c-0.044-0.346-0.337-0.609-0.691-0.609-0.387 0-0.7 0.311-0.703 0.697l-0.023 6.762 0.006 0.1c0.044 0.34 0.337 0.603 0.691 0.603 0.387 0.006 0.7-0.311 0.703-0.697l0.023-6.762-0.006-0.094z"},null,-1)])])}const lS={name:"components-icon-tips",render:oS},uS={class:"o-sig-meeting-aside"},cS={class:"month"},dS={class:"days"},hS=["onClick"],fS={class:"day-d"},pS={class:"day-c"},mS={class:"arrow-wrapper"},Gs=1,gS=n.defineComponent({__name:"OSigMeetingAside",props:{data:{},current:{},total:{},active:{},meetingDates:{},eventsDates:{}},emits:["click-date","change-month"],setup(s,{emit:e}){const i=s,r=e,a=l=>{r("click-date",l)},o=l=>{i.current+l>=i.total||i.current+l<0||r("change-month",l)};return(l,u)=>(n.openBlock(),n.createElementBlock("div",uS,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.data,(d,f)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:f},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d,g=>(n.openBlock(),n.createElementBlock("div",{key:g.month,class:"month-item"},[n.createElementVNode("div",cS,n.toDisplayString(g.month.replace(/-/g,"/")),1),n.createElementVNode("div",dS,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(g.days,v=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["day-item",s.active===`${g.month}-${v}`&&"active"]),key:v,onClick:S=>a(`${g.month}-${v}`)},[n.createElementVNode("div",fS,n.toDisplayString(v),1),n.createElementVNode("div",pS,[s.meetingDates.includes(`${g.month}-${v}`)?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:0,style:n.normalizeStyle({zIndex:n.unref(si)(n.unref(et).MEETING,"zIndex"),backgroundColor:n.unref(si)(n.unref(et).MEETING,"color")})},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(si)(n.unref(et).MEETING,"icon"))))]),_:1},8,["style"])):n.createCommentVNode("",!0),s.eventsDates.includes(`${g.month}-${v}`)?(n.openBlock(),n.createBlock(n.unref(I.OIcon),{key:1,style:n.normalizeStyle({zIndex:n.unref(si)(n.unref(et).EVENTS,"zIndex"),backgroundColor:n.unref(si)(n.unref(et).EVENTS,"color")})},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(si)(n.unref(et).EVENTS,"icon"))))]),_:1},8,["style"])):n.createCommentVNode("",!0)])],10,hS))),128))])]))),128))],64))),128)),n.createElementVNode("div",mS,[n.createVNode(n.unref(I.OIcon),{onClick:u[0]||(u[0]=d=>o(0-Gs)),class:n.normalizeClass(s.current-Gs<0&&"disabled")},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconArrowLeft))]),_:1},8,["class"]),n.createVNode(n.unref(I.OIcon),{onClick:u[1]||(u[1]=d=>o(Gs)),class:n.normalizeClass(s.current+Gs>=s.total&&"disabled")},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconArrowRight))]),_:1},8,["class"])])]))}}),vS={class:"o-sig-meeting-calendar"},_S={key:0,class:"meeting-card-header"},yS={key:0,class:"header-left"},TS={key:1,class:"date-select"},bS={class:"meeting-card-content"},xS={class:"list-content"},oh=n.defineComponent({__name:"OSigMeetingCalendar",props:{sigName:{},getMeetingListRequest:{},getDateListRequest:{},getEventsListRequest:{},dates:{}},setup(s){const e=s,{t:i}=Ke.useI18n(),{lePadV:r}=Et.useScreen(),a=n.ref(""),o=n.ref(!1),l=n.ref([]),u=n.computed(()=>r.value?100:5),d=n.ref(""),f=n.ref([]),g=n.ref([]),v=n.ref([]),S=n.ref(-1),C=x=>{T(x)},O=x=>{T(x)},T=async x=>{if(e.getMeetingListRequest)try{o.value=!0,a.value=xe(x).format("YYYY-MM-DD");const q=await e.getMeetingListRequest(a.value,e.sigName);l.value=q.map(H=>({...H,time:`${H.start}-${H.end}`,date:H.date||a.value,type:et.MEETING}))}finally{o.value=!1,v.value.forEach(q=>{q.dates.includes(a.value)&&l.value.push(q)})}},w=async()=>{e.getDateListRequest&&(f.value=await e.getDateListRequest()),e.getEventsListRequest&&(v.value=await e.getEventsListRequest(),g.value=(v.value||[]).map(x=>x.dates).flat())},R=n.ref(et.ALL),L=()=>{w()};n.watch(()=>r.value,()=>{r.value&&L(et.ALL)});const D=x=>{const q=xe(x).format("YYYY-MM-DD");return[q.slice(0,7),q.slice(8,10)]},M=n.computed(()=>{let x=[];return R.value===et.ALL?x=[...f.value||[],...g.value]:R.value===et.MEETING?x=f.value||[]:x=g.value,[...new Set(x)].sort((q,H)=>xe(q).isAfter(xe(H))?1:-1).map(q=>xe(q).format("YYYY-MM-DD"))}),U=()=>{let x=M.value.find(q=>q===xe().format("YYYY-MM-DD"));x||(x=M.value.find(q=>xe(q).isAfter(xe()))||[...M.value].reverse().find(q=>xe().isAfter(xe(q)))),d.value=x};n.watch(()=>M.value,x=>{x.length&&(U(),n.nextTick(()=>{T(d.value)}))});const Y=n.computed(()=>{const x=M.value.reduce((A,$)=>{var F,G;const[K,j]=D($);return A[K]={count:(((F=A[K])==null?void 0:F.count)||0)+1,days:[...((G=A[K])==null?void 0:G.days)||[],j]},A},{}),q=Object.keys(x).map(A=>({...x[A],month:A})),H=[];let k=[];return q.forEach(A=>{for(;A.days.length;)if(!k.length)A.days.splice(0,6).forEach($=>{k.push({month:A.month,day:$})}),k.length>=5&&(H.push(k),k=[]);else{let $=k.length;$%2===1&&($+=1),A.days.length+k.length<=6?(A.days.splice(0,6).forEach(K=>{k.push({month:A.month,day:K})}),k.length>=5&&(H.push(k),k=[])):(A.days.splice(0,6-$).forEach(K=>{k.push({month:A.month,day:K})}),k.length>=5&&(H.push(k),k=[]))}}),k.length&&(H.push(k),k=[]),H}),P=n.computed(()=>Y.value.map(x=>{const q=x.reduce((H,k)=>(H[k.month]=H[k.month]||[],H[k.month].push(k.day),H),{});return Object.keys(q).map(H=>({month:H,days:q[H]||[]}))})),J=()=>{Y.value.length?(S.value=Y.value.findIndex(x=>x.some(q=>d.value===`${q.month}-${q.day}`)),S.value===-1&&(S.value=Y.value.findIndex(x=>x.some(q=>d.value.includes(q.month))))):S.value=-1};n.watch([()=>Y.value,()=>d.value],()=>{J()},{deep:!0});const b=x=>{S.value+=x};return n.onMounted(()=>{w()}),(x,q)=>{const H=n.resolveComponent("ElOption"),k=n.resolveComponent("ElSelect");return n.openBlock(),n.createElementBlock("div",vS,[n.unref(r)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",_S,[d.value?(n.openBlock(),n.createElementBlock("div",yS,[n.createElementVNode("span",null,n.toDisplayString(n.unref(i)("meeting.latestMeeting")),1),n.createElementVNode("span",null,n.toDisplayString(n.unref(xe)(d.value).format("YYYY/MM/DD")),1),n.createVNode(n.unref(I.OPopover),null,{target:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),{class:"tips"},{default:n.withCtx(()=>[n.createVNode(n.unref(lS))]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("div",null,[n.createElementVNode("p",null,n.toDisplayString(n.unref(i)("meeting.detailHalfYearMeetings")),1)])]),_:1})])):n.createCommentVNode("",!0),n.createVNode(n.unref(I.OTab),{modelValue:R.value,"onUpdate:modelValue":q[0]||(q[0]=A=>R.value=A),onChange:L,line:!1},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(ia).slice(0,-1),A=>(n.openBlock(),n.createBlock(n.unref(I.OTabPane),{key:A.value,value:A.value},{nav:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(A.icon)))]),_:2},1024),n.createTextVNode(" "+n.toDisplayString(A.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])),n.unref(r)&&M.value.length?(n.openBlock(),n.createElementBlock("div",TS,[n.createVNode(k,{modelValue:a.value,"onUpdate:modelValue":q[1]||(q[1]=A=>a.value=A),onChange:O},{label:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(i)("meeting.latestMeeting"))+" "+n.toDisplayString(a.value),1)]),default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(M.value,A=>(n.openBlock(),n.createBlock(H,{key:A,value:A,label:n.unref(xe)(A).format("YYYY/MM/DD")},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])):n.createCommentVNode("",!0),!n.unref(r)||n.unref(r)&&M.value.length?(n.openBlock(),n.createBlock(n.unref(I.ODivider),{key:2,class:"meeting-divider"})):n.createCommentVNode("",!0),n.createElementVNode("div",bS,[!n.unref(r)&&S.value!==-1?(n.openBlock(),n.createBlock(gS,{key:0,data:P.value.slice(S.value,S.value+1),meetingDates:R.value!==n.unref(et).EVENTS?f.value:[],eventsDates:R.value!==n.unref(et).MEETING?g.value:[],onClickDate:C,onChangeMonth:b,current:S.value,total:P.value.length,active:a.value},null,8,["data","meetingDates","eventsDates","current","total","active"])):n.createCommentVNode("",!0),n.createElementVNode("div",xS,[n.createVNode(kh,{list:l.value,rows:u.value},{empty:n.withCtx(()=>[n.renderSlot(x.$slots,"empty")]),_:3},8,["list","rows"])])])])}}}),CS={class:"o-my-meeting-calendar"},ES={class:"meeting-list"},SS={class:"list-calendar-mb"},kS={class:"list-calendar"},wS=["onClick"],DS={class:"date-cell-text"},AS={class:"list-body"},NS=["id"],IS={class:"item-header-left"},OS={class:"meeting-icon"},BS={class:"header-info"},LS={key:0},PS={class:"title-wrapper"},MS={class:"title-text"},RS={key:1,class:"tag-wrapper"},VS={class:"meeting-info"},FS={key:0,class:"item-header-right"},$S={class:"meeting-detail"},US={key:0,class:"meeting-btn"},qS={key:0,class:"load-text"},jS={class:"dialog-content"},lh=n.defineComponent({__name:"OMyMeetingCalendar",props:{cancelSubMeetingRequest:{},deleteMeetingRequest:{},getMeetingListRequest:{}},emits:["edit"],setup(s,{emit:e}){const i=I.useMessage(null),r=n.ref(!1),a=n.ref(1),o=n.ref(50),l=n.ref(null),u=n.ref([]),d=n.ref([]),f=n.computed(()=>l.value===null||d.value.length<l.value),g=n.ref(!1),{t:v,locale:S}=Ke.useI18n(),C=n.computed(()=>S.value===Ke.Locales.EN),O=s,T=n.ref(!1),{isPhone:w}=Et.useScreen(),R=n.ref([]),L=e,D=n.ref(!1),M=n.ref(!1),U=n.ref(),Y=n.ref(0),P=()=>{var ge;Y.value=((ge=U.value)==null?void 0:ge.clientHeight)||0},J=async()=>{if(O.getMeetingListRequest&&!D.value)try{if(l.value>0&&(a.value-1)*o.value>l.value)return;if(!f.value&&w.value){le("next-month");return}r.value=!0,D.value=!0;const ge=await O.getMeetingListRequest({page:a.value,size:o.value,order_by:"date",order_type:"asc",month:xe(Ne.value).format("YYYY-MM")}),be=(ge.data||[]).map(Ce=>{var zt,Yi,Vt;const{is_cycle:He,date:Oe,start:pt,end:Rt,cycle_sub:Pi,cycle_start_date:Ze,cycle_end_date:xi,cycle_start:Ht,cycle_end:Ci,cycle_type:yt,cycle_interval:ti,cycle_point:ui}=Ce;if(He){let Ei="",E="";yt===gn&&(E=v("meeting.cycleDay")),yt===vn&&(ti>1?E=v("meeting.cycleWeek.other",[Qn(yt,ui),ti]):E=v("meeting.cycleWeek.one",[Qn(yt,ui)])),yt===nn&&(E=v("meeting.cycleMonth",[Qn(yt,ui)])),Ei=v("meeting.cycleMeetingText2",{startDate:Ze,endDate:xi,startTime:Ht,endTime:Ci,cycleType:E});const N=(zt=Ce.obs_data)==null?void 0:zt.filter(Q=>Q.text_video_url);return Pi.filter(Q=>xe(Q.date).isBefore(xe(Ne.value).add(1,"month").format("YYYY-MM-01"))&&!xe(Q.date).isBefore(xe(Ne.value).format("YYYY-MM-01"))).map(({id:Q,...re})=>({...Ce,...re,timeRange:Ei,dateRange:`${re.start}-${re.end}`,hasObsData:N.find(Te=>Te.sub_id===re.sub_id),time:`${re.start}-${re.end}`,isExpired:xe(`${re.date} ${re.start}`).isBefore(xe())}))}return[{...Ce,dateRange:`${pt} - ${Rt}`,timeRange:`${pt} - ${Rt}`,hasObsData:((Vt=(Yi=Ce.obs_data)==null?void 0:Yi.filter(Ei=>Ei.text_video_url))==null?void 0:Vt.length)>0,time:`${pt}-${Rt}`,isExpired:xe(`${Oe} ${pt}`).isBefore(xe())}]}).flat().filter(Ce=>Ce.date.slice(0,7)===Mt(Ne.value,"YYYY-MM-DD").slice(0,7));g.value?(d.value=ge.data||[],u.value=be):a.value===1&&!w.value?(d.value=ge.data||[],u.value=be):(d.value=[...d.value,...ge.data||[]],u.value=[...u.value,...be]),u.value.sort((Ce,He)=>Ce.date===He.date?Bn(Ce.start)>Bn(He.start)?1:-1:xe(Ce.date).isAfter(xe(He.date))?1:-1),l.value=(ge==null?void 0:ge.total)||0,n.nextTick(()=>{$e(),Ie.value&&!w.value&&k()})}finally{r.value=!1,D.value=!1,M.value=!1,g.value=!1}},b=sn.useDebounceFn(()=>{f.value&&(w.value||(M.value=!0,a.value++,J()))},200),x=sn.useDebounceFn(()=>{if(!f.value||!w.value)return;const ge=window.scrollY||window.pageYOffset,be=window.innerHeight;document.documentElement.scrollHeight-(ge+be)<=300&&!D.value&&(M.value=!0,a.value++,J())},200),q=ge=>{const be=u.value.filter(Ce=>Ce.date===ge);return be.length&&be.every(Ce=>Ce.is_delete)},H=ge=>{const be=ge.target;if(!be)return;const Ce=be.scrollTop,He=be.scrollHeight,Oe=be.clientHeight;Ce+Oe>=He&&b()},k=()=>{Ie.value.getContainerEl().addEventListener("scroll",H)},A=n.ref({}),$=(ge,be)=>{ge&&be&&(A.value[be]=ge)},K=async ge=>{await A.value[ge].copyInfo(),i.success({content:v("common.copySuccess")})},j=n.ref(!1),F=n.ref(null),G=ge=>{L("edit",ge,"whole")},Z=ge=>{F.value=ge,j.value=!0},ee=async()=>{if(O.deleteMeetingRequest)try{T.value=!0,await O.deleteMeetingRequest(F.value.id),j.value=!1,i.success({content:`${v("meeting.meetingCancel",[F.value.topic])}`}),g.value=!0,J()}finally{T.value=!1}},se=n.ref(!1),de=n.ref(""),fe=n.ref(null),pe=[{label:v("meeting.meetingSingle"),value:"single"},{label:v("meeting.meetingCycle"),value:"whole"}],je=n.ref("single"),Be=(ge,be)=>{ge.is_cycle?(fe.value=ge,de.value=be,se.value=!0):be==="cancel"?Z(ge):G(ge)},Le=()=>{se.value=!1,fe.value=null,de.value="",je.value="single"},Qe=async()=>{const ge=fe.value;if(de.value==="cancel")try{if(T.value=!0,je.value==="single"&&ge.is_cycle){if(!O.cancelSubMeetingRequest)return;await O.cancelSubMeetingRequest(ge.sub_id),i.success({content:`${v("meeting.meetingCancel",[ge.topic])}`})}else{if(!O.deleteMeetingRequest)return;await O.deleteMeetingRequest(ge.id),i.success({content:`${v("meeting.meetingCancel",[ge.topic])}`})}Le(),g.value=!0,J()}finally{T.value=!1}else L("edit",ge,je.value),Le()},Ue=n.ref(),De=n.computed(()=>[...new Set(u.value.map(ge=>ge.date))].sort((ge,be)=>xe(ge).isBefore(xe(be))?-1:1)),ye=n.computed(()=>[...new Set(u.value.filter(ge=>!ge.isExpired&&!ge.is_delete).map(ge=>ge.date))].sort((ge,be)=>xe(ge).isBefore(xe(be))?-1:1)),Ne=n.ref(),$e=()=>{var Ce;const ge=ye.value.find(He=>!xe(He).isBefore(xe(new Date).format("YYYY-MM-DD")));ge?Ne.value=ge:Ne.value||(Ne.value=xe().format("YYYY-MM-DD")),(Ce=Ue.value)==null||Ce.pickDay(xe(Ne.value)),Ne.value=xe(Ne.value).format("YYYY-MM-DD");const be=u.value.find(He=>He.date===Ne.value&&!He.isExpired&&!He.is_delete);be&&(R.value=[be.sub_id||be.id])},Ee=(ge,be)=>{var Ce;(!be||!((Ce=ge.target)!=null&&Ce.className.includes("date-cell-text")))&&(ge.stopPropagation(),ge.preventDefault())},le=ge=>{Ue.value&&(a.value=1,l.value=null,window.scrollTo({top:0,behavior:"smooth"}),Ue.value.selectDate(ge),g.value=!0,n.nextTick(()=>{Ne.value=xe(Ue.value.selectedDay).format("YYYY-MM-DD"),J()}))},ce=n.computed(()=>u.value.reduce((ge,be)=>{if(ge.length){const Ce=ge.at(-1);return Ce.date===be.date?Ce.list.push(be):ge.push({date:be.date,list:[be]}),ge}else return[{date:be.date,list:[be]}]},[])),me=ge=>bh[xe(ge).day()],Ie=n.ref();n.watch(()=>Ne.value,()=>{he(Ne.value)});const he=ge=>{var He,Oe,pt;const be=xe(ge).format("YYYY-MM-DD"),Ce=document.querySelector(`#group-title-${be}`);Ce&&(w.value?window.scrollTo({top:(((He=Ce.parentElement)==null?void 0:He.offsetTop)||0)-52,behavior:"smooth"}):(pt=Ie.value)==null||pt.scrollTo({top:((Oe=Ce.parentElement)==null?void 0:Oe.offsetTop)||0,behavior:"smooth"}))};n.onMounted(()=>{J(),window.addEventListener("scroll",x),window.addEventListener("resize",x),P(),window.addEventListener("resize",P)}),n.onUnmounted(()=>{var be;window.removeEventListener("scroll",x),window.removeEventListener("resize",x),window.removeEventListener("resize",P);const ge=(be=Ie.value)==null?void 0:be.getContainerEl();ge==null||ge.removeEventListener("scroll",H)});const Ve=ge=>(ge=xe(ge||void 0),C.value?ge.format("MMMM YYYY"):ge.format("YYYY MM月")),ze=n.computed(()=>[{id:"confirm",color:"primary",label:v("common.confirm"),variant:"solid",size:"large",round:"pill",loading:T.value,onClick:()=>{Qe()}},{id:"cancel",color:"primary",label:v("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Le()}}]),dt=n.computed(()=>[{id:"confirm",color:"primary",label:v("common.confirm"),variant:"solid",size:"large",round:"pill",loading:T.value,onClick:()=>{ee()}},{id:"cancel",color:"primary",label:v("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{j.value=!1}}]);return(ge,be)=>(n.openBlock(),n.createElementBlock("div",CS,[n.createElementVNode("div",ES,[n.createElementVNode("div",SS,[n.createElementVNode("span",null,n.toDisplayString(Ve(Ne.value)),1),n.createElementVNode("span",null,[n.createVNode(n.unref(I.OIcon),{onClick:be[0]||(be[0]=Ce=>le("prev-month"))},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronLeft))]),_:1}),n.createVNode(n.unref(I.OIcon),{onClick:be[1]||(be[1]=Ce=>le("next-month"))},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1})])]),n.createElementVNode("div",kS,[n.createVNode(n.unref(it.ElCalendar),{ref_key:"calendarRef",ref:Ue,modelValue:Ne.value,"onUpdate:modelValue":be[4]||(be[4]=Ce=>Ne.value=Ce)},{header:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(Ve(Ne.value)),1),n.createElementVNode("div",null,[n.createVNode(n.unref(I.OIcon),{onClick:be[2]||(be[2]=Ce=>le("prev-month"))},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronLeft))]),_:1}),n.createVNode(n.unref(I.OIcon),{onClick:be[3]||(be[3]=Ce=>le("next-month"))},{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1})])]),"date-cell":n.withCtx(({data:Ce})=>[n.createElementVNode("div",{onClick:He=>Ee(He,De.value.includes(Ce.day)),class:n.normalizeClass({"date-cell":!0,"is-selected":Ce.isSelected,"is-today":n.unref(Mt)(Ce.day)===n.unref(Mt)(),clickable:De.value.includes(Ce.day),expired:n.unref(xe)(n.unref(Mt)()).isAfter(n.unref(xe)(Ce.day)),"all-deleted":q(Ce.day)})},[n.createElementVNode("div",DS,n.toDisplayString(Number(Ce.day.split("-")[2])),1)],10,wS)]),_:1},8,["modelValue"])]),n.createElementVNode("div",{class:n.normalizeClass(["list-wrapper",u.value.length?"":"is-empty"])},[u.value.length?(n.openBlock(),n.createBlock(n.unref(I.OScroller),{key:0,ref_key:"scrollerRef",ref:Ie,onScrollend:n.unref(b),style:n.normalizeStyle({"--header-height":Y.value}),class:"scroller-container","show-type":"hover"},{default:n.withCtx(()=>[n.createElementVNode("div",AS,[n.createVNode(n.unref(I.OCollapse),{modelValue:R.value,"onUpdate:modelValue":be[7]||(be[7]=Ce=>R.value=Ce),accordion:n.unref(w)},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(ce.value,(Ce,He)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:Ce.date},[He===0?(n.openBlock(),n.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:be[5]||(be[5]=Oe=>le("prev-month"))},[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconArrowLeft))]),_:1}),n.createElementVNode("span",null,n.toDisplayString(n.unref(v)("meeting.preMonth")),1)])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["group-item",He===ce.value.length-1&&"last-item"])},[n.createElementVNode("div",{class:n.normalizeClass({"group-bar":!0,"is-active":n.unref(xe)(Ne.value).format("YYYY-MM-DD")===Ce.date,"is-end":Ce.list.every(Oe=>Oe.isExpired)})},[...be[11]||(be[11]=[n.createElementVNode("div",{class:"group-bar-line"},null,-1),n.createElementVNode("div",{class:"group-bar-dot"},null,-1)])],2),n.createElementVNode("div",{class:n.normalizeClass({"group-title":!0,"is-end":Ce.list.every(Oe=>Oe.isExpired)}),id:`group-title-${n.unref(xe)(new Date(Ce.date)).format("YYYY-MM-DD")}`},n.toDisplayString(n.unref(xe)(Ce.date).format("MM/DD"))+" "+n.toDisplayString(me(Ce.date)),11,NS),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Ce.list,(Oe,pt)=>(n.openBlock(),n.createBlock(n.unref(I.OCollapseItem),{key:Oe.sub_id||Oe.id,value:Oe.sub_id||Oe.id,class:n.normalizeClass({"last-item":He===ce.value.length-1&&pt===Ce.list.length-1})},{title:n.withCtx(()=>[n.createElementVNode("div",IS,[n.createElementVNode("div",OS,[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(Il))]),_:1})]),n.createElementVNode("div",BS,[n.createElementVNode("div",{class:n.normalizeClass({"meeting-title":!0,"is-delete":Oe.is_delete,"is-end":Oe.isExpired})},[Oe.is_delete?(n.openBlock(),n.createElementBlock("div",LS,n.toDisplayString(n.unref(v)("meeting.meetingCancelled")),1)):n.createCommentVNode("",!0),n.createElementVNode("div",PS,[n.createElementVNode("div",MS,n.toDisplayString(Oe.topic),1)]),Oe.is_cycle?(n.openBlock(),n.createElementBlock("div",RS,[n.createVNode(n.unref(I.OTag),{color:"primary",variant:"outline"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)("meeting.cycle")),1)]),_:1})])):n.createCommentVNode("",!0)],2),n.createElementVNode("div",VS,[n.createElementVNode("span",null,n.toDisplayString(Oe.dateRange),1),n.createVNode(n.unref(I.ODivider),{direction:"v"}),n.createElementVNode("span",null,n.toDisplayString(n.unref(v)("meeting.sigs"))+": "+n.toDisplayString(Oe.group_name),1)])])]),Oe.is_delete?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",FS,[Oe.isExpired?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[Oe.etherpad?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:0,target:"_blank",href:Oe.etherpad},{suffix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1})]),default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)("meeting.meetingSummary"))+" ",1)]),_:1},8,["href"])):n.createCommentVNode("",!0),Oe.hasObsData?(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:1,target:"_blank",href:`/${n.unref(S)}/video/${Oe.group_name}/${Oe.mid}/${Oe.date}`},{suffix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1})]),default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)("meeting.viewRecord"))+" ",1)]),_:1},8,["href"])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createBlock(n.unref(I.OLink),{key:0,target:"_blank",href:Oe.join_url,rel:"noopener noreferrer"},{suffix:n.withCtx(()=>[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconChevronRight))]),_:1})]),default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)("meeting.joinMeeting"))+" ",1)]),_:1},8,["href"]))])),n.createVNode(n.unref(I.OIcon),{onClick:n.withModifiers(()=>K(pt),["stop"]),class:"copy-icon"},{default:n.withCtx(()=>[n.createVNode(n.unref(Sh))]),_:1},8,["onClick"])]),default:n.withCtx(()=>[n.createElementVNode("div",$S,[n.createVNode(Ol,{show:R.value.includes(Oe.sub_id||Oe.id),data:Oe,ref_for:!0,ref:Rt=>$(Rt,Oe.id),from:"my"},null,8,["show","data"]),!Oe.isExpired&&!Oe.is_delete?(n.openBlock(),n.createElementBlock("div",US,[n.createVNode(n.unref(I.OLink),{onClick:Rt=>Be(Oe,"edit")},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)("meeting.editMeeting")),1)]),_:1},8,["onClick"]),n.createVNode(n.unref(I.OLink),{onClick:Rt=>Be(Oe,"cancel")},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)("meeting.cancelMeeting")),1)]),_:1},8,["onClick"])])):n.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),be[12]||(be[12]=n.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),He===ce.value.length-1?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[M.value?(n.openBlock(),n.createElementBlock("div",qS,n.toDisplayString(n.unref(v)("common.loading")),1)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"list-month-change next-month",onClick:be[6]||(be[6]=Oe=>le("next-month"))},[n.createVNode(n.unref(I.OIcon),null,{default:n.withCtx(()=>[n.createVNode(n.unref(I.OIconArrowRight))]),_:1}),n.createElementVNode("span",null,n.toDisplayString(n.unref(v)("meeting.nextMonth")),1)])],64)):n.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):r.value?n.createCommentVNode("",!0):n.renderSlot(ge.$slots,"empty",{key:1})],2),n.createVNode(n.unref(I.ODialog),{visible:se.value,"onUpdate:visible":be[9]||(be[9]=Ce=>se.value=Ce),"main-class":"handle-dialog",onClose:Le,actions:ze.value},{header:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)("meeting.meetingHandleText",[de.value==="edit"?n.unref(v)("meeting.edit"):n.unref(v)("meeting.cancel2")])),1)]),default:n.withCtx(()=>[n.createVNode(n.unref(I.ORadioGroup),{modelValue:je.value,"onUpdate:modelValue":be[8]||(be[8]=Ce=>je.value=Ce)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(pe,Ce=>n.createVNode(n.unref(I.ORadio),{value:Ce.value,key:Ce.value},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(Ce.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["visible","actions"]),n.createVNode(n.unref(I.ODialog),{visible:j.value,"onUpdate:visible":be[10]||(be[10]=Ce=>j.value=Ce),"main-class":"cancel-dialog",actions:dt.value},{header:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(v)("meeting.confirmCancel")),1)]),default:n.withCtx(()=>{var Ce;return[n.createElementVNode("div",jS,n.toDisplayString(n.unref(v)("meeting.confirmCancelDesc",[(Ce=F.value)==null?void 0:Ce.topic])),1)]}),_:1},8,["visible","actions"])])]))}}),HS=Object.assign(wc,{install(s){s.component("OMeetingCalendar",wc)}}),zS=Object.assign(Nc,{install(s){s.component("OMeetingCalendar",Nc)}}),GS=Object.assign(ah,{install(s){s.component("OMeetingPlayback",ah)}}),WS=Object.assign(oh,{install(s){s.component("OSigMeetingCalendar",oh)}}),YS=Object.assign(lh,{install(s){s.component("OMyMeetingCalendar",lh)}}),XS={OBanner:uh,OCookieNotice:ch,OFooter:dh,OHeader:hh,OHeaderMoblie:fh,OHeaderSearch:ph,OHeaderUser:mh,OPlusConfigProvider:gh,OSection:vh,OSourceCode:_h,OThemeSwitcher:yh},KS={install:s=>{Object.entries(XS).forEach(([e,i])=>{s.component(e,i)})}};exports.OElCookieNotice=Ke.OElCookieNotice;exports.CalendarDataType=et;exports.EventsStatusT=Ji;exports.OActivityApproval=My;exports.OActivityForm=Py;exports.OBanner=uh;exports.OCookieNotice=ch;exports.OEventsApply=bT;exports.OEventsCalendar=yT;exports.OEventsList=TT;exports.OFooter=dh;exports.OHeader=hh;exports.OHeaderMoblie=fh;exports.OHeaderSearch=ph;exports.OHeaderUser=mh;exports.OMeetingCalendar=HS;exports.OMeetingForm=zS;exports.OMeetingPlayback=GS;exports.OMyActivityCalendar=Ry;exports.OMyMeetingCalendar=YS;exports.OPlusConfigProvider=gh;exports.OSection=vh;exports.OSigMeetingCalendar=WS;exports.OSourceCode=_h;exports.OThemeSwitcher=yh;exports.default=KS;