@opendesign-plus-test/components 0.0.1-rc.32 → 0.0.1-rc.33

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.
@@ -1,30 +1,30 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),A=require("@opensig/opendesign"),Ct=require("@opendesign-plus/composables"),He=require("./chunk-OElCookieNotice.cjs.js"),zi=require("@vueuse/core"),Km=require("@opensig/opendesign/es/locale/lang/zh-cn"),Qm=require("@opensig/opendesign/es/locale/lang/en-us"),tt=require("element-plus"),Zm=i.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(r){const e=Symbol("default"),t=r,n=i.computed(()=>t.verticalPadding?A.isBoolean(t.verticalPadding)?e:A.isString(t.verticalPadding)?t.verticalPadding:t.verticalPadding[0]:0),s=i.computed(()=>t.verticalPadding?A.isBoolean(t.verticalPadding)?e:A.isString(t.verticalPadding)?t.verticalPadding:A.isUndefined(t.verticalPadding[1])?t.verticalPadding[0]:t.verticalPadding[1]:0);return(a,o)=>(i.openBlock(),i.createElementBlock("div",{class:"content-wrapper",style:i.normalizeStyle({"--content-wrapper-vertical-paddingTop":n.value===i.unref(e)?void 0:n.value,"--content-wrapper-vertical-paddingBottom":s.value===i.unref(e)?void 0:s.value})},[i.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),vn=He._export_sfc(Zm,[["__scopeId","data-v-29de9f52"]]),Jm={key:0},eg={class:"banner-content"},tg=["src"],ig={key:1,class:"banner-title"},ng={key:2,class:"banner-subtitle"},rg={key:4,class:"banner-opts"},sg=i.defineComponent({__name:"OBanner",props:{options:{default:void 0},size:{default:"large"},contentJustifyCenter:{type:Boolean,default:!1}},setup(r){const e=r,{isLight:t}=Ct.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:n}=Ct.useScreen(),s=i.computed(()=>e.options),a=i.ref(""),o=c=>{setTimeout(()=>{a.value=s.value[c].bg_theme??"light"},100)},l=(c,h)=>{c&&!h&&window.open(c)};return(c,h)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["home-banner",r.size])},[r.size==="tiny"?(i.openBlock(),i.createElementBlock("div",Jm,i.toDisplayString(s.value[1].title),1)):i.unref(n)?i.unref(n)?(i.openBlock(),i.createBlock(i.unref(A.OCarousel),{key:2,class:"banner-carousel",effect:"gallery","indicator-click":"","data-o-theme":a.value,arrow:"never","auto-play":!0,onBeforeChange:o},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(m,g)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{class:i.normalizeClass(["banner-item",`banner-item${g}`]),key:g},{default:i.withCtx(()=>[i.createVNode(vn,{class:"banner-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:"banner-bg",src:m.bg,onClick:k=>l(m.href)},null,8,["src","onClick"])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"])):i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OCarousel),{key:1,class:"banner-carousel",effect:"toggle","active-class":"current-slide","indicator-click":"","auto-play":!0,"data-o-theme":a.value,onBeforeChange:o},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(m,g)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{key:g,class:i.normalizeClass(["banner-item",`banner-item${g}`])},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:i.normalizeClass(["banner-bg",{"with-sticky-bg":m.withStickyBg,"in-dark":!i.unref(t),"cursor-pointer":m.href&&!m.btn}]),src:m.bg,style:i.normalizeStyle({"--pad-offset":m.pad_offset}),onClick:k=>l(m.href,m.btn)},{default:i.withCtx(()=>[i.createVNode(vn,{class:i.normalizeClass(["banner-wrapper",["banner-wrapper",r.contentJustifyCenter?"content-center":""]])},{default:i.withCtx(()=>[i.createElementVNode("div",eg,[!i.unref(n)&&m.attach?(i.openBlock(),i.createElementBlock("img",{key:0,src:m.attach,class:"banner-attach"},null,8,tg)):i.createCommentVNode("",!0),m.title?(i.openBlock(),i.createElementBlock("div",ig,i.toDisplayString(m.title),1)):i.createCommentVNode("",!0),m.subtitle?(i.openBlock(),i.createElementBlock("div",ng,i.toDisplayString(m.subtitle),1)):i.createCommentVNode("",!0),m.bg_text?(i.openBlock(),i.createElementBlock("div",{key:3,class:"banner-text",style:i.normalizeStyle({backgroundImage:`url(${m.bg_text})`,"--pc-width":m.pc_text_width,"--pc-height":m.pc_text_height,"--pad-width":m.pad_text_width,"--pad-height":m.pad_text_height})},null,4)):i.createCommentVNode("",!0),m.btn?(i.openBlock(),i.createElementBlock("div",rg,[i.createVNode(i.unref(A.OButton),{href:m.href,target:"_blank",variant:"solid",color:"primary",size:r.size},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(m.btn),1)]),_:2},1032,["href","size"])])):i.createCommentVNode("",!0)])]),_:2},1032,["class"])]),_:2},1032,["src","class","style","onClick"])]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"]))],2))}}),dh=He._export_sfc(sg,[["__scopeId","data-v-2356da15"]]),ag={class:"cookie-notice-content"},og=["type"],lg={class:"cookie-title"},ug={style:{transform:"rotate(180deg)"},xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24"},cg={class:"cookie-zh-title",style:{"margin-top":"0"}},dg=["href"],hg={key:1,class:"cookie-en-title"},fg={key:0,class:"cookie-en-content"},pg={class:"cookie-en-desc"},mg=["href"],gg={class:"cookie-notice-right"},vg={class:"cookie-dlg-title"},_g={class:"cookie-dlg-content"},yg={class:"content-item"},Tg={class:"item-header"},bg={class:"item-title"},xg={class:"item-extra"},Cg={class:"item-detail"},Eg={class:"content-item"},Sg={class:"item-header"},kg={class:"item-title"},wg={class:"item-extra"},Dg={class:"item-detail"},Ag="0",sc="1",Ng="2",Rs="3",Ig="agreed-cookiepolicy-zh",Og="agreed-cookiepolicy-en",Bg=i.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},community:{},detailUrl:{},wrapper:{},cookieDomain:{}},emits:["update:visible"],setup(r,{expose:e,emit:t}){const n=r,s=t,{lePadV:a,leLaptop:o,isPhone:l}=Ct.useScreen(),{locale:c,t:h}=He.useI18n(),m=i.computed(()=>c.value==="zh"),g=i.ref(),k=i.computed(()=>g.value?!!getComputedStyle(g.value).getPropertyValue("--grid-content-width"):!1),T=i.computed(()=>m.value?Ig:Og),O=i.ref(!1),_=zi.useVModel(n,"visible",s,{defaultValue:!1}),S=U=>{const E=document.cookie.split(";").find(w=>w.split("=")[0].trim()===encodeURIComponent(U));return E?decodeURIComponent(E.split("=")[1]):null},R=(U,E,w,F)=>{const G=`; max-age=${w*24*60*60}`;document.cookie=`${encodeURIComponent(U)}=${encodeURIComponent(E)}${G}; path=/; domain=${F}`},L=(U,E)=>{document.cookie=`${encodeURIComponent(U)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${E}`},I=U=>{typeof U=="boolean"?_.value=U:_.value=!_.value,i.nextTick(()=>{!_.value&&m.value&&S(T.value)!==Rs&&R(T.value,Rs,180,n.cookieDomain??location.hostname)})},j=i.ref(!1),M=U=>{typeof U=="boolean"?j.value=U:j.value=!j.value},P=()=>m.value?S(T.value)!==Rs:(S(T.value)??"0")===Ag,N=()=>m.value?S(T.value)===Rs:S(T.value)===sc;i.onMounted(()=>{P()&&I(!0)}),i.watch(c,()=>{I(P())});const X=()=>{O.value=!0,L(T.value,n.cookieDomain??location.hostname),R(T.value,sc,180,n.cookieDomain??location.hostname),I(!1)},b=()=>{O.value=!1,L(T.value,n.cookieDomain??location.hostname),R(T.value,Ng,180,n.cookieDomain??location.hostname),I(!1)},C=i.computed(()=>l.value?[{id:"save",label:h("cookie.saveSetting"),variant:"text",onClick:()=>{O.value?X():b(),M(!1)}},{id:"allowAll",label:h("cookie.acceptAll"),variant:"text",onClick:()=>{O.value=!0,X(),M(!1)}}]:[{id:"save",color:"primary",label:h("cookie.saveSetting"),variant:"outline",size:"medium",round:"pill",onClick:()=>{O.value?X():b(),M(!1)}},{id:"allowAll",color:"primary",label:h("cookie.acceptAll"),variant:"outline",size:"medium",round:"pill",onClick:()=>{O.value=!0,X(),M(!1)}}]),$=U=>{U&&(O.value=N())};return e({check(){N()===_.value&&I()}}),(U,E)=>(i.openBlock(),i.createBlock(i.unref(He.ClientOnly),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.Teleport,{to:r.wrapper||"#app"},[i.unref(_)?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"cookieNoticeRef",ref:g,class:"cookie-notice"},[i.createElementVNode("div",ag,[i.createElementVNode("div",{type:i.unref(c),class:i.normalizeClass({"cookie-notice-wrap-grid":k.value,"cookie-notice-wrap":!k.value})},[i.createElementVNode("div",lg,[m.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(A.OIcon),{style:{display:"inline-block","font-size":"24px","margin-right":"4px"}},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("svg",ug,[...E[4]||(E[4]=[i.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),i.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}),i.createElementVNode("p",cg,[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(h)("cookie.about")),9,dg)])],64)):(i.openBlock(),i.createElementBlock("p",hg,i.toDisplayString(i.unref(h)("cookie.title",[r.community])),1)),i.createVNode(i.unref(A.OIcon),{class:"cookie-notice-close",onClick:E[0]||(E[0]=w=>I(!1))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconClose))]),_:1})]),m.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",fg,[i.createElementVNode("p",pg,[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(h)("cookie.about")),9,mg),E[5]||(E[5]=i.createTextVNode(". ",-1))]),i.createElementVNode("div",gg,[i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:X},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.acceptAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:b},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.rejectAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:E[1]||(E[1]=w=>M(!0))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.manage")),1)]),_:1})])]))],10,og)]),i.createVNode(i.unref(A.ODialog),{visible:j.value,"onUpdate:visible":E[3]||(E[3]=w=>j.value=w),size:i.unref(o)?"medium":"large","phone-half-full":i.unref(a),"main-class":k.value?"o-cookie-notice-dlg-main":"",class:"cookie-dlg",actions:C.value,onChange:$,style:{"--dlg-radius":"4px"}},{header:i.withCtx(()=>[i.createElementVNode("span",vg,i.toDisplayString(i.unref(h)("cookie.manage")),1)]),default:i.withCtx(()=>[i.createElementVNode("div",_g,[i.createElementVNode("div",yg,[i.createElementVNode("div",Tg,[i.createElementVNode("span",bg,i.toDisplayString(i.unref(h)("cookie.necessaryCookie")),1),i.createElementVNode("span",xg,i.toDisplayString(i.unref(h)("cookie.alwaysOn")),1)]),i.createElementVNode("div",Cg,i.toDisplayString(i.unref(h)("cookie.necessaryCookieDetail")),1)]),i.createElementVNode("div",Eg,[i.createElementVNode("div",Sg,[i.createElementVNode("span",kg,i.toDisplayString(i.unref(h)("cookie.analyticalCookie")),1),i.createElementVNode("span",wg,[i.createVNode(i.unref(A.OSwitch),{modelValue:O.value,"onUpdate:modelValue":E[2]||(E[2]=w=>O.value=w)},null,8,["modelValue"])])]),i.createElementVNode("div",Dg,i.toDisplayString(i.unref(h)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","main-class","actions"])],512)):i.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),hh=He._export_sfc(Bg,[["__scopeId","data-v-f7b7244e"]]),Lg={key:0,class:"atom"},Mg={class:"atom-text"},Pg=["href"],Rg=["src"],Vg={key:0,class:"quick-nav"},Fg={class:"category-title"},$g={class:"navs"},Ug=["href"],qg={key:0,class:"friendship-link"},Hg={class:"friendship-link-title"},jg={class:"friendship-link-box"},zg=["href"],Gg={key:0,class:"footer-logo"},Wg=["src"],Yg=["src"],Xg=["href"],Kg={key:1,class:"footer-option"},Qg={class:"footer-option-item"},Zg=["href"],Jg={class:"license"},e1={class:"copyright"},t1={class:"filing"},i1=["href"],n1=["src"],r1={key:2,class:"footer-right"},s1={key:0,class:"code-box"},a1=["src"],o1={class:"code-layer"},l1=["src"],u1={class:"txt"},c1={class:"app-footer-pc"},d1={key:0,class:"footer-left"},h1=["href"],f1=["src"],p1={key:0,class:"footer-right"},m1=["href"],g1={class:"app-footer-mb"},v1={key:0,class:"links"},_1=["href"],y1={class:"copyright"},T1={key:0,class:"approval"},b1=["href"],x1=["src"],C1=i.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(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([e.simple?"app-footer-simple":"app-footer"])},[e.simple?(i.openBlock(),i.createBlock(vn,{key:1},{default:i.withCtx(()=>[i.createElementVNode("div",c1,[t.$slots.left||e.footerOption?i.renderSlot(t.$slots,"left",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",d1,[i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].copyright),1),i.createElementVNode("a",{class:"approval",href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,h1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,f1),i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),t.$slots.right||e.footerOption?i.renderSlot(t.$slots,"right",{key:1},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",p1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.footerOption[e.lang].link,(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:s.url},[i.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},i.toDisplayString(s.name),9,m1),a!==e.footerOption[e.lang].link.length-1?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:0,direction:"v"})):i.createCommentVNode("",!0)],64))),128))])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0)]),i.createElementVNode("div",g1,[t.$slots.right||e.footerOption?i.renderSlot(t.$slots,"right",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",v1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.footerOption[e.lang].link,(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:s.url},[i.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},i.toDisplayString(s.name),9,_1),a!==e.footerOption[e.lang].link.length-1?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:0,direction:"v"})):i.createCommentVNode("",!0)],64))),128))])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"copyright",{},()=>[i.createElementVNode("div",y1,i.toDisplayString(e.footerOption[e.lang].copyright),1)],!0),t.$slots.left||e.footerOption?i.renderSlot(t.$slots,"left",{key:1},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",T1,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,b1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,x1),i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0)])]),_:3})):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t.$slots.atom||e.atom?(i.openBlock(),i.createBlock(vn,{key:0},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"atom",{},()=>[e.atom?(i.openBlock(),i.createElementBlock("div",Lg,[i.createElementVNode("p",Mg,i.toDisplayString(e.atom[e.lang].title),1),i.createElementVNode("a",{href:e.atom[e.lang].href,target:"_blank"},[i.createElementVNode("img",{src:e.atom[e.lang].img,class:"atom-logo",alt:""},null,8,Rg)],8,Pg)])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.ODivider),{class:"atom-divider"})],!0)]),_:3})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"footer-content",style:i.normalizeStyle({backgroundImage:`url(${e.footerBg})`})},[i.createVNode(vn,null,{default:i.withCtx(()=>[t.$slots.quickNav||e.quickNav?i.renderSlot(t.$slots,"quickNav",{key:0},()=>[e.quickNav?(i.openBlock(),i.createElementBlock("div",Vg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.quickNav[e.lang],s=>(i.openBlock(),i.createElementBlock("div",{key:s.title,class:"category"},[i.createElementVNode("div",Fg,i.toDisplayString(s.title),1),i.createElementVNode("ul",$g,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.list,a=>(i.openBlock(),i.createElementBlock("li",{key:a.title,class:"nav"},[i.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(a.title),9,Ug)]))),128))])]))),128))])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),t.$slots.friendshipLink||e.friendshipLink?i.renderSlot(t.$slots,"friendshipLink",{key:1},()=>[e.friendshipLink?(i.openBlock(),i.createElementBlock("div",qg,[i.createElementVNode("div",Hg,i.toDisplayString(e.friendshipLink.title[e.lang]),1),i.createElementVNode("div",jg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.friendshipLink.link[e.lang],s=>(i.openBlock(),i.createElementBlock("a",{href:s.link,key:s.link,target:"_blank"},i.toDisplayString(s.title),9,zg))),128))])])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"footer",{},()=>[i.createElementVNode("div",{class:i.normalizeClass(["inner",{"inner-en":e.lang==="en"}])},[e.footerLogo?(i.openBlock(),i.createElementBlock("div",Gg,[i.createElementVNode("img",{class:"show-pc",src:e.footerLogo.logo,alt:""},null,8,Wg),i.createElementVNode("img",{class:"show-mo",src:e.footerLogo.logoMb,alt:""},null,8,Yg),i.createElementVNode("p",null,[i.createElementVNode("a",{class:"email",href:`mailto:${e.footerLogo.email}`,target:"_blank"},i.toDisplayString(e.footerLogo.email),9,Xg)])])):i.createCommentVNode("",!0),e.footerOption?(i.openBlock(),i.createElementBlock("div",Kg,[i.createElementVNode("div",Qg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.footerOption[e.lang].link,(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:s.url},[i.createElementVNode("a",{target:"_blank",href:s.url},i.toDisplayString(s.name),9,Zg),a!==e.footerOption[e.lang].link.length-1?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:0,style:{"--o-divider-bd-color":"var(--o-color-info3-inverse)","--o-divider-label-gap":"0 8px"},direction:"v"})):i.createCommentVNode("",!0)],64))),128))]),i.createElementVNode("p",Jg,[i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].licenseText),1),i.createTextVNode(" "+i.toDisplayString(e.footerOption[e.lang].licenseInfo),1)]),i.createElementVNode("div",e1,[i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].copyright),1),i.createElementVNode("div",t1,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,i1),i.createElementVNode("img",{src:e.footerOption[e.lang].policeIcon,class:"filing-img"},null,8,n1),i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])])])):i.createCommentVNode("",!0),e.qrcode?(i.openBlock(),i.createElementBlock("div",r1,[e.lang==="zh"?(i.openBlock(),i.createElementBlock("div",s1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.qrcode,(s,a)=>(i.openBlock(),i.createElementBlock("div",{key:a,class:"code-pop"},[i.createElementVNode("img",{src:s.img,class:"code-img",alt:""},null,8,a1),i.createElementVNode("div",o1,[i.createElementVNode("img",{src:s.code,alt:""},null,8,l1),i.createElementVNode("p",u1,i.toDisplayString(s.label),1)])]))),128))])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),fh=He._export_sfc(C1,[["__scopeId","data-v-e6208e27"]]),E1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function S1(r,e){return i.openBlock(),i.createElementBlock("svg",E1,[...e[0]||(e[0]=[i.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 Nl={name:"components-icon-close",render:S1},k1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function w1(r,e){return i.openBlock(),i.createElementBlock("svg",k1,[...e[0]||(e[0]=[i.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),i.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 ac={name:"components-icon-header-search",render:w1},D1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function A1(r,e){return i.openBlock(),i.createElementBlock("svg",D1,[...e[0]||(e[0]=[i.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 N1={name:"components-icon-header-delete",render:A1},I1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function O1(r,e){return i.openBlock(),i.createElementBlock("svg",I1,[...e[0]||(e[0]=[i.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 B1={name:"components-icon-delete",render:O1},L1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function M1(r,e){return i.openBlock(),i.createElementBlock("svg",L1,[...e[0]||(e[0]=[i.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 P1={name:"components-icon-header-back",render:M1},R1={class:"o-header-search"},V1={class:"o-header-search-drawer"},F1={key:0,class:"o-header-search-recommend-container"},$1=["onClick"],U1={key:1,class:"o-header-search-history-container"},q1={class:"o-header-search-history-header"},H1={class:"o-header-search-history-header-title"},j1={class:"o-header-search-history-item-container"},z1=["onClick"],G1={class:"o-header-search-history-item-text"},W1={key:3,class:"o-header-search-hot-container"},Y1={class:"o-header-search-hot-header"},X1={class:"o-header-search-hot-item-container"},K1=["onClick"],Q1=i.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(r,{emit:e}){const{lePadV:t}=Ct.useScreen(),{t:n}=He.useI18n(),s=r,a=e,o=i.ref(s.modelValue),l=i.ref(s.historyItems),c=i.ref(!1),h=i.ref(),m=i.computed(()=>!t.value&&c.value||t.value&&o.value);i.watch(()=>s.modelValue,I=>{o.value!==I&&(o.value=I)}),i.watch(()=>o.value,I=>{a("update:modelValue",I)}),i.watch(()=>s.historyItems,I=>{l.value!==I&&(l.value=I)}),i.watch(()=>l.value,I=>{a("update:historyItems",I)}),i.onMounted(()=>{if(s.storeHistory&&s.storageKey)try{const I=JSON.parse(localStorage.getItem(s.storageKey)||"[]");Array.isArray(I)&&I.length&&(l.value=Array.from(new Set([...l.value,...I])))}catch{}});const g=()=>{c.value=!0},k=()=>{const I=o.value.trim();I&&(c.value=!1,l.value.unshift(I),l.value=Array.from(new Set(l.value)),l.value.length>s.maxHistoryCount&&l.value.pop(),s.storeHistory&&s.storeHistory&&localStorage.setItem(s.storageKey,JSON.stringify(l.value)),a("search",I),s.searchUrl&&window.open(s.searchUrl+I,s.searchUrlOpenBlank?"_blank":"_self","noopener noreferrer"))},T=()=>{o.value="",a("clear"),t.value||(c.value=!1)},O=()=>{const I=[...l.value];l.value=[],s.storeHistory&&s.storeHistory&&localStorage.removeItem(s.storageKey),a("delete-history",I)},_=I=>{l.value=l.value.filter(j=>j!==I),s.storeHistory&&s.storeHistory&&(l.value.length?localStorage.setItem(s.storageKey,JSON.stringify(l.value)):localStorage.removeItem(s.storageKey)),a("delete-history-item",I)},S=I=>{o.value=I,k()},R=()=>{o.value="",c.value=!1},L=i.ref();return zi.onClickOutside(L,T),(I,j)=>(i.openBlock(),i.createElementBlock("div",R1,[i.createElementVNode("div",{ref_key:"posWrapper",ref:L,class:i.normalizeClass({"o-header-search-input-pc-wrapper":!i.unref(t),"o-header-search-input-pc-wrapper-left":!i.unref(t)&&r.expandDirection==="left","o-header-search-input-pc-wrapper-right":!i.unref(t)&&r.expandDirection==="right","o-header-search-input-mobile-wrapper":i.unref(t),focus:c.value})},[i.createElementVNode("div",{class:i.normalizeClass(["o-header-search-input-wrapper",{focus:c.value}])},[i.unref(t)&&c.value?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon",onClick:R},{default:i.withCtx(()=>[i.createVNode(i.unref(P1))]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OInput),{ref_key:"inputRef",ref:h,modelValue:o.value,"onUpdate:modelValue":j[0]||(j[0]=M=>o.value=M),class:"o-header-search-input",placeholder:c.value?r.expandedPlaceholder??i.unref(n)("search.expandedPlaceholder"):r.placeholder??i.unref(n)("search.placeholder"),onFocus:g,onKeyup:i.withKeys(k,["enter"])},{prefix:i.withCtx(()=>[i.renderSlot(I.$slots,"input-prefix",{},()=>[i.createVNode(i.unref(A.OIcon),{class:"o-header-search-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(ac))]),_:1})],!0)]),suffix:i.withCtx(()=>[i.renderSlot(I.$slots,"input-suffix",{},()=>[r.clearable&&m.value?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon close",onClick:T},{default:i.withCtx(()=>[i.createVNode(i.unref(Nl))]),_:1})):i.createCommentVNode("",!0)],!0)]),_:3},8,["modelValue","placeholder"]),i.unref(t)&&c.value?(i.openBlock(),i.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:k},i.toDisplayString(r.searchTextMobile??i.unref(n)("search")),1)):i.createCommentVNode("",!0)],2),i.withDirectives(i.createElementVNode("div",V1,[i.renderSlot(I.$slots,"drawer",{recommendItems:r.recommendItems,historyItems:l.value,hotItems:r.hotItems},()=>[r.recommendItems.length?(i.openBlock(),i.createElementBlock("div",F1,[i.renderSlot(I.$slots,"recommend-header",{recommend:r.recommendItems},void 0,!0),i.renderSlot(I.$slots,"recommend-content",{recommend:r.recommendItems},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.recommendItems,M=>(i.openBlock(),i.createElementBlock("div",{class:"o-header-search-recommend-item",key:M,onClick:P=>S(M)},i.toDisplayString(M),9,$1))),128))],!0)])):l.value.length?(i.openBlock(),i.createElementBlock("div",U1,[i.renderSlot(I.$slots,"history-header",{history:l.value},()=>[i.createElementVNode("div",q1,[i.createElementVNode("span",H1,i.toDisplayString(r.historyTitle??i.unref(n)("search.history")),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-icon",onClick:O},{default:i.withCtx(()=>[i.createVNode(i.unref(B1))]),_:1})])],!0),i.renderSlot(I.$slots,"history-content",{history:l.value},()=>[i.createElementVNode("div",j1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,M=>(i.openBlock(),i.createElementBlock("div",{key:M,class:"o-header-search-history-item",onClick:P=>S(M)},[i.createElementVNode("span",G1,i.toDisplayString(M),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-history-item-icon",onClick:i.withModifiers(P=>_(M),["stop"])},{default:i.withCtx(()=>[i.createVNode(i.unref(N1),{class:"icon-delete"})]),_:1},8,["onClick"])],8,z1))),128))])],!0)])):i.createCommentVNode("",!0),(r.recommendItems.length||l.value.length)&&r.hotItems.length?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:2,class:"o-header-search-drawer-divider"})):i.createCommentVNode("",!0),r.hotItems.length?(i.openBlock(),i.createElementBlock("div",W1,[i.renderSlot(I.$slots,"hot-header",{hot:r.hotItems},()=>[i.createElementVNode("div",Y1,i.toDisplayString(r.hotTitle??i.unref(n)("search.hot")),1)],!0),i.renderSlot(I.$slots,"hot-content",{hot:r.hotItems},()=>[i.createElementVNode("div",X1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.hotItems,M=>(i.openBlock(),i.createElementBlock("div",{key:M,class:"o-header-search-hot-item",onClick:P=>S(M)},i.toDisplayString(M),9,K1))),128))])],!0)])):i.createCommentVNode("",!0)],!0)],512),[[i.vShow,c.value]])],2),i.unref(t)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon-mobile",onClick:g},{default:i.withCtx(()=>[i.createVNode(i.unref(ac))]),_:1})):i.createCommentVNode("",!0)]))}}),ph=He._export_sfc(Q1,[["__scopeId","data-v-9f1bd8fc"]]),Z1=["src"],J1=i.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,t=["#058EF0","#FA7305","#03B5A5"],n=i.computed(()=>{var a;return(a=e.name)==null?void 0:a.charAt(0).toUpperCase()}),s=i.computed(()=>{var l;const a={"background-color":"",width:"32px",height:"32px","font-size":"20px"};a["background-color"]=e.name?t[((l=e.name)==null?void 0:l.length)%t.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")?(i.openBlock(),i.createElementBlock("img",{key:0,src:r.avatar,class:i.normalizeClass(["img-avatar",r.variant]),style:i.normalizeStyle(s.value),alt:""},null,14,Z1)):(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["word-avatar",r.variant]),style:i.normalizeStyle(s.value)},i.toDisplayString(n.value),7))}}),e2=He._export_sfc(J1,[["__scopeId","data-v-340348ce"]]),t2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function i2(r,e){return i.openBlock(),i.createElementBlock("svg",t2,[...e[0]||(e[0]=[i.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 n2={name:"components-icon-avatar-line",render:i2},r2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function s2(r,e){return i.openBlock(),i.createElementBlock("svg",r2,[...e[0]||(e[0]=[i.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 Il={name:"components-icon-chevron-down",render:s2},a2={class:"header-user"},o2={key:0,class:"user-info"},l2={class:"info-wrap hover-icon-rotate"},u2={class:"user-account"},c2={key:1},d2=i.defineComponent({__name:"OHeaderUser",props:{token:{default:void 0},lang:{default:void 0},noticeTotal:{default:void 0},userInfo:{default:void 0},options:{default:void 0}},emits:["login","logout"],setup(r,{emit:e}){const{lePadV:t}=Ct.useScreen(),n=e,s=()=>{n("login")},a=o=>{o!=null&&o.logout?n("logout"):window.open(o.url,o.target)};return(o,l)=>(i.openBlock(),i.createElementBlock("div",a2,[r.token?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,onClick:s,class:"avatar-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(n2))]),_:1})),i.createVNode(i.Transition,{name:"header-user-zoom-in"},{default:i.withCtx(()=>[r.token?(i.openBlock(),i.createElementBlock("div",o2,[i.createVNode(i.unref(A.ODropdown),{trigger:i.unref(t)?"click":"hover",optionPosition:i.unref(t)?"br":"bottom","option-wrap-class":`user-dropdown ${r.lang==="en"?"is-en":""}`},{dropdown:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.options,c=>(i.openBlock(),i.createBlock(i.unref(A.ODropdownItem),{key:c.label,style:{"--dropdown-item-justify":"center"},onClick:h=>a(c)},{default:i.withCtx(()=>[c!=null&&c.total?(i.openBlock(),i.createBlock(i.unref(A.OBadge),{key:0,value:c.total,color:"danger",class:i.normalizeClass(["header-message message",{"notice-not":!c.total}])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.label),1)]),_:2},1032,["value","class"])):(i.openBlock(),i.createElementBlock("span",c2,i.toDisplayString(c.label),1))]),_:2},1032,["onClick"]))),128))]),default:i.withCtx(()=>[i.createElementVNode("div",l2,[i.createVNode(i.unref(A.OBadge),{value:r.noticeTotal,dot:!0,color:"danger",class:i.normalizeClass(["header-message user-avatar",{"notice-not":!r.noticeTotal}])},{default:i.withCtx(()=>[i.createVNode(e2,{avatar:r.userInfo.photo,name:r.userInfo.username,"custom-size":20},null,8,["avatar","name"])]),_:1},8,["value","class"]),i.createElementVNode("p",u2,i.toDisplayString(r.userInfo.username),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Il))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):i.createCommentVNode("",!0)]),_:1})]))}}),mh=He._export_sfc(d2,[["__scopeId","data-v-bf7f5326"]]),gh=i.defineComponent({__name:"OPlusConfigProvider",props:{locale:{},theme:{default:"light"}},setup(r){const e=r,t=i.reactive({locale:i.computed(()=>e.locale),theme:i.computed(()=>e.theme)});return i.provide(He.configProviderInjectKey,t),(n,s)=>(i.openBlock(),i.createBlock(i.unref(A.OConfigProvider),{locale:r.locale==="zh"?i.unref(Km):i.unref(Qm)},{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3},8,["locale"]))}}),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 i.openBlock(),i.createElementBlock("svg",h2,[...e[0]||(e[0]=[i.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 Yr={name:"components-icon-chevron-right",render:f2},p2={class:"section-wrapper"},m2={key:1,class:"section-title"},g2={key:2,class:"section-subtitle"},v2={key:1,class:"section-body"},_2={key:2,class:"section-footer"},y2=i.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(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["app-section",{"is-full":e.full}])},[i.createElementVNode("div",p2,[i.renderSlot(t.$slots,"main",{},()=>[t.$slots.header||e.title||e.subtitle?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["section-header",{"is-left":!e.headerJustifyCenter}])},[i.renderSlot(t.$slots,"header",{},()=>[i.unref(A.isArray)(e.title)?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(e.title,s=>(i.openBlock(),i.createElementBlock("h2",{key:s,class:"section-title"},i.toDisplayString(s),1))),128)):t.$slots.title||e.title?(i.openBlock(),i.createElementBlock("h2",m2,[i.renderSlot(t.$slots,"title",{},()=>[i.createTextVNode(i.toDisplayString(e.title),1)],!0)])):i.createCommentVNode("",!0),t.$slots.subtitle||e.subtitle?(i.openBlock(),i.createElementBlock("p",g2,[i.renderSlot(t.$slots,"subtitle",{},()=>[i.createTextVNode(i.toDisplayString(e.subtitle),1)],!0)])):i.createCommentVNode("",!0)],!0)],2)):i.createCommentVNode("",!0),t.$slots.default?(i.openBlock(),i.createElementBlock("div",v2,[i.renderSlot(t.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.footer||e.footer?(i.openBlock(),i.createElementBlock("div",_2,[i.renderSlot(t.$slots,"footer",{},()=>[i.createVNode(i.unref(A.OLink),{href:e.footerHref,target:"_blank"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"footer-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.footer)+" ",1)]),_:1},8,["href"])],!0)])):i.createCommentVNode("",!0)],!0)])],2))}}),vh=He._export_sfc(y2,[["__scopeId","data-v-2fc90e8a"]]),T2={class:"source-code"},b2={key:0,class:"info-wrap"},x2={class:"title"},C2={class:"info-wrap hover-icon-rotate"},E2={class:"title"},S2=i.defineComponent({__name:"OSourceCode",props:{title:{default:void 0},options:{default:void 0},url:{default:void 0},icon:{default:void 0},justify:{default:"center"}},setup(r){const e=s=>{window.open(s.url,"_blank")},t=i.ref(!1),n=s=>{t.value=s};return(s,a)=>(i.openBlock(),i.createElementBlock("div",T2,[r.url?(i.openBlock(),i.createElementBlock("div",b2,[i.createElementVNode("span",x2,i.toDisplayString(r.title),1),r.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.icon),{class:"icon"}))]),_:1})):i.createCommentVNode("",!0)])):(i.openBlock(),i.createBlock(i.unref(A.ODropdown),{key:1,trigger:"hover",optionPosition:"bottom","option-wrap-class":"dropdown",class:i.normalizeClass({"dropdown-active":t.value}),onVisibleChange:n},{dropdown:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.options,o=>(i.openBlock(),i.createBlock(i.unref(A.ODropdownItem),{onClick:l=>e(o),key:o.url,class:"list",style:i.normalizeStyle({"--dropdown-item-justify":r.justify})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(o.label)+" ",1),o.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(o.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0)]),_:2},1032,["onClick","style"]))),128))]),default:i.withCtx(()=>[i.createElementVNode("div",C2,[i.createElementVNode("span",E2,i.toDisplayString(r.title),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Il))]),_:1})])]),_:1},8,["class"]))]))}}),_h=He._export_sfc(S2,[["__scopeId","data-v-0b5e5e40"]]),k2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function w2(r,e){return i.openBlock(),i.createElementBlock("svg",k2,[...e[0]||(e[0]=[i.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 lo={name:"components-icon-sun",render:w2},D2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function A2(r,e){return i.openBlock(),i.createElementBlock("svg",D2,[...e[0]||(e[0]=[i.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 uo={name:"components-icon-moon",render:A2},N2={class:"o-theme-switcher"},I2={key:1,class:"o-theme-switcher-mobile"},O2=i.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},lightIcon:{default:lo},darkIcon:{default:uo}},emits:["update:theme","change"],setup(r,{emit:e}){const t=r,n=e,{gtPhone:s}=Ct.useScreen(),a=i.computed({get(){return t.theme},set(c){n("update:theme",c),n("change",c)}}),o=i.computed(()=>t.type==="common"||t.type==="auto"&&s.value),l=()=>{a.value=a.value===t.lightValue?t.darkValue:t.lightValue};return(c,h)=>(i.openBlock(),i.createElementBlock("div",N2,[o.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"o-theme-switcher-common",onClick:l},[i.createVNode(i.unref(A.OIcon),{class:"o-theme-icon"},{default:i.withCtx(()=>[a.value===r.lightValue?(i.openBlock(),i.createBlock(i.unref(uo),{key:0})):(i.openBlock(),i.createBlock(i.unref(lo),{key:1}))]),_:1})])):(i.openBlock(),i.createElementBlock("div",I2,[i.createVNode(i.unref(A.OSwitch),{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=m=>a.value=m),class:"o-theme-switch","checked-value":r.darkValue,"unchecked-value":r.lightValue},{on:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"o-theme-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(lo))]),_:1})]),off:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"o-theme-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(uo))]),_:1})]),_:1},8,["modelValue","checked-value","unchecked-value"])]))]))}}),yh=He._export_sfc(O2,[["__scopeId","data-v-9aaa2610"]]),ia=new Map([[1,{label:"线下",value:1}],[2,{label:"线上",value:2}],[3,{label:"线上与线下",value:3}]]),oc=/^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w ./?%&=-]*)?$/,Wn=new Map([[1,{id:"draft",label:"草稿",text:"草稿",value:1}],[2,{id:"under-review",label:"审核中",text:"未审核",value:2}],[3,{id:"registration",label:"报名中",text:"审核通过",value:3}],[4,{id:"in-progress",label:"进行中",text:"审核通过",value:4}],[5,{id:"ended",label:"已结束",text:"已结束",value:5}],[6,{id:"modified",label:"已修改",text:"已修改",value:6}],[7,{id:"reject",label:"已驳回",text:"已驳回",value:7}]]),B2=new Map([["all",{label:"全部",value:"all"}],["rejected",{label:"已驳回",value:"rejected"}],["approved",{label:"已通过",value:"approved"}],["publish",{label:"未审核",value:"publish"}],["cancel",{label:"已取消",value:"cancel"}]]),L2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function M2(r,e){return i.openBlock(),i.createElementBlock("svg",L2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M10 14.267c-0.413 0-0.817-0.043-1.211-0.131h-0.001c-0.329-0.073-0.652-0.176-0.968-0.31-0.318-0.135-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.211s0.044-0.817 0.131-1.212v0c0.073-0.33 0.176-0.652 0.31-0.968 0.134-0.318 0.295-0.618 0.482-0.902v0c0.207-0.314 0.446-0.607 0.718-0.878s0.564-0.511 0.878-0.718c0.283-0.187 0.584-0.347 0.902-0.482 0.316-0.134 0.639-0.237 0.968-0.31v0c0.394-0.087 0.798-0.131 1.211-0.131s0.817 0.044 1.212 0.131v0c0.33 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878v0c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968v0.001c0.087 0.394 0.131 0.798 0.131 1.211v4.667c0 0.129-0.023 0.248-0.068 0.358v0c-0.046 0.11-0.114 0.21-0.205 0.302s-0.192 0.159-0.302 0.205v0c-0.11 0.046-0.229 0.068-0.358 0.068h-4.667zM16.4 13.333c0 0.129 0.023 0.248 0.068 0.358s0.114 0.211 0.205 0.302c0.091 0.091 0.192 0.159 0.302 0.205v0c0.11 0.046 0.229 0.068 0.358 0.068h4.667c0.413 0 0.817-0.044 1.212-0.131v0c0.329-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968v0c0.087-0.394 0.131-0.798 0.131-1.211s-0.044-0.817-0.131-1.212c-0.073-0.33-0.176-0.652-0.31-0.968-0.134-0.318-0.295-0.618-0.482-0.902v0c-0.207-0.314-0.447-0.607-0.718-0.878s-0.564-0.511-0.878-0.718c-0.283-0.187-0.584-0.347-0.902-0.482-0.316-0.134-0.639-0.237-0.968-0.31-0.394-0.087-0.798-0.131-1.212-0.131s-0.817 0.044-1.212 0.131c-0.33 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.902-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212v4.667zM22 12.4h-3.733v-3.733c0-0.287 0.031-0.568 0.094-0.84 0.048-0.208 0.114-0.413 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.303-0.416 0.489-0.601s0.386-0.349 0.601-0.489l0.001-0.001c0.184-0.12 0.379-0.224 0.585-0.311 0.2-0.085 0.404-0.151 0.612-0.199 0.273-0.063 0.553-0.094 0.84-0.094s0.567 0.031 0.84 0.094c0.208 0.048 0.413 0.114 0.613 0.199 0.206 0.087 0.401 0.191 0.586 0.311 0.215 0.14 0.416 0.304 0.601 0.489s0.349 0.386 0.489 0.601c0.12 0.184 0.224 0.38 0.311 0.586 0.085 0.2 0.151 0.404 0.199 0.612 0.063 0.273 0.094 0.553 0.094 0.84s-0.031 0.568-0.094 0.84c-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.586v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.613 0.199h-0.001c-0.273 0.063-0.552 0.094-0.84 0.094zM13.733 12.4v-3.733c0-0.287-0.031-0.568-0.094-0.84-0.048-0.208-0.114-0.413-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.14-0.215-0.303-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.612-0.199-0.273-0.063-0.553-0.094-0.841-0.094s-0.567 0.031-0.84 0.094c-0.208 0.048-0.413 0.114-0.612 0.199-0.206 0.087-0.401 0.191-0.586 0.311v0c-0.215 0.14-0.416 0.303-0.601 0.489s-0.349 0.386-0.489 0.601v0c-0.12 0.184-0.224 0.38-0.311 0.586-0.085 0.2-0.151 0.404-0.199 0.612-0.063 0.273-0.094 0.553-0.094 0.84s0.031 0.568 0.094 0.84c0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.304 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.38 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199v0c0.273 0.063 0.553 0.094 0.84 0.094h3.733zM16.4 16c0-0.258 0.091-0.478 0.273-0.66 0.091-0.091 0.192-0.159 0.302-0.205s0.229-0.068 0.358-0.068h4.667c0.414 0 0.817 0.044 1.212 0.131 0.329 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968 0.087 0.394 0.131 0.798 0.131 1.212s-0.044 0.817-0.131 1.212c-0.073 0.33-0.176 0.652-0.31 0.968-0.134 0.318-0.295 0.618-0.482 0.902-0.207 0.314-0.447 0.607-0.718 0.878s-0.564 0.511-0.878 0.718c-0.283 0.187-0.584 0.347-0.902 0.482-0.316 0.134-0.639 0.237-0.968 0.31-0.394 0.087-0.798 0.131-1.212 0.131s-0.817-0.044-1.212-0.131c-0.33-0.073-0.652-0.176-0.968-0.31-0.318-0.134-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.212v-4.667zM10 15.067c-0.413 0-0.817 0.044-1.212 0.131v0c-0.329 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.901-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212s0.044 0.817 0.131 1.212c0.073 0.329 0.176 0.652 0.31 0.968 0.134 0.318 0.295 0.618 0.482 0.902v0c0.207 0.314 0.446 0.607 0.718 0.878s0.564 0.511 0.878 0.718c0.283 0.187 0.584 0.347 0.902 0.482 0.316 0.134 0.639 0.237 0.968 0.31 0.394 0.087 0.798 0.131 1.212 0.131s0.817-0.044 1.212-0.131v0c0.33-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968 0.087-0.394 0.131-0.798 0.131-1.212v-4.667c0-0.258-0.091-0.478-0.273-0.66-0.091-0.091-0.192-0.159-0.302-0.205s-0.229-0.068-0.358-0.068h-4.667zM13.733 16.933v3.733c0 0.287-0.031 0.567-0.094 0.84-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.585v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.612 0.199-0.273 0.063-0.553 0.094-0.841 0.094s-0.567-0.031-0.84-0.094h-0.001c-0.208-0.048-0.412-0.114-0.612-0.199-0.206-0.087-0.401-0.191-0.586-0.311v0c-0.215-0.14-0.416-0.303-0.601-0.489s-0.349-0.386-0.489-0.601c-0.12-0.184-0.224-0.38-0.311-0.586-0.085-0.2-0.151-0.404-0.199-0.612-0.063-0.273-0.094-0.553-0.094-0.84s0.031-0.568 0.094-0.841c0.048-0.208 0.114-0.412 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.304-0.416 0.489-0.601s0.386-0.349 0.601-0.489c0.184-0.12 0.38-0.224 0.586-0.311 0.2-0.085 0.404-0.151 0.612-0.199h0.001c0.273-0.063 0.553-0.094 0.84-0.094h3.733zM22 16.933h-3.733v3.733c0 0.287 0.031 0.567 0.094 0.84 0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.303 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.379 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199 0.273 0.063 0.553 0.094 0.84 0.094s0.567-0.031 0.84-0.094c0.208-0.048 0.413-0.114 0.613-0.199 0.206-0.087 0.401-0.191 0.586-0.311 0.215-0.141 0.416-0.304 0.601-0.489s0.349-0.386 0.489-0.601c0.12-0.184 0.224-0.38 0.311-0.586 0.085-0.2 0.151-0.404 0.199-0.612 0.063-0.273 0.094-0.553 0.094-0.84s-0.031-0.568-0.094-0.841c-0.048-0.208-0.114-0.412-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.141-0.215-0.304-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.613-0.199-0.273-0.063-0.553-0.094-0.84-0.094z"},null,-1)])])}const P2={name:"meeting-icon-all",render:M2},R2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function V2(r,e){return i.openBlock(),i.createElementBlock("svg",R2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M25.088 14.216l-0.852 0.781c-0.385 0.353-0.411 0.933-0.058 1.319s0.933 0.411 1.319 0.058l2.116-1.938c0.193-0.177 0.349-0.374 0.467-0.591 0.092-0.17 0.162-0.351 0.208-0.546 0.045-0.189 0.067-0.378 0.063-0.566-0.004-0.222-0.041-0.444-0.112-0.665s-0.17-0.423-0.297-0.605c-0.107-0.155-0.235-0.295-0.382-0.422-0.151-0.13-0.314-0.237-0.488-0.321-0.223-0.107-0.464-0.176-0.724-0.207l-5.601-0.661c-0.031-0.012-0.159-0.053-0.187-0.073-0.021-0.026-0.113-0.124-0.128-0.155l-2.377-5.087c-0.11-0.235-0.25-0.441-0.42-0.618v0c-0.133-0.138-0.285-0.259-0.454-0.362-0.165-0.1-0.338-0.177-0.517-0.232v0c-0.211-0.064-0.432-0.096-0.662-0.096s-0.451 0.032-0.662 0.096v0c-0.179 0.054-0.352 0.131-0.517 0.232-0.17 0.103-0.321 0.224-0.454 0.362-0.17 0.177-0.31 0.383-0.42 0.618l-2.377 5.087c-0.021 0.026-0.1 0.135-0.128 0.155-0.031 0.012-0.153 0.069-0.187 0.073l-5.601 0.661c-0.26 0.031-0.501 0.1-0.724 0.207v0c-0.174 0.084-0.336 0.191-0.488 0.321-0.147 0.127-0.275 0.267-0.382 0.422-0.127 0.182-0.226 0.384-0.297 0.605s-0.109 0.443-0.112 0.665c-0.003 0.188 0.018 0.377 0.063 0.566 0.047 0.194 0.116 0.376 0.208 0.546 0.118 0.217 0.274 0.414 0.467 0.591l4.119 3.773c0.018 0.029 0.099 0.137 0.11 0.171 0.001 0.009 0.002 0.025 0.004 0.044 0.005 0.054 0.013 0.133 0.008 0.159l-1.093 5.462c-0.051 0.255-0.060 0.505-0.028 0.749 0.025 0.191 0.076 0.378 0.152 0.562 0.074 0.179 0.168 0.343 0.28 0.493 0.133 0.177 0.293 0.333 0.479 0.47s0.384 0.241 0.593 0.315c0.177 0.062 0.362 0.101 0.555 0.118 0.198 0.017 0.392 0.009 0.581-0.025h0.001c0.242-0.043 0.478-0.127 0.705-0.253l4.953-2.737c0.032-0.008 0.159-0.050 0.193-0.050 0.032 0.008 0.163 0.033 0.193 0.050l4.831 2.669c0.233 0.129 0.473 0.214 0.72 0.256h0.001c0.192 0.033 0.388 0.039 0.588 0.020 0.195-0.019 0.382-0.061 0.56-0.126v0c0.211-0.077 0.411-0.187 0.598-0.329s0.347-0.305 0.478-0.488c0.111-0.154 0.201-0.323 0.271-0.506 0.072-0.188 0.119-0.379 0.139-0.573 0.026-0.25 0.008-0.504-0.053-0.762l-2.084-8.779c-0.121-0.509-0.615-0.813-1.124-0.693s-0.813 0.615-0.693 1.124l2.084 8.779c0.020 0.084 0.018 0.161-0.007 0.229s-0.071 0.129-0.141 0.181c-0.069 0.053-0.14 0.081-0.213 0.087s-0.147-0.013-0.223-0.055l-4.831-2.669c-0.171-0.094-0.347-0.165-0.53-0.212v0c-0.183-0.047-0.372-0.071-0.566-0.071s-0.384 0.024-0.566 0.071c-0.183 0.047-0.359 0.118-0.53 0.212l-4.953 2.737c-0.075 0.041-0.148 0.059-0.219 0.055s-0.142-0.032-0.21-0.082c-0.069-0.050-0.116-0.109-0.142-0.176s-0.031-0.142-0.014-0.226l1.093-5.462c0.039-0.195 0.053-0.387 0.041-0.579s-0.048-0.381-0.109-0.57c-0.062-0.189-0.144-0.363-0.248-0.525s-0.229-0.309-0.375-0.443l-4.119-3.773c-0.063-0.058-0.104-0.122-0.122-0.191s-0.014-0.145 0.012-0.227c0.026-0.081 0.067-0.145 0.123-0.191s0.126-0.074 0.211-0.084l5.601-0.661c0.195-0.023 0.381-0.069 0.558-0.138s0.345-0.161 0.504-0.276c0.159-0.115 0.299-0.245 0.42-0.392s0.223-0.308 0.306-0.486l2.377-5.087c0.036-0.077 0.084-0.135 0.145-0.173s0.133-0.058 0.218-0.058c0.085 0 0.157 0.019 0.218 0.058s0.109 0.096 0.144 0.173l2.377 5.087c0.083 0.178 0.185 0.34 0.306 0.486s0.261 0.277 0.42 0.392c0.159 0.115 0.327 0.207 0.504 0.276s0.363 0.115 0.558 0.138l5.601 0.661c0.085 0.010 0.155 0.038 0.211 0.084s0.097 0.109 0.123 0.191c0.026 0.081 0.030 0.157 0.012 0.227s-0.059 0.133-0.122 0.191l-1.263 1.157zM10.007 15.327l2 2c0.369 0.37 0.95 0.37 1.32 0s0.37-0.95 0-1.32l-2-2c-0.369-0.37-0.95-0.37-1.32 0s-0.37 0.95 0 1.32z"},null,-1)])])}const Ol={name:"meeting-icon-event",render:V2},F2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function $2(r,e){return i.openBlock(),i.createElementBlock("svg",F2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M16.933 4v1.733h8.4c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.242 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.098 0.266 0.128 0.404 0.034 0.156 0.050 0.315 0.050 0.479v7.222c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-7.222c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-18.667c-0.055 0-0.106 0.010-0.153 0.029v0 0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v13.333c0 0.055 0.010 0.106 0.029 0.153v0c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h18.667c0.055 0 0.107-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153v-2.953c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933v2.953c0 0.163-0.017 0.323-0.050 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.266 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-0.44l2.42 2.42c0.37 0.37 0.37 0.95 0 1.32s-0.95 0.37-1.32 0l-3.74-3.74h-12.507l-3.74 3.74c-0.37 0.37-0.95 0.37-1.32 0s-0.369-0.95 0-1.32l2.42-2.42h-0.44c-0.163 0-0.323-0.017-0.479-0.050v0c-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.122-0.37-0.199v0c-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35v0c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404v0c-0.034-0.156-0.050-0.315-0.050-0.479v-13.333c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h8.4v-1.733c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM18.72 17.392l4.615-4.741c0.365-0.374 0.357-0.955-0.018-1.32s-0.955-0.357-1.32 0.018l-3.906 4.012-3.532-4.067c-0.195-0.169-0.421-0.244-0.678-0.225s-0.47 0.125-0.639 0.32l-4.615 5.333c-0.342 0.395-0.3 0.975 0.095 1.317s0.974 0.3 1.316-0.095l3.91-4.518 3.397 3.925c0.169 0.195 0.381 0.302 0.639 0.32s0.541-0.111 0.736-0.28z"},null,-1)])])}const Bl={name:"meeting-icon-meet",render:$2},U2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function q2(r,e){return i.openBlock(),i.createElementBlock("svg",U2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M10.633 5.457c-1.119 0.457-2.181 1.053-3.185 1.79-0.422 0.309-0.51 0.883-0.201 1.305s0.883 0.51 1.305 0.201c0.927-0.68 1.908-1.223 2.943-1.629 0.185-0.073 0.373-0.141 0.562-0.205 0.658-0.223 1.325-0.389 2.001-0.497 0.64-0.103 1.287-0.154 1.943-0.154s1.304 0.051 1.943 0.154v0c0.676 0.108 1.343 0.274 2.001 0.497 0.189 0.064 0.376 0.133 0.562 0.205v0c1.035 0.407 2.015 0.95 2.943 1.629 0.421 0.309 0.996 0.221 1.305-0.201s0.221-0.996-0.201-1.305c-1.005-0.736-2.067-1.333-3.185-1.79-0.271-0.111-0.545-0.213-0.823-0.307-0.755-0.256-1.52-0.447-2.297-0.572-0.739-0.119-1.488-0.179-2.247-0.179s-1.508 0.060-2.247 0.179v0c-0.776 0.125-1.541 0.316-2.296 0.572-0.277 0.094-0.552 0.197-0.823 0.307v0zM28.933 18.667v1.333c0 0.163-0.017 0.323-0.051 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.099-0.404 0.128-0.156 0.034-0.315 0.050-0.479 0.050h-21.333c-0.163 0-0.323-0.017-0.479-0.050-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37s-0.098-0.266-0.128-0.404c-0.034-0.156-0.050-0.315-0.050-0.479v-8c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404s0.121-0.254 0.199-0.37c0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h21.333c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.241 0.178 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.050 0.315 0.050 0.478v4c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-4c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-21.333c-0.055 0-0.106 0.010-0.153 0.029v0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v8c0 0.055 0.010 0.106 0.029 0.154s0.178 0.178 0.217 0.217c0.047 0.020 0.098 0.029 0.153 0.029h21.333c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.154v-1.333c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM20.479 23.117v0c0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.121 0.37 0.199 0.125 0.083 0.241 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.051 0.316 0.051 0.479s-0.017 0.323-0.051 0.479c-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-8c-0.163 0-0.323-0.017-0.479-0.051-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.179-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404-0.034-0.156-0.050-0.315-0.050-0.479s0.017-0.323 0.050-0.479c0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.241 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.099 0.404-0.128 0.156-0.034 0.316-0.050 0.479-0.050h8c0.163 0 0.323 0.017 0.479 0.050zM20 24.933h-8c-0.055 0-0.106 0.010-0.153 0.029s-0.178 0.178-0.217 0.217c-0.020 0.047-0.029 0.098-0.029 0.154s0.010 0.106 0.029 0.153c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h8c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153s-0.010-0.106-0.029-0.154v0c-0.020-0.047-0.178-0.178-0.217-0.217-0.047-0.019-0.098-0.029-0.154-0.029z"},null,-1)])])}const Th={name:"meeting-icon-summit",render:q2};var Ve=(r=>(r.ALL="all",r.MEETING="meeting",r.EVENTS="events",r.SUMMIT="summit",r.ACTIVITY="activity",r.APPROVAL="approval",r))(Ve||{}),Oi=(r=>(r.SIG="sig",r.GROUP="group",r))(Oi||{});const{t:Pt}=He.useI18n(),H2=()=>{var r;return typeof document<"u"&&((r=getComputedStyle(document.documentElement).getPropertyValue("--o-deep-blue-6"))==null?void 0:r.trim())?"rgba(var(--o-deep-blue-6))":"var(--o-color-primary1)"},co={summit:"rgba(var(--o-orange-6))",events:"rgba(var(--o-cyan-6))",meeting:H2()},na=[{label:Pt("meeting.meetingTypeAll"),value:Ve.ALL,icon:P2},{label:Pt("meeting.meetingTypeMeet"),value:Ve.MEETING,icon:Bl,color:co.meeting,zIndex:3},{label:Pt("meeting.meetingTypeEvents"),value:Ve.EVENTS,icon:Ol,color:co.events,zIndex:2},{label:Pt("meeting.meetingTypeSummit"),value:Ve.SUMMIT,icon:Th,color:co.summit,zIndex:1}],gn=0,_n=1,rn=2,j2=[{label:Pt("meeting.day0"),value:gn,max:7},{label:Pt("meeting.week0"),value:_n,max:2},{label:Pt("meeting.month0"),value:rn,max:1}];Pt("meeting.day"),Pt("meeting.week"),Pt("meeting.month");const bh=[Pt("meeting.sunday"),Pt("meeting.monday"),Pt("meeting.tuesday"),Pt("meeting.wednesday"),Pt("meeting.thursday"),Pt("meeting.friday"),Pt("meeting.saturday")],z2=()=>{const r=[];for(let e=1;e<=7;e++){const t=e%7;r.push({value:t,label:bh[t]})}return r},Xs=z2(),xh=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,G2=["var(--o-color-primary1)","var(--o-color-warning1)","var(--o-color-success1)"],W2={class:"o-activity-form"},Y2={class:"time-config"},X2={class:"form-btns"},lc=i.defineComponent({__name:"OActivityForm",props:{data:{},creatActivity:{},editActivity:{},admins:{},organizers:{}},emits:["confirm","close"],setup(r,{expose:e,emit:t}){const n=t,s=A.useMessage(null),{lePadV:a}=Ct.useScreen(),{t:o}=He.useI18n(),l=o,c=r,h=i.computed(()=>!!c.data),m=i.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:""}),g=i.ref(),k=i.ref(!1),T=i.ref({title:[{required:!0,message:"请输入活动名称"},{validator:M=>{if(M.length>50)return{type:"danger",message:"活动名称不能超过50个字符"}}}],activity_type:[{required:!0,message:"请选择活动类型"}],organizer:[{required:!0,message:"请选择活动类型"}],start_date:[{required:!0,message:"请选择活动时间"},{validator:()=>{const{start_date:M,end_date:P}=m.value,N=M.split(" "),X=P.split(" ");if(!M||!P)return{type:"danger",message:"请选择活动日期"};const b=N[1].split(":").map(Number),C=X[1].split(":").map(Number);if(b[0]<8||b[0]>21||C[0]<8||C[0]>21)return{type:"danger",message:"开始和结束时间必须在8:00-22:00点之间"};if(tt.dayjs(M).valueOf()>tt.dayjs(P).valueOf())return{type:"danger",message:"结束日期必须大于起始日期"};m.value.start_date=N[0],m.value.end_date=X[0],m.value.start=N[1],m.value.end=X[1]},triggers:["blur","change"]}],register_end_date:[{validator:()=>{const{register_end_date:M,end_date:P,end:N}=m.value;if(M&&tt.dayjs(`${P} ${N}`).valueOf()<tt.dayjs(M).valueOf())return{type:"danger",message:"报名截止日期必须小于结束日期"}},triggers:["blur","change"]}],address:[{required:!0,message:"请输入活动地点"},{validator:M=>{if(M.length>255)return{type:"danger",message:"活动名称不能超过255个字符"}}}],register_url:[{validator:M=>{const P=M.replaceAll(" ","")||"";if(P.length&&(P.split(";")||[]).some(X=>!oc.test(X)))return{type:"danger",message:"请输入正确的报名网址"}},triggers:["blur","change"]}],content_url:[{validator:M=>{const P=M.replaceAll(" ","")||"";if(P.length&&(P.split(";")||[]).some(X=>!oc.test(X)))return{type:"danger",message:"请输入正确的活动详情网址"}},triggers:["blur","change"]}],synopsis:[{validator:M=>{if(M.length>1e3)return{type:"danger",message:"活动内容不能超过1000个字符"}}}],email_list:[{validator:M=>{const P=M.replaceAll(" ","").replaceAll(",",";")||"";if(P.length){if(P.length>1020)return{type:"danger",message:o("meeting.emailTooLong")};const N=P.split(";")||[];if(N.some(X=>!xh.test(X)))return{type:"danger",message:o("meeting.emailInvalid")};if(N.some(X=>X.length>50))return{type:"danger",message:o("meeting.singleEmailTooLong")};if(N.length>20)return{type:"danger",message:o("meeting.emailCountTooLong")}}},triggers:["blur","change"]}],approver:[{required:!0,message:"请选择活动审批人"}]}),O=i.computed(()=>c.admins||[]),_=i.ref(""),S=i.ref([]);ia.forEach(M=>{S.value.push(M)});const R=M=>{const P=S.value.find(N=>N.label===M);m.value.activity_type=P==null?void 0:P.value},L=M=>M.getTime()<Date.now()-1440*60*1e3;i.watch(()=>c.data,M=>{var P;if(M){const{title:N,start_date:X,end_date:b,register_end_date:C,activity_type:$,register_url:U,content_url:E,address:w,start:F,end:G,is_publish:Z,approver:q,update_activity_id:H,synopsis:Q,email_list:J,organizer:re}=M;let de={title:N,start_date:X,end_date:b,register_end_date:C,activity_type:$,register_url:U,content_url:E,address:w,start:F,end:G,is_publish:Z,approver:q,update_activity_id:H,synopsis:Q,email_list:J,organizer:re};m.value={...de},_.value=(P=ia.get(M.activity_type))==null?void 0:P.label,m.value.start_date=`${m.value.start_date} ${m.value.start}`,m.value.end_date=`${m.value.end_date} ${m.value.end}`}},{immediate:!0,deep:!0});const I=async M=>{var N,X,b,C,$,U,E;let P=h.value?"修改":M?"创建":"保存草稿";try{if((await((N=g.value)==null?void 0:N.validate())).some(G=>!!G))return;k.value=!0,m.value.is_publish=`${M}`,h.value&&((X=c.data)==null?void 0:X.status)===3?(m.value.update_activity_id=(b=c.data)==null?void 0:b.id,await((C=c.creatActivity)==null?void 0:C.call(c,m.value))):h.value?await((U=c.editActivity)==null?void 0:U.call(c,($=c.data)==null?void 0:$.id,m.value)):await((E=c.creatActivity)==null?void 0:E.call(c,m.value));const F=`“${m.value.title}”活动${P}成功`;s.success({content:F}),j(),n("confirm")}catch{k.value=!1,m.value.start_date=`${m.value.start_date} ${m.value.start}`,m.value.end_date=`${m.value.end_date} ${m.value.end}`;const w=`“${m.value.title}”活动${P}失败`;s.danger({content:w})}finally{k.value=!1}},j=()=>{m.value={},n("close")};return e({confirm:I}),(M,P)=>(i.openBlock(),i.createElementBlock("div",W2,[i.createVNode(i.unref(A.OForm),{model:m.value,ref_key:"formRef",ref:g,"has-required":"","label-width":"108px",layout:i.unref(a)?"v":"h",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:T.value.title,label:"活动名称",field:"title"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:"请输入活动名称",modelValue:m.value.title,"onUpdate:modelValue":P[0]||(P[0]=N=>m.value.title=N)},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.organizer,label:"活动主办方",field:"organizer"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:"请选择活动主办方",size:"large",modelValue:m.value.organizer,"onUpdate:modelValue":P[1]||(P[1]=N=>m.value.organizer=N)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.organizers,N=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:N.name,value:N.name},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(N.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.activity_type,label:"活动类型",field:"activity_type"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:"请选择活动类型",size:"large",modelValue:_.value,"onUpdate:modelValue":P[2]||(P[2]=N=>_.value=N),onChange:R},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(S.value,N=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:N.value,value:N.label},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(N.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["rules"]),m.value.activity_type===1||m.value.activity_type===3?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,rules:T.value.address,label:"活动地点",field:"address"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:"请输入活动地点",modelValue:m.value.address,"onUpdate:modelValue":P[3]||(P[3]=N=>m.value.address=N)},null,8,["modelValue"])]),_:1},8,["rules"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{rules:T.value.start_date,label:"活动时间",field:"start_date",required:""},{default:i.withCtx(()=>[i.createElementVNode("div",Y2,[i.createVNode(i.unref(A.OFormItem),{label:"起始日期",field:"start_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.start_date,"onUpdate:modelValue":P[4]||(P[4]=N=>m.value.start_date=N),type:"datetime",placeholder:"请选择日期",format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":L,clearable:!1,class:"date-activity"},null,8,["modelValue"])]),_:1}),i.createVNode(i.unref(A.OFormItem),{label:"结束日期",field:"end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.end_date,"onUpdate:modelValue":P[5]||(P[5]=N=>m.value.end_date=N),type:"datetime",placeholder:"请选择日期",format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":L,clearable:!1,class:"date-activity"},null,8,["modelValue"])]),_:1})])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.register_end_date,label:"报名截止时间",field:"register_end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.register_end_date,"onUpdate:modelValue":P[6]||(P[6]=N=>m.value.register_end_date=N),type:"datetime",placeholder:"请选择报名截止时间",format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm",clearable:!1,class:"date-activity"},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.register_url,label:"报名网址",field:"register_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:"请输入活动报名网址",modelValue:m.value.register_url,"onUpdate:modelValue":P[7]||(P[7]=N=>m.value.register_url=N)},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.content_url,label:"活动详情网址",field:"content_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:"请输入活动详情介绍网址",modelValue:m.value.content_url,"onUpdate:modelValue":P[8]||(P[8]=N=>m.value.content_url=N)},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.synopsis,label:"活动内容",field:"synopsis"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:"请输入活动内容",modelValue:m.value.synopsis,"onUpdate:modelValue":P[9]||(P[9]=N=>m.value.synopsis=N)},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{field:"email_list",rules:T.value.email_list,label:"邮件地址"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:h.value,size:"large",placeholder:i.unref(l)("meeting.enterEmail"),rows:4,modelValue:m.value.email_list,"onUpdate:modelValue":P[10]||(P[10]=N=>m.value.email_list=N)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.approver,label:"活动审批人",field:"approver"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:"请选择活动审批人",size:"large",modelValue:m.value.approver,"onUpdate:modelValue":P[11]||(P[11]=N=>m.value.approver=N)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,N=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:N,value:N},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(N),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),i.createElementVNode("div",X2,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:P[12]||(P[12]=N=>I(!0)),loading:k.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(h.value?"保存":"创建"),1)]),_:1},8,["loading"]),h.value?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,color:"primary",variant:"outline",round:"pill",size:"large",onClick:P[13]||(P[13]=N=>I(!1)),loading:k.value},{default:i.withCtx(()=>[...P[14]||(P[14]=[i.createTextVNode(" 保存草稿 ",-1)])]),_:1},8,["loading"])),i.createVNode(i.unref(A.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:j},{default:i.withCtx(()=>[...P[15]||(P[15]=[i.createTextVNode("取消",-1)])]),_:1})])]))}}),K2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Q2(r,e){return i.openBlock(),i.createElementBlock("svg",K2,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M17.286 5c0.676 0 1.213 0.546 1.213 1.21 0 0.227-0.064 0.449-0.184 0.641l-0.065 0.093-1.24 1.62c-0.149 0.194-0.433 0.236-0.634 0.092-0.181-0.129-0.234-0.364-0.134-0.551l0.039-0.060 1.24-1.62c0.046-0.060 0.071-0.136 0.071-0.214 0-0.169-0.113-0.302-0.253-0.329l-0.054-0.005h-10.573c-0.064 0-0.126 0.022-0.179 0.064-0.126 0.099-0.162 0.281-0.092 0.426l0.036 0.059 4.207 5.495c0.138 0.18 0.221 0.394 0.243 0.617l0.006 0.112 0.015 3.985c0 0.088 0.033 0.171 0.087 0.232l0.045 0.042 1.525 1.158c0.052 0.040 0.114 0.060 0.176 0.060 0.146-0.001 0.274-0.116 0.301-0.275l0.005-0.062-0.020-5.134c-0.001-0.228 0.063-0.452 0.184-0.645l0.065-0.094 1.804-2.357c0.149-0.194 0.433-0.236 0.634-0.092 0.181 0.129 0.234 0.364 0.134 0.551l-0.039 0.060-1.805 2.357c-0.035 0.045-0.058 0.099-0.067 0.157l-0.005 0.059 0.020 5.134c0.003 0.663-0.533 1.212-1.209 1.214-0.23 0.001-0.454-0.063-0.647-0.183l-0.094-0.064-1.525-1.158c-0.267-0.203-0.436-0.506-0.471-0.834l-0.007-0.124-0.015-3.985c-0-0.059-0.015-0.115-0.041-0.165l-0.030-0.047-4.207-5.495c-0.401-0.523-0.308-1.272 0.211-1.682 0.183-0.145 0.405-0.234 0.637-0.256l0.117-0.006h10.573z"},null,-1)])])}const uc={name:"components-icon-filter",render:Q2};/*! @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 Jo(r,e){return Jo=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Jo(r,e)}function Z2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ks(r,e,t){return Z2()?Ks=Reflect.construct:Ks=function(s,a,o){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(s,l),h=new c;return o&&Jo(h,o.prototype),h},Ks.apply(null,arguments)}function Ii(r){return J2(r)||ev(r)||tv(r)||iv()}function J2(r){if(Array.isArray(r))return el(r)}function ev(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function tv(r,e){if(r){if(typeof r=="string")return el(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return el(r,e)}}function el(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function iv(){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 nv=Object.hasOwnProperty,cc=Object.setPrototypeOf,rv=Object.isFrozen,sv=Object.getPrototypeOf,av=Object.getOwnPropertyDescriptor,Jt=Object.freeze,vi=Object.seal,ov=Object.create,Ch=typeof Reflect<"u"&&Reflect,ra=Ch.apply,tl=Ch.construct;ra||(ra=function(e,t,n){return e.apply(t,n)});Jt||(Jt=function(e){return e});vi||(vi=function(e){return e});tl||(tl=function(e,t){return Ks(e,Ii(t))});var lv=_i(Array.prototype.forEach),dc=_i(Array.prototype.pop),qr=_i(Array.prototype.push),Qs=_i(String.prototype.toLowerCase),ho=_i(String.prototype.toString),hc=_i(String.prototype.match),Ni=_i(String.prototype.replace),uv=_i(String.prototype.indexOf),cv=_i(String.prototype.trim),Lt=_i(RegExp.prototype.test),fo=dv(TypeError);function _i(r){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return ra(r,e,n)}}function dv(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return tl(r,t)}}function Ge(r,e,t){var n;t=(n=t)!==null&&n!==void 0?n:Qs,cc&&cc(r,null);for(var s=e.length;s--;){var a=e[s];if(typeof a=="string"){var o=t(a);o!==a&&(rv(e)||(e[s]=o),a=o)}r[a]=!0}return r}function Sn(r){var e=ov(null),t;for(t in r)ra(nv,r,[t])===!0&&(e[t]=r[t]);return e}function Vs(r,e){for(;r!==null;){var t=av(r,e);if(t){if(t.get)return _i(t.get);if(typeof t.value=="function")return _i(t.value)}r=sv(r)}function n(s){return console.warn("fallback value for",s),null}return n}var fc=Jt(["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"]),po=Jt(["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"]),mo=Jt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hv=Jt(["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"]),go=Jt(["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"]),fv=Jt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pc=Jt(["#text"]),mc=Jt(["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"]),vo=Jt(["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"]),gc=Jt(["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"]),Fs=Jt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pv=vi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),mv=vi(/<%[\w\W]*|[\w\W]*%>/gm),gv=vi(/\${[\w\W]*}/gm),vv=vi(/^data-[\-\w.\u00B7-\uFFFF]+$/),_v=vi(/^aria-[\-\w]+$/),yv=vi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tv=vi(/^(?:\w+script|data):/i),bv=vi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xv=vi(/^html$/i),Cv=vi(/^[a-z][.\w]*(-[.\w]+)+$/i),Ev=function(){return typeof window>"u"?null:window},Sv=function(e,t){if(mn(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,s="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(s)&&(n=t.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 Eh(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ev(),e=function(ee){return Eh(ee)};if(e.version="2.5.9",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,n=r.document,s=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,l=r.Element,c=r.NodeFilter,h=r.NamedNodeMap,m=h===void 0?r.NamedNodeMap||r.MozNamedAttrMap:h,g=r.HTMLFormElement,k=r.DOMParser,T=r.trustedTypes,O=l.prototype,_=Vs(O,"cloneNode"),S=Vs(O,"nextSibling"),R=Vs(O,"childNodes"),L=Vs(O,"parentNode");if(typeof a=="function"){var I=n.createElement("template");I.content&&I.content.ownerDocument&&(n=I.content.ownerDocument)}var j=Sv(T,t),M=j?j.createHTML(""):"",P=n,N=P.implementation,X=P.createNodeIterator,b=P.createDocumentFragment,C=P.getElementsByTagName,$=t.importNode,U={};try{U=Sn(n).documentMode?n.documentMode:{}}catch{}var E={};e.isSupported=typeof L=="function"&&N&&N.createHTMLDocument!==void 0&&U!==9;var w=pv,F=mv,G=gv,Z=vv,q=_v,H=Tv,Q=bv,J=Cv,re=yv,de=null,Ce=Ge({},[].concat(Ii(fc),Ii(po),Ii(mo),Ii(go),Ii(pc))),le=null,$e=Ge({},[].concat(Ii(mc),Ii(vo),Ii(gc),Ii(Fs))),Ie=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}})),Oe=null,Ye=null,Fe=!0,Ze=!0,Je=!1,me=!0,_e=!1,be=!0,Be=!1,it=!1,he=!1,ce=!1,ue=!1,De=!1,Ee=!0,et=!1,fe="user-content-",ye=!0,ge=!1,qe={},Ne=null,ft=Ge({},["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"]),Dt=null,pi=Ge({},["audio","video","img","source","image","track"]),Xe=null,xi=Ge({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ht="http://www.w3.org/1998/Math/MathML",Ci="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml",ei=yt,li=!1,jt=null,Xi=Ge({},[Ht,Ci,yt],ho),Rt,Ei=["application/xhtml+xml","text/html"],x="text/html",D,K=null,ne=n.createElement("form"),xe=function(ee){return ee instanceof RegExp||ee instanceof Function},Me=function(ee){K&&K===ee||((!ee||mn(ee)!=="object")&&(ee={}),ee=Sn(ee),Rt=Ei.indexOf(ee.PARSER_MEDIA_TYPE)===-1?Rt=x:Rt=ee.PARSER_MEDIA_TYPE,D=Rt==="application/xhtml+xml"?ho:Qs,de="ALLOWED_TAGS"in ee?Ge({},ee.ALLOWED_TAGS,D):Ce,le="ALLOWED_ATTR"in ee?Ge({},ee.ALLOWED_ATTR,D):$e,jt="ALLOWED_NAMESPACES"in ee?Ge({},ee.ALLOWED_NAMESPACES,ho):Xi,Xe="ADD_URI_SAFE_ATTR"in ee?Ge(Sn(xi),ee.ADD_URI_SAFE_ATTR,D):xi,Dt="ADD_DATA_URI_TAGS"in ee?Ge(Sn(pi),ee.ADD_DATA_URI_TAGS,D):pi,Ne="FORBID_CONTENTS"in ee?Ge({},ee.FORBID_CONTENTS,D):ft,Oe="FORBID_TAGS"in ee?Ge({},ee.FORBID_TAGS,D):{},Ye="FORBID_ATTR"in ee?Ge({},ee.FORBID_ATTR,D):{},qe="USE_PROFILES"in ee?ee.USE_PROFILES:!1,Fe=ee.ALLOW_ARIA_ATTR!==!1,Ze=ee.ALLOW_DATA_ATTR!==!1,Je=ee.ALLOW_UNKNOWN_PROTOCOLS||!1,me=ee.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_e=ee.SAFE_FOR_TEMPLATES||!1,be=ee.SAFE_FOR_XML!==!1,Be=ee.WHOLE_DOCUMENT||!1,ce=ee.RETURN_DOM||!1,ue=ee.RETURN_DOM_FRAGMENT||!1,De=ee.RETURN_TRUSTED_TYPE||!1,he=ee.FORCE_BODY||!1,Ee=ee.SANITIZE_DOM!==!1,et=ee.SANITIZE_NAMED_PROPS||!1,ye=ee.KEEP_CONTENT!==!1,ge=ee.IN_PLACE||!1,re=ee.ALLOWED_URI_REGEXP||re,ei=ee.NAMESPACE||yt,Ie=ee.CUSTOM_ELEMENT_HANDLING||{},ee.CUSTOM_ELEMENT_HANDLING&&xe(ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ie.tagNameCheck=ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ee.CUSTOM_ELEMENT_HANDLING&&xe(ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ie.attributeNameCheck=ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ee.CUSTOM_ELEMENT_HANDLING&&typeof ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ie.allowCustomizedBuiltInElements=ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_e&&(Ze=!1),ue&&(ce=!0),qe&&(de=Ge({},Ii(pc)),le=[],qe.html===!0&&(Ge(de,fc),Ge(le,mc)),qe.svg===!0&&(Ge(de,po),Ge(le,vo),Ge(le,Fs)),qe.svgFilters===!0&&(Ge(de,mo),Ge(le,vo),Ge(le,Fs)),qe.mathMl===!0&&(Ge(de,go),Ge(le,gc),Ge(le,Fs))),ee.ADD_TAGS&&(de===Ce&&(de=Sn(de)),Ge(de,ee.ADD_TAGS,D)),ee.ADD_ATTR&&(le===$e&&(le=Sn(le)),Ge(le,ee.ADD_ATTR,D)),ee.ADD_URI_SAFE_ATTR&&Ge(Xe,ee.ADD_URI_SAFE_ATTR,D),ee.FORBID_CONTENTS&&(Ne===ft&&(Ne=Sn(Ne)),Ge(Ne,ee.FORBID_CONTENTS,D)),ye&&(de["#text"]=!0),Be&&Ge(de,["html","head","body"]),de.table&&(Ge(de,["tbody"]),delete Oe.tbody),Jt&&Jt(ee),K=ee)},nt=Ge({},["mi","mo","mn","ms","mtext"]),St=Ge({},["annotation-xml"]),zt=Ge({},["title","style","font","a","script"]),Vt=Ge({},po);Ge(Vt,mo),Ge(Vt,hv);var Bt=Ge({},go);Ge(Bt,fv);var ti=function(ee){var pe=L(ee);(!pe||!pe.tagName)&&(pe={namespaceURI:ei,tagName:"template"});var we=Qs(ee.tagName),Qe=Qs(pe.tagName);return jt[ee.namespaceURI]?ee.namespaceURI===Ci?pe.namespaceURI===yt?we==="svg":pe.namespaceURI===Ht?we==="svg"&&(Qe==="annotation-xml"||nt[Qe]):!!Vt[we]:ee.namespaceURI===Ht?pe.namespaceURI===yt?we==="math":pe.namespaceURI===Ci?we==="math"&&St[Qe]:!!Bt[we]:ee.namespaceURI===yt?pe.namespaceURI===Ci&&!St[Qe]||pe.namespaceURI===Ht&&!nt[Qe]?!1:!Bt[we]&&(zt[we]||!Vt[we]):!!(Rt==="application/xhtml+xml"&&jt[ee.namespaceURI]):!1},Ke=function(ee){qr(e.removed,{element:ee});try{ee.parentNode.removeChild(ee)}catch{try{ee.outerHTML=M}catch{ee.remove()}}},ii=function(ee,pe){try{qr(e.removed,{attribute:pe.getAttributeNode(ee),from:pe})}catch{qr(e.removed,{attribute:null,from:pe})}if(pe.removeAttribute(ee),ee==="is"&&!le[ee])if(ce||ue)try{Ke(pe)}catch{}else try{pe.setAttribute(ee,"")}catch{}},Gt=function(ee){var pe,we;if(he)ee="<remove></remove>"+ee;else{var Qe=hc(ee,/^[\r\n\t ]+/);we=Qe&&Qe[0]}Rt==="application/xhtml+xml"&&ei===yt&&(ee='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ee+"</body></html>");var Ft=j?j.createHTML(ee):ee;if(ei===yt)try{pe=new k().parseFromString(Ft,Rt)}catch{}if(!pe||!pe.documentElement){pe=N.createDocument(ei,"template",null);try{pe.documentElement.innerHTML=li?M:Ft}catch{}}var wt=pe.body||pe.documentElement;return ee&&we&&wt.insertBefore(n.createTextNode(we),wt.childNodes[0]||null),ei===yt?C.call(pe,Be?"html":"body")[0]:Be?pe.documentElement:wt},Wt=function(ee){return X.call(ee.ownerDocument||ee,ee,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},kt=function(ee){return ee instanceof g&&(typeof ee.nodeName!="string"||typeof ee.textContent!="string"||typeof ee.removeChild!="function"||!(ee.attributes instanceof m)||typeof ee.removeAttribute!="function"||typeof ee.setAttribute!="function"||typeof ee.namespaceURI!="string"||typeof ee.insertBefore!="function"||typeof ee.hasChildNodes!="function")},lt=function(ee){return mn(o)==="object"?ee instanceof o:ee&&mn(ee)==="object"&&typeof ee.nodeType=="number"&&typeof ee.nodeName=="string"},ze=function(ee,pe,we){E[ee]&&lv(E[ee],function(Qe){Qe.call(e,pe,we,K)})},Si=function(ee){var pe;if(ze("beforeSanitizeElements",ee,null),kt(ee)||Lt(/[\u0080-\uFFFF]/,ee.nodeName))return Ke(ee),!0;var we=D(ee.nodeName);if(ze("uponSanitizeElement",ee,{tagName:we,allowedTags:de}),ee.hasChildNodes()&&!lt(ee.firstElementChild)&&(!lt(ee.content)||!lt(ee.content.firstElementChild))&&Lt(/<[/\w]/g,ee.innerHTML)&&Lt(/<[/\w]/g,ee.textContent)||we==="select"&&Lt(/<template/i,ee.innerHTML)||ee.nodeType===7||be&&ee.nodeType===8&&Lt(/<[/\w]/g,ee.data))return Ke(ee),!0;if(!de[we]||Oe[we]){if(!Oe[we]&&xn(we)&&(Ie.tagNameCheck instanceof RegExp&&Lt(Ie.tagNameCheck,we)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(we)))return!1;if(ye&&!Ne[we]){var Qe=L(ee)||ee.parentNode,Ft=R(ee)||ee.childNodes;if(Ft&&Qe)for(var wt=Ft.length,Tt=wt-1;Tt>=0;--Tt){var ki=_(Ft[Tt],!0);ki.__removalCount=(ee.__removalCount||0)+1,Qe.insertBefore(ki,S(ee))}}return Ke(ee),!0}return ee instanceof l&&!ti(ee)||(we==="noscript"||we==="noembed"||we==="noframes")&&Lt(/<\/no(script|embed|frames)/i,ee.innerHTML)?(Ke(ee),!0):(_e&&ee.nodeType===3&&(pe=ee.textContent,pe=Ni(pe,w," "),pe=Ni(pe,F," "),pe=Ni(pe,G," "),ee.textContent!==pe&&(qr(e.removed,{element:ee.cloneNode()}),ee.textContent=pe)),ze("afterSanitizeElements",ee,null),!1)},Pi=function(ee,pe,we){if(Ee&&(pe==="id"||pe==="name")&&(we in n||we in ne))return!1;if(!(Ze&&!Ye[pe]&&Lt(Z,pe))){if(!(Fe&&Lt(q,pe))){if(!le[pe]||Ye[pe]){if(!(xn(ee)&&(Ie.tagNameCheck instanceof RegExp&&Lt(Ie.tagNameCheck,ee)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(ee))&&(Ie.attributeNameCheck instanceof RegExp&&Lt(Ie.attributeNameCheck,pe)||Ie.attributeNameCheck instanceof Function&&Ie.attributeNameCheck(pe))||pe==="is"&&Ie.allowCustomizedBuiltInElements&&(Ie.tagNameCheck instanceof RegExp&&Lt(Ie.tagNameCheck,we)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(we))))return!1}else if(!Xe[pe]){if(!Lt(re,Ni(we,Q,""))){if(!((pe==="src"||pe==="xlink:href"||pe==="href")&&ee!=="script"&&uv(we,"data:")===0&&Dt[ee])){if(!(Je&&!Lt(H,Ni(we,Q,"")))){if(we)return!1}}}}}}return!0},xn=function(ee){return ee!=="annotation-xml"&&hc(ee,J)},gs=function(ee){var pe,we,Qe,Ft;ze("beforeSanitizeAttributes",ee,null);var wt=ee.attributes;if(!(!wt||kt(ee))){var Tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:le};for(Ft=wt.length;Ft--;){pe=wt[Ft];var ki=pe,gt=ki.name,Er=ki.namespaceURI;if(we=gt==="value"?pe.value:cv(pe.value),Qe=D(gt),Tt.attrName=Qe,Tt.attrValue=we,Tt.keepAttr=!0,Tt.forceKeepAttr=void 0,ze("uponSanitizeAttribute",ee,Tt),we=Tt.attrValue,!Tt.forceKeepAttr&&(ii(gt,ee),!!Tt.keepAttr)){if(!me&&Lt(/\/>/i,we)){ii(gt,ee);continue}_e&&(we=Ni(we,w," "),we=Ni(we,F," "),we=Ni(we,G," "));var vs=D(ee.nodeName);if(Pi(vs,Qe,we)){if(et&&(Qe==="id"||Qe==="name")&&(ii(gt,ee),we=fe+we),be&&Lt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,we)){ii(gt,ee);continue}if(j&&mn(T)==="object"&&typeof T.getAttributeType=="function"&&!Er)switch(T.getAttributeType(vs,Qe)){case"TrustedHTML":{we=j.createHTML(we);break}case"TrustedScriptURL":{we=j.createScriptURL(we);break}}try{Er?ee.setAttributeNS(Er,gt,we):ee.setAttribute(gt,we),kt(ee)?Ke(ee):dc(e.removed)}catch{}}}}ze("afterSanitizeAttributes",ee,null)}},Ki=function Se(ee){var pe,we=Wt(ee);for(ze("beforeSanitizeShadowDOM",ee,null);pe=we.nextNode();)ze("uponSanitizeShadowNode",pe,null),Si(pe),gs(pe),pe.content instanceof s&&Se(pe.content);ze("afterSanitizeShadowDOM",ee,null)};return e.sanitize=function(Se){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe,we,Qe,Ft,wt;if(li=!Se,li&&(Se="<!-->"),typeof Se!="string"&&!lt(Se))if(typeof Se.toString=="function"){if(Se=Se.toString(),typeof Se!="string")throw fo("dirty is not a string, aborting")}else throw fo("toString is not a function");if(!e.isSupported){if(mn(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof Se=="string")return r.toStaticHTML(Se);if(lt(Se))return r.toStaticHTML(Se.outerHTML)}return Se}if(it||Me(ee),e.removed=[],typeof Se=="string"&&(ge=!1),ge){if(Se.nodeName){var Tt=D(Se.nodeName);if(!de[Tt]||Oe[Tt])throw fo("root node is forbidden and cannot be sanitized in-place")}}else if(Se instanceof o)pe=Gt("<!---->"),we=pe.ownerDocument.importNode(Se,!0),we.nodeType===1&&we.nodeName==="BODY"||we.nodeName==="HTML"?pe=we:pe.appendChild(we);else{if(!ce&&!_e&&!Be&&Se.indexOf("<")===-1)return j&&De?j.createHTML(Se):Se;if(pe=Gt(Se),!pe)return ce?null:De?M:""}pe&&he&&Ke(pe.firstChild);for(var ki=Wt(ge?Se:pe);Qe=ki.nextNode();)Qe.nodeType===3&&Qe===Ft||(Si(Qe),gs(Qe),Qe.content instanceof s&&Ki(Qe.content),Ft=Qe);if(Ft=null,ge)return Se;if(ce){if(ue)for(wt=b.call(pe.ownerDocument);pe.firstChild;)wt.appendChild(pe.firstChild);else wt=pe;return(le.shadowroot||le.shadowrootmod)&&(wt=$.call(t,wt,!0)),wt}var gt=Be?pe.outerHTML:pe.innerHTML;return Be&&de["!doctype"]&&pe.ownerDocument&&pe.ownerDocument.doctype&&pe.ownerDocument.doctype.name&&Lt(xv,pe.ownerDocument.doctype.name)&&(gt="<!DOCTYPE "+pe.ownerDocument.doctype.name+`>
3
- `+gt),_e&&(gt=Ni(gt,w," "),gt=Ni(gt,F," "),gt=Ni(gt,G," ")),j&&De?j.createHTML(gt):gt},e.setConfig=function(Se){Me(Se),it=!0},e.clearConfig=function(){K=null,it=!1},e.isValidAttribute=function(Se,ee,pe){K||Me({});var we=D(Se),Qe=D(ee);return Pi(we,Qe,pe)},e.addHook=function(Se,ee){typeof ee=="function"&&(E[Se]=E[Se]||[],qr(E[Se],ee))},e.removeHook=function(Se){if(E[Se])return dc(E[Se])},e.removeHooks=function(Se){E[Se]&&(E[Se]=[])},e.removeAllHooks=function(){E={}},e}var kv=Eh();function wv(r,e){const t=r.hooks??{};let n;for(n in t){const s=t[n];s!==void 0&&e.addHook(n,s)}}function Dv(){return kv()}function ka(r={},e=Dv){const t=e();wv(r,t);const n=function(s,a){const o=a.value;if(a.oldValue===o)return;const l=`${o}`,c=a.arg,h=r.namedConfigurations,m=r.default??{};if(h&&c!==void 0){s.innerHTML=t.sanitize(l,h[c]??m);return}s.innerHTML=t.sanitize(l,m)};return{mounted:n,updated:n}}const Av={class:"th-filter-wrapper",ref:"filterRef"},Nv={key:1,class:"list-content-wrapper"},Iv={class:"btn-wrapper"},vc=i.defineComponent({__name:"ThFilter",props:{modelValue:{},list:{default:()=>[]},multiple:{type:Boolean,default:!1},tableWidth:{}},emits:["update:model-value","confirm"],setup(r,{emit:e}){const t=ka(),{t:n}=He.useI18n(),s=r,a=e,o=i.computed(()=>s.list.some(j=>{var M;return(M=j.children)==null?void 0:M.length})),l=i.computed(()=>s.list.map(j=>{const M=(j.children||[]).map(P=>({label:P.label,value:P.value}));return{label:j.label,value:j.value,children:o.value?M:void 0}})),c=i.ref(!1);i.watch(()=>s.modelValue,j=>{s.multiple?h.value=j:k.value=j});const h=i.ref([]),m=j=>{h.value=j},g=i.ref([]),k=i.ref(null),T=j=>{k.value===j?k.value=null:k.value=j,_()},O=()=>{h.value=[],g.value=[],k.value=null,_()},_=()=>{let j=null;s.multiple?o.value?j=g.value:j=h.value:j=k.value,a("update:model-value",j),c.value=!0,i.nextTick(()=>{a("confirm"),c.value=!1})},S=i.computed(()=>h.value.length||g.value.length||k.value||s.modelValue),R=i.ref(null),L=async j=>{var N,X;const M=j.target.parentElement.parentElement;await i.nextTick();const P=M.querySelector("input");P.click(),await i.nextTick(),(N=P.change)==null||N.call(P,P),await i.nextTick(),(X=R.value)==null||X.$forceUpdate(),g.value=JSON.parse(JSON.stringify(g.value))},I=({data:j})=>i.h("span",{onclick:L},j.label);return(j,M)=>{const P=i.resolveComponent("ElCascaderPanel");return i.openBlock(),i.createElementBlock("div",Av,[i.createElementVNode("span",null,[i.renderSlot(j.$slots,"default")]),r.multiple?(i.openBlock(),i.createBlock(i.unref(A.OPopover),{key:0,visible:c.value,position:"bottom",wrapClass:"th-filter-popover",trigger:"click",anchor:!1},{target:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["filter-wrapper",S.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(uc))]),_:1})],2)]),default:i.withCtx(()=>[o.value?(i.openBlock(),i.createElementBlock("div",Nv,[i.createVNode(P,{ref_key:"aref",ref:R,expandTrigger:"hover",renderLabel:I,modelValue:g.value,"onUpdate:modelValue":M[1]||(M[1]=N=>g.value=N),style:{width:"fit-content"},options:l.value,props:{multiple:!0,expandTrigger:"hover"}},null,8,["modelValue","options"])])):(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,class:"content-wrapper","show-type":"hover","disabled-x":""},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OCheckboxGroup),{direction:"v",onChange:m,modelValue:h.value,"onUpdate:modelValue":M[0]||(M[0]=N=>h.value=N)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,N=>(i.openBlock(),i.createBlock(i.unref(A.OCheckbox),{key:N.value,value:N.value},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("span",null,null,512),[[i.unref(t),N.label]])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})),i.createVNode(i.unref(A.ODivider)),i.createElementVNode("div",Iv,[i.createVNode(i.unref(A.OLink),{onClick:O},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.reset")),1)]),_:1}),i.createVNode(i.unref(A.OLink),{onClick:_},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.confirm")),1)]),_:1})])]),_:1},8,["visible"])):(i.openBlock(),i.createBlock(i.unref(A.ODropdown),{key:1,optionPosition:"bottom",optionWrapClass:"th-filter-dropdown",modelValue:k.value,"onUpdate:modelValue":M[3]||(M[3]=N=>k.value=N)},{dropdown:i.withCtx(()=>[l.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,"disabled-x":"",style:{"max-height":"300px"},"show-type":"always"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ODropdownItem),{style:i.normalizeStyle({"--table-width":r.tableWidth}),class:i.normalizeClass([{"is-active":r.modelValue===""}]),value:"''",label:i.unref(n)("common.all"),onClick:M[2]||(M[2]=N=>T(""))},null,8,["style","class","label"]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,N=>(i.openBlock(),i.createBlock(i.unref(A.ODropdownItem),{style:i.normalizeStyle({"--table-width":r.tableWidth}),class:i.normalizeClass([{"is-active":N.value===r.modelValue}]),key:N.value,value:N.value,onClick:X=>T(N.value)},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("span",null,null,512),[[i.unref(t),N.label]])]),_:2},1032,["style","class","value","onClick"]))),128))]),_:1})):i.createCommentVNode("",!0),l.value.length?i.createCommentVNode("",!0):i.renderSlot(j.$slots,"empty",{key:1})]),default:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["filter-wrapper",S.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(uc))]),_:1})],2)]),_:3},8,["modelValue"]))],512)}}}),Ov={class:"more-text-wrapper"},Bv={key:0},Lv={key:1},Mv=i.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}=He.useI18n(),n=i.ref(!1),s=i.ref(!1),a=i.ref(0),o=i.ref(null);i.onMounted(()=>{l()}),i.watch([()=>e.text,()=>e.show],()=>{l()});const l=()=>{i.nextTick(()=>{const h=o.value;if(h){const m=document.createRange();m.setStart(h,0),m.setEnd(h,h.childNodes.length),s.value=m.getBoundingClientRect().height>h.offsetHeight+10||h.scrollHeight>h.offsetHeight+10,a.value=m.getBoundingClientRect().height||h.scrollHeight}else s.value=!1})},c=()=>{e.link&&window.open(e.text)};return(h,m)=>(i.openBlock(),i.createElementBlock("div",Ov,[i.createElementVNode("div",{class:i.normalizeClass(["more-text-content",r.link&&"is-link"]),ref_key:"contentRef",ref:o,style:i.normalizeStyle({"max-height":n.value?a.value+"px":"66px","-webkit-line-clamp":n.value?"initial":r.lines}),onClick:c},i.toDisplayString(r.text),7),s.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"more-text-btn",onClick:m[0]||(m[0]=g=>n.value=!n.value)},[n.value?(i.openBlock(),i.createElementBlock("div",Lv,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("common.collapse")),1),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronUp))]),_:1})])):(i.openBlock(),i.createElementBlock("div",Bv,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("common.expand")),1),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronDown))]),_:1})]))])):i.createCommentVNode("",!0)]))}}),Pv=He._export_sfc(Mv,[["__scopeId","data-v-15764adb"]]);var sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Rv(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}),t}var Zs={exports:{}},Vv=Zs.exports,_c;function Fv(){return _c||(_c=1,(function(r,e){(function(t,n){r.exports=n()})(Vv,(function(){var t=1e3,n=6e4,s=36e5,a="millisecond",o="second",l="minute",c="hour",h="day",m="week",g="month",k="quarter",T="year",O="date",_="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,L={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var F=["th","st","nd","rd"],G=w%100;return"["+w+(F[(G-20)%10]||F[G]||F[0])+"]"}},I=function(w,F,G){var Z=String(w);return!Z||Z.length>=F?w:""+Array(F+1-Z.length).join(G)+w},j={s:I,z:function(w){var F=-w.utcOffset(),G=Math.abs(F),Z=Math.floor(G/60),q=G%60;return(F<=0?"+":"-")+I(Z,2,"0")+":"+I(q,2,"0")},m:function w(F,G){if(F.date()<G.date())return-w(G,F);var Z=12*(G.year()-F.year())+(G.month()-F.month()),q=F.clone().add(Z,g),H=G-q<0,Q=F.clone().add(Z+(H?-1:1),g);return+(-(Z+(G-q)/(H?q-Q:Q-q))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:g,y:T,w:m,d:h,D:O,h:c,m:l,s:o,ms:a,Q:k}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},M="en",P={};P[M]=L;var N="$isDayjsObject",X=function(w){return w instanceof U||!(!w||!w[N])},b=function w(F,G,Z){var q;if(!F)return M;if(typeof F=="string"){var H=F.toLowerCase();P[H]&&(q=H),G&&(P[H]=G,q=H);var Q=F.split("-");if(!q&&Q.length>1)return w(Q[0])}else{var J=F.name;P[J]=F,q=J}return!Z&&q&&(M=q),q||!Z&&M},C=function(w,F){if(X(w))return w.clone();var G=typeof F=="object"?F:{};return G.date=w,G.args=arguments,new U(G)},$=j;$.l=b,$.i=X,$.w=function(w,F){return C(w,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var U=(function(){function w(G){this.$L=b(G.locale,null,!0),this.parse(G),this.$x=this.$x||G.x||{},this[N]=!0}var F=w.prototype;return F.parse=function(G){this.$d=(function(Z){var q=Z.date,H=Z.utc;if(q===null)return new Date(NaN);if($.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var Q=q.match(S);if(Q){var J=Q[2]-1||0,re=(Q[7]||"0").substring(0,3);return H?new Date(Date.UTC(Q[1],J,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,re)):new Date(Q[1],J,Q[3]||1,Q[4]||0,Q[5]||0,Q[6]||0,re)}}return new Date(q)})(G),this.init()},F.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},F.$utils=function(){return $},F.isValid=function(){return this.$d.toString()!==_},F.isSame=function(G,Z){var q=C(G);return this.startOf(Z)<=q&&q<=this.endOf(Z)},F.isAfter=function(G,Z){return C(G)<this.startOf(Z)},F.isBefore=function(G,Z){return this.endOf(Z)<C(G)},F.$g=function(G,Z,q){return $.u(G)?this[Z]:this.set(q,G)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(G,Z){var q=this,H=!!$.u(Z)||Z,Q=$.p(G),J=function(Ye,Fe){var Ze=$.w(q.$u?Date.UTC(q.$y,Fe,Ye):new Date(q.$y,Fe,Ye),q);return H?Ze:Ze.endOf(h)},re=function(Ye,Fe){return $.w(q.toDate()[Ye].apply(q.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(Fe)),q)},de=this.$W,Ce=this.$M,le=this.$D,$e="set"+(this.$u?"UTC":"");switch(Q){case T:return H?J(1,0):J(31,11);case g:return H?J(1,Ce):J(0,Ce+1);case m:var Ie=this.$locale().weekStart||0,Oe=(de<Ie?de+7:de)-Ie;return J(H?le-Oe:le+(6-Oe),Ce);case h:case O:return re($e+"Hours",0);case c:return re($e+"Minutes",1);case l:return re($e+"Seconds",2);case o:return re($e+"Milliseconds",3);default:return this.clone()}},F.endOf=function(G){return this.startOf(G,!1)},F.$set=function(G,Z){var q,H=$.p(G),Q="set"+(this.$u?"UTC":""),J=(q={},q[h]=Q+"Date",q[O]=Q+"Date",q[g]=Q+"Month",q[T]=Q+"FullYear",q[c]=Q+"Hours",q[l]=Q+"Minutes",q[o]=Q+"Seconds",q[a]=Q+"Milliseconds",q)[H],re=H===h?this.$D+(Z-this.$W):Z;if(H===g||H===T){var de=this.clone().set(O,1);de.$d[J](re),de.init(),this.$d=de.set(O,Math.min(this.$D,de.daysInMonth())).$d}else J&&this.$d[J](re);return this.init(),this},F.set=function(G,Z){return this.clone().$set(G,Z)},F.get=function(G){return this[$.p(G)]()},F.add=function(G,Z){var q,H=this;G=Number(G);var Q=$.p(Z),J=function(Ce){var le=C(H);return $.w(le.date(le.date()+Math.round(Ce*G)),H)};if(Q===g)return this.set(g,this.$M+G);if(Q===T)return this.set(T,this.$y+G);if(Q===h)return J(1);if(Q===m)return J(7);var re=(q={},q[l]=n,q[c]=s,q[o]=t,q)[Q]||1,de=this.$d.getTime()+G*re;return $.w(de,this)},F.subtract=function(G,Z){return this.add(-1*G,Z)},F.format=function(G){var Z=this,q=this.$locale();if(!this.isValid())return q.invalidDate||_;var H=G||"YYYY-MM-DDTHH:mm:ssZ",Q=$.z(this),J=this.$H,re=this.$m,de=this.$M,Ce=q.weekdays,le=q.months,$e=q.meridiem,Ie=function(Fe,Ze,Je,me){return Fe&&(Fe[Ze]||Fe(Z,H))||Je[Ze].slice(0,me)},Oe=function(Fe){return $.s(J%12||12,Fe,"0")},Ye=$e||function(Fe,Ze,Je){var me=Fe<12?"AM":"PM";return Je?me.toLowerCase():me};return H.replace(R,(function(Fe,Ze){return Ze||(function(Je){switch(Je){case"YY":return String(Z.$y).slice(-2);case"YYYY":return $.s(Z.$y,4,"0");case"M":return de+1;case"MM":return $.s(de+1,2,"0");case"MMM":return Ie(q.monthsShort,de,le,3);case"MMMM":return Ie(le,de);case"D":return Z.$D;case"DD":return $.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return Ie(q.weekdaysMin,Z.$W,Ce,2);case"ddd":return Ie(q.weekdaysShort,Z.$W,Ce,3);case"dddd":return Ce[Z.$W];case"H":return String(J);case"HH":return $.s(J,2,"0");case"h":return Oe(1);case"hh":return Oe(2);case"a":return Ye(J,re,!0);case"A":return Ye(J,re,!1);case"m":return String(re);case"mm":return $.s(re,2,"0");case"s":return String(Z.$s);case"ss":return $.s(Z.$s,2,"0");case"SSS":return $.s(Z.$ms,3,"0");case"Z":return Q}return null})(Fe)||Q.replace(":","")}))},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(G,Z,q){var H,Q=this,J=$.p(Z),re=C(G),de=(re.utcOffset()-this.utcOffset())*n,Ce=this-re,le=function(){return $.m(Q,re)};switch(J){case T:H=le()/12;break;case g:H=le();break;case k:H=le()/3;break;case m:H=(Ce-de)/6048e5;break;case h:H=(Ce-de)/864e5;break;case c:H=Ce/s;break;case l:H=Ce/n;break;case o:H=Ce/t;break;default:H=Ce}return q?H:$.a(H)},F.daysInMonth=function(){return this.endOf(g).$D},F.$locale=function(){return P[this.$L]},F.locale=function(G,Z){if(!G)return this.$L;var q=this.clone(),H=b(G,Z,!0);return H&&(q.$L=H),q},F.clone=function(){return $.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},w})(),E=U.prototype;return C.prototype=E,[["$ms",a],["$s",o],["$m",l],["$H",c],["$W",h],["$M",g],["$y",T],["$D",O]].forEach((function(w){E[w[1]]=function(F){return this.$g(F,w[0],w[1])}})),C.extend=function(w,F){return w.$i||(w(F,U,C),w.$i=!0),C},C.locale=b,C.isDayjs=X,C.unix=function(w){return C(1e3*w)},C.en=P[M],C.Ls=P,C.p={},C}))})(Zs)),Zs.exports}var $v=Fv();const Te=gr($v),{t:yc}=He.useI18n(),vt=(r=new Date,e="YYYY-MM-DD")=>{let t=r;return t||(t=new Date),Te(new Date(t)).isValid()?Te(new Date(t)).format(e):t},Sh=(r,e,t="label",n="value")=>{const s=e.find(a=>a[n]===r);return(s==null?void 0:s[t])||r},Qn=(r,e)=>r===_n?e.sort((t,n)=>{const s=Xs.findIndex(o=>o.value===t),a=Xs.findIndex(o=>o.value===n);return s-a}).map(t=>Sh(t,Xs)).join(yc("meeting.cycleSplit")):r===rn?e.join(yc("meeting.cycleSplit")):"",Uv=r=>{const e=/\d+/g,t=r.match(e)||"";return parseInt(t[0])},On=r=>{const e=r.split(":");if(e.length>3||!e.length)return 0;let t=0,n=1;for(;e.length>0;){const s=e.pop();t+=parseInt(s)*n,n*=60}return t},_o=r=>r<0?"Invalid number":r>=10?`${r}`:`0${r}`,Tc=r=>{if(r>1440*60)return"Invalid date";const e=Math.floor(r/60/60),t=Math.floor((r-e*60*60)/60),n=r%60;return`${_o(e)}:${_o(t)}:${_o(n)}`},il=r=>{const e=r.split(":"),t=e[e.length-3]?parseInt(e[e.length-3]):0,n=parseInt(e[e.length-2]),s=parseFloat(e[e.length-1]);return t*60*60+n*60+s},qv=r=>{const e=Math.floor(r/3600),t=Math.floor((r-e*3600)/60),n=Math.floor(r-e*3600-t*60);return`${e?`${e.toString().padStart(2,"0")}:`:""}${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`},ri=(r,e)=>{let t=r;r===Ve.ACTIVITY&&(t=Ve.EVENTS);const n=na.find(s=>s.value===t);return(n==null?void 0:n[e])||""},kh=r=>{switch(r){case"WELINK":return"WeLink";case"ZOOM":return"Zoom";case"TENCENT":return"腾讯会议";default:return r}},Hv={class:"o-meeting-detail"},jv={class:"label"},zv={key:2},Gv={key:3,class:"value"},Wv={key:0,class:"extra"},Yv={class:"label"},Xv=i.defineComponent({__name:"OMeetingDetail",props:{data:{},from:{},show:{type:Boolean}},setup(r,{expose:e}){const t=r,{t:n,locale:s}=He.useI18n();i.computed(()=>s.value===He.Locales.ZH);const a=i.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,t.from==="my"?7:8)),o=i.computed(()=>[{label:"起始日期",key:"start_date_time"},{label:"结束日期",key:"end_date_time"},{label:"报名截止时间",key:"register_end_date"},{label:"活动地点",key:"address"},{label:"活动详情地址",key:"content_url",isLink:!0},{label:"活动审批人",key:"approver"},{label:"审核备注",key:"approve_record",isRecord:!0}].slice(0,t.from==="home"?4:7)),l=i.computed(()=>[{label:"活动类型",key:"activity_type",isType:!0},{label:"活动地点",key:"address"},{label:"起始日期",key:"start_date_time"},{label:"结束日期",key:"end_date_time"},{label:"报名截止时间",key:"register_end_date"},{label:"报名网址",key:"register_url",isLink:!0},{label:"活动详情地址",key:"content_url",isLink:!0},{label:"活动审批人",key:"approver"},{label:"审核备注",key:"approve_record",isRecord:!0}]),c=i.computed(()=>t.data.type===Ve.ACTIVITY||t.data.type===Ve.EVENTS?t.page===Ve.APPROVAL?l.value:o.value:a.value),h=i.ref([]);return e({copyInfo:()=>{try{let g=`${n("meeting.meetingTopic")+t.data.topic}
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),A=require("@opensig/opendesign"),Ct=require("@opendesign-plus/composables"),He=require("./chunk-OElCookieNotice.cjs.js"),zi=require("@vueuse/core"),Km=require("@opensig/opendesign/es/locale/lang/zh-cn"),Qm=require("@opensig/opendesign/es/locale/lang/en-us"),tt=require("element-plus"),Zm=i.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(r){const e=Symbol("default"),t=r,n=i.computed(()=>t.verticalPadding?A.isBoolean(t.verticalPadding)?e:A.isString(t.verticalPadding)?t.verticalPadding:t.verticalPadding[0]:0),s=i.computed(()=>t.verticalPadding?A.isBoolean(t.verticalPadding)?e:A.isString(t.verticalPadding)?t.verticalPadding:A.isUndefined(t.verticalPadding[1])?t.verticalPadding[0]:t.verticalPadding[1]:0);return(a,o)=>(i.openBlock(),i.createElementBlock("div",{class:"content-wrapper",style:i.normalizeStyle({"--content-wrapper-vertical-paddingTop":n.value===i.unref(e)?void 0:n.value,"--content-wrapper-vertical-paddingBottom":s.value===i.unref(e)?void 0:s.value})},[i.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),vn=He._export_sfc(Zm,[["__scopeId","data-v-29de9f52"]]),Jm={key:0},eg={class:"banner-content"},tg=["src"],ig={key:1,class:"banner-title"},ng={key:2,class:"banner-subtitle"},rg={key:4,class:"banner-opts"},sg=i.defineComponent({__name:"OBanner",props:{options:{default:void 0},size:{default:"large"},contentJustifyCenter:{type:Boolean,default:!1}},setup(r){const e=r,{isLight:t}=Ct.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:n}=Ct.useScreen(),s=i.computed(()=>e.options),a=i.ref(""),o=c=>{setTimeout(()=>{a.value=s.value[c].bg_theme??"light"},100)},l=(c,h)=>{c&&!h&&window.open(c)};return(c,h)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["home-banner",r.size])},[r.size==="tiny"?(i.openBlock(),i.createElementBlock("div",Jm,i.toDisplayString(s.value[1].title),1)):i.unref(n)?i.unref(n)?(i.openBlock(),i.createBlock(i.unref(A.OCarousel),{key:2,class:"banner-carousel",effect:"gallery","indicator-click":"","data-o-theme":a.value,arrow:"never","auto-play":!0,onBeforeChange:o},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(m,g)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{class:i.normalizeClass(["banner-item",`banner-item${g}`]),key:g},{default:i.withCtx(()=>[i.createVNode(vn,{class:"banner-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:"banner-bg",src:m.bg,onClick:k=>l(m.href)},null,8,["src","onClick"])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"])):i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OCarousel),{key:1,class:"banner-carousel",effect:"toggle","active-class":"current-slide","indicator-click":"","auto-play":!0,"data-o-theme":a.value,onBeforeChange:o},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,(m,g)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{key:g,class:i.normalizeClass(["banner-item",`banner-item${g}`])},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:i.normalizeClass(["banner-bg",{"with-sticky-bg":m.withStickyBg,"in-dark":!i.unref(t),"cursor-pointer":m.href&&!m.btn}]),src:m.bg,style:i.normalizeStyle({"--pad-offset":m.pad_offset}),onClick:k=>l(m.href,m.btn)},{default:i.withCtx(()=>[i.createVNode(vn,{class:i.normalizeClass(["banner-wrapper",["banner-wrapper",r.contentJustifyCenter?"content-center":""]])},{default:i.withCtx(()=>[i.createElementVNode("div",eg,[!i.unref(n)&&m.attach?(i.openBlock(),i.createElementBlock("img",{key:0,src:m.attach,class:"banner-attach"},null,8,tg)):i.createCommentVNode("",!0),m.title?(i.openBlock(),i.createElementBlock("div",ig,i.toDisplayString(m.title),1)):i.createCommentVNode("",!0),m.subtitle?(i.openBlock(),i.createElementBlock("div",ng,i.toDisplayString(m.subtitle),1)):i.createCommentVNode("",!0),m.bg_text?(i.openBlock(),i.createElementBlock("div",{key:3,class:"banner-text",style:i.normalizeStyle({backgroundImage:`url(${m.bg_text})`,"--pc-width":m.pc_text_width,"--pc-height":m.pc_text_height,"--pad-width":m.pad_text_width,"--pad-height":m.pad_text_height})},null,4)):i.createCommentVNode("",!0),m.btn?(i.openBlock(),i.createElementBlock("div",rg,[i.createVNode(i.unref(A.OButton),{href:m.href,target:"_blank",variant:"solid",color:"primary",size:r.size},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(m.btn),1)]),_:2},1032,["href","size"])])):i.createCommentVNode("",!0)])]),_:2},1032,["class"])]),_:2},1032,["src","class","style","onClick"])]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"]))],2))}}),dh=He._export_sfc(sg,[["__scopeId","data-v-2356da15"]]),ag={class:"cookie-notice-content"},og=["type"],lg={class:"cookie-title"},ug={style:{transform:"rotate(180deg)"},xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24"},cg={class:"cookie-zh-title",style:{"margin-top":"0"}},dg=["href"],hg={key:1,class:"cookie-en-title"},fg={key:0,class:"cookie-en-content"},pg={class:"cookie-en-desc"},mg=["href"],gg={class:"cookie-notice-right"},vg={class:"cookie-dlg-title"},_g={class:"cookie-dlg-content"},yg={class:"content-item"},Tg={class:"item-header"},bg={class:"item-title"},xg={class:"item-extra"},Cg={class:"item-detail"},Eg={class:"content-item"},Sg={class:"item-header"},kg={class:"item-title"},wg={class:"item-extra"},Dg={class:"item-detail"},Ag="0",sc="1",Ng="2",Rs="3",Ig="agreed-cookiepolicy-zh",Og="agreed-cookiepolicy-en",Bg=i.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},community:{},detailUrl:{},wrapper:{},cookieDomain:{}},emits:["update:visible"],setup(r,{expose:e,emit:t}){const n=r,s=t,{lePadV:a,leLaptop:o,isPhone:l}=Ct.useScreen(),{locale:c,t:h}=He.useI18n(),m=i.computed(()=>c.value==="zh"),g=i.ref(),k=i.computed(()=>g.value?!!getComputedStyle(g.value).getPropertyValue("--grid-content-width"):!1),T=i.computed(()=>m.value?Ig:Og),I=i.ref(!1),_=zi.useVModel(n,"visible",s,{defaultValue:!1}),S=U=>{const E=document.cookie.split(";").find(w=>w.split("=")[0].trim()===encodeURIComponent(U));return E?decodeURIComponent(E.split("=")[1]):null},R=(U,E,w,F)=>{const z=`; max-age=${w*24*60*60}`;document.cookie=`${encodeURIComponent(U)}=${encodeURIComponent(E)}${z}; path=/; domain=${F}`},L=(U,E)=>{document.cookie=`${encodeURIComponent(U)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${E}`},O=U=>{typeof U=="boolean"?_.value=U:_.value=!_.value,i.nextTick(()=>{!_.value&&m.value&&S(T.value)!==Rs&&R(T.value,Rs,180,n.cookieDomain??location.hostname)})},H=i.ref(!1),M=U=>{typeof U=="boolean"?H.value=U:H.value=!H.value},P=()=>m.value?S(T.value)!==Rs:(S(T.value)??"0")===Ag,N=()=>m.value?S(T.value)===Rs:S(T.value)===sc;i.onMounted(()=>{P()&&O(!0)}),i.watch(c,()=>{O(P())});const X=()=>{I.value=!0,L(T.value,n.cookieDomain??location.hostname),R(T.value,sc,180,n.cookieDomain??location.hostname),O(!1)},b=()=>{I.value=!1,L(T.value,n.cookieDomain??location.hostname),R(T.value,Ng,180,n.cookieDomain??location.hostname),O(!1)},C=i.computed(()=>l.value?[{id:"save",label:h("cookie.saveSetting"),variant:"text",onClick:()=>{I.value?X():b(),M(!1)}},{id:"allowAll",label:h("cookie.acceptAll"),variant:"text",onClick:()=>{I.value=!0,X(),M(!1)}}]:[{id:"save",color:"primary",label:h("cookie.saveSetting"),variant:"outline",size:"medium",round:"pill",onClick:()=>{I.value?X():b(),M(!1)}},{id:"allowAll",color:"primary",label:h("cookie.acceptAll"),variant:"outline",size:"medium",round:"pill",onClick:()=>{I.value=!0,X(),M(!1)}}]),$=U=>{U&&(I.value=N())};return e({check(){N()===_.value&&O()}}),(U,E)=>(i.openBlock(),i.createBlock(i.unref(He.ClientOnly),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.Teleport,{to:r.wrapper||"#app"},[i.unref(_)?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"cookieNoticeRef",ref:g,class:"cookie-notice"},[i.createElementVNode("div",ag,[i.createElementVNode("div",{type:i.unref(c),class:i.normalizeClass({"cookie-notice-wrap-grid":k.value,"cookie-notice-wrap":!k.value})},[i.createElementVNode("div",lg,[m.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(A.OIcon),{style:{display:"inline-block","font-size":"24px","margin-right":"4px"}},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("svg",ug,[...E[4]||(E[4]=[i.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),i.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}),i.createElementVNode("p",cg,[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(h)("cookie.about")),9,dg)])],64)):(i.openBlock(),i.createElementBlock("p",hg,i.toDisplayString(i.unref(h)("cookie.title",[r.community])),1)),i.createVNode(i.unref(A.OIcon),{class:"cookie-notice-close",onClick:E[0]||(E[0]=w=>O(!1))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconClose))]),_:1})]),m.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",fg,[i.createElementVNode("p",pg,[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(h)("cookie.about")),9,mg),E[5]||(E[5]=i.createTextVNode(". ",-1))]),i.createElementVNode("div",gg,[i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:X},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.acceptAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:b},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.rejectAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:E[1]||(E[1]=w=>M(!0))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(h)("cookie.manage")),1)]),_:1})])]))],10,og)]),i.createVNode(i.unref(A.ODialog),{visible:H.value,"onUpdate:visible":E[3]||(E[3]=w=>H.value=w),size:i.unref(o)?"medium":"large","phone-half-full":i.unref(a),"main-class":k.value?"o-cookie-notice-dlg-main":"",class:"cookie-dlg",actions:C.value,onChange:$,style:{"--dlg-radius":"4px"}},{header:i.withCtx(()=>[i.createElementVNode("span",vg,i.toDisplayString(i.unref(h)("cookie.manage")),1)]),default:i.withCtx(()=>[i.createElementVNode("div",_g,[i.createElementVNode("div",yg,[i.createElementVNode("div",Tg,[i.createElementVNode("span",bg,i.toDisplayString(i.unref(h)("cookie.necessaryCookie")),1),i.createElementVNode("span",xg,i.toDisplayString(i.unref(h)("cookie.alwaysOn")),1)]),i.createElementVNode("div",Cg,i.toDisplayString(i.unref(h)("cookie.necessaryCookieDetail")),1)]),i.createElementVNode("div",Eg,[i.createElementVNode("div",Sg,[i.createElementVNode("span",kg,i.toDisplayString(i.unref(h)("cookie.analyticalCookie")),1),i.createElementVNode("span",wg,[i.createVNode(i.unref(A.OSwitch),{modelValue:I.value,"onUpdate:modelValue":E[2]||(E[2]=w=>I.value=w)},null,8,["modelValue"])])]),i.createElementVNode("div",Dg,i.toDisplayString(i.unref(h)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","main-class","actions"])],512)):i.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),hh=He._export_sfc(Bg,[["__scopeId","data-v-f7b7244e"]]),Lg={key:0,class:"atom"},Mg={class:"atom-text"},Pg=["href"],Rg=["src"],Vg={key:0,class:"quick-nav"},Fg={class:"category-title"},$g={class:"navs"},Ug=["href"],qg={key:0,class:"friendship-link"},Hg={class:"friendship-link-title"},jg={class:"friendship-link-box"},zg=["href"],Gg={key:0,class:"footer-logo"},Wg=["src"],Yg=["src"],Xg=["href"],Kg={key:1,class:"footer-option"},Qg={class:"footer-option-item"},Zg=["href"],Jg={class:"license"},e1={class:"copyright"},t1={class:"filing"},i1=["href"],n1=["src"],r1={key:2,class:"footer-right"},s1={key:0,class:"code-box"},a1=["src"],o1={class:"code-layer"},l1=["src"],u1={class:"txt"},c1={class:"app-footer-pc"},d1={key:0,class:"footer-left"},h1=["href"],f1=["src"],p1={key:0,class:"footer-right"},m1=["href"],g1={class:"app-footer-mb"},v1={key:0,class:"links"},_1=["href"],y1={class:"copyright"},T1={key:0,class:"approval"},b1=["href"],x1=["src"],C1=i.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(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([e.simple?"app-footer-simple":"app-footer"])},[e.simple?(i.openBlock(),i.createBlock(vn,{key:1},{default:i.withCtx(()=>[i.createElementVNode("div",c1,[t.$slots.left||e.footerOption?i.renderSlot(t.$slots,"left",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",d1,[i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].copyright),1),i.createElementVNode("a",{class:"approval",href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,h1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,f1),i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),t.$slots.right||e.footerOption?i.renderSlot(t.$slots,"right",{key:1},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",p1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.footerOption[e.lang].link,(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:s.url},[i.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},i.toDisplayString(s.name),9,m1),a!==e.footerOption[e.lang].link.length-1?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:0,direction:"v"})):i.createCommentVNode("",!0)],64))),128))])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0)]),i.createElementVNode("div",g1,[t.$slots.right||e.footerOption?i.renderSlot(t.$slots,"right",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",v1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.footerOption[e.lang].link,(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:s.url},[i.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},i.toDisplayString(s.name),9,_1),a!==e.footerOption[e.lang].link.length-1?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:0,direction:"v"})):i.createCommentVNode("",!0)],64))),128))])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"copyright",{},()=>[i.createElementVNode("div",y1,i.toDisplayString(e.footerOption[e.lang].copyright),1)],!0),t.$slots.left||e.footerOption?i.renderSlot(t.$slots,"left",{key:1},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",T1,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,b1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,x1),i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0)])]),_:3})):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[t.$slots.atom||e.atom?(i.openBlock(),i.createBlock(vn,{key:0},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"atom",{},()=>[e.atom?(i.openBlock(),i.createElementBlock("div",Lg,[i.createElementVNode("p",Mg,i.toDisplayString(e.atom[e.lang].title),1),i.createElementVNode("a",{href:e.atom[e.lang].href,target:"_blank"},[i.createElementVNode("img",{src:e.atom[e.lang].img,class:"atom-logo",alt:""},null,8,Rg)],8,Pg)])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.ODivider),{class:"atom-divider"})],!0)]),_:3})):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"footer-content",style:i.normalizeStyle({backgroundImage:`url(${e.footerBg})`})},[i.createVNode(vn,null,{default:i.withCtx(()=>[t.$slots.quickNav||e.quickNav?i.renderSlot(t.$slots,"quickNav",{key:0},()=>[e.quickNav?(i.openBlock(),i.createElementBlock("div",Vg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.quickNav[e.lang],s=>(i.openBlock(),i.createElementBlock("div",{key:s.title,class:"category"},[i.createElementVNode("div",Fg,i.toDisplayString(s.title),1),i.createElementVNode("ul",$g,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.list,a=>(i.openBlock(),i.createElementBlock("li",{key:a.title,class:"nav"},[i.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(a.title),9,Ug)]))),128))])]))),128))])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),t.$slots.friendshipLink||e.friendshipLink?i.renderSlot(t.$slots,"friendshipLink",{key:1},()=>[e.friendshipLink?(i.openBlock(),i.createElementBlock("div",qg,[i.createElementVNode("div",Hg,i.toDisplayString(e.friendshipLink.title[e.lang]),1),i.createElementVNode("div",jg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.friendshipLink.link[e.lang],s=>(i.openBlock(),i.createElementBlock("a",{href:s.link,key:s.link,target:"_blank"},i.toDisplayString(s.title),9,zg))),128))])])):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"footer",{},()=>[i.createElementVNode("div",{class:i.normalizeClass(["inner",{"inner-en":e.lang==="en"}])},[e.footerLogo?(i.openBlock(),i.createElementBlock("div",Gg,[i.createElementVNode("img",{class:"show-pc",src:e.footerLogo.logo,alt:""},null,8,Wg),i.createElementVNode("img",{class:"show-mo",src:e.footerLogo.logoMb,alt:""},null,8,Yg),i.createElementVNode("p",null,[i.createElementVNode("a",{class:"email",href:`mailto:${e.footerLogo.email}`,target:"_blank"},i.toDisplayString(e.footerLogo.email),9,Xg)])])):i.createCommentVNode("",!0),e.footerOption?(i.openBlock(),i.createElementBlock("div",Kg,[i.createElementVNode("div",Qg,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.footerOption[e.lang].link,(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:s.url},[i.createElementVNode("a",{target:"_blank",href:s.url},i.toDisplayString(s.name),9,Zg),a!==e.footerOption[e.lang].link.length-1?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:0,style:{"--o-divider-bd-color":"var(--o-color-info3-inverse)","--o-divider-label-gap":"0 8px"},direction:"v"})):i.createCommentVNode("",!0)],64))),128))]),i.createElementVNode("p",Jg,[i.createElementVNode("span",null,i.toDisplayString(e.footerOption[e.lang].licenseText),1),i.createTextVNode(" "+i.toDisplayString(e.footerOption[e.lang].licenseInfo),1)]),i.createElementVNode("div",e1,[i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].copyright),1),i.createElementVNode("div",t1,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,i1),i.createElementVNode("img",{src:e.footerOption[e.lang].policeIcon,class:"filing-img"},null,8,n1),i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])])])):i.createCommentVNode("",!0),e.qrcode?(i.openBlock(),i.createElementBlock("div",r1,[e.lang==="zh"?(i.openBlock(),i.createElementBlock("div",s1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.qrcode,(s,a)=>(i.openBlock(),i.createElementBlock("div",{key:a,class:"code-pop"},[i.createElementVNode("img",{src:s.img,class:"code-img",alt:""},null,8,a1),i.createElementVNode("div",o1,[i.createElementVNode("img",{src:s.code,alt:""},null,8,l1),i.createElementVNode("p",u1,i.toDisplayString(s.label),1)])]))),128))])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),fh=He._export_sfc(C1,[["__scopeId","data-v-e6208e27"]]),E1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function S1(r,e){return i.openBlock(),i.createElementBlock("svg",E1,[...e[0]||(e[0]=[i.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 Nl={name:"components-icon-close",render:S1},k1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function w1(r,e){return i.openBlock(),i.createElementBlock("svg",k1,[...e[0]||(e[0]=[i.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),i.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 ac={name:"components-icon-header-search",render:w1},D1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function A1(r,e){return i.openBlock(),i.createElementBlock("svg",D1,[...e[0]||(e[0]=[i.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 N1={name:"components-icon-header-delete",render:A1},I1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function O1(r,e){return i.openBlock(),i.createElementBlock("svg",I1,[...e[0]||(e[0]=[i.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 B1={name:"components-icon-delete",render:O1},L1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function M1(r,e){return i.openBlock(),i.createElementBlock("svg",L1,[...e[0]||(e[0]=[i.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 P1={name:"components-icon-header-back",render:M1},R1={class:"o-header-search"},V1={class:"o-header-search-drawer"},F1={key:0,class:"o-header-search-recommend-container"},$1=["onClick"],U1={key:1,class:"o-header-search-history-container"},q1={class:"o-header-search-history-header"},H1={class:"o-header-search-history-header-title"},j1={class:"o-header-search-history-item-container"},z1=["onClick"],G1={class:"o-header-search-history-item-text"},W1={key:3,class:"o-header-search-hot-container"},Y1={class:"o-header-search-hot-header"},X1={class:"o-header-search-hot-item-container"},K1=["onClick"],Q1=i.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(r,{emit:e}){const{lePadV:t}=Ct.useScreen(),{t:n}=He.useI18n(),s=r,a=e,o=i.ref(s.modelValue),l=i.ref(s.historyItems),c=i.ref(!1),h=i.ref(),m=i.computed(()=>!t.value&&c.value||t.value&&o.value);i.watch(()=>s.modelValue,O=>{o.value!==O&&(o.value=O)}),i.watch(()=>o.value,O=>{a("update:modelValue",O)}),i.watch(()=>s.historyItems,O=>{l.value!==O&&(l.value=O)}),i.watch(()=>l.value,O=>{a("update:historyItems",O)}),i.onMounted(()=>{if(s.storeHistory&&s.storageKey)try{const O=JSON.parse(localStorage.getItem(s.storageKey)||"[]");Array.isArray(O)&&O.length&&(l.value=Array.from(new Set([...l.value,...O])))}catch{}});const g=()=>{c.value=!0},k=()=>{const O=o.value.trim();O&&(c.value=!1,l.value.unshift(O),l.value=Array.from(new Set(l.value)),l.value.length>s.maxHistoryCount&&l.value.pop(),s.storeHistory&&s.storeHistory&&localStorage.setItem(s.storageKey,JSON.stringify(l.value)),a("search",O),s.searchUrl&&window.open(s.searchUrl+O,s.searchUrlOpenBlank?"_blank":"_self","noopener noreferrer"))},T=()=>{o.value="",a("clear"),t.value||(c.value=!1)},I=()=>{const O=[...l.value];l.value=[],s.storeHistory&&s.storeHistory&&localStorage.removeItem(s.storageKey),a("delete-history",O)},_=O=>{l.value=l.value.filter(H=>H!==O),s.storeHistory&&s.storeHistory&&(l.value.length?localStorage.setItem(s.storageKey,JSON.stringify(l.value)):localStorage.removeItem(s.storageKey)),a("delete-history-item",O)},S=O=>{o.value=O,k()},R=()=>{o.value="",c.value=!1},L=i.ref();return zi.onClickOutside(L,T),(O,H)=>(i.openBlock(),i.createElementBlock("div",R1,[i.createElementVNode("div",{ref_key:"posWrapper",ref:L,class:i.normalizeClass({"o-header-search-input-pc-wrapper":!i.unref(t),"o-header-search-input-pc-wrapper-left":!i.unref(t)&&r.expandDirection==="left","o-header-search-input-pc-wrapper-right":!i.unref(t)&&r.expandDirection==="right","o-header-search-input-mobile-wrapper":i.unref(t),focus:c.value})},[i.createElementVNode("div",{class:i.normalizeClass(["o-header-search-input-wrapper",{focus:c.value}])},[i.unref(t)&&c.value?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon",onClick:R},{default:i.withCtx(()=>[i.createVNode(i.unref(P1))]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OInput),{ref_key:"inputRef",ref:h,modelValue:o.value,"onUpdate:modelValue":H[0]||(H[0]=M=>o.value=M),class:"o-header-search-input",placeholder:c.value?r.expandedPlaceholder??i.unref(n)("search.expandedPlaceholder"):r.placeholder??i.unref(n)("search.placeholder"),onFocus:g,onKeyup:i.withKeys(k,["enter"])},{prefix:i.withCtx(()=>[i.renderSlot(O.$slots,"input-prefix",{},()=>[i.createVNode(i.unref(A.OIcon),{class:"o-header-search-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(ac))]),_:1})],!0)]),suffix:i.withCtx(()=>[i.renderSlot(O.$slots,"input-suffix",{},()=>[r.clearable&&m.value?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon close",onClick:T},{default:i.withCtx(()=>[i.createVNode(i.unref(Nl))]),_:1})):i.createCommentVNode("",!0)],!0)]),_:3},8,["modelValue","placeholder"]),i.unref(t)&&c.value?(i.openBlock(),i.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:k},i.toDisplayString(r.searchTextMobile??i.unref(n)("search")),1)):i.createCommentVNode("",!0)],2),i.withDirectives(i.createElementVNode("div",V1,[i.renderSlot(O.$slots,"drawer",{recommendItems:r.recommendItems,historyItems:l.value,hotItems:r.hotItems},()=>[r.recommendItems.length?(i.openBlock(),i.createElementBlock("div",F1,[i.renderSlot(O.$slots,"recommend-header",{recommend:r.recommendItems},void 0,!0),i.renderSlot(O.$slots,"recommend-content",{recommend:r.recommendItems},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.recommendItems,M=>(i.openBlock(),i.createElementBlock("div",{class:"o-header-search-recommend-item",key:M,onClick:P=>S(M)},i.toDisplayString(M),9,$1))),128))],!0)])):l.value.length?(i.openBlock(),i.createElementBlock("div",U1,[i.renderSlot(O.$slots,"history-header",{history:l.value},()=>[i.createElementVNode("div",q1,[i.createElementVNode("span",H1,i.toDisplayString(r.historyTitle??i.unref(n)("search.history")),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-icon",onClick:I},{default:i.withCtx(()=>[i.createVNode(i.unref(B1))]),_:1})])],!0),i.renderSlot(O.$slots,"history-content",{history:l.value},()=>[i.createElementVNode("div",j1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,M=>(i.openBlock(),i.createElementBlock("div",{key:M,class:"o-header-search-history-item",onClick:P=>S(M)},[i.createElementVNode("span",G1,i.toDisplayString(M),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-history-item-icon",onClick:i.withModifiers(P=>_(M),["stop"])},{default:i.withCtx(()=>[i.createVNode(i.unref(N1),{class:"icon-delete"})]),_:1},8,["onClick"])],8,z1))),128))])],!0)])):i.createCommentVNode("",!0),(r.recommendItems.length||l.value.length)&&r.hotItems.length?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:2,class:"o-header-search-drawer-divider"})):i.createCommentVNode("",!0),r.hotItems.length?(i.openBlock(),i.createElementBlock("div",W1,[i.renderSlot(O.$slots,"hot-header",{hot:r.hotItems},()=>[i.createElementVNode("div",Y1,i.toDisplayString(r.hotTitle??i.unref(n)("search.hot")),1)],!0),i.renderSlot(O.$slots,"hot-content",{hot:r.hotItems},()=>[i.createElementVNode("div",X1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.hotItems,M=>(i.openBlock(),i.createElementBlock("div",{key:M,class:"o-header-search-hot-item",onClick:P=>S(M)},i.toDisplayString(M),9,K1))),128))])],!0)])):i.createCommentVNode("",!0)],!0)],512),[[i.vShow,c.value]])],2),i.unref(t)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon-mobile",onClick:g},{default:i.withCtx(()=>[i.createVNode(i.unref(ac))]),_:1})):i.createCommentVNode("",!0)]))}}),ph=He._export_sfc(Q1,[["__scopeId","data-v-9f1bd8fc"]]),Z1=["src"],J1=i.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,t=["#058EF0","#FA7305","#03B5A5"],n=i.computed(()=>{var a;return(a=e.name)==null?void 0:a.charAt(0).toUpperCase()}),s=i.computed(()=>{var l;const a={"background-color":"",width:"32px",height:"32px","font-size":"20px"};a["background-color"]=e.name?t[((l=e.name)==null?void 0:l.length)%t.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")?(i.openBlock(),i.createElementBlock("img",{key:0,src:r.avatar,class:i.normalizeClass(["img-avatar",r.variant]),style:i.normalizeStyle(s.value),alt:""},null,14,Z1)):(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["word-avatar",r.variant]),style:i.normalizeStyle(s.value)},i.toDisplayString(n.value),7))}}),e2=He._export_sfc(J1,[["__scopeId","data-v-340348ce"]]),t2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function i2(r,e){return i.openBlock(),i.createElementBlock("svg",t2,[...e[0]||(e[0]=[i.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 n2={name:"components-icon-avatar-line",render:i2},r2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function s2(r,e){return i.openBlock(),i.createElementBlock("svg",r2,[...e[0]||(e[0]=[i.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 Il={name:"components-icon-chevron-down",render:s2},a2={class:"header-user"},o2={key:0,class:"user-info"},l2={class:"info-wrap hover-icon-rotate"},u2={class:"user-account"},c2={key:1},d2=i.defineComponent({__name:"OHeaderUser",props:{token:{default:void 0},lang:{default:void 0},noticeTotal:{default:void 0},userInfo:{default:void 0},options:{default:void 0}},emits:["login","logout"],setup(r,{emit:e}){const{lePadV:t}=Ct.useScreen(),n=e,s=()=>{n("login")},a=o=>{o!=null&&o.logout?n("logout"):window.open(o.url,o.target)};return(o,l)=>(i.openBlock(),i.createElementBlock("div",a2,[r.token?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,onClick:s,class:"avatar-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(n2))]),_:1})),i.createVNode(i.Transition,{name:"header-user-zoom-in"},{default:i.withCtx(()=>[r.token?(i.openBlock(),i.createElementBlock("div",o2,[i.createVNode(i.unref(A.ODropdown),{trigger:i.unref(t)?"click":"hover",optionPosition:i.unref(t)?"br":"bottom","option-wrap-class":`user-dropdown ${r.lang==="en"?"is-en":""}`},{dropdown:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.options,c=>(i.openBlock(),i.createBlock(i.unref(A.ODropdownItem),{key:c.label,style:{"--dropdown-item-justify":"center"},onClick:h=>a(c)},{default:i.withCtx(()=>[c!=null&&c.total?(i.openBlock(),i.createBlock(i.unref(A.OBadge),{key:0,value:c.total,color:"danger",class:i.normalizeClass(["header-message message",{"notice-not":!c.total}])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.label),1)]),_:2},1032,["value","class"])):(i.openBlock(),i.createElementBlock("span",c2,i.toDisplayString(c.label),1))]),_:2},1032,["onClick"]))),128))]),default:i.withCtx(()=>[i.createElementVNode("div",l2,[i.createVNode(i.unref(A.OBadge),{value:r.noticeTotal,dot:!0,color:"danger",class:i.normalizeClass(["header-message user-avatar",{"notice-not":!r.noticeTotal}])},{default:i.withCtx(()=>[i.createVNode(e2,{avatar:r.userInfo.photo,name:r.userInfo.username,"custom-size":20},null,8,["avatar","name"])]),_:1},8,["value","class"]),i.createElementVNode("p",u2,i.toDisplayString(r.userInfo.username),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Il))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):i.createCommentVNode("",!0)]),_:1})]))}}),mh=He._export_sfc(d2,[["__scopeId","data-v-bf7f5326"]]),gh=i.defineComponent({__name:"OPlusConfigProvider",props:{locale:{},theme:{default:"light"}},setup(r){const e=r,t=i.reactive({locale:i.computed(()=>e.locale),theme:i.computed(()=>e.theme)});return i.provide(He.configProviderInjectKey,t),(n,s)=>(i.openBlock(),i.createBlock(i.unref(A.OConfigProvider),{locale:r.locale==="zh"?i.unref(Km):i.unref(Qm)},{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3},8,["locale"]))}}),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 i.openBlock(),i.createElementBlock("svg",h2,[...e[0]||(e[0]=[i.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 Yr={name:"components-icon-chevron-right",render:f2},p2={class:"section-wrapper"},m2={key:1,class:"section-title"},g2={key:2,class:"section-subtitle"},v2={key:1,class:"section-body"},_2={key:2,class:"section-footer"},y2=i.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(t,n)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["app-section",{"is-full":e.full}])},[i.createElementVNode("div",p2,[i.renderSlot(t.$slots,"main",{},()=>[t.$slots.header||e.title||e.subtitle?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["section-header",{"is-left":!e.headerJustifyCenter}])},[i.renderSlot(t.$slots,"header",{},()=>[i.unref(A.isArray)(e.title)?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(e.title,s=>(i.openBlock(),i.createElementBlock("h2",{key:s,class:"section-title"},i.toDisplayString(s),1))),128)):t.$slots.title||e.title?(i.openBlock(),i.createElementBlock("h2",m2,[i.renderSlot(t.$slots,"title",{},()=>[i.createTextVNode(i.toDisplayString(e.title),1)],!0)])):i.createCommentVNode("",!0),t.$slots.subtitle||e.subtitle?(i.openBlock(),i.createElementBlock("p",g2,[i.renderSlot(t.$slots,"subtitle",{},()=>[i.createTextVNode(i.toDisplayString(e.subtitle),1)],!0)])):i.createCommentVNode("",!0)],!0)],2)):i.createCommentVNode("",!0),t.$slots.default?(i.openBlock(),i.createElementBlock("div",v2,[i.renderSlot(t.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.footer||e.footer?(i.openBlock(),i.createElementBlock("div",_2,[i.renderSlot(t.$slots,"footer",{},()=>[i.createVNode(i.unref(A.OLink),{href:e.footerHref,target:"_blank"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"footer-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.footer)+" ",1)]),_:1},8,["href"])],!0)])):i.createCommentVNode("",!0)],!0)])],2))}}),vh=He._export_sfc(y2,[["__scopeId","data-v-2fc90e8a"]]),T2={class:"source-code"},b2={key:0,class:"info-wrap"},x2={class:"title"},C2={class:"info-wrap hover-icon-rotate"},E2={class:"title"},S2=i.defineComponent({__name:"OSourceCode",props:{title:{default:void 0},options:{default:void 0},url:{default:void 0},icon:{default:void 0},justify:{default:"center"}},setup(r){const e=s=>{window.open(s.url,"_blank")},t=i.ref(!1),n=s=>{t.value=s};return(s,a)=>(i.openBlock(),i.createElementBlock("div",T2,[r.url?(i.openBlock(),i.createElementBlock("div",b2,[i.createElementVNode("span",x2,i.toDisplayString(r.title),1),r.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.icon),{class:"icon"}))]),_:1})):i.createCommentVNode("",!0)])):(i.openBlock(),i.createBlock(i.unref(A.ODropdown),{key:1,trigger:"hover",optionPosition:"bottom","option-wrap-class":"dropdown",class:i.normalizeClass({"dropdown-active":t.value}),onVisibleChange:n},{dropdown:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.options,o=>(i.openBlock(),i.createBlock(i.unref(A.ODropdownItem),{onClick:l=>e(o),key:o.url,class:"list",style:i.normalizeStyle({"--dropdown-item-justify":r.justify})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(o.label)+" ",1),o.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(o.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0)]),_:2},1032,["onClick","style"]))),128))]),default:i.withCtx(()=>[i.createElementVNode("div",C2,[i.createElementVNode("span",E2,i.toDisplayString(r.title),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Il))]),_:1})])]),_:1},8,["class"]))]))}}),_h=He._export_sfc(S2,[["__scopeId","data-v-0b5e5e40"]]),k2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function w2(r,e){return i.openBlock(),i.createElementBlock("svg",k2,[...e[0]||(e[0]=[i.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 lo={name:"components-icon-sun",render:w2},D2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function A2(r,e){return i.openBlock(),i.createElementBlock("svg",D2,[...e[0]||(e[0]=[i.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 uo={name:"components-icon-moon",render:A2},N2={class:"o-theme-switcher"},I2={key:1,class:"o-theme-switcher-mobile"},O2=i.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},lightIcon:{default:lo},darkIcon:{default:uo}},emits:["update:theme","change"],setup(r,{emit:e}){const t=r,n=e,{gtPhone:s}=Ct.useScreen(),a=i.computed({get(){return t.theme},set(c){n("update:theme",c),n("change",c)}}),o=i.computed(()=>t.type==="common"||t.type==="auto"&&s.value),l=()=>{a.value=a.value===t.lightValue?t.darkValue:t.lightValue};return(c,h)=>(i.openBlock(),i.createElementBlock("div",N2,[o.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"o-theme-switcher-common",onClick:l},[i.createVNode(i.unref(A.OIcon),{class:"o-theme-icon"},{default:i.withCtx(()=>[a.value===r.lightValue?(i.openBlock(),i.createBlock(i.unref(uo),{key:0})):(i.openBlock(),i.createBlock(i.unref(lo),{key:1}))]),_:1})])):(i.openBlock(),i.createElementBlock("div",I2,[i.createVNode(i.unref(A.OSwitch),{modelValue:a.value,"onUpdate:modelValue":h[0]||(h[0]=m=>a.value=m),class:"o-theme-switch","checked-value":r.darkValue,"unchecked-value":r.lightValue},{on:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"o-theme-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(lo))]),_:1})]),off:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"o-theme-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(uo))]),_:1})]),_:1},8,["modelValue","checked-value","unchecked-value"])]))]))}}),yh=He._export_sfc(O2,[["__scopeId","data-v-9aaa2610"]]),ia=new Map([[1,{label:"线下",value:1}],[2,{label:"线上",value:2}],[3,{label:"线上与线下",value:3}]]),oc=/^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w ./?%&=-]*)?$/,Wn=new Map([[1,{id:"draft",label:"草稿",text:"草稿",value:1}],[2,{id:"under-review",label:"审核中",text:"未审核",value:2}],[3,{id:"registration",label:"报名中",text:"审核通过",value:3}],[4,{id:"in-progress",label:"进行中",text:"审核通过",value:4}],[5,{id:"ended",label:"已结束",text:"已结束",value:5}],[6,{id:"modified",label:"已修改",text:"已修改",value:6}],[7,{id:"reject",label:"已驳回",text:"已驳回",value:7}]]),B2=new Map([["all",{label:"全部",value:"all"}],["rejected",{label:"已驳回",value:"rejected"}],["approved",{label:"已通过",value:"approved"}],["publish",{label:"未审核",value:"publish"}],["cancel",{label:"已取消",value:"cancel"}]]),L2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function M2(r,e){return i.openBlock(),i.createElementBlock("svg",L2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M10 14.267c-0.413 0-0.817-0.043-1.211-0.131h-0.001c-0.329-0.073-0.652-0.176-0.968-0.31-0.318-0.135-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.211s0.044-0.817 0.131-1.212v0c0.073-0.33 0.176-0.652 0.31-0.968 0.134-0.318 0.295-0.618 0.482-0.902v0c0.207-0.314 0.446-0.607 0.718-0.878s0.564-0.511 0.878-0.718c0.283-0.187 0.584-0.347 0.902-0.482 0.316-0.134 0.639-0.237 0.968-0.31v0c0.394-0.087 0.798-0.131 1.211-0.131s0.817 0.044 1.212 0.131v0c0.33 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878v0c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968v0.001c0.087 0.394 0.131 0.798 0.131 1.211v4.667c0 0.129-0.023 0.248-0.068 0.358v0c-0.046 0.11-0.114 0.21-0.205 0.302s-0.192 0.159-0.302 0.205v0c-0.11 0.046-0.229 0.068-0.358 0.068h-4.667zM16.4 13.333c0 0.129 0.023 0.248 0.068 0.358s0.114 0.211 0.205 0.302c0.091 0.091 0.192 0.159 0.302 0.205v0c0.11 0.046 0.229 0.068 0.358 0.068h4.667c0.413 0 0.817-0.044 1.212-0.131v0c0.329-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968v0c0.087-0.394 0.131-0.798 0.131-1.211s-0.044-0.817-0.131-1.212c-0.073-0.33-0.176-0.652-0.31-0.968-0.134-0.318-0.295-0.618-0.482-0.902v0c-0.207-0.314-0.447-0.607-0.718-0.878s-0.564-0.511-0.878-0.718c-0.283-0.187-0.584-0.347-0.902-0.482-0.316-0.134-0.639-0.237-0.968-0.31-0.394-0.087-0.798-0.131-1.212-0.131s-0.817 0.044-1.212 0.131c-0.33 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.902-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212v4.667zM22 12.4h-3.733v-3.733c0-0.287 0.031-0.568 0.094-0.84 0.048-0.208 0.114-0.413 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.303-0.416 0.489-0.601s0.386-0.349 0.601-0.489l0.001-0.001c0.184-0.12 0.379-0.224 0.585-0.311 0.2-0.085 0.404-0.151 0.612-0.199 0.273-0.063 0.553-0.094 0.84-0.094s0.567 0.031 0.84 0.094c0.208 0.048 0.413 0.114 0.613 0.199 0.206 0.087 0.401 0.191 0.586 0.311 0.215 0.14 0.416 0.304 0.601 0.489s0.349 0.386 0.489 0.601c0.12 0.184 0.224 0.38 0.311 0.586 0.085 0.2 0.151 0.404 0.199 0.612 0.063 0.273 0.094 0.553 0.094 0.84s-0.031 0.568-0.094 0.84c-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.586v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.613 0.199h-0.001c-0.273 0.063-0.552 0.094-0.84 0.094zM13.733 12.4v-3.733c0-0.287-0.031-0.568-0.094-0.84-0.048-0.208-0.114-0.413-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.14-0.215-0.303-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.612-0.199-0.273-0.063-0.553-0.094-0.841-0.094s-0.567 0.031-0.84 0.094c-0.208 0.048-0.413 0.114-0.612 0.199-0.206 0.087-0.401 0.191-0.586 0.311v0c-0.215 0.14-0.416 0.303-0.601 0.489s-0.349 0.386-0.489 0.601v0c-0.12 0.184-0.224 0.38-0.311 0.586-0.085 0.2-0.151 0.404-0.199 0.612-0.063 0.273-0.094 0.553-0.094 0.84s0.031 0.568 0.094 0.84c0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.304 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.38 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199v0c0.273 0.063 0.553 0.094 0.84 0.094h3.733zM16.4 16c0-0.258 0.091-0.478 0.273-0.66 0.091-0.091 0.192-0.159 0.302-0.205s0.229-0.068 0.358-0.068h4.667c0.414 0 0.817 0.044 1.212 0.131 0.329 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968 0.087 0.394 0.131 0.798 0.131 1.212s-0.044 0.817-0.131 1.212c-0.073 0.33-0.176 0.652-0.31 0.968-0.134 0.318-0.295 0.618-0.482 0.902-0.207 0.314-0.447 0.607-0.718 0.878s-0.564 0.511-0.878 0.718c-0.283 0.187-0.584 0.347-0.902 0.482-0.316 0.134-0.639 0.237-0.968 0.31-0.394 0.087-0.798 0.131-1.212 0.131s-0.817-0.044-1.212-0.131c-0.33-0.073-0.652-0.176-0.968-0.31-0.318-0.134-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.212v-4.667zM10 15.067c-0.413 0-0.817 0.044-1.212 0.131v0c-0.329 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.901-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212s0.044 0.817 0.131 1.212c0.073 0.329 0.176 0.652 0.31 0.968 0.134 0.318 0.295 0.618 0.482 0.902v0c0.207 0.314 0.446 0.607 0.718 0.878s0.564 0.511 0.878 0.718c0.283 0.187 0.584 0.347 0.902 0.482 0.316 0.134 0.639 0.237 0.968 0.31 0.394 0.087 0.798 0.131 1.212 0.131s0.817-0.044 1.212-0.131v0c0.33-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968 0.087-0.394 0.131-0.798 0.131-1.212v-4.667c0-0.258-0.091-0.478-0.273-0.66-0.091-0.091-0.192-0.159-0.302-0.205s-0.229-0.068-0.358-0.068h-4.667zM13.733 16.933v3.733c0 0.287-0.031 0.567-0.094 0.84-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.585v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.612 0.199-0.273 0.063-0.553 0.094-0.841 0.094s-0.567-0.031-0.84-0.094h-0.001c-0.208-0.048-0.412-0.114-0.612-0.199-0.206-0.087-0.401-0.191-0.586-0.311v0c-0.215-0.14-0.416-0.303-0.601-0.489s-0.349-0.386-0.489-0.601c-0.12-0.184-0.224-0.38-0.311-0.586-0.085-0.2-0.151-0.404-0.199-0.612-0.063-0.273-0.094-0.553-0.094-0.84s0.031-0.568 0.094-0.841c0.048-0.208 0.114-0.412 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.304-0.416 0.489-0.601s0.386-0.349 0.601-0.489c0.184-0.12 0.38-0.224 0.586-0.311 0.2-0.085 0.404-0.151 0.612-0.199h0.001c0.273-0.063 0.553-0.094 0.84-0.094h3.733zM22 16.933h-3.733v3.733c0 0.287 0.031 0.567 0.094 0.84 0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.303 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.379 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199 0.273 0.063 0.553 0.094 0.84 0.094s0.567-0.031 0.84-0.094c0.208-0.048 0.413-0.114 0.613-0.199 0.206-0.087 0.401-0.191 0.586-0.311 0.215-0.141 0.416-0.304 0.601-0.489s0.349-0.386 0.489-0.601c0.12-0.184 0.224-0.38 0.311-0.586 0.085-0.2 0.151-0.404 0.199-0.612 0.063-0.273 0.094-0.553 0.094-0.84s-0.031-0.568-0.094-0.841c-0.048-0.208-0.114-0.412-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.141-0.215-0.304-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.613-0.199-0.273-0.063-0.553-0.094-0.84-0.094z"},null,-1)])])}const P2={name:"meeting-icon-all",render:M2},R2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function V2(r,e){return i.openBlock(),i.createElementBlock("svg",R2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M25.088 14.216l-0.852 0.781c-0.385 0.353-0.411 0.933-0.058 1.319s0.933 0.411 1.319 0.058l2.116-1.938c0.193-0.177 0.349-0.374 0.467-0.591 0.092-0.17 0.162-0.351 0.208-0.546 0.045-0.189 0.067-0.378 0.063-0.566-0.004-0.222-0.041-0.444-0.112-0.665s-0.17-0.423-0.297-0.605c-0.107-0.155-0.235-0.295-0.382-0.422-0.151-0.13-0.314-0.237-0.488-0.321-0.223-0.107-0.464-0.176-0.724-0.207l-5.601-0.661c-0.031-0.012-0.159-0.053-0.187-0.073-0.021-0.026-0.113-0.124-0.128-0.155l-2.377-5.087c-0.11-0.235-0.25-0.441-0.42-0.618v0c-0.133-0.138-0.285-0.259-0.454-0.362-0.165-0.1-0.338-0.177-0.517-0.232v0c-0.211-0.064-0.432-0.096-0.662-0.096s-0.451 0.032-0.662 0.096v0c-0.179 0.054-0.352 0.131-0.517 0.232-0.17 0.103-0.321 0.224-0.454 0.362-0.17 0.177-0.31 0.383-0.42 0.618l-2.377 5.087c-0.021 0.026-0.1 0.135-0.128 0.155-0.031 0.012-0.153 0.069-0.187 0.073l-5.601 0.661c-0.26 0.031-0.501 0.1-0.724 0.207v0c-0.174 0.084-0.336 0.191-0.488 0.321-0.147 0.127-0.275 0.267-0.382 0.422-0.127 0.182-0.226 0.384-0.297 0.605s-0.109 0.443-0.112 0.665c-0.003 0.188 0.018 0.377 0.063 0.566 0.047 0.194 0.116 0.376 0.208 0.546 0.118 0.217 0.274 0.414 0.467 0.591l4.119 3.773c0.018 0.029 0.099 0.137 0.11 0.171 0.001 0.009 0.002 0.025 0.004 0.044 0.005 0.054 0.013 0.133 0.008 0.159l-1.093 5.462c-0.051 0.255-0.060 0.505-0.028 0.749 0.025 0.191 0.076 0.378 0.152 0.562 0.074 0.179 0.168 0.343 0.28 0.493 0.133 0.177 0.293 0.333 0.479 0.47s0.384 0.241 0.593 0.315c0.177 0.062 0.362 0.101 0.555 0.118 0.198 0.017 0.392 0.009 0.581-0.025h0.001c0.242-0.043 0.478-0.127 0.705-0.253l4.953-2.737c0.032-0.008 0.159-0.050 0.193-0.050 0.032 0.008 0.163 0.033 0.193 0.050l4.831 2.669c0.233 0.129 0.473 0.214 0.72 0.256h0.001c0.192 0.033 0.388 0.039 0.588 0.020 0.195-0.019 0.382-0.061 0.56-0.126v0c0.211-0.077 0.411-0.187 0.598-0.329s0.347-0.305 0.478-0.488c0.111-0.154 0.201-0.323 0.271-0.506 0.072-0.188 0.119-0.379 0.139-0.573 0.026-0.25 0.008-0.504-0.053-0.762l-2.084-8.779c-0.121-0.509-0.615-0.813-1.124-0.693s-0.813 0.615-0.693 1.124l2.084 8.779c0.020 0.084 0.018 0.161-0.007 0.229s-0.071 0.129-0.141 0.181c-0.069 0.053-0.14 0.081-0.213 0.087s-0.147-0.013-0.223-0.055l-4.831-2.669c-0.171-0.094-0.347-0.165-0.53-0.212v0c-0.183-0.047-0.372-0.071-0.566-0.071s-0.384 0.024-0.566 0.071c-0.183 0.047-0.359 0.118-0.53 0.212l-4.953 2.737c-0.075 0.041-0.148 0.059-0.219 0.055s-0.142-0.032-0.21-0.082c-0.069-0.050-0.116-0.109-0.142-0.176s-0.031-0.142-0.014-0.226l1.093-5.462c0.039-0.195 0.053-0.387 0.041-0.579s-0.048-0.381-0.109-0.57c-0.062-0.189-0.144-0.363-0.248-0.525s-0.229-0.309-0.375-0.443l-4.119-3.773c-0.063-0.058-0.104-0.122-0.122-0.191s-0.014-0.145 0.012-0.227c0.026-0.081 0.067-0.145 0.123-0.191s0.126-0.074 0.211-0.084l5.601-0.661c0.195-0.023 0.381-0.069 0.558-0.138s0.345-0.161 0.504-0.276c0.159-0.115 0.299-0.245 0.42-0.392s0.223-0.308 0.306-0.486l2.377-5.087c0.036-0.077 0.084-0.135 0.145-0.173s0.133-0.058 0.218-0.058c0.085 0 0.157 0.019 0.218 0.058s0.109 0.096 0.144 0.173l2.377 5.087c0.083 0.178 0.185 0.34 0.306 0.486s0.261 0.277 0.42 0.392c0.159 0.115 0.327 0.207 0.504 0.276s0.363 0.115 0.558 0.138l5.601 0.661c0.085 0.010 0.155 0.038 0.211 0.084s0.097 0.109 0.123 0.191c0.026 0.081 0.030 0.157 0.012 0.227s-0.059 0.133-0.122 0.191l-1.263 1.157zM10.007 15.327l2 2c0.369 0.37 0.95 0.37 1.32 0s0.37-0.95 0-1.32l-2-2c-0.369-0.37-0.95-0.37-1.32 0s-0.37 0.95 0 1.32z"},null,-1)])])}const Ol={name:"meeting-icon-event",render:V2},F2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function $2(r,e){return i.openBlock(),i.createElementBlock("svg",F2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M16.933 4v1.733h8.4c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.242 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.098 0.266 0.128 0.404 0.034 0.156 0.050 0.315 0.050 0.479v7.222c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-7.222c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-18.667c-0.055 0-0.106 0.010-0.153 0.029v0 0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v13.333c0 0.055 0.010 0.106 0.029 0.153v0c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h18.667c0.055 0 0.107-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153v-2.953c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933v2.953c0 0.163-0.017 0.323-0.050 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.266 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-0.44l2.42 2.42c0.37 0.37 0.37 0.95 0 1.32s-0.95 0.37-1.32 0l-3.74-3.74h-12.507l-3.74 3.74c-0.37 0.37-0.95 0.37-1.32 0s-0.369-0.95 0-1.32l2.42-2.42h-0.44c-0.163 0-0.323-0.017-0.479-0.050v0c-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.122-0.37-0.199v0c-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35v0c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404v0c-0.034-0.156-0.050-0.315-0.050-0.479v-13.333c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h8.4v-1.733c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM18.72 17.392l4.615-4.741c0.365-0.374 0.357-0.955-0.018-1.32s-0.955-0.357-1.32 0.018l-3.906 4.012-3.532-4.067c-0.195-0.169-0.421-0.244-0.678-0.225s-0.47 0.125-0.639 0.32l-4.615 5.333c-0.342 0.395-0.3 0.975 0.095 1.317s0.974 0.3 1.316-0.095l3.91-4.518 3.397 3.925c0.169 0.195 0.381 0.302 0.639 0.32s0.541-0.111 0.736-0.28z"},null,-1)])])}const Bl={name:"meeting-icon-meet",render:$2},U2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function q2(r,e){return i.openBlock(),i.createElementBlock("svg",U2,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M10.633 5.457c-1.119 0.457-2.181 1.053-3.185 1.79-0.422 0.309-0.51 0.883-0.201 1.305s0.883 0.51 1.305 0.201c0.927-0.68 1.908-1.223 2.943-1.629 0.185-0.073 0.373-0.141 0.562-0.205 0.658-0.223 1.325-0.389 2.001-0.497 0.64-0.103 1.287-0.154 1.943-0.154s1.304 0.051 1.943 0.154v0c0.676 0.108 1.343 0.274 2.001 0.497 0.189 0.064 0.376 0.133 0.562 0.205v0c1.035 0.407 2.015 0.95 2.943 1.629 0.421 0.309 0.996 0.221 1.305-0.201s0.221-0.996-0.201-1.305c-1.005-0.736-2.067-1.333-3.185-1.79-0.271-0.111-0.545-0.213-0.823-0.307-0.755-0.256-1.52-0.447-2.297-0.572-0.739-0.119-1.488-0.179-2.247-0.179s-1.508 0.060-2.247 0.179v0c-0.776 0.125-1.541 0.316-2.296 0.572-0.277 0.094-0.552 0.197-0.823 0.307v0zM28.933 18.667v1.333c0 0.163-0.017 0.323-0.051 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.099-0.404 0.128-0.156 0.034-0.315 0.050-0.479 0.050h-21.333c-0.163 0-0.323-0.017-0.479-0.050-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37s-0.098-0.266-0.128-0.404c-0.034-0.156-0.050-0.315-0.050-0.479v-8c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404s0.121-0.254 0.199-0.37c0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h21.333c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.241 0.178 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.050 0.315 0.050 0.478v4c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-4c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-21.333c-0.055 0-0.106 0.010-0.153 0.029v0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v8c0 0.055 0.010 0.106 0.029 0.154s0.178 0.178 0.217 0.217c0.047 0.020 0.098 0.029 0.153 0.029h21.333c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.154v-1.333c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM20.479 23.117v0c0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.121 0.37 0.199 0.125 0.083 0.241 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.051 0.316 0.051 0.479s-0.017 0.323-0.051 0.479c-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-8c-0.163 0-0.323-0.017-0.479-0.051-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.179-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404-0.034-0.156-0.050-0.315-0.050-0.479s0.017-0.323 0.050-0.479c0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.241 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.099 0.404-0.128 0.156-0.034 0.316-0.050 0.479-0.050h8c0.163 0 0.323 0.017 0.479 0.050zM20 24.933h-8c-0.055 0-0.106 0.010-0.153 0.029s-0.178 0.178-0.217 0.217c-0.020 0.047-0.029 0.098-0.029 0.154s0.010 0.106 0.029 0.153c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h8c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153s-0.010-0.106-0.029-0.154v0c-0.020-0.047-0.178-0.178-0.217-0.217-0.047-0.019-0.098-0.029-0.154-0.029z"},null,-1)])])}const Th={name:"meeting-icon-summit",render:q2};var Ve=(r=>(r.ALL="all",r.MEETING="meeting",r.EVENTS="events",r.SUMMIT="summit",r.ACTIVITY="activity",r.APPROVAL="approval",r))(Ve||{}),Oi=(r=>(r.SIG="sig",r.GROUP="group",r))(Oi||{});const{t:Pt}=He.useI18n(),H2=()=>{var r;return typeof document<"u"&&((r=getComputedStyle(document.documentElement).getPropertyValue("--o-deep-blue-6"))==null?void 0:r.trim())?"rgba(var(--o-deep-blue-6))":"var(--o-color-primary1)"},co={summit:"rgba(var(--o-orange-6))",events:"rgba(var(--o-cyan-6))",meeting:H2()},na=[{label:Pt("meeting.meetingTypeAll"),value:Ve.ALL,icon:P2},{label:Pt("meeting.meetingTypeMeet"),value:Ve.MEETING,icon:Bl,color:co.meeting,zIndex:3},{label:Pt("meeting.meetingTypeEvents"),value:Ve.EVENTS,icon:Ol,color:co.events,zIndex:2},{label:Pt("meeting.meetingTypeSummit"),value:Ve.SUMMIT,icon:Th,color:co.summit,zIndex:1}],gn=0,_n=1,rn=2,j2=[{label:Pt("meeting.day0"),value:gn,max:7},{label:Pt("meeting.week0"),value:_n,max:2},{label:Pt("meeting.month0"),value:rn,max:1}];Pt("meeting.day"),Pt("meeting.week"),Pt("meeting.month");const bh=[Pt("meeting.sunday"),Pt("meeting.monday"),Pt("meeting.tuesday"),Pt("meeting.wednesday"),Pt("meeting.thursday"),Pt("meeting.friday"),Pt("meeting.saturday")],z2=()=>{const r=[];for(let e=1;e<=7;e++){const t=e%7;r.push({value:t,label:bh[t]})}return r},Xs=z2(),xh=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,G2=["var(--o-color-primary1)","var(--o-color-warning1)","var(--o-color-success1)"],W2={class:"o-activity-form"},Y2={class:"time-config"},X2={class:"form-btns"},lc=i.defineComponent({__name:"OActivityForm",props:{data:{},creatActivity:{},editActivity:{},admins:{},organizers:{}},emits:["confirm","close"],setup(r,{expose:e,emit:t}){const n=t,s=A.useMessage(null),{lePadV:a}=Ct.useScreen(),{t:o}=He.useI18n(),l=o,c=r,h=i.computed(()=>!!c.data),m=i.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:""}),g=i.ref(),k=i.ref(!1),T=i.ref({title:[{required:!0,message:"请输入活动名称"},{validator:M=>{if(M.length>50)return{type:"danger",message:"活动名称不能超过50个字符"}}}],activity_type:[{required:!0,message:"请选择活动类型"}],organizer:[{required:!0,message:"请选择活动类型"}],start_date:[{required:!0,message:"请选择活动时间"},{validator:()=>{const{start_date:M,end_date:P}=m.value,N=M.split(" "),X=P.split(" ");if(!M||!P)return{type:"danger",message:"请选择活动日期"};const b=N[1].split(":").map(Number),C=X[1].split(":").map(Number);if(b[0]<8||b[0]>21||C[0]<8||C[0]>21)return{type:"danger",message:"开始和结束时间必须在8:00-22:00点之间"};if(tt.dayjs(M).valueOf()>tt.dayjs(P).valueOf())return{type:"danger",message:"结束日期必须大于起始日期"};m.value.start_date=N[0],m.value.end_date=X[0],m.value.start=N[1],m.value.end=X[1]},triggers:["blur","change"]}],register_end_date:[{validator:()=>{const{register_end_date:M,end_date:P,end:N}=m.value;if(M&&tt.dayjs(`${P} ${N}`).valueOf()<tt.dayjs(M).valueOf())return{type:"danger",message:"报名截止日期必须小于结束日期"}},triggers:["blur","change"]}],address:[{required:!0,message:"请输入活动地点"},{validator:M=>{if(M.length>255)return{type:"danger",message:"活动名称不能超过255个字符"}}}],register_url:[{validator:M=>{const P=M.replaceAll(" ","")||"";if(P.length&&(P.split(";")||[]).some(X=>!oc.test(X)))return{type:"danger",message:"请输入正确的报名网址"}},triggers:["blur","change"]}],content_url:[{validator:M=>{const P=M.replaceAll(" ","")||"";if(P.length&&(P.split(";")||[]).some(X=>!oc.test(X)))return{type:"danger",message:"请输入正确的活动详情网址"}},triggers:["blur","change"]}],synopsis:[{validator:M=>{if(M.length>1e3)return{type:"danger",message:"活动内容不能超过1000个字符"}}}],email_list:[{validator:M=>{const P=M.replaceAll(" ","").replaceAll(",",";")||"";if(P.length){if(P.length>1020)return{type:"danger",message:o("meeting.emailTooLong")};const N=P.split(";")||[];if(N.some(X=>!xh.test(X)))return{type:"danger",message:o("meeting.emailInvalid")};if(N.some(X=>X.length>50))return{type:"danger",message:o("meeting.singleEmailTooLong")};if(N.length>20)return{type:"danger",message:o("meeting.emailCountTooLong")}}},triggers:["blur","change"]}],approver:[{required:!0,message:"请选择活动审批人"}]}),I=i.computed(()=>c.admins||[]),_=i.ref(""),S=i.ref([]);ia.forEach(M=>{S.value.push(M)});const R=M=>{const P=S.value.find(N=>N.label===M);m.value.activity_type=P==null?void 0:P.value},L=M=>M.getTime()<Date.now()-1440*60*1e3;i.watch(()=>c.data,M=>{var P;if(M){const{title:N,start_date:X,end_date:b,register_end_date:C,activity_type:$,register_url:U,content_url:E,address:w,start:F,end:z,is_publish:Q,approver:q,update_activity_id:Z,synopsis:G,email_list:J,organizer:ie}=M;let oe={title:N,start_date:X,end_date:b,register_end_date:C,activity_type:$,register_url:U,content_url:E,address:w,start:F,end:z,is_publish:Q,approver:q,update_activity_id:Z,synopsis:G,email_list:J,organizer:ie};m.value={...oe},_.value=(P=ia.get(M.activity_type))==null?void 0:P.label,m.value.start_date=`${m.value.start_date} ${m.value.start}`,m.value.end_date=`${m.value.end_date} ${m.value.end}`}},{immediate:!0,deep:!0});const O=async M=>{var N,X,b,C,$,U,E;let P=h.value?"修改":M?"创建":"保存草稿";try{if((await((N=g.value)==null?void 0:N.validate())).some(z=>!!z))return;k.value=!0,m.value.is_publish=`${M}`,h.value&&((X=c.data)==null?void 0:X.status)===3?(m.value.update_activity_id=(b=c.data)==null?void 0:b.id,await((C=c.creatActivity)==null?void 0:C.call(c,m.value))):h.value?await((U=c.editActivity)==null?void 0:U.call(c,($=c.data)==null?void 0:$.id,m.value)):await((E=c.creatActivity)==null?void 0:E.call(c,m.value));const F=`“${m.value.title}”活动${P}成功`;s.success({content:F}),H(),n("confirm")}catch{k.value=!1,m.value.start_date=`${m.value.start_date} ${m.value.start}`,m.value.end_date=`${m.value.end_date} ${m.value.end}`;const w=`“${m.value.title}”活动${P}失败`;s.danger({content:w})}finally{k.value=!1}},H=()=>{m.value={},n("close")};return e({confirm:O}),(M,P)=>(i.openBlock(),i.createElementBlock("div",W2,[i.createVNode(i.unref(A.OForm),{model:m.value,ref_key:"formRef",ref:g,"has-required":"","label-width":"108px",layout:i.unref(a)?"v":"h",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:T.value.title,label:"活动名称",field:"title"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:"请输入活动名称",modelValue:m.value.title,"onUpdate:modelValue":P[0]||(P[0]=N=>m.value.title=N)},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.organizer,label:"活动主办方",field:"organizer"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:"请选择活动主办方",size:"large",modelValue:m.value.organizer,"onUpdate:modelValue":P[1]||(P[1]=N=>m.value.organizer=N)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.organizers,N=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:N.name,value:N.name},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(N.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.activity_type,label:"活动类型",field:"activity_type"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:"请选择活动类型",size:"large",modelValue:_.value,"onUpdate:modelValue":P[2]||(P[2]=N=>_.value=N),onChange:R},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(S.value,N=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:N.value,value:N.label},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(N.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["rules"]),m.value.activity_type===1||m.value.activity_type===3?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,rules:T.value.address,label:"活动地点",field:"address"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:"请输入活动地点",modelValue:m.value.address,"onUpdate:modelValue":P[3]||(P[3]=N=>m.value.address=N)},null,8,["modelValue"])]),_:1},8,["rules"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{rules:T.value.start_date,label:"活动时间",field:"start_date",required:""},{default:i.withCtx(()=>[i.createElementVNode("div",Y2,[i.createVNode(i.unref(A.OFormItem),{label:"起始日期",field:"start_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.start_date,"onUpdate:modelValue":P[4]||(P[4]=N=>m.value.start_date=N),type:"datetime",placeholder:"请选择日期",format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":L,clearable:!1,class:"date-activity"},null,8,["modelValue"])]),_:1}),i.createVNode(i.unref(A.OFormItem),{label:"结束日期",field:"end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.end_date,"onUpdate:modelValue":P[5]||(P[5]=N=>m.value.end_date=N),type:"datetime",placeholder:"请选择日期",format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":L,clearable:!1,class:"date-activity"},null,8,["modelValue"])]),_:1})])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.register_end_date,label:"报名截止时间",field:"register_end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.register_end_date,"onUpdate:modelValue":P[6]||(P[6]=N=>m.value.register_end_date=N),type:"datetime",placeholder:"请选择报名截止时间",format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm",clearable:!1,class:"date-activity"},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.register_url,label:"报名网址",field:"register_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:"请输入活动报名网址",modelValue:m.value.register_url,"onUpdate:modelValue":P[7]||(P[7]=N=>m.value.register_url=N)},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.content_url,label:"活动详情网址",field:"content_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:"请输入活动详情介绍网址",modelValue:m.value.content_url,"onUpdate:modelValue":P[8]||(P[8]=N=>m.value.content_url=N)},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.synopsis,label:"活动内容",field:"synopsis"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:"请输入活动内容",modelValue:m.value.synopsis,"onUpdate:modelValue":P[9]||(P[9]=N=>m.value.synopsis=N)},null,8,["modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{field:"email_list",rules:T.value.email_list,label:"邮件地址"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:h.value,size:"large",placeholder:i.unref(l)("meeting.enterEmail"),rows:4,modelValue:m.value.email_list,"onUpdate:modelValue":P[10]||(P[10]=N=>m.value.email_list=N)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.approver,label:"活动审批人",field:"approver"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:"请选择活动审批人",size:"large",modelValue:m.value.approver,"onUpdate:modelValue":P[11]||(P[11]=N=>m.value.approver=N)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,N=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:N,value:N},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(N),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),i.createElementVNode("div",X2,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:P[12]||(P[12]=N=>O(!0)),loading:k.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(h.value?"保存":"创建"),1)]),_:1},8,["loading"]),h.value?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,color:"primary",variant:"outline",round:"pill",size:"large",onClick:P[13]||(P[13]=N=>O(!1)),loading:k.value},{default:i.withCtx(()=>[...P[14]||(P[14]=[i.createTextVNode(" 保存草稿 ",-1)])]),_:1},8,["loading"])),i.createVNode(i.unref(A.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:H},{default:i.withCtx(()=>[...P[15]||(P[15]=[i.createTextVNode("取消",-1)])]),_:1})])]))}}),K2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Q2(r,e){return i.openBlock(),i.createElementBlock("svg",K2,[...e[0]||(e[0]=[i.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M17.286 5c0.676 0 1.213 0.546 1.213 1.21 0 0.227-0.064 0.449-0.184 0.641l-0.065 0.093-1.24 1.62c-0.149 0.194-0.433 0.236-0.634 0.092-0.181-0.129-0.234-0.364-0.134-0.551l0.039-0.060 1.24-1.62c0.046-0.060 0.071-0.136 0.071-0.214 0-0.169-0.113-0.302-0.253-0.329l-0.054-0.005h-10.573c-0.064 0-0.126 0.022-0.179 0.064-0.126 0.099-0.162 0.281-0.092 0.426l0.036 0.059 4.207 5.495c0.138 0.18 0.221 0.394 0.243 0.617l0.006 0.112 0.015 3.985c0 0.088 0.033 0.171 0.087 0.232l0.045 0.042 1.525 1.158c0.052 0.040 0.114 0.060 0.176 0.060 0.146-0.001 0.274-0.116 0.301-0.275l0.005-0.062-0.020-5.134c-0.001-0.228 0.063-0.452 0.184-0.645l0.065-0.094 1.804-2.357c0.149-0.194 0.433-0.236 0.634-0.092 0.181 0.129 0.234 0.364 0.134 0.551l-0.039 0.060-1.805 2.357c-0.035 0.045-0.058 0.099-0.067 0.157l-0.005 0.059 0.020 5.134c0.003 0.663-0.533 1.212-1.209 1.214-0.23 0.001-0.454-0.063-0.647-0.183l-0.094-0.064-1.525-1.158c-0.267-0.203-0.436-0.506-0.471-0.834l-0.007-0.124-0.015-3.985c-0-0.059-0.015-0.115-0.041-0.165l-0.030-0.047-4.207-5.495c-0.401-0.523-0.308-1.272 0.211-1.682 0.183-0.145 0.405-0.234 0.637-0.256l0.117-0.006h10.573z"},null,-1)])])}const uc={name:"components-icon-filter",render:Q2};/*! @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 Jo(r,e){return Jo=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Jo(r,e)}function Z2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ks(r,e,t){return Z2()?Ks=Reflect.construct:Ks=function(s,a,o){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(s,l),h=new c;return o&&Jo(h,o.prototype),h},Ks.apply(null,arguments)}function Ii(r){return J2(r)||ev(r)||tv(r)||iv()}function J2(r){if(Array.isArray(r))return el(r)}function ev(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function tv(r,e){if(r){if(typeof r=="string")return el(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return el(r,e)}}function el(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function iv(){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 nv=Object.hasOwnProperty,cc=Object.setPrototypeOf,rv=Object.isFrozen,sv=Object.getPrototypeOf,av=Object.getOwnPropertyDescriptor,Jt=Object.freeze,vi=Object.seal,ov=Object.create,Ch=typeof Reflect<"u"&&Reflect,ra=Ch.apply,tl=Ch.construct;ra||(ra=function(e,t,n){return e.apply(t,n)});Jt||(Jt=function(e){return e});vi||(vi=function(e){return e});tl||(tl=function(e,t){return Ks(e,Ii(t))});var lv=_i(Array.prototype.forEach),dc=_i(Array.prototype.pop),qr=_i(Array.prototype.push),Qs=_i(String.prototype.toLowerCase),ho=_i(String.prototype.toString),hc=_i(String.prototype.match),Ni=_i(String.prototype.replace),uv=_i(String.prototype.indexOf),cv=_i(String.prototype.trim),Lt=_i(RegExp.prototype.test),fo=dv(TypeError);function _i(r){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return ra(r,e,n)}}function dv(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return tl(r,t)}}function Ge(r,e,t){var n;t=(n=t)!==null&&n!==void 0?n:Qs,cc&&cc(r,null);for(var s=e.length;s--;){var a=e[s];if(typeof a=="string"){var o=t(a);o!==a&&(rv(e)||(e[s]=o),a=o)}r[a]=!0}return r}function Sn(r){var e=ov(null),t;for(t in r)ra(nv,r,[t])===!0&&(e[t]=r[t]);return e}function Vs(r,e){for(;r!==null;){var t=av(r,e);if(t){if(t.get)return _i(t.get);if(typeof t.value=="function")return _i(t.value)}r=sv(r)}function n(s){return console.warn("fallback value for",s),null}return n}var fc=Jt(["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"]),po=Jt(["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"]),mo=Jt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hv=Jt(["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"]),go=Jt(["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"]),fv=Jt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pc=Jt(["#text"]),mc=Jt(["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"]),vo=Jt(["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"]),gc=Jt(["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"]),Fs=Jt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pv=vi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),mv=vi(/<%[\w\W]*|[\w\W]*%>/gm),gv=vi(/\${[\w\W]*}/gm),vv=vi(/^data-[\-\w.\u00B7-\uFFFF]+$/),_v=vi(/^aria-[\-\w]+$/),yv=vi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tv=vi(/^(?:\w+script|data):/i),bv=vi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xv=vi(/^html$/i),Cv=vi(/^[a-z][.\w]*(-[.\w]+)+$/i),Ev=function(){return typeof window>"u"?null:window},Sv=function(e,t){if(mn(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,s="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(s)&&(n=t.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 Eh(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ev(),e=function(ee){return Eh(ee)};if(e.version="2.5.9",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,n=r.document,s=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,l=r.Element,c=r.NodeFilter,h=r.NamedNodeMap,m=h===void 0?r.NamedNodeMap||r.MozNamedAttrMap:h,g=r.HTMLFormElement,k=r.DOMParser,T=r.trustedTypes,I=l.prototype,_=Vs(I,"cloneNode"),S=Vs(I,"nextSibling"),R=Vs(I,"childNodes"),L=Vs(I,"parentNode");if(typeof a=="function"){var O=n.createElement("template");O.content&&O.content.ownerDocument&&(n=O.content.ownerDocument)}var H=Sv(T,t),M=H?H.createHTML(""):"",P=n,N=P.implementation,X=P.createNodeIterator,b=P.createDocumentFragment,C=P.getElementsByTagName,$=t.importNode,U={};try{U=Sn(n).documentMode?n.documentMode:{}}catch{}var E={};e.isSupported=typeof L=="function"&&N&&N.createHTMLDocument!==void 0&&U!==9;var w=pv,F=mv,z=gv,Q=vv,q=_v,Z=Tv,G=bv,J=Cv,ie=yv,oe=null,Ee=Ge({},[].concat(Ii(fc),Ii(po),Ii(mo),Ii(go),Ii(pc))),ue=null,$e=Ge({},[].concat(Ii(mc),Ii(vo),Ii(gc),Ii(Fs))),Ie=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}})),Oe=null,Ye=null,Fe=!0,Ze=!0,Je=!1,me=!0,_e=!1,be=!0,Be=!1,it=!1,he=!1,de=!1,ce=!1,De=!1,Ce=!0,et=!1,fe="user-content-",ye=!0,ge=!1,qe={},Ne=null,ft=Ge({},["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"]),Dt=null,pi=Ge({},["audio","video","img","source","image","track"]),Xe=null,xi=Ge({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ht="http://www.w3.org/1998/Math/MathML",Ci="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml",ei=yt,li=!1,jt=null,Xi=Ge({},[Ht,Ci,yt],ho),Rt,Ei=["application/xhtml+xml","text/html"],x="text/html",D,K=null,re=n.createElement("form"),xe=function(ee){return ee instanceof RegExp||ee instanceof Function},Me=function(ee){K&&K===ee||((!ee||mn(ee)!=="object")&&(ee={}),ee=Sn(ee),Rt=Ei.indexOf(ee.PARSER_MEDIA_TYPE)===-1?Rt=x:Rt=ee.PARSER_MEDIA_TYPE,D=Rt==="application/xhtml+xml"?ho:Qs,oe="ALLOWED_TAGS"in ee?Ge({},ee.ALLOWED_TAGS,D):Ee,ue="ALLOWED_ATTR"in ee?Ge({},ee.ALLOWED_ATTR,D):$e,jt="ALLOWED_NAMESPACES"in ee?Ge({},ee.ALLOWED_NAMESPACES,ho):Xi,Xe="ADD_URI_SAFE_ATTR"in ee?Ge(Sn(xi),ee.ADD_URI_SAFE_ATTR,D):xi,Dt="ADD_DATA_URI_TAGS"in ee?Ge(Sn(pi),ee.ADD_DATA_URI_TAGS,D):pi,Ne="FORBID_CONTENTS"in ee?Ge({},ee.FORBID_CONTENTS,D):ft,Oe="FORBID_TAGS"in ee?Ge({},ee.FORBID_TAGS,D):{},Ye="FORBID_ATTR"in ee?Ge({},ee.FORBID_ATTR,D):{},qe="USE_PROFILES"in ee?ee.USE_PROFILES:!1,Fe=ee.ALLOW_ARIA_ATTR!==!1,Ze=ee.ALLOW_DATA_ATTR!==!1,Je=ee.ALLOW_UNKNOWN_PROTOCOLS||!1,me=ee.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_e=ee.SAFE_FOR_TEMPLATES||!1,be=ee.SAFE_FOR_XML!==!1,Be=ee.WHOLE_DOCUMENT||!1,de=ee.RETURN_DOM||!1,ce=ee.RETURN_DOM_FRAGMENT||!1,De=ee.RETURN_TRUSTED_TYPE||!1,he=ee.FORCE_BODY||!1,Ce=ee.SANITIZE_DOM!==!1,et=ee.SANITIZE_NAMED_PROPS||!1,ye=ee.KEEP_CONTENT!==!1,ge=ee.IN_PLACE||!1,ie=ee.ALLOWED_URI_REGEXP||ie,ei=ee.NAMESPACE||yt,Ie=ee.CUSTOM_ELEMENT_HANDLING||{},ee.CUSTOM_ELEMENT_HANDLING&&xe(ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ie.tagNameCheck=ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ee.CUSTOM_ELEMENT_HANDLING&&xe(ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ie.attributeNameCheck=ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ee.CUSTOM_ELEMENT_HANDLING&&typeof ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ie.allowCustomizedBuiltInElements=ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_e&&(Ze=!1),ce&&(de=!0),qe&&(oe=Ge({},Ii(pc)),ue=[],qe.html===!0&&(Ge(oe,fc),Ge(ue,mc)),qe.svg===!0&&(Ge(oe,po),Ge(ue,vo),Ge(ue,Fs)),qe.svgFilters===!0&&(Ge(oe,mo),Ge(ue,vo),Ge(ue,Fs)),qe.mathMl===!0&&(Ge(oe,go),Ge(ue,gc),Ge(ue,Fs))),ee.ADD_TAGS&&(oe===Ee&&(oe=Sn(oe)),Ge(oe,ee.ADD_TAGS,D)),ee.ADD_ATTR&&(ue===$e&&(ue=Sn(ue)),Ge(ue,ee.ADD_ATTR,D)),ee.ADD_URI_SAFE_ATTR&&Ge(Xe,ee.ADD_URI_SAFE_ATTR,D),ee.FORBID_CONTENTS&&(Ne===ft&&(Ne=Sn(Ne)),Ge(Ne,ee.FORBID_CONTENTS,D)),ye&&(oe["#text"]=!0),Be&&Ge(oe,["html","head","body"]),oe.table&&(Ge(oe,["tbody"]),delete Oe.tbody),Jt&&Jt(ee),K=ee)},nt=Ge({},["mi","mo","mn","ms","mtext"]),St=Ge({},["annotation-xml"]),zt=Ge({},["title","style","font","a","script"]),Vt=Ge({},po);Ge(Vt,mo),Ge(Vt,hv);var Bt=Ge({},go);Ge(Bt,fv);var ti=function(ee){var pe=L(ee);(!pe||!pe.tagName)&&(pe={namespaceURI:ei,tagName:"template"});var we=Qs(ee.tagName),Qe=Qs(pe.tagName);return jt[ee.namespaceURI]?ee.namespaceURI===Ci?pe.namespaceURI===yt?we==="svg":pe.namespaceURI===Ht?we==="svg"&&(Qe==="annotation-xml"||nt[Qe]):!!Vt[we]:ee.namespaceURI===Ht?pe.namespaceURI===yt?we==="math":pe.namespaceURI===Ci?we==="math"&&St[Qe]:!!Bt[we]:ee.namespaceURI===yt?pe.namespaceURI===Ci&&!St[Qe]||pe.namespaceURI===Ht&&!nt[Qe]?!1:!Bt[we]&&(zt[we]||!Vt[we]):!!(Rt==="application/xhtml+xml"&&jt[ee.namespaceURI]):!1},Ke=function(ee){qr(e.removed,{element:ee});try{ee.parentNode.removeChild(ee)}catch{try{ee.outerHTML=M}catch{ee.remove()}}},ii=function(ee,pe){try{qr(e.removed,{attribute:pe.getAttributeNode(ee),from:pe})}catch{qr(e.removed,{attribute:null,from:pe})}if(pe.removeAttribute(ee),ee==="is"&&!ue[ee])if(de||ce)try{Ke(pe)}catch{}else try{pe.setAttribute(ee,"")}catch{}},Gt=function(ee){var pe,we;if(he)ee="<remove></remove>"+ee;else{var Qe=hc(ee,/^[\r\n\t ]+/);we=Qe&&Qe[0]}Rt==="application/xhtml+xml"&&ei===yt&&(ee='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ee+"</body></html>");var Ft=H?H.createHTML(ee):ee;if(ei===yt)try{pe=new k().parseFromString(Ft,Rt)}catch{}if(!pe||!pe.documentElement){pe=N.createDocument(ei,"template",null);try{pe.documentElement.innerHTML=li?M:Ft}catch{}}var wt=pe.body||pe.documentElement;return ee&&we&&wt.insertBefore(n.createTextNode(we),wt.childNodes[0]||null),ei===yt?C.call(pe,Be?"html":"body")[0]:Be?pe.documentElement:wt},Wt=function(ee){return X.call(ee.ownerDocument||ee,ee,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},kt=function(ee){return ee instanceof g&&(typeof ee.nodeName!="string"||typeof ee.textContent!="string"||typeof ee.removeChild!="function"||!(ee.attributes instanceof m)||typeof ee.removeAttribute!="function"||typeof ee.setAttribute!="function"||typeof ee.namespaceURI!="string"||typeof ee.insertBefore!="function"||typeof ee.hasChildNodes!="function")},lt=function(ee){return mn(o)==="object"?ee instanceof o:ee&&mn(ee)==="object"&&typeof ee.nodeType=="number"&&typeof ee.nodeName=="string"},ze=function(ee,pe,we){E[ee]&&lv(E[ee],function(Qe){Qe.call(e,pe,we,K)})},Si=function(ee){var pe;if(ze("beforeSanitizeElements",ee,null),kt(ee)||Lt(/[\u0080-\uFFFF]/,ee.nodeName))return Ke(ee),!0;var we=D(ee.nodeName);if(ze("uponSanitizeElement",ee,{tagName:we,allowedTags:oe}),ee.hasChildNodes()&&!lt(ee.firstElementChild)&&(!lt(ee.content)||!lt(ee.content.firstElementChild))&&Lt(/<[/\w]/g,ee.innerHTML)&&Lt(/<[/\w]/g,ee.textContent)||we==="select"&&Lt(/<template/i,ee.innerHTML)||ee.nodeType===7||be&&ee.nodeType===8&&Lt(/<[/\w]/g,ee.data))return Ke(ee),!0;if(!oe[we]||Oe[we]){if(!Oe[we]&&xn(we)&&(Ie.tagNameCheck instanceof RegExp&&Lt(Ie.tagNameCheck,we)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(we)))return!1;if(ye&&!Ne[we]){var Qe=L(ee)||ee.parentNode,Ft=R(ee)||ee.childNodes;if(Ft&&Qe)for(var wt=Ft.length,Tt=wt-1;Tt>=0;--Tt){var ki=_(Ft[Tt],!0);ki.__removalCount=(ee.__removalCount||0)+1,Qe.insertBefore(ki,S(ee))}}return Ke(ee),!0}return ee instanceof l&&!ti(ee)||(we==="noscript"||we==="noembed"||we==="noframes")&&Lt(/<\/no(script|embed|frames)/i,ee.innerHTML)?(Ke(ee),!0):(_e&&ee.nodeType===3&&(pe=ee.textContent,pe=Ni(pe,w," "),pe=Ni(pe,F," "),pe=Ni(pe,z," "),ee.textContent!==pe&&(qr(e.removed,{element:ee.cloneNode()}),ee.textContent=pe)),ze("afterSanitizeElements",ee,null),!1)},Pi=function(ee,pe,we){if(Ce&&(pe==="id"||pe==="name")&&(we in n||we in re))return!1;if(!(Ze&&!Ye[pe]&&Lt(Q,pe))){if(!(Fe&&Lt(q,pe))){if(!ue[pe]||Ye[pe]){if(!(xn(ee)&&(Ie.tagNameCheck instanceof RegExp&&Lt(Ie.tagNameCheck,ee)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(ee))&&(Ie.attributeNameCheck instanceof RegExp&&Lt(Ie.attributeNameCheck,pe)||Ie.attributeNameCheck instanceof Function&&Ie.attributeNameCheck(pe))||pe==="is"&&Ie.allowCustomizedBuiltInElements&&(Ie.tagNameCheck instanceof RegExp&&Lt(Ie.tagNameCheck,we)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(we))))return!1}else if(!Xe[pe]){if(!Lt(ie,Ni(we,G,""))){if(!((pe==="src"||pe==="xlink:href"||pe==="href")&&ee!=="script"&&uv(we,"data:")===0&&Dt[ee])){if(!(Je&&!Lt(Z,Ni(we,G,"")))){if(we)return!1}}}}}}return!0},xn=function(ee){return ee!=="annotation-xml"&&hc(ee,J)},gs=function(ee){var pe,we,Qe,Ft;ze("beforeSanitizeAttributes",ee,null);var wt=ee.attributes;if(!(!wt||kt(ee))){var Tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ue};for(Ft=wt.length;Ft--;){pe=wt[Ft];var ki=pe,vt=ki.name,Er=ki.namespaceURI;if(we=vt==="value"?pe.value:cv(pe.value),Qe=D(vt),Tt.attrName=Qe,Tt.attrValue=we,Tt.keepAttr=!0,Tt.forceKeepAttr=void 0,ze("uponSanitizeAttribute",ee,Tt),we=Tt.attrValue,!Tt.forceKeepAttr&&(ii(vt,ee),!!Tt.keepAttr)){if(!me&&Lt(/\/>/i,we)){ii(vt,ee);continue}_e&&(we=Ni(we,w," "),we=Ni(we,F," "),we=Ni(we,z," "));var vs=D(ee.nodeName);if(Pi(vs,Qe,we)){if(et&&(Qe==="id"||Qe==="name")&&(ii(vt,ee),we=fe+we),be&&Lt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,we)){ii(vt,ee);continue}if(H&&mn(T)==="object"&&typeof T.getAttributeType=="function"&&!Er)switch(T.getAttributeType(vs,Qe)){case"TrustedHTML":{we=H.createHTML(we);break}case"TrustedScriptURL":{we=H.createScriptURL(we);break}}try{Er?ee.setAttributeNS(Er,vt,we):ee.setAttribute(vt,we),kt(ee)?Ke(ee):dc(e.removed)}catch{}}}}ze("afterSanitizeAttributes",ee,null)}},Ki=function Se(ee){var pe,we=Wt(ee);for(ze("beforeSanitizeShadowDOM",ee,null);pe=we.nextNode();)ze("uponSanitizeShadowNode",pe,null),Si(pe),gs(pe),pe.content instanceof s&&Se(pe.content);ze("afterSanitizeShadowDOM",ee,null)};return e.sanitize=function(Se){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe,we,Qe,Ft,wt;if(li=!Se,li&&(Se="<!-->"),typeof Se!="string"&&!lt(Se))if(typeof Se.toString=="function"){if(Se=Se.toString(),typeof Se!="string")throw fo("dirty is not a string, aborting")}else throw fo("toString is not a function");if(!e.isSupported){if(mn(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof Se=="string")return r.toStaticHTML(Se);if(lt(Se))return r.toStaticHTML(Se.outerHTML)}return Se}if(it||Me(ee),e.removed=[],typeof Se=="string"&&(ge=!1),ge){if(Se.nodeName){var Tt=D(Se.nodeName);if(!oe[Tt]||Oe[Tt])throw fo("root node is forbidden and cannot be sanitized in-place")}}else if(Se instanceof o)pe=Gt("<!---->"),we=pe.ownerDocument.importNode(Se,!0),we.nodeType===1&&we.nodeName==="BODY"||we.nodeName==="HTML"?pe=we:pe.appendChild(we);else{if(!de&&!_e&&!Be&&Se.indexOf("<")===-1)return H&&De?H.createHTML(Se):Se;if(pe=Gt(Se),!pe)return de?null:De?M:""}pe&&he&&Ke(pe.firstChild);for(var ki=Wt(ge?Se:pe);Qe=ki.nextNode();)Qe.nodeType===3&&Qe===Ft||(Si(Qe),gs(Qe),Qe.content instanceof s&&Ki(Qe.content),Ft=Qe);if(Ft=null,ge)return Se;if(de){if(ce)for(wt=b.call(pe.ownerDocument);pe.firstChild;)wt.appendChild(pe.firstChild);else wt=pe;return(ue.shadowroot||ue.shadowrootmod)&&(wt=$.call(t,wt,!0)),wt}var vt=Be?pe.outerHTML:pe.innerHTML;return Be&&oe["!doctype"]&&pe.ownerDocument&&pe.ownerDocument.doctype&&pe.ownerDocument.doctype.name&&Lt(xv,pe.ownerDocument.doctype.name)&&(vt="<!DOCTYPE "+pe.ownerDocument.doctype.name+`>
3
+ `+vt),_e&&(vt=Ni(vt,w," "),vt=Ni(vt,F," "),vt=Ni(vt,z," ")),H&&De?H.createHTML(vt):vt},e.setConfig=function(Se){Me(Se),it=!0},e.clearConfig=function(){K=null,it=!1},e.isValidAttribute=function(Se,ee,pe){K||Me({});var we=D(Se),Qe=D(ee);return Pi(we,Qe,pe)},e.addHook=function(Se,ee){typeof ee=="function"&&(E[Se]=E[Se]||[],qr(E[Se],ee))},e.removeHook=function(Se){if(E[Se])return dc(E[Se])},e.removeHooks=function(Se){E[Se]&&(E[Se]=[])},e.removeAllHooks=function(){E={}},e}var kv=Eh();function wv(r,e){const t=r.hooks??{};let n;for(n in t){const s=t[n];s!==void 0&&e.addHook(n,s)}}function Dv(){return kv()}function ka(r={},e=Dv){const t=e();wv(r,t);const n=function(s,a){const o=a.value;if(a.oldValue===o)return;const l=`${o}`,c=a.arg,h=r.namedConfigurations,m=r.default??{};if(h&&c!==void 0){s.innerHTML=t.sanitize(l,h[c]??m);return}s.innerHTML=t.sanitize(l,m)};return{mounted:n,updated:n}}const Av={class:"th-filter-wrapper",ref:"filterRef"},Nv={key:1,class:"list-content-wrapper"},Iv={class:"btn-wrapper"},vc=i.defineComponent({__name:"ThFilter",props:{modelValue:{},list:{default:()=>[]},multiple:{type:Boolean,default:!1},tableWidth:{}},emits:["update:model-value","confirm"],setup(r,{emit:e}){const t=ka(),{t:n}=He.useI18n(),s=r,a=e,o=i.computed(()=>s.list.some(H=>{var M;return(M=H.children)==null?void 0:M.length})),l=i.computed(()=>s.list.map(H=>{const M=(H.children||[]).map(P=>({label:P.label,value:P.value}));return{label:H.label,value:H.value,children:o.value?M:void 0}})),c=i.ref(!1);i.watch(()=>s.modelValue,H=>{s.multiple?h.value=H:k.value=H});const h=i.ref([]),m=H=>{h.value=H},g=i.ref([]),k=i.ref(null),T=H=>{k.value===H?k.value=null:k.value=H,_()},I=()=>{h.value=[],g.value=[],k.value=null,_()},_=()=>{let H=null;s.multiple?o.value?H=g.value:H=h.value:H=k.value,a("update:model-value",H),c.value=!0,i.nextTick(()=>{a("confirm"),c.value=!1})},S=i.computed(()=>h.value.length||g.value.length||k.value||s.modelValue),R=i.ref(null),L=async H=>{var N,X;const M=H.target.parentElement.parentElement;await i.nextTick();const P=M.querySelector("input");P.click(),await i.nextTick(),(N=P.change)==null||N.call(P,P),await i.nextTick(),(X=R.value)==null||X.$forceUpdate(),g.value=JSON.parse(JSON.stringify(g.value))},O=({data:H})=>i.h("span",{onclick:L},H.label);return(H,M)=>{const P=i.resolveComponent("ElCascaderPanel");return i.openBlock(),i.createElementBlock("div",Av,[i.createElementVNode("span",null,[i.renderSlot(H.$slots,"default")]),r.multiple?(i.openBlock(),i.createBlock(i.unref(A.OPopover),{key:0,visible:c.value,position:"bottom",wrapClass:"th-filter-popover",trigger:"click",anchor:!1},{target:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["filter-wrapper",S.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(uc))]),_:1})],2)]),default:i.withCtx(()=>[o.value?(i.openBlock(),i.createElementBlock("div",Nv,[i.createVNode(P,{ref_key:"aref",ref:R,expandTrigger:"hover",renderLabel:O,modelValue:g.value,"onUpdate:modelValue":M[1]||(M[1]=N=>g.value=N),style:{width:"fit-content"},options:l.value,props:{multiple:!0,expandTrigger:"hover"}},null,8,["modelValue","options"])])):(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,class:"content-wrapper","show-type":"hover","disabled-x":""},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OCheckboxGroup),{direction:"v",onChange:m,modelValue:h.value,"onUpdate:modelValue":M[0]||(M[0]=N=>h.value=N)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,N=>(i.openBlock(),i.createBlock(i.unref(A.OCheckbox),{key:N.value,value:N.value},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("span",null,null,512),[[i.unref(t),N.label]])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})),i.createVNode(i.unref(A.ODivider)),i.createElementVNode("div",Iv,[i.createVNode(i.unref(A.OLink),{onClick:I},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.reset")),1)]),_:1}),i.createVNode(i.unref(A.OLink),{onClick:_},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.confirm")),1)]),_:1})])]),_:1},8,["visible"])):(i.openBlock(),i.createBlock(i.unref(A.ODropdown),{key:1,optionPosition:"bottom",optionWrapClass:"th-filter-dropdown",modelValue:k.value,"onUpdate:modelValue":M[3]||(M[3]=N=>k.value=N)},{dropdown:i.withCtx(()=>[l.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,"disabled-x":"",style:{"max-height":"300px"},"show-type":"always"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ODropdownItem),{style:i.normalizeStyle({"--table-width":r.tableWidth}),class:i.normalizeClass([{"is-active":r.modelValue===""}]),value:"''",label:i.unref(n)("common.all"),onClick:M[2]||(M[2]=N=>T(""))},null,8,["style","class","label"]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,N=>(i.openBlock(),i.createBlock(i.unref(A.ODropdownItem),{style:i.normalizeStyle({"--table-width":r.tableWidth}),class:i.normalizeClass([{"is-active":N.value===r.modelValue}]),key:N.value,value:N.value,onClick:X=>T(N.value)},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("span",null,null,512),[[i.unref(t),N.label]])]),_:2},1032,["style","class","value","onClick"]))),128))]),_:1})):i.createCommentVNode("",!0),l.value.length?i.createCommentVNode("",!0):i.renderSlot(H.$slots,"empty",{key:1})]),default:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["filter-wrapper",S.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(uc))]),_:1})],2)]),_:3},8,["modelValue"]))],512)}}}),Ov={class:"more-text-wrapper"},Bv={key:0},Lv={key:1},Mv=i.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}=He.useI18n(),n=i.ref(!1),s=i.ref(!1),a=i.ref(0),o=i.ref(null);i.onMounted(()=>{l()}),i.watch([()=>e.text,()=>e.show],()=>{l()});const l=()=>{i.nextTick(()=>{const h=o.value;if(h){const m=document.createRange();m.setStart(h,0),m.setEnd(h,h.childNodes.length),s.value=m.getBoundingClientRect().height>h.offsetHeight+10||h.scrollHeight>h.offsetHeight+10,a.value=m.getBoundingClientRect().height||h.scrollHeight}else s.value=!1})},c=()=>{e.link&&window.open(e.text)};return(h,m)=>(i.openBlock(),i.createElementBlock("div",Ov,[i.createElementVNode("div",{class:i.normalizeClass(["more-text-content",r.link&&"is-link"]),ref_key:"contentRef",ref:o,style:i.normalizeStyle({"max-height":n.value?a.value+"px":"66px","-webkit-line-clamp":n.value?"initial":r.lines}),onClick:c},i.toDisplayString(r.text),7),s.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"more-text-btn",onClick:m[0]||(m[0]=g=>n.value=!n.value)},[n.value?(i.openBlock(),i.createElementBlock("div",Lv,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("common.collapse")),1),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronUp))]),_:1})])):(i.openBlock(),i.createElementBlock("div",Bv,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("common.expand")),1),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronDown))]),_:1})]))])):i.createCommentVNode("",!0)]))}}),Pv=He._export_sfc(Mv,[["__scopeId","data-v-15764adb"]]);var sa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Rv(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}),t}var Zs={exports:{}},Vv=Zs.exports,_c;function Fv(){return _c||(_c=1,(function(r,e){(function(t,n){r.exports=n()})(Vv,(function(){var t=1e3,n=6e4,s=36e5,a="millisecond",o="second",l="minute",c="hour",h="day",m="week",g="month",k="quarter",T="year",I="date",_="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,L={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var F=["th","st","nd","rd"],z=w%100;return"["+w+(F[(z-20)%10]||F[z]||F[0])+"]"}},O=function(w,F,z){var Q=String(w);return!Q||Q.length>=F?w:""+Array(F+1-Q.length).join(z)+w},H={s:O,z:function(w){var F=-w.utcOffset(),z=Math.abs(F),Q=Math.floor(z/60),q=z%60;return(F<=0?"+":"-")+O(Q,2,"0")+":"+O(q,2,"0")},m:function w(F,z){if(F.date()<z.date())return-w(z,F);var Q=12*(z.year()-F.year())+(z.month()-F.month()),q=F.clone().add(Q,g),Z=z-q<0,G=F.clone().add(Q+(Z?-1:1),g);return+(-(Q+(z-q)/(Z?q-G:G-q))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:g,y:T,w:m,d:h,D:I,h:c,m:l,s:o,ms:a,Q:k}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},M="en",P={};P[M]=L;var N="$isDayjsObject",X=function(w){return w instanceof U||!(!w||!w[N])},b=function w(F,z,Q){var q;if(!F)return M;if(typeof F=="string"){var Z=F.toLowerCase();P[Z]&&(q=Z),z&&(P[Z]=z,q=Z);var G=F.split("-");if(!q&&G.length>1)return w(G[0])}else{var J=F.name;P[J]=F,q=J}return!Q&&q&&(M=q),q||!Q&&M},C=function(w,F){if(X(w))return w.clone();var z=typeof F=="object"?F:{};return z.date=w,z.args=arguments,new U(z)},$=H;$.l=b,$.i=X,$.w=function(w,F){return C(w,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var U=(function(){function w(z){this.$L=b(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[N]=!0}var F=w.prototype;return F.parse=function(z){this.$d=(function(Q){var q=Q.date,Z=Q.utc;if(q===null)return new Date(NaN);if($.u(q))return new Date;if(q instanceof Date)return new Date(q);if(typeof q=="string"&&!/Z$/i.test(q)){var G=q.match(S);if(G){var J=G[2]-1||0,ie=(G[7]||"0").substring(0,3);return Z?new Date(Date.UTC(G[1],J,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ie)):new Date(G[1],J,G[3]||1,G[4]||0,G[5]||0,G[6]||0,ie)}}return new Date(q)})(z),this.init()},F.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},F.$utils=function(){return $},F.isValid=function(){return this.$d.toString()!==_},F.isSame=function(z,Q){var q=C(z);return this.startOf(Q)<=q&&q<=this.endOf(Q)},F.isAfter=function(z,Q){return C(z)<this.startOf(Q)},F.isBefore=function(z,Q){return this.endOf(Q)<C(z)},F.$g=function(z,Q,q){return $.u(z)?this[Q]:this.set(q,z)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(z,Q){var q=this,Z=!!$.u(Q)||Q,G=$.p(z),J=function(Ye,Fe){var Ze=$.w(q.$u?Date.UTC(q.$y,Fe,Ye):new Date(q.$y,Fe,Ye),q);return Z?Ze:Ze.endOf(h)},ie=function(Ye,Fe){return $.w(q.toDate()[Ye].apply(q.toDate("s"),(Z?[0,0,0,0]:[23,59,59,999]).slice(Fe)),q)},oe=this.$W,Ee=this.$M,ue=this.$D,$e="set"+(this.$u?"UTC":"");switch(G){case T:return Z?J(1,0):J(31,11);case g:return Z?J(1,Ee):J(0,Ee+1);case m:var Ie=this.$locale().weekStart||0,Oe=(oe<Ie?oe+7:oe)-Ie;return J(Z?ue-Oe:ue+(6-Oe),Ee);case h:case I:return ie($e+"Hours",0);case c:return ie($e+"Minutes",1);case l:return ie($e+"Seconds",2);case o:return ie($e+"Milliseconds",3);default:return this.clone()}},F.endOf=function(z){return this.startOf(z,!1)},F.$set=function(z,Q){var q,Z=$.p(z),G="set"+(this.$u?"UTC":""),J=(q={},q[h]=G+"Date",q[I]=G+"Date",q[g]=G+"Month",q[T]=G+"FullYear",q[c]=G+"Hours",q[l]=G+"Minutes",q[o]=G+"Seconds",q[a]=G+"Milliseconds",q)[Z],ie=Z===h?this.$D+(Q-this.$W):Q;if(Z===g||Z===T){var oe=this.clone().set(I,1);oe.$d[J](ie),oe.init(),this.$d=oe.set(I,Math.min(this.$D,oe.daysInMonth())).$d}else J&&this.$d[J](ie);return this.init(),this},F.set=function(z,Q){return this.clone().$set(z,Q)},F.get=function(z){return this[$.p(z)]()},F.add=function(z,Q){var q,Z=this;z=Number(z);var G=$.p(Q),J=function(Ee){var ue=C(Z);return $.w(ue.date(ue.date()+Math.round(Ee*z)),Z)};if(G===g)return this.set(g,this.$M+z);if(G===T)return this.set(T,this.$y+z);if(G===h)return J(1);if(G===m)return J(7);var ie=(q={},q[l]=n,q[c]=s,q[o]=t,q)[G]||1,oe=this.$d.getTime()+z*ie;return $.w(oe,this)},F.subtract=function(z,Q){return this.add(-1*z,Q)},F.format=function(z){var Q=this,q=this.$locale();if(!this.isValid())return q.invalidDate||_;var Z=z||"YYYY-MM-DDTHH:mm:ssZ",G=$.z(this),J=this.$H,ie=this.$m,oe=this.$M,Ee=q.weekdays,ue=q.months,$e=q.meridiem,Ie=function(Fe,Ze,Je,me){return Fe&&(Fe[Ze]||Fe(Q,Z))||Je[Ze].slice(0,me)},Oe=function(Fe){return $.s(J%12||12,Fe,"0")},Ye=$e||function(Fe,Ze,Je){var me=Fe<12?"AM":"PM";return Je?me.toLowerCase():me};return Z.replace(R,(function(Fe,Ze){return Ze||(function(Je){switch(Je){case"YY":return String(Q.$y).slice(-2);case"YYYY":return $.s(Q.$y,4,"0");case"M":return oe+1;case"MM":return $.s(oe+1,2,"0");case"MMM":return Ie(q.monthsShort,oe,ue,3);case"MMMM":return Ie(ue,oe);case"D":return Q.$D;case"DD":return $.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return Ie(q.weekdaysMin,Q.$W,Ee,2);case"ddd":return Ie(q.weekdaysShort,Q.$W,Ee,3);case"dddd":return Ee[Q.$W];case"H":return String(J);case"HH":return $.s(J,2,"0");case"h":return Oe(1);case"hh":return Oe(2);case"a":return Ye(J,ie,!0);case"A":return Ye(J,ie,!1);case"m":return String(ie);case"mm":return $.s(ie,2,"0");case"s":return String(Q.$s);case"ss":return $.s(Q.$s,2,"0");case"SSS":return $.s(Q.$ms,3,"0");case"Z":return G}return null})(Fe)||G.replace(":","")}))},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(z,Q,q){var Z,G=this,J=$.p(Q),ie=C(z),oe=(ie.utcOffset()-this.utcOffset())*n,Ee=this-ie,ue=function(){return $.m(G,ie)};switch(J){case T:Z=ue()/12;break;case g:Z=ue();break;case k:Z=ue()/3;break;case m:Z=(Ee-oe)/6048e5;break;case h:Z=(Ee-oe)/864e5;break;case c:Z=Ee/s;break;case l:Z=Ee/n;break;case o:Z=Ee/t;break;default:Z=Ee}return q?Z:$.a(Z)},F.daysInMonth=function(){return this.endOf(g).$D},F.$locale=function(){return P[this.$L]},F.locale=function(z,Q){if(!z)return this.$L;var q=this.clone(),Z=b(z,Q,!0);return Z&&(q.$L=Z),q},F.clone=function(){return $.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},w})(),E=U.prototype;return C.prototype=E,[["$ms",a],["$s",o],["$m",l],["$H",c],["$W",h],["$M",g],["$y",T],["$D",I]].forEach((function(w){E[w[1]]=function(F){return this.$g(F,w[0],w[1])}})),C.extend=function(w,F){return w.$i||(w(F,U,C),w.$i=!0),C},C.locale=b,C.isDayjs=X,C.unix=function(w){return C(1e3*w)},C.en=P[M],C.Ls=P,C.p={},C}))})(Zs)),Zs.exports}var $v=Fv();const Te=gr($v),{t:yc}=He.useI18n(),pt=(r=new Date,e="YYYY-MM-DD")=>{let t=r;return t||(t=new Date),Te(new Date(t)).isValid()?Te(new Date(t)).format(e):t},Sh=(r,e,t="label",n="value")=>{const s=e.find(a=>a[n]===r);return(s==null?void 0:s[t])||r},Qn=(r,e)=>r===_n?e.sort((t,n)=>{const s=Xs.findIndex(o=>o.value===t),a=Xs.findIndex(o=>o.value===n);return s-a}).map(t=>Sh(t,Xs)).join(yc("meeting.cycleSplit")):r===rn?e.join(yc("meeting.cycleSplit")):"",Uv=r=>{const e=/\d+/g,t=r.match(e)||"";return parseInt(t[0])},On=r=>{const e=r.split(":");if(e.length>3||!e.length)return 0;let t=0,n=1;for(;e.length>0;){const s=e.pop();t+=parseInt(s)*n,n*=60}return t},_o=r=>r<0?"Invalid number":r>=10?`${r}`:`0${r}`,Tc=r=>{if(r>1440*60)return"Invalid date";const e=Math.floor(r/60/60),t=Math.floor((r-e*60*60)/60),n=r%60;return`${_o(e)}:${_o(t)}:${_o(n)}`},il=r=>{const e=r.split(":"),t=e[e.length-3]?parseInt(e[e.length-3]):0,n=parseInt(e[e.length-2]),s=parseFloat(e[e.length-1]);return t*60*60+n*60+s},qv=r=>{const e=Math.floor(r/3600),t=Math.floor((r-e*3600)/60),n=Math.floor(r-e*3600-t*60);return`${e?`${e.toString().padStart(2,"0")}:`:""}${t.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`},ri=(r,e)=>{let t=r;r===Ve.ACTIVITY&&(t=Ve.EVENTS);const n=na.find(s=>s.value===t);return(n==null?void 0:n[e])||""},kh=r=>{switch(r){case"WELINK":return"WeLink";case"ZOOM":return"Zoom";case"TENCENT":return"腾讯会议";default:return r}},Hv={class:"o-meeting-detail"},jv={class:"label"},zv={key:2},Gv={key:3,class:"value"},Wv={key:0,class:"extra"},Yv={class:"label"},Xv=i.defineComponent({__name:"OMeetingDetail",props:{data:{},from:{},show:{type:Boolean}},setup(r,{expose:e}){const t=r,{t:n,locale:s}=He.useI18n();i.computed(()=>s.value===He.Locales.ZH);const a=i.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,t.from==="my"?7:8)),o=i.computed(()=>[{label:"起始日期",key:"start_date_time"},{label:"结束日期",key:"end_date_time"},{label:"报名截止时间",key:"register_end_date"},{label:"活动地点",key:"address"},{label:"活动详情地址",key:"content_url",isLink:!0},{label:"活动审批人",key:"approver"},{label:"审核备注",key:"approve_record",isRecord:!0}].slice(0,t.from==="home"?4:7)),l=i.computed(()=>[{label:"活动类型",key:"activity_type",isType:!0},{label:"活动地点",key:"address"},{label:"起始日期",key:"start_date_time"},{label:"结束日期",key:"end_date_time"},{label:"报名截止时间",key:"register_end_date"},{label:"报名网址",key:"register_url",isLink:!0},{label:"活动详情地址",key:"content_url",isLink:!0},{label:"活动审批人",key:"approver"},{label:"审核备注",key:"approve_record",isRecord:!0}]),c=i.computed(()=>t.data.type===Ve.ACTIVITY||t.data.type===Ve.EVENTS?t.page===Ve.APPROVAL?l.value:o.value:a.value),h=i.ref([]);return e({copyInfo:()=>{try{let g=`${n("meeting.meetingTopic")+t.data.topic}
4
4
  `;return g+=[...h.value].reduce((k,T)=>`${k}${T.textContent}
5
- `,""),navigator.clipboard.writeText(g),Promise.resolve()}catch(g){return Promise.reject(g)}}}),(g,k)=>(i.openBlock(),i.createElementBlock("div",Hv,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,(T,O)=>{var _,S,R;return i.openBlock(),i.createElementBlock("div",{ref_for:!0,ref_key:"domRef",ref:h,class:i.normalizeClass(["label-item",{"record-item":T.isRecord&&((_=r.data[T.key])==null?void 0:_.length),"link-item":T.isLink,"is-empty":!((S=r.data[T.key])!=null&&S.length),[`label-item_${r.data.id}`]:!0,[`type_${r.data.type}`]:!0}]),key:O},[r.data[T.key]&&!T.isRecord?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("span",jv,i.toDisplayString(T.label),1),T.ellipsis?(i.openBlock(),i.createBlock(Pv,{key:0,show:r.show,text:r.data[T.key]||"-"},null,8,["show","text"])):T.isLink?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,target:"_blank",class:"value",color:"primary","hover-underline":"",href:r.data[T.key]},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(r.data[T.key]),1)]),_:2},1032,["href"])):T.key==="platform"?(i.openBlock(),i.createElementBlock("span",zv,i.toDisplayString(i.unref(kh)(r.data[T.key])),1)):(i.openBlock(),i.createElementBlock("span",Gv,[T.extra?(i.openBlock(),i.createElementBlock("i",Wv,i.toDisplayString(r.data[T.extra]),1)):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(r.data[T.key]||"-"),1)]))],64)):i.createCommentVNode("",!0),T.isRecord&&((R=r.data[T.key])!=null&&R.length)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("span",Yv,i.toDisplayString(T.label),1),i.createElementVNode("div",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data[T.key],L=>(i.openBlock(),i.createElementBlock("p",{key:L.create_time,class:"value"},i.toDisplayString(L.reason)+"   "+i.toDisplayString(i.unref(vt)(L.create_time,"YYYY/MM/DD HH:mm:ss"))+" 审核"+i.toDisplayString(L.action===1?"通过":"驳回"),1))),128))])],64)):i.createCommentVNode("",!0)],2)}),128))]))}}),rs=He._export_sfc(Xv,[["__scopeId","data-v-16c414d3"]]),Kv={class:"o-activity-table"},Qv={key:0,class:"table-wrapper"},Zv={class:"expand-detail"},Jv={class:"sort-btn"},e_={class:"activity-btn"},t_={key:0,class:"pagination-wrapper"},i_={key:1,class:"collapse-wrapper"},n_={class:"title-top"},r_={class:"act-title"},s_={class:"act-sponsor"},a_={class:"sponsor"},o_={class:"activity-btn"},l_={class:"activity-detail"},u_={key:0,class:"pagination"},c_={class:"dialog-content"},d_={class:"dialog-content"},bc=i.defineComponent({__name:"OActivityApproval",props:{getTableDataRequest:{},applicantList:{},cancelActivityRequest:{},deleteActivityRequest:{},approveActivityRequest:{},rejectActivityRequest:{},getActivityDetailRequest:{}},setup(r){const e=A.useMessage(null),{isPhone:t,lePadV:n}=Ct.useScreen(),s=r,a=i.reactive({page:1,size:10,status:"",is_delete:0,search:"",sponsor:"",order_by:""}),o=i.ref(""),l=i.computed(()=>s.applicantList.map(me=>({value:me,label:me}))),c=()=>{a.sponsor=o.value.join(",")},h=i.ref("desc"),m=()=>{h.value=h.value==="asc"?"desc":"asc",a.order_by=h.value},g=i.ref(),k=i.computed(()=>{let me=[];return B2.forEach(_e=>{me.push(_e)}),me.slice(1)}),T=()=>{a.status=g.value,g.value==="cancel"?a.is_delete=1:a.is_delete=0},O=i.ref([]),_=i.ref(0),S=[10,20,30,40],R=async()=>{const{page:me,size:_e,status:be,sponsor:Be,order_by:it,search:he,is_delete:ce}=a;let ue={page:me,size:_e,sponsor:Be,order_by:it,search:he};if(be!=="all"&&(ue.is_delete=ce),be==="cancel"?ue.status="":ue.status=be,!s.getTableDataRequest)return;const De=await s.getTableDataRequest(ue);O.value=(De.data||[]).map(Ee=>{const{start_date:et,end_date:fe,start:ye,end:ge}=Ee;return[{...Ee,time:`${et}-${ge}`,start_date_time:`${et} ${ye}`,end_date_time:`${fe} ${ge}`,type:"activity",dateRange:`${et} ${ye}-${fe} ${ge}`}]}).flat(),_.value=De.total},L=me=>{me.pageSize!==a.size?a.page=1:a.page=me.page,a.size=me.pageSize,R()},I=i.ref({reason:""}),j=i.ref(),M=i.ref(!1),P=i.ref(null),N=i.ref(""),X=i.ref(0),b=i.ref(!1),C=i.ref({reason:[{required:!0,message:"请输入审核的备注信息"}]}),$=async()=>{var _e,be,Be;if(!s.approveActivityRequest||!s.rejectActivityRequest)return;const me=X.value===1?"审核通过":"审核驳回";try{if(M.value=!0,(await((_e=j.value)==null?void 0:_e.validate())).some(he=>!!he)){M.value=!1;return}X.value===1?await s.approveActivityRequest(P.value.id,I.value):await s.rejectActivityRequest(P.value.id,I.value),R(),U(),e.success({content:`“${(be=P.value)==null?void 0:be.title}”活动${me}成功`})}catch{b.value=!1,M.value=!1,e.danger({content:`“${(Be=P.value)==null?void 0:Be.title}”活动${me}失败`})}},U=()=>{b.value=!1,w.value=!1,M.value=!1,I.value.reason=""},E=async()=>{var me,_e;if(s.deleteActivityRequest&&s.cancelActivityRequest)try{M.value=!0,Z.value===1?await s.cancelActivityRequest(P.value.id,I.value):await s.deleteActivityRequest(P.value.id,I.value),R(),U(),e.success({content:`“${(me=P.value)==null?void 0:me.title}”活动${G.value}成功`})}catch(be){console.log(be),M.value=!1,w.value=!1,e.danger({content:`“${(_e=P.value)==null?void 0:_e.title}”活动${G.value}失败`})}},w=i.ref(!1),F=i.ref(""),G=i.ref(""),Z=i.ref(0),q=me=>{F.value="删除活动",G.value="删除",P.value=me,Z.value=0,w.value=!0},H=me=>{F.value="取消活动",G.value="取消",P.value=me,Z.value=1,w.value=!0},Q=me=>{P.value=me,N.value="审核通过",X.value=1,b.value=!0},J=me=>{P.value=me,N.value="审核驳回",X.value=0,b.value=!0},re=i.ref([]),de=i.ref([]),Ce=me=>{if(!s.getActivityDetailRequest)return;re.value.includes(me)||(re.value.push(me),s.getActivityDetailRequest(me).then(be=>{var Be;(Be=O.value)==null||Be.forEach(it=>{it.id===be.id&&(it.approve_record=be.approve_record,it.approver=be.approver)})}));const _e=de.value.indexOf(me);de.value.includes(me)?de.value.splice(_e,1):de.value.push(me)},le=me=>{Ce(me.id)},$e=me=>me.id,Ie=i.ref([]),Oe=me=>{me.length&&me.forEach(_e=>{Ce(_e)})},Ye=i.ref({}),Fe=(me,_e)=>{me&&_e&&(Ye.value[_e]=me)};i.onMounted(()=>{R()}),i.watch(()=>[a.status,a.sponsor,a.order_by,a.search,a.is_delete],()=>{R()},{deep:!0});const Ze=i.computed(()=>[{id:"confirm",loading:M.value,color:"primary",variant:n.value?"text":"solid",round:"pill",size:"large",label:"确定",onClick:()=>{E()}},{id:"cancel",color:"primary",variant:n.value?"text":"outline",round:"pill",size:"large",label:"取消",onClick:()=>{U()}}]),Je=i.computed(()=>[{id:"confirm",loading:M.value,color:"primary",variant:n.value?"text":"solid",round:"pill",size:"large",label:"确定",onClick:()=>{$()}},{id:"cancel",color:"primary",variant:n.value?"text":"outline",round:"pill",size:"large",label:"取消",onClick:()=>{U()}}]);return(me,_e)=>(i.openBlock(),i.createElementBlock("div",Kv,[i.unref(t)?(i.openBlock(),i.createElementBlock("div",i_,[i.createVNode(i.unref(A.OCollapse),{modelValue:Ie.value,"onUpdate:modelValue":_e[2]||(_e[2]=be=>Ie.value=be),accordion:i.unref(t),onChange:Oe},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,(be,Be)=>{var it;return i.openBlock(),i.createElementBlock(i.Fragment,{key:be.id},[i.createElementVNode("div",n_,[i.createElementVNode("p",r_,i.toDisplayString(be.title),1),be.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(it=i.unref(Wn).get(be.status))==null?void 0:it.id}`])},{default:i.withCtx(()=>{var he;return[i.createTextVNode(i.toDisplayString((he=i.unref(Wn).get(be.status))==null?void 0:he.text),1)]}),_:2},1032,["class"])):(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:i.withCtx(()=>[..._e[14]||(_e[14]=[i.createTextVNode("已取消",-1)])]),_:1}))]),i.createVNode(i.unref(A.OCollapseItem),{value:be.id},{title:i.withCtx(()=>[i.createElementVNode("div",s_,[i.createElementVNode("p",a_,i.toDisplayString(be.sponsor),1),i.createElementVNode("p",null,i.toDisplayString(i.unref(tt.dayjs)(be.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),i.createElementVNode("div",o_,[be.status===7||be.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",variant:"text",onClick:i.withModifiers(he=>q(be),["stop"])},{default:i.withCtx(()=>[..._e[15]||(_e[15]=[i.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(be.status===3||be.status===4)&&be.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",variant:"text",onClick:i.withModifiers(he=>H(be),["stop"])},{default:i.withCtx(()=>[..._e[16]||(_e[16]=[i.createTextVNode(" 取消活动 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),be.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",variant:"text",onClick:i.withModifiers(he=>Q(be),["stop"])},{default:i.withCtx(()=>[..._e[17]||(_e[17]=[i.createTextVNode(" 通过 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),be.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",variant:"text",onClick:i.withModifiers(he=>J(be),["stop"])},{default:i.withCtx(()=>[..._e[18]||(_e[18]=[i.createTextVNode(" 驳回 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),default:i.withCtx(()=>[i.createElementVNode("div",l_,[i.createVNode(rs,{show:Ie.value.includes(be.id),data:be,ref_for:!0,ref:he=>Fe(he,be.id),page:"approval"},null,8,["show","data"])])]),_:2},1032,["value"])],64)}),128))]),_:1},8,["modelValue","accordion"]),_.value>S[0]?(i.openBlock(),i.createElementBlock("div",u_,[i.createVNode(i.unref(A.OPagination),{total:_.value,page:a.page,"page-size":a.size,"page-sizes":S,layout:["total","jumper","pager","pagesize"],"show-more":!1,simple:!0,onChange:L},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",Qv,[i.createVNode(i.unref(tt.ElTable),{data:O.value,onExpandChange:le,"row-key":$e,"expand-row-keys":de.value},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElTableColumn),{type:"expand"},{default:i.withCtx(be=>[i.createElementVNode("div",Zv,[i.createVNode(rs,{data:be.row,page:"approval",show:""},null,8,["data"])])]),_:1}),i.createVNode(i.unref(tt.ElTableColumn),{label:"活动名称",prop:"title"}),i.createVNode(i.unref(tt.ElTableColumn),{prop:"sponsor"},{header:i.withCtx(()=>[i.createVNode(vc,{modelValue:o.value,"onUpdate:modelValue":_e[0]||(_e[0]=be=>o.value=be),onConfirm:c,list:l.value,multiple:!0},{empty:i.withCtx(()=>[i.renderSlot(me.$slots,"filter-empty")]),default:i.withCtx(()=>[_e[6]||(_e[6]=i.createTextVNode(" 申请人 ",-1))]),_:3},8,["modelValue","list"])]),_:3}),i.createVNode(i.unref(tt.ElTableColumn),{prop:"create_time"},{header:i.withCtx(()=>[i.createElementVNode("div",{class:"sort-time",onClick:m},[_e[7]||(_e[7]=i.createElementVNode("span",null,"申请时间",-1)),i.createElementVNode("div",Jv,[i.createElementVNode("div",{class:i.normalizeClass(["sort-asc sort-item",{active:h.value==="asc"}])},null,2),i.createElementVNode("div",{class:i.normalizeClass(["sort-desc sort-item",{active:h.value==="desc"}])},null,2)])])]),default:i.withCtx(be=>[i.createTextVNode(i.toDisplayString(i.unref(tt.dayjs)(be.row.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),_:1}),i.createVNode(i.unref(tt.ElTableColumn),{prop:"status",width:"90px"},{header:i.withCtx(()=>[i.createVNode(vc,{modelValue:g.value,"onUpdate:modelValue":_e[1]||(_e[1]=be=>g.value=be),onConfirm:T,list:k.value},{empty:i.withCtx(()=>[i.renderSlot(me.$slots,"filter-empty")]),default:i.withCtx(()=>[_e[8]||(_e[8]=i.createTextVNode(" 状态 ",-1))]),_:3},8,["modelValue","list"])]),default:i.withCtx(be=>{var Be;return[be.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(Be=i.unref(Wn).get(be.row.status))==null?void 0:Be.id}`])},{default:i.withCtx(()=>{var it;return[i.createTextVNode(i.toDisplayString((it=i.unref(Wn).get(be.row.status))==null?void 0:it.text),1)]}),_:2},1032,["class"])):(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:i.withCtx(()=>[..._e[9]||(_e[9]=[i.createTextVNode("已取消",-1)])]),_:1}))]}),_:3}),i.createVNode(i.unref(tt.ElTableColumn),{label:"操作"},{default:i.withCtx(be=>[i.createElementVNode("div",e_,[be.row.status===7||be.row.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",onClick:Be=>q(be.row)},{default:i.withCtx(()=>[..._e[10]||(_e[10]=[i.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(be.row.status===3||be.row.status===4)&&be.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",onClick:Be=>H(be.row)},{default:i.withCtx(()=>[..._e[11]||(_e[11]=[i.createTextVNode(" 取消活动 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),be.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",onClick:Be=>Q(be.row)},{default:i.withCtx(()=>[..._e[12]||(_e[12]=[i.createTextVNode(" 通过 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),be.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",onClick:Be=>J(be.row)},{default:i.withCtx(()=>[..._e[13]||(_e[13]=[i.createTextVNode(" 驳回 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),_:1})]),_:3},8,["data","expand-row-keys"]),_.value>S[0]?(i.openBlock(),i.createElementBlock("div",t_,[i.createVNode(i.unref(A.OPagination),{total:_.value,page:a.page,"page-size":a.size,"page-sizes":S,layout:["total","jumper","pager","pagesize"],"show-more":!1,onChange:L},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])),i.createVNode(i.unref(A.ODialog),{visible:b.value,"onUpdate:visible":_e[4]||(_e[4]=be=>b.value=be),"phone-half-full":i.unref(n),"main-class":"handle-dialog-approval review-dialog",actions:Je.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(N.value),1)]),default:i.withCtx(()=>[i.createElementVNode("div",c_,[i.createVNode(i.unref(A.OForm),{model:I.value,ref_key:"formRef",ref:j,"has-required":"",layout:"v",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:C.value.reason,label:"审核备注:",field:"reason"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:"请输入审核的备注信息",rows:4,resize:"none","max-length":1e3,"input-on-outlimit":!1,modelValue:I.value.reason,"onUpdate:modelValue":_e[3]||(_e[3]=be=>I.value.reason=be)},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["model"])])]),_:1},8,["visible","phone-half-full","actions"]),i.createVNode(i.unref(A.ODialog),{visible:w.value,"onUpdate:visible":_e[5]||(_e[5]=be=>w.value=be),"phone-half-full":i.unref(n),"main-class":"handle-dialog-approval cancel-dialog",actions:Ze.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(F.value),1)]),default:i.withCtx(()=>{var be;return[i.createElementVNode("div",d_," 是否确认"+i.toDisplayString(G.value)+"“"+i.toDisplayString((be=P.value)==null?void 0:be.title)+"”活动?"+i.toDisplayString(G.value)+"后将不在会议首页呈现。 ",1)]}),_:1},8,["visible","phone-half-full","actions"])]))}}),h_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"32",viewBox:"0 0 30 32"};function f_(r,e){return i.openBlock(),i.createElementBlock("svg",h_,[...e[0]||(e[0]=[i.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 Ll={name:"meeting-icon-copy",render:f_},p_={class:"o-my-activity-calendar"},m_={class:"activity-list"},g_={key:0,class:"list-calendar-mb"},v_={class:"left-calendar"},__=["onClick"],y_={class:"date-cell-text"},T_={class:"right-meeting"},b_={class:"list-body"},x_=["id"],C_={class:"item-header-left"},E_={class:"act-icon"},S_={class:"header-info"},k_={class:"title-text"},w_={class:"act-info"},D_={class:"date-range"},A_={key:0,class:"item-header-right"},N_={class:"activity-detail"},I_={key:0,class:"activity-btn"},O_={key:0,class:"load-text"},B_={class:"dialog-content"},L_={class:"dialog-content"},xc=i.defineComponent({__name:"OMyActivityCalendar",props:{getListRequest:{},revokeActivityRequest:{},deleteActivityRequest:{},editActivityRequest:{},getActivityDetailRequest:{}},emits:["edit"],setup(r,{emit:e}){const t=A.useMessage(null),{isPhone:n}=Ct.useScreen(),s=r,a=e,o=i.ref([]),l=i.ref([]),c=i.ref(1),h=i.ref(50),m=i.ref(null),g=i.ref(!1),k=i.ref([]),T=i.ref(!1),O=i.ref(!1),_=i.computed(()=>l.value.length<m.value||m.value===null),S=async()=>{if(s.getListRequest&&!T.value)try{if(m.value>0&&(c.value-1)*h.value>m.value)return;if(!_.value&&n.value){E("next-month");return}T.value=!0;const he=await s.getListRequest({page:c.value,size:h.value}),ce=(he.data||[]).map(ue=>{const{start_date:De,end_date:Ee,start:et,end:fe}=ue;return[{...ue,time:`${De}-${fe}`,start_date_time:`${De} ${et}`,end_date_time:`${Ee} ${fe}`,type:"activity",dateRange:`${De} ${et}-${Ee} ${fe}`,isExpired:Te(`${De} ${et}`).isBefore(Te())}]}).flat().filter(ue=>ue.start_date.slice(0,7)===vt(X.value,"YYYY-MM-DD").slice(0,7));g.value?(l.value=he.data||[],o.value=ce):c.value===1&&!n.value?(l.value=he.data||[],o.value=ce):(l.value=[...l.value,...he.data||[]],o.value=[...o.value,...ce]),o.value.sort((ue,De)=>ue.start_date===De.start_date?On(ue.start)>On(De.start)?1:-1:Te(ue.start_date).isAfter(Te(De.start_date))?1:-1),m.value=(he==null?void 0:he.total)||0,i.nextTick(()=>{$(),Z.value&&!n.value&&P()})}finally{T.value=!1,O.value=!1,g.value=!1}},R=i.ref([]),L=he=>{s.getActivityDetailRequest&&(R.value.includes(he)||(R.value.push(he),s.getActivityDetailRequest(he).then(ce=>{var ue;(ue=o.value)==null||ue.forEach(De=>{De.id===ce.id&&(De.approve_record=ce.approve_record)})})))},I=he=>{he.length&&he.forEach(ce=>{L(ce)})},j=he=>{const ce=o.value.filter(ue=>ue.start_date===he);return ce.length&&ce.every(ue=>ue.status===3||ue.status===4)},M=he=>{const ce=he.target;if(!ce)return;const ue=ce.scrollTop,De=ce.scrollHeight,Ee=ce.clientHeight;ue+Ee>=De&&H()},P=()=>{Z.value.getContainerEl().addEventListener("scroll",M)},N=i.ref(),X=i.ref(),b=i.computed(()=>[...new Set(o.value.map(he=>he.start_date))].sort((he,ce)=>Te(he).isBefore(Te(ce))?-1:1)),C=i.computed(()=>[...new Set(o.value.filter(he=>!he.isExpired&&!he.is_delete).map(he=>he.start_date))].sort((he,ce)=>Te(he).isBefore(Te(ce))?-1:1)),$=()=>{var ue;const he=C.value.find(De=>!Te(De).isBefore(Te(new Date).format("YYYY-MM-DD")));he?X.value=he:X.value||(X.value=Te().format("YYYY-MM-DD")),(ue=N.value)==null||ue.pickDay(Te(X.value)),X.value=Te(X.value).format("YYYY-MM-DD");const ce=o.value.find(De=>De.start_date===X.value&&!De.isExpired&&!De.is_delete);ce&&(L(ce.id),k.value=[ce.id])},U=(he,ce)=>{var ue;(!ce||!((ue=he.target)!=null&&ue.className.includes("date-cell-text")))&&(he.stopPropagation(),he.preventDefault())},E=he=>{N.value&&(c.value=1,m.value=null,R.value=[],window.scrollTo({top:0,behavior:"smooth"}),N.value.selectDate(he),g.value=!0,i.nextTick(()=>{X.value=Te(N.value.selectedDay).format("YYYY-MM-DD"),S()}))},w=i.computed(()=>o.value.reduce((he,ce)=>{if(he.length){const ue=he.at(-1);return(ue==null?void 0:ue.start_date)===ce.start_date?ue==null||ue.list.push(ce):he.push({start_date:ce.start_date,list:[ce]}),he}else return[{start_date:ce.start_date,list:[ce]}]},[])),F=i.ref({}),G=(he,ce)=>{he&&ce&&(F.value[ce]=he)},Z=i.ref(),q=he=>{var De,Ee,et;const ce=Te(he).format("YYYY-MM-DD"),ue=document.querySelector(`#group-title-${ce}`);ue&&(n.value?window.scrollTo({top:(((De=ue.parentElement)==null?void 0:De.offsetTop)||0)-52,behavior:"smooth"}):(et=Z.value)==null||et.scrollTo({top:((Ee=ue.parentElement)==null?void 0:Ee.offsetTop)||0,behavior:"smooth"}))};i.watch(()=>X.value,()=>{q(X.value)});const H=zi.useDebounceFn(()=>{_.value&&(n.value||(O.value=!0,c.value++,S()))},200),Q=i.ref(!1),J=i.ref(null),re=i.ref(!1),de=he=>{J.value=he,re.value=!0},Ce=()=>{var he;s.revokeActivityRequest&&(Q.value=!0,s.revokeActivityRequest((he=J.value)==null?void 0:he.id).then(()=>{t.success({content:`“${J.value.title}”活动撤销审核成功`}),g.value=!0,S()}).catch(()=>{t.danger({content:`“${J.value.title}”活动撤销审核失败`})}).finally(()=>{re.value=!1,Q.value=!1}))},le=()=>{re.value=!1},$e=he=>{a("edit",he)},Ie=he=>{if(!s.editActivityRequest)return;const{title:ce,start_date:ue,end_date:De,register_end_date:Ee,activity_type:et,synopsis:fe,register_url:ye,content_url:ge,address:qe,start:Ne,end:ft,approver:Dt}=he;let pi={title:ce,start_date:ue,end_date:De,register_end_date:Ee,activity_type:et,synopsis:fe,register_url:ye,content_url:ge,address:qe,start:Ne,end:ft,approver:Dt,is_publish:"true"};s.editActivityRequest(he.id,pi).then(()=>{t.success({content:`“${he.title}”活动提交审核成功`}),g.value=!0,S()}).catch(()=>{t.danger({content:`“${he.title}”活动提交审核失败`})})},Oe=i.ref(!1),Ye=he=>{J.value=he,Oe.value=!0},Fe=()=>{var he;s.deleteActivityRequest&&(Q.value=!0,s.deleteActivityRequest((he=J.value)==null?void 0:he.id).then(()=>{t.success({content:`“${J.value.title}”活动删除成功`}),g.value=!0,S()}).catch(()=>{t.danger({content:`“${J.value.title}”活动删除失败`})}).finally(()=>{Oe.value=!1,Q.value=!1}))},Ze=()=>{Oe.value=!1},Je=i.ref(),me=i.ref(0),_e=()=>{var he;me.value=((he=Je.value)==null?void 0:he.clientHeight)||0},be=zi.useDebounceFn(()=>{if(!_.value||!n.value)return;const he=window.scrollY||window.pageYOffset,ce=window.innerHeight;document.documentElement.scrollHeight-(he+ce)<=300&&!T.value&&(O.value=!0,c.value++,S())},200);i.onMounted(()=>{S(),window.addEventListener("scroll",be),window.addEventListener("resize",be),_e(),window.addEventListener("resize",_e)}),i.onUnmounted(()=>{var ce;window.removeEventListener("scroll",be),window.removeEventListener("resize",be),window.removeEventListener("resize",_e);const he=(ce=Z.value)==null?void 0:ce.getContainerEl();he==null||he.removeEventListener("scroll",M)});const Be=i.computed(()=>[{id:"confirm",loading:Q.value,color:"primary",variant:"outline",round:"pill",size:"large",label:"确定",onClick:()=>{Ce()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:"取消",onClick:()=>{le()}}]),it=i.computed(()=>[{id:"confirm",loading:Q.value,color:"primary",variant:"outline",round:"pill",size:"large",label:"确定",onClick:()=>{Fe()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:"取消",onClick:()=>{Ze()}}]);return(he,ce)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",p_,[i.createElementVNode("div",m_,[i.unref(n)?(i.openBlock(),i.createElementBlock("div",g_,[i.createElementVNode("span",null,i.toDisplayString((X.value?i.unref(Te)(new Date(X.value)):i.unref(Te)()).format("YYYY MM月")),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:ce[0]||(ce[0]=ue=>E("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ce[1]||(ce[1]=ue=>E("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])])):i.createCommentVNode("",!0),i.createElementVNode("div",v_,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendarRef",ref:N},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString((X.value?i.unref(Te)(new Date(X.value)):i.unref(Te)()).format("YYYY MM月")),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:ce[2]||(ce[2]=ue=>E("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ce[3]||(ce[3]=ue=>E("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:ue})=>[i.createElementVNode("div",{onClick:De=>U(De,b.value.includes(ue.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":ue.isSelected,"is-today":i.unref(vt)(ue.day)===i.unref(vt)(),clickable:b.value.includes(ue.day),approved:j(ue.day)})},[i.createElementVNode("div",y_,i.toDisplayString(Number(ue.day.split("-")[2])),1)],10,__)]),_:1},512)]),i.createElementVNode("div",T_,[o.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:Z,onScrollend:i.unref(H),style:i.normalizeStyle({"--header-height":me.value}),"show-type":"hover",class:"scroller-container"},{default:i.withCtx(()=>[i.createElementVNode("div",b_,[i.createVNode(i.unref(A.OCollapse),{modelValue:k.value,"onUpdate:modelValue":ce[6]||(ce[6]=ue=>k.value=ue),accordion:i.unref(n),onChange:I},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(w.value,(ue,De)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:ue.start_date},[De===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ce[4]||(ce[4]=Ee=>E("prev-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1}),ce[9]||(ce[9]=i.createElementVNode("span",null,"上个月",-1))])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["act-item",De===w.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"act-bar":!0,"is-active":i.unref(Te)(X.value).format("YYYY-MM-DD")===ue.start_date,"is-end":ue.list.every(Ee=>Ee.isExpired),approved:ue.list.every(Ee=>Ee.status===3||Ee.status===4)})},[...ce[10]||(ce[10]=[i.createElementVNode("div",{class:"act-bar-line"},null,-1),i.createElementVNode("div",{class:"act-bar-dot"},null,-1)])],2),i.createElementVNode("div",{class:i.normalizeClass({"group-title":!0,"is-end":ue.list.every(Ee=>Ee.isExpired)}),id:`group-title-${i.unref(Te)(new Date(ue.start_date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(Te)(ue.start_date).format("MM/DD")),11,x_),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(ue.list,(Ee,et)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:Ee.sub_id||Ee.id,value:Ee.sub_id||Ee.id,class:i.normalizeClass({"last-item":De===w.value.length-1&&et===ue.list.length-1})},{title:i.withCtx(()=>{var fe,ye;return[i.createElementVNode("div",C_,[i.createElementVNode("div",E_,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Ol))]),_:1})]),i.createElementVNode("div",S_,[i.createElementVNode("div",{class:i.normalizeClass({"act-title":!0,"is-delete":Ee.is_delete,"is-end":Ee.isExpired})},[i.createElementVNode("div",k_,i.toDisplayString(Ee.title),1),i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline",class:i.normalizeClass([`tag-${Ee.is_delete?"delete":(fe=i.unref(Wn).get(Ee.status))==null?void 0:fe.id}`])},{default:i.withCtx(()=>{var ge;return[i.createTextVNode(i.toDisplayString(Ee.is_delete===1?"已取消":(ge=i.unref(Wn).get(Ee.status))==null?void 0:ge.text),1)]}),_:2},1032,["class"])],2),i.createElementVNode("div",w_,[i.createElementVNode("span",D_,i.toDisplayString(Ee.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString((ye=i.unref(ia).get(Ee.activity_type))==null?void 0:ye.label),1)])])]),!Ee.is_delete&&[3,4,5,6].includes(Ee.status)?(i.openBlock(),i.createElementBlock("div",A_,[Ee.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:Ee.content_url,target:"_blank",rel:"noopener noreferrer"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[ce[11]||(ce[11]=i.createTextVNode(" 活动详情 ",-1))]),_:1},8,["href"])):i.createCommentVNode("",!0),Ee.status===3||Ee.status===4||Ee.status===2&&Ee.update_activity_id&&new Date(Ee.register_end_date).getTime()>new Date().getTime()?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,href:Ee.register_url,target:"_blank",rel:"noopener noreferrer"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[ce[12]||(ce[12]=i.createTextVNode(" 我要报名 ",-1))]),_:1},8,["href"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>he.copyInfo(et),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Ll))]),_:1},8,["onClick"])]}),default:i.withCtx(()=>[i.createElementVNode("div",N_,[i.createVNode(rs,{show:k.value.includes(Ee.id),data:Ee,ref_for:!0,ref:fe=>G(fe,Ee.id)},null,8,["show","data"]),!Ee.isExpired&&!Ee.is_delete?(i.openBlock(),i.createElementBlock("div",I_,[Ee.status===2?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,variant:"text",onClick:fe=>de(Ee)},{default:i.withCtx(()=>[...ce[13]||(ce[13]=[i.createTextVNode(" 撤销审核 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),Ee.status===1||Ee.status===3||Ee.status===4||Ee.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:1,variant:"text",onClick:fe=>$e(Ee)},{default:i.withCtx(()=>[...ce[14]||(ce[14]=[i.createTextVNode(" 修改活动 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),Ee.status===1||Ee.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:2,variant:"text",onClick:fe=>Ye(Ee)},{default:i.withCtx(()=>[...ce[15]||(ce[15]=[i.createTextVNode(" 删除活动 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),Ee.status===1||Ee.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:3,variant:"text",onClick:fe=>Ie(Ee)},{default:i.withCtx(()=>[...ce[16]||(ce[16]=[i.createTextVNode(" 提交审核 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ce[17]||(ce[17]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),De===w.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[O.value?(i.openBlock(),i.createElementBlock("div",O_,"加载中···")):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:ce[5]||(ce[5]=Ee=>E("next-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1}),ce[18]||(ce[18]=i.createElementVNode("span",null,"下个月",-1))])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):i.renderSlot(he.$slots,"empty",{key:1})])])]),i.createVNode(i.unref(A.ODialog),{visible:re.value,"onUpdate:visible":ce[7]||(ce[7]=ue=>re.value=ue),"main-class":"handle-dialog-active",actions:Be.value},{header:i.withCtx(()=>[...ce[19]||(ce[19]=[i.createTextVNode("撤销审核",-1)])]),default:i.withCtx(()=>[i.createElementVNode("div",B_,"是否确认要撤销“"+i.toDisplayString(J.value.title)+"”活动?撤销审核后活动将变成草稿状态。",1)]),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Oe.value,"onUpdate:visible":ce[8]||(ce[8]=ue=>Oe.value=ue),"main-class":"handle-dialog-active",actions:it.value},{header:i.withCtx(()=>[...ce[20]||(ce[20]=[i.createTextVNode("删除活动",-1)])]),default:i.withCtx(()=>[i.createElementVNode("div",L_,"是否确认删除“"+i.toDisplayString(J.value.title)+"”活动?删除后记录将不再我的个人中心呈现。",1)]),_:1},8,["visible","actions"])],64))}}),M_=Object.assign(lc,{install(r){r.component("OActivityForm",lc)}}),P_=Object.assign(bc,{install(r){r.component("OActivityApproval",bc)}}),R_=Object.assign(xc,{install(r){r.component("OMyActivityCalendar",xc)}}),V_={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 F_(r,e){return i.openBlock(),i.createElementBlock("svg",V_,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"峰会",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.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 $_={name:"events-icon-summit",render:F_},U_={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 q_(r,e){return i.openBlock(),i.createElementBlock("svg",U_,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"活动",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.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 H_={name:"events-icon-events",render:q_},j_={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 z_(r,e){return i.openBlock(),i.createElementBlock("svg",j_,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"高校 & 比赛",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.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 G_={name:"events-icon-competition",render:z_},W_={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 Y_(r,e){return i.openBlock(),i.createElementBlock("svg",W_,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"版本发布计划",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.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 X_={name:"events-icon-release",render:Y_},K_={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},Q_={events:H_,competition:G_,release:X_,summit:$_},$s={上海:"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"},Z_="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",J_={class:"o-events-calendar"},ey={key:0,class:"month-list"},ty={class:"collapse-header"},iy={class:"collapse-title"},ny={key:0,class:"collapse-desc"},ry={key:0,class:"month-content month-content-span"},sy={key:0,class:"event-location"},ay={class:"event-name"},oy={key:1},ly={key:0,class:"month-content-row"},uy={class:"month-name"},cy={class:"event-name"},dy={class:"event-location"},hy={class:"event-name"},fy={class:"event-location"},py={key:1,class:"month-content month-content-column"},my={class:"event-location"},gy={class:"event-name"},vy={key:1},Cc=i.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(r){const e=ka(),{lePadV:t}=Ct.useScreen(),n=r,s=["JAN","FEB","MAR","Apr","May","JUN","Jul","Aug","Sep","Oct","Nov","Dec"],a=i.ref([]);i.watch([()=>n.data,()=>t.value],()=>{var g;n.data.length?t.value?a.value=[(g=n.data[0])==null?void 0:g.name]:a.value=n.data.map(k=>k.name):a.value=[]},{immediate:!0});const o=g=>{const k=g.split("/");return parseInt(k[1],10)},l=g=>{const k=new Array(12).fill(0),T=[];return g.forEach((O,_)=>{const[S,R]=Array.isArray(O.date)?[o(O.date[0]),o(O.date[1])]:[o(O.date),o(O.date)];let L=0;for(let j=S-1;j<R;j++)L=Math.max(L,k[j]);const I=L+1;for(let j=S-1;j<R;j++)k[j]=I;T.push({event:O,row:I,eventIndex:_,start:S,end:R})}),T},c=g=>{const k=Array.from({length:12},()=>[]);return g.forEach(T=>{const O=Array.isArray(T.date)?o(T.date[0]):o(T.date);k[O-1].push(T)}),k},h=g=>{const k=g.color||K_[g.type];return k!=null&&k.startsWith("--")?`var(${k})`:k},m=g=>g.icon?g.icon:Q_[g.type];return(g,k)=>(i.openBlock(),i.createElementBlock("div",J_,[i.unref(t)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",ey,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(s,T=>i.createElementVNode("div",{class:"month-header",key:T},i.toDisplayString(T),1)),64))])),i.createVNode(i.unref(A.OCollapse),{modelValue:a.value,"onUpdate:modelValue":k[0]||(k[0]=T=>a.value=T)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(T,O)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:O,value:T.name},{title:i.withCtx(()=>[i.createElementVNode("div",ty,[i.createElementVNode("div",iy,[i.createElementVNode("div",{class:"title-icon",style:i.normalizeStyle({"--bg-color":h(T)})},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m(T))))]),_:2},1024)],4),i.createElementVNode("span",null,i.toDisplayString(T.name),1)]),T.desc?(i.openBlock(),i.createElementBlock("div",ny,[i.withDirectives(i.createElementVNode("div",null,null,512),[[i.unref(e),T.desc]])])):i.createCommentVNode("",!0)])]),default:i.withCtx(()=>[T.isSpanMonth?(i.openBlock(),i.createElementBlock("div",ry,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l(T.data),({event:_,row:S,eventIndex:R,start:L,end:I})=>(i.openBlock(),i.createElementBlock("div",{key:R,class:i.normalizeClass(["event-item",{"event-item-center":_.align==="center","has-link":_.link}]),style:i.normalizeStyle({gridColumn:`${L} / ${I+1}`,gridRow:S,"--bg-color":h(T)||void 0})},[_.location?(i.openBlock(),i.createElementBlock("div",sy,i.toDisplayString(_.location),1)):i.createCommentVNode("",!0),i.createElementVNode("div",ay,[_.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),i.mergeProps({key:0,href:_.link,target:"_blank"},{ref_for:!0},_.linkProps||{}),{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(_.name),1)]),_:2},1040,["href"])):(i.openBlock(),i.createElementBlock("span",oy,i.toDisplayString(_.name),1))])],6))),128))])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.unref(t)?(i.openBlock(),i.createElementBlock("div",ly,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(T.data),(_,S)=>(i.openBlock(),i.createElementBlock("div",{key:S,class:i.normalizeClass(["month-row",{"empty-month":_.length===0}])},[i.createElementVNode("div",uy,i.toDisplayString(s[S]),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(_,(R,L)=>(i.openBlock(),i.createElementBlock("div",{key:L,class:i.normalizeClass(["event-item",R.link?"has-link":""]),style:i.normalizeStyle({"--bd-color":h(T)||void 0})},[R.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:R.link,target:"_blank"},{default:i.withCtx(()=>[i.createElementVNode("div",null,[i.createElementVNode("div",cy,[i.createElementVNode("span",null,i.toDisplayString(R.name),1)]),i.createElementVNode("div",dy,i.toDisplayString(R.location),1)]),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),_:2},1032,["href"])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",hy,i.toDisplayString(R.name),1),i.createElementVNode("div",fy,i.toDisplayString(R.location),1)],64))],6))),128))],2))),128))])):(i.openBlock(),i.createElementBlock("div",py,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(T.data),(_,S)=>(i.openBlock(),i.createElementBlock("div",{key:S,class:"month-column"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(_,(R,L)=>(i.openBlock(),i.createElementBlock("div",{key:L,class:i.normalizeClass(["event-item",R.link?"has-link":""]),style:i.normalizeStyle({"--bg-color":h(T)||void 0})},[i.createElementVNode("div",my,i.toDisplayString(R.location),1),i.createElementVNode("div",gy,[R.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:R.link,target:"_blank"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(R.name),1)]),_:2},1032,["href"])):(i.openBlock(),i.createElementBlock("span",vy,i.toDisplayString(R.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var en=(r=>(r.FINISH="finish",r.ING="ing",r.ALL="",r))(en||{});const Ec=(r,e)=>new Date(r).getTime()>new Date(e).getTime(),_y={class:"o-events-list"},yy={class:"filter-wrapper"},Ty={class:"filter-left"},by={class:"list-content"},xy={class:"event-name"},Cy={class:"event-desc"},Ey={class:"event-date"},Sy={key:0,class:"event-location"},Sc=i.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(r,{emit:e}){const{t}=He.useI18n(),{lePadV:n}=Ct.useScreen(),s=r,a=[{label:t("events.statusAll"),value:en.ALL},{label:t("events.statusIng"),value:en.ING},{label:t("events.statusFinish"),value:en.FINISH}],o=e,l=i.ref(en.ALL),c=i.ref(""),h=i.ref(""),m=(O={})=>{o("search",Object.assign({page:s.page,pageSize:s.pageSize,status:l.value,keyword:h.value},O))},g=()=>{m()},k=()=>{h.value=c.value,m()},T=i.computed(()=>s.data.map(O=>({...O,status:Ec(new Date,O.date)?en.FINISH:en.ING})).sort((O,_)=>Ec(O.date,_.date)?-1:1).map(O=>{var R,L,I;const _=(I=(L=(R=O.city)==null?void 0:R.replace("市",""))==null?void 0:L.replace("中国",""))==null?void 0:I.replaceAll(" ","");let S=null;return Array.isArray($s[_])?S=$s[_][O.name.length%$s[_].length]:S=$s[_],S||(S=Z_),{...O,cover:S}}));return(O,_)=>(i.openBlock(),i.createElementBlock("div",_y,[i.createElementVNode("div",yy,[i.createElementVNode("div",Ty,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("events.status")),1),i.createVNode(i.unref(A.ORadioGroup),{modelValue:l.value,"onUpdate:modelValue":_[0]||(_[0]=S=>l.value=S),style:{"--radio-group-gap":"8px"},onChange:g},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(a,S=>i.createVNode(i.unref(A.ORadio),{key:S.value,value:S.value},{radio:i.withCtx(({checked:R})=>[i.createVNode(i.unref(A.OToggle),{checked:R},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(S.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),i.createVNode(i.unref(A.OInput),{modelValue:c.value,"onUpdate:modelValue":_[1]||(_[1]=S=>c.value=S),placeholder:i.unref(t)("events.searchPlaceholder"),onPressEnter:k,onClear:k,clearable:""},{prefix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"input-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconSearch))]),_:1})]),_:1},8,["modelValue","placeholder"])]),i.createElementVNode("div",by,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,S=>(i.openBlock(),i.createBlock(i.unref(A.OCard),{key:S.name,cover:S.cover,href:S.link},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTag),{class:"event-status"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(S.status===i.unref(en).ING?i.unref(t)("events.statusIng"):i.unref(t)("events.statusFinish")),1)]),_:2},1024),i.createElementVNode("div",xy,i.toDisplayString(S.name),1),i.createElementVNode("div",Cy,[i.createElementVNode("div",Ey,i.toDisplayString(S.date),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),S.city?(i.openBlock(),i.createElementBlock("div",Sy,i.toDisplayString(S.city),1)):i.createCommentVNode("",!0)])]),_:2},1032,["cover","href"]))),128))]),T.value.length?i.createCommentVNode("",!0):i.renderSlot(O.$slots,"empty",{key:0}),r.total>8?(i.openBlock(),i.createBlock(i.unref(A.OPagination),{key:1,page:r.page,simple:i.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"])):i.createCommentVNode("",!0)]))}}),ky={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function wy(r,e){return i.openBlock(),i.createElementBlock("svg",ky,[...e[0]||(e[0]=[i.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 Dy={name:"events-icon-checked",render:wy},Ay={class:"o-events-apply"},Ny={class:"events-apply-grid"},Iy={class:"timeline-number"},Oy={class:"number-circle"},By={class:"step-title"},Ly={class:"step-idx"},My={class:"step-desc"},Py={key:0},Ry={class:"desc-list-wrapper"},Vy={key:0,class:"desc-list-title"},Fy={class:"desc-list-content"},$y={class:"desc-list-item-title"},Uy={class:"desc-list-item-desc"},kc=i.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(r){const{isDark:e}=Ct.useTheme(),t=ka();return(n,s)=>(i.openBlock(),i.createElementBlock("div",Ay,[i.createElementVNode("div",Ny,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.steps,(a,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:o},[i.createElementVNode("div",Iy,[i.createElementVNode("div",Oy,i.toDisplayString(o+1),1)]),i.createElementVNode("div",{class:i.normalizeClass(["step-item",`step-${o+1} ${i.unref(e)?"is-dark":""}`]),style:{}},[i.createElementVNode("div",By,[i.createElementVNode("div",Ly,i.toDisplayString(o+1),1),i.createElementVNode("span",null,i.toDisplayString(a.title),1)]),i.createElementVNode("div",My,[a.desc?i.withDirectives((i.openBlock(),i.createElementBlock("div",Py,null,512)),[[i.unref(t),a.desc]]):i.createCommentVNode("",!0),i.renderSlot(n.$slots,`step${o+1}`),i.createElementVNode("div",Ry,[a.listTitle?(i.openBlock(),i.createElementBlock("div",Vy,i.toDisplayString(a.listTitle),1)):i.createCommentVNode("",!0),i.createElementVNode("div",Fy,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.list,(l,c)=>(i.openBlock(),i.createElementBlock("div",{class:"desc-list-item",key:c},[i.createElementVNode("div",$y,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Dy))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(l.title),1)]),i.createElementVNode("div",Uy,i.toDisplayString(l.desc),1)]))),128))])])]),a.img?(i.openBlock(),i.createElementBlock("div",{key:0,class:"img-wrapper",style:i.normalizeStyle({backgroundImage:`url(${a.img})`})},null,4)):i.createCommentVNode("",!0),a.imgPhone?(i.openBlock(),i.createElementBlock("div",{key:1,class:"img-wrapper-phone",style:i.normalizeStyle({backgroundImage:`url(${a.imgPhone})`})},null,4)):i.createCommentVNode("",!0)],2)],64))),128))])]))}}),qy=Object.assign(Cc,{install(r){r.component("OEventsCalendar",Cc)}}),Hy=Object.assign(Sc,{install(r){r.component("OEventsList",Sc)}}),jy=Object.assign(kc,{install(r){r.component("OEventsApply",kc)}}),zy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Gy(r,e){return i.openBlock(),i.createElementBlock("svg",zy,[...e[0]||(e[0]=[i.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 Wy={name:"components-icon-caret-left",render:Gy},Yy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Xy(r,e){return i.openBlock(),i.createElementBlock("svg",Yy,[...e[0]||(e[0]=[i.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 Ky={name:"components-icon-caret-right",render:Xy},Qy={class:"header-nav-wrap"},Zy={key:0,class:"right-icon"},Jy=["onMouseenter","onMouseleave"],e3=["id"],t3={class:"nav-text"},i3=["id","onClick"],n3={class:"nav-text"},r3={key:1,class:"right-icon"},s3=i.defineComponent({__name:"HeaderNav",props:{navData:void 0,activeIndex:void 0,hoverId:void 0},emits:["handle-mouseenter","handle-mouseleave","handle-click"],setup(r,{emit:e}){const t=e,{isDark:n}=Ct.useTheme(),s=r,a=i.ref(),o=i.ref(),l=i.ref(null),c=i.ref(!1),h=i.ref(!1),m=i.ref(),g=zi.useDebounceFn((M,P)=>{m.value=M==null?void 0:M.id,P==="mouseenter"&&t("handle-mouseenter",M),P==="mouseleave"&&(m.value="",t("handle-mouseleave",M))},100),k=M=>{t("handle-click",M)},T=()=>{h.value=!0,i.nextTick(()=>{a.value.scrollTo({left:a.value.clientWidth,behavior:"smooth"})})},O=()=>{a.value.scrollTo({left:0,behavior:"smooth"}),h.value=!1},_=()=>{var M,P;((M=a.value)==null?void 0:M.clientWidth)<((P=o.value)==null?void 0:P.clientWidth)?c.value=!0:c.value=!1};let S=0,R=0;const L=()=>R=0,I=M=>R>0?void R++:(R++,S=Date.now(),{event:"hover",properties:{module:"navigation",level1:M,target:M}}),j=M=>({properties:{module:"navigation",level1:M.label,target:M.label,steps:R,url:M.href,duration:Date.now()-S}});return i.onMounted(()=>{window.addEventListener("resize",_),i.nextTick(()=>{_(),l.value=setTimeout(()=>{_()},1e3)})}),i.onUnmounted(()=>{window.removeEventListener("resize",_),clearTimeout(l.value)}),(M,P)=>{const N=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",Qy,[i.createElementVNode("div",{class:i.normalizeClass(["header-nav",{"header-nav-scroll":h.value}])},[h.value?(i.openBlock(),i.createElementBlock("div",Zy,[i.createVNode(i.unref(A.OIcon),{onClick:O},{default:i.withCtx(()=>[i.createVNode(i.unref(Wy))]),_:1})])):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"navRef",ref:a,class:i.normalizeClass(["o-nav",{"o-nav-scroll":h.value||!c.value,dark:i.unref(n)}])},[i.createElementVNode("ul",{ref_key:"navListRef",ref:o,class:"o-nav-list",onMouseenter:L},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.navData,(X,b)=>{var C;return i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:X.id,class:i.normalizeClass({"is-selected":m.value===X.id||s.hoverId===X.id,"is-active":s.activeIndex===b}),onMouseenter:$=>i.unref(g)(X,"mouseenter"),onMouseleave:$=>i.unref(g)(X,"mouseleave")},[(C=X==null?void 0:X.children)!=null&&C.length?(i.openBlock(),i.createElementBlock("div",{key:0,id:"tour_headerNav_"+X.id,class:"nav-item"},[i.createElementVNode("span",t3,i.toDisplayString(X.label),1)],8,e3)):(i.openBlock(),i.createElementBlock("div",{key:1,id:"tour_headerNav_"+X.id,class:"nav-item item-other",onClick:$=>k(X)},[i.createElementVNode("span",n3,i.toDisplayString(X.label),1),X.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(X.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,i3))],42,Jy)),[[N,I(X.label),"mouseenter"],[N,j(X),void 0,{catchBubble:!0}]])}),128))],544)],2),c.value&&!h.value?(i.openBlock(),i.createElementBlock("div",r3,[i.createVNode(i.unref(A.OIcon),{onClick:T},{default:i.withCtx(()=>[i.createVNode(i.unref(Ky))]),_:1})])):i.createCommentVNode("",!0)],2)])}}}),a3=He._export_sfc(s3,[["__scopeId","data-v-a1e30870"]]),o3={class:"nav-sub-content"},l3={class:"content-left"},u3={class:"content-label"},c3={class:"content-container"},d3=["href","target"],h3={class:"item-name"},f3={key:0,class:"desc-container"},p3=["title"],m3={key:0,class:"split-line"},g3={key:1,class:"content-right"},v3={class:"content-label"},_3=["href","target"],y3=["href","target"],T3=["src"],b3={class:"review-content"},x3={class:"review-label"},C3={class:"review-property"},E3=i.defineComponent({__name:"HeaderContent",props:{itemData:void 0,itemVisible:void 0,community:void 0,bgLeft:void 0,bgRight:void 0,hoverIndex:void 0},emits:["handle-mouseenter-sub","handle-mouseleave-sub"],setup(r,{emit:e}){const t=e,n=r,{locale:s}=Ct.useLocale(),{theme:a}=Ct.useTheme(),o=i.ref(!1),l=()=>{var T;t("handle-mouseenter-sub",(T=n.itemData)==null?void 0:T.id),o.value=!0},c=()=>{t("handle-mouseenter-sub",""),o.value=!1},h=i.ref(!1),m=T=>{!T||!T.target||(h.value=T.target.clientHeight<T.target.scrollHeight)},g=(T,O)=>({properties:{module:"navigation",level1:T.label,level2:O.label,target:O.label,url:T.href}}),k=T=>({properties:{module:"navigation",level1:s.value==="zh"?"快捷链接":"Quick Link",level2:T.label,target:T.label,url:T.href}});return(T,O)=>{var S,R,L;const _=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",{onMouseenter:l,onMouseleave:c},[(n.itemVisible||o.value)&&((R=(S=n.itemData)==null?void 0:S.children)!=null&&R.length)?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["nav-content",[(L=n.community)==null?void 0:L.toLowerCase(),n.hoverIndex,i.unref(a),`${n.hoverIndex}-${i.unref(s)}`]])},[i.createElementVNode("div",{class:"nav-background-left",style:i.normalizeStyle({backgroundImage:`url(${n.bgLeft})`})},null,4),i.createElementVNode("div",{class:"nav-background-right",style:i.normalizeStyle({backgroundImage:`url(${n.bgRight})`})},null,4),i.createVNode(vn,null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OScroller),{class:"nav-scroller","show-type":"always",size:"small","disabled-y":""},{default:i.withCtx(()=>{var I,j,M,P,N,X,b,C;return[i.createElementVNode("div",o3,[i.createElementVNode("div",l3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((I=n.itemData)==null?void 0:I.children,($,U)=>(i.openBlock(),i.createElementBlock("div",{class:"item-sub",key:U},[i.createElementVNode("span",u3,i.toDisplayString($.label),1),i.createElementVNode("div",c3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList($.children,E=>(i.openBlock(),i.createElementBlock("div",{key:E.label,class:"content-item"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:E.href,target:(E==null?void 0:E.target)||"_self",rel:"noopener noreferrer",class:"item-label"},[i.createElementVNode("span",h3,i.toDisplayString(E.label),1),E.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(E.icon)))]),_:2},1024)):i.createCommentVNode("",!0),E.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,d3)),[[_,()=>g($,E)]]),E.description?(i.openBlock(),i.createElementBlock("div",f3,[i.createElementVNode("p",{class:"item-desc",title:h.value?E.description:null,onMouseenter:O[0]||(O[0]=w=>m(w))},i.toDisplayString(E.description),41,p3)])):i.createCommentVNode("",!0)]))),128))])]))),128))]),(M=(j=n.itemData)==null?void 0:j.shortcut)!=null&&M.length?(i.openBlock(),i.createElementBlock("div",m3)):i.createCommentVNode("",!0),(N=(P=n.itemData)==null?void 0:P.shortcut)!=null&&N.length?(i.openBlock(),i.createElementBlock("div",g3,[i.createElementVNode("span",v3,i.toDisplayString(i.unref(s)==="zh"?"快捷链接":"Quick Link"),1),(X=n.itemData)!=null&&X.withPicture?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList((C=n.itemData)==null?void 0:C.shortcut,$=>i.withDirectives((i.openBlock(),i.createElementBlock("a",{key:$.label,href:$.href,target:($==null?void 0:$.target)||"_self",rel:"noopener noreferrer",class:"review"},[i.createElementVNode("img",{src:$.picture,class:"review-picture"},null,8,T3),i.createElementVNode("div",b3,[i.createElementVNode("p",x3,i.toDisplayString($.label),1),i.createElementVNode("div",C3,[i.createElementVNode("span",null,i.toDisplayString($.remark),1)])])],8,y3)),[[_,()=>k($)]])),128)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList((b=n.itemData)==null?void 0:b.shortcut,$=>(i.openBlock(),i.createElementBlock("div",{key:$.label,class:"shortcut"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:$.href,target:($==null?void 0:$.target)||"_self",rel:"noopener noreferrer",class:"shortcut-link"},[i.createElementVNode("span",null,i.toDisplayString($.label),1),$.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent($.icon)))]),_:2},1024)):i.createCommentVNode("",!0)],8,_3)),[[_,()=>k($)]])]))),128))])):i.createCommentVNode("",!0)])]}),_:1})]),_:1})],2)):i.createCommentVNode("",!0)],32)}}}),S3=He._export_sfc(E3,[["__scopeId","data-v-af6c92c3"]]),k3=["id","onMouseenter","onMouseleave"],w3=["href"],D3={key:1,class:"info-wrap"},A3={class:"dropdown-wrapper"},N3={key:0,class:"tab-disabled"},I3={class:"disabled-tag"},O3={key:1,class:"tab-expand"},B3=["href","target","rel"],Hn="more",L3=i.defineComponent({__name:"HeaderUbmcNav",props:{navData:void 0,hasPerm:void 0,tagMap:void 0,currentPath:void 0},setup(r){const e=r,{locale:t}=Ct.useLocale(),{lePadV:n}=Ct.useScreen(),s={},a=i.ref({}),o=i.ref(-1),l=U=>{o.value=U},c=U=>{var E;o.value=-1,(E=a.value[U])==null||E.clearCheckedNodes()},h=i.ref(-1),m=()=>{var E;const U=(E=s==null?void 0:s.fullPath)==null?void 0:E.split("/").slice(0,3).join("/");h.value=[...O.value,T.value].findIndex(w=>{var G,Z;const F=U==null?void 0:U.indexOf("#");return N.value.length&&!N.value.includes(w.id)&&w.id!==Hn?!1:$(w.href)===U||((G=w.children)==null?void 0:G.some(q=>{var H;return(H=q.children)!=null&&H.length?q.children.some(Q=>$(Q.href)===U):$(q.href)===U}))||((Z=w.keys)==null?void 0:Z.includes(U==null?void 0:U.slice(1,F!==-1?F:U==null?void 0:U.length)))})};i.onMounted(()=>{m()}),i.watch(()=>s.path,()=>{m()});const g=(U,E)=>{let w=!0;return U&&(w=w&&new Date(U).getTime()>=Date.now()),E&&(w=w&&t.value===E),w},k=(U,E)=>U.checkPermKey?E[U.checkPermKey]:!0,T=i.computed(()=>({id:Hn,label:"更多",children:O.value.filter(U=>!N.value.includes(U.id))||[]})),O=i.computed(()=>{const U=[];let E=[];const w={meeting:e.hasPerm};try{E=e.navData.filter(F=>k(F,w)).map(function F(G){U.push(G.label);const Z={...G,_path:[...U]};return G.children&&(Z.children=G.children.filter(q=>k(q,w)).map(F)),U.pop(),Z})}catch{E=e.navData}return E});let _=0,S=0;const R=U=>{const E=Date.now()-_,w=S+1;if(_=0,S=0,U._path){const F={};return U._path.forEach((G,Z)=>{F[`level${Z+1}`]=G}),{properties:{module:"navigation",timeUsed:E,steps:w,...F}}}},L=U=>{if(S++,!_)return _=Date.now(),{event:"hover",properties:{module:"navigation",target:U.label}}},I=()=>{_=0,S=0},j=U=>U?U.startsWith("http"):!1,M=i.ref(null),P=i.ref(null),N=i.ref([]),X=i.ref(null),b=i.ref(0),C=()=>{if(!M.value)return;if(N.value=[],b.value=M.value.clientWidth,n.value&&(N.value=O.value.map(G=>G.id)),M.value.clientWidth>=P.value.clientWidth){N.value=O.value.map(G=>G.id);return}b.value=0;const U=P.value.querySelector(`li.nav-item#${Hn}`);let E=M.value.clientWidth-U.clientWidth;const w=P.value.querySelectorAll("li.nav-item");let F=!1;[...w].forEach((G,Z)=>{G.id!==Hn&&E>G.clientWidth&&!F?(E-=G.clientWidth,N.value.push(O.value[Z].id),b.value+=G.clientWidth):F=!0})};i.onMounted(()=>{window.addEventListener("resize",C),i.nextTick(()=>{C(),X.value=setTimeout(()=>{C()},1e3)})}),i.onUnmounted(()=>{window.removeEventListener("resize",C),clearTimeout(X.value)}),i.watch(()=>O.value,()=>{i.nextTick(()=>{C()})},{deep:!0});const $=U=>(U==="/"&&(U=""),j(U)?U:`/${t.value}${U}`);return(U,E)=>{const w=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("nav",{class:"header-nav-ubmc",ref_key:"wrapperRef",ref:M},[i.createElementVNode("ul",{class:"nav-list",ref_key:"listRef",ref:P,style:i.normalizeStyle({"--more-left":b.value}),onMouseleave:I},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList([...O.value,T.value],(F,G)=>{var Z;return i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:F.id,id:F.id,class:i.normalizeClass(["nav-item",{"is-selected":h.value===G,"is-active":o.value===G,hidden:!N.value.includes(F.id)&&F.id!==Hn||F.id===Hn&&F.children.length===0}]),onMouseenter:q=>l(G),onMouseleave:q=>c(G)},[!((Z=F.children)!=null&&Z.length)&&F.href?(i.openBlock(),i.createElementBlock("a",{key:0,class:"info-wrap clickable",href:$(F.href)},[i.createElementVNode("span",null,[i.createElementVNode("span",null,i.toDisplayString(F.label),1)])],8,w3)):(i.openBlock(),i.createElementBlock("div",D3,[i.createElementVNode("span",null,[i.createElementVNode("span",null,i.toDisplayString(F.label),1)]),i.createElementVNode("div",A3,[i.createVNode(i.unref(tt.ElCascaderPanel),{options:F.children,value:"id",expandTrigger:"hover",ref_for:!0,ref:q=>a.value[G]=q},{default:i.withCtx(({data:q})=>{var H;return[q.disabled?(i.openBlock(),i.createElementBlock("div",N3,[i.createElementVNode("span",null,i.toDisplayString(q.label),1),i.createElementVNode("span",I3,i.toDisplayString(i.unref(t)==="zh"?"待上线":"Coming soon"),1)])):q!=null&&q.children?(i.openBlock(),i.createElementBlock("div",O3,[i.createElementVNode("span",null,i.toDisplayString(q.label),1),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])):i.withDirectives((i.openBlock(),i.createElementBlock("a",{key:2,href:$(q.href),class:"dropdown-link",target:j(q.href)?"_blank":"_self",rel:j(q.href)?"noopener noreferrer":""},[i.createElementVNode("span",null,i.toDisplayString(q.label),1),(r.tagMap[(H=q==null?void 0:q.href)==null?void 0:H.slice(1)]||q.tag)&&g(q.tagExpire,q.tagLang)?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"danger",size:"small",round:"pill"},{default:i.withCtx(()=>{var Q;return[i.createTextVNode(i.toDisplayString(r.tagMap[(Q=q==null?void 0:q.href)==null?void 0:Q.slice(1)]||q.tag),1)]}),_:2},1024)):i.createCommentVNode("",!0),q.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,class:"jump-out-icon"},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(q.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0)],8,B3)),[[w,()=>R(q)]])]}),_:1},8,["options"])])]))],42,k3)),[[w,()=>L(F),"mouseenter"]])}),128))],36)],512)}}}),M3=He._export_sfc(L3,[["__scopeId","data-v-e34645f2"]]),P3={class:"header"},R3=["src"],V3={key:0,class:"header-nav"},F3={key:1,class:"header-nav-openubmc"},$3={key:2,class:"header-toolbar"},U3={key:0,class:"header-nav-content"},q3=i.defineComponent({__name:"OHeader",props:{logo:void 0,lang:void 0,community:void 0,navData:void 0,bgLeft:void 0,bgRight:void 0,tagMap:void 0,activeIndex:void 0},emits:["go-home","handle-click"],setup(r,{emit:e}){const{isDark:t}=Ct.useTheme(),n=e,s=r,a=i.ref(),o=i.ref(),l=i.ref(),c=i.ref(!1),h=()=>{n("go-home")},m=_=>{var S;l.value=_,a.value=_.id,(S=_==null?void 0:_.children)!=null&&S.length&&(c.value=!0)},g=_=>{c.value=!1},k=_=>{n("handle-click",_)},T=_=>{o.value=_},O=_=>{o.value=_};return(_,S)=>(i.openBlock(),i.createElementBlock("div",P3,[i.createElementVNode("div",{class:i.normalizeClass(["header-wrap",{"header-wrap-dark":i.unref(t)}])},[i.createVNode(vn,{class:"header-content"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"header-logo",onClick:h},[i.renderSlot(_.$slots,"logo",{},()=>[s.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:s.logo},null,8,R3)):i.createCommentVNode("",!0)],!0)]),s.community!=="openUBMC"?(i.openBlock(),i.createElementBlock("div",V3,[i.renderSlot(_.$slots,"nav",{},()=>[s.navData?(i.openBlock(),i.createBlock(a3,{key:0,"nav-data":s.navData,hoverId:o.value,"active-index":s.activeIndex,onHandleMouseenter:m,onHandleMouseleave:g,onHandleClick:k},null,8,["nav-data","hoverId","active-index"])):i.createCommentVNode("",!0)],!0)])):i.createCommentVNode("",!0),s.community==="openUBMC"?(i.openBlock(),i.createElementBlock("div",F3,[i.renderSlot(_.$slots,"nav",{},()=>[s.navData?(i.openBlock(),i.createBlock(M3,{key:0,"nav-data":s.navData,"has-perm":!0,"tag-map":s.tagMap},null,8,["nav-data","tag-map"])):i.createCommentVNode("",!0)],!0)])):i.createCommentVNode("",!0),_.$slots.toolbar?(i.openBlock(),i.createElementBlock("div",$3,[i.renderSlot(_.$slots,"toolbar",{},void 0,!0)])):i.createCommentVNode("",!0)]),_:3})],2),s.community!=="openUBMC"?(i.openBlock(),i.createElementBlock("div",U3,[i.createVNode(S3,{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:O},null,8,["itemData","item-visible","bg-left","bg-right","community","hover-index"])])):i.createCommentVNode("",!0)]))}}),wc=He._export_sfc(q3,[["__scopeId","data-v-821f1e91"]]),H3={class:"header-content-mb"},j3={class:"o-nav"},z3={class:"o-nav-list"},G3=["onClick"],W3={class:"nav-aside"},Y3={key:0,class:"nav-aside-wrapper"},X3=["value","title"],K3={class:"content-label"},Q3={class:"container-mobile"},Z3=["onClick"],J3={class:"item-label"},eT={class:"desc-container"},tT={class:"item-desc"},iT=["onClick"],nT={class:"item-label"},rT={key:1,class:"nav-aside-wrapper"},sT=["onClick"],aT={class:"header-tool"},oT={key:1},lT=i.defineComponent({__name:"HeaderNavMoblie",props:{menuShow:{type:Boolean,default(){return!1}},navData:void 0,codeData:void 0},emits:["link-click"],setup(r,{emit:e}){const t=r,n=i.ref(""),s=i.ref({}),a=c=>{if(c!=null&&c.href)return window.open(c==null?void 0:c.href,"_self"),!0;c?(n.value=c.id,s.value=c):(n.value="source_code",s.value=t.codeData.list)},o=e,l=(c,h)=>{window.open(c,h||"_self"),o("link-click")};return i.onMounted(()=>{n.value=t.navData[0].id,s.value=t.navData[0]}),i.watch(()=>t.navData||t.codeData,()=>{s.value=n.value==="source_code"?t.codeData.list:t.navData.find(c=>c.id===n.value)},{deep:!0}),(c,h)=>(i.openBlock(),i.createElementBlock("div",H3,[i.createElementVNode("div",{class:i.normalizeClass(["header-nav",{active:r.menuShow}])},[i.createElementVNode("div",j3,[i.createElementVNode("ul",z3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.navData,m=>(i.openBlock(),i.createElementBlock("li",{key:m.id,class:i.normalizeClass({active:n.value===m.id})},[i.createElementVNode("span",{onClick:g=>a(m)},i.toDisplayString(m.label),9,G3)],2))),128))]),i.createElementVNode("div",W3,[n.value!=="source_code"?(i.openBlock(),i.createElementBlock("ul",Y3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value.children,m=>(i.openBlock(),i.createElementBlock("li",{value:m.label,title:m.label,key:m.label,class:"nav-aside-content"},[m!=null&&m.children?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("p",K3,i.toDisplayString(m.label),1),i.createElementVNode("div",Q3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m==null?void 0:m.children,g=>(i.openBlock(),i.createElementBlock("div",{key:g.label,class:"content-container-mobile"},[i.createElementVNode("a",{onClick:k=>l(g.href,g==null?void 0:g.target),rel:"noopener noreferrer",class:"content-subtitle"},[i.createElementVNode("span",J3,i.toDisplayString(g.label),1),g.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0),g.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,Z3),i.createElementVNode("div",eT,[i.createElementVNode("p",tT,i.toDisplayString(g.description),1)])]))),128))])],64)):(i.openBlock(),i.createElementBlock("a",{key:1,onClick:g=>l(m.href,m==null?void 0:m.target),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[i.createElementVNode("span",nT,i.toDisplayString(m.label),1),m.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0),m.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(m.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,iT))],8,X3))),128))])):(i.openBlock(),i.createElementBlock("div",rT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,m=>(i.openBlock(),i.createElementBlock("a",{key:m.label,onClick:g=>l(m.href,m==null?void 0:m.target),class:"source-code-item"},[i.createElementVNode("span",null,i.toDisplayString(m.label),1),m.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0)],8,sT))),128))]))])]),i.createElementVNode("div",aT,[r.codeData?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["header-tool-code",{active:n.value==="source_code"}]),onClick:h[0]||(h[0]=m=>a(null))},i.toDisplayString(r.codeData.label),3)):i.createCommentVNode("",!0),c.$slots.tool?(i.openBlock(),i.createElementBlock("div",oT,[i.renderSlot(c.$slots,"tool",{},void 0,!0)])):i.createCommentVNode("",!0)])],2)]))}}),uT=He._export_sfc(lT,[["__scopeId","data-v-3940edc0"]]),cT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function dT(r,e){return i.openBlock(),i.createElementBlock("svg",cT,[...e[0]||(e[0]=[i.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 hT={name:"components-icon-header-menu",render:dT},fT={class:"header"},pT={key:0,class:"header-simple"},mT={class:"simple-header-left"},gT={key:0,class:"header-title"},vT={key:0,class:"simple-header-right"},_T={class:"header-left"},yT={class:"header-center"},TT=["src"],bT={class:"header-right"},xT=i.defineComponent({__name:"OHeaderMoblie",props:{logo:void 0,navData:void 0,codeData:void 0,isSimpleHeader:void 0,headerTitle:void 0},emits:["go-back","go-home"],setup(r,{emit:e}){const t=e,n=r,s=()=>{t("go-back")},a=()=>{t("go-home")},o=i.ref(!1),l=()=>{setTimeout(()=>{o.value=!o.value,document.body.style.overflow=o.value?"hidden":""},200)},c=()=>{l()};return(h,m)=>(i.openBlock(),i.createElementBlock("div",fT,[i.createVNode(vn,{class:"header-wrap"},{default:i.withCtx(()=>[r.isSimpleHeader?(i.openBlock(),i.createElementBlock("div",pT,[i.createElementVNode("div",mT,[i.createVNode(i.unref(A.OIcon),{onClick:s},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1}),r.headerTitle?(i.openBlock(),i.createElementBlock("div",gT,i.toDisplayString(r.headerTitle),1)):i.createCommentVNode("",!0)]),h.$slots.rightConfig?(i.openBlock(),i.createElementBlock("div",vT,[i.renderSlot(h.$slots,"rightConfig",{},void 0,!0)])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",_T,[i.createVNode(i.unref(A.OIcon),{onClick:l},{default:i.withCtx(()=>[o.value?(i.openBlock(),i.createBlock(i.unref(Nl),{key:1})):(i.openBlock(),i.createBlock(i.unref(hT),{key:0}))]),_:1})]),i.createVNode(uT,{ref:"mobileNav","nav-data":r.navData,"code-data":r.codeData,"menu-show":o.value,onLinkClick:c},{tool:i.withCtx(()=>[i.renderSlot(h.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","menu-show"]),i.createElementVNode("div",yT,[i.createElementVNode("div",{class:"header-logo",onClick:a},[i.renderSlot(h.$slots,"logo",{},()=>[n.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:n.logo},null,8,TT)):i.createCommentVNode("",!0)],!0)])]),i.createElementVNode("div",bT,[i.renderSlot(h.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]))}}),Dc=He._export_sfc(xT,[["__scopeId","data-v-4271939e"]]),CT=Object.assign(wc,{install(r){r.component("OEventsCalendar",wc)}}),ET=Object.assign(Dc,{install(r){r.component("OEventsList",Dc)}}),ST=["title"],kT={class:"text"},wT={key:0,class:"tag-wrapper"},DT={class:"start-time"},AT={class:"calendar-info"},wh=i.defineComponent({__name:"OMeetingCalendarList",props:{list:{default:()=>[]},groupType:{}},setup(r){const e=r,{t,locale:n}=He.useI18n(),s=i.ref([]),a=A.useMessage(),o=async k=>{await s.value[k].copyInfo(),a.success({content:t("common.copySuccess")})},l=i.ref([]),c=i.computed(()=>({SIG_GROUP:`${e.groupType===Oi.GROUP?t("meeting.groups"):t("meeting.sigs")}: `,NEW_DATE:t("meeting.latestMeeting"),EMPTY_TEXT:t("meeting.meetingEmptyText"),LEARN_MORE:t("common.seeMore"),JOIN_MEETING:t("meeting.joinMeeting"),SIGN:t("meeting.sign"),DETAILS:t("meeting.detail")})),h=i.ref(),m=new ResizeObserver(k=>{for(let T of k){const{height:O}=T.contentRect;T.target.classList.remove("hidden-divider"),O>=30&&T.target.classList.add("hidden-divider")}});i.watch(()=>e.list,()=>{e.list.length===1?l.value=[e.list[0].id]:l.value=[],i.nextTick(()=>{var k;(k=h.value)==null||k.forEach(T=>{m.observe(T)})})});const g=i.computed(()=>e.list.map(k=>{var w,F;const T=k.type;let O="";if(["activity"].includes(T)){let G=(w=ia.get(k.activity_type))==null?void 0:w.label;return k.end_date===k.start_date?{...k,activity_type:G,dateRange:`${vt(k.start_date)} ${k.start}-${k.end}`}:{...k,activity_type:G,dateRange:`${vt(k.start_date)} ${k.start}-${vt(k.end_date)} ${k.end}`}}if(["events","summit"].includes(T))return O=`${vt(k.start_date,"YYYY/MM/DD HH:mm")} ${vt(k.end_date,"YYYY/MM/DD HH:mm")}`,{...k,dateRange:O};const{is_cycle:_,date:S,start:R,end:L,cycle_start_date:I,cycle_end_date:j,cycle_start:M,cycle_end:P,cycle_type:N,cycle_interval:X,cycle_point:b}=k;O=`${vt(S)} ${R} - ${L}`,_&&(O=`${vt(I)} - ${vt(j)}`);let C=`${R} - ${L}`,$=null,U=!1;const E=((F=k.obs_data)==null?void 0:F.filter(G=>G.text_video_url))||[];if(_){let G="";N===gn&&(G=t("meeting.cycleDay")),N===_n&&(X>1?G=t("meeting.cycleWeek.other",[Qn(N,b),X]):G=t("meeting.cycleWeek.one",[Qn(N,b)])),N===rn&&(G=t("meeting.cycleMonth",[Qn(N,b)])),C=t("meeting.cycleMeetingText2",{startDate:I,endDate:j,startTime:M,endTime:P,cycleType:G}),U=E.some(Z=>{var q;return Z.sub_id===((q=k.cycle_sub.find(H=>H.date===S))==null?void 0:q.sub_id)})}else U=E.length>0;return U&&($=`${location.origin}/${n.value}/video/${k.group_name}/${k.mid}/${S}`),{...k,dateRange:O,timeRange:C,replay_url:$}}));return(k,T)=>{var O,_;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["o-meeting-calendar-list",(O=g.value)!=null&&O.length?"":"is-empty"])},[(_=g.value)!=null&&_.length?(i.openBlock(),i.createBlock(i.unref(A.OCollapse),{key:1,modelValue:l.value,"onUpdate:modelValue":T[0]||(T[0]=S=>l.value=S),style:{"--collapse-padding":"0"}},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.value,(S,R)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:S.id,value:S.id},{title:i.withCtx(()=>[i.createElementVNode("div",{class:"meet-title",title:S.topic||S.name},[i.createVNode(i.unref(A.OIcon),{style:i.normalizeStyle({backgroundColor:`${i.unref(ri)(S.type,"color")}`})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(ri)(S.type,"icon"))))]),_:2},1032,["style"]),i.createElementVNode("div",kT,i.toDisplayString(S.topic||S.name||S.title),1),S.is_cycle?(i.openBlock(),i.createElementBlock("div",wT,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],8,ST),i.createElementVNode("div",{class:"meet-info",ref_for:!0,ref_key:"meetInfoRef",ref:h},[i.createElementVNode("span",DT,[i.createElementVNode("span",null,i.toDisplayString(S.dateRange),1)]),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("div",null,[S.group_name?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(c.value.SIG_GROUP)+" "+i.toDisplayString(S.group_name),1)],64)):i.createCommentVNode("",!0),S.activity_type?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(S.activity_type),1)],64)):i.createCommentVNode("",!0)])],512),S.url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:S.url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c.value.LEARN_MORE),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),S.join_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,href:S.join_url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c.value.JOIN_MEETING),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),S.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,href:S.content_url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c.value.DETAILS),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),S.register_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,href:S.register_url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c.value.SIGN),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>o(R),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Ll))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",AT,[i.createVNode(rs,{show:l.value.includes(S.id),data:S,ref_for:!0,ref:L=>s.value[R]=L,from:"home"},null,8,["show","data"])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):i.renderSlot(k.$slots,"empty",{key:0})],2)}}}),NT={class:"o-meeting-calendar"},IT={class:"calendar-body"},OT={class:"calender-header-left"},BT={class:"left-title"},LT={class:"month-date"},MT={class:"right-title"},PT=["onClick"],RT={class:"day-box"},VT={class:"icon-box"},FT={class:"detail-list"},$T={class:"current-day"},UT={class:"right-title"},qT={class:"title-list"},HT="2021-01-01",Ac=i.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:Oi.SIG}},setup(r){i.useCssVars(H=>({v5fac6eb6:S.value}));const e=r,{t,locale:n}=He.useI18n(),s=i.computed(()=>n.value===He.Locales.EN),a=i.ref(""),o=i.ref([]),l=i.ref([]),c=i.ref([]),h=i.ref([]),m=i.ref([]),g=i.ref([]),k=i.ref([]),T=i.ref(na[0].value),O=i.computed(()=>{let H=na;return e.hiddenEvents&&(H=H.filter(Q=>Q.value!==Ve.EVENTS)),e.hiddenSummit&&(H=H.filter(Q=>Q.value!==Ve.SUMMIT)),H.filter(Q=>Q.value!==Ve.ALL).length===1?[]:H});i.watch(()=>O.value,()=>{var H;T.value=((H=O.value[0])==null?void 0:H.value)??Ve.MEETING});const _=i.ref(),S=i.ref("407px"),R=i.ref(!1),L=i.ref(""),I=i.ref(""),j=i.ref([]),M=async H=>{if(e.getSummitListRequest){const Q=await e.getSummitListRequest(H);l.value=(Q||[]).map(J=>({...J,type:"summit"}))}else l.value=[]},P=async H=>{if(e.getEventsListRequest){const Q=await e.getEventsListRequest(H);h.value=(Q||[]).map(J=>({...J,type:"activity",start_date_time:`${vt(J.start_date)} ${J.start}`,end_date_time:`${vt(J.end_date)} ${J.end}`}))}else h.value=[]},N=async H=>{e.getDateListRequest&&e.getDateListRequest(H).then(Q=>{o.value=Q}),e.getEventsDatesRequest&&e.getEventsDatesRequest(H).then(Q=>{m.value=Q}),e.getSummitDatesRequest&&e.getSummitDatesRequest(H).then(Q=>{c.value=Q})},X=async H=>{if(e.getMeetingListRequest&&H.date)try{const Q=await e.getMeetingListRequest(H.date,I.value);k.value=Q.map(J=>({...J,time:`${J.start}-${J.end}`,type:"meeting",date:J.date||H.date})).sort((J,re)=>{var de,Ce;return parseInt((de=J.start||J.cycle_start)==null?void 0:de.replace(":",""))-parseInt(re.end||((Ce=re.cycle_end)==null?void 0:Ce.replace(":","")))}),j.value=[...new Set(k.value.map(J=>J.group_name))].map(J=>({group_name:J})),j.value.find(J=>J.group_name===I.value)||(I.value="")}catch{k.value=[]}},b=i.computed(()=>[...k.value.filter(H=>!I.value||H.group_name===I.value),...h.value.filter(H=>{var Q;return!Te(H.start_date).isAfter(Te(L.value))&&!Te(L.value).isAfter(Te(H.end_date))||((Q=H.dates)==null?void 0:Q.includes(L.value))}),...l.value.filter(H=>{var Q;return(Q=H.dates)==null?void 0:Q.includes(L.value)})].filter(H=>T.value==="all"?!0:H.type===T.value)),C=async H=>{const Q=Te(H).format("YYYY-MM-DD");if(M(Q),P(Q),N(Q),g.value=[...new Set([...o.value,...c.value,...m.value])].flat().sort((J,re)=>Te(J).isAfter(Te(re))?1:-1),!H)if(!g.value.length)a.value=vt(new Date);else{let J=[...g.value].reverse().find(re=>Te().isAfter(Te(re)));J||(J=g.value.find(re=>Te(re).isAfter(Te()))),a.value=vt(J)}X({date:Q,type:T.value}),L.value=Q};i.watch([()=>T.value,()=>O.value],()=>{$()});function $(){i.nextTick(()=>{X({date:L.value,type:T.value})})}const U=zi.useDebounceFn((H,Q)=>{if(new Date(H).getTime()/1e3<1610380800){Q==null||Q.stopPropagation();return}C(H)},300),E=(H,Q)=>{if(vt(Q)===vt(HT)&&H==="prev-month"){R.value=!0;return}R.value=!1,_.value.selectDate(H),U(_.value.selectedDay)},w=H=>H.replace(/^0+(?=\d)/,""),F=H=>{new MutationObserver(function(){S.value=`${H.offsetHeight-2}px`}).observe(H,{childList:!0,subtree:!0,characterData:!0})};i.onMounted(()=>{const H=document.querySelector(".calendar-body .el-calendar__body");H&&(F(H),S.value=`${H.offsetHeight-2}px`),C()});const G=i.watch(()=>g.value.length,()=>{A.isClient&&i.nextTick(()=>{const H=document.querySelector(".is-today .out-box");H&&(H.click(),G())})}),Z=H=>s.value?H.split(" ").reverse().join(" "):H,q=(H,Q)=>H===Ve.MEETING?[Ve.ALL,Ve.MEETING].includes(T.value)&&o.value.includes(Q):H===Ve.SUMMIT?[Ve.ALL,Ve.SUMMIT].includes(T.value)&&c.value.includes(Q):H===Ve.EVENTS?[Ve.ALL,Ve.EVENTS].includes(T.value)&&m.value.includes(Q):!1;return(H,Q)=>(i.openBlock(),i.createElementBlock("div",NT,[i.createElementVNode("div",IT,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendar",ref:_,class:"calender"},{header:i.withCtx(({date:J})=>[i.createElementVNode("div",OT,[i.createElementVNode("div",BT,[i.createVNode(i.unref(A.OIcon),{onClick:re=>E("prev-month",J)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft),{class:i.normalizeClass({disable:R.value})},null,8,["class"])]),_:1},8,["onClick"]),i.createElementVNode("span",LT,i.toDisplayString(Z(J)),1),i.createVNode(i.unref(A.OIcon),{onClick:re=>E("next-month",J)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1},8,["onClick"])]),i.createVNode(i.unref(A.OSelect),{modelValue:I.value,"onUpdate:modelValue":Q[0]||(Q[0]=re=>I.value=re),placeholder:r.groupType===i.unref(Oi).GROUP?i.unref(t)("meeting.allGroups"):i.unref(t)("meeting.allSigs"),clearable:""},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(j.value,re=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:re.group_name,key:re.group_name},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(re.group_name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])]),i.createElementVNode("div",MT,[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+"  ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(a.value).format("YYYY/MM/DD")),1)])]),"date-cell":i.withCtx(({data:J})=>[i.createElementVNode("div",{class:i.normalizeClass(["out-box",{"has-calender":g.value.includes(J.day)}]),onClick:re=>i.unref(U)(J.day,re)},[i.createElementVNode("div",RT,[i.createElementVNode("p",{class:i.normalizeClass([J.isSelected?"is-selected":"","date-calender"])},i.toDisplayString(w(J.day.split("-").at(-1)||"")),3),i.createElementVNode("div",VT,[q(i.unref(Ve).MEETING,J.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"meeting",style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).MEETING,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).MEETING,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(Bl))]),_:1},8,["style"])):i.createCommentVNode("",!0),q(i.unref(Ve).EVENTS,J.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,class:"events",style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).EVENTS,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).EVENTS,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(Ol))]),_:1},8,["style"])):i.createCommentVNode("",!0),q(i.unref(Ve).SUMMIT,J.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:2,class:"summit",style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).SUMMIT,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).SUMMIT,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(Th))]),_:1},8,["style"])):i.createCommentVNode("",!0)])])],10,PT)]),_:1},512),i.createElementVNode("div",FT,[i.createElementVNode("div",$T,[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+"  ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(L.value).format("YYYY/MM/DD")),1)]),i.createElementVNode("div",UT,[i.createElementVNode("div",qT,[i.createVNode(i.unref(A.OSelect),{modelValue:I.value,"onUpdate:modelValue":Q[1]||(Q[1]=J=>I.value=J),placeholder:i.unref(t)("meeting.allSigs"),clearable:""},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(j.value,J=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:J.group_name,key:J.group_name},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(J.group_name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"]),i.createVNode(i.unref(A.OTab),{modelValue:T.value,"onUpdate:modelValue":Q[2]||(Q[2]=J=>T.value=J),line:!1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,J=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:J.value,value:J.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(J.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(J.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OScroller),{class:"meeting-list","show-type":"hover",size:"small"},{default:i.withCtx(()=>[i.createVNode(wh,{list:b.value,groupType:r.groupType},{empty:i.withCtx(()=>[i.renderSlot(H.$slots,"empty")]),_:3},8,["list","groupType"])]),_:3})])])])]))}}),jT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function zT(r,e){return i.openBlock(),i.createElementBlock("svg",jT,[...e[0]||(e[0]=[i.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 Nc={name:"meeting-icon-help",render:zT},GT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function WT(r,e){return i.openBlock(),i.createElementBlock("svg",GT,[...e[0]||(e[0]=[i.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 Ic={name:"meeting-icon-tip",render:WT},YT=i.defineComponent({__name:"OMeetingCalendarSelector",props:{modelValue:{default:()=>[]},multiple:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const{t}=He.useI18n(),n=r,s=e,a=()=>{let _=[];for(let S=1;S<=31;S++)_.push(S);return _},o=i.computed(()=>a()),l=i.ref([]),c=i.ref([]),h=i.ref(null),m=()=>{l.value=[...n.modelValue],c.value=[...n.modelValue]};i.watchEffect(()=>{m()});const g=()=>{s("update:modelValue",c.value),h.value.expanded=!1},k=()=>{m(),h.value.expanded=!1},T=_=>{if(n.multiple){const S=c.value.indexOf(_);S===-1?c.value.push(_):c.value.splice(S,1),c.value.sort()}else c.value=[_],g()},O=_=>{n.multiple?T(_):c.value=[],g()};return(_,S)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["calendar-selector",!r.multiple&&"is-single"])},[i.createVNode(i.unref(tt.ElSelect),{ref_key:"selectorRef",ref:h,"popper-class":"calendar-selector-popper",placeholder:i.unref(t)("meeting.selectRepeatDate"),size:"large",multiple:"",collapseTags:"",maxCollapseTags:"3",modelValue:l.value,onRemoveTag:O},i.createSlots({default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,R=>(i.openBlock(),i.createBlock(i.unref(tt.ElOption),{key:R,label:R,value:R,onClick:L=>T(R),class:i.normalizeClass(c.value.includes(R)&&"is-checked")},null,8,["label","value","onClick","class"]))),128))]),_:2},[r.multiple?{name:"footer",fn:i.withCtx(()=>[i.createVNode(i.unref(A.OButton),{round:"pill",color:"primary",variant:"outline",onClick:g},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.confirm")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{variant:"text",onClick:k},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.cancel")),1)]),_:1})]),key:"0"}:void 0]),1032,["placeholder","modelValue"])],2))}}),XT=He._export_sfc(YT,[["__scopeId","data-v-7b619c59"]]),KT={class:"o-meeting-form"},QT={class:"label-wrapper"},ZT={class:"o-meeting-form-popover-content etherpad"},JT={class:"repeat-config-wrapper"},eb={class:"repeat-config"},tb={class:"repeat-config-item"},ib={class:"time-select-wrapper"},nb={key:1},rb={key:1,class:"switch-wrapper"},sb={class:"switch-text"},ab={key:1,class:"switch-wrapper"},ob={class:"switch-text"},lb={class:"label-wrapper"},ub={class:"o-meeting-form-popover-content"},cb=["href"],db={key:0,class:"form-btns"},Oc=i.defineComponent({__name:"OMeetingForm",props:{data:{},isSub:{type:Boolean,default:!1},isEdit:{type:Boolean,default:!1},subId:{},createMeetingRequest:{},editMeetingRequest:{},editSubMeetingRequest:{},getPlatformsRequest:{},getGroupsRequest:{},showBtns:{type:Boolean,default:!0},groupType:{default:Oi.SIG},bookText:{}},emits:["confirm","cancel"],setup(r,{expose:e,emit:t}){const{t:n,locale:s}=He.useI18n(),a=r,o=A.useMessage(null),l=i.ref(j2),c=i.ref(Xs),h=i.computed(()=>Sh(g.value.cycle_type,l.value,"max")),m={is_record:!1,agenda:"",email_list:"",platform:"",topic:"",group_name:"",etherpad:"",date:"",date_range:[],start:"",end:"",time:"",is_cycle:!1,cycle_interval:1,cycle_type:gn,cycle_point:[]},g=i.ref(Object.assign({},m)),k=i.ref(null),T=i.ref(!1),O=i.computed(()=>({topic:[{required:!0,message:n("meeting.enterMeetingName")},{validator:U=>{if(U.length>128)return{type:"danger",message:n("meeting.meetingNameTooLong")}}}],agenda:[{validator:U=>{if(U.length>4096)return{type:"danger",message:n("meeting.meetingAgendaTooLong")}}}],group_name:[{required:!0,message:a.groupType===Oi.GROUP?n("meeting.selectGroup"):n("meeting.selectSig")}],etherpad:[{required:!0,message:n("meeting.enterEtherpad")}],date:[{required:!0,message:n("meeting.selectDate")}],time:[{validator:U=>{var Q;const{is_cycle:E,cycle_type:w,cycle_interval:F,cycle_point:G,date:Z,date_range:q}=g.value;if(E){const J={type:"danger",message:n("meeting.finishMeetingConfig")};if(w===gn&&!F||w===_n&&(!F||!(G!=null&&G.length))||w===rn&&(!F||!(G!=null&&G.length)))return J;if(!(q!=null&&q.length))return{type:"danger",message:n("meeting.selectMeetingDate")};const re=n("meeting.invalidMeetingDuration");let de=q[0];const Ce=q[1];if(w===_n){const le=new Set;for(;!Te(de).isAfter(Te(Ce));)le.add(Te(de).day()),de=Te(de).add(1,"day");if(G.every($e=>!le.has($e)))return{type:"danger",message:re}}if(w===rn){const le=new Set;for(;!Te(de).isAfter(Te(Ce));)le.add(Te(de).date()),de=Te(de).add(1,"day");if(G.every($e=>!le.has($e)))return{type:"danger",message:re}}}else if(!Z)return{type:"danger",message:n("meeting.selectMeetingDate")};if(!((Q=U==null?void 0:U.trim())!=null&&Q.length))return{type:"danger",message:n("meeting.selectMeetingTime")};const H=U.split("-").map(J=>J.split(":").map(Number));if(H[0][0]>H[1][0]||H[0][0]===H[1][0]&&H[0][1]>=H[1][1])return{type:"danger",message:n("meeting.endTimeAfterStartTime")};if(!g.value.is_cycle&&g.value.date&&g.value.start){const J=Te(`${g.value.date} ${g.value.start}`);if(new Date(J).getTime()<new Date().getTime())return{type:"danger",message:n("meeting.startTimeBeforeEndTime")}}},triggers:["blur","change"]}],platform:[{required:!0,message:n("meeting.selectPlatform")}],email_list:[{validator:U=>{if(a.isEdit)return{};const E=U.replaceAll(" ","").replaceAll(",",";")||"";if(E.length){if(E.length>1020)return{type:"danger",message:n("meeting.emailTooLong")};const w=E.split(";")||[];if(w.some(F=>!xh.test(F)))return{type:"danger",message:n("meeting.emailInvalid")};if(w.some(F=>F.length>50))return{type:"danger",message:n("meeting.singleEmailTooLong")};if(w.length>20)return{type:"danger",message:n("meeting.emailCountTooLong")}}},triggers:["blur","change"]}]})),_=i.ref([]),S=async()=>{if(!a.getGroupsRequest)return;const U=await a.getGroupsRequest();_.value=U.map(E=>({label:E.group_name,value:E.group_name,...E})),a.data&&b(g.value.group_name)},R=i.ref([]),L=async()=>{if(!a.getPlatformsRequest)return;const U=await a.getPlatformsRequest();R.value=U.map(E=>({label:kh(E),value:E})),a.data||(g.value.platform=R.value[0].value)},I=t;i.watch(()=>a.data,U=>{var E;if(U){const w=((E=U==null?void 0:U.cycle_sub)==null?void 0:E.find(Q=>Q.sub_id===a.subId))||{},{mid:F,date:G,start:Z,end:q,sub_id:H}=w;Object.assign(g.value,U,a.isSub?{is_cycle:!1,mid:F,date:G,start:Z,end:q,sub_id:H}:{})}else{const w=Te().format("YYYY-MM-DD"),F=Te().format("HH:mm");let G="",Z="";const q=On(F);if(q<=On("08:00"))G="08:00",Z="09:00";else if(On("22:15")<=q)G="08:00",Z="09:00";else{let[Q,J]=F.split(":").map(Number);J>=45?(Q++,J=0):J=(Math.floor(J/15)+1)*15,G=Tc(Q*60+J).slice(3),Z=Tc(Q*60+J+60).slice(3)}const H=[Te().format("YYYY-MM-DD"),Te().add(1,"month").format("YYYY-MM-DD")];Object.assign(g.value,{date:w,start:G,end:Z,time:`${G}-${Z}`,date_range:H})}},{immediate:!0,deep:!0});const j=()=>{g.value=Object.assign({},m),k.value.clearValidate(),k.value.resetFields(),I("cancel")},M=()=>{g.value.cycle_point=[],g.value.cycle_interval=1},P=()=>{g.value.platform="WELINK"},{lePadV:N}=Ct.useScreen(),X=async()=>{let U=a.isEdit?n("meeting.editSuccess"):n("meeting.booSuccess");try{if(T.value=!0,(await k.value.validate()).some(Fe=>!!Fe))return;const{topic:w,etherpad:F,group_name:G,platform:Z,date:q,start:H,end:Q,agenda:J,is_record:re,is_cycle:de,date_range:Ce,cycle_type:le,cycle_interval:$e,cycle_point:Ie}=g.value;let Oe={topic:w,etherpad:F,agenda:J,is_record:re,group_name:G,platform:Z,is_cycle:de};if(de?(Oe={...Oe,cycle_interval:$e,cycle_type:le,cycle_start_date:(Ce==null?void 0:Ce[0])||"",cycle_end_date:(Ce==null?void 0:Ce[1])||"",cycle_start:H,cycle_end:Q},le!==gn&&(Oe={...Oe,cycle_point:Ie.join(",")})):Oe={...Oe,date:(q==null?void 0:q.split(" ")[0])||"",start:H,end:Q},a.isEdit)if(a.isSub){const{mid:Fe,sub_id:Ze}=g.value,{date:Je,start:me,end:_e}=Oe;await(a==null?void 0:a.editSubMeetingRequest(Ze,{mid:Fe,date:Je,start:me,end:_e,is_notify:!0}))}else{const{email_list:Fe,platform:Ze,group_name:Je,etherpad:me,..._e}=Oe;await(a==null?void 0:a.editMeetingRequest(a.data.id,{..._e,is_notify:!0}))}else await(a==null?void 0:a.createMeetingRequest({...Oe,email_list:g.value.email_list.replaceAll(" ","")}));const Ye=n("meeting.meetingHandleSuccess",[g.value.topic,U]);o.success({content:Ye}),I("confirm")}finally{T.value=!1}};i.onMounted(()=>{S(),L()});const b=U=>{const E=_.value.find(w=>w.value===U);a.isEdit||(g.value.etherpad=(E==null?void 0:E.etherpad)||"",g.value.email_list=(E==null?void 0:E.email_list)||"")},C=U=>U.getTime()<Date.now()-1440*60*1e3,$=()=>{g.value.start&&g.value.end?g.value.time=`${g.value.start}-${g.value.end}`:g.value.time=""};return e({confirm:X}),(U,E)=>(i.openBlock(),i.createElementBlock("div",KT,[i.createVNode(i.unref(A.OForm),{model:g.value,ref_key:"formRef",ref:k,"has-required":"",layout:i.unref(N)?"v":"h",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:O.value.topic,label:i.unref(n)("meeting.meetingName"),field:"topic"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{disabled:r.isSub,size:"large",placeholder:i.unref(n)("meeting.enterMeetingName"),style:{width:"100%"},modelValue:g.value.topic,"onUpdate:modelValue":E[0]||(E[0]=w=>g.value.topic=w)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:O.value.group_name,label:r.groupType===i.unref(Oi).GROUP?i.unref(n)("meeting.meetingGroup"):i.unref(n)("meeting.meetingSig"),field:"group_name"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{disabled:r.isEdit,placeholder:r.groupType===i.unref(Oi).GROUP?i.unref(n)("meeting.selectGroup"):i.unref(n)("meeting.selectSig"),size:"large",style:{width:"100%"},modelValue:g.value.group_name,"onUpdate:modelValue":E[1]||(E[1]=w=>g.value.group_name=w),onChange:b},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(_.value,w=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:w.value,value:w.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),g.value.group_name?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,rules:O.value.etherpad,label:"Etherpad",field:"etherpad"},{label:i.withCtx(()=>[i.createElementVNode("div",QT,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.etherpad"))+" ",1),i.createVNode(i.unref(A.OPopover),null,{target:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Nc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",ZT,i.toDisplayString(i.unref(n)("meeting.etherpadDesc")),1)]),_:1})])]),default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{disabled:r.isEdit,size:"large",placeholder:i.unref(n)("meeting.enterEtherpad"),style:{width:"100%"},modelValue:g.value.etherpad,"onUpdate:modelValue":E[2]||(E[2]=w=>g.value.etherpad=w)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingTime"),field:"time",rules:O.value.time,class:"repeat-row",required:""},{default:i.withCtx(()=>[i.createElementVNode("div",JT,[r.isSub?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,field:"repeat",class:"repeat-item"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadioGroup),{modelValue:g.value.is_cycle,"onUpdate:modelValue":E[3]||(E[3]=w=>g.value.is_cycle=w),onChange:P,disabled:r.isEdit},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadio),{value:!1},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.nonRepeat")),1)]),_:1}),i.createVNode(i.unref(A.ORadio),{value:!0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.isRepeat")),1)]),_:1})]),_:1},8,["modelValue","disabled"])]),_:1})),i.createElementVNode("div",eb,[g.value.is_cycle?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.every"),class:"full-width-item"},{default:i.withCtx(()=>[i.createElementVNode("div",tb,[g.value.cycle_type!==i.unref(rn)?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElInputNumber),{size:"large",modelValue:g.value.cycle_interval,"onUpdate:modelValue":E[4]||(E[4]=w=>g.value.cycle_interval=w),min:1,max:h.value},null,8,["modelValue","max"])]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{size:"large",modelValue:g.value.cycle_type,"onUpdate:modelValue":E[5]||(E[5]=w=>g.value.cycle_type=w),class:"interval-select",optionWrapClass:"o-meeting-form-interval-select-options",onChange:M},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,w=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:w.value,value:w.value,label:w.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1},8,["label"]),g.value.cycle_type!==i.unref(gn)?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,label:i.unref(n)("meeting.in"),field:"cycle_point",class:"point-item"},{default:i.withCtx(()=>[g.value.cycle_type===i.unref(_n)?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",multiple:"",modelValue:g.value.cycle_point,"onUpdate:modelValue":E[6]||(E[6]=w=>g.value.cycle_point=w),placeholder:i.unref(n)("meeting.selectRepeatDate"),"max-tag-count":1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,w=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:w.value,value:w.value,label:w.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])):i.createCommentVNode("",!0),g.value.cycle_type===i.unref(rn)?(i.openBlock(),i.createBlock(XT,{key:1,modelValue:g.value.cycle_point,"onUpdate:modelValue":E[7]||(E[7]=w=>g.value.cycle_point=w)},null,8,["modelValue"])):i.createCommentVNode("",!0)]),_:1},8,["label"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingDuration"),field:"date_range"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:g.value.date_range,"onUpdate:modelValue":E[8]||(E[8]=w=>g.value.date_range=w),"start-placeholder":i.unref(n)("meeting.startDate"),"end-placeholder":i.unref(n)("meeting.endDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":C,clearable:!1,type:"daterange","popper-class":"o-meeting-form-date-picker-popper"},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"])],64)):(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:1,label:i.unref(n)("meeting.meetingDate"),field:"date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{"popper-class":"o-meeting-form-date-picker-popper",size:"large",modelValue:g.value.date,"onUpdate:modelValue":E[9]||(E[9]=w=>g.value.date=w),placeholder:i.unref(n)("meeting.selectDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":C,clearable:!1},null,8,["modelValue","placeholder"])]),_:1},8,["label"])),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingTime")},{default:i.withCtx(()=>[i.createElementVNode("div",ib,[i.createVNode(i.unref(A.OFormItem),{field:"start"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:i.unref(n)("meeting.startTime"),modelValue:g.value.start,"onUpdate:modelValue":E[10]||(E[10]=w=>g.value.start=w),size:"large",clearable:!1,onChange:$},null,8,["placeholder","modelValue"])]),_:1}),E[17]||(E[17]=i.createElementVNode("span",null,"-",-1)),i.createVNode(i.unref(A.OFormItem),{field:"end"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:i.unref(n)("meeting.endTime"),modelValue:g.value.end,"onUpdate:modelValue":E[11]||(E[11]=w=>g.value.end=w),size:"large",clearable:!1,onChange:$},null,8,["placeholder","modelValue"])]),_:1}),i.createVNode(i.unref(A.OIconTime))])]),_:1},8,["label"])])])]),_:1},8,["label","rules"]),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingPlatform"),field:"platform",rules:O.value.platform},{default:i.withCtx(()=>[r.data?(i.openBlock(),i.createElementBlock("span",nb,i.toDisplayString(g.value.platform),1)):(i.openBlock(),i.createBlock(i.unref(A.ORadioGroup),{key:0,modelValue:g.value.platform,"onUpdate:modelValue":E[12]||(E[12]=w=>g.value.platform=w),disabled:g.value.is_cycle},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(R.value,w=>(i.openBlock(),i.createBlock(i.unref(A.ORadio),{key:w.value,value:w.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled"]))]),_:1},8,["label","rules"]),i.createVNode(i.unref(A.OFormItem),{field:"agenda",label:i.unref(n)("meeting.meetingAgenda"),rules:O.value.genda},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:r.isSub,size:"large",placeholder:i.unref(n)("meeting.enterMeetingAgenda"),style:{width:"100%"},rows:4,modelValue:g.value.agenda,"onUpdate:modelValue":E[13]||(E[13]=w=>g.value.agenda=w)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label","rules"]),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingRecord"),field:"is_record",class:"record-item full-width-item"},{default:i.withCtx(()=>[i.unref(N)?(i.openBlock(),i.createBlock(i.unref(A.OSwitch),{key:0,modelValue:g.value.is_record,"onUpdate:modelValue":E[14]||(E[14]=w=>g.value.is_record=w),disabled:r.isSub},null,8,["modelValue","disabled"])):(i.openBlock(),i.createElementBlock("div",rb,[i.createVNode(i.unref(A.OSwitch),{modelValue:g.value.is_record,"onUpdate:modelValue":E[15]||(E[15]=w=>g.value.is_record=w),disabled:r.isSub},null,8,["modelValue","disabled"]),i.createElementVNode("div",sb,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Ic))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[g.value.platform])),1)])]))]),_:1},8,["label"]),i.unref(N)?(i.openBlock(),i.createElementBlock("div",ab,[i.createElementVNode("div",ob,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Ic))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[g.value.platform])),1)])])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{field:"email_list",rules:O.value.email_list},{label:i.withCtx(()=>[i.createElementVNode("div",lb,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingEmail"))+" ",1),i.createVNode(i.unref(A.OPopover),null,{target:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Nc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",ub,[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.meetingEmailDesc"))+" ",1),i.createElementVNode("a",{class:"link-text",href:`/${i.unref(s)}/sig`},i.toDisplayString(i.unref(n)("meeting.sigGroupEmail")),9,cb)])]),_:1})])]),default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:r.isEdit,size:"large",placeholder:i.unref(n)("meeting.enterEmail"),style:{width:"100%"},rows:4,modelValue:g.value.email_list,"onUpdate:modelValue":E[16]||(E[16]=w=>g.value.email_list=w)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),r.showBtns?(i.openBlock(),i.createElementBlock("div",db,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",onClick:X,loading:T.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(r.isEdit?i.unref(n)("common.save"):r.bookText||i.unref(n)("meeting.book")),1)]),_:1},8,["loading"]),i.createVNode(i.unref(A.OButton),{color:"primary",variant:"outline",size:"large",onClick:j},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.cancel")),1)]),_:1})])):i.createCommentVNode("",!0)]))}}),hb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function fb(r,e){return i.openBlock(),i.createElementBlock("svg",hb,[...e[0]||(e[0]=[i.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),i.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),i.createElementVNode("path",{fill:"#0071f3",d:"M22.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497zM1.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497z"},null,-1)])])}const pb={name:"meeting-icon-playing",render:fb},mb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function gb(r,e){return i.openBlock(),i.createElementBlock("svg",mb,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M23.399 22.031l0.116 0.099 3.68 3.672c0.365 0.364 0.365 0.955 0.001 1.32-0.328 0.328-0.839 0.361-1.204 0.1l-0.116-0.099-3.68-3.672c-0.365-0.364-0.365-0.955-0.001-1.32 0.328-0.328 0.839-0.361 1.204-0.1zM14.428 4.605c5.465 0 9.897 4.431 9.897 9.897s-4.431 9.897-9.897 9.897c-5.465 0-9.897-4.431-9.897-9.897s4.431-9.897 9.897-9.897zM14.428 6.472c-4.435 0-8.031 3.595-8.031 8.031s3.595 8.031 8.031 8.031c4.435 0 8.031-3.595 8.031-8.031s-3.595-8.031-8.031-8.031z"},null,-1)])])}const vb={name:"components-icon-search",render:gb},_b={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function yb(r,e){return i.openBlock(),i.createElementBlock("svg",_b,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M5.759 15.127c0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.016-5.016c0.1-0.1 0.254-0.115 0.37-0.043l0.054 0.043 5.062 5.062c0.273 0.273 0.717 0.273 0.99 0 0.251-0.251 0.271-0.644 0.063-0.918l-0.063-0.072-5.062-5.062c-0.629-0.629-1.628-0.662-2.296-0.099l-0.108 0.099-5.016 5.016c-0.273 0.273-0.273 0.717 0 0.99z"},null,-1)])])}const Tb={name:"components-icon-chevron-up",render:yb},bb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function xb(r,e){return i.openBlock(),i.createElementBlock("svg",bb,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M3.42 6.060c0-2.52 2.040-4.575 4.575-4.575 2.52 0 4.575 2.055 4.575 4.575s-2.055 4.575-4.575 4.575c-2.535 0-4.575-2.055-4.575-4.575zM15.015 10.47c0-1.8 1.455-3.27 3.255-3.27 1.815 0 3.27 1.47 3.27 3.27s-1.455 3.27-3.27 3.27c-1.8 0-3.255-1.47-3.255-3.27zM4.56 12.915h6.855c2.535 0 4.575 2.055 4.575 4.575 0 0.255-0.015 0.51-0.060 0.75-0.36 2.16-2.235 3.825-4.515 3.825h-6.855c-2.52 0-4.575-2.055-4.575-4.575s2.055-4.575 4.575-4.575zM17.595 17.49c0-0.75-0.135-1.455-0.375-2.115h3.51c1.8 0 3.255 1.455 3.255 3.255s-1.455 3.27-3.255 3.27h-4.995c1.155-1.125 1.86-2.685 1.86-4.41z"},null,-1)])])}const Cb={name:"meeting-icon-speaker",render:xb},Eb={class:"o-meeting-playback-subtitles"},Sb={class:"search-captions"},kb={key:0,class:"suffix-box"},wb={class:"right-handle"},Db=["onClick"],Ab={class:"info"},Nb={class:"num"},Ib={class:"speaker"},Ob={class:"start-time"},Bb={class:"text"},Lb={key:1},Mb=i.defineComponent({__name:"OMeetingPlaybackSubtitles",props:{captions:{default:()=>[]},instance:{},trackIdx:{}},setup(r){const e=ka(),t=r,{t:n}=He.useI18n(),s=i.computed(()=>t.trackIdx),a=i.ref(),o=i.ref(!1),l=()=>{o.value=!0},c=zi.useDebounceFn(()=>{o.value=!1},3e3);i.watch(()=>o.value,E=>{E&&c()});const h=i.ref([]);i.watch(()=>t.captions,()=>{h.value=t.captions||[],i.nextTick(()=>{var E;a.value&&((E=a.value)==null||E.scrollTo({top:0,behavior:"smooth"}))})},{immediate:!0,deep:!0});const m=E=>`00:${E.split(".")[0]}`.slice(-8),g=E=>{const w=E.split(":"),F=w[w.length-3]?parseInt(w[w.length-3]):0,G=parseInt(w[w.length-2]),Z=parseFloat(w[w.length-1]);return F*60*60+G*60+Z};i.onMounted(()=>{var E;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(E=a.value)==null||E.addEventListener("wheel",l)}),i.watch(()=>h.value,()=>{var E;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(E=a.value)==null||E.addEventListener("wheel",l)});const k=i.ref(0),T=()=>{},O=E=>{const w=t.instance;if(!w)return;const F=g(E);w.currentTime(F)},_=i.ref(""),S=i.ref(0),R=i.ref(0),L=i.ref([]),I=n("common.all"),j=i.computed(()=>[...new Set(t.captions.map(E=>E.speakerLabel).sort().reverse())]);i.watch(()=>s.value,()=>{var w,F;if(o.value&&_.value)return;const E=(w=a.value)==null?void 0:w.querySelectorAll(".captions-item")[s.value-1];(F=a.value)==null||F.scrollTo({top:(E==null?void 0:E.offsetTop)-16,behavior:"smooth"})}),i.onUnmounted(()=>{a.value&&a.value.removeEventListener("wheel",l)});const M=(E,w)=>{var H,Q,J,re,de,Ce;const F=document.getElementsByClassName("light-keyword")[E-1],G=document.getElementsByClassName("light-keyword")[E-w];G==null||G.classList.remove("light-keyword-active"),F==null||F.classList.add("light-keyword-active");const Z=F.offsetTop+F.offsetHeight<((H=a.value)==null?void 0:H.scrollTop),q=F.offsetTop>((Q=a.value)==null?void 0:Q.offsetHeight)+((J=a.value)==null?void 0:J.scrollTop);(Z||q)&&((Ce=a.value)==null||Ce.scrollTo({top:(de=(re=F.parentElement)==null?void 0:re.parentElement)==null?void 0:de.offsetTop,behavior:"smooth"}))},P=()=>{!S.value||R.value===1||(R.value--,M(R.value,0))},N=E=>{E!=null&&E.shiftKey||!S.value||R.value===S.value||(R.value++,M(R.value,2))},X=E=>{h.value=t.captions.filter(w=>L.value.includes(w.speakerLabel)).map(w=>({...w,contentHtml:E?w.contentHtml.replaceAll(E,`<span class="light-keyword">${E}</span>`):w.contentHtml})),i.nextTick(()=>{var F;const w=document.getElementsByClassName("light-keyword");S.value=w.length,S.value?N():(F=a.value)==null||F.scrollTo({top:0,behavior:"smooth"})})},b=zi.useDebounceFn(X,300);i.watch(()=>_.value,E=>{R.value=0,b(E)}),i.watch(()=>j.value,E=>{L.value=E},{immediate:!0});const C=i.ref(!1),$=i.ref(!1),U=E=>{$.value=!1,E?L.value=j.value:L.value=[]};return i.watch(()=>L.value,E=>{E.length===0?(C.value=!1,$.value=!1):E.length===j.value.length?(C.value=!0,$.value=!1):$.value=!0,b(_.value)},{deep:!0}),(E,w)=>(i.openBlock(),i.createElementBlock("div",Eb,[i.createElementVNode("div",Sb,[i.createVNode(i.unref(A.OInput),{modelValue:_.value,"onUpdate:modelValue":w[1]||(w[1]=F=>_.value=F),onKeydown:[i.withKeys(N,["enter"]),i.withKeys(i.withModifiers(P,["shift","stop"]),["enter"])],placeholder:i.unref(n)("meeting.searchSubtitlePlaceholder"),size:"large",class:"input-captions"},{prefix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(vb))]),_:1})]),suffix:i.withCtx(()=>[_.value?(i.openBlock(),i.createElementBlock("div",kb,[i.createElementVNode("span",null,i.toDisplayString(R.value)+"/"+i.toDisplayString(S.value),1),i.createVNode(i.unref(A.OIcon),{onClick:P},{default:i.withCtx(()=>[i.createVNode(i.unref(Tb))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:N},{default:i.withCtx(()=>[i.createVNode(i.unref(Il))]),_:1}),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createVNode(i.unref(A.OIcon),{class:"hover-close",onClick:w[0]||(w[0]=F=>_.value="")},{default:i.withCtx(()=>[i.createVNode(i.unref(Nl))]),_:1})])):i.createCommentVNode("",!0)]),_:1},8,["modelValue","onKeydown","placeholder"]),i.createElementVNode("div",wb,[i.createVNode(i.unref(tt.ElSelect),{multiple:"",modelValue:L.value,"onUpdate:modelValue":w[3]||(w[3]=F=>L.value=F),"popper-class":"speakers-selector-popper",class:"speakers-selector",placement:"bottom"},{prefix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Cb))]),_:1})]),header:i.withCtx(()=>[i.createVNode(i.unref(tt.ElCheckbox),{modelValue:C.value,"onUpdate:modelValue":w[2]||(w[2]=F=>C.value=F),indeterminate:$.value,onChange:U},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(I)),1)]),_:1},8,["modelValue","indeterminate"])]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(j.value,F=>(i.openBlock(),i.createBlock(i.unref(tt.ElOption),{key:F,label:F,value:F},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElCheckbox),{"model-value":L.value.includes(F)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(F),1)]),_:2},1032,["model-value"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),i.createVNode(i.unref(A.OTab),{modelValue:k.value,"onUpdate:modelValue":w[4]||(w[4]=F=>k.value=F),variant:"text",class:"captions-tab",onChange:T},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTabPane),{value:0,label:i.unref(n)("meeting.audioToText")},{default:i.withCtx(()=>[h.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,id:"captionsScrollDom",class:"captions-scroller","show-type":"hover",size:"small","disabled-x":""},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ORow),{gap:"0 12px",wrap:"wrap"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.value,(F,G)=>(i.openBlock(),i.createBlock(i.unref(A.OCol),{flex:"0 0 100%",key:G},{default:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["captions-item",{"captions-item-active":s.value===G+1}]),onClick:Z=>O(F.start_time)},[i.createElementVNode("div",Ab,[i.createElementVNode("div",Nb,i.toDisplayString(F.speakerIdx),1),i.createElementVNode("div",Ib,i.toDisplayString(F.speakerLabel),1),i.createElementVNode("div",Ob,i.toDisplayString(m(F.start_time)),1),s.value===G+1?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"playing initial-fill"},{default:i.withCtx(()=>[i.createVNode(i.unref(pb))]),_:1})):i.createCommentVNode("",!0)]),i.withDirectives(i.createElementVNode("div",Bb,null,512),[[i.unref(e),F.contentHtml]])],10,Db)]),_:2},1024))),128))]),_:1})]),_:1})):(i.openBlock(),i.createElementBlock("div",Lb,"111"))]),_:1},8,["label"])]),_:1},8,["modelValue"])]))}});var yo,Bc;function wa(){if(Bc)return yo;Bc=1;var r;return typeof window<"u"?r=window:typeof sa<"u"?r=sa:typeof self<"u"?r=self:r={},yo=r,yo}var Pb=wa();const W=gr(Pb),Rb={},Vb=Object.freeze(Object.defineProperty({__proto__:null,default:Rb},Symbol.toStringTag,{value:"Module"})),Fb=Rv(Vb);var To,Lc;function Dh(){if(Lc)return To;Lc=1;var r=typeof sa<"u"?sa:typeof window<"u"?window:{},e=Fb,t;return typeof document<"u"?t=document:(t=r["__GLOBAL_DOCUMENT_CACHE@4"],t||(t=r["__GLOBAL_DOCUMENT_CACHE@4"]=e)),To=t,To}var $b=Dh();const ve=gr($b);var Us={exports:{}},bo={exports:{}},Mc;function Ub(){return Mc||(Mc=1,(function(r){function e(){return r.exports=e=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var a in s)({}).hasOwnProperty.call(s,a)&&(t[a]=s[a])}return t},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})(bo)),bo.exports}var xo,Pc;function qb(){if(Pc)return xo;Pc=1,xo=e;var r=Object.prototype.toString;function e(t){if(!t)return!1;var n=r.call(t);return n==="[object Function]"||typeof t=="function"&&n!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}return xo}var Co,Rc;function Hb(){if(Rc)return Co;Rc=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.
5
+ `,""),navigator.clipboard.writeText(g),Promise.resolve()}catch(g){return Promise.reject(g)}}}),(g,k)=>(i.openBlock(),i.createElementBlock("div",Hv,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,(T,I)=>{var _,S,R;return i.openBlock(),i.createElementBlock("div",{ref_for:!0,ref_key:"domRef",ref:h,class:i.normalizeClass(["label-item",{"record-item":T.isRecord&&((_=r.data[T.key])==null?void 0:_.length),"link-item":T.isLink,"is-empty":!((S=r.data[T.key])!=null&&S.length),[`label-item_${r.data.id}`]:!0,[`type_${r.data.type}`]:!0}]),key:I},[r.data[T.key]&&!T.isRecord?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("span",jv,i.toDisplayString(T.label),1),T.ellipsis?(i.openBlock(),i.createBlock(Pv,{key:0,show:r.show,text:r.data[T.key]||"-"},null,8,["show","text"])):T.isLink?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,target:"_blank",class:"value",color:"primary","hover-underline":"",href:r.data[T.key]},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(r.data[T.key]),1)]),_:2},1032,["href"])):T.key==="platform"?(i.openBlock(),i.createElementBlock("span",zv,i.toDisplayString(i.unref(kh)(r.data[T.key])),1)):(i.openBlock(),i.createElementBlock("span",Gv,[T.extra?(i.openBlock(),i.createElementBlock("i",Wv,i.toDisplayString(r.data[T.extra]),1)):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(r.data[T.key]||"-"),1)]))],64)):i.createCommentVNode("",!0),T.isRecord&&((R=r.data[T.key])!=null&&R.length)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("span",Yv,i.toDisplayString(T.label),1),i.createElementVNode("div",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data[T.key],L=>(i.openBlock(),i.createElementBlock("p",{key:L.create_time,class:"value"},i.toDisplayString(L.reason)+"   "+i.toDisplayString(i.unref(pt)(L.create_time,"YYYY/MM/DD HH:mm:ss"))+" 审核"+i.toDisplayString(L.action===1?"通过":"驳回"),1))),128))])],64)):i.createCommentVNode("",!0)],2)}),128))]))}}),rs=He._export_sfc(Xv,[["__scopeId","data-v-16c414d3"]]),Kv={class:"o-activity-table"},Qv={key:0,class:"table-wrapper"},Zv={class:"expand-detail"},Jv={class:"sort-btn"},e_={class:"activity-btn"},t_={key:0,class:"pagination-wrapper"},i_={key:1,class:"collapse-wrapper"},n_={class:"title-top"},r_={class:"act-title"},s_={class:"act-sponsor"},a_={class:"sponsor"},o_={class:"activity-btn"},l_={class:"activity-detail"},u_={key:0,class:"pagination"},c_={class:"dialog-content"},d_={class:"dialog-content"},bc=i.defineComponent({__name:"OActivityApproval",props:{getTableDataRequest:{},applicantList:{},cancelActivityRequest:{},deleteActivityRequest:{},approveActivityRequest:{},rejectActivityRequest:{},getActivityDetailRequest:{}},setup(r){const e=A.useMessage(null),{isPhone:t,lePadV:n}=Ct.useScreen(),s=r,a=i.reactive({page:1,size:10,status:"",is_delete:0,search:"",sponsor:"",order_by:""}),o=i.ref(""),l=i.computed(()=>s.applicantList.map(me=>({value:me,label:me}))),c=()=>{a.sponsor=o.value.join(",")},h=i.ref("desc"),m=()=>{h.value=h.value==="asc"?"desc":"asc",a.order_by=h.value},g=i.ref(),k=i.computed(()=>{let me=[];return B2.forEach(_e=>{me.push(_e)}),me.slice(1)}),T=()=>{a.status=g.value,g.value==="cancel"?a.is_delete=1:a.is_delete=0},I=i.ref([]),_=i.ref(0),S=[10,20,30,40],R=async()=>{const{page:me,size:_e,status:be,sponsor:Be,order_by:it,search:he,is_delete:de}=a;let ce={page:me,size:_e,sponsor:Be,order_by:it,search:he};if(be!=="all"&&(ce.is_delete=de),be==="cancel"?ce.status="":ce.status=be,!s.getTableDataRequest)return;const De=await s.getTableDataRequest(ce);I.value=(De.data||[]).map(Ce=>{const{start_date:et,end_date:fe,start:ye,end:ge}=Ce;return[{...Ce,time:`${et}-${ge}`,start_date_time:`${et} ${ye}`,end_date_time:`${fe} ${ge}`,type:"activity",dateRange:`${et} ${ye}-${fe} ${ge}`}]}).flat(),_.value=De.total},L=me=>{me.pageSize!==a.size?a.page=1:a.page=me.page,a.size=me.pageSize,R()},O=i.ref({reason:""}),H=i.ref(),M=i.ref(!1),P=i.ref(null),N=i.ref(""),X=i.ref(0),b=i.ref(!1),C=i.ref({reason:[{required:!0,message:"请输入审核的备注信息"}]}),$=async()=>{var _e,be,Be;if(!s.approveActivityRequest||!s.rejectActivityRequest)return;const me=X.value===1?"审核通过":"审核驳回";try{if(M.value=!0,(await((_e=H.value)==null?void 0:_e.validate())).some(he=>!!he)){M.value=!1;return}X.value===1?await s.approveActivityRequest(P.value.id,O.value):await s.rejectActivityRequest(P.value.id,O.value),R(),U(),e.success({content:`“${(be=P.value)==null?void 0:be.title}”活动${me}成功`})}catch{b.value=!1,M.value=!1,e.danger({content:`“${(Be=P.value)==null?void 0:Be.title}”活动${me}失败`})}},U=()=>{b.value=!1,w.value=!1,M.value=!1,O.value.reason=""},E=async()=>{var me,_e;if(s.deleteActivityRequest&&s.cancelActivityRequest)try{M.value=!0,Q.value===1?await s.cancelActivityRequest(P.value.id,O.value):await s.deleteActivityRequest(P.value.id,O.value),R(),U(),e.success({content:`“${(me=P.value)==null?void 0:me.title}”活动${z.value}成功`})}catch(be){console.log(be),M.value=!1,w.value=!1,e.danger({content:`“${(_e=P.value)==null?void 0:_e.title}”活动${z.value}失败`})}},w=i.ref(!1),F=i.ref(""),z=i.ref(""),Q=i.ref(0),q=me=>{F.value="删除活动",z.value="删除",P.value=me,Q.value=0,w.value=!0},Z=me=>{F.value="取消活动",z.value="取消",P.value=me,Q.value=1,w.value=!0},G=me=>{P.value=me,N.value="审核通过",X.value=1,b.value=!0},J=me=>{P.value=me,N.value="审核驳回",X.value=0,b.value=!0},ie=i.ref([]),oe=i.ref([]),Ee=me=>{if(!s.getActivityDetailRequest)return;ie.value.includes(me)||(ie.value.push(me),s.getActivityDetailRequest(me).then(be=>{var Be;(Be=I.value)==null||Be.forEach(it=>{it.id===be.id&&(it.approve_record=be.approve_record,it.approver=be.approver)})}));const _e=oe.value.indexOf(me);oe.value.includes(me)?oe.value.splice(_e,1):oe.value.push(me)},ue=me=>{Ee(me.id)},$e=me=>me.id,Ie=i.ref([]),Oe=me=>{me.length&&me.forEach(_e=>{Ee(_e)})},Ye=i.ref({}),Fe=(me,_e)=>{me&&_e&&(Ye.value[_e]=me)};i.onMounted(()=>{R()}),i.watch(()=>[a.status,a.sponsor,a.order_by,a.search,a.is_delete],()=>{R()},{deep:!0});const Ze=i.computed(()=>[{id:"confirm",loading:M.value,color:"primary",variant:n.value?"text":"solid",round:"pill",size:"large",label:"确定",onClick:()=>{E()}},{id:"cancel",color:"primary",variant:n.value?"text":"outline",round:"pill",size:"large",label:"取消",onClick:()=>{U()}}]),Je=i.computed(()=>[{id:"confirm",loading:M.value,color:"primary",variant:n.value?"text":"solid",round:"pill",size:"large",label:"确定",onClick:()=>{$()}},{id:"cancel",color:"primary",variant:n.value?"text":"outline",round:"pill",size:"large",label:"取消",onClick:()=>{U()}}]);return(me,_e)=>(i.openBlock(),i.createElementBlock("div",Kv,[i.unref(t)?(i.openBlock(),i.createElementBlock("div",i_,[i.createVNode(i.unref(A.OCollapse),{modelValue:Ie.value,"onUpdate:modelValue":_e[2]||(_e[2]=be=>Ie.value=be),accordion:i.unref(t),onChange:Oe},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,(be,Be)=>{var it;return i.openBlock(),i.createElementBlock(i.Fragment,{key:be.id},[i.createElementVNode("div",n_,[i.createElementVNode("p",r_,i.toDisplayString(be.title),1),be.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(it=i.unref(Wn).get(be.status))==null?void 0:it.id}`])},{default:i.withCtx(()=>{var he;return[i.createTextVNode(i.toDisplayString((he=i.unref(Wn).get(be.status))==null?void 0:he.text),1)]}),_:2},1032,["class"])):(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:i.withCtx(()=>[..._e[14]||(_e[14]=[i.createTextVNode("已取消",-1)])]),_:1}))]),i.createVNode(i.unref(A.OCollapseItem),{value:be.id},{title:i.withCtx(()=>[i.createElementVNode("div",s_,[i.createElementVNode("p",a_,i.toDisplayString(be.sponsor),1),i.createElementVNode("p",null,i.toDisplayString(i.unref(tt.dayjs)(be.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),i.createElementVNode("div",o_,[be.status===7||be.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",variant:"text",onClick:i.withModifiers(he=>q(be),["stop"])},{default:i.withCtx(()=>[..._e[15]||(_e[15]=[i.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(be.status===3||be.status===4)&&be.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",variant:"text",onClick:i.withModifiers(he=>Z(be),["stop"])},{default:i.withCtx(()=>[..._e[16]||(_e[16]=[i.createTextVNode(" 取消活动 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),be.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",variant:"text",onClick:i.withModifiers(he=>G(be),["stop"])},{default:i.withCtx(()=>[..._e[17]||(_e[17]=[i.createTextVNode(" 通过 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),be.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",variant:"text",onClick:i.withModifiers(he=>J(be),["stop"])},{default:i.withCtx(()=>[..._e[18]||(_e[18]=[i.createTextVNode(" 驳回 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),default:i.withCtx(()=>[i.createElementVNode("div",l_,[i.createVNode(rs,{show:Ie.value.includes(be.id),data:be,ref_for:!0,ref:he=>Fe(he,be.id),page:"approval"},null,8,["show","data"])])]),_:2},1032,["value"])],64)}),128))]),_:1},8,["modelValue","accordion"]),_.value>S[0]?(i.openBlock(),i.createElementBlock("div",u_,[i.createVNode(i.unref(A.OPagination),{total:_.value,page:a.page,"page-size":a.size,"page-sizes":S,layout:["total","jumper","pager","pagesize"],"show-more":!1,simple:!0,onChange:L},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",Qv,[i.createVNode(i.unref(tt.ElTable),{data:I.value,onExpandChange:ue,"row-key":$e,"expand-row-keys":oe.value},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElTableColumn),{type:"expand"},{default:i.withCtx(be=>[i.createElementVNode("div",Zv,[i.createVNode(rs,{data:be.row,page:"approval",show:""},null,8,["data"])])]),_:1}),i.createVNode(i.unref(tt.ElTableColumn),{label:"活动名称",prop:"title"}),i.createVNode(i.unref(tt.ElTableColumn),{prop:"sponsor"},{header:i.withCtx(()=>[i.createVNode(vc,{modelValue:o.value,"onUpdate:modelValue":_e[0]||(_e[0]=be=>o.value=be),onConfirm:c,list:l.value,multiple:!0},{empty:i.withCtx(()=>[i.renderSlot(me.$slots,"filter-empty")]),default:i.withCtx(()=>[_e[6]||(_e[6]=i.createTextVNode(" 申请人 ",-1))]),_:3},8,["modelValue","list"])]),_:3}),i.createVNode(i.unref(tt.ElTableColumn),{prop:"create_time"},{header:i.withCtx(()=>[i.createElementVNode("div",{class:"sort-time",onClick:m},[_e[7]||(_e[7]=i.createElementVNode("span",null,"申请时间",-1)),i.createElementVNode("div",Jv,[i.createElementVNode("div",{class:i.normalizeClass(["sort-asc sort-item",{active:h.value==="asc"}])},null,2),i.createElementVNode("div",{class:i.normalizeClass(["sort-desc sort-item",{active:h.value==="desc"}])},null,2)])])]),default:i.withCtx(be=>[i.createTextVNode(i.toDisplayString(i.unref(tt.dayjs)(be.row.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),_:1}),i.createVNode(i.unref(tt.ElTableColumn),{prop:"status",width:"90px"},{header:i.withCtx(()=>[i.createVNode(vc,{modelValue:g.value,"onUpdate:modelValue":_e[1]||(_e[1]=be=>g.value=be),onConfirm:T,list:k.value},{empty:i.withCtx(()=>[i.renderSlot(me.$slots,"filter-empty")]),default:i.withCtx(()=>[_e[8]||(_e[8]=i.createTextVNode(" 状态 ",-1))]),_:3},8,["modelValue","list"])]),default:i.withCtx(be=>{var Be;return[be.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(Be=i.unref(Wn).get(be.row.status))==null?void 0:Be.id}`])},{default:i.withCtx(()=>{var it;return[i.createTextVNode(i.toDisplayString((it=i.unref(Wn).get(be.row.status))==null?void 0:it.text),1)]}),_:2},1032,["class"])):(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:i.withCtx(()=>[..._e[9]||(_e[9]=[i.createTextVNode("已取消",-1)])]),_:1}))]}),_:3}),i.createVNode(i.unref(tt.ElTableColumn),{label:"操作"},{default:i.withCtx(be=>[i.createElementVNode("div",e_,[be.row.status===7||be.row.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",onClick:Be=>q(be.row)},{default:i.withCtx(()=>[..._e[10]||(_e[10]=[i.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(be.row.status===3||be.row.status===4)&&be.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",onClick:Be=>Z(be.row)},{default:i.withCtx(()=>[..._e[11]||(_e[11]=[i.createTextVNode(" 取消活动 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),be.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",onClick:Be=>G(be.row)},{default:i.withCtx(()=>[..._e[12]||(_e[12]=[i.createTextVNode(" 通过 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),be.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",onClick:Be=>J(be.row)},{default:i.withCtx(()=>[..._e[13]||(_e[13]=[i.createTextVNode(" 驳回 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),_:1})]),_:3},8,["data","expand-row-keys"]),_.value>S[0]?(i.openBlock(),i.createElementBlock("div",t_,[i.createVNode(i.unref(A.OPagination),{total:_.value,page:a.page,"page-size":a.size,"page-sizes":S,layout:["total","jumper","pager","pagesize"],"show-more":!1,onChange:L},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])),i.createVNode(i.unref(A.ODialog),{visible:b.value,"onUpdate:visible":_e[4]||(_e[4]=be=>b.value=be),"phone-half-full":i.unref(n),"main-class":"handle-dialog-approval review-dialog",actions:Je.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(N.value),1)]),default:i.withCtx(()=>[i.createElementVNode("div",c_,[i.createVNode(i.unref(A.OForm),{model:O.value,ref_key:"formRef",ref:H,"has-required":"",layout:"v",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:C.value.reason,label:"审核备注:",field:"reason"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:"请输入审核的备注信息",rows:4,resize:"none","max-length":1e3,"input-on-outlimit":!1,modelValue:O.value.reason,"onUpdate:modelValue":_e[3]||(_e[3]=be=>O.value.reason=be)},null,8,["modelValue"])]),_:1},8,["rules"])]),_:1},8,["model"])])]),_:1},8,["visible","phone-half-full","actions"]),i.createVNode(i.unref(A.ODialog),{visible:w.value,"onUpdate:visible":_e[5]||(_e[5]=be=>w.value=be),"phone-half-full":i.unref(n),"main-class":"handle-dialog-approval cancel-dialog",actions:Ze.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(F.value),1)]),default:i.withCtx(()=>{var be;return[i.createElementVNode("div",d_," 是否确认"+i.toDisplayString(z.value)+"“"+i.toDisplayString((be=P.value)==null?void 0:be.title)+"”活动?"+i.toDisplayString(z.value)+"后将不在会议首页呈现。 ",1)]}),_:1},8,["visible","phone-half-full","actions"])]))}}),h_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"32",viewBox:"0 0 30 32"};function f_(r,e){return i.openBlock(),i.createElementBlock("svg",h_,[...e[0]||(e[0]=[i.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 Ll={name:"meeting-icon-copy",render:f_},p_={class:"o-my-activity-calendar"},m_={class:"activity-list"},g_={key:0,class:"list-calendar-mb"},v_={class:"left-calendar"},__=["onClick"],y_={class:"date-cell-text"},T_={class:"right-meeting"},b_={class:"list-body"},x_=["id"],C_={class:"item-header-left"},E_={class:"act-icon"},S_={class:"header-info"},k_={class:"title-text"},w_={class:"act-info"},D_={class:"date-range"},A_={key:0,class:"item-header-right"},N_={class:"activity-detail"},I_={key:0,class:"activity-btn"},O_={key:0,class:"load-text"},B_={class:"dialog-content"},L_={class:"dialog-content"},xc=i.defineComponent({__name:"OMyActivityCalendar",props:{getListRequest:{},revokeActivityRequest:{},deleteActivityRequest:{},editActivityRequest:{},getActivityDetailRequest:{}},emits:["edit"],setup(r,{emit:e}){const t=A.useMessage(null),{isPhone:n}=Ct.useScreen(),s=r,a=e,o=i.ref([]),l=i.ref([]),c=i.ref(1),h=i.ref(50),m=i.ref(null),g=i.ref(!1),k=i.ref([]),T=i.ref(!1),I=i.ref(!1),_=i.computed(()=>l.value.length<m.value||m.value===null),S=async()=>{if(s.getListRequest&&!T.value)try{if(m.value>0&&(c.value-1)*h.value>m.value)return;if(!_.value&&n.value){E("next-month");return}T.value=!0;const he=await s.getListRequest({page:c.value,size:h.value}),de=(he.data||[]).map(ce=>{const{start_date:De,end_date:Ce,start:et,end:fe}=ce;return[{...ce,time:`${De}-${fe}`,start_date_time:`${De} ${et}`,end_date_time:`${Ce} ${fe}`,type:"activity",dateRange:`${De} ${et}-${Ce} ${fe}`,isExpired:Te(`${De} ${et}`).isBefore(Te())}]}).flat().filter(ce=>ce.start_date.slice(0,7)===pt(X.value,"YYYY-MM-DD").slice(0,7));g.value?(l.value=he.data||[],o.value=de):c.value===1&&!n.value?(l.value=he.data||[],o.value=de):(l.value=[...l.value,...he.data||[]],o.value=[...o.value,...de]),o.value.sort((ce,De)=>ce.start_date===De.start_date?On(ce.start)>On(De.start)?1:-1:Te(ce.start_date).isAfter(Te(De.start_date))?1:-1),m.value=(he==null?void 0:he.total)||0,i.nextTick(()=>{$(),Q.value&&!n.value&&P()})}finally{T.value=!1,I.value=!1,g.value=!1}},R=i.ref([]),L=he=>{s.getActivityDetailRequest&&(R.value.includes(he)||(R.value.push(he),s.getActivityDetailRequest(he).then(de=>{var ce;(ce=o.value)==null||ce.forEach(De=>{De.id===de.id&&(De.approve_record=de.approve_record)})})))},O=he=>{he.length&&he.forEach(de=>{L(de)})},H=he=>{const de=o.value.filter(ce=>ce.start_date===he);return de.length&&de.every(ce=>ce.status===3||ce.status===4)},M=he=>{const de=he.target;if(!de)return;const ce=de.scrollTop,De=de.scrollHeight,Ce=de.clientHeight;ce+Ce>=De&&Z()},P=()=>{Q.value.getContainerEl().addEventListener("scroll",M)},N=i.ref(),X=i.ref(),b=i.computed(()=>[...new Set(o.value.map(he=>he.start_date))].sort((he,de)=>Te(he).isBefore(Te(de))?-1:1)),C=i.computed(()=>[...new Set(o.value.filter(he=>!he.isExpired&&!he.is_delete).map(he=>he.start_date))].sort((he,de)=>Te(he).isBefore(Te(de))?-1:1)),$=()=>{var ce;const he=C.value.find(De=>!Te(De).isBefore(Te(new Date).format("YYYY-MM-DD")));he?X.value=he:X.value||(X.value=Te().format("YYYY-MM-DD")),(ce=N.value)==null||ce.pickDay(Te(X.value)),X.value=Te(X.value).format("YYYY-MM-DD");const de=o.value.find(De=>De.start_date===X.value&&!De.isExpired&&!De.is_delete);de&&(L(de.id),k.value=[de.id])},U=(he,de)=>{var ce;(!de||!((ce=he.target)!=null&&ce.className.includes("date-cell-text")))&&(he.stopPropagation(),he.preventDefault())},E=he=>{N.value&&(c.value=1,m.value=null,R.value=[],window.scrollTo({top:0,behavior:"smooth"}),N.value.selectDate(he),g.value=!0,i.nextTick(()=>{X.value=Te(N.value.selectedDay).format("YYYY-MM-DD"),S()}))},w=i.computed(()=>o.value.reduce((he,de)=>{if(he.length){const ce=he.at(-1);return(ce==null?void 0:ce.start_date)===de.start_date?ce==null||ce.list.push(de):he.push({start_date:de.start_date,list:[de]}),he}else return[{start_date:de.start_date,list:[de]}]},[])),F=i.ref({}),z=(he,de)=>{he&&de&&(F.value[de]=he)},Q=i.ref(),q=he=>{var De,Ce,et;const de=Te(he).format("YYYY-MM-DD"),ce=document.querySelector(`#group-title-${de}`);ce&&(n.value?window.scrollTo({top:(((De=ce.parentElement)==null?void 0:De.offsetTop)||0)-52,behavior:"smooth"}):(et=Q.value)==null||et.scrollTo({top:((Ce=ce.parentElement)==null?void 0:Ce.offsetTop)||0,behavior:"smooth"}))};i.watch(()=>X.value,()=>{q(X.value)});const Z=zi.useDebounceFn(()=>{_.value&&(n.value||(I.value=!0,c.value++,S()))},200),G=i.ref(!1),J=i.ref(null),ie=i.ref(!1),oe=he=>{J.value=he,ie.value=!0},Ee=()=>{var he;s.revokeActivityRequest&&(G.value=!0,s.revokeActivityRequest((he=J.value)==null?void 0:he.id).then(()=>{t.success({content:`“${J.value.title}”活动撤销审核成功`}),g.value=!0,S()}).catch(()=>{t.danger({content:`“${J.value.title}”活动撤销审核失败`})}).finally(()=>{ie.value=!1,G.value=!1}))},ue=()=>{ie.value=!1},$e=he=>{a("edit",he)},Ie=he=>{if(!s.editActivityRequest)return;const{title:de,start_date:ce,end_date:De,register_end_date:Ce,activity_type:et,synopsis:fe,register_url:ye,content_url:ge,address:qe,start:Ne,end:ft,approver:Dt}=he;let pi={title:de,start_date:ce,end_date:De,register_end_date:Ce,activity_type:et,synopsis:fe,register_url:ye,content_url:ge,address:qe,start:Ne,end:ft,approver:Dt,is_publish:"true"};s.editActivityRequest(he.id,pi).then(()=>{t.success({content:`“${he.title}”活动提交审核成功`}),g.value=!0,S()}).catch(()=>{t.danger({content:`“${he.title}”活动提交审核失败`})})},Oe=i.ref(!1),Ye=he=>{J.value=he,Oe.value=!0},Fe=()=>{var he;s.deleteActivityRequest&&(G.value=!0,s.deleteActivityRequest((he=J.value)==null?void 0:he.id).then(()=>{t.success({content:`“${J.value.title}”活动删除成功`}),g.value=!0,S()}).catch(()=>{t.danger({content:`“${J.value.title}”活动删除失败`})}).finally(()=>{Oe.value=!1,G.value=!1}))},Ze=()=>{Oe.value=!1},Je=i.ref(),me=i.ref(0),_e=()=>{var he;me.value=((he=Je.value)==null?void 0:he.clientHeight)||0},be=zi.useDebounceFn(()=>{if(!_.value||!n.value)return;const he=window.scrollY||window.pageYOffset,de=window.innerHeight;document.documentElement.scrollHeight-(he+de)<=300&&!T.value&&(I.value=!0,c.value++,S())},200);i.onMounted(()=>{S(),window.addEventListener("scroll",be),window.addEventListener("resize",be),_e(),window.addEventListener("resize",_e)}),i.onUnmounted(()=>{var de;window.removeEventListener("scroll",be),window.removeEventListener("resize",be),window.removeEventListener("resize",_e);const he=(de=Q.value)==null?void 0:de.getContainerEl();he==null||he.removeEventListener("scroll",M)});const Be=i.computed(()=>[{id:"confirm",loading:G.value,color:"primary",variant:"outline",round:"pill",size:"large",label:"确定",onClick:()=>{Ee()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:"取消",onClick:()=>{ue()}}]),it=i.computed(()=>[{id:"confirm",loading:G.value,color:"primary",variant:"outline",round:"pill",size:"large",label:"确定",onClick:()=>{Fe()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:"取消",onClick:()=>{Ze()}}]);return(he,de)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",p_,[i.createElementVNode("div",m_,[i.unref(n)?(i.openBlock(),i.createElementBlock("div",g_,[i.createElementVNode("span",null,i.toDisplayString((X.value?i.unref(Te)(new Date(X.value)):i.unref(Te)()).format("YYYY MM月")),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:de[0]||(de[0]=ce=>E("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:de[1]||(de[1]=ce=>E("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])])):i.createCommentVNode("",!0),i.createElementVNode("div",v_,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendarRef",ref:N,modelValue:X.value,"onUpdate:modelValue":de[4]||(de[4]=ce=>X.value=ce)},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString((X.value?i.unref(Te)(new Date(X.value)):i.unref(Te)()).format("YYYY MM月")),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:de[2]||(de[2]=ce=>E("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:de[3]||(de[3]=ce=>E("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:ce})=>[i.createElementVNode("div",{onClick:De=>U(De,b.value.includes(ce.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":ce.isSelected,"is-today":i.unref(pt)(ce.day)===i.unref(pt)(),clickable:b.value.includes(ce.day),approved:H(ce.day)})},[i.createElementVNode("div",y_,i.toDisplayString(Number(ce.day.split("-")[2])),1)],10,__)]),_:1},8,["modelValue"])]),i.createElementVNode("div",T_,[o.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:Q,onScrollend:i.unref(Z),style:i.normalizeStyle({"--header-height":me.value}),"show-type":"hover",class:"scroller-container"},{default:i.withCtx(()=>[i.createElementVNode("div",b_,[i.createVNode(i.unref(A.OCollapse),{modelValue:k.value,"onUpdate:modelValue":de[7]||(de[7]=ce=>k.value=ce),accordion:i.unref(n),onChange:O},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(w.value,(ce,De)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:ce.start_date},[De===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:de[5]||(de[5]=Ce=>E("prev-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1}),de[10]||(de[10]=i.createElementVNode("span",null,"上个月",-1))])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["act-item",De===w.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"act-bar":!0,"is-active":i.unref(Te)(X.value).format("YYYY-MM-DD")===ce.start_date,"is-end":ce.list.every(Ce=>Ce.isExpired),approved:ce.list.every(Ce=>Ce.status===3||Ce.status===4)})},[...de[11]||(de[11]=[i.createElementVNode("div",{class:"act-bar-line"},null,-1),i.createElementVNode("div",{class:"act-bar-dot"},null,-1)])],2),i.createElementVNode("div",{class:i.normalizeClass({"group-title":!0,"is-end":ce.list.every(Ce=>Ce.isExpired)}),id:`group-title-${i.unref(Te)(new Date(ce.start_date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(Te)(ce.start_date).format("MM/DD")),11,x_),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(ce.list,(Ce,et)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:Ce.sub_id||Ce.id,value:Ce.sub_id||Ce.id,class:i.normalizeClass({"last-item":De===w.value.length-1&&et===ce.list.length-1})},{title:i.withCtx(()=>{var fe,ye;return[i.createElementVNode("div",C_,[i.createElementVNode("div",E_,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Ol))]),_:1})]),i.createElementVNode("div",S_,[i.createElementVNode("div",{class:i.normalizeClass({"act-title":!0,"is-delete":Ce.is_delete,"is-end":Ce.isExpired})},[i.createElementVNode("div",k_,i.toDisplayString(Ce.title),1),i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline",class:i.normalizeClass([`tag-${Ce.is_delete?"delete":(fe=i.unref(Wn).get(Ce.status))==null?void 0:fe.id}`])},{default:i.withCtx(()=>{var ge;return[i.createTextVNode(i.toDisplayString(Ce.is_delete===1?"已取消":(ge=i.unref(Wn).get(Ce.status))==null?void 0:ge.text),1)]}),_:2},1032,["class"])],2),i.createElementVNode("div",w_,[i.createElementVNode("span",D_,i.toDisplayString(Ce.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString((ye=i.unref(ia).get(Ce.activity_type))==null?void 0:ye.label),1)])])]),Ce.content_url&&!Ce.is_delete&&[3,4,5,6].includes(Ce.status)?(i.openBlock(),i.createElementBlock("div",A_,[Ce.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:Ce.content_url,target:"_blank",rel:"noopener noreferrer"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[de[12]||(de[12]=i.createTextVNode(" 活动详情 ",-1))]),_:1},8,["href"])):i.createCommentVNode("",!0),Ce.register_url&&(Ce.status===3||Ce.status===4||Ce.status===2&&Ce.update_activity_id&&new Date(Ce.register_end_date).getTime()>new Date().getTime())?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,href:Ce.register_url,target:"_blank",rel:"noopener noreferrer"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[de[13]||(de[13]=i.createTextVNode(" 我要报名 ",-1))]),_:1},8,["href"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>he.copyInfo(et),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Ll))]),_:1},8,["onClick"])]}),default:i.withCtx(()=>[i.createElementVNode("div",N_,[i.createVNode(rs,{show:k.value.includes(Ce.id),data:Ce,ref_for:!0,ref:fe=>z(fe,Ce.id)},null,8,["show","data"]),!Ce.isExpired&&!Ce.is_delete?(i.openBlock(),i.createElementBlock("div",I_,[Ce.status===2?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,variant:"text",onClick:fe=>oe(Ce)},{default:i.withCtx(()=>[...de[14]||(de[14]=[i.createTextVNode(" 撤销审核 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),Ce.status===1||Ce.status===3||Ce.status===4||Ce.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:1,variant:"text",onClick:fe=>$e(Ce)},{default:i.withCtx(()=>[...de[15]||(de[15]=[i.createTextVNode(" 修改活动 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),Ce.status===1||Ce.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:2,variant:"text",onClick:fe=>Ye(Ce)},{default:i.withCtx(()=>[...de[16]||(de[16]=[i.createTextVNode(" 删除活动 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0),Ce.status===1||Ce.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:3,variant:"text",onClick:fe=>Ie(Ce)},{default:i.withCtx(()=>[...de[17]||(de[17]=[i.createTextVNode(" 提交审核 ",-1)])]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),de[18]||(de[18]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),De===w.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[I.value?(i.openBlock(),i.createElementBlock("div",O_,"加载中···")):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:de[6]||(de[6]=Ce=>E("next-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1}),de[19]||(de[19]=i.createElementVNode("span",null,"下个月",-1))])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):i.renderSlot(he.$slots,"empty",{key:1})])])]),i.createVNode(i.unref(A.ODialog),{visible:ie.value,"onUpdate:visible":de[8]||(de[8]=ce=>ie.value=ce),"main-class":"handle-dialog-active",actions:Be.value},{header:i.withCtx(()=>[...de[20]||(de[20]=[i.createTextVNode("撤销审核",-1)])]),default:i.withCtx(()=>[i.createElementVNode("div",B_,"是否确认要撤销“"+i.toDisplayString(J.value.title)+"”活动?撤销审核后活动将变成草稿状态。",1)]),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Oe.value,"onUpdate:visible":de[9]||(de[9]=ce=>Oe.value=ce),"main-class":"handle-dialog-active",actions:it.value},{header:i.withCtx(()=>[...de[21]||(de[21]=[i.createTextVNode("删除活动",-1)])]),default:i.withCtx(()=>[i.createElementVNode("div",L_,"是否确认删除“"+i.toDisplayString(J.value.title)+"”活动?删除后记录将不再我的个人中心呈现。",1)]),_:1},8,["visible","actions"])],64))}}),M_=Object.assign(lc,{install(r){r.component("OActivityForm",lc)}}),P_=Object.assign(bc,{install(r){r.component("OActivityApproval",bc)}}),R_=Object.assign(xc,{install(r){r.component("OMyActivityCalendar",xc)}}),V_={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 F_(r,e){return i.openBlock(),i.createElementBlock("svg",V_,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"峰会",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.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 $_={name:"events-icon-summit",render:F_},U_={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 q_(r,e){return i.openBlock(),i.createElementBlock("svg",U_,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"活动",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.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 H_={name:"events-icon-events",render:q_},j_={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 z_(r,e){return i.openBlock(),i.createElementBlock("svg",j_,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"高校 & 比赛",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.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 G_={name:"events-icon-competition",render:z_},W_={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 Y_(r,e){return i.openBlock(),i.createElementBlock("svg",W_,[...e[0]||(e[0]=[i.createElementVNode("rect",{id:"版本发布计划",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),i.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 X_={name:"events-icon-release",render:Y_},K_={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},Q_={events:H_,competition:G_,release:X_,summit:$_},$s={上海:"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"},Z_="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",J_={class:"o-events-calendar"},ey={key:0,class:"month-list"},ty={class:"collapse-header"},iy={class:"collapse-title"},ny={key:0,class:"collapse-desc"},ry={key:0,class:"month-content month-content-span"},sy={key:0,class:"event-location"},ay={class:"event-name"},oy={key:1},ly={key:0,class:"month-content-row"},uy={class:"month-name"},cy={class:"event-name"},dy={class:"event-location"},hy={class:"event-name"},fy={class:"event-location"},py={key:1,class:"month-content month-content-column"},my={class:"event-location"},gy={class:"event-name"},vy={key:1},Cc=i.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(r){const e=ka(),{lePadV:t}=Ct.useScreen(),n=r,s=["JAN","FEB","MAR","Apr","May","JUN","Jul","Aug","Sep","Oct","Nov","Dec"],a=i.ref([]);i.watch([()=>n.data,()=>t.value],()=>{var g;n.data.length?t.value?a.value=[(g=n.data[0])==null?void 0:g.name]:a.value=n.data.map(k=>k.name):a.value=[]},{immediate:!0});const o=g=>{const k=g.split("/");return parseInt(k[1],10)},l=g=>{const k=new Array(12).fill(0),T=[];return g.forEach((I,_)=>{const[S,R]=Array.isArray(I.date)?[o(I.date[0]),o(I.date[1])]:[o(I.date),o(I.date)];let L=0;for(let H=S-1;H<R;H++)L=Math.max(L,k[H]);const O=L+1;for(let H=S-1;H<R;H++)k[H]=O;T.push({event:I,row:O,eventIndex:_,start:S,end:R})}),T},c=g=>{const k=Array.from({length:12},()=>[]);return g.forEach(T=>{const I=Array.isArray(T.date)?o(T.date[0]):o(T.date);k[I-1].push(T)}),k},h=g=>{const k=g.color||K_[g.type];return k!=null&&k.startsWith("--")?`var(${k})`:k},m=g=>g.icon?g.icon:Q_[g.type];return(g,k)=>(i.openBlock(),i.createElementBlock("div",J_,[i.unref(t)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",ey,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(s,T=>i.createElementVNode("div",{class:"month-header",key:T},i.toDisplayString(T),1)),64))])),i.createVNode(i.unref(A.OCollapse),{modelValue:a.value,"onUpdate:modelValue":k[0]||(k[0]=T=>a.value=T)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(T,I)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:I,value:T.name},{title:i.withCtx(()=>[i.createElementVNode("div",ty,[i.createElementVNode("div",iy,[i.createElementVNode("div",{class:"title-icon",style:i.normalizeStyle({"--bg-color":h(T)})},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m(T))))]),_:2},1024)],4),i.createElementVNode("span",null,i.toDisplayString(T.name),1)]),T.desc?(i.openBlock(),i.createElementBlock("div",ny,[i.withDirectives(i.createElementVNode("div",null,null,512),[[i.unref(e),T.desc]])])):i.createCommentVNode("",!0)])]),default:i.withCtx(()=>[T.isSpanMonth?(i.openBlock(),i.createElementBlock("div",ry,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l(T.data),({event:_,row:S,eventIndex:R,start:L,end:O})=>(i.openBlock(),i.createElementBlock("div",{key:R,class:i.normalizeClass(["event-item",{"event-item-center":_.align==="center","has-link":_.link}]),style:i.normalizeStyle({gridColumn:`${L} / ${O+1}`,gridRow:S,"--bg-color":h(T)||void 0})},[_.location?(i.openBlock(),i.createElementBlock("div",sy,i.toDisplayString(_.location),1)):i.createCommentVNode("",!0),i.createElementVNode("div",ay,[_.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),i.mergeProps({key:0,href:_.link,target:"_blank"},{ref_for:!0},_.linkProps||{}),{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(_.name),1)]),_:2},1040,["href"])):(i.openBlock(),i.createElementBlock("span",oy,i.toDisplayString(_.name),1))])],6))),128))])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.unref(t)?(i.openBlock(),i.createElementBlock("div",ly,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(T.data),(_,S)=>(i.openBlock(),i.createElementBlock("div",{key:S,class:i.normalizeClass(["month-row",{"empty-month":_.length===0}])},[i.createElementVNode("div",uy,i.toDisplayString(s[S]),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(_,(R,L)=>(i.openBlock(),i.createElementBlock("div",{key:L,class:i.normalizeClass(["event-item",R.link?"has-link":""]),style:i.normalizeStyle({"--bd-color":h(T)||void 0})},[R.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:R.link,target:"_blank"},{default:i.withCtx(()=>[i.createElementVNode("div",null,[i.createElementVNode("div",cy,[i.createElementVNode("span",null,i.toDisplayString(R.name),1)]),i.createElementVNode("div",dy,i.toDisplayString(R.location),1)]),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),_:2},1032,["href"])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",hy,i.toDisplayString(R.name),1),i.createElementVNode("div",fy,i.toDisplayString(R.location),1)],64))],6))),128))],2))),128))])):(i.openBlock(),i.createElementBlock("div",py,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(T.data),(_,S)=>(i.openBlock(),i.createElementBlock("div",{key:S,class:"month-column"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(_,(R,L)=>(i.openBlock(),i.createElementBlock("div",{key:L,class:i.normalizeClass(["event-item",R.link?"has-link":""]),style:i.normalizeStyle({"--bg-color":h(T)||void 0})},[i.createElementVNode("div",my,i.toDisplayString(R.location),1),i.createElementVNode("div",gy,[R.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:R.link,target:"_blank"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(R.name),1)]),_:2},1032,["href"])):(i.openBlock(),i.createElementBlock("span",vy,i.toDisplayString(R.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var en=(r=>(r.FINISH="finish",r.ING="ing",r.ALL="",r))(en||{});const Ec=(r,e)=>new Date(r).getTime()>new Date(e).getTime(),_y={class:"o-events-list"},yy={class:"filter-wrapper"},Ty={class:"filter-left"},by={class:"list-content"},xy={class:"event-name"},Cy={class:"event-desc"},Ey={class:"event-date"},Sy={key:0,class:"event-location"},Sc=i.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(r,{emit:e}){const{t}=He.useI18n(),{lePadV:n}=Ct.useScreen(),s=r,a=[{label:t("events.statusAll"),value:en.ALL},{label:t("events.statusIng"),value:en.ING},{label:t("events.statusFinish"),value:en.FINISH}],o=e,l=i.ref(en.ALL),c=i.ref(""),h=i.ref(""),m=(I={})=>{o("search",Object.assign({page:s.page,pageSize:s.pageSize,status:l.value,keyword:h.value},I))},g=()=>{m()},k=()=>{h.value=c.value,m()},T=i.computed(()=>s.data.map(I=>({...I,status:Ec(new Date,I.date)?en.FINISH:en.ING})).sort((I,_)=>Ec(I.date,_.date)?-1:1).map(I=>{var R,L,O;const _=(O=(L=(R=I.city)==null?void 0:R.replace("市",""))==null?void 0:L.replace("中国",""))==null?void 0:O.replaceAll(" ","");let S=null;return Array.isArray($s[_])?S=$s[_][I.name.length%$s[_].length]:S=$s[_],S||(S=Z_),{...I,cover:S}}));return(I,_)=>(i.openBlock(),i.createElementBlock("div",_y,[i.createElementVNode("div",yy,[i.createElementVNode("div",Ty,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("events.status")),1),i.createVNode(i.unref(A.ORadioGroup),{modelValue:l.value,"onUpdate:modelValue":_[0]||(_[0]=S=>l.value=S),style:{"--radio-group-gap":"8px"},onChange:g},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(a,S=>i.createVNode(i.unref(A.ORadio),{key:S.value,value:S.value},{radio:i.withCtx(({checked:R})=>[i.createVNode(i.unref(A.OToggle),{checked:R},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(S.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),i.createVNode(i.unref(A.OInput),{modelValue:c.value,"onUpdate:modelValue":_[1]||(_[1]=S=>c.value=S),placeholder:i.unref(t)("events.searchPlaceholder"),onPressEnter:k,onClear:k,clearable:""},{prefix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"input-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconSearch))]),_:1})]),_:1},8,["modelValue","placeholder"])]),i.createElementVNode("div",by,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,S=>(i.openBlock(),i.createBlock(i.unref(A.OCard),{key:S.name,cover:S.cover,href:S.link},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTag),{class:"event-status"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(S.status===i.unref(en).ING?i.unref(t)("events.statusIng"):i.unref(t)("events.statusFinish")),1)]),_:2},1024),i.createElementVNode("div",xy,i.toDisplayString(S.name),1),i.createElementVNode("div",Cy,[i.createElementVNode("div",Ey,i.toDisplayString(S.date),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),S.city?(i.openBlock(),i.createElementBlock("div",Sy,i.toDisplayString(S.city),1)):i.createCommentVNode("",!0)])]),_:2},1032,["cover","href"]))),128))]),T.value.length?i.createCommentVNode("",!0):i.renderSlot(I.$slots,"empty",{key:0}),r.total>8?(i.openBlock(),i.createBlock(i.unref(A.OPagination),{key:1,page:r.page,simple:i.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"])):i.createCommentVNode("",!0)]))}}),ky={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function wy(r,e){return i.openBlock(),i.createElementBlock("svg",ky,[...e[0]||(e[0]=[i.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 Dy={name:"events-icon-checked",render:wy},Ay={class:"o-events-apply"},Ny={class:"events-apply-grid"},Iy={class:"timeline-number"},Oy={class:"number-circle"},By={class:"step-title"},Ly={class:"step-idx"},My={class:"step-desc"},Py={key:0},Ry={class:"desc-list-wrapper"},Vy={key:0,class:"desc-list-title"},Fy={class:"desc-list-content"},$y={class:"desc-list-item-title"},Uy={class:"desc-list-item-desc"},kc=i.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(r){const{isDark:e}=Ct.useTheme(),t=ka();return(n,s)=>(i.openBlock(),i.createElementBlock("div",Ay,[i.createElementVNode("div",Ny,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.steps,(a,o)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:o},[i.createElementVNode("div",Iy,[i.createElementVNode("div",Oy,i.toDisplayString(o+1),1)]),i.createElementVNode("div",{class:i.normalizeClass(["step-item",`step-${o+1} ${i.unref(e)?"is-dark":""}`]),style:{}},[i.createElementVNode("div",By,[i.createElementVNode("div",Ly,i.toDisplayString(o+1),1),i.createElementVNode("span",null,i.toDisplayString(a.title),1)]),i.createElementVNode("div",My,[a.desc?i.withDirectives((i.openBlock(),i.createElementBlock("div",Py,null,512)),[[i.unref(t),a.desc]]):i.createCommentVNode("",!0),i.renderSlot(n.$slots,`step${o+1}`),i.createElementVNode("div",Ry,[a.listTitle?(i.openBlock(),i.createElementBlock("div",Vy,i.toDisplayString(a.listTitle),1)):i.createCommentVNode("",!0),i.createElementVNode("div",Fy,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.list,(l,c)=>(i.openBlock(),i.createElementBlock("div",{class:"desc-list-item",key:c},[i.createElementVNode("div",$y,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Dy))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(l.title),1)]),i.createElementVNode("div",Uy,i.toDisplayString(l.desc),1)]))),128))])])]),a.img?(i.openBlock(),i.createElementBlock("div",{key:0,class:"img-wrapper",style:i.normalizeStyle({backgroundImage:`url(${a.img})`})},null,4)):i.createCommentVNode("",!0),a.imgPhone?(i.openBlock(),i.createElementBlock("div",{key:1,class:"img-wrapper-phone",style:i.normalizeStyle({backgroundImage:`url(${a.imgPhone})`})},null,4)):i.createCommentVNode("",!0)],2)],64))),128))])]))}}),qy=Object.assign(Cc,{install(r){r.component("OEventsCalendar",Cc)}}),Hy=Object.assign(Sc,{install(r){r.component("OEventsList",Sc)}}),jy=Object.assign(kc,{install(r){r.component("OEventsApply",kc)}}),zy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Gy(r,e){return i.openBlock(),i.createElementBlock("svg",zy,[...e[0]||(e[0]=[i.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 Wy={name:"components-icon-caret-left",render:Gy},Yy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Xy(r,e){return i.openBlock(),i.createElementBlock("svg",Yy,[...e[0]||(e[0]=[i.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 Ky={name:"components-icon-caret-right",render:Xy},Qy={class:"header-nav-wrap"},Zy={key:0,class:"right-icon"},Jy=["onMouseenter","onMouseleave"],e3=["id"],t3={class:"nav-text"},i3=["id","onClick"],n3={class:"nav-text"},r3={key:1,class:"right-icon"},s3=i.defineComponent({__name:"HeaderNav",props:{navData:void 0,activeIndex:void 0,hoverId:void 0},emits:["handle-mouseenter","handle-mouseleave","handle-click"],setup(r,{emit:e}){const t=e,{isDark:n}=Ct.useTheme(),s=r,a=i.ref(),o=i.ref(),l=i.ref(null),c=i.ref(!1),h=i.ref(!1),m=i.ref(),g=zi.useDebounceFn((M,P)=>{m.value=M==null?void 0:M.id,P==="mouseenter"&&t("handle-mouseenter",M),P==="mouseleave"&&(m.value="",t("handle-mouseleave",M))},100),k=M=>{t("handle-click",M)},T=()=>{h.value=!0,i.nextTick(()=>{a.value.scrollTo({left:a.value.clientWidth,behavior:"smooth"})})},I=()=>{a.value.scrollTo({left:0,behavior:"smooth"}),h.value=!1},_=()=>{var M,P;((M=a.value)==null?void 0:M.clientWidth)<((P=o.value)==null?void 0:P.clientWidth)?c.value=!0:c.value=!1};let S=0,R=0;const L=()=>R=0,O=M=>R>0?void R++:(R++,S=Date.now(),{event:"hover",properties:{module:"navigation",level1:M,target:M}}),H=M=>({properties:{module:"navigation",level1:M.label,target:M.label,steps:R,url:M.href,duration:Date.now()-S}});return i.onMounted(()=>{window.addEventListener("resize",_),i.nextTick(()=>{_(),l.value=setTimeout(()=>{_()},1e3)})}),i.onUnmounted(()=>{window.removeEventListener("resize",_),clearTimeout(l.value)}),(M,P)=>{const N=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",Qy,[i.createElementVNode("div",{class:i.normalizeClass(["header-nav",{"header-nav-scroll":h.value}])},[h.value?(i.openBlock(),i.createElementBlock("div",Zy,[i.createVNode(i.unref(A.OIcon),{onClick:I},{default:i.withCtx(()=>[i.createVNode(i.unref(Wy))]),_:1})])):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"navRef",ref:a,class:i.normalizeClass(["o-nav",{"o-nav-scroll":h.value||!c.value,dark:i.unref(n)}])},[i.createElementVNode("ul",{ref_key:"navListRef",ref:o,class:"o-nav-list",onMouseenter:L},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.navData,(X,b)=>{var C;return i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:X.id,class:i.normalizeClass({"is-selected":m.value===X.id||s.hoverId===X.id,"is-active":s.activeIndex===b}),onMouseenter:$=>i.unref(g)(X,"mouseenter"),onMouseleave:$=>i.unref(g)(X,"mouseleave")},[(C=X==null?void 0:X.children)!=null&&C.length?(i.openBlock(),i.createElementBlock("div",{key:0,id:"tour_headerNav_"+X.id,class:"nav-item"},[i.createElementVNode("span",t3,i.toDisplayString(X.label),1)],8,e3)):(i.openBlock(),i.createElementBlock("div",{key:1,id:"tour_headerNav_"+X.id,class:"nav-item item-other",onClick:$=>k(X)},[i.createElementVNode("span",n3,i.toDisplayString(X.label),1),X.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(X.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,i3))],42,Jy)),[[N,O(X.label),"mouseenter"],[N,H(X),void 0,{catchBubble:!0}]])}),128))],544)],2),c.value&&!h.value?(i.openBlock(),i.createElementBlock("div",r3,[i.createVNode(i.unref(A.OIcon),{onClick:T},{default:i.withCtx(()=>[i.createVNode(i.unref(Ky))]),_:1})])):i.createCommentVNode("",!0)],2)])}}}),a3=He._export_sfc(s3,[["__scopeId","data-v-a1e30870"]]),o3={class:"nav-sub-content"},l3={class:"content-left"},u3={class:"content-label"},c3={class:"content-container"},d3=["href","target"],h3={class:"item-name"},f3={key:0,class:"desc-container"},p3=["title"],m3={key:0,class:"split-line"},g3={key:1,class:"content-right"},v3={class:"content-label"},_3=["href","target"],y3=["href","target"],T3=["src"],b3={class:"review-content"},x3={class:"review-label"},C3={class:"review-property"},E3=i.defineComponent({__name:"HeaderContent",props:{itemData:void 0,itemVisible:void 0,community:void 0,bgLeft:void 0,bgRight:void 0,hoverIndex:void 0},emits:["handle-mouseenter-sub","handle-mouseleave-sub"],setup(r,{emit:e}){const t=e,n=r,{locale:s}=Ct.useLocale(),{theme:a}=Ct.useTheme(),o=i.ref(!1),l=()=>{var T;t("handle-mouseenter-sub",(T=n.itemData)==null?void 0:T.id),o.value=!0},c=()=>{t("handle-mouseenter-sub",""),o.value=!1},h=i.ref(!1),m=T=>{!T||!T.target||(h.value=T.target.clientHeight<T.target.scrollHeight)},g=(T,I)=>({properties:{module:"navigation",level1:T.label,level2:I.label,target:I.label,url:T.href}}),k=T=>({properties:{module:"navigation",level1:s.value==="zh"?"快捷链接":"Quick Link",level2:T.label,target:T.label,url:T.href}});return(T,I)=>{var S,R,L;const _=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",{onMouseenter:l,onMouseleave:c},[(n.itemVisible||o.value)&&((R=(S=n.itemData)==null?void 0:S.children)!=null&&R.length)?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["nav-content",[(L=n.community)==null?void 0:L.toLowerCase(),n.hoverIndex,i.unref(a),`${n.hoverIndex}-${i.unref(s)}`]])},[i.createElementVNode("div",{class:"nav-background-left",style:i.normalizeStyle({backgroundImage:`url(${n.bgLeft})`})},null,4),i.createElementVNode("div",{class:"nav-background-right",style:i.normalizeStyle({backgroundImage:`url(${n.bgRight})`})},null,4),i.createVNode(vn,null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OScroller),{class:"nav-scroller","show-type":"always",size:"small","disabled-y":""},{default:i.withCtx(()=>{var O,H,M,P,N,X,b,C;return[i.createElementVNode("div",o3,[i.createElementVNode("div",l3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((O=n.itemData)==null?void 0:O.children,($,U)=>(i.openBlock(),i.createElementBlock("div",{class:"item-sub",key:U},[i.createElementVNode("span",u3,i.toDisplayString($.label),1),i.createElementVNode("div",c3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList($.children,E=>(i.openBlock(),i.createElementBlock("div",{key:E.label,class:"content-item"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:E.href,target:(E==null?void 0:E.target)||"_self",rel:"noopener noreferrer",class:"item-label"},[i.createElementVNode("span",h3,i.toDisplayString(E.label),1),E.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(E.icon)))]),_:2},1024)):i.createCommentVNode("",!0),E.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,d3)),[[_,()=>g($,E)]]),E.description?(i.openBlock(),i.createElementBlock("div",f3,[i.createElementVNode("p",{class:"item-desc",title:h.value?E.description:null,onMouseenter:I[0]||(I[0]=w=>m(w))},i.toDisplayString(E.description),41,p3)])):i.createCommentVNode("",!0)]))),128))])]))),128))]),(M=(H=n.itemData)==null?void 0:H.shortcut)!=null&&M.length?(i.openBlock(),i.createElementBlock("div",m3)):i.createCommentVNode("",!0),(N=(P=n.itemData)==null?void 0:P.shortcut)!=null&&N.length?(i.openBlock(),i.createElementBlock("div",g3,[i.createElementVNode("span",v3,i.toDisplayString(i.unref(s)==="zh"?"快捷链接":"Quick Link"),1),(X=n.itemData)!=null&&X.withPicture?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList((C=n.itemData)==null?void 0:C.shortcut,$=>i.withDirectives((i.openBlock(),i.createElementBlock("a",{key:$.label,href:$.href,target:($==null?void 0:$.target)||"_self",rel:"noopener noreferrer",class:"review"},[i.createElementVNode("img",{src:$.picture,class:"review-picture"},null,8,T3),i.createElementVNode("div",b3,[i.createElementVNode("p",x3,i.toDisplayString($.label),1),i.createElementVNode("div",C3,[i.createElementVNode("span",null,i.toDisplayString($.remark),1)])])],8,y3)),[[_,()=>k($)]])),128)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList((b=n.itemData)==null?void 0:b.shortcut,$=>(i.openBlock(),i.createElementBlock("div",{key:$.label,class:"shortcut"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:$.href,target:($==null?void 0:$.target)||"_self",rel:"noopener noreferrer",class:"shortcut-link"},[i.createElementVNode("span",null,i.toDisplayString($.label),1),$.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent($.icon)))]),_:2},1024)):i.createCommentVNode("",!0)],8,_3)),[[_,()=>k($)]])]))),128))])):i.createCommentVNode("",!0)])]}),_:1})]),_:1})],2)):i.createCommentVNode("",!0)],32)}}}),S3=He._export_sfc(E3,[["__scopeId","data-v-af6c92c3"]]),k3=["id","onMouseenter","onMouseleave"],w3=["href"],D3={key:1,class:"info-wrap"},A3={class:"dropdown-wrapper"},N3={key:0,class:"tab-disabled"},I3={class:"disabled-tag"},O3={key:1,class:"tab-expand"},B3=["href","target","rel"],Hn="more",L3=i.defineComponent({__name:"HeaderUbmcNav",props:{navData:void 0,hasPerm:void 0,tagMap:void 0,currentPath:void 0},setup(r){const e=r,{locale:t}=Ct.useLocale(),{lePadV:n}=Ct.useScreen(),s={},a=i.ref({}),o=i.ref(-1),l=U=>{o.value=U},c=U=>{var E;o.value=-1,(E=a.value[U])==null||E.clearCheckedNodes()},h=i.ref(-1),m=()=>{var E;const U=(E=s==null?void 0:s.fullPath)==null?void 0:E.split("/").slice(0,3).join("/");h.value=[...I.value,T.value].findIndex(w=>{var z,Q;const F=U==null?void 0:U.indexOf("#");return N.value.length&&!N.value.includes(w.id)&&w.id!==Hn?!1:$(w.href)===U||((z=w.children)==null?void 0:z.some(q=>{var Z;return(Z=q.children)!=null&&Z.length?q.children.some(G=>$(G.href)===U):$(q.href)===U}))||((Q=w.keys)==null?void 0:Q.includes(U==null?void 0:U.slice(1,F!==-1?F:U==null?void 0:U.length)))})};i.onMounted(()=>{m()}),i.watch(()=>s.path,()=>{m()});const g=(U,E)=>{let w=!0;return U&&(w=w&&new Date(U).getTime()>=Date.now()),E&&(w=w&&t.value===E),w},k=(U,E)=>U.checkPermKey?E[U.checkPermKey]:!0,T=i.computed(()=>({id:Hn,label:"更多",children:I.value.filter(U=>!N.value.includes(U.id))||[]})),I=i.computed(()=>{const U=[];let E=[];const w={meeting:e.hasPerm};try{E=e.navData.filter(F=>k(F,w)).map(function F(z){U.push(z.label);const Q={...z,_path:[...U]};return z.children&&(Q.children=z.children.filter(q=>k(q,w)).map(F)),U.pop(),Q})}catch{E=e.navData}return E});let _=0,S=0;const R=U=>{const E=Date.now()-_,w=S+1;if(_=0,S=0,U._path){const F={};return U._path.forEach((z,Q)=>{F[`level${Q+1}`]=z}),{properties:{module:"navigation",timeUsed:E,steps:w,...F}}}},L=U=>{if(S++,!_)return _=Date.now(),{event:"hover",properties:{module:"navigation",target:U.label}}},O=()=>{_=0,S=0},H=U=>U?U.startsWith("http"):!1,M=i.ref(null),P=i.ref(null),N=i.ref([]),X=i.ref(null),b=i.ref(0),C=()=>{if(!M.value)return;if(N.value=[],b.value=M.value.clientWidth,n.value&&(N.value=I.value.map(z=>z.id)),M.value.clientWidth>=P.value.clientWidth){N.value=I.value.map(z=>z.id);return}b.value=0;const U=P.value.querySelector(`li.nav-item#${Hn}`);let E=M.value.clientWidth-U.clientWidth;const w=P.value.querySelectorAll("li.nav-item");let F=!1;[...w].forEach((z,Q)=>{z.id!==Hn&&E>z.clientWidth&&!F?(E-=z.clientWidth,N.value.push(I.value[Q].id),b.value+=z.clientWidth):F=!0})};i.onMounted(()=>{window.addEventListener("resize",C),i.nextTick(()=>{C(),X.value=setTimeout(()=>{C()},1e3)})}),i.onUnmounted(()=>{window.removeEventListener("resize",C),clearTimeout(X.value)}),i.watch(()=>I.value,()=>{i.nextTick(()=>{C()})},{deep:!0});const $=U=>(U==="/"&&(U=""),H(U)?U:`/${t.value}${U}`);return(U,E)=>{const w=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("nav",{class:"header-nav-ubmc",ref_key:"wrapperRef",ref:M},[i.createElementVNode("ul",{class:"nav-list",ref_key:"listRef",ref:P,style:i.normalizeStyle({"--more-left":b.value}),onMouseleave:O},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList([...I.value,T.value],(F,z)=>{var Q;return i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:F.id,id:F.id,class:i.normalizeClass(["nav-item",{"is-selected":h.value===z,"is-active":o.value===z,hidden:!N.value.includes(F.id)&&F.id!==Hn||F.id===Hn&&F.children.length===0}]),onMouseenter:q=>l(z),onMouseleave:q=>c(z)},[!((Q=F.children)!=null&&Q.length)&&F.href?(i.openBlock(),i.createElementBlock("a",{key:0,class:"info-wrap clickable",href:$(F.href)},[i.createElementVNode("span",null,[i.createElementVNode("span",null,i.toDisplayString(F.label),1)])],8,w3)):(i.openBlock(),i.createElementBlock("div",D3,[i.createElementVNode("span",null,[i.createElementVNode("span",null,i.toDisplayString(F.label),1)]),i.createElementVNode("div",A3,[i.createVNode(i.unref(tt.ElCascaderPanel),{options:F.children,value:"id",expandTrigger:"hover",ref_for:!0,ref:q=>a.value[z]=q},{default:i.withCtx(({data:q})=>{var Z;return[q.disabled?(i.openBlock(),i.createElementBlock("div",N3,[i.createElementVNode("span",null,i.toDisplayString(q.label),1),i.createElementVNode("span",I3,i.toDisplayString(i.unref(t)==="zh"?"待上线":"Coming soon"),1)])):q!=null&&q.children?(i.openBlock(),i.createElementBlock("div",O3,[i.createElementVNode("span",null,i.toDisplayString(q.label),1),i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])):i.withDirectives((i.openBlock(),i.createElementBlock("a",{key:2,href:$(q.href),class:"dropdown-link",target:H(q.href)?"_blank":"_self",rel:H(q.href)?"noopener noreferrer":""},[i.createElementVNode("span",null,i.toDisplayString(q.label),1),(r.tagMap[(Z=q==null?void 0:q.href)==null?void 0:Z.slice(1)]||q.tag)&&g(q.tagExpire,q.tagLang)?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"danger",size:"small",round:"pill"},{default:i.withCtx(()=>{var G;return[i.createTextVNode(i.toDisplayString(r.tagMap[(G=q==null?void 0:q.href)==null?void 0:G.slice(1)]||q.tag),1)]}),_:2},1024)):i.createCommentVNode("",!0),q.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,class:"jump-out-icon"},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(q.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0)],8,B3)),[[w,()=>R(q)]])]}),_:1},8,["options"])])]))],42,k3)),[[w,()=>L(F),"mouseenter"]])}),128))],36)],512)}}}),M3=He._export_sfc(L3,[["__scopeId","data-v-e34645f2"]]),P3={class:"header"},R3=["src"],V3={key:0,class:"header-nav"},F3={key:1,class:"header-nav-openubmc"},$3={key:2,class:"header-toolbar"},U3={key:0,class:"header-nav-content"},q3=i.defineComponent({__name:"OHeader",props:{logo:void 0,lang:void 0,community:void 0,navData:void 0,bgLeft:void 0,bgRight:void 0,tagMap:void 0,activeIndex:void 0},emits:["go-home","handle-click"],setup(r,{emit:e}){const{isDark:t}=Ct.useTheme(),n=e,s=r,a=i.ref(),o=i.ref(),l=i.ref(),c=i.ref(!1),h=()=>{n("go-home")},m=_=>{var S;l.value=_,a.value=_.id,(S=_==null?void 0:_.children)!=null&&S.length&&(c.value=!0)},g=_=>{c.value=!1},k=_=>{n("handle-click",_)},T=_=>{o.value=_},I=_=>{o.value=_};return(_,S)=>(i.openBlock(),i.createElementBlock("div",P3,[i.createElementVNode("div",{class:i.normalizeClass(["header-wrap",{"header-wrap-dark":i.unref(t)}])},[i.createVNode(vn,{class:"header-content"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"header-logo",onClick:h},[i.renderSlot(_.$slots,"logo",{},()=>[s.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:s.logo},null,8,R3)):i.createCommentVNode("",!0)],!0)]),s.community!=="openUBMC"?(i.openBlock(),i.createElementBlock("div",V3,[i.renderSlot(_.$slots,"nav",{},()=>[s.navData?(i.openBlock(),i.createBlock(a3,{key:0,"nav-data":s.navData,hoverId:o.value,"active-index":s.activeIndex,onHandleMouseenter:m,onHandleMouseleave:g,onHandleClick:k},null,8,["nav-data","hoverId","active-index"])):i.createCommentVNode("",!0)],!0)])):i.createCommentVNode("",!0),s.community==="openUBMC"?(i.openBlock(),i.createElementBlock("div",F3,[i.renderSlot(_.$slots,"nav",{},()=>[s.navData?(i.openBlock(),i.createBlock(M3,{key:0,"nav-data":s.navData,"has-perm":!0,"tag-map":s.tagMap},null,8,["nav-data","tag-map"])):i.createCommentVNode("",!0)],!0)])):i.createCommentVNode("",!0),_.$slots.toolbar?(i.openBlock(),i.createElementBlock("div",$3,[i.renderSlot(_.$slots,"toolbar",{},void 0,!0)])):i.createCommentVNode("",!0)]),_:3})],2),s.community!=="openUBMC"?(i.openBlock(),i.createElementBlock("div",U3,[i.createVNode(S3,{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:I},null,8,["itemData","item-visible","bg-left","bg-right","community","hover-index"])])):i.createCommentVNode("",!0)]))}}),wc=He._export_sfc(q3,[["__scopeId","data-v-821f1e91"]]),H3={class:"header-content-mb"},j3={class:"o-nav"},z3={class:"o-nav-list"},G3=["onClick"],W3={class:"nav-aside"},Y3={key:0,class:"nav-aside-wrapper"},X3=["value","title"],K3={class:"content-label"},Q3={class:"container-mobile"},Z3=["onClick"],J3={class:"item-label"},eT={class:"desc-container"},tT={class:"item-desc"},iT=["onClick"],nT={class:"item-label"},rT={key:1,class:"nav-aside-wrapper"},sT=["onClick"],aT={class:"header-tool"},oT={key:1},lT=i.defineComponent({__name:"HeaderNavMoblie",props:{menuShow:{type:Boolean,default(){return!1}},navData:void 0,codeData:void 0},emits:["link-click"],setup(r,{emit:e}){const t=r,n=i.ref(""),s=i.ref({}),a=c=>{if(c!=null&&c.href)return window.open(c==null?void 0:c.href,"_self"),!0;c?(n.value=c.id,s.value=c):(n.value="source_code",s.value=t.codeData.list)},o=e,l=(c,h)=>{window.open(c,h||"_self"),o("link-click")};return i.onMounted(()=>{n.value=t.navData[0].id,s.value=t.navData[0]}),i.watch(()=>t.navData||t.codeData,()=>{s.value=n.value==="source_code"?t.codeData.list:t.navData.find(c=>c.id===n.value)},{deep:!0}),(c,h)=>(i.openBlock(),i.createElementBlock("div",H3,[i.createElementVNode("div",{class:i.normalizeClass(["header-nav",{active:r.menuShow}])},[i.createElementVNode("div",j3,[i.createElementVNode("ul",z3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.navData,m=>(i.openBlock(),i.createElementBlock("li",{key:m.id,class:i.normalizeClass({active:n.value===m.id})},[i.createElementVNode("span",{onClick:g=>a(m)},i.toDisplayString(m.label),9,G3)],2))),128))]),i.createElementVNode("div",W3,[n.value!=="source_code"?(i.openBlock(),i.createElementBlock("ul",Y3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value.children,m=>(i.openBlock(),i.createElementBlock("li",{value:m.label,title:m.label,key:m.label,class:"nav-aside-content"},[m!=null&&m.children?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("p",K3,i.toDisplayString(m.label),1),i.createElementVNode("div",Q3,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m==null?void 0:m.children,g=>(i.openBlock(),i.createElementBlock("div",{key:g.label,class:"content-container-mobile"},[i.createElementVNode("a",{onClick:k=>l(g.href,g==null?void 0:g.target),rel:"noopener noreferrer",class:"content-subtitle"},[i.createElementVNode("span",J3,i.toDisplayString(g.label),1),g.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0),g.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,Z3),i.createElementVNode("div",eT,[i.createElementVNode("p",tT,i.toDisplayString(g.description),1)])]))),128))])],64)):(i.openBlock(),i.createElementBlock("a",{key:1,onClick:g=>l(m.href,m==null?void 0:m.target),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[i.createElementVNode("span",nT,i.toDisplayString(m.label),1),m.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0),m.tag?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(m.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,iT))],8,X3))),128))])):(i.openBlock(),i.createElementBlock("div",rT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,m=>(i.openBlock(),i.createElementBlock("a",{key:m.label,onClick:g=>l(m.href,m==null?void 0:m.target),class:"source-code-item"},[i.createElementVNode("span",null,i.toDisplayString(m.label),1),m.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0)],8,sT))),128))]))])]),i.createElementVNode("div",aT,[r.codeData?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["header-tool-code",{active:n.value==="source_code"}]),onClick:h[0]||(h[0]=m=>a(null))},i.toDisplayString(r.codeData.label),3)):i.createCommentVNode("",!0),c.$slots.tool?(i.openBlock(),i.createElementBlock("div",oT,[i.renderSlot(c.$slots,"tool",{},void 0,!0)])):i.createCommentVNode("",!0)])],2)]))}}),uT=He._export_sfc(lT,[["__scopeId","data-v-3940edc0"]]),cT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function dT(r,e){return i.openBlock(),i.createElementBlock("svg",cT,[...e[0]||(e[0]=[i.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 hT={name:"components-icon-header-menu",render:dT},fT={class:"header"},pT={key:0,class:"header-simple"},mT={class:"simple-header-left"},gT={key:0,class:"header-title"},vT={key:0,class:"simple-header-right"},_T={class:"header-left"},yT={class:"header-center"},TT=["src"],bT={class:"header-right"},xT=i.defineComponent({__name:"OHeaderMoblie",props:{logo:void 0,navData:void 0,codeData:void 0,isSimpleHeader:void 0,headerTitle:void 0},emits:["go-back","go-home"],setup(r,{emit:e}){const t=e,n=r,s=()=>{t("go-back")},a=()=>{t("go-home")},o=i.ref(!1),l=()=>{setTimeout(()=>{o.value=!o.value,document.body.style.overflow=o.value?"hidden":""},200)},c=()=>{l()};return(h,m)=>(i.openBlock(),i.createElementBlock("div",fT,[i.createVNode(vn,{class:"header-wrap"},{default:i.withCtx(()=>[r.isSimpleHeader?(i.openBlock(),i.createElementBlock("div",pT,[i.createElementVNode("div",mT,[i.createVNode(i.unref(A.OIcon),{onClick:s},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1}),r.headerTitle?(i.openBlock(),i.createElementBlock("div",gT,i.toDisplayString(r.headerTitle),1)):i.createCommentVNode("",!0)]),h.$slots.rightConfig?(i.openBlock(),i.createElementBlock("div",vT,[i.renderSlot(h.$slots,"rightConfig",{},void 0,!0)])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",_T,[i.createVNode(i.unref(A.OIcon),{onClick:l},{default:i.withCtx(()=>[o.value?(i.openBlock(),i.createBlock(i.unref(Nl),{key:1})):(i.openBlock(),i.createBlock(i.unref(hT),{key:0}))]),_:1})]),i.createVNode(uT,{ref:"mobileNav","nav-data":r.navData,"code-data":r.codeData,"menu-show":o.value,onLinkClick:c},{tool:i.withCtx(()=>[i.renderSlot(h.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","menu-show"]),i.createElementVNode("div",yT,[i.createElementVNode("div",{class:"header-logo",onClick:a},[i.renderSlot(h.$slots,"logo",{},()=>[n.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:n.logo},null,8,TT)):i.createCommentVNode("",!0)],!0)])]),i.createElementVNode("div",bT,[i.renderSlot(h.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]))}}),Dc=He._export_sfc(xT,[["__scopeId","data-v-4271939e"]]),CT=Object.assign(wc,{install(r){r.component("OEventsCalendar",wc)}}),ET=Object.assign(Dc,{install(r){r.component("OEventsList",Dc)}}),ST=["title"],kT={class:"text"},wT={key:0,class:"tag-wrapper"},DT={class:"start-time"},AT={class:"calendar-info"},wh=i.defineComponent({__name:"OMeetingCalendarList",props:{list:{default:()=>[]},groupType:{}},setup(r){const e=r,{t,locale:n}=He.useI18n(),s=i.ref([]),a=A.useMessage(),o=async k=>{await s.value[k].copyInfo(),a.success({content:t("common.copySuccess")})},l=i.ref([]),c=i.computed(()=>({SIG_GROUP:`${e.groupType===Oi.GROUP?t("meeting.groups"):t("meeting.sigs")}: `,NEW_DATE:t("meeting.latestMeeting"),EMPTY_TEXT:t("meeting.meetingEmptyText"),LEARN_MORE:t("common.seeMore"),JOIN_MEETING:t("meeting.joinMeeting"),SIGN:t("meeting.sign"),DETAILS:t("meeting.detail")})),h=i.ref(),m=new ResizeObserver(k=>{for(let T of k){const{height:I}=T.contentRect;T.target.classList.remove("hidden-divider"),I>=30&&T.target.classList.add("hidden-divider")}});i.watch(()=>e.list,()=>{e.list.length===1?l.value=[e.list[0].id]:l.value=[],i.nextTick(()=>{var k;(k=h.value)==null||k.forEach(T=>{m.observe(T)})})});const g=i.computed(()=>e.list.map(k=>{var w,F;const T=k.type;let I="";if(["activity"].includes(T)){let z=(w=ia.get(k.activity_type))==null?void 0:w.label;return k.end_date===k.start_date?{...k,activity_type:z,dateRange:`${pt(k.start_date)} ${k.start}-${k.end}`}:{...k,activity_type:z,dateRange:`${pt(k.start_date)} ${k.start}-${pt(k.end_date)} ${k.end}`}}if(["events","summit"].includes(T))return I=`${pt(k.start_date,"YYYY/MM/DD HH:mm")} ${pt(k.end_date,"YYYY/MM/DD HH:mm")}`,{...k,dateRange:I};const{is_cycle:_,date:S,start:R,end:L,cycle_start_date:O,cycle_end_date:H,cycle_start:M,cycle_end:P,cycle_type:N,cycle_interval:X,cycle_point:b}=k;I=`${pt(S)} ${R} - ${L}`,_&&(I=`${pt(O)} - ${pt(H)}`);let C=`${R} - ${L}`,$=null,U=!1;const E=((F=k.obs_data)==null?void 0:F.filter(z=>z.text_video_url))||[];if(_){let z="";N===gn&&(z=t("meeting.cycleDay")),N===_n&&(X>1?z=t("meeting.cycleWeek.other",[Qn(N,b),X]):z=t("meeting.cycleWeek.one",[Qn(N,b)])),N===rn&&(z=t("meeting.cycleMonth",[Qn(N,b)])),C=t("meeting.cycleMeetingText2",{startDate:O,endDate:H,startTime:M,endTime:P,cycleType:z}),U=E.some(Q=>{var q;return Q.sub_id===((q=k.cycle_sub.find(Z=>Z.date===S))==null?void 0:q.sub_id)})}else U=E.length>0;return U&&($=`${location.origin}/${n.value}/video/${k.group_name}/${k.mid}/${S}`),{...k,dateRange:I,timeRange:C,replay_url:$}}));return(k,T)=>{var I,_;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["o-meeting-calendar-list",(I=g.value)!=null&&I.length?"":"is-empty"])},[(_=g.value)!=null&&_.length?(i.openBlock(),i.createBlock(i.unref(A.OCollapse),{key:1,modelValue:l.value,"onUpdate:modelValue":T[0]||(T[0]=S=>l.value=S),style:{"--collapse-padding":"0"}},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.value,(S,R)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:S.id,value:S.id},{title:i.withCtx(()=>[i.createElementVNode("div",{class:"meet-title",title:S.topic||S.name},[i.createVNode(i.unref(A.OIcon),{style:i.normalizeStyle({backgroundColor:`${i.unref(ri)(S.type,"color")}`})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(ri)(S.type,"icon"))))]),_:2},1032,["style"]),i.createElementVNode("div",kT,i.toDisplayString(S.topic||S.name||S.title),1),S.is_cycle?(i.openBlock(),i.createElementBlock("div",wT,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],8,ST),i.createElementVNode("div",{class:"meet-info",ref_for:!0,ref_key:"meetInfoRef",ref:h},[i.createElementVNode("span",DT,[i.createElementVNode("span",null,i.toDisplayString(S.dateRange),1)]),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("div",null,[S.group_name?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(c.value.SIG_GROUP)+" "+i.toDisplayString(S.group_name),1)],64)):i.createCommentVNode("",!0),S.activity_type?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(S.activity_type),1)],64)):i.createCommentVNode("",!0)])],512),S.url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:S.url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c.value.LEARN_MORE),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),S.join_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,href:S.join_url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c.value.JOIN_MEETING),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),S.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,href:S.content_url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c.value.DETAILS),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),S.register_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,href:S.register_url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Yr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c.value.SIGN),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>o(R),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Ll))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",AT,[i.createVNode(rs,{show:l.value.includes(S.id),data:S,ref_for:!0,ref:L=>s.value[R]=L,from:"home"},null,8,["show","data"])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):i.renderSlot(k.$slots,"empty",{key:0})],2)}}}),NT={class:"o-meeting-calendar"},IT={class:"calendar-body"},OT={class:"calender-header-left"},BT={class:"left-title"},LT={class:"month-date"},MT={class:"right-title"},PT=["onClick"],RT={class:"day-box"},VT={class:"icon-box"},FT={class:"detail-list"},$T={class:"current-day"},UT={class:"right-title"},qT={class:"title-list"},HT="2021-01-01",Ac=i.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:Oi.SIG}},setup(r){i.useCssVars(G=>({v2a532797:S.value}));const e=r,{t,locale:n}=He.useI18n(),s=i.computed(()=>n.value===He.Locales.EN),a=i.ref(""),o=i.ref([]),l=i.ref([]),c=i.ref([]),h=i.ref([]),m=i.ref([]),g=i.ref([]),k=i.ref([]),T=i.ref(na[0].value),I=i.computed(()=>{let G=na;return e.hiddenEvents&&(G=G.filter(J=>J.value!==Ve.EVENTS)),e.hiddenSummit&&(G=G.filter(J=>J.value!==Ve.SUMMIT)),G.filter(J=>J.value!==Ve.ALL).length===1?[]:G});i.watch(()=>I.value,()=>{var G;T.value=((G=I.value[0])==null?void 0:G.value)??Ve.MEETING});const _=i.ref(),S=i.ref("407px"),R=i.ref(!1),L=i.ref(""),O=i.ref(!1),H=i.ref(""),M=i.ref([]),P=async G=>{if(e.getSummitListRequest){const J=await e.getSummitListRequest(G);l.value=(J||[]).map(ie=>({...ie,type:"summit"}))}else l.value=[]},N=async G=>{if(e.getEventsListRequest){const J=await e.getEventsListRequest(G);h.value=(J||[]).map(ie=>({...ie,type:"activity",start_date_time:`${pt(ie.start_date)} ${ie.start}`,end_date_time:`${pt(ie.end_date)} ${ie.end}`}))}else h.value=[]},X=async G=>{e.getDateListRequest&&e.getDateListRequest(G).then(J=>{o.value=J}),e.getEventsDatesRequest&&e.getEventsDatesRequest(G).then(J=>{m.value=J}),e.getSummitDatesRequest&&e.getSummitDatesRequest(G).then(J=>{c.value=J})},b=async G=>{if(e.getMeetingListRequest&&G.date)try{const J=await e.getMeetingListRequest(G.date,H.value);k.value=J.map(ie=>({...ie,time:`${ie.start}-${ie.end}`,type:"meeting",date:ie.date||G.date})).sort((ie,oe)=>{var Ee,ue;return parseInt((Ee=ie.start||ie.cycle_start)==null?void 0:Ee.replace(":",""))-parseInt(oe.end||((ue=oe.cycle_end)==null?void 0:ue.replace(":","")))}),M.value=[...new Set(k.value.map(ie=>ie.group_name))].map(ie=>({group_name:ie})),M.value.find(ie=>ie.group_name===H.value)||(H.value="")}catch{k.value=[]}},C=i.computed(()=>[...k.value.filter(G=>!H.value||G.group_name===H.value),...h.value.filter(G=>{var J;return!Te(G.start_date).isAfter(Te(L.value))&&!Te(L.value).isAfter(Te(G.end_date))||((J=G.dates)==null?void 0:J.includes(L.value))}),...l.value.filter(G=>{var J;return(J=G.dates)==null?void 0:J.includes(L.value)})].filter(G=>T.value==="all"?!0:G.type===T.value)),$=async G=>{const J=Te(G).format("YYYY-MM-DD");if(L.value=J,P(J),N(J),X(J),g.value=[...new Set([...o.value,...c.value,...m.value])].flat().sort((ie,oe)=>Te(ie).isAfter(Te(oe))?1:-1),!G)if(!g.value.length)a.value=pt(new Date);else{let ie=[...g.value].reverse().find(oe=>Te().isAfter(Te(oe)));ie||(ie=g.value.find(oe=>Te(oe).isAfter(Te()))),a.value=pt(ie)}b({date:J,type:T.value})};i.watch([()=>T.value,()=>I.value],()=>{U()});function U(){i.nextTick(()=>{b({date:L.value,type:T.value})})}const E=zi.useDebounceFn((G,J)=>{if(O.value){O.value=!1;return}if(new Date(G).getTime()/1e3<1610380800){J==null||J.stopPropagation();return}$(G)},300),w=(G,J)=>{if(pt(J)===pt(HT)&&G==="prev-month"){R.value=!0;return}R.value=!1,_.value.selectDate(G),E(pt(_.value.selectedDay))},F=G=>G.replace(/^0+(?=\d)/,""),z=G=>{new MutationObserver(function(){S.value=`${G.offsetHeight-2}px`}).observe(G,{childList:!0,subtree:!0,characterData:!0})};i.onMounted(()=>{const G=document.querySelector(".calendar-body .el-calendar__body");G&&(z(G),S.value=`${G.offsetHeight-2}px`),$()});const Q=i.watch(()=>g.value.length,()=>{A.isClient&&!L.value&&i.nextTick(()=>{const G=document.querySelector(".is-today .out-box");G&&(O.value=!0,G.click(),Q())})}),q=G=>s.value?G.split(" ").reverse().join(" "):G,Z=(G,J)=>G===Ve.MEETING?[Ve.ALL,Ve.MEETING].includes(T.value)&&o.value.includes(J):G===Ve.SUMMIT?[Ve.ALL,Ve.SUMMIT].includes(T.value)&&c.value.includes(J):G===Ve.EVENTS?[Ve.ALL,Ve.EVENTS].includes(T.value)&&m.value.includes(J):!1;return(G,J)=>(i.openBlock(),i.createElementBlock("div",NT,[i.createElementVNode("div",IT,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendar",ref:_,class:"calender"},{header:i.withCtx(({date:ie})=>[i.createElementVNode("div",OT,[i.createElementVNode("div",BT,[i.createVNode(i.unref(A.OIcon),{onClick:oe=>w("prev-month",ie)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft),{class:i.normalizeClass({disable:R.value})},null,8,["class"])]),_:1},8,["onClick"]),i.createElementVNode("span",LT,i.toDisplayString(q(ie)),1),i.createVNode(i.unref(A.OIcon),{onClick:oe=>w("next-month",ie)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1},8,["onClick"])]),i.createVNode(i.unref(A.OSelect),{modelValue:H.value,"onUpdate:modelValue":J[0]||(J[0]=oe=>H.value=oe),placeholder:r.groupType===i.unref(Oi).GROUP?i.unref(t)("meeting.allGroups"):i.unref(t)("meeting.allSigs"),clearable:""},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(M.value,oe=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:oe.group_name,key:oe.group_name},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(oe.group_name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])]),i.createElementVNode("div",MT,[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+"  ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(a.value).format("YYYY/MM/DD")),1)])]),"date-cell":i.withCtx(({data:ie})=>[i.createElementVNode("div",{class:i.normalizeClass(["out-box",{"has-calender":g.value.includes(ie.day)}]),onClick:oe=>i.unref(E)(ie.day,oe)},[i.createElementVNode("div",RT,[i.createElementVNode("p",{class:i.normalizeClass([ie.isSelected?"is-selected":"","date-calender"])},i.toDisplayString(F(ie.day.split("-").at(-1)||"")),3),i.createElementVNode("div",VT,[Z(i.unref(Ve).MEETING,ie.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"meeting",style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).MEETING,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).MEETING,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(Bl))]),_:1},8,["style"])):i.createCommentVNode("",!0),Z(i.unref(Ve).EVENTS,ie.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,class:"events",style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).EVENTS,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).EVENTS,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(Ol))]),_:1},8,["style"])):i.createCommentVNode("",!0),Z(i.unref(Ve).SUMMIT,ie.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:2,class:"summit",style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).SUMMIT,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).SUMMIT,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(Th))]),_:1},8,["style"])):i.createCommentVNode("",!0)])])],10,PT)]),_:1},512),i.createElementVNode("div",FT,[i.createElementVNode("div",$T,[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+"  ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(L.value).format("YYYY/MM/DD")),1)]),i.createElementVNode("div",UT,[i.createElementVNode("div",qT,[i.createVNode(i.unref(A.OSelect),{modelValue:H.value,"onUpdate:modelValue":J[1]||(J[1]=ie=>H.value=ie),placeholder:i.unref(t)("meeting.allSigs"),clearable:""},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(M.value,ie=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:ie.group_name,key:ie.group_name},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(ie.group_name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"]),i.createVNode(i.unref(A.OTab),{modelValue:T.value,"onUpdate:modelValue":J[2]||(J[2]=ie=>T.value=ie),line:!1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,ie=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:ie.value,value:ie.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(ie.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(ie.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OScroller),{class:"meeting-list","show-type":"hover",size:"small"},{default:i.withCtx(()=>[i.createVNode(wh,{list:C.value,groupType:r.groupType},{empty:i.withCtx(()=>[i.renderSlot(G.$slots,"empty")]),_:3},8,["list","groupType"])]),_:3})])])])]))}}),jT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function zT(r,e){return i.openBlock(),i.createElementBlock("svg",jT,[...e[0]||(e[0]=[i.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 Nc={name:"meeting-icon-help",render:zT},GT={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function WT(r,e){return i.openBlock(),i.createElementBlock("svg",GT,[...e[0]||(e[0]=[i.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 Ic={name:"meeting-icon-tip",render:WT},YT=i.defineComponent({__name:"OMeetingCalendarSelector",props:{modelValue:{default:()=>[]},multiple:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const{t}=He.useI18n(),n=r,s=e,a=()=>{let _=[];for(let S=1;S<=31;S++)_.push(S);return _},o=i.computed(()=>a()),l=i.ref([]),c=i.ref([]),h=i.ref(null),m=()=>{l.value=[...n.modelValue],c.value=[...n.modelValue]};i.watchEffect(()=>{m()});const g=()=>{s("update:modelValue",c.value),h.value.expanded=!1},k=()=>{m(),h.value.expanded=!1},T=_=>{if(n.multiple){const S=c.value.indexOf(_);S===-1?c.value.push(_):c.value.splice(S,1),c.value.sort()}else c.value=[_],g()},I=_=>{n.multiple?T(_):c.value=[],g()};return(_,S)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["calendar-selector",!r.multiple&&"is-single"])},[i.createVNode(i.unref(tt.ElSelect),{ref_key:"selectorRef",ref:h,"popper-class":"calendar-selector-popper",placeholder:i.unref(t)("meeting.selectRepeatDate"),size:"large",multiple:"",collapseTags:"",maxCollapseTags:"3",modelValue:l.value,onRemoveTag:I},i.createSlots({default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,R=>(i.openBlock(),i.createBlock(i.unref(tt.ElOption),{key:R,label:R,value:R,onClick:L=>T(R),class:i.normalizeClass(c.value.includes(R)&&"is-checked")},null,8,["label","value","onClick","class"]))),128))]),_:2},[r.multiple?{name:"footer",fn:i.withCtx(()=>[i.createVNode(i.unref(A.OButton),{round:"pill",color:"primary",variant:"outline",onClick:g},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.confirm")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{variant:"text",onClick:k},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.cancel")),1)]),_:1})]),key:"0"}:void 0]),1032,["placeholder","modelValue"])],2))}}),XT=He._export_sfc(YT,[["__scopeId","data-v-7b619c59"]]),KT={class:"o-meeting-form"},QT={class:"label-wrapper"},ZT={class:"o-meeting-form-popover-content etherpad"},JT={class:"repeat-config-wrapper"},eb={class:"repeat-config"},tb={class:"repeat-config-item"},ib={class:"time-select-wrapper"},nb={key:1},rb={key:1,class:"switch-wrapper"},sb={class:"switch-text"},ab={key:1,class:"switch-wrapper"},ob={class:"switch-text"},lb={class:"label-wrapper"},ub={class:"o-meeting-form-popover-content"},cb=["href"],db={key:0,class:"form-btns"},Oc=i.defineComponent({__name:"OMeetingForm",props:{data:{},isSub:{type:Boolean,default:!1},isEdit:{type:Boolean,default:!1},subId:{},createMeetingRequest:{},editMeetingRequest:{},editSubMeetingRequest:{},getPlatformsRequest:{},getGroupsRequest:{},showBtns:{type:Boolean,default:!0},groupType:{default:Oi.SIG},bookText:{}},emits:["confirm","cancel"],setup(r,{expose:e,emit:t}){const{t:n,locale:s}=He.useI18n(),a=r,o=A.useMessage(null),l=i.ref(j2),c=i.ref(Xs),h=i.computed(()=>Sh(g.value.cycle_type,l.value,"max")),m={is_record:!1,agenda:"",email_list:"",platform:"",topic:"",group_name:"",etherpad:"",date:"",date_range:[],start:"",end:"",time:"",is_cycle:!1,cycle_interval:1,cycle_type:gn,cycle_point:[]},g=i.ref(Object.assign({},m)),k=i.ref(null),T=i.ref(!1),I=i.computed(()=>({topic:[{required:!0,message:n("meeting.enterMeetingName")},{validator:U=>{if(U.length>128)return{type:"danger",message:n("meeting.meetingNameTooLong")}}}],agenda:[{validator:U=>{if(U.length>4096)return{type:"danger",message:n("meeting.meetingAgendaTooLong")}}}],group_name:[{required:!0,message:a.groupType===Oi.GROUP?n("meeting.selectGroup"):n("meeting.selectSig")}],etherpad:[{required:!0,message:n("meeting.enterEtherpad")}],date:[{required:!0,message:n("meeting.selectDate")}],time:[{validator:U=>{var G;const{is_cycle:E,cycle_type:w,cycle_interval:F,cycle_point:z,date:Q,date_range:q}=g.value;if(E){const J={type:"danger",message:n("meeting.finishMeetingConfig")};if(w===gn&&!F||w===_n&&(!F||!(z!=null&&z.length))||w===rn&&(!F||!(z!=null&&z.length)))return J;if(!(q!=null&&q.length))return{type:"danger",message:n("meeting.selectMeetingDate")};const ie=n("meeting.invalidMeetingDuration");let oe=q[0];const Ee=q[1];if(w===_n){const ue=new Set;for(;!Te(oe).isAfter(Te(Ee));)ue.add(Te(oe).day()),oe=Te(oe).add(1,"day");if(z.every($e=>!ue.has($e)))return{type:"danger",message:ie}}if(w===rn){const ue=new Set;for(;!Te(oe).isAfter(Te(Ee));)ue.add(Te(oe).date()),oe=Te(oe).add(1,"day");if(z.every($e=>!ue.has($e)))return{type:"danger",message:ie}}}else if(!Q)return{type:"danger",message:n("meeting.selectMeetingDate")};if(!((G=U==null?void 0:U.trim())!=null&&G.length))return{type:"danger",message:n("meeting.selectMeetingTime")};const Z=U.split("-").map(J=>J.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(!g.value.is_cycle&&g.value.date&&g.value.start){const J=Te(`${g.value.date} ${g.value.start}`);if(new Date(J).getTime()<new Date().getTime())return{type:"danger",message:n("meeting.startTimeBeforeEndTime")}}},triggers:["blur","change"]}],platform:[{required:!0,message:n("meeting.selectPlatform")}],email_list:[{validator:U=>{if(a.isEdit)return{};const E=U.replaceAll(" ","").replaceAll(",",";")||"";if(E.length){if(E.length>1020)return{type:"danger",message:n("meeting.emailTooLong")};const w=E.split(";")||[];if(w.some(F=>!xh.test(F)))return{type:"danger",message:n("meeting.emailInvalid")};if(w.some(F=>F.length>50))return{type:"danger",message:n("meeting.singleEmailTooLong")};if(w.length>20)return{type:"danger",message:n("meeting.emailCountTooLong")}}},triggers:["blur","change"]}]})),_=i.ref([]),S=async()=>{if(!a.getGroupsRequest)return;const U=await a.getGroupsRequest();_.value=U.map(E=>({label:E.group_name,value:E.group_name,...E})),a.data&&b(g.value.group_name)},R=i.ref([]),L=async()=>{if(!a.getPlatformsRequest)return;const U=await a.getPlatformsRequest();R.value=U.map(E=>({label:kh(E),value:E})),a.data||(g.value.platform=R.value[0].value)},O=t;i.watch(()=>a.data,U=>{var E;if(U){const w=((E=U==null?void 0:U.cycle_sub)==null?void 0:E.find(G=>G.sub_id===a.subId))||{},{mid:F,date:z,start:Q,end:q,sub_id:Z}=w;Object.assign(g.value,U,a.isSub?{is_cycle:!1,mid:F,date:z,start:Q,end:q,sub_id:Z}:{})}else{const w=Te().format("YYYY-MM-DD"),F=Te().format("HH:mm");let z="",Q="";const q=On(F);if(q<=On("08:00"))z="08:00",Q="09:00";else if(On("22:15")<=q)z="08:00",Q="09:00";else{let[G,J]=F.split(":").map(Number);J>=45?(G++,J=0):J=(Math.floor(J/15)+1)*15,z=Tc(G*60+J).slice(3),Q=Tc(G*60+J+60).slice(3)}const Z=[Te().format("YYYY-MM-DD"),Te().add(1,"month").format("YYYY-MM-DD")];Object.assign(g.value,{date:w,start:z,end:Q,time:`${z}-${Q}`,date_range:Z})}},{immediate:!0,deep:!0});const H=()=>{g.value=Object.assign({},m),k.value.clearValidate(),k.value.resetFields(),O("cancel")},M=()=>{g.value.cycle_point=[],g.value.cycle_interval=1},P=()=>{g.value.platform="WELINK"},{lePadV:N}=Ct.useScreen(),X=async()=>{let U=a.isEdit?n("meeting.editSuccess"):n("meeting.booSuccess");try{if(T.value=!0,(await k.value.validate()).some(Fe=>!!Fe))return;const{topic:w,etherpad:F,group_name:z,platform:Q,date:q,start:Z,end:G,agenda:J,is_record:ie,is_cycle:oe,date_range:Ee,cycle_type:ue,cycle_interval:$e,cycle_point:Ie}=g.value;let Oe={topic:w,etherpad:F,agenda:J,is_record:ie,group_name:z,platform:Q,is_cycle:oe};if(oe?(Oe={...Oe,cycle_interval:$e,cycle_type:ue,cycle_start_date:(Ee==null?void 0:Ee[0])||"",cycle_end_date:(Ee==null?void 0:Ee[1])||"",cycle_start:Z,cycle_end:G},ue!==gn&&(Oe={...Oe,cycle_point:Ie.join(",")})):Oe={...Oe,date:(q==null?void 0:q.split(" ")[0])||"",start:Z,end:G},a.isEdit)if(a.isSub){const{mid:Fe,sub_id:Ze}=g.value,{date:Je,start:me,end:_e}=Oe;await(a==null?void 0:a.editSubMeetingRequest(Ze,{mid:Fe,date:Je,start:me,end:_e,is_notify:!0}))}else{const{email_list:Fe,platform:Ze,group_name:Je,etherpad:me,..._e}=Oe;await(a==null?void 0:a.editMeetingRequest(a.data.id,{..._e,is_notify:!0}))}else await(a==null?void 0:a.createMeetingRequest({...Oe,email_list:g.value.email_list.replaceAll(" ","")}));const Ye=n("meeting.meetingHandleSuccess",[g.value.topic,U]);o.success({content:Ye}),O("confirm")}finally{T.value=!1}};i.onMounted(()=>{S(),L()});const b=U=>{const E=_.value.find(w=>w.value===U);a.isEdit||(g.value.etherpad=(E==null?void 0:E.etherpad)||"",g.value.email_list=(E==null?void 0:E.email_list)||"")},C=U=>U.getTime()<Date.now()-1440*60*1e3,$=()=>{g.value.start&&g.value.end?g.value.time=`${g.value.start}-${g.value.end}`:g.value.time=""};return e({confirm:X}),(U,E)=>(i.openBlock(),i.createElementBlock("div",KT,[i.createVNode(i.unref(A.OForm),{model:g.value,ref_key:"formRef",ref:k,"has-required":"",layout:i.unref(N)?"v":"h",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:I.value.topic,label:i.unref(n)("meeting.meetingName"),field:"topic"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{disabled:r.isSub,size:"large",placeholder:i.unref(n)("meeting.enterMeetingName"),style:{width:"100%"},modelValue:g.value.topic,"onUpdate:modelValue":E[0]||(E[0]=w=>g.value.topic=w)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:I.value.group_name,label:r.groupType===i.unref(Oi).GROUP?i.unref(n)("meeting.meetingGroup"):i.unref(n)("meeting.meetingSig"),field:"group_name"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{disabled:r.isEdit,placeholder:r.groupType===i.unref(Oi).GROUP?i.unref(n)("meeting.selectGroup"):i.unref(n)("meeting.selectSig"),size:"large",style:{width:"100%"},modelValue:g.value.group_name,"onUpdate:modelValue":E[1]||(E[1]=w=>g.value.group_name=w),onChange:b},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(_.value,w=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:w.value,value:w.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),g.value.group_name?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,rules:I.value.etherpad,label:"Etherpad",field:"etherpad"},{label:i.withCtx(()=>[i.createElementVNode("div",QT,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.etherpad"))+" ",1),i.createVNode(i.unref(A.OPopover),null,{target:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Nc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",ZT,i.toDisplayString(i.unref(n)("meeting.etherpadDesc")),1)]),_:1})])]),default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{disabled:r.isEdit,size:"large",placeholder:i.unref(n)("meeting.enterEtherpad"),style:{width:"100%"},modelValue:g.value.etherpad,"onUpdate:modelValue":E[2]||(E[2]=w=>g.value.etherpad=w)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingTime"),field:"time",rules:I.value.time,class:"repeat-row",required:""},{default:i.withCtx(()=>[i.createElementVNode("div",JT,[r.isSub?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,field:"repeat",class:"repeat-item"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadioGroup),{modelValue:g.value.is_cycle,"onUpdate:modelValue":E[3]||(E[3]=w=>g.value.is_cycle=w),onChange:P,disabled:r.isEdit},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadio),{value:!1},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.nonRepeat")),1)]),_:1}),i.createVNode(i.unref(A.ORadio),{value:!0},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.isRepeat")),1)]),_:1})]),_:1},8,["modelValue","disabled"])]),_:1})),i.createElementVNode("div",eb,[g.value.is_cycle?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.every"),class:"full-width-item"},{default:i.withCtx(()=>[i.createElementVNode("div",tb,[g.value.cycle_type!==i.unref(rn)?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElInputNumber),{size:"large",modelValue:g.value.cycle_interval,"onUpdate:modelValue":E[4]||(E[4]=w=>g.value.cycle_interval=w),min:1,max:h.value},null,8,["modelValue","max"])]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{size:"large",modelValue:g.value.cycle_type,"onUpdate:modelValue":E[5]||(E[5]=w=>g.value.cycle_type=w),class:"interval-select",optionWrapClass:"o-meeting-form-interval-select-options",onChange:M},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,w=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:w.value,value:w.value,label:w.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1},8,["label"]),g.value.cycle_type!==i.unref(gn)?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,label:i.unref(n)("meeting.in"),field:"cycle_point",class:"point-item"},{default:i.withCtx(()=>[g.value.cycle_type===i.unref(_n)?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",multiple:"",modelValue:g.value.cycle_point,"onUpdate:modelValue":E[6]||(E[6]=w=>g.value.cycle_point=w),placeholder:i.unref(n)("meeting.selectRepeatDate"),"max-tag-count":1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,w=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:w.value,value:w.value,label:w.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])):i.createCommentVNode("",!0),g.value.cycle_type===i.unref(rn)?(i.openBlock(),i.createBlock(XT,{key:1,modelValue:g.value.cycle_point,"onUpdate:modelValue":E[7]||(E[7]=w=>g.value.cycle_point=w)},null,8,["modelValue"])):i.createCommentVNode("",!0)]),_:1},8,["label"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingDuration"),field:"date_range"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:g.value.date_range,"onUpdate:modelValue":E[8]||(E[8]=w=>g.value.date_range=w),"start-placeholder":i.unref(n)("meeting.startDate"),"end-placeholder":i.unref(n)("meeting.endDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":C,clearable:!1,type:"daterange","popper-class":"o-meeting-form-date-picker-popper"},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"])],64)):(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:1,label:i.unref(n)("meeting.meetingDate"),field:"date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{"popper-class":"o-meeting-form-date-picker-popper",size:"large",modelValue:g.value.date,"onUpdate:modelValue":E[9]||(E[9]=w=>g.value.date=w),placeholder:i.unref(n)("meeting.selectDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":C,clearable:!1},null,8,["modelValue","placeholder"])]),_:1},8,["label"])),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingTime")},{default:i.withCtx(()=>[i.createElementVNode("div",ib,[i.createVNode(i.unref(A.OFormItem),{field:"start"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:i.unref(n)("meeting.startTime"),modelValue:g.value.start,"onUpdate:modelValue":E[10]||(E[10]=w=>g.value.start=w),size:"large",clearable:!1,onChange:$},null,8,["placeholder","modelValue"])]),_:1}),E[17]||(E[17]=i.createElementVNode("span",null,"-",-1)),i.createVNode(i.unref(A.OFormItem),{field:"end"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:i.unref(n)("meeting.endTime"),modelValue:g.value.end,"onUpdate:modelValue":E[11]||(E[11]=w=>g.value.end=w),size:"large",clearable:!1,onChange:$},null,8,["placeholder","modelValue"])]),_:1}),i.createVNode(i.unref(A.OIconTime))])]),_:1},8,["label"])])])]),_:1},8,["label","rules"]),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingPlatform"),field:"platform",rules:I.value.platform},{default:i.withCtx(()=>[r.data?(i.openBlock(),i.createElementBlock("span",nb,i.toDisplayString(g.value.platform),1)):(i.openBlock(),i.createBlock(i.unref(A.ORadioGroup),{key:0,modelValue:g.value.platform,"onUpdate:modelValue":E[12]||(E[12]=w=>g.value.platform=w),disabled:g.value.is_cycle},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(R.value,w=>(i.openBlock(),i.createBlock(i.unref(A.ORadio),{key:w.value,value:w.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled"]))]),_:1},8,["label","rules"]),i.createVNode(i.unref(A.OFormItem),{field:"agenda",label:i.unref(n)("meeting.meetingAgenda"),rules:I.value.genda},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:r.isSub,size:"large",placeholder:i.unref(n)("meeting.enterMeetingAgenda"),style:{width:"100%"},rows:4,modelValue:g.value.agenda,"onUpdate:modelValue":E[13]||(E[13]=w=>g.value.agenda=w)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label","rules"]),i.createVNode(i.unref(A.OFormItem),{label:i.unref(n)("meeting.meetingRecord"),field:"is_record",class:"record-item full-width-item"},{default:i.withCtx(()=>[i.unref(N)?(i.openBlock(),i.createBlock(i.unref(A.OSwitch),{key:0,modelValue:g.value.is_record,"onUpdate:modelValue":E[14]||(E[14]=w=>g.value.is_record=w),disabled:r.isSub},null,8,["modelValue","disabled"])):(i.openBlock(),i.createElementBlock("div",rb,[i.createVNode(i.unref(A.OSwitch),{modelValue:g.value.is_record,"onUpdate:modelValue":E[15]||(E[15]=w=>g.value.is_record=w),disabled:r.isSub},null,8,["modelValue","disabled"]),i.createElementVNode("div",sb,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Ic))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[g.value.platform])),1)])]))]),_:1},8,["label"]),i.unref(N)?(i.openBlock(),i.createElementBlock("div",ab,[i.createElementVNode("div",ob,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Ic))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[g.value.platform])),1)])])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{field:"email_list",rules:I.value.email_list},{label:i.withCtx(()=>[i.createElementVNode("div",lb,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingEmail"))+" ",1),i.createVNode(i.unref(A.OPopover),null,{target:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Nc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",ub,[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.meetingEmailDesc"))+" ",1),i.createElementVNode("a",{class:"link-text",href:`/${i.unref(s)}/sig`},i.toDisplayString(i.unref(n)("meeting.sigGroupEmail")),9,cb)])]),_:1})])]),default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:r.isEdit,size:"large",placeholder:i.unref(n)("meeting.enterEmail"),style:{width:"100%"},rows:4,modelValue:g.value.email_list,"onUpdate:modelValue":E[16]||(E[16]=w=>g.value.email_list=w)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),r.showBtns?(i.openBlock(),i.createElementBlock("div",db,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",onClick:X,loading:T.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(r.isEdit?i.unref(n)("common.save"):r.bookText||i.unref(n)("meeting.book")),1)]),_:1},8,["loading"]),i.createVNode(i.unref(A.OButton),{color:"primary",variant:"outline",size:"large",onClick:H},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.cancel")),1)]),_:1})])):i.createCommentVNode("",!0)]))}}),hb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function fb(r,e){return i.openBlock(),i.createElementBlock("svg",hb,[...e[0]||(e[0]=[i.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),i.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),i.createElementVNode("path",{fill:"#0071f3",d:"M22.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497zM1.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497z"},null,-1)])])}const pb={name:"meeting-icon-playing",render:fb},mb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function gb(r,e){return i.openBlock(),i.createElementBlock("svg",mb,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M23.399 22.031l0.116 0.099 3.68 3.672c0.365 0.364 0.365 0.955 0.001 1.32-0.328 0.328-0.839 0.361-1.204 0.1l-0.116-0.099-3.68-3.672c-0.365-0.364-0.365-0.955-0.001-1.32 0.328-0.328 0.839-0.361 1.204-0.1zM14.428 4.605c5.465 0 9.897 4.431 9.897 9.897s-4.431 9.897-9.897 9.897c-5.465 0-9.897-4.431-9.897-9.897s4.431-9.897 9.897-9.897zM14.428 6.472c-4.435 0-8.031 3.595-8.031 8.031s3.595 8.031 8.031 8.031c4.435 0 8.031-3.595 8.031-8.031s-3.595-8.031-8.031-8.031z"},null,-1)])])}const vb={name:"components-icon-search",render:gb},_b={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function yb(r,e){return i.openBlock(),i.createElementBlock("svg",_b,[...e[0]||(e[0]=[i.createElementVNode("path",{fill:"currentColor",d:"M5.759 15.127c0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.016-5.016c0.1-0.1 0.254-0.115 0.37-0.043l0.054 0.043 5.062 5.062c0.273 0.273 0.717 0.273 0.99 0 0.251-0.251 0.271-0.644 0.063-0.918l-0.063-0.072-5.062-5.062c-0.629-0.629-1.628-0.662-2.296-0.099l-0.108 0.099-5.016 5.016c-0.273 0.273-0.273 0.717 0 0.99z"},null,-1)])])}const Tb={name:"components-icon-chevron-up",render:yb},bb={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function xb(r,e){return i.openBlock(),i.createElementBlock("svg",bb,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M3.42 6.060c0-2.52 2.040-4.575 4.575-4.575 2.52 0 4.575 2.055 4.575 4.575s-2.055 4.575-4.575 4.575c-2.535 0-4.575-2.055-4.575-4.575zM15.015 10.47c0-1.8 1.455-3.27 3.255-3.27 1.815 0 3.27 1.47 3.27 3.27s-1.455 3.27-3.27 3.27c-1.8 0-3.255-1.47-3.255-3.27zM4.56 12.915h6.855c2.535 0 4.575 2.055 4.575 4.575 0 0.255-0.015 0.51-0.060 0.75-0.36 2.16-2.235 3.825-4.515 3.825h-6.855c-2.52 0-4.575-2.055-4.575-4.575s2.055-4.575 4.575-4.575zM17.595 17.49c0-0.75-0.135-1.455-0.375-2.115h3.51c1.8 0 3.255 1.455 3.255 3.255s-1.455 3.27-3.255 3.27h-4.995c1.155-1.125 1.86-2.685 1.86-4.41z"},null,-1)])])}const Cb={name:"meeting-icon-speaker",render:xb},Eb={class:"o-meeting-playback-subtitles"},Sb={class:"search-captions"},kb={key:0,class:"suffix-box"},wb={class:"right-handle"},Db=["onClick"],Ab={class:"info"},Nb={class:"num"},Ib={class:"speaker"},Ob={class:"start-time"},Bb={class:"text"},Lb={key:1},Mb=i.defineComponent({__name:"OMeetingPlaybackSubtitles",props:{captions:{default:()=>[]},instance:{},trackIdx:{}},setup(r){const e=ka(),t=r,{t:n}=He.useI18n(),s=i.computed(()=>t.trackIdx),a=i.ref(),o=i.ref(!1),l=()=>{o.value=!0},c=zi.useDebounceFn(()=>{o.value=!1},3e3);i.watch(()=>o.value,E=>{E&&c()});const h=i.ref([]);i.watch(()=>t.captions,()=>{h.value=t.captions||[],i.nextTick(()=>{var E;a.value&&((E=a.value)==null||E.scrollTo({top:0,behavior:"smooth"}))})},{immediate:!0,deep:!0});const m=E=>`00:${E.split(".")[0]}`.slice(-8),g=E=>{const w=E.split(":"),F=w[w.length-3]?parseInt(w[w.length-3]):0,z=parseInt(w[w.length-2]),Q=parseFloat(w[w.length-1]);return F*60*60+z*60+Q};i.onMounted(()=>{var E;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(E=a.value)==null||E.addEventListener("wheel",l)}),i.watch(()=>h.value,()=>{var E;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(E=a.value)==null||E.addEventListener("wheel",l)});const k=i.ref(0),T=()=>{},I=E=>{const w=t.instance;if(!w)return;const F=g(E);w.currentTime(F)},_=i.ref(""),S=i.ref(0),R=i.ref(0),L=i.ref([]),O=n("common.all"),H=i.computed(()=>[...new Set(t.captions.map(E=>E.speakerLabel).sort().reverse())]);i.watch(()=>s.value,()=>{var w,F;if(o.value&&_.value)return;const E=(w=a.value)==null?void 0:w.querySelectorAll(".captions-item")[s.value-1];(F=a.value)==null||F.scrollTo({top:(E==null?void 0:E.offsetTop)-16,behavior:"smooth"})}),i.onUnmounted(()=>{a.value&&a.value.removeEventListener("wheel",l)});const M=(E,w)=>{var Z,G,J,ie,oe,Ee;const F=document.getElementsByClassName("light-keyword")[E-1],z=document.getElementsByClassName("light-keyword")[E-w];z==null||z.classList.remove("light-keyword-active"),F==null||F.classList.add("light-keyword-active");const Q=F.offsetTop+F.offsetHeight<((Z=a.value)==null?void 0:Z.scrollTop),q=F.offsetTop>((G=a.value)==null?void 0:G.offsetHeight)+((J=a.value)==null?void 0:J.scrollTop);(Q||q)&&((Ee=a.value)==null||Ee.scrollTo({top:(oe=(ie=F.parentElement)==null?void 0:ie.parentElement)==null?void 0:oe.offsetTop,behavior:"smooth"}))},P=()=>{!S.value||R.value===1||(R.value--,M(R.value,0))},N=E=>{E!=null&&E.shiftKey||!S.value||R.value===S.value||(R.value++,M(R.value,2))},X=E=>{h.value=t.captions.filter(w=>L.value.includes(w.speakerLabel)).map(w=>({...w,contentHtml:E?w.contentHtml.replaceAll(E,`<span class="light-keyword">${E}</span>`):w.contentHtml})),i.nextTick(()=>{var F;const w=document.getElementsByClassName("light-keyword");S.value=w.length,S.value?N():(F=a.value)==null||F.scrollTo({top:0,behavior:"smooth"})})},b=zi.useDebounceFn(X,300);i.watch(()=>_.value,E=>{R.value=0,b(E)}),i.watch(()=>H.value,E=>{L.value=E},{immediate:!0});const C=i.ref(!1),$=i.ref(!1),U=E=>{$.value=!1,E?L.value=H.value:L.value=[]};return i.watch(()=>L.value,E=>{E.length===0?(C.value=!1,$.value=!1):E.length===H.value.length?(C.value=!0,$.value=!1):$.value=!0,b(_.value)},{deep:!0}),(E,w)=>(i.openBlock(),i.createElementBlock("div",Eb,[i.createElementVNode("div",Sb,[i.createVNode(i.unref(A.OInput),{modelValue:_.value,"onUpdate:modelValue":w[1]||(w[1]=F=>_.value=F),onKeydown:[i.withKeys(N,["enter"]),i.withKeys(i.withModifiers(P,["shift","stop"]),["enter"])],placeholder:i.unref(n)("meeting.searchSubtitlePlaceholder"),size:"large",class:"input-captions"},{prefix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(vb))]),_:1})]),suffix:i.withCtx(()=>[_.value?(i.openBlock(),i.createElementBlock("div",kb,[i.createElementVNode("span",null,i.toDisplayString(R.value)+"/"+i.toDisplayString(S.value),1),i.createVNode(i.unref(A.OIcon),{onClick:P},{default:i.withCtx(()=>[i.createVNode(i.unref(Tb))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:N},{default:i.withCtx(()=>[i.createVNode(i.unref(Il))]),_:1}),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createVNode(i.unref(A.OIcon),{class:"hover-close",onClick:w[0]||(w[0]=F=>_.value="")},{default:i.withCtx(()=>[i.createVNode(i.unref(Nl))]),_:1})])):i.createCommentVNode("",!0)]),_:1},8,["modelValue","onKeydown","placeholder"]),i.createElementVNode("div",wb,[i.createVNode(i.unref(tt.ElSelect),{multiple:"",modelValue:L.value,"onUpdate:modelValue":w[3]||(w[3]=F=>L.value=F),"popper-class":"speakers-selector-popper",class:"speakers-selector",placement:"bottom"},{prefix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Cb))]),_:1})]),header:i.withCtx(()=>[i.createVNode(i.unref(tt.ElCheckbox),{modelValue:C.value,"onUpdate:modelValue":w[2]||(w[2]=F=>C.value=F),indeterminate:$.value,onChange:U},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(O)),1)]),_:1},8,["modelValue","indeterminate"])]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(H.value,F=>(i.openBlock(),i.createBlock(i.unref(tt.ElOption),{key:F,label:F,value:F},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElCheckbox),{"model-value":L.value.includes(F)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(F),1)]),_:2},1032,["model-value"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),i.createVNode(i.unref(A.OTab),{modelValue:k.value,"onUpdate:modelValue":w[4]||(w[4]=F=>k.value=F),variant:"text",class:"captions-tab",onChange:T},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTabPane),{value:0,label:i.unref(n)("meeting.audioToText")},{default:i.withCtx(()=>[h.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,id:"captionsScrollDom",class:"captions-scroller","show-type":"hover",size:"small","disabled-x":""},{default:i.withCtx(()=>[i.createVNode(i.unref(A.ORow),{gap:"0 12px",wrap:"wrap"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.value,(F,z)=>(i.openBlock(),i.createBlock(i.unref(A.OCol),{flex:"0 0 100%",key:z},{default:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["captions-item",{"captions-item-active":s.value===z+1}]),onClick:Q=>I(F.start_time)},[i.createElementVNode("div",Ab,[i.createElementVNode("div",Nb,i.toDisplayString(F.speakerIdx),1),i.createElementVNode("div",Ib,i.toDisplayString(F.speakerLabel),1),i.createElementVNode("div",Ob,i.toDisplayString(m(F.start_time)),1),s.value===z+1?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"playing initial-fill"},{default:i.withCtx(()=>[i.createVNode(i.unref(pb))]),_:1})):i.createCommentVNode("",!0)]),i.withDirectives(i.createElementVNode("div",Bb,null,512),[[i.unref(e),F.contentHtml]])],10,Db)]),_:2},1024))),128))]),_:1})]),_:1})):(i.openBlock(),i.createElementBlock("div",Lb,"111"))]),_:1},8,["label"])]),_:1},8,["modelValue"])]))}});var yo,Bc;function wa(){if(Bc)return yo;Bc=1;var r;return typeof window<"u"?r=window:typeof sa<"u"?r=sa:typeof self<"u"?r=self:r={},yo=r,yo}var Pb=wa();const W=gr(Pb),Rb={},Vb=Object.freeze(Object.defineProperty({__proto__:null,default:Rb},Symbol.toStringTag,{value:"Module"})),Fb=Rv(Vb);var To,Lc;function Dh(){if(Lc)return To;Lc=1;var r=typeof sa<"u"?sa:typeof window<"u"?window:{},e=Fb,t;return typeof document<"u"?t=document:(t=r["__GLOBAL_DOCUMENT_CACHE@4"],t||(t=r["__GLOBAL_DOCUMENT_CACHE@4"]=e)),To=t,To}var $b=Dh();const ve=gr($b);var Us={exports:{}},bo={exports:{}},Mc;function Ub(){return Mc||(Mc=1,(function(r){function e(){return r.exports=e=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var a in s)({}).hasOwnProperty.call(s,a)&&(t[a]=s[a])}return t},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})(bo)),bo.exports}var xo,Pc;function qb(){if(Pc)return xo;Pc=1,xo=e;var r=Object.prototype.toString;function e(t){if(!t)return!1;var n=r.call(t);return n==="[object Function]"||typeof t=="function"&&n!=="[object RegExp]"||typeof window<"u"&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}return xo}var Co,Rc;function Hb(){if(Rc)return Co;Rc=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
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 t(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 t(s,a)}}function t(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 h=this.typeToInterceptorsMap_.get(l);return h.has(c)?!1:(h.add(c),!0)},a.removeInterceptor=function(l,c){var h=this.typeToInterceptorsMap_.get(l);return h&&h.has(c)?(h.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 h=this.getForType(l),m=r(h),g;!(g=m()).done;){var k=g.value;try{c=k(c)}catch{}}return c},s})();return Co=n,Co}var Eo,Vc;function jb(){if(Vc)return Eo;Vc=1;var r=(function(){function t(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var n=t.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,h=o.fuzzFactor,m=o.initialDelay;return new e({maxAttempts:l||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:h||this.fuzzFactor_,initialDelay:m||this.initialDelay_})},t})(),e=(function(){function t(s){this.maxAttempts_=s.maxAttempts,this.delayFactor_=s.delayFactor,this.fuzzFactor_=s.fuzzFactor,this.currentDelay_=s.initialDelay,this.currentAttempt_=1}var n=t.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)},t})();return Eo=r,Eo}var So,Fc;function zb(){if(Fc)return So;Fc=1;var r=wa(),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 h=c;if(a)if(r.TextDecoder){var m=t(l.headers&&l.headers["content-type"]);try{h=new TextDecoder(m).decode(c)}catch{}}else h=String.fromCharCode.apply(null,new Uint8Array(c));s({cause:h});return}s(null,c)}};function t(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 So=e,So}var $c;function Gb(){if($c)return Us.exports;$c=1;var r=wa(),e=Ub(),t=qb(),n=Hb(),s=jb();h.httpHandler=zb(),h.requestInterceptorsStorage=new n,h.responseInterceptorsStorage=new n,h.retryManager=new s;/**
7
7
  * @license
8
8
  * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
9
9
  * Copyright (c) 2014 David Björklund
10
10
  * Available under the MIT license
11
11
  * <https://github.com/kesla/parse-headers/blob/master/LICENCE>
12
- */var a=function(O){var _={};return O&&O.trim().split(`
13
- `).forEach(function(S){var R=S.indexOf(":"),L=S.slice(0,R).trim().toLowerCase(),I=S.slice(R+1).trim();typeof _[L]>"u"?_[L]=I:Array.isArray(_[L])?_[L].push(I):_[L]=[_[L],I]}),_};Us.exports=h,Us.exports.default=h,h.XMLHttpRequest=r.XMLHttpRequest||k,h.XDomainRequest="withCredentials"in new h.XMLHttpRequest?h.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],function(T){h[T==="delete"?"del":T]=function(O,_,S){return _=c(O,_,S),_.method=T.toUpperCase(),m(_)}});function o(T,O){for(var _=0;_<T.length;_++)O(T[_])}function l(T){for(var O in T)if(T.hasOwnProperty(O))return!1;return!0}function c(T,O,_){var S=T;return t(O)?(_=O,typeof T=="string"&&(S={uri:T})):S=e({},O,{uri:T}),S.callback=_,S}function h(T,O,_){return O=c(T,O,_),m(O)}function m(T){if(typeof T.callback>"u")throw new Error("callback argument missing");if(T.requestType&&h.requestInterceptorsStorage.getIsEnabled()){var O={uri:T.uri||T.url,headers:T.headers||{},body:T.body,metadata:T.metadata||{},retry:T.retry,timeout:T.timeout},_=h.requestInterceptorsStorage.execute(T.requestType,O);T.uri=_.uri,T.headers=_.headers,T.body=_.body,T.metadata=_.metadata,T.retry=_.retry,T.timeout=_.timeout}var S=!1,R=function(q,H,Q){S||(S=!0,T.callback(q,H,Q))};function L(){P.readyState===4&&!h.responseInterceptorsStorage.getIsEnabled()&&setTimeout(M,0)}function I(){var Z=void 0;if(P.response?Z=P.response:Z=P.responseText||g(P),w)try{Z=JSON.parse(Z)}catch{}return Z}function j(Z){if(clearTimeout(F),clearTimeout(T.retryTimeout),Z instanceof Error||(Z=new Error(""+(Z||"Unknown XMLHttpRequest Error"))),Z.statusCode=0,!X&&h.retryManager.getIsEnabled()&&T.retry&&T.retry.shouldRetry()){T.retryTimeout=setTimeout(function(){T.retry.moveToNextAttempt(),T.xhr=P,m(T)},T.retry.getCurrentFuzzedDelay());return}if(T.requestType&&h.responseInterceptorsStorage.getIsEnabled()){var q={headers:G.headers||{},body:G.body,responseUrl:P.responseURL,responseType:P.responseType},H=h.responseInterceptorsStorage.execute(T.requestType,q);G.body=H.body,G.headers=H.headers}return R(Z,G)}function M(){if(!X){var Z;clearTimeout(F),clearTimeout(T.retryTimeout),T.useXDR&&P.status===void 0?Z=200:Z=P.status===1223?204:P.status;var q=G,H=null;if(Z!==0?(q={body:I(),statusCode:Z,method:C,headers:{},url:b,rawRequest:P},P.getAllResponseHeaders&&(q.headers=a(P.getAllResponseHeaders()))):H=new Error("Internal XMLHttpRequest Error"),T.requestType&&h.responseInterceptorsStorage.getIsEnabled()){var Q={headers:q.headers||{},body:q.body,responseUrl:P.responseURL,responseType:P.responseType},J=h.responseInterceptorsStorage.execute(T.requestType,Q);q.body=J.body,q.headers=J.headers}return R(H,q,q.body)}}var P=T.xhr||null;P||(T.cors||T.useXDR?P=new h.XDomainRequest:P=new h.XMLHttpRequest);var N,X,b=P.url=T.uri||T.url,C=P.method=T.method||"GET",$=T.body||T.data,U=P.headers=T.headers||{},E=!!T.sync,w=!1,F,G={body:void 0,headers:{},statusCode:0,method:C,url:b,rawRequest:P};if("json"in T&&T.json!==!1&&(w=!0,U.accept||U.Accept||(U.Accept="application/json"),C!=="GET"&&C!=="HEAD"&&(U["content-type"]||U["Content-Type"]||(U["Content-Type"]="application/json"),$=JSON.stringify(T.json===!0?$:T.json))),P.onreadystatechange=L,P.onload=M,P.onerror=j,P.onprogress=function(){},P.onabort=function(){X=!0,clearTimeout(T.retryTimeout)},P.ontimeout=j,P.open(C,b,!E,T.username,T.password),E||(P.withCredentials=!!T.withCredentials),!E&&T.timeout>0&&(F=setTimeout(function(){if(!X){X=!0,P.abort("timeout");var Z=new Error("XMLHttpRequest timeout");Z.code="ETIMEDOUT",j(Z)}},T.timeout)),P.setRequestHeader)for(N in U)U.hasOwnProperty(N)&&P.setRequestHeader(N,U[N]);else if(T.headers&&!l(T.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in T&&(P.responseType=T.responseType),"beforeSend"in T&&typeof T.beforeSend=="function"&&T.beforeSend(P),P.send($||null),P}function g(T){try{if(T.responseType==="document")return T.responseXML;var O=T.responseXML&&T.responseXML.documentElement.nodeName==="parsererror";if(T.responseType===""&&!O)return T.responseXML}catch{}return null}function k(){}return Us.exports}var Wb=Gb();const Ah=gr(Wb);var ko={exports:{}},wo,Uc;function Yb(){if(Uc)return wo;Uc=1;var r=Dh(),e=Object.create||(function(){function b(){}return function(C){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return b.prototype=C,new b}})();function t(b,C){this.name="ParsingError",this.code=b.code,this.message=C||b.message}t.prototype=e(Error.prototype),t.prototype.constructor=t,t.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function n(b){function C(U,E,w,F){return(U|0)*3600+(E|0)*60+(w|0)+(F|0)/1e3}var $=b.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return $?$[3]?C($[1],$[2],$[3].replace(":",""),$[4]):$[1]>59?C($[1],$[2],0,$[4]):C(0,$[1],$[2],$[4]):null}function s(){this.values=e(null)}s.prototype={set:function(b,C){!this.get(b)&&C!==""&&(this.values[b]=C)},get:function(b,C,$){return $?this.has(b)?this.values[b]:C[$]:this.has(b)?this.values[b]:C},has:function(b){return b in this.values},alt:function(b,C,$){for(var U=0;U<$.length;++U)if(C===$[U]){this.set(b,C);break}},integer:function(b,C){/^-?\d+$/.test(C)&&this.set(b,parseInt(C,10))},percent:function(b,C){return C.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(C=parseFloat(C),C>=0&&C<=100)?(this.set(b,C),!0):!1}};function a(b,C,$,U){var E=U?b.split(U):[b];for(var w in E)if(typeof E[w]=="string"){var F=E[w].split($);if(F.length===2){var G=F[0].trim(),Z=F[1].trim();C(G,Z)}}}function o(b,C,$){var U=b;function E(){var G=n(b);if(G===null)throw new t(t.Errors.BadTimeStamp,"Malformed timestamp: "+U);return b=b.replace(/^[^\sa-zA-Z-]+/,""),G}function w(G,Z){var q=new s;a(G,function(H,Q){switch(H){case"region":for(var J=$.length-1;J>=0;J--)if($[J].id===Q){q.set(H,$[J].region);break}break;case"vertical":q.alt(H,Q,["rl","lr"]);break;case"line":var re=Q.split(","),de=re[0];q.integer(H,de),q.percent(H,de)&&q.set("snapToLines",!1),q.alt(H,de,["auto"]),re.length===2&&q.alt("lineAlign",re[1],["start","center","end"]);break;case"position":re=Q.split(","),q.percent(H,re[0]),re.length===2&&q.alt("positionAlign",re[1],["start","center","end"]);break;case"size":q.percent(H,Q);break;case"align":q.alt(H,Q,["start","center","end","left","right"]);break}},/:/,/\s/),Z.region=q.get("region",null),Z.vertical=q.get("vertical","");try{Z.line=q.get("line","auto")}catch{}Z.lineAlign=q.get("lineAlign","start"),Z.snapToLines=q.get("snapToLines",!0),Z.size=q.get("size",100);try{Z.align=q.get("align","center")}catch{Z.align=q.get("align","middle")}try{Z.position=q.get("position","auto")}catch{Z.position=q.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},Z.align)}Z.positionAlign=q.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},Z.align)}function F(){b=b.replace(/^\s+/,"")}if(F(),C.startTime=E(),F(),b.substr(0,3)!=="-->")throw new t(t.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+U);b=b.substr(3),F(),C.endTime=E(),F(),w(b,C)}var l=r.createElement&&r.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={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 k(b,C){function $(){if(!C)return null;function de(le){return C=C.substr(le.length),le}var Ce=C.match(/^([^<]*)(<[^>]*>?)?/);return de(Ce[1]?Ce[1]:Ce[2])}function U(de){return l.innerHTML=de,de=l.textContent,l.textContent="",de}function E(de,Ce){return!g[Ce.localName]||g[Ce.localName]===de.localName}function w(de,Ce){var le=c[de];if(!le)return null;var $e=b.document.createElement(le),Ie=m[de];return Ie&&Ce&&($e[Ie]=Ce.trim()),$e}for(var F=b.document.createElement("div"),G=F,Z,q=[];(Z=$())!==null;){if(Z[0]==="<"){if(Z[1]==="/"){q.length&&q[q.length-1]===Z.substr(2).replace(">","")&&(q.pop(),G=G.parentNode);continue}var H=n(Z.substr(1,Z.length-2)),Q;if(H){Q=b.document.createProcessingInstruction("timestamp",H),G.appendChild(Q);continue}var J=Z.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!J||(Q=w(J[1],J[3]),!Q)||!E(G,Q))continue;if(J[2]){var re=J[2].split(".");re.forEach(function(de){var Ce=/^bg_/.test(de),le=Ce?de.slice(3):de;if(h.hasOwnProperty(le)){var $e=Ce?"background-color":"color",Ie=h[le];Q.style[$e]=Ie}}),Q.className=re.join(" ")}q.push(J[1]),G.appendChild(Q),G=Q;continue}G.appendChild(b.document.createTextNode(U(Z)))}return F}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 O(b){for(var C=0;C<T.length;C++){var $=T[C];if(b>=$[0]&&b<=$[1])return!0}return!1}function _(b){var C=[],$="",U;if(!b||!b.childNodes)return"ltr";function E(G,Z){for(var q=Z.childNodes.length-1;q>=0;q--)G.push(Z.childNodes[q])}function w(G){if(!G||!G.length)return null;var Z=G.pop(),q=Z.textContent||Z.innerText;if(q){var H=q.match(/^.*(\n|\r)/);return H?(G.length=0,H[0]):q}if(Z.tagName==="ruby")return w(G);if(Z.childNodes)return E(G,Z),w(G)}for(E(C,b);$=w(C);)for(var F=0;F<$.length;F++)if(U=$.charCodeAt(F),O(U))return"rtl";return"ltr"}function S(b){if(typeof b.line=="number"&&(b.snapToLines||b.line>=0&&b.line<=100))return b.line;if(!b.track||!b.track.textTrackList||!b.track.textTrackList.mediaElement)return-1;for(var C=b.track,$=C.textTrackList,U=0,E=0;E<$.length&&$[E]!==C;E++)$[E].mode==="showing"&&U++;return++U*-1}function R(){}R.prototype.applyStyles=function(b,C){C=C||this.div;for(var $ in b)b.hasOwnProperty($)&&(C.style[$]=b[$])},R.prototype.formatStyle=function(b,C){return b===0?0:b+C};function L(b,C,$){R.call(this),this.cue=C,this.cueDiv=k(b,C.text);var U={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:C.vertical===""?"horizontal-tb":C.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(U,this.cueDiv),this.div=b.document.createElement("div"),U={direction:_(this.cueDiv),writingMode:C.vertical===""?"horizontal-tb":C.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:C.align==="middle"?"center":C.align,font:$.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(U),this.div.appendChild(this.cueDiv);var E=0;switch(C.positionAlign){case"start":case"line-left":E=C.position;break;case"center":E=C.position-C.size/2;break;case"end":case"line-right":E=C.position-C.size;break}C.vertical===""?this.applyStyles({left:this.formatStyle(E,"%"),width:this.formatStyle(C.size,"%")}):this.applyStyles({top:this.formatStyle(E,"%"),height:this.formatStyle(C.size,"%")}),this.move=function(w){this.applyStyles({top:this.formatStyle(w.top,"px"),bottom:this.formatStyle(w.bottom,"px"),left:this.formatStyle(w.left,"px"),right:this.formatStyle(w.right,"px"),height:this.formatStyle(w.height,"px"),width:this.formatStyle(w.width,"px")})}}L.prototype=e(R.prototype),L.prototype.constructor=L;function I(b){var C,$,U,E;if(b.div){$=b.div.offsetHeight,U=b.div.offsetWidth,E=b.div.offsetTop;var w=(w=b.div.childNodes)&&(w=w[0])&&w.getClientRects&&w.getClientRects();b=b.div.getBoundingClientRect(),C=w?Math.max(w[0]&&w[0].height||0,b.height/w.length):0}this.left=b.left,this.right=b.right,this.top=b.top||E,this.height=b.height||$,this.bottom=b.bottom||E+(b.height||$),this.width=b.width||U,this.lineHeight=C!==void 0?C:b.lineHeight}I.prototype.move=function(b,C){switch(C=C!==void 0?C:this.lineHeight,b){case"+x":this.left+=C,this.right+=C;break;case"-x":this.left-=C,this.right-=C;break;case"+y":this.top+=C,this.bottom+=C;break;case"-y":this.top-=C,this.bottom-=C;break}},I.prototype.overlaps=function(b){return this.left<b.right&&this.right>b.left&&this.top<b.bottom&&this.bottom>b.top},I.prototype.overlapsAny=function(b){for(var C=0;C<b.length;C++)if(this.overlaps(b[C]))return!0;return!1},I.prototype.within=function(b){return this.top>=b.top&&this.bottom<=b.bottom&&this.left>=b.left&&this.right<=b.right},I.prototype.overlapsOppositeAxis=function(b,C){switch(C){case"+x":return this.left<b.left;case"-x":return this.right>b.right;case"+y":return this.top<b.top;case"-y":return this.bottom>b.bottom}},I.prototype.intersectPercentage=function(b){var C=Math.max(0,Math.min(this.right,b.right)-Math.max(this.left,b.left)),$=Math.max(0,Math.min(this.bottom,b.bottom)-Math.max(this.top,b.top)),U=C*$;return U/(this.height*this.width)},I.prototype.toCSSCompatValues=function(b){return{top:this.top-b.top,bottom:b.bottom-this.bottom,left:this.left-b.left,right:b.right-this.right,height:this.height,width:this.width}},I.getSimpleBoxPosition=function(b){var C=b.div?b.div.offsetHeight:b.tagName?b.offsetHeight:0,$=b.div?b.div.offsetWidth:b.tagName?b.offsetWidth:0,U=b.div?b.div.offsetTop:b.tagName?b.offsetTop:0;b=b.div?b.div.getBoundingClientRect():b.tagName?b.getBoundingClientRect():b;var E={left:b.left,right:b.right,top:b.top||U,height:b.height||C,bottom:b.bottom||U+(b.height||C),width:b.width||$};return E};function j(b,C,$,U){function E(le,$e){for(var Ie,Oe=new I(le),Ye=1,Fe=0;Fe<$e.length;Fe++){for(;le.overlapsOppositeAxis($,$e[Fe])||le.within($)&&le.overlapsAny(U);)le.move($e[Fe]);if(le.within($))return le;var Ze=le.intersectPercentage($);Ye>Ze&&(Ie=new I(le),Ye=Ze),le=new I(Oe)}return Ie||Oe}var w=new I(C),F=C.cue,G=S(F),Z=[];if(F.snapToLines){var q;switch(F.vertical){case"":Z=["+y","-y"],q="height";break;case"rl":Z=["+x","-x"],q="width";break;case"lr":Z=["-x","+x"],q="width";break}var H=w.lineHeight,Q=H*Math.round(G),J=$[q]+H,re=Z[0];Math.abs(Q)>J&&(Q=Q<0?-1:1,Q*=Math.ceil(J/H)*H),G<0&&(Q+=F.vertical===""?$.height:$.width,Z=Z.reverse()),w.move(re,Q)}else{var de=w.lineHeight/$.height*100;switch(F.lineAlign){case"center":G-=de/2;break;case"end":G-=de;break}switch(F.vertical){case"":C.applyStyles({top:C.formatStyle(G,"%")});break;case"rl":C.applyStyles({left:C.formatStyle(G,"%")});break;case"lr":C.applyStyles({right:C.formatStyle(G,"%")});break}Z=["+y","-x","+x","-y"],w=new I(C)}var Ce=E(w,Z);C.move(Ce.toCSSCompatValues($))}function M(){}M.StringDecoder=function(){return{decode:function(b){if(!b)return"";if(typeof b!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(b))}}},M.convertCueToDOMTree=function(b,C){return!b||!C?null:k(b,C)};var P=.05,N="sans-serif",X="1.5%";return M.processCues=function(b,C,$){if(!b||!C||!$)return null;for(;$.firstChild;)$.removeChild($.firstChild);var U=b.document.createElement("div");U.style.position="absolute",U.style.left="0",U.style.right="0",U.style.top="0",U.style.bottom="0",U.style.margin=X,$.appendChild(U);function E(H){for(var Q=0;Q<H.length;Q++)if(H[Q].hasBeenReset||!H[Q].displayState)return!0;return!1}if(!E(C)){for(var w=0;w<C.length;w++)U.appendChild(C[w].displayState);return}var F=[],G=I.getSimpleBoxPosition(U),Z=Math.round(G.height*P*100)/100,q={font:Z+"px "+N};(function(){for(var H,Q,J=0;J<C.length;J++)Q=C[J],H=new L(b,Q,q),U.appendChild(H.div),j(b,H,G,F),Q.displayState=H.div,F.push(I.getSimpleBoxPosition(H))})()},M.Parser=function(b,C,$){$||($=C,C={}),C||(C={}),this.window=b,this.vttjs=C,this.state="INITIAL",this.buffer="",this.decoder=$||new TextDecoder("utf8"),this.regionList=[]},M.Parser.prototype={reportOrThrowError:function(b){if(b instanceof t)this.onparsingerror&&this.onparsingerror(b);else throw b},parse:function(b){var C=this;b&&(C.buffer+=C.decoder.decode(b,{stream:!0}));function $(){for(var H=C.buffer,Q=0;Q<H.length&&H[Q]!=="\r"&&H[Q]!==`
14
- `;)++Q;var J=H.substr(0,Q);return H[Q]==="\r"&&++Q,H[Q]===`
15
- `&&++Q,C.buffer=H.substr(Q),J}function U(H){var Q=new s;if(a(H,function(re,de){switch(re){case"id":Q.set(re,de);break;case"width":Q.percent(re,de);break;case"lines":Q.integer(re,de);break;case"regionanchor":case"viewportanchor":var Ce=de.split(",");if(Ce.length!==2)break;var le=new s;if(le.percent("x",Ce[0]),le.percent("y",Ce[1]),!le.has("x")||!le.has("y"))break;Q.set(re+"X",le.get("x")),Q.set(re+"Y",le.get("y"));break;case"scroll":Q.alt(re,de,["up"]);break}},/=/,/\s/),Q.has("id")){var J=new(C.vttjs.VTTRegion||C.window.VTTRegion);J.width=Q.get("width",100),J.lines=Q.get("lines",3),J.regionAnchorX=Q.get("regionanchorX",0),J.regionAnchorY=Q.get("regionanchorY",100),J.viewportAnchorX=Q.get("viewportanchorX",0),J.viewportAnchorY=Q.get("viewportanchorY",100),J.scroll=Q.get("scroll",""),C.onregion&&C.onregion(J),C.regionList.push({id:Q.get("id"),region:J})}}function E(H){var Q=new s;a(H,function(J,re){switch(J){case"MPEGT":Q.integer(J+"S",re);break;case"LOCA":Q.set(J+"L",n(re));break}},/[^\d]:/,/,/),C.ontimestampmap&&C.ontimestampmap({MPEGTS:Q.get("MPEGTS"),LOCAL:Q.get("LOCAL")})}function w(H){H.match(/X-TIMESTAMP-MAP/)?a(H,function(Q,J){switch(Q){case"X-TIMESTAMP-MAP":E(J);break}},/=/):a(H,function(Q,J){switch(Q){case"Region":U(J);break}},/:/)}try{var F;if(C.state==="INITIAL"){if(!/\r\n|\n/.test(C.buffer))return this;F=$();var G=F.match(/^WEBVTT([ \t].*)?$/);if(!G||!G[0])throw new t(t.Errors.BadSignature);C.state="HEADER"}for(var Z=!1;C.buffer;){if(!/\r\n|\n/.test(C.buffer))return this;switch(Z?Z=!1:F=$(),C.state){case"HEADER":/:/.test(F)?w(F):F||(C.state="ID");continue;case"NOTE":F||(C.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(F)){C.state="NOTE";break}if(!F)continue;C.cue=new(C.vttjs.VTTCue||C.window.VTTCue)(0,0,"");try{C.cue.align="center"}catch{C.cue.align="middle"}if(C.state="CUE",F.indexOf("-->")===-1){C.cue.id=F;continue}case"CUE":try{o(F,C.cue,C.regionList)}catch(H){C.reportOrThrowError(H),C.cue=null,C.state="BADCUE";continue}C.state="CUETEXT";continue;case"CUETEXT":var q=F.indexOf("-->")!==-1;if(!F||q&&(Z=!0)){C.oncue&&C.oncue(C.cue),C.cue=null,C.state="ID";continue}C.cue.text&&(C.cue.text+=`
12
+ */var a=function(I){var _={};return I&&I.trim().split(`
13
+ `).forEach(function(S){var R=S.indexOf(":"),L=S.slice(0,R).trim().toLowerCase(),O=S.slice(R+1).trim();typeof _[L]>"u"?_[L]=O:Array.isArray(_[L])?_[L].push(O):_[L]=[_[L],O]}),_};Us.exports=h,Us.exports.default=h,h.XMLHttpRequest=r.XMLHttpRequest||k,h.XDomainRequest="withCredentials"in new h.XMLHttpRequest?h.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],function(T){h[T==="delete"?"del":T]=function(I,_,S){return _=c(I,_,S),_.method=T.toUpperCase(),m(_)}});function o(T,I){for(var _=0;_<T.length;_++)I(T[_])}function l(T){for(var I in T)if(T.hasOwnProperty(I))return!1;return!0}function c(T,I,_){var S=T;return t(I)?(_=I,typeof T=="string"&&(S={uri:T})):S=e({},I,{uri:T}),S.callback=_,S}function h(T,I,_){return I=c(T,I,_),m(I)}function m(T){if(typeof T.callback>"u")throw new Error("callback argument missing");if(T.requestType&&h.requestInterceptorsStorage.getIsEnabled()){var I={uri:T.uri||T.url,headers:T.headers||{},body:T.body,metadata:T.metadata||{},retry:T.retry,timeout:T.timeout},_=h.requestInterceptorsStorage.execute(T.requestType,I);T.uri=_.uri,T.headers=_.headers,T.body=_.body,T.metadata=_.metadata,T.retry=_.retry,T.timeout=_.timeout}var S=!1,R=function(q,Z,G){S||(S=!0,T.callback(q,Z,G))};function L(){P.readyState===4&&!h.responseInterceptorsStorage.getIsEnabled()&&setTimeout(M,0)}function O(){var Q=void 0;if(P.response?Q=P.response:Q=P.responseText||g(P),w)try{Q=JSON.parse(Q)}catch{}return Q}function H(Q){if(clearTimeout(F),clearTimeout(T.retryTimeout),Q instanceof Error||(Q=new Error(""+(Q||"Unknown XMLHttpRequest Error"))),Q.statusCode=0,!X&&h.retryManager.getIsEnabled()&&T.retry&&T.retry.shouldRetry()){T.retryTimeout=setTimeout(function(){T.retry.moveToNextAttempt(),T.xhr=P,m(T)},T.retry.getCurrentFuzzedDelay());return}if(T.requestType&&h.responseInterceptorsStorage.getIsEnabled()){var q={headers:z.headers||{},body:z.body,responseUrl:P.responseURL,responseType:P.responseType},Z=h.responseInterceptorsStorage.execute(T.requestType,q);z.body=Z.body,z.headers=Z.headers}return R(Q,z)}function M(){if(!X){var Q;clearTimeout(F),clearTimeout(T.retryTimeout),T.useXDR&&P.status===void 0?Q=200:Q=P.status===1223?204:P.status;var q=z,Z=null;if(Q!==0?(q={body:O(),statusCode:Q,method:C,headers:{},url:b,rawRequest:P},P.getAllResponseHeaders&&(q.headers=a(P.getAllResponseHeaders()))):Z=new Error("Internal XMLHttpRequest Error"),T.requestType&&h.responseInterceptorsStorage.getIsEnabled()){var G={headers:q.headers||{},body:q.body,responseUrl:P.responseURL,responseType:P.responseType},J=h.responseInterceptorsStorage.execute(T.requestType,G);q.body=J.body,q.headers=J.headers}return R(Z,q,q.body)}}var P=T.xhr||null;P||(T.cors||T.useXDR?P=new h.XDomainRequest:P=new h.XMLHttpRequest);var N,X,b=P.url=T.uri||T.url,C=P.method=T.method||"GET",$=T.body||T.data,U=P.headers=T.headers||{},E=!!T.sync,w=!1,F,z={body:void 0,headers:{},statusCode:0,method:C,url:b,rawRequest:P};if("json"in T&&T.json!==!1&&(w=!0,U.accept||U.Accept||(U.Accept="application/json"),C!=="GET"&&C!=="HEAD"&&(U["content-type"]||U["Content-Type"]||(U["Content-Type"]="application/json"),$=JSON.stringify(T.json===!0?$:T.json))),P.onreadystatechange=L,P.onload=M,P.onerror=H,P.onprogress=function(){},P.onabort=function(){X=!0,clearTimeout(T.retryTimeout)},P.ontimeout=H,P.open(C,b,!E,T.username,T.password),E||(P.withCredentials=!!T.withCredentials),!E&&T.timeout>0&&(F=setTimeout(function(){if(!X){X=!0,P.abort("timeout");var Q=new Error("XMLHttpRequest timeout");Q.code="ETIMEDOUT",H(Q)}},T.timeout)),P.setRequestHeader)for(N in U)U.hasOwnProperty(N)&&P.setRequestHeader(N,U[N]);else if(T.headers&&!l(T.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in T&&(P.responseType=T.responseType),"beforeSend"in T&&typeof T.beforeSend=="function"&&T.beforeSend(P),P.send($||null),P}function g(T){try{if(T.responseType==="document")return T.responseXML;var I=T.responseXML&&T.responseXML.documentElement.nodeName==="parsererror";if(T.responseType===""&&!I)return T.responseXML}catch{}return null}function k(){}return Us.exports}var Wb=Gb();const Ah=gr(Wb);var ko={exports:{}},wo,Uc;function Yb(){if(Uc)return wo;Uc=1;var r=Dh(),e=Object.create||(function(){function b(){}return function(C){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return b.prototype=C,new b}})();function t(b,C){this.name="ParsingError",this.code=b.code,this.message=C||b.message}t.prototype=e(Error.prototype),t.prototype.constructor=t,t.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function n(b){function C(U,E,w,F){return(U|0)*3600+(E|0)*60+(w|0)+(F|0)/1e3}var $=b.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return $?$[3]?C($[1],$[2],$[3].replace(":",""),$[4]):$[1]>59?C($[1],$[2],0,$[4]):C(0,$[1],$[2],$[4]):null}function s(){this.values=e(null)}s.prototype={set:function(b,C){!this.get(b)&&C!==""&&(this.values[b]=C)},get:function(b,C,$){return $?this.has(b)?this.values[b]:C[$]:this.has(b)?this.values[b]:C},has:function(b){return b in this.values},alt:function(b,C,$){for(var U=0;U<$.length;++U)if(C===$[U]){this.set(b,C);break}},integer:function(b,C){/^-?\d+$/.test(C)&&this.set(b,parseInt(C,10))},percent:function(b,C){return C.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(C=parseFloat(C),C>=0&&C<=100)?(this.set(b,C),!0):!1}};function a(b,C,$,U){var E=U?b.split(U):[b];for(var w in E)if(typeof E[w]=="string"){var F=E[w].split($);if(F.length===2){var z=F[0].trim(),Q=F[1].trim();C(z,Q)}}}function o(b,C,$){var U=b;function E(){var z=n(b);if(z===null)throw new t(t.Errors.BadTimeStamp,"Malformed timestamp: "+U);return b=b.replace(/^[^\sa-zA-Z-]+/,""),z}function w(z,Q){var q=new s;a(z,function(Z,G){switch(Z){case"region":for(var J=$.length-1;J>=0;J--)if($[J].id===G){q.set(Z,$[J].region);break}break;case"vertical":q.alt(Z,G,["rl","lr"]);break;case"line":var ie=G.split(","),oe=ie[0];q.integer(Z,oe),q.percent(Z,oe)&&q.set("snapToLines",!1),q.alt(Z,oe,["auto"]),ie.length===2&&q.alt("lineAlign",ie[1],["start","center","end"]);break;case"position":ie=G.split(","),q.percent(Z,ie[0]),ie.length===2&&q.alt("positionAlign",ie[1],["start","center","end"]);break;case"size":q.percent(Z,G);break;case"align":q.alt(Z,G,["start","center","end","left","right"]);break}},/:/,/\s/),Q.region=q.get("region",null),Q.vertical=q.get("vertical","");try{Q.line=q.get("line","auto")}catch{}Q.lineAlign=q.get("lineAlign","start"),Q.snapToLines=q.get("snapToLines",!0),Q.size=q.get("size",100);try{Q.align=q.get("align","center")}catch{Q.align=q.get("align","middle")}try{Q.position=q.get("position","auto")}catch{Q.position=q.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},Q.align)}Q.positionAlign=q.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},Q.align)}function F(){b=b.replace(/^\s+/,"")}if(F(),C.startTime=E(),F(),b.substr(0,3)!=="-->")throw new t(t.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+U);b=b.substr(3),F(),C.endTime=E(),F(),w(b,C)}var l=r.createElement&&r.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={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 k(b,C){function $(){if(!C)return null;function oe(ue){return C=C.substr(ue.length),ue}var Ee=C.match(/^([^<]*)(<[^>]*>?)?/);return oe(Ee[1]?Ee[1]:Ee[2])}function U(oe){return l.innerHTML=oe,oe=l.textContent,l.textContent="",oe}function E(oe,Ee){return!g[Ee.localName]||g[Ee.localName]===oe.localName}function w(oe,Ee){var ue=c[oe];if(!ue)return null;var $e=b.document.createElement(ue),Ie=m[oe];return Ie&&Ee&&($e[Ie]=Ee.trim()),$e}for(var F=b.document.createElement("div"),z=F,Q,q=[];(Q=$())!==null;){if(Q[0]==="<"){if(Q[1]==="/"){q.length&&q[q.length-1]===Q.substr(2).replace(">","")&&(q.pop(),z=z.parentNode);continue}var Z=n(Q.substr(1,Q.length-2)),G;if(Z){G=b.document.createProcessingInstruction("timestamp",Z),z.appendChild(G);continue}var J=Q.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!J||(G=w(J[1],J[3]),!G)||!E(z,G))continue;if(J[2]){var ie=J[2].split(".");ie.forEach(function(oe){var Ee=/^bg_/.test(oe),ue=Ee?oe.slice(3):oe;if(h.hasOwnProperty(ue)){var $e=Ee?"background-color":"color",Ie=h[ue];G.style[$e]=Ie}}),G.className=ie.join(" ")}q.push(J[1]),z.appendChild(G),z=G;continue}z.appendChild(b.document.createTextNode(U(Q)))}return F}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 I(b){for(var C=0;C<T.length;C++){var $=T[C];if(b>=$[0]&&b<=$[1])return!0}return!1}function _(b){var C=[],$="",U;if(!b||!b.childNodes)return"ltr";function E(z,Q){for(var q=Q.childNodes.length-1;q>=0;q--)z.push(Q.childNodes[q])}function w(z){if(!z||!z.length)return null;var Q=z.pop(),q=Q.textContent||Q.innerText;if(q){var Z=q.match(/^.*(\n|\r)/);return Z?(z.length=0,Z[0]):q}if(Q.tagName==="ruby")return w(z);if(Q.childNodes)return E(z,Q),w(z)}for(E(C,b);$=w(C);)for(var F=0;F<$.length;F++)if(U=$.charCodeAt(F),I(U))return"rtl";return"ltr"}function S(b){if(typeof b.line=="number"&&(b.snapToLines||b.line>=0&&b.line<=100))return b.line;if(!b.track||!b.track.textTrackList||!b.track.textTrackList.mediaElement)return-1;for(var C=b.track,$=C.textTrackList,U=0,E=0;E<$.length&&$[E]!==C;E++)$[E].mode==="showing"&&U++;return++U*-1}function R(){}R.prototype.applyStyles=function(b,C){C=C||this.div;for(var $ in b)b.hasOwnProperty($)&&(C.style[$]=b[$])},R.prototype.formatStyle=function(b,C){return b===0?0:b+C};function L(b,C,$){R.call(this),this.cue=C,this.cueDiv=k(b,C.text);var U={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:C.vertical===""?"horizontal-tb":C.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(U,this.cueDiv),this.div=b.document.createElement("div"),U={direction:_(this.cueDiv),writingMode:C.vertical===""?"horizontal-tb":C.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:C.align==="middle"?"center":C.align,font:$.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(U),this.div.appendChild(this.cueDiv);var E=0;switch(C.positionAlign){case"start":case"line-left":E=C.position;break;case"center":E=C.position-C.size/2;break;case"end":case"line-right":E=C.position-C.size;break}C.vertical===""?this.applyStyles({left:this.formatStyle(E,"%"),width:this.formatStyle(C.size,"%")}):this.applyStyles({top:this.formatStyle(E,"%"),height:this.formatStyle(C.size,"%")}),this.move=function(w){this.applyStyles({top:this.formatStyle(w.top,"px"),bottom:this.formatStyle(w.bottom,"px"),left:this.formatStyle(w.left,"px"),right:this.formatStyle(w.right,"px"),height:this.formatStyle(w.height,"px"),width:this.formatStyle(w.width,"px")})}}L.prototype=e(R.prototype),L.prototype.constructor=L;function O(b){var C,$,U,E;if(b.div){$=b.div.offsetHeight,U=b.div.offsetWidth,E=b.div.offsetTop;var w=(w=b.div.childNodes)&&(w=w[0])&&w.getClientRects&&w.getClientRects();b=b.div.getBoundingClientRect(),C=w?Math.max(w[0]&&w[0].height||0,b.height/w.length):0}this.left=b.left,this.right=b.right,this.top=b.top||E,this.height=b.height||$,this.bottom=b.bottom||E+(b.height||$),this.width=b.width||U,this.lineHeight=C!==void 0?C:b.lineHeight}O.prototype.move=function(b,C){switch(C=C!==void 0?C:this.lineHeight,b){case"+x":this.left+=C,this.right+=C;break;case"-x":this.left-=C,this.right-=C;break;case"+y":this.top+=C,this.bottom+=C;break;case"-y":this.top-=C,this.bottom-=C;break}},O.prototype.overlaps=function(b){return this.left<b.right&&this.right>b.left&&this.top<b.bottom&&this.bottom>b.top},O.prototype.overlapsAny=function(b){for(var C=0;C<b.length;C++)if(this.overlaps(b[C]))return!0;return!1},O.prototype.within=function(b){return this.top>=b.top&&this.bottom<=b.bottom&&this.left>=b.left&&this.right<=b.right},O.prototype.overlapsOppositeAxis=function(b,C){switch(C){case"+x":return this.left<b.left;case"-x":return this.right>b.right;case"+y":return this.top<b.top;case"-y":return this.bottom>b.bottom}},O.prototype.intersectPercentage=function(b){var C=Math.max(0,Math.min(this.right,b.right)-Math.max(this.left,b.left)),$=Math.max(0,Math.min(this.bottom,b.bottom)-Math.max(this.top,b.top)),U=C*$;return U/(this.height*this.width)},O.prototype.toCSSCompatValues=function(b){return{top:this.top-b.top,bottom:b.bottom-this.bottom,left:this.left-b.left,right:b.right-this.right,height:this.height,width:this.width}},O.getSimpleBoxPosition=function(b){var C=b.div?b.div.offsetHeight:b.tagName?b.offsetHeight:0,$=b.div?b.div.offsetWidth:b.tagName?b.offsetWidth:0,U=b.div?b.div.offsetTop:b.tagName?b.offsetTop:0;b=b.div?b.div.getBoundingClientRect():b.tagName?b.getBoundingClientRect():b;var E={left:b.left,right:b.right,top:b.top||U,height:b.height||C,bottom:b.bottom||U+(b.height||C),width:b.width||$};return E};function H(b,C,$,U){function E(ue,$e){for(var Ie,Oe=new O(ue),Ye=1,Fe=0;Fe<$e.length;Fe++){for(;ue.overlapsOppositeAxis($,$e[Fe])||ue.within($)&&ue.overlapsAny(U);)ue.move($e[Fe]);if(ue.within($))return ue;var Ze=ue.intersectPercentage($);Ye>Ze&&(Ie=new O(ue),Ye=Ze),ue=new O(Oe)}return Ie||Oe}var w=new O(C),F=C.cue,z=S(F),Q=[];if(F.snapToLines){var q;switch(F.vertical){case"":Q=["+y","-y"],q="height";break;case"rl":Q=["+x","-x"],q="width";break;case"lr":Q=["-x","+x"],q="width";break}var Z=w.lineHeight,G=Z*Math.round(z),J=$[q]+Z,ie=Q[0];Math.abs(G)>J&&(G=G<0?-1:1,G*=Math.ceil(J/Z)*Z),z<0&&(G+=F.vertical===""?$.height:$.width,Q=Q.reverse()),w.move(ie,G)}else{var oe=w.lineHeight/$.height*100;switch(F.lineAlign){case"center":z-=oe/2;break;case"end":z-=oe;break}switch(F.vertical){case"":C.applyStyles({top:C.formatStyle(z,"%")});break;case"rl":C.applyStyles({left:C.formatStyle(z,"%")});break;case"lr":C.applyStyles({right:C.formatStyle(z,"%")});break}Q=["+y","-x","+x","-y"],w=new O(C)}var Ee=E(w,Q);C.move(Ee.toCSSCompatValues($))}function M(){}M.StringDecoder=function(){return{decode:function(b){if(!b)return"";if(typeof b!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(b))}}},M.convertCueToDOMTree=function(b,C){return!b||!C?null:k(b,C)};var P=.05,N="sans-serif",X="1.5%";return M.processCues=function(b,C,$){if(!b||!C||!$)return null;for(;$.firstChild;)$.removeChild($.firstChild);var U=b.document.createElement("div");U.style.position="absolute",U.style.left="0",U.style.right="0",U.style.top="0",U.style.bottom="0",U.style.margin=X,$.appendChild(U);function E(Z){for(var G=0;G<Z.length;G++)if(Z[G].hasBeenReset||!Z[G].displayState)return!0;return!1}if(!E(C)){for(var w=0;w<C.length;w++)U.appendChild(C[w].displayState);return}var F=[],z=O.getSimpleBoxPosition(U),Q=Math.round(z.height*P*100)/100,q={font:Q+"px "+N};(function(){for(var Z,G,J=0;J<C.length;J++)G=C[J],Z=new L(b,G,q),U.appendChild(Z.div),H(b,Z,z,F),G.displayState=Z.div,F.push(O.getSimpleBoxPosition(Z))})()},M.Parser=function(b,C,$){$||($=C,C={}),C||(C={}),this.window=b,this.vttjs=C,this.state="INITIAL",this.buffer="",this.decoder=$||new TextDecoder("utf8"),this.regionList=[]},M.Parser.prototype={reportOrThrowError:function(b){if(b instanceof t)this.onparsingerror&&this.onparsingerror(b);else throw b},parse:function(b){var C=this;b&&(C.buffer+=C.decoder.decode(b,{stream:!0}));function $(){for(var Z=C.buffer,G=0;G<Z.length&&Z[G]!=="\r"&&Z[G]!==`
14
+ `;)++G;var J=Z.substr(0,G);return Z[G]==="\r"&&++G,Z[G]===`
15
+ `&&++G,C.buffer=Z.substr(G),J}function U(Z){var G=new s;if(a(Z,function(ie,oe){switch(ie){case"id":G.set(ie,oe);break;case"width":G.percent(ie,oe);break;case"lines":G.integer(ie,oe);break;case"regionanchor":case"viewportanchor":var Ee=oe.split(",");if(Ee.length!==2)break;var ue=new s;if(ue.percent("x",Ee[0]),ue.percent("y",Ee[1]),!ue.has("x")||!ue.has("y"))break;G.set(ie+"X",ue.get("x")),G.set(ie+"Y",ue.get("y"));break;case"scroll":G.alt(ie,oe,["up"]);break}},/=/,/\s/),G.has("id")){var J=new(C.vttjs.VTTRegion||C.window.VTTRegion);J.width=G.get("width",100),J.lines=G.get("lines",3),J.regionAnchorX=G.get("regionanchorX",0),J.regionAnchorY=G.get("regionanchorY",100),J.viewportAnchorX=G.get("viewportanchorX",0),J.viewportAnchorY=G.get("viewportanchorY",100),J.scroll=G.get("scroll",""),C.onregion&&C.onregion(J),C.regionList.push({id:G.get("id"),region:J})}}function E(Z){var G=new s;a(Z,function(J,ie){switch(J){case"MPEGT":G.integer(J+"S",ie);break;case"LOCA":G.set(J+"L",n(ie));break}},/[^\d]:/,/,/),C.ontimestampmap&&C.ontimestampmap({MPEGTS:G.get("MPEGTS"),LOCAL:G.get("LOCAL")})}function w(Z){Z.match(/X-TIMESTAMP-MAP/)?a(Z,function(G,J){switch(G){case"X-TIMESTAMP-MAP":E(J);break}},/=/):a(Z,function(G,J){switch(G){case"Region":U(J);break}},/:/)}try{var F;if(C.state==="INITIAL"){if(!/\r\n|\n/.test(C.buffer))return this;F=$();var z=F.match(/^WEBVTT([ \t].*)?$/);if(!z||!z[0])throw new t(t.Errors.BadSignature);C.state="HEADER"}for(var Q=!1;C.buffer;){if(!/\r\n|\n/.test(C.buffer))return this;switch(Q?Q=!1:F=$(),C.state){case"HEADER":/:/.test(F)?w(F):F||(C.state="ID");continue;case"NOTE":F||(C.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(F)){C.state="NOTE";break}if(!F)continue;C.cue=new(C.vttjs.VTTCue||C.window.VTTCue)(0,0,"");try{C.cue.align="center"}catch{C.cue.align="middle"}if(C.state="CUE",F.indexOf("-->")===-1){C.cue.id=F;continue}case"CUE":try{o(F,C.cue,C.regionList)}catch(Z){C.reportOrThrowError(Z),C.cue=null,C.state="BADCUE";continue}C.state="CUETEXT";continue;case"CUETEXT":var q=F.indexOf("-->")!==-1;if(!F||q&&(Q=!0)){C.oncue&&C.oncue(C.cue),C.cue=null,C.state="ID";continue}C.cue.text&&(C.cue.text+=`
16
16
  `),C.cue.text+=F.replace(/\u2028/g,`
17
17
  `).replace(/u2029/g,`
18
- `);continue;case"BADCUE":F||(C.state="ID");continue}}}catch(H){C.reportOrThrowError(H),C.state==="CUETEXT"&&C.cue&&C.oncue&&C.oncue(C.cue),C.cue=null,C.state=C.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var b=this;try{if(b.buffer+=b.decoder.decode(),(b.cue||b.state==="HEADER")&&(b.buffer+=`
18
+ `);continue;case"BADCUE":F||(C.state="ID");continue}}}catch(Z){C.reportOrThrowError(Z),C.state==="CUETEXT"&&C.cue&&C.oncue&&C.oncue(C.cue),C.cue=null,C.state=C.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var b=this;try{if(b.buffer+=b.decoder.decode(),(b.cue||b.state==="HEADER")&&(b.buffer+=`
19
19
 
20
- `,b.parse()),b.state==="INITIAL")throw new t(t.Errors.BadSignature)}catch(C){b.reportOrThrowError(C)}return b.onflush&&b.onflush(),this}},wo=M,wo}var Do,qc;function Xb(){if(qc)return Do;qc=1;var r="auto",e={"":1,lr:1,rl:1},t={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=t[o.toLowerCase()];return l?o.toLowerCase():!1}function a(o,l,c){this.hasBeenReset=!1;var h="",m=!1,g=o,k=l,T=c,O=null,_="",S=!0,R="auto",L="start",I="auto",j="auto",M=100,P="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return h},set:function(N){h=""+N}},pauseOnExit:{enumerable:!0,get:function(){return m},set:function(N){m=!!N}},startTime:{enumerable:!0,get:function(){return g},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");g=N,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return k},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");k=N,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return T},set:function(N){T=""+N,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return O},set:function(N){O=N,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return _},set:function(N){var X=n(N);if(X===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");_=X,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return S},set:function(N){S=!!N,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return R},set:function(N){if(typeof N!="number"&&N!==r)throw new SyntaxError("Line: an invalid number or illegal string was specified.");R=N,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return L},set:function(N){var X=s(N);X?(L=X,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return I},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");I=N,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return j},set:function(N){var X=s(N);X?(j=X,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return M},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");M=N,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return P},set:function(N){var X=s(N);if(!X)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");P=X,this.hasBeenReset=!0}}}),this.displayState=void 0}return a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},Do=a,Do}var Ao,Hc;function Kb(){if(Hc)return Ao;Hc=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 t(s){return typeof s=="number"&&s>=0&&s<=100}function n(){var s=100,a=3,o=0,l=100,c=0,h=100,m="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(g){if(!t(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(!t(g))throw new Error("RegionAnchorX must be between 0 and 100.");l=g}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(g){if(!t(g))throw new Error("RegionAnchorY must be between 0 and 100.");o=g}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(g){if(!t(g))throw new Error("ViewportAnchorY must be between 0 and 100.");h=g}},viewportAnchorX:{enumerable:!0,get:function(){return c},set:function(g){if(!t(g))throw new Error("ViewportAnchorX must be between 0 and 100.");c=g}},scroll:{enumerable:!0,get:function(){return m},set:function(g){var k=e(g);k===!1?console.warn("Scroll: an invalid or illegal string was specified."):m=k}}})}return Ao=n,Ao}var jc;function Qb(){if(jc)return ko.exports;jc=1;var r=wa(),e=ko.exports={WebVTT:Yb(),VTTCue:Xb(),VTTRegion:Kb()};r.vttjs=e,r.WebVTT=e.WebVTT;var t=e.VTTCue,n=e.VTTRegion,s=r.VTTCue,a=r.VTTRegion;return e.shim=function(){r.VTTCue=t,r.VTTRegion=n},e.restore=function(){r.VTTCue=s,r.VTTRegion=a},r.VTTCue||e.shim(),ko.exports}var Zb=Qb();const zc=gr(Zb);function xt(){return xt=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},xt.apply(null,arguments)}var Gc="https://example.com",Da=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^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||Gc);var a=new URL(t,e);return s?a.href.slice(Gc.length):n?a.href.slice(a.protocol.length):a.href},Ml=(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,h=0;h<c;++h)s[h].apply(this,l)},e.dispose=function(){this.listeners={}},e.pipe=function(n){this.on("data",function(s){n.push(s)})},r})(),Jb=function(e){return W.atob?W.atob(e):Buffer.from(e,"base64").toString("binary")};function Nh(r){for(var e=Jb(r),t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class e4 extends Ml{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(`
20
+ `,b.parse()),b.state==="INITIAL")throw new t(t.Errors.BadSignature)}catch(C){b.reportOrThrowError(C)}return b.onflush&&b.onflush(),this}},wo=M,wo}var Do,qc;function Xb(){if(qc)return Do;qc=1;var r="auto",e={"":1,lr:1,rl:1},t={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=t[o.toLowerCase()];return l?o.toLowerCase():!1}function a(o,l,c){this.hasBeenReset=!1;var h="",m=!1,g=o,k=l,T=c,I=null,_="",S=!0,R="auto",L="start",O="auto",H="auto",M=100,P="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return h},set:function(N){h=""+N}},pauseOnExit:{enumerable:!0,get:function(){return m},set:function(N){m=!!N}},startTime:{enumerable:!0,get:function(){return g},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");g=N,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return k},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");k=N,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return T},set:function(N){T=""+N,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return I},set:function(N){I=N,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return _},set:function(N){var X=n(N);if(X===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");_=X,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return S},set:function(N){S=!!N,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return R},set:function(N){if(typeof N!="number"&&N!==r)throw new SyntaxError("Line: an invalid number or illegal string was specified.");R=N,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return L},set:function(N){var X=s(N);X?(L=X,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return O},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");O=N,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return H},set:function(N){var X=s(N);X?(H=X,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return M},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");M=N,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return P},set:function(N){var X=s(N);if(!X)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");P=X,this.hasBeenReset=!0}}}),this.displayState=void 0}return a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},Do=a,Do}var Ao,Hc;function Kb(){if(Hc)return Ao;Hc=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 t(s){return typeof s=="number"&&s>=0&&s<=100}function n(){var s=100,a=3,o=0,l=100,c=0,h=100,m="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(g){if(!t(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(!t(g))throw new Error("RegionAnchorX must be between 0 and 100.");l=g}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(g){if(!t(g))throw new Error("RegionAnchorY must be between 0 and 100.");o=g}},viewportAnchorY:{enumerable:!0,get:function(){return h},set:function(g){if(!t(g))throw new Error("ViewportAnchorY must be between 0 and 100.");h=g}},viewportAnchorX:{enumerable:!0,get:function(){return c},set:function(g){if(!t(g))throw new Error("ViewportAnchorX must be between 0 and 100.");c=g}},scroll:{enumerable:!0,get:function(){return m},set:function(g){var k=e(g);k===!1?console.warn("Scroll: an invalid or illegal string was specified."):m=k}}})}return Ao=n,Ao}var jc;function Qb(){if(jc)return ko.exports;jc=1;var r=wa(),e=ko.exports={WebVTT:Yb(),VTTCue:Xb(),VTTRegion:Kb()};r.vttjs=e,r.WebVTT=e.WebVTT;var t=e.VTTCue,n=e.VTTRegion,s=r.VTTCue,a=r.VTTRegion;return e.shim=function(){r.VTTCue=t,r.VTTRegion=n},e.restore=function(){r.VTTCue=s,r.VTTRegion=a},r.VTTCue||e.shim(),ko.exports}var Zb=Qb();const zc=gr(Zb);function xt(){return xt=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},xt.apply(null,arguments)}var Gc="https://example.com",Da=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^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||Gc);var a=new URL(t,e);return s?a.href.slice(Gc.length):n?a.href.slice(a.protocol.length):a.href},Ml=(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,h=0;h<c;++h)s[h].apply(this,l)},e.dispose=function(){this.listeners={}},e.pipe=function(n){this.on("data",function(s){n.push(s)})},r})(),Jb=function(e){return W.atob?W.atob(e):Buffer.from(e,"base64").toString("binary")};function Nh(r){for(var e=Jb(r),t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class e4 extends Ml{constructor(){super(),this.buffer=""}push(e){let t;for(this.buffer+=e,t=this.buffer.indexOf(`
21
21
  `);t>-1;t=this.buffer.indexOf(`
22
- `))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const t4=" ",No=function(r){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(r||""),t={};return e[1]&&(t.length=parseInt(e[1],10)),e[2]&&(t.offset=parseInt(e[2],10)),t},i4=function(){const t="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+t+")")},Xt=function(r){const e={};if(!r)return e;const t=r.split(i4());let n=t.length,s;for(;n--;)t[n]!==""&&(s=/([^=]*)=(.*)/.exec(t[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},Wc=r=>{const e=r.split("x"),t={};return e[0]&&(t.width=parseInt(e[0],10)),e[1]&&(t.height=parseInt(e[1],10)),t};class n4 extends Ml{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,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",""),t=/^#EXTM3U/.exec(a),t){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(a),t){n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),this.trigger("data",n);return}if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(a),t){n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),this.trigger("data",n);return}if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(a),t){n=xt(No(t[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",n);return}if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(a),t){n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),this.trigger("data",n);return}if(t=/^#EXT-X-MAP:(.*)$/.exec(a),t){if(n={type:"tag",tagType:"map"},t[1]){const o=Xt(t[1]);o.URI&&(n.uri=o.URI),o.BYTERANGE&&(n.byterange=No(o.BYTERANGE))}this.trigger("data",n);return}if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(a),t){n={type:"tag",tagType:"stream-inf"},t[1]&&(n.attributes=Xt(t[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Wc(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(t=/^#EXT-X-MEDIA:(.*)$/.exec(a),t){n={type:"tag",tagType:"media"},t[1]&&(n.attributes=Xt(t[1])),this.trigger("data",n);return}if(t=/^#EXT-X-ENDLIST/.exec(a),t){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(t=/^#EXT-X-DISCONTINUITY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(a),t){n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),this.trigger("data",n);return}if(t=/^#EXT-X-KEY:(.*)$/.exec(a),t){n={type:"tag",tagType:"key"},t[1]&&(n.attributes=Xt(t[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(t=/^#EXT-X-START:(.*)$/.exec(a),t){n={type:"tag",tagType:"start"},t[1]&&(n.attributes=Xt(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),this.trigger("data",n);return}if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(a),t){n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",this.trigger("data",n);return}if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(a),t){n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",this.trigger("data",n);return}if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(a),t){n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",this.trigger("data",n);return}if(t=/^#EXT-X-SKIP:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"skip"},n.attributes=Xt(t[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(t4)),this.trigger("data",n);return}if(t=/^#EXT-X-PART:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"part"},n.attributes=Xt(t[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=No(n.attributes.BYTERANGE)),this.trigger("data",n);return}if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"server-control"},n.attributes=Xt(t[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(t=/^#EXT-X-PART-INF:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"part-inf"},n.attributes=Xt(t[1]),["PART-TARGET"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),this.trigger("data",n);return}if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"preload-hint"},n.attributes=Xt(t[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(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"rendition-report"},n.attributes=Xt(t[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(t=/^#EXT-X-DATERANGE:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"daterange"},n.attributes=Xt(t[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]),h=/^\d+(\.\d+)?$/.test(n.attributes[l]);n.attributes[l]=c?n.attributes[l].toString(16):h?parseFloat(n.attributes[l]):String(n.attributes[l])}this.trigger("data",n);return}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(a),t){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(a),t){n={type:"tag",tagType:"content-steering"},n.attributes=Xt(t[1]),this.trigger("data",n);return}if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(a),t){n={type:"tag",tagType:"i-frame-playlist"},n.attributes=Xt(t[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=Wc(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(t=/^#EXT-X-DEFINE:(.*)$/.exec(a),t){n={type:"tag",tagType:"define"},n.attributes=Xt(t[1]),this.trigger("data",n);return}this.trigger("data",{type:"tag",data:a.slice(4)})})}addParser({expression:e,customType:t,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:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){const n=s=>e.test(s)?t(s):s;this.tagMappers.push(n)}}const r4=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),cn=function(r){const e={};return Object.keys(r).forEach(function(t){e[r4(t)]=r[t]}),e},Io=function(r){const{serverControl:e,targetDuration:t,partTargetDuration:n}=r;if(!e)return;const s="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",l=t&&t*3,c=n&&n*2;t&&!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 s4 extends Ml{constructor(e={}){super(),this.lineStream=new e4,this.parseStream=new n4,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const t=this,n=[];let s={},a,o,l=!1;const c=function(){},h={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 k=0,T=0;const O={};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(_){let S,R;if(t.manifest.definitions){for(const L in t.manifest.definitions)if(_.uri&&(_.uri=_.uri.replace(`{$${L}}`,t.manifest.definitions[L])),_.attributes)for(const I in _.attributes)typeof _.attributes[I]=="string"&&(_.attributes[I]=_.attributes[I].replace(`{$${L}}`,t.manifest.definitions[L]))}({tag(){({version(){_.version&&(this.manifest.version=_.version)},"allow-cache"(){this.manifest.allowCache=_.allowed,"allowed"in _||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const L={};"length"in _&&(s.byterange=L,L.length=_.length,"offset"in _||(_.offset=k)),"offset"in _&&(s.byterange=L,L.offset=_.offset),k=L.offset+L.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),_.title&&(s.title=_.title),_.duration>0&&(s.duration=_.duration),_.duration===0&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(!_.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(_.attributes.METHOD==="NONE"){o=null;return}if(!_.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(_.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:_.attributes};return}if(_.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:_.attributes.URI};return}if(_.attributes.KEYFORMAT===m){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(_.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(_.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),_.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(_.attributes.KEYID&&_.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:_.attributes.KEYFORMAT,keyId:_.attributes.KEYID.substring(2)},pssh:Nh(_.attributes.URI.split(",")[1])};return}_.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:_.attributes.METHOD||"AES-128",uri:_.attributes.URI},typeof _.attributes.IV<"u"&&(o.iv=_.attributes.IV)},"media-sequence"(){if(!isFinite(_.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+_.number});return}this.manifest.mediaSequence=_.number},"discontinuity-sequence"(){if(!isFinite(_.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+_.number});return}this.manifest.discontinuitySequence=_.number,g=_.number},"playlist-type"(){if(!/VOD|EVENT/.test(_.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+_.playlist});return}this.manifest.playlistType=_.playlistType},map(){a={},_.uri&&(a.uri=_.uri),_.byterange&&(a.byterange=_.byterange),o&&(a.key=o)},"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||h,!_.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}s.attributes||(s.attributes={}),xt(s.attributes,_.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,!(_.attributes&&_.attributes.TYPE&&_.attributes["GROUP-ID"]&&_.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const L=this.manifest.mediaGroups[_.attributes.TYPE];L[_.attributes["GROUP-ID"]]=L[_.attributes["GROUP-ID"]]||{},S=L[_.attributes["GROUP-ID"]],R={default:/yes/i.test(_.attributes.DEFAULT)},R.default?R.autoselect=!0:R.autoselect=/yes/i.test(_.attributes.AUTOSELECT),_.attributes.LANGUAGE&&(R.language=_.attributes.LANGUAGE),_.attributes.URI&&(R.uri=_.attributes.URI),_.attributes["INSTREAM-ID"]&&(R.instreamId=_.attributes["INSTREAM-ID"]),_.attributes.CHARACTERISTICS&&(R.characteristics=_.attributes.CHARACTERISTICS),_.attributes.FORCED&&(R.forced=/yes/i.test(_.attributes.FORCED)),S[_.attributes.NAME]=R},discontinuity(){g+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=_.dateTimeString,this.manifest.dateTimeObject=_.dateTimeObject),s.dateTimeString=_.dateTimeString,s.dateTimeObject=_.dateTimeObject;const{lastProgramDateTime:L}=this;this.lastProgramDateTime=new Date(_.dateTimeString).getTime(),L===null&&this.manifest.segments.reduceRight((I,j)=>(j.programDateTime=I-j.duration*1e3,j.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(_.duration)||_.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+_.duration});return}this.manifest.targetDuration=_.duration,Io.call(this,this.manifest)},start(){if(!_.attributes||isNaN(_.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:_.attributes["TIME-OFFSET"],precise:_.attributes.PRECISE}},"cue-out"(){s.cueOut=_.data},"cue-out-cont"(){s.cueOutCont=_.data},"cue-in"(){s.cueIn=_.data},skip(){this.manifest.skip=cn(_.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",_.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const L=this.manifest.segments.length,I=cn(_.attributes);s.parts=s.parts||[],s.parts.push(I),I.byterange&&(I.byterange.hasOwnProperty("offset")||(I.byterange.offset=T),T=I.byterange.offset+I.byterange.length);const j=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${j} for segment #${L}`,_.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((M,P)=>{M.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${P} lacks required attribute(s): LAST-PART`})})},"server-control"(){const L=this.manifest.serverControl=cn(_.attributes);L.hasOwnProperty("canBlockReload")||(L.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Io.call(this,this.manifest),L.canSkipDateranges&&!L.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const L=this.manifest.segments.length,I=cn(_.attributes),j=I.type&&I.type==="PART";s.preloadHints=s.preloadHints||[],s.preloadHints.push(I),I.byterange&&(I.byterange.hasOwnProperty("offset")||(I.byterange.offset=j?T:0,j&&(T=I.byterange.offset+I.byterange.length)));const M=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${M} for segment #${L}`,_.attributes,["TYPE","URI"]),!!I.type)for(let P=0;P<s.preloadHints.length-1;P++){const N=s.preloadHints[P];N.type&&N.type===I.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${M} for segment #${L} has the same TYPE ${I.type} as preload hint #${P}`})}},"rendition-report"(){const L=cn(_.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(L);const I=this.manifest.renditionReports.length-1,j=["LAST-MSN","URI"];l&&j.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${I}`,_.attributes,j)},"part-inf"(){this.manifest.partInf=cn(_.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",_.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Io.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(cn(_.attributes));const L=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${L}`,_.attributes,["ID","START-DATE"]);const I=this.manifest.dateRanges[L];I.endDate&&I.startDate&&new Date(I.endDate)<new Date(I.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),I.duration&&I.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),I.plannedDuration&&I.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const j=!!I.endOnNext;if(j&&!I.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),j&&(I.duration||I.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),I.duration&&I.endDate){const P=I.startDate.getTime()+I.duration*1e3;this.manifest.dateRanges[L].endDate=new Date(P)}if(!O[I.id])O[I.id]=I;else{for(const P in O[I.id])if(I[P]&&JSON.stringify(O[I.id][P])!==JSON.stringify(I[P])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const M=this.manifest.dateRanges.findIndex(P=>P.id===I.id);this.manifest.dateRanges[M]=xt(this.manifest.dateRanges[M],I),O[I.id]=xt(O[I.id],I),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(_.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",_.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const L=(I,j)=>{if(I in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${I}`});return}this.manifest.definitions[I]=j};if("QUERYPARAM"in _.attributes){if("NAME"in _.attributes||"IMPORT"in _.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const I=this.params.get(_.attributes.QUERYPARAM);if(!I){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${_.attributes.QUERYPARAM}`});return}L(_.attributes.QUERYPARAM,decodeURIComponent(I));return}if("NAME"in _.attributes){if("IMPORT"in _.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in _.attributes)||typeof _.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${_.attributes.NAME}`});return}L(_.attributes.NAME,_.attributes.VALUE);return}if("IMPORT"in _.attributes){if(!this.mainDefinitions[_.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${_.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}L(_.attributes.IMPORT,this.mainDefinitions[_.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:_.attributes,uri:_.uri,timeline:g}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",_.attributes,["BANDWIDTH","URI"])}}[_.tagType]||c).call(t)},uri(){s.uri=_.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(){_.segment?(s.custom=s.custom||{},s.custom[_.customType]=_.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[_.customType]=_.data)}})[_.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger("warn",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,n){const s=[];n.forEach(function(a){t.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^/},a4=["video","audio","text"],Yc=["Video","Audio","Text"],Ih=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(t,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 t=e.split(","),n=[];return t.forEach(function(s){s=s.trim();var a;a4.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),h=s.replace(c,"");n.push({type:c,details:h,mediaType:o})}}),a||n.push({type:s,details:"",mediaType:"unknown"})}),n},o4=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];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},Oh=function(e){return e===void 0&&(e=""),Bn.audio.test(e.trim().toLowerCase())},l4=function(e){return e===void 0&&(e=""),Bn.text.test(e.trim().toLowerCase())},or=function(e){if(!(!e||typeof e!="string")){var t=e.toLowerCase().split(",").map(function(a){return Ih(a.trim())}),n="video";t.length===1&&Oh(t[0])?n="audio":t.length===1&&l4(t[0])&&(n="application");var s="mp4";return t.every(function(a){return Bn.mp4.test(a)})?s="mp4":t.every(function(a){return Bn.webm.test(a)})?s="webm":t.every(function(a){return Bn.ogg.test(a)})&&(s="ogg"),n+"/"+s+';codecs="'+e+'"'}},Zr=function(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),W.MediaSource&&W.MediaSource.isTypeSupported&&W.MediaSource.isTypeSupported(or(e))||t&&W.ManagedMediaSource&&W.ManagedMediaSource.isTypeSupported&&W.ManagedMediaSource.isTypeSupported(or(e))||!1},Oo=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(t){t=t.trim();for(var n=0;n<Yc.length;n++){var s=Yc[n];if(Bn["muxer"+s].test(t))return!0}return!1})},Xc="mp4a.40.2",u4="avc1.4d400d",c4=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,d4=/^application\/dash\+xml/i,Bh=function(e){return c4.test(e)?"hls":d4.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},h4=function(e){return e.toString(2).length},f4=function(e){return Math.ceil(h4(e)/8)},Lh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},p4=function(e){return Lh(e)},Pe=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!p4(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Mt=W.BigInt||Number,nl=[Mt("0x1"),Mt("0x100"),Mt("0x10000"),Mt("0x1000000"),Mt("0x100000000"),Mt("0x10000000000"),Mt("0x1000000000000"),Mt("0x100000000000000"),Mt("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 m4=function(e,t){var n=t===void 0?{}:t,s=n.signed,a=s===void 0?!1:s,o=n.le,l=o===void 0?!1:o;e=Pe(e);var c=l?"reduce":"reduceRight",h=e[c]?e[c]:Array.prototype[c],m=h.call(e,function(k,T,O){var _=l?O:Math.abs(O+1-e.length);return k+Mt(T)*nl[_]},Mt(0));if(a){var g=nl[e.length]/Mt(2)-Mt(1);m=Mt(m),m>g&&(m-=g,m-=g,m-=Mt(2))}return Number(m)},g4=function(e,t){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=Mt(e);for(var o=f4(e),l=new Uint8Array(new ArrayBuffer(o)),c=0;c<o;c++){var h=a?c:Math.abs(c+1-l.length);l[h]=Number(e/nl[c]&Mt(255)),e<0&&(l[h]=Math.abs(~l[h]),l[h]-=c===0?1:2)}return l},Mh=function(e,t){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return n},v4=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter(function(l){return l&&(l.byteLength||l.length)&&typeof l!="string"}),t.length<=1)return Pe(t[0]);var s=t.reduce(function(l,c,h){return l+(c.byteLength||c.length)},0),a=new Uint8Array(s),o=0;return t.forEach(function(l){l=Pe(l),a.set(l,o),o+=l.byteLength}),a},dt=function(e,t,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=Pe(e),t=Pe(t);var h=t.every?t.every:Array.prototype.every;return t.length&&e.length-o>=t.length&&h.call(t,function(m,g){var k=c[g]?c[g]&e[o+g]:e[o+g];return m===k})},_4=function(e,t,n){t.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)}})},Hr={},Zi={},kn={},Kc;function Aa(){if(Kc)return kn;Kc=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 h=a[c];if(o.call(void 0,h,c,a))return h}}function e(a,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(a):a}function t(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=t,kn.find=r,kn.freeze=e,kn.MIME_TYPE=n,kn.NAMESPACE=s,kn}var Qc;function Ph(){if(Qc)return Zi;Qc=1;var r=Aa(),e=r.find,t=r.NAMESPACE;function n(x){return x!==""}function s(x){return x?x.split(/[\t\n\f\r ]+/).filter(n):[]}function a(x,D){return x.hasOwnProperty(D)||(x[D]=!0),x}function o(x){if(!x)return[];var D=s(x);return Object.keys(D.reduce(a,{}))}function l(x){return function(D){return x&&x.indexOf(D)!==-1}}function c(x,D){for(var K in x)Object.prototype.hasOwnProperty.call(x,K)&&(D[K]=x[K])}function h(x,D){var K=x.prototype;if(!(K instanceof D)){let ne=function(){};ne.prototype=D.prototype,ne=new ne,c(K,ne),x.prototype=K=ne}K.constructor!=x&&(typeof x!="function"&&console.error("unknown Class:"+x),K.constructor=x)}var m={},g=m.ELEMENT_NODE=1,k=m.ATTRIBUTE_NODE=2,T=m.TEXT_NODE=3,O=m.CDATA_SECTION_NODE=4,_=m.ENTITY_REFERENCE_NODE=5,S=m.ENTITY_NODE=6,R=m.PROCESSING_INSTRUCTION_NODE=7,L=m.COMMENT_NODE=8,I=m.DOCUMENT_NODE=9,j=m.DOCUMENT_TYPE_NODE=10,M=m.DOCUMENT_FRAGMENT_NODE=11,P=m.NOTATION_NODE=12,N={},X={};N.INDEX_SIZE_ERR=(X[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=(X[2]="DOMString size error",2);var b=N.HIERARCHY_REQUEST_ERR=(X[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=(X[4]="Wrong document",4);var C=N.INVALID_CHARACTER_ERR=(X[5]="Invalid character",5);N.NO_DATA_ALLOWED_ERR=(X[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=(X[7]="No modification allowed",7);var $=N.NOT_FOUND_ERR=(X[8]="Not found",8);N.NOT_SUPPORTED_ERR=(X[9]="Not supported",9);var U=N.INUSE_ATTRIBUTE_ERR=(X[10]="Attribute in use",10);N.INVALID_STATE_ERR=(X[11]="Invalid state",11),N.SYNTAX_ERR=(X[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=(X[13]="Invalid modification",13),N.NAMESPACE_ERR=(X[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=(X[15]="Invalid access",15);function E(x,D){if(D instanceof Error)var K=D;else K=this,Error.call(this,X[x]),this.message=X[x],Error.captureStackTrace&&Error.captureStackTrace(this,E);return K.code=x,D&&(this.message=this.message+": "+D),K}E.prototype=Error.prototype,c(N,E);function w(){}w.prototype={length:0,item:function(x){return x>=0&&x<this.length?this[x]:null},toString:function(x,D){for(var K=[],ne=0;ne<this.length;ne++)jt(this[ne],K,x,D);return K.join("")},filter:function(x){return Array.prototype.filter.call(this,x)},indexOf:function(x){return Array.prototype.indexOf.call(this,x)}};function F(x,D){this._node=x,this._refresh=D,G(this)}function G(x){var D=x._node._inc||x._node.ownerDocument._inc;if(x._inc!==D){var K=x._refresh(x._node);if(Ei(x,"length",K.length),!x.$$length||K.length<x.$$length)for(var ne=K.length;ne in x;ne++)Object.prototype.hasOwnProperty.call(x,ne)&&delete x[ne];c(K,x),x._inc=D}}F.prototype.item=function(x){return G(this),this[x]||null},h(F,w);function Z(){}function q(x,D){for(var K=x.length;K--;)if(x[K]===D)return K}function H(x,D,K,ne){if(ne?D[q(D,ne)]=K:D[D.length++]=K,x){K.ownerElement=x;var xe=x.ownerDocument;xe&&(ne&&Ie(xe,x,ne),$e(xe,x,K))}}function Q(x,D,K){var ne=q(D,K);if(ne>=0){for(var xe=D.length-1;ne<xe;)D[ne]=D[++ne];if(D.length=xe,x){var Me=x.ownerDocument;Me&&(Ie(Me,x,K),K.ownerElement=null)}}else throw new E($,new Error(x.tagName+"@"+K))}Z.prototype={length:0,item:w.prototype.item,getNamedItem:function(x){for(var D=this.length;D--;){var K=this[D];if(K.nodeName==x)return K}},setNamedItem:function(x){var D=x.ownerElement;if(D&&D!=this._ownerElement)throw new E(U);var K=this.getNamedItem(x.nodeName);return H(this._ownerElement,this,x,K),K},setNamedItemNS:function(x){var D=x.ownerElement,K;if(D&&D!=this._ownerElement)throw new E(U);return K=this.getNamedItemNS(x.namespaceURI,x.localName),H(this._ownerElement,this,x,K),K},removeNamedItem:function(x){var D=this.getNamedItem(x);return Q(this._ownerElement,this,D),D},removeNamedItemNS:function(x,D){var K=this.getNamedItemNS(x,D);return Q(this._ownerElement,this,K),K},getNamedItemNS:function(x,D){for(var K=this.length;K--;){var ne=this[K];if(ne.localName==D&&ne.namespaceURI==x)return ne}return null}};function J(){}J.prototype={hasFeature:function(x,D){return!0},createDocument:function(x,D,K){var ne=new le;if(ne.implementation=this,ne.childNodes=new w,ne.doctype=K||null,K&&ne.appendChild(K),D){var xe=ne.createElementNS(x,D);ne.appendChild(xe)}return ne},createDocumentType:function(x,D,K){var ne=new ft;return ne.name=x,ne.nodeName=x,ne.publicId=D||"",ne.systemId=K||"",ne}};function re(){}re.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(x,D){return ue(this,x,D)},replaceChild:function(x,D){ue(this,x,D,ce),D&&this.removeChild(D)},removeChild:function(x){return Ye(this,x)},appendChild:function(x){return this.insertBefore(x,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(x){return Rt(this.ownerDocument||this,this,x)},normalize:function(){for(var x=this.firstChild;x;){var D=x.nextSibling;D&&D.nodeType==T&&x.nodeType==T?(this.removeChild(D),x.appendData(D.data)):(x.normalize(),x=D)}},isSupported:function(x,D){return this.ownerDocument.implementation.hasFeature(x,D)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(x){for(var D=this;D;){var K=D._nsMap;if(K){for(var ne in K)if(Object.prototype.hasOwnProperty.call(K,ne)&&K[ne]===x)return ne}D=D.nodeType==k?D.ownerDocument:D.parentNode}return null},lookupNamespaceURI:function(x){for(var D=this;D;){var K=D._nsMap;if(K&&Object.prototype.hasOwnProperty.call(K,x))return K[x];D=D.nodeType==k?D.ownerDocument:D.parentNode}return null},isDefaultNamespace:function(x){var D=this.lookupPrefix(x);return D==null}};function de(x){return x=="<"&&"&lt;"||x==">"&&"&gt;"||x=="&"&&"&amp;"||x=='"'&&"&quot;"||"&#"+x.charCodeAt()+";"}c(m,re),c(m,re.prototype);function Ce(x,D){if(D(x))return!0;if(x=x.firstChild)do if(Ce(x,D))return!0;while(x=x.nextSibling)}function le(){this.ownerDocument=this}function $e(x,D,K){x&&x._inc++;var ne=K.namespaceURI;ne===t.XMLNS&&(D._nsMap[K.prefix?K.localName:""]=K.value)}function Ie(x,D,K,ne){x&&x._inc++;var xe=K.namespaceURI;xe===t.XMLNS&&delete D._nsMap[K.prefix?K.localName:""]}function Oe(x,D,K){if(x&&x._inc){x._inc++;var ne=D.childNodes;if(K)ne[ne.length++]=K;else{for(var xe=D.firstChild,Me=0;xe;)ne[Me++]=xe,xe=xe.nextSibling;ne.length=Me,delete ne[ne.length]}}}function Ye(x,D){var K=D.previousSibling,ne=D.nextSibling;return K?K.nextSibling=ne:x.firstChild=ne,ne?ne.previousSibling=K:x.lastChild=K,D.parentNode=null,D.previousSibling=null,D.nextSibling=null,Oe(x.ownerDocument,x),D}function Fe(x){return x&&(x.nodeType===re.DOCUMENT_NODE||x.nodeType===re.DOCUMENT_FRAGMENT_NODE||x.nodeType===re.ELEMENT_NODE)}function Ze(x){return x&&(me(x)||_e(x)||Je(x)||x.nodeType===re.DOCUMENT_FRAGMENT_NODE||x.nodeType===re.COMMENT_NODE||x.nodeType===re.PROCESSING_INSTRUCTION_NODE)}function Je(x){return x&&x.nodeType===re.DOCUMENT_TYPE_NODE}function me(x){return x&&x.nodeType===re.ELEMENT_NODE}function _e(x){return x&&x.nodeType===re.TEXT_NODE}function be(x,D){var K=x.childNodes||[];if(e(K,me)||Je(D))return!1;var ne=e(K,Je);return!(D&&ne&&K.indexOf(ne)>K.indexOf(D))}function Be(x,D){var K=x.childNodes||[];function ne(Me){return me(Me)&&Me!==D}if(e(K,ne))return!1;var xe=e(K,Je);return!(D&&xe&&K.indexOf(xe)>K.indexOf(D))}function it(x,D,K){if(!Fe(x))throw new E(b,"Unexpected parent node type "+x.nodeType);if(K&&K.parentNode!==x)throw new E($,"child not in parent");if(!Ze(D)||Je(D)&&x.nodeType!==re.DOCUMENT_NODE)throw new E(b,"Unexpected node type "+D.nodeType+" for parent node type "+x.nodeType)}function he(x,D,K){var ne=x.childNodes||[],xe=D.childNodes||[];if(D.nodeType===re.DOCUMENT_FRAGMENT_NODE){var Me=xe.filter(me);if(Me.length>1||e(xe,_e))throw new E(b,"More than one element or text in fragment");if(Me.length===1&&!be(x,K))throw new E(b,"Element in fragment can not be inserted before doctype")}if(me(D)&&!be(x,K))throw new E(b,"Only one element can be added and only after doctype");if(Je(D)){if(e(ne,Je))throw new E(b,"Only one doctype is allowed");var nt=e(ne,me);if(K&&ne.indexOf(nt)<ne.indexOf(K))throw new E(b,"Doctype can only be inserted before an element");if(!K&&nt)throw new E(b,"Doctype can not be appended since element is present")}}function ce(x,D,K){var ne=x.childNodes||[],xe=D.childNodes||[];if(D.nodeType===re.DOCUMENT_FRAGMENT_NODE){var Me=xe.filter(me);if(Me.length>1||e(xe,_e))throw new E(b,"More than one element or text in fragment");if(Me.length===1&&!Be(x,K))throw new E(b,"Element in fragment can not be inserted before doctype")}if(me(D)&&!Be(x,K))throw new E(b,"Only one element can be added and only after doctype");if(Je(D)){if(e(ne,function(zt){return Je(zt)&&zt!==K}))throw new E(b,"Only one doctype is allowed");var nt=e(ne,me);if(K&&ne.indexOf(nt)<ne.indexOf(K))throw new E(b,"Doctype can only be inserted before an element")}}function ue(x,D,K,ne){it(x,D,K),x.nodeType===re.DOCUMENT_NODE&&(ne||he)(x,D,K);var xe=D.parentNode;if(xe&&xe.removeChild(D),D.nodeType===M){var Me=D.firstChild;if(Me==null)return D;var nt=D.lastChild}else Me=nt=D;var St=K?K.previousSibling:x.lastChild;Me.previousSibling=St,nt.nextSibling=K,St?St.nextSibling=Me:x.firstChild=Me,K==null?x.lastChild=nt:K.previousSibling=nt;do{Me.parentNode=x;var zt=x.ownerDocument||x;De(Me,zt)}while(Me!==nt&&(Me=Me.nextSibling));return Oe(x.ownerDocument||x,x),D.nodeType==M&&(D.firstChild=D.lastChild=null),D}function De(x,D){if(x.ownerDocument!==D){if(x.ownerDocument=D,x.nodeType===g&&x.attributes)for(var K=0;K<x.attributes.length;K++){var ne=x.attributes.item(K);ne&&(ne.ownerDocument=D)}for(var xe=x.firstChild;xe;)De(xe,D),xe=xe.nextSibling}}function Ee(x,D){D.parentNode&&D.parentNode.removeChild(D),D.parentNode=x,D.previousSibling=x.lastChild,D.nextSibling=null,D.previousSibling?D.previousSibling.nextSibling=D:x.firstChild=D,x.lastChild=D,Oe(x.ownerDocument,x,D);var K=x.ownerDocument||x;return De(D,K),D}le.prototype={nodeName:"#document",nodeType:I,doctype:null,documentElement:null,_inc:1,insertBefore:function(x,D){if(x.nodeType==M){for(var K=x.firstChild;K;){var ne=K.nextSibling;this.insertBefore(K,D),K=ne}return x}return ue(this,x,D),De(x,this),this.documentElement===null&&x.nodeType===g&&(this.documentElement=x),x},removeChild:function(x){return this.documentElement==x&&(this.documentElement=null),Ye(this,x)},replaceChild:function(x,D){ue(this,x,D,ce),De(x,this),D&&this.removeChild(D),me(x)&&(this.documentElement=x)},importNode:function(x,D){return Xi(this,x,D)},getElementById:function(x){var D=null;return Ce(this.documentElement,function(K){if(K.nodeType==g&&K.getAttribute("id")==x)return D=K,!0}),D},getElementsByClassName:function(x){var D=o(x);return new F(this,function(K){var ne=[];return D.length>0&&Ce(K.documentElement,function(xe){if(xe!==K&&xe.nodeType===g){var Me=xe.getAttribute("class");if(Me){var nt=x===Me;if(!nt){var St=o(Me);nt=D.every(l(St))}nt&&ne.push(xe)}}}),ne})},createElement:function(x){var D=new et;D.ownerDocument=this,D.nodeName=x,D.tagName=x,D.localName=x,D.childNodes=new w;var K=D.attributes=new Z;return K._ownerElement=D,D},createDocumentFragment:function(){var x=new xi;return x.ownerDocument=this,x.childNodes=new w,x},createTextNode:function(x){var D=new ge;return D.ownerDocument=this,D.appendData(x),D},createComment:function(x){var D=new qe;return D.ownerDocument=this,D.appendData(x),D},createCDATASection:function(x){if(x.indexOf("]]>")!==-1)throw new E(C,'data contains "]]>"');var D=new Ne;return D.ownerDocument=this,D.appendData(x),D},createProcessingInstruction:function(x,D){var K=new Ht;return K.ownerDocument=this,K.tagName=K.nodeName=K.target=x,K.nodeValue=K.data=D,K},createAttribute:function(x){var D=new fe;return D.ownerDocument=this,D.name=x,D.nodeName=x,D.localName=x,D.specified=!0,D},createEntityReference:function(x){var D=new Xe;return D.ownerDocument=this,D.nodeName=x,D},createElementNS:function(x,D){var K=new et,ne=D.split(":"),xe=K.attributes=new Z;return K.childNodes=new w,K.ownerDocument=this,K.nodeName=D,K.tagName=D,K.namespaceURI=x,ne.length==2?(K.prefix=ne[0],K.localName=ne[1]):K.localName=D,xe._ownerElement=K,K},createAttributeNS:function(x,D){var K=new fe,ne=D.split(":");return K.ownerDocument=this,K.nodeName=D,K.name=D,K.namespaceURI=x,K.specified=!0,ne.length==2?(K.prefix=ne[0],K.localName=ne[1]):K.localName=D,K}},h(le,re);function et(){this._nsMap={}}et.prototype={nodeType:g,hasAttribute:function(x){return this.getAttributeNode(x)!=null},getAttribute:function(x){var D=this.getAttributeNode(x);return D&&D.value||""},getAttributeNode:function(x){return this.attributes.getNamedItem(x)},setAttribute:function(x,D){var K=this.ownerDocument.createAttribute(x);K.value=K.nodeValue=""+D,this.setAttributeNode(K)},removeAttribute:function(x){var D=this.getAttributeNode(x);D&&this.removeAttributeNode(D)},appendChild:function(x){return x.nodeType===M?this.insertBefore(x,null):Ee(this,x)},setAttributeNode:function(x){return this.attributes.setNamedItem(x)},setAttributeNodeNS:function(x){return this.attributes.setNamedItemNS(x)},removeAttributeNode:function(x){return this.attributes.removeNamedItem(x.nodeName)},removeAttributeNS:function(x,D){var K=this.getAttributeNodeNS(x,D);K&&this.removeAttributeNode(K)},hasAttributeNS:function(x,D){return this.getAttributeNodeNS(x,D)!=null},getAttributeNS:function(x,D){var K=this.getAttributeNodeNS(x,D);return K&&K.value||""},setAttributeNS:function(x,D,K){var ne=this.ownerDocument.createAttributeNS(x,D);ne.value=ne.nodeValue=""+K,this.setAttributeNode(ne)},getAttributeNodeNS:function(x,D){return this.attributes.getNamedItemNS(x,D)},getElementsByTagName:function(x){return new F(this,function(D){var K=[];return Ce(D,function(ne){ne!==D&&ne.nodeType==g&&(x==="*"||ne.tagName==x)&&K.push(ne)}),K})},getElementsByTagNameNS:function(x,D){return new F(this,function(K){var ne=[];return Ce(K,function(xe){xe!==K&&xe.nodeType===g&&(x==="*"||xe.namespaceURI===x)&&(D==="*"||xe.localName==D)&&ne.push(xe)}),ne})}},le.prototype.getElementsByTagName=et.prototype.getElementsByTagName,le.prototype.getElementsByTagNameNS=et.prototype.getElementsByTagNameNS,h(et,re);function fe(){}fe.prototype.nodeType=k,h(fe,re);function ye(){}ye.prototype={data:"",substringData:function(x,D){return this.data.substring(x,x+D)},appendData:function(x){x=this.data+x,this.nodeValue=this.data=x,this.length=x.length},insertData:function(x,D){this.replaceData(x,0,D)},appendChild:function(x){throw new Error(X[b])},deleteData:function(x,D){this.replaceData(x,D,"")},replaceData:function(x,D,K){var ne=this.data.substring(0,x),xe=this.data.substring(x+D);K=ne+K+xe,this.nodeValue=this.data=K,this.length=K.length}},h(ye,re);function ge(){}ge.prototype={nodeName:"#text",nodeType:T,splitText:function(x){var D=this.data,K=D.substring(x);D=D.substring(0,x),this.data=this.nodeValue=D,this.length=D.length;var ne=this.ownerDocument.createTextNode(K);return this.parentNode&&this.parentNode.insertBefore(ne,this.nextSibling),ne}},h(ge,ye);function qe(){}qe.prototype={nodeName:"#comment",nodeType:L},h(qe,ye);function Ne(){}Ne.prototype={nodeName:"#cdata-section",nodeType:O},h(Ne,ye);function ft(){}ft.prototype.nodeType=j,h(ft,re);function Dt(){}Dt.prototype.nodeType=P,h(Dt,re);function pi(){}pi.prototype.nodeType=S,h(pi,re);function Xe(){}Xe.prototype.nodeType=_,h(Xe,re);function xi(){}xi.prototype.nodeName="#document-fragment",xi.prototype.nodeType=M,h(xi,re);function Ht(){}Ht.prototype.nodeType=R,h(Ht,re);function Ci(){}Ci.prototype.serializeToString=function(x,D,K){return yt.call(x,D,K)},re.prototype.toString=yt;function yt(x,D){var K=[],ne=this.nodeType==9&&this.documentElement||this,xe=ne.prefix,Me=ne.namespaceURI;if(Me&&xe==null){var xe=ne.lookupPrefix(Me);if(xe==null)var nt=[{namespace:Me,prefix:null}]}return jt(this,K,x,D,nt),K.join("")}function ei(x,D,K){var ne=x.prefix||"",xe=x.namespaceURI;if(!xe||ne==="xml"&&xe===t.XML||xe===t.XMLNS)return!1;for(var Me=K.length;Me--;){var nt=K[Me];if(nt.prefix===ne)return nt.namespace!==xe}return!0}function li(x,D,K){x.push(" ",D,'="',K.replace(/[<>&"\t\n\r]/g,de),'"')}function jt(x,D,K,ne,xe){if(xe||(xe=[]),ne)if(x=ne(x),x){if(typeof x=="string"){D.push(x);return}}else return;switch(x.nodeType){case g:var Me=x.attributes,nt=Me.length,lt=x.firstChild,St=x.tagName;K=t.isHTML(x.namespaceURI)||K;var zt=St;if(!K&&!x.prefix&&x.namespaceURI){for(var Vt,Bt=0;Bt<Me.length;Bt++)if(Me.item(Bt).name==="xmlns"){Vt=Me.item(Bt).value;break}if(!Vt)for(var ti=xe.length-1;ti>=0;ti--){var Ke=xe[ti];if(Ke.prefix===""&&Ke.namespace===x.namespaceURI){Vt=Ke.namespace;break}}if(Vt!==x.namespaceURI)for(var ti=xe.length-1;ti>=0;ti--){var Ke=xe[ti];if(Ke.namespace===x.namespaceURI){Ke.prefix&&(zt=Ke.prefix+":"+St);break}}}D.push("<",zt);for(var ii=0;ii<nt;ii++){var Gt=Me.item(ii);Gt.prefix=="xmlns"?xe.push({prefix:Gt.localName,namespace:Gt.value}):Gt.nodeName=="xmlns"&&xe.push({prefix:"",namespace:Gt.value})}for(var ii=0;ii<nt;ii++){var Gt=Me.item(ii);if(ei(Gt,K,xe)){var Wt=Gt.prefix||"",kt=Gt.namespaceURI;li(D,Wt?"xmlns:"+Wt:"xmlns",kt),xe.push({prefix:Wt,namespace:kt})}jt(Gt,D,K,ne,xe)}if(St===zt&&ei(x,K,xe)){var Wt=x.prefix||"",kt=x.namespaceURI;li(D,Wt?"xmlns:"+Wt:"xmlns",kt),xe.push({prefix:Wt,namespace:kt})}if(lt||K&&!/^(?:meta|link|img|br|hr|input)$/i.test(St)){if(D.push(">"),K&&/^script$/i.test(St))for(;lt;)lt.data?D.push(lt.data):jt(lt,D,K,ne,xe.slice()),lt=lt.nextSibling;else for(;lt;)jt(lt,D,K,ne,xe.slice()),lt=lt.nextSibling;D.push("</",zt,">")}else D.push("/>");return;case I:case M:for(var lt=x.firstChild;lt;)jt(lt,D,K,ne,xe.slice()),lt=lt.nextSibling;return;case k:return li(D,x.name,x.value);case T:return D.push(x.data.replace(/[<&>]/g,de));case O:return D.push("<![CDATA[",x.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case L:return D.push("<!--",x.data,"-->");case j:var ze=x.publicId,Si=x.systemId;if(D.push("<!DOCTYPE ",x.name),ze)D.push(" PUBLIC ",ze),Si&&Si!="."&&D.push(" ",Si),D.push(">");else if(Si&&Si!=".")D.push(" SYSTEM ",Si,">");else{var Pi=x.internalSubset;Pi&&D.push(" [",Pi,"]"),D.push(">")}return;case R:return D.push("<?",x.target," ",x.data,"?>");case _:return D.push("&",x.nodeName,";");default:D.push("??",x.nodeName)}}function Xi(x,D,K){var ne;switch(D.nodeType){case g:ne=D.cloneNode(!1),ne.ownerDocument=x;case M:break;case k:K=!0;break}if(ne||(ne=D.cloneNode(!1)),ne.ownerDocument=x,ne.parentNode=null,K)for(var xe=D.firstChild;xe;)ne.appendChild(Xi(x,xe,K)),xe=xe.nextSibling;return ne}function Rt(x,D,K){var ne=new D.constructor;for(var xe in D)if(Object.prototype.hasOwnProperty.call(D,xe)){var Me=D[xe];typeof Me!="object"&&Me!=ne[xe]&&(ne[xe]=Me)}switch(D.childNodes&&(ne.childNodes=new w),ne.ownerDocument=x,ne.nodeType){case g:var nt=D.attributes,St=ne.attributes=new Z,zt=nt.length;St._ownerElement=ne;for(var Vt=0;Vt<zt;Vt++)ne.setAttributeNode(Rt(x,nt.item(Vt),!0));break;case k:K=!0}if(K)for(var Bt=D.firstChild;Bt;)ne.appendChild(Rt(x,Bt,K)),Bt=Bt.nextSibling;return ne}function Ei(x,D,K){x[D]=K}try{if(Object.defineProperty){let x=function(D){switch(D.nodeType){case g:case M:var K=[];for(D=D.firstChild;D;)D.nodeType!==7&&D.nodeType!==8&&K.push(x(D)),D=D.nextSibling;return K.join("");default:return D.nodeValue}};Object.defineProperty(F.prototype,"length",{get:function(){return G(this),this.$$length}}),Object.defineProperty(re.prototype,"textContent",{get:function(){return x(this)},set:function(D){switch(this.nodeType){case g:case M:for(;this.firstChild;)this.removeChild(this.firstChild);(D||String(D))&&this.appendChild(this.ownerDocument.createTextNode(D));break;default:this.data=D,this.value=D,this.nodeValue=D}}}),Ei=function(D,K,ne){D["$$"+K]=ne}}}catch{}return Zi.DocumentType=ft,Zi.DOMException=E,Zi.DOMImplementation=J,Zi.Element=et,Zi.Node=re,Zi.NodeList=w,Zi.XMLSerializer=Ci,Zi}var jr={},Bo={},Zc;function y4(){return Zc||(Zc=1,(function(r){var e=Aa().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})(Bo)),Bo}var qs={},Jc;function T4(){if(Jc)return qs;Jc=1;var r=Aa().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]/,t=new RegExp("[\\-\\.0-9"+e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),n=new RegExp("^"+e.source+t.source+"*(?::"+e.source+t.source+"*)?$"),s=0,a=1,o=2,l=3,c=4,h=5,m=6,g=7;function k(b,C){this.message=b,this.locator=C,Error.captureStackTrace&&Error.captureStackTrace(this,k)}k.prototype=new Error,k.prototype.name=k.name;function T(){}T.prototype={parse:function(b,C,$){var U=this.domBuilder;U.startDocument(),j(C,C={}),O(b,C,$,U,this.errorHandler),U.endDocument()}};function O(b,C,$,U,E){function w(De){if(De>65535){De-=65536;var Ee=55296+(De>>10),et=56320+(De&1023);return String.fromCharCode(Ee,et)}else return String.fromCharCode(De)}function F(De){var Ee=De.slice(1,-1);return Object.hasOwnProperty.call($,Ee)?$[Ee]:Ee.charAt(0)==="#"?w(parseInt(Ee.substr(1).replace("x","0x"))):(E.error("entity not found:"+De),De)}function G(De){if(De>Ce){var Ee=b.substring(Ce,De).replace(/&#?\w+;/g,F);J&&Z(Ce),U.characters(Ee,0,De-Ce),Ce=De}}function Z(De,Ee){for(;De>=H&&(Ee=Q.exec(b));)q=Ee.index,H=q+Ee[0].length,J.lineNumber++;J.columnNumber=De-q+1}for(var q=0,H=0,Q=/.*(?:\r\n?|\n)|.*$/g,J=U.locator,re=[{currentNSMap:C}],de={},Ce=0;;){try{var le=b.indexOf("<",Ce);if(le<0){if(!b.substr(Ce).match(/^\s*$/)){var $e=U.doc,Ie=$e.createTextNode(b.substr(Ce));$e.appendChild(Ie),U.currentElement=Ie}return}switch(le>Ce&&G(le),b.charAt(le+1)){case"/":var Be=b.indexOf(">",le+3),Oe=b.substring(le+2,Be).replace(/[ \t\n\r]+$/g,""),Ye=re.pop();Be<0?(Oe=b.substring(le+2).replace(/[\s<].*/,""),E.error("end tag name: "+Oe+" is not complete:"+Ye.tagName),Be=le+1+Oe.length):Oe.match(/\s</)&&(Oe=Oe.replace(/[\s<].*/,""),E.error("end tag name: "+Oe+" maybe not complete"),Be=le+1+Oe.length);var Fe=Ye.localNSMap,Ze=Ye.tagName==Oe,Je=Ze||Ye.tagName&&Ye.tagName.toLowerCase()==Oe.toLowerCase();if(Je){if(U.endElement(Ye.uri,Ye.localName,Oe),Fe)for(var me in Fe)Object.prototype.hasOwnProperty.call(Fe,me)&&U.endPrefixMapping(me);Ze||E.fatalError("end tag name: "+Oe+" is not match the current start tagName:"+Ye.tagName)}else re.push(Ye);Be++;break;case"?":J&&Z(le),Be=P(b,le,U);break;case"!":J&&Z(le),Be=M(b,le,U,E);break;default:J&&Z(le);var _e=new N,be=re[re.length-1].currentNSMap,Be=S(b,le,_e,be,F,E),it=_e.length;if(!_e.closed&&I(b,Be,_e.tagName,de)&&(_e.closed=!0,$.nbsp||E.warning("unclosed xml attribute")),J&&it){for(var he=_(J,{}),ce=0;ce<it;ce++){var ue=_e[ce];Z(ue.offset),ue.locator=_(J,{})}U.locator=he,R(_e,U,be)&&re.push(_e),U.locator=J}else R(_e,U,be)&&re.push(_e);r.isHTML(_e.uri)&&!_e.closed?Be=L(b,Be,_e.tagName,F,U):Be++}}catch(De){if(De instanceof k)throw De;E.error("element parse error: "+De),Be=-1}Be>Ce?Ce=Be:G(Math.max(le,Ce)+1)}}function _(b,C){return C.lineNumber=b.lineNumber,C.columnNumber=b.columnNumber,C}function S(b,C,$,U,E,w){function F(J,re,de){$.attributeNames.hasOwnProperty(J)&&w.fatalError("Attribute "+J+" redefined"),$.addValue(J,re.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,E),de)}for(var G,Z,q=++C,H=s;;){var Q=b.charAt(q);switch(Q){case"=":if(H===a)G=b.slice(C,q),H=l;else if(H===o)H=l;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(H===l||H===a)if(H===a&&(w.warning('attribute value must after "="'),G=b.slice(C,q)),C=q+1,q=b.indexOf(Q,C),q>0)Z=b.slice(C,q),F(G,Z,C-1),H=h;else throw new Error("attribute value no end '"+Q+"' match");else if(H==c)Z=b.slice(C,q),F(G,Z,C),w.warning('attribute "'+G+'" missed start quot('+Q+")!!"),C=q+1,H=h;else throw new Error('attribute value must after "="');break;case"/":switch(H){case s:$.setTagName(b.slice(C,q));case h:case m:case g:H=g,$.closed=!0;case c:case a:break;case o:$.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return w.error("unexpected end of input"),H==s&&$.setTagName(b.slice(C,q)),q;case">":switch(H){case s:$.setTagName(b.slice(C,q));case h:case m:case g:break;case c:case a:Z=b.slice(C,q),Z.slice(-1)==="/"&&($.closed=!0,Z=Z.slice(0,-1));case o:H===o&&(Z=G),H==c?(w.warning('attribute "'+Z+'" missed quot(")!'),F(G,Z,C)):((!r.isHTML(U[""])||!Z.match(/^(?:disabled|checked|selected)$/i))&&w.warning('attribute "'+Z+'" missed value!! "'+Z+'" instead!!'),F(Z,Z,C));break;case l:throw new Error("attribute value missed!!")}return q;case"€":Q=" ";default:if(Q<=" ")switch(H){case s:$.setTagName(b.slice(C,q)),H=m;break;case a:G=b.slice(C,q),H=o;break;case c:var Z=b.slice(C,q);w.warning('attribute "'+Z+'" missed quot(")!!'),F(G,Z,C);case h:H=m;break}else switch(H){case o:$.tagName,(!r.isHTML(U[""])||!G.match(/^(?:disabled|checked|selected)$/i))&&w.warning('attribute "'+G+'" missed value!! "'+G+'" instead2!!'),F(G,G,C),C=q,H=a;break;case h:w.warning('attribute space is required"'+G+'"!!');case m:H=a,C=q;break;case l:H=c,C=q;break;case g:throw new Error("elements closed character '/' and '>' must be connected to")}}q++}}function R(b,C,$){for(var U=b.tagName,E=null,Q=b.length;Q--;){var w=b[Q],F=w.qName,G=w.value,J=F.indexOf(":");if(J>0)var Z=w.prefix=F.slice(0,J),q=F.slice(J+1),H=Z==="xmlns"&&q;else q=F,Z=null,H=F==="xmlns"&&"";w.localName=q,H!==!1&&(E==null&&(E={},j($,$={})),$[H]=E[H]=G,w.uri=r.XMLNS,C.startPrefixMapping(H,G))}for(var Q=b.length;Q--;){w=b[Q];var Z=w.prefix;Z&&(Z==="xml"&&(w.uri=r.XML),Z!=="xmlns"&&(w.uri=$[Z||""]))}var J=U.indexOf(":");J>0?(Z=b.prefix=U.slice(0,J),q=b.localName=U.slice(J+1)):(Z=null,q=b.localName=U);var re=b.uri=$[Z||""];if(C.startElement(re,q,U,b),b.closed){if(C.endElement(re,q,U),E)for(Z in E)Object.prototype.hasOwnProperty.call(E,Z)&&C.endPrefixMapping(Z)}else return b.currentNSMap=$,b.localNSMap=E,!0}function L(b,C,$,U,E){if(/^(?:script|textarea)$/i.test($)){var w=b.indexOf("</"+$+">",C),F=b.substring(C+1,w);if(/[&<]/.test(F))return/^script$/i.test($)?(E.characters(F,0,F.length),w):(F=F.replace(/&#?\w+;/g,U),E.characters(F,0,F.length),w)}return C+1}function I(b,C,$,U){var E=U[$];return E==null&&(E=b.lastIndexOf("</"+$+">"),E<C&&(E=b.lastIndexOf("</"+$)),U[$]=E),E<C}function j(b,C){for(var $ in b)Object.prototype.hasOwnProperty.call(b,$)&&(C[$]=b[$])}function M(b,C,$,U){var E=b.charAt(C+2);switch(E){case"-":if(b.charAt(C+3)==="-"){var w=b.indexOf("-->",C+4);return w>C?($.comment(b,C+4,w-C-4),w+3):(U.error("Unclosed comment"),-1)}else return-1;default:if(b.substr(C+3,6)=="CDATA["){var w=b.indexOf("]]>",C+9);return $.startCDATA(),$.characters(b,C+9,w-C-9),$.endCDATA(),w+3}var F=X(b,C),G=F.length;if(G>1&&/!doctype/i.test(F[0][0])){var Z=F[1][0],q=!1,H=!1;G>3&&(/^public$/i.test(F[2][0])?(q=F[3][0],H=G>4&&F[4][0]):/^system$/i.test(F[2][0])&&(H=F[3][0]));var Q=F[G-1];return $.startDTD(Z,q,H),$.endDTD(),Q.index+Q[0].length}}return-1}function P(b,C,$){var U=b.indexOf("?>",C);if(U){var E=b.substring(C,U).match(/^<\?(\S*)\s*([\s\S]*?)$/);return E?(E[0].length,$.processingInstruction(E[1],E[2]),U+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(b){if(!n.test(b))throw new Error("invalid tagName:"+b);this.tagName=b},addValue:function(b,C,$){if(!n.test(b))throw new Error("invalid attribute:"+b);this.attributeNames[b]=this.length,this[this.length++]={qName:b,value:C,offset:$}},length:0,getLocalName:function(b){return this[b].localName},getLocator:function(b){return this[b].locator},getQName:function(b){return this[b].qName},getURI:function(b){return this[b].uri},getValue:function(b){return this[b].value}};function X(b,C){var $,U=[],E=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(E.lastIndex=C,E.exec(b);$=E.exec(b);)if(U.push($),$[1])return U}return qs.XMLReader=T,qs.ParseError=k,qs}var ed;function b4(){if(ed)return jr;ed=1;var r=Aa(),e=Ph(),t=y4(),n=T4(),s=e.DOMImplementation,a=r.NAMESPACE,o=n.ParseError,l=n.XMLReader;function c(S){return S.replace(/\r[\n\u0085]/g,`
22
+ `))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const t4=" ",No=function(r){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(r||""),t={};return e[1]&&(t.length=parseInt(e[1],10)),e[2]&&(t.offset=parseInt(e[2],10)),t},i4=function(){const t="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+t+")")},Xt=function(r){const e={};if(!r)return e;const t=r.split(i4());let n=t.length,s;for(;n--;)t[n]!==""&&(s=/([^=]*)=(.*)/.exec(t[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},Wc=r=>{const e=r.split("x"),t={};return e[0]&&(t.width=parseInt(e[0],10)),e[1]&&(t.height=parseInt(e[1],10)),t};class n4 extends Ml{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let t,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",""),t=/^#EXTM3U/.exec(a),t){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(a),t){n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),this.trigger("data",n);return}if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(a),t){n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),this.trigger("data",n);return}if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(a),t){n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),this.trigger("data",n);return}if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(a),t){n=xt(No(t[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",n);return}if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(a),t){n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),this.trigger("data",n);return}if(t=/^#EXT-X-MAP:(.*)$/.exec(a),t){if(n={type:"tag",tagType:"map"},t[1]){const o=Xt(t[1]);o.URI&&(n.uri=o.URI),o.BYTERANGE&&(n.byterange=No(o.BYTERANGE))}this.trigger("data",n);return}if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(a),t){n={type:"tag",tagType:"stream-inf"},t[1]&&(n.attributes=Xt(t[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Wc(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(t=/^#EXT-X-MEDIA:(.*)$/.exec(a),t){n={type:"tag",tagType:"media"},t[1]&&(n.attributes=Xt(t[1])),this.trigger("data",n);return}if(t=/^#EXT-X-ENDLIST/.exec(a),t){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(t=/^#EXT-X-DISCONTINUITY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(a),t){n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),this.trigger("data",n);return}if(t=/^#EXT-X-KEY:(.*)$/.exec(a),t){n={type:"tag",tagType:"key"},t[1]&&(n.attributes=Xt(t[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(t=/^#EXT-X-START:(.*)$/.exec(a),t){n={type:"tag",tagType:"start"},t[1]&&(n.attributes=Xt(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),this.trigger("data",n);return}if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(a),t){n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",this.trigger("data",n);return}if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(a),t){n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",this.trigger("data",n);return}if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(a),t){n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",this.trigger("data",n);return}if(t=/^#EXT-X-SKIP:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"skip"},n.attributes=Xt(t[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(t4)),this.trigger("data",n);return}if(t=/^#EXT-X-PART:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"part"},n.attributes=Xt(t[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=No(n.attributes.BYTERANGE)),this.trigger("data",n);return}if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"server-control"},n.attributes=Xt(t[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(t=/^#EXT-X-PART-INF:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"part-inf"},n.attributes=Xt(t[1]),["PART-TARGET"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),this.trigger("data",n);return}if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"preload-hint"},n.attributes=Xt(t[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(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"rendition-report"},n.attributes=Xt(t[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(t=/^#EXT-X-DATERANGE:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"daterange"},n.attributes=Xt(t[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]),h=/^\d+(\.\d+)?$/.test(n.attributes[l]);n.attributes[l]=c?n.attributes[l].toString(16):h?parseFloat(n.attributes[l]):String(n.attributes[l])}this.trigger("data",n);return}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(a),t){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(a),t){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(a),t){n={type:"tag",tagType:"content-steering"},n.attributes=Xt(t[1]),this.trigger("data",n);return}if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(a),t){n={type:"tag",tagType:"i-frame-playlist"},n.attributes=Xt(t[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=Wc(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(t=/^#EXT-X-DEFINE:(.*)$/.exec(a),t){n={type:"tag",tagType:"define"},n.attributes=Xt(t[1]),this.trigger("data",n);return}this.trigger("data",{type:"tag",data:a.slice(4)})})}addParser({expression:e,customType:t,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:t,segment:s}),!0})}addTagMapper({expression:e,map:t}){const n=s=>e.test(s)?t(s):s;this.tagMappers.push(n)}}const r4=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),cn=function(r){const e={};return Object.keys(r).forEach(function(t){e[r4(t)]=r[t]}),e},Io=function(r){const{serverControl:e,targetDuration:t,partTargetDuration:n}=r;if(!e)return;const s="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",l=t&&t*3,c=n&&n*2;t&&!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 s4 extends Ml{constructor(e={}){super(),this.lineStream=new e4,this.parseStream=new n4,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const t=this,n=[];let s={},a,o,l=!1;const c=function(){},h={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 k=0,T=0;const I={};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(_){let S,R;if(t.manifest.definitions){for(const L in t.manifest.definitions)if(_.uri&&(_.uri=_.uri.replace(`{$${L}}`,t.manifest.definitions[L])),_.attributes)for(const O in _.attributes)typeof _.attributes[O]=="string"&&(_.attributes[O]=_.attributes[O].replace(`{$${L}}`,t.manifest.definitions[L]))}({tag(){({version(){_.version&&(this.manifest.version=_.version)},"allow-cache"(){this.manifest.allowCache=_.allowed,"allowed"in _||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const L={};"length"in _&&(s.byterange=L,L.length=_.length,"offset"in _||(_.offset=k)),"offset"in _&&(s.byterange=L,L.offset=_.offset),k=L.offset+L.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),_.title&&(s.title=_.title),_.duration>0&&(s.duration=_.duration),_.duration===0&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(!_.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(_.attributes.METHOD==="NONE"){o=null;return}if(!_.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(_.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:_.attributes};return}if(_.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:_.attributes.URI};return}if(_.attributes.KEYFORMAT===m){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(_.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(_.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),_.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(_.attributes.KEYID&&_.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:_.attributes.KEYFORMAT,keyId:_.attributes.KEYID.substring(2)},pssh:Nh(_.attributes.URI.split(",")[1])};return}_.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:_.attributes.METHOD||"AES-128",uri:_.attributes.URI},typeof _.attributes.IV<"u"&&(o.iv=_.attributes.IV)},"media-sequence"(){if(!isFinite(_.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+_.number});return}this.manifest.mediaSequence=_.number},"discontinuity-sequence"(){if(!isFinite(_.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+_.number});return}this.manifest.discontinuitySequence=_.number,g=_.number},"playlist-type"(){if(!/VOD|EVENT/.test(_.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+_.playlist});return}this.manifest.playlistType=_.playlistType},map(){a={},_.uri&&(a.uri=_.uri),_.byterange&&(a.byterange=_.byterange),o&&(a.key=o)},"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||h,!_.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}s.attributes||(s.attributes={}),xt(s.attributes,_.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,!(_.attributes&&_.attributes.TYPE&&_.attributes["GROUP-ID"]&&_.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const L=this.manifest.mediaGroups[_.attributes.TYPE];L[_.attributes["GROUP-ID"]]=L[_.attributes["GROUP-ID"]]||{},S=L[_.attributes["GROUP-ID"]],R={default:/yes/i.test(_.attributes.DEFAULT)},R.default?R.autoselect=!0:R.autoselect=/yes/i.test(_.attributes.AUTOSELECT),_.attributes.LANGUAGE&&(R.language=_.attributes.LANGUAGE),_.attributes.URI&&(R.uri=_.attributes.URI),_.attributes["INSTREAM-ID"]&&(R.instreamId=_.attributes["INSTREAM-ID"]),_.attributes.CHARACTERISTICS&&(R.characteristics=_.attributes.CHARACTERISTICS),_.attributes.FORCED&&(R.forced=/yes/i.test(_.attributes.FORCED)),S[_.attributes.NAME]=R},discontinuity(){g+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=_.dateTimeString,this.manifest.dateTimeObject=_.dateTimeObject),s.dateTimeString=_.dateTimeString,s.dateTimeObject=_.dateTimeObject;const{lastProgramDateTime:L}=this;this.lastProgramDateTime=new Date(_.dateTimeString).getTime(),L===null&&this.manifest.segments.reduceRight((O,H)=>(H.programDateTime=O-H.duration*1e3,H.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(_.duration)||_.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+_.duration});return}this.manifest.targetDuration=_.duration,Io.call(this,this.manifest)},start(){if(!_.attributes||isNaN(_.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:_.attributes["TIME-OFFSET"],precise:_.attributes.PRECISE}},"cue-out"(){s.cueOut=_.data},"cue-out-cont"(){s.cueOutCont=_.data},"cue-in"(){s.cueIn=_.data},skip(){this.manifest.skip=cn(_.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",_.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const L=this.manifest.segments.length,O=cn(_.attributes);s.parts=s.parts||[],s.parts.push(O),O.byterange&&(O.byterange.hasOwnProperty("offset")||(O.byterange.offset=T),T=O.byterange.offset+O.byterange.length);const H=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${H} for segment #${L}`,_.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((M,P)=>{M.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${P} lacks required attribute(s): LAST-PART`})})},"server-control"(){const L=this.manifest.serverControl=cn(_.attributes);L.hasOwnProperty("canBlockReload")||(L.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Io.call(this,this.manifest),L.canSkipDateranges&&!L.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const L=this.manifest.segments.length,O=cn(_.attributes),H=O.type&&O.type==="PART";s.preloadHints=s.preloadHints||[],s.preloadHints.push(O),O.byterange&&(O.byterange.hasOwnProperty("offset")||(O.byterange.offset=H?T:0,H&&(T=O.byterange.offset+O.byterange.length)));const M=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${M} for segment #${L}`,_.attributes,["TYPE","URI"]),!!O.type)for(let P=0;P<s.preloadHints.length-1;P++){const N=s.preloadHints[P];N.type&&N.type===O.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${M} for segment #${L} has the same TYPE ${O.type} as preload hint #${P}`})}},"rendition-report"(){const L=cn(_.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(L);const O=this.manifest.renditionReports.length-1,H=["LAST-MSN","URI"];l&&H.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${O}`,_.attributes,H)},"part-inf"(){this.manifest.partInf=cn(_.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",_.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Io.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(cn(_.attributes));const L=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${L}`,_.attributes,["ID","START-DATE"]);const O=this.manifest.dateRanges[L];O.endDate&&O.startDate&&new Date(O.endDate)<new Date(O.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),O.duration&&O.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),O.plannedDuration&&O.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const H=!!O.endOnNext;if(H&&!O.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),H&&(O.duration||O.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),O.duration&&O.endDate){const P=O.startDate.getTime()+O.duration*1e3;this.manifest.dateRanges[L].endDate=new Date(P)}if(!I[O.id])I[O.id]=O;else{for(const P in I[O.id])if(O[P]&&JSON.stringify(I[O.id][P])!==JSON.stringify(O[P])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const M=this.manifest.dateRanges.findIndex(P=>P.id===O.id);this.manifest.dateRanges[M]=xt(this.manifest.dateRanges[M],O),I[O.id]=xt(I[O.id],O),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(_.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",_.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const L=(O,H)=>{if(O in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${O}`});return}this.manifest.definitions[O]=H};if("QUERYPARAM"in _.attributes){if("NAME"in _.attributes||"IMPORT"in _.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const O=this.params.get(_.attributes.QUERYPARAM);if(!O){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${_.attributes.QUERYPARAM}`});return}L(_.attributes.QUERYPARAM,decodeURIComponent(O));return}if("NAME"in _.attributes){if("IMPORT"in _.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in _.attributes)||typeof _.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${_.attributes.NAME}`});return}L(_.attributes.NAME,_.attributes.VALUE);return}if("IMPORT"in _.attributes){if(!this.mainDefinitions[_.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${_.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}L(_.attributes.IMPORT,this.mainDefinitions[_.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:_.attributes,uri:_.uri,timeline:g}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",_.attributes,["BANDWIDTH","URI"])}}[_.tagType]||c).call(t)},uri(){s.uri=_.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(){_.segment?(s.custom=s.custom||{},s.custom[_.customType]=_.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[_.customType]=_.data)}})[_.type].call(t)})}requiredCompatibilityversion(e,t){(e<t||!e)&&this.trigger("warn",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,n){const s=[];n.forEach(function(a){t.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^/},a4=["video","audio","text"],Yc=["Video","Audio","Text"],Ih=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(t,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 t=e.split(","),n=[];return t.forEach(function(s){s=s.trim();var a;a4.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),h=s.replace(c,"");n.push({type:c,details:h,mediaType:o})}}),a||n.push({type:s,details:"",mediaType:"unknown"})}),n},o4=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];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},Oh=function(e){return e===void 0&&(e=""),Bn.audio.test(e.trim().toLowerCase())},l4=function(e){return e===void 0&&(e=""),Bn.text.test(e.trim().toLowerCase())},or=function(e){if(!(!e||typeof e!="string")){var t=e.toLowerCase().split(",").map(function(a){return Ih(a.trim())}),n="video";t.length===1&&Oh(t[0])?n="audio":t.length===1&&l4(t[0])&&(n="application");var s="mp4";return t.every(function(a){return Bn.mp4.test(a)})?s="mp4":t.every(function(a){return Bn.webm.test(a)})?s="webm":t.every(function(a){return Bn.ogg.test(a)})&&(s="ogg"),n+"/"+s+';codecs="'+e+'"'}},Zr=function(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),W.MediaSource&&W.MediaSource.isTypeSupported&&W.MediaSource.isTypeSupported(or(e))||t&&W.ManagedMediaSource&&W.ManagedMediaSource.isTypeSupported&&W.ManagedMediaSource.isTypeSupported(or(e))||!1},Oo=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(t){t=t.trim();for(var n=0;n<Yc.length;n++){var s=Yc[n];if(Bn["muxer"+s].test(t))return!0}return!1})},Xc="mp4a.40.2",u4="avc1.4d400d",c4=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,d4=/^application\/dash\+xml/i,Bh=function(e){return c4.test(e)?"hls":d4.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},h4=function(e){return e.toString(2).length},f4=function(e){return Math.ceil(h4(e)/8)},Lh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},p4=function(e){return Lh(e)},Pe=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!p4(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Mt=W.BigInt||Number,nl=[Mt("0x1"),Mt("0x100"),Mt("0x10000"),Mt("0x1000000"),Mt("0x100000000"),Mt("0x10000000000"),Mt("0x1000000000000"),Mt("0x100000000000000"),Mt("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 m4=function(e,t){var n=t===void 0?{}:t,s=n.signed,a=s===void 0?!1:s,o=n.le,l=o===void 0?!1:o;e=Pe(e);var c=l?"reduce":"reduceRight",h=e[c]?e[c]:Array.prototype[c],m=h.call(e,function(k,T,I){var _=l?I:Math.abs(I+1-e.length);return k+Mt(T)*nl[_]},Mt(0));if(a){var g=nl[e.length]/Mt(2)-Mt(1);m=Mt(m),m>g&&(m-=g,m-=g,m-=Mt(2))}return Number(m)},g4=function(e,t){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=Mt(e);for(var o=f4(e),l=new Uint8Array(new ArrayBuffer(o)),c=0;c<o;c++){var h=a?c:Math.abs(c+1-l.length);l[h]=Number(e/nl[c]&Mt(255)),e<0&&(l[h]=Math.abs(~l[h]),l[h]-=c===0?1:2)}return l},Mh=function(e,t){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return n},v4=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter(function(l){return l&&(l.byteLength||l.length)&&typeof l!="string"}),t.length<=1)return Pe(t[0]);var s=t.reduce(function(l,c,h){return l+(c.byteLength||c.length)},0),a=new Uint8Array(s),o=0;return t.forEach(function(l){l=Pe(l),a.set(l,o),o+=l.byteLength}),a},dt=function(e,t,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=Pe(e),t=Pe(t);var h=t.every?t.every:Array.prototype.every;return t.length&&e.length-o>=t.length&&h.call(t,function(m,g){var k=c[g]?c[g]&e[o+g]:e[o+g];return m===k})},_4=function(e,t,n){t.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)}})},Hr={},Zi={},kn={},Kc;function Aa(){if(Kc)return kn;Kc=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 h=a[c];if(o.call(void 0,h,c,a))return h}}function e(a,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(a):a}function t(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=t,kn.find=r,kn.freeze=e,kn.MIME_TYPE=n,kn.NAMESPACE=s,kn}var Qc;function Ph(){if(Qc)return Zi;Qc=1;var r=Aa(),e=r.find,t=r.NAMESPACE;function n(x){return x!==""}function s(x){return x?x.split(/[\t\n\f\r ]+/).filter(n):[]}function a(x,D){return x.hasOwnProperty(D)||(x[D]=!0),x}function o(x){if(!x)return[];var D=s(x);return Object.keys(D.reduce(a,{}))}function l(x){return function(D){return x&&x.indexOf(D)!==-1}}function c(x,D){for(var K in x)Object.prototype.hasOwnProperty.call(x,K)&&(D[K]=x[K])}function h(x,D){var K=x.prototype;if(!(K instanceof D)){let re=function(){};re.prototype=D.prototype,re=new re,c(K,re),x.prototype=K=re}K.constructor!=x&&(typeof x!="function"&&console.error("unknown Class:"+x),K.constructor=x)}var m={},g=m.ELEMENT_NODE=1,k=m.ATTRIBUTE_NODE=2,T=m.TEXT_NODE=3,I=m.CDATA_SECTION_NODE=4,_=m.ENTITY_REFERENCE_NODE=5,S=m.ENTITY_NODE=6,R=m.PROCESSING_INSTRUCTION_NODE=7,L=m.COMMENT_NODE=8,O=m.DOCUMENT_NODE=9,H=m.DOCUMENT_TYPE_NODE=10,M=m.DOCUMENT_FRAGMENT_NODE=11,P=m.NOTATION_NODE=12,N={},X={};N.INDEX_SIZE_ERR=(X[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=(X[2]="DOMString size error",2);var b=N.HIERARCHY_REQUEST_ERR=(X[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=(X[4]="Wrong document",4);var C=N.INVALID_CHARACTER_ERR=(X[5]="Invalid character",5);N.NO_DATA_ALLOWED_ERR=(X[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=(X[7]="No modification allowed",7);var $=N.NOT_FOUND_ERR=(X[8]="Not found",8);N.NOT_SUPPORTED_ERR=(X[9]="Not supported",9);var U=N.INUSE_ATTRIBUTE_ERR=(X[10]="Attribute in use",10);N.INVALID_STATE_ERR=(X[11]="Invalid state",11),N.SYNTAX_ERR=(X[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=(X[13]="Invalid modification",13),N.NAMESPACE_ERR=(X[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=(X[15]="Invalid access",15);function E(x,D){if(D instanceof Error)var K=D;else K=this,Error.call(this,X[x]),this.message=X[x],Error.captureStackTrace&&Error.captureStackTrace(this,E);return K.code=x,D&&(this.message=this.message+": "+D),K}E.prototype=Error.prototype,c(N,E);function w(){}w.prototype={length:0,item:function(x){return x>=0&&x<this.length?this[x]:null},toString:function(x,D){for(var K=[],re=0;re<this.length;re++)jt(this[re],K,x,D);return K.join("")},filter:function(x){return Array.prototype.filter.call(this,x)},indexOf:function(x){return Array.prototype.indexOf.call(this,x)}};function F(x,D){this._node=x,this._refresh=D,z(this)}function z(x){var D=x._node._inc||x._node.ownerDocument._inc;if(x._inc!==D){var K=x._refresh(x._node);if(Ei(x,"length",K.length),!x.$$length||K.length<x.$$length)for(var re=K.length;re in x;re++)Object.prototype.hasOwnProperty.call(x,re)&&delete x[re];c(K,x),x._inc=D}}F.prototype.item=function(x){return z(this),this[x]||null},h(F,w);function Q(){}function q(x,D){for(var K=x.length;K--;)if(x[K]===D)return K}function Z(x,D,K,re){if(re?D[q(D,re)]=K:D[D.length++]=K,x){K.ownerElement=x;var xe=x.ownerDocument;xe&&(re&&Ie(xe,x,re),$e(xe,x,K))}}function G(x,D,K){var re=q(D,K);if(re>=0){for(var xe=D.length-1;re<xe;)D[re]=D[++re];if(D.length=xe,x){var Me=x.ownerDocument;Me&&(Ie(Me,x,K),K.ownerElement=null)}}else throw new E($,new Error(x.tagName+"@"+K))}Q.prototype={length:0,item:w.prototype.item,getNamedItem:function(x){for(var D=this.length;D--;){var K=this[D];if(K.nodeName==x)return K}},setNamedItem:function(x){var D=x.ownerElement;if(D&&D!=this._ownerElement)throw new E(U);var K=this.getNamedItem(x.nodeName);return Z(this._ownerElement,this,x,K),K},setNamedItemNS:function(x){var D=x.ownerElement,K;if(D&&D!=this._ownerElement)throw new E(U);return K=this.getNamedItemNS(x.namespaceURI,x.localName),Z(this._ownerElement,this,x,K),K},removeNamedItem:function(x){var D=this.getNamedItem(x);return G(this._ownerElement,this,D),D},removeNamedItemNS:function(x,D){var K=this.getNamedItemNS(x,D);return G(this._ownerElement,this,K),K},getNamedItemNS:function(x,D){for(var K=this.length;K--;){var re=this[K];if(re.localName==D&&re.namespaceURI==x)return re}return null}};function J(){}J.prototype={hasFeature:function(x,D){return!0},createDocument:function(x,D,K){var re=new ue;if(re.implementation=this,re.childNodes=new w,re.doctype=K||null,K&&re.appendChild(K),D){var xe=re.createElementNS(x,D);re.appendChild(xe)}return re},createDocumentType:function(x,D,K){var re=new ft;return re.name=x,re.nodeName=x,re.publicId=D||"",re.systemId=K||"",re}};function ie(){}ie.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(x,D){return ce(this,x,D)},replaceChild:function(x,D){ce(this,x,D,de),D&&this.removeChild(D)},removeChild:function(x){return Ye(this,x)},appendChild:function(x){return this.insertBefore(x,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(x){return Rt(this.ownerDocument||this,this,x)},normalize:function(){for(var x=this.firstChild;x;){var D=x.nextSibling;D&&D.nodeType==T&&x.nodeType==T?(this.removeChild(D),x.appendData(D.data)):(x.normalize(),x=D)}},isSupported:function(x,D){return this.ownerDocument.implementation.hasFeature(x,D)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(x){for(var D=this;D;){var K=D._nsMap;if(K){for(var re in K)if(Object.prototype.hasOwnProperty.call(K,re)&&K[re]===x)return re}D=D.nodeType==k?D.ownerDocument:D.parentNode}return null},lookupNamespaceURI:function(x){for(var D=this;D;){var K=D._nsMap;if(K&&Object.prototype.hasOwnProperty.call(K,x))return K[x];D=D.nodeType==k?D.ownerDocument:D.parentNode}return null},isDefaultNamespace:function(x){var D=this.lookupPrefix(x);return D==null}};function oe(x){return x=="<"&&"&lt;"||x==">"&&"&gt;"||x=="&"&&"&amp;"||x=='"'&&"&quot;"||"&#"+x.charCodeAt()+";"}c(m,ie),c(m,ie.prototype);function Ee(x,D){if(D(x))return!0;if(x=x.firstChild)do if(Ee(x,D))return!0;while(x=x.nextSibling)}function ue(){this.ownerDocument=this}function $e(x,D,K){x&&x._inc++;var re=K.namespaceURI;re===t.XMLNS&&(D._nsMap[K.prefix?K.localName:""]=K.value)}function Ie(x,D,K,re){x&&x._inc++;var xe=K.namespaceURI;xe===t.XMLNS&&delete D._nsMap[K.prefix?K.localName:""]}function Oe(x,D,K){if(x&&x._inc){x._inc++;var re=D.childNodes;if(K)re[re.length++]=K;else{for(var xe=D.firstChild,Me=0;xe;)re[Me++]=xe,xe=xe.nextSibling;re.length=Me,delete re[re.length]}}}function Ye(x,D){var K=D.previousSibling,re=D.nextSibling;return K?K.nextSibling=re:x.firstChild=re,re?re.previousSibling=K:x.lastChild=K,D.parentNode=null,D.previousSibling=null,D.nextSibling=null,Oe(x.ownerDocument,x),D}function Fe(x){return x&&(x.nodeType===ie.DOCUMENT_NODE||x.nodeType===ie.DOCUMENT_FRAGMENT_NODE||x.nodeType===ie.ELEMENT_NODE)}function Ze(x){return x&&(me(x)||_e(x)||Je(x)||x.nodeType===ie.DOCUMENT_FRAGMENT_NODE||x.nodeType===ie.COMMENT_NODE||x.nodeType===ie.PROCESSING_INSTRUCTION_NODE)}function Je(x){return x&&x.nodeType===ie.DOCUMENT_TYPE_NODE}function me(x){return x&&x.nodeType===ie.ELEMENT_NODE}function _e(x){return x&&x.nodeType===ie.TEXT_NODE}function be(x,D){var K=x.childNodes||[];if(e(K,me)||Je(D))return!1;var re=e(K,Je);return!(D&&re&&K.indexOf(re)>K.indexOf(D))}function Be(x,D){var K=x.childNodes||[];function re(Me){return me(Me)&&Me!==D}if(e(K,re))return!1;var xe=e(K,Je);return!(D&&xe&&K.indexOf(xe)>K.indexOf(D))}function it(x,D,K){if(!Fe(x))throw new E(b,"Unexpected parent node type "+x.nodeType);if(K&&K.parentNode!==x)throw new E($,"child not in parent");if(!Ze(D)||Je(D)&&x.nodeType!==ie.DOCUMENT_NODE)throw new E(b,"Unexpected node type "+D.nodeType+" for parent node type "+x.nodeType)}function he(x,D,K){var re=x.childNodes||[],xe=D.childNodes||[];if(D.nodeType===ie.DOCUMENT_FRAGMENT_NODE){var Me=xe.filter(me);if(Me.length>1||e(xe,_e))throw new E(b,"More than one element or text in fragment");if(Me.length===1&&!be(x,K))throw new E(b,"Element in fragment can not be inserted before doctype")}if(me(D)&&!be(x,K))throw new E(b,"Only one element can be added and only after doctype");if(Je(D)){if(e(re,Je))throw new E(b,"Only one doctype is allowed");var nt=e(re,me);if(K&&re.indexOf(nt)<re.indexOf(K))throw new E(b,"Doctype can only be inserted before an element");if(!K&&nt)throw new E(b,"Doctype can not be appended since element is present")}}function de(x,D,K){var re=x.childNodes||[],xe=D.childNodes||[];if(D.nodeType===ie.DOCUMENT_FRAGMENT_NODE){var Me=xe.filter(me);if(Me.length>1||e(xe,_e))throw new E(b,"More than one element or text in fragment");if(Me.length===1&&!Be(x,K))throw new E(b,"Element in fragment can not be inserted before doctype")}if(me(D)&&!Be(x,K))throw new E(b,"Only one element can be added and only after doctype");if(Je(D)){if(e(re,function(zt){return Je(zt)&&zt!==K}))throw new E(b,"Only one doctype is allowed");var nt=e(re,me);if(K&&re.indexOf(nt)<re.indexOf(K))throw new E(b,"Doctype can only be inserted before an element")}}function ce(x,D,K,re){it(x,D,K),x.nodeType===ie.DOCUMENT_NODE&&(re||he)(x,D,K);var xe=D.parentNode;if(xe&&xe.removeChild(D),D.nodeType===M){var Me=D.firstChild;if(Me==null)return D;var nt=D.lastChild}else Me=nt=D;var St=K?K.previousSibling:x.lastChild;Me.previousSibling=St,nt.nextSibling=K,St?St.nextSibling=Me:x.firstChild=Me,K==null?x.lastChild=nt:K.previousSibling=nt;do{Me.parentNode=x;var zt=x.ownerDocument||x;De(Me,zt)}while(Me!==nt&&(Me=Me.nextSibling));return Oe(x.ownerDocument||x,x),D.nodeType==M&&(D.firstChild=D.lastChild=null),D}function De(x,D){if(x.ownerDocument!==D){if(x.ownerDocument=D,x.nodeType===g&&x.attributes)for(var K=0;K<x.attributes.length;K++){var re=x.attributes.item(K);re&&(re.ownerDocument=D)}for(var xe=x.firstChild;xe;)De(xe,D),xe=xe.nextSibling}}function Ce(x,D){D.parentNode&&D.parentNode.removeChild(D),D.parentNode=x,D.previousSibling=x.lastChild,D.nextSibling=null,D.previousSibling?D.previousSibling.nextSibling=D:x.firstChild=D,x.lastChild=D,Oe(x.ownerDocument,x,D);var K=x.ownerDocument||x;return De(D,K),D}ue.prototype={nodeName:"#document",nodeType:O,doctype:null,documentElement:null,_inc:1,insertBefore:function(x,D){if(x.nodeType==M){for(var K=x.firstChild;K;){var re=K.nextSibling;this.insertBefore(K,D),K=re}return x}return ce(this,x,D),De(x,this),this.documentElement===null&&x.nodeType===g&&(this.documentElement=x),x},removeChild:function(x){return this.documentElement==x&&(this.documentElement=null),Ye(this,x)},replaceChild:function(x,D){ce(this,x,D,de),De(x,this),D&&this.removeChild(D),me(x)&&(this.documentElement=x)},importNode:function(x,D){return Xi(this,x,D)},getElementById:function(x){var D=null;return Ee(this.documentElement,function(K){if(K.nodeType==g&&K.getAttribute("id")==x)return D=K,!0}),D},getElementsByClassName:function(x){var D=o(x);return new F(this,function(K){var re=[];return D.length>0&&Ee(K.documentElement,function(xe){if(xe!==K&&xe.nodeType===g){var Me=xe.getAttribute("class");if(Me){var nt=x===Me;if(!nt){var St=o(Me);nt=D.every(l(St))}nt&&re.push(xe)}}}),re})},createElement:function(x){var D=new et;D.ownerDocument=this,D.nodeName=x,D.tagName=x,D.localName=x,D.childNodes=new w;var K=D.attributes=new Q;return K._ownerElement=D,D},createDocumentFragment:function(){var x=new xi;return x.ownerDocument=this,x.childNodes=new w,x},createTextNode:function(x){var D=new ge;return D.ownerDocument=this,D.appendData(x),D},createComment:function(x){var D=new qe;return D.ownerDocument=this,D.appendData(x),D},createCDATASection:function(x){if(x.indexOf("]]>")!==-1)throw new E(C,'data contains "]]>"');var D=new Ne;return D.ownerDocument=this,D.appendData(x),D},createProcessingInstruction:function(x,D){var K=new Ht;return K.ownerDocument=this,K.tagName=K.nodeName=K.target=x,K.nodeValue=K.data=D,K},createAttribute:function(x){var D=new fe;return D.ownerDocument=this,D.name=x,D.nodeName=x,D.localName=x,D.specified=!0,D},createEntityReference:function(x){var D=new Xe;return D.ownerDocument=this,D.nodeName=x,D},createElementNS:function(x,D){var K=new et,re=D.split(":"),xe=K.attributes=new Q;return K.childNodes=new w,K.ownerDocument=this,K.nodeName=D,K.tagName=D,K.namespaceURI=x,re.length==2?(K.prefix=re[0],K.localName=re[1]):K.localName=D,xe._ownerElement=K,K},createAttributeNS:function(x,D){var K=new fe,re=D.split(":");return K.ownerDocument=this,K.nodeName=D,K.name=D,K.namespaceURI=x,K.specified=!0,re.length==2?(K.prefix=re[0],K.localName=re[1]):K.localName=D,K}},h(ue,ie);function et(){this._nsMap={}}et.prototype={nodeType:g,hasAttribute:function(x){return this.getAttributeNode(x)!=null},getAttribute:function(x){var D=this.getAttributeNode(x);return D&&D.value||""},getAttributeNode:function(x){return this.attributes.getNamedItem(x)},setAttribute:function(x,D){var K=this.ownerDocument.createAttribute(x);K.value=K.nodeValue=""+D,this.setAttributeNode(K)},removeAttribute:function(x){var D=this.getAttributeNode(x);D&&this.removeAttributeNode(D)},appendChild:function(x){return x.nodeType===M?this.insertBefore(x,null):Ce(this,x)},setAttributeNode:function(x){return this.attributes.setNamedItem(x)},setAttributeNodeNS:function(x){return this.attributes.setNamedItemNS(x)},removeAttributeNode:function(x){return this.attributes.removeNamedItem(x.nodeName)},removeAttributeNS:function(x,D){var K=this.getAttributeNodeNS(x,D);K&&this.removeAttributeNode(K)},hasAttributeNS:function(x,D){return this.getAttributeNodeNS(x,D)!=null},getAttributeNS:function(x,D){var K=this.getAttributeNodeNS(x,D);return K&&K.value||""},setAttributeNS:function(x,D,K){var re=this.ownerDocument.createAttributeNS(x,D);re.value=re.nodeValue=""+K,this.setAttributeNode(re)},getAttributeNodeNS:function(x,D){return this.attributes.getNamedItemNS(x,D)},getElementsByTagName:function(x){return new F(this,function(D){var K=[];return Ee(D,function(re){re!==D&&re.nodeType==g&&(x==="*"||re.tagName==x)&&K.push(re)}),K})},getElementsByTagNameNS:function(x,D){return new F(this,function(K){var re=[];return Ee(K,function(xe){xe!==K&&xe.nodeType===g&&(x==="*"||xe.namespaceURI===x)&&(D==="*"||xe.localName==D)&&re.push(xe)}),re})}},ue.prototype.getElementsByTagName=et.prototype.getElementsByTagName,ue.prototype.getElementsByTagNameNS=et.prototype.getElementsByTagNameNS,h(et,ie);function fe(){}fe.prototype.nodeType=k,h(fe,ie);function ye(){}ye.prototype={data:"",substringData:function(x,D){return this.data.substring(x,x+D)},appendData:function(x){x=this.data+x,this.nodeValue=this.data=x,this.length=x.length},insertData:function(x,D){this.replaceData(x,0,D)},appendChild:function(x){throw new Error(X[b])},deleteData:function(x,D){this.replaceData(x,D,"")},replaceData:function(x,D,K){var re=this.data.substring(0,x),xe=this.data.substring(x+D);K=re+K+xe,this.nodeValue=this.data=K,this.length=K.length}},h(ye,ie);function ge(){}ge.prototype={nodeName:"#text",nodeType:T,splitText:function(x){var D=this.data,K=D.substring(x);D=D.substring(0,x),this.data=this.nodeValue=D,this.length=D.length;var re=this.ownerDocument.createTextNode(K);return this.parentNode&&this.parentNode.insertBefore(re,this.nextSibling),re}},h(ge,ye);function qe(){}qe.prototype={nodeName:"#comment",nodeType:L},h(qe,ye);function Ne(){}Ne.prototype={nodeName:"#cdata-section",nodeType:I},h(Ne,ye);function ft(){}ft.prototype.nodeType=H,h(ft,ie);function Dt(){}Dt.prototype.nodeType=P,h(Dt,ie);function pi(){}pi.prototype.nodeType=S,h(pi,ie);function Xe(){}Xe.prototype.nodeType=_,h(Xe,ie);function xi(){}xi.prototype.nodeName="#document-fragment",xi.prototype.nodeType=M,h(xi,ie);function Ht(){}Ht.prototype.nodeType=R,h(Ht,ie);function Ci(){}Ci.prototype.serializeToString=function(x,D,K){return yt.call(x,D,K)},ie.prototype.toString=yt;function yt(x,D){var K=[],re=this.nodeType==9&&this.documentElement||this,xe=re.prefix,Me=re.namespaceURI;if(Me&&xe==null){var xe=re.lookupPrefix(Me);if(xe==null)var nt=[{namespace:Me,prefix:null}]}return jt(this,K,x,D,nt),K.join("")}function ei(x,D,K){var re=x.prefix||"",xe=x.namespaceURI;if(!xe||re==="xml"&&xe===t.XML||xe===t.XMLNS)return!1;for(var Me=K.length;Me--;){var nt=K[Me];if(nt.prefix===re)return nt.namespace!==xe}return!0}function li(x,D,K){x.push(" ",D,'="',K.replace(/[<>&"\t\n\r]/g,oe),'"')}function jt(x,D,K,re,xe){if(xe||(xe=[]),re)if(x=re(x),x){if(typeof x=="string"){D.push(x);return}}else return;switch(x.nodeType){case g:var Me=x.attributes,nt=Me.length,lt=x.firstChild,St=x.tagName;K=t.isHTML(x.namespaceURI)||K;var zt=St;if(!K&&!x.prefix&&x.namespaceURI){for(var Vt,Bt=0;Bt<Me.length;Bt++)if(Me.item(Bt).name==="xmlns"){Vt=Me.item(Bt).value;break}if(!Vt)for(var ti=xe.length-1;ti>=0;ti--){var Ke=xe[ti];if(Ke.prefix===""&&Ke.namespace===x.namespaceURI){Vt=Ke.namespace;break}}if(Vt!==x.namespaceURI)for(var ti=xe.length-1;ti>=0;ti--){var Ke=xe[ti];if(Ke.namespace===x.namespaceURI){Ke.prefix&&(zt=Ke.prefix+":"+St);break}}}D.push("<",zt);for(var ii=0;ii<nt;ii++){var Gt=Me.item(ii);Gt.prefix=="xmlns"?xe.push({prefix:Gt.localName,namespace:Gt.value}):Gt.nodeName=="xmlns"&&xe.push({prefix:"",namespace:Gt.value})}for(var ii=0;ii<nt;ii++){var Gt=Me.item(ii);if(ei(Gt,K,xe)){var Wt=Gt.prefix||"",kt=Gt.namespaceURI;li(D,Wt?"xmlns:"+Wt:"xmlns",kt),xe.push({prefix:Wt,namespace:kt})}jt(Gt,D,K,re,xe)}if(St===zt&&ei(x,K,xe)){var Wt=x.prefix||"",kt=x.namespaceURI;li(D,Wt?"xmlns:"+Wt:"xmlns",kt),xe.push({prefix:Wt,namespace:kt})}if(lt||K&&!/^(?:meta|link|img|br|hr|input)$/i.test(St)){if(D.push(">"),K&&/^script$/i.test(St))for(;lt;)lt.data?D.push(lt.data):jt(lt,D,K,re,xe.slice()),lt=lt.nextSibling;else for(;lt;)jt(lt,D,K,re,xe.slice()),lt=lt.nextSibling;D.push("</",zt,">")}else D.push("/>");return;case O:case M:for(var lt=x.firstChild;lt;)jt(lt,D,K,re,xe.slice()),lt=lt.nextSibling;return;case k:return li(D,x.name,x.value);case T:return D.push(x.data.replace(/[<&>]/g,oe));case I:return D.push("<![CDATA[",x.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case L:return D.push("<!--",x.data,"-->");case H:var ze=x.publicId,Si=x.systemId;if(D.push("<!DOCTYPE ",x.name),ze)D.push(" PUBLIC ",ze),Si&&Si!="."&&D.push(" ",Si),D.push(">");else if(Si&&Si!=".")D.push(" SYSTEM ",Si,">");else{var Pi=x.internalSubset;Pi&&D.push(" [",Pi,"]"),D.push(">")}return;case R:return D.push("<?",x.target," ",x.data,"?>");case _:return D.push("&",x.nodeName,";");default:D.push("??",x.nodeName)}}function Xi(x,D,K){var re;switch(D.nodeType){case g:re=D.cloneNode(!1),re.ownerDocument=x;case M:break;case k:K=!0;break}if(re||(re=D.cloneNode(!1)),re.ownerDocument=x,re.parentNode=null,K)for(var xe=D.firstChild;xe;)re.appendChild(Xi(x,xe,K)),xe=xe.nextSibling;return re}function Rt(x,D,K){var re=new D.constructor;for(var xe in D)if(Object.prototype.hasOwnProperty.call(D,xe)){var Me=D[xe];typeof Me!="object"&&Me!=re[xe]&&(re[xe]=Me)}switch(D.childNodes&&(re.childNodes=new w),re.ownerDocument=x,re.nodeType){case g:var nt=D.attributes,St=re.attributes=new Q,zt=nt.length;St._ownerElement=re;for(var Vt=0;Vt<zt;Vt++)re.setAttributeNode(Rt(x,nt.item(Vt),!0));break;case k:K=!0}if(K)for(var Bt=D.firstChild;Bt;)re.appendChild(Rt(x,Bt,K)),Bt=Bt.nextSibling;return re}function Ei(x,D,K){x[D]=K}try{if(Object.defineProperty){let x=function(D){switch(D.nodeType){case g:case M:var K=[];for(D=D.firstChild;D;)D.nodeType!==7&&D.nodeType!==8&&K.push(x(D)),D=D.nextSibling;return K.join("");default:return D.nodeValue}};Object.defineProperty(F.prototype,"length",{get:function(){return z(this),this.$$length}}),Object.defineProperty(ie.prototype,"textContent",{get:function(){return x(this)},set:function(D){switch(this.nodeType){case g:case M:for(;this.firstChild;)this.removeChild(this.firstChild);(D||String(D))&&this.appendChild(this.ownerDocument.createTextNode(D));break;default:this.data=D,this.value=D,this.nodeValue=D}}}),Ei=function(D,K,re){D["$$"+K]=re}}}catch{}return Zi.DocumentType=ft,Zi.DOMException=E,Zi.DOMImplementation=J,Zi.Element=et,Zi.Node=ie,Zi.NodeList=w,Zi.XMLSerializer=Ci,Zi}var jr={},Bo={},Zc;function y4(){return Zc||(Zc=1,(function(r){var e=Aa().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})(Bo)),Bo}var qs={},Jc;function T4(){if(Jc)return qs;Jc=1;var r=Aa().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]/,t=new RegExp("[\\-\\.0-9"+e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),n=new RegExp("^"+e.source+t.source+"*(?::"+e.source+t.source+"*)?$"),s=0,a=1,o=2,l=3,c=4,h=5,m=6,g=7;function k(b,C){this.message=b,this.locator=C,Error.captureStackTrace&&Error.captureStackTrace(this,k)}k.prototype=new Error,k.prototype.name=k.name;function T(){}T.prototype={parse:function(b,C,$){var U=this.domBuilder;U.startDocument(),H(C,C={}),I(b,C,$,U,this.errorHandler),U.endDocument()}};function I(b,C,$,U,E){function w(De){if(De>65535){De-=65536;var Ce=55296+(De>>10),et=56320+(De&1023);return String.fromCharCode(Ce,et)}else return String.fromCharCode(De)}function F(De){var Ce=De.slice(1,-1);return Object.hasOwnProperty.call($,Ce)?$[Ce]:Ce.charAt(0)==="#"?w(parseInt(Ce.substr(1).replace("x","0x"))):(E.error("entity not found:"+De),De)}function z(De){if(De>Ee){var Ce=b.substring(Ee,De).replace(/&#?\w+;/g,F);J&&Q(Ee),U.characters(Ce,0,De-Ee),Ee=De}}function Q(De,Ce){for(;De>=Z&&(Ce=G.exec(b));)q=Ce.index,Z=q+Ce[0].length,J.lineNumber++;J.columnNumber=De-q+1}for(var q=0,Z=0,G=/.*(?:\r\n?|\n)|.*$/g,J=U.locator,ie=[{currentNSMap:C}],oe={},Ee=0;;){try{var ue=b.indexOf("<",Ee);if(ue<0){if(!b.substr(Ee).match(/^\s*$/)){var $e=U.doc,Ie=$e.createTextNode(b.substr(Ee));$e.appendChild(Ie),U.currentElement=Ie}return}switch(ue>Ee&&z(ue),b.charAt(ue+1)){case"/":var Be=b.indexOf(">",ue+3),Oe=b.substring(ue+2,Be).replace(/[ \t\n\r]+$/g,""),Ye=ie.pop();Be<0?(Oe=b.substring(ue+2).replace(/[\s<].*/,""),E.error("end tag name: "+Oe+" is not complete:"+Ye.tagName),Be=ue+1+Oe.length):Oe.match(/\s</)&&(Oe=Oe.replace(/[\s<].*/,""),E.error("end tag name: "+Oe+" maybe not complete"),Be=ue+1+Oe.length);var Fe=Ye.localNSMap,Ze=Ye.tagName==Oe,Je=Ze||Ye.tagName&&Ye.tagName.toLowerCase()==Oe.toLowerCase();if(Je){if(U.endElement(Ye.uri,Ye.localName,Oe),Fe)for(var me in Fe)Object.prototype.hasOwnProperty.call(Fe,me)&&U.endPrefixMapping(me);Ze||E.fatalError("end tag name: "+Oe+" is not match the current start tagName:"+Ye.tagName)}else ie.push(Ye);Be++;break;case"?":J&&Q(ue),Be=P(b,ue,U);break;case"!":J&&Q(ue),Be=M(b,ue,U,E);break;default:J&&Q(ue);var _e=new N,be=ie[ie.length-1].currentNSMap,Be=S(b,ue,_e,be,F,E),it=_e.length;if(!_e.closed&&O(b,Be,_e.tagName,oe)&&(_e.closed=!0,$.nbsp||E.warning("unclosed xml attribute")),J&&it){for(var he=_(J,{}),de=0;de<it;de++){var ce=_e[de];Q(ce.offset),ce.locator=_(J,{})}U.locator=he,R(_e,U,be)&&ie.push(_e),U.locator=J}else R(_e,U,be)&&ie.push(_e);r.isHTML(_e.uri)&&!_e.closed?Be=L(b,Be,_e.tagName,F,U):Be++}}catch(De){if(De instanceof k)throw De;E.error("element parse error: "+De),Be=-1}Be>Ee?Ee=Be:z(Math.max(ue,Ee)+1)}}function _(b,C){return C.lineNumber=b.lineNumber,C.columnNumber=b.columnNumber,C}function S(b,C,$,U,E,w){function F(J,ie,oe){$.attributeNames.hasOwnProperty(J)&&w.fatalError("Attribute "+J+" redefined"),$.addValue(J,ie.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,E),oe)}for(var z,Q,q=++C,Z=s;;){var G=b.charAt(q);switch(G){case"=":if(Z===a)z=b.slice(C,q),Z=l;else if(Z===o)Z=l;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(Z===l||Z===a)if(Z===a&&(w.warning('attribute value must after "="'),z=b.slice(C,q)),C=q+1,q=b.indexOf(G,C),q>0)Q=b.slice(C,q),F(z,Q,C-1),Z=h;else throw new Error("attribute value no end '"+G+"' match");else if(Z==c)Q=b.slice(C,q),F(z,Q,C),w.warning('attribute "'+z+'" missed start quot('+G+")!!"),C=q+1,Z=h;else throw new Error('attribute value must after "="');break;case"/":switch(Z){case s:$.setTagName(b.slice(C,q));case h:case m:case g:Z=g,$.closed=!0;case c:case a:break;case o:$.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return w.error("unexpected end of input"),Z==s&&$.setTagName(b.slice(C,q)),q;case">":switch(Z){case s:$.setTagName(b.slice(C,q));case h:case m:case g:break;case c:case a:Q=b.slice(C,q),Q.slice(-1)==="/"&&($.closed=!0,Q=Q.slice(0,-1));case o:Z===o&&(Q=z),Z==c?(w.warning('attribute "'+Q+'" missed quot(")!'),F(z,Q,C)):((!r.isHTML(U[""])||!Q.match(/^(?:disabled|checked|selected)$/i))&&w.warning('attribute "'+Q+'" missed value!! "'+Q+'" instead!!'),F(Q,Q,C));break;case l:throw new Error("attribute value missed!!")}return q;case"€":G=" ";default:if(G<=" ")switch(Z){case s:$.setTagName(b.slice(C,q)),Z=m;break;case a:z=b.slice(C,q),Z=o;break;case c:var Q=b.slice(C,q);w.warning('attribute "'+Q+'" missed quot(")!!'),F(z,Q,C);case h:Z=m;break}else switch(Z){case o:$.tagName,(!r.isHTML(U[""])||!z.match(/^(?:disabled|checked|selected)$/i))&&w.warning('attribute "'+z+'" missed value!! "'+z+'" instead2!!'),F(z,z,C),C=q,Z=a;break;case h:w.warning('attribute space is required"'+z+'"!!');case m:Z=a,C=q;break;case l:Z=c,C=q;break;case g:throw new Error("elements closed character '/' and '>' must be connected to")}}q++}}function R(b,C,$){for(var U=b.tagName,E=null,G=b.length;G--;){var w=b[G],F=w.qName,z=w.value,J=F.indexOf(":");if(J>0)var Q=w.prefix=F.slice(0,J),q=F.slice(J+1),Z=Q==="xmlns"&&q;else q=F,Q=null,Z=F==="xmlns"&&"";w.localName=q,Z!==!1&&(E==null&&(E={},H($,$={})),$[Z]=E[Z]=z,w.uri=r.XMLNS,C.startPrefixMapping(Z,z))}for(var G=b.length;G--;){w=b[G];var Q=w.prefix;Q&&(Q==="xml"&&(w.uri=r.XML),Q!=="xmlns"&&(w.uri=$[Q||""]))}var J=U.indexOf(":");J>0?(Q=b.prefix=U.slice(0,J),q=b.localName=U.slice(J+1)):(Q=null,q=b.localName=U);var ie=b.uri=$[Q||""];if(C.startElement(ie,q,U,b),b.closed){if(C.endElement(ie,q,U),E)for(Q in E)Object.prototype.hasOwnProperty.call(E,Q)&&C.endPrefixMapping(Q)}else return b.currentNSMap=$,b.localNSMap=E,!0}function L(b,C,$,U,E){if(/^(?:script|textarea)$/i.test($)){var w=b.indexOf("</"+$+">",C),F=b.substring(C+1,w);if(/[&<]/.test(F))return/^script$/i.test($)?(E.characters(F,0,F.length),w):(F=F.replace(/&#?\w+;/g,U),E.characters(F,0,F.length),w)}return C+1}function O(b,C,$,U){var E=U[$];return E==null&&(E=b.lastIndexOf("</"+$+">"),E<C&&(E=b.lastIndexOf("</"+$)),U[$]=E),E<C}function H(b,C){for(var $ in b)Object.prototype.hasOwnProperty.call(b,$)&&(C[$]=b[$])}function M(b,C,$,U){var E=b.charAt(C+2);switch(E){case"-":if(b.charAt(C+3)==="-"){var w=b.indexOf("-->",C+4);return w>C?($.comment(b,C+4,w-C-4),w+3):(U.error("Unclosed comment"),-1)}else return-1;default:if(b.substr(C+3,6)=="CDATA["){var w=b.indexOf("]]>",C+9);return $.startCDATA(),$.characters(b,C+9,w-C-9),$.endCDATA(),w+3}var F=X(b,C),z=F.length;if(z>1&&/!doctype/i.test(F[0][0])){var Q=F[1][0],q=!1,Z=!1;z>3&&(/^public$/i.test(F[2][0])?(q=F[3][0],Z=z>4&&F[4][0]):/^system$/i.test(F[2][0])&&(Z=F[3][0]));var G=F[z-1];return $.startDTD(Q,q,Z),$.endDTD(),G.index+G[0].length}}return-1}function P(b,C,$){var U=b.indexOf("?>",C);if(U){var E=b.substring(C,U).match(/^<\?(\S*)\s*([\s\S]*?)$/);return E?(E[0].length,$.processingInstruction(E[1],E[2]),U+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(b){if(!n.test(b))throw new Error("invalid tagName:"+b);this.tagName=b},addValue:function(b,C,$){if(!n.test(b))throw new Error("invalid attribute:"+b);this.attributeNames[b]=this.length,this[this.length++]={qName:b,value:C,offset:$}},length:0,getLocalName:function(b){return this[b].localName},getLocator:function(b){return this[b].locator},getQName:function(b){return this[b].qName},getURI:function(b){return this[b].uri},getValue:function(b){return this[b].value}};function X(b,C){var $,U=[],E=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(E.lastIndex=C,E.exec(b);$=E.exec(b);)if(U.push($),$[1])return U}return qs.XMLReader=T,qs.ParseError=k,qs}var ed;function b4(){if(ed)return jr;ed=1;var r=Aa(),e=Ph(),t=y4(),n=T4(),s=e.DOMImplementation,a=r.NAMESPACE,o=n.ParseError,l=n.XMLReader;function c(S){return S.replace(/\r[\n\u0085]/g,`
25
25
  `).replace(/[\r\u0085\u2028]/g,`
26
- `)}function h(S){this.options=S||{locator:{}}}h.prototype.parseFromString=function(S,R){var L=this.options,I=new l,j=L.domBuilder||new g,M=L.errorHandler,P=L.locator,N=L.xmlns||{},X=/\/x?html?$/.test(R),b=X?t.HTML_ENTITIES:t.XML_ENTITIES;P&&j.setDocumentLocator(P),I.errorHandler=m(M,j,P),I.domBuilder=L.domBuilder||j,X&&(N[""]=a.HTML),N.xml=N.xml||a.XML;var C=L.normalizeLineEndings||c;return S&&typeof S=="string"?I.parse(C(S),N,b):I.errorHandler.error("invalid doc source"),j.doc};function m(S,R,L){if(!S){if(R instanceof g)return R;S=R}var I={},j=S instanceof Function;L=L||{};function M(P){var N=S[P];!N&&j&&(N=S.length==2?function(X){S(P,X)}:S),I[P]=N&&function(X){N("[xmldom "+P+"] "+X+T(L))}||function(){}}return M("warning"),M("error"),M("fatalError"),I}function g(){this.cdata=!1}function k(S,R){R.lineNumber=S.lineNumber,R.columnNumber=S.columnNumber}g.prototype={startDocument:function(){this.doc=new s().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(S,R,L,I){var j=this.doc,M=j.createElementNS(S,L||R),P=I.length;_(this,M),this.currentElement=M,this.locator&&k(this.locator,M);for(var N=0;N<P;N++){var S=I.getURI(N),X=I.getValue(N),L=I.getQName(N),b=j.createAttributeNS(S,L);this.locator&&k(I.getLocator(N),b),b.value=b.nodeValue=X,M.setAttributeNode(b)}},endElement:function(S,R,L){var I=this.currentElement;I.tagName,this.currentElement=I.parentNode},startPrefixMapping:function(S,R){},endPrefixMapping:function(S){},processingInstruction:function(S,R){var L=this.doc.createProcessingInstruction(S,R);this.locator&&k(this.locator,L),_(this,L)},ignorableWhitespace:function(S,R,L){},characters:function(S,R,L){if(S=O.apply(this,arguments),S){if(this.cdata)var I=this.doc.createCDATASection(S);else var I=this.doc.createTextNode(S);this.currentElement?this.currentElement.appendChild(I):/^\s*$/.test(S)&&this.doc.appendChild(I),this.locator&&k(this.locator,I)}},skippedEntity:function(S){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(S){(this.locator=S)&&(S.lineNumber=0)},comment:function(S,R,L){S=O.apply(this,arguments);var I=this.doc.createComment(S);this.locator&&k(this.locator,I),_(this,I)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(S,R,L){var I=this.doc.implementation;if(I&&I.createDocumentType){var j=I.createDocumentType(S,R,L);this.locator&&k(this.locator,j),_(this,j),this.doc.doctype=j}},warning:function(S){console.warn("[xmldom warning] "+S,T(this.locator))},error:function(S){console.error("[xmldom error] "+S,T(this.locator))},fatalError:function(S){throw new o(S,this.locator)}};function T(S){if(S)return`
27
- @`+(S.systemId||"")+"#[line:"+S.lineNumber+",col:"+S.columnNumber+"]"}function O(S,R,L){return typeof S=="string"?S.substr(R,L):S.length>=R+L||R?new java.lang.String(S,R,L)+"":S}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(S){g.prototype[S]=function(){return null}});function _(S,R){S.currentElement?S.currentElement.appendChild(R):S.doc.appendChild(R)}return jr.__DOMHandler=g,jr.normalizeLineEndings=c,jr.DOMParser=h,jr}var td;function x4(){if(td)return Hr;td=1;var r=Ph();return Hr.DOMImplementation=r.DOMImplementation,Hr.XMLSerializer=r.XMLSerializer,Hr.DOMParser=b4().DOMParser,Hr}var C4=x4();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const id=r=>!!r&&typeof r=="object",It=(...r)=>r.reduce((e,t)=>(typeof t!="object"||Object.keys(t).forEach(n=>{Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=e[n].concat(t[n]):id(e[n])&&id(t[n])?e[n]=It(e[n],t[n]):e[n]=t[n]}),e),{}),Rh=r=>Object.keys(r).map(e=>r[e]),E4=(r,e)=>{const t=[];for(let n=r;n<e;n++)t.push(n);return t},lr=r=>r.reduce((e,t)=>e.concat(t),[]),Vh=r=>{if(!r.length)return[];const e=[];for(let t=0;t<r.length;t++)e.push(r[t]);return e},S4=(r,e)=>r.reduce((t,n,s)=>(n[e]&&t.push(s),t),[]),k4=(r,e)=>Rh(r.reduce((t,n)=>(n.forEach(s=>{t[e(s)]=s}),t),{}));var ur={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const ss=({baseUrl:r="",source:e="",range:t="",indexRange:n=""})=>{const s={uri:e,resolvedUri:Da(r||"",e)};if(t||n){const o=(t||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 h;typeof c=="bigint"||typeof l=="bigint"?h=W.BigInt(c)-W.BigInt(l)+W.BigInt(1):h=c-l+1,typeof h=="bigint"&&h<Number.MAX_SAFE_INTEGER&&(h=Number(h)),s.byterange={length:h,offset:l}}return s},w4=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}`},nd=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),D4={static(r){const{duration:e,timescale:t=1,sourceDuration:n,periodDuration:s}=r,a=nd(r.endNumber),o=e/t;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:t,availabilityStartTime:n,timescale:s=1,duration:a,periodStart:o=0,minimumUpdatePeriod:l=0,timeShiftBufferDepth:c=1/0}=r,h=nd(r.endNumber),m=(e+t)/1e3,g=n+o,T=m+l-g,O=Math.ceil(T*s/a),_=Math.floor((m-g-c)*s/a),S=Math.floor((m-g)*s/a);return{start:Math.max(0,_),end:typeof h=="number"?h:Math.min(O,S)}}},A4=r=>e=>{const{duration:t,timescale:n=1,periodStart:s,startNumber:a=1}=r;return{number:a+e,duration:t/n,timeline:s,time:e*t}},Pl=r=>{const{type:e,duration:t,timescale:n=1,periodDuration:s,sourceDuration:a}=r,{start:o,end:l}=D4[e](r),c=E4(o,l).map(A4(r));if(e==="static"){const h=c.length-1,m=typeof s=="number"?s:a;c[h].duration=m-t/n*h}return c},Fh=r=>{const{baseUrl:e,initialization:t={},sourceDuration:n,indexRange:s="",periodStart:a,presentationTime:o,number:l=0,duration:c}=r;if(!e)throw new Error(ur.NO_BASE_URL);const h=ss({baseUrl:e,source:t.sourceURL,range:t.range}),m=ss({baseUrl:e,source:e,indexRange:s});if(m.map=h,c){const g=Pl(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]},Rl=(r,e,t)=>{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,h=e.references.filter(S=>S.referenceType!==1),m=[],g=r.endList?"static":"dynamic",k=r.sidx.timeline;let T=k,O=r.mediaSequence||0,_;typeof e.firstOffset=="bigint"?_=W.BigInt(l)+e.firstOffset:_=l+e.firstOffset;for(let S=0;S<h.length;S++){const R=e.references[S],L=R.referencedSize,I=R.subsegmentDuration;let j;typeof _=="bigint"?j=_+W.BigInt(L)-W.BigInt(1):j=_+L-1;const M=`${_}-${j}`,N=Fh({baseUrl:t,timescale:c,timeline:a,periodStart:k,presentationTime:T,number:O,duration:I,sourceDuration:s,indexRange:M,type:g})[0];n&&(N.map=n),m.push(N),typeof _=="bigint"?_+=W.BigInt(L):_+=L,T+=I/c,O++}return r.segments=m,r},N4=["AUDIO","SUBTITLES"],I4=1/60,$h=r=>k4(r,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),O4=(r,e)=>{for(let t=0;t<r.length;t++)if(r[t].attributes.NAME===e)return r[t];return null},rd=r=>{let e=[];return _4(r,N4,(t,n,s,a)=>{e=e.concat(t.playlists||[])}),e},sd=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((t,n)=>{t.number=r.mediaSequence+n})},B4=({oldPlaylists:r,newPlaylists:e,timelineStarts:t})=>{e.forEach(n=>{n.discontinuitySequence=t.findIndex(function({timeline:c}){return c===n.timeline});const s=O4(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)<I4});if(o===-1){sd({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--),sd({playlist:n,mediaSequence:s.segments[o].number})})},L4=({oldManifest:r,newManifest:e})=>{const t=r.playlists.concat(rd(r)),n=e.playlists.concat(rd(e));return e.timelineStarts=$h([r.timelineStarts,e.timelineStarts]),B4({oldPlaylists:t,newPlaylists:n,timelineStarts:e.timelineStarts}),e},Na=r=>r&&r.uri+"-"+w4(r.byterange),Lo=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 t=[];return Object.values(e).forEach(n=>{const s=Rh(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},{}));t=t.concat(s)}),t.map(n=>(n.discontinuityStarts=S4(n.segments||[],"discontinuity"),n))},Vl=(r,e)=>{const t=Na(r.sidx),n=t&&e[t]&&e[t].sidx;return n&&Rl(r,n,r.sidx.resolvedUri),r},M4=(r,e={})=>{if(!Object.keys(e).length)return r;for(const t in r)r[t]=Vl(r[t],e);return r},P4=({attributes:r,segments:e,sidx:t,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),t&&(l.sidx=t),o&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l},R4=({attributes:r,segments:e,mediaSequence:t,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:t,segments:e};return r.serviceLocation&&(o.attributes.serviceLocation=r.serviceLocation),o},V4=(r,e={},t=!1)=>{let n;const s=r.reduce((a,o)=>{const l=o.attributes.role&&o.attributes.role.value||"",c=o.attributes.lang||"";let h=o.attributes.label||"main";if(c&&!o.attributes.label){const g=l?` (${l})`:"";h=`${o.attributes.lang}${g}`}a[h]||(a[h]={language:c,autoselect:!0,default:l==="main",playlists:[],uri:""});const m=Vl(P4(o,t),e);return a[h].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},F4=(r,e={})=>r.reduce((t,n)=>{const s=n.attributes.label||n.attributes.lang||"text",a=n.attributes.lang||"und";return t[s]||(t[s]={language:a,default:!1,autoselect:!1,playlists:[],uri:""}),t[s].playlists.push(Vl(R4(n),e)),t},{}),$4=r=>r.reduce((e,t)=>(t&&t.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),{}),U4=({attributes:r,segments:e,sidx:t,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),t&&(s.sidx=t),s},q4=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",H4=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",j4=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",z4=(r,e)=>{r.forEach(t=>{t.mediaSequence=0,t.discontinuitySequence=e.findIndex(function({timeline:n}){return n===t.timeline}),t.segments&&t.segments.forEach((n,s)=>{n.number=s})})},ad=r=>r?Object.keys(r).reduce((e,t)=>{const n=r[t];return e.concat(n.playlists)},[]):[],G4=({dashPlaylists:r,locations:e,contentSteering:t,sidxMapping:n={},previousManifest:s,eventStream:a})=>{if(!r.length)return{};const{sourceDuration:o,type:l,suggestedPresentationDelay:c,minimumUpdatePeriod:h}=r[0].attributes,m=Lo(r.filter(q4)).map(U4),g=Lo(r.filter(H4)),k=Lo(r.filter(j4)),T=r.map(j=>j.attributes.captionServices).filter(Boolean),O={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:M4(m,n)};h>=0&&(O.minimumUpdatePeriod=h*1e3),e&&(O.locations=e),t&&(O.contentSteering=t),l==="dynamic"&&(O.suggestedPresentationDelay=c),a&&a.length>0&&(O.eventStream=a);const _=O.playlists.length===0,S=g.length?V4(g,n,_):null,R=k.length?F4(k,n):null,L=m.concat(ad(S),ad(R)),I=L.map(({timelineStarts:j})=>j);return O.timelineStarts=$h(I),z4(L,O.timelineStarts),S&&(O.mediaGroups.AUDIO.audio=S),R&&(O.mediaGroups.SUBTITLES.subs=R),T.length&&(O.mediaGroups["CLOSED-CAPTIONS"].cc=$4(T)),s?L4({oldManifest:s,newManifest:O}):O},W4=(r,e,t)=>{const{NOW:n,clientOffset:s,availabilityStartTime:a,timescale:o=1,periodStart:l=0,minimumUpdatePeriod:c=0}=r,h=(n+s)/1e3,m=a+l,k=h+c-m;return Math.ceil((k*o-e)/t)},Uh=(r,e)=>{const{type:t,minimumUpdatePeriod:n=0,media:s="",sourceDuration:a,timescale:o=1,startNumber:l=1,periodStart:c}=r,h=[];let m=-1;for(let g=0;g<e.length;g++){const k=e[g],T=k.d,O=k.r||0,_=k.t||0;m<0&&(m=_),_&&_>m&&(m=_);let S;if(O<0){const I=g+1;I===e.length?t==="dynamic"&&n>0&&s.indexOf("$Number$")>0?S=W4(r,m,T):S=(a*o-m)/T:S=(e[I].t-m)/T}else S=O+1;const R=l+h.length+S;let L=l+h.length;for(;L<R;)h.push({number:L,duration:T/o,time:m,timeline:c}),m+=T,L++}return h},Y4=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,X4=r=>(e,t,n,s)=>{if(e==="$$")return"$";if(typeof r[t]>"u")return e;const a=""+r[t];return t==="RepresentationID"||(n?s=parseInt(s,10):s=1,a.length>=s)?a:`${new Array(s-a.length+1).join("0")}${a}`},od=(r,e)=>r.replace(Y4,X4(e)),K4=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?Pl(r):Uh(r,e),Q4=(r,e)=>{const t={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=r,s=ss({baseUrl:r.baseUrl,source:od(n.sourceURL,t),range:n.range});return K4(r,e).map(o=>{t.Number=o.number,t.Time=o.time;const l=od(r.media||"",t),c=r.timescale||1,h=r.presentationTimeOffset||0,m=r.periodStart+(o.time-h)/c;return{uri:l,timeline:o.timeline,duration:o.duration,resolvedUri:Da(r.baseUrl||"",l),map:s,number:o.number,presentationTime:m}})},Z4=(r,e)=>{const{baseUrl:t,initialization:n={}}=r,s=ss({baseUrl:t,source:n.sourceURL,range:n.range}),a=ss({baseUrl:t,source:e.media,range:e.mediaRange});return a.map=s,a},J4=(r,e)=>{const{duration:t,segmentUrls:n=[],periodStart:s}=r;if(!t&&!e||t&&e)throw new Error(ur.SEGMENT_TIME_UNSPECIFIED);const a=n.map(c=>Z4(r,c));let o;return t&&(o=Pl(r)),e&&(o=Uh(r,e)),o.map((c,h)=>{if(a[h]){const m=a[h],g=r.timescale||1,k=r.presentationTimeOffset||0;return m.timeline=c.timeline,m.duration=c.duration,m.number=c.number,m.presentationTime=s+(c.time-k)/g,m}}).filter(c=>c)},e8=({attributes:r,segmentInfo:e})=>{let t,n;e.template?(n=Q4,t=It(r,e.template)):e.base?(n=Fh,t=It(r,e.base)):e.list&&(n=J4,t=It(r,e.list));const s={attributes:r};if(!n)return s;const a=n(t,e.segmentTimeline);if(t.duration){const{duration:o,timescale:l=1}=t;t.duration=o/l}else a.length?t.duration=a.reduce((o,l)=>Math.max(o,Math.ceil(l.duration)),0):t.duration=0;return s.attributes=t,s.segments=a,e.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s},t8=r=>r.map(e8),ht=(r,e)=>Vh(r.childNodes).filter(({tagName:t})=>t===e),cs=r=>r.textContent.trim(),i8=r=>parseFloat(r.split("/").reduce((e,t)=>e/t)),jn=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,h,m,g,k,T]=l.slice(1);return parseFloat(c||0)*31536e3+parseFloat(h||0)*2592e3+parseFloat(m||0)*86400+parseFloat(g||0)*3600+parseFloat(k||0)*60+parseFloat(T||0)},n8=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),ld={mediaPresentationDuration(r){return jn(r)},availabilityStartTime(r){return n8(r)/1e3},minimumUpdatePeriod(r){return jn(r)},suggestedPresentationDelay(r){return jn(r)},type(r){return r},timeShiftBufferDepth(r){return jn(r)},start(r){return jn(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return i8(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)?jn(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}},Et=r=>r&&r.attributes?Vh(r.attributes).reduce((e,t)=>{const n=ld[t.name]||ld.DEFAULT;return e[t.name]=n(t.value),e},{}):{},r8={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Ia=(r,e)=>e.length?lr(r.map(function(t){return e.map(function(n){const s=cs(n),a=Da(t.baseUrl,s),o=It(Et(n),{baseUrl:a});return a!==s&&!o.serviceLocation&&t.serviceLocation&&(o.serviceLocation=t.serviceLocation),o})})):r,Fl=r=>{const e=ht(r,"SegmentTemplate")[0],t=ht(r,"SegmentList")[0],n=t&&ht(t,"SegmentURL").map(g=>It({tag:"SegmentURL"},Et(g))),s=ht(r,"SegmentBase")[0],a=t||e,o=a&&ht(a,"SegmentTimeline")[0],l=t||s||e,c=l&&ht(l,"Initialization")[0],h=e&&Et(e);h&&c?h.initialization=c&&Et(c):h&&h.initialization&&(h.initialization={sourceURL:h.initialization});const m={template:h,segmentTimeline:o&&ht(o,"S").map(g=>Et(g)),list:t&&It(Et(t),{segmentUrls:n,initialization:Et(c)}),base:s&&It(Et(s),{initialization:Et(c)})};return Object.keys(m).forEach(g=>{m[g]||delete m[g]}),m},s8=(r,e,t)=>n=>{const s=ht(n,"BaseURL"),a=Ia(e,s),o=It(r,Et(n)),l=Fl(n);return a.map(c=>({segmentInfo:It(t,l),attributes:It(o,c)}))},a8=r=>r.reduce((e,t)=>{const n=Et(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());const s=r8[n.schemeIdUri];if(s){e[s]={attributes:n};const a=ht(t,"cenc:pssh")[0];if(a){const o=cs(a);e[s].pssh=o&&Nh(o)}}return e},{}),o8=r=>{if(r.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{let n,s;return s=t,/^CC\d=/.test(t)?[n,s]=t.split("="):/^CC\d$/.test(t)&&(n=t),{channel:n,language:s}});if(r.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{const n={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){const[s,a=""]=t.split("=");n.channel=s,n.language=t,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=t;return n.channel&&(n.channel="SERVICE"+n.channel),n})},l8=r=>lr(ht(r.node,"EventStream").map(e=>{const t=Et(e),n=t.schemeIdUri;return ht(e,"Event").map(s=>{const a=Et(s),o=a.presentationTime||0,l=t.timescale||1,c=a.duration||0,h=o/l+r.attributes.start;return{schemeIdUri:n,value:t.value,id:a.id,start:h,end:h+c/l,messageData:cs(s)||a.messageData,contentEncoding:t.contentEncoding,presentationTimeOffset:t.presentationTimeOffset||0}})})),u8=(r,e,t)=>n=>{const s=Et(n),a=Ia(e,ht(n,"BaseURL")),o=ht(n,"Role")[0],l={role:Et(o)};let c=It(r,s,l);const h=ht(n,"Accessibility")[0],m=o8(Et(h));m&&(c=It(c,{captionServices:m}));const g=ht(n,"Label")[0];if(g&&g.childNodes.length){const S=g.childNodes[0].nodeValue.trim();c=It(c,{label:S})}const k=a8(ht(n,"ContentProtection"));Object.keys(k).length&&(c=It(c,{contentProtection:k}));const T=Fl(n),O=ht(n,"Representation"),_=It(t,T);return lr(O.map(s8(c,a,_)))},c8=(r,e)=>(t,n)=>{const s=Ia(e,ht(t.node,"BaseURL")),a=It(r,{periodStart:t.attributes.start});typeof t.attributes.duration=="number"&&(a.periodDuration=t.attributes.duration);const o=ht(t.node,"AdaptationSet"),l=Fl(t.node);return lr(o.map(u8(a,s,l)))},d8=(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 t=It({serverURL:cs(r[0])},Et(r[0]));return t.queryBeforeStart=t.queryBeforeStart==="true",t},h8=({attributes:r,priorPeriodAttributes:e,mpdType:t})=>typeof r.start=="number"?r.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&t==="static"?0:null,f8=(r,e={})=>{const{manifestUri:t="",NOW:n=Date.now(),clientOffset:s=0,eventHandler:a=function(){}}=e,o=ht(r,"Period");if(!o.length)throw new Error(ur.INVALID_NUMBER_OF_PERIOD);const l=ht(r,"Location"),c=Et(r),h=Ia([{baseUrl:t}],ht(r,"BaseURL")),m=ht(r,"ContentSteering");c.type=c.type||"static",c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=n,c.clientOffset=s,l.length&&(c.locations=l.map(cs));const g=[];return o.forEach((k,T)=>{const O=Et(k),_=g[T-1];O.start=h8({attributes:O,priorPeriodAttributes:_?_.attributes:null,mpdType:c.type}),g.push({node:k,attributes:O})}),{locations:c.locations,contentSteeringInfo:d8(m,a),representationInfo:lr(g.map(c8(c,h))),eventStream:lr(g.map(l8))}},qh=r=>{if(r==="")throw new Error(ur.DASH_EMPTY_MANIFEST);const e=new C4.DOMParser;let t,n;try{t=e.parseFromString(r,"application/xml"),n=t&&t.documentElement.tagName==="MPD"?t.documentElement:null}catch{}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(ur.DASH_INVALID_XML);return n},p8=r=>{const e=ht(r,"UTCTiming")[0];if(!e)return null;const t=Et(e);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.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":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ur.UNSUPPORTED_UTC_TIMING_SCHEME)}return t},m8=(r,e={})=>{const t=f8(qh(r),e),n=t8(t.representationInfo);return G4({dashPlaylists:n,locations:t.locations,contentSteering:t.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:t.eventStream})},g8=r=>p8(qh(r));var Mo,ud;function v8(){if(ud)return Mo;ud=1;var r=Math.pow(2,32),e=function(t){var n=new DataView(t.buffer,t.byteOffset,t.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 Mo={getUint64:e,MAX_UINT32:r},Mo}var Po,cd;function _8(){if(cd)return Po;cd=1;var r=v8().getUint64,e=function(t){var n=new DataView(t.buffer,t.byteOffset,t.byteLength),s={version:t[0],flags:new Uint8Array(t.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(t.subarray(a)),s.firstOffset=r(t.subarray(a+8)),a+=16),a+=2;var o=n.getUint16(a);for(a+=2;o>0;a+=12,o--)s.references.push({referenceType:(t[a]&128)>>>7,referencedSize:n.getUint32(a)&2147483647,subsegmentDuration:n.getUint32(a+4),startsWithSap:!!(t[a+8]&128),sapType:(t[a+8]&112)>>>4,sapDeltaTime:n.getUint32(a+8)&268435455});return s};return Po=e,Po}var y8=_8();const T8=gr(y8);var b8=Pe([73,68,51]),x8=function(e,t){t===void 0&&(t=0),e=Pe(e);var n=e[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],a=(n&16)>>4;return a?s+20:s+10},Xr=function r(e,t){return t===void 0&&(t=0),e=Pe(e),e.length-t<10||!dt(e,b8,{offset:t})?t:(t+=x8(e,t),r(e,t))},dd=function(e){return typeof e=="string"?Mh(e):e},C8=function(e){return Array.isArray(e)?e.map(function(t){return dd(t)}):[dd(e)]},E8=function r(e,t,n){n===void 0&&(n=!1),t=C8(t),e=Pe(e);var s=[];if(!t.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 h=e.subarray(a+8,c);dt(l,t[0])&&(t.length===1?s.push(h):s.push.apply(s,r(h,t.slice(1),n))),a=c}return s},Hs={EBML:Pe([26,69,223,163]),DocType:Pe([66,130]),Segment:Pe([24,83,128,103]),SegmentInfo:Pe([21,73,169,102]),Tracks:Pe([22,84,174,107]),Track:Pe([174]),TrackNumber:Pe([215]),DefaultDuration:Pe([35,227,131]),TrackEntry:Pe([174]),TrackType:Pe([131]),FlagDefault:Pe([136]),CodecID:Pe([134]),CodecPrivate:Pe([99,162]),VideoTrack:Pe([224]),AudioTrack:Pe([225]),Cluster:Pe([31,67,182,117]),Timestamp:Pe([231]),TimestampScale:Pe([42,215,177]),BlockGroup:Pe([160]),BlockDuration:Pe([155]),Block:Pe([161]),SimpleBlock:Pe([163])},rl=[128,64,32,16,8,4,2,1],S8=function(e){for(var t=1,n=0;n<rl.length&&!(e&rl[n]);n++)t++;return t},aa=function(e,t,n,s){n===void 0&&(n=!0),s===void 0&&(s=!1);var a=S8(e[t]),o=e.subarray(t,t+a);return n&&(o=Array.prototype.slice.call(e,t,t+a),o[0]^=rl[a-1]),{length:a,value:m4(o,{signed:s}),bytes:o}},hd=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(t){return r(t)}):typeof e=="number"?g4(e):e},k8=function(e){return Array.isArray(e)?e.map(function(t){return hd(t)}):[hd(e)]},w8=function r(e,t,n){if(n>=t.length)return t.length;var s=aa(t,n,!1);if(dt(e.bytes,s.bytes))return n;var a=aa(t,n+s.length);return r(e,t,n+a.length+a.value+s.length)},fd=function r(e,t){t=k8(t),e=Pe(e);var n=[];if(!t.length)return n;for(var s=0;s<e.length;){var a=aa(e,s,!1),o=aa(e,s+a.length),l=s+a.length+o.length;o.value===127&&(o.value=w8(a,e,l),o.value!==e.length&&(o.value-=l));var c=l+o.value>e.length?e.length:l+o.value,h=e.subarray(l,c);dt(t[0],a.bytes)&&(t.length===1?n.push(h):n=n.concat(r(h,t.slice(1))));var m=a.length+o.length+h.length;s+=m}return n},D8=Pe([0,0,0,1]),A8=Pe([0,0,1]),N8=Pe([0,0,3]),I8=function(e){for(var t=[],n=1;n<e.length-2;)dt(e.subarray(n,n+3),N8)&&(t.push(n+2),n++),n++;if(t.length===0)return e;var s=e.length-t.length,a=new Uint8Array(s),o=0;for(n=0;n<s;o++,n++)o===t[0]&&(o++,t.shift()),a[n]=e[o];return a},Hh=function(e,t,n,s){e=Pe(e),n=[].concat(n);for(var a=0,o,l=0;a<e.length&&(l<s||o);){var c=void 0;if(dt(e.subarray(a),D8)?c=4:dt(e.subarray(a),A8)&&(c=3),!c){a++;continue}if(l++,o)return I8(e.subarray(o,a));var h=void 0;t==="h264"?h=e[a+c]&31:t==="h265"&&(h=e[a+c]>>1&63),n.indexOf(h)!==-1&&(o=a+c),a+=c+(t==="h264"?1:2)}return e.subarray(0,0)},O8=function(e,t,n){return Hh(e,"h264",t,n)},B8=function(e,t,n){return Hh(e,"h265",t,n)},Kt={webm:Pe([119,101,98,109]),matroska:Pe([109,97,116,114,111,115,107,97]),flac:Pe([102,76,97,67]),ogg:Pe([79,103,103,83]),ac3:Pe([11,119]),riff:Pe([82,73,70,70]),avi:Pe([65,86,73]),wav:Pe([87,65,86,69]),"3gp":Pe([102,116,121,112,51,103]),mp4:Pe([102,116,121,112]),fmp4:Pe([115,116,121,112]),mov:Pe([102,116,121,112,113,116]),moov:Pe([109,111,111,118]),moof:Pe([109,111,111,102])},cr={aac:function(e){var t=Xr(e);return dt(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Xr(e);return dt(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=fd(e,[Hs.EBML,Hs.DocType])[0];return dt(t,Kt.webm)},mkv:function(e){var t=fd(e,[Hs.EBML,Hs.DocType])[0];return dt(t,Kt.matroska)},mp4:function(e){if(cr["3gp"](e)||cr.mov(e))return!1;if(dt(e,Kt.mp4,{offset:4})||dt(e,Kt.fmp4,{offset:4})||dt(e,Kt.moof,{offset:4})||dt(e,Kt.moov,{offset:4}))return!0},mov:function(e){return dt(e,Kt.mov,{offset:4})},"3gp":function(e){return dt(e,Kt["3gp"],{offset:4})},ac3:function(e){var t=Xr(e);return dt(e,Kt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var t=0;t+188<e.length&&t<188;){if(e[t]===71&&e[t+188]===71)return!0;t+=1}return!1},flac:function(e){var t=Xr(e);return dt(e,Kt.flac,{offset:t})},ogg:function(e){return dt(e,Kt.ogg)},avi:function(e){return dt(e,Kt.riff)&&dt(e,Kt.avi,{offset:8})},wav:function(e){return dt(e,Kt.riff)&&dt(e,Kt.wav,{offset:8})},h264:function(e){return O8(e,7,3).length},h265:function(e){return B8(e,[32,33],3).length}},sl=Object.keys(cr).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);sl.forEach(function(r){var e=cr[r];cr[r]=function(t){return e(Pe(t))}});var L8=cr,$l=function(e){e=Pe(e);for(var t=0;t<sl.length;t++){var n=sl[t];if(L8[n](e))return n}return""},M8=function(e){return E8(e,["moof"]).length>0},Ro,pd;function P8(){if(pd)return Ro;pd=1;var r=9e4,e,t,n,s,a,o,l;return e=function(c){return c*r},t=function(c,h){return c*h},n=function(c){return c/r},s=function(c,h){return c/h},a=function(c,h){return e(s(c,h))},o=function(c,h){return t(n(c),h)},l=function(c,h,m){return n(m?c:c-h)},Ro={ONE_SECOND_IN_TS:r,secondsToVideoTs:e,secondsToAudioTs:t,videoTsToSeconds:n,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l},Ro}var Nn=P8();/**
26
+ `)}function h(S){this.options=S||{locator:{}}}h.prototype.parseFromString=function(S,R){var L=this.options,O=new l,H=L.domBuilder||new g,M=L.errorHandler,P=L.locator,N=L.xmlns||{},X=/\/x?html?$/.test(R),b=X?t.HTML_ENTITIES:t.XML_ENTITIES;P&&H.setDocumentLocator(P),O.errorHandler=m(M,H,P),O.domBuilder=L.domBuilder||H,X&&(N[""]=a.HTML),N.xml=N.xml||a.XML;var C=L.normalizeLineEndings||c;return S&&typeof S=="string"?O.parse(C(S),N,b):O.errorHandler.error("invalid doc source"),H.doc};function m(S,R,L){if(!S){if(R instanceof g)return R;S=R}var O={},H=S instanceof Function;L=L||{};function M(P){var N=S[P];!N&&H&&(N=S.length==2?function(X){S(P,X)}:S),O[P]=N&&function(X){N("[xmldom "+P+"] "+X+T(L))}||function(){}}return M("warning"),M("error"),M("fatalError"),O}function g(){this.cdata=!1}function k(S,R){R.lineNumber=S.lineNumber,R.columnNumber=S.columnNumber}g.prototype={startDocument:function(){this.doc=new s().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(S,R,L,O){var H=this.doc,M=H.createElementNS(S,L||R),P=O.length;_(this,M),this.currentElement=M,this.locator&&k(this.locator,M);for(var N=0;N<P;N++){var S=O.getURI(N),X=O.getValue(N),L=O.getQName(N),b=H.createAttributeNS(S,L);this.locator&&k(O.getLocator(N),b),b.value=b.nodeValue=X,M.setAttributeNode(b)}},endElement:function(S,R,L){var O=this.currentElement;O.tagName,this.currentElement=O.parentNode},startPrefixMapping:function(S,R){},endPrefixMapping:function(S){},processingInstruction:function(S,R){var L=this.doc.createProcessingInstruction(S,R);this.locator&&k(this.locator,L),_(this,L)},ignorableWhitespace:function(S,R,L){},characters:function(S,R,L){if(S=I.apply(this,arguments),S){if(this.cdata)var O=this.doc.createCDATASection(S);else var O=this.doc.createTextNode(S);this.currentElement?this.currentElement.appendChild(O):/^\s*$/.test(S)&&this.doc.appendChild(O),this.locator&&k(this.locator,O)}},skippedEntity:function(S){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(S){(this.locator=S)&&(S.lineNumber=0)},comment:function(S,R,L){S=I.apply(this,arguments);var O=this.doc.createComment(S);this.locator&&k(this.locator,O),_(this,O)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(S,R,L){var O=this.doc.implementation;if(O&&O.createDocumentType){var H=O.createDocumentType(S,R,L);this.locator&&k(this.locator,H),_(this,H),this.doc.doctype=H}},warning:function(S){console.warn("[xmldom warning] "+S,T(this.locator))},error:function(S){console.error("[xmldom error] "+S,T(this.locator))},fatalError:function(S){throw new o(S,this.locator)}};function T(S){if(S)return`
27
+ @`+(S.systemId||"")+"#[line:"+S.lineNumber+",col:"+S.columnNumber+"]"}function I(S,R,L){return typeof S=="string"?S.substr(R,L):S.length>=R+L||R?new java.lang.String(S,R,L)+"":S}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(S){g.prototype[S]=function(){return null}});function _(S,R){S.currentElement?S.currentElement.appendChild(R):S.doc.appendChild(R)}return jr.__DOMHandler=g,jr.normalizeLineEndings=c,jr.DOMParser=h,jr}var td;function x4(){if(td)return Hr;td=1;var r=Ph();return Hr.DOMImplementation=r.DOMImplementation,Hr.XMLSerializer=r.XMLSerializer,Hr.DOMParser=b4().DOMParser,Hr}var C4=x4();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const id=r=>!!r&&typeof r=="object",It=(...r)=>r.reduce((e,t)=>(typeof t!="object"||Object.keys(t).forEach(n=>{Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=e[n].concat(t[n]):id(e[n])&&id(t[n])?e[n]=It(e[n],t[n]):e[n]=t[n]}),e),{}),Rh=r=>Object.keys(r).map(e=>r[e]),E4=(r,e)=>{const t=[];for(let n=r;n<e;n++)t.push(n);return t},lr=r=>r.reduce((e,t)=>e.concat(t),[]),Vh=r=>{if(!r.length)return[];const e=[];for(let t=0;t<r.length;t++)e.push(r[t]);return e},S4=(r,e)=>r.reduce((t,n,s)=>(n[e]&&t.push(s),t),[]),k4=(r,e)=>Rh(r.reduce((t,n)=>(n.forEach(s=>{t[e(s)]=s}),t),{}));var ur={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const ss=({baseUrl:r="",source:e="",range:t="",indexRange:n=""})=>{const s={uri:e,resolvedUri:Da(r||"",e)};if(t||n){const o=(t||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 h;typeof c=="bigint"||typeof l=="bigint"?h=W.BigInt(c)-W.BigInt(l)+W.BigInt(1):h=c-l+1,typeof h=="bigint"&&h<Number.MAX_SAFE_INTEGER&&(h=Number(h)),s.byterange={length:h,offset:l}}return s},w4=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}`},nd=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),D4={static(r){const{duration:e,timescale:t=1,sourceDuration:n,periodDuration:s}=r,a=nd(r.endNumber),o=e/t;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:t,availabilityStartTime:n,timescale:s=1,duration:a,periodStart:o=0,minimumUpdatePeriod:l=0,timeShiftBufferDepth:c=1/0}=r,h=nd(r.endNumber),m=(e+t)/1e3,g=n+o,T=m+l-g,I=Math.ceil(T*s/a),_=Math.floor((m-g-c)*s/a),S=Math.floor((m-g)*s/a);return{start:Math.max(0,_),end:typeof h=="number"?h:Math.min(I,S)}}},A4=r=>e=>{const{duration:t,timescale:n=1,periodStart:s,startNumber:a=1}=r;return{number:a+e,duration:t/n,timeline:s,time:e*t}},Pl=r=>{const{type:e,duration:t,timescale:n=1,periodDuration:s,sourceDuration:a}=r,{start:o,end:l}=D4[e](r),c=E4(o,l).map(A4(r));if(e==="static"){const h=c.length-1,m=typeof s=="number"?s:a;c[h].duration=m-t/n*h}return c},Fh=r=>{const{baseUrl:e,initialization:t={},sourceDuration:n,indexRange:s="",periodStart:a,presentationTime:o,number:l=0,duration:c}=r;if(!e)throw new Error(ur.NO_BASE_URL);const h=ss({baseUrl:e,source:t.sourceURL,range:t.range}),m=ss({baseUrl:e,source:e,indexRange:s});if(m.map=h,c){const g=Pl(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]},Rl=(r,e,t)=>{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,h=e.references.filter(S=>S.referenceType!==1),m=[],g=r.endList?"static":"dynamic",k=r.sidx.timeline;let T=k,I=r.mediaSequence||0,_;typeof e.firstOffset=="bigint"?_=W.BigInt(l)+e.firstOffset:_=l+e.firstOffset;for(let S=0;S<h.length;S++){const R=e.references[S],L=R.referencedSize,O=R.subsegmentDuration;let H;typeof _=="bigint"?H=_+W.BigInt(L)-W.BigInt(1):H=_+L-1;const M=`${_}-${H}`,N=Fh({baseUrl:t,timescale:c,timeline:a,periodStart:k,presentationTime:T,number:I,duration:O,sourceDuration:s,indexRange:M,type:g})[0];n&&(N.map=n),m.push(N),typeof _=="bigint"?_+=W.BigInt(L):_+=L,T+=O/c,I++}return r.segments=m,r},N4=["AUDIO","SUBTITLES"],I4=1/60,$h=r=>k4(r,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),O4=(r,e)=>{for(let t=0;t<r.length;t++)if(r[t].attributes.NAME===e)return r[t];return null},rd=r=>{let e=[];return _4(r,N4,(t,n,s,a)=>{e=e.concat(t.playlists||[])}),e},sd=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((t,n)=>{t.number=r.mediaSequence+n})},B4=({oldPlaylists:r,newPlaylists:e,timelineStarts:t})=>{e.forEach(n=>{n.discontinuitySequence=t.findIndex(function({timeline:c}){return c===n.timeline});const s=O4(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)<I4});if(o===-1){sd({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--),sd({playlist:n,mediaSequence:s.segments[o].number})})},L4=({oldManifest:r,newManifest:e})=>{const t=r.playlists.concat(rd(r)),n=e.playlists.concat(rd(e));return e.timelineStarts=$h([r.timelineStarts,e.timelineStarts]),B4({oldPlaylists:t,newPlaylists:n,timelineStarts:e.timelineStarts}),e},Na=r=>r&&r.uri+"-"+w4(r.byterange),Lo=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 t=[];return Object.values(e).forEach(n=>{const s=Rh(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},{}));t=t.concat(s)}),t.map(n=>(n.discontinuityStarts=S4(n.segments||[],"discontinuity"),n))},Vl=(r,e)=>{const t=Na(r.sidx),n=t&&e[t]&&e[t].sidx;return n&&Rl(r,n,r.sidx.resolvedUri),r},M4=(r,e={})=>{if(!Object.keys(e).length)return r;for(const t in r)r[t]=Vl(r[t],e);return r},P4=({attributes:r,segments:e,sidx:t,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),t&&(l.sidx=t),o&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l},R4=({attributes:r,segments:e,mediaSequence:t,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:t,segments:e};return r.serviceLocation&&(o.attributes.serviceLocation=r.serviceLocation),o},V4=(r,e={},t=!1)=>{let n;const s=r.reduce((a,o)=>{const l=o.attributes.role&&o.attributes.role.value||"",c=o.attributes.lang||"";let h=o.attributes.label||"main";if(c&&!o.attributes.label){const g=l?` (${l})`:"";h=`${o.attributes.lang}${g}`}a[h]||(a[h]={language:c,autoselect:!0,default:l==="main",playlists:[],uri:""});const m=Vl(P4(o,t),e);return a[h].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},F4=(r,e={})=>r.reduce((t,n)=>{const s=n.attributes.label||n.attributes.lang||"text",a=n.attributes.lang||"und";return t[s]||(t[s]={language:a,default:!1,autoselect:!1,playlists:[],uri:""}),t[s].playlists.push(Vl(R4(n),e)),t},{}),$4=r=>r.reduce((e,t)=>(t&&t.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),{}),U4=({attributes:r,segments:e,sidx:t,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),t&&(s.sidx=t),s},q4=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",H4=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",j4=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",z4=(r,e)=>{r.forEach(t=>{t.mediaSequence=0,t.discontinuitySequence=e.findIndex(function({timeline:n}){return n===t.timeline}),t.segments&&t.segments.forEach((n,s)=>{n.number=s})})},ad=r=>r?Object.keys(r).reduce((e,t)=>{const n=r[t];return e.concat(n.playlists)},[]):[],G4=({dashPlaylists:r,locations:e,contentSteering:t,sidxMapping:n={},previousManifest:s,eventStream:a})=>{if(!r.length)return{};const{sourceDuration:o,type:l,suggestedPresentationDelay:c,minimumUpdatePeriod:h}=r[0].attributes,m=Lo(r.filter(q4)).map(U4),g=Lo(r.filter(H4)),k=Lo(r.filter(j4)),T=r.map(H=>H.attributes.captionServices).filter(Boolean),I={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:M4(m,n)};h>=0&&(I.minimumUpdatePeriod=h*1e3),e&&(I.locations=e),t&&(I.contentSteering=t),l==="dynamic"&&(I.suggestedPresentationDelay=c),a&&a.length>0&&(I.eventStream=a);const _=I.playlists.length===0,S=g.length?V4(g,n,_):null,R=k.length?F4(k,n):null,L=m.concat(ad(S),ad(R)),O=L.map(({timelineStarts:H})=>H);return I.timelineStarts=$h(O),z4(L,I.timelineStarts),S&&(I.mediaGroups.AUDIO.audio=S),R&&(I.mediaGroups.SUBTITLES.subs=R),T.length&&(I.mediaGroups["CLOSED-CAPTIONS"].cc=$4(T)),s?L4({oldManifest:s,newManifest:I}):I},W4=(r,e,t)=>{const{NOW:n,clientOffset:s,availabilityStartTime:a,timescale:o=1,periodStart:l=0,minimumUpdatePeriod:c=0}=r,h=(n+s)/1e3,m=a+l,k=h+c-m;return Math.ceil((k*o-e)/t)},Uh=(r,e)=>{const{type:t,minimumUpdatePeriod:n=0,media:s="",sourceDuration:a,timescale:o=1,startNumber:l=1,periodStart:c}=r,h=[];let m=-1;for(let g=0;g<e.length;g++){const k=e[g],T=k.d,I=k.r||0,_=k.t||0;m<0&&(m=_),_&&_>m&&(m=_);let S;if(I<0){const O=g+1;O===e.length?t==="dynamic"&&n>0&&s.indexOf("$Number$")>0?S=W4(r,m,T):S=(a*o-m)/T:S=(e[O].t-m)/T}else S=I+1;const R=l+h.length+S;let L=l+h.length;for(;L<R;)h.push({number:L,duration:T/o,time:m,timeline:c}),m+=T,L++}return h},Y4=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,X4=r=>(e,t,n,s)=>{if(e==="$$")return"$";if(typeof r[t]>"u")return e;const a=""+r[t];return t==="RepresentationID"||(n?s=parseInt(s,10):s=1,a.length>=s)?a:`${new Array(s-a.length+1).join("0")}${a}`},od=(r,e)=>r.replace(Y4,X4(e)),K4=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?Pl(r):Uh(r,e),Q4=(r,e)=>{const t={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=r,s=ss({baseUrl:r.baseUrl,source:od(n.sourceURL,t),range:n.range});return K4(r,e).map(o=>{t.Number=o.number,t.Time=o.time;const l=od(r.media||"",t),c=r.timescale||1,h=r.presentationTimeOffset||0,m=r.periodStart+(o.time-h)/c;return{uri:l,timeline:o.timeline,duration:o.duration,resolvedUri:Da(r.baseUrl||"",l),map:s,number:o.number,presentationTime:m}})},Z4=(r,e)=>{const{baseUrl:t,initialization:n={}}=r,s=ss({baseUrl:t,source:n.sourceURL,range:n.range}),a=ss({baseUrl:t,source:e.media,range:e.mediaRange});return a.map=s,a},J4=(r,e)=>{const{duration:t,segmentUrls:n=[],periodStart:s}=r;if(!t&&!e||t&&e)throw new Error(ur.SEGMENT_TIME_UNSPECIFIED);const a=n.map(c=>Z4(r,c));let o;return t&&(o=Pl(r)),e&&(o=Uh(r,e)),o.map((c,h)=>{if(a[h]){const m=a[h],g=r.timescale||1,k=r.presentationTimeOffset||0;return m.timeline=c.timeline,m.duration=c.duration,m.number=c.number,m.presentationTime=s+(c.time-k)/g,m}}).filter(c=>c)},e8=({attributes:r,segmentInfo:e})=>{let t,n;e.template?(n=Q4,t=It(r,e.template)):e.base?(n=Fh,t=It(r,e.base)):e.list&&(n=J4,t=It(r,e.list));const s={attributes:r};if(!n)return s;const a=n(t,e.segmentTimeline);if(t.duration){const{duration:o,timescale:l=1}=t;t.duration=o/l}else a.length?t.duration=a.reduce((o,l)=>Math.max(o,Math.ceil(l.duration)),0):t.duration=0;return s.attributes=t,s.segments=a,e.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s},t8=r=>r.map(e8),ht=(r,e)=>Vh(r.childNodes).filter(({tagName:t})=>t===e),cs=r=>r.textContent.trim(),i8=r=>parseFloat(r.split("/").reduce((e,t)=>e/t)),jn=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,h,m,g,k,T]=l.slice(1);return parseFloat(c||0)*31536e3+parseFloat(h||0)*2592e3+parseFloat(m||0)*86400+parseFloat(g||0)*3600+parseFloat(k||0)*60+parseFloat(T||0)},n8=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),ld={mediaPresentationDuration(r){return jn(r)},availabilityStartTime(r){return n8(r)/1e3},minimumUpdatePeriod(r){return jn(r)},suggestedPresentationDelay(r){return jn(r)},type(r){return r},timeShiftBufferDepth(r){return jn(r)},start(r){return jn(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return i8(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)?jn(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}},Et=r=>r&&r.attributes?Vh(r.attributes).reduce((e,t)=>{const n=ld[t.name]||ld.DEFAULT;return e[t.name]=n(t.value),e},{}):{},r8={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},Ia=(r,e)=>e.length?lr(r.map(function(t){return e.map(function(n){const s=cs(n),a=Da(t.baseUrl,s),o=It(Et(n),{baseUrl:a});return a!==s&&!o.serviceLocation&&t.serviceLocation&&(o.serviceLocation=t.serviceLocation),o})})):r,Fl=r=>{const e=ht(r,"SegmentTemplate")[0],t=ht(r,"SegmentList")[0],n=t&&ht(t,"SegmentURL").map(g=>It({tag:"SegmentURL"},Et(g))),s=ht(r,"SegmentBase")[0],a=t||e,o=a&&ht(a,"SegmentTimeline")[0],l=t||s||e,c=l&&ht(l,"Initialization")[0],h=e&&Et(e);h&&c?h.initialization=c&&Et(c):h&&h.initialization&&(h.initialization={sourceURL:h.initialization});const m={template:h,segmentTimeline:o&&ht(o,"S").map(g=>Et(g)),list:t&&It(Et(t),{segmentUrls:n,initialization:Et(c)}),base:s&&It(Et(s),{initialization:Et(c)})};return Object.keys(m).forEach(g=>{m[g]||delete m[g]}),m},s8=(r,e,t)=>n=>{const s=ht(n,"BaseURL"),a=Ia(e,s),o=It(r,Et(n)),l=Fl(n);return a.map(c=>({segmentInfo:It(t,l),attributes:It(o,c)}))},a8=r=>r.reduce((e,t)=>{const n=Et(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());const s=r8[n.schemeIdUri];if(s){e[s]={attributes:n};const a=ht(t,"cenc:pssh")[0];if(a){const o=cs(a);e[s].pssh=o&&Nh(o)}}return e},{}),o8=r=>{if(r.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{let n,s;return s=t,/^CC\d=/.test(t)?[n,s]=t.split("="):/^CC\d$/.test(t)&&(n=t),{channel:n,language:s}});if(r.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(t=>{const n={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(t)){const[s,a=""]=t.split("=");n.channel=s,n.language=t,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=t;return n.channel&&(n.channel="SERVICE"+n.channel),n})},l8=r=>lr(ht(r.node,"EventStream").map(e=>{const t=Et(e),n=t.schemeIdUri;return ht(e,"Event").map(s=>{const a=Et(s),o=a.presentationTime||0,l=t.timescale||1,c=a.duration||0,h=o/l+r.attributes.start;return{schemeIdUri:n,value:t.value,id:a.id,start:h,end:h+c/l,messageData:cs(s)||a.messageData,contentEncoding:t.contentEncoding,presentationTimeOffset:t.presentationTimeOffset||0}})})),u8=(r,e,t)=>n=>{const s=Et(n),a=Ia(e,ht(n,"BaseURL")),o=ht(n,"Role")[0],l={role:Et(o)};let c=It(r,s,l);const h=ht(n,"Accessibility")[0],m=o8(Et(h));m&&(c=It(c,{captionServices:m}));const g=ht(n,"Label")[0];if(g&&g.childNodes.length){const S=g.childNodes[0].nodeValue.trim();c=It(c,{label:S})}const k=a8(ht(n,"ContentProtection"));Object.keys(k).length&&(c=It(c,{contentProtection:k}));const T=Fl(n),I=ht(n,"Representation"),_=It(t,T);return lr(I.map(s8(c,a,_)))},c8=(r,e)=>(t,n)=>{const s=Ia(e,ht(t.node,"BaseURL")),a=It(r,{periodStart:t.attributes.start});typeof t.attributes.duration=="number"&&(a.periodDuration=t.attributes.duration);const o=ht(t.node,"AdaptationSet"),l=Fl(t.node);return lr(o.map(u8(a,s,l)))},d8=(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 t=It({serverURL:cs(r[0])},Et(r[0]));return t.queryBeforeStart=t.queryBeforeStart==="true",t},h8=({attributes:r,priorPeriodAttributes:e,mpdType:t})=>typeof r.start=="number"?r.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&t==="static"?0:null,f8=(r,e={})=>{const{manifestUri:t="",NOW:n=Date.now(),clientOffset:s=0,eventHandler:a=function(){}}=e,o=ht(r,"Period");if(!o.length)throw new Error(ur.INVALID_NUMBER_OF_PERIOD);const l=ht(r,"Location"),c=Et(r),h=Ia([{baseUrl:t}],ht(r,"BaseURL")),m=ht(r,"ContentSteering");c.type=c.type||"static",c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=n,c.clientOffset=s,l.length&&(c.locations=l.map(cs));const g=[];return o.forEach((k,T)=>{const I=Et(k),_=g[T-1];I.start=h8({attributes:I,priorPeriodAttributes:_?_.attributes:null,mpdType:c.type}),g.push({node:k,attributes:I})}),{locations:c.locations,contentSteeringInfo:d8(m,a),representationInfo:lr(g.map(c8(c,h))),eventStream:lr(g.map(l8))}},qh=r=>{if(r==="")throw new Error(ur.DASH_EMPTY_MANIFEST);const e=new C4.DOMParser;let t,n;try{t=e.parseFromString(r,"application/xml"),n=t&&t.documentElement.tagName==="MPD"?t.documentElement:null}catch{}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(ur.DASH_INVALID_XML);return n},p8=r=>{const e=ht(r,"UTCTiming")[0];if(!e)return null;const t=Et(e);switch(t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.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":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ur.UNSUPPORTED_UTC_TIMING_SCHEME)}return t},m8=(r,e={})=>{const t=f8(qh(r),e),n=t8(t.representationInfo);return G4({dashPlaylists:n,locations:t.locations,contentSteering:t.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:t.eventStream})},g8=r=>p8(qh(r));var Mo,ud;function v8(){if(ud)return Mo;ud=1;var r=Math.pow(2,32),e=function(t){var n=new DataView(t.buffer,t.byteOffset,t.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 Mo={getUint64:e,MAX_UINT32:r},Mo}var Po,cd;function _8(){if(cd)return Po;cd=1;var r=v8().getUint64,e=function(t){var n=new DataView(t.buffer,t.byteOffset,t.byteLength),s={version:t[0],flags:new Uint8Array(t.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(t.subarray(a)),s.firstOffset=r(t.subarray(a+8)),a+=16),a+=2;var o=n.getUint16(a);for(a+=2;o>0;a+=12,o--)s.references.push({referenceType:(t[a]&128)>>>7,referencedSize:n.getUint32(a)&2147483647,subsegmentDuration:n.getUint32(a+4),startsWithSap:!!(t[a+8]&128),sapType:(t[a+8]&112)>>>4,sapDeltaTime:n.getUint32(a+8)&268435455});return s};return Po=e,Po}var y8=_8();const T8=gr(y8);var b8=Pe([73,68,51]),x8=function(e,t){t===void 0&&(t=0),e=Pe(e);var n=e[t+5],s=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9],a=(n&16)>>4;return a?s+20:s+10},Xr=function r(e,t){return t===void 0&&(t=0),e=Pe(e),e.length-t<10||!dt(e,b8,{offset:t})?t:(t+=x8(e,t),r(e,t))},dd=function(e){return typeof e=="string"?Mh(e):e},C8=function(e){return Array.isArray(e)?e.map(function(t){return dd(t)}):[dd(e)]},E8=function r(e,t,n){n===void 0&&(n=!1),t=C8(t),e=Pe(e);var s=[];if(!t.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 h=e.subarray(a+8,c);dt(l,t[0])&&(t.length===1?s.push(h):s.push.apply(s,r(h,t.slice(1),n))),a=c}return s},Hs={EBML:Pe([26,69,223,163]),DocType:Pe([66,130]),Segment:Pe([24,83,128,103]),SegmentInfo:Pe([21,73,169,102]),Tracks:Pe([22,84,174,107]),Track:Pe([174]),TrackNumber:Pe([215]),DefaultDuration:Pe([35,227,131]),TrackEntry:Pe([174]),TrackType:Pe([131]),FlagDefault:Pe([136]),CodecID:Pe([134]),CodecPrivate:Pe([99,162]),VideoTrack:Pe([224]),AudioTrack:Pe([225]),Cluster:Pe([31,67,182,117]),Timestamp:Pe([231]),TimestampScale:Pe([42,215,177]),BlockGroup:Pe([160]),BlockDuration:Pe([155]),Block:Pe([161]),SimpleBlock:Pe([163])},rl=[128,64,32,16,8,4,2,1],S8=function(e){for(var t=1,n=0;n<rl.length&&!(e&rl[n]);n++)t++;return t},aa=function(e,t,n,s){n===void 0&&(n=!0),s===void 0&&(s=!1);var a=S8(e[t]),o=e.subarray(t,t+a);return n&&(o=Array.prototype.slice.call(e,t,t+a),o[0]^=rl[a-1]),{length:a,value:m4(o,{signed:s}),bytes:o}},hd=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(t){return r(t)}):typeof e=="number"?g4(e):e},k8=function(e){return Array.isArray(e)?e.map(function(t){return hd(t)}):[hd(e)]},w8=function r(e,t,n){if(n>=t.length)return t.length;var s=aa(t,n,!1);if(dt(e.bytes,s.bytes))return n;var a=aa(t,n+s.length);return r(e,t,n+a.length+a.value+s.length)},fd=function r(e,t){t=k8(t),e=Pe(e);var n=[];if(!t.length)return n;for(var s=0;s<e.length;){var a=aa(e,s,!1),o=aa(e,s+a.length),l=s+a.length+o.length;o.value===127&&(o.value=w8(a,e,l),o.value!==e.length&&(o.value-=l));var c=l+o.value>e.length?e.length:l+o.value,h=e.subarray(l,c);dt(t[0],a.bytes)&&(t.length===1?n.push(h):n=n.concat(r(h,t.slice(1))));var m=a.length+o.length+h.length;s+=m}return n},D8=Pe([0,0,0,1]),A8=Pe([0,0,1]),N8=Pe([0,0,3]),I8=function(e){for(var t=[],n=1;n<e.length-2;)dt(e.subarray(n,n+3),N8)&&(t.push(n+2),n++),n++;if(t.length===0)return e;var s=e.length-t.length,a=new Uint8Array(s),o=0;for(n=0;n<s;o++,n++)o===t[0]&&(o++,t.shift()),a[n]=e[o];return a},Hh=function(e,t,n,s){e=Pe(e),n=[].concat(n);for(var a=0,o,l=0;a<e.length&&(l<s||o);){var c=void 0;if(dt(e.subarray(a),D8)?c=4:dt(e.subarray(a),A8)&&(c=3),!c){a++;continue}if(l++,o)return I8(e.subarray(o,a));var h=void 0;t==="h264"?h=e[a+c]&31:t==="h265"&&(h=e[a+c]>>1&63),n.indexOf(h)!==-1&&(o=a+c),a+=c+(t==="h264"?1:2)}return e.subarray(0,0)},O8=function(e,t,n){return Hh(e,"h264",t,n)},B8=function(e,t,n){return Hh(e,"h265",t,n)},Kt={webm:Pe([119,101,98,109]),matroska:Pe([109,97,116,114,111,115,107,97]),flac:Pe([102,76,97,67]),ogg:Pe([79,103,103,83]),ac3:Pe([11,119]),riff:Pe([82,73,70,70]),avi:Pe([65,86,73]),wav:Pe([87,65,86,69]),"3gp":Pe([102,116,121,112,51,103]),mp4:Pe([102,116,121,112]),fmp4:Pe([115,116,121,112]),mov:Pe([102,116,121,112,113,116]),moov:Pe([109,111,111,118]),moof:Pe([109,111,111,102])},cr={aac:function(e){var t=Xr(e);return dt(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Xr(e);return dt(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=fd(e,[Hs.EBML,Hs.DocType])[0];return dt(t,Kt.webm)},mkv:function(e){var t=fd(e,[Hs.EBML,Hs.DocType])[0];return dt(t,Kt.matroska)},mp4:function(e){if(cr["3gp"](e)||cr.mov(e))return!1;if(dt(e,Kt.mp4,{offset:4})||dt(e,Kt.fmp4,{offset:4})||dt(e,Kt.moof,{offset:4})||dt(e,Kt.moov,{offset:4}))return!0},mov:function(e){return dt(e,Kt.mov,{offset:4})},"3gp":function(e){return dt(e,Kt["3gp"],{offset:4})},ac3:function(e){var t=Xr(e);return dt(e,Kt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var t=0;t+188<e.length&&t<188;){if(e[t]===71&&e[t+188]===71)return!0;t+=1}return!1},flac:function(e){var t=Xr(e);return dt(e,Kt.flac,{offset:t})},ogg:function(e){return dt(e,Kt.ogg)},avi:function(e){return dt(e,Kt.riff)&&dt(e,Kt.avi,{offset:8})},wav:function(e){return dt(e,Kt.riff)&&dt(e,Kt.wav,{offset:8})},h264:function(e){return O8(e,7,3).length},h265:function(e){return B8(e,[32,33],3).length}},sl=Object.keys(cr).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);sl.forEach(function(r){var e=cr[r];cr[r]=function(t){return e(Pe(t))}});var L8=cr,$l=function(e){e=Pe(e);for(var t=0;t<sl.length;t++){var n=sl[t];if(L8[n](e))return n}return""},M8=function(e){return E8(e,["moof"]).length>0},Ro,pd;function P8(){if(pd)return Ro;pd=1;var r=9e4,e,t,n,s,a,o,l;return e=function(c){return c*r},t=function(c,h){return c*h},n=function(c){return c/r},s=function(c,h){return c/h},a=function(c,h){return e(s(c,h))},o=function(c,h){return t(n(c),h)},l=function(c,h,m){return n(m?c:c-h)},Ro={ONE_SECOND_IN_TS:r,secondsToVideoTs:e,secondsToAudioTs:t,videoTsToSeconds:n,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l},Ro}var Nn=P8();/**
28
28
  * @license
29
29
  * Video.js 8.23.7 <http://videojs.com/>
30
30
  * Copyright 2010-present Video.js contributors
@@ -34,7 +34,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
34
34
  * Includes vtt.js <https://github.com/mozilla/vtt.js>
35
35
  * Available under Apache License Version 2.0
36
36
  * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
37
- */var al="8.23.7";const tn={},yn=function(r,e){return tn[r]=tn[r]||[],e&&(tn[r]=tn[r].concat(e)),tn[r]},R8=function(r,e){yn(r,e)},jh=function(r,e){const t=yn(r).indexOf(e);return t<=-1?!1:(tn[r]=tn[r].slice(),tn[r].splice(t,1),!0)},V8=function(r,e){yn(r,[].concat(e).map(t=>{const n=(...s)=>(jh(r,n),t(...s));return n}))},oa={prefixed:!0},Js=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],md=Js[0];let Kr;for(let r=0;r<Js.length;r++)if(Js[r][1]in ve){Kr=Js[r];break}if(Kr){for(let r=0;r<Kr.length;r++)oa[md[r]]=Kr[r];oa.prefixed=Kr[0]!==md[0]}let ni=[];const F8=(r,e,t)=>(n,s,a)=>{const o=e.levels[s],l=new RegExp(`^(${o})$`);let c=r;if(n!=="log"&&a.unshift(n.toUpperCase()+":"),t&&(c=`%c${r}`,a.unshift(t)),a.unshift(c+":"),ni){ni.push([].concat(a));const m=ni.length-1e3;ni.splice(0,m>0?m:0)}if(!W.console)return;let h=W.console[n];!h&&n==="debug"&&(h=W.console.info||W.console.log),!(!h||!o||!l.test(n))&&h[Array.isArray(a)?"apply":"call"](W.console,a)};function ol(r,e=":",t=""){let n="info",s;function a(...o){s("log",n,o)}return s=F8(r,a,t),a.createLogger=(o,l,c)=>{const h=l!==void 0?l:e,m=c!==void 0?c:t,g=`${r} ${h} ${o}`;return ol(g,h,m)},a.createNewLogger=(o,l,c)=>ol(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=()=>ni?[].concat(ni):[],a.history.filter=o=>(ni||[]).filter(l=>new RegExp(`.*${o}.*`).test(l[0])),a.history.clear=()=>{ni&&(ni.length=0)},a.history.disable=()=>{ni!==null&&(ni.length=0,ni=null)},a.history.enable=()=>{ni===null&&(ni=[])},a.error=(...o)=>s("error",n,o),a.warn=(...o)=>s("warn",n,o),a.debug=(...o)=>s("debug",n,o),a}const We=ol("VIDEOJS"),zh=We.createLogger,$8=Object.prototype.toString,Gh=function(r){return Gi(r)?Object.keys(r):[]};function Zn(r,e){Gh(r).forEach(t=>e(r[t],t))}function Wh(r,e,t=0){return Gh(r).reduce((n,s)=>e(n,r[s],s),t)}function Gi(r){return!!r&&typeof r=="object"}function dr(r){return Gi(r)&&$8.call(r)==="[object Object]"&&r.constructor===Object}function ot(...r){const e={};return r.forEach(t=>{t&&Zn(t,(n,s)=>{if(!dr(n)){e[s]=n;return}dr(e[s])||(e[s]={}),e[s]=ot(e[s],n)})}),e}function Yh(r={}){const e=[];for(const t in r)if(r.hasOwnProperty(t)){const n=r[t];e.push(n)}return e}function Oa(r,e,t,n=!0){const s=o=>Object.defineProperty(r,e,{value:o,enumerable:!0,writable:!0}),a={configurable:!0,enumerable:!0,get(){const o=t();return s(o),o}};return n&&(a.set=s),Object.defineProperty(r,e,a)}var U8=Object.freeze({__proto__:null,each:Zn,reduce:Wh,isObject:Gi,isPlain:dr,merge:ot,values:Yh,defineLazyProperty:Oa});let Ul=!1,Xh=null,Li=!1,Kh,Qh=!1,Jn=!1,er=!1,Wi=!1,ql=null,Ba=null;const q8=!!(W.cast&&W.cast.framework&&W.cast.framework.CastReceiverContext);let Zh=null,la=!1,La=!1,ua=!1,Ma=!1,ca=!1,da=!1,ha=!1;const as=!!(vr()&&("ontouchstart"in W||W.navigator.maxTouchPoints||W.DocumentTouch&&W.document instanceof W.DocumentTouch)),dn=W.navigator&&W.navigator.userAgentData;dn&&dn.platform&&dn.brands&&(Li=dn.platform==="Android",Jn=!!dn.brands.find(r=>r.brand==="Microsoft Edge"),er=!!dn.brands.find(r=>r.brand==="Chromium"),Wi=!Jn&&er,ql=Ba=(dn.brands.find(r=>r.brand==="Chromium")||{}).version||null,La=dn.platform==="Windows");if(!er){const r=W.navigator&&W.navigator.userAgent||"";Ul=/iPod/i.test(r),Xh=(function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null})(),Li=/Android/i.test(r),Kh=(function(){const e=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null})(),Qh=/Firefox/i.test(r),Jn=/Edg/i.test(r),er=/Chrome/i.test(r)||/CriOS/i.test(r),Wi=!Jn&&er,ql=Ba=(function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null})(),Zh=(function(){const e=/MSIE\s(\d+)\.\d/.exec(r);let t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(t=11),t})(),ca=/Tizen/i.test(r),da=/Web0S/i.test(r),ha=ca||da,la=/Safari/i.test(r)&&!Wi&&!Li&&!Jn&&!ha,La=/Windows/i.test(r),ua=/iPad/i.test(r)||la&&as&&!/iPhone/i.test(r),Ma=/iPhone/i.test(r)&&!ua}const $t=Ma||ua||Ul,Pa=(la||$t)&&!Wi;var Jh=Object.freeze({__proto__:null,get IS_IPOD(){return Ul},get IOS_VERSION(){return Xh},get IS_ANDROID(){return Li},get ANDROID_VERSION(){return Kh},get IS_FIREFOX(){return Qh},get IS_EDGE(){return Jn},get IS_CHROMIUM(){return er},get IS_CHROME(){return Wi},get CHROMIUM_VERSION(){return ql},get CHROME_VERSION(){return Ba},IS_CHROMECAST_RECEIVER:q8,get IE_VERSION(){return Zh},get IS_SAFARI(){return la},get IS_WINDOWS(){return La},get IS_IPAD(){return ua},get IS_IPHONE(){return Ma},get IS_TIZEN(){return ca},get IS_WEBOS(){return da},get IS_SMART_TV(){return ha},TOUCH_ENABLED:as,IS_IOS:$t,IS_ANY_SAFARI:Pa});function gd(r){return typeof r=="string"&&!!r.trim()}function H8(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function vr(){return ve===W.document}function _r(r){return Gi(r)&&r.nodeType===1}function e0(){try{return W.parent!==W.self}catch{return!0}}function t0(r){return function(e,t){if(!gd(e))return ve[r](null);gd(t)&&(t=ve.querySelector(t));const n=_r(t)?t:ve;return n[r]&&n[r](e)}}function Re(r="div",e={},t={},n){const s=ve.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(t).forEach(function(a){s.setAttribute(a,t[a])}),n&&Hl(s,n),s}function bn(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function ll(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Jr(r,e){return H8(e),r.classList.contains(e)}function Ln(r,...e){return r.classList.add(...e.reduce((t,n)=>t.concat(n.split(/\s+/)),[])),r}function Ra(r,...e){return r?(r.classList.remove(...e.reduce((t,n)=>t.concat(n.split(/\s+/)),[])),r):(We.warn("removeClass was called with an element that doesn't exist"),null)}function i0(r,e,t){return typeof t=="function"&&(t=t(r,e)),typeof t!="boolean"&&(t=void 0),e.split(/\s+/).forEach(n=>r.classList.toggle(n,t)),r}function n0(r,e){Object.getOwnPropertyNames(e).forEach(function(t){const n=e[t];n===null||typeof n>"u"||n===!1?r.removeAttribute(t):r.setAttribute(t,n===!0?"":n)})}function fn(r){const e={},t=["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;t.includes(a)&&(o=o!==null),e[a]=o}}return e}function r0(r,e){return r.getAttribute(e)}function hr(r,e,t){r.setAttribute(e,t)}function Va(r,e){r.removeAttribute(e)}function s0(){ve.body.focus(),ve.onselectstart=function(){return!1}}function a0(){ve.onselectstart=function(){return!0}}function fr(r){if(r&&r.getBoundingClientRect&&r.parentNode){const e=r.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t.height||(t.height=parseFloat(pr(r,"height"))),t.width||(t.width=parseFloat(pr(r,"width"))),t}}function os(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};const e=r.offsetWidth,t=r.offsetHeight;let n=0,s=0;for(;r.offsetParent&&r!==ve[oa.fullscreenElement];)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;return{left:n,top:s,width:e,height:t}}function Fa(r,e){const t={x:0,y:0};if($t){let m=r;for(;m&&m.nodeName.toLowerCase()!=="html";){const g=pr(m,"transform");if(/^matrix/.test(g)){const k=g.slice(7,-1).split(/,\s/).map(Number);t.x+=k[4],t.y+=k[5]}else if(/^matrix3d/.test(g)){const k=g.slice(9,-1).split(/,\s/).map(Number);t.x+=k[12],t.y+=k[13]}if(m.assignedSlot&&m.assignedSlot.parentElement&&W.WebKitCSSMatrix){const k=W.getComputedStyle(m.assignedSlot.parentElement).transform,T=new W.WebKitCSSMatrix(k);t.x+=T.m41,t.y+=T.m42}m=m.parentNode||m.host}}const n={},s=os(e.target),a=os(r),o=a.width,l=a.height;let c=e.offsetY-(a.top-s.top),h=e.offsetX-(a.left-s.left);return e.changedTouches&&(h=e.changedTouches[0].pageX-a.left,c=e.changedTouches[0].pageY+a.top,$t&&(h-=t.x,c-=t.y)),n.y=1-Math.max(0,Math.min(1,c/l)),n.x=Math.max(0,Math.min(1,h/o)),n}function o0(r){return Gi(r)&&r.nodeType===3}function $a(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function l0(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),_r(e)||o0(e))return e;if(typeof e=="string"&&/\S/.test(e))return ve.createTextNode(e)}).filter(e=>e)}function Hl(r,e){return l0(e).forEach(t=>r.appendChild(t)),r}function u0(r,e){return Hl($a(r),e)}function ls(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 Tn=t0("querySelector"),c0=t0("querySelectorAll");function pr(r,e){if(!r||!e)return"";if(typeof W.getComputedStyle=="function"){let t;try{t=W.getComputedStyle(r)}catch{return""}return t?t.getPropertyValue(e)||t[e]:""}return""}function d0(r){[...ve.styleSheets].forEach(e=>{try{const t=[...e.cssRules].map(s=>s.cssText).join(""),n=ve.createElement("style");n.textContent=t,r.document.head.appendChild(n)}catch{const n=ve.createElement("link");n.rel="stylesheet",n.type=e.type,n.media=e.media.mediaText,n.href=e.href,r.document.head.appendChild(n)}})}var h0=Object.freeze({__proto__:null,isReal:vr,isEl:_r,isInFrame:e0,createEl:Re,textContent:bn,prependTo:ll,hasClass:Jr,addClass:Ln,removeClass:Ra,toggleClass:i0,setAttributes:n0,getAttributes:fn,getAttribute:r0,setAttribute:hr,removeAttribute:Va,blockTextSelection:s0,unblockTextSelection:a0,getBoundingClientRect:fr,findPosition:os,getPointerPosition:Fa,isTextNode:o0,emptyEl:$a,normalizeContent:l0,appendContent:Hl,insertContent:u0,isSingleLeftClick:ls,$:Tn,$$:c0,computedStyle:pr,copyStyleSheetsToWindow:d0});let f0=!1,ul;const j8=function(){if(ul.options.autoSetup===!1)return;const r=Array.prototype.slice.call(ve.getElementsByTagName("video")),e=Array.prototype.slice.call(ve.getElementsByTagName("audio")),t=Array.prototype.slice.call(ve.getElementsByTagName("video-js")),n=r.concat(e,t);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&&ul(o);else{cl(1);break}}else f0||cl(1)};function cl(r,e){vr()&&(e&&(ul=e),W.setTimeout(j8,r))}function dl(){f0=!0,W.removeEventListener("load",dl)}vr()&&(ve.readyState==="complete"?dl():W.addEventListener("load",dl));const p0=function(r){const e=ve.createElement("style");return e.className=r,e},m0=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var Zt=new WeakMap;const z8=3;let G8=z8;function yi(){return G8++}function vd(r,e){if(!Zt.has(r))return;const t=Zt.get(r);t.handlers[e].length===0&&(delete t.handlers[e],r.removeEventListener?r.removeEventListener(e,t.dispatcher,!1):r.detachEvent&&r.detachEvent("on"+e,t.dispatcher)),Object.getOwnPropertyNames(t.handlers).length<=0&&(delete t.handlers,delete t.dispatcher,delete t.disabled),Object.getOwnPropertyNames(t).length===0&&Zt.delete(r)}function jl(r,e,t,n){t.forEach(function(s){r(e,s,n)})}function Ua(r){if(r.fixed_)return r;function e(){return!0}function t(){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||ve),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=t,r.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=t,r.clientX!==null&&r.clientX!==void 0){const a=ve.documentElement,o=ve.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 js;const W8=function(){if(typeof js!="boolean"){js=!1;try{const r=Object.defineProperty({},"passive",{get(){js=!0}});W.addEventListener("test",null,r),W.removeEventListener("test",null,r)}catch{}}return js},Y8=["touchstart","touchmove"];function hi(r,e,t){if(Array.isArray(e))return jl(hi,r,e,t);Zt.has(r)||Zt.set(r,{});const n=Zt.get(r);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),t.guid||(t.guid=yi()),n.handlers[e].push(t),n.dispatcher||(n.disabled=!1,n.dispatcher=function(s,a){if(n.disabled)return;s=Ua(s);const o=n.handlers[s.type];if(o){const l=o.slice(0);for(let c=0,h=l.length;c<h&&!s.isImmediatePropagationStopped();c++)try{l[c].call(r,s,a)}catch(m){We.error(m)}}}),n.handlers[e].length===1)if(r.addEventListener){let s=!1;W8()&&Y8.indexOf(e)>-1&&(s={passive:!0}),r.addEventListener(e,n.dispatcher,s)}else r.attachEvent&&r.attachEvent("on"+e,n.dispatcher)}function Ut(r,e,t){if(!Zt.has(r))return;const n=Zt.get(r);if(!n.handlers)return;if(Array.isArray(e))return jl(Ut,r,e,t);const s=function(o,l){n.handlers[l]=[],vd(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(!t){s(r,e);return}if(t.guid)for(let o=0;o<a.length;o++)a[o].guid===t.guid&&a.splice(o--,1);vd(r,e)}}function yr(r,e,t){const n=Zt.has(r)?Zt.get(r):{},s=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=Ua(e),n.dispatcher&&n.dispatcher.call(r,e,t),s&&!e.isPropagationStopped()&&e.bubbles===!0)yr.call(null,s,e,t);else if(!s&&!e.defaultPrevented&&e.target&&e.target[e.type]){Zt.has(e.target)||Zt.set(e.target,{});const a=Zt.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 qa(r,e,t){if(Array.isArray(e))return jl(qa,r,e,t);const n=function(){Ut(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||yi(),hi(r,e,n)}function zl(r,e,t){const n=function(){Ut(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||yi(),hi(r,e,n)}var X8=Object.freeze({__proto__:null,fixEvent:Ua,on:hi,off:Ut,trigger:yr,one:qa,any:zl});const Ti=30,ut=function(r,e,t){e.guid||(e.guid=yi());const n=e.bind(r);return n.guid=t?t+"_"+e.guid:e.guid,n},Yi=function(r,e){let t=W.performance.now();return function(...s){const a=W.performance.now();a-t>=e&&(r(...s),t=a)}},g0=function(r,e,t,n=W){let s;const a=()=>{n.clearTimeout(s),s=null},o=function(){const l=this,c=arguments;let h=function(){s=null,h=null,t||r.apply(l,c)};!s&&t&&r.apply(l,c),n.clearTimeout(s),s=n.setTimeout(h,e)};return o.cancel=a,o};var K8=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Ti,bind_:ut,throttle:Yi,debounce:g0});let zr;class fi{on(e,t){const n=this.addEventListener;this.addEventListener=()=>{},hi(this,e,t),this.addEventListener=n}off(e,t){Ut(this,e,t)}one(e,t){const n=this.addEventListener;this.addEventListener=()=>{},qa(this,e,t),this.addEventListener=n}any(e,t){const n=this.addEventListener;this.addEventListener=()=>{},zl(this,e,t),this.addEventListener=n}trigger(e){const t=e.type||e;typeof e=="string"&&(e={type:t}),e=Ua(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),yr(this,e)}queueTrigger(e){zr||(zr=new Map);const t=e.type||e;let n=zr.get(this);n||(n=new Map,zr.set(this,n));const s=n.get(t);n.delete(t),W.clearTimeout(s);const a=W.setTimeout(()=>{n.delete(t),n.size===0&&(n=null,zr.delete(this)),this.trigger(e)},0);n.set(t,a)}}fi.prototype.allowedEvents_={};fi.prototype.addEventListener=fi.prototype.on;fi.prototype.removeEventListener=fi.prototype.off;fi.prototype.dispatchEvent=fi.prototype.trigger;const Ha=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,sn=r=>r instanceof fi||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),Q8=(r,e)=>{sn(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},hl=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,fa=(r,e,t)=>{if(!r||!r.nodeName&&!sn(r))throw new Error(`Invalid target for ${Ha(e)}#${t}; must be a DOM node or evented object.`)},v0=(r,e,t)=>{if(!hl(r))throw new Error(`Invalid event type for ${Ha(e)}#${t}; must be a non-empty string or array.`)},_0=(r,e,t)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${Ha(e)}#${t}; must be a function.`)},Vo=(r,e,t)=>{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]),fa(s,r,t),v0(a,r,t),_0(o,r,t),o=ut(r,o),{isTargetingSelf:n,target:s,type:a,listener:o}},wn=(r,e,t,n)=>{fa(r,r,e),r.nodeName?X8[e](r,t,n):r[e](t,n)},Z8={on(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Vo(this,r,"on");if(wn(t,"on",n,s),!e){const a=()=>this.off(t,n,s);a.guid=s.guid;const o=()=>this.off("dispose",a);o.guid=s.guid,wn(this,"on","dispose",a),wn(t,"on","dispose",o)}},one(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Vo(this,r,"one");if(e)wn(t,"one",n,s);else{const a=(...o)=>{this.off(t,n,a),s.apply(null,o)};a.guid=s.guid,wn(t,"one",n,a)}},any(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Vo(this,r,"any");if(e)wn(t,"any",n,s);else{const a=(...o)=>{this.off(t,n,a),s.apply(null,o)};a.guid=s.guid,wn(t,"any",n,a)}},off(r,e,t){if(!r||hl(r))Ut(this.eventBusEl_,r,e);else{const n=r,s=e;fa(n,this,"off"),v0(s,this,"off"),_0(t,this,"off"),t=ut(this,t),this.off("dispose",t),n.nodeName?(Ut(n,s,t),Ut(n,"dispose",t)):sn(n)&&(n.off(s,t),n.off("dispose",t))}},trigger(r,e){fa(this.eventBusEl_,this,"trigger");const t=r&&typeof r!="string"?r.type:r;if(!hl(t))throw new Error(`Invalid event type for ${Ha(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return yr(this.eventBusEl_,r,e)}};function Gl(r,e={}){const{eventBusKey:t}=e;if(t){if(!r[t].nodeName)throw new Error(`The eventBusKey "${t}" does not refer to an element.`);r.eventBusEl_=r[t]}else r.eventBusEl_=Re("span",{className:"vjs-event-bus"});return Object.assign(r,Z8),r.eventedCallbacks&&r.eventedCallbacks.forEach(n=>{n()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(n){n&&Zt.has(n)&&Zt.delete(n)}),W.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const J8={state:{},setState(r){typeof r=="function"&&(r=r());let e;return Zn(r,(t,n)=>{this.state[n]!==t&&(e=e||{},e[n]={from:this.state[n],to:t}),this.state[n]=t}),e&&sn(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function y0(r,e){return Object.assign(r,J8),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&sn(r)&&r.on("statechanged",r.handleStateChanged),r}const es=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},_t=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},T0=function(r,e){return _t(r)===_t(e)};var ex=Object.freeze({__proto__:null,toLowerCase:es,toTitleCase:_t,titleCaseEquals:T0});class ae{constructor(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=ot({},this.options_),t=this.options_=ot(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const s=e&&e.id&&e.id()||"no_player";this.id_=`${s}_component_${yi()}`}this.name_=t.name||null,t.el?this.el_=t.el:t.createEl!==!1&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(s=>this.addClass(s)),["on","off","one","any","trigger"].forEach(s=>{this[s]=void 0}),t.evented!==!1&&(Gl(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),y0(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,t.initChildren!==!1&&this.initChildren(),this.ready(n),t.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 t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=ot(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,n){return Re(e,t,n)}localize(e,t,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 h=n;return o&&o[e]?h=o[e]:c&&c[e]&&(h=c[e]),t&&(h=h.replace(/\{(\d+)\}/g,function(m,g){const k=t[g-1];let T=k;return typeof k>"u"&&(T=m),T})),h}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 t=this;for(let n=0;n<e.length;n++)if(t=t.getChild(e[n]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const n="http://www.w3.org/2000/svg",s=Re("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),a=ve.createElementNS(n,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const o=ve.createElementNS(n,"use");return a.appendChild(o),o.setAttributeNS(null,"href",`#vjs-icon-${e}`),s.appendChild(a),this.iconIsSet_?t.replaceChild(s,t.querySelector(".vjs-icon-placeholder")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},n=this.children_.length){let s,a;if(typeof e=="string"){a=_t(e);const o=t.componentClass||a;t.name=a;const l=ae.getComponent(o);if(!l)throw new Error(`Component ${o} does not exist`);if(typeof l!="function")return null;s=new l(this.player_||this,t)}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&&_t(s.name()),a&&(this.childNameIndex_[a]=s,this.childNameIndex_[es(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_:_r(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 t=!1;for(let s=this.children_.length-1;s>=0;s--)if(this.children_[s]===e){t=!0,this.children_.splice(s,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[_t(e.name())]=null,this.childNameIndex_[es(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 t=this.options_,n=o=>{const l=o.name;let c=o.opts;if(t[l]!==void 0&&(c=t[l]),c===!1)return;c===!0&&(c={}),c.playerOptions=this.options_.playerOptions;const h=this.addChild(l,c);h&&(this[l]=h)};let s;const a=ae.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=ae.getComponent(o.opts.componentClass||_t(o.name));return l&&!a.isTech(l)}).forEach(n)}}buildCSSClass(){return""}ready(e,t=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}t?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(t){t.call(this)},this),this.trigger("ready")},1)}$(e,t){return Tn(e,t||this.contentEl())}$$(e,t){return c0(e,t||this.contentEl())}hasClass(e){return Jr(this.el_,e)}addClass(...e){Ln(this.el_,...e)}removeClass(...e){Ra(this.el_,...e)}toggleClass(e,t){i0(this.el_,e,t)}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 r0(this.el_,e)}setAttribute(e,t){hr(this.el_,e,t)}removeAttribute(e){Va(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,n){if(t!==void 0){(t===null||t!==t)&&(t=0),(""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1?this.el_.style[e]=t:t==="auto"?this.el_.style[e]="":this.el_.style[e]=t+"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"+_t(e)],10)}currentDimension(e){let t=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(t=pr(this.el_,e),t=parseFloat(t),t===0||isNaN(t)){const n=`offset${_t(e)}`;t=this.el_[n]}return t}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(),t={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:t,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,t=null;const n=10,s=200;let a;this.on("touchstart",function(l){l.touches.length===1&&(t={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(t){const c=l.touches[0].pageX-t.pageX,h=l.touches[0].pageY-t.pageY;Math.sqrt(c*c+h*h)>n&&(a=!1)}});const o=function(){a=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(l){t=null,a===!0&&W.performance.now()-e<s&&(l.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=ut(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const n=function(s){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}setTimeout(e,t){var n;return e=ut(this,e),this.clearTimersOnDispose_(),n=W.setTimeout(()=>{this.setTimeoutIds_.has(n)&&this.setTimeoutIds_.delete(n),e()},t),this.setTimeoutIds_.add(n),n}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),W.clearTimeout(e)),e}setInterval(e,t){e=ut(this,e),this.clearTimersOnDispose_();const n=W.setInterval(e,t);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 t;return e=ut(this,e),t=W.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=ut(this,t);const n=this.requestAnimationFrame(()=>{t(),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,t])=>{this[e].forEach((n,s)=>this[t](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 t(a){const o=W.getComputedStyle(a,null),l=o.getPropertyValue("visibility");return o.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(l)}function n(a){return!(!t(a.parentElement)||!t(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>(ve.documentElement.clientWidth||W.innerWidth)||o.y<0||o.y>(ve.documentElement.clientHeight||W.innerHeight))return!1;let l=ve.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,t){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const n=ae.getComponent("Tech"),s=n&&n.isTech(t),a=ae===t||ae.prototype.isPrototypeOf(t.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=_t(e),ae.components_||(ae.components_={});const o=ae.getComponent("Player");if(e==="Player"&&o&&o.players){const l=o.players,c=Object.keys(l);if(l&&c.length>0){for(let h=0;h<c.length;h++)if(l[c[h]]!==null)throw new Error("Can not register Player component after player has been created.")}}return ae.components_[e]=t,ae.components_[es(e)]=t,t}static getComponent(e){if(!(!e||!ae.components_))return ae.components_[e]}}ae.registerComponent("Component",ae);function tx(r,e,t){if(typeof e!="number"||e<0||e>t)throw new Error(`Failed to execute '${r}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${t}).`)}function _d(r,e,t,n){return tx(r,n,t.length-1),t[n][e]}function Fo(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:_d.bind(null,"start",0,r),end:_d.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)?Fo(r):r===void 0||e===void 0?Fo():Fo([[r,e]])}const b0=function(r,e){r=r<0?0:r;let t=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=t="-"),s=s>0||o>0?s+":":"",n=((s||a>=10)&&n<10?"0"+n:n)+":",t=t<10?"0"+t:t,s+n+t};let Wl=b0;function x0(r){Wl=r}function C0(){Wl=b0}function Vn(r,e=r){return Wl(r,e)}var ix=Object.freeze({__proto__:null,createTimeRanges:Bi,createTimeRange:Bi,setFormatTime:x0,resetFormatTime:C0,formatTime:Vn});function E0(r,e){let t=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),t+=s-n;return t/e}function mt(r){if(r instanceof mt)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:Gi(r)&&(typeof r.code=="number"&&(this.code=r.code),Object.assign(this,r)),this.message||(this.message=mt.defaultMessages[this.code]||"")}mt.prototype.code=0;mt.prototype.message="";mt.prototype.status=null;mt.prototype.metadata=null;mt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];mt.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."};mt.MEDIA_ERR_CUSTOM=0;mt.prototype.MEDIA_ERR_CUSTOM=0;mt.MEDIA_ERR_ABORTED=1;mt.prototype.MEDIA_ERR_ABORTED=1;mt.MEDIA_ERR_NETWORK=2;mt.prototype.MEDIA_ERR_NETWORK=2;mt.MEDIA_ERR_DECODE=3;mt.prototype.MEDIA_ERR_DECODE=3;mt.MEDIA_ERR_SRC_NOT_SUPPORTED=4;mt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;mt.MEDIA_ERR_ENCRYPTED=5;mt.prototype.MEDIA_ERR_ENCRYPTED=5;function ts(r){return r!=null&&typeof r.then=="function"}function Ui(r){ts(r)&&r.then(null,e=>{})}const fl=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,n,s)=>(r[n]&&(t[n]=r[n]),t),{cues:r.cues&&Array.prototype.map.call(r.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},nx=function(r){const e=r.$$("track"),t=Array.prototype.map.call(e,s=>s.track);return Array.prototype.map.call(e,function(s){const a=fl(s.track);return s.src&&(a.src=s.src),a}).concat(Array.prototype.filter.call(r.textTracks(),function(s){return t.indexOf(s)===-1}).map(fl))},rx=function(r,e){return r.forEach(function(t){const n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(s=>n.addCue(s))}),e.textTracks()};var pl={textTracksToJson:nx,jsonToTextTracks:rx,trackToJson:fl};const $o="vjs-modal-dialog";class Tr extends ae{constructor(e,t){super(e,t),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_=Re("div",{className:`${$o}-content`},{role:"document"}),this.descEl_=Re("p",{className:`${$o}-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`${$o} 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 t=this.closeable_=!!e;let n=this.getChild("closeButton");if(t&&!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_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),n=t.parentNode,s=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),u0(t,e),this.trigger("modalfill"),s?n.insertBefore(t,s):n.appendChild(t);const a=this.getChild("closeButton");a&&n.appendChild(a.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),$a(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=ve.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===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 t=this.focusableEls_(),n=this.el_.querySelector(":focus");let s;for(let a=0;a<t.length;a++)if(n===t[a]){s=a;break}ve.activeElement===this.el_&&(s=0),e.shiftKey&&s===0?(t[t.length-1].focus(),e.preventDefault()):!e.shiftKey&&s===t.length-1&&(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,t=>(t instanceof W.HTMLAnchorElement||t instanceof W.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof W.HTMLInputElement||t instanceof W.HTMLSelectElement||t instanceof W.HTMLTextAreaElement||t instanceof W.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof W.HTMLIFrameElement||t instanceof W.HTMLObjectElement||t instanceof W.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable"))}}Tr.prototype.options_={pauseOnOpen:!0,temporary:!0};ae.registerComponent("ModalDialog",Tr);class Fn extends fi{constructor(e=[]){super(),this.tracks_=[];for(let t=0;t<e.length;t++)this.addTrack(e[t])}get length(){return this.tracks_.length}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),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})},sn(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){t=this[n],t.off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){t=a;break}}return t}}Fn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const r in Fn.prototype.allowedEvents_)Fn.prototype["on"+r]=null;const Uo=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].enabled=!1)};class S0 extends Fn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Uo(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Uo(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Uo(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 qo=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].selected=!1)};class k0 extends Fn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){qo(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set(){}})}addTrack(e){e.selected&&qo(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,qo(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 Yl 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 sx{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let n=0,s=this.trackElements_.length;n<s;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t}removeTrackElement_(e){for(let t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&typeof this.trackElements_[t].track.off=="function"&&this.trackElements_[t].track.off(),typeof this.trackElements_[t].off=="function"&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}}class pa{constructor(e){pa.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=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(t<s)for(n=t;n<s;n++)a.call(this,n)}getCueById(e){let t=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){t=a;break}}return t}}const ax={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ox={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},lx={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},yd={disabled:"disabled",hidden:"hidden",showing:"showing"};class Xl extends fi{constructor(e={}){super();const t={id:e.id||"vjs_track_"+yi(),kind:e.kind||"",language:e.language||""};let n=e.label||"";for(const s in t)Object.defineProperty(this,s,{get(){return t[s]},set(){}});Object.defineProperty(this,"label",{get(){return n},set(s){s!==n&&(n=s,this.trigger("labelchange"))}})}}const Kl=function(r){return new URL(r,ve.baseURI)},w0=function(r){return new URL(r,ve.baseURI).href},Ql=function(r){if(typeof r=="string"){const t=r.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return t?t[1].toLowerCase():""}return""},ja=function(r,e=W.location){return Kl(r).origin!==e.origin};var ux=Object.freeze({__proto__:null,parseUrl:Kl,getAbsoluteURL:w0,getFileExtension:Ql,isCrossOrigin:ja});const Td=function(r,e){const t=new W.WebVTT.Parser(W,W.vttjs,W.WebVTT.StringDecoder()),n=[];t.oncue=function(s){e.addCue(s)},t.onparsingerror=function(s){n.push(s)},t.onflush=function(){e.trigger({type:"loadeddata",target:e})},t.parse(r),n.length>0&&(W.console&&W.console.groupCollapsed&&W.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),n.forEach(s=>We.error(s)),W.console&&W.console.groupEnd&&W.console.groupEnd()),t.flush()},bd=function(r,e){const t={uri:r},n=ja(r);n&&(t.cors=n);const s=e.tech_.crossOrigin()==="use-credentials";s&&(t.withCredentials=s),Ah(t,ut(this,function(a,o,l){if(a)return We.error(a,o);e.loaded_=!0,typeof W.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],c=>{if(c.type==="vttjserror"){We.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return Td(l,e)}):Td(l,e)}))};class ds extends Xl{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=ot(e,{kind:lx[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=yd[t.mode]||"disabled";const s=t.default;(t.kind==="metadata"||t.kind==="chapters")&&(n="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const a=new pa(this.cues_),o=new pa(this.activeCues_);let l=!1;this.timeupdateHandler=ut(this,function(h={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){h.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),h.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(h){yd[h]&&n!==h&&(n=h,!this.preload_&&n!=="disabled"&&this.cues.length===0&&bd(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 h=this.tech_.currentTime(),m=[];for(let g=0,k=this.cues.length;g<k;g++){const T=this.cues[g];T.startTime<=h&&T.endTime>=h&&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(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||t.kind!=="subtitles"&&t.kind!=="captions")&&bd(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 t=e;if(!("getCueAsHTML"in t)){t=new W.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const s in e)s in t||(t[s]=e[s]);t.id=e.id,t.originalCue_=e}const n=this.tech_.textTracks();for(let s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return pl.trackToJson(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}ds.prototype.allowedEvents_={cuechange:"cuechange"};class D0 extends Xl{constructor(e={}){const t=ot(e,{kind:ox[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"enabled",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class A0 extends Xl{constructor(e={}){const t=ot(e,{kind:ax[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"selected",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class an extends fi{constructor(e={}){super();let t;const n=new ds(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 t}},track:{get(){return n}}}),t=an.NONE,n.addEventListener("loadeddata",()=>{t=an.LOADED,this.trigger({type:"load",target:this})})}}an.prototype.allowedEvents_={load:"load"};an.NONE=0;an.LOADING=1;an.LOADED=2;an.ERROR=3;const gi={audio:{ListClass:S0,TrackClass:D0,capitalName:"Audio"},video:{ListClass:k0,TrackClass:A0,capitalName:"Video"},text:{ListClass:Yl,TrackClass:ds,capitalName:"Text"}};Object.keys(gi).forEach(function(r){gi[r].getterName=`${r}Tracks`,gi[r].privateName=`${r}Tracks_`});const mr={remoteText:{ListClass:Yl,TrackClass:ds,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:sx,TrackClass:an,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Qt=Object.assign({},gi,mr);mr.names=Object.keys(mr);gi.names=Object.keys(gi);Qt.names=[].concat(mr.names).concat(gi.names);function cx(r,e,t,n,s={}){const a=r.textTracks();s.kind=e,t&&(s.label=t),n&&(s.language=n),s.tech=r;const o=new Qt.text.TrackClass(s);return a.addTrack(o),o}class Ue extends ae{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),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}),Qt.names.forEach(n=>{const s=Qt[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 Qt.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ut(this,function(){const t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,t===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Bi(0,0)}bufferedPercent(){return E0(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(gi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(t=>{const n=this[`${t}Tracks`]()||[];let s=n.length;for(;s--;){const a=n[s];t==="text"&&this.removeRemoteTextTrack(a),n.removeTrack(a)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const n=e[t];this.removeRemoteTextTrack(n)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new mt(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(){gi.names.forEach(e=>{const t=gi[e],n=()=>{this.trigger(`${e}trackchange`)},s=this[t.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(ve.body.contains(this.el())){if(!this.options_["vtt.js"]&&dr(zc)&&Object.keys(zc).length>0){this.trigger("vttjsloaded");return}const e=ve.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(),t=this.remoteTextTracks(),n=l=>e.addTrack(l.track),s=l=>e.removeTrack(l.track);t.on("addtrack",n),t.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(){t.off("addtrack",n),t.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,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return cx(this,e,t,n)}createRemoteTextTrack(e){const t=ot(e,{tech:this});return new mr.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const n=this.createRemoteTextTrack(e);return typeof t!="boolean"&&(t=!1),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),t===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(n.track)),n}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=yi();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}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,t){return Ue.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Ue||e instanceof Ue||e===Ue}static registerTech(e,t){if(Ue.techs_||(Ue.techs_={}),!Ue.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!Ue.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Ue.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=_t(e),Ue.techs_[e]=t,Ue.techs_[es(e)]=t,e!=="Tech"&&Ue.defaultTechOrder_.push(e),t}static getTech(e){if(e){if(Ue.techs_&&Ue.techs_[e])return Ue.techs_[e];if(e=_t(e),W&&W.videojs&&W.videojs[e])return We.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),W.videojs[e]}}}Qt.names.forEach(function(r){const e=Qt[r];Ue.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});Ue.prototype.featuresVolumeControl=!0;Ue.prototype.featuresMuteControl=!0;Ue.prototype.featuresFullscreenResize=!1;Ue.prototype.featuresPlaybackRate=!1;Ue.prototype.featuresProgressEvents=!1;Ue.prototype.featuresSourceset=!1;Ue.prototype.featuresTimeupdateEvents=!1;Ue.prototype.featuresNativeTextTracks=!1;Ue.prototype.featuresVideoFrameCallback=!1;Ue.withSourceHandlers=function(r){r.registerSourceHandler=function(t,n){let s=r.sourceHandlers;s||(s=r.sourceHandlers=[]),n===void 0&&(n=s.length),s.splice(n,0,t)},r.canPlayType=function(t){const n=r.sourceHandlers||[];let s;for(let a=0;a<n.length;a++)if(s=n[a].canPlayType(t),s)return s;return""},r.selectSourceHandler=function(t,n){const s=r.sourceHandlers||[];let a;for(let o=0;o<s.length;o++)if(a=s[o].canHandleSource(t,n),a)return s[o];return null},r.canPlaySource=function(t,n){const s=r.selectSourceHandler(t,n);return s?s.canHandleSource(t,n):""},["seekable","seeking","duration"].forEach(function(t){const n=this[t];typeof n=="function"&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):n.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(t){let n=r.selectSourceHandler(t,this.options_);n||(r.nativeSourceHandler?n=r.nativeSourceHandler:We.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==r.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,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)}};ae.registerComponent("Tech",Ue);Ue.registerTech("Tech",Ue);Ue.defaultTechOrder_=[];const Mn={},ma={},ga={};function dx(r,e){Mn[r]=Mn[r]||[],Mn[r].push(e)}function hx(r,e,t){r.setTimeout(()=>Dn(e,Mn[e.type],t,r),1)}function fx(r,e){r.forEach(t=>t.setTech&&t.setTech(e))}function px(r,e,t){return r.reduceRight(Zl(t),e[t]())}function mx(r,e,t,n){return e[t](r.reduce(Zl(t),n))}function xd(r,e,t,n=null){const s="call"+_t(t),a=r.reduce(Zl(s),n),o=a===ga,l=o?null:e[t](a);return _x(r,t,l,o),l}const gx={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},vx={setCurrentTime:1,setMuted:1,setVolume:1},Cd={play:1,pause:1};function Zl(r){return(e,t)=>e===ga?ga:t[r]?t[r](e):e}function _x(r,e,t,n){for(let s=r.length-1;s>=0;s--){const a=r[s];a[e]&&a[e](n,t)}}function yx(r){ma.hasOwnProperty(r.id())&&delete ma[r.id()]}function Tx(r,e){const t=ma[r.id()];let n=null;if(t==null)return n=e(r),ma[r.id()]=[[e,n]],n;for(let s=0;s<t.length;s++){const[a,o]=t[s];a===e&&(n=o)}return n===null&&(n=e(r),t.push([e,n])),n}function Dn(r={},e=[],t,n,s=[],a=!1){const[o,...l]=e;if(typeof o=="string")Dn(r,Mn[o],t,n,s,a);else if(o){const c=Tx(n,o);if(!c.setSource)return s.push(c),Dn(r,l,t,n,s,a);c.setSource(Object.assign({},r),function(h,m){if(h)return Dn(r,l,t,n,s,a);s.push(c),Dn(m,r.type===m.type?l:Mn[m.type],t,n,s,a)})}else l.length?Dn(r,l,t,n,s,a):a?t(r,s):Dn(r,Mn["*"],t,n,s,!0)}const bx={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},va=function(r=""){const e=Ql(r);return bx[e.toLowerCase()]||""},xx=(r,e)=>{if(!e)return"";if(r.cache_.source.src===e&&r.cache_.source.type)return r.cache_.source.type;const t=r.cache_.sources.filter(s=>s.src===e);if(t.length)return t[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 va(e)},N0=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(t){t=N0(t),Array.isArray(t)?e=e.concat(t):Gi(t)&&e.push(t)}),r=e}else typeof r=="string"&&r.trim()?r=[Ed({src:r})]:Gi(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[Ed(r)]:r=[];return r};function Ed(r){if(!r.type){const e=va(r.src);e&&(r.type=e)}return r}var Cx=`<svg xmlns="http://www.w3.org/2000/svg">
37
+ */var al="8.23.7";const tn={},yn=function(r,e){return tn[r]=tn[r]||[],e&&(tn[r]=tn[r].concat(e)),tn[r]},R8=function(r,e){yn(r,e)},jh=function(r,e){const t=yn(r).indexOf(e);return t<=-1?!1:(tn[r]=tn[r].slice(),tn[r].splice(t,1),!0)},V8=function(r,e){yn(r,[].concat(e).map(t=>{const n=(...s)=>(jh(r,n),t(...s));return n}))},oa={prefixed:!0},Js=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],md=Js[0];let Kr;for(let r=0;r<Js.length;r++)if(Js[r][1]in ve){Kr=Js[r];break}if(Kr){for(let r=0;r<Kr.length;r++)oa[md[r]]=Kr[r];oa.prefixed=Kr[0]!==md[0]}let ni=[];const F8=(r,e,t)=>(n,s,a)=>{const o=e.levels[s],l=new RegExp(`^(${o})$`);let c=r;if(n!=="log"&&a.unshift(n.toUpperCase()+":"),t&&(c=`%c${r}`,a.unshift(t)),a.unshift(c+":"),ni){ni.push([].concat(a));const m=ni.length-1e3;ni.splice(0,m>0?m:0)}if(!W.console)return;let h=W.console[n];!h&&n==="debug"&&(h=W.console.info||W.console.log),!(!h||!o||!l.test(n))&&h[Array.isArray(a)?"apply":"call"](W.console,a)};function ol(r,e=":",t=""){let n="info",s;function a(...o){s("log",n,o)}return s=F8(r,a,t),a.createLogger=(o,l,c)=>{const h=l!==void 0?l:e,m=c!==void 0?c:t,g=`${r} ${h} ${o}`;return ol(g,h,m)},a.createNewLogger=(o,l,c)=>ol(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=()=>ni?[].concat(ni):[],a.history.filter=o=>(ni||[]).filter(l=>new RegExp(`.*${o}.*`).test(l[0])),a.history.clear=()=>{ni&&(ni.length=0)},a.history.disable=()=>{ni!==null&&(ni.length=0,ni=null)},a.history.enable=()=>{ni===null&&(ni=[])},a.error=(...o)=>s("error",n,o),a.warn=(...o)=>s("warn",n,o),a.debug=(...o)=>s("debug",n,o),a}const We=ol("VIDEOJS"),zh=We.createLogger,$8=Object.prototype.toString,Gh=function(r){return Gi(r)?Object.keys(r):[]};function Zn(r,e){Gh(r).forEach(t=>e(r[t],t))}function Wh(r,e,t=0){return Gh(r).reduce((n,s)=>e(n,r[s],s),t)}function Gi(r){return!!r&&typeof r=="object"}function dr(r){return Gi(r)&&$8.call(r)==="[object Object]"&&r.constructor===Object}function ot(...r){const e={};return r.forEach(t=>{t&&Zn(t,(n,s)=>{if(!dr(n)){e[s]=n;return}dr(e[s])||(e[s]={}),e[s]=ot(e[s],n)})}),e}function Yh(r={}){const e=[];for(const t in r)if(r.hasOwnProperty(t)){const n=r[t];e.push(n)}return e}function Oa(r,e,t,n=!0){const s=o=>Object.defineProperty(r,e,{value:o,enumerable:!0,writable:!0}),a={configurable:!0,enumerable:!0,get(){const o=t();return s(o),o}};return n&&(a.set=s),Object.defineProperty(r,e,a)}var U8=Object.freeze({__proto__:null,each:Zn,reduce:Wh,isObject:Gi,isPlain:dr,merge:ot,values:Yh,defineLazyProperty:Oa});let Ul=!1,Xh=null,Li=!1,Kh,Qh=!1,Jn=!1,er=!1,Wi=!1,ql=null,Ba=null;const q8=!!(W.cast&&W.cast.framework&&W.cast.framework.CastReceiverContext);let Zh=null,la=!1,La=!1,ua=!1,Ma=!1,ca=!1,da=!1,ha=!1;const as=!!(vr()&&("ontouchstart"in W||W.navigator.maxTouchPoints||W.DocumentTouch&&W.document instanceof W.DocumentTouch)),dn=W.navigator&&W.navigator.userAgentData;dn&&dn.platform&&dn.brands&&(Li=dn.platform==="Android",Jn=!!dn.brands.find(r=>r.brand==="Microsoft Edge"),er=!!dn.brands.find(r=>r.brand==="Chromium"),Wi=!Jn&&er,ql=Ba=(dn.brands.find(r=>r.brand==="Chromium")||{}).version||null,La=dn.platform==="Windows");if(!er){const r=W.navigator&&W.navigator.userAgent||"";Ul=/iPod/i.test(r),Xh=(function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null})(),Li=/Android/i.test(r),Kh=(function(){const e=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null})(),Qh=/Firefox/i.test(r),Jn=/Edg/i.test(r),er=/Chrome/i.test(r)||/CriOS/i.test(r),Wi=!Jn&&er,ql=Ba=(function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null})(),Zh=(function(){const e=/MSIE\s(\d+)\.\d/.exec(r);let t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(t=11),t})(),ca=/Tizen/i.test(r),da=/Web0S/i.test(r),ha=ca||da,la=/Safari/i.test(r)&&!Wi&&!Li&&!Jn&&!ha,La=/Windows/i.test(r),ua=/iPad/i.test(r)||la&&as&&!/iPhone/i.test(r),Ma=/iPhone/i.test(r)&&!ua}const $t=Ma||ua||Ul,Pa=(la||$t)&&!Wi;var Jh=Object.freeze({__proto__:null,get IS_IPOD(){return Ul},get IOS_VERSION(){return Xh},get IS_ANDROID(){return Li},get ANDROID_VERSION(){return Kh},get IS_FIREFOX(){return Qh},get IS_EDGE(){return Jn},get IS_CHROMIUM(){return er},get IS_CHROME(){return Wi},get CHROMIUM_VERSION(){return ql},get CHROME_VERSION(){return Ba},IS_CHROMECAST_RECEIVER:q8,get IE_VERSION(){return Zh},get IS_SAFARI(){return la},get IS_WINDOWS(){return La},get IS_IPAD(){return ua},get IS_IPHONE(){return Ma},get IS_TIZEN(){return ca},get IS_WEBOS(){return da},get IS_SMART_TV(){return ha},TOUCH_ENABLED:as,IS_IOS:$t,IS_ANY_SAFARI:Pa});function gd(r){return typeof r=="string"&&!!r.trim()}function H8(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function vr(){return ve===W.document}function _r(r){return Gi(r)&&r.nodeType===1}function e0(){try{return W.parent!==W.self}catch{return!0}}function t0(r){return function(e,t){if(!gd(e))return ve[r](null);gd(t)&&(t=ve.querySelector(t));const n=_r(t)?t:ve;return n[r]&&n[r](e)}}function Re(r="div",e={},t={},n){const s=ve.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(t).forEach(function(a){s.setAttribute(a,t[a])}),n&&Hl(s,n),s}function bn(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function ll(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Jr(r,e){return H8(e),r.classList.contains(e)}function Ln(r,...e){return r.classList.add(...e.reduce((t,n)=>t.concat(n.split(/\s+/)),[])),r}function Ra(r,...e){return r?(r.classList.remove(...e.reduce((t,n)=>t.concat(n.split(/\s+/)),[])),r):(We.warn("removeClass was called with an element that doesn't exist"),null)}function i0(r,e,t){return typeof t=="function"&&(t=t(r,e)),typeof t!="boolean"&&(t=void 0),e.split(/\s+/).forEach(n=>r.classList.toggle(n,t)),r}function n0(r,e){Object.getOwnPropertyNames(e).forEach(function(t){const n=e[t];n===null||typeof n>"u"||n===!1?r.removeAttribute(t):r.setAttribute(t,n===!0?"":n)})}function fn(r){const e={},t=["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;t.includes(a)&&(o=o!==null),e[a]=o}}return e}function r0(r,e){return r.getAttribute(e)}function hr(r,e,t){r.setAttribute(e,t)}function Va(r,e){r.removeAttribute(e)}function s0(){ve.body.focus(),ve.onselectstart=function(){return!1}}function a0(){ve.onselectstart=function(){return!0}}function fr(r){if(r&&r.getBoundingClientRect&&r.parentNode){const e=r.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t.height||(t.height=parseFloat(pr(r,"height"))),t.width||(t.width=parseFloat(pr(r,"width"))),t}}function os(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};const e=r.offsetWidth,t=r.offsetHeight;let n=0,s=0;for(;r.offsetParent&&r!==ve[oa.fullscreenElement];)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;return{left:n,top:s,width:e,height:t}}function Fa(r,e){const t={x:0,y:0};if($t){let m=r;for(;m&&m.nodeName.toLowerCase()!=="html";){const g=pr(m,"transform");if(/^matrix/.test(g)){const k=g.slice(7,-1).split(/,\s/).map(Number);t.x+=k[4],t.y+=k[5]}else if(/^matrix3d/.test(g)){const k=g.slice(9,-1).split(/,\s/).map(Number);t.x+=k[12],t.y+=k[13]}if(m.assignedSlot&&m.assignedSlot.parentElement&&W.WebKitCSSMatrix){const k=W.getComputedStyle(m.assignedSlot.parentElement).transform,T=new W.WebKitCSSMatrix(k);t.x+=T.m41,t.y+=T.m42}m=m.parentNode||m.host}}const n={},s=os(e.target),a=os(r),o=a.width,l=a.height;let c=e.offsetY-(a.top-s.top),h=e.offsetX-(a.left-s.left);return e.changedTouches&&(h=e.changedTouches[0].pageX-a.left,c=e.changedTouches[0].pageY+a.top,$t&&(h-=t.x,c-=t.y)),n.y=1-Math.max(0,Math.min(1,c/l)),n.x=Math.max(0,Math.min(1,h/o)),n}function o0(r){return Gi(r)&&r.nodeType===3}function $a(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function l0(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),_r(e)||o0(e))return e;if(typeof e=="string"&&/\S/.test(e))return ve.createTextNode(e)}).filter(e=>e)}function Hl(r,e){return l0(e).forEach(t=>r.appendChild(t)),r}function u0(r,e){return Hl($a(r),e)}function ls(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 Tn=t0("querySelector"),c0=t0("querySelectorAll");function pr(r,e){if(!r||!e)return"";if(typeof W.getComputedStyle=="function"){let t;try{t=W.getComputedStyle(r)}catch{return""}return t?t.getPropertyValue(e)||t[e]:""}return""}function d0(r){[...ve.styleSheets].forEach(e=>{try{const t=[...e.cssRules].map(s=>s.cssText).join(""),n=ve.createElement("style");n.textContent=t,r.document.head.appendChild(n)}catch{const n=ve.createElement("link");n.rel="stylesheet",n.type=e.type,n.media=e.media.mediaText,n.href=e.href,r.document.head.appendChild(n)}})}var h0=Object.freeze({__proto__:null,isReal:vr,isEl:_r,isInFrame:e0,createEl:Re,textContent:bn,prependTo:ll,hasClass:Jr,addClass:Ln,removeClass:Ra,toggleClass:i0,setAttributes:n0,getAttributes:fn,getAttribute:r0,setAttribute:hr,removeAttribute:Va,blockTextSelection:s0,unblockTextSelection:a0,getBoundingClientRect:fr,findPosition:os,getPointerPosition:Fa,isTextNode:o0,emptyEl:$a,normalizeContent:l0,appendContent:Hl,insertContent:u0,isSingleLeftClick:ls,$:Tn,$$:c0,computedStyle:pr,copyStyleSheetsToWindow:d0});let f0=!1,ul;const j8=function(){if(ul.options.autoSetup===!1)return;const r=Array.prototype.slice.call(ve.getElementsByTagName("video")),e=Array.prototype.slice.call(ve.getElementsByTagName("audio")),t=Array.prototype.slice.call(ve.getElementsByTagName("video-js")),n=r.concat(e,t);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&&ul(o);else{cl(1);break}}else f0||cl(1)};function cl(r,e){vr()&&(e&&(ul=e),W.setTimeout(j8,r))}function dl(){f0=!0,W.removeEventListener("load",dl)}vr()&&(ve.readyState==="complete"?dl():W.addEventListener("load",dl));const p0=function(r){const e=ve.createElement("style");return e.className=r,e},m0=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var Zt=new WeakMap;const z8=3;let G8=z8;function yi(){return G8++}function vd(r,e){if(!Zt.has(r))return;const t=Zt.get(r);t.handlers[e].length===0&&(delete t.handlers[e],r.removeEventListener?r.removeEventListener(e,t.dispatcher,!1):r.detachEvent&&r.detachEvent("on"+e,t.dispatcher)),Object.getOwnPropertyNames(t.handlers).length<=0&&(delete t.handlers,delete t.dispatcher,delete t.disabled),Object.getOwnPropertyNames(t).length===0&&Zt.delete(r)}function jl(r,e,t,n){t.forEach(function(s){r(e,s,n)})}function Ua(r){if(r.fixed_)return r;function e(){return!0}function t(){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||ve),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=t,r.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=t,r.clientX!==null&&r.clientX!==void 0){const a=ve.documentElement,o=ve.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 js;const W8=function(){if(typeof js!="boolean"){js=!1;try{const r=Object.defineProperty({},"passive",{get(){js=!0}});W.addEventListener("test",null,r),W.removeEventListener("test",null,r)}catch{}}return js},Y8=["touchstart","touchmove"];function hi(r,e,t){if(Array.isArray(e))return jl(hi,r,e,t);Zt.has(r)||Zt.set(r,{});const n=Zt.get(r);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),t.guid||(t.guid=yi()),n.handlers[e].push(t),n.dispatcher||(n.disabled=!1,n.dispatcher=function(s,a){if(n.disabled)return;s=Ua(s);const o=n.handlers[s.type];if(o){const l=o.slice(0);for(let c=0,h=l.length;c<h&&!s.isImmediatePropagationStopped();c++)try{l[c].call(r,s,a)}catch(m){We.error(m)}}}),n.handlers[e].length===1)if(r.addEventListener){let s=!1;W8()&&Y8.indexOf(e)>-1&&(s={passive:!0}),r.addEventListener(e,n.dispatcher,s)}else r.attachEvent&&r.attachEvent("on"+e,n.dispatcher)}function Ut(r,e,t){if(!Zt.has(r))return;const n=Zt.get(r);if(!n.handlers)return;if(Array.isArray(e))return jl(Ut,r,e,t);const s=function(o,l){n.handlers[l]=[],vd(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(!t){s(r,e);return}if(t.guid)for(let o=0;o<a.length;o++)a[o].guid===t.guid&&a.splice(o--,1);vd(r,e)}}function yr(r,e,t){const n=Zt.has(r)?Zt.get(r):{},s=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=Ua(e),n.dispatcher&&n.dispatcher.call(r,e,t),s&&!e.isPropagationStopped()&&e.bubbles===!0)yr.call(null,s,e,t);else if(!s&&!e.defaultPrevented&&e.target&&e.target[e.type]){Zt.has(e.target)||Zt.set(e.target,{});const a=Zt.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 qa(r,e,t){if(Array.isArray(e))return jl(qa,r,e,t);const n=function(){Ut(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||yi(),hi(r,e,n)}function zl(r,e,t){const n=function(){Ut(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||yi(),hi(r,e,n)}var X8=Object.freeze({__proto__:null,fixEvent:Ua,on:hi,off:Ut,trigger:yr,one:qa,any:zl});const Ti=30,ut=function(r,e,t){e.guid||(e.guid=yi());const n=e.bind(r);return n.guid=t?t+"_"+e.guid:e.guid,n},Yi=function(r,e){let t=W.performance.now();return function(...s){const a=W.performance.now();a-t>=e&&(r(...s),t=a)}},g0=function(r,e,t,n=W){let s;const a=()=>{n.clearTimeout(s),s=null},o=function(){const l=this,c=arguments;let h=function(){s=null,h=null,t||r.apply(l,c)};!s&&t&&r.apply(l,c),n.clearTimeout(s),s=n.setTimeout(h,e)};return o.cancel=a,o};var K8=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Ti,bind_:ut,throttle:Yi,debounce:g0});let zr;class fi{on(e,t){const n=this.addEventListener;this.addEventListener=()=>{},hi(this,e,t),this.addEventListener=n}off(e,t){Ut(this,e,t)}one(e,t){const n=this.addEventListener;this.addEventListener=()=>{},qa(this,e,t),this.addEventListener=n}any(e,t){const n=this.addEventListener;this.addEventListener=()=>{},zl(this,e,t),this.addEventListener=n}trigger(e){const t=e.type||e;typeof e=="string"&&(e={type:t}),e=Ua(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),yr(this,e)}queueTrigger(e){zr||(zr=new Map);const t=e.type||e;let n=zr.get(this);n||(n=new Map,zr.set(this,n));const s=n.get(t);n.delete(t),W.clearTimeout(s);const a=W.setTimeout(()=>{n.delete(t),n.size===0&&(n=null,zr.delete(this)),this.trigger(e)},0);n.set(t,a)}}fi.prototype.allowedEvents_={};fi.prototype.addEventListener=fi.prototype.on;fi.prototype.removeEventListener=fi.prototype.off;fi.prototype.dispatchEvent=fi.prototype.trigger;const Ha=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,sn=r=>r instanceof fi||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),Q8=(r,e)=>{sn(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},hl=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,fa=(r,e,t)=>{if(!r||!r.nodeName&&!sn(r))throw new Error(`Invalid target for ${Ha(e)}#${t}; must be a DOM node or evented object.`)},v0=(r,e,t)=>{if(!hl(r))throw new Error(`Invalid event type for ${Ha(e)}#${t}; must be a non-empty string or array.`)},_0=(r,e,t)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${Ha(e)}#${t}; must be a function.`)},Vo=(r,e,t)=>{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]),fa(s,r,t),v0(a,r,t),_0(o,r,t),o=ut(r,o),{isTargetingSelf:n,target:s,type:a,listener:o}},wn=(r,e,t,n)=>{fa(r,r,e),r.nodeName?X8[e](r,t,n):r[e](t,n)},Z8={on(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Vo(this,r,"on");if(wn(t,"on",n,s),!e){const a=()=>this.off(t,n,s);a.guid=s.guid;const o=()=>this.off("dispose",a);o.guid=s.guid,wn(this,"on","dispose",a),wn(t,"on","dispose",o)}},one(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Vo(this,r,"one");if(e)wn(t,"one",n,s);else{const a=(...o)=>{this.off(t,n,a),s.apply(null,o)};a.guid=s.guid,wn(t,"one",n,a)}},any(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Vo(this,r,"any");if(e)wn(t,"any",n,s);else{const a=(...o)=>{this.off(t,n,a),s.apply(null,o)};a.guid=s.guid,wn(t,"any",n,a)}},off(r,e,t){if(!r||hl(r))Ut(this.eventBusEl_,r,e);else{const n=r,s=e;fa(n,this,"off"),v0(s,this,"off"),_0(t,this,"off"),t=ut(this,t),this.off("dispose",t),n.nodeName?(Ut(n,s,t),Ut(n,"dispose",t)):sn(n)&&(n.off(s,t),n.off("dispose",t))}},trigger(r,e){fa(this.eventBusEl_,this,"trigger");const t=r&&typeof r!="string"?r.type:r;if(!hl(t))throw new Error(`Invalid event type for ${Ha(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return yr(this.eventBusEl_,r,e)}};function Gl(r,e={}){const{eventBusKey:t}=e;if(t){if(!r[t].nodeName)throw new Error(`The eventBusKey "${t}" does not refer to an element.`);r.eventBusEl_=r[t]}else r.eventBusEl_=Re("span",{className:"vjs-event-bus"});return Object.assign(r,Z8),r.eventedCallbacks&&r.eventedCallbacks.forEach(n=>{n()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(n){n&&Zt.has(n)&&Zt.delete(n)}),W.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const J8={state:{},setState(r){typeof r=="function"&&(r=r());let e;return Zn(r,(t,n)=>{this.state[n]!==t&&(e=e||{},e[n]={from:this.state[n],to:t}),this.state[n]=t}),e&&sn(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function y0(r,e){return Object.assign(r,J8),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&sn(r)&&r.on("statechanged",r.handleStateChanged),r}const es=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},_t=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},T0=function(r,e){return _t(r)===_t(e)};var ex=Object.freeze({__proto__:null,toLowerCase:es,toTitleCase:_t,titleCaseEquals:T0});class ae{constructor(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=ot({},this.options_),t=this.options_=ot(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){const s=e&&e.id&&e.id()||"no_player";this.id_=`${s}_component_${yi()}`}this.name_=t.name||null,t.el?this.el_=t.el:t.createEl!==!1&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach(s=>this.addClass(s)),["on","off","one","any","trigger"].forEach(s=>{this[s]=void 0}),t.evented!==!1&&(Gl(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),y0(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,t.initChildren!==!1&&this.initChildren(),this.ready(n),t.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 t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=ot(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,n){return Re(e,t,n)}localize(e,t,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 h=n;return o&&o[e]?h=o[e]:c&&c[e]&&(h=c[e]),t&&(h=h.replace(/\{(\d+)\}/g,function(m,g){const k=t[g-1];let T=k;return typeof k>"u"&&(T=m),T})),h}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 t=this;for(let n=0;n<e.length;n++)if(t=t.getChild(e[n]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const n="http://www.w3.org/2000/svg",s=Re("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),a=ve.createElementNS(n,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const o=ve.createElementNS(n,"use");return a.appendChild(o),o.setAttributeNS(null,"href",`#vjs-icon-${e}`),s.appendChild(a),this.iconIsSet_?t.replaceChild(s,t.querySelector(".vjs-icon-placeholder")):t.appendChild(s),this.iconIsSet_=!0,s}addChild(e,t={},n=this.children_.length){let s,a;if(typeof e=="string"){a=_t(e);const o=t.componentClass||a;t.name=a;const l=ae.getComponent(o);if(!l)throw new Error(`Component ${o} does not exist`);if(typeof l!="function")return null;s=new l(this.player_||this,t)}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&&_t(s.name()),a&&(this.childNameIndex_[a]=s,this.childNameIndex_[es(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_:_r(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 t=!1;for(let s=this.children_.length-1;s>=0;s--)if(this.children_[s]===e){t=!0,this.children_.splice(s,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[_t(e.name())]=null,this.childNameIndex_[es(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 t=this.options_,n=o=>{const l=o.name;let c=o.opts;if(t[l]!==void 0&&(c=t[l]),c===!1)return;c===!0&&(c={}),c.playerOptions=this.options_.playerOptions;const h=this.addChild(l,c);h&&(this[l]=h)};let s;const a=ae.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=ae.getComponent(o.opts.componentClass||_t(o.name));return l&&!a.isTech(l)}).forEach(n)}}buildCSSClass(){return""}ready(e,t=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}t?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(t){t.call(this)},this),this.trigger("ready")},1)}$(e,t){return Tn(e,t||this.contentEl())}$$(e,t){return c0(e,t||this.contentEl())}hasClass(e){return Jr(this.el_,e)}addClass(...e){Ln(this.el_,...e)}removeClass(...e){Ra(this.el_,...e)}toggleClass(e,t){i0(this.el_,e,t)}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 r0(this.el_,e)}setAttribute(e,t){hr(this.el_,e,t)}removeAttribute(e){Va(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,n){if(t!==void 0){(t===null||t!==t)&&(t=0),(""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1?this.el_.style[e]=t:t==="auto"?this.el_.style[e]="":this.el_.style[e]=t+"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"+_t(e)],10)}currentDimension(e){let t=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(t=pr(this.el_,e),t=parseFloat(t),t===0||isNaN(t)){const n=`offset${_t(e)}`;t=this.el_[n]}return t}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(),t={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:t,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,t=null;const n=10,s=200;let a;this.on("touchstart",function(l){l.touches.length===1&&(t={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(t){const c=l.touches[0].pageX-t.pageX,h=l.touches[0].pageY-t.pageY;Math.sqrt(c*c+h*h)>n&&(a=!1)}});const o=function(){a=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(l){t=null,a===!0&&W.performance.now()-e<s&&(l.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=ut(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});const n=function(s){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}setTimeout(e,t){var n;return e=ut(this,e),this.clearTimersOnDispose_(),n=W.setTimeout(()=>{this.setTimeoutIds_.has(n)&&this.setTimeoutIds_.delete(n),e()},t),this.setTimeoutIds_.add(n),n}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),W.clearTimeout(e)),e}setInterval(e,t){e=ut(this,e),this.clearTimersOnDispose_();const n=W.setInterval(e,t);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 t;return e=ut(this,e),t=W.requestAnimationFrame(()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=ut(this,t);const n=this.requestAnimationFrame(()=>{t(),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,t])=>{this[e].forEach((n,s)=>this[t](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 t(a){const o=W.getComputedStyle(a,null),l=o.getPropertyValue("visibility");return o.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(l)}function n(a){return!(!t(a.parentElement)||!t(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>(ve.documentElement.clientWidth||W.innerWidth)||o.y<0||o.y>(ve.documentElement.clientHeight||W.innerHeight))return!1;let l=ve.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,t){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const n=ae.getComponent("Tech"),s=n&&n.isTech(t),a=ae===t||ae.prototype.isPrototypeOf(t.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=_t(e),ae.components_||(ae.components_={});const o=ae.getComponent("Player");if(e==="Player"&&o&&o.players){const l=o.players,c=Object.keys(l);if(l&&c.length>0){for(let h=0;h<c.length;h++)if(l[c[h]]!==null)throw new Error("Can not register Player component after player has been created.")}}return ae.components_[e]=t,ae.components_[es(e)]=t,t}static getComponent(e){if(!(!e||!ae.components_))return ae.components_[e]}}ae.registerComponent("Component",ae);function tx(r,e,t){if(typeof e!="number"||e<0||e>t)throw new Error(`Failed to execute '${r}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${t}).`)}function _d(r,e,t,n){return tx(r,n,t.length-1),t[n][e]}function Fo(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:_d.bind(null,"start",0,r),end:_d.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)?Fo(r):r===void 0||e===void 0?Fo():Fo([[r,e]])}const b0=function(r,e){r=r<0?0:r;let t=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=t="-"),s=s>0||o>0?s+":":"",n=((s||a>=10)&&n<10?"0"+n:n)+":",t=t<10?"0"+t:t,s+n+t};let Wl=b0;function x0(r){Wl=r}function C0(){Wl=b0}function Vn(r,e=r){return Wl(r,e)}var ix=Object.freeze({__proto__:null,createTimeRanges:Bi,createTimeRange:Bi,setFormatTime:x0,resetFormatTime:C0,formatTime:Vn});function E0(r,e){let t=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),t+=s-n;return t/e}function gt(r){if(r instanceof gt)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:Gi(r)&&(typeof r.code=="number"&&(this.code=r.code),Object.assign(this,r)),this.message||(this.message=gt.defaultMessages[this.code]||"")}gt.prototype.code=0;gt.prototype.message="";gt.prototype.status=null;gt.prototype.metadata=null;gt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];gt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};gt.MEDIA_ERR_CUSTOM=0;gt.prototype.MEDIA_ERR_CUSTOM=0;gt.MEDIA_ERR_ABORTED=1;gt.prototype.MEDIA_ERR_ABORTED=1;gt.MEDIA_ERR_NETWORK=2;gt.prototype.MEDIA_ERR_NETWORK=2;gt.MEDIA_ERR_DECODE=3;gt.prototype.MEDIA_ERR_DECODE=3;gt.MEDIA_ERR_SRC_NOT_SUPPORTED=4;gt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;gt.MEDIA_ERR_ENCRYPTED=5;gt.prototype.MEDIA_ERR_ENCRYPTED=5;function ts(r){return r!=null&&typeof r.then=="function"}function Ui(r){ts(r)&&r.then(null,e=>{})}const fl=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((t,n,s)=>(r[n]&&(t[n]=r[n]),t),{cues:r.cues&&Array.prototype.map.call(r.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},nx=function(r){const e=r.$$("track"),t=Array.prototype.map.call(e,s=>s.track);return Array.prototype.map.call(e,function(s){const a=fl(s.track);return s.src&&(a.src=s.src),a}).concat(Array.prototype.filter.call(r.textTracks(),function(s){return t.indexOf(s)===-1}).map(fl))},rx=function(r,e){return r.forEach(function(t){const n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(s=>n.addCue(s))}),e.textTracks()};var pl={textTracksToJson:nx,jsonToTextTracks:rx,trackToJson:fl};const $o="vjs-modal-dialog";class Tr extends ae{constructor(e,t){super(e,t),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_=Re("div",{className:`${$o}-content`},{role:"document"}),this.descEl_=Re("p",{className:`${$o}-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`${$o} 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 t=this.closeable_=!!e;let n=this.getChild("closeButton");if(t&&!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_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),n=t.parentNode,s=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),u0(t,e),this.trigger("modalfill"),s?n.insertBefore(t,s):n.appendChild(t);const a=this.getChild("closeButton");a&&n.appendChild(a.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),$a(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=ve.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===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 t=this.focusableEls_(),n=this.el_.querySelector(":focus");let s;for(let a=0;a<t.length;a++)if(n===t[a]){s=a;break}ve.activeElement===this.el_&&(s=0),e.shiftKey&&s===0?(t[t.length-1].focus(),e.preventDefault()):!e.shiftKey&&s===t.length-1&&(t[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,t=>(t instanceof W.HTMLAnchorElement||t instanceof W.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof W.HTMLInputElement||t instanceof W.HTMLSelectElement||t instanceof W.HTMLTextAreaElement||t instanceof W.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof W.HTMLIFrameElement||t instanceof W.HTMLObjectElement||t instanceof W.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable"))}}Tr.prototype.options_={pauseOnOpen:!0,temporary:!0};ae.registerComponent("ModalDialog",Tr);class Fn extends fi{constructor(e=[]){super(),this.tracks_=[];for(let t=0;t<e.length;t++)this.addTrack(e[t])}get length(){return this.tracks_.length}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),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})},sn(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){t=this[n],t.off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){t=a;break}}return t}}Fn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const r in Fn.prototype.allowedEvents_)Fn.prototype["on"+r]=null;const Uo=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].enabled=!1)};class S0 extends Fn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Uo(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Uo(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Uo(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 qo=function(r,e){for(let t=0;t<r.length;t++)!Object.keys(r[t]).length||e.id===r[t].id||(r[t].selected=!1)};class k0 extends Fn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){qo(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set(){}})}addTrack(e){e.selected&&qo(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,qo(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 Yl 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 sx{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let n=0,s=this.trackElements_.length;n<s;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t}removeTrackElement_(e){for(let t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&typeof this.trackElements_[t].track.off=="function"&&this.trackElements_[t].track.off(),typeof this.trackElements_[t].off=="function"&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}}}class pa{constructor(e){pa.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=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(t<s)for(n=t;n<s;n++)a.call(this,n)}getCueById(e){let t=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){t=a;break}}return t}}const ax={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ox={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},lx={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},yd={disabled:"disabled",hidden:"hidden",showing:"showing"};class Xl extends fi{constructor(e={}){super();const t={id:e.id||"vjs_track_"+yi(),kind:e.kind||"",language:e.language||""};let n=e.label||"";for(const s in t)Object.defineProperty(this,s,{get(){return t[s]},set(){}});Object.defineProperty(this,"label",{get(){return n},set(s){s!==n&&(n=s,this.trigger("labelchange"))}})}}const Kl=function(r){return new URL(r,ve.baseURI)},w0=function(r){return new URL(r,ve.baseURI).href},Ql=function(r){if(typeof r=="string"){const t=r.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return t?t[1].toLowerCase():""}return""},ja=function(r,e=W.location){return Kl(r).origin!==e.origin};var ux=Object.freeze({__proto__:null,parseUrl:Kl,getAbsoluteURL:w0,getFileExtension:Ql,isCrossOrigin:ja});const Td=function(r,e){const t=new W.WebVTT.Parser(W,W.vttjs,W.WebVTT.StringDecoder()),n=[];t.oncue=function(s){e.addCue(s)},t.onparsingerror=function(s){n.push(s)},t.onflush=function(){e.trigger({type:"loadeddata",target:e})},t.parse(r),n.length>0&&(W.console&&W.console.groupCollapsed&&W.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),n.forEach(s=>We.error(s)),W.console&&W.console.groupEnd&&W.console.groupEnd()),t.flush()},bd=function(r,e){const t={uri:r},n=ja(r);n&&(t.cors=n);const s=e.tech_.crossOrigin()==="use-credentials";s&&(t.withCredentials=s),Ah(t,ut(this,function(a,o,l){if(a)return We.error(a,o);e.loaded_=!0,typeof W.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],c=>{if(c.type==="vttjserror"){We.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return Td(l,e)}):Td(l,e)}))};class ds extends Xl{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=ot(e,{kind:lx[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=yd[t.mode]||"disabled";const s=t.default;(t.kind==="metadata"||t.kind==="chapters")&&(n="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const a=new pa(this.cues_),o=new pa(this.activeCues_);let l=!1;this.timeupdateHandler=ut(this,function(h={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){h.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),h.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(h){yd[h]&&n!==h&&(n=h,!this.preload_&&n!=="disabled"&&this.cues.length===0&&bd(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 h=this.tech_.currentTime(),m=[];for(let g=0,k=this.cues.length;g<k;g++){const T=this.cues[g];T.startTime<=h&&T.endTime>=h&&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(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||t.kind!=="subtitles"&&t.kind!=="captions")&&bd(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 t=e;if(!("getCueAsHTML"in t)){t=new W.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const s in e)s in t||(t[s]=e[s]);t.id=e.id,t.originalCue_=e}const n=this.tech_.textTracks();for(let s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return pl.trackToJson(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}ds.prototype.allowedEvents_={cuechange:"cuechange"};class D0 extends Xl{constructor(e={}){const t=ot(e,{kind:ox[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"enabled",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class A0 extends Xl{constructor(e={}){const t=ot(e,{kind:ax[e.kind]||""});super(t);let n=!1;Object.defineProperty(this,"selected",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class an extends fi{constructor(e={}){super();let t;const n=new ds(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 t}},track:{get(){return n}}}),t=an.NONE,n.addEventListener("loadeddata",()=>{t=an.LOADED,this.trigger({type:"load",target:this})})}}an.prototype.allowedEvents_={load:"load"};an.NONE=0;an.LOADING=1;an.LOADED=2;an.ERROR=3;const gi={audio:{ListClass:S0,TrackClass:D0,capitalName:"Audio"},video:{ListClass:k0,TrackClass:A0,capitalName:"Video"},text:{ListClass:Yl,TrackClass:ds,capitalName:"Text"}};Object.keys(gi).forEach(function(r){gi[r].getterName=`${r}Tracks`,gi[r].privateName=`${r}Tracks_`});const mr={remoteText:{ListClass:Yl,TrackClass:ds,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:sx,TrackClass:an,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Qt=Object.assign({},gi,mr);mr.names=Object.keys(mr);gi.names=Object.keys(gi);Qt.names=[].concat(mr.names).concat(gi.names);function cx(r,e,t,n,s={}){const a=r.textTracks();s.kind=e,t&&(s.label=t),n&&(s.language=n),s.tech=r;const o=new Qt.text.TrackClass(s);return a.addTrack(o),o}class Ue extends ae{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),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}),Qt.names.forEach(n=>{const s=Qt[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 Qt.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ut(this,function(){const t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,t===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Bi(0,0)}bufferedPercent(){return E0(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(gi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(t=>{const n=this[`${t}Tracks`]()||[];let s=n.length;for(;s--;){const a=n[s];t==="text"&&this.removeRemoteTextTrack(a),n.removeTrack(a)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const n=e[t];this.removeRemoteTextTrack(n)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new gt(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(){gi.names.forEach(e=>{const t=gi[e],n=()=>{this.trigger(`${e}trackchange`)},s=this[t.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(ve.body.contains(this.el())){if(!this.options_["vtt.js"]&&dr(zc)&&Object.keys(zc).length>0){this.trigger("vttjsloaded");return}const e=ve.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(),t=this.remoteTextTracks(),n=l=>e.addTrack(l.track),s=l=>e.removeTrack(l.track);t.on("addtrack",n),t.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(){t.off("addtrack",n),t.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,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return cx(this,e,t,n)}createRemoteTextTrack(e){const t=ot(e,{tech:this});return new mr.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const n=this.createRemoteTextTrack(e);return typeof t!="boolean"&&(t=!1),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),t===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(n.track)),n}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=yi();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())})):this.requestNamedAnimationFrame(t,e),t}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,t){return Ue.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Ue||e instanceof Ue||e===Ue}static registerTech(e,t){if(Ue.techs_||(Ue.techs_={}),!Ue.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!Ue.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Ue.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=_t(e),Ue.techs_[e]=t,Ue.techs_[es(e)]=t,e!=="Tech"&&Ue.defaultTechOrder_.push(e),t}static getTech(e){if(e){if(Ue.techs_&&Ue.techs_[e])return Ue.techs_[e];if(e=_t(e),W&&W.videojs&&W.videojs[e])return We.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),W.videojs[e]}}}Qt.names.forEach(function(r){const e=Qt[r];Ue.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});Ue.prototype.featuresVolumeControl=!0;Ue.prototype.featuresMuteControl=!0;Ue.prototype.featuresFullscreenResize=!1;Ue.prototype.featuresPlaybackRate=!1;Ue.prototype.featuresProgressEvents=!1;Ue.prototype.featuresSourceset=!1;Ue.prototype.featuresTimeupdateEvents=!1;Ue.prototype.featuresNativeTextTracks=!1;Ue.prototype.featuresVideoFrameCallback=!1;Ue.withSourceHandlers=function(r){r.registerSourceHandler=function(t,n){let s=r.sourceHandlers;s||(s=r.sourceHandlers=[]),n===void 0&&(n=s.length),s.splice(n,0,t)},r.canPlayType=function(t){const n=r.sourceHandlers||[];let s;for(let a=0;a<n.length;a++)if(s=n[a].canPlayType(t),s)return s;return""},r.selectSourceHandler=function(t,n){const s=r.sourceHandlers||[];let a;for(let o=0;o<s.length;o++)if(a=s[o].canHandleSource(t,n),a)return s[o];return null},r.canPlaySource=function(t,n){const s=r.selectSourceHandler(t,n);return s?s.canHandleSource(t,n):""},["seekable","seeking","duration"].forEach(function(t){const n=this[t];typeof n=="function"&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):n.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(t){let n=r.selectSourceHandler(t,this.options_);n||(r.nativeSourceHandler?n=r.nativeSourceHandler:We.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==r.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,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)}};ae.registerComponent("Tech",Ue);Ue.registerTech("Tech",Ue);Ue.defaultTechOrder_=[];const Mn={},ma={},ga={};function dx(r,e){Mn[r]=Mn[r]||[],Mn[r].push(e)}function hx(r,e,t){r.setTimeout(()=>Dn(e,Mn[e.type],t,r),1)}function fx(r,e){r.forEach(t=>t.setTech&&t.setTech(e))}function px(r,e,t){return r.reduceRight(Zl(t),e[t]())}function mx(r,e,t,n){return e[t](r.reduce(Zl(t),n))}function xd(r,e,t,n=null){const s="call"+_t(t),a=r.reduce(Zl(s),n),o=a===ga,l=o?null:e[t](a);return _x(r,t,l,o),l}const gx={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},vx={setCurrentTime:1,setMuted:1,setVolume:1},Cd={play:1,pause:1};function Zl(r){return(e,t)=>e===ga?ga:t[r]?t[r](e):e}function _x(r,e,t,n){for(let s=r.length-1;s>=0;s--){const a=r[s];a[e]&&a[e](n,t)}}function yx(r){ma.hasOwnProperty(r.id())&&delete ma[r.id()]}function Tx(r,e){const t=ma[r.id()];let n=null;if(t==null)return n=e(r),ma[r.id()]=[[e,n]],n;for(let s=0;s<t.length;s++){const[a,o]=t[s];a===e&&(n=o)}return n===null&&(n=e(r),t.push([e,n])),n}function Dn(r={},e=[],t,n,s=[],a=!1){const[o,...l]=e;if(typeof o=="string")Dn(r,Mn[o],t,n,s,a);else if(o){const c=Tx(n,o);if(!c.setSource)return s.push(c),Dn(r,l,t,n,s,a);c.setSource(Object.assign({},r),function(h,m){if(h)return Dn(r,l,t,n,s,a);s.push(c),Dn(m,r.type===m.type?l:Mn[m.type],t,n,s,a)})}else l.length?Dn(r,l,t,n,s,a):a?t(r,s):Dn(r,Mn["*"],t,n,s,!0)}const bx={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},va=function(r=""){const e=Ql(r);return bx[e.toLowerCase()]||""},xx=(r,e)=>{if(!e)return"";if(r.cache_.source.src===e&&r.cache_.source.type)return r.cache_.source.type;const t=r.cache_.sources.filter(s=>s.src===e);if(t.length)return t[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 va(e)},N0=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(t){t=N0(t),Array.isArray(t)?e=e.concat(t):Gi(t)&&e.push(t)}),r=e}else typeof r=="string"&&r.trim()?r=[Ed({src:r})]:Gi(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[Ed(r)]:r=[];return r};function Ed(r){if(!r.type){const e=va(r.src);e&&(r.type=e)}return r}var Cx=`<svg xmlns="http://www.w3.org/2000/svg">
38
38
  <defs>
39
39
  <symbol viewBox="0 0 48 48" id="vjs-icon-play">
40
40
  <path d="M16 10v28l22-14z"></path>
@@ -188,7 +188,7 @@ This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNati
188
188
  }
189
189
  `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const n=_t(e),s=e.charAt(0).toLowerCase()+e.slice(1);n!=="Html5"&&this.tag&&(Ue.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:t,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};Qt.names.forEach(c=>{const h=Qt[c];o[h.getterName]=this[h.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),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);const l=Ue.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(ut(this,this.handleTechReady_),!0),pl.jsonToTextTracks(this.textTracksJson_||[],this.tech_),of.forEach(c=>{this.on(this.tech_,c,h=>this[`handleTech${_t(c)}_`](h))}),Object.keys(Yo).forEach(c=>{this.on(this.tech_,c,h=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${Yo[c]}_`].bind(this),event:h});return}this[`handleTech${Yo[c]}_`](h)})}),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,h)=>this.handleTechFullscreenChange_(c,h)),this.on(this.tech_,"fullscreenerror",(c,h)=>this.handleTechFullscreenError_(c,h)),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)&&ll(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Qt.names.forEach(e=>{const t=Qt[e];this[t.privateName]=this[t.getterName]()}),this.textTracksJson_=pl.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&&We.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
190
190
  See https://github.com/videojs/video.js/issues/2617 for more info.
191
- `),this.tech_}version(){return{"video.js":al}}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 t=()=>{const s=this.muted();this.muted(!0);const a=()=>{this.muted(s)};this.playTerminatedQueue_.push(a);const o=this.play();if(ts(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(),ts(n)&&(n=n.catch(t))):e==="muted"&&!this.muted()?n=t():n=this.play(),!!ts(n))return n.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let t=e,n="";typeof t!="string"&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=xx(this,t)),this.cache_.source=ot({},e,{src:t,type:n});const s=this.cache_.sources.filter(c=>c.src&&c.src===t),a=[],o=this.$$("source"),l=[];for(let c=0;c<o.length;c++){const h=fn(o[c]);a.push(h),h.src&&h.src===t&&l.push(h.src)}l.length&&!s.length?this.cache_.sources=a:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=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)&&(t=()=>{}),t(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(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}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()&&!ve.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 t=e.target.player;if(t&&t!==this)return;const n=this.el();let s=ve[this.fsApi_.fullscreenElement]===n;!s&&n.matches&&(s=n.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}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,t){this.ready(function(){if(e in vx)return mx(this.middleware_,this.tech_,e,t);if(e in Cd)return xd(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw We(n),n}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in gx)return px(this.middleware_,this.tech_,e);if(e in Cd)return xd(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){throw this.tech_[e]===void 0?(We(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t):t.name==="TypeError"?(We(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t):(We(t),t)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Ui){this.playCallbacks_.push(e);const t=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),n=!!(Pa||$t);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t){this.waitToPlay_=o=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!t&&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(t){t()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.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 E0(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let n=e.end(e.length-1);return n>t&&(n=t),n}volume(e){let t;if(e!==void 0){t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),t>0&&this.lastVolume_(t);return}return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t}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 t=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((n,s)=>{function a(){t.off("fullscreenerror",l),t.off("fullscreenchange",o)}function o(){a(),n()}function l(h,m){a(),s(m)}t.one("fullscreenchange",o),t.one("fullscreenerror",l);const c=t.requestFullscreenHelper_(e);c&&(c.then(a,a),c.then(n,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(t=e)),this.fsApi_.requestFullscreen){const n=this.el_[this.fsApi_.requestFullscreen](t);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((t,n)=>{function s(){e.off("fullscreenerror",o),e.off("fullscreenchange",a)}function a(){s(),t()}function o(c,h){s(),n(h)}e.one("fullscreenchange",a),e.one("fullscreenerror",o);const l=e.exitFullscreenHelper_();l&&(l.then(s,s),l.then(t,n))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=ve[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=ve.documentElement.style.overflow,hi(ve,"keydown",this.boundFullWindowOnEscKey_),ve.documentElement.style.overflow="hidden",Ln(ve.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,Ut(ve,"keydown",this.boundFullWindowOnEscKey_),ve.documentElement.style.overflow=this.docOrigOverflow,Ra(ve.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=ve.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(Re("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),W.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(d0(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",n=>{const s=n.target.querySelector(".video-js");e.parentNode.replaceChild(s,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),t))}return"pictureInPictureEnabled"in ve&&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 ve)return ve.exitPictureInPicture()}handleKeyDown(e){const{userActions:t}=this.options_;!t||!t.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 t.hotkeys=="function"?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=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()===" "}=t;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();const o=ae.getComponent("FullscreenToggle");ve[this.fsApi_.fullscreenEnabled]!==!1&&o.prototype.handleClick.call(this,e)}else s.call(this,e)?(e.preventDefault(),e.stopPropagation(),ae.getComponent("MuteToggle").prototype.handleClick.call(this,e)):a.call(this,e)&&(e.preventDefault(),e.stopPropagation(),ae.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let t;for(let n=0,s=this.options_.techOrder;n<s.length;n++){const a=s[n];let o=Ue.getTech(a);if(o||(o=ae.getComponent(a)),!o){We.error(`The "${a}" tech is undefined. Skipped browser support check for that tech.`);continue}if(o.isSupported()&&(t=o.canPlayType(e),t))return t}return""}selectSource(e){const t=this.options_.techOrder.map(l=>[l,Ue.getTech(l)]).filter(([l,c])=>c?c.isSupported():(We.error(`The "${l}" tech is undefined. Skipped browser support check for that tech.`),!1)),n=function(l,c,h){let m;return l.some(g=>c.some(k=>{if(m=h(g,k),m)return!0})),m};let s;const a=l=>(c,h)=>l(h,c),o=([l,c],h)=>{if(c.canPlaySource(h,this.options_[l.toLowerCase()]))return{source:h,tech:l}};return this.options_.sourceOrder?s=n(e,t,a(o)):s=n(t,e,o),s||!1}handleSrc_(e,t){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const n=N0(e);if(!n.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,t||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),hx(this,n[0],(s,a)=>{if(this.middleware_=a,t||(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}fx(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 t=this.selectSource([e]);return t?T0(t.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_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,t){return this.tech_?this.tech_.addSourceElement(e,t):!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}),sn(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:n,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:a}=n||{};e&&e.updateContent(),t&&t.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(),t=[];return Object.keys(e).length!==0&&t.push(e),this.cache_.sources||t}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 t;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),t=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,t=typeof t>"u"?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}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(t=>{const n=t(this,e);if(!(Gi(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 t=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),this.one("loadstart",function(){this.off(["click","touchstart"],t)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new mt(e),this.addClass("vjs-error"),We.error(`(CODE:${this.error_.code} ${mt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),yn("error").forEach(t=>t(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(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,n;const s=ut(this,this.reportUserActivity),a=function(g){(g.screenX!==t||g.screenY!==n)&&(t=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&&!$t&&!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 h;const m=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(h);const g=this.options_.inactivityTimeout;g<=0||(h=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(),t=this.getChild("ControlBar"),n=t&&t.currentHeight();e.forEach(s=>{s!==t&&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 t=[];return this.isInPictureInPicture()&&t.push(this.exitPictureInPicture()),this.isFullscreen()&&t.push(this.exitFullscreen()),this.audioPosterMode()&&t.push(this.audioPosterMode(!1)),Promise.all(t).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,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}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(),sn(this)&&this.trigger("languagechange"))}languages(){return ot(rt.prototype.options_.languages,this.languages_)}toJSON(){const e=ot(this.options_),t=e.tracks;e.tracks=[];for(let n=0;n<t.length;n++){let s=t[n];s=ot(s),s.player=void 0,e.tracks[n]=s}return e}createModal(e,t){t=t||{},t.content=e||"";const n=new Tr(this,t);return this.addChild(n),n.on("dispose",()=>{this.removeChild(n)}),n.open(),n}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let n=0;n<vl.length;n++){const s=vl[n],a=this.breakpoints_[s];if(t<=a){if(e===s)return;e&&this.removeClass(ea[e]),this.addClass(ea[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({},eC,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const t=this.responsive_;if(e!==t)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 ea[this.breakpoint_]||""}loadMedia(e,t){if(!e||typeof e!="object")return;const n=this.crossOrigin();this.reset(),this.cache_.media=ot(e);const{artist:s,artwork:a,description:o,poster:l,src:c,textTracks:h,title:m}=this.cache_.media;!a&&l&&(this.cache_.media.artwork=[{src:l,type:va(l)}]),n&&this.crossOrigin(n),c&&this.src(c),l&&this.poster(l),Array.isArray(h)&&h.forEach(g=>this.addRemoteTextTrack(g,!1)),this.titleBar&&this.titleBar.update({title:m,description:o||s||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t=this.currentSources(),n=Array.prototype.map.call(this.remoteTextTracks(),a=>({kind:a.kind,label:a.label,language:a.language,src:a.src})),s={src:t,textTracks:n};return e&&(s.poster=e,s.artwork=[{src:s.poster,type:va(s.poster)}]),s}return ot(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},n=fn(e),s=n["data-setup"];if(Jr(e,"vjs-fill")&&(n.fill=!0),Jr(e,"vjs-fluid")&&(n.fluid=!0),s!==null)try{Object.assign(n,JSON.parse(s||"{}"))}catch(a){We.error("data-setup",a)}if(Object.assign(t,n),e.hasChildNodes()){const a=e.childNodes;for(let o=0,l=a.length;o<l;o++){const c=a[o],h=c.nodeName.toLowerCase();h==="source"?t.sources.push(fn(c)):h==="track"&&t.tracks.push(fn(c))}}return t}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(t=>typeof t=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}rt.prototype.videoTracks=()=>{};rt.prototype.audioTracks=()=>{};rt.prototype.textTracks=()=>{};rt.prototype.remoteTextTracks=()=>{};rt.prototype.remoteTextTrackEls=()=>{};Qt.names.forEach(function(r){const e=Qt[r];rt.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});rt.prototype.crossorigin=rt.prototype.crossOrigin;rt.players={};const Gr=W.navigator;rt.prototype.options_={techOrder:Ue.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Gr&&(Gr.languages&&Gr.languages[0]||Gr.userLanguage||Gr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1};of.forEach(function(r){rt.prototype[`handleTech${_t(r)}_`]=function(){return this.trigger(r)}});ae.registerComponent("Player",rt);const _a="plugin",tr="activePlugins_",Yn={},ya=r=>Yn.hasOwnProperty(r),ta=r=>ya(r)?Yn[r]:void 0,lf=(r,e)=>{r[tr]=r[tr]||{},r[tr][e]=!0},Ta=(r,e,t)=>{const n=(t?"before":"")+"pluginsetup";r.trigger(n,e),r.trigger(n+":"+e.name,e)},tC=function(r,e){const t=function(){Ta(this,{name:r,plugin:e,instance:null},!0);const n=e.apply(this,arguments);return lf(this,r),Ta(this,{name:r,plugin:e,instance:n}),n};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t},Fd=(r,e)=>(e.prototype.name=r,function(...t){Ta(this,{name:r,plugin:e,instance:null},!0);const n=new e(this,...t);return this[r]=()=>n,Ta(this,n.getEventHash()),n});class oi{constructor(e){if(this.constructor===oi)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Gl(this),delete this.trigger,y0(this,this.constructor.defaultState),lf(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,t={}){return yr(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[tr][e]=!1,this.player=this.state=null,t[e]=Fd(e,Yn[e])}static isBasic(e){const t=typeof e=="string"?ta(e):e;return typeof t=="function"&&!oi.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(ya(e))We.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(rt.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof t!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return Yn[e]=t,e!==_a&&(oi.isBasic(t)?rt.prototype[e]=tC(e,t):rt.prototype[e]=Fd(e,t)),t}static deregisterPlugin(e){if(e===_a)throw new Error("Cannot de-register base plugin.");ya(e)&&(delete Yn[e],delete rt.prototype[e])}static getPlugins(e=Object.keys(Yn)){let t;return e.forEach(n=>{const s=ta(n);s&&(t=t||{},t[n]=s)}),t}static getPluginVersion(e){const t=ta(e);return t&&t.VERSION||""}}oi.getPlugin=ta;oi.BASE_PLUGIN_NAME=_a;oi.registerPlugin(_a,oi);rt.prototype.usingPlugin=function(r){return!!this[tr]&&this[tr][r]===!0};rt.prototype.hasPlugin=function(r){return!!ya(r)};function iC(r,e){let t=!1;return function(...n){return t||We.warn(r),t=!0,e.apply(this,n)}}function Mi(r,e,t,n){return iC(`${e} is deprecated and will be removed in ${r}.0; please use ${t} instead.`,n)}var nC={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const uf=r=>r.indexOf("#")===0?r.slice(1):r;function ie(r,e,t){let n=ie.getPlayer(r);if(n)return e&&We.warn(`Player "${r}" is already initialised. Options will not be applied.`),t&&n.ready(t),n;const s=typeof r=="string"?Tn("#"+uf(r)):r;if(!_r(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))&&We.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 h=c(s,ot(e));if(!Gi(h)||Array.isArray(h)){We.error("please return an object in beforesetup hooks");return}e=ot(e,h)});const l=ae.getComponent("Player");return n=new l(s,e,t),yn("setup").forEach(c=>c(n)),n}ie.hooks_=tn;ie.hooks=yn;ie.hook=R8;ie.hookOnce=V8;ie.removeHook=jh;if(W.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&vr()){let r=Tn(".vjs-styles-defaults");if(!r){r=p0("vjs-styles-defaults");const e=Tn("head");e&&e.insertBefore(r,e.firstChild),m0(r,`
191
+ `),this.tech_}version(){return{"video.js":al}}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 t=()=>{const s=this.muted();this.muted(!0);const a=()=>{this.muted(s)};this.playTerminatedQueue_.push(a);const o=this.play();if(ts(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(),ts(n)&&(n=n.catch(t))):e==="muted"&&!this.muted()?n=t():n=this.play(),!!ts(n))return n.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let t=e,n="";typeof t!="string"&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=xx(this,t)),this.cache_.source=ot({},e,{src:t,type:n});const s=this.cache_.sources.filter(c=>c.src&&c.src===t),a=[],o=this.$$("source"),l=[];for(let c=0;c<o.length;c++){const h=fn(o[c]);a.push(h),h.src&&h.src===t&&l.push(h.src)}l.length&&!s.length?this.cache_.sources=a:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=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)&&(t=()=>{}),t(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(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}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()&&!ve.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 t=e.target.player;if(t&&t!==this)return;const n=this.el();let s=ve[this.fsApi_.fullscreenElement]===n;!s&&n.matches&&(s=n.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}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,t){this.ready(function(){if(e in vx)return mx(this.middleware_,this.tech_,e,t);if(e in Cd)return xd(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(n){throw We(n),n}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in gx)return px(this.middleware_,this.tech_,e);if(e in Cd)return xd(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){throw this.tech_[e]===void 0?(We(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t):t.name==="TypeError"?(We(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t):(We(t),t)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Ui){this.playCallbacks_.push(e);const t=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),n=!!(Pa||$t);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t){this.waitToPlay_=o=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!t&&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(t){t()})}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.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 E0(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let n=e.end(e.length-1);return n>t&&(n=t),n}volume(e){let t;if(e!==void 0){t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),t>0&&this.lastVolume_(t);return}return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t}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 t=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise((n,s)=>{function a(){t.off("fullscreenerror",l),t.off("fullscreenchange",o)}function o(){a(),n()}function l(h,m){a(),s(m)}t.one("fullscreenchange",o),t.one("fullscreenerror",l);const c=t.requestFullscreenHelper_(e);c&&(c.then(a,a),c.then(n,s))})}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(t=e)),this.fsApi_.requestFullscreen){const n=this.el_[this.fsApi_.requestFullscreen](t);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((t,n)=>{function s(){e.off("fullscreenerror",o),e.off("fullscreenchange",a)}function a(){s(),t()}function o(c,h){s(),n(h)}e.one("fullscreenchange",a),e.one("fullscreenerror",o);const l=e.exitFullscreenHelper_();l&&(l.then(s,s),l.then(t,n))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=ve[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=ve.documentElement.style.overflow,hi(ve,"keydown",this.boundFullWindowOnEscKey_),ve.documentElement.style.overflow="hidden",Ln(ve.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,Ut(ve,"keydown",this.boundFullWindowOnEscKey_),ve.documentElement.style.overflow=this.docOrigOverflow,Ra(ve.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=ve.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(Re("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),W.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(t=>(d0(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",n=>{const s=n.target.querySelector(".video-js");e.parentNode.replaceChild(s,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),t))}return"pictureInPictureEnabled"in ve&&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 ve)return ve.exitPictureInPicture()}handleKeyDown(e){const{userActions:t}=this.options_;!t||!t.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 t.hotkeys=="function"?t.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const t=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()===" "}=t;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();const o=ae.getComponent("FullscreenToggle");ve[this.fsApi_.fullscreenEnabled]!==!1&&o.prototype.handleClick.call(this,e)}else s.call(this,e)?(e.preventDefault(),e.stopPropagation(),ae.getComponent("MuteToggle").prototype.handleClick.call(this,e)):a.call(this,e)&&(e.preventDefault(),e.stopPropagation(),ae.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let t;for(let n=0,s=this.options_.techOrder;n<s.length;n++){const a=s[n];let o=Ue.getTech(a);if(o||(o=ae.getComponent(a)),!o){We.error(`The "${a}" tech is undefined. Skipped browser support check for that tech.`);continue}if(o.isSupported()&&(t=o.canPlayType(e),t))return t}return""}selectSource(e){const t=this.options_.techOrder.map(l=>[l,Ue.getTech(l)]).filter(([l,c])=>c?c.isSupported():(We.error(`The "${l}" tech is undefined. Skipped browser support check for that tech.`),!1)),n=function(l,c,h){let m;return l.some(g=>c.some(k=>{if(m=h(g,k),m)return!0})),m};let s;const a=l=>(c,h)=>l(h,c),o=([l,c],h)=>{if(c.canPlaySource(h,this.options_[l.toLowerCase()]))return{source:h,tech:l}};return this.options_.sourceOrder?s=n(e,t,a(o)):s=n(t,e,o),s||!1}handleSrc_(e,t){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const n=N0(e);if(!n.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,t||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),hx(this,n[0],(s,a)=>{if(this.middleware_=a,t||(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}fx(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 t=this.selectSource([e]);return t?T0(t.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_(t.tech,t.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,t){return this.tech_?this.tech_.addSourceElement(e,t):!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}),sn(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:n,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:a}=n||{};e&&e.updateContent(),t&&t.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(),t=[];return Object.keys(e).length!==0&&t.push(e),this.cache_.sources||t}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 t;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),t=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,t=typeof t>"u"?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}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(t=>{const n=t(this,e);if(!(Gi(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 t=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),this.one("loadstart",function(){this.off(["click","touchstart"],t)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new gt(e),this.addClass("vjs-error"),We.error(`(CODE:${this.error_.code} ${gt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),yn("error").forEach(t=>t(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(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,t,n;const s=ut(this,this.reportUserActivity),a=function(g){(g.screenX!==t||g.screenY!==n)&&(t=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&&!$t&&!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 h;const m=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(h);const g=this.options_.inactivityTimeout;g<=0||(h=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(),t=this.getChild("ControlBar"),n=t&&t.currentHeight();e.forEach(s=>{s!==t&&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 t=[];return this.isInPictureInPicture()&&t.push(this.exitPictureInPicture()),this.isFullscreen()&&t.push(this.exitFullscreen()),this.audioPosterMode()&&t.push(this.audioPosterMode(!1)),Promise.all(t).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,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}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(),sn(this)&&this.trigger("languagechange"))}languages(){return ot(rt.prototype.options_.languages,this.languages_)}toJSON(){const e=ot(this.options_),t=e.tracks;e.tracks=[];for(let n=0;n<t.length;n++){let s=t[n];s=ot(s),s.player=void 0,e.tracks[n]=s}return e}createModal(e,t){t=t||{},t.content=e||"";const n=new Tr(this,t);return this.addChild(n),n.on("dispose",()=>{this.removeChild(n)}),n.open(),n}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let n=0;n<vl.length;n++){const s=vl[n],a=this.breakpoints_[s];if(t<=a){if(e===s)return;e&&this.removeClass(ea[e]),this.addClass(ea[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({},eC,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const t=this.responsive_;if(e!==t)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 ea[this.breakpoint_]||""}loadMedia(e,t){if(!e||typeof e!="object")return;const n=this.crossOrigin();this.reset(),this.cache_.media=ot(e);const{artist:s,artwork:a,description:o,poster:l,src:c,textTracks:h,title:m}=this.cache_.media;!a&&l&&(this.cache_.media.artwork=[{src:l,type:va(l)}]),n&&this.crossOrigin(n),c&&this.src(c),l&&this.poster(l),Array.isArray(h)&&h.forEach(g=>this.addRemoteTextTrack(g,!1)),this.titleBar&&this.titleBar.update({title:m,description:o||s||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t=this.currentSources(),n=Array.prototype.map.call(this.remoteTextTracks(),a=>({kind:a.kind,label:a.label,language:a.language,src:a.src})),s={src:t,textTracks:n};return e&&(s.poster=e,s.artwork=[{src:s.poster,type:va(s.poster)}]),s}return ot(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},n=fn(e),s=n["data-setup"];if(Jr(e,"vjs-fill")&&(n.fill=!0),Jr(e,"vjs-fluid")&&(n.fluid=!0),s!==null)try{Object.assign(n,JSON.parse(s||"{}"))}catch(a){We.error("data-setup",a)}if(Object.assign(t,n),e.hasChildNodes()){const a=e.childNodes;for(let o=0,l=a.length;o<l;o++){const c=a[o],h=c.nodeName.toLowerCase();h==="source"?t.sources.push(fn(c)):h==="track"&&t.tracks.push(fn(c))}}return t}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(t=>typeof t=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}rt.prototype.videoTracks=()=>{};rt.prototype.audioTracks=()=>{};rt.prototype.textTracks=()=>{};rt.prototype.remoteTextTracks=()=>{};rt.prototype.remoteTextTrackEls=()=>{};Qt.names.forEach(function(r){const e=Qt[r];rt.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});rt.prototype.crossorigin=rt.prototype.crossOrigin;rt.players={};const Gr=W.navigator;rt.prototype.options_={techOrder:Ue.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Gr&&(Gr.languages&&Gr.languages[0]||Gr.userLanguage||Gr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1};of.forEach(function(r){rt.prototype[`handleTech${_t(r)}_`]=function(){return this.trigger(r)}});ae.registerComponent("Player",rt);const _a="plugin",tr="activePlugins_",Yn={},ya=r=>Yn.hasOwnProperty(r),ta=r=>ya(r)?Yn[r]:void 0,lf=(r,e)=>{r[tr]=r[tr]||{},r[tr][e]=!0},Ta=(r,e,t)=>{const n=(t?"before":"")+"pluginsetup";r.trigger(n,e),r.trigger(n+":"+e.name,e)},tC=function(r,e){const t=function(){Ta(this,{name:r,plugin:e,instance:null},!0);const n=e.apply(this,arguments);return lf(this,r),Ta(this,{name:r,plugin:e,instance:n}),n};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t},Fd=(r,e)=>(e.prototype.name=r,function(...t){Ta(this,{name:r,plugin:e,instance:null},!0);const n=new e(this,...t);return this[r]=()=>n,Ta(this,n.getEventHash()),n});class oi{constructor(e){if(this.constructor===oi)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Gl(this),delete this.trigger,y0(this,this.constructor.defaultState),lf(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,t={}){return yr(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[tr][e]=!1,this.player=this.state=null,t[e]=Fd(e,Yn[e])}static isBasic(e){const t=typeof e=="string"?ta(e):e;return typeof t=="function"&&!oi.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(ya(e))We.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(rt.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof t!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return Yn[e]=t,e!==_a&&(oi.isBasic(t)?rt.prototype[e]=tC(e,t):rt.prototype[e]=Fd(e,t)),t}static deregisterPlugin(e){if(e===_a)throw new Error("Cannot de-register base plugin.");ya(e)&&(delete Yn[e],delete rt.prototype[e])}static getPlugins(e=Object.keys(Yn)){let t;return e.forEach(n=>{const s=ta(n);s&&(t=t||{},t[n]=s)}),t}static getPluginVersion(e){const t=ta(e);return t&&t.VERSION||""}}oi.getPlugin=ta;oi.BASE_PLUGIN_NAME=_a;oi.registerPlugin(_a,oi);rt.prototype.usingPlugin=function(r){return!!this[tr]&&this[tr][r]===!0};rt.prototype.hasPlugin=function(r){return!!ya(r)};function iC(r,e){let t=!1;return function(...n){return t||We.warn(r),t=!0,e.apply(this,n)}}function Mi(r,e,t,n){return iC(`${e} is deprecated and will be removed in ${r}.0; please use ${t} instead.`,n)}var nC={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const uf=r=>r.indexOf("#")===0?r.slice(1):r;function ne(r,e,t){let n=ne.getPlayer(r);if(n)return e&&We.warn(`Player "${r}" is already initialised. Options will not be applied.`),t&&n.ready(t),n;const s=typeof r=="string"?Tn("#"+uf(r)):r;if(!_r(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))&&We.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 h=c(s,ot(e));if(!Gi(h)||Array.isArray(h)){We.error("please return an object in beforesetup hooks");return}e=ot(e,h)});const l=ae.getComponent("Player");return n=new l(s,e,t),yn("setup").forEach(c=>c(n)),n}ne.hooks_=tn;ne.hooks=yn;ne.hook=R8;ne.hookOnce=V8;ne.removeHook=jh;if(W.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&vr()){let r=Tn(".vjs-styles-defaults");if(!r){r=p0("vjs-styles-defaults");const e=Tn("head");e&&e.insertBefore(r,e.firstChild),m0(r,`
192
192
  .video-js {
193
193
  width: 300px;
194
194
  height: 150px;
@@ -197,28 +197,28 @@ See https://github.com/videojs/video.js/issues/2617 for more info.
197
197
  .vjs-fluid:not(.vjs-audio-only-mode) {
198
198
  padding-top: 56.25%
199
199
  }
200
- `)}}cl(1,ie);ie.VERSION=al;ie.options=rt.prototype.options_;ie.getPlayers=()=>rt.players;ie.getPlayer=r=>{const e=rt.players;let t;if(typeof r=="string"){const n=uf(r),s=e[n];if(s)return s;t=Tn("#"+n)}else t=r;if(_r(t)){const{player:n,playerId:s}=t;if(n||e[s])return n||e[s]}};ie.getAllPlayers=()=>Object.keys(rt.players).map(r=>rt.players[r]).filter(Boolean);ie.players=rt.players;ie.getComponent=ae.getComponent;ie.registerComponent=(r,e)=>(Ue.isTech(e)&&We.warn(`The ${r} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),ae.registerComponent.call(ae,r,e));ie.getTech=Ue.getTech;ie.registerTech=Ue.registerTech;ie.use=dx;Object.defineProperty(ie,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(ie.middleware,"TERMINATOR",{value:ga,writeable:!1,enumerable:!0});ie.browser=Jh;ie.obj=U8;ie.mergeOptions=Mi(9,"videojs.mergeOptions","videojs.obj.merge",ot);ie.defineLazyProperty=Mi(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Oa);ie.bind=Mi(9,"videojs.bind","native Function.prototype.bind",ut);ie.registerPlugin=oi.registerPlugin;ie.deregisterPlugin=oi.deregisterPlugin;ie.plugin=(r,e)=>(We.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),oi.registerPlugin(r,e));ie.getPlugins=oi.getPlugins;ie.getPlugin=oi.getPlugin;ie.getPluginVersion=oi.getPluginVersion;ie.addLanguage=function(r,e){return r=(""+r).toLowerCase(),ie.options.languages=ot(ie.options.languages,{[r]:e}),ie.options.languages[r]};ie.log=We;ie.createLogger=zh;ie.time=ix;ie.createTimeRange=Mi(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Bi);ie.createTimeRanges=Mi(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Bi);ie.formatTime=Mi(9,"videojs.formatTime","videojs.time.formatTime",Vn);ie.setFormatTime=Mi(9,"videojs.setFormatTime","videojs.time.setFormatTime",x0);ie.resetFormatTime=Mi(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",C0);ie.parseUrl=Mi(9,"videojs.parseUrl","videojs.url.parseUrl",Kl);ie.isCrossOrigin=Mi(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",ja);ie.EventTarget=fi;ie.any=zl;ie.on=hi;ie.one=qa;ie.off=Ut;ie.trigger=yr;ie.xhr=Ah;ie.TrackList=Fn;ie.TextTrack=ds;ie.TextTrackList=Yl;ie.AudioTrack=D0;ie.AudioTrackList=S0;ie.VideoTrack=A0;ie.VideoTrackList=k0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{ie[r]=function(){return We.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),h0[r].apply(null,arguments)}});ie.computedStyle=Mi(9,"videojs.computedStyle","videojs.dom.computedStyle",pr);ie.dom=h0;ie.fn=K8;ie.num=Ox;ie.str=ex;ie.url=ux;ie.Error=nC;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class rC{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(n){t.enabled_(n)}}),t}}class ba extends ie.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 t=this.getQualityLevelById(e.id);if(t)return t;const n=this.levels_.length;return t=new rC(e),""+n in this||Object.defineProperty(this,n,{get(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,n=this.length;t<n;t++){const s=this[t];if(s.id===e)return s}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}ba.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in ba.prototype.allowedEvents_)ba.prototype["on"+r]=null;var cf="4.1.0";const sC=function(r,e){const t=r.qualityLevels,n=new ba,s=function(){n.dispose(),r.qualityLevels=t,r.off("dispose",s)};return r.on("dispose",s),r.qualityLevels=()=>n,r.qualityLevels.VERSION=cf,n},df=function(r){return sC(this,ie.obj.merge({},r))};ie.registerPlugin("qualityLevels",df);df.VERSION=cf;/*! @name @videojs/http-streaming @version 3.17.3 @license Apache-2.0 */const si=Da,xa=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,bi=r=>ie.log.debug?ie.log.debug.bind(ie,"VHS:",`${r} >`):function(){};function st(...r){const e=ie.obj||ie;return(e.merge||e.mergeOptions).apply(e,r)}function Ot(...r){const e=ie.time||ie;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function aC(r){if(r.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
200
+ `)}}cl(1,ne);ne.VERSION=al;ne.options=rt.prototype.options_;ne.getPlayers=()=>rt.players;ne.getPlayer=r=>{const e=rt.players;let t;if(typeof r=="string"){const n=uf(r),s=e[n];if(s)return s;t=Tn("#"+n)}else t=r;if(_r(t)){const{player:n,playerId:s}=t;if(n||e[s])return n||e[s]}};ne.getAllPlayers=()=>Object.keys(rt.players).map(r=>rt.players[r]).filter(Boolean);ne.players=rt.players;ne.getComponent=ae.getComponent;ne.registerComponent=(r,e)=>(Ue.isTech(e)&&We.warn(`The ${r} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),ae.registerComponent.call(ae,r,e));ne.getTech=Ue.getTech;ne.registerTech=Ue.registerTech;ne.use=dx;Object.defineProperty(ne,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(ne.middleware,"TERMINATOR",{value:ga,writeable:!1,enumerable:!0});ne.browser=Jh;ne.obj=U8;ne.mergeOptions=Mi(9,"videojs.mergeOptions","videojs.obj.merge",ot);ne.defineLazyProperty=Mi(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Oa);ne.bind=Mi(9,"videojs.bind","native Function.prototype.bind",ut);ne.registerPlugin=oi.registerPlugin;ne.deregisterPlugin=oi.deregisterPlugin;ne.plugin=(r,e)=>(We.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),oi.registerPlugin(r,e));ne.getPlugins=oi.getPlugins;ne.getPlugin=oi.getPlugin;ne.getPluginVersion=oi.getPluginVersion;ne.addLanguage=function(r,e){return r=(""+r).toLowerCase(),ne.options.languages=ot(ne.options.languages,{[r]:e}),ne.options.languages[r]};ne.log=We;ne.createLogger=zh;ne.time=ix;ne.createTimeRange=Mi(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Bi);ne.createTimeRanges=Mi(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Bi);ne.formatTime=Mi(9,"videojs.formatTime","videojs.time.formatTime",Vn);ne.setFormatTime=Mi(9,"videojs.setFormatTime","videojs.time.setFormatTime",x0);ne.resetFormatTime=Mi(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",C0);ne.parseUrl=Mi(9,"videojs.parseUrl","videojs.url.parseUrl",Kl);ne.isCrossOrigin=Mi(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",ja);ne.EventTarget=fi;ne.any=zl;ne.on=hi;ne.one=qa;ne.off=Ut;ne.trigger=yr;ne.xhr=Ah;ne.TrackList=Fn;ne.TextTrack=ds;ne.TextTrackList=Yl;ne.AudioTrack=D0;ne.AudioTrackList=S0;ne.VideoTrack=A0;ne.VideoTrackList=k0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{ne[r]=function(){return We.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),h0[r].apply(null,arguments)}});ne.computedStyle=Mi(9,"videojs.computedStyle","videojs.dom.computedStyle",pr);ne.dom=h0;ne.fn=K8;ne.num=Ox;ne.str=ex;ne.url=ux;ne.Error=nC;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class rC{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(n){t.enabled_(n)}}),t}}class ba extends ne.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const n=this.levels_.length;return t=new rC(e),""+n in this||Object.defineProperty(this,n,{get(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,n=this.length;t<n;t++){const s=this[t];if(s.id===e)return s}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}ba.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in ba.prototype.allowedEvents_)ba.prototype["on"+r]=null;var cf="4.1.0";const sC=function(r,e){const t=r.qualityLevels,n=new ba,s=function(){n.dispose(),r.qualityLevels=t,r.off("dispose",s)};return r.on("dispose",s),r.qualityLevels=()=>n,r.qualityLevels.VERSION=cf,n},df=function(r){return sC(this,ne.obj.merge({},r))};ne.registerPlugin("qualityLevels",df);df.VERSION=cf;/*! @name @videojs/http-streaming @version 3.17.3 @license Apache-2.0 */const si=Da,xa=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,bi=r=>ne.log.debug?ne.log.debug.bind(ne,"VHS:",`${r} >`):function(){};function st(...r){const e=ne.obj||ne;return(e.merge||e.mergeOptions).apply(e,r)}function Ot(...r){const e=ne.time||ne;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function aC(r){if(r.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
201
201
  `;for(let t=0;t<r.length;t++){const n=r.start(t),s=r.end(t);e+=`${n} --> ${s}. Duration (${s-n})
202
- `}return e}const qi=1/30,Hi=qi*3,hf=function(r,e){const t=[];let n;if(r&&r.length)for(n=0;n<r.length;n++)e(r.start(n),r.end(n))&&t.push([r.start(n),r.end(n)]);return Ot(t)},Xn=function(r,e){return hf(r,function(t,n){return t-Hi<=e&&n+Hi>=e})},zs=function(r,e){return hf(r,function(t){return t-qi>=e})},oC=function(r){if(r.length<2)return Ot();const e=[];for(let t=1;t<r.length;t++){const n=r.end(t-1),s=r.start(t);e.push([n,s])}return Ot(e)},lC=function(r,e){let t=null,n=null,s=0;const a=[],o=[];if(!r||!r.length||!e||!e.length)return Ot();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,h){return c.time-h.time}),l=0;l<a.length;l++)a[l].type==="start"?(s++,s===2&&(t=a[l].time)):a[l].type==="end"&&(s--,s===1&&(n=a[l].time)),t!==null&&n!==null&&(o.push([t,n]),t=null,n=null);return Ot(o)},ff=r=>{const e=[];if(!r||!r.length)return"";for(let t=0;t<r.length;t++)e.push(r.start(t)+" => "+r.end(t));return e.join(", ")},uC=function(r,e,t=1){return((r.length?r.end(r.length-1):0)-e)/t},In=r=>{const e=[];for(let t=0;t<r.length;t++)e.push({start:r.start(t),end:r.end(t)});return e},cC=function(r,e){if(r===e)return!1;if(!r&&e||!e&&r||r.length!==e.length)return!0;for(let t=0;t<r.length;t++)if(r.start(t)!==e.start(t)||r.end(t)!==e.end(t))return!0;return!1},Xo=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},fu=function(r,e){let t=0;if(!r||!r.length)return t;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){t+=a-e;continue}t+=a-s}}return t},pu=(r,e)=>{if(!e.preload)return e.duration;let t=0;return(e.parts||[]).forEach(function(n){t+=n.duration}),(e.preloadHints||[]).forEach(function(n){n.type==="PART"&&(t+=r.partTargetDuration)}),t},_l=r=>(r.segments||[]).reduce((e,t,n)=>(t.parts?t.parts.forEach(function(s,a){e.push({duration:s.duration,segmentIndex:n,partIndex:a,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e),[]),pf=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},mf=({preloadSegment:r})=>{if(!r)return;const{parts:e,preloadHints:t}=r;let n=(t||[]).reduce((s,a)=>s+(a.type==="PART"?1:0),0);return n+=e&&e.length?e.length:0,n},gf=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const t=pf(e).length>0;return t&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:t&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},dC=function(r,e){let t=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:t+s.end,precise:!0};if(t+=pu(r,s),typeof s.start<"u")return{result:t+s.start,precise:!0}}return{result:t,precise:!1}},hC=function(r,e){let t=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-t,precise:!0};if(t+=pu(r,n),typeof n.end<"u")return{result:n.end-t,precise:!0}}return{result:-1,precise:!1}},vf=function(r,e,t){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const n=dC(r,e);if(n.precise)return n.result;const s=hC(r,e);return s.precise?s.result:n.result+t},_f=function(r,e,t){if(!r)return 0;if(typeof t!="number"&&(t=0),typeof e>"u"){if(r.totalDuration)return r.totalDuration;if(!r.endList)return W.Infinity}return vf(r,e,t)},is=function({defaultDuration:r,durationList:e,startIndex:t,endIndex:n}){let s=0;if(t>n&&([t,n]=[n,t]),t<0){for(let a=t;a<Math.min(0,n);a++)s+=r;t=0}for(let a=t;a<n;a++)s+=e[a].duration;return s},yf=function(r,e,t,n){if(!r||!r.segments)return null;if(r.endList)return _f(r);if(e===null)return null;e=e||0;let s=vf(r,r.mediaSequence+r.segments.length,e);return t&&(n=typeof n=="number"?n:gf(null,r),s-=n),Math.max(0,s)},fC=function(r,e,t){const s=e||0;let a=yf(r,e,!0,t);return a===null?Ot():(a<s&&(a=s),Ot(s,a))},pC=function({playlist:r,currentTime:e,startingSegmentIndex:t,startingPartIndex:n,startTime:s,exactManifestTimings:a}){let o=e-s;const l=_l(r);let c=0;for(let h=0;h<l.length;h++){const m=l[h];if(t===m.segmentIndex&&!(typeof n=="number"&&typeof m.partIndex=="number"&&n!==m.partIndex)){c=h;break}}if(o<0){if(c>0)for(let h=c-1;h>=0;h--){const m=l[h];if(o+=m.duration,a){if(o<0)continue}else if(o+qi<=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:s-is({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:h})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e}}if(c<0){for(let h=c;h<0;h++)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 h=c;h<l.length;h++){const m=l[h];o-=m.duration;const g=m.duration>qi,k=o===0,T=g&&o+qi>=0;if(!((k||T)&&h!==l.length-1)){if(a){if(o>0)continue}else if(o-qi>=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:s+is({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:h})}}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:e}},Tf=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},mu=function(r){return r.excludeUntil&&r.excludeUntil===1/0},Ya=function(r){const e=Tf(r);return!r.disabled&&!e},mC=function(r){return r.disabled},gC=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},bf=function(r,e){return e.attributes&&e.attributes[r]},vC=function(r,e,t,n=0){return bf("BANDWIDTH",t)?(r*t.attributes.BANDWIDTH-n*8)/e:NaN},yl=(r,e)=>{if(r.playlists.length===1)return!0;const t=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(n=>Ya(n)?(n.attributes.BANDWIDTH||0)<t:!1).length===0},gu=(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),$d=function(r,e){const t=r&&r.mediaGroups&&r.mediaGroups.AUDIO||{};let n=!1;for(const s in t){for(const a in t[s])if(n=e(t[s][a]),n)break;if(n)break}return!!n},ms=r=>{if(!r||!r.playlists||!r.playlists.length)return $d(r,t=>t.playlists&&t.playlists.length||t.uri);for(let e=0;e<r.playlists.length;e++){const t=r.playlists[e],n=t.attributes&&t.attributes.CODECS;if(!(n&&n.split(",").every(a=>Oh(a))||$d(r,a=>gu(t,a))))return!1}return!0};var ai={liveEdgeDelay:gf,duration:_f,seekable:fC,getMediaInfoForTime:pC,isEnabled:Ya,isDisabled:mC,isExcluded:Tf,isIncompatible:mu,playlistEnd:yf,isAes:gC,hasAttribute:bf,estimateSegmentRequestTime:vC,isLowestEnabledRendition:yl,isAudioOnly:ms,playlistMatch:gu,segmentDurationWithParts:pu};const{log:xf}=ie,ir=(r,e)=>`${r}-${e}`,Cf=(r,e,t)=>`placeholder-uri-${r}-${e}-${t}`,_C=({onwarn:r,oninfo:e,manifestString:t,customTagParsers:n=[],customTagMappers:s=[],llhls:a})=>{const o=new s4;r&&o.on("warn",r),e&&o.on("info",e),n.forEach(h=>o.addParser(h)),s.forEach(h=>o.addTagMapper(h)),o.push(t),o.end();const l=o.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(h){l.hasOwnProperty(h)&&delete l[h]}),l.segments&&l.segments.forEach(function(h){["parts","preloadHints"].forEach(function(m){h.hasOwnProperty(m)&&delete h[m]})})),!l.targetDuration){let h=10;l.segments&&l.segments.length&&(h=l.segments.reduce((m,g)=>Math.max(m,g.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${h}`}),l.targetDuration=h}const c=pf(l);if(c.length&&!l.partTargetDuration){const h=c.reduce((m,g)=>Math.max(m,g.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${h}`}),xf.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=h}return l},Cr=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(t=>{if(r.mediaGroups[t])for(const n in r.mediaGroups[t])for(const s in r.mediaGroups[t][n]){const a=r.mediaGroups[t][n][s];e(a,t,n,s)}})},Ef=({playlist:r,uri:e,id:t})=>{r.id=t,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},yC=r=>{let e=r.playlists.length;for(;e--;){const t=r.playlists[e];Ef({playlist:t,id:ir(e,t.uri)}),t.resolvedUri=si(r.uri,t.uri),r.playlists[t.id]=t,r.playlists[t.uri]=t,t.attributes.BANDWIDTH||xf.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},TC=r=>{Cr(r,e=>{e.uri&&(e.resolvedUri=si(r.uri,e.uri))})},bC=(r,e)=>{const t=ir(0,e),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:W.location.href,resolvedUri:W.location.href,playlists:[{uri:e,id:t,resolvedUri:e,attributes:{}}]};return n.playlists[t]=n.playlists[0],n.playlists[e]=n.playlists[0],n},Sf=(r,e,t=Cf)=>{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=ms(r);Cr(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 h=r.playlists[c];if(h.attributes&&h.attributes.AUDIO&&h.attributes.AUDIO===o)return}s.playlists=[xt({},s)]}s.playlists.forEach(function(c,h){const m=t(a,o,l,c),g=ir(h,m);c.uri?c.resolvedUri=c.resolvedUri||si(r.uri,c.uri):(c.uri=h===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})}),yC(r),TC(r)};class Ud{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[t]=e;t.programDateTime!==void 0&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,n=t.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={},t=[];this.pendingDateRanges_.forEach((n,s)=>{if(!this.processedDateRanges_.has(s)&&(n.startTime=n.startDate.getTime()/1e3-this.offset_,n.processDateRange=()=>this.processDateRange(n),t.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 t){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 t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((n,s)=>{n.startDate.getTime()<e&&this.processedDateRanges_.delete(s)})}}const kf=22,Rn=({requestType:r,request:e,error:t,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(t&&a)o.error=xt({},t),o.errorType=ie.Error.NetworkRequestFailed;else if(e.aborted)o.errorType=ie.Error.NetworkRequestAborted;else if(e.timedout)o.errorType=ie.Error.NetworkRequestTimeout;else if(l){const c=n?ie.Error.NetworkBodyParserFailed:ie.Error.NetworkBadStatus;o.errorType=c,o.status=e.status,o.headers=e.headers}return o},xC=bi("CodecUtils"),wf=function(r){const e=r.attributes||{};if(e.CODECS)return Fi(e.CODECS)},Df=(r,e)=>{const t=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&t.AUDIO&&r.mediaGroups.AUDIO[t.AUDIO]},CC=(r,e)=>{if(!Df(r,e))return!0;const t=e.attributes||{},n=r.mediaGroups.AUDIO[t.AUDIO];for(const s in n)if(!n[s].uri&&!n[s].playlists)return!0;return!1},us=function(r){const e={};return r.forEach(({mediaType:t,type:n,details:s})=>{e[t]=e[t]||[],e[t].push(Ih(`${n}${s}`))}),Object.keys(e).forEach(function(t){if(e[t].length>1){xC(`multiple ${t} codecs found as attributes: ${e[t].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[t]=null;return}e[t]=e[t][0]}),e},qd=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},ns=function(r,e){const t=e.attributes||{},n=us(wf(e)||[]);if(Df(r,e)&&!n.audio&&!CC(r,e)){const s=us(o4(r,t.AUDIO)||[]);s.audio&&(n.audio=s.audio)}return n},{EventTarget:EC}=ie,SC=(r,e)=>{if(e.endList||!e.serverControl)return r;const t={};if(e.serverControl.canBlockReload){const{preloadSegment:n}=e;let s=e.mediaSequence+e.segments.length;if(n){const a=n.parts||[],o=mf(e)-1;o>-1&&o!==a.length-1&&(t._HLS_part=o),(o>-1||a.length)&&s--}t._HLS_msn=s}if(e.serverControl&&e.serverControl.canSkipUntil&&(t._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(t).length){const n=new W.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(s){t.hasOwnProperty(s)&&n.searchParams.set(s,t[s])}),r=n.toString()}return r},kC=(r,e)=>{if(!r)return e;const t=st(r,e);if(r.preloadHints&&!e.preloadHints&&delete t.preloadHints,r.parts&&!e.parts)delete t.parts;else if(r.parts&&e.parts)for(let n=0;n<e.parts.length;n++)r.parts&&r.parts[n]&&(t.parts[n]=st(r.parts[n],e.parts[n]));return!r.skipped&&e.skipped&&(t.skipped=!1),r.preload&&!e.preload&&(t.preload=!1),t},wC=(r,e,t)=>{const n=r.slice(),s=e.slice();t=t||0;const a=[];let o;for(let l=0;l<s.length;l++){const c=n[l+t],h=s[l];c?(o=c.map||o,a.push(kC(c,h))):(o&&!h.map&&(h.map=o),a.push(h))}return a},Af=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=si(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=si(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=si(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=si(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(t=>{t.resolvedUri||(t.resolvedUri=si(e,t.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(t=>{t.resolvedUri||(t.resolvedUri=si(e,t.uri))})},Nf=function(r){const e=r.segments||[],t=r.preloadSegment;if(t&&t.parts&&t.parts.length){if(t.preloadHints){for(let n=0;n<t.preloadHints.length;n++)if(t.preloadHints[n].type==="MAP")return e}t.duration=r.targetDuration,t.preload=!0,e.push(t)}return e},If=(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,Tl=(r,e,t=If)=>{const n=st(r,{}),s=n.playlists[e.id];if(!s||t(s,e))return null;e.segments=Nf(e);const a=st(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=wC(s.segments,e.segments,e.mediaSequence-s.mediaSequence)}a.segments.forEach(o=>{Af(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,Cr(r,(o,l,c,h)=>{if(o.playlists)for(let m=0;m<o.playlists.length;m++)e.id===o.playlists[m].id&&(o.playlists[m]=a)}),n},bl=(r,e)=>{const t=r.segments||[],n=t[t.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},Hd=(r,e,t)=>{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:t,renditions:n}};class Kn extends EC{constructor(e,t,n={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=bi("PlaylistLoader");const{withCredentials:s=!1}=n;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=n.addDateRangesToTextTrack;const a=t.options_;this.customTagParsers=a&&a.customTagParsers||[],this.customTagMappers=a&&a.customTagMappers||[],this.llhls=a&&a.llhls,this.dateRangesStorage_=new Ud,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 t=this.dateRangesStorage_.getDateRangesToProcess();!t.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let t=si(this.main.uri,e.uri);this.llhls&&(t=SC(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,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,t,n){const{uri:s,id:a}=t;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:t}){try{const n=_C({onwarn:({message:s})=>this.logger_(`m3u8-parser warn for ${e}: ${s}`),oninfo:({message:s})=>this.logger_(`m3u8-parser info for ${e}: ${s}`),manifestString:t,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:ie.Error.StreamingHlsPlaylistParserError,error:n}}}excludeAudioOnlyVariants(e){const t=n=>{const s=n.attributes||{},{width:a,height:o}=s.RESOLUTION||{};if(a&&o)return!0;const l=wf(n)||[];return!!us(l).video};e.some(t)&&e.forEach(n=>{t(n)||(n.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,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=t||this.parseManifest_({url:n,manifestString:e});o.lastRequest=Date.now(),Ef({playlist:o,uri:n,id:s});const l=Tl(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_(bl(this.media(),!!l)),a.parsedPlaylist=Hd(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 Ud,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){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),t){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_(bl(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=xa(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 t=this.media();if(e){const n=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=W.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},n);return}if(!this.started){this.start();return}t&&!t.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"},(t,n)=>{if(!this.request)return;if(this.request=null,t)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:t})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=xa(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});const s=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=Hd(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,Sf(this.main,this.srcUri()),e.playlists.forEach(n=>{n.segments=Nf(n),n.segments.forEach(s=>{Af(s,n.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const t=this.srcUri()||W.location.href;this.main=bC(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){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(t){const h=this.createCloneURI_(o.resolvedUri,e),m=ir(s,h),g=this.createCloneAttributes_(s,o.attributes),k=this.createClonePlaylist_(o,m,e,g);n.playlists[a]=k,n.playlists[m]=k,n.playlists[h]=k}else n.playlists.splice(a,1);delete n.playlists[c],delete n.playlists[l]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){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((h,m)=>{const g=n.playlists[h.id],k=g.id,T=g.resolvedUri;delete n.playlists[k],delete n.playlists[T]});delete n.mediaGroups[a][o]}}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const n=this.main,s=n.playlists.length,a=this.createCloneURI_(t.resolvedUri,e),o=ir(e.ID,a),l=this.createCloneAttributes_(e.ID,t.attributes),c=this.createClonePlaylist_(t,o,e,l);n.playlists[s]=c,n.playlists[o]=c,n.playlists[a]=c,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,n=e["BASE-ID"],s=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!s.mediaGroups[a]||s.mediaGroups[a][t]))for(const o in s.mediaGroups[a]){if(o===n)s.mediaGroups[a][t]={};else continue;for(const l in s.mediaGroups[a][o]){const c=s.mediaGroups[a][o][l];s.mediaGroups[a][t][l]=xt({},c);const h=s.mediaGroups[a][t][l],m=this.createCloneURI_(c.resolvedUri,e);h.resolvedUri=m,h.uri=m,h.playlists=[],c.playlists.forEach((g,k)=>{const T=s.playlists[g.id],O=Cf(a,t,l),_=ir(t,O);if(T&&!s.playlists[_]){const S=this.createClonePlaylist_(T,_,e),R=S.resolvedUri;s.playlists[_]=S,s.playlists[R]=S}h.playlists[k]=this.createClonePlaylist_(g,_,e)})}}})}createClonePlaylist_(e,t,n,s){const a=this.createCloneURI_(e.resolvedUri,n),o={resolvedUri:a,uri:a,id:t};return e.segments&&(o.segments=[]),s&&(o.attributes=s),st(e,o)}createCloneURI_(e,t){const n=new URL(e);n.hostname=t["URI-REPLACEMENT"].HOST;const s=t["URI-REPLACEMENT"].PARAMS;for(const a of Object.keys(s))n.searchParams.set(a,s[a]);return n.href}createCloneAttributes_(e,t){const n={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{t[s]&&(n[s]=e)}),n}getKeyIdSet(e){const t=new Set;if(!e||!e.contentProtection)return t;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;t.add(s.toLowerCase())}return t}}const xl=function(r,e,t,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))),t.headers&&(r.responseHeaders=t.headers),e&&e.code==="ETIMEDOUT"&&(r.timedout=!0),!e&&!r.aborted&&t.statusCode!==200&&t.statusCode!==206&&t.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(r&&(s||r.responseText)))),n(e,r)},DC=(r,e)=>{if(!r||!r.size)return;let t=e;return r.forEach(n=>{t=n(t)}),t},AC=(r,e,t,n)=>{!r||!r.size||r.forEach(s=>{s(e,t,n)})},Of=function(){const r=function e(t,n){t=st({timeout:45e3},t);const s=e.beforeRequest||ie.Vhs.xhr.beforeRequest,a=e._requestCallbackSet||ie.Vhs.xhr._requestCallbackSet||new Set,o=e._responseCallbackSet||ie.Vhs.xhr._responseCallbackSet;s&&typeof s=="function"&&(ie.log.warn("beforeRequest is deprecated, use onRequest instead."),a.add(s));const l=ie.Vhs.xhr.original===!0?ie.xhr:ie.Vhs.xhr,c=DC(a,t);a.delete(s);const h=l(c||t,function(g,k){return AC(o,h,g,k),xl(h,g,k,n)}),m=h.abort;return h.abort=function(){return h.aborted=!0,m.apply(h,arguments)},h.uri=t.uri,h.requestType=t.requestType,h.requestTime=Date.now(),h};return r.original=!0,r},NC=function(r){let e;const t=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="+t+"-"+e},Cl=function(r){const e={};return r.byterange&&(e.Range=NC(r.byterange)),e},IC=function(r,e){return r.start(e)+"-"+r.end(e)},OC=function(r,e){const t=r.toString(16);return"00".substring(0,2-t.length)+t+(e%2?" ":"")},BC=function(r){return r>=32&&r<126?String.fromCharCode(r):"."},Bf=function(r){const e={};return Object.keys(r).forEach(t=>{const n=r[t];Lh(n)?e[t]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:e[t]=n}),e},Ca=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},Lf=function(r){return r.resolvedUri},Mf=r=>{const e=Array.prototype.slice.call(r),t=16;let n="",s,a;for(let o=0;o<e.length/t;o++)s=e.slice(o*t,o*t+t).map(OC).join(""),a=e.slice(o*t,o*t+t).map(BC).join(""),n+=s+" "+a+`
203
- `;return n},LC=({bytes:r})=>Mf(r),MC=r=>{let e="",t;for(t=0;t<r.length;t++)e+=IC(r,t)+" ";return e};var PC=Object.freeze({__proto__:null,createTransferableMessage:Bf,initSegmentId:Ca,segmentKeyId:Lf,hexDump:Mf,tagDump:LC,textRanges:MC});const Pf=.25,RC=(r,e)=>{if(!e.dateTimeObject)return null;const t=e.videoTimingInfo.transmuxerPrependedSeconds,s=e.videoTimingInfo.transmuxedPresentationStart+t,a=r-s;return new Date(e.dateTimeObject.getTime()+a*1e3)},VC=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,FC=(r,e)=>{let t;try{t=new Date(r)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let n=e.segments[0];if(t<new Date(n.dateTimeObject))return null;for(let c=0;c<e.segments.length-1;c++){n=e.segments[c];const h=new Date(e.segments[c+1].dateTimeObject);if(t<h)break}const s=e.segments[e.segments.length-1],a=s.dateTimeObject,o=s.videoTimingInfo?VC(s.videoTimingInfo):s.duration+s.duration*Pf,l=new Date(a.getTime()+o*1e3);return t>l?null:(t>new Date(a)&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:ai.duration(e,e.mediaSequence+e.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})},$C=(r,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let t=0,n;for(let a=0;a<e.segments.length&&(n=e.segments[a],t=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:t+n.duration,!(r<=t));a++);const s=e.segments[e.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<r)return null;if(r>t){if(r>t+s.duration*Pf)return null;n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:t-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}},UC=(r,e)=>{let t,n;try{t=new Date(r),n=new Date(e)}catch{}const s=t.getTime();return(n.getTime()-s)/1e3},qC=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},HC=({playlist:r,time:e=void 0,callback:t})=>{if(!t)throw new Error("getProgramTime: callback must be provided");if(!r||e===void 0)return t({message:"getProgramTime: playlist and time must be provided"});const n=$C(e,r);if(!n)return t({message:"valid programTime was not found"});if(n.type==="estimate")return t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});const s={mediaSeconds:e},a=RC(e,n.segment);return a&&(s.programDateTime=a.toISOString()),t(null,s)},Rf=({programTime:r,playlist:e,retryCount:t=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(!qC(e))return o({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const l=FC(r,e);if(!l)return o({message:`${r} was not found in the stream`});const c=l.segment,h=UC(c.dateTimeObject,r);if(l.type==="estimate"){if(t===0)return o({message:`${r} is not buffered yet. Try again`});n(l.estimatedStart+h),a.one("seeked",()=>{Rf({programTime:r,playlist:e,retryCount:t-1,seekTo:n,pauseAfterSeek:s,tech:a,callback:o})});return}const m=c.start+h,g=()=>o(null,a.currentTime());a.one("seeked",g),s&&a.pause(),n(m)},Ko=(r,e)=>{if(r.readyState===4)return e()},jC=(r,e,t,n)=>{let s=[],a,o=!1;const l=function(g,k,T,O){return k.abort(),o=!0,t(g,k,T,O)},c=function(g,k){if(o)return;if(g)return g.metadata=Rn({requestType:n,request:k,error:g}),l(g,k,"",s);const T=k.responseText.substring(s&&s.byteLength||0,k.responseText.length);if(s=v4(s,Mh(T,!0)),a=a||Xr(s),s.length<10||a&&s.length<a+2)return Ko(k,()=>l(g,k,"",s));const O=$l(s);return O==="ts"&&s.length<188?Ko(k,()=>l(g,k,"",s)):!O&&s.length<376?Ko(k,()=>l(g,k,"",s)):l(null,k,O,s)},m=e({uri:r,beforeSend(g){g.overrideMimeType("text/plain; charset=x-user-defined"),g.addEventListener("progress",function({total:k,loaded:T}){return xl(g,null,{statusCode:g.status},c)})}},function(g,k){return xl(m,g,k,c)});return m},{EventTarget:zC}=ie,jd=function(r,e){if(!If(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 t=0;t<r.segments.length;t++){const n=r.segments[t],s=e.segments[t];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},GC=(r,e,t,n)=>{const s=n.attributes.NAME||t;return`placeholder-uri-${r}-${e}-${s}`},WC=({mainXml:r,srcUrl:e,clientOffset:t,sidxMapping:n,previousManifest:s})=>{const a=m8(r,{manifestUri:e,clientOffset:t,sidxMapping:n,previousManifest:s});return Sf(a,e,GC),a},YC=(r,e)=>{Cr(r,(t,n,s,a)=>{(!e.mediaGroups[n][s]||!(a in e.mediaGroups[n][s]))&&delete r.mediaGroups[n][s][a]})},XC=(r,e,t)=>{let n=!0,s=st(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=Na(o.sidx);t&&t[c]&&t[c].sidx&&Rl(o,t[c].sidx,o.sidx.resolvedUri)}const l=Tl(s,o,jd);l&&(s=l,n=!1)}return Cr(e,(a,o,l,c)=>{if(a.playlists&&a.playlists.length){const h=a.playlists[0].id,m=Tl(s,a.playlists[0],jd);m&&(s=m,c in s.mediaGroups[o][l]||(s.mediaGroups[o][l][c]=a),s.mediaGroups[o][l][c].playlists[0]=s.playlists[h],n=!1)}}),YC(s,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(n=!1),n?null:s},KC=(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,zd=(r,e)=>{const t={};for(const n in r){const a=r[n].sidx;if(a){const o=Na(a);if(!e[o])break;const l=e[o].sidxInfo;KC(l,a)&&(t[o]=e[o])}}return t},QC=(r,e)=>{let n=zd(r.playlists,e);return Cr(r,(s,a,o,l)=>{if(s.playlists&&s.playlists.length){const c=s.playlists;n=st(n,zd(c,e))}}),n};class El extends zC{constructor(e,t,n={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:a=!1}=n;if(this.vhs_=t,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_=bi("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,n){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata},n&&(this.state=n),this.trigger("error"),!0}addSidxSegments_(e,t,n){const s=e.sidx&&Na(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s]){W.clearTimeout(this.mediaRequest_),this.mediaRequest_=W.setTimeout(()=>n(!1),0);return}const a=xa(e.sidx.resolvedUri),o=(c,h)=>{if(this.requestErrored_(c,h,t))return;const m=this.mainPlaylistLoader_.sidxMapping_,{requestType:g}=h;let k;try{k=T8(Pe(h.response).subarray(8))}catch(T){T.metadata=Rn({requestType:g,request:h,parseFailure:!0}),this.requestErrored_(T,h,t);return}return m[s]={sidxInfo:e.sidx,sidx:k},Rl(e,k,e.sidx.resolvedUri),n(!0)},l="dash-sidx";this.request=jC(a,this.vhs_.xhr,(c,h,m,g)=>{if(c)return o(c,h);if(!m||m!=="mp4"){const O=m||"unknown";return o({status:h.status,message:`Unsupported ${O} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},h)}const{offset:k,length:T}=e.sidx.byterange;if(g.length>=T+k)return o(c,{response:g.subarray(k,k+T),status:h.status,uri:h.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:Cl({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 t=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,t,s=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,W.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.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 t=this.media();if(e){const n=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=W.setTimeout(()=>this.load(),n);return}if(!this.started){this.start();return}t&&!t.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,t)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),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:t});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=xa(this.mainPlaylistLoader_.srcUrl,s),a){this.handleMain_(),this.syncClientServerClock_(()=>e(s,a));return}return e(s,a)})}syncClientServerClock_(e){const t=g8(this.mainPlaylistLoader_.mainXml_);if(t===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(t.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e();this.request=this.vhs_.xhr({uri:si(this.mainPlaylistLoader_.srcUrl,t.value),method:t.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;t.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,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:t});let n;try{n=WC({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:ie.Error.StreamingDashManifestParserError,error:a},this.trigger("error")}e&&(n=XC(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(h=>{l.push({id:h.id,bandwidth:h.attributes.BANDWIDTH,resolution:h.attributes.RESOLUTION,codecs:h.attributes.CODECS})});const c={duration:a,isLive:!o,renditions:l};t.parsedManifest=c,this.trigger({type:"manifestparsecomplete",metadata:t})}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 t=e.main&&e.main.minimumUpdatePeriod;if(t===0&&(e.media()?t=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof t!="number"||t<=0){t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`);return}this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=W.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=QC(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,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 t=this.mainPlaylistLoader_.main.playlists,n=!this.media_||this.media_!==t[e];if(n?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const s=()=>{this.media().endList||(this.mediaUpdateTimeout=W.setTimeout(()=>{this.trigger("mediaupdatetimeout"),s()},bl(this.media(),!!n)))};s()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const t=this.mainPlaylistLoader_.main.eventStream.map(n=>({cueTime:n.start,frames:[{data:n.messageData}]}));this.addMetadataToTextTrack("EventStream",t,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const n in e.contentProtection){const s=e.contentProtection[n].attributes["cenc:default_KID"];s&&t.add(s.replace(/-/g,"").toLowerCase())}return t}}}var Nt={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const ZC=r=>{const e=new Uint8Array(new ArrayBuffer(r.length));for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e.buffer},Vf=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},JC=function(r){try{return URL.createObjectURL(new Blob([r],{type:"application/javascript"}))}catch{const t=new BlobBuilder;return t.append(r),URL.createObjectURL(t.getBlob())}},Ff=function(r){return function(){const e=JC(r),t=Vf(new Worker(e));t.objURL=e;const n=t.terminate;return t.on=t.addEventListener,t.off=t.removeEventListener,t.terminate=function(){return URL.revokeObjectURL(e),n.call(this)},t}},$f=function(r){return`var browserWorkerPolyFill = ${Vf.toString()};
202
+ `}return e}const qi=1/30,Hi=qi*3,hf=function(r,e){const t=[];let n;if(r&&r.length)for(n=0;n<r.length;n++)e(r.start(n),r.end(n))&&t.push([r.start(n),r.end(n)]);return Ot(t)},Xn=function(r,e){return hf(r,function(t,n){return t-Hi<=e&&n+Hi>=e})},zs=function(r,e){return hf(r,function(t){return t-qi>=e})},oC=function(r){if(r.length<2)return Ot();const e=[];for(let t=1;t<r.length;t++){const n=r.end(t-1),s=r.start(t);e.push([n,s])}return Ot(e)},lC=function(r,e){let t=null,n=null,s=0;const a=[],o=[];if(!r||!r.length||!e||!e.length)return Ot();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,h){return c.time-h.time}),l=0;l<a.length;l++)a[l].type==="start"?(s++,s===2&&(t=a[l].time)):a[l].type==="end"&&(s--,s===1&&(n=a[l].time)),t!==null&&n!==null&&(o.push([t,n]),t=null,n=null);return Ot(o)},ff=r=>{const e=[];if(!r||!r.length)return"";for(let t=0;t<r.length;t++)e.push(r.start(t)+" => "+r.end(t));return e.join(", ")},uC=function(r,e,t=1){return((r.length?r.end(r.length-1):0)-e)/t},In=r=>{const e=[];for(let t=0;t<r.length;t++)e.push({start:r.start(t),end:r.end(t)});return e},cC=function(r,e){if(r===e)return!1;if(!r&&e||!e&&r||r.length!==e.length)return!0;for(let t=0;t<r.length;t++)if(r.start(t)!==e.start(t)||r.end(t)!==e.end(t))return!0;return!1},Xo=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},fu=function(r,e){let t=0;if(!r||!r.length)return t;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){t+=a-e;continue}t+=a-s}}return t},pu=(r,e)=>{if(!e.preload)return e.duration;let t=0;return(e.parts||[]).forEach(function(n){t+=n.duration}),(e.preloadHints||[]).forEach(function(n){n.type==="PART"&&(t+=r.partTargetDuration)}),t},_l=r=>(r.segments||[]).reduce((e,t,n)=>(t.parts?t.parts.forEach(function(s,a){e.push({duration:s.duration,segmentIndex:n,partIndex:a,part:s,segment:t})}):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e),[]),pf=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},mf=({preloadSegment:r})=>{if(!r)return;const{parts:e,preloadHints:t}=r;let n=(t||[]).reduce((s,a)=>s+(a.type==="PART"?1:0),0);return n+=e&&e.length?e.length:0,n},gf=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const t=pf(e).length>0;return t&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:t&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},dC=function(r,e){let t=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:t+s.end,precise:!0};if(t+=pu(r,s),typeof s.start<"u")return{result:t+s.start,precise:!0}}return{result:t,precise:!1}},hC=function(r,e){let t=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-t,precise:!0};if(t+=pu(r,n),typeof n.end<"u")return{result:n.end-t,precise:!0}}return{result:-1,precise:!1}},vf=function(r,e,t){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const n=dC(r,e);if(n.precise)return n.result;const s=hC(r,e);return s.precise?s.result:n.result+t},_f=function(r,e,t){if(!r)return 0;if(typeof t!="number"&&(t=0),typeof e>"u"){if(r.totalDuration)return r.totalDuration;if(!r.endList)return W.Infinity}return vf(r,e,t)},is=function({defaultDuration:r,durationList:e,startIndex:t,endIndex:n}){let s=0;if(t>n&&([t,n]=[n,t]),t<0){for(let a=t;a<Math.min(0,n);a++)s+=r;t=0}for(let a=t;a<n;a++)s+=e[a].duration;return s},yf=function(r,e,t,n){if(!r||!r.segments)return null;if(r.endList)return _f(r);if(e===null)return null;e=e||0;let s=vf(r,r.mediaSequence+r.segments.length,e);return t&&(n=typeof n=="number"?n:gf(null,r),s-=n),Math.max(0,s)},fC=function(r,e,t){const s=e||0;let a=yf(r,e,!0,t);return a===null?Ot():(a<s&&(a=s),Ot(s,a))},pC=function({playlist:r,currentTime:e,startingSegmentIndex:t,startingPartIndex:n,startTime:s,exactManifestTimings:a}){let o=e-s;const l=_l(r);let c=0;for(let h=0;h<l.length;h++){const m=l[h];if(t===m.segmentIndex&&!(typeof n=="number"&&typeof m.partIndex=="number"&&n!==m.partIndex)){c=h;break}}if(o<0){if(c>0)for(let h=c-1;h>=0;h--){const m=l[h];if(o+=m.duration,a){if(o<0)continue}else if(o+qi<=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:s-is({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:h})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e}}if(c<0){for(let h=c;h<0;h++)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 h=c;h<l.length;h++){const m=l[h];o-=m.duration;const g=m.duration>qi,k=o===0,T=g&&o+qi>=0;if(!((k||T)&&h!==l.length-1)){if(a){if(o>0)continue}else if(o-qi>=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:s+is({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:h})}}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:e}},Tf=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},mu=function(r){return r.excludeUntil&&r.excludeUntil===1/0},Ya=function(r){const e=Tf(r);return!r.disabled&&!e},mC=function(r){return r.disabled},gC=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},bf=function(r,e){return e.attributes&&e.attributes[r]},vC=function(r,e,t,n=0){return bf("BANDWIDTH",t)?(r*t.attributes.BANDWIDTH-n*8)/e:NaN},yl=(r,e)=>{if(r.playlists.length===1)return!0;const t=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(n=>Ya(n)?(n.attributes.BANDWIDTH||0)<t:!1).length===0},gu=(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),$d=function(r,e){const t=r&&r.mediaGroups&&r.mediaGroups.AUDIO||{};let n=!1;for(const s in t){for(const a in t[s])if(n=e(t[s][a]),n)break;if(n)break}return!!n},ms=r=>{if(!r||!r.playlists||!r.playlists.length)return $d(r,t=>t.playlists&&t.playlists.length||t.uri);for(let e=0;e<r.playlists.length;e++){const t=r.playlists[e],n=t.attributes&&t.attributes.CODECS;if(!(n&&n.split(",").every(a=>Oh(a))||$d(r,a=>gu(t,a))))return!1}return!0};var ai={liveEdgeDelay:gf,duration:_f,seekable:fC,getMediaInfoForTime:pC,isEnabled:Ya,isDisabled:mC,isExcluded:Tf,isIncompatible:mu,playlistEnd:yf,isAes:gC,hasAttribute:bf,estimateSegmentRequestTime:vC,isLowestEnabledRendition:yl,isAudioOnly:ms,playlistMatch:gu,segmentDurationWithParts:pu};const{log:xf}=ne,ir=(r,e)=>`${r}-${e}`,Cf=(r,e,t)=>`placeholder-uri-${r}-${e}-${t}`,_C=({onwarn:r,oninfo:e,manifestString:t,customTagParsers:n=[],customTagMappers:s=[],llhls:a})=>{const o=new s4;r&&o.on("warn",r),e&&o.on("info",e),n.forEach(h=>o.addParser(h)),s.forEach(h=>o.addTagMapper(h)),o.push(t),o.end();const l=o.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(h){l.hasOwnProperty(h)&&delete l[h]}),l.segments&&l.segments.forEach(function(h){["parts","preloadHints"].forEach(function(m){h.hasOwnProperty(m)&&delete h[m]})})),!l.targetDuration){let h=10;l.segments&&l.segments.length&&(h=l.segments.reduce((m,g)=>Math.max(m,g.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${h}`}),l.targetDuration=h}const c=pf(l);if(c.length&&!l.partTargetDuration){const h=c.reduce((m,g)=>Math.max(m,g.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${h}`}),xf.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=h}return l},Cr=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(t=>{if(r.mediaGroups[t])for(const n in r.mediaGroups[t])for(const s in r.mediaGroups[t][n]){const a=r.mediaGroups[t][n][s];e(a,t,n,s)}})},Ef=({playlist:r,uri:e,id:t})=>{r.id=t,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},yC=r=>{let e=r.playlists.length;for(;e--;){const t=r.playlists[e];Ef({playlist:t,id:ir(e,t.uri)}),t.resolvedUri=si(r.uri,t.uri),r.playlists[t.id]=t,r.playlists[t.uri]=t,t.attributes.BANDWIDTH||xf.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},TC=r=>{Cr(r,e=>{e.uri&&(e.resolvedUri=si(r.uri,e.uri))})},bC=(r,e)=>{const t=ir(0,e),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:W.location.href,resolvedUri:W.location.href,playlists:[{uri:e,id:t,resolvedUri:e,attributes:{}}]};return n.playlists[t]=n.playlists[0],n.playlists[e]=n.playlists[0],n},Sf=(r,e,t=Cf)=>{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=ms(r);Cr(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 h=r.playlists[c];if(h.attributes&&h.attributes.AUDIO&&h.attributes.AUDIO===o)return}s.playlists=[xt({},s)]}s.playlists.forEach(function(c,h){const m=t(a,o,l,c),g=ir(h,m);c.uri?c.resolvedUri=c.resolvedUri||si(r.uri,c.uri):(c.uri=h===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})}),yC(r),TC(r)};class Ud{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[t]=e;t.programDateTime!==void 0&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,n=t.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={},t=[];this.pendingDateRanges_.forEach((n,s)=>{if(!this.processedDateRanges_.has(s)&&(n.startTime=n.startDate.getTime()/1e3-this.offset_,n.processDateRange=()=>this.processDateRange(n),t.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 t){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 t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((n,s)=>{n.startDate.getTime()<e&&this.processedDateRanges_.delete(s)})}}const kf=22,Rn=({requestType:r,request:e,error:t,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(t&&a)o.error=xt({},t),o.errorType=ne.Error.NetworkRequestFailed;else if(e.aborted)o.errorType=ne.Error.NetworkRequestAborted;else if(e.timedout)o.errorType=ne.Error.NetworkRequestTimeout;else if(l){const c=n?ne.Error.NetworkBodyParserFailed:ne.Error.NetworkBadStatus;o.errorType=c,o.status=e.status,o.headers=e.headers}return o},xC=bi("CodecUtils"),wf=function(r){const e=r.attributes||{};if(e.CODECS)return Fi(e.CODECS)},Df=(r,e)=>{const t=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&t.AUDIO&&r.mediaGroups.AUDIO[t.AUDIO]},CC=(r,e)=>{if(!Df(r,e))return!0;const t=e.attributes||{},n=r.mediaGroups.AUDIO[t.AUDIO];for(const s in n)if(!n[s].uri&&!n[s].playlists)return!0;return!1},us=function(r){const e={};return r.forEach(({mediaType:t,type:n,details:s})=>{e[t]=e[t]||[],e[t].push(Ih(`${n}${s}`))}),Object.keys(e).forEach(function(t){if(e[t].length>1){xC(`multiple ${t} codecs found as attributes: ${e[t].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[t]=null;return}e[t]=e[t][0]}),e},qd=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},ns=function(r,e){const t=e.attributes||{},n=us(wf(e)||[]);if(Df(r,e)&&!n.audio&&!CC(r,e)){const s=us(o4(r,t.AUDIO)||[]);s.audio&&(n.audio=s.audio)}return n},{EventTarget:EC}=ne,SC=(r,e)=>{if(e.endList||!e.serverControl)return r;const t={};if(e.serverControl.canBlockReload){const{preloadSegment:n}=e;let s=e.mediaSequence+e.segments.length;if(n){const a=n.parts||[],o=mf(e)-1;o>-1&&o!==a.length-1&&(t._HLS_part=o),(o>-1||a.length)&&s--}t._HLS_msn=s}if(e.serverControl&&e.serverControl.canSkipUntil&&(t._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(t).length){const n=new W.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(s){t.hasOwnProperty(s)&&n.searchParams.set(s,t[s])}),r=n.toString()}return r},kC=(r,e)=>{if(!r)return e;const t=st(r,e);if(r.preloadHints&&!e.preloadHints&&delete t.preloadHints,r.parts&&!e.parts)delete t.parts;else if(r.parts&&e.parts)for(let n=0;n<e.parts.length;n++)r.parts&&r.parts[n]&&(t.parts[n]=st(r.parts[n],e.parts[n]));return!r.skipped&&e.skipped&&(t.skipped=!1),r.preload&&!e.preload&&(t.preload=!1),t},wC=(r,e,t)=>{const n=r.slice(),s=e.slice();t=t||0;const a=[];let o;for(let l=0;l<s.length;l++){const c=n[l+t],h=s[l];c?(o=c.map||o,a.push(kC(c,h))):(o&&!h.map&&(h.map=o),a.push(h))}return a},Af=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=si(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=si(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=si(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=si(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(t=>{t.resolvedUri||(t.resolvedUri=si(e,t.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(t=>{t.resolvedUri||(t.resolvedUri=si(e,t.uri))})},Nf=function(r){const e=r.segments||[],t=r.preloadSegment;if(t&&t.parts&&t.parts.length){if(t.preloadHints){for(let n=0;n<t.preloadHints.length;n++)if(t.preloadHints[n].type==="MAP")return e}t.duration=r.targetDuration,t.preload=!0,e.push(t)}return e},If=(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,Tl=(r,e,t=If)=>{const n=st(r,{}),s=n.playlists[e.id];if(!s||t(s,e))return null;e.segments=Nf(e);const a=st(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=wC(s.segments,e.segments,e.mediaSequence-s.mediaSequence)}a.segments.forEach(o=>{Af(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,Cr(r,(o,l,c,h)=>{if(o.playlists)for(let m=0;m<o.playlists.length;m++)e.id===o.playlists[m].id&&(o.playlists[m]=a)}),n},bl=(r,e)=>{const t=r.segments||[],n=t[t.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},Hd=(r,e,t)=>{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:t,renditions:n}};class Kn extends EC{constructor(e,t,n={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=bi("PlaylistLoader");const{withCredentials:s=!1}=n;this.src=e,this.vhs_=t,this.withCredentials=s,this.addDateRangesToTextTrack_=n.addDateRangesToTextTrack;const a=t.options_;this.customTagParsers=a&&a.customTagParsers||[],this.customTagMappers=a&&a.customTagMappers||[],this.llhls=a&&a.llhls,this.dateRangesStorage_=new Ud,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 t=this.dateRangesStorage_.getDateRangesToProcess();!t.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let t=si(this.main.uri,e.uri);this.llhls&&(t=SC(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,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,t,n){const{uri:s,id:a}=t;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:t}){try{const n=_C({onwarn:({message:s})=>this.logger_(`m3u8-parser warn for ${e}: ${s}`),oninfo:({message:s})=>this.logger_(`m3u8-parser info for ${e}: ${s}`),manifestString:t,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:ne.Error.StreamingHlsPlaylistParserError,error:n}}}excludeAudioOnlyVariants(e){const t=n=>{const s=n.attributes||{},{width:a,height:o}=s.RESOLUTION||{};if(a&&o)return!0;const l=wf(n)||[];return!!us(l).video};e.some(t)&&e.forEach(n=>{t(n)||(n.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:t,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=t||this.parseManifest_({url:n,manifestString:e});o.lastRequest=Date.now(),Ef({playlist:o,uri:n,id:s});const l=Tl(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_(bl(this.media(),!!l)),a.parsedPlaylist=Hd(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 Ud,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){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),t){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_(bl(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=xa(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 t=this.media();if(e){const n=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=W.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},n);return}if(!this.started){this.start();return}t&&!t.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"},(t,n)=>{if(!this.request)return;if(this.request=null,t)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:t})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=xa(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});const s=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=Hd(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,Sf(this.main,this.srcUri()),e.playlists.forEach(n=>{n.segments=Nf(n),n.segments.forEach(s=>{Af(s,n.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const t=this.srcUri()||W.location.href;this.main=bC(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){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(t){const h=this.createCloneURI_(o.resolvedUri,e),m=ir(s,h),g=this.createCloneAttributes_(s,o.attributes),k=this.createClonePlaylist_(o,m,e,g);n.playlists[a]=k,n.playlists[m]=k,n.playlists[h]=k}else n.playlists.splice(a,1);delete n.playlists[c],delete n.playlists[l]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){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((h,m)=>{const g=n.playlists[h.id],k=g.id,T=g.resolvedUri;delete n.playlists[k],delete n.playlists[T]});delete n.mediaGroups[a][o]}}}),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const n=this.main,s=n.playlists.length,a=this.createCloneURI_(t.resolvedUri,e),o=ir(e.ID,a),l=this.createCloneAttributes_(e.ID,t.attributes),c=this.createClonePlaylist_(t,o,e,l);n.playlists[s]=c,n.playlists[o]=c,n.playlists[a]=c,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,n=e["BASE-ID"],s=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!s.mediaGroups[a]||s.mediaGroups[a][t]))for(const o in s.mediaGroups[a]){if(o===n)s.mediaGroups[a][t]={};else continue;for(const l in s.mediaGroups[a][o]){const c=s.mediaGroups[a][o][l];s.mediaGroups[a][t][l]=xt({},c);const h=s.mediaGroups[a][t][l],m=this.createCloneURI_(c.resolvedUri,e);h.resolvedUri=m,h.uri=m,h.playlists=[],c.playlists.forEach((g,k)=>{const T=s.playlists[g.id],I=Cf(a,t,l),_=ir(t,I);if(T&&!s.playlists[_]){const S=this.createClonePlaylist_(T,_,e),R=S.resolvedUri;s.playlists[_]=S,s.playlists[R]=S}h.playlists[k]=this.createClonePlaylist_(g,_,e)})}}})}createClonePlaylist_(e,t,n,s){const a=this.createCloneURI_(e.resolvedUri,n),o={resolvedUri:a,uri:a,id:t};return e.segments&&(o.segments=[]),s&&(o.attributes=s),st(e,o)}createCloneURI_(e,t){const n=new URL(e);n.hostname=t["URI-REPLACEMENT"].HOST;const s=t["URI-REPLACEMENT"].PARAMS;for(const a of Object.keys(s))n.searchParams.set(a,s[a]);return n.href}createCloneAttributes_(e,t){const n={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{t[s]&&(n[s]=e)}),n}getKeyIdSet(e){const t=new Set;if(!e||!e.contentProtection)return t;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;t.add(s.toLowerCase())}return t}}const xl=function(r,e,t,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))),t.headers&&(r.responseHeaders=t.headers),e&&e.code==="ETIMEDOUT"&&(r.timedout=!0),!e&&!r.aborted&&t.statusCode!==200&&t.statusCode!==206&&t.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(r&&(s||r.responseText)))),n(e,r)},DC=(r,e)=>{if(!r||!r.size)return;let t=e;return r.forEach(n=>{t=n(t)}),t},AC=(r,e,t,n)=>{!r||!r.size||r.forEach(s=>{s(e,t,n)})},Of=function(){const r=function e(t,n){t=st({timeout:45e3},t);const s=e.beforeRequest||ne.Vhs.xhr.beforeRequest,a=e._requestCallbackSet||ne.Vhs.xhr._requestCallbackSet||new Set,o=e._responseCallbackSet||ne.Vhs.xhr._responseCallbackSet;s&&typeof s=="function"&&(ne.log.warn("beforeRequest is deprecated, use onRequest instead."),a.add(s));const l=ne.Vhs.xhr.original===!0?ne.xhr:ne.Vhs.xhr,c=DC(a,t);a.delete(s);const h=l(c||t,function(g,k){return AC(o,h,g,k),xl(h,g,k,n)}),m=h.abort;return h.abort=function(){return h.aborted=!0,m.apply(h,arguments)},h.uri=t.uri,h.requestType=t.requestType,h.requestTime=Date.now(),h};return r.original=!0,r},NC=function(r){let e;const t=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="+t+"-"+e},Cl=function(r){const e={};return r.byterange&&(e.Range=NC(r.byterange)),e},IC=function(r,e){return r.start(e)+"-"+r.end(e)},OC=function(r,e){const t=r.toString(16);return"00".substring(0,2-t.length)+t+(e%2?" ":"")},BC=function(r){return r>=32&&r<126?String.fromCharCode(r):"."},Bf=function(r){const e={};return Object.keys(r).forEach(t=>{const n=r[t];Lh(n)?e[t]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:e[t]=n}),e},Ca=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},Lf=function(r){return r.resolvedUri},Mf=r=>{const e=Array.prototype.slice.call(r),t=16;let n="",s,a;for(let o=0;o<e.length/t;o++)s=e.slice(o*t,o*t+t).map(OC).join(""),a=e.slice(o*t,o*t+t).map(BC).join(""),n+=s+" "+a+`
203
+ `;return n},LC=({bytes:r})=>Mf(r),MC=r=>{let e="",t;for(t=0;t<r.length;t++)e+=IC(r,t)+" ";return e};var PC=Object.freeze({__proto__:null,createTransferableMessage:Bf,initSegmentId:Ca,segmentKeyId:Lf,hexDump:Mf,tagDump:LC,textRanges:MC});const Pf=.25,RC=(r,e)=>{if(!e.dateTimeObject)return null;const t=e.videoTimingInfo.transmuxerPrependedSeconds,s=e.videoTimingInfo.transmuxedPresentationStart+t,a=r-s;return new Date(e.dateTimeObject.getTime()+a*1e3)},VC=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,FC=(r,e)=>{let t;try{t=new Date(r)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let n=e.segments[0];if(t<new Date(n.dateTimeObject))return null;for(let c=0;c<e.segments.length-1;c++){n=e.segments[c];const h=new Date(e.segments[c+1].dateTimeObject);if(t<h)break}const s=e.segments[e.segments.length-1],a=s.dateTimeObject,o=s.videoTimingInfo?VC(s.videoTimingInfo):s.duration+s.duration*Pf,l=new Date(a.getTime()+o*1e3);return t>l?null:(t>new Date(a)&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:ai.duration(e,e.mediaSequence+e.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})},$C=(r,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let t=0,n;for(let a=0;a<e.segments.length&&(n=e.segments[a],t=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:t+n.duration,!(r<=t));a++);const s=e.segments[e.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<r)return null;if(r>t){if(r>t+s.duration*Pf)return null;n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:t-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}},UC=(r,e)=>{let t,n;try{t=new Date(r),n=new Date(e)}catch{}const s=t.getTime();return(n.getTime()-s)/1e3},qC=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},HC=({playlist:r,time:e=void 0,callback:t})=>{if(!t)throw new Error("getProgramTime: callback must be provided");if(!r||e===void 0)return t({message:"getProgramTime: playlist and time must be provided"});const n=$C(e,r);if(!n)return t({message:"valid programTime was not found"});if(n.type==="estimate")return t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});const s={mediaSeconds:e},a=RC(e,n.segment);return a&&(s.programDateTime=a.toISOString()),t(null,s)},Rf=({programTime:r,playlist:e,retryCount:t=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(!qC(e))return o({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const l=FC(r,e);if(!l)return o({message:`${r} was not found in the stream`});const c=l.segment,h=UC(c.dateTimeObject,r);if(l.type==="estimate"){if(t===0)return o({message:`${r} is not buffered yet. Try again`});n(l.estimatedStart+h),a.one("seeked",()=>{Rf({programTime:r,playlist:e,retryCount:t-1,seekTo:n,pauseAfterSeek:s,tech:a,callback:o})});return}const m=c.start+h,g=()=>o(null,a.currentTime());a.one("seeked",g),s&&a.pause(),n(m)},Ko=(r,e)=>{if(r.readyState===4)return e()},jC=(r,e,t,n)=>{let s=[],a,o=!1;const l=function(g,k,T,I){return k.abort(),o=!0,t(g,k,T,I)},c=function(g,k){if(o)return;if(g)return g.metadata=Rn({requestType:n,request:k,error:g}),l(g,k,"",s);const T=k.responseText.substring(s&&s.byteLength||0,k.responseText.length);if(s=v4(s,Mh(T,!0)),a=a||Xr(s),s.length<10||a&&s.length<a+2)return Ko(k,()=>l(g,k,"",s));const I=$l(s);return I==="ts"&&s.length<188?Ko(k,()=>l(g,k,"",s)):!I&&s.length<376?Ko(k,()=>l(g,k,"",s)):l(null,k,I,s)},m=e({uri:r,beforeSend(g){g.overrideMimeType("text/plain; charset=x-user-defined"),g.addEventListener("progress",function({total:k,loaded:T}){return xl(g,null,{statusCode:g.status},c)})}},function(g,k){return xl(m,g,k,c)});return m},{EventTarget:zC}=ne,jd=function(r,e){if(!If(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 t=0;t<r.segments.length;t++){const n=r.segments[t],s=e.segments[t];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},GC=(r,e,t,n)=>{const s=n.attributes.NAME||t;return`placeholder-uri-${r}-${e}-${s}`},WC=({mainXml:r,srcUrl:e,clientOffset:t,sidxMapping:n,previousManifest:s})=>{const a=m8(r,{manifestUri:e,clientOffset:t,sidxMapping:n,previousManifest:s});return Sf(a,e,GC),a},YC=(r,e)=>{Cr(r,(t,n,s,a)=>{(!e.mediaGroups[n][s]||!(a in e.mediaGroups[n][s]))&&delete r.mediaGroups[n][s][a]})},XC=(r,e,t)=>{let n=!0,s=st(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=Na(o.sidx);t&&t[c]&&t[c].sidx&&Rl(o,t[c].sidx,o.sidx.resolvedUri)}const l=Tl(s,o,jd);l&&(s=l,n=!1)}return Cr(e,(a,o,l,c)=>{if(a.playlists&&a.playlists.length){const h=a.playlists[0].id,m=Tl(s,a.playlists[0],jd);m&&(s=m,c in s.mediaGroups[o][l]||(s.mediaGroups[o][l][c]=a),s.mediaGroups[o][l][c].playlists[0]=s.playlists[h],n=!1)}}),YC(s,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(n=!1),n?null:s},KC=(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,zd=(r,e)=>{const t={};for(const n in r){const a=r[n].sidx;if(a){const o=Na(a);if(!e[o])break;const l=e[o].sidxInfo;KC(l,a)&&(t[o]=e[o])}}return t},QC=(r,e)=>{let n=zd(r.playlists,e);return Cr(r,(s,a,o,l)=>{if(s.playlists&&s.playlists.length){const c=s.playlists;n=st(n,zd(c,e))}}),n};class El extends zC{constructor(e,t,n={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:a=!1}=n;if(this.vhs_=t,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_=bi("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,n){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2,metadata:e.metadata},n&&(this.state=n),this.trigger("error"),!0}addSidxSegments_(e,t,n){const s=e.sidx&&Na(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s]){W.clearTimeout(this.mediaRequest_),this.mediaRequest_=W.setTimeout(()=>n(!1),0);return}const a=xa(e.sidx.resolvedUri),o=(c,h)=>{if(this.requestErrored_(c,h,t))return;const m=this.mainPlaylistLoader_.sidxMapping_,{requestType:g}=h;let k;try{k=T8(Pe(h.response).subarray(8))}catch(T){T.metadata=Rn({requestType:g,request:h,parseFailure:!0}),this.requestErrored_(T,h,t);return}return m[s]={sidxInfo:e.sidx,sidx:k},Rl(e,k,e.sidx.resolvedUri),n(!0)},l="dash-sidx";this.request=jC(a,this.vhs_.xhr,(c,h,m,g)=>{if(c)return o(c,h);if(!m||m!=="mp4"){const I=m||"unknown";return o({status:h.status,message:`Unsupported ${I} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},h)}const{offset:k,length:T}=e.sidx.byterange;if(g.length>=T+k)return o(c,{response:g.subarray(k,k+T),status:h.status,uri:h.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:Cl({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 t=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,t,s=>{this.haveMetadata({startingState:t,playlist:e})}))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,W.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.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 t=this.media();if(e){const n=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=W.setTimeout(()=>this.load(),n);return}if(!this.started){this.start();return}t&&!t.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,t)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),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:t});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=xa(this.mainPlaylistLoader_.srcUrl,s),a){this.handleMain_(),this.syncClientServerClock_(()=>e(s,a));return}return e(s,a)})}syncClientServerClock_(e){const t=g8(this.mainPlaylistLoader_.mainXml_);if(t===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(t.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e();this.request=this.vhs_.xhr({uri:si(this.mainPlaylistLoader_.srcUrl,t.value),method:t.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;t.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,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:t});let n;try{n=WC({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:ne.Error.StreamingDashManifestParserError,error:a},this.trigger("error")}e&&(n=XC(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(h=>{l.push({id:h.id,bandwidth:h.attributes.BANDWIDTH,resolution:h.attributes.RESOLUTION,codecs:h.attributes.CODECS})});const c={duration:a,isLive:!o,renditions:l};t.parsedManifest=c,this.trigger({type:"manifestparsecomplete",metadata:t})}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 t=e.main&&e.main.minimumUpdatePeriod;if(t===0&&(e.media()?t=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof t!="number"||t<=0){t<0&&this.logger_(`found invalid minimumUpdatePeriod of ${t}, not setting a timeout`);return}this.createMUPTimeout_(t)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=W.setTimeout(()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=QC(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,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 t=this.mainPlaylistLoader_.main.playlists,n=!this.media_||this.media_!==t[e];if(n?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const s=()=>{this.media().endList||(this.mediaUpdateTimeout=W.setTimeout(()=>{this.trigger("mediaupdatetimeout"),s()},bl(this.media(),!!n)))};s()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const t=this.mainPlaylistLoader_.main.eventStream.map(n=>({cueTime:n.start,frames:[{data:n.messageData}]}));this.addMetadataToTextTrack("EventStream",t,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const n in e.contentProtection){const s=e.contentProtection[n].attributes["cenc:default_KID"];s&&t.add(s.replace(/-/g,"").toLowerCase())}return t}}}var Nt={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const ZC=r=>{const e=new Uint8Array(new ArrayBuffer(r.length));for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e.buffer},Vf=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},JC=function(r){try{return URL.createObjectURL(new Blob([r],{type:"application/javascript"}))}catch{const t=new BlobBuilder;return t.append(r),URL.createObjectURL(t.getBlob())}},Ff=function(r){return function(){const e=JC(r),t=Vf(new Worker(e));t.objURL=e;const n=t.terminate;return t.on=t.addEventListener,t.off=t.removeEventListener,t.terminate=function(){return URL.revokeObjectURL(e),n.call(this)},t}},$f=function(r){return`var browserWorkerPolyFill = ${Vf.toString()};
204
204
  browserWorkerPolyFill(self);
205
- `+r},Uf=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},e5=$f(Uf(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(d,p){u[d]||(u[d]=[]),u[d]=u[d].concat(p)},this.off=function(d,p){var f;return u[d]?(f=u[d].indexOf(p),u[d]=u[d].slice(),u[d].splice(f,1),f>-1):!1},this.trigger=function(d){var p,f,v,y;if(p=u[d],!!p)if(arguments.length===2)for(v=p.length,f=0;f<v;++f)p[f].call(this,arguments[1]);else{for(y=[],f=arguments.length,f=1;f<arguments.length;++f)y.push(arguments[f]);for(v=p.length,f=0;f<v;++f)p[f].apply(this,y)}},this.dispose=function(){u={}}}};e.prototype.pipe=function(u){return this.on("data",function(d){u.push(d)}),this.on("done",function(d){u.flush(d)}),this.on("partialdone",function(d){u.partialFlush(d)}),this.on("endedtimeline",function(d){u.endTimeline(d)}),this.on("reset",function(d){u.reset(d)}),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 t=e,n=Math.pow(2,32),s=function(u){var d=new DataView(u.buffer,u.byteOffset,u.byteLength),p;return d.getBigUint64?(p=d.getBigUint64(0),p<Number.MAX_SAFE_INTEGER?Number(p):p):d.getUint32(0)*n+d.getUint32(4)},a={getUint64:s,MAX_UINT32:n},o=a.MAX_UINT32,l,c,h,m,g,k,T,O,_,S,R,L,I,j,M,P,N,X,b,C,$,U,E,w,F,G,Z,q,H,Q,J,re,de,Ce,le,$e;(function(){var u;if(E={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 E)E.hasOwnProperty(u)&&(E[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);w=new Uint8Array([105,115,111,109]),G=new Uint8Array([97,118,99,49]),F=new Uint8Array([0,0,0,1]),Z=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]),H={video:Z,audio:q},re=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),J=new Uint8Array([0,0,0,0,0,0,0,0]),de=new Uint8Array([0,0,0,0,0,0,0,0]),Ce=de,le=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),$e=de,Q=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),l=function(u){var d=[],p=0,f,v,y;for(f=1;f<arguments.length;f++)d.push(arguments[f]);for(f=d.length;f--;)p+=d[f].byteLength;for(v=new Uint8Array(p+8),y=new DataView(v.buffer,v.byteOffset,v.byteLength),y.setUint32(0,v.byteLength),v.set(u,4),f=0,p=8;f<d.length;f++)v.set(d[f],p),p+=d[f].byteLength;return v},c=function(){return l(E.dinf,l(E.dref,re))},h=function(u){return l(E.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(E.ftyp,w,F,w,G)},P=function(u){return l(E.hdlr,H[u])},g=function(u){return l(E.mdat,u)},M=function(u){var d=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&&(d[12]=u.samplerate>>>24&255,d[13]=u.samplerate>>>16&255,d[14]=u.samplerate>>>8&255,d[15]=u.samplerate&255),l(E.mdhd,d)},j=function(u){return l(E.mdia,M(u),P(u.type),T(u))},k=function(u){return l(E.mfhd,new Uint8Array([0,0,0,0,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255]))},T=function(u){return l(E.minf,u.type==="video"?l(E.vmhd,Q):l(E.smhd,J),c(),X(u))},O=function(u,d){for(var p=[],f=d.length;f--;)p[f]=C(d[f]);return l.apply(null,[E.moof,k(u)].concat(p))},_=function(u){for(var d=u.length,p=[];d--;)p[d]=L(u[d]);return l.apply(null,[E.moov,R(4294967295)].concat(p).concat(S(u)))},S=function(u){for(var d=u.length,p=[];d--;)p[d]=$(u[d]);return l.apply(null,[E.mvex].concat(p))},R=function(u){var d=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(E.mvhd,d)},N=function(u){var d=u.samples||[],p=new Uint8Array(4+d.length),f,v;for(v=0;v<d.length;v++)f=d[v].flags,p[v+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return l(E.sdtp,p)},X=function(u){return l(E.stbl,b(u),l(E.stts,$e),l(E.stsc,Ce),l(E.stsz,le),l(E.stco,de))},(function(){var u,d;b=function(p){return l(E.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),p.type==="video"?u(p):d(p))},u=function(p){var f=p.sps||[],v=p.pps||[],y=[],B=[],V,z;for(V=0;V<f.length;V++)y.push((f[V].byteLength&65280)>>>8),y.push(f[V].byteLength&255),y=y.concat(Array.prototype.slice.call(f[V]));for(V=0;V<v.length;V++)B.push((v[V].byteLength&65280)>>>8),B.push(v[V].byteLength&255),B=B.concat(Array.prototype.slice.call(v[V]));if(z=[E.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(E.avcC,new Uint8Array([1,p.profileIdc,p.profileCompatibility,p.levelIdc,255].concat([f.length],y,[v.length],B))),l(E.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],p.sarRatio){var Y=p.sarRatio[0],te=p.sarRatio[1];z.push(l(E.pasp,new Uint8Array([(Y&4278190080)>>24,(Y&16711680)>>16,(Y&65280)>>8,Y&255,(te&4278190080)>>24,(te&16711680)>>16,(te&65280)>>8,te&255])))}return l.apply(null,z)},d=function(p){return l(E.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]),h(p))}})(),I=function(u){var d=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(E.tkhd,d)},C=function(u){var d,p,f,v,y,B,V;return d=l(E.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])),B=Math.floor(u.baseMediaDecodeTime/o),V=Math.floor(u.baseMediaDecodeTime%o),p=l(E.tfdt,new Uint8Array([1,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,V>>>24&255,V>>>16&255,V>>>8&255,V&255])),y=92,u.type==="audio"?(f=U(u,y),l(E.traf,d,p,f)):(v=N(u),f=U(u,v.length+y),l(E.traf,d,p,f,v))},L=function(u){return u.duration=u.duration||4294967295,l(E.trak,I(u),j(u))},$=function(u){var d=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"&&(d[d.length-1]=0),l(E.trex,d)},(function(){var u,d,p;p=function(f,v){var y=0,B=0,V=0,z=0;return f.length&&(f[0].duration!==void 0&&(y=1),f[0].size!==void 0&&(B=2),f[0].flags!==void 0&&(V=4),f[0].compositionTimeOffset!==void 0&&(z=8)),[0,0,y|B|V|z,1,(f.length&4278190080)>>>24,(f.length&16711680)>>>16,(f.length&65280)>>>8,f.length&255,(v&4278190080)>>>24,(v&16711680)>>>16,(v&65280)>>>8,v&255]},d=function(f,v){var y,B,V,z,Y,te;for(z=f.samples||[],v+=20+16*z.length,V=p(z,v),B=new Uint8Array(V.length+z.length*16),B.set(V),y=V.length,te=0;te<z.length;te++)Y=z[te],B[y++]=(Y.duration&4278190080)>>>24,B[y++]=(Y.duration&16711680)>>>16,B[y++]=(Y.duration&65280)>>>8,B[y++]=Y.duration&255,B[y++]=(Y.size&4278190080)>>>24,B[y++]=(Y.size&16711680)>>>16,B[y++]=(Y.size&65280)>>>8,B[y++]=Y.size&255,B[y++]=Y.flags.isLeading<<2|Y.flags.dependsOn,B[y++]=Y.flags.isDependedOn<<6|Y.flags.hasRedundancy<<4|Y.flags.paddingValue<<1|Y.flags.isNonSyncSample,B[y++]=Y.flags.degradationPriority&61440,B[y++]=Y.flags.degradationPriority&15,B[y++]=(Y.compositionTimeOffset&4278190080)>>>24,B[y++]=(Y.compositionTimeOffset&16711680)>>>16,B[y++]=(Y.compositionTimeOffset&65280)>>>8,B[y++]=Y.compositionTimeOffset&255;return l(E.trun,B)},u=function(f,v){var y,B,V,z,Y,te;for(z=f.samples||[],v+=20+8*z.length,V=p(z,v),y=new Uint8Array(V.length+z.length*8),y.set(V),B=V.length,te=0;te<z.length;te++)Y=z[te],y[B++]=(Y.duration&4278190080)>>>24,y[B++]=(Y.duration&16711680)>>>16,y[B++]=(Y.duration&65280)>>>8,y[B++]=Y.duration&255,y[B++]=(Y.size&4278190080)>>>24,y[B++]=(Y.size&16711680)>>>16,y[B++]=(Y.size&65280)>>>8,y[B++]=Y.size&255;return l(E.trun,y)},U=function(f,v){return f.type==="audio"?u(f,v):d(f,v)}})();var Ie={ftyp:m,mdat:g,moof:O,moov:_,initSegment:function(u){var d=m(),p=_(u),f;return f=new Uint8Array(d.byteLength+p.byteLength),f.set(d),f.set(p,d.byteLength),f}},Oe=function(u){var d,p,f=[],v=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,f.byteLength=0,d=0;d<u.length;d++)p=u[d],p.nalUnitType==="access_unit_delimiter_rbsp"?(f.length&&(f.duration=p.dts-f.dts,v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.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 v.length&&(!f.duration||f.duration<=0)&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.push(f),v},Ye=function(u){var d,p,f=[],v=[];for(f.byteLength=0,f.nalCount=0,f.duration=0,f.pts=u[0].pts,f.dts=u[0].dts,v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=u[0].pts,v.dts=u[0].dts,d=0;d<u.length;d++)p=u[d],p.keyFrame?(f.length&&(v.push(f),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.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 v.length&&f.duration<=0&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.duration+=f.duration,v.push(f),v},Fe=function(u){var d;return!u[0][0].keyFrame&&u.length>1&&(d=u.shift(),u.byteLength-=d.byteLength,u.nalCount-=d.nalCount,u[0][0].dts=d.dts,u[0][0].pts=d.pts,u[0][0].duration+=d.duration),u},Ze=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Je=function(u,d){var p=Ze();return p.dataOffset=d,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},me=function(u,d){var p,f,v,y,B,V=d||0,z=[];for(p=0;p<u.length;p++)for(y=u[p],f=0;f<y.length;f++)B=y[f],v=Je(B,V),V+=v.size,z.push(v);return z},_e=function(u){var d,p,f,v,y,B,V=0,z=u.byteLength,Y=u.nalCount,te=z+4*Y,se=new Uint8Array(te),ke=new DataView(se.buffer);for(d=0;d<u.length;d++)for(v=u[d],p=0;p<v.length;p++)for(y=v[p],f=0;f<y.length;f++)B=y[f],ke.setUint32(V,B.data.byteLength),V+=4,se.set(B.data,V),V+=B.data.byteLength;return se},be=function(u,d){var p,f=d||0,v=[];return p=Je(u,f),v.push(p),v},Be=function(u){var d,p,f=0,v=u.byteLength,y=u.length,B=v+4*y,V=new Uint8Array(B),z=new DataView(V.buffer);for(d=0;d<u.length;d++)p=u[d],z.setUint32(f,p.data.byteLength),f+=4,V.set(p.data,f),f+=p.data.byteLength;return V},it={groupNalsIntoFrames:Oe,groupFramesIntoGops:Ye,extendFirstKeyFrame:Fe,generateSampleTable:me,concatenateNalData:_e,generateSampleTableForFrame:be,concatenateNalDataForFrame:Be},he=[33,16,5,32,164,27],ce=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ue=function(u){for(var d=[];u--;)d.push(0);return d},De=function(u){return Object.keys(u).reduce(function(d,p){return d[p]=new Uint8Array(u[p].reduce(function(f,v){return f.concat(v)},[])),d},{})},Ee,et=function(){if(!Ee){var u={96e3:[he,[227,64],ue(154),[56]],88200:[he,[231],ue(170),[56]],64e3:[he,[248,192],ue(240),[56]],48e3:[he,[255,192],ue(268),[55,148,128],ue(54),[112]],44100:[he,[255,192],ue(268),[55,163,128],ue(84),[112]],32e3:[he,[255,192],ue(268),[55,234],ue(226),[112]],24e3:[he,[255,192],ue(268),[55,255,128],ue(268),[111,112],ue(126),[224]],16e3:[he,[255,192],ue(268),[55,255,128],ue(268),[111,255],ue(269),[223,108],ue(195),[1,192]],12e3:[ce,ue(268),[3,127,248],ue(268),[6,255,240],ue(268),[13,255,224],ue(268),[27,253,128],ue(259),[56]],11025:[ce,ue(268),[3,127,248],ue(268),[6,255,240],ue(268),[13,255,224],ue(268),[27,255,192],ue(268),[55,175,128],ue(108),[112]],8e3:[ce,ue(268),[3,121,16],ue(47),[7]]};Ee=De(u)}return Ee},fe=9e4,ye,ge,qe,Ne,ft,Dt,pi;ye=function(u){return u*fe},ge=function(u,d){return u*d},qe=function(u){return u/fe},Ne=function(u,d){return u/d},ft=function(u,d){return ye(Ne(u,d))},Dt=function(u,d){return ge(qe(u),d)},pi=function(u,d,p){return qe(p?u:u-d)};var Xe={ONE_SECOND_IN_TS:fe,secondsToVideoTs:ye,secondsToAudioTs:ge,videoTsToSeconds:qe,audioTsToSeconds:Ne,audioTsToVideoTs:ft,videoTsToAudioTs:Dt,metadataTsToSeconds:pi},xi=et,Ht=Xe,Ci=function(u){var d,p,f=0;for(d=0;d<u.length;d++)p=u[d],f+=p.data.byteLength;return f},yt=function(u,d,p,f){var v,y=0,B=0,V=0,z=0,Y,te,se;if(d.length&&(v=Ht.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),y=Math.ceil(Ht.ONE_SECOND_IN_TS/(u.samplerate/1024)),p&&f&&(B=v-Math.max(p,f),V=Math.floor(B/y),z=V*y),!(V<1||z>Ht.ONE_SECOND_IN_TS/2))){for(Y=xi()[u.samplerate],Y||(Y=d[0].data),te=0;te<V;te++)se=d[0],d.splice(0,0,{data:Y,dts:se.dts-y,pts:se.pts-y});return u.baseMediaDecodeTime-=Math.floor(Ht.videoTsToAudioTs(z,u.samplerate)),z}},ei=function(u,d,p){return d.minSegmentDts>=p?u:(d.minSegmentDts=1/0,u.filter(function(f){return f.dts>=p?(d.minSegmentDts=Math.min(d.minSegmentDts,f.dts),d.minSegmentPts=d.minSegmentDts,!0):!1}))},li=function(u){var d,p,f=[];for(d=0;d<u.length;d++)p=u[d],f.push({size:p.data.byteLength,duration:1024});return f},jt=function(u){var d,p,f=0,v=new Uint8Array(Ci(u));for(d=0;d<u.length;d++)p=u[d],v.set(p.data,f),f+=p.data.byteLength;return v},Xi={prefixWithSilence:yt,trimAdtsFramesByEarliestDts:ei,generateSampleTable:li,concatenateFrameData:jt},Rt=Xe.ONE_SECOND_IN_TS,Ei=function(u,d){typeof d.pts=="number"&&(u.timelineStartInfo.pts===void 0&&(u.timelineStartInfo.pts=d.pts),u.minSegmentPts===void 0?u.minSegmentPts=d.pts:u.minSegmentPts=Math.min(u.minSegmentPts,d.pts),u.maxSegmentPts===void 0?u.maxSegmentPts=d.pts:u.maxSegmentPts=Math.max(u.maxSegmentPts,d.pts)),typeof d.dts=="number"&&(u.timelineStartInfo.dts===void 0&&(u.timelineStartInfo.dts=d.dts),u.minSegmentDts===void 0?u.minSegmentDts=d.dts:u.minSegmentDts=Math.min(u.minSegmentDts,d.dts),u.maxSegmentDts===void 0?u.maxSegmentDts=d.dts:u.maxSegmentDts=Math.max(u.maxSegmentDts,d.dts))},x=function(u){delete u.minSegmentDts,delete u.maxSegmentDts,delete u.minSegmentPts,delete u.maxSegmentPts},D=function(u,d){var p,f,v=u.minSegmentDts;return d||(v-=u.timelineStartInfo.dts),p=u.timelineStartInfo.baseMediaDecodeTime,p+=v,p=Math.max(0,p),u.type==="audio"&&(f=u.samplerate/Rt,p*=f,p=Math.floor(p)),p},K={clearDtsInfo:x,calculateTrackBaseMediaDecodeTime:D,collectDtsInfo:Ei},ne=4,xe=128,Me=function(u){for(var d=0,p={payloadType:-1,payloadSize:0},f=0,v=0;d<u.byteLength&&u[d]!==xe;){for(;u[d]===255;)f+=255,d++;for(f+=u[d++];u[d]===255;)v+=255,d++;if(v+=u[d++],!p.payload&&f===ne){var y=String.fromCharCode(u[d+3],u[d+4],u[d+5],u[d+6]);if(y==="GA94"){p.payloadType=f,p.payloadSize=v,p.payload=u.subarray(d,d+v);break}else p.payload=void 0}d+=v,f=0,v=0}return p},nt=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)},St=function(u,d){var p=[],f,v,y,B;if(!(d[0]&64))return p;for(v=d[0]&31,f=0;f<v;f++)y=f*3,B={type:d[y+2]&3,pts:u},d[y+2]&4&&(B.ccData=d[y+3]<<8|d[y+4],p.push(B));return p},zt=function(u){for(var d=u.byteLength,p=[],f=1,v,y;f<d-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;v=d-p.length,y=new Uint8Array(v);var B=0;for(f=0;f<v;B++,f++)B===p[0]&&(B++,p.shift()),y[f]=u[B];return y},Vt={parseSei:Me,parseUserData:nt,parseCaptionPackets:St,discardEmulationPreventionBytes:zt,USER_DATA_REGISTERED_ITU_T_T35:ne},Bt=t,ti=Vt,Ke=function(u){u=u||{},Ke.prototype.init.call(this),this.parse708captions_=typeof u.parse708captions=="boolean"?u.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Se(0,0),new Se(0,1),new Se(1,0),new Se(1,1)],this.parse708captions_&&(this.cc708Stream_=new ze({captionServices:u.captionServices})),this.reset(),this.ccStreams_.forEach(function(d){d.on("data",this.trigger.bind(this,"data")),d.on("partialdone",this.trigger.bind(this,"partialdone")),d.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")))};Ke.prototype=new Bt,Ke.prototype.push=function(u){var d,p,f;if(u.nalUnitType==="sei_rbsp"&&(d=ti.parseSei(u.escapedRBSP),!!d.payload&&d.payloadType===ti.USER_DATA_REGISTERED_ITU_T_T35&&(p=ti.parseUserData(d),!!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=ti.parseCaptionPackets(u.pts,p),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==u.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=u.dts}},Ke.prototype.flushCCStreams=function(u){this.ccStreams_.forEach(function(d){return u==="flush"?d.flush():d.partialFlush()},this)},Ke.prototype.flushStream=function(u){if(!this.captionPackets_.length){this.flushCCStreams(u);return}this.captionPackets_.forEach(function(d,p){d.presortIndex=p}),this.captionPackets_.sort(function(d,p){return d.pts===p.pts?d.presortIndex-p.presortIndex:d.pts-p.pts}),this.captionPackets_.forEach(function(d){d.type<2?this.dispatchCea608Packet(d):this.dispatchCea708Packet(d)},this),this.captionPackets_.length=0,this.flushCCStreams(u)},Ke.prototype.flush=function(){return this.flushStream("flush")},Ke.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ke.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(u){u.reset()})},Ke.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)},Ke.prototype.setsChannel1Active=function(u){return(u.ccData&30720)===4096},Ke.prototype.setsChannel2Active=function(u){return(u.ccData&30720)===6144},Ke.prototype.setsTextOrXDSActive=function(u){return(u.ccData&28928)===256||(u.ccData&30974)===4138||(u.ccData&30974)===6186},Ke.prototype.dispatchCea708Packet=function(u){this.parse708captions_&&this.cc708Stream_.push(u)};var ii={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},Gt=function(u){var d=ii[u]||u;return u&4096&&u===d?"":String.fromCharCode(d)},Wt=function(u){return 32<=u&&u<=127||160<=u&&u<=255},kt=function(u){this.windowNum=u,this.reset()};kt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},kt.prototype.getText=function(){return this.rows.join(`
206
- `)},kt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},kt.prototype.newLine=function(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--},kt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},kt.prototype.addText=function(u){this.rows[this.rowIdx]+=u},kt.prototype.backspace=function(){if(!this.isEmpty()){var u=this.rows[this.rowIdx];this.rows[this.rowIdx]=u.substr(0,u.length-1)}};var lt=function(u,d,p){this.serviceNum=u,this.text="",this.currentWindow=new kt(-1),this.windows=[],this.stream=p,typeof d=="string"&&this.createTextDecoder(d)};lt.prototype.init=function(u,d){this.startPts=u;for(var p=0;p<8;p++)this.windows[p]=new kt(p),typeof d=="function"&&(this.windows[p].beforeRowOverflow=d)},lt.prototype.setCurrentWindow=function(u){this.currentWindow=this.windows[u]},lt.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(d){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+u+" encoding. "+d})}};var ze=function(u){u=u||{},ze.prototype.init.call(this);var d=this,p=u.captionServices||{},f={},v;Object.keys(p).forEach(y=>{v=p[y],/^SERVICE/.test(y)&&(f[y]=v.encoding)}),this.serviceEncodings=f,this.current708Packet=null,this.services={},this.push=function(y){y.type===3?(d.new708Packet(),d.add708Bytes(y)):(d.current708Packet===null&&d.new708Packet(),d.add708Bytes(y))}};ze.prototype=new Bt,ze.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ze.prototype.add708Bytes=function(u){var d=u.ccData,p=d>>>8,f=d&255;this.current708Packet.ptsVals.push(u.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(f)},ze.prototype.push708Packet=function(){var u=this.current708Packet,d=u.data,p=null,f=null,v=0,y=d[v++];for(u.seq=y>>6,u.sizeCode=y&63;v<d.length;v++)y=d[v++],p=y>>5,f=y&31,p===7&&f>0&&(y=d[v++],p=y),this.pushServiceBlock(p,v,f),f>0&&(v+=f-1)},ze.prototype.pushServiceBlock=function(u,d,p){var f,v=d,y=this.current708Packet.data,B=this.services[u];for(B||(B=this.initService(u,v));v<d+p&&v<y.length;v++)f=y[v],Wt(f)?v=this.handleText(v,B):f===24?v=this.multiByteCharacter(v,B):f===16?v=this.extendedCommands(v,B):128<=f&&f<=135?v=this.setCurrentWindow(v,B):152<=f&&f<=159?v=this.defineWindow(v,B):f===136?v=this.clearWindows(v,B):f===140?v=this.deleteWindows(v,B):f===137?v=this.displayWindows(v,B):f===138?v=this.hideWindows(v,B):f===139?v=this.toggleWindows(v,B):f===151?v=this.setWindowAttributes(v,B):f===144?v=this.setPenAttributes(v,B):f===145?v=this.setPenColor(v,B):f===146?v=this.setPenLocation(v,B):f===143?B=this.reset(v,B):f===8?B.currentWindow.backspace():f===12?B.currentWindow.clearText():f===13?B.currentWindow.pendingNewLine=!0:f===14?B.currentWindow.clearText():f===141&&v++},ze.prototype.extendedCommands=function(u,d){var p=this.current708Packet.data,f=p[++u];return Wt(f)&&(u=this.handleText(u,d,{isExtended:!0})),u},ze.prototype.getPts=function(u){return this.current708Packet.ptsVals[Math.floor(u/2)]},ze.prototype.initService=function(u,d){var f="SERVICE"+u,p=this,f,v;return f in this.serviceEncodings&&(v=this.serviceEncodings[f]),this.services[u]=new lt(u,v,p),this.services[u].init(this.getPts(d),function(y){p.flushDisplayed(y,p.services[u])}),this.services[u]},ze.prototype.handleText=function(u,d,p){var f=p&&p.isExtended,v=p&&p.isMultiByte,y=this.current708Packet.data,B=f?4096:0,V=y[u],z=y[u+1],Y=d.currentWindow,te,se;function ke(oe){return oe.map(Le=>("0"+(Le&255).toString(16)).slice(-2)).join("")}if(v?(se=[V,z],u++):se=[V],d.textDecoder_&&!f)te=d.textDecoder_.decode(new Uint8Array(se));else if(v){const oe=ke(se);te=String.fromCharCode(parseInt(oe,16))}else te=Gt(B|V);return Y.pendingNewLine&&!Y.isEmpty()&&Y.newLine(this.getPts(u)),Y.pendingNewLine=!1,Y.addText(te),u},ze.prototype.multiByteCharacter=function(u,d){var p=this.current708Packet.data,f=p[u+1],v=p[u+2];return Wt(f)&&Wt(v)&&(u=this.handleText(++u,d,{isMultiByte:!0})),u},ze.prototype.setCurrentWindow=function(u,d){var p=this.current708Packet.data,f=p[u],v=f&7;return d.setCurrentWindow(v),u},ze.prototype.defineWindow=function(u,d){var p=this.current708Packet.data,f=p[u],v=f&7;d.setCurrentWindow(v);var y=d.currentWindow;return f=p[++u],y.visible=(f&32)>>5,y.rowLock=(f&16)>>4,y.columnLock=(f&8)>>3,y.priority=f&7,f=p[++u],y.relativePositioning=(f&128)>>7,y.anchorVertical=f&127,f=p[++u],y.anchorHorizontal=f,f=p[++u],y.anchorPoint=(f&240)>>4,y.rowCount=f&15,f=p[++u],y.columnCount=f&63,f=p[++u],y.windowStyle=(f&56)>>3,y.penStyle=f&7,y.virtualRowCount=y.rowCount+1,u},ze.prototype.setWindowAttributes=function(u,d){var p=this.current708Packet.data,f=p[u],v=d.currentWindow.winAttr;return f=p[++u],v.fillOpacity=(f&192)>>6,v.fillRed=(f&48)>>4,v.fillGreen=(f&12)>>2,v.fillBlue=f&3,f=p[++u],v.borderType=(f&192)>>6,v.borderRed=(f&48)>>4,v.borderGreen=(f&12)>>2,v.borderBlue=f&3,f=p[++u],v.borderType+=(f&128)>>5,v.wordWrap=(f&64)>>6,v.printDirection=(f&48)>>4,v.scrollDirection=(f&12)>>2,v.justify=f&3,f=p[++u],v.effectSpeed=(f&240)>>4,v.effectDirection=(f&12)>>2,v.displayEffect=f&3,u},ze.prototype.flushDisplayed=function(u,d){for(var p=[],f=0;f<8;f++)d.windows[f].visible&&!d.windows[f].isEmpty()&&p.push(d.windows[f].getText());d.endPts=u,d.text=p.join(`
205
+ `+r},Uf=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},e5=$f(Uf(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(d,p){u[d]||(u[d]=[]),u[d]=u[d].concat(p)},this.off=function(d,p){var f;return u[d]?(f=u[d].indexOf(p),u[d]=u[d].slice(),u[d].splice(f,1),f>-1):!1},this.trigger=function(d){var p,f,v,y;if(p=u[d],!!p)if(arguments.length===2)for(v=p.length,f=0;f<v;++f)p[f].call(this,arguments[1]);else{for(y=[],f=arguments.length,f=1;f<arguments.length;++f)y.push(arguments[f]);for(v=p.length,f=0;f<v;++f)p[f].apply(this,y)}},this.dispose=function(){u={}}}};e.prototype.pipe=function(u){return this.on("data",function(d){u.push(d)}),this.on("done",function(d){u.flush(d)}),this.on("partialdone",function(d){u.partialFlush(d)}),this.on("endedtimeline",function(d){u.endTimeline(d)}),this.on("reset",function(d){u.reset(d)}),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 t=e,n=Math.pow(2,32),s=function(u){var d=new DataView(u.buffer,u.byteOffset,u.byteLength),p;return d.getBigUint64?(p=d.getBigUint64(0),p<Number.MAX_SAFE_INTEGER?Number(p):p):d.getUint32(0)*n+d.getUint32(4)},a={getUint64:s,MAX_UINT32:n},o=a.MAX_UINT32,l,c,h,m,g,k,T,I,_,S,R,L,O,H,M,P,N,X,b,C,$,U,E,w,F,z,Q,q,Z,G,J,ie,oe,Ee,ue,$e;(function(){var u;if(E={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 E)E.hasOwnProperty(u)&&(E[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);w=new Uint8Array([105,115,111,109]),z=new Uint8Array([97,118,99,49]),F=new Uint8Array([0,0,0,1]),Q=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]),Z={video:Q,audio:q},ie=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),J=new Uint8Array([0,0,0,0,0,0,0,0]),oe=new Uint8Array([0,0,0,0,0,0,0,0]),Ee=oe,ue=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),$e=oe,G=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),l=function(u){var d=[],p=0,f,v,y;for(f=1;f<arguments.length;f++)d.push(arguments[f]);for(f=d.length;f--;)p+=d[f].byteLength;for(v=new Uint8Array(p+8),y=new DataView(v.buffer,v.byteOffset,v.byteLength),y.setUint32(0,v.byteLength),v.set(u,4),f=0,p=8;f<d.length;f++)v.set(d[f],p),p+=d[f].byteLength;return v},c=function(){return l(E.dinf,l(E.dref,ie))},h=function(u){return l(E.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(E.ftyp,w,F,w,z)},P=function(u){return l(E.hdlr,Z[u])},g=function(u){return l(E.mdat,u)},M=function(u){var d=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&&(d[12]=u.samplerate>>>24&255,d[13]=u.samplerate>>>16&255,d[14]=u.samplerate>>>8&255,d[15]=u.samplerate&255),l(E.mdhd,d)},H=function(u){return l(E.mdia,M(u),P(u.type),T(u))},k=function(u){return l(E.mfhd,new Uint8Array([0,0,0,0,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255]))},T=function(u){return l(E.minf,u.type==="video"?l(E.vmhd,G):l(E.smhd,J),c(),X(u))},I=function(u,d){for(var p=[],f=d.length;f--;)p[f]=C(d[f]);return l.apply(null,[E.moof,k(u)].concat(p))},_=function(u){for(var d=u.length,p=[];d--;)p[d]=L(u[d]);return l.apply(null,[E.moov,R(4294967295)].concat(p).concat(S(u)))},S=function(u){for(var d=u.length,p=[];d--;)p[d]=$(u[d]);return l.apply(null,[E.mvex].concat(p))},R=function(u){var d=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(E.mvhd,d)},N=function(u){var d=u.samples||[],p=new Uint8Array(4+d.length),f,v;for(v=0;v<d.length;v++)f=d[v].flags,p[v+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return l(E.sdtp,p)},X=function(u){return l(E.stbl,b(u),l(E.stts,$e),l(E.stsc,Ee),l(E.stsz,ue),l(E.stco,oe))},(function(){var u,d;b=function(p){return l(E.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),p.type==="video"?u(p):d(p))},u=function(p){var f=p.sps||[],v=p.pps||[],y=[],B=[],V,j;for(V=0;V<f.length;V++)y.push((f[V].byteLength&65280)>>>8),y.push(f[V].byteLength&255),y=y.concat(Array.prototype.slice.call(f[V]));for(V=0;V<v.length;V++)B.push((v[V].byteLength&65280)>>>8),B.push(v[V].byteLength&255),B=B.concat(Array.prototype.slice.call(v[V]));if(j=[E.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(E.avcC,new Uint8Array([1,p.profileIdc,p.profileCompatibility,p.levelIdc,255].concat([f.length],y,[v.length],B))),l(E.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],p.sarRatio){var Y=p.sarRatio[0],te=p.sarRatio[1];j.push(l(E.pasp,new Uint8Array([(Y&4278190080)>>24,(Y&16711680)>>16,(Y&65280)>>8,Y&255,(te&4278190080)>>24,(te&16711680)>>16,(te&65280)>>8,te&255])))}return l.apply(null,j)},d=function(p){return l(E.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]),h(p))}})(),O=function(u){var d=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(E.tkhd,d)},C=function(u){var d,p,f,v,y,B,V;return d=l(E.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])),B=Math.floor(u.baseMediaDecodeTime/o),V=Math.floor(u.baseMediaDecodeTime%o),p=l(E.tfdt,new Uint8Array([1,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,V>>>24&255,V>>>16&255,V>>>8&255,V&255])),y=92,u.type==="audio"?(f=U(u,y),l(E.traf,d,p,f)):(v=N(u),f=U(u,v.length+y),l(E.traf,d,p,f,v))},L=function(u){return u.duration=u.duration||4294967295,l(E.trak,O(u),H(u))},$=function(u){var d=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"&&(d[d.length-1]=0),l(E.trex,d)},(function(){var u,d,p;p=function(f,v){var y=0,B=0,V=0,j=0;return f.length&&(f[0].duration!==void 0&&(y=1),f[0].size!==void 0&&(B=2),f[0].flags!==void 0&&(V=4),f[0].compositionTimeOffset!==void 0&&(j=8)),[0,0,y|B|V|j,1,(f.length&4278190080)>>>24,(f.length&16711680)>>>16,(f.length&65280)>>>8,f.length&255,(v&4278190080)>>>24,(v&16711680)>>>16,(v&65280)>>>8,v&255]},d=function(f,v){var y,B,V,j,Y,te;for(j=f.samples||[],v+=20+16*j.length,V=p(j,v),B=new Uint8Array(V.length+j.length*16),B.set(V),y=V.length,te=0;te<j.length;te++)Y=j[te],B[y++]=(Y.duration&4278190080)>>>24,B[y++]=(Y.duration&16711680)>>>16,B[y++]=(Y.duration&65280)>>>8,B[y++]=Y.duration&255,B[y++]=(Y.size&4278190080)>>>24,B[y++]=(Y.size&16711680)>>>16,B[y++]=(Y.size&65280)>>>8,B[y++]=Y.size&255,B[y++]=Y.flags.isLeading<<2|Y.flags.dependsOn,B[y++]=Y.flags.isDependedOn<<6|Y.flags.hasRedundancy<<4|Y.flags.paddingValue<<1|Y.flags.isNonSyncSample,B[y++]=Y.flags.degradationPriority&61440,B[y++]=Y.flags.degradationPriority&15,B[y++]=(Y.compositionTimeOffset&4278190080)>>>24,B[y++]=(Y.compositionTimeOffset&16711680)>>>16,B[y++]=(Y.compositionTimeOffset&65280)>>>8,B[y++]=Y.compositionTimeOffset&255;return l(E.trun,B)},u=function(f,v){var y,B,V,j,Y,te;for(j=f.samples||[],v+=20+8*j.length,V=p(j,v),y=new Uint8Array(V.length+j.length*8),y.set(V),B=V.length,te=0;te<j.length;te++)Y=j[te],y[B++]=(Y.duration&4278190080)>>>24,y[B++]=(Y.duration&16711680)>>>16,y[B++]=(Y.duration&65280)>>>8,y[B++]=Y.duration&255,y[B++]=(Y.size&4278190080)>>>24,y[B++]=(Y.size&16711680)>>>16,y[B++]=(Y.size&65280)>>>8,y[B++]=Y.size&255;return l(E.trun,y)},U=function(f,v){return f.type==="audio"?u(f,v):d(f,v)}})();var Ie={ftyp:m,mdat:g,moof:I,moov:_,initSegment:function(u){var d=m(),p=_(u),f;return f=new Uint8Array(d.byteLength+p.byteLength),f.set(d),f.set(p,d.byteLength),f}},Oe=function(u){var d,p,f=[],v=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,f.byteLength=0,d=0;d<u.length;d++)p=u[d],p.nalUnitType==="access_unit_delimiter_rbsp"?(f.length&&(f.duration=p.dts-f.dts,v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.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 v.length&&(!f.duration||f.duration<=0)&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.push(f),v},Ye=function(u){var d,p,f=[],v=[];for(f.byteLength=0,f.nalCount=0,f.duration=0,f.pts=u[0].pts,f.dts=u[0].dts,v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=u[0].pts,v.dts=u[0].dts,d=0;d<u.length;d++)p=u[d],p.keyFrame?(f.length&&(v.push(f),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.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 v.length&&f.duration<=0&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.duration+=f.duration,v.push(f),v},Fe=function(u){var d;return!u[0][0].keyFrame&&u.length>1&&(d=u.shift(),u.byteLength-=d.byteLength,u.nalCount-=d.nalCount,u[0][0].dts=d.dts,u[0][0].pts=d.pts,u[0][0].duration+=d.duration),u},Ze=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Je=function(u,d){var p=Ze();return p.dataOffset=d,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},me=function(u,d){var p,f,v,y,B,V=d||0,j=[];for(p=0;p<u.length;p++)for(y=u[p],f=0;f<y.length;f++)B=y[f],v=Je(B,V),V+=v.size,j.push(v);return j},_e=function(u){var d,p,f,v,y,B,V=0,j=u.byteLength,Y=u.nalCount,te=j+4*Y,se=new Uint8Array(te),ke=new DataView(se.buffer);for(d=0;d<u.length;d++)for(v=u[d],p=0;p<v.length;p++)for(y=v[p],f=0;f<y.length;f++)B=y[f],ke.setUint32(V,B.data.byteLength),V+=4,se.set(B.data,V),V+=B.data.byteLength;return se},be=function(u,d){var p,f=d||0,v=[];return p=Je(u,f),v.push(p),v},Be=function(u){var d,p,f=0,v=u.byteLength,y=u.length,B=v+4*y,V=new Uint8Array(B),j=new DataView(V.buffer);for(d=0;d<u.length;d++)p=u[d],j.setUint32(f,p.data.byteLength),f+=4,V.set(p.data,f),f+=p.data.byteLength;return V},it={groupNalsIntoFrames:Oe,groupFramesIntoGops:Ye,extendFirstKeyFrame:Fe,generateSampleTable:me,concatenateNalData:_e,generateSampleTableForFrame:be,concatenateNalDataForFrame:Be},he=[33,16,5,32,164,27],de=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ce=function(u){for(var d=[];u--;)d.push(0);return d},De=function(u){return Object.keys(u).reduce(function(d,p){return d[p]=new Uint8Array(u[p].reduce(function(f,v){return f.concat(v)},[])),d},{})},Ce,et=function(){if(!Ce){var u={96e3:[he,[227,64],ce(154),[56]],88200:[he,[231],ce(170),[56]],64e3:[he,[248,192],ce(240),[56]],48e3:[he,[255,192],ce(268),[55,148,128],ce(54),[112]],44100:[he,[255,192],ce(268),[55,163,128],ce(84),[112]],32e3:[he,[255,192],ce(268),[55,234],ce(226),[112]],24e3:[he,[255,192],ce(268),[55,255,128],ce(268),[111,112],ce(126),[224]],16e3:[he,[255,192],ce(268),[55,255,128],ce(268),[111,255],ce(269),[223,108],ce(195),[1,192]],12e3:[de,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,253,128],ce(259),[56]],11025:[de,ce(268),[3,127,248],ce(268),[6,255,240],ce(268),[13,255,224],ce(268),[27,255,192],ce(268),[55,175,128],ce(108),[112]],8e3:[de,ce(268),[3,121,16],ce(47),[7]]};Ce=De(u)}return Ce},fe=9e4,ye,ge,qe,Ne,ft,Dt,pi;ye=function(u){return u*fe},ge=function(u,d){return u*d},qe=function(u){return u/fe},Ne=function(u,d){return u/d},ft=function(u,d){return ye(Ne(u,d))},Dt=function(u,d){return ge(qe(u),d)},pi=function(u,d,p){return qe(p?u:u-d)};var Xe={ONE_SECOND_IN_TS:fe,secondsToVideoTs:ye,secondsToAudioTs:ge,videoTsToSeconds:qe,audioTsToSeconds:Ne,audioTsToVideoTs:ft,videoTsToAudioTs:Dt,metadataTsToSeconds:pi},xi=et,Ht=Xe,Ci=function(u){var d,p,f=0;for(d=0;d<u.length;d++)p=u[d],f+=p.data.byteLength;return f},yt=function(u,d,p,f){var v,y=0,B=0,V=0,j=0,Y,te,se;if(d.length&&(v=Ht.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),y=Math.ceil(Ht.ONE_SECOND_IN_TS/(u.samplerate/1024)),p&&f&&(B=v-Math.max(p,f),V=Math.floor(B/y),j=V*y),!(V<1||j>Ht.ONE_SECOND_IN_TS/2))){for(Y=xi()[u.samplerate],Y||(Y=d[0].data),te=0;te<V;te++)se=d[0],d.splice(0,0,{data:Y,dts:se.dts-y,pts:se.pts-y});return u.baseMediaDecodeTime-=Math.floor(Ht.videoTsToAudioTs(j,u.samplerate)),j}},ei=function(u,d,p){return d.minSegmentDts>=p?u:(d.minSegmentDts=1/0,u.filter(function(f){return f.dts>=p?(d.minSegmentDts=Math.min(d.minSegmentDts,f.dts),d.minSegmentPts=d.minSegmentDts,!0):!1}))},li=function(u){var d,p,f=[];for(d=0;d<u.length;d++)p=u[d],f.push({size:p.data.byteLength,duration:1024});return f},jt=function(u){var d,p,f=0,v=new Uint8Array(Ci(u));for(d=0;d<u.length;d++)p=u[d],v.set(p.data,f),f+=p.data.byteLength;return v},Xi={prefixWithSilence:yt,trimAdtsFramesByEarliestDts:ei,generateSampleTable:li,concatenateFrameData:jt},Rt=Xe.ONE_SECOND_IN_TS,Ei=function(u,d){typeof d.pts=="number"&&(u.timelineStartInfo.pts===void 0&&(u.timelineStartInfo.pts=d.pts),u.minSegmentPts===void 0?u.minSegmentPts=d.pts:u.minSegmentPts=Math.min(u.minSegmentPts,d.pts),u.maxSegmentPts===void 0?u.maxSegmentPts=d.pts:u.maxSegmentPts=Math.max(u.maxSegmentPts,d.pts)),typeof d.dts=="number"&&(u.timelineStartInfo.dts===void 0&&(u.timelineStartInfo.dts=d.dts),u.minSegmentDts===void 0?u.minSegmentDts=d.dts:u.minSegmentDts=Math.min(u.minSegmentDts,d.dts),u.maxSegmentDts===void 0?u.maxSegmentDts=d.dts:u.maxSegmentDts=Math.max(u.maxSegmentDts,d.dts))},x=function(u){delete u.minSegmentDts,delete u.maxSegmentDts,delete u.minSegmentPts,delete u.maxSegmentPts},D=function(u,d){var p,f,v=u.minSegmentDts;return d||(v-=u.timelineStartInfo.dts),p=u.timelineStartInfo.baseMediaDecodeTime,p+=v,p=Math.max(0,p),u.type==="audio"&&(f=u.samplerate/Rt,p*=f,p=Math.floor(p)),p},K={clearDtsInfo:x,calculateTrackBaseMediaDecodeTime:D,collectDtsInfo:Ei},re=4,xe=128,Me=function(u){for(var d=0,p={payloadType:-1,payloadSize:0},f=0,v=0;d<u.byteLength&&u[d]!==xe;){for(;u[d]===255;)f+=255,d++;for(f+=u[d++];u[d]===255;)v+=255,d++;if(v+=u[d++],!p.payload&&f===re){var y=String.fromCharCode(u[d+3],u[d+4],u[d+5],u[d+6]);if(y==="GA94"){p.payloadType=f,p.payloadSize=v,p.payload=u.subarray(d,d+v);break}else p.payload=void 0}d+=v,f=0,v=0}return p},nt=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)},St=function(u,d){var p=[],f,v,y,B;if(!(d[0]&64))return p;for(v=d[0]&31,f=0;f<v;f++)y=f*3,B={type:d[y+2]&3,pts:u},d[y+2]&4&&(B.ccData=d[y+3]<<8|d[y+4],p.push(B));return p},zt=function(u){for(var d=u.byteLength,p=[],f=1,v,y;f<d-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;v=d-p.length,y=new Uint8Array(v);var B=0;for(f=0;f<v;B++,f++)B===p[0]&&(B++,p.shift()),y[f]=u[B];return y},Vt={parseSei:Me,parseUserData:nt,parseCaptionPackets:St,discardEmulationPreventionBytes:zt,USER_DATA_REGISTERED_ITU_T_T35:re},Bt=t,ti=Vt,Ke=function(u){u=u||{},Ke.prototype.init.call(this),this.parse708captions_=typeof u.parse708captions=="boolean"?u.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Se(0,0),new Se(0,1),new Se(1,0),new Se(1,1)],this.parse708captions_&&(this.cc708Stream_=new ze({captionServices:u.captionServices})),this.reset(),this.ccStreams_.forEach(function(d){d.on("data",this.trigger.bind(this,"data")),d.on("partialdone",this.trigger.bind(this,"partialdone")),d.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")))};Ke.prototype=new Bt,Ke.prototype.push=function(u){var d,p,f;if(u.nalUnitType==="sei_rbsp"&&(d=ti.parseSei(u.escapedRBSP),!!d.payload&&d.payloadType===ti.USER_DATA_REGISTERED_ITU_T_T35&&(p=ti.parseUserData(d),!!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=ti.parseCaptionPackets(u.pts,p),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==u.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=u.dts}},Ke.prototype.flushCCStreams=function(u){this.ccStreams_.forEach(function(d){return u==="flush"?d.flush():d.partialFlush()},this)},Ke.prototype.flushStream=function(u){if(!this.captionPackets_.length){this.flushCCStreams(u);return}this.captionPackets_.forEach(function(d,p){d.presortIndex=p}),this.captionPackets_.sort(function(d,p){return d.pts===p.pts?d.presortIndex-p.presortIndex:d.pts-p.pts}),this.captionPackets_.forEach(function(d){d.type<2?this.dispatchCea608Packet(d):this.dispatchCea708Packet(d)},this),this.captionPackets_.length=0,this.flushCCStreams(u)},Ke.prototype.flush=function(){return this.flushStream("flush")},Ke.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ke.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(u){u.reset()})},Ke.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)},Ke.prototype.setsChannel1Active=function(u){return(u.ccData&30720)===4096},Ke.prototype.setsChannel2Active=function(u){return(u.ccData&30720)===6144},Ke.prototype.setsTextOrXDSActive=function(u){return(u.ccData&28928)===256||(u.ccData&30974)===4138||(u.ccData&30974)===6186},Ke.prototype.dispatchCea708Packet=function(u){this.parse708captions_&&this.cc708Stream_.push(u)};var ii={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},Gt=function(u){var d=ii[u]||u;return u&4096&&u===d?"":String.fromCharCode(d)},Wt=function(u){return 32<=u&&u<=127||160<=u&&u<=255},kt=function(u){this.windowNum=u,this.reset()};kt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},kt.prototype.getText=function(){return this.rows.join(`
206
+ `)},kt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},kt.prototype.newLine=function(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--},kt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},kt.prototype.addText=function(u){this.rows[this.rowIdx]+=u},kt.prototype.backspace=function(){if(!this.isEmpty()){var u=this.rows[this.rowIdx];this.rows[this.rowIdx]=u.substr(0,u.length-1)}};var lt=function(u,d,p){this.serviceNum=u,this.text="",this.currentWindow=new kt(-1),this.windows=[],this.stream=p,typeof d=="string"&&this.createTextDecoder(d)};lt.prototype.init=function(u,d){this.startPts=u;for(var p=0;p<8;p++)this.windows[p]=new kt(p),typeof d=="function"&&(this.windows[p].beforeRowOverflow=d)},lt.prototype.setCurrentWindow=function(u){this.currentWindow=this.windows[u]},lt.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(d){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+u+" encoding. "+d})}};var ze=function(u){u=u||{},ze.prototype.init.call(this);var d=this,p=u.captionServices||{},f={},v;Object.keys(p).forEach(y=>{v=p[y],/^SERVICE/.test(y)&&(f[y]=v.encoding)}),this.serviceEncodings=f,this.current708Packet=null,this.services={},this.push=function(y){y.type===3?(d.new708Packet(),d.add708Bytes(y)):(d.current708Packet===null&&d.new708Packet(),d.add708Bytes(y))}};ze.prototype=new Bt,ze.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},ze.prototype.add708Bytes=function(u){var d=u.ccData,p=d>>>8,f=d&255;this.current708Packet.ptsVals.push(u.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(f)},ze.prototype.push708Packet=function(){var u=this.current708Packet,d=u.data,p=null,f=null,v=0,y=d[v++];for(u.seq=y>>6,u.sizeCode=y&63;v<d.length;v++)y=d[v++],p=y>>5,f=y&31,p===7&&f>0&&(y=d[v++],p=y),this.pushServiceBlock(p,v,f),f>0&&(v+=f-1)},ze.prototype.pushServiceBlock=function(u,d,p){var f,v=d,y=this.current708Packet.data,B=this.services[u];for(B||(B=this.initService(u,v));v<d+p&&v<y.length;v++)f=y[v],Wt(f)?v=this.handleText(v,B):f===24?v=this.multiByteCharacter(v,B):f===16?v=this.extendedCommands(v,B):128<=f&&f<=135?v=this.setCurrentWindow(v,B):152<=f&&f<=159?v=this.defineWindow(v,B):f===136?v=this.clearWindows(v,B):f===140?v=this.deleteWindows(v,B):f===137?v=this.displayWindows(v,B):f===138?v=this.hideWindows(v,B):f===139?v=this.toggleWindows(v,B):f===151?v=this.setWindowAttributes(v,B):f===144?v=this.setPenAttributes(v,B):f===145?v=this.setPenColor(v,B):f===146?v=this.setPenLocation(v,B):f===143?B=this.reset(v,B):f===8?B.currentWindow.backspace():f===12?B.currentWindow.clearText():f===13?B.currentWindow.pendingNewLine=!0:f===14?B.currentWindow.clearText():f===141&&v++},ze.prototype.extendedCommands=function(u,d){var p=this.current708Packet.data,f=p[++u];return Wt(f)&&(u=this.handleText(u,d,{isExtended:!0})),u},ze.prototype.getPts=function(u){return this.current708Packet.ptsVals[Math.floor(u/2)]},ze.prototype.initService=function(u,d){var f="SERVICE"+u,p=this,f,v;return f in this.serviceEncodings&&(v=this.serviceEncodings[f]),this.services[u]=new lt(u,v,p),this.services[u].init(this.getPts(d),function(y){p.flushDisplayed(y,p.services[u])}),this.services[u]},ze.prototype.handleText=function(u,d,p){var f=p&&p.isExtended,v=p&&p.isMultiByte,y=this.current708Packet.data,B=f?4096:0,V=y[u],j=y[u+1],Y=d.currentWindow,te,se;function ke(le){return le.map(Le=>("0"+(Le&255).toString(16)).slice(-2)).join("")}if(v?(se=[V,j],u++):se=[V],d.textDecoder_&&!f)te=d.textDecoder_.decode(new Uint8Array(se));else if(v){const le=ke(se);te=String.fromCharCode(parseInt(le,16))}else te=Gt(B|V);return Y.pendingNewLine&&!Y.isEmpty()&&Y.newLine(this.getPts(u)),Y.pendingNewLine=!1,Y.addText(te),u},ze.prototype.multiByteCharacter=function(u,d){var p=this.current708Packet.data,f=p[u+1],v=p[u+2];return Wt(f)&&Wt(v)&&(u=this.handleText(++u,d,{isMultiByte:!0})),u},ze.prototype.setCurrentWindow=function(u,d){var p=this.current708Packet.data,f=p[u],v=f&7;return d.setCurrentWindow(v),u},ze.prototype.defineWindow=function(u,d){var p=this.current708Packet.data,f=p[u],v=f&7;d.setCurrentWindow(v);var y=d.currentWindow;return f=p[++u],y.visible=(f&32)>>5,y.rowLock=(f&16)>>4,y.columnLock=(f&8)>>3,y.priority=f&7,f=p[++u],y.relativePositioning=(f&128)>>7,y.anchorVertical=f&127,f=p[++u],y.anchorHorizontal=f,f=p[++u],y.anchorPoint=(f&240)>>4,y.rowCount=f&15,f=p[++u],y.columnCount=f&63,f=p[++u],y.windowStyle=(f&56)>>3,y.penStyle=f&7,y.virtualRowCount=y.rowCount+1,u},ze.prototype.setWindowAttributes=function(u,d){var p=this.current708Packet.data,f=p[u],v=d.currentWindow.winAttr;return f=p[++u],v.fillOpacity=(f&192)>>6,v.fillRed=(f&48)>>4,v.fillGreen=(f&12)>>2,v.fillBlue=f&3,f=p[++u],v.borderType=(f&192)>>6,v.borderRed=(f&48)>>4,v.borderGreen=(f&12)>>2,v.borderBlue=f&3,f=p[++u],v.borderType+=(f&128)>>5,v.wordWrap=(f&64)>>6,v.printDirection=(f&48)>>4,v.scrollDirection=(f&12)>>2,v.justify=f&3,f=p[++u],v.effectSpeed=(f&240)>>4,v.effectDirection=(f&12)>>2,v.displayEffect=f&3,u},ze.prototype.flushDisplayed=function(u,d){for(var p=[],f=0;f<8;f++)d.windows[f].visible&&!d.windows[f].isEmpty()&&p.push(d.windows[f].getText());d.endPts=u,d.text=p.join(`
207
207
 
208
- `),this.pushCaption(d),d.startPts=u},ze.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)},ze.prototype.displayWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&(d.windows[y].visible=1);return u},ze.prototype.hideWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&(d.windows[y].visible=0);return u},ze.prototype.toggleWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&(d.windows[y].visible^=1);return u},ze.prototype.clearWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&d.windows[y].clearText();return u},ze.prototype.deleteWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&d.windows[y].reset();return u},ze.prototype.setPenAttributes=function(u,d){var p=this.current708Packet.data,f=p[u],v=d.currentWindow.penAttr;return f=p[++u],v.textTag=(f&240)>>4,v.offset=(f&12)>>2,v.penSize=f&3,f=p[++u],v.italics=(f&128)>>7,v.underline=(f&64)>>6,v.edgeType=(f&56)>>3,v.fontStyle=f&7,u},ze.prototype.setPenColor=function(u,d){var p=this.current708Packet.data,f=p[u],v=d.currentWindow.penColor;return f=p[++u],v.fgOpacity=(f&192)>>6,v.fgRed=(f&48)>>4,v.fgGreen=(f&12)>>2,v.fgBlue=f&3,f=p[++u],v.bgOpacity=(f&192)>>6,v.bgRed=(f&48)>>4,v.bgGreen=(f&12)>>2,v.bgBlue=f&3,f=p[++u],v.edgeRed=(f&48)>>4,v.edgeGreen=(f&12)>>2,v.edgeBlue=f&3,u},ze.prototype.setPenLocation=function(u,d){var p=this.current708Packet.data,f=p[u],v=d.currentWindow.penLoc;return d.currentWindow.pendingNewLine=!0,f=p[++u],v.row=f&15,f=p[++u],v.column=f&63,u},ze.prototype.reset=function(u,d){var p=this.getPts(u);return this.flushDisplayed(p,d),this.initService(d.serviceNum,u)};var Si={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Pi=function(u){return u===null?"":(u=Si[u]||u,String.fromCharCode(u))},xn=14,gs=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ki=function(){for(var u=[],d=xn+1;d--;)u.push({text:"",indent:0,offset:0});return u},Se=function(u,d){Se.prototype.init.call(this),this.field_=u||0,this.dataChannel_=d||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(p){var f,v,y,B,V;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),y=f>>>8,B=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),v=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=v,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_=Ki();else if(f===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ki();else if(f===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(p.pts),this.displayed_=Ki()),this.mode_="paintOn",this.startPts_=p.pts;else if(this.isSpecialCharacter(y,B))y=(y&3)<<8,V=Pi(y|B),this[this.mode_](p.pts,V),this.column_++;else if(this.isExtCharacter(y,B))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),y=(y&3)<<8,V=Pi(y|B),this[this.mode_](p.pts,V),this.column_++;else if(this.isMidRowCode(y,B))this.clearFormatting(p.pts),this[this.mode_](p.pts," "),this.column_++,(B&14)===14&&this.addFormatting(p.pts,["i"]),(B&1)===1&&this.addFormatting(p.pts,["u"]);else if(this.isOffsetControlCode(y,B)){const Y=B&3;this.nonDisplayed_[this.row_].offset=Y,this.column_+=Y}else if(this.isPAC(y,B)){var z=gs.indexOf(f&7968);if(this.mode_==="rollUp"&&(z-this.rollUpRows_+1<0&&(z=this.rollUpRows_-1),this.setRollUp(p.pts,z)),z!==this.row_&&z>=0&&z<=14&&(this.clearFormatting(p.pts),this.row_=z),B&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(B)&&(B&14)===14&&this.addFormatting(p.pts,["i"])}else this.isNormalChar(y)&&(B===0&&(B=null),V=Pi(y),V+=Pi(B),this[this.mode_](p.pts,V),this.column_+=V.length)}};Se.prototype=new Bt,Se.prototype.flushDisplayed=function(u){const d=f=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."})},p=[];this.displayed_.forEach((f,v)=>{if(f&&f.text&&f.text.length){try{f.text=f.text.trim()}catch{d(v)}f.text.length&&p.push({text:f.text,line:v+1,position:10+Math.min(70,f.indent*10)+f.offset*2.5})}else f==null&&d(v)}),p.length&&this.trigger("data",{startPts:this.startPts_,endPts:u,content:p,stream:this.name_})},Se.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ki(),this.nonDisplayed_=Ki(),this.lastControlCode_=null,this.column_=0,this.row_=xn,this.rollUpRows_=2,this.formatting_=[]},Se.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Se.prototype.isSpecialCharacter=function(u,d){return u===this.EXT_&&d>=48&&d<=63},Se.prototype.isExtCharacter=function(u,d){return(u===this.EXT_+1||u===this.EXT_+2)&&d>=32&&d<=63},Se.prototype.isMidRowCode=function(u,d){return u===this.EXT_&&d>=32&&d<=47},Se.prototype.isOffsetControlCode=function(u,d){return u===this.OFFSET_&&d>=33&&d<=35},Se.prototype.isPAC=function(u,d){return u>=this.BASE_&&u<this.BASE_+8&&d>=64&&d<=127},Se.prototype.isColorPAC=function(u){return u>=64&&u<=79||u>=96&&u<=127},Se.prototype.isNormalChar=function(u){return u>=32&&u<=127},Se.prototype.setRollUp=function(u,d){if(this.mode_!=="rollUp"&&(this.row_=xn,this.mode_="rollUp",this.flushDisplayed(u),this.nonDisplayed_=Ki(),this.displayed_=Ki()),d!==void 0&&d!==this.row_)for(var p=0;p<this.rollUpRows_;p++)this.displayed_[d-p]=this.displayed_[this.row_-p],this.displayed_[this.row_-p]={text:"",indent:0,offset:0};d===void 0&&(d=this.row_),this.topRow_=d-this.rollUpRows_+1},Se.prototype.addFormatting=function(u,d){this.formatting_=this.formatting_.concat(d);var p=d.reduce(function(f,v){return f+"<"+v+">"},"");this[this.mode_](u,p)},Se.prototype.clearFormatting=function(u){if(this.formatting_.length){var d=this.formatting_.reverse().reduce(function(p,f){return p+"</"+f+">"},"");this.formatting_=[],this[this.mode_](u,d)}},Se.prototype.popOn=function(u,d){var p=this.nonDisplayed_[this.row_].text;p+=d,this.nonDisplayed_[this.row_].text=p},Se.prototype.rollUp=function(u,d){var p=this.displayed_[this.row_].text;p+=d,this.displayed_[this.row_].text=p},Se.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<xn+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}},Se.prototype.paintOn=function(u,d){var p=this.displayed_[this.row_].text;p+=d,this.displayed_[this.row_].text=p};var ee={CaptionStream:Ke,Cea608Stream:Se,Cea708Stream:ze},pe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},we=t,Qe=8589934592,Ft=4294967296,wt="shared",Tt=function(u,d){var p=1;for(u>d&&(p=-1);Math.abs(d-u)>Ft;)u+=p*Qe;return u},ki=function(u){var d,p;ki.prototype.init.call(this),this.type_=u||wt,this.push=function(f){if(f.type==="metadata"){this.trigger("data",f);return}this.type_!==wt&&f.type!==this.type_||(p===void 0&&(p=f.dts),f.dts=Tt(f.dts,p),f.pts=Tt(f.pts,p),d=f.dts,this.trigger("data",f))},this.flush=function(){p=d,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){p=void 0,d=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};ki.prototype=new we;var gt={TimestampRolloverStream:ki,handleRollover:Tt},Er=(u,d,p)=>{if(!u)return-1;for(var f=p;f<u.length;f++)if(u[f]===d)return f;return-1},vs={typedArrayIndexOf:Er},Sr=vs.typedArrayIndexOf,_s={Utf8:3},yu=function(u,d,p){var f,v="";for(f=d;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},kr=function(u,d,p){return decodeURIComponent(yu(u,d,p))},wr=function(u,d,p){return unescape(yu(u,d,p))},Dr=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},Ar={APIC:function(u){var d=1,p,f,v="-->";u.data[0]===_s.Utf8&&(p=Sr(u.data,0,d),!(p<0)&&(u.mimeType=wr(u.data,d,p),d=p+1,u.pictureType=u.data[d],d++,f=Sr(u.data,0,d),!(f<0)&&(u.description=kr(u.data,d,f),d=f+1,u.mimeType===v?u.url=wr(u.data,d,u.data.length):u.pictureData=u.data.subarray(d,u.data.length))))},"T*":function(u){u.data[0]===_s.Utf8&&(u.value=kr(u.data,1,u.data.length).replace(/\0*$/,""),u.values=u.value.split("\0"))},TXXX:function(u){var d;u.data[0]===_s.Utf8&&(d=Sr(u.data,0,1),d!==-1&&(u.description=kr(u.data,1,d),u.value=kr(u.data,d+1,u.data.length).replace(/\0*$/,""),u.data=u.value))},"W*":function(u){u.url=wr(u.data,0,u.data.length).replace(/\0.*$/,"")},WXXX:function(u){var d;u.data[0]===_s.Utf8&&(d=Sr(u.data,0,1),d!==-1&&(u.description=kr(u.data,1,d),u.url=wr(u.data,d+1,u.data.length).replace(/\0.*$/,"")))},PRIV:function(u){var d;for(d=0;d<u.data.length;d++)if(u.data[d]===0){u.owner=wr(u.data,0,d);break}u.privateData=u.data.subarray(d+1),u.data=u.privateData}},pp=function(u){var d,p,f=10,v=0,y=[];if(!(u.length<10||u[0]!==73||u[1]!==68||u[2]!==51)){v=Dr(u.subarray(6,10)),v+=10;var B=u[5]&64;B&&(f+=4,f+=Dr(u.subarray(10,14)),v-=Dr(u.subarray(16,20)));do{if(d=Dr(u.subarray(f+4,f+8)),d<1)break;p=String.fromCharCode(u[f],u[f+1],u[f+2],u[f+3]);var V={id:p,data:u.subarray(f+10,f+d+10)};V.key=V.id,Ar[V.id]?Ar[V.id](V):V.id[0]==="T"?Ar["T*"](V):V.id[0]==="W"&&Ar["W*"](V),y.push(V),f+=10,f+=d}while(f<v);return y}},Tu={parseId3Frames:pp,parseSyncSafeInteger:Dr,frameParsers:Ar},mp=t,gp=pe,on=Tu,ys;ys=function(u){var d={descriptor:u&&u.descriptor},p=0,f=[],v=0,y;if(ys.prototype.init.call(this),this.dispatchType=gp.METADATA_STREAM_TYPE.toString(16),d.descriptor)for(y=0;y<d.descriptor.length;y++)this.dispatchType+=("00"+d.descriptor[y].toString(16)).slice(-2);this.push=function(B){var V,z,Y,te,se,ke;if(B.type==="timed-metadata"){if(B.dataAlignmentIndicator&&(v=0,f.length=0),f.length===0&&(B.data.length<10||B.data[0]!==73||B.data[1]!==68||B.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(f.push(B),v+=B.data.byteLength,f.length===1&&(p=on.parseSyncSafeInteger(B.data.subarray(6,10)),p+=10),!(v<p)){for(V={data:new Uint8Array(p),frames:[],pts:f[0].pts,dts:f[0].dts},se=0;se<p;)V.data.set(f[0].data.subarray(0,p-se),se),se+=f[0].data.byteLength,v-=f[0].data.byteLength,f.shift();z=10,V.data[5]&64&&(z+=4,z+=on.parseSyncSafeInteger(V.data.subarray(10,14)),p-=on.parseSyncSafeInteger(V.data.subarray(16,20)));do{if(Y=on.parseSyncSafeInteger(V.data.subarray(z+4,z+8)),Y<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(ke=String.fromCharCode(V.data[z],V.data[z+1],V.data[z+2],V.data[z+3]),te={id:ke,data:V.data.subarray(z+10,z+Y+10)},te.key=te.id,on.frameParsers[te.id]?on.frameParsers[te.id](te):te.id[0]==="T"?on.frameParsers["T*"](te):te.id[0]==="W"&&on.frameParsers["W*"](te),te.owner==="com.apple.streaming.transportStreamTimestamp"){var oe=te.data,Le=(oe[3]&1)<<30|oe[4]<<22|oe[5]<<14|oe[6]<<6|oe[7]>>>2;Le*=4,Le+=oe[7]&3,te.timeStamp=Le,V.pts===void 0&&V.dts===void 0&&(V.pts=te.timeStamp,V.dts=te.timeStamp),this.trigger("timestamp",te)}V.frames.push(te),z+=10,z+=Y}while(z<p);this.trigger("data",V)}}}},ys.prototype=new mp;var vp=ys,Xa=t,Ka=ee,wi=pe,_p=gt.TimestampRolloverStream,Ts,Nr,bs,$n=188,Qa=71;Ts=function(){var u=new Uint8Array($n),d=0;Ts.prototype.init.call(this),this.push=function(p){var f=0,v=$n,y;for(d?(y=new Uint8Array(p.byteLength+d),y.set(u.subarray(0,d)),y.set(p,d),d=0):y=p;v<y.byteLength;){if(y[f]===Qa&&y[v]===Qa){this.trigger("data",y.subarray(f,v)),f+=$n,v+=$n;continue}f++,v++}f<y.byteLength&&(u.set(y.subarray(f),0),d=y.byteLength-f)},this.flush=function(){d===$n&&u[0]===Qa&&(this.trigger("data",u),d=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){d=0,this.trigger("reset")}},Ts.prototype=new Xa,Nr=function(){var u,d,p,f;Nr.prototype.init.call(this),f=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,u=function(v,y){var B=0;y.payloadUnitStartIndicator&&(B+=v[B]+1),y.type==="pat"?d(v.subarray(B),y):p(v.subarray(B),y)},d=function(v,y){y.section_number=v[7],y.last_section_number=v[8],f.pmtPid=(v[10]&31)<<8|v[11],y.pmtPid=f.pmtPid},p=function(v,y){var B,V,z,Y;if(v[5]&1){for(f.programMapTable={video:null,audio:null,"timed-metadata":{}},B=(v[1]&15)<<8|v[2],V=3+B-4,z=(v[10]&15)<<8|v[11],Y=12+z;Y<V;){var te=v[Y],se=(v[Y+1]&31)<<8|v[Y+2];te===wi.H264_STREAM_TYPE&&f.programMapTable.video===null?f.programMapTable.video=se:te===wi.ADTS_STREAM_TYPE&&f.programMapTable.audio===null?f.programMapTable.audio=se:te===wi.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][se]=te),Y+=((v[Y+3]&15)<<8|v[Y+4])+5}y.programMapTable=f.programMapTable}},this.push=function(v){var y={},B=4;if(y.payloadUnitStartIndicator=!!(v[1]&64),y.pid=v[1]&31,y.pid<<=8,y.pid|=v[2],(v[3]&48)>>>4>1&&(B+=v[B]+1),y.pid===0)y.type="pat",u(v.subarray(B),y),this.trigger("data",y);else if(y.pid===this.pmtPid)for(y.type="pmt",u(v.subarray(B),y),this.trigger("data",y);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([v,B,y]):this.processPes_(v,B,y)},this.processPes_=function(v,y,B){B.pid===this.programMapTable.video?B.streamType=wi.H264_STREAM_TYPE:B.pid===this.programMapTable.audio?B.streamType=wi.ADTS_STREAM_TYPE:B.streamType=this.programMapTable["timed-metadata"][B.pid],B.type="pes",B.data=v.subarray(y),this.trigger("data",B)}},Nr.prototype=new Xa,Nr.STREAM_TYPES={h264:27,adts:15},bs=function(){var u=this,d=!1,p={data:[],size:0},f={data:[],size:0},v={data:[],size:0},y,B=function(z,Y){var te;const se=z[0]<<16|z[1]<<8|z[2];Y.data=new Uint8Array,se===1&&(Y.packetLength=6+(z[4]<<8|z[5]),Y.dataAlignmentIndicator=(z[6]&4)!==0,te=z[7],te&192&&(Y.pts=(z[9]&14)<<27|(z[10]&255)<<20|(z[11]&254)<<12|(z[12]&255)<<5|(z[13]&254)>>>3,Y.pts*=4,Y.pts+=(z[13]&6)>>>1,Y.dts=Y.pts,te&64&&(Y.dts=(z[14]&14)<<27|(z[15]&255)<<20|(z[16]&254)<<12|(z[17]&255)<<5|(z[18]&254)>>>3,Y.dts*=4,Y.dts+=(z[18]&6)>>>1)),Y.data=z.subarray(9+z[8]))},V=function(z,Y,te){var se=new Uint8Array(z.size),ke={type:Y},oe=0,Le=0,je=!1,At;if(!(!z.data.length||z.size<9)){for(ke.trackId=z.data[0].pid,oe=0;oe<z.data.length;oe++)At=z.data[oe],se.set(At.data,Le),Le+=At.data.byteLength;B(se,ke),je=Y==="video"||ke.packetLength<=z.size,(te||je)&&(z.size=0,z.data.length=0),je&&u.trigger("data",ke)}};bs.prototype.init.call(this),this.push=function(z){({pat:function(){},pes:function(){var Y,te;switch(z.streamType){case wi.H264_STREAM_TYPE:Y=p,te="video";break;case wi.ADTS_STREAM_TYPE:Y=f,te="audio";break;case wi.METADATA_STREAM_TYPE:Y=v,te="timed-metadata";break;default:return}z.payloadUnitStartIndicator&&V(Y,te,!0),Y.data.push(z),Y.size+=z.data.byteLength},pmt:function(){var Y={type:"metadata",tracks:[]};y=z.programMapTable,y.video!==null&&Y.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),y.audio!==null&&Y.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),d=!0,u.trigger("data",Y)}})[z.type]()},this.reset=function(){p.size=0,p.data.length=0,f.size=0,f.data.length=0,this.trigger("reset")},this.flushStreams_=function(){V(p,"video"),V(f,"audio"),V(v,"timed-metadata")},this.flush=function(){if(!d&&y){var z={type:"metadata",tracks:[]};y.video!==null&&z.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),y.audio!==null&&z.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),u.trigger("data",z)}d=!1,this.flushStreams_(),this.trigger("done")}},bs.prototype=new Xa;var bu={PAT_PID:0,MP2T_PACKET_LENGTH:$n,TransportPacketStream:Ts,TransportParseStream:Nr,ElementaryStream:bs,TimestampRolloverStream:_p,CaptionStream:Ka.CaptionStream,Cea608Stream:Ka.Cea608Stream,Cea708Stream:Ka.Cea708Stream,MetadataStream:vp};for(var Za in wi)wi.hasOwnProperty(Za)&&(bu[Za]=wi[Za]);var yp=bu,Tp=t,bp=Xe.ONE_SECOND_IN_TS,xs,xu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];xs=function(u){var d,p=0;xs.prototype.init.call(this),this.skipWarn_=function(f,v){this.trigger("log",{level:"warn",message:`adts skiping bytes ${f} to ${v} in frame ${p} outside syncword`})},this.push=function(f){var v=0,y,B,V,z,Y;if(u||(p=0),f.type==="audio"){d&&d.length?(V=d,d=new Uint8Array(V.byteLength+f.data.byteLength),d.set(V),d.set(f.data,V.byteLength)):d=f.data;for(var te;v+7<d.length;){if(d[v]!==255||(d[v+1]&246)!==240){typeof te!="number"&&(te=v),v++;continue}if(typeof te=="number"&&(this.skipWarn_(te,v),te=null),B=(~d[v+1]&1)*2,y=(d[v+3]&3)<<11|d[v+4]<<3|(d[v+5]&224)>>5,z=((d[v+6]&3)+1)*1024,Y=z*bp/xu[(d[v+2]&60)>>>2],d.byteLength-v<y)break;this.trigger("data",{pts:f.pts+p*Y,dts:f.dts+p*Y,sampleCount:z,audioobjecttype:(d[v+2]>>>6&3)+1,channelcount:(d[v+2]&1)<<2|(d[v+3]&192)>>>6,samplerate:xu[(d[v+2]&60)>>>2],samplingfrequencyindex:(d[v+2]&60)>>>2,samplesize:16,data:d.subarray(v+7+B,v+y)}),p++,v+=y}typeof te=="number"&&(this.skipWarn_(te,v),te=null),d=d.subarray(v)}},this.flush=function(){p=0,this.trigger("done")},this.reset=function(){d=void 0,this.trigger("reset")},this.endTimeline=function(){d=void 0,this.trigger("endedtimeline")}},xs.prototype=new Tp;var xp=xs,Cu;Cu=function(u){var d=u.byteLength,p=0,f=0;this.length=function(){return 8*d},this.bitsAvailable=function(){return 8*d+f},this.loadWord=function(){var v=u.byteLength-d,y=new Uint8Array(4),B=Math.min(4,d);if(B===0)throw new Error("no bytes available");y.set(u.subarray(v,v+B)),p=new DataView(y.buffer).getUint32(0),f=B*8,d-=B},this.skipBits=function(v){var y;f>v?(p<<=v,f-=v):(v-=f,y=Math.floor(v/8),v-=y*8,d-=y,this.loadWord(),p<<=v,f-=v)},this.readBits=function(v){var y=Math.min(f,v),B=p>>>32-y;return f-=y,f>0?p<<=y:d>0&&this.loadWord(),y=v-y,y>0?B<<y|this.readBits(y):B},this.skipLeadingZeros=function(){var v;for(v=0;v<f;++v)if((p&2147483648>>>v)!==0)return p<<=v,f-=v,v;return this.loadWord(),v+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var v=this.skipLeadingZeros();return this.readBits(v+1)-1},this.readExpGolomb=function(){var v=this.readUnsignedExpGolomb();return 1&v?1+v>>>1:-1*(v>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Cp=Cu,Eu=t,Ep=Cp,Cs,Es,Su;Es=function(){var u=0,d,p;Es.prototype.init.call(this),this.push=function(f){var v;p?(v=new Uint8Array(p.byteLength+f.data.byteLength),v.set(p),v.set(f.data,p.byteLength),p=v):p=f.data;for(var y=p.byteLength;u<y-3;u++)if(p[u+2]===1){d=u+5;break}for(;d<y;)switch(p[d]){case 0:if(p[d-1]!==0){d+=2;break}else if(p[d-2]!==0){d++;break}u+3!==d-2&&this.trigger("data",p.subarray(u+3,d-2));do d++;while(p[d]!==1&&d<y);u=d-2,d+=3;break;case 1:if(p[d-1]!==0||p[d-2]!==0){d+=3;break}this.trigger("data",p.subarray(u+3,d-2)),u=d-2,d+=3;break;default:d+=3;break}p=p.subarray(u),d-=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")}},Es.prototype=new Eu,Su={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Cs=function(){var u=new Es,d,p,f,v,y,B,V;Cs.prototype.init.call(this),d=this,this.push=function(z){z.type==="video"&&(p=z.trackId,f=z.pts,v=z.dts,u.push(z))},u.on("data",function(z){var Y={trackId:p,pts:f,dts:v,data:z,nalUnitTypeCode:z[0]&31};switch(Y.nalUnitTypeCode){case 5:Y.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:Y.nalUnitType="sei_rbsp",Y.escapedRBSP=y(z.subarray(1));break;case 7:Y.nalUnitType="seq_parameter_set_rbsp",Y.escapedRBSP=y(z.subarray(1)),Y.config=B(Y.escapedRBSP);break;case 8:Y.nalUnitType="pic_parameter_set_rbsp";break;case 9:Y.nalUnitType="access_unit_delimiter_rbsp";break}d.trigger("data",Y)}),u.on("done",function(){d.trigger("done")}),u.on("partialdone",function(){d.trigger("partialdone")}),u.on("reset",function(){d.trigger("reset")}),u.on("endedtimeline",function(){d.trigger("endedtimeline")}),this.flush=function(){u.flush()},this.partialFlush=function(){u.partialFlush()},this.reset=function(){u.reset()},this.endTimeline=function(){u.endTimeline()},V=function(z,Y){var te=8,se=8,ke,oe;for(ke=0;ke<z;ke++)se!==0&&(oe=Y.readExpGolomb(),se=(te+oe+256)%256),te=se===0?te:se},y=function(z){for(var Y=z.byteLength,te=[],se=1,ke,oe;se<Y-2;)z[se]===0&&z[se+1]===0&&z[se+2]===3?(te.push(se+2),se+=2):se++;if(te.length===0)return z;ke=Y-te.length,oe=new Uint8Array(ke);var Le=0;for(se=0;se<ke;Le++,se++)Le===te[0]&&(Le++,te.shift()),oe[se]=z[Le];return oe},B=function(z){var Y=0,te=0,se=0,ke=0,oe,Le,je,At,ui,un,Rr,Vr,Fr,$r,Ps,ct=[1,1],Ur,Ai;if(oe=new Ep(z),Le=oe.readUnsignedByte(),At=oe.readUnsignedByte(),je=oe.readUnsignedByte(),oe.skipUnsignedExpGolomb(),Su[Le]&&(ui=oe.readUnsignedExpGolomb(),ui===3&&oe.skipBits(1),oe.skipUnsignedExpGolomb(),oe.skipUnsignedExpGolomb(),oe.skipBits(1),oe.readBoolean()))for(Ps=ui!==3?8:12,Ai=0;Ai<Ps;Ai++)oe.readBoolean()&&(Ai<6?V(16,oe):V(64,oe));if(oe.skipUnsignedExpGolomb(),un=oe.readUnsignedExpGolomb(),un===0)oe.readUnsignedExpGolomb();else if(un===1)for(oe.skipBits(1),oe.skipExpGolomb(),oe.skipExpGolomb(),Rr=oe.readUnsignedExpGolomb(),Ai=0;Ai<Rr;Ai++)oe.skipExpGolomb();if(oe.skipUnsignedExpGolomb(),oe.skipBits(1),Vr=oe.readUnsignedExpGolomb(),Fr=oe.readUnsignedExpGolomb(),$r=oe.readBits(1),$r===0&&oe.skipBits(1),oe.skipBits(1),oe.readBoolean()&&(Y=oe.readUnsignedExpGolomb(),te=oe.readUnsignedExpGolomb(),se=oe.readUnsignedExpGolomb(),ke=oe.readUnsignedExpGolomb()),oe.readBoolean()&&oe.readBoolean()){switch(Ur=oe.readUnsignedByte(),Ur){case 1:ct=[1,1];break;case 2:ct=[12,11];break;case 3:ct=[10,11];break;case 4:ct=[16,11];break;case 5:ct=[40,33];break;case 6:ct=[24,11];break;case 7:ct=[20,11];break;case 8:ct=[32,11];break;case 9:ct=[80,33];break;case 10:ct=[18,11];break;case 11:ct=[15,11];break;case 12:ct=[64,33];break;case 13:ct=[160,99];break;case 14:ct=[4,3];break;case 15:ct=[3,2];break;case 16:ct=[2,1];break;case 255:{ct=[oe.readUnsignedByte()<<8|oe.readUnsignedByte(),oe.readUnsignedByte()<<8|oe.readUnsignedByte()];break}}ct&&ct[0]/ct[1]}return{profileIdc:Le,levelIdc:je,profileCompatibility:At,width:(Vr+1)*16-Y*2-te*2,height:(2-$r)*(Fr+1)*16-se*2-ke*2,sarRatio:ct}}},Cs.prototype=new Eu;var Sp={H264Stream:Cs},kp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ku=function(u,d){var p=u[d+6]<<21|u[d+7]<<14|u[d+8]<<7|u[d+9],f=u[d+5],v=(f&16)>>4;return p=p>=0?p:0,v?p+20:p+10},wu=function(u,d){return u.length-d<10||u[d]!==73||u[d+1]!==68||u[d+2]!==51?d:(d+=ku(u,d),wu(u,d))},wp=function(u){var d=wu(u,0);return u.length>=d+2&&(u[d]&255)===255&&(u[d+1]&240)===240&&(u[d+1]&22)===16},Du=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},Dp=function(u,d,p){var f,v="";for(f=d;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},Ap=function(u,d,p){return unescape(Dp(u,d,p))},Np=function(u,d){var p=(u[d+5]&224)>>5,f=u[d+4]<<3,v=u[d+3]&6144;return v|f|p},Ip=function(u,d){return u[d]===73&&u[d+1]===68&&u[d+2]===51?"timed-metadata":u[d]&!0&&(u[d+1]&240)===240?"audio":null},Op=function(u){for(var d=0;d+5<u.length;){if(u[d]!==255||(u[d+1]&246)!==240){d++;continue}return kp[(u[d+2]&60)>>>2]}return null},Bp=function(u){var d,p,f,v;d=10,u[5]&64&&(d+=4,d+=Du(u.subarray(10,14)));do{if(p=Du(u.subarray(d+4,d+8)),p<1)return null;if(v=String.fromCharCode(u[d],u[d+1],u[d+2],u[d+3]),v==="PRIV"){f=u.subarray(d+10,d+p+10);for(var y=0;y<f.byteLength;y++)if(f[y]===0){var B=Ap(f,0,y);if(B==="com.apple.streaming.transportStreamTimestamp"){var V=f.subarray(y+1),z=(V[3]&1)<<30|V[4]<<22|V[5]<<14|V[6]<<6|V[7]>>>2;return z*=4,z+=V[7]&3,z}break}}d+=10,d+=p}while(d<u.byteLength);return null},Ja={isLikelyAacData:wp,parseId3TagSize:ku,parseAdtsSize:Np,parseType:Ip,parseSampleRate:Op,parseAacTimestamp:Bp},Lp=t,Au=Ja,Ss;Ss=function(){var u=new Uint8Array,d=0;Ss.prototype.init.call(this),this.setTimestamp=function(p){d=p},this.push=function(p){var f=0,v=0,y,B,V,z;for(u.length?(z=u.length,u=new Uint8Array(p.byteLength+z),u.set(u.subarray(0,z)),u.set(p,z)):u=p;u.length-v>=3;){if(u[v]===73&&u[v+1]===68&&u[v+2]===51){if(u.length-v<10||(f=Au.parseId3TagSize(u,v),v+f>u.length))break;B={type:"timed-metadata",data:u.subarray(v,v+f)},this.trigger("data",B),v+=f;continue}else if((u[v]&255)===255&&(u[v+1]&240)===240){if(u.length-v<7||(f=Au.parseAdtsSize(u,v),v+f>u.length))break;V={type:"audio",data:u.subarray(v,v+f),pts:d,dts:d},this.trigger("data",V),v+=f;continue}v++}y=u.length-v,y>0?u=u.subarray(v):u=new Uint8Array},this.reset=function(){u=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){u=new Uint8Array,this.trigger("endedtimeline")}},Ss.prototype=new Lp;var Mp=Ss,Pp=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Rp=Pp,Vp=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Fp=Vp,ks=t,Ir=Ie,Or=it,ws=Xi,Di=K,Qi=yp,Ds=Xe,Nu=xp,$p=Sp.H264Stream,Up=Mp,qp=Ja.isLikelyAacData,Hp=Xe.ONE_SECOND_IN_TS,Iu=Rp,Ou=Fp,As,Br,Ns,Cn,jp=function(u,d){d.stream=u,this.trigger("log",d)},Bu=function(u,d){for(var p=Object.keys(d),f=0;f<p.length;f++){var v=p[f];v==="headOfPipeline"||!d[v].on||d[v].on("log",jp.bind(u,v))}},Lu=function(u,d){var p;if(u.length!==d.length)return!1;for(p=0;p<u.length;p++)if(u[p]!==d[p])return!1;return!0},Mu=function(u,d,p,f,v,y){var B=p-d,V=f-d,z=v-p;return{start:{dts:u,pts:u+B},end:{dts:u+V,pts:u+z},prependedContentDuration:y,baseMediaDecodeTime:u}};Br=function(u,d){var p=[],f,v=0,y=0,B=1/0;d=d||{},f=d.firstSequenceNumber||0,Br.prototype.init.call(this),this.push=function(V){Di.collectDtsInfo(u,V),u&&Iu.forEach(function(z){u[z]=V[z]}),p.push(V)},this.setEarliestDts=function(V){v=V},this.setVideoBaseMediaDecodeTime=function(V){B=V},this.setAudioAppendStart=function(V){y=V},this.flush=function(){var V,z,Y,te,se,ke,oe;if(p.length===0){this.trigger("done","AudioSegmentStream");return}V=ws.trimAdtsFramesByEarliestDts(p,u,v),u.baseMediaDecodeTime=Di.calculateTrackBaseMediaDecodeTime(u,d.keepOriginalTimestamps),oe=ws.prefixWithSilence(u,V,y,B),u.samples=ws.generateSampleTable(V),Y=Ir.mdat(ws.concatenateFrameData(V)),p=[],z=Ir.moof(f,[u]),te=new Uint8Array(z.byteLength+Y.byteLength),f++,te.set(z),te.set(Y,z.byteLength),Di.clearDtsInfo(u),se=Math.ceil(Hp*1024/u.samplerate),V.length&&(ke=V.length*se,this.trigger("segmentTimingInfo",Mu(Ds.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),V[0].dts,V[0].pts,V[0].dts+ke,V[0].pts+ke,oe||0)),this.trigger("timingInfo",{start:V[0].pts,end:V[0].pts+ke})),this.trigger("data",{track:u,boxes:te}),this.trigger("done","AudioSegmentStream")},this.reset=function(){Di.clearDtsInfo(u),p=[],this.trigger("reset")}},Br.prototype=new ks,As=function(u,d){var p,f=[],v=[],y,B;d=d||{},p=d.firstSequenceNumber||0,As.prototype.init.call(this),delete u.minPTS,this.gopCache_=[],this.push=function(V){Di.collectDtsInfo(u,V),V.nalUnitType==="seq_parameter_set_rbsp"&&!y&&(y=V.config,u.sps=[V.data],Ou.forEach(function(z){u[z]=y[z]},this)),V.nalUnitType==="pic_parameter_set_rbsp"&&!B&&(B=V.data,u.pps=[V.data]),f.push(V)},this.flush=function(){for(var V,z,Y,te,se,ke,oe=0,Le,je;f.length&&f[0].nalUnitType!=="access_unit_delimiter_rbsp";)f.shift();if(f.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(V=Or.groupNalsIntoFrames(f),Y=Or.groupFramesIntoGops(V),Y[0][0].keyFrame||(z=this.getGopForFusion_(f[0],u),z?(oe=z.duration,Y.unshift(z),Y.byteLength+=z.byteLength,Y.nalCount+=z.nalCount,Y.pts=z.pts,Y.dts=z.dts,Y.duration+=z.duration):Y=Or.extendFirstKeyFrame(Y)),v.length){var At;if(d.alignGopsAtEnd?At=this.alignGopsAtEnd_(Y):At=this.alignGopsAtStart_(Y),!At){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}Di.clearDtsInfo(u),Y=At}Di.collectDtsInfo(u,Y),u.samples=Or.generateSampleTable(Y),se=Ir.mdat(Or.concatenateNalData(Y)),u.baseMediaDecodeTime=Di.calculateTrackBaseMediaDecodeTime(u,d.keepOriginalTimestamps),this.trigger("processedGopsInfo",Y.map(function(ui){return{pts:ui.pts,dts:ui.dts,byteLength:ui.byteLength}})),Le=Y[0],je=Y[Y.length-1],this.trigger("segmentTimingInfo",Mu(u.baseMediaDecodeTime,Le.dts,Le.pts,je.dts+je.duration,je.pts+je.duration,oe)),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),te=Ir.moof(p,[u]),ke=new Uint8Array(te.byteLength+se.byteLength),p++,ke.set(te),ke.set(se,te.byteLength),this.trigger("data",{track:u,boxes:ke}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),f=[],this.gopCache_.length=0,v.length=0,this.trigger("reset")},this.resetStream_=function(){Di.clearDtsInfo(u),y=void 0,B=void 0},this.getGopForFusion_=function(V){var z=45e3,Y=1/0,te,se,ke,oe,Le;for(Le=0;Le<this.gopCache_.length;Le++)oe=this.gopCache_[Le],ke=oe.gop,!(!(u.pps&&Lu(u.pps[0],oe.pps[0]))||!(u.sps&&Lu(u.sps[0],oe.sps[0])))&&(ke.dts<u.timelineStartInfo.dts||(te=V.dts-ke.dts-ke.duration,te>=-1e4&&te<=z&&(!se||Y>te)&&(se=oe,Y=te)));return se?se.gop:null},this.alignGopsAtStart_=function(V){var z,Y,te,se,ke,oe,Le,je;for(ke=V.byteLength,oe=V.nalCount,Le=V.duration,z=Y=0;z<v.length&&Y<V.length&&(te=v[z],se=V[Y],te.pts!==se.pts);){if(se.pts>te.pts){z++;continue}Y++,ke-=se.byteLength,oe-=se.nalCount,Le-=se.duration}return Y===0?V:Y===V.length?null:(je=V.slice(Y),je.byteLength=ke,je.duration=Le,je.nalCount=oe,je.pts=je[0].pts,je.dts=je[0].dts,je)},this.alignGopsAtEnd_=function(V){var z,Y,te,se,ke,oe;for(z=v.length-1,Y=V.length-1,ke=null,oe=!1;z>=0&&Y>=0;){if(te=v[z],se=V[Y],te.pts===se.pts){oe=!0;break}if(te.pts>se.pts){z--;continue}z===v.length-1&&(ke=Y),Y--}if(!oe&&ke===null)return null;var Le;if(oe?Le=Y:Le=ke,Le===0)return V;var je=V.slice(Le),At=je.reduce(function(ui,un){return ui.byteLength+=un.byteLength,ui.duration+=un.duration,ui.nalCount+=un.nalCount,ui},{byteLength:0,duration:0,nalCount:0});return je.byteLength=At.byteLength,je.duration=At.duration,je.nalCount=At.nalCount,je.pts=je[0].pts,je.dts=je[0].dts,je},this.alignGopsWith=function(V){v=V}},As.prototype=new ks,Cn=function(u,d){this.numberOfTracks=0,this.metadataStream=d,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,Cn.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))}},Cn.prototype=new ks,Cn.prototype.flush=function(u){var d=0,p={captions:[],captionStreams:{},metadata:[],info:{}},f,v,y,B=0,V;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?(B=this.videoTrack.timelineStartInfo.pts,Ou.forEach(function(z){p.info[z]=this.videoTrack[z]},this)):this.audioTrack&&(B=this.audioTrack.timelineStartInfo.pts,Iu.forEach(function(z){p.info[z]=this.audioTrack[z]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?p.type=this.pendingTracks[0].type:p.type="combined",this.emittedTracks+=this.pendingTracks.length,y=Ir.initSegment(this.pendingTracks),p.initSegment=new Uint8Array(y.byteLength),p.initSegment.set(y),p.data=new Uint8Array(this.pendingBytes),V=0;V<this.pendingBoxes.length;V++)p.data.set(this.pendingBoxes[V],d),d+=this.pendingBoxes[V].byteLength;for(V=0;V<this.pendingCaptions.length;V++)f=this.pendingCaptions[V],f.startTime=Ds.metadataTsToSeconds(f.startPts,B,this.keepOriginalTimestamps),f.endTime=Ds.metadataTsToSeconds(f.endPts,B,this.keepOriginalTimestamps),p.captionStreams[f.stream]=!0,p.captions.push(f);for(V=0;V<this.pendingMetadata.length;V++)v=this.pendingMetadata[V],v.cueTime=Ds.metadataTsToSeconds(v.pts,B,this.keepOriginalTimestamps),p.metadata.push(v);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),V=0;V<p.captions.length;V++)f=p.captions[V],this.trigger("caption",f);for(V=0;V<p.metadata.length;V++)v=p.metadata[V],this.trigger("id3Frame",v)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Cn.prototype.setRemux=function(u){this.remuxTracks=u},Ns=function(u){var d=this,p=!0,f,v;Ns.prototype.init.call(this),u=u||{},this.baseMediaDecodeTime=u.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="aac",y.metadataStream=new Qi.MetadataStream,y.aacStream=new Up,y.audioTimestampRolloverStream=new Qi.TimestampRolloverStream("audio"),y.timedMetadataTimestampRolloverStream=new Qi.TimestampRolloverStream("timed-metadata"),y.adtsStream=new Nu,y.coalesceStream=new Cn(u,y.metadataStream),y.headOfPipeline=y.aacStream,y.aacStream.pipe(y.audioTimestampRolloverStream).pipe(y.adtsStream),y.aacStream.pipe(y.timedMetadataTimestampRolloverStream).pipe(y.metadataStream).pipe(y.coalesceStream),y.metadataStream.on("timestamp",function(B){y.aacStream.setTimestamp(B.timeStamp)}),y.aacStream.on("data",function(B){B.type!=="timed-metadata"&&B.type!=="audio"||y.audioSegmentStream||(v=v||{timelineStartInfo:{baseMediaDecodeTime:d.baseMediaDecodeTime},codec:"adts",type:"audio"},y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new Br(v,u),y.audioSegmentStream.on("log",d.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",d.trigger.bind(d,"audioTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream),d.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f}))}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Bu(this,y)},this.setupTsPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="ts",y.metadataStream=new Qi.MetadataStream,y.packetStream=new Qi.TransportPacketStream,y.parseStream=new Qi.TransportParseStream,y.elementaryStream=new Qi.ElementaryStream,y.timestampRolloverStream=new Qi.TimestampRolloverStream,y.adtsStream=new Nu,y.h264Stream=new $p,y.captionStream=new Qi.CaptionStream(u),y.coalesceStream=new Cn(u,y.metadataStream),y.headOfPipeline=y.packetStream,y.packetStream.pipe(y.parseStream).pipe(y.elementaryStream).pipe(y.timestampRolloverStream),y.timestampRolloverStream.pipe(y.h264Stream),y.timestampRolloverStream.pipe(y.adtsStream),y.timestampRolloverStream.pipe(y.metadataStream).pipe(y.coalesceStream),y.h264Stream.pipe(y.captionStream).pipe(y.coalesceStream),y.elementaryStream.on("data",function(B){var V;if(B.type==="metadata"){for(V=B.tracks.length;V--;)!f&&B.tracks[V].type==="video"?(f=B.tracks[V],f.timelineStartInfo.baseMediaDecodeTime=d.baseMediaDecodeTime):!v&&B.tracks[V].type==="audio"&&(v=B.tracks[V],v.timelineStartInfo.baseMediaDecodeTime=d.baseMediaDecodeTime);f&&!y.videoSegmentStream&&(y.coalesceStream.numberOfTracks++,y.videoSegmentStream=new As(f,u),y.videoSegmentStream.on("log",d.getLogTrigger_("videoSegmentStream")),y.videoSegmentStream.on("timelineStartInfo",function(z){v&&!u.keepOriginalTimestamps&&(v.timelineStartInfo=z,y.audioSegmentStream.setEarliestDts(z.dts-d.baseMediaDecodeTime))}),y.videoSegmentStream.on("processedGopsInfo",d.trigger.bind(d,"gopInfo")),y.videoSegmentStream.on("segmentTimingInfo",d.trigger.bind(d,"videoSegmentTimingInfo")),y.videoSegmentStream.on("baseMediaDecodeTime",function(z){v&&y.audioSegmentStream.setVideoBaseMediaDecodeTime(z)}),y.videoSegmentStream.on("timingInfo",d.trigger.bind(d,"videoTimingInfo")),y.h264Stream.pipe(y.videoSegmentStream).pipe(y.coalesceStream)),v&&!y.audioSegmentStream&&(y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new Br(v,u),y.audioSegmentStream.on("log",d.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",d.trigger.bind(d,"audioTimingInfo")),y.audioSegmentStream.on("segmentTimingInfo",d.trigger.bind(d,"audioSegmentTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream)),d.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f})}}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("id3Frame",function(B){B.dispatchType=y.metadataStream.dispatchType,d.trigger("id3Frame",B)}),y.coalesceStream.on("caption",this.trigger.bind(this,"caption")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Bu(this,y)},this.setBaseMediaDecodeTime=function(y){var B=this.transmuxPipeline_;u.keepOriginalTimestamps||(this.baseMediaDecodeTime=y),v&&(v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,Di.clearDtsInfo(v),B.audioTimestampRolloverStream&&B.audioTimestampRolloverStream.discontinuity()),f&&(B.videoSegmentStream&&(B.videoSegmentStream.gopCache_=[]),f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,Di.clearDtsInfo(f),B.captionStream.reset()),B.timestampRolloverStream&&B.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(y){v&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(y)},this.setRemux=function(y){var B=this.transmuxPipeline_;u.remux=y,B&&B.coalesceStream&&B.coalesceStream.setRemux(y)},this.alignGopsWith=function(y){f&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(y)},this.getLogTrigger_=function(y){var B=this;return function(V){V.stream=y,B.trigger("log",V)}},this.push=function(y){if(p){var B=qp(y);B&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!B&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),p=!1}this.transmuxPipeline_.headOfPipeline.push(y)},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()}},Ns.prototype=new ks;var zp={Transmuxer:Ns},Gp=function(u){return u>>>0},Wp=function(u){return("00"+u.toString(16)).slice(-2)},Is={toUnsigned:Gp,toHexString:Wp},Yp=function(u){var d="";return d+=String.fromCharCode(u[0]),d+=String.fromCharCode(u[1]),d+=String.fromCharCode(u[2]),d+=String.fromCharCode(u[3]),d},Pu=Yp,Xp=Is.toUnsigned,Kp=Pu,Ru=function(u,d){var p=[],f,v,y,B,V;if(!d.length)return null;for(f=0;f<u.byteLength;)v=Xp(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3]),y=Kp(u.subarray(f+4,f+8)),B=v>1?f+v:u.byteLength,y===d[0]&&(d.length===1?p.push(u.subarray(f+8,B)):(V=Ru(u.subarray(f+8,B),d.slice(1)),V.length&&(p=p.concat(V)))),f=B;return p},eo=Ru,Qp=Is.toUnsigned,Zp=a.getUint64,Jp=function(u){var d={version:u[0],flags:new Uint8Array(u.subarray(1,4))};return d.version===1?d.baseMediaDecodeTime=Zp(u.subarray(4)):d.baseMediaDecodeTime=Qp(u[4]<<24|u[5]<<16|u[6]<<8|u[7]),d},to=Jp,em=function(u){var d=new DataView(u.buffer,u.byteOffset,u.byteLength),p={version:u[0],flags:new Uint8Array(u.subarray(1,4)),trackId:d.getUint32(4)},f=p.flags[2]&1,v=p.flags[2]&2,y=p.flags[2]&8,B=p.flags[2]&16,V=p.flags[2]&32,z=p.flags[0]&65536,Y=p.flags[0]&131072,te;return te=8,f&&(te+=4,p.baseDataOffset=d.getUint32(12),te+=4),v&&(p.sampleDescriptionIndex=d.getUint32(te),te+=4),y&&(p.defaultSampleDuration=d.getUint32(te),te+=4),B&&(p.defaultSampleSize=d.getUint32(te),te+=4),V&&(p.defaultSampleFlags=d.getUint32(te)),z&&(p.durationIsEmpty=!0),!f&&Y&&(p.baseDataOffsetIsMoof=!0),p},Vu=em,tm=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]}},im=tm,Fu=im,nm=function(u){var d={version:u[0],flags:new Uint8Array(u.subarray(1,4)),samples:[]},p=new DataView(u.buffer,u.byteOffset,u.byteLength),f=d.flags[2]&1,v=d.flags[2]&4,y=d.flags[1]&1,B=d.flags[1]&2,V=d.flags[1]&4,z=d.flags[1]&8,Y=p.getUint32(4),te=8,se;for(f&&(d.dataOffset=p.getInt32(te),te+=4),v&&Y&&(se={flags:Fu(u.subarray(te,te+4))},te+=4,y&&(se.duration=p.getUint32(te),te+=4),B&&(se.size=p.getUint32(te),te+=4),z&&(d.version===1?se.compositionTimeOffset=p.getInt32(te):se.compositionTimeOffset=p.getUint32(te),te+=4),d.samples.push(se),Y--);Y--;)se={},y&&(se.duration=p.getUint32(te),te+=4),B&&(se.size=p.getUint32(te),te+=4),V&&(se.flags=Fu(u.subarray(te,te+4)),te+=4),z&&(d.version===1?se.compositionTimeOffset=p.getInt32(te):se.compositionTimeOffset=p.getUint32(te),te+=4),d.samples.push(se);return d},$u=nm,Uu={tfdt:to,trun:$u},qu={parseTfdt:Uu.tfdt,parseTrun:Uu.trun},rm=function(u){for(var d=0,p=String.fromCharCode(u[d]),f="";p!=="\0";)f+=p,d++,p=String.fromCharCode(u[d]);return f+=p,f},sm={uint8ToCString:rm},Os=sm.uint8ToCString,am=a.getUint64,om=function(u){var d=4,p=u[0],f,v,y,B,V,z,Y,te;if(p===0){f=Os(u.subarray(d)),d+=f.length,v=Os(u.subarray(d)),d+=v.length;var se=new DataView(u.buffer);y=se.getUint32(d),d+=4,V=se.getUint32(d),d+=4,z=se.getUint32(d),d+=4,Y=se.getUint32(d),d+=4}else if(p===1){var se=new DataView(u.buffer);y=se.getUint32(d),d+=4,B=am(u.subarray(d)),d+=8,z=se.getUint32(d),d+=4,Y=se.getUint32(d),d+=4,f=Os(u.subarray(d)),d+=f.length,v=Os(u.subarray(d)),d+=v.length}te=new Uint8Array(u.subarray(d,u.byteLength));var ke={scheme_id_uri:f,value:v,timescale:y||1,presentation_time:B,presentation_time_delta:V,event_duration:z,id:Y,message_data:te};return um(p,ke)?ke:void 0},lm=function(u,d,p,f){return u||u===0?u/d:f+p/d},um=function(u,d){var p=d.scheme_id_uri!=="\0",f=u===0&&Hu(d.presentation_time_delta)&&p,v=u===1&&Hu(d.presentation_time)&&p;return!(u>1)&&f||v},Hu=function(u){return u!==void 0||u!==null},cm={parseEmsgBox:om,scaleTime:lm},Lr;typeof window<"u"?Lr=window:typeof r<"u"?Lr=r:typeof self<"u"?Lr=self:Lr={};var ju=Lr,Bs=Is.toUnsigned,Mr=Is.toHexString,bt=eo,Un=Pu,io=cm,dm=Vu,hm=$u,fm=to,pm=a.getUint64,zu,Gu,Wu,Yu,Xu,no,Ku,ro=ju,mm=Tu.parseId3Frames;zu=function(u){var d={},p=bt(u,["moov","trak"]);return p.reduce(function(f,v){var y,B,V,z,Y;return y=bt(v,["tkhd"])[0],!y||(B=y[0],V=B===0?12:20,z=Bs(y[V]<<24|y[V+1]<<16|y[V+2]<<8|y[V+3]),Y=bt(v,["mdia","mdhd"])[0],!Y)?null:(B=Y[0],V=B===0?12:20,f[z]=Bs(Y[V]<<24|Y[V+1]<<16|Y[V+2]<<8|Y[V+3]),f)},d)},Gu=function(u,d){var p;p=bt(d,["moof","traf"]);var f=p.reduce(function(v,y){var B=bt(y,["tfhd"])[0],V=Bs(B[4]<<24|B[5]<<16|B[6]<<8|B[7]),z=u[V]||9e4,Y=bt(y,["tfdt"])[0],te=new DataView(Y.buffer,Y.byteOffset,Y.byteLength),se;Y[0]===1?se=pm(Y.subarray(4,12)):se=te.getUint32(4);let ke;return typeof se=="bigint"?ke=se/ro.BigInt(z):typeof se=="number"&&!isNaN(se)&&(ke=se/z),ke<Number.MAX_SAFE_INTEGER&&(ke=Number(ke)),ke<v&&(v=ke),v},1/0);return typeof f=="bigint"||isFinite(f)?f:0},Wu=function(u,d){var p=bt(d,["moof","traf"]),f=0,v=0,y;if(p&&p.length){var B=bt(p[0],["tfhd"])[0],V=bt(p[0],["trun"])[0],z=bt(p[0],["tfdt"])[0];if(B){var Y=dm(B);y=Y.trackId}if(z){var te=fm(z);f=te.baseMediaDecodeTime}if(V){var se=hm(V);se.samples&&se.samples.length&&(v=se.samples[0].compositionTimeOffset||0)}}var ke=u[y]||9e4;typeof f=="bigint"&&(v=ro.BigInt(v),ke=ro.BigInt(ke));var oe=(f+v)/ke;return typeof oe=="bigint"&&oe<Number.MAX_SAFE_INTEGER&&(oe=Number(oe)),oe},Yu=function(u){var d=bt(u,["moov","trak"]),p=[];return d.forEach(function(f){var v=bt(f,["mdia","hdlr"]),y=bt(f,["tkhd"]);v.forEach(function(B,V){var z=Un(B.subarray(8,12)),Y=y[V],te,se,ke;z==="vide"&&(te=new DataView(Y.buffer,Y.byteOffset,Y.byteLength),se=te.getUint8(0),ke=se===0?te.getUint32(12):te.getUint32(20),p.push(ke))})}),p},no=function(u){var d=u[0],p=d===0?12:20;return Bs(u[p]<<24|u[p+1]<<16|u[p+2]<<8|u[p+3])},Xu=function(u){var d=bt(u,["moov","trak"]),p=[];return d.forEach(function(f){var v={},y=bt(f,["tkhd"])[0],B,V;y&&(B=new DataView(y.buffer,y.byteOffset,y.byteLength),V=B.getUint8(0),v.id=V===0?B.getUint32(12):B.getUint32(20));var z=bt(f,["mdia","hdlr"])[0];if(z){var Y=Un(z.subarray(8,12));Y==="vide"?v.type="video":Y==="soun"?v.type="audio":v.type=Y}var te=bt(f,["mdia","minf","stbl","stsd"])[0];if(te){var se=te.subarray(8);v.codec=Un(se.subarray(4,8));var ke=bt(se,[v.codec])[0],oe,Le;ke&&(/^[asm]vc[1-9]$/i.test(v.codec)?(oe=ke.subarray(78),Le=Un(oe.subarray(4,8)),Le==="avcC"&&oe.length>11?(v.codec+=".",v.codec+=Mr(oe[9]),v.codec+=Mr(oe[10]),v.codec+=Mr(oe[11])):v.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(v.codec)?(oe=ke.subarray(28),Le=Un(oe.subarray(4,8)),Le==="esds"&&oe.length>20&&oe[19]!==0?(v.codec+="."+Mr(oe[19]),v.codec+="."+Mr(oe[20]>>>2&63).replace(/^0/,"")):v.codec="mp4a.40.2"):v.codec=v.codec.toLowerCase())}var je=bt(f,["mdia","mdhd"])[0];je&&(v.timescale=no(je)),p.push(v)}),p},Ku=function(u,d=0){var p=bt(u,["emsg"]);return p.map(f=>{var v=io.parseEmsgBox(new Uint8Array(f)),y=mm(v.message_data);return{cueTime:io.scaleTime(v.presentation_time,v.timescale,v.presentation_time_delta,d),duration:io.scaleTime(v.event_duration,v.timescale),frames:y}})};var Pr={findBox:bt,parseType:Un,timescale:zu,startTime:Gu,compositionStartTime:Wu,videoTrackIds:Yu,tracks:Xu,getTimescaleFromMediaHeader:no,getEmsgID3:Ku};const{parseTrun:gm}=qu,{findBox:Qu}=Pr;var Zu=ju,vm=function(u){var d=Qu(u,["moof","traf"]),p=Qu(u,["mdat"]),f=[];return p.forEach(function(v,y){var B=d[y];f.push({mdat:v,traf:B})}),f},_m=function(u,d,p){var f=d,v=p.defaultSampleDuration||0,y=p.defaultSampleSize||0,B=p.trackId,V=[];return u.forEach(function(z){var Y=gm(z),te=Y.samples;te.forEach(function(se){se.duration===void 0&&(se.duration=v),se.size===void 0&&(se.size=y),se.trackId=B,se.dts=f,se.compositionTimeOffset===void 0&&(se.compositionTimeOffset=0),typeof f=="bigint"?(se.pts=f+Zu.BigInt(se.compositionTimeOffset),f+=Zu.BigInt(se.duration)):(se.pts=f+se.compositionTimeOffset,f+=se.duration)}),V=V.concat(te)}),V},Ju={getMdatTrafPairs:vm,parseSamples:_m},ym=Vt.discardEmulationPreventionBytes,Tm=ee.CaptionStream,so=eo,bm=to,xm=Vu,{getMdatTrafPairs:Cm,parseSamples:Em}=Ju,Sm=function(u,d){for(var p=u,f=0;f<d.length;f++){var v=d[f];if(p<v.size)return v;p-=v.size}return null},km=function(u,d,p){var f=new DataView(u.buffer,u.byteOffset,u.byteLength),v={logs:[],seiNals:[]},y,B,V,z;for(B=0;B+4<u.length;B+=V)if(V=f.getUint32(B),B+=4,!(V<=0))switch(u[B]&31){case 6:var Y=u.subarray(B+1,B+1+V),te=Sm(B,d);if(y={nalUnitType:"sei_rbsp",size:V,data:Y,escapedRBSP:ym(Y),trackId:p},te)y.pts=te.pts,y.dts=te.dts,z=te;else if(z)y.pts=z.pts,y.dts=z.dts;else{v.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+B+" for trackId "+p+". See mux.js#223."});break}v.seiNals.push(y);break}return v},wm=function(u,d){var p={},f=Cm(u);return f.forEach(function(v){var y=v.mdat,B=v.traf,V=so(B,["tfhd"]),z=xm(V[0]),Y=z.trackId,te=so(B,["tfdt"]),se=te.length>0?bm(te[0]).baseMediaDecodeTime:0,ke=so(B,["trun"]),oe,Le;d===Y&&ke.length>0&&(oe=Em(ke,se,z),Le=km(y,oe,Y),p[Y]||(p[Y]={seiNals:[],logs:[]}),p[Y].seiNals=p[Y].seiNals.concat(Le.seiNals),p[Y].logs=p[Y].logs.concat(Le.logs))}),p},Dm=function(u,d,p){var f;if(d===null)return null;f=wm(u,d);var v=f[d]||{};return{seiNals:v.seiNals,logs:v.logs,timescale:p}},Am=function(){var u=!1,d,p,f,v,y,B;this.isInitialized=function(){return u},this.init=function(V){d=new Tm,u=!0,B=V?V.isPartial:!1,d.on("data",function(z){z.startTime=z.startPts/v,z.endTime=z.endPts/v,y.captions.push(z),y.captionStreams[z.stream]=!0}),d.on("log",function(z){y.logs.push(z)})},this.isNewInit=function(V,z){return V&&V.length===0||z&&typeof z=="object"&&Object.keys(z).length===0?!1:f!==V[0]||v!==z[f]},this.parse=function(V,z,Y){var te;if(this.isInitialized()){if(!z||!Y)return null;if(this.isNewInit(z,Y))f=z[0],v=Y[f];else if(f===null||!v)return p.push(V),null}else return null;for(;p.length>0;){var se=p.shift();this.parse(se,z,Y)}return te=Dm(V,f,v),te&&te.logs&&(y.logs=y.logs.concat(te.logs)),te===null||!te.seiNals?y.logs.length?{logs:y.logs,captions:[],captionStreams:[]}:null:(this.pushNals(te.seiNals),this.flushStream(),y)},this.pushNals=function(V){if(!this.isInitialized()||!V||V.length===0)return null;V.forEach(function(z){d.push(z)})},this.flushStream=function(){if(!this.isInitialized())return null;B?d.partialFlush():d.flush()},this.clearParsedCaptions=function(){y.captions=[],y.captionStreams={},y.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;d.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){p=[],f=null,v=null,y?this.clearParsedCaptions():y={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Nm=Am;const{parseTfdt:Im}=qu,ln=eo,{getTimescaleFromMediaHeader:Om}=Pr,{parseSamples:Bm,getMdatTrafPairs:Lm}=Ju;var ec=function(){let u=9e4;this.init=function(d){const p=ln(d,["moov","trak","mdia","mdhd"])[0];p&&(u=Om(p))},this.parseSegment=function(d){const p=[],f=Lm(d);let v=0;return f.forEach(function(y){const B=y.mdat,V=y.traf,z=ln(V,["tfdt"])[0],Y=ln(V,["tfhd"])[0],te=ln(V,["trun"]);if(z&&(v=Im(z).baseMediaDecodeTime),te.length&&Y){const se=Bm(te,v,Y);let ke=0;se.forEach(function(oe){const Le="utf-8",je=new TextDecoder(Le),At=B.slice(ke,ke+oe.size);if(ln(At,["vtte"])[0]){ke+=oe.size;return}ln(At,["vttc"]).forEach(function(Rr){const Vr=ln(Rr,["payl"])[0],Fr=ln(Rr,["sttg"])[0],$r=oe.pts/u,Ps=(oe.pts+oe.duration)/u;let ct,Ur;if(Vr)try{ct=je.decode(Vr)}catch(Ai){console.error(Ai)}if(Fr)try{Ur=je.decode(Fr)}catch(Ai){console.error(Ai)}oe.duration&&ct&&p.push({cueText:ct,start:$r,end:Ps,settings:Ur})}),ke+=oe.size})}}),p}},ao=pe,tc=function(u){var d=u[1]&31;return d<<=8,d|=u[2],d},Ls=function(u){return!!(u[1]&64)},Ms=function(u){var d=0;return(u[3]&48)>>>4>1&&(d+=u[4]+1),d},Mm=function(u,d){var p=tc(u);return p===0?"pat":p===d?"pmt":d?"pes":null},Pm=function(u){var d=Ls(u),p=4+Ms(u);return d&&(p+=u[p]+1),(u[p+10]&31)<<8|u[p+11]},Rm=function(u){var d={},p=Ls(u),f=4+Ms(u);if(p&&(f+=u[f]+1),!!(u[f+5]&1)){var v,y,B;v=(u[f+1]&15)<<8|u[f+2],y=3+v-4,B=(u[f+10]&15)<<8|u[f+11];for(var V=12+B;V<y;){var z=f+V;d[(u[z+1]&31)<<8|u[z+2]]=u[z],V+=((u[z+3]&15)<<8|u[z+4])+5}return d}},Vm=function(u,d){var p=tc(u),f=d[p];switch(f){case ao.H264_STREAM_TYPE:return"video";case ao.ADTS_STREAM_TYPE:return"audio";case ao.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Fm=function(u){var d=Ls(u);if(!d)return null;var p=4+Ms(u);if(p>=u.byteLength)return null;var f=null,v;return v=u[p+7],v&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,v&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},oo=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}},$m=function(u){for(var d=4+Ms(u),p=u.subarray(d),f=0,v=0,y=!1,B;v<p.byteLength-3;v++)if(p[v+2]===1){f=v+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}v+3!==f-2&&(B=oo(p[v+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0));do f++;while(p[f]!==1&&f<p.length);v=f-2,f+=3;break;case 1:if(p[f-1]!==0||p[f-2]!==0){f+=3;break}B=oo(p[v+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0),v=f-2,f+=3;break;default:f+=3;break}return p=p.subarray(v),f-=v,v=0,p&&p.byteLength>3&&(B=oo(p[v+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0)),y},Um={parseType:Mm,parsePat:Pm,parsePmt:Rm,parsePayloadUnitStartIndicator:Ls,parsePesType:Vm,parsePesTime:Fm,videoPacketContainsKeyFrame:$m},ic=pe,qn=gt.handleRollover,at={};at.ts=Um,at.aac=Ja;var En=Xe.ONE_SECOND_IN_TS,Yt=188,Ri=71,qm=function(u,d){for(var p=0,f=Yt,v,y;f<u.byteLength;){if(u[p]===Ri&&u[f]===Ri){switch(v=u.subarray(p,f),y=at.ts.parseType(v,d.pid),y){case"pat":d.pid=at.ts.parsePat(v);break;case"pmt":var B=at.ts.parsePmt(v);d.table=d.table||{},Object.keys(B).forEach(function(V){d.table[V]=B[V]});break}p+=Yt,f+=Yt;continue}p++,f++}},nc=function(u,d,p){for(var f=0,v=Yt,y,B,V,z,Y,te=!1;v<=u.byteLength;){if(u[f]===Ri&&(u[v]===Ri||v===u.byteLength)){switch(y=u.subarray(f,v),B=at.ts.parseType(y,d.pid),B){case"pes":V=at.ts.parsePesType(y,d.table),z=at.ts.parsePayloadUnitStartIndicator(y),V==="audio"&&z&&(Y=at.ts.parsePesTime(y),Y&&(Y.type="audio",p.audio.push(Y),te=!0));break}if(te)break;f+=Yt,v+=Yt;continue}f++,v++}for(v=u.byteLength,f=v-Yt,te=!1;f>=0;){if(u[f]===Ri&&(u[v]===Ri||v===u.byteLength)){switch(y=u.subarray(f,v),B=at.ts.parseType(y,d.pid),B){case"pes":V=at.ts.parsePesType(y,d.table),z=at.ts.parsePayloadUnitStartIndicator(y),V==="audio"&&z&&(Y=at.ts.parsePesTime(y),Y&&(Y.type="audio",p.audio.push(Y),te=!0));break}if(te)break;f-=Yt,v-=Yt;continue}f--,v--}},Hm=function(u,d,p){for(var f=0,v=Yt,y,B,V,z,Y,te,se,ke,oe=!1,Le={data:[],size:0};v<u.byteLength;){if(u[f]===Ri&&u[v]===Ri){switch(y=u.subarray(f,v),B=at.ts.parseType(y,d.pid),B){case"pes":if(V=at.ts.parsePesType(y,d.table),z=at.ts.parsePayloadUnitStartIndicator(y),V==="video"&&(z&&!oe&&(Y=at.ts.parsePesTime(y),Y&&(Y.type="video",p.video.push(Y),oe=!0)),!p.firstKeyFrame)){if(z&&Le.size!==0){for(te=new Uint8Array(Le.size),se=0;Le.data.length;)ke=Le.data.shift(),te.set(ke,se),se+=ke.byteLength;if(at.ts.videoPacketContainsKeyFrame(te)){var je=at.ts.parsePesTime(te);je?(p.firstKeyFrame=je,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.")}Le.size=0}Le.data.push(y),Le.size+=y.byteLength}break}if(oe&&p.firstKeyFrame)break;f+=Yt,v+=Yt;continue}f++,v++}for(v=u.byteLength,f=v-Yt,oe=!1;f>=0;){if(u[f]===Ri&&u[v]===Ri){switch(y=u.subarray(f,v),B=at.ts.parseType(y,d.pid),B){case"pes":V=at.ts.parsePesType(y,d.table),z=at.ts.parsePayloadUnitStartIndicator(y),V==="video"&&z&&(Y=at.ts.parsePesTime(y),Y&&(Y.type="video",p.video.push(Y),oe=!0));break}if(oe)break;f-=Yt,v-=Yt;continue}f--,v--}},jm=function(u,d){if(u.audio&&u.audio.length){var p=d;(typeof p>"u"||isNaN(p))&&(p=u.audio[0].dts),u.audio.forEach(function(y){y.dts=qn(y.dts,p),y.pts=qn(y.pts,p),y.dtsTime=y.dts/En,y.ptsTime=y.pts/En})}if(u.video&&u.video.length){var f=d;if((typeof f>"u"||isNaN(f))&&(f=u.video[0].dts),u.video.forEach(function(y){y.dts=qn(y.dts,f),y.pts=qn(y.pts,f),y.dtsTime=y.dts/En,y.ptsTime=y.pts/En}),u.firstKeyFrame){var v=u.firstKeyFrame;v.dts=qn(v.dts,f),v.pts=qn(v.pts,f),v.dtsTime=v.dts/En,v.ptsTime=v.pts/En}}},zm=function(u){for(var d=!1,p=0,f=null,v=null,y=0,B=0,V;u.length-B>=3;){var z=at.aac.parseType(u,B);switch(z){case"timed-metadata":if(u.length-B<10){d=!0;break}if(y=at.aac.parseId3TagSize(u,B),y>u.length){d=!0;break}v===null&&(V=u.subarray(B,B+y),v=at.aac.parseAacTimestamp(V)),B+=y;break;case"audio":if(u.length-B<7){d=!0;break}if(y=at.aac.parseAdtsSize(u,B),y>u.length){d=!0;break}f===null&&(V=u.subarray(B,B+y),f=at.aac.parseSampleRate(V)),p++,B+=y;break;default:B++;break}if(d)return null}if(f===null||v===null)return null;var Y=En/f,te={audio:[{type:"audio",dts:v,pts:v},{type:"audio",dts:v+p*1024*Y,pts:v+p*1024*Y}]};return te},Gm=function(u){var d={pid:null,table:null},p={};qm(u,d);for(var f in d.table)if(d.table.hasOwnProperty(f)){var v=d.table[f];switch(v){case ic.H264_STREAM_TYPE:p.video=[],Hm(u,d,p),p.video.length===0&&delete p.video;break;case ic.ADTS_STREAM_TYPE:p.audio=[],nc(u,d,p),p.audio.length===0&&delete p.audio;break}}return p},Wm=function(u,d){var p=at.aac.isLikelyAacData(u),f;return p?f=zm(u):f=Gm(u),!f||!f.audio&&!f.video?null:(jm(f,d),f)},Ym={inspect:Wm,parseAudioPes_:nc};const Xm=function(u,d){d.on("data",function(p){const f=p.initSegment;p.initSegment={data:f.buffer,byteOffset:f.byteOffset,byteLength:f.byteLength};const v=p.data;p.data=v.buffer,u.postMessage({action:"data",segment:p,byteOffset:v.byteOffset,byteLength:v.byteLength},[p.data])}),d.on("done",function(p){u.postMessage({action:"done"})}),d.on("gopInfo",function(p){u.postMessage({action:"gopInfo",gopInfo:p})}),d.on("videoSegmentTimingInfo",function(p){const f={start:{decode:Xe.videoTsToSeconds(p.start.dts),presentation:Xe.videoTsToSeconds(p.start.pts)},end:{decode:Xe.videoTsToSeconds(p.end.dts),presentation:Xe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Xe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Xe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:f})}),d.on("audioSegmentTimingInfo",function(p){const f={start:{decode:Xe.videoTsToSeconds(p.start.dts),presentation:Xe.videoTsToSeconds(p.start.pts)},end:{decode:Xe.videoTsToSeconds(p.end.dts),presentation:Xe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Xe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Xe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:f})}),d.on("id3Frame",function(p){u.postMessage({action:"id3Frame",id3Frame:p})}),d.on("caption",function(p){u.postMessage({action:"caption",caption:p})}),d.on("trackinfo",function(p){u.postMessage({action:"trackinfo",trackInfo:p})}),d.on("audioTimingInfo",function(p){u.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Xe.videoTsToSeconds(p.start),end:Xe.videoTsToSeconds(p.end)}})}),d.on("videoTimingInfo",function(p){u.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Xe.videoTsToSeconds(p.start),end:Xe.videoTsToSeconds(p.end)}})}),d.on("log",function(p){u.postMessage({action:"log",log:p})})};class rc{constructor(d,p){this.options=p||{},this.self=d,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new zp.Transmuxer(this.options),Xm(this.self,this.transmuxer)}pushMp4Captions(d){this.captionParser||(this.captionParser=new Nm,this.captionParser.init());const p=new Uint8Array(d.data,d.byteOffset,d.byteLength),f=this.captionParser.parse(p,d.trackIds,d.timescales);this.self.postMessage({action:"mp4Captions",captions:f&&f.captions||[],logs:f&&f.logs||[],data:p.buffer},[p.buffer])}initMp4WebVttParser(d){this.webVttParser||(this.webVttParser=new ec);const p=new Uint8Array(d.data,d.byteOffset,d.byteLength);this.webVttParser.init(p)}getMp4WebVttText(d){this.webVttParser||(this.webVttParser=new ec);const p=new Uint8Array(d.data,d.byteOffset,d.byteLength),f=this.webVttParser.parseSegment(p);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:f||[],data:p.buffer},[p.buffer])}probeMp4StartTime({timescales:d,data:p}){const f=Pr.startTime(d,p);this.self.postMessage({action:"probeMp4StartTime",startTime:f,data:p},[p.buffer])}probeMp4Tracks({data:d}){const p=Pr.tracks(d);this.self.postMessage({action:"probeMp4Tracks",tracks:p,data:d},[d.buffer])}probeEmsgID3({data:d,offset:p}){const f=Pr.getEmsgID3(d,p);this.self.postMessage({action:"probeEmsgID3",id3Frames:f,emsgData:d},[d.buffer])}probeTs({data:d,baseStartTime:p}){const f=typeof p=="number"&&!isNaN(p)?p*Xe.ONE_SECOND_IN_TS:void 0,v=Ym.inspect(d,f);let y=null;v&&(y={hasVideo:v.video&&v.video.length===2||!1,hasAudio:v.audio&&v.audio.length===2||!1},y.hasVideo&&(y.videoStart=v.video[0].ptsTime),y.hasAudio&&(y.audioStart=v.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:y,data:d},[d.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(d){const p=new Uint8Array(d.data,d.byteOffset,d.byteLength);this.transmuxer.push(p)}reset(){this.transmuxer.reset()}setTimestampOffset(d){const p=d.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Xe.secondsToVideoTs(p)))}setAudioAppendStart(d){this.transmuxer.setAudioAppendStart(Math.ceil(Xe.secondsToVideoTs(d.appendStart)))}setRemux(d){this.transmuxer.setRemux(d.remux)}flush(d){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(d){this.transmuxer.alignGopsWith(d.gopsToAlignWith.slice())}}self.onmessage=function(u){if(u.data.action==="init"&&u.data.options){this.messageHandlers=new rc(self,u.data.options);return}this.messageHandlers||(this.messageHandlers=new rc(self)),u.data&&u.data.action&&u.data.action!=="init"&&this.messageHandlers[u.data.action]&&this.messageHandlers[u.data.action](u.data)}}));var t5=Ff(e5);const i5=(r,e,t)=>{const{type:n,initSegment:s,captions:a,captionStreams:o,metadata:l,videoFrameDtsTime:c,videoFramePtsTime:h}=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 h<"u"&&(g.videoFramePtsTime=h),t(g)},n5=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},r5=(r,e)=>{e.gopInfo=r.data.gopInfo},qf=r=>{const{transmuxer:e,bytes:t,audioAppendStart:n,gopsToAlignWith:s,remux:a,onData:o,onTrackInfo:l,onAudioTimingInfo:c,onVideoTimingInfo:h,onVideoSegmentTimingInfo:m,onAudioSegmentTimingInfo:g,onId3:k,onCaptions:T,onDone:O,onEndedTimeline:_,onTransmuxerLog:S,isEndOfTimeline:R,segment:L,triggerSegmentEventFn:I}=r,j={buffer:[]};let M=R;const P=X=>{e.currentTransmux===r&&(X.data.action==="data"&&i5(X,j,o),X.data.action==="trackinfo"&&l(X.data.trackInfo),X.data.action==="gopInfo"&&r5(X,j),X.data.action==="audioTimingInfo"&&c(X.data.audioTimingInfo),X.data.action==="videoTimingInfo"&&h(X.data.videoTimingInfo),X.data.action==="videoSegmentTimingInfo"&&m(X.data.videoSegmentTimingInfo),X.data.action==="audioSegmentTimingInfo"&&g(X.data.audioSegmentTimingInfo),X.data.action==="id3Frame"&&k([X.data.id3Frame],X.data.id3Frame.dispatchType),X.data.action==="caption"&&T(X.data.caption),X.data.action==="endedtimeline"&&(M=!1,_()),X.data.action==="log"&&S(X.data.log),X.data.type==="transmuxed"&&(M||(e.onmessage=null,n5({transmuxedData:j,callback:O}),Hf(e))))},N=()=>{const X={message:"Received an error message from the transmuxer worker",metadata:{errorType:ie.Error.StreamingFailedToTransmuxSegment,segmentInfo:An({segment:L})}};O(null,X)};if(e.onmessage=P,e.onerror=N,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}),t.byteLength){const X=t instanceof ArrayBuffer?t:t.buffer,b=t instanceof ArrayBuffer?0:t.byteOffset;I({type:"segmenttransmuxingstart",segment:L}),e.postMessage({action:"push",data:X,byteOffset:b,byteLength:t.byteLength},[X])}R&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},Hf=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():qf(r.currentTransmux))},Gd=(r,e)=>{r.postMessage({action:e}),Hf(r)},jf=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,Gd(e,r);return}e.transmuxQueue.push(Gd.bind(null,e,r))},s5=r=>{jf("reset",r)},a5=r=>{jf("endTimeline",r)},zf=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,qf(r);return}r.transmuxer.transmuxQueue.push(r)},o5=r=>{const e=new t5;e.currentTransmux=null,e.transmuxQueue=[];const t=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,t.call(e)),e.postMessage({action:"init",options:r}),e};var Qo={reset:s5,endTimeline:a5,transmux:zf,createTransmuxer:o5};const nr=function(r){const e=r.transmuxer,t=r.endAction||r.action,n=r.callback,s=xt({},r,{endAction:null,transmuxer:null,callback:null}),a=o=>{o.data.action===t&&(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)},ji={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Gf="wvtt",Sl=r=>{r.forEach(e=>{e.abort()})},l5=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),u5=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},vu=(r,e)=>{const{requestType:t}=e,n=Rn({requestType:t,request:e,error:r});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:ji.TIMEOUT,xhr:e,metadata:n}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:ji.ABORTED,xhr:e,metadata:n}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:ji.FAILURE,xhr:e,metadata:n}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:ji.FAILURE,xhr:e,metadata:n}:null},Wd=(r,e,t,n)=>(s,a)=>{const o=a.response,l=vu(s,a);if(l)return t(l,r);if(o.byteLength!==16)return t({status:a.status,message:"Invalid HLS key at URL: "+a.uri,code:ji.FAILURE,xhr:a},r);const c=new DataView(o),h=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=h;const m={uri:a.uri};return n({type:"segmentkeyloadcomplete",segment:r,keyInfo:m}),t(null,r)},c5=(r,e)=>{e===Gf&&r.transmuxer.postMessage({action:"initMp4WebVttParser",data:r.map.bytes})},d5=(r,e,t)=>{e===Gf&&nr({action:"getMp4WebVttText",data:r.bytes,transmuxer:r.transmuxer,callback:({data:n,mp4VttCues:s})=>{r.bytes=n,t(null,r,{mp4VttCues:s})}})},Wf=(r,e)=>{const t=$l(r.map.bytes);if(t!=="mp4"){const n=r.map.resolvedUri||r.map.uri,s=t||"unknown";return e({internal:!0,message:`Found unsupported ${s} container for initialization segment at URL: ${n}`,code:ji.FAILURE,metadata:{mediaType:s}})}nr({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"&&c5(r,a.codec))}),e(null))})},h5=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:t})=>(n,s)=>{const a=vu(n,s);if(a)return e(a,r);const o=new Uint8Array(s.response);if(t({type:"segmentloaded",segment:r}),r.map.key)return r.map.encryptedBytes=o,e(null,r);r.map.bytes=o,Wf(r,function(l){if(l)return l.xhr=s,l.status=s.status,e(l,r);e(null,r)})},f5=({segment:r,finishProcessingFn:e,responseType:t,triggerSegmentEventFn:n})=>(s,a)=>{const o=vu(s,a);if(o)return e(o,r);n({type:"segmentloaded",segment:r});const l=t==="arraybuffer"||!a.responseText?a.response:ZC(a.responseText.substring(r.lastReachedChar||0));return r.stats=l5(a),r.key?r.encryptedBytes=new Uint8Array(l):r.bytes=new Uint8Array(l),e(null,r)},p5=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})=>{const O=r.map&&r.map.tracks||{},_=!!(O.audio&&O.video);let S=n.bind(null,r,"audio","start");const R=n.bind(null,r,"audio","end");let L=n.bind(null,r,"video","start");const I=n.bind(null,r,"video","end"),j=()=>zf({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:_,onData:M=>{M.type=M.type==="combined"?"video":M.type,m(r,M)},onTrackInfo:M=>{t&&(_&&(M.isMuxed=!0),t(r,M))},onAudioTimingInfo:M=>{S&&typeof M.start<"u"&&(S(M.start),S=null),R&&typeof M.end<"u"&&R(M.end)},onVideoTimingInfo:M=>{L&&typeof M.start<"u"&&(L(M.start),L=null),I&&typeof M.end<"u"&&I(M.end)},onVideoSegmentTimingInfo:M=>{const P={pts:{start:M.start.presentation,end:M.end.presentation},dts:{start:M.start.decode,end:M.end.decode}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:P}),s(M)},onAudioSegmentTimingInfo:M=>{const P={pts:{start:M.start.pts,end:M.end.pts},dts:{start:M.start.dts,end:M.end.dts}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:P}),a(M)},onId3:(M,P)=>{o(r,M,P)},onCaptions:M=>{l(r,[M])},isEndOfTimeline:c,onEndedTimeline:()=>{h()},onTransmuxerLog:k,onDone:(M,P)=>{g&&(M.type=M.type==="combined"?"video":M.type,T({type:"segmenttransmuxingcomplete",segment:r}),g(P,r,M))},segment:r,triggerSegmentEventFn:T});nr({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:M=>{r.bytes=e=M.data;const P=M.result;P&&(t(r,{hasAudio:P.hasAudio,hasVideo:P.hasVideo,isMuxed:_}),t=null),j()}})},Yf=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})=>{let O=new Uint8Array(e);if(M8(O)){r.isFmp4=!0;const{tracks:_}=r.map;if(_.text&&(!_.audio||!_.video)){m(r,{data:O,type:"text"}),d5(r,_.text.codec,g);return}const R={isFmp4:!0,hasVideo:!!_.video,hasAudio:!!_.audio};_.audio&&_.audio.codec&&_.audio.codec!=="enca"&&(R.audioCodec=_.audio.codec),_.video&&_.video.codec&&_.video.codec!=="encv"&&(R.videoCodec=_.video.codec),_.video&&_.audio&&(R.isMuxed=!0),t(r,R);const L=(I,j)=>{m(r,{data:O,type:R.hasAudio&&!R.isMuxed?"audio":"video"}),j&&j.length&&o(r,j),I&&I.length&&l(r,I),g(null,r,{})};nr({action:"probeMp4StartTime",timescales:r.map.timescales,data:O,transmuxer:r.transmuxer,callback:({data:I,startTime:j})=>{e=I.buffer,r.bytes=O=I,R.hasAudio&&!R.isMuxed&&n(r,"audio","start",j),R.hasVideo&&n(r,"video","start",j),nr({action:"probeEmsgID3",data:O,transmuxer:r.transmuxer,offset:j,callback:({emsgData:M,id3Frames:P})=>{if(e=M.buffer,r.bytes=O=M,!_.video||!M.byteLength||!r.transmuxer){L(void 0,P);return}nr({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:O,timescales:r.map.timescales,trackIds:[_.video.id],callback:N=>{e=N.data.buffer,r.bytes=O=N.data,N.logs.forEach(function(X){k(st(X,{stream:"mp4CaptionParser"}))}),L(N.captions,P)}})}})}});return}if(!r.transmuxer){g(null,r,{});return}if(typeof r.container>"u"&&(r.container=$l(O)),r.container!=="ts"&&r.container!=="aac"){t(r,{hasAudio:!1,hasVideo:!1}),g(null,r,{});return}p5({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})},Xf=function({id:r,key:e,encryptedBytes:t,decryptionWorker:n,segment:s,doneFn:a},o){const l=h=>{if(h.data.source===r){n.removeEventListener("message",l);const m=h.data.decrypted;o(new Uint8Array(m.bytes,m.byteOffset,m.byteLength))}};n.onerror=()=>{const h="An error occurred in the decryption worker",m=An({segment:s}),g={message:h,metadata:{error:new Error(h),errorType:ie.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(Bf({source:r,encrypted:t,key:c,iv:e.iv}),[t.buffer,c.buffer])},m5=({decryptionWorker:r,segment:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})=>{T({type:"segmentdecryptionstart"}),Xf({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:g},O=>{e.bytes=O,T({type:"segmentdecryptioncomplete",segment:e}),Yf({segment:e,bytes:e.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})})},g5=({activeXhrs:r,decryptionWorker:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})=>{let O=0,_=!1;return(S,R)=>{if(!_){if(S)return _=!0,Sl(r),g(S,R);if(O+=1,O===r.length){const L=function(){if(R.encryptedBytes)return m5({decryptionWorker:e,segment:R,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T});Yf({segment:R,bytes:R.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})};if(R.endOfAllRequests=Date.now(),R.map&&R.map.encryptedBytes&&!R.map.bytes)return T({type:"segmentdecryptionstart",segment:R}),Xf({decryptionWorker:e,id:R.requestId+"-init",encryptedBytes:R.map.encryptedBytes,key:R.map.key,segment:R,doneFn:g},I=>{R.map.bytes=I,T({type:"segmentdecryptioncomplete",segment:R}),Wf(R,j=>{if(j)return Sl(r),g(j,R);L()})});L()}}}},v5=({loadendState:r,abortFn:e})=>t=>{t.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},_5=({segment:r,progressFn:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m})=>g=>{if(!g.target.aborted)return r.stats=st(r.stats,u5(g)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(g,r)},y5=({xhr:r,xhrOptions:e,decryptionWorker:t,segment:n,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:h,id3Fn:m,captionsFn:g,isEndOfTimeline:k,endedTimelineFn:T,dataFn:O,doneFn:_,onTransmuxerLog:S,triggerSegmentEventFn:R})=>{const L=[],I=g5({activeXhrs:L,decryptionWorker:t,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:h,id3Fn:m,captionsFn:g,isEndOfTimeline:k,endedTimelineFn:T,dataFn:O,doneFn:_,onTransmuxerLog:S,triggerSegmentEventFn:R});if(n.key&&!n.key.bytes){const X=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&X.push(n.map.key);const b=st(e,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),C=Wd(n,X,I,R),$={uri:n.key.resolvedUri};R({type:"segmentkeyloadstart",segment:n,keyInfo:$});const U=r(b,C);L.push(U)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const U=st(e,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),E=Wd(n,[n.map.key],I,R),w={uri:n.map.key.resolvedUri};R({type:"segmentkeyloadstart",segment:n,keyInfo:w});const F=r(U,E);L.push(F)}const b=st(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Cl(n.map),requestType:"segment-media-initialization"}),C=h5({segment:n,finishProcessingFn:I,triggerSegmentEventFn:R});R({type:"segmentloadstart",segment:n});const $=r(b,C);L.push($)}const j=st(e,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:Cl(n),requestType:"segment"}),M=f5({segment:n,finishProcessingFn:I,responseType:j.responseType,triggerSegmentEventFn:R});R({type:"segmentloadstart",segment:n});const P=r(j,M);P.addEventListener("progress",_5({segment:n,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:h,id3Fn:m,captionsFn:g,isEndOfTimeline:k,endedTimelineFn:T,dataFn:O})),L.push(P);const N={};return L.forEach(X=>{X.addEventListener("loadend",v5({loadendState:N,abortFn:s}))}),()=>Sl(L)},Gs=bi("PlaylistSelector"),Yd=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||""})},rr=function(r,e){if(!r)return"";const t=W.getComputedStyle(r);return t?t[e]:""},sr=function(r,e){const t=r.slice();r.sort(function(n,s){const a=e(n,s);return a===0?t.indexOf(n)-t.indexOf(s):a})},_u=function(r,e){let t,n;return r.attributes.BANDWIDTH&&(t=r.attributes.BANDWIDTH),t=t||W.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||W.Number.MAX_VALUE,t-n},T5=function(r,e){let t,n;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(t=r.attributes.RESOLUTION.width),t=t||W.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||W.Number.MAX_VALUE,t===n&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:t-n};let Kf=function(r){const{main:e,bandwidth:t,playerWidth:n,playerHeight:s,playerObjectFit:a,limitRenditionByPlayerDimensions:o,playlistController:l}=r;if(!e)return;const c={bandwidth:t,width:n,height:s,limitRenditionByPlayerDimensions:o};let h=e.playlists;ai.isAudioOnly(e)&&(h=l.getAudioTrackPlaylists_(),c.audioOnly=!0);let m=h.map(N=>{let X;const b=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.width,C=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.height;return X=N.attributes&&N.attributes.BANDWIDTH,X=X||W.Number.MAX_VALUE,{bandwidth:X,width:b,height:C,playlist:N}});sr(m,(N,X)=>N.bandwidth-X.bandwidth),m=m.filter(N=>!ai.isIncompatible(N.playlist));let g=m.filter(N=>ai.isEnabled(N.playlist));g.length||(g=m.filter(N=>!ai.isDisabled(N.playlist)));const k=g.filter(N=>N.bandwidth*Nt.BANDWIDTH_VARIANCE<t);let T=k[k.length-1];const O=k.filter(N=>N.bandwidth===T.bandwidth)[0];if(o===!1){const N=O||g[0]||m[0];if(N&&N.playlist){let X="sortedPlaylistReps";return O&&(X="bandwidthBestRep"),g[0]&&(X="enabledPlaylistReps"),Gs(`choosing ${Yd(N)} using ${X} with options`,c),N.playlist}return Gs("could not choose a playlist with options",c),null}const _=k.filter(N=>N.width&&N.height);sr(_,(N,X)=>N.width-X.width);const S=_.filter(N=>N.width===n&&N.height===s);T=S[S.length-1];const R=S.filter(N=>N.bandwidth===T.bandwidth)[0];let L,I,j;R||(L=_.filter(N=>a==="cover"?N.width>n&&N.height>s:N.width>n||N.height>s),I=L.filter(N=>N.width===L[0].width&&N.height===L[0].height),T=I[I.length-1],j=I.filter(N=>N.bandwidth===T.bandwidth)[0]);let M;if(l.leastPixelDiffSelector){const N=_.map(X=>(X.pixelDiff=Math.abs(X.width-n)+Math.abs(X.height-s),X));sr(N,(X,b)=>X.pixelDiff===b.pixelDiff?b.bandwidth-X.bandwidth:X.pixelDiff-b.pixelDiff),M=N[0]}const P=M||j||R||O||g[0]||m[0];if(P&&P.playlist){let N="sortedPlaylistReps";return M?N="leastPixelDiffRep":j?N="resolutionPlusOneRep":R?N="resolutionBestRep":O?N="bandwidthBestRep":g[0]&&(N="enabledPlaylistReps"),Gs(`choosing ${Yd(P)} using ${N} with options`,c),P.playlist}return Gs("could not choose a playlist with options",c),null};const Xd=function(){let r=this.useDevicePixelRatio&&W.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),Kf({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(rr(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(rr(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?rr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},b5=function(r){let e=-1,t=-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,t=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==t&&(e=r*this.systemBandwidth+(1-r)*e,t=this.systemBandwidth),Kf({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(rr(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(rr(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?rr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},x5=function(r){const{main:e,currentTime:t,bandwidth:n,duration:s,segmentDuration:a,timeUntilRebuffer:o,currentTimeline:l,syncController:c}=r,h=e.playlists.filter(O=>!ai.isIncompatible(O));let m=h.filter(ai.isEnabled);m.length||(m=h.filter(O=>!ai.isDisabled(O)));const k=m.filter(ai.hasAttribute.bind(null,"BANDWIDTH")).map(O=>{const S=c.getSyncPoint(O,s,l,t)?1:2,L=ai.estimateSegmentRequestTime(a,n,O)*S-o;return{playlist:O,rebufferingImpact:L}}),T=k.filter(O=>O.rebufferingImpact<=0);return sr(T,(O,_)=>_u(_.playlist,O.playlist)),T.length?T[0]:(sr(k,(O,_)=>O.rebufferingImpact-_.rebufferingImpact),k[0]||null)},C5=function(){const r=this.playlists.main.playlists.filter(ai.isEnabled);return sr(r,(t,n)=>_u(t,n)),r.filter(t=>!!ns(this.playlists.main,t).video)[0]||null},E5=r=>{let e=0,t;return r.bytes&&(t=new Uint8Array(r.bytes),r.segments.forEach(n=>{t.set(n,e),e+=n.byteLength})),t};function Qf(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const S5=function(r,e,t){if(!r[t]){e.trigger({type:"usage",name:"vhs-608"});let n=t;/^cc708_/.test(t)&&(n="SERVICE"+t.split("_")[1]);const s=e.textTracks().getTrackById(n);if(s)r[t]=s;else{const a=e.options_.vhs&&e.options_.vhs.captionServices||{};let o=t,l=t,c=!1;const h=a[n];h&&(o=h.label,l=h.language,c=h.default),r[t]=e.addRemoteTextTrack({kind:"captions",id:n,default:c,label:o,language:l},!1).track}}},k5=function({inbandTextTracks:r,captionArray:e,timestampOffset:t}){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+t,s.endTime+t,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+t,s.endTime+t,s.text))})},w5=function(r){Object.defineProperties(r.frame,{id:{get(){return ie.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return ie.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return ie.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},D5=({inbandTextTracks:r,metadataArray:e,timestampOffset:t,videoDuration:n})=>{if(!e)return;const s=W.WebKitDataCue||W.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(m=>{const g=m.cueTime+t;typeof g!="number"||W.isNaN(g)||g<0||!(g<1/0)||!m.frames||!m.frames.length||m.frames.forEach(k=>{const T=new s(g,g,k.value||k.url||k.data||"");T.frame=k,T.value=k,w5(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 k=m[g.startTime]||[];return k.push(g),m[g.startTime]=k,m},{}),h=Object.keys(c).sort((m,g)=>Number(m)-Number(g));h.forEach((m,g)=>{const k=c[m],T=isFinite(n)?n:m,O=Number(h[g+1])||T;k.forEach(_=>{_.endTime=O})})},A5={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},N5=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),I5=({inbandTextTracks:r,dateRanges:e})=>{const t=r.metadataTrack_;if(!t)return;const n=W.WebKitDataCue||W.VTTCue;e.forEach(s=>{for(const a of Object.keys(s)){if(N5.has(a))continue;const o=new n(s.startTime,s.endTime,"");o.id=s.id,o.type="com.apple.quicktime.HLS",o.value={key:A5[a],data:s[a]},(a==="scte35Out"||a==="scte35In")&&(o.value.data=new Uint8Array(o.value.data.match(/[\da-f]{2}/gi)).buffer),t.addCue(o)}s.processDateRange()})},Kd=(r,e,t)=>{r.metadataTrack_||(r.metadataTrack_=t.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ie.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},Qr=function(r,e,t){let n,s;if(t&&t.cues)for(n=t.cues.length;n--;)s=t.cues[n],s.startTime>=r&&s.endTime<=e&&t.removeCue(s)},O5=function(r){const e=r.cues;if(!e)return;const t={};for(let n=e.length-1;n>=0;n--){const s=e[n],a=`${s.startTime}-${s.endTime}-${s.text}`;t[a]?r.removeCue(s):t[a]=s}},B5=(r,e,t)=>{if(typeof e>"u"||e===null||!r.length)return[];const n=Math.ceil((e-t+3)*Nn.ONE_SECOND_IN_TS);let s;for(s=0;s<r.length&&!(r[s].pts>n);s++);return r.slice(s)},L5=(r,e,t)=>{if(!e.length)return r;if(t)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)},M5=(r,e,t,n)=>{const s=Math.ceil((e-n)*Nn.ONE_SECOND_IN_TS),a=Math.ceil((t-n)*Nn.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},P5=function(r,e){if(!r&&!e||!r&&e||r&&!e)return!1;if(r===e)return!0;const t=Object.keys(r).sort(),n=Object.keys(e).sort();if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++){const a=t[s];if(a!==n[s]||r[a]!==e[a])return!1}return!0},R5=function(r,e,t){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>t))return a}return n.length===0?0:n[n.length-1]},Wr=1,V5=500,Qd=r=>typeof r=="number"&&isFinite(r),Ws=1/60,F5=(r,e,t)=>r!=="main"||!e||!t?null:!t.hasAudio&&!t.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!t.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&&t.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,$5=(r,e,t)=>{let n=e-Nt.BACK_BUFFER_LENGTH;r.length&&(n=Math.max(n,r.start(0)));const s=e-t;return Math.min(s,n)},Gn=r=>{const{startOfSegment:e,duration:t,segment:n,part:s,playlist:{mediaSequence:a,id:o,segments:l=[]},mediaIndex:c,partIndex:h,timeline:m}=r,g=l.length-1;let k="mediaIndex/partIndex increment";r.getMediaInfoForTime?k=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(k="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(k+=` with independent ${r.independent}`);const T=typeof h=="number",O=r.segment.uri?"segment":"pre-segment",_=T?mf({preloadSegment:n})-1:0;return`${O} [${a+c}/${a+g}]`+(T?` part [${h}/${_}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(T?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${e}] duration [${t}] timeline [${m}] selected by [${k}] playlist [${o}]`},Zd=r=>`${r}TimingInfo`,U5=({segmentTimeline:r,currentTimeline:e,startOfSegment:t,buffered:n,overrideCheck:s})=>!s&&r===e?null:r<e?t:n.length?n.end(n.length-1):t,kl=({timelineChangeController:r,currentTimeline:e,segmentTimeline:t,loaderType:n,audioDisabled:s})=>{if(e===t)return!1;if(n==="audio"){const a=r.lastTimelineChange({type:"main"});return!a||a.to!==t}if(n==="main"&&s){const a=r.pendingTimelineChange({type:"audio"});return!(a&&a.to===t)}return!1},q5=r=>{if(!r)return!1;const e=r.pendingTimelineChange({type:"audio"}),t=r.pendingTimelineChange({type:"main"}),n=e&&t,s=n&&e.to!==t.to;return!!(n&&e.from!==-1&&t.from!==-1&&s)},H5=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),t=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&t&&e.to<t.to},hn=r=>{const e=r.pendingSegment_;if(!e)return;if(kl({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&q5(r.timelineChangeController_)){if(H5(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}r.timelineChangeController_.trigger("fixBadTimelineChange")}},j5=r=>{let e=0;return["video","audio"].forEach(function(t){const n=r[`${t}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},Jd=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+qi:!1,z5=(r,e)=>{if(e!=="hls")return null;const t=j5({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!t)return null;const n=r.playlist.targetDuration,s=Jd({segmentDuration:t,maxDuration:n*2}),a=Jd({segmentDuration:t,maxDuration:n}),o=`Segment with index ${r.mediaIndex} from playlist ${r.playlist.id} has a duration of ${t} 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 t=!!(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:t,isMediaInitialization:n}};class wl extends ie.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=bi(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(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(xt({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(xt({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 Qo.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_&&Qo.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Ot();if(this.loaderType_==="main"){const{hasAudio:t,hasVideo:n,isMuxed:s}=e;if(n&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const n=Ca(e);let s=this.initSegments_[n];return t&&!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,t=!1){if(!e)return null;const n=Lf(e);let s=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!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,t={}){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_=t,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:
208
+ `),this.pushCaption(d),d.startPts=u},ze.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)},ze.prototype.displayWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&(d.windows[y].visible=1);return u},ze.prototype.hideWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&(d.windows[y].visible=0);return u},ze.prototype.toggleWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&(d.windows[y].visible^=1);return u},ze.prototype.clearWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&d.windows[y].clearText();return u},ze.prototype.deleteWindows=function(u,d){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,d);for(var y=0;y<8;y++)f&1<<y&&d.windows[y].reset();return u},ze.prototype.setPenAttributes=function(u,d){var p=this.current708Packet.data,f=p[u],v=d.currentWindow.penAttr;return f=p[++u],v.textTag=(f&240)>>4,v.offset=(f&12)>>2,v.penSize=f&3,f=p[++u],v.italics=(f&128)>>7,v.underline=(f&64)>>6,v.edgeType=(f&56)>>3,v.fontStyle=f&7,u},ze.prototype.setPenColor=function(u,d){var p=this.current708Packet.data,f=p[u],v=d.currentWindow.penColor;return f=p[++u],v.fgOpacity=(f&192)>>6,v.fgRed=(f&48)>>4,v.fgGreen=(f&12)>>2,v.fgBlue=f&3,f=p[++u],v.bgOpacity=(f&192)>>6,v.bgRed=(f&48)>>4,v.bgGreen=(f&12)>>2,v.bgBlue=f&3,f=p[++u],v.edgeRed=(f&48)>>4,v.edgeGreen=(f&12)>>2,v.edgeBlue=f&3,u},ze.prototype.setPenLocation=function(u,d){var p=this.current708Packet.data,f=p[u],v=d.currentWindow.penLoc;return d.currentWindow.pendingNewLine=!0,f=p[++u],v.row=f&15,f=p[++u],v.column=f&63,u},ze.prototype.reset=function(u,d){var p=this.getPts(u);return this.flushDisplayed(p,d),this.initService(d.serviceNum,u)};var Si={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Pi=function(u){return u===null?"":(u=Si[u]||u,String.fromCharCode(u))},xn=14,gs=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ki=function(){for(var u=[],d=xn+1;d--;)u.push({text:"",indent:0,offset:0});return u},Se=function(u,d){Se.prototype.init.call(this),this.field_=u||0,this.dataChannel_=d||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(p){var f,v,y,B,V;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),y=f>>>8,B=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),v=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=v,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_=Ki();else if(f===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ki();else if(f===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(p.pts),this.displayed_=Ki()),this.mode_="paintOn",this.startPts_=p.pts;else if(this.isSpecialCharacter(y,B))y=(y&3)<<8,V=Pi(y|B),this[this.mode_](p.pts,V),this.column_++;else if(this.isExtCharacter(y,B))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),y=(y&3)<<8,V=Pi(y|B),this[this.mode_](p.pts,V),this.column_++;else if(this.isMidRowCode(y,B))this.clearFormatting(p.pts),this[this.mode_](p.pts," "),this.column_++,(B&14)===14&&this.addFormatting(p.pts,["i"]),(B&1)===1&&this.addFormatting(p.pts,["u"]);else if(this.isOffsetControlCode(y,B)){const Y=B&3;this.nonDisplayed_[this.row_].offset=Y,this.column_+=Y}else if(this.isPAC(y,B)){var j=gs.indexOf(f&7968);if(this.mode_==="rollUp"&&(j-this.rollUpRows_+1<0&&(j=this.rollUpRows_-1),this.setRollUp(p.pts,j)),j!==this.row_&&j>=0&&j<=14&&(this.clearFormatting(p.pts),this.row_=j),B&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(B)&&(B&14)===14&&this.addFormatting(p.pts,["i"])}else this.isNormalChar(y)&&(B===0&&(B=null),V=Pi(y),V+=Pi(B),this[this.mode_](p.pts,V),this.column_+=V.length)}};Se.prototype=new Bt,Se.prototype.flushDisplayed=function(u){const d=f=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."})},p=[];this.displayed_.forEach((f,v)=>{if(f&&f.text&&f.text.length){try{f.text=f.text.trim()}catch{d(v)}f.text.length&&p.push({text:f.text,line:v+1,position:10+Math.min(70,f.indent*10)+f.offset*2.5})}else f==null&&d(v)}),p.length&&this.trigger("data",{startPts:this.startPts_,endPts:u,content:p,stream:this.name_})},Se.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ki(),this.nonDisplayed_=Ki(),this.lastControlCode_=null,this.column_=0,this.row_=xn,this.rollUpRows_=2,this.formatting_=[]},Se.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Se.prototype.isSpecialCharacter=function(u,d){return u===this.EXT_&&d>=48&&d<=63},Se.prototype.isExtCharacter=function(u,d){return(u===this.EXT_+1||u===this.EXT_+2)&&d>=32&&d<=63},Se.prototype.isMidRowCode=function(u,d){return u===this.EXT_&&d>=32&&d<=47},Se.prototype.isOffsetControlCode=function(u,d){return u===this.OFFSET_&&d>=33&&d<=35},Se.prototype.isPAC=function(u,d){return u>=this.BASE_&&u<this.BASE_+8&&d>=64&&d<=127},Se.prototype.isColorPAC=function(u){return u>=64&&u<=79||u>=96&&u<=127},Se.prototype.isNormalChar=function(u){return u>=32&&u<=127},Se.prototype.setRollUp=function(u,d){if(this.mode_!=="rollUp"&&(this.row_=xn,this.mode_="rollUp",this.flushDisplayed(u),this.nonDisplayed_=Ki(),this.displayed_=Ki()),d!==void 0&&d!==this.row_)for(var p=0;p<this.rollUpRows_;p++)this.displayed_[d-p]=this.displayed_[this.row_-p],this.displayed_[this.row_-p]={text:"",indent:0,offset:0};d===void 0&&(d=this.row_),this.topRow_=d-this.rollUpRows_+1},Se.prototype.addFormatting=function(u,d){this.formatting_=this.formatting_.concat(d);var p=d.reduce(function(f,v){return f+"<"+v+">"},"");this[this.mode_](u,p)},Se.prototype.clearFormatting=function(u){if(this.formatting_.length){var d=this.formatting_.reverse().reduce(function(p,f){return p+"</"+f+">"},"");this.formatting_=[],this[this.mode_](u,d)}},Se.prototype.popOn=function(u,d){var p=this.nonDisplayed_[this.row_].text;p+=d,this.nonDisplayed_[this.row_].text=p},Se.prototype.rollUp=function(u,d){var p=this.displayed_[this.row_].text;p+=d,this.displayed_[this.row_].text=p},Se.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<xn+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}},Se.prototype.paintOn=function(u,d){var p=this.displayed_[this.row_].text;p+=d,this.displayed_[this.row_].text=p};var ee={CaptionStream:Ke,Cea608Stream:Se,Cea708Stream:ze},pe={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},we=t,Qe=8589934592,Ft=4294967296,wt="shared",Tt=function(u,d){var p=1;for(u>d&&(p=-1);Math.abs(d-u)>Ft;)u+=p*Qe;return u},ki=function(u){var d,p;ki.prototype.init.call(this),this.type_=u||wt,this.push=function(f){if(f.type==="metadata"){this.trigger("data",f);return}this.type_!==wt&&f.type!==this.type_||(p===void 0&&(p=f.dts),f.dts=Tt(f.dts,p),f.pts=Tt(f.pts,p),d=f.dts,this.trigger("data",f))},this.flush=function(){p=d,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){p=void 0,d=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};ki.prototype=new we;var vt={TimestampRolloverStream:ki,handleRollover:Tt},Er=(u,d,p)=>{if(!u)return-1;for(var f=p;f<u.length;f++)if(u[f]===d)return f;return-1},vs={typedArrayIndexOf:Er},Sr=vs.typedArrayIndexOf,_s={Utf8:3},yu=function(u,d,p){var f,v="";for(f=d;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},kr=function(u,d,p){return decodeURIComponent(yu(u,d,p))},wr=function(u,d,p){return unescape(yu(u,d,p))},Dr=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},Ar={APIC:function(u){var d=1,p,f,v="-->";u.data[0]===_s.Utf8&&(p=Sr(u.data,0,d),!(p<0)&&(u.mimeType=wr(u.data,d,p),d=p+1,u.pictureType=u.data[d],d++,f=Sr(u.data,0,d),!(f<0)&&(u.description=kr(u.data,d,f),d=f+1,u.mimeType===v?u.url=wr(u.data,d,u.data.length):u.pictureData=u.data.subarray(d,u.data.length))))},"T*":function(u){u.data[0]===_s.Utf8&&(u.value=kr(u.data,1,u.data.length).replace(/\0*$/,""),u.values=u.value.split("\0"))},TXXX:function(u){var d;u.data[0]===_s.Utf8&&(d=Sr(u.data,0,1),d!==-1&&(u.description=kr(u.data,1,d),u.value=kr(u.data,d+1,u.data.length).replace(/\0*$/,""),u.data=u.value))},"W*":function(u){u.url=wr(u.data,0,u.data.length).replace(/\0.*$/,"")},WXXX:function(u){var d;u.data[0]===_s.Utf8&&(d=Sr(u.data,0,1),d!==-1&&(u.description=kr(u.data,1,d),u.url=wr(u.data,d+1,u.data.length).replace(/\0.*$/,"")))},PRIV:function(u){var d;for(d=0;d<u.data.length;d++)if(u.data[d]===0){u.owner=wr(u.data,0,d);break}u.privateData=u.data.subarray(d+1),u.data=u.privateData}},pp=function(u){var d,p,f=10,v=0,y=[];if(!(u.length<10||u[0]!==73||u[1]!==68||u[2]!==51)){v=Dr(u.subarray(6,10)),v+=10;var B=u[5]&64;B&&(f+=4,f+=Dr(u.subarray(10,14)),v-=Dr(u.subarray(16,20)));do{if(d=Dr(u.subarray(f+4,f+8)),d<1)break;p=String.fromCharCode(u[f],u[f+1],u[f+2],u[f+3]);var V={id:p,data:u.subarray(f+10,f+d+10)};V.key=V.id,Ar[V.id]?Ar[V.id](V):V.id[0]==="T"?Ar["T*"](V):V.id[0]==="W"&&Ar["W*"](V),y.push(V),f+=10,f+=d}while(f<v);return y}},Tu={parseId3Frames:pp,parseSyncSafeInteger:Dr,frameParsers:Ar},mp=t,gp=pe,on=Tu,ys;ys=function(u){var d={descriptor:u&&u.descriptor},p=0,f=[],v=0,y;if(ys.prototype.init.call(this),this.dispatchType=gp.METADATA_STREAM_TYPE.toString(16),d.descriptor)for(y=0;y<d.descriptor.length;y++)this.dispatchType+=("00"+d.descriptor[y].toString(16)).slice(-2);this.push=function(B){var V,j,Y,te,se,ke;if(B.type==="timed-metadata"){if(B.dataAlignmentIndicator&&(v=0,f.length=0),f.length===0&&(B.data.length<10||B.data[0]!==73||B.data[1]!==68||B.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(f.push(B),v+=B.data.byteLength,f.length===1&&(p=on.parseSyncSafeInteger(B.data.subarray(6,10)),p+=10),!(v<p)){for(V={data:new Uint8Array(p),frames:[],pts:f[0].pts,dts:f[0].dts},se=0;se<p;)V.data.set(f[0].data.subarray(0,p-se),se),se+=f[0].data.byteLength,v-=f[0].data.byteLength,f.shift();j=10,V.data[5]&64&&(j+=4,j+=on.parseSyncSafeInteger(V.data.subarray(10,14)),p-=on.parseSyncSafeInteger(V.data.subarray(16,20)));do{if(Y=on.parseSyncSafeInteger(V.data.subarray(j+4,j+8)),Y<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(ke=String.fromCharCode(V.data[j],V.data[j+1],V.data[j+2],V.data[j+3]),te={id:ke,data:V.data.subarray(j+10,j+Y+10)},te.key=te.id,on.frameParsers[te.id]?on.frameParsers[te.id](te):te.id[0]==="T"?on.frameParsers["T*"](te):te.id[0]==="W"&&on.frameParsers["W*"](te),te.owner==="com.apple.streaming.transportStreamTimestamp"){var le=te.data,Le=(le[3]&1)<<30|le[4]<<22|le[5]<<14|le[6]<<6|le[7]>>>2;Le*=4,Le+=le[7]&3,te.timeStamp=Le,V.pts===void 0&&V.dts===void 0&&(V.pts=te.timeStamp,V.dts=te.timeStamp),this.trigger("timestamp",te)}V.frames.push(te),j+=10,j+=Y}while(j<p);this.trigger("data",V)}}}},ys.prototype=new mp;var vp=ys,Xa=t,Ka=ee,wi=pe,_p=vt.TimestampRolloverStream,Ts,Nr,bs,$n=188,Qa=71;Ts=function(){var u=new Uint8Array($n),d=0;Ts.prototype.init.call(this),this.push=function(p){var f=0,v=$n,y;for(d?(y=new Uint8Array(p.byteLength+d),y.set(u.subarray(0,d)),y.set(p,d),d=0):y=p;v<y.byteLength;){if(y[f]===Qa&&y[v]===Qa){this.trigger("data",y.subarray(f,v)),f+=$n,v+=$n;continue}f++,v++}f<y.byteLength&&(u.set(y.subarray(f),0),d=y.byteLength-f)},this.flush=function(){d===$n&&u[0]===Qa&&(this.trigger("data",u),d=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){d=0,this.trigger("reset")}},Ts.prototype=new Xa,Nr=function(){var u,d,p,f;Nr.prototype.init.call(this),f=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,u=function(v,y){var B=0;y.payloadUnitStartIndicator&&(B+=v[B]+1),y.type==="pat"?d(v.subarray(B),y):p(v.subarray(B),y)},d=function(v,y){y.section_number=v[7],y.last_section_number=v[8],f.pmtPid=(v[10]&31)<<8|v[11],y.pmtPid=f.pmtPid},p=function(v,y){var B,V,j,Y;if(v[5]&1){for(f.programMapTable={video:null,audio:null,"timed-metadata":{}},B=(v[1]&15)<<8|v[2],V=3+B-4,j=(v[10]&15)<<8|v[11],Y=12+j;Y<V;){var te=v[Y],se=(v[Y+1]&31)<<8|v[Y+2];te===wi.H264_STREAM_TYPE&&f.programMapTable.video===null?f.programMapTable.video=se:te===wi.ADTS_STREAM_TYPE&&f.programMapTable.audio===null?f.programMapTable.audio=se:te===wi.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][se]=te),Y+=((v[Y+3]&15)<<8|v[Y+4])+5}y.programMapTable=f.programMapTable}},this.push=function(v){var y={},B=4;if(y.payloadUnitStartIndicator=!!(v[1]&64),y.pid=v[1]&31,y.pid<<=8,y.pid|=v[2],(v[3]&48)>>>4>1&&(B+=v[B]+1),y.pid===0)y.type="pat",u(v.subarray(B),y),this.trigger("data",y);else if(y.pid===this.pmtPid)for(y.type="pmt",u(v.subarray(B),y),this.trigger("data",y);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([v,B,y]):this.processPes_(v,B,y)},this.processPes_=function(v,y,B){B.pid===this.programMapTable.video?B.streamType=wi.H264_STREAM_TYPE:B.pid===this.programMapTable.audio?B.streamType=wi.ADTS_STREAM_TYPE:B.streamType=this.programMapTable["timed-metadata"][B.pid],B.type="pes",B.data=v.subarray(y),this.trigger("data",B)}},Nr.prototype=new Xa,Nr.STREAM_TYPES={h264:27,adts:15},bs=function(){var u=this,d=!1,p={data:[],size:0},f={data:[],size:0},v={data:[],size:0},y,B=function(j,Y){var te;const se=j[0]<<16|j[1]<<8|j[2];Y.data=new Uint8Array,se===1&&(Y.packetLength=6+(j[4]<<8|j[5]),Y.dataAlignmentIndicator=(j[6]&4)!==0,te=j[7],te&192&&(Y.pts=(j[9]&14)<<27|(j[10]&255)<<20|(j[11]&254)<<12|(j[12]&255)<<5|(j[13]&254)>>>3,Y.pts*=4,Y.pts+=(j[13]&6)>>>1,Y.dts=Y.pts,te&64&&(Y.dts=(j[14]&14)<<27|(j[15]&255)<<20|(j[16]&254)<<12|(j[17]&255)<<5|(j[18]&254)>>>3,Y.dts*=4,Y.dts+=(j[18]&6)>>>1)),Y.data=j.subarray(9+j[8]))},V=function(j,Y,te){var se=new Uint8Array(j.size),ke={type:Y},le=0,Le=0,je=!1,At;if(!(!j.data.length||j.size<9)){for(ke.trackId=j.data[0].pid,le=0;le<j.data.length;le++)At=j.data[le],se.set(At.data,Le),Le+=At.data.byteLength;B(se,ke),je=Y==="video"||ke.packetLength<=j.size,(te||je)&&(j.size=0,j.data.length=0),je&&u.trigger("data",ke)}};bs.prototype.init.call(this),this.push=function(j){({pat:function(){},pes:function(){var Y,te;switch(j.streamType){case wi.H264_STREAM_TYPE:Y=p,te="video";break;case wi.ADTS_STREAM_TYPE:Y=f,te="audio";break;case wi.METADATA_STREAM_TYPE:Y=v,te="timed-metadata";break;default:return}j.payloadUnitStartIndicator&&V(Y,te,!0),Y.data.push(j),Y.size+=j.data.byteLength},pmt:function(){var Y={type:"metadata",tracks:[]};y=j.programMapTable,y.video!==null&&Y.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),y.audio!==null&&Y.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),d=!0,u.trigger("data",Y)}})[j.type]()},this.reset=function(){p.size=0,p.data.length=0,f.size=0,f.data.length=0,this.trigger("reset")},this.flushStreams_=function(){V(p,"video"),V(f,"audio"),V(v,"timed-metadata")},this.flush=function(){if(!d&&y){var j={type:"metadata",tracks:[]};y.video!==null&&j.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"}),y.audio!==null&&j.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"}),u.trigger("data",j)}d=!1,this.flushStreams_(),this.trigger("done")}},bs.prototype=new Xa;var bu={PAT_PID:0,MP2T_PACKET_LENGTH:$n,TransportPacketStream:Ts,TransportParseStream:Nr,ElementaryStream:bs,TimestampRolloverStream:_p,CaptionStream:Ka.CaptionStream,Cea608Stream:Ka.Cea608Stream,Cea708Stream:Ka.Cea708Stream,MetadataStream:vp};for(var Za in wi)wi.hasOwnProperty(Za)&&(bu[Za]=wi[Za]);var yp=bu,Tp=t,bp=Xe.ONE_SECOND_IN_TS,xs,xu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];xs=function(u){var d,p=0;xs.prototype.init.call(this),this.skipWarn_=function(f,v){this.trigger("log",{level:"warn",message:`adts skiping bytes ${f} to ${v} in frame ${p} outside syncword`})},this.push=function(f){var v=0,y,B,V,j,Y;if(u||(p=0),f.type==="audio"){d&&d.length?(V=d,d=new Uint8Array(V.byteLength+f.data.byteLength),d.set(V),d.set(f.data,V.byteLength)):d=f.data;for(var te;v+7<d.length;){if(d[v]!==255||(d[v+1]&246)!==240){typeof te!="number"&&(te=v),v++;continue}if(typeof te=="number"&&(this.skipWarn_(te,v),te=null),B=(~d[v+1]&1)*2,y=(d[v+3]&3)<<11|d[v+4]<<3|(d[v+5]&224)>>5,j=((d[v+6]&3)+1)*1024,Y=j*bp/xu[(d[v+2]&60)>>>2],d.byteLength-v<y)break;this.trigger("data",{pts:f.pts+p*Y,dts:f.dts+p*Y,sampleCount:j,audioobjecttype:(d[v+2]>>>6&3)+1,channelcount:(d[v+2]&1)<<2|(d[v+3]&192)>>>6,samplerate:xu[(d[v+2]&60)>>>2],samplingfrequencyindex:(d[v+2]&60)>>>2,samplesize:16,data:d.subarray(v+7+B,v+y)}),p++,v+=y}typeof te=="number"&&(this.skipWarn_(te,v),te=null),d=d.subarray(v)}},this.flush=function(){p=0,this.trigger("done")},this.reset=function(){d=void 0,this.trigger("reset")},this.endTimeline=function(){d=void 0,this.trigger("endedtimeline")}},xs.prototype=new Tp;var xp=xs,Cu;Cu=function(u){var d=u.byteLength,p=0,f=0;this.length=function(){return 8*d},this.bitsAvailable=function(){return 8*d+f},this.loadWord=function(){var v=u.byteLength-d,y=new Uint8Array(4),B=Math.min(4,d);if(B===0)throw new Error("no bytes available");y.set(u.subarray(v,v+B)),p=new DataView(y.buffer).getUint32(0),f=B*8,d-=B},this.skipBits=function(v){var y;f>v?(p<<=v,f-=v):(v-=f,y=Math.floor(v/8),v-=y*8,d-=y,this.loadWord(),p<<=v,f-=v)},this.readBits=function(v){var y=Math.min(f,v),B=p>>>32-y;return f-=y,f>0?p<<=y:d>0&&this.loadWord(),y=v-y,y>0?B<<y|this.readBits(y):B},this.skipLeadingZeros=function(){var v;for(v=0;v<f;++v)if((p&2147483648>>>v)!==0)return p<<=v,f-=v,v;return this.loadWord(),v+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var v=this.skipLeadingZeros();return this.readBits(v+1)-1},this.readExpGolomb=function(){var v=this.readUnsignedExpGolomb();return 1&v?1+v>>>1:-1*(v>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var Cp=Cu,Eu=t,Ep=Cp,Cs,Es,Su;Es=function(){var u=0,d,p;Es.prototype.init.call(this),this.push=function(f){var v;p?(v=new Uint8Array(p.byteLength+f.data.byteLength),v.set(p),v.set(f.data,p.byteLength),p=v):p=f.data;for(var y=p.byteLength;u<y-3;u++)if(p[u+2]===1){d=u+5;break}for(;d<y;)switch(p[d]){case 0:if(p[d-1]!==0){d+=2;break}else if(p[d-2]!==0){d++;break}u+3!==d-2&&this.trigger("data",p.subarray(u+3,d-2));do d++;while(p[d]!==1&&d<y);u=d-2,d+=3;break;case 1:if(p[d-1]!==0||p[d-2]!==0){d+=3;break}this.trigger("data",p.subarray(u+3,d-2)),u=d-2,d+=3;break;default:d+=3;break}p=p.subarray(u),d-=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")}},Es.prototype=new Eu,Su={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Cs=function(){var u=new Es,d,p,f,v,y,B,V;Cs.prototype.init.call(this),d=this,this.push=function(j){j.type==="video"&&(p=j.trackId,f=j.pts,v=j.dts,u.push(j))},u.on("data",function(j){var Y={trackId:p,pts:f,dts:v,data:j,nalUnitTypeCode:j[0]&31};switch(Y.nalUnitTypeCode){case 5:Y.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:Y.nalUnitType="sei_rbsp",Y.escapedRBSP=y(j.subarray(1));break;case 7:Y.nalUnitType="seq_parameter_set_rbsp",Y.escapedRBSP=y(j.subarray(1)),Y.config=B(Y.escapedRBSP);break;case 8:Y.nalUnitType="pic_parameter_set_rbsp";break;case 9:Y.nalUnitType="access_unit_delimiter_rbsp";break}d.trigger("data",Y)}),u.on("done",function(){d.trigger("done")}),u.on("partialdone",function(){d.trigger("partialdone")}),u.on("reset",function(){d.trigger("reset")}),u.on("endedtimeline",function(){d.trigger("endedtimeline")}),this.flush=function(){u.flush()},this.partialFlush=function(){u.partialFlush()},this.reset=function(){u.reset()},this.endTimeline=function(){u.endTimeline()},V=function(j,Y){var te=8,se=8,ke,le;for(ke=0;ke<j;ke++)se!==0&&(le=Y.readExpGolomb(),se=(te+le+256)%256),te=se===0?te:se},y=function(j){for(var Y=j.byteLength,te=[],se=1,ke,le;se<Y-2;)j[se]===0&&j[se+1]===0&&j[se+2]===3?(te.push(se+2),se+=2):se++;if(te.length===0)return j;ke=Y-te.length,le=new Uint8Array(ke);var Le=0;for(se=0;se<ke;Le++,se++)Le===te[0]&&(Le++,te.shift()),le[se]=j[Le];return le},B=function(j){var Y=0,te=0,se=0,ke=0,le,Le,je,At,ui,un,Rr,Vr,Fr,$r,Ps,ct=[1,1],Ur,Ai;if(le=new Ep(j),Le=le.readUnsignedByte(),At=le.readUnsignedByte(),je=le.readUnsignedByte(),le.skipUnsignedExpGolomb(),Su[Le]&&(ui=le.readUnsignedExpGolomb(),ui===3&&le.skipBits(1),le.skipUnsignedExpGolomb(),le.skipUnsignedExpGolomb(),le.skipBits(1),le.readBoolean()))for(Ps=ui!==3?8:12,Ai=0;Ai<Ps;Ai++)le.readBoolean()&&(Ai<6?V(16,le):V(64,le));if(le.skipUnsignedExpGolomb(),un=le.readUnsignedExpGolomb(),un===0)le.readUnsignedExpGolomb();else if(un===1)for(le.skipBits(1),le.skipExpGolomb(),le.skipExpGolomb(),Rr=le.readUnsignedExpGolomb(),Ai=0;Ai<Rr;Ai++)le.skipExpGolomb();if(le.skipUnsignedExpGolomb(),le.skipBits(1),Vr=le.readUnsignedExpGolomb(),Fr=le.readUnsignedExpGolomb(),$r=le.readBits(1),$r===0&&le.skipBits(1),le.skipBits(1),le.readBoolean()&&(Y=le.readUnsignedExpGolomb(),te=le.readUnsignedExpGolomb(),se=le.readUnsignedExpGolomb(),ke=le.readUnsignedExpGolomb()),le.readBoolean()&&le.readBoolean()){switch(Ur=le.readUnsignedByte(),Ur){case 1:ct=[1,1];break;case 2:ct=[12,11];break;case 3:ct=[10,11];break;case 4:ct=[16,11];break;case 5:ct=[40,33];break;case 6:ct=[24,11];break;case 7:ct=[20,11];break;case 8:ct=[32,11];break;case 9:ct=[80,33];break;case 10:ct=[18,11];break;case 11:ct=[15,11];break;case 12:ct=[64,33];break;case 13:ct=[160,99];break;case 14:ct=[4,3];break;case 15:ct=[3,2];break;case 16:ct=[2,1];break;case 255:{ct=[le.readUnsignedByte()<<8|le.readUnsignedByte(),le.readUnsignedByte()<<8|le.readUnsignedByte()];break}}ct&&ct[0]/ct[1]}return{profileIdc:Le,levelIdc:je,profileCompatibility:At,width:(Vr+1)*16-Y*2-te*2,height:(2-$r)*(Fr+1)*16-se*2-ke*2,sarRatio:ct}}},Cs.prototype=new Eu;var Sp={H264Stream:Cs},kp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ku=function(u,d){var p=u[d+6]<<21|u[d+7]<<14|u[d+8]<<7|u[d+9],f=u[d+5],v=(f&16)>>4;return p=p>=0?p:0,v?p+20:p+10},wu=function(u,d){return u.length-d<10||u[d]!==73||u[d+1]!==68||u[d+2]!==51?d:(d+=ku(u,d),wu(u,d))},wp=function(u){var d=wu(u,0);return u.length>=d+2&&(u[d]&255)===255&&(u[d+1]&240)===240&&(u[d+1]&22)===16},Du=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},Dp=function(u,d,p){var f,v="";for(f=d;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},Ap=function(u,d,p){return unescape(Dp(u,d,p))},Np=function(u,d){var p=(u[d+5]&224)>>5,f=u[d+4]<<3,v=u[d+3]&6144;return v|f|p},Ip=function(u,d){return u[d]===73&&u[d+1]===68&&u[d+2]===51?"timed-metadata":u[d]&!0&&(u[d+1]&240)===240?"audio":null},Op=function(u){for(var d=0;d+5<u.length;){if(u[d]!==255||(u[d+1]&246)!==240){d++;continue}return kp[(u[d+2]&60)>>>2]}return null},Bp=function(u){var d,p,f,v;d=10,u[5]&64&&(d+=4,d+=Du(u.subarray(10,14)));do{if(p=Du(u.subarray(d+4,d+8)),p<1)return null;if(v=String.fromCharCode(u[d],u[d+1],u[d+2],u[d+3]),v==="PRIV"){f=u.subarray(d+10,d+p+10);for(var y=0;y<f.byteLength;y++)if(f[y]===0){var B=Ap(f,0,y);if(B==="com.apple.streaming.transportStreamTimestamp"){var V=f.subarray(y+1),j=(V[3]&1)<<30|V[4]<<22|V[5]<<14|V[6]<<6|V[7]>>>2;return j*=4,j+=V[7]&3,j}break}}d+=10,d+=p}while(d<u.byteLength);return null},Ja={isLikelyAacData:wp,parseId3TagSize:ku,parseAdtsSize:Np,parseType:Ip,parseSampleRate:Op,parseAacTimestamp:Bp},Lp=t,Au=Ja,Ss;Ss=function(){var u=new Uint8Array,d=0;Ss.prototype.init.call(this),this.setTimestamp=function(p){d=p},this.push=function(p){var f=0,v=0,y,B,V,j;for(u.length?(j=u.length,u=new Uint8Array(p.byteLength+j),u.set(u.subarray(0,j)),u.set(p,j)):u=p;u.length-v>=3;){if(u[v]===73&&u[v+1]===68&&u[v+2]===51){if(u.length-v<10||(f=Au.parseId3TagSize(u,v),v+f>u.length))break;B={type:"timed-metadata",data:u.subarray(v,v+f)},this.trigger("data",B),v+=f;continue}else if((u[v]&255)===255&&(u[v+1]&240)===240){if(u.length-v<7||(f=Au.parseAdtsSize(u,v),v+f>u.length))break;V={type:"audio",data:u.subarray(v,v+f),pts:d,dts:d},this.trigger("data",V),v+=f;continue}v++}y=u.length-v,y>0?u=u.subarray(v):u=new Uint8Array},this.reset=function(){u=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){u=new Uint8Array,this.trigger("endedtimeline")}},Ss.prototype=new Lp;var Mp=Ss,Pp=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Rp=Pp,Vp=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Fp=Vp,ks=t,Ir=Ie,Or=it,ws=Xi,Di=K,Qi=yp,Ds=Xe,Nu=xp,$p=Sp.H264Stream,Up=Mp,qp=Ja.isLikelyAacData,Hp=Xe.ONE_SECOND_IN_TS,Iu=Rp,Ou=Fp,As,Br,Ns,Cn,jp=function(u,d){d.stream=u,this.trigger("log",d)},Bu=function(u,d){for(var p=Object.keys(d),f=0;f<p.length;f++){var v=p[f];v==="headOfPipeline"||!d[v].on||d[v].on("log",jp.bind(u,v))}},Lu=function(u,d){var p;if(u.length!==d.length)return!1;for(p=0;p<u.length;p++)if(u[p]!==d[p])return!1;return!0},Mu=function(u,d,p,f,v,y){var B=p-d,V=f-d,j=v-p;return{start:{dts:u,pts:u+B},end:{dts:u+V,pts:u+j},prependedContentDuration:y,baseMediaDecodeTime:u}};Br=function(u,d){var p=[],f,v=0,y=0,B=1/0;d=d||{},f=d.firstSequenceNumber||0,Br.prototype.init.call(this),this.push=function(V){Di.collectDtsInfo(u,V),u&&Iu.forEach(function(j){u[j]=V[j]}),p.push(V)},this.setEarliestDts=function(V){v=V},this.setVideoBaseMediaDecodeTime=function(V){B=V},this.setAudioAppendStart=function(V){y=V},this.flush=function(){var V,j,Y,te,se,ke,le;if(p.length===0){this.trigger("done","AudioSegmentStream");return}V=ws.trimAdtsFramesByEarliestDts(p,u,v),u.baseMediaDecodeTime=Di.calculateTrackBaseMediaDecodeTime(u,d.keepOriginalTimestamps),le=ws.prefixWithSilence(u,V,y,B),u.samples=ws.generateSampleTable(V),Y=Ir.mdat(ws.concatenateFrameData(V)),p=[],j=Ir.moof(f,[u]),te=new Uint8Array(j.byteLength+Y.byteLength),f++,te.set(j),te.set(Y,j.byteLength),Di.clearDtsInfo(u),se=Math.ceil(Hp*1024/u.samplerate),V.length&&(ke=V.length*se,this.trigger("segmentTimingInfo",Mu(Ds.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),V[0].dts,V[0].pts,V[0].dts+ke,V[0].pts+ke,le||0)),this.trigger("timingInfo",{start:V[0].pts,end:V[0].pts+ke})),this.trigger("data",{track:u,boxes:te}),this.trigger("done","AudioSegmentStream")},this.reset=function(){Di.clearDtsInfo(u),p=[],this.trigger("reset")}},Br.prototype=new ks,As=function(u,d){var p,f=[],v=[],y,B;d=d||{},p=d.firstSequenceNumber||0,As.prototype.init.call(this),delete u.minPTS,this.gopCache_=[],this.push=function(V){Di.collectDtsInfo(u,V),V.nalUnitType==="seq_parameter_set_rbsp"&&!y&&(y=V.config,u.sps=[V.data],Ou.forEach(function(j){u[j]=y[j]},this)),V.nalUnitType==="pic_parameter_set_rbsp"&&!B&&(B=V.data,u.pps=[V.data]),f.push(V)},this.flush=function(){for(var V,j,Y,te,se,ke,le=0,Le,je;f.length&&f[0].nalUnitType!=="access_unit_delimiter_rbsp";)f.shift();if(f.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(V=Or.groupNalsIntoFrames(f),Y=Or.groupFramesIntoGops(V),Y[0][0].keyFrame||(j=this.getGopForFusion_(f[0],u),j?(le=j.duration,Y.unshift(j),Y.byteLength+=j.byteLength,Y.nalCount+=j.nalCount,Y.pts=j.pts,Y.dts=j.dts,Y.duration+=j.duration):Y=Or.extendFirstKeyFrame(Y)),v.length){var At;if(d.alignGopsAtEnd?At=this.alignGopsAtEnd_(Y):At=this.alignGopsAtStart_(Y),!At){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}Di.clearDtsInfo(u),Y=At}Di.collectDtsInfo(u,Y),u.samples=Or.generateSampleTable(Y),se=Ir.mdat(Or.concatenateNalData(Y)),u.baseMediaDecodeTime=Di.calculateTrackBaseMediaDecodeTime(u,d.keepOriginalTimestamps),this.trigger("processedGopsInfo",Y.map(function(ui){return{pts:ui.pts,dts:ui.dts,byteLength:ui.byteLength}})),Le=Y[0],je=Y[Y.length-1],this.trigger("segmentTimingInfo",Mu(u.baseMediaDecodeTime,Le.dts,Le.pts,je.dts+je.duration,je.pts+je.duration,le)),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),te=Ir.moof(p,[u]),ke=new Uint8Array(te.byteLength+se.byteLength),p++,ke.set(te),ke.set(se,te.byteLength),this.trigger("data",{track:u,boxes:ke}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),f=[],this.gopCache_.length=0,v.length=0,this.trigger("reset")},this.resetStream_=function(){Di.clearDtsInfo(u),y=void 0,B=void 0},this.getGopForFusion_=function(V){var j=45e3,Y=1/0,te,se,ke,le,Le;for(Le=0;Le<this.gopCache_.length;Le++)le=this.gopCache_[Le],ke=le.gop,!(!(u.pps&&Lu(u.pps[0],le.pps[0]))||!(u.sps&&Lu(u.sps[0],le.sps[0])))&&(ke.dts<u.timelineStartInfo.dts||(te=V.dts-ke.dts-ke.duration,te>=-1e4&&te<=j&&(!se||Y>te)&&(se=le,Y=te)));return se?se.gop:null},this.alignGopsAtStart_=function(V){var j,Y,te,se,ke,le,Le,je;for(ke=V.byteLength,le=V.nalCount,Le=V.duration,j=Y=0;j<v.length&&Y<V.length&&(te=v[j],se=V[Y],te.pts!==se.pts);){if(se.pts>te.pts){j++;continue}Y++,ke-=se.byteLength,le-=se.nalCount,Le-=se.duration}return Y===0?V:Y===V.length?null:(je=V.slice(Y),je.byteLength=ke,je.duration=Le,je.nalCount=le,je.pts=je[0].pts,je.dts=je[0].dts,je)},this.alignGopsAtEnd_=function(V){var j,Y,te,se,ke,le;for(j=v.length-1,Y=V.length-1,ke=null,le=!1;j>=0&&Y>=0;){if(te=v[j],se=V[Y],te.pts===se.pts){le=!0;break}if(te.pts>se.pts){j--;continue}j===v.length-1&&(ke=Y),Y--}if(!le&&ke===null)return null;var Le;if(le?Le=Y:Le=ke,Le===0)return V;var je=V.slice(Le),At=je.reduce(function(ui,un){return ui.byteLength+=un.byteLength,ui.duration+=un.duration,ui.nalCount+=un.nalCount,ui},{byteLength:0,duration:0,nalCount:0});return je.byteLength=At.byteLength,je.duration=At.duration,je.nalCount=At.nalCount,je.pts=je[0].pts,je.dts=je[0].dts,je},this.alignGopsWith=function(V){v=V}},As.prototype=new ks,Cn=function(u,d){this.numberOfTracks=0,this.metadataStream=d,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,Cn.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))}},Cn.prototype=new ks,Cn.prototype.flush=function(u){var d=0,p={captions:[],captionStreams:{},metadata:[],info:{}},f,v,y,B=0,V;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?(B=this.videoTrack.timelineStartInfo.pts,Ou.forEach(function(j){p.info[j]=this.videoTrack[j]},this)):this.audioTrack&&(B=this.audioTrack.timelineStartInfo.pts,Iu.forEach(function(j){p.info[j]=this.audioTrack[j]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?p.type=this.pendingTracks[0].type:p.type="combined",this.emittedTracks+=this.pendingTracks.length,y=Ir.initSegment(this.pendingTracks),p.initSegment=new Uint8Array(y.byteLength),p.initSegment.set(y),p.data=new Uint8Array(this.pendingBytes),V=0;V<this.pendingBoxes.length;V++)p.data.set(this.pendingBoxes[V],d),d+=this.pendingBoxes[V].byteLength;for(V=0;V<this.pendingCaptions.length;V++)f=this.pendingCaptions[V],f.startTime=Ds.metadataTsToSeconds(f.startPts,B,this.keepOriginalTimestamps),f.endTime=Ds.metadataTsToSeconds(f.endPts,B,this.keepOriginalTimestamps),p.captionStreams[f.stream]=!0,p.captions.push(f);for(V=0;V<this.pendingMetadata.length;V++)v=this.pendingMetadata[V],v.cueTime=Ds.metadataTsToSeconds(v.pts,B,this.keepOriginalTimestamps),p.metadata.push(v);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),V=0;V<p.captions.length;V++)f=p.captions[V],this.trigger("caption",f);for(V=0;V<p.metadata.length;V++)v=p.metadata[V],this.trigger("id3Frame",v)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Cn.prototype.setRemux=function(u){this.remuxTracks=u},Ns=function(u){var d=this,p=!0,f,v;Ns.prototype.init.call(this),u=u||{},this.baseMediaDecodeTime=u.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="aac",y.metadataStream=new Qi.MetadataStream,y.aacStream=new Up,y.audioTimestampRolloverStream=new Qi.TimestampRolloverStream("audio"),y.timedMetadataTimestampRolloverStream=new Qi.TimestampRolloverStream("timed-metadata"),y.adtsStream=new Nu,y.coalesceStream=new Cn(u,y.metadataStream),y.headOfPipeline=y.aacStream,y.aacStream.pipe(y.audioTimestampRolloverStream).pipe(y.adtsStream),y.aacStream.pipe(y.timedMetadataTimestampRolloverStream).pipe(y.metadataStream).pipe(y.coalesceStream),y.metadataStream.on("timestamp",function(B){y.aacStream.setTimestamp(B.timeStamp)}),y.aacStream.on("data",function(B){B.type!=="timed-metadata"&&B.type!=="audio"||y.audioSegmentStream||(v=v||{timelineStartInfo:{baseMediaDecodeTime:d.baseMediaDecodeTime},codec:"adts",type:"audio"},y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new Br(v,u),y.audioSegmentStream.on("log",d.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",d.trigger.bind(d,"audioTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream),d.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f}))}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Bu(this,y)},this.setupTsPipeline=function(){var y={};this.transmuxPipeline_=y,y.type="ts",y.metadataStream=new Qi.MetadataStream,y.packetStream=new Qi.TransportPacketStream,y.parseStream=new Qi.TransportParseStream,y.elementaryStream=new Qi.ElementaryStream,y.timestampRolloverStream=new Qi.TimestampRolloverStream,y.adtsStream=new Nu,y.h264Stream=new $p,y.captionStream=new Qi.CaptionStream(u),y.coalesceStream=new Cn(u,y.metadataStream),y.headOfPipeline=y.packetStream,y.packetStream.pipe(y.parseStream).pipe(y.elementaryStream).pipe(y.timestampRolloverStream),y.timestampRolloverStream.pipe(y.h264Stream),y.timestampRolloverStream.pipe(y.adtsStream),y.timestampRolloverStream.pipe(y.metadataStream).pipe(y.coalesceStream),y.h264Stream.pipe(y.captionStream).pipe(y.coalesceStream),y.elementaryStream.on("data",function(B){var V;if(B.type==="metadata"){for(V=B.tracks.length;V--;)!f&&B.tracks[V].type==="video"?(f=B.tracks[V],f.timelineStartInfo.baseMediaDecodeTime=d.baseMediaDecodeTime):!v&&B.tracks[V].type==="audio"&&(v=B.tracks[V],v.timelineStartInfo.baseMediaDecodeTime=d.baseMediaDecodeTime);f&&!y.videoSegmentStream&&(y.coalesceStream.numberOfTracks++,y.videoSegmentStream=new As(f,u),y.videoSegmentStream.on("log",d.getLogTrigger_("videoSegmentStream")),y.videoSegmentStream.on("timelineStartInfo",function(j){v&&!u.keepOriginalTimestamps&&(v.timelineStartInfo=j,y.audioSegmentStream.setEarliestDts(j.dts-d.baseMediaDecodeTime))}),y.videoSegmentStream.on("processedGopsInfo",d.trigger.bind(d,"gopInfo")),y.videoSegmentStream.on("segmentTimingInfo",d.trigger.bind(d,"videoSegmentTimingInfo")),y.videoSegmentStream.on("baseMediaDecodeTime",function(j){v&&y.audioSegmentStream.setVideoBaseMediaDecodeTime(j)}),y.videoSegmentStream.on("timingInfo",d.trigger.bind(d,"videoTimingInfo")),y.h264Stream.pipe(y.videoSegmentStream).pipe(y.coalesceStream)),v&&!y.audioSegmentStream&&(y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new Br(v,u),y.audioSegmentStream.on("log",d.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",d.trigger.bind(d,"audioTimingInfo")),y.audioSegmentStream.on("segmentTimingInfo",d.trigger.bind(d,"audioSegmentTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream)),d.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f})}}),y.coalesceStream.on("data",this.trigger.bind(this,"data")),y.coalesceStream.on("id3Frame",function(B){B.dispatchType=y.metadataStream.dispatchType,d.trigger("id3Frame",B)}),y.coalesceStream.on("caption",this.trigger.bind(this,"caption")),y.coalesceStream.on("done",this.trigger.bind(this,"done")),Bu(this,y)},this.setBaseMediaDecodeTime=function(y){var B=this.transmuxPipeline_;u.keepOriginalTimestamps||(this.baseMediaDecodeTime=y),v&&(v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,Di.clearDtsInfo(v),B.audioTimestampRolloverStream&&B.audioTimestampRolloverStream.discontinuity()),f&&(B.videoSegmentStream&&(B.videoSegmentStream.gopCache_=[]),f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,Di.clearDtsInfo(f),B.captionStream.reset()),B.timestampRolloverStream&&B.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(y){v&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(y)},this.setRemux=function(y){var B=this.transmuxPipeline_;u.remux=y,B&&B.coalesceStream&&B.coalesceStream.setRemux(y)},this.alignGopsWith=function(y){f&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(y)},this.getLogTrigger_=function(y){var B=this;return function(V){V.stream=y,B.trigger("log",V)}},this.push=function(y){if(p){var B=qp(y);B&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!B&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),p=!1}this.transmuxPipeline_.headOfPipeline.push(y)},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()}},Ns.prototype=new ks;var zp={Transmuxer:Ns},Gp=function(u){return u>>>0},Wp=function(u){return("00"+u.toString(16)).slice(-2)},Is={toUnsigned:Gp,toHexString:Wp},Yp=function(u){var d="";return d+=String.fromCharCode(u[0]),d+=String.fromCharCode(u[1]),d+=String.fromCharCode(u[2]),d+=String.fromCharCode(u[3]),d},Pu=Yp,Xp=Is.toUnsigned,Kp=Pu,Ru=function(u,d){var p=[],f,v,y,B,V;if(!d.length)return null;for(f=0;f<u.byteLength;)v=Xp(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3]),y=Kp(u.subarray(f+4,f+8)),B=v>1?f+v:u.byteLength,y===d[0]&&(d.length===1?p.push(u.subarray(f+8,B)):(V=Ru(u.subarray(f+8,B),d.slice(1)),V.length&&(p=p.concat(V)))),f=B;return p},eo=Ru,Qp=Is.toUnsigned,Zp=a.getUint64,Jp=function(u){var d={version:u[0],flags:new Uint8Array(u.subarray(1,4))};return d.version===1?d.baseMediaDecodeTime=Zp(u.subarray(4)):d.baseMediaDecodeTime=Qp(u[4]<<24|u[5]<<16|u[6]<<8|u[7]),d},to=Jp,em=function(u){var d=new DataView(u.buffer,u.byteOffset,u.byteLength),p={version:u[0],flags:new Uint8Array(u.subarray(1,4)),trackId:d.getUint32(4)},f=p.flags[2]&1,v=p.flags[2]&2,y=p.flags[2]&8,B=p.flags[2]&16,V=p.flags[2]&32,j=p.flags[0]&65536,Y=p.flags[0]&131072,te;return te=8,f&&(te+=4,p.baseDataOffset=d.getUint32(12),te+=4),v&&(p.sampleDescriptionIndex=d.getUint32(te),te+=4),y&&(p.defaultSampleDuration=d.getUint32(te),te+=4),B&&(p.defaultSampleSize=d.getUint32(te),te+=4),V&&(p.defaultSampleFlags=d.getUint32(te)),j&&(p.durationIsEmpty=!0),!f&&Y&&(p.baseDataOffsetIsMoof=!0),p},Vu=em,tm=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]}},im=tm,Fu=im,nm=function(u){var d={version:u[0],flags:new Uint8Array(u.subarray(1,4)),samples:[]},p=new DataView(u.buffer,u.byteOffset,u.byteLength),f=d.flags[2]&1,v=d.flags[2]&4,y=d.flags[1]&1,B=d.flags[1]&2,V=d.flags[1]&4,j=d.flags[1]&8,Y=p.getUint32(4),te=8,se;for(f&&(d.dataOffset=p.getInt32(te),te+=4),v&&Y&&(se={flags:Fu(u.subarray(te,te+4))},te+=4,y&&(se.duration=p.getUint32(te),te+=4),B&&(se.size=p.getUint32(te),te+=4),j&&(d.version===1?se.compositionTimeOffset=p.getInt32(te):se.compositionTimeOffset=p.getUint32(te),te+=4),d.samples.push(se),Y--);Y--;)se={},y&&(se.duration=p.getUint32(te),te+=4),B&&(se.size=p.getUint32(te),te+=4),V&&(se.flags=Fu(u.subarray(te,te+4)),te+=4),j&&(d.version===1?se.compositionTimeOffset=p.getInt32(te):se.compositionTimeOffset=p.getUint32(te),te+=4),d.samples.push(se);return d},$u=nm,Uu={tfdt:to,trun:$u},qu={parseTfdt:Uu.tfdt,parseTrun:Uu.trun},rm=function(u){for(var d=0,p=String.fromCharCode(u[d]),f="";p!=="\0";)f+=p,d++,p=String.fromCharCode(u[d]);return f+=p,f},sm={uint8ToCString:rm},Os=sm.uint8ToCString,am=a.getUint64,om=function(u){var d=4,p=u[0],f,v,y,B,V,j,Y,te;if(p===0){f=Os(u.subarray(d)),d+=f.length,v=Os(u.subarray(d)),d+=v.length;var se=new DataView(u.buffer);y=se.getUint32(d),d+=4,V=se.getUint32(d),d+=4,j=se.getUint32(d),d+=4,Y=se.getUint32(d),d+=4}else if(p===1){var se=new DataView(u.buffer);y=se.getUint32(d),d+=4,B=am(u.subarray(d)),d+=8,j=se.getUint32(d),d+=4,Y=se.getUint32(d),d+=4,f=Os(u.subarray(d)),d+=f.length,v=Os(u.subarray(d)),d+=v.length}te=new Uint8Array(u.subarray(d,u.byteLength));var ke={scheme_id_uri:f,value:v,timescale:y||1,presentation_time:B,presentation_time_delta:V,event_duration:j,id:Y,message_data:te};return um(p,ke)?ke:void 0},lm=function(u,d,p,f){return u||u===0?u/d:f+p/d},um=function(u,d){var p=d.scheme_id_uri!=="\0",f=u===0&&Hu(d.presentation_time_delta)&&p,v=u===1&&Hu(d.presentation_time)&&p;return!(u>1)&&f||v},Hu=function(u){return u!==void 0||u!==null},cm={parseEmsgBox:om,scaleTime:lm},Lr;typeof window<"u"?Lr=window:typeof r<"u"?Lr=r:typeof self<"u"?Lr=self:Lr={};var ju=Lr,Bs=Is.toUnsigned,Mr=Is.toHexString,bt=eo,Un=Pu,io=cm,dm=Vu,hm=$u,fm=to,pm=a.getUint64,zu,Gu,Wu,Yu,Xu,no,Ku,ro=ju,mm=Tu.parseId3Frames;zu=function(u){var d={},p=bt(u,["moov","trak"]);return p.reduce(function(f,v){var y,B,V,j,Y;return y=bt(v,["tkhd"])[0],!y||(B=y[0],V=B===0?12:20,j=Bs(y[V]<<24|y[V+1]<<16|y[V+2]<<8|y[V+3]),Y=bt(v,["mdia","mdhd"])[0],!Y)?null:(B=Y[0],V=B===0?12:20,f[j]=Bs(Y[V]<<24|Y[V+1]<<16|Y[V+2]<<8|Y[V+3]),f)},d)},Gu=function(u,d){var p;p=bt(d,["moof","traf"]);var f=p.reduce(function(v,y){var B=bt(y,["tfhd"])[0],V=Bs(B[4]<<24|B[5]<<16|B[6]<<8|B[7]),j=u[V]||9e4,Y=bt(y,["tfdt"])[0],te=new DataView(Y.buffer,Y.byteOffset,Y.byteLength),se;Y[0]===1?se=pm(Y.subarray(4,12)):se=te.getUint32(4);let ke;return typeof se=="bigint"?ke=se/ro.BigInt(j):typeof se=="number"&&!isNaN(se)&&(ke=se/j),ke<Number.MAX_SAFE_INTEGER&&(ke=Number(ke)),ke<v&&(v=ke),v},1/0);return typeof f=="bigint"||isFinite(f)?f:0},Wu=function(u,d){var p=bt(d,["moof","traf"]),f=0,v=0,y;if(p&&p.length){var B=bt(p[0],["tfhd"])[0],V=bt(p[0],["trun"])[0],j=bt(p[0],["tfdt"])[0];if(B){var Y=dm(B);y=Y.trackId}if(j){var te=fm(j);f=te.baseMediaDecodeTime}if(V){var se=hm(V);se.samples&&se.samples.length&&(v=se.samples[0].compositionTimeOffset||0)}}var ke=u[y]||9e4;typeof f=="bigint"&&(v=ro.BigInt(v),ke=ro.BigInt(ke));var le=(f+v)/ke;return typeof le=="bigint"&&le<Number.MAX_SAFE_INTEGER&&(le=Number(le)),le},Yu=function(u){var d=bt(u,["moov","trak"]),p=[];return d.forEach(function(f){var v=bt(f,["mdia","hdlr"]),y=bt(f,["tkhd"]);v.forEach(function(B,V){var j=Un(B.subarray(8,12)),Y=y[V],te,se,ke;j==="vide"&&(te=new DataView(Y.buffer,Y.byteOffset,Y.byteLength),se=te.getUint8(0),ke=se===0?te.getUint32(12):te.getUint32(20),p.push(ke))})}),p},no=function(u){var d=u[0],p=d===0?12:20;return Bs(u[p]<<24|u[p+1]<<16|u[p+2]<<8|u[p+3])},Xu=function(u){var d=bt(u,["moov","trak"]),p=[];return d.forEach(function(f){var v={},y=bt(f,["tkhd"])[0],B,V;y&&(B=new DataView(y.buffer,y.byteOffset,y.byteLength),V=B.getUint8(0),v.id=V===0?B.getUint32(12):B.getUint32(20));var j=bt(f,["mdia","hdlr"])[0];if(j){var Y=Un(j.subarray(8,12));Y==="vide"?v.type="video":Y==="soun"?v.type="audio":v.type=Y}var te=bt(f,["mdia","minf","stbl","stsd"])[0];if(te){var se=te.subarray(8);v.codec=Un(se.subarray(4,8));var ke=bt(se,[v.codec])[0],le,Le;ke&&(/^[asm]vc[1-9]$/i.test(v.codec)?(le=ke.subarray(78),Le=Un(le.subarray(4,8)),Le==="avcC"&&le.length>11?(v.codec+=".",v.codec+=Mr(le[9]),v.codec+=Mr(le[10]),v.codec+=Mr(le[11])):v.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(v.codec)?(le=ke.subarray(28),Le=Un(le.subarray(4,8)),Le==="esds"&&le.length>20&&le[19]!==0?(v.codec+="."+Mr(le[19]),v.codec+="."+Mr(le[20]>>>2&63).replace(/^0/,"")):v.codec="mp4a.40.2"):v.codec=v.codec.toLowerCase())}var je=bt(f,["mdia","mdhd"])[0];je&&(v.timescale=no(je)),p.push(v)}),p},Ku=function(u,d=0){var p=bt(u,["emsg"]);return p.map(f=>{var v=io.parseEmsgBox(new Uint8Array(f)),y=mm(v.message_data);return{cueTime:io.scaleTime(v.presentation_time,v.timescale,v.presentation_time_delta,d),duration:io.scaleTime(v.event_duration,v.timescale),frames:y}})};var Pr={findBox:bt,parseType:Un,timescale:zu,startTime:Gu,compositionStartTime:Wu,videoTrackIds:Yu,tracks:Xu,getTimescaleFromMediaHeader:no,getEmsgID3:Ku};const{parseTrun:gm}=qu,{findBox:Qu}=Pr;var Zu=ju,vm=function(u){var d=Qu(u,["moof","traf"]),p=Qu(u,["mdat"]),f=[];return p.forEach(function(v,y){var B=d[y];f.push({mdat:v,traf:B})}),f},_m=function(u,d,p){var f=d,v=p.defaultSampleDuration||0,y=p.defaultSampleSize||0,B=p.trackId,V=[];return u.forEach(function(j){var Y=gm(j),te=Y.samples;te.forEach(function(se){se.duration===void 0&&(se.duration=v),se.size===void 0&&(se.size=y),se.trackId=B,se.dts=f,se.compositionTimeOffset===void 0&&(se.compositionTimeOffset=0),typeof f=="bigint"?(se.pts=f+Zu.BigInt(se.compositionTimeOffset),f+=Zu.BigInt(se.duration)):(se.pts=f+se.compositionTimeOffset,f+=se.duration)}),V=V.concat(te)}),V},Ju={getMdatTrafPairs:vm,parseSamples:_m},ym=Vt.discardEmulationPreventionBytes,Tm=ee.CaptionStream,so=eo,bm=to,xm=Vu,{getMdatTrafPairs:Cm,parseSamples:Em}=Ju,Sm=function(u,d){for(var p=u,f=0;f<d.length;f++){var v=d[f];if(p<v.size)return v;p-=v.size}return null},km=function(u,d,p){var f=new DataView(u.buffer,u.byteOffset,u.byteLength),v={logs:[],seiNals:[]},y,B,V,j;for(B=0;B+4<u.length;B+=V)if(V=f.getUint32(B),B+=4,!(V<=0))switch(u[B]&31){case 6:var Y=u.subarray(B+1,B+1+V),te=Sm(B,d);if(y={nalUnitType:"sei_rbsp",size:V,data:Y,escapedRBSP:ym(Y),trackId:p},te)y.pts=te.pts,y.dts=te.dts,j=te;else if(j)y.pts=j.pts,y.dts=j.dts;else{v.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+B+" for trackId "+p+". See mux.js#223."});break}v.seiNals.push(y);break}return v},wm=function(u,d){var p={},f=Cm(u);return f.forEach(function(v){var y=v.mdat,B=v.traf,V=so(B,["tfhd"]),j=xm(V[0]),Y=j.trackId,te=so(B,["tfdt"]),se=te.length>0?bm(te[0]).baseMediaDecodeTime:0,ke=so(B,["trun"]),le,Le;d===Y&&ke.length>0&&(le=Em(ke,se,j),Le=km(y,le,Y),p[Y]||(p[Y]={seiNals:[],logs:[]}),p[Y].seiNals=p[Y].seiNals.concat(Le.seiNals),p[Y].logs=p[Y].logs.concat(Le.logs))}),p},Dm=function(u,d,p){var f;if(d===null)return null;f=wm(u,d);var v=f[d]||{};return{seiNals:v.seiNals,logs:v.logs,timescale:p}},Am=function(){var u=!1,d,p,f,v,y,B;this.isInitialized=function(){return u},this.init=function(V){d=new Tm,u=!0,B=V?V.isPartial:!1,d.on("data",function(j){j.startTime=j.startPts/v,j.endTime=j.endPts/v,y.captions.push(j),y.captionStreams[j.stream]=!0}),d.on("log",function(j){y.logs.push(j)})},this.isNewInit=function(V,j){return V&&V.length===0||j&&typeof j=="object"&&Object.keys(j).length===0?!1:f!==V[0]||v!==j[f]},this.parse=function(V,j,Y){var te;if(this.isInitialized()){if(!j||!Y)return null;if(this.isNewInit(j,Y))f=j[0],v=Y[f];else if(f===null||!v)return p.push(V),null}else return null;for(;p.length>0;){var se=p.shift();this.parse(se,j,Y)}return te=Dm(V,f,v),te&&te.logs&&(y.logs=y.logs.concat(te.logs)),te===null||!te.seiNals?y.logs.length?{logs:y.logs,captions:[],captionStreams:[]}:null:(this.pushNals(te.seiNals),this.flushStream(),y)},this.pushNals=function(V){if(!this.isInitialized()||!V||V.length===0)return null;V.forEach(function(j){d.push(j)})},this.flushStream=function(){if(!this.isInitialized())return null;B?d.partialFlush():d.flush()},this.clearParsedCaptions=function(){y.captions=[],y.captionStreams={},y.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;d.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){p=[],f=null,v=null,y?this.clearParsedCaptions():y={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Nm=Am;const{parseTfdt:Im}=qu,ln=eo,{getTimescaleFromMediaHeader:Om}=Pr,{parseSamples:Bm,getMdatTrafPairs:Lm}=Ju;var ec=function(){let u=9e4;this.init=function(d){const p=ln(d,["moov","trak","mdia","mdhd"])[0];p&&(u=Om(p))},this.parseSegment=function(d){const p=[],f=Lm(d);let v=0;return f.forEach(function(y){const B=y.mdat,V=y.traf,j=ln(V,["tfdt"])[0],Y=ln(V,["tfhd"])[0],te=ln(V,["trun"]);if(j&&(v=Im(j).baseMediaDecodeTime),te.length&&Y){const se=Bm(te,v,Y);let ke=0;se.forEach(function(le){const Le="utf-8",je=new TextDecoder(Le),At=B.slice(ke,ke+le.size);if(ln(At,["vtte"])[0]){ke+=le.size;return}ln(At,["vttc"]).forEach(function(Rr){const Vr=ln(Rr,["payl"])[0],Fr=ln(Rr,["sttg"])[0],$r=le.pts/u,Ps=(le.pts+le.duration)/u;let ct,Ur;if(Vr)try{ct=je.decode(Vr)}catch(Ai){console.error(Ai)}if(Fr)try{Ur=je.decode(Fr)}catch(Ai){console.error(Ai)}le.duration&&ct&&p.push({cueText:ct,start:$r,end:Ps,settings:Ur})}),ke+=le.size})}}),p}},ao=pe,tc=function(u){var d=u[1]&31;return d<<=8,d|=u[2],d},Ls=function(u){return!!(u[1]&64)},Ms=function(u){var d=0;return(u[3]&48)>>>4>1&&(d+=u[4]+1),d},Mm=function(u,d){var p=tc(u);return p===0?"pat":p===d?"pmt":d?"pes":null},Pm=function(u){var d=Ls(u),p=4+Ms(u);return d&&(p+=u[p]+1),(u[p+10]&31)<<8|u[p+11]},Rm=function(u){var d={},p=Ls(u),f=4+Ms(u);if(p&&(f+=u[f]+1),!!(u[f+5]&1)){var v,y,B;v=(u[f+1]&15)<<8|u[f+2],y=3+v-4,B=(u[f+10]&15)<<8|u[f+11];for(var V=12+B;V<y;){var j=f+V;d[(u[j+1]&31)<<8|u[j+2]]=u[j],V+=((u[j+3]&15)<<8|u[j+4])+5}return d}},Vm=function(u,d){var p=tc(u),f=d[p];switch(f){case ao.H264_STREAM_TYPE:return"video";case ao.ADTS_STREAM_TYPE:return"audio";case ao.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Fm=function(u){var d=Ls(u);if(!d)return null;var p=4+Ms(u);if(p>=u.byteLength)return null;var f=null,v;return v=u[p+7],v&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,v&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},oo=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}},$m=function(u){for(var d=4+Ms(u),p=u.subarray(d),f=0,v=0,y=!1,B;v<p.byteLength-3;v++)if(p[v+2]===1){f=v+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}v+3!==f-2&&(B=oo(p[v+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0));do f++;while(p[f]!==1&&f<p.length);v=f-2,f+=3;break;case 1:if(p[f-1]!==0||p[f-2]!==0){f+=3;break}B=oo(p[v+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0),v=f-2,f+=3;break;default:f+=3;break}return p=p.subarray(v),f-=v,v=0,p&&p.byteLength>3&&(B=oo(p[v+3]&31),B==="slice_layer_without_partitioning_rbsp_idr"&&(y=!0)),y},Um={parseType:Mm,parsePat:Pm,parsePmt:Rm,parsePayloadUnitStartIndicator:Ls,parsePesType:Vm,parsePesTime:Fm,videoPacketContainsKeyFrame:$m},ic=pe,qn=vt.handleRollover,at={};at.ts=Um,at.aac=Ja;var En=Xe.ONE_SECOND_IN_TS,Yt=188,Ri=71,qm=function(u,d){for(var p=0,f=Yt,v,y;f<u.byteLength;){if(u[p]===Ri&&u[f]===Ri){switch(v=u.subarray(p,f),y=at.ts.parseType(v,d.pid),y){case"pat":d.pid=at.ts.parsePat(v);break;case"pmt":var B=at.ts.parsePmt(v);d.table=d.table||{},Object.keys(B).forEach(function(V){d.table[V]=B[V]});break}p+=Yt,f+=Yt;continue}p++,f++}},nc=function(u,d,p){for(var f=0,v=Yt,y,B,V,j,Y,te=!1;v<=u.byteLength;){if(u[f]===Ri&&(u[v]===Ri||v===u.byteLength)){switch(y=u.subarray(f,v),B=at.ts.parseType(y,d.pid),B){case"pes":V=at.ts.parsePesType(y,d.table),j=at.ts.parsePayloadUnitStartIndicator(y),V==="audio"&&j&&(Y=at.ts.parsePesTime(y),Y&&(Y.type="audio",p.audio.push(Y),te=!0));break}if(te)break;f+=Yt,v+=Yt;continue}f++,v++}for(v=u.byteLength,f=v-Yt,te=!1;f>=0;){if(u[f]===Ri&&(u[v]===Ri||v===u.byteLength)){switch(y=u.subarray(f,v),B=at.ts.parseType(y,d.pid),B){case"pes":V=at.ts.parsePesType(y,d.table),j=at.ts.parsePayloadUnitStartIndicator(y),V==="audio"&&j&&(Y=at.ts.parsePesTime(y),Y&&(Y.type="audio",p.audio.push(Y),te=!0));break}if(te)break;f-=Yt,v-=Yt;continue}f--,v--}},Hm=function(u,d,p){for(var f=0,v=Yt,y,B,V,j,Y,te,se,ke,le=!1,Le={data:[],size:0};v<u.byteLength;){if(u[f]===Ri&&u[v]===Ri){switch(y=u.subarray(f,v),B=at.ts.parseType(y,d.pid),B){case"pes":if(V=at.ts.parsePesType(y,d.table),j=at.ts.parsePayloadUnitStartIndicator(y),V==="video"&&(j&&!le&&(Y=at.ts.parsePesTime(y),Y&&(Y.type="video",p.video.push(Y),le=!0)),!p.firstKeyFrame)){if(j&&Le.size!==0){for(te=new Uint8Array(Le.size),se=0;Le.data.length;)ke=Le.data.shift(),te.set(ke,se),se+=ke.byteLength;if(at.ts.videoPacketContainsKeyFrame(te)){var je=at.ts.parsePesTime(te);je?(p.firstKeyFrame=je,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.")}Le.size=0}Le.data.push(y),Le.size+=y.byteLength}break}if(le&&p.firstKeyFrame)break;f+=Yt,v+=Yt;continue}f++,v++}for(v=u.byteLength,f=v-Yt,le=!1;f>=0;){if(u[f]===Ri&&u[v]===Ri){switch(y=u.subarray(f,v),B=at.ts.parseType(y,d.pid),B){case"pes":V=at.ts.parsePesType(y,d.table),j=at.ts.parsePayloadUnitStartIndicator(y),V==="video"&&j&&(Y=at.ts.parsePesTime(y),Y&&(Y.type="video",p.video.push(Y),le=!0));break}if(le)break;f-=Yt,v-=Yt;continue}f--,v--}},jm=function(u,d){if(u.audio&&u.audio.length){var p=d;(typeof p>"u"||isNaN(p))&&(p=u.audio[0].dts),u.audio.forEach(function(y){y.dts=qn(y.dts,p),y.pts=qn(y.pts,p),y.dtsTime=y.dts/En,y.ptsTime=y.pts/En})}if(u.video&&u.video.length){var f=d;if((typeof f>"u"||isNaN(f))&&(f=u.video[0].dts),u.video.forEach(function(y){y.dts=qn(y.dts,f),y.pts=qn(y.pts,f),y.dtsTime=y.dts/En,y.ptsTime=y.pts/En}),u.firstKeyFrame){var v=u.firstKeyFrame;v.dts=qn(v.dts,f),v.pts=qn(v.pts,f),v.dtsTime=v.dts/En,v.ptsTime=v.pts/En}}},zm=function(u){for(var d=!1,p=0,f=null,v=null,y=0,B=0,V;u.length-B>=3;){var j=at.aac.parseType(u,B);switch(j){case"timed-metadata":if(u.length-B<10){d=!0;break}if(y=at.aac.parseId3TagSize(u,B),y>u.length){d=!0;break}v===null&&(V=u.subarray(B,B+y),v=at.aac.parseAacTimestamp(V)),B+=y;break;case"audio":if(u.length-B<7){d=!0;break}if(y=at.aac.parseAdtsSize(u,B),y>u.length){d=!0;break}f===null&&(V=u.subarray(B,B+y),f=at.aac.parseSampleRate(V)),p++,B+=y;break;default:B++;break}if(d)return null}if(f===null||v===null)return null;var Y=En/f,te={audio:[{type:"audio",dts:v,pts:v},{type:"audio",dts:v+p*1024*Y,pts:v+p*1024*Y}]};return te},Gm=function(u){var d={pid:null,table:null},p={};qm(u,d);for(var f in d.table)if(d.table.hasOwnProperty(f)){var v=d.table[f];switch(v){case ic.H264_STREAM_TYPE:p.video=[],Hm(u,d,p),p.video.length===0&&delete p.video;break;case ic.ADTS_STREAM_TYPE:p.audio=[],nc(u,d,p),p.audio.length===0&&delete p.audio;break}}return p},Wm=function(u,d){var p=at.aac.isLikelyAacData(u),f;return p?f=zm(u):f=Gm(u),!f||!f.audio&&!f.video?null:(jm(f,d),f)},Ym={inspect:Wm,parseAudioPes_:nc};const Xm=function(u,d){d.on("data",function(p){const f=p.initSegment;p.initSegment={data:f.buffer,byteOffset:f.byteOffset,byteLength:f.byteLength};const v=p.data;p.data=v.buffer,u.postMessage({action:"data",segment:p,byteOffset:v.byteOffset,byteLength:v.byteLength},[p.data])}),d.on("done",function(p){u.postMessage({action:"done"})}),d.on("gopInfo",function(p){u.postMessage({action:"gopInfo",gopInfo:p})}),d.on("videoSegmentTimingInfo",function(p){const f={start:{decode:Xe.videoTsToSeconds(p.start.dts),presentation:Xe.videoTsToSeconds(p.start.pts)},end:{decode:Xe.videoTsToSeconds(p.end.dts),presentation:Xe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Xe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Xe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:f})}),d.on("audioSegmentTimingInfo",function(p){const f={start:{decode:Xe.videoTsToSeconds(p.start.dts),presentation:Xe.videoTsToSeconds(p.start.pts)},end:{decode:Xe.videoTsToSeconds(p.end.dts),presentation:Xe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Xe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Xe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:f})}),d.on("id3Frame",function(p){u.postMessage({action:"id3Frame",id3Frame:p})}),d.on("caption",function(p){u.postMessage({action:"caption",caption:p})}),d.on("trackinfo",function(p){u.postMessage({action:"trackinfo",trackInfo:p})}),d.on("audioTimingInfo",function(p){u.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Xe.videoTsToSeconds(p.start),end:Xe.videoTsToSeconds(p.end)}})}),d.on("videoTimingInfo",function(p){u.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Xe.videoTsToSeconds(p.start),end:Xe.videoTsToSeconds(p.end)}})}),d.on("log",function(p){u.postMessage({action:"log",log:p})})};class rc{constructor(d,p){this.options=p||{},this.self=d,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new zp.Transmuxer(this.options),Xm(this.self,this.transmuxer)}pushMp4Captions(d){this.captionParser||(this.captionParser=new Nm,this.captionParser.init());const p=new Uint8Array(d.data,d.byteOffset,d.byteLength),f=this.captionParser.parse(p,d.trackIds,d.timescales);this.self.postMessage({action:"mp4Captions",captions:f&&f.captions||[],logs:f&&f.logs||[],data:p.buffer},[p.buffer])}initMp4WebVttParser(d){this.webVttParser||(this.webVttParser=new ec);const p=new Uint8Array(d.data,d.byteOffset,d.byteLength);this.webVttParser.init(p)}getMp4WebVttText(d){this.webVttParser||(this.webVttParser=new ec);const p=new Uint8Array(d.data,d.byteOffset,d.byteLength),f=this.webVttParser.parseSegment(p);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:f||[],data:p.buffer},[p.buffer])}probeMp4StartTime({timescales:d,data:p}){const f=Pr.startTime(d,p);this.self.postMessage({action:"probeMp4StartTime",startTime:f,data:p},[p.buffer])}probeMp4Tracks({data:d}){const p=Pr.tracks(d);this.self.postMessage({action:"probeMp4Tracks",tracks:p,data:d},[d.buffer])}probeEmsgID3({data:d,offset:p}){const f=Pr.getEmsgID3(d,p);this.self.postMessage({action:"probeEmsgID3",id3Frames:f,emsgData:d},[d.buffer])}probeTs({data:d,baseStartTime:p}){const f=typeof p=="number"&&!isNaN(p)?p*Xe.ONE_SECOND_IN_TS:void 0,v=Ym.inspect(d,f);let y=null;v&&(y={hasVideo:v.video&&v.video.length===2||!1,hasAudio:v.audio&&v.audio.length===2||!1},y.hasVideo&&(y.videoStart=v.video[0].ptsTime),y.hasAudio&&(y.audioStart=v.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:y,data:d},[d.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(d){const p=new Uint8Array(d.data,d.byteOffset,d.byteLength);this.transmuxer.push(p)}reset(){this.transmuxer.reset()}setTimestampOffset(d){const p=d.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Xe.secondsToVideoTs(p)))}setAudioAppendStart(d){this.transmuxer.setAudioAppendStart(Math.ceil(Xe.secondsToVideoTs(d.appendStart)))}setRemux(d){this.transmuxer.setRemux(d.remux)}flush(d){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(d){this.transmuxer.alignGopsWith(d.gopsToAlignWith.slice())}}self.onmessage=function(u){if(u.data.action==="init"&&u.data.options){this.messageHandlers=new rc(self,u.data.options);return}this.messageHandlers||(this.messageHandlers=new rc(self)),u.data&&u.data.action&&u.data.action!=="init"&&this.messageHandlers[u.data.action]&&this.messageHandlers[u.data.action](u.data)}}));var t5=Ff(e5);const i5=(r,e,t)=>{const{type:n,initSegment:s,captions:a,captionStreams:o,metadata:l,videoFrameDtsTime:c,videoFramePtsTime:h}=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 h<"u"&&(g.videoFramePtsTime=h),t(g)},n5=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},r5=(r,e)=>{e.gopInfo=r.data.gopInfo},qf=r=>{const{transmuxer:e,bytes:t,audioAppendStart:n,gopsToAlignWith:s,remux:a,onData:o,onTrackInfo:l,onAudioTimingInfo:c,onVideoTimingInfo:h,onVideoSegmentTimingInfo:m,onAudioSegmentTimingInfo:g,onId3:k,onCaptions:T,onDone:I,onEndedTimeline:_,onTransmuxerLog:S,isEndOfTimeline:R,segment:L,triggerSegmentEventFn:O}=r,H={buffer:[]};let M=R;const P=X=>{e.currentTransmux===r&&(X.data.action==="data"&&i5(X,H,o),X.data.action==="trackinfo"&&l(X.data.trackInfo),X.data.action==="gopInfo"&&r5(X,H),X.data.action==="audioTimingInfo"&&c(X.data.audioTimingInfo),X.data.action==="videoTimingInfo"&&h(X.data.videoTimingInfo),X.data.action==="videoSegmentTimingInfo"&&m(X.data.videoSegmentTimingInfo),X.data.action==="audioSegmentTimingInfo"&&g(X.data.audioSegmentTimingInfo),X.data.action==="id3Frame"&&k([X.data.id3Frame],X.data.id3Frame.dispatchType),X.data.action==="caption"&&T(X.data.caption),X.data.action==="endedtimeline"&&(M=!1,_()),X.data.action==="log"&&S(X.data.log),X.data.type==="transmuxed"&&(M||(e.onmessage=null,n5({transmuxedData:H,callback:I}),Hf(e))))},N=()=>{const X={message:"Received an error message from the transmuxer worker",metadata:{errorType:ne.Error.StreamingFailedToTransmuxSegment,segmentInfo:An({segment:L})}};I(null,X)};if(e.onmessage=P,e.onerror=N,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}),t.byteLength){const X=t instanceof ArrayBuffer?t:t.buffer,b=t instanceof ArrayBuffer?0:t.byteOffset;O({type:"segmenttransmuxingstart",segment:L}),e.postMessage({action:"push",data:X,byteOffset:b,byteLength:t.byteLength},[X])}R&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},Hf=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():qf(r.currentTransmux))},Gd=(r,e)=>{r.postMessage({action:e}),Hf(r)},jf=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,Gd(e,r);return}e.transmuxQueue.push(Gd.bind(null,e,r))},s5=r=>{jf("reset",r)},a5=r=>{jf("endTimeline",r)},zf=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,qf(r);return}r.transmuxer.transmuxQueue.push(r)},o5=r=>{const e=new t5;e.currentTransmux=null,e.transmuxQueue=[];const t=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,t.call(e)),e.postMessage({action:"init",options:r}),e};var Qo={reset:s5,endTimeline:a5,transmux:zf,createTransmuxer:o5};const nr=function(r){const e=r.transmuxer,t=r.endAction||r.action,n=r.callback,s=xt({},r,{endAction:null,transmuxer:null,callback:null}),a=o=>{o.data.action===t&&(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)},ji={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Gf="wvtt",Sl=r=>{r.forEach(e=>{e.abort()})},l5=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),u5=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},vu=(r,e)=>{const{requestType:t}=e,n=Rn({requestType:t,request:e,error:r});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:ji.TIMEOUT,xhr:e,metadata:n}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:ji.ABORTED,xhr:e,metadata:n}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:ji.FAILURE,xhr:e,metadata:n}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:ji.FAILURE,xhr:e,metadata:n}:null},Wd=(r,e,t,n)=>(s,a)=>{const o=a.response,l=vu(s,a);if(l)return t(l,r);if(o.byteLength!==16)return t({status:a.status,message:"Invalid HLS key at URL: "+a.uri,code:ji.FAILURE,xhr:a},r);const c=new DataView(o),h=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=h;const m={uri:a.uri};return n({type:"segmentkeyloadcomplete",segment:r,keyInfo:m}),t(null,r)},c5=(r,e)=>{e===Gf&&r.transmuxer.postMessage({action:"initMp4WebVttParser",data:r.map.bytes})},d5=(r,e,t)=>{e===Gf&&nr({action:"getMp4WebVttText",data:r.bytes,transmuxer:r.transmuxer,callback:({data:n,mp4VttCues:s})=>{r.bytes=n,t(null,r,{mp4VttCues:s})}})},Wf=(r,e)=>{const t=$l(r.map.bytes);if(t!=="mp4"){const n=r.map.resolvedUri||r.map.uri,s=t||"unknown";return e({internal:!0,message:`Found unsupported ${s} container for initialization segment at URL: ${n}`,code:ji.FAILURE,metadata:{mediaType:s}})}nr({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"&&c5(r,a.codec))}),e(null))})},h5=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:t})=>(n,s)=>{const a=vu(n,s);if(a)return e(a,r);const o=new Uint8Array(s.response);if(t({type:"segmentloaded",segment:r}),r.map.key)return r.map.encryptedBytes=o,e(null,r);r.map.bytes=o,Wf(r,function(l){if(l)return l.xhr=s,l.status=s.status,e(l,r);e(null,r)})},f5=({segment:r,finishProcessingFn:e,responseType:t,triggerSegmentEventFn:n})=>(s,a)=>{const o=vu(s,a);if(o)return e(o,r);n({type:"segmentloaded",segment:r});const l=t==="arraybuffer"||!a.responseText?a.response:ZC(a.responseText.substring(r.lastReachedChar||0));return r.stats=l5(a),r.key?r.encryptedBytes=new Uint8Array(l):r.bytes=new Uint8Array(l),e(null,r)},p5=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})=>{const I=r.map&&r.map.tracks||{},_=!!(I.audio&&I.video);let S=n.bind(null,r,"audio","start");const R=n.bind(null,r,"audio","end");let L=n.bind(null,r,"video","start");const O=n.bind(null,r,"video","end"),H=()=>zf({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:_,onData:M=>{M.type=M.type==="combined"?"video":M.type,m(r,M)},onTrackInfo:M=>{t&&(_&&(M.isMuxed=!0),t(r,M))},onAudioTimingInfo:M=>{S&&typeof M.start<"u"&&(S(M.start),S=null),R&&typeof M.end<"u"&&R(M.end)},onVideoTimingInfo:M=>{L&&typeof M.start<"u"&&(L(M.start),L=null),O&&typeof M.end<"u"&&O(M.end)},onVideoSegmentTimingInfo:M=>{const P={pts:{start:M.start.presentation,end:M.end.presentation},dts:{start:M.start.decode,end:M.end.decode}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:P}),s(M)},onAudioSegmentTimingInfo:M=>{const P={pts:{start:M.start.pts,end:M.end.pts},dts:{start:M.start.dts,end:M.end.dts}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:P}),a(M)},onId3:(M,P)=>{o(r,M,P)},onCaptions:M=>{l(r,[M])},isEndOfTimeline:c,onEndedTimeline:()=>{h()},onTransmuxerLog:k,onDone:(M,P)=>{g&&(M.type=M.type==="combined"?"video":M.type,T({type:"segmenttransmuxingcomplete",segment:r}),g(P,r,M))},segment:r,triggerSegmentEventFn:T});nr({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:M=>{r.bytes=e=M.data;const P=M.result;P&&(t(r,{hasAudio:P.hasAudio,hasVideo:P.hasVideo,isMuxed:_}),t=null),H()}})},Yf=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})=>{let I=new Uint8Array(e);if(M8(I)){r.isFmp4=!0;const{tracks:_}=r.map;if(_.text&&(!_.audio||!_.video)){m(r,{data:I,type:"text"}),d5(r,_.text.codec,g);return}const R={isFmp4:!0,hasVideo:!!_.video,hasAudio:!!_.audio};_.audio&&_.audio.codec&&_.audio.codec!=="enca"&&(R.audioCodec=_.audio.codec),_.video&&_.video.codec&&_.video.codec!=="encv"&&(R.videoCodec=_.video.codec),_.video&&_.audio&&(R.isMuxed=!0),t(r,R);const L=(O,H)=>{m(r,{data:I,type:R.hasAudio&&!R.isMuxed?"audio":"video"}),H&&H.length&&o(r,H),O&&O.length&&l(r,O),g(null,r,{})};nr({action:"probeMp4StartTime",timescales:r.map.timescales,data:I,transmuxer:r.transmuxer,callback:({data:O,startTime:H})=>{e=O.buffer,r.bytes=I=O,R.hasAudio&&!R.isMuxed&&n(r,"audio","start",H),R.hasVideo&&n(r,"video","start",H),nr({action:"probeEmsgID3",data:I,transmuxer:r.transmuxer,offset:H,callback:({emsgData:M,id3Frames:P})=>{if(e=M.buffer,r.bytes=I=M,!_.video||!M.byteLength||!r.transmuxer){L(void 0,P);return}nr({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:I,timescales:r.map.timescales,trackIds:[_.video.id],callback:N=>{e=N.data.buffer,r.bytes=I=N.data,N.logs.forEach(function(X){k(st(X,{stream:"mp4CaptionParser"}))}),L(N.captions,P)}})}})}});return}if(!r.transmuxer){g(null,r,{});return}if(typeof r.container>"u"&&(r.container=$l(I)),r.container!=="ts"&&r.container!=="aac"){t(r,{hasAudio:!1,hasVideo:!1}),g(null,r,{});return}p5({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})},Xf=function({id:r,key:e,encryptedBytes:t,decryptionWorker:n,segment:s,doneFn:a},o){const l=h=>{if(h.data.source===r){n.removeEventListener("message",l);const m=h.data.decrypted;o(new Uint8Array(m.bytes,m.byteOffset,m.byteLength))}};n.onerror=()=>{const h="An error occurred in the decryption worker",m=An({segment:s}),g={message:h,metadata:{error:new Error(h),errorType:ne.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(Bf({source:r,encrypted:t,key:c,iv:e.iv}),[t.buffer,c.buffer])},m5=({decryptionWorker:r,segment:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})=>{T({type:"segmentdecryptionstart"}),Xf({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:g},I=>{e.bytes=I,T({type:"segmentdecryptioncomplete",segment:e}),Yf({segment:e,bytes:e.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})})},g5=({activeXhrs:r,decryptionWorker:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})=>{let I=0,_=!1;return(S,R)=>{if(!_){if(S)return _=!0,Sl(r),g(S,R);if(I+=1,I===r.length){const L=function(){if(R.encryptedBytes)return m5({decryptionWorker:e,segment:R,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T});Yf({segment:R,bytes:R.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m,doneFn:g,onTransmuxerLog:k,triggerSegmentEventFn:T})};if(R.endOfAllRequests=Date.now(),R.map&&R.map.encryptedBytes&&!R.map.bytes)return T({type:"segmentdecryptionstart",segment:R}),Xf({decryptionWorker:e,id:R.requestId+"-init",encryptedBytes:R.map.encryptedBytes,key:R.map.key,segment:R,doneFn:g},O=>{R.map.bytes=O,T({type:"segmentdecryptioncomplete",segment:R}),Wf(R,H=>{if(H)return Sl(r),g(H,R);L()})});L()}}}},v5=({loadendState:r,abortFn:e})=>t=>{t.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},_5=({segment:r,progressFn:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:h,dataFn:m})=>g=>{if(!g.target.aborted)return r.stats=st(r.stats,u5(g)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(g,r)},y5=({xhr:r,xhrOptions:e,decryptionWorker:t,segment:n,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:h,id3Fn:m,captionsFn:g,isEndOfTimeline:k,endedTimelineFn:T,dataFn:I,doneFn:_,onTransmuxerLog:S,triggerSegmentEventFn:R})=>{const L=[],O=g5({activeXhrs:L,decryptionWorker:t,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:h,id3Fn:m,captionsFn:g,isEndOfTimeline:k,endedTimelineFn:T,dataFn:I,doneFn:_,onTransmuxerLog:S,triggerSegmentEventFn:R});if(n.key&&!n.key.bytes){const X=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&X.push(n.map.key);const b=st(e,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),C=Wd(n,X,O,R),$={uri:n.key.resolvedUri};R({type:"segmentkeyloadstart",segment:n,keyInfo:$});const U=r(b,C);L.push(U)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const U=st(e,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),E=Wd(n,[n.map.key],O,R),w={uri:n.map.key.resolvedUri};R({type:"segmentkeyloadstart",segment:n,keyInfo:w});const F=r(U,E);L.push(F)}const b=st(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Cl(n.map),requestType:"segment-media-initialization"}),C=h5({segment:n,finishProcessingFn:O,triggerSegmentEventFn:R});R({type:"segmentloadstart",segment:n});const $=r(b,C);L.push($)}const H=st(e,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:Cl(n),requestType:"segment"}),M=f5({segment:n,finishProcessingFn:O,responseType:H.responseType,triggerSegmentEventFn:R});R({type:"segmentloadstart",segment:n});const P=r(H,M);P.addEventListener("progress",_5({segment:n,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:h,id3Fn:m,captionsFn:g,isEndOfTimeline:k,endedTimelineFn:T,dataFn:I})),L.push(P);const N={};return L.forEach(X=>{X.addEventListener("loadend",v5({loadendState:N,abortFn:s}))}),()=>Sl(L)},Gs=bi("PlaylistSelector"),Yd=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||""})},rr=function(r,e){if(!r)return"";const t=W.getComputedStyle(r);return t?t[e]:""},sr=function(r,e){const t=r.slice();r.sort(function(n,s){const a=e(n,s);return a===0?t.indexOf(n)-t.indexOf(s):a})},_u=function(r,e){let t,n;return r.attributes.BANDWIDTH&&(t=r.attributes.BANDWIDTH),t=t||W.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||W.Number.MAX_VALUE,t-n},T5=function(r,e){let t,n;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(t=r.attributes.RESOLUTION.width),t=t||W.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||W.Number.MAX_VALUE,t===n&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:t-n};let Kf=function(r){const{main:e,bandwidth:t,playerWidth:n,playerHeight:s,playerObjectFit:a,limitRenditionByPlayerDimensions:o,playlistController:l}=r;if(!e)return;const c={bandwidth:t,width:n,height:s,limitRenditionByPlayerDimensions:o};let h=e.playlists;ai.isAudioOnly(e)&&(h=l.getAudioTrackPlaylists_(),c.audioOnly=!0);let m=h.map(N=>{let X;const b=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.width,C=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.height;return X=N.attributes&&N.attributes.BANDWIDTH,X=X||W.Number.MAX_VALUE,{bandwidth:X,width:b,height:C,playlist:N}});sr(m,(N,X)=>N.bandwidth-X.bandwidth),m=m.filter(N=>!ai.isIncompatible(N.playlist));let g=m.filter(N=>ai.isEnabled(N.playlist));g.length||(g=m.filter(N=>!ai.isDisabled(N.playlist)));const k=g.filter(N=>N.bandwidth*Nt.BANDWIDTH_VARIANCE<t);let T=k[k.length-1];const I=k.filter(N=>N.bandwidth===T.bandwidth)[0];if(o===!1){const N=I||g[0]||m[0];if(N&&N.playlist){let X="sortedPlaylistReps";return I&&(X="bandwidthBestRep"),g[0]&&(X="enabledPlaylistReps"),Gs(`choosing ${Yd(N)} using ${X} with options`,c),N.playlist}return Gs("could not choose a playlist with options",c),null}const _=k.filter(N=>N.width&&N.height);sr(_,(N,X)=>N.width-X.width);const S=_.filter(N=>N.width===n&&N.height===s);T=S[S.length-1];const R=S.filter(N=>N.bandwidth===T.bandwidth)[0];let L,O,H;R||(L=_.filter(N=>a==="cover"?N.width>n&&N.height>s:N.width>n||N.height>s),O=L.filter(N=>N.width===L[0].width&&N.height===L[0].height),T=O[O.length-1],H=O.filter(N=>N.bandwidth===T.bandwidth)[0]);let M;if(l.leastPixelDiffSelector){const N=_.map(X=>(X.pixelDiff=Math.abs(X.width-n)+Math.abs(X.height-s),X));sr(N,(X,b)=>X.pixelDiff===b.pixelDiff?b.bandwidth-X.bandwidth:X.pixelDiff-b.pixelDiff),M=N[0]}const P=M||H||R||I||g[0]||m[0];if(P&&P.playlist){let N="sortedPlaylistReps";return M?N="leastPixelDiffRep":H?N="resolutionPlusOneRep":R?N="resolutionBestRep":I?N="bandwidthBestRep":g[0]&&(N="enabledPlaylistReps"),Gs(`choosing ${Yd(P)} using ${N} with options`,c),P.playlist}return Gs("could not choose a playlist with options",c),null};const Xd=function(){let r=this.useDevicePixelRatio&&W.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),Kf({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(rr(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(rr(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?rr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},b5=function(r){let e=-1,t=-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,t=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==t&&(e=r*this.systemBandwidth+(1-r)*e,t=this.systemBandwidth),Kf({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(rr(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(rr(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?rr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},x5=function(r){const{main:e,currentTime:t,bandwidth:n,duration:s,segmentDuration:a,timeUntilRebuffer:o,currentTimeline:l,syncController:c}=r,h=e.playlists.filter(I=>!ai.isIncompatible(I));let m=h.filter(ai.isEnabled);m.length||(m=h.filter(I=>!ai.isDisabled(I)));const k=m.filter(ai.hasAttribute.bind(null,"BANDWIDTH")).map(I=>{const S=c.getSyncPoint(I,s,l,t)?1:2,L=ai.estimateSegmentRequestTime(a,n,I)*S-o;return{playlist:I,rebufferingImpact:L}}),T=k.filter(I=>I.rebufferingImpact<=0);return sr(T,(I,_)=>_u(_.playlist,I.playlist)),T.length?T[0]:(sr(k,(I,_)=>I.rebufferingImpact-_.rebufferingImpact),k[0]||null)},C5=function(){const r=this.playlists.main.playlists.filter(ai.isEnabled);return sr(r,(t,n)=>_u(t,n)),r.filter(t=>!!ns(this.playlists.main,t).video)[0]||null},E5=r=>{let e=0,t;return r.bytes&&(t=new Uint8Array(r.bytes),r.segments.forEach(n=>{t.set(n,e),e+=n.byteLength})),t};function Qf(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const S5=function(r,e,t){if(!r[t]){e.trigger({type:"usage",name:"vhs-608"});let n=t;/^cc708_/.test(t)&&(n="SERVICE"+t.split("_")[1]);const s=e.textTracks().getTrackById(n);if(s)r[t]=s;else{const a=e.options_.vhs&&e.options_.vhs.captionServices||{};let o=t,l=t,c=!1;const h=a[n];h&&(o=h.label,l=h.language,c=h.default),r[t]=e.addRemoteTextTrack({kind:"captions",id:n,default:c,label:o,language:l},!1).track}}},k5=function({inbandTextTracks:r,captionArray:e,timestampOffset:t}){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+t,s.endTime+t,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+t,s.endTime+t,s.text))})},w5=function(r){Object.defineProperties(r.frame,{id:{get(){return ne.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return ne.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return ne.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},D5=({inbandTextTracks:r,metadataArray:e,timestampOffset:t,videoDuration:n})=>{if(!e)return;const s=W.WebKitDataCue||W.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(m=>{const g=m.cueTime+t;typeof g!="number"||W.isNaN(g)||g<0||!(g<1/0)||!m.frames||!m.frames.length||m.frames.forEach(k=>{const T=new s(g,g,k.value||k.url||k.data||"");T.frame=k,T.value=k,w5(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 k=m[g.startTime]||[];return k.push(g),m[g.startTime]=k,m},{}),h=Object.keys(c).sort((m,g)=>Number(m)-Number(g));h.forEach((m,g)=>{const k=c[m],T=isFinite(n)?n:m,I=Number(h[g+1])||T;k.forEach(_=>{_.endTime=I})})},A5={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},N5=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),I5=({inbandTextTracks:r,dateRanges:e})=>{const t=r.metadataTrack_;if(!t)return;const n=W.WebKitDataCue||W.VTTCue;e.forEach(s=>{for(const a of Object.keys(s)){if(N5.has(a))continue;const o=new n(s.startTime,s.endTime,"");o.id=s.id,o.type="com.apple.quicktime.HLS",o.value={key:A5[a],data:s[a]},(a==="scte35Out"||a==="scte35In")&&(o.value.data=new Uint8Array(o.value.data.match(/[\da-f]{2}/gi)).buffer),t.addCue(o)}s.processDateRange()})},Kd=(r,e,t)=>{r.metadataTrack_||(r.metadataTrack_=t.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ne.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},Qr=function(r,e,t){let n,s;if(t&&t.cues)for(n=t.cues.length;n--;)s=t.cues[n],s.startTime>=r&&s.endTime<=e&&t.removeCue(s)},O5=function(r){const e=r.cues;if(!e)return;const t={};for(let n=e.length-1;n>=0;n--){const s=e[n],a=`${s.startTime}-${s.endTime}-${s.text}`;t[a]?r.removeCue(s):t[a]=s}},B5=(r,e,t)=>{if(typeof e>"u"||e===null||!r.length)return[];const n=Math.ceil((e-t+3)*Nn.ONE_SECOND_IN_TS);let s;for(s=0;s<r.length&&!(r[s].pts>n);s++);return r.slice(s)},L5=(r,e,t)=>{if(!e.length)return r;if(t)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)},M5=(r,e,t,n)=>{const s=Math.ceil((e-n)*Nn.ONE_SECOND_IN_TS),a=Math.ceil((t-n)*Nn.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},P5=function(r,e){if(!r&&!e||!r&&e||r&&!e)return!1;if(r===e)return!0;const t=Object.keys(r).sort(),n=Object.keys(e).sort();if(t.length!==n.length)return!1;for(let s=0;s<t.length;s++){const a=t[s];if(a!==n[s]||r[a]!==e[a])return!1}return!0},R5=function(r,e,t){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>t))return a}return n.length===0?0:n[n.length-1]},Wr=1,V5=500,Qd=r=>typeof r=="number"&&isFinite(r),Ws=1/60,F5=(r,e,t)=>r!=="main"||!e||!t?null:!t.hasAudio&&!t.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!t.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&&t.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,$5=(r,e,t)=>{let n=e-Nt.BACK_BUFFER_LENGTH;r.length&&(n=Math.max(n,r.start(0)));const s=e-t;return Math.min(s,n)},Gn=r=>{const{startOfSegment:e,duration:t,segment:n,part:s,playlist:{mediaSequence:a,id:o,segments:l=[]},mediaIndex:c,partIndex:h,timeline:m}=r,g=l.length-1;let k="mediaIndex/partIndex increment";r.getMediaInfoForTime?k=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(k="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(k+=` with independent ${r.independent}`);const T=typeof h=="number",I=r.segment.uri?"segment":"pre-segment",_=T?mf({preloadSegment:n})-1:0;return`${I} [${a+c}/${a+g}]`+(T?` part [${h}/${_}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(T?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${e}] duration [${t}] timeline [${m}] selected by [${k}] playlist [${o}]`},Zd=r=>`${r}TimingInfo`,U5=({segmentTimeline:r,currentTimeline:e,startOfSegment:t,buffered:n,overrideCheck:s})=>!s&&r===e?null:r<e?t:n.length?n.end(n.length-1):t,kl=({timelineChangeController:r,currentTimeline:e,segmentTimeline:t,loaderType:n,audioDisabled:s})=>{if(e===t)return!1;if(n==="audio"){const a=r.lastTimelineChange({type:"main"});return!a||a.to!==t}if(n==="main"&&s){const a=r.pendingTimelineChange({type:"audio"});return!(a&&a.to===t)}return!1},q5=r=>{if(!r)return!1;const e=r.pendingTimelineChange({type:"audio"}),t=r.pendingTimelineChange({type:"main"}),n=e&&t,s=n&&e.to!==t.to;return!!(n&&e.from!==-1&&t.from!==-1&&s)},H5=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),t=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&t&&e.to<t.to},hn=r=>{const e=r.pendingSegment_;if(!e)return;if(kl({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&q5(r.timelineChangeController_)){if(H5(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}r.timelineChangeController_.trigger("fixBadTimelineChange")}},j5=r=>{let e=0;return["video","audio"].forEach(function(t){const n=r[`${t}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},Jd=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+qi:!1,z5=(r,e)=>{if(e!=="hls")return null;const t=j5({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!t)return null;const n=r.playlist.targetDuration,s=Jd({segmentDuration:t,maxDuration:n*2}),a=Jd({segmentDuration:t,maxDuration:n}),o=`Segment with index ${r.mediaIndex} from playlist ${r.playlist.id} has a duration of ${t} 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 t=!!(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:t,isMediaInitialization:n}};class wl extends ne.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=bi(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(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(xt({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(xt({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 Qo.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_&&Qo.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Ot();if(this.loaderType_==="main"){const{hasAudio:t,hasVideo:n,isMuxed:s}=e;if(n&&t&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const n=Ca(e);let s=this.initSegments_[n];return t&&!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,t=!1){if(!e)return null;const n=Lf(e);let s=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!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,t={}){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_=t,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
209
  currentTime: ${this.currentTime_()}
210
210
  bufferedEnd: ${Xo(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_&&Qo.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,t,n=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=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,t,o)),(s||this.loaderType_==="main")&&(this.gopBuffer_=M5(this.gopBuffer_,e,t,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,t,o));for(const l in this.inbandTextTracks_)Qr(e,t,this.inbandTextTracks_[l]);Qr(e,t,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),V5)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:An({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),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,t=this.playlist_,n=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=typeof e=="number"&&t.segments[e],a=e+1===t.segments.length,o=!s||!s.parts||n+1===s.parts.length;return t.endList&&this.mediaSource_.readyState==="open"&&a&&o}chooseNextRequest_(){const e=this.buffered_(),t=Xo(e)||0,n=fu(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=R5(this.currentTimeline_,o,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${l.mediaIndex}`);else if(this.mediaIndex!==null){const k=o[this.mediaIndex],T=typeof this.partIndex=="number"?this.partIndex:-1;l.startOfSegment=k.end?k.end:t,k.parts&&k.parts[T+1]?(l.mediaIndex=this.mediaIndex,l.partIndex=T+1):l.mediaIndex=this.mediaIndex+1}else{let k,T,O;const _=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
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_&&Qo.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,t,n=()=>{},s=!1){if(t===1/0&&(t=this.duration_()),t<=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,t,o)),(s||this.loaderType_==="main")&&(this.gopBuffer_=M5(this.gopBuffer_,e,t,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,t,o));for(const l in this.inbandTextTracks_)Qr(e,t,this.inbandTextTracks_[l]);Qr(e,t,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),V5)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:An({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),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,t=this.playlist_,n=this.partIndex){if(!t||!this.mediaSource_)return!1;const s=typeof e=="number"&&t.segments[e],a=e+1===t.segments.length,o=!s||!s.parts||n+1===s.parts.length;return t.endList&&this.mediaSource_.readyState==="open"&&a&&o}chooseNextRequest_(){const e=this.buffered_(),t=Xo(e)||0,n=fu(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=R5(this.currentTimeline_,o,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${l.mediaIndex}`);else if(this.mediaIndex!==null){const k=o[this.mediaIndex],T=typeof this.partIndex=="number"?this.partIndex:-1;l.startOfSegment=k.end?k.end:t,k.parts&&k.parts[T+1]?(l.mediaIndex=this.mediaIndex,l.partIndex=T+1):l.mediaIndex=this.mediaIndex+1}else{let k,T,I;const _=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
212
212
  For TargetTime: ${_}.
213
213
  CurrentTime: ${this.currentTime_()}
214
214
  BufferedEnd: ${t}
215
215
  Fetch At Buffer: ${this.fetchAtBuffer_}
216
- `,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const S=this.getSyncInfoFromMediaSequenceSync_(_);if(!S){const R="No sync info found while using media sequence sync";return this.error({message:R,metadata:{errorType:ie.Error.StreamingFailedToSelectNextSegment,error:new Error(R)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${S.start} --> ${S.end})`),k=S.segmentIndex,T=S.partIndex,O=S.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const S=ai.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:_,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});k=S.segmentIndex,T=S.partIndex,O=S.startTime}l.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${_}`:`currentTime ${_}`,l.mediaIndex=k,l.startOfSegment=O,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 h=c&&typeof l.partIndex=="number"&&c.parts&&c.parts[l.partIndex];if(!c||typeof l.partIndex=="number"&&!h)return null;typeof l.partIndex!="number"&&c.parts&&(l.partIndex=0,h=c.parts[0]);const m=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!n&&h&&!m&&!h.independent)if(l.partIndex===0){const k=o[l.mediaIndex-1],T=k.parts&&k.parts.length&&k.parts[k.parts.length-1];T&&T.independent&&(l.mediaIndex-=1,l.partIndex=k.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 t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const n=this.mediaSequenceSync_.getSyncInfoForTime(t);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:t,playlist:n,mediaIndex:s,startOfSegment:a,isSyncRequest:o,partIndex:l,forceTimestampOffset:c,getMediaInfoForTime:h}=e,m=n.segments[s],g=typeof l=="number"&&m.parts[l],k={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:h,independent:t},T=typeof c<"u"?c:this.isPendingTimestampOffset_;k.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:m.timeline,currentTimeline:this.currentTimeline_,startOfSegment:a,buffered:this.buffered_(),overrideCheck:T});const O=Xo(this.sourceUpdater_.audioBuffered());return typeof O=="number"&&(k.audioAppendStart=O-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(k.gopsToAlignWith=B5(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),k}timestampOffsetForSegment_(e){return U5(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),n=e.bandwidth,s=this.pendingSegment_.duration,a=ai.estimateSegmentRequestTime(s,n,this.playlist_,e.bytesReceived),o=uC(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(a<=o)return;const l=x5({main:this.vhs_.playlists.main,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!l)return;const h=a-o-l.rebufferingImpact;let m=.5;o<=qi&&(m=1),!(!l.playlist||l.playlist.uri===this.playlist_.uri||h<m)&&(this.bandwidth=l.playlist.attributes.BANDWIDTH*Nt.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Gn(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:n,hasVideo:s}=t,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(t)||(t=t||{},P5(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this))))}handleTimingInfo_(e,t,n,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const a=this.pendingSegment_,o=Zd(t);a[o]=a[o]||{},a[o][n]=s,this.logger_(`timinginfo: ${t} - ${n} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(t.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,t));return}const s=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};t.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:h}=a[o],m=this.inbandTextTracks_;this.logger_(`adding cues from ${l} -> ${c} for ${o}`),S5(m,this.vhs_.tech_,o),Qr(l,c,m[o]),k5({captionArray:h,inbandTextTracks:m,timestampOffset:s})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n));return}this.addMetadataToTextTrack(n,t,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(t=>t())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(t=>t())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!kl({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_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:n,hasVideo:s,isMuxed:a}=t;return!(s&&!e.videoTimingInfo||n&&!this.audioDisabled_&&!a&&!e.audioTimingInfo||kl({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){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,t));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[Zd(t.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,t.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,t)}}updateAppendInitSegmentStatus(e,t){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:n,playlist:s}){if(n){const a=Ca(n);if(this.activeInitSegmentId_===a)return null;t=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=a}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,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: "+In(a).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+In(o).join(", "));const l=a.length?a.start(0):0,c=a.length?a.end(a.length-1):0,h=o.length?o.start(0):0,m=o.length?o.end(o.length-1):0;if(c-l<=Wr&&m-h<=Wr){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${n.byteLength}, audio buffer: ${In(a).join(", ")}, video buffer: ${In(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:t,bytes:n}));const k=this.currentTime_()-Wr;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${k}`),this.remove(0,k,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Wr}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=W.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Wr*1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:n},s){if(s){if(s.code===kf){this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:n});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",s),this.error({message:`${t} append of ${n.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:ie.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:n,data:s,bytes:a}){if(!a){const l=[s];let c=s.byteLength;n&&(l.unshift(n),c+=n.byteLength),a=E5({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:t,bytes:a},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:a}))}handleSegmentTimingInfo_(e,t,n){if(!this.pendingSegment_||t!==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,t){const{type:n,data:s}=t;if(!s||!s.byteLength||n==="audio"&&this.audioDisabled_)return;const a=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.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 t=xt({},e,{forceTimestampOffset:!0});xt(e,this.generateSegmentInfo_(t)),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 t=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
216
+ `,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const S=this.getSyncInfoFromMediaSequenceSync_(_);if(!S){const R="No sync info found while using media sequence sync";return this.error({message:R,metadata:{errorType:ne.Error.StreamingFailedToSelectNextSegment,error:new Error(R)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${S.start} --> ${S.end})`),k=S.segmentIndex,T=S.partIndex,I=S.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const S=ai.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:_,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});k=S.segmentIndex,T=S.partIndex,I=S.startTime}l.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${_}`:`currentTime ${_}`,l.mediaIndex=k,l.startOfSegment=I,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 h=c&&typeof l.partIndex=="number"&&c.parts&&c.parts[l.partIndex];if(!c||typeof l.partIndex=="number"&&!h)return null;typeof l.partIndex!="number"&&c.parts&&(l.partIndex=0,h=c.parts[0]);const m=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!n&&h&&!m&&!h.independent)if(l.partIndex===0){const k=o[l.mediaIndex-1],T=k.parts&&k.parts.length&&k.parts[k.parts.length-1];T&&T.independent&&(l.mediaIndex-=1,l.partIndex=k.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 t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const n=this.mediaSequenceSync_.getSyncInfoForTime(t);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:t,playlist:n,mediaIndex:s,startOfSegment:a,isSyncRequest:o,partIndex:l,forceTimestampOffset:c,getMediaInfoForTime:h}=e,m=n.segments[s],g=typeof l=="number"&&m.parts[l],k={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:h,independent:t},T=typeof c<"u"?c:this.isPendingTimestampOffset_;k.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:m.timeline,currentTimeline:this.currentTimeline_,startOfSegment:a,buffered:this.buffered_(),overrideCheck:T});const I=Xo(this.sourceUpdater_.audioBuffered());return typeof I=="number"&&(k.audioAppendStart=I-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(k.gopsToAlignWith=B5(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),k}timestampOffsetForSegment_(e){return U5(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),n=e.bandwidth,s=this.pendingSegment_.duration,a=ai.estimateSegmentRequestTime(s,n,this.playlist_,e.bytesReceived),o=uC(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(a<=o)return;const l=x5({main:this.vhs_.playlists.main,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:s,timeUntilRebuffer:o,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!l)return;const h=a-o-l.rebufferingImpact;let m=.5;o<=qi&&(m=1),!(!l.playlist||l.playlist.uri===this.playlist_.uri||h<m)&&(this.bandwidth=l.playlist.attributes.BANDWIDTH*Nt.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Gn(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:n,hasVideo:s}=t,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(t)||(t=t||{},P5(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this))))}handleTimingInfo_(e,t,n,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const a=this.pendingSegment_,o=Zd(t);a[o]=a[o]||{},a[o][n]=s,this.logger_(`timinginfo: ${t} - ${n} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():hn(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(t.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,t));return}const s=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};t.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:h}=a[o],m=this.inbandTextTracks_;this.logger_(`adding cues from ${l} -> ${c} for ${o}`),S5(m,this.vhs_.tech_,o),Qr(l,c,m[o]),k5({captionArray:h,inbandTextTracks:m,timestampOffset:s})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(!this.pendingSegment_.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n));return}this.addMetadataToTextTrack(n,t,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(t=>t())}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach(t=>t())}hasEnoughInfoToLoad_(){if(this.loaderType_!=="audio")return!0;const e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!kl({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_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:n,hasVideo:s,isMuxed:a}=t;return!(s&&!e.videoTimingInfo||n&&!this.audioDisabled_&&!a&&!e.audioTimingInfo||kl({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){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,t));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[Zd(t.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,t.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,t)}}updateAppendInitSegmentStatus(e,t){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:n,playlist:s}){if(n){const a=Ca(n);if(this.activeInitSegmentId_===a)return null;t=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=a}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=s,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,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: "+In(a).join(", ")),o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+In(o).join(", "));const l=a.length?a.start(0):0,c=a.length?a.end(a.length-1):0,h=o.length?o.start(0):0,m=o.length?o.end(o.length-1):0;if(c-l<=Wr&&m-h<=Wr){this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${n.byteLength}, audio buffer: ${In(a).join(", ")}, video buffer: ${In(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:t,bytes:n}));const k=this.currentTime_()-Wr;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${k}`),this.remove(0,k,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${Wr}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=W.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},Wr*1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:n},s){if(s){if(s.code===kf){this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:n});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",s),this.error({message:`${t} append of ${n.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:ne.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")}}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:n,data:s,bytes:a}){if(!a){const l=[s];let c=s.byteLength;n&&(l.unshift(n),c+=n.byteLength),a=E5({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:t,bytes:a},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:a}))}handleSegmentTimingInfo_(e,t,n){if(!this.pendingSegment_||t!==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,t){const{type:n,data:s}=t;if(!s||!s.byteLength||n==="audio"&&this.audioDisabled_)return;const a=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.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 t=xt({},e,{forceTimestampOffset:!0});xt(e,this.generateSegmentInfo_(t)),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 t=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
217
  ${Qf(e.uri)}
218
- ${Gn(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=y5({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,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:h})=>{this.logger_(`${Gn(e)} logged from transmuxer stream ${h} as a ${c}: ${l}`)},triggerSegmentEventFn:({type:l,segment:c,keyInfo:h,trackInfo:m,timingInfo:g})=>{const T={segmentInfo:An({segment:c})};h&&(T.keyInfo=h),m&&(T.trackInfo=m),g&&(T.timingInfo=g),this.trigger({type:l,metadata:T})}})}trimBackBuffer_(e){const t=$5(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=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:t.resolvedUri,byterange:n?n.byterange:t.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===t.timeline&&(l.videoTimingInfo?o.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(o.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),t.key){const c=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(t.key),o.key.iv=c}return t.map&&(o.map=this.initSegmentForMap(t.map)),o}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Ws){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${Ws}`);return}const n={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:n}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,n){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_||t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===ji.ABORTED)return;if(this.pause(),e.code===ji.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=L5(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);t!==null&&(this.timeMapping_=t)}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:t,mediaIndex:n,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:a,useVideoTimingInfo:o,videoTimingInfo:l,audioTimingInfo:c}){if(typeof e<"u")return e;if(!o)return c.start;const h=t.segments[n-1];return n===0||!h||typeof h.start>"u"||h.end!==s+a?s:l.start}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t){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}=t,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 t=F5(this.loaderType_,this.getCurrentMediaInfo_(),e);return t?(this.error({message:t,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 t=!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),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:n}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:t&&typeof t.transmuxedDecodeStart=="number"?t.transmuxedDecodeStart:n.start:n.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),s=this.loaderType_==="main"&&t&&t.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 t=z5(e,this.sourceType_);if(t&&(t.severity==="warn"?ie.log.warn(t.message):this.logger_(t.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 ${Gn(e)}`);return}this.logger_(`Appended ${Gn(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"} ${Gn(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<Ws){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${Ws}`);return}const t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,n=t.start,s=t.end;if(!Qd(n)||!Qd(s))return;Qr(n,s,this.segmentMetadataTrack_);const a=W.WebKitDataCue||W.VTTCue,o={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.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 nn(){}const Zf=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},G5=["video","audio"],Dl=(r,e)=>{const t=e[`${r}Buffer`];return t&&t.updating||e.queuePending[r]},W5=(r,e)=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="mediaSource")return null;if(n.type===r)return t}return null},ar=(r,e)=>{if(e.queue.length===0)return;let t=0,n=e.queue[t];if(n.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),n.action(e),n.doneFn&&n.doneFn(),ar("audio",e),ar("video",e));return}if(r!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||Dl(r,e))){if(n.type!==r){if(t=W5(r,e.queue),t===null)return;n=e.queue[t]}if(e.queue.splice(t,1),e.queuePending[r]=n,n.action(r,e),!n.doneFn){e.queuePending[r]=null,ar(r,e);return}}},Jf=(r,e)=>{const t=e[`${r}Buffer`],n=Zf(r);t&&(t.removeEventListener("updateend",e[`on${n}UpdateEnd_`]),t.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,ci={appendBuffer:(r,e,t)=>(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===kf?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${n}Buffer`),s.queuePending[n]=null,t(o)}}},remove:(r,e)=>(t,n)=>{const s=n[`${t}Buffer`];if($i(n.mediaSource,s)){n.logger_(`Removing ${r} to ${e} from ${t}Buffer`);try{s.remove(r,e)}catch{n.logger_(`Remove ${r} to ${e} from ${t}Buffer failed`)}}},timestampOffset:r=>(e,t)=>{const n=t[`${e}Buffer`];$i(t.mediaSource,n)&&(t.logger_(`Setting ${e}timestampOffset to ${r}`),n.timestampOffset=r)},callback:r=>(e,t)=>{r()},endOfStream:r=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${r||""})`);try{e.mediaSource.endOfStream(r)}catch(t){ie.log.warn("Failed to call media source endOfStream",t)}}},duration:r=>e=>{e.logger_(`Setting mediaSource duration to ${r}`);try{e.mediaSource.duration=r}catch(t){ie.log.warn("Failed to set media source duration",t)}},abort:()=>(r,e)=>{if(e.mediaSource.readyState!=="open")return;const t=e[`${r}Buffer`];if($i(e.mediaSource,t)){e.logger_(`calling abort on ${r}Buffer`);try{t.abort()}catch(n){ie.log.warn(`Failed to abort on ${r}Buffer`,n)}}},addSourceBuffer:(r,e)=>t=>{const n=Zf(r),s=or(e);t.logger_(`Adding ${r}Buffer with codec ${e} to mediaSource`);const a=t.mediaSource.addSourceBuffer(s);a.addEventListener("updateend",t[`on${n}UpdateEnd_`]),a.addEventListener("error",t[`on${n}Error_`]),t.codecs[r]=e,t[`${r}Buffer`]=a},removeSourceBuffer:r=>e=>{const t=e[`${r}Buffer`];if(Jf(r,e),!!$i(e.mediaSource,t)){e.logger_(`Removing ${r}Buffer with codec ${e.codecs[r]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(n){ie.log.warn(`Failed to removeSourceBuffer ${r}Buffer`,n)}}},changeType:r=>(e,t)=>{const n=t[`${e}Buffer`],s=or(r);if(!$i(t.mediaSource,n))return;const a=r.substring(0,r.indexOf(".")),o=t.codecs[e];if(o.substring(0,o.indexOf("."))===a)return;const c={codecsChangeInfo:{from:o,to:r}};t.trigger({type:"codecschange",metadata:c}),t.logger_(`changing ${e}Buffer codec from ${o} to ${r}`);try{n.changeType(s),t.codecs[e]=r}catch(h){c.errorType=ie.Error.StreamingCodecsChangeError,c.error=h,h.metadata=c,t.error_=h,t.trigger("error"),ie.log.warn(`Failed to changeType on ${e}Buffer`,h)}}},di=({type:r,sourceUpdater:e,action:t,doneFn:n,name:s})=>{e.queue.push({type:r,action:t,doneFn:n,name:s}),ar(r,e)},eh=(r,e)=>t=>{const n=e[`${r}Buffered`](),s=aC(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_`])}ar(r,e)};class ep extends ie.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>ar("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=bi("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=eh("video",this),this.onAudioUpdateEnd_=eh("audio",this),this.onVideoError_=t=>{this.videoError_=t},this.onAudioError_=t=>{this.audioError_=t},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,t){di({type:"mediaSource",sourceUpdater:this,action:ci.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){di({type:e,sourceUpdater:this,action:ci.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){ie.log.error("removeSourceBuffer is not supported!");return}di({type:"mediaSource",sourceUpdater:this,action:ci.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!ie.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,t){if(!this.canChangeType()){ie.log.error("changeType is not supported!");return}di({type:e,sourceUpdater:this,action:ci.changeType(t),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(t=>{const n=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,n);this.canChangeType()&&this.changeType(t,n)})}appendBuffer(e,t){const{segmentInfo:n,type:s,bytes:a}=e;if(this.processedAppend_=!0,s==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,t]),this.logger_(`delayed audio append of ${a.length} until video append`);return}const o=t;if(di({type:s,sourceUpdater:this,action:ci.appendBuffer(a,n||{mediaIndex:-1},o),doneFn:t,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:Ot()}videoBuffered(){return $i(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Ot()}buffered(){const e=$i(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=$i(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():lC(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=nn){di({type:"mediaSource",sourceUpdater:this,action:ci.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=nn){typeof e!="string"&&(e=void 0),di({type:"mediaSource",sourceUpdater:this,action:ci.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,n=nn){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){n();return}di({type:"audio",sourceUpdater:this,action:ci.remove(e,t),doneFn:n,name:"remove"})}removeVideo(e,t,n=nn){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){n();return}di({type:"video",sourceUpdater:this,action:ci.remove(e,t),doneFn:n,name:"remove"})}updating(){return!!(Dl("audio",this)||Dl("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(di({type:"audio",sourceUpdater:this,action:ci.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(di({type:"video",sourceUpdater:this,action:ci.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&di({type:"audio",sourceUpdater:this,action:ci.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&di({type:"video",sourceUpdater:this,action:ci.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),G5.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Jf(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const th=r=>decodeURIComponent(escape(String.fromCharCode.apply(null,r))),Y5=r=>{const e=new Uint8Array(r);return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")},ih=new Uint8Array(`
218
+ ${Gn(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=y5({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,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:h})=>{this.logger_(`${Gn(e)} logged from transmuxer stream ${h} as a ${c}: ${l}`)},triggerSegmentEventFn:({type:l,segment:c,keyInfo:h,trackInfo:m,timingInfo:g})=>{const T={segmentInfo:An({segment:c})};h&&(T.keyInfo=h),m&&(T.trackInfo=m),g&&(T.timingInfo=g),this.trigger({type:l,metadata:T})}})}trimBackBuffer_(e){const t=$5(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=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:t.resolvedUri,byterange:n?n.byterange:t.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===t.timeline&&(l.videoTimingInfo?o.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(o.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),t.key){const c=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(t.key),o.key.iv=c}return t.map&&(o.map=this.initSegmentForMap(t.map)),o}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Ws){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${Ws}`);return}const n={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:n}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,n){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_||t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===ji.ABORTED)return;if(this.pause(),e.code===ji.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=L5(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(s)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);t!==null&&(this.timeMapping_=t)}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:t,mediaIndex:n,firstVideoFrameTimeForData:s,currentVideoTimestampOffset:a,useVideoTimingInfo:o,videoTimingInfo:l,audioTimingInfo:c}){if(typeof e<"u")return e;if(!o)return c.start;const h=t.segments[n-1];return n===0||!h||typeof h.start>"u"||h.end!==s+a?s:l.start}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t){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}=t,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 t=F5(this.loaderType_,this.getCurrentMediaInfo_(),e);return t?(this.error({message:t,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 t=!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),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:n}){return this.useDtsForTimestampOffset_?e&&typeof e.transmuxedDecodeStart=="number"?e.transmuxedDecodeStart:t&&typeof t.transmuxedDecodeStart=="number"?t.transmuxedDecodeStart:n.start:n.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),s=this.loaderType_==="main"&&t&&t.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 t=z5(e,this.sourceType_);if(t&&(t.severity==="warn"?ne.log.warn(t.message):this.logger_(t.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 ${Gn(e)}`);return}this.logger_(`Appended ${Gn(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"} ${Gn(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<Ws){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${Ws}`);return}const t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,n=t.start,s=t.end;if(!Qd(n)||!Qd(s))return;Qr(n,s,this.segmentMetadataTrack_);const a=W.WebKitDataCue||W.VTTCue,o={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.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 nn(){}const Zf=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},G5=["video","audio"],Dl=(r,e)=>{const t=e[`${r}Buffer`];return t&&t.updating||e.queuePending[r]},W5=(r,e)=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="mediaSource")return null;if(n.type===r)return t}return null},ar=(r,e)=>{if(e.queue.length===0)return;let t=0,n=e.queue[t];if(n.type==="mediaSource"){!e.updating()&&e.mediaSource.readyState!=="closed"&&(e.queue.shift(),n.action(e),n.doneFn&&n.doneFn(),ar("audio",e),ar("video",e));return}if(r!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||Dl(r,e))){if(n.type!==r){if(t=W5(r,e.queue),t===null)return;n=e.queue[t]}if(e.queue.splice(t,1),e.queuePending[r]=n,n.action(r,e),!n.doneFn){e.queuePending[r]=null,ar(r,e);return}}},Jf=(r,e)=>{const t=e[`${r}Buffer`],n=Zf(r);t&&(t.removeEventListener("updateend",e[`on${n}UpdateEnd_`]),t.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,ci={appendBuffer:(r,e,t)=>(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===kf?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${e.mediaIndex} to ${n}Buffer`),s.queuePending[n]=null,t(o)}}},remove:(r,e)=>(t,n)=>{const s=n[`${t}Buffer`];if($i(n.mediaSource,s)){n.logger_(`Removing ${r} to ${e} from ${t}Buffer`);try{s.remove(r,e)}catch{n.logger_(`Remove ${r} to ${e} from ${t}Buffer failed`)}}},timestampOffset:r=>(e,t)=>{const n=t[`${e}Buffer`];$i(t.mediaSource,n)&&(t.logger_(`Setting ${e}timestampOffset to ${r}`),n.timestampOffset=r)},callback:r=>(e,t)=>{r()},endOfStream:r=>e=>{if(e.mediaSource.readyState==="open"){e.logger_(`Calling mediaSource endOfStream(${r||""})`);try{e.mediaSource.endOfStream(r)}catch(t){ne.log.warn("Failed to call media source endOfStream",t)}}},duration:r=>e=>{e.logger_(`Setting mediaSource duration to ${r}`);try{e.mediaSource.duration=r}catch(t){ne.log.warn("Failed to set media source duration",t)}},abort:()=>(r,e)=>{if(e.mediaSource.readyState!=="open")return;const t=e[`${r}Buffer`];if($i(e.mediaSource,t)){e.logger_(`calling abort on ${r}Buffer`);try{t.abort()}catch(n){ne.log.warn(`Failed to abort on ${r}Buffer`,n)}}},addSourceBuffer:(r,e)=>t=>{const n=Zf(r),s=or(e);t.logger_(`Adding ${r}Buffer with codec ${e} to mediaSource`);const a=t.mediaSource.addSourceBuffer(s);a.addEventListener("updateend",t[`on${n}UpdateEnd_`]),a.addEventListener("error",t[`on${n}Error_`]),t.codecs[r]=e,t[`${r}Buffer`]=a},removeSourceBuffer:r=>e=>{const t=e[`${r}Buffer`];if(Jf(r,e),!!$i(e.mediaSource,t)){e.logger_(`Removing ${r}Buffer with codec ${e.codecs[r]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(n){ne.log.warn(`Failed to removeSourceBuffer ${r}Buffer`,n)}}},changeType:r=>(e,t)=>{const n=t[`${e}Buffer`],s=or(r);if(!$i(t.mediaSource,n))return;const a=r.substring(0,r.indexOf(".")),o=t.codecs[e];if(o.substring(0,o.indexOf("."))===a)return;const c={codecsChangeInfo:{from:o,to:r}};t.trigger({type:"codecschange",metadata:c}),t.logger_(`changing ${e}Buffer codec from ${o} to ${r}`);try{n.changeType(s),t.codecs[e]=r}catch(h){c.errorType=ne.Error.StreamingCodecsChangeError,c.error=h,h.metadata=c,t.error_=h,t.trigger("error"),ne.log.warn(`Failed to changeType on ${e}Buffer`,h)}}},di=({type:r,sourceUpdater:e,action:t,doneFn:n,name:s})=>{e.queue.push({type:r,action:t,doneFn:n,name:s}),ar(r,e)},eh=(r,e)=>t=>{const n=e[`${r}Buffered`](),s=aC(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_`])}ar(r,e)};class ep extends ne.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>ar("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=bi("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=eh("video",this),this.onAudioUpdateEnd_=eh("audio",this),this.onVideoError_=t=>{this.videoError_=t},this.onAudioError_=t=>{this.audioError_=t},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,t){di({type:"mediaSource",sourceUpdater:this,action:ci.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){di({type:e,sourceUpdater:this,action:ci.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){ne.log.error("removeSourceBuffer is not supported!");return}di({type:"mediaSource",sourceUpdater:this,action:ci.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!ne.browser.IS_FIREFOX&&W.MediaSource&&W.MediaSource.prototype&&typeof W.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return W.SourceBuffer&&W.SourceBuffer.prototype&&typeof W.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){if(!this.canChangeType()){ne.log.error("changeType is not supported!");return}di({type:e,sourceUpdater:this,action:ci.changeType(t),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(t=>{const n=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,n);this.canChangeType()&&this.changeType(t,n)})}appendBuffer(e,t){const{segmentInfo:n,type:s,bytes:a}=e;if(this.processedAppend_=!0,s==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,t]),this.logger_(`delayed audio append of ${a.length} until video append`);return}const o=t;if(di({type:s,sourceUpdater:this,action:ci.appendBuffer(a,n||{mediaIndex:-1},o),doneFn:t,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:Ot()}videoBuffered(){return $i(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Ot()}buffered(){const e=$i(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=$i(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():lC(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=nn){di({type:"mediaSource",sourceUpdater:this,action:ci.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=nn){typeof e!="string"&&(e=void 0),di({type:"mediaSource",sourceUpdater:this,action:ci.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,n=nn){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){n();return}di({type:"audio",sourceUpdater:this,action:ci.remove(e,t),doneFn:n,name:"remove"})}removeVideo(e,t,n=nn){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){n();return}di({type:"video",sourceUpdater:this,action:ci.remove(e,t),doneFn:n,name:"remove"})}updating(){return!!(Dl("audio",this)||Dl("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(di({type:"audio",sourceUpdater:this,action:ci.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(di({type:"video",sourceUpdater:this,action:ci.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&di({type:"audio",sourceUpdater:this,action:ci.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&di({type:"video",sourceUpdater:this,action:ci.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),G5.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Jf(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const th=r=>decodeURIComponent(escape(String.fromCharCode.apply(null,r))),Y5=r=>{const e=new Uint8Array(r);return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")},ih=new Uint8Array(`
219
219
 
220
- `.split("").map(r=>r.charCodeAt(0)));class X5 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class K5 extends wl{constructor(e,t={}){super(e,t),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 Ot();const e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Ot([[t,n]])}initSegmentForMap(e,t=!1){if(!e)return null;const n=Ca(e);let s=this.initSegments_[n];if(t&&!s&&e.bytes){const a=ih.byteLength+e.bytes.byteLength,o=new Uint8Array(a);o.set(e.bytes),o.set(ih,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,t){Qr(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const t=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",t),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,t,n){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===ji.TIMEOUT&&this.handleTimeout_(),e.code===ji.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,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const o=s.segment;if(o.map&&(o.map.bytes=t.map.bytes),s.bytes=t.bytes,typeof W.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,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:ie.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)}),O5(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const n=e&&e.type==="vtt",s=t&&t.type==="text";n&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(n=>{const s=n.start+t,a=n.end+t,o=new W.VTTCue(s,a,n.cueText);n.settings&&n.settings.split(" ").forEach(l=>{const c=l.split(":"),h=c[0],m=c[1];o[h]=isNaN(m)?m:Number(m)}),e.cues.push(o)})}parseVTTCues_(e){let t,n=!1;if(typeof W.WebVTT!="function")throw new X5;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof W.TextDecoder=="function"?t=new W.TextDecoder("utf8"):(t=W.WebVTT.StringDecoder(),n=!0);const s=new W.WebVTT.Parser(W,W.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=o=>{e.timestampmap=o},s.onparsingerror=o=>{ie.log.warn("Error encountered when parsing cues: "+o.message)},e.segment.map){let o=e.segment.map.bytes;n&&(o=th(o)),s.parse(o)}let a=e.bytes;n&&(a=th(a)),s.parse(a),s.flush()}updateTimeMapping_(e,t,n){const s=e.segment;if(!t)return;if(!e.cues.length){s.empty=!0;return}const{MPEGTS:a,LOCAL:o}=e.timestampmap,c=a/Nn.ONE_SECOND_IN_TS-o+t.mapping;if(e.cues.forEach(h=>{const m=h.endTime-h.startTime,g=this.handleRollover_(h.startTime+c,t.time);h.startTime=Math.max(g,0),h.endTime=Math.max(g+m,0)}),!n.syncInfo){const h=e.cues[0].startTime,m=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(h,m-s.duration)}}}handleRollover_(e,t){if(t===null)return e;let n=e*Nn.ONE_SECOND_IN_TS;const s=t*Nn.ONE_SECOND_IN_TS;let a;for(s<n?a=-8589934592:a=8589934592;Math.abs(n-s)>4294967296;)n+=a;return n/Nn.ONE_SECOND_IN_TS}}const Q5=function(r,e){const t=r.cues;for(let n=0;n<t.length;n++){const s=t[n];if(e>=s.adStartTime&&e<=s.adEndTime)return s}return null},Z5=function(r,e,t=0){if(!r.segments)return;let n=t,s;for(let a=0;a<r.segments.length;a++){const o=r.segments[a];if(s||(s=Q5(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 nh{constructor({start:e,end:t,segmentIndex:n,partIndex:s=null,appended:a=!1}){this.start_=e,this.end_=t,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 J5{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}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 tp{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,t){const{mediaSequence:n,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(n,s),!!this.isReliable_)return this.updateStorage_(s,n,this.calculateBaseTime_(n,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:n}of this.storage_.values())if(n.length){for(const s of n)if(s.isInRange(e))return s}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,n){const s=new Map;let a=`
221
- `,o=n,l=t;this.start_=o,e.forEach((c,h)=>{const m=this.storage_.get(l),g=o,k=g+c.duration,T=!!(m&&m.segmentSyncInfo&&m.segmentSyncInfo.isAppended),O=new nh({start:g,end:k,appended:T,segmentIndex:h});c.syncInfo=O;let _=o;const S=(c.parts||[]).map((R,L)=>{const I=_,j=_+R.duration,M=!!(m&&m.partsSyncInfo&&m.partsSyncInfo[L]&&m.partsSyncInfo[L].isAppended),P=new nh({start:I,end:j,appended:M,segmentIndex:h,partIndex:L});return _=j,a+=`Media Sequence: ${l}.${L} | Range: ${I} --> ${j} | Appended: ${M}
222
- `,R.syncInfo=P,P});s.set(l,new J5(O,S)),a+=`${Qf(c.resolvedUri)} | Media Sequence: ${l} | Range: ${g} --> ${k} | Appended: ${T}
223
- `,l++,o=k}),this.end_=o,this.storage_=s,this.diagnostics_=a}calculateBaseTime_(e,t,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=t[l];o-=c.duration}return o}return n}isReliablePlaylist_(e,t){return e!=null&&Array.isArray(t)&&t.length}}class rh extends tp{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,n){if(!this.storage_.size){const s=this.parent_.getSyncInfoForMediaSequence(e);return s?s.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,n)}}const eE=86400,Zo=[{name:"VOD",run:(r,e,t,n,s)=>t!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(r,e,t,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,t,n,s)=>{if(!Object.keys(r.timelineToDatetimeMappings).length)return null;let a=null,o=null;const l=_l(e);s=s||0;for(let c=0;c<l.length;c++){const h=e.endList||s===0?c:l.length-(c+1),m=l[h],g=m.segment,k=r.timelineToDatetimeMappings[g.timeline];if(!k||!g.dateTimeObject)continue;let O=g.dateTimeObject.getTime()/1e3+k;if(g.parts&&typeof m.partIndex=="number")for(let S=0;S<m.partIndex;S++)O+=g.parts[S].duration;const _=Math.abs(s-O);if(o!==null&&(_===0||o<_))break;o=_,a={time:O,segmentIndex:m.segmentIndex,partIndex:m.partIndex}}return a}},{name:"Segment",run:(r,e,t,n,s)=>{let a=null,o=null;s=s||0;const l=_l(e);for(let c=0;c<l.length;c++){const h=e.endList||s===0?c:l.length-(c+1),m=l[h],g=m.segment,k=m.part&&m.part.start||g&&g.start;if(g.timeline===n&&typeof k<"u"){const T=Math.abs(s-k);if(o!==null&&o<T)break;(!a||o===null||o>=T)&&(o=T,a={time:k,segmentIndex:m.segmentIndex,partIndex:m.partIndex})}}return a}},{name:"Discontinuity",run:(r,e,t,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],h=e.discontinuitySequence+l+1,m=r.discontinuities[h];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,t,n,s)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class tE extends ie.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new tp,n=new rh(t),s=new rh(t);this.mediaSequenceStorage_={main:t,audio:n,vtt:s},this.logger_=bi("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,n,s,a){if(t!==1/0)return Zo.find(({name:c})=>c==="VOD").run(this,e,t);const o=this.runStrategies_(e,t,n,s,a);if(!o.length)return null;for(const l of o){const{syncPoint:c,strategy:h}=l,{segmentIndex:m,time:g}=c;if(m<0)continue;const k=e.segments[m],T=g,O=T+k.duration;if(this.logger_(`Strategy: ${h}. Current time: ${s}. selected segment: ${m}. Time: [${T} -> ${O}]}`),s>=T&&s<O)return this.logger_("Found sync point with exact match: ",c),c}return this.selectSyncPoint_(o,{key:"time",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const n=this.runStrategies_(e,t,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+is({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,n,s,a){const o=[];for(let l=0;l<Zo.length;l++){const c=Zo[l],h=c.run(this,e,t,n,s,a);h&&(h.strategy=c.name,o.push({strategy:c.name,syncPoint:h}))}return o}selectSyncPoint_(e,t){let n=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),a=e[0].strategy;for(let o=1;o<e.length;o++){const l=Math.abs(e[o].syncPoint[t.key]-t.value);l<s&&(s=l,n=e[o].syncPoint,a=e[o].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${a}]: [time:${n.time}, segmentIndex:${n.segmentIndex}`+(typeof n.partIndex=="number"?`,partIndex:${n.partIndex}`:"")+"]"),n}saveExpiredSegmentInfo(e,t){const n=t.mediaSequence-e.mediaSequence;if(n>eE){ie.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"){t.syncInfo={mediaSequence:e.mediaSequence+s,time:a.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const n=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),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&&t&&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,t,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-t.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=t.end+o.mapping;else if(o)l=t.start+o.mapping,c=t.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 t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=a-e.mediaIndex,c=Math.abs(l);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>c){let h;l<0?h=n.start-is({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:a}):h=n.end+is({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[o]={time:h,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class iE extends ie.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:n}){return typeof t=="number"&&typeof n=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:n},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:n}){if(typeof t=="number"&&typeof n=="number"){this.lastTimelineChanges_[e]={type:e,from:t,to:n},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:n}};this.trigger({type:"timelinechange",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const nE=$f(Uf(function(){var r=(function(){function _(){this.listeners={}}var S=_.prototype;return S.on=function(L,I){this.listeners[L]||(this.listeners[L]=[]),this.listeners[L].push(I)},S.off=function(L,I){if(!this.listeners[L])return!1;var j=this.listeners[L].indexOf(I);return this.listeners[L]=this.listeners[L].slice(0),this.listeners[L].splice(j,1),j>-1},S.trigger=function(L){var I=this.listeners[L];if(I)if(arguments.length===2)for(var j=I.length,M=0;M<j;++M)I[M].call(this,arguments[1]);else for(var P=Array.prototype.slice.call(arguments,1),N=I.length,X=0;X<N;++X)I[X].apply(this,P)},S.dispose=function(){this.listeners={}},S.pipe=function(L){this.on("data",function(I){L.push(I)})},_})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(_){return _.subarray(0,_.byteLength-_[_.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const t=function(){const _=[[[],[],[],[],[]],[[],[],[],[],[]]],S=_[0],R=_[1],L=S[4],I=R[4];let j,M,P;const N=[],X=[];let b,C,$,U,E,w;for(j=0;j<256;j++)X[(N[j]=j<<1^(j>>7)*283)^j]=j;for(M=P=0;!L[M];M^=b||1,P=X[P]||1)for(U=P^P<<1^P<<2^P<<3^P<<4,U=U>>8^U&255^99,L[M]=U,I[U]=M,$=N[C=N[b=N[M]]],w=$*16843009^C*65537^b*257^M*16843008,E=N[U]*257^U*16843008,j=0;j<4;j++)S[j][M]=E=E<<24^E>>>8,R[j][U]=w=w<<24^w>>>8;for(j=0;j<5;j++)S[j]=S[j].slice(0),R[j]=R[j].slice(0);return _};let n=null;class s{constructor(S){n||(n=t()),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 R,L,I;const j=this._tables[0][4],M=this._tables[1],P=S.length;let N=1;if(P!==4&&P!==6&&P!==8)throw new Error("Invalid aes key size");const X=S.slice(0),b=[];for(this._key=[X,b],R=P;R<4*P+28;R++)I=X[R-1],(R%P===0||P===8&&R%P===4)&&(I=j[I>>>24]<<24^j[I>>16&255]<<16^j[I>>8&255]<<8^j[I&255],R%P===0&&(I=I<<8^I>>>24^N<<24,N=N<<1^(N>>7)*283)),X[R]=X[R-P]^I;for(L=0;R;L++,R--)I=X[L&3?R:R-4],R<=4||L<4?b[L]=I:b[L]=M[0][j[I>>>24]]^M[1][j[I>>16&255]]^M[2][j[I>>8&255]]^M[3][j[I&255]]}decrypt(S,R,L,I,j,M){const P=this._key[1];let N=S^P[0],X=I^P[1],b=L^P[2],C=R^P[3],$,U,E;const w=P.length/4-2;let F,G=4;const Z=this._tables[1],q=Z[0],H=Z[1],Q=Z[2],J=Z[3],re=Z[4];for(F=0;F<w;F++)$=q[N>>>24]^H[X>>16&255]^Q[b>>8&255]^J[C&255]^P[G],U=q[X>>>24]^H[b>>16&255]^Q[C>>8&255]^J[N&255]^P[G+1],E=q[b>>>24]^H[C>>16&255]^Q[N>>8&255]^J[X&255]^P[G+2],C=q[C>>>24]^H[N>>16&255]^Q[X>>8&255]^J[b&255]^P[G+3],G+=4,N=$,X=U,b=E;for(F=0;F<4;F++)j[(3&-F)+M]=re[N>>>24]<<24^re[X>>16&255]<<16^re[b>>8&255]<<8^re[C&255]^P[G++],$=N,N=X,X=b,b=C,C=$}}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(S){this.jobs.push(S),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(_){return _<<24|(_&65280)<<8|(_&16711680)>>8|_>>>24},l=function(_,S,R){const L=new Int32Array(_.buffer,_.byteOffset,_.byteLength>>2),I=new s(Array.prototype.slice.call(S)),j=new Uint8Array(_.byteLength),M=new Int32Array(j.buffer);let P,N,X,b,C,$,U,E,w;for(P=R[0],N=R[1],X=R[2],b=R[3],w=0;w<L.length;w+=4)C=o(L[w]),$=o(L[w+1]),U=o(L[w+2]),E=o(L[w+3]),I.decrypt(C,$,U,E,M,w),M[w]=o(M[w]^P),M[w+1]=o(M[w+1]^N),M[w+2]=o(M[w+2]^X),M[w+3]=o(M[w+3]^b),P=C,N=$,X=U,b=E;return j};class c{constructor(S,R,L,I){const j=c.STEP,M=new Int32Array(S.buffer),P=new Uint8Array(S.byteLength);let N=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(M.subarray(N,N+j),R,L,P)),N=j;N<M.length;N+=j)L=new Uint32Array([o(M[N-4]),o(M[N-3]),o(M[N-2]),o(M[N-1])]),this.asyncStream_.push(this.decryptChunk_(M.subarray(N,N+j),R,L,P));this.asyncStream_.push(function(){I(null,e(P))})}static get STEP(){return 32e3}decryptChunk_(S,R,L,I){return function(){const j=l(S,R,L);I.set(j,S.byteOffset)}}}var h=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},m;typeof window<"u"?m=window:typeof h<"u"?m=h:typeof self<"u"?m=self:m={};var g=m,k=function(S){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(S):S&&S.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 _=new Uint16Array([65484]),S=new Uint8Array(_.buffer,_.byteOffset,_.byteLength);return S[0]===255?"big":S[0]===204?"little":"unknown"})();const O=function(_){const S={};return Object.keys(_).forEach(R=>{const L=_[R];k(L)?S[R]={bytes:L.buffer,byteOffset:L.byteOffset,byteLength:L.byteLength}:S[R]=L}),S};self.onmessage=function(_){const S=_.data,R=new Uint8Array(S.encrypted.bytes,S.encrypted.byteOffset,S.encrypted.byteLength),L=new Uint32Array(S.key.bytes,S.key.byteOffset,S.key.byteLength/4),I=new Uint32Array(S.iv.bytes,S.iv.byteOffset,S.iv.byteLength/4);new c(R,L,I,function(j,M){self.postMessage(O({source:S.source,decrypted:M}),[M.buffer])})}}));var rE=Ff(nE);const sE=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},ip=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Al=(r,e)=>{e.activePlaylistLoader=r,r.load()},aE=(r,e)=>()=>{const{segmentLoaders:{[r]:t,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,ip(t,s),!(!o||o.isMainPlaylist))){if(!o.playlistLoader){l&&n.resetEverything();return}t.resyncLoader(),Al(o.playlistLoader,s)}},oE=(r,e)=>()=>{const{segmentLoaders:{[r]:t},mediaTypes:{[r]:n}}=e;n.lastGroup_=null,t.abort(),t.pause()},lE=(r,e)=>()=>{const{mainPlaylistLoader:t,segmentLoaders:{[r]:n,main:s},mediaTypes:{[r]:a}}=e,o=a.activeTrack(),l=a.getActiveGroup(),c=a.activePlaylistLoader,h=a.lastTrack_;if(!(h&&o&&h.id===o.id)&&(a.lastGroup_=l,a.lastTrack_=o,ip(n,a),!!l)){if(l.isMainPlaylist){if(!o||!h||o.id===h.id)return;const m=e.vhs.playlistController_,g=m.selectPlaylist();if(m.media()===g)return;a.logger_(`track change. Switching main audio from ${h.id} to ${o.id}`),t.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){Al(l.playlistLoader,a);return}n.track&&n.track(o),n.resetEverything(),Al(l.playlistLoader,a)}},Ea={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:t},excludePlaylist:n}=e,s=t.activeTrack(),a=t.activeGroup(),o=(a.filter(c=>c.default)[0]||a[0]).id,l=t.tracks[o];if(s===l){n({error:{message:"Problem encountered loading the default audio track."}});return}ie.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const c in t.tracks)t.tracks[c].enabled=t.tracks[c]===l;t.onTrackChanged()},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:t}}=e;ie.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=t.activeTrack();n&&(n.mode="disabled"),t.onTrackChanged()}},sh={AUDIO:(r,e,t)=>{if(!e)return;const{tech:n,requestOptions:s,segmentLoaders:{[r]:a}}=t;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",Ea[r](r,t))},SUBTITLES:(r,e,t)=>{const{tech:n,requestOptions:s,segmentLoaders:{[r]:a},mediaTypes:{[r]:o}}=t;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",Ea[r](r,t))}},uE={AUDIO:(r,e)=>{const{vhs:t,sourceType:n,segmentLoaders:{[r]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[r]:{groups:l,tracks:c,logger_:h}},mainPlaylistLoader:m}=e,g=ms(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 k in o[r]){l[k]||(l[k]=[]);for(const T in o[r][k]){let O=o[r][k][T],_;if(g?(h(`AUDIO group '${k}' label '${T}' is a main playlist`),O.isMainPlaylist=!0,_=null):n==="vhs-json"&&O.playlists?_=new Kn(O.playlists[0],t,a):O.resolvedUri?_=new Kn(O.resolvedUri,t,a):O.playlists&&n==="dash"?_=new El(O.playlists[0],t,a,m):_=null,O=st({id:T,playlistLoader:_},O),sh[r](r,O.playlistLoader,e),l[k].push(O),typeof c[T]>"u"){const S=new ie.AudioTrack({id:T,kind:sE(O),enabled:!1,language:O.language,default:O.default,label:T});c[T]=S}}}s.on("error",Ea[r](r,e))},SUBTITLES:(r,e)=>{const{tech:t,vhs:n,sourceType:s,segmentLoaders:{[r]:a},requestOptions:o,main:{mediaGroups:l},mediaTypes:{[r]:{groups:c,tracks:h}},mainPlaylistLoader:m}=e;for(const g in l[r]){c[g]||(c[g]=[]);for(const k in l[r][g]){if(!n.options_.useForcedSubtitles&&l[r][g][k].forced)continue;let T=l[r][g][k],O;if(s==="hls")O=new Kn(T.resolvedUri,n,o);else if(s==="dash"){if(!T.playlists.filter(S=>S.excludeUntil!==1/0).length)return;O=new El(T.playlists[0],n,o,m)}else s==="vhs-json"&&(O=new Kn(T.playlists?T.playlists[0]:T.resolvedUri,n,o));if(T=st({id:k,playlistLoader:O},T),sh[r](r,T.playlistLoader,e),c[g].push(T),typeof h[k]>"u"){const _=t.addRemoteTextTrack({id:k,kind:"subtitles",default:T.default&&T.autoselect,language:T.language,label:k},!1).track;h[k]=_}}}a.on("error",Ea[r](r,e))},"CLOSED-CAPTIONS":(r,e)=>{const{tech:t,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 h=t.options_.vhs&&t.options_.vhs.captionServices||{};let m={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(h[m.instreamId]&&(m=st(m,h[m.instreamId])),m.default===void 0&&delete m.default,s[o].push(st({id:l},c)),typeof a[l]>"u"){const g=t.addRemoteTextTrack({id:m.instreamId,kind:"captions",default:m.default,language:m.language,label:m.label},!1).track;a[l]=g}}}}},np=(r,e)=>{for(let t=0;t<r.length;t++)if(gu(e,r[t])||r[t].playlists&&np(r[t].playlists,e))return!0;return!1},cE=(r,e)=>t=>{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&&ms(e.main))for(let c=0;c<l.length;c++){const h=s[l[c]];if(np(h,a)){o=h;break}}else s.main?o=s.main:l.length===1&&(o=s[l[0]]);return typeof t>"u"?o:t===null||!o?null:o.filter(c=>c.id===t.id)[0]||null},dE={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const n in t)if(t[n].enabled)return t[n];return null},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const n in t)if(t[n].mode==="showing"||t[n].mode==="hidden")return t[n];return null}},hE=(r,{mediaTypes:e})=>()=>{const t=e[r].activeTrack();return t?e[r].activeGroup(t):null},fE=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(h=>{uE[h](h,r)});const{mediaTypes:e,mainPlaylistLoader:t,tech:n,vhs:s,segmentLoaders:{["AUDIO"]:a,main:o}}=r;["AUDIO","SUBTITLES"].forEach(h=>{e[h].activeGroup=cE(h,r),e[h].activeTrack=dE[h](h,r),e[h].onGroupChanged=aE(h,r),e[h].onGroupChanging=oE(h,r),e[h].onTrackChanged=lE(h,r),e[h].getActiveGroup=hE(h,r)});const l=e.AUDIO.activeGroup();if(l){const h=(l.filter(g=>g.default)[0]||l[0]).id;e.AUDIO.tracks[h].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}t.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(h=>e[h].onGroupChanged())}),t.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(h=>e[h].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 h in e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[h])},pE=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:nn,activeTrack:nn,getActiveGroup:nn,onGroupChanged:nn,onTrackChanged:nn,lastTrack_:null,logger_:bi(`MediaGroups[${e}]`)}}),r};class ah{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_=si(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(t=>[t.ID,t])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class mE extends ie.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new ah,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=bi("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const n=t.serverUri||t.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=si(e,n),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const n=e?t:this.getRequestURI(t);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 h=o.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${h} seconds.`),this.startTTLTimeout_(parseInt(h,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(h){const m={errorType:ie.Error.StreamingContentSteeringParserError,error:h};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 t=new W.URL(e),n=new W.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(n.toString())}decodeDataUriManifest_(e){const t=JSON.parse(W.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new W.URL(e),n=this.getPathway(),s=this.getBandwidth_();if(n){const a=`_${this.manifestType_}_pathway`;t.searchParams.set(a,n)}if(s){const a=`_${this.manifestType_}_throughput`;t.searchParams.set(a,s)}return t.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 t=s=>this.excludedSteeringManifestURLs.has(s);if(this.proxyServerUrl_){const s=this.setProxyServerUrl_(e);if(!t(s))return s}const n=this.setSteeringParams_(e);return t(n)?null:n}startTTLTimeout_(e=this.steeringManifest.ttl){const t=e*1e3;this.ttlTimeout_=W.setTimeout(()=>{this.requestSteeringManifest()},t)}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 ah}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(si(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const gE=(r,e)=>{let t=null;return(...n)=>{clearTimeout(t),t=setTimeout(()=>{r.apply(null,n)},e)}},vE=10;let Ji;const _E=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],yE=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},TE=function({currentPlaylist:r,buffered:e,currentTime:t,nextPlaylist:n,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:o,bufferBasedABR:l,log:c}){if(!n)return ie.log.warn("We received no playlist to switch to. Please check your stream."),!1;const h=`allowing switch ${r&&r.id||"null"} -> ${n.id}`;if(!r)return c(`${h} as current playlist is not set`),!0;if(n.id===r.id)return!1;const m=!!Xn(e,t).length;if(!r.endList)return!m&&typeof r.partTargetDuration=="number"?(c(`not ${h} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${h} as current playlist is live`),!0);const g=fu(e,t),k=l?Nt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Nt.MAX_BUFFER_LOW_WATER_LINE;if(o<k)return c(`${h} as duration < max low water line (${o} < ${k})`),!0;const T=n.attributes.BANDWIDTH,O=r.attributes.BANDWIDTH;if(T<O&&(!l||g<a)){let _=`${h} as next bandwidth < current bandwidth (${T} < ${O})`;return l&&(_+=` and forwardBuffer < bufferHighWaterLine (${g} < ${a})`),c(_),!0}if((!l||T>O)&&g>=s){let _=`${h} as forwardBuffer >= bufferLowWaterLine (${g} >= ${s})`;return l&&(_+=` and next bandwidth > current bandwidth (${T} > ${O})`),c(_),!0}return c(`not ${h} as no switching criteria met`),!1};class bE extends ie.EventTarget{constructor(e){super(),this.fastQualityChange_=gE(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:n,tech:s,bandwidth:a,externVhs:o,useCueTags:l,playlistExclusionDuration:c,enableLowInitialPlaylist:h,sourceType:m,cacheEncryptionKeys:g,bufferBasedABR:k,leastPixelDiffSelector:T,captionServices:O,experimentalUseMMS:_}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:S}=e;(S===null||typeof S>"u")&&(S=1/0),Ji=o,this.bufferBasedABR=!!k,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=S,this.enableLowInitialPlaylist=h,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:S,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=pE(),_&&W.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new W.ManagedMediaSource,this.usingManagedMediaSource_=!0,ie.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_=Ot(),this.hasPlayed_=!1,this.syncController_=new tE(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new rE,this.sourceUpdater_=new ep(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new iE,this.keyStatusMap_=new Map;const R={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:O,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth: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 El(t,this.vhs_,st(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Kn(t,this.vhs_,st(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new wl(st(R,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new wl(st(R,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new K5(st(R,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((j,M)=>{function P(){s.off("vttjserror",N),j()}function N(){s.off("vttjsloaded",P),M()}s.one("vttjsloaded",P),s.one("vttjserror",N),s.addWebVttScript_()})}),e);const L=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new mE(this.vhs_.xhr,L),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),_E.forEach(j=>{this[j+"_"]=yE.bind(this,j)}),this.logger_=bi("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const I=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(I,()=>{const j=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-j,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return e===-1||t===-1?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,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 ${t}`);const l={renditionInfo:{id:o,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:l}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,n)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const t=this.mediaTypes_[e],n=t?t.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(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;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 t;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 h=0;h<e.playlists.length;h++){const m=e.playlists[h];m.attributes&&m.attributes.AUDIO&&m.attributes.AUDIO===l&&o.push(m)}}return o.length?o:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const t=this.mainPlaylistLoader_.media(),n=t.targetDuration*1.5*1e3;yl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,t.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.mainSegmentLoader_.load()),fE({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),t),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 t=this.mainPlaylistLoader_.media();if(!t){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;t=this.initialMedia_}this.handleUpdatedMediaPlaylist(t)}),this.mainPlaylistLoader_.on("error",()=>{const t=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:t.playlist,error:t})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const t=this.mainPlaylistLoader_.media(),n=t.targetDuration*1.5*1e3;yl(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(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const t=this.mainPlaylistLoader_.media();if(t.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(t)&&(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(t=>{this.mainPlaylistLoader_.on(t,n=>{this.player_.trigger(xt({},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,t){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"}),Ji.Playlist.isAes(t)&&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 t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),s=this.bufferLowWaterLine(),a=this.bufferHighWaterLine(),o=this.tech_.buffered();return TE({buffered:o,currentTime:n,currentPlaylist:t,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:vE}))});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(xt({},s))}),this.audioSegmentLoader_.on(n,s=>{this.player_.trigger(xt({},s))}),this.subtitleSegmentLoader_.on(n,s=>{this.player_.trigger(xt({},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 t=this.seekable();if(!t.length)return!1;const n=t.end(0);let s=n;if(e.start){const a=e.start.timeOffset;if(a<0){const o=this.mainPlaylistLoader_.main,l=Ji.Playlist.liveEdgeDelay(o,e),c=n+l;s=Math.max(Math.min(c+a,n),t.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,t=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();!t||t.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=Ji.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:t={},playlistExclusionDuration:n}){if(e=e||this.mainPlaylistLoader_.media(),n=n||t.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=t,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,a=s.filter(Ya),o=a.length===1&&a[0]===e;if(s.length===1&&n!==1/0)return ie.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 O=this.pathwayAttribute_(e),_=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(O),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(O)},_);return}let T=!1;s.forEach(O=>{if(O===e)return;const _=O.excludeUntil;typeof _<"u"&&_!==1/0&&(T=!0,delete O.excludeUntil)}),T&&(ie.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,t.reason&&(e.lastExcludeReason_=t.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 h=t.internal?this.logger_:ie.log.warn,m=t.message?" "+t.message:"";h(`${t.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,k=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=g;return this.switchMedia_(c,"exclude",o||k)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){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=>t.forEach(l=>{typeof o[l]=="function"&&o[l]()}))}setCurrentTime(e){const t=Xn(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(t&&t.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:Ji.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const n=e.media();if(!n)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const l=s.start,c=s.end;if(!isFinite(l)||!isFinite(c))return null;const h=Ji.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n),m=Math.max(l,c-h);return Ot([[l,m]])}const a=this.syncController_.getExpiredTime(n,this.duration());if(a===null)return null;const o=Ji.Playlist.seekable(n,a,Ji.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return o.length?o:null}computeFinalSeekable_(e,t){if(!t)return e;const n=e.start(0),s=e.end(0),a=t.start(0),o=t.end(0);return a>s||n>o?e:Ot([[Math.max(n,a),Math.min(s,o)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!t))return;const n=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!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 [${ff(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 t=this.tech_.buffered();let n=Ji.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(n=Math.max(n,t.end(t.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 t=this.mediaTypes_[e].groups;for(const n in t)t[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,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!t||!n)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const n=ns(this.main(),t),s={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=n.video||e.main.videoCodec||u4),e.main.isMuxed&&(s.video+=`,${n.audio||e.main.audioCodec||Xc}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(s.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||Xc,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video){this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const o=(h,m)=>h?Zr(m,this.usingManagedMediaSource_):Oo(m),l={};let c;if(["video","audio"].forEach(function(h){if(s.hasOwnProperty(h)&&!o(e[h].isFmp4,s[h])){const m=e[h].isFmp4?"browser":"muxer";l[m]=l[m]||[],l[m].push(s[h]),h==="audio"&&(c=m)}}),a&&c&&t.attributes.AUDIO){const h=t.attributes.AUDIO;this.main().playlists.forEach(m=>{(m.attributes&&m.attributes.AUDIO)===h&&m!==t&&(m.excludeUntil=1/0)}),this.logger_(`excluding audio group ${h} as ${c} does not support codec(s): "${s.audio}"`)}if(Object.keys(l).length){const h=Object.keys(l).reduce((m,g)=>(m&&(m+=", "),m+=`${g} does not support codec(s): "${l[g].join(",")}"`,m),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:h},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const h=[];if(["video","audio"].forEach(m=>{const g=(Fi(this.sourceUpdater_.codecs[m]||"")[0]||{}).type,k=(Fi(s[m]||"")[0]||{}).type;g&&k&&g.toLowerCase()!==k.toLowerCase()&&h.push(`"${this.sourceUpdater_.codecs[m]}" -> "${s[m]}"`)}),h.length){this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${h.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 t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(n=>{const s=e[n];if(t.indexOf(s.id)!==-1)return;t.push(s.id);const a=ns(this.main,s),o=[];a.audio&&!Oo(a.audio)&&!Zr(a.audio,this.usingManagedMediaSource_)&&o.push(`audio codec ${a.audio}`),a.video&&!Oo(a.video)&&!Zr(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 t=[],n=this.main().playlists,s=us(Fi(e)),a=qd(s),o=s.video&&Fi(s.video)[0]||null,l=s.audio&&Fi(s.audio)[0]||null;Object.keys(n).forEach(c=>{const h=n[c];if(t.indexOf(h.id)!==-1||h.excludeUntil===1/0)return;t.push(h.id);const m=[],g=ns(this.mainPlaylistLoader_.main,h),k=qd(g);if(!(!g.audio&&!g.video)){if(k!==a&&m.push(`codec count "${k}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const T=g.video&&Fi(g.video)[0]||null,O=g.audio&&Fi(g.audio)[0]||null;T&&o&&T.type.toLowerCase()!==o.type.toLowerCase()&&m.push(`video codec "${T.type}" !== "${o.type}"`),O&&l&&O.type.toLowerCase()!==l.type.toLowerCase()&&m.push(`audio codec "${O.type}" !== "${l.type}"`)}m.length&&(h.excludeUntil=1/0,this.logger_(`excluding ${h.id}: ${m.join(" && ")}`))}})}updateAdCues_(e){let t=0;const n=this.seekable();n.length&&(t=n.start(0)),Z5(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Nt.GOAL_BUFFER_LENGTH,n=Nt.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Nt.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Nt.BUFFER_LOW_WATER_LINE,n=Nt.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Nt.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(t,Nt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.bufferBasedABR?a:s)}bufferHighWaterLine(){return Nt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Kd(this.inbandTextTracks_,"com.apple.streaming",this.tech_),I5({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,n){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Kd(this.inbandTextTracks_,e,this.tech_),D5({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:n})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));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(t=>{this.contentSteeringController_.on(t,n=>{this.trigger(xt({},n))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const t=this.main();(this.contentSteeringController_.didDASHTagChange(t.uri,t.contentSteering)||(()=>{const a=this.contentSteeringController_.getAvailablePathways(),o=[];for(const l of t.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),h=c&&e!==c;l.excludeUntil===1/0&&l.lastExcludeReason_==="content-steering"&&!h&&(delete l.excludeUntil,delete l.lastExcludeReason_,a=!0);const g=!l.excludeUntil&&l.excludeUntil!==1/0;!s.has(l.id)&&h&&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 t=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){t.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,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const n=e["URI-REPLACEMENT"].PARAMS,s=t["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 t="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_===t&&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_!==t&&(n.excludeUntil=1/0,n.lastExcludeReason_=t,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_===t;s&&a&&(delete n.excludeUntil,ie.log.warn(`enabling non-HD playlist ${n.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const a=(typeof e=="string"?e:Y5(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${a} added to the keyStatusMap`),this.keyStatusMap_.set(a,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const xE=(r,e,t)=>n=>{const s=r.main.playlists[e],a=mu(s),o=Ya(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?(t(s),r.trigger({type:"renditionenabled",metadata:l})):r.trigger({type:"renditiondisabled",metadata:l})),n};class CE{constructor(e,t,n){const{playlistController_:s}=e,a=s.fastQualityChange_.bind(s);if(t.attributes){const o=t.attributes.RESOLUTION;this.width=o&&o.width,this.height=o&&o.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=ns(s.main(),t),this.playlist=t,this.id=n,this.enabled=xE(e.playlists,t.id,a)}}const EE=function(r){r.representations=()=>{const e=r.playlistController_.main(),t=ms(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return t?t.filter(n=>!mu(n)).map((n,s)=>new CE(r,n,n.id)):[]}},oh=["seeking","seeked","pause","playing","error"];class SE extends ie.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=bi("PlaybackWatcher"),this.logger_("initialize");const t=()=>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 h=m=>{["main","audio"].forEach(g=>{o[`${g}SegmentLoader_`][m]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),h("off"))},this.clearSeekingAppendCheck_=()=>h("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),h("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(oh,a),this.tech_.on("canplay",n),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(oh,a),this.tech_.off("canplay",n),this.tech_.off("play",t),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 t=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_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,n=t[`${e}SegmentLoader_`],s=n.buffered_(),a=cC(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,a){const o={bufferedRanges:s};t.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:In(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"&&t.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(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Hi>=t.end(t.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(Ot([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 t=this.seekable(),n=this.tech_.currentTime(),s=this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let a;if(s&&(a=t.end(t.length-1)),this.beforeSeekableWindow_(t,n)){const O=t.start(0);a=O+(O===t.end(0)?0:Hi)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${n} with seekable range ${ff(t)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const o=this.playlistController_.sourceUpdater_,l=this.tech_.buffered(),c=o.audioBuffer?o.audioBuffered():null,h=o.videoBuffer?o.videoBuffered():null,m=this.media(),g=m.partTargetDuration?m.partTargetDuration:(m.targetDuration-qi)*2,k=[c,h];for(let O=0;O<k.length;O++){if(!k[O])continue;if(fu(k[O],n)<g)return!1}const T=zs(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(),t=this.tech_.buffered(),n=Xn(t,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(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const l=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. 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:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const o=zs(s,t);return o.length>0?(this.logger_(`Stopped at ${t} and seeking to ${o.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0):!1}afterSeekableWindow_(e,t,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),t>a}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:n}){if(!e)return;let s;if(e.length&&t.length){const a=Xn(e,n-3),o=Xn(e,n),l=Xn(t,n);l.length&&!o.length&&a.length&&(s={start:a.end(0),end:l.end(0)})}else zs(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 t=this.tech_.buffered(),n=this.tech_.currentTime(),s=zs(t,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)+qi);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,t){const n=oC(e);for(let s=0;s<n.length;s++){const a=n.start(s),o=n.end(s);if(t-a<4&&t-a>2)return{start:a,end:o}}return null}}const kE={errorInterval:30,getSource(r){const t=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(t)}},rp=function(r,e){let t=0,n=0;const s=st(kE,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()-t<s.errorInterval*1e3){r.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!s.getSource||typeof s.getSource!="function"){ie.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return t=Date.now(),s.getSource.call(r,o)},c=function(){r.off("loadedmetadata",a),r.off("error",l),r.off("dispose",c)},h=function(m){c(),rp(r,m)};r.on("error",l),r.on("dispose",c),r.reloadSourceOnError=h},wE=function(r){rp(this,r)};var sp="3.17.3",DE="7.1.0",AE="1.3.1",NE="7.2.0",IE="4.0.2";const pt={PlaylistLoader:Kn,Playlist:ai,utils:PC,STANDARD_PLAYLIST_SELECTOR:Xd,INITIAL_PLAYLIST_SELECTOR:C5,lastBandwidthSelector:Xd,movingAverageBandwidthSelector:b5,comparePlaylistBandwidth:_u,comparePlaylistResolution:T5,xhr:Of()};Object.keys(Nt).forEach(r=>{Object.defineProperty(pt,r,{get(){return ie.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Nt[r]},set(e){if(ie.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){ie.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Nt[r]=e}})});const ap="videojs-vhs",op=function(r,e){const t=e.media();let n=-1;for(let s=0;s<r.length;s++)if(r[s].id===t.id){n=s;break}r.selectedIndex_=n,r.trigger({selectedIndex:n,type:"change"})},OE=function(r,e){e.representations().forEach(t=>{r.addQualityLevel(t)}),op(r,e.playlists)};pt.canPlaySource=function(){return ie.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const BE=(r,e,t)=>{if(!r)return r;let n={};e&&e.attributes&&e.attributes.CODECS&&(n=us(Fi(e.attributes.CODECS))),t&&t.attributes&&t.attributes.CODECS&&(n.audio=t.attributes.CODECS);const s=or(n.video),a=or(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 st(r,o)},LE=(r,e)=>r.reduce((t,n)=>{if(!n.contentProtection)return t;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&&t.push(s),t},[]),ME=({player:r,sourceKeySystems:e,audioMedia:t,mainPlaylists:n})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const s=t?n.concat([t]):n,a=LE(s,Object.keys(e)),o=[],l=[];return a.forEach(c=>{l.push(new Promise((h,m)=>{r.tech_.one("keysessioncreated",h)})),o.push(new Promise((h,m)=>{r.eme.initializeMediaKeys({keySystems:c},g=>{if(g){m(g);return}h()})}))}),Promise.race([Promise.all(o),Promise.race(l)])},PE=({player:r,sourceKeySystems:e,media:t,audioMedia:n})=>{const s=BE(e,t,n);return s?(r.currentSource().keySystems=s,s&&!r.eme?(ie.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},lp=()=>{if(!W.localStorage)return null;const r=W.localStorage.getItem(ap);if(!r)return null;try{return JSON.parse(r)}catch{return null}},RE=r=>{if(!W.localStorage)return!1;let e=lp();e=e?st(e,r):r;try{W.localStorage.setItem(ap,JSON.stringify(e))}catch{return!1}return e},VE=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,up=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},cp=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},dp=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},hp=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};pt.supportsNativeHls=(function(){if(!ve||!ve.createElement)return!1;const r=ve.createElement("video");return ie.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(r.canPlayType(t))}):!1})();pt.supportsNativeDash=(function(){return!ve||!ve.createElement||!ie.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(ve.createElement("video").canPlayType("application/dash+xml"))})();pt.supportsTypeNatively=r=>r==="hls"?pt.supportsNativeHls:r==="dash"?pt.supportsNativeDash:!1;pt.isSupported=function(){return ie.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};pt.xhr.onRequest=function(r){up(pt.xhr,r)};pt.xhr.onResponse=function(r){cp(pt.xhr,r)};pt.xhr.offRequest=function(r){dp(pt.xhr,r)};pt.xhr.offResponse=function(r){hp(pt.xhr,r)};const FE=ie.getComponent("Component");class fp extends FE{constructor(e,t,n){if(super(t,n.vhs),typeof n.initialBandwidth=="number"&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=bi("VhsHandler"),t.options_&&t.options_.playerId){const s=ie.getPlayer(t.options_.playerId);this.player_=s}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(ve,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=>{const a=ve.fullscreenElement||ve.webkitFullscreenElement||ve.mozFullScreenElement||ve.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_=st(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const n=lp();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=Nt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Nt.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 t=this.options_.customPixelRatio;typeof t=="number"&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=VE(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=pt,this.options_.sourceType=Bh(t),this.options_.seekTo=a=>{this.tech_.setCurrentTime(a)},this.options_.player_=this.player_,this.playlistController_=new bE(this.options_);const n=st({liveRangeSafeTimeDelta:Hi},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new SE(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=ie.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?pt.movingAverageBandwidthSelector(.55):pt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=pt.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(){ie.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>In(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>In(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&RE({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{EE(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=W.URL.createObjectURL(this.playlistController_.mediaSource),(ie.browser.IS_ANY_SAFARI||ie.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"),ME({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(t=>{this.logger_("error while creating EME key session",t),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,t=PE({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_),!t){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=ie.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{OE(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{op(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":sp,"mux.js":DE,"mpd-parser":AE,"m3u8-parser":NE,"aes-decrypter":IE}}version(){return this.constructor.version()}canChangeType(){return ep.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,t){return HC({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,n=!0,s=2){return Rf({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{up(this.xhr,e)},this.xhr.onResponse=e=>{cp(this.xhr,e)},this.xhr.offRequest=e=>{dp(this.xhr,e)},this.xhr.offResponse=e=>{hp(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],t=["gapjumped","playedrangeschanged"];e.forEach(n=>{this.playlistController_.on(n,s=>{this.player_.trigger(xt({},s))})}),t.forEach(n=>{this.playbackWatcher_.on(n,s=>{this.player_.trigger(xt({},s))})})}}const Sa={name:"videojs-http-streaming",VERSION:sp,canHandleSource(r,e={}){const t=st(ie.options,e);return!t.vhs.experimentalUseMMS&&!Zr("avc1.4d400d,mp4a.40.2",!1)?!1:Sa.canPlayType(r.type,t)},handleSource(r,e,t={}){const n=st(ie.options,t);return e.vhs=new fp(r,e,n),e.vhs.xhr=Of(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const t=Bh(r);if(!t)return"";const n=Sa.getOverrideNative(e);return!pt.supportsTypeNatively(t)||n?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,t=!(ie.browser.IS_ANY_SAFARI||ie.browser.IS_IOS),{overrideNative:n=t}=e;return n}},$E=()=>Zr("avc1.4d400d,mp4a.40.2",!0);$E()&&ie.getTech("Html5").registerSourceHandler(Sa,0);ie.VhsHandler=fp;ie.VhsSourceHandler=Sa;ie.Vhs=pt;ie.use||ie.registerComponent("Vhs",pt);ie.options.vhs=ie.options.vhs||{};(!ie.getPlugin||!ie.getPlugin("reloadSourceOnError"))&&ie.registerPlugin("reloadSourceOnError",wE);const UE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4AQMAAADSHVMAAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAASYSURBVHic7c8BDQAgDMAw7t80Lk5SVgXbnM/M64BtDesa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNay7Fz0EOVPDeGwAAAAASUVORK5CYII=",qE={class:"o-meeting-playback-video"},HE={key:0,class:"poster-title"},jE=i.defineComponent({__name:"OMeetingPlaybackVideo",props:{src:{default:""},vtt:{default:""},captions:{default:()=>[]},poster:{},posterTitle:{},instance:{},trackIdx:{}},emits:["getDuration","getInstance","setTrackIdx"],setup(r,{expose:e,emit:t}){const n=r,s=i.ref(),a=i.ref(),o=i.ref(),l=t,c=i.ref(!1),h=()=>{c.value=!1},m=(_,S=!1)=>{var I,j;const R=n.instance;if(!R)return;const L=(I=_.activeCues)==null?void 0:I[0];if(s.value&&clearInterval(s.value),L){L.text=((j=L==null?void 0:L.text)==null?void 0:j.replace(/\[(SPEAKER_)\d+]: /g,""))||"";const M=L.text.split(`
224
- `),P=M.length,N=L.endTime-L.startTime,X=parseFloat((N/P).toFixed(3));let b=0;if(S){const U=(R.currentTime()-L.startTime)/(L.endTime-L.startTime);for(;(b+1)/P<U;)b++}b<P?L.text=M.length?M[b]:L==null?void 0:L.text:L.text=M.length?M[0]:L==null?void 0:L.text;let C=X*1e3;const $=()=>{s.value=setInterval(()=>{_.mode="hidden",b++,b>M.length-1?clearInterval(s.value):b===M.length-1?(L.text=M[b],clearInterval(s.value),C=X*(P-b)*1e3,$()):L.text=M[b],_.mode="showing"},C)};$()}},g=i.ref([]);i.watch(()=>g.value,_=>{const S=n.instance;if(S){const R=S.textTracks();for(let L=0;L<R.length;L++)R[L].kind==="subtitles"&&(m(R[L],!0),R[L].mode=_.length?"showing":"hidden")}},{deep:!0});const k=i.ref(!1),T=i.ref("init"),O=async()=>{if(!n.src)return;const _=ie("playerId",{controls:!0,autoplay:!1,preload:"auto",fluid:!0,poster:n.poster||UE,playbackRates:[.5,.75,1,1.25,1.5,2],controlBar:{skipButtons:{backward:5,forward:5},children:{playToggle:!0,SkipBackward:{backward:5},skipForward:{forward:5},currentTimeDisplay:!0,timeDivider:!0,durationDisplay:!0,progressControl:!0,PlaybackRateMenuButton:!0,volumePanel:{inline:!1},FullscreenToggle:!0}}});l("getInstance",_),_.src(n.src),_.addRemoteTextTrack({kind:"subtitles",src:n.vtt,srclang:"zh",label:"中文",default:!1}),k.value=!0;class S extends ie.getComponent("Button"){constructor(I,j){super(I,j),this.addClass("vjs-subtitle-toggle-button","vjs-subtitle-hidden"),this.controlText("Toggle Subtitles")}buildCSSClass(){return`vjs-subtitle-toggle-button ${super.buildCSSClass()}`}handleClick(){const I=this.player().textTracks();for(let j=0;j<I.length;j++)I[j].kind==="subtitles"&&(m(I[j],!0),I[j].mode=I[j].mode==="showing"?"hidden":"showing",I[j].mode==="showing"?(this.removeClass("vjs-subtitle-hidden"),this.addClass("vjs-subtitle-showing")):(this.removeClass("vjs-subtitle-showing"),this.addClass("vjs-subtitle-hidden")))}}n.vtt&&(ie.registerComponent("SubtitleToggleButton",S),_.controlBar.children_.some(L=>L.name_==="SubtitleToggleButton")||_.controlBar.addChild("SubtitleToggleButton",{},8)),(_==null?void 0:_.textTracks().tracks_).forEach(L=>{L==null||L.addEventListener("cuechange",()=>{m(L)})}),_.on("play",()=>{T.value="playing"}),_.on("timeupdate",()=>{const L=_.currentTime()||0,I=n.captions.findIndex(j=>il(j.start_time)>L);l("setTrackIdx",I)}),_.one("loadedmetadata",()=>{l("getDuration",_.duration())}),i.nextTick(()=>{const L=document.getElementsByClassName("o-meeting-playback-video")[0];a.value=L.offsetHeight}),o.value=_};return i.onMounted(()=>{O(),document.addEventListener("click",h)}),i.watch(()=>n.src,()=>{O()}),i.onUnmounted(()=>{var _;(_=n==null?void 0:n.instance)==null||_.dispose(),document.removeEventListener("click",h)}),e({changeTime:_=>{var S;(S=o.value)==null||S.currentTime(_)}}),(_,S)=>(i.openBlock(),i.createElementBlock("div",qE,[i.createElementVNode("div",{class:i.normalizeClass(["video-placeholder",{loaded:k.value,"no-poster":!r.poster,[T.value]:!0}])},[S[0]||(S[0]=i.createElementVNode("video",{class:"video-js",id:"playerId"},null,-1)),r.posterTitle?(i.openBlock(),i.createElementBlock("div",HE,i.toDisplayString(r.posterTitle),1)):i.createCommentVNode("",!0)],2)]))}}),zE={class:"o-meeting-playback"},GE={class:"video-header"},WE={class:"video-title"},YE={class:"video-content"},XE={class:"info-wrapper"},KE={class:"tab-content"},QE={key:0,class:"base-info"},ZE={class:"info-item"},JE={class:"info-item"},eS={class:"info-item"},tS={class:"info-item"},iS={key:1,class:"subject-list"},nS={class:"subject-title"},rS={key:0,class:"subject-progress"},sS=["data-start","data-end"],lh=i.defineComponent({__name:"OMeetingPlayback",props:{dates:{default:()=>[]},detail:{default:()=>({})},data:{default:()=>({})}},emits:["change-date"],setup(r,{emit:e}){const t=r,n=e,{t:s}=He.useI18n(),a=i.ref(null),o=q=>{a.value=q},l=i.ref(0),c=q=>{l.value=q},h=i.ref([]),m=async q=>{const Q=await(await fetch(q)).json();h.value=(Q.segments||[]).map(J=>{const re=Uv(J.speaker);return{...J,contentHtml:J.content,speakerIdx:re,speakerLabel:`${s("meeting.speaker")}${re}`}})},g=i.ref([]),k=q=>G2[q%3],T=i.ref(0),O=q=>{T.value=q},_=i.ref(),S=i.ref(""),R=i.ref([0,0]);function L(q,H){const Q=H.getBoundingClientRect(),re=(q.clientX-Q.left)/Q.width;return R.value[1]=`${H.offsetTop+H.parentElement.offsetTop}px`,R.value[0]=`${re*100}%`,re*T.value}const I=q=>{let H=q;for(;H&&H.className!=="subject-progress";)H=H.parentElement;return H},j=q=>{let H=I(q.target);H&&(S.value=qv(L(q,H)))},M=()=>{S.value=""},P=q=>{var Q;let H=I(q.target);H&&((Q=_.value)==null||Q.changeTime(L(q,H)))},N=async q=>{const Q=await(await fetch(q)).json();g.value=(Q||[]).map(J=>({...J,startTime:il(J.startTime),endTime:il(J.endTime)}))},X=i.ref("info"),b=i.computed(()=>{const q=[{label:s("meeting.baseInfo"),value:"info"}];return g.value.length&&q.push({label:s("meeting.subject"),value:"subject"}),q}),C=()=>{t.data&&(t.data.textJson&&m(t.data.textJson),t.data.topicJson&&N(t.data.topicJson))};i.watchEffect(()=>{C()});const $=q=>{n("change-date",q)},U=i.ref(null),E=i.ref("auto");let w=null,F=null;const G=()=>{U.value&&(E.value=`${U.value.offsetHeight}px`)},Z=()=>{cancelAnimationFrame(F),F=requestAnimationFrame(G)};return i.onMounted(()=>{U.value&&(w=new ResizeObserver(Z),w.observe(U.value),G())}),i.onUnmounted(()=>{cancelAnimationFrame(F),w==null||w.disconnect()}),(q,H)=>{var Q,J,re,de,Ce;return i.openBlock(),i.createElementBlock("div",zE,[i.createElementVNode("div",{class:"left-card card-wrapper",ref_key:"leftRef",ref:U},[i.createElementVNode("div",GE,[i.createElementVNode("div",WE,i.toDisplayString((Q=r.detail)==null?void 0:Q.topic)+"("+i.toDisplayString((J=r.detail)==null?void 0:J.date)+")",1),(re=r.dates)!=null&&re.length?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",clearable:!1,"model-value":(de=r.detail)==null?void 0:de.date,placeholder:i.unref(s)("meeting.selectDate"),onChange:$},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.dates,le=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:le,value:le,label:le},null,8,["value","label"]))),128))]),_:1},8,["model-value","placeholder"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",YE,[r.data?(i.openBlock(),i.createBlock(jE,{key:0,ref_key:"playerRef",ref:_,src:r.data.video,vtt:r.data.textVtt,poster:r.data.poster,captions:h.value,onGetDuration:O,instance:a.value,onGetInstance:o,trackIdx:l.value,onSetTrackIdx:c},null,8,["src","vtt","poster","captions","instance","trackIdx"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",XE,[i.createVNode(i.unref(A.OTab),{modelValue:X.value,"onUpdate:modelValue":H[0]||(H[0]=le=>X.value=le)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value,le=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:le.value,value:le.value,label:le.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]),i.createElementVNode("div",KE,[X.value===b.value[0].value?(i.openBlock(),i.createElementBlock("div",QE,[i.createElementVNode("div",ZE,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item1")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.sponsor),1)]),i.createElementVNode("div",JE,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item2")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.groupName),1)]),i.createElementVNode("div",eS,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item3")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.date)+"  "+i.toDisplayString(r.detail.start)+"~"+i.toDisplayString(r.detail.end),1)]),i.createElementVNode("div",tS,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item4")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.agenda||"-"),1)])])):i.createCommentVNode("",!0),X.value===((Ce=b.value[1])==null?void 0:Ce.value)?(i.openBlock(),i.createElementBlock("div",iS,[S.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"mouse-current-time",style:i.normalizeStyle({top:R.value[1],left:R.value[0]})},i.toDisplayString(S.value),5)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.value,(le,$e)=>(i.openBlock(),i.createElementBlock("div",{class:"subject-item",key:le.title},[i.createElementVNode("div",nS,i.toDisplayString(le.title),1),T.value?(i.openBlock(),i.createElementBlock("div",rS,[i.createElementVNode("div",{class:"subject-progress-item",onClick:P,onMousemove:j,onMouseleave:M,"data-start":le.startTime,"data-end":le.endTime,style:i.normalizeStyle({"--start":(le.startTime<0?0:le.startTime)/T.value,"--end":(le.endTime>T.value?T.value:le.endTime)/T.value,background:k($e)})},null,44,sS)])):i.createCommentVNode("",!0)]))),128))])):i.createCommentVNode("",!0)])])],512),i.createElementVNode("div",{class:"right-card card-wrapper",style:i.normalizeStyle({height:E.value})},[i.createVNode(Mb,{captions:h.value,trackIdx:l.value,instance:a.value},null,8,["captions","trackIdx","instance"])],4)])}}}),aS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function oS(r,e){return i.openBlock(),i.createElementBlock("svg",aS,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M12.032 2.355c1.632 0 3.205 0.404 4.611 1.166 0.34 0.182 0.466 0.609 0.281 0.949s-0.609 0.463-0.949 0.281c-1.201-0.65-2.546-0.996-3.943-0.996-4.585 0-8.3 3.715-8.3 8.297 0 4.588 3.715 8.303 8.3 8.303s8.3-3.715 8.3-8.303c0-2.063-0.753-4.002-2.098-5.514-0.258-0.287-0.231-0.732 0.059-0.984 0.287-0.258 0.729-0.234 0.987 0.053 1.57 1.764 2.452 4.037 2.452 6.445 0 5.361-4.342 9.703-9.7 9.703s-9.7-4.342-9.7-9.703c0-5.355 4.342-9.697 9.7-9.697zM10.866 7.658c0-0.627 0.507-1.131 1.134-1.131s1.134 0.504 1.134 1.131c0 0.627-0.507 1.131-1.134 1.131s-1.134-0.504-1.134-1.131zM12.706 10.002c-0.044-0.346-0.337-0.609-0.691-0.609-0.387 0-0.7 0.311-0.703 0.697l-0.023 6.762 0.006 0.1c0.044 0.34 0.337 0.603 0.691 0.603 0.387 0.006 0.7-0.311 0.703-0.697l0.023-6.762-0.006-0.094z"},null,-1)])])}const lS={name:"components-icon-tips",render:oS},uS={class:"o-sig-meeting-aside"},cS={class:"month"},dS={class:"days"},hS=["onClick"],fS={class:"day-d"},pS={class:"day-c"},mS={class:"arrow-wrapper"},Ys=1,gS=i.defineComponent({__name:"OSigMeetingAside",props:{data:{},current:{},total:{},active:{},meetingDates:{},eventsDates:{}},emits:["click-date","change-month"],setup(r,{emit:e}){const t=r,n=e,s=o=>{n("click-date",o)},a=o=>{t.current+o>=t.total||t.current+o<0||n("change-month",o)};return(o,l)=>(i.openBlock(),i.createElementBlock("div",uS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(c,h)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:h},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c,m=>(i.openBlock(),i.createElementBlock("div",{key:m.month,class:"month-item"},[i.createElementVNode("div",cS,i.toDisplayString(m.month.replace(/-/g,"/")),1),i.createElementVNode("div",dS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.days,g=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-item",r.active===`${m.month}-${g}`&&"active"]),key:g,onClick:k=>s(`${m.month}-${g}`)},[i.createElementVNode("div",fS,i.toDisplayString(g),1),i.createElementVNode("div",pS,[r.meetingDates.includes(`${m.month}-${g}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).MEETING,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).MEETING,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(ri)(i.unref(Ve).MEETING,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0),r.eventsDates.includes(`${m.month}-${g}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).EVENTS,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).EVENTS,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(ri)(i.unref(Ve).EVENTS,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0)])],10,hS))),128))])]))),128))],64))),128)),i.createElementVNode("div",mS,[i.createVNode(i.unref(A.OIcon),{onClick:l[0]||(l[0]=c=>a(0-Ys)),class:i.normalizeClass(r.current-Ys<0&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1},8,["class"]),i.createVNode(i.unref(A.OIcon),{onClick:l[1]||(l[1]=c=>a(Ys)),class:i.normalizeClass(r.current+Ys>=r.total&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1},8,["class"])])]))}}),vS={class:"o-sig-meeting-calendar"},_S={key:0,class:"meeting-card-header"},yS={key:0,class:"header-left"},TS={key:1,class:"date-select"},bS={class:"meeting-card-content"},xS={class:"list-content"},uh=i.defineComponent({__name:"OSigMeetingCalendar",props:{sigName:{},getMeetingListRequest:{},getDateListRequest:{},getEventsListRequest:{},dates:{}},setup(r){const e=r,{t}=He.useI18n(),{lePadV:n}=Ct.useScreen(),s=i.ref(""),a=i.ref(!1),o=i.ref([]),l=i.computed(()=>n.value?100:5),c=i.ref(""),h=i.ref([]),m=i.ref([]),g=i.ref([]),k=i.ref(-1),T=C=>{_(C)},O=C=>{_(C)},_=async C=>{if(e.getMeetingListRequest)try{a.value=!0,s.value=Te(C).format("YYYY-MM-DD");const $=await e.getMeetingListRequest(s.value,e.sigName);o.value=$.map(U=>({...U,time:`${U.start}-${U.end}`,date:U.date||s.value,type:Ve.MEETING}))}finally{a.value=!1,g.value.forEach($=>{$.dates.includes(s.value)&&o.value.push($)})}},S=async()=>{e.getDateListRequest&&(h.value=await e.getDateListRequest()),e.getEventsListRequest&&(g.value=await e.getEventsListRequest(),m.value=(g.value||[]).map(C=>C.dates).flat())},R=i.ref(Ve.ALL),L=()=>{S()};i.watch(()=>n.value,()=>{n.value&&L(Ve.ALL)});const I=C=>{const $=Te(C).format("YYYY-MM-DD");return[$.slice(0,7),$.slice(8,10)]},j=i.computed(()=>{let C=[];return R.value===Ve.ALL?C=[...h.value||[],...m.value]:R.value===Ve.MEETING?C=h.value||[]:C=m.value,[...new Set(C)].sort(($,U)=>Te($).isAfter(Te(U))?1:-1).map($=>Te($).format("YYYY-MM-DD"))}),M=()=>{let C=j.value.find($=>$===Te().format("YYYY-MM-DD"));C||(C=j.value.find($=>Te($).isAfter(Te()))||[...j.value].reverse().find($=>Te().isAfter(Te($)))),c.value=C};i.watch(()=>j.value,C=>{C.length&&(M(),i.nextTick(()=>{_(c.value)}))});const P=i.computed(()=>{const C=j.value.reduce((w,F)=>{var q,H;const[G,Z]=I(F);return w[G]={count:(((q=w[G])==null?void 0:q.count)||0)+1,days:[...((H=w[G])==null?void 0:H.days)||[],Z]},w},{}),$=Object.keys(C).map(w=>({...C[w],month:w})),U=[];let E=[];return $.forEach(w=>{for(;w.days.length;)if(!E.length)w.days.splice(0,6).forEach(F=>{E.push({month:w.month,day:F})}),E.length>=5&&(U.push(E),E=[]);else{let F=E.length;F%2===1&&(F+=1),w.days.length+E.length<=6?(w.days.splice(0,6).forEach(G=>{E.push({month:w.month,day:G})}),E.length>=5&&(U.push(E),E=[])):(w.days.splice(0,6-F).forEach(G=>{E.push({month:w.month,day:G})}),E.length>=5&&(U.push(E),E=[]))}}),E.length&&(U.push(E),E=[]),U}),N=i.computed(()=>P.value.map(C=>{const $=C.reduce((U,E)=>(U[E.month]=U[E.month]||[],U[E.month].push(E.day),U),{});return Object.keys($).map(U=>({month:U,days:$[U]||[]}))})),X=()=>{P.value.length?(k.value=P.value.findIndex(C=>C.some($=>c.value===`${$.month}-${$.day}`)),k.value===-1&&(k.value=P.value.findIndex(C=>C.some($=>c.value.includes($.month))))):k.value=-1};i.watch([()=>P.value,()=>c.value],()=>{X()},{deep:!0});const b=C=>{k.value+=C};return i.onMounted(()=>{S()}),(C,$)=>{const U=i.resolveComponent("ElOption"),E=i.resolveComponent("ElSelect");return i.openBlock(),i.createElementBlock("div",vS,[i.unref(n)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",_S,[c.value?(i.openBlock(),i.createElementBlock("div",yS,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("meeting.latestMeeting")),1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(c.value).format("YYYY/MM/DD")),1),i.createVNode(i.unref(A.OPopover),null,{target:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"tips"},{default:i.withCtx(()=>[i.createVNode(i.unref(lS))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",null,[i.createElementVNode("p",null,i.toDisplayString(i.unref(t)("meeting.detailHalfYearMeetings")),1)])]),_:1})])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OTab),{modelValue:R.value,"onUpdate:modelValue":$[0]||($[0]=w=>R.value=w),onChange:L,line:!1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(na).slice(0,-1),w=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:w.value,value:w.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(w.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])),i.unref(n)&&j.value.length?(i.openBlock(),i.createElementBlock("div",TS,[i.createVNode(E,{modelValue:s.value,"onUpdate:modelValue":$[1]||($[1]=w=>s.value=w),onChange:O},{label:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+" "+i.toDisplayString(s.value),1)]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(j.value,w=>(i.openBlock(),i.createBlock(U,{key:w,value:w,label:i.unref(Te)(w).format("YYYY/MM/DD")},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])):i.createCommentVNode("",!0),!i.unref(n)||i.unref(n)&&j.value.length?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:2,class:"meeting-divider"})):i.createCommentVNode("",!0),i.createElementVNode("div",bS,[!i.unref(n)&&k.value!==-1?(i.openBlock(),i.createBlock(gS,{key:0,data:N.value.slice(k.value,k.value+1),meetingDates:R.value!==i.unref(Ve).EVENTS?h.value:[],eventsDates:R.value!==i.unref(Ve).MEETING?m.value:[],onClickDate:T,onChangeMonth:b,current:k.value,total:N.value.length,active:s.value},null,8,["data","meetingDates","eventsDates","current","total","active"])):i.createCommentVNode("",!0),i.createElementVNode("div",xS,[i.createVNode(wh,{list:o.value,rows:l.value},{empty:i.withCtx(()=>[i.renderSlot(C.$slots,"empty")]),_:3},8,["list","rows"])])])])}}}),CS={class:"o-my-meeting-calendar"},ES={class:"meeting-list"},SS={class:"list-calendar-mb"},kS={class:"list-calendar"},wS=["onClick"],DS={class:"date-cell-text"},AS={class:"list-body"},NS=["id"],IS={class:"item-header-left"},OS={class:"meeting-icon"},BS={class:"header-info"},LS={key:0},MS={class:"title-wrapper"},PS={class:"title-text"},RS={key:1,class:"tag-wrapper"},VS={class:"meeting-info"},FS={key:0,class:"item-header-right"},$S={class:"meeting-detail"},US={key:0,class:"meeting-btn"},qS={key:0,class:"load-text"},HS={class:"dialog-content"},ch=i.defineComponent({__name:"OMyMeetingCalendar",props:{cancelSubMeetingRequest:{},deleteMeetingRequest:{},getMeetingListRequest:{},groupType:{default:Oi.SIG}},emits:["edit"],setup(r,{emit:e}){const t=A.useMessage(null),n=i.ref(!1),s=i.ref(1),a=i.ref(50),o=i.ref(null),l=i.ref([]),c=i.ref([]),h=i.computed(()=>o.value===null||c.value.length<o.value),m=i.ref(!1),{t:g,locale:k}=He.useI18n(),T=i.computed(()=>k.value===He.Locales.EN),O=r,_=i.ref(!1),{isPhone:S}=Ct.useScreen(),R=i.ref([]),L=e,I=i.ref(!1),j=i.ref(!1),M=i.ref(),P=i.ref(0),N=()=>{var fe;P.value=((fe=M.value)==null?void 0:fe.clientHeight)||0},X=async()=>{if(O.getMeetingListRequest&&!I.value)try{if(o.value>0&&(s.value-1)*a.value>o.value)return;if(!h.value&&S.value){Be("next-month");return}n.value=!0,I.value=!0;const fe=await O.getMeetingListRequest({page:s.value,size:a.value,order_by:"date",order_type:"asc",month:Te(me.value).format("YYYY-MM")}),ye=(fe.data||[]).map(ge=>{var jt,Xi,Rt;const{is_cycle:qe,date:Ne,start:ft,end:Dt,cycle_sub:pi,cycle_start_date:Xe,cycle_end_date:xi,cycle_start:Ht,cycle_end:Ci,cycle_type:yt,cycle_interval:ei,cycle_point:li}=ge;if(qe){let Ei="",x="";yt===gn&&(x=g("meeting.cycleDay")),yt===_n&&(ei>1?x=g("meeting.cycleWeek.other",[Qn(yt,li),ei]):x=g("meeting.cycleWeek.one",[Qn(yt,li)])),yt===rn&&(x=g("meeting.cycleMonth",[Qn(yt,li)])),Ei=g("meeting.cycleMeetingText2",{startDate:Xe,endDate:xi,startTime:Ht,endTime:Ci,cycleType:x});const D=(jt=ge.obs_data)==null?void 0:jt.filter(K=>K.text_video_url);return pi.filter(K=>Te(K.date).isBefore(Te(me.value).add(1,"month").format("YYYY-MM-01"))&&!Te(K.date).isBefore(Te(me.value).format("YYYY-MM-01"))).map(({id:K,...ne})=>({...ge,...ne,timeRange:Ei,dateRange:`${ne.start}-${ne.end}`,hasObsData:D.find(xe=>xe.sub_id===ne.sub_id),time:`${ne.start}-${ne.end}`,isExpired:Te(`${ne.date} ${ne.start}`).isBefore(Te())}))}return[{...ge,dateRange:`${ft} - ${Dt}`,timeRange:`${ft} - ${Dt}`,hasObsData:((Rt=(Xi=ge.obs_data)==null?void 0:Xi.filter(Ei=>Ei.text_video_url))==null?void 0:Rt.length)>0,time:`${ft}-${Dt}`,isExpired:Te(`${Ne} ${ft}`).isBefore(Te())}]}).flat().filter(ge=>ge.date.slice(0,7)===vt(me.value,"YYYY-MM-DD").slice(0,7));m.value?(c.value=fe.data||[],l.value=ye):s.value===1&&!S.value?(c.value=fe.data||[],l.value=ye):(c.value=[...c.value,...fe.data||[]],l.value=[...l.value,...ye]),l.value.sort((ge,qe)=>ge.date===qe.date?On(ge.start)>On(qe.start)?1:-1:Te(ge.date).isAfter(Te(qe.date))?1:-1),o.value=(fe==null?void 0:fe.total)||0,i.nextTick(()=>{_e(),ce.value&&!S.value&&E()})}finally{n.value=!1,I.value=!1,j.value=!1,m.value=!1}},b=zi.useDebounceFn(()=>{h.value&&(S.value||(j.value=!0,s.value++,X()))},200),C=zi.useDebounceFn(()=>{if(!h.value||!S.value)return;const fe=window.scrollY||window.pageYOffset,ye=window.innerHeight;document.documentElement.scrollHeight-(fe+ye)<=300&&!I.value&&(j.value=!0,s.value++,X())},200),$=fe=>{const ye=l.value.filter(ge=>ge.date===fe);return ye.length&&ye.every(ge=>ge.is_delete)},U=fe=>{const ye=fe.target;if(!ye)return;const ge=ye.scrollTop,qe=ye.scrollHeight,Ne=ye.clientHeight;ge+Ne>=qe&&b()},E=()=>{ce.value.getContainerEl().addEventListener("scroll",U)},w=i.ref({}),F=(fe,ye)=>{fe&&ye&&(w.value[ye]=fe)},G=async fe=>{await w.value[fe].copyInfo(),t.success({content:g("common.copySuccess")})},Z=i.ref(!1),q=i.ref(null),H=fe=>{L("edit",fe,"whole")},Q=fe=>{q.value=fe,Z.value=!0},J=async()=>{if(O.deleteMeetingRequest)try{_.value=!0,await O.deleteMeetingRequest(q.value.id),Z.value=!1,t.success({content:`${g("meeting.meetingCancel",[q.value.topic])}`}),m.value=!0,X()}finally{_.value=!1}},re=i.ref(!1),de=i.ref(""),Ce=i.ref(null),le=[{label:g("meeting.meetingSingle"),value:"single"},{label:g("meeting.meetingCycle"),value:"whole"}],$e=i.ref("single"),Ie=(fe,ye)=>{fe.is_cycle?(Ce.value=fe,de.value=ye,re.value=!0):ye==="cancel"?Q(fe):H(fe)},Oe=()=>{re.value=!1,Ce.value=null,de.value="",$e.value="single"},Ye=async()=>{const fe=Ce.value;if(de.value==="cancel")try{if(_.value=!0,$e.value==="single"&&fe.is_cycle){if(!O.cancelSubMeetingRequest)return;await O.cancelSubMeetingRequest(fe.sub_id),t.success({content:`${g("meeting.meetingCancel",[fe.topic])}`})}else{if(!O.deleteMeetingRequest)return;await O.deleteMeetingRequest(fe.id),t.success({content:`${g("meeting.meetingCancel",[fe.topic])}`})}Oe(),m.value=!0,X()}finally{_.value=!1}else L("edit",fe,$e.value),Oe()},Fe=i.ref(),Ze=i.computed(()=>[...new Set(l.value.map(fe=>fe.date))].sort((fe,ye)=>Te(fe).isBefore(Te(ye))?-1:1)),Je=i.computed(()=>[...new Set(l.value.filter(fe=>!fe.isExpired&&!fe.is_delete).map(fe=>fe.date))].sort((fe,ye)=>Te(fe).isBefore(Te(ye))?-1:1)),me=i.ref(),_e=()=>{var ge;const fe=Je.value.find(qe=>!Te(qe).isBefore(Te(new Date).format("YYYY-MM-DD")));fe?me.value=fe:me.value||(me.value=Te().format("YYYY-MM-DD")),(ge=Fe.value)==null||ge.pickDay(Te(me.value)),me.value=Te(me.value).format("YYYY-MM-DD");const ye=l.value.find(qe=>qe.date===me.value&&!qe.isExpired&&!qe.is_delete);ye&&(R.value=[ye.sub_id||ye.id])},be=(fe,ye)=>{var ge;(!ye||!((ge=fe.target)!=null&&ge.className.includes("date-cell-text")))&&(fe.stopPropagation(),fe.preventDefault())},Be=fe=>{Fe.value&&(s.value=1,o.value=null,window.scrollTo({top:0,behavior:"smooth"}),Fe.value.selectDate(fe),m.value=!0,i.nextTick(()=>{me.value=Te(Fe.value.selectedDay).format("YYYY-MM-DD"),X()}))},it=i.computed(()=>l.value.reduce((fe,ye)=>{if(fe.length){const ge=fe.at(-1);return ge.date===ye.date?ge.list.push(ye):fe.push({date:ye.date,list:[ye]}),fe}else return[{date:ye.date,list:[ye]}]},[])),he=fe=>bh[Te(fe).day()],ce=i.ref();i.watch(()=>me.value,()=>{ue(me.value)});const ue=fe=>{var qe,Ne,ft;const ye=Te(fe).format("YYYY-MM-DD"),ge=document.querySelector(`#group-title-${ye}`);ge&&(S.value?window.scrollTo({top:(((qe=ge.parentElement)==null?void 0:qe.offsetTop)||0)-52,behavior:"smooth"}):(ft=ce.value)==null||ft.scrollTo({top:((Ne=ge.parentElement)==null?void 0:Ne.offsetTop)||0,behavior:"smooth"}))};i.onMounted(()=>{X(),window.addEventListener("scroll",C),window.addEventListener("resize",C),N(),window.addEventListener("resize",N)}),i.onUnmounted(()=>{var ye;window.removeEventListener("scroll",C),window.removeEventListener("resize",C),window.removeEventListener("resize",N);const fe=(ye=ce.value)==null?void 0:ye.getContainerEl();fe==null||fe.removeEventListener("scroll",U)});const De=fe=>(fe=Te(fe||void 0),T.value?fe.format("MMMM YYYY"):fe.format("YYYY MM月")),Ee=i.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:_.value,onClick:()=>{Ye()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Oe()}}]),et=i.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:_.value,onClick:()=>{J()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Z.value=!1}}]);return(fe,ye)=>(i.openBlock(),i.createElementBlock("div",CS,[i.createElementVNode("div",ES,[i.createElementVNode("div",SS,[i.createElementVNode("span",null,i.toDisplayString(De(me.value)),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:ye[0]||(ye[0]=ge=>Be("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ye[1]||(ye[1]=ge=>Be("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),i.createElementVNode("div",kS,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendarRef",ref:Fe,modelValue:me.value,"onUpdate:modelValue":ye[4]||(ye[4]=ge=>me.value=ge)},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(De(me.value)),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:ye[2]||(ye[2]=ge=>Be("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ye[3]||(ye[3]=ge=>Be("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:ge})=>[i.createElementVNode("div",{onClick:qe=>be(qe,Ze.value.includes(ge.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":ge.isSelected,"is-today":i.unref(vt)(ge.day)===i.unref(vt)(),clickable:Ze.value.includes(ge.day),expired:i.unref(Te)(i.unref(vt)()).isAfter(i.unref(Te)(ge.day)),"all-deleted":$(ge.day)})},[i.createElementVNode("div",DS,i.toDisplayString(Number(ge.day.split("-")[2])),1)],10,wS)]),_:1},8,["modelValue"])]),i.createElementVNode("div",{class:i.normalizeClass(["list-wrapper",l.value.length?"":"is-empty"])},[l.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:ce,onScrollend:i.unref(b),style:i.normalizeStyle({"--header-height":P.value}),class:"scroller-container","show-type":"hover"},{default:i.withCtx(()=>[i.createElementVNode("div",AS,[i.createVNode(i.unref(A.OCollapse),{modelValue:R.value,"onUpdate:modelValue":ye[7]||(ye[7]=ge=>R.value=ge),accordion:i.unref(S)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(it.value,(ge,qe)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:ge.date},[qe===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ye[5]||(ye[5]=Ne=>Be("prev-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(g)("meeting.preMonth")),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["group-item",qe===it.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"group-bar":!0,"is-active":i.unref(Te)(me.value).format("YYYY-MM-DD")===ge.date,"is-end":ge.list.every(Ne=>Ne.isExpired)})},[...ye[11]||(ye[11]=[i.createElementVNode("div",{class:"group-bar-line"},null,-1),i.createElementVNode("div",{class:"group-bar-dot"},null,-1)])],2),i.createElementVNode("div",{class:i.normalizeClass({"group-title":!0,"is-end":ge.list.every(Ne=>Ne.isExpired)}),id:`group-title-${i.unref(Te)(new Date(ge.date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(Te)(ge.date).format("MM/DD"))+" "+i.toDisplayString(he(ge.date)),11,NS),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(ge.list,(Ne,ft)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:Ne.sub_id||Ne.id,value:Ne.sub_id||Ne.id,class:i.normalizeClass({"last-item":qe===it.value.length-1&&ft===ge.list.length-1})},{title:i.withCtx(()=>[i.createElementVNode("div",IS,[i.createElementVNode("div",OS,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Bl))]),_:1})]),i.createElementVNode("div",BS,[i.createElementVNode("div",{class:i.normalizeClass({"meeting-title":!0,"is-delete":Ne.is_delete,"is-end":Ne.isExpired})},[Ne.is_delete?(i.openBlock(),i.createElementBlock("div",LS,i.toDisplayString(i.unref(g)("meeting.meetingCancelled")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",MS,[i.createElementVNode("div",PS,i.toDisplayString(Ne.topic),1)]),Ne.is_cycle?(i.openBlock(),i.createElementBlock("div",RS,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],2),i.createElementVNode("div",VS,[i.createElementVNode("span",null,i.toDisplayString(Ne.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString(r.groupType===i.unref(Oi).GROUP?i.unref(g)("meeting.groups"):i.unref(g)("meeting.sigs"))+": "+i.toDisplayString(Ne.group_name),1)])])]),Ne.is_delete?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",FS,[Ne.isExpired?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[Ne.etherpad?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,target:"_blank",href:Ne.etherpad},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.meetingSummary"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0),Ne.hasObsData?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,target:"_blank",href:`/${i.unref(k)}/video/${Ne.group_name}/${Ne.mid}/${Ne.date}`},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.viewRecord"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0)],64)):(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,target:"_blank",href:Ne.join_url,rel:"noopener noreferrer"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.joinMeeting"))+" ",1)]),_:1},8,["href"]))])),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>G(ft),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Ll))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",$S,[i.createVNode(rs,{show:R.value.includes(Ne.sub_id||Ne.id),data:Ne,ref_for:!0,ref:Dt=>F(Dt,Ne.id),from:"my"},null,8,["show","data"]),!Ne.isExpired&&!Ne.is_delete?(i.openBlock(),i.createElementBlock("div",US,[i.createVNode(i.unref(A.OLink),{onClick:Dt=>Ie(Ne,"edit")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.editMeeting")),1)]),_:1},8,["onClick"]),i.createVNode(i.unref(A.OLink),{onClick:Dt=>Ie(Ne,"cancel")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.cancelMeeting")),1)]),_:1},8,["onClick"])])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ye[12]||(ye[12]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),qe===it.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[j.value?(i.openBlock(),i.createElementBlock("div",qS,i.toDisplayString(i.unref(g)("common.loading")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:ye[6]||(ye[6]=Ne=>Be("next-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(g)("meeting.nextMonth")),1)])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):n.value?i.createCommentVNode("",!0):i.renderSlot(fe.$slots,"empty",{key:1})],2),i.createVNode(i.unref(A.ODialog),{visible:re.value,"onUpdate:visible":ye[9]||(ye[9]=ge=>re.value=ge),"main-class":"handle-dialog",onClose:Oe,actions:Ee.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.meetingHandleText",[de.value==="edit"?i.unref(g)("meeting.edit"):i.unref(g)("meeting.cancel2")])),1)]),default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadioGroup),{modelValue:$e.value,"onUpdate:modelValue":ye[8]||(ye[8]=ge=>$e.value=ge)},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(le,ge=>i.createVNode(i.unref(A.ORadio),{value:ge.value,key:ge.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(ge.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Z.value,"onUpdate:visible":ye[10]||(ye[10]=ge=>Z.value=ge),"main-class":"cancel-dialog",actions:et.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.confirmCancel")),1)]),default:i.withCtx(()=>{var ge;return[i.createElementVNode("div",HS,i.toDisplayString(i.unref(g)("meeting.confirmCancelDesc",[(ge=q.value)==null?void 0:ge.topic])),1)]}),_:1},8,["visible","actions"])])]))}}),jS=Object.assign(Ac,{install(r){r.component("OMeetingCalendar",Ac)}}),zS=Object.assign(Oc,{install(r){r.component("OMeetingCalendar",Oc)}}),GS=Object.assign(lh,{install(r){r.component("OMeetingPlayback",lh)}}),WS=Object.assign(uh,{install(r){r.component("OSigMeetingCalendar",uh)}}),YS=Object.assign(ch,{install(r){r.component("OMyMeetingCalendar",ch)}}),XS={OBanner:dh,OCookieNotice:hh,OFooter:fh,OHeaderSearch:ph,OHeaderUser:mh,OPlusConfigProvider:gh,OSection:vh,OSourceCode:_h,OThemeSwitcher:yh},KS={install:r=>{Object.entries(XS).forEach(([e,t])=>{r.component(e,t)})}};exports.OElCookieNotice=He.OElCookieNotice;exports.CalendarDataType=Ve;exports.EventsStatusT=en;exports.MeetingGroupType=Oi;exports.OActivityApproval=P_;exports.OActivityForm=M_;exports.OBanner=dh;exports.OCookieNotice=hh;exports.OEventsApply=jy;exports.OEventsCalendar=qy;exports.OEventsList=Hy;exports.OFooter=fh;exports.OHeader=CT;exports.OHeaderMoblie=ET;exports.OHeaderSearch=ph;exports.OHeaderUser=mh;exports.OMeetingCalendar=jS;exports.OMeetingForm=zS;exports.OMeetingPlayback=GS;exports.OMyActivityCalendar=R_;exports.OMyMeetingCalendar=YS;exports.OPlusConfigProvider=gh;exports.OSection=vh;exports.OSigMeetingCalendar=WS;exports.OSourceCode=_h;exports.OThemeSwitcher=yh;exports.default=KS;
220
+ `.split("").map(r=>r.charCodeAt(0)));class X5 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class K5 extends wl{constructor(e,t={}){super(e,t),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 Ot();const e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Ot([[t,n]])}initSegmentForMap(e,t=!1){if(!e)return null;const n=Ca(e);let s=this.initSegments_[n];if(t&&!s&&e.bytes){const a=ih.byteLength+e.bytes.byteLength,o=new Uint8Array(a);o.set(e.bytes),o.set(ih,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,t){Qr(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(this.syncController_.timestampOffsetForTimeline(e.timeline)===null){const t=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};this.syncController_.one("timestampoffset",t),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,t,n){if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===ji.TIMEOUT&&this.handleTimeout_(),e.code===ji.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,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const o=s.segment;if(o.map&&(o.map.bytes=t.map.bytes),s.bytes=t.bytes,typeof W.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(()=>this.segmentRequestFinished_(e,t,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:ne.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)}),O5(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const n=e&&e.type==="vtt",s=t&&t.type==="text";n&&s&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach(n=>{const s=n.start+t,a=n.end+t,o=new W.VTTCue(s,a,n.cueText);n.settings&&n.settings.split(" ").forEach(l=>{const c=l.split(":"),h=c[0],m=c[1];o[h]=isNaN(m)?m:Number(m)}),e.cues.push(o)})}parseVTTCues_(e){let t,n=!1;if(typeof W.WebVTT!="function")throw new X5;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof W.TextDecoder=="function"?t=new W.TextDecoder("utf8"):(t=W.WebVTT.StringDecoder(),n=!0);const s=new W.WebVTT.Parser(W,W.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=o=>{e.timestampmap=o},s.onparsingerror=o=>{ne.log.warn("Error encountered when parsing cues: "+o.message)},e.segment.map){let o=e.segment.map.bytes;n&&(o=th(o)),s.parse(o)}let a=e.bytes;n&&(a=th(a)),s.parse(a),s.flush()}updateTimeMapping_(e,t,n){const s=e.segment;if(!t)return;if(!e.cues.length){s.empty=!0;return}const{MPEGTS:a,LOCAL:o}=e.timestampmap,c=a/Nn.ONE_SECOND_IN_TS-o+t.mapping;if(e.cues.forEach(h=>{const m=h.endTime-h.startTime,g=this.handleRollover_(h.startTime+c,t.time);h.startTime=Math.max(g,0),h.endTime=Math.max(g+m,0)}),!n.syncInfo){const h=e.cues[0].startTime,m=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(h,m-s.duration)}}}handleRollover_(e,t){if(t===null)return e;let n=e*Nn.ONE_SECOND_IN_TS;const s=t*Nn.ONE_SECOND_IN_TS;let a;for(s<n?a=-8589934592:a=8589934592;Math.abs(n-s)>4294967296;)n+=a;return n/Nn.ONE_SECOND_IN_TS}}const Q5=function(r,e){const t=r.cues;for(let n=0;n<t.length;n++){const s=t[n];if(e>=s.adStartTime&&e<=s.adEndTime)return s}return null},Z5=function(r,e,t=0){if(!r.segments)return;let n=t,s;for(let a=0;a<r.segments.length;a++){const o=r.segments[a];if(s||(s=Q5(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 nh{constructor({start:e,end:t,segmentIndex:n,partIndex:s=null,appended:a=!1}){this.start_=e,this.end_=t,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 J5{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}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 tp{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,t){const{mediaSequence:n,segments:s}=e;if(this.isReliable_=this.isReliablePlaylist_(n,s),!!this.isReliable_)return this.updateStorage_(s,n,this.calculateBaseTime_(n,s,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:n}of this.storage_.values())if(n.length){for(const s of n)if(s.isInRange(e))return s}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,n){const s=new Map;let a=`
221
+ `,o=n,l=t;this.start_=o,e.forEach((c,h)=>{const m=this.storage_.get(l),g=o,k=g+c.duration,T=!!(m&&m.segmentSyncInfo&&m.segmentSyncInfo.isAppended),I=new nh({start:g,end:k,appended:T,segmentIndex:h});c.syncInfo=I;let _=o;const S=(c.parts||[]).map((R,L)=>{const O=_,H=_+R.duration,M=!!(m&&m.partsSyncInfo&&m.partsSyncInfo[L]&&m.partsSyncInfo[L].isAppended),P=new nh({start:O,end:H,appended:M,segmentIndex:h,partIndex:L});return _=H,a+=`Media Sequence: ${l}.${L} | Range: ${O} --> ${H} | Appended: ${M}
222
+ `,R.syncInfo=P,P});s.set(l,new J5(I,S)),a+=`${Qf(c.resolvedUri)} | Media Sequence: ${l} | Range: ${g} --> ${k} | Appended: ${T}
223
+ `,l++,o=k}),this.end_=o,this.storage_=s,this.diagnostics_=a}calculateBaseTime_(e,t,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=t[l];o-=c.duration}return o}return n}isReliablePlaylist_(e,t){return e!=null&&Array.isArray(t)&&t.length}}class rh extends tp{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,n){if(!this.storage_.size){const s=this.parent_.getSyncInfoForMediaSequence(e);return s?s.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,n)}}const eE=86400,Zo=[{name:"VOD",run:(r,e,t,n,s)=>t!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(r,e,t,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,t,n,s)=>{if(!Object.keys(r.timelineToDatetimeMappings).length)return null;let a=null,o=null;const l=_l(e);s=s||0;for(let c=0;c<l.length;c++){const h=e.endList||s===0?c:l.length-(c+1),m=l[h],g=m.segment,k=r.timelineToDatetimeMappings[g.timeline];if(!k||!g.dateTimeObject)continue;let I=g.dateTimeObject.getTime()/1e3+k;if(g.parts&&typeof m.partIndex=="number")for(let S=0;S<m.partIndex;S++)I+=g.parts[S].duration;const _=Math.abs(s-I);if(o!==null&&(_===0||o<_))break;o=_,a={time:I,segmentIndex:m.segmentIndex,partIndex:m.partIndex}}return a}},{name:"Segment",run:(r,e,t,n,s)=>{let a=null,o=null;s=s||0;const l=_l(e);for(let c=0;c<l.length;c++){const h=e.endList||s===0?c:l.length-(c+1),m=l[h],g=m.segment,k=m.part&&m.part.start||g&&g.start;if(g.timeline===n&&typeof k<"u"){const T=Math.abs(s-k);if(o!==null&&o<T)break;(!a||o===null||o>=T)&&(o=T,a={time:k,segmentIndex:m.segmentIndex,partIndex:m.partIndex})}}return a}},{name:"Discontinuity",run:(r,e,t,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],h=e.discontinuitySequence+l+1,m=r.discontinuities[h];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,t,n,s)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class tE extends ne.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new tp,n=new rh(t),s=new rh(t);this.mediaSequenceStorage_={main:t,audio:n,vtt:s},this.logger_=bi("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,n,s,a){if(t!==1/0)return Zo.find(({name:c})=>c==="VOD").run(this,e,t);const o=this.runStrategies_(e,t,n,s,a);if(!o.length)return null;for(const l of o){const{syncPoint:c,strategy:h}=l,{segmentIndex:m,time:g}=c;if(m<0)continue;const k=e.segments[m],T=g,I=T+k.duration;if(this.logger_(`Strategy: ${h}. Current time: ${s}. selected segment: ${m}. Time: [${T} -> ${I}]}`),s>=T&&s<I)return this.logger_("Found sync point with exact match: ",c),c}return this.selectSyncPoint_(o,{key:"time",value:s})}getExpiredTime(e,t){if(!e||!e.segments)return null;const n=this.runStrategies_(e,t,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+is({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,n,s,a){const o=[];for(let l=0;l<Zo.length;l++){const c=Zo[l],h=c.run(this,e,t,n,s,a);h&&(h.strategy=c.name,o.push({strategy:c.name,syncPoint:h}))}return o}selectSyncPoint_(e,t){let n=e[0].syncPoint,s=Math.abs(e[0].syncPoint[t.key]-t.value),a=e[0].strategy;for(let o=1;o<e.length;o++){const l=Math.abs(e[o].syncPoint[t.key]-t.value);l<s&&(s=l,n=e[o].syncPoint,a=e[o].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${a}]: [time:${n.time}, segmentIndex:${n.segmentIndex}`+(typeof n.partIndex=="number"?`,partIndex:${n.partIndex}`:"")+"]"),n}saveExpiredSegmentInfo(e,t){const n=t.mediaSequence-e.mediaSequence;if(n>eE){ne.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"){t.syncInfo={mediaSequence:e.mediaSequence+s,time:a.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const n=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),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&&t&&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,t,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-t.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=t.end+o.mapping;else if(o)l=t.start+o.mapping,c=t.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 t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let s=0;s<t.discontinuityStarts.length;s++){const a=t.discontinuityStarts[s],o=t.discontinuitySequence+s+1,l=a-e.mediaIndex,c=Math.abs(l);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>c){let h;l<0?h=n.start-is({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:a}):h=n.end+is({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[o]={time:h,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class iE extends ne.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:n}){return typeof t=="number"&&typeof n=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:n},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:n}){if(typeof t=="number"&&typeof n=="number"){this.lastTimelineChanges_[e]={type:e,from:t,to:n},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:t,to:n}};this.trigger({type:"timelinechange",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const nE=$f(Uf(function(){var r=(function(){function _(){this.listeners={}}var S=_.prototype;return S.on=function(L,O){this.listeners[L]||(this.listeners[L]=[]),this.listeners[L].push(O)},S.off=function(L,O){if(!this.listeners[L])return!1;var H=this.listeners[L].indexOf(O);return this.listeners[L]=this.listeners[L].slice(0),this.listeners[L].splice(H,1),H>-1},S.trigger=function(L){var O=this.listeners[L];if(O)if(arguments.length===2)for(var H=O.length,M=0;M<H;++M)O[M].call(this,arguments[1]);else for(var P=Array.prototype.slice.call(arguments,1),N=O.length,X=0;X<N;++X)O[X].apply(this,P)},S.dispose=function(){this.listeners={}},S.pipe=function(L){this.on("data",function(O){L.push(O)})},_})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(_){return _.subarray(0,_.byteLength-_[_.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const t=function(){const _=[[[],[],[],[],[]],[[],[],[],[],[]]],S=_[0],R=_[1],L=S[4],O=R[4];let H,M,P;const N=[],X=[];let b,C,$,U,E,w;for(H=0;H<256;H++)X[(N[H]=H<<1^(H>>7)*283)^H]=H;for(M=P=0;!L[M];M^=b||1,P=X[P]||1)for(U=P^P<<1^P<<2^P<<3^P<<4,U=U>>8^U&255^99,L[M]=U,O[U]=M,$=N[C=N[b=N[M]]],w=$*16843009^C*65537^b*257^M*16843008,E=N[U]*257^U*16843008,H=0;H<4;H++)S[H][M]=E=E<<24^E>>>8,R[H][U]=w=w<<24^w>>>8;for(H=0;H<5;H++)S[H]=S[H].slice(0),R[H]=R[H].slice(0);return _};let n=null;class s{constructor(S){n||(n=t()),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 R,L,O;const H=this._tables[0][4],M=this._tables[1],P=S.length;let N=1;if(P!==4&&P!==6&&P!==8)throw new Error("Invalid aes key size");const X=S.slice(0),b=[];for(this._key=[X,b],R=P;R<4*P+28;R++)O=X[R-1],(R%P===0||P===8&&R%P===4)&&(O=H[O>>>24]<<24^H[O>>16&255]<<16^H[O>>8&255]<<8^H[O&255],R%P===0&&(O=O<<8^O>>>24^N<<24,N=N<<1^(N>>7)*283)),X[R]=X[R-P]^O;for(L=0;R;L++,R--)O=X[L&3?R:R-4],R<=4||L<4?b[L]=O:b[L]=M[0][H[O>>>24]]^M[1][H[O>>16&255]]^M[2][H[O>>8&255]]^M[3][H[O&255]]}decrypt(S,R,L,O,H,M){const P=this._key[1];let N=S^P[0],X=O^P[1],b=L^P[2],C=R^P[3],$,U,E;const w=P.length/4-2;let F,z=4;const Q=this._tables[1],q=Q[0],Z=Q[1],G=Q[2],J=Q[3],ie=Q[4];for(F=0;F<w;F++)$=q[N>>>24]^Z[X>>16&255]^G[b>>8&255]^J[C&255]^P[z],U=q[X>>>24]^Z[b>>16&255]^G[C>>8&255]^J[N&255]^P[z+1],E=q[b>>>24]^Z[C>>16&255]^G[N>>8&255]^J[X&255]^P[z+2],C=q[C>>>24]^Z[N>>16&255]^G[X>>8&255]^J[b&255]^P[z+3],z+=4,N=$,X=U,b=E;for(F=0;F<4;F++)H[(3&-F)+M]=ie[N>>>24]<<24^ie[X>>16&255]<<16^ie[b>>8&255]<<8^ie[C&255]^P[z++],$=N,N=X,X=b,b=C,C=$}}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(S){this.jobs.push(S),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(_){return _<<24|(_&65280)<<8|(_&16711680)>>8|_>>>24},l=function(_,S,R){const L=new Int32Array(_.buffer,_.byteOffset,_.byteLength>>2),O=new s(Array.prototype.slice.call(S)),H=new Uint8Array(_.byteLength),M=new Int32Array(H.buffer);let P,N,X,b,C,$,U,E,w;for(P=R[0],N=R[1],X=R[2],b=R[3],w=0;w<L.length;w+=4)C=o(L[w]),$=o(L[w+1]),U=o(L[w+2]),E=o(L[w+3]),O.decrypt(C,$,U,E,M,w),M[w]=o(M[w]^P),M[w+1]=o(M[w+1]^N),M[w+2]=o(M[w+2]^X),M[w+3]=o(M[w+3]^b),P=C,N=$,X=U,b=E;return H};class c{constructor(S,R,L,O){const H=c.STEP,M=new Int32Array(S.buffer),P=new Uint8Array(S.byteLength);let N=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(M.subarray(N,N+H),R,L,P)),N=H;N<M.length;N+=H)L=new Uint32Array([o(M[N-4]),o(M[N-3]),o(M[N-2]),o(M[N-1])]),this.asyncStream_.push(this.decryptChunk_(M.subarray(N,N+H),R,L,P));this.asyncStream_.push(function(){O(null,e(P))})}static get STEP(){return 32e3}decryptChunk_(S,R,L,O){return function(){const H=l(S,R,L);O.set(H,S.byteOffset)}}}var h=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},m;typeof window<"u"?m=window:typeof h<"u"?m=h:typeof self<"u"?m=self:m={};var g=m,k=function(S){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(S):S&&S.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 _=new Uint16Array([65484]),S=new Uint8Array(_.buffer,_.byteOffset,_.byteLength);return S[0]===255?"big":S[0]===204?"little":"unknown"})();const I=function(_){const S={};return Object.keys(_).forEach(R=>{const L=_[R];k(L)?S[R]={bytes:L.buffer,byteOffset:L.byteOffset,byteLength:L.byteLength}:S[R]=L}),S};self.onmessage=function(_){const S=_.data,R=new Uint8Array(S.encrypted.bytes,S.encrypted.byteOffset,S.encrypted.byteLength),L=new Uint32Array(S.key.bytes,S.key.byteOffset,S.key.byteLength/4),O=new Uint32Array(S.iv.bytes,S.iv.byteOffset,S.iv.byteLength/4);new c(R,L,O,function(H,M){self.postMessage(I({source:S.source,decrypted:M}),[M.buffer])})}}));var rE=Ff(nE);const sE=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},ip=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Al=(r,e)=>{e.activePlaylistLoader=r,r.load()},aE=(r,e)=>()=>{const{segmentLoaders:{[r]:t,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,ip(t,s),!(!o||o.isMainPlaylist))){if(!o.playlistLoader){l&&n.resetEverything();return}t.resyncLoader(),Al(o.playlistLoader,s)}},oE=(r,e)=>()=>{const{segmentLoaders:{[r]:t},mediaTypes:{[r]:n}}=e;n.lastGroup_=null,t.abort(),t.pause()},lE=(r,e)=>()=>{const{mainPlaylistLoader:t,segmentLoaders:{[r]:n,main:s},mediaTypes:{[r]:a}}=e,o=a.activeTrack(),l=a.getActiveGroup(),c=a.activePlaylistLoader,h=a.lastTrack_;if(!(h&&o&&h.id===o.id)&&(a.lastGroup_=l,a.lastTrack_=o,ip(n,a),!!l)){if(l.isMainPlaylist){if(!o||!h||o.id===h.id)return;const m=e.vhs.playlistController_,g=m.selectPlaylist();if(m.media()===g)return;a.logger_(`track change. Switching main audio from ${h.id} to ${o.id}`),t.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){Al(l.playlistLoader,a);return}n.track&&n.track(o),n.resetEverything(),Al(l.playlistLoader,a)}},Ea={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:t},excludePlaylist:n}=e,s=t.activeTrack(),a=t.activeGroup(),o=(a.filter(c=>c.default)[0]||a[0]).id,l=t.tracks[o];if(s===l){n({error:{message:"Problem encountered loading the default audio track."}});return}ne.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const c in t.tracks)t.tracks[c].enabled=t.tracks[c]===l;t.onTrackChanged()},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:t}}=e;ne.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=t.activeTrack();n&&(n.mode="disabled"),t.onTrackChanged()}},sh={AUDIO:(r,e,t)=>{if(!e)return;const{tech:n,requestOptions:s,segmentLoaders:{[r]:a}}=t;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",Ea[r](r,t))},SUBTITLES:(r,e,t)=>{const{tech:n,requestOptions:s,segmentLoaders:{[r]:a},mediaTypes:{[r]:o}}=t;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",Ea[r](r,t))}},uE={AUDIO:(r,e)=>{const{vhs:t,sourceType:n,segmentLoaders:{[r]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[r]:{groups:l,tracks:c,logger_:h}},mainPlaylistLoader:m}=e,g=ms(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 k in o[r]){l[k]||(l[k]=[]);for(const T in o[r][k]){let I=o[r][k][T],_;if(g?(h(`AUDIO group '${k}' label '${T}' is a main playlist`),I.isMainPlaylist=!0,_=null):n==="vhs-json"&&I.playlists?_=new Kn(I.playlists[0],t,a):I.resolvedUri?_=new Kn(I.resolvedUri,t,a):I.playlists&&n==="dash"?_=new El(I.playlists[0],t,a,m):_=null,I=st({id:T,playlistLoader:_},I),sh[r](r,I.playlistLoader,e),l[k].push(I),typeof c[T]>"u"){const S=new ne.AudioTrack({id:T,kind:sE(I),enabled:!1,language:I.language,default:I.default,label:T});c[T]=S}}}s.on("error",Ea[r](r,e))},SUBTITLES:(r,e)=>{const{tech:t,vhs:n,sourceType:s,segmentLoaders:{[r]:a},requestOptions:o,main:{mediaGroups:l},mediaTypes:{[r]:{groups:c,tracks:h}},mainPlaylistLoader:m}=e;for(const g in l[r]){c[g]||(c[g]=[]);for(const k in l[r][g]){if(!n.options_.useForcedSubtitles&&l[r][g][k].forced)continue;let T=l[r][g][k],I;if(s==="hls")I=new Kn(T.resolvedUri,n,o);else if(s==="dash"){if(!T.playlists.filter(S=>S.excludeUntil!==1/0).length)return;I=new El(T.playlists[0],n,o,m)}else s==="vhs-json"&&(I=new Kn(T.playlists?T.playlists[0]:T.resolvedUri,n,o));if(T=st({id:k,playlistLoader:I},T),sh[r](r,T.playlistLoader,e),c[g].push(T),typeof h[k]>"u"){const _=t.addRemoteTextTrack({id:k,kind:"subtitles",default:T.default&&T.autoselect,language:T.language,label:k},!1).track;h[k]=_}}}a.on("error",Ea[r](r,e))},"CLOSED-CAPTIONS":(r,e)=>{const{tech:t,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 h=t.options_.vhs&&t.options_.vhs.captionServices||{};let m={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(h[m.instreamId]&&(m=st(m,h[m.instreamId])),m.default===void 0&&delete m.default,s[o].push(st({id:l},c)),typeof a[l]>"u"){const g=t.addRemoteTextTrack({id:m.instreamId,kind:"captions",default:m.default,language:m.language,label:m.label},!1).track;a[l]=g}}}}},np=(r,e)=>{for(let t=0;t<r.length;t++)if(gu(e,r[t])||r[t].playlists&&np(r[t].playlists,e))return!0;return!1},cE=(r,e)=>t=>{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&&ms(e.main))for(let c=0;c<l.length;c++){const h=s[l[c]];if(np(h,a)){o=h;break}}else s.main?o=s.main:l.length===1&&(o=s[l[0]]);return typeof t>"u"?o:t===null||!o?null:o.filter(c=>c.id===t.id)[0]||null},dE={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const n in t)if(t[n].enabled)return t[n];return null},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:t}}}=e;for(const n in t)if(t[n].mode==="showing"||t[n].mode==="hidden")return t[n];return null}},hE=(r,{mediaTypes:e})=>()=>{const t=e[r].activeTrack();return t?e[r].activeGroup(t):null},fE=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(h=>{uE[h](h,r)});const{mediaTypes:e,mainPlaylistLoader:t,tech:n,vhs:s,segmentLoaders:{["AUDIO"]:a,main:o}}=r;["AUDIO","SUBTITLES"].forEach(h=>{e[h].activeGroup=cE(h,r),e[h].activeTrack=dE[h](h,r),e[h].onGroupChanged=aE(h,r),e[h].onGroupChanging=oE(h,r),e[h].onTrackChanged=lE(h,r),e[h].getActiveGroup=hE(h,r)});const l=e.AUDIO.activeGroup();if(l){const h=(l.filter(g=>g.default)[0]||l[0]).id;e.AUDIO.tracks[h].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}t.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(h=>e[h].onGroupChanged())}),t.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(h=>e[h].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 h in e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[h])},pE=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:nn,activeTrack:nn,getActiveGroup:nn,onGroupChanged:nn,onTrackChanged:nn,lastTrack_:null,logger_:bi(`MediaGroups[${e}]`)}}),r};class ah{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_=si(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(t=>[t.ID,t])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class mE extends ne.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new ah,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=bi("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const n=t.serverUri||t.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=si(e,n),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const n=e?t:this.getRequestURI(t);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 h=o.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${h} seconds.`),this.startTTLTimeout_(parseInt(h,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(h){const m={errorType:ne.Error.StreamingContentSteeringParserError,error:h};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 t=new W.URL(e),n=new W.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(n.toString())}decodeDataUriManifest_(e){const t=JSON.parse(W.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new W.URL(e),n=this.getPathway(),s=this.getBandwidth_();if(n){const a=`_${this.manifestType_}_pathway`;t.searchParams.set(a,n)}if(s){const a=`_${this.manifestType_}_throughput`;t.searchParams.set(a,s)}return t.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 t=s=>this.excludedSteeringManifestURLs.has(s);if(this.proxyServerUrl_){const s=this.setProxyServerUrl_(e);if(!t(s))return s}const n=this.setSteeringParams_(e);return t(n)?null:n}startTTLTimeout_(e=this.steeringManifest.ttl){const t=e*1e3;this.ttlTimeout_=W.setTimeout(()=>{this.requestSteeringManifest()},t)}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 ah}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&(si(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const gE=(r,e)=>{let t=null;return(...n)=>{clearTimeout(t),t=setTimeout(()=>{r.apply(null,n)},e)}},vE=10;let Ji;const _E=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],yE=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},TE=function({currentPlaylist:r,buffered:e,currentTime:t,nextPlaylist:n,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:o,bufferBasedABR:l,log:c}){if(!n)return ne.log.warn("We received no playlist to switch to. Please check your stream."),!1;const h=`allowing switch ${r&&r.id||"null"} -> ${n.id}`;if(!r)return c(`${h} as current playlist is not set`),!0;if(n.id===r.id)return!1;const m=!!Xn(e,t).length;if(!r.endList)return!m&&typeof r.partTargetDuration=="number"?(c(`not ${h} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${h} as current playlist is live`),!0);const g=fu(e,t),k=l?Nt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Nt.MAX_BUFFER_LOW_WATER_LINE;if(o<k)return c(`${h} as duration < max low water line (${o} < ${k})`),!0;const T=n.attributes.BANDWIDTH,I=r.attributes.BANDWIDTH;if(T<I&&(!l||g<a)){let _=`${h} as next bandwidth < current bandwidth (${T} < ${I})`;return l&&(_+=` and forwardBuffer < bufferHighWaterLine (${g} < ${a})`),c(_),!0}if((!l||T>I)&&g>=s){let _=`${h} as forwardBuffer >= bufferLowWaterLine (${g} >= ${s})`;return l&&(_+=` and next bandwidth > current bandwidth (${T} > ${I})`),c(_),!0}return c(`not ${h} as no switching criteria met`),!1};class bE extends ne.EventTarget{constructor(e){super(),this.fastQualityChange_=gE(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:n,tech:s,bandwidth:a,externVhs:o,useCueTags:l,playlistExclusionDuration:c,enableLowInitialPlaylist:h,sourceType:m,cacheEncryptionKeys:g,bufferBasedABR:k,leastPixelDiffSelector:T,captionServices:I,experimentalUseMMS:_}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:S}=e;(S===null||typeof S>"u")&&(S=1/0),Ji=o,this.bufferBasedABR=!!k,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=S,this.enableLowInitialPlaylist=h,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:S,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=pE(),_&&W.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new W.ManagedMediaSource,this.usingManagedMediaSource_=!0,ne.log("Using ManagedMediaSource")):W.MediaSource&&(this.mediaSource=new W.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=Ot(),this.hasPlayed_=!1,this.syncController_=new tE(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new rE,this.sourceUpdater_=new ep(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new iE,this.keyStatusMap_=new Map;const R={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:I,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 El(t,this.vhs_,st(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Kn(t,this.vhs_,st(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new wl(st(R,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new wl(st(R,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new K5(st(R,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((H,M)=>{function P(){s.off("vttjserror",N),H()}function N(){s.off("vttjsloaded",P),M()}s.one("vttjsloaded",P),s.one("vttjserror",N),s.addWebVttScript_()})}),e);const L=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new mE(this.vhs_.xhr,L),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),_E.forEach(H=>{this[H+"_"]=yE.bind(this,H)}),this.logger_=bi("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const O=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(O,()=>{const H=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-H,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return e===-1||t===-1?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,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 ${t}`);const l={renditionInfo:{id:o,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:l}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,n)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const t=this.mediaTypes_[e],n=t?t.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(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;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 t;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 h=0;h<e.playlists.length;h++){const m=e.playlists[h];m.attributes&&m.attributes.AUDIO&&m.attributes.AUDIO===l&&o.push(m)}}return o.length?o:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const t=this.mainPlaylistLoader_.media(),n=t.targetDuration*1.5*1e3;yl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,t.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.mainSegmentLoader_.load()),fE({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),t),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 t=this.mainPlaylistLoader_.media();if(!t){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;t=this.initialMedia_}this.handleUpdatedMediaPlaylist(t)}),this.mainPlaylistLoader_.on("error",()=>{const t=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:t.playlist,error:t})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const t=this.mainPlaylistLoader_.media(),n=t.targetDuration*1.5*1e3;yl(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(t,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const t=this.mainPlaylistLoader_.media();if(t.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(t)&&(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(t=>{this.mainPlaylistLoader_.on(t,n=>{this.player_.trigger(xt({},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,t){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"}),Ji.Playlist.isAes(t)&&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 t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),s=this.bufferLowWaterLine(),a=this.bufferHighWaterLine(),o=this.tech_.buffered();return TE({buffered:o,currentTime:n,currentPlaylist:t,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:vE}))});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(xt({},s))}),this.audioSegmentLoader_.on(n,s=>{this.player_.trigger(xt({},s))}),this.subtitleSegmentLoader_.on(n,s=>{this.player_.trigger(xt({},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 t=this.seekable();if(!t.length)return!1;const n=t.end(0);let s=n;if(e.start){const a=e.start.timeOffset;if(a<0){const o=this.mainPlaylistLoader_.main,l=Ji.Playlist.liveEdgeDelay(o,e),c=n+l;s=Math.max(Math.min(c+a,n),t.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,t=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();!t||t.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=Ji.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:t={},playlistExclusionDuration:n}){if(e=e||this.mainPlaylistLoader_.media(),n=n||t.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=t,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,a=s.filter(Ya),o=a.length===1&&a[0]===e;if(s.length===1&&n!==1/0)return ne.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(o);if(o){if(this.main().contentSteering){const I=this.pathwayAttribute_(e),_=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(I),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(I)},_);return}let T=!1;s.forEach(I=>{if(I===e)return;const _=I.excludeUntil;typeof _<"u"&&_!==1/0&&(T=!0,delete I.excludeUntil)}),T&&(ne.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,t.reason&&(e.lastExcludeReason_=t.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 h=t.internal?this.logger_:ne.log.warn,m=t.message?" "+t.message:"";h(`${t.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,k=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=g;return this.switchMedia_(c,"exclude",o||k)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){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=>t.forEach(l=>{typeof o[l]=="function"&&o[l]()}))}setCurrentTime(e){const t=Xn(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(t&&t.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:Ji.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const n=e.media();if(!n)return null;const s=this.syncController_.getMediaSequenceSync(t);if(s&&s.isReliable){const l=s.start,c=s.end;if(!isFinite(l)||!isFinite(c))return null;const h=Ji.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n),m=Math.max(l,c-h);return Ot([[l,m]])}const a=this.syncController_.getExpiredTime(n,this.duration());if(a===null)return null;const o=Ji.Playlist.seekable(n,a,Ji.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return o.length?o:null}computeFinalSeekable_(e,t){if(!t)return e;const n=e.start(0),s=e.end(0),a=t.start(0),o=t.end(0);return a>s||n>o?e:Ot([[Math.max(n,a),Math.min(s,o)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!t))return;const n=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!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 [${ff(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 t=this.tech_.buffered();let n=Ji.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(n=Math.max(n,t.end(t.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 t=this.mediaTypes_[e].groups;for(const n in t)t[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,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!t||!n)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const n=ns(this.main(),t),s={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=n.video||e.main.videoCodec||u4),e.main.isMuxed&&(s.video+=`,${n.audio||e.main.audioCodec||Xc}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(s.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||Xc,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video){this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const o=(h,m)=>h?Zr(m,this.usingManagedMediaSource_):Oo(m),l={};let c;if(["video","audio"].forEach(function(h){if(s.hasOwnProperty(h)&&!o(e[h].isFmp4,s[h])){const m=e[h].isFmp4?"browser":"muxer";l[m]=l[m]||[],l[m].push(s[h]),h==="audio"&&(c=m)}}),a&&c&&t.attributes.AUDIO){const h=t.attributes.AUDIO;this.main().playlists.forEach(m=>{(m.attributes&&m.attributes.AUDIO)===h&&m!==t&&(m.excludeUntil=1/0)}),this.logger_(`excluding audio group ${h} as ${c} does not support codec(s): "${s.audio}"`)}if(Object.keys(l).length){const h=Object.keys(l).reduce((m,g)=>(m&&(m+=", "),m+=`${g} does not support codec(s): "${l[g].join(",")}"`,m),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:h},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const h=[];if(["video","audio"].forEach(m=>{const g=(Fi(this.sourceUpdater_.codecs[m]||"")[0]||{}).type,k=(Fi(s[m]||"")[0]||{}).type;g&&k&&g.toLowerCase()!==k.toLowerCase()&&h.push(`"${this.sourceUpdater_.codecs[m]}" -> "${s[m]}"`)}),h.length){this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${h.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 t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach(n=>{const s=e[n];if(t.indexOf(s.id)!==-1)return;t.push(s.id);const a=ns(this.main,s),o=[];a.audio&&!Oo(a.audio)&&!Zr(a.audio,this.usingManagedMediaSource_)&&o.push(`audio codec ${a.audio}`),a.video&&!Oo(a.video)&&!Zr(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 t=[],n=this.main().playlists,s=us(Fi(e)),a=qd(s),o=s.video&&Fi(s.video)[0]||null,l=s.audio&&Fi(s.audio)[0]||null;Object.keys(n).forEach(c=>{const h=n[c];if(t.indexOf(h.id)!==-1||h.excludeUntil===1/0)return;t.push(h.id);const m=[],g=ns(this.mainPlaylistLoader_.main,h),k=qd(g);if(!(!g.audio&&!g.video)){if(k!==a&&m.push(`codec count "${k}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const T=g.video&&Fi(g.video)[0]||null,I=g.audio&&Fi(g.audio)[0]||null;T&&o&&T.type.toLowerCase()!==o.type.toLowerCase()&&m.push(`video codec "${T.type}" !== "${o.type}"`),I&&l&&I.type.toLowerCase()!==l.type.toLowerCase()&&m.push(`audio codec "${I.type}" !== "${l.type}"`)}m.length&&(h.excludeUntil=1/0,this.logger_(`excluding ${h.id}: ${m.join(" && ")}`))}})}updateAdCues_(e){let t=0;const n=this.seekable();n.length&&(t=n.start(0)),Z5(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Nt.GOAL_BUFFER_LENGTH,n=Nt.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Nt.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Nt.BUFFER_LOW_WATER_LINE,n=Nt.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Nt.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(t,Nt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.bufferBasedABR?a:s)}bufferHighWaterLine(){return Nt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Kd(this.inbandTextTracks_,"com.apple.streaming",this.tech_),I5({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,n){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Kd(this.inbandTextTracks_,e,this.tech_),D5({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:n})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));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(t=>{this.contentSteeringController_.on(t,n=>{this.trigger(xt({},n))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const t=this.main();(this.contentSteeringController_.didDASHTagChange(t.uri,t.contentSteering)||(()=>{const a=this.contentSteeringController_.getAvailablePathways(),o=[];for(const l of t.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),h=c&&e!==c;l.excludeUntil===1/0&&l.lastExcludeReason_==="content-steering"&&!h&&(delete l.excludeUntil,delete l.lastExcludeReason_,a=!0);const g=!l.excludeUntil&&l.excludeUntil!==1/0;!s.has(l.id)&&h&&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 t=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){t.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,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const n=e["URI-REPLACEMENT"].PARAMS,s=t["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 t="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_===t&&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_!==t&&(n.excludeUntil=1/0,n.lastExcludeReason_=t,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_===t;s&&a&&(delete n.excludeUntil,ne.log.warn(`enabling non-HD playlist ${n.id} because all playlists were excluded due to ${t} key IDs`))})}addKeyStatus_(e,t){const a=(typeof e=="string"?e:Y5(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${a} added to the keyStatusMap`),this.keyStatusMap_.set(a,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const xE=(r,e,t)=>n=>{const s=r.main.playlists[e],a=mu(s),o=Ya(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?(t(s),r.trigger({type:"renditionenabled",metadata:l})):r.trigger({type:"renditiondisabled",metadata:l})),n};class CE{constructor(e,t,n){const{playlistController_:s}=e,a=s.fastQualityChange_.bind(s);if(t.attributes){const o=t.attributes.RESOLUTION;this.width=o&&o.width,this.height=o&&o.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=ns(s.main(),t),this.playlist=t,this.id=n,this.enabled=xE(e.playlists,t.id,a)}}const EE=function(r){r.representations=()=>{const e=r.playlistController_.main(),t=ms(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return t?t.filter(n=>!mu(n)).map((n,s)=>new CE(r,n,n.id)):[]}},oh=["seeking","seeked","pause","playing","error"];class SE extends ne.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=bi("PlaybackWatcher"),this.logger_("initialize");const t=()=>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 h=m=>{["main","audio"].forEach(g=>{o[`${g}SegmentLoader_`][m]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),h("off"))},this.clearSeekingAppendCheck_=()=>h("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),h("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(oh,a),this.tech_.on("canplay",n),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(oh,a),this.tech_.off("canplay",n),this.tech_.off("play",t),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 t=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_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,n=t[`${e}SegmentLoader_`],s=n.buffered_(),a=cC(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,a){const o={bufferedRanges:s};t.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:In(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"&&t.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(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Hi>=t.end(t.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(Ot([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 t=this.seekable(),n=this.tech_.currentTime(),s=this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let a;if(s&&(a=t.end(t.length-1)),this.beforeSeekableWindow_(t,n)){const I=t.start(0);a=I+(I===t.end(0)?0:Hi)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${n} with seekable range ${ff(t)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const o=this.playlistController_.sourceUpdater_,l=this.tech_.buffered(),c=o.audioBuffer?o.audioBuffered():null,h=o.videoBuffer?o.videoBuffered():null,m=this.media(),g=m.partTargetDuration?m.partTargetDuration:(m.targetDuration-qi)*2,k=[c,h];for(let I=0;I<k.length;I++){if(!k[I])continue;if(fu(k[I],n)<g)return!1}const T=zs(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(),t=this.tech_.buffered(),n=Xn(t,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(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const l=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. 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:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const o=zs(s,t);return o.length>0?(this.logger_(`Stopped at ${t} and seeking to ${o.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0):!1}afterSeekableWindow_(e,t,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),t>a}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:n}){if(!e)return;let s;if(e.length&&t.length){const a=Xn(e,n-3),o=Xn(e,n),l=Xn(t,n);l.length&&!o.length&&a.length&&(s={start:a.end(0),end:l.end(0)})}else zs(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 t=this.tech_.buffered(),n=this.tech_.currentTime(),s=zs(t,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)+qi);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,t){const n=oC(e);for(let s=0;s<n.length;s++){const a=n.start(s),o=n.end(s);if(t-a<4&&t-a>2)return{start:a,end:o}}return null}}const kE={errorInterval:30,getSource(r){const t=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(t)}},rp=function(r,e){let t=0,n=0;const s=st(kE,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()-t<s.errorInterval*1e3){r.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!s.getSource||typeof s.getSource!="function"){ne.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return t=Date.now(),s.getSource.call(r,o)},c=function(){r.off("loadedmetadata",a),r.off("error",l),r.off("dispose",c)},h=function(m){c(),rp(r,m)};r.on("error",l),r.on("dispose",c),r.reloadSourceOnError=h},wE=function(r){rp(this,r)};var sp="3.17.3",DE="7.1.0",AE="1.3.1",NE="7.2.0",IE="4.0.2";const mt={PlaylistLoader:Kn,Playlist:ai,utils:PC,STANDARD_PLAYLIST_SELECTOR:Xd,INITIAL_PLAYLIST_SELECTOR:C5,lastBandwidthSelector:Xd,movingAverageBandwidthSelector:b5,comparePlaylistBandwidth:_u,comparePlaylistResolution:T5,xhr:Of()};Object.keys(Nt).forEach(r=>{Object.defineProperty(mt,r,{get(){return ne.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Nt[r]},set(e){if(ne.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){ne.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Nt[r]=e}})});const ap="videojs-vhs",op=function(r,e){const t=e.media();let n=-1;for(let s=0;s<r.length;s++)if(r[s].id===t.id){n=s;break}r.selectedIndex_=n,r.trigger({selectedIndex:n,type:"change"})},OE=function(r,e){e.representations().forEach(t=>{r.addQualityLevel(t)}),op(r,e.playlists)};mt.canPlaySource=function(){return ne.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const BE=(r,e,t)=>{if(!r)return r;let n={};e&&e.attributes&&e.attributes.CODECS&&(n=us(Fi(e.attributes.CODECS))),t&&t.attributes&&t.attributes.CODECS&&(n.audio=t.attributes.CODECS);const s=or(n.video),a=or(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 st(r,o)},LE=(r,e)=>r.reduce((t,n)=>{if(!n.contentProtection)return t;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&&t.push(s),t},[]),ME=({player:r,sourceKeySystems:e,audioMedia:t,mainPlaylists:n})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const s=t?n.concat([t]):n,a=LE(s,Object.keys(e)),o=[],l=[];return a.forEach(c=>{l.push(new Promise((h,m)=>{r.tech_.one("keysessioncreated",h)})),o.push(new Promise((h,m)=>{r.eme.initializeMediaKeys({keySystems:c},g=>{if(g){m(g);return}h()})}))}),Promise.race([Promise.all(o),Promise.race(l)])},PE=({player:r,sourceKeySystems:e,media:t,audioMedia:n})=>{const s=BE(e,t,n);return s?(r.currentSource().keySystems=s,s&&!r.eme?(ne.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},lp=()=>{if(!W.localStorage)return null;const r=W.localStorage.getItem(ap);if(!r)return null;try{return JSON.parse(r)}catch{return null}},RE=r=>{if(!W.localStorage)return!1;let e=lp();e=e?st(e,r):r;try{W.localStorage.setItem(ap,JSON.stringify(e))}catch{return!1}return e},VE=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,up=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},cp=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},dp=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},hp=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};mt.supportsNativeHls=(function(){if(!ve||!ve.createElement)return!1;const r=ve.createElement("video");return ne.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(r.canPlayType(t))}):!1})();mt.supportsNativeDash=(function(){return!ve||!ve.createElement||!ne.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(ve.createElement("video").canPlayType("application/dash+xml"))})();mt.supportsTypeNatively=r=>r==="hls"?mt.supportsNativeHls:r==="dash"?mt.supportsNativeDash:!1;mt.isSupported=function(){return ne.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};mt.xhr.onRequest=function(r){up(mt.xhr,r)};mt.xhr.onResponse=function(r){cp(mt.xhr,r)};mt.xhr.offRequest=function(r){dp(mt.xhr,r)};mt.xhr.offResponse=function(r){hp(mt.xhr,r)};const FE=ne.getComponent("Component");class fp extends FE{constructor(e,t,n){if(super(t,n.vhs),typeof n.initialBandwidth=="number"&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=bi("VhsHandler"),t.options_&&t.options_.playerId){const s=ne.getPlayer(t.options_.playerId);this.player_=s}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(ve,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=>{const a=ve.fullscreenElement||ve.webkitFullscreenElement||ve.mozFullScreenElement||ve.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_=st(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const n=lp();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=Nt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Nt.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 t=this.options_.customPixelRatio;typeof t=="number"&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;this.setOptions_(),this.options_.src=VE(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=mt,this.options_.sourceType=Bh(t),this.options_.seekTo=a=>{this.tech_.setCurrentTime(a)},this.options_.player_=this.player_,this.playlistController_=new bE(this.options_);const n=st({liveRangeSafeTimeDelta:Hi},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new SE(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=ne.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?mt.movingAverageBandwidthSelector(.55):mt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=mt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(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(){ne.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>In(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>In(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&RE({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{EE(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=W.URL.createObjectURL(this.playlistController_.mediaSource),(ne.browser.IS_ANY_SAFARI||ne.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),ME({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(t=>{this.logger_("error while creating EME key session",t),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,t=PE({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_),!t){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=ne.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{OE(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{op(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":sp,"mux.js":DE,"mpd-parser":AE,"m3u8-parser":NE,"aes-decrypter":IE}}version(){return this.constructor.version()}canChangeType(){return ep.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,t){return HC({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,n=!0,s=2){return Rf({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{up(this.xhr,e)},this.xhr.onResponse=e=>{cp(this.xhr,e)},this.xhr.offRequest=e=>{dp(this.xhr,e)},this.xhr.offResponse=e=>{hp(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],t=["gapjumped","playedrangeschanged"];e.forEach(n=>{this.playlistController_.on(n,s=>{this.player_.trigger(xt({},s))})}),t.forEach(n=>{this.playbackWatcher_.on(n,s=>{this.player_.trigger(xt({},s))})})}}const Sa={name:"videojs-http-streaming",VERSION:sp,canHandleSource(r,e={}){const t=st(ne.options,e);return!t.vhs.experimentalUseMMS&&!Zr("avc1.4d400d,mp4a.40.2",!1)?!1:Sa.canPlayType(r.type,t)},handleSource(r,e,t={}){const n=st(ne.options,t);return e.vhs=new fp(r,e,n),e.vhs.xhr=Of(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const t=Bh(r);if(!t)return"";const n=Sa.getOverrideNative(e);return!mt.supportsTypeNatively(t)||n?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,t=!(ne.browser.IS_ANY_SAFARI||ne.browser.IS_IOS),{overrideNative:n=t}=e;return n}},$E=()=>Zr("avc1.4d400d,mp4a.40.2",!0);$E()&&ne.getTech("Html5").registerSourceHandler(Sa,0);ne.VhsHandler=fp;ne.VhsSourceHandler=Sa;ne.Vhs=mt;ne.use||ne.registerComponent("Vhs",mt);ne.options.vhs=ne.options.vhs||{};(!ne.getPlugin||!ne.getPlugin("reloadSourceOnError"))&&ne.registerPlugin("reloadSourceOnError",wE);const UE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4AQMAAADSHVMAAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAASYSURBVHic7c8BDQAgDMAw7t80Lk5SVgXbnM/M64BtDesa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNay7Fz0EOVPDeGwAAAAASUVORK5CYII=",qE={class:"o-meeting-playback-video"},HE={key:0,class:"poster-title"},jE=i.defineComponent({__name:"OMeetingPlaybackVideo",props:{src:{default:""},vtt:{default:""},captions:{default:()=>[]},poster:{},posterTitle:{},instance:{},trackIdx:{}},emits:["getDuration","getInstance","setTrackIdx"],setup(r,{expose:e,emit:t}){const n=r,s=i.ref(),a=i.ref(),o=i.ref(),l=t,c=i.ref(!1),h=()=>{c.value=!1},m=(_,S=!1)=>{var O,H;const R=n.instance;if(!R)return;const L=(O=_.activeCues)==null?void 0:O[0];if(s.value&&clearInterval(s.value),L){L.text=((H=L==null?void 0:L.text)==null?void 0:H.replace(/\[(SPEAKER_)\d+]: /g,""))||"";const M=L.text.split(`
224
+ `),P=M.length,N=L.endTime-L.startTime,X=parseFloat((N/P).toFixed(3));let b=0;if(S){const U=(R.currentTime()-L.startTime)/(L.endTime-L.startTime);for(;(b+1)/P<U;)b++}b<P?L.text=M.length?M[b]:L==null?void 0:L.text:L.text=M.length?M[0]:L==null?void 0:L.text;let C=X*1e3;const $=()=>{s.value=setInterval(()=>{_.mode="hidden",b++,b>M.length-1?clearInterval(s.value):b===M.length-1?(L.text=M[b],clearInterval(s.value),C=X*(P-b)*1e3,$()):L.text=M[b],_.mode="showing"},C)};$()}},g=i.ref([]);i.watch(()=>g.value,_=>{const S=n.instance;if(S){const R=S.textTracks();for(let L=0;L<R.length;L++)R[L].kind==="subtitles"&&(m(R[L],!0),R[L].mode=_.length?"showing":"hidden")}},{deep:!0});const k=i.ref(!1),T=i.ref("init"),I=async()=>{if(!n.src)return;const _=ne("playerId",{controls:!0,autoplay:!1,preload:"auto",fluid:!0,poster:n.poster||UE,playbackRates:[.5,.75,1,1.25,1.5,2],controlBar:{skipButtons:{backward:5,forward:5},children:{playToggle:!0,SkipBackward:{backward:5},skipForward:{forward:5},currentTimeDisplay:!0,timeDivider:!0,durationDisplay:!0,progressControl:!0,PlaybackRateMenuButton:!0,volumePanel:{inline:!1},FullscreenToggle:!0}}});l("getInstance",_),_.src(n.src),_.addRemoteTextTrack({kind:"subtitles",src:n.vtt,srclang:"zh",label:"中文",default:!1}),k.value=!0;class S extends ne.getComponent("Button"){constructor(O,H){super(O,H),this.addClass("vjs-subtitle-toggle-button","vjs-subtitle-hidden"),this.controlText("Toggle Subtitles")}buildCSSClass(){return`vjs-subtitle-toggle-button ${super.buildCSSClass()}`}handleClick(){const O=this.player().textTracks();for(let H=0;H<O.length;H++)O[H].kind==="subtitles"&&(m(O[H],!0),O[H].mode=O[H].mode==="showing"?"hidden":"showing",O[H].mode==="showing"?(this.removeClass("vjs-subtitle-hidden"),this.addClass("vjs-subtitle-showing")):(this.removeClass("vjs-subtitle-showing"),this.addClass("vjs-subtitle-hidden")))}}n.vtt&&(ne.registerComponent("SubtitleToggleButton",S),_.controlBar.children_.some(L=>L.name_==="SubtitleToggleButton")||_.controlBar.addChild("SubtitleToggleButton",{},8)),(_==null?void 0:_.textTracks().tracks_).forEach(L=>{L==null||L.addEventListener("cuechange",()=>{m(L)})}),_.on("play",()=>{T.value="playing"}),_.on("timeupdate",()=>{const L=_.currentTime()||0,O=n.captions.findIndex(H=>il(H.start_time)>L);l("setTrackIdx",O)}),_.one("loadedmetadata",()=>{l("getDuration",_.duration())}),i.nextTick(()=>{const L=document.getElementsByClassName("o-meeting-playback-video")[0];a.value=L.offsetHeight}),o.value=_};return i.onMounted(()=>{I(),document.addEventListener("click",h)}),i.watch(()=>n.src,()=>{I()}),i.onUnmounted(()=>{var _;(_=n==null?void 0:n.instance)==null||_.dispose(),document.removeEventListener("click",h)}),e({changeTime:_=>{var S;(S=o.value)==null||S.currentTime(_)}}),(_,S)=>(i.openBlock(),i.createElementBlock("div",qE,[i.createElementVNode("div",{class:i.normalizeClass(["video-placeholder",{loaded:k.value,"no-poster":!r.poster,[T.value]:!0}])},[S[0]||(S[0]=i.createElementVNode("video",{class:"video-js",id:"playerId"},null,-1)),r.posterTitle?(i.openBlock(),i.createElementBlock("div",HE,i.toDisplayString(r.posterTitle),1)):i.createCommentVNode("",!0)],2)]))}}),zE={class:"o-meeting-playback"},GE={class:"video-header"},WE={class:"video-title"},YE={class:"video-content"},XE={class:"info-wrapper"},KE={class:"tab-content"},QE={key:0,class:"base-info"},ZE={class:"info-item"},JE={class:"info-item"},eS={class:"info-item"},tS={class:"info-item"},iS={key:1,class:"subject-list"},nS={class:"subject-title"},rS={key:0,class:"subject-progress"},sS=["data-start","data-end"],lh=i.defineComponent({__name:"OMeetingPlayback",props:{dates:{default:()=>[]},detail:{default:()=>({})},data:{default:()=>({})}},emits:["change-date"],setup(r,{emit:e}){const t=r,n=e,{t:s}=He.useI18n(),a=i.ref(null),o=q=>{a.value=q},l=i.ref(0),c=q=>{l.value=q},h=i.ref([]),m=async q=>{const G=await(await fetch(q)).json();h.value=(G.segments||[]).map(J=>{const ie=Uv(J.speaker);return{...J,contentHtml:J.content,speakerIdx:ie,speakerLabel:`${s("meeting.speaker")}${ie}`}})},g=i.ref([]),k=q=>G2[q%3],T=i.ref(0),I=q=>{T.value=q},_=i.ref(),S=i.ref(""),R=i.ref([0,0]);function L(q,Z){const G=Z.getBoundingClientRect(),ie=(q.clientX-G.left)/G.width;return R.value[1]=`${Z.offsetTop+Z.parentElement.offsetTop}px`,R.value[0]=`${ie*100}%`,ie*T.value}const O=q=>{let Z=q;for(;Z&&Z.className!=="subject-progress";)Z=Z.parentElement;return Z},H=q=>{let Z=O(q.target);Z&&(S.value=qv(L(q,Z)))},M=()=>{S.value=""},P=q=>{var G;let Z=O(q.target);Z&&((G=_.value)==null||G.changeTime(L(q,Z)))},N=async q=>{const G=await(await fetch(q)).json();g.value=(G||[]).map(J=>({...J,startTime:il(J.startTime),endTime:il(J.endTime)}))},X=i.ref("info"),b=i.computed(()=>{const q=[{label:s("meeting.baseInfo"),value:"info"}];return g.value.length&&q.push({label:s("meeting.subject"),value:"subject"}),q}),C=()=>{t.data&&(t.data.textJson&&m(t.data.textJson),t.data.topicJson&&N(t.data.topicJson))};i.watchEffect(()=>{C()});const $=q=>{n("change-date",q)},U=i.ref(null),E=i.ref("auto");let w=null,F=null;const z=()=>{U.value&&(E.value=`${U.value.offsetHeight}px`)},Q=()=>{cancelAnimationFrame(F),F=requestAnimationFrame(z)};return i.onMounted(()=>{U.value&&(w=new ResizeObserver(Q),w.observe(U.value),z())}),i.onUnmounted(()=>{cancelAnimationFrame(F),w==null||w.disconnect()}),(q,Z)=>{var G,J,ie,oe,Ee;return i.openBlock(),i.createElementBlock("div",zE,[i.createElementVNode("div",{class:"left-card card-wrapper",ref_key:"leftRef",ref:U},[i.createElementVNode("div",GE,[i.createElementVNode("div",WE,i.toDisplayString((G=r.detail)==null?void 0:G.topic)+"("+i.toDisplayString((J=r.detail)==null?void 0:J.date)+")",1),(ie=r.dates)!=null&&ie.length?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",clearable:!1,"model-value":(oe=r.detail)==null?void 0:oe.date,placeholder:i.unref(s)("meeting.selectDate"),onChange:$},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.dates,ue=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:ue,value:ue,label:ue},null,8,["value","label"]))),128))]),_:1},8,["model-value","placeholder"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",YE,[r.data?(i.openBlock(),i.createBlock(jE,{key:0,ref_key:"playerRef",ref:_,src:r.data.video,vtt:r.data.textVtt,poster:r.data.poster,captions:h.value,onGetDuration:I,instance:a.value,onGetInstance:o,trackIdx:l.value,onSetTrackIdx:c},null,8,["src","vtt","poster","captions","instance","trackIdx"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",XE,[i.createVNode(i.unref(A.OTab),{modelValue:X.value,"onUpdate:modelValue":Z[0]||(Z[0]=ue=>X.value=ue)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value,ue=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:ue.value,value:ue.value,label:ue.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]),i.createElementVNode("div",KE,[X.value===b.value[0].value?(i.openBlock(),i.createElementBlock("div",QE,[i.createElementVNode("div",ZE,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item1")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.sponsor),1)]),i.createElementVNode("div",JE,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item2")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.groupName),1)]),i.createElementVNode("div",eS,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item3")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.date)+"  "+i.toDisplayString(r.detail.start)+"~"+i.toDisplayString(r.detail.end),1)]),i.createElementVNode("div",tS,[i.createElementVNode("span",null,i.toDisplayString(i.unref(s)("meeting.item4")),1),i.createElementVNode("span",null,i.toDisplayString(r.detail.agenda||"-"),1)])])):i.createCommentVNode("",!0),X.value===((Ee=b.value[1])==null?void 0:Ee.value)?(i.openBlock(),i.createElementBlock("div",iS,[S.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"mouse-current-time",style:i.normalizeStyle({top:R.value[1],left:R.value[0]})},i.toDisplayString(S.value),5)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.value,(ue,$e)=>(i.openBlock(),i.createElementBlock("div",{class:"subject-item",key:ue.title},[i.createElementVNode("div",nS,i.toDisplayString(ue.title),1),T.value?(i.openBlock(),i.createElementBlock("div",rS,[i.createElementVNode("div",{class:"subject-progress-item",onClick:P,onMousemove:H,onMouseleave:M,"data-start":ue.startTime,"data-end":ue.endTime,style:i.normalizeStyle({"--start":(ue.startTime<0?0:ue.startTime)/T.value,"--end":(ue.endTime>T.value?T.value:ue.endTime)/T.value,background:k($e)})},null,44,sS)])):i.createCommentVNode("",!0)]))),128))])):i.createCommentVNode("",!0)])])],512),i.createElementVNode("div",{class:"right-card card-wrapper",style:i.normalizeStyle({height:E.value})},[i.createVNode(Mb,{captions:h.value,trackIdx:l.value,instance:a.value},null,8,["captions","trackIdx","instance"])],4)])}}}),aS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function oS(r,e){return i.openBlock(),i.createElementBlock("svg",aS,[...e[0]||(e[0]=[i.createElementVNode("path",{d:"M12.032 2.355c1.632 0 3.205 0.404 4.611 1.166 0.34 0.182 0.466 0.609 0.281 0.949s-0.609 0.463-0.949 0.281c-1.201-0.65-2.546-0.996-3.943-0.996-4.585 0-8.3 3.715-8.3 8.297 0 4.588 3.715 8.303 8.3 8.303s8.3-3.715 8.3-8.303c0-2.063-0.753-4.002-2.098-5.514-0.258-0.287-0.231-0.732 0.059-0.984 0.287-0.258 0.729-0.234 0.987 0.053 1.57 1.764 2.452 4.037 2.452 6.445 0 5.361-4.342 9.703-9.7 9.703s-9.7-4.342-9.7-9.703c0-5.355 4.342-9.697 9.7-9.697zM10.866 7.658c0-0.627 0.507-1.131 1.134-1.131s1.134 0.504 1.134 1.131c0 0.627-0.507 1.131-1.134 1.131s-1.134-0.504-1.134-1.131zM12.706 10.002c-0.044-0.346-0.337-0.609-0.691-0.609-0.387 0-0.7 0.311-0.703 0.697l-0.023 6.762 0.006 0.1c0.044 0.34 0.337 0.603 0.691 0.603 0.387 0.006 0.7-0.311 0.703-0.697l0.023-6.762-0.006-0.094z"},null,-1)])])}const lS={name:"components-icon-tips",render:oS},uS={class:"o-sig-meeting-aside"},cS={class:"month"},dS={class:"days"},hS=["onClick"],fS={class:"day-d"},pS={class:"day-c"},mS={class:"arrow-wrapper"},Ys=1,gS=i.defineComponent({__name:"OSigMeetingAside",props:{data:{},current:{},total:{},active:{},meetingDates:{},eventsDates:{}},emits:["click-date","change-month"],setup(r,{emit:e}){const t=r,n=e,s=o=>{n("click-date",o)},a=o=>{t.current+o>=t.total||t.current+o<0||n("change-month",o)};return(o,l)=>(i.openBlock(),i.createElementBlock("div",uS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(c,h)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:h},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c,m=>(i.openBlock(),i.createElementBlock("div",{key:m.month,class:"month-item"},[i.createElementVNode("div",cS,i.toDisplayString(m.month.replace(/-/g,"/")),1),i.createElementVNode("div",dS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.days,g=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-item",r.active===`${m.month}-${g}`&&"active"]),key:g,onClick:k=>s(`${m.month}-${g}`)},[i.createElementVNode("div",fS,i.toDisplayString(g),1),i.createElementVNode("div",pS,[r.meetingDates.includes(`${m.month}-${g}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).MEETING,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).MEETING,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(ri)(i.unref(Ve).MEETING,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0),r.eventsDates.includes(`${m.month}-${g}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,style:i.normalizeStyle({zIndex:i.unref(ri)(i.unref(Ve).EVENTS,"zIndex"),backgroundColor:i.unref(ri)(i.unref(Ve).EVENTS,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(ri)(i.unref(Ve).EVENTS,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0)])],10,hS))),128))])]))),128))],64))),128)),i.createElementVNode("div",mS,[i.createVNode(i.unref(A.OIcon),{onClick:l[0]||(l[0]=c=>a(0-Ys)),class:i.normalizeClass(r.current-Ys<0&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1},8,["class"]),i.createVNode(i.unref(A.OIcon),{onClick:l[1]||(l[1]=c=>a(Ys)),class:i.normalizeClass(r.current+Ys>=r.total&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1},8,["class"])])]))}}),vS={class:"o-sig-meeting-calendar"},_S={key:0,class:"meeting-card-header"},yS={key:0,class:"header-left"},TS={key:1,class:"date-select"},bS={class:"meeting-card-content"},xS={class:"list-content"},uh=i.defineComponent({__name:"OSigMeetingCalendar",props:{sigName:{},getMeetingListRequest:{},getDateListRequest:{},getEventsListRequest:{},dates:{}},setup(r){const e=r,{t}=He.useI18n(),{lePadV:n}=Ct.useScreen(),s=i.ref(""),a=i.ref(!1),o=i.ref([]),l=i.computed(()=>n.value?100:5),c=i.ref(""),h=i.ref([]),m=i.ref([]),g=i.ref([]),k=i.ref(-1),T=C=>{_(C)},I=C=>{_(C)},_=async C=>{if(e.getMeetingListRequest)try{a.value=!0,s.value=Te(C).format("YYYY-MM-DD");const $=await e.getMeetingListRequest(s.value,e.sigName);o.value=$.map(U=>({...U,time:`${U.start}-${U.end}`,date:U.date||s.value,type:Ve.MEETING}))}finally{a.value=!1,g.value.forEach($=>{$.dates.includes(s.value)&&o.value.push($)})}},S=async()=>{e.getDateListRequest&&(h.value=await e.getDateListRequest()),e.getEventsListRequest&&(g.value=await e.getEventsListRequest(),m.value=(g.value||[]).map(C=>C.dates).flat())},R=i.ref(Ve.ALL),L=()=>{S()};i.watch(()=>n.value,()=>{n.value&&L(Ve.ALL)});const O=C=>{const $=Te(C).format("YYYY-MM-DD");return[$.slice(0,7),$.slice(8,10)]},H=i.computed(()=>{let C=[];return R.value===Ve.ALL?C=[...h.value||[],...m.value]:R.value===Ve.MEETING?C=h.value||[]:C=m.value,[...new Set(C)].sort(($,U)=>Te($).isAfter(Te(U))?1:-1).map($=>Te($).format("YYYY-MM-DD"))}),M=()=>{let C=H.value.find($=>$===Te().format("YYYY-MM-DD"));C||(C=H.value.find($=>Te($).isAfter(Te()))||[...H.value].reverse().find($=>Te().isAfter(Te($)))),c.value=C};i.watch(()=>H.value,C=>{C.length&&(M(),i.nextTick(()=>{_(c.value)}))});const P=i.computed(()=>{const C=H.value.reduce((w,F)=>{var q,Z;const[z,Q]=O(F);return w[z]={count:(((q=w[z])==null?void 0:q.count)||0)+1,days:[...((Z=w[z])==null?void 0:Z.days)||[],Q]},w},{}),$=Object.keys(C).map(w=>({...C[w],month:w})),U=[];let E=[];return $.forEach(w=>{for(;w.days.length;)if(!E.length)w.days.splice(0,6).forEach(F=>{E.push({month:w.month,day:F})}),E.length>=5&&(U.push(E),E=[]);else{let F=E.length;F%2===1&&(F+=1),w.days.length+E.length<=6?(w.days.splice(0,6).forEach(z=>{E.push({month:w.month,day:z})}),E.length>=5&&(U.push(E),E=[])):(w.days.splice(0,6-F).forEach(z=>{E.push({month:w.month,day:z})}),E.length>=5&&(U.push(E),E=[]))}}),E.length&&(U.push(E),E=[]),U}),N=i.computed(()=>P.value.map(C=>{const $=C.reduce((U,E)=>(U[E.month]=U[E.month]||[],U[E.month].push(E.day),U),{});return Object.keys($).map(U=>({month:U,days:$[U]||[]}))})),X=()=>{P.value.length?(k.value=P.value.findIndex(C=>C.some($=>c.value===`${$.month}-${$.day}`)),k.value===-1&&(k.value=P.value.findIndex(C=>C.some($=>c.value.includes($.month))))):k.value=-1};i.watch([()=>P.value,()=>c.value],()=>{X()},{deep:!0});const b=C=>{k.value+=C};return i.onMounted(()=>{S()}),(C,$)=>{const U=i.resolveComponent("ElOption"),E=i.resolveComponent("ElSelect");return i.openBlock(),i.createElementBlock("div",vS,[i.unref(n)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",_S,[c.value?(i.openBlock(),i.createElementBlock("div",yS,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("meeting.latestMeeting")),1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(c.value).format("YYYY/MM/DD")),1),i.createVNode(i.unref(A.OPopover),null,{target:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),{class:"tips"},{default:i.withCtx(()=>[i.createVNode(i.unref(lS))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",null,[i.createElementVNode("p",null,i.toDisplayString(i.unref(t)("meeting.detailHalfYearMeetings")),1)])]),_:1})])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OTab),{modelValue:R.value,"onUpdate:modelValue":$[0]||($[0]=w=>R.value=w),onChange:L,line:!1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(na).slice(0,-1),w=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:w.value,value:w.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(w.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(w.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])),i.unref(n)&&H.value.length?(i.openBlock(),i.createElementBlock("div",TS,[i.createVNode(E,{modelValue:s.value,"onUpdate:modelValue":$[1]||($[1]=w=>s.value=w),onChange:I},{label:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+" "+i.toDisplayString(s.value),1)]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(H.value,w=>(i.openBlock(),i.createBlock(U,{key:w,value:w,label:i.unref(Te)(w).format("YYYY/MM/DD")},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])):i.createCommentVNode("",!0),!i.unref(n)||i.unref(n)&&H.value.length?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:2,class:"meeting-divider"})):i.createCommentVNode("",!0),i.createElementVNode("div",bS,[!i.unref(n)&&k.value!==-1?(i.openBlock(),i.createBlock(gS,{key:0,data:N.value.slice(k.value,k.value+1),meetingDates:R.value!==i.unref(Ve).EVENTS?h.value:[],eventsDates:R.value!==i.unref(Ve).MEETING?m.value:[],onClickDate:T,onChangeMonth:b,current:k.value,total:N.value.length,active:s.value},null,8,["data","meetingDates","eventsDates","current","total","active"])):i.createCommentVNode("",!0),i.createElementVNode("div",xS,[i.createVNode(wh,{list:o.value,rows:l.value},{empty:i.withCtx(()=>[i.renderSlot(C.$slots,"empty")]),_:3},8,["list","rows"])])])])}}}),CS={class:"o-my-meeting-calendar"},ES={class:"meeting-list"},SS={class:"list-calendar-mb"},kS={class:"list-calendar"},wS=["onClick"],DS={class:"date-cell-text"},AS={class:"list-body"},NS=["id"],IS={class:"item-header-left"},OS={class:"meeting-icon"},BS={class:"header-info"},LS={key:0},MS={class:"title-wrapper"},PS={class:"title-text"},RS={key:1,class:"tag-wrapper"},VS={class:"meeting-info"},FS={key:0,class:"item-header-right"},$S={class:"meeting-detail"},US={key:0,class:"meeting-btn"},qS={key:0,class:"load-text"},HS={class:"dialog-content"},ch=i.defineComponent({__name:"OMyMeetingCalendar",props:{cancelSubMeetingRequest:{},deleteMeetingRequest:{},getMeetingListRequest:{},groupType:{default:Oi.SIG}},emits:["edit"],setup(r,{emit:e}){const t=A.useMessage(null),n=i.ref(!1),s=i.ref(1),a=i.ref(50),o=i.ref(null),l=i.ref([]),c=i.ref([]),h=i.computed(()=>o.value===null||c.value.length<o.value),m=i.ref(!1),{t:g,locale:k}=He.useI18n(),T=i.computed(()=>k.value===He.Locales.EN),I=r,_=i.ref(!1),{isPhone:S}=Ct.useScreen(),R=i.ref([]),L=e,O=i.ref(!1),H=i.ref(!1),M=i.ref(),P=i.ref(0),N=()=>{var fe;P.value=((fe=M.value)==null?void 0:fe.clientHeight)||0},X=async()=>{if(I.getMeetingListRequest&&!O.value)try{if(o.value>0&&(s.value-1)*a.value>o.value)return;if(!h.value&&S.value){Be("next-month");return}n.value=!0,O.value=!0;const fe=await I.getMeetingListRequest({page:s.value,size:a.value,order_by:"date",order_type:"asc",month:Te(me.value).format("YYYY-MM")}),ye=(fe.data||[]).map(ge=>{var jt,Xi,Rt;const{is_cycle:qe,date:Ne,start:ft,end:Dt,cycle_sub:pi,cycle_start_date:Xe,cycle_end_date:xi,cycle_start:Ht,cycle_end:Ci,cycle_type:yt,cycle_interval:ei,cycle_point:li}=ge;if(qe){let Ei="",x="";yt===gn&&(x=g("meeting.cycleDay")),yt===_n&&(ei>1?x=g("meeting.cycleWeek.other",[Qn(yt,li),ei]):x=g("meeting.cycleWeek.one",[Qn(yt,li)])),yt===rn&&(x=g("meeting.cycleMonth",[Qn(yt,li)])),Ei=g("meeting.cycleMeetingText2",{startDate:Xe,endDate:xi,startTime:Ht,endTime:Ci,cycleType:x});const D=(jt=ge.obs_data)==null?void 0:jt.filter(K=>K.text_video_url);return pi.filter(K=>Te(K.date).isBefore(Te(me.value).add(1,"month").format("YYYY-MM-01"))&&!Te(K.date).isBefore(Te(me.value).format("YYYY-MM-01"))).map(({id:K,...re})=>({...ge,...re,timeRange:Ei,dateRange:`${re.start}-${re.end}`,hasObsData:D.find(xe=>xe.sub_id===re.sub_id),time:`${re.start}-${re.end}`,isExpired:Te(`${re.date} ${re.start}`).isBefore(Te())}))}return[{...ge,dateRange:`${ft} - ${Dt}`,timeRange:`${ft} - ${Dt}`,hasObsData:((Rt=(Xi=ge.obs_data)==null?void 0:Xi.filter(Ei=>Ei.text_video_url))==null?void 0:Rt.length)>0,time:`${ft}-${Dt}`,isExpired:Te(`${Ne} ${ft}`).isBefore(Te())}]}).flat().filter(ge=>ge.date.slice(0,7)===pt(me.value,"YYYY-MM-DD").slice(0,7));m.value?(c.value=fe.data||[],l.value=ye):s.value===1&&!S.value?(c.value=fe.data||[],l.value=ye):(c.value=[...c.value,...fe.data||[]],l.value=[...l.value,...ye]),l.value.sort((ge,qe)=>ge.date===qe.date?On(ge.start)>On(qe.start)?1:-1:Te(ge.date).isAfter(Te(qe.date))?1:-1),o.value=(fe==null?void 0:fe.total)||0,i.nextTick(()=>{_e(),de.value&&!S.value&&E()})}finally{n.value=!1,O.value=!1,H.value=!1,m.value=!1}},b=zi.useDebounceFn(()=>{h.value&&(S.value||(H.value=!0,s.value++,X()))},200),C=zi.useDebounceFn(()=>{if(!h.value||!S.value)return;const fe=window.scrollY||window.pageYOffset,ye=window.innerHeight;document.documentElement.scrollHeight-(fe+ye)<=300&&!O.value&&(H.value=!0,s.value++,X())},200),$=fe=>{const ye=l.value.filter(ge=>ge.date===fe);return ye.length&&ye.every(ge=>ge.is_delete)},U=fe=>{const ye=fe.target;if(!ye)return;const ge=ye.scrollTop,qe=ye.scrollHeight,Ne=ye.clientHeight;ge+Ne>=qe&&b()},E=()=>{de.value.getContainerEl().addEventListener("scroll",U)},w=i.ref({}),F=(fe,ye)=>{fe&&ye&&(w.value[ye]=fe)},z=async fe=>{await w.value[fe].copyInfo(),t.success({content:g("common.copySuccess")})},Q=i.ref(!1),q=i.ref(null),Z=fe=>{L("edit",fe,"whole")},G=fe=>{q.value=fe,Q.value=!0},J=async()=>{if(I.deleteMeetingRequest)try{_.value=!0,await I.deleteMeetingRequest(q.value.id),Q.value=!1,t.success({content:`${g("meeting.meetingCancel",[q.value.topic])}`}),m.value=!0,X()}finally{_.value=!1}},ie=i.ref(!1),oe=i.ref(""),Ee=i.ref(null),ue=[{label:g("meeting.meetingSingle"),value:"single"},{label:g("meeting.meetingCycle"),value:"whole"}],$e=i.ref("single"),Ie=(fe,ye)=>{fe.is_cycle?(Ee.value=fe,oe.value=ye,ie.value=!0):ye==="cancel"?G(fe):Z(fe)},Oe=()=>{ie.value=!1,Ee.value=null,oe.value="",$e.value="single"},Ye=async()=>{const fe=Ee.value;if(oe.value==="cancel")try{if(_.value=!0,$e.value==="single"&&fe.is_cycle){if(!I.cancelSubMeetingRequest)return;await I.cancelSubMeetingRequest(fe.sub_id),t.success({content:`${g("meeting.meetingCancel",[fe.topic])}`})}else{if(!I.deleteMeetingRequest)return;await I.deleteMeetingRequest(fe.id),t.success({content:`${g("meeting.meetingCancel",[fe.topic])}`})}Oe(),m.value=!0,X()}finally{_.value=!1}else L("edit",fe,$e.value),Oe()},Fe=i.ref(),Ze=i.computed(()=>[...new Set(l.value.map(fe=>fe.date))].sort((fe,ye)=>Te(fe).isBefore(Te(ye))?-1:1)),Je=i.computed(()=>[...new Set(l.value.filter(fe=>!fe.isExpired&&!fe.is_delete).map(fe=>fe.date))].sort((fe,ye)=>Te(fe).isBefore(Te(ye))?-1:1)),me=i.ref(),_e=()=>{var ge;const fe=Je.value.find(qe=>!Te(qe).isBefore(Te(new Date).format("YYYY-MM-DD")));fe?me.value=fe:me.value||(me.value=Te().format("YYYY-MM-DD")),(ge=Fe.value)==null||ge.pickDay(Te(me.value)),me.value=Te(me.value).format("YYYY-MM-DD");const ye=l.value.find(qe=>qe.date===me.value&&!qe.isExpired&&!qe.is_delete);ye&&(R.value=[ye.sub_id||ye.id])},be=(fe,ye)=>{var ge;(!ye||!((ge=fe.target)!=null&&ge.className.includes("date-cell-text")))&&(fe.stopPropagation(),fe.preventDefault())},Be=fe=>{Fe.value&&(s.value=1,o.value=null,window.scrollTo({top:0,behavior:"smooth"}),Fe.value.selectDate(fe),m.value=!0,i.nextTick(()=>{me.value=Te(Fe.value.selectedDay).format("YYYY-MM-DD"),X()}))},it=i.computed(()=>l.value.reduce((fe,ye)=>{if(fe.length){const ge=fe.at(-1);return ge.date===ye.date?ge.list.push(ye):fe.push({date:ye.date,list:[ye]}),fe}else return[{date:ye.date,list:[ye]}]},[])),he=fe=>bh[Te(fe).day()],de=i.ref();i.watch(()=>me.value,()=>{ce(me.value)});const ce=fe=>{var qe,Ne,ft;const ye=Te(fe).format("YYYY-MM-DD"),ge=document.querySelector(`#group-title-${ye}`);ge&&(S.value?window.scrollTo({top:(((qe=ge.parentElement)==null?void 0:qe.offsetTop)||0)-52,behavior:"smooth"}):(ft=de.value)==null||ft.scrollTo({top:((Ne=ge.parentElement)==null?void 0:Ne.offsetTop)||0,behavior:"smooth"}))};i.onMounted(()=>{X(),window.addEventListener("scroll",C),window.addEventListener("resize",C),N(),window.addEventListener("resize",N)}),i.onUnmounted(()=>{var ye;window.removeEventListener("scroll",C),window.removeEventListener("resize",C),window.removeEventListener("resize",N);const fe=(ye=de.value)==null?void 0:ye.getContainerEl();fe==null||fe.removeEventListener("scroll",U)});const De=fe=>(fe=Te(fe||void 0),T.value?fe.format("MMMM YYYY"):fe.format("YYYY MM月")),Ce=i.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:_.value,onClick:()=>{Ye()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Oe()}}]),et=i.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:_.value,onClick:()=>{J()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Q.value=!1}}]);return(fe,ye)=>(i.openBlock(),i.createElementBlock("div",CS,[i.createElementVNode("div",ES,[i.createElementVNode("div",SS,[i.createElementVNode("span",null,i.toDisplayString(De(me.value)),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:ye[0]||(ye[0]=ge=>Be("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ye[1]||(ye[1]=ge=>Be("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),i.createElementVNode("div",kS,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendarRef",ref:Fe,modelValue:me.value,"onUpdate:modelValue":ye[4]||(ye[4]=ge=>me.value=ge)},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(De(me.value)),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:ye[2]||(ye[2]=ge=>Be("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ye[3]||(ye[3]=ge=>Be("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:ge})=>[i.createElementVNode("div",{onClick:qe=>be(qe,Ze.value.includes(ge.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":ge.isSelected,"is-today":i.unref(pt)(ge.day)===i.unref(pt)(),clickable:Ze.value.includes(ge.day),expired:i.unref(Te)(i.unref(pt)()).isAfter(i.unref(Te)(ge.day)),"all-deleted":$(ge.day)})},[i.createElementVNode("div",DS,i.toDisplayString(Number(ge.day.split("-")[2])),1)],10,wS)]),_:1},8,["modelValue"])]),i.createElementVNode("div",{class:i.normalizeClass(["list-wrapper",l.value.length?"":"is-empty"])},[l.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:de,onScrollend:i.unref(b),style:i.normalizeStyle({"--header-height":P.value}),class:"scroller-container","show-type":"hover"},{default:i.withCtx(()=>[i.createElementVNode("div",AS,[i.createVNode(i.unref(A.OCollapse),{modelValue:R.value,"onUpdate:modelValue":ye[7]||(ye[7]=ge=>R.value=ge),accordion:i.unref(S)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(it.value,(ge,qe)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:ge.date},[qe===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ye[5]||(ye[5]=Ne=>Be("prev-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(g)("meeting.preMonth")),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["group-item",qe===it.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"group-bar":!0,"is-active":i.unref(Te)(me.value).format("YYYY-MM-DD")===ge.date,"is-end":ge.list.every(Ne=>Ne.isExpired)})},[...ye[11]||(ye[11]=[i.createElementVNode("div",{class:"group-bar-line"},null,-1),i.createElementVNode("div",{class:"group-bar-dot"},null,-1)])],2),i.createElementVNode("div",{class:i.normalizeClass({"group-title":!0,"is-end":ge.list.every(Ne=>Ne.isExpired)}),id:`group-title-${i.unref(Te)(new Date(ge.date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(Te)(ge.date).format("MM/DD"))+" "+i.toDisplayString(he(ge.date)),11,NS),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(ge.list,(Ne,ft)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:Ne.sub_id||Ne.id,value:Ne.sub_id||Ne.id,class:i.normalizeClass({"last-item":qe===it.value.length-1&&ft===ge.list.length-1})},{title:i.withCtx(()=>[i.createElementVNode("div",IS,[i.createElementVNode("div",OS,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Bl))]),_:1})]),i.createElementVNode("div",BS,[i.createElementVNode("div",{class:i.normalizeClass({"meeting-title":!0,"is-delete":Ne.is_delete,"is-end":Ne.isExpired})},[Ne.is_delete?(i.openBlock(),i.createElementBlock("div",LS,i.toDisplayString(i.unref(g)("meeting.meetingCancelled")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",MS,[i.createElementVNode("div",PS,i.toDisplayString(Ne.topic),1)]),Ne.is_cycle?(i.openBlock(),i.createElementBlock("div",RS,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],2),i.createElementVNode("div",VS,[i.createElementVNode("span",null,i.toDisplayString(Ne.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString(r.groupType===i.unref(Oi).GROUP?i.unref(g)("meeting.groups"):i.unref(g)("meeting.sigs"))+": "+i.toDisplayString(Ne.group_name),1)])])]),Ne.is_delete?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",FS,[Ne.isExpired?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[Ne.etherpad?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,target:"_blank",href:Ne.etherpad},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.meetingSummary"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0),Ne.hasObsData?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,target:"_blank",href:`/${i.unref(k)}/video/${Ne.group_name}/${Ne.mid}/${Ne.date}`},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.viewRecord"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0)],64)):(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,target:"_blank",href:Ne.join_url,rel:"noopener noreferrer"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.joinMeeting"))+" ",1)]),_:1},8,["href"]))])),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>z(ft),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Ll))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",$S,[i.createVNode(rs,{show:R.value.includes(Ne.sub_id||Ne.id),data:Ne,ref_for:!0,ref:Dt=>F(Dt,Ne.id),from:"my"},null,8,["show","data"]),!Ne.isExpired&&!Ne.is_delete?(i.openBlock(),i.createElementBlock("div",US,[i.createVNode(i.unref(A.OLink),{onClick:Dt=>Ie(Ne,"edit")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.editMeeting")),1)]),_:1},8,["onClick"]),i.createVNode(i.unref(A.OLink),{onClick:Dt=>Ie(Ne,"cancel")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.cancelMeeting")),1)]),_:1},8,["onClick"])])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ye[12]||(ye[12]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),qe===it.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[H.value?(i.openBlock(),i.createElementBlock("div",qS,i.toDisplayString(i.unref(g)("common.loading")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:ye[6]||(ye[6]=Ne=>Be("next-month"))},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(g)("meeting.nextMonth")),1)])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):n.value?i.createCommentVNode("",!0):i.renderSlot(fe.$slots,"empty",{key:1})],2),i.createVNode(i.unref(A.ODialog),{visible:ie.value,"onUpdate:visible":ye[9]||(ye[9]=ge=>ie.value=ge),"main-class":"handle-dialog",onClose:Oe,actions:Ce.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.meetingHandleText",[oe.value==="edit"?i.unref(g)("meeting.edit"):i.unref(g)("meeting.cancel2")])),1)]),default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadioGroup),{modelValue:$e.value,"onUpdate:modelValue":ye[8]||(ye[8]=ge=>$e.value=ge)},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(ue,ge=>i.createVNode(i.unref(A.ORadio),{value:ge.value,key:ge.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(ge.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Q.value,"onUpdate:visible":ye[10]||(ye[10]=ge=>Q.value=ge),"main-class":"cancel-dialog",actions:et.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(g)("meeting.confirmCancel")),1)]),default:i.withCtx(()=>{var ge;return[i.createElementVNode("div",HS,i.toDisplayString(i.unref(g)("meeting.confirmCancelDesc",[(ge=q.value)==null?void 0:ge.topic])),1)]}),_:1},8,["visible","actions"])])]))}}),jS=Object.assign(Ac,{install(r){r.component("OMeetingCalendar",Ac)}}),zS=Object.assign(Oc,{install(r){r.component("OMeetingCalendar",Oc)}}),GS=Object.assign(lh,{install(r){r.component("OMeetingPlayback",lh)}}),WS=Object.assign(uh,{install(r){r.component("OSigMeetingCalendar",uh)}}),YS=Object.assign(ch,{install(r){r.component("OMyMeetingCalendar",ch)}}),XS={OBanner:dh,OCookieNotice:hh,OFooter:fh,OHeaderSearch:ph,OHeaderUser:mh,OPlusConfigProvider:gh,OSection:vh,OSourceCode:_h,OThemeSwitcher:yh},KS={install:r=>{Object.entries(XS).forEach(([e,t])=>{r.component(e,t)})}};exports.OElCookieNotice=He.OElCookieNotice;exports.CalendarDataType=Ve;exports.EventsStatusT=en;exports.MeetingGroupType=Oi;exports.OActivityApproval=P_;exports.OActivityForm=M_;exports.OBanner=dh;exports.OCookieNotice=hh;exports.OEventsApply=jy;exports.OEventsCalendar=qy;exports.OEventsList=Hy;exports.OFooter=fh;exports.OHeader=CT;exports.OHeaderMoblie=ET;exports.OHeaderSearch=ph;exports.OHeaderUser=mh;exports.OMeetingCalendar=jS;exports.OMeetingForm=zS;exports.OMeetingPlayback=GS;exports.OMyActivityCalendar=R_;exports.OMyMeetingCalendar=YS;exports.OPlusConfigProvider=gh;exports.OSection=vh;exports.OSigMeetingCalendar=WS;exports.OSourceCode=_h;exports.OThemeSwitcher=yh;exports.default=KS;