@opendesign-plus/components 0.0.1-rc.3 → 0.0.1-rc.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-OElCookieNotice.cjs.js +1 -0
- package/dist/chunk-OElCookieNotice.es.js +862 -0
- package/dist/components/activity/OActivityApproval.vue.d.ts +273 -0
- package/dist/components/activity/OActivityForm.vue.d.ts +138 -0
- package/dist/components/activity/OActivityMyCalendar.vue.d.ts +636 -0
- package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
- package/dist/components/activity/config.d.ts +1 -0
- package/dist/components/activity/index.d.ts +648 -0
- package/dist/components/activity/types.d.ts +88 -0
- package/dist/components/banner/OBanner.vue.d.ts +13 -0
- package/dist/components/banner/OBannerContent.vue.d.ts +7 -0
- package/dist/components/banner/index.d.ts +68 -0
- package/dist/components/banner/types.d.ts +31 -0
- package/dist/components/config-provider/OPlusConfigProvider.vue.d.ts +24 -0
- package/dist/components/config-provider/index.d.ts +30 -0
- package/dist/components/cookie-notice/OCookieNotice.vue.d.ts +17 -0
- package/dist/components/cookie-notice/index.d.ts +53 -0
- package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
- package/dist/components/element-plus/index.d.ts +2 -0
- package/dist/components/events/OEventsApply.vue.d.ts +16 -0
- package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
- package/dist/components/events/OEventsList.vue.d.ts +26 -0
- package/dist/components/events/config.d.ts +14 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +73 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components/footer/OFooter.vue.d.ts +46 -0
- package/dist/components/footer/index.d.ts +89 -0
- package/dist/components/header/OHeader.vue.d.ts +30 -0
- package/dist/components/header/OHeaderMobile.vue.d.ts +178 -0
- package/dist/components/header/components/HeaderContent.vue.d.ts +13 -0
- package/dist/components/header/components/HeaderNav.vue.d.ts +19 -0
- package/dist/components/header/components/HeaderNavMobile.vue.d.ts +36 -0
- package/dist/components/header/index.d.ts +153 -0
- package/dist/components/header/types.d.ts +85 -0
- package/dist/components/header-language-switcher/OHeaderLanguageSwitcher.vue.d.ts +49 -0
- package/dist/components/header-language-switcher/index.d.ts +90 -0
- package/dist/components/header-search/OHeaderSearch.vue.d.ts +1032 -0
- package/dist/components/header-search/index.d.ts +607 -0
- package/dist/components/header-source-code/OHeaderSourceCode.vue.d.ts +18 -0
- package/dist/components/header-source-code/index.d.ts +23 -0
- package/dist/components/header-theme/OHeaderTheme.vue.d.ts +25 -0
- package/dist/components/header-theme/index.d.ts +50 -0
- package/dist/components/header-user/OHeaderUser.vue.d.ts +40 -0
- package/dist/components/header-user/index.d.ts +53 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +297 -0
- package/dist/components/meeting/OMeetingForm.vue.d.ts +141 -0
- package/dist/components/meeting/OMeetingMyCalendar.vue.d.ts +644 -0
- package/dist/components/meeting/OMeetingPlayback.vue.d.ts +94 -0
- package/dist/components/meeting/OMeetingSigCalendar.vue.d.ts +24 -0
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +29 -0
- package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +13 -0
- package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +20 -0
- package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
- package/dist/components/meeting/components/OMeetingSigAside.vue.d.ts +16 -0
- package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
- package/dist/components/meeting/config.d.ts +12 -0
- package/dist/components/meeting/index.d.ts +823 -0
- package/dist/components/meeting/types.d.ts +235 -0
- package/dist/components/meeting/utils.d.ts +9 -0
- package/dist/components/search/OSearchInput.vue.d.ts +1025 -0
- package/dist/components/search/composables/useImageSearch.d.ts +48 -0
- package/dist/components/search/composables/useKeywordHighlight.d.ts +2 -0
- package/dist/components/search/composables/useSearchHistory.d.ts +14 -0
- package/dist/components/search/index.d.ts +600 -0
- package/dist/components/search/internal/HighlightText.vue.d.ts +9 -0
- package/dist/components/{OHeaderSearch.vue.d.ts → search/internal/SearchImageInput.vue.d.ts} +210 -166
- package/dist/components/search/internal/SearchPanel.vue.d.ts +100 -0
- package/dist/components/search/types.d.ts +20 -0
- package/dist/components/{OSection.vue.d.ts → section/OSection.vue.d.ts} +4 -4
- package/dist/components/section/index.d.ts +47 -0
- package/dist/components.cjs.js +224 -1
- package/dist/components.css +1 -1
- package/dist/components.element.cjs.js +1 -0
- package/dist/components.element.es.js +4 -0
- package/dist/components.es.js +46234 -1078
- package/dist/index.d.ts +16 -12
- package/docs/design.md +27 -27
- package/docs/design_banner.md +41 -41
- package/docs/design_section.md +27 -27
- package/package.json +18 -9
- package/scripts/generate-components-index.js +61 -80
- package/src/assets/events/svg-icons/icon-checked.svg +3 -0
- package/src/assets/events/svg-icons/icon-competition.svg +7 -0
- package/src/assets/events/svg-icons/icon-events.svg +4 -0
- package/src/assets/events/svg-icons/icon-release.svg +4 -0
- package/src/assets/events/svg-icons/icon-summit.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-all.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
- package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
- package/src/assets/meeting/svg-icons/icon-event.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meet.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-summit.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
- package/src/assets/meeting/transparent.png +0 -0
- package/src/assets/styles/element-plus.scss +235 -0
- package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
- package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
- package/src/assets/svg-icons/icon-caret-left.svg +3 -0
- package/src/assets/svg-icons/icon-caret-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
- package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -3
- package/src/assets/svg-icons/icon-delete-hover.svg +4 -0
- package/src/assets/svg-icons/icon-delete.svg +7 -3
- package/src/assets/svg-icons/icon-filter.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -3
- package/src/assets/svg-icons/icon-header-delete.svg +3 -3
- package/src/assets/svg-icons/icon-header-menu.svg +3 -0
- package/src/assets/svg-icons/icon-header-person.svg +3 -0
- package/src/assets/svg-icons/icon-header-search.svg +4 -4
- package/src/assets/svg-icons/icon-image-close.svg +4 -0
- package/src/assets/svg-icons/icon-image-upload.svg +3 -0
- package/src/assets/svg-icons/icon-image-zoomin.svg +3 -0
- package/src/assets/svg-icons/icon-loading.svg +4 -0
- package/src/assets/svg-icons/icon-locale.svg +3 -0
- package/src/assets/svg-icons/icon-log-off.svg +3 -0
- package/src/assets/svg-icons/icon-message.svg +3 -0
- package/src/assets/svg-icons/icon-moon.svg +3 -3
- package/src/assets/svg-icons/icon-outlink.svg +3 -0
- package/src/assets/svg-icons/icon-overview.svg +3 -0
- package/src/assets/svg-icons/icon-refresh.svg +3 -0
- package/src/assets/svg-icons/icon-search.svg +3 -0
- package/src/assets/svg-icons/icon-setting.svg +3 -0
- package/src/assets/svg-icons/icon-sun.svg +3 -3
- package/src/assets/svg-icons/icon-tips.svg +3 -0
- package/src/components/activity/OActivityApproval.vue +868 -0
- package/src/components/activity/OActivityForm.vue +548 -0
- package/src/components/activity/OActivityMyCalendar.vue +1540 -0
- package/src/components/activity/composables/useActivityConfig.ts +141 -0
- package/src/components/activity/config.ts +1 -0
- package/src/components/activity/index.ts +24 -0
- package/src/components/activity/types.ts +95 -0
- package/src/components/banner/OBanner.vue +288 -0
- package/src/components/banner/OBannerContent.vue +175 -0
- package/src/components/banner/index.ts +18 -0
- package/src/components/banner/types.ts +39 -0
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnly.vue +13 -0
- package/src/components/common/ContentWrapper.vue +85 -85
- package/src/components/common/MoreText.vue +124 -0
- package/src/components/common/ThFilter.vue +330 -0
- package/src/components/{OPlusConfigProvider.vue → config-provider/OPlusConfigProvider.vue} +32 -32
- package/src/components/config-provider/index.ts +10 -0
- package/src/components/cookie-notice/OCookieNotice.vue +575 -0
- package/src/components/cookie-notice/index.ts +10 -0
- package/src/components/element-plus/OElCookieNotice.vue +603 -0
- package/src/components/element-plus/index.ts +3 -0
- package/src/components/events/OEventsApply.vue +503 -0
- package/src/components/events/OEventsCalendar.vue +600 -0
- package/src/components/events/OEventsList.vue +463 -0
- package/src/components/events/config.ts +35 -0
- package/src/components/events/index.ts +24 -0
- package/src/components/events/types.ts +84 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/footer/OFooter.vue +577 -0
- package/src/components/footer/index.ts +10 -0
- package/src/components/header/OHeader.vue +157 -0
- package/src/components/header/OHeaderMobile.vue +184 -0
- package/src/components/header/components/HeaderContent.vue +1125 -0
- package/src/components/header/components/HeaderNav.vue +278 -0
- package/src/components/header/components/HeaderNavMobile.vue +380 -0
- package/src/components/header/index.ts +18 -0
- package/src/components/header/types.ts +96 -0
- package/src/components/header-language-switcher/OHeaderLanguageSwitcher.vue +211 -0
- package/src/components/header-language-switcher/index.ts +10 -0
- package/src/components/header-search/OHeaderSearch.vue +628 -0
- package/src/components/header-search/index.ts +10 -0
- package/src/components/header-source-code/OHeaderSourceCode.vue +151 -0
- package/src/components/header-source-code/index.ts +10 -0
- package/src/components/header-theme/OHeaderTheme.vue +132 -0
- package/src/components/header-theme/index.ts +10 -0
- package/src/components/header-user/OHeaderUser.vue +238 -0
- package/src/components/header-user/index.ts +10 -0
- package/src/components/meeting/OMeetingCalendar.vue +909 -0
- package/src/components/meeting/OMeetingForm.vue +1131 -0
- package/src/components/meeting/OMeetingMyCalendar.vue +1536 -0
- package/src/components/meeting/OMeetingPlayback.vue +469 -0
- package/src/components/meeting/OMeetingSigCalendar.vue +439 -0
- package/src/components/meeting/components/OMeetingCalendarList.vue +609 -0
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +213 -0
- package/src/components/meeting/components/OMeetingDetail.vue +263 -0
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +615 -0
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
- package/src/components/meeting/components/OMeetingSigAside.vue +204 -0
- package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
- package/src/components/meeting/config.ts +48 -0
- package/src/components/meeting/index.ts +45 -0
- package/src/components/meeting/types.ts +268 -0
- package/src/components/meeting/utils.ts +70 -0
- package/src/components/search/OSearchInput.vue +526 -0
- package/src/components/search/composables/useImageSearch.ts +157 -0
- package/src/components/search/composables/useKeywordHighlight.ts +30 -0
- package/src/components/search/composables/useSearchHistory.ts +75 -0
- package/src/components/search/index.ts +23 -0
- package/src/components/search/internal/HighlightText.vue +37 -0
- package/src/components/search/internal/SearchImageInput.vue +498 -0
- package/src/components/search/internal/SearchPanel.vue +431 -0
- package/src/components/search/types.ts +25 -0
- package/src/components/{OSection.vue → section/OSection.vue} +178 -178
- package/src/components/section/index.ts +10 -0
- package/src/draft/Banner.vue +265 -265
- package/src/draft/ButtonCards.vue +105 -105
- package/src/draft/Feature.vue +133 -133
- package/src/draft/Footer.vue +519 -512
- package/src/draft/HorizontalAnchor.vue +165 -165
- package/src/draft/ItemSwiper.vue +133 -133
- package/src/draft/Logo.vue +141 -141
- package/src/draft/LogoCard.vue +74 -74
- package/src/draft/LogoV2.vue +19 -19
- package/src/draft/MainCard.vue +38 -38
- package/src/draft/MultiCard.vue +94 -94
- package/src/draft/MultiIconCard.vue +73 -73
- package/src/draft/OInfoCard.vue +176 -176
- package/src/draft/Process.vue +81 -81
- package/src/draft/Section.vue +167 -167
- package/src/draft/SingleTabCard.vue +84 -84
- package/src/draft/SliderCard.vue +111 -110
- package/src/env.d.ts +16 -1
- package/src/i18n/en.ts +276 -20
- package/src/i18n/index.ts +56 -42
- package/src/i18n/zh.ts +266 -9
- package/src/index.ts +16 -32
- package/src/shared/provide.ts +6 -6
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +9 -9
- package/tsconfig.json +37 -33
- package/vite.config.ts +123 -94
- package/dist/components/OBanner.vue.d.ts +0 -2
- package/dist/components/OCookieNotice.vue.d.ts +0 -16
- package/dist/components/OElCookieNotice.vue.d.ts +0 -31
- package/dist/components/OPlusConfigProvider.vue.d.ts +0 -23
- package/dist/components/OThemeSwitcher.vue.d.ts +0 -28
- package/dist/components.umd.js +0 -1
- package/src/components/OBanner.vue +0 -390
- package/src/components/OCookieNotice.vue +0 -424
- package/src/components/OElCookieNotice.vue +0 -413
- package/src/components/OHeaderSearch.vue +0 -601
- package/src/components/OThemeSwitcher.vue +0 -108
- package/src/components/common/ClientOnlyWrapper.ts +0 -21
package/dist/components.cjs.js
CHANGED
|
@@ -1 +1,224 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("@opensig/opendesign"),I=require("@opendesign-plus/composables"),M=require("@vueuse/core"),$=require("element-plus");require("element-plus/es/components/button/style/index");require("element-plus/es/components/dialog/style/index");require("element-plus/es/components/switch/style/index");require("element-plus/es/components/icon/style/index");const ee=e.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(t){const o=Symbol("default"),n=t,p=e.computed(()=>n.verticalPadding?i.isBoolean(n.verticalPadding)?o:i.isString(n.verticalPadding)?n.verticalPadding:n.verticalPadding[0]:0),c=e.computed(()=>n.verticalPadding?i.isBoolean(n.verticalPadding)?o:i.isString(n.verticalPadding)?n.verticalPadding:i.isUndefined(n.verticalPadding[1])?n.verticalPadding[0]:n.verticalPadding[1]:0);return(h,f)=>(e.openBlock(),e.createElementBlock("div",{class:"content-wrapper",style:e.normalizeStyle({"--content-wrapper-vertical-paddingTop":p.value===e.unref(o)?void 0:p.value,"--content-wrapper-vertical-paddingBottom":c.value===e.unref(o)?void 0:c.value})},[e.renderSlot(h.$slots,"default",{},void 0,!0)],4))}}),x=(t,o)=>{const n=t.__vccOpts||t;for(const[p,c]of o)n[p]=c;return n},H=x(ee,[["__scopeId","data-v-a0f91aed"]]),te={key:0},oe={class:"banner-content"},ne=["src"],le={key:1,class:"banner-title"},ae={key:2,class:"banner-subtitle"},re={key:4,class:"banner-opts"},ce=e.defineComponent({__name:"OBanner",props:{options:void 0,size:"large",contentJustifyCenter:!1},setup(t){const o=t,{isLight:n}=I.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:p}=I.useScreen(),c=e.computed(()=>o.options),h=e.ref(""),f=r=>{setTimeout(()=>{h.value=c.value[r].bg_theme??"light"},100)},l=(r,m)=>{r&&!m&&window.open(r)};return(r,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["home-banner",t.size])},[t.size==="tiny"?(e.openBlock(),e.createElementBlock("div",te,e.toDisplayString(c.value[1].title),1)):e.unref(p)?(e.openBlock(),e.createBlock(e.unref(i.OCarousel),{key:2,class:"banner-carousel",effect:"gallery","indicator-click":"","data-o-theme":h.value,arrow:"never","auto-play":!0,onBeforeChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,k)=>(e.openBlock(),e.createBlock(e.unref(i.OCarouselItem),{class:e.normalizeClass(["banner-item",`banner-item${k}`])},{default:e.withCtx(()=>[e.createVNode(H,{class:"banner-wrapper"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OFigure),{class:"banner-bg",src:a.bg,onClick:g=>l(a.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":h.value,onBeforeChange:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,k)=>(e.openBlock(),e.createBlock(e.unref(i.OCarouselItem),{key:k,class:e.normalizeClass(["banner-item",`banner-item${k}`])},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OFigure),{class:e.normalizeClass(["banner-bg",{"with-sticky-bg":a.withStickyBg,"in-dark":!e.unref(n),"cursor-pointer":a.href&&!a.btn}]),src:a.bg,style:e.normalizeStyle({"--pad-offset":a.pad_offset}),onClick:g=>l(a.href,a.btn)},{default:e.withCtx(()=>[e.createVNode(H,{class:e.normalizeClass(["banner-wrapper",["banner-wrapper",t.contentJustifyCenter?"content-center":""]])},{default:e.withCtx(()=>[e.createElementVNode("div",oe,[!e.unref(p)&&a.attach?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.attach,class:"banner-attach"},null,8,ne)):e.createCommentVNode("",!0),a.title?(e.openBlock(),e.createElementBlock("div",le,e.toDisplayString(a.title),1)):e.createCommentVNode("",!0),a.subtitle?(e.openBlock(),e.createElementBlock("div",ae,e.toDisplayString(a.subtitle),1)):e.createCommentVNode("",!0),a.bg_text?(e.openBlock(),e.createElementBlock("div",{key:3,class:"banner-text",style:e.normalizeStyle({backgroundImage:`url(${a.bg_text})`,"--pc-width":a.pc_text_width,"--pc-height":a.pc_text_height,"--pad-width":a.pad_text_width,"--pad-height":a.pad_text_height})},null,4)):e.createCommentVNode("",!0),a.btn?(e.openBlock(),e.createElementBlock("div",re,[e.createVNode(e.unref(i.OButton),{href:a.href,target:"_blank",variant:"solid",color:"primary",size:t.size},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.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))}}),G=x(ce,[["__scopeId","data-v-38a33983"]]),se=t=>{const o=e.ref(!1);return e.onMounted(()=>{o.value=!0}),()=>o.value&&t.default?t.default():null},F=e.defineComponent({setup(t,{slots:o}){const n=e.resolveComponent("ClientOnly");return n&&typeof n!="string"?()=>e.h(n,null,{default:()=>o.default?o.default():null}):se(o)}}),ie={search:"搜索","search.hot":"热门搜索","search.placeholder":"搜索","search.expandedPlaceholder":"请输入搜索内容","search.history":"历史搜索","cookie.desc":"我们使用cookie来确保您的高速浏览体验。继续浏览本站,即表示您同意我们使用cookie。","cookie.about":"查看详情"},de={search:"Search","search.hot":"Top search","search.placeholder":"Please enter the content","search.expandedPlaceholder":"Please enter the content","search.history":"History","cookie.title":"{0} Community Respects Your Privacy","cookie.desc":'This site uses cookies from us and our partners to improve your browsing experience and make the site work properly. By clicking "Accept All", you consent to the use of cookies. By clicking "Reject All", you disable the use of unnecessary cookies. You can manage your cookie settings by clicking "Manage Cookies". For more information or to change your cookie settings, please refer to our ',"cookie.about":"About Cookies","cookie.acceptAll":"Accept All","cookie.rejectAll":"Reject All","cookie.manage":"Manage Cookies","cookie.necessaryCookie":"Strictly Necessary Cookies","cookie.alwaysOn":"Always active","cookie.necessaryCookieDetail":"These cookies are necessary for the site to work properly and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as logging in or filling in forms. You can set the browser to block these cookies, but that can make parts of the site not work. These cookies do not store any personally identifiable information.","cookie.analyticalCookie":"Analytics Cookies","cookie.analyticalCookieDetail":"We will use these cookies only with your consent. These cookies help us make improvements by collecting statistics such as the number of visits and traffic sources.","cookie.saveSetting":"Save Settings","cookie.setting":"Cookie settings"},j=Symbol("provide-config-provider"),ue=e.ref({zh:ie,en:de});function U(){const o=e.getCurrentInstance()?e.inject(j):null,n=e.computed(()=>(o==null?void 0:o.locale)||"zh");return{locale:n,t:(c,...h)=>{const l=ue.value[n.value][c];return h.length>0&&i.isString(l)?l.replace(/{(\d+)}/g,(r,m)=>h[m]??r):(i.isUndefined(l)&&console.warn(`Cannot translate the value of keypath '${c}'`),l)}}}const he={key:0,class:"cookie-notice"},me={class:"cookie-notice-content"},pe=["type"],fe={class:"cookie-notice-left"},ke={key:0,class:"cookie-desc",style:{"margin-top":"0"}},ve=["href"],ge={class:"cookie-title"},ye={class:"cookie-desc"},Ce=["href"],Ve={key:0,class:"cookie-notice-right"},we={class:"cookie-dlg-title"},_e={class:"cookie-dlg-content"},Be={class:"content-item"},Ne={class:"item-header"},Ee={class:"item-title"},be={class:"item-extra"},Se={class:"item-detail"},$e={class:"content-item"},xe={class:"item-header"},Ie={class:"item-title"},Oe={class:"item-extra"},De={class:"item-detail"},ze="0",R="1",Te="2",O="3",Ae="agreed-cookiepolicy-zh",Pe="agreed-cookiepolicy-en",Me=e.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},enableGrid:{type:Boolean},community:{},aboutPathZh:{},aboutPathEn:{},teleportTarget:{}},emits:["update:visible"],setup(t,{expose:o,emit:n}){const p=t,c=n,{lePadV:h,leLaptop:f}=I.useScreen(),{locale:l,t:r}=U(),m=e.computed(()=>l.value==="zh"),a=e.computed(()=>m.value?Ae:Pe),k=e.ref(!1),g=M.useVModel(p,"visible",c,{defaultValue:!1}),V=d=>{const u=document.cookie.split(";").find(_=>_.split("=")[0].trim()===encodeURIComponent(d));return u?decodeURIComponent(u.split("=")[1]):null},w=(d,u,_,T)=>{const X=`; max-age=${_*24*60*60}`;document.cookie=`${encodeURIComponent(d)}=${encodeURIComponent(u)}${X}; path=/; domain=${T}`},B=(d,u)=>{document.cookie=`${encodeURIComponent(d)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${u}`},y=d=>{typeof d=="boolean"?g.value=d:g.value=!g.value,e.nextTick(()=>{!g.value&&m.value&&V(a.value)!==O&&w(a.value,O,180,location.hostname)})},N=e.ref(!1),b=d=>{typeof d=="boolean"?N.value=d:N.value=!N.value},s=()=>m.value?V(a.value)!==O:(V(a.value)??"0")===ze,E=()=>m.value?V(a.value)===O:V(a.value)===R;e.onMounted(()=>{s()&&y(!0)}),e.watch(l,()=>{y(s())});const v=()=>{k.value=!0,B(a.value,location.hostname),w(a.value,R,180,location.hostname),y(!1)},S=()=>{k.value=!1,B(a.value,location.hostname),w(a.value,Te,180,location.hostname),y(!1)},z=e.computed(()=>[{id:"save",color:"primary",label:r("cookie.saveSetting"),variant:"outline",size:"large",round:"pill",onClick:()=>{k.value?v():S(),b(!1)}},{id:"allowAll",color:"primary",label:r("cookie.acceptAll"),variant:"outline",size:"large",round:"pill",onClick:()=>{k.value=!0,v(),b(!1)}}]),C=d=>{d&&(k.value=E())};return o({check(){E()===g.value&&y()}}),(d,u)=>(e.openBlock(),e.createBlock(e.unref(F),null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.teleportTarget||"#app"},[e.unref(g)?(e.openBlock(),e.createElementBlock("div",he,[e.createElementVNode("div",me,[e.createElementVNode("div",{type:e.unref(l),class:e.normalizeClass({"cookie-notice-wrap-grid":t.enableGrid,"cookie-notice-wrap":!t.enableGrid})},[e.createElementVNode("div",fe,[m.value?(e.openBlock(),e.createElementBlock("p",ke,[e.createTextVNode(e.toDisplayString(e.unref(r)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:t.aboutPathZh,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(r)("cookie.about")),9,ve)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("p",ge,e.toDisplayString(e.unref(r)("cookie.title",[t.community])),1),e.createElementVNode("p",ye,[e.createTextVNode(e.toDisplayString(e.unref(r)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:t.aboutPathEn,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(r)("cookie.about")),9,Ce),u[4]||(u[4]=e.createTextVNode(". ",-1))])],64))]),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ve,[e.createVNode(e.unref(i.OButton),{round:"pill",variant:"outline",color:"primary",onClick:v},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("cookie.acceptAll")),1)]),_:1}),e.createVNode(e.unref(i.OButton),{round:"pill",variant:"outline",color:"primary",onClick:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("cookie.rejectAll")),1)]),_:1}),e.createVNode(e.unref(i.OButton),{round:"pill",variant:"outline",color:"primary",onClick:u[0]||(u[0]=_=>b(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("cookie.manage")),1)]),_:1})])),e.createVNode(e.unref(i.OIcon),{class:"cookie-notice-close",type:e.unref(l),onClick:u[1]||(u[1]=_=>y(!1))},{default:e.withCtx(()=>[e.createVNode(e.unref(i.OIconClose))]),_:1},8,["type"])],10,pe)]),e.createVNode(e.unref(i.ODialog),{visible:N.value,"onUpdate:visible":u[3]||(u[3]=_=>N.value=_),size:e.unref(f)?"medium":"large","phone-half-full":e.unref(h),class:"cookie-dlg",actions:z.value,onChange:C},{header:e.withCtx(()=>[e.createElementVNode("span",we,e.toDisplayString(e.unref(r)("cookie.manage")),1)]),default:e.withCtx(()=>[e.createElementVNode("div",_e,[e.createElementVNode("div",Be,[e.createElementVNode("div",Ne,[e.createElementVNode("span",Ee,e.toDisplayString(e.unref(r)("cookie.necessaryCookie")),1),e.createElementVNode("span",be,e.toDisplayString(e.unref(r)("cookie.alwaysOn")),1)]),e.createElementVNode("div",Se,e.toDisplayString(e.unref(r)("cookie.necessaryCookieDetail")),1)]),e.createElementVNode("div",$e,[e.createElementVNode("div",xe,[e.createElementVNode("span",Ie,e.toDisplayString(e.unref(r)("cookie.analyticalCookie")),1),e.createElementVNode("span",Oe,[e.createVNode(e.unref(i.OSwitch),{modelValue:k.value,"onUpdate:modelValue":u[2]||(u[2]=_=>k.value=_)},null,8,["modelValue"])])]),e.createElementVNode("div",De,e.toDisplayString(e.unref(r)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","actions"])])):e.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),q=x(Me,[["__scopeId","data-v-5ba95c2f"]]),Ue={key:0,class:"cookie-notice"},He={class:"cookie-notice-content"},Re=["type"],Le={class:"cookie-notice-left"},Ke={key:0,class:"cookie-desc",style:{"margin-top":"0"}},Ge=["href"],Fe={class:"cookie-title"},je={class:"cookie-desc"},qe=["href"],Ye={key:0,class:"cookie-notice-right"},Je={class:"cookie-dlg-content"},We={class:"content-item"},Ze={class:"item-header"},Qe={class:"item-title"},Xe={class:"item-extra"},et={class:"item-detail"},tt={class:"content-item"},ot={class:"item-header"},nt={class:"item-title"},lt={class:"item-extra"},at={class:"item-detail"},rt="0",L="1",ct="2",D="3",st="agreed-cookiepolicy-zh",it="agreed-cookiepolicy-en",dt=e.defineComponent({__name:"OElCookieNotice",props:{visible:{type:Boolean},enableGrid:{type:Boolean},community:{},aboutPathZh:{},aboutPathEn:{},teleportTarget:{}},emits:["update:visible"],setup(t,{expose:o,emit:n}){const p=t,c=n,{lePadV:h}=I.useScreen(),{locale:f,t:l}=U(),r=e.computed(()=>f.value==="zh"),m=e.computed(()=>r.value?st:it),a=e.ref(!1),k=M.useVModel(p,"visible",c,{defaultValue:!1}),g=C=>{const d=document.cookie.split(";").find(u=>u.split("=")[0].trim()===encodeURIComponent(C));return d?decodeURIComponent(d.split("=")[1]):null},V=(C,d,u,_)=>{const T=`; max-age=${u*24*60*60}`;document.cookie=`${encodeURIComponent(C)}=${encodeURIComponent(d)}${T}; path=/; domain=${_}`},w=C=>{typeof C=="boolean"?k.value=C:k.value=!k.value,e.nextTick(()=>{!k.value&&r.value&&g(m.value)!==D&&V(m.value,D,180,location.hostname)})},B=e.ref(!1),y=C=>{typeof C=="boolean"?B.value=C:B.value=!B.value},N=()=>r.value?g(m.value)!==D:(g(m.value)??"0")===rt,b=()=>r.value?g(m.value)===D:g(m.value)===L;e.onMounted(()=>{N()&&w(!0)}),e.watch(f,()=>{w(N())});const s=()=>{a.value=!0,V(m.value,L,180,location.hostname),w(!1)},E=()=>{a.value=!1,V(m.value,ct,180,location.hostname),w(!1)},v=()=>{a.value?s():E(),y(!1)},S=()=>{a.value=!0,s(),y(!1)},z=()=>{a.value=b()};return o({check(){b()===k.value&&w()}}),(C,d)=>(e.openBlock(),e.createBlock(e.unref(F),null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{to:t.teleportTarget||"#app"},[e.unref(k)?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",He,[e.createElementVNode("div",{type:e.unref(f),class:e.normalizeClass({"cookie-notice-wrap-grid":t.enableGrid,"cookie-notice-wrap":!t.enableGrid})},[e.createElementVNode("div",Le,[r.value?(e.openBlock(),e.createElementBlock("p",Ke,[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:t.aboutPathZh,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(l)("cookie.about")),9,Ge)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("p",Fe,e.toDisplayString(e.unref(l)("cookie.title",[t.community])),1),e.createElementVNode("p",je,[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.desc"))+" ",1),e.createElementVNode("a",{href:t.aboutPathEn,target:"_blank",rel:"noopener noreferrer"},e.toDisplayString(e.unref(l)("cookie.about")),9,qe),d[4]||(d[4]=e.createTextVNode(". ",-1))])],64))]),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(e.unref($.ElButton),{round:"",type:"primary",onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.acceptAll")),1)]),_:1}),e.createVNode(e.unref($.ElButton),{round:"",type:"primary",onClick:E},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.rejectAll")),1)]),_:1}),e.createVNode(e.unref($.ElButton),{round:"",type:"primary",onClick:d[0]||(d[0]=u=>y(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.manage")),1)]),_:1})])),e.createVNode(e.unref($.ElIcon),{class:"cookie-notice-close",type:e.unref(f),onClick:d[1]||(d[1]=u=>w(!1))},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"close-icon",{},()=>[d[5]||(d[5]=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[e.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})],-1))],!0)]),_:3},8,["type"])],10,Re)]),e.createVNode(e.unref($.ElDialog),{modelValue:B.value,"onUpdate:modelValue":d[3]||(d[3]=u=>B.value=u),width:e.unref(h)?"90%":"50%",title:e.unref(l)("cookie.manage"),"destroy-on-close":"",onOpen:z},{footer:e.withCtx(()=>[e.createVNode(e.unref($.ElButton),{round:"",type:"primary",onClick:v,style:{"margin-right":"16px"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.saveSetting")),1)]),_:1}),e.createVNode(e.unref($.ElButton),{round:"",type:"primary",onClick:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("cookie.acceptAll")),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",Je,[e.createElementVNode("div",We,[e.createElementVNode("div",Ze,[e.createElementVNode("span",Qe,e.toDisplayString(e.unref(l)("cookie.necessaryCookie")),1),e.createElementVNode("span",Xe,e.toDisplayString(e.unref(l)("cookie.alwaysOn")),1)]),e.createElementVNode("div",et,e.toDisplayString(e.unref(l)("cookie.necessaryCookieDetail")),1)]),e.createElementVNode("div",tt,[e.createElementVNode("div",ot,[e.createElementVNode("span",nt,e.toDisplayString(e.unref(l)("cookie.analyticalCookie")),1),e.createElementVNode("span",lt,[e.createVNode(e.unref($.ElSwitch),{modelValue:a.value,"onUpdate:modelValue":d[2]||(d[2]=u=>a.value=u)},null,8,["modelValue"])])]),e.createElementVNode("div",at,e.toDisplayString(e.unref(l)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["modelValue","width","title"])])):e.createCommentVNode("",!0)],8,["to"]))]),_:3}))}}),Y=x(dt,[["__scopeId","data-v-3840fed3"]]),ut={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function ht(t,o){return e.openBlock(),e.createElementBlock("svg",ut,[...o[0]||(o[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 mt={name:"components-icon-close",render:ht},pt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function ft(t,o){return e.openBlock(),e.createElementBlock("svg",pt,[...o[0]||(o[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 K={name:"components-icon-header-search",render:ft},kt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function vt(t,o){return e.openBlock(),e.createElementBlock("svg",kt,[...o[0]||(o[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 gt={name:"components-icon-header-delete",render:vt},yt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Ct(t,o){return e.openBlock(),e.createElementBlock("svg",yt,[...o[0]||(o[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 Vt={name:"components-icon-delete",render:Ct},wt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function _t(t,o){return e.openBlock(),e.createElementBlock("svg",wt,[...o[0]||(o[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 Bt={name:"components-icon-header-back",render:_t},Nt={class:"o-header-search"},Et={class:"o-header-search-drawer"},bt={key:0,class:"o-header-search-recommend-container"},St=["onClick"],$t={key:1,class:"o-header-search-history-container"},xt={class:"o-header-search-history-header"},It={class:"o-header-search-history-header-title"},Ot={class:"o-header-search-history-item-container"},Dt=["onClick"],zt={class:"o-header-search-history-item-text"},Tt={key:3,class:"o-header-search-hot-container"},At={class:"o-header-search-hot-header"},Pt={class:"o-header-search-hot-item-container"},Mt=["onClick"],Ut=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(t,{emit:o}){const{lePadV:n}=I.useScreen(),{t:p}=U(),c=t,h=o,f=e.ref(c.modelValue),l=e.ref(c.historyItems),r=e.ref(!1),m=e.ref(),a=e.computed(()=>!n.value&&r.value||n.value&&f.value);e.watch(()=>c.modelValue,s=>{f.value!==s&&(f.value=s)}),e.watch(()=>f.value,s=>{h("update:modelValue",s)}),e.watch(()=>c.historyItems,s=>{l.value!==s&&(l.value=s)}),e.watch(()=>l.value,s=>{h("update:historyItems",s)}),e.onMounted(()=>{if(c.storeHistory&&c.storageKey)try{const s=JSON.parse(localStorage.getItem(c.storageKey)||"[]");Array.isArray(s)&&s.length&&(l.value=Array.from(new Set([...l.value,...s])))}catch{}});const k=()=>{r.value=!0},g=()=>{const s=f.value.trim();s&&(r.value=!1,l.value.unshift(s),l.value=Array.from(new Set(l.value)),l.value.length>c.maxHistoryCount&&l.value.pop(),c.storeHistory&&c.storeHistory&&localStorage.setItem(c.storageKey,JSON.stringify(l.value)),h("search",s),c.searchUrl&&window.open(c.searchUrl+s,c.searchUrlOpenBlank?"_blank":"_self","noopener noreferrer"))},V=()=>{f.value="",h("clear"),n.value||(r.value=!1)},w=()=>{const s=[...l.value];l.value=[],c.storeHistory&&c.storeHistory&&localStorage.removeItem(c.storageKey),h("delete-history",s)},B=s=>{l.value=l.value.filter(E=>E!==s),c.storeHistory&&c.storeHistory&&(l.value.length?localStorage.setItem(c.storageKey,JSON.stringify(l.value)):localStorage.removeItem(c.storageKey)),h("delete-history-item",s)},y=s=>{f.value=s,g()},N=()=>{f.value="",r.value=!1},b=e.ref();return M.onClickOutside(b,V),(s,E)=>(e.openBlock(),e.createElementBlock("div",Nt,[e.createElementVNode("div",{ref_key:"posWrapper",ref:b,class:e.normalizeClass({"o-header-search-input-pc-wrapper":!e.unref(n),"o-header-search-input-pc-wrapper-left":!e.unref(n)&&t.expandDirection==="left","o-header-search-input-pc-wrapper-right":!e.unref(n)&&t.expandDirection==="right","o-header-search-input-mobile-wrapper":e.unref(n),focus:r.value})},[e.createElementVNode("div",{class:e.normalizeClass(["o-header-search-input-wrapper",{focus:r.value}])},[e.unref(n)&&r.value?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,class:"o-header-search-icon",onClick:N},{default:e.withCtx(()=>[e.createVNode(e.unref(Bt))]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(i.OInput),{ref_key:"inputRef",ref:m,modelValue:f.value,"onUpdate:modelValue":E[0]||(E[0]=v=>f.value=v),class:"o-header-search-input",placeholder:r.value?t.expandedPlaceholder??e.unref(p)("search.expandedPlaceholder"):t.placeholder??e.unref(p)("search.placeholder"),onFocus:k,onKeyup:e.withKeys(g,["enter"])},{prefix:e.withCtx(()=>[e.renderSlot(s.$slots,"input-prefix",{},()=>[e.createVNode(e.unref(i.OIcon),{class:"o-header-search-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(K))]),_:1})],!0)]),suffix:e.withCtx(()=>[e.renderSlot(s.$slots,"input-suffix",{},()=>[t.clearable&&a.value?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,class:"o-header-search-icon close",onClick:V},{default:e.withCtx(()=>[e.createVNode(e.unref(mt))]),_:1})):e.createCommentVNode("",!0)],!0)]),_:3},8,["modelValue","placeholder"]),e.unref(n)&&r.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:g},e.toDisplayString(t.searchTextMobile??e.unref(p)("search")),1)):e.createCommentVNode("",!0)],2),e.withDirectives(e.createElementVNode("div",Et,[e.renderSlot(s.$slots,"drawer",{recommendItems:t.recommendItems,historyItems:l.value,hotItems:t.hotItems},()=>[t.recommendItems.length?(e.openBlock(),e.createElementBlock("div",bt,[e.renderSlot(s.$slots,"recommend-header",{recommend:t.recommendItems},void 0,!0),e.renderSlot(s.$slots,"recommend-content",{recommend:t.recommendItems},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.recommendItems,v=>(e.openBlock(),e.createElementBlock("div",{class:"o-header-search-recommend-item",key:v,onClick:S=>y(v)},e.toDisplayString(v),9,St))),128))],!0)])):l.value.length?(e.openBlock(),e.createElementBlock("div",$t,[e.renderSlot(s.$slots,"history-header",{history:l.value},()=>[e.createElementVNode("div",xt,[e.createElementVNode("span",It,e.toDisplayString(t.historyTitle??e.unref(p)("search.history")),1),e.createVNode(e.unref(i.OIcon),{class:"o-header-search-icon",onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(Vt))]),_:1})])],!0),e.renderSlot(s.$slots,"history-content",{history:l.value},()=>[e.createElementVNode("div",Ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,v=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"o-header-search-history-item",onClick:S=>y(v)},[e.createElementVNode("span",zt,e.toDisplayString(v),1),e.createVNode(e.unref(i.OIcon),{class:"o-header-search-history-item-icon",onClick:e.withModifiers(S=>B(v),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(gt),{class:"icon-delete"})]),_:1},8,["onClick"])],8,Dt))),128))])],!0)])):e.createCommentVNode("",!0),(t.recommendItems.length||l.value.length)&&t.hotItems.length?(e.openBlock(),e.createBlock(e.unref(i.ODivider),{key:2,class:"o-header-search-drawer-divider"})):e.createCommentVNode("",!0),t.hotItems.length?(e.openBlock(),e.createElementBlock("div",Tt,[e.renderSlot(s.$slots,"hot-header",{hot:t.hotItems},()=>[e.createElementVNode("div",At,e.toDisplayString(t.hotTitle??e.unref(p)("search.hot")),1)],!0),e.renderSlot(s.$slots,"hot-content",{hot:t.hotItems},()=>[e.createElementVNode("div",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.hotItems,v=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"o-header-search-hot-item",onClick:S=>y(v)},e.toDisplayString(v),9,Mt))),128))])],!0)])):e.createCommentVNode("",!0)],!0)],512),[[e.vShow,r.value]])],2),e.unref(n)?(e.openBlock(),e.createBlock(e.unref(i.OIcon),{key:0,class:"o-header-search-icon-mobile",onClick:k},{default:e.withCtx(()=>[e.createVNode(e.unref(K))]),_:1})):e.createCommentVNode("",!0)]))}}),J=x(Ut,[["__scopeId","data-v-cce80de4"]]),Ht={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}"},Rt={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}"},W=e.defineComponent({__name:"OPlusConfigProvider",props:{locale:{},theme:{default:"light"}},setup(t){const o=t,n=e.reactive({locale:e.computed(()=>o.locale),theme:e.computed(()=>o.theme)});return e.provide(j,n),(p,c)=>(e.openBlock(),e.createBlock(e.unref(i.OConfigProvider),{locale:t.locale==="zh"?e.unref(Ht):e.unref(Rt)},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default")]),_:3},8,["locale"]))}}),Lt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Kt(t,o){return e.openBlock(),e.createElementBlock("svg",Lt,[...o[0]||(o[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 Gt={name:"components-icon-chevron-right",render:Kt},Ft={class:"section-wrapper"},jt={key:1,class:"section-title"},qt={key:2,class:"section-subtitle"},Yt={key:1,class:"section-body"},Jt={key:2,class:"section-footer"},Wt=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(t){const o=t;return(n,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["app-section",{"is-full":o.full}])},[e.createElementVNode("div",Ft,[e.renderSlot(n.$slots,"main",{},()=>[n.$slots.header||o.title||o.subtitle?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["section-header",{"is-left":!o.headerJustifyCenter}])},[e.renderSlot(n.$slots,"header",{},()=>[e.unref(i.isArray)(o.title)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.title,c=>(e.openBlock(),e.createElementBlock("h2",{key:c,class:"section-title"},e.toDisplayString(c),1))),128)):n.$slots.title||o.title?(e.openBlock(),e.createElementBlock("h2",jt,[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(o.title),1)],!0)])):e.createCommentVNode("",!0),n.$slots.subtitle||o.subtitle?(e.openBlock(),e.createElementBlock("p",qt,[e.renderSlot(n.$slots,"subtitle",{},()=>[e.createTextVNode(e.toDisplayString(o.subtitle),1)],!0)])):e.createCommentVNode("",!0)],!0)],2)):e.createCommentVNode("",!0),n.$slots.default?(e.openBlock(),e.createElementBlock("div",Yt,[e.renderSlot(n.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),n.$slots.footer||o.footer?(e.openBlock(),e.createElementBlock("div",Jt,[e.renderSlot(n.$slots,"footer",{},()=>[e.createVNode(e.unref(i.OLink),{href:o.footerHref,target:"_blank"},{suffix:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"footer-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Gt))]),_:1})]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.footer)+" ",1)]),_:1},8,["href"])],!0)])):e.createCommentVNode("",!0)],!0)])],2))}}),Z=x(Wt,[["__scopeId","data-v-57b81782"]]),Zt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Qt(t,o){return e.openBlock(),e.createElementBlock("svg",Zt,[...o[0]||(o[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 A={name:"components-icon-sun",render:Qt},Xt={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function eo(t,o){return e.openBlock(),e.createElementBlock("svg",Xt,[...o[0]||(o[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 P={name:"components-icon-moon",render:eo},to={class:"o-theme-switcher"},oo={key:1,class:"o-theme-switcher-mobile"},no=e.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},lightIcon:{default:A},darkIcon:{default:P}},emits:["update:theme","change"],setup(t,{emit:o}){const n=t,p=o,{gtPhone:c}=I.useScreen(),h=e.computed({get(){return n.theme},set(r){p("update:theme",r),p("change",r)}}),f=e.computed(()=>n.type==="common"||n.type==="auto"&&c.value),l=()=>{h.value=h.value===n.lightValue?n.darkValue:n.lightValue};return(r,m)=>(e.openBlock(),e.createElementBlock("div",to,[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"o-theme-switcher-common",onClick:l},[e.createVNode(e.unref(i.OIcon),{class:"o-theme-icon"},{default:e.withCtx(()=>[h.value===t.lightValue?(e.openBlock(),e.createBlock(e.unref(P),{key:0})):(e.openBlock(),e.createBlock(e.unref(A),{key:1}))]),_:1})])):(e.openBlock(),e.createElementBlock("div",oo,[e.createVNode(e.unref(i.OSwitch),{modelValue:h.value,"onUpdate:modelValue":m[0]||(m[0]=a=>h.value=a),class:"o-theme-switch","checked-value":t.darkValue,"unchecked-value":t.lightValue},{on:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"o-theme-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(A))]),_:1})]),off:e.withCtx(()=>[e.createVNode(e.unref(i.OIcon),{class:"o-theme-icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(P))]),_:1})]),_:1},8,["modelValue","checked-value","unchecked-value"])]))]))}}),Q=x(no,[["__scopeId","data-v-837e14fb"]]),lo={OBanner:G,OCookieNotice:q,OElCookieNotice:Y,OHeaderSearch:J,OPlusConfigProvider:W,OSection:Z,OThemeSwitcher:Q},ao={install:t=>{Object.entries(lo).forEach(([o,n])=>{t.component(o,n)})}};exports.OBanner=G;exports.OCookieNotice=q;exports.OElCookieNotice=Y;exports.OHeaderSearch=J;exports.OPlusConfigProvider=W;exports.OSection=Z;exports.OThemeSwitcher=Q;exports.default=ao;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),I=require("@opensig/opendesign"),Et=require("@opendesign-plus/composables"),it=require("element-plus"),je=require("./chunk-OElCookieNotice.cjs.js"),fi=require("@vueuse/core"),Ju=/^https?:\/\/\S+/;var Be=(r=>(r.ALL="all",r.MEETING="meeting",r.EVENTS="events",r.SUMMIT="summit",r.APPROVAL="approval",r))(Be||{}),_i=(r=>(r.SIG="sig",r.GROUP="group",r))(_i||{});const Xm={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Km(r,e){return t.openBlock(),t.createElementBlock("svg",Xm,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"#000",d:"M14.671 15.599c0.129 0 0.248-0.023 0.358-0.068l0-0c0.11-0.045 0.211-0.114 0.302-0.205s0.159-0.192 0.205-0.302l0-0.001c0.045-0.11 0.068-0.229 0.068-0.357v-4.667c0-0.413-0.044-0.817-0.131-1.211l-0-0.001c-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.638-0.237-0.968-0.31l-0.001-0c-0.394-0.087-0.798-0.131-1.212-0.131s-0.816 0.043-1.209 0.13l-0.002 0.001-0.001 0c-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.001 0.001-0.002 0.001-0.003 0.002-0.313 0.207-0.604 0.445-0.875 0.716s-0.511 0.564-0.718 0.878l-0 0.001c-0.187 0.283-0.347 0.583-0.481 0.901-0.134 0.316-0.237 0.638-0.31 0.968l-0 0.001-0 0.001c-0.087 0.394-0.131 0.798-0.131 1.211s0.043 0.816 0.13 1.21v0l0 0.001v0c0.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.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.31l0.001 0c0.394 0.087 0.798 0.131 1.211 0.131h4.667zM16.401 14.666c0 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.205s0.229 0.068 0.358 0.068h4.667c0.414 0 0.817-0.044 1.212-0.131h0c0.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.718s0.511-0.564 0.718-0.878l0-0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968v-0c0.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.968s-0.294-0.617-0.481-0.9l-0.001-0.002v-0c-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.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.212v4.667zM22.001 13.732h-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.612l0 0.001c0.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.586l-0.001 0.002c-0.14 0.214-0.303 0.414-0.488 0.599s-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.199l-0.001 0c-0.273 0.063-0.552 0.094-0.84 0.094zM13.734 9.999v3.733h-3.733c-0.287 0-0.567-0.031-0.84-0.094v-0c-0.208-0.048-0.413-0.114-0.612-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.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.612v-0c-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.586v-0c0.141-0.215 0.304-0.416 0.489-0.601s0.386-0.349 0.601-0.489l0-0c0.184-0.12 0.38-0.224 0.586-0.311 0.195-0.083 0.395-0.148 0.598-0.196 0.005-0.001 0.009-0.002 0.014-0.003 0.273-0.063 0.553-0.094 0.84-0.094s0.568 0.031 0.841 0.094c0.208 0.048 0.413 0.114 0.612 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.84zM16.401 21.999c0 0.413 0.044 0.817 0.131 1.212 0.073 0.329 0.176 0.652 0.31 0.968 0.135 0.318 0.295 0.618 0.482 0.902 0.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.131c0.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.329-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.131h-4.667c-0.129 0-0.248 0.023-0.358 0.068s-0.211 0.114-0.302 0.205c-0.182 0.182-0.273 0.402-0.273 0.66v4.667zM10.004 16.399c-0.413 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.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.131v-0c0.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.878v-0c0.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.23-0.068-0.358-0.068h-4.667zM13.734 18.266v3.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.585l-0 0c-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.094l-0.001-0c-0.208-0.048-0.412-0.114-0.612-0.199-0.206-0.087-0.401-0.191-0.586-0.311l-0-0c-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.199l0.001-0 0.004-0.001c0.272-0.062 0.55-0.093 0.836-0.093h3.733zM18.268 18.266h3.733c0.287 0 0.567 0.031 0.84 0.094 0.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.303 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.841s-0.031 0.567-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.586-0.141 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.199-0.273 0.063-0.553 0.094-0.84 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.311-0.215-0.141-0.416-0.304-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.84v-3.733z"},null,-1)])])}const Qm={name:"meeting-icon-all",render:Km},Zm={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Jm(r,e){return t.openBlock(),t.createElementBlock("svg",Zm,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M25.091 14.218l-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.618-0.133-0.138-0.285-0.259-0.454-0.362-0.165-0.1-0.338-0.177-0.517-0.232l-0-0c-0.211-0.064-0.432-0.096-0.662-0.096s-0.451 0.032-0.662 0.096v0c-0.002 0.001-0.004 0.001-0.006 0.002-0.177 0.054-0.348 0.131-0.511 0.23-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.207l-0 0c-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.665v0.001c-0.003 0.188 0.018 0.376 0.063 0.565 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.044l0 0.002c0.005 0.054 0.013 0.132 0.008 0.157l-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.025l0.001-0c0.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.256l0.001 0c0.192 0.033 0.388 0.039 0.588 0.020 0.195-0.019 0.382-0.061 0.56-0.126 0.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.212v-0c-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.157zM12.006 17.328l-2-2c-0.37-0.37-0.37-0.95 0-1.32s0.951-0.369 1.32 0l2 2c0.37 0.37 0.37 0.95-0 1.32s-0.95 0.37-1.32 0z"},null,-1)])])}const mh={name:"meeting-icon-event",render:Jm},eg={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function tg(r,e){return t.openBlock(),t.createElementBlock("svg",eg,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M16.933 4.002v1.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.029s-0.178 0.178-0.217 0.217c-0.020 0.047-0.029 0.098-0.029 0.154v13.333c0 0.055 0.010 0.106 0.029 0.153l0 0c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.019 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.161 0-0.319-0.017-0.474-0.049l-0.005-0.001-0-0c-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.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.267-0.128-0.404-0.034-0.156-0.050-0.315-0.050-0.479v-13.333c0-0.163 0.017-0.323 0.050-0.479v0l0-0c0.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.128h0c0.002-0 0.003-0.001 0.005-0.001v0c0.154-0.033 0.312-0.049 0.474-0.049h8.4v-1.733c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM23.332 12.652l-4.615 4.741c-0.195 0.169-0.479 0.298-0.736 0.28s-0.47-0.125-0.639-0.32l-3.397-3.925-3.91 4.518c-0.342 0.395-0.921 0.437-1.316 0.095s-0.437-0.921-0.095-1.317l4.615-5.333c0.169-0.195 0.382-0.302 0.639-0.32s0.483 0.056 0.678 0.225l3.532 4.067 3.906-4.012c0.365-0.374 0.945-0.382 1.32-0.018s0.382 0.945 0.018 1.32z"},null,-1)])])}const gh={name:"meeting-icon-meet",render:tg},ig={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function ng(r,e){return t.openBlock(),t.createElementBlock("svg",ig,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M10.634 5.455c-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.639-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.422 0.309 0.996 0.221 1.305-0.201s0.221-0.996-0.201-1.305c-1.005-0.736-2.066-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.489-0.179-2.247-0.179s-1.508 0.060-2.247 0.179l-0 0c-0.776 0.125-1.541 0.316-2.296 0.572-0.278 0.094-0.552 0.197-0.823 0.307h-0zM28.934 18.666v1.333c0 0.163-0.017 0.323-0.050 0.479-0.030 0.137-0.072 0.272-0.128 0.404s-0.121 0.254-0.199 0.37c-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.371 0.199-0.132 0.056-0.266 0.098-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.179-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.404 0.055-0.131 0.122-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.128 0.156-0.034 0.316-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.371 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.098 0.266 0.128 0.404 0.034 0.156 0.050 0.315 0.050 0.479v4c0 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.153-0.029h-21.333c-0.055 0-0.106 0.010-0.154 0.029v0c-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.154 0.029h21.333c0.055 0 0.106-0.010 0.153-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.116h-0c-0.156-0.034-0.315-0.050-0.479-0.050h-8c-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.179-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.479s0.017 0.323 0.050 0.479v0c0.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.128 0.156 0.034 0.316 0.050 0.479 0.050h8c0.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.179 0.35-0.287s0.204-0.225 0.287-0.35c0.077-0.116 0.143-0.24 0.199-0.37s0.098-0.266 0.128-0.404c0.034-0.156 0.051-0.316 0.051-0.479s-0.017-0.323-0.051-0.479v-0c-0.030-0.137-0.072-0.272-0.128-0.404s-0.121-0.254-0.199-0.37c-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.099-0.404-0.128zM12 24.932h8c0.055 0 0.106 0.010 0.153 0.029 0.039 0.039 0.198 0.17 0.217 0.217v0c0.020 0.047 0.029 0.098 0.029 0.154s-0.010 0.106-0.029 0.154c-0.039 0.039-0.17 0.198-0.217 0.217s-0.098 0.029-0.153 0.029h-8c-0.055 0-0.106-0.010-0.154-0.029-0.039-0.039-0.198-0.17-0.217-0.217s-0.029-0.098-0.029-0.154 0.010-0.106 0.029-0.154c0.039-0.039 0.17-0.198 0.217-0.217s0.098-0.029 0.154-0.029z"},null,-1)])])}const vh={name:"meeting-icon-summit",render:ng},so={summit:"rgba(var(--o-orange-6))",events:"rgba(var(--o-cyan-6))",meeting:"rgba(var(--o-deepblue-6))"},gn=0,vn=1,nn=2,yh=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,rg=["var(--o-color-primary1)","var(--o-color-warning1)","var(--o-color-success1)"],Ca=()=>{const{t:r}=je.useI18n(),e=t.computed(()=>new Map([[1,{label:r("meeting.offline"),value:1}],[2,{label:r("meeting.online"),value:2}],[3,{label:r("meeting.onlineOffline"),value:3}]])),i=t.computed(()=>new Map([[1,{id:"draft",label:r("meeting.statusDraft"),text:r("meeting.statusDraft"),value:1}],[2,{id:"under-review",label:r("meeting.statusUnderReview"),text:r("meeting.statusPending"),value:2}],[3,{id:"registration",label:r("meeting.statusRegistering"),text:r("meeting.statusApproved"),value:3}],[4,{id:"in-progress",label:r("meeting.statusInProgress"),text:r("meeting.statusApproved"),value:4}],[5,{id:"ended",label:r("meeting.statusEnded"),text:r("meeting.statusEnded"),value:5}],[6,{id:"modified",label:r("meeting.statusModified"),text:r("meeting.statusModified"),value:6}],[7,{id:"reject",label:r("meeting.statusRejected"),text:r("meeting.statusRejected"),value:7}]])),n=t.computed(()=>new Map([["all",{label:r("common.all"),value:"all"}],["rejected",{label:r("meeting.statusRejected"),value:"rejected"}],["approved",{label:r("meeting.statusApproved"),value:"approved"}],["publish",{label:r("meeting.statusPending"),value:"publish"}],["cancel",{label:r("meeting.statusCanceled"),value:"cancel"}]]));return{t:r,activityTypeMap:e,statusMap:i,approvalStatusMap:n}},sg={class:"o-activity-form"},ag={class:"time-config"},og={class:"form-btns"},ec=t.defineComponent({__name:"OActivityForm",props:{data:{},creatActivity:{},editActivity:{},admins:{},organizers:{}},emits:["confirm","close"],setup(r,{expose:e,emit:i}){const n=i,s=I.useMessage(null),{lePadV:a}=Et.useScreen(),{t:o}=je.useI18n(),l=o,{activityTypeMap:c}=Ca(),d=r,m=t.computed(()=>!!d.data),g=t.ref({title:"",organizer:"",start_date:"",end_date:"",register_end_date:"",activity_type:"",synopsis:"",register_url:"",content_url:"",address:"",start:"",end:"",is_publish:"true",email_list:"",approver:""}),x=t.ref(),T=t.ref(!1),E=t.ref({title:[{required:!0,message:o("meeting.enterActivityName")},{validator:H=>{if(H.length>50)return{type:"danger",message:o("meeting.activityNameMaxLength")}}}],activity_type:[{required:!0,message:o("meeting.selectActivityType")}],organizer:[{required:!0,message:o("meeting.selectActivityOrganizer")}],start_date:[{required:!0,message:o("meeting.selectActivityTime")},{validator:()=>{const{start_date:H,end_date:O}=g.value,U=H.split(" "),C=O.split(" ");if(!H||!O)return{type:"danger",message:o("meeting.selectActivityDate")};const k=U[1].split(":").map(Number),P=C[1].split(":").map(Number);if(k[0]<8||k[0]>21||P[0]<8||P[0]>21)return{type:"danger",message:o("meeting.activityTimeRange")};if(it.dayjs(H).valueOf()>it.dayjs(O).valueOf())return{type:"danger",message:o("meeting.endDateAfterStartDate")};g.value.start_date=U[0],g.value.end_date=C[0],g.value.start=U[1],g.value.end=C[1]},triggers:["blur","change"]}],register_end_date:[{validator:()=>{const{register_end_date:H,end_date:O,end:U}=g.value;if(H&&it.dayjs(`${O} ${U}`).valueOf()<it.dayjs(H).valueOf())return{type:"danger",message:o("meeting.registerDeadlineBeforeEnd")}},triggers:["blur","change"]}],address:[{required:!0,message:o("meeting.enterActivityAddress")},{validator:H=>{if(H.length>255)return{type:"danger",message:o("meeting.activityAddressMaxLength")}}}],register_url:[{validator:H=>{const O=H.replaceAll(" ","")||"";if(O.length&&(O.split(";")||[]).some(C=>!Ju.test(C)))return{type:"danger",message:o("meeting.invalidRegistrationUrl")}},triggers:["blur","change"]}],content_url:[{validator:H=>{const O=H.replaceAll(" ","")||"";if(O.length&&(O.split(";")||[]).some(C=>!Ju.test(C)))return{type:"danger",message:o("meeting.invalidActivityDetailUrl")}},triggers:["blur","change"]}],synopsis:[{validator:H=>{if(H.length>1e3)return{type:"danger",message:o("meeting.activityContentMaxLength")}}}],email_list:[{validator:H=>{const O=H.replaceAll(" ","").replaceAll(",",";")||"";if(O.length){if(O.length>1020)return{type:"danger",message:o("meeting.emailTooLong")};const U=O.split(";")||[];if(U.some(C=>!yh.test(C)))return{type:"danger",message:o("meeting.emailInvalid")};if(U.some(C=>C.length>50))return{type:"danger",message:o("meeting.singleEmailTooLong")};if(U.length>20)return{type:"danger",message:o("meeting.emailCountTooLong")}}},triggers:["blur","change"]}],approver:[{required:!0,message:o("meeting.selectActivityApprover")}]}),v=t.computed(()=>d.admins||[]),b=t.ref(""),D=t.ref([]);c.value.forEach(H=>{D.value.push(H)});const N=H=>{const O=D.value.find(U=>U.label===H);g.value.activity_type=O==null?void 0:O.value},w=H=>H.getTime()<Date.now()-1440*60*1e3;t.watch(()=>d.data,H=>{var O;if(H){const{title:U,start_date:C,end_date:k,register_end_date:P,activity_type:z,register_url:B,content_url:R,address:V,start:te,end:ee,is_publish:q,approver:j,update_activity_id:J,synopsis:se,email_list:Q,organizer:ie}=H;let K={title:U,start_date:C,end_date:k,register_end_date:P,activity_type:z,register_url:B,content_url:R,address:V,start:te,end:ee,is_publish:q,approver:j,update_activity_id:J,synopsis:se,email_list:Q,organizer:ie};g.value={...K},b.value=(O=c.value.get(Number(H.activity_type)))==null?void 0:O.label,g.value.start_date=`${g.value.start_date} ${g.value.start}`,g.value.end_date=`${g.value.end_date} ${g.value.end}`}},{immediate:!0,deep:!0});const $=async H=>{var U,C,k,P,z,B,R;let O=m.value?o("meeting.modifyActivity"):o(H?"meeting.create":"meeting.saveDraft");try{if((await((U=x.value)==null?void 0:U.validate())).some(ee=>!!ee))return;T.value=!0,g.value.is_publish=`${H}`;let te;if(m.value&&((C=d.data)==null?void 0:C.status)===3?(g.value.update_activity_id=(k=d.data)==null?void 0:k.id,te=await((P=d.creatActivity)==null?void 0:P.call(d,g.value))):m.value?te=await((B=d.editActivity)==null?void 0:B.call(d,(z=d.data)==null?void 0:z.id,g.value)):te=await((R=d.creatActivity)==null?void 0:R.call(d,g.value)),typeof te=="boolean"&&!te)return;s.success({content:o("meeting.activityActionSuccess",[g.value.title,O.toLowerCase()])}),F(),n("confirm")}finally{T.value=!1}},F=()=>{g.value={},n("close")};return e({confirm:$}),(H,O)=>(t.openBlock(),t.createElementBlock("div",sg,[t.createVNode(t.unref(I.OForm),{model:g.value,ref_key:"formRef",ref:x,"has-required":"","label-width":"108px",layout:t.unref(a)?"v":"h",class:"form-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OFormItem),{rules:E.value.title,label:t.unref(o)("meeting.activityName"),field:"title"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityName"),modelValue:g.value.title,"onUpdate:modelValue":O[0]||(O[0]=U=>g.value.title=U)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(I.OFormItem),{rules:E.value.organizer,label:t.unref(o)("meeting.activityOrganizer"),field:"organizer"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OSelect),{placeholder:t.unref(o)("meeting.selectActivityOrganizer"),size:"large",modelValue:g.value.organizer,"onUpdate:modelValue":O[1]||(O[1]=U=>g.value.organizer=U)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.organizers,U=>(t.openBlock(),t.createBlock(t.unref(I.OOption),{key:U.name,value:U.name},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(U.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(I.OFormItem),{rules:E.value.activity_type,label:t.unref(o)("meeting.activityType"),field:"activity_type"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OSelect),{placeholder:t.unref(o)("meeting.selectActivityType"),size:"large",modelValue:b.value,"onUpdate:modelValue":O[2]||(O[2]=U=>b.value=U),onChange:N},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.value,U=>(t.openBlock(),t.createBlock(t.unref(I.OOption),{key:U.value,value:U.label},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(U.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),g.value.activity_type===1||g.value.activity_type===3?(t.openBlock(),t.createBlock(t.unref(I.OFormItem),{key:0,rules:E.value.address,label:t.unref(o)("meeting.activityAddress"),field:"address"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityAddress"),modelValue:g.value.address,"onUpdate:modelValue":O[3]||(O[3]=U=>g.value.address=U)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])):t.createCommentVNode("",!0),t.createVNode(t.unref(I.OFormItem),{rules:E.value.start_date,label:t.unref(o)("meeting.activityTime"),field:"start_date",required:""},{default:t.withCtx(()=>[t.createElementVNode("div",ag,[t.createVNode(t.unref(I.OFormItem),{label:t.unref(o)("meeting.startDate"),field:"start_date"},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElDatePicker),{size:"large",modelValue:g.value.start_date,"onUpdate:modelValue":O[4]||(O[4]=U=>g.value.start_date=U),type:"datetime",placeholder:t.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":w,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t.createVNode(t.unref(I.OFormItem),{label:t.unref(o)("meeting.endDate"),field:"end_date"},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElDatePicker),{size:"large",modelValue:g.value.end_date,"onUpdate:modelValue":O[5]||(O[5]=U=>g.value.end_date=U),type:"datetime",placeholder:t.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":w,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])]),_:1},8,["rules","label"]),t.createVNode(t.unref(I.OFormItem),{rules:E.value.register_end_date,label:t.unref(o)("meeting.registrationDeadline"),field:"register_end_date"},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElDatePicker),{size:"large",modelValue:g.value.register_end_date,"onUpdate:modelValue":O[6]||(O[6]=U=>g.value.register_end_date=U),type:"datetime",placeholder:t.unref(o)("meeting.selectActivityDeadline"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm",clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(I.OFormItem),{rules:E.value.register_url,label:t.unref(o)("meeting.registrationUrl"),field:"register_url"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityRegistrationUrl"),modelValue:g.value.register_url,"onUpdate:modelValue":O[7]||(O[7]=U=>g.value.register_url=U)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(I.OFormItem),{rules:E.value.content_url,label:t.unref(o)("meeting.activityDetailUrl"),field:"content_url"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityDetailUrl"),modelValue:g.value.content_url,"onUpdate:modelValue":O[8]||(O[8]=U=>g.value.content_url=U)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(I.OFormItem),{rules:E.value.synopsis,label:t.unref(o)("meeting.activityContent"),field:"synopsis"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OTextarea),{size:"large",placeholder:t.unref(o)("meeting.enterActivityContent"),modelValue:g.value.synopsis,"onUpdate:modelValue":O[9]||(O[9]=U=>g.value.synopsis=U)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(I.OFormItem),{field:"email_list",rules:E.value.email_list,label:t.unref(o)("meeting.email")},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OTextarea),{disabled:m.value,size:"large",placeholder:t.unref(l)("meeting.enterEmail"),rows:4,modelValue:g.value.email_list,"onUpdate:modelValue":O[10]||(O[10]=U=>g.value.email_list=U)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(I.OFormItem),{rules:E.value.approver,label:t.unref(o)("meeting.activityApprover"),field:"approver"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OSelect),{placeholder:t.unref(o)("meeting.selectActivityApprover"),size:"large",modelValue:g.value.approver,"onUpdate:modelValue":O[11]||(O[11]=U=>g.value.approver=U)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.value,U=>(t.openBlock(),t.createBlock(t.unref(I.OOption),{key:U,value:U},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(U),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model","layout"]),t.createElementVNode("div",og,[t.createVNode(t.unref(I.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:O[12]||(O[12]=U=>$(!0)),loading:T.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.value?t.unref(o)("common.save"):t.unref(o)("meeting.create")),1)]),_:1},8,["loading"]),m.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(I.OButton),{key:0,color:"primary",variant:"outline",round:"pill",size:"large",onClick:O[13]||(O[13]=U=>$(!1)),loading:T.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("meeting.saveDraft")),1)]),_:1},8,["loading"])),t.createVNode(t.unref(I.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:F},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("meeting.cancelBtn")),1)]),_:1})])]))}}),lg={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function ug(r,e){return t.openBlock(),t.createElementBlock("svg",lg,[...e[0]||(e[0]=[t.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 tc={name:"components-icon-filter",render:ug};/*! @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(r){"@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(r)}function Yo(r,e){return Yo=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Yo(r,e)}function cg(){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 Ws(r,e,i){return cg()?Ws=Reflect.construct:Ws=function(s,a,o){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(s,l),d=new c;return o&&Yo(d,o.prototype),d},Ws.apply(null,arguments)}function Oi(r){return dg(r)||hg(r)||fg(r)||pg()}function dg(r){if(Array.isArray(r))return Xo(r)}function hg(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function fg(r,e){if(r){if(typeof r=="string")return Xo(r,e);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Xo(r,e)}}function Xo(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=r[i];return n}function pg(){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 mg=Object.hasOwnProperty,ic=Object.setPrototypeOf,gg=Object.isFrozen,vg=Object.getPrototypeOf,yg=Object.getOwnPropertyDescriptor,ii=Object.freeze,bi=Object.seal,_g=Object.create,_h=typeof Reflect<"u"&&Reflect,Js=_h.apply,Ko=_h.construct;Js||(Js=function(e,i,n){return e.apply(i,n)});ii||(ii=function(e){return e});bi||(bi=function(e){return e});Ko||(Ko=function(e,i){return Ws(e,Oi(i))});var Tg=Ci(Array.prototype.forEach),nc=Ci(Array.prototype.pop),Fr=Ci(Array.prototype.push),Ys=Ci(String.prototype.toLowerCase),ao=Ci(String.prototype.toString),rc=Ci(String.prototype.match),Ni=Ci(String.prototype.replace),bg=Ci(String.prototype.indexOf),Cg=Ci(String.prototype.trim),Ut=Ci(RegExp.prototype.test),oo=xg(TypeError);function Ci(r){return function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return Js(r,e,n)}}function xg(r){return function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return Ko(r,i)}}function Xe(r,e,i){var n;i=(n=i)!==null&&n!==void 0?n:Ys,ic&&ic(r,null);for(var s=e.length;s--;){var a=e[s];if(typeof a=="string"){var o=i(a);o!==a&&(gg(e)||(e[s]=o),a=o)}r[a]=!0}return r}function En(r){var e=_g(null),i;for(i in r)Js(mg,r,[i])===!0&&(e[i]=r[i]);return e}function Ls(r,e){for(;r!==null;){var i=yg(r,e);if(i){if(i.get)return Ci(i.get);if(typeof i.value=="function")return Ci(i.value)}r=vg(r)}function n(s){return console.warn("fallback value for",s),null}return n}var sc=ii(["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"]),lo=ii(["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"]),uo=ii(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Sg=ii(["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"]),co=ii(["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"]),Eg=ii(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ac=ii(["#text"]),oc=ii(["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"]),ho=ii(["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"]),lc=ii(["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"]),Ps=ii(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),kg=bi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),wg=bi(/<%[\w\W]*|[\w\W]*%>/gm),Dg=bi(/\${[\w\W]*}/gm),Ag=bi(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ig=bi(/^aria-[\-\w]+$/),Ng=bi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Og=bi(/^(?:\w+script|data):/i),Bg=bi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lg=bi(/^html$/i),Pg=bi(/^[a-z][.\w]*(-[.\w]+)+$/i),Mg=function(){return typeof window>"u"?null:window},Rg=function(e,i){if(mn(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,s="data-tt-policy-suffix";i.currentScript&&i.currentScript.hasAttribute(s)&&(n=i.currentScript.getAttribute(s));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(l){return l},createScriptURL:function(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function Th(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Mg(),e=function(ne){return Th(ne)};if(e.version="2.5.9",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var i=r.document,n=r.document,s=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,l=r.Element,c=r.NodeFilter,d=r.NamedNodeMap,m=d===void 0?r.NamedNodeMap||r.MozNamedAttrMap:d,g=r.HTMLFormElement,x=r.DOMParser,T=r.trustedTypes,E=l.prototype,v=Ls(E,"cloneNode"),b=Ls(E,"nextSibling"),D=Ls(E,"childNodes"),N=Ls(E,"parentNode");if(typeof a=="function"){var w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}var $=Rg(T,i),F=$?$.createHTML(""):"",H=n,O=H.implementation,U=H.createNodeIterator,C=H.createDocumentFragment,k=H.getElementsByTagName,P=i.importNode,z={};try{z=En(n).documentMode?n.documentMode:{}}catch{}var B={};e.isSupported=typeof N=="function"&&O&&O.createHTMLDocument!==void 0&&z!==9;var R=kg,V=wg,te=Dg,ee=Ag,q=Ig,j=Og,J=Bg,se=Pg,Q=Ng,ie=null,K=Xe({},[].concat(Oi(sc),Oi(lo),Oi(uo),Oi(co),Oi(ac))),Z=null,oe=Xe({},[].concat(Oi(oc),Oi(ho),Oi(lc),Oi(Ps))),ge=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}})),Ne=null,be=null,Le=!0,qe=!0,Ke=!1,Pe=!0,Ze=!1,tt=!0,ze=!1,gt=!1,nt=!1,Oe=!1,Ee=!1,me=!1,Fe=!0,pe=!1,ye="user-content-",Ce=!0,he=!1,ue={},ve=null,Me=Xe({},["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"]),De=null,dt=Xe({},["audio","video","img","source","image","track"]),Re=null,Nt=Xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),vt="http://www.w3.org/1998/Math/MathML",Ot="http://www.w3.org/2000/svg",wt="http://www.w3.org/1999/xhtml",Vt=wt,ni=!1,Ft=null,gi=Xe({},[vt,Ot,wt],ao),Bt,vi=["application/xhtml+xml","text/html"],S="text/html",A,X=null,le=n.createElement("form"),Se=function(ne){return ne instanceof RegExp||ne instanceof Function},$e=function(ne){X&&X===ne||((!ne||mn(ne)!=="object")&&(ne={}),ne=En(ne),Bt=vi.indexOf(ne.PARSER_MEDIA_TYPE)===-1?Bt=S:Bt=ne.PARSER_MEDIA_TYPE,A=Bt==="application/xhtml+xml"?ao:Ys,ie="ALLOWED_TAGS"in ne?Xe({},ne.ALLOWED_TAGS,A):K,Z="ALLOWED_ATTR"in ne?Xe({},ne.ALLOWED_ATTR,A):oe,Ft="ALLOWED_NAMESPACES"in ne?Xe({},ne.ALLOWED_NAMESPACES,ao):gi,Re="ADD_URI_SAFE_ATTR"in ne?Xe(En(Nt),ne.ADD_URI_SAFE_ATTR,A):Nt,De="ADD_DATA_URI_TAGS"in ne?Xe(En(dt),ne.ADD_DATA_URI_TAGS,A):dt,ve="FORBID_CONTENTS"in ne?Xe({},ne.FORBID_CONTENTS,A):Me,Ne="FORBID_TAGS"in ne?Xe({},ne.FORBID_TAGS,A):{},be="FORBID_ATTR"in ne?Xe({},ne.FORBID_ATTR,A):{},ue="USE_PROFILES"in ne?ne.USE_PROFILES:!1,Le=ne.ALLOW_ARIA_ATTR!==!1,qe=ne.ALLOW_DATA_ATTR!==!1,Ke=ne.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=ne.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ze=ne.SAFE_FOR_TEMPLATES||!1,tt=ne.SAFE_FOR_XML!==!1,ze=ne.WHOLE_DOCUMENT||!1,Oe=ne.RETURN_DOM||!1,Ee=ne.RETURN_DOM_FRAGMENT||!1,me=ne.RETURN_TRUSTED_TYPE||!1,nt=ne.FORCE_BODY||!1,Fe=ne.SANITIZE_DOM!==!1,pe=ne.SANITIZE_NAMED_PROPS||!1,Ce=ne.KEEP_CONTENT!==!1,he=ne.IN_PLACE||!1,Q=ne.ALLOWED_URI_REGEXP||Q,Vt=ne.NAMESPACE||wt,ge=ne.CUSTOM_ELEMENT_HANDLING||{},ne.CUSTOM_ELEMENT_HANDLING&&Se(ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ge.tagNameCheck=ne.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ne.CUSTOM_ELEMENT_HANDLING&&Se(ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ge.attributeNameCheck=ne.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ne.CUSTOM_ELEMENT_HANDLING&&typeof ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ge.allowCustomizedBuiltInElements=ne.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ze&&(qe=!1),Ee&&(Oe=!0),ue&&(ie=Xe({},Oi(ac)),Z=[],ue.html===!0&&(Xe(ie,sc),Xe(Z,oc)),ue.svg===!0&&(Xe(ie,lo),Xe(Z,ho),Xe(Z,Ps)),ue.svgFilters===!0&&(Xe(ie,uo),Xe(Z,ho),Xe(Z,Ps)),ue.mathMl===!0&&(Xe(ie,co),Xe(Z,lc),Xe(Z,Ps))),ne.ADD_TAGS&&(ie===K&&(ie=En(ie)),Xe(ie,ne.ADD_TAGS,A)),ne.ADD_ATTR&&(Z===oe&&(Z=En(Z)),Xe(Z,ne.ADD_ATTR,A)),ne.ADD_URI_SAFE_ATTR&&Xe(Re,ne.ADD_URI_SAFE_ATTR,A),ne.FORBID_CONTENTS&&(ve===Me&&(ve=En(ve)),Xe(ve,ne.FORBID_CONTENTS,A)),Ce&&(ie["#text"]=!0),ze&&Xe(ie,["html","head","body"]),ie.table&&(Xe(ie,["tbody"]),delete Ne.tbody),ii&&ii(ne),X=ne)},rt=Xe({},["mi","mo","mn","ms","mtext"]),Dt=Xe({},["annotation-xml"]),Yt=Xe({},["title","style","font","a","script"]),Ht=Xe({},lo);Xe(Ht,uo),Xe(Ht,Sg);var $t=Xe({},co);Xe($t,Eg);var ri=function(ne){var _e=N(ne);(!_e||!_e.tagName)&&(_e={namespaceURI:Vt,tagName:"template"});var Ae=Ys(ne.tagName),et=Ys(_e.tagName);return Ft[ne.namespaceURI]?ne.namespaceURI===Ot?_e.namespaceURI===wt?Ae==="svg":_e.namespaceURI===vt?Ae==="svg"&&(et==="annotation-xml"||rt[et]):!!Ht[Ae]:ne.namespaceURI===vt?_e.namespaceURI===wt?Ae==="math":_e.namespaceURI===Ot?Ae==="math"&&Dt[et]:!!$t[Ae]:ne.namespaceURI===wt?_e.namespaceURI===Ot&&!Dt[et]||_e.namespaceURI===vt&&!rt[et]?!1:!$t[Ae]&&(Yt[Ae]||!Ht[Ae]):!!(Bt==="application/xhtml+xml"&&Ft[ne.namespaceURI]):!1},Je=function(ne){Fr(e.removed,{element:ne});try{ne.parentNode.removeChild(ne)}catch{try{ne.outerHTML=F}catch{ne.remove()}}},si=function(ne,_e){try{Fr(e.removed,{attribute:_e.getAttributeNode(ne),from:_e})}catch{Fr(e.removed,{attribute:null,from:_e})}if(_e.removeAttribute(ne),ne==="is"&&!Z[ne])if(Oe||Ee)try{Je(_e)}catch{}else try{_e.setAttribute(ne,"")}catch{}},Xt=function(ne){var _e,Ae;if(nt)ne="<remove></remove>"+ne;else{var et=rc(ne,/^[\r\n\t ]+/);Ae=et&&et[0]}Bt==="application/xhtml+xml"&&Vt===wt&&(ne='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ne+"</body></html>");var qt=$?$.createHTML(ne):ne;if(Vt===wt)try{_e=new x().parseFromString(qt,Bt)}catch{}if(!_e||!_e.documentElement){_e=O.createDocument(Vt,"template",null);try{_e.documentElement.innerHTML=ni?F:qt}catch{}}var It=_e.body||_e.documentElement;return ne&&Ae&&It.insertBefore(n.createTextNode(Ae),It.childNodes[0]||null),Vt===wt?k.call(_e,ze?"html":"body")[0]:ze?_e.documentElement:It},Kt=function(ne){return U.call(ne.ownerDocument||ne,ne,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},At=function(ne){return ne instanceof g&&(typeof ne.nodeName!="string"||typeof ne.textContent!="string"||typeof ne.removeChild!="function"||!(ne.attributes instanceof m)||typeof ne.removeAttribute!="function"||typeof ne.setAttribute!="function"||typeof ne.namespaceURI!="string"||typeof ne.insertBefore!="function"||typeof ne.hasChildNodes!="function")},ut=function(ne){return mn(o)==="object"?ne instanceof o:ne&&mn(ne)==="object"&&typeof ne.nodeType=="number"&&typeof ne.nodeName=="string"},Ye=function(ne,_e,Ae){B[ne]&&Tg(B[ne],function(et){et.call(e,_e,Ae,X)})},ki=function(ne){var _e;if(Ye("beforeSanitizeElements",ne,null),At(ne)||Ut(/[\u0080-\uFFFF]/,ne.nodeName))return Je(ne),!0;var Ae=A(ne.nodeName);if(Ye("uponSanitizeElement",ne,{tagName:Ae,allowedTags:ie}),ne.hasChildNodes()&&!ut(ne.firstElementChild)&&(!ut(ne.content)||!ut(ne.content.firstElementChild))&&Ut(/<[/\w]/g,ne.innerHTML)&&Ut(/<[/\w]/g,ne.textContent)||Ae==="select"&&Ut(/<template/i,ne.innerHTML)||ne.nodeType===7||tt&&ne.nodeType===8&&Ut(/<[/\w]/g,ne.data))return Je(ne),!0;if(!ie[Ae]||Ne[Ae]){if(!Ne[Ae]&&Cn(Ae)&&(ge.tagNameCheck instanceof RegExp&&Ut(ge.tagNameCheck,Ae)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(Ae)))return!1;if(Ce&&!ve[Ae]){var et=N(ne)||ne.parentNode,qt=D(ne)||ne.childNodes;if(qt&&et)for(var It=qt.length,Ct=It-1;Ct>=0;--Ct){var wi=v(qt[Ct],!0);wi.__removalCount=(ne.__removalCount||0)+1,et.insertBefore(wi,b(ne))}}return Je(ne),!0}return ne instanceof l&&!ri(ne)||(Ae==="noscript"||Ae==="noembed"||Ae==="noframes")&&Ut(/<\/no(script|embed|frames)/i,ne.innerHTML)?(Je(ne),!0):(Ze&&ne.nodeType===3&&(_e=ne.textContent,_e=Ni(_e,R," "),_e=Ni(_e,V," "),_e=Ni(_e,te," "),ne.textContent!==_e&&(Fr(e.removed,{element:ne.cloneNode()}),ne.textContent=_e)),Ye("afterSanitizeElements",ne,null),!1)},Mi=function(ne,_e,Ae){if(Fe&&(_e==="id"||_e==="name")&&(Ae in n||Ae in le))return!1;if(!(qe&&!be[_e]&&Ut(ee,_e))){if(!(Le&&Ut(q,_e))){if(!Z[_e]||be[_e]){if(!(Cn(ne)&&(ge.tagNameCheck instanceof RegExp&&Ut(ge.tagNameCheck,ne)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(ne))&&(ge.attributeNameCheck instanceof RegExp&&Ut(ge.attributeNameCheck,_e)||ge.attributeNameCheck instanceof Function&&ge.attributeNameCheck(_e))||_e==="is"&&ge.allowCustomizedBuiltInElements&&(ge.tagNameCheck instanceof RegExp&&Ut(ge.tagNameCheck,Ae)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(Ae))))return!1}else if(!Re[_e]){if(!Ut(Q,Ni(Ae,J,""))){if(!((_e==="src"||_e==="xlink:href"||_e==="href")&&ne!=="script"&&bg(Ae,"data:")===0&&De[ne])){if(!(Ke&&!Ut(j,Ni(Ae,J,"")))){if(Ae)return!1}}}}}}return!0},Cn=function(ne){return ne!=="annotation-xml"&&rc(ne,se)},fs=function(ne){var _e,Ae,et,qt;Ye("beforeSanitizeAttributes",ne,null);var It=ne.attributes;if(!(!It||At(ne))){var Ct={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z};for(qt=It.length;qt--;){_e=It[qt];var wi=_e,Tt=wi.name,br=wi.namespaceURI;if(Ae=Tt==="value"?_e.value:Cg(_e.value),et=A(Tt),Ct.attrName=et,Ct.attrValue=Ae,Ct.keepAttr=!0,Ct.forceKeepAttr=void 0,Ye("uponSanitizeAttribute",ne,Ct),Ae=Ct.attrValue,!Ct.forceKeepAttr&&(si(Tt,ne),!!Ct.keepAttr)){if(!Pe&&Ut(/\/>/i,Ae)){si(Tt,ne);continue}Ze&&(Ae=Ni(Ae,R," "),Ae=Ni(Ae,V," "),Ae=Ni(Ae,te," "));var ps=A(ne.nodeName);if(Mi(ps,et,Ae)){if(pe&&(et==="id"||et==="name")&&(si(Tt,ne),Ae=ye+Ae),tt&&Ut(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ae)){si(Tt,ne);continue}if($&&mn(T)==="object"&&typeof T.getAttributeType=="function"&&!br)switch(T.getAttributeType(ps,et)){case"TrustedHTML":{Ae=$.createHTML(Ae);break}case"TrustedScriptURL":{Ae=$.createScriptURL(Ae);break}}try{br?ne.setAttributeNS(br,Tt,Ae):ne.setAttribute(Tt,Ae),At(ne)?Je(ne):nc(e.removed)}catch{}}}}Ye("afterSanitizeAttributes",ne,null)}},Yi=function ke(ne){var _e,Ae=Kt(ne);for(Ye("beforeSanitizeShadowDOM",ne,null);_e=Ae.nextNode();)Ye("uponSanitizeShadowNode",_e,null),ki(_e),fs(_e),_e.content instanceof s&&ke(_e.content);Ye("afterSanitizeShadowDOM",ne,null)};return e.sanitize=function(ke){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_e,Ae,et,qt,It;if(ni=!ke,ni&&(ke="<!-->"),typeof ke!="string"&&!ut(ke))if(typeof ke.toString=="function"){if(ke=ke.toString(),typeof ke!="string")throw oo("dirty is not a string, aborting")}else throw oo("toString is not a function");if(!e.isSupported){if(mn(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof ke=="string")return r.toStaticHTML(ke);if(ut(ke))return r.toStaticHTML(ke.outerHTML)}return ke}if(gt||$e(ne),e.removed=[],typeof ke=="string"&&(he=!1),he){if(ke.nodeName){var Ct=A(ke.nodeName);if(!ie[Ct]||Ne[Ct])throw oo("root node is forbidden and cannot be sanitized in-place")}}else if(ke instanceof o)_e=Xt("<!---->"),Ae=_e.ownerDocument.importNode(ke,!0),Ae.nodeType===1&&Ae.nodeName==="BODY"||Ae.nodeName==="HTML"?_e=Ae:_e.appendChild(Ae);else{if(!Oe&&!Ze&&!ze&&ke.indexOf("<")===-1)return $&&me?$.createHTML(ke):ke;if(_e=Xt(ke),!_e)return Oe?null:me?F:""}_e&&nt&&Je(_e.firstChild);for(var wi=Kt(he?ke:_e);et=wi.nextNode();)et.nodeType===3&&et===qt||(ki(et),fs(et),et.content instanceof s&&Yi(et.content),qt=et);if(qt=null,he)return ke;if(Oe){if(Ee)for(It=C.call(_e.ownerDocument);_e.firstChild;)It.appendChild(_e.firstChild);else It=_e;return(Z.shadowroot||Z.shadowrootmod)&&(It=P.call(i,It,!0)),It}var Tt=ze?_e.outerHTML:_e.innerHTML;return ze&&ie["!doctype"]&&_e.ownerDocument&&_e.ownerDocument.doctype&&_e.ownerDocument.doctype.name&&Ut(Lg,_e.ownerDocument.doctype.name)&&(Tt="<!DOCTYPE "+_e.ownerDocument.doctype.name+`>
|
|
3
|
+
`+Tt),Ze&&(Tt=Ni(Tt,R," "),Tt=Ni(Tt,V," "),Tt=Ni(Tt,te," ")),$&&me?$.createHTML(Tt):Tt},e.setConfig=function(ke){$e(ke),gt=!0},e.clearConfig=function(){X=null,gt=!1},e.isValidAttribute=function(ke,ne,_e){X||$e({});var Ae=A(ke),et=A(ne);return Mi(Ae,et,_e)},e.addHook=function(ke,ne){typeof ne=="function"&&(B[ke]=B[ke]||[],Fr(B[ke],ne))},e.removeHook=function(ke){if(B[ke])return nc(B[ke])},e.removeHooks=function(ke){B[ke]&&(B[ke]=[])},e.removeAllHooks=function(){B={}},e}var Vg=Th();function Fg(r,e){const i=r.hooks??{};let n;for(n in i){const s=i[n];s!==void 0&&e.addHook(n,s)}}function $g(){return Vg()}function xa(r={},e=$g){const i=e();Fg(r,i);const n=function(s,a){const o=a.value;if(a.oldValue===o)return;const l=`${o}`,c=a.arg,d=r.namedConfigurations,m=r.default??{};if(d&&c!==void 0){s.innerHTML=i.sanitize(l,d[c]??m);return}s.innerHTML=i.sanitize(l,m)};return{mounted:n,updated:n}}const Ug={class:"th-filter-wrapper",ref:"filterRef"},zg={key:1,class:"list-content-wrapper"},Hg={class:"btn-wrapper"},uc=t.defineComponent({__name:"ThFilter",props:{modelValue:{},list:{default:()=>[]},multiple:{type:Boolean,default:!1},tableWidth:{}},emits:["update:model-value","confirm"],setup(r,{emit:e}){const i=xa(),{t:n}=je.useI18n(),s=r,a=e,o=t.computed(()=>s.list.some($=>{var F;return(F=$.children)==null?void 0:F.length})),l=t.computed(()=>s.list.map($=>{const F=($.children||[]).map(H=>({label:H.label,value:H.value}));return{label:$.label,value:$.value,children:o.value?F:void 0}})),c=t.ref(!1);t.watch(()=>s.modelValue,$=>{s.multiple?d.value=$:x.value=$});const d=t.ref([]),m=$=>{d.value=$},g=t.ref([]),x=t.ref(null),T=$=>{x.value===$?x.value=null:x.value=$,v()},E=()=>{d.value=[],g.value=[],x.value=null,v()},v=()=>{let $=null;s.multiple?o.value?$=g.value:$=d.value:$=x.value,a("update:model-value",$),c.value=!0,t.nextTick(()=>{a("confirm"),c.value=!1})},b=t.computed(()=>d.value.length||g.value.length||x.value||s.modelValue),D=t.ref(null),N=async $=>{var O,U;const F=$.target.parentElement.parentElement;await t.nextTick();const H=F.querySelector("input");H.click(),await t.nextTick(),(O=H.change)==null||O.call(H,H),await t.nextTick(),(U=D.value)==null||U.$forceUpdate(),g.value=JSON.parse(JSON.stringify(g.value))},w=({data:$})=>t.h("span",{onclick:N},$.label);return($,F)=>{const H=t.resolveComponent("ElCascaderPanel");return t.openBlock(),t.createElementBlock("div",Ug,[t.createElementVNode("span",null,[t.renderSlot($.$slots,"default")]),r.multiple?(t.openBlock(),t.createBlock(t.unref(I.OPopover),{key:0,visible:c.value,position:"bottom",wrapClass:"th-filter-popover",trigger:"click",anchor:!1},{target:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["filter-wrapper",b.value&&"has-checked"])},[t.createVNode(t.unref(I.OIcon),{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(tc))]),_:1})],2)]),default:t.withCtx(()=>[o.value?(t.openBlock(),t.createElementBlock("div",zg,[t.createVNode(H,{ref_key:"aref",ref:D,expandTrigger:"hover",renderLabel:w,modelValue:g.value,"onUpdate:modelValue":F[1]||(F[1]=O=>g.value=O),style:{width:"fit-content"},options:l.value,props:{multiple:!0,expandTrigger:"hover"}},null,8,["modelValue","options"])])):(t.openBlock(),t.createBlock(t.unref(I.OScroller),{key:0,class:"content-wrapper","show-type":"hover","disabled-x":""},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OCheckboxGroup),{direction:"v",onChange:m,modelValue:d.value,"onUpdate:modelValue":F[0]||(F[0]=O=>d.value=O)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,O=>(t.openBlock(),t.createBlock(t.unref(I.OCheckbox),{key:O.value,value:O.value},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("span",null,null,512),[[t.unref(i),O.label]])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})),t.createVNode(t.unref(I.ODivider)),t.createElementVNode("div",Hg,[t.createVNode(t.unref(I.OLink),{onClick:E},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("common.reset")),1)]),_:1}),t.createVNode(t.unref(I.OLink),{onClick:v},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("common.confirm")),1)]),_:1})])]),_:1},8,["visible"])):(t.openBlock(),t.createBlock(t.unref(I.ODropdown),{key:1,optionPosition:"bottom",optionWrapClass:"th-filter-dropdown",modelValue:x.value,"onUpdate:modelValue":F[3]||(F[3]=O=>x.value=O)},{dropdown:t.withCtx(()=>[l.value.length?(t.openBlock(),t.createBlock(t.unref(I.OScroller),{key:0,"disabled-x":"",style:{"max-height":"300px"},"show-type":"always"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.ODropdownItem),{style:t.normalizeStyle({"--table-width":r.tableWidth}),class:t.normalizeClass([{"is-active":r.modelValue===""}]),value:"''",label:t.unref(n)("common.all"),onClick:F[2]||(F[2]=O=>T(""))},null,8,["style","class","label"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,O=>(t.openBlock(),t.createBlock(t.unref(I.ODropdownItem),{style:t.normalizeStyle({"--table-width":r.tableWidth}),class:t.normalizeClass([{"is-active":O.value===r.modelValue}]),key:O.value,value:O.value,onClick:U=>T(O.value)},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("span",null,null,512),[[t.unref(i),O.label]])]),_:2},1032,["style","class","value","onClick"]))),128))]),_:1})):t.createCommentVNode("",!0),l.value.length?t.createCommentVNode("",!0):t.renderSlot($.$slots,"empty",{key:1})]),default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["filter-wrapper",b.value&&"has-checked"])},[t.createVNode(t.unref(I.OIcon),{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(tc))]),_:1})],2)]),_:3},8,["modelValue"]))],512)}}}),qg={class:"more-text-wrapper"},jg={key:0},Gg={key:1},Wg=t.defineComponent({__name:"MoreText",props:{text:{default:""},link:{type:Boolean,default:!1},lines:{default:3},show:{type:Boolean,default:!1}},setup(r){const e=r,{t:i}=je.useI18n(),n=t.ref(!1),s=t.ref(!1),a=t.ref(0),o=t.ref(null);t.onMounted(()=>{l()}),t.watch([()=>e.text,()=>e.show],()=>{l()});const l=()=>{t.nextTick(()=>{const d=o.value;if(d){const m=document.createRange();m.setStart(d,0),m.setEnd(d,d.childNodes.length),s.value=m.getBoundingClientRect().height>d.offsetHeight+10||d.scrollHeight>d.offsetHeight+10,a.value=m.getBoundingClientRect().height||d.scrollHeight}else s.value=!1})},c=()=>{e.link&&window.open(e.text)};return(d,m)=>(t.openBlock(),t.createElementBlock("div",qg,[t.createElementVNode("div",{class:t.normalizeClass(["more-text-content",r.link&&"is-link"]),ref_key:"contentRef",ref:o,style:t.normalizeStyle({"max-height":n.value?a.value+"px":"66px","-webkit-line-clamp":n.value?"initial":r.lines}),onClick:c},t.toDisplayString(r.text),7),s.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"more-text-btn",onClick:m[0]||(m[0]=g=>n.value=!n.value)},[n.value?(t.openBlock(),t.createElementBlock("div",Gg,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("common.collapse")),1),t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronUp))]),_:1})])):(t.openBlock(),t.createElementBlock("div",jg,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("common.expand")),1),t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronDown))]),_:1})]))])):t.createCommentVNode("",!0)]))}}),Yg=je._export_sfc(Wg,[["__scopeId","data-v-4776f8a2"]]);var ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Xg(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var i=function n(){return this instanceof n?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(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(i,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}),i}var Xs={exports:{}},Kg=Xs.exports,cc;function Qg(){return cc||(cc=1,(function(r,e){(function(i,n){r.exports=n()})(Kg,(function(){var i=1e3,n=6e4,s=36e5,a="millisecond",o="second",l="minute",c="hour",d="day",m="week",g="month",x="quarter",T="year",E="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,D=/\[([^\]]+)]|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,N={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(R){var V=["th","st","nd","rd"],te=R%100;return"["+R+(V[(te-20)%10]||V[te]||V[0])+"]"}},w=function(R,V,te){var ee=String(R);return!ee||ee.length>=V?R:""+Array(V+1-ee.length).join(te)+R},$={s:w,z:function(R){var V=-R.utcOffset(),te=Math.abs(V),ee=Math.floor(te/60),q=te%60;return(V<=0?"+":"-")+w(ee,2,"0")+":"+w(q,2,"0")},m:function R(V,te){if(V.date()<te.date())return-R(te,V);var ee=12*(te.year()-V.year())+(te.month()-V.month()),q=V.clone().add(ee,g),j=te-q<0,J=V.clone().add(ee+(j?-1:1),g);return+(-(ee+(te-q)/(j?q-J:J-q))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:g,y:T,w:m,d,D:E,h:c,m:l,s:o,ms:a,Q:x}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},F="en",H={};H[F]=N;var O="$isDayjsObject",U=function(R){return R instanceof z||!(!R||!R[O])},C=function R(V,te,ee){var q;if(!V)return F;if(typeof V=="string"){var j=V.toLowerCase();H[j]&&(q=j),te&&(H[j]=te,q=j);var J=V.split("-");if(!q&&J.length>1)return R(J[0])}else{var se=V.name;H[se]=V,q=se}return!ee&&q&&(F=q),q||!ee&&F},k=function(R,V){if(U(R))return R.clone();var te=typeof V=="object"?V:{};return te.date=R,te.args=arguments,new z(te)},P=$;P.l=C,P.i=U,P.w=function(R,V){return k(R,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var z=(function(){function R(te){this.$L=C(te.locale,null,!0),this.parse(te),this.$x=this.$x||te.x||{},this[O]=!0}var V=R.prototype;return V.parse=function(te){this.$d=(function(ee){var q=ee.date,j=ee.utc;if(q===null)return new Date(NaN);if(P.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var J=q.match(b);if(J){var se=J[2]-1||0,Q=(J[7]||"0").substring(0,3);return j?new Date(Date.UTC(J[1],se,J[3]||1,J[4]||0,J[5]||0,J[6]||0,Q)):new Date(J[1],se,J[3]||1,J[4]||0,J[5]||0,J[6]||0,Q)}}return new Date(q)})(te),this.init()},V.init=function(){var te=this.$d;this.$y=te.getFullYear(),this.$M=te.getMonth(),this.$D=te.getDate(),this.$W=te.getDay(),this.$H=te.getHours(),this.$m=te.getMinutes(),this.$s=te.getSeconds(),this.$ms=te.getMilliseconds()},V.$utils=function(){return P},V.isValid=function(){return this.$d.toString()!==v},V.isSame=function(te,ee){var q=k(te);return this.startOf(ee)<=q&&q<=this.endOf(ee)},V.isAfter=function(te,ee){return k(te)<this.startOf(ee)},V.isBefore=function(te,ee){return this.endOf(ee)<k(te)},V.$g=function(te,ee,q){return P.u(te)?this[ee]:this.set(q,te)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(te,ee){var q=this,j=!!P.u(ee)||ee,J=P.p(te),se=function(be,Le){var qe=P.w(q.$u?Date.UTC(q.$y,Le,be):new Date(q.$y,Le,be),q);return j?qe:qe.endOf(d)},Q=function(be,Le){return P.w(q.toDate()[be].apply(q.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Le)),q)},ie=this.$W,K=this.$M,Z=this.$D,oe="set"+(this.$u?"UTC":"");switch(J){case T:return j?se(1,0):se(31,11);case g:return j?se(1,K):se(0,K+1);case m:var ge=this.$locale().weekStart||0,Ne=(ie<ge?ie+7:ie)-ge;return se(j?Z-Ne:Z+(6-Ne),K);case d:case E:return Q(oe+"Hours",0);case c:return Q(oe+"Minutes",1);case l:return Q(oe+"Seconds",2);case o:return Q(oe+"Milliseconds",3);default:return this.clone()}},V.endOf=function(te){return this.startOf(te,!1)},V.$set=function(te,ee){var q,j=P.p(te),J="set"+(this.$u?"UTC":""),se=(q={},q[d]=J+"Date",q[E]=J+"Date",q[g]=J+"Month",q[T]=J+"FullYear",q[c]=J+"Hours",q[l]=J+"Minutes",q[o]=J+"Seconds",q[a]=J+"Milliseconds",q)[j],Q=j===d?this.$D+(ee-this.$W):ee;if(j===g||j===T){var ie=this.clone().set(E,1);ie.$d[se](Q),ie.init(),this.$d=ie.set(E,Math.min(this.$D,ie.daysInMonth())).$d}else se&&this.$d[se](Q);return this.init(),this},V.set=function(te,ee){return this.clone().$set(te,ee)},V.get=function(te){return this[P.p(te)]()},V.add=function(te,ee){var q,j=this;te=Number(te);var J=P.p(ee),se=function(K){var Z=k(j);return P.w(Z.date(Z.date()+Math.round(K*te)),j)};if(J===g)return this.set(g,this.$M+te);if(J===T)return this.set(T,this.$y+te);if(J===d)return se(1);if(J===m)return se(7);var Q=(q={},q[l]=n,q[c]=s,q[o]=i,q)[J]||1,ie=this.$d.getTime()+te*Q;return P.w(ie,this)},V.subtract=function(te,ee){return this.add(-1*te,ee)},V.format=function(te){var ee=this,q=this.$locale();if(!this.isValid())return q.invalidDate||v;var j=te||"YYYY-MM-DDTHH:mm:ssZ",J=P.z(this),se=this.$H,Q=this.$m,ie=this.$M,K=q.weekdays,Z=q.months,oe=q.meridiem,ge=function(Le,qe,Ke,Pe){return Le&&(Le[qe]||Le(ee,j))||Ke[qe].slice(0,Pe)},Ne=function(Le){return P.s(se%12||12,Le,"0")},be=oe||function(Le,qe,Ke){var Pe=Le<12?"AM":"PM";return Ke?Pe.toLowerCase():Pe};return j.replace(D,(function(Le,qe){return qe||(function(Ke){switch(Ke){case"YY":return String(ee.$y).slice(-2);case"YYYY":return P.s(ee.$y,4,"0");case"M":return ie+1;case"MM":return P.s(ie+1,2,"0");case"MMM":return ge(q.monthsShort,ie,Z,3);case"MMMM":return ge(Z,ie);case"D":return ee.$D;case"DD":return P.s(ee.$D,2,"0");case"d":return String(ee.$W);case"dd":return ge(q.weekdaysMin,ee.$W,K,2);case"ddd":return ge(q.weekdaysShort,ee.$W,K,3);case"dddd":return K[ee.$W];case"H":return String(se);case"HH":return P.s(se,2,"0");case"h":return Ne(1);case"hh":return Ne(2);case"a":return be(se,Q,!0);case"A":return be(se,Q,!1);case"m":return String(Q);case"mm":return P.s(Q,2,"0");case"s":return String(ee.$s);case"ss":return P.s(ee.$s,2,"0");case"SSS":return P.s(ee.$ms,3,"0");case"Z":return J}return null})(Le)||J.replace(":","")}))},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(te,ee,q){var j,J=this,se=P.p(ee),Q=k(te),ie=(Q.utcOffset()-this.utcOffset())*n,K=this-Q,Z=function(){return P.m(J,Q)};switch(se){case T:j=Z()/12;break;case g:j=Z();break;case x:j=Z()/3;break;case m:j=(K-ie)/6048e5;break;case d:j=(K-ie)/864e5;break;case c:j=K/s;break;case l:j=K/n;break;case o:j=K/i;break;default:j=K}return q?j:P.a(j)},V.daysInMonth=function(){return this.endOf(g).$D},V.$locale=function(){return H[this.$L]},V.locale=function(te,ee){if(!te)return this.$L;var q=this.clone(),j=C(te,ee,!0);return j&&(q.$L=j),q},V.clone=function(){return P.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},R})(),B=z.prototype;return k.prototype=B,[["$ms",a],["$s",o],["$m",l],["$H",c],["$W",d],["$M",g],["$y",T],["$D",E]].forEach((function(R){B[R[1]]=function(V){return this.$g(V,R[0],R[1])}})),k.extend=function(R,V){return R.$i||(R(V,z,k),R.$i=!0),k},k.locale=C,k.isDayjs=U,k.unix=function(R){return k(1e3*R)},k.en=H[F],k.Ls=H,k.p={},k}))})(Xs)),Xs.exports}var Zg=Qg();const xe=fr(Zg),pt=(r=new Date,e="YYYY/MM/DD")=>{let i=r;return i||(i=void 0),xe(new Date(i)).isValid()?xe(new Date(i)).format(e):i},Jg=(r,e,i="label",n="value")=>{const s=e.find(a=>a[n]===r);return(s==null?void 0:s[i])||r},e1=r=>{const e=/\d+/g,i=r.match(e)||"";return parseInt(i[0])},On=r=>{const e=r.split(":");if(e.length>3||!e.length)return 0;let i=0,n=1;for(;e.length>0;){const s=e.pop();i+=parseInt(s)*n,n*=60}return i},fo=r=>r<0?"Invalid number":r>=10?`${r}`:`0${r}`,dc=r=>{if(r>1440*60)return"Invalid date";const e=Math.floor(r/60/60),i=Math.floor((r-e*60*60)/60),n=r%60;return`${fo(e)}:${fo(i)}:${fo(n)}`},Qo=r=>{const e=r.split(":"),i=e[e.length-3]?parseInt(e[e.length-3]):0,n=parseInt(e[e.length-2]),s=parseFloat(e[e.length-1]);return i*60*60+n*60+s},t1=r=>{const e=Math.floor(r/3600),i=Math.floor((r-e*3600)/60),n=Math.floor(r-e*3600-i*60);return`${e?`${e.toString().padStart(2,"0")}:`:""}${i.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`},Tn=()=>{const{t:r,locale:e}=je.useI18n(),i=t.computed(()=>[{label:r("meeting.meetingTypeAll"),value:Be.ALL,icon:Qm},{label:r("meeting.meetingTypeMeet"),value:Be.MEETING,icon:gh,color:so.meeting,zIndex:3},{label:r("meeting.meetingTypeEvents"),value:Be.EVENTS,icon:mh,color:so.events,zIndex:2},{label:r("meeting.meetingTypeSummit"),value:Be.SUMMIT,icon:vh,color:so.summit,zIndex:1}]),n=t.computed(()=>[{label:r("meeting.day0"),value:gn,max:7},{label:r("meeting.week0"),value:vn,max:2},{label:r("meeting.month0"),value:nn,max:1}]),s=t.computed(()=>[{label:r("meeting.day"),value:gn,max:7},{label:r("meeting.week"),value:vn,max:2},{label:r("meeting.month"),value:nn,max:1}]),a=t.computed(()=>[r("meeting.sunday"),r("meeting.monday"),r("meeting.tuesday"),r("meeting.wednesday"),r("meeting.thursday"),r("meeting.friday"),r("meeting.saturday")]),o=t.computed(()=>{const g=[];for(let x=1;x<=7;x++){const T=x%7;g.push({value:T,label:a.value[T]})}return g});return{t:r,locale:e,meetingTabs:i,cycleTypeOptions0:n,cycleTypeOptions:s,weekDay:a,intervalWeekOptions:o,getPointStr:(g,x)=>g===vn?x.sort((T,E)=>{const v=o.value.findIndex(D=>D.value===T||D.value.toString()===T),b=o.value.findIndex(D=>D.value===E||D.value.toString()===E);return v-b}).map(T=>{const E=o.value.find(v=>v.value===T||v.value.toString()===T);return(E==null?void 0:E.label)||String(T)}).join(r("meeting.cycleSplit")):g===nn?x.join(r("meeting.cycleSplit")):"",getConfig:(g,x)=>{let T=g;const E=i.value.find(v=>v.value===T);return(E==null?void 0:E[x])||""},getPlatformLabel:g=>{switch(g){case"WELINK":return"WeLink";case"ZOOM":return"Zoom";case"TENCENT":return e.value==="zh"?"腾讯会议":"Tencent";default:return g}},getWeekFromDate:g=>a.value[xe(g).day()]}},i1={class:"o-meeting-detail"},n1={class:"label"},r1={key:2},s1={key:3,class:"value"},a1={key:0,class:"extra"},o1={class:"label"},hc="|",ts=t.defineComponent({__name:"OMeetingDetail",props:{data:{},from:{},show:{type:Boolean},page:{}},setup(r,{expose:e}){const i=r,{t:n,getPlatformLabel:s}=Tn(),{locale:a}=je.useI18n(),o=t.computed(()=>a.value==="zh"),l=t.computed(()=>[{label:n("meeting.meetingDetail"),key:"agenda",ellipsis:!0},{label:n("meeting.meetingCreator"),key:"sponsor"},{label:n("meeting.meetingDate2"),key:"timeRange",extra:"date"},{label:n("meeting.meetingId"),key:"mid"},{label:n("meeting.meetingPlatform"),key:"platform"},{label:n("meeting.meetingLink"),key:"join_url",isLink:!0},{label:n("meeting.meetingEtherpad"),key:"etherpad",isLink:!0},{label:n("meeting.meetingReplay"),key:"replay_url",isLink:!0}].slice(0,i.from==="my"?7:8)),c=t.computed(()=>{var v;const E=!!((v=i.data.live_url)!=null&&v.length);return[{label:n("meeting.activityDetail2"),key:"agenda",ellipsis:!0},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n(E?"meeting.livePlatform":"meeting.activityAddress"),key:E?"live_url":"address"},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}].slice(0,i.from==="home"?5:8)}),d=t.computed(()=>{var v;const E=!!((v=i.data.live_url)!=null&&v.length);return[{label:n("meeting.activityType"),key:"activity_type",isType:!0},{label:n(E?"meeting.livePlatform":"meeting.activityAddress"),key:E?"live_url":"address"},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n("meeting.registrationUrl"),key:"register_url",isLink:!0},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}]}),m=E=>{const v=i.data[E];return E==="register_end_date"&&v?pt(v,"YYYY/MM/DD HH:mm"):v},g=t.computed(()=>i.data.type===Be.EVENTS?i.page===Be.APPROVAL?d.value:c.value:i.data.type===Be.SUMMIT?c.value:l.value),x=t.ref([]);return e({copyInfo:()=>{try{const E=o.value?":":": ";let v=`${n("meeting.meetingTopic")}${E}${i.data.topic||i.data.name||i.data.title}
|
|
4
|
+
`;return v+=[...x.value].reduce((b,D)=>`${b}${D.textContent?D.textContent.replace(hc,E):""}
|
|
5
|
+
`,""),navigator.clipboard.writeText(v),Promise.resolve()}catch(E){return Promise.reject(E)}}}),(E,v)=>(t.openBlock(),t.createElementBlock("div",i1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(b,D)=>{var N,w,$;return t.openBlock(),t.createElementBlock("div",{ref_for:!0,ref_key:"domRef",ref:x,class:t.normalizeClass(["label-item",{"record-item":b.isRecord&&((N=m(b.key))==null?void 0:N.length),"link-item":b.isLink,"is-empty":!((w=m(b.key))!=null&&w.length),[`label-item_${r.data.id}`]:!0,[`type_${r.data.type}`]:!0}]),key:D},[m(b.key)&&!b.isRecord?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",n1,t.toDisplayString(b.label),1),t.createElementVNode("span",{class:"split-mark"},t.toDisplayString(hc)),b.ellipsis?(t.openBlock(),t.createBlock(Yg,{key:0,show:r.show,text:m(b.key)||"-"},null,8,["show","text"])):b.isLink?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:1,target:"_blank",class:"value",color:"primary","hover-underline":"",href:m(b.key)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m(b.key)),1)]),_:2},1032,["href"])):b.key==="platform"?(t.openBlock(),t.createElementBlock("span",r1,t.toDisplayString(t.unref(s)(m(b.key))),1)):(t.openBlock(),t.createElementBlock("span",s1,[b.extra?(t.openBlock(),t.createElementBlock("i",a1,t.toDisplayString(m(b.extra)),1)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(m(b.key)||"-"),1)]))],64)):t.createCommentVNode("",!0),b.isRecord&&(($=m(b.key))!=null&&$.length)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("span",o1,t.toDisplayString(b.label),1),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m(b.key),F=>(t.openBlock(),t.createElementBlock("p",{key:F.create_time,class:"value"},t.toDisplayString(F.reason)+" "+t.toDisplayString(t.unref(pt)(F.create_time,"YYYY/MM/DD HH:mm:ss"))+" "+t.toDisplayString(F.action===1?t.unref(n)("meeting.approveReview"):t.unref(n)("meeting.rejectReview")),1))),128))])],64)):t.createCommentVNode("",!0)],2)}),128))]))}}),l1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"32",viewBox:"0 0 30 32"};function u1(r,e){return t.openBlock(),t.createElementBlock("svg",l1,[...e[0]||(e[0]=[t.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 kl={name:"meeting-icon-copy",render:u1},c1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function d1(r,e){return t.openBlock(),t.createElementBlock("svg",c1,[...e[0]||(e[0]=[t.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 jr={name:"components-icon-chevron-right",render:d1},h1={class:"meet-title-left"},f1=["title"],p1={class:"text"},m1={key:0,class:"tag-wrapper"},g1={class:"start-time"},v1={class:"calendar-info"},bh=t.defineComponent({__name:"OMeetingCalendarList",props:{list:{default:()=>[]},groupType:{},disableFormat:{type:Boolean}},setup(r){const{activityTypeMap:e}=Ca(),i=r,{t:n,locale:s,getConfig:a,getPointStr:o}=Tn(),l=t.ref([]),c=I.useMessage(null),d=async v=>{await l.value[v].copyInfo(),c.success({content:n("common.copySuccess")})},m=t.ref([]),g=t.computed(()=>({SIG_GROUP:`${i.groupType===_i.GROUP?n("meeting.groups"):n("meeting.sigs")}: `,NEW_DATE:n("meeting.latestMeeting"),EMPTY_TEXT:n("meeting.meetingEmptyText"),LEARN_MORE:n("common.seeMore"),JOIN_MEETING:n("meeting.joinMeeting"),SIGN:n("meeting.sign"),DETAILS:n("meeting.detail")})),x=t.ref();let T=null;t.watch([()=>i.list,()=>I.isClient],()=>{i.list.length===1?m.value=[i.list[0].id]:m.value=[],I.isClient&&t.nextTick(()=>{var v;T?T.disconnect():T=new ResizeObserver(b=>{for(let D of b){const{height:N}=D.contentRect;D.target.classList.remove("hidden-divider"),N>=30&&D.target.classList.add("hidden-divider")}}),(v=x.value)==null||v.forEach(b=>{T.observe(b)})})});const E=t.computed(()=>i.list.map(v=>{var j,J;const b=v.type;let D="",N="",w="";if(b!==Be.MEETING){let se=(j=e.value.get(v.activity_type))==null?void 0:j.label;const Q=v.start_date&&v.start_date===v.end_date;return v.start_date&&(D=i.disableFormat?v.start_date:pt(v.start_date)),Q?v.start&&(D+=`${D?" ":""}${v.start}`,v.end&&(D+=`${D?" - ":""}${v.end}`)):(v.start&&(D+=`${D?" ":""}${v.start}`),v.end_date&&(D+=`${D?" - ":""}${v.end_date}`,v.end&&(D+=`${D?" ":""}${v.end}`))),v.start_date&&(N=i.disableFormat?v.start_date:pt(v.start_date)),v.start&&(N+=`${N?" ":""}${v.start}`),v.end_date&&(w=i.disableFormat?v.end_date:pt(v.end_date)),v.end&&(w+=`${w?" ":""}${v.end}`),{...v,activity_type:se,dateRange:D,start_date_time:N,end_date_time:w}}const{is_cycle:$,date:F,start:H,end:O,cycle_start_date:U,cycle_end_date:C,cycle_start:k,cycle_end:P,cycle_type:z,cycle_interval:B,cycle_point:R}=v;D=i.disableFormat?F:pt(F),H&&O?D+=`${D?" ":""}${H} - ${O}`:(H||O)&&(D+=`${D?" ":""}${H||O}`),$&&(D=`${i.disableFormat?U:pt(U)} - ${i.disableFormat?C:pt(C)}`);let V="";H&&O?V=`${H} - ${O}`:(H&&(V=H),O&&(V=O));let te=null,ee=!1;const q=((J=v.obs_data)==null?void 0:J.filter(se=>se.text_video_url))||[];if($){let se="";z===gn&&(se=n("meeting.cycleDay")),z===vn&&(B>1?se=n("meeting.cycleWeek.other",[o(z,R),B]):se=n("meeting.cycleWeek.one",[o(z,R)])),z===nn&&(se=n("meeting.cycleMonth",[o(z,R)])),V=n("meeting.cycleMeetingText2",{startDate:U,endDate:C,startTime:k,endTime:P,cycleType:se}),ee=q.some(Q=>{var ie;return Q.sub_id===((ie=v.cycle_sub.find(K=>K.date===F))==null?void 0:ie.sub_id)})}else ee=q.length>0;return ee&&(te=`${location.origin}/${s.value}/video/${v.group_name}/${v.mid}/${F}`),{...v,dateRange:D,timeRange:V,replay_url:te}}));return(v,b)=>{var D,N;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-meeting-calendar-list",(D=E.value)!=null&&D.length?"":"is-empty"])},[(N=E.value)!=null&&N.length?(t.openBlock(),t.createBlock(t.unref(I.OCollapse),{key:1,modelValue:m.value,"onUpdate:modelValue":b[0]||(b[0]=w=>m.value=w),style:{"--collapse-padding":"0"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E.value,(w,$)=>(t.openBlock(),t.createBlock(t.unref(I.OCollapseItem),{key:w.id,value:w.id},{title:t.withCtx(()=>[t.createElementVNode("div",h1,[t.createElementVNode("div",{class:"meet-title",title:w.topic||w.name||w.title},[t.createVNode(t.unref(I.OIcon),{style:t.normalizeStyle({backgroundColor:`${t.unref(a)(w.type,"color")}`})},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(a)(w.type,"icon"))))]),_:2},1032,["style"]),t.createElementVNode("div",p1,t.toDisplayString(w.topic||w.name||w.title),1),w.is_cycle?(t.openBlock(),t.createElementBlock("div",m1,[t.createVNode(t.unref(I.OTag),{color:"primary",variant:"outline"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.cycle")),1)]),_:1})])):t.createCommentVNode("",!0)],8,f1),t.createElementVNode("div",{class:"meet-info",ref_for:!0,ref_key:"meetInfoRef",ref:x},[t.createElementVNode("span",g1,[t.createElementVNode("span",null,t.toDisplayString(w.dateRange),1)]),w.group_name||w.activity_type?(t.openBlock(),t.createBlock(t.unref(I.ODivider),{key:0,direction:"v"})):t.createCommentVNode("",!0),t.createElementVNode("div",null,[w.group_name?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(g.value.SIG_GROUP)+" "+t.toDisplayString(w.group_name),1)],64)):t.createCommentVNode("",!0),w.activity_type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(w.activity_type),1)],64)):t.createCommentVNode("",!0)])],512),w.url?(t.openBlock(),t.createBlock(t.unref(I.OButton),{key:0,variant:"text",href:w.url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.LEARN_MORE),1)]),_:1},8,["href"])):t.createCommentVNode("",!0),w.join_url?(t.openBlock(),t.createBlock(t.unref(I.OButton),{key:1,variant:"text",href:w.join_url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.JOIN_MEETING),1)]),_:1},8,["href"])):t.createCommentVNode("",!0),w.content_url?(t.openBlock(),t.createBlock(t.unref(I.OButton),{key:2,variant:"text",href:w.content_url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.DETAILS),1)]),_:1},8,["href"])):t.createCommentVNode("",!0),w.register_url?(t.openBlock(),t.createBlock(t.unref(I.OButton),{key:3,variant:"text",href:w.register_url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.SIGN),1)]),_:1},8,["href"])):t.createCommentVNode("",!0)]),t.createVNode(t.unref(I.OIcon),{onClick:t.withModifiers(()=>d($),["stop"]),class:"copy-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(kl))]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",v1,[t.createVNode(ts,{show:m.value.includes(w.id),data:w,ref_for:!0,ref:F=>l.value[$]=F,from:"home"},null,8,["show","data"])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):t.renderSlot(v.$slots,"empty",{key:0})],2)}}}),y1={class:"o-meeting-calendar"},_1={class:"calendar-body"},T1={class:"calender-header-left"},b1={class:"left-title"},C1={class:"month-date"},x1={class:"right-title"},S1=["onClick"],E1={class:"day-box"},k1={class:"icon-box"},w1={class:"detail-list"},D1={class:"current-day"},A1={class:"right-title"},I1={class:"title-list"},N1="2021-01-01",fc=t.defineComponent({__name:"OMeetingCalendar",props:{getDateListRequest:{},getMeetingListRequest:{},getSummitListRequest:{default:async()=>[]},getSummitDatesRequest:{},getEventsListRequest:{default:async()=>[]},getEventsDatesRequest:{},hiddenEvents:{type:Boolean,default:!1},hiddenSummit:{type:Boolean,default:!1},groupType:{default:_i.SIG},groups:{default:()=>[]},disableFormat:{type:Boolean}},setup(r,{expose:e}){const i=r,{t:n,locale:s,meetingTabs:a,getConfig:o}=Tn(),l=t.computed(()=>s.value===je.Locales.EN),c=t.ref(""),d=t.ref([]),m=t.ref([]),g=t.ref([]),x=t.ref([]),T=t.ref([]),E=t.ref([]),v=t.ref([]),b=t.ref(Be.ALL),D=t.computed(()=>{let ie=a.value;return i.hiddenEvents&&(ie=ie.filter(K=>K.value!==Be.EVENTS)),i.hiddenSummit&&(ie=ie.filter(K=>K.value!==Be.SUMMIT)),ie.filter(K=>K.value!==Be.ALL).length===1?[]:ie});t.watch(()=>D.value,()=>{var ie;b.value=((ie=D.value[0])==null?void 0:ie.value)??Be.MEETING});const N=t.ref(),w=t.ref("407px"),$=t.ref(!1),F=t.ref(""),H=t.ref(!1),O=t.ref(""),U=async ie=>{if(i.getSummitListRequest){m.value=[];const K=await i.getSummitListRequest(ie);m.value=(K||[]).map(Z=>({...Z,type:Be.SUMMIT}))}else m.value=[]},C=async ie=>{if(i.getEventsListRequest){x.value=[];const K=await i.getEventsListRequest(ie);x.value=(K||[]).map(Z=>({...Z,type:Be.EVENTS}))}else x.value=[]},k=async ie=>{i.getDateListRequest&&i.getDateListRequest(ie,O.value||"").then(K=>{d.value=K}),i.getEventsDatesRequest&&i.getEventsDatesRequest(ie).then(K=>{T.value=K}),i.getSummitDatesRequest&&i.getSummitDatesRequest(ie).then(K=>{g.value=K})},P=async ie=>{if(i.getMeetingListRequest&&ie.date)try{v.value=[];const K=await i.getMeetingListRequest(ie.date,O.value,"");v.value=K.map(Z=>({...Z,time:`${Z.start}-${Z.end}`,type:Be.MEETING,date:Z.date||ie.date})).sort((Z,oe)=>{var ge,Ne;return parseInt((ge=Z.start||Z.cycle_start)==null?void 0:ge.replace(":",""))-parseInt(oe.end||((Ne=oe.cycle_end)==null?void 0:Ne.replace(":","")))})}catch{v.value=[]}},z=t.computed(()=>[...v.value,...x.value,...m.value].filter(ie=>b.value===Be.ALL?!0:ie.type===b.value)),B=async ie=>{const K=xe(ie).format("YYYY-MM-DD");if(F.value=K,U(K),C(K),k(K),E.value=[...new Set([...d.value,...g.value,...T.value])].flat().sort((Z,oe)=>xe(Z).isAfter(xe(oe))?1:-1),!ie)if(!E.value.length)c.value=pt(new Date);else{let Z=[...E.value].reverse().find(oe=>xe().isAfter(xe(oe)));Z||(Z=E.value.find(oe=>xe(oe).isAfter(xe()))),c.value=pt(Z)}P({date:K,type:b.value})},R=fi.useDebounceFn((ie,K)=>{if(H.value){H.value=!1;return}if(new Date(ie).getTime()/1e3<1610380800){K==null||K.stopPropagation();return}B(ie)},300),V=(ie,K)=>{if(pt(K)===pt(N1)&&ie==="prev-month"){$.value=!0;return}$.value=!1,N.value.selectDate(ie),R(pt(N.value.selectedDay))},te=()=>{t.nextTick(()=>{P({date:F.value,type:b.value}),k(F.value)})},ee=ie=>ie.replace(/^0+(?=\d)/,""),q=ie=>{new MutationObserver(function(){w.value=`${ie.offsetHeight-2}px`}).observe(ie,{childList:!0,subtree:!0,characterData:!0})},j=async()=>{const ie=document.querySelector(".calendar-body .el-calendar__body");ie&&(q(ie),w.value=`${ie.offsetHeight-2}px`)};t.onMounted(()=>{j(),B()});const J=t.watch(()=>E.value.length,()=>{I.isClient&&!F.value&&t.nextTick(()=>{const ie=document.querySelector(".is-today .out-box");ie&&(H.value=!0,ie.click(),J())})}),se=ie=>l.value?ie.split(" ").reverse().join(" "):ie,Q=(ie,K)=>ie===Be.MEETING?[Be.ALL,Be.MEETING].includes(b.value)&&d.value.includes(K):ie===Be.SUMMIT?[Be.ALL,Be.SUMMIT].includes(b.value)&&g.value.includes(K):ie===Be.EVENTS?[Be.ALL,Be.EVENTS].includes(b.value)&&T.value.includes(K):!1;return e({refresh:B}),(ie,K)=>(t.openBlock(),t.createElementBlock("div",y1,[t.createElementVNode("div",_1,[t.createVNode(t.unref(it.ElCalendar),{ref_key:"calendar",ref:N,class:"calender"},{header:t.withCtx(({date:Z})=>{var oe;return[t.createElementVNode("div",T1,[t.createElementVNode("div",b1,[t.createVNode(t.unref(I.OIcon),{onClick:ge=>V("prev-month",Z)},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronLeft),{class:t.normalizeClass({disable:$.value})},null,8,["class"])]),_:1},8,["onClick"]),t.createElementVNode("span",C1,t.toDisplayString(se(Z)),1),t.createVNode(t.unref(I.OIcon),{onClick:ge=>V("next-month",Z)},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1},8,["onClick"])]),((oe=r.groups)==null?void 0:oe.length)>0?(t.openBlock(),t.createBlock(t.unref(I.OSelect),{key:0,modelValue:O.value,"onUpdate:modelValue":K[0]||(K[0]=ge=>O.value=ge),placeholder:t.unref(n)(r.groupType===t.unref(_i).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:te},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,ge=>(t.openBlock(),t.createBlock(t.unref(I.OOption),{value:ge,key:ge},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(ge),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",x1,[t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.latestMeeting"))+" ",1),t.createElementVNode("span",null,t.toDisplayString(t.unref(pt)(t.unref(xe)(c.value))),1)])]}),"date-cell":t.withCtx(({data:Z})=>[t.createElementVNode("div",{class:t.normalizeClass(["out-box",{"has-calender":E.value.includes(Z.day)}]),onClick:oe=>t.unref(R)(Z.day,oe)},[t.createElementVNode("div",E1,[t.createElementVNode("p",{class:t.normalizeClass([Z.isSelected?"is-selected":"","date-calender"])},t.toDisplayString(ee(Z.day.split("-").at(-1)||"")),3),t.createElementVNode("div",k1,[Q(t.unref(Be).MEETING,Z.day)?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0,class:"meeting",style:t.normalizeStyle({zIndex:t.unref(o)(t.unref(Be).MEETING,"zIndex"),backgroundColor:t.unref(o)(t.unref(Be).MEETING,"color")})},{default:t.withCtx(()=>[t.createVNode(t.unref(gh))]),_:1},8,["style"])):t.createCommentVNode("",!0),Q(t.unref(Be).EVENTS,Z.day)?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:1,class:"events",style:t.normalizeStyle({zIndex:t.unref(o)(t.unref(Be).EVENTS,"zIndex"),backgroundColor:t.unref(o)(t.unref(Be).EVENTS,"color")})},{default:t.withCtx(()=>[t.createVNode(t.unref(mh))]),_:1},8,["style"])):t.createCommentVNode("",!0),Q(t.unref(Be).SUMMIT,Z.day)?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:2,class:"summit",style:t.normalizeStyle({zIndex:t.unref(o)(t.unref(Be).SUMMIT,"zIndex"),backgroundColor:t.unref(o)(t.unref(Be).SUMMIT,"color")})},{default:t.withCtx(()=>[t.createVNode(t.unref(vh))]),_:1},8,["style"])):t.createCommentVNode("",!0)])])],10,S1)]),_:1},512),t.createElementVNode("div",w1,[t.createElementVNode("div",D1,[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.latestMeeting"))+" ",1),t.createElementVNode("span",null,t.toDisplayString(t.unref(pt)(t.unref(xe)(F.value))),1)]),t.createElementVNode("div",A1,[t.createElementVNode("div",I1,[t.createVNode(t.unref(I.OSelect),{modelValue:O.value,"onUpdate:modelValue":K[1]||(K[1]=Z=>O.value=Z),placeholder:t.unref(n)(r.groupType===t.unref(_i).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:te},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,Z=>(t.openBlock(),t.createBlock(t.unref(I.OOption),{value:Z,key:Z},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(Z),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"]),t.createVNode(t.unref(I.OTab),{modelValue:b.value,"onUpdate:modelValue":K[2]||(K[2]=Z=>b.value=Z),line:!1,"max-show":9999},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.value,Z=>(t.openBlock(),t.createBlock(t.unref(I.OTabPane),{key:Z.value,value:Z.value},{nav:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(Z.icon)))]),_:2},1024),t.createTextVNode(" "+t.toDisplayString(Z.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),t.createElementVNode("div",null,[t.createVNode(t.unref(I.OScroller),{class:"meeting-list","show-type":"hover",size:"small",style:t.normalizeStyle({"--height":w.value})},{default:t.withCtx(()=>[t.createVNode(bh,{list:z.value,groupType:r.groupType,disableFormat:r.disableFormat},{empty:t.withCtx(()=>[t.renderSlot(ie.$slots,"empty")]),_:3},8,["list","groupType","disableFormat"])]),_:3},8,["style"])])])])]))}}),O1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function B1(r,e){return t.openBlock(),t.createElementBlock("svg",O1,[...e[0]||(e[0]=[t.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 pc={name:"meeting-icon-help",render:B1},L1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function P1(r,e){return t.openBlock(),t.createElementBlock("svg",L1,[...e[0]||(e[0]=[t.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 mc={name:"meeting-icon-tip",render:P1},M1=t.defineComponent({__name:"OMeetingCalendarSelector",props:{modelValue:{default:()=>[]},multiple:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const{t:i}=je.useI18n(),n=r,s=e,a=()=>{let v=[];for(let b=1;b<=31;b++)v.push(b);return v},o=t.computed(()=>a()),l=t.ref([]),c=t.ref([]),d=t.ref(null),m=()=>{l.value=[...n.modelValue],c.value=[...n.modelValue]};t.watchEffect(()=>{m()});const g=()=>{s("update:modelValue",c.value),d.value&&(d.value.expanded=!1)},x=()=>{m(),d.value&&(d.value.expanded=!1)},T=v=>{if(n.multiple){const b=c.value.indexOf(v);b===-1?c.value.push(v):c.value.splice(b,1),c.value.sort()}else c.value=[v],g()},E=v=>{n.multiple?T(v):c.value=[],g()};return(v,b)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-meeting-calendar-selector",!r.multiple&&"is-single"])},[t.createVNode(t.unref(it.ElSelect),{ref_key:"selectorRef",ref:d,"popper-class":"o-meeting-calendar-selector-popper",placeholder:t.unref(i)("meeting.selectRepeatDate"),size:"large",multiple:"",collapseTags:"",maxCollapseTags:3,modelValue:l.value,onRemoveTag:E},t.createSlots({default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,D=>(t.openBlock(),t.createBlock(t.unref(it.ElOption),{key:D,label:D,value:D,onClick:N=>T(D),class:t.normalizeClass(c.value.includes(D)&&"is-checked")},null,8,["label","value","onClick","class"]))),128))]),_:2},[r.multiple?{name:"footer",fn:t.withCtx(()=>[t.createVNode(t.unref(I.OButton),{round:"pill",color:"primary",variant:"outline",onClick:g},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("common.confirm")),1)]),_:1}),t.createVNode(t.unref(I.OButton),{variant:"text",onClick:x},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("common.cancel")),1)]),_:1})]),key:"0"}:void 0]),1032,["placeholder","modelValue"])],2))}}),R1={class:"o-meeting-form"},V1={key:1,class:"label-wrapper"},F1={class:"o-meeting-form-popover-content etherpad"},$1={class:"repeat-config-wrapper"},U1={class:"repeat-config"},z1={class:"repeat-config-item"},H1={class:"time-select-wrapper"},q1={key:1},j1={key:1,class:"switch-wrapper"},G1={class:"switch-text"},W1={key:1,class:"switch-wrapper"},Y1={class:"switch-text"},X1={key:1,class:"label-wrapper"},K1={class:"o-meeting-form-popover-content"},Q1=["href"],Z1={key:0,class:"form-btns"},gc=t.defineComponent({__name:"OMeetingForm",props:{data:{},subId:{},createMeetingRequest:{},editMeetingRequest:{},editSubMeetingRequest:{},getPlatformsRequest:{},getGroupsRequest:{},showBtns:{type:Boolean,default:!0},groupType:{default:_i.SIG},confirmText:{},labelMap:{}},emits:["confirm","cancel"],setup(r,{expose:e,emit:i}){const{t:n,locale:s,cycleTypeOptions0:a,intervalWeekOptions:o,getPlatformLabel:l}=Tn(),c=r,d=I.useMessage(null),m=a,g=o,x=t.computed(()=>Object.keys((c==null?void 0:c.data)||{}).length>0),T=t.computed(()=>!!c.subId),E=t.computed(()=>Jg(b.value.cycle_type,m.value,"max")),v={is_record:!0,agenda:"",email_list:"",platform:"WELINK",topic:"",group_name:"",etherpad:"",date:"",date_range:[],start:"",end:"",time:"",is_cycle:!1,cycle_interval:1,cycle_type:gn,cycle_point:[]},b=t.ref(Object.assign({},v)),D=t.ref(null),N=t.ref(!1),w=t.computed(()=>({topic:[{required:!0,message:n("meeting.enterMeetingName")},{validator:q=>{if(q.length>128)return{type:"danger",message:n("meeting.meetingNameTooLong")}}}],agenda:[{validator:q=>{if(q.length>4096)return{type:"danger",message:n("meeting.meetingAgendaTooLong")}}}],group_name:[{required:!0,message:c.groupType===_i.GROUP?n("meeting.selectGroup"):n("meeting.selectSig")}],etherpad:[{required:!0,message:n("meeting.enterEtherpad")}],date:[{required:!0,message:n("meeting.selectDate")}],platform:[{required:!0,message:n("meeting.selectPlatform")}],time:[{validator:q=>{var oe;const{is_cycle:j,cycle_type:J,cycle_interval:se,cycle_point:Q,date:ie,date_range:K}=b.value;if(j){const ge=n("meeting.finishMeetingConfig");if(J===gn&&!se)return{type:"danger",message:ge};if(J===vn&&(!se||!(Q!=null&&Q.length)))return{type:"danger",message:ge};if(J===nn&&(!se||!(Q!=null&&Q.length)))return{type:"danger",message:ge};if(!(K!=null&&K.length))return{type:"danger",message:n("meeting.selectMeetingDate")};const Ne=n("meeting.invalidMeetingDuration");let be=K[0];const Le=K[1];if(J===vn){const qe=new Set;for(;!xe(be).isAfter(xe(Le));)qe.add(xe(be).day()),be=xe(be).add(1,"day").format("YYYY-MM-DD");if(Q.every(Ke=>!qe.has(Ke)))return{type:"danger",message:Ne}}if(J===nn){const qe=new Set;for(;!xe(be).isAfter(xe(Le));)qe.add(xe(be).date()),be=xe(be).add(1,"day").format("YYYY-MM-DD");if(Q.every(Ke=>!qe.has(Ke)))return{type:"danger",message:Ne}}}else if(!ie)return{type:"danger",message:n("meeting.selectMeetingDate")};if(!((oe=q==null?void 0:q.trim())!=null&&oe.length))return{type:"danger",message:n("meeting.selectMeetingTime")};const Z=q.split("-").map(ge=>ge.split(":").map(Number));if(Z[0][0]>Z[1][0]||Z[0][0]===Z[1][0]&&Z[0][1]>=Z[1][1])return{type:"danger",message:n("meeting.endTimeAfterStartTime")};if(!b.value.is_cycle&&b.value.date&&b.value.start){const ge=`${b.value.date} ${b.value.start}`;if(xe(ge).isBefore(xe()))return{type:"danger",message:n("meeting.startTimeBeforeEndTime")}}},triggers:["blur","change"]}],email_list:[{validator:q=>{if(x.value)return{};const j=q.replaceAll(" ","").replaceAll(",",";")||"";if(j.length){if(j.length>1020)return{type:"danger",message:n("meeting.emailTooLong")};const J=j.split(";")||[];if(J.some(se=>!yh.test(se)))return{type:"danger",message:n("meeting.emailInvalid")};if(J.some(se=>se.length>50))return{type:"danger",message:n("meeting.singleEmailTooLong")};if(J.length>20)return{type:"danger",message:n("meeting.emailCountTooLong")}}},triggers:["blur","change"]}]})),$=t.ref([]),F=async()=>{if(!c.getGroupsRequest)return;const q=await c.getGroupsRequest();$.value=q.map(j=>({...j,label:j.group_name,value:j.group_name})),c.data&&V(b.value.group_name)},H=t.ref([]),O=async()=>{if(!c.getPlatformsRequest)return;const q=await c.getPlatformsRequest();H.value=q.map(j=>({label:l(j),value:j})),c.data||(b.value.platform=H.value[0].value)},U=i,C=()=>{if(!c.data)return{};const{start:q,end:j,is_cycle:J,cycle_start_date:se,cycle_end_date:Q,cycle_point:ie,cycle_interval:K,cycle_start:Z,cycle_end:oe}=c.data;return{...c.data,time:`${q}-${j}`,...J?{date_range:[se,Q],cycle_point:(ie==null?void 0:ie.map(ge=>parseInt(ge)))||[],cycle_interval:K||1,time:`${Z}-${oe}`,start:Z,end:oe}:{}}};t.watch(()=>c.data,q=>{var j;if(q){const J=C(),se=((j=J==null?void 0:J.cycle_sub)==null?void 0:j.find(ge=>ge.sub_id===c.subId))||{},{mid:Q,date:ie,start:K,end:Z,sub_id:oe}=se;Object.assign(b.value,J,T.value?{is_cycle:!1,mid:Q,date:ie,start:K,end:Z,sub_id:oe}:{})}else{const J=xe().format("YYYY-MM-DD"),se=xe().format("HH:mm");let Q="",ie="";const K=On(se);if(K<=On("08:00"))Q="08:00",ie="09:00";else if(On("22:15")<=K)Q="08:00",ie="09:00";else{let[oe,ge]=se.split(":").map(Number);ge>=45?(oe++,ge=0):ge=(Math.floor(ge/15)+1)*15,Q=dc(oe*60+ge).slice(3),ie=dc(oe*60+ge+60).slice(3)}const Z=[xe().format("YYYY-MM-DD"),xe().add(1,"month").format("YYYY-MM-DD")];Object.assign(b.value,{date:J,start:Q,end:ie,time:`${Q}-${ie}`,date_range:Z})}},{immediate:!0,deep:!0});const k=()=>{var q,j,J,se;b.value=Object.assign({},v),(j=(q=D.value)==null?void 0:q.clearValidate)==null||j.call(q),(se=(J=D.value)==null?void 0:J.resetFields)==null||se.call(J),U("cancel")},P=()=>{b.value.cycle_point=[],b.value.cycle_interval=1},z=()=>{var q;b.value.platform=((q=H.value.find(j=>j.value.toLowerCase()==="welink"))==null?void 0:q.value)||"WeLink"},{lePadV:B}=Et.useScreen(),R=async()=>{var j;let q=x.value?n("meeting.editSuccess"):n("meeting.booSuccess");try{N.value=!0;const J=await D.value.validate();if(!J||J.some(nt=>!!nt))return;const{topic:se,etherpad:Q,group_name:ie,platform:K,date:Z,start:oe,end:ge,agenda:Ne,is_record:be,is_cycle:Le,date_range:qe,cycle_type:Ke,cycle_interval:Pe,cycle_point:Ze}=b.value;let tt={topic:se,etherpad:Q,agenda:Ne,is_record:be,group_name:ie,platform:K,is_cycle:Le},ze;if(Le?(tt={...tt,cycle_interval:Pe,cycle_type:Ke,cycle_start_date:(qe==null?void 0:qe[0])||"",cycle_end_date:(qe==null?void 0:qe[1])||"",cycle_start:oe,cycle_end:ge},Ke!==gn&&(tt={...tt,cycle_point:Ze.join(",")})):tt={...tt,date:(Z==null?void 0:Z.split(" ")[0])||"",start:oe,end:ge},x.value)if(T.value){const{mid:nt,sub_id:Oe}=b.value,{date:Ee,start:me,end:Fe}=tt;ze=await(c==null?void 0:c.editSubMeetingRequest(Oe,{mid:nt,date:Ee,start:me,end:Fe,is_notify:!0}))}else{const{email_list:nt,platform:Oe,group_name:Ee,etherpad:me,...Fe}=tt;ze=await(c==null?void 0:c.editMeetingRequest((j=c.data)==null?void 0:j.id,{...Fe,is_notify:!0}))}else ze=await(c==null?void 0:c.createMeetingRequest({...tt,email_list:b.value.email_list.replaceAll(" ","")}));if(typeof ze=="boolean"&&!ze)return;const gt=n("meeting.meetingHandleSuccess",[b.value.topic,q]);d.success({content:gt}),U("confirm")}finally{N.value=!1}};t.onMounted(()=>{F(),O()});const V=q=>{const j=$.value.find(J=>J.value===q);x.value||(b.value.etherpad=(j==null?void 0:j.etherpad)||"",b.value.email_list=(j==null?void 0:j.email_list)||"")},te=q=>q.getTime()<Date.now()-1440*60*1e3,ee=()=>{b.value.start&&b.value.end?b.value.time=`${b.value.start}-${b.value.end}`:b.value.time=""};return e({confirm:R}),(q,j)=>(t.openBlock(),t.createElementBlock("div",R1,[t.createVNode(t.unref(I.OForm),{model:b.value,ref_key:"formRef",ref:D,"has-required":"",layout:t.unref(B)?"v":"h",class:"form-wrapper"},{default:t.withCtx(()=>{var J,se,Q,ie,K,Z;return[t.createVNode(t.unref(I.OFormItem),{rules:w.value.topic,label:((J=r.labelMap)==null?void 0:J.topic)??t.unref(n)("meeting.meetingName"),field:"topic"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OInput),{disabled:T.value,size:"large",placeholder:t.unref(n)("meeting.enterMeetingName"),style:{width:"100%"},modelValue:b.value.topic,"onUpdate:modelValue":j[0]||(j[0]=oe=>b.value.topic=oe)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(I.OFormItem),{rules:w.value.group_name,label:((se=r.labelMap)==null?void 0:se.group_name)??(r.groupType===t.unref(_i).GROUP?t.unref(n)("meeting.meetingGroup"):t.unref(n)("meeting.meetingSig")),field:"group_name"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OSelect),{disabled:x.value,placeholder:r.groupType===t.unref(_i).GROUP?t.unref(n)("meeting.selectGroup"):t.unref(n)("meeting.selectSig"),size:"large",style:{width:"100%"},modelValue:b.value.group_name,"onUpdate:modelValue":j[1]||(j[1]=oe=>b.value.group_name=oe),onChange:V},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,oe=>(t.openBlock(),t.createBlock(t.unref(I.OOption),{key:oe.value,value:oe.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(oe.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),b.value.group_name?(t.openBlock(),t.createBlock(t.unref(I.OFormItem),{key:0,rules:w.value.etherpad,label:"Etherpad",field:"etherpad"},{label:t.withCtx(()=>{var oe;return[(oe=r.labelMap)!=null&&oe.etherpad?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(r.labelMap.etherpad),1)],64)):(t.openBlock(),t.createElementBlock("div",V1,[t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.etherpad"))+" ",1),t.createVNode(t.unref(I.OPopover),null,{target:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(pc))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",F1,t.toDisplayString(t.unref(n)("meeting.etherpadDesc")),1)]),_:1})]))]}),default:t.withCtx(()=>[t.createVNode(t.unref(I.OInput),{disabled:x.value,size:"large",placeholder:t.unref(n)("meeting.enterEtherpad"),style:{width:"100%"},modelValue:b.value.etherpad,"onUpdate:modelValue":j[2]||(j[2]=oe=>b.value.etherpad=oe)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])):t.createCommentVNode("",!0),t.createVNode(t.unref(I.OFormItem),{label:((Q=r.labelMap)==null?void 0:Q.time)??t.unref(n)("meeting.meetingTime"),field:"time",rules:w.value.time,class:"repeat-row",required:""},{default:t.withCtx(()=>{var oe,ge,Ne;return[t.createElementVNode("div",$1,[T.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(I.OFormItem),{key:0,field:"repeat",class:"repeat-radio-item"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.ORadioGroup),{modelValue:b.value.is_cycle,"onUpdate:modelValue":j[3]||(j[3]=be=>b.value.is_cycle=be),onChange:z,disabled:x.value},{default:t.withCtx(()=>[t.createVNode(t.unref(I.ORadio),{value:!1},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.nonRepeat")),1)]),_:1}),t.createVNode(t.unref(I.ORadio),{value:!0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.isRepeat")),1)]),_:1})]),_:1},8,["modelValue","disabled"])]),_:1})),t.createElementVNode("div",U1,[b.value.is_cycle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(t.unref(I.OFormItem),{label:t.unref(n)("meeting.every"),class:"full-width-item"},{default:t.withCtx(()=>[t.createElementVNode("div",z1,[b.value.cycle_type!==t.unref(nn)?(t.openBlock(),t.createBlock(t.unref(I.OFormItem),{key:0},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElInputNumber),{size:"large",modelValue:b.value.cycle_interval,"onUpdate:modelValue":j[4]||(j[4]=be=>b.value.cycle_interval=be),min:1,max:E.value},null,8,["modelValue","max"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(I.OFormItem),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OSelect),{size:"large",modelValue:b.value.cycle_type,"onUpdate:modelValue":j[5]||(j[5]=be=>b.value.cycle_type=be),class:"interval-select",optionWrapClass:"o-meeting-form-interval-select-options",onChange:P},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(m),be=>(t.openBlock(),t.createBlock(t.unref(I.OOption),{key:be.value,value:be.value,label:be.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1},8,["label"]),b.value.cycle_type!==t.unref(gn)?(t.openBlock(),t.createBlock(t.unref(I.OFormItem),{key:0,label:((oe=r.labelMap)==null?void 0:oe.cycle_point)??t.unref(n)("meeting.in"),field:"cycle_point",class:"point-item"},{default:t.withCtx(()=>[b.value.cycle_type===t.unref(vn)?(t.openBlock(),t.createBlock(t.unref(I.OSelect),{key:0,size:"large",multiple:"",modelValue:b.value.cycle_point,"onUpdate:modelValue":j[6]||(j[6]=be=>b.value.cycle_point=be),placeholder:t.unref(n)("meeting.selectRepeatDate"),"max-tag-count":1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),be=>(t.openBlock(),t.createBlock(t.unref(I.OOption),{key:be.value,value:be.value,label:be.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])):t.createCommentVNode("",!0),b.value.cycle_type===t.unref(nn)?(t.openBlock(),t.createBlock(M1,{key:1,modelValue:b.value.cycle_point,"onUpdate:modelValue":j[7]||(j[7]=be=>b.value.cycle_point=be)},null,8,["modelValue"])):t.createCommentVNode("",!0)]),_:1},8,["label"])):t.createCommentVNode("",!0),t.createVNode(t.unref(I.OFormItem),{label:((ge=r.labelMap)==null?void 0:ge.date_range)??t.unref(n)("meeting.meetingDuration"),field:"date_range"},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElDatePicker),{size:"large",modelValue:b.value.date_range,"onUpdate:modelValue":j[8]||(j[8]=be=>b.value.date_range=be),"start-placeholder":t.unref(n)("meeting.startDate"),"end-placeholder":t.unref(n)("meeting.endDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":te,clearable:!1,type:"daterange","popper-class":"o-meeting-form-date-picker-popper"},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"])],64)):(t.openBlock(),t.createBlock(t.unref(I.OFormItem),{key:1,label:((Ne=r.labelMap)==null?void 0:Ne.date)??t.unref(n)("meeting.meetingDate"),field:"date"},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElDatePicker),{"popper-class":"o-meeting-form-date-picker-popper",size:"large",modelValue:b.value.date,"onUpdate:modelValue":j[9]||(j[9]=be=>b.value.date=be),placeholder:t.unref(n)("meeting.selectDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":te,clearable:!1},null,8,["modelValue","placeholder"])]),_:1},8,["label"])),t.createVNode(t.unref(I.OFormItem),{label:t.unref(n)("meeting.meetingTime")},{default:t.withCtx(()=>[t.createElementVNode("div",H1,[t.createVNode(t.unref(I.OFormItem),{field:"start"},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:t.unref(n)("meeting.startTime"),modelValue:b.value.start,"onUpdate:modelValue":j[10]||(j[10]=be=>b.value.start=be),size:"large",clearable:!1,onChange:ee},null,8,["placeholder","modelValue"])]),_:1}),j[17]||(j[17]=t.createElementVNode("span",null,"-",-1)),t.createVNode(t.unref(I.OFormItem),{field:"end"},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:t.unref(n)("meeting.endTime"),modelValue:b.value.end,"onUpdate:modelValue":j[11]||(j[11]=be=>b.value.end=be),size:"large",clearable:!1,onChange:ee},null,8,["placeholder","modelValue"])]),_:1}),t.createVNode(t.unref(I.OIconTime))])]),_:1},8,["label"])])])]}),_:1},8,["label","rules"]),t.createVNode(t.unref(I.OFormItem),{label:((ie=r.labelMap)==null?void 0:ie.platform)??t.unref(n)("meeting.meetingPlatform"),field:"platform",rules:w.value.platform,class:"platform-item"},{default:t.withCtx(()=>[r.data?(t.openBlock(),t.createElementBlock("span",q1,t.toDisplayString(t.unref(l)(b.value.platform)),1)):(t.openBlock(),t.createBlock(t.unref(I.ORadioGroup),{key:0,modelValue:b.value.platform,"onUpdate:modelValue":j[12]||(j[12]=oe=>b.value.platform=oe),disabled:b.value.is_cycle},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(H.value,oe=>(t.openBlock(),t.createBlock(t.unref(I.ORadio),{key:oe.value,value:oe.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l)(oe.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled"]))]),_:1},8,["label","rules"]),t.createVNode(t.unref(I.OFormItem),{field:"agenda",label:((K=r.labelMap)==null?void 0:K.agenda)??t.unref(n)("meeting.meetingAgenda"),rules:w.value.genda},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OTextarea),{disabled:T.value,size:"large",placeholder:t.unref(n)("meeting.enterMeetingAgenda"),style:{width:"100%"},rows:4,modelValue:b.value.agenda,"onUpdate:modelValue":j[13]||(j[13]=oe=>b.value.agenda=oe)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label","rules"]),t.createVNode(t.unref(I.OFormItem),{label:((Z=r.labelMap)==null?void 0:Z.is_record)??t.unref(n)("meeting.meetingRecord"),field:"is_record",class:"record-item full-width-item"},{default:t.withCtx(()=>[t.unref(B)?(t.openBlock(),t.createBlock(t.unref(I.OSwitch),{key:0,modelValue:b.value.is_record,"onUpdate:modelValue":j[14]||(j[14]=oe=>b.value.is_record=oe),disabled:T.value},null,8,["modelValue","disabled"])):(t.openBlock(),t.createElementBlock("div",j1,[t.createVNode(t.unref(I.OSwitch),{modelValue:b.value.is_record,"onUpdate:modelValue":j[15]||(j[15]=oe=>b.value.is_record=oe),disabled:T.value},null,8,["modelValue","disabled"]),t.createElementVNode("div",G1,[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(mc))]),_:1}),t.createElementVNode("div",null,[t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingRecordDesc1")),1),j[18]||(j[18]=t.createElementVNode("br",null,null,-1)),t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingRecordDesc2")),1)])])]))]),_:1},8,["label"]),t.unref(B)?(t.openBlock(),t.createElementBlock("div",W1,[t.createElementVNode("div",Y1,[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(mc))]),_:1}),t.createElementVNode("div",null,[t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingRecordDesc1")),1),j[19]||(j[19]=t.createElementVNode("br",null,null,-1)),t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingRecordDesc2")),1)])])])):t.createCommentVNode("",!0),t.createVNode(t.unref(I.OFormItem),{field:"email_list",rules:w.value.email_list},{label:t.withCtx(()=>{var oe;return[(oe=r.labelMap)!=null&&oe.email_list?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(r.labelMap.email_list),1)],64)):(t.openBlock(),t.createElementBlock("div",X1,[t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingEmail"))+" ",1),t.createVNode(t.unref(I.OPopover),null,{target:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(pc))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",K1,[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.meetingEmailDesc"))+" ",1),t.createElementVNode("a",{class:"link-text",href:`/${t.unref(s)}/sig`},t.toDisplayString(t.unref(n)("meeting.sigGroupEmail")),9,Q1)])]),_:1})]))]}),default:t.withCtx(()=>[t.createVNode(t.unref(I.OTextarea),{disabled:x.value,size:"large",placeholder:t.unref(n)("meeting.enterEmail"),style:{width:"100%"},rows:4,modelValue:b.value.email_list,"onUpdate:modelValue":j[16]||(j[16]=oe=>b.value.email_list=oe)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])]}),_:1},8,["model","layout"]),r.showBtns?(t.openBlock(),t.createElementBlock("div",Z1,[t.createVNode(t.unref(I.OButton),{color:"primary",variant:"solid",size:"large",onClick:R,loading:N.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x.value?t.unref(n)("common.save"):r.confirmText||t.unref(n)("meeting.book")),1)]),_:1},8,["loading"]),t.createVNode(t.unref(I.OButton),{color:"primary",variant:"outline",size:"large",onClick:k},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("common.cancel")),1)]),_:1})])):t.createCommentVNode("",!0)]))}}),J1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function e2(r,e){return t.openBlock(),t.createElementBlock("svg",J1,[...e[0]||(e[0]=[t.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),t.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),t.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 t2={name:"meeting-icon-playing",render:e2},i2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function n2(r,e){return t.openBlock(),t.createElementBlock("svg",i2,[...e[0]||(e[0]=[t.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 r2={name:"components-icon-search",render:n2},s2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function a2(r,e){return t.openBlock(),t.createElementBlock("svg",s2,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",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 wl={name:"components-icon-chevron-down",render:a2},o2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function l2(r,e){return t.openBlock(),t.createElementBlock("svg",o2,[...e[0]||(e[0]=[t.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 u2={name:"components-icon-chevron-up",render:l2},c2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function d2(r,e){return t.openBlock(),t.createElementBlock("svg",c2,[...e[0]||(e[0]=[t.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:d2},h2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function f2(r,e){return t.openBlock(),t.createElementBlock("svg",h2,[...e[0]||(e[0]=[t.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 p2={name:"meeting-icon-speaker",render:f2},m2={class:"o-meeting-playback-subtitles"},g2={class:"search-captions"},v2={key:0,class:"suffix-box"},y2={class:"right-handle"},_2=["onClick"],T2={class:"info"},b2={class:"num"},C2={class:"speaker"},x2={class:"start-time"},S2={class:"text"},E2={key:1},k2=t.defineComponent({__name:"OMeetingPlaybackSubtitles",props:{captions:{default:()=>[]},instance:{},trackIdx:{}},setup(r){const e=xa(),i=r,{t:n}=je.useI18n(),s=t.computed(()=>i.trackIdx),a=t.ref(),o=t.ref(!1),l=()=>{o.value=!0},c=fi.useDebounceFn(()=>{o.value=!1},3e3);t.watch(()=>o.value,B=>{B&&c()});const d=t.ref([]);t.watch(()=>i.captions,()=>{d.value=i.captions||[],t.nextTick(()=>{var B;a.value&&((B=a.value)==null||B.scrollTo({top:0,behavior:"smooth"}))})},{immediate:!0,deep:!0});const m=B=>`00:${B.split(".")[0]}`.slice(-8),g=B=>{const R=B.split(":"),V=R[R.length-3]?parseInt(R[R.length-3]):0,te=parseInt(R[R.length-2]),ee=parseFloat(R[R.length-1]);return V*60*60+te*60+ee};t.onMounted(()=>{var B;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(B=a.value)==null||B.addEventListener("wheel",l)}),t.watch(()=>d.value,()=>{var B;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(B=a.value)==null||B.addEventListener("wheel",l)});const x=t.ref(0),T=()=>{},E=B=>{const R=i.instance;if(!R)return;const V=g(B);R.currentTime(V)},v=t.ref(""),b=t.ref(0),D=t.ref(0),N=t.ref([]),w=n("common.all"),$=t.computed(()=>[...new Set(i.captions.map(B=>B.speakerLabel).sort().reverse())]);t.watch(()=>s.value,()=>{var R,V;if(o.value&&v.value)return;const B=(R=a.value)==null?void 0:R.querySelectorAll(".captions-item")[s.value-1];(V=a.value)==null||V.scrollTo({top:(B==null?void 0:B.offsetTop)-16,behavior:"smooth"})}),t.onUnmounted(()=>{a.value&&a.value.removeEventListener("wheel",l)});const F=(B,R)=>{var j,J,se,Q,ie,K;const V=document.getElementsByClassName("light-keyword")[B-1],te=document.getElementsByClassName("light-keyword")[B-R];te==null||te.classList.remove("light-keyword-active"),V==null||V.classList.add("light-keyword-active");const ee=V.offsetTop+V.offsetHeight<((j=a.value)==null?void 0:j.scrollTop),q=V.offsetTop>((J=a.value)==null?void 0:J.offsetHeight)+((se=a.value)==null?void 0:se.scrollTop);(ee||q)&&((K=a.value)==null||K.scrollTo({top:(ie=(Q=V.parentElement)==null?void 0:Q.parentElement)==null?void 0:ie.offsetTop,behavior:"smooth"}))},H=()=>{!b.value||D.value===1||(D.value--,F(D.value,0))},O=B=>{B!=null&&B.shiftKey||!b.value||D.value===b.value||(D.value++,F(D.value,2))},U=B=>{d.value=i.captions.filter(R=>N.value.includes(R.speakerLabel)).map(R=>({...R,contentHtml:B?R.contentHtml.replaceAll(B,`<span class="light-keyword">${B}</span>`):R.contentHtml})),t.nextTick(()=>{var V;const R=document.getElementsByClassName("light-keyword");b.value=R.length,b.value?O():(V=a.value)==null||V.scrollTo({top:0,behavior:"smooth"})})},C=fi.useDebounceFn(U,300);t.watch(()=>v.value,B=>{D.value=0,C(B)}),t.watch(()=>$.value,B=>{N.value=B},{immediate:!0});const k=t.ref(!1),P=t.ref(!1),z=B=>{P.value=!1,B?N.value=$.value:N.value=[]};return t.watch(()=>N.value,B=>{B.length===0?(k.value=!1,P.value=!1):B.length===$.value.length?(k.value=!0,P.value=!1):P.value=!0,C(v.value)},{deep:!0}),(B,R)=>(t.openBlock(),t.createElementBlock("div",m2,[t.createElementVNode("div",g2,[t.createVNode(t.unref(I.OInput),{modelValue:v.value,"onUpdate:modelValue":R[1]||(R[1]=V=>v.value=V),onKeydown:[t.withKeys(O,["enter"]),t.withKeys(t.withModifiers(H,["shift","stop"]),["enter"])],placeholder:t.unref(n)("meeting.searchSubtitlePlaceholder"),size:"large",class:"input-captions"},{prefix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(r2))]),_:1})]),suffix:t.withCtx(()=>[v.value?(t.openBlock(),t.createElementBlock("div",v2,[t.createElementVNode("span",null,t.toDisplayString(D.value)+"/"+t.toDisplayString(b.value),1),t.createVNode(t.unref(I.OIcon),{onClick:H},{default:t.withCtx(()=>[t.createVNode(t.unref(u2))]),_:1}),t.createVNode(t.unref(I.OIcon),{onClick:O},{default:t.withCtx(()=>[t.createVNode(t.unref(wl))]),_:1}),t.createVNode(t.unref(I.ODivider),{direction:"v"}),t.createVNode(t.unref(I.OIcon),{class:"hover-close",onClick:R[0]||(R[0]=V=>v.value="")},{default:t.withCtx(()=>[t.createVNode(t.unref(Dl))]),_:1})])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","onKeydown","placeholder"]),t.createElementVNode("div",y2,[t.createVNode(t.unref(it.ElSelect),{multiple:"",modelValue:N.value,"onUpdate:modelValue":R[3]||(R[3]=V=>N.value=V),"popper-class":"speakers-selector-popper",class:"speakers-selector",placement:"bottom"},{prefix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(p2))]),_:1})]),header:t.withCtx(()=>[t.createVNode(t.unref(it.ElCheckbox),{modelValue:k.value,"onUpdate:modelValue":R[2]||(R[2]=V=>k.value=V),indeterminate:P.value,onChange:z},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(w)),1)]),_:1},8,["modelValue","indeterminate"])]),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,V=>(t.openBlock(),t.createBlock(t.unref(it.ElOption),{key:V,label:V,value:V},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElCheckbox),{"model-value":N.value.includes(V)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(V),1)]),_:2},1032,["model-value"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),t.createVNode(t.unref(I.OTab),{modelValue:x.value,"onUpdate:modelValue":R[4]||(R[4]=V=>x.value=V),variant:"text",class:"captions-tab",onChange:T,"max-show":9999},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OTabPane),{value:0,label:t.unref(n)("meeting.audioToText")},{default:t.withCtx(()=>[d.value.length?(t.openBlock(),t.createBlock(t.unref(I.OScroller),{key:0,id:"captionsScrollDom",class:"captions-scroller","show-type":"hover",size:"small","disabled-x":""},{default:t.withCtx(()=>[t.createVNode(t.unref(I.ORow),{gap:"0 8px",wrap:"wrap"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,(V,te)=>(t.openBlock(),t.createBlock(t.unref(I.OCol),{flex:"0 0 100%",key:te},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["captions-item",{"captions-item-active":s.value===te+1}]),onClick:ee=>E(V.start_time)},[t.createElementVNode("div",T2,[t.createElementVNode("div",b2,t.toDisplayString(V.speakerIdx),1),t.createElementVNode("div",C2,t.toDisplayString(V.speakerLabel),1),t.createElementVNode("div",x2,t.toDisplayString(m(V.start_time)),1),s.value===te+1?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0,class:"playing initial-fill"},{default:t.withCtx(()=>[t.createVNode(t.unref(t2))]),_:1})):t.createCommentVNode("",!0)]),t.withDirectives(t.createElementVNode("div",S2,null,512),[[t.unref(e),V.contentHtml]])],10,_2)]),_:2},1024))),128))]),_:1})]),_:1})):(t.openBlock(),t.createElementBlock("div",E2,[t.renderSlot(B.$slots,"empty")]))]),_:3},8,["label"])]),_:3},8,["modelValue"])]))}});var po,vc;function Sa(){if(vc)return po;vc=1;var r;return typeof window<"u"?r=window:typeof ea<"u"?r=ea:typeof self<"u"?r=self:r={},po=r,po}var w2=Sa();const W=fr(w2),D2={},A2=Object.freeze(Object.defineProperty({__proto__:null,default:D2},Symbol.toStringTag,{value:"Module"})),I2=Xg(A2);var mo,yc;function Ch(){if(yc)return mo;yc=1;var r=typeof ea<"u"?ea:typeof window<"u"?window:{},e=I2,i;return typeof document<"u"?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"],i||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=e)),mo=i,mo}var N2=Ch();const Te=fr(N2);var Ms={exports:{}},go={exports:{}},_c;function O2(){return _c||(_c=1,(function(r){function e(){return r.exports=e=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var a in s)({}).hasOwnProperty.call(s,a)&&(i[a]=s[a])}return i},r.exports.__esModule=!0,r.exports.default=r.exports,e.apply(null,arguments)}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports})(go)),go.exports}var vo,Tc;function B2(){if(Tc)return vo;Tc=1,vo=e;var r=Object.prototype.toString;function e(i){if(!i)return!1;var n=r.call(i);return n==="[object Function]"||typeof i=="function"&&n!=="[object RegExp]"||typeof window<"u"&&(i===window.setTimeout||i===window.alert||i===window.confirm||i===window.prompt)}return vo}var yo,bc;function L2(){if(bc)return yo;bc=1;function r(s,a){var o=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(o)return(o=o.call(s)).next.bind(o);if(Array.isArray(s)||(o=e(s))||a){o&&(s=o);var l=0;return function(){return l>=s.length?{done:!0}:{done:!1,value:s[l++]}}}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(s,a){if(s){if(typeof s=="string")return i(s,a);var o=Object.prototype.toString.call(s).slice(8,-1);if(o==="Object"&&s.constructor&&(o=s.constructor.name),o==="Map"||o==="Set")return Array.from(s);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return i(s,a)}}function i(s,a){(a==null||a>s.length)&&(a=s.length);for(var o=0,l=new Array(a);o<a;o++)l[o]=s[o];return l}var n=(function(){function s(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var a=s.prototype;return a.getIsEnabled=function(){return this.enabled_},a.enable=function(){this.enabled_=!0},a.disable=function(){this.enabled_=!1},a.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},a.addInterceptor=function(l,c){this.typeToInterceptorsMap_.has(l)||this.typeToInterceptorsMap_.set(l,new Set);var d=this.typeToInterceptorsMap_.get(l);return d.has(c)?!1:(d.add(c),!0)},a.removeInterceptor=function(l,c){var d=this.typeToInterceptorsMap_.get(l);return d&&d.has(c)?(d.delete(c),!0):!1},a.clearInterceptorsByType=function(l){var c=this.typeToInterceptorsMap_.get(l);return c?(this.typeToInterceptorsMap_.delete(l),this.typeToInterceptorsMap_.set(l,new Set),!0):!1},a.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},a.getForType=function(l){return this.typeToInterceptorsMap_.get(l)||new Set},a.execute=function(l,c){for(var d=this.getForType(l),m=r(d),g;!(g=m()).done;){var x=g.value;try{c=x(c)}catch{}}return c},s})();return yo=n,yo}var _o,Cc;function P2(){if(Cc)return _o;Cc=1;var r=(function(){function i(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var n=i.prototype;return n.getIsEnabled=function(){return this.enabled_},n.enable=function(){this.enabled_=!0},n.disable=function(){this.enabled_=!1},n.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},n.getMaxAttempts=function(){return this.maxAttempts_},n.setMaxAttempts=function(a){this.maxAttempts_=a},n.getDelayFactor=function(){return this.delayFactor_},n.setDelayFactor=function(a){this.delayFactor_=a},n.getFuzzFactor=function(){return this.fuzzFactor_},n.setFuzzFactor=function(a){this.fuzzFactor_=a},n.getInitialDelay=function(){return this.initialDelay_},n.setInitialDelay=function(a){this.initialDelay_=a},n.createRetry=function(a){var o=a===void 0?{}:a,l=o.maxAttempts,c=o.delayFactor,d=o.fuzzFactor,m=o.initialDelay;return new e({maxAttempts:l||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:d||this.fuzzFactor_,initialDelay:m||this.initialDelay_})},i})(),e=(function(){function i(s){this.maxAttempts_=s.maxAttempts,this.delayFactor_=s.delayFactor,this.fuzzFactor_=s.fuzzFactor,this.currentDelay_=s.initialDelay,this.currentAttempt_=1}var n=i.prototype;return n.moveToNextAttempt=function(){this.currentAttempt_++;var a=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+a},n.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},n.getCurrentDelay=function(){return this.currentDelay_},n.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},n.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},n.getCurrentFuzzedDelay=function(){var a=this.getCurrentMinPossibleDelay(),o=this.getCurrentMaxPossibleDelay();return a+Math.random()*(o-a)},i})();return _o=r,_o}var To,xc;function M2(){if(xc)return To;xc=1;var r=Sa(),e=function(s,a){return a===void 0&&(a=!1),function(o,l,c){if(o){s(o);return}if(l.statusCode>=400&&l.statusCode<=599){var d=c;if(a)if(r.TextDecoder){var m=i(l.headers&&l.headers["content-type"]);try{d=new TextDecoder(m).decode(c)}catch{}}else d=String.fromCharCode.apply(null,new Uint8Array(c));s({cause:d});return}s(null,c)}};function i(n){return n===void 0&&(n=""),n.toLowerCase().split(";").reduce(function(s,a){var o=a.split("="),l=o[0],c=o[1];return l.trim()==="charset"?c.trim():s},"utf-8")}return To=e,To}var Sc;function R2(){if(Sc)return Ms.exports;Sc=1;var r=Sa(),e=O2(),i=B2(),n=L2(),s=P2();d.httpHandler=M2(),d.requestInterceptorsStorage=new n,d.responseInterceptorsStorage=new n,d.retryManager=new s;/**
|
|
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 a=function(E){var v={};return E&&E.trim().split(`
|
|
13
|
+
`).forEach(function(b){var D=b.indexOf(":"),N=b.slice(0,D).trim().toLowerCase(),w=b.slice(D+1).trim();typeof v[N]>"u"?v[N]=w:Array.isArray(v[N])?v[N].push(w):v[N]=[v[N],w]}),v};Ms.exports=d,Ms.exports.default=d,d.XMLHttpRequest=r.XMLHttpRequest||x,d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],function(T){d[T==="delete"?"del":T]=function(E,v,b){return v=c(E,v,b),v.method=T.toUpperCase(),m(v)}});function o(T,E){for(var v=0;v<T.length;v++)E(T[v])}function l(T){for(var E in T)if(T.hasOwnProperty(E))return!1;return!0}function c(T,E,v){var b=T;return i(E)?(v=E,typeof T=="string"&&(b={uri:T})):b=e({},E,{uri:T}),b.callback=v,b}function d(T,E,v){return E=c(T,E,v),m(E)}function m(T){if(typeof T.callback>"u")throw new Error("callback argument missing");if(T.requestType&&d.requestInterceptorsStorage.getIsEnabled()){var E={uri:T.uri||T.url,headers:T.headers||{},body:T.body,metadata:T.metadata||{},retry:T.retry,timeout:T.timeout},v=d.requestInterceptorsStorage.execute(T.requestType,E);T.uri=v.uri,T.headers=v.headers,T.body=v.body,T.metadata=v.metadata,T.retry=v.retry,T.timeout=v.timeout}var b=!1,D=function(q,j,J){b||(b=!0,T.callback(q,j,J))};function N(){H.readyState===4&&!d.responseInterceptorsStorage.getIsEnabled()&&setTimeout(F,0)}function w(){var ee=void 0;if(H.response?ee=H.response:ee=H.responseText||g(H),R)try{ee=JSON.parse(ee)}catch{}return ee}function $(ee){if(clearTimeout(V),clearTimeout(T.retryTimeout),ee instanceof Error||(ee=new Error(""+(ee||"Unknown XMLHttpRequest Error"))),ee.statusCode=0,!U&&d.retryManager.getIsEnabled()&&T.retry&&T.retry.shouldRetry()){T.retryTimeout=setTimeout(function(){T.retry.moveToNextAttempt(),T.xhr=H,m(T)},T.retry.getCurrentFuzzedDelay());return}if(T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var q={headers:te.headers||{},body:te.body,responseUrl:H.responseURL,responseType:H.responseType},j=d.responseInterceptorsStorage.execute(T.requestType,q);te.body=j.body,te.headers=j.headers}return D(ee,te)}function F(){if(!U){var ee;clearTimeout(V),clearTimeout(T.retryTimeout),T.useXDR&&H.status===void 0?ee=200:ee=H.status===1223?204:H.status;var q=te,j=null;if(ee!==0?(q={body:w(),statusCode:ee,method:k,headers:{},url:C,rawRequest:H},H.getAllResponseHeaders&&(q.headers=a(H.getAllResponseHeaders()))):j=new Error("Internal XMLHttpRequest Error"),T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var J={headers:q.headers||{},body:q.body,responseUrl:H.responseURL,responseType:H.responseType},se=d.responseInterceptorsStorage.execute(T.requestType,J);q.body=se.body,q.headers=se.headers}return D(j,q,q.body)}}var H=T.xhr||null;H||(T.cors||T.useXDR?H=new d.XDomainRequest:H=new d.XMLHttpRequest);var O,U,C=H.url=T.uri||T.url,k=H.method=T.method||"GET",P=T.body||T.data,z=H.headers=T.headers||{},B=!!T.sync,R=!1,V,te={body:void 0,headers:{},statusCode:0,method:k,url:C,rawRequest:H};if("json"in T&&T.json!==!1&&(R=!0,z.accept||z.Accept||(z.Accept="application/json"),k!=="GET"&&k!=="HEAD"&&(z["content-type"]||z["Content-Type"]||(z["Content-Type"]="application/json"),P=JSON.stringify(T.json===!0?P:T.json))),H.onreadystatechange=N,H.onload=F,H.onerror=$,H.onprogress=function(){},H.onabort=function(){U=!0,clearTimeout(T.retryTimeout)},H.ontimeout=$,H.open(k,C,!B,T.username,T.password),B||(H.withCredentials=!!T.withCredentials),!B&&T.timeout>0&&(V=setTimeout(function(){if(!U){U=!0,H.abort("timeout");var ee=new Error("XMLHttpRequest timeout");ee.code="ETIMEDOUT",$(ee)}},T.timeout)),H.setRequestHeader)for(O in z)z.hasOwnProperty(O)&&H.setRequestHeader(O,z[O]);else if(T.headers&&!l(T.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in T&&(H.responseType=T.responseType),"beforeSend"in T&&typeof T.beforeSend=="function"&&T.beforeSend(H),H.send(P||null),H}function g(T){try{if(T.responseType==="document")return T.responseXML;var E=T.responseXML&&T.responseXML.documentElement.nodeName==="parsererror";if(T.responseType===""&&!E)return T.responseXML}catch{}return null}function x(){}return Ms.exports}var V2=R2();const xh=fr(V2);var bo={exports:{}},Co,Ec;function F2(){if(Ec)return Co;Ec=1;var r=Ch(),e=Object.create||(function(){function C(){}return function(k){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return C.prototype=k,new C}})();function i(C,k){this.name="ParsingError",this.code=C.code,this.message=k||C.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 n(C){function k(z,B,R,V){return(z|0)*3600+(B|0)*60+(R|0)+(V|0)/1e3}var P=C.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return P?P[3]?k(P[1],P[2],P[3].replace(":",""),P[4]):P[1]>59?k(P[1],P[2],0,P[4]):k(0,P[1],P[2],P[4]):null}function s(){this.values=e(null)}s.prototype={set:function(C,k){!this.get(C)&&k!==""&&(this.values[C]=k)},get:function(C,k,P){return P?this.has(C)?this.values[C]:k[P]:this.has(C)?this.values[C]:k},has:function(C){return C in this.values},alt:function(C,k,P){for(var z=0;z<P.length;++z)if(k===P[z]){this.set(C,k);break}},integer:function(C,k){/^-?\d+$/.test(k)&&this.set(C,parseInt(k,10))},percent:function(C,k){return k.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(k=parseFloat(k),k>=0&&k<=100)?(this.set(C,k),!0):!1}};function a(C,k,P,z){var B=z?C.split(z):[C];for(var R in B)if(typeof B[R]=="string"){var V=B[R].split(P);if(V.length===2){var te=V[0].trim(),ee=V[1].trim();k(te,ee)}}}function o(C,k,P){var z=C;function B(){var te=n(C);if(te===null)throw new i(i.Errors.BadTimeStamp,"Malformed timestamp: "+z);return C=C.replace(/^[^\sa-zA-Z-]+/,""),te}function R(te,ee){var q=new s;a(te,function(j,J){switch(j){case"region":for(var se=P.length-1;se>=0;se--)if(P[se].id===J){q.set(j,P[se].region);break}break;case"vertical":q.alt(j,J,["rl","lr"]);break;case"line":var Q=J.split(","),ie=Q[0];q.integer(j,ie),q.percent(j,ie)&&q.set("snapToLines",!1),q.alt(j,ie,["auto"]),Q.length===2&&q.alt("lineAlign",Q[1],["start","center","end"]);break;case"position":Q=J.split(","),q.percent(j,Q[0]),Q.length===2&&q.alt("positionAlign",Q[1],["start","center","end"]);break;case"size":q.percent(j,J);break;case"align":q.alt(j,J,["start","center","end","left","right"]);break}},/:/,/\s/),ee.region=q.get("region",null),ee.vertical=q.get("vertical","");try{ee.line=q.get("line","auto")}catch{}ee.lineAlign=q.get("lineAlign","start"),ee.snapToLines=q.get("snapToLines",!0),ee.size=q.get("size",100);try{ee.align=q.get("align","center")}catch{ee.align=q.get("align","middle")}try{ee.position=q.get("position","auto")}catch{ee.position=q.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},ee.align)}ee.positionAlign=q.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},ee.align)}function V(){C=C.replace(/^\s+/,"")}if(V(),k.startTime=B(),V(),C.substr(0,3)!=="-->")throw new i(i.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+z);C=C.substr(3),V(),k.endTime=B(),V(),R(C,k)}var l=r.createElement&&r.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={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)"},m={v:"title",lang:"lang"},g={rt:"ruby"};function x(C,k){function P(){if(!k)return null;function ie(Z){return k=k.substr(Z.length),Z}var K=k.match(/^([^<]*)(<[^>]*>?)?/);return ie(K[1]?K[1]:K[2])}function z(ie){return l.innerHTML=ie,ie=l.textContent,l.textContent="",ie}function B(ie,K){return!g[K.localName]||g[K.localName]===ie.localName}function R(ie,K){var Z=c[ie];if(!Z)return null;var oe=C.document.createElement(Z),ge=m[ie];return ge&&K&&(oe[ge]=K.trim()),oe}for(var V=C.document.createElement("div"),te=V,ee,q=[];(ee=P())!==null;){if(ee[0]==="<"){if(ee[1]==="/"){q.length&&q[q.length-1]===ee.substr(2).replace(">","")&&(q.pop(),te=te.parentNode);continue}var j=n(ee.substr(1,ee.length-2)),J;if(j){J=C.document.createProcessingInstruction("timestamp",j),te.appendChild(J);continue}var se=ee.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!se||(J=R(se[1],se[3]),!J)||!B(te,J))continue;if(se[2]){var Q=se[2].split(".");Q.forEach(function(ie){var K=/^bg_/.test(ie),Z=K?ie.slice(3):ie;if(d.hasOwnProperty(Z)){var oe=K?"background-color":"color",ge=d[Z];J.style[oe]=ge}}),J.className=Q.join(" ")}q.push(se[1]),te.appendChild(J),te=J;continue}te.appendChild(C.document.createTextNode(z(ee)))}return V}var T=[[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 E(C){for(var k=0;k<T.length;k++){var P=T[k];if(C>=P[0]&&C<=P[1])return!0}return!1}function v(C){var k=[],P="",z;if(!C||!C.childNodes)return"ltr";function B(te,ee){for(var q=ee.childNodes.length-1;q>=0;q--)te.push(ee.childNodes[q])}function R(te){if(!te||!te.length)return null;var ee=te.pop(),q=ee.textContent||ee.innerText;if(q){var j=q.match(/^.*(\n|\r)/);return j?(te.length=0,j[0]):q}if(ee.tagName==="ruby")return R(te);if(ee.childNodes)return B(te,ee),R(te)}for(B(k,C);P=R(k);)for(var V=0;V<P.length;V++)if(z=P.charCodeAt(V),E(z))return"rtl";return"ltr"}function b(C){if(typeof C.line=="number"&&(C.snapToLines||C.line>=0&&C.line<=100))return C.line;if(!C.track||!C.track.textTrackList||!C.track.textTrackList.mediaElement)return-1;for(var k=C.track,P=k.textTrackList,z=0,B=0;B<P.length&&P[B]!==k;B++)P[B].mode==="showing"&&z++;return++z*-1}function D(){}D.prototype.applyStyles=function(C,k){k=k||this.div;for(var P in C)C.hasOwnProperty(P)&&(k.style[P]=C[P])},D.prototype.formatStyle=function(C,k){return C===0?0:C+k};function N(C,k,P){D.call(this),this.cue=k,this.cueDiv=x(C,k.text);var z={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:k.vertical===""?"horizontal-tb":k.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(z,this.cueDiv),this.div=C.document.createElement("div"),z={direction:v(this.cueDiv),writingMode:k.vertical===""?"horizontal-tb":k.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:k.align==="middle"?"center":k.align,font:P.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(z),this.div.appendChild(this.cueDiv);var B=0;switch(k.positionAlign){case"start":case"line-left":B=k.position;break;case"center":B=k.position-k.size/2;break;case"end":case"line-right":B=k.position-k.size;break}k.vertical===""?this.applyStyles({left:this.formatStyle(B,"%"),width:this.formatStyle(k.size,"%")}):this.applyStyles({top:this.formatStyle(B,"%"),height:this.formatStyle(k.size,"%")}),this.move=function(R){this.applyStyles({top:this.formatStyle(R.top,"px"),bottom:this.formatStyle(R.bottom,"px"),left:this.formatStyle(R.left,"px"),right:this.formatStyle(R.right,"px"),height:this.formatStyle(R.height,"px"),width:this.formatStyle(R.width,"px")})}}N.prototype=e(D.prototype),N.prototype.constructor=N;function w(C){var k,P,z,B;if(C.div){P=C.div.offsetHeight,z=C.div.offsetWidth,B=C.div.offsetTop;var R=(R=C.div.childNodes)&&(R=R[0])&&R.getClientRects&&R.getClientRects();C=C.div.getBoundingClientRect(),k=R?Math.max(R[0]&&R[0].height||0,C.height/R.length):0}this.left=C.left,this.right=C.right,this.top=C.top||B,this.height=C.height||P,this.bottom=C.bottom||B+(C.height||P),this.width=C.width||z,this.lineHeight=k!==void 0?k:C.lineHeight}w.prototype.move=function(C,k){switch(k=k!==void 0?k:this.lineHeight,C){case"+x":this.left+=k,this.right+=k;break;case"-x":this.left-=k,this.right-=k;break;case"+y":this.top+=k,this.bottom+=k;break;case"-y":this.top-=k,this.bottom-=k;break}},w.prototype.overlaps=function(C){return this.left<C.right&&this.right>C.left&&this.top<C.bottom&&this.bottom>C.top},w.prototype.overlapsAny=function(C){for(var k=0;k<C.length;k++)if(this.overlaps(C[k]))return!0;return!1},w.prototype.within=function(C){return this.top>=C.top&&this.bottom<=C.bottom&&this.left>=C.left&&this.right<=C.right},w.prototype.overlapsOppositeAxis=function(C,k){switch(k){case"+x":return this.left<C.left;case"-x":return this.right>C.right;case"+y":return this.top<C.top;case"-y":return this.bottom>C.bottom}},w.prototype.intersectPercentage=function(C){var k=Math.max(0,Math.min(this.right,C.right)-Math.max(this.left,C.left)),P=Math.max(0,Math.min(this.bottom,C.bottom)-Math.max(this.top,C.top)),z=k*P;return z/(this.height*this.width)},w.prototype.toCSSCompatValues=function(C){return{top:this.top-C.top,bottom:C.bottom-this.bottom,left:this.left-C.left,right:C.right-this.right,height:this.height,width:this.width}},w.getSimpleBoxPosition=function(C){var k=C.div?C.div.offsetHeight:C.tagName?C.offsetHeight:0,P=C.div?C.div.offsetWidth:C.tagName?C.offsetWidth:0,z=C.div?C.div.offsetTop:C.tagName?C.offsetTop:0;C=C.div?C.div.getBoundingClientRect():C.tagName?C.getBoundingClientRect():C;var B={left:C.left,right:C.right,top:C.top||z,height:C.height||k,bottom:C.bottom||z+(C.height||k),width:C.width||P};return B};function $(C,k,P,z){function B(Z,oe){for(var ge,Ne=new w(Z),be=1,Le=0;Le<oe.length;Le++){for(;Z.overlapsOppositeAxis(P,oe[Le])||Z.within(P)&&Z.overlapsAny(z);)Z.move(oe[Le]);if(Z.within(P))return Z;var qe=Z.intersectPercentage(P);be>qe&&(ge=new w(Z),be=qe),Z=new w(Ne)}return ge||Ne}var R=new w(k),V=k.cue,te=b(V),ee=[];if(V.snapToLines){var q;switch(V.vertical){case"":ee=["+y","-y"],q="height";break;case"rl":ee=["+x","-x"],q="width";break;case"lr":ee=["-x","+x"],q="width";break}var j=R.lineHeight,J=j*Math.round(te),se=P[q]+j,Q=ee[0];Math.abs(J)>se&&(J=J<0?-1:1,J*=Math.ceil(se/j)*j),te<0&&(J+=V.vertical===""?P.height:P.width,ee=ee.reverse()),R.move(Q,J)}else{var ie=R.lineHeight/P.height*100;switch(V.lineAlign){case"center":te-=ie/2;break;case"end":te-=ie;break}switch(V.vertical){case"":k.applyStyles({top:k.formatStyle(te,"%")});break;case"rl":k.applyStyles({left:k.formatStyle(te,"%")});break;case"lr":k.applyStyles({right:k.formatStyle(te,"%")});break}ee=["+y","-x","+x","-y"],R=new w(k)}var K=B(R,ee);k.move(K.toCSSCompatValues(P))}function F(){}F.StringDecoder=function(){return{decode:function(C){if(!C)return"";if(typeof C!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(C))}}},F.convertCueToDOMTree=function(C,k){return!C||!k?null:x(C,k)};var H=.05,O="sans-serif",U="1.5%";return F.processCues=function(C,k,P){if(!C||!k||!P)return null;for(;P.firstChild;)P.removeChild(P.firstChild);var z=C.document.createElement("div");z.style.position="absolute",z.style.left="0",z.style.right="0",z.style.top="0",z.style.bottom="0",z.style.margin=U,P.appendChild(z);function B(j){for(var J=0;J<j.length;J++)if(j[J].hasBeenReset||!j[J].displayState)return!0;return!1}if(!B(k)){for(var R=0;R<k.length;R++)z.appendChild(k[R].displayState);return}var V=[],te=w.getSimpleBoxPosition(z),ee=Math.round(te.height*H*100)/100,q={font:ee+"px "+O};(function(){for(var j,J,se=0;se<k.length;se++)J=k[se],j=new N(C,J,q),z.appendChild(j.div),$(C,j,te,V),J.displayState=j.div,V.push(w.getSimpleBoxPosition(j))})()},F.Parser=function(C,k,P){P||(P=k,k={}),k||(k={}),this.window=C,this.vttjs=k,this.state="INITIAL",this.buffer="",this.decoder=P||new TextDecoder("utf8"),this.regionList=[]},F.Parser.prototype={reportOrThrowError:function(C){if(C instanceof i)this.onparsingerror&&this.onparsingerror(C);else throw C},parse:function(C){var k=this;C&&(k.buffer+=k.decoder.decode(C,{stream:!0}));function P(){for(var j=k.buffer,J=0;J<j.length&&j[J]!=="\r"&&j[J]!==`
|
|
14
|
+
`;)++J;var se=j.substr(0,J);return j[J]==="\r"&&++J,j[J]===`
|
|
15
|
+
`&&++J,k.buffer=j.substr(J),se}function z(j){var J=new s;if(a(j,function(Q,ie){switch(Q){case"id":J.set(Q,ie);break;case"width":J.percent(Q,ie);break;case"lines":J.integer(Q,ie);break;case"regionanchor":case"viewportanchor":var K=ie.split(",");if(K.length!==2)break;var Z=new s;if(Z.percent("x",K[0]),Z.percent("y",K[1]),!Z.has("x")||!Z.has("y"))break;J.set(Q+"X",Z.get("x")),J.set(Q+"Y",Z.get("y"));break;case"scroll":J.alt(Q,ie,["up"]);break}},/=/,/\s/),J.has("id")){var se=new(k.vttjs.VTTRegion||k.window.VTTRegion);se.width=J.get("width",100),se.lines=J.get("lines",3),se.regionAnchorX=J.get("regionanchorX",0),se.regionAnchorY=J.get("regionanchorY",100),se.viewportAnchorX=J.get("viewportanchorX",0),se.viewportAnchorY=J.get("viewportanchorY",100),se.scroll=J.get("scroll",""),k.onregion&&k.onregion(se),k.regionList.push({id:J.get("id"),region:se})}}function B(j){var J=new s;a(j,function(se,Q){switch(se){case"MPEGT":J.integer(se+"S",Q);break;case"LOCA":J.set(se+"L",n(Q));break}},/[^\d]:/,/,/),k.ontimestampmap&&k.ontimestampmap({MPEGTS:J.get("MPEGTS"),LOCAL:J.get("LOCAL")})}function R(j){j.match(/X-TIMESTAMP-MAP/)?a(j,function(J,se){switch(J){case"X-TIMESTAMP-MAP":B(se);break}},/=/):a(j,function(J,se){switch(J){case"Region":z(se);break}},/:/)}try{var V;if(k.state==="INITIAL"){if(!/\r\n|\n/.test(k.buffer))return this;V=P();var te=V.match(/^WEBVTT([ \t].*)?$/);if(!te||!te[0])throw new i(i.Errors.BadSignature);k.state="HEADER"}for(var ee=!1;k.buffer;){if(!/\r\n|\n/.test(k.buffer))return this;switch(ee?ee=!1:V=P(),k.state){case"HEADER":/:/.test(V)?R(V):V||(k.state="ID");continue;case"NOTE":V||(k.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(V)){k.state="NOTE";break}if(!V)continue;k.cue=new(k.vttjs.VTTCue||k.window.VTTCue)(0,0,"");try{k.cue.align="center"}catch{k.cue.align="middle"}if(k.state="CUE",V.indexOf("-->")===-1){k.cue.id=V;continue}case"CUE":try{o(V,k.cue,k.regionList)}catch(j){k.reportOrThrowError(j),k.cue=null,k.state="BADCUE";continue}k.state="CUETEXT";continue;case"CUETEXT":var q=V.indexOf("-->")!==-1;if(!V||q&&(ee=!0)){k.oncue&&k.oncue(k.cue),k.cue=null,k.state="ID";continue}k.cue.text&&(k.cue.text+=`
|
|
16
|
+
`),k.cue.text+=V.replace(/\u2028/g,`
|
|
17
|
+
`).replace(/u2029/g,`
|
|
18
|
+
`);continue;case"BADCUE":V||(k.state="ID");continue}}}catch(j){k.reportOrThrowError(j),k.state==="CUETEXT"&&k.cue&&k.oncue&&k.oncue(k.cue),k.cue=null,k.state=k.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var C=this;try{if(C.buffer+=C.decoder.decode(),(C.cue||C.state==="HEADER")&&(C.buffer+=`
|
|
19
|
+
|
|
20
|
+
`,C.parse()),C.state==="INITIAL")throw new i(i.Errors.BadSignature)}catch(k){C.reportOrThrowError(k)}return C.onflush&&C.onflush(),this}},Co=F,Co}var xo,kc;function $2(){if(kc)return xo;kc=1;var r="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 n(o){if(typeof o!="string")return!1;var l=e[o.toLowerCase()];return l?o.toLowerCase():!1}function s(o){if(typeof o!="string")return!1;var l=i[o.toLowerCase()];return l?o.toLowerCase():!1}function a(o,l,c){this.hasBeenReset=!1;var d="",m=!1,g=o,x=l,T=c,E=null,v="",b=!0,D="auto",N="start",w="auto",$="auto",F=100,H="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return d},set:function(O){d=""+O}},pauseOnExit:{enumerable:!0,get:function(){return m},set:function(O){m=!!O}},startTime:{enumerable:!0,get:function(){return g},set:function(O){if(typeof O!="number")throw new TypeError("Start time must be set to a number.");g=O,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return x},set:function(O){if(typeof O!="number")throw new TypeError("End time must be set to a number.");x=O,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return T},set:function(O){T=""+O,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return E},set:function(O){E=O,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return v},set:function(O){var U=n(O);if(U===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");v=U,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return b},set:function(O){b=!!O,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return D},set:function(O){if(typeof O!="number"&&O!==r)throw new SyntaxError("Line: an invalid number or illegal string was specified.");D=O,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return N},set:function(O){var U=s(O);U?(N=U,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return w},set:function(O){if(O<0||O>100)throw new Error("Position must be between 0 and 100.");w=O,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return $},set:function(O){var U=s(O);U?($=U,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return F},set:function(O){if(O<0||O>100)throw new Error("Size must be between 0 and 100.");F=O,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return H},set:function(O){var U=s(O);if(!U)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");H=U,this.hasBeenReset=!0}}}),this.displayState=void 0}return a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},xo=a,xo}var So,wc;function U2(){if(wc)return So;wc=1;var r={"":!0,up:!0};function e(s){if(typeof s!="string")return!1;var a=r[s.toLowerCase()];return a?s.toLowerCase():!1}function i(s){return typeof s=="number"&&s>=0&&s<=100}function n(){var s=100,a=3,o=0,l=100,c=0,d=100,m="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(g){if(!i(g))throw new Error("Width must be between 0 and 100.");s=g}},lines:{enumerable:!0,get:function(){return a},set:function(g){if(typeof g!="number")throw new TypeError("Lines must be set to a number.");a=g}},regionAnchorY:{enumerable:!0,get:function(){return l},set:function(g){if(!i(g))throw new Error("RegionAnchorX must be between 0 and 100.");l=g}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(g){if(!i(g))throw new Error("RegionAnchorY must be between 0 and 100.");o=g}},viewportAnchorY:{enumerable:!0,get:function(){return d},set:function(g){if(!i(g))throw new Error("ViewportAnchorY must be between 0 and 100.");d=g}},viewportAnchorX:{enumerable:!0,get:function(){return c},set:function(g){if(!i(g))throw new Error("ViewportAnchorX must be between 0 and 100.");c=g}},scroll:{enumerable:!0,get:function(){return m},set:function(g){var x=e(g);x===!1?console.warn("Scroll: an invalid or illegal string was specified."):m=x}}})}return So=n,So}var Dc;function z2(){if(Dc)return bo.exports;Dc=1;var r=Sa(),e=bo.exports={WebVTT:F2(),VTTCue:$2(),VTTRegion:U2()};r.vttjs=e,r.WebVTT=e.WebVTT;var i=e.VTTCue,n=e.VTTRegion,s=r.VTTCue,a=r.VTTRegion;return e.shim=function(){r.VTTCue=i,r.VTTRegion=n},e.restore=function(){r.VTTCue=s,r.VTTRegion=a},r.VTTCue||e.shim(),bo.exports}var H2=z2();const Ac=fr(H2);function St(){return St=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(r[n]=i[n])}return r},St.apply(null,arguments)}var Ic="https://example.com",Ea=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=W.location&&W.location.href||"");var n=/^\/\//.test(e),s=!W.location&&!/\/\//i.test(e);e=new W.URL(e,W.location||Ic);var a=new URL(i,e);return s?a.href.slice(Ic.length):n?a.href.slice(a.protocol.length):a.href},Al=(function(){function r(){this.listeners={}}var e=r.prototype;return e.on=function(n,s){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(s)},e.off=function(n,s){if(!this.listeners[n])return!1;var a=this.listeners[n].indexOf(s);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(a,1),a>-1},e.trigger=function(n){var s=this.listeners[n];if(s)if(arguments.length===2)for(var a=s.length,o=0;o<a;++o)s[o].call(this,arguments[1]);else for(var l=Array.prototype.slice.call(arguments,1),c=s.length,d=0;d<c;++d)s[d].apply(this,l)},e.dispose=function(){this.listeners={}},e.pipe=function(n){this.on("data",function(s){n.push(s)})},r})(),q2=function(e){return W.atob?W.atob(e):Buffer.from(e,"base64").toString("binary")};function Sh(r){for(var e=q2(r),i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class j2 extends Al{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 G2=" ",Eo=function(r){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(r||""),i={};return e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),i},W2=function(){const i="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+i+")")},Zt=function(r){const e={};if(!r)return e;const i=r.split(W2());let n=i.length,s;for(;n--;)i[n]!==""&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^['"](.*)['"]$/g,"$1"),e[s[0]]=s[1]);return e},Nc=r=>{const e=r.split("x"),i={};return e[0]&&(i.width=parseInt(e[0],10)),e[1]&&(i.height=parseInt(e[1],10)),i};class Y2 extends Al{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let i,n;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((a,o)=>{const l=o(e);return l===e?a:a.concat([l])},[e]).forEach(a=>{for(let o=0;o<this.customParsers.length;o++)if(this.customParsers[o].call(this,a))return;if(a.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:a.slice(1)});return}if(a=a.replace("\r",""),i=/^#EXTM3U/.exec(a),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(a),i){n={type:"tag",tagType:"inf"},i[1]&&(n.duration=parseFloat(i[1])),i[2]&&(n.title=i[2]),this.trigger("data",n);return}if(i=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(a),i){n={type:"tag",tagType:"targetduration"},i[1]&&(n.duration=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-VERSION:([0-9.]*)?/.exec(a),i){n={type:"tag",tagType:"version"},i[1]&&(n.version=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(a),i){n={type:"tag",tagType:"media-sequence"},i[1]&&(n.number=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(a),i){n={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(n.number=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(a),i){n={type:"tag",tagType:"playlist-type"},i[1]&&(n.playlistType=i[1]),this.trigger("data",n);return}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(a),i){n=St(Eo(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",n);return}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(a),i){n={type:"tag",tagType:"allow-cache"},i[1]&&(n.allowed=!/NO/.test(i[1])),this.trigger("data",n);return}if(i=/^#EXT-X-MAP:(.*)$/.exec(a),i){if(n={type:"tag",tagType:"map"},i[1]){const o=Zt(i[1]);o.URI&&(n.uri=o.URI),o.BYTERANGE&&(n.byterange=Eo(o.BYTERANGE))}this.trigger("data",n);return}if(i=/^#EXT-X-STREAM-INF:(.*)$/.exec(a),i){n={type:"tag",tagType:"stream-inf"},i[1]&&(n.attributes=Zt(i[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Nc(n.attributes.RESOLUTION)),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))),this.trigger("data",n);return}if(i=/^#EXT-X-MEDIA:(.*)$/.exec(a),i){n={type:"tag",tagType:"media"},i[1]&&(n.attributes=Zt(i[1])),this.trigger("data",n);return}if(i=/^#EXT-X-ENDLIST/.exec(a),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(a),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(a),i){n={type:"tag",tagType:"program-date-time"},i[1]&&(n.dateTimeString=i[1],n.dateTimeObject=new Date(i[1])),this.trigger("data",n);return}if(i=/^#EXT-X-KEY:(.*)$/.exec(a),i){n={type:"tag",tagType:"key"},i[1]&&(n.attributes=Zt(i[1]),n.attributes.IV&&(n.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),this.trigger("data",n);return}if(i=/^#EXT-X-START:(.*)$/.exec(a),i){n={type:"tag",tagType:"start"},i[1]&&(n.attributes=Zt(i[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),this.trigger("data",n);return}if(i=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(a),i){n={type:"tag",tagType:"cue-out-cont"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return}if(i=/^#EXT-X-CUE-OUT:(.*)?$/.exec(a),i){n={type:"tag",tagType:"cue-out"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(a),i){n={type:"tag",tagType:"cue-in"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return}if(i=/^#EXT-X-SKIP:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"skip"},n.attributes=Zt(i[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(G2)),this.trigger("data",n);return}if(i=/^#EXT-X-PART:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"part"},n.attributes=Zt(i[1]),["DURATION"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),["INDEPENDENT","GAP"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=/YES/.test(n.attributes[o]))}),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=Eo(n.attributes.BYTERANGE)),this.trigger("data",n);return}if(i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"server-control"},n.attributes=Zt(i[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=/YES/.test(n.attributes[o]))}),this.trigger("data",n);return}if(i=/^#EXT-X-PART-INF:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"part-inf"},n.attributes=Zt(i[1]),["PART-TARGET"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),this.trigger("data",n);return}if(i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"preload-hint"},n.attributes=Zt(i[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(o){if(n.attributes.hasOwnProperty(o)){n.attributes[o]=parseInt(n.attributes[o],10);const l=o==="BYTERANGE-LENGTH"?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[l]=n.attributes[o],delete n.attributes[o]}}),this.trigger("data",n);return}if(i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"rendition-report"},n.attributes=Zt(i[1]),["LAST-MSN","LAST-PART"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseInt(n.attributes[o],10))}),this.trigger("data",n);return}if(i=/^#EXT-X-DATERANGE:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"daterange"},n.attributes=Zt(i[1]),["ID","CLASS"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=String(n.attributes[l]))}),["START-DATE","END-DATE"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=new Date(n.attributes[l]))}),["DURATION","PLANNED-DURATION"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=parseFloat(n.attributes[l]))}),["END-ON-NEXT"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=/YES/i.test(n.attributes[l]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=n.attributes[l].toString(16))});const o=/^X-([A-Z]+-)+[A-Z]+$/;for(const l in n.attributes){if(!o.test(l))continue;const c=/[0-9A-Fa-f]{6}/g.test(n.attributes[l]),d=/^\d+(\.\d+)?$/.test(n.attributes[l]);n.attributes[l]=c?n.attributes[l].toString(16):d?parseFloat(n.attributes[l]):String(n.attributes[l])}this.trigger("data",n);return}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(a),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(a),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(a),i){n={type:"tag",tagType:"content-steering"},n.attributes=Zt(i[1]),this.trigger("data",n);return}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(a),i){n={type:"tag",tagType:"i-frame-playlist"},n.attributes=Zt(i[1]),n.attributes.URI&&(n.uri=n.attributes.URI),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Nc(n.attributes.RESOLUTION)),n.attributes["AVERAGE-BANDWIDTH"]&&(n.attributes["AVERAGE-BANDWIDTH"]=parseInt(n.attributes["AVERAGE-BANDWIDTH"],10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),this.trigger("data",n);return}if(i=/^#EXT-X-DEFINE:(.*)$/.exec(a),i){n={type:"tag",tagType:"define"},n.attributes=Zt(i[1]),this.trigger("data",n);return}this.trigger("data",{type:"tag",data:a.slice(4)})})}addParser({expression:e,customType:i,dataParser:n,segment:s}){typeof n!="function"&&(n=a=>a),this.customParsers.push(a=>{if(e.exec(a))return this.trigger("data",{type:"custom",data:n(a),customType:i,segment:s}),!0})}addTagMapper({expression:e,map:i}){const n=s=>e.test(s)?i(s):s;this.tagMappers.push(n)}}const X2=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),cn=function(r){const e={};return Object.keys(r).forEach(function(i){e[X2(i)]=r[i]}),e},ko=function(r){const{serverControl:e,targetDuration:i,partTargetDuration:n}=r;if(!e)return;const s="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",l=i&&i*3,c=n&&n*2;i&&!e.hasOwnProperty(a)&&(e[a]=l,this.trigger("info",{message:`${s} defaulting HOLD-BACK to targetDuration * 3 (${l}).`})),l&&e[a]<l&&(this.trigger("warn",{message:`${s} clamping HOLD-BACK (${e[a]}) to targetDuration * 3 (${l})`}),e[a]=l),n&&!e.hasOwnProperty(o)&&(e[o]=n*3,this.trigger("info",{message:`${s} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[o]}).`})),n&&e[o]<c&&(this.trigger("warn",{message:`${s} clamping PART-HOLD-BACK (${e[o]}) to partTargetDuration * 2 (${c}).`}),e[o]=c)};class K2 extends Al{constructor(e={}){super(),this.lineStream=new j2,this.parseStream=new Y2,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,n=[];let s={},a,o,l=!1;const c=function(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},m="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let g=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let x=0,T=0;const E={};this.on("end",()=>{s.uri||!s.parts&&!s.preloadHints||(!s.map&&a&&(s.map=a),!s.key&&o&&(s.key=o),!s.timeline&&typeof g=="number"&&(s.timeline=g),this.manifest.preloadSegment=s)}),this.parseStream.on("data",function(v){let b,D;if(i.manifest.definitions){for(const N in i.manifest.definitions)if(v.uri&&(v.uri=v.uri.replace(`{$${N}}`,i.manifest.definitions[N])),v.attributes)for(const w in v.attributes)typeof v.attributes[w]=="string"&&(v.attributes[w]=v.attributes[w].replace(`{$${N}}`,i.manifest.definitions[N]))}({tag(){({version(){v.version&&(this.manifest.version=v.version)},"allow-cache"(){this.manifest.allowCache=v.allowed,"allowed"in v||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const N={};"length"in v&&(s.byterange=N,N.length=v.length,"offset"in v||(v.offset=x)),"offset"in v&&(s.byterange=N,N.offset=v.offset),x=N.offset+N.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"})),v.title&&(s.title=v.title),v.duration>0&&(s.duration=v.duration),v.duration===0&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(!v.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(v.attributes.METHOD==="NONE"){o=null;return}if(!v.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(v.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:v.attributes};return}if(v.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:v.attributes.URI};return}if(v.attributes.KEYFORMAT===m){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(v.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(v.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),v.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(v.attributes.KEYID&&v.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:v.attributes.KEYFORMAT,keyId:v.attributes.KEYID.substring(2)},pssh:Sh(v.attributes.URI.split(",")[1])};return}v.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:v.attributes.METHOD||"AES-128",uri:v.attributes.URI},typeof v.attributes.IV<"u"&&(o.iv=v.attributes.IV)},"media-sequence"(){if(!isFinite(v.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+v.number});return}this.manifest.mediaSequence=v.number},"discontinuity-sequence"(){if(!isFinite(v.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+v.number});return}this.manifest.discontinuitySequence=v.number,g=v.number},"playlist-type"(){if(!/VOD|EVENT/.test(v.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+v.playlist});return}this.manifest.playlistType=v.playlistType},map(){a={},v.uri&&(a.uri=v.uri),v.byterange&&(a.byterange=v.byterange),o&&(a.key=o)},"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||d,!v.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}s.attributes||(s.attributes={}),St(s.attributes,v.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,!(v.attributes&&v.attributes.TYPE&&v.attributes["GROUP-ID"]&&v.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const N=this.manifest.mediaGroups[v.attributes.TYPE];N[v.attributes["GROUP-ID"]]=N[v.attributes["GROUP-ID"]]||{},b=N[v.attributes["GROUP-ID"]],D={default:/yes/i.test(v.attributes.DEFAULT)},D.default?D.autoselect=!0:D.autoselect=/yes/i.test(v.attributes.AUTOSELECT),v.attributes.LANGUAGE&&(D.language=v.attributes.LANGUAGE),v.attributes.URI&&(D.uri=v.attributes.URI),v.attributes["INSTREAM-ID"]&&(D.instreamId=v.attributes["INSTREAM-ID"]),v.attributes.CHARACTERISTICS&&(D.characteristics=v.attributes.CHARACTERISTICS),v.attributes.FORCED&&(D.forced=/yes/i.test(v.attributes.FORCED)),b[v.attributes.NAME]=D},discontinuity(){g+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=v.dateTimeString,this.manifest.dateTimeObject=v.dateTimeObject),s.dateTimeString=v.dateTimeString,s.dateTimeObject=v.dateTimeObject;const{lastProgramDateTime:N}=this;this.lastProgramDateTime=new Date(v.dateTimeString).getTime(),N===null&&this.manifest.segments.reduceRight((w,$)=>($.programDateTime=w-$.duration*1e3,$.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(v.duration)||v.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+v.duration});return}this.manifest.targetDuration=v.duration,ko.call(this,this.manifest)},start(){if(!v.attributes||isNaN(v.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:v.attributes["TIME-OFFSET"],precise:v.attributes.PRECISE}},"cue-out"(){s.cueOut=v.data},"cue-out-cont"(){s.cueOutCont=v.data},"cue-in"(){s.cueIn=v.data},skip(){this.manifest.skip=cn(v.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",v.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const N=this.manifest.segments.length,w=cn(v.attributes);s.parts=s.parts||[],s.parts.push(w),w.byterange&&(w.byterange.hasOwnProperty("offset")||(w.byterange.offset=T),T=w.byterange.offset+w.byterange.length);const $=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${$} for segment #${N}`,v.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((F,H)=>{F.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${H} lacks required attribute(s): LAST-PART`})})},"server-control"(){const N=this.manifest.serverControl=cn(v.attributes);N.hasOwnProperty("canBlockReload")||(N.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),ko.call(this,this.manifest),N.canSkipDateranges&&!N.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 N=this.manifest.segments.length,w=cn(v.attributes),$=w.type&&w.type==="PART";s.preloadHints=s.preloadHints||[],s.preloadHints.push(w),w.byterange&&(w.byterange.hasOwnProperty("offset")||(w.byterange.offset=$?T:0,$&&(T=w.byterange.offset+w.byterange.length)));const F=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${F} for segment #${N}`,v.attributes,["TYPE","URI"]),!!w.type)for(let H=0;H<s.preloadHints.length-1;H++){const O=s.preloadHints[H];O.type&&O.type===w.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${F} for segment #${N} has the same TYPE ${w.type} as preload hint #${H}`})}},"rendition-report"(){const N=cn(v.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(N);const w=this.manifest.renditionReports.length-1,$=["LAST-MSN","URI"];l&&$.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${w}`,v.attributes,$)},"part-inf"(){this.manifest.partInf=cn(v.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",v.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),ko.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(cn(v.attributes));const N=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${N}`,v.attributes,["ID","START-DATE"]);const w=this.manifest.dateRanges[N];w.endDate&&w.startDate&&new Date(w.endDate)<new Date(w.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),w.duration&&w.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),w.plannedDuration&&w.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const $=!!w.endOnNext;if($&&!w.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),$&&(w.duration||w.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),w.duration&&w.endDate){const H=w.startDate.getTime()+w.duration*1e3;this.manifest.dateRanges[N].endDate=new Date(H)}if(!E[w.id])E[w.id]=w;else{for(const H in E[w.id])if(w[H]&&JSON.stringify(E[w.id][H])!==JSON.stringify(w[H])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const F=this.manifest.dateRanges.findIndex(H=>H.id===w.id);this.manifest.dateRanges[F]=St(this.manifest.dateRanges[F],w),E[w.id]=St(E[w.id],w),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(v.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",v.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const N=(w,$)=>{if(w in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${w}`});return}this.manifest.definitions[w]=$};if("QUERYPARAM"in v.attributes){if("NAME"in v.attributes||"IMPORT"in v.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const w=this.params.get(v.attributes.QUERYPARAM);if(!w){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${v.attributes.QUERYPARAM}`});return}N(v.attributes.QUERYPARAM,decodeURIComponent(w));return}if("NAME"in v.attributes){if("IMPORT"in v.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in v.attributes)||typeof v.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${v.attributes.NAME}`});return}N(v.attributes.NAME,v.attributes.VALUE);return}if("IMPORT"in v.attributes){if(!this.mainDefinitions[v.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${v.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}N(v.attributes.IMPORT,this.mainDefinitions[v.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:v.attributes,uri:v.uri,timeline:g}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",v.attributes,["BANDWIDTH","URI"])}}[v.tagType]||c).call(i)},uri(){s.uri=v.uri,n.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),o&&(s.key=o),s.timeline=g,a&&(s.map=a),T=0,this.lastProgramDateTime!==null&&(s.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=s.duration*1e3),s={}},comment(){},custom(){v.segment?(s.custom=s.custom||{},s.custom[v.customType]=v.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[v.customType]=v.data)}})[v.type].call(i)})}requiredCompatibilityversion(e,i){(e<i||!e)&&this.trigger("warn",{message:`manifest must be at least version ${i}`})}warnOnMissingAttributes_(e,i,n){const s=[];n.forEach(function(a){i.hasOwnProperty(a)||s.push(a)}),s.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${s.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 Bn={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^/},Q2=["video","audio","text"],Oc=["Video","Audio","Text"],Eh=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,n,s){var a=("00"+Number(n).toString(16)).slice(-2),o=("00"+Number(s).toString(16)).slice(-2);return"avc1."+a+"00"+o})},Fi=function(e){e===void 0&&(e="");var i=e.split(","),n=[];return i.forEach(function(s){s=s.trim();var a;Q2.forEach(function(o){var l=Bn[o].exec(s.toLowerCase());if(!(!l||l.length<=1)){a=o;var c=s.substring(0,l[1].length),d=s.replace(c,"");n.push({type:c,details:d,mediaType:o})}}),a||n.push({type:s,details:"",mediaType:"unknown"})}),n},Z2=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var n=e.mediaGroups.AUDIO[i];if(!n)return null;for(var s in n){var a=n[s];if(a.default&&a.playlists)return Fi(a.playlists[0].attributes.CODECS)}return null},kh=function(e){return e===void 0&&(e=""),Bn.audio.test(e.trim().toLowerCase())},J2=function(e){return e===void 0&&(e=""),Bn.text.test(e.trim().toLowerCase())},rr=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(a){return Eh(a.trim())}),n="video";i.length===1&&kh(i[0])?n="audio":i.length===1&&J2(i[0])&&(n="application");var s="mp4";return i.every(function(a){return Bn.mp4.test(a)})?s="mp4":i.every(function(a){return Bn.webm.test(a)})?s="webm":i.every(function(a){return Bn.ogg.test(a)})&&(s="ogg"),n+"/"+s+';codecs="'+e+'"'}},Xr=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),W.MediaSource&&W.MediaSource.isTypeSupported&&W.MediaSource.isTypeSupported(rr(e))||i&&W.ManagedMediaSource&&W.ManagedMediaSource.isTypeSupported&&W.ManagedMediaSource.isTypeSupported(rr(e))||!1},wo=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var n=0;n<Oc.length;n++){var s=Oc[n];if(Bn["muxer"+s].test(i))return!0}return!1})},Bc="mp4a.40.2",ev="avc1.4d400d",tv=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,iv=/^application\/dash\+xml/i,wh=function(e){return tv.test(e)?"hls":iv.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},nv=function(e){return e.toString(2).length},rv=function(e){return Math.ceil(nv(e)/8)},Dh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},sv=function(e){return Dh(e)},Ue=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!sv(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))},zt=W.BigInt||Number,Zo=[zt("0x1"),zt("0x100"),zt("0x10000"),zt("0x1000000"),zt("0x100000000"),zt("0x10000000000"),zt("0x1000000000000"),zt("0x100000000000000"),zt("0x10000000000000000")];(function(){var r=new Uint16Array([65484]),e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var av=function(e,i){var n=i===void 0?{}:i,s=n.signed,a=s===void 0?!1:s,o=n.le,l=o===void 0?!1:o;e=Ue(e);var c=l?"reduce":"reduceRight",d=e[c]?e[c]:Array.prototype[c],m=d.call(e,function(x,T,E){var v=l?E:Math.abs(E+1-e.length);return x+zt(T)*Zo[v]},zt(0));if(a){var g=Zo[e.length]/zt(2)-zt(1);m=zt(m),m>g&&(m-=g,m-=g,m-=zt(2))}return Number(m)},ov=function(e,i){var n={},s=n.le,a=s===void 0?!1:s;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=zt(e);for(var o=rv(e),l=new Uint8Array(new ArrayBuffer(o)),c=0;c<o;c++){var d=a?c:Math.abs(c+1-l.length);l[d]=Number(e/Zo[c]&zt(255)),e<0&&(l[d]=Math.abs(~l[d]),l[d]-=c===0?1:2)}return l},Ah=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 n=new Uint8Array(e.length),s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return n},lv=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];if(i=i.filter(function(l){return l&&(l.byteLength||l.length)&&typeof l!="string"}),i.length<=1)return Ue(i[0]);var s=i.reduce(function(l,c,d){return l+(c.byteLength||c.length)},0),a=new Uint8Array(s),o=0;return i.forEach(function(l){l=Ue(l),a.set(l,o),o+=l.byteLength}),a},ft=function(e,i,n){var s=n===void 0?{}:n,a=s.offset,o=a===void 0?0:a,l=s.mask,c=l===void 0?[]:l;e=Ue(e),i=Ue(i);var d=i.every?i.every:Array.prototype.every;return i.length&&e.length-o>=i.length&&d.call(i,function(m,g){var x=c[g]?c[g]&e[o+g]:e[o+g];return m===x})},uv=function(e,i,n){i.forEach(function(s){for(var a in e.mediaGroups[s])for(var o in e.mediaGroups[s][a]){var l=e.mediaGroups[s][a][o];n(l,s,a,o)}})},$r={},Ki={},kn={},Lc;function ka(){if(Lc)return kn;Lc=1;function r(a,o,l){if(l===void 0&&(l=Array.prototype),a&&typeof l.find=="function")return l.find.call(a,o);for(var c=0;c<a.length;c++)if(Object.prototype.hasOwnProperty.call(a,c)){var d=a[c];if(o.call(void 0,d,c,a))return d}}function e(a,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(a):a}function i(a,o){if(a===null||typeof a!="object")throw new TypeError("target is not an object");for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(a[l]=o[l]);return a}var n=e({HTML:"text/html",isHTML:function(a){return a===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(a){return a===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return kn.assign=i,kn.find=r,kn.freeze=e,kn.MIME_TYPE=n,kn.NAMESPACE=s,kn}var Pc;function Ih(){if(Pc)return Ki;Pc=1;var r=ka(),e=r.find,i=r.NAMESPACE;function n(S){return S!==""}function s(S){return S?S.split(/[\t\n\f\r ]+/).filter(n):[]}function a(S,A){return S.hasOwnProperty(A)||(S[A]=!0),S}function o(S){if(!S)return[];var A=s(S);return Object.keys(A.reduce(a,{}))}function l(S){return function(A){return S&&S.indexOf(A)!==-1}}function c(S,A){for(var X in S)Object.prototype.hasOwnProperty.call(S,X)&&(A[X]=S[X])}function d(S,A){var X=S.prototype;if(!(X instanceof A)){let le=function(){};le.prototype=A.prototype,le=new le,c(X,le),S.prototype=X=le}X.constructor!=S&&(typeof S!="function"&&console.error("unknown Class:"+S),X.constructor=S)}var m={},g=m.ELEMENT_NODE=1,x=m.ATTRIBUTE_NODE=2,T=m.TEXT_NODE=3,E=m.CDATA_SECTION_NODE=4,v=m.ENTITY_REFERENCE_NODE=5,b=m.ENTITY_NODE=6,D=m.PROCESSING_INSTRUCTION_NODE=7,N=m.COMMENT_NODE=8,w=m.DOCUMENT_NODE=9,$=m.DOCUMENT_TYPE_NODE=10,F=m.DOCUMENT_FRAGMENT_NODE=11,H=m.NOTATION_NODE=12,O={},U={};O.INDEX_SIZE_ERR=(U[1]="Index size error",1),O.DOMSTRING_SIZE_ERR=(U[2]="DOMString size error",2);var C=O.HIERARCHY_REQUEST_ERR=(U[3]="Hierarchy request error",3);O.WRONG_DOCUMENT_ERR=(U[4]="Wrong document",4);var k=O.INVALID_CHARACTER_ERR=(U[5]="Invalid character",5);O.NO_DATA_ALLOWED_ERR=(U[6]="No data allowed",6),O.NO_MODIFICATION_ALLOWED_ERR=(U[7]="No modification allowed",7);var P=O.NOT_FOUND_ERR=(U[8]="Not found",8);O.NOT_SUPPORTED_ERR=(U[9]="Not supported",9);var z=O.INUSE_ATTRIBUTE_ERR=(U[10]="Attribute in use",10);O.INVALID_STATE_ERR=(U[11]="Invalid state",11),O.SYNTAX_ERR=(U[12]="Syntax error",12),O.INVALID_MODIFICATION_ERR=(U[13]="Invalid modification",13),O.NAMESPACE_ERR=(U[14]="Invalid namespace",14),O.INVALID_ACCESS_ERR=(U[15]="Invalid access",15);function B(S,A){if(A instanceof Error)var X=A;else X=this,Error.call(this,U[S]),this.message=U[S],Error.captureStackTrace&&Error.captureStackTrace(this,B);return X.code=S,A&&(this.message=this.message+": "+A),X}B.prototype=Error.prototype,c(O,B);function R(){}R.prototype={length:0,item:function(S){return S>=0&&S<this.length?this[S]:null},toString:function(S,A){for(var X=[],le=0;le<this.length;le++)Ft(this[le],X,S,A);return X.join("")},filter:function(S){return Array.prototype.filter.call(this,S)},indexOf:function(S){return Array.prototype.indexOf.call(this,S)}};function V(S,A){this._node=S,this._refresh=A,te(this)}function te(S){var A=S._node._inc||S._node.ownerDocument._inc;if(S._inc!==A){var X=S._refresh(S._node);if(vi(S,"length",X.length),!S.$$length||X.length<S.$$length)for(var le=X.length;le in S;le++)Object.prototype.hasOwnProperty.call(S,le)&&delete S[le];c(X,S),S._inc=A}}V.prototype.item=function(S){return te(this),this[S]||null},d(V,R);function ee(){}function q(S,A){for(var X=S.length;X--;)if(S[X]===A)return X}function j(S,A,X,le){if(le?A[q(A,le)]=X:A[A.length++]=X,S){X.ownerElement=S;var Se=S.ownerDocument;Se&&(le&&ge(Se,S,le),oe(Se,S,X))}}function J(S,A,X){var le=q(A,X);if(le>=0){for(var Se=A.length-1;le<Se;)A[le]=A[++le];if(A.length=Se,S){var $e=S.ownerDocument;$e&&(ge($e,S,X),X.ownerElement=null)}}else throw new B(P,new Error(S.tagName+"@"+X))}ee.prototype={length:0,item:R.prototype.item,getNamedItem:function(S){for(var A=this.length;A--;){var X=this[A];if(X.nodeName==S)return X}},setNamedItem:function(S){var A=S.ownerElement;if(A&&A!=this._ownerElement)throw new B(z);var X=this.getNamedItem(S.nodeName);return j(this._ownerElement,this,S,X),X},setNamedItemNS:function(S){var A=S.ownerElement,X;if(A&&A!=this._ownerElement)throw new B(z);return X=this.getNamedItemNS(S.namespaceURI,S.localName),j(this._ownerElement,this,S,X),X},removeNamedItem:function(S){var A=this.getNamedItem(S);return J(this._ownerElement,this,A),A},removeNamedItemNS:function(S,A){var X=this.getNamedItemNS(S,A);return J(this._ownerElement,this,X),X},getNamedItemNS:function(S,A){for(var X=this.length;X--;){var le=this[X];if(le.localName==A&&le.namespaceURI==S)return le}return null}};function se(){}se.prototype={hasFeature:function(S,A){return!0},createDocument:function(S,A,X){var le=new Z;if(le.implementation=this,le.childNodes=new R,le.doctype=X||null,X&&le.appendChild(X),A){var Se=le.createElementNS(S,A);le.appendChild(Se)}return le},createDocumentType:function(S,A,X){var le=new Me;return le.name=S,le.nodeName=S,le.publicId=A||"",le.systemId=X||"",le}};function Q(){}Q.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(S,A){return Ee(this,S,A)},replaceChild:function(S,A){Ee(this,S,A,Oe),A&&this.removeChild(A)},removeChild:function(S){return be(this,S)},appendChild:function(S){return this.insertBefore(S,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(S){return Bt(this.ownerDocument||this,this,S)},normalize:function(){for(var S=this.firstChild;S;){var A=S.nextSibling;A&&A.nodeType==T&&S.nodeType==T?(this.removeChild(A),S.appendData(A.data)):(S.normalize(),S=A)}},isSupported:function(S,A){return this.ownerDocument.implementation.hasFeature(S,A)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(S){for(var A=this;A;){var X=A._nsMap;if(X){for(var le in X)if(Object.prototype.hasOwnProperty.call(X,le)&&X[le]===S)return le}A=A.nodeType==x?A.ownerDocument:A.parentNode}return null},lookupNamespaceURI:function(S){for(var A=this;A;){var X=A._nsMap;if(X&&Object.prototype.hasOwnProperty.call(X,S))return X[S];A=A.nodeType==x?A.ownerDocument:A.parentNode}return null},isDefaultNamespace:function(S){var A=this.lookupPrefix(S);return A==null}};function ie(S){return S=="<"&&"<"||S==">"&&">"||S=="&"&&"&"||S=='"'&&"""||"&#"+S.charCodeAt()+";"}c(m,Q),c(m,Q.prototype);function K(S,A){if(A(S))return!0;if(S=S.firstChild)do if(K(S,A))return!0;while(S=S.nextSibling)}function Z(){this.ownerDocument=this}function oe(S,A,X){S&&S._inc++;var le=X.namespaceURI;le===i.XMLNS&&(A._nsMap[X.prefix?X.localName:""]=X.value)}function ge(S,A,X,le){S&&S._inc++;var Se=X.namespaceURI;Se===i.XMLNS&&delete A._nsMap[X.prefix?X.localName:""]}function Ne(S,A,X){if(S&&S._inc){S._inc++;var le=A.childNodes;if(X)le[le.length++]=X;else{for(var Se=A.firstChild,$e=0;Se;)le[$e++]=Se,Se=Se.nextSibling;le.length=$e,delete le[le.length]}}}function be(S,A){var X=A.previousSibling,le=A.nextSibling;return X?X.nextSibling=le:S.firstChild=le,le?le.previousSibling=X:S.lastChild=X,A.parentNode=null,A.previousSibling=null,A.nextSibling=null,Ne(S.ownerDocument,S),A}function Le(S){return S&&(S.nodeType===Q.DOCUMENT_NODE||S.nodeType===Q.DOCUMENT_FRAGMENT_NODE||S.nodeType===Q.ELEMENT_NODE)}function qe(S){return S&&(Pe(S)||Ze(S)||Ke(S)||S.nodeType===Q.DOCUMENT_FRAGMENT_NODE||S.nodeType===Q.COMMENT_NODE||S.nodeType===Q.PROCESSING_INSTRUCTION_NODE)}function Ke(S){return S&&S.nodeType===Q.DOCUMENT_TYPE_NODE}function Pe(S){return S&&S.nodeType===Q.ELEMENT_NODE}function Ze(S){return S&&S.nodeType===Q.TEXT_NODE}function tt(S,A){var X=S.childNodes||[];if(e(X,Pe)||Ke(A))return!1;var le=e(X,Ke);return!(A&&le&&X.indexOf(le)>X.indexOf(A))}function ze(S,A){var X=S.childNodes||[];function le($e){return Pe($e)&&$e!==A}if(e(X,le))return!1;var Se=e(X,Ke);return!(A&&Se&&X.indexOf(Se)>X.indexOf(A))}function gt(S,A,X){if(!Le(S))throw new B(C,"Unexpected parent node type "+S.nodeType);if(X&&X.parentNode!==S)throw new B(P,"child not in parent");if(!qe(A)||Ke(A)&&S.nodeType!==Q.DOCUMENT_NODE)throw new B(C,"Unexpected node type "+A.nodeType+" for parent node type "+S.nodeType)}function nt(S,A,X){var le=S.childNodes||[],Se=A.childNodes||[];if(A.nodeType===Q.DOCUMENT_FRAGMENT_NODE){var $e=Se.filter(Pe);if($e.length>1||e(Se,Ze))throw new B(C,"More than one element or text in fragment");if($e.length===1&&!tt(S,X))throw new B(C,"Element in fragment can not be inserted before doctype")}if(Pe(A)&&!tt(S,X))throw new B(C,"Only one element can be added and only after doctype");if(Ke(A)){if(e(le,Ke))throw new B(C,"Only one doctype is allowed");var rt=e(le,Pe);if(X&&le.indexOf(rt)<le.indexOf(X))throw new B(C,"Doctype can only be inserted before an element");if(!X&&rt)throw new B(C,"Doctype can not be appended since element is present")}}function Oe(S,A,X){var le=S.childNodes||[],Se=A.childNodes||[];if(A.nodeType===Q.DOCUMENT_FRAGMENT_NODE){var $e=Se.filter(Pe);if($e.length>1||e(Se,Ze))throw new B(C,"More than one element or text in fragment");if($e.length===1&&!ze(S,X))throw new B(C,"Element in fragment can not be inserted before doctype")}if(Pe(A)&&!ze(S,X))throw new B(C,"Only one element can be added and only after doctype");if(Ke(A)){if(e(le,function(Yt){return Ke(Yt)&&Yt!==X}))throw new B(C,"Only one doctype is allowed");var rt=e(le,Pe);if(X&&le.indexOf(rt)<le.indexOf(X))throw new B(C,"Doctype can only be inserted before an element")}}function Ee(S,A,X,le){gt(S,A,X),S.nodeType===Q.DOCUMENT_NODE&&(le||nt)(S,A,X);var Se=A.parentNode;if(Se&&Se.removeChild(A),A.nodeType===F){var $e=A.firstChild;if($e==null)return A;var rt=A.lastChild}else $e=rt=A;var Dt=X?X.previousSibling:S.lastChild;$e.previousSibling=Dt,rt.nextSibling=X,Dt?Dt.nextSibling=$e:S.firstChild=$e,X==null?S.lastChild=rt:X.previousSibling=rt;do{$e.parentNode=S;var Yt=S.ownerDocument||S;me($e,Yt)}while($e!==rt&&($e=$e.nextSibling));return Ne(S.ownerDocument||S,S),A.nodeType==F&&(A.firstChild=A.lastChild=null),A}function me(S,A){if(S.ownerDocument!==A){if(S.ownerDocument=A,S.nodeType===g&&S.attributes)for(var X=0;X<S.attributes.length;X++){var le=S.attributes.item(X);le&&(le.ownerDocument=A)}for(var Se=S.firstChild;Se;)me(Se,A),Se=Se.nextSibling}}function Fe(S,A){A.parentNode&&A.parentNode.removeChild(A),A.parentNode=S,A.previousSibling=S.lastChild,A.nextSibling=null,A.previousSibling?A.previousSibling.nextSibling=A:S.firstChild=A,S.lastChild=A,Ne(S.ownerDocument,S,A);var X=S.ownerDocument||S;return me(A,X),A}Z.prototype={nodeName:"#document",nodeType:w,doctype:null,documentElement:null,_inc:1,insertBefore:function(S,A){if(S.nodeType==F){for(var X=S.firstChild;X;){var le=X.nextSibling;this.insertBefore(X,A),X=le}return S}return Ee(this,S,A),me(S,this),this.documentElement===null&&S.nodeType===g&&(this.documentElement=S),S},removeChild:function(S){return this.documentElement==S&&(this.documentElement=null),be(this,S)},replaceChild:function(S,A){Ee(this,S,A,Oe),me(S,this),A&&this.removeChild(A),Pe(S)&&(this.documentElement=S)},importNode:function(S,A){return gi(this,S,A)},getElementById:function(S){var A=null;return K(this.documentElement,function(X){if(X.nodeType==g&&X.getAttribute("id")==S)return A=X,!0}),A},getElementsByClassName:function(S){var A=o(S);return new V(this,function(X){var le=[];return A.length>0&&K(X.documentElement,function(Se){if(Se!==X&&Se.nodeType===g){var $e=Se.getAttribute("class");if($e){var rt=S===$e;if(!rt){var Dt=o($e);rt=A.every(l(Dt))}rt&&le.push(Se)}}}),le})},createElement:function(S){var A=new pe;A.ownerDocument=this,A.nodeName=S,A.tagName=S,A.localName=S,A.childNodes=new R;var X=A.attributes=new ee;return X._ownerElement=A,A},createDocumentFragment:function(){var S=new Nt;return S.ownerDocument=this,S.childNodes=new R,S},createTextNode:function(S){var A=new he;return A.ownerDocument=this,A.appendData(S),A},createComment:function(S){var A=new ue;return A.ownerDocument=this,A.appendData(S),A},createCDATASection:function(S){if(S.indexOf("]]>")!==-1)throw new B(k,'data contains "]]>"');var A=new ve;return A.ownerDocument=this,A.appendData(S),A},createProcessingInstruction:function(S,A){var X=new vt;return X.ownerDocument=this,X.tagName=X.nodeName=X.target=S,X.nodeValue=X.data=A,X},createAttribute:function(S){var A=new ye;return A.ownerDocument=this,A.name=S,A.nodeName=S,A.localName=S,A.specified=!0,A},createEntityReference:function(S){var A=new Re;return A.ownerDocument=this,A.nodeName=S,A},createElementNS:function(S,A){var X=new pe,le=A.split(":"),Se=X.attributes=new ee;return X.childNodes=new R,X.ownerDocument=this,X.nodeName=A,X.tagName=A,X.namespaceURI=S,le.length==2?(X.prefix=le[0],X.localName=le[1]):X.localName=A,Se._ownerElement=X,X},createAttributeNS:function(S,A){var X=new ye,le=A.split(":");return X.ownerDocument=this,X.nodeName=A,X.name=A,X.namespaceURI=S,X.specified=!0,le.length==2?(X.prefix=le[0],X.localName=le[1]):X.localName=A,X}},d(Z,Q);function pe(){this._nsMap={}}pe.prototype={nodeType:g,hasAttribute:function(S){return this.getAttributeNode(S)!=null},getAttribute:function(S){var A=this.getAttributeNode(S);return A&&A.value||""},getAttributeNode:function(S){return this.attributes.getNamedItem(S)},setAttribute:function(S,A){var X=this.ownerDocument.createAttribute(S);X.value=X.nodeValue=""+A,this.setAttributeNode(X)},removeAttribute:function(S){var A=this.getAttributeNode(S);A&&this.removeAttributeNode(A)},appendChild:function(S){return S.nodeType===F?this.insertBefore(S,null):Fe(this,S)},setAttributeNode:function(S){return this.attributes.setNamedItem(S)},setAttributeNodeNS:function(S){return this.attributes.setNamedItemNS(S)},removeAttributeNode:function(S){return this.attributes.removeNamedItem(S.nodeName)},removeAttributeNS:function(S,A){var X=this.getAttributeNodeNS(S,A);X&&this.removeAttributeNode(X)},hasAttributeNS:function(S,A){return this.getAttributeNodeNS(S,A)!=null},getAttributeNS:function(S,A){var X=this.getAttributeNodeNS(S,A);return X&&X.value||""},setAttributeNS:function(S,A,X){var le=this.ownerDocument.createAttributeNS(S,A);le.value=le.nodeValue=""+X,this.setAttributeNode(le)},getAttributeNodeNS:function(S,A){return this.attributes.getNamedItemNS(S,A)},getElementsByTagName:function(S){return new V(this,function(A){var X=[];return K(A,function(le){le!==A&&le.nodeType==g&&(S==="*"||le.tagName==S)&&X.push(le)}),X})},getElementsByTagNameNS:function(S,A){return new V(this,function(X){var le=[];return K(X,function(Se){Se!==X&&Se.nodeType===g&&(S==="*"||Se.namespaceURI===S)&&(A==="*"||Se.localName==A)&&le.push(Se)}),le})}},Z.prototype.getElementsByTagName=pe.prototype.getElementsByTagName,Z.prototype.getElementsByTagNameNS=pe.prototype.getElementsByTagNameNS,d(pe,Q);function ye(){}ye.prototype.nodeType=x,d(ye,Q);function Ce(){}Ce.prototype={data:"",substringData:function(S,A){return this.data.substring(S,S+A)},appendData:function(S){S=this.data+S,this.nodeValue=this.data=S,this.length=S.length},insertData:function(S,A){this.replaceData(S,0,A)},appendChild:function(S){throw new Error(U[C])},deleteData:function(S,A){this.replaceData(S,A,"")},replaceData:function(S,A,X){var le=this.data.substring(0,S),Se=this.data.substring(S+A);X=le+X+Se,this.nodeValue=this.data=X,this.length=X.length}},d(Ce,Q);function he(){}he.prototype={nodeName:"#text",nodeType:T,splitText:function(S){var A=this.data,X=A.substring(S);A=A.substring(0,S),this.data=this.nodeValue=A,this.length=A.length;var le=this.ownerDocument.createTextNode(X);return this.parentNode&&this.parentNode.insertBefore(le,this.nextSibling),le}},d(he,Ce);function ue(){}ue.prototype={nodeName:"#comment",nodeType:N},d(ue,Ce);function ve(){}ve.prototype={nodeName:"#cdata-section",nodeType:E},d(ve,Ce);function Me(){}Me.prototype.nodeType=$,d(Me,Q);function De(){}De.prototype.nodeType=H,d(De,Q);function dt(){}dt.prototype.nodeType=b,d(dt,Q);function Re(){}Re.prototype.nodeType=v,d(Re,Q);function Nt(){}Nt.prototype.nodeName="#document-fragment",Nt.prototype.nodeType=F,d(Nt,Q);function vt(){}vt.prototype.nodeType=D,d(vt,Q);function Ot(){}Ot.prototype.serializeToString=function(S,A,X){return wt.call(S,A,X)},Q.prototype.toString=wt;function wt(S,A){var X=[],le=this.nodeType==9&&this.documentElement||this,Se=le.prefix,$e=le.namespaceURI;if($e&&Se==null){var Se=le.lookupPrefix($e);if(Se==null)var rt=[{namespace:$e,prefix:null}]}return Ft(this,X,S,A,rt),X.join("")}function Vt(S,A,X){var le=S.prefix||"",Se=S.namespaceURI;if(!Se||le==="xml"&&Se===i.XML||Se===i.XMLNS)return!1;for(var $e=X.length;$e--;){var rt=X[$e];if(rt.prefix===le)return rt.namespace!==Se}return!0}function ni(S,A,X){S.push(" ",A,'="',X.replace(/[<>&"\t\n\r]/g,ie),'"')}function Ft(S,A,X,le,Se){if(Se||(Se=[]),le)if(S=le(S),S){if(typeof S=="string"){A.push(S);return}}else return;switch(S.nodeType){case g:var $e=S.attributes,rt=$e.length,ut=S.firstChild,Dt=S.tagName;X=i.isHTML(S.namespaceURI)||X;var Yt=Dt;if(!X&&!S.prefix&&S.namespaceURI){for(var Ht,$t=0;$t<$e.length;$t++)if($e.item($t).name==="xmlns"){Ht=$e.item($t).value;break}if(!Ht)for(var ri=Se.length-1;ri>=0;ri--){var Je=Se[ri];if(Je.prefix===""&&Je.namespace===S.namespaceURI){Ht=Je.namespace;break}}if(Ht!==S.namespaceURI)for(var ri=Se.length-1;ri>=0;ri--){var Je=Se[ri];if(Je.namespace===S.namespaceURI){Je.prefix&&(Yt=Je.prefix+":"+Dt);break}}}A.push("<",Yt);for(var si=0;si<rt;si++){var Xt=$e.item(si);Xt.prefix=="xmlns"?Se.push({prefix:Xt.localName,namespace:Xt.value}):Xt.nodeName=="xmlns"&&Se.push({prefix:"",namespace:Xt.value})}for(var si=0;si<rt;si++){var Xt=$e.item(si);if(Vt(Xt,X,Se)){var Kt=Xt.prefix||"",At=Xt.namespaceURI;ni(A,Kt?"xmlns:"+Kt:"xmlns",At),Se.push({prefix:Kt,namespace:At})}Ft(Xt,A,X,le,Se)}if(Dt===Yt&&Vt(S,X,Se)){var Kt=S.prefix||"",At=S.namespaceURI;ni(A,Kt?"xmlns:"+Kt:"xmlns",At),Se.push({prefix:Kt,namespace:At})}if(ut||X&&!/^(?:meta|link|img|br|hr|input)$/i.test(Dt)){if(A.push(">"),X&&/^script$/i.test(Dt))for(;ut;)ut.data?A.push(ut.data):Ft(ut,A,X,le,Se.slice()),ut=ut.nextSibling;else for(;ut;)Ft(ut,A,X,le,Se.slice()),ut=ut.nextSibling;A.push("</",Yt,">")}else A.push("/>");return;case w:case F:for(var ut=S.firstChild;ut;)Ft(ut,A,X,le,Se.slice()),ut=ut.nextSibling;return;case x:return ni(A,S.name,S.value);case T:return A.push(S.data.replace(/[<&>]/g,ie));case E:return A.push("<![CDATA[",S.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case N:return A.push("<!--",S.data,"-->");case $:var Ye=S.publicId,ki=S.systemId;if(A.push("<!DOCTYPE ",S.name),Ye)A.push(" PUBLIC ",Ye),ki&&ki!="."&&A.push(" ",ki),A.push(">");else if(ki&&ki!=".")A.push(" SYSTEM ",ki,">");else{var Mi=S.internalSubset;Mi&&A.push(" [",Mi,"]"),A.push(">")}return;case D:return A.push("<?",S.target," ",S.data,"?>");case v:return A.push("&",S.nodeName,";");default:A.push("??",S.nodeName)}}function gi(S,A,X){var le;switch(A.nodeType){case g:le=A.cloneNode(!1),le.ownerDocument=S;case F:break;case x:X=!0;break}if(le||(le=A.cloneNode(!1)),le.ownerDocument=S,le.parentNode=null,X)for(var Se=A.firstChild;Se;)le.appendChild(gi(S,Se,X)),Se=Se.nextSibling;return le}function Bt(S,A,X){var le=new A.constructor;for(var Se in A)if(Object.prototype.hasOwnProperty.call(A,Se)){var $e=A[Se];typeof $e!="object"&&$e!=le[Se]&&(le[Se]=$e)}switch(A.childNodes&&(le.childNodes=new R),le.ownerDocument=S,le.nodeType){case g:var rt=A.attributes,Dt=le.attributes=new ee,Yt=rt.length;Dt._ownerElement=le;for(var Ht=0;Ht<Yt;Ht++)le.setAttributeNode(Bt(S,rt.item(Ht),!0));break;case x:X=!0}if(X)for(var $t=A.firstChild;$t;)le.appendChild(Bt(S,$t,X)),$t=$t.nextSibling;return le}function vi(S,A,X){S[A]=X}try{if(Object.defineProperty){let S=function(A){switch(A.nodeType){case g:case F:var X=[];for(A=A.firstChild;A;)A.nodeType!==7&&A.nodeType!==8&&X.push(S(A)),A=A.nextSibling;return X.join("");default:return A.nodeValue}};Object.defineProperty(V.prototype,"length",{get:function(){return te(this),this.$$length}}),Object.defineProperty(Q.prototype,"textContent",{get:function(){return S(this)},set:function(A){switch(this.nodeType){case g:case F:for(;this.firstChild;)this.removeChild(this.firstChild);(A||String(A))&&this.appendChild(this.ownerDocument.createTextNode(A));break;default:this.data=A,this.value=A,this.nodeValue=A}}}),vi=function(A,X,le){A["$$"+X]=le}}}catch{}return Ki.DocumentType=Me,Ki.DOMException=B,Ki.DOMImplementation=se,Ki.Element=pe,Ki.Node=Q,Ki.NodeList=R,Ki.XMLSerializer=Ot,Ki}var Ur={},Do={},Mc;function cv(){return Mc||(Mc=1,(function(r){var e=ka().freeze;r.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.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:""}),r.entityMap=r.HTML_ENTITIES})(Do)),Do}var Rs={},Rc;function dv(){if(Rc)return Rs;Rc=1;var r=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]"),n=new RegExp("^"+e.source+i.source+"*(?::"+e.source+i.source+"*)?$"),s=0,a=1,o=2,l=3,c=4,d=5,m=6,g=7;function x(C,k){this.message=C,this.locator=k,Error.captureStackTrace&&Error.captureStackTrace(this,x)}x.prototype=new Error,x.prototype.name=x.name;function T(){}T.prototype={parse:function(C,k,P){var z=this.domBuilder;z.startDocument(),$(k,k={}),E(C,k,P,z,this.errorHandler),z.endDocument()}};function E(C,k,P,z,B){function R(me){if(me>65535){me-=65536;var Fe=55296+(me>>10),pe=56320+(me&1023);return String.fromCharCode(Fe,pe)}else return String.fromCharCode(me)}function V(me){var Fe=me.slice(1,-1);return Object.hasOwnProperty.call(P,Fe)?P[Fe]:Fe.charAt(0)==="#"?R(parseInt(Fe.substr(1).replace("x","0x"))):(B.error("entity not found:"+me),me)}function te(me){if(me>K){var Fe=C.substring(K,me).replace(/&#?\w+;/g,V);se&&ee(K),z.characters(Fe,0,me-K),K=me}}function ee(me,Fe){for(;me>=j&&(Fe=J.exec(C));)q=Fe.index,j=q+Fe[0].length,se.lineNumber++;se.columnNumber=me-q+1}for(var q=0,j=0,J=/.*(?:\r\n?|\n)|.*$/g,se=z.locator,Q=[{currentNSMap:k}],ie={},K=0;;){try{var Z=C.indexOf("<",K);if(Z<0){if(!C.substr(K).match(/^\s*$/)){var oe=z.doc,ge=oe.createTextNode(C.substr(K));oe.appendChild(ge),z.currentElement=ge}return}switch(Z>K&&te(Z),C.charAt(Z+1)){case"/":var ze=C.indexOf(">",Z+3),Ne=C.substring(Z+2,ze).replace(/[ \t\n\r]+$/g,""),be=Q.pop();ze<0?(Ne=C.substring(Z+2).replace(/[\s<].*/,""),B.error("end tag name: "+Ne+" is not complete:"+be.tagName),ze=Z+1+Ne.length):Ne.match(/\s</)&&(Ne=Ne.replace(/[\s<].*/,""),B.error("end tag name: "+Ne+" maybe not complete"),ze=Z+1+Ne.length);var Le=be.localNSMap,qe=be.tagName==Ne,Ke=qe||be.tagName&&be.tagName.toLowerCase()==Ne.toLowerCase();if(Ke){if(z.endElement(be.uri,be.localName,Ne),Le)for(var Pe in Le)Object.prototype.hasOwnProperty.call(Le,Pe)&&z.endPrefixMapping(Pe);qe||B.fatalError("end tag name: "+Ne+" is not match the current start tagName:"+be.tagName)}else Q.push(be);ze++;break;case"?":se&&ee(Z),ze=H(C,Z,z);break;case"!":se&&ee(Z),ze=F(C,Z,z,B);break;default:se&&ee(Z);var Ze=new O,tt=Q[Q.length-1].currentNSMap,ze=b(C,Z,Ze,tt,V,B),gt=Ze.length;if(!Ze.closed&&w(C,ze,Ze.tagName,ie)&&(Ze.closed=!0,P.nbsp||B.warning("unclosed xml attribute")),se&>){for(var nt=v(se,{}),Oe=0;Oe<gt;Oe++){var Ee=Ze[Oe];ee(Ee.offset),Ee.locator=v(se,{})}z.locator=nt,D(Ze,z,tt)&&Q.push(Ze),z.locator=se}else D(Ze,z,tt)&&Q.push(Ze);r.isHTML(Ze.uri)&&!Ze.closed?ze=N(C,ze,Ze.tagName,V,z):ze++}}catch(me){if(me instanceof x)throw me;B.error("element parse error: "+me),ze=-1}ze>K?K=ze:te(Math.max(Z,K)+1)}}function v(C,k){return k.lineNumber=C.lineNumber,k.columnNumber=C.columnNumber,k}function b(C,k,P,z,B,R){function V(se,Q,ie){P.attributeNames.hasOwnProperty(se)&&R.fatalError("Attribute "+se+" redefined"),P.addValue(se,Q.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,B),ie)}for(var te,ee,q=++k,j=s;;){var J=C.charAt(q);switch(J){case"=":if(j===a)te=C.slice(k,q),j=l;else if(j===o)j=l;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(j===l||j===a)if(j===a&&(R.warning('attribute value must after "="'),te=C.slice(k,q)),k=q+1,q=C.indexOf(J,k),q>0)ee=C.slice(k,q),V(te,ee,k-1),j=d;else throw new Error("attribute value no end '"+J+"' match");else if(j==c)ee=C.slice(k,q),V(te,ee,k),R.warning('attribute "'+te+'" missed start quot('+J+")!!"),k=q+1,j=d;else throw new Error('attribute value must after "="');break;case"/":switch(j){case s:P.setTagName(C.slice(k,q));case d:case m:case g:j=g,P.closed=!0;case c:case a:break;case o:P.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return R.error("unexpected end of input"),j==s&&P.setTagName(C.slice(k,q)),q;case">":switch(j){case s:P.setTagName(C.slice(k,q));case d:case m:case g:break;case c:case a:ee=C.slice(k,q),ee.slice(-1)==="/"&&(P.closed=!0,ee=ee.slice(0,-1));case o:j===o&&(ee=te),j==c?(R.warning('attribute "'+ee+'" missed quot(")!'),V(te,ee,k)):((!r.isHTML(z[""])||!ee.match(/^(?:disabled|checked|selected)$/i))&&R.warning('attribute "'+ee+'" missed value!! "'+ee+'" instead!!'),V(ee,ee,k));break;case l:throw new Error("attribute value missed!!")}return q;case"":J=" ";default:if(J<=" ")switch(j){case s:P.setTagName(C.slice(k,q)),j=m;break;case a:te=C.slice(k,q),j=o;break;case c:var ee=C.slice(k,q);R.warning('attribute "'+ee+'" missed quot(")!!'),V(te,ee,k);case d:j=m;break}else switch(j){case o:P.tagName,(!r.isHTML(z[""])||!te.match(/^(?:disabled|checked|selected)$/i))&&R.warning('attribute "'+te+'" missed value!! "'+te+'" instead2!!'),V(te,te,k),k=q,j=a;break;case d:R.warning('attribute space is required"'+te+'"!!');case m:j=a,k=q;break;case l:j=c,k=q;break;case g:throw new Error("elements closed character '/' and '>' must be connected to")}}q++}}function D(C,k,P){for(var z=C.tagName,B=null,J=C.length;J--;){var R=C[J],V=R.qName,te=R.value,se=V.indexOf(":");if(se>0)var ee=R.prefix=V.slice(0,se),q=V.slice(se+1),j=ee==="xmlns"&&q;else q=V,ee=null,j=V==="xmlns"&&"";R.localName=q,j!==!1&&(B==null&&(B={},$(P,P={})),P[j]=B[j]=te,R.uri=r.XMLNS,k.startPrefixMapping(j,te))}for(var J=C.length;J--;){R=C[J];var ee=R.prefix;ee&&(ee==="xml"&&(R.uri=r.XML),ee!=="xmlns"&&(R.uri=P[ee||""]))}var se=z.indexOf(":");se>0?(ee=C.prefix=z.slice(0,se),q=C.localName=z.slice(se+1)):(ee=null,q=C.localName=z);var Q=C.uri=P[ee||""];if(k.startElement(Q,q,z,C),C.closed){if(k.endElement(Q,q,z),B)for(ee in B)Object.prototype.hasOwnProperty.call(B,ee)&&k.endPrefixMapping(ee)}else return C.currentNSMap=P,C.localNSMap=B,!0}function N(C,k,P,z,B){if(/^(?:script|textarea)$/i.test(P)){var R=C.indexOf("</"+P+">",k),V=C.substring(k+1,R);if(/[&<]/.test(V))return/^script$/i.test(P)?(B.characters(V,0,V.length),R):(V=V.replace(/&#?\w+;/g,z),B.characters(V,0,V.length),R)}return k+1}function w(C,k,P,z){var B=z[P];return B==null&&(B=C.lastIndexOf("</"+P+">"),B<k&&(B=C.lastIndexOf("</"+P)),z[P]=B),B<k}function $(C,k){for(var P in C)Object.prototype.hasOwnProperty.call(C,P)&&(k[P]=C[P])}function F(C,k,P,z){var B=C.charAt(k+2);switch(B){case"-":if(C.charAt(k+3)==="-"){var R=C.indexOf("-->",k+4);return R>k?(P.comment(C,k+4,R-k-4),R+3):(z.error("Unclosed comment"),-1)}else return-1;default:if(C.substr(k+3,6)=="CDATA["){var R=C.indexOf("]]>",k+9);return P.startCDATA(),P.characters(C,k+9,R-k-9),P.endCDATA(),R+3}var V=U(C,k),te=V.length;if(te>1&&/!doctype/i.test(V[0][0])){var ee=V[1][0],q=!1,j=!1;te>3&&(/^public$/i.test(V[2][0])?(q=V[3][0],j=te>4&&V[4][0]):/^system$/i.test(V[2][0])&&(j=V[3][0]));var J=V[te-1];return P.startDTD(ee,q,j),P.endDTD(),J.index+J[0].length}}return-1}function H(C,k,P){var z=C.indexOf("?>",k);if(z){var B=C.substring(k,z).match(/^<\?(\S*)\s*([\s\S]*?)$/);return B?(B[0].length,P.processingInstruction(B[1],B[2]),z+2):-1}return-1}function O(){this.attributeNames={}}O.prototype={setTagName:function(C){if(!n.test(C))throw new Error("invalid tagName:"+C);this.tagName=C},addValue:function(C,k,P){if(!n.test(C))throw new Error("invalid attribute:"+C);this.attributeNames[C]=this.length,this[this.length++]={qName:C,value:k,offset:P}},length:0,getLocalName:function(C){return this[C].localName},getLocator:function(C){return this[C].locator},getQName:function(C){return this[C].qName},getURI:function(C){return this[C].uri},getValue:function(C){return this[C].value}};function U(C,k){var P,z=[],B=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(B.lastIndex=k,B.exec(C);P=B.exec(C);)if(z.push(P),P[1])return z}return Rs.XMLReader=T,Rs.ParseError=x,Rs}var Vc;function hv(){if(Vc)return Ur;Vc=1;var r=ka(),e=Ih(),i=cv(),n=dv(),s=e.DOMImplementation,a=r.NAMESPACE,o=n.ParseError,l=n.XMLReader;function c(b){return b.replace(/\r[\n\u0085]/g,`
|
|
25
|
+
`).replace(/[\r\u0085\u2028]/g,`
|
|
26
|
+
`)}function d(b){this.options=b||{locator:{}}}d.prototype.parseFromString=function(b,D){var N=this.options,w=new l,$=N.domBuilder||new g,F=N.errorHandler,H=N.locator,O=N.xmlns||{},U=/\/x?html?$/.test(D),C=U?i.HTML_ENTITIES:i.XML_ENTITIES;H&&$.setDocumentLocator(H),w.errorHandler=m(F,$,H),w.domBuilder=N.domBuilder||$,U&&(O[""]=a.HTML),O.xml=O.xml||a.XML;var k=N.normalizeLineEndings||c;return b&&typeof b=="string"?w.parse(k(b),O,C):w.errorHandler.error("invalid doc source"),$.doc};function m(b,D,N){if(!b){if(D instanceof g)return D;b=D}var w={},$=b instanceof Function;N=N||{};function F(H){var O=b[H];!O&&$&&(O=b.length==2?function(U){b(H,U)}:b),w[H]=O&&function(U){O("[xmldom "+H+"] "+U+T(N))}||function(){}}return F("warning"),F("error"),F("fatalError"),w}function g(){this.cdata=!1}function x(b,D){D.lineNumber=b.lineNumber,D.columnNumber=b.columnNumber}g.prototype={startDocument:function(){this.doc=new s().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(b,D,N,w){var $=this.doc,F=$.createElementNS(b,N||D),H=w.length;v(this,F),this.currentElement=F,this.locator&&x(this.locator,F);for(var O=0;O<H;O++){var b=w.getURI(O),U=w.getValue(O),N=w.getQName(O),C=$.createAttributeNS(b,N);this.locator&&x(w.getLocator(O),C),C.value=C.nodeValue=U,F.setAttributeNode(C)}},endElement:function(b,D,N){var w=this.currentElement;w.tagName,this.currentElement=w.parentNode},startPrefixMapping:function(b,D){},endPrefixMapping:function(b){},processingInstruction:function(b,D){var N=this.doc.createProcessingInstruction(b,D);this.locator&&x(this.locator,N),v(this,N)},ignorableWhitespace:function(b,D,N){},characters:function(b,D,N){if(b=E.apply(this,arguments),b){if(this.cdata)var w=this.doc.createCDATASection(b);else var w=this.doc.createTextNode(b);this.currentElement?this.currentElement.appendChild(w):/^\s*$/.test(b)&&this.doc.appendChild(w),this.locator&&x(this.locator,w)}},skippedEntity:function(b){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(b){(this.locator=b)&&(b.lineNumber=0)},comment:function(b,D,N){b=E.apply(this,arguments);var w=this.doc.createComment(b);this.locator&&x(this.locator,w),v(this,w)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(b,D,N){var w=this.doc.implementation;if(w&&w.createDocumentType){var $=w.createDocumentType(b,D,N);this.locator&&x(this.locator,$),v(this,$),this.doc.doctype=$}},warning:function(b){console.warn("[xmldom warning] "+b,T(this.locator))},error:function(b){console.error("[xmldom error] "+b,T(this.locator))},fatalError:function(b){throw new o(b,this.locator)}};function T(b){if(b)return`
|
|
27
|
+
@`+(b.systemId||"")+"#[line:"+b.lineNumber+",col:"+b.columnNumber+"]"}function E(b,D,N){return typeof b=="string"?b.substr(D,N):b.length>=D+N||D?new java.lang.String(b,D,N)+"":b}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(b){g.prototype[b]=function(){return null}});function v(b,D){b.currentElement?b.currentElement.appendChild(D):b.doc.appendChild(D)}return Ur.__DOMHandler=g,Ur.normalizeLineEndings=c,Ur.DOMParser=d,Ur}var Fc;function fv(){if(Fc)return $r;Fc=1;var r=Ih();return $r.DOMImplementation=r.DOMImplementation,$r.XMLSerializer=r.XMLSerializer,$r.DOMParser=hv().DOMParser,$r}var pv=fv();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const $c=r=>!!r&&typeof r=="object",Mt=(...r)=>r.reduce((e,i)=>(typeof i!="object"||Object.keys(i).forEach(n=>{Array.isArray(e[n])&&Array.isArray(i[n])?e[n]=e[n].concat(i[n]):$c(e[n])&&$c(i[n])?e[n]=Mt(e[n],i[n]):e[n]=i[n]}),e),{}),Nh=r=>Object.keys(r).map(e=>r[e]),mv=(r,e)=>{const i=[];for(let n=r;n<e;n++)i.push(n);return i},sr=r=>r.reduce((e,i)=>e.concat(i),[]),Oh=r=>{if(!r.length)return[];const e=[];for(let i=0;i<r.length;i++)e.push(r[i]);return e},gv=(r,e)=>r.reduce((i,n,s)=>(n[e]&&i.push(s),i),[]),vv=(r,e)=>Nh(r.reduce((i,n)=>(n.forEach(s=>{i[e(s)]=s}),i),{}));var ar={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 is=({baseUrl:r="",source:e="",range:i="",indexRange:n=""})=>{const s={uri:e,resolvedUri:Ea(r||"",e)};if(i||n){const o=(i||n).split("-");let l=W.BigInt?W.BigInt(o[0]):parseInt(o[0],10),c=W.BigInt?W.BigInt(o[1]):parseInt(o[1],10);l<Number.MAX_SAFE_INTEGER&&typeof l=="bigint"&&(l=Number(l)),c<Number.MAX_SAFE_INTEGER&&typeof c=="bigint"&&(c=Number(c));let d;typeof c=="bigint"||typeof l=="bigint"?d=W.BigInt(c)-W.BigInt(l)+W.BigInt(1):d=c-l+1,typeof d=="bigint"&&d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),s.byterange={length:d,offset:l}}return s},yv=r=>{let e;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=W.BigInt(r.offset)+W.BigInt(r.length)-W.BigInt(1):e=r.offset+r.length-1,`${r.offset}-${e}`},Uc=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),_v={static(r){const{duration:e,timescale:i=1,sourceDuration:n,periodDuration:s}=r,a=Uc(r.endNumber),o=e/i;return typeof a=="number"?{start:0,end:a}:typeof s=="number"?{start:0,end:s/o}:{start:0,end:n/o}},dynamic(r){const{NOW:e,clientOffset:i,availabilityStartTime:n,timescale:s=1,duration:a,periodStart:o=0,minimumUpdatePeriod:l=0,timeShiftBufferDepth:c=1/0}=r,d=Uc(r.endNumber),m=(e+i)/1e3,g=n+o,T=m+l-g,E=Math.ceil(T*s/a),v=Math.floor((m-g-c)*s/a),b=Math.floor((m-g)*s/a);return{start:Math.max(0,v),end:typeof d=="number"?d:Math.min(E,b)}}},Tv=r=>e=>{const{duration:i,timescale:n=1,periodStart:s,startNumber:a=1}=r;return{number:a+e,duration:i/n,timeline:s,time:e*i}},Il=r=>{const{type:e,duration:i,timescale:n=1,periodDuration:s,sourceDuration:a}=r,{start:o,end:l}=_v[e](r),c=mv(o,l).map(Tv(r));if(e==="static"){const d=c.length-1,m=typeof s=="number"?s:a;c[d].duration=m-i/n*d}return c},Bh=r=>{const{baseUrl:e,initialization:i={},sourceDuration:n,indexRange:s="",periodStart:a,presentationTime:o,number:l=0,duration:c}=r;if(!e)throw new Error(ar.NO_BASE_URL);const d=is({baseUrl:e,source:i.sourceURL,range:i.range}),m=is({baseUrl:e,source:e,indexRange:s});if(m.map=d,c){const g=Il(r);g.length&&(m.duration=g[0].duration,m.timeline=g[0].timeline)}else n&&(m.duration=n,m.timeline=a);return m.presentationTime=o||a,m.number=l,[m]},Nl=(r,e,i)=>{const n=r.sidx.map?r.sidx.map:null,s=r.sidx.duration,a=r.timeline||0,o=r.sidx.byterange,l=o.offset+o.length,c=e.timescale,d=e.references.filter(b=>b.referenceType!==1),m=[],g=r.endList?"static":"dynamic",x=r.sidx.timeline;let T=x,E=r.mediaSequence||0,v;typeof e.firstOffset=="bigint"?v=W.BigInt(l)+e.firstOffset:v=l+e.firstOffset;for(let b=0;b<d.length;b++){const D=e.references[b],N=D.referencedSize,w=D.subsegmentDuration;let $;typeof v=="bigint"?$=v+W.BigInt(N)-W.BigInt(1):$=v+N-1;const F=`${v}-${$}`,O=Bh({baseUrl:i,timescale:c,timeline:a,periodStart:x,presentationTime:T,number:E,duration:w,sourceDuration:s,indexRange:F,type:g})[0];n&&(O.map=n),m.push(O),typeof v=="bigint"?v+=W.BigInt(N):v+=N,T+=w/c,E++}return r.segments=m,r},bv=["AUDIO","SUBTITLES"],Cv=1/60,Lh=r=>vv(r,({timeline:e})=>e).sort((e,i)=>e.timeline>i.timeline?1:-1),xv=(r,e)=>{for(let i=0;i<r.length;i++)if(r[i].attributes.NAME===e)return r[i];return null},zc=r=>{let e=[];return uv(r,bv,(i,n,s,a)=>{e=e.concat(i.playlists||[])}),e},Hc=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((i,n)=>{i.number=r.mediaSequence+n})},Sv=({oldPlaylists:r,newPlaylists:e,timelineStarts:i})=>{e.forEach(n=>{n.discontinuitySequence=i.findIndex(function({timeline:c}){return c===n.timeline});const s=xv(r,n.attributes.NAME);if(!s||n.sidx)return;const a=n.segments[0],o=s.segments.findIndex(function(c){return Math.abs(c.presentationTime-a.presentationTime)<Cv});if(o===-1){Hc({playlist:n,mediaSequence:s.mediaSequence+s.segments.length}),n.segments[0].discontinuity=!0,n.discontinuityStarts.unshift(0),(!s.segments.length&&n.timeline>s.timeline||s.segments.length&&n.timeline>s.segments[s.segments.length-1].timeline)&&n.discontinuitySequence--;return}s.segments[o].discontinuity&&!a.discontinuity&&(a.discontinuity=!0,n.discontinuityStarts.unshift(0),n.discontinuitySequence--),Hc({playlist:n,mediaSequence:s.segments[o].number})})},Ev=({oldManifest:r,newManifest:e})=>{const i=r.playlists.concat(zc(r)),n=e.playlists.concat(zc(e));return e.timelineStarts=Lh([r.timelineStarts,e.timelineStarts]),Sv({oldPlaylists:i,newPlaylists:n,timelineStarts:e.timelineStarts}),e},wa=r=>r&&r.uri+"-"+yv(r.byterange),Ao=r=>{const e=r.reduce(function(n,s){return n[s.attributes.baseUrl]||(n[s.attributes.baseUrl]=[]),n[s.attributes.baseUrl].push(s),n},{});let i=[];return Object.values(e).forEach(n=>{const s=Nh(n.reduce((a,o)=>{const l=o.attributes.id+(o.attributes.lang||"");return a[l]?(o.segments&&(o.segments[0]&&(o.segments[0].discontinuity=!0),a[l].segments.push(...o.segments)),o.attributes.contentProtection&&(a[l].attributes.contentProtection=o.attributes.contentProtection)):(a[l]=o,a[l].attributes.timelineStarts=[]),a[l].attributes.timelineStarts.push({start:o.attributes.periodStart,timeline:o.attributes.periodStart}),a},{}));i=i.concat(s)}),i.map(n=>(n.discontinuityStarts=gv(n.segments||[],"discontinuity"),n))},Ol=(r,e)=>{const i=wa(r.sidx),n=i&&e[i]&&e[i].sidx;return n&&Nl(r,n,r.sidx.resolvedUri),r},kv=(r,e={})=>{if(!Object.keys(e).length)return r;for(const i in r)r[i]=Ol(r[i],e);return r},wv=({attributes:r,segments:e,sidx:i,mediaSequence:n,discontinuitySequence:s,discontinuityStarts:a},o)=>{const l={attributes:{NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuitySequence:s,discontinuityStarts:a,timelineStarts:r.timelineStarts,mediaSequence:n,segments:e};return r.contentProtection&&(l.contentProtection=r.contentProtection),r.serviceLocation&&(l.attributes.serviceLocation=r.serviceLocation),i&&(l.sidx=i),o&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l},Dv=({attributes:r,segments:e,mediaSequence:i,discontinuityStarts:n,discontinuitySequence:s})=>{typeof e>"u"&&(e=[{uri:r.baseUrl,timeline:r.periodStart,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);const a={NAME:r.id,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1};r.codecs&&(a.CODECS=r.codecs);const o={attributes:a,uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,timelineStarts:r.timelineStarts,discontinuityStarts:n,discontinuitySequence:s,mediaSequence:i,segments:e};return r.serviceLocation&&(o.attributes.serviceLocation=r.serviceLocation),o},Av=(r,e={},i=!1)=>{let n;const s=r.reduce((a,o)=>{const l=o.attributes.role&&o.attributes.role.value||"",c=o.attributes.lang||"";let d=o.attributes.label||"main";if(c&&!o.attributes.label){const g=l?` (${l})`:"";d=`${o.attributes.lang}${g}`}a[d]||(a[d]={language:c,autoselect:!0,default:l==="main",playlists:[],uri:""});const m=Ol(wv(o,i),e);return a[d].playlists.push(m),typeof n>"u"&&l==="main"&&(n=o,n.default=!0),a},{});if(!n){const a=Object.keys(s)[0];s[a].default=!0}return s},Iv=(r,e={})=>r.reduce((i,n)=>{const s=n.attributes.label||n.attributes.lang||"text",a=n.attributes.lang||"und";return i[s]||(i[s]={language:a,default:!1,autoselect:!1,playlists:[],uri:""}),i[s].playlists.push(Ol(Dv(n),e)),i},{}),Nv=r=>r.reduce((e,i)=>(i&&i.forEach(n=>{const{channel:s,language:a}=n;e[a]={autoselect:!1,default:!1,instreamId:s,language:a},n.hasOwnProperty("aspectRatio")&&(e[a].aspectRatio=n.aspectRatio),n.hasOwnProperty("easyReader")&&(e[a].easyReader=n.easyReader),n.hasOwnProperty("3D")&&(e[a]["3D"]=n["3D"])}),e),{}),Ov=({attributes:r,segments:e,sidx:i,discontinuityStarts:n})=>{const s={attributes:{NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuityStarts:n,timelineStarts:r.timelineStarts,segments:e};return r.frameRate&&(s.attributes["FRAME-RATE"]=r.frameRate),r.contentProtection&&(s.contentProtection=r.contentProtection),r.serviceLocation&&(s.attributes.serviceLocation=r.serviceLocation),i&&(s.sidx=i),s},Bv=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",Lv=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",Pv=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",Mv=(r,e)=>{r.forEach(i=>{i.mediaSequence=0,i.discontinuitySequence=e.findIndex(function({timeline:n}){return n===i.timeline}),i.segments&&i.segments.forEach((n,s)=>{n.number=s})})},qc=r=>r?Object.keys(r).reduce((e,i)=>{const n=r[i];return e.concat(n.playlists)},[]):[],Rv=({dashPlaylists:r,locations:e,contentSteering:i,sidxMapping:n={},previousManifest:s,eventStream:a})=>{if(!r.length)return{};const{sourceDuration:o,type:l,suggestedPresentationDelay:c,minimumUpdatePeriod:d}=r[0].attributes,m=Ao(r.filter(Bv)).map(Ov),g=Ao(r.filter(Lv)),x=Ao(r.filter(Pv)),T=r.map($=>$.attributes.captionServices).filter(Boolean),E={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:kv(m,n)};d>=0&&(E.minimumUpdatePeriod=d*1e3),e&&(E.locations=e),i&&(E.contentSteering=i),l==="dynamic"&&(E.suggestedPresentationDelay=c),a&&a.length>0&&(E.eventStream=a);const v=E.playlists.length===0,b=g.length?Av(g,n,v):null,D=x.length?Iv(x,n):null,N=m.concat(qc(b),qc(D)),w=N.map(({timelineStarts:$})=>$);return E.timelineStarts=Lh(w),Mv(N,E.timelineStarts),b&&(E.mediaGroups.AUDIO.audio=b),D&&(E.mediaGroups.SUBTITLES.subs=D),T.length&&(E.mediaGroups["CLOSED-CAPTIONS"].cc=Nv(T)),s?Ev({oldManifest:s,newManifest:E}):E},Vv=(r,e,i)=>{const{NOW:n,clientOffset:s,availabilityStartTime:a,timescale:o=1,periodStart:l=0,minimumUpdatePeriod:c=0}=r,d=(n+s)/1e3,m=a+l,x=d+c-m;return Math.ceil((x*o-e)/i)},Ph=(r,e)=>{const{type:i,minimumUpdatePeriod:n=0,media:s="",sourceDuration:a,timescale:o=1,startNumber:l=1,periodStart:c}=r,d=[];let m=-1;for(let g=0;g<e.length;g++){const x=e[g],T=x.d,E=x.r||0,v=x.t||0;m<0&&(m=v),v&&v>m&&(m=v);let b;if(E<0){const w=g+1;w===e.length?i==="dynamic"&&n>0&&s.indexOf("$Number$")>0?b=Vv(r,m,T):b=(a*o-m)/T:b=(e[w].t-m)/T}else b=E+1;const D=l+d.length+b;let N=l+d.length;for(;N<D;)d.push({number:N,duration:T/o,time:m,timeline:c}),m+=T,N++}return d},Fv=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,$v=r=>(e,i,n,s)=>{if(e==="$$")return"$";if(typeof r[i]>"u")return e;const a=""+r[i];return i==="RepresentationID"||(n?s=parseInt(s,10):s=1,a.length>=s)?a:`${new Array(s-a.length+1).join("0")}${a}`},jc=(r,e)=>r.replace(Fv,$v(e)),Uv=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?Il(r):Ph(r,e),zv=(r,e)=>{const i={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=r,s=is({baseUrl:r.baseUrl,source:jc(n.sourceURL,i),range:n.range});return Uv(r,e).map(o=>{i.Number=o.number,i.Time=o.time;const l=jc(r.media||"",i),c=r.timescale||1,d=r.presentationTimeOffset||0,m=r.periodStart+(o.time-d)/c;return{uri:l,timeline:o.timeline,duration:o.duration,resolvedUri:Ea(r.baseUrl||"",l),map:s,number:o.number,presentationTime:m}})},Hv=(r,e)=>{const{baseUrl:i,initialization:n={}}=r,s=is({baseUrl:i,source:n.sourceURL,range:n.range}),a=is({baseUrl:i,source:e.media,range:e.mediaRange});return a.map=s,a},qv=(r,e)=>{const{duration:i,segmentUrls:n=[],periodStart:s}=r;if(!i&&!e||i&&e)throw new Error(ar.SEGMENT_TIME_UNSPECIFIED);const a=n.map(c=>Hv(r,c));let o;return i&&(o=Il(r)),e&&(o=Ph(r,e)),o.map((c,d)=>{if(a[d]){const m=a[d],g=r.timescale||1,x=r.presentationTimeOffset||0;return m.timeline=c.timeline,m.duration=c.duration,m.number=c.number,m.presentationTime=s+(c.time-x)/g,m}}).filter(c=>c)},jv=({attributes:r,segmentInfo:e})=>{let i,n;e.template?(n=zv,i=Mt(r,e.template)):e.base?(n=Bh,i=Mt(r,e.base)):e.list&&(n=qv,i=Mt(r,e.list));const s={attributes:r};if(!n)return s;const a=n(i,e.segmentTimeline);if(i.duration){const{duration:o,timescale:l=1}=i;i.duration=o/l}else a.length?i.duration=a.reduce((o,l)=>Math.max(o,Math.ceil(l.duration)),0):i.duration=0;return s.attributes=i,s.segments=a,e.base&&i.indexRange&&(s.sidx=a[0],s.segments=[]),s},Gv=r=>r.map(jv),mt=(r,e)=>Oh(r.childNodes).filter(({tagName:i})=>i===e),os=r=>r.textContent.trim(),Wv=r=>parseFloat(r.split("/").reduce((e,i)=>e/i)),Hn=r=>{const l=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(r);if(!l)return 0;const[c,d,m,g,x,T]=l.slice(1);return parseFloat(c||0)*31536e3+parseFloat(d||0)*2592e3+parseFloat(m||0)*86400+parseFloat(g||0)*3600+parseFloat(x||0)*60+parseFloat(T||0)},Yv=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),Gc={mediaPresentationDuration(r){return Hn(r)},availabilityStartTime(r){return Yv(r)/1e3},minimumUpdatePeriod(r){return Hn(r)},suggestedPresentationDelay(r){return Hn(r)},type(r){return r},timeShiftBufferDepth(r){return Hn(r)},start(r){return Hn(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return Wv(r)},startNumber(r){return parseInt(r,10)},timescale(r){return parseInt(r,10)},presentationTimeOffset(r){return parseInt(r,10)},duration(r){const e=parseInt(r,10);return isNaN(e)?Hn(r):e},d(r){return parseInt(r,10)},t(r){return parseInt(r,10)},r(r){return parseInt(r,10)},presentationTime(r){return parseInt(r,10)},DEFAULT(r){return r}},kt=r=>r&&r.attributes?Oh(r.attributes).reduce((e,i)=>{const n=Gc[i.name]||Gc.DEFAULT;return e[i.name]=n(i.value),e},{}):{},Xv={"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=(r,e)=>e.length?sr(r.map(function(i){return e.map(function(n){const s=os(n),a=Ea(i.baseUrl,s),o=Mt(kt(n),{baseUrl:a});return a!==s&&!o.serviceLocation&&i.serviceLocation&&(o.serviceLocation=i.serviceLocation),o})})):r,Bl=r=>{const e=mt(r,"SegmentTemplate")[0],i=mt(r,"SegmentList")[0],n=i&&mt(i,"SegmentURL").map(g=>Mt({tag:"SegmentURL"},kt(g))),s=mt(r,"SegmentBase")[0],a=i||e,o=a&&mt(a,"SegmentTimeline")[0],l=i||s||e,c=l&&mt(l,"Initialization")[0],d=e&&kt(e);d&&c?d.initialization=c&&kt(c):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const m={template:d,segmentTimeline:o&&mt(o,"S").map(g=>kt(g)),list:i&&Mt(kt(i),{segmentUrls:n,initialization:kt(c)}),base:s&&Mt(kt(s),{initialization:kt(c)})};return Object.keys(m).forEach(g=>{m[g]||delete m[g]}),m},Kv=(r,e,i)=>n=>{const s=mt(n,"BaseURL"),a=Da(e,s),o=Mt(r,kt(n)),l=Bl(n);return a.map(c=>({segmentInfo:Mt(i,l),attributes:Mt(o,c)}))},Qv=r=>r.reduce((e,i)=>{const n=kt(i);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());const s=Xv[n.schemeIdUri];if(s){e[s]={attributes:n};const a=mt(i,"cenc:pssh")[0];if(a){const o=os(a);e[s].pssh=o&&Sh(o)}}return e},{}),Zv=r=>{if(r.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(i=>{let n,s;return s=i,/^CC\d=/.test(i)?[n,s]=i.split("="):/^CC\d$/.test(i)&&(n=i),{channel:n,language:s}});if(r.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(i=>{const n={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(i)){const[s,a=""]=i.split("=");n.channel=s,n.language=i,a.split(",").forEach(o=>{const[l,c]=o.split(":");l==="lang"?n.language=c:l==="er"?n.easyReader=Number(c):l==="war"?n.aspectRatio=Number(c):l==="3D"&&(n["3D"]=Number(c))})}else n.language=i;return n.channel&&(n.channel="SERVICE"+n.channel),n})},Jv=r=>sr(mt(r.node,"EventStream").map(e=>{const i=kt(e),n=i.schemeIdUri;return mt(e,"Event").map(s=>{const a=kt(s),o=a.presentationTime||0,l=i.timescale||1,c=a.duration||0,d=o/l+r.attributes.start;return{schemeIdUri:n,value:i.value,id:a.id,start:d,end:d+c/l,messageData:os(s)||a.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),ey=(r,e,i)=>n=>{const s=kt(n),a=Da(e,mt(n,"BaseURL")),o=mt(n,"Role")[0],l={role:kt(o)};let c=Mt(r,s,l);const d=mt(n,"Accessibility")[0],m=Zv(kt(d));m&&(c=Mt(c,{captionServices:m}));const g=mt(n,"Label")[0];if(g&&g.childNodes.length){const b=g.childNodes[0].nodeValue.trim();c=Mt(c,{label:b})}const x=Qv(mt(n,"ContentProtection"));Object.keys(x).length&&(c=Mt(c,{contentProtection:x}));const T=Bl(n),E=mt(n,"Representation"),v=Mt(i,T);return sr(E.map(Kv(c,a,v)))},ty=(r,e)=>(i,n)=>{const s=Da(e,mt(i.node,"BaseURL")),a=Mt(r,{periodStart:i.attributes.start});typeof i.attributes.duration=="number"&&(a.periodDuration=i.attributes.duration);const o=mt(i.node,"AdaptationSet"),l=Bl(i.node);return sr(o.map(ey(a,s,l)))},iy=(r,e)=>{if(r.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!r.length)return null;const i=Mt({serverURL:os(r[0])},kt(r[0]));return i.queryBeforeStart=i.queryBeforeStart==="true",i},ny=({attributes:r,priorPeriodAttributes:e,mpdType:i})=>typeof r.start=="number"?r.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&i==="static"?0:null,ry=(r,e={})=>{const{manifestUri:i="",NOW:n=Date.now(),clientOffset:s=0,eventHandler:a=function(){}}=e,o=mt(r,"Period");if(!o.length)throw new Error(ar.INVALID_NUMBER_OF_PERIOD);const l=mt(r,"Location"),c=kt(r),d=Da([{baseUrl:i}],mt(r,"BaseURL")),m=mt(r,"ContentSteering");c.type=c.type||"static",c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=n,c.clientOffset=s,l.length&&(c.locations=l.map(os));const g=[];return o.forEach((x,T)=>{const E=kt(x),v=g[T-1];E.start=ny({attributes:E,priorPeriodAttributes:v?v.attributes:null,mpdType:c.type}),g.push({node:x,attributes:E})}),{locations:c.locations,contentSteeringInfo:iy(m,a),representationInfo:sr(g.map(ty(c,d))),eventStream:sr(g.map(Jv))}},Mh=r=>{if(r==="")throw new Error(ar.DASH_EMPTY_MANIFEST);const e=new pv.DOMParser;let i,n;try{i=e.parseFromString(r,"application/xml"),n=i&&i.documentElement.tagName==="MPD"?i.documentElement:null}catch{}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(ar.DASH_INVALID_XML);return n},sy=r=>{const e=mt(r,"UTCTiming")[0];if(!e)return null;const i=kt(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(ar.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},ay=(r,e={})=>{const i=ry(Mh(r),e),n=Gv(i.representationInfo);return Rv({dashPlaylists:n,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:i.eventStream})},oy=r=>sy(Mh(r));var Io,Wc;function ly(){if(Wc)return Io;Wc=1;var r=Math.pow(2,32),e=function(i){var n=new DataView(i.buffer,i.byteOffset,i.byteLength),s;return n.getBigUint64?(s=n.getBigUint64(0),s<Number.MAX_SAFE_INTEGER?Number(s):s):n.getUint32(0)*r+n.getUint32(4)};return Io={getUint64:e,MAX_UINT32:r},Io}var No,Yc;function uy(){if(Yc)return No;Yc=1;var r=ly().getUint64,e=function(i){var n=new DataView(i.buffer,i.byteOffset,i.byteLength),s={version:i[0],flags:new Uint8Array(i.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},a=12;s.version===0?(s.earliestPresentationTime=n.getUint32(a),s.firstOffset=n.getUint32(a+4),a+=8):(s.earliestPresentationTime=r(i.subarray(a)),s.firstOffset=r(i.subarray(a+8)),a+=16),a+=2;var o=n.getUint16(a);for(a+=2;o>0;a+=12,o--)s.references.push({referenceType:(i[a]&128)>>>7,referencedSize:n.getUint32(a)&2147483647,subsegmentDuration:n.getUint32(a+4),startsWithSap:!!(i[a+8]&128),sapType:(i[a+8]&112)>>>4,sapDeltaTime:n.getUint32(a+8)&268435455});return s};return No=e,No}var cy=uy();const dy=fr(cy);var hy=Ue([73,68,51]),fy=function(e,i){i===void 0&&(i=0),e=Ue(e);var n=e[i+5],s=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],a=(n&16)>>4;return a?s+20:s+10},Gr=function r(e,i){return i===void 0&&(i=0),e=Ue(e),e.length-i<10||!ft(e,hy,{offset:i})?i:(i+=fy(e,i),r(e,i))},Xc=function(e){return typeof e=="string"?Ah(e):e},py=function(e){return Array.isArray(e)?e.map(function(i){return Xc(i)}):[Xc(e)]},my=function r(e,i,n){n===void 0&&(n=!1),i=py(i),e=Ue(e);var s=[];if(!i.length)return s;for(var a=0;a<e.length;){var o=(e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3])>>>0,l=e.subarray(a+4,a+8);if(o===0)break;var c=a+o;if(c>e.length){if(n)break;c=e.length}var d=e.subarray(a+8,c);ft(l,i[0])&&(i.length===1?s.push(d):s.push.apply(s,r(d,i.slice(1),n))),a=c}return s},Vs={EBML:Ue([26,69,223,163]),DocType:Ue([66,130]),Segment:Ue([24,83,128,103]),SegmentInfo:Ue([21,73,169,102]),Tracks:Ue([22,84,174,107]),Track:Ue([174]),TrackNumber:Ue([215]),DefaultDuration:Ue([35,227,131]),TrackEntry:Ue([174]),TrackType:Ue([131]),FlagDefault:Ue([136]),CodecID:Ue([134]),CodecPrivate:Ue([99,162]),VideoTrack:Ue([224]),AudioTrack:Ue([225]),Cluster:Ue([31,67,182,117]),Timestamp:Ue([231]),TimestampScale:Ue([42,215,177]),BlockGroup:Ue([160]),BlockDuration:Ue([155]),Block:Ue([161]),SimpleBlock:Ue([163])},Jo=[128,64,32,16,8,4,2,1],gy=function(e){for(var i=1,n=0;n<Jo.length&&!(e&Jo[n]);n++)i++;return i},ta=function(e,i,n,s){n===void 0&&(n=!0),s===void 0&&(s=!1);var a=gy(e[i]),o=e.subarray(i,i+a);return n&&(o=Array.prototype.slice.call(e,i,i+a),o[0]^=Jo[a-1]),{length:a,value:av(o,{signed:s}),bytes:o}},Kc=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return r(i)}):typeof e=="number"?ov(e):e},vy=function(e){return Array.isArray(e)?e.map(function(i){return Kc(i)}):[Kc(e)]},yy=function r(e,i,n){if(n>=i.length)return i.length;var s=ta(i,n,!1);if(ft(e.bytes,s.bytes))return n;var a=ta(i,n+s.length);return r(e,i,n+a.length+a.value+s.length)},Qc=function r(e,i){i=vy(i),e=Ue(e);var n=[];if(!i.length)return n;for(var s=0;s<e.length;){var a=ta(e,s,!1),o=ta(e,s+a.length),l=s+a.length+o.length;o.value===127&&(o.value=yy(a,e,l),o.value!==e.length&&(o.value-=l));var c=l+o.value>e.length?e.length:l+o.value,d=e.subarray(l,c);ft(i[0],a.bytes)&&(i.length===1?n.push(d):n=n.concat(r(d,i.slice(1))));var m=a.length+o.length+d.length;s+=m}return n},_y=Ue([0,0,0,1]),Ty=Ue([0,0,1]),by=Ue([0,0,3]),Cy=function(e){for(var i=[],n=1;n<e.length-2;)ft(e.subarray(n,n+3),by)&&(i.push(n+2),n++),n++;if(i.length===0)return e;var s=e.length-i.length,a=new Uint8Array(s),o=0;for(n=0;n<s;o++,n++)o===i[0]&&(o++,i.shift()),a[n]=e[o];return a},Rh=function(e,i,n,s){e=Ue(e),n=[].concat(n);for(var a=0,o,l=0;a<e.length&&(l<s||o);){var c=void 0;if(ft(e.subarray(a),_y)?c=4:ft(e.subarray(a),Ty)&&(c=3),!c){a++;continue}if(l++,o)return Cy(e.subarray(o,a));var d=void 0;i==="h264"?d=e[a+c]&31:i==="h265"&&(d=e[a+c]>>1&63),n.indexOf(d)!==-1&&(o=a+c),a+=c+(i==="h264"?1:2)}return e.subarray(0,0)},xy=function(e,i,n){return Rh(e,"h264",i,n)},Sy=function(e,i,n){return Rh(e,"h265",i,n)},Jt={webm:Ue([119,101,98,109]),matroska:Ue([109,97,116,114,111,115,107,97]),flac:Ue([102,76,97,67]),ogg:Ue([79,103,103,83]),ac3:Ue([11,119]),riff:Ue([82,73,70,70]),avi:Ue([65,86,73]),wav:Ue([87,65,86,69]),"3gp":Ue([102,116,121,112,51,103]),mp4:Ue([102,116,121,112]),fmp4:Ue([115,116,121,112]),mov:Ue([102,116,121,112,113,116]),moov:Ue([109,111,111,118]),moof:Ue([109,111,111,102])},or={aac:function(e){var i=Gr(e);return ft(e,[255,16],{offset:i,mask:[255,22]})},mp3:function(e){var i=Gr(e);return ft(e,[255,2],{offset:i,mask:[255,6]})},webm:function(e){var i=Qc(e,[Vs.EBML,Vs.DocType])[0];return ft(i,Jt.webm)},mkv:function(e){var i=Qc(e,[Vs.EBML,Vs.DocType])[0];return ft(i,Jt.matroska)},mp4:function(e){if(or["3gp"](e)||or.mov(e))return!1;if(ft(e,Jt.mp4,{offset:4})||ft(e,Jt.fmp4,{offset:4})||ft(e,Jt.moof,{offset:4})||ft(e,Jt.moov,{offset:4}))return!0},mov:function(e){return ft(e,Jt.mov,{offset:4})},"3gp":function(e){return ft(e,Jt["3gp"],{offset:4})},ac3:function(e){var i=Gr(e);return ft(e,Jt.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=Gr(e);return ft(e,Jt.flac,{offset:i})},ogg:function(e){return ft(e,Jt.ogg)},avi:function(e){return ft(e,Jt.riff)&&ft(e,Jt.avi,{offset:8})},wav:function(e){return ft(e,Jt.riff)&&ft(e,Jt.wav,{offset:8})},h264:function(e){return xy(e,7,3).length},h265:function(e){return Sy(e,[32,33],3).length}},el=Object.keys(or).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);el.forEach(function(r){var e=or[r];or[r]=function(i){return e(Ue(i))}});var Ey=or,Ll=function(e){e=Ue(e);for(var i=0;i<el.length;i++){var n=el[i];if(Ey[n](e))return n}return""},ky=function(e){return my(e,["moof"]).length>0},Oo,Zc;function wy(){if(Zc)return Oo;Zc=1;var r=9e4,e,i,n,s,a,o,l;return e=function(c){return c*r},i=function(c,d){return c*d},n=function(c){return c/r},s=function(c,d){return c/d},a=function(c,d){return e(s(c,d))},o=function(c,d){return i(n(c),d)},l=function(c,d,m){return n(m?c:c-d)},Oo={ONE_SECOND_IN_TS:r,secondsToVideoTs:e,secondsToAudioTs:i,videoTsToSeconds:n,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l},Oo}var In=wy();/**
|
|
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 tl="8.23.7";const en={},yn=function(r,e){return en[r]=en[r]||[],e&&(en[r]=en[r].concat(e)),en[r]},Dy=function(r,e){yn(r,e)},Vh=function(r,e){const i=yn(r).indexOf(e);return i<=-1?!1:(en[r]=en[r].slice(),en[r].splice(i,1),!0)},Ay=function(r,e){yn(r,[].concat(e).map(i=>{const n=(...s)=>(Vh(r,n),i(...s));return n}))},ia={prefixed:!0},Ks=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],Jc=Ks[0];let Wr;for(let r=0;r<Ks.length;r++)if(Ks[r][1]in Te){Wr=Ks[r];break}if(Wr){for(let r=0;r<Wr.length;r++)ia[Jc[r]]=Wr[r];ia.prefixed=Wr[0]!==Jc[0]}let ai=[];const Iy=(r,e,i)=>(n,s,a)=>{const o=e.levels[s],l=new RegExp(`^(${o})$`);let c=r;if(n!=="log"&&a.unshift(n.toUpperCase()+":"),i&&(c=`%c${r}`,a.unshift(i)),a.unshift(c+":"),ai){ai.push([].concat(a));const m=ai.length-1e3;ai.splice(0,m>0?m:0)}if(!W.console)return;let d=W.console[n];!d&&n==="debug"&&(d=W.console.info||W.console.log),!(!d||!o||!l.test(n))&&d[Array.isArray(a)?"apply":"call"](W.console,a)};function il(r,e=":",i=""){let n="info",s;function a(...o){s("log",n,o)}return s=Iy(r,a,i),a.createLogger=(o,l,c)=>{const d=l!==void 0?l:e,m=c!==void 0?c:i,g=`${r} ${d} ${o}`;return il(g,d,m)},a.createNewLogger=(o,l,c)=>il(o,l,c),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},a.level=o=>{if(typeof o=="string"){if(!a.levels.hasOwnProperty(o))throw new Error(`"${o}" in not a valid log level`);n=o}return n},a.history=()=>ai?[].concat(ai):[],a.history.filter=o=>(ai||[]).filter(l=>new RegExp(`.*${o}.*`).test(l[0])),a.history.clear=()=>{ai&&(ai.length=0)},a.history.disable=()=>{ai!==null&&(ai.length=0,ai=null)},a.history.enable=()=>{ai===null&&(ai=[])},a.error=(...o)=>s("error",n,o),a.warn=(...o)=>s("warn",n,o),a.debug=(...o)=>s("debug",n,o),a}const Qe=il("VIDEOJS"),Fh=Qe.createLogger,Ny=Object.prototype.toString,$h=function(r){return ji(r)?Object.keys(r):[]};function Xn(r,e){$h(r).forEach(i=>e(r[i],i))}function Uh(r,e,i=0){return $h(r).reduce((n,s)=>e(n,r[s],s),i)}function ji(r){return!!r&&typeof r=="object"}function lr(r){return ji(r)&&Ny.call(r)==="[object Object]"&&r.constructor===Object}function lt(...r){const e={};return r.forEach(i=>{i&&Xn(i,(n,s)=>{if(!lr(n)){e[s]=n;return}lr(e[s])||(e[s]={}),e[s]=lt(e[s],n)})}),e}function zh(r={}){const e=[];for(const i in r)if(r.hasOwnProperty(i)){const n=r[i];e.push(n)}return e}function Aa(r,e,i,n=!0){const s=o=>Object.defineProperty(r,e,{value:o,enumerable:!0,writable:!0}),a={configurable:!0,enumerable:!0,get(){const o=i();return s(o),o}};return n&&(a.set=s),Object.defineProperty(r,e,a)}var Oy=Object.freeze({__proto__:null,each:Xn,reduce:Uh,isObject:ji,isPlain:lr,merge:lt,values:zh,defineLazyProperty:Aa});let Pl=!1,Hh=null,Li=!1,qh,jh=!1,Kn=!1,Qn=!1,Gi=!1,Ml=null,Ia=null;const By=!!(W.cast&&W.cast.framework&&W.cast.framework.CastReceiverContext);let Gh=null,na=!1,Na=!1,ra=!1,Oa=!1,sa=!1,aa=!1,oa=!1;const ns=!!(pr()&&("ontouchstart"in W||W.navigator.maxTouchPoints||W.DocumentTouch&&W.document instanceof W.DocumentTouch)),dn=W.navigator&&W.navigator.userAgentData;dn&&dn.platform&&dn.brands&&(Li=dn.platform==="Android",Kn=!!dn.brands.find(r=>r.brand==="Microsoft Edge"),Qn=!!dn.brands.find(r=>r.brand==="Chromium"),Gi=!Kn&&Qn,Ml=Ia=(dn.brands.find(r=>r.brand==="Chromium")||{}).version||null,Na=dn.platform==="Windows");if(!Qn){const r=W.navigator&&W.navigator.userAgent||"";Pl=/iPod/i.test(r),Hh=(function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null})(),Li=/Android/i.test(r),qh=(function(){const e=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const i=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return i&&n?parseFloat(e[1]+"."+e[2]):i||null})(),jh=/Firefox/i.test(r),Kn=/Edg/i.test(r),Qn=/Chrome/i.test(r)||/CriOS/i.test(r),Gi=!Kn&&Qn,Ml=Ia=(function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null})(),Gh=(function(){const e=/MSIE\s(\d+)\.\d/.exec(r);let i=e&&parseFloat(e[1]);return!i&&/Trident\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(i=11),i})(),sa=/Tizen/i.test(r),aa=/Web0S/i.test(r),oa=sa||aa,na=/Safari/i.test(r)&&!Gi&&!Li&&!Kn&&!oa,Na=/Windows/i.test(r),ra=/iPad/i.test(r)||na&&ns&&!/iPhone/i.test(r),Oa=/iPhone/i.test(r)&&!ra}const jt=Oa||ra||Pl,Ba=(na||jt)&&!Gi;var Wh=Object.freeze({__proto__:null,get IS_IPOD(){return Pl},get IOS_VERSION(){return Hh},get IS_ANDROID(){return Li},get ANDROID_VERSION(){return qh},get IS_FIREFOX(){return jh},get IS_EDGE(){return Kn},get IS_CHROMIUM(){return Qn},get IS_CHROME(){return Gi},get CHROMIUM_VERSION(){return Ml},get CHROME_VERSION(){return Ia},IS_CHROMECAST_RECEIVER:By,get IE_VERSION(){return Gh},get IS_SAFARI(){return na},get IS_WINDOWS(){return Na},get IS_IPAD(){return ra},get IS_IPHONE(){return Oa},get IS_TIZEN(){return sa},get IS_WEBOS(){return aa},get IS_SMART_TV(){return oa},TOUCH_ENABLED:ns,IS_IOS:jt,IS_ANY_SAFARI:Ba});function ed(r){return typeof r=="string"&&!!r.trim()}function Ly(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function pr(){return Te===W.document}function mr(r){return ji(r)&&r.nodeType===1}function Yh(){try{return W.parent!==W.self}catch{return!0}}function Xh(r){return function(e,i){if(!ed(e))return Te[r](null);ed(i)&&(i=Te.querySelector(i));const n=mr(i)?i:Te;return n[r]&&n[r](e)}}function He(r="div",e={},i={},n){const s=Te.createElement(r);return Object.getOwnPropertyNames(e).forEach(function(a){const o=e[a];a==="textContent"?bn(s,o):(s[a]!==o||a==="tabIndex")&&(s[a]=o)}),Object.getOwnPropertyNames(i).forEach(function(a){s.setAttribute(a,i[a])}),n&&Rl(s,n),s}function bn(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function nl(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Kr(r,e){return Ly(e),r.classList.contains(e)}function Ln(r,...e){return r.classList.add(...e.reduce((i,n)=>i.concat(n.split(/\s+/)),[])),r}function La(r,...e){return r?(r.classList.remove(...e.reduce((i,n)=>i.concat(n.split(/\s+/)),[])),r):(Qe.warn("removeClass was called with an element that doesn't exist"),null)}function Kh(r,e,i){return typeof i=="function"&&(i=i(r,e)),typeof i!="boolean"&&(i=void 0),e.split(/\s+/).forEach(n=>r.classList.toggle(n,i)),r}function Qh(r,e){Object.getOwnPropertyNames(e).forEach(function(i){const n=e[i];n===null||typeof n>"u"||n===!1?r.removeAttribute(i):r.setAttribute(i,n===!0?"":n)})}function fn(r){const e={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(r&&r.attributes&&r.attributes.length>0){const n=r.attributes;for(let s=n.length-1;s>=0;s--){const a=n[s].name;let o=n[s].value;i.includes(a)&&(o=o!==null),e[a]=o}}return e}function Zh(r,e){return r.getAttribute(e)}function ur(r,e,i){r.setAttribute(e,i)}function Pa(r,e){r.removeAttribute(e)}function Jh(){Te.body.focus(),Te.onselectstart=function(){return!1}}function e0(){Te.onselectstart=function(){return!0}}function cr(r){if(r&&r.getBoundingClientRect&&r.parentNode){const e=r.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(n=>{e[n]!==void 0&&(i[n]=e[n])}),i.height||(i.height=parseFloat(dr(r,"height"))),i.width||(i.width=parseFloat(dr(r,"width"))),i}}function rs(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};const e=r.offsetWidth,i=r.offsetHeight;let n=0,s=0;for(;r.offsetParent&&r!==Te[ia.fullscreenElement];)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;return{left:n,top:s,width:e,height:i}}function Ma(r,e){const i={x:0,y:0};if(jt){let m=r;for(;m&&m.nodeName.toLowerCase()!=="html";){const g=dr(m,"transform");if(/^matrix/.test(g)){const x=g.slice(7,-1).split(/,\s/).map(Number);i.x+=x[4],i.y+=x[5]}else if(/^matrix3d/.test(g)){const x=g.slice(9,-1).split(/,\s/).map(Number);i.x+=x[12],i.y+=x[13]}if(m.assignedSlot&&m.assignedSlot.parentElement&&W.WebKitCSSMatrix){const x=W.getComputedStyle(m.assignedSlot.parentElement).transform,T=new W.WebKitCSSMatrix(x);i.x+=T.m41,i.y+=T.m42}m=m.parentNode||m.host}}const n={},s=rs(e.target),a=rs(r),o=a.width,l=a.height;let c=e.offsetY-(a.top-s.top),d=e.offsetX-(a.left-s.left);return e.changedTouches&&(d=e.changedTouches[0].pageX-a.left,c=e.changedTouches[0].pageY+a.top,jt&&(d-=i.x,c-=i.y)),n.y=1-Math.max(0,Math.min(1,c/l)),n.x=Math.max(0,Math.min(1,d/o)),n}function t0(r){return ji(r)&&r.nodeType===3}function Ra(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function i0(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),mr(e)||t0(e))return e;if(typeof e=="string"&&/\S/.test(e))return Te.createTextNode(e)}).filter(e=>e)}function Rl(r,e){return i0(e).forEach(i=>r.appendChild(i)),r}function n0(r,e){return Rl(Ra(r),e)}function ss(r){return r.button===void 0&&r.buttons===void 0||r.button===0&&r.buttons===void 0||r.type==="mouseup"&&r.button===0&&r.buttons===0||r.type==="mousedown"&&r.button===0&&r.buttons===0?!0:!(r.button!==0||r.buttons!==1)}const _n=Xh("querySelector"),r0=Xh("querySelectorAll");function dr(r,e){if(!r||!e)return"";if(typeof W.getComputedStyle=="function"){let i;try{i=W.getComputedStyle(r)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}function s0(r){[...Te.styleSheets].forEach(e=>{try{const i=[...e.cssRules].map(s=>s.cssText).join(""),n=Te.createElement("style");n.textContent=i,r.document.head.appendChild(n)}catch{const n=Te.createElement("link");n.rel="stylesheet",n.type=e.type,n.media=e.media.mediaText,n.href=e.href,r.document.head.appendChild(n)}})}var a0=Object.freeze({__proto__:null,isReal:pr,isEl:mr,isInFrame:Yh,createEl:He,textContent:bn,prependTo:nl,hasClass:Kr,addClass:Ln,removeClass:La,toggleClass:Kh,setAttributes:Qh,getAttributes:fn,getAttribute:Zh,setAttribute:ur,removeAttribute:Pa,blockTextSelection:Jh,unblockTextSelection:e0,getBoundingClientRect:cr,findPosition:rs,getPointerPosition:Ma,isTextNode:t0,emptyEl:Ra,normalizeContent:i0,appendContent:Rl,insertContent:n0,isSingleLeftClick:ss,$:_n,$$:r0,computedStyle:dr,copyStyleSheetsToWindow:s0});let o0=!1,rl;const Py=function(){if(rl.options.autoSetup===!1)return;const r=Array.prototype.slice.call(Te.getElementsByTagName("video")),e=Array.prototype.slice.call(Te.getElementsByTagName("audio")),i=Array.prototype.slice.call(Te.getElementsByTagName("video-js")),n=r.concat(e,i);if(n&&n.length>0)for(let s=0,a=n.length;s<a;s++){const o=n[s];if(o&&o.getAttribute)o.player===void 0&&o.getAttribute("data-setup")!==null&&rl(o);else{sl(1);break}}else o0||sl(1)};function sl(r,e){pr()&&(e&&(rl=e),W.setTimeout(Py,r))}function al(){o0=!0,W.removeEventListener("load",al)}pr()&&(Te.readyState==="complete"?al():W.addEventListener("load",al));const l0=function(r){const e=Te.createElement("style");return e.className=r,e},u0=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var ti=new WeakMap;const My=3;let Ry=My;function xi(){return Ry++}function td(r,e){if(!ti.has(r))return;const i=ti.get(r);i.handlers[e].length===0&&(delete i.handlers[e],r.removeEventListener?r.removeEventListener(e,i.dispatcher,!1):r.detachEvent&&r.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&&ti.delete(r)}function Vl(r,e,i,n){i.forEach(function(s){r(e,s,n)})}function Va(r){if(r.fixed_)return r;function e(){return!0}function i(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){const n=r||W.event;r={};const s=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const a in n)s.includes(a)||a==="returnValue"&&n.preventDefault||(r[a]=n[a]);if(r.target||(r.target=r.srcElement||Te),r.relatedTarget||(r.relatedTarget=r.fromElement===r.target?r.toElement:r.fromElement),r.preventDefault=function(){n.preventDefault&&n.preventDefault(),r.returnValue=!1,n.returnValue=!1,r.defaultPrevented=!0},r.defaultPrevented=!1,r.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),r.cancelBubble=!0,n.cancelBubble=!0,r.isPropagationStopped=e},r.isPropagationStopped=i,r.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=i,r.clientX!==null&&r.clientX!==void 0){const a=Te.documentElement,o=Te.body;r.pageX=r.clientX+(a&&a.scrollLeft||o&&o.scrollLeft||0)-(a&&a.clientLeft||o&&o.clientLeft||0),r.pageY=r.clientY+(a&&a.scrollTop||o&&o.scrollTop||0)-(a&&a.clientTop||o&&o.clientTop||0)}r.which=r.charCode||r.keyCode,r.button!==null&&r.button!==void 0&&(r.button=r.button&1?0:r.button&4?1:r.button&2?2:0)}return r.fixed_=!0,r}let Fs;const Vy=function(){if(typeof Fs!="boolean"){Fs=!1;try{const r=Object.defineProperty({},"passive",{get(){Fs=!0}});W.addEventListener("test",null,r),W.removeEventListener("test",null,r)}catch{}}return Fs},Fy=["touchstart","touchmove"];function pi(r,e,i){if(Array.isArray(e))return Vl(pi,r,e,i);ti.has(r)||ti.set(r,{});const n=ti.get(r);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),i.guid||(i.guid=xi()),n.handlers[e].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(s,a){if(n.disabled)return;s=Va(s);const o=n.handlers[s.type];if(o){const l=o.slice(0);for(let c=0,d=l.length;c<d&&!s.isImmediatePropagationStopped();c++)try{l[c].call(r,s,a)}catch(m){Qe.error(m)}}}),n.handlers[e].length===1)if(r.addEventListener){let s=!1;Vy()&&Fy.indexOf(e)>-1&&(s={passive:!0}),r.addEventListener(e,n.dispatcher,s)}else r.attachEvent&&r.attachEvent("on"+e,n.dispatcher)}function Gt(r,e,i){if(!ti.has(r))return;const n=ti.get(r);if(!n.handlers)return;if(Array.isArray(e))return Vl(Gt,r,e,i);const s=function(o,l){n.handlers[l]=[],td(o,l)};if(e===void 0){for(const o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&s(r,o);return}const a=n.handlers[e];if(a){if(!i){s(r,e);return}if(i.guid)for(let o=0;o<a.length;o++)a[o].guid===i.guid&&a.splice(o--,1);td(r,e)}}function gr(r,e,i){const n=ti.has(r)?ti.get(r):{},s=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=Va(e),n.dispatcher&&n.dispatcher.call(r,e,i),s&&!e.isPropagationStopped()&&e.bubbles===!0)gr.call(null,s,e,i);else if(!s&&!e.defaultPrevented&&e.target&&e.target[e.type]){ti.has(e.target)||ti.set(e.target,{});const a=ti.get(e.target);e.target[e.type]&&(a.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),a.disabled=!1)}return!e.defaultPrevented}function Fa(r,e,i){if(Array.isArray(e))return Vl(Fa,r,e,i);const n=function(){Gt(r,e,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||xi(),pi(r,e,n)}function Fl(r,e,i){const n=function(){Gt(r,e,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||xi(),pi(r,e,n)}var $y=Object.freeze({__proto__:null,fixEvent:Va,on:pi,off:Gt,trigger:gr,one:Fa,any:Fl});const Si=30,ct=function(r,e,i){e.guid||(e.guid=xi());const n=e.bind(r);return n.guid=i?i+"_"+e.guid:e.guid,n},Wi=function(r,e){let i=W.performance.now();return function(...s){const a=W.performance.now();a-i>=e&&(r(...s),i=a)}},c0=function(r,e,i,n=W){let s;const a=()=>{n.clearTimeout(s),s=null},o=function(){const l=this,c=arguments;let d=function(){s=null,d=null,i||r.apply(l,c)};!s&&i&&r.apply(l,c),n.clearTimeout(s),s=n.setTimeout(d,e)};return o.cancel=a,o};var Uy=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Si,bind_:ct,throttle:Wi,debounce:c0});let zr;class mi{on(e,i){const n=this.addEventListener;this.addEventListener=()=>{},pi(this,e,i),this.addEventListener=n}off(e,i){Gt(this,e,i)}one(e,i){const n=this.addEventListener;this.addEventListener=()=>{},Fa(this,e,i),this.addEventListener=n}any(e,i){const n=this.addEventListener;this.addEventListener=()=>{},Fl(this,e,i),this.addEventListener=n}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),gr(this,e)}queueTrigger(e){zr||(zr=new Map);const i=e.type||e;let n=zr.get(this);n||(n=new Map,zr.set(this,n));const s=n.get(i);n.delete(i),W.clearTimeout(s);const a=W.setTimeout(()=>{n.delete(i),n.size===0&&(n=null,zr.delete(this)),this.trigger(e)},0);n.set(i,a)}}mi.prototype.allowedEvents_={};mi.prototype.addEventListener=mi.prototype.on;mi.prototype.removeEventListener=mi.prototype.off;mi.prototype.dispatchEvent=mi.prototype.trigger;const $a=r=>typeof r.name=="function"?r.name():typeof r.name=="string"?r.name:r.name_?r.name_:r.constructor&&r.constructor.name?r.constructor.name:typeof r,rn=r=>r instanceof mi||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),zy=(r,e)=>{rn(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},ol=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,la=(r,e,i)=>{if(!r||!r.nodeName&&!rn(r))throw new Error(`Invalid target for ${$a(e)}#${i}; must be a DOM node or evented object.`)},d0=(r,e,i)=>{if(!ol(r))throw new Error(`Invalid event type for ${$a(e)}#${i}; must be a non-empty string or array.`)},h0=(r,e,i)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${$a(e)}#${i}; must be a function.`)},Bo=(r,e,i)=>{const n=e.length<3||e[0]===r||e[0]===r.eventBusEl_;let s,a,o;return n?(s=r.eventBusEl_,e.length>=3&&e.shift(),[a,o]=e):(s=e[0],a=e[1],o=e[2]),la(s,r,i),d0(a,r,i),h0(o,r,i),o=ct(r,o),{isTargetingSelf:n,target:s,type:a,listener:o}},wn=(r,e,i,n)=>{la(r,r,e),r.nodeName?$y[e](r,i,n):r[e](i,n)},Hy={on(...r){const{isTargetingSelf:e,target:i,type:n,listener:s}=Bo(this,r,"on");if(wn(i,"on",n,s),!e){const a=()=>this.off(i,n,s);a.guid=s.guid;const o=()=>this.off("dispose",a);o.guid=s.guid,wn(this,"on","dispose",a),wn(i,"on","dispose",o)}},one(...r){const{isTargetingSelf:e,target:i,type:n,listener:s}=Bo(this,r,"one");if(e)wn(i,"one",n,s);else{const a=(...o)=>{this.off(i,n,a),s.apply(null,o)};a.guid=s.guid,wn(i,"one",n,a)}},any(...r){const{isTargetingSelf:e,target:i,type:n,listener:s}=Bo(this,r,"any");if(e)wn(i,"any",n,s);else{const a=(...o)=>{this.off(i,n,a),s.apply(null,o)};a.guid=s.guid,wn(i,"any",n,a)}},off(r,e,i){if(!r||ol(r))Gt(this.eventBusEl_,r,e);else{const n=r,s=e;la(n,this,"off"),d0(s,this,"off"),h0(i,this,"off"),i=ct(this,i),this.off("dispose",i),n.nodeName?(Gt(n,s,i),Gt(n,"dispose",i)):rn(n)&&(n.off(s,i),n.off("dispose",i))}},trigger(r,e){la(this.eventBusEl_,this,"trigger");const i=r&&typeof r!="string"?r.type:r;if(!ol(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 gr(this.eventBusEl_,r,e)}};function $l(r,e={}){const{eventBusKey:i}=e;if(i){if(!r[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);r.eventBusEl_=r[i]}else r.eventBusEl_=He("span",{className:"vjs-event-bus"});return Object.assign(r,Hy),r.eventedCallbacks&&r.eventedCallbacks.forEach(n=>{n()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(n){n&&ti.has(n)&&ti.delete(n)}),W.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const qy={state:{},setState(r){typeof r=="function"&&(r=r());let e;return Xn(r,(i,n)=>{this.state[n]!==i&&(e=e||{},e[n]={from:this.state[n],to:i}),this.state[n]=i}),e&&rn(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function f0(r,e){return Object.assign(r,qy),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&rn(r)&&r.on("statechanged",r.handleStateChanged),r}const Qr=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},bt=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},p0=function(r,e){return bt(r)===bt(e)};var jy=Object.freeze({__proto__:null,toLowerCase:Qr,toTitleCase:bt,titleCaseEquals:p0});class de{constructor(e,i,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=lt({},this.options_),i=this.options_=lt(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){const s=e&&e.id&&e.id()||"no_player";this.id_=`${s}_component_${xi()}`}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(s=>this.addClass(s)),["on","off","one","any","trigger"].forEach(s=>{this[s]=void 0}),i.evented!==!1&&($l(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),f0(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(n),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_=lt(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,i,n){return He(e,i,n)}localize(e,i,n=e){const s=this.player_.language&&this.player_.language(),a=this.player_.languages&&this.player_.languages(),o=a&&a[s],l=s&&s.split("-")[0],c=a&&a[l];let d=n;return o&&o[e]?d=o[e]:c&&c[e]&&(d=c[e]),i&&(d=d.replace(/\{(\d+)\}/g,function(m,g){const x=i[g-1];let T=x;return typeof x>"u"&&(T=m),T})),d}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((n,s)=>n.concat(s),[]);let i=this;for(let n=0;n<e.length;n++)if(i=i.getChild(e[n]),!i||!i.getChild)return;return i}setIcon(e,i=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const n="http://www.w3.org/2000/svg",s=He("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),a=Te.createElementNS(n,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const o=Te.createElementNS(n,"use");return a.appendChild(o),o.setAttributeNS(null,"href",`#vjs-icon-${e}`),s.appendChild(a),this.iconIsSet_?i.replaceChild(s,i.querySelector(".vjs-icon-placeholder")):i.appendChild(s),this.iconIsSet_=!0,s}addChild(e,i={},n=this.children_.length){let s,a;if(typeof e=="string"){a=bt(e);const o=i.componentClass||a;i.name=a;const l=de.getComponent(o);if(!l)throw new Error(`Component ${o} does not exist`);if(typeof l!="function")return null;s=new l(this.player_||this,i)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(n,0,s),s.parentComponent_=this,typeof s.id=="function"&&(this.childIndex_[s.id()]=s),a=a||s.name&&bt(s.name()),a&&(this.childNameIndex_[a]=s,this.childNameIndex_[Qr(a)]=s),typeof s.el=="function"&&s.el()){let o=null;this.children_[n+1]&&(this.children_[n+1].el_?o=this.children_[n+1].el_:mr(this.children_[n+1])&&(o=this.children_[n+1])),this.contentEl().insertBefore(s.el(),o)}return s}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let i=!1;for(let s=this.children_.length-1;s>=0;s--)if(this.children_[s]===e){i=!0,this.children_.splice(s,1);break}if(!i)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[bt(e.name())]=null,this.childNameIndex_[Qr(e.name())]=null;const n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const i=this.options_,n=o=>{const l=o.name;let c=o.opts;if(i[l]!==void 0&&(c=i[l]),c===!1)return;c===!0&&(c={}),c.playerOptions=this.options_.playerOptions;const d=this.addChild(l,c);d&&(this[l]=d)};let s;const a=de.getComponent("Tech");Array.isArray(e)?s=e:s=Object.keys(e),s.concat(Object.keys(this.options_).filter(function(o){return!s.some(function(l){return typeof l=="string"?o===l:o===l.name})})).map(o=>{let l,c;return typeof o=="string"?(l=o,c=e[l]||this.options_[l]||{}):(l=o.name,c=o),{name:l,opts:c}}).filter(o=>{const l=de.getComponent(o.opts.componentClass||bt(o.name));return l&&!a.isTech(l)}).forEach(n)}}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 _n(e,i||this.contentEl())}$$(e,i){return r0(e,i||this.contentEl())}hasClass(e){return Kr(this.el_,e)}addClass(...e){Ln(this.el_,...e)}removeClass(...e){La(this.el_,...e)}toggleClass(e,i){Kh(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 Zh(this.el_,e)}setAttribute(e,i){ur(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,n){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",n||this.trigger("componentresize");return}if(!this.el_)return 0;const s=this.el_.style[e],a=s.indexOf("px");return parseInt(a!==-1?s.slice(0,a):this.el_["offset"+bt(e)],10)}currentDimension(e){let i=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(i=dr(this.el_,e),i=parseFloat(i),i===0||isNaN(i)){const n=`offset${bt(e)}`;i=this.el_[n]}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},n={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:n}}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 n=10,s=200;let a;this.on("touchstart",function(l){l.touches.length===1&&(i={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY},e=W.performance.now(),a=!0)}),this.on("touchmove",function(l){if(l.touches.length>1)a=!1;else if(i){const c=l.touches[0].pageX-i.pageX,d=l.touches[0].pageY-i.pageY;Math.sqrt(c*c+d*d)>n&&(a=!1)}});const o=function(){a=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(l){i=null,a===!0&&W.performance.now()-e<s&&(l.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=ct(this.player(),this.player().reportUserActivity);let i;this.on("touchstart",function(){e(),this.clearInterval(i),i=this.setInterval(e,250)});const n=function(s){e(),this.clearInterval(i)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}setTimeout(e,i){var n;return e=ct(this,e),this.clearTimersOnDispose_(),n=W.setTimeout(()=>{this.setTimeoutIds_.has(n)&&this.setTimeoutIds_.delete(n),e()},i),this.setTimeoutIds_.add(n),n}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),W.clearTimeout(e)),e}setInterval(e,i){e=ct(this,e),this.clearTimersOnDispose_();const n=W.setInterval(e,i);return this.setIntervalIds_.add(n),n}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),W.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=ct(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=ct(this,i);const n=this.requestAnimationFrame(()=>{i(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,n),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((n,s)=>this[i](s))}),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(a){const o=W.getComputedStyle(a,null),l=o.getPropertyValue("visibility");return o.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(l)}function n(a){return!(!i(a.parentElement)||!i(a)||a.style.opacity==="0"||W.getComputedStyle(a).height==="0px"||W.getComputedStyle(a).width==="0px")}function s(a){if(a.offsetWidth+a.offsetHeight+a.getBoundingClientRect().height+a.getBoundingClientRect().width===0)return!1;const o={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2};if(o.x<0||o.x>(Te.documentElement.clientWidth||W.innerWidth)||o.y<0||o.y>(Te.documentElement.clientHeight||W.innerHeight))return!1;let l=Te.elementFromPoint(o.x,o.y);for(;l;){if(l===a)return!0;if(l.parentNode)l=l.parentNode;else return!1}}return e||(e=this.el()),!!(s(e)&&n(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 n=de.getComponent("Tech"),s=n&&n.isTech(i),a=de===i||de.prototype.isPrototypeOf(i.prototype);if(s||!a){let l;throw s?l="techs must be registered using Tech.registerTech()":l="must be a Component subclass",new Error(`Illegal component, "${e}"; ${l}.`)}e=bt(e),de.components_||(de.components_={});const o=de.getComponent("Player");if(e==="Player"&&o&&o.players){const l=o.players,c=Object.keys(l);if(l&&c.length>0){for(let d=0;d<c.length;d++)if(l[c[d]]!==null)throw new Error("Can not register Player component after player has been created.")}}return de.components_[e]=i,de.components_[Qr(e)]=i,i}static getComponent(e){if(!(!e||!de.components_))return de.components_[e]}}de.registerComponent("Component",de);function Gy(r,e,i){if(typeof e!="number"||e<0||e>i)throw new Error(`Failed to execute '${r}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${i}).`)}function id(r,e,i,n){return Gy(r,n,i.length-1),i[n][e]}function Lo(r){let e;return r===void 0||r.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:r.length,start:id.bind(null,"start",0,r),end:id.bind(null,"end",1,r)},W.Symbol&&W.Symbol.iterator&&(e[W.Symbol.iterator]=()=>(r||[]).values()),e}function Bi(r,e){return Array.isArray(r)?Lo(r):r===void 0||e===void 0?Lo():Lo([[r,e]])}const m0=function(r,e){r=r<0?0:r;let i=Math.floor(r%60),n=Math.floor(r/60%60),s=Math.floor(r/3600);const a=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(r)||r===1/0)&&(s=n=i="-"),s=s>0||o>0?s+":":"",n=((s||a>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,s+n+i};let Ul=m0;function g0(r){Ul=r}function v0(){Ul=m0}function Vn(r,e=r){return Ul(r,e)}var Wy=Object.freeze({__proto__:null,createTimeRanges:Bi,createTimeRange:Bi,setFormatTime:g0,resetFormatTime:v0,formatTime:Vn});function y0(r,e){let i=0,n,s;if(!e)return 0;(!r||!r.length)&&(r=Bi(0,0));for(let a=0;a<r.length;a++)n=r.start(a),s=r.end(a),s>e&&(s=e),i+=s-n;return i/e}function _t(r){if(r instanceof _t)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:ji(r)&&(typeof r.code=="number"&&(this.code=r.code),Object.assign(this,r)),this.message||(this.message=_t.defaultMessages[this.code]||"")}_t.prototype.code=0;_t.prototype.message="";_t.prototype.status=null;_t.prototype.metadata=null;_t.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];_t.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."};_t.MEDIA_ERR_CUSTOM=0;_t.prototype.MEDIA_ERR_CUSTOM=0;_t.MEDIA_ERR_ABORTED=1;_t.prototype.MEDIA_ERR_ABORTED=1;_t.MEDIA_ERR_NETWORK=2;_t.prototype.MEDIA_ERR_NETWORK=2;_t.MEDIA_ERR_DECODE=3;_t.prototype.MEDIA_ERR_DECODE=3;_t.MEDIA_ERR_SRC_NOT_SUPPORTED=4;_t.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;_t.MEDIA_ERR_ENCRYPTED=5;_t.prototype.MEDIA_ERR_ENCRYPTED=5;function Zr(r){return r!=null&&typeof r.then=="function"}function Ui(r){Zr(r)&&r.then(null,e=>{})}const ll=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((i,n,s)=>(r[n]&&(i[n]=r[n]),i),{cues:r.cues&&Array.prototype.map.call(r.cues,function(i){return{startTime:i.startTime,endTime:i.endTime,text:i.text,id:i.id}})})},Yy=function(r){const e=r.$$("track"),i=Array.prototype.map.call(e,s=>s.track);return Array.prototype.map.call(e,function(s){const a=ll(s.track);return s.src&&(a.src=s.src),a}).concat(Array.prototype.filter.call(r.textTracks(),function(s){return i.indexOf(s)===-1}).map(ll))},Xy=function(r,e){return r.forEach(function(i){const n=e.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(s=>n.addCue(s))}),e.textTracks()};var ul={textTracksToJson:Yy,jsonToTextTracks:Xy,trackToJson:ll};const Po="vjs-modal-dialog";class vr extends de{constructor(e,i){super(e,i),this.handleKeyDown_=n=>this.handleKeyDown(n),this.close_=n=>this.close(n),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=He("div",{className:`${Po}-content`},{role:"document"}),this.descEl_=He("p",{className:`${Po}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),bn(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`${Po} 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 n=this.getChild("closeButton");if(i&&!n){const s=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=s,this.on(n,"close",this.close_)}!i&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const i=this.contentEl(),n=i.parentNode,s=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(i),this.empty(),n0(i,e),this.trigger("modalfill"),s?n.insertBefore(i,s):n.appendChild(i);const a=this.getChild("closeButton");a&&n.appendChild(a.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=Te.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_(),n=this.el_.querySelector(":focus");let s;for(let a=0;a<i.length;a++)if(n===i[a]){s=a;break}Te.activeElement===this.el_&&(s=0),e.shiftKey&&s===0?(i[i.length-1].focus(),e.preventDefault()):!e.shiftKey&&s===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"))}}vr.prototype.options_={pauseOnOpen:!0,temporary:!0};de.registerComponent("ModalDialog",vr);class Fn extends mi{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 n=0,s=this.length;n<s;n++)if(this[n]===e){i=this[n],i.off&&i.off(),this.tracks_.splice(n,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})}getTrackById(e){let i=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){i=a;break}}return i}}Fn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const r in Fn.prototype.allowedEvents_)Fn.prototype["on"+r]=null;const Mo=function(r,e){for(let i=0;i<r.length;i++)!Object.keys(r[i]).length||e.id===r[i].id||(r[i].enabled=!1)};class _0 extends Fn{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){Mo(e,e[i]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Mo(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Mo(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 Ro=function(r,e){for(let i=0;i<r.length;i++)!Object.keys(r[i]).length||e.id===r[i].id||(r[i].selected=!1)};class T0 extends Fn{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){Ro(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&&Ro(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Ro(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 zl extends Fn{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 Ky{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let i=0,n=e.length;i<n;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 n=0,s=this.trackElements_.length;n<s;n++)if(e===this.trackElements_[n].track){i=this.trackElements_[n];break}return i}removeTrackElement_(e){for(let i=0,n=this.trackElements_.length;i<n;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 ua{constructor(e){ua.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const i=this.length||0;let n=0;const s=e.length;this.cues_=e,this.length_=e.length;const a=function(o){""+o in this||Object.defineProperty(this,""+o,{get(){return this.cues_[o]}})};if(i<s)for(n=i;n<s;n++)a.call(this,n)}getCueById(e){let i=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){i=a;break}}return i}}const Qy={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Zy={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Jy={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},nd={disabled:"disabled",hidden:"hidden",showing:"showing"};class Hl extends mi{constructor(e={}){super();const i={id:e.id||"vjs_track_"+xi(),kind:e.kind||"",language:e.language||""};let n=e.label||"";for(const s in i)Object.defineProperty(this,s,{get(){return i[s]},set(){}});Object.defineProperty(this,"label",{get(){return n},set(s){s!==n&&(n=s,this.trigger("labelchange"))}})}}const ql=function(r){return new URL(r,Te.baseURI)},b0=function(r){return new URL(r,Te.baseURI).href},jl=function(r){if(typeof r=="string"){const i=r.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():""}return""},Ua=function(r,e=W.location){return ql(r).origin!==e.origin};var e_=Object.freeze({__proto__:null,parseUrl:ql,getAbsoluteURL:b0,getFileExtension:jl,isCrossOrigin:Ua});const rd=function(r,e){const i=new W.WebVTT.Parser(W,W.vttjs,W.WebVTT.StringDecoder()),n=[];i.oncue=function(s){e.addCue(s)},i.onparsingerror=function(s){n.push(s)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(r),n.length>0&&(W.console&&W.console.groupCollapsed&&W.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),n.forEach(s=>Qe.error(s)),W.console&&W.console.groupEnd&&W.console.groupEnd()),i.flush()},sd=function(r,e){const i={uri:r},n=Ua(r);n&&(i.cors=n);const s=e.tech_.crossOrigin()==="use-credentials";s&&(i.withCredentials=s),xh(i,ct(this,function(a,o,l){if(a)return Qe.error(a,o);e.loaded_=!0,typeof W.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],c=>{if(c.type==="vttjserror"){Qe.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return rd(l,e)}):rd(l,e)}))};class ls extends Hl{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const i=lt(e,{kind:Jy[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=nd[i.mode]||"disabled";const s=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(n="hidden"),super(i),this.tech_=i.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const a=new ua(this.cues_),o=new ua(this.activeCues_);let l=!1;this.timeupdateHandler=ct(this,function(d={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const c=()=>{this.stopTracking()};this.tech_.one("dispose",c),n!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return s},set(){}},mode:{get(){return n},set(d){nd[d]&&n!==d&&(n=d,!this.preload_&&n!=="disabled"&&this.cues.length===0&&sd(this.src,this),this.stopTracking(),n!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?a:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return o;const d=this.tech_.currentTime(),m=[];for(let g=0,x=this.cues.length;g<x;g++){const T=this.cues[g];T.startTime<=d&&T.endTime>=d&&m.push(T)}if(l=!1,m.length!==this.activeCues_.length)l=!0;else for(let g=0;g<m.length;g++)this.activeCues_.indexOf(m[g])===-1&&(l=!0);return this.activeCues_=m,o.setCues_(this.activeCues_),o},set(){}}}),i.src?(this.src=i.src,this.preload_||(this.loaded_=!0),(this.preload_||i.kind!=="subtitles"&&i.kind!=="captions")&&sd(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 s in e)s in i||(i[s]=e[s]);i.id=e.id,i.originalCue_=e}const n=this.tech_.textTracks();for(let s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_)}toJSON(){return ul.trackToJson(this)}removeCue(e){let i=this.cues_.length;for(;i--;){const n=this.cues_[i];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}}}ls.prototype.allowedEvents_={cuechange:"cuechange"};class C0 extends Hl{constructor(e={}){const i=lt(e,{kind:Zy[e.kind]||""});super(i);let n=!1;Object.defineProperty(this,"enabled",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("enabledchange"))}}),i.enabled&&(this.enabled=i.enabled),this.loaded_=!0}}class x0 extends Hl{constructor(e={}){const i=lt(e,{kind:Qy[e.kind]||""});super(i);let n=!1;Object.defineProperty(this,"selected",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("selectedchange"))}}),i.selected&&(this.selected=i.selected)}}class an extends mi{constructor(e={}){super();let i;const n=new ls(e);this.kind=n.kind,this.src=n.src,this.srclang=n.language,this.label=n.label,this.default=n.default,Object.defineProperties(this,{readyState:{get(){return i}},track:{get(){return n}}}),i=an.NONE,n.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 Ti={audio:{ListClass:_0,TrackClass:C0,capitalName:"Audio"},video:{ListClass:T0,TrackClass:x0,capitalName:"Video"},text:{ListClass:zl,TrackClass:ls,capitalName:"Text"}};Object.keys(Ti).forEach(function(r){Ti[r].getterName=`${r}Tracks`,Ti[r].privateName=`${r}Tracks_`});const hr={remoteText:{ListClass:zl,TrackClass:ls,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ky,TrackClass:an,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},ei=Object.assign({},Ti,hr);hr.names=Object.keys(hr);Ti.names=Object.keys(Ti);ei.names=[].concat(hr.names).concat(Ti.names);function t_(r,e,i,n,s={}){const a=r.textTracks();s.kind=e,i&&(s.label=i),n&&(s.language=n),s.tech=r;const o=new ei.text.TrackClass(s);return a.addTrack(o),o}class Ge extends de{constructor(e={},i=function(){}){e.reportTouchActivity=!1,super(null,e,i),this.onDurationChange_=n=>this.onDurationChange(n),this.trackProgress_=n=>this.trackProgress(n),this.trackCurrentTime_=n=>this.trackCurrentTime(n),this.stopTrackingCurrentTime_=n=>this.stopTrackingCurrentTime(n),this.disposeSourceHandler_=n=>this.disposeSourceHandler(n),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),ei.names.forEach(n=>{const s=ei[n];e&&e[s.getterName]&&(this[s.privateName]=e[s.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(n=>{e[`native${n}Tracks`]===!1&&(this[`featuresNative${n}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 ei.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(ct(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 Bi(0,0)}bufferedPercent(){return y0(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(Ti.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(i=>{const n=this[`${i}Tracks`]()||[];let s=n.length;for(;s--;){const a=n[s];i==="text"&&this.removeRemoteTextTrack(a),n.removeTrack(a)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let i=e.length;for(;i--;){const n=e[i];this.removeRemoteTextTrack(n)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new _t(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Bi(0,0):Bi()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Ti.names.forEach(e=>{const i=Ti[e],n=()=>{this.trigger(`${e}trackchange`)},s=this[i.getterName]();s.addEventListener("removetrack",n),s.addEventListener("addtrack",n),this.on("dispose",()=>{s.removeEventListener("removetrack",n),s.removeEventListener("addtrack",n)})})}addWebVttScript_(){if(!W.WebVTT)if(Te.body.contains(this.el())){if(!this.options_["vtt.js"]&&lr(Ac)&&Object.keys(Ac).length>0){this.trigger("vttjsloaded");return}const e=Te.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(),n=l=>e.addTrack(l.track),s=l=>e.removeTrack(l.track);i.on("addtrack",n),i.on("removetrack",s),this.addWebVttScript_();const a=()=>this.trigger("texttrackchange"),o=()=>{a();for(let l=0;l<e.length;l++){const c=e[l];c.removeEventListener("cuechange",a),c.mode==="showing"&&c.addEventListener("cuechange",a)}};o(),e.addEventListener("change",o),e.addEventListener("addtrack",o),e.addEventListener("removetrack",o),this.on("dispose",function(){i.off("addtrack",n),i.off("removetrack",s),e.removeEventListener("change",o),e.removeEventListener("addtrack",o),e.removeEventListener("removetrack",o);for(let l=0;l<e.length;l++)e[l].removeEventListener("cuechange",a)})}addTextTrack(e,i,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return t_(this,e,i,n)}createRemoteTextTrack(e){const i=lt(e,{tech:this});return new hr.remoteTextEl.TrackClass(i)}addRemoteTextTrack(e={},i){const n=this.createRemoteTextTrack(e);return typeof i!="boolean"&&(i=!1),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),i===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(n.track)),n}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=xi();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 Ge.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Ge||e instanceof Ge||e===Ge}static registerTech(e,i){if(Ge.techs_||(Ge.techs_={}),!Ge.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!Ge.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Ge.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=bt(e),Ge.techs_[e]=i,Ge.techs_[Qr(e)]=i,e!=="Tech"&&Ge.defaultTechOrder_.push(e),i}static getTech(e){if(e){if(Ge.techs_&&Ge.techs_[e])return Ge.techs_[e];if(e=bt(e),W&&W.videojs&&W.videojs[e])return Qe.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),W.videojs[e]}}}ei.names.forEach(function(r){const e=ei[r];Ge.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});Ge.prototype.featuresVolumeControl=!0;Ge.prototype.featuresMuteControl=!0;Ge.prototype.featuresFullscreenResize=!1;Ge.prototype.featuresPlaybackRate=!1;Ge.prototype.featuresProgressEvents=!1;Ge.prototype.featuresSourceset=!1;Ge.prototype.featuresTimeupdateEvents=!1;Ge.prototype.featuresNativeTextTracks=!1;Ge.prototype.featuresVideoFrameCallback=!1;Ge.withSourceHandlers=function(r){r.registerSourceHandler=function(i,n){let s=r.sourceHandlers;s||(s=r.sourceHandlers=[]),n===void 0&&(n=s.length),s.splice(n,0,i)},r.canPlayType=function(i){const n=r.sourceHandlers||[];let s;for(let a=0;a<n.length;a++)if(s=n[a].canPlayType(i),s)return s;return""},r.selectSourceHandler=function(i,n){const s=r.sourceHandlers||[];let a;for(let o=0;o<s.length;o++)if(a=s[o].canHandleSource(i,n),a)return s[o];return null},r.canPlaySource=function(i,n){const s=r.selectSourceHandler(i,n);return s?s.canHandleSource(i,n):""},["seekable","seeking","duration"].forEach(function(i){const n=this[i];typeof n=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):n.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(i){let n=r.selectSourceHandler(i,this.options_);n||(r.nativeSourceHandler?n=r.nativeSourceHandler:Qe.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==r.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=n.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},r.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)}};de.registerComponent("Tech",Ge);Ge.registerTech("Tech",Ge);Ge.defaultTechOrder_=[];const Pn={},ca={},da={};function i_(r,e){Pn[r]=Pn[r]||[],Pn[r].push(e)}function n_(r,e,i){r.setTimeout(()=>Dn(e,Pn[e.type],i,r),1)}function r_(r,e){r.forEach(i=>i.setTech&&i.setTech(e))}function s_(r,e,i){return r.reduceRight(Gl(i),e[i]())}function a_(r,e,i,n){return e[i](r.reduce(Gl(i),n))}function ad(r,e,i,n=null){const s="call"+bt(i),a=r.reduce(Gl(s),n),o=a===da,l=o?null:e[i](a);return u_(r,i,l,o),l}const o_={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},l_={setCurrentTime:1,setMuted:1,setVolume:1},od={play:1,pause:1};function Gl(r){return(e,i)=>e===da?da:i[r]?i[r](e):e}function u_(r,e,i,n){for(let s=r.length-1;s>=0;s--){const a=r[s];a[e]&&a[e](n,i)}}function c_(r){ca.hasOwnProperty(r.id())&&delete ca[r.id()]}function d_(r,e){const i=ca[r.id()];let n=null;if(i==null)return n=e(r),ca[r.id()]=[[e,n]],n;for(let s=0;s<i.length;s++){const[a,o]=i[s];a===e&&(n=o)}return n===null&&(n=e(r),i.push([e,n])),n}function Dn(r={},e=[],i,n,s=[],a=!1){const[o,...l]=e;if(typeof o=="string")Dn(r,Pn[o],i,n,s,a);else if(o){const c=d_(n,o);if(!c.setSource)return s.push(c),Dn(r,l,i,n,s,a);c.setSource(Object.assign({},r),function(d,m){if(d)return Dn(r,l,i,n,s,a);s.push(c),Dn(m,r.type===m.type?l:Pn[m.type],i,n,s,a)})}else l.length?Dn(r,l,i,n,s,a):a?i(r,s):Dn(r,Pn["*"],i,n,s,!0)}const h_={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"},ha=function(r=""){const e=jl(r);return h_[e.toLowerCase()]||""},f_=(r,e)=>{if(!e)return"";if(r.cache_.source.src===e&&r.cache_.source.type)return r.cache_.source.type;const i=r.cache_.sources.filter(s=>s.src===e);if(i.length)return i[0].type;const n=r.$$("source");for(let s=0;s<n.length;s++){const a=n[s];if(a.type&&a.src&&a.src===e)return a.type}return ha(e)},S0=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(i){i=S0(i),Array.isArray(i)?e=e.concat(i):ji(i)&&e.push(i)}),r=e}else typeof r=="string"&&r.trim()?r=[ld({src:r})]:ji(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[ld(r)]:r=[];return r};function ld(r){if(!r.type){const e=ha(r.src);e&&(r.type=e)}return r}var p_=`<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 ud=sa?10009:aa?461:8,qn={codes:{play:415,pause:19,ff:417,rw:412,back:ud},names:{415:"play",19:"pause",417:"ff",412:"rw",[ud]:"back"},isEventKey(r,e){return e=e.toLowerCase(),!!(this.names[r.keyCode]&&this.names[r.keyCode]===e)},getEventName(r){if(this.names[r.keyCode])return this.names[r.keyCode];if(this.codes[r.code]){const e=this.codes[r.code];return this.names[e]}return null}},cd=5;class m_ extends mi{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 n=i.key.substring(5).toLowerCase();this.move(n)}else if(qn.isEventKey(i,"play")||qn.isEventKey(i,"pause")||qn.isEventKey(i,"ff")||qn.isEventKey(i,"rw")){i.preventDefault();const n=qn.getEventName(i);this.performMediaAction_(n)}else qn.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()+cd);break;case"rw":this.userSeek_(this.player_.currentTime()-cd);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 n=null;const s=this.getCurrentComponent(e.target);i&&(n=!!i.closest(".video-js"),i.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!n||!i)&&(s&&s.name()==="CloseButton"?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,i=[];function n(s){for(const a of s)a.hasOwnProperty("el_")&&a.getIsFocusable()&&a.getIsAvailableToBeFocused(a.el())&&i.push(a),a.hasOwnProperty("children_")&&a.children_.length>0&&n(a.children_)}return e.children_.forEach(s=>{if(s.hasOwnProperty("el_"))if(s.getIsFocusable&&s.getIsAvailableToBeFocused&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())){i.push(s);return}else s.hasOwnProperty("children_")&&s.children_.length>0?n(s.children_):s.hasOwnProperty("items")&&s.items.length>0?n(s.items):this.findSuitableDOMChild(s)&&i.push(s);if(s.name_==="ErrorDisplay"&&s.opened_){const a=s.el_.querySelector(".vjs-errors-ok-button-container");a&&a.querySelectorAll("button").forEach((l,c)=>{i.push({name:()=>"ModalButton"+(c+1),el:()=>l,getPositions:()=>{const d=l.getBoundingClientRect(),m={x:d.x,y:d.y,width:d.width,height:d.height,top:d.top,right:d.right,bottom:d.bottom,left:d.left},g={x:d.left+d.width/2,y:d.top+d.height/2,width:0,height:0,top:d.top+d.height/2,right:d.left+d.width/2,bottom:d.top+d.height/2,left:d.left+d.width/2};return{boundingClientRect:m,center:g}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:d=>!0,focus:()=>l.focus()})})}}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){function i(n){if(e.getIsFocusable(n)&&e.getIsAvailableToBeFocused(n))return n;for(let s=0;s<n.children.length;s++){const a=n.children[s],o=i(a);if(o)return o}return null}return e.el()?i(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const i=e||document.activeElement;if(this.focusableComponents.length){for(const n of this.focusableComponents)if(n.el()===i)return n}}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 n=i.getPositions(),s=this.focusableComponents.filter(o=>o!==i&&this.isInDirection_(n.boundingClientRect,o.getPositions().boundingClientRect,e)),a=this.findBestCandidate_(n.center,s,e);a?this.focus(a):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:i})}findBestCandidate_(e,i,n){let s=1/0,a=null;for(const o of i){const l=o.getPositions().center,c=this.calculateDistance_(e,l,n);c<s&&(s=c,a=o)}return a}isInDirection_(e,i,n){switch(n){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,n){const s=Math.abs(e.x-i.x),a=Math.abs(e.y-i.y);let o;switch(n){case"right":case"left":o=s+a*100;break;case"up":o=a*2+s*.5;break;case"down":o=a*5+s;break;default:o=s+a}return o}searchForTrackSelect_(){const e=this;for(const i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break}}}class g_ extends de{constructor(e,i,n){const s=lt({createEl:!1},i);if(super(e,s,n),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let a=0,o=i.playerOptions.techOrder;a<o.length;a++){const l=bt(o[a]);let c=Ge.getTech(l);if(l||(c=de.getComponent(l)),c&&c.isSupported()){e.loadTech_(l);break}}else e.src(i.playerOptions.sources)}}de.registerComponent("MediaLoader",g_);class za extends de{constructor(e,i){super(e,i),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=n=>this.handleMouseOver(n),this.handleMouseOut_=n=>this.handleMouseOut(n),this.handleClick_=n=>this.handleClick(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.emitTapEvents(),this.enable()}createEl(e="div",i={},n={}){i=Object.assign({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&Qe.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),n=Object.assign({role:"button"},n),this.tabIndex_=i.tabIndex;const s=He(e,i,n);return this.player_.options_.experimentalSvgIcons||s.appendChild(He("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=He("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 n=this.localize(e);this.controlText_=e,bn(this.controlTextEl_,n),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",n)}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)}}de.registerComponent("ClickableComponent",za);class cl extends za{constructor(e,i){super(e,i),this.update(),this.update_=n=>this.update(n),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return He("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(He("picture",{className:"vjs-poster",tabIndex:-1},{},He("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())}}cl.prototype.crossorigin=cl.prototype.crossOrigin;de.registerComponent("PosterImage",cl);const yi="#222",dd="#ccc",v_={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 Vo(r,e){let i;if(r.length===4)i=r[1]+r[1]+r[2]+r[2]+r[3]+r[3];else if(r.length===7)i=r.slice(1);else throw new Error("Invalid color code provided, "+r+"; 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(r,e,i){try{r.style[e]=i}catch{return}}function hd(r){return r?`${r}px`:""}class y_ extends de{constructor(e,i,n){super(e,i,n);const s=o=>this.updateDisplay(o),a=o=>{this.updateDisplayOverlay(),this.updateDisplay(o)};e.on("loadstart",o=>this.toggleDisplay(o)),e.on("useractive",s),e.on("userinactive",s),e.on("texttrackchange",s),e.on("loadedmetadata",o=>{this.updateDisplayOverlay(),this.preselectTrack(o)}),e.ready(ct(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",a),e.on("playerresize",a);const o=W.screen.orientation||W,l=W.screen.orientation?"change":"orientationchange";o.addEventListener(l,a),e.on("dispose",()=>o.removeEventListener(l,a));const c=this.options_.playerOptions.tracks||[];for(let d=0;d<c.length;d++)this.player_.addRemoteTextTrack(c[d],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},i=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage;let s,a,o;for(let l=0;l<i.length;l++){const c=i[l];n&&n.enabled&&n.language&&n.language===c.language&&c.kind in e?c.kind===n.kind?o=c:o||(o=c):n&&!n.enabled?(o=null,s=null,a=null):c.default&&(c.kind==="descriptions"&&!s?s=c:c.kind in e&&!a&&(a=c))}o?o.mode="showing":a?a.mode="showing":s&&(s.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 o=[];for(let l=0;l<e.length;++l){const c=e[l];c.mode==="showing"&&o.push(c)}this.updateForTrack(o);return}let n=null,s=null,a=e.length;for(;a--;){const o=e[a];o.mode==="showing"&&(o.kind==="descriptions"?n=o:s=o)}if(s?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):n&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(n)),!(W.CSS!==void 0&&W.CSS.supports("inset","10px"))){const o=this.el_,l=o.querySelectorAll(".vjs-text-track-cue"),c=this.player_.controlBar.el_.getBoundingClientRect().height,d=this.player_.el_.getBoundingClientRect().height;o.style="",Vi(o,"position","relative"),Vi(o,"height",d-c+"px"),Vi(o,"top","unset"),oa?Vi(o,"bottom",d+"px"):Vi(o,"bottom","0px"),l.length>0&&l.forEach(m=>{if(m.style.inset){const g=m.style.inset.split(" ");g.length===3&&Object.assign(m.style,{top:g[0],right:g[1],bottom:g[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(),n=e/i,s=this.player_.videoWidth()/this.player_.videoHeight();let a=0,o=0;Math.abs(n-s)>.1&&(n>s?a=Math.round((e-i*s)/2):o=Math.round((i-e/s)/2)),Vi(this.el_,"insetInline",hd(a)),Vi(this.el_,"insetBlock",hd(o))}updateDisplayState(e){const i=this.player_.textTrackSettings.getValues(),n=e.activeCues;let s=n.length;for(;s--;){const a=n[s];if(!a)continue;const o=a.displayState;if(i.color&&(o.firstChild.style.color=i.color),i.textOpacity&&Vi(o.firstChild,"color",Vo(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(o.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Vi(o.firstChild,"backgroundColor",Vo(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Vi(o,"backgroundColor",Vo(i.windowColor,i.windowOpacity)):o.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?o.firstChild.style.textShadow=`2px 2px 3px ${yi}, 2px 2px 4px ${yi}, 2px 2px 5px ${yi}`:i.edgeStyle==="raised"?o.firstChild.style.textShadow=`1px 1px ${yi}, 2px 2px ${yi}, 3px 3px ${yi}`:i.edgeStyle==="depressed"?o.firstChild.style.textShadow=`1px 1px ${dd}, 0 1px ${dd}, -1px -1px ${yi}, 0 -1px ${yi}`:i.edgeStyle==="uniform"&&(o.firstChild.style.textShadow=`0 0 4px ${yi}, 0 0 4px ${yi}, 0 0 4px ${yi}, 0 0 4px ${yi}`)),i.fontPercent&&i.fontPercent!==1){const l=W.parseFloat(o.style.fontSize);o.style.fontSize=l*i.fontPercent+"px",o.style.height="auto",o.style.top="auto"}i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=v_[i.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof W.WebVTT!="function"||e.every(n=>!n.activeCues))return;const i=[];for(let n=0;n<e.length;++n){const s=e[n];for(let a=0;a<s.activeCues.length;++a)i.push(s.activeCues[a])}W.WebVTT.processCues(W,i,this.el_);for(let n=0;n<e.length;++n){const s=e[n];for(let a=0;a<s.activeCues.length;++a){const o=s.activeCues[a].displayState;Ln(o,"vjs-text-track-cue","vjs-text-track-cue-"+(s.language?s.language:n)),s.language&&ur(o,"lang",s.language)}this.player_.textTrackSettings&&this.updateDisplayState(s)}}}de.registerComponent("TextTrackDisplay",y_);class __ extends de{createEl(){const e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),n=He("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),s=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return s.appendChild(n),s}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}de.registerComponent("LoadingSpinner",__);class Wt extends za{createEl(e,i={},n={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),n=Object.assign({type:"button"},n);const s=He(e,i,n);return this.player_.options_.experimentalSvgIcons||s.appendChild(He("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s}addChild(e,i={}){const n=this.constructor.name;return Qe.warn(`Adding an actionable (user controllable) child to a Button (${n}) is not supported; use a ClickableComponent instead.`),de.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)}}de.registerComponent("Button",Wt);class E0 extends Wt{constructor(e,i){super(e,i),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",n=>this.handleMouseDown(n))}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 n=this.player_.getChild("controlBar"),s=n&&n.getChild("playToggle");if(!s){this.player_.tech(!0).focus();return}const a=()=>s.focus();Zr(i)?i.then(a,()=>{}):this.setTimeout(a,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}E0.prototype.controlText_="Play Video";de.registerComponent("BigPlayButton",E0);class T_ extends Wt{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)}}de.registerComponent("CloseButton",T_);class k0 extends Wt{constructor(e,i={}){super(e,i),i.replay=i.replay===void 0||i.replay,this.setIcon("play"),this.on(e,"play",n=>this.handlePlay(n)),this.on(e,"pause",n=>this.handlePause(n)),i.replay&&this.on(e,"ended",n=>this.handleEnded(n))}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))}}k0.prototype.controlText_="Play";de.registerComponent("PlayToggle",k0);class yr extends de{constructor(e,i){super(e,i),this.on(e,["timeupdate","ended","seeking"],n=>this.update(n)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),i=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),n=He("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return i.appendChild(n),this.contentEl_=He("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=Vn(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,Qe.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_=Te.createTextNode(this.formattedTime_),this.textNode_&&(i?this.contentEl_.replaceChild(this.textNode_,i):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}yr.prototype.labelText_="Time";yr.prototype.controlText_="Time";de.registerComponent("TimeDisplay",yr);class Wl extends yr{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)}}Wl.prototype.labelText_="Current Time";Wl.prototype.controlText_="Current Time";de.registerComponent("CurrentTimeDisplay",Wl);class Yl extends yr{constructor(e,i){super(e,i);const n=s=>this.updateContent(s);this.on(e,"durationchange",n),this.on(e,"loadstart",n),this.on(e,"loadedmetadata",n)}buildCSSClass(){return"vjs-duration"}updateContent(e){const i=this.player_.duration();this.updateTextNode_(i)}}Yl.prototype.labelText_="Duration";Yl.prototype.controlText_="Duration";de.registerComponent("DurationDisplay",Yl);class b_ extends de{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=super.createEl("div"),n=super.createEl("span",{textContent:"/"});return i.appendChild(n),e.appendChild(i),e}}de.registerComponent("TimeDivider",b_);class Xl extends yr{constructor(e,i){super(e,i),this.on(e,"durationchange",n=>this.updateContent(n))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(He("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)}}Xl.prototype.labelText_="Remaining Time";Xl.prototype.controlText_="Remaining Time";de.registerComponent("RemainingTimeDisplay",Xl);class C_ extends de{constructor(e,i){super(e,i),this.updateShowing(),this.on(this.player(),"durationchange",n=>this.updateShowing(n))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=He("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(He("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(Te.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()}}de.registerComponent("LiveDisplay",C_);class w0 extends Wt{constructor(e,i){super(e,i),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=n=>this.updateLiveEdgeStatus(n),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_=He("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()}}w0.prototype.controlText_="Seek to live, currently playing live";de.registerComponent("SeekToLive",w0);function us(r,e,i){return r=Number(r),Math.min(i,Math.max(e,isNaN(r)?e:r))}var x_=Object.freeze({__proto__:null,clamp:us});class Kl extends de{constructor(e,i){super(e,i),this.handleMouseDown_=n=>this.handleMouseDown(n),this.handleMouseUp_=n=>this.handleMouseUp(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.handleClick_=n=>this.handleClick(n),this.handleMouseMove_=n=>this.handleMouseMove(n),this.update_=n=>this.update(n),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={},n={}){return i.className=i.className+" vjs-slider",i=Object.assign({tabIndex:0},i),n=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},n),super.createEl(e,i,n)}handleMouseDown(e){const i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!Gi&&e.preventDefault(),Jh(),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;e0(),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(us(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,n=i&&i.enabled,s=i&&i.horizontalSeek;n?s&&e.key==="ArrowLeft"||!s&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&e.key==="ArrowRight"||!s&&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")}}de.registerComponent("Slider",Kl);const Fo=(r,e)=>us(r/e*100,0,100).toFixed(2)+"%";class S_ extends de{constructor(e,i){super(e,i),this.partEls_=[],this.on(e,"progress",n=>this.update(n))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),i=He("span",{className:"vjs-control-text"}),n=He("span",{textContent:this.localize("Loaded")}),s=Te.createTextNode(": ");return this.percentageEl_=He("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(n),i.appendChild(s),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,n=this.player_.buffered(),s=i&&i.isLive()?i.seekableEnd():this.player_.duration(),a=this.player_.bufferedEnd(),o=this.partEls_,l=Fo(a,s);this.percent_!==l&&(this.el_.style.width=l,bn(this.percentageEl_,l),this.percent_=l);for(let c=0;c<n.length;c++){const d=n.start(c),m=n.end(c);let g=o[c];g||(g=this.el_.appendChild(He()),o[c]=g),!(g.dataset.start===d&&g.dataset.end===m)&&(g.dataset.start=d,g.dataset.end=m,g.style.left=Fo(d,a),g.style.width=Fo(m-d,a))}for(let c=o.length;c>n.length;c--)this.el_.removeChild(o[c-1]);o.length=n.length})}}de.registerComponent("LoadProgressBar",S_);class E_ extends de{constructor(e,i){super(e,i),this.update=Wi(ct(this,this.update),Si)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,i,n){const s=rs(this.el_),a=cr(this.player_.el()),o=e.width*i;if(!a||!s)return;let l=e.left-a.left+o,c=e.width-o+(a.right-e.right);c||(c=e.width-o,l=o);let d=s.width/2;l<d?d+=d-l:c<d&&(d=c),d<0?d=0:d>s.width&&(d=s.width),d=Math.round(d),this.el_.style.right=`-${d}px`,this.write(n)}write(e){bn(this.el_,e)}updateTime(e,i,n,s){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let a;const o=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const l=this.player_.liveTracker.liveWindow(),c=l-i*l;a=(c<1?"":"-")+Vn(c,l)}else a=Vn(n,o);this.update(e,i,a),s&&s()})}}de.registerComponent("TimeTooltip",E_);class Ql extends de{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=Wi(ct(this,this.update),Si)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,i,n){const s=this.getChild("timeTooltip");if(!s)return;const a=n&&n.target&&typeof n.target.pendingSeekTime=="function"?n.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,i,a)}}Ql.prototype.options_={children:[]};!jt&&!Li&&Ql.prototype.options_.children.push("timeTooltip");de.registerComponent("PlayProgressBar",Ql);class D0 extends de{constructor(e,i){super(e,i),this.update=Wi(ct(this,this.update),Si)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i){const n=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,n,()=>{this.el_.style.left=`${e.width*i}px`})}}D0.prototype.options_={children:["timeTooltip"]};de.registerComponent("MouseTimeDisplay",D0);class Ha extends Kl{constructor(e,i){i=lt(Ha.prototype.options_,i),i.children=[...i.children];const n=e.options_.disableSeekWhileScrubbingOnMobile&&(jt||Li)||e.options_.disableSeekWhileScrubbingOnSTV;(!jt&&!Li||n)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=n,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=ct(this,this.update),this.update=Wi(this.update_,Si),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 Te&&"visibilityState"in Te&&this.on(Te,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){Te.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,Si))}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(Te.visibilityState==="hidden")return;const i=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const n=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let a=this.player_.duration();s&&s.isLive()&&(a=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==n||this.duration_!==a)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Vn(n,a),Vn(a,a)],"{1} of {2}")),this.currentTime_=n,this.duration_=a),this.bar&&this.bar.update(cr(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 n=this.player_.liveTracker;return n&&n.isLive()?(i=(e-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i}handleMouseDown(e){ss(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,i=!1){if(!ss(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let n;const s=this.calculateDistance(e),a=this.player_.liveTracker;if(!a||!a.isLive())n=s*this.player_.duration(),n===this.player_.duration()&&(n=n-.1);else{if(s>=.99){a.seekToLiveEdge();return}const o=a.seekableStart(),l=a.liveCurrentTime();if(n=o+s*a.liveWindow(),n>=l&&(n=l),n<=o&&(n=o+.1),n===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(n):this.userSeek_(n),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 n=parseInt(e.key,10)*.1;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*n):this.userSeek_(this.player_.duration()*n)}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 Te&&"visibilityState"in Te&&this.off(Te,"visibilitychange",this.toggleVisibility_),super.dispose()}}Ha.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12};de.registerComponent("SeekBar",Ha);class A0 extends de{constructor(e,i){super(e,i),this.handleMouseMove=Wi(ct(this,this.handleMouseMove),Si),this.throttledHandleMouseSeek=Wi(ct(this,this.handleMouseSeek),Si),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.handleMouseDownHandler_=n=>this.handleMouseDown(n),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const i=this.getChild("seekBar");if(!i)return;const n=i.getChild("playProgressBar"),s=i.getChild("mouseTimeDisplay");if(!n&&!s)return;const a=i.el(),o=rs(a);let l=Ma(a,e).x;l=us(l,0,1),s&&s.update(o,l),n&&n.update(o,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,n=this.getChild("seekBar");n&&n.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()}}A0.prototype.options_={children:["seekBar"]};de.registerComponent("ProgressControl",A0);class I0 extends Wt{constructor(e,i){super(e,i),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],n=>this.handlePictureInPictureChange(n)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],n=>this.handlePictureInPictureEnabledChange(n)),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(){Te.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 Te.exitPictureInPicture=="function"&&super.show()}}I0.prototype.controlText_="Picture-in-Picture";de.registerComponent("PictureInPictureToggle",I0);class N0 extends Wt{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",n=>this.handleFullscreenChange(n)),Te[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()}}N0.prototype.controlText_="Fullscreen";de.registerComponent("FullscreenToggle",N0);const k_=function(r,e){e.tech_&&!e.tech_.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class w_ extends de{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}}de.registerComponent("VolumeLevel",w_);class D_ extends de{constructor(e,i){super(e,i),this.update=Wi(ct(this,this.update),Si)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,i,n,s){if(!n){const a=cr(this.el_),o=cr(this.player_.el()),l=e.width*i;if(!o||!a)return;const c=e.left-o.left+l,d=e.width-l+(o.right-e.right);let m=a.width/2;c<m?m+=m-c:d<m&&(m=d),m<0?m=0:m>a.width&&(m=a.width),this.el_.style.right=`-${m}px`}this.write(`${s}%`)}write(e){bn(this.el_,e)}updateVolume(e,i,n,s,a){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,n,s.toFixed(0)),a&&a()})}}de.registerComponent("VolumeLevelTooltip",D_);class O0 extends de{constructor(e,i){super(e,i),this.update=Wi(ct(this,this.update),Si)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i,n){const s=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,n,s,()=>{n?this.el_.style.bottom=`${e.height*i}px`:this.el_.style.left=`${e.width*i}px`})}}O0.prototype.options_={children:["volumeLevelTooltip"]};de.registerComponent("MouseVolumeLevelDisplay",O0);class qa extends Kl{constructor(e,i){super(e,i),this.on("slideractive",n=>this.updateLastVolume_(n)),this.on(e,"volumechange",n=>this.updateARIAAttributes(n)),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){ss(e)&&super.handleMouseDown(e)}handleMouseMove(e){const i=this.getChild("mouseVolumeLevelDisplay");if(i){const n=this.el(),s=cr(n),a=this.vertical();let o=Ma(n,e);o=a?o.y:o.x,o=us(o,0,1),i.update(s,o,a)}ss(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)})}}qa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!jt&&!Li&&qa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");qa.prototype.playerEvent="volumechange";de.registerComponent("VolumeBar",qa);class B0 extends de{constructor(e,i={}){i.vertical=i.vertical||!1,(typeof i.volumeBar>"u"||lr(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),super(e,i),k_(this,e),this.throttledHandleMouseMove=Wi(ct(this,this.handleMouseMove),Si),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.on("mousedown",n=>this.handleMouseDown(n)),this.on("touchstart",n=>this.handleMouseDown(n)),this.on("mousemove",n=>this.handleMouseMove(n)),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)}}B0.prototype.options_={children:["volumeBar"]};de.registerComponent("VolumeControl",B0);const A_=function(r,e){e.tech_&&!e.tech_.featuresMuteControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresMuteControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class L0 extends Wt{constructor(e,i){super(e,i),A_(this,e),this.on(e,["loadstart","volumechange"],n=>this.update(n))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.volume(),n=this.player_.lastVolume_();if(i===0){const s=n<.1?.1:n;this.player_.volume(s),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"),jt&&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((n,s)=>n+`${s?" ":""}vjs-vol-${s}`,"")),Ln(this.el_,`vjs-vol-${i}`)}updateControlText_(){const i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)}}L0.prototype.controlText_="Mute";de.registerComponent("MuteToggle",L0);class P0 extends de{constructor(e,i={}){typeof i.inline<"u"?i.inline=i.inline:i.inline=!0,(typeof i.volumeControl>"u"||lr(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),super(e,i),this.handleKeyPressHandler_=n=>this.handleKeyPress(n),this.on(e,["loadstart"],n=>this.volumePanelState_(n)),this.on(this.muteToggle,"keyup",n=>this.handleKeyPress(n)),this.on(this.volumeControl,"keyup",n=>this.handleVolumeControlKeyUp(n)),this.on("keydown",n=>this.handleKeyPress(n)),this.on("mouseover",n=>this.handleMouseOver(n)),this.on("mouseout",n=>this.handleMouseOut(n)),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"),pi(Te,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),Gt(Te,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}P0.prototype.options_={children:["muteToggle","volumeControl"]};de.registerComponent("VolumePanel",P0);class M0 extends Wt{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(),n=this.player_.liveTracker,s=n&&n.isLive()?n.seekableEnd():this.player_.duration();let a;i+this.skipTime<=s?a=i+this.skipTime:a=s,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}M0.prototype.controlText_="Skip Forward";de.registerComponent("SkipForward",M0);class R0 extends Wt{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(),n=this.player_.liveTracker,s=n&&n.isLive()&&n.seekableStart();let a;s&&i-this.skipTime<=s?a=s:i>=this.skipTime?a=i-this.skipTime:a=0,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}R0.prototype.controlText_="Skip Backward";de.registerComponent("SkipBackward",R0);class V0 extends de{constructor(e,i){super(e,i),i&&(this.menuButton_=i.menuButton),this.focusedChild_=-1,this.on("keydown",n=>this.handleKeyDown(n)),this.boundHandleBlur_=n=>this.handleBlur(n),this.boundHandleTapClick_=n=>this.handleTapClick(n)}addEventListenerForItem(e){e instanceof de&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof de&&(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_=He(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_),pi(i,"click",function(n){n.preventDefault(),n.stopImmediatePropagation()}),i}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const i=e.relatedTarget||Te.activeElement;if(!this.children().some(n=>n.el()===i)){const n=this.menuButton_;n&&n.buttonPressed_&&i!==n.el().firstChild&&n.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const i=this.children();if(!Array.isArray(i))return;const n=i.filter(s=>s.el()===e.target)[0];if(!n)return;n.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())}}de.registerComponent("Menu",V0);class Zl extends de{constructor(e,i={}){super(e,i),this.menuButton_=new Wt(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const n=Wt.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+n,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=a=>this.handleClick(a);this.handleMenuKeyUp_=a=>this.handleMenuKeyUp(a),this.on(this.menuButton_,"tap",s),this.on(this.menuButton_,"click",s),this.on(this.menuButton_,"keydown",a=>this.handleKeyDown(a)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),pi(Te,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",a=>this.handleMouseLeave(a)),this.on("keydown",a=>this.handleSubmenuKeyDown(a))}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 V0(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=He("li",{className:"vjs-menu-title",textContent:bt(this.options_.title),tabIndex:-1}),n=new de(this.player_,{el:i});e.addItem(n)}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=Wt.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"),Gt(Te,"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"),jt&&Yh())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()}}de.registerComponent("MenuButton",Zl);class Jl extends Zl{constructor(e,i){const n=i.tracks;if(super(e,i),this.items.length<=1&&this.hide(),!n)return;const s=ct(this,this.update);n.addEventListener("removetrack",s),n.addEventListener("addtrack",s),n.addEventListener("labelchange",s),this.player_.on("ready",s),this.player_.on("dispose",function(){n.removeEventListener("removetrack",s),n.removeEventListener("addtrack",s),n.removeEventListener("labelchange",s)})}}de.registerComponent("TrackButton",Jl);class cs extends za{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,n){this.nonIconControl=!0;const s=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},i),n),a=He("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(a):s.replaceChild(a,s.querySelector(".vjs-icon-placeholder")),s}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))}}de.registerComponent("MenuItem",cs);class ds extends cs{constructor(e,i){const n=i.track,s=e.textTracks();i.label=n.label||n.language||"Unknown",i.selected=n.mode==="showing",super(e,i),this.track=n,this.kinds=(i.kinds||[i.kind||this.track.kind]).filter(Boolean);const a=(...l)=>{this.handleTracksChange.apply(this,l)},o=(...l)=>{this.handleSelectedLanguageChange.apply(this,l)};if(e.on(["loadstart","texttrackchange"],a),s.addEventListener("change",a),s.addEventListener("selectedlanguagechange",o),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],a),s.removeEventListener("change",a),s.removeEventListener("selectedlanguagechange",o)}),s.onchange===void 0){let l;this.on(["tap","click"],function(){if(typeof W.Event!="object")try{l=new W.Event("change")}catch{}l||(l=Te.createEvent("Event"),l.initEvent("change",!0,!0)),s.dispatchEvent(l)})}this.handleTracksChange()}handleClick(e){const i=this.track,n=this.player_.textTracks();if(super.handleClick(e),!!n)for(let s=0;s<n.length;s++){const a=n[s];this.kinds.indexOf(a.kind)!==-1&&(a===i?a.mode!=="showing"&&(a.mode="showing"):a.mode!=="disabled"&&(a.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()}}de.registerComponent("TextTrackMenuItem",ds);class F0 extends ds{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 n=!0;for(let s=0,a=i.length;s<a;s++){const o=i[s];if(this.options_.kinds.indexOf(o.kind)>-1&&o.mode==="showing"){n=!1;break}}n!==this.isSelected_&&this.selected(n)}handleSelectedLanguageChange(e){const i=this.player().textTracks();let n=!0;for(let s=0,a=i.length;s<a;s++){const o=i[s];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&o.mode==="showing"){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}de.registerComponent("OffTextTrackMenuItem",F0);class _r extends Jl{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i)}createItems(e=[],i=ds){let n;this.label_&&(n=`${this.label_} off`),e.push(new F0(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let a=0;a<s.length;a++){const o=s[a];if(this.kinds_.indexOf(o.kind)>-1){const l=new i(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});l.addClass(`vjs-${o.kind}-menu-item`),e.push(l)}}return e}}de.registerComponent("TextTrackButton",_r);class $0 extends cs{constructor(e,i){const n=i.track,s=i.cue,a=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=s.text,i.selected=s.startTime<=a&&a<s.endTime,super(e,i),this.track=n,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}de.registerComponent("ChaptersTrackMenuItem",$0);class eu extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(s=>{s.selected(this.track_.activeCues[0]===s.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 n=e[i];if(n.kind===this.kind_)return n}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(bt(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 n=0,s=i.length;n<s;n++){const a=i[n],o=new $0(this.player_,{track:this.track_,cue:a});e.push(o)}return e}}eu.prototype.kind_="chapters";eu.prototype.controlText_="Chapters";de.registerComponent("ChaptersButton",eu);class tu extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("audio-description");const s=e.textTracks(),a=ct(this,this.handleTracksChange);s.addEventListener("change",a),this.on("dispose",function(){s.removeEventListener("change",a)})}handleTracksChange(e){const i=this.player().textTracks();let n=!1;for(let s=0,a=i.length;s<a;s++){const o=i[s];if(o.kind!==this.kind_&&o.mode==="showing"){n=!0;break}}n?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}tu.prototype.kind_="descriptions";tu.prototype.controlText_="Descriptions";de.registerComponent("DescriptionsButton",tu);class iu extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}iu.prototype.kind_="subtitles";iu.prototype.controlText_="Subtitles";de.registerComponent("SubtitlesButton",iu);class nu extends ds{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()}}de.registerComponent("CaptionSettingsMenuItem",nu);class ru extends _r{constructor(e,i,n){super(e,i,n),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 nu(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}ru.prototype.kind_="captions";ru.prototype.controlText_="Captions";de.registerComponent("CaptionsButton",ru);class U0 extends ds{createEl(e,i,n){const s=super.createEl(e,i,n),a=s.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",s):a.appendChild(He("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(He("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),s}}de.registerComponent("SubsCapsMenuItem",U0);class su extends _r{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(bt(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 nu(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,U0),e}}su.prototype.kinds_=["captions","subtitles"];su.prototype.controlText_="Subtitles";de.registerComponent("SubsCapsButton",su);class z0 extends cs{constructor(e,i){const n=i.track,s=e.audioTracks();i.label=n.label||n.language||"Unknown",i.selected=n.enabled,super(e,i),this.track=n,this.addClass(`vjs-${n.kind}-menu-item`);const a=(...o)=>{this.handleTracksChange.apply(this,o)};s.addEventListener("change",a),this.on("dispose",()=>{s.removeEventListener("change",a)})}createEl(e,i,n){const s=super.createEl(e,i,n),a=s.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(a.appendChild(He("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(He("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const i=this.player_.audioTracks();for(let n=0;n<i.length;n++){const s=i[n];s!==this.track&&(s.enabled=s===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}de.registerComponent("AudioTrackMenuItem",z0);class H0 extends Jl{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 n=0;n<i.length;n++){const s=i[n];e.push(new z0(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}H0.prototype.controlText_="Audio Track";de.registerComponent("AudioTrackButton",H0);class au extends cs{constructor(e,i){const n=i.rate,s=parseFloat(n,10);i.label=n,i.selected=s===e.playbackRate(),i.selectable=!0,i.multiSelectable=!1,super(e,i),this.label=n,this.rate=s,this.on(e,"ratechange",a=>this.update(a))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}au.prototype.contentElType="button";de.registerComponent("PlaybackRateMenuItem",au);class q0 extends Zl{constructor(e,i){super(e,i),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",n=>this.updateVisibility(n)),this.on(e,"ratechange",n=>this.updateLabel(n)),this.on(e,"playbackrateschange",n=>this.handlePlaybackRateschange(n))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=He("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 n=e.length-1;n>=0;n--)i.push(new au(this.player(),{rate:e[n]+"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")}}q0.prototype.controlText_="Playback Rate";de.registerComponent("PlaybackRateMenuButton",q0);class j0 extends de{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",i={},n={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,n)}}de.registerComponent("Spacer",j0);class I_ extends j0{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}de.registerComponent("CustomControlSpacer",I_);class G0 extends de{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}G0.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};de.registerComponent("ControlBar",G0);class W0 extends vr{constructor(e,i){super(e,i),this.on(e,"error",n=>{this.open(n)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}W0.prototype.options_=Object.assign({},vr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});de.registerComponent("ErrorDisplay",W0);class Y0 extends de{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(),He("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{const n=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${xi()}`)+"-"+i[1].replace(/\W+/g,""),s=He("option",{id:n,value:this.localize(i[0]),textContent:this.localize(i[1])});return s.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${n}`),s}))}}de.registerComponent("TextTrackSelect",Y0);class Mn extends de{constructor(e,i={}){super(e,i);const n=He("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(n);const s=this.options_.selects;for(const a of s){const o=this.options_.selectConfigs[a],l=o.className,c=o.id.replace("%s",this.options_.id_);let d=null;const m=`vjs_select_${xi()}`;if(this.options_.type==="colors"){d=He("span",{className:l});const x=He("label",{id:c,className:"vjs-label",textContent:this.localize(o.label)});x.setAttribute("for",m),d.appendChild(x)}const g=new Y0(e,{SelectOptions:o.options,legendId:this.options_.legendId,id:m,labelId:c});this.addChild(g),this.options_.type==="colors"&&(d.appendChild(g.el()),this.el().appendChild(d))}}createEl(){return He("fieldset",{className:this.options_.className})}}de.registerComponent("TextTrackFieldset",Mn);class X0 extends de{constructor(e,i={}){super(e,i);const n=this.options_.textTrackComponentid,s=new Mn(e,{id_:n,legendId:`captions-text-legend-${n}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s);const a=new Mn(e,{id_:n,legendId:`captions-background-${n}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(a);const o=new Mn(e,{id_:n,legendId:`captions-window-${n}`,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(o)}createEl(){return He("div",{className:"vjs-track-settings-colors"})}}de.registerComponent("TextTrackSettingsColors",X0);class K0 extends de{constructor(e,i={}){super(e,i);const n=this.options_.textTrackComponentid,s=new Mn(e,{id_:n,legendId:`captions-font-size-${n}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s);const a=new Mn(e,{id_:n,legendId:`captions-edge-style-${n}`,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(a);const o=new Mn(e,{id_:n,legendId:`captions-font-family-${n}`,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(o)}createEl(){return He("div",{className:"vjs-track-settings-font"})}}de.registerComponent("TextTrackSettingsFont",K0);class Q0 extends de{constructor(e,i={}){super(e,i);const n=new Wt(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});n.el().classList.remove("vjs-control","vjs-button"),n.el().textContent=this.localize("Reset"),this.addChild(n);const s=this.localize("Done"),a=new Wt(e,{controlText:s,className:"vjs-done-button"});a.el().classList.remove("vjs-control","vjs-button"),a.el().textContent=s,this.addChild(a)}createEl(){return He("div",{className:"vjs-track-settings-controls"})}}de.registerComponent("TrackSettingsControls",Q0);const $o="vjs-text-track-settings",fd=["#000","Black"],pd=["#00F","Blue"],md=["#0FF","Cyan"],gd=["#0F0","Green"],vd=["#F0F","Magenta"],yd=["#F00","Red"],_d=["#FFF","White"],Td=["#FF0","Yellow"],Uo=["1","Opaque"],zo=["0.5","Semi-Transparent"],bd=["0","Transparent"],pn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[fd,_d,yd,gd,pd,Td,vd,md],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[Uo,zo,bd],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[_d,fd,yd,gd,pd,Td,vd,md],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:r=>r==="1.00"?null:Number(r)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[Uo,zo],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:[bd,zo,Uo],className:"vjs-window-opacity vjs-opacity"}};pn.windowColor.options=pn.backgroundColor.options;function Z0(r,e){if(e&&(r=e(r)),r&&r!=="none")return r}function N_(r,e){const i=r.options[r.options.selectedIndex].value;return Z0(i,e)}function O_(r,e,i){if(e){for(let n=0;n<r.options.length;n++)if(Z0(r.options[n].value,i)===e){r.selectedIndex=n;break}}}class B_ extends vr{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=He("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 X0(e,{textTrackComponentid:this.id_,selectConfigs:pn,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);const n=new K0(e,{textTrackComponentid:this.id_,selectConfigs:pn,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(n);const s=new Q0(e);this.addChild(s)}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()}),Xn(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 Uh(pn,(e,i,n)=>{const s=N_(this.$(i.selector),i.parser);return s!==void 0&&(e[n]=s),e},{})}setValues(e){Xn(pn,(i,n)=>{O_(this.$(i.selector),e[n],i.parser)})}setDefaults(){Xn(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($o))}catch(i){Qe.warn(i)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?W.localStorage.setItem($o,JSON.stringify(e)):W.localStorage.removeItem($o)}catch(i){Qe.warn(i)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}de.registerComponent("TextTrackSettings",B_);class L_ extends de{constructor(e,i){let n=i.ResizeObserver||W.ResizeObserver;i.ResizeObserver===null&&(n=!1);const s=lt({createEl:!n,reportTouchActivity:!1},i);super(e,s),this.ResizeObserver=i.ResizeObserver||W.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=c0(()=>{this.resizeHandler()},100,!1,this),n?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const a=this.debouncedHandler_;let o=this.unloadListener_=function(){Gt(this,"resize",a),Gt(this,"unload",o),o=null};pi(this.el_.contentWindow,"unload",o),pi(this.el_.contentWindow,"resize",a)},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()}}de.registerComponent("ResizeManager",L_);const P_={trackingThreshold:20,liveTolerance:15};class M_ extends de{constructor(e,i){const n=lt(P_,i,{createEl:!1});super(e,n),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=s=>this.handlePlay(s),this.handleFirstTimeupdate_=s=>this.handleFirstTimeupdate(s),this.handleSeeked_=s=>this.handleSeeked(s),this.seekToLiveEdge_=s=>this.seekToLiveEdge(s),this.reset_(),this.on(this.player_,"durationchange",s=>this.handleDurationchange(s)),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)),n=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+n;const s=this.liveCurrentTime(),a=this.player_.currentTime();let o=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-a)>this.options_.liveTolerance;(!this.timeupdateSeen_||s===1/0)&&(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,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_,Si),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 n=e?e.length:0;for(;n--;)i.push(e.end(n));return i.length?i.sort()[i.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),i=[];let n=e?e.length:0;for(;n--;)i.push(e.start(n));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()}}de.registerComponent("LiveTracker",M_);class R_ extends de{constructor(e,i){super(e,i),this.on("statechanged",n=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:He("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${xi()}`}),description:He("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${xi()}`})},He("div",{className:"vjs-title-bar"},{},zh(this.els))}updateDom_(){const e=this.player_.tech_,i=e&&e.el_,n={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(s=>{const a=this.state[s],o=this.els[s],l=n[s];Ra(o),a&&bn(o,a),i&&(i.removeAttribute(l),a&&i.setAttribute(l,o.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}}de.registerComponent("TitleBar",R_);const V_={initialDisplay:4e3,position:[],takeFocus:!1};class F_ extends Wt{constructor(e,i){i=lt(V_,i),super(e,i),this.controlText(i.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],n=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=He("button",{},{type:"button",class:this.buildCSSClass()},He("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()}}de.registerComponent("TransientButton",F_);const dl=r=>{const e=r.el();if(e.hasAttribute("src"))return r.triggerSourceset(e.src),!0;const i=r.$$("source"),n=[];let s="";if(!i.length)return!1;for(let a=0;a<i.length;a++){const o=i[a].src;o&&n.indexOf(o)===-1&&n.push(o)}return n.length?(n.length===1&&(s=n[0]),r.triggerSourceset(s),!0):!1},$_=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(r){const e=Te.createElement(this.nodeName.toLowerCase());e.innerHTML=r;const i=Te.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",W.Element.prototype.appendChild.call(this,i),this.innerHTML}}),J0=(r,e)=>{let i={};for(let n=0;n<r.length&&(i=Object.getOwnPropertyDescriptor(r[n],e),!(i&&i.set&&i.get));n++);return i.enumerable=!0,i.configurable=!0,i},U_=r=>J0([r.el(),W.HTMLMediaElement.prototype,W.Element.prototype,$_],"innerHTML"),Cd=function(r){const e=r.el();if(e.resetSourceWatch_)return;const i={},n=U_(r),s=a=>(...o)=>{const l=a.apply(e,o);return dl(r),l};["append","appendChild","insertAdjacentHTML"].forEach(a=>{e[a]&&(i[a]=e[a],e[a]=s(i[a]))}),Object.defineProperty(e,"innerHTML",lt(n,{set:s(n.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(i).forEach(a=>{e[a]=i[a]}),Object.defineProperty(e,"innerHTML",n)},r.one("sourceset",e.resetSourceWatch_)},z_=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?b0(W.Element.prototype.getAttribute.call(this,"src")):""},set(r){return W.Element.prototype.setAttribute.call(this,"src",r),r}}),H_=r=>J0([r.el(),W.HTMLMediaElement.prototype,z_],"src"),q_=function(r){if(!r.featuresSourceset)return;const e=r.el();if(e.resetSourceset_)return;const i=H_(r),n=e.setAttribute,s=e.load;Object.defineProperty(e,"src",lt(i,{set:a=>{const o=i.set.call(e,a);return r.triggerSourceset(e.src),o}})),e.setAttribute=(a,o)=>{const l=n.call(e,a,o);return/src/i.test(a)&&r.triggerSourceset(e.src),l},e.load=()=>{const a=s.call(e);return dl(r)||(r.triggerSourceset(""),Cd(r)),a},e.currentSrc?r.triggerSourceset(e.currentSrc):dl(r)||Cd(r),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=s,e.setAttribute=n,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}};class Ie extends Ge{constructor(e,i){super(e,i);const n=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",n&&(this.el_.currentSrc!==n.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(n):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const a=this.el_.childNodes;let o=a.length;const l=[];for(;o--;){const c=a[o];c.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(c),this.remoteTextTracks().addTrack(c.track),this.textTracks().addTrack(c.track),!s&&!this.el_.hasAttribute("crossorigin")&&Ua(c.src)&&(s=!0)):l.push(c))}for(let c=0;c<l.length;c++)this.el_.removeChild(l[c])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&Qe.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_(),(ns||Oa)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),Ie.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){q_(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let i;const n=()=>{i=[];for(let a=0;a<e.length;a++){const o=e[a];o.kind==="metadata"&&i.push({track:o,storedMode:o.mode})}};n(),e.addEventListener("change",n),this.on("dispose",()=>e.removeEventListener("change",n));const s=()=>{for(let a=0;a<i.length;a++){const o=i[a];o.track.mode==="disabled"&&o.track.mode!==o.storedMode&&(o.track.mode=o.storedMode)}e.removeEventListener("change",s)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",n),e.removeEventListener("change",s),e.addEventListener("change",s)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",s)})}overrideNative_(e,i){if(i!==this[`featuresNative${e}Tracks`])return;const n=e.toLowerCase();this[`${n}TracksListeners_`]&&Object.keys(this[`${n}TracksListeners_`]).forEach(s=>{this.el()[`${n}Tracks`].removeEventListener(s,this[`${n}TracksListeners_`][s])}),this[`featuresNative${e}Tracks`]=!i,this[`${n}TracksListeners_`]=null,this.proxyNativeTracksForType_(n)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const i=Ti[e],n=this.el()[i.getterName],s=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!n||!n.addEventListener)return;const a={change:l=>{const c={type:"change",target:s,currentTarget:s,srcElement:s};s.trigger(c),e==="text"&&this[hr.remoteText.getterName]().trigger(c)},addtrack(l){s.addTrack(l.track)},removetrack(l){s.removeTrack(l.track)}},o=function(){const l=[];for(let c=0;c<s.length;c++){let d=!1;for(let m=0;m<n.length;m++)if(n[m]===s[c]){d=!0;break}d||l.push(s[c])}for(;l.length;)s.removeTrack(l.shift())};this[i.getterName+"Listeners_"]=a,Object.keys(a).forEach(l=>{const c=a[l];n.addEventListener(l,c),this.on("dispose",d=>n.removeEventListener(l,c))}),this.on("loadstart",o),this.on("dispose",l=>this.off("loadstart",o))}proxyNativeTracks_(){Ti.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),Ie.disposeMediaElement(e),e=n}else{e=Te.createElement("video");const n=this.options_.tag&&fn(this.options_.tag),s=lt({},n);(!ns||this.options_.nativeControlsForTouch!==!0)&&delete s.controls,Qh(e,Object.assign(s,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&ur(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const i=["loop","muted","playsinline","autoplay"];for(let n=0;n<i.length;n++){const s=i[n],a=this.options_[s];typeof a<"u"&&(a?ur(e,s,s):Pa(e,s),e[s]=a)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let n=!1;const s=function(){n=!0};this.on("loadstart",s);const a=function(){n||this.trigger("loadstart")};this.on("loadedmetadata",a),this.ready(function(){this.off("loadstart",s),this.off("loadedmetadata",a),n||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(n){this.trigger(n)},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){Qe(i,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Li&&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 Qe.error("Invalid source URL."),!1;const n={src:e};i&&(n.type=i);const s=He("source",{},n);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return Qe.error("Source URL is required to remove the source element."),!1;const i=this.el_.querySelectorAll("source");for(const n of i)if(n.src===e)return this.el_.removeChild(n),!0;return Qe.warn(`No matching source element found with src: ${e}`),!1}reset(){Ie.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,n):super.addTextTrack(e,i,n)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const i=Te.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 n=super.addRemoteTextTrack(e,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const i=this.$$("track");let n=i.length;for(;n--;)(e===i[n]||e===i[n].track)&&this.el().removeChild(i[n])}}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(Ie,"TEST_VID",function(){if(!pr())return;const r=Te.createElement("video"),e=Te.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",r.appendChild(e),r});Ie.isSupported=function(){try{Ie.TEST_VID.volume=.5}catch{return!1}return!!(Ie.TEST_VID&&Ie.TEST_VID.canPlayType)};Ie.canPlayType=function(r){return Ie.TEST_VID.canPlayType(r)};Ie.canPlaySource=function(r,e){return Ie.canPlayType(r.type)};Ie.canControlVolume=function(){try{const r=Ie.TEST_VID.volume;Ie.TEST_VID.volume=r/2+.1;const e=r!==Ie.TEST_VID.volume;return e&&jt?(W.setTimeout(()=>{Ie&&Ie.prototype&&(Ie.prototype.featuresVolumeControl=r!==Ie.TEST_VID.volume)}),!1):e}catch{return!1}};Ie.canMuteVolume=function(){try{const r=Ie.TEST_VID.muted;return Ie.TEST_VID.muted=!r,Ie.TEST_VID.muted?ur(Ie.TEST_VID,"muted","muted"):Pa(Ie.TEST_VID,"muted","muted"),r!==Ie.TEST_VID.muted}catch{return!1}};Ie.canControlPlaybackRate=function(){if(Li&&Gi&&Ia<58)return!1;try{const r=Ie.TEST_VID.playbackRate;return Ie.TEST_VID.playbackRate=r/2+.1,r!==Ie.TEST_VID.playbackRate}catch{return!1}};Ie.canOverrideAttributes=function(){try{const r=()=>{};Object.defineProperty(Te.createElement("video"),"src",{get:r,set:r}),Object.defineProperty(Te.createElement("audio"),"src",{get:r,set:r}),Object.defineProperty(Te.createElement("video"),"innerHTML",{get:r,set:r}),Object.defineProperty(Te.createElement("audio"),"innerHTML",{get:r,set:r})}catch{return!1}return!0};Ie.supportsNativeTextTracks=function(){return Ba||jt&&Gi};Ie.supportsNativeVideoTracks=function(){return!!(Ie.TEST_VID&&Ie.TEST_VID.videoTracks)};Ie.supportsNativeAudioTracks=function(){return!!(Ie.TEST_VID&&Ie.TEST_VID.audioTracks)};Ie.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([r,e]){Aa(Ie.prototype,r,()=>Ie[e](),!0)});Ie.prototype.featuresVolumeControl=Ie.canControlVolume();Ie.prototype.movingMediaElementInDOM=!jt;Ie.prototype.featuresFullscreenResize=!0;Ie.prototype.featuresProgressEvents=!0;Ie.prototype.featuresTimeupdateEvents=!0;Ie.prototype.featuresVideoFrameCallback=!!(Ie.TEST_VID&&Ie.TEST_VID.requestVideoFrameCallback);Ie.disposeMediaElement=function(r){if(r){for(r.parentNode&&r.parentNode.removeChild(r);r.hasChildNodes();)r.removeChild(r.firstChild);r.removeAttribute("src"),typeof r.load=="function"&&(function(){try{r.load()}catch{}})()}};Ie.resetMediaElement=function(r){if(!r)return;const e=r.querySelectorAll("source");let i=e.length;for(;i--;)r.removeChild(e[i]);r.removeAttribute("src"),typeof r.load=="function"&&(function(){try{r.load()}catch{}})()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(r){Ie.prototype[r]=function(){return this.el_[r]||this.el_.hasAttribute(r)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(r){Ie.prototype["set"+bt(r)]=function(e){this.el_[r]=e,e?this.el_.setAttribute(r,r):this.el_.removeAttribute(r)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(r){Ie.prototype[r]=function(){return this.el_[r]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(r){Ie.prototype["set"+bt(r)]=function(e){this.el_[r]=e}});["pause","load","play"].forEach(function(r){Ie.prototype[r]=function(){return this.el_[r]()}});Ge.withSourceHandlers(Ie);Ie.nativeSourceHandler={};Ie.nativeSourceHandler.canPlayType=function(r){try{return Ie.TEST_VID.canPlayType(r)}catch{return""}};Ie.nativeSourceHandler.canHandleSource=function(r,e){if(r.type)return Ie.nativeSourceHandler.canPlayType(r.type);if(r.src){const i=jl(r.src);return Ie.nativeSourceHandler.canPlayType(`video/${i}`)}return""};Ie.nativeSourceHandler.handleSource=function(r,e,i){e.setSrc(r.src)};Ie.nativeSourceHandler.dispose=function(){};Ie.registerSourceHandler(Ie.nativeSourceHandler);Ge.registerTech("Html5",Ie);const ef=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Ho={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},hl=["tiny","xsmall","small","medium","large","xlarge","huge"],Qs={};hl.forEach(r=>{const e=r.charAt(0)==="x"?`x-${r.substring(1)}`:r;Qs[r]=`vjs-layout-${e}`});const j_={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class st extends de{constructor(e,i,n){if(e.id=e.id||i.id||`vjs_video_${xi()}`,i=Object.assign(st.getTagSettings(e),i),i.initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language){const o=e.closest("[lang]");o&&(i.language=o.getAttribute("lang"))}if(super(null,i,n),this.boundDocumentFullscreenChange_=o=>this.documentFullscreenChange_(o),this.boundFullWindowOnEscKey_=o=>this.fullWindowOnEscKey(o),this.boundUpdateStyleEl_=o=>this.updateStyleEl_(o),this.boundApplyInitTime_=o=>this.applyInitTime_(o),this.boundUpdateCurrentBreakpoint_=o=>this.updateCurrentBreakpoint_(o),this.boundHandleTechClick_=o=>this.handleTechClick_(o),this.boundHandleTechDoubleClick_=o=>this.handleTechDoubleClick_(o),this.boundHandleTechTouchStart_=o=>this.handleTechTouchStart_(o),this.boundHandleTechTouchMove_=o=>this.handleTechTouchMove_(o),this.boundHandleTechTouchEnd_=o=>this.handleTechTouchEnd_(o),this.boundHandleTechTap_=o=>this.handleTechTap_(o),this.boundUpdatePlayerHeightOnAudioOnlyMode_=o=>this.updatePlayerHeightOnAudioOnlyMode_(o),this.isFullscreen_=!1,this.log=Fh(this.id_),this.fsApi_=ia,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 o={};Object.getOwnPropertyNames(i.languages).forEach(function(l){o[l.toLowerCase()]=i.languages[l]}),this.languages_=o}else this.languages_=st.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(o=>{if(typeof this[o]!="function")throw new Error(`plugin "${o}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),$l(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(pi(Te,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const s=lt(this.options_);if(i.plugins&&Object.keys(i.plugins).forEach(o=>{this[o](i.plugins[o])}),i.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons){const l=new W.DOMParser().parseFromString(p_,"image/svg+xml");if(l.querySelector("parsererror"))Qe.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const d=l.documentElement;d.style.display="none",this.el_.appendChild(d),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 m_(this),this.addClass("vjs-spatial-navigation-enabled")),ns&&this.addClass("vjs-touch-enabled"),jt||this.addClass("vjs-workinghover"),st.players[this.id_]=this;const a=tl.split(".")[0];this.addClass(`vjs-v${a}`),this.userActive(!0),this.reportUserActivity(),this.one("play",o=>this.listenForUserActivity_(o)),this.on("keydown",o=>this.handleKeyDown(o)),this.on("languagechange",o=>this.handleLanguagechange(o)),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"),Gt(Te,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),Gt(Te,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),st.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),c_(this),ei.names.forEach(e=>{const i=ei[e],n=this[i.getterName]();n&&n.off&&n.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,i,n=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const s=this.tag.tagName.toLowerCase()==="video-js";n?i=this.el_=e.parentNode:s||(i=this.el_=super.createEl("div"));const a=fn(e);if(s){for(i=this.el_=e,e=this.tag=Te.createElement("video");i.children.length;)e.appendChild(i.firstChild);Kr(i,"video-js")||Ln(i,"video-js"),i.appendChild(e),n=this.playerElIngest_=i,Object.keys(i).forEach(c=>{try{e[c]=i[c]}catch{}})}e.setAttribute("tabindex","-1"),a.tabindex="-1",Gi&&Na&&(e.setAttribute("role","application"),a.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in a&&delete a.width,"height"in a&&delete a.height,Object.getOwnPropertyNames(a).forEach(function(c){s&&c==="class"||i.setAttribute(c,a[c]),s&&e.setAttribute(c,a[c])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused");const o=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(c=>Wh[c]).map(c=>"vjs-device-"+c.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...o),W.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=l0("vjs-styles-dimensions");const c=_n(".vjs-styles-defaults"),d=_n("head");d.insertBefore(this.styleEl_,c?c.nextSibling:d.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 l=e.getElementsByTagName("a");for(let c=0;c<l.length;c++){const d=l.item(c);Ln(d,"vjs-hidden"),d.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!n&&e.parentNode.insertBefore(i,e),nl(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"){Qe.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 n=e+"_";if(i===void 0)return this[n]||0;if(i===""||i==="auto"){this[n]=void 0,this.updateStyleEl_();return}const s=parseFloat(i);if(isNaN(s)){Qe.error(`Improper value "${i}" supplied for for ${e}`);return}this[n]=s,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),zy(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 l=typeof this.width_=="number"?this.width_:this.options_.width,c=typeof this.height_=="number"?this.height_:this.options_.height,d=this.tech_&&this.tech_.el();d&&(l>=0&&(d.width=l),c>=0&&(d.height=c));return}let e,i,n,s;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?n=this.aspectRatio_:this.videoWidth()>0?n=this.videoWidth()+":"+this.videoHeight():n="16:9";const a=n.split(":"),o=a[1]/a[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/o:e=this.videoWidth()||300,this.height_!==void 0?i=this.height_:i=e*o,/^[^a-zA-Z]/.test(this.id())?s="dimensions-"+this.id():s=this.id()+"-dimensions",this.addClass(s),u0(this.styleEl_,`
|
|
181
|
+
.${s} {
|
|
182
|
+
width: ${e}px;
|
|
183
|
+
height: ${i}px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.${s}.vjs-fluid:not(.vjs-audio-only-mode) {
|
|
187
|
+
padding-top: ${o*100}%;
|
|
188
|
+
}
|
|
189
|
+
`)}loadTech_(e,i){this.tech_&&this.unloadTech_();const n=bt(e),s=e.charAt(0).toLowerCase()+e.slice(1);n!=="Html5"&&this.tag&&(Ge.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;let a=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(a=!1);const o={source:i,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_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};ei.names.forEach(c=>{const d=ei[c];o[d.getterName]=this[d.privateName]}),Object.assign(o,this.options_[n]),Object.assign(o,this.options_[s]),Object.assign(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);const l=Ge.getTech(e);if(!l)throw new Error(`No Tech named '${n}' exists! '${n}' should be registered using videojs.registerTech()'`);this.tech_=new l(o),this.tech_.ready(ct(this,this.handleTechReady_),!0),ul.jsonToTextTracks(this.textTracksJson_||[],this.tech_),ef.forEach(c=>{this.on(this.tech_,c,d=>this[`handleTech${bt(c)}_`](d))}),Object.keys(Ho).forEach(c=>{this.on(this.tech_,c,d=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${Ho[c]}_`].bind(this),event:d});return}this[`handleTech${Ho[c]}_`](d)})}),this.on(this.tech_,"loadstart",c=>this.handleTechLoadStart_(c)),this.on(this.tech_,"sourceset",c=>this.handleTechSourceset_(c)),this.on(this.tech_,"waiting",c=>this.handleTechWaiting_(c)),this.on(this.tech_,"ended",c=>this.handleTechEnded_(c)),this.on(this.tech_,"seeking",c=>this.handleTechSeeking_(c)),this.on(this.tech_,"play",c=>this.handleTechPlay_(c)),this.on(this.tech_,"pause",c=>this.handleTechPause_(c)),this.on(this.tech_,"durationchange",c=>this.handleTechDurationChange_(c)),this.on(this.tech_,"fullscreenchange",(c,d)=>this.handleTechFullscreenChange_(c,d)),this.on(this.tech_,"fullscreenerror",(c,d)=>this.handleTechFullscreenError_(c,d)),this.on(this.tech_,"enterpictureinpicture",c=>this.handleTechEnterPictureInPicture_(c)),this.on(this.tech_,"leavepictureinpicture",c=>this.handleTechLeavePictureInPicture_(c)),this.on(this.tech_,"error",c=>this.handleTechError_(c)),this.on(this.tech_,"posterchange",c=>this.handleTechPosterChange_(c)),this.on(this.tech_,"textdata",c=>this.handleTechTextData_(c)),this.on(this.tech_,"ratechange",c=>this.handleTechRateChange_(c)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(n!=="Html5"||!this.tag)&&nl(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){ei.names.forEach(e=>{const i=ei[e];this[i.privateName]=this[i.getterName]()}),this.textTracksJson_=ul.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&&Qe.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":tl}}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 s=this.muted();this.muted(!0);const a=()=>{this.muted(s)};this.playTerminatedQueue_.push(a);const o=this.play();if(Zr(o))return o.catch(l=>{throw a(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${l||""}`)})};let n;if(e==="any"&&!this.muted()?(n=this.play(),Zr(n)&&(n=n.catch(i))):e==="muted"&&!this.muted()?n=i():n=this.play(),!!Zr(n))return n.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let i=e,n="";typeof i!="string"&&(i=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!n&&(n=f_(this,i)),this.cache_.source=lt({},e,{src:i,type:n});const s=this.cache_.sources.filter(c=>c.src&&c.src===i),a=[],o=this.$$("source"),l=[];for(let c=0;c<o.length;c++){const d=fn(o[c]);a.push(d),d.src&&d.src===i&&l.push(d.src)}l.length&&!s.length?this.cache_.sources=a:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i}handleTechSourceset_(e){if(!this.changingSrc_){let i=a=>this.updateSourceCaches_(a);const n=this.currentSource().src,s=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==n)&&(i=()=>{}),i(s),e.src||this.tech_.any(["sourceset","loadstart"],a=>{if(a.type==="sourceset")return;const o=this.techGet_("currentSrc");this.lastSource_.tech=o,this.updateSourceCaches_(o)})}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"),n=>n.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()&&!Te.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 n=this.el();let s=Te[this.fsApi_.fullscreenElement]===n;!s&&n.matches&&(s=n.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(s)}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 l_)return a_(this.middleware_,this.tech_,e,i);if(e in od)return ad(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(n){throw Qe(n),n}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in o_)return s_(this.middleware_,this.tech_,e);if(e in od)return ad(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw this.tech_[e]===void 0?(Qe(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(Qe(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(Qe(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())),n=!!(Ba||jt);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i){this.waitToPlay_=o=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!i&&n&&this.load();return}const s=this.techGet_("play");n&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),s===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}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(n){n(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||Bi(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=Bi(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=Bi(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 y0(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),i=this.duration();let n=e.end(e.length-1);return n>i&&(n=i),n}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((n,s)=>{function a(){i.off("fullscreenerror",l),i.off("fullscreenchange",o)}function o(){a(),n()}function l(d,m){a(),s(m)}i.one("fullscreenchange",o),i.one("fullscreenerror",l);const c=i.requestFullscreenHelper_(e);c&&(c.then(a,a),c.then(n,s))})}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 n=this.el_[this.fsApi_.requestFullscreen](i);return n&&n.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),n}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((i,n)=>{function s(){e.off("fullscreenerror",o),e.off("fullscreenchange",a)}function a(){s(),i()}function o(c,d){s(),n(d)}e.one("fullscreenchange",a),e.one("fullscreenerror",o);const l=e.exitFullscreenHelper_();l&&(l.then(s,s),l.then(i,n))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Te[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=Te.documentElement.style.overflow,pi(Te,"keydown",this.boundFullWindowOnEscKey_),Te.documentElement.style.overflow="hidden",Ln(Te.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,Gt(Te,"keydown",this.boundFullWindowOnEscKey_),Te.documentElement.style.overflow=this.docOrigOverflow,La(Te.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=Te.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(He("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),W.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(s0(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",n=>{const s=n.target.querySelector(".video-js");e.parentNode.replaceChild(s,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),i))}return"pictureInPictureEnabled"in Te&&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 Te)return Te.exitPictureInPicture()}handleKeyDown(e){const{userActions:i}=this.options_;!i||!i.hotkeys||(s=>{const a=s.tagName.toLowerCase();if(s.isContentEditable)return!0;const o=["button","checkbox","hidden","radio","reset","submit"];return a==="input"?o.indexOf(s.type)===-1:["textarea"].indexOf(a)!==-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:n=o=>e.key.toLowerCase()==="f",muteKey:s=o=>e.key.toLowerCase()==="m",playPauseKey:a=o=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();const o=de.getComponent("FullscreenToggle");Te[this.fsApi_.fullscreenEnabled]!==!1&&o.prototype.handleClick.call(this,e)}else s.call(this,e)?(e.preventDefault(),e.stopPropagation(),de.getComponent("MuteToggle").prototype.handleClick.call(this,e)):a.call(this,e)&&(e.preventDefault(),e.stopPropagation(),de.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let i;for(let n=0,s=this.options_.techOrder;n<s.length;n++){const a=s[n];let o=Ge.getTech(a);if(o||(o=de.getComponent(a)),!o){Qe.error(`The "${a}" tech is undefined. Skipped browser support check for that tech.`);continue}if(o.isSupported()&&(i=o.canPlayType(e),i))return i}return""}selectSource(e){const i=this.options_.techOrder.map(l=>[l,Ge.getTech(l)]).filter(([l,c])=>c?c.isSupported():(Qe.error(`The "${l}" tech is undefined. Skipped browser support check for that tech.`),!1)),n=function(l,c,d){let m;return l.some(g=>c.some(x=>{if(m=d(g,x),m)return!0})),m};let s;const a=l=>(c,d)=>l(d,c),o=([l,c],d)=>{if(c.canPlaySource(d,this.options_[l.toLowerCase()]))return{source:d,tech:l}};return this.options_.sourceOrder?s=n(e,i,a(o)):s=n(i,e,o),s||!1}handleSrc_(e,i){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const n=S0(e);if(!n.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,i||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),n_(this,n[0],(s,a)=>{if(this.middleware_=a,i||(this.cache_.sources=n),this.updateSourceCaches_(s),this.src_(s)){if(n.length>1)return this.handleSrc_(n.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}r_(a,this.tech_)}),n.length>1){const s=()=>{this.error(null),this.handleSrc_(n.slice(1),!0)},a=()=>{this.off("error",s)};this.one("error",s),this.one("playing",a),this.resetRetryOnError_=()=>{this.off("error",s),this.off("playing",a)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const i=this.selectSource([e]);return i?p0(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:n,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:a}=n||{};e&&e.updateContent(),i&&i.updateContent(),s&&s.updateContent(),a&&(a.update(),a.loadProgressBar&&a.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(yn("beforeerror").forEach(i=>{const n=i(this,e);if(!(ji(n)&&!Array.isArray(n)||typeof n=="string"||typeof n=="number"||n===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=n}),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 _t(e),this.addClass("vjs-error"),Qe.error(`(CODE:${this.error_.code} ${_t.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),yn("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,n;const s=ct(this,this.reportUserActivity),a=function(g){(g.screenX!==i||g.screenY!==n)&&(i=g.screenX,n=g.screenY,s())},o=function(){s(),this.clearInterval(e),e=this.setInterval(s,250)},l=function(g){s(),this.clearInterval(e)};this.on("mousedown",o),this.on("mousemove",a),this.on("mouseup",l),this.on("mouseleave",l);const c=this.getChild("controlBar");c&&!jt&&!Li&&(c.on("mouseenter",function(g){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),c.on("mouseleave",function(g){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",s),this.on("keyup",s);let d;const m=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(d);const g=this.options_.inactivityTimeout;g<=0||(d=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},g))};this.setInterval(m,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"),n=i&&i.currentHeight();e.forEach(s=>{s!==i&&s.el_&&!s.hasClass("vjs-hidden")&&(s.hide(),this.audioOnlyCache_.hiddenChildren.push(s))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=n,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(n),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,n){if(this.tech_)return this.tech_.addTextTrack(e,i,n)}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 lt(st.prototype.options_.languages,this.languages_)}toJSON(){const e=lt(this.options_),i=e.tracks;e.tracks=[];for(let n=0;n<i.length;n++){let s=i[n];s=lt(s),s.player=void 0,e.tracks[n]=s}return e}createModal(e,i){i=i||{},i.content=e||"";const n=new vr(this,i);return this.addChild(n),n.on("dispose",()=>{this.removeChild(n)}),n.open(),n}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),i=this.currentWidth();for(let n=0;n<hl.length;n++){const s=hl[n],a=this.breakpoints_[s];if(i<=a){if(e===s)return;e&&this.removeClass(Qs[e]),this.addClass(Qs[s]),this.breakpoint_=s;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({},j_,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 Qs[this.breakpoint_]||""}loadMedia(e,i){if(!e||typeof e!="object")return;const n=this.crossOrigin();this.reset(),this.cache_.media=lt(e);const{artist:s,artwork:a,description:o,poster:l,src:c,textTracks:d,title:m}=this.cache_.media;!a&&l&&(this.cache_.media.artwork=[{src:l,type:ha(l)}]),n&&this.crossOrigin(n),c&&this.src(c),l&&this.poster(l),Array.isArray(d)&&d.forEach(g=>this.addRemoteTextTrack(g,!1)),this.titleBar&&this.titleBar.update({title:m,description:o||s||""}),this.ready(i)}getMedia(){if(!this.cache_.media){const e=this.poster(),i=this.currentSources(),n=Array.prototype.map.call(this.remoteTextTracks(),a=>({kind:a.kind,label:a.label,language:a.language,src:a.src})),s={src:i,textTracks:n};return e&&(s.poster=e,s.artwork=[{src:s.poster,type:ha(s.poster)}]),s}return lt(this.cache_.media)}static getTagSettings(e){const i={sources:[],tracks:[]},n=fn(e),s=n["data-setup"];if(Kr(e,"vjs-fill")&&(n.fill=!0),Kr(e,"vjs-fluid")&&(n.fluid=!0),s!==null)try{Object.assign(n,JSON.parse(s||"{}"))}catch(a){Qe.error("data-setup",a)}if(Object.assign(i,n),e.hasChildNodes()){const a=e.childNodes;for(let o=0,l=a.length;o<l;o++){const c=a[o],d=c.nodeName.toLowerCase();d==="source"?i.sources.push(fn(c)):d==="track"&&i.tracks.push(fn(c))}}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"))}}st.prototype.videoTracks=()=>{};st.prototype.audioTracks=()=>{};st.prototype.textTracks=()=>{};st.prototype.remoteTextTracks=()=>{};st.prototype.remoteTextTrackEls=()=>{};ei.names.forEach(function(r){const e=ei[r];st.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});st.prototype.crossorigin=st.prototype.crossOrigin;st.players={};const Hr=W.navigator;st.prototype.options_={techOrder:Ge.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Hr&&(Hr.languages&&Hr.languages[0]||Hr.userLanguage||Hr.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};ef.forEach(function(r){st.prototype[`handleTech${bt(r)}_`]=function(){return this.trigger(r)}});de.registerComponent("Player",st);const fa="plugin",Zn="activePlugins_",Gn={},pa=r=>Gn.hasOwnProperty(r),Zs=r=>pa(r)?Gn[r]:void 0,tf=(r,e)=>{r[Zn]=r[Zn]||{},r[Zn][e]=!0},ma=(r,e,i)=>{const n=(i?"before":"")+"pluginsetup";r.trigger(n,e),r.trigger(n+":"+e.name,e)},G_=function(r,e){const i=function(){ma(this,{name:r,plugin:e,instance:null},!0);const n=e.apply(this,arguments);return tf(this,r),ma(this,{name:r,plugin:e,instance:n}),n};return Object.keys(e).forEach(function(n){i[n]=e[n]}),i},xd=(r,e)=>(e.prototype.name=r,function(...i){ma(this,{name:r,plugin:e,instance:null},!0);const n=new e(this,...i);return this[r]=()=>n,ma(this,n.getEventHash()),n});class ui{constructor(e){if(this.constructor===ui)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),$l(this),delete this.trigger,f0(this,this.constructor.defaultState),tf(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 gr(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[Zn][e]=!1,this.player=this.state=null,i[e]=xd(e,Gn[e])}static isBasic(e){const i=typeof e=="string"?Zs(e):e;return typeof i=="function"&&!ui.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(pa(e))Qe.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(st.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 Gn[e]=i,e!==fa&&(ui.isBasic(i)?st.prototype[e]=G_(e,i):st.prototype[e]=xd(e,i)),i}static deregisterPlugin(e){if(e===fa)throw new Error("Cannot de-register base plugin.");pa(e)&&(delete Gn[e],delete st.prototype[e])}static getPlugins(e=Object.keys(Gn)){let i;return e.forEach(n=>{const s=Zs(n);s&&(i=i||{},i[n]=s)}),i}static getPluginVersion(e){const i=Zs(e);return i&&i.VERSION||""}}ui.getPlugin=Zs;ui.BASE_PLUGIN_NAME=fa;ui.registerPlugin(fa,ui);st.prototype.usingPlugin=function(r){return!!this[Zn]&&this[Zn][r]===!0};st.prototype.hasPlugin=function(r){return!!pa(r)};function W_(r,e){let i=!1;return function(...n){return i||Qe.warn(r),i=!0,e.apply(this,n)}}function Pi(r,e,i,n){return W_(`${e} is deprecated and will be removed in ${r}.0; please use ${i} instead.`,n)}var Y_={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 nf=r=>r.indexOf("#")===0?r.slice(1):r;function ae(r,e,i){let n=ae.getPlayer(r);if(n)return e&&Qe.warn(`Player "${r}" is already initialised. Options will not be applied.`),i&&n.ready(i),n;const s=typeof r=="string"?_n("#"+nf(r)):r;if(!mr(s))throw new TypeError("The element or ID supplied is not valid. (videojs)");const o=("getRootNode"in s?s.getRootNode()instanceof W.ShadowRoot:!1)?s.getRootNode():s.ownerDocument.body;(!s.ownerDocument.defaultView||!o.contains(s))&&Qe.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player")?s.parentNode:s).cloneNode(!0)),yn("beforesetup").forEach(c=>{const d=c(s,lt(e));if(!ji(d)||Array.isArray(d)){Qe.error("please return an object in beforesetup hooks");return}e=lt(e,d)});const l=de.getComponent("Player");return n=new l(s,e,i),yn("setup").forEach(c=>c(n)),n}ae.hooks_=en;ae.hooks=yn;ae.hook=Dy;ae.hookOnce=Ay;ae.removeHook=Vh;if(W.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&pr()){let r=_n(".vjs-styles-defaults");if(!r){r=l0("vjs-styles-defaults");const e=_n("head");e&&e.insertBefore(r,e.firstChild),u0(r,`
|
|
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
|
+
`)}}sl(1,ae);ae.VERSION=tl;ae.options=st.prototype.options_;ae.getPlayers=()=>st.players;ae.getPlayer=r=>{const e=st.players;let i;if(typeof r=="string"){const n=nf(r),s=e[n];if(s)return s;i=_n("#"+n)}else i=r;if(mr(i)){const{player:n,playerId:s}=i;if(n||e[s])return n||e[s]}};ae.getAllPlayers=()=>Object.keys(st.players).map(r=>st.players[r]).filter(Boolean);ae.players=st.players;ae.getComponent=de.getComponent;ae.registerComponent=(r,e)=>(Ge.isTech(e)&&Qe.warn(`The ${r} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),de.registerComponent.call(de,r,e));ae.getTech=Ge.getTech;ae.registerTech=Ge.registerTech;ae.use=i_;Object.defineProperty(ae,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(ae.middleware,"TERMINATOR",{value:da,writeable:!1,enumerable:!0});ae.browser=Wh;ae.obj=Oy;ae.mergeOptions=Pi(9,"videojs.mergeOptions","videojs.obj.merge",lt);ae.defineLazyProperty=Pi(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Aa);ae.bind=Pi(9,"videojs.bind","native Function.prototype.bind",ct);ae.registerPlugin=ui.registerPlugin;ae.deregisterPlugin=ui.deregisterPlugin;ae.plugin=(r,e)=>(Qe.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),ui.registerPlugin(r,e));ae.getPlugins=ui.getPlugins;ae.getPlugin=ui.getPlugin;ae.getPluginVersion=ui.getPluginVersion;ae.addLanguage=function(r,e){return r=(""+r).toLowerCase(),ae.options.languages=lt(ae.options.languages,{[r]:e}),ae.options.languages[r]};ae.log=Qe;ae.createLogger=Fh;ae.time=Wy;ae.createTimeRange=Pi(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Bi);ae.createTimeRanges=Pi(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Bi);ae.formatTime=Pi(9,"videojs.formatTime","videojs.time.formatTime",Vn);ae.setFormatTime=Pi(9,"videojs.setFormatTime","videojs.time.setFormatTime",g0);ae.resetFormatTime=Pi(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",v0);ae.parseUrl=Pi(9,"videojs.parseUrl","videojs.url.parseUrl",ql);ae.isCrossOrigin=Pi(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",Ua);ae.EventTarget=mi;ae.any=Fl;ae.on=pi;ae.one=Fa;ae.off=Gt;ae.trigger=gr;ae.xhr=xh;ae.TrackList=Fn;ae.TextTrack=ls;ae.TextTrackList=zl;ae.AudioTrack=C0;ae.AudioTrackList=_0;ae.VideoTrack=x0;ae.VideoTrackList=T0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{ae[r]=function(){return Qe.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),a0[r].apply(null,arguments)}});ae.computedStyle=Pi(9,"videojs.computedStyle","videojs.dom.computedStyle",dr);ae.dom=a0;ae.fn=Uy;ae.num=x_;ae.str=jy;ae.url=e_;ae.Error=Y_;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class X_{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(n){i.enabled_(n)}}),i}}class ga extends ae.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 n=this.levels_.length;return i=new X_(e),""+n in this||Object.defineProperty(this,n,{get(){return this.levels_[n]}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i}removeQualityLevel(e){let i=null;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){i=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return i&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),i}getQualityLevelById(e){for(let i=0,n=this.length;i<n;i++){const s=this[i];if(s.id===e)return s}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}ga.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in ga.prototype.allowedEvents_)ga.prototype["on"+r]=null;var rf="4.1.0";const K_=function(r,e){const i=r.qualityLevels,n=new ga,s=function(){n.dispose(),r.qualityLevels=i,r.off("dispose",s)};return r.on("dispose",s),r.qualityLevels=()=>n,r.qualityLevels.VERSION=rf,n},sf=function(r){return K_(this,ae.obj.merge({},r))};ae.registerPlugin("qualityLevels",sf);sf.VERSION=rf;/*! @name @videojs/http-streaming @version 3.17.3 @license Apache-2.0 */const oi=Ea,va=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,Ei=r=>ae.log.debug?ae.log.debug.bind(ae,"VHS:",`${r} >`):function(){};function at(...r){const e=ae.obj||ae;return(e.merge||e.mergeOptions).apply(e,r)}function Rt(...r){const e=ae.time||ae;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function Q_(r){if(r.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
|
|
201
|
+
`;for(let i=0;i<r.length;i++){const n=r.start(i),s=r.end(i);e+=`${n} --> ${s}. Duration (${s-n})
|
|
202
|
+
`}return e}const zi=1/30,Hi=zi*3,af=function(r,e){const i=[];let n;if(r&&r.length)for(n=0;n<r.length;n++)e(r.start(n),r.end(n))&&i.push([r.start(n),r.end(n)]);return Rt(i)},Wn=function(r,e){return af(r,function(i,n){return i-Hi<=e&&n+Hi>=e})},$s=function(r,e){return af(r,function(i){return i-zi>=e})},Z_=function(r){if(r.length<2)return Rt();const e=[];for(let i=1;i<r.length;i++){const n=r.end(i-1),s=r.start(i);e.push([n,s])}return Rt(e)},J_=function(r,e){let i=null,n=null,s=0;const a=[],o=[];if(!r||!r.length||!e||!e.length)return Rt();let l=r.length;for(;l--;)a.push({time:r.start(l),type:"start"}),a.push({time:r.end(l),type:"end"});for(l=e.length;l--;)a.push({time:e.start(l),type:"start"}),a.push({time:e.end(l),type:"end"});for(a.sort(function(c,d){return c.time-d.time}),l=0;l<a.length;l++)a[l].type==="start"?(s++,s===2&&(i=a[l].time)):a[l].type==="end"&&(s--,s===1&&(n=a[l].time)),i!==null&&n!==null&&(o.push([i,n]),i=null,n=null);return Rt(o)},of=r=>{const e=[];if(!r||!r.length)return"";for(let i=0;i<r.length;i++)e.push(r.start(i)+" => "+r.end(i));return e.join(", ")},e3=function(r,e,i=1){return((r.length?r.end(r.length-1):0)-e)/i},Nn=r=>{const e=[];for(let i=0;i<r.length;i++)e.push({start:r.start(i),end:r.end(i)});return e},t3=function(r,e){if(r===e)return!1;if(!r&&e||!e&&r||r.length!==e.length)return!0;for(let i=0;i<r.length;i++)if(r.start(i)!==e.start(i)||r.end(i)!==e.end(i))return!0;return!1},qo=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},ou=function(r,e){let i=0;if(!r||!r.length)return i;for(let n=0;n<r.length;n++){const s=r.start(n),a=r.end(n);if(!(e>a)){if(e>s&&e<=a){i+=a-e;continue}i+=a-s}}return i},lu=(r,e)=>{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(n){i+=n.duration}),(e.preloadHints||[]).forEach(function(n){n.type==="PART"&&(i+=r.partTargetDuration)}),i},fl=r=>(r.segments||[]).reduce((e,i,n)=>(i.parts?i.parts.forEach(function(s,a){e.push({duration:s.duration,segmentIndex:n,partIndex:a,part:s,segment:i})}):e.push({duration:i.duration,segmentIndex:n,partIndex:null,segment:i,part:null}),e),[]),lf=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},uf=({preloadSegment:r})=>{if(!r)return;const{parts:e,preloadHints:i}=r;let n=(i||[]).reduce((s,a)=>s+(a.type==="PART"?1:0),0);return n+=e&&e.length?e.length:0,n},cf=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const i=lf(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},i3=function(r,e){let i=0,n=e-r.mediaSequence,s=r.segments[n];if(s){if(typeof s.start<"u")return{result:s.start,precise:!0};if(typeof s.end<"u")return{result:s.end-s.duration,precise:!0}}for(;n--;){if(s=r.segments[n],typeof s.end<"u")return{result:i+s.end,precise:!0};if(i+=lu(r,s),typeof s.start<"u")return{result:i+s.start,precise:!0}}return{result:i,precise:!1}},n3=function(r,e){let i=0,n,s=e-r.mediaSequence;for(;s<r.segments.length;s++){if(n=r.segments[s],typeof n.start<"u")return{result:n.start-i,precise:!0};if(i+=lu(r,n),typeof n.end<"u")return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}},df=function(r,e,i){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const n=i3(r,e);if(n.precise)return n.result;const s=n3(r,e);return s.precise?s.result:n.result+i},hf=function(r,e,i){if(!r)return 0;if(typeof i!="number"&&(i=0),typeof e>"u"){if(r.totalDuration)return r.totalDuration;if(!r.endList)return W.Infinity}return df(r,e,i)},Jr=function({defaultDuration:r,durationList:e,startIndex:i,endIndex:n}){let s=0;if(i>n&&([i,n]=[n,i]),i<0){for(let a=i;a<Math.min(0,n);a++)s+=r;i=0}for(let a=i;a<n;a++)s+=e[a].duration;return s},ff=function(r,e,i,n){if(!r||!r.segments)return null;if(r.endList)return hf(r);if(e===null)return null;e=e||0;let s=df(r,r.mediaSequence+r.segments.length,e);return i&&(n=typeof n=="number"?n:cf(null,r),s-=n),Math.max(0,s)},r3=function(r,e,i){const s=e||0;let a=ff(r,e,!0,i);return a===null?Rt():(a<s&&(a=s),Rt(s,a))},s3=function({playlist:r,currentTime:e,startingSegmentIndex:i,startingPartIndex:n,startTime:s,exactManifestTimings:a}){let o=e-s;const l=fl(r);let c=0;for(let d=0;d<l.length;d++){const m=l[d];if(i===m.segmentIndex&&!(typeof n=="number"&&typeof m.partIndex=="number"&&n!==m.partIndex)){c=d;break}}if(o<0){if(c>0)for(let d=c-1;d>=0;d--){const m=l[d];if(o+=m.duration,a){if(o<0)continue}else if(o+zi<=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:s-Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e}}if(c<0){for(let d=c;d<0;d++)if(o-=r.targetDuration,o<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e};c=0}for(let d=c;d<l.length;d++){const m=l[d];o-=m.duration;const g=m.duration>zi,x=o===0,T=g&&o+zi>=0;if(!((x||T)&&d!==l.length-1)){if(a){if(o>0)continue}else if(o-zi>=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:s+Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:e}},pf=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},uu=function(r){return r.excludeUntil&&r.excludeUntil===1/0},ja=function(r){const e=pf(r);return!r.disabled&&!e},a3=function(r){return r.disabled},o3=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},mf=function(r,e){return e.attributes&&e.attributes[r]},l3=function(r,e,i,n=0){return mf("BANDWIDTH",i)?(r*i.attributes.BANDWIDTH-n*8)/e:NaN},pl=(r,e)=>{if(r.playlists.length===1)return!0;const i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(n=>ja(n)?(n.attributes.BANDWIDTH||0)<i:!1).length===0},cu=(r,e)=>!r&&!e||!r&&e||r&&!e?!1:!!(r===e||r.id&&e.id&&r.id===e.id||r.resolvedUri&&e.resolvedUri&&r.resolvedUri===e.resolvedUri||r.uri&&e.uri&&r.uri===e.uri),Sd=function(r,e){const i=r&&r.mediaGroups&&r.mediaGroups.AUDIO||{};let n=!1;for(const s in i){for(const a in i[s])if(n=e(i[s][a]),n)break;if(n)break}return!!n},hs=r=>{if(!r||!r.playlists||!r.playlists.length)return Sd(r,i=>i.playlists&&i.playlists.length||i.uri);for(let e=0;e<r.playlists.length;e++){const i=r.playlists[e],n=i.attributes&&i.attributes.CODECS;if(!(n&&n.split(",").every(a=>kh(a))||Sd(r,a=>cu(i,a))))return!1}return!0};var li={liveEdgeDelay:cf,duration:hf,seekable:r3,getMediaInfoForTime:s3,isEnabled:ja,isDisabled:a3,isExcluded:pf,isIncompatible:uu,playlistEnd:ff,isAes:o3,hasAttribute:mf,estimateSegmentRequestTime:l3,isLowestEnabledRendition:pl,isAudioOnly:hs,playlistMatch:cu,segmentDurationWithParts:lu};const{log:gf}=ae,Jn=(r,e)=>`${r}-${e}`,vf=(r,e,i)=>`placeholder-uri-${r}-${e}-${i}`,u3=({onwarn:r,oninfo:e,manifestString:i,customTagParsers:n=[],customTagMappers:s=[],llhls:a})=>{const o=new K2;r&&o.on("warn",r),e&&o.on("info",e),n.forEach(d=>o.addParser(d)),s.forEach(d=>o.addTagMapper(d)),o.push(i),o.end();const l=o.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(d){l.hasOwnProperty(d)&&delete l[d]}),l.segments&&l.segments.forEach(function(d){["parts","preloadHints"].forEach(function(m){d.hasOwnProperty(m)&&delete d[m]})})),!l.targetDuration){let d=10;l.segments&&l.segments.length&&(d=l.segments.reduce((m,g)=>Math.max(m,g.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${d}`}),l.targetDuration=d}const c=lf(l);if(c.length&&!l.partTargetDuration){const d=c.reduce((m,g)=>Math.max(m,g.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${d}`}),gf.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.")),l.partTargetDuration=d}return l},Tr=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(r.mediaGroups[i])for(const n in r.mediaGroups[i])for(const s in r.mediaGroups[i][n]){const a=r.mediaGroups[i][n][s];e(a,i,n,s)}})},yf=({playlist:r,uri:e,id:i})=>{r.id=i,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},c3=r=>{let e=r.playlists.length;for(;e--;){const i=r.playlists[e];yf({playlist:i,id:Jn(e,i.uri)}),i.resolvedUri=oi(r.uri,i.uri),r.playlists[i.id]=i,r.playlists[i.uri]=i,i.attributes.BANDWIDTH||gf.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},d3=r=>{Tr(r,e=>{e.uri&&(e.resolvedUri=oi(r.uri,e.uri))})},h3=(r,e)=>{const i=Jn(0,e),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:W.location.href,resolvedUri:W.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[e]=n.playlists[0],n},_f=(r,e,i=vf)=>{r.uri=e;for(let s=0;s<r.playlists.length;s++)if(!r.playlists[s].uri){const a=`placeholder-uri-${s}`;r.playlists[s].uri=a}const n=hs(r);Tr(r,(s,a,o,l)=>{if(!s.playlists||!s.playlists.length){if(n&&a==="AUDIO"&&!s.uri)for(let c=0;c<r.playlists.length;c++){const d=r.playlists[c];if(d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===o)return}s.playlists=[St({},s)]}s.playlists.forEach(function(c,d){const m=i(a,o,l,c),g=Jn(d,m);c.uri?c.resolvedUri=c.resolvedUri||oi(r.uri,c.uri):(c.uri=d===0?m:g,c.resolvedUri=c.uri),c.id=c.id||g,c.attributes=c.attributes||{},r.playlists[c.id]=c,r.playlists[c.uri]=c})}),c3(r),d3(r)};class Ed{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,n=i.startDate.getTime();this.trimProcessedDateRanges_(n),this.pendingDateRanges_=e.reduce((s,a)=>(s.set(a.id,a),s),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((n,s)=>{if(!this.processedDateRanges_.has(s)&&(n.startTime=n.startDate.getTime()/1e3-this.offset_,n.processDateRange=()=>this.processDateRange(n),i.push(n),!!n.class))if(e[n.class]){const a=e[n.class].push(n);n.classListIndex=a-1}else e[n.class]=[n],n.classListIndex=0});for(const n of i){const s=e[n.class]||[];n.endDate?n.endTime=n.endDate.getTime()/1e3-this.offset_:n.endOnNext&&s[n.classListIndex+1]?n.endTime=s[n.classListIndex+1].startTime:n.duration?n.endTime=n.startTime+n.duration:n.plannedDuration?n.endTime=n.startTime+n.plannedDuration:n.endTime=n.startTime}return i}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((n,s)=>{n.startDate.getTime()<e&&this.processedDateRanges_.delete(s)})}}const Tf=22,Rn=({requestType:r,request:e,error:i,parseFailure:n})=>{const s=e.status<200||e.status>299,a=e.status>=400&&e.status<=499,o={uri:e.uri,requestType:r},l=s&&!a||n;if(i&&a)o.error=St({},i),o.errorType=ae.Error.NetworkRequestFailed;else if(e.aborted)o.errorType=ae.Error.NetworkRequestAborted;else if(e.timedout)o.errorType=ae.Error.NetworkRequestTimeout;else if(l){const c=n?ae.Error.NetworkBodyParserFailed:ae.Error.NetworkBadStatus;o.errorType=c,o.status=e.status,o.headers=e.headers}return o},f3=Ei("CodecUtils"),bf=function(r){const e=r.attributes||{};if(e.CODECS)return Fi(e.CODECS)},Cf=(r,e)=>{const i=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&i.AUDIO&&r.mediaGroups.AUDIO[i.AUDIO]},p3=(r,e)=>{if(!Cf(r,e))return!0;const i=e.attributes||{},n=r.mediaGroups.AUDIO[i.AUDIO];for(const s in n)if(!n[s].uri&&!n[s].playlists)return!0;return!1},as=function(r){const e={};return r.forEach(({mediaType:i,type:n,details:s})=>{e[i]=e[i]||[],e[i].push(Eh(`${n}${s}`))}),Object.keys(e).forEach(function(i){if(e[i].length>1){f3(`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},kd=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},es=function(r,e){const i=e.attributes||{},n=as(bf(e)||[]);if(Cf(r,e)&&!n.audio&&!p3(r,e)){const s=as(Z2(r,i.AUDIO)||[]);s.audio&&(n.audio=s.audio)}return n},{EventTarget:m3}=ae,g3=(r,e)=>{if(e.endList||!e.serverControl)return r;const i={};if(e.serverControl.canBlockReload){const{preloadSegment:n}=e;let s=e.mediaSequence+e.segments.length;if(n){const a=n.parts||[],o=uf(e)-1;o>-1&&o!==a.length-1&&(i._HLS_part=o),(o>-1||a.length)&&s--}i._HLS_msn=s}if(e.serverControl&&e.serverControl.canSkipUntil&&(i._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const n=new W.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(s){i.hasOwnProperty(s)&&n.searchParams.set(s,i[s])}),r=n.toString()}return r},v3=(r,e)=>{if(!r)return e;const i=at(r,e);if(r.preloadHints&&!e.preloadHints&&delete i.preloadHints,r.parts&&!e.parts)delete i.parts;else if(r.parts&&e.parts)for(let n=0;n<e.parts.length;n++)r.parts&&r.parts[n]&&(i.parts[n]=at(r.parts[n],e.parts[n]));return!r.skipped&&e.skipped&&(i.skipped=!1),r.preload&&!e.preload&&(i.preload=!1),i},y3=(r,e,i)=>{const n=r.slice(),s=e.slice();i=i||0;const a=[];let o;for(let l=0;l<s.length;l++){const c=n[l+i],d=s[l];c?(o=c.map||o,a.push(v3(c,d))):(o&&!d.map&&(d.map=o),a.push(d))}return a},xf=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=oi(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=oi(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=oi(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=oi(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(i=>{i.resolvedUri||(i.resolvedUri=oi(e,i.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(i=>{i.resolvedUri||(i.resolvedUri=oi(e,i.uri))})},Sf=function(r){const e=r.segments||[],i=r.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints){for(let n=0;n<i.preloadHints.length;n++)if(i.preloadHints[n].type==="MAP")return e}i.duration=r.targetDuration,i.preload=!0,e.push(i)}return e},Ef=(r,e)=>r===e||r.segments&&e.segments&&r.segments.length===e.segments.length&&r.endList===e.endList&&r.mediaSequence===e.mediaSequence&&r.preloadSegment===e.preloadSegment,ml=(r,e,i=Ef)=>{const n=at(r,{}),s=n.playlists[e.id];if(!s||i(s,e))return null;e.segments=Sf(e);const a=at(s,e);if(a.preloadSegment&&!e.preloadSegment&&delete a.preloadSegment,s.segments){if(e.skip){e.segments=e.segments||[];for(let o=0;o<e.skip.skippedSegments;o++)e.segments.unshift({skipped:!0})}a.segments=y3(s.segments,e.segments,e.mediaSequence-s.mediaSequence)}a.segments.forEach(o=>{xf(o,a.resolvedUri)});for(let o=0;o<n.playlists.length;o++)n.playlists[o].id===e.id&&(n.playlists[o]=a);return n.playlists[e.id]=a,n.playlists[e.uri]=a,Tr(r,(o,l,c,d)=>{if(o.playlists)for(let m=0;m<o.playlists.length;m++)e.id===o.playlists[m].id&&(o.playlists[m]=a)}),n},gl=(r,e)=>{const i=r.segments||[],n=i[i.length-1],s=n&&n.parts&&n.parts[n.parts.length-1],a=s&&s.duration||n&&n.duration;return e&&a?a*1e3:(r.partTargetDuration||r.targetDuration||10)*500},wd=(r,e,i)=>{if(!r)return;const n=[];return r.forEach(s=>{if(!s.attributes)return;const{BANDWIDTH:a,RESOLUTION:o,CODECS:l}=s.attributes;n.push({id:s.id,bandwidth:a,resolution:o,codecs:l})}),{type:e,isLive:i,renditions:n}};class Yn extends m3{constructor(e,i,n={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Ei("PlaylistLoader");const{withCredentials:s=!1}=n;this.src=e,this.vhs_=i,this.withCredentials=s,this.addDateRangesToTextTrack_=n.addDateRangesToTextTrack;const a=i.options_;this.customTagParsers=a&&a.customTagParsers||[],this.customTagMappers=a&&a.customTagMappers||[],this.llhls=a&&a.llhls,this.dateRangesStorage_=new Ed,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=oi(this.main.uri,e.uri);this.llhls&&(i=g3(i,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials,requestType:"hls-playlist"},(n,s)=>{if(this.request){if(n)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,n){const{uri:s,id:a}=i;this.request=null,n&&(this.state=n),this.error={playlist:this.main.playlists[a],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Rn({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:i}){try{const n=u3({onwarn:({message:s})=>this.logger_(`m3u8-parser warn for ${e}: ${s}`),oninfo:({message:s})=>this.logger_(`m3u8-parser info for ${e}: ${s}`),manifestString:i,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!n.playlists||!n.playlists.length||this.excludeAudioOnlyVariants(n.playlists),n}catch(n){this.error=n,this.error.metadata={errorType:ae.Error.StreamingHlsPlaylistParserError,error:n}}}excludeAudioOnlyVariants(e){const i=n=>{const s=n.attributes||{},{width:a,height:o}=s.RESOLUTION||{};if(a&&o)return!0;const l=bf(n)||[];return!!as(l).video};e.some(i)&&e.forEach(n=>{i(n)||(n.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:i,url:n,id:s}){this.request=null,this.state="HAVE_METADATA";const a={playlistInfo:{type:"media",uri:n}};this.trigger({type:"playlistparsestart",metadata:a});const o=i||this.parseManifest_({url:n,manifestString:e});o.lastRequest=Date.now(),yf({playlist:o,uri:n,id:s});const l=ml(this.main,o);this.targetDuration=o.partTargetDuration||o.targetDuration,this.pendingMedia_=null,l?(this.main=l,this.media_=this.main.playlists[s]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(gl(this.media(),!!l)),a.parsedPlaylist=wd(this.main.playlists,a.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:a}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),W.clearTimeout(this.mediaUpdateTimeout),W.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Ed,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 l=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=W.setTimeout(this.media.bind(this,e,!1),l);return}const n=this.state,s=!this.media_||e.id!==this.media_.id,a=this.main.playlists[e.id];if(a&&a.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,s&&(this.trigger("mediachanging"),n==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(gl(e,!0)),!s)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 o={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:o}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(l,c)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=va(e.resolvedUri,c),l)return this.playlistRequestError(this.request,e,n);this.trigger({type:"playlistrequestcomplete",metadata:o}),this.haveMetadata({playlistString:c.responseText,url:e.uri,id:e.id}),n==="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 n=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=W.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},n);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,n)=>{if(!this.request)return;if(this.request=null,i)return this.error={status:n.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:n.responseText,code:2,metadata:Rn({requestType:n.requestType,request:n,error:i})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=va(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});const s=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=wd(s.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,_f(this.main,this.srcUri()),e.playlists.forEach(n=>{n.segments=Sf(n),n.segments.forEach(s=>{xf(s,n.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const i=this.srcUri()||W.location.href;this.main=h3(e,i),this.haveMetadata({playlistObject:e,url:i,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,i){const n=this.main,s=e.ID;let a=n.playlists.length;for(;a--;){const o=n.playlists[a];if(o.attributes["PATHWAY-ID"]===s){const l=o.resolvedUri,c=o.id;if(i){const d=this.createCloneURI_(o.resolvedUri,e),m=Jn(s,d),g=this.createCloneAttributes_(s,o.attributes),x=this.createClonePlaylist_(o,m,e,g);n.playlists[a]=x,n.playlists[m]=x,n.playlists[d]=x}else n.playlists.splice(a,1);delete n.playlists[c],delete n.playlists[l]}}this.updateOrDeleteCloneMedia(e,i)}updateOrDeleteCloneMedia(e,i){const n=this.main,s=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!n.mediaGroups[a]||!n.mediaGroups[a][s])){for(const o in n.mediaGroups[a])if(o===s){for(const l in n.mediaGroups[a][o])n.mediaGroups[a][o][l].playlists.forEach((d,m)=>{const g=n.playlists[d.id],x=g.id,T=g.resolvedUri;delete n.playlists[x],delete n.playlists[T]});delete n.mediaGroups[a][o]}}}),i&&this.createClonedMediaGroups_(e)}addClonePathway(e,i={}){const n=this.main,s=n.playlists.length,a=this.createCloneURI_(i.resolvedUri,e),o=Jn(e.ID,a),l=this.createCloneAttributes_(e.ID,i.attributes),c=this.createClonePlaylist_(i,o,e,l);n.playlists[s]=c,n.playlists[o]=c,n.playlists[a]=c,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const i=e.ID,n=e["BASE-ID"],s=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!s.mediaGroups[a]||s.mediaGroups[a][i]))for(const o in s.mediaGroups[a]){if(o===n)s.mediaGroups[a][i]={};else continue;for(const l in s.mediaGroups[a][o]){const c=s.mediaGroups[a][o][l];s.mediaGroups[a][i][l]=St({},c);const d=s.mediaGroups[a][i][l],m=this.createCloneURI_(c.resolvedUri,e);d.resolvedUri=m,d.uri=m,d.playlists=[],c.playlists.forEach((g,x)=>{const T=s.playlists[g.id],E=vf(a,i,l),v=Jn(i,E);if(T&&!s.playlists[v]){const b=this.createClonePlaylist_(T,v,e),D=b.resolvedUri;s.playlists[v]=b,s.playlists[D]=b}d.playlists[x]=this.createClonePlaylist_(g,v,e)})}}})}createClonePlaylist_(e,i,n,s){const a=this.createCloneURI_(e.resolvedUri,n),o={resolvedUri:a,uri:a,id:i};return e.segments&&(o.segments=[]),s&&(o.attributes=s),at(e,o)}createCloneURI_(e,i){const n=new URL(e);n.hostname=i["URI-REPLACEMENT"].HOST;const s=i["URI-REPLACEMENT"].PARAMS;for(const a of Object.keys(s))n.searchParams.set(a,s[a]);return n.href}createCloneAttributes_(e,i){const n={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{i[s]&&(n[s]=e)}),n}getKeyIdSet(e){const i=new Set;if(!e||!e.contentProtection)return i;for(const n in e.contentProtection)if(e.contentProtection[n]&&e.contentProtection[n].attributes&&e.contentProtection[n].attributes.keyId){const s=e.contentProtection[n].attributes.keyId;i.add(s.toLowerCase())}return i}}const vl=function(r,e,i,n){const s=r.responseType==="arraybuffer"?r.response:r.responseText;!e&&s&&(r.responseTime=Date.now(),r.roundTripTime=r.responseTime-r.requestTime,r.bytesReceived=s.byteLength||s.length,r.bandwidth||(r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3))),i.headers&&(r.responseHeaders=i.headers),e&&e.code==="ETIMEDOUT"&&(r.timedout=!0),!e&&!r.aborted&&i.statusCode!==200&&i.statusCode!==206&&i.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(r&&(s||r.responseText)))),n(e,r)},_3=(r,e)=>{if(!r||!r.size)return;let i=e;return r.forEach(n=>{i=n(i)}),i},T3=(r,e,i,n)=>{!r||!r.size||r.forEach(s=>{s(e,i,n)})},kf=function(){const r=function e(i,n){i=at({timeout:45e3},i);const s=e.beforeRequest||ae.Vhs.xhr.beforeRequest,a=e._requestCallbackSet||ae.Vhs.xhr._requestCallbackSet||new Set,o=e._responseCallbackSet||ae.Vhs.xhr._responseCallbackSet;s&&typeof s=="function"&&(ae.log.warn("beforeRequest is deprecated, use onRequest instead."),a.add(s));const l=ae.Vhs.xhr.original===!0?ae.xhr:ae.Vhs.xhr,c=_3(a,i);a.delete(s);const d=l(c||i,function(g,x){return T3(o,d,g,x),vl(d,g,x,n)}),m=d.abort;return d.abort=function(){return d.aborted=!0,m.apply(d,arguments)},d.uri=i.uri,d.requestType=i.requestType,d.requestTime=Date.now(),d};return r.original=!0,r},b3=function(r){let e;const i=r.offset;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=W.BigInt(r.offset)+W.BigInt(r.length)-W.BigInt(1):e=r.offset+r.length-1,"bytes="+i+"-"+e},yl=function(r){const e={};return r.byterange&&(e.Range=b3(r.byterange)),e},C3=function(r,e){return r.start(e)+"-"+r.end(e)},x3=function(r,e){const i=r.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},S3=function(r){return r>=32&&r<126?String.fromCharCode(r):"."},wf=function(r){const e={};return Object.keys(r).forEach(i=>{const n=r[i];Dh(n)?e[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:e[i]=n}),e},ya=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},Df=function(r){return r.resolvedUri},Af=r=>{const e=Array.prototype.slice.call(r),i=16;let n="",s,a;for(let o=0;o<e.length/i;o++)s=e.slice(o*i,o*i+i).map(x3).join(""),a=e.slice(o*i,o*i+i).map(S3).join(""),n+=s+" "+a+`
|
|
203
|
+
`;return n},E3=({bytes:r})=>Af(r),k3=r=>{let e="",i;for(i=0;i<r.length;i++)e+=C3(r,i)+" ";return e};var w3=Object.freeze({__proto__:null,createTransferableMessage:wf,initSegmentId:ya,segmentKeyId:Df,hexDump:Af,tagDump:E3,textRanges:k3});const If=.25,D3=(r,e)=>{if(!e.dateTimeObject)return null;const i=e.videoTimingInfo.transmuxerPrependedSeconds,s=e.videoTimingInfo.transmuxedPresentationStart+i,a=r-s;return new Date(e.dateTimeObject.getTime()+a*1e3)},A3=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,I3=(r,e)=>{let i;try{i=new Date(r)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let n=e.segments[0];if(i<new Date(n.dateTimeObject))return null;for(let c=0;c<e.segments.length-1;c++){n=e.segments[c];const d=new Date(e.segments[c+1].dateTimeObject);if(i<d)break}const s=e.segments[e.segments.length-1],a=s.dateTimeObject,o=s.videoTimingInfo?A3(s.videoTimingInfo):s.duration+s.duration*If,l=new Date(a.getTime()+o*1e3);return i>l?null:(i>new Date(a)&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:li.duration(e,e.mediaSequence+e.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})},N3=(r,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let i=0,n;for(let a=0;a<e.segments.length&&(n=e.segments[a],i=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration,!(r<=i));a++);const s=e.segments[e.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<r)return null;if(r>i){if(r>i+s.duration*If)return null;n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}},O3=(r,e)=>{let i,n;try{i=new Date(r),n=new Date(e)}catch{}const s=i.getTime();return(n.getTime()-s)/1e3},B3=r=>{if(!r.segments||r.segments.length===0)return!1;for(let e=0;e<r.segments.length;e++)if(!r.segments[e].dateTimeObject)return!1;return!0},L3=({playlist:r,time:e=void 0,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!r||e===void 0)return i({message:"getProgramTime: playlist and time must be provided"});const n=N3(e,r);if(!n)return i({message:"valid programTime was not found"});if(n.type==="estimate")return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});const s={mediaSeconds:e},a=D3(e,n.segment);return a&&(s.programDateTime=a.toISOString()),i(null,s)},Nf=({programTime:r,playlist:e,retryCount:i=2,seekTo:n,pauseAfterSeek:s=!0,tech:a,callback:o})=>{if(!o)throw new Error("seekToProgramTime: callback must be provided");if(typeof r>"u"||!e||!n)return o({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!a.hasStarted_)return o({message:"player must be playing a live stream to start buffering"});if(!B3(e))return o({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const l=I3(r,e);if(!l)return o({message:`${r} was not found in the stream`});const c=l.segment,d=O3(c.dateTimeObject,r);if(l.type==="estimate"){if(i===0)return o({message:`${r} is not buffered yet. Try again`});n(l.estimatedStart+d),a.one("seeked",()=>{Nf({programTime:r,playlist:e,retryCount:i-1,seekTo:n,pauseAfterSeek:s,tech:a,callback:o})});return}const m=c.start+d,g=()=>o(null,a.currentTime());a.one("seeked",g),s&&a.pause(),n(m)},jo=(r,e)=>{if(r.readyState===4)return e()},P3=(r,e,i,n)=>{let s=[],a,o=!1;const l=function(g,x,T,E){return x.abort(),o=!0,i(g,x,T,E)},c=function(g,x){if(o)return;if(g)return g.metadata=Rn({requestType:n,request:x,error:g}),l(g,x,"",s);const T=x.responseText.substring(s&&s.byteLength||0,x.responseText.length);if(s=lv(s,Ah(T,!0)),a=a||Gr(s),s.length<10||a&&s.length<a+2)return jo(x,()=>l(g,x,"",s));const E=Ll(s);return E==="ts"&&s.length<188?jo(x,()=>l(g,x,"",s)):!E&&s.length<376?jo(x,()=>l(g,x,"",s)):l(null,x,E,s)},m=e({uri:r,beforeSend(g){g.overrideMimeType("text/plain; charset=x-user-defined"),g.addEventListener("progress",function({total:x,loaded:T}){return vl(g,null,{statusCode:g.status},c)})}},function(g,x){return vl(m,g,x,c)});return m},{EventTarget:M3}=ae,Dd=function(r,e){if(!Ef(r,e)||r.sidx&&e.sidx&&(r.sidx.offset!==e.sidx.offset||r.sidx.length!==e.sidx.length))return!1;if(!r.sidx&&e.sidx||r.sidx&&!e.sidx||r.segments&&!e.segments||!r.segments&&e.segments)return!1;if(!r.segments&&!e.segments)return!0;for(let i=0;i<r.segments.length;i++){const n=r.segments[i],s=e.segments[i];if(n.uri!==s.uri)return!1;if(!n.byterange&&!s.byterange)continue;const a=n.byterange,o=s.byterange;if(a&&!o||!a&&o||a.offset!==o.offset||a.length!==o.length)return!1}return!0},R3=(r,e,i,n)=>{const s=n.attributes.NAME||i;return`placeholder-uri-${r}-${e}-${s}`},V3=({mainXml:r,srcUrl:e,clientOffset:i,sidxMapping:n,previousManifest:s})=>{const a=ay(r,{manifestUri:e,clientOffset:i,sidxMapping:n,previousManifest:s});return _f(a,e,R3),a},F3=(r,e)=>{Tr(r,(i,n,s,a)=>{(!e.mediaGroups[n][s]||!(a in e.mediaGroups[n][s]))&&delete r.mediaGroups[n][s][a]})},$3=(r,e,i)=>{let n=!0,s=at(r,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let a=0;a<e.playlists.length;a++){const o=e.playlists[a];if(o.sidx){const c=wa(o.sidx);i&&i[c]&&i[c].sidx&&Nl(o,i[c].sidx,o.sidx.resolvedUri)}const l=ml(s,o,Dd);l&&(s=l,n=!1)}return Tr(e,(a,o,l,c)=>{if(a.playlists&&a.playlists.length){const d=a.playlists[0].id,m=ml(s,a.playlists[0],Dd);m&&(s=m,c in s.mediaGroups[o][l]||(s.mediaGroups[o][l][c]=a),s.mediaGroups[o][l][c].playlists[0]=s.playlists[d],n=!1)}}),F3(s,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(n=!1),n?null:s},U3=(r,e)=>(!r.map&&!e.map||!!(r.map&&e.map&&r.map.byterange.offset===e.map.byterange.offset&&r.map.byterange.length===e.map.byterange.length))&&r.uri===e.uri&&r.byterange.offset===e.byterange.offset&&r.byterange.length===e.byterange.length,Ad=(r,e)=>{const i={};for(const n in r){const a=r[n].sidx;if(a){const o=wa(a);if(!e[o])break;const l=e[o].sidxInfo;U3(l,a)&&(i[o]=e[o])}}return i},z3=(r,e)=>{let n=Ad(r.playlists,e);return Tr(r,(s,a,o,l)=>{if(s.playlists&&s.playlists.length){const c=s.playlists;n=at(n,Ad(c,e))}}),n};class _l extends M3{constructor(e,i,n={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:a=!1}=n;if(this.vhs_=i,this.withCredentials=a,this.addMetadataToTextTrack=n.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_=Ei("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,i,n){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},n&&(this.state=n),this.trigger("error"),!0}addSidxSegments_(e,i,n){const s=e.sidx&&wa(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s]){W.clearTimeout(this.mediaRequest_),this.mediaRequest_=W.setTimeout(()=>n(!1),0);return}const a=va(e.sidx.resolvedUri),o=(c,d)=>{if(this.requestErrored_(c,d,i))return;const m=this.mainPlaylistLoader_.sidxMapping_,{requestType:g}=d;let x;try{x=dy(Ue(d.response).subarray(8))}catch(T){T.metadata=Rn({requestType:g,request:d,parseFailure:!0}),this.requestErrored_(T,d,i);return}return m[s]={sidxInfo:e.sidx,sidx:x},Nl(e,x,e.sidx.resolvedUri),n(!0)},l="dash-sidx";this.request=P3(a,this.vhs_.xhr,(c,d,m,g)=>{if(c)return o(c,d);if(!m||m!=="mp4"){const E=m||"unknown";return o({status:d.status,message:`Unsupported ${E} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},d)}const{offset:x,length:T}=e.sidx.byterange;if(g.length>=T+x)return o(c,{response:g.subarray(x,x+T),status:d.status,uri:d.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:yl({byterange:e.sidx.byterange})},o)},l)}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 n=!this.media_||e.id!==this.media_.id;if(n&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,n&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}n&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,s=>{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 n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=W.setTimeout(()=>this.load(),n);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"},(n,s)=>{if(n){const{requestType:o}=s;n.metadata=Rn({requestType:o,request:s,error:n})}if(this.requestErrored_(n,s)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:i});const a=s.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=va(this.mainPlaylistLoader_.srcUrl,s),a){this.handleMain_(),this.syncClientServerClock_(()=>e(s,a));return}return e(s,a)})}syncClientServerClock_(e){const i=oy(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:oi(this.mainPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(n,s)=>{if(!this.request)return;if(n){const{requestType:o}=s;return this.error.metadata=Rn({requestType:o,request:s,error:n}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let a;i.method==="HEAD"?!s.responseHeaders||!s.responseHeaders.date?a=this.mainLoaded_:a=Date.parse(s.responseHeaders.date):a=Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=a-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 n;try{n=V3({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(a){this.error=a,this.error.metadata={errorType:ae.Error.StreamingDashManifestParserError,error:a},this.trigger("error")}e&&(n=$3(e,n,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=n||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||n&&n.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(n),n){const{duration:a,endList:o}=n,l=[];n.playlists.forEach(d=>{l.push({id:d.id,bandwidth:d.attributes.BANDWIDTH,resolution:d.attributes.RESOLUTION,codecs:d.attributes.CODECS})});const c={duration:a,isLive:!o,renditions:l};i.parsedManifest=c,this.trigger({type:"manifestparsecomplete",metadata:i})}return!!n}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_=z3(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,n=>{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,n=!this.media_||this.media_!==i[e];if(n?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const s=()=>{this.media().endList||(this.mediaUpdateTimeout=W.setTimeout(()=>{this.trigger("mediaupdatetimeout"),s()},gl(this.media(),!!n)))};s()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const i=this.mainPlaylistLoader_.main.eventStream.map(n=>({cueTime:n.start,frames:[{data:n.messageData}]}));this.addMetadataToTextTrack("EventStream",i,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const n in e.contentProtection){const s=e.contentProtection[n].attributes["cenc:default_KID"];s&&i.add(s.replace(/-/g,"").toLowerCase())}return i}}}var Pt={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 H3=r=>{const e=new Uint8Array(new ArrayBuffer(r.length));for(let i=0;i<r.length;i++)e[i]=r.charCodeAt(i);return e.buffer},Of=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},q3=function(r){try{return URL.createObjectURL(new Blob([r],{type:"application/javascript"}))}catch{const i=new BlobBuilder;return i.append(r),URL.createObjectURL(i.getBlob())}},Bf=function(r){return function(){const e=q3(r),i=Of(new Worker(e));i.objURL=e;const n=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(e),n.call(this)},i}},Lf=function(r){return`var browserWorkerPolyFill = ${Of.toString()};
|
|
204
|
+
browserWorkerPolyFill(self);
|
|
205
|
+
`+r},Pf=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},j3=Lf(Pf(function(){var r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var u={};this.on=function(h,p){u[h]||(u[h]=[]),u[h]=u[h].concat(p)},this.off=function(h,p){var f;return u[h]?(f=u[h].indexOf(p),u[h]=u[h].slice(),u[h].splice(f,1),f>-1):!1},this.trigger=function(h){var p,f,y,_;if(p=u[h],!!p)if(arguments.length===2)for(y=p.length,f=0;f<y;++f)p[f].call(this,arguments[1]);else{for(_=[],f=arguments.length,f=1;f<arguments.length;++f)_.push(arguments[f]);for(y=p.length,f=0;f<y;++f)p[f].apply(this,_)}},this.dispose=function(){u={}}}};e.prototype.pipe=function(u){return this.on("data",function(h){u.push(h)}),this.on("done",function(h){u.flush(h)}),this.on("partialdone",function(h){u.partialFlush(h)}),this.on("endedtimeline",function(h){u.endTimeline(h)}),this.on("reset",function(h){u.reset(h)}),u},e.prototype.push=function(u){this.trigger("data",u)},e.prototype.flush=function(u){this.trigger("done",u)},e.prototype.partialFlush=function(u){this.trigger("partialdone",u)},e.prototype.endTimeline=function(u){this.trigger("endedtimeline",u)},e.prototype.reset=function(u){this.trigger("reset",u)};var i=e,n=Math.pow(2,32),s=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p;return h.getBigUint64?(p=h.getBigUint64(0),p<Number.MAX_SAFE_INTEGER?Number(p):p):h.getUint32(0)*n+h.getUint32(4)},a={getUint64:s,MAX_UINT32:n},o=a.MAX_UINT32,l,c,d,m,g,x,T,E,v,b,D,N,w,$,F,H,O,U,C,k,P,z,B,R,V,te,ee,q,j,J,se,Q,ie,K,Z,oe;(function(){var u;if(B={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(u in B)B.hasOwnProperty(u)&&(B[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);R=new Uint8Array([105,115,111,109]),te=new Uint8Array([97,118,99,49]),V=new Uint8Array([0,0,0,1]),ee=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]),q=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]),j={video:ee,audio:q},Q=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),se=new Uint8Array([0,0,0,0,0,0,0,0]),ie=new Uint8Array([0,0,0,0,0,0,0,0]),K=ie,Z=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),oe=ie,J=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),l=function(u){var h=[],p=0,f,y,_;for(f=1;f<arguments.length;f++)h.push(arguments[f]);for(f=h.length;f--;)p+=h[f].byteLength;for(y=new Uint8Array(p+8),_=new DataView(y.buffer,y.byteOffset,y.byteLength),_.setUint32(0,y.byteLength),y.set(u,4),f=0,p=8;f<h.length;f++)y.set(h[f],p),p+=h[f].byteLength;return y},c=function(){return l(B.dinf,l(B.dref,Q))},d=function(u){return l(B.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,u.audioobjecttype<<3|u.samplingfrequencyindex>>>1,u.samplingfrequencyindex<<7|u.channelcount<<3,6,1,2]))},m=function(){return l(B.ftyp,R,V,R,te)},H=function(u){return l(B.hdlr,j[u])},g=function(u){return l(B.mdat,u)},F=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,u.duration>>>24&255,u.duration>>>16&255,u.duration>>>8&255,u.duration&255,85,196,0,0]);return u.samplerate&&(h[12]=u.samplerate>>>24&255,h[13]=u.samplerate>>>16&255,h[14]=u.samplerate>>>8&255,h[15]=u.samplerate&255),l(B.mdhd,h)},$=function(u){return l(B.mdia,F(u),H(u.type),T(u))},x=function(u){return l(B.mfhd,new Uint8Array([0,0,0,0,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255]))},T=function(u){return l(B.minf,u.type==="video"?l(B.vmhd,J):l(B.smhd,se),c(),U(u))},E=function(u,h){for(var p=[],f=h.length;f--;)p[f]=k(h[f]);return l.apply(null,[B.moof,x(u)].concat(p))},v=function(u){for(var h=u.length,p=[];h--;)p[h]=N(u[h]);return l.apply(null,[B.moov,D(4294967295)].concat(p).concat(b(u)))},b=function(u){for(var h=u.length,p=[];h--;)p[h]=P(u[h]);return l.apply(null,[B.mvex].concat(p))},D=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&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 l(B.mvhd,h)},O=function(u){var h=u.samples||[],p=new Uint8Array(4+h.length),f,y;for(y=0;y<h.length;y++)f=h[y].flags,p[y+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return l(B.sdtp,p)},U=function(u){return l(B.stbl,C(u),l(B.stts,oe),l(B.stsc,K),l(B.stsz,Z),l(B.stco,ie))},(function(){var u,h;C=function(p){return l(B.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),p.type==="video"?u(p):h(p))},u=function(p){var f=p.sps||[],y=p.pps||[],_=[],L=[],M,G;for(M=0;M<f.length;M++)_.push((f[M].byteLength&65280)>>>8),_.push(f[M].byteLength&255),_=_.concat(Array.prototype.slice.call(f[M]));for(M=0;M<y.length;M++)L.push((y[M].byteLength&65280)>>>8),L.push(y[M].byteLength&255),L=L.concat(Array.prototype.slice.call(y[M]));if(G=[B.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,(p.width&65280)>>8,p.width&255,(p.height&65280)>>8,p.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]),l(B.avcC,new Uint8Array([1,p.profileIdc,p.profileCompatibility,p.levelIdc,255].concat([f.length],_,[y.length],L))),l(B.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],p.sarRatio){var Y=p.sarRatio[0],re=p.sarRatio[1];G.push(l(B.pasp,new Uint8Array([(Y&4278190080)>>24,(Y&16711680)>>16,(Y&65280)>>8,Y&255,(re&4278190080)>>24,(re&16711680)>>16,(re&65280)>>8,re&255])))}return l.apply(null,G)},h=function(p){return l(B.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(p.channelcount&65280)>>8,p.channelcount&255,(p.samplesize&65280)>>8,p.samplesize&255,0,0,0,0,(p.samplerate&65280)>>8,p.samplerate&255,0,0]),d(p))}})(),w=function(u){var h=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,0,(u.duration&4278190080)>>24,(u.duration&16711680)>>16,(u.duration&65280)>>8,u.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,(u.width&65280)>>8,u.width&255,0,0,(u.height&65280)>>8,u.height&255,0,0]);return l(B.tkhd,h)},k=function(u){var h,p,f,y,_,L,M;return h=l(B.tfhd,new Uint8Array([0,0,0,58,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),L=Math.floor(u.baseMediaDecodeTime/o),M=Math.floor(u.baseMediaDecodeTime%o),p=l(B.tfdt,new Uint8Array([1,0,0,0,L>>>24&255,L>>>16&255,L>>>8&255,L&255,M>>>24&255,M>>>16&255,M>>>8&255,M&255])),_=92,u.type==="audio"?(f=z(u,_),l(B.traf,h,p,f)):(y=O(u),f=z(u,y.length+_),l(B.traf,h,p,f,y))},N=function(u){return u.duration=u.duration||4294967295,l(B.trak,w(u),$(u))},P=function(u){var h=new Uint8Array([0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return u.type!=="video"&&(h[h.length-1]=0),l(B.trex,h)},(function(){var u,h,p;p=function(f,y){var _=0,L=0,M=0,G=0;return f.length&&(f[0].duration!==void 0&&(_=1),f[0].size!==void 0&&(L=2),f[0].flags!==void 0&&(M=4),f[0].compositionTimeOffset!==void 0&&(G=8)),[0,0,_|L|M|G,1,(f.length&4278190080)>>>24,(f.length&16711680)>>>16,(f.length&65280)>>>8,f.length&255,(y&4278190080)>>>24,(y&16711680)>>>16,(y&65280)>>>8,y&255]},h=function(f,y){var _,L,M,G,Y,re;for(G=f.samples||[],y+=20+16*G.length,M=p(G,y),L=new Uint8Array(M.length+G.length*16),L.set(M),_=M.length,re=0;re<G.length;re++)Y=G[re],L[_++]=(Y.duration&4278190080)>>>24,L[_++]=(Y.duration&16711680)>>>16,L[_++]=(Y.duration&65280)>>>8,L[_++]=Y.duration&255,L[_++]=(Y.size&4278190080)>>>24,L[_++]=(Y.size&16711680)>>>16,L[_++]=(Y.size&65280)>>>8,L[_++]=Y.size&255,L[_++]=Y.flags.isLeading<<2|Y.flags.dependsOn,L[_++]=Y.flags.isDependedOn<<6|Y.flags.hasRedundancy<<4|Y.flags.paddingValue<<1|Y.flags.isNonSyncSample,L[_++]=Y.flags.degradationPriority&61440,L[_++]=Y.flags.degradationPriority&15,L[_++]=(Y.compositionTimeOffset&4278190080)>>>24,L[_++]=(Y.compositionTimeOffset&16711680)>>>16,L[_++]=(Y.compositionTimeOffset&65280)>>>8,L[_++]=Y.compositionTimeOffset&255;return l(B.trun,L)},u=function(f,y){var _,L,M,G,Y,re;for(G=f.samples||[],y+=20+8*G.length,M=p(G,y),_=new Uint8Array(M.length+G.length*8),_.set(M),L=M.length,re=0;re<G.length;re++)Y=G[re],_[L++]=(Y.duration&4278190080)>>>24,_[L++]=(Y.duration&16711680)>>>16,_[L++]=(Y.duration&65280)>>>8,_[L++]=Y.duration&255,_[L++]=(Y.size&4278190080)>>>24,_[L++]=(Y.size&16711680)>>>16,_[L++]=(Y.size&65280)>>>8,_[L++]=Y.size&255;return l(B.trun,_)},z=function(f,y){return f.type==="audio"?u(f,y):h(f,y)}})();var ge={ftyp:m,mdat:g,moof:E,moov:v,initSegment:function(u){var h=m(),p=v(u),f;return f=new Uint8Array(h.byteLength+p.byteLength),f.set(h),f.set(p,h.byteLength),f}},Ne=function(u){var h,p,f=[],y=[];for(y.byteLength=0,y.nalCount=0,y.duration=0,f.byteLength=0,h=0;h<u.length;h++)p=u[h],p.nalUnitType==="access_unit_delimiter_rbsp"?(f.length&&(f.duration=p.dts-f.dts,y.byteLength+=f.byteLength,y.nalCount+=f.length,y.duration+=f.duration,y.push(f)),f=[p],f.byteLength=p.data.byteLength,f.pts=p.pts,f.dts=p.dts):(p.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(f.keyFrame=!0),f.duration=p.dts-f.dts,f.byteLength+=p.data.byteLength,f.push(p));return y.length&&(!f.duration||f.duration<=0)&&(f.duration=y[y.length-1].duration),y.byteLength+=f.byteLength,y.nalCount+=f.length,y.duration+=f.duration,y.push(f),y},be=function(u){var h,p,f=[],y=[];for(f.byteLength=0,f.nalCount=0,f.duration=0,f.pts=u[0].pts,f.dts=u[0].dts,y.byteLength=0,y.nalCount=0,y.duration=0,y.pts=u[0].pts,y.dts=u[0].dts,h=0;h<u.length;h++)p=u[h],p.keyFrame?(f.length&&(y.push(f),y.byteLength+=f.byteLength,y.nalCount+=f.nalCount,y.duration+=f.duration),f=[p],f.nalCount=p.length,f.byteLength=p.byteLength,f.pts=p.pts,f.dts=p.dts,f.duration=p.duration):(f.duration+=p.duration,f.nalCount+=p.length,f.byteLength+=p.byteLength,f.push(p));return y.length&&f.duration<=0&&(f.duration=y[y.length-1].duration),y.byteLength+=f.byteLength,y.nalCount+=f.nalCount,y.duration+=f.duration,y.push(f),y},Le=function(u){var h;return!u[0][0].keyFrame&&u.length>1&&(h=u.shift(),u.byteLength-=h.byteLength,u.nalCount-=h.nalCount,u[0][0].dts=h.dts,u[0][0].pts=h.pts,u[0][0].duration+=h.duration),u},qe=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Ke=function(u,h){var p=qe();return p.dataOffset=h,p.compositionTimeOffset=u.pts-u.dts,p.duration=u.duration,p.size=4*u.length,p.size+=u.byteLength,u.keyFrame&&(p.flags.dependsOn=2,p.flags.isNonSyncSample=0),p},Pe=function(u,h){var p,f,y,_,L,M=h||0,G=[];for(p=0;p<u.length;p++)for(_=u[p],f=0;f<_.length;f++)L=_[f],y=Ke(L,M),M+=y.size,G.push(y);return G},Ze=function(u){var h,p,f,y,_,L,M=0,G=u.byteLength,Y=u.nalCount,re=G+4*Y,ce=new Uint8Array(re),we=new DataView(ce.buffer);for(h=0;h<u.length;h++)for(y=u[h],p=0;p<y.length;p++)for(_=y[p],f=0;f<_.length;f++)L=_[f],we.setUint32(M,L.data.byteLength),M+=4,ce.set(L.data,M),M+=L.data.byteLength;return ce},tt=function(u,h){var p,f=h||0,y=[];return p=Ke(u,f),y.push(p),y},ze=function(u){var h,p,f=0,y=u.byteLength,_=u.length,L=y+4*_,M=new Uint8Array(L),G=new DataView(M.buffer);for(h=0;h<u.length;h++)p=u[h],G.setUint32(f,p.data.byteLength),f+=4,M.set(p.data,f),f+=p.data.byteLength;return M},gt={groupNalsIntoFrames:Ne,groupFramesIntoGops:be,extendFirstKeyFrame:Le,generateSampleTable:Pe,concatenateNalData:Ze,generateSampleTableForFrame:tt,concatenateNalDataForFrame:ze},nt=[33,16,5,32,164,27],Oe=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Ee=function(u){for(var h=[];u--;)h.push(0);return h},me=function(u){return Object.keys(u).reduce(function(h,p){return h[p]=new Uint8Array(u[p].reduce(function(f,y){return f.concat(y)},[])),h},{})},Fe,pe=function(){if(!Fe){var u={96e3:[nt,[227,64],Ee(154),[56]],88200:[nt,[231],Ee(170),[56]],64e3:[nt,[248,192],Ee(240),[56]],48e3:[nt,[255,192],Ee(268),[55,148,128],Ee(54),[112]],44100:[nt,[255,192],Ee(268),[55,163,128],Ee(84),[112]],32e3:[nt,[255,192],Ee(268),[55,234],Ee(226),[112]],24e3:[nt,[255,192],Ee(268),[55,255,128],Ee(268),[111,112],Ee(126),[224]],16e3:[nt,[255,192],Ee(268),[55,255,128],Ee(268),[111,255],Ee(269),[223,108],Ee(195),[1,192]],12e3:[Oe,Ee(268),[3,127,248],Ee(268),[6,255,240],Ee(268),[13,255,224],Ee(268),[27,253,128],Ee(259),[56]],11025:[Oe,Ee(268),[3,127,248],Ee(268),[6,255,240],Ee(268),[13,255,224],Ee(268),[27,255,192],Ee(268),[55,175,128],Ee(108),[112]],8e3:[Oe,Ee(268),[3,121,16],Ee(47),[7]]};Fe=me(u)}return Fe},ye=9e4,Ce,he,ue,ve,Me,De,dt;Ce=function(u){return u*ye},he=function(u,h){return u*h},ue=function(u){return u/ye},ve=function(u,h){return u/h},Me=function(u,h){return Ce(ve(u,h))},De=function(u,h){return he(ue(u),h)},dt=function(u,h,p){return ue(p?u:u-h)};var Re={ONE_SECOND_IN_TS:ye,secondsToVideoTs:Ce,secondsToAudioTs:he,videoTsToSeconds:ue,audioTsToSeconds:ve,audioTsToVideoTs:Me,videoTsToAudioTs:De,metadataTsToSeconds:dt},Nt=pe,vt=Re,Ot=function(u){var h,p,f=0;for(h=0;h<u.length;h++)p=u[h],f+=p.data.byteLength;return f},wt=function(u,h,p,f){var y,_=0,L=0,M=0,G=0,Y,re,ce;if(h.length&&(y=vt.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),_=Math.ceil(vt.ONE_SECOND_IN_TS/(u.samplerate/1024)),p&&f&&(L=y-Math.max(p,f),M=Math.floor(L/_),G=M*_),!(M<1||G>vt.ONE_SECOND_IN_TS/2))){for(Y=Nt()[u.samplerate],Y||(Y=h[0].data),re=0;re<M;re++)ce=h[0],h.splice(0,0,{data:Y,dts:ce.dts-_,pts:ce.pts-_});return u.baseMediaDecodeTime-=Math.floor(vt.videoTsToAudioTs(G,u.samplerate)),G}},Vt=function(u,h,p){return h.minSegmentDts>=p?u:(h.minSegmentDts=1/0,u.filter(function(f){return f.dts>=p?(h.minSegmentDts=Math.min(h.minSegmentDts,f.dts),h.minSegmentPts=h.minSegmentDts,!0):!1}))},ni=function(u){var h,p,f=[];for(h=0;h<u.length;h++)p=u[h],f.push({size:p.data.byteLength,duration:1024});return f},Ft=function(u){var h,p,f=0,y=new Uint8Array(Ot(u));for(h=0;h<u.length;h++)p=u[h],y.set(p.data,f),f+=p.data.byteLength;return y},gi={prefixWithSilence:wt,trimAdtsFramesByEarliestDts:Vt,generateSampleTable:ni,concatenateFrameData:Ft},Bt=Re.ONE_SECOND_IN_TS,vi=function(u,h){typeof h.pts=="number"&&(u.timelineStartInfo.pts===void 0&&(u.timelineStartInfo.pts=h.pts),u.minSegmentPts===void 0?u.minSegmentPts=h.pts:u.minSegmentPts=Math.min(u.minSegmentPts,h.pts),u.maxSegmentPts===void 0?u.maxSegmentPts=h.pts:u.maxSegmentPts=Math.max(u.maxSegmentPts,h.pts)),typeof h.dts=="number"&&(u.timelineStartInfo.dts===void 0&&(u.timelineStartInfo.dts=h.dts),u.minSegmentDts===void 0?u.minSegmentDts=h.dts:u.minSegmentDts=Math.min(u.minSegmentDts,h.dts),u.maxSegmentDts===void 0?u.maxSegmentDts=h.dts:u.maxSegmentDts=Math.max(u.maxSegmentDts,h.dts))},S=function(u){delete u.minSegmentDts,delete u.maxSegmentDts,delete u.minSegmentPts,delete u.maxSegmentPts},A=function(u,h){var p,f,y=u.minSegmentDts;return h||(y-=u.timelineStartInfo.dts),p=u.timelineStartInfo.baseMediaDecodeTime,p+=y,p=Math.max(0,p),u.type==="audio"&&(f=u.samplerate/Bt,p*=f,p=Math.floor(p)),p},X={clearDtsInfo:S,calculateTrackBaseMediaDecodeTime:A,collectDtsInfo:vi},le=4,Se=128,$e=function(u){for(var h=0,p={payloadType:-1,payloadSize:0},f=0,y=0;h<u.byteLength&&u[h]!==Se;){for(;u[h]===255;)f+=255,h++;for(f+=u[h++];u[h]===255;)y+=255,h++;if(y+=u[h++],!p.payload&&f===le){var _=String.fromCharCode(u[h+3],u[h+4],u[h+5],u[h+6]);if(_==="GA94"){p.payloadType=f,p.payloadSize=y,p.payload=u.subarray(h,h+y);break}else p.payload=void 0}h+=y,f=0,y=0}return p},rt=function(u){return u.payload[0]!==181||(u.payload[1]<<8|u.payload[2])!==49||String.fromCharCode(u.payload[3],u.payload[4],u.payload[5],u.payload[6])!=="GA94"||u.payload[7]!==3?null:u.payload.subarray(8,u.payload.length-1)},Dt=function(u,h){var p=[],f,y,_,L;if(!(h[0]&64))return p;for(y=h[0]&31,f=0;f<y;f++)_=f*3,L={type:h[_+2]&3,pts:u},h[_+2]&4&&(L.ccData=h[_+3]<<8|h[_+4],p.push(L));return p},Yt=function(u){for(var h=u.byteLength,p=[],f=1,y,_;f<h-2;)u[f]===0&&u[f+1]===0&&u[f+2]===3?(p.push(f+2),f+=2):f++;if(p.length===0)return u;y=h-p.length,_=new Uint8Array(y);var L=0;for(f=0;f<y;L++,f++)L===p[0]&&(L++,p.shift()),_[f]=u[L];return _},Ht={parseSei:$e,parseUserData:rt,parseCaptionPackets:Dt,discardEmulationPreventionBytes:Yt,USER_DATA_REGISTERED_ITU_T_T35:le},$t=i,ri=Ht,Je=function(u){u=u||{},Je.prototype.init.call(this),this.parse708captions_=typeof u.parse708captions=="boolean"?u.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new ke(0,0),new ke(0,1),new ke(1,0),new ke(1,1)],this.parse708captions_&&(this.cc708Stream_=new Ye({captionServices:u.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 $t,Je.prototype.push=function(u){var h,p,f;if(u.nalUnitType==="sei_rbsp"&&(h=ri.parseSei(u.escapedRBSP),!!h.payload&&h.payloadType===ri.USER_DATA_REGISTERED_ITU_T_T35&&(p=ri.parseUserData(h),!!p))){if(u.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(u.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}f=ri.parseCaptionPackets(u.pts,p),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==u.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=u.dts}},Je.prototype.flushCCStreams=function(u){this.ccStreams_.forEach(function(h){return u==="flush"?h.flush():h.partialFlush()},this)},Je.prototype.flushStream=function(u){if(!this.captionPackets_.length){this.flushCCStreams(u);return}this.captionPackets_.forEach(function(h,p){h.presortIndex=p}),this.captionPackets_.sort(function(h,p){return h.pts===p.pts?h.presortIndex-p.presortIndex:h.pts-p.pts}),this.captionPackets_.forEach(function(h){h.type<2?this.dispatchCea608Packet(h):this.dispatchCea708Packet(h)},this),this.captionPackets_.length=0,this.flushCCStreams(u)},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(u){u.reset()})},Je.prototype.dispatchCea608Packet=function(u){this.setsTextOrXDSActive(u)?this.activeCea608Channel_[u.type]=null:this.setsChannel1Active(u)?this.activeCea608Channel_[u.type]=0:this.setsChannel2Active(u)&&(this.activeCea608Channel_[u.type]=1),this.activeCea608Channel_[u.type]!==null&&this.ccStreams_[(u.type<<1)+this.activeCea608Channel_[u.type]].push(u)},Je.prototype.setsChannel1Active=function(u){return(u.ccData&30720)===4096},Je.prototype.setsChannel2Active=function(u){return(u.ccData&30720)===6144},Je.prototype.setsTextOrXDSActive=function(u){return(u.ccData&28928)===256||(u.ccData&30974)===4138||(u.ccData&30974)===6186},Je.prototype.dispatchCea708Packet=function(u){this.parse708captions_&&this.cc708Stream_.push(u)};var si={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},Xt=function(u){var h=si[u]||u;return u&4096&&u===h?"":String.fromCharCode(h)},Kt=function(u){return 32<=u&&u<=127||160<=u&&u<=255},At=function(u){this.windowNum=u,this.reset()};At.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},At.prototype.getText=function(){return this.rows.join(`
|
|
206
|
+
`)},At.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},At.prototype.newLine=function(u){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(u),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},At.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},At.prototype.addText=function(u){this.rows[this.rowIdx]+=u},At.prototype.backspace=function(){if(!this.isEmpty()){var u=this.rows[this.rowIdx];this.rows[this.rowIdx]=u.substr(0,u.length-1)}};var ut=function(u,h,p){this.serviceNum=u,this.text="",this.currentWindow=new At(-1),this.windows=[],this.stream=p,typeof h=="string"&&this.createTextDecoder(h)};ut.prototype.init=function(u,h){this.startPts=u;for(var p=0;p<8;p++)this.windows[p]=new At(p),typeof h=="function"&&(this.windows[p].beforeRowOverflow=h)},ut.prototype.setCurrentWindow=function(u){this.currentWindow=this.windows[u]},ut.prototype.createTextDecoder=function(u){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(u)}catch(h){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+u+" encoding. "+h})}};var Ye=function(u){u=u||{},Ye.prototype.init.call(this);var h=this,p=u.captionServices||{},f={},y;Object.keys(p).forEach(_=>{y=p[_],/^SERVICE/.test(_)&&(f[_]=y.encoding)}),this.serviceEncodings=f,this.current708Packet=null,this.services={},this.push=function(_){_.type===3?(h.new708Packet(),h.add708Bytes(_)):(h.current708Packet===null&&h.new708Packet(),h.add708Bytes(_))}};Ye.prototype=new $t,Ye.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ye.prototype.add708Bytes=function(u){var h=u.ccData,p=h>>>8,f=h&255;this.current708Packet.ptsVals.push(u.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(f)},Ye.prototype.push708Packet=function(){var u=this.current708Packet,h=u.data,p=null,f=null,y=0,_=h[y++];for(u.seq=_>>6,u.sizeCode=_&63;y<h.length;y++)_=h[y++],p=_>>5,f=_&31,p===7&&f>0&&(_=h[y++],p=_),this.pushServiceBlock(p,y,f),f>0&&(y+=f-1)},Ye.prototype.pushServiceBlock=function(u,h,p){var f,y=h,_=this.current708Packet.data,L=this.services[u];for(L||(L=this.initService(u,y));y<h+p&&y<_.length;y++)f=_[y],Kt(f)?y=this.handleText(y,L):f===24?y=this.multiByteCharacter(y,L):f===16?y=this.extendedCommands(y,L):128<=f&&f<=135?y=this.setCurrentWindow(y,L):152<=f&&f<=159?y=this.defineWindow(y,L):f===136?y=this.clearWindows(y,L):f===140?y=this.deleteWindows(y,L):f===137?y=this.displayWindows(y,L):f===138?y=this.hideWindows(y,L):f===139?y=this.toggleWindows(y,L):f===151?y=this.setWindowAttributes(y,L):f===144?y=this.setPenAttributes(y,L):f===145?y=this.setPenColor(y,L):f===146?y=this.setPenLocation(y,L):f===143?L=this.reset(y,L):f===8?L.currentWindow.backspace():f===12?L.currentWindow.clearText():f===13?L.currentWindow.pendingNewLine=!0:f===14?L.currentWindow.clearText():f===141&&y++},Ye.prototype.extendedCommands=function(u,h){var p=this.current708Packet.data,f=p[++u];return Kt(f)&&(u=this.handleText(u,h,{isExtended:!0})),u},Ye.prototype.getPts=function(u){return this.current708Packet.ptsVals[Math.floor(u/2)]},Ye.prototype.initService=function(u,h){var f="SERVICE"+u,p=this,f,y;return f in this.serviceEncodings&&(y=this.serviceEncodings[f]),this.services[u]=new ut(u,y,p),this.services[u].init(this.getPts(h),function(_){p.flushDisplayed(_,p.services[u])}),this.services[u]},Ye.prototype.handleText=function(u,h,p){var f=p&&p.isExtended,y=p&&p.isMultiByte,_=this.current708Packet.data,L=f?4096:0,M=_[u],G=_[u+1],Y=h.currentWindow,re,ce;function we(fe){return fe.map(Ve=>("0"+(Ve&255).toString(16)).slice(-2)).join("")}if(y?(ce=[M,G],u++):ce=[M],h.textDecoder_&&!f)re=h.textDecoder_.decode(new Uint8Array(ce));else if(y){const fe=we(ce);re=String.fromCharCode(parseInt(fe,16))}else re=Xt(L|M);return Y.pendingNewLine&&!Y.isEmpty()&&Y.newLine(this.getPts(u)),Y.pendingNewLine=!1,Y.addText(re),u},Ye.prototype.multiByteCharacter=function(u,h){var p=this.current708Packet.data,f=p[u+1],y=p[u+2];return Kt(f)&&Kt(y)&&(u=this.handleText(++u,h,{isMultiByte:!0})),u},Ye.prototype.setCurrentWindow=function(u,h){var p=this.current708Packet.data,f=p[u],y=f&7;return h.setCurrentWindow(y),u},Ye.prototype.defineWindow=function(u,h){var p=this.current708Packet.data,f=p[u],y=f&7;h.setCurrentWindow(y);var _=h.currentWindow;return f=p[++u],_.visible=(f&32)>>5,_.rowLock=(f&16)>>4,_.columnLock=(f&8)>>3,_.priority=f&7,f=p[++u],_.relativePositioning=(f&128)>>7,_.anchorVertical=f&127,f=p[++u],_.anchorHorizontal=f,f=p[++u],_.anchorPoint=(f&240)>>4,_.rowCount=f&15,f=p[++u],_.columnCount=f&63,f=p[++u],_.windowStyle=(f&56)>>3,_.penStyle=f&7,_.virtualRowCount=_.rowCount+1,u},Ye.prototype.setWindowAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],y=h.currentWindow.winAttr;return f=p[++u],y.fillOpacity=(f&192)>>6,y.fillRed=(f&48)>>4,y.fillGreen=(f&12)>>2,y.fillBlue=f&3,f=p[++u],y.borderType=(f&192)>>6,y.borderRed=(f&48)>>4,y.borderGreen=(f&12)>>2,y.borderBlue=f&3,f=p[++u],y.borderType+=(f&128)>>5,y.wordWrap=(f&64)>>6,y.printDirection=(f&48)>>4,y.scrollDirection=(f&12)>>2,y.justify=f&3,f=p[++u],y.effectSpeed=(f&240)>>4,y.effectDirection=(f&12)>>2,y.displayEffect=f&3,u},Ye.prototype.flushDisplayed=function(u,h){for(var p=[],f=0;f<8;f++)h.windows[f].visible&&!h.windows[f].isEmpty()&&p.push(h.windows[f].getText());h.endPts=u,h.text=p.join(`
|
|
207
|
+
|
|
208
|
+
`),this.pushCaption(h),h.startPts=u},Ye.prototype.pushCaption=function(u){u.text!==""&&(this.trigger("data",{startPts:u.startPts,endPts:u.endPts,text:u.text,stream:"cc708_"+u.serviceNum}),u.text="",u.startPts=u.endPts)},Ye.prototype.displayWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],y=this.getPts(u);this.flushDisplayed(y,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=1);return u},Ye.prototype.hideWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],y=this.getPts(u);this.flushDisplayed(y,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=0);return u},Ye.prototype.toggleWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],y=this.getPts(u);this.flushDisplayed(y,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible^=1);return u},Ye.prototype.clearWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],y=this.getPts(u);this.flushDisplayed(y,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].clearText();return u},Ye.prototype.deleteWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],y=this.getPts(u);this.flushDisplayed(y,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].reset();return u},Ye.prototype.setPenAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],y=h.currentWindow.penAttr;return f=p[++u],y.textTag=(f&240)>>4,y.offset=(f&12)>>2,y.penSize=f&3,f=p[++u],y.italics=(f&128)>>7,y.underline=(f&64)>>6,y.edgeType=(f&56)>>3,y.fontStyle=f&7,u},Ye.prototype.setPenColor=function(u,h){var p=this.current708Packet.data,f=p[u],y=h.currentWindow.penColor;return f=p[++u],y.fgOpacity=(f&192)>>6,y.fgRed=(f&48)>>4,y.fgGreen=(f&12)>>2,y.fgBlue=f&3,f=p[++u],y.bgOpacity=(f&192)>>6,y.bgRed=(f&48)>>4,y.bgGreen=(f&12)>>2,y.bgBlue=f&3,f=p[++u],y.edgeRed=(f&48)>>4,y.edgeGreen=(f&12)>>2,y.edgeBlue=f&3,u},Ye.prototype.setPenLocation=function(u,h){var p=this.current708Packet.data,f=p[u],y=h.currentWindow.penLoc;return h.currentWindow.pendingNewLine=!0,f=p[++u],y.row=f&15,f=p[++u],y.column=f&63,u},Ye.prototype.reset=function(u,h){var p=this.getPts(u);return this.flushDisplayed(p,h),this.initService(h.serviceNum,u)};var ki={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(u){return u===null?"":(u=ki[u]||u,String.fromCharCode(u))},Cn=14,fs=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Yi=function(){for(var u=[],h=Cn+1;h--;)u.push({text:"",indent:0,offset:0});return u},ke=function(u,h){ke.prototype.init.call(this),this.field_=u||0,this.dataChannel_=h||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(p){var f,y,_,L,M;if(f=p.ccData&32639,f===this.lastControlCode_){this.lastControlCode_=null;return}if((f&61440)===4096?this.lastControlCode_=f:f!==this.PADDING_&&(this.lastControlCode_=null),_=f>>>8,L=f&255,f!==this.PADDING_)if(f===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(f===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(p.pts),this.flushDisplayed(p.pts),y=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=y,this.startPts_=p.pts;else if(f===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(p.pts);else if(f===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(p.pts);else if(f===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(p.pts);else if(f===this.CARRIAGE_RETURN_)this.clearFormatting(p.pts),this.flushDisplayed(p.pts),this.shiftRowsUp_(),this.startPts_=p.pts;else if(f===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(f===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(p.pts),this.displayed_=Yi();else if(f===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Yi();else if(f===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(p.pts),this.displayed_=Yi()),this.mode_="paintOn",this.startPts_=p.pts;else if(this.isSpecialCharacter(_,L))_=(_&3)<<8,M=Mi(_|L),this[this.mode_](p.pts,M),this.column_++;else if(this.isExtCharacter(_,L))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),_=(_&3)<<8,M=Mi(_|L),this[this.mode_](p.pts,M),this.column_++;else if(this.isMidRowCode(_,L))this.clearFormatting(p.pts),this[this.mode_](p.pts," "),this.column_++,(L&14)===14&&this.addFormatting(p.pts,["i"]),(L&1)===1&&this.addFormatting(p.pts,["u"]);else if(this.isOffsetControlCode(_,L)){const Y=L&3;this.nonDisplayed_[this.row_].offset=Y,this.column_+=Y}else if(this.isPAC(_,L)){var G=fs.indexOf(f&7968);if(this.mode_==="rollUp"&&(G-this.rollUpRows_+1<0&&(G=this.rollUpRows_-1),this.setRollUp(p.pts,G)),G!==this.row_&&G>=0&&G<=14&&(this.clearFormatting(p.pts),this.row_=G),L&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(p.pts,["u"]),(f&16)===16){const Y=(f&14)>>1;this.column_=Y*4,this.nonDisplayed_[this.row_].indent+=Y}this.isColorPAC(L)&&(L&14)===14&&this.addFormatting(p.pts,["i"])}else this.isNormalChar(_)&&(L===0&&(L=null),M=Mi(_),M+=Mi(L),this[this.mode_](p.pts,M),this.column_+=M.length)}};ke.prototype=new $t,ke.prototype.flushDisplayed=function(u){const h=f=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."})},p=[];this.displayed_.forEach((f,y)=>{if(f&&f.text&&f.text.length){try{f.text=f.text.trim()}catch{h(y)}f.text.length&&p.push({text:f.text,line:y+1,position:10+Math.min(70,f.indent*10)+f.offset*2.5})}else f==null&&h(y)}),p.length&&this.trigger("data",{startPts:this.startPts_,endPts:u,content:p,stream:this.name_})},ke.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Yi(),this.nonDisplayed_=Yi(),this.lastControlCode_=null,this.column_=0,this.row_=Cn,this.rollUpRows_=2,this.formatting_=[]},ke.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},ke.prototype.isSpecialCharacter=function(u,h){return u===this.EXT_&&h>=48&&h<=63},ke.prototype.isExtCharacter=function(u,h){return(u===this.EXT_+1||u===this.EXT_+2)&&h>=32&&h<=63},ke.prototype.isMidRowCode=function(u,h){return u===this.EXT_&&h>=32&&h<=47},ke.prototype.isOffsetControlCode=function(u,h){return u===this.OFFSET_&&h>=33&&h<=35},ke.prototype.isPAC=function(u,h){return u>=this.BASE_&&u<this.BASE_+8&&h>=64&&h<=127},ke.prototype.isColorPAC=function(u){return u>=64&&u<=79||u>=96&&u<=127},ke.prototype.isNormalChar=function(u){return u>=32&&u<=127},ke.prototype.setRollUp=function(u,h){if(this.mode_!=="rollUp"&&(this.row_=Cn,this.mode_="rollUp",this.flushDisplayed(u),this.nonDisplayed_=Yi(),this.displayed_=Yi()),h!==void 0&&h!==this.row_)for(var p=0;p<this.rollUpRows_;p++)this.displayed_[h-p]=this.displayed_[this.row_-p],this.displayed_[this.row_-p]={text:"",indent:0,offset:0};h===void 0&&(h=this.row_),this.topRow_=h-this.rollUpRows_+1},ke.prototype.addFormatting=function(u,h){this.formatting_=this.formatting_.concat(h);var p=h.reduce(function(f,y){return f+"<"+y+">"},"");this[this.mode_](u,p)},ke.prototype.clearFormatting=function(u){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(p,f){return p+"</"+f+">"},"");this.formatting_=[],this[this.mode_](u,h)}},ke.prototype.popOn=function(u,h){var p=this.nonDisplayed_[this.row_].text;p+=h,this.nonDisplayed_[this.row_].text=p},ke.prototype.rollUp=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p},ke.prototype.shiftRowsUp_=function(){var u;for(u=0;u<this.topRow_;u++)this.displayed_[u]={text:"",indent:0,offset:0};for(u=this.row_+1;u<Cn+1;u++)this.displayed_[u]={text:"",indent:0,offset:0};for(u=this.topRow_;u<this.row_;u++)this.displayed_[u]=this.displayed_[u+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},ke.prototype.paintOn=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p};var ne={CaptionStream:Je,Cea608Stream:ke,Cea708Stream:Ye},_e={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ae=i,et=8589934592,qt=4294967296,It="shared",Ct=function(u,h){var p=1;for(u>h&&(p=-1);Math.abs(h-u)>qt;)u+=p*et;return u},wi=function(u){var h,p;wi.prototype.init.call(this),this.type_=u||It,this.push=function(f){if(f.type==="metadata"){this.trigger("data",f);return}this.type_!==It&&f.type!==this.type_||(p===void 0&&(p=f.dts),f.dts=Ct(f.dts,p),f.pts=Ct(f.pts,p),h=f.dts,this.trigger("data",f))},this.flush=function(){p=h,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){p=void 0,h=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};wi.prototype=new Ae;var Tt={TimestampRolloverStream:wi,handleRollover:Ct},br=(u,h,p)=>{if(!u)return-1;for(var f=p;f<u.length;f++)if(u[f]===h)return f;return-1},ps={typedArrayIndexOf:br},Cr=ps.typedArrayIndexOf,ms={Utf8:3},fu=function(u,h,p){var f,y="";for(f=h;f<p;f++)y+="%"+("00"+u[f].toString(16)).slice(-2);return y},xr=function(u,h,p){return decodeURIComponent(fu(u,h,p))},Sr=function(u,h,p){return unescape(fu(u,h,p))},Er=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},kr={APIC:function(u){var h=1,p,f,y="-->";u.data[0]===ms.Utf8&&(p=Cr(u.data,0,h),!(p<0)&&(u.mimeType=Sr(u.data,h,p),h=p+1,u.pictureType=u.data[h],h++,f=Cr(u.data,0,h),!(f<0)&&(u.description=xr(u.data,h,f),h=f+1,u.mimeType===y?u.url=Sr(u.data,h,u.data.length):u.pictureData=u.data.subarray(h,u.data.length))))},"T*":function(u){u.data[0]===ms.Utf8&&(u.value=xr(u.data,1,u.data.length).replace(/\0*$/,""),u.values=u.value.split("\0"))},TXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=Cr(u.data,0,1),h!==-1&&(u.description=xr(u.data,1,h),u.value=xr(u.data,h+1,u.data.length).replace(/\0*$/,""),u.data=u.value))},"W*":function(u){u.url=Sr(u.data,0,u.data.length).replace(/\0.*$/,"")},WXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=Cr(u.data,0,1),h!==-1&&(u.description=xr(u.data,1,h),u.url=Sr(u.data,h+1,u.data.length).replace(/\0.*$/,"")))},PRIV:function(u){var h;for(h=0;h<u.data.length;h++)if(u.data[h]===0){u.owner=Sr(u.data,0,h);break}u.privateData=u.data.subarray(h+1),u.data=u.privateData}},fp=function(u){var h,p,f=10,y=0,_=[];if(!(u.length<10||u[0]!==73||u[1]!==68||u[2]!==51)){y=Er(u.subarray(6,10)),y+=10;var L=u[5]&64;L&&(f+=4,f+=Er(u.subarray(10,14)),y-=Er(u.subarray(16,20)));do{if(h=Er(u.subarray(f+4,f+8)),h<1)break;p=String.fromCharCode(u[f],u[f+1],u[f+2],u[f+3]);var M={id:p,data:u.subarray(f+10,f+h+10)};M.key=M.id,kr[M.id]?kr[M.id](M):M.id[0]==="T"?kr["T*"](M):M.id[0]==="W"&&kr["W*"](M),_.push(M),f+=10,f+=h}while(f<y);return _}},pu={parseId3Frames:fp,parseSyncSafeInteger:Er,frameParsers:kr},pp=i,mp=_e,on=pu,gs;gs=function(u){var h={descriptor:u&&u.descriptor},p=0,f=[],y=0,_;if(gs.prototype.init.call(this),this.dispatchType=mp.METADATA_STREAM_TYPE.toString(16),h.descriptor)for(_=0;_<h.descriptor.length;_++)this.dispatchType+=("00"+h.descriptor[_].toString(16)).slice(-2);this.push=function(L){var M,G,Y,re,ce,we;if(L.type==="timed-metadata"){if(L.dataAlignmentIndicator&&(y=0,f.length=0),f.length===0&&(L.data.length<10||L.data[0]!==73||L.data[1]!==68||L.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(f.push(L),y+=L.data.byteLength,f.length===1&&(p=on.parseSyncSafeInteger(L.data.subarray(6,10)),p+=10),!(y<p)){for(M={data:new Uint8Array(p),frames:[],pts:f[0].pts,dts:f[0].dts},ce=0;ce<p;)M.data.set(f[0].data.subarray(0,p-ce),ce),ce+=f[0].data.byteLength,y-=f[0].data.byteLength,f.shift();G=10,M.data[5]&64&&(G+=4,G+=on.parseSyncSafeInteger(M.data.subarray(10,14)),p-=on.parseSyncSafeInteger(M.data.subarray(16,20)));do{if(Y=on.parseSyncSafeInteger(M.data.subarray(G+4,G+8)),Y<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(we=String.fromCharCode(M.data[G],M.data[G+1],M.data[G+2],M.data[G+3]),re={id:we,data:M.data.subarray(G+10,G+Y+10)},re.key=re.id,on.frameParsers[re.id]?on.frameParsers[re.id](re):re.id[0]==="T"?on.frameParsers["T*"](re):re.id[0]==="W"&&on.frameParsers["W*"](re),re.owner==="com.apple.streaming.transportStreamTimestamp"){var fe=re.data,Ve=(fe[3]&1)<<30|fe[4]<<22|fe[5]<<14|fe[6]<<6|fe[7]>>>2;Ve*=4,Ve+=fe[7]&3,re.timeStamp=Ve,M.pts===void 0&&M.dts===void 0&&(M.pts=re.timeStamp,M.dts=re.timeStamp),this.trigger("timestamp",re)}M.frames.push(re),G+=10,G+=Y}while(G<p);this.trigger("data",M)}}}},gs.prototype=new pp;var gp=gs,Ga=i,Wa=ne,Di=_e,vp=Tt.TimestampRolloverStream,vs,wr,ys,$n=188,Ya=71;vs=function(){var u=new Uint8Array($n),h=0;vs.prototype.init.call(this),this.push=function(p){var f=0,y=$n,_;for(h?(_=new Uint8Array(p.byteLength+h),_.set(u.subarray(0,h)),_.set(p,h),h=0):_=p;y<_.byteLength;){if(_[f]===Ya&&_[y]===Ya){this.trigger("data",_.subarray(f,y)),f+=$n,y+=$n;continue}f++,y++}f<_.byteLength&&(u.set(_.subarray(f),0),h=_.byteLength-f)},this.flush=function(){h===$n&&u[0]===Ya&&(this.trigger("data",u),h=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){h=0,this.trigger("reset")}},vs.prototype=new Ga,wr=function(){var u,h,p,f;wr.prototype.init.call(this),f=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,u=function(y,_){var L=0;_.payloadUnitStartIndicator&&(L+=y[L]+1),_.type==="pat"?h(y.subarray(L),_):p(y.subarray(L),_)},h=function(y,_){_.section_number=y[7],_.last_section_number=y[8],f.pmtPid=(y[10]&31)<<8|y[11],_.pmtPid=f.pmtPid},p=function(y,_){var L,M,G,Y;if(y[5]&1){for(f.programMapTable={video:null,audio:null,"timed-metadata":{}},L=(y[1]&15)<<8|y[2],M=3+L-4,G=(y[10]&15)<<8|y[11],Y=12+G;Y<M;){var re=y[Y],ce=(y[Y+1]&31)<<8|y[Y+2];re===Di.H264_STREAM_TYPE&&f.programMapTable.video===null?f.programMapTable.video=ce:re===Di.ADTS_STREAM_TYPE&&f.programMapTable.audio===null?f.programMapTable.audio=ce:re===Di.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][ce]=re),Y+=((y[Y+3]&15)<<8|y[Y+4])+5}_.programMapTable=f.programMapTable}},this.push=function(y){var _={},L=4;if(_.payloadUnitStartIndicator=!!(y[1]&64),_.pid=y[1]&31,_.pid<<=8,_.pid|=y[2],(y[3]&48)>>>4>1&&(L+=y[L]+1),_.pid===0)_.type="pat",u(y.subarray(L),_),this.trigger("data",_);else if(_.pid===this.pmtPid)for(_.type="pmt",u(y.subarray(L),_),this.trigger("data",_);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([y,L,_]):this.processPes_(y,L,_)},this.processPes_=function(y,_,L){L.pid===this.programMapTable.video?L.streamType=Di.H264_STREAM_TYPE:L.pid===this.programMapTable.audio?L.streamType=Di.ADTS_STREAM_TYPE:L.streamType=this.programMapTable["timed-metadata"][L.pid],L.type="pes",L.data=y.subarray(_),this.trigger("data",L)}},wr.prototype=new Ga,wr.STREAM_TYPES={h264:27,adts:15},ys=function(){var u=this,h=!1,p={data:[],size:0},f={data:[],size:0},y={data:[],size:0},_,L=function(G,Y){var re;const ce=G[0]<<16|G[1]<<8|G[2];Y.data=new Uint8Array,ce===1&&(Y.packetLength=6+(G[4]<<8|G[5]),Y.dataAlignmentIndicator=(G[6]&4)!==0,re=G[7],re&192&&(Y.pts=(G[9]&14)<<27|(G[10]&255)<<20|(G[11]&254)<<12|(G[12]&255)<<5|(G[13]&254)>>>3,Y.pts*=4,Y.pts+=(G[13]&6)>>>1,Y.dts=Y.pts,re&64&&(Y.dts=(G[14]&14)<<27|(G[15]&255)<<20|(G[16]&254)<<12|(G[17]&255)<<5|(G[18]&254)>>>3,Y.dts*=4,Y.dts+=(G[18]&6)>>>1)),Y.data=G.subarray(9+G[8]))},M=function(G,Y,re){var ce=new Uint8Array(G.size),we={type:Y},fe=0,Ve=0,We=!1,Lt;if(!(!G.data.length||G.size<9)){for(we.trackId=G.data[0].pid,fe=0;fe<G.data.length;fe++)Lt=G.data[fe],ce.set(Lt.data,Ve),Ve+=Lt.data.byteLength;L(ce,we),We=Y==="video"||we.packetLength<=G.size,(re||We)&&(G.size=0,G.data.length=0),We&&u.trigger("data",we)}};ys.prototype.init.call(this),this.push=function(G){({pat:function(){},pes:function(){var Y,re;switch(G.streamType){case Di.H264_STREAM_TYPE:Y=p,re="video";break;case Di.ADTS_STREAM_TYPE:Y=f,re="audio";break;case Di.METADATA_STREAM_TYPE:Y=y,re="timed-metadata";break;default:return}G.payloadUnitStartIndicator&&M(Y,re,!0),Y.data.push(G),Y.size+=G.data.byteLength},pmt:function(){var Y={type:"metadata",tracks:[]};_=G.programMapTable,_.video!==null&&Y.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&Y.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),h=!0,u.trigger("data",Y)}})[G.type]()},this.reset=function(){p.size=0,p.data.length=0,f.size=0,f.data.length=0,this.trigger("reset")},this.flushStreams_=function(){M(p,"video"),M(f,"audio"),M(y,"timed-metadata")},this.flush=function(){if(!h&&_){var G={type:"metadata",tracks:[]};_.video!==null&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),u.trigger("data",G)}h=!1,this.flushStreams_(),this.trigger("done")}},ys.prototype=new Ga;var mu={PAT_PID:0,MP2T_PACKET_LENGTH:$n,TransportPacketStream:vs,TransportParseStream:wr,ElementaryStream:ys,TimestampRolloverStream:vp,CaptionStream:Wa.CaptionStream,Cea608Stream:Wa.Cea608Stream,Cea708Stream:Wa.Cea708Stream,MetadataStream:gp};for(var Xa in Di)Di.hasOwnProperty(Xa)&&(mu[Xa]=Di[Xa]);var yp=mu,_p=i,Tp=Re.ONE_SECOND_IN_TS,_s,gu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_s=function(u){var h,p=0;_s.prototype.init.call(this),this.skipWarn_=function(f,y){this.trigger("log",{level:"warn",message:`adts skiping bytes ${f} to ${y} in frame ${p} outside syncword`})},this.push=function(f){var y=0,_,L,M,G,Y;if(u||(p=0),f.type==="audio"){h&&h.length?(M=h,h=new Uint8Array(M.byteLength+f.data.byteLength),h.set(M),h.set(f.data,M.byteLength)):h=f.data;for(var re;y+7<h.length;){if(h[y]!==255||(h[y+1]&246)!==240){typeof re!="number"&&(re=y),y++;continue}if(typeof re=="number"&&(this.skipWarn_(re,y),re=null),L=(~h[y+1]&1)*2,_=(h[y+3]&3)<<11|h[y+4]<<3|(h[y+5]&224)>>5,G=((h[y+6]&3)+1)*1024,Y=G*Tp/gu[(h[y+2]&60)>>>2],h.byteLength-y<_)break;this.trigger("data",{pts:f.pts+p*Y,dts:f.dts+p*Y,sampleCount:G,audioobjecttype:(h[y+2]>>>6&3)+1,channelcount:(h[y+2]&1)<<2|(h[y+3]&192)>>>6,samplerate:gu[(h[y+2]&60)>>>2],samplingfrequencyindex:(h[y+2]&60)>>>2,samplesize:16,data:h.subarray(y+7+L,y+_)}),p++,y+=_}typeof re=="number"&&(this.skipWarn_(re,y),re=null),h=h.subarray(y)}},this.flush=function(){p=0,this.trigger("done")},this.reset=function(){h=void 0,this.trigger("reset")},this.endTimeline=function(){h=void 0,this.trigger("endedtimeline")}},_s.prototype=new _p;var bp=_s,vu;vu=function(u){var h=u.byteLength,p=0,f=0;this.length=function(){return 8*h},this.bitsAvailable=function(){return 8*h+f},this.loadWord=function(){var y=u.byteLength-h,_=new Uint8Array(4),L=Math.min(4,h);if(L===0)throw new Error("no bytes available");_.set(u.subarray(y,y+L)),p=new DataView(_.buffer).getUint32(0),f=L*8,h-=L},this.skipBits=function(y){var _;f>y?(p<<=y,f-=y):(y-=f,_=Math.floor(y/8),y-=_*8,h-=_,this.loadWord(),p<<=y,f-=y)},this.readBits=function(y){var _=Math.min(f,y),L=p>>>32-_;return f-=_,f>0?p<<=_:h>0&&this.loadWord(),_=y-_,_>0?L<<_|this.readBits(_):L},this.skipLeadingZeros=function(){var y;for(y=0;y<f;++y)if((p&2147483648>>>y)!==0)return p<<=y,f-=y,y;return this.loadWord(),y+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var y=this.skipLeadingZeros();return this.readBits(y+1)-1},this.readExpGolomb=function(){var y=this.readUnsignedExpGolomb();return 1&y?1+y>>>1:-1*(y>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Cp=vu,yu=i,xp=Cp,Ts,bs,_u;bs=function(){var u=0,h,p;bs.prototype.init.call(this),this.push=function(f){var y;p?(y=new Uint8Array(p.byteLength+f.data.byteLength),y.set(p),y.set(f.data,p.byteLength),p=y):p=f.data;for(var _=p.byteLength;u<_-3;u++)if(p[u+2]===1){h=u+5;break}for(;h<_;)switch(p[h]){case 0:if(p[h-1]!==0){h+=2;break}else if(p[h-2]!==0){h++;break}u+3!==h-2&&this.trigger("data",p.subarray(u+3,h-2));do h++;while(p[h]!==1&&h<_);u=h-2,h+=3;break;case 1:if(p[h-1]!==0||p[h-2]!==0){h+=3;break}this.trigger("data",p.subarray(u+3,h-2)),u=h-2,h+=3;break;default:h+=3;break}p=p.subarray(u),h-=u,u=0},this.reset=function(){p=null,u=0,this.trigger("reset")},this.flush=function(){p&&p.byteLength>3&&this.trigger("data",p.subarray(u+3)),p=null,u=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},bs.prototype=new yu,_u={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ts=function(){var u=new bs,h,p,f,y,_,L,M;Ts.prototype.init.call(this),h=this,this.push=function(G){G.type==="video"&&(p=G.trackId,f=G.pts,y=G.dts,u.push(G))},u.on("data",function(G){var Y={trackId:p,pts:f,dts:y,data:G,nalUnitTypeCode:G[0]&31};switch(Y.nalUnitTypeCode){case 5:Y.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:Y.nalUnitType="sei_rbsp",Y.escapedRBSP=_(G.subarray(1));break;case 7:Y.nalUnitType="seq_parameter_set_rbsp",Y.escapedRBSP=_(G.subarray(1)),Y.config=L(Y.escapedRBSP);break;case 8:Y.nalUnitType="pic_parameter_set_rbsp";break;case 9:Y.nalUnitType="access_unit_delimiter_rbsp";break}h.trigger("data",Y)}),u.on("done",function(){h.trigger("done")}),u.on("partialdone",function(){h.trigger("partialdone")}),u.on("reset",function(){h.trigger("reset")}),u.on("endedtimeline",function(){h.trigger("endedtimeline")}),this.flush=function(){u.flush()},this.partialFlush=function(){u.partialFlush()},this.reset=function(){u.reset()},this.endTimeline=function(){u.endTimeline()},M=function(G,Y){var re=8,ce=8,we,fe;for(we=0;we<G;we++)ce!==0&&(fe=Y.readExpGolomb(),ce=(re+fe+256)%256),re=ce===0?re:ce},_=function(G){for(var Y=G.byteLength,re=[],ce=1,we,fe;ce<Y-2;)G[ce]===0&&G[ce+1]===0&&G[ce+2]===3?(re.push(ce+2),ce+=2):ce++;if(re.length===0)return G;we=Y-re.length,fe=new Uint8Array(we);var Ve=0;for(ce=0;ce<we;Ve++,ce++)Ve===re[0]&&(Ve++,re.shift()),fe[ce]=G[Ve];return fe},L=function(G){var Y=0,re=0,ce=0,we=0,fe,Ve,We,Lt,ci,un,Lr,Pr,Mr,Rr,Bs,ht=[1,1],Vr,Ii;if(fe=new xp(G),Ve=fe.readUnsignedByte(),Lt=fe.readUnsignedByte(),We=fe.readUnsignedByte(),fe.skipUnsignedExpGolomb(),_u[Ve]&&(ci=fe.readUnsignedExpGolomb(),ci===3&&fe.skipBits(1),fe.skipUnsignedExpGolomb(),fe.skipUnsignedExpGolomb(),fe.skipBits(1),fe.readBoolean()))for(Bs=ci!==3?8:12,Ii=0;Ii<Bs;Ii++)fe.readBoolean()&&(Ii<6?M(16,fe):M(64,fe));if(fe.skipUnsignedExpGolomb(),un=fe.readUnsignedExpGolomb(),un===0)fe.readUnsignedExpGolomb();else if(un===1)for(fe.skipBits(1),fe.skipExpGolomb(),fe.skipExpGolomb(),Lr=fe.readUnsignedExpGolomb(),Ii=0;Ii<Lr;Ii++)fe.skipExpGolomb();if(fe.skipUnsignedExpGolomb(),fe.skipBits(1),Pr=fe.readUnsignedExpGolomb(),Mr=fe.readUnsignedExpGolomb(),Rr=fe.readBits(1),Rr===0&&fe.skipBits(1),fe.skipBits(1),fe.readBoolean()&&(Y=fe.readUnsignedExpGolomb(),re=fe.readUnsignedExpGolomb(),ce=fe.readUnsignedExpGolomb(),we=fe.readUnsignedExpGolomb()),fe.readBoolean()&&fe.readBoolean()){switch(Vr=fe.readUnsignedByte(),Vr){case 1:ht=[1,1];break;case 2:ht=[12,11];break;case 3:ht=[10,11];break;case 4:ht=[16,11];break;case 5:ht=[40,33];break;case 6:ht=[24,11];break;case 7:ht=[20,11];break;case 8:ht=[32,11];break;case 9:ht=[80,33];break;case 10:ht=[18,11];break;case 11:ht=[15,11];break;case 12:ht=[64,33];break;case 13:ht=[160,99];break;case 14:ht=[4,3];break;case 15:ht=[3,2];break;case 16:ht=[2,1];break;case 255:{ht=[fe.readUnsignedByte()<<8|fe.readUnsignedByte(),fe.readUnsignedByte()<<8|fe.readUnsignedByte()];break}}ht&&ht[0]/ht[1]}return{profileIdc:Ve,levelIdc:We,profileCompatibility:Lt,width:(Pr+1)*16-Y*2-re*2,height:(2-Rr)*(Mr+1)*16-ce*2-we*2,sarRatio:ht}}},Ts.prototype=new yu;var Sp={H264Stream:Ts},Ep=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Tu=function(u,h){var p=u[h+6]<<21|u[h+7]<<14|u[h+8]<<7|u[h+9],f=u[h+5],y=(f&16)>>4;return p=p>=0?p:0,y?p+20:p+10},bu=function(u,h){return u.length-h<10||u[h]!==73||u[h+1]!==68||u[h+2]!==51?h:(h+=Tu(u,h),bu(u,h))},kp=function(u){var h=bu(u,0);return u.length>=h+2&&(u[h]&255)===255&&(u[h+1]&240)===240&&(u[h+1]&22)===16},Cu=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},wp=function(u,h,p){var f,y="";for(f=h;f<p;f++)y+="%"+("00"+u[f].toString(16)).slice(-2);return y},Dp=function(u,h,p){return unescape(wp(u,h,p))},Ap=function(u,h){var p=(u[h+5]&224)>>5,f=u[h+4]<<3,y=u[h+3]&6144;return y|f|p},Ip=function(u,h){return u[h]===73&&u[h+1]===68&&u[h+2]===51?"timed-metadata":u[h]&!0&&(u[h+1]&240)===240?"audio":null},Np=function(u){for(var h=0;h+5<u.length;){if(u[h]!==255||(u[h+1]&246)!==240){h++;continue}return Ep[(u[h+2]&60)>>>2]}return null},Op=function(u){var h,p,f,y;h=10,u[5]&64&&(h+=4,h+=Cu(u.subarray(10,14)));do{if(p=Cu(u.subarray(h+4,h+8)),p<1)return null;if(y=String.fromCharCode(u[h],u[h+1],u[h+2],u[h+3]),y==="PRIV"){f=u.subarray(h+10,h+p+10);for(var _=0;_<f.byteLength;_++)if(f[_]===0){var L=Dp(f,0,_);if(L==="com.apple.streaming.transportStreamTimestamp"){var M=f.subarray(_+1),G=(M[3]&1)<<30|M[4]<<22|M[5]<<14|M[6]<<6|M[7]>>>2;return G*=4,G+=M[7]&3,G}break}}h+=10,h+=p}while(h<u.byteLength);return null},Ka={isLikelyAacData:kp,parseId3TagSize:Tu,parseAdtsSize:Ap,parseType:Ip,parseSampleRate:Np,parseAacTimestamp:Op},Bp=i,xu=Ka,Cs;Cs=function(){var u=new Uint8Array,h=0;Cs.prototype.init.call(this),this.setTimestamp=function(p){h=p},this.push=function(p){var f=0,y=0,_,L,M,G;for(u.length?(G=u.length,u=new Uint8Array(p.byteLength+G),u.set(u.subarray(0,G)),u.set(p,G)):u=p;u.length-y>=3;){if(u[y]===73&&u[y+1]===68&&u[y+2]===51){if(u.length-y<10||(f=xu.parseId3TagSize(u,y),y+f>u.length))break;L={type:"timed-metadata",data:u.subarray(y,y+f)},this.trigger("data",L),y+=f;continue}else if((u[y]&255)===255&&(u[y+1]&240)===240){if(u.length-y<7||(f=xu.parseAdtsSize(u,y),y+f>u.length))break;M={type:"audio",data:u.subarray(y,y+f),pts:h,dts:h},this.trigger("data",M),y+=f;continue}y++}_=u.length-y,_>0?u=u.subarray(y):u=new Uint8Array},this.reset=function(){u=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){u=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,xs=i,Dr=ge,Ar=gt,Ss=gi,Ai=X,Xi=yp,Es=Re,Su=bp,Fp=Sp.H264Stream,$p=Lp,Up=Ka.isLikelyAacData,zp=Re.ONE_SECOND_IN_TS,Eu=Mp,ku=Vp,ks,Ir,ws,xn,Hp=function(u,h){h.stream=u,this.trigger("log",h)},wu=function(u,h){for(var p=Object.keys(h),f=0;f<p.length;f++){var y=p[f];y==="headOfPipeline"||!h[y].on||h[y].on("log",Hp.bind(u,y))}},Du=function(u,h){var p;if(u.length!==h.length)return!1;for(p=0;p<u.length;p++)if(u[p]!==h[p])return!1;return!0},Au=function(u,h,p,f,y,_){var L=p-h,M=f-h,G=y-p;return{start:{dts:u,pts:u+L},end:{dts:u+M,pts:u+G},prependedContentDuration:_,baseMediaDecodeTime:u}};Ir=function(u,h){var p=[],f,y=0,_=0,L=1/0;h=h||{},f=h.firstSequenceNumber||0,Ir.prototype.init.call(this),this.push=function(M){Ai.collectDtsInfo(u,M),u&&Eu.forEach(function(G){u[G]=M[G]}),p.push(M)},this.setEarliestDts=function(M){y=M},this.setVideoBaseMediaDecodeTime=function(M){L=M},this.setAudioAppendStart=function(M){_=M},this.flush=function(){var M,G,Y,re,ce,we,fe;if(p.length===0){this.trigger("done","AudioSegmentStream");return}M=Ss.trimAdtsFramesByEarliestDts(p,u,y),u.baseMediaDecodeTime=Ai.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),fe=Ss.prefixWithSilence(u,M,_,L),u.samples=Ss.generateSampleTable(M),Y=Dr.mdat(Ss.concatenateFrameData(M)),p=[],G=Dr.moof(f,[u]),re=new Uint8Array(G.byteLength+Y.byteLength),f++,re.set(G),re.set(Y,G.byteLength),Ai.clearDtsInfo(u),ce=Math.ceil(zp*1024/u.samplerate),M.length&&(we=M.length*ce,this.trigger("segmentTimingInfo",Au(Es.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),M[0].dts,M[0].pts,M[0].dts+we,M[0].pts+we,fe||0)),this.trigger("timingInfo",{start:M[0].pts,end:M[0].pts+we})),this.trigger("data",{track:u,boxes:re}),this.trigger("done","AudioSegmentStream")},this.reset=function(){Ai.clearDtsInfo(u),p=[],this.trigger("reset")}},Ir.prototype=new xs,ks=function(u,h){var p,f=[],y=[],_,L;h=h||{},p=h.firstSequenceNumber||0,ks.prototype.init.call(this),delete u.minPTS,this.gopCache_=[],this.push=function(M){Ai.collectDtsInfo(u,M),M.nalUnitType==="seq_parameter_set_rbsp"&&!_&&(_=M.config,u.sps=[M.data],ku.forEach(function(G){u[G]=_[G]},this)),M.nalUnitType==="pic_parameter_set_rbsp"&&!L&&(L=M.data,u.pps=[M.data]),f.push(M)},this.flush=function(){for(var M,G,Y,re,ce,we,fe=0,Ve,We;f.length&&f[0].nalUnitType!=="access_unit_delimiter_rbsp";)f.shift();if(f.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(M=Ar.groupNalsIntoFrames(f),Y=Ar.groupFramesIntoGops(M),Y[0][0].keyFrame||(G=this.getGopForFusion_(f[0],u),G?(fe=G.duration,Y.unshift(G),Y.byteLength+=G.byteLength,Y.nalCount+=G.nalCount,Y.pts=G.pts,Y.dts=G.dts,Y.duration+=G.duration):Y=Ar.extendFirstKeyFrame(Y)),y.length){var Lt;if(h.alignGopsAtEnd?Lt=this.alignGopsAtEnd_(Y):Lt=this.alignGopsAtStart_(Y),!Lt){this.gopCache_.unshift({gop:Y.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}Ai.clearDtsInfo(u),Y=Lt}Ai.collectDtsInfo(u,Y),u.samples=Ar.generateSampleTable(Y),ce=Dr.mdat(Ar.concatenateNalData(Y)),u.baseMediaDecodeTime=Ai.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),this.trigger("processedGopsInfo",Y.map(function(ci){return{pts:ci.pts,dts:ci.dts,byteLength:ci.byteLength}})),Ve=Y[0],We=Y[Y.length-1],this.trigger("segmentTimingInfo",Au(u.baseMediaDecodeTime,Ve.dts,Ve.pts,We.dts+We.duration,We.pts+We.duration,fe)),this.trigger("timingInfo",{start:Y[0].pts,end:Y[Y.length-1].pts+Y[Y.length-1].duration}),this.gopCache_.unshift({gop:Y.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.trigger("baseMediaDecodeTime",u.baseMediaDecodeTime),this.trigger("timelineStartInfo",u.timelineStartInfo),re=Dr.moof(p,[u]),we=new Uint8Array(re.byteLength+ce.byteLength),p++,we.set(re),we.set(ce,re.byteLength),this.trigger("data",{track:u,boxes:we}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),f=[],this.gopCache_.length=0,y.length=0,this.trigger("reset")},this.resetStream_=function(){Ai.clearDtsInfo(u),_=void 0,L=void 0},this.getGopForFusion_=function(M){var G=45e3,Y=1/0,re,ce,we,fe,Ve;for(Ve=0;Ve<this.gopCache_.length;Ve++)fe=this.gopCache_[Ve],we=fe.gop,!(!(u.pps&&Du(u.pps[0],fe.pps[0]))||!(u.sps&&Du(u.sps[0],fe.sps[0])))&&(we.dts<u.timelineStartInfo.dts||(re=M.dts-we.dts-we.duration,re>=-1e4&&re<=G&&(!ce||Y>re)&&(ce=fe,Y=re)));return ce?ce.gop:null},this.alignGopsAtStart_=function(M){var G,Y,re,ce,we,fe,Ve,We;for(we=M.byteLength,fe=M.nalCount,Ve=M.duration,G=Y=0;G<y.length&&Y<M.length&&(re=y[G],ce=M[Y],re.pts!==ce.pts);){if(ce.pts>re.pts){G++;continue}Y++,we-=ce.byteLength,fe-=ce.nalCount,Ve-=ce.duration}return Y===0?M:Y===M.length?null:(We=M.slice(Y),We.byteLength=we,We.duration=Ve,We.nalCount=fe,We.pts=We[0].pts,We.dts=We[0].dts,We)},this.alignGopsAtEnd_=function(M){var G,Y,re,ce,we,fe;for(G=y.length-1,Y=M.length-1,we=null,fe=!1;G>=0&&Y>=0;){if(re=y[G],ce=M[Y],re.pts===ce.pts){fe=!0;break}if(re.pts>ce.pts){G--;continue}G===y.length-1&&(we=Y),Y--}if(!fe&&we===null)return null;var Ve;if(fe?Ve=Y:Ve=we,Ve===0)return M;var We=M.slice(Ve),Lt=We.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 We.byteLength=Lt.byteLength,We.duration=Lt.duration,We.nalCount=Lt.nalCount,We.pts=We[0].pts,We.dts=We[0].dts,We},this.alignGopsWith=function(M){y=M}},ks.prototype=new xs,xn=function(u,h){this.numberOfTracks=0,this.metadataStream=h,u=u||{},typeof u.remux<"u"?this.remuxTracks=!!u.remux:this.remuxTracks=!0,typeof u.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=u.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(p){if(p.content||p.text)return this.pendingCaptions.push(p);if(p.frames)return this.pendingMetadata.push(p);this.pendingTracks.push(p.track),this.pendingBytes+=p.boxes.byteLength,p.track.type==="video"&&(this.videoTrack=p.track,this.pendingBoxes.push(p.boxes)),p.track.type==="audio"&&(this.audioTrack=p.track,this.pendingBoxes.unshift(p.boxes))}},xn.prototype=new xs,xn.prototype.flush=function(u){var h=0,p={captions:[],captionStreams:{},metadata:[],info:{}},f,y,_,L=0,M;if(this.pendingTracks.length<this.numberOfTracks){if(u!=="VideoSegmentStream"&&u!=="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?(L=this.videoTrack.timelineStartInfo.pts,ku.forEach(function(G){p.info[G]=this.videoTrack[G]},this)):this.audioTrack&&(L=this.audioTrack.timelineStartInfo.pts,Eu.forEach(function(G){p.info[G]=this.audioTrack[G]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?p.type=this.pendingTracks[0].type:p.type="combined",this.emittedTracks+=this.pendingTracks.length,_=Dr.initSegment(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),M=0;M<this.pendingBoxes.length;M++)p.data.set(this.pendingBoxes[M],h),h+=this.pendingBoxes[M].byteLength;for(M=0;M<this.pendingCaptions.length;M++)f=this.pendingCaptions[M],f.startTime=Es.metadataTsToSeconds(f.startPts,L,this.keepOriginalTimestamps),f.endTime=Es.metadataTsToSeconds(f.endPts,L,this.keepOriginalTimestamps),p.captionStreams[f.stream]=!0,p.captions.push(f);for(M=0;M<this.pendingMetadata.length;M++)y=this.pendingMetadata[M],y.cueTime=Es.metadataTsToSeconds(y.pts,L,this.keepOriginalTimestamps),p.metadata.push(y);for(p.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",p),M=0;M<p.captions.length;M++)f=p.captions[M],this.trigger("caption",f);for(M=0;M<p.metadata.length;M++)y=p.metadata[M],this.trigger("id3Frame",y)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},xn.prototype.setRemux=function(u){this.remuxTracks=u},ws=function(u){var h=this,p=!0,f,y;ws.prototype.init.call(this),u=u||{},this.baseMediaDecodeTime=u.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="aac",_.metadataStream=new Xi.MetadataStream,_.aacStream=new $p,_.audioTimestampRolloverStream=new Xi.TimestampRolloverStream("audio"),_.timedMetadataTimestampRolloverStream=new Xi.TimestampRolloverStream("timed-metadata"),_.adtsStream=new Su,_.coalesceStream=new xn(u,_.metadataStream),_.headOfPipeline=_.aacStream,_.aacStream.pipe(_.audioTimestampRolloverStream).pipe(_.adtsStream),_.aacStream.pipe(_.timedMetadataTimestampRolloverStream).pipe(_.metadataStream).pipe(_.coalesceStream),_.metadataStream.on("timestamp",function(L){_.aacStream.setTimestamp(L.timeStamp)}),_.aacStream.on("data",function(L){L.type!=="timed-metadata"&&L.type!=="audio"||_.audioSegmentStream||(y=y||{timelineStartInfo:{baseMediaDecodeTime:h.baseMediaDecodeTime},codec:"adts",type:"audio"},_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Ir(y,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream),h.trigger("trackinfo",{hasAudio:!!y,hasVideo:!!f}))}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),wu(this,_)},this.setupTsPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="ts",_.metadataStream=new Xi.MetadataStream,_.packetStream=new Xi.TransportPacketStream,_.parseStream=new Xi.TransportParseStream,_.elementaryStream=new Xi.ElementaryStream,_.timestampRolloverStream=new Xi.TimestampRolloverStream,_.adtsStream=new Su,_.h264Stream=new Fp,_.captionStream=new Xi.CaptionStream(u),_.coalesceStream=new xn(u,_.metadataStream),_.headOfPipeline=_.packetStream,_.packetStream.pipe(_.parseStream).pipe(_.elementaryStream).pipe(_.timestampRolloverStream),_.timestampRolloverStream.pipe(_.h264Stream),_.timestampRolloverStream.pipe(_.adtsStream),_.timestampRolloverStream.pipe(_.metadataStream).pipe(_.coalesceStream),_.h264Stream.pipe(_.captionStream).pipe(_.coalesceStream),_.elementaryStream.on("data",function(L){var M;if(L.type==="metadata"){for(M=L.tracks.length;M--;)!f&&L.tracks[M].type==="video"?(f=L.tracks[M],f.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime):!y&&L.tracks[M].type==="audio"&&(y=L.tracks[M],y.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime);f&&!_.videoSegmentStream&&(_.coalesceStream.numberOfTracks++,_.videoSegmentStream=new ks(f,u),_.videoSegmentStream.on("log",h.getLogTrigger_("videoSegmentStream")),_.videoSegmentStream.on("timelineStartInfo",function(G){y&&!u.keepOriginalTimestamps&&(y.timelineStartInfo=G,_.audioSegmentStream.setEarliestDts(G.dts-h.baseMediaDecodeTime))}),_.videoSegmentStream.on("processedGopsInfo",h.trigger.bind(h,"gopInfo")),_.videoSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"videoSegmentTimingInfo")),_.videoSegmentStream.on("baseMediaDecodeTime",function(G){y&&_.audioSegmentStream.setVideoBaseMediaDecodeTime(G)}),_.videoSegmentStream.on("timingInfo",h.trigger.bind(h,"videoTimingInfo")),_.h264Stream.pipe(_.videoSegmentStream).pipe(_.coalesceStream)),y&&!_.audioSegmentStream&&(_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Ir(y,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.audioSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"audioSegmentTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream)),h.trigger("trackinfo",{hasAudio:!!y,hasVideo:!!f})}}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("id3Frame",function(L){L.dispatchType=_.metadataStream.dispatchType,h.trigger("id3Frame",L)}),_.coalesceStream.on("caption",this.trigger.bind(this,"caption")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),wu(this,_)},this.setBaseMediaDecodeTime=function(_){var L=this.transmuxPipeline_;u.keepOriginalTimestamps||(this.baseMediaDecodeTime=_),y&&(y.timelineStartInfo.dts=void 0,y.timelineStartInfo.pts=void 0,Ai.clearDtsInfo(y),L.audioTimestampRolloverStream&&L.audioTimestampRolloverStream.discontinuity()),f&&(L.videoSegmentStream&&(L.videoSegmentStream.gopCache_=[]),f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,Ai.clearDtsInfo(f),L.captionStream.reset()),L.timestampRolloverStream&&L.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(_){y&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(_)},this.setRemux=function(_){var L=this.transmuxPipeline_;u.remux=_,L&&L.coalesceStream&&L.coalesceStream.setRemux(_)},this.alignGopsWith=function(_){f&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(_)},this.getLogTrigger_=function(_){var L=this;return function(M){M.stream=_,L.trigger("log",M)}},this.push=function(_){if(p){var L=Up(_);L&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!L&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),p=!1}this.transmuxPipeline_.headOfPipeline.push(_)},this.flush=function(){p=!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()}},ws.prototype=new xs;var qp={Transmuxer:ws},jp=function(u){return u>>>0},Gp=function(u){return("00"+u.toString(16)).slice(-2)},Ds={toUnsigned:jp,toHexString:Gp},Wp=function(u){var h="";return h+=String.fromCharCode(u[0]),h+=String.fromCharCode(u[1]),h+=String.fromCharCode(u[2]),h+=String.fromCharCode(u[3]),h},Iu=Wp,Yp=Ds.toUnsigned,Xp=Iu,Nu=function(u,h){var p=[],f,y,_,L,M;if(!h.length)return null;for(f=0;f<u.byteLength;)y=Yp(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3]),_=Xp(u.subarray(f+4,f+8)),L=y>1?f+y:u.byteLength,_===h[0]&&(h.length===1?p.push(u.subarray(f+8,L)):(M=Nu(u.subarray(f+8,L),h.slice(1)),M.length&&(p=p.concat(M)))),f=L;return p},Qa=Nu,Kp=Ds.toUnsigned,Qp=a.getUint64,Zp=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4))};return h.version===1?h.baseMediaDecodeTime=Qp(u.subarray(4)):h.baseMediaDecodeTime=Kp(u[4]<<24|u[5]<<16|u[6]<<8|u[7]),h},Za=Zp,Jp=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p={version:u[0],flags:new Uint8Array(u.subarray(1,4)),trackId:h.getUint32(4)},f=p.flags[2]&1,y=p.flags[2]&2,_=p.flags[2]&8,L=p.flags[2]&16,M=p.flags[2]&32,G=p.flags[0]&65536,Y=p.flags[0]&131072,re;return re=8,f&&(re+=4,p.baseDataOffset=h.getUint32(12),re+=4),y&&(p.sampleDescriptionIndex=h.getUint32(re),re+=4),_&&(p.defaultSampleDuration=h.getUint32(re),re+=4),L&&(p.defaultSampleSize=h.getUint32(re),re+=4),M&&(p.defaultSampleFlags=h.getUint32(re)),G&&(p.durationIsEmpty=!0),!f&&Y&&(p.baseDataOffsetIsMoof=!0),p},Ou=Jp,em=function(u){return{isLeading:(u[0]&12)>>>2,dependsOn:u[0]&3,isDependedOn:(u[1]&192)>>>6,hasRedundancy:(u[1]&48)>>>4,paddingValue:(u[1]&14)>>>1,isNonSyncSample:u[1]&1,degradationPriority:u[2]<<8|u[3]}},tm=em,Bu=tm,im=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4)),samples:[]},p=new DataView(u.buffer,u.byteOffset,u.byteLength),f=h.flags[2]&1,y=h.flags[2]&4,_=h.flags[1]&1,L=h.flags[1]&2,M=h.flags[1]&4,G=h.flags[1]&8,Y=p.getUint32(4),re=8,ce;for(f&&(h.dataOffset=p.getInt32(re),re+=4),y&&Y&&(ce={flags:Bu(u.subarray(re,re+4))},re+=4,_&&(ce.duration=p.getUint32(re),re+=4),L&&(ce.size=p.getUint32(re),re+=4),G&&(h.version===1?ce.compositionTimeOffset=p.getInt32(re):ce.compositionTimeOffset=p.getUint32(re),re+=4),h.samples.push(ce),Y--);Y--;)ce={},_&&(ce.duration=p.getUint32(re),re+=4),L&&(ce.size=p.getUint32(re),re+=4),M&&(ce.flags=Bu(u.subarray(re,re+4)),re+=4),G&&(h.version===1?ce.compositionTimeOffset=p.getInt32(re):ce.compositionTimeOffset=p.getUint32(re),re+=4),h.samples.push(ce);return h},Lu=im,Pu={tfdt:Za,trun:Lu},Mu={parseTfdt:Pu.tfdt,parseTrun:Pu.trun},nm=function(u){for(var h=0,p=String.fromCharCode(u[h]),f="";p!=="\0";)f+=p,h++,p=String.fromCharCode(u[h]);return f+=p,f},rm={uint8ToCString:nm},As=rm.uint8ToCString,sm=a.getUint64,am=function(u){var h=4,p=u[0],f,y,_,L,M,G,Y,re;if(p===0){f=As(u.subarray(h)),h+=f.length,y=As(u.subarray(h)),h+=y.length;var ce=new DataView(u.buffer);_=ce.getUint32(h),h+=4,M=ce.getUint32(h),h+=4,G=ce.getUint32(h),h+=4,Y=ce.getUint32(h),h+=4}else if(p===1){var ce=new DataView(u.buffer);_=ce.getUint32(h),h+=4,L=sm(u.subarray(h)),h+=8,G=ce.getUint32(h),h+=4,Y=ce.getUint32(h),h+=4,f=As(u.subarray(h)),h+=f.length,y=As(u.subarray(h)),h+=y.length}re=new Uint8Array(u.subarray(h,u.byteLength));var we={scheme_id_uri:f,value:y,timescale:_||1,presentation_time:L,presentation_time_delta:M,event_duration:G,id:Y,message_data:re};return lm(p,we)?we:void 0},om=function(u,h,p,f){return u||u===0?u/h:f+p/h},lm=function(u,h){var p=h.scheme_id_uri!=="\0",f=u===0&&Ru(h.presentation_time_delta)&&p,y=u===1&&Ru(h.presentation_time)&&p;return!(u>1)&&f||y},Ru=function(u){return u!==void 0||u!==null},um={parseEmsgBox:am,scaleTime:om},Nr;typeof window<"u"?Nr=window:typeof r<"u"?Nr=r:typeof self<"u"?Nr=self:Nr={};var Vu=Nr,Is=Ds.toUnsigned,Or=Ds.toHexString,xt=Qa,Un=Iu,Ja=um,cm=Ou,dm=Lu,hm=Za,fm=a.getUint64,Fu,$u,Uu,zu,Hu,eo,qu,to=Vu,pm=pu.parseId3Frames;Fu=function(u){var h={},p=xt(u,["moov","trak"]);return p.reduce(function(f,y){var _,L,M,G,Y;return _=xt(y,["tkhd"])[0],!_||(L=_[0],M=L===0?12:20,G=Is(_[M]<<24|_[M+1]<<16|_[M+2]<<8|_[M+3]),Y=xt(y,["mdia","mdhd"])[0],!Y)?null:(L=Y[0],M=L===0?12:20,f[G]=Is(Y[M]<<24|Y[M+1]<<16|Y[M+2]<<8|Y[M+3]),f)},h)},$u=function(u,h){var p;p=xt(h,["moof","traf"]);var f=p.reduce(function(y,_){var L=xt(_,["tfhd"])[0],M=Is(L[4]<<24|L[5]<<16|L[6]<<8|L[7]),G=u[M]||9e4,Y=xt(_,["tfdt"])[0],re=new DataView(Y.buffer,Y.byteOffset,Y.byteLength),ce;Y[0]===1?ce=fm(Y.subarray(4,12)):ce=re.getUint32(4);let we;return typeof ce=="bigint"?we=ce/to.BigInt(G):typeof ce=="number"&&!isNaN(ce)&&(we=ce/G),we<Number.MAX_SAFE_INTEGER&&(we=Number(we)),we<y&&(y=we),y},1/0);return typeof f=="bigint"||isFinite(f)?f:0},Uu=function(u,h){var p=xt(h,["moof","traf"]),f=0,y=0,_;if(p&&p.length){var L=xt(p[0],["tfhd"])[0],M=xt(p[0],["trun"])[0],G=xt(p[0],["tfdt"])[0];if(L){var Y=cm(L);_=Y.trackId}if(G){var re=hm(G);f=re.baseMediaDecodeTime}if(M){var ce=dm(M);ce.samples&&ce.samples.length&&(y=ce.samples[0].compositionTimeOffset||0)}}var we=u[_]||9e4;typeof f=="bigint"&&(y=to.BigInt(y),we=to.BigInt(we));var fe=(f+y)/we;return typeof fe=="bigint"&&fe<Number.MAX_SAFE_INTEGER&&(fe=Number(fe)),fe},zu=function(u){var h=xt(u,["moov","trak"]),p=[];return h.forEach(function(f){var y=xt(f,["mdia","hdlr"]),_=xt(f,["tkhd"]);y.forEach(function(L,M){var G=Un(L.subarray(8,12)),Y=_[M],re,ce,we;G==="vide"&&(re=new DataView(Y.buffer,Y.byteOffset,Y.byteLength),ce=re.getUint8(0),we=ce===0?re.getUint32(12):re.getUint32(20),p.push(we))})}),p},eo=function(u){var h=u[0],p=h===0?12:20;return Is(u[p]<<24|u[p+1]<<16|u[p+2]<<8|u[p+3])},Hu=function(u){var h=xt(u,["moov","trak"]),p=[];return h.forEach(function(f){var y={},_=xt(f,["tkhd"])[0],L,M;_&&(L=new DataView(_.buffer,_.byteOffset,_.byteLength),M=L.getUint8(0),y.id=M===0?L.getUint32(12):L.getUint32(20));var G=xt(f,["mdia","hdlr"])[0];if(G){var Y=Un(G.subarray(8,12));Y==="vide"?y.type="video":Y==="soun"?y.type="audio":y.type=Y}var re=xt(f,["mdia","minf","stbl","stsd"])[0];if(re){var ce=re.subarray(8);y.codec=Un(ce.subarray(4,8));var we=xt(ce,[y.codec])[0],fe,Ve;we&&(/^[asm]vc[1-9]$/i.test(y.codec)?(fe=we.subarray(78),Ve=Un(fe.subarray(4,8)),Ve==="avcC"&&fe.length>11?(y.codec+=".",y.codec+=Or(fe[9]),y.codec+=Or(fe[10]),y.codec+=Or(fe[11])):y.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(y.codec)?(fe=we.subarray(28),Ve=Un(fe.subarray(4,8)),Ve==="esds"&&fe.length>20&&fe[19]!==0?(y.codec+="."+Or(fe[19]),y.codec+="."+Or(fe[20]>>>2&63).replace(/^0/,"")):y.codec="mp4a.40.2"):y.codec=y.codec.toLowerCase())}var We=xt(f,["mdia","mdhd"])[0];We&&(y.timescale=eo(We)),p.push(y)}),p},qu=function(u,h=0){var p=xt(u,["emsg"]);return p.map(f=>{var y=Ja.parseEmsgBox(new Uint8Array(f)),_=pm(y.message_data);return{cueTime:Ja.scaleTime(y.presentation_time,y.timescale,y.presentation_time_delta,h),duration:Ja.scaleTime(y.event_duration,y.timescale),frames:_}})};var Br={findBox:xt,parseType:Un,timescale:Fu,startTime:$u,compositionStartTime:Uu,videoTrackIds:zu,tracks:Hu,getTimescaleFromMediaHeader:eo,getEmsgID3:qu};const{parseTrun:mm}=Mu,{findBox:ju}=Br;var Gu=Vu,gm=function(u){var h=ju(u,["moof","traf"]),p=ju(u,["mdat"]),f=[];return p.forEach(function(y,_){var L=h[_];f.push({mdat:y,traf:L})}),f},vm=function(u,h,p){var f=h,y=p.defaultSampleDuration||0,_=p.defaultSampleSize||0,L=p.trackId,M=[];return u.forEach(function(G){var Y=mm(G),re=Y.samples;re.forEach(function(ce){ce.duration===void 0&&(ce.duration=y),ce.size===void 0&&(ce.size=_),ce.trackId=L,ce.dts=f,ce.compositionTimeOffset===void 0&&(ce.compositionTimeOffset=0),typeof f=="bigint"?(ce.pts=f+Gu.BigInt(ce.compositionTimeOffset),f+=Gu.BigInt(ce.duration)):(ce.pts=f+ce.compositionTimeOffset,f+=ce.duration)}),M=M.concat(re)}),M},Wu={getMdatTrafPairs:gm,parseSamples:vm},ym=Ht.discardEmulationPreventionBytes,_m=ne.CaptionStream,io=Qa,Tm=Za,bm=Ou,{getMdatTrafPairs:Cm,parseSamples:xm}=Wu,Sm=function(u,h){for(var p=u,f=0;f<h.length;f++){var y=h[f];if(p<y.size)return y;p-=y.size}return null},Em=function(u,h,p){var f=new DataView(u.buffer,u.byteOffset,u.byteLength),y={logs:[],seiNals:[]},_,L,M,G;for(L=0;L+4<u.length;L+=M)if(M=f.getUint32(L),L+=4,!(M<=0))switch(u[L]&31){case 6:var Y=u.subarray(L+1,L+1+M),re=Sm(L,h);if(_={nalUnitType:"sei_rbsp",size:M,data:Y,escapedRBSP:ym(Y),trackId:p},re)_.pts=re.pts,_.dts=re.dts,G=re;else if(G)_.pts=G.pts,_.dts=G.dts;else{y.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+L+" for trackId "+p+". See mux.js#223."});break}y.seiNals.push(_);break}return y},km=function(u,h){var p={},f=Cm(u);return f.forEach(function(y){var _=y.mdat,L=y.traf,M=io(L,["tfhd"]),G=bm(M[0]),Y=G.trackId,re=io(L,["tfdt"]),ce=re.length>0?Tm(re[0]).baseMediaDecodeTime:0,we=io(L,["trun"]),fe,Ve;h===Y&&we.length>0&&(fe=xm(we,ce,G),Ve=Em(_,fe,Y),p[Y]||(p[Y]={seiNals:[],logs:[]}),p[Y].seiNals=p[Y].seiNals.concat(Ve.seiNals),p[Y].logs=p[Y].logs.concat(Ve.logs))}),p},wm=function(u,h,p){var f;if(h===null)return null;f=km(u,h);var y=f[h]||{};return{seiNals:y.seiNals,logs:y.logs,timescale:p}},Dm=function(){var u=!1,h,p,f,y,_,L;this.isInitialized=function(){return u},this.init=function(M){h=new _m,u=!0,L=M?M.isPartial:!1,h.on("data",function(G){G.startTime=G.startPts/y,G.endTime=G.endPts/y,_.captions.push(G),_.captionStreams[G.stream]=!0}),h.on("log",function(G){_.logs.push(G)})},this.isNewInit=function(M,G){return M&&M.length===0||G&&typeof G=="object"&&Object.keys(G).length===0?!1:f!==M[0]||y!==G[f]},this.parse=function(M,G,Y){var re;if(this.isInitialized()){if(!G||!Y)return null;if(this.isNewInit(G,Y))f=G[0],y=Y[f];else if(f===null||!y)return p.push(M),null}else return null;for(;p.length>0;){var ce=p.shift();this.parse(ce,G,Y)}return re=wm(M,f,y),re&&re.logs&&(_.logs=_.logs.concat(re.logs)),re===null||!re.seiNals?_.logs.length?{logs:_.logs,captions:[],captionStreams:[]}:null:(this.pushNals(re.seiNals),this.flushStream(),_)},this.pushNals=function(M){if(!this.isInitialized()||!M||M.length===0)return null;M.forEach(function(G){h.push(G)})},this.flushStream=function(){if(!this.isInitialized())return null;L?h.partialFlush():h.flush()},this.clearParsedCaptions=function(){_.captions=[],_.captionStreams={},_.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;h.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){p=[],f=null,y=null,_?this.clearParsedCaptions():_={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Am=Dm;const{parseTfdt:Im}=Mu,ln=Qa,{getTimescaleFromMediaHeader:Nm}=Br,{parseSamples:Om,getMdatTrafPairs:Bm}=Wu;var Yu=function(){let u=9e4;this.init=function(h){const p=ln(h,["moov","trak","mdia","mdhd"])[0];p&&(u=Nm(p))},this.parseSegment=function(h){const p=[],f=Bm(h);let y=0;return f.forEach(function(_){const L=_.mdat,M=_.traf,G=ln(M,["tfdt"])[0],Y=ln(M,["tfhd"])[0],re=ln(M,["trun"]);if(G&&(y=Im(G).baseMediaDecodeTime),re.length&&Y){const ce=Om(re,y,Y);let we=0;ce.forEach(function(fe){const Ve="utf-8",We=new TextDecoder(Ve),Lt=L.slice(we,we+fe.size);if(ln(Lt,["vtte"])[0]){we+=fe.size;return}ln(Lt,["vttc"]).forEach(function(Lr){const Pr=ln(Lr,["payl"])[0],Mr=ln(Lr,["sttg"])[0],Rr=fe.pts/u,Bs=(fe.pts+fe.duration)/u;let ht,Vr;if(Pr)try{ht=We.decode(Pr)}catch(Ii){console.error(Ii)}if(Mr)try{Vr=We.decode(Mr)}catch(Ii){console.error(Ii)}fe.duration&&ht&&p.push({cueText:ht,start:Rr,end:Bs,settings:Vr})}),we+=fe.size})}}),p}},no=_e,Xu=function(u){var h=u[1]&31;return h<<=8,h|=u[2],h},Ns=function(u){return!!(u[1]&64)},Os=function(u){var h=0;return(u[3]&48)>>>4>1&&(h+=u[4]+1),h},Lm=function(u,h){var p=Xu(u);return p===0?"pat":p===h?"pmt":h?"pes":null},Pm=function(u){var h=Ns(u),p=4+Os(u);return h&&(p+=u[p]+1),(u[p+10]&31)<<8|u[p+11]},Mm=function(u){var h={},p=Ns(u),f=4+Os(u);if(p&&(f+=u[f]+1),!!(u[f+5]&1)){var y,_,L;y=(u[f+1]&15)<<8|u[f+2],_=3+y-4,L=(u[f+10]&15)<<8|u[f+11];for(var M=12+L;M<_;){var G=f+M;h[(u[G+1]&31)<<8|u[G+2]]=u[G],M+=((u[G+3]&15)<<8|u[G+4])+5}return h}},Rm=function(u,h){var p=Xu(u),f=h[p];switch(f){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(u){var h=Ns(u);if(!h)return null;var p=4+Os(u);if(p>=u.byteLength)return null;var f=null,y;return y=u[p+7],y&192&&(f={},f.pts=(u[p+9]&14)<<27|(u[p+10]&255)<<20|(u[p+11]&254)<<12|(u[p+12]&255)<<5|(u[p+13]&254)>>>3,f.pts*=4,f.pts+=(u[p+13]&6)>>>1,f.dts=f.pts,y&64&&(f.dts=(u[p+14]&14)<<27|(u[p+15]&255)<<20|(u[p+16]&254)<<12|(u[p+17]&255)<<5|(u[p+18]&254)>>>3,f.dts*=4,f.dts+=(u[p+18]&6)>>>1)),f},ro=function(u){switch(u){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(u){for(var h=4+Os(u),p=u.subarray(h),f=0,y=0,_=!1,L;y<p.byteLength-3;y++)if(p[y+2]===1){f=y+5;break}for(;f<p.byteLength;)switch(p[f]){case 0:if(p[f-1]!==0){f+=2;break}else if(p[f-2]!==0){f++;break}y+3!==f-2&&(L=ro(p[y+3]&31),L==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0));do f++;while(p[f]!==1&&f<p.length);y=f-2,f+=3;break;case 1:if(p[f-1]!==0||p[f-2]!==0){f+=3;break}L=ro(p[y+3]&31),L==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0),y=f-2,f+=3;break;default:f+=3;break}return p=p.subarray(y),f-=y,y=0,p&&p.byteLength>3&&(L=ro(p[y+3]&31),L==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0)),_},$m={parseType:Lm,parsePat:Pm,parsePmt:Mm,parsePayloadUnitStartIndicator:Ns,parsePesType:Rm,parsePesTime:Vm,videoPacketContainsKeyFrame:Fm},Ku=_e,zn=Tt.handleRollover,ot={};ot.ts=$m,ot.aac=Ka;var Sn=Re.ONE_SECOND_IN_TS,Qt=188,Ri=71,Um=function(u,h){for(var p=0,f=Qt,y,_;f<u.byteLength;){if(u[p]===Ri&&u[f]===Ri){switch(y=u.subarray(p,f),_=ot.ts.parseType(y,h.pid),_){case"pat":h.pid=ot.ts.parsePat(y);break;case"pmt":var L=ot.ts.parsePmt(y);h.table=h.table||{},Object.keys(L).forEach(function(M){h.table[M]=L[M]});break}p+=Qt,f+=Qt;continue}p++,f++}},Qu=function(u,h,p){for(var f=0,y=Qt,_,L,M,G,Y,re=!1;y<=u.byteLength;){if(u[f]===Ri&&(u[y]===Ri||y===u.byteLength)){switch(_=u.subarray(f,y),L=ot.ts.parseType(_,h.pid),L){case"pes":M=ot.ts.parsePesType(_,h.table),G=ot.ts.parsePayloadUnitStartIndicator(_),M==="audio"&&G&&(Y=ot.ts.parsePesTime(_),Y&&(Y.type="audio",p.audio.push(Y),re=!0));break}if(re)break;f+=Qt,y+=Qt;continue}f++,y++}for(y=u.byteLength,f=y-Qt,re=!1;f>=0;){if(u[f]===Ri&&(u[y]===Ri||y===u.byteLength)){switch(_=u.subarray(f,y),L=ot.ts.parseType(_,h.pid),L){case"pes":M=ot.ts.parsePesType(_,h.table),G=ot.ts.parsePayloadUnitStartIndicator(_),M==="audio"&&G&&(Y=ot.ts.parsePesTime(_),Y&&(Y.type="audio",p.audio.push(Y),re=!0));break}if(re)break;f-=Qt,y-=Qt;continue}f--,y--}},zm=function(u,h,p){for(var f=0,y=Qt,_,L,M,G,Y,re,ce,we,fe=!1,Ve={data:[],size:0};y<u.byteLength;){if(u[f]===Ri&&u[y]===Ri){switch(_=u.subarray(f,y),L=ot.ts.parseType(_,h.pid),L){case"pes":if(M=ot.ts.parsePesType(_,h.table),G=ot.ts.parsePayloadUnitStartIndicator(_),M==="video"&&(G&&!fe&&(Y=ot.ts.parsePesTime(_),Y&&(Y.type="video",p.video.push(Y),fe=!0)),!p.firstKeyFrame)){if(G&&Ve.size!==0){for(re=new Uint8Array(Ve.size),ce=0;Ve.data.length;)we=Ve.data.shift(),re.set(we,ce),ce+=we.byteLength;if(ot.ts.videoPacketContainsKeyFrame(re)){var We=ot.ts.parsePesTime(re);We?(p.firstKeyFrame=We,p.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.")}Ve.size=0}Ve.data.push(_),Ve.size+=_.byteLength}break}if(fe&&p.firstKeyFrame)break;f+=Qt,y+=Qt;continue}f++,y++}for(y=u.byteLength,f=y-Qt,fe=!1;f>=0;){if(u[f]===Ri&&u[y]===Ri){switch(_=u.subarray(f,y),L=ot.ts.parseType(_,h.pid),L){case"pes":M=ot.ts.parsePesType(_,h.table),G=ot.ts.parsePayloadUnitStartIndicator(_),M==="video"&&G&&(Y=ot.ts.parsePesTime(_),Y&&(Y.type="video",p.video.push(Y),fe=!0));break}if(fe)break;f-=Qt,y-=Qt;continue}f--,y--}},Hm=function(u,h){if(u.audio&&u.audio.length){var p=h;(typeof p>"u"||isNaN(p))&&(p=u.audio[0].dts),u.audio.forEach(function(_){_.dts=zn(_.dts,p),_.pts=zn(_.pts,p),_.dtsTime=_.dts/Sn,_.ptsTime=_.pts/Sn})}if(u.video&&u.video.length){var f=h;if((typeof f>"u"||isNaN(f))&&(f=u.video[0].dts),u.video.forEach(function(_){_.dts=zn(_.dts,f),_.pts=zn(_.pts,f),_.dtsTime=_.dts/Sn,_.ptsTime=_.pts/Sn}),u.firstKeyFrame){var y=u.firstKeyFrame;y.dts=zn(y.dts,f),y.pts=zn(y.pts,f),y.dtsTime=y.dts/Sn,y.ptsTime=y.pts/Sn}}},qm=function(u){for(var h=!1,p=0,f=null,y=null,_=0,L=0,M;u.length-L>=3;){var G=ot.aac.parseType(u,L);switch(G){case"timed-metadata":if(u.length-L<10){h=!0;break}if(_=ot.aac.parseId3TagSize(u,L),_>u.length){h=!0;break}y===null&&(M=u.subarray(L,L+_),y=ot.aac.parseAacTimestamp(M)),L+=_;break;case"audio":if(u.length-L<7){h=!0;break}if(_=ot.aac.parseAdtsSize(u,L),_>u.length){h=!0;break}f===null&&(M=u.subarray(L,L+_),f=ot.aac.parseSampleRate(M)),p++,L+=_;break;default:L++;break}if(h)return null}if(f===null||y===null)return null;var Y=Sn/f,re={audio:[{type:"audio",dts:y,pts:y},{type:"audio",dts:y+p*1024*Y,pts:y+p*1024*Y}]};return re},jm=function(u){var h={pid:null,table:null},p={};Um(u,h);for(var f in h.table)if(h.table.hasOwnProperty(f)){var y=h.table[f];switch(y){case Ku.H264_STREAM_TYPE:p.video=[],zm(u,h,p),p.video.length===0&&delete p.video;break;case Ku.ADTS_STREAM_TYPE:p.audio=[],Qu(u,h,p),p.audio.length===0&&delete p.audio;break}}return p},Gm=function(u,h){var p=ot.aac.isLikelyAacData(u),f;return p?f=qm(u):f=jm(u),!f||!f.audio&&!f.video?null:(Hm(f,h),f)},Wm={inspect:Gm,parseAudioPes_:Qu};const Ym=function(u,h){h.on("data",function(p){const f=p.initSegment;p.initSegment={data:f.buffer,byteOffset:f.byteOffset,byteLength:f.byteLength};const y=p.data;p.data=y.buffer,u.postMessage({action:"data",segment:p,byteOffset:y.byteOffset,byteLength:y.byteLength},[p.data])}),h.on("done",function(p){u.postMessage({action:"done"})}),h.on("gopInfo",function(p){u.postMessage({action:"gopInfo",gopInfo:p})}),h.on("videoSegmentTimingInfo",function(p){const f={start:{decode:Re.videoTsToSeconds(p.start.dts),presentation:Re.videoTsToSeconds(p.start.pts)},end:{decode:Re.videoTsToSeconds(p.end.dts),presentation:Re.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Re.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Re.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:f})}),h.on("audioSegmentTimingInfo",function(p){const f={start:{decode:Re.videoTsToSeconds(p.start.dts),presentation:Re.videoTsToSeconds(p.start.pts)},end:{decode:Re.videoTsToSeconds(p.end.dts),presentation:Re.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Re.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Re.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:f})}),h.on("id3Frame",function(p){u.postMessage({action:"id3Frame",id3Frame:p})}),h.on("caption",function(p){u.postMessage({action:"caption",caption:p})}),h.on("trackinfo",function(p){u.postMessage({action:"trackinfo",trackInfo:p})}),h.on("audioTimingInfo",function(p){u.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Re.videoTsToSeconds(p.start),end:Re.videoTsToSeconds(p.end)}})}),h.on("videoTimingInfo",function(p){u.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Re.videoTsToSeconds(p.start),end:Re.videoTsToSeconds(p.end)}})}),h.on("log",function(p){u.postMessage({action:"log",log:p})})};class Zu{constructor(h,p){this.options=p||{},this.self=h,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new qp.Transmuxer(this.options),Ym(this.self,this.transmuxer)}pushMp4Captions(h){this.captionParser||(this.captionParser=new Am,this.captionParser.init());const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.captionParser.parse(p,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:f&&f.captions||[],logs:f&&f.logs||[],data:p.buffer},[p.buffer])}initMp4WebVttParser(h){this.webVttParser||(this.webVttParser=new Yu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.webVttParser.init(p)}getMp4WebVttText(h){this.webVttParser||(this.webVttParser=new Yu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.webVttParser.parseSegment(p);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:f||[],data:p.buffer},[p.buffer])}probeMp4StartTime({timescales:h,data:p}){const f=Br.startTime(h,p);this.self.postMessage({action:"probeMp4StartTime",startTime:f,data:p},[p.buffer])}probeMp4Tracks({data:h}){const p=Br.tracks(h);this.self.postMessage({action:"probeMp4Tracks",tracks:p,data:h},[h.buffer])}probeEmsgID3({data:h,offset:p}){const f=Br.getEmsgID3(h,p);this.self.postMessage({action:"probeEmsgID3",id3Frames:f,emsgData:h},[h.buffer])}probeTs({data:h,baseStartTime:p}){const f=typeof p=="number"&&!isNaN(p)?p*Re.ONE_SECOND_IN_TS:void 0,y=Wm.inspect(h,f);let _=null;y&&(_={hasVideo:y.video&&y.video.length===2||!1,hasAudio:y.audio&&y.audio.length===2||!1},_.hasVideo&&(_.videoStart=y.video[0].ptsTime),_.hasAudio&&(_.audioStart=y.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:_,data:h},[h.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(h){const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(p)}reset(){this.transmuxer.reset()}setTimestampOffset(h){const p=h.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Re.secondsToVideoTs(p)))}setAudioAppendStart(h){this.transmuxer.setAudioAppendStart(Math.ceil(Re.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(u){if(u.data.action==="init"&&u.data.options){this.messageHandlers=new Zu(self,u.data.options);return}this.messageHandlers||(this.messageHandlers=new Zu(self)),u.data&&u.data.action&&u.data.action!=="init"&&this.messageHandlers[u.data.action]&&this.messageHandlers[u.data.action](u.data)}}));var G3=Bf(j3);const W3=(r,e,i)=>{const{type:n,initSegment:s,captions:a,captionStreams:o,metadata:l,videoFrameDtsTime:c,videoFramePtsTime:d}=r.data.segment;e.buffer.push({captions:a,captionStreams:o,metadata:l});const m=r.data.segment.boxes||{data:r.data.segment.data},g={type:n,data:new Uint8Array(m.data,m.data.byteOffset,m.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};typeof c<"u"&&(g.videoFrameDtsTime=c),typeof d<"u"&&(g.videoFramePtsTime=d),i(g)},Y3=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},X3=(r,e)=>{e.gopInfo=r.data.gopInfo},Mf=r=>{const{transmuxer:e,bytes:i,audioAppendStart:n,gopsToAlignWith:s,remux:a,onData:o,onTrackInfo:l,onAudioTimingInfo:c,onVideoTimingInfo:d,onVideoSegmentTimingInfo:m,onAudioSegmentTimingInfo:g,onId3:x,onCaptions:T,onDone:E,onEndedTimeline:v,onTransmuxerLog:b,isEndOfTimeline:D,segment:N,triggerSegmentEventFn:w}=r,$={buffer:[]};let F=D;const H=U=>{e.currentTransmux===r&&(U.data.action==="data"&&W3(U,$,o),U.data.action==="trackinfo"&&l(U.data.trackInfo),U.data.action==="gopInfo"&&X3(U,$),U.data.action==="audioTimingInfo"&&c(U.data.audioTimingInfo),U.data.action==="videoTimingInfo"&&d(U.data.videoTimingInfo),U.data.action==="videoSegmentTimingInfo"&&m(U.data.videoSegmentTimingInfo),U.data.action==="audioSegmentTimingInfo"&&g(U.data.audioSegmentTimingInfo),U.data.action==="id3Frame"&&x([U.data.id3Frame],U.data.id3Frame.dispatchType),U.data.action==="caption"&&T(U.data.caption),U.data.action==="endedtimeline"&&(F=!1,v()),U.data.action==="log"&&b(U.data.log),U.data.type==="transmuxed"&&(F||(e.onmessage=null,Y3({transmuxedData:$,callback:E}),Rf(e))))},O=()=>{const U={message:"Received an error message from the transmuxer worker",metadata:{errorType:ae.Error.StreamingFailedToTransmuxSegment,segmentInfo:An({segment:N})}};E(null,U)};if(e.onmessage=H,e.onerror=O,n&&e.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(s)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:s}),typeof a<"u"&&e.postMessage({action:"setRemux",remux:a}),i.byteLength){const U=i instanceof ArrayBuffer?i:i.buffer,C=i instanceof ArrayBuffer?0:i.byteOffset;w({type:"segmenttransmuxingstart",segment:N}),e.postMessage({action:"push",data:U,byteOffset:C,byteLength:i.byteLength},[U])}D&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},Rf=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():Mf(r.currentTransmux))},Id=(r,e)=>{r.postMessage({action:e}),Rf(r)},Vf=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,Id(e,r);return}e.transmuxQueue.push(Id.bind(null,e,r))},K3=r=>{Vf("reset",r)},Q3=r=>{Vf("endTimeline",r)},Ff=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,Mf(r);return}r.transmuxer.transmuxQueue.push(r)},Z3=r=>{const e=new G3;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:r}),e};var Go={reset:K3,endTimeline:Q3,transmux:Ff,createTransmuxer:Z3};const er=function(r){const e=r.transmuxer,i=r.endAction||r.action,n=r.callback,s=St({},r,{endAction:null,transmuxer:null,callback:null}),a=o=>{o.data.action===i&&(e.removeEventListener("message",a),o.data.data&&(o.data.data=new Uint8Array(o.data.data,r.byteOffset||0,r.byteLength||o.data.data.byteLength),r.data&&(r.data=o.data.data)),n(o.data))};if(e.addEventListener("message",a),r.data){const o=r.data instanceof ArrayBuffer;s.byteOffset=o?0:r.data.byteOffset,s.byteLength=r.data.byteLength;const l=[o?r.data:r.data.buffer];e.postMessage(s,l)}else e.postMessage(s)},qi={FAILURE:2,TIMEOUT:-101,ABORTED:-102},$f="wvtt",Tl=r=>{r.forEach(e=>{e.abort()})},J3=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),eT=r=>{const e=r.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return n.bytesReceived=r.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n},du=(r,e)=>{const{requestType:i}=e,n=Rn({requestType:i,request:e,error:r});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:qi.TIMEOUT,xhr:e,metadata:n}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:qi.ABORTED,xhr:e,metadata:n}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:qi.FAILURE,xhr:e,metadata:n}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:qi.FAILURE,xhr:e,metadata:n}:null},Nd=(r,e,i,n)=>(s,a)=>{const o=a.response,l=du(s,a);if(l)return i(l,r);if(o.byteLength!==16)return i({status:a.status,message:"Invalid HLS key at URL: "+a.uri,code:qi.FAILURE,xhr:a},r);const c=new DataView(o),d=new Uint32Array([c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12)]);for(let g=0;g<e.length;g++)e[g].bytes=d;const m={uri:a.uri};return n({type:"segmentkeyloadcomplete",segment:r,keyInfo:m}),i(null,r)},tT=(r,e)=>{e===$f&&r.transmuxer.postMessage({action:"initMp4WebVttParser",data:r.map.bytes})},iT=(r,e,i)=>{e===$f&&er({action:"getMp4WebVttText",data:r.bytes,transmuxer:r.transmuxer,callback:({data:n,mp4VttCues:s})=>{r.bytes=n,i(null,r,{mp4VttCues:s})}})},Uf=(r,e)=>{const i=Ll(r.map.bytes);if(i!=="mp4"){const n=r.map.resolvedUri||r.map.uri,s=i||"unknown";return e({internal:!0,message:`Found unsupported ${s} container for initialization segment at URL: ${n}`,code:qi.FAILURE,metadata:{mediaType:s}})}er({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:({tracks:n,data:s})=>(r.map.bytes=s,n.forEach(function(a){r.map.tracks=r.map.tracks||{},!r.map.tracks[a.type]&&(r.map.tracks[a.type]=a,typeof a.id=="number"&&a.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[a.id]=a.timescale),a.type==="text"&&tT(r,a.codec))}),e(null))})},nT=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:i})=>(n,s)=>{const a=du(n,s);if(a)return e(a,r);const o=new Uint8Array(s.response);if(i({type:"segmentloaded",segment:r}),r.map.key)return r.map.encryptedBytes=o,e(null,r);r.map.bytes=o,Uf(r,function(l){if(l)return l.xhr=s,l.status=s.status,e(l,r);e(null,r)})},rT=({segment:r,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:n})=>(s,a)=>{const o=du(s,a);if(o)return e(o,r);n({type:"segmentloaded",segment:r});const l=i==="arraybuffer"||!a.responseText?a.response:H3(a.responseText.substring(r.lastReachedChar||0));return r.stats=J3(a),r.key?r.encryptedBytes=new Uint8Array(l):r.bytes=new Uint8Array(l),e(null,r)},sT=({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:x,triggerSegmentEventFn:T})=>{const E=r.map&&r.map.tracks||{},v=!!(E.audio&&E.video);let b=n.bind(null,r,"audio","start");const D=n.bind(null,r,"audio","end");let N=n.bind(null,r,"video","start");const w=n.bind(null,r,"video","end"),$=()=>Ff({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:v,onData:F=>{F.type=F.type==="combined"?"video":F.type,m(r,F)},onTrackInfo:F=>{i&&(v&&(F.isMuxed=!0),i(r,F))},onAudioTimingInfo:F=>{b&&typeof F.start<"u"&&(b(F.start),b=null),D&&typeof F.end<"u"&&D(F.end)},onVideoTimingInfo:F=>{N&&typeof F.start<"u"&&(N(F.start),N=null),w&&typeof F.end<"u"&&w(F.end)},onVideoSegmentTimingInfo:F=>{const H={pts:{start:F.start.presentation,end:F.end.presentation},dts:{start:F.start.decode,end:F.end.decode}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:H}),s(F)},onAudioSegmentTimingInfo:F=>{const H={pts:{start:F.start.pts,end:F.end.pts},dts:{start:F.start.dts,end:F.end.dts}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:H}),a(F)},onId3:(F,H)=>{o(r,F,H)},onCaptions:F=>{l(r,[F])},isEndOfTimeline:c,onEndedTimeline:()=>{d()},onTransmuxerLog:x,onDone:(F,H)=>{g&&(F.type=F.type==="combined"?"video":F.type,T({type:"segmenttransmuxingcomplete",segment:r}),g(H,r,F))},segment:r,triggerSegmentEventFn:T});er({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:F=>{r.bytes=e=F.data;const H=F.result;H&&(i(r,{hasAudio:H.hasAudio,hasVideo:H.hasVideo,isMuxed:v}),i=null),$()}})},zf=({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:x,triggerSegmentEventFn:T})=>{let E=new Uint8Array(e);if(ky(E)){r.isFmp4=!0;const{tracks:v}=r.map;if(v.text&&(!v.audio||!v.video)){m(r,{data:E,type:"text"}),iT(r,v.text.codec,g);return}const D={isFmp4:!0,hasVideo:!!v.video,hasAudio:!!v.audio};v.audio&&v.audio.codec&&v.audio.codec!=="enca"&&(D.audioCodec=v.audio.codec),v.video&&v.video.codec&&v.video.codec!=="encv"&&(D.videoCodec=v.video.codec),v.video&&v.audio&&(D.isMuxed=!0),i(r,D);const N=(w,$)=>{m(r,{data:E,type:D.hasAudio&&!D.isMuxed?"audio":"video"}),$&&$.length&&o(r,$),w&&w.length&&l(r,w),g(null,r,{})};er({action:"probeMp4StartTime",timescales:r.map.timescales,data:E,transmuxer:r.transmuxer,callback:({data:w,startTime:$})=>{e=w.buffer,r.bytes=E=w,D.hasAudio&&!D.isMuxed&&n(r,"audio","start",$),D.hasVideo&&n(r,"video","start",$),er({action:"probeEmsgID3",data:E,transmuxer:r.transmuxer,offset:$,callback:({emsgData:F,id3Frames:H})=>{if(e=F.buffer,r.bytes=E=F,!v.video||!F.byteLength||!r.transmuxer){N(void 0,H);return}er({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:E,timescales:r.map.timescales,trackIds:[v.video.id],callback:O=>{e=O.data.buffer,r.bytes=E=O.data,O.logs.forEach(function(U){x(at(U,{stream:"mp4CaptionParser"}))}),N(O.captions,H)}})}})}});return}if(!r.transmuxer){g(null,r,{});return}if(typeof r.container>"u"&&(r.container=Ll(E)),r.container!=="ts"&&r.container!=="aac"){i(r,{hasAudio:!1,hasVideo:!1}),g(null,r,{});return}sT({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:x,triggerSegmentEventFn:T})},Hf=function({id:r,key:e,encryptedBytes:i,decryptionWorker:n,segment:s,doneFn:a},o){const l=d=>{if(d.data.source===r){n.removeEventListener("message",l);const m=d.data.decrypted;o(new Uint8Array(m.bytes,m.byteOffset,m.byteLength))}};n.onerror=()=>{const d="An error occurred in the decryption worker",m=An({segment:s}),g={message:d,metadata:{error:new Error(d),errorType:ae.Error.StreamingFailedToDecryptSegment,segmentInfo:m,keyInfo:{uri:s.key.resolvedUri||s.map.key.resolvedUri}}};a(g,s)},n.addEventListener("message",l);let c;e.bytes.slice?c=e.bytes.slice():c=new Uint32Array(Array.prototype.slice.call(e.bytes)),n.postMessage(wf({source:r,encrypted:i,key:c,iv:e.iv}),[i.buffer,c.buffer])},aT=({decryptionWorker:r,segment:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:x,triggerSegmentEventFn:T})=>{T({type:"segmentdecryptionstart"}),Hf({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:g},E=>{e.bytes=E,T({type:"segmentdecryptioncomplete",segment:e}),zf({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:x,triggerSegmentEventFn:T})})},oT=({activeXhrs:r,decryptionWorker:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:x,triggerSegmentEventFn:T})=>{let E=0,v=!1;return(b,D)=>{if(!v){if(b)return v=!0,Tl(r),g(b,D);if(E+=1,E===r.length){const N=function(){if(D.encryptedBytes)return aT({decryptionWorker:e,segment:D,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:x,triggerSegmentEventFn:T});zf({segment:D,bytes:D.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:x,triggerSegmentEventFn:T})};if(D.endOfAllRequests=Date.now(),D.map&&D.map.encryptedBytes&&!D.map.bytes)return T({type:"segmentdecryptionstart",segment:D}),Hf({decryptionWorker:e,id:D.requestId+"-init",encryptedBytes:D.map.encryptedBytes,key:D.map.key,segment:D,doneFn:g},w=>{D.map.bytes=w,T({type:"segmentdecryptioncomplete",segment:D}),Uf(D,$=>{if($)return Tl(r),g($,D);N()})});N()}}}},lT=({loadendState:r,abortFn:e})=>i=>{i.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},uT=({segment:r,progressFn:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m})=>g=>{if(!g.target.aborted)return r.stats=at(r.stats,eT(g)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(g,r)},cT=({xhr:r,xhrOptions:e,decryptionWorker:i,segment:n,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:m,captionsFn:g,isEndOfTimeline:x,endedTimelineFn:T,dataFn:E,doneFn:v,onTransmuxerLog:b,triggerSegmentEventFn:D})=>{const N=[],w=oT({activeXhrs:N,decryptionWorker:i,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:m,captionsFn:g,isEndOfTimeline:x,endedTimelineFn:T,dataFn:E,doneFn:v,onTransmuxerLog:b,triggerSegmentEventFn:D});if(n.key&&!n.key.bytes){const U=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&U.push(n.map.key);const C=at(e,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),k=Nd(n,U,w,D),P={uri:n.key.resolvedUri};D({type:"segmentkeyloadstart",segment:n,keyInfo:P});const z=r(C,k);N.push(z)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const z=at(e,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),B=Nd(n,[n.map.key],w,D),R={uri:n.map.key.resolvedUri};D({type:"segmentkeyloadstart",segment:n,keyInfo:R});const V=r(z,B);N.push(V)}const C=at(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:yl(n.map),requestType:"segment-media-initialization"}),k=nT({segment:n,finishProcessingFn:w,triggerSegmentEventFn:D});D({type:"segmentloadstart",segment:n});const P=r(C,k);N.push(P)}const $=at(e,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:yl(n),requestType:"segment"}),F=rT({segment:n,finishProcessingFn:w,responseType:$.responseType,triggerSegmentEventFn:D});D({type:"segmentloadstart",segment:n});const H=r($,F);H.addEventListener("progress",uT({segment:n,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:m,captionsFn:g,isEndOfTimeline:x,endedTimelineFn:T,dataFn:E})),N.push(H);const O={};return N.forEach(U=>{U.addEventListener("loadend",lT({loadendState:O,abortFn:s}))}),()=>Tl(N)},Us=Ei("PlaylistSelector"),Od=function(r){if(!r||!r.playlist)return;const e=r.playlist;return JSON.stringify({id:e.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:e.attributes&&e.attributes.CODECS||""})},tr=function(r,e){if(!r)return"";const i=W.getComputedStyle(r);return i?i[e]:""},ir=function(r,e){const i=r.slice();r.sort(function(n,s){const a=e(n,s);return a===0?i.indexOf(n)-i.indexOf(s):a})},hu=function(r,e){let i,n;return r.attributes.BANDWIDTH&&(i=r.attributes.BANDWIDTH),i=i||W.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||W.Number.MAX_VALUE,i-n},dT=function(r,e){let i,n;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(i=r.attributes.RESOLUTION.width),i=i||W.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||W.Number.MAX_VALUE,i===n&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-n};let qf=function(r){const{main:e,bandwidth:i,playerWidth:n,playerHeight:s,playerObjectFit:a,limitRenditionByPlayerDimensions:o,playlistController:l}=r;if(!e)return;const c={bandwidth:i,width:n,height:s,limitRenditionByPlayerDimensions:o};let d=e.playlists;li.isAudioOnly(e)&&(d=l.getAudioTrackPlaylists_(),c.audioOnly=!0);let m=d.map(O=>{let U;const C=O.attributes&&O.attributes.RESOLUTION&&O.attributes.RESOLUTION.width,k=O.attributes&&O.attributes.RESOLUTION&&O.attributes.RESOLUTION.height;return U=O.attributes&&O.attributes.BANDWIDTH,U=U||W.Number.MAX_VALUE,{bandwidth:U,width:C,height:k,playlist:O}});ir(m,(O,U)=>O.bandwidth-U.bandwidth),m=m.filter(O=>!li.isIncompatible(O.playlist));let g=m.filter(O=>li.isEnabled(O.playlist));g.length||(g=m.filter(O=>!li.isDisabled(O.playlist)));const x=g.filter(O=>O.bandwidth*Pt.BANDWIDTH_VARIANCE<i);let T=x[x.length-1];const E=x.filter(O=>O.bandwidth===T.bandwidth)[0];if(o===!1){const O=E||g[0]||m[0];if(O&&O.playlist){let U="sortedPlaylistReps";return E&&(U="bandwidthBestRep"),g[0]&&(U="enabledPlaylistReps"),Us(`choosing ${Od(O)} using ${U} with options`,c),O.playlist}return Us("could not choose a playlist with options",c),null}const v=x.filter(O=>O.width&&O.height);ir(v,(O,U)=>O.width-U.width);const b=v.filter(O=>O.width===n&&O.height===s);T=b[b.length-1];const D=b.filter(O=>O.bandwidth===T.bandwidth)[0];let N,w,$;D||(N=v.filter(O=>a==="cover"?O.width>n&&O.height>s:O.width>n||O.height>s),w=N.filter(O=>O.width===N[0].width&&O.height===N[0].height),T=w[w.length-1],$=w.filter(O=>O.bandwidth===T.bandwidth)[0]);let F;if(l.leastPixelDiffSelector){const O=v.map(U=>(U.pixelDiff=Math.abs(U.width-n)+Math.abs(U.height-s),U));ir(O,(U,C)=>U.pixelDiff===C.pixelDiff?C.bandwidth-U.bandwidth:U.pixelDiff-C.pixelDiff),F=O[0]}const H=F||$||D||E||g[0]||m[0];if(H&&H.playlist){let O="sortedPlaylistReps";return F?O="leastPixelDiffRep":$?O="resolutionPlusOneRep":D?O="resolutionBestRep":E?O="bandwidthBestRep":g[0]&&(O="enabledPlaylistReps"),Us(`choosing ${Od(H)} using ${O} with options`,c),H.playlist}return Us("could not choose a playlist with options",c),null};const Bd=function(){let r=this.useDevicePixelRatio&&W.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),qf({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},hT=function(r){let e=-1,i=-1;if(r<0||r>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let n=this.useDevicePixelRatio&&W.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(n=this.customPixelRatio),e<0&&(e=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(e=r*this.systemBandwidth+(1-r)*e,i=this.systemBandwidth),qf({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},fT=function(r){const{main:e,currentTime:i,bandwidth:n,duration:s,segmentDuration:a,timeUntilRebuffer:o,currentTimeline:l,syncController:c}=r,d=e.playlists.filter(E=>!li.isIncompatible(E));let m=d.filter(li.isEnabled);m.length||(m=d.filter(E=>!li.isDisabled(E)));const x=m.filter(li.hasAttribute.bind(null,"BANDWIDTH")).map(E=>{const b=c.getSyncPoint(E,s,l,i)?1:2,N=li.estimateSegmentRequestTime(a,n,E)*b-o;return{playlist:E,rebufferingImpact:N}}),T=x.filter(E=>E.rebufferingImpact<=0);return ir(T,(E,v)=>hu(v.playlist,E.playlist)),T.length?T[0]:(ir(x,(E,v)=>E.rebufferingImpact-v.rebufferingImpact),x[0]||null)},pT=function(){const r=this.playlists.main.playlists.filter(li.isEnabled);return ir(r,(i,n)=>hu(i,n)),r.filter(i=>!!es(this.playlists.main,i).video)[0]||null},mT=r=>{let e=0,i;return r.bytes&&(i=new Uint8Array(r.bytes),r.segments.forEach(n=>{i.set(n,e),e+=n.byteLength})),i};function jf(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const gT=function(r,e,i){if(!r[i]){e.trigger({type:"usage",name:"vhs-608"});let n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);const s=e.textTracks().getTrackById(n);if(s)r[i]=s;else{const a=e.options_.vhs&&e.options_.vhs.captionServices||{};let o=i,l=i,c=!1;const d=a[n];d&&(o=d.label,l=d.language,c=d.default),r[i]=e.addRemoteTextTrack({kind:"captions",id:n,default:c,label:o,language:l},!1).track}}},vT=function({inbandTextTracks:r,captionArray:e,timestampOffset:i}){if(!e)return;const n=W.WebKitDataCue||W.VTTCue;e.forEach(s=>{const a=s.stream;s.content?s.content.forEach(o=>{const l=new n(s.startTime+i,s.endTime+i,o.text);l.line=o.line,l.align="left",l.position=o.position,l.positionAlign="line-left",r[a].addCue(l)}):r[a].addCue(new n(s.startTime+i,s.endTime+i,s.text))})},yT=function(r){Object.defineProperties(r.frame,{id:{get(){return ae.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return ae.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return ae.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},_T=({inbandTextTracks:r,metadataArray:e,timestampOffset:i,videoDuration:n})=>{if(!e)return;const s=W.WebKitDataCue||W.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(m=>{const g=m.cueTime+i;typeof g!="number"||W.isNaN(g)||g<0||!(g<1/0)||!m.frames||!m.frames.length||m.frames.forEach(x=>{const T=new s(g,g,x.value||x.url||x.data||"");T.frame=x,T.value=x,yT(T),a.addCue(T)})}),!a.cues||!a.cues.length))return;const o=a.cues,l=[];for(let m=0;m<o.length;m++)o[m]&&l.push(o[m]);const c=l.reduce((m,g)=>{const x=m[g.startTime]||[];return x.push(g),m[g.startTime]=x,m},{}),d=Object.keys(c).sort((m,g)=>Number(m)-Number(g));d.forEach((m,g)=>{const x=c[m],T=isFinite(n)?n:m,E=Number(d[g+1])||T;x.forEach(v=>{v.endTime=E})})},TT={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"},bT=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),CT=({inbandTextTracks:r,dateRanges:e})=>{const i=r.metadataTrack_;if(!i)return;const n=W.WebKitDataCue||W.VTTCue;e.forEach(s=>{for(const a of Object.keys(s)){if(bT.has(a))continue;const o=new n(s.startTime,s.endTime,"");o.id=s.id,o.type="com.apple.quicktime.HLS",o.value={key:TT[a],data:s[a]},(a==="scte35Out"||a==="scte35In")&&(o.value.data=new Uint8Array(o.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(o)}s.processDateRange()})},Ld=(r,e,i)=>{r.metadataTrack_||(r.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ae.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},Yr=function(r,e,i){let n,s;if(i&&i.cues)for(n=i.cues.length;n--;)s=i.cues[n],s.startTime>=r&&s.endTime<=e&&i.removeCue(s)},xT=function(r){const e=r.cues;if(!e)return;const i={};for(let n=e.length-1;n>=0;n--){const s=e[n],a=`${s.startTime}-${s.endTime}-${s.text}`;i[a]?r.removeCue(s):i[a]=s}},ST=(r,e,i)=>{if(typeof e>"u"||e===null||!r.length)return[];const n=Math.ceil((e-i+3)*In.ONE_SECOND_IN_TS);let s;for(s=0;s<r.length&&!(r[s].pts>n);s++);return r.slice(s)},ET=(r,e,i)=>{if(!e.length)return r;if(i)return e.slice();const n=e[0].pts;let s=0;for(s;s<r.length&&!(r[s].pts>=n);s++);return r.slice(0,s).concat(e)},kT=(r,e,i,n)=>{const s=Math.ceil((e-n)*In.ONE_SECOND_IN_TS),a=Math.ceil((i-n)*In.ONE_SECOND_IN_TS),o=r.slice();let l=r.length;for(;l--&&!(r[l].pts<=a););if(l===-1)return o;let c=l+1;for(;c--&&!(r[c].pts<=s););return c=Math.max(c,0),o.splice(c,l-c+1),o},wT=function(r,e){if(!r&&!e||!r&&e||r&&!e)return!1;if(r===e)return!0;const i=Object.keys(r).sort(),n=Object.keys(e).sort();if(i.length!==n.length)return!1;for(let s=0;s<i.length;s++){const a=i[s];if(a!==n[s]||r[a]!==e[a])return!1}return!0},DT=function(r,e,i){e=e||[];const n=[];let s=0;for(let a=0;a<e.length;a++){const o=e[a];if(r===o.timeline&&(n.push(a),s+=o.duration,s>i))return a}return n.length===0?0:n[n.length-1]},qr=1,AT=500,Pd=r=>typeof r=="number"&&isFinite(r),zs=1/60,IT=(r,e,i)=>r!=="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,NT=(r,e,i)=>{let n=e-Pt.BACK_BUFFER_LENGTH;r.length&&(n=Math.max(n,r.start(0)));const s=e-i;return Math.min(s,n)},jn=r=>{const{startOfSegment:e,duration:i,segment:n,part:s,playlist:{mediaSequence:a,id:o,segments:l=[]},mediaIndex:c,partIndex:d,timeline:m}=r,g=l.length-1;let x="mediaIndex/partIndex increment";r.getMediaInfoForTime?x=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(x="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(x+=` with independent ${r.independent}`);const T=typeof d=="number",E=r.segment.uri?"segment":"pre-segment",v=T?uf({preloadSegment:n})-1:0;return`${E} [${a+c}/${a+g}]`+(T?` part [${d}/${v}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(T?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${m}] selected by [${x}] playlist [${o}]`},Md=r=>`${r}TimingInfo`,OT=({segmentTimeline:r,currentTimeline:e,startOfSegment:i,buffered:n,overrideCheck:s})=>!s&&r===e?null:r<e?i:n.length?n.end(n.length-1):i,bl=({timelineChangeController:r,currentTimeline:e,segmentTimeline:i,loaderType:n,audioDisabled:s})=>{if(e===i)return!1;if(n==="audio"){const a=r.lastTimelineChange({type:"main"});return!a||a.to!==i}if(n==="main"&&s){const a=r.pendingTimelineChange({type:"audio"});return!(a&&a.to===i)}return!1},BT=r=>{if(!r)return!1;const e=r.pendingTimelineChange({type:"audio"}),i=r.pendingTimelineChange({type:"main"}),n=e&&i,s=n&&e.to!==i.to;return!!(n&&e.from!==-1&&i.from!==-1&&s)},LT=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to},hn=r=>{const e=r.pendingSegment_;if(!e)return;if(bl({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&BT(r.timelineChangeController_)){if(LT(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}r.timelineChangeController_.trigger("fixBadTimelineChange")}},PT=r=>{let e=0;return["video","audio"].forEach(function(i){const n=r[`${i}TimingInfo`];if(!n)return;const{start:s,end:a}=n;let o;typeof s=="bigint"||typeof a=="bigint"?o=W.BigInt(a)-W.BigInt(s):typeof s=="number"&&typeof a=="number"&&(o=a-s),typeof o<"u"&&o>e&&(e=o)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},Rd=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+zi:!1,MT=(r,e)=>{if(e!=="hls")return null;const i=PT({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!i)return null;const n=r.playlist.targetDuration,s=Rd({segmentDuration:i,maxDuration:n*2}),a=Rd({segmentDuration:i,maxDuration:n}),o=`Segment with index ${r.mediaIndex} from playlist ${r.playlist.id} has a duration of ${i} when the reported duration is ${r.duration} and the target duration is ${n}. 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 s||a?{severity:s?"warn":"info",message:o}:null},An=({type:r,segment:e})=>{if(!e)return;const i=!!(e.key||e.map&&e.map.ke),n=!!(e.map&&!e.map.bytes),s=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:r||e.type,uri:e.resolvedUri||e.uri,start:s,duration:e.duration,isEncrypted:i,isMediaInitialization:n}};class Cl extends ae.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_=Ei(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(n){n!==this.state_&&(this.logger_(`${this.state_} -> ${n}`),this.state_=n,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this)}),this.sourceUpdater_.on("codecschange",n=>{this.trigger(St({type:"codecschange"},n))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",n=>{this.trigger(St({type:"timelinechange"},n)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():hn(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Go.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_&&Go.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Rt();if(this.loaderType_==="main"){const{hasAudio:i,hasVideo:n,isMuxed:s}=e;if(n&&i&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,i=!1){if(!e)return null;const n=ya(e);let s=this.initSegments_[n];return i&&!s&&e.bytes&&(this.initSegments_[n]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,i=!1){if(!e)return null;const n=Df(e);let s=this.keyCache_[n];this.cacheEncryptionKeys_&&i&&!s&&e.bytes&&(this.keyCache_[n]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const a={resolvedUri:(s||e).resolvedUri};return s&&(a.bytes=s.bytes),a}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 n=this.playlist_,s=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 a=null;if(n&&(n.id?a=n.id:n.uri&&(a=n.uri)),this.logger_(`playlist update [${a} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
|
|
209
|
+
currentTime: ${this.currentTime_()}
|
|
210
|
+
bufferedEnd: ${qo(this.buffered_())}
|
|
211
|
+
`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!n||n.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 o=e.mediaSequence-n.mediaSequence;if(this.logger_(`live window shift [${o}]`),this.mediaIndex!==null)if(this.mediaIndex-=o,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const l=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!l.parts||!l.parts.length||!l.parts[this.partIndex])){const c=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=c}}s&&(s.mediaIndex-=o,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,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_&&Go.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,n=()=>{},s=!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 a=1;const o=()=>{a--,a===0&&n()};(s||!this.audioDisabled_)&&(a++,this.sourceUpdater_.removeAudio(e,i,o)),(s||this.loaderType_==="main")&&(this.gopBuffer_=kT(this.gopBuffer_,e,i,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,i,o));for(const l in this.inbandTextTracks_)Yr(e,i,this.inbandTextTracks_[l]);Yr(e,i,this.segmentMetadataTrack_),o()}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),AT)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const i={segmentInfo:An({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_,n=this.partIndex){if(!i||!this.mediaSource_)return!1;const s=typeof e=="number"&&i.segments[e],a=e+1===i.segments.length,o=!s||!s.parts||n+1===s.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&a&&o}chooseNextRequest_(){const e=this.buffered_(),i=qo(e)||0,n=ou(e,this.currentTime_()),s=!this.hasPlayed_()&&n>=1,a=n>=this.goalBufferLength_(),o=this.playlist_.segments;if(!o.length||s||a)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const l={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(l.isSyncRequest)l.mediaIndex=DT(this.currentTimeline_,o,i),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${l.mediaIndex}`);else if(this.mediaIndex!==null){const x=o[this.mediaIndex],T=typeof this.partIndex=="number"?this.partIndex:-1;l.startOfSegment=x.end?x.end:i,x.parts&&x.parts[T+1]?(l.mediaIndex=this.mediaIndex,l.partIndex=T+1):l.mediaIndex=this.mediaIndex+1}else{let x,T,E;const v=this.fetchAtBuffer_?i:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
|
|
212
|
+
For TargetTime: ${v}.
|
|
213
|
+
CurrentTime: ${this.currentTime_()}
|
|
214
|
+
BufferedEnd: ${i}
|
|
215
|
+
Fetch At Buffer: ${this.fetchAtBuffer_}
|
|
216
|
+
`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const b=this.getSyncInfoFromMediaSequenceSync_(v);if(!b){const D="No sync info found while using media sequence sync";return this.error({message:D,metadata:{errorType:ae.Error.StreamingFailedToSelectNextSegment,error:new Error(D)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${b.start} --> ${b.end})`),x=b.segmentIndex,T=b.partIndex,E=b.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const b=li.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:v,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});x=b.segmentIndex,T=b.partIndex,E=b.startTime}l.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${v}`:`currentTime ${v}`,l.mediaIndex=x,l.startOfSegment=E,l.partIndex=T,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${l.mediaIndex} `)}const c=o[l.mediaIndex];let d=c&&typeof l.partIndex=="number"&&c.parts&&c.parts[l.partIndex];if(!c||typeof l.partIndex=="number"&&!d)return null;typeof l.partIndex!="number"&&c.parts&&(l.partIndex=0,d=c.parts[0]);const m=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!n&&d&&!m&&!d.independent)if(l.partIndex===0){const x=o[l.mediaIndex-1],T=x.parts&&x.parts.length&&x.parts[x.parts.length-1];T&&T.independent&&(l.mediaIndex-=1,l.partIndex=x.parts.length-1,l.independent="previous segment")}else c.parts[l.partIndex-1].independent&&(l.partIndex-=1,l.independent="previous part");const g=this.mediaSource_&&this.mediaSource_.readyState==="ended";return l.mediaIndex>=o.length-1&&g&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,l.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(l))}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 n=this.mediaSequenceSync_.getSyncInfoForTime(i);if(!n)return null;if(!n.isAppended)return n;const s=this.mediaSequenceSync_.getSyncInfoForTime(n.end);return s?(s.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),s):null}generateSegmentInfo_(e){const{independent:i,playlist:n,mediaIndex:s,startOfSegment:a,isSyncRequest:o,partIndex:l,forceTimestampOffset:c,getMediaInfoForTime:d}=e,m=n.segments[s],g=typeof l=="number"&&m.parts[l],x={requestId:"segment-loader-"+Math.random(),uri:g&&g.resolvedUri||m.resolvedUri,mediaIndex:s,partIndex:g?l:null,isSyncRequest:o,startOfSegment:a,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:m.timeline,duration:g&&g.duration||m.duration,segment:m,part:g,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:d,independent:i},T=typeof c<"u"?c:this.isPendingTimestampOffset_;x.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:m.timeline,currentTimeline:this.currentTimeline_,startOfSegment:a,buffered:this.buffered_(),overrideCheck:T});const E=qo(this.sourceUpdater_.audioBuffered());return typeof E=="number"&&(x.audioAppendStart=E-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(x.gopsToAlignWith=ST(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),x}timestampOffsetForSegment_(e){return OT(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_(),n=e.bandwidth,s=this.pendingSegment_.duration,a=li.estimateSegmentRequestTime(s,n,this.playlist_,e.bytesReceived),o=e3(this.buffered_(),i,this.vhs_.tech_.playbackRate())-1;if(a<=o)return;const l=fT({main:this.vhs_.playlists.main,currentTime:i,bandwidth:n,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!l)return;const d=a-o-l.rebufferingImpact;let m=.5;o<=zi&&(m=1),!(!l.playlist||l.playlist.uri===this.playlist_.uri||d<m)&&(this.bandwidth=l.playlist.attributes.BANDWIDTH*Pt.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${jn(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,i){this.earlyAbortWhenNeeded_(i.stats),!this.checkForAbort_(i.requestId)&&this.trigger("progress")}handleTrackInfo_(e,i){const{hasAudio:n,hasVideo:s}=i,a={segmentInfo:An({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:n,hasVideo:s}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:a}),this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(i)||(i=i||{},wT(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,n,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const a=this.pendingSegment_,o=Md(i);a[o]=a[o]||{},a[o][n]=s,this.logger_(`timinginfo: ${i} - ${n} - ${s}`),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 s=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};i.forEach(o=>{a[o.stream]=a[o.stream]||{startTime:1/0,captions:[],endTime:0};const l=a[o.stream];l.startTime=Math.min(l.startTime,o.startTime+s),l.endTime=Math.max(l.endTime,o.endTime+s),l.captions.push(o)}),Object.keys(a).forEach(o=>{const{startTime:l,endTime:c,captions:d}=a[o],m=this.inbandTextTracks_;this.logger_(`adding cues from ${l} -> ${c} for ${o}`),gT(m,this.vhs_.tech_,o),Yr(l,c,m[o]),vT({captionArray:d,inbandTextTracks:m,timestampOffset:s})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,i,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,i,n));return}this.addMetadataToTextTrack(n,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_()?!bl({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:n,hasVideo:s,isMuxed:a}=i;return!(s&&!e.videoTimingInfo||n&&!this.audioDisabled_&&!a&&!e.audioTimingInfo||bl({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 n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[Md(i.type)].start;else{const s=this.getCurrentMediaInfo_(),a=this.loaderType_==="main"&&s&&s.hasVideo;let o;a&&(o=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:o,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,i.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:this.loaderType_==="main"});const s=this.chooseNextRequest_();if(s.mediaIndex!==n.mediaIndex||s.partIndex!==n.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,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:n,playlist:s}){if(n){const a=ya(n);if(this.activeInitSegmentId_===a)return null;i=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=a}return i&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,i):null}handleQuotaExceededError_({segmentInfo:e,type:i,bytes:n},s){const a=this.sourceUpdater_.audioBuffered(),o=this.sourceUpdater_.videoBuffered();a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+Nn(a).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+Nn(o).join(", "));const l=a.length?a.start(0):0,c=a.length?a.end(a.length-1):0,d=o.length?o.start(0):0,m=o.length?o.end(o.length-1):0;if(c-l<=qr&&m-d<=qr){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${n.byteLength}, audio buffer: ${Nn(a).join(", ")}, video buffer: ${Nn(o).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:n}));const x=this.currentTime_()-qr;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${x}`),this.remove(0,x,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${qr}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=W.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},qr*1e3)},!0)}handleAppendError_({segmentInfo:e,type:i,bytes:n},s){if(s){if(s.code===Tf){this.handleQuotaExceededError_({segmentInfo:e,type:i,bytes:n});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",s),this.error({message:`${i} append of ${n.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:ae.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:n,data:s,bytes:a}){if(!a){const l=[s];let c=s.byteLength;n&&(l.unshift(n),c+=n.byteLength),a=mT({bytes:c,segments:l})}const o={segmentInfo:An({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:o}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:i,bytes:a},this.handleAppendError_.bind(this,{segmentInfo:e,type:i,bytes:a}))}handleSegmentTimingInfo_(e,i,n){if(!this.pendingSegment_||i!==this.pendingSegment_.requestId)return;const s=this.pendingSegment_.segment,a=`${e}TimingInfo`;s[a]||(s[a]={}),s[a].transmuxerPrependedSeconds=n.prependedContentDuration||0,s[a].transmuxedPresentationStart=n.start.presentation,s[a].transmuxedDecodeStart=n.start.decode,s[a].transmuxedPresentationEnd=n.end.presentation,s[a].transmuxedDecodeEnd=n.end.decode,s[a].baseMediaDecodeTime=n.baseMediaDecodeTime}appendData_(e,i){const{type:n,data:s}=i;if(!s||!s.byteLength||n==="audio"&&this.audioDisabled_)return;const a=this.getInitSegmentAndUpdateState_({type:n,initSegment:i.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:a,data:s})}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=St({},e,{forceTimestampOffset:!0});St(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),n=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),s=this.mediaIndex!==null,a=e.timeline!==this.currentTimeline_&&e.timeline>0,o=n||s&&a;this.logger_(`Requesting
|
|
217
|
+
${jf(e.uri)}
|
|
218
|
+
${jn(e)}`),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=cT({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:o,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:l,level:c,stream:d})=>{this.logger_(`${jn(e)} logged from transmuxer stream ${d} as a ${c}: ${l}`)},triggerSegmentEventFn:({type:l,segment:c,keyInfo:d,trackInfo:m,timingInfo:g})=>{const T={segmentInfo:An({segment:c})};d&&(T.keyInfo=d),m&&(T.trackInfo=m),g&&(T.timingInfo=g),this.trigger({type:l,metadata:T})}})}trimBackBuffer_(e){const i=NT(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);i>0&&this.remove(0,i)}createSimplifiedSegmentObj_(e){const i=e.segment,n=e.part,s=e.segment.key||e.segment.map&&e.segment.map.key,a=e.segment.map&&!e.segment.map.bytes,o={resolvedUri:n?n.resolvedUri:i.resolvedUri,byterange:n?n.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:s,isMediaInitialization:a},l=e.playlist.segments[e.mediaIndex-1];if(l&&l.timeline===i.timeline&&(l.videoTimingInfo?o.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(o.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),i.key){const c=i.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(i.key),o.key.iv=c}return i.map&&(o.map=this.initSegmentForMap(i.map)),o}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 n={bandwidthInfo:{from:this.bandwidth,to:i.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:n}),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,n){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,i,n));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===qi.ABORTED)return;if(this.pause(),e.code===qi.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,i.stats),s.endOfAllRequests=i.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=ET(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(s)}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:n,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:a,useVideoTimingInfo:o,videoTimingInfo:l,audioTimingInfo:c}){if(typeof e<"u")return e;if(!o)return c.start;const d=i.segments[n-1];return n===0||!d||typeof d.start>"u"||d.end!==s+a?s:l.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:n,hasVideo:s,isMuxed:a}=i,o=this.loaderType_==="main"&&s,l=!this.audioDisabled_&&n&&!a;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}o&&e.waitingOnAppends++,l&&e.waitingOnAppends++,o&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),l&&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=IT(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:n}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:i&&typeof i.transmuxedDecodeStart=="number"?i.transmuxedDecodeStart:n.start:n.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const i=this.getMediaInfo_(),s=this.loaderType_==="main"&&i&&i.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;s&&(e.timingInfo.end=typeof s.end=="number"?s.end:s.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const c={segmentInfo:An({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:c})}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=MT(e,this.sourceType_);if(i&&(i.severity==="warn"?ae.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 ${jn(e)}`);return}this.logger_(`Appended ${jn(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 n=e.segment,s=e.part,a=n.end&&this.currentTime_()-n.end>e.playlist.targetDuration*3,o=s&&s.end&&this.currentTime_()-s.end>e.playlist.partTargetDuration*3;if(a||o){this.logger_(`bad ${a?"segment":"part"} ${jn(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,n=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(s-i)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const i=e.segment,n=i.start,s=i.end;if(!Pd(n)||!Pd(s))return;Yr(n,s,this.segmentMetadataTrack_);const a=W.WebKitDataCue||W.VTTCue,o={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:n,end:s},l=JSON.stringify(o),c=new a(n,s,l);c.value=o,this.segmentMetadataTrack_.addCue(c)}}function tn(){}const Gf=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},RT=["video","audio"],xl=(r,e)=>{const i=e[`${r}Buffer`];return i&&i.updating||e.queuePending[r]},VT=(r,e)=>{for(let i=0;i<e.length;i++){const n=e[i];if(n.type==="mediaSource")return null;if(n.type===r)return i}return null},nr=(r,e)=>{if(e.queue.length===0)return;let i=0,n=e.queue[i];if(n.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),n.action(e),n.doneFn&&n.doneFn(),nr("audio",e),nr("video",e));return}if(r!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||xl(r,e))){if(n.type!==r){if(i=VT(r,e.queue),i===null)return;n=e.queue[i]}if(e.queue.splice(i,1),e.queuePending[r]=n,n.action(r,e),!n.doneFn){e.queuePending[r]=null,nr(r,e);return}}},Wf=(r,e)=>{const i=e[`${r}Buffer`],n=Gf(r);i&&(i.removeEventListener("updateend",e[`on${n}UpdateEnd_`]),i.removeEventListener("error",e[`on${n}Error_`]),e.codecs[r]=null,e[`${r}Buffer`]=null)},$i=(r,e)=>r&&e&&Array.prototype.indexOf.call(r.sourceBuffers,e)!==-1,di={appendBuffer:(r,e,i)=>(n,s)=>{const a=s[`${n}Buffer`];if($i(s.mediaSource,a)){s.logger_(`Appending segment ${e.mediaIndex}'s ${r.length} bytes to ${n}Buffer`);try{a.appendBuffer(r)}catch(o){s.logger_(`Error with code ${o.code} `+(o.code===Tf?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${n}Buffer`),s.queuePending[n]=null,i(o)}}},remove:(r,e)=>(i,n)=>{const s=n[`${i}Buffer`];if($i(n.mediaSource,s)){n.logger_(`Removing ${r} to ${e} from ${i}Buffer`);try{s.remove(r,e)}catch{n.logger_(`Remove ${r} to ${e} from ${i}Buffer failed`)}}},timestampOffset:r=>(e,i)=>{const n=i[`${e}Buffer`];$i(i.mediaSource,n)&&(i.logger_(`Setting ${e}timestampOffset to ${r}`),n.timestampOffset=r)},callback:r=>(e,i)=>{r()},endOfStream:r=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${r||""})`);try{e.mediaSource.endOfStream(r)}catch(i){ae.log.warn("Failed to call media source endOfStream",i)}}},duration:r=>e=>{e.logger_(`Setting mediaSource duration to ${r}`);try{e.mediaSource.duration=r}catch(i){ae.log.warn("Failed to set media source duration",i)}},abort:()=>(r,e)=>{if(e.mediaSource.readyState!=="open")return;const i=e[`${r}Buffer`];if($i(e.mediaSource,i)){e.logger_(`calling abort on ${r}Buffer`);try{i.abort()}catch(n){ae.log.warn(`Failed to abort on ${r}Buffer`,n)}}},addSourceBuffer:(r,e)=>i=>{const n=Gf(r),s=rr(e);i.logger_(`Adding ${r}Buffer with codec ${e} to mediaSource`);const a=i.mediaSource.addSourceBuffer(s);a.addEventListener("updateend",i[`on${n}UpdateEnd_`]),a.addEventListener("error",i[`on${n}Error_`]),i.codecs[r]=e,i[`${r}Buffer`]=a},removeSourceBuffer:r=>e=>{const i=e[`${r}Buffer`];if(Wf(r,e),!!$i(e.mediaSource,i)){e.logger_(`Removing ${r}Buffer with codec ${e.codecs[r]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(i)}catch(n){ae.log.warn(`Failed to removeSourceBuffer ${r}Buffer`,n)}}},changeType:r=>(e,i)=>{const n=i[`${e}Buffer`],s=rr(r);if(!$i(i.mediaSource,n))return;const a=r.substring(0,r.indexOf(".")),o=i.codecs[e];if(o.substring(0,o.indexOf("."))===a)return;const c={codecsChangeInfo:{from:o,to:r}};i.trigger({type:"codecschange",metadata:c}),i.logger_(`changing ${e}Buffer codec from ${o} to ${r}`);try{n.changeType(s),i.codecs[e]=r}catch(d){c.errorType=ae.Error.StreamingCodecsChangeError,c.error=d,d.metadata=c,i.error_=d,i.trigger("error"),ae.log.warn(`Failed to changeType on ${e}Buffer`,d)}}},hi=({type:r,sourceUpdater:e,action:i,doneFn:n,name:s})=>{e.queue.push({type:r,action:i,doneFn:n,name:s}),nr(r,e)},Vd=(r,e)=>i=>{const n=e[`${r}Buffered`](),s=Q_(n);if(e.logger_(`received "updateend" event for ${r} Source Buffer: `,s),e.queuePending[r]){const a=e.queuePending[r].doneFn;e.queuePending[r]=null,a&&a(e[`${r}Error_`])}nr(r,e)};class Yf extends ae.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>nr("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Ei("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Vd("video",this),this.onAudioUpdateEnd_=Vd("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()){ae.log.error("removeSourceBuffer is not supported!");return}hi({type:"mediaSource",sourceUpdater:this,action:di.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!ae.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()){ae.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 n=e[i];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(i,n);this.canChangeType()&&this.changeType(i,n)})}appendBuffer(e,i){const{segmentInfo:n,type:s,bytes:a}=e;if(this.processedAppend_=!0,s==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,i]),this.logger_(`delayed audio append of ${a.length} until video append`);return}const o=i;if(hi({type:s,sourceUpdater:this,action:di.appendBuffer(a,n||{mediaIndex:-1},o),doneFn:i,name:"appendBuffer"}),s==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const l=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${l.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,l.forEach(c=>{this.appendBuffer.apply(this,c)})}}audioBuffered(){return $i(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Rt()}videoBuffered(){return $i(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Rt()}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():J_(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,n=tn){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){n();return}hi({type:"audio",sourceUpdater:this,action:di.remove(e,i),doneFn:n,name:"remove"})}removeVideo(e,i,n=tn){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){n();return}hi({type:"video",sourceUpdater:this,action:di.remove(e,i),doneFn:n,name:"remove"})}updating(){return!!(xl("audio",this)||xl("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"),RT.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Wf(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Fd=r=>decodeURIComponent(escape(String.fromCharCode.apply(null,r))),FT=r=>{const e=new Uint8Array(r);return Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("")},$d=new Uint8Array(`
|
|
219
|
+
|
|
220
|
+
`.split("").map(r=>r.charCodeAt(0)));class $T extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class UT extends Cl{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 Rt();const e=this.subtitlesTrack_.cues,i=e[0].startTime,n=e[e.length-1].startTime;return Rt([[i,n]])}initSegmentForMap(e,i=!1){if(!e)return null;const n=ya(e);let s=this.initSegments_[n];if(i&&!s&&e.bytes){const a=$d.byteLength+e.bytes.byteLength,o=new Uint8Array(a);o.set(e.bytes),o.set($d,e.bytes.byteLength),this.initSegments_[n]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:o}}return s||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){Yr(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,n){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===qi.TIMEOUT&&this.handleTimeout_(),e.code===qi.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const s=this.pendingSegment_,a=n.mp4VttCues&&n.mp4VttCues.length;a&&(s.mp4VttCues=n.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,i.stats),i.key&&this.segmentKey(i.key,!0),this.state="APPENDING",this.trigger("appending");const o=s.segment;if(o.map&&(o.map.bytes=i.map.bytes),s.bytes=i.bytes,typeof W.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,i,n),()=>this.stopForError({message:"Error loading vtt.js"}));return}o.requested=!0;try{this.parseVTTCues_(s)}catch(l){this.stopForError({message:l.message,metadata:{errorType:ae.Error.StreamingVttParserError,error:l}});return}if(a||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,s.cues.forEach(l=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new W.VTTCue(l.startTime,l.endTime,l.text):l)}),xT(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,i){const n=e&&e.type==="vtt",s=i&&i.type==="text";n&&s&&super.handleData_(e,i)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const i=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(n=>{const s=n.start+i,a=n.end+i,o=new W.VTTCue(s,a,n.cueText);n.settings&&n.settings.split(" ").forEach(l=>{const c=l.split(":"),d=c[0],m=c[1];o[d]=isNaN(m)?m:Number(m)}),e.cues.push(o)})}parseVTTCues_(e){let i,n=!1;if(typeof W.WebVTT!="function")throw new $T;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(),n=!0);const s=new W.WebVTT.Parser(W,W.vttjs,i);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=o=>{e.timestampmap=o},s.onparsingerror=o=>{ae.log.warn("Error encountered when parsing cues: "+o.message)},e.segment.map){let o=e.segment.map.bytes;n&&(o=Fd(o)),s.parse(o)}let a=e.bytes;n&&(a=Fd(a)),s.parse(a),s.flush()}updateTimeMapping_(e,i,n){const s=e.segment;if(!i)return;if(!e.cues.length){s.empty=!0;return}const{MPEGTS:a,LOCAL:o}=e.timestampmap,c=a/In.ONE_SECOND_IN_TS-o+i.mapping;if(e.cues.forEach(d=>{const m=d.endTime-d.startTime,g=this.handleRollover_(d.startTime+c,i.time);d.startTime=Math.max(g,0),d.endTime=Math.max(g+m,0)}),!n.syncInfo){const d=e.cues[0].startTime,m=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(d,m-s.duration)}}}handleRollover_(e,i){if(i===null)return e;let n=e*In.ONE_SECOND_IN_TS;const s=i*In.ONE_SECOND_IN_TS;let a;for(s<n?a=-8589934592:a=8589934592;Math.abs(n-s)>4294967296;)n+=a;return n/In.ONE_SECOND_IN_TS}}const zT=function(r,e){const i=r.cues;for(let n=0;n<i.length;n++){const s=i[n];if(e>=s.adStartTime&&e<=s.adEndTime)return s}return null},HT=function(r,e,i=0){if(!r.segments)return;let n=i,s;for(let a=0;a<r.segments.length;a++){const o=r.segments[a];if(s||(s=zT(e,n+o.duration/2)),s){if("cueIn"in o){s.endTime=n,s.adEndTime=n,n+=o.duration,s=null;continue}if(n<s.endTime){n+=o.duration;continue}s.endTime+=o.duration}else if("cueOut"in o&&(s=new W.VTTCue(n,n+o.duration,o.cueOut),s.adStartTime=n,s.adEndTime=n+parseFloat(o.cueOut),e.addCue(s)),"cueOutCont"in o){const[l,c]=o.cueOutCont.split("/").map(parseFloat);s=new W.VTTCue(n,n+o.duration,""),s.adStartTime=n-l,s.adEndTime=s.adStartTime+c,e.addCue(s)}n+=o.duration}};class Ud{constructor({start:e,end:i,segmentIndex:n,partIndex:s=null,appended:a=!1}){this.start_=e,this.end_=i,this.segmentIndex_=n,this.partIndex_=s,this.appended_=a}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 qT{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 Xf{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:n,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(n,s),!!this.isReliable_)return this.updateStorage_(s,n,this.calculateBaseTime_(n,s,i))}getSyncInfoForTime(e){for(const{segmentSyncInfo:i,partsSyncInfo:n}of this.storage_.values())if(n.length){for(const s of n)if(s.isInRange(e))return s}else if(i.isInRange(e))return i;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,i,n){const s=new Map;let a=`
|
|
221
|
+
`,o=n,l=i;this.start_=o,e.forEach((c,d)=>{const m=this.storage_.get(l),g=o,x=g+c.duration,T=!!(m&&m.segmentSyncInfo&&m.segmentSyncInfo.isAppended),E=new Ud({start:g,end:x,appended:T,segmentIndex:d});c.syncInfo=E;let v=o;const b=(c.parts||[]).map((D,N)=>{const w=v,$=v+D.duration,F=!!(m&&m.partsSyncInfo&&m.partsSyncInfo[N]&&m.partsSyncInfo[N].isAppended),H=new Ud({start:w,end:$,appended:F,segmentIndex:d,partIndex:N});return v=$,a+=`Media Sequence: ${l}.${N} | Range: ${w} --> ${$} | Appended: ${F}
|
|
222
|
+
`,D.syncInfo=H,H});s.set(l,new qT(E,b)),a+=`${jf(c.resolvedUri)} | Media Sequence: ${l} | Range: ${g} --> ${x} | Appended: ${T}
|
|
223
|
+
`,l++,o=x}),this.end_=o,this.storage_=s,this.diagnostics_=a}calculateBaseTime_(e,i,n){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const a=s-e;let o=this.storage_.get(s).segmentSyncInfo.start;for(let l=0;l<a;l++){const c=i[l];o-=c.duration}return o}return n}isReliablePlaylist_(e,i){return e!=null&&Array.isArray(i)&&i.length}}class zd extends Xf{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,i,n){if(!this.storage_.size){const s=this.parent_.getSyncInfoForMediaSequence(e);return s?s.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,i,n)}}const jT=86400,Wo=[{name:"VOD",run:(r,e,i,n,s)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(r,e,i,n,s,a)=>{const o=r.getMediaSequenceSync(a);if(!o||!o.isReliable)return null;const l=o.getSyncInfoForTime(s);return l?{time:l.start,partIndex:l.partIndex,segmentIndex:l.segmentIndex}:null}},{name:"ProgramDateTime",run:(r,e,i,n,s)=>{if(!Object.keys(r.timelineToDatetimeMappings).length)return null;let a=null,o=null;const l=fl(e);s=s||0;for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),m=l[d],g=m.segment,x=r.timelineToDatetimeMappings[g.timeline];if(!x||!g.dateTimeObject)continue;let E=g.dateTimeObject.getTime()/1e3+x;if(g.parts&&typeof m.partIndex=="number")for(let b=0;b<m.partIndex;b++)E+=g.parts[b].duration;const v=Math.abs(s-E);if(o!==null&&(v===0||o<v))break;o=v,a={time:E,segmentIndex:m.segmentIndex,partIndex:m.partIndex}}return a}},{name:"Segment",run:(r,e,i,n,s)=>{let a=null,o=null;s=s||0;const l=fl(e);for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),m=l[d],g=m.segment,x=m.part&&m.part.start||g&&g.start;if(g.timeline===n&&typeof x<"u"){const T=Math.abs(s-x);if(o!==null&&o<T)break;(!a||o===null||o>=T)&&(o=T,a={time:x,segmentIndex:m.segmentIndex,partIndex:m.partIndex})}}return a}},{name:"Discontinuity",run:(r,e,i,n,s)=>{let a=null;if(s=s||0,e.discontinuityStarts&&e.discontinuityStarts.length){let o=null;for(let l=0;l<e.discontinuityStarts.length;l++){const c=e.discontinuityStarts[l],d=e.discontinuitySequence+l+1,m=r.discontinuities[d];if(m){const g=Math.abs(s-m.time);if(o!==null&&o<g)break;(!a||o===null||o>=g)&&(o=g,a={time:m.time,segmentIndex:c,partIndex:null})}}}return a}},{name:"Playlist",run:(r,e,i,n,s)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class GT extends ae.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const i=new Xf,n=new zd(i),s=new zd(i);this.mediaSequenceStorage_={main:i,audio:n,vtt:s},this.logger_=Ei("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,i,n,s,a){if(i!==1/0)return Wo.find(({name:c})=>c==="VOD").run(this,e,i);const o=this.runStrategies_(e,i,n,s,a);if(!o.length)return null;for(const l of o){const{syncPoint:c,strategy:d}=l,{segmentIndex:m,time:g}=c;if(m<0)continue;const x=e.segments[m],T=g,E=T+x.duration;if(this.logger_(`Strategy: ${d}. Current time: ${s}. selected segment: ${m}. Time: [${T} -> ${E}]}`),s>=T&&s<E)return this.logger_("Found sync point with exact match: ",c),c}return this.selectSyncPoint_(o,{key:"time",value:s})}getExpiredTime(e,i){if(!e||!e.segments)return null;const n=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!n.length)return null;const s=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Jr({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,i,n,s,a){const o=[];for(let l=0;l<Wo.length;l++){const c=Wo[l],d=c.run(this,e,i,n,s,a);d&&(d.strategy=c.name,o.push({strategy:c.name,syncPoint:d}))}return o}selectSyncPoint_(e,i){let n=e[0].syncPoint,s=Math.abs(e[0].syncPoint[i.key]-i.value),a=e[0].strategy;for(let o=1;o<e.length;o++){const l=Math.abs(e[o].syncPoint[i.key]-i.value);l<s&&(s=l,n=e[o].syncPoint,a=e[o].strategy)}return this.logger_(`syncPoint for [${i.key}: ${i.value}] chosen with strategy [${a}]: [time:${n.time}, segmentIndex:${n.segmentIndex}`+(typeof n.partIndex=="number"?`,partIndex:${n.partIndex}`:"")+"]"),n}saveExpiredSegmentInfo(e,i){const n=i.mediaSequence-e.mediaSequence;if(n>jT){ae.log.warn(`Not saving expired segment info. Media sequence gap ${n} is too large.`);return}for(let s=n-1;s>=0;s--){const a=e.segments[s];if(a&&typeof a.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+s,time:a.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],n=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-n}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:i}){const n=this.calculateSegmentTimeMapping_(e,e.timingInfo,i),s=e.segment;n&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const a=s.dateTimeObject;s.discontinuity&&i&&a&&(this.timelineToDatetimeMappings[s.timeline]=-(a.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,n){const s=e.segment,a=e.part;let o=this.timelines[e.timeline],l,c;if(typeof e.timestampOffset=="number")o={time:e.startOfSegment,mapping:e.startOfSegment-i.start},n&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),l=e.startOfSegment,c=i.end+o.mapping;else if(o)l=i.start+o.mapping,c=i.end+o.mapping;else return!1;return a&&(a.start=l,a.end=c),(!s.start||l<s.start)&&(s.start=l),s.end=c,!0}saveDiscontinuitySyncInfo_(e){const i=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(i.discontinuityStarts&&i.discontinuityStarts.length)for(let s=0;s<i.discontinuityStarts.length;s++){const a=i.discontinuityStarts[s],o=i.discontinuitySequence+s+1,l=a-e.mediaIndex,c=Math.abs(l);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>c){let d;l<0?d=n.start-Jr({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:a}):d=n.end+Jr({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[o]={time:d,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class WT extends ae.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:i,to:n}){return typeof i=="number"&&typeof n=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:i,to:n},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:i,to:n}){if(typeof i=="number"&&typeof n=="number"){this.lastTimelineChanges_[e]={type:e,from:i,to:n},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:i,to:n}};this.trigger({type:"timelinechange",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const YT=Lf(Pf(function(){var r=(function(){function v(){this.listeners={}}var b=v.prototype;return b.on=function(N,w){this.listeners[N]||(this.listeners[N]=[]),this.listeners[N].push(w)},b.off=function(N,w){if(!this.listeners[N])return!1;var $=this.listeners[N].indexOf(w);return this.listeners[N]=this.listeners[N].slice(0),this.listeners[N].splice($,1),$>-1},b.trigger=function(N){var w=this.listeners[N];if(w)if(arguments.length===2)for(var $=w.length,F=0;F<$;++F)w[F].call(this,arguments[1]);else for(var H=Array.prototype.slice.call(arguments,1),O=w.length,U=0;U<O;++U)w[U].apply(this,H)},b.dispose=function(){this.listeners={}},b.pipe=function(N){this.on("data",function(w){N.push(w)})},v})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(v){return v.subarray(0,v.byteLength-v[v.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const i=function(){const v=[[[],[],[],[],[]],[[],[],[],[],[]]],b=v[0],D=v[1],N=b[4],w=D[4];let $,F,H;const O=[],U=[];let C,k,P,z,B,R;for($=0;$<256;$++)U[(O[$]=$<<1^($>>7)*283)^$]=$;for(F=H=0;!N[F];F^=C||1,H=U[H]||1)for(z=H^H<<1^H<<2^H<<3^H<<4,z=z>>8^z&255^99,N[F]=z,w[z]=F,P=O[k=O[C=O[F]]],R=P*16843009^k*65537^C*257^F*16843008,B=O[z]*257^z*16843008,$=0;$<4;$++)b[$][F]=B=B<<24^B>>>8,D[$][z]=R=R<<24^R>>>8;for($=0;$<5;$++)b[$]=b[$].slice(0),D[$]=D[$].slice(0);return v};let n=null;class s{constructor(b){n||(n=i()),this._tables=[[n[0][0].slice(),n[0][1].slice(),n[0][2].slice(),n[0][3].slice(),n[0][4].slice()],[n[1][0].slice(),n[1][1].slice(),n[1][2].slice(),n[1][3].slice(),n[1][4].slice()]];let D,N,w;const $=this._tables[0][4],F=this._tables[1],H=b.length;let O=1;if(H!==4&&H!==6&&H!==8)throw new Error("Invalid aes key size");const U=b.slice(0),C=[];for(this._key=[U,C],D=H;D<4*H+28;D++)w=U[D-1],(D%H===0||H===8&&D%H===4)&&(w=$[w>>>24]<<24^$[w>>16&255]<<16^$[w>>8&255]<<8^$[w&255],D%H===0&&(w=w<<8^w>>>24^O<<24,O=O<<1^(O>>7)*283)),U[D]=U[D-H]^w;for(N=0;D;N++,D--)w=U[N&3?D:D-4],D<=4||N<4?C[N]=w:C[N]=F[0][$[w>>>24]]^F[1][$[w>>16&255]]^F[2][$[w>>8&255]]^F[3][$[w&255]]}decrypt(b,D,N,w,$,F){const H=this._key[1];let O=b^H[0],U=w^H[1],C=N^H[2],k=D^H[3],P,z,B;const R=H.length/4-2;let V,te=4;const ee=this._tables[1],q=ee[0],j=ee[1],J=ee[2],se=ee[3],Q=ee[4];for(V=0;V<R;V++)P=q[O>>>24]^j[U>>16&255]^J[C>>8&255]^se[k&255]^H[te],z=q[U>>>24]^j[C>>16&255]^J[k>>8&255]^se[O&255]^H[te+1],B=q[C>>>24]^j[k>>16&255]^J[O>>8&255]^se[U&255]^H[te+2],k=q[k>>>24]^j[O>>16&255]^J[U>>8&255]^se[C&255]^H[te+3],te+=4,O=P,U=z,C=B;for(V=0;V<4;V++)$[(3&-V)+F]=Q[O>>>24]<<24^Q[U>>16&255]<<16^Q[C>>8&255]<<8^Q[k&255]^H[te++],P=O,O=U,U=C,C=k,k=P}}class a extends r{constructor(){super(r),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(b){this.jobs.push(b),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(v){return v<<24|(v&65280)<<8|(v&16711680)>>8|v>>>24},l=function(v,b,D){const N=new Int32Array(v.buffer,v.byteOffset,v.byteLength>>2),w=new s(Array.prototype.slice.call(b)),$=new Uint8Array(v.byteLength),F=new Int32Array($.buffer);let H,O,U,C,k,P,z,B,R;for(H=D[0],O=D[1],U=D[2],C=D[3],R=0;R<N.length;R+=4)k=o(N[R]),P=o(N[R+1]),z=o(N[R+2]),B=o(N[R+3]),w.decrypt(k,P,z,B,F,R),F[R]=o(F[R]^H),F[R+1]=o(F[R+1]^O),F[R+2]=o(F[R+2]^U),F[R+3]=o(F[R+3]^C),H=k,O=P,U=z,C=B;return $};class c{constructor(b,D,N,w){const $=c.STEP,F=new Int32Array(b.buffer),H=new Uint8Array(b.byteLength);let O=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(F.subarray(O,O+$),D,N,H)),O=$;O<F.length;O+=$)N=new Uint32Array([o(F[O-4]),o(F[O-3]),o(F[O-2]),o(F[O-1])]),this.asyncStream_.push(this.decryptChunk_(F.subarray(O,O+$),D,N,H));this.asyncStream_.push(function(){w(null,e(H))})}static get STEP(){return 32e3}decryptChunk_(b,D,N,w){return function(){const $=l(b,D,N);w.set($,b.byteOffset)}}}var d=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},m;typeof window<"u"?m=window:typeof d<"u"?m=d:typeof self<"u"?m=self:m={};var g=m,x=function(b){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(b):b&&b.buffer instanceof ArrayBuffer},T=g.BigInt||Number;T("0x1"),T("0x100"),T("0x10000"),T("0x1000000"),T("0x100000000"),T("0x10000000000"),T("0x1000000000000"),T("0x100000000000000"),T("0x10000000000000000"),(function(){var v=new Uint16Array([65484]),b=new Uint8Array(v.buffer,v.byteOffset,v.byteLength);return b[0]===255?"big":b[0]===204?"little":"unknown"})();const E=function(v){const b={};return Object.keys(v).forEach(D=>{const N=v[D];x(N)?b[D]={bytes:N.buffer,byteOffset:N.byteOffset,byteLength:N.byteLength}:b[D]=N}),b};self.onmessage=function(v){const b=v.data,D=new Uint8Array(b.encrypted.bytes,b.encrypted.byteOffset,b.encrypted.byteLength),N=new Uint32Array(b.key.bytes,b.key.byteOffset,b.key.byteLength/4),w=new Uint32Array(b.iv.bytes,b.iv.byteOffset,b.iv.byteLength/4);new c(D,N,w,function($,F){self.postMessage(E({source:b.source,decrypted:F}),[F.buffer])})}}));var XT=Bf(YT);const KT=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},Kf=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Sl=(r,e)=>{e.activePlaylistLoader=r,r.load()},QT=(r,e)=>()=>{const{segmentLoaders:{[r]:i,main:n},mediaTypes:{[r]:s}}=e,a=s.activeTrack(),o=s.getActiveGroup(),l=s.activePlaylistLoader,c=s.lastGroup_;if(!(o&&c&&o.id===c.id)&&(s.lastGroup_=o,s.lastTrack_=a,Kf(i,s),!(!o||o.isMainPlaylist))){if(!o.playlistLoader){l&&n.resetEverything();return}i.resyncLoader(),Sl(o.playlistLoader,s)}},ZT=(r,e)=>()=>{const{segmentLoaders:{[r]:i},mediaTypes:{[r]:n}}=e;n.lastGroup_=null,i.abort(),i.pause()},JT=(r,e)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[r]:n,main:s},mediaTypes:{[r]:a}}=e,o=a.activeTrack(),l=a.getActiveGroup(),c=a.activePlaylistLoader,d=a.lastTrack_;if(!(d&&o&&d.id===o.id)&&(a.lastGroup_=l,a.lastTrack_=o,Kf(n,a),!!l)){if(l.isMainPlaylist){if(!o||!d||o.id===d.id)return;const m=e.vhs.playlistController_,g=m.selectPlaylist();if(m.media()===g)return;a.logger_(`track change. Switching main audio from ${d.id} to ${o.id}`),i.pause(),s.resetEverything(),m.fastQualityChange_(g);return}if(r==="AUDIO"){if(!l.playlistLoader){s.setAudio(!0),s.resetEverything();return}n.setAudio(!0),s.setAudio(!1)}if(c===l.playlistLoader){Sl(l.playlistLoader,a);return}n.track&&n.track(o),n.resetEverything(),Sl(l.playlistLoader,a)}},_a={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:i},excludePlaylist:n}=e,s=i.activeTrack(),a=i.activeGroup(),o=(a.filter(c=>c.default)[0]||a[0]).id,l=i.tracks[o];if(s===l){n({error:{message:"Problem encountered loading the default audio track."}});return}ae.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const c in i.tracks)i.tracks[c].enabled=i.tracks[c]===l;i.onTrackChanged()},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:i}}=e;ae.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=i.activeTrack();n&&(n.mode="disabled"),i.onTrackChanged()}},Hd={AUDIO:(r,e,i)=>{if(!e)return;const{tech:n,requestOptions:s,segmentLoaders:{[r]:a}}=i;e.on("loadedmetadata",()=>{const o=e.media();a.playlist(o,s),(!n.paused()||o.endList&&n.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),s),n.paused()||a.load()}),e.on("error",_a[r](r,i))},SUBTITLES:(r,e,i)=>{const{tech:n,requestOptions:s,segmentLoaders:{[r]:a},mediaTypes:{[r]:o}}=i;e.on("loadedmetadata",()=>{const l=e.media();a.playlist(l,s),a.track(o.activeTrack()),(!n.paused()||l.endList&&n.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),s),n.paused()||a.load()}),e.on("error",_a[r](r,i))}},eb={AUDIO:(r,e)=>{const{vhs:i,sourceType:n,segmentLoaders:{[r]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[r]:{groups:l,tracks:c,logger_:d}},mainPlaylistLoader:m}=e,g=hs(m.main);(!o[r]||Object.keys(o[r]).length===0)&&(o[r]={main:{default:{default:!0}}},g&&(o[r].main.default.playlists=m.main.playlists));for(const x in o[r]){l[x]||(l[x]=[]);for(const T in o[r][x]){let E=o[r][x][T],v;if(g?(d(`AUDIO group '${x}' label '${T}' is a main playlist`),E.isMainPlaylist=!0,v=null):n==="vhs-json"&&E.playlists?v=new Yn(E.playlists[0],i,a):E.resolvedUri?v=new Yn(E.resolvedUri,i,a):E.playlists&&n==="dash"?v=new _l(E.playlists[0],i,a,m):v=null,E=at({id:T,playlistLoader:v},E),Hd[r](r,E.playlistLoader,e),l[x].push(E),typeof c[T]>"u"){const b=new ae.AudioTrack({id:T,kind:KT(E),enabled:!1,language:E.language,default:E.default,label:T});c[T]=b}}}s.on("error",_a[r](r,e))},SUBTITLES:(r,e)=>{const{tech:i,vhs:n,sourceType:s,segmentLoaders:{[r]:a},requestOptions:o,main:{mediaGroups:l},mediaTypes:{[r]:{groups:c,tracks:d}},mainPlaylistLoader:m}=e;for(const g in l[r]){c[g]||(c[g]=[]);for(const x in l[r][g]){if(!n.options_.useForcedSubtitles&&l[r][g][x].forced)continue;let T=l[r][g][x],E;if(s==="hls")E=new Yn(T.resolvedUri,n,o);else if(s==="dash"){if(!T.playlists.filter(b=>b.excludeUntil!==1/0).length)return;E=new _l(T.playlists[0],n,o,m)}else s==="vhs-json"&&(E=new Yn(T.playlists?T.playlists[0]:T.resolvedUri,n,o));if(T=at({id:x,playlistLoader:E},T),Hd[r](r,T.playlistLoader,e),c[g].push(T),typeof d[x]>"u"){const v=i.addRemoteTextTrack({id:x,kind:"subtitles",default:T.default&&T.autoselect,language:T.language,label:x},!1).track;d[x]=v}}}a.on("error",_a[r](r,e))},"CLOSED-CAPTIONS":(r,e)=>{const{tech:i,main:{mediaGroups:n},mediaTypes:{[r]:{groups:s,tracks:a}}}=e;for(const o in n[r]){s[o]||(s[o]=[]);for(const l in n[r][o]){const c=n[r][o][l];if(!/^(?:CC|SERVICE)/.test(c.instreamId))continue;const d=i.options_.vhs&&i.options_.vhs.captionServices||{};let m={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(d[m.instreamId]&&(m=at(m,d[m.instreamId])),m.default===void 0&&delete m.default,s[o].push(at({id:l},c)),typeof a[l]>"u"){const g=i.addRemoteTextTrack({id:m.instreamId,kind:"captions",default:m.default,language:m.language,label:m.label},!1).track;a[l]=g}}}}},Qf=(r,e)=>{for(let i=0;i<r.length;i++)if(cu(e,r[i])||r[i].playlists&&Qf(r[i].playlists,e))return!0;return!1},tb=(r,e)=>i=>{const{mainPlaylistLoader:n,mediaTypes:{[r]:{groups:s}}}=e,a=n.media();if(!a)return null;let o=null;a.attributes[r]&&(o=s[a.attributes[r]]);const l=Object.keys(s);if(!o)if(r==="AUDIO"&&l.length>1&&hs(e.main))for(let c=0;c<l.length;c++){const d=s[l[c]];if(Qf(d,a)){o=d;break}}else s.main?o=s.main:l.length===1&&(o=s[l[0]]);return typeof i>"u"?o:i===null||!o?null:o.filter(c=>c.id===i.id)[0]||null},ib={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:i}}}=e;for(const n in i)if(i[n].enabled)return i[n];return null},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:i}}}=e;for(const n in i)if(i[n].mode==="showing"||i[n].mode==="hidden")return i[n];return null}},nb=(r,{mediaTypes:e})=>()=>{const i=e[r].activeTrack();return i?e[r].activeGroup(i):null},rb=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(d=>{eb[d](d,r)});const{mediaTypes:e,mainPlaylistLoader:i,tech:n,vhs:s,segmentLoaders:{["AUDIO"]:a,main:o}}=r;["AUDIO","SUBTITLES"].forEach(d=>{e[d].activeGroup=tb(d,r),e[d].activeTrack=ib[d](d,r),e[d].onGroupChanged=QT(d,r),e[d].onGroupChanging=ZT(d,r),e[d].onTrackChanged=JT(d,r),e[d].getActiveGroup=nb(d,r)});const l=e.AUDIO.activeGroup();if(l){const d=(l.filter(g=>g.default)[0]||l[0]).id;e.AUDIO.tracks[d].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanging())});const c=()=>{e.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"})};n.audioTracks().addEventListener("change",c),n.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),s.on("dispose",()=>{n.audioTracks().removeEventListener("change",c),n.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),n.clearTracks("audio");for(const d in e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[d])},sb=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:tn,activeTrack:tn,getActiveGroup:tn,onGroupChanged:tn,onTrackChanged:tn,lastTrack_:null,logger_:Ei(`MediaGroups[${e}]`)}}),r};class qd{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_=oi(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 ab extends ae.EventTarget{constructor(e,i){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new qd,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_=Ei("Content Steering"),this.xhr_=e,this.getBandwidth_=i}assignTagProperties(e,i){this.manifestType_=i.serverUri?"HLS":"DASH";const n=i.serverUri||i.serverURL;if(!n){this.logger_(`steering manifest URL is ${n}, cannot request steering manifest.`),this.trigger("error");return}if(n.startsWith("data:")){this.decodeDataUriManifest_(n.substring(n.indexOf(",")+1));return}this.steeringManifest.reloadUri=oi(e,n),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 n=e?i:this.getRequestURI(i);if(!n){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const s={contentSteeringInfo:{uri:n}};this.trigger({type:"contentsteeringloadstart",metadata:s}),this.request_=this.xhr_({uri:n,requestType:"content-steering-manifest"},(a,o)=>{if(a){if(o.status===410){this.logger_(`manifest request 410 ${a}.`),this.logger_(`There will be no more content steering requests to ${n} this session.`),this.excludedSteeringManifestURLs.add(n);return}if(o.status===429){const d=o.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${d} seconds.`),this.startTTLTimeout_(parseInt(d,10));return}this.logger_(`manifest failed to load ${a}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:s});let l;try{l=JSON.parse(this.request_.responseText)}catch(d){const m={errorType:ae.Error.StreamingContentSteeringParserError,error:d};this.trigger({type:"error",metadata:m})}this.assignSteeringProperties_(l);const c={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:c}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const i=new W.URL(e),n=new W.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(i.toString())),this.setSteeringParams_(n.toString())}decodeDataUriManifest_(e){const i=JSON.parse(W.atob(e));this.assignSteeringProperties_(i)}setSteeringParams_(e){const i=new W.URL(e),n=this.getPathway(),s=this.getBandwidth_();if(n){const a=`_${this.manifestType_}_pathway`;i.searchParams.set(a,n)}if(s){const a=`_${this.manifestType_}_throughput`;i.searchParams.set(a,s)}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 n=(s=>{for(const a of s)if(this.availablePathways_.has(a))return a;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==n&&(this.currentPathway=n,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const i=s=>this.excludedSteeringManifestURLs.has(s);if(this.proxyServerUrl_){const s=this.setProxyServerUrl_(e);if(!i(s))return s}const n=this.setSteeringParams_(e);return i(n)?null:n}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 qd}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&&(oi(e,i.serverURL)!==this.steeringManifest.reloadUri||i.defaultServiceLocation!==this.defaultPathway||i.queryBeforeStart!==this.queryBeforeStart||i.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const ob=(r,e)=>{let i=null;return(...n)=>{clearTimeout(i),i=setTimeout(()=>{r.apply(null,n)},e)}},lb=10;let Qi;const ub=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],cb=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},db=function({currentPlaylist:r,buffered:e,currentTime:i,nextPlaylist:n,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:o,bufferBasedABR:l,log:c}){if(!n)return ae.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${r&&r.id||"null"} -> ${n.id}`;if(!r)return c(`${d} as current playlist is not set`),!0;if(n.id===r.id)return!1;const m=!!Wn(e,i).length;if(!r.endList)return!m&&typeof r.partTargetDuration=="number"?(c(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${d} as current playlist is live`),!0);const g=ou(e,i),x=l?Pt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Pt.MAX_BUFFER_LOW_WATER_LINE;if(o<x)return c(`${d} as duration < max low water line (${o} < ${x})`),!0;const T=n.attributes.BANDWIDTH,E=r.attributes.BANDWIDTH;if(T<E&&(!l||g<a)){let v=`${d} as next bandwidth < current bandwidth (${T} < ${E})`;return l&&(v+=` and forwardBuffer < bufferHighWaterLine (${g} < ${a})`),c(v),!0}if((!l||T>E)&&g>=s){let v=`${d} as forwardBuffer >= bufferLowWaterLine (${g} >= ${s})`;return l&&(v+=` and next bandwidth > current bandwidth (${T} > ${E})`),c(v),!0}return c(`not ${d} as no switching criteria met`),!1};class hb extends ae.EventTarget{constructor(e){super(),this.fastQualityChange_=ob(this.fastQualityChange_.bind(this),100);const{src:i,withCredentials:n,tech:s,bandwidth:a,externVhs:o,useCueTags:l,playlistExclusionDuration:c,enableLowInitialPlaylist:d,sourceType:m,cacheEncryptionKeys:g,bufferBasedABR:x,leastPixelDiffSelector:T,captionServices:E,experimentalUseMMS:v}=e;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:b}=e;(b===null||typeof b>"u")&&(b=1/0),Qi=o,this.bufferBasedABR=!!x,this.leastPixelDiffSelector=!!T,this.withCredentials=n,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=m,this.useCueTags_=l,this.playlistExclusionDuration=c,this.maxPlaylistRetries=b,this.enableLowInitialPlaylist=d,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:b,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=sb(),v&&W.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new W.ManagedMediaSource,this.usingManagedMediaSource_=!0,ae.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_=Rt(),this.hasPlayed_=!1,this.syncController_=new GT(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new XT,this.sourceUpdater_=new Yf(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new WT,this.keyStatusMap_=new Map;const D={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:E,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:a,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:g,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new _l(i,this.vhs_,at(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Yn(i,this.vhs_,at(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Cl(at(D,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Cl(at(D,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new UT(at(D,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(($,F)=>{function H(){s.off("vttjserror",O),$()}function O(){s.off("vttjsloaded",H),F()}s.one("vttjsloaded",H),s.one("vttjserror",O),s.addWebVttScript_()})}),e);const N=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new ab(this.vhs_.xhr,N),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),ub.forEach($=>{this[$+"_"]=cb.bind(this,$)}),this.logger_=Ei("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 w=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(w,()=>{const $=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-$,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,n){const s=this.media(),a=s&&(s.id||s.uri),o=e&&(e.id||e.uri);if(a&&a!==o){this.logger_(`switch media ${a} -> ${o} from ${i}`);const l={renditionInfo:{id:o,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:i};this.trigger({type:"renditionselected",metadata:l}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${i}`})}this.mainPlaylistLoader_.media(e,n)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const i=this.mediaTypes_[e],n=i?i.activeGroup():null,s=this.contentSteeringController_.getPathway();if(n&&s){const o=(n.length?n[0].playlists:n.playlists).filter(l=>l.attributes.serviceLocation===s);o.length&&this.mediaTypes_[e].activePlaylistLoader.media(o[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 n=e.mediaGroups.AUDIO,s=Object.keys(n);let a;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)a=this.mediaTypes_.AUDIO.activeTrack();else{const l=n.main||s.length&&n[s[0]];for(const c in l)if(l[c].default){a={label:c};break}}if(!a)return i;const o=[];for(const l in n)if(n[l][a.label]){const c=n[l][a.label];if(c.playlists&&c.playlists.length)o.push.apply(o,c.playlists);else if(c.uri)o.push(c);else if(e.playlists.length)for(let d=0;d<e.playlists.length;d++){const m=e.playlists[d];m.attributes&&m.attributes.AUDIO&&m.attributes.AUDIO===l&&o.push(m)}}return o.length?o:i}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const i=this.mainPlaylistLoader_.media(),n=i.targetDuration*1.5*1e3;pl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,i.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.mainSegmentLoader_.load()),rb({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 n;if(this.enableLowInitialPlaylist&&(n=this.selectInitialPlaylist()),n||(n=this.selectPlaylist()),!n||!this.shouldSwitchToMedia_(n)||(this.initialMedia_=n,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(),n=i.targetDuration*1.5*1e3;pl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,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,n=>{this.player_.trigger(St({},n))})})}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 n=e.mediaGroups||{};let s=!0;const a=Object.keys(n.AUDIO);for(const o in n.AUDIO)for(const l in n.AUDIO[o])n.AUDIO[o][l].uri||(s=!1);s&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Qi.Playlist.isAes(i)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),a.length&&Object.keys(n.AUDIO[a[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_,n=this.tech_.currentTime(),s=this.bufferLowWaterLine(),a=this.bufferHighWaterLine(),o=this.tech_.buffered();return db({buffered:o,currentTime:n,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:a,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 n=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:n.playlist,error:n})}),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 n=this.audioSegmentLoader_.pendingSegment_;if(!n||!n.segment||!n.segment.syncInfo)return;const s=n.segment.syncInfo.end+.01;this.tech_.setCurrentTime(s)}),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",n=>{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:lb}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const n=this.getCodecsOrExclude_();n&&this.sourceUpdater_.addOrChangeSourceBuffers(n)};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(n=>{this.mainSegmentLoader_.on(n,s=>{this.player_.trigger(St({},s))}),this.audioSegmentLoader_.on(n,s=>{this.player_.trigger(St({},s))}),this.subtitleSegmentLoader_.on(n,s=>{this.player_.trigger(St({},s))})})}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 n=i.end(0);let s=n;if(e.start){const a=e.start.timeOffset;if(a<0){const o=this.mainPlaylistLoader_.main,l=Qi.Playlist.liveEdgeDelay(o,e),c=n+l;s=Math.max(Math.min(c+a,n),i.start(0))}else s=Math.min(n,a)}this.trigger("firstplay"),this.tech_.setCurrentTime(s)}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 n=this.syncController_.getExpiredTime(e,this.duration());if(n===null)return!1;const s=Qi.Playlist.playlistEnd(e,n),a=this.tech_.currentTime(),o=this.tech_.buffered();if(!o.length)return s-a<=Hi;const l=o.end(o.length-1);return l-a<=Hi&&s-l<=Hi}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:i={},playlistExclusionDuration:n}){if(e=e||this.mainPlaylistLoader_.media(),n=n||i.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=i,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,a=s.filter(ja),o=a.length===1&&a[0]===e;if(s.length===1&&n!==1/0)return ae.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(o);if(o){if(this.main().contentSteering){const E=this.pathwayAttribute_(e),v=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(E),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(E)},v);return}let T=!1;s.forEach(E=>{if(E===e)return;const v=E.excludeUntil;typeof v<"u"&&v!==1/0&&(T=!0,delete E.excludeUntil)}),T&&(ae.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let l;e.playlistErrors_>this.maxPlaylistRetries?l=1/0:l=Date.now()+n*1e3,e.excludeUntil=l,i.reason&&(e.lastExcludeReason_=i.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const c=this.selectPlaylist();if(!c){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const d=i.internal?this.logger_:ae.log.warn,m=i.message?" "+i.message:"";d(`${i.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${m} Switching to playlist ${c.id}.`),c.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),c.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const g=c.targetDuration/2*1e3||5*1e3,x=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=g;return this.switchMedia_(c,"exclude",o||x)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,i){const n=[],s=e==="all";(s||e==="main")&&n.push(this.mainPlaylistLoader_);const a=[];(s||e==="audio")&&a.push("AUDIO"),(s||e==="subtitle")&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(o=>{const l=this.mediaTypes_[o]&&this.mediaTypes_[o].activePlaylistLoader;l&&n.push(l)}),["main","audio","subtitle"].forEach(o=>{const l=this[`${o}SegmentLoader_`];l&&(e===o||e==="all")&&n.push(l)}),n.forEach(o=>i.forEach(l=>{typeof o[l]=="function"&&o[l]()}))}setCurrentTime(e){const i=Wn(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:Qi.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,i){const n=e.media();if(!n)return null;const s=this.syncController_.getMediaSequenceSync(i);if(s&&s.isReliable){const l=s.start,c=s.end;if(!isFinite(l)||!isFinite(c))return null;const d=Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n),m=Math.max(l,c-d);return Rt([[l,m]])}const a=this.syncController_.getExpiredTime(n,this.duration());if(a===null)return null;const o=Qi.Playlist.seekable(n,a,Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return o.length?o:null}computeFinalSeekable_(e,i){if(!i)return e;const n=e.start(0),s=e.end(0),a=i.start(0),o=i.end(0);return a>s||n>o?e:Rt([[Math.max(n,a),Math.min(s,o)]])}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 n=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,i),!this.seekable_||n&&n.length&&this.seekable_.length&&n.start(0)===this.seekable_.start(0)&&n.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${of(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:s}),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 s=this.seekable();if(!s.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<s.end(s.length-1))&&this.sourceUpdater_.setDuration(s.end(s.length-1));return}const i=this.tech_.buffered();let n=Qi.Playlist.duration(this.mainPlaylistLoader_.media());i.length>0&&(n=Math.max(n,i.end(i.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}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 n in i)i[n].forEach(s=>{s.playlistLoader&&s.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_(),n=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!i||!n)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},i=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const n=es(this.main(),i),s={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=n.video||e.main.videoCodec||ev),e.main.isMuxed&&(s.video+=`,${n.audio||e.main.audioCodec||Bc}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(s.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||Bc,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video){this.excludePlaylist({playlistToExclude:i,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const o=(d,m)=>d?Xr(m,this.usingManagedMediaSource_):wo(m),l={};let c;if(["video","audio"].forEach(function(d){if(s.hasOwnProperty(d)&&!o(e[d].isFmp4,s[d])){const m=e[d].isFmp4?"browser":"muxer";l[m]=l[m]||[],l[m].push(s[d]),d==="audio"&&(c=m)}}),a&&c&&i.attributes.AUDIO){const d=i.attributes.AUDIO;this.main().playlists.forEach(m=>{(m.attributes&&m.attributes.AUDIO)===d&&m!==i&&(m.excludeUntil=1/0)}),this.logger_(`excluding audio group ${d} as ${c} does not support codec(s): "${s.audio}"`)}if(Object.keys(l).length){const d=Object.keys(l).reduce((m,g)=>(m&&(m+=", "),m+=`${g} does not support codec(s): "${l[g].join(",")}"`,m),"")+".";this.excludePlaylist({playlistToExclude:i,error:{internal:!0,message:d},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const d=[];if(["video","audio"].forEach(m=>{const g=(Fi(this.sourceUpdater_.codecs[m]||"")[0]||{}).type,x=(Fi(s[m]||"")[0]||{}).type;g&&x&&g.toLowerCase()!==x.toLowerCase()&&d.push(`"${this.sourceUpdater_.codecs[m]}" -> "${s[m]}"`)}),d.length){this.excludePlaylist({playlistToExclude:i,error:{message:`Codec switching not supported: ${d.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return s}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(n=>{const s=e[n];if(i.indexOf(s.id)!==-1)return;i.push(s.id);const a=es(this.main,s),o=[];a.audio&&!wo(a.audio)&&!Xr(a.audio,this.usingManagedMediaSource_)&&o.push(`audio codec ${a.audio}`),a.video&&!wo(a.video)&&!Xr(a.video,this.usingManagedMediaSource_)&&o.push(`video codec ${a.video}`),a.text&&a.text==="stpp.ttml.im1t"&&o.push(`text codec ${a.text}`),o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${o.join(", ")}`))})}excludeIncompatibleVariants_(e){const i=[],n=this.main().playlists,s=as(Fi(e)),a=kd(s),o=s.video&&Fi(s.video)[0]||null,l=s.audio&&Fi(s.audio)[0]||null;Object.keys(n).forEach(c=>{const d=n[c];if(i.indexOf(d.id)!==-1||d.excludeUntil===1/0)return;i.push(d.id);const m=[],g=es(this.mainPlaylistLoader_.main,d),x=kd(g);if(!(!g.audio&&!g.video)){if(x!==a&&m.push(`codec count "${x}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const T=g.video&&Fi(g.video)[0]||null,E=g.audio&&Fi(g.audio)[0]||null;T&&o&&T.type.toLowerCase()!==o.type.toLowerCase()&&m.push(`video codec "${T.type}" !== "${o.type}"`),E&&l&&E.type.toLowerCase()!==l.type.toLowerCase()&&m.push(`audio codec "${E.type}" !== "${l.type}"`)}m.length&&(d.excludeUntil=1/0,this.logger_(`excluding ${d.id}: ${m.join(" && ")}`))}})}updateAdCues_(e){let i=0;const n=this.seekable();n.length&&(i=n.start(0)),HT(e,this.cueTagsTrack_,i)}goalBufferLength(){const e=this.tech_.currentTime(),i=Pt.GOAL_BUFFER_LENGTH,n=Pt.GOAL_BUFFER_LENGTH_RATE,s=Math.max(i,Pt.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*n,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),i=Pt.BUFFER_LOW_WATER_LINE,n=Pt.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(i,Pt.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(i,Pt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*n,this.bufferBasedABR?a:s)}bufferHighWaterLine(){return Pt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Ld(this.inbandTextTracks_,"com.apple.streaming",this.tech_),CT({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,i,n){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Ld(this.inbandTextTracks_,e,this.tech_),_T({inbandTextTracks:this.inbandTextTracks_,metadataArray:i,timestampOffset:s,videoDuration:n})}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,n=>{this.trigger(St({},n))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const i=this.main();(this.contentSteeringController_.didDASHTagChange(i.uri,i.contentSteering)||(()=>{const a=this.contentSteeringController_.getAvailablePathways(),o=[];for(const l of i.playlists){const c=l.attributes.serviceLocation;if(c&&(o.push(c),!a.has(c)))return!0}return!!(!o.length&&a.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const n=this.main().playlists,s=new Set;let a=!1;Object.keys(n).forEach(o=>{const l=n[o],c=this.pathwayAttribute_(l),d=c&&e!==c;l.excludeUntil===1/0&&l.lastExcludeReason_==="content-steering"&&!d&&(delete l.excludeUntil,delete l.lastExcludeReason_,a=!0);const g=!l.excludeUntil&&l.excludeUntil!==1/0;!s.has(l.id)&&d&&g&&(s.add(l.id),l.excludeUntil=1/0,l.lastExcludeReason_="content-steering",this.logger_(`excluding ${l.id} for ${l.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(o=>{const l=this.mediaTypes_[o];if(l.activePlaylistLoader){const c=l.activePlaylistLoader.media_;c&&c.attributes.serviceLocation!==e&&(a=!0)}}),a&&this.changeSegmentPathway_()}handlePathwayClones_(){const i=this.main().playlists,n=this.contentSteeringController_.currentPathwayClones,s=this.contentSteeringController_.nextPathwayClones;if(n&&n.size||s&&s.size){for(const[o,l]of n.entries())s.get(o)||(this.mainPlaylistLoader_.updateOrDeleteClone(l),this.contentSteeringController_.excludePathway(o));for(const[o,l]of s.entries()){const c=n.get(o);if(!c){i.filter(m=>m.attributes["PATHWAY-ID"]===l["BASE-ID"]).forEach(m=>{this.mainPlaylistLoader_.addClonePathway(l,m)}),this.contentSteeringController_.addAvailablePathway(o);continue}this.equalPathwayClones_(c,l)||(this.mainPlaylistLoader_.updateOrDeleteClone(l,!0),this.contentSteeringController_.addAvailablePathway(o))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...s])))}}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 n=e["URI-REPLACEMENT"].PARAMS,s=i["URI-REPLACEMENT"].PARAMS;for(const a in n)if(n[a]!==s[a])return!1;for(const a in s)if(n[a]!==s[a])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(n=>{const s=this.mainPlaylistLoader_.getKeyIdSet(n);!s||!s.size||s.forEach(a=>{const o="usable",l=this.keyStatusMap_.has(a)&&this.keyStatusMap_.get(a)===o,c=n.lastExcludeReason_===i&&n.excludeUntil===1/0;l?l&&c&&(delete n.excludeUntil,delete n.lastExcludeReason_,this.logger_(`enabling playlist ${n.id} because key ID ${a} is ${o}`)):(n.excludeUntil!==1/0&&n.lastExcludeReason_!==i&&(n.excludeUntil=1/0,n.lastExcludeReason_=i,this.logger_(`excluding playlist ${n.id} because the key ID ${a} doesn't exist in the keyStatusMap or is not ${o}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(n=>{const s=n&&n.attributes&&n.attributes.RESOLUTION&&n.attributes.RESOLUTION.height<720,a=n.excludeUntil===1/0&&n.lastExcludeReason_===i;s&&a&&(delete n.excludeUntil,ae.log.warn(`enabling non-HD playlist ${n.id} because all playlists were excluded due to ${i} key IDs`))})}addKeyStatus_(e,i){const a=(typeof e=="string"?e:FT(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${i}' with key ID ${a} added to the keyStatusMap`),this.keyStatusMap_.set(a,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 fb=(r,e,i)=>n=>{const s=r.main.playlists[e],a=uu(s),o=ja(s);if(typeof n>"u")return o;n?delete s.disabled:s.disabled=!0;const l={renditionInfo:{id:e,bandwidth:s.attributes.BANDWIDTH,resolution:s.attributes.RESOLUTION,codecs:s.attributes.CODECS},cause:"fast-quality"};return n!==o&&!a&&(n?(i(s),r.trigger({type:"renditionenabled",metadata:l})):r.trigger({type:"renditiondisabled",metadata:l})),n};class pb{constructor(e,i,n){const{playlistController_:s}=e,a=s.fastQualityChange_.bind(s);if(i.attributes){const o=i.attributes.RESOLUTION;this.width=o&&o.width,this.height=o&&o.height,this.bandwidth=i.attributes.BANDWIDTH,this.frameRate=i.attributes["FRAME-RATE"]}this.codecs=es(s.main(),i),this.playlist=i,this.id=n,this.enabled=fb(e.playlists,i.id,a)}}const mb=function(r){r.representations=()=>{const e=r.playlistController_.main(),i=hs(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return i?i.filter(n=>!uu(n)).map((n,s)=>new pb(r,n,n.id)):[]}},jd=["seeking","seeked","pause","playing","error"];class gb extends ae.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_=Ei("PlaybackWatcher"),this.logger_("initialize");const i=()=>this.monitorCurrentTime_(),n=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),a=()=>this.resetTimeUpdate_(),o=this.playlistController_,l=["main","subtitle","audio"],c={};l.forEach(m=>{c[m]={reset:()=>this.resetSegmentDownloads_(m),updateend:()=>this.checkSegmentDownloads_(m)},o[`${m}SegmentLoader_`].on("appendsdone",c[m].updateend),o[`${m}SegmentLoader_`].on("playlistupdate",c[m].reset),this.tech_.on(["seeked","seeking"],c[m].reset)});const d=m=>{["main","audio"].forEach(g=>{o[`${g}SegmentLoader_`][m]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(jd,a),this.tech_.on("canplay",n),this.tech_.one("play",i),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(jd,a),this.tech_.off("canplay",n),this.tech_.off("play",i),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),l.forEach(m=>{o[`${m}SegmentLoader_`].off("appendsdone",c[m].updateend),o[`${m}SegmentLoader_`].off("playlistupdate",c[m].reset),this.tech_.off(["seeked","seeking"],c[m].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_,n=i[`${e}SegmentLoader_`],s=n.buffered_(),a=t3(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,a){const o={bufferedRanges:s};i.trigger({type:"bufferedrangeschanged",metadata:o}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:n.playlist_&&n.playlist_.id,buffered:Nn(s)}),!(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+Hi>=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(Rt([this.lastRecordedTime,e]));const n={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:n}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const i=this.seekable(),n=this.tech_.currentTime(),s=this.afterSeekableWindow_(i,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let a;if(s&&(a=i.end(i.length-1)),this.beforeSeekableWindow_(i,n)){const E=i.start(0);a=E+(E===i.end(0)?0:Hi)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${n} with seekable range ${of(i)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const o=this.playlistController_.sourceUpdater_,l=this.tech_.buffered(),c=o.audioBuffer?o.audioBuffered():null,d=o.videoBuffer?o.videoBuffered():null,m=this.media(),g=m.partTargetDuration?m.partTargetDuration:(m.targetDuration-zi)*2,x=[c,d];for(let E=0;E<x.length;E++){if(!x[E])continue;if(ou(x[E],n)<g)return!1}const T=$s(l,n);return T.length===0?!1:(a=T.start(0)+Hi,this.logger_(`Buffered region starts (${T.start(0)}) just beyond seek point (${n}). Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),i=this.tech_.buffered(),n=Wn(i,e);if(n.length&&e+3<=n.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${n.start(0)} -> ${n.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 l=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${i}. Seeking to live point (seekable end) ${l}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(l),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const n=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:i}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const o=$s(s,i);return o.length>0?(this.logger_(`Stopped at ${i} and seeking to ${o.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(i),!0):!1}afterSeekableWindow_(e,i,n,s=!1){if(!e.length)return!1;let a=e.end(e.length-1)+Hi;const o=!n.endList,l=typeof n.partTargetDuration=="number";return o&&(l||s)&&(a=e.end(e.length-1)+n.targetDuration*3),i>a}beforeSeekableWindow_(e,i){return!!(e.length&&e.start(0)>0&&i<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:i,currentTime:n}){if(!e)return;let s;if(e.length&&i.length){const a=Wn(e,n-3),o=Wn(e,n),l=Wn(i,n);l.length&&!o.length&&a.length&&(s={start:a.end(0),end:l.end(0)})}else $s(e,n).length||(s=this.gapFromVideoUnderflow_(e,n));return s?(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${n}`),!0):!1}skipTheGap_(e){const i=this.tech_.buffered(),n=this.tech_.currentTime(),s=$s(i,n);if(this.resetTimeUpdate_(),s.length===0||n!==e)return;this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",s.start(0)),this.tech_.setCurrentTime(s.start(0)+zi);const a={gapInfo:{from:n,to:s.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:a}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,i){const n=Z_(e);for(let s=0;s<n.length;s++){const a=n.start(s),o=n.end(s);if(i-a<4&&i-a>2)return{start:a,end:o}}return null}}const vb={errorInterval:30,getSource(r){const i=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(i)}},Zf=function(r,e){let i=0,n=0;const s=at(vb,e);r.ready(()=>{r.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){n&&r.currentTime(n)},o=function(m){m!=null&&(n=r.duration()!==1/0&&r.currentTime()||0,r.one("loadedmetadata",a),r.src(m),r.trigger({type:"usage",name:"vhs-error-reload"}),r.play())},l=function(){if(Date.now()-i<s.errorInterval*1e3){r.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!s.getSource||typeof s.getSource!="function"){ae.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return i=Date.now(),s.getSource.call(r,o)},c=function(){r.off("loadedmetadata",a),r.off("error",l),r.off("dispose",c)},d=function(m){c(),Zf(r,m)};r.on("error",l),r.on("dispose",c),r.reloadSourceOnError=d},yb=function(r){Zf(this,r)};var Jf="3.17.3",_b="7.1.0",Tb="1.3.1",bb="7.2.0",Cb="4.0.2";const yt={PlaylistLoader:Yn,Playlist:li,utils:w3,STANDARD_PLAYLIST_SELECTOR:Bd,INITIAL_PLAYLIST_SELECTOR:pT,lastBandwidthSelector:Bd,movingAverageBandwidthSelector:hT,comparePlaylistBandwidth:hu,comparePlaylistResolution:dT,xhr:kf()};Object.keys(Pt).forEach(r=>{Object.defineProperty(yt,r,{get(){return ae.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Pt[r]},set(e){if(ae.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){ae.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Pt[r]=e}})});const ep="videojs-vhs",tp=function(r,e){const i=e.media();let n=-1;for(let s=0;s<r.length;s++)if(r[s].id===i.id){n=s;break}r.selectedIndex_=n,r.trigger({selectedIndex:n,type:"change"})},xb=function(r,e){e.representations().forEach(i=>{r.addQualityLevel(i)}),tp(r,e.playlists)};yt.canPlaySource=function(){return ae.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const Sb=(r,e,i)=>{if(!r)return r;let n={};e&&e.attributes&&e.attributes.CODECS&&(n=as(Fi(e.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(n.audio=i.attributes.CODECS);const s=rr(n.video),a=rr(n.audio),o={};for(const l in r)o[l]={},a&&(o[l].audioContentType=a),s&&(o[l].videoContentType=s),e.contentProtection&&e.contentProtection[l]&&e.contentProtection[l].pssh&&(o[l].pssh=e.contentProtection[l].pssh),typeof r[l]=="string"&&(o[l].url=r[l]);return at(r,o)},Eb=(r,e)=>r.reduce((i,n)=>{if(!n.contentProtection)return i;const s=e.reduce((a,o)=>{const l=n.contentProtection[o];return l&&l.pssh&&(a[o]={pssh:l.pssh}),a},{});return Object.keys(s).length&&i.push(s),i},[]),kb=({player:r,sourceKeySystems:e,audioMedia:i,mainPlaylists:n})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const s=i?n.concat([i]):n,a=Eb(s,Object.keys(e)),o=[],l=[];return a.forEach(c=>{l.push(new Promise((d,m)=>{r.tech_.one("keysessioncreated",d)})),o.push(new Promise((d,m)=>{r.eme.initializeMediaKeys({keySystems:c},g=>{if(g){m(g);return}d()})}))}),Promise.race([Promise.all(o),Promise.race(l)])},wb=({player:r,sourceKeySystems:e,media:i,audioMedia:n})=>{const s=Sb(e,i,n);return s?(r.currentSource().keySystems=s,s&&!r.eme?(ae.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},ip=()=>{if(!W.localStorage)return null;const r=W.localStorage.getItem(ep);if(!r)return null;try{return JSON.parse(r)}catch{return null}},Db=r=>{if(!W.localStorage)return!1;let e=ip();e=e?at(e,r):r;try{W.localStorage.setItem(ep,JSON.stringify(e))}catch{return!1}return e},Ab=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,np=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},rp=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},sp=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},ap=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};yt.supportsNativeHls=(function(){if(!Te||!Te.createElement)return!1;const r=Te.createElement("video");return ae.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(r.canPlayType(i))}):!1})();yt.supportsNativeDash=(function(){return!Te||!Te.createElement||!ae.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(Te.createElement("video").canPlayType("application/dash+xml"))})();yt.supportsTypeNatively=r=>r==="hls"?yt.supportsNativeHls:r==="dash"?yt.supportsNativeDash:!1;yt.isSupported=function(){return ae.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};yt.xhr.onRequest=function(r){np(yt.xhr,r)};yt.xhr.onResponse=function(r){rp(yt.xhr,r)};yt.xhr.offRequest=function(r){sp(yt.xhr,r)};yt.xhr.offResponse=function(r){ap(yt.xhr,r)};const Ib=ae.getComponent("Component");class op extends Ib{constructor(e,i,n){if(super(i,n.vhs),typeof n.initialBandwidth=="number"&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=Ei("VhsHandler"),i.options_&&i.options_.playerId){const s=ae.getPlayer(i.options_.playerId);this.player_=s}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(Te,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=>{const a=Te.fullscreenElement||Te.webkitFullscreenElement||Te.mozFullScreenElement||Te.msFullscreenElement;a&&a.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_=at(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 n=ip();n&&n.bandwidth&&(this.options_.bandwidth=n.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),n&&n.throughput&&(this.options_.throughput=n.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Pt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Pt.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(n=>{typeof this.source_[n]<"u"&&(this.options_[n]=this.source_[n])}),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=Ab(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=yt,this.options_.sourceType=wh(i),this.options_.seekTo=a=>{this.tech_.setCurrentTime(a)},this.options_.player_=this.player_,this.playlistController_=new hb(this.options_);const n=at({liveRangeSafeTimeDelta:Hi},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new gb(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=ae.players[this.tech_.options_.playerId];let o=this.playlistController_.error;typeof o=="object"&&!o.code?o.code=3:typeof o=="string"&&(o={message:o,code:3}),a.error(o)});const s=this.options_.bufferBasedABR?yt.movingAverageBandwidthSelector(.55):yt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=yt.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(a){this.playlistController_.selectPlaylist=a.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(a){this.playlistController_.mainSegmentLoader_.throughput.rate=a,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let a=this.playlistController_.mainSegmentLoader_.bandwidth;const o=W.navigator.connection||W.navigator.mozConnection||W.navigator.webkitConnection,l=1e7;if(this.options_.useNetworkInformationApi&&o){const c=o.downlink*1e3*1e3;c>=l&&a>=l?a=Math.max(a,c):a=c}return a},set(a){this.playlistController_.mainSegmentLoader_.bandwidth=a,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const a=1/(this.bandwidth||1);let o;return this.throughput>0?o=1/this.throughput:o=0,Math.floor(1/(a+o))},set(){ae.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:()=>Nn(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:()=>Nn(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&&Db({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{mb(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),(ae.browser.IS_ANY_SAFARI||ae.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"),kb({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=wb({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",n=>{this.playlistController_.updatePlaylistByKeyStatus(n.keyId,n.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=ae.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{xb(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{tp(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Jf,"mux.js":_b,"mpd-parser":Tb,"m3u8-parser":bb,"aes-decrypter":Cb}}version(){return this.constructor.version()}canChangeType(){return Yf.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 L3({playlist:this.playlistController_.media(),time:e,callback:i})}seekToProgramTime(e,i,n=!0,s=2){return Nf({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})}setupXhrHooks_(){this.xhr.onRequest=e=>{np(this.xhr,e)},this.xhr.onResponse=e=>{rp(this.xhr,e)},this.xhr.offRequest=e=>{sp(this.xhr,e)},this.xhr.offResponse=e=>{ap(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],i=["gapjumped","playedrangeschanged"];e.forEach(n=>{this.playlistController_.on(n,s=>{this.player_.trigger(St({},s))})}),i.forEach(n=>{this.playbackWatcher_.on(n,s=>{this.player_.trigger(St({},s))})})}}const Ta={name:"videojs-http-streaming",VERSION:Jf,canHandleSource(r,e={}){const i=at(ae.options,e);return!i.vhs.experimentalUseMMS&&!Xr("avc1.4d400d,mp4a.40.2",!1)?!1:Ta.canPlayType(r.type,i)},handleSource(r,e,i={}){const n=at(ae.options,i);return e.vhs=new op(r,e,n),e.vhs.xhr=kf(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const i=wh(r);if(!i)return"";const n=Ta.getOverrideNative(e);return!yt.supportsTypeNatively(i)||n?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,i=!(ae.browser.IS_ANY_SAFARI||ae.browser.IS_IOS),{overrideNative:n=i}=e;return n}},Nb=()=>Xr("avc1.4d400d,mp4a.40.2",!0);Nb()&&ae.getTech("Html5").registerSourceHandler(Ta,0);ae.VhsHandler=op;ae.VhsSourceHandler=Ta;ae.Vhs=yt;ae.use||ae.registerComponent("Vhs",yt);ae.options.vhs=ae.options.vhs||{};(!ae.getPlugin||!ae.getPlugin("reloadSourceOnError"))&&ae.registerPlugin("reloadSourceOnError",yb);const Ob="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4AQMAAADSHVMAAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAASYSURBVHic7c8BDQAgDMAw7t80Lk5SVgXbnM/M64BtDesa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNay7Fz0EOVPDeGwAAAAASUVORK5CYII=",Bb={class:"o-meeting-playback-video"},Lb={key:0,class:"poster-title"},Pb=t.defineComponent({__name:"OMeetingPlaybackVideo",props:{src:{default:""},vtt:{default:""},captions:{default:()=>[]},poster:{},posterTitle:{},instance:{},trackIdx:{}},emits:["getDuration","getInstance","setTrackIdx"],setup(r,{expose:e,emit:i}){const n=r,s=t.ref(),a=t.ref(),o=t.ref(),l=i,c=t.ref(!1),d=()=>{c.value=!1},m=(v,b=!1)=>{var w,$;const D=n.instance;if(!D)return;const N=(w=v.activeCues)==null?void 0:w[0];if(s.value&&clearInterval(s.value),N){N.text=(($=N==null?void 0:N.text)==null?void 0:$.replace(/\[(SPEAKER_)\d+]: /g,""))||"";const F=N.text.split(`
|
|
224
|
+
`),H=F.length,O=N.endTime-N.startTime,U=parseFloat((O/H).toFixed(3));let C=0;if(b){const z=(D.currentTime()-N.startTime)/(N.endTime-N.startTime);for(;(C+1)/H<z;)C++}C<H?N.text=F.length?F[C]:N==null?void 0:N.text:N.text=F.length?F[0]:N==null?void 0:N.text;let k=U*1e3;const P=()=>{s.value=setInterval(()=>{v.mode="hidden",C++,C>F.length-1?clearInterval(s.value):C===F.length-1?(N.text=F[C],clearInterval(s.value),k=U*(H-C)*1e3,P()):N.text=F[C],v.mode="showing"},k)};P()}},g=t.ref([]);t.watch(()=>g.value,v=>{const b=n.instance;if(b){const D=b.textTracks();for(let N=0;N<D.length;N++)D[N].kind==="subtitles"&&(m(D[N],!0),D[N].mode=v.length?"showing":"hidden")}},{deep:!0});const x=t.ref(!1),T=t.ref("init"),E=async()=>{if(!n.src)return;const v=ae("playerId",{controls:!0,autoplay:!1,preload:"auto",fluid:!0,poster:n.poster||Ob,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}}});l("getInstance",v),v.src(n.src),v.addRemoteTextTrack({kind:"subtitles",src:n.vtt,srclang:"zh",label:"中文",default:!1}),x.value=!0;class b extends ae.getComponent("Button"){constructor(w,$){super(w,$),this.addClass("vjs-subtitle-toggle-button","vjs-subtitle-hidden"),this.controlText("Toggle Subtitles")}buildCSSClass(){return`vjs-subtitle-toggle-button ${super.buildCSSClass()}`}handleClick(){const w=this.player().textTracks();for(let $=0;$<w.length;$++)w[$].kind==="subtitles"&&(m(w[$],!0),w[$].mode=w[$].mode==="showing"?"hidden":"showing",w[$].mode==="showing"?(this.removeClass("vjs-subtitle-hidden"),this.addClass("vjs-subtitle-showing")):(this.removeClass("vjs-subtitle-showing"),this.addClass("vjs-subtitle-hidden")))}}n.vtt&&(ae.registerComponent("SubtitleToggleButton",b),v.controlBar.children_.some(N=>N.name_==="SubtitleToggleButton")||v.controlBar.addChild("SubtitleToggleButton",{},8)),(v==null?void 0:v.textTracks().tracks_).forEach(N=>{N==null||N.addEventListener("cuechange",()=>{m(N)})}),v.on("play",()=>{T.value="playing"}),v.on("timeupdate",()=>{const N=v.currentTime()||0,w=n.captions.findIndex($=>Qo($.start_time)>N);l("setTrackIdx",w)}),v.one("loadedmetadata",()=>{l("getDuration",v.duration())}),t.nextTick(()=>{const N=document.getElementsByClassName("o-meeting-playback-video")[0];a.value=N.offsetHeight}),o.value=v};return t.onMounted(()=>{E(),document.addEventListener("click",d)}),t.watch(()=>n.src,()=>{E()}),t.onUnmounted(()=>{var v;(v=n==null?void 0:n.instance)==null||v.dispose(),document.removeEventListener("click",d)}),e({changeTime:v=>{var b;(b=o.value)==null||b.currentTime(v)}}),(v,b)=>(t.openBlock(),t.createElementBlock("div",Bb,[t.createElementVNode("div",{class:t.normalizeClass(["video-placeholder",{loaded:x.value,"no-poster":!r.poster,[T.value]:!0}])},[b[0]||(b[0]=t.createElementVNode("video",{class:"video-js",id:"playerId"},null,-1)),r.posterTitle?(t.openBlock(),t.createElementBlock("div",Lb,t.toDisplayString(r.posterTitle),1)):t.createCommentVNode("",!0)],2)]))}}),Mb={class:"o-meeting-playback"},Rb={class:"video-header"},Vb={class:"video-title"},Fb={class:"video-content"},$b={class:"info-wrapper"},Ub={key:0,class:"base-info"},zb={class:"info-item"},Hb={class:"info-item"},qb={class:"info-item"},jb={class:"info-item"},Gb={key:1,class:"subject-list"},Wb={class:"subject-title"},Yb={key:0,class:"subject-progress"},Xb=["data-start","data-end"],Gd=t.defineComponent({__name:"OMeetingPlayback",props:{dates:{default:()=>[]},detail:{default:()=>({})},data:{default:()=>({})}},emits:["change-date"],setup(r,{emit:e}){const i=r,n=e,{t:s}=je.useI18n(),a=t.ref(null),o=q=>{a.value=q},l=t.ref(0),c=q=>{l.value=q},d=t.ref([]),m=async q=>{const J=await(await fetch(q)).json();d.value=(J.segments||[]).map(se=>{const Q=e1(se.speaker);return{...se,contentHtml:se.content,speakerIdx:Q,speakerLabel:`${s("meeting.speaker")}${Q}`}})},g=t.ref([]),x=q=>rg[q%3],T=t.ref(0),E=q=>{T.value=q},v=t.ref(),b=t.ref(""),D=t.ref([0,0]);function N(q,j){const J=j.getBoundingClientRect(),Q=(q.clientX-J.left)/J.width;return D.value[1]=`${j.offsetTop+j.parentElement.offsetTop}px`,D.value[0]=`${Q*100}%`,Q*T.value}const w=q=>{let j=q;for(;j&&j.className!=="subject-progress";)j=j.parentElement;return j},$=q=>{let j=w(q.target);j&&(b.value=t1(N(q,j)))},F=()=>{b.value=""},H=q=>{var J;let j=w(q.target);j&&((J=v.value)==null||J.changeTime(N(q,j)))},O=async q=>{const J=await(await fetch(q)).json();g.value=(J||[]).map(se=>({...se,startTimeNumber:Qo(se.startTime),endTimeNumber:Qo(se.endTime)}))},U=t.ref("info"),C=t.computed(()=>{const q=[{label:s("meeting.baseInfo"),value:"info"}];return g.value.length&&q.push({label:s("meeting.subject"),value:"subject"}),q}),k=()=>{i.data&&(i.data.textJson&&m(i.data.textJson),i.data.topicJson&&O(i.data.topicJson))};t.watchEffect(()=>{k()});const P=q=>{n("change-date",q)},z=t.ref(null),B=t.ref("auto");let R=null,V=null;const te=()=>{z.value&&(B.value=`${z.value.offsetHeight}px`)},ee=()=>{cancelAnimationFrame(V),V=requestAnimationFrame(te)};return t.onMounted(()=>{z.value&&(R=new ResizeObserver(ee),R.observe(z.value),te())}),t.onUnmounted(()=>{cancelAnimationFrame(V),R==null||R.disconnect()}),(q,j)=>{var J,se,Q,ie;return t.openBlock(),t.createElementBlock("div",Mb,[t.createElementVNode("div",{class:"left-card card-wrapper",ref_key:"leftRef",ref:z},[t.createElementVNode("div",Rb,[t.createElementVNode("div",Vb,t.toDisplayString((J=r.detail)==null?void 0:J.topic)+"("+t.toDisplayString((se=r.detail)==null?void 0:se.date)+")",1),(Q=r.dates)!=null&&Q.length?(t.openBlock(),t.createBlock(t.unref(I.OSelect),{key:0,size:"large",clearable:!1,"model-value":(ie=r.detail)==null?void 0:ie.date,placeholder:t.unref(s)("meeting.selectDate"),onChange:P},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.dates,K=>(t.openBlock(),t.createBlock(t.unref(I.OOption),{key:K,value:K,label:K},null,8,["value","label"]))),128))]),_:1},8,["model-value","placeholder"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",Fb,[r.data?(t.openBlock(),t.createBlock(Pb,{key:0,ref_key:"playerRef",ref:v,src:r.data.video,vtt:r.data.textVtt,poster:r.data.poster,captions:d.value,onGetDuration:E,instance:a.value,onGetInstance:o,trackIdx:l.value,onSetTrackIdx:c},null,8,["src","vtt","poster","captions","instance","trackIdx"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",$b,[t.createVNode(t.unref(I.OTab),{modelValue:U.value,"onUpdate:modelValue":j[0]||(j[0]=K=>U.value=K),"max-show":9999},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,K=>(t.openBlock(),t.createBlock(t.unref(I.OTabPane),{key:K.value,value:K.value,label:K.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]),t.createVNode(t.unref(I.OScroller),{class:t.normalizeClass(["tab-content",`tab-content-${U.value}`]),"show-type":"hover"},{default:t.withCtx(()=>{var K;return[U.value===C.value[0].value?(t.openBlock(),t.createElementBlock("div",Ub,[t.createElementVNode("div",zb,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item1")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.sponsor),1)]),t.createElementVNode("div",Hb,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item2")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.groupName),1)]),t.createElementVNode("div",qb,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item3")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.date)+" "+t.toDisplayString(r.detail.start)+"~"+t.toDisplayString(r.detail.end),1)]),t.createElementVNode("div",jb,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item4")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.agenda||"-"),1)])])):t.createCommentVNode("",!0),U.value===((K=C.value[1])==null?void 0:K.value)?(t.openBlock(),t.createElementBlock("div",Gb,[b.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mouse-current-time",style:t.normalizeStyle({top:D.value[1],left:D.value[0]})},t.toDisplayString(b.value),5)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(Z,oe)=>(t.openBlock(),t.createElementBlock("div",{class:"subject-item",key:Z.title},[t.createElementVNode("div",Wb,t.toDisplayString(Z.title),1),T.value?(t.openBlock(),t.createElementBlock("div",Yb,[t.createElementVNode("div",{class:"subject-progress-item",onClick:H,onMousemove:$,onMouseleave:F,"data-start":Z.startTime,"data-end":Z.endTime,style:t.normalizeStyle({"--start":(Z.startTimeNumber<0?0:Z.startTimeNumber)/T.value,"--end":(Z.endTimeNumber>T.value?T.value:Z.endTimeNumber)/T.value,background:x(oe)})},null,44,Xb)])):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0)]}),_:1},8,["class"])])],512),t.createElementVNode("div",{class:"right-card card-wrapper",style:t.normalizeStyle({height:B.value})},[t.createVNode(k2,{captions:d.value,trackIdx:l.value,instance:a.value},{empty:t.withCtx(()=>[t.renderSlot(q.$slots,"empty")]),_:3},8,["captions","trackIdx","instance"])],4)])}}}),Kb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Qb(r,e){return t.openBlock(),t.createElementBlock("svg",Kb,[...e[0]||(e[0]=[t.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 Zb={name:"components-icon-tips",render:Qb},Jb={class:"o-sig-meeting-aside"},e4={class:"month"},t4={class:"days"},i4=["onClick"],n4={class:"day-d"},r4={class:"day-c"},s4={class:"arrow-wrapper"},Hs=1,a4=t.defineComponent({__name:"OMeetingSigAside",props:{data:{},current:{},total:{},active:{},meetingDates:{},eventsDates:{}},emits:["click-date","change-month"],setup(r,{emit:e}){const{getConfig:i}=Tn(),n=r,s=e,a=l=>{s("click-date",l)},o=l=>{n.current+l>=n.total||n.current+l<0||s("change-month",l)};return(l,c)=>(t.openBlock(),t.createElementBlock("div",Jb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.data,(d,m)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d,g=>(t.openBlock(),t.createElementBlock("div",{key:g.month,class:"month-item"},[t.createElementVNode("div",e4,t.toDisplayString(g.month.replace(/-/g,"/")),1),t.createElementVNode("div",t4,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.days,x=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["day-item",r.active===`${g.month}-${x}`&&"active"]),key:x,onClick:T=>a(`${g.month}-${x}`)},[t.createElementVNode("div",n4,t.toDisplayString(x),1),t.createElementVNode("div",r4,[r.meetingDates.includes(`${g.month}-${x}`)?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0,style:t.normalizeStyle({zIndex:t.unref(i)(t.unref(Be).MEETING,"zIndex"),backgroundColor:t.unref(i)(t.unref(Be).MEETING,"color")})},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(i)(t.unref(Be).MEETING,"icon"))))]),_:1},8,["style"])):t.createCommentVNode("",!0),r.eventsDates.includes(`${g.month}-${x}`)?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:1,style:t.normalizeStyle({zIndex:t.unref(i)(t.unref(Be).EVENTS,"zIndex"),backgroundColor:t.unref(i)(t.unref(Be).EVENTS,"color")})},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(i)(t.unref(Be).EVENTS,"icon"))))]),_:1},8,["style"])):t.createCommentVNode("",!0)])],10,i4))),128))])]))),128))],64))),128)),t.createElementVNode("div",s4,[t.createVNode(t.unref(I.OIcon),{onClick:c[0]||(c[0]=d=>o(0-Hs)),class:t.normalizeClass(r.current-Hs<0&&"disabled")},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconArrowLeft))]),_:1},8,["class"]),t.createVNode(t.unref(I.OIcon),{onClick:c[1]||(c[1]=d=>o(Hs)),class:t.normalizeClass(r.current+Hs>=r.total&&"disabled")},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconArrowRight))]),_:1},8,["class"])])]))}}),o4={class:"o-sig-meeting-calendar"},l4={class:"meeting-card-header"},u4={key:0,class:"header-left"},c4={key:0,class:"date-select"},d4={class:"meeting-card-content"},Wd=t.defineComponent({__name:"OMeetingSigCalendar",props:{sigName:{},getMeetingListRequest:{},getDateListRequest:{},getEventsListRequest:{},dates:{}},setup(r){const e=r,{t:i,meetingTabs:n}=Tn(),{lePadV:s}=Et.useScreen(),a=t.ref(""),o=t.ref(!1),l=t.ref([]),c=t.computed(()=>s.value?100:5),d=t.ref(""),m=t.ref([]),g=t.ref([]),x=t.ref([]),T=t.ref(-1),E=z=>{b(z)},v=z=>{b(z)},b=async z=>{if(e.getMeetingListRequest)try{o.value=!0,a.value=xe(z).format("YYYY-MM-DD");const B=await e.getMeetingListRequest(a.value,e.sigName);l.value=B.map(R=>({...R,time:`${R.start}-${R.end}`,date:R.date||a.value,type:Be.MEETING}))}finally{o.value=!1}},D=async()=>{e.getDateListRequest&&(m.value=await e.getDateListRequest()),e.getEventsListRequest&&(x.value=(await e.getEventsListRequest(a.value,e.sigName)).map(z=>({...z,type:Be.EVENTS})),g.value=(x.value||[]).map(z=>z.dates||[]).flat())},N=t.ref(Be.ALL),w=()=>{D()};t.watch(()=>s.value,()=>{s.value&&(N.value=Be.ALL,w())});const $=z=>{const B=xe(z).format("YYYY-MM-DD");return[B.slice(0,7),B.slice(8,10)]},F=t.computed(()=>{let z;return N.value===Be.ALL?z=[...m.value||[],...g.value]:N.value===Be.MEETING?z=m.value||[]:N.value===Be.EVENTS?z=g.value||[]:z=[],[...new Set(z)].sort((B,R)=>xe(B).isAfter(xe(R))?1:-1).map(B=>xe(B).format("YYYY-MM-DD"))}),H=()=>{let z=F.value.find(B=>B===xe().format("YYYY-MM-DD"));z||(z=F.value.find(B=>xe(B).isAfter(xe()))||[...F.value].reverse().find(B=>xe().isAfter(xe(B)))),d.value=z};t.watch(()=>F.value,z=>{z.length&&(H(),t.nextTick(()=>{b(d.value)}))});const O=t.computed(()=>{const z=F.value.reduce((te,ee)=>{var J,se;const[q,j]=$(ee);return te[q]={count:(((J=te[q])==null?void 0:J.count)||0)+1,days:[...((se=te[q])==null?void 0:se.days)||[],j]},te},{}),B=Object.keys(z).map(te=>({...z[te],month:te})),R=[];let V=[];return B.forEach(te=>{for(;te.days.length;)if(!V.length)te.days.splice(0,6).forEach(ee=>{V.push({month:te.month,day:ee})}),V.length>=5&&(R.push(V),V=[]);else{let ee=V.length;ee%2===1&&(ee+=1),te.days.length+V.length<=6?(te.days.splice(0,6).forEach(q=>{V.push({month:te.month,day:q})}),V.length>=5&&(R.push(V),V=[])):(te.days.splice(0,6-ee).forEach(q=>{V.push({month:te.month,day:q})}),V.length>=5&&(R.push(V),V=[]))}}),V.length&&(R.push(V),V=[]),R}),U=t.computed(()=>O.value.map(z=>{const B=z.reduce((R,V)=>(R[V.month]=R[V.month]||[],R[V.month].push(V.day),R),{});return Object.keys(B).map(R=>({month:R,days:B[R]||[]}))})),C=()=>{O.value.length?(T.value=O.value.findIndex(z=>z.some(B=>d.value===`${B.month}-${B.day}`)),T.value===-1&&(T.value=O.value.findIndex(z=>z.some(B=>d.value.includes(B.month))))):T.value=-1};t.watch([()=>O.value,()=>d.value],()=>{C()},{deep:!0});const k=z=>{T.value+=z};t.onMounted(()=>{D()});const P=t.computed(()=>{let z;return N.value===Be.ALL?z=[...l.value||[],...x.value]:N.value===Be.MEETING?z=l.value||[]:N.value===Be.EVENTS?z=x.value||[]:z=[],z});return(z,B)=>(t.openBlock(),t.createElementBlock("div",o4,[t.createElementVNode("div",l4,[d.value?(t.openBlock(),t.createElementBlock("div",u4,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("meeting.latestMeeting")),1),t.createElementVNode("span",null,t.toDisplayString(t.unref(xe)(d.value).format("YYYY/MM/DD")),1),t.createVNode(t.unref(I.OPopover),null,{target:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),{class:"tips"},{default:t.withCtx(()=>[t.createVNode(t.unref(Zb))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("p",null,t.toDisplayString(t.unref(i)("meeting.detailHalfYearMeetings")),1)])]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(I.OTab),{modelValue:N.value,"onUpdate:modelValue":B[0]||(B[0]=R=>N.value=R),onChange:w,line:!1,"max-show":9999},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n).slice(0,-1),R=>(t.openBlock(),t.createBlock(t.unref(I.OTabPane),{key:R.value,value:R.value},{nav:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(R.icon)))]),_:2},1024),t.createTextVNode(" "+t.toDisplayString(R.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),t.unref(s)&&F.value.length?(t.openBlock(),t.createElementBlock("div",c4,[t.createVNode(t.unref(it.ElSelect),{modelValue:a.value,"onUpdate:modelValue":B[1]||(B[1]=R=>a.value=R),onChange:v},{label:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.latestMeeting"))+" "+t.toDisplayString(t.unref(pt)(a.value)),1)]),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(F.value,R=>(t.openBlock(),t.createBlock(t.unref(it.ElOption),{key:R,value:R,label:t.unref(pt)(R)},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),!t.unref(s)||t.unref(s)&&F.value.length?(t.openBlock(),t.createBlock(t.unref(I.ODivider),{key:1,class:"meeting-divider"})):t.createCommentVNode("",!0),t.createElementVNode("div",d4,[!t.unref(s)&&T.value!==-1?(t.openBlock(),t.createBlock(a4,{key:0,data:U.value.slice(T.value,T.value+1),meetingDates:N.value!==t.unref(Be).EVENTS?m.value:[],eventsDates:N.value!==t.unref(Be).MEETING?g.value:[],onClickDate:E,onChangeMonth:k,current:T.value,total:U.value.length,active:a.value},null,8,["data","meetingDates","eventsDates","current","total","active"])):t.createCommentVNode("",!0),t.createVNode(t.unref(I.OScroller),{class:"list-content","show-type":"hover",size:"small"},{default:t.withCtx(()=>[t.createVNode(bh,{list:P.value,rows:c.value},{empty:t.withCtx(()=>[t.renderSlot(z.$slots,"empty")]),_:3},8,["list","rows"])]),_:3})])]))}}),h4={class:"o-my-meeting-calendar"},f4={class:"meeting-list"},p4={class:"list-calendar-mb"},m4={class:"list-calendar"},g4=["onClick"],v4={class:"date-cell-text"},y4={class:"list-body"},_4=["id"],T4={class:"item-header-left"},b4={class:"header-info"},C4={class:"meeting-title"},x4={key:0},S4={class:"title-wrapper"},E4={class:"title-text"},k4={key:1,class:"tag-wrapper"},w4={class:"meeting-info"},D4={key:0,class:"item-header-right"},A4={class:"meeting-detail"},I4={key:0,class:"meeting-btn"},N4={key:0,class:"load-text"},O4={class:"dialog-content"},Yd=t.defineComponent({__name:"OMeetingMyCalendar",props:{cancelSubMeetingRequest:{},deleteMeetingRequest:{},getMeetingListRequest:{},groupType:{default:_i.SIG}},emits:["edit"],setup(r,{emit:e}){const i=I.useMessage(null),n=t.ref(!1),s=t.ref(1),a=t.ref(50),o=t.ref(null),l=t.ref([]),c=t.ref([]),d=t.computed(()=>o.value===null||c.value.length<o.value),m=t.ref(!1),{t:g,locale:x,getPointStr:T,getConfig:E,getWeekFromDate:v}=Tn(),b=t.computed(()=>x.value===je.Locales.EN),D=r,N=t.ref(!1),{isPhone:w}=Et.useScreen(),$=t.ref([]),F=e,H=t.ref(!1),O=t.ref(!1),U=async()=>{if(D.getMeetingListRequest&&!H.value)try{if(o.value!==null&&o.value>0&&(s.value-1)*a.value>o.value)return;if(!d.value&&w.value){ze("next-month");return}n.value=!0,H.value=!0;const pe=await D.getMeetingListRequest({page:s.value,size:a.value,order_by:"date",order_type:"asc",month:xe(Pe.value).format("YYYY-MM")}),ye=(pe.data||[]).map(Ce=>{var ni,Ft,gi;const{is_cycle:he,date:ue,start:ve,end:Me,cycle_sub:De,cycle_start_date:dt,cycle_end_date:Re,cycle_start:Nt,cycle_end:vt,cycle_type:Ot,cycle_interval:wt,cycle_point:Vt}=Ce;if(he){let Bt="",vi="";Ot===gn&&(vi=g("meeting.cycleDay")),Ot===vn&&(wt>1?vi=g("meeting.cycleWeek.other",[T(Ot,Vt),wt]):vi=g("meeting.cycleWeek.one",[T(Ot,Vt)])),Ot===nn&&(vi=g("meeting.cycleMonth",[T(Ot,Vt)])),Bt=g("meeting.cycleMeetingText2",{startDate:dt,endDate:Re,startTime:Nt,endTime:vt,cycleType:vi});const S=((ni=Ce.obs_data)==null?void 0:ni.filter(A=>A.text_video_url))||[];return De.filter(A=>xe(A.date).isBefore(xe(Pe.value).add(1,"month").format("YYYY-MM-01"))&&!xe(A.date).isBefore(xe(Pe.value).format("YYYY-MM-01"))).map(({id:A,...X})=>({...Ce,...X,timeRange:Bt,dateRange:`${X.start}-${X.end}`,hasObsData:S.find(le=>le.sub_id===X.sub_id),time:`${X.start}-${X.end}`,isExpired:xe(`${X.date} ${X.start}`).isBefore(xe())}))}return[{...Ce,dateRange:`${ve} - ${Me}`,timeRange:`${ve} - ${Me}`,hasObsData:!!((gi=(Ft=Ce.obs_data)==null?void 0:Ft.filter(Bt=>Bt.text_video_url))!=null&&gi.length),time:`${ve}-${Me}`,isExpired:xe(`${ue} ${ve}`).isBefore(xe())}]}).flat().filter(Ce=>Ce.date.slice(0,7)===pt(Pe.value,"YYYY-MM-DD").slice(0,7));m.value?(c.value=pe.data||[],l.value=ye):s.value===1&&!w.value?(c.value=pe.data||[],l.value=ye):(c.value=[...c.value,...pe.data||[]],l.value=[...l.value,...ye]),l.value.sort((Ce,he)=>Ce.date===he.date?On(Ce.start)>On(he.start)?1:-1:xe(Ce.date).isAfter(xe(he.date))?1:-1),o.value=(pe==null?void 0:pe.total)||0,t.nextTick(()=>{Ze(),nt.value&&!w.value&&B()})}finally{n.value=!1,H.value=!1,O.value=!1,m.value=!1}},C=fi.useDebounceFn(()=>{d.value&&(w.value||(O.value=!0,s.value++,U()))},200),k=fi.useDebounceFn(()=>{if(!d.value||!w.value)return;const pe=window.scrollY||window.pageYOffset,ye=window.innerHeight;document.documentElement.scrollHeight-(pe+ye)<=300&&!H.value&&(O.value=!0,s.value++,U())},200),P=pe=>{const ye=l.value.filter(Ce=>Ce.date===pe);return ye.length&&ye.every(Ce=>Ce.is_delete)},z=pe=>{const ye=pe.target;if(!ye)return;const Ce=ye.scrollTop,he=ye.scrollHeight,ue=ye.clientHeight;Ce+ue>=he&&C()},B=()=>{nt.value.getContainerEl().addEventListener("scroll",z)},R=t.ref({}),V=(pe,ye)=>{pe&&ye&&(R.value[ye]=pe)},te=async pe=>{await R.value[pe].copyInfo(),i.success({content:g("common.copySuccess")})},ee=t.ref(!1),q=t.ref(null),j=pe=>{F("edit",pe,"whole")},J=pe=>{q.value=pe,ee.value=!0},se=async()=>{if(D.deleteMeetingRequest&&q.value)try{N.value=!0;const pe=await D.deleteMeetingRequest(q.value.id);if(typeof pe=="boolean"&&!pe)return;ee.value=!1,i.success({content:`${g("meeting.meetingCancel",[q.value.topic])}`}),m.value=!0,U()}finally{N.value=!1}},Q=t.ref(!1),ie=t.ref(""),K=t.ref(null),Z=[{label:g("meeting.meetingSingle"),value:"single"},{label:g("meeting.meetingCycle"),value:"whole"}],oe=t.ref("single"),ge=(pe,ye)=>{pe.is_cycle?(K.value=pe,ie.value=ye,Q.value=!0):ye==="cancel"?J(pe):j(pe)},Ne=()=>{Q.value=!1,K.value=null,ie.value="",oe.value="single"},be=async()=>{const pe=K.value;if(pe)if(ie.value==="cancel")try{let ye;if(N.value=!0,oe.value==="single"&&pe.is_cycle){if(!D.cancelSubMeetingRequest)return;ye=await D.cancelSubMeetingRequest(pe.sub_id)}else{if(!D.deleteMeetingRequest)return;ye=await D.deleteMeetingRequest(pe.id)}if(typeof ye=="boolean"&&!ye)return;i.success({content:`${g("meeting.meetingCancel",[pe.topic])}`}),Ne(),m.value=!0,U()}finally{N.value=!1}else F("edit",pe,oe.value),Ne()},Le=t.ref(),qe=t.computed(()=>[...new Set(l.value.map(pe=>pe.date))].sort((pe,ye)=>xe(pe).isBefore(xe(ye))?-1:1)),Ke=t.computed(()=>[...new Set(l.value.filter(pe=>!pe.isExpired&&!pe.is_delete).map(pe=>pe.date))].sort((pe,ye)=>xe(pe).isBefore(xe(ye))?-1:1)),Pe=t.ref(),Ze=()=>{var Ce;const pe=Ke.value.find(he=>!xe(he).isBefore(xe(new Date).format("YYYY-MM-DD")));pe?Pe.value=pe:Pe.value||(Pe.value=xe().format("YYYY-MM-DD")),(Ce=Le.value)==null||Ce.pickDay(xe(Pe.value)),Pe.value=xe(Pe.value).format("YYYY-MM-DD");const ye=l.value.find(he=>he.date===Pe.value&&!he.isExpired&&!he.is_delete);ye&&($.value=[ye.sub_id||ye.id])},tt=(pe,ye)=>{var Ce;(!ye||!((Ce=pe.target)!=null&&Ce.className.includes("date-cell-text")))&&(pe.stopPropagation(),pe.preventDefault())},ze=pe=>{Le.value&&(s.value=1,o.value=null,window.scrollTo({top:0,behavior:"smooth"}),Le.value.selectDate(pe),m.value=!0,t.nextTick(()=>{Pe.value=xe(Le.value.selectedDay).format("YYYY-MM-DD"),U()}))},gt=t.computed(()=>l.value.reduce((pe,ye)=>{if(pe.length){const Ce=pe.at(-1);return(Ce==null?void 0:Ce.date)===ye.date?Ce.list.push(ye):pe.push({date:ye.date,list:[ye]}),pe}else return[{date:ye.date,list:[ye]}]},[])),nt=t.ref();t.watch(()=>Pe.value,()=>{Oe(Pe.value)});const Oe=pe=>{var he,ue,ve;const ye=xe(pe).format("YYYY-MM-DD"),Ce=document.querySelector(`#group-title-${ye}`);Ce&&(w.value?window.scrollTo({top:(((he=Ce.parentElement)==null?void 0:he.offsetTop)||0)-52,behavior:"smooth"}):(ve=nt.value)==null||ve.scrollTo({top:((ue=Ce.parentElement)==null?void 0:ue.offsetTop)||0,behavior:"smooth"}))};t.onMounted(()=>{U(),window.addEventListener("scroll",k),window.addEventListener("resize",k)}),t.onUnmounted(()=>{var ye;window.removeEventListener("scroll",k),window.removeEventListener("resize",k);const pe=(ye=nt.value)==null?void 0:ye.getContainerEl();pe==null||pe.removeEventListener("scroll",z)});const Ee=pe=>{const ye=xe(pe||void 0);return b.value?ye.format("MMMM YYYY"):ye.format("YYYY MM月")},me=t.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:N.value,onClick:()=>{be()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Ne()}}]),Fe=t.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:N.value,onClick:()=>{se()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{ee.value=!1}}]);return(pe,ye)=>(t.openBlock(),t.createElementBlock("div",h4,[t.createElementVNode("div",f4,[t.createElementVNode("div",p4,[t.createElementVNode("span",null,t.toDisplayString(Ee(Pe.value)),1),t.createElementVNode("span",null,[t.createVNode(t.unref(I.OIcon),{onClick:ye[0]||(ye[0]=Ce=>ze("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(I.OIcon),{onClick:ye[1]||(ye[1]=Ce=>ze("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})])]),t.createElementVNode("div",m4,[t.createVNode(t.unref(it.ElCalendar),{ref_key:"calendarRef",ref:Le,modelValue:Pe.value,"onUpdate:modelValue":ye[4]||(ye[4]=Ce=>Pe.value=Ce)},{header:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(Ee(Pe.value)),1),t.createElementVNode("div",null,[t.createVNode(t.unref(I.OIcon),{onClick:ye[2]||(ye[2]=Ce=>ze("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(I.OIcon),{onClick:ye[3]||(ye[3]=Ce=>ze("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})])]),"date-cell":t.withCtx(({data:Ce})=>[t.createElementVNode("div",{onClick:he=>tt(he,qe.value.includes(Ce.day)),class:t.normalizeClass({"date-cell":!0,"is-selected":Ce.isSelected,"is-today":t.unref(pt)(Ce.day)===t.unref(pt)(),clickable:qe.value.includes(Ce.day),expired:t.unref(xe)(t.unref(pt)()).isAfter(t.unref(xe)(Ce.day)),"all-deleted":P(Ce.day)}),style:t.normalizeStyle({"--dot-bg":`${t.unref(E)(t.unref(Be).MEETING,"color")}`})},[t.createElementVNode("div",v4,t.toDisplayString(Number(Ce.day.split("-")[2])),1)],14,g4)]),_:1},8,["modelValue"])]),t.createElementVNode("div",{class:t.normalizeClass(["list-wrapper",l.value.length?"":"is-empty"])},[l.value.length?(t.openBlock(),t.createBlock(t.unref(I.OScroller),{key:0,ref_key:"scrollerRef",ref:nt,onScrollend:t.unref(C),class:"scroller-container","show-type":"hover"},{default:t.withCtx(()=>[t.createElementVNode("div",y4,[t.createVNode(t.unref(I.OCollapse),{modelValue:$.value,"onUpdate:modelValue":ye[7]||(ye[7]=Ce=>$.value=Ce),accordion:t.unref(w)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(gt.value,(Ce,he)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:Ce.date},[he===0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ye[5]||(ye[5]=ue=>ze("prev-month"))},[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconArrowLeft))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(g)("meeting.preMonth")),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["group-item",he===gt.value.length-1&&"last-item"])},[t.createElementVNode("div",{class:t.normalizeClass({"group-bar":!0,"is-active":t.unref(xe)(Pe.value).format("YYYY-MM-DD")===Ce.date,"is-end":Ce.list.every(ue=>ue.isExpired)})},[...ye[11]||(ye[11]=[t.createElementVNode("div",{class:"group-bar-line"},null,-1),t.createElementVNode("div",{class:"group-bar-dot"},null,-1)])],2),t.createElementVNode("div",{class:t.normalizeClass({"group-title":!0,"is-end":Ce.list.every(ue=>ue.isExpired)}),id:`group-title-${t.unref(xe)(new Date(Ce.date)).format("YYYY-MM-DD")}`},t.toDisplayString(t.unref(xe)(Ce.date).format("MM/DD"))+" "+t.toDisplayString(t.unref(v)(Ce.date)),11,_4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ce.list,(ue,ve)=>(t.openBlock(),t.createBlock(t.unref(I.OCollapseItem),{key:ue.sub_id||ue.id,value:ue.sub_id||ue.id,class:t.normalizeClass({"last-item":he===gt.value.length-1&&ve===Ce.list.length-1,"is-delete":ue.is_delete,"is-end":ue.isExpired})},{title:t.withCtx(()=>[t.createElementVNode("div",T4,[t.createElementVNode("div",{class:"meeting-icon",style:t.normalizeStyle({backgroundColor:`${ue.is_delete?"var(--o-color-info4)":t.unref(E)(t.unref(Be).MEETING,"color")}`})},[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(E)(t.unref(Be).MEETING,"icon"))))]),_:1})],4),t.createElementVNode("div",b4,[t.createElementVNode("div",C4,[ue.is_delete?(t.openBlock(),t.createElementBlock("div",x4,t.toDisplayString(t.unref(g)("meeting.meetingCancelled")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",S4,[t.createElementVNode("div",E4,t.toDisplayString(ue.topic),1)]),ue.is_cycle?(t.openBlock(),t.createElementBlock("div",k4,[t.createVNode(t.unref(I.OTag),{color:"primary",variant:"outline"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.cycle")),1)]),_:1})])):t.createCommentVNode("",!0)]),t.createElementVNode("div",w4,[t.createElementVNode("span",null,t.toDisplayString(ue.dateRange),1),t.createVNode(t.unref(I.ODivider),{direction:"v"}),t.createElementVNode("span",null,t.toDisplayString(r.groupType===t.unref(_i).GROUP?t.unref(g)("meeting.groups"):t.unref(g)("meeting.sigs"))+": "+t.toDisplayString(ue.group_name),1)])])]),ue.is_delete?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",D4,[ue.isExpired?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[ue.etherpad?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:0,"hover-underline":!1,target:"_blank",href:ue.etherpad},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.meetingSummary"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0),ue.hasObsData?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:1,"hover-underline":!1,target:"_blank",href:`/${t.unref(x)}/video/${ue.group_name}/${ue.mid}/${ue.date}`},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.viewRecord"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:0,"hover-underline":!1,target:"_blank",href:ue.join_url,rel:"noopener noreferrer"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.joinMeeting"))+" ",1)]),_:1},8,["href"]))])),t.createVNode(t.unref(I.OIcon),{onClick:t.withModifiers(()=>te(ve),["stop"]),class:"copy-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(kl))]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",A4,[t.createVNode(ts,{show:$.value.includes(ue.sub_id||ue.id),data:ue,ref_for:!0,ref:Me=>V(Me,ue.id),from:"my"},null,8,["show","data"]),!ue.isExpired&&!ue.is_delete?(t.openBlock(),t.createElementBlock("div",I4,[t.createVNode(t.unref(I.OButton),{color:"normal",variant:"text",onClick:Me=>ge(ue,"edit")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.editMeeting")),1)]),_:1},8,["onClick"]),t.createVNode(t.unref(I.OButton),{color:"normal",variant:"text",onClick:Me=>ge(ue,"cancel")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.cancelMeeting")),1)]),_:1},8,["onClick"])])):t.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ye[12]||(ye[12]=t.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),he===gt.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[O.value?(t.openBlock(),t.createElementBlock("div",N4,t.toDisplayString(t.unref(g)("common.loading")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"list-month-change next-month",onClick:ye[6]||(ye[6]=ue=>ze("next-month"))},[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconArrowRight))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(g)("meeting.nextMonth")),1)])],64)):t.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend"])):n.value?t.createCommentVNode("",!0):t.renderSlot(pe.$slots,"empty",{key:1})],2),t.createVNode(t.unref(I.ODialog),{visible:Q.value,"onUpdate:visible":ye[9]||(ye[9]=Ce=>Q.value=Ce),"main-class":"handle-dialog",onClose:Ne,actions:me.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.meetingHandleText",[ie.value==="edit"?t.unref(g)("meeting.edit"):t.unref(g)("meeting.cancel")])),1)]),default:t.withCtx(()=>[t.createVNode(t.unref(I.ORadioGroup),{modelValue:oe.value,"onUpdate:modelValue":ye[8]||(ye[8]=Ce=>oe.value=Ce)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(Z,Ce=>t.createVNode(t.unref(I.ORadio),{value:Ce.value,key:Ce.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(Ce.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["visible","actions"]),t.createVNode(t.unref(I.ODialog),{visible:ee.value,"onUpdate:visible":ye[10]||(ye[10]=Ce=>ee.value=Ce),"main-class":"cancel-dialog",actions:Fe.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.confirmCancel")),1)]),default:t.withCtx(()=>{var Ce;return[t.createElementVNode("div",O4,t.toDisplayString(t.unref(g)("meeting.confirmCancelDesc",[(Ce=q.value)==null?void 0:Ce.topic])),1)]}),_:1},8,["visible","actions"])])]))}}),B4=Object.assign(fc,{install(r){r.component("OMeetingCalendar",fc)}}),L4=Object.assign(gc,{install(r){r.component("OMeetingForm",gc)}}),P4=Object.assign(Gd,{install(r){r.component("OMeetingPlayback",Gd)}}),M4=Object.assign(Wd,{install(r){r.component("OMeetingSigCalendar",Wd)}}),R4=Object.assign(Yd,{install(r){r.component("OMeetingMyCalendar",Yd)}}),V4={class:"o-activity-table"},F4={key:0,class:"table-wrapper"},$4={class:"expand-detail"},U4={class:"sort-btn"},z4={class:"activity-btn"},H4={key:0,class:"pagination-wrapper"},q4={key:1,class:"collapse-wrapper"},j4={class:"title-top"},G4={class:"act-title"},W4={class:"act-sponsor"},Y4={class:"sponsor"},X4={class:"activity-btn"},K4={class:"activity-detail"},Q4={key:0,class:"pagination"},Z4={class:"dialog-content"},J4={class:"dialog-content"},Xd=t.defineComponent({__name:"OActivityApproval",props:{getTableDataRequest:{},applicantList:{},cancelActivityRequest:{},deleteActivityRequest:{},approveActivityRequest:{},rejectActivityRequest:{},getActivityDetailRequest:{}},setup(r){const{t:e,locale:i}=je.useI18n(),n=t.computed(()=>i.value==="zh"),{approvalStatusMap:s,statusMap:a,activityTypeMap:o}=Ca(),l=I.useMessage(null),{isPhone:c,lePadV:d}=Et.useScreen(),m=r,g=t.reactive({page:1,size:10,status:"",is_delete:0,search:"",sponsor:"",order_by:""}),x=t.ref([]),T=t.computed(()=>m.applicantList.map(Oe=>({value:Oe,label:Oe}))),E=()=>{g.sponsor=x.value.join(",")},v=t.ref("desc"),b=()=>{v.value=v.value==="asc"?"desc":"asc",g.order_by=v.value},D=t.ref(),N=t.computed(()=>{const Oe=[];return s.value.forEach(Ee=>{Oe.push(Ee)}),Oe.slice(1)}),w=()=>{g.status=D.value,D.value==="cancel"?g.is_delete=1:g.is_delete=0},$=t.ref([]),F=t.ref(0),H=[10,20,30,40],O=async()=>{const{page:Oe,size:Ee,status:me,sponsor:Fe,order_by:pe,search:ye,is_delete:Ce}=g;let he={page:Oe,size:Ee,sponsor:Fe,order_by:pe,search:ye};if(me!=="all"&&me!==""&&(he.is_delete=Ce),me==="cancel"?he.status="":he.status=me,!m.getTableDataRequest)return;const ue=await m.getTableDataRequest(he);$.value=(ue.data||[]).map(ve=>{var vt;const{start_date:Me,end_date:De,start:dt,end:Re,activity_type:Nt}=ve;return[{...ve,time:`${Me}-${Re}`,start_date_time:`${Me} ${dt}`,end_date_time:`${De} ${Re}`,type:Be.EVENTS,dateRange:`${Me} ${dt}-${De} ${Re}`,activity_type:(vt=o.value.get(Nt))==null?void 0:vt.label}]}).flat(),F.value=ue.total},U=Oe=>{Oe.pageSize!==g.size?g.page=1:g.page=Oe.page,g.size=Oe.pageSize,O()},C=t.ref({reason:""}),k=t.ref(),P=t.ref(!1),z=t.ref(null),B=t.ref(""),R=t.ref(0),V=t.ref(!1),te=t.ref({reason:[{required:!0,message:e("meeting.enterReviewNotes")}]}),ee=async()=>{var Oe,Ee,me,Fe;if(!(!m.approveActivityRequest||!m.rejectActivityRequest))try{P.value=!0;const pe=await((Oe=k.value)==null?void 0:Oe.validate());if(!pe||pe.some(ye=>!!ye)){P.value=!1;return}R.value===1?await m.approveActivityRequest((Ee=z.value)==null?void 0:Ee.id,C.value):await m.rejectActivityRequest((me=z.value)==null?void 0:me.id,C.value),O(),q(),l.success({content:e("meeting.reviewSuccess",[(Fe=z.value)==null?void 0:Fe.title])})}finally{V.value=!1,P.value=!1}},q=()=>{V.value=!1,J.value=!1,P.value=!1,C.value.reason=""},j=async()=>{var Oe;if(m.deleteActivityRequest&&m.cancelActivityRequest)try{P.value=!0,ie.value===1?await m.cancelActivityRequest(z.value.id,C.value):await m.deleteActivityRequest(z.value.id,C.value),O(),q(),l.success({content:e("meeting.activityActionSuccess",[(Oe=z.value)==null?void 0:Oe.title,Q.value])})}finally{P.value=!1,J.value=!1}},J=t.ref(!1),se=t.ref(""),Q=t.ref(""),ie=t.ref(0),K=Oe=>{se.value=e("meeting.deleteActivity"),Q.value=e("meeting.deleteActivity").toLowerCase(),z.value=Oe,ie.value=0,J.value=!0},Z=Oe=>{se.value=e("meeting.cancelActivity"),Q.value=e("common.cancel").toLowerCase(),z.value=Oe,ie.value=1,J.value=!0},oe=Oe=>{z.value=Oe,B.value=e("meeting.approveReview"),R.value=1,V.value=!0},ge=Oe=>{z.value=Oe,B.value=e("meeting.rejectReview"),R.value=0,V.value=!0},Ne=t.ref([]),be=t.ref([]),Le=Oe=>{const Ee=Oe.toString();if(!m.getActivityDetailRequest)return;Ne.value.includes(Ee)||(Ne.value.push(Ee),m.getActivityDetailRequest(Ee).then(Fe=>{var pe;(pe=$.value)==null||pe.forEach(ye=>{ye.id===Fe.id&&(ye.approve_record=Fe.approve_record,ye.approver=Fe.approver)})}));const me=be.value.indexOf(Ee);be.value.includes(Ee)?be.value.splice(me,1):be.value.push(Ee)},qe=Oe=>{Le(Oe.id)},Ke=Oe=>Oe.id.toString(),Pe=t.ref([]),Ze=Oe=>{Oe.length&&Oe.forEach(Ee=>{Le(Ee)})},tt=t.ref({}),ze=(Oe,Ee)=>{Oe&&Ee&&(tt.value[Ee]=Oe)};t.onMounted(()=>{O()}),t.watch(()=>[g.status,g.sponsor,g.order_by,g.search,g.is_delete],()=>{O()},{deep:!0});const gt=t.computed(()=>[{id:"confirm",loading:P.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{j()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{q()}}]),nt=t.computed(()=>[{id:"confirm",loading:P.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{ee()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{q()}}]);return(Oe,Ee)=>(t.openBlock(),t.createElementBlock("div",V4,[t.unref(c)?(t.openBlock(),t.createElementBlock("div",q4,[t.createVNode(t.unref(I.OCollapse),{modelValue:Pe.value,"onUpdate:modelValue":Ee[2]||(Ee[2]=me=>Pe.value=me),accordion:t.unref(c),onChange:Ze},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,me=>{var Fe;return t.openBlock(),t.createElementBlock(t.Fragment,{key:me.id},[t.createElementVNode("div",j4,[t.createElementVNode("p",G4,t.toDisplayString(me.title),1),me.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(I.OTag),{key:0,color:"primary",variant:"outline",class:t.normalizeClass([`tag-${(Fe=t.unref(a).get(me.status))==null?void 0:Fe.id}`])},{default:t.withCtx(()=>{var pe;return[t.createTextVNode(t.toDisplayString((pe=t.unref(a).get(me.status))==null?void 0:pe.text),1)]}),_:2},1032,["class"])):(t.openBlock(),t.createBlock(t.unref(I.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.statusCanceled")),1)]),_:1}))]),t.createVNode(t.unref(I.OCollapseItem),{value:me.id},{title:t.withCtx(()=>[t.createElementVNode("div",W4,[t.createElementVNode("p",Y4,t.toDisplayString(me.sponsor),1),t.createElementVNode("p",null,t.toDisplayString(t.unref(it.dayjs)(me.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),t.createElementVNode("div",X4,[me.status===7||me.is_delete?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:0,color:"danger",variant:"text",onClick:t.withModifiers(pe=>K(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),(me.status===3||me.status===4)&&me.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:1,color:"danger",variant:"text",onClick:t.withModifiers(pe=>Z(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.status===2?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:2,color:"primary",variant:"text",onClick:t.withModifiers(pe=>oe(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.status===2?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:3,color:"primary",variant:"text",onClick:t.withModifiers(pe=>ge(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[t.createElementVNode("div",K4,[t.createVNode(ts,{show:Pe.value.includes(me.id),data:me,ref_for:!0,ref:pe=>ze(pe,me.id),page:t.unref(Be).APPROVAL},null,8,["show","data","page"])])]),_:2},1032,["value"])],64)}),128))]),_:1},8,["modelValue","accordion"]),F.value>H[0]?(t.openBlock(),t.createElementBlock("div",Q4,[t.createVNode(t.unref(I.OPagination),{total:F.value,page:g.page,"page-size":g.size,"page-sizes":H,layout:["total","jumper","pager","pagesize"],"show-more":!1,simple:!0,onChange:U},null,8,["total","page","page-size"])])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",F4,[t.createVNode(t.unref(it.ElTable),{data:$.value,onExpandChange:qe,"row-key":Ke,"expand-row-keys":be.value},{default:t.withCtx(()=>[t.createVNode(t.unref(it.ElTableColumn),{type:"expand"},{default:t.withCtx(me=>[t.createElementVNode("div",$4,[t.createVNode(ts,{data:me.row,page:t.unref(Be).APPROVAL,show:""},null,8,["data","page"])])]),_:1}),t.createVNode(t.unref(it.ElTableColumn),{label:t.unref(e)("meeting.activityName"),prop:"title"},null,8,["label"]),t.createVNode(t.unref(it.ElTableColumn),{prop:"sponsor"},{header:t.withCtx(()=>[t.createVNode(uc,{modelValue:x.value,"onUpdate:modelValue":Ee[0]||(Ee[0]=me=>x.value=me),onConfirm:E,list:T.value,multiple:!0},{empty:t.withCtx(()=>[t.renderSlot(Oe.$slots,"filter-empty")]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(e)("meeting.applicant")),1)]),_:3},8,["modelValue","list"])]),_:3}),t.createVNode(t.unref(it.ElTableColumn),{prop:"create_time"},{header:t.withCtx(()=>[t.createElementVNode("div",{class:"sort-time",onClick:b},[t.createElementVNode("span",null,t.toDisplayString(t.unref(e)("meeting.submissionTime")),1),t.createElementVNode("div",U4,[t.createElementVNode("div",{class:t.normalizeClass(["sort-asc sort-item",{active:v.value==="asc"}])},null,2),t.createElementVNode("div",{class:t.normalizeClass(["sort-desc sort-item",{active:v.value==="desc"}])},null,2)])])]),default:t.withCtx(me=>[t.createTextVNode(t.toDisplayString(t.unref(it.dayjs)(me.row.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),_:1}),t.createVNode(t.unref(it.ElTableColumn),{prop:"status",width:"90px"},{header:t.withCtx(()=>[t.createVNode(uc,{modelValue:D.value,"onUpdate:modelValue":Ee[1]||(Ee[1]=me=>D.value=me),onConfirm:w,list:N.value},{empty:t.withCtx(()=>[t.renderSlot(Oe.$slots,"filter-empty")]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(e)("meeting.status")),1)]),_:3},8,["modelValue","list"])]),default:t.withCtx(me=>{var Fe;return[me.row.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(I.OTag),{key:0,color:"primary",variant:"outline",class:t.normalizeClass([`tag-${(Fe=t.unref(a).get(me.row.status))==null?void 0:Fe.id}`])},{default:t.withCtx(()=>{var pe;return[t.createTextVNode(t.toDisplayString((pe=t.unref(a).get(me.row.status))==null?void 0:pe.text),1)]}),_:2},1032,["class"])):(t.openBlock(),t.createBlock(t.unref(I.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.statusCanceled")),1)]),_:1}))]}),_:3}),t.createVNode(t.unref(it.ElTableColumn),{label:t.unref(e)("meeting.action")},{default:t.withCtx(me=>[t.createElementVNode("div",z4,[me.row.status===7||me.row.is_delete?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:0,color:"danger",onClick:Fe=>K(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),(me.row.status===3||me.row.status===4)&&me.row.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:1,color:"danger",onClick:Fe=>Z(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.row.status===2?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:2,color:"primary",onClick:Fe=>oe(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.row.status===2?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:3,color:"primary",onClick:Fe=>ge(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)])]),_:1},8,["label"])]),_:3},8,["data","expand-row-keys"]),F.value>H[0]?(t.openBlock(),t.createElementBlock("div",H4,[t.createVNode(t.unref(I.OPagination),{total:F.value,page:g.page,"page-size":g.size,"page-sizes":H,layout:["total","jumper","pager","pagesize"],"show-more":!1,onChange:U},null,8,["total","page","page-size"])])):t.createCommentVNode("",!0)])),t.createVNode(t.unref(I.ODialog),{visible:V.value,"onUpdate:visible":Ee[4]||(Ee[4]=me=>V.value=me),"phone-half-full":t.unref(d),"main-class":"handle-dialog-approval review-dialog",actions:nt.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(B.value),1)]),default:t.withCtx(()=>[t.createElementVNode("div",Z4,[t.createVNode(t.unref(I.OForm),{model:C.value,ref_key:"formRef",ref:k,"has-required":"",layout:"v",class:"form-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OFormItem),{rules:te.value.reason,label:`${t.unref(e)("meeting.reviewNotesLabel")}${n.value?":":": "}`,field:"reason"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OTextarea),{size:"large",placeholder:t.unref(e)("meeting.enterReviewNotes"),rows:4,resize:"none","max-length":1e3,"input-on-outlimit":!1,modelValue:C.value.reason,"onUpdate:modelValue":Ee[3]||(Ee[3]=me=>C.value.reason=me)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model"])])]),_:1},8,["visible","phone-half-full","actions"]),t.createVNode(t.unref(I.ODialog),{visible:J.value,"onUpdate:visible":Ee[5]||(Ee[5]=me=>J.value=me),"phone-half-full":t.unref(d),"main-class":"handle-dialog-approval cancel-dialog",actions:gt.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(se.value),1)]),default:t.withCtx(()=>{var me,Fe;return[t.createElementVNode("div",J4,t.toDisplayString(ie.value===1?t.unref(e)("meeting.confirmCancelActivity",[(me=z.value)==null?void 0:me.title]):t.unref(e)("meeting.confirmDeleteActivity",[(Fe=z.value)==null?void 0:Fe.title])),1)]}),_:1},8,["visible","phone-half-full","actions"])]))}}),e8={class:"o-my-activity-calendar"},t8={class:"activity-list"},i8={key:0,class:"list-calendar-mb"},n8={class:"left-calendar"},r8=["onClick"],s8={class:"date-cell-text"},a8={class:"right-meeting"},o8={class:"list-body"},l8=["id"],u8={class:"item-header-left"},c8={class:"header-info"},d8={class:"act-title"},h8={class:"title-text"},f8={class:"act-info"},p8={class:"date-range"},m8={key:0,class:"item-header-right"},g8={class:"activity-detail"},v8={key:0,class:"activity-btn"},y8={key:0,class:"load-text"},_8={class:"dialog-content"},T8={class:"dialog-content"},b8=t.defineComponent({__name:"OActivityMyCalendar",props:{getListRequest:{},revokeActivityRequest:{},deleteActivityRequest:{},editActivityRequest:{},getActivityDetailRequest:{}},emits:["edit"],setup(r,{emit:e}){const{t:i,locale:n}=je.useI18n(),s=t.computed(()=>n.value===je.Locales.ZH),{statusMap:a,activityTypeMap:o}=Ca(),{getConfig:l}=Tn(),c=he=>{const ue=xe(he||new Date);return s.value?ue.format("YYYY MM月"):ue.format("MMMM YYYY")},d=I.useMessage(null),{isPhone:m}=Et.useScreen(),g=r,x=e,T=t.ref([]),E=t.ref([]),v=t.ref(1),b=t.ref(50),D=t.ref(null),N=t.ref(!1),w=t.ref([]),$=t.ref(!1),F=t.ref(!1),H=t.computed(()=>D.value===null||E.value.length<D.value),O=async()=>{if(g.getListRequest&&!$.value)try{if(D.value!==null&&D.value>0&&(v.value-1)*b.value>D.value)return;if(!H.value&&m.value){J("next-month");return}$.value=!0;const he=await g.getListRequest({page:v.value,size:b.value,start_date:V.value}),ue=(he.data||[]).map(ve=>{const{start_date:Me,end_date:De,start:dt,end:Re}=ve;return[{...ve,time:`${Me}-${Re}`,start_date_time:`${Me} ${dt}`,end_date_time:`${De} ${Re}`,type:Be.EVENTS,dateRange:`${Me} ${dt}-${De} ${Re}`,isExpired:xe(`${Me} ${dt}`).isBefore(xe())}]}).flat().filter(ve=>ve.start_date.slice(0,7)===pt(V.value,"YYYY-MM-DD").slice(0,7));N.value?(E.value=he.data||[],T.value=ue):v.value===1&&!m.value?(E.value=he.data||[],T.value=ue):(E.value=[...E.value,...he.data||[]],T.value=[...T.value,...ue]),T.value.sort((ve,Me)=>ve.start_date===Me.start_date?On(ve.start)>On(Me.start)?1:-1:xe(ve.start_date).isAfter(xe(Me.start_date))?1:-1),D.value=(he==null?void 0:he.total)||0,t.nextTick(()=>{q(),Z.value&&!m.value&&B()})}finally{$.value=!1,F.value=!1,N.value=!1}},U=t.ref([]),C=he=>{g.getActivityDetailRequest&&(U.value.includes(he)||(U.value.push(he),g.getActivityDetailRequest(he).then(ue=>{var ve;(ve=T.value)==null||ve.forEach(Me=>{Me.id===ue.id&&(Me.approve_record=ue.approve_record)})})))},k=he=>{he.length&&he.forEach(ue=>{C(ue)})},P=he=>{const ue=T.value.filter(ve=>ve.start_date===he);return ue.length&&ue.every(ve=>ve.status===3||ve.status===4)},z=he=>{const ue=he.target;if(!ue)return;const ve=ue.scrollTop,Me=ue.scrollHeight,De=ue.clientHeight;ve+De>=Me&&ge()},B=()=>{Z.value.getContainerEl().addEventListener("scroll",z)},R=t.ref(),V=t.ref(xe().format("YYYY-MM-DD")),te=t.computed(()=>[...new Set(T.value.map(he=>he.start_date))].sort((he,ue)=>xe(he).isBefore(xe(ue))?-1:1)),ee=t.computed(()=>[...new Set(T.value.filter(he=>!he.isExpired&&!he.is_delete).map(he=>he.start_date))].sort((he,ue)=>xe(he).isBefore(xe(ue))?-1:1)),q=()=>{var ve;const he=ee.value.find(Me=>!xe(Me).isBefore(xe(new Date).format("YYYY-MM-DD")));he?V.value=he:V.value||(V.value=xe().format("YYYY-MM-DD")),(ve=R.value)==null||ve.pickDay(xe(V.value)),V.value=xe(V.value).format("YYYY-MM-DD");const ue=T.value.find(Me=>Me.start_date===V.value&&!Me.isExpired&&!Me.is_delete);ue&&(C(ue.id),w.value=[ue.id])},j=(he,ue)=>{var ve;(!ue||!((ve=he.target)!=null&&ve.className.includes("date-cell-text")))&&(he.stopPropagation(),he.preventDefault())},J=he=>{R.value&&(v.value=1,D.value=null,U.value=[],window.scrollTo({top:0,behavior:"smooth"}),R.value.selectDate(he),N.value=!0,t.nextTick(()=>{V.value=xe(R.value.selectedDay).format("YYYY-MM-DD"),O()}))},se=t.computed(()=>T.value.reduce((he,ue)=>{if(he.length){const ve=he.at(-1);return(ve==null?void 0:ve.start_date)===ue.start_date?ve==null||ve.list.push(ue):he.push({start_date:ue.start_date,list:[ue]}),he}else return[{start_date:ue.start_date,list:[ue]}]},[])),Q=t.ref({}),ie=(he,ue)=>{he&&ue&&(Q.value[ue]=he)},K=async he=>{await Q.value[he].copyInfo(),d.success({content:i("common.copySuccess")})},Z=t.ref(),oe=he=>{var Me,De,dt;const ue=xe(he).format("YYYY-MM-DD"),ve=document.querySelector(`#group-title-${ue}`);ve&&(m.value?window.scrollTo({top:(((Me=ve.parentElement)==null?void 0:Me.offsetTop)||0)-52,behavior:"smooth"}):(dt=Z.value)==null||dt.scrollTo({top:((De=ve.parentElement)==null?void 0:De.offsetTop)||0,behavior:"smooth"}))};t.watch(()=>V.value,()=>{oe(V.value)});const ge=fi.useDebounceFn(()=>{H.value&&(m.value||(F.value=!0,v.value++,O()))},200),Ne=t.ref(!1),be=t.ref(null),Le=t.ref(!1),qe=he=>{be.value=he,Le.value=!0},Ke=()=>{var he;g.revokeActivityRequest&&be.value&&(Ne.value=!0,g.revokeActivityRequest((he=be.value)==null?void 0:he.id).then(ue=>{var ve;typeof ue=="boolean"&&!ue||(d.success({content:i("meeting.revokeActivitySuccess",[(ve=be.value)==null?void 0:ve.title])}),N.value=!0,O())}).finally(()=>{Le.value=!1,Ne.value=!1}))},Pe=()=>{Le.value=!1},Ze=he=>{x("edit",he)},tt=he=>{if(!g.editActivityRequest)return;const{title:ue,start_date:ve,end_date:Me,register_end_date:De,activity_type:dt,synopsis:Re,register_url:Nt,content_url:vt,address:Ot,start:wt,end:Vt,approver:ni}=he;let Ft={title:ue,start_date:ve,end_date:Me,register_end_date:De,activity_type:dt,synopsis:Re,register_url:Nt,content_url:vt,address:Ot,start:wt,end:Vt,approver:ni,is_publish:"true"};g.editActivityRequest(he.id,Ft).then(gi=>{typeof gi=="boolean"&&!gi||(d.success({content:i("meeting.submitReviewSuccess",[he.title])}),N.value=!0,O())})},ze=t.ref(!1),gt=he=>{be.value=he,ze.value=!0},nt=()=>{var he;g.deleteActivityRequest&&(Ne.value=!0,g.deleteActivityRequest((he=be.value)==null?void 0:he.id).then(ue=>{var ve;typeof ue=="boolean"&&!ue||(d.success({content:i("meeting.deleteActivitySuccess",[(ve=be.value)==null?void 0:ve.title])}),N.value=!0,O())}).finally(()=>{ze.value=!1,Ne.value=!1}))},Oe=()=>{ze.value=!1},Ee=t.ref(),me=t.ref(0),Fe=()=>{var he;me.value=((he=Ee.value)==null?void 0:he.clientHeight)||0},pe=fi.useDebounceFn(()=>{if(!H.value||!m.value)return;const he=window.scrollY||window.pageYOffset,ue=window.innerHeight;document.documentElement.scrollHeight-(he+ue)<=300&&!$.value&&(F.value=!0,v.value++,O())},200);t.onMounted(()=>{O(),window.addEventListener("scroll",pe),window.addEventListener("resize",pe),Fe(),window.addEventListener("resize",Fe)}),t.onUnmounted(()=>{var ue;window.removeEventListener("scroll",pe),window.removeEventListener("resize",pe),window.removeEventListener("resize",Fe);const he=(ue=Z.value)==null?void 0:ue.getContainerEl();he==null||he.removeEventListener("scroll",z)});const ye=t.computed(()=>[{id:"confirm",loading:Ne.value,color:"primary",variant:"outline",round:"pill",size:"large",label:i("meeting.confirmBtn"),onClick:()=>{Ke()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:i("meeting.cancelBtn"),onClick:()=>{Pe()}}]),Ce=t.computed(()=>[{id:"confirm",loading:Ne.value,color:"primary",variant:"outline",round:"pill",size:"large",label:i("meeting.confirmBtn"),onClick:()=>{nt()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:i("meeting.cancelBtn"),onClick:()=>{Oe()}}]);return(he,ue)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",e8,[t.createElementVNode("div",t8,[t.unref(m)?(t.openBlock(),t.createElementBlock("div",i8,[t.createElementVNode("span",null,t.toDisplayString(c(V.value)),1),t.createElementVNode("span",null,[t.createVNode(t.unref(I.OIcon),{onClick:ue[0]||(ue[0]=ve=>J("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(I.OIcon),{onClick:ue[1]||(ue[1]=ve=>J("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})])])):t.createCommentVNode("",!0),t.createElementVNode("div",n8,[t.createVNode(t.unref(it.ElCalendar),{ref_key:"calendarRef",ref:R,modelValue:V.value,"onUpdate:modelValue":ue[4]||(ue[4]=ve=>V.value=ve)},{header:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(c(V.value)),1),t.createElementVNode("div",null,[t.createVNode(t.unref(I.OIcon),{onClick:ue[2]||(ue[2]=ve=>J("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(I.OIcon),{onClick:ue[3]||(ue[3]=ve=>J("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})])]),"date-cell":t.withCtx(({data:ve})=>[t.createElementVNode("div",{onClick:Me=>j(Me,te.value.includes(ve.day)),class:t.normalizeClass({"date-cell":!0,"is-selected":ve.isSelected,"is-today":t.unref(pt)(ve.day)===t.unref(pt)(),clickable:te.value.includes(ve.day),approved:P(ve.day)}),style:t.normalizeStyle({"--dot-bg":`${t.unref(l)(t.unref(Be).EVENTS,"color")}`})},[t.createElementVNode("div",s8,t.toDisplayString(Number(ve.day.split("-")[2])),1)],14,r8)]),_:1},8,["modelValue"])]),t.createElementVNode("div",a8,[T.value.length?(t.openBlock(),t.createBlock(t.unref(I.OScroller),{key:0,ref_key:"scrollerRef",ref:Z,onScrollend:t.unref(ge),style:t.normalizeStyle({"--header-height":me.value}),"show-type":"hover",class:"scroller-container"},{default:t.withCtx(()=>[t.createElementVNode("div",o8,[t.createVNode(t.unref(I.OCollapse),{modelValue:w.value,"onUpdate:modelValue":ue[7]||(ue[7]=ve=>w.value=ve),accordion:t.unref(m),onChange:k},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(se.value,(ve,Me)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:ve.start_date},[Me===0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ue[5]||(ue[5]=De=>J("prev-month"))},[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconArrowLeft))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("meeting.preMonth")),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["act-item",Me===se.value.length-1&&"last-item"])},[t.createElementVNode("div",{class:t.normalizeClass({"act-bar":!0,"is-active":t.unref(xe)(V.value).format("YYYY-MM-DD")===ve.start_date,"is-end":ve.list.every(De=>De.isExpired),approved:ve.list.every(De=>De.status===3||De.status===4)})},[...ue[10]||(ue[10]=[t.createElementVNode("div",{class:"act-bar-line"},null,-1),t.createElementVNode("div",{class:"act-bar-dot"},null,-1)])],2),t.createElementVNode("div",{class:t.normalizeClass({"group-title":!0,"is-end":ve.list.every(De=>De.isExpired)}),id:`group-title-${t.unref(xe)(new Date(ve.start_date)).format("YYYY-MM-DD")}`},t.toDisplayString(t.unref(xe)(ve.start_date).format("MM/DD")),11,l8),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ve.list,(De,dt)=>(t.openBlock(),t.createBlock(t.unref(I.OCollapseItem),{key:De.sub_id||De.id,value:De.sub_id||De.id,class:t.normalizeClass({"last-item":Me===se.value.length-1&&dt===ve.list.length-1,"is-delete":De.is_delete,"is-end":De.isExpired})},{title:t.withCtx(()=>{var Re,Nt;return[t.createElementVNode("div",u8,[t.createElementVNode("div",{class:"act-icon",style:t.normalizeStyle({backgroundColor:`${De.is_delete?"var(--o-color-info4)":t.unref(l)(t.unref(Be).EVENTS,"color")}`})},[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(l)(t.unref(Be).EVENTS,"icon"))))]),_:1})],4),t.createElementVNode("div",c8,[t.createElementVNode("div",d8,[t.createElementVNode("div",h8,t.toDisplayString(De.title),1),t.createVNode(t.unref(I.OTag),{color:"primary",variant:"outline",class:t.normalizeClass([`tag-${De.is_delete?"delete":(Re=t.unref(a).get(De.status))==null?void 0:Re.id}`])},{default:t.withCtx(()=>{var vt;return[t.createTextVNode(t.toDisplayString(De.is_delete===1?t.unref(i)("meeting.statusCanceled"):(vt=t.unref(a).get(De.status))==null?void 0:vt.text),1)]}),_:2},1032,["class"])]),t.createElementVNode("div",f8,[t.createElementVNode("span",p8,t.toDisplayString(De.dateRange),1),t.createVNode(t.unref(I.ODivider),{direction:"v"}),t.createElementVNode("span",null,t.toDisplayString((Nt=t.unref(o).get(De.activity_type))==null?void 0:Nt.label),1)])])]),De.content_url&&!De.is_delete&&[3,4,5,6].includes(De.status)?(t.openBlock(),t.createElementBlock("div",m8,[De.content_url?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:0,"hover-underline":!1,href:De.content_url,target:"_blank",rel:"noopener noreferrer"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.activityDetail"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0),De.register_url&&(De.status===3||De.status===4||De.status===2&&De.update_activity_id&&new Date(De.register_end_date).getTime()>new Date().getTime())?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:1,"hover-underline":!1,href:De.register_url,target:"_blank",rel:"noopener noreferrer"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.registerNow"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createVNode(t.unref(I.OIcon),{onClick:t.withModifiers(()=>K(dt),["stop"]),class:"copy-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(kl))]),_:1},8,["onClick"])]}),default:t.withCtx(()=>[t.createElementVNode("div",g8,[t.createVNode(ts,{show:w.value.includes(De.id),data:De,ref_for:!0,ref:Re=>ie(Re,De.id)},null,8,["show","data"]),!De.isExpired&&!De.is_delete?(t.openBlock(),t.createElementBlock("div",v8,[De.status===2?(t.openBlock(),t.createBlock(t.unref(I.OButton),{key:0,variant:"text",onClick:Re=>qe(De)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.withdrawReview")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),De.status===1||De.status===3||De.status===4||De.status===7?(t.openBlock(),t.createBlock(t.unref(I.OButton),{key:1,variant:"text",onClick:Re=>Ze(De)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.modifyActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),De.status===1||De.status===7?(t.openBlock(),t.createBlock(t.unref(I.OButton),{key:2,variant:"text",onClick:Re=>gt(De)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),De.status===1||De.status===7?(t.openBlock(),t.createBlock(t.unref(I.OButton),{key:3,variant:"text",onClick:Re=>tt(De)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.submitReview")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ue[11]||(ue[11]=t.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Me===se.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[F.value?(t.openBlock(),t.createElementBlock("div",y8,t.toDisplayString(t.unref(i)("meeting.loading")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"list-month-change next-month",onClick:ue[6]||(ue[6]=De=>J("next-month"))},[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconArrowRight))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("meeting.nextMonth")),1)])],64)):t.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):t.renderSlot(he.$slots,"empty",{key:1})])])]),t.createVNode(t.unref(I.ODialog),{visible:Le.value,"onUpdate:visible":ue[8]||(ue[8]=ve=>Le.value=ve),"main-class":"handle-dialog-active",actions:ye.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.withdrawReview")),1)]),default:t.withCtx(()=>{var ve;return[t.createElementVNode("div",_8,t.toDisplayString(t.unref(i)("meeting.confirmRevokeActivity",[(ve=be.value)==null?void 0:ve.title])),1)]}),_:1},8,["visible","actions"]),t.createVNode(t.unref(I.ODialog),{visible:ze.value,"onUpdate:visible":ue[9]||(ue[9]=ve=>ze.value=ve),"main-class":"handle-dialog-active",actions:Ce.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.deleteActivity")),1)]),default:t.withCtx(()=>{var ve;return[t.createElementVNode("div",T8,t.toDisplayString(t.unref(i)("meeting.confirmDeleteActivity",[(ve=be.value)==null?void 0:ve.title])),1)]}),_:1},8,["visible","actions"])],64))}}),C8=Object.assign(ec,{install(r){r.component("OActivityForm",ec)}}),x8=Object.assign(Xd,{install(r){r.component("OActivityApproval",Xd)}}),lp=Object.assign(b8,{install(r){r.component("OActivityMyCalendar",lp)}}),S8=t.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(r){const e=Symbol("default"),i=r,n=t.computed(()=>i.verticalPadding?I.isBoolean(i.verticalPadding)?e:I.isString(i.verticalPadding)?i.verticalPadding:i.verticalPadding[0]:0),s=t.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(a,o)=>(t.openBlock(),t.createElementBlock("div",{class:"content-wrapper",style:t.normalizeStyle({"--content-wrapper-vertical-paddingTop":n.value===t.unref(e)?void 0:n.value,"--content-wrapper-vertical-paddingBottom":s.value===t.unref(e)?void 0:s.value})},[t.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),sn=je._export_sfc(S8,[["__scopeId","data-v-0b8705aa"]]),E8={class:"banner-content"},k8=["src"],w8={key:4,class:"banner-opts"},D8=t.defineComponent({__name:"OBannerContent",props:{info:{},size:{},contentJustifyCenter:{type:Boolean},isPhone:{type:Boolean},isLight:{type:Boolean}},emits:["click"],setup(r,{emit:e}){const i=e,n=(s,a)=>{s&&!a&&(window.open(s),i("click",s))};return(s,a)=>(t.openBlock(),t.createBlock(t.unref(I.OFigure),{class:t.normalizeClass(["banner-bg",{"with-sticky-bg":r.info.withStickyBg,"cursor-pointer":r.info.href&&!r.info.btn}]),src:r.info.bg,style:t.normalizeStyle({"--pad-offset":r.info.pad_offset}),onClick:a[0]||(a[0]=o=>n(r.info.href,r.info.btn))},{default:t.withCtx(()=>[t.createVNode(sn,{class:t.normalizeClass(["banner-wrapper",["banner-wrapper",r.contentJustifyCenter?"content-center":""]])},{default:t.withCtx(()=>[t.createElementVNode("div",E8,[!r.isPhone&&r.info.attach?(t.openBlock(),t.createElementBlock("img",{key:0,src:r.info.attach,class:"banner-attach"},null,8,k8)):t.createCommentVNode("",!0),r.info.title?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass({"banner-title":!0,"text-dark":r.info.text_theme==="dark"})},t.toDisplayString(r.info.title),3)):t.createCommentVNode("",!0),r.info.subtitle?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass({"banner-subtitle":!0,"text-dark":r.info.text_theme==="dark"})},t.toDisplayString(r.info.subtitle),3)):t.createCommentVNode("",!0),r.info.bg_text?(t.openBlock(),t.createElementBlock("div",{key:3,class:"banner-text",style:t.normalizeStyle({backgroundImage:`url(${r.info.bg_text})`,"--pc-width":r.info.pc_text_width,"--pc-height":r.info.pc_text_height,"--pad-width":r.info.pad_text_width,"--pad-height":r.info.pad_text_height})},null,4)):t.createCommentVNode("",!0),r.info.btn?(t.openBlock(),t.createElementBlock("div",w8,[t.createVNode(t.unref(I.OButton),{href:r.info.href,target:"_blank",variant:"solid",color:"primary",size:r.size==="tiny"?void 0:r.size},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.info.btn),1)]),_:1},8,["href","size"])])):t.createCommentVNode("",!0)])]),_:1},8,["class"])]),_:1},8,["src","class","style"]))}}),ba=je._export_sfc(D8,[["__scopeId","data-v-1904d05a"]]),A8={key:0,class:"content-height"},I8={key:0},N8={key:1,class:"content-height"},O8={key:2,class:"content-height"},B8=t.defineComponent({__name:"OBanner",props:{options:{},size:{},contentJustifyCenter:{type:Boolean},autoPlay:{type:Boolean}},emits:["click"],setup(r,{emit:e}){const i=r,n=e,{isLight:s}=Et.useTheme(),{isPhone:a}=Et.useScreen(),o=t.computed(()=>{if(i.options)return Array.isArray(i.options)?i.options.length===1?i.options[0]:void 0:i.options}),l=t.computed(()=>{if(!(!Array.isArray(i.options)||i.options.length<=1))return i.options});return(c,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["home-banner",r.size])},[o.value?(t.openBlock(),t.createElementBlock("div",A8,[r.size==="tiny"?(t.openBlock(),t.createElementBlock("div",I8,t.toDisplayString(o.value.title),1)):t.unref(a)?(t.openBlock(),t.createBlock(sn,{key:2,class:"banner-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OFigure),{class:"banner-bg",src:o.value.bg,fit:"cover"},null,8,["src"])]),_:1})):(t.openBlock(),t.createBlock(ba,{key:1,info:o.value,size:r.size,"content-justify-center":r.contentJustifyCenter,"is-phone":t.unref(a),"is-light":t.unref(s),onClick:d[0]||(d[0]=m=>n("click",m))},null,8,["info","size","content-justify-center","is-phone","is-light"]))])):l.value?(t.openBlock(),t.createElementBlock("div",N8,[t.unref(a)?(t.openBlock(),t.createBlock(t.unref(I.OCarousel),{key:1,class:"banner-carousel",effect:"gallery","indicator-click":"",arrow:"never","auto-play":r.autoPlay},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(m,g)=>(t.openBlock(),t.createBlock(t.unref(I.OCarouselItem),{key:g,class:t.normalizeClass(["banner-item",`banner-item${g}`])},{default:t.withCtx(()=>[t.createVNode(sn,{class:"banner-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OFigure),{class:"banner-bg",src:m.bg,onClick:x=>n("click",m.href)},null,8,["src","onClick"])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1},8,["auto-play"])):(t.openBlock(),t.createBlock(t.unref(I.OCarousel),{key:0,class:"banner-carousel",effect:"toggle","active-class":"current-slide","indicator-click":"","auto-play":r.autoPlay},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(m,g)=>(t.openBlock(),t.createBlock(t.unref(I.OCarouselItem),{key:g,class:t.normalizeClass(["banner-item",`banner-item${g}`])},{default:t.withCtx(()=>[t.createVNode(ba,{info:m,size:r.size,"content-justify-center":r.contentJustifyCenter,"is-phone":t.unref(a),"is-light":t.unref(s),onClick:d[1]||(d[1]=x=>n("click",x))},null,8,["info","size","content-justify-center","is-phone","is-light"])]),_:2},1032,["class"]))),128))]),_:1},8,["auto-play"]))])):(t.openBlock(),t.createElementBlock("div",O8,[...d[2]||(d[2]=[t.createElementVNode("p",null,"No data.",-1)])]))],2))}}),Kd=je._export_sfc(B8,[["__scopeId","data-v-fddea127"]]),L8=Object.assign(Kd,{install(r){r.component("OBanner",Kd)}}),P8=Object.assign(ba,{install(r){r.component("OBannerContent",ba)}}),M8={locale:"zh-CN","common.more":"更多","common.empty":"暂无数据","common.loading":"加载中...","common.checkAll":"全选","common.filter":"筛选","common.confirm":"确认","common.reset":"重置","common.search":"搜索","pagination.goto":"前往","pagination.page":"页","pagination.countPerPage":"条/页","pagination.total":"共 {0} 条","upload.buttonLabel":"点击上传","upload.drag":"点击或拖拽文件到此处上传","upload.dragHover":"释放文件并开始上传","upload.retry":"点击重试","upload.delete":"删除","upload.preview":"预览","upload.edit":"编辑","upload.loading":"上传中","upload.failed":"上传失败","upload.download":"下载文件","select.cancel":"取消","select.confirm":"确定","input.limit":"<b>{0}</b>/{1}","table.filterEmptyOption":"空","table.filterPlaceholder":"请输入搜索内容","timePicker.time":"时间","timePicker.selectTime":"选择时间","timePicker.placeholder":"请选择时间","timePicker.now":"此刻","timePicker.startTime":"开始时间","timePicker.endTime":"结束时间","datePicker.date":"日期","datePicker.time":"时间","datePicker.selectDate":"选择日期","datePicker.selectTime":"选择时间","datePicker.placeholder":"请选择日期","datePicker.yearPlaceholder":"请选择年份","datePicker.monthPlaceholder":"请选择月份","datePicker.today":"今天","datePicker.year":"年","datePicker.yearUnit":"年","datePicker.monthUnit":"月","datePicker.dayUnit":"日","datePicker.weekdays.0":"日","datePicker.weekdays.1":"一","datePicker.weekdays.2":"二","datePicker.weekdays.3":"三","datePicker.weekdays.4":"四","datePicker.weekdays.5":"五","datePicker.weekdays.6":"六","datePicker.months.0":"一月","datePicker.months.1":"二月","datePicker.months.2":"三月","datePicker.months.3":"四月","datePicker.months.4":"五月","datePicker.months.5":"六月","datePicker.months.6":"七月","datePicker.months.7":"八月","datePicker.months.8":"九月","datePicker.months.9":"十月","datePicker.months.10":"十一月","datePicker.months.11":"十二月","datePicker.monthsShort.0":"01月","datePicker.monthsShort.1":"02月","datePicker.monthsShort.2":"03月","datePicker.monthsShort.3":"04月","datePicker.monthsShort.4":"05月","datePicker.monthsShort.5":"06月","datePicker.monthsShort.6":"07月","datePicker.monthsShort.7":"08月","datePicker.monthsShort.8":"09月","datePicker.monthsShort.9":"10月","datePicker.monthsShort.10":"11月","datePicker.monthsShort.11":"12月","dateRangePicker.placeholderStart":"开始日期","dateRangePicker.placeholderEnd":"结束日期","dateRangePicker.selectRange":"选择日期范围"},R8={locale:"en-US","common.more":"more","common.empty":"No Data","common.loading":"Loading...","common.checkAll":"Check All","common.filter":"Filter","common.confirm":"Confirm","common.reset":"Reset","common.search":"Search","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","upload.loading":"Uploading","upload.failed":"Upload failed","upload.download":"Download the file","select.cancel":"Cancel","select.confirm":"Ok","input.limit":"<b>{0}</b>/{1}","table.filterEmptyOption":"empty","table.filterPlaceholder":"Enter keywords","timePicker.time":"time","timePicker.selectTime":"Select time","timePicker.placeholder":"Select time","timePicker.now":"Now","timePicker.startTime":"Start Time","timePicker.endTime":"End Time","datePicker.date":"Date","datePicker.time":"Time","datePicker.selectDate":"Select date","datePicker.selectTime":"Select Time","datePicker.placeholder":"Select date","datePicker.yearPlaceholder":"Select year","datePicker.monthPlaceholder":"Select month","datePicker.today":"Today","datePicker.year":"","datePicker.yearUnit":"","datePicker.monthUnit":"","datePicker.dayUnit":"","datePicker.weekdays.0":"Su","datePicker.weekdays.1":"Mo","datePicker.weekdays.2":"Tu","datePicker.weekdays.3":"We","datePicker.weekdays.4":"Th","datePicker.weekdays.5":"Fr","datePicker.weekdays.6":"Sa","datePicker.months.0":"January","datePicker.months.1":"February","datePicker.months.2":"March","datePicker.months.3":"April","datePicker.months.4":"May","datePicker.months.5":"June","datePicker.months.6":"July","datePicker.months.7":"August","datePicker.months.8":"September","datePicker.months.9":"October","datePicker.months.10":"November","datePicker.months.11":"December","datePicker.monthsShort.0":"Jan","datePicker.monthsShort.1":"Feb","datePicker.monthsShort.2":"Mar","datePicker.monthsShort.3":"Apr","datePicker.monthsShort.4":"May","datePicker.monthsShort.5":"Jun","datePicker.monthsShort.6":"Jul","datePicker.monthsShort.7":"Aug","datePicker.monthsShort.8":"Sep","datePicker.monthsShort.9":"Oct","datePicker.monthsShort.10":"Nov","datePicker.monthsShort.11":"Dec","dateRangePicker.placeholderStart":"Start date","dateRangePicker.placeholderEnd":"End date","dateRangePicker.selectRange":"Select date range"},Qd=t.defineComponent({__name:"OPlusConfigProvider",props:{locale:{default:"zh"},theme:{default:"light"}},setup(r){const e=r,i=t.reactive({locale:t.computed(()=>e.locale),theme:t.computed(()=>e.theme)});return t.provide(je.configProviderInjectKey,i),(n,s)=>(t.openBlock(),t.createBlock(t.unref(I.OConfigProvider),{locale:r.locale==="zh"?t.unref(M8):t.unref(R8)},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},8,["locale"]))}}),V8=Object.assign(Qd,{install(r){r.component("OPlusConfigProvider",Qd)}}),F8={class:"cookie-notice-content"},$8=["type"],U8={class:"cookie-title"},z8={style:{transform:"rotate(180deg)"},xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24"},H8={class:"cookie-zh-title",style:{"margin-top":"0"}},q8=["href"],j8={key:1,class:"cookie-en-title"},G8={key:0,class:"cookie-en-content"},W8={class:"cookie-en-desc"},Y8=["href"],X8={class:"cookie-notice-right"},K8={class:"cookie-dlg-title"},Q8={class:"cookie-dlg-content"},Z8={class:"content-item"},J8={class:"item-header"},e5={class:"item-title"},t5={class:"item-extra"},i5={class:"item-detail"},n5={class:"content-item"},r5={class:"item-header"},s5={class:"item-title"},a5={class:"item-extra"},o5={class:"item-detail"},l5="0",Zd="1",u5="2",qs="3",c5="agreed-cookiepolicy-zh",d5="agreed-cookiepolicy-en",h5=t.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},community:{},detailUrl:{},wrapper:{},cookieDomain:{}},emits:["update:visible"],setup(r,{expose:e,emit:i}){const n=r,s=i,{lePadV:a,leLaptop:o,isPhone:l}=Et.useScreen(),{locale:c,t:d}=je.useI18n(),m=t.computed(()=>c.value==="zh"),g=t.ref(),x=t.computed(()=>g.value?!!getComputedStyle(g.value).getPropertyValue("--grid-content-width"):!1),T=t.computed(()=>m.value?c5:d5),E=t.ref(!1),v=fi.useVModel(n,"visible",s,{defaultValue:!1}),b=z=>{const B=document.cookie.split(";").find(R=>R.split("=")[0].trim()===encodeURIComponent(z));return B?decodeURIComponent(B.split("=")[1]):null},D=(z,B,R,V)=>{const te=`; max-age=${R*24*60*60}`;document.cookie=`${encodeURIComponent(z)}=${encodeURIComponent(B)}${te}; path=/; domain=${V}`},N=(z,B)=>{document.cookie=`${encodeURIComponent(z)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${B}`},w=z=>{typeof z=="boolean"?v.value=z:v.value=!v.value,t.nextTick(()=>{!v.value&&m.value&&b(T.value)!==qs&&D(T.value,qs,180,n.cookieDomain??location.hostname)})},$=t.ref(!1),F=z=>{typeof z=="boolean"?$.value=z:$.value=!$.value},H=()=>m.value?b(T.value)!==qs:(b(T.value)??"0")===l5,O=()=>m.value?b(T.value)===qs:b(T.value)===Zd;t.onMounted(()=>{H()&&w(!0)}),t.watch(c,()=>{w(H())});const U=()=>{E.value=!0,N(T.value,n.cookieDomain??location.hostname),D(T.value,Zd,180,n.cookieDomain??location.hostname),w(!1)},C=()=>{E.value=!1,N(T.value,n.cookieDomain??location.hostname),D(T.value,u5,180,n.cookieDomain??location.hostname),w(!1)},k=t.computed(()=>l.value?[{id:"save",label:d("cookie.saveSetting"),variant:"text",onClick:()=>{E.value?U():C(),F(!1)}},{id:"allowAll",label:d("cookie.acceptAll"),variant:"text",onClick:()=>{E.value=!0,U(),F(!1)}}]:[{id:"save",color:"primary",label:d("cookie.saveSetting"),variant:"outline",size:"medium",round:"pill",onClick:()=>{E.value?U():C(),F(!1)}},{id:"allowAll",color:"primary",label:d("cookie.acceptAll"),variant:"outline",size:"medium",round:"pill",onClick:()=>{E.value=!0,U(),F(!1)}}]),P=z=>{z&&(E.value=O())};return e({check(){O()===v.value&&w()}}),(z,B)=>(t.openBlock(),t.createBlock(je._sfc_main,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.Teleport,{to:r.wrapper||"#app"},[t.unref(v)?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"cookieNoticeRef",ref:g,class:"cookie-notice"},[t.createElementVNode("div",F8,[t.createElementVNode("div",{type:t.unref(c),class:t.normalizeClass({"cookie-notice-wrap-grid":x.value,"cookie-notice-wrap":!x.value})},[t.createElementVNode("div",U8,[m.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(t.unref(I.OIcon),{style:{display:"inline-block","font-size":"24px","margin-right":"4px"}},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",z8,[...B[4]||(B[4]=[t.createElementVNode("path",{fill:"#002fa7",d:"M21 12c0 4.971-4.029 9-9 9s-9-4.029-9-9c0-4.971 4.029-9 9-9s9 4.029 9 9z"},null,-1),t.createElementVNode("path",{fill:"#fff",d:"M12 9.4c0.552 0 1-0.448 1-1s-0.448-1-1-1c-0.552 0-1 0.448-1 1s0.448 1 1 1zM12.492 10.943c-0.042-0.233-0.246-0.41-0.492-0.41-0.276 0-0.5 0.224-0.5 0.5v5.5l0.008 0.090c0.042 0.233 0.246 0.41 0.492 0.41 0.276 0 0.5-0.224 0.5-0.5v-5.5l-0.008-0.090z"},null,-1)])]))]),_:1}),t.createElementVNode("p",H8,[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.desc"))+" ",1),t.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(t.unref(d)("cookie.about")),9,q8)])],64)):(t.openBlock(),t.createElementBlock("p",j8,t.toDisplayString(t.unref(d)("cookie.title",[r.community])),1)),t.createVNode(t.unref(I.OIcon),{class:"cookie-notice-close",onClick:B[0]||(B[0]=R=>w(!1))},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconClose))]),_:1})]),m.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",G8,[t.createElementVNode("p",W8,[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.desc"))+" ",1),t.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(t.unref(d)("cookie.about")),9,Y8),B[5]||(B[5]=t.createTextVNode(". ",-1))]),t.createElementVNode("div",X8,[t.createVNode(t.unref(I.OButton),{round:"pill",variant:"outline",color:"primary",onClick:U},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.acceptAll")),1)]),_:1}),t.createVNode(t.unref(I.OButton),{round:"pill",variant:"outline",color:"primary",onClick:C},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.rejectAll")),1)]),_:1}),t.createVNode(t.unref(I.OButton),{round:"pill",variant:"outline",color:"primary",onClick:B[1]||(B[1]=R=>F(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.manage")),1)]),_:1})])]))],10,$8)]),t.createVNode(t.unref(I.ODialog),{visible:$.value,"onUpdate:visible":B[3]||(B[3]=R=>$.value=R),size:t.unref(o)?"medium":"large","phone-half-full":t.unref(a),"main-class":x.value?"o-cookie-notice-dlg-main":"",class:"cookie-dlg",actions:k.value,onChange:P,style:{"--dlg-radius":"4px"}},{header:t.withCtx(()=>[t.createElementVNode("span",K8,t.toDisplayString(t.unref(d)("cookie.manage")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",Q8,[t.createElementVNode("div",Z8,[t.createElementVNode("div",J8,[t.createElementVNode("span",e5,t.toDisplayString(t.unref(d)("cookie.necessaryCookie")),1),t.createElementVNode("span",t5,t.toDisplayString(t.unref(d)("cookie.alwaysOn")),1)]),t.createElementVNode("div",i5,t.toDisplayString(t.unref(d)("cookie.necessaryCookieDetail")),1)]),t.createElementVNode("div",n5,[t.createElementVNode("div",r5,[t.createElementVNode("span",s5,t.toDisplayString(t.unref(d)("cookie.analyticalCookie")),1),t.createElementVNode("span",a5,[t.createVNode(t.unref(I.OSwitch),{modelValue:E.value,"onUpdate:modelValue":B[2]||(B[2]=R=>E.value=R)},null,8,["modelValue"])])]),t.createElementVNode("div",o5,t.toDisplayString(t.unref(d)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","main-class","actions"])],512)):t.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),Jd=je._export_sfc(h5,[["__scopeId","data-v-b731c798"]]),f5=Object.assign(Jd,{install(r){r.component("OCookieNotice",Jd)}}),p5={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 m5(r,e){return t.openBlock(),t.createElementBlock("svg",p5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"峰会",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.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 g5={name:"events-icon-summit",render:m5},v5={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 y5(r,e){return t.openBlock(),t.createElementBlock("svg",v5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"活动",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.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 _5={name:"events-icon-events",render:y5},T5={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 b5(r,e){return t.openBlock(),t.createElementBlock("svg",T5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"高校 & 比赛",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.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 C5={name:"events-icon-competition",render:b5},x5={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 S5(r,e){return t.openBlock(),t.createElementBlock("svg",x5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"版本发布计划",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.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 E5={name:"events-icon-release",render:S5},k5={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},w5={events:_5,competition:C5,release:E5,summit:g5},js={上海:"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"},D5="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",A5={class:"o-events-calendar"},I5={key:0,class:"month-list"},N5={class:"collapse-header"},O5={class:"collapse-title"},B5={key:0,class:"collapse-desc"},L5={key:0,class:"month-content month-content-span"},P5={key:0,class:"event-location"},M5={class:"event-name"},R5={key:1},V5={key:0,class:"month-content-row"},F5={class:"month-name"},$5={class:"event-name"},U5={class:"event-location"},z5={class:"event-name"},H5={class:"event-location"},q5={key:1,class:"month-content month-content-column"},j5={class:"event-location"},G5={class:"event-name"},W5={key:1},eh=t.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(r){const e=xa(),{lePadV:i}=Et.useScreen(),n=r,s=["JAN","FEB","MAR","Apr","May","JUN","Jul","Aug","Sep","Oct","Nov","Dec"],a=t.ref([]);t.watch([()=>n.data,()=>i.value],()=>{var g;n.data.length?i.value?a.value=[(g=n.data[0])==null?void 0:g.name]:a.value=n.data.map(x=>x.name):a.value=[]},{immediate:!0});const o=g=>{const x=g.split("/");return parseInt(x[1],10)},l=g=>{const x=new Array(12).fill(0),T=[];return g.forEach((E,v)=>{const[b,D]=Array.isArray(E.date)?[o(E.date[0]),o(E.date[1])]:[o(E.date),o(E.date)];let N=0;for(let $=b-1;$<D;$++)N=Math.max(N,x[$]);const w=N+1;for(let $=b-1;$<D;$++)x[$]=w;T.push({event:E,row:w,eventIndex:v,start:b,end:D})}),T},c=g=>{const x=Array.from({length:12},()=>[]);return g.forEach(T=>{const E=Array.isArray(T.date)?o(T.date[0]):o(T.date);x[E-1].push(T)}),x},d=g=>{const x=g.color||k5[g.type];return x!=null&&x.startsWith("--")?`var(${x})`:x},m=g=>g.icon?g.icon:w5[g.type];return(g,x)=>(t.openBlock(),t.createElementBlock("div",A5,[t.unref(i)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",I5,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(s,T=>t.createElementVNode("div",{class:"month-header",key:T},t.toDisplayString(T),1)),64))])),t.createVNode(t.unref(I.OCollapse),{modelValue:a.value,"onUpdate:modelValue":x[0]||(x[0]=T=>a.value=T)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.data,(T,E)=>(t.openBlock(),t.createBlock(t.unref(I.OCollapseItem),{key:E,value:T.name},{title:t.withCtx(()=>[t.createElementVNode("div",N5,[t.createElementVNode("div",O5,[t.createElementVNode("div",{class:"title-icon",style:t.normalizeStyle({"--bg-color":d(T)})},[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m(T))))]),_:2},1024)],4),t.createElementVNode("span",null,t.toDisplayString(T.name),1)]),T.desc?(t.openBlock(),t.createElementBlock("div",B5,[t.withDirectives(t.createElementVNode("div",null,null,512),[[t.unref(e),T.desc]])])):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[T.isSpanMonth?(t.openBlock(),t.createElementBlock("div",L5,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l(T.data),({event:v,row:b,eventIndex:D,start:N,end:w})=>(t.openBlock(),t.createElementBlock("div",{key:D,class:t.normalizeClass(["event-item",{"event-item-center":v.align==="center","has-link":v.link}]),style:t.normalizeStyle({gridColumn:`${N} / ${w+1}`,gridRow:b,"--bg-color":d(T)||void 0})},[v.location?(t.openBlock(),t.createElementBlock("div",P5,t.toDisplayString(v.location),1)):t.createCommentVNode("",!0),t.createElementVNode("div",M5,[v.link?(t.openBlock(),t.createBlock(t.unref(I.OLink),t.mergeProps({key:0,href:v.link,target:"_blank"},{ref_for:!0},v.linkProps||{}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.name),1)]),_:2},1040,["href"])):(t.openBlock(),t.createElementBlock("span",R5,t.toDisplayString(v.name),1))])],6))),128))])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(i)?(t.openBlock(),t.createElementBlock("div",V5,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(T.data),(v,b)=>(t.openBlock(),t.createElementBlock("div",{key:b,class:t.normalizeClass(["month-row",{"empty-month":v.length===0}])},[t.createElementVNode("div",F5,t.toDisplayString(s[b]),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v,(D,N)=>(t.openBlock(),t.createElementBlock("div",{key:N,class:t.normalizeClass(["event-item",D.link?"has-link":""]),style:t.normalizeStyle({"--bd-color":d(T)||void 0})},[D.link?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:0,href:D.link,target:"_blank"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("div",$5,[t.createElementVNode("span",null,t.toDisplayString(D.name),1)]),t.createElementVNode("div",U5,t.toDisplayString(D.location),1)]),t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})]),_:2},1032,["href"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",z5,t.toDisplayString(D.name),1),t.createElementVNode("div",H5,t.toDisplayString(D.location),1)],64))],6))),128))],2))),128))])):(t.openBlock(),t.createElementBlock("div",q5,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(T.data),(v,b)=>(t.openBlock(),t.createElementBlock("div",{key:b,class:"month-column"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v,(D,N)=>(t.openBlock(),t.createElementBlock("div",{key:N,class:t.normalizeClass(["event-item",D.link?"has-link":""]),style:t.normalizeStyle({"--bg-color":d(T)||void 0})},[t.createElementVNode("div",j5,t.toDisplayString(D.location),1),t.createElementVNode("div",G5,[D.link?(t.openBlock(),t.createBlock(t.unref(I.OLink),{key:0,href:D.link,target:"_blank"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(D.name),1)]),_:2},1032,["href"])):(t.openBlock(),t.createElementBlock("span",W5,t.toDisplayString(D.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var Zi=(r=>(r.FINISH="finish",r.ING="ing",r.ALL="",r))(Zi||{});const Gs=(r,e)=>new Date(r).getTime()>new Date(e).getTime(),Y5={class:"o-events-list"},X5={class:"filter-slot-wrapper"},K5={class:"filter-wrapper"},Q5={class:"filter-left"},Z5={class:"list-content"},J5={class:"tags-wrapper"},eC={class:"event-name"},tC={class:"event-desc"},iC={class:"event-date"},nC={key:0,class:"event-location"},th=t.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(r,{emit:e}){const{t:i}=je.useI18n(),{lePadV:n}=Et.useScreen(),s=r,a=[{label:i("events.statusAll"),value:Zi.ALL},{label:i("events.statusIng"),value:Zi.ING},{label:i("events.statusFinish"),value:Zi.FINISH}],o=e,l=t.ref(Zi.ALL),c=t.ref(""),d=t.ref(""),m=(E={})=>{o("search",Object.assign({page:s.page,pageSize:s.pageSize,status:l.value,keyword:d.value},E))},g=()=>{m()},x=()=>{d.value=c.value,m()},T=t.computed(()=>s.data.map(E=>{let v=E.startDate,b=E.endDate,D=xe(E.date).format("YYYY/MM/DD");if(v&&b){const N=xe().format("YYYY-01-01");Gs(N,v)&&(v=N);const w=xe().format("YYYY-12-31");Gs(b,w)&&(b=w),D=`${xe(v).format("YYYY/MM/DD")}-${xe(b).format("MM/DD")}`}return{...E,startDate:v,endDate:b,dateStr:D,status:Gs(new Date,E.date||E.endDate)?Zi.FINISH:Zi.ING}}).sort((E,v)=>Gs(E.date||E.endDate,v.date||v.endDate)?-1:1).map(E=>{var D,N,w;const v=(w=(N=(D=E.city)==null?void 0:D.replace("市",""))==null?void 0:N.replace("中国",""))==null?void 0:w.replaceAll(" ","");let b=null;return Array.isArray(js[v])?b=js[v][E.name.length%js[v].length]:b=js[v],b||(b=D5),{...E,cover:b}}));return(E,v)=>(t.openBlock(),t.createElementBlock("div",Y5,[t.createElementVNode("div",X5,[t.renderSlot(E.$slots,"filter",{},()=>[t.createElementVNode("div",K5,[t.createElementVNode("div",Q5,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("events.status")),1),t.createVNode(t.unref(I.ORadioGroup),{modelValue:l.value,"onUpdate:modelValue":v[0]||(v[0]=b=>l.value=b),style:{"--radio-group-gap":"8px"},onChange:g},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(a,b=>t.createVNode(t.unref(I.ORadio),{key:b.value,value:b.value},{radio:t.withCtx(({checked:D})=>[t.createVNode(t.unref(I.OToggle),{checked:D},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),t.createVNode(t.unref(I.OInput),{size:"large",modelValue:c.value,"onUpdate:modelValue":v[1]||(v[1]=b=>c.value=b),placeholder:t.unref(i)("events.searchPlaceholder"),onPressEnter:x,onClear:x,clearable:""},{prefix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),{class:"input-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconSearch))]),_:1})]),_:1},8,["modelValue","placeholder"])])])]),t.createElementVNode("div",Z5,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(T.value,b=>(t.openBlock(),t.createBlock(t.unref(I.OCard),{key:b.name,cover:b.cover,href:b.link},{default:t.withCtx(()=>{var D;return[t.createElementVNode("div",J5,[(D=b.tags)!=null&&D.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(b.tags,N=>(t.openBlock(),t.createBlock(t.unref(I.OTag),{key:N.title,size:"medium"},t.createSlots({default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(N.title),1)]),_:2},[N.icon?{name:"icon",fn:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(N.icon)))]),key:"0"}:void 0]),1024))),128)):t.createCommentVNode("",!0),t.createVNode(t.unref(I.OTag),{class:"event-status"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(b.status===t.unref(Zi).ING?t.unref(i)("events.statusIng"):t.unref(i)("events.statusFinish")),1)]),_:2},1024)]),t.createElementVNode("div",eC,t.toDisplayString(b.name),1),t.createElementVNode("div",tC,[t.createElementVNode("div",iC,t.toDisplayString(b.dateStr),1),t.createVNode(t.unref(I.ODivider),{direction:"v"}),b.city?(t.openBlock(),t.createElementBlock("div",nC,t.toDisplayString(b.city),1)):t.createCommentVNode("",!0)])]}),_:2},1032,["cover","href"]))),128))]),T.value.length?t.createCommentVNode("",!0):t.renderSlot(E.$slots,"empty",{key:0}),r.total>8?(t.openBlock(),t.createBlock(t.unref(I.OPagination),{key:1,page:r.page,simple:t.unref(n),"show-total":!0,pageSize:r.pageSize,total:r.total,onChange:m,pageSizes:[4,12,24,36,48]},null,8,["page","simple","pageSize","total"])):t.createCommentVNode("",!0)]))}}),rC={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function sC(r,e){return t.openBlock(),t.createElementBlock("svg",rC,[...e[0]||(e[0]=[t.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:sC},oC={class:"o-events-apply"},lC={class:"events-apply-grid"},uC={class:"timeline-number"},cC={class:"number-circle"},dC={class:"step-title"},hC={class:"step-idx"},fC={class:"step-desc"},pC={key:0},mC={class:"desc-list-wrapper"},gC={key:0,class:"desc-list-title"},vC={class:"desc-list-content"},yC={class:"desc-list-item-title"},_C={class:"desc-list-item-desc"},ih=t.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(r){const{isDark:e}=Et.useTheme(),i=xa();return(n,s)=>(t.openBlock(),t.createElementBlock("div",oC,[t.createElementVNode("div",lC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.steps,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o},[t.createElementVNode("div",uC,[t.createElementVNode("div",cC,t.toDisplayString(o+1),1)]),t.createElementVNode("div",{class:t.normalizeClass(["step-item",`step-${o+1} ${t.unref(e)?"is-dark":""}`]),style:{}},[t.createElementVNode("div",dC,[t.createElementVNode("div",hC,t.toDisplayString(o+1),1),t.createElementVNode("span",null,t.toDisplayString(a.title),1)]),t.createElementVNode("div",fC,[a.desc?t.withDirectives((t.openBlock(),t.createElementBlock("div",pC,null,512)),[[t.unref(i),a.desc]]):t.createCommentVNode("",!0),t.renderSlot(n.$slots,`step${o+1}`),t.createElementVNode("div",mC,[a.listTitle?(t.openBlock(),t.createElementBlock("div",gC,t.toDisplayString(a.listTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("div",vC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.list,(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:"desc-list-item",key:c},[t.createElementVNode("div",yC,[t.createVNode(t.unref(I.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(aC))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(l.title),1)]),t.createElementVNode("div",_C,t.toDisplayString(l.desc),1)]))),128))])])]),a.img?(t.openBlock(),t.createElementBlock("div",{key:0,class:"img-wrapper",style:t.normalizeStyle({backgroundImage:`url(${a.img})`})},null,4)):t.createCommentVNode("",!0),a.imgPhone?(t.openBlock(),t.createElementBlock("div",{key:1,class:"img-wrapper-phone",style:t.normalizeStyle({backgroundImage:`url(${a.imgPhone})`})},null,4)):t.createCommentVNode("",!0)],2)],64))),128))])]))}}),TC=Object.assign(eh,{install(r){r.component("OEventsCalendar",eh)}}),bC=Object.assign(th,{install(r){r.component("OEventsList",th)}}),CC=Object.assign(ih,{install(r){r.component("OEventsApply",ih)}}),xC={key:0,class:"atom"},SC={class:"atom-text"},EC=["href"],kC=["src"],wC={key:0,class:"quick-nav"},DC={class:"category-title"},AC={class:"navs"},IC=["href"],NC={key:0,class:"friendship-link"},OC={class:"friendship-link-title"},BC={class:"friendship-link-box"},LC=["href"],PC={key:0,class:"footer-logo"},MC=["src"],RC=["src"],VC=["href"],FC={key:1,class:"footer-option"},$C={class:"footer-option-item"},UC=["href"],zC={class:"license"},HC={class:"copyright"},qC={class:"filing"},jC=["href"],GC=["src"],WC={key:2,class:"footer-right"},YC={key:0,class:"code-box"},XC=["src"],KC={class:"code-layer"},QC=["src"],ZC={class:"txt"},JC={class:"app-footer-pc"},ex={key:0,class:"footer-left"},tx=["href"],ix=["src"],nx={key:0,class:"footer-right"},rx=["href"],sx={class:"app-footer-mb"},ax={key:0,class:"links"},ox=["href"],lx={class:"copyright"},ux={key:0,class:"approval"},cx=["href"],dx=["src"],hx=t.defineComponent({__name:"OFooter",props:{simple:{default:!1},atom:{default:void 0},lang:{default:void 0},quickNav:{default:void 0},friendshipLink:{default:void 0},footerLogo:{default:void 0},footerOption:{default:void 0},qrcode:{default:void 0},footerBg:{default:void 0}},setup(r){const e=r;return(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([e.simple?"app-footer-simple":"app-footer"])},[e.simple?(t.openBlock(),t.createBlock(sn,{key:1},{default:t.withCtx(()=>[t.createElementVNode("div",JC,[i.$slots.left||e.footerOption?t.renderSlot(i.$slots,"left",{key:0},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",ex,[t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].copyright),1),t.createElementVNode("a",{class:"approval",href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(e.footerOption[e.lang].beianInfo1),9,tx),t.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,ix),t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),i.$slots.right||e.footerOption?t.renderSlot(i.$slots,"right",{key:1},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",nx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.footerOption[e.lang].link,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s.url},[t.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},t.toDisplayString(s.name),9,rx),a!==e.footerOption[e.lang].link.length-1?(t.openBlock(),t.createBlock(t.unref(I.ODivider),{key:0,direction:"v"})):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0)]),t.createElementVNode("div",sx,[i.$slots.right||e.footerOption?t.renderSlot(i.$slots,"right",{key:0},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",ax,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.footerOption[e.lang].link,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s.url},[t.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},t.toDisplayString(s.name),9,ox),a!==e.footerOption[e.lang].link.length-1?(t.openBlock(),t.createBlock(t.unref(I.ODivider),{key:0,direction:"v"})):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),t.renderSlot(i.$slots,"copyright",{},()=>[t.createElementVNode("div",lx,t.toDisplayString(e.footerOption[e.lang].copyright),1)],!0),i.$slots.left||e.footerOption?t.renderSlot(i.$slots,"left",{key:1},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",ux,[t.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(e.footerOption[e.lang].beianInfo1),9,cx),t.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,dx),t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0)])]),_:3})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.$slots.atom||e.atom?(t.openBlock(),t.createBlock(sn,{key:0},{default:t.withCtx(()=>[t.renderSlot(i.$slots,"atom",{},()=>{var s,a,o;return[e.atom?(t.openBlock(),t.createElementBlock("div",xC,[t.createElementVNode("p",SC,t.toDisplayString((s=e.atom[e.lang])==null?void 0:s.title),1),t.createElementVNode("a",{href:(a=e.atom[e.lang])==null?void 0:a.href,target:"_blank"},[t.createElementVNode("img",{src:(o=e.atom[e.lang])==null?void 0:o.img,class:"atom-logo",alt:""},null,8,kC)],8,EC)])):t.createCommentVNode("",!0),t.createVNode(t.unref(I.ODivider),{class:"atom-divider"})]},!0)]),_:3})):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"footer-content",style:t.normalizeStyle({backgroundImage:`url(${e.footerBg})`})},[t.createVNode(sn,null,{default:t.withCtx(()=>[i.$slots.quickNav||e.quickNav?t.renderSlot(i.$slots,"quickNav",{key:0},()=>[e.quickNav?(t.openBlock(),t.createElementBlock("div",wC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.quickNav[e.lang],s=>(t.openBlock(),t.createElementBlock("div",{key:s.title,class:"category"},[t.createElementVNode("div",DC,t.toDisplayString(s.title),1),t.createElementVNode("ul",AC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.list,a=>(t.openBlock(),t.createElementBlock("li",{key:a.title,class:"nav"},[t.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(a.title),9,IC)]))),128))])]))),128))])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),i.$slots.friendshipLink||e.friendshipLink?t.renderSlot(i.$slots,"friendshipLink",{key:1},()=>[e.friendshipLink?(t.openBlock(),t.createElementBlock("div",NC,[t.createElementVNode("div",OC,t.toDisplayString(e.friendshipLink.title[e.lang]),1),t.createElementVNode("div",BC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.friendshipLink.link[e.lang],s=>(t.openBlock(),t.createElementBlock("a",{href:s.link,key:s.link,target:"_blank"},t.toDisplayString(s.title),9,LC))),128))])])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),t.renderSlot(i.$slots,"footer",{},()=>[t.createElementVNode("div",{class:t.normalizeClass(["inner",{"inner-en":e.lang==="en"}])},[e.footerLogo?(t.openBlock(),t.createElementBlock("div",PC,[t.createElementVNode("img",{class:"show-pc",src:e.footerLogo.logo,alt:""},null,8,MC),t.createElementVNode("img",{class:"show-mo",src:e.footerLogo.logoMb,alt:""},null,8,RC),t.createElementVNode("p",null,[t.createElementVNode("a",{class:"email",href:`mailto:${e.footerLogo.email}`,target:"_blank"},t.toDisplayString(e.footerLogo.email),9,VC)])])):t.createCommentVNode("",!0),e.footerOption?(t.openBlock(),t.createElementBlock("div",FC,[t.createElementVNode("div",$C,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.footerOption[e.lang].link,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s.url},[t.createElementVNode("a",{target:"_blank",href:s.url},t.toDisplayString(s.name),9,UC),a!==e.footerOption[e.lang].link.length-1?(t.openBlock(),t.createBlock(t.unref(I.ODivider),{key:0,style:{"--o-divider-bd-color":"var(--o-color-info3-inverse)","--o-divider-label-gap":"0 8px"},direction:"v"})):t.createCommentVNode("",!0)],64))),128))]),t.createElementVNode("p",zC,[t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].licenseText),1),t.createTextVNode(" "+t.toDisplayString(e.footerOption[e.lang].licenseInfo),1)]),t.createElementVNode("div",HC,[t.createElementVNode("p",null,t.toDisplayString(e.footerOption[e.lang].copyright),1),t.createElementVNode("div",qC,[t.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank"},t.toDisplayString(e.footerOption[e.lang].beianInfo1),9,jC),t.createElementVNode("img",{src:e.footerOption[e.lang].policeIcon,class:"filing-img"},null,8,GC),t.createElementVNode("p",null,t.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])])])):t.createCommentVNode("",!0),e.qrcode?(t.openBlock(),t.createElementBlock("div",WC,[e.lang==="zh"?(t.openBlock(),t.createElementBlock("div",YC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.qrcode,(s,a)=>(t.openBlock(),t.createElementBlock("div",{key:a,class:"code-pop"},[t.createElementVNode("img",{src:s.img,class:"code-img",alt:""},null,8,XC),t.createElementVNode("div",KC,[t.createElementVNode("img",{src:s.code,alt:""},null,8,QC),t.createElementVNode("p",ZC,t.toDisplayString(s.label),1)])]))),128))])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),nh=je._export_sfc(hx,[["__scopeId","data-v-a9088eaf"]]),fx=Object.assign(nh,{install(r){r.component("OFooter",nh)}}),px={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function mx(r,e){return t.openBlock(),t.createElementBlock("svg",px,[...e[0]||(e[0]=[t.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 gx={name:"components-icon-caret-left",render:mx},vx={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function yx(r,e){return t.openBlock(),t.createElementBlock("svg",vx,[...e[0]||(e[0]=[t.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 _x={name:"components-icon-caret-right",render:yx},Tx={class:"header-nav-wrap"},bx={key:0,class:"right-icon"},Cx=["onMouseenter","onMouseleave"],xx=["id"],Sx={class:"nav-text"},Ex=["id","onClick"],kx={class:"nav-text"},wx={key:1,class:"right-icon"},Dx=t.defineComponent({__name:"HeaderNav",props:{navData:{},activeIndex:{},hoverId:{}},emits:["handle-mouseenter","handle-mouseleave","handle-click"],setup(r,{emit:e}){const i=e,{isDark:n}=Et.useTheme(),s=r,a=t.ref(),o=t.ref(),l=t.ref(null),c=t.ref(!1),d=t.ref(!1),m=t.ref(),g=fi.useDebounceFn((F,H)=>{m.value=F==null?void 0:F.id,H==="mouseenter"&&i("handle-mouseenter",F),H==="mouseleave"&&(m.value="",i("handle-mouseleave",F))},100),x=F=>{i("handle-click",F)},T=()=>{d.value=!0,t.nextTick(()=>{a.value.scrollTo({left:a.value.clientWidth,behavior:"smooth"})})},E=()=>{a.value.scrollTo({left:0,behavior:"smooth"}),d.value=!1},v=()=>{var F,H;((F=a.value)==null?void 0:F.clientWidth)<((H=o.value)==null?void 0:H.clientWidth)?c.value=!0:c.value=!1};let b=0,D=0;const N=()=>D=0,w=F=>D>0?void D++:(D++,b=Date.now(),{event:"hover",properties:{module:"navigation",level1:F,target:F}}),$=F=>({properties:{module:"navigation",level1:F.label,target:F.label,steps:D,url:F.href,duration:Date.now()-b}});return t.onMounted(()=>{window.addEventListener("resize",v),t.nextTick(()=>{v(),l.value=setTimeout(()=>{v()},1e3)})}),t.onUnmounted(()=>{window.removeEventListener("resize",v),clearTimeout(l.value)}),(F,H)=>{const O=t.resolveDirective("analytics");return t.openBlock(),t.createElementBlock("div",Tx,[t.createElementVNode("div",{class:t.normalizeClass(["header-nav",{"header-nav-scroll":d.value}])},[d.value?(t.openBlock(),t.createElementBlock("div",bx,[t.createVNode(t.unref(I.OIcon),{onClick:E},{default:t.withCtx(()=>[t.createVNode(t.unref(gx))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"navRef",ref:a,class:t.normalizeClass(["o-nav",{"o-nav-scroll":d.value||!c.value,dark:t.unref(n)}])},[t.createElementVNode("ul",{ref_key:"navListRef",ref:o,class:"o-nav-list",onMouseenter:N},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.navData,(U,C)=>{var k;return t.withDirectives((t.openBlock(),t.createElementBlock("li",{key:U.id,class:t.normalizeClass({"is-selected":m.value===U.id||s.hoverId===U.id,"is-active":s.activeIndex===C}),onMouseenter:P=>t.unref(g)(U,"mouseenter"),onMouseleave:P=>t.unref(g)(U,"mouseleave")},[(k=U==null?void 0:U.children)!=null&&k.length?(t.openBlock(),t.createElementBlock("div",{key:0,id:"tour_headerNav_"+U.id,class:"nav-item"},[t.createElementVNode("span",Sx,t.toDisplayString(U.label),1)],8,xx)):(t.openBlock(),t.createElementBlock("div",{key:1,id:"tour_headerNav_"+U.id,class:"nav-item item-other",onClick:P=>x(U)},[t.createElementVNode("span",kx,t.toDisplayString(U.label),1),U.tag?(t.openBlock(),t.createBlock(t.unref(I.OTag),{key:0,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(U.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,Ex))],42,Cx)),[[O,w(U.label),"mouseenter"],[O,$(U),void 0,{catchBubble:!0}]])}),128))],544)],2),c.value&&!d.value?(t.openBlock(),t.createElementBlock("div",wx,[t.createVNode(t.unref(I.OIcon),{onClick:T},{default:t.withCtx(()=>[t.createVNode(t.unref(_x))]),_:1})])):t.createCommentVNode("",!0)],2)])}}}),Ax=je._export_sfc(Dx,[["__scopeId","data-v-fe042238"]]),Ix={class:"nav-sub-content"},Nx={class:"content-left"},Ox={class:"content-label"},Bx={class:"content-container"},Lx=["href","target"],Px={class:"item-name"},Mx={key:0,class:"desc-container"},Rx=["title"],Vx={key:0,class:"split-line"},Fx={key:1,class:"content-right"},$x={class:"content-label"},Ux=["href","target"],zx=["href","target"],Hx=["src"],qx={class:"review-content"},jx={class:"review-label"},Gx={class:"review-property"},Wx=t.defineComponent({__name:"HeaderContent",props:{itemData:{},itemVisible:{type:Boolean},community:{},bgLeft:{},bgRight:{},hoverIndex:{}},emits:["handle-mouseenter-sub","handle-mouseleave-sub"],setup(r,{emit:e}){const i=e,n=r,{locale:s}=Et.useLocale(),{theme:a}=Et.useTheme(),o=t.ref(!1),l=()=>{var T;i("handle-mouseenter-sub",(T=n.itemData)==null?void 0:T.id),o.value=!0},c=()=>{i("handle-mouseenter-sub",""),o.value=!1},d=t.ref(!1),m=T=>{if(!T||!T.target)return;const E=T.target;d.value=E.clientHeight<E.scrollHeight},g=(T,E)=>({properties:{module:"navigation",level1:T.label,level2:E.label,target:E.label,url:T.href}}),x=T=>({properties:{module:"navigation",level1:s.value==="zh"?"快捷链接":"Quick Link",level2:T.label,target:T.label,url:T.href}});return(T,E)=>{var b,D,N;const v=t.resolveDirective("analytics");return t.openBlock(),t.createElementBlock("div",{onMouseenter:l,onMouseleave:c},[(n.itemVisible||o.value)&&((D=(b=n.itemData)==null?void 0:b.children)!=null&&D.length)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["nav-content",[(N=n.community)==null?void 0:N.toLowerCase(),n.hoverIndex,t.unref(a),`${n.hoverIndex}-${t.unref(s)}`]])},[t.createElementVNode("div",{class:"nav-background-left",style:t.normalizeStyle({backgroundImage:`url(${n.bgLeft})`})},null,4),t.createElementVNode("div",{class:"nav-background-right",style:t.normalizeStyle({backgroundImage:`url(${n.bgRight})`})},null,4),t.createVNode(sn,null,{default:t.withCtx(()=>[t.createVNode(t.unref(I.OScroller),{class:"nav-scroller","show-type":"always",size:"small","disabled-y":""},{default:t.withCtx(()=>{var w,$,F,H,O,U,C,k;return[t.createElementVNode("div",Ix,[t.createElementVNode("div",Nx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((w=n.itemData)==null?void 0:w.children,(P,z)=>(t.openBlock(),t.createElementBlock("div",{class:"item-sub",key:z},[t.createElementVNode("span",Ox,t.toDisplayString(P.label),1),t.createElementVNode("div",Bx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P.children,B=>(t.openBlock(),t.createElementBlock("div",{key:B.label,class:"content-item"},[t.withDirectives((t.openBlock(),t.createElementBlock("a",{href:B.href,target:(B==null?void 0:B.target)||"_self",rel:"noopener noreferrer",class:"item-label"},[t.createElementVNode("span",Px,t.toDisplayString(B.label),1),B.icon?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(B.icon)))]),_:2},1024)):t.createCommentVNode("",!0),B.tag?(t.openBlock(),t.createBlock(t.unref(I.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(B.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,Lx)),[[v,()=>g(P,B)]]),B.description?(t.openBlock(),t.createElementBlock("div",Mx,[t.createElementVNode("p",{class:"item-desc",title:d.value?B.description:void 0,onMouseenter:E[0]||(E[0]=R=>m(R))},t.toDisplayString(B.description),41,Rx)])):t.createCommentVNode("",!0)]))),128))])]))),128))]),(F=($=n.itemData)==null?void 0:$.shortcut)!=null&&F.length?(t.openBlock(),t.createElementBlock("div",Vx)):t.createCommentVNode("",!0),(O=(H=n.itemData)==null?void 0:H.shortcut)!=null&&O.length?(t.openBlock(),t.createElementBlock("div",Fx,[t.createElementVNode("span",$x,t.toDisplayString(t.unref(s)==="zh"?"快捷链接":"Quick Link"),1),(U=n.itemData)!=null&&U.withPicture?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList((k=n.itemData)==null?void 0:k.shortcut,P=>t.withDirectives((t.openBlock(),t.createElementBlock("a",{key:P.label,href:P.href,target:(P==null?void 0:P.target)||"_self",rel:"noopener noreferrer",class:"review"},[t.createElementVNode("img",{src:P.picture,class:"review-picture"},null,8,Hx),t.createElementVNode("div",qx,[t.createElementVNode("p",jx,t.toDisplayString(P.label),1),t.createElementVNode("div",Gx,t.toDisplayString(P.remark),1)])],8,zx)),[[v,()=>x(P)]])),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList((C=n.itemData)==null?void 0:C.shortcut,P=>(t.openBlock(),t.createElementBlock("div",{key:P.label,class:"shortcut"},[t.withDirectives((t.openBlock(),t.createElementBlock("a",{href:P.href,target:(P==null?void 0:P.target)||"_self",rel:"noopener noreferrer",class:"shortcut-link"},[t.createElementVNode("span",null,t.toDisplayString(P.label),1),P.icon?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(P.icon)))]),_:2},1024)):t.createCommentVNode("",!0)],8,Ux)),[[v,()=>x(P)]])]))),128))])):t.createCommentVNode("",!0)])]}),_:1})]),_:1})],2)):t.createCommentVNode("",!0)],32)}}}),Yx=je._export_sfc(Wx,[["__scopeId","data-v-a2219e83"]]),Xx={class:"header"},Kx=["src"],Qx={class:"header-nav"},Zx={key:0,class:"header-toolbar"},Jx={class:"header-nav-content"},eS=t.defineComponent({__name:"OHeader",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-home","handle-click"],setup(r,{emit:e}){const{isDark:i}=Et.useTheme(),n=e,s=r,a=t.ref(),o=t.ref(),l=t.ref(),c=t.ref(!1),d=()=>{n("go-home")},m=v=>{var b;l.value=v,a.value=v.id,(b=v==null?void 0:v.children)!=null&&b.length&&(c.value=!0)},g=()=>{c.value=!1},x=v=>{n("handle-click",v)},T=v=>{o.value=v},E=v=>{o.value=v};return(v,b)=>(t.openBlock(),t.createElementBlock("div",Xx,[t.createElementVNode("div",{class:t.normalizeClass(["header-wrap",{"header-wrap-dark":t.unref(i)}])},[t.createVNode(sn,{class:"header-content"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:"header-logo",onClick:d},[t.renderSlot(v.$slots,"logo",{},()=>[s.logo?(t.openBlock(),t.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:s.logo},null,8,Kx)):t.createCommentVNode("",!0)],!0)]),t.createElementVNode("div",Qx,[t.renderSlot(v.$slots,"nav",{},()=>[s.navData?(t.openBlock(),t.createBlock(Ax,{key:0,"nav-data":s.navData,hoverId:o.value,"active-index":s.activeIndex,onHandleMouseenter:m,onHandleMouseleave:g,onHandleClick:x},null,8,["nav-data","hoverId","active-index"])):t.createCommentVNode("",!0)],!0)]),v.$slots.toolbar?(t.openBlock(),t.createElementBlock("div",Zx,[t.renderSlot(v.$slots,"toolbar",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3})],2),t.createElementVNode("div",Jx,[t.createVNode(Yx,{itemData:l.value,"item-visible":c.value,"bg-left":s.bgLeft,"bg-right":s.bgRight,community:s.community,"hover-index":a.value,onHandleMouseenterSub:T,onHandleMouseleaveSub:E},null,8,["itemData","item-visible","bg-left","bg-right","community","hover-index"])])]))}}),rh=je._export_sfc(eS,[["__scopeId","data-v-269d575f"]]);var Ji=(r=>(r.NAV="nav",r.CODE="code",r.LANG="lang",r))(Ji||{});const tS={class:"o-nav"},iS={class:"o-nav-list"},nS=["onClick"],rS={class:"nav-aside"},sS={key:0,class:"nav-aside-wrapper"},aS=["value"],oS={class:"content-label"},lS={class:"container-mobile"},uS=["onClick"],cS={class:"item-label"},dS={class:"desc-container"},hS={class:"item-desc"},fS=["onClick"],pS={class:"item-label"},mS={key:1,class:"nav-aside-wrapper"},gS=["onClick"],vS={class:"header-tool"},yS={key:2,class:"other-tool"},_S=t.defineComponent({__name:"HeaderNavMobile",props:{menuShow:{type:Boolean,default:!1},navData:{default:()=>[]},codeData:{default:()=>[]},langData:{default:()=>[]}},emits:["on-click","lang-click","handle-click"],setup(r,{emit:e}){const i=e,n=r,s=t.ref(""),a=t.ref({}),o=(d,m)=>{var g;m===Ji.NAV?(g=d==null?void 0:d.children)!=null&&g.length?(s.value=d.id,a.value=d):i("handle-click",d):m===Ji.CODE?(s.value=m,a.value=n.codeData.list):m===Ji.LANG&&(s.value=m,a.value=n.langData.list)},l=(d,m)=>{window.open(d,m||"_self"),i("on-click")},c=d=>{s.value===Ji.CODE?l(d.href,d==null?void 0:d.target):s.value===Ji.LANG&&i("lang-click",d)};return t.onMounted(()=>{s.value=n.navData[0].id,a.value=n.navData[0]}),t.watch(()=>n.navData||n.codeData||n.langData,()=>{s.value===Ji.CODE?a.value=n.codeData.list:s.value===Ji.LANG?a.value=n.langData.list:a.value=n.navData.find(d=>d.id===s.value)},{deep:!0}),(d,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["header-nav",{active:r.menuShow}])},[t.createElementVNode("div",tS,[t.createElementVNode("ul",iS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.navData,g=>(t.openBlock(),t.createElementBlock("li",{key:g.id,class:t.normalizeClass({active:s.value===g.id})},[t.createElementVNode("span",{onClick:x=>o(g,"nav")},t.toDisplayString(g.label),9,nS)],2))),128))]),t.createElementVNode("div",rS,[s.value!=="code"&&s.value!=="lang"?(t.openBlock(),t.createElementBlock("ul",sS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value.children,g=>(t.openBlock(),t.createElementBlock("li",{value:g.label,key:g.label,class:"nav-aside-content"},[g!=null&&g.children?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("p",oS,t.toDisplayString(g.label),1),t.createElementVNode("div",lS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g==null?void 0:g.children,x=>(t.openBlock(),t.createElementBlock("div",{key:x.label,class:"content-container-mobile"},[t.createElementVNode("a",{onClick:T=>l(x.href,x==null?void 0:x.target),rel:"noopener noreferrer",class:"content-subtitle"},[t.createElementVNode("span",cS,t.toDisplayString(x.label),1),x.icon?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(x.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0),x.tag?(t.openBlock(),t.createBlock(t.unref(I.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,uS),t.createElementVNode("div",dS,[t.createElementVNode("p",hS,t.toDisplayString(x.description),1)])]))),128))])],64)):(t.openBlock(),t.createElementBlock("a",{key:1,onClick:x=>l(g.href,g==null?void 0:g.target),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[t.createElementVNode("span",pS,t.toDisplayString(g.label),1),g.icon?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0),g.tag?(t.openBlock(),t.createBlock(t.unref(I.OTag),{key:1,round:"pill",color:"danger",size:"small"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,fS))],8,aS))),128))])):(t.openBlock(),t.createElementBlock("div",mS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,g=>(t.openBlock(),t.createElementBlock("a",{key:g.label,onClick:x=>c(g),class:"source-code-item"},[t.createElementVNode("span",null,t.toDisplayString(g.label),1),g.icon?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0)],8,gS))),128))]))])]),t.createElementVNode("div",vS,[r.codeData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["header-tool-item",{active:s.value==="code"}]),onClick:m[0]||(m[0]=g=>o(null,"code"))},t.toDisplayString(r.codeData.label),3)):t.createCommentVNode("",!0),r.langData?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["header-tool-item",{active:s.value==="lang"}]),onClick:m[1]||(m[1]=g=>o(null,"lang"))},t.toDisplayString(r.langData.label),3)):t.createCommentVNode("",!0),d.$slots.tool?(t.openBlock(),t.createElementBlock("div",yS,[t.renderSlot(d.$slots,"tool",{},void 0,!0)])):t.createCommentVNode("",!0)])],2))}}),TS=je._export_sfc(_S,[["__scopeId","data-v-7aa3e2e5"]]),bS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function CS(r,e){return t.openBlock(),t.createElementBlock("svg",bS,[...e[0]||(e[0]=[t.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 xS={name:"components-icon-header-menu",render:CS},SS={class:"header"},ES={class:"header-box"},kS={key:0,class:"header-simple"},wS={class:"simple-header-left"},DS={key:0,class:"header-title"},AS={key:0,class:"simple-header-right"},IS={class:"header-left"},NS={class:"header-center"},OS=["src"],BS={class:"header-right"},LS=t.defineComponent({__name:"OHeaderMobile",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-back","lang-click","go-home"],setup(r,{emit:e}){const i=e,n=r,s=()=>{i("go-back")},a=()=>{i("go-home")},o=t.ref(!1),l=()=>{setTimeout(()=>{o.value=!o.value},200)},c=()=>{l()},d=()=>{l()},m=g=>{i("lang-click",g),l()};return(g,x)=>(t.openBlock(),t.createElementBlock("div",SS,[t.createElementVNode("div",ES,[t.createVNode(sn,{class:"header-wrap"},{default:t.withCtx(()=>[r.isSimpleHeader?(t.openBlock(),t.createElementBlock("div",kS,[t.createElementVNode("div",wS,[t.createVNode(t.unref(I.OIcon),{onClick:s},{default:t.withCtx(()=>[t.createVNode(t.unref(I.OIconArrowLeft))]),_:1}),r.headerTitle?(t.openBlock(),t.createElementBlock("div",DS,t.toDisplayString(r.headerTitle),1)):t.createCommentVNode("",!0)]),g.$slots.rightConfig?(t.openBlock(),t.createElementBlock("div",AS,[t.renderSlot(g.$slots,"rightConfig",{},void 0,!0)])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",IS,[t.createVNode(t.unref(I.OIcon),{onClick:l},{default:t.withCtx(()=>[o.value?(t.openBlock(),t.createBlock(t.unref(Dl),{key:1})):(t.openBlock(),t.createBlock(t.unref(xS),{key:0}))]),_:1})]),t.createElementVNode("div",NS,[t.createElementVNode("div",{class:"header-logo",onClick:a},[t.renderSlot(g.$slots,"logo",{},()=>[n.logo?(t.openBlock(),t.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:n.logo},null,8,OS)):t.createCommentVNode("",!0)],!0)])]),t.createElementVNode("div",BS,[t.renderSlot(g.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]),t.createElementVNode("div",{class:t.normalizeClass(["header-content-mb",{"header-content-active":o.value}])},[t.createVNode(TS,{ref:"mobileNav","nav-data":r.navData,"code-data":r.codeData,"lang-data":r.langData,"menu-show":o.value,onHandleClick:d,onOnClick:c,onLangClick:m},{tool:t.withCtx(()=>[t.renderSlot(g.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","lang-data","menu-show"])],2)]))}}),sh=je._export_sfc(LS,[["__scopeId","data-v-1d6060f9"]]),PS=Object.assign(rh,{install(r){r.component("OHeader",rh)}}),MS=Object.assign(sh,{install(r){r.component("OHeaderMobile",sh)}}),RS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function VS(r,e){return t.openBlock(),t.createElementBlock("svg",RS,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12.066 3.3c4.775 0.035 8.634 3.917 8.634 8.7s-3.859 8.664-8.633 8.699c-0.024 0.003-0.049 0.004-0.073 0.004-0.019 0-0.038-0.001-0.057-0.003l-0.005-0c-4.774-0.036-8.633-3.918-8.633-8.7s3.859-8.664 8.634-8.7h0.005c0.022-0.002 0.045-0.003 0.067-0.003 0.020 0 0.040 0.001 0.060 0.003zM4.733 11.3h2.589c0.021-0.33 0.058-0.658 0.109-0.984 0.045-0.288 0.103-0.573 0.172-0.857 0.096-0.393 0.213-0.778 0.352-1.155 0.146-0.398 0.317-0.787 0.511-1.168 0.171-0.336 0.36-0.661 0.564-0.975 0.239-0.366 0.501-0.718 0.785-1.055 0.028-0.033 0.056-0.066 0.084-0.099-2.793 0.837-4.882 3.302-5.167 6.293zM4.733 12.7c0.284 2.991 2.374 5.456 5.167 6.293l-0.084-0.099c-0.284-0.337-0.546-0.689-0.785-1.055-0.205-0.314-0.393-0.639-0.564-0.975-0.195-0.38-0.365-0.77-0.511-1.168-0.139-0.377-0.256-0.762-0.352-1.155-0.069-0.284-0.126-0.57-0.172-0.857-0.052-0.326-0.088-0.654-0.109-0.984h-2.589zM8.726 12.7c0.020 0.274 0.053 0.547 0.097 0.817 0.038 0.232 0.085 0.464 0.141 0.693 0.171 0.702 0.42 1.374 0.749 2.017 0.147 0.288 0.309 0.567 0.484 0.837 0.21 0.322 0.439 0.631 0.689 0.927 0.242 0.287 0.5 0.558 0.774 0.812l0.071 0.065q0.132 0.121 0.27 0.237 0.137-0.116 0.27-0.237l0.071-0.065c0.273-0.254 0.531-0.525 0.774-0.812 0.25-0.296 0.479-0.605 0.689-0.927 0.175-0.27 0.337-0.549 0.484-0.837 0.329-0.643 0.578-1.316 0.749-2.017 0.056-0.23 0.103-0.461 0.141-0.693 0.044-0.27 0.077-0.543 0.097-0.817h-6.548zM15.274 11.3c-0.020-0.274-0.053-0.547-0.097-0.817-0.038-0.233-0.085-0.464-0.141-0.694-0.082-0.34-0.184-0.673-0.304-0.999-0.128-0.347-0.276-0.687-0.445-1.018-0.147-0.288-0.309-0.567-0.484-0.837-0.209-0.322-0.439-0.631-0.689-0.927-0.242-0.287-0.501-0.558-0.774-0.813l-0.071-0.065q-0.132-0.121-0.27-0.237-0.137 0.116-0.27 0.237l-0.071 0.065c-0.273 0.254-0.531 0.525-0.774 0.813-0.25 0.296-0.479 0.605-0.689 0.927-0.176 0.27-0.337 0.549-0.484 0.837-0.169 0.332-0.318 0.671-0.445 1.018-0.12 0.326-0.221 0.659-0.304 0.999-0.056 0.23-0.103 0.461-0.141 0.694-0.044 0.27-0.077 0.543-0.097 0.817h6.548zM16.677 11.3h2.589c-0.284-2.991-2.374-5.456-5.167-6.293l0.084 0.099c0.284 0.337 0.546 0.689 0.785 1.055 0.205 0.314 0.393 0.639 0.564 0.975 0.195 0.381 0.365 0.77 0.511 1.168 0.139 0.377 0.256 0.762 0.351 1.155 0.069 0.284 0.126 0.57 0.172 0.857 0.051 0.326 0.088 0.654 0.109 0.984zM16.677 12.7c-0.021 0.33-0.058 0.658-0.109 0.984-0.045 0.288-0.103 0.573-0.172 0.857-0.096 0.393-0.213 0.778-0.351 1.155-0.147 0.398-0.317 0.788-0.511 1.168-0.171 0.336-0.36 0.661-0.564 0.975-0.239 0.366-0.501 0.718-0.785 1.055l-0.084 0.099c2.793-0.838 4.882-3.302 5.167-6.293h-2.589z"},null,-1)])])}const FS={name:"components-icon-locale",render:VS},$S={class:"info-wrap"},US=["onClick"],zS=t.defineComponent({__name:"OHeaderLanguageSwitcher",props:{options:{type:Array,default(){return[{id:"zh",label:"简体中文",simple:"中"},{id:"en",label:"English",simple:"EN"}]}},type:{type:String,default:"auto"},auto:{type:Boolean,default:!0}},emits:["change"],setup(r,{emit:e}){const i=r,{changeLocale:n,locale:s}=Et.useLocale(),{lePadV:a}=Et.useScreen(),o=t.computed(()=>s.value),l=e,c=g=>{i.auto&&n(),l("change",g)},d=(g,x)=>{const T=i.options.find(v=>v.id===g);if(T)return x?T.simple:T.label;const E=i.options[0];return x?E.simple:E.label},m=t.computed(()=>i.type==="common"||i.type==="auto"&&!a.value);return(g,x)=>m.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.options.length<=1?"hide-lang":"header-lang")},[t.createVNode(t.unref(I.ODropdown),{trigger:"hover",optionPosition:"bottom","option-wrap-class":"dropdown"},{dropdown:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.options,T=>(t.openBlock(),t.createBlock(t.unref(I.ODropdownItem),{onClick:E=>c(T),key:T.id,class:t.normalizeClass(["list",{"is-active":o.value===T.id}])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(d(T.id)),1)]),_:2},1032,["onClick","class"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("div",$S,[t.createVNode(t.unref(I.OIcon),{class:"icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(FS)),t.createElementVNode("div",{class:t.normalizeClass(["locale-tag",{"is-en":o.value==="en"}])},t.toDisplayString(d(o.value,!0)),3)]),_:1})])]),_:1})],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.options.length<=1?"hide-lang":"mobile-change-language")},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.options,T=>(t.openBlock(),t.createElementBlock("span",{key:T.id,class:t.normalizeClass({active:o.value===T.id}),onClick:t.withModifiers(E=>c(T),["stop"])},t.toDisplayString(d(T.id,!0)),11,US))),128))],2))}}),ah=je._export_sfc(zS,[["__scopeId","data-v-00163ab5"]]),HS=Object.assign(ah,{install(r){r.component("OHeaderLanguageSwitcher",ah)}});function qS(r){const e=t.ref(""),i=t.ref(null),n=t.ref(""),s=t.ref(!1);let a=null;const o=b=>{var w,$,F,H;const D=(w=r.allowedImageTypes)==null?void 0:w.value,N=D&&D.length>0?D.includes(b.type):($=b.type)==null?void 0:$.startsWith("image/");return!b.type||!N?((F=r.onValidationError)==null||F.call(r,"type",b),!1):r.maxImageSize.value>0&&b.size>r.maxImageSize.value?((H=r.onValidationError)==null||H.call(r,"size",b),!1):!0},l=()=>{if(e.value)try{URL.revokeObjectURL(e.value)}catch{}e.value="",i.value=null,n.value="",s.value=!1,a=null},c=b=>{if(!b){i.value||l();return}if(n.value!==b){if(e.value&&e.value.startsWith("blob:"))try{URL.revokeObjectURL(e.value)}catch{}n.value=b,e.value=b,i.value=null}},d=b=>{var N,w;if(!o(b))return;l(),i.value=b,e.value=URL.createObjectURL(b),(N=r.onUploadStart)==null||N.call(r,b);const D=(w=r.uploadImage)==null?void 0:w.value;D&&(s.value=!0,a=Promise.resolve().then(()=>D(b)).then($=>{var F;$&&i.value===b&&(n.value=$,(F=r.onUploadSuccess)==null||F.call(r,$,b))}).catch($=>{var F;(F=r.onUploadError)==null||F.call(r,$,b)}).finally(()=>{s.value=!1}))},m=b=>{var N;const D=(N=b.clipboardData)==null?void 0:N.items;if(D)for(let w=0;w<D.length;w++){const $=D[w];if($.type.startsWith("image/")){const F=$.getAsFile();F&&d(F);break}}},g=b=>{b.preventDefault(),b.stopPropagation()},x=b=>{var N,w;b.preventDefault(),b.stopPropagation();const D=(w=(N=b.dataTransfer)==null?void 0:N.files)==null?void 0:w[0];D&&D.type.startsWith("image/")&&d(D)},T=b=>{var w;const D=b.target,N=(w=D.files)==null?void 0:w[0];N&&d(N),D&&(D.value="")},E=b=>{b&&(b.value="",b.click())},v=()=>a??Promise.resolve();return t.onBeforeUnmount(l),{previewUrl:e,file:i,uploadedUrl:n,isUploading:s,onPaste:m,onDrop:x,onDragOver:g,onFileChange:T,pickFile:E,handleImageFile:d,reset:l,setExternalUrl:c,awaitUpload:v}}const jS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function GS(r,e){return t.openBlock(),t.createElementBlock("svg",jS,[...e[0]||(e[0]=[t.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),t.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 up={name:"components-icon-header-search",render:GS},WS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function YS(r,e){return t.openBlock(),t.createElementBlock("svg",WS,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",d:"M19.724 4.238c1.105 0 2 0.895 2 2v6.772c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-0.816l-3.544 3.84c-0.248 0.268-0.661 0.301-0.948 0.075l-4.13-3.256-3.925 3.843c-0.249 0.243-0.632 0.264-0.904 0.064l-0.086-0.075c-0.27-0.276-0.266-0.72 0.011-0.99l4.365-4.273c0.251-0.246 0.647-0.267 0.923-0.050l4.104 3.235 4.134-4.478v-3.892c0-0.331-0.269-0.6-0.6-0.6h-15.45c-0.331 0-0.6 0.269-0.6 0.6v11.501c0 0.331 0.269 0.6 0.6 0.6h9.781c0.387 0 0.7 0.313 0.7 0.7s-0.313 0.7-0.7 0.7h-9.781c-1.105 0-2-0.895-2-2v-11.501c0-1.105 0.895-2 2-2h15.45zM9.532 8.878c0-0.695-0.579-1.259-1.294-1.259s-1.294 0.564-1.294 1.259c0 0.695 0.579 1.259 1.294 1.259s1.294-0.564 1.294-1.259zM16.561 18.645c-0.195-0.195-0.195-0.512 0-0.707l2.090-2.090c0.010-0.011 0.020-0.021 0.030-0.030l0.001-0.001c0.195-0.195 0.512-0.195 0.707 0l2.121 2.121c0.195 0.195 0.195 0.512 0 0.707s-0.512 0.195-0.707 0l-1.284-1.284v3.57c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-3.538l-1.251 1.251c-0.174 0.174-0.443 0.193-0.638 0.058l-0.069-0.058z"},null,-1)])])}const XS={name:"components-icon-image-upload",render:YS},KS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function QS(r,e){return t.openBlock(),t.createElementBlock("svg",KS,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"#6f6f75",d:"M22.5 12c0 5.799-4.701 10.5-10.5 10.5s-10.5-4.701-10.5-10.5c0-5.799 4.701-10.5 10.5-10.5s10.5 4.701 10.5 10.5z"},null,-1),t.createElementVNode("path",{fill:"#ffffff",d:"M15.3 7.631c0.274-0.197 0.657-0.172 0.903 0.074 0.273 0.273 0.273 0.717 0 0.99l-3.259 3.259 3.259 3.259c0.273 0.273 0.273 0.717 0 0.99-0.246 0.246-0.63 0.271-0.903 0.074l-0.087-0.074-3.259-3.259-3.259 3.259-0.087 0.074c-0.274 0.197-0.657 0.172-0.903-0.074-0.273-0.273-0.273-0.717 0-0.99l3.259-3.259-3.259-3.259c-0.273-0.273-0.273-0.717 0-0.99 0.246-0.246 0.63-0.271 0.903-0.074l0.087 0.074 3.259 3.259 3.259-3.259 0.087-0.074z"},null,-1)])])}const El={name:"components-icon-delete-hover",render:QS},ZS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function JS(r,e){return t.openBlock(),t.createElementBlock("svg",ZS,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M3.398 10.877c0-4.099 3.323-7.423 7.423-7.423s7.423 3.323 7.423 7.423c0 4.099-3.323 7.423-7.423 7.423s-7.423-3.323-7.423-7.423zM16.774 10.877c0-3.326-2.657-6.023-5.935-6.023s-5.935 2.696-5.935 6.023c0 3.326 2.657 6.023 5.935 6.023s5.935-2.696 5.935-6.023zM11.499 13.369c0 0.365-0.296 0.661-0.661 0.661s-0.661-0.296-0.661-0.661v-1.821h-1.775c-0.371 0-0.671-0.3-0.671-0.671s0.3-0.671 0.671-0.671h1.775v-1.821c0-0.365 0.296-0.661 0.661-0.661s0.661 0.296 0.661 0.661v1.821h1.775c0.371 0 0.671 0.3 0.671 0.671s-0.3 0.671-0.671 0.671h-1.775v1.821zM16.579 16.598c0.242-0.246 0.62-0.271 0.89-0.075l0.086 0.074 2.72 2.754c0.27 0.273 0.27 0.716 0.001 0.99-0.242 0.246-0.62 0.271-0.89 0.075l-0.086-0.074-2.72-2.754c-0.27-0.273-0.27-0.716-0.001-0.99z"},null,-1)])])}const oh={name:"components-icon-image-zoomin",render:JS},eE={class:"o-search-image-input-row"},tE={key:0,class:"o-search-image-input-thumb"},iE={key:0,class:"o-search-image-input-preview"},nE={class:"o-search-image-input-preview-wrapper"},rE={class:"o-search-image-input-preview-zoom"},sE=["accept"],aE=t.defineComponent({__name:"SearchImageInput",props:{modelValue:{default:""},imageUrl:{default:""},placeholder:{},imagePlaceholder:{},size:{default:"medium"},enableImageSearch:{type:Boolean,default:!1},uploadImage:{},maxImageSize:{default:10*1024*1024},imageUploadTooltip:{},expanded:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},showSuffix:{type:Boolean,default:!0},inlineThumbnail:{type:Boolean,default:!1},preview:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},allowedImageTypes:{default:()=>["image/jpeg","image/png","image/gif","image/webp"]}},emits:["update:modelValue","update:imageUrl","focus","blur","enter","clear","image-clear","image-upload-start","image-upload-success","image-upload-error","image-validate-error","preview-change"],setup(r,{expose:e,emit:i}){const n=r,s=i,{t:a}=je.useI18n(),o=t.computed(()=>n.uploadImage),l=t.computed(()=>n.maxImageSize),c=t.computed(()=>n.allowedImageTypes),d=t.computed(()=>(n.allowedImageTypes??[]).join(",")),m=qS({uploadImage:o,maxImageSize:l,allowedImageTypes:c,onUploadStart:P=>s("image-upload-start",P),onUploadSuccess:(P,z)=>{s("update:imageUrl",P),s("image-upload-success",P,z)},onUploadError:(P,z)=>s("image-upload-error",P,z),onValidationError:(P,z)=>s("image-validate-error",P,z)}),g=t.ref(),x=t.ref(),T=t.ref(null),E=t.computed({get:()=>n.modelValue,set:P=>s("update:modelValue",P)});t.watch(()=>n.imageUrl,P=>{m.setExternalUrl(P)},{immediate:!0});const v=t.computed(()=>!!m.previewUrl.value),b=t.computed(()=>v.value?n.imagePlaceholder??a("search.extendedPlaceholder"):n.placeholder??a("search.placeholder")),D=()=>{E.value="",v.value&&N(),s("clear")},N=()=>{m.reset(),s("update:imageUrl",""),s("image-clear")},w=()=>{m.pickFile(g.value),t.nextTick(()=>{var P,z;return(z=(P=x.value)==null?void 0:P.focus)==null?void 0:z.call(P)})},$=P=>{m.onFileChange(P),t.nextTick(()=>{var z,B;return(B=(z=x.value)==null?void 0:z.focus)==null?void 0:B.call(z)})},F=P=>{n.enableImageSearch&&m.onPaste(P)},H=P=>{n.enableImageSearch&&m.onDragOver(P)},O=P=>{n.enableImageSearch&&m.onDrop(P)},U=P=>{s("preview-change",P)},C=t.computed(()=>!!E.value||v.value);return e({focus:()=>{var P,z;return(z=(P=x.value)==null?void 0:P.focus)==null?void 0:z.call(P)},blur:()=>{var P,z;return(z=(P=x.value)==null?void 0:P.blur)==null?void 0:z.call(P)},awaitUpload:()=>m.awaitUpload(),getUploadedUrl:()=>m.uploadedUrl.value,getIsUploading:()=>m.isUploading.value,resetImage:()=>{m.reset(),s("update:imageUrl","")}}),(P,z)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-search-image-input",{"has-image":v.value,"is-expanded":r.expanded&&v.value}]),onDragover:H,onDrop:O},[t.createElementVNode("div",eE,[t.createVNode(t.unref(I.OInput),{ref_key:"inputRef",ref:x,modelValue:E.value,"onUpdate:modelValue":z[3]||(z[3]=B=>E.value=B),placeholder:b.value,size:r.size,disabled:r.disabled,class:"o-search-image-input-input",onPressEnter:z[4]||(z[4]=B=>s("enter")),onFocus:z[5]||(z[5]=B=>s("focus",B)),onBlur:z[6]||(z[6]=B=>s("blur",B)),onPaste:F},t.createSlots({prefix:t.withCtx(()=>[t.renderSlot(P.$slots,"prefix",{},()=>[t.createVNode(t.unref(I.OIcon),{class:"o-search-image-input-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(up))]),_:1})],!0),r.inlineThumbnail&&v.value?(t.openBlock(),t.createElementBlock("div",tE,[t.createVNode(t.unref(I.OFigure),{src:t.unref(m).previewUrl.value,alt:"",class:"o-search-image-input-thumb-figure"},null,8,["src"]),t.createElementVNode("div",{class:"o-search-image-input-thumb-zoom",onMousedown:z[0]||(z[0]=t.withModifiers(()=>{},["prevent"]))},[t.createVNode(t.unref(I.OIcon),{class:"o-search-image-input-thumb-zoom-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(oh))]),_:1})],32),t.createVNode(t.unref(I.OIcon),{class:"o-search-image-input-thumb-remove",onMousedown:z[1]||(z[1]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(N,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(El))]),_:1})])):t.createCommentVNode("",!0)]),_:2},[r.showSuffix?{name:"suffix",fn:t.withCtx(()=>[t.renderSlot(P.$slots,"suffix",{hasValue:C.value},()=>[r.enableImageSearch?(t.openBlock(),t.createElementBlock("span",{key:0,ref_key:"uploadBtnRef",ref:T,class:"o-search-image-input-upload-btn"},[t.createVNode(t.unref(I.OIcon),{class:"o-search-image-input-icon upload",onClick:t.withModifiers(w,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(XS))]),_:1})],512)):t.createCommentVNode("",!0),r.enableImageSearch&&T.value?(t.openBlock(),t.createBlock(t.unref(I.OPopover),{key:1,trigger:"hover",position:"bottom",target:T.value,"body-class":"o-search-image-input-tooltip"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.imageUploadTooltip??t.unref(a)("search.imageUploadTooltip")),1)]),_:1},8,["target"])):t.createCommentVNode("",!0),r.clearable&&C.value?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:2,class:"o-search-image-input-icon close",onMousedown:z[2]||(z[2]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(D,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(Dl))]),_:1})):t.createCommentVNode("",!0)],!0)]),key:"0"}:void 0]),1032,["modelValue","placeholder","size","disabled"])]),r.expanded&&v.value?(t.openBlock(),t.createElementBlock("div",iE,[t.renderSlot(P.$slots,"preview",{previewUrl:t.unref(m).previewUrl.value,remove:N},()=>[t.createElementVNode("div",nE,[t.createVNode(t.unref(I.OFigure),{src:t.unref(m).previewUrl.value,preview:r.preview,alt:"",class:"o-search-image-input-preview-figure",onPreview:U},null,8,["src","preview"]),t.createElementVNode("div",rE,[t.createVNode(t.unref(I.OIcon),{class:"o-search-image-input-preview-zoom-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(oh))]),_:1})]),t.createVNode(t.unref(I.OIcon),{class:"o-search-image-input-preview-remove",onClick:t.withModifiers(N,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(El))]),_:1})])],!0)])):t.createCommentVNode("",!0),r.enableImageSearch?(t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"fileInputRef",ref:g,type:"file",accept:d.value,class:"o-search-image-input-file",onChange:$},null,40,sE)):t.createCommentVNode("",!0)],34))}}),cp=je._export_sfc(aE,[["__scopeId","data-v-f28dde35"]]),oE={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function lE(r,e){return t.openBlock(),t.createElementBlock("svg",oE,[...e[0]||(e[0]=[t.createStaticVNode('<path opacity="0.8" fill="currentColor" d="M5.616 4.34c0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v14.968c0 0.213 0.148 0.391 0.347 0.438l0.103 0.012h10.719c0.213 0 0.391-0.148 0.438-0.347l0.012-0.103v-11.712c0-0.414 0.336-0.75 0.75-0.75 0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v11.712c0 1.010-0.767 1.84-1.751 1.94l-0.199 0.010h-10.719c-1.010 0-1.84-0.767-1.94-1.751l-0.010-0.199v-14.968c0-0.414 0.336-0.75 0.75-0.75z"></path><path opacity="0.8" fill="currentColor" d="M20.19 4.34c0.414 0 0.75 0.336 0.75 0.75 0 0.368-0.265 0.674-0.615 0.738l-0.135 0.012h-16.333c-0.414 0-0.75-0.336-0.75-0.75 0-0.368 0.265-0.674 0.615-0.738l0.135-0.012h16.333z"></path><path opacity="0.8" fill="currentColor" d="M14.256 1.936c0.414 0 0.75 0.336 0.75 0.75 0 0.368-0.265 0.674-0.615 0.738l-0.135 0.012h-4.535c-0.414 0-0.75-0.336-0.75-0.75 0-0.368 0.265-0.674 0.615-0.738l0.135-0.012h4.535z"></path><path opacity="0.8" fill="currentColor" d="M10.096 9.419c0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v6.484c0 0.414-0.336 0.75-0.75 0.75-0.368 0-0.674-0.265-0.738-0.615l-0.012-0.135v-6.484c0-0.414 0.336-0.75 0.75-0.75z"></path><path opacity="0.8" fill="currentColor" d="M14.596 9.419c0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v6.484c0 0.414-0.336 0.75-0.75 0.75-0.368 0-0.674-0.265-0.738-0.615l-0.012-0.135v-6.484c0-0.414 0.336-0.75 0.75-0.75z"></path>',5)])])}const uE={name:"components-icon-delete",render:lE},cE={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function dE(r,e){return t.openBlock(),t.createElementBlock("svg",cE,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M17.947 4.273c-1.676-1.292-3.752-2.023-5.948-2.023-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75c4.032 0 7.604-2.47 9.066-6.156 0.153-0.385-0.035-0.821-0.42-0.974s-0.821 0.036-0.974 0.42c-1.237 3.119-4.26 5.209-7.672 5.209-4.556 0-8.25-3.694-8.25-8.25s3.694-8.25 8.25-8.25c1.837 0 3.574 0.604 4.983 1.673l-1.305 1.556c-0.077 0.092-0.021 0.232 0.098 0.246l4.873 0.539c0.106 0.012 0.191-0.088 0.16-0.191l-1.377-4.706c-0.034-0.115-0.182-0.146-0.259-0.054l-1.226 1.461z"},null,-1)])])}const hE={name:"components-icon-refresh",render:dE},fE=/[.*+?^${}()|[\]\\]/g;function pE(r,e){const i=(e||"").trim();if(!i)return[{text:r,match:!1}];const n=i.replace(fE,"\\$&"),s=new RegExp(n,"gi"),a=[];let o=0,l;for(;(l=s.exec(r))!==null;){if(l.index===s.lastIndex){s.lastIndex++;continue}l.index>o&&a.push({text:r.slice(o,l.index),match:!1}),a.push({text:l[0],match:!0}),o=l.index+l[0].length}return o<r.length&&a.push({text:r.slice(o),match:!1}),a}const mE={class:"o-search-highlight-text"},gE=t.defineComponent({__name:"HighlightText",props:{text:{},keyword:{},enabled:{type:Boolean,default:!0}},setup(r){const e=r,i=t.computed(()=>!e.enabled||!e.keyword?[{text:e.text,match:!1}]:pE(e.text,e.keyword));return(n,s)=>(t.openBlock(),t.createElementBlock("span",mE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(a,o)=>(t.openBlock(),t.createElementBlock("span",{key:o,class:t.normalizeClass({"is-match":a.match})},t.toDisplayString(a.text),3))),128))]))}}),lh=je._export_sfc(gE,[["__scopeId","data-v-2a99e23c"]]),vE={class:"o-search-panel"},yE={key:0,class:"o-search-panel-section o-search-panel-onestep"},_E={class:"o-search-panel-section-title onestep"},TE=["onClick"],bE={key:0,class:"o-search-panel-onestep-tag"},CE={key:1,class:"o-search-panel-divider"},xE={key:2,class:"o-search-panel-section o-search-panel-suggest"},SE={class:"o-search-panel-section-title suggest"},EE=["onClick"],kE={key:1,class:"o-search-panel-no-data"},wE={key:3,class:"o-search-panel-section o-search-panel-recommend"},DE=["onClick"],AE={key:4,class:"o-search-panel-section o-search-panel-history"},IE={class:"o-search-panel-common-header"},NE={class:"o-search-panel-section-title"},OE=["onClick"],BE={class:"o-search-panel-history-row-text"},LE={key:1,class:"o-search-panel-history-list"},PE=["onClick"],ME={class:"o-search-panel-history-text"},RE={key:5,class:"o-search-panel-divider"},VE={key:6,class:"o-search-panel-section o-search-panel-hot"},FE={class:"o-search-panel-common-header"},$E={class:"o-search-panel-section-title"},UE={class:"o-search-panel-hot-list"},zE=["onClick"],HE=t.defineComponent({__name:"SearchPanel",props:{keyword:{default:""},onestepItems:{default:()=>[]},onestepTitle:{},suggestItems:{default:()=>[]},suggestTitle:{},recommendItems:{default:()=>[]},historyItems:{default:()=>[]},historyTitle:{},hotItems:{default:()=>[]},hotTitle:{},noDataText:{},highlightKeyword:{type:Boolean,default:!0},hideOnKeyword:{type:Boolean,default:!1},showSuggestEmpty:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1},historyLayout:{default:"chips"}},emits:["onestep-click","suggest-click","recommend-click","history-click","hot-click","history-remove","history-clear","hot-refresh"],setup(r,{emit:e}){const i=r,n=e,{t:s}=je.useI18n(),a=t.computed(()=>{var T;return!!((T=i.keyword)!=null&&T.trim())}),o=t.computed(()=>a.value&&i.onestepItems.length>0),l=t.computed(()=>a.value&&(i.suggestItems.length>0||i.showSuggestEmpty)),c=t.computed(()=>!a.value&&i.recommendItems.length>0),d=t.computed(()=>(!i.hideOnKeyword||!a.value)&&i.historyItems.length>0),m=t.computed(()=>(!i.hideOnKeyword||!a.value)&&i.hotItems.length>0),g=t.computed(()=>o.value&&l.value),x=t.computed(()=>d.value&&m.value);return(T,E)=>(t.openBlock(),t.createElementBlock("div",vE,[o.value?(t.openBlock(),t.createElementBlock("div",yE,[t.renderSlot(T.$slots,"onestep-header",{items:r.onestepItems},()=>[t.createElementVNode("div",_E,t.toDisplayString(r.onestepTitle??t.unref(s)("search.onestep")),1)],!0),t.renderSlot(T.$slots,"onestep-content",{items:r.onestepItems,keyword:r.keyword},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.onestepItems,v=>(t.openBlock(),t.createElementBlock("div",{key:v.key+(v.path??""),class:"o-search-panel-item o-search-panel-onestep-item",onClick:b=>n("onestep-click",v)},[t.createVNode(lh,{text:v.key,keyword:r.keyword,enabled:r.highlightKeyword},null,8,["text","keyword","enabled"]),v.type?(t.openBlock(),t.createElementBlock("span",bE,t.toDisplayString(v.type),1)):t.createCommentVNode("",!0)],8,TE))),128))],!0)])):t.createCommentVNode("",!0),g.value?(t.openBlock(),t.createElementBlock("div",CE)):t.createCommentVNode("",!0),l.value?(t.openBlock(),t.createElementBlock("div",xE,[t.renderSlot(T.$slots,"suggest-header",{items:r.suggestItems},()=>[t.createElementVNode("div",SE,t.toDisplayString(r.suggestTitle??t.unref(s)("search.suggest")),1)],!0),t.renderSlot(T.$slots,"suggest-content",{items:r.suggestItems,keyword:r.keyword},()=>[r.suggestItems.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.suggestItems,v=>(t.openBlock(),t.createElementBlock("div",{key:v.key,class:"o-search-panel-item",onClick:b=>n("suggest-click",v)},[t.createVNode(lh,{text:v.key,keyword:r.keyword,enabled:r.highlightKeyword},null,8,["text","keyword","enabled"])],8,EE))),128)):(t.openBlock(),t.createElementBlock("div",kE,t.toDisplayString(r.noDataText??t.unref(s)("search.noData")),1))],!0)])):t.createCommentVNode("",!0),c.value?(t.openBlock(),t.createElementBlock("div",wE,[t.renderSlot(T.$slots,"recommend-header",{items:r.recommendItems},void 0,!0),t.renderSlot(T.$slots,"recommend-content",{items:r.recommendItems},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.recommendItems,v=>(t.openBlock(),t.createElementBlock("div",{key:v,class:"o-search-panel-recommend-item",onClick:b=>n("recommend-click",v)},t.toDisplayString(v),9,DE))),128))],!0)])):t.createCommentVNode("",!0),d.value?(t.openBlock(),t.createElementBlock("div",AE,[t.renderSlot(T.$slots,"history-header",{items:r.historyItems},()=>[t.createElementVNode("div",IE,[t.createElementVNode("span",NE,t.toDisplayString(r.historyTitle??t.unref(s)("search.history")),1),r.historyLayout!=="list"?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0,class:"o-search-panel-icon",onClick:E[0]||(E[0]=t.withModifiers(v=>n("history-clear"),["stop"]))},{default:t.withCtx(()=>[t.createVNode(t.unref(uE))]),_:1})):t.createCommentVNode("",!0)])],!0),t.renderSlot(T.$slots,"history-content",{items:r.historyItems},()=>[r.historyLayout==="list"?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.historyItems,v=>(t.openBlock(),t.createElementBlock("div",{key:v,class:"o-search-panel-history-row",onClick:b=>n("history-click",v)},[t.createElementVNode("span",BE,t.toDisplayString(v),1)],8,OE))),128)):(t.openBlock(),t.createElementBlock("div",LE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.historyItems,v=>(t.openBlock(),t.createElementBlock("div",{key:v,class:t.normalizeClass(["o-search-panel-history-item",{"is-dark":r.isDark}]),onClick:b=>n("history-click",v)},[t.createElementVNode("span",ME,t.toDisplayString(v),1),t.createVNode(t.unref(I.OIcon),{class:"o-search-panel-history-remove",onClick:t.withModifiers(b=>n("history-remove",v),["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(El))]),_:1},8,["onClick"])],10,PE))),128))]))],!0)])):t.createCommentVNode("",!0),x.value?(t.openBlock(),t.createElementBlock("div",RE)):t.createCommentVNode("",!0),m.value?(t.openBlock(),t.createElementBlock("div",VE,[t.renderSlot(T.$slots,"hot-header",{items:r.hotItems},()=>[t.createElementVNode("div",FE,[t.createElementVNode("div",$E,t.toDisplayString(r.hotTitle??t.unref(s)("search.hot")),1),t.createVNode(t.unref(I.OIcon),{class:"o-search-panel-icon",onClick:E[1]||(E[1]=t.withModifiers(v=>n("hot-refresh"),["stop"]))},{default:t.withCtx(()=>[t.createVNode(t.unref(hE))]),_:1})])],!0),t.renderSlot(T.$slots,"hot-content",{items:r.hotItems},()=>[t.createElementVNode("div",UE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.hotItems,v=>(t.openBlock(),t.createElementBlock("div",{key:v,class:"o-search-panel-hot-item",onClick:b=>n("hot-click",v)},t.toDisplayString(v),9,zE))),128))])],!0)])):t.createCommentVNode("",!0)]))}}),dp=je._export_sfc(HE,[["__scopeId","data-v-5b9cbb86"]]);function hp(r){const{initial:e,storageKey:i,storeHistory:n,maxHistoryCount:s,onChange:a}=r,o=t.ref([...e.value]),l=()=>{if(!(!n.value||typeof localStorage>"u"))try{o.value.length?localStorage.setItem(i.value,JSON.stringify(o.value)):localStorage.removeItem(i.value)}catch{}},c=T=>{o.value=T,l(),a==null||a(o.value)},d=()=>{if(!(!n.value||typeof localStorage>"u"))try{const T=localStorage.getItem(i.value);if(!T)return;const E=JSON.parse(T);if(Array.isArray(E)&&E.length){const v=Array.from(new Set([...E,...o.value]));o.value=v.slice(0,s.value),a==null||a(o.value)}}catch{}},m=T=>{const E=T==null?void 0:T.trim();if(!E)return;const v=[E,...o.value.filter(b=>b!==E)];v.length>s.value&&(v.length=s.value),c(v)},g=T=>{c(o.value.filter(E=>E!==T))},x=()=>{c([])};return t.watch(e,T=>{T!==o.value&&(o.value=[...T])}),t.onMounted(d),{items:o,push:m,remove:g,clearAll:x}}const qE={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function jE(r,e){return t.openBlock(),t.createElementBlock("svg",qE,[...e[0]||(e[0]=[t.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 GE={name:"components-icon-header-back",render:jE},WE={key:0,class:"o-header-search-drawer"},YE=t.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:{},imagePlaceholder:{},enableImageSearch:{type:Boolean,default:!1},imageUrl:{default:""},uploadImage:{},maxImageSize:{default:10*1024*1024},imageUploadTooltip:{},suggestItems:{default:()=>[]},onestepItems:{default:()=>[]},suggestTitle:{},onestepTitle:{},noDataText:{},highlightKeyword:{type:Boolean,default:!0},debounce:{default:300},autoSaveHistory:{type:Boolean,default:!0},showSuggestEmpty:{type:Boolean,default:!0},allowedImageTypes:{},mobile:{type:Boolean}},emits:["update:modelValue","update:historyItems","update:imageUrl","focus","blur","input","clear","search","recommend-click","onestep-click","history-click","hot-click","hot-refresh","delete-history","delete-history-item","image-upload-start","image-upload-success","image-upload-error","image-validate-error"],setup(r,{expose:e,emit:i}){const n=r,s=i,{lePadV:a}=Et.useScreen(),{t:o}=je.useI18n(),l=t.computed(()=>n.mobile===!0||a.value),c=t.ref(null),d=t.ref(),m=t.ref(!1),g=t.ref(!1),x=t.ref(""),T=t.computed(()=>!!n.imageUrl||g.value),E=t.computed({get:()=>n.modelValue,set:K=>s("update:modelValue",K)}),v=t.toRef(n,"historyItems"),b=t.toRef(n,"storageKey"),D=t.toRef(n,"storeHistory"),N=t.toRef(n,"maxHistoryCount"),w=hp({initial:v,storageKey:b,storeHistory:D,maxHistoryCount:N,onChange:K=>s("update:historyItems",K)}),$=t.computed(()=>n.imageUrl?n.imagePlaceholder??o("search.extendedPlaceholder"):m.value&&n.enableImageSearch?n.imagePlaceholder??o("search.imagePlaceholder"):m.value?n.expandedPlaceholder??o("search.expandedPlaceholder"):n.placeholder??o("search.placeholder")),F=fi.useDebounceFn(K=>s("input",K),()=>n.debounce);t.watch(E,K=>F(K)),fi.onClickOutside(c,()=>{l.value||O()});const H=()=>{m.value=!0},O=()=>{l.value||(m.value=!1)},U=()=>{H(),s("focus")},C=()=>{s("blur")},k=async K=>{var ge,Ne,be,Le,qe,Ke,Pe,Ze;(Ne=(ge=d.value)==null?void 0:ge.getIsUploading)!=null&&Ne.call(ge)&&await((Le=(be=d.value).awaitUpload)==null?void 0:Le.call(be));const Z=K!==void 0?K.trim():E.value.trim(),oe=x.value||((Ke=(qe=d.value)==null?void 0:qe.getUploadedUrl)==null?void 0:Ke.call(qe))||n.imageUrl;if(!(!Z&&!oe)&&(n.autoSaveHistory&&Z&&w.push(Z),s("search",{keyword:Z,imageUrl:oe||void 0}),(Ze=(Pe=d.value)==null?void 0:Pe.blur)==null||Ze.call(Pe),m.value=!1,n.searchUrl)){const tt=new URLSearchParams;Z&&tt.set("q",Z),oe&&tt.set("imageUrl",oe);const ze=n.searchUrl.includes("?")?"&":"?",gt=`${n.searchUrl}${ze}${tt.toString()}`;typeof window<"u"&&window.open(gt,n.searchUrlOpenBlank?"_blank":"_self",n.searchUrlOpenBlank?"noopener,noreferrer":"")}},P=()=>{var K,Z;E.value="",s("clear"),(Z=(K=d.value)==null?void 0:K.focus)==null||Z.call(K)},z=K=>{s("recommend-click",K),E.value=K.key,k(K.key??"")},B=K=>{s("recommend-click",K),k(K)},R=K=>{s("onestep-click",K),K.path&&typeof window<"u"&&window.open(K.path,"_blank","noopener,noreferrer")},V=K=>{s("history-click",K),k(K)},te=K=>{s("hot-click",K),k(K)},ee=K=>{w.remove(K),s("delete-history-item",K)},q=()=>{const K=[...w.items.value];w.clearAll(),s("delete-history",K)},j=()=>{E.value="",g.value=!1,s("update:imageUrl",""),m.value=!1},J=K=>{g.value=!0,x.value="",s("image-upload-start",K)},se=(K,Z)=>{x.value=K,s("update:imageUrl",K),s("image-upload-success",K,Z)},Q=()=>{g.value=!1,x.value="",s("update:imageUrl","")},ie=t.computed(()=>!(!m.value||T.value));return e({focus:()=>{var K,Z;return(Z=(K=d.value)==null?void 0:K.focus)==null?void 0:Z.call(K)},blur:()=>{var K,Z;return(Z=(K=d.value)==null?void 0:K.blur)==null?void 0:Z.call(K)},open:H,close:O,search:k}),(K,Z)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-header-search",{"is-mobile-mode":l.value}])},[t.createElementVNode("div",{ref_key:"wrapperRef",ref:c,class:t.normalizeClass(["o-header-search-pos",{"is-pc":!l.value,"is-mobile":l.value,"is-left":r.expandDirection==="left","is-right":r.expandDirection==="right","is-focus":m.value}])},[t.createElementVNode("div",{class:t.normalizeClass(["o-header-search-row",{"is-focus":m.value}])},[l.value&&m.value?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0,class:"o-header-search-back-icon",onClick:j},{default:t.withCtx(()=>[t.createVNode(t.unref(GE))]),_:1})):t.createCommentVNode("",!0),t.createVNode(cp,{ref_key:"inputRef",ref:d,modelValue:E.value,"onUpdate:modelValue":Z[0]||(Z[0]=oe=>E.value=oe),"image-url":r.imageUrl,placeholder:$.value,"enable-image-search":r.enableImageSearch,"upload-image":r.uploadImage,"max-image-size":r.maxImageSize,"image-upload-tooltip":r.imageUploadTooltip,clearable:r.clearable&&m.value,expanded:m.value&&T.value,"allowed-image-types":r.allowedImageTypes,size:"medium",class:t.normalizeClass(["o-header-search-input",{"is-collapsed":!m.value}]),"onUpdate:imageUrl":Z[1]||(Z[1]=oe=>s("update:imageUrl",oe)),onFocus:U,onBlur:C,onEnter:k,onClear:P,onImageClear:Q,onImageUploadStart:J,onImageUploadSuccess:se,onImageUploadError:Z[2]||(Z[2]=(oe,ge)=>s("image-upload-error",oe,ge)),onImageValidateError:Z[3]||(Z[3]=(oe,ge)=>s("image-validate-error",oe,ge))},t.createSlots({prefix:t.withCtx(()=>[t.renderSlot(K.$slots,"input-prefix",{},void 0,!0)]),suffix:t.withCtx(oe=>[t.renderSlot(K.$slots,"input-suffix",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),_:2},[K.$slots["image-preview"]?{name:"preview",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"image-preview",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","image-url","placeholder","enable-image-search","upload-image","max-image-size","image-upload-tooltip","clearable","expanded","allowed-image-types","class"]),l.value&&m.value?(t.openBlock(),t.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:k},t.toDisplayString(r.searchTextMobile??t.unref(o)("search")),1)):t.createCommentVNode("",!0)],2),t.createVNode(t.Transition,{name:"o-header-search-drawer"},{default:t.withCtx(()=>[ie.value?(t.openBlock(),t.createElementBlock("div",WE,[t.renderSlot(K.$slots,"drawer",{recommendItems:r.recommendItems,historyItems:t.unref(w).items.value,hotItems:r.hotItems,suggestItems:r.suggestItems,onestepItems:r.onestepItems,keyword:r.modelValue},()=>[t.createVNode(dp,{keyword:r.modelValue,"onestep-items":r.onestepItems,"onestep-title":r.onestepTitle,"suggest-items":r.suggestItems,"suggest-title":r.suggestTitle,"recommend-items":r.recommendItems,"history-items":t.unref(w).items.value,"history-title":r.historyTitle,"hot-items":r.hotItems,"hot-title":r.hotTitle,"no-data-text":r.noDataText,"highlight-keyword":r.highlightKeyword,"hide-on-keyword":!0,"show-suggest-empty":r.showSuggestEmpty,onOnestepClick:R,onSuggestClick:z,onRecommendClick:B,onHistoryClick:V,onHistoryRemove:ee,onHistoryClear:q,onHotClick:te,onHotRefresh:Z[4]||(Z[4]=oe=>s("hot-refresh"))},t.createSlots({_:2},[K.$slots["recommend-header"]?{name:"recommend-header",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"recommend-header",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"0"}:void 0,K.$slots["recommend-content"]?{name:"recommend-content",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"recommend-content",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"1"}:void 0,K.$slots["onestep-header"]?{name:"onestep-header",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"onestep-header",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"2"}:void 0,K.$slots["onestep-content"]?{name:"onestep-content",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"onestep-content",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"3"}:void 0,K.$slots["suggest-header"]?{name:"suggest-header",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"suggest-header",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"4"}:void 0,K.$slots["suggest-content"]?{name:"suggest-content",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"suggest-content",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"5"}:void 0,K.$slots["history-header"]?{name:"history-header",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"history-header",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"6"}:void 0,K.$slots["history-content"]?{name:"history-content",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"history-content",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"7"}:void 0,K.$slots["hot-header"]?{name:"hot-header",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"hot-header",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"8"}:void 0,K.$slots["hot-content"]?{name:"hot-content",fn:t.withCtx(oe=>[t.renderSlot(K.$slots,"hot-content",t.normalizeProps(t.guardReactiveProps(oe)),void 0,!0)]),key:"9"}:void 0]),1032,["keyword","onestep-items","onestep-title","suggest-items","suggest-title","recommend-items","history-items","history-title","hot-items","hot-title","no-data-text","highlight-keyword","show-suggest-empty"])],!0)])):t.createCommentVNode("",!0)]),_:3})],2),l.value?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0,class:"o-header-search-mobile-icon",onClick:H},{default:t.withCtx(()=>[t.createVNode(t.unref(up))]),_:1})):t.createCommentVNode("",!0)],2))}}),uh=je._export_sfc(YE,[["__scopeId","data-v-a97b8e7c"]]),XE=Object.assign(uh,{install(r){r.component("OHeaderSearch",uh)}}),KE={class:"source-code"},QE={class:"title"},ZE={class:"info-wrap hover-icon-rotate"},JE={class:"title"},e7=t.defineComponent({__name:"OHeaderSourceCode",props:{title:{},options:{},href:{},target:{},icon:{},justify:{default:"center"}},setup(r){const e=s=>{window.open(s.href,s.target?s.target:"_blank")},i=t.ref(!1),n=s=>{i.value=s};return(s,a)=>(t.openBlock(),t.createElementBlock("div",KE,[r.href?(t.openBlock(),t.createElementBlock("div",{key:0,class:"info-wrap",onClick:a[0]||(a[0]=o=>e({href:r.href,target:r.target}))},[t.createElementVNode("span",QE,t.toDisplayString(r.title),1),r.icon?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icon),{class:"icon"}))]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock(t.unref(I.ODropdown),{key:1,trigger:"hover",optionPosition:"bottom","option-wrap-class":"dropdown",class:t.normalizeClass({"dropdown-active":i.value}),onVisibleChange:n},{dropdown:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.options,o=>(t.openBlock(),t.createBlock(t.unref(I.ODropdownItem),{onClick:l=>e(o),key:o.href,class:"list",style:t.normalizeStyle({"--dropdown-item-justify":r.justify})},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.label)+" ",1),o.icon?(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0)]),_:2},1032,["onClick","style"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("div",ZE,[t.createElementVNode("span",JE,t.toDisplayString(r.title),1),t.createVNode(t.unref(I.OIcon),{class:"icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(wl))]),_:1})])]),_:1},8,["class"]))]))}}),ch=je._export_sfc(e7,[["__scopeId","data-v-0c07bf67"]]),t7=Object.assign(ch,{install(r){r.component("OHeaderSourceCode",ch)}}),i7={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function n7(r,e){return t.openBlock(),t.createElementBlock("svg",i7,[...e[0]||(e[0]=[t.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 r7={name:"components-icon-sun",render:n7},s7={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function a7(r,e){return t.openBlock(),t.createElementBlock("svg",s7,[...e[0]||(e[0]=[t.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 o7={name:"components-icon-moon",render:a7},l7={class:"o-theme-switcher"},u7={key:1,class:"o-theme-switcher-mobile"},c7=t.defineComponent({__name:"OHeaderTheme",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},disabled:{type:Boolean,default:!1}},emits:["update:theme","change"],setup(r,{emit:e}){const i=r,n=e,{gtPhone:s}=Et.useScreen(),a=t.computed({get(){return i.theme},set(c){n("update:theme",c),n("change",c)}}),o=t.computed(()=>i.type==="common"||i.type==="auto"&&s.value),l=()=>{i.disabled||(a.value=a.value===i.lightValue?i.darkValue:i.lightValue)};return(c,d)=>(t.openBlock(),t.createElementBlock("div",l7,[o.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["o-theme-switcher-common",{disabled:r.disabled}]),onClick:l},[t.createVNode(t.unref(I.OIcon),{class:"o-theme-icon"},{default:t.withCtx(()=>[a.value===r.lightValue?(t.openBlock(),t.createBlock(t.unref(o7),{key:0})):(t.openBlock(),t.createBlock(t.unref(r7),{key:1}))]),_:1})],2)):(t.openBlock(),t.createElementBlock("div",u7,[t.createVNode(t.unref(I.OSwitch),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=m=>a.value=m),class:"o-theme-switch","checked-value":r.lightValue,"unchecked-value":r.darkValue,disabled:r.disabled},{inactive:t.withCtx(()=>[t.createVNode(t.unref(I.OIconMoon))]),active:t.withCtx(()=>[t.createVNode(t.unref(I.OIconSun))]),off:t.withCtx(()=>[t.createVNode(t.unref(I.OIconSun))]),on:t.withCtx(()=>[t.createVNode(t.unref(I.OIconMoon))]),_:1},8,["modelValue","checked-value","unchecked-value","disabled"])]))]))}}),dh=je._export_sfc(c7,[["__scopeId","data-v-6209ad5c"]]),d7=Object.assign(dh,{install(r){r.component("OHeaderTheme",dh)}}),h7=["src"],f7=t.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(r){const e=r,i=["#058EF0","#FA7305","#03B5A5"],n=t.computed(()=>{var a;return(a=e.name)==null?void 0:a.charAt(0).toUpperCase()}),s=t.computed(()=>{var l;const a={"background-color":"",width:"32px",height:"32px","font-size":"20px"};a["background-color"]=e.name?i[((l=e.name)==null?void 0:l.length)%i.length]:"transparent";let o=0;return e.customSize?o=Number(e.customSize):o={mini:16,small:24,medium:40,large:64}[e.size],a.height=`${o}px`,a.width=`${o}px`,a["font-size"]=`${o/2}px`,a});return(a,o)=>r.avatar&&!r.avatar.includes("gitcode")?(t.openBlock(),t.createElementBlock("img",{key:0,src:r.avatar,class:t.normalizeClass(["img-avatar",r.variant]),style:t.normalizeStyle(s.value),alt:""},null,14,h7)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["word-avatar",r.variant]),style:t.normalizeStyle(s.value)},t.toDisplayString(n.value),7))}}),p7=je._export_sfc(f7,[["__scopeId","data-v-340348ce"]]),m7={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function g7(r,e){return t.openBlock(),t.createElementBlock("svg",m7,[...e[0]||(e[0]=[t.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 v7={name:"components-icon-avatar-line",render:g7},y7={class:"header-user"},_7={key:0,class:"user-info"},T7={class:"info-wrap hover-icon-rotate"},b7={class:"user-account"},C7={key:1},x7=t.defineComponent({__name:"OHeaderUser",props:{token:{default:void 0},lang:{default:void 0},noticeTotal:{default:void 0},userInfo:{default:void 0},options:{default:void 0},customSize:{default:void 0}},emits:["login","logout"],setup(r,{emit:e}){const{lePadV:i}=Et.useScreen(),n=e,s=()=>{n("login")},a=o=>{o!=null&&o.logout?n("logout"):window.open(o.url,o.target)};return(o,l)=>(t.openBlock(),t.createElementBlock("div",y7,[r.token?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(I.OIcon),{key:0,onClick:s,class:"avatar-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(v7))]),_:1})),t.createVNode(t.Transition,{name:"header-user-zoom-in"},{default:t.withCtx(()=>[r.token?(t.openBlock(),t.createElementBlock("div",_7,[t.createVNode(t.unref(I.ODropdown),{trigger:t.unref(i)?"click":"hover",optionPosition:t.unref(i)?"br":"bottom","option-wrap-class":`user-dropdown ${r.lang==="en"?"is-en":""}`},{dropdown:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.options,c=>(t.openBlock(),t.createBlock(t.unref(I.ODropdownItem),{key:c.label,style:{"--dropdown-item-justify":"center"},onClick:d=>a(c)},{default:t.withCtx(()=>[c!=null&&c.total?(t.openBlock(),t.createBlock(t.unref(I.OBadge),{key:0,value:c.total,color:"danger",class:t.normalizeClass(["header-message message",{"notice-not":!c.total}])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.label),1)]),_:2},1032,["value","class"])):(t.openBlock(),t.createElementBlock("span",C7,t.toDisplayString(c.label),1))]),_:2},1032,["onClick"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("div",T7,[t.createVNode(t.unref(I.OBadge),{value:r.noticeTotal,dot:!0,color:"danger",class:t.normalizeClass(["header-message user-avatar",{"notice-not":!r.noticeTotal}])},{default:t.withCtx(()=>[t.createVNode(p7,{avatar:r.userInfo.photo,name:r.userInfo.username,"custom-size":r.customSize},null,8,["avatar","name","custom-size"])]),_:1},8,["value","class"]),t.createElementVNode("p",b7,t.toDisplayString(r.userInfo.username),1),t.createVNode(t.unref(I.OIcon),{class:"icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(wl))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):t.createCommentVNode("",!0)]),_:1})]))}}),hh=je._export_sfc(x7,[["__scopeId","data-v-438cc618"]]),S7=Object.assign(hh,{install(r){r.component("OHeaderUser",hh)}}),E7={class:"o-search-input-box"},k7={key:0,class:"o-search-input-dropdown"},w7={key:0,class:"o-search-input-suggest-list-row"},D7={class:"o-search-input-suggest-list-label"},A7={class:"o-search-input-suggest-list"},I7=["onClick"],N7={key:0},O7=t.defineComponent({__name:"OSearchInput",props:{modelValue:{default:""},imageUrl:{default:""},size:{default:"large"},placeholder:{},imagePlaceholder:{},enableImageSearch:{type:Boolean,default:!1},uploadImage:{},maxImageSize:{default:10*1024*1024},imageUploadTooltip:{},allowedImageTypes:{},suggestItems:{default:()=>[]},onestepItems:{default:()=>[]},suggestTitle:{},onestepTitle:{},noDataText:{},showSuggestEmpty:{type:Boolean,default:!0},highlightKeyword:{type:Boolean,default:!0},debounce:{default:300},enableHistory:{type:Boolean,default:!0},historyItems:{default:()=>[]},maxHistoryCount:{default:6},storeHistory:{type:Boolean,default:!1},storageKey:{default:"search-history"},historyTitle:{},autoSaveHistory:{type:Boolean,default:!0},hotItems:{default:()=>[]},hotTitle:{},suggestList:{default:()=>[]},suggestListLabel:{},clearable:{type:Boolean,default:!0},closeOnSearch:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0},openOnFocus:{type:Boolean,default:!0},alwaysInlineThumbnail:{type:Boolean}},emits:["update:modelValue","update:imageUrl","update:historyItems","focus","blur","input","clear","search","recommend-click","onestep-click","history-click","hot-click","suggest-list-click","delete-history","delete-history-item","image-upload-start","image-upload-success","image-upload-error","image-validate-error"],setup(r,{expose:e,emit:i}){const n=r,s=i,{t:a}=je.useI18n();function o(Q){const ie=[],K=/<em>(.*?)<\/em>/g;let Z=0,oe;for(;(oe=K.exec(Q))!==null;)oe.index>Z&&ie.push({text:Q.slice(Z,oe.index),em:!1}),ie.push({text:oe[1],em:!0}),Z=oe.index+oe[0].length;return Z<Q.length&&ie.push({text:Q.slice(Z),em:!1}),ie}const l=t.ref(),c=t.ref(null),d=t.computed({get:()=>n.modelValue,set:Q=>s("update:modelValue",Q)}),m=t.ref(!1),g=t.ref(!1),x=t.ref(!1),T=t.ref(!1),E=t.computed(()=>{if(!m.value||n.imageUrl||T.value)return!1;const Q=!!d.value&&(n.suggestItems.length>0||n.onestepItems.length>0||n.showSuggestEmpty),ie=n.enableHistory&&w.items.value.length>0&&!d.value,K=n.hotItems.length>0&&!d.value;return!!(Q||n.openOnFocus&&(ie||K))}),v=t.toRef(n,"historyItems"),b=t.toRef(n,"storageKey"),D=t.toRef(n,"storeHistory"),N=t.toRef(n,"maxHistoryCount"),w=hp({initial:v,storageKey:b,storeHistory:D,maxHistoryCount:N,onChange:Q=>s("update:historyItems",Q)});let $=!1;const F=fi.useDebounceFn(Q=>{if($){$=!1;return}s("input",Q)},()=>n.debounce);t.watch(d,Q=>{F(Q)}),fi.onClickOutside(c,()=>{n.closeOnClickOutside&&(g.value||x.value||(m.value=!1))});const H=()=>{m.value=!0,s("focus")},O=()=>{s("blur")},U=async Q=>{var Z,oe,ge,Ne,be,Le;(oe=(Z=l.value)==null?void 0:Z.getIsUploading)!=null&&oe.call(Z)&&await((Ne=(ge=l.value).awaitUpload)==null?void 0:Ne.call(ge));const ie=Q!==void 0?Q.trim():d.value.trim(),K=((Le=(be=l.value)==null?void 0:be.getUploadedUrl)==null?void 0:Le.call(be))||n.imageUrl;!ie&&!K||(n.autoSaveHistory&&ie&&w.push(ie),n.closeOnSearch&&(m.value=!1),s("search",{keyword:ie,imageUrl:K||void 0}))},C=()=>{d.value="",s("clear")},k=Q=>{s("recommend-click",Q),$=!0,d.value=Q.key,U(Q.key??"")},P=Q=>{if(s("onestep-click",Q),Q.path){const ie=Q.path;typeof window<"u"&&window.open(ie,"_blank","noopener,noreferrer")}},z=Q=>{s("history-click",Q),U(Q)},B=Q=>{s("hot-click",Q),U(Q)},R=Q=>{w.remove(Q),s("delete-history-item",Q)},V=()=>{const Q=[...w.items.value];w.clearAll(),s("delete-history",Q)},te=Q=>{const ie=Q.replace(/<[^>]+>/g,"");s("suggest-list-click",ie),$=!0,d.value=ie,U(ie)},ee=Q=>{g.value=Q,Q||(x.value=!0,setTimeout(()=>{x.value=!1},100))},q=t.computed(()=>!!n.imageUrl&&(n.alwaysInlineThumbnail||!m.value)),j=Q=>{T.value=!0,s("image-upload-start",Q)},J=(Q,ie)=>{T.value=!1,s("image-upload-success",Q,ie)},se=()=>{T.value=!1,s("update:imageUrl","")};return e({focus:()=>{var Q,ie;return(ie=(Q=l.value)==null?void 0:Q.focus)==null?void 0:ie.call(Q)},blur:()=>{var Q,ie;return(ie=(Q=l.value)==null?void 0:Q.blur)==null?void 0:ie.call(Q)},search:U,saveHistory:Q=>w.push(Q??d.value)}),(Q,ie)=>{var K;return t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperRef",ref:c,class:t.normalizeClass(["o-search-input",{"is-focus":m.value}])},[t.createElementVNode("div",E7,[t.createVNode(cp,{ref_key:"inputRef",ref:l,modelValue:d.value,"onUpdate:modelValue":ie[0]||(ie[0]=Z=>d.value=Z),"image-url":r.imageUrl,placeholder:r.placeholder,"image-placeholder":r.imagePlaceholder,size:r.size,"enable-image-search":r.enableImageSearch,"upload-image":r.uploadImage,"max-image-size":r.maxImageSize,"image-upload-tooltip":r.imageUploadTooltip,"allowed-image-types":r.allowedImageTypes,expanded:m.value&&!n.alwaysInlineThumbnail,"inline-thumbnail":q.value,clearable:r.clearable,class:"o-search-input-field","onUpdate:imageUrl":ie[1]||(ie[1]=Z=>s("update:imageUrl",Z)),onFocus:H,onBlur:O,onEnter:U,onClear:C,onImageClear:se,onImageUploadStart:j,onImageUploadSuccess:J,onImageUploadError:ie[2]||(ie[2]=(Z,oe)=>s("image-upload-error",Z,oe)),onImageValidateError:ie[3]||(ie[3]=(Z,oe)=>s("image-validate-error",Z,oe)),onPreviewChange:ee},t.createSlots({prefix:t.withCtx(()=>[t.renderSlot(Q.$slots,"input-prefix",{},void 0,!0)]),suffix:t.withCtx(Z=>[t.renderSlot(Q.$slots,"input-suffix",t.normalizeProps(t.guardReactiveProps(Z)),void 0,!0)]),_:2},[Q.$slots["image-preview"]?{name:"preview",fn:t.withCtx(Z=>[t.renderSlot(Q.$slots,"image-preview",t.normalizeProps(t.guardReactiveProps(Z)),void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","image-url","placeholder","image-placeholder","size","enable-image-search","upload-image","max-image-size","image-upload-tooltip","allowed-image-types","expanded","inline-thumbnail","clearable"]),t.createVNode(t.Transition,{name:"o-search-input-dropdown"},{default:t.withCtx(()=>[E.value?(t.openBlock(),t.createElementBlock("div",k7,[t.renderSlot(Q.$slots,"dropdown",{keyword:r.modelValue},()=>[t.createVNode(dp,{keyword:r.modelValue,"onestep-items":r.onestepItems,"onestep-title":r.onestepTitle,"suggest-items":r.suggestItems,"suggest-title":r.suggestTitle,"history-items":r.enableHistory?t.unref(w).items.value:[],"history-title":r.historyTitle,"hot-items":r.hotItems,"hot-title":r.hotTitle,"no-data-text":r.noDataText,"highlight-keyword":r.highlightKeyword,"hide-on-keyword":!0,"show-suggest-empty":r.showSuggestEmpty,"history-layout":"list",onOnestepClick:P,onSuggestClick:k,onHistoryClick:z,onHistoryRemove:R,onHistoryClear:V,onHotClick:B},t.createSlots({_:2},[Q.$slots["onestep-header"]?{name:"onestep-header",fn:t.withCtx(Z=>[t.renderSlot(Q.$slots,"onestep-header",t.normalizeProps(t.guardReactiveProps(Z)),void 0,!0)]),key:"0"}:void 0,Q.$slots["onestep-content"]?{name:"onestep-content",fn:t.withCtx(Z=>[t.renderSlot(Q.$slots,"onestep-content",t.normalizeProps(t.guardReactiveProps(Z)),void 0,!0)]),key:"1"}:void 0,Q.$slots["suggest-header"]?{name:"suggest-header",fn:t.withCtx(Z=>[t.renderSlot(Q.$slots,"suggest-header",t.normalizeProps(t.guardReactiveProps(Z)),void 0,!0)]),key:"2"}:void 0,Q.$slots["suggest-content"]?{name:"suggest-content",fn:t.withCtx(Z=>[t.renderSlot(Q.$slots,"suggest-content",t.normalizeProps(t.guardReactiveProps(Z)),void 0,!0)]),key:"3"}:void 0,Q.$slots["history-header"]?{name:"history-header",fn:t.withCtx(Z=>[t.renderSlot(Q.$slots,"history-header",t.normalizeProps(t.guardReactiveProps(Z)),void 0,!0)]),key:"4"}:void 0,Q.$slots["history-content"]?{name:"history-content",fn:t.withCtx(Z=>[t.renderSlot(Q.$slots,"history-content",t.normalizeProps(t.guardReactiveProps(Z)),void 0,!0)]),key:"5"}:void 0]),1032,["keyword","onestep-items","onestep-title","suggest-items","suggest-title","history-items","history-title","hot-items","hot-title","no-data-text","highlight-keyword","show-suggest-empty"])],!0)])):t.createCommentVNode("",!0)]),_:3})]),(K=r.suggestList)!=null&&K.length?(t.openBlock(),t.createElementBlock("div",w7,[t.renderSlot(Q.$slots,"suggest-list",{items:r.suggestList},()=>[t.createElementVNode("span",D7,t.toDisplayString(r.suggestListLabel??t.unref(a)("search.suggestListLabel")),1),t.createElementVNode("ul",A7,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.suggestList,(Z,oe)=>(t.openBlock(),t.createElementBlock("li",{key:Z+oe,class:"o-search-input-suggest-list-item",onClick:ge=>te(Z)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o(Z),ge=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:ge.text+String(ge.em)},[ge.em?(t.openBlock(),t.createElementBlock("em",N7,t.toDisplayString(ge.text),1)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(ge.text),1)],64))],64))),128))],8,I7))),128))])],!0)])):t.createCommentVNode("",!0)],2)}}}),fh=je._export_sfc(O7,[["__scopeId","data-v-18e8aec0"]]),B7=Object.assign(fh,{install(r){r.component("OSearchInput",fh)}}),L7={class:"section-wrapper"},P7={key:1,class:"section-title"},M7={key:2,class:"section-subtitle"},R7={key:1,class:"section-body"},V7={key:2,class:"section-footer"},F7=t.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(r){const e=r;return(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["app-section",{"is-full":e.full}])},[t.createElementVNode("div",L7,[t.renderSlot(i.$slots,"main",{},()=>[i.$slots.header||e.title||e.subtitle?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["section-header",{"is-left":!e.headerJustifyCenter}])},[t.renderSlot(i.$slots,"header",{},()=>[t.unref(I.isArray)(e.title)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.title,s=>(t.openBlock(),t.createElementBlock("h2",{key:s,class:"section-title"},t.toDisplayString(s),1))),128)):i.$slots.title||e.title?(t.openBlock(),t.createElementBlock("h2",P7,[t.renderSlot(i.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(e.title),1)],!0)])):t.createCommentVNode("",!0),i.$slots.subtitle||e.subtitle?(t.openBlock(),t.createElementBlock("p",M7,[t.renderSlot(i.$slots,"subtitle",{},()=>[t.createTextVNode(t.toDisplayString(e.subtitle),1)],!0)])):t.createCommentVNode("",!0)],!0)],2)):t.createCommentVNode("",!0),i.$slots.default?(t.openBlock(),t.createElementBlock("div",R7,[t.renderSlot(i.$slots,"default",{},void 0,!0)])):t.createCommentVNode("",!0),i.$slots.footer||e.footer?(t.openBlock(),t.createElementBlock("div",V7,[t.renderSlot(i.$slots,"footer",{},()=>[t.createVNode(t.unref(I.OLink),{href:e.footerHref,target:"_blank"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(I.OIcon),{class:"footer-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.footer)+" ",1)]),_:1},8,["href"])],!0)])):t.createCommentVNode("",!0)],!0)])],2))}}),ph=je._export_sfc(F7,[["__scopeId","data-v-dae37748"]]),$7=Object.assign(ph,{install(r){r.component("OSection",ph)}});exports.OElCookieNotice=je.OElCookieNotice;exports.CalendarDataType=Be;exports.EventsStatusT=Zi;exports.MeetingGroupType=_i;exports.NavType=Ji;exports.OActivityApproval=x8;exports.OActivityForm=C8;exports.OActivityMyCalendar=lp;exports.OBanner=L8;exports.OBannerContent=P8;exports.OCookieNotice=f5;exports.OEventsApply=CC;exports.OEventsCalendar=TC;exports.OEventsList=bC;exports.OFooter=fx;exports.OHeader=PS;exports.OHeaderLanguageSwitcher=HS;exports.OHeaderMobile=MS;exports.OHeaderSearch=XE;exports.OHeaderSourceCode=t7;exports.OHeaderTheme=d7;exports.OHeaderUser=S7;exports.OMeetingCalendar=B4;exports.OMeetingForm=L4;exports.OMeetingMyCalendar=R4;exports.OMeetingPlayback=P4;exports.OMeetingSigCalendar=M4;exports.OPlusConfigProvider=V8;exports.OSearchInput=B7;exports.OSection=$7;
|