@opendesign-plus-test/components 0.0.1-rc.52 → 0.0.1-rc.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/components.cjs.js
CHANGED
|
@@ -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"),At=require("@opendesign-plus/composables"),Xe=require("./chunk-OElCookieNotice.cjs.js"),zi=require("@vueuse/core"),Fm=require("@opensig/opendesign/es/locale/lang/zh-cn"),$m=require("@opensig/opendesign/es/locale/lang/en-us"),tt=require("element-plus"),Um=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))}}),gn=Xe._export_sfc(Um,[["__scopeId","data-v-0b8705aa"]]),qm={key:0},zm={class:"banner-content"},jm=["src"],Hm={key:1,class:"banner-title"},Gm={key:2,class:"banner-subtitle"},Wm={key:4,class:"banner-opts"},Ym=i.defineComponent({__name:"OBanner",props:{options:{default:void 0},size:{default:"large"},contentJustifyCenter:{type:Boolean,default:!1}},setup(r){const e=r,{isLight:t}=At.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:n}=At.useScreen(),s=i.computed(()=>e.options),a=i.ref(""),o=c=>{setTimeout(()=>{a.value=s.value[c].bg_theme??"light"},100)},l=(c,d)=>{c&&!d&&window.open(c)};return(c,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["home-banner",r.size])},[r.size==="tiny"?(i.openBlock(),i.createElementBlock("div",qm,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,(g,m)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{class:i.normalizeClass(["banner-item",`banner-item${m}`]),key:m},{default:i.withCtx(()=>[i.createVNode(gn,{class:"banner-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:"banner-bg",src:g.bg,onClick:S=>l(g.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,(g,m)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{key:m,class:i.normalizeClass(["banner-item",`banner-item${m}`])},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:i.normalizeClass(["banner-bg",{"with-sticky-bg":g.withStickyBg,"in-dark":!i.unref(t),"cursor-pointer":g.href&&!g.btn}]),src:g.bg,style:i.normalizeStyle({"--pad-offset":g.pad_offset}),onClick:S=>l(g.href,g.btn)},{default:i.withCtx(()=>[i.createVNode(gn,{class:i.normalizeClass(["banner-wrapper",["banner-wrapper",r.contentJustifyCenter?"content-center":""]])},{default:i.withCtx(()=>[i.createElementVNode("div",zm,[!i.unref(n)&&g.attach?(i.openBlock(),i.createElementBlock("img",{key:0,src:g.attach,class:"banner-attach"},null,8,jm)):i.createCommentVNode("",!0),g.title?(i.openBlock(),i.createElementBlock("div",Hm,i.toDisplayString(g.title),1)):i.createCommentVNode("",!0),g.subtitle?(i.openBlock(),i.createElementBlock("div",Gm,i.toDisplayString(g.subtitle),1)):i.createCommentVNode("",!0),g.bg_text?(i.openBlock(),i.createElementBlock("div",{key:3,class:"banner-text",style:i.normalizeStyle({backgroundImage:`url(${g.bg_text})`,"--pc-width":g.pc_text_width,"--pc-height":g.pc_text_height,"--pad-width":g.pad_text_width,"--pad-height":g.pad_text_height})},null,4)):i.createCommentVNode("",!0),g.btn?(i.openBlock(),i.createElementBlock("div",Wm,[i.createVNode(i.unref(A.OButton),{href:g.href,target:"_blank",variant:"solid",color:"primary",size:r.size},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.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))}}),eh=Xe._export_sfc(Ym,[["__scopeId","data-v-e2541e9a"]]),Xm={class:"cookie-notice-content"},Km=["type"],Qm={class:"cookie-title"},Zm={style:{transform:"rotate(180deg)"},xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24"},Jm={class:"cookie-zh-title",style:{"margin-top":"0"}},eg=["href"],tg={key:1,class:"cookie-en-title"},ig={key:0,class:"cookie-en-content"},ng={class:"cookie-en-desc"},rg=["href"],sg={class:"cookie-notice-right"},ag={class:"cookie-dlg-title"},og={class:"cookie-dlg-content"},lg={class:"content-item"},ug={class:"item-header"},cg={class:"item-title"},dg={class:"item-extra"},hg={class:"item-detail"},fg={class:"content-item"},pg={class:"item-header"},mg={class:"item-title"},gg={class:"item-extra"},vg={class:"item-detail"},yg="0",Qu="1",_g="2",Ls="3",Tg="agreed-cookiepolicy-zh",bg="agreed-cookiepolicy-en",xg=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}=At.useScreen(),{locale:c,t:d}=Xe.useI18n(),g=i.computed(()=>c.value==="zh"),m=i.ref(),S=i.computed(()=>m.value?!!getComputedStyle(m.value).getPropertyValue("--grid-content-width"):!1),b=i.computed(()=>g.value?Tg:bg),T=i.ref(!1),y=zi.useVModel(n,"visible",s,{defaultValue:!1}),E=K=>{const L=document.cookie.split(";").find(U=>U.split("=")[0].trim()===encodeURIComponent(K));return L?decodeURIComponent(L.split("=")[1]):null},O=(K,L,U,V)=>{const X=`; max-age=${U*24*60*60}`;document.cookie=`${encodeURIComponent(K)}=${encodeURIComponent(L)}${X}; path=/; domain=${V}`},D=(K,L)=>{document.cookie=`${encodeURIComponent(K)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${L}`},I=K=>{typeof K=="boolean"?y.value=K:y.value=!y.value,i.nextTick(()=>{!y.value&&g.value&&E(b.value)!==Ls&&O(b.value,Ls,180,n.cookieDomain??location.hostname)})},H=i.ref(!1),$=K=>{typeof K=="boolean"?H.value=K:H.value=!H.value},z=()=>g.value?E(b.value)!==Ls:(E(b.value)??"0")===yg,N=()=>g.value?E(b.value)===Ls:E(b.value)===Qu;i.onMounted(()=>{z()&&I(!0)}),i.watch(c,()=>{I(z())});const j=()=>{T.value=!0,D(b.value,n.cookieDomain??location.hostname),O(b.value,Qu,180,n.cookieDomain??location.hostname),I(!1)},x=()=>{T.value=!1,D(b.value,n.cookieDomain??location.hostname),O(b.value,_g,180,n.cookieDomain??location.hostname),I(!1)},w=i.computed(()=>l.value?[{id:"save",label:d("cookie.saveSetting"),variant:"text",onClick:()=>{T.value?j():x(),$(!1)}},{id:"allowAll",label:d("cookie.acceptAll"),variant:"text",onClick:()=>{T.value=!0,j(),$(!1)}}]:[{id:"save",color:"primary",label:d("cookie.saveSetting"),variant:"outline",size:"medium",round:"pill",onClick:()=>{T.value?j():x(),$(!1)}},{id:"allowAll",color:"primary",label:d("cookie.acceptAll"),variant:"outline",size:"medium",round:"pill",onClick:()=>{T.value=!0,j(),$(!1)}}]),P=K=>{K&&(T.value=N())};return e({check(){N()===y.value&&I()}}),(K,L)=>(i.openBlock(),i.createBlock(i.unref(Xe.ClientOnly),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.Teleport,{to:r.wrapper||"#app"},[i.unref(y)?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"cookieNoticeRef",ref:m,class:"cookie-notice"},[i.createElementVNode("div",Xm,[i.createElementVNode("div",{type:i.unref(c),class:i.normalizeClass({"cookie-notice-wrap-grid":S.value,"cookie-notice-wrap":!S.value})},[i.createElementVNode("div",Qm,[g.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",Zm,[...L[4]||(L[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",Jm,[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(d)("cookie.about")),9,eg)])],64)):(i.openBlock(),i.createElementBlock("p",tg,i.toDisplayString(i.unref(d)("cookie.title",[r.community])),1)),i.createVNode(i.unref(A.OIcon),{class:"cookie-notice-close",onClick:L[0]||(L[0]=U=>I(!1))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconClose))]),_:1})]),g.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",ig,[i.createElementVNode("p",ng,[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(d)("cookie.about")),9,rg),L[5]||(L[5]=i.createTextVNode(". ",-1))]),i.createElementVNode("div",sg,[i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:j},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.acceptAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:x},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.rejectAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:L[1]||(L[1]=U=>$(!0))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.manage")),1)]),_:1})])]))],10,Km)]),i.createVNode(i.unref(A.ODialog),{visible:H.value,"onUpdate:visible":L[3]||(L[3]=U=>H.value=U),size:i.unref(o)?"medium":"large","phone-half-full":i.unref(a),"main-class":S.value?"o-cookie-notice-dlg-main":"",class:"cookie-dlg",actions:w.value,onChange:P,style:{"--dlg-radius":"4px"}},{header:i.withCtx(()=>[i.createElementVNode("span",ag,i.toDisplayString(i.unref(d)("cookie.manage")),1)]),default:i.withCtx(()=>[i.createElementVNode("div",og,[i.createElementVNode("div",lg,[i.createElementVNode("div",ug,[i.createElementVNode("span",cg,i.toDisplayString(i.unref(d)("cookie.necessaryCookie")),1),i.createElementVNode("span",dg,i.toDisplayString(i.unref(d)("cookie.alwaysOn")),1)]),i.createElementVNode("div",hg,i.toDisplayString(i.unref(d)("cookie.necessaryCookieDetail")),1)]),i.createElementVNode("div",fg,[i.createElementVNode("div",pg,[i.createElementVNode("span",mg,i.toDisplayString(i.unref(d)("cookie.analyticalCookie")),1),i.createElementVNode("span",gg,[i.createVNode(i.unref(A.OSwitch),{modelValue:T.value,"onUpdate:modelValue":L[2]||(L[2]=U=>T.value=U)},null,8,["modelValue"])])]),i.createElementVNode("div",vg,i.toDisplayString(i.unref(d)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","main-class","actions"])],512)):i.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),th=Xe._export_sfc(xg,[["__scopeId","data-v-18f3a4fa"]]),Cg={key:0,class:"atom"},Sg={class:"atom-text"},Eg=["href"],kg=["src"],wg={key:0,class:"quick-nav"},Dg={class:"category-title"},Ag={class:"navs"},Ng=["href"],Ig={key:0,class:"friendship-link"},Og={class:"friendship-link-title"},Bg={class:"friendship-link-box"},Lg=["href"],Mg={key:0,class:"footer-logo"},Pg=["src"],Rg=["src"],Vg=["href"],Fg={key:1,class:"footer-option"},$g={class:"footer-option-item"},Ug=["href"],qg={class:"license"},zg={class:"copyright"},jg={class:"filing"},Hg=["href"],Gg=["src"],Wg={key:2,class:"footer-right"},Yg={key:0,class:"code-box"},Xg=["src"],Kg={class:"code-layer"},Qg=["src"],Zg={class:"txt"},Jg={class:"app-footer-pc"},e1={key:0,class:"footer-left"},t1=["href"],i1=["src"],n1={key:0,class:"footer-right"},r1=["href"],s1={class:"app-footer-mb"},a1={key:0,class:"links"},o1=["href"],l1={class:"copyright"},u1={key:0,class:"approval"},c1=["href"],d1=["src"],h1=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(gn,{key:1},{default:i.withCtx(()=>[i.createElementVNode("div",Jg,[t.$slots.left||e.footerOption?i.renderSlot(t.$slots,"left",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",e1,[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,t1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,i1),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",n1,[(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,r1),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",s1,[t.$slots.right||e.footerOption?i.renderSlot(t.$slots,"right",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",a1,[(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,o1),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",l1,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",u1,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,c1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,d1),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(gn,{key:0},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"atom",{},()=>[e.atom?(i.openBlock(),i.createElementBlock("div",Cg,[i.createElementVNode("p",Sg,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,kg)],8,Eg)])):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(gn,null,{default:i.withCtx(()=>[t.$slots.quickNav||e.quickNav?i.renderSlot(t.$slots,"quickNav",{key:0},()=>[e.quickNav?(i.openBlock(),i.createElementBlock("div",wg,[(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",Dg,i.toDisplayString(s.title),1),i.createElementVNode("ul",Ag,[(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,Ng)]))),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",Ig,[i.createElementVNode("div",Og,i.toDisplayString(e.friendshipLink.title[e.lang]),1),i.createElementVNode("div",Bg,[(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,Lg))),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",Mg,[i.createElementVNode("img",{class:"show-pc",src:e.footerLogo.logo,alt:""},null,8,Pg),i.createElementVNode("img",{class:"show-mo",src:e.footerLogo.logoMb,alt:""},null,8,Rg),i.createElementVNode("p",null,[i.createElementVNode("a",{class:"email",href:`mailto:${e.footerLogo.email}`,target:"_blank"},i.toDisplayString(e.footerLogo.email),9,Vg)])])):i.createCommentVNode("",!0),e.footerOption?(i.openBlock(),i.createElementBlock("div",Fg,[i.createElementVNode("div",$g,[(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,Ug),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",qg,[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",zg,[i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].copyright),1),i.createElementVNode("div",jg,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,Hg),i.createElementVNode("img",{src:e.footerOption[e.lang].policeIcon,class:"filing-img"},null,8,Gg),i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])])])):i.createCommentVNode("",!0),e.qrcode?(i.openBlock(),i.createElementBlock("div",Wg,[e.lang==="zh"?(i.openBlock(),i.createElementBlock("div",Yg,[(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,Xg),i.createElementVNode("div",Kg,[i.createElementVNode("img",{src:s.code,alt:""},null,8,Qg),i.createElementVNode("p",Zg,i.toDisplayString(s.label),1)])]))),128))])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),ih=Xe._export_sfc(h1,[["__scopeId","data-v-2ce6e57a"]]),f1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function p1(r,e){return i.openBlock(),i.createElementBlock("svg",f1,[...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 Sl={name:"components-icon-close",render:p1},m1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function g1(r,e){return i.openBlock(),i.createElementBlock("svg",m1,[...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 Zu={name:"components-icon-header-search",render:g1},v1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function y1(r,e){return i.openBlock(),i.createElementBlock("svg",v1,[...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 _1={name:"components-icon-header-delete",render:y1},T1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function b1(r,e){return i.openBlock(),i.createElementBlock("svg",T1,[...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 x1={name:"components-icon-delete",render:b1},C1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function S1(r,e){return i.openBlock(),i.createElementBlock("svg",C1,[...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 E1={name:"components-icon-header-back",render:S1},k1={class:"o-header-search"},w1={class:"o-header-search-drawer"},D1={key:0,class:"o-header-search-recommend-container"},A1=["onClick"],N1={key:1,class:"o-header-search-history-container"},I1={class:"o-header-search-history-header"},O1={class:"o-header-search-history-header-title"},B1={class:"o-header-search-history-item-container"},L1=["onClick"],M1={class:"o-header-search-history-item-text"},P1={key:3,class:"o-header-search-hot-container"},R1={class:"o-header-search-hot-header"},V1={class:"o-header-search-hot-item-container"},F1=["onClick"],$1=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}=At.useScreen(),{t:n}=Xe.useI18n(),s=r,a=e,o=i.ref(s.modelValue),l=i.ref(s.historyItems),c=i.ref(!1),d=i.ref(),g=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 m=()=>{c.value=!0},S=()=>{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"))},b=()=>{o.value="",a("clear"),t.value||(c.value=!1)},T=()=>{const I=[...l.value];l.value=[],s.storeHistory&&s.storeHistory&&localStorage.removeItem(s.storageKey),a("delete-history",I)},y=I=>{l.value=l.value.filter(H=>H!==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)},E=I=>{o.value=I,S()},O=()=>{o.value="",c.value=!1},D=i.ref();return zi.onClickOutside(D,b),(I,H)=>(i.openBlock(),i.createElementBlock("div",k1,[i.createElementVNode("div",{ref_key:"posWrapper",ref:D,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:O},{default:i.withCtx(()=>[i.createVNode(i.unref(E1))]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OInput),{ref_key:"inputRef",ref:d,modelValue:o.value,"onUpdate:modelValue":H[0]||(H[0]=$=>o.value=$),class:"o-header-search-input",placeholder:c.value?r.expandedPlaceholder??i.unref(n)("search.expandedPlaceholder"):r.placeholder??i.unref(n)("search.placeholder"),onFocus:m,onKeyup:i.withKeys(S,["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(Zu))]),_:1})],!0)]),suffix:i.withCtx(()=>[i.renderSlot(I.$slots,"input-suffix",{},()=>[r.clearable&&g.value?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"o-header-search-icon close",onClick:b},{default:i.withCtx(()=>[i.createVNode(i.unref(Sl))]),_: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:S},i.toDisplayString(r.searchTextMobile??i.unref(n)("search")),1)):i.createCommentVNode("",!0)],2),i.withDirectives(i.createElementVNode("div",w1,[i.renderSlot(I.$slots,"drawer",{recommendItems:r.recommendItems,historyItems:l.value,hotItems:r.hotItems},()=>[r.recommendItems.length?(i.openBlock(),i.createElementBlock("div",D1,[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,$=>(i.openBlock(),i.createElementBlock("div",{class:"o-header-search-recommend-item",key:$,onClick:z=>E($)},i.toDisplayString($),9,A1))),128))],!0)])):l.value.length?(i.openBlock(),i.createElementBlock("div",N1,[i.renderSlot(I.$slots,"history-header",{history:l.value},()=>[i.createElementVNode("div",I1,[i.createElementVNode("span",O1,i.toDisplayString(r.historyTitle??i.unref(n)("search.history")),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-icon",onClick:T},{default:i.withCtx(()=>[i.createVNode(i.unref(x1))]),_:1})])],!0),i.renderSlot(I.$slots,"history-content",{history:l.value},()=>[i.createElementVNode("div",B1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,$=>(i.openBlock(),i.createElementBlock("div",{key:$,class:"o-header-search-history-item",onClick:z=>E($)},[i.createElementVNode("span",M1,i.toDisplayString($),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-history-item-icon",onClick:i.withModifiers(z=>y($),["stop"])},{default:i.withCtx(()=>[i.createVNode(i.unref(_1),{class:"icon-delete"})]),_:1},8,["onClick"])],8,L1))),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",P1,[i.renderSlot(I.$slots,"hot-header",{hot:r.hotItems},()=>[i.createElementVNode("div",R1,i.toDisplayString(r.hotTitle??i.unref(n)("search.hot")),1)],!0),i.renderSlot(I.$slots,"hot-content",{hot:r.hotItems},()=>[i.createElementVNode("div",V1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.hotItems,$=>(i.openBlock(),i.createElementBlock("div",{key:$,class:"o-header-search-hot-item",onClick:z=>E($)},i.toDisplayString($),9,F1))),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:m},{default:i.withCtx(()=>[i.createVNode(i.unref(Zu))]),_:1})):i.createCommentVNode("",!0)]))}}),nh=Xe._export_sfc($1,[["__scopeId","data-v-c0407b92"]]),U1=["src"],q1=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,U1)):(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["word-avatar",r.variant]),style:i.normalizeStyle(s.value)},i.toDisplayString(n.value),7))}}),z1=Xe._export_sfc(q1,[["__scopeId","data-v-340348ce"]]),j1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function H1(r,e){return i.openBlock(),i.createElementBlock("svg",j1,[...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 G1={name:"components-icon-avatar-line",render:H1},W1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Y1(r,e){return i.openBlock(),i.createElementBlock("svg",W1,[...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 El={name:"components-icon-chevron-down",render:Y1},X1={class:"header-user"},K1={key:0,class:"user-info"},Q1={class:"info-wrap hover-icon-rotate"},Z1={class:"user-account"},J1={key:1},e2=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},customSize:{default:void 0}},emits:["login","logout"],setup(r,{emit:e}){const{lePadV:t}=At.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",X1,[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(G1))]),_:1})),i.createVNode(i.Transition,{name:"header-user-zoom-in"},{default:i.withCtx(()=>[r.token?(i.openBlock(),i.createElementBlock("div",K1,[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:d=>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",J1,i.toDisplayString(c.label),1))]),_:2},1032,["onClick"]))),128))]),default:i.withCtx(()=>[i.createElementVNode("div",Q1,[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(z1,{avatar:r.userInfo.photo,name:r.userInfo.username,"custom-size":r.customSize},null,8,["avatar","name","custom-size"])]),_:1},8,["value","class"]),i.createElementVNode("p",Z1,i.toDisplayString(r.userInfo.username),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(El))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):i.createCommentVNode("",!0)]),_:1})]))}}),rh=Xe._export_sfc(e2,[["__scopeId","data-v-517067a4"]]),sh=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(Xe.configProviderInjectKey,t),(n,s)=>(i.openBlock(),i.createBlock(i.unref(A.OConfigProvider),{locale:r.locale==="zh"?i.unref(Fm):i.unref($m)},{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3},8,["locale"]))}}),t2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function i2(r,e){return i.openBlock(),i.createElementBlock("svg",t2,[...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 Hr={name:"components-icon-chevron-right",render:i2},n2={class:"section-wrapper"},r2={key:1,class:"section-title"},s2={key:2,class:"section-subtitle"},a2={key:1,class:"section-body"},o2={key:2,class:"section-footer"},l2=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",n2,[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",r2,[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",s2,[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",a2,[i.renderSlot(t.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.footer||e.footer?(i.openBlock(),i.createElementBlock("div",o2,[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(Hr))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.footer)+" ",1)]),_:1},8,["href"])],!0)])):i.createCommentVNode("",!0)],!0)])],2))}}),ah=Xe._export_sfc(l2,[["__scopeId","data-v-0c0e1f78"]]),u2={class:"source-code"},c2={class:"title"},d2={class:"info-wrap hover-icon-rotate"},h2={class:"title"},f2=i.defineComponent({__name:"OSourceCode",props:{title:{},options:{},href:{},target:{},icon:{},justify:{default:"center"}},setup(r){const e=s=>{window.open(s.href,s.target?s.target:"_blank")},t=i.ref(!1),n=s=>{t.value=s};return(s,a)=>(i.openBlock(),i.createElementBlock("div",u2,[r.href?(i.openBlock(),i.createElementBlock("div",{key:0,class:"info-wrap",onClick:a[0]||(a[0]=o=>e({href:r.href,target:r.target}))},[i.createElementVNode("span",c2,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.href,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",d2,[i.createElementVNode("span",h2,i.toDisplayString(r.title),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(El))]),_:1})])]),_:1},8,["class"]))]))}}),oh=Xe._export_sfc(f2,[["__scopeId","data-v-865d32e7"]]),p2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function m2(r,e){return i.openBlock(),i.createElementBlock("svg",p2,[...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 g2={name:"components-icon-sun",render:m2},v2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function y2(r,e){return i.openBlock(),i.createElementBlock("svg",v2,[...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 _2={name:"components-icon-moon",render:y2},T2={class:"o-theme-switcher"},b2={key:1,class:"o-theme-switcher-mobile"},x2=i.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},disabled:{type:Boolean,default:!1}},emits:["update:theme","change"],setup(r,{emit:e}){const t=r,n=e,{gtPhone:s}=At.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=()=>{t.disabled||(a.value=a.value===t.lightValue?t.darkValue:t.lightValue)};return(c,d)=>(i.openBlock(),i.createElementBlock("div",T2,[o.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["o-theme-switcher-common",{disabled:r.disabled}]),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(_2),{key:0})):(i.openBlock(),i.createBlock(i.unref(g2),{key:1}))]),_:1})],2)):(i.openBlock(),i.createElementBlock("div",b2,[i.createVNode(i.unref(A.OSwitch),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=g=>a.value=g),class:"o-theme-switch","checked-value":r.lightValue,"unchecked-value":r.darkValue,disabled:r.disabled},{inactive:i.withCtx(()=>[i.createVNode(i.unref(A.OIconMoon))]),active:i.withCtx(()=>[i.createVNode(i.unref(A.OIconSun))]),off:i.withCtx(()=>[i.createVNode(i.unref(A.OIconSun))]),on:i.withCtx(()=>[i.createVNode(i.unref(A.OIconMoon))]),_:1},8,["modelValue","checked-value","unchecked-value","disabled"])]))]))}}),lh=Xe._export_sfc(x2,[["__scopeId","data-v-ddd930c4"]]),Ju=/^https?:\/\/\S+/;var Be=(r=>(r.ALL="all",r.MEETING="meeting",r.EVENTS="events",r.SUMMIT="summit",r.APPROVAL="approval",r))(Be||{}),vi=(r=>(r.SIG="sig",r.GROUP="group",r))(vi||{});const C2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function S2(r,e){return i.openBlock(),i.createElementBlock("svg",C2,[...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 E2={name:"meeting-icon-all",render:S2},k2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function w2(r,e){return i.openBlock(),i.createElementBlock("svg",k2,[...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 uh={name:"meeting-icon-event",render:w2},D2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function A2(r,e){return i.openBlock(),i.createElementBlock("svg",D2,[...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 ch={name:"meeting-icon-meet",render:A2},N2={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",N2,[...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 dh={name:"meeting-icon-summit",render:I2},ro={summit:"rgba(var(--o-orange-6))",events:"rgba(var(--o-cyan-6))",meeting:"rgba(var(--o-deepblue-6))"},mn=0,vn=1,tn=2,hh=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,O2=["var(--o-color-primary1)","var(--o-color-warning1)","var(--o-color-success1)"],ba=()=>{const{t:r}=Xe.useI18n(),e=i.computed(()=>new Map([[1,{label:r("meeting.offline"),value:1}],[2,{label:r("meeting.online"),value:2}],[3,{label:r("meeting.onlineOffline"),value:3}]])),t=i.computed(()=>new Map([[1,{id:"draft",label:r("meeting.statusDraft"),text:r("meeting.statusDraft"),value:1}],[2,{id:"under-review",label:r("meeting.statusUnderReview"),text:r("meeting.statusPending"),value:2}],[3,{id:"registration",label:r("meeting.statusRegistering"),text:r("meeting.statusApproved"),value:3}],[4,{id:"in-progress",label:r("meeting.statusInProgress"),text:r("meeting.statusApproved"),value:4}],[5,{id:"ended",label:r("meeting.statusEnded"),text:r("meeting.statusEnded"),value:5}],[6,{id:"modified",label:r("meeting.statusModified"),text:r("meeting.statusModified"),value:6}],[7,{id:"reject",label:r("meeting.statusRejected"),text:r("meeting.statusRejected"),value:7}]])),n=i.computed(()=>new Map([["all",{label:r("common.all"),value:"all"}],["rejected",{label:r("meeting.statusRejected"),value:"rejected"}],["approved",{label:r("meeting.statusApproved"),value:"approved"}],["publish",{label:r("meeting.statusPending"),value:"publish"}],["cancel",{label:r("meeting.statusCanceled"),value:"cancel"}]]));return{t:r,activityTypeMap:e,statusMap:t,approvalStatusMap:n}},B2={class:"o-activity-form"},L2={class:"time-config"},M2={class:"form-btns"},ec=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}=At.useScreen(),{t:o}=Xe.useI18n(),l=o,{activityTypeMap:c}=ba(),d=r,g=i.computed(()=>!!d.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:""}),S=i.ref(),b=i.ref(!1),T=i.ref({title:[{required:!0,message:o("meeting.enterActivityName")},{validator:z=>{if(z.length>50)return{type:"danger",message:o("meeting.activityNameMaxLength")}}}],activity_type:[{required:!0,message:o("meeting.selectActivityType")}],organizer:[{required:!0,message:o("meeting.selectActivityOrganizer")}],start_date:[{required:!0,message:o("meeting.selectActivityTime")},{validator:()=>{const{start_date:z,end_date:N}=m.value,j=z.split(" "),x=N.split(" ");if(!z||!N)return{type:"danger",message:o("meeting.selectActivityDate")};const w=j[1].split(":").map(Number),P=x[1].split(":").map(Number);if(w[0]<8||w[0]>21||P[0]<8||P[0]>21)return{type:"danger",message:o("meeting.activityTimeRange")};if(tt.dayjs(z).valueOf()>tt.dayjs(N).valueOf())return{type:"danger",message:o("meeting.endDateAfterStartDate")};m.value.start_date=j[0],m.value.end_date=x[0],m.value.start=j[1],m.value.end=x[1]},triggers:["blur","change"]}],register_end_date:[{validator:()=>{const{register_end_date:z,end_date:N,end:j}=m.value;if(z&&tt.dayjs(`${N} ${j}`).valueOf()<tt.dayjs(z).valueOf())return{type:"danger",message:o("meeting.registerDeadlineBeforeEnd")}},triggers:["blur","change"]}],address:[{required:!0,message:o("meeting.enterActivityAddress")},{validator:z=>{if(z.length>255)return{type:"danger",message:o("meeting.activityAddressMaxLength")}}}],register_url:[{validator:z=>{const N=z.replaceAll(" ","")||"";if(N.length&&(N.split(";")||[]).some(x=>!Ju.test(x)))return{type:"danger",message:o("meeting.invalidRegistrationUrl")}},triggers:["blur","change"]}],content_url:[{validator:z=>{const N=z.replaceAll(" ","")||"";if(N.length&&(N.split(";")||[]).some(x=>!Ju.test(x)))return{type:"danger",message:o("meeting.invalidActivityDetailUrl")}},triggers:["blur","change"]}],synopsis:[{validator:z=>{if(z.length>1e3)return{type:"danger",message:o("meeting.activityContentMaxLength")}}}],email_list:[{validator:z=>{const N=z.replaceAll(" ","").replaceAll(",",";")||"";if(N.length){if(N.length>1020)return{type:"danger",message:o("meeting.emailTooLong")};const j=N.split(";")||[];if(j.some(x=>!hh.test(x)))return{type:"danger",message:o("meeting.emailInvalid")};if(j.some(x=>x.length>50))return{type:"danger",message:o("meeting.singleEmailTooLong")};if(j.length>20)return{type:"danger",message:o("meeting.emailCountTooLong")}}},triggers:["blur","change"]}],approver:[{required:!0,message:o("meeting.selectActivityApprover")}]}),y=i.computed(()=>d.admins||[]),E=i.ref(""),O=i.ref([]);c.value.forEach(z=>{O.value.push(z)});const D=z=>{const N=O.value.find(j=>j.label===z);m.value.activity_type=N==null?void 0:N.value},I=z=>z.getTime()<Date.now()-1440*60*1e3;i.watch(()=>d.data,z=>{var N;if(z){const{title:j,start_date:x,end_date:w,register_end_date:P,activity_type:K,register_url:L,content_url:U,address:V,start:X,end:F,is_publish:B,approver:Q,update_activity_id:Z,synopsis:oe,email_list:ce,organizer:re}=z;let ue={title:j,start_date:x,end_date:w,register_end_date:P,activity_type:K,register_url:L,content_url:U,address:V,start:X,end:F,is_publish:B,approver:Q,update_activity_id:Z,synopsis:oe,email_list:ce,organizer:re};m.value={...ue},E.value=(N=c.value.get(Number(z.activity_type)))==null?void 0:N.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 H=async z=>{var j,x,w,P,K,L,U;let N=g.value?o("meeting.modifyActivity"):o(z?"meeting.create":"meeting.saveDraft");try{if((await((j=S.value)==null?void 0:j.validate())).some(F=>!!F))return;b.value=!0,m.value.is_publish=`${z}`;let X;if(g.value&&((x=d.data)==null?void 0:x.status)===3?(m.value.update_activity_id=(w=d.data)==null?void 0:w.id,X=await((P=d.creatActivity)==null?void 0:P.call(d,m.value))):g.value?X=await((L=d.editActivity)==null?void 0:L.call(d,(K=d.data)==null?void 0:K.id,m.value)):X=await((U=d.creatActivity)==null?void 0:U.call(d,m.value)),typeof X=="boolean"&&!X)return;s.success({content:o("meeting.activityActionSuccess",[m.value.title,N.toLowerCase()])}),$(),n("confirm")}finally{b.value=!1}},$=()=>{m.value={},n("close")};return e({confirm:H}),(z,N)=>(i.openBlock(),i.createElementBlock("div",B2,[i.createVNode(i.unref(A.OForm),{model:m.value,ref_key:"formRef",ref:S,"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:i.unref(o)("meeting.activityName"),field:"title"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityName"),modelValue:m.value.title,"onUpdate:modelValue":N[0]||(N[0]=j=>m.value.title=j)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.organizer,label:i.unref(o)("meeting.activityOrganizer"),field:"organizer"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:i.unref(o)("meeting.selectActivityOrganizer"),size:"large",modelValue:m.value.organizer,"onUpdate:modelValue":N[1]||(N[1]=j=>m.value.organizer=j)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.organizers,j=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:j.name,value:j.name},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(j.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.activity_type,label:i.unref(o)("meeting.activityType"),field:"activity_type"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:i.unref(o)("meeting.selectActivityType"),size:"large",modelValue:E.value,"onUpdate:modelValue":N[2]||(N[2]=j=>E.value=j),onChange:D},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,j=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:j.value,value:j.label},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(j.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),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:i.unref(o)("meeting.activityAddress"),field:"address"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityAddress"),modelValue:m.value.address,"onUpdate:modelValue":N[3]||(N[3]=j=>m.value.address=j)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{rules:T.value.start_date,label:i.unref(o)("meeting.activityTime"),field:"start_date",required:""},{default:i.withCtx(()=>[i.createElementVNode("div",L2,[i.createVNode(i.unref(A.OFormItem),{label:i.unref(o)("meeting.startDate"),field:"start_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.start_date,"onUpdate:modelValue":N[4]||(N[4]=j=>m.value.start_date=j),type:"datetime",placeholder:i.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":I,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),i.createVNode(i.unref(A.OFormItem),{label:i.unref(o)("meeting.endDate"),field:"end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.end_date,"onUpdate:modelValue":N[5]||(N[5]=j=>m.value.end_date=j),type:"datetime",placeholder:i.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":I,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.register_end_date,label:i.unref(o)("meeting.registrationDeadline"),field:"register_end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.register_end_date,"onUpdate:modelValue":N[6]||(N[6]=j=>m.value.register_end_date=j),type:"datetime",placeholder:i.unref(o)("meeting.selectActivityDeadline"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm",clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.register_url,label:i.unref(o)("meeting.registrationUrl"),field:"register_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityRegistrationUrl"),modelValue:m.value.register_url,"onUpdate:modelValue":N[7]||(N[7]=j=>m.value.register_url=j)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.content_url,label:i.unref(o)("meeting.activityDetailUrl"),field:"content_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityDetailUrl"),modelValue:m.value.content_url,"onUpdate:modelValue":N[8]||(N[8]=j=>m.value.content_url=j)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.synopsis,label:i.unref(o)("meeting.activityContent"),field:"synopsis"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:i.unref(o)("meeting.enterActivityContent"),modelValue:m.value.synopsis,"onUpdate:modelValue":N[9]||(N[9]=j=>m.value.synopsis=j)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{field:"email_list",rules:T.value.email_list,label:i.unref(o)("meeting.email")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:g.value,size:"large",placeholder:i.unref(l)("meeting.enterEmail"),rows:4,modelValue:m.value.email_list,"onUpdate:modelValue":N[10]||(N[10]=j=>m.value.email_list=j)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:T.value.approver,label:i.unref(o)("meeting.activityApprover"),field:"approver"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:i.unref(o)("meeting.selectActivityApprover"),size:"large",modelValue:m.value.approver,"onUpdate:modelValue":N[11]||(N[11]=j=>m.value.approver=j)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.value,j=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:j,value:j},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(j),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model","layout"]),i.createElementVNode("div",M2,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:N[12]||(N[12]=j=>H(!0)),loading:b.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.value?i.unref(o)("common.save"):i.unref(o)("meeting.create")),1)]),_:1},8,["loading"]),g.value?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,color:"primary",variant:"outline",round:"pill",size:"large",onClick:N[13]||(N[13]=j=>H(!1)),loading:b.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("meeting.saveDraft")),1)]),_:1},8,["loading"])),i.createVNode(i.unref(A.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:$},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("meeting.cancelBtn")),1)]),_:1})])]))}}),P2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function R2(r,e){return i.openBlock(),i.createElementBlock("svg",P2,[...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 tc={name:"components-icon-filter",render:R2};/*! @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 pn(r){"@babel/helpers - typeof";return pn=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},pn(r)}function Wo(r,e){return Wo=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Wo(r,e)}function V2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ws(r,e,t){return V2()?Ws=Reflect.construct:Ws=function(s,a,o){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(s,l),d=new c;return o&&Wo(d,o.prototype),d},Ws.apply(null,arguments)}function Ni(r){return F2(r)||$2(r)||U2(r)||q2()}function F2(r){if(Array.isArray(r))return Yo(r)}function $2(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function U2(r,e){if(r){if(typeof r=="string")return Yo(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 Yo(r,e)}}function Yo(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 q2(){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 z2=Object.hasOwnProperty,ic=Object.setPrototypeOf,j2=Object.isFrozen,H2=Object.getPrototypeOf,G2=Object.getOwnPropertyDescriptor,ii=Object.freeze,_i=Object.seal,W2=Object.create,fh=typeof Reflect<"u"&&Reflect,Js=fh.apply,Xo=fh.construct;Js||(Js=function(e,t,n){return e.apply(t,n)});ii||(ii=function(e){return e});_i||(_i=function(e){return e});Xo||(Xo=function(e,t){return Ws(e,Ni(t))});var Y2=Ti(Array.prototype.forEach),nc=Ti(Array.prototype.pop),Fr=Ti(Array.prototype.push),Ys=Ti(String.prototype.toLowerCase),so=Ti(String.prototype.toString),rc=Ti(String.prototype.match),Ai=Ti(String.prototype.replace),X2=Ti(String.prototype.indexOf),K2=Ti(String.prototype.trim),Ft=Ti(RegExp.prototype.test),ao=Q2(TypeError);function Ti(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 Js(r,e,n)}}function Q2(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Xo(r,t)}}function He(r,e,t){var n;t=(n=t)!==null&&n!==void 0?n:Ys,ic&&ic(r,null);for(var s=e.length;s--;){var a=e[s];if(typeof a=="string"){var o=t(a);o!==a&&(j2(e)||(e[s]=o),a=o)}r[a]=!0}return r}function En(r){var e=W2(null),t;for(t in r)Js(z2,r,[t])===!0&&(e[t]=r[t]);return e}function Ms(r,e){for(;r!==null;){var t=G2(r,e);if(t){if(t.get)return Ti(t.get);if(typeof t.value=="function")return Ti(t.value)}r=H2(r)}function n(s){return console.warn("fallback value for",s),null}return n}var sc=ii(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),oo=ii(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),lo=ii(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Z2=ii(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),uo=ii(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),J2=ii(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ac=ii(["#text"]),oc=ii(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),co=ii(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),lc=ii(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ps=ii(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ev=_i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tv=_i(/<%[\w\W]*|[\w\W]*%>/gm),iv=_i(/\${[\w\W]*}/gm),nv=_i(/^data-[\-\w.\u00B7-\uFFFF]+$/),rv=_i(/^aria-[\-\w]+$/),sv=_i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),av=_i(/^(?:\w+script|data):/i),ov=_i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),lv=_i(/^html$/i),uv=_i(/^[a-z][.\w]*(-[.\w]+)+$/i),cv=function(){return typeof window>"u"?null:window},dv=function(e,t){if(pn(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 ph(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cv(),e=function(J){return ph(J)};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,d=r.NamedNodeMap,g=d===void 0?r.NamedNodeMap||r.MozNamedAttrMap:d,m=r.HTMLFormElement,S=r.DOMParser,b=r.trustedTypes,T=l.prototype,y=Ms(T,"cloneNode"),E=Ms(T,"nextSibling"),O=Ms(T,"childNodes"),D=Ms(T,"parentNode");if(typeof a=="function"){var I=n.createElement("template");I.content&&I.content.ownerDocument&&(n=I.content.ownerDocument)}var H=dv(b,t),$=H?H.createHTML(""):"",z=n,N=z.implementation,j=z.createNodeIterator,x=z.createDocumentFragment,w=z.getElementsByTagName,P=t.importNode,K={};try{K=En(n).documentMode?n.documentMode:{}}catch{}var L={};e.isSupported=typeof D=="function"&&N&&N.createHTMLDocument!==void 0&&K!==9;var U=ev,V=tv,X=iv,F=nv,B=rv,Q=av,Z=ov,oe=uv,ce=sv,re=null,ue=He({},[].concat(Ni(sc),Ni(oo),Ni(lo),Ni(uo),Ni(ac))),te=null,Ae=He({},[].concat(Ni(oc),Ni(co),Ni(lc),Ni(Ps))),we=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,De=null,Ve=!0,Qe=!0,et=!1,$e=!0,Ge=!1,xt=!0,Ie=!1,St=!1,lt=!1,Ee=!1,Te=!1,me=!1,Fe=!0,qe=!1,gt="user-content-",Et=!0,ie=!1,ne={},se=null,Se=He({},["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"]),pe=null,Ke=He({},["audio","video","img","source","image","track"]),Oe=null,Nt=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ft="http://www.w3.org/1998/Math/MathML",ui="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml",Wt=It,Ot=!1,Rt=null,ci=He({},[ft,ui,It],so),Ut,Wi=["application/xhtml+xml","text/html"],C="text/html",k,Y=null,le=n.createElement("form"),ye=function(J){return J instanceof RegExp||J instanceof Function},Ne=function(J){Y&&Y===J||((!J||pn(J)!=="object")&&(J={}),J=En(J),Ut=Wi.indexOf(J.PARSER_MEDIA_TYPE)===-1?Ut=C:Ut=J.PARSER_MEDIA_TYPE,k=Ut==="application/xhtml+xml"?so:Ys,re="ALLOWED_TAGS"in J?He({},J.ALLOWED_TAGS,k):ue,te="ALLOWED_ATTR"in J?He({},J.ALLOWED_ATTR,k):Ae,Rt="ALLOWED_NAMESPACES"in J?He({},J.ALLOWED_NAMESPACES,so):ci,Oe="ADD_URI_SAFE_ATTR"in J?He(En(Nt),J.ADD_URI_SAFE_ATTR,k):Nt,pe="ADD_DATA_URI_TAGS"in J?He(En(Ke),J.ADD_DATA_URI_TAGS,k):Ke,se="FORBID_CONTENTS"in J?He({},J.FORBID_CONTENTS,k):Se,Le="FORBID_TAGS"in J?He({},J.FORBID_TAGS,k):{},De="FORBID_ATTR"in J?He({},J.FORBID_ATTR,k):{},ne="USE_PROFILES"in J?J.USE_PROFILES:!1,Ve=J.ALLOW_ARIA_ATTR!==!1,Qe=J.ALLOW_DATA_ATTR!==!1,et=J.ALLOW_UNKNOWN_PROTOCOLS||!1,$e=J.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ge=J.SAFE_FOR_TEMPLATES||!1,xt=J.SAFE_FOR_XML!==!1,Ie=J.WHOLE_DOCUMENT||!1,Ee=J.RETURN_DOM||!1,Te=J.RETURN_DOM_FRAGMENT||!1,me=J.RETURN_TRUSTED_TYPE||!1,lt=J.FORCE_BODY||!1,Fe=J.SANITIZE_DOM!==!1,qe=J.SANITIZE_NAMED_PROPS||!1,Et=J.KEEP_CONTENT!==!1,ie=J.IN_PLACE||!1,ce=J.ALLOWED_URI_REGEXP||ce,Wt=J.NAMESPACE||It,we=J.CUSTOM_ELEMENT_HANDLING||{},J.CUSTOM_ELEMENT_HANDLING&&ye(J.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=J.CUSTOM_ELEMENT_HANDLING.tagNameCheck),J.CUSTOM_ELEMENT_HANDLING&&ye(J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),J.CUSTOM_ELEMENT_HANDLING&&typeof J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(we.allowCustomizedBuiltInElements=J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ge&&(Qe=!1),Te&&(Ee=!0),ne&&(re=He({},Ni(ac)),te=[],ne.html===!0&&(He(re,sc),He(te,oc)),ne.svg===!0&&(He(re,oo),He(te,co),He(te,Ps)),ne.svgFilters===!0&&(He(re,lo),He(te,co),He(te,Ps)),ne.mathMl===!0&&(He(re,uo),He(te,lc),He(te,Ps))),J.ADD_TAGS&&(re===ue&&(re=En(re)),He(re,J.ADD_TAGS,k)),J.ADD_ATTR&&(te===Ae&&(te=En(te)),He(te,J.ADD_ATTR,k)),J.ADD_URI_SAFE_ATTR&&He(Oe,J.ADD_URI_SAFE_ATTR,k),J.FORBID_CONTENTS&&(se===Se&&(se=En(se)),He(se,J.FORBID_CONTENTS,k)),Et&&(re["#text"]=!0),Ie&&He(re,["html","head","body"]),re.table&&(He(re,["tbody"]),delete Le.tbody),ii&&ii(J),Y=J)},Je=He({},["mi","mo","mn","ms","mtext"]),kt=He({},["annotation-xml"]),Yt=He({},["title","style","font","a","script"]),qt=He({},oo);He(qt,lo),He(qt,Z2);var Vt=He({},uo);He(Vt,J2);var ni=function(J){var ge=D(J);(!ge||!ge.tagName)&&(ge={namespaceURI:Wt,tagName:"template"});var Ce=Ys(J.tagName),Ze=Ys(ge.tagName);return Rt[J.namespaceURI]?J.namespaceURI===ui?ge.namespaceURI===It?Ce==="svg":ge.namespaceURI===ft?Ce==="svg"&&(Ze==="annotation-xml"||Je[Ze]):!!qt[Ce]:J.namespaceURI===ft?ge.namespaceURI===It?Ce==="math":ge.namespaceURI===ui?Ce==="math"&&kt[Ze]:!!Vt[Ce]:J.namespaceURI===It?ge.namespaceURI===ui&&!kt[Ze]||ge.namespaceURI===ft&&!Je[Ze]?!1:!Vt[Ce]&&(Yt[Ce]||!qt[Ce]):!!(Ut==="application/xhtml+xml"&&Rt[J.namespaceURI]):!1},Ye=function(J){Fr(e.removed,{element:J});try{J.parentNode.removeChild(J)}catch{try{J.outerHTML=$}catch{J.remove()}}},ri=function(J,ge){try{Fr(e.removed,{attribute:ge.getAttributeNode(J),from:ge})}catch{Fr(e.removed,{attribute:null,from:ge})}if(ge.removeAttribute(J),J==="is"&&!te[J])if(Ee||Te)try{Ye(ge)}catch{}else try{ge.setAttribute(J,"")}catch{}},Xt=function(J){var ge,Ce;if(lt)J="<remove></remove>"+J;else{var Ze=rc(J,/^[\r\n\t ]+/);Ce=Ze&&Ze[0]}Ut==="application/xhtml+xml"&&Wt===It&&(J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>");var zt=H?H.createHTML(J):J;if(Wt===It)try{ge=new S().parseFromString(zt,Ut)}catch{}if(!ge||!ge.documentElement){ge=N.createDocument(Wt,"template",null);try{ge.documentElement.innerHTML=Ot?$:zt}catch{}}var Dt=ge.body||ge.documentElement;return J&&Ce&&Dt.insertBefore(n.createTextNode(Ce),Dt.childNodes[0]||null),Wt===It?w.call(ge,Ie?"html":"body")[0]:Ie?ge.documentElement:Dt},Kt=function(J){return j.call(J.ownerDocument||J,J,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},wt=function(J){return J instanceof m&&(typeof J.nodeName!="string"||typeof J.textContent!="string"||typeof J.removeChild!="function"||!(J.attributes instanceof g)||typeof J.removeAttribute!="function"||typeof J.setAttribute!="function"||typeof J.namespaceURI!="string"||typeof J.insertBefore!="function"||typeof J.hasChildNodes!="function")},at=function(J){return pn(o)==="object"?J instanceof o:J&&pn(J)==="object"&&typeof J.nodeType=="number"&&typeof J.nodeName=="string"},je=function(J,ge,Ce){L[J]&&Y2(L[J],function(Ze){Ze.call(e,ge,Ce,Y)})},Si=function(J){var ge;if(je("beforeSanitizeElements",J,null),wt(J)||Ft(/[\u0080-\uFFFF]/,J.nodeName))return Ye(J),!0;var Ce=k(J.nodeName);if(je("uponSanitizeElement",J,{tagName:Ce,allowedTags:re}),J.hasChildNodes()&&!at(J.firstElementChild)&&(!at(J.content)||!at(J.content.firstElementChild))&&Ft(/<[/\w]/g,J.innerHTML)&&Ft(/<[/\w]/g,J.textContent)||Ce==="select"&&Ft(/<template/i,J.innerHTML)||J.nodeType===7||xt&&J.nodeType===8&&Ft(/<[/\w]/g,J.data))return Ye(J),!0;if(!re[Ce]||Le[Ce]){if(!Le[Ce]&&xn(Ce)&&(we.tagNameCheck instanceof RegExp&&Ft(we.tagNameCheck,Ce)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Ce)))return!1;if(Et&&!se[Ce]){var Ze=D(J)||J.parentNode,zt=O(J)||J.childNodes;if(zt&&Ze)for(var Dt=zt.length,_t=Dt-1;_t>=0;--_t){var Ei=y(zt[_t],!0);Ei.__removalCount=(J.__removalCount||0)+1,Ze.insertBefore(Ei,E(J))}}return Ye(J),!0}return J instanceof l&&!ni(J)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&Ft(/<\/no(script|embed|frames)/i,J.innerHTML)?(Ye(J),!0):(Ge&&J.nodeType===3&&(ge=J.textContent,ge=Ai(ge,U," "),ge=Ai(ge,V," "),ge=Ai(ge,X," "),J.textContent!==ge&&(Fr(e.removed,{element:J.cloneNode()}),J.textContent=ge)),je("afterSanitizeElements",J,null),!1)},Li=function(J,ge,Ce){if(Fe&&(ge==="id"||ge==="name")&&(Ce in n||Ce in le))return!1;if(!(Qe&&!De[ge]&&Ft(F,ge))){if(!(Ve&&Ft(B,ge))){if(!te[ge]||De[ge]){if(!(xn(J)&&(we.tagNameCheck instanceof RegExp&&Ft(we.tagNameCheck,J)||we.tagNameCheck instanceof Function&&we.tagNameCheck(J))&&(we.attributeNameCheck instanceof RegExp&&Ft(we.attributeNameCheck,ge)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(ge))||ge==="is"&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&Ft(we.tagNameCheck,Ce)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Ce))))return!1}else if(!Oe[ge]){if(!Ft(ce,Ai(Ce,Z,""))){if(!((ge==="src"||ge==="xlink:href"||ge==="href")&&J!=="script"&&X2(Ce,"data:")===0&&pe[J])){if(!(et&&!Ft(Q,Ai(Ce,Z,"")))){if(Ce)return!1}}}}}}return!0},xn=function(J){return J!=="annotation-xml"&&rc(J,oe)},fs=function(J){var ge,Ce,Ze,zt;je("beforeSanitizeAttributes",J,null);var Dt=J.attributes;if(!(!Dt||wt(J))){var _t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te};for(zt=Dt.length;zt--;){ge=Dt[zt];var Ei=ge,vt=Ei.name,br=Ei.namespaceURI;if(Ce=vt==="value"?ge.value:K2(ge.value),Ze=k(vt),_t.attrName=Ze,_t.attrValue=Ce,_t.keepAttr=!0,_t.forceKeepAttr=void 0,je("uponSanitizeAttribute",J,_t),Ce=_t.attrValue,!_t.forceKeepAttr&&(ri(vt,J),!!_t.keepAttr)){if(!$e&&Ft(/\/>/i,Ce)){ri(vt,J);continue}Ge&&(Ce=Ai(Ce,U," "),Ce=Ai(Ce,V," "),Ce=Ai(Ce,X," "));var ps=k(J.nodeName);if(Li(ps,Ze,Ce)){if(qe&&(Ze==="id"||Ze==="name")&&(ri(vt,J),Ce=gt+Ce),xt&&Ft(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ce)){ri(vt,J);continue}if(H&&pn(b)==="object"&&typeof b.getAttributeType=="function"&&!br)switch(b.getAttributeType(ps,Ze)){case"TrustedHTML":{Ce=H.createHTML(Ce);break}case"TrustedScriptURL":{Ce=H.createScriptURL(Ce);break}}try{br?J.setAttributeNS(br,vt,Ce):J.setAttribute(vt,Ce),wt(J)?Ye(J):nc(e.removed)}catch{}}}}je("afterSanitizeAttributes",J,null)}},Yi=function be(J){var ge,Ce=Kt(J);for(je("beforeSanitizeShadowDOM",J,null);ge=Ce.nextNode();)je("uponSanitizeShadowNode",ge,null),Si(ge),fs(ge),ge.content instanceof s&&be(ge.content);je("afterSanitizeShadowDOM",J,null)};return e.sanitize=function(be){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ge,Ce,Ze,zt,Dt;if(Ot=!be,Ot&&(be="<!-->"),typeof be!="string"&&!at(be))if(typeof be.toString=="function"){if(be=be.toString(),typeof be!="string")throw ao("dirty is not a string, aborting")}else throw ao("toString is not a function");if(!e.isSupported){if(pn(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof be=="string")return r.toStaticHTML(be);if(at(be))return r.toStaticHTML(be.outerHTML)}return be}if(St||Ne(J),e.removed=[],typeof be=="string"&&(ie=!1),ie){if(be.nodeName){var _t=k(be.nodeName);if(!re[_t]||Le[_t])throw ao("root node is forbidden and cannot be sanitized in-place")}}else if(be instanceof o)ge=Xt("<!---->"),Ce=ge.ownerDocument.importNode(be,!0),Ce.nodeType===1&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?ge=Ce:ge.appendChild(Ce);else{if(!Ee&&!Ge&&!Ie&&be.indexOf("<")===-1)return H&&me?H.createHTML(be):be;if(ge=Xt(be),!ge)return Ee?null:me?$:""}ge&<&&Ye(ge.firstChild);for(var Ei=Kt(ie?be:ge);Ze=Ei.nextNode();)Ze.nodeType===3&&Ze===zt||(Si(Ze),fs(Ze),Ze.content instanceof s&&Yi(Ze.content),zt=Ze);if(zt=null,ie)return be;if(Ee){if(Te)for(Dt=x.call(ge.ownerDocument);ge.firstChild;)Dt.appendChild(ge.firstChild);else Dt=ge;return(te.shadowroot||te.shadowrootmod)&&(Dt=P.call(t,Dt,!0)),Dt}var vt=Ie?ge.outerHTML:ge.innerHTML;return Ie&&re["!doctype"]&&ge.ownerDocument&&ge.ownerDocument.doctype&&ge.ownerDocument.doctype.name&&Ft(lv,ge.ownerDocument.doctype.name)&&(vt="<!DOCTYPE "+ge.ownerDocument.doctype.name+`>
|
|
3
|
-
`+vt),Ge&&(vt=Ai(vt,U," "),vt=Ai(vt,V," "),vt=Ai(vt,X," ")),H&&me?H.createHTML(vt):vt},e.setConfig=function(be){Ne(be),St=!0},e.clearConfig=function(){Y=null,St=!1},e.isValidAttribute=function(be,J,ge){Y||Ne({});var Ce=k(be),Ze=k(J);return Li(Ce,Ze,ge)},e.addHook=function(be,J){typeof J=="function"&&(L[be]=L[be]||[],Fr(L[be],J))},e.removeHook=function(be){if(L[be])return nc(L[be])},e.removeHooks=function(be){L[be]&&(L[be]=[])},e.removeAllHooks=function(){L={}},e}var hv=ph();function fv(r,e){const t=r.hooks??{};let n;for(n in t){const s=t[n];s!==void 0&&e.addHook(n,s)}}function pv(){return hv()}function xa(r={},e=pv){const t=e();fv(r,t);const n=function(s,a){const o=a.value;if(a.oldValue===o)return;const l=`${o}`,c=a.arg,d=r.namedConfigurations,g=r.default??{};if(d&&c!==void 0){s.innerHTML=t.sanitize(l,d[c]??g);return}s.innerHTML=t.sanitize(l,g)};return{mounted:n,updated:n}}const mv={class:"th-filter-wrapper",ref:"filterRef"},gv={key:1,class:"list-content-wrapper"},vv={class:"btn-wrapper"},uc=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=xa(),{t:n}=Xe.useI18n(),s=r,a=e,o=i.computed(()=>s.list.some(H=>{var $;return($=H.children)==null?void 0:$.length})),l=i.computed(()=>s.list.map(H=>{const $=(H.children||[]).map(z=>({label:z.label,value:z.value}));return{label:H.label,value:H.value,children:o.value?$:void 0}})),c=i.ref(!1);i.watch(()=>s.modelValue,H=>{s.multiple?d.value=H:S.value=H});const d=i.ref([]),g=H=>{d.value=H},m=i.ref([]),S=i.ref(null),b=H=>{S.value===H?S.value=null:S.value=H,y()},T=()=>{d.value=[],m.value=[],S.value=null,y()},y=()=>{let H=null;s.multiple?o.value?H=m.value:H=d.value:H=S.value,a("update:model-value",H),c.value=!0,i.nextTick(()=>{a("confirm"),c.value=!1})},E=i.computed(()=>d.value.length||m.value.length||S.value||s.modelValue),O=i.ref(null),D=async H=>{var N,j;const $=H.target.parentElement.parentElement;await i.nextTick();const z=$.querySelector("input");z.click(),await i.nextTick(),(N=z.change)==null||N.call(z,z),await i.nextTick(),(j=O.value)==null||j.$forceUpdate(),m.value=JSON.parse(JSON.stringify(m.value))},I=({data:H})=>i.h("span",{onclick:D},H.label);return(H,$)=>{const z=i.resolveComponent("ElCascaderPanel");return i.openBlock(),i.createElementBlock("div",mv,[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",E.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(tc))]),_:1})],2)]),default:i.withCtx(()=>[o.value?(i.openBlock(),i.createElementBlock("div",gv,[i.createVNode(z,{ref_key:"aref",ref:O,expandTrigger:"hover",renderLabel:I,modelValue:m.value,"onUpdate:modelValue":$[1]||($[1]=N=>m.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:g,modelValue:d.value,"onUpdate:modelValue":$[0]||($[0]=N=>d.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",vv,[i.createVNode(i.unref(A.OLink),{onClick:T},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.reset")),1)]),_:1}),i.createVNode(i.unref(A.OLink),{onClick:y},{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:S.value,"onUpdate:modelValue":$[3]||($[3]=N=>S.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:$[2]||($[2]=N=>b(""))},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:j=>b(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",E.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(tc))]),_:1})],2)]),_:3},8,["modelValue"]))],512)}}}),yv={class:"more-text-wrapper"},_v={key:0},Tv={key:1},bv=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}=Xe.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 d=o.value;if(d){const g=document.createRange();g.setStart(d,0),g.setEnd(d,d.childNodes.length),s.value=g.getBoundingClientRect().height>d.offsetHeight+10||d.scrollHeight>d.offsetHeight+10,a.value=g.getBoundingClientRect().height||d.scrollHeight}else s.value=!1})},c=()=>{e.link&&window.open(e.text)};return(d,g)=>(i.openBlock(),i.createElementBlock("div",yv,[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:g[0]||(g[0]=m=>n.value=!n.value)},[n.value?(i.openBlock(),i.createElementBlock("div",Tv,[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",_v,[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)]))}}),xv=Xe._export_sfc(bv,[["__scopeId","data-v-4776f8a2"]]);var ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Cv(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 Xs={exports:{}},Sv=Xs.exports,cc;function Ev(){return cc||(cc=1,(function(r,e){(function(t,n){r.exports=n()})(Sv,(function(){var t=1e3,n=6e4,s=36e5,a="millisecond",o="second",l="minute",c="hour",d="day",g="week",m="month",S="quarter",b="year",T="date",y="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|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,D={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(U){var V=["th","st","nd","rd"],X=U%100;return"["+U+(V[(X-20)%10]||V[X]||V[0])+"]"}},I=function(U,V,X){var F=String(U);return!F||F.length>=V?U:""+Array(V+1-F.length).join(X)+U},H={s:I,z:function(U){var V=-U.utcOffset(),X=Math.abs(V),F=Math.floor(X/60),B=X%60;return(V<=0?"+":"-")+I(F,2,"0")+":"+I(B,2,"0")},m:function U(V,X){if(V.date()<X.date())return-U(X,V);var F=12*(X.year()-V.year())+(X.month()-V.month()),B=V.clone().add(F,m),Q=X-B<0,Z=V.clone().add(F+(Q?-1:1),m);return+(-(F+(X-B)/(Q?B-Z:Z-B))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:m,y:b,w:g,d,D:T,h:c,m:l,s:o,ms:a,Q:S}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},$="en",z={};z[$]=D;var N="$isDayjsObject",j=function(U){return U instanceof K||!(!U||!U[N])},x=function U(V,X,F){var B;if(!V)return $;if(typeof V=="string"){var Q=V.toLowerCase();z[Q]&&(B=Q),X&&(z[Q]=X,B=Q);var Z=V.split("-");if(!B&&Z.length>1)return U(Z[0])}else{var oe=V.name;z[oe]=V,B=oe}return!F&&B&&($=B),B||!F&&$},w=function(U,V){if(j(U))return U.clone();var X=typeof V=="object"?V:{};return X.date=U,X.args=arguments,new K(X)},P=H;P.l=x,P.i=j,P.w=function(U,V){return w(U,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var K=(function(){function U(X){this.$L=x(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[N]=!0}var V=U.prototype;return V.parse=function(X){this.$d=(function(F){var B=F.date,Q=F.utc;if(B===null)return new Date(NaN);if(P.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var Z=B.match(E);if(Z){var oe=Z[2]-1||0,ce=(Z[7]||"0").substring(0,3);return Q?new Date(Date.UTC(Z[1],oe,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ce)):new Date(Z[1],oe,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ce)}}return new Date(B)})(X),this.init()},V.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},V.$utils=function(){return P},V.isValid=function(){return this.$d.toString()!==y},V.isSame=function(X,F){var B=w(X);return this.startOf(F)<=B&&B<=this.endOf(F)},V.isAfter=function(X,F){return w(X)<this.startOf(F)},V.isBefore=function(X,F){return this.endOf(F)<w(X)},V.$g=function(X,F,B){return P.u(X)?this[F]:this.set(B,X)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(X,F){var B=this,Q=!!P.u(F)||F,Z=P.p(X),oe=function(De,Ve){var Qe=P.w(B.$u?Date.UTC(B.$y,Ve,De):new Date(B.$y,Ve,De),B);return Q?Qe:Qe.endOf(d)},ce=function(De,Ve){return P.w(B.toDate()[De].apply(B.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(Ve)),B)},re=this.$W,ue=this.$M,te=this.$D,Ae="set"+(this.$u?"UTC":"");switch(Z){case b:return Q?oe(1,0):oe(31,11);case m:return Q?oe(1,ue):oe(0,ue+1);case g:var we=this.$locale().weekStart||0,Le=(re<we?re+7:re)-we;return oe(Q?te-Le:te+(6-Le),ue);case d:case T:return ce(Ae+"Hours",0);case c:return ce(Ae+"Minutes",1);case l:return ce(Ae+"Seconds",2);case o:return ce(Ae+"Milliseconds",3);default:return this.clone()}},V.endOf=function(X){return this.startOf(X,!1)},V.$set=function(X,F){var B,Q=P.p(X),Z="set"+(this.$u?"UTC":""),oe=(B={},B[d]=Z+"Date",B[T]=Z+"Date",B[m]=Z+"Month",B[b]=Z+"FullYear",B[c]=Z+"Hours",B[l]=Z+"Minutes",B[o]=Z+"Seconds",B[a]=Z+"Milliseconds",B)[Q],ce=Q===d?this.$D+(F-this.$W):F;if(Q===m||Q===b){var re=this.clone().set(T,1);re.$d[oe](ce),re.init(),this.$d=re.set(T,Math.min(this.$D,re.daysInMonth())).$d}else oe&&this.$d[oe](ce);return this.init(),this},V.set=function(X,F){return this.clone().$set(X,F)},V.get=function(X){return this[P.p(X)]()},V.add=function(X,F){var B,Q=this;X=Number(X);var Z=P.p(F),oe=function(ue){var te=w(Q);return P.w(te.date(te.date()+Math.round(ue*X)),Q)};if(Z===m)return this.set(m,this.$M+X);if(Z===b)return this.set(b,this.$y+X);if(Z===d)return oe(1);if(Z===g)return oe(7);var ce=(B={},B[l]=n,B[c]=s,B[o]=t,B)[Z]||1,re=this.$d.getTime()+X*ce;return P.w(re,this)},V.subtract=function(X,F){return this.add(-1*X,F)},V.format=function(X){var F=this,B=this.$locale();if(!this.isValid())return B.invalidDate||y;var Q=X||"YYYY-MM-DDTHH:mm:ssZ",Z=P.z(this),oe=this.$H,ce=this.$m,re=this.$M,ue=B.weekdays,te=B.months,Ae=B.meridiem,we=function(Ve,Qe,et,$e){return Ve&&(Ve[Qe]||Ve(F,Q))||et[Qe].slice(0,$e)},Le=function(Ve){return P.s(oe%12||12,Ve,"0")},De=Ae||function(Ve,Qe,et){var $e=Ve<12?"AM":"PM";return et?$e.toLowerCase():$e};return Q.replace(O,(function(Ve,Qe){return Qe||(function(et){switch(et){case"YY":return String(F.$y).slice(-2);case"YYYY":return P.s(F.$y,4,"0");case"M":return re+1;case"MM":return P.s(re+1,2,"0");case"MMM":return we(B.monthsShort,re,te,3);case"MMMM":return we(te,re);case"D":return F.$D;case"DD":return P.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return we(B.weekdaysMin,F.$W,ue,2);case"ddd":return we(B.weekdaysShort,F.$W,ue,3);case"dddd":return ue[F.$W];case"H":return String(oe);case"HH":return P.s(oe,2,"0");case"h":return Le(1);case"hh":return Le(2);case"a":return De(oe,ce,!0);case"A":return De(oe,ce,!1);case"m":return String(ce);case"mm":return P.s(ce,2,"0");case"s":return String(F.$s);case"ss":return P.s(F.$s,2,"0");case"SSS":return P.s(F.$ms,3,"0");case"Z":return Z}return null})(Ve)||Z.replace(":","")}))},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(X,F,B){var Q,Z=this,oe=P.p(F),ce=w(X),re=(ce.utcOffset()-this.utcOffset())*n,ue=this-ce,te=function(){return P.m(Z,ce)};switch(oe){case b:Q=te()/12;break;case m:Q=te();break;case S:Q=te()/3;break;case g:Q=(ue-re)/6048e5;break;case d:Q=(ue-re)/864e5;break;case c:Q=ue/s;break;case l:Q=ue/n;break;case o:Q=ue/t;break;default:Q=ue}return B?Q:P.a(Q)},V.daysInMonth=function(){return this.endOf(m).$D},V.$locale=function(){return z[this.$L]},V.locale=function(X,F){if(!X)return this.$L;var B=this.clone(),Q=x(X,F,!0);return Q&&(B.$L=Q),B},V.clone=function(){return P.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},U})(),L=K.prototype;return w.prototype=L,[["$ms",a],["$s",o],["$m",l],["$H",c],["$W",d],["$M",m],["$y",b],["$D",T]].forEach((function(U){L[U[1]]=function(V){return this.$g(V,U[0],U[1])}})),w.extend=function(U,V){return U.$i||(U(V,K,w),U.$i=!0),w},w.locale=x,w.isDayjs=j,w.unix=function(U){return w(1e3*U)},w.en=z[$],w.Ls=z,w.p={},w}))})(Xs)),Xs.exports}var kv=Ev();const ve=fr(kv),ct=(r=new Date,e="YYYY-MM-DD")=>{let t=r;return t||(t=new Date),ve(new Date(t)).isValid()?ve(new Date(t)).format(e):t},wv=(r,e,t="label",n="value")=>{const s=e.find(a=>a[n]===r);return(s==null?void 0:s[t])||r},Dv=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},ho=r=>r<0?"Invalid number":r>=10?`${r}`:`0${r}`,dc=r=>{if(r>1440*60)return"Invalid date";const e=Math.floor(r/60/60),t=Math.floor((r-e*60*60)/60),n=r%60;return`${ho(e)}:${ho(t)}:${ho(n)}`},Ko=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},Av=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")}`},Tn=()=>{const{t:r,locale:e}=Xe.useI18n(),t=i.computed(()=>[{label:r("meeting.meetingTypeAll"),value:Be.ALL,icon:E2},{label:r("meeting.meetingTypeMeet"),value:Be.MEETING,icon:ch,color:ro.meeting,zIndex:3},{label:r("meeting.meetingTypeEvents"),value:Be.EVENTS,icon:uh,color:ro.events,zIndex:2},{label:r("meeting.meetingTypeSummit"),value:Be.SUMMIT,icon:dh,color:ro.summit,zIndex:1}]),n=i.computed(()=>[{label:r("meeting.day0"),value:mn,max:7},{label:r("meeting.week0"),value:vn,max:2},{label:r("meeting.month0"),value:tn,max:1}]),s=i.computed(()=>[{label:r("meeting.day"),value:mn,max:7},{label:r("meeting.week"),value:vn,max:2},{label:r("meeting.month"),value:tn,max:1}]),a=i.computed(()=>[r("meeting.sunday"),r("meeting.monday"),r("meeting.tuesday"),r("meeting.wednesday"),r("meeting.thursday"),r("meeting.friday"),r("meeting.saturday")]),o=i.computed(()=>{const m=[];for(let S=1;S<=7;S++){const b=S%7;m.push({value:b,label:a.value[b]})}return m});return{t:r,locale:e,meetingTabs:t,cycleTypeOptions0:n,cycleTypeOptions:s,weekDay:a,intervalWeekOptions:o,getPointStr:(m,S)=>m===vn?S.sort((b,T)=>{const y=o.value.findIndex(O=>O.value===b||O.value.toString()===b),E=o.value.findIndex(O=>O.value===T||O.value.toString()===T);return y-E}).map(b=>{const T=o.value.find(y=>y.value===b||y.value.toString()===b);return(T==null?void 0:T.label)||String(b)}).join(r("meeting.cycleSplit")):m===tn?S.join(r("meeting.cycleSplit")):"",getConfig:(m,S)=>{let b=m;const T=t.value.find(y=>y.value===b);return(T==null?void 0:T[S])||""},getPlatformLabel:m=>{switch(m){case"WELINK":return"WeLink";case"ZOOM":return"Zoom";case"TENCENT":return e.value==="zh"?"腾讯会议":"Tencent";default:return m}},getWeekFromDate:m=>a.value[ve(m).day()]}},Nv={class:"o-meeting-detail"},Iv={class:"label"},Ov={key:2},Bv={key:3,class:"value"},Lv={key:0,class:"extra"},Mv={class:"label"},ts=i.defineComponent({__name:"OMeetingDetail",props:{data:{},from:{},show:{type:Boolean},page:{}},setup(r,{expose:e}){const t=r,{t:n,getPlatformLabel:s}=Tn(),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(()=>{var b;const S=!!((b=t.data.live_url)!=null&&b.length);return[{label:n("meeting.activityDetail2"),key:"agenda",ellipsis:!0},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n(S?"meeting.livePlatform":"meeting.activityAddress"),key:S?"live_url":"address"},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}].slice(0,t.from==="home"?5:8)}),l=i.computed(()=>{var b;const S=!!((b=t.data.live_url)!=null&&b.length);return[{label:n("meeting.activityType"),key:"activity_type",isType:!0},{label:n(S?"meeting.livePlatform":"meeting.activityAddress"),key:S?"live_url":"address"},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n("meeting.registrationUrl"),key:"register_url",isLink:!0},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}]}),c=S=>t.data[S],d=i.computed(()=>t.data.type===Be.EVENTS?t.page===Be.APPROVAL?l.value:o.value:t.data.type===Be.SUMMIT?o.value:a.value),g=i.ref([]);return e({copyInfo:()=>{try{let S=`${n("meeting.meetingTopic")+t.data.topic}
|
|
4
|
-
`;return S+=[...g.value].reduce((b
|
|
5
|
-
`,""),navigator.clipboard.writeText(S),Promise.resolve()}catch(S){return Promise.reject(S)}}}),(S,b)=>(i.openBlock(),i.createElementBlock("div",Nv,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.value,(T,y)=>{var E,O,D;return i.openBlock(),i.createElementBlock("div",{ref_for:!0,ref_key:"domRef",ref:g,class:i.normalizeClass(["label-item",{"record-item":T.isRecord&&((E=c(T.key))==null?void 0:E.length),"link-item":T.isLink,"is-empty":!((O=c(T.key))!=null&&O.length),[`label-item_${r.data.id}`]:!0,[`type_${r.data.type}`]:!0}]),key:y},[c(T.key)&&!T.isRecord?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("span",Iv,i.toDisplayString(T.label),1),T.ellipsis?(i.openBlock(),i.createBlock(xv,{key:0,show:r.show,text:c(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:c(T.key)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c(T.key)),1)]),_:2},1032,["href"])):T.key==="platform"?(i.openBlock(),i.createElementBlock("span",Ov,i.toDisplayString(i.unref(s)(c(T.key))),1)):(i.openBlock(),i.createElementBlock("span",Bv,[T.extra?(i.openBlock(),i.createElementBlock("i",Lv,i.toDisplayString(c(T.extra)),1)):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(c(T.key)||"-"),1)]))],64)):i.createCommentVNode("",!0),T.isRecord&&((D=c(T.key))!=null&&D.length)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("span",Mv,i.toDisplayString(T.label),1),i.createElementVNode("div",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(T.key),I=>(i.openBlock(),i.createElementBlock("p",{key:I.create_time,class:"value"},i.toDisplayString(I.reason)+" "+i.toDisplayString(i.unref(ct)(I.create_time,"YYYY/MM/DD HH:mm:ss"))+" "+i.toDisplayString(I.action===1?i.unref(n)("meeting.approveReview"):i.unref(n)("meeting.rejectReview")),1))),128))])],64)):i.createCommentVNode("",!0)],2)}),128))]))}}),Pv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"32",viewBox:"0 0 30 32"};function Rv(r,e){return i.openBlock(),i.createElementBlock("svg",Pv,[...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 kl={name:"meeting-icon-copy",render:Rv},Vv={class:"meet-title-left"},Fv=["title"],$v={class:"text"},Uv={key:0,class:"tag-wrapper"},qv={class:"start-time"},zv={class:"calendar-info"},mh=i.defineComponent({__name:"OMeetingCalendarList",props:{list:{default:()=>[]},groupType:{}},setup(r){const{activityTypeMap:e}=ba(),t=r,{t:n,locale:s,getConfig:a,getPointStr:o}=Tn(),l=i.ref([]),c=A.useMessage(null),d=async T=>{await l.value[T].copyInfo(),c.success({content:n("common.copySuccess")})},g=i.ref([]),m=i.computed(()=>({SIG_GROUP:`${t.groupType===vi.GROUP?n("meeting.groups"):n("meeting.sigs")}: `,NEW_DATE:n("meeting.latestMeeting"),EMPTY_TEXT:n("meeting.meetingEmptyText"),LEARN_MORE:n("common.seeMore"),JOIN_MEETING:n("meeting.joinMeeting"),SIGN:n("meeting.sign"),DETAILS:n("meeting.detail")})),S=i.ref();i.watch([()=>t.list,()=>A.isClient],()=>{t.list.length===1?g.value=[t.list[0].id]:g.value=[],A.isClient&&i.nextTick(()=>{var y;const T=new ResizeObserver(E=>{for(let O of E){const{height:D}=O.contentRect;O.target.classList.remove("hidden-divider"),D>=30&&O.target.classList.add("hidden-divider")}});(y=S.value)==null||y.forEach(E=>{T.observe(E)})})});const b=i.computed(()=>t.list.map(T=>{var X,F;const y=T.type;let E="";if(y!==Be.MEETING){let B=(X=e.value.get(T.activity_type))==null?void 0:X.label;return T.start&&T.end?T.end_date===T.start_date?E=`${ct(T.start_date)} ${T.start}-${T.end}`:E=`${ct(T.start_date)} ${T.start}-${ct(T.end_date)} ${T.end}`:E=`${ct(T.start_date,"YYYY/MM/DD HH:mm")} ${ct(T.end_date,"YYYY/MM/DD HH:mm")}`,{...T,activity_type:B,dateRange:E}}const{is_cycle:O,date:D,start:I,end:H,cycle_start_date:$,cycle_end_date:z,cycle_start:N,cycle_end:j,cycle_type:x,cycle_interval:w,cycle_point:P}=T;E=`${ct(D)} ${I} - ${H}`,O&&(E=`${ct($)} - ${ct(z)}`);let K=`${I} - ${H}`,L=null,U=!1;const V=((F=T.obs_data)==null?void 0:F.filter(B=>B.text_video_url))||[];if(O){let B="";x===mn&&(B=n("meeting.cycleDay")),x===vn&&(w>1?B=n("meeting.cycleWeek.other",[o(x,P),w]):B=n("meeting.cycleWeek.one",[o(x,P)])),x===tn&&(B=n("meeting.cycleMonth",[o(x,P)])),K=n("meeting.cycleMeetingText2",{startDate:$,endDate:z,startTime:N,endTime:j,cycleType:B}),U=V.some(Q=>{var Z;return Q.sub_id===((Z=T.cycle_sub.find(oe=>oe.date===D))==null?void 0:Z.sub_id)})}else U=V.length>0;return U&&(L=`${location.origin}/${s.value}/video/${T.group_name}/${T.mid}/${D}`),{...T,dateRange:E,timeRange:K,replay_url:L}}));return(T,y)=>{var E,O;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["o-meeting-calendar-list",(E=b.value)!=null&&E.length?"":"is-empty"])},[(O=b.value)!=null&&O.length?(i.openBlock(),i.createBlock(i.unref(A.OCollapse),{key:1,modelValue:g.value,"onUpdate:modelValue":y[0]||(y[0]=D=>g.value=D),style:{"--collapse-padding":"0"}},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value,(D,I)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:D.id,value:D.id},{title:i.withCtx(()=>[i.createElementVNode("div",Vv,[i.createElementVNode("div",{class:"meet-title",title:D.topic||D.name},[i.createVNode(i.unref(A.OIcon),{style:i.normalizeStyle({backgroundColor:`${i.unref(a)(D.type,"color")}`})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(a)(D.type,"icon"))))]),_:2},1032,["style"]),i.createElementVNode("div",$v,i.toDisplayString(D.topic||D.name||D.title),1),D.is_cycle?(i.openBlock(),i.createElementBlock("div",Uv,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],8,Fv),i.createElementVNode("div",{class:"meet-info",ref_for:!0,ref_key:"meetInfoRef",ref:S},[i.createElementVNode("span",qv,[i.createElementVNode("span",null,i.toDisplayString(D.dateRange),1)]),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("div",null,[D.group_name?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(m.value.SIG_GROUP)+" "+i.toDisplayString(D.group_name),1)],64)):i.createCommentVNode("",!0),D.activity_type?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(D.activity_type),1)],64)):i.createCommentVNode("",!0)])],512),D.url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,"hover-underline":!1,href:D.url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Hr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.LEARN_MORE),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),D.join_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,"hover-underline":!1,href:D.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(Hr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.JOIN_MEETING),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),D.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,"hover-underline":!1,href:D.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(Hr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.DETAILS),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),D.register_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,"hover-underline":!1,href:D.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(Hr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.SIGN),1)]),_:1},8,["href"])):i.createCommentVNode("",!0)]),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>d(I),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(kl))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",zv,[i.createVNode(ts,{show:g.value.includes(D.id),data:D,ref_for:!0,ref:H=>l.value[I]=H,from:"home"},null,8,["show","data"])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):i.renderSlot(T.$slots,"empty",{key:0})],2)}}}),jv={class:"o-meeting-calendar"},Hv={class:"calendar-body"},Gv={class:"calender-header-left"},Wv={class:"left-title"},Yv={class:"month-date"},Xv={class:"right-title"},Kv=["onClick"],Qv={class:"day-box"},Zv={class:"icon-box"},Jv={class:"detail-list"},ey={class:"current-day"},ty={class:"right-title"},iy={class:"title-list"},ny="2021-01-01",hc=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:vi.SIG},groups:{default:()=>[]}},setup(r,{expose:e}){const t=r,{t:n,locale:s,meetingTabs:a,getConfig:o}=Tn(),l=i.computed(()=>s.value===Xe.Locales.EN),c=i.ref(""),d=i.ref([]),g=i.ref([]),m=i.ref([]),S=i.ref([]),b=i.ref([]),T=i.ref([]),y=i.ref([]),E=i.ref(Be.ALL),O=i.computed(()=>{let re=a.value;return t.hiddenEvents&&(re=re.filter(ue=>ue.value!==Be.EVENTS)),t.hiddenSummit&&(re=re.filter(ue=>ue.value!==Be.SUMMIT)),re.filter(ue=>ue.value!==Be.ALL).length===1?[]:re});i.watch(()=>O.value,()=>{var re;E.value=((re=O.value[0])==null?void 0:re.value)??Be.MEETING});const D=i.ref(),I=i.ref("407px"),H=i.ref(!1),$=i.ref(""),z=i.ref(!1),N=i.ref(""),j=async re=>{if(t.getSummitListRequest){const ue=await t.getSummitListRequest(re);g.value=(ue||[]).map(te=>({...te,type:Be.SUMMIT,start_date_time:`${ct(te.start_date)} ${te.start}`,end_date_time:`${ct(te.end_date)} ${te.end}`}))}else g.value=[]},x=async re=>{if(t.getEventsListRequest){const ue=await t.getEventsListRequest(re);S.value=(ue||[]).map(te=>({...te,type:Be.EVENTS,start_date_time:`${ct(te.start_date)} ${te.start}`,end_date_time:`${ct(te.end_date)} ${te.end}`}))}else S.value=[]},w=async re=>{t.getDateListRequest&&t.getDateListRequest(re,N.value||"").then(ue=>{d.value=ue}),t.getEventsDatesRequest&&t.getEventsDatesRequest(re).then(ue=>{b.value=ue}),t.getSummitDatesRequest&&t.getSummitDatesRequest(re).then(ue=>{m.value=ue})},P=async re=>{if(t.getMeetingListRequest&&re.date)try{const ue=await t.getMeetingListRequest(re.date,N.value,"");y.value=ue.map(te=>({...te,time:`${te.start}-${te.end}`,type:Be.MEETING,date:te.date||re.date})).sort((te,Ae)=>{var we,Le;return parseInt((we=te.start||te.cycle_start)==null?void 0:we.replace(":",""))-parseInt(Ae.end||((Le=Ae.cycle_end)==null?void 0:Le.replace(":","")))})}catch{y.value=[]}},K=i.computed(()=>[...y.value,...S.value.filter(re=>{var ue;return!ve(re.start_date).isAfter(ve($.value))&&!ve($.value).isAfter(ve(re.end_date))||((ue=re.dates)==null?void 0:ue.includes($.value))}),...g.value.filter(re=>{var ue;return(ue=re.dates)==null?void 0:ue.includes($.value)})].filter(re=>E.value===Be.ALL?!0:re.type===E.value)),L=async re=>{const ue=ve(re).format("YYYY-MM-DD");if($.value=ue,j(ue),x(ue),w(ue),T.value=[...new Set([...d.value,...m.value,...b.value])].flat().sort((te,Ae)=>ve(te).isAfter(ve(Ae))?1:-1),!re)if(!T.value.length)c.value=ct(new Date);else{let te=[...T.value].reverse().find(Ae=>ve().isAfter(ve(Ae)));te||(te=T.value.find(Ae=>ve(Ae).isAfter(ve()))),c.value=ct(te)}P({date:ue,type:E.value})},U=zi.useDebounceFn((re,ue)=>{if(z.value){z.value=!1;return}if(new Date(re).getTime()/1e3<1610380800){ue==null||ue.stopPropagation();return}L(re)},300),V=(re,ue)=>{if(ct(ue)===ct(ny)&&re==="prev-month"){H.value=!0;return}H.value=!1,D.value.selectDate(re),U(ct(D.value.selectedDay))},X=()=>{i.nextTick(()=>{P({date:$.value,type:E.value}),w($.value)})},F=re=>re.replace(/^0+(?=\d)/,""),B=re=>{new MutationObserver(function(){I.value=`${re.offsetHeight-2}px`}).observe(re,{childList:!0,subtree:!0,characterData:!0})},Q=async()=>{const re=document.querySelector(".calendar-body .el-calendar__body");re&&(B(re),I.value=`${re.offsetHeight-2}px`)};i.onMounted(()=>{Q(),L()});const Z=i.watch(()=>T.value.length,()=>{A.isClient&&!$.value&&i.nextTick(()=>{const re=document.querySelector(".is-today .out-box");re&&(z.value=!0,re.click(),Z())})}),oe=re=>l.value?re.split(" ").reverse().join(" "):re,ce=(re,ue)=>re===Be.MEETING?[Be.ALL,Be.MEETING].includes(E.value)&&d.value.includes(ue):re===Be.SUMMIT?[Be.ALL,Be.SUMMIT].includes(E.value)&&m.value.includes(ue):re===Be.EVENTS?[Be.ALL,Be.EVENTS].includes(E.value)&&b.value.includes(ue):!1;return e({refresh:L}),(re,ue)=>(i.openBlock(),i.createElementBlock("div",jv,[i.createElementVNode("div",Hv,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendar",ref:D,class:"calender"},{header:i.withCtx(({date:te})=>[i.createElementVNode("div",Gv,[i.createElementVNode("div",Wv,[i.createVNode(i.unref(A.OIcon),{onClick:Ae=>V("prev-month",te)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft),{class:i.normalizeClass({disable:H.value})},null,8,["class"])]),_:1},8,["onClick"]),i.createElementVNode("span",Yv,i.toDisplayString(oe(te)),1),i.createVNode(i.unref(A.OIcon),{onClick:Ae=>V("next-month",te)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1},8,["onClick"])]),i.createVNode(i.unref(A.OSelect),{modelValue:N.value,"onUpdate:modelValue":ue[0]||(ue[0]=Ae=>N.value=Ae),placeholder:i.unref(n)(r.groupType===i.unref(vi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:X},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.groups,Ae=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:Ae,key:Ae},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(Ae),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])]),i.createElementVNode("div",Xv,[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.latestMeeting"))+" ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(ve)(c.value).format("YYYY/MM/DD")),1)])]),"date-cell":i.withCtx(({data:te})=>[i.createElementVNode("div",{class:i.normalizeClass(["out-box",{"has-calender":T.value.includes(te.day)}]),onClick:Ae=>i.unref(U)(te.day,Ae)},[i.createElementVNode("div",Qv,[i.createElementVNode("p",{class:i.normalizeClass([te.isSelected?"is-selected":"","date-calender"])},i.toDisplayString(F(te.day.split("-").at(-1)||"")),3),i.createElementVNode("div",Zv,[ce(i.unref(Be).MEETING,te.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"meeting",style:i.normalizeStyle({zIndex:i.unref(o)(i.unref(Be).MEETING,"zIndex"),backgroundColor:i.unref(o)(i.unref(Be).MEETING,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(ch))]),_:1},8,["style"])):i.createCommentVNode("",!0),ce(i.unref(Be).EVENTS,te.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,class:"events",style:i.normalizeStyle({zIndex:i.unref(o)(i.unref(Be).EVENTS,"zIndex"),backgroundColor:i.unref(o)(i.unref(Be).EVENTS,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(uh))]),_:1},8,["style"])):i.createCommentVNode("",!0),ce(i.unref(Be).SUMMIT,te.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:2,class:"summit",style:i.normalizeStyle({zIndex:i.unref(o)(i.unref(Be).SUMMIT,"zIndex"),backgroundColor:i.unref(o)(i.unref(Be).SUMMIT,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(dh))]),_:1},8,["style"])):i.createCommentVNode("",!0)])])],10,Kv)]),_:1},512),i.createElementVNode("div",Jv,[i.createElementVNode("div",ey,[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.latestMeeting"))+" ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(ve)($.value).format("YYYY/MM/DD")),1)]),i.createElementVNode("div",ty,[i.createElementVNode("div",iy,[i.createVNode(i.unref(A.OSelect),{modelValue:N.value,"onUpdate:modelValue":ue[1]||(ue[1]=te=>N.value=te),placeholder:i.unref(n)(r.groupType===i.unref(vi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:X},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.groups,te=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:te,key:te},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(te),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"]),i.createVNode(i.unref(A.OTab),{modelValue:E.value,"onUpdate:modelValue":ue[2]||(ue[2]=te=>E.value=te),line:!1,"max-show":9999},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,te=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:te.value,value:te.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(te.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(te.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",style:i.normalizeStyle({"--height":I.value})},{default:i.withCtx(()=>[i.createVNode(mh,{list:K.value,groupType:r.groupType},{empty:i.withCtx(()=>[i.renderSlot(re.$slots,"empty")]),_:3},8,["list","groupType"])]),_:3},8,["style"])])])])]))}}),ry={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function sy(r,e){return i.openBlock(),i.createElementBlock("svg",ry,[...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 fc={name:"meeting-icon-help",render:sy},ay={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function oy(r,e){return i.openBlock(),i.createElementBlock("svg",ay,[...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 pc={name:"meeting-icon-tip",render:oy},ly=i.defineComponent({__name:"OMeetingCalendarSelector",props:{modelValue:{default:()=>[]},multiple:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const{t}=Xe.useI18n(),n=r,s=e,a=()=>{let y=[];for(let E=1;E<=31;E++)y.push(E);return y},o=i.computed(()=>a()),l=i.ref([]),c=i.ref([]),d=i.ref(null),g=()=>{l.value=[...n.modelValue],c.value=[...n.modelValue]};i.watchEffect(()=>{g()});const m=()=>{s("update:modelValue",c.value),d.value&&(d.value.expanded=!1)},S=()=>{g(),d.value&&(d.value.expanded=!1)},b=y=>{if(n.multiple){const E=c.value.indexOf(y);E===-1?c.value.push(y):c.value.splice(E,1),c.value.sort()}else c.value=[y],m()},T=y=>{n.multiple?b(y):c.value=[],m()};return(y,E)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["o-meeting-calendar-selector",!r.multiple&&"is-single"])},[i.createVNode(i.unref(tt.ElSelect),{ref_key:"selectorRef",ref:d,"popper-class":"o-meeting-calendar-selector-popper",placeholder:i.unref(t)("meeting.selectRepeatDate"),size:"large",multiple:"",collapseTags:"",maxCollapseTags:3,modelValue:l.value,onRemoveTag:T},i.createSlots({default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,O=>(i.openBlock(),i.createBlock(i.unref(tt.ElOption),{key:O,label:O,value:O,onClick:D=>b(O),class:i.normalizeClass(c.value.includes(O)&&"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:m},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.confirm")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{variant:"text",onClick:S},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.cancel")),1)]),_:1})]),key:"0"}:void 0]),1032,["placeholder","modelValue"])],2))}}),uy={class:"o-meeting-form"},cy={class:"label-wrapper"},dy={class:"o-meeting-form-popover-content etherpad"},hy={class:"repeat-config-wrapper"},fy={class:"repeat-config"},py={class:"repeat-config-item"},my={class:"time-select-wrapper"},gy={key:1},vy={key:1,class:"switch-wrapper"},yy={class:"switch-text"},_y={key:1,class:"switch-wrapper"},Ty={class:"switch-text"},by={class:"label-wrapper"},xy={class:"o-meeting-form-popover-content"},Cy=["href"],Sy={key:0,class:"form-btns"},mc=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:vi.SIG},confirmText:{}},emits:["confirm","cancel"],setup(r,{expose:e,emit:t}){const{t:n,locale:s,cycleTypeOptions0:a,intervalWeekOptions:o,getPlatformLabel:l}=Tn(),c=r,d=A.useMessage(null),g=a,m=o,S=i.computed(()=>wv(T.value.cycle_type,g.value,"max")),b={is_record:!0,agenda:"",email_list:"",platform:"WELINK",topic:"",group_name:"",etherpad:"",date:"",date_range:[],start:"",end:"",time:"",is_cycle:!1,cycle_interval:1,cycle_type:mn,cycle_point:[]},T=i.ref(Object.assign({},b)),y=i.ref(null),E=i.ref(!1),O=i.computed(()=>({topic:[{required:!0,message:n("meeting.enterMeetingName")},{validator:X=>{if(X.length>128)return{type:"danger",message:n("meeting.meetingNameTooLong")}}}],agenda:[{validator:X=>{if(X.length>4096)return{type:"danger",message:n("meeting.meetingAgendaTooLong")}}}],group_name:[{required:!0,message:c.groupType===vi.GROUP?n("meeting.selectGroup"):n("meeting.selectSig")}],etherpad:[{required:!0,message:n("meeting.enterEtherpad")}],date:[{required:!0,message:n("meeting.selectDate")}],platform:[{required:!0,message:n("meeting.selectPlatform")}],time:[{validator:X=>{var ue;const{is_cycle:F,cycle_type:B,cycle_interval:Q,cycle_point:Z,date:oe,date_range:ce}=T.value;if(F){const te=n("meeting.finishMeetingConfig");if(B===mn&&!Q)return{type:"danger",message:te};if(B===vn&&(!Q||!(Z!=null&&Z.length)))return{type:"danger",message:te};if(B===tn&&(!Q||!(Z!=null&&Z.length)))return{type:"danger",message:te};if(!(ce!=null&&ce.length))return{type:"danger",message:n("meeting.selectMeetingDate")};const Ae=n("meeting.invalidMeetingDuration");let we=ce[0];const Le=ce[1];if(B===vn){const De=new Set;for(;!ve(we).isAfter(ve(Le));)De.add(ve(we).day()),we=ve(we).add(1,"day").format("YYYY-MM-DD");if(Z.every(Ve=>!De.has(Ve)))return{type:"danger",message:Ae}}if(B===tn){const De=new Set;for(;!ve(we).isAfter(ve(Le));)De.add(ve(we).date()),we=ve(we).add(1,"day").format("YYYY-MM-DD");if(Z.every(Ve=>!De.has(Ve)))return{type:"danger",message:Ae}}}else if(!oe)return{type:"danger",message:n("meeting.selectMeetingDate")};if(!((ue=X==null?void 0:X.trim())!=null&&ue.length))return{type:"danger",message:n("meeting.selectMeetingTime")};const re=X.split("-").map(te=>te.split(":").map(Number));if(re[0][0]>re[1][0]||re[0][0]===re[1][0]&&re[0][1]>=re[1][1])return{type:"danger",message:n("meeting.endTimeAfterStartTime")};if(!T.value.is_cycle&&T.value.date&&T.value.start){const te=`${T.value.date} ${T.value.start}`;if(ve(te).isBefore(ve()))return{type:"danger",message:n("meeting.startTimeBeforeEndTime")}}},triggers:["blur","change"]}],email_list:[{validator:X=>{if(c.isEdit)return{};const F=X.replaceAll(" ","").replaceAll(",",";")||"";if(F.length){if(F.length>1020)return{type:"danger",message:n("meeting.emailTooLong")};const B=F.split(";")||[];if(B.some(Q=>!hh.test(Q)))return{type:"danger",message:n("meeting.emailInvalid")};if(B.some(Q=>Q.length>50))return{type:"danger",message:n("meeting.singleEmailTooLong")};if(B.length>20)return{type:"danger",message:n("meeting.emailCountTooLong")}}},triggers:["blur","change"]}]})),D=i.ref([]),I=async()=>{if(!c.getGroupsRequest)return;const X=await c.getGroupsRequest();D.value=X.map(F=>({...F,label:F.group_name,value:F.group_name})),c.data&&L(T.value.group_name)},H=i.ref([]),$=async()=>{if(!c.getPlatformsRequest)return;const X=await c.getPlatformsRequest();H.value=X.map(F=>({label:l(F),value:F})),c.data||(T.value.platform=H.value[0].value)},z=t,N=()=>{if(!c.data)return{};const{start:X,end:F,is_cycle:B,cycle_start_date:Q,cycle_end_date:Z,cycle_point:oe,cycle_interval:ce,cycle_start:re,cycle_end:ue}=c.data;return{...c.data,time:`${X}-${F}`,...B?{date_range:[Q,Z],cycle_point:(oe==null?void 0:oe.map(te=>parseInt(te)))||[],cycle_interval:ce||1,time:`${re}-${ue}`,start:re,end:ue}:{}}};i.watch(()=>c.data,X=>{var F;if(X){const B=N();console.log(1,B),console.log(c.subId,B.sub_id);const Q=((F=B==null?void 0:B.cycle_sub)==null?void 0:F.find(te=>te.sub_id===c.subId||B.sub_id))||{};console.log(2,Q);const{mid:Z,date:oe,start:ce,end:re,sub_id:ue}=Q;Object.assign(T.value,B,c.isSub?{is_cycle:!1,mid:Z,date:oe,start:ce,end:re,sub_id:ue}:{}),console.log(T.value)}else{const B=ve().format("YYYY-MM-DD"),Q=ve().format("HH:mm");let Z="",oe="";const ce=On(Q);if(ce<=On("08:00"))Z="08:00",oe="09:00";else if(On("22:15")<=ce)Z="08:00",oe="09:00";else{let[ue,te]=Q.split(":").map(Number);te>=45?(ue++,te=0):te=(Math.floor(te/15)+1)*15,Z=dc(ue*60+te).slice(3),oe=dc(ue*60+te+60).slice(3)}const re=[ve().format("YYYY-MM-DD"),ve().add(1,"month").format("YYYY-MM-DD")];Object.assign(T.value,{date:B,start:Z,end:oe,time:`${Z}-${oe}`,date_range:re})}},{immediate:!0,deep:!0});const j=()=>{var X,F,B,Q;T.value=Object.assign({},b),(F=(X=y.value)==null?void 0:X.clearValidate)==null||F.call(X),(Q=(B=y.value)==null?void 0:B.resetFields)==null||Q.call(B),z("cancel")},x=()=>{T.value.cycle_point=[],T.value.cycle_interval=1},w=()=>{T.value.platform="WELINK"},{lePadV:P}=At.useScreen(),K=async()=>{var F;let X=c.isEdit?n("meeting.editSuccess"):n("meeting.booSuccess");try{E.value=!0;const B=await y.value.validate();if(!B||B.some(Ie=>!!Ie))return;const{topic:Q,etherpad:Z,group_name:oe,platform:ce,date:re,start:ue,end:te,agenda:Ae,is_record:we,is_cycle:Le,date_range:De,cycle_type:Ve,cycle_interval:Qe,cycle_point:et}=T.value;let $e={topic:Q,etherpad:Z,agenda:Ae,is_record:we,group_name:oe,platform:ce,is_cycle:Le},Ge;if(Le?($e={...$e,cycle_interval:Qe,cycle_type:Ve,cycle_start_date:(De==null?void 0:De[0])||"",cycle_end_date:(De==null?void 0:De[1])||"",cycle_start:ue,cycle_end:te},Ve!==mn&&($e={...$e,cycle_point:et.join(",")})):$e={...$e,date:(re==null?void 0:re.split(" ")[0])||"",start:ue,end:te},c.isEdit)if(c.isSub){const{mid:Ie,sub_id:St}=T.value,{date:lt,start:Ee,end:Te}=$e;Ge=await(c==null?void 0:c.editSubMeetingRequest(St,{mid:Ie,date:lt,start:Ee,end:Te,is_notify:!0}))}else{const{email_list:Ie,platform:St,group_name:lt,etherpad:Ee,...Te}=$e;Ge=await(c==null?void 0:c.editMeetingRequest((F=c.data)==null?void 0:F.id,{...Te,is_notify:!0}))}else Ge=await(c==null?void 0:c.createMeetingRequest({...$e,email_list:T.value.email_list.replaceAll(" ","")}));if(typeof Ge=="boolean"&&!Ge)return;const xt=n("meeting.meetingHandleSuccess",[T.value.topic,X]);d.success({content:xt}),z("confirm")}finally{E.value=!1}};i.onMounted(()=>{I(),$()});const L=X=>{const F=D.value.find(B=>B.value===X);c.isEdit||(T.value.etherpad=(F==null?void 0:F.etherpad)||"",T.value.email_list=(F==null?void 0:F.email_list)||"")},U=X=>X.getTime()<Date.now()-1440*60*1e3,V=()=>{T.value.start&&T.value.end?T.value.time=`${T.value.start}-${T.value.end}`:T.value.time=""};return e({confirm:K}),(X,F)=>(i.openBlock(),i.createElementBlock("div",uy,[i.createVNode(i.unref(A.OForm),{model:T.value,ref_key:"formRef",ref:y,"has-required":"",layout:i.unref(P)?"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:T.value.topic,"onUpdate:modelValue":F[0]||(F[0]=B=>T.value.topic=B)},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(vi).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(vi).GROUP?i.unref(n)("meeting.selectGroup"):i.unref(n)("meeting.selectSig"),size:"large",style:{width:"100%"},modelValue:T.value.group_name,"onUpdate:modelValue":F[1]||(F[1]=B=>T.value.group_name=B),onChange:L},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(D.value,B=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:B.value,value:B.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(B.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),T.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",cy,[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(fc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",dy,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:T.value.etherpad,"onUpdate:modelValue":F[2]||(F[2]=B=>T.value.etherpad=B)},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",hy,[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:T.value.is_cycle,"onUpdate:modelValue":F[3]||(F[3]=B=>T.value.is_cycle=B),onChange:w,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",fy,[T.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",py,[T.value.cycle_type!==i.unref(tn)?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElInputNumber),{size:"large",modelValue:T.value.cycle_interval,"onUpdate:modelValue":F[4]||(F[4]=B=>T.value.cycle_interval=B),min:1,max:S.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:T.value.cycle_type,"onUpdate:modelValue":F[5]||(F[5]=B=>T.value.cycle_type=B),class:"interval-select",optionWrapClass:"o-meeting-form-interval-select-options",onChange:x},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(g),B=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:B.value,value:B.value,label:B.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1},8,["label"]),T.value.cycle_type!==i.unref(mn)?(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(()=>[T.value.cycle_type===i.unref(vn)?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",multiple:"",modelValue:T.value.cycle_point,"onUpdate:modelValue":F[6]||(F[6]=B=>T.value.cycle_point=B),placeholder:i.unref(n)("meeting.selectRepeatDate"),"max-tag-count":1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(m),B=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:B.value,value:B.value,label:B.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])):i.createCommentVNode("",!0),T.value.cycle_type===i.unref(tn)?(i.openBlock(),i.createBlock(ly,{key:1,modelValue:T.value.cycle_point,"onUpdate:modelValue":F[7]||(F[7]=B=>T.value.cycle_point=B)},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:T.value.date_range,"onUpdate:modelValue":F[8]||(F[8]=B=>T.value.date_range=B),"start-placeholder":i.unref(n)("meeting.startDate"),"end-placeholder":i.unref(n)("meeting.endDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":U,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:T.value.date,"onUpdate:modelValue":F[9]||(F[9]=B=>T.value.date=B),placeholder:i.unref(n)("meeting.selectDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":U,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",my,[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:T.value.start,"onUpdate:modelValue":F[10]||(F[10]=B=>T.value.start=B),size:"large",clearable:!1,onChange:V},null,8,["placeholder","modelValue"])]),_:1}),F[17]||(F[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:T.value.end,"onUpdate:modelValue":F[11]||(F[11]=B=>T.value.end=B),size:"large",clearable:!1,onChange:V},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,class:"platform-item"},{default:i.withCtx(()=>[r.data?(i.openBlock(),i.createElementBlock("span",gy,i.toDisplayString(i.unref(l)(T.value.platform)),1)):(i.openBlock(),i.createBlock(i.unref(A.ORadioGroup),{key:0,modelValue:T.value.platform,"onUpdate:modelValue":F[12]||(F[12]=B=>T.value.platform=B),disabled:T.value.is_cycle},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(H.value,B=>(i.openBlock(),i.createBlock(i.unref(A.ORadio),{key:B.value,value:B.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(l)(B.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:T.value.agenda,"onUpdate:modelValue":F[13]||(F[13]=B=>T.value.agenda=B)},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(P)?(i.openBlock(),i.createBlock(i.unref(A.OSwitch),{key:0,modelValue:T.value.is_record,"onUpdate:modelValue":F[14]||(F[14]=B=>T.value.is_record=B),disabled:r.isSub},null,8,["modelValue","disabled"])):(i.openBlock(),i.createElementBlock("div",vy,[i.createVNode(i.unref(A.OSwitch),{modelValue:T.value.is_record,"onUpdate:modelValue":F[15]||(F[15]=B=>T.value.is_record=B),disabled:r.isSub},null,8,["modelValue","disabled"]),i.createElementVNode("div",yy,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(pc))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[i.unref(l)(T.value.platform)])),1)])]))]),_:1},8,["label"]),i.unref(P)?(i.openBlock(),i.createElementBlock("div",_y,[i.createElementVNode("div",Ty,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(pc))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[i.unref(l)(T.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",by,[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(fc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",xy,[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,Cy)])]),_: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:T.value.email_list,"onUpdate:modelValue":F[16]||(F[16]=B=>T.value.email_list=B)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),r.showBtns?(i.openBlock(),i.createElementBlock("div",Sy,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",onClick:K,loading:E.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(r.isEdit?i.unref(n)("common.save"):r.confirmText||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)]))}}),Ey={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function ky(r,e){return i.openBlock(),i.createElementBlock("svg",Ey,[...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 wy={name:"meeting-icon-playing",render:ky},Dy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Ay(r,e){return i.openBlock(),i.createElementBlock("svg",Dy,[...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 Ny={name:"components-icon-search",render:Ay},Iy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Oy(r,e){return i.openBlock(),i.createElementBlock("svg",Iy,[...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 By={name:"components-icon-chevron-up",render:Oy},Ly={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function My(r,e){return i.openBlock(),i.createElementBlock("svg",Ly,[...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 Py={name:"meeting-icon-speaker",render:My},Ry={class:"o-meeting-playback-subtitles"},Vy={class:"search-captions"},Fy={key:0,class:"suffix-box"},$y={class:"right-handle"},Uy=["onClick"],qy={class:"info"},zy={class:"num"},jy={class:"speaker"},Hy={class:"start-time"},Gy={class:"text"},Wy={key:1},Yy=i.defineComponent({__name:"OMeetingPlaybackSubtitles",props:{captions:{default:()=>[]},instance:{},trackIdx:{}},setup(r){const e=xa(),t=r,{t:n}=Xe.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,L=>{L&&c()});const d=i.ref([]);i.watch(()=>t.captions,()=>{d.value=t.captions||[],i.nextTick(()=>{var L;a.value&&((L=a.value)==null||L.scrollTo({top:0,behavior:"smooth"}))})},{immediate:!0,deep:!0});const g=L=>`00:${L.split(".")[0]}`.slice(-8),m=L=>{const U=L.split(":"),V=U[U.length-3]?parseInt(U[U.length-3]):0,X=parseInt(U[U.length-2]),F=parseFloat(U[U.length-1]);return V*60*60+X*60+F};i.onMounted(()=>{var L;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(L=a.value)==null||L.addEventListener("wheel",l)}),i.watch(()=>d.value,()=>{var L;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(L=a.value)==null||L.addEventListener("wheel",l)});const S=i.ref(0),b=()=>{},T=L=>{const U=t.instance;if(!U)return;const V=m(L);U.currentTime(V)},y=i.ref(""),E=i.ref(0),O=i.ref(0),D=i.ref([]),I=n("common.all"),H=i.computed(()=>[...new Set(t.captions.map(L=>L.speakerLabel).sort().reverse())]);i.watch(()=>s.value,()=>{var U,V;if(o.value&&y.value)return;const L=(U=a.value)==null?void 0:U.querySelectorAll(".captions-item")[s.value-1];(V=a.value)==null||V.scrollTo({top:(L==null?void 0:L.offsetTop)-16,behavior:"smooth"})}),i.onUnmounted(()=>{a.value&&a.value.removeEventListener("wheel",l)});const $=(L,U)=>{var Q,Z,oe,ce,re,ue;const V=document.getElementsByClassName("light-keyword")[L-1],X=document.getElementsByClassName("light-keyword")[L-U];X==null||X.classList.remove("light-keyword-active"),V==null||V.classList.add("light-keyword-active");const F=V.offsetTop+V.offsetHeight<((Q=a.value)==null?void 0:Q.scrollTop),B=V.offsetTop>((Z=a.value)==null?void 0:Z.offsetHeight)+((oe=a.value)==null?void 0:oe.scrollTop);(F||B)&&((ue=a.value)==null||ue.scrollTo({top:(re=(ce=V.parentElement)==null?void 0:ce.parentElement)==null?void 0:re.offsetTop,behavior:"smooth"}))},z=()=>{!E.value||O.value===1||(O.value--,$(O.value,0))},N=L=>{L!=null&&L.shiftKey||!E.value||O.value===E.value||(O.value++,$(O.value,2))},j=L=>{d.value=t.captions.filter(U=>D.value.includes(U.speakerLabel)).map(U=>({...U,contentHtml:L?U.contentHtml.replaceAll(L,`<span class="light-keyword">${L}</span>`):U.contentHtml})),i.nextTick(()=>{var V;const U=document.getElementsByClassName("light-keyword");E.value=U.length,E.value?N():(V=a.value)==null||V.scrollTo({top:0,behavior:"smooth"})})},x=zi.useDebounceFn(j,300);i.watch(()=>y.value,L=>{O.value=0,x(L)}),i.watch(()=>H.value,L=>{D.value=L},{immediate:!0});const w=i.ref(!1),P=i.ref(!1),K=L=>{P.value=!1,L?D.value=H.value:D.value=[]};return i.watch(()=>D.value,L=>{L.length===0?(w.value=!1,P.value=!1):L.length===H.value.length?(w.value=!0,P.value=!1):P.value=!0,x(y.value)},{deep:!0}),(L,U)=>(i.openBlock(),i.createElementBlock("div",Ry,[i.createElementVNode("div",Vy,[i.createVNode(i.unref(A.OInput),{modelValue:y.value,"onUpdate:modelValue":U[1]||(U[1]=V=>y.value=V),onKeydown:[i.withKeys(N,["enter"]),i.withKeys(i.withModifiers(z,["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(Ny))]),_:1})]),suffix:i.withCtx(()=>[y.value?(i.openBlock(),i.createElementBlock("div",Fy,[i.createElementVNode("span",null,i.toDisplayString(O.value)+"/"+i.toDisplayString(E.value),1),i.createVNode(i.unref(A.OIcon),{onClick:z},{default:i.withCtx(()=>[i.createVNode(i.unref(By))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:N},{default:i.withCtx(()=>[i.createVNode(i.unref(El))]),_:1}),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createVNode(i.unref(A.OIcon),{class:"hover-close",onClick:U[0]||(U[0]=V=>y.value="")},{default:i.withCtx(()=>[i.createVNode(i.unref(Sl))]),_:1})])):i.createCommentVNode("",!0)]),_:1},8,["modelValue","onKeydown","placeholder"]),i.createElementVNode("div",$y,[i.createVNode(i.unref(tt.ElSelect),{multiple:"",modelValue:D.value,"onUpdate:modelValue":U[3]||(U[3]=V=>D.value=V),"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(Py))]),_:1})]),header:i.withCtx(()=>[i.createVNode(i.unref(tt.ElCheckbox),{modelValue:w.value,"onUpdate:modelValue":U[2]||(U[2]=V=>w.value=V),indeterminate:P.value,onChange:K},{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(H.value,V=>(i.openBlock(),i.createBlock(i.unref(tt.ElOption),{key:V,label:V,value:V},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElCheckbox),{"model-value":D.value.includes(V)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(V),1)]),_:2},1032,["model-value"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),i.createVNode(i.unref(A.OTab),{modelValue:S.value,"onUpdate:modelValue":U[4]||(U[4]=V=>S.value=V),variant:"text",class:"captions-tab",onChange:b,"max-show":9999},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTabPane),{value:0,label:i.unref(n)("meeting.audioToText")},{default:i.withCtx(()=>[d.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(d.value,(V,X)=>(i.openBlock(),i.createBlock(i.unref(A.OCol),{flex:"0 0 100%",key:X},{default:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["captions-item",{"captions-item-active":s.value===X+1}]),onClick:F=>T(V.start_time)},[i.createElementVNode("div",qy,[i.createElementVNode("div",zy,i.toDisplayString(V.speakerIdx),1),i.createElementVNode("div",jy,i.toDisplayString(V.speakerLabel),1),i.createElementVNode("div",Hy,i.toDisplayString(g(V.start_time)),1),s.value===X+1?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"playing initial-fill"},{default:i.withCtx(()=>[i.createVNode(i.unref(wy))]),_:1})):i.createCommentVNode("",!0)]),i.withDirectives(i.createElementVNode("div",Gy,null,512),[[i.unref(e),V.contentHtml]])],10,Uy)]),_:2},1024))),128))]),_:1})]),_:1})):(i.openBlock(),i.createElementBlock("div",Wy,[i.renderSlot(L.$slots,"empty")]))]),_:3},8,["label"])]),_:3},8,["modelValue"])]))}});var fo,gc;function Ca(){if(gc)return fo;gc=1;var r;return typeof window<"u"?r=window:typeof ea<"u"?r=ea:typeof self<"u"?r=self:r={},fo=r,fo}var Xy=Ca();const G=fr(Xy),Ky={},Qy=Object.freeze(Object.defineProperty({__proto__:null,default:Ky},Symbol.toStringTag,{value:"Module"})),Zy=Cv(Qy);var po,vc;function gh(){if(vc)return po;vc=1;var r=typeof ea<"u"?ea:typeof window<"u"?window:{},e=Zy,t;return typeof document<"u"?t=document:(t=r["__GLOBAL_DOCUMENT_CACHE@4"],t||(t=r["__GLOBAL_DOCUMENT_CACHE@4"]=e)),po=t,po}var Jy=gh();const _e=fr(Jy);var Rs={exports:{}},mo={exports:{}},yc;function e_(){return yc||(yc=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})(mo)),mo.exports}var go,_c;function t_(){if(_c)return go;_c=1,go=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 go}var vo,Tc;function i_(){if(Tc)return vo;Tc=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.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),A=require("@opensig/opendesign"),At=require("@opendesign-plus/composables"),Xe=require("./chunk-OElCookieNotice.cjs.js"),zi=require("@vueuse/core"),Fm=require("@opensig/opendesign/es/locale/lang/zh-cn"),$m=require("@opensig/opendesign/es/locale/lang/en-us"),tt=require("element-plus"),Um=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))}}),gn=Xe._export_sfc(Um,[["__scopeId","data-v-0b8705aa"]]),qm={key:0},zm={class:"banner-content"},jm=["src"],Hm={key:1,class:"banner-title"},Gm={key:2,class:"banner-subtitle"},Wm={key:4,class:"banner-opts"},Ym=i.defineComponent({__name:"OBanner",props:{options:{default:void 0},size:{default:"large"},contentJustifyCenter:{type:Boolean,default:!1}},setup(r){const e=r,{isLight:t}=At.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:n}=At.useScreen(),s=i.computed(()=>e.options),a=i.ref(""),o=c=>{setTimeout(()=>{a.value=s.value[c].bg_theme??"light"},100)},l=(c,d)=>{c&&!d&&window.open(c)};return(c,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["home-banner",r.size])},[r.size==="tiny"?(i.openBlock(),i.createElementBlock("div",qm,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,(g,m)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{class:i.normalizeClass(["banner-item",`banner-item${m}`]),key:m},{default:i.withCtx(()=>[i.createVNode(gn,{class:"banner-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:"banner-bg",src:g.bg,onClick:S=>l(g.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,(g,m)=>(i.openBlock(),i.createBlock(i.unref(A.OCarouselItem),{key:m,class:i.normalizeClass(["banner-item",`banner-item${m}`])},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFigure),{class:i.normalizeClass(["banner-bg",{"with-sticky-bg":g.withStickyBg,"in-dark":!i.unref(t),"cursor-pointer":g.href&&!g.btn}]),src:g.bg,style:i.normalizeStyle({"--pad-offset":g.pad_offset}),onClick:S=>l(g.href,g.btn)},{default:i.withCtx(()=>[i.createVNode(gn,{class:i.normalizeClass(["banner-wrapper",["banner-wrapper",r.contentJustifyCenter?"content-center":""]])},{default:i.withCtx(()=>[i.createElementVNode("div",zm,[!i.unref(n)&&g.attach?(i.openBlock(),i.createElementBlock("img",{key:0,src:g.attach,class:"banner-attach"},null,8,jm)):i.createCommentVNode("",!0),g.title?(i.openBlock(),i.createElementBlock("div",Hm,i.toDisplayString(g.title),1)):i.createCommentVNode("",!0),g.subtitle?(i.openBlock(),i.createElementBlock("div",Gm,i.toDisplayString(g.subtitle),1)):i.createCommentVNode("",!0),g.bg_text?(i.openBlock(),i.createElementBlock("div",{key:3,class:"banner-text",style:i.normalizeStyle({backgroundImage:`url(${g.bg_text})`,"--pc-width":g.pc_text_width,"--pc-height":g.pc_text_height,"--pad-width":g.pad_text_width,"--pad-height":g.pad_text_height})},null,4)):i.createCommentVNode("",!0),g.btn?(i.openBlock(),i.createElementBlock("div",Wm,[i.createVNode(i.unref(A.OButton),{href:g.href,target:"_blank",variant:"solid",color:"primary",size:r.size},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.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))}}),eh=Xe._export_sfc(Ym,[["__scopeId","data-v-e2541e9a"]]),Xm={class:"cookie-notice-content"},Km=["type"],Qm={class:"cookie-title"},Zm={style:{transform:"rotate(180deg)"},xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24"},Jm={class:"cookie-zh-title",style:{"margin-top":"0"}},eg=["href"],tg={key:1,class:"cookie-en-title"},ig={key:0,class:"cookie-en-content"},ng={class:"cookie-en-desc"},rg=["href"],sg={class:"cookie-notice-right"},ag={class:"cookie-dlg-title"},og={class:"cookie-dlg-content"},lg={class:"content-item"},ug={class:"item-header"},cg={class:"item-title"},dg={class:"item-extra"},hg={class:"item-detail"},fg={class:"content-item"},pg={class:"item-header"},mg={class:"item-title"},gg={class:"item-extra"},vg={class:"item-detail"},yg="0",Qu="1",_g="2",Ls="3",Tg="agreed-cookiepolicy-zh",bg="agreed-cookiepolicy-en",xg=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}=At.useScreen(),{locale:c,t:d}=Xe.useI18n(),g=i.computed(()=>c.value==="zh"),m=i.ref(),S=i.computed(()=>m.value?!!getComputedStyle(m.value).getPropertyValue("--grid-content-width"):!1),T=i.computed(()=>g.value?Tg:bg),b=i.ref(!1),y=zi.useVModel(n,"visible",s,{defaultValue:!1}),E=K=>{const B=document.cookie.split(";").find(U=>U.split("=")[0].trim()===encodeURIComponent(K));return B?decodeURIComponent(B.split("=")[1]):null},I=(K,B,U,R)=>{const X=`; max-age=${U*24*60*60}`;document.cookie=`${encodeURIComponent(K)}=${encodeURIComponent(B)}${X}; path=/; domain=${R}`},O=(K,B)=>{document.cookie=`${encodeURIComponent(K)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${B}`},k=K=>{typeof K=="boolean"?y.value=K:y.value=!y.value,i.nextTick(()=>{!y.value&&g.value&&E(T.value)!==Ls&&I(T.value,Ls,180,n.cookieDomain??location.hostname)})},z=i.ref(!1),$=K=>{typeof K=="boolean"?z.value=K:z.value=!z.value},j=()=>g.value?E(T.value)!==Ls:(E(T.value)??"0")===yg,N=()=>g.value?E(T.value)===Ls:E(T.value)===Qu;i.onMounted(()=>{j()&&k(!0)}),i.watch(c,()=>{k(j())});const H=()=>{b.value=!0,O(T.value,n.cookieDomain??location.hostname),I(T.value,Qu,180,n.cookieDomain??location.hostname),k(!1)},x=()=>{b.value=!1,O(T.value,n.cookieDomain??location.hostname),I(T.value,_g,180,n.cookieDomain??location.hostname),k(!1)},w=i.computed(()=>l.value?[{id:"save",label:d("cookie.saveSetting"),variant:"text",onClick:()=>{b.value?H():x(),$(!1)}},{id:"allowAll",label:d("cookie.acceptAll"),variant:"text",onClick:()=>{b.value=!0,H(),$(!1)}}]:[{id:"save",color:"primary",label:d("cookie.saveSetting"),variant:"outline",size:"medium",round:"pill",onClick:()=>{b.value?H():x(),$(!1)}},{id:"allowAll",color:"primary",label:d("cookie.acceptAll"),variant:"outline",size:"medium",round:"pill",onClick:()=>{b.value=!0,H(),$(!1)}}]),P=K=>{K&&(b.value=N())};return e({check(){N()===y.value&&k()}}),(K,B)=>(i.openBlock(),i.createBlock(i.unref(Xe.ClientOnly),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.Teleport,{to:r.wrapper||"#app"},[i.unref(y)?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"cookieNoticeRef",ref:m,class:"cookie-notice"},[i.createElementVNode("div",Xm,[i.createElementVNode("div",{type:i.unref(c),class:i.normalizeClass({"cookie-notice-wrap-grid":S.value,"cookie-notice-wrap":!S.value})},[i.createElementVNode("div",Qm,[g.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",Zm,[...B[4]||(B[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",Jm,[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(d)("cookie.about")),9,eg)])],64)):(i.openBlock(),i.createElementBlock("p",tg,i.toDisplayString(i.unref(d)("cookie.title",[r.community])),1)),i.createVNode(i.unref(A.OIcon),{class:"cookie-notice-close",onClick:B[0]||(B[0]=U=>k(!1))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconClose))]),_:1})]),g.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",ig,[i.createElementVNode("p",ng,[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.desc"))+" ",1),i.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(i.unref(d)("cookie.about")),9,rg),B[5]||(B[5]=i.createTextVNode(". ",-1))]),i.createElementVNode("div",sg,[i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:H},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.acceptAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:x},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.rejectAll")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:B[1]||(B[1]=U=>$(!0))},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(d)("cookie.manage")),1)]),_:1})])]))],10,Km)]),i.createVNode(i.unref(A.ODialog),{visible:z.value,"onUpdate:visible":B[3]||(B[3]=U=>z.value=U),size:i.unref(o)?"medium":"large","phone-half-full":i.unref(a),"main-class":S.value?"o-cookie-notice-dlg-main":"",class:"cookie-dlg",actions:w.value,onChange:P,style:{"--dlg-radius":"4px"}},{header:i.withCtx(()=>[i.createElementVNode("span",ag,i.toDisplayString(i.unref(d)("cookie.manage")),1)]),default:i.withCtx(()=>[i.createElementVNode("div",og,[i.createElementVNode("div",lg,[i.createElementVNode("div",ug,[i.createElementVNode("span",cg,i.toDisplayString(i.unref(d)("cookie.necessaryCookie")),1),i.createElementVNode("span",dg,i.toDisplayString(i.unref(d)("cookie.alwaysOn")),1)]),i.createElementVNode("div",hg,i.toDisplayString(i.unref(d)("cookie.necessaryCookieDetail")),1)]),i.createElementVNode("div",fg,[i.createElementVNode("div",pg,[i.createElementVNode("span",mg,i.toDisplayString(i.unref(d)("cookie.analyticalCookie")),1),i.createElementVNode("span",gg,[i.createVNode(i.unref(A.OSwitch),{modelValue:b.value,"onUpdate:modelValue":B[2]||(B[2]=U=>b.value=U)},null,8,["modelValue"])])]),i.createElementVNode("div",vg,i.toDisplayString(i.unref(d)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","main-class","actions"])],512)):i.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),th=Xe._export_sfc(xg,[["__scopeId","data-v-18f3a4fa"]]),Cg={key:0,class:"atom"},Sg={class:"atom-text"},Eg=["href"],kg=["src"],wg={key:0,class:"quick-nav"},Dg={class:"category-title"},Ag={class:"navs"},Ng=["href"],Ig={key:0,class:"friendship-link"},Og={class:"friendship-link-title"},Bg={class:"friendship-link-box"},Lg=["href"],Mg={key:0,class:"footer-logo"},Pg=["src"],Rg=["src"],Vg=["href"],Fg={key:1,class:"footer-option"},$g={class:"footer-option-item"},Ug=["href"],qg={class:"license"},zg={class:"copyright"},jg={class:"filing"},Hg=["href"],Gg=["src"],Wg={key:2,class:"footer-right"},Yg={key:0,class:"code-box"},Xg=["src"],Kg={class:"code-layer"},Qg=["src"],Zg={class:"txt"},Jg={class:"app-footer-pc"},e1={key:0,class:"footer-left"},t1=["href"],i1=["src"],n1={key:0,class:"footer-right"},r1=["href"],s1={class:"app-footer-mb"},a1={key:0,class:"links"},o1=["href"],l1={class:"copyright"},u1={key:0,class:"approval"},c1=["href"],d1=["src"],h1=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(gn,{key:1},{default:i.withCtx(()=>[i.createElementVNode("div",Jg,[t.$slots.left||e.footerOption?i.renderSlot(t.$slots,"left",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",e1,[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,t1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,i1),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",n1,[(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,r1),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",s1,[t.$slots.right||e.footerOption?i.renderSlot(t.$slots,"right",{key:0},()=>[e.footerOption?(i.openBlock(),i.createElementBlock("div",a1,[(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,o1),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",l1,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",u1,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,c1),i.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,d1),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(gn,{key:0},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"atom",{},()=>[e.atom?(i.openBlock(),i.createElementBlock("div",Cg,[i.createElementVNode("p",Sg,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,kg)],8,Eg)])):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(gn,null,{default:i.withCtx(()=>[t.$slots.quickNav||e.quickNav?i.renderSlot(t.$slots,"quickNav",{key:0},()=>[e.quickNav?(i.openBlock(),i.createElementBlock("div",wg,[(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",Dg,i.toDisplayString(s.title),1),i.createElementVNode("ul",Ag,[(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,Ng)]))),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",Ig,[i.createElementVNode("div",Og,i.toDisplayString(e.friendshipLink.title[e.lang]),1),i.createElementVNode("div",Bg,[(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,Lg))),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",Mg,[i.createElementVNode("img",{class:"show-pc",src:e.footerLogo.logo,alt:""},null,8,Pg),i.createElementVNode("img",{class:"show-mo",src:e.footerLogo.logoMb,alt:""},null,8,Rg),i.createElementVNode("p",null,[i.createElementVNode("a",{class:"email",href:`mailto:${e.footerLogo.email}`,target:"_blank"},i.toDisplayString(e.footerLogo.email),9,Vg)])])):i.createCommentVNode("",!0),e.footerOption?(i.openBlock(),i.createElementBlock("div",Fg,[i.createElementVNode("div",$g,[(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,Ug),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",qg,[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",zg,[i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].copyright),1),i.createElementVNode("div",jg,[i.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank"},i.toDisplayString(e.footerOption[e.lang].beianInfo1),9,Hg),i.createElementVNode("img",{src:e.footerOption[e.lang].policeIcon,class:"filing-img"},null,8,Gg),i.createElementVNode("p",null,i.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])])])):i.createCommentVNode("",!0),e.qrcode?(i.openBlock(),i.createElementBlock("div",Wg,[e.lang==="zh"?(i.openBlock(),i.createElementBlock("div",Yg,[(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,Xg),i.createElementVNode("div",Kg,[i.createElementVNode("img",{src:s.code,alt:""},null,8,Qg),i.createElementVNode("p",Zg,i.toDisplayString(s.label),1)])]))),128))])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),ih=Xe._export_sfc(h1,[["__scopeId","data-v-2ce6e57a"]]),f1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function p1(r,e){return i.openBlock(),i.createElementBlock("svg",f1,[...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 Sl={name:"components-icon-close",render:p1},m1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function g1(r,e){return i.openBlock(),i.createElementBlock("svg",m1,[...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 Zu={name:"components-icon-header-search",render:g1},v1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function y1(r,e){return i.openBlock(),i.createElementBlock("svg",v1,[...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 _1={name:"components-icon-header-delete",render:y1},T1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function b1(r,e){return i.openBlock(),i.createElementBlock("svg",T1,[...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 x1={name:"components-icon-delete",render:b1},C1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function S1(r,e){return i.openBlock(),i.createElementBlock("svg",C1,[...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 E1={name:"components-icon-header-back",render:S1},k1={class:"o-header-search"},w1={class:"o-header-search-drawer"},D1={key:0,class:"o-header-search-recommend-container"},A1=["onClick"],N1={key:1,class:"o-header-search-history-container"},I1={class:"o-header-search-history-header"},O1={class:"o-header-search-history-header-title"},B1={class:"o-header-search-history-item-container"},L1=["onClick"],M1={class:"o-header-search-history-item-text"},P1={key:3,class:"o-header-search-hot-container"},R1={class:"o-header-search-hot-header"},V1={class:"o-header-search-hot-item-container"},F1=["onClick"],$1=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}=At.useScreen(),{t:n}=Xe.useI18n(),s=r,a=e,o=i.ref(s.modelValue),l=i.ref(s.historyItems),c=i.ref(!1),d=i.ref(),g=i.computed(()=>!t.value&&c.value||t.value&&o.value);i.watch(()=>s.modelValue,k=>{o.value!==k&&(o.value=k)}),i.watch(()=>o.value,k=>{a("update:modelValue",k)}),i.watch(()=>s.historyItems,k=>{l.value!==k&&(l.value=k)}),i.watch(()=>l.value,k=>{a("update:historyItems",k)}),i.onMounted(()=>{if(s.storeHistory&&s.storageKey)try{const k=JSON.parse(localStorage.getItem(s.storageKey)||"[]");Array.isArray(k)&&k.length&&(l.value=Array.from(new Set([...l.value,...k])))}catch{}});const m=()=>{c.value=!0},S=()=>{const k=o.value.trim();k&&(c.value=!1,l.value.unshift(k),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",k),s.searchUrl&&window.open(s.searchUrl+k,s.searchUrlOpenBlank?"_blank":"_self","noopener noreferrer"))},T=()=>{o.value="",a("clear"),t.value||(c.value=!1)},b=()=>{const k=[...l.value];l.value=[],s.storeHistory&&s.storeHistory&&localStorage.removeItem(s.storageKey),a("delete-history",k)},y=k=>{l.value=l.value.filter(z=>z!==k),s.storeHistory&&s.storeHistory&&(l.value.length?localStorage.setItem(s.storageKey,JSON.stringify(l.value)):localStorage.removeItem(s.storageKey)),a("delete-history-item",k)},E=k=>{o.value=k,S()},I=()=>{o.value="",c.value=!1},O=i.ref();return zi.onClickOutside(O,T),(k,z)=>(i.openBlock(),i.createElementBlock("div",k1,[i.createElementVNode("div",{ref_key:"posWrapper",ref:O,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:I},{default:i.withCtx(()=>[i.createVNode(i.unref(E1))]),_:1})):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OInput),{ref_key:"inputRef",ref:d,modelValue:o.value,"onUpdate:modelValue":z[0]||(z[0]=$=>o.value=$),class:"o-header-search-input",placeholder:c.value?r.expandedPlaceholder??i.unref(n)("search.expandedPlaceholder"):r.placeholder??i.unref(n)("search.placeholder"),onFocus:m,onKeyup:i.withKeys(S,["enter"])},{prefix:i.withCtx(()=>[i.renderSlot(k.$slots,"input-prefix",{},()=>[i.createVNode(i.unref(A.OIcon),{class:"o-header-search-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(Zu))]),_:1})],!0)]),suffix:i.withCtx(()=>[i.renderSlot(k.$slots,"input-suffix",{},()=>[r.clearable&&g.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(Sl))]),_: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:S},i.toDisplayString(r.searchTextMobile??i.unref(n)("search")),1)):i.createCommentVNode("",!0)],2),i.withDirectives(i.createElementVNode("div",w1,[i.renderSlot(k.$slots,"drawer",{recommendItems:r.recommendItems,historyItems:l.value,hotItems:r.hotItems},()=>[r.recommendItems.length?(i.openBlock(),i.createElementBlock("div",D1,[i.renderSlot(k.$slots,"recommend-header",{recommend:r.recommendItems},void 0,!0),i.renderSlot(k.$slots,"recommend-content",{recommend:r.recommendItems},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.recommendItems,$=>(i.openBlock(),i.createElementBlock("div",{class:"o-header-search-recommend-item",key:$,onClick:j=>E($)},i.toDisplayString($),9,A1))),128))],!0)])):l.value.length?(i.openBlock(),i.createElementBlock("div",N1,[i.renderSlot(k.$slots,"history-header",{history:l.value},()=>[i.createElementVNode("div",I1,[i.createElementVNode("span",O1,i.toDisplayString(r.historyTitle??i.unref(n)("search.history")),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-icon",onClick:b},{default:i.withCtx(()=>[i.createVNode(i.unref(x1))]),_:1})])],!0),i.renderSlot(k.$slots,"history-content",{history:l.value},()=>[i.createElementVNode("div",B1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,$=>(i.openBlock(),i.createElementBlock("div",{key:$,class:"o-header-search-history-item",onClick:j=>E($)},[i.createElementVNode("span",M1,i.toDisplayString($),1),i.createVNode(i.unref(A.OIcon),{class:"o-header-search-history-item-icon",onClick:i.withModifiers(j=>y($),["stop"])},{default:i.withCtx(()=>[i.createVNode(i.unref(_1),{class:"icon-delete"})]),_:1},8,["onClick"])],8,L1))),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",P1,[i.renderSlot(k.$slots,"hot-header",{hot:r.hotItems},()=>[i.createElementVNode("div",R1,i.toDisplayString(r.hotTitle??i.unref(n)("search.hot")),1)],!0),i.renderSlot(k.$slots,"hot-content",{hot:r.hotItems},()=>[i.createElementVNode("div",V1,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.hotItems,$=>(i.openBlock(),i.createElementBlock("div",{key:$,class:"o-header-search-hot-item",onClick:j=>E($)},i.toDisplayString($),9,F1))),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:m},{default:i.withCtx(()=>[i.createVNode(i.unref(Zu))]),_:1})):i.createCommentVNode("",!0)]))}}),nh=Xe._export_sfc($1,[["__scopeId","data-v-c0407b92"]]),U1=["src"],q1=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,U1)):(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["word-avatar",r.variant]),style:i.normalizeStyle(s.value)},i.toDisplayString(n.value),7))}}),z1=Xe._export_sfc(q1,[["__scopeId","data-v-340348ce"]]),j1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function H1(r,e){return i.openBlock(),i.createElementBlock("svg",j1,[...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 G1={name:"components-icon-avatar-line",render:H1},W1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Y1(r,e){return i.openBlock(),i.createElementBlock("svg",W1,[...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 El={name:"components-icon-chevron-down",render:Y1},X1={class:"header-user"},K1={key:0,class:"user-info"},Q1={class:"info-wrap hover-icon-rotate"},Z1={class:"user-account"},J1={key:1},e2=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},customSize:{default:void 0}},emits:["login","logout"],setup(r,{emit:e}){const{lePadV:t}=At.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",X1,[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(G1))]),_:1})),i.createVNode(i.Transition,{name:"header-user-zoom-in"},{default:i.withCtx(()=>[r.token?(i.openBlock(),i.createElementBlock("div",K1,[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:d=>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",J1,i.toDisplayString(c.label),1))]),_:2},1032,["onClick"]))),128))]),default:i.withCtx(()=>[i.createElementVNode("div",Q1,[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(z1,{avatar:r.userInfo.photo,name:r.userInfo.username,"custom-size":r.customSize},null,8,["avatar","name","custom-size"])]),_:1},8,["value","class"]),i.createElementVNode("p",Z1,i.toDisplayString(r.userInfo.username),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(El))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):i.createCommentVNode("",!0)]),_:1})]))}}),rh=Xe._export_sfc(e2,[["__scopeId","data-v-517067a4"]]),sh=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(Xe.configProviderInjectKey,t),(n,s)=>(i.openBlock(),i.createBlock(i.unref(A.OConfigProvider),{locale:r.locale==="zh"?i.unref(Fm):i.unref($m)},{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3},8,["locale"]))}}),t2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function i2(r,e){return i.openBlock(),i.createElementBlock("svg",t2,[...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 Hr={name:"components-icon-chevron-right",render:i2},n2={class:"section-wrapper"},r2={key:1,class:"section-title"},s2={key:2,class:"section-subtitle"},a2={key:1,class:"section-body"},o2={key:2,class:"section-footer"},l2=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",n2,[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",r2,[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",s2,[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",a2,[i.renderSlot(t.$slots,"default",{},void 0,!0)])):i.createCommentVNode("",!0),t.$slots.footer||e.footer?(i.openBlock(),i.createElementBlock("div",o2,[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(Hr))]),_:1})]),default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.footer)+" ",1)]),_:1},8,["href"])],!0)])):i.createCommentVNode("",!0)],!0)])],2))}}),ah=Xe._export_sfc(l2,[["__scopeId","data-v-0c0e1f78"]]),u2={class:"source-code"},c2={class:"title"},d2={class:"info-wrap hover-icon-rotate"},h2={class:"title"},f2=i.defineComponent({__name:"OSourceCode",props:{title:{},options:{},href:{},target:{},icon:{},justify:{default:"center"}},setup(r){const e=s=>{window.open(s.href,s.target?s.target:"_blank")},t=i.ref(!1),n=s=>{t.value=s};return(s,a)=>(i.openBlock(),i.createElementBlock("div",u2,[r.href?(i.openBlock(),i.createElementBlock("div",{key:0,class:"info-wrap",onClick:a[0]||(a[0]=o=>e({href:r.href,target:r.target}))},[i.createElementVNode("span",c2,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.href,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",d2,[i.createElementVNode("span",h2,i.toDisplayString(r.title),1),i.createVNode(i.unref(A.OIcon),{class:"icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(El))]),_:1})])]),_:1},8,["class"]))]))}}),oh=Xe._export_sfc(f2,[["__scopeId","data-v-865d32e7"]]),p2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function m2(r,e){return i.openBlock(),i.createElementBlock("svg",p2,[...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 g2={name:"components-icon-sun",render:m2},v2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function y2(r,e){return i.openBlock(),i.createElementBlock("svg",v2,[...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 _2={name:"components-icon-moon",render:y2},T2={class:"o-theme-switcher"},b2={key:1,class:"o-theme-switcher-mobile"},x2=i.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},disabled:{type:Boolean,default:!1}},emits:["update:theme","change"],setup(r,{emit:e}){const t=r,n=e,{gtPhone:s}=At.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=()=>{t.disabled||(a.value=a.value===t.lightValue?t.darkValue:t.lightValue)};return(c,d)=>(i.openBlock(),i.createElementBlock("div",T2,[o.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["o-theme-switcher-common",{disabled:r.disabled}]),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(_2),{key:0})):(i.openBlock(),i.createBlock(i.unref(g2),{key:1}))]),_:1})],2)):(i.openBlock(),i.createElementBlock("div",b2,[i.createVNode(i.unref(A.OSwitch),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=g=>a.value=g),class:"o-theme-switch","checked-value":r.lightValue,"unchecked-value":r.darkValue,disabled:r.disabled},{inactive:i.withCtx(()=>[i.createVNode(i.unref(A.OIconMoon))]),active:i.withCtx(()=>[i.createVNode(i.unref(A.OIconSun))]),off:i.withCtx(()=>[i.createVNode(i.unref(A.OIconSun))]),on:i.withCtx(()=>[i.createVNode(i.unref(A.OIconMoon))]),_:1},8,["modelValue","checked-value","unchecked-value","disabled"])]))]))}}),lh=Xe._export_sfc(x2,[["__scopeId","data-v-ddd930c4"]]),Ju=/^https?:\/\/\S+/;var Be=(r=>(r.ALL="all",r.MEETING="meeting",r.EVENTS="events",r.SUMMIT="summit",r.APPROVAL="approval",r))(Be||{}),vi=(r=>(r.SIG="sig",r.GROUP="group",r))(vi||{});const C2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function S2(r,e){return i.openBlock(),i.createElementBlock("svg",C2,[...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 E2={name:"meeting-icon-all",render:S2},k2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function w2(r,e){return i.openBlock(),i.createElementBlock("svg",k2,[...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 uh={name:"meeting-icon-event",render:w2},D2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function A2(r,e){return i.openBlock(),i.createElementBlock("svg",D2,[...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 ch={name:"meeting-icon-meet",render:A2},N2={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",N2,[...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 dh={name:"meeting-icon-summit",render:I2},ro={summit:"rgba(var(--o-orange-6))",events:"rgba(var(--o-cyan-6))",meeting:"rgba(var(--o-deepblue-6))"},mn=0,vn=1,tn=2,hh=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,O2=["var(--o-color-primary1)","var(--o-color-warning1)","var(--o-color-success1)"],ba=()=>{const{t:r}=Xe.useI18n(),e=i.computed(()=>new Map([[1,{label:r("meeting.offline"),value:1}],[2,{label:r("meeting.online"),value:2}],[3,{label:r("meeting.onlineOffline"),value:3}]])),t=i.computed(()=>new Map([[1,{id:"draft",label:r("meeting.statusDraft"),text:r("meeting.statusDraft"),value:1}],[2,{id:"under-review",label:r("meeting.statusUnderReview"),text:r("meeting.statusPending"),value:2}],[3,{id:"registration",label:r("meeting.statusRegistering"),text:r("meeting.statusApproved"),value:3}],[4,{id:"in-progress",label:r("meeting.statusInProgress"),text:r("meeting.statusApproved"),value:4}],[5,{id:"ended",label:r("meeting.statusEnded"),text:r("meeting.statusEnded"),value:5}],[6,{id:"modified",label:r("meeting.statusModified"),text:r("meeting.statusModified"),value:6}],[7,{id:"reject",label:r("meeting.statusRejected"),text:r("meeting.statusRejected"),value:7}]])),n=i.computed(()=>new Map([["all",{label:r("common.all"),value:"all"}],["rejected",{label:r("meeting.statusRejected"),value:"rejected"}],["approved",{label:r("meeting.statusApproved"),value:"approved"}],["publish",{label:r("meeting.statusPending"),value:"publish"}],["cancel",{label:r("meeting.statusCanceled"),value:"cancel"}]]));return{t:r,activityTypeMap:e,statusMap:t,approvalStatusMap:n}},B2={class:"o-activity-form"},L2={class:"time-config"},M2={class:"form-btns"},ec=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}=At.useScreen(),{t:o}=Xe.useI18n(),l=o,{activityTypeMap:c}=ba(),d=r,g=i.computed(()=>!!d.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:""}),S=i.ref(),T=i.ref(!1),b=i.ref({title:[{required:!0,message:o("meeting.enterActivityName")},{validator:j=>{if(j.length>50)return{type:"danger",message:o("meeting.activityNameMaxLength")}}}],activity_type:[{required:!0,message:o("meeting.selectActivityType")}],organizer:[{required:!0,message:o("meeting.selectActivityOrganizer")}],start_date:[{required:!0,message:o("meeting.selectActivityTime")},{validator:()=>{const{start_date:j,end_date:N}=m.value,H=j.split(" "),x=N.split(" ");if(!j||!N)return{type:"danger",message:o("meeting.selectActivityDate")};const w=H[1].split(":").map(Number),P=x[1].split(":").map(Number);if(w[0]<8||w[0]>21||P[0]<8||P[0]>21)return{type:"danger",message:o("meeting.activityTimeRange")};if(tt.dayjs(j).valueOf()>tt.dayjs(N).valueOf())return{type:"danger",message:o("meeting.endDateAfterStartDate")};m.value.start_date=H[0],m.value.end_date=x[0],m.value.start=H[1],m.value.end=x[1]},triggers:["blur","change"]}],register_end_date:[{validator:()=>{const{register_end_date:j,end_date:N,end:H}=m.value;if(j&&tt.dayjs(`${N} ${H}`).valueOf()<tt.dayjs(j).valueOf())return{type:"danger",message:o("meeting.registerDeadlineBeforeEnd")}},triggers:["blur","change"]}],address:[{required:!0,message:o("meeting.enterActivityAddress")},{validator:j=>{if(j.length>255)return{type:"danger",message:o("meeting.activityAddressMaxLength")}}}],register_url:[{validator:j=>{const N=j.replaceAll(" ","")||"";if(N.length&&(N.split(";")||[]).some(x=>!Ju.test(x)))return{type:"danger",message:o("meeting.invalidRegistrationUrl")}},triggers:["blur","change"]}],content_url:[{validator:j=>{const N=j.replaceAll(" ","")||"";if(N.length&&(N.split(";")||[]).some(x=>!Ju.test(x)))return{type:"danger",message:o("meeting.invalidActivityDetailUrl")}},triggers:["blur","change"]}],synopsis:[{validator:j=>{if(j.length>1e3)return{type:"danger",message:o("meeting.activityContentMaxLength")}}}],email_list:[{validator:j=>{const N=j.replaceAll(" ","").replaceAll(",",";")||"";if(N.length){if(N.length>1020)return{type:"danger",message:o("meeting.emailTooLong")};const H=N.split(";")||[];if(H.some(x=>!hh.test(x)))return{type:"danger",message:o("meeting.emailInvalid")};if(H.some(x=>x.length>50))return{type:"danger",message:o("meeting.singleEmailTooLong")};if(H.length>20)return{type:"danger",message:o("meeting.emailCountTooLong")}}},triggers:["blur","change"]}],approver:[{required:!0,message:o("meeting.selectActivityApprover")}]}),y=i.computed(()=>d.admins||[]),E=i.ref(""),I=i.ref([]);c.value.forEach(j=>{I.value.push(j)});const O=j=>{const N=I.value.find(H=>H.label===j);m.value.activity_type=N==null?void 0:N.value},k=j=>j.getTime()<Date.now()-1440*60*1e3;i.watch(()=>d.data,j=>{var N;if(j){const{title:H,start_date:x,end_date:w,register_end_date:P,activity_type:K,register_url:B,content_url:U,address:R,start:X,end:F,is_publish:M,approver:Q,update_activity_id:Z,synopsis:oe,email_list:ce,organizer:re}=j;let ue={title:H,start_date:x,end_date:w,register_end_date:P,activity_type:K,register_url:B,content_url:U,address:R,start:X,end:F,is_publish:M,approver:Q,update_activity_id:Z,synopsis:oe,email_list:ce,organizer:re};m.value={...ue},E.value=(N=c.value.get(Number(j.activity_type)))==null?void 0:N.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 z=async j=>{var H,x,w,P,K,B,U;let N=g.value?o("meeting.modifyActivity"):o(j?"meeting.create":"meeting.saveDraft");try{if((await((H=S.value)==null?void 0:H.validate())).some(F=>!!F))return;T.value=!0,m.value.is_publish=`${j}`;let X;if(g.value&&((x=d.data)==null?void 0:x.status)===3?(m.value.update_activity_id=(w=d.data)==null?void 0:w.id,X=await((P=d.creatActivity)==null?void 0:P.call(d,m.value))):g.value?X=await((B=d.editActivity)==null?void 0:B.call(d,(K=d.data)==null?void 0:K.id,m.value)):X=await((U=d.creatActivity)==null?void 0:U.call(d,m.value)),typeof X=="boolean"&&!X)return;s.success({content:o("meeting.activityActionSuccess",[m.value.title,N.toLowerCase()])}),$(),n("confirm")}finally{T.value=!1}},$=()=>{m.value={},n("close")};return e({confirm:z}),(j,N)=>(i.openBlock(),i.createElementBlock("div",B2,[i.createVNode(i.unref(A.OForm),{model:m.value,ref_key:"formRef",ref:S,"has-required":"","label-width":"108px",layout:i.unref(a)?"v":"h",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:b.value.title,label:i.unref(o)("meeting.activityName"),field:"title"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityName"),modelValue:m.value.title,"onUpdate:modelValue":N[0]||(N[0]=H=>m.value.title=H)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:b.value.organizer,label:i.unref(o)("meeting.activityOrganizer"),field:"organizer"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:i.unref(o)("meeting.selectActivityOrganizer"),size:"large",modelValue:m.value.organizer,"onUpdate:modelValue":N[1]||(N[1]=H=>m.value.organizer=H)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.organizers,H=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:H.name,value:H.name},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(H.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:b.value.activity_type,label:i.unref(o)("meeting.activityType"),field:"activity_type"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:i.unref(o)("meeting.selectActivityType"),size:"large",modelValue:E.value,"onUpdate:modelValue":N[2]||(N[2]=H=>E.value=H),onChange:O},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,H=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:H.value,value:H.label},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(H.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),m.value.activity_type===1||m.value.activity_type===3?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0,rules:b.value.address,label:i.unref(o)("meeting.activityAddress"),field:"address"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityAddress"),modelValue:m.value.address,"onUpdate:modelValue":N[3]||(N[3]=H=>m.value.address=H)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OFormItem),{rules:b.value.start_date,label:i.unref(o)("meeting.activityTime"),field:"start_date",required:""},{default:i.withCtx(()=>[i.createElementVNode("div",L2,[i.createVNode(i.unref(A.OFormItem),{label:i.unref(o)("meeting.startDate"),field:"start_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.start_date,"onUpdate:modelValue":N[4]||(N[4]=H=>m.value.start_date=H),type:"datetime",placeholder:i.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":k,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),i.createVNode(i.unref(A.OFormItem),{label:i.unref(o)("meeting.endDate"),field:"end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.end_date,"onUpdate:modelValue":N[5]||(N[5]=H=>m.value.end_date=H),type:"datetime",placeholder:i.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":k,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:b.value.register_end_date,label:i.unref(o)("meeting.registrationDeadline"),field:"register_end_date"},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElDatePicker),{size:"large",modelValue:m.value.register_end_date,"onUpdate:modelValue":N[6]||(N[6]=H=>m.value.register_end_date=H),type:"datetime",placeholder:i.unref(o)("meeting.selectActivityDeadline"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm",clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:b.value.register_url,label:i.unref(o)("meeting.registrationUrl"),field:"register_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityRegistrationUrl"),modelValue:m.value.register_url,"onUpdate:modelValue":N[7]||(N[7]=H=>m.value.register_url=H)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:b.value.content_url,label:i.unref(o)("meeting.activityDetailUrl"),field:"content_url"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OInput),{size:"large",placeholder:i.unref(o)("meeting.enterActivityDetailUrl"),modelValue:m.value.content_url,"onUpdate:modelValue":N[8]||(N[8]=H=>m.value.content_url=H)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:b.value.synopsis,label:i.unref(o)("meeting.activityContent"),field:"synopsis"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:i.unref(o)("meeting.enterActivityContent"),modelValue:m.value.synopsis,"onUpdate:modelValue":N[9]||(N[9]=H=>m.value.synopsis=H)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{field:"email_list",rules:b.value.email_list,label:i.unref(o)("meeting.email")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{disabled:g.value,size:"large",placeholder:i.unref(l)("meeting.enterEmail"),rows:4,modelValue:m.value.email_list,"onUpdate:modelValue":N[10]||(N[10]=H=>m.value.email_list=H)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),i.createVNode(i.unref(A.OFormItem),{rules:b.value.approver,label:i.unref(o)("meeting.activityApprover"),field:"approver"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OSelect),{placeholder:i.unref(o)("meeting.selectActivityApprover"),size:"large",modelValue:m.value.approver,"onUpdate:modelValue":N[11]||(N[11]=H=>m.value.approver=H)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.value,H=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:H,value:H},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(H),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model","layout"]),i.createElementVNode("div",M2,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:N[12]||(N[12]=H=>z(!0)),loading:T.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.value?i.unref(o)("common.save"):i.unref(o)("meeting.create")),1)]),_:1},8,["loading"]),g.value?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,color:"primary",variant:"outline",round:"pill",size:"large",onClick:N[13]||(N[13]=H=>z(!1)),loading:T.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("meeting.saveDraft")),1)]),_:1},8,["loading"])),i.createVNode(i.unref(A.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:$},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("meeting.cancelBtn")),1)]),_:1})])]))}}),P2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function R2(r,e){return i.openBlock(),i.createElementBlock("svg",P2,[...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 tc={name:"components-icon-filter",render:R2};/*! @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 pn(r){"@babel/helpers - typeof";return pn=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},pn(r)}function Wo(r,e){return Wo=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Wo(r,e)}function V2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ws(r,e,t){return V2()?Ws=Reflect.construct:Ws=function(s,a,o){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(s,l),d=new c;return o&&Wo(d,o.prototype),d},Ws.apply(null,arguments)}function Ni(r){return F2(r)||$2(r)||U2(r)||q2()}function F2(r){if(Array.isArray(r))return Yo(r)}function $2(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function U2(r,e){if(r){if(typeof r=="string")return Yo(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 Yo(r,e)}}function Yo(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 q2(){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 z2=Object.hasOwnProperty,ic=Object.setPrototypeOf,j2=Object.isFrozen,H2=Object.getPrototypeOf,G2=Object.getOwnPropertyDescriptor,ii=Object.freeze,_i=Object.seal,W2=Object.create,fh=typeof Reflect<"u"&&Reflect,Js=fh.apply,Xo=fh.construct;Js||(Js=function(e,t,n){return e.apply(t,n)});ii||(ii=function(e){return e});_i||(_i=function(e){return e});Xo||(Xo=function(e,t){return Ws(e,Ni(t))});var Y2=Ti(Array.prototype.forEach),nc=Ti(Array.prototype.pop),Fr=Ti(Array.prototype.push),Ys=Ti(String.prototype.toLowerCase),so=Ti(String.prototype.toString),rc=Ti(String.prototype.match),Ai=Ti(String.prototype.replace),X2=Ti(String.prototype.indexOf),K2=Ti(String.prototype.trim),Ft=Ti(RegExp.prototype.test),ao=Q2(TypeError);function Ti(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 Js(r,e,n)}}function Q2(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Xo(r,t)}}function He(r,e,t){var n;t=(n=t)!==null&&n!==void 0?n:Ys,ic&&ic(r,null);for(var s=e.length;s--;){var a=e[s];if(typeof a=="string"){var o=t(a);o!==a&&(j2(e)||(e[s]=o),a=o)}r[a]=!0}return r}function En(r){var e=W2(null),t;for(t in r)Js(z2,r,[t])===!0&&(e[t]=r[t]);return e}function Ms(r,e){for(;r!==null;){var t=G2(r,e);if(t){if(t.get)return Ti(t.get);if(typeof t.value=="function")return Ti(t.value)}r=H2(r)}function n(s){return console.warn("fallback value for",s),null}return n}var sc=ii(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),oo=ii(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),lo=ii(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Z2=ii(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),uo=ii(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),J2=ii(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ac=ii(["#text"]),oc=ii(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),co=ii(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),lc=ii(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ps=ii(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ev=_i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tv=_i(/<%[\w\W]*|[\w\W]*%>/gm),iv=_i(/\${[\w\W]*}/gm),nv=_i(/^data-[\-\w.\u00B7-\uFFFF]+$/),rv=_i(/^aria-[\-\w]+$/),sv=_i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),av=_i(/^(?:\w+script|data):/i),ov=_i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),lv=_i(/^html$/i),uv=_i(/^[a-z][.\w]*(-[.\w]+)+$/i),cv=function(){return typeof window>"u"?null:window},dv=function(e,t){if(pn(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 ph(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cv(),e=function(J){return ph(J)};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,d=r.NamedNodeMap,g=d===void 0?r.NamedNodeMap||r.MozNamedAttrMap:d,m=r.HTMLFormElement,S=r.DOMParser,T=r.trustedTypes,b=l.prototype,y=Ms(b,"cloneNode"),E=Ms(b,"nextSibling"),I=Ms(b,"childNodes"),O=Ms(b,"parentNode");if(typeof a=="function"){var k=n.createElement("template");k.content&&k.content.ownerDocument&&(n=k.content.ownerDocument)}var z=dv(T,t),$=z?z.createHTML(""):"",j=n,N=j.implementation,H=j.createNodeIterator,x=j.createDocumentFragment,w=j.getElementsByTagName,P=t.importNode,K={};try{K=En(n).documentMode?n.documentMode:{}}catch{}var B={};e.isSupported=typeof O=="function"&&N&&N.createHTMLDocument!==void 0&&K!==9;var U=ev,R=tv,X=iv,F=nv,M=rv,Q=av,Z=ov,oe=uv,ce=sv,re=null,ue=He({},[].concat(Ni(sc),Ni(oo),Ni(lo),Ni(uo),Ni(ac))),te=null,Ae=He({},[].concat(Ni(oc),Ni(co),Ni(lc),Ni(Ps))),we=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,De=null,Ve=!0,Qe=!0,et=!1,$e=!0,Ge=!1,xt=!0,Ie=!1,St=!1,lt=!1,Ee=!1,Te=!1,me=!1,Fe=!0,qe=!1,gt="user-content-",Et=!0,ie=!1,ne={},se=null,Se=He({},["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"]),pe=null,Ke=He({},["audio","video","img","source","image","track"]),Oe=null,Nt=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ft="http://www.w3.org/1998/Math/MathML",ui="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xhtml",Wt=It,Ot=!1,Rt=null,ci=He({},[ft,ui,It],so),Ut,Wi=["application/xhtml+xml","text/html"],C="text/html",D,Y=null,le=n.createElement("form"),ye=function(J){return J instanceof RegExp||J instanceof Function},Ne=function(J){Y&&Y===J||((!J||pn(J)!=="object")&&(J={}),J=En(J),Ut=Wi.indexOf(J.PARSER_MEDIA_TYPE)===-1?Ut=C:Ut=J.PARSER_MEDIA_TYPE,D=Ut==="application/xhtml+xml"?so:Ys,re="ALLOWED_TAGS"in J?He({},J.ALLOWED_TAGS,D):ue,te="ALLOWED_ATTR"in J?He({},J.ALLOWED_ATTR,D):Ae,Rt="ALLOWED_NAMESPACES"in J?He({},J.ALLOWED_NAMESPACES,so):ci,Oe="ADD_URI_SAFE_ATTR"in J?He(En(Nt),J.ADD_URI_SAFE_ATTR,D):Nt,pe="ADD_DATA_URI_TAGS"in J?He(En(Ke),J.ADD_DATA_URI_TAGS,D):Ke,se="FORBID_CONTENTS"in J?He({},J.FORBID_CONTENTS,D):Se,Le="FORBID_TAGS"in J?He({},J.FORBID_TAGS,D):{},De="FORBID_ATTR"in J?He({},J.FORBID_ATTR,D):{},ne="USE_PROFILES"in J?J.USE_PROFILES:!1,Ve=J.ALLOW_ARIA_ATTR!==!1,Qe=J.ALLOW_DATA_ATTR!==!1,et=J.ALLOW_UNKNOWN_PROTOCOLS||!1,$e=J.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ge=J.SAFE_FOR_TEMPLATES||!1,xt=J.SAFE_FOR_XML!==!1,Ie=J.WHOLE_DOCUMENT||!1,Ee=J.RETURN_DOM||!1,Te=J.RETURN_DOM_FRAGMENT||!1,me=J.RETURN_TRUSTED_TYPE||!1,lt=J.FORCE_BODY||!1,Fe=J.SANITIZE_DOM!==!1,qe=J.SANITIZE_NAMED_PROPS||!1,Et=J.KEEP_CONTENT!==!1,ie=J.IN_PLACE||!1,ce=J.ALLOWED_URI_REGEXP||ce,Wt=J.NAMESPACE||It,we=J.CUSTOM_ELEMENT_HANDLING||{},J.CUSTOM_ELEMENT_HANDLING&&ye(J.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=J.CUSTOM_ELEMENT_HANDLING.tagNameCheck),J.CUSTOM_ELEMENT_HANDLING&&ye(J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),J.CUSTOM_ELEMENT_HANDLING&&typeof J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(we.allowCustomizedBuiltInElements=J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ge&&(Qe=!1),Te&&(Ee=!0),ne&&(re=He({},Ni(ac)),te=[],ne.html===!0&&(He(re,sc),He(te,oc)),ne.svg===!0&&(He(re,oo),He(te,co),He(te,Ps)),ne.svgFilters===!0&&(He(re,lo),He(te,co),He(te,Ps)),ne.mathMl===!0&&(He(re,uo),He(te,lc),He(te,Ps))),J.ADD_TAGS&&(re===ue&&(re=En(re)),He(re,J.ADD_TAGS,D)),J.ADD_ATTR&&(te===Ae&&(te=En(te)),He(te,J.ADD_ATTR,D)),J.ADD_URI_SAFE_ATTR&&He(Oe,J.ADD_URI_SAFE_ATTR,D),J.FORBID_CONTENTS&&(se===Se&&(se=En(se)),He(se,J.FORBID_CONTENTS,D)),Et&&(re["#text"]=!0),Ie&&He(re,["html","head","body"]),re.table&&(He(re,["tbody"]),delete Le.tbody),ii&&ii(J),Y=J)},Je=He({},["mi","mo","mn","ms","mtext"]),kt=He({},["annotation-xml"]),Yt=He({},["title","style","font","a","script"]),qt=He({},oo);He(qt,lo),He(qt,Z2);var Vt=He({},uo);He(Vt,J2);var ni=function(J){var ge=O(J);(!ge||!ge.tagName)&&(ge={namespaceURI:Wt,tagName:"template"});var Ce=Ys(J.tagName),Ze=Ys(ge.tagName);return Rt[J.namespaceURI]?J.namespaceURI===ui?ge.namespaceURI===It?Ce==="svg":ge.namespaceURI===ft?Ce==="svg"&&(Ze==="annotation-xml"||Je[Ze]):!!qt[Ce]:J.namespaceURI===ft?ge.namespaceURI===It?Ce==="math":ge.namespaceURI===ui?Ce==="math"&&kt[Ze]:!!Vt[Ce]:J.namespaceURI===It?ge.namespaceURI===ui&&!kt[Ze]||ge.namespaceURI===ft&&!Je[Ze]?!1:!Vt[Ce]&&(Yt[Ce]||!qt[Ce]):!!(Ut==="application/xhtml+xml"&&Rt[J.namespaceURI]):!1},Ye=function(J){Fr(e.removed,{element:J});try{J.parentNode.removeChild(J)}catch{try{J.outerHTML=$}catch{J.remove()}}},ri=function(J,ge){try{Fr(e.removed,{attribute:ge.getAttributeNode(J),from:ge})}catch{Fr(e.removed,{attribute:null,from:ge})}if(ge.removeAttribute(J),J==="is"&&!te[J])if(Ee||Te)try{Ye(ge)}catch{}else try{ge.setAttribute(J,"")}catch{}},Xt=function(J){var ge,Ce;if(lt)J="<remove></remove>"+J;else{var Ze=rc(J,/^[\r\n\t ]+/);Ce=Ze&&Ze[0]}Ut==="application/xhtml+xml"&&Wt===It&&(J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>");var zt=z?z.createHTML(J):J;if(Wt===It)try{ge=new S().parseFromString(zt,Ut)}catch{}if(!ge||!ge.documentElement){ge=N.createDocument(Wt,"template",null);try{ge.documentElement.innerHTML=Ot?$:zt}catch{}}var Dt=ge.body||ge.documentElement;return J&&Ce&&Dt.insertBefore(n.createTextNode(Ce),Dt.childNodes[0]||null),Wt===It?w.call(ge,Ie?"html":"body")[0]:Ie?ge.documentElement:Dt},Kt=function(J){return H.call(J.ownerDocument||J,J,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},wt=function(J){return J instanceof m&&(typeof J.nodeName!="string"||typeof J.textContent!="string"||typeof J.removeChild!="function"||!(J.attributes instanceof g)||typeof J.removeAttribute!="function"||typeof J.setAttribute!="function"||typeof J.namespaceURI!="string"||typeof J.insertBefore!="function"||typeof J.hasChildNodes!="function")},at=function(J){return pn(o)==="object"?J instanceof o:J&&pn(J)==="object"&&typeof J.nodeType=="number"&&typeof J.nodeName=="string"},je=function(J,ge,Ce){B[J]&&Y2(B[J],function(Ze){Ze.call(e,ge,Ce,Y)})},Si=function(J){var ge;if(je("beforeSanitizeElements",J,null),wt(J)||Ft(/[\u0080-\uFFFF]/,J.nodeName))return Ye(J),!0;var Ce=D(J.nodeName);if(je("uponSanitizeElement",J,{tagName:Ce,allowedTags:re}),J.hasChildNodes()&&!at(J.firstElementChild)&&(!at(J.content)||!at(J.content.firstElementChild))&&Ft(/<[/\w]/g,J.innerHTML)&&Ft(/<[/\w]/g,J.textContent)||Ce==="select"&&Ft(/<template/i,J.innerHTML)||J.nodeType===7||xt&&J.nodeType===8&&Ft(/<[/\w]/g,J.data))return Ye(J),!0;if(!re[Ce]||Le[Ce]){if(!Le[Ce]&&xn(Ce)&&(we.tagNameCheck instanceof RegExp&&Ft(we.tagNameCheck,Ce)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Ce)))return!1;if(Et&&!se[Ce]){var Ze=O(J)||J.parentNode,zt=I(J)||J.childNodes;if(zt&&Ze)for(var Dt=zt.length,_t=Dt-1;_t>=0;--_t){var Ei=y(zt[_t],!0);Ei.__removalCount=(J.__removalCount||0)+1,Ze.insertBefore(Ei,E(J))}}return Ye(J),!0}return J instanceof l&&!ni(J)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&Ft(/<\/no(script|embed|frames)/i,J.innerHTML)?(Ye(J),!0):(Ge&&J.nodeType===3&&(ge=J.textContent,ge=Ai(ge,U," "),ge=Ai(ge,R," "),ge=Ai(ge,X," "),J.textContent!==ge&&(Fr(e.removed,{element:J.cloneNode()}),J.textContent=ge)),je("afterSanitizeElements",J,null),!1)},Li=function(J,ge,Ce){if(Fe&&(ge==="id"||ge==="name")&&(Ce in n||Ce in le))return!1;if(!(Qe&&!De[ge]&&Ft(F,ge))){if(!(Ve&&Ft(M,ge))){if(!te[ge]||De[ge]){if(!(xn(J)&&(we.tagNameCheck instanceof RegExp&&Ft(we.tagNameCheck,J)||we.tagNameCheck instanceof Function&&we.tagNameCheck(J))&&(we.attributeNameCheck instanceof RegExp&&Ft(we.attributeNameCheck,ge)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(ge))||ge==="is"&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&Ft(we.tagNameCheck,Ce)||we.tagNameCheck instanceof Function&&we.tagNameCheck(Ce))))return!1}else if(!Oe[ge]){if(!Ft(ce,Ai(Ce,Z,""))){if(!((ge==="src"||ge==="xlink:href"||ge==="href")&&J!=="script"&&X2(Ce,"data:")===0&&pe[J])){if(!(et&&!Ft(Q,Ai(Ce,Z,"")))){if(Ce)return!1}}}}}}return!0},xn=function(J){return J!=="annotation-xml"&&rc(J,oe)},fs=function(J){var ge,Ce,Ze,zt;je("beforeSanitizeAttributes",J,null);var Dt=J.attributes;if(!(!Dt||wt(J))){var _t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te};for(zt=Dt.length;zt--;){ge=Dt[zt];var Ei=ge,vt=Ei.name,br=Ei.namespaceURI;if(Ce=vt==="value"?ge.value:K2(ge.value),Ze=D(vt),_t.attrName=Ze,_t.attrValue=Ce,_t.keepAttr=!0,_t.forceKeepAttr=void 0,je("uponSanitizeAttribute",J,_t),Ce=_t.attrValue,!_t.forceKeepAttr&&(ri(vt,J),!!_t.keepAttr)){if(!$e&&Ft(/\/>/i,Ce)){ri(vt,J);continue}Ge&&(Ce=Ai(Ce,U," "),Ce=Ai(Ce,R," "),Ce=Ai(Ce,X," "));var ps=D(J.nodeName);if(Li(ps,Ze,Ce)){if(qe&&(Ze==="id"||Ze==="name")&&(ri(vt,J),Ce=gt+Ce),xt&&Ft(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ce)){ri(vt,J);continue}if(z&&pn(T)==="object"&&typeof T.getAttributeType=="function"&&!br)switch(T.getAttributeType(ps,Ze)){case"TrustedHTML":{Ce=z.createHTML(Ce);break}case"TrustedScriptURL":{Ce=z.createScriptURL(Ce);break}}try{br?J.setAttributeNS(br,vt,Ce):J.setAttribute(vt,Ce),wt(J)?Ye(J):nc(e.removed)}catch{}}}}je("afterSanitizeAttributes",J,null)}},Yi=function be(J){var ge,Ce=Kt(J);for(je("beforeSanitizeShadowDOM",J,null);ge=Ce.nextNode();)je("uponSanitizeShadowNode",ge,null),Si(ge),fs(ge),ge.content instanceof s&&be(ge.content);je("afterSanitizeShadowDOM",J,null)};return e.sanitize=function(be){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ge,Ce,Ze,zt,Dt;if(Ot=!be,Ot&&(be="<!-->"),typeof be!="string"&&!at(be))if(typeof be.toString=="function"){if(be=be.toString(),typeof be!="string")throw ao("dirty is not a string, aborting")}else throw ao("toString is not a function");if(!e.isSupported){if(pn(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof be=="string")return r.toStaticHTML(be);if(at(be))return r.toStaticHTML(be.outerHTML)}return be}if(St||Ne(J),e.removed=[],typeof be=="string"&&(ie=!1),ie){if(be.nodeName){var _t=D(be.nodeName);if(!re[_t]||Le[_t])throw ao("root node is forbidden and cannot be sanitized in-place")}}else if(be instanceof o)ge=Xt("<!---->"),Ce=ge.ownerDocument.importNode(be,!0),Ce.nodeType===1&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?ge=Ce:ge.appendChild(Ce);else{if(!Ee&&!Ge&&!Ie&&be.indexOf("<")===-1)return z&&me?z.createHTML(be):be;if(ge=Xt(be),!ge)return Ee?null:me?$:""}ge&<&&Ye(ge.firstChild);for(var Ei=Kt(ie?be:ge);Ze=Ei.nextNode();)Ze.nodeType===3&&Ze===zt||(Si(Ze),fs(Ze),Ze.content instanceof s&&Yi(Ze.content),zt=Ze);if(zt=null,ie)return be;if(Ee){if(Te)for(Dt=x.call(ge.ownerDocument);ge.firstChild;)Dt.appendChild(ge.firstChild);else Dt=ge;return(te.shadowroot||te.shadowrootmod)&&(Dt=P.call(t,Dt,!0)),Dt}var vt=Ie?ge.outerHTML:ge.innerHTML;return Ie&&re["!doctype"]&&ge.ownerDocument&&ge.ownerDocument.doctype&&ge.ownerDocument.doctype.name&&Ft(lv,ge.ownerDocument.doctype.name)&&(vt="<!DOCTYPE "+ge.ownerDocument.doctype.name+`>
|
|
3
|
+
`+vt),Ge&&(vt=Ai(vt,U," "),vt=Ai(vt,R," "),vt=Ai(vt,X," ")),z&&me?z.createHTML(vt):vt},e.setConfig=function(be){Ne(be),St=!0},e.clearConfig=function(){Y=null,St=!1},e.isValidAttribute=function(be,J,ge){Y||Ne({});var Ce=D(be),Ze=D(J);return Li(Ce,Ze,ge)},e.addHook=function(be,J){typeof J=="function"&&(B[be]=B[be]||[],Fr(B[be],J))},e.removeHook=function(be){if(B[be])return nc(B[be])},e.removeHooks=function(be){B[be]&&(B[be]=[])},e.removeAllHooks=function(){B={}},e}var hv=ph();function fv(r,e){const t=r.hooks??{};let n;for(n in t){const s=t[n];s!==void 0&&e.addHook(n,s)}}function pv(){return hv()}function xa(r={},e=pv){const t=e();fv(r,t);const n=function(s,a){const o=a.value;if(a.oldValue===o)return;const l=`${o}`,c=a.arg,d=r.namedConfigurations,g=r.default??{};if(d&&c!==void 0){s.innerHTML=t.sanitize(l,d[c]??g);return}s.innerHTML=t.sanitize(l,g)};return{mounted:n,updated:n}}const mv={class:"th-filter-wrapper",ref:"filterRef"},gv={key:1,class:"list-content-wrapper"},vv={class:"btn-wrapper"},uc=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=xa(),{t:n}=Xe.useI18n(),s=r,a=e,o=i.computed(()=>s.list.some(z=>{var $;return($=z.children)==null?void 0:$.length})),l=i.computed(()=>s.list.map(z=>{const $=(z.children||[]).map(j=>({label:j.label,value:j.value}));return{label:z.label,value:z.value,children:o.value?$:void 0}})),c=i.ref(!1);i.watch(()=>s.modelValue,z=>{s.multiple?d.value=z:S.value=z});const d=i.ref([]),g=z=>{d.value=z},m=i.ref([]),S=i.ref(null),T=z=>{S.value===z?S.value=null:S.value=z,y()},b=()=>{d.value=[],m.value=[],S.value=null,y()},y=()=>{let z=null;s.multiple?o.value?z=m.value:z=d.value:z=S.value,a("update:model-value",z),c.value=!0,i.nextTick(()=>{a("confirm"),c.value=!1})},E=i.computed(()=>d.value.length||m.value.length||S.value||s.modelValue),I=i.ref(null),O=async z=>{var N,H;const $=z.target.parentElement.parentElement;await i.nextTick();const j=$.querySelector("input");j.click(),await i.nextTick(),(N=j.change)==null||N.call(j,j),await i.nextTick(),(H=I.value)==null||H.$forceUpdate(),m.value=JSON.parse(JSON.stringify(m.value))},k=({data:z})=>i.h("span",{onclick:O},z.label);return(z,$)=>{const j=i.resolveComponent("ElCascaderPanel");return i.openBlock(),i.createElementBlock("div",mv,[i.createElementVNode("span",null,[i.renderSlot(z.$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",E.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(tc))]),_:1})],2)]),default:i.withCtx(()=>[o.value?(i.openBlock(),i.createElementBlock("div",gv,[i.createVNode(j,{ref_key:"aref",ref:I,expandTrigger:"hover",renderLabel:k,modelValue:m.value,"onUpdate:modelValue":$[1]||($[1]=N=>m.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:g,modelValue:d.value,"onUpdate:modelValue":$[0]||($[0]=N=>d.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",vv,[i.createVNode(i.unref(A.OLink),{onClick:b},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("common.reset")),1)]),_:1}),i.createVNode(i.unref(A.OLink),{onClick:y},{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:S.value,"onUpdate:modelValue":$[3]||($[3]=N=>S.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:$[2]||($[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:H=>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(z.$slots,"empty",{key:1})]),default:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["filter-wrapper",E.value&&"has-checked"])},[i.createVNode(i.unref(A.OIcon),{class:"filter-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(tc))]),_:1})],2)]),_:3},8,["modelValue"]))],512)}}}),yv={class:"more-text-wrapper"},_v={key:0},Tv={key:1},bv=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}=Xe.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 d=o.value;if(d){const g=document.createRange();g.setStart(d,0),g.setEnd(d,d.childNodes.length),s.value=g.getBoundingClientRect().height>d.offsetHeight+10||d.scrollHeight>d.offsetHeight+10,a.value=g.getBoundingClientRect().height||d.scrollHeight}else s.value=!1})},c=()=>{e.link&&window.open(e.text)};return(d,g)=>(i.openBlock(),i.createElementBlock("div",yv,[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:g[0]||(g[0]=m=>n.value=!n.value)},[n.value?(i.openBlock(),i.createElementBlock("div",Tv,[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",_v,[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)]))}}),xv=Xe._export_sfc(bv,[["__scopeId","data-v-4776f8a2"]]);var ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Cv(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 Xs={exports:{}},Sv=Xs.exports,cc;function Ev(){return cc||(cc=1,(function(r,e){(function(t,n){r.exports=n()})(Sv,(function(){var t=1e3,n=6e4,s=36e5,a="millisecond",o="second",l="minute",c="hour",d="day",g="week",m="month",S="quarter",T="year",b="date",y="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|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,O={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(U){var R=["th","st","nd","rd"],X=U%100;return"["+U+(R[(X-20)%10]||R[X]||R[0])+"]"}},k=function(U,R,X){var F=String(U);return!F||F.length>=R?U:""+Array(R+1-F.length).join(X)+U},z={s:k,z:function(U){var R=-U.utcOffset(),X=Math.abs(R),F=Math.floor(X/60),M=X%60;return(R<=0?"+":"-")+k(F,2,"0")+":"+k(M,2,"0")},m:function U(R,X){if(R.date()<X.date())return-U(X,R);var F=12*(X.year()-R.year())+(X.month()-R.month()),M=R.clone().add(F,m),Q=X-M<0,Z=R.clone().add(F+(Q?-1:1),m);return+(-(F+(X-M)/(Q?M-Z:Z-M))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:m,y:T,w:g,d,D:b,h:c,m:l,s:o,ms:a,Q:S}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},$="en",j={};j[$]=O;var N="$isDayjsObject",H=function(U){return U instanceof K||!(!U||!U[N])},x=function U(R,X,F){var M;if(!R)return $;if(typeof R=="string"){var Q=R.toLowerCase();j[Q]&&(M=Q),X&&(j[Q]=X,M=Q);var Z=R.split("-");if(!M&&Z.length>1)return U(Z[0])}else{var oe=R.name;j[oe]=R,M=oe}return!F&&M&&($=M),M||!F&&$},w=function(U,R){if(H(U))return U.clone();var X=typeof R=="object"?R:{};return X.date=U,X.args=arguments,new K(X)},P=z;P.l=x,P.i=H,P.w=function(U,R){return w(U,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var K=(function(){function U(X){this.$L=x(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[N]=!0}var R=U.prototype;return R.parse=function(X){this.$d=(function(F){var M=F.date,Q=F.utc;if(M===null)return new Date(NaN);if(P.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var Z=M.match(E);if(Z){var oe=Z[2]-1||0,ce=(Z[7]||"0").substring(0,3);return Q?new Date(Date.UTC(Z[1],oe,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ce)):new Date(Z[1],oe,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ce)}}return new Date(M)})(X),this.init()},R.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},R.$utils=function(){return P},R.isValid=function(){return this.$d.toString()!==y},R.isSame=function(X,F){var M=w(X);return this.startOf(F)<=M&&M<=this.endOf(F)},R.isAfter=function(X,F){return w(X)<this.startOf(F)},R.isBefore=function(X,F){return this.endOf(F)<w(X)},R.$g=function(X,F,M){return P.u(X)?this[F]:this.set(M,X)},R.unix=function(){return Math.floor(this.valueOf()/1e3)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(X,F){var M=this,Q=!!P.u(F)||F,Z=P.p(X),oe=function(De,Ve){var Qe=P.w(M.$u?Date.UTC(M.$y,Ve,De):new Date(M.$y,Ve,De),M);return Q?Qe:Qe.endOf(d)},ce=function(De,Ve){return P.w(M.toDate()[De].apply(M.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(Ve)),M)},re=this.$W,ue=this.$M,te=this.$D,Ae="set"+(this.$u?"UTC":"");switch(Z){case T:return Q?oe(1,0):oe(31,11);case m:return Q?oe(1,ue):oe(0,ue+1);case g:var we=this.$locale().weekStart||0,Le=(re<we?re+7:re)-we;return oe(Q?te-Le:te+(6-Le),ue);case d:case b:return ce(Ae+"Hours",0);case c:return ce(Ae+"Minutes",1);case l:return ce(Ae+"Seconds",2);case o:return ce(Ae+"Milliseconds",3);default:return this.clone()}},R.endOf=function(X){return this.startOf(X,!1)},R.$set=function(X,F){var M,Q=P.p(X),Z="set"+(this.$u?"UTC":""),oe=(M={},M[d]=Z+"Date",M[b]=Z+"Date",M[m]=Z+"Month",M[T]=Z+"FullYear",M[c]=Z+"Hours",M[l]=Z+"Minutes",M[o]=Z+"Seconds",M[a]=Z+"Milliseconds",M)[Q],ce=Q===d?this.$D+(F-this.$W):F;if(Q===m||Q===T){var re=this.clone().set(b,1);re.$d[oe](ce),re.init(),this.$d=re.set(b,Math.min(this.$D,re.daysInMonth())).$d}else oe&&this.$d[oe](ce);return this.init(),this},R.set=function(X,F){return this.clone().$set(X,F)},R.get=function(X){return this[P.p(X)]()},R.add=function(X,F){var M,Q=this;X=Number(X);var Z=P.p(F),oe=function(ue){var te=w(Q);return P.w(te.date(te.date()+Math.round(ue*X)),Q)};if(Z===m)return this.set(m,this.$M+X);if(Z===T)return this.set(T,this.$y+X);if(Z===d)return oe(1);if(Z===g)return oe(7);var ce=(M={},M[l]=n,M[c]=s,M[o]=t,M)[Z]||1,re=this.$d.getTime()+X*ce;return P.w(re,this)},R.subtract=function(X,F){return this.add(-1*X,F)},R.format=function(X){var F=this,M=this.$locale();if(!this.isValid())return M.invalidDate||y;var Q=X||"YYYY-MM-DDTHH:mm:ssZ",Z=P.z(this),oe=this.$H,ce=this.$m,re=this.$M,ue=M.weekdays,te=M.months,Ae=M.meridiem,we=function(Ve,Qe,et,$e){return Ve&&(Ve[Qe]||Ve(F,Q))||et[Qe].slice(0,$e)},Le=function(Ve){return P.s(oe%12||12,Ve,"0")},De=Ae||function(Ve,Qe,et){var $e=Ve<12?"AM":"PM";return et?$e.toLowerCase():$e};return Q.replace(I,(function(Ve,Qe){return Qe||(function(et){switch(et){case"YY":return String(F.$y).slice(-2);case"YYYY":return P.s(F.$y,4,"0");case"M":return re+1;case"MM":return P.s(re+1,2,"0");case"MMM":return we(M.monthsShort,re,te,3);case"MMMM":return we(te,re);case"D":return F.$D;case"DD":return P.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return we(M.weekdaysMin,F.$W,ue,2);case"ddd":return we(M.weekdaysShort,F.$W,ue,3);case"dddd":return ue[F.$W];case"H":return String(oe);case"HH":return P.s(oe,2,"0");case"h":return Le(1);case"hh":return Le(2);case"a":return De(oe,ce,!0);case"A":return De(oe,ce,!1);case"m":return String(ce);case"mm":return P.s(ce,2,"0");case"s":return String(F.$s);case"ss":return P.s(F.$s,2,"0");case"SSS":return P.s(F.$ms,3,"0");case"Z":return Z}return null})(Ve)||Z.replace(":","")}))},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(X,F,M){var Q,Z=this,oe=P.p(F),ce=w(X),re=(ce.utcOffset()-this.utcOffset())*n,ue=this-ce,te=function(){return P.m(Z,ce)};switch(oe){case T:Q=te()/12;break;case m:Q=te();break;case S:Q=te()/3;break;case g:Q=(ue-re)/6048e5;break;case d:Q=(ue-re)/864e5;break;case c:Q=ue/s;break;case l:Q=ue/n;break;case o:Q=ue/t;break;default:Q=ue}return M?Q:P.a(Q)},R.daysInMonth=function(){return this.endOf(m).$D},R.$locale=function(){return j[this.$L]},R.locale=function(X,F){if(!X)return this.$L;var M=this.clone(),Q=x(X,F,!0);return Q&&(M.$L=Q),M},R.clone=function(){return P.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},U})(),B=K.prototype;return w.prototype=B,[["$ms",a],["$s",o],["$m",l],["$H",c],["$W",d],["$M",m],["$y",T],["$D",b]].forEach((function(U){B[U[1]]=function(R){return this.$g(R,U[0],U[1])}})),w.extend=function(U,R){return U.$i||(U(R,K,w),U.$i=!0),w},w.locale=x,w.isDayjs=H,w.unix=function(U){return w(1e3*U)},w.en=j[$],w.Ls=j,w.p={},w}))})(Xs)),Xs.exports}var kv=Ev();const ve=fr(kv),ct=(r=new Date,e="YYYY-MM-DD")=>{let t=r;return t||(t=new Date),ve(new Date(t)).isValid()?ve(new Date(t)).format(e):t},wv=(r,e,t="label",n="value")=>{const s=e.find(a=>a[n]===r);return(s==null?void 0:s[t])||r},Dv=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},ho=r=>r<0?"Invalid number":r>=10?`${r}`:`0${r}`,dc=r=>{if(r>1440*60)return"Invalid date";const e=Math.floor(r/60/60),t=Math.floor((r-e*60*60)/60),n=r%60;return`${ho(e)}:${ho(t)}:${ho(n)}`},Ko=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},Av=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")}`},Tn=()=>{const{t:r,locale:e}=Xe.useI18n(),t=i.computed(()=>[{label:r("meeting.meetingTypeAll"),value:Be.ALL,icon:E2},{label:r("meeting.meetingTypeMeet"),value:Be.MEETING,icon:ch,color:ro.meeting,zIndex:3},{label:r("meeting.meetingTypeEvents"),value:Be.EVENTS,icon:uh,color:ro.events,zIndex:2},{label:r("meeting.meetingTypeSummit"),value:Be.SUMMIT,icon:dh,color:ro.summit,zIndex:1}]),n=i.computed(()=>[{label:r("meeting.day0"),value:mn,max:7},{label:r("meeting.week0"),value:vn,max:2},{label:r("meeting.month0"),value:tn,max:1}]),s=i.computed(()=>[{label:r("meeting.day"),value:mn,max:7},{label:r("meeting.week"),value:vn,max:2},{label:r("meeting.month"),value:tn,max:1}]),a=i.computed(()=>[r("meeting.sunday"),r("meeting.monday"),r("meeting.tuesday"),r("meeting.wednesday"),r("meeting.thursday"),r("meeting.friday"),r("meeting.saturday")]),o=i.computed(()=>{const m=[];for(let S=1;S<=7;S++){const T=S%7;m.push({value:T,label:a.value[T]})}return m});return{t:r,locale:e,meetingTabs:t,cycleTypeOptions0:n,cycleTypeOptions:s,weekDay:a,intervalWeekOptions:o,getPointStr:(m,S)=>m===vn?S.sort((T,b)=>{const y=o.value.findIndex(I=>I.value===T||I.value.toString()===T),E=o.value.findIndex(I=>I.value===b||I.value.toString()===b);return y-E}).map(T=>{const b=o.value.find(y=>y.value===T||y.value.toString()===T);return(b==null?void 0:b.label)||String(T)}).join(r("meeting.cycleSplit")):m===tn?S.join(r("meeting.cycleSplit")):"",getConfig:(m,S)=>{let T=m;const b=t.value.find(y=>y.value===T);return(b==null?void 0:b[S])||""},getPlatformLabel:m=>{switch(m){case"WELINK":return"WeLink";case"ZOOM":return"Zoom";case"TENCENT":return e.value==="zh"?"腾讯会议":"Tencent";default:return m}},getWeekFromDate:m=>a.value[ve(m).day()]}},Nv={class:"o-meeting-detail"},Iv={class:"label"},Ov={key:2},Bv={key:3,class:"value"},Lv={key:0,class:"extra"},Mv={class:"label"},ts=i.defineComponent({__name:"OMeetingDetail",props:{data:{},from:{},show:{type:Boolean},page:{}},setup(r,{expose:e}){const t=r,{t:n,getPlatformLabel:s}=Tn(),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(()=>{var T;const S=!!((T=t.data.live_url)!=null&&T.length);return[{label:n("meeting.activityDetail2"),key:"agenda",ellipsis:!0},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n(S?"meeting.livePlatform":"meeting.activityAddress"),key:S?"live_url":"address"},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}].slice(0,t.from==="home"?5:8)}),l=i.computed(()=>{var T;const S=!!((T=t.data.live_url)!=null&&T.length);return[{label:n("meeting.activityType"),key:"activity_type",isType:!0},{label:n(S?"meeting.livePlatform":"meeting.activityAddress"),key:S?"live_url":"address"},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n("meeting.registrationUrl"),key:"register_url",isLink:!0},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}]}),c=S=>t.data[S],d=i.computed(()=>t.data.type===Be.EVENTS?t.page===Be.APPROVAL?l.value:o.value:t.data.type===Be.SUMMIT?o.value:a.value),g=i.ref([]);return e({copyInfo:()=>{try{let S=`${n("meeting.meetingTopic")+t.data.topic}
|
|
4
|
+
`;return S+=[...g.value].reduce((T,b)=>`${T}${b.textContent}
|
|
5
|
+
`,""),navigator.clipboard.writeText(S),Promise.resolve()}catch(S){return Promise.reject(S)}}}),(S,T)=>(i.openBlock(),i.createElementBlock("div",Nv,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.value,(b,y)=>{var E,I,O;return i.openBlock(),i.createElementBlock("div",{ref_for:!0,ref_key:"domRef",ref:g,class:i.normalizeClass(["label-item",{"record-item":b.isRecord&&((E=c(b.key))==null?void 0:E.length),"link-item":b.isLink,"is-empty":!((I=c(b.key))!=null&&I.length),[`label-item_${r.data.id}`]:!0,[`type_${r.data.type}`]:!0}]),key:y},[c(b.key)&&!b.isRecord?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("span",Iv,i.toDisplayString(b.label),1),b.ellipsis?(i.openBlock(),i.createBlock(xv,{key:0,show:r.show,text:c(b.key)||"-"},null,8,["show","text"])):b.isLink?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,target:"_blank",class:"value",color:"primary","hover-underline":"",href:c(b.key)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c(b.key)),1)]),_:2},1032,["href"])):b.key==="platform"?(i.openBlock(),i.createElementBlock("span",Ov,i.toDisplayString(i.unref(s)(c(b.key))),1)):(i.openBlock(),i.createElementBlock("span",Bv,[b.extra?(i.openBlock(),i.createElementBlock("i",Lv,i.toDisplayString(c(b.extra)),1)):i.createCommentVNode("",!0),i.createTextVNode(" "+i.toDisplayString(c(b.key)||"-"),1)]))],64)):i.createCommentVNode("",!0),b.isRecord&&((O=c(b.key))!=null&&O.length)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("span",Mv,i.toDisplayString(b.label),1),i.createElementVNode("div",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(b.key),k=>(i.openBlock(),i.createElementBlock("p",{key:k.create_time,class:"value"},i.toDisplayString(k.reason)+" "+i.toDisplayString(i.unref(ct)(k.create_time,"YYYY/MM/DD HH:mm:ss"))+" "+i.toDisplayString(k.action===1?i.unref(n)("meeting.approveReview"):i.unref(n)("meeting.rejectReview")),1))),128))])],64)):i.createCommentVNode("",!0)],2)}),128))]))}}),Pv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"32",viewBox:"0 0 30 32"};function Rv(r,e){return i.openBlock(),i.createElementBlock("svg",Pv,[...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 kl={name:"meeting-icon-copy",render:Rv},Vv={class:"meet-title-left"},Fv=["title"],$v={class:"text"},Uv={key:0,class:"tag-wrapper"},qv={class:"start-time"},zv={class:"calendar-info"},mh=i.defineComponent({__name:"OMeetingCalendarList",props:{list:{default:()=>[]},groupType:{}},setup(r){const{activityTypeMap:e}=ba(),t=r,{t:n,locale:s,getConfig:a,getPointStr:o}=Tn(),l=i.ref([]),c=A.useMessage(null),d=async y=>{await l.value[y].copyInfo(),c.success({content:n("common.copySuccess")})},g=i.ref([]),m=i.computed(()=>({SIG_GROUP:`${t.groupType===vi.GROUP?n("meeting.groups"):n("meeting.sigs")}: `,NEW_DATE:n("meeting.latestMeeting"),EMPTY_TEXT:n("meeting.meetingEmptyText"),LEARN_MORE:n("common.seeMore"),JOIN_MEETING:n("meeting.joinMeeting"),SIGN:n("meeting.sign"),DETAILS:n("meeting.detail")})),S=i.ref();let T=null;i.watch([()=>t.list,()=>A.isClient],()=>{t.list.length===1?g.value=[t.list[0].id]:g.value=[],A.isClient&&i.nextTick(()=>{var y;T?T.disconnect():T=new ResizeObserver(E=>{for(let I of E){const{height:O}=I.contentRect;I.target.classList.remove("hidden-divider"),O>=30&&I.target.classList.add("hidden-divider")}}),(y=S.value)==null||y.forEach(E=>{T.observe(E)})})});const b=i.computed(()=>t.list.map(y=>{var F,M;const E=y.type;let I="";if(E!==Be.MEETING){let Q=(F=e.value.get(y.activity_type))==null?void 0:F.label;return y.start&&y.end?y.end_date===y.start_date?I=`${ct(y.start_date)} ${y.start}-${y.end}`:I=`${ct(y.start_date)} ${y.start}-${ct(y.end_date)} ${y.end}`:I=`${ct(y.start_date,"YYYY/MM/DD HH:mm")} ${ct(y.end_date,"YYYY/MM/DD HH:mm")}`,{...y,activity_type:Q,dateRange:I}}const{is_cycle:O,date:k,start:z,end:$,cycle_start_date:j,cycle_end_date:N,cycle_start:H,cycle_end:x,cycle_type:w,cycle_interval:P,cycle_point:K}=y;I=`${ct(k)} ${z} - ${$}`,O&&(I=`${ct(j)} - ${ct(N)}`);let B=`${z} - ${$}`,U=null,R=!1;const X=((M=y.obs_data)==null?void 0:M.filter(Q=>Q.text_video_url))||[];if(O){let Q="";w===mn&&(Q=n("meeting.cycleDay")),w===vn&&(P>1?Q=n("meeting.cycleWeek.other",[o(w,K),P]):Q=n("meeting.cycleWeek.one",[o(w,K)])),w===tn&&(Q=n("meeting.cycleMonth",[o(w,K)])),B=n("meeting.cycleMeetingText2",{startDate:j,endDate:N,startTime:H,endTime:x,cycleType:Q}),R=X.some(Z=>{var oe;return Z.sub_id===((oe=y.cycle_sub.find(ce=>ce.date===k))==null?void 0:oe.sub_id)})}else R=X.length>0;return R&&(U=`${location.origin}/${s.value}/video/${y.group_name}/${y.mid}/${k}`),{...y,dateRange:I,timeRange:B,replay_url:U}}));return(y,E)=>{var I,O;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["o-meeting-calendar-list",(I=b.value)!=null&&I.length?"":"is-empty"])},[(O=b.value)!=null&&O.length?(i.openBlock(),i.createBlock(i.unref(A.OCollapse),{key:1,modelValue:g.value,"onUpdate:modelValue":E[0]||(E[0]=k=>g.value=k),style:{"--collapse-padding":"0"}},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value,(k,z)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:k.id,value:k.id},{title:i.withCtx(()=>[i.createElementVNode("div",Vv,[i.createElementVNode("div",{class:"meet-title",title:k.topic||k.name},[i.createVNode(i.unref(A.OIcon),{style:i.normalizeStyle({backgroundColor:`${i.unref(a)(k.type,"color")}`})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(a)(k.type,"icon"))))]),_:2},1032,["style"]),i.createElementVNode("div",$v,i.toDisplayString(k.topic||k.name||k.title),1),k.is_cycle?(i.openBlock(),i.createElementBlock("div",Uv,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],8,Fv),i.createElementVNode("div",{class:"meet-info",ref_for:!0,ref_key:"meetInfoRef",ref:S},[i.createElementVNode("span",qv,[i.createElementVNode("span",null,i.toDisplayString(k.dateRange),1)]),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("div",null,[k.group_name?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createTextVNode(i.toDisplayString(m.value.SIG_GROUP)+" "+i.toDisplayString(k.group_name),1)],64)):i.createCommentVNode("",!0),k.activity_type?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(k.activity_type),1)],64)):i.createCommentVNode("",!0)])],512),k.url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,"hover-underline":!1,href:k.url,target:"_blank",class:"jump-detail-link"},{suffix:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Hr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.LEARN_MORE),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),k.join_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,"hover-underline":!1,href:k.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(Hr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.JOIN_MEETING),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),k.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,"hover-underline":!1,href:k.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(Hr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.DETAILS),1)]),_:1},8,["href"])):i.createCommentVNode("",!0),k.register_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,"hover-underline":!1,href:k.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(Hr))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(m.value.SIGN),1)]),_:1},8,["href"])):i.createCommentVNode("",!0)]),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>d(z),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(kl))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",zv,[i.createVNode(ts,{show:g.value.includes(k.id),data:k,ref_for:!0,ref:$=>l.value[z]=$,from:"home"},null,8,["show","data"])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):i.renderSlot(y.$slots,"empty",{key:0})],2)}}}),jv={class:"o-meeting-calendar"},Hv={class:"calendar-body"},Gv={class:"calender-header-left"},Wv={class:"left-title"},Yv={class:"month-date"},Xv={class:"right-title"},Kv=["onClick"],Qv={class:"day-box"},Zv={class:"icon-box"},Jv={class:"detail-list"},ey={class:"current-day"},ty={class:"right-title"},iy={class:"title-list"},ny="2021-01-01",hc=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:vi.SIG},groups:{default:()=>[]}},setup(r,{expose:e}){const t=r,{t:n,locale:s,meetingTabs:a,getConfig:o}=Tn(),l=i.computed(()=>s.value===Xe.Locales.EN),c=i.ref(""),d=i.ref([]),g=i.ref([]),m=i.ref([]),S=i.ref([]),T=i.ref([]),b=i.ref([]),y=i.ref([]),E=i.ref(Be.ALL),I=i.computed(()=>{let re=a.value;return t.hiddenEvents&&(re=re.filter(ue=>ue.value!==Be.EVENTS)),t.hiddenSummit&&(re=re.filter(ue=>ue.value!==Be.SUMMIT)),re.filter(ue=>ue.value!==Be.ALL).length===1?[]:re});i.watch(()=>I.value,()=>{var re;E.value=((re=I.value[0])==null?void 0:re.value)??Be.MEETING});const O=i.ref(),k=i.ref("407px"),z=i.ref(!1),$=i.ref(""),j=i.ref(!1),N=i.ref(""),H=async re=>{if(t.getSummitListRequest){const ue=await t.getSummitListRequest(re);g.value=(ue||[]).map(te=>({...te,type:Be.SUMMIT,start_date_time:`${ct(te.start_date)} ${te.start}`,end_date_time:`${ct(te.end_date)} ${te.end}`}))}else g.value=[]},x=async re=>{if(t.getEventsListRequest){const ue=await t.getEventsListRequest(re);S.value=(ue||[]).map(te=>({...te,type:Be.EVENTS,start_date_time:`${ct(te.start_date)} ${te.start}`,end_date_time:`${ct(te.end_date)} ${te.end}`}))}else S.value=[]},w=async re=>{t.getDateListRequest&&t.getDateListRequest(re,N.value||"").then(ue=>{d.value=ue}),t.getEventsDatesRequest&&t.getEventsDatesRequest(re).then(ue=>{T.value=ue}),t.getSummitDatesRequest&&t.getSummitDatesRequest(re).then(ue=>{m.value=ue})},P=async re=>{if(t.getMeetingListRequest&&re.date)try{const ue=await t.getMeetingListRequest(re.date,N.value,"");y.value=ue.map(te=>({...te,time:`${te.start}-${te.end}`,type:Be.MEETING,date:te.date||re.date})).sort((te,Ae)=>{var we,Le;return parseInt((we=te.start||te.cycle_start)==null?void 0:we.replace(":",""))-parseInt(Ae.end||((Le=Ae.cycle_end)==null?void 0:Le.replace(":","")))})}catch{y.value=[]}},K=i.computed(()=>[...y.value,...S.value.filter(re=>{var ue;return!ve(re.start_date).isAfter(ve($.value))&&!ve($.value).isAfter(ve(re.end_date))||((ue=re.dates)==null?void 0:ue.includes($.value))}),...g.value.filter(re=>{var ue;return(ue=re.dates)==null?void 0:ue.includes($.value)})].filter(re=>E.value===Be.ALL?!0:re.type===E.value)),B=async re=>{const ue=ve(re).format("YYYY-MM-DD");if($.value=ue,H(ue),x(ue),w(ue),b.value=[...new Set([...d.value,...m.value,...T.value])].flat().sort((te,Ae)=>ve(te).isAfter(ve(Ae))?1:-1),!re)if(!b.value.length)c.value=ct(new Date);else{let te=[...b.value].reverse().find(Ae=>ve().isAfter(ve(Ae)));te||(te=b.value.find(Ae=>ve(Ae).isAfter(ve()))),c.value=ct(te)}P({date:ue,type:E.value})},U=zi.useDebounceFn((re,ue)=>{if(j.value){j.value=!1;return}if(new Date(re).getTime()/1e3<1610380800){ue==null||ue.stopPropagation();return}B(re)},300),R=(re,ue)=>{if(ct(ue)===ct(ny)&&re==="prev-month"){z.value=!0;return}z.value=!1,O.value.selectDate(re),U(ct(O.value.selectedDay))},X=()=>{i.nextTick(()=>{P({date:$.value,type:E.value}),w($.value)})},F=re=>re.replace(/^0+(?=\d)/,""),M=re=>{new MutationObserver(function(){k.value=`${re.offsetHeight-2}px`}).observe(re,{childList:!0,subtree:!0,characterData:!0})},Q=async()=>{const re=document.querySelector(".calendar-body .el-calendar__body");re&&(M(re),k.value=`${re.offsetHeight-2}px`)};i.onMounted(()=>{Q(),B()});const Z=i.watch(()=>b.value.length,()=>{A.isClient&&!$.value&&i.nextTick(()=>{const re=document.querySelector(".is-today .out-box");re&&(j.value=!0,re.click(),Z())})}),oe=re=>l.value?re.split(" ").reverse().join(" "):re,ce=(re,ue)=>re===Be.MEETING?[Be.ALL,Be.MEETING].includes(E.value)&&d.value.includes(ue):re===Be.SUMMIT?[Be.ALL,Be.SUMMIT].includes(E.value)&&m.value.includes(ue):re===Be.EVENTS?[Be.ALL,Be.EVENTS].includes(E.value)&&T.value.includes(ue):!1;return e({refresh:B}),(re,ue)=>(i.openBlock(),i.createElementBlock("div",jv,[i.createElementVNode("div",Hv,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendar",ref:O,class:"calender"},{header:i.withCtx(({date:te})=>[i.createElementVNode("div",Gv,[i.createElementVNode("div",Wv,[i.createVNode(i.unref(A.OIcon),{onClick:Ae=>R("prev-month",te)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft),{class:i.normalizeClass({disable:z.value})},null,8,["class"])]),_:1},8,["onClick"]),i.createElementVNode("span",Yv,i.toDisplayString(oe(te)),1),i.createVNode(i.unref(A.OIcon),{onClick:Ae=>R("next-month",te)},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1},8,["onClick"])]),i.createVNode(i.unref(A.OSelect),{modelValue:N.value,"onUpdate:modelValue":ue[0]||(ue[0]=Ae=>N.value=Ae),placeholder:i.unref(n)(r.groupType===i.unref(vi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:X},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.groups,Ae=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:Ae,key:Ae},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(Ae),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])]),i.createElementVNode("div",Xv,[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.latestMeeting"))+" ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(ve)(c.value).format("YYYY/MM/DD")),1)])]),"date-cell":i.withCtx(({data:te})=>[i.createElementVNode("div",{class:i.normalizeClass(["out-box",{"has-calender":b.value.includes(te.day)}]),onClick:Ae=>i.unref(U)(te.day,Ae)},[i.createElementVNode("div",Qv,[i.createElementVNode("p",{class:i.normalizeClass([te.isSelected?"is-selected":"","date-calender"])},i.toDisplayString(F(te.day.split("-").at(-1)||"")),3),i.createElementVNode("div",Zv,[ce(i.unref(Be).MEETING,te.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"meeting",style:i.normalizeStyle({zIndex:i.unref(o)(i.unref(Be).MEETING,"zIndex"),backgroundColor:i.unref(o)(i.unref(Be).MEETING,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(ch))]),_:1},8,["style"])):i.createCommentVNode("",!0),ce(i.unref(Be).EVENTS,te.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,class:"events",style:i.normalizeStyle({zIndex:i.unref(o)(i.unref(Be).EVENTS,"zIndex"),backgroundColor:i.unref(o)(i.unref(Be).EVENTS,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(uh))]),_:1},8,["style"])):i.createCommentVNode("",!0),ce(i.unref(Be).SUMMIT,te.day)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:2,class:"summit",style:i.normalizeStyle({zIndex:i.unref(o)(i.unref(Be).SUMMIT,"zIndex"),backgroundColor:i.unref(o)(i.unref(Be).SUMMIT,"color")})},{default:i.withCtx(()=>[i.createVNode(i.unref(dh))]),_:1},8,["style"])):i.createCommentVNode("",!0)])])],10,Kv)]),_:1},512),i.createElementVNode("div",Jv,[i.createElementVNode("div",ey,[i.createTextVNode(i.toDisplayString(i.unref(n)("meeting.latestMeeting"))+" ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(ve)($.value).format("YYYY/MM/DD")),1)]),i.createElementVNode("div",ty,[i.createElementVNode("div",iy,[i.createVNode(i.unref(A.OSelect),{modelValue:N.value,"onUpdate:modelValue":ue[1]||(ue[1]=te=>N.value=te),placeholder:i.unref(n)(r.groupType===i.unref(vi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:X},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.groups,te=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{value:te,key:te},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(te),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"]),i.createVNode(i.unref(A.OTab),{modelValue:E.value,"onUpdate:modelValue":ue[2]||(ue[2]=te=>E.value=te),line:!1,"max-show":9999},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(I.value,te=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:te.value,value:te.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(te.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(te.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",style:i.normalizeStyle({"--height":k.value})},{default:i.withCtx(()=>[i.createVNode(mh,{list:K.value,groupType:r.groupType},{empty:i.withCtx(()=>[i.renderSlot(re.$slots,"empty")]),_:3},8,["list","groupType"])]),_:3},8,["style"])])])])]))}}),ry={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function sy(r,e){return i.openBlock(),i.createElementBlock("svg",ry,[...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 fc={name:"meeting-icon-help",render:sy},ay={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function oy(r,e){return i.openBlock(),i.createElementBlock("svg",ay,[...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 pc={name:"meeting-icon-tip",render:oy},ly=i.defineComponent({__name:"OMeetingCalendarSelector",props:{modelValue:{default:()=>[]},multiple:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const{t}=Xe.useI18n(),n=r,s=e,a=()=>{let y=[];for(let E=1;E<=31;E++)y.push(E);return y},o=i.computed(()=>a()),l=i.ref([]),c=i.ref([]),d=i.ref(null),g=()=>{l.value=[...n.modelValue],c.value=[...n.modelValue]};i.watchEffect(()=>{g()});const m=()=>{s("update:modelValue",c.value),d.value&&(d.value.expanded=!1)},S=()=>{g(),d.value&&(d.value.expanded=!1)},T=y=>{if(n.multiple){const E=c.value.indexOf(y);E===-1?c.value.push(y):c.value.splice(E,1),c.value.sort()}else c.value=[y],m()},b=y=>{n.multiple?T(y):c.value=[],m()};return(y,E)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["o-meeting-calendar-selector",!r.multiple&&"is-single"])},[i.createVNode(i.unref(tt.ElSelect),{ref_key:"selectorRef",ref:d,"popper-class":"o-meeting-calendar-selector-popper",placeholder:i.unref(t)("meeting.selectRepeatDate"),size:"large",multiple:"",collapseTags:"",maxCollapseTags:3,modelValue:l.value,onRemoveTag:b},i.createSlots({default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,I=>(i.openBlock(),i.createBlock(i.unref(tt.ElOption),{key:I,label:I,value:I,onClick:O=>T(I),class:i.normalizeClass(c.value.includes(I)&&"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:m},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.confirm")),1)]),_:1}),i.createVNode(i.unref(A.OButton),{variant:"text",onClick:S},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("common.cancel")),1)]),_:1})]),key:"0"}:void 0]),1032,["placeholder","modelValue"])],2))}}),uy={class:"o-meeting-form"},cy={class:"label-wrapper"},dy={class:"o-meeting-form-popover-content etherpad"},hy={class:"repeat-config-wrapper"},fy={class:"repeat-config"},py={class:"repeat-config-item"},my={class:"time-select-wrapper"},gy={key:1},vy={key:1,class:"switch-wrapper"},yy={class:"switch-text"},_y={key:1,class:"switch-wrapper"},Ty={class:"switch-text"},by={class:"label-wrapper"},xy={class:"o-meeting-form-popover-content"},Cy=["href"],Sy={key:0,class:"form-btns"},mc=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:vi.SIG},confirmText:{}},emits:["confirm","cancel"],setup(r,{expose:e,emit:t}){const{t:n,locale:s,cycleTypeOptions0:a,intervalWeekOptions:o,getPlatformLabel:l}=Tn(),c=r,d=A.useMessage(null),g=a,m=o,S=i.computed(()=>wv(b.value.cycle_type,g.value,"max")),T={is_record:!0,agenda:"",email_list:"",platform:"WELINK",topic:"",group_name:"",etherpad:"",date:"",date_range:[],start:"",end:"",time:"",is_cycle:!1,cycle_interval:1,cycle_type:mn,cycle_point:[]},b=i.ref(Object.assign({},T)),y=i.ref(null),E=i.ref(!1),I=i.computed(()=>({topic:[{required:!0,message:n("meeting.enterMeetingName")},{validator:X=>{if(X.length>128)return{type:"danger",message:n("meeting.meetingNameTooLong")}}}],agenda:[{validator:X=>{if(X.length>4096)return{type:"danger",message:n("meeting.meetingAgendaTooLong")}}}],group_name:[{required:!0,message:c.groupType===vi.GROUP?n("meeting.selectGroup"):n("meeting.selectSig")}],etherpad:[{required:!0,message:n("meeting.enterEtherpad")}],date:[{required:!0,message:n("meeting.selectDate")}],platform:[{required:!0,message:n("meeting.selectPlatform")}],time:[{validator:X=>{var ue;const{is_cycle:F,cycle_type:M,cycle_interval:Q,cycle_point:Z,date:oe,date_range:ce}=b.value;if(F){const te=n("meeting.finishMeetingConfig");if(M===mn&&!Q)return{type:"danger",message:te};if(M===vn&&(!Q||!(Z!=null&&Z.length)))return{type:"danger",message:te};if(M===tn&&(!Q||!(Z!=null&&Z.length)))return{type:"danger",message:te};if(!(ce!=null&&ce.length))return{type:"danger",message:n("meeting.selectMeetingDate")};const Ae=n("meeting.invalidMeetingDuration");let we=ce[0];const Le=ce[1];if(M===vn){const De=new Set;for(;!ve(we).isAfter(ve(Le));)De.add(ve(we).day()),we=ve(we).add(1,"day").format("YYYY-MM-DD");if(Z.every(Ve=>!De.has(Ve)))return{type:"danger",message:Ae}}if(M===tn){const De=new Set;for(;!ve(we).isAfter(ve(Le));)De.add(ve(we).date()),we=ve(we).add(1,"day").format("YYYY-MM-DD");if(Z.every(Ve=>!De.has(Ve)))return{type:"danger",message:Ae}}}else if(!oe)return{type:"danger",message:n("meeting.selectMeetingDate")};if(!((ue=X==null?void 0:X.trim())!=null&&ue.length))return{type:"danger",message:n("meeting.selectMeetingTime")};const re=X.split("-").map(te=>te.split(":").map(Number));if(re[0][0]>re[1][0]||re[0][0]===re[1][0]&&re[0][1]>=re[1][1])return{type:"danger",message:n("meeting.endTimeAfterStartTime")};if(!b.value.is_cycle&&b.value.date&&b.value.start){const te=`${b.value.date} ${b.value.start}`;if(ve(te).isBefore(ve()))return{type:"danger",message:n("meeting.startTimeBeforeEndTime")}}},triggers:["blur","change"]}],email_list:[{validator:X=>{if(c.isEdit)return{};const F=X.replaceAll(" ","").replaceAll(",",";")||"";if(F.length){if(F.length>1020)return{type:"danger",message:n("meeting.emailTooLong")};const M=F.split(";")||[];if(M.some(Q=>!hh.test(Q)))return{type:"danger",message:n("meeting.emailInvalid")};if(M.some(Q=>Q.length>50))return{type:"danger",message:n("meeting.singleEmailTooLong")};if(M.length>20)return{type:"danger",message:n("meeting.emailCountTooLong")}}},triggers:["blur","change"]}]})),O=i.ref([]),k=async()=>{if(!c.getGroupsRequest)return;const X=await c.getGroupsRequest();O.value=X.map(F=>({...F,label:F.group_name,value:F.group_name})),c.data&&B(b.value.group_name)},z=i.ref([]),$=async()=>{if(!c.getPlatformsRequest)return;const X=await c.getPlatformsRequest();z.value=X.map(F=>({label:l(F),value:F})),c.data||(b.value.platform=z.value[0].value)},j=t,N=()=>{if(!c.data)return{};const{start:X,end:F,is_cycle:M,cycle_start_date:Q,cycle_end_date:Z,cycle_point:oe,cycle_interval:ce,cycle_start:re,cycle_end:ue}=c.data;return{...c.data,time:`${X}-${F}`,...M?{date_range:[Q,Z],cycle_point:(oe==null?void 0:oe.map(te=>parseInt(te)))||[],cycle_interval:ce||1,time:`${re}-${ue}`,start:re,end:ue}:{}}};i.watch(()=>c.data,X=>{var F;if(X){const M=N(),Q=((F=M==null?void 0:M.cycle_sub)==null?void 0:F.find(te=>te.sub_id===(c.subId||M.sub_id)))||{},{mid:Z,date:oe,start:ce,end:re,sub_id:ue}=Q;Object.assign(b.value,M,c.isSub?{is_cycle:!1,mid:Z,date:oe,start:ce,end:re,sub_id:ue}:{})}else{const M=ve().format("YYYY-MM-DD"),Q=ve().format("HH:mm");let Z="",oe="";const ce=On(Q);if(ce<=On("08:00"))Z="08:00",oe="09:00";else if(On("22:15")<=ce)Z="08:00",oe="09:00";else{let[ue,te]=Q.split(":").map(Number);te>=45?(ue++,te=0):te=(Math.floor(te/15)+1)*15,Z=dc(ue*60+te).slice(3),oe=dc(ue*60+te+60).slice(3)}const re=[ve().format("YYYY-MM-DD"),ve().add(1,"month").format("YYYY-MM-DD")];Object.assign(b.value,{date:M,start:Z,end:oe,time:`${Z}-${oe}`,date_range:re})}},{immediate:!0,deep:!0});const H=()=>{var X,F,M,Q;b.value=Object.assign({},T),(F=(X=y.value)==null?void 0:X.clearValidate)==null||F.call(X),(Q=(M=y.value)==null?void 0:M.resetFields)==null||Q.call(M),j("cancel")},x=()=>{b.value.cycle_point=[],b.value.cycle_interval=1},w=()=>{b.value.platform="WELINK"},{lePadV:P}=At.useScreen(),K=async()=>{var F;let X=c.isEdit?n("meeting.editSuccess"):n("meeting.booSuccess");try{E.value=!0;const M=await y.value.validate();if(!M||M.some(Ie=>!!Ie))return;const{topic:Q,etherpad:Z,group_name:oe,platform:ce,date:re,start:ue,end:te,agenda:Ae,is_record:we,is_cycle:Le,date_range:De,cycle_type:Ve,cycle_interval:Qe,cycle_point:et}=b.value;let $e={topic:Q,etherpad:Z,agenda:Ae,is_record:we,group_name:oe,platform:ce,is_cycle:Le},Ge;if(Le?($e={...$e,cycle_interval:Qe,cycle_type:Ve,cycle_start_date:(De==null?void 0:De[0])||"",cycle_end_date:(De==null?void 0:De[1])||"",cycle_start:ue,cycle_end:te},Ve!==mn&&($e={...$e,cycle_point:et.join(",")})):$e={...$e,date:(re==null?void 0:re.split(" ")[0])||"",start:ue,end:te},c.isEdit)if(c.isSub){const{mid:Ie,sub_id:St}=b.value,{date:lt,start:Ee,end:Te}=$e;Ge=await(c==null?void 0:c.editSubMeetingRequest(St,{mid:Ie,date:lt,start:Ee,end:Te,is_notify:!0}))}else{const{email_list:Ie,platform:St,group_name:lt,etherpad:Ee,...Te}=$e;Ge=await(c==null?void 0:c.editMeetingRequest((F=c.data)==null?void 0:F.id,{...Te,is_notify:!0}))}else Ge=await(c==null?void 0:c.createMeetingRequest({...$e,email_list:b.value.email_list.replaceAll(" ","")}));if(typeof Ge=="boolean"&&!Ge)return;const xt=n("meeting.meetingHandleSuccess",[b.value.topic,X]);d.success({content:xt}),j("confirm")}finally{E.value=!1}};i.onMounted(()=>{k(),$()});const B=X=>{const F=O.value.find(M=>M.value===X);c.isEdit||(b.value.etherpad=(F==null?void 0:F.etherpad)||"",b.value.email_list=(F==null?void 0:F.email_list)||"")},U=X=>X.getTime()<Date.now()-1440*60*1e3,R=()=>{b.value.start&&b.value.end?b.value.time=`${b.value.start}-${b.value.end}`:b.value.time=""};return e({confirm:K}),(X,F)=>(i.openBlock(),i.createElementBlock("div",uy,[i.createVNode(i.unref(A.OForm),{model:b.value,ref_key:"formRef",ref:y,"has-required":"",layout:i.unref(P)?"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:b.value.topic,"onUpdate:modelValue":F[0]||(F[0]=M=>b.value.topic=M)},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(vi).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(vi).GROUP?i.unref(n)("meeting.selectGroup"):i.unref(n)("meeting.selectSig"),size:"large",style:{width:"100%"},modelValue:b.value.group_name,"onUpdate:modelValue":F[1]||(F[1]=M=>b.value.group_name=M),onChange:B},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(O.value,M=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:M.value,value:M.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(M.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),b.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",cy,[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(fc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",dy,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:b.value.etherpad,"onUpdate:modelValue":F[2]||(F[2]=M=>b.value.etherpad=M)},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",hy,[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:b.value.is_cycle,"onUpdate:modelValue":F[3]||(F[3]=M=>b.value.is_cycle=M),onChange:w,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",fy,[b.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",py,[b.value.cycle_type!==i.unref(tn)?(i.openBlock(),i.createBlock(i.unref(A.OFormItem),{key:0},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElInputNumber),{size:"large",modelValue:b.value.cycle_interval,"onUpdate:modelValue":F[4]||(F[4]=M=>b.value.cycle_interval=M),min:1,max:S.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:b.value.cycle_type,"onUpdate:modelValue":F[5]||(F[5]=M=>b.value.cycle_type=M),class:"interval-select",optionWrapClass:"o-meeting-form-interval-select-options",onChange:x},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(g),M=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:M.value,value:M.value,label:M.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1},8,["label"]),b.value.cycle_type!==i.unref(mn)?(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(()=>[b.value.cycle_type===i.unref(vn)?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",multiple:"",modelValue:b.value.cycle_point,"onUpdate:modelValue":F[6]||(F[6]=M=>b.value.cycle_point=M),placeholder:i.unref(n)("meeting.selectRepeatDate"),"max-tag-count":1},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(m),M=>(i.openBlock(),i.createBlock(i.unref(A.OOption),{key:M.value,value:M.value,label:M.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])):i.createCommentVNode("",!0),b.value.cycle_type===i.unref(tn)?(i.openBlock(),i.createBlock(ly,{key:1,modelValue:b.value.cycle_point,"onUpdate:modelValue":F[7]||(F[7]=M=>b.value.cycle_point=M)},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:b.value.date_range,"onUpdate:modelValue":F[8]||(F[8]=M=>b.value.date_range=M),"start-placeholder":i.unref(n)("meeting.startDate"),"end-placeholder":i.unref(n)("meeting.endDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":U,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:b.value.date,"onUpdate:modelValue":F[9]||(F[9]=M=>b.value.date=M),placeholder:i.unref(n)("meeting.selectDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":U,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",my,[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:b.value.start,"onUpdate:modelValue":F[10]||(F[10]=M=>b.value.start=M),size:"large",clearable:!1,onChange:R},null,8,["placeholder","modelValue"])]),_:1}),F[17]||(F[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:b.value.end,"onUpdate:modelValue":F[11]||(F[11]=M=>b.value.end=M),size:"large",clearable:!1,onChange:R},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,class:"platform-item"},{default:i.withCtx(()=>[r.data?(i.openBlock(),i.createElementBlock("span",gy,i.toDisplayString(i.unref(l)(b.value.platform)),1)):(i.openBlock(),i.createBlock(i.unref(A.ORadioGroup),{key:0,modelValue:b.value.platform,"onUpdate:modelValue":F[12]||(F[12]=M=>b.value.platform=M),disabled:b.value.is_cycle},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(z.value,M=>(i.openBlock(),i.createBlock(i.unref(A.ORadio),{key:M.value,value:M.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(l)(M.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:b.value.agenda,"onUpdate:modelValue":F[13]||(F[13]=M=>b.value.agenda=M)},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(P)?(i.openBlock(),i.createBlock(i.unref(A.OSwitch),{key:0,modelValue:b.value.is_record,"onUpdate:modelValue":F[14]||(F[14]=M=>b.value.is_record=M),disabled:r.isSub},null,8,["modelValue","disabled"])):(i.openBlock(),i.createElementBlock("div",vy,[i.createVNode(i.unref(A.OSwitch),{modelValue:b.value.is_record,"onUpdate:modelValue":F[15]||(F[15]=M=>b.value.is_record=M),disabled:r.isSub},null,8,["modelValue","disabled"]),i.createElementVNode("div",yy,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(pc))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[i.unref(l)(b.value.platform)])),1)])]))]),_:1},8,["label"]),i.unref(P)?(i.openBlock(),i.createElementBlock("div",_y,[i.createElementVNode("div",Ty,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(pc))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("meeting.meetingRecordDesc",[i.unref(l)(b.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",by,[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(fc))]),_:1})]),default:i.withCtx(()=>[i.createElementVNode("div",xy,[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,Cy)])]),_: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:b.value.email_list,"onUpdate:modelValue":F[16]||(F[16]=M=>b.value.email_list=M)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),r.showBtns?(i.openBlock(),i.createElementBlock("div",Sy,[i.createVNode(i.unref(A.OButton),{color:"primary",variant:"solid",size:"large",onClick:K,loading:E.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(r.isEdit?i.unref(n)("common.save"):r.confirmText||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)]))}}),Ey={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function ky(r,e){return i.openBlock(),i.createElementBlock("svg",Ey,[...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 wy={name:"meeting-icon-playing",render:ky},Dy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Ay(r,e){return i.openBlock(),i.createElementBlock("svg",Dy,[...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 Ny={name:"components-icon-search",render:Ay},Iy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Oy(r,e){return i.openBlock(),i.createElementBlock("svg",Iy,[...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 By={name:"components-icon-chevron-up",render:Oy},Ly={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function My(r,e){return i.openBlock(),i.createElementBlock("svg",Ly,[...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 Py={name:"meeting-icon-speaker",render:My},Ry={class:"o-meeting-playback-subtitles"},Vy={class:"search-captions"},Fy={key:0,class:"suffix-box"},$y={class:"right-handle"},Uy=["onClick"],qy={class:"info"},zy={class:"num"},jy={class:"speaker"},Hy={class:"start-time"},Gy={class:"text"},Wy={key:1},Yy=i.defineComponent({__name:"OMeetingPlaybackSubtitles",props:{captions:{default:()=>[]},instance:{},trackIdx:{}},setup(r){const e=xa(),t=r,{t:n}=Xe.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,B=>{B&&c()});const d=i.ref([]);i.watch(()=>t.captions,()=>{d.value=t.captions||[],i.nextTick(()=>{var B;a.value&&((B=a.value)==null||B.scrollTo({top:0,behavior:"smooth"}))})},{immediate:!0,deep:!0});const g=B=>`00:${B.split(".")[0]}`.slice(-8),m=B=>{const U=B.split(":"),R=U[U.length-3]?parseInt(U[U.length-3]):0,X=parseInt(U[U.length-2]),F=parseFloat(U[U.length-1]);return R*60*60+X*60+F};i.onMounted(()=>{var B;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(B=a.value)==null||B.addEventListener("wheel",l)}),i.watch(()=>d.value,()=>{var B;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(B=a.value)==null||B.addEventListener("wheel",l)});const S=i.ref(0),T=()=>{},b=B=>{const U=t.instance;if(!U)return;const R=m(B);U.currentTime(R)},y=i.ref(""),E=i.ref(0),I=i.ref(0),O=i.ref([]),k=n("common.all"),z=i.computed(()=>[...new Set(t.captions.map(B=>B.speakerLabel).sort().reverse())]);i.watch(()=>s.value,()=>{var U,R;if(o.value&&y.value)return;const B=(U=a.value)==null?void 0:U.querySelectorAll(".captions-item")[s.value-1];(R=a.value)==null||R.scrollTo({top:(B==null?void 0:B.offsetTop)-16,behavior:"smooth"})}),i.onUnmounted(()=>{a.value&&a.value.removeEventListener("wheel",l)});const $=(B,U)=>{var Q,Z,oe,ce,re,ue;const R=document.getElementsByClassName("light-keyword")[B-1],X=document.getElementsByClassName("light-keyword")[B-U];X==null||X.classList.remove("light-keyword-active"),R==null||R.classList.add("light-keyword-active");const F=R.offsetTop+R.offsetHeight<((Q=a.value)==null?void 0:Q.scrollTop),M=R.offsetTop>((Z=a.value)==null?void 0:Z.offsetHeight)+((oe=a.value)==null?void 0:oe.scrollTop);(F||M)&&((ue=a.value)==null||ue.scrollTo({top:(re=(ce=R.parentElement)==null?void 0:ce.parentElement)==null?void 0:re.offsetTop,behavior:"smooth"}))},j=()=>{!E.value||I.value===1||(I.value--,$(I.value,0))},N=B=>{B!=null&&B.shiftKey||!E.value||I.value===E.value||(I.value++,$(I.value,2))},H=B=>{d.value=t.captions.filter(U=>O.value.includes(U.speakerLabel)).map(U=>({...U,contentHtml:B?U.contentHtml.replaceAll(B,`<span class="light-keyword">${B}</span>`):U.contentHtml})),i.nextTick(()=>{var R;const U=document.getElementsByClassName("light-keyword");E.value=U.length,E.value?N():(R=a.value)==null||R.scrollTo({top:0,behavior:"smooth"})})},x=zi.useDebounceFn(H,300);i.watch(()=>y.value,B=>{I.value=0,x(B)}),i.watch(()=>z.value,B=>{O.value=B},{immediate:!0});const w=i.ref(!1),P=i.ref(!1),K=B=>{P.value=!1,B?O.value=z.value:O.value=[]};return i.watch(()=>O.value,B=>{B.length===0?(w.value=!1,P.value=!1):B.length===z.value.length?(w.value=!0,P.value=!1):P.value=!0,x(y.value)},{deep:!0}),(B,U)=>(i.openBlock(),i.createElementBlock("div",Ry,[i.createElementVNode("div",Vy,[i.createVNode(i.unref(A.OInput),{modelValue:y.value,"onUpdate:modelValue":U[1]||(U[1]=R=>y.value=R),onKeydown:[i.withKeys(N,["enter"]),i.withKeys(i.withModifiers(j,["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(Ny))]),_:1})]),suffix:i.withCtx(()=>[y.value?(i.openBlock(),i.createElementBlock("div",Fy,[i.createElementVNode("span",null,i.toDisplayString(I.value)+"/"+i.toDisplayString(E.value),1),i.createVNode(i.unref(A.OIcon),{onClick:j},{default:i.withCtx(()=>[i.createVNode(i.unref(By))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:N},{default:i.withCtx(()=>[i.createVNode(i.unref(El))]),_:1}),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createVNode(i.unref(A.OIcon),{class:"hover-close",onClick:U[0]||(U[0]=R=>y.value="")},{default:i.withCtx(()=>[i.createVNode(i.unref(Sl))]),_:1})])):i.createCommentVNode("",!0)]),_:1},8,["modelValue","onKeydown","placeholder"]),i.createElementVNode("div",$y,[i.createVNode(i.unref(tt.ElSelect),{multiple:"",modelValue:O.value,"onUpdate:modelValue":U[3]||(U[3]=R=>O.value=R),"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(Py))]),_:1})]),header:i.withCtx(()=>[i.createVNode(i.unref(tt.ElCheckbox),{modelValue:w.value,"onUpdate:modelValue":U[2]||(U[2]=R=>w.value=R),indeterminate:P.value,onChange:K},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(k)),1)]),_:1},8,["modelValue","indeterminate"])]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(z.value,R=>(i.openBlock(),i.createBlock(i.unref(tt.ElOption),{key:R,label:R,value:R},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElCheckbox),{"model-value":O.value.includes(R)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(R),1)]),_:2},1032,["model-value"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),i.createVNode(i.unref(A.OTab),{modelValue:S.value,"onUpdate:modelValue":U[4]||(U[4]=R=>S.value=R),variant:"text",class:"captions-tab",onChange:T,"max-show":9999},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTabPane),{value:0,label:i.unref(n)("meeting.audioToText")},{default:i.withCtx(()=>[d.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(d.value,(R,X)=>(i.openBlock(),i.createBlock(i.unref(A.OCol),{flex:"0 0 100%",key:X},{default:i.withCtx(()=>[i.createElementVNode("div",{class:i.normalizeClass(["captions-item",{"captions-item-active":s.value===X+1}]),onClick:F=>b(R.start_time)},[i.createElementVNode("div",qy,[i.createElementVNode("div",zy,i.toDisplayString(R.speakerIdx),1),i.createElementVNode("div",jy,i.toDisplayString(R.speakerLabel),1),i.createElementVNode("div",Hy,i.toDisplayString(g(R.start_time)),1),s.value===X+1?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,class:"playing initial-fill"},{default:i.withCtx(()=>[i.createVNode(i.unref(wy))]),_:1})):i.createCommentVNode("",!0)]),i.withDirectives(i.createElementVNode("div",Gy,null,512),[[i.unref(e),R.contentHtml]])],10,Uy)]),_:2},1024))),128))]),_:1})]),_:1})):(i.openBlock(),i.createElementBlock("div",Wy,[i.renderSlot(B.$slots,"empty")]))]),_:3},8,["label"])]),_:3},8,["modelValue"])]))}});var fo,gc;function Ca(){if(gc)return fo;gc=1;var r;return typeof window<"u"?r=window:typeof ea<"u"?r=ea:typeof self<"u"?r=self:r={},fo=r,fo}var Xy=Ca();const G=fr(Xy),Ky={},Qy=Object.freeze(Object.defineProperty({__proto__:null,default:Ky},Symbol.toStringTag,{value:"Module"})),Zy=Cv(Qy);var po,vc;function gh(){if(vc)return po;vc=1;var r=typeof ea<"u"?ea:typeof window<"u"?window:{},e=Zy,t;return typeof document<"u"?t=document:(t=r["__GLOBAL_DOCUMENT_CACHE@4"],t||(t=r["__GLOBAL_DOCUMENT_CACHE@4"]=e)),po=t,po}var Jy=gh();const _e=fr(Jy);var Rs={exports:{}},mo={exports:{}},yc;function e_(){return yc||(yc=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})(mo)),mo.exports}var go,_c;function t_(){if(_c)return go;_c=1,go=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 go}var vo,Tc;function i_(){if(Tc)return vo;Tc=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 d=this.typeToInterceptorsMap_.get(l);return d.has(c)?!1:(d.add(c),!0)},a.removeInterceptor=function(l,c){var d=this.typeToInterceptorsMap_.get(l);return d&&d.has(c)?(d.delete(c),!0):!1},a.clearInterceptorsByType=function(l){var c=this.typeToInterceptorsMap_.get(l);return c?(this.typeToInterceptorsMap_.delete(l),this.typeToInterceptorsMap_.set(l,new Set),!0):!1},a.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},a.getForType=function(l){return this.typeToInterceptorsMap_.get(l)||new Set},a.execute=function(l,c){for(var d=this.getForType(l),g=r(d),m;!(m=g()).done;){var S=m.value;try{c=S(c)}catch{}}return c},s})();return vo=n,vo}var yo,bc;function n_(){if(bc)return yo;bc=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,d=o.fuzzFactor,g=o.initialDelay;return new e({maxAttempts:l||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:d||this.fuzzFactor_,initialDelay:g||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 yo=r,yo}var _o,xc;function r_(){if(xc)return _o;xc=1;var r=Ca(),e=function(s,a){return a===void 0&&(a=!1),function(o,l,c){if(o){s(o);return}if(l.statusCode>=400&&l.statusCode<=599){var d=c;if(a)if(r.TextDecoder){var g=t(l.headers&&l.headers["content-type"]);try{d=new TextDecoder(g).decode(c)}catch{}}else d=String.fromCharCode.apply(null,new Uint8Array(c));s({cause:d});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 _o=e,_o}var Cc;function s_(){if(Cc)return Rs.exports;Cc=1;var r=Ca(),e=e_(),t=t_(),n=i_(),s=n_();d.httpHandler=r_(),d.requestInterceptorsStorage=new n,d.responseInterceptorsStorage=new n,d.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(
|
|
13
|
-
`).forEach(function(E){var O=E.indexOf(":"),D=E.slice(0,O).trim().toLowerCase(),I=E.slice(O+1).trim();typeof y[D]>"u"?y[D]=I:Array.isArray(y[D])?y[D].push(I):y[D]=[y[D],I]}),y};Rs.exports=d,Rs.exports.default=d,d.XMLHttpRequest=r.XMLHttpRequest||S,d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],function(b){d[b==="delete"?"del":b]=function(T,y,E){return y=c(T,y,E),y.method=b.toUpperCase(),g(y)}});function o(b,T){for(var y=0;y<b.length;y++)T(b[y])}function l(b){for(var T in b)if(b.hasOwnProperty(T))return!1;return!0}function c(b,T,y){var E=b;return t(T)?(y=T,typeof b=="string"&&(E={uri:b})):E=e({},T,{uri:b}),E.callback=y,E}function d(b,T,y){return T=c(b,T,y),g(T)}function g(b){if(typeof b.callback>"u")throw new Error("callback argument missing");if(b.requestType&&d.requestInterceptorsStorage.getIsEnabled()){var T={uri:b.uri||b.url,headers:b.headers||{},body:b.body,metadata:b.metadata||{},retry:b.retry,timeout:b.timeout},y=d.requestInterceptorsStorage.execute(b.requestType,T);b.uri=y.uri,b.headers=y.headers,b.body=y.body,b.metadata=y.metadata,b.retry=y.retry,b.timeout=y.timeout}var E=!1,O=function(B,Q,Z){E||(E=!0,b.callback(B,Q,Z))};function D(){z.readyState===4&&!d.responseInterceptorsStorage.getIsEnabled()&&setTimeout($,0)}function I(){var F=void 0;if(z.response?F=z.response:F=z.responseText||m(z),U)try{F=JSON.parse(F)}catch{}return F}function H(F){if(clearTimeout(V),clearTimeout(b.retryTimeout),F instanceof Error||(F=new Error(""+(F||"Unknown XMLHttpRequest Error"))),F.statusCode=0,!j&&d.retryManager.getIsEnabled()&&b.retry&&b.retry.shouldRetry()){b.retryTimeout=setTimeout(function(){b.retry.moveToNextAttempt(),b.xhr=z,g(b)},b.retry.getCurrentFuzzedDelay());return}if(b.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var B={headers:X.headers||{},body:X.body,responseUrl:z.responseURL,responseType:z.responseType},Q=d.responseInterceptorsStorage.execute(b.requestType,B);X.body=Q.body,X.headers=Q.headers}return O(F,X)}function $(){if(!j){var F;clearTimeout(V),clearTimeout(b.retryTimeout),b.useXDR&&z.status===void 0?F=200:F=z.status===1223?204:z.status;var B=X,Q=null;if(F!==0?(B={body:I(),statusCode:F,method:w,headers:{},url:x,rawRequest:z},z.getAllResponseHeaders&&(B.headers=a(z.getAllResponseHeaders()))):Q=new Error("Internal XMLHttpRequest Error"),b.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var Z={headers:B.headers||{},body:B.body,responseUrl:z.responseURL,responseType:z.responseType},oe=d.responseInterceptorsStorage.execute(b.requestType,Z);B.body=oe.body,B.headers=oe.headers}return O(Q,B,B.body)}}var z=b.xhr||null;z||(b.cors||b.useXDR?z=new d.XDomainRequest:z=new d.XMLHttpRequest);var N,j,x=z.url=b.uri||b.url,w=z.method=b.method||"GET",P=b.body||b.data,K=z.headers=b.headers||{},L=!!b.sync,U=!1,V,X={body:void 0,headers:{},statusCode:0,method:w,url:x,rawRequest:z};if("json"in b&&b.json!==!1&&(U=!0,K.accept||K.Accept||(K.Accept="application/json"),w!=="GET"&&w!=="HEAD"&&(K["content-type"]||K["Content-Type"]||(K["Content-Type"]="application/json"),P=JSON.stringify(b.json===!0?P:b.json))),z.onreadystatechange=D,z.onload=$,z.onerror=H,z.onprogress=function(){},z.onabort=function(){j=!0,clearTimeout(b.retryTimeout)},z.ontimeout=H,z.open(w,x,!L,b.username,b.password),L||(z.withCredentials=!!b.withCredentials),!L&&b.timeout>0&&(V=setTimeout(function(){if(!j){j=!0,z.abort("timeout");var F=new Error("XMLHttpRequest timeout");F.code="ETIMEDOUT",H(F)}},b.timeout)),z.setRequestHeader)for(N in K)K.hasOwnProperty(N)&&z.setRequestHeader(N,K[N]);else if(b.headers&&!l(b.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in b&&(z.responseType=b.responseType),"beforeSend"in b&&typeof b.beforeSend=="function"&&b.beforeSend(z),z.send(P||null),z}function m(b){try{if(b.responseType==="document")return b.responseXML;var T=b.responseXML&&b.responseXML.documentElement.nodeName==="parsererror";if(b.responseType===""&&!T)return b.responseXML}catch{}return null}function S(){}return Rs.exports}var a_=s_();const vh=fr(a_);var To={exports:{}},bo,Sc;function o_(){if(Sc)return bo;Sc=1;var r=gh(),e=Object.create||(function(){function x(){}return function(w){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return x.prototype=w,new x}})();function t(x,w){this.name="ParsingError",this.code=x.code,this.message=w||x.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(x){function w(K,L,U,V){return(K|0)*3600+(L|0)*60+(U|0)+(V|0)/1e3}var P=x.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return P?P[3]?w(P[1],P[2],P[3].replace(":",""),P[4]):P[1]>59?w(P[1],P[2],0,P[4]):w(0,P[1],P[2],P[4]):null}function s(){this.values=e(null)}s.prototype={set:function(x,w){!this.get(x)&&w!==""&&(this.values[x]=w)},get:function(x,w,P){return P?this.has(x)?this.values[x]:w[P]:this.has(x)?this.values[x]:w},has:function(x){return x in this.values},alt:function(x,w,P){for(var K=0;K<P.length;++K)if(w===P[K]){this.set(x,w);break}},integer:function(x,w){/^-?\d+$/.test(w)&&this.set(x,parseInt(w,10))},percent:function(x,w){return w.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(w=parseFloat(w),w>=0&&w<=100)?(this.set(x,w),!0):!1}};function a(x,w,P,K){var L=K?x.split(K):[x];for(var U in L)if(typeof L[U]=="string"){var V=L[U].split(P);if(V.length===2){var X=V[0].trim(),F=V[1].trim();w(X,F)}}}function o(x,w,P){var K=x;function L(){var X=n(x);if(X===null)throw new t(t.Errors.BadTimeStamp,"Malformed timestamp: "+K);return x=x.replace(/^[^\sa-zA-Z-]+/,""),X}function U(X,F){var B=new s;a(X,function(Q,Z){switch(Q){case"region":for(var oe=P.length-1;oe>=0;oe--)if(P[oe].id===Z){B.set(Q,P[oe].region);break}break;case"vertical":B.alt(Q,Z,["rl","lr"]);break;case"line":var ce=Z.split(","),re=ce[0];B.integer(Q,re),B.percent(Q,re)&&B.set("snapToLines",!1),B.alt(Q,re,["auto"]),ce.length===2&&B.alt("lineAlign",ce[1],["start","center","end"]);break;case"position":ce=Z.split(","),B.percent(Q,ce[0]),ce.length===2&&B.alt("positionAlign",ce[1],["start","center","end"]);break;case"size":B.percent(Q,Z);break;case"align":B.alt(Q,Z,["start","center","end","left","right"]);break}},/:/,/\s/),F.region=B.get("region",null),F.vertical=B.get("vertical","");try{F.line=B.get("line","auto")}catch{}F.lineAlign=B.get("lineAlign","start"),F.snapToLines=B.get("snapToLines",!0),F.size=B.get("size",100);try{F.align=B.get("align","center")}catch{F.align=B.get("align","middle")}try{F.position=B.get("position","auto")}catch{F.position=B.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},F.align)}F.positionAlign=B.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},F.align)}function V(){x=x.replace(/^\s+/,"")}if(V(),w.startTime=L(),V(),x.substr(0,3)!=="-->")throw new t(t.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+K);x=x.substr(3),V(),w.endTime=L(),V(),U(x,w)}var l=r.createElement&&r.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},g={v:"title",lang:"lang"},m={rt:"ruby"};function S(x,w){function P(){if(!w)return null;function re(te){return w=w.substr(te.length),te}var ue=w.match(/^([^<]*)(<[^>]*>?)?/);return re(ue[1]?ue[1]:ue[2])}function K(re){return l.innerHTML=re,re=l.textContent,l.textContent="",re}function L(re,ue){return!m[ue.localName]||m[ue.localName]===re.localName}function U(re,ue){var te=c[re];if(!te)return null;var Ae=x.document.createElement(te),we=g[re];return we&&ue&&(Ae[we]=ue.trim()),Ae}for(var V=x.document.createElement("div"),X=V,F,B=[];(F=P())!==null;){if(F[0]==="<"){if(F[1]==="/"){B.length&&B[B.length-1]===F.substr(2).replace(">","")&&(B.pop(),X=X.parentNode);continue}var Q=n(F.substr(1,F.length-2)),Z;if(Q){Z=x.document.createProcessingInstruction("timestamp",Q),X.appendChild(Z);continue}var oe=F.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!oe||(Z=U(oe[1],oe[3]),!Z)||!L(X,Z))continue;if(oe[2]){var ce=oe[2].split(".");ce.forEach(function(re){var ue=/^bg_/.test(re),te=ue?re.slice(3):re;if(d.hasOwnProperty(te)){var Ae=ue?"background-color":"color",we=d[te];Z.style[Ae]=we}}),Z.className=ce.join(" ")}B.push(oe[1]),X.appendChild(Z),X=Z;continue}X.appendChild(x.document.createTextNode(K(F)))}return V}var b=[[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 T(x){for(var w=0;w<b.length;w++){var P=b[w];if(x>=P[0]&&x<=P[1])return!0}return!1}function y(x){var w=[],P="",K;if(!x||!x.childNodes)return"ltr";function L(X,F){for(var B=F.childNodes.length-1;B>=0;B--)X.push(F.childNodes[B])}function U(X){if(!X||!X.length)return null;var F=X.pop(),B=F.textContent||F.innerText;if(B){var Q=B.match(/^.*(\n|\r)/);return Q?(X.length=0,Q[0]):B}if(F.tagName==="ruby")return U(X);if(F.childNodes)return L(X,F),U(X)}for(L(w,x);P=U(w);)for(var V=0;V<P.length;V++)if(K=P.charCodeAt(V),T(K))return"rtl";return"ltr"}function E(x){if(typeof x.line=="number"&&(x.snapToLines||x.line>=0&&x.line<=100))return x.line;if(!x.track||!x.track.textTrackList||!x.track.textTrackList.mediaElement)return-1;for(var w=x.track,P=w.textTrackList,K=0,L=0;L<P.length&&P[L]!==w;L++)P[L].mode==="showing"&&K++;return++K*-1}function O(){}O.prototype.applyStyles=function(x,w){w=w||this.div;for(var P in x)x.hasOwnProperty(P)&&(w.style[P]=x[P])},O.prototype.formatStyle=function(x,w){return x===0?0:x+w};function D(x,w,P){O.call(this),this.cue=w,this.cueDiv=S(x,w.text);var K={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:w.vertical===""?"horizontal-tb":w.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(K,this.cueDiv),this.div=x.document.createElement("div"),K={direction:y(this.cueDiv),writingMode:w.vertical===""?"horizontal-tb":w.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:w.align==="middle"?"center":w.align,font:P.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(K),this.div.appendChild(this.cueDiv);var L=0;switch(w.positionAlign){case"start":case"line-left":L=w.position;break;case"center":L=w.position-w.size/2;break;case"end":case"line-right":L=w.position-w.size;break}w.vertical===""?this.applyStyles({left:this.formatStyle(L,"%"),width:this.formatStyle(w.size,"%")}):this.applyStyles({top:this.formatStyle(L,"%"),height:this.formatStyle(w.size,"%")}),this.move=function(U){this.applyStyles({top:this.formatStyle(U.top,"px"),bottom:this.formatStyle(U.bottom,"px"),left:this.formatStyle(U.left,"px"),right:this.formatStyle(U.right,"px"),height:this.formatStyle(U.height,"px"),width:this.formatStyle(U.width,"px")})}}D.prototype=e(O.prototype),D.prototype.constructor=D;function I(x){var w,P,K,L;if(x.div){P=x.div.offsetHeight,K=x.div.offsetWidth,L=x.div.offsetTop;var U=(U=x.div.childNodes)&&(U=U[0])&&U.getClientRects&&U.getClientRects();x=x.div.getBoundingClientRect(),w=U?Math.max(U[0]&&U[0].height||0,x.height/U.length):0}this.left=x.left,this.right=x.right,this.top=x.top||L,this.height=x.height||P,this.bottom=x.bottom||L+(x.height||P),this.width=x.width||K,this.lineHeight=w!==void 0?w:x.lineHeight}I.prototype.move=function(x,w){switch(w=w!==void 0?w:this.lineHeight,x){case"+x":this.left+=w,this.right+=w;break;case"-x":this.left-=w,this.right-=w;break;case"+y":this.top+=w,this.bottom+=w;break;case"-y":this.top-=w,this.bottom-=w;break}},I.prototype.overlaps=function(x){return this.left<x.right&&this.right>x.left&&this.top<x.bottom&&this.bottom>x.top},I.prototype.overlapsAny=function(x){for(var w=0;w<x.length;w++)if(this.overlaps(x[w]))return!0;return!1},I.prototype.within=function(x){return this.top>=x.top&&this.bottom<=x.bottom&&this.left>=x.left&&this.right<=x.right},I.prototype.overlapsOppositeAxis=function(x,w){switch(w){case"+x":return this.left<x.left;case"-x":return this.right>x.right;case"+y":return this.top<x.top;case"-y":return this.bottom>x.bottom}},I.prototype.intersectPercentage=function(x){var w=Math.max(0,Math.min(this.right,x.right)-Math.max(this.left,x.left)),P=Math.max(0,Math.min(this.bottom,x.bottom)-Math.max(this.top,x.top)),K=w*P;return K/(this.height*this.width)},I.prototype.toCSSCompatValues=function(x){return{top:this.top-x.top,bottom:x.bottom-this.bottom,left:this.left-x.left,right:x.right-this.right,height:this.height,width:this.width}},I.getSimpleBoxPosition=function(x){var w=x.div?x.div.offsetHeight:x.tagName?x.offsetHeight:0,P=x.div?x.div.offsetWidth:x.tagName?x.offsetWidth:0,K=x.div?x.div.offsetTop:x.tagName?x.offsetTop:0;x=x.div?x.div.getBoundingClientRect():x.tagName?x.getBoundingClientRect():x;var L={left:x.left,right:x.right,top:x.top||K,height:x.height||w,bottom:x.bottom||K+(x.height||w),width:x.width||P};return L};function H(x,w,P,K){function L(te,Ae){for(var we,Le=new I(te),De=1,Ve=0;Ve<Ae.length;Ve++){for(;te.overlapsOppositeAxis(P,Ae[Ve])||te.within(P)&&te.overlapsAny(K);)te.move(Ae[Ve]);if(te.within(P))return te;var Qe=te.intersectPercentage(P);De>Qe&&(we=new I(te),De=Qe),te=new I(Le)}return we||Le}var U=new I(w),V=w.cue,X=E(V),F=[];if(V.snapToLines){var B;switch(V.vertical){case"":F=["+y","-y"],B="height";break;case"rl":F=["+x","-x"],B="width";break;case"lr":F=["-x","+x"],B="width";break}var Q=U.lineHeight,Z=Q*Math.round(X),oe=P[B]+Q,ce=F[0];Math.abs(Z)>oe&&(Z=Z<0?-1:1,Z*=Math.ceil(oe/Q)*Q),X<0&&(Z+=V.vertical===""?P.height:P.width,F=F.reverse()),U.move(ce,Z)}else{var re=U.lineHeight/P.height*100;switch(V.lineAlign){case"center":X-=re/2;break;case"end":X-=re;break}switch(V.vertical){case"":w.applyStyles({top:w.formatStyle(X,"%")});break;case"rl":w.applyStyles({left:w.formatStyle(X,"%")});break;case"lr":w.applyStyles({right:w.formatStyle(X,"%")});break}F=["+y","-x","+x","-y"],U=new I(w)}var ue=L(U,F);w.move(ue.toCSSCompatValues(P))}function $(){}$.StringDecoder=function(){return{decode:function(x){if(!x)return"";if(typeof x!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(x))}}},$.convertCueToDOMTree=function(x,w){return!x||!w?null:S(x,w)};var z=.05,N="sans-serif",j="1.5%";return $.processCues=function(x,w,P){if(!x||!w||!P)return null;for(;P.firstChild;)P.removeChild(P.firstChild);var K=x.document.createElement("div");K.style.position="absolute",K.style.left="0",K.style.right="0",K.style.top="0",K.style.bottom="0",K.style.margin=j,P.appendChild(K);function L(Q){for(var Z=0;Z<Q.length;Z++)if(Q[Z].hasBeenReset||!Q[Z].displayState)return!0;return!1}if(!L(w)){for(var U=0;U<w.length;U++)K.appendChild(w[U].displayState);return}var V=[],X=I.getSimpleBoxPosition(K),F=Math.round(X.height*z*100)/100,B={font:F+"px "+N};(function(){for(var Q,Z,oe=0;oe<w.length;oe++)Z=w[oe],Q=new D(x,Z,B),K.appendChild(Q.div),H(x,Q,X,V),Z.displayState=Q.div,V.push(I.getSimpleBoxPosition(Q))})()},$.Parser=function(x,w,P){P||(P=w,w={}),w||(w={}),this.window=x,this.vttjs=w,this.state="INITIAL",this.buffer="",this.decoder=P||new TextDecoder("utf8"),this.regionList=[]},$.Parser.prototype={reportOrThrowError:function(x){if(x instanceof t)this.onparsingerror&&this.onparsingerror(x);else throw x},parse:function(x){var w=this;x&&(w.buffer+=w.decoder.decode(x,{stream:!0}));function P(){for(var Q=w.buffer,Z=0;Z<Q.length&&Q[Z]!=="\r"&&Q[Z]!==`
|
|
12
|
+
*/var a=function(b){var y={};return b&&b.trim().split(`
|
|
13
|
+
`).forEach(function(E){var I=E.indexOf(":"),O=E.slice(0,I).trim().toLowerCase(),k=E.slice(I+1).trim();typeof y[O]>"u"?y[O]=k:Array.isArray(y[O])?y[O].push(k):y[O]=[y[O],k]}),y};Rs.exports=d,Rs.exports.default=d,d.XMLHttpRequest=r.XMLHttpRequest||S,d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],function(T){d[T==="delete"?"del":T]=function(b,y,E){return y=c(b,y,E),y.method=T.toUpperCase(),g(y)}});function o(T,b){for(var y=0;y<T.length;y++)b(T[y])}function l(T){for(var b in T)if(T.hasOwnProperty(b))return!1;return!0}function c(T,b,y){var E=T;return t(b)?(y=b,typeof T=="string"&&(E={uri:T})):E=e({},b,{uri:T}),E.callback=y,E}function d(T,b,y){return b=c(T,b,y),g(b)}function g(T){if(typeof T.callback>"u")throw new Error("callback argument missing");if(T.requestType&&d.requestInterceptorsStorage.getIsEnabled()){var b={uri:T.uri||T.url,headers:T.headers||{},body:T.body,metadata:T.metadata||{},retry:T.retry,timeout:T.timeout},y=d.requestInterceptorsStorage.execute(T.requestType,b);T.uri=y.uri,T.headers=y.headers,T.body=y.body,T.metadata=y.metadata,T.retry=y.retry,T.timeout=y.timeout}var E=!1,I=function(M,Q,Z){E||(E=!0,T.callback(M,Q,Z))};function O(){j.readyState===4&&!d.responseInterceptorsStorage.getIsEnabled()&&setTimeout($,0)}function k(){var F=void 0;if(j.response?F=j.response:F=j.responseText||m(j),U)try{F=JSON.parse(F)}catch{}return F}function z(F){if(clearTimeout(R),clearTimeout(T.retryTimeout),F instanceof Error||(F=new Error(""+(F||"Unknown XMLHttpRequest Error"))),F.statusCode=0,!H&&d.retryManager.getIsEnabled()&&T.retry&&T.retry.shouldRetry()){T.retryTimeout=setTimeout(function(){T.retry.moveToNextAttempt(),T.xhr=j,g(T)},T.retry.getCurrentFuzzedDelay());return}if(T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var M={headers:X.headers||{},body:X.body,responseUrl:j.responseURL,responseType:j.responseType},Q=d.responseInterceptorsStorage.execute(T.requestType,M);X.body=Q.body,X.headers=Q.headers}return I(F,X)}function $(){if(!H){var F;clearTimeout(R),clearTimeout(T.retryTimeout),T.useXDR&&j.status===void 0?F=200:F=j.status===1223?204:j.status;var M=X,Q=null;if(F!==0?(M={body:k(),statusCode:F,method:w,headers:{},url:x,rawRequest:j},j.getAllResponseHeaders&&(M.headers=a(j.getAllResponseHeaders()))):Q=new Error("Internal XMLHttpRequest Error"),T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var Z={headers:M.headers||{},body:M.body,responseUrl:j.responseURL,responseType:j.responseType},oe=d.responseInterceptorsStorage.execute(T.requestType,Z);M.body=oe.body,M.headers=oe.headers}return I(Q,M,M.body)}}var j=T.xhr||null;j||(T.cors||T.useXDR?j=new d.XDomainRequest:j=new d.XMLHttpRequest);var N,H,x=j.url=T.uri||T.url,w=j.method=T.method||"GET",P=T.body||T.data,K=j.headers=T.headers||{},B=!!T.sync,U=!1,R,X={body:void 0,headers:{},statusCode:0,method:w,url:x,rawRequest:j};if("json"in T&&T.json!==!1&&(U=!0,K.accept||K.Accept||(K.Accept="application/json"),w!=="GET"&&w!=="HEAD"&&(K["content-type"]||K["Content-Type"]||(K["Content-Type"]="application/json"),P=JSON.stringify(T.json===!0?P:T.json))),j.onreadystatechange=O,j.onload=$,j.onerror=z,j.onprogress=function(){},j.onabort=function(){H=!0,clearTimeout(T.retryTimeout)},j.ontimeout=z,j.open(w,x,!B,T.username,T.password),B||(j.withCredentials=!!T.withCredentials),!B&&T.timeout>0&&(R=setTimeout(function(){if(!H){H=!0,j.abort("timeout");var F=new Error("XMLHttpRequest timeout");F.code="ETIMEDOUT",z(F)}},T.timeout)),j.setRequestHeader)for(N in K)K.hasOwnProperty(N)&&j.setRequestHeader(N,K[N]);else if(T.headers&&!l(T.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in T&&(j.responseType=T.responseType),"beforeSend"in T&&typeof T.beforeSend=="function"&&T.beforeSend(j),j.send(P||null),j}function m(T){try{if(T.responseType==="document")return T.responseXML;var b=T.responseXML&&T.responseXML.documentElement.nodeName==="parsererror";if(T.responseType===""&&!b)return T.responseXML}catch{}return null}function S(){}return Rs.exports}var a_=s_();const vh=fr(a_);var To={exports:{}},bo,Sc;function o_(){if(Sc)return bo;Sc=1;var r=gh(),e=Object.create||(function(){function x(){}return function(w){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return x.prototype=w,new x}})();function t(x,w){this.name="ParsingError",this.code=x.code,this.message=w||x.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(x){function w(K,B,U,R){return(K|0)*3600+(B|0)*60+(U|0)+(R|0)/1e3}var P=x.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return P?P[3]?w(P[1],P[2],P[3].replace(":",""),P[4]):P[1]>59?w(P[1],P[2],0,P[4]):w(0,P[1],P[2],P[4]):null}function s(){this.values=e(null)}s.prototype={set:function(x,w){!this.get(x)&&w!==""&&(this.values[x]=w)},get:function(x,w,P){return P?this.has(x)?this.values[x]:w[P]:this.has(x)?this.values[x]:w},has:function(x){return x in this.values},alt:function(x,w,P){for(var K=0;K<P.length;++K)if(w===P[K]){this.set(x,w);break}},integer:function(x,w){/^-?\d+$/.test(w)&&this.set(x,parseInt(w,10))},percent:function(x,w){return w.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(w=parseFloat(w),w>=0&&w<=100)?(this.set(x,w),!0):!1}};function a(x,w,P,K){var B=K?x.split(K):[x];for(var U in B)if(typeof B[U]=="string"){var R=B[U].split(P);if(R.length===2){var X=R[0].trim(),F=R[1].trim();w(X,F)}}}function o(x,w,P){var K=x;function B(){var X=n(x);if(X===null)throw new t(t.Errors.BadTimeStamp,"Malformed timestamp: "+K);return x=x.replace(/^[^\sa-zA-Z-]+/,""),X}function U(X,F){var M=new s;a(X,function(Q,Z){switch(Q){case"region":for(var oe=P.length-1;oe>=0;oe--)if(P[oe].id===Z){M.set(Q,P[oe].region);break}break;case"vertical":M.alt(Q,Z,["rl","lr"]);break;case"line":var ce=Z.split(","),re=ce[0];M.integer(Q,re),M.percent(Q,re)&&M.set("snapToLines",!1),M.alt(Q,re,["auto"]),ce.length===2&&M.alt("lineAlign",ce[1],["start","center","end"]);break;case"position":ce=Z.split(","),M.percent(Q,ce[0]),ce.length===2&&M.alt("positionAlign",ce[1],["start","center","end"]);break;case"size":M.percent(Q,Z);break;case"align":M.alt(Q,Z,["start","center","end","left","right"]);break}},/:/,/\s/),F.region=M.get("region",null),F.vertical=M.get("vertical","");try{F.line=M.get("line","auto")}catch{}F.lineAlign=M.get("lineAlign","start"),F.snapToLines=M.get("snapToLines",!0),F.size=M.get("size",100);try{F.align=M.get("align","center")}catch{F.align=M.get("align","middle")}try{F.position=M.get("position","auto")}catch{F.position=M.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},F.align)}F.positionAlign=M.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},F.align)}function R(){x=x.replace(/^\s+/,"")}if(R(),w.startTime=B(),R(),x.substr(0,3)!=="-->")throw new t(t.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+K);x=x.substr(3),R(),w.endTime=B(),R(),U(x,w)}var l=r.createElement&&r.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},g={v:"title",lang:"lang"},m={rt:"ruby"};function S(x,w){function P(){if(!w)return null;function re(te){return w=w.substr(te.length),te}var ue=w.match(/^([^<]*)(<[^>]*>?)?/);return re(ue[1]?ue[1]:ue[2])}function K(re){return l.innerHTML=re,re=l.textContent,l.textContent="",re}function B(re,ue){return!m[ue.localName]||m[ue.localName]===re.localName}function U(re,ue){var te=c[re];if(!te)return null;var Ae=x.document.createElement(te),we=g[re];return we&&ue&&(Ae[we]=ue.trim()),Ae}for(var R=x.document.createElement("div"),X=R,F,M=[];(F=P())!==null;){if(F[0]==="<"){if(F[1]==="/"){M.length&&M[M.length-1]===F.substr(2).replace(">","")&&(M.pop(),X=X.parentNode);continue}var Q=n(F.substr(1,F.length-2)),Z;if(Q){Z=x.document.createProcessingInstruction("timestamp",Q),X.appendChild(Z);continue}var oe=F.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!oe||(Z=U(oe[1],oe[3]),!Z)||!B(X,Z))continue;if(oe[2]){var ce=oe[2].split(".");ce.forEach(function(re){var ue=/^bg_/.test(re),te=ue?re.slice(3):re;if(d.hasOwnProperty(te)){var Ae=ue?"background-color":"color",we=d[te];Z.style[Ae]=we}}),Z.className=ce.join(" ")}M.push(oe[1]),X.appendChild(Z),X=Z;continue}X.appendChild(x.document.createTextNode(K(F)))}return R}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 b(x){for(var w=0;w<T.length;w++){var P=T[w];if(x>=P[0]&&x<=P[1])return!0}return!1}function y(x){var w=[],P="",K;if(!x||!x.childNodes)return"ltr";function B(X,F){for(var M=F.childNodes.length-1;M>=0;M--)X.push(F.childNodes[M])}function U(X){if(!X||!X.length)return null;var F=X.pop(),M=F.textContent||F.innerText;if(M){var Q=M.match(/^.*(\n|\r)/);return Q?(X.length=0,Q[0]):M}if(F.tagName==="ruby")return U(X);if(F.childNodes)return B(X,F),U(X)}for(B(w,x);P=U(w);)for(var R=0;R<P.length;R++)if(K=P.charCodeAt(R),b(K))return"rtl";return"ltr"}function E(x){if(typeof x.line=="number"&&(x.snapToLines||x.line>=0&&x.line<=100))return x.line;if(!x.track||!x.track.textTrackList||!x.track.textTrackList.mediaElement)return-1;for(var w=x.track,P=w.textTrackList,K=0,B=0;B<P.length&&P[B]!==w;B++)P[B].mode==="showing"&&K++;return++K*-1}function I(){}I.prototype.applyStyles=function(x,w){w=w||this.div;for(var P in x)x.hasOwnProperty(P)&&(w.style[P]=x[P])},I.prototype.formatStyle=function(x,w){return x===0?0:x+w};function O(x,w,P){I.call(this),this.cue=w,this.cueDiv=S(x,w.text);var K={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:w.vertical===""?"horizontal-tb":w.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(K,this.cueDiv),this.div=x.document.createElement("div"),K={direction:y(this.cueDiv),writingMode:w.vertical===""?"horizontal-tb":w.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:w.align==="middle"?"center":w.align,font:P.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(K),this.div.appendChild(this.cueDiv);var B=0;switch(w.positionAlign){case"start":case"line-left":B=w.position;break;case"center":B=w.position-w.size/2;break;case"end":case"line-right":B=w.position-w.size;break}w.vertical===""?this.applyStyles({left:this.formatStyle(B,"%"),width:this.formatStyle(w.size,"%")}):this.applyStyles({top:this.formatStyle(B,"%"),height:this.formatStyle(w.size,"%")}),this.move=function(U){this.applyStyles({top:this.formatStyle(U.top,"px"),bottom:this.formatStyle(U.bottom,"px"),left:this.formatStyle(U.left,"px"),right:this.formatStyle(U.right,"px"),height:this.formatStyle(U.height,"px"),width:this.formatStyle(U.width,"px")})}}O.prototype=e(I.prototype),O.prototype.constructor=O;function k(x){var w,P,K,B;if(x.div){P=x.div.offsetHeight,K=x.div.offsetWidth,B=x.div.offsetTop;var U=(U=x.div.childNodes)&&(U=U[0])&&U.getClientRects&&U.getClientRects();x=x.div.getBoundingClientRect(),w=U?Math.max(U[0]&&U[0].height||0,x.height/U.length):0}this.left=x.left,this.right=x.right,this.top=x.top||B,this.height=x.height||P,this.bottom=x.bottom||B+(x.height||P),this.width=x.width||K,this.lineHeight=w!==void 0?w:x.lineHeight}k.prototype.move=function(x,w){switch(w=w!==void 0?w:this.lineHeight,x){case"+x":this.left+=w,this.right+=w;break;case"-x":this.left-=w,this.right-=w;break;case"+y":this.top+=w,this.bottom+=w;break;case"-y":this.top-=w,this.bottom-=w;break}},k.prototype.overlaps=function(x){return this.left<x.right&&this.right>x.left&&this.top<x.bottom&&this.bottom>x.top},k.prototype.overlapsAny=function(x){for(var w=0;w<x.length;w++)if(this.overlaps(x[w]))return!0;return!1},k.prototype.within=function(x){return this.top>=x.top&&this.bottom<=x.bottom&&this.left>=x.left&&this.right<=x.right},k.prototype.overlapsOppositeAxis=function(x,w){switch(w){case"+x":return this.left<x.left;case"-x":return this.right>x.right;case"+y":return this.top<x.top;case"-y":return this.bottom>x.bottom}},k.prototype.intersectPercentage=function(x){var w=Math.max(0,Math.min(this.right,x.right)-Math.max(this.left,x.left)),P=Math.max(0,Math.min(this.bottom,x.bottom)-Math.max(this.top,x.top)),K=w*P;return K/(this.height*this.width)},k.prototype.toCSSCompatValues=function(x){return{top:this.top-x.top,bottom:x.bottom-this.bottom,left:this.left-x.left,right:x.right-this.right,height:this.height,width:this.width}},k.getSimpleBoxPosition=function(x){var w=x.div?x.div.offsetHeight:x.tagName?x.offsetHeight:0,P=x.div?x.div.offsetWidth:x.tagName?x.offsetWidth:0,K=x.div?x.div.offsetTop:x.tagName?x.offsetTop:0;x=x.div?x.div.getBoundingClientRect():x.tagName?x.getBoundingClientRect():x;var B={left:x.left,right:x.right,top:x.top||K,height:x.height||w,bottom:x.bottom||K+(x.height||w),width:x.width||P};return B};function z(x,w,P,K){function B(te,Ae){for(var we,Le=new k(te),De=1,Ve=0;Ve<Ae.length;Ve++){for(;te.overlapsOppositeAxis(P,Ae[Ve])||te.within(P)&&te.overlapsAny(K);)te.move(Ae[Ve]);if(te.within(P))return te;var Qe=te.intersectPercentage(P);De>Qe&&(we=new k(te),De=Qe),te=new k(Le)}return we||Le}var U=new k(w),R=w.cue,X=E(R),F=[];if(R.snapToLines){var M;switch(R.vertical){case"":F=["+y","-y"],M="height";break;case"rl":F=["+x","-x"],M="width";break;case"lr":F=["-x","+x"],M="width";break}var Q=U.lineHeight,Z=Q*Math.round(X),oe=P[M]+Q,ce=F[0];Math.abs(Z)>oe&&(Z=Z<0?-1:1,Z*=Math.ceil(oe/Q)*Q),X<0&&(Z+=R.vertical===""?P.height:P.width,F=F.reverse()),U.move(ce,Z)}else{var re=U.lineHeight/P.height*100;switch(R.lineAlign){case"center":X-=re/2;break;case"end":X-=re;break}switch(R.vertical){case"":w.applyStyles({top:w.formatStyle(X,"%")});break;case"rl":w.applyStyles({left:w.formatStyle(X,"%")});break;case"lr":w.applyStyles({right:w.formatStyle(X,"%")});break}F=["+y","-x","+x","-y"],U=new k(w)}var ue=B(U,F);w.move(ue.toCSSCompatValues(P))}function $(){}$.StringDecoder=function(){return{decode:function(x){if(!x)return"";if(typeof x!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(x))}}},$.convertCueToDOMTree=function(x,w){return!x||!w?null:S(x,w)};var j=.05,N="sans-serif",H="1.5%";return $.processCues=function(x,w,P){if(!x||!w||!P)return null;for(;P.firstChild;)P.removeChild(P.firstChild);var K=x.document.createElement("div");K.style.position="absolute",K.style.left="0",K.style.right="0",K.style.top="0",K.style.bottom="0",K.style.margin=H,P.appendChild(K);function B(Q){for(var Z=0;Z<Q.length;Z++)if(Q[Z].hasBeenReset||!Q[Z].displayState)return!0;return!1}if(!B(w)){for(var U=0;U<w.length;U++)K.appendChild(w[U].displayState);return}var R=[],X=k.getSimpleBoxPosition(K),F=Math.round(X.height*j*100)/100,M={font:F+"px "+N};(function(){for(var Q,Z,oe=0;oe<w.length;oe++)Z=w[oe],Q=new O(x,Z,M),K.appendChild(Q.div),z(x,Q,X,R),Z.displayState=Q.div,R.push(k.getSimpleBoxPosition(Q))})()},$.Parser=function(x,w,P){P||(P=w,w={}),w||(w={}),this.window=x,this.vttjs=w,this.state="INITIAL",this.buffer="",this.decoder=P||new TextDecoder("utf8"),this.regionList=[]},$.Parser.prototype={reportOrThrowError:function(x){if(x instanceof t)this.onparsingerror&&this.onparsingerror(x);else throw x},parse:function(x){var w=this;x&&(w.buffer+=w.decoder.decode(x,{stream:!0}));function P(){for(var Q=w.buffer,Z=0;Z<Q.length&&Q[Z]!=="\r"&&Q[Z]!==`
|
|
14
14
|
`;)++Z;var oe=Q.substr(0,Z);return Q[Z]==="\r"&&++Z,Q[Z]===`
|
|
15
|
-
`&&++Z,w.buffer=Q.substr(Z),oe}function K(Q){var Z=new s;if(a(Q,function(ce,re){switch(ce){case"id":Z.set(ce,re);break;case"width":Z.percent(ce,re);break;case"lines":Z.integer(ce,re);break;case"regionanchor":case"viewportanchor":var ue=re.split(",");if(ue.length!==2)break;var te=new s;if(te.percent("x",ue[0]),te.percent("y",ue[1]),!te.has("x")||!te.has("y"))break;Z.set(ce+"X",te.get("x")),Z.set(ce+"Y",te.get("y"));break;case"scroll":Z.alt(ce,re,["up"]);break}},/=/,/\s/),Z.has("id")){var oe=new(w.vttjs.VTTRegion||w.window.VTTRegion);oe.width=Z.get("width",100),oe.lines=Z.get("lines",3),oe.regionAnchorX=Z.get("regionanchorX",0),oe.regionAnchorY=Z.get("regionanchorY",100),oe.viewportAnchorX=Z.get("viewportanchorX",0),oe.viewportAnchorY=Z.get("viewportanchorY",100),oe.scroll=Z.get("scroll",""),w.onregion&&w.onregion(oe),w.regionList.push({id:Z.get("id"),region:oe})}}function
|
|
16
|
-
`),w.cue.text+=
|
|
15
|
+
`&&++Z,w.buffer=Q.substr(Z),oe}function K(Q){var Z=new s;if(a(Q,function(ce,re){switch(ce){case"id":Z.set(ce,re);break;case"width":Z.percent(ce,re);break;case"lines":Z.integer(ce,re);break;case"regionanchor":case"viewportanchor":var ue=re.split(",");if(ue.length!==2)break;var te=new s;if(te.percent("x",ue[0]),te.percent("y",ue[1]),!te.has("x")||!te.has("y"))break;Z.set(ce+"X",te.get("x")),Z.set(ce+"Y",te.get("y"));break;case"scroll":Z.alt(ce,re,["up"]);break}},/=/,/\s/),Z.has("id")){var oe=new(w.vttjs.VTTRegion||w.window.VTTRegion);oe.width=Z.get("width",100),oe.lines=Z.get("lines",3),oe.regionAnchorX=Z.get("regionanchorX",0),oe.regionAnchorY=Z.get("regionanchorY",100),oe.viewportAnchorX=Z.get("viewportanchorX",0),oe.viewportAnchorY=Z.get("viewportanchorY",100),oe.scroll=Z.get("scroll",""),w.onregion&&w.onregion(oe),w.regionList.push({id:Z.get("id"),region:oe})}}function B(Q){var Z=new s;a(Q,function(oe,ce){switch(oe){case"MPEGT":Z.integer(oe+"S",ce);break;case"LOCA":Z.set(oe+"L",n(ce));break}},/[^\d]:/,/,/),w.ontimestampmap&&w.ontimestampmap({MPEGTS:Z.get("MPEGTS"),LOCAL:Z.get("LOCAL")})}function U(Q){Q.match(/X-TIMESTAMP-MAP/)?a(Q,function(Z,oe){switch(Z){case"X-TIMESTAMP-MAP":B(oe);break}},/=/):a(Q,function(Z,oe){switch(Z){case"Region":K(oe);break}},/:/)}try{var R;if(w.state==="INITIAL"){if(!/\r\n|\n/.test(w.buffer))return this;R=P();var X=R.match(/^WEBVTT([ \t].*)?$/);if(!X||!X[0])throw new t(t.Errors.BadSignature);w.state="HEADER"}for(var F=!1;w.buffer;){if(!/\r\n|\n/.test(w.buffer))return this;switch(F?F=!1:R=P(),w.state){case"HEADER":/:/.test(R)?U(R):R||(w.state="ID");continue;case"NOTE":R||(w.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(R)){w.state="NOTE";break}if(!R)continue;w.cue=new(w.vttjs.VTTCue||w.window.VTTCue)(0,0,"");try{w.cue.align="center"}catch{w.cue.align="middle"}if(w.state="CUE",R.indexOf("-->")===-1){w.cue.id=R;continue}case"CUE":try{o(R,w.cue,w.regionList)}catch(Q){w.reportOrThrowError(Q),w.cue=null,w.state="BADCUE";continue}w.state="CUETEXT";continue;case"CUETEXT":var M=R.indexOf("-->")!==-1;if(!R||M&&(F=!0)){w.oncue&&w.oncue(w.cue),w.cue=null,w.state="ID";continue}w.cue.text&&(w.cue.text+=`
|
|
16
|
+
`),w.cue.text+=R.replace(/\u2028/g,`
|
|
17
17
|
`).replace(/u2029/g,`
|
|
18
|
-
`);continue;case"BADCUE":
|
|
18
|
+
`);continue;case"BADCUE":R||(w.state="ID");continue}}}catch(Q){w.reportOrThrowError(Q),w.state==="CUETEXT"&&w.cue&&w.oncue&&w.oncue(w.cue),w.cue=null,w.state=w.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var x=this;try{if(x.buffer+=x.decoder.decode(),(x.cue||x.state==="HEADER")&&(x.buffer+=`
|
|
19
19
|
|
|
20
|
-
`,x.parse()),x.state==="INITIAL")throw new t(t.Errors.BadSignature)}catch(w){x.reportOrThrowError(w)}return x.onflush&&x.onflush(),this}},bo=$,bo}var xo,Ec;function l_(){if(Ec)return xo;Ec=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 d="",g=!1,m=o,S=l,
|
|
20
|
+
`,x.parse()),x.state==="INITIAL")throw new t(t.Errors.BadSignature)}catch(w){x.reportOrThrowError(w)}return x.onflush&&x.onflush(),this}},bo=$,bo}var xo,Ec;function l_(){if(Ec)return xo;Ec=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 d="",g=!1,m=o,S=l,T=c,b=null,y="",E=!0,I="auto",O="start",k="auto",z="auto",$=100,j="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return d},set:function(N){d=""+N}},pauseOnExit:{enumerable:!0,get:function(){return g},set:function(N){g=!!N}},startTime:{enumerable:!0,get:function(){return m},set:function(N){if(typeof N!="number")throw new TypeError("Start time must be set to a number.");m=N,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return S},set:function(N){if(typeof N!="number")throw new TypeError("End time must be set to a number.");S=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 b},set:function(N){b=N,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return y},set:function(N){var H=n(N);if(H===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");y=H,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return E},set:function(N){E=!!N,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return I},set:function(N){if(typeof N!="number"&&N!==r)throw new SyntaxError("Line: an invalid number or illegal string was specified.");I=N,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return O},set:function(N){var H=s(N);H?(O=H,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return k},set:function(N){if(N<0||N>100)throw new Error("Position must be between 0 and 100.");k=N,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return z},set:function(N){var H=s(N);H?(z=H,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return $},set:function(N){if(N<0||N>100)throw new Error("Size must be between 0 and 100.");$=N,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return j},set:function(N){var H=s(N);if(!H)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");j=H,this.hasBeenReset=!0}}}),this.displayState=void 0}return a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},xo=a,xo}var Co,kc;function u_(){if(kc)return Co;kc=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,d=100,g="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(m){if(!t(m))throw new Error("Width must be between 0 and 100.");s=m}},lines:{enumerable:!0,get:function(){return a},set:function(m){if(typeof m!="number")throw new TypeError("Lines must be set to a number.");a=m}},regionAnchorY:{enumerable:!0,get:function(){return l},set:function(m){if(!t(m))throw new Error("RegionAnchorX must be between 0 and 100.");l=m}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(m){if(!t(m))throw new Error("RegionAnchorY must be between 0 and 100.");o=m}},viewportAnchorY:{enumerable:!0,get:function(){return d},set:function(m){if(!t(m))throw new Error("ViewportAnchorY must be between 0 and 100.");d=m}},viewportAnchorX:{enumerable:!0,get:function(){return c},set:function(m){if(!t(m))throw new Error("ViewportAnchorX must be between 0 and 100.");c=m}},scroll:{enumerable:!0,get:function(){return g},set:function(m){var S=e(m);S===!1?console.warn("Scroll: an invalid or illegal string was specified."):g=S}}})}return Co=n,Co}var wc;function c_(){if(wc)return To.exports;wc=1;var r=Ca(),e=To.exports={WebVTT:o_(),VTTCue:l_(),VTTRegion:u_()};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(),To.exports}var d_=c_();const Dc=fr(d_);function bt(){return bt=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},bt.apply(null,arguments)}var Ac="https://example.com",Sa=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=G.location&&G.location.href||"");var n=/^\/\//.test(e),s=!G.location&&!/\/\//i.test(e);e=new G.URL(e,G.location||Ac);var a=new URL(t,e);return s?a.href.slice(Ac.length):n?a.href.slice(a.protocol.length):a.href},wl=(function(){function r(){this.listeners={}}var e=r.prototype;return e.on=function(n,s){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(s)},e.off=function(n,s){if(!this.listeners[n])return!1;var a=this.listeners[n].indexOf(s);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(a,1),a>-1},e.trigger=function(n){var s=this.listeners[n];if(s)if(arguments.length===2)for(var a=s.length,o=0;o<a;++o)s[o].call(this,arguments[1]);else for(var l=Array.prototype.slice.call(arguments,1),c=s.length,d=0;d<c;++d)s[d].apply(this,l)},e.dispose=function(){this.listeners={}},e.pipe=function(n){this.on("data",function(s){n.push(s)})},r})(),h_=function(e){return G.atob?G.atob(e):Buffer.from(e,"base64").toString("binary")};function yh(r){for(var e=h_(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 f_ extends wl{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 p_=" ",So=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},m_=function(){const t="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+t+")")},Zt=function(r){const e={};if(!r)return e;const t=r.split(m_());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},Nc=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 g_ extends wl{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=bt(So(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=Zt(t[1]);o.URI&&(n.uri=o.URI),o.BYTERANGE&&(n.byterange=So(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=Zt(t[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Nc(n.attributes.RESOLUTION)),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))),this.trigger("data",n);return}if(t=/^#EXT-X-MEDIA:(.*)$/.exec(a),t){n={type:"tag",tagType:"media"},t[1]&&(n.attributes=Zt(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=Zt(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=Zt(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=Zt(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(p_)),this.trigger("data",n);return}if(t=/^#EXT-X-PART:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"part"},n.attributes=Zt(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=So(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=Zt(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=Zt(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=Zt(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=Zt(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=Zt(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]),d=/^\d+(\.\d+)?$/.test(n.attributes[l]);n.attributes[l]=c?n.attributes[l].toString(16):d?parseFloat(n.attributes[l]):String(n.attributes[l])}this.trigger("data",n);return}if(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=Zt(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=Zt(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=Nc(n.attributes.RESOLUTION)),n.attributes["AVERAGE-BANDWIDTH"]&&(n.attributes["AVERAGE-BANDWIDTH"]=parseInt(n.attributes["AVERAGE-BANDWIDTH"],10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),this.trigger("data",n);return}if(t=/^#EXT-X-DEFINE:(.*)$/.exec(a),t){n={type:"tag",tagType:"define"},n.attributes=Zt(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 v_=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),ln=function(r){const e={};return Object.keys(r).forEach(function(t){e[v_(t)]=r[t]}),e},Eo=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 y_ extends wl{constructor(e={}){super(),this.lineStream=new f_,this.parseStream=new g_,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(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},g="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let m=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let S=0,b=0;const T={};this.on("end",()=>{s.uri||!s.parts&&!s.preloadHints||(!s.map&&a&&(s.map=a),!s.key&&o&&(s.key=o),!s.timeline&&typeof m=="number"&&(s.timeline=m),this.manifest.preloadSegment=s)}),this.parseStream.on("data",function(y){let E,O;if(t.manifest.definitions){for(const D in t.manifest.definitions)if(y.uri&&(y.uri=y.uri.replace(`{$${D}}`,t.manifest.definitions[D])),y.attributes)for(const I in y.attributes)typeof y.attributes[I]=="string"&&(y.attributes[I]=y.attributes[I].replace(`{$${D}}`,t.manifest.definitions[D]))}({tag(){({version(){y.version&&(this.manifest.version=y.version)},"allow-cache"(){this.manifest.allowCache=y.allowed,"allowed"in y||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const D={};"length"in y&&(s.byterange=D,D.length=y.length,"offset"in y||(y.offset=S)),"offset"in y&&(s.byterange=D,D.offset=y.offset),S=D.offset+D.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"})),y.title&&(s.title=y.title),y.duration>0&&(s.duration=y.duration),y.duration===0&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(!y.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(y.attributes.METHOD==="NONE"){o=null;return}if(!y.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(y.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:y.attributes};return}if(y.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:y.attributes.URI};return}if(y.attributes.KEYFORMAT===g){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(y.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(y.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),y.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(y.attributes.KEYID&&y.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:y.attributes.KEYFORMAT,keyId:y.attributes.KEYID.substring(2)},pssh:yh(y.attributes.URI.split(",")[1])};return}y.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:y.attributes.METHOD||"AES-128",uri:y.attributes.URI},typeof y.attributes.IV<"u"&&(o.iv=y.attributes.IV)},"media-sequence"(){if(!isFinite(y.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+y.number});return}this.manifest.mediaSequence=y.number},"discontinuity-sequence"(){if(!isFinite(y.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+y.number});return}this.manifest.discontinuitySequence=y.number,m=y.number},"playlist-type"(){if(!/VOD|EVENT/.test(y.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+y.playlist});return}this.manifest.playlistType=y.playlistType},map(){a={},y.uri&&(a.uri=y.uri),y.byterange&&(a.byterange=y.byterange),o&&(a.key=o)},"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||d,!y.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}s.attributes||(s.attributes={}),bt(s.attributes,y.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,!(y.attributes&&y.attributes.TYPE&&y.attributes["GROUP-ID"]&&y.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const D=this.manifest.mediaGroups[y.attributes.TYPE];D[y.attributes["GROUP-ID"]]=D[y.attributes["GROUP-ID"]]||{},E=D[y.attributes["GROUP-ID"]],O={default:/yes/i.test(y.attributes.DEFAULT)},O.default?O.autoselect=!0:O.autoselect=/yes/i.test(y.attributes.AUTOSELECT),y.attributes.LANGUAGE&&(O.language=y.attributes.LANGUAGE),y.attributes.URI&&(O.uri=y.attributes.URI),y.attributes["INSTREAM-ID"]&&(O.instreamId=y.attributes["INSTREAM-ID"]),y.attributes.CHARACTERISTICS&&(O.characteristics=y.attributes.CHARACTERISTICS),y.attributes.FORCED&&(O.forced=/yes/i.test(y.attributes.FORCED)),E[y.attributes.NAME]=O},discontinuity(){m+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=y.dateTimeString,this.manifest.dateTimeObject=y.dateTimeObject),s.dateTimeString=y.dateTimeString,s.dateTimeObject=y.dateTimeObject;const{lastProgramDateTime:D}=this;this.lastProgramDateTime=new Date(y.dateTimeString).getTime(),D===null&&this.manifest.segments.reduceRight((I,H)=>(H.programDateTime=I-H.duration*1e3,H.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(y.duration)||y.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+y.duration});return}this.manifest.targetDuration=y.duration,Eo.call(this,this.manifest)},start(){if(!y.attributes||isNaN(y.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:y.attributes["TIME-OFFSET"],precise:y.attributes.PRECISE}},"cue-out"(){s.cueOut=y.data},"cue-out-cont"(){s.cueOutCont=y.data},"cue-in"(){s.cueIn=y.data},skip(){this.manifest.skip=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",y.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const D=this.manifest.segments.length,I=ln(y.attributes);s.parts=s.parts||[],s.parts.push(I),I.byterange&&(I.byterange.hasOwnProperty("offset")||(I.byterange.offset=b),b=I.byterange.offset+I.byterange.length);const H=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${H} for segment #${D}`,y.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(($,z)=>{$.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${z} lacks required attribute(s): LAST-PART`})})},"server-control"(){const D=this.manifest.serverControl=ln(y.attributes);D.hasOwnProperty("canBlockReload")||(D.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Eo.call(this,this.manifest),D.canSkipDateranges&&!D.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 D=this.manifest.segments.length,I=ln(y.attributes),H=I.type&&I.type==="PART";s.preloadHints=s.preloadHints||[],s.preloadHints.push(I),I.byterange&&(I.byterange.hasOwnProperty("offset")||(I.byterange.offset=H?b:0,H&&(b=I.byterange.offset+I.byterange.length)));const $=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${$} for segment #${D}`,y.attributes,["TYPE","URI"]),!!I.type)for(let z=0;z<s.preloadHints.length-1;z++){const N=s.preloadHints[z];N.type&&N.type===I.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${$} for segment #${D} has the same TYPE ${I.type} as preload hint #${z}`})}},"rendition-report"(){const D=ln(y.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(D);const I=this.manifest.renditionReports.length-1,H=["LAST-MSN","URI"];l&&H.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${I}`,y.attributes,H)},"part-inf"(){this.manifest.partInf=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",y.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Eo.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ln(y.attributes));const D=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${D}`,y.attributes,["ID","START-DATE"]);const I=this.manifest.dateRanges[D];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 H=!!I.endOnNext;if(H&&!I.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),H&&(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 z=I.startDate.getTime()+I.duration*1e3;this.manifest.dateRanges[D].endDate=new Date(z)}if(!T[I.id])T[I.id]=I;else{for(const z in T[I.id])if(I[z]&&JSON.stringify(T[I.id][z])!==JSON.stringify(I[z])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const $=this.manifest.dateRanges.findIndex(z=>z.id===I.id);this.manifest.dateRanges[$]=bt(this.manifest.dateRanges[$],I),T[I.id]=bt(T[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=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",y.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const D=(I,H)=>{if(I in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${I}`});return}this.manifest.definitions[I]=H};if("QUERYPARAM"in y.attributes){if("NAME"in y.attributes||"IMPORT"in y.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const I=this.params.get(y.attributes.QUERYPARAM);if(!I){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${y.attributes.QUERYPARAM}`});return}D(y.attributes.QUERYPARAM,decodeURIComponent(I));return}if("NAME"in y.attributes){if("IMPORT"in y.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in y.attributes)||typeof y.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${y.attributes.NAME}`});return}D(y.attributes.NAME,y.attributes.VALUE);return}if("IMPORT"in y.attributes){if(!this.mainDefinitions[y.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${y.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}D(y.attributes.IMPORT,this.mainDefinitions[y.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:y.attributes,uri:y.uri,timeline:m}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",y.attributes,["BANDWIDTH","URI"])}}[y.tagType]||c).call(t)},uri(){s.uri=y.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=m,a&&(s.map=a),b=0,this.lastProgramDateTime!==null&&(s.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=s.duration*1e3),s={}},comment(){},custom(){y.segment?(s.custom=s.custom||{},s.custom[y.customType]=y.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[y.customType]=y.data)}})[y.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^/},__=["video","audio","text"],Ic=["Video","Audio","Text"],_h=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})},Ri=function(e){e===void 0&&(e="");var t=e.split(","),n=[];return t.forEach(function(s){s=s.trim();var a;__.forEach(function(o){var l=Bn[o].exec(s.toLowerCase());if(!(!l||l.length<=1)){a=o;var c=s.substring(0,l[1].length),d=s.replace(c,"");n.push({type:c,details:d,mediaType:o})}}),a||n.push({type:s,details:"",mediaType:"unknown"})}),n},T_=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 Ri(a.playlists[0].attributes.CODECS)}return null},Th=function(e){return e===void 0&&(e=""),Bn.audio.test(e.trim().toLowerCase())},b_=function(e){return e===void 0&&(e=""),Bn.text.test(e.trim().toLowerCase())},rr=function(e){if(!(!e||typeof e!="string")){var t=e.toLowerCase().split(",").map(function(a){return _h(a.trim())}),n="video";t.length===1&&Th(t[0])?n="audio":t.length===1&&b_(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+'"'}},Xr=function(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),G.MediaSource&&G.MediaSource.isTypeSupported&&G.MediaSource.isTypeSupported(rr(e))||t&&G.ManagedMediaSource&&G.ManagedMediaSource.isTypeSupported&&G.ManagedMediaSource.isTypeSupported(rr(e))||!1},ko=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(t){t=t.trim();for(var n=0;n<Ic.length;n++){var s=Ic[n];if(Bn["muxer"+s].test(t))return!0}return!1})},Oc="mp4a.40.2",x_="avc1.4d400d",C_=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,S_=/^application\/dash\+xml/i,bh=function(e){return C_.test(e)?"hls":S_.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},E_=function(e){return e.toString(2).length},k_=function(e){return Math.ceil(E_(e)/8)},xh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},w_=function(e){return xh(e)},Pe=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!w_(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))},$t=G.BigInt||Number,Qo=[$t("0x1"),$t("0x100"),$t("0x10000"),$t("0x1000000"),$t("0x100000000"),$t("0x10000000000"),$t("0x1000000000000"),$t("0x100000000000000"),$t("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 D_=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",d=e[c]?e[c]:Array.prototype[c],g=d.call(e,function(S,b,T){var y=l?T:Math.abs(T+1-e.length);return S+$t(b)*Qo[y]},$t(0));if(a){var m=Qo[e.length]/$t(2)-$t(1);g=$t(g),g>m&&(g-=m,g-=m,g-=$t(2))}return Number(g)},A_=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=$t(e);for(var o=k_(e),l=new Uint8Array(new ArrayBuffer(o)),c=0;c<o;c++){var d=a?c:Math.abs(c+1-l.length);l[d]=Number(e/Qo[c]&$t(255)),e<0&&(l[d]=Math.abs(~l[d]),l[d]-=c===0?1:2)}return l},Ch=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},N_=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,d){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 d=t.every?t.every:Array.prototype.every;return t.length&&e.length-o>=t.length&&d.call(t,function(g,m){var S=c[m]?c[m]&e[o+m]:e[o+m];return g===S})},I_=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)}})},$r={},Ki={},kn={},Bc;function Ea(){if(Bc)return kn;Bc=1;function r(a,o,l){if(l===void 0&&(l=Array.prototype),a&&typeof l.find=="function")return l.find.call(a,o);for(var c=0;c<a.length;c++)if(Object.prototype.hasOwnProperty.call(a,c)){var d=a[c];if(o.call(void 0,d,c,a))return d}}function e(a,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(a):a}function 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 Lc;function Sh(){if(Lc)return Ki;Lc=1;var r=Ea(),e=r.find,t=r.NAMESPACE;function n(C){return C!==""}function s(C){return C?C.split(/[\t\n\f\r ]+/).filter(n):[]}function a(C,k){return C.hasOwnProperty(k)||(C[k]=!0),C}function o(C){if(!C)return[];var k=s(C);return Object.keys(k.reduce(a,{}))}function l(C){return function(k){return C&&C.indexOf(k)!==-1}}function c(C,k){for(var Y in C)Object.prototype.hasOwnProperty.call(C,Y)&&(k[Y]=C[Y])}function d(C,k){var Y=C.prototype;if(!(Y instanceof k)){let le=function(){};le.prototype=k.prototype,le=new le,c(Y,le),C.prototype=Y=le}Y.constructor!=C&&(typeof C!="function"&&console.error("unknown Class:"+C),Y.constructor=C)}var g={},m=g.ELEMENT_NODE=1,S=g.ATTRIBUTE_NODE=2,b=g.TEXT_NODE=3,T=g.CDATA_SECTION_NODE=4,y=g.ENTITY_REFERENCE_NODE=5,E=g.ENTITY_NODE=6,O=g.PROCESSING_INSTRUCTION_NODE=7,D=g.COMMENT_NODE=8,I=g.DOCUMENT_NODE=9,H=g.DOCUMENT_TYPE_NODE=10,$=g.DOCUMENT_FRAGMENT_NODE=11,z=g.NOTATION_NODE=12,N={},j={};N.INDEX_SIZE_ERR=(j[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=(j[2]="DOMString size error",2);var x=N.HIERARCHY_REQUEST_ERR=(j[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=(j[4]="Wrong document",4);var w=N.INVALID_CHARACTER_ERR=(j[5]="Invalid character",5);N.NO_DATA_ALLOWED_ERR=(j[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=(j[7]="No modification allowed",7);var P=N.NOT_FOUND_ERR=(j[8]="Not found",8);N.NOT_SUPPORTED_ERR=(j[9]="Not supported",9);var K=N.INUSE_ATTRIBUTE_ERR=(j[10]="Attribute in use",10);N.INVALID_STATE_ERR=(j[11]="Invalid state",11),N.SYNTAX_ERR=(j[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=(j[13]="Invalid modification",13),N.NAMESPACE_ERR=(j[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=(j[15]="Invalid access",15);function L(C,k){if(k instanceof Error)var Y=k;else Y=this,Error.call(this,j[C]),this.message=j[C],Error.captureStackTrace&&Error.captureStackTrace(this,L);return Y.code=C,k&&(this.message=this.message+": "+k),Y}L.prototype=Error.prototype,c(N,L);function U(){}U.prototype={length:0,item:function(C){return C>=0&&C<this.length?this[C]:null},toString:function(C,k){for(var Y=[],le=0;le<this.length;le++)Rt(this[le],Y,C,k);return Y.join("")},filter:function(C){return Array.prototype.filter.call(this,C)},indexOf:function(C){return Array.prototype.indexOf.call(this,C)}};function V(C,k){this._node=C,this._refresh=k,X(this)}function X(C){var k=C._node._inc||C._node.ownerDocument._inc;if(C._inc!==k){var Y=C._refresh(C._node);if(Wi(C,"length",Y.length),!C.$$length||Y.length<C.$$length)for(var le=Y.length;le in C;le++)Object.prototype.hasOwnProperty.call(C,le)&&delete C[le];c(Y,C),C._inc=k}}V.prototype.item=function(C){return X(this),this[C]||null},d(V,U);function F(){}function B(C,k){for(var Y=C.length;Y--;)if(C[Y]===k)return Y}function Q(C,k,Y,le){if(le?k[B(k,le)]=Y:k[k.length++]=Y,C){Y.ownerElement=C;var ye=C.ownerDocument;ye&&(le&&we(ye,C,le),Ae(ye,C,Y))}}function Z(C,k,Y){var le=B(k,Y);if(le>=0){for(var ye=k.length-1;le<ye;)k[le]=k[++le];if(k.length=ye,C){var Ne=C.ownerDocument;Ne&&(we(Ne,C,Y),Y.ownerElement=null)}}else throw new L(P,new Error(C.tagName+"@"+Y))}F.prototype={length:0,item:U.prototype.item,getNamedItem:function(C){for(var k=this.length;k--;){var Y=this[k];if(Y.nodeName==C)return Y}},setNamedItem:function(C){var k=C.ownerElement;if(k&&k!=this._ownerElement)throw new L(K);var Y=this.getNamedItem(C.nodeName);return Q(this._ownerElement,this,C,Y),Y},setNamedItemNS:function(C){var k=C.ownerElement,Y;if(k&&k!=this._ownerElement)throw new L(K);return Y=this.getNamedItemNS(C.namespaceURI,C.localName),Q(this._ownerElement,this,C,Y),Y},removeNamedItem:function(C){var k=this.getNamedItem(C);return Z(this._ownerElement,this,k),k},removeNamedItemNS:function(C,k){var Y=this.getNamedItemNS(C,k);return Z(this._ownerElement,this,Y),Y},getNamedItemNS:function(C,k){for(var Y=this.length;Y--;){var le=this[Y];if(le.localName==k&&le.namespaceURI==C)return le}return null}};function oe(){}oe.prototype={hasFeature:function(C,k){return!0},createDocument:function(C,k,Y){var le=new te;if(le.implementation=this,le.childNodes=new U,le.doctype=Y||null,Y&&le.appendChild(Y),k){var ye=le.createElementNS(C,k);le.appendChild(ye)}return le},createDocumentType:function(C,k,Y){var le=new Se;return le.name=C,le.nodeName=C,le.publicId=k||"",le.systemId=Y||"",le}};function ce(){}ce.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(C,k){return Te(this,C,k)},replaceChild:function(C,k){Te(this,C,k,Ee),k&&this.removeChild(k)},removeChild:function(C){return De(this,C)},appendChild:function(C){return this.insertBefore(C,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(C){return Ut(this.ownerDocument||this,this,C)},normalize:function(){for(var C=this.firstChild;C;){var k=C.nextSibling;k&&k.nodeType==b&&C.nodeType==b?(this.removeChild(k),C.appendData(k.data)):(C.normalize(),C=k)}},isSupported:function(C,k){return this.ownerDocument.implementation.hasFeature(C,k)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(C){for(var k=this;k;){var Y=k._nsMap;if(Y){for(var le in Y)if(Object.prototype.hasOwnProperty.call(Y,le)&&Y[le]===C)return le}k=k.nodeType==S?k.ownerDocument:k.parentNode}return null},lookupNamespaceURI:function(C){for(var k=this;k;){var Y=k._nsMap;if(Y&&Object.prototype.hasOwnProperty.call(Y,C))return Y[C];k=k.nodeType==S?k.ownerDocument:k.parentNode}return null},isDefaultNamespace:function(C){var k=this.lookupPrefix(C);return k==null}};function re(C){return C=="<"&&"<"||C==">"&&">"||C=="&"&&"&"||C=='"'&&"""||"&#"+C.charCodeAt()+";"}c(g,ce),c(g,ce.prototype);function ue(C,k){if(k(C))return!0;if(C=C.firstChild)do if(ue(C,k))return!0;while(C=C.nextSibling)}function te(){this.ownerDocument=this}function Ae(C,k,Y){C&&C._inc++;var le=Y.namespaceURI;le===t.XMLNS&&(k._nsMap[Y.prefix?Y.localName:""]=Y.value)}function we(C,k,Y,le){C&&C._inc++;var ye=Y.namespaceURI;ye===t.XMLNS&&delete k._nsMap[Y.prefix?Y.localName:""]}function Le(C,k,Y){if(C&&C._inc){C._inc++;var le=k.childNodes;if(Y)le[le.length++]=Y;else{for(var ye=k.firstChild,Ne=0;ye;)le[Ne++]=ye,ye=ye.nextSibling;le.length=Ne,delete le[le.length]}}}function De(C,k){var Y=k.previousSibling,le=k.nextSibling;return Y?Y.nextSibling=le:C.firstChild=le,le?le.previousSibling=Y:C.lastChild=Y,k.parentNode=null,k.previousSibling=null,k.nextSibling=null,Le(C.ownerDocument,C),k}function Ve(C){return C&&(C.nodeType===ce.DOCUMENT_NODE||C.nodeType===ce.DOCUMENT_FRAGMENT_NODE||C.nodeType===ce.ELEMENT_NODE)}function Qe(C){return C&&($e(C)||Ge(C)||et(C)||C.nodeType===ce.DOCUMENT_FRAGMENT_NODE||C.nodeType===ce.COMMENT_NODE||C.nodeType===ce.PROCESSING_INSTRUCTION_NODE)}function et(C){return C&&C.nodeType===ce.DOCUMENT_TYPE_NODE}function $e(C){return C&&C.nodeType===ce.ELEMENT_NODE}function Ge(C){return C&&C.nodeType===ce.TEXT_NODE}function xt(C,k){var Y=C.childNodes||[];if(e(Y,$e)||et(k))return!1;var le=e(Y,et);return!(k&&le&&Y.indexOf(le)>Y.indexOf(k))}function Ie(C,k){var Y=C.childNodes||[];function le(Ne){return $e(Ne)&&Ne!==k}if(e(Y,le))return!1;var ye=e(Y,et);return!(k&&ye&&Y.indexOf(ye)>Y.indexOf(k))}function St(C,k,Y){if(!Ve(C))throw new L(x,"Unexpected parent node type "+C.nodeType);if(Y&&Y.parentNode!==C)throw new L(P,"child not in parent");if(!Qe(k)||et(k)&&C.nodeType!==ce.DOCUMENT_NODE)throw new L(x,"Unexpected node type "+k.nodeType+" for parent node type "+C.nodeType)}function lt(C,k,Y){var le=C.childNodes||[],ye=k.childNodes||[];if(k.nodeType===ce.DOCUMENT_FRAGMENT_NODE){var Ne=ye.filter($e);if(Ne.length>1||e(ye,Ge))throw new L(x,"More than one element or text in fragment");if(Ne.length===1&&!xt(C,Y))throw new L(x,"Element in fragment can not be inserted before doctype")}if($e(k)&&!xt(C,Y))throw new L(x,"Only one element can be added and only after doctype");if(et(k)){if(e(le,et))throw new L(x,"Only one doctype is allowed");var Je=e(le,$e);if(Y&&le.indexOf(Je)<le.indexOf(Y))throw new L(x,"Doctype can only be inserted before an element");if(!Y&&Je)throw new L(x,"Doctype can not be appended since element is present")}}function Ee(C,k,Y){var le=C.childNodes||[],ye=k.childNodes||[];if(k.nodeType===ce.DOCUMENT_FRAGMENT_NODE){var Ne=ye.filter($e);if(Ne.length>1||e(ye,Ge))throw new L(x,"More than one element or text in fragment");if(Ne.length===1&&!Ie(C,Y))throw new L(x,"Element in fragment can not be inserted before doctype")}if($e(k)&&!Ie(C,Y))throw new L(x,"Only one element can be added and only after doctype");if(et(k)){if(e(le,function(Yt){return et(Yt)&&Yt!==Y}))throw new L(x,"Only one doctype is allowed");var Je=e(le,$e);if(Y&&le.indexOf(Je)<le.indexOf(Y))throw new L(x,"Doctype can only be inserted before an element")}}function Te(C,k,Y,le){St(C,k,Y),C.nodeType===ce.DOCUMENT_NODE&&(le||lt)(C,k,Y);var ye=k.parentNode;if(ye&&ye.removeChild(k),k.nodeType===$){var Ne=k.firstChild;if(Ne==null)return k;var Je=k.lastChild}else Ne=Je=k;var kt=Y?Y.previousSibling:C.lastChild;Ne.previousSibling=kt,Je.nextSibling=Y,kt?kt.nextSibling=Ne:C.firstChild=Ne,Y==null?C.lastChild=Je:Y.previousSibling=Je;do{Ne.parentNode=C;var Yt=C.ownerDocument||C;me(Ne,Yt)}while(Ne!==Je&&(Ne=Ne.nextSibling));return Le(C.ownerDocument||C,C),k.nodeType==$&&(k.firstChild=k.lastChild=null),k}function me(C,k){if(C.ownerDocument!==k){if(C.ownerDocument=k,C.nodeType===m&&C.attributes)for(var Y=0;Y<C.attributes.length;Y++){var le=C.attributes.item(Y);le&&(le.ownerDocument=k)}for(var ye=C.firstChild;ye;)me(ye,k),ye=ye.nextSibling}}function Fe(C,k){k.parentNode&&k.parentNode.removeChild(k),k.parentNode=C,k.previousSibling=C.lastChild,k.nextSibling=null,k.previousSibling?k.previousSibling.nextSibling=k:C.firstChild=k,C.lastChild=k,Le(C.ownerDocument,C,k);var Y=C.ownerDocument||C;return me(k,Y),k}te.prototype={nodeName:"#document",nodeType:I,doctype:null,documentElement:null,_inc:1,insertBefore:function(C,k){if(C.nodeType==$){for(var Y=C.firstChild;Y;){var le=Y.nextSibling;this.insertBefore(Y,k),Y=le}return C}return Te(this,C,k),me(C,this),this.documentElement===null&&C.nodeType===m&&(this.documentElement=C),C},removeChild:function(C){return this.documentElement==C&&(this.documentElement=null),De(this,C)},replaceChild:function(C,k){Te(this,C,k,Ee),me(C,this),k&&this.removeChild(k),$e(C)&&(this.documentElement=C)},importNode:function(C,k){return ci(this,C,k)},getElementById:function(C){var k=null;return ue(this.documentElement,function(Y){if(Y.nodeType==m&&Y.getAttribute("id")==C)return k=Y,!0}),k},getElementsByClassName:function(C){var k=o(C);return new V(this,function(Y){var le=[];return k.length>0&&ue(Y.documentElement,function(ye){if(ye!==Y&&ye.nodeType===m){var Ne=ye.getAttribute("class");if(Ne){var Je=C===Ne;if(!Je){var kt=o(Ne);Je=k.every(l(kt))}Je&&le.push(ye)}}}),le})},createElement:function(C){var k=new qe;k.ownerDocument=this,k.nodeName=C,k.tagName=C,k.localName=C,k.childNodes=new U;var Y=k.attributes=new F;return Y._ownerElement=k,k},createDocumentFragment:function(){var C=new Nt;return C.ownerDocument=this,C.childNodes=new U,C},createTextNode:function(C){var k=new ie;return k.ownerDocument=this,k.appendData(C),k},createComment:function(C){var k=new ne;return k.ownerDocument=this,k.appendData(C),k},createCDATASection:function(C){if(C.indexOf("]]>")!==-1)throw new L(w,'data contains "]]>"');var k=new se;return k.ownerDocument=this,k.appendData(C),k},createProcessingInstruction:function(C,k){var Y=new ft;return Y.ownerDocument=this,Y.tagName=Y.nodeName=Y.target=C,Y.nodeValue=Y.data=k,Y},createAttribute:function(C){var k=new gt;return k.ownerDocument=this,k.name=C,k.nodeName=C,k.localName=C,k.specified=!0,k},createEntityReference:function(C){var k=new Oe;return k.ownerDocument=this,k.nodeName=C,k},createElementNS:function(C,k){var Y=new qe,le=k.split(":"),ye=Y.attributes=new F;return Y.childNodes=new U,Y.ownerDocument=this,Y.nodeName=k,Y.tagName=k,Y.namespaceURI=C,le.length==2?(Y.prefix=le[0],Y.localName=le[1]):Y.localName=k,ye._ownerElement=Y,Y},createAttributeNS:function(C,k){var Y=new gt,le=k.split(":");return Y.ownerDocument=this,Y.nodeName=k,Y.name=k,Y.namespaceURI=C,Y.specified=!0,le.length==2?(Y.prefix=le[0],Y.localName=le[1]):Y.localName=k,Y}},d(te,ce);function qe(){this._nsMap={}}qe.prototype={nodeType:m,hasAttribute:function(C){return this.getAttributeNode(C)!=null},getAttribute:function(C){var k=this.getAttributeNode(C);return k&&k.value||""},getAttributeNode:function(C){return this.attributes.getNamedItem(C)},setAttribute:function(C,k){var Y=this.ownerDocument.createAttribute(C);Y.value=Y.nodeValue=""+k,this.setAttributeNode(Y)},removeAttribute:function(C){var k=this.getAttributeNode(C);k&&this.removeAttributeNode(k)},appendChild:function(C){return C.nodeType===$?this.insertBefore(C,null):Fe(this,C)},setAttributeNode:function(C){return this.attributes.setNamedItem(C)},setAttributeNodeNS:function(C){return this.attributes.setNamedItemNS(C)},removeAttributeNode:function(C){return this.attributes.removeNamedItem(C.nodeName)},removeAttributeNS:function(C,k){var Y=this.getAttributeNodeNS(C,k);Y&&this.removeAttributeNode(Y)},hasAttributeNS:function(C,k){return this.getAttributeNodeNS(C,k)!=null},getAttributeNS:function(C,k){var Y=this.getAttributeNodeNS(C,k);return Y&&Y.value||""},setAttributeNS:function(C,k,Y){var le=this.ownerDocument.createAttributeNS(C,k);le.value=le.nodeValue=""+Y,this.setAttributeNode(le)},getAttributeNodeNS:function(C,k){return this.attributes.getNamedItemNS(C,k)},getElementsByTagName:function(C){return new V(this,function(k){var Y=[];return ue(k,function(le){le!==k&&le.nodeType==m&&(C==="*"||le.tagName==C)&&Y.push(le)}),Y})},getElementsByTagNameNS:function(C,k){return new V(this,function(Y){var le=[];return ue(Y,function(ye){ye!==Y&&ye.nodeType===m&&(C==="*"||ye.namespaceURI===C)&&(k==="*"||ye.localName==k)&&le.push(ye)}),le})}},te.prototype.getElementsByTagName=qe.prototype.getElementsByTagName,te.prototype.getElementsByTagNameNS=qe.prototype.getElementsByTagNameNS,d(qe,ce);function gt(){}gt.prototype.nodeType=S,d(gt,ce);function Et(){}Et.prototype={data:"",substringData:function(C,k){return this.data.substring(C,C+k)},appendData:function(C){C=this.data+C,this.nodeValue=this.data=C,this.length=C.length},insertData:function(C,k){this.replaceData(C,0,k)},appendChild:function(C){throw new Error(j[x])},deleteData:function(C,k){this.replaceData(C,k,"")},replaceData:function(C,k,Y){var le=this.data.substring(0,C),ye=this.data.substring(C+k);Y=le+Y+ye,this.nodeValue=this.data=Y,this.length=Y.length}},d(Et,ce);function ie(){}ie.prototype={nodeName:"#text",nodeType:b,splitText:function(C){var k=this.data,Y=k.substring(C);k=k.substring(0,C),this.data=this.nodeValue=k,this.length=k.length;var le=this.ownerDocument.createTextNode(Y);return this.parentNode&&this.parentNode.insertBefore(le,this.nextSibling),le}},d(ie,Et);function ne(){}ne.prototype={nodeName:"#comment",nodeType:D},d(ne,Et);function se(){}se.prototype={nodeName:"#cdata-section",nodeType:T},d(se,Et);function Se(){}Se.prototype.nodeType=H,d(Se,ce);function pe(){}pe.prototype.nodeType=z,d(pe,ce);function Ke(){}Ke.prototype.nodeType=E,d(Ke,ce);function Oe(){}Oe.prototype.nodeType=y,d(Oe,ce);function Nt(){}Nt.prototype.nodeName="#document-fragment",Nt.prototype.nodeType=$,d(Nt,ce);function ft(){}ft.prototype.nodeType=O,d(ft,ce);function ui(){}ui.prototype.serializeToString=function(C,k,Y){return It.call(C,k,Y)},ce.prototype.toString=It;function It(C,k){var Y=[],le=this.nodeType==9&&this.documentElement||this,ye=le.prefix,Ne=le.namespaceURI;if(Ne&&ye==null){var ye=le.lookupPrefix(Ne);if(ye==null)var Je=[{namespace:Ne,prefix:null}]}return Rt(this,Y,C,k,Je),Y.join("")}function Wt(C,k,Y){var le=C.prefix||"",ye=C.namespaceURI;if(!ye||le==="xml"&&ye===t.XML||ye===t.XMLNS)return!1;for(var Ne=Y.length;Ne--;){var Je=Y[Ne];if(Je.prefix===le)return Je.namespace!==ye}return!0}function Ot(C,k,Y){C.push(" ",k,'="',Y.replace(/[<>&"\t\n\r]/g,re),'"')}function Rt(C,k,Y,le,ye){if(ye||(ye=[]),le)if(C=le(C),C){if(typeof C=="string"){k.push(C);return}}else return;switch(C.nodeType){case m:var Ne=C.attributes,Je=Ne.length,at=C.firstChild,kt=C.tagName;Y=t.isHTML(C.namespaceURI)||Y;var Yt=kt;if(!Y&&!C.prefix&&C.namespaceURI){for(var qt,Vt=0;Vt<Ne.length;Vt++)if(Ne.item(Vt).name==="xmlns"){qt=Ne.item(Vt).value;break}if(!qt)for(var ni=ye.length-1;ni>=0;ni--){var Ye=ye[ni];if(Ye.prefix===""&&Ye.namespace===C.namespaceURI){qt=Ye.namespace;break}}if(qt!==C.namespaceURI)for(var ni=ye.length-1;ni>=0;ni--){var Ye=ye[ni];if(Ye.namespace===C.namespaceURI){Ye.prefix&&(Yt=Ye.prefix+":"+kt);break}}}k.push("<",Yt);for(var ri=0;ri<Je;ri++){var Xt=Ne.item(ri);Xt.prefix=="xmlns"?ye.push({prefix:Xt.localName,namespace:Xt.value}):Xt.nodeName=="xmlns"&&ye.push({prefix:"",namespace:Xt.value})}for(var ri=0;ri<Je;ri++){var Xt=Ne.item(ri);if(Wt(Xt,Y,ye)){var Kt=Xt.prefix||"",wt=Xt.namespaceURI;Ot(k,Kt?"xmlns:"+Kt:"xmlns",wt),ye.push({prefix:Kt,namespace:wt})}Rt(Xt,k,Y,le,ye)}if(kt===Yt&&Wt(C,Y,ye)){var Kt=C.prefix||"",wt=C.namespaceURI;Ot(k,Kt?"xmlns:"+Kt:"xmlns",wt),ye.push({prefix:Kt,namespace:wt})}if(at||Y&&!/^(?:meta|link|img|br|hr|input)$/i.test(kt)){if(k.push(">"),Y&&/^script$/i.test(kt))for(;at;)at.data?k.push(at.data):Rt(at,k,Y,le,ye.slice()),at=at.nextSibling;else for(;at;)Rt(at,k,Y,le,ye.slice()),at=at.nextSibling;k.push("</",Yt,">")}else k.push("/>");return;case I:case $:for(var at=C.firstChild;at;)Rt(at,k,Y,le,ye.slice()),at=at.nextSibling;return;case S:return Ot(k,C.name,C.value);case b:return k.push(C.data.replace(/[<&>]/g,re));case T:return k.push("<![CDATA[",C.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case D:return k.push("<!--",C.data,"-->");case H:var je=C.publicId,Si=C.systemId;if(k.push("<!DOCTYPE ",C.name),je)k.push(" PUBLIC ",je),Si&&Si!="."&&k.push(" ",Si),k.push(">");else if(Si&&Si!=".")k.push(" SYSTEM ",Si,">");else{var Li=C.internalSubset;Li&&k.push(" [",Li,"]"),k.push(">")}return;case O:return k.push("<?",C.target," ",C.data,"?>");case y:return k.push("&",C.nodeName,";");default:k.push("??",C.nodeName)}}function ci(C,k,Y){var le;switch(k.nodeType){case m:le=k.cloneNode(!1),le.ownerDocument=C;case $:break;case S:Y=!0;break}if(le||(le=k.cloneNode(!1)),le.ownerDocument=C,le.parentNode=null,Y)for(var ye=k.firstChild;ye;)le.appendChild(ci(C,ye,Y)),ye=ye.nextSibling;return le}function Ut(C,k,Y){var le=new k.constructor;for(var ye in k)if(Object.prototype.hasOwnProperty.call(k,ye)){var Ne=k[ye];typeof Ne!="object"&&Ne!=le[ye]&&(le[ye]=Ne)}switch(k.childNodes&&(le.childNodes=new U),le.ownerDocument=C,le.nodeType){case m:var Je=k.attributes,kt=le.attributes=new F,Yt=Je.length;kt._ownerElement=le;for(var qt=0;qt<Yt;qt++)le.setAttributeNode(Ut(C,Je.item(qt),!0));break;case S:Y=!0}if(Y)for(var Vt=k.firstChild;Vt;)le.appendChild(Ut(C,Vt,Y)),Vt=Vt.nextSibling;return le}function Wi(C,k,Y){C[k]=Y}try{if(Object.defineProperty){let C=function(k){switch(k.nodeType){case m:case $:var Y=[];for(k=k.firstChild;k;)k.nodeType!==7&&k.nodeType!==8&&Y.push(C(k)),k=k.nextSibling;return Y.join("");default:return k.nodeValue}};Object.defineProperty(V.prototype,"length",{get:function(){return X(this),this.$$length}}),Object.defineProperty(ce.prototype,"textContent",{get:function(){return C(this)},set:function(k){switch(this.nodeType){case m:case $:for(;this.firstChild;)this.removeChild(this.firstChild);(k||String(k))&&this.appendChild(this.ownerDocument.createTextNode(k));break;default:this.data=k,this.value=k,this.nodeValue=k}}}),Wi=function(k,Y,le){k["$$"+Y]=le}}}catch{}return Ki.DocumentType=Se,Ki.DOMException=L,Ki.DOMImplementation=oe,Ki.Element=qe,Ki.Node=ce,Ki.NodeList=U,Ki.XMLSerializer=ui,Ki}var Ur={},wo={},Mc;function O_(){return Mc||(Mc=1,(function(r){var e=Ea().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})(wo)),wo}var Vs={},Pc;function B_(){if(Pc)return Vs;Pc=1;var r=Ea().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,d=5,g=6,m=7;function S(x,w){this.message=x,this.locator=w,Error.captureStackTrace&&Error.captureStackTrace(this,S)}S.prototype=new Error,S.prototype.name=S.name;function b(){}b.prototype={parse:function(x,w,P){var K=this.domBuilder;K.startDocument(),H(w,w={}),T(x,w,P,K,this.errorHandler),K.endDocument()}};function T(x,w,P,K,L){function U(me){if(me>65535){me-=65536;var Fe=55296+(me>>10),qe=56320+(me&1023);return String.fromCharCode(Fe,qe)}else return String.fromCharCode(me)}function V(me){var Fe=me.slice(1,-1);return Object.hasOwnProperty.call(P,Fe)?P[Fe]:Fe.charAt(0)==="#"?U(parseInt(Fe.substr(1).replace("x","0x"))):(L.error("entity not found:"+me),me)}function X(me){if(me>ue){var Fe=x.substring(ue,me).replace(/&#?\w+;/g,V);oe&&F(ue),K.characters(Fe,0,me-ue),ue=me}}function F(me,Fe){for(;me>=Q&&(Fe=Z.exec(x));)B=Fe.index,Q=B+Fe[0].length,oe.lineNumber++;oe.columnNumber=me-B+1}for(var B=0,Q=0,Z=/.*(?:\r\n?|\n)|.*$/g,oe=K.locator,ce=[{currentNSMap:w}],re={},ue=0;;){try{var te=x.indexOf("<",ue);if(te<0){if(!x.substr(ue).match(/^\s*$/)){var Ae=K.doc,we=Ae.createTextNode(x.substr(ue));Ae.appendChild(we),K.currentElement=we}return}switch(te>ue&&X(te),x.charAt(te+1)){case"/":var Ie=x.indexOf(">",te+3),Le=x.substring(te+2,Ie).replace(/[ \t\n\r]+$/g,""),De=ce.pop();Ie<0?(Le=x.substring(te+2).replace(/[\s<].*/,""),L.error("end tag name: "+Le+" is not complete:"+De.tagName),Ie=te+1+Le.length):Le.match(/\s</)&&(Le=Le.replace(/[\s<].*/,""),L.error("end tag name: "+Le+" maybe not complete"),Ie=te+1+Le.length);var Ve=De.localNSMap,Qe=De.tagName==Le,et=Qe||De.tagName&&De.tagName.toLowerCase()==Le.toLowerCase();if(et){if(K.endElement(De.uri,De.localName,Le),Ve)for(var $e in Ve)Object.prototype.hasOwnProperty.call(Ve,$e)&&K.endPrefixMapping($e);Qe||L.fatalError("end tag name: "+Le+" is not match the current start tagName:"+De.tagName)}else ce.push(De);Ie++;break;case"?":oe&&F(te),Ie=z(x,te,K);break;case"!":oe&&F(te),Ie=$(x,te,K,L);break;default:oe&&F(te);var Ge=new N,xt=ce[ce.length-1].currentNSMap,Ie=E(x,te,Ge,xt,V,L),St=Ge.length;if(!Ge.closed&&I(x,Ie,Ge.tagName,re)&&(Ge.closed=!0,P.nbsp||L.warning("unclosed xml attribute")),oe&&St){for(var lt=y(oe,{}),Ee=0;Ee<St;Ee++){var Te=Ge[Ee];F(Te.offset),Te.locator=y(oe,{})}K.locator=lt,O(Ge,K,xt)&&ce.push(Ge),K.locator=oe}else O(Ge,K,xt)&&ce.push(Ge);r.isHTML(Ge.uri)&&!Ge.closed?Ie=D(x,Ie,Ge.tagName,V,K):Ie++}}catch(me){if(me instanceof S)throw me;L.error("element parse error: "+me),Ie=-1}Ie>ue?ue=Ie:X(Math.max(te,ue)+1)}}function y(x,w){return w.lineNumber=x.lineNumber,w.columnNumber=x.columnNumber,w}function E(x,w,P,K,L,U){function V(oe,ce,re){P.attributeNames.hasOwnProperty(oe)&&U.fatalError("Attribute "+oe+" redefined"),P.addValue(oe,ce.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,L),re)}for(var X,F,B=++w,Q=s;;){var Z=x.charAt(B);switch(Z){case"=":if(Q===a)X=x.slice(w,B),Q=l;else if(Q===o)Q=l;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(Q===l||Q===a)if(Q===a&&(U.warning('attribute value must after "="'),X=x.slice(w,B)),w=B+1,B=x.indexOf(Z,w),B>0)F=x.slice(w,B),V(X,F,w-1),Q=d;else throw new Error("attribute value no end '"+Z+"' match");else if(Q==c)F=x.slice(w,B),V(X,F,w),U.warning('attribute "'+X+'" missed start quot('+Z+")!!"),w=B+1,Q=d;else throw new Error('attribute value must after "="');break;case"/":switch(Q){case s:P.setTagName(x.slice(w,B));case d:case g:case m:Q=m,P.closed=!0;case c:case a:break;case o:P.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return U.error("unexpected end of input"),Q==s&&P.setTagName(x.slice(w,B)),B;case">":switch(Q){case s:P.setTagName(x.slice(w,B));case d:case g:case m:break;case c:case a:F=x.slice(w,B),F.slice(-1)==="/"&&(P.closed=!0,F=F.slice(0,-1));case o:Q===o&&(F=X),Q==c?(U.warning('attribute "'+F+'" missed quot(")!'),V(X,F,w)):((!r.isHTML(K[""])||!F.match(/^(?:disabled|checked|selected)$/i))&&U.warning('attribute "'+F+'" missed value!! "'+F+'" instead!!'),V(F,F,w));break;case l:throw new Error("attribute value missed!!")}return B;case"":Z=" ";default:if(Z<=" ")switch(Q){case s:P.setTagName(x.slice(w,B)),Q=g;break;case a:X=x.slice(w,B),Q=o;break;case c:var F=x.slice(w,B);U.warning('attribute "'+F+'" missed quot(")!!'),V(X,F,w);case d:Q=g;break}else switch(Q){case o:P.tagName,(!r.isHTML(K[""])||!X.match(/^(?:disabled|checked|selected)$/i))&&U.warning('attribute "'+X+'" missed value!! "'+X+'" instead2!!'),V(X,X,w),w=B,Q=a;break;case d:U.warning('attribute space is required"'+X+'"!!');case g:Q=a,w=B;break;case l:Q=c,w=B;break;case m:throw new Error("elements closed character '/' and '>' must be connected to")}}B++}}function O(x,w,P){for(var K=x.tagName,L=null,Z=x.length;Z--;){var U=x[Z],V=U.qName,X=U.value,oe=V.indexOf(":");if(oe>0)var F=U.prefix=V.slice(0,oe),B=V.slice(oe+1),Q=F==="xmlns"&&B;else B=V,F=null,Q=V==="xmlns"&&"";U.localName=B,Q!==!1&&(L==null&&(L={},H(P,P={})),P[Q]=L[Q]=X,U.uri=r.XMLNS,w.startPrefixMapping(Q,X))}for(var Z=x.length;Z--;){U=x[Z];var F=U.prefix;F&&(F==="xml"&&(U.uri=r.XML),F!=="xmlns"&&(U.uri=P[F||""]))}var oe=K.indexOf(":");oe>0?(F=x.prefix=K.slice(0,oe),B=x.localName=K.slice(oe+1)):(F=null,B=x.localName=K);var ce=x.uri=P[F||""];if(w.startElement(ce,B,K,x),x.closed){if(w.endElement(ce,B,K),L)for(F in L)Object.prototype.hasOwnProperty.call(L,F)&&w.endPrefixMapping(F)}else return x.currentNSMap=P,x.localNSMap=L,!0}function D(x,w,P,K,L){if(/^(?:script|textarea)$/i.test(P)){var U=x.indexOf("</"+P+">",w),V=x.substring(w+1,U);if(/[&<]/.test(V))return/^script$/i.test(P)?(L.characters(V,0,V.length),U):(V=V.replace(/&#?\w+;/g,K),L.characters(V,0,V.length),U)}return w+1}function I(x,w,P,K){var L=K[P];return L==null&&(L=x.lastIndexOf("</"+P+">"),L<w&&(L=x.lastIndexOf("</"+P)),K[P]=L),L<w}function H(x,w){for(var P in x)Object.prototype.hasOwnProperty.call(x,P)&&(w[P]=x[P])}function $(x,w,P,K){var L=x.charAt(w+2);switch(L){case"-":if(x.charAt(w+3)==="-"){var U=x.indexOf("-->",w+4);return U>w?(P.comment(x,w+4,U-w-4),U+3):(K.error("Unclosed comment"),-1)}else return-1;default:if(x.substr(w+3,6)=="CDATA["){var U=x.indexOf("]]>",w+9);return P.startCDATA(),P.characters(x,w+9,U-w-9),P.endCDATA(),U+3}var V=j(x,w),X=V.length;if(X>1&&/!doctype/i.test(V[0][0])){var F=V[1][0],B=!1,Q=!1;X>3&&(/^public$/i.test(V[2][0])?(B=V[3][0],Q=X>4&&V[4][0]):/^system$/i.test(V[2][0])&&(Q=V[3][0]));var Z=V[X-1];return P.startDTD(F,B,Q),P.endDTD(),Z.index+Z[0].length}}return-1}function z(x,w,P){var K=x.indexOf("?>",w);if(K){var L=x.substring(w,K).match(/^<\?(\S*)\s*([\s\S]*?)$/);return L?(L[0].length,P.processingInstruction(L[1],L[2]),K+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(x){if(!n.test(x))throw new Error("invalid tagName:"+x);this.tagName=x},addValue:function(x,w,P){if(!n.test(x))throw new Error("invalid attribute:"+x);this.attributeNames[x]=this.length,this[this.length++]={qName:x,value:w,offset:P}},length:0,getLocalName:function(x){return this[x].localName},getLocator:function(x){return this[x].locator},getQName:function(x){return this[x].qName},getURI:function(x){return this[x].uri},getValue:function(x){return this[x].value}};function j(x,w){var P,K=[],L=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(L.lastIndex=w,L.exec(x);P=L.exec(x);)if(K.push(P),P[1])return K}return Vs.XMLReader=b,Vs.ParseError=S,Vs}var Rc;function L_(){if(Rc)return Ur;Rc=1;var r=Ea(),e=Sh(),t=O_(),n=B_(),s=e.DOMImplementation,a=r.NAMESPACE,o=n.ParseError,l=n.XMLReader;function c(E){return E.replace(/\r[\n\u0085]/g,`
|
|
22
|
+
`))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}const p_=" ",So=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},m_=function(){const t="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+t+")")},Zt=function(r){const e={};if(!r)return e;const t=r.split(m_());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},Nc=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 g_ extends wl{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=bt(So(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=Zt(t[1]);o.URI&&(n.uri=o.URI),o.BYTERANGE&&(n.byterange=So(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=Zt(t[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Nc(n.attributes.RESOLUTION)),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))),this.trigger("data",n);return}if(t=/^#EXT-X-MEDIA:(.*)$/.exec(a),t){n={type:"tag",tagType:"media"},t[1]&&(n.attributes=Zt(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=Zt(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=Zt(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=Zt(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(p_)),this.trigger("data",n);return}if(t=/^#EXT-X-PART:(.*)$/.exec(a),t&&t[1]){n={type:"tag",tagType:"part"},n.attributes=Zt(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=So(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=Zt(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=Zt(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=Zt(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=Zt(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=Zt(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]),d=/^\d+(\.\d+)?$/.test(n.attributes[l]);n.attributes[l]=c?n.attributes[l].toString(16):d?parseFloat(n.attributes[l]):String(n.attributes[l])}this.trigger("data",n);return}if(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=Zt(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=Zt(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=Nc(n.attributes.RESOLUTION)),n.attributes["AVERAGE-BANDWIDTH"]&&(n.attributes["AVERAGE-BANDWIDTH"]=parseInt(n.attributes["AVERAGE-BANDWIDTH"],10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),this.trigger("data",n);return}if(t=/^#EXT-X-DEFINE:(.*)$/.exec(a),t){n={type:"tag",tagType:"define"},n.attributes=Zt(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 v_=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),ln=function(r){const e={};return Object.keys(r).forEach(function(t){e[v_(t)]=r[t]}),e},Eo=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 y_ extends wl{constructor(e={}){super(),this.lineStream=new f_,this.parseStream=new g_,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(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},g="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let m=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let S=0,T=0;const b={};this.on("end",()=>{s.uri||!s.parts&&!s.preloadHints||(!s.map&&a&&(s.map=a),!s.key&&o&&(s.key=o),!s.timeline&&typeof m=="number"&&(s.timeline=m),this.manifest.preloadSegment=s)}),this.parseStream.on("data",function(y){let E,I;if(t.manifest.definitions){for(const O in t.manifest.definitions)if(y.uri&&(y.uri=y.uri.replace(`{$${O}}`,t.manifest.definitions[O])),y.attributes)for(const k in y.attributes)typeof y.attributes[k]=="string"&&(y.attributes[k]=y.attributes[k].replace(`{$${O}}`,t.manifest.definitions[O]))}({tag(){({version(){y.version&&(this.manifest.version=y.version)},"allow-cache"(){this.manifest.allowCache=y.allowed,"allowed"in y||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const O={};"length"in y&&(s.byterange=O,O.length=y.length,"offset"in y||(y.offset=S)),"offset"in y&&(s.byterange=O,O.offset=y.offset),S=O.offset+O.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"})),y.title&&(s.title=y.title),y.duration>0&&(s.duration=y.duration),y.duration===0&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(!y.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(y.attributes.METHOD==="NONE"){o=null;return}if(!y.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(y.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:y.attributes};return}if(y.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:y.attributes.URI};return}if(y.attributes.KEYFORMAT===g){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(y.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(y.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),y.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(y.attributes.KEYID&&y.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:y.attributes.KEYFORMAT,keyId:y.attributes.KEYID.substring(2)},pssh:yh(y.attributes.URI.split(",")[1])};return}y.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:y.attributes.METHOD||"AES-128",uri:y.attributes.URI},typeof y.attributes.IV<"u"&&(o.iv=y.attributes.IV)},"media-sequence"(){if(!isFinite(y.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+y.number});return}this.manifest.mediaSequence=y.number},"discontinuity-sequence"(){if(!isFinite(y.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+y.number});return}this.manifest.discontinuitySequence=y.number,m=y.number},"playlist-type"(){if(!/VOD|EVENT/.test(y.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+y.playlist});return}this.manifest.playlistType=y.playlistType},map(){a={},y.uri&&(a.uri=y.uri),y.byterange&&(a.byterange=y.byterange),o&&(a.key=o)},"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||d,!y.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}s.attributes||(s.attributes={}),bt(s.attributes,y.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,!(y.attributes&&y.attributes.TYPE&&y.attributes["GROUP-ID"]&&y.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const O=this.manifest.mediaGroups[y.attributes.TYPE];O[y.attributes["GROUP-ID"]]=O[y.attributes["GROUP-ID"]]||{},E=O[y.attributes["GROUP-ID"]],I={default:/yes/i.test(y.attributes.DEFAULT)},I.default?I.autoselect=!0:I.autoselect=/yes/i.test(y.attributes.AUTOSELECT),y.attributes.LANGUAGE&&(I.language=y.attributes.LANGUAGE),y.attributes.URI&&(I.uri=y.attributes.URI),y.attributes["INSTREAM-ID"]&&(I.instreamId=y.attributes["INSTREAM-ID"]),y.attributes.CHARACTERISTICS&&(I.characteristics=y.attributes.CHARACTERISTICS),y.attributes.FORCED&&(I.forced=/yes/i.test(y.attributes.FORCED)),E[y.attributes.NAME]=I},discontinuity(){m+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=y.dateTimeString,this.manifest.dateTimeObject=y.dateTimeObject),s.dateTimeString=y.dateTimeString,s.dateTimeObject=y.dateTimeObject;const{lastProgramDateTime:O}=this;this.lastProgramDateTime=new Date(y.dateTimeString).getTime(),O===null&&this.manifest.segments.reduceRight((k,z)=>(z.programDateTime=k-z.duration*1e3,z.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(y.duration)||y.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+y.duration});return}this.manifest.targetDuration=y.duration,Eo.call(this,this.manifest)},start(){if(!y.attributes||isNaN(y.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:y.attributes["TIME-OFFSET"],precise:y.attributes.PRECISE}},"cue-out"(){s.cueOut=y.data},"cue-out-cont"(){s.cueOutCont=y.data},"cue-in"(){s.cueIn=y.data},skip(){this.manifest.skip=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",y.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const O=this.manifest.segments.length,k=ln(y.attributes);s.parts=s.parts||[],s.parts.push(k),k.byterange&&(k.byterange.hasOwnProperty("offset")||(k.byterange.offset=T),T=k.byterange.offset+k.byterange.length);const z=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${z} for segment #${O}`,y.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(($,j)=>{$.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${j} lacks required attribute(s): LAST-PART`})})},"server-control"(){const O=this.manifest.serverControl=ln(y.attributes);O.hasOwnProperty("canBlockReload")||(O.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Eo.call(this,this.manifest),O.canSkipDateranges&&!O.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 O=this.manifest.segments.length,k=ln(y.attributes),z=k.type&&k.type==="PART";s.preloadHints=s.preloadHints||[],s.preloadHints.push(k),k.byterange&&(k.byterange.hasOwnProperty("offset")||(k.byterange.offset=z?T:0,z&&(T=k.byterange.offset+k.byterange.length)));const $=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${$} for segment #${O}`,y.attributes,["TYPE","URI"]),!!k.type)for(let j=0;j<s.preloadHints.length-1;j++){const N=s.preloadHints[j];N.type&&N.type===k.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${$} for segment #${O} has the same TYPE ${k.type} as preload hint #${j}`})}},"rendition-report"(){const O=ln(y.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(O);const k=this.manifest.renditionReports.length-1,z=["LAST-MSN","URI"];l&&z.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${k}`,y.attributes,z)},"part-inf"(){this.manifest.partInf=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",y.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Eo.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ln(y.attributes));const O=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${O}`,y.attributes,["ID","START-DATE"]);const k=this.manifest.dateRanges[O];k.endDate&&k.startDate&&new Date(k.endDate)<new Date(k.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),k.duration&&k.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),k.plannedDuration&&k.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const z=!!k.endOnNext;if(z&&!k.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),z&&(k.duration||k.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),k.duration&&k.endDate){const j=k.startDate.getTime()+k.duration*1e3;this.manifest.dateRanges[O].endDate=new Date(j)}if(!b[k.id])b[k.id]=k;else{for(const j in b[k.id])if(k[j]&&JSON.stringify(b[k.id][j])!==JSON.stringify(k[j])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const $=this.manifest.dateRanges.findIndex(j=>j.id===k.id);this.manifest.dateRanges[$]=bt(this.manifest.dateRanges[$],k),b[k.id]=bt(b[k.id],k),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=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",y.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const O=(k,z)=>{if(k in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${k}`});return}this.manifest.definitions[k]=z};if("QUERYPARAM"in y.attributes){if("NAME"in y.attributes||"IMPORT"in y.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const k=this.params.get(y.attributes.QUERYPARAM);if(!k){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${y.attributes.QUERYPARAM}`});return}O(y.attributes.QUERYPARAM,decodeURIComponent(k));return}if("NAME"in y.attributes){if("IMPORT"in y.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in y.attributes)||typeof y.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${y.attributes.NAME}`});return}O(y.attributes.NAME,y.attributes.VALUE);return}if("IMPORT"in y.attributes){if(!this.mainDefinitions[y.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${y.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}O(y.attributes.IMPORT,this.mainDefinitions[y.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:y.attributes,uri:y.uri,timeline:m}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",y.attributes,["BANDWIDTH","URI"])}}[y.tagType]||c).call(t)},uri(){s.uri=y.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=m,a&&(s.map=a),T=0,this.lastProgramDateTime!==null&&(s.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=s.duration*1e3),s={}},comment(){},custom(){y.segment?(s.custom=s.custom||{},s.custom[y.customType]=y.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[y.customType]=y.data)}})[y.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^/},__=["video","audio","text"],Ic=["Video","Audio","Text"],_h=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})},Ri=function(e){e===void 0&&(e="");var t=e.split(","),n=[];return t.forEach(function(s){s=s.trim();var a;__.forEach(function(o){var l=Bn[o].exec(s.toLowerCase());if(!(!l||l.length<=1)){a=o;var c=s.substring(0,l[1].length),d=s.replace(c,"");n.push({type:c,details:d,mediaType:o})}}),a||n.push({type:s,details:"",mediaType:"unknown"})}),n},T_=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 Ri(a.playlists[0].attributes.CODECS)}return null},Th=function(e){return e===void 0&&(e=""),Bn.audio.test(e.trim().toLowerCase())},b_=function(e){return e===void 0&&(e=""),Bn.text.test(e.trim().toLowerCase())},rr=function(e){if(!(!e||typeof e!="string")){var t=e.toLowerCase().split(",").map(function(a){return _h(a.trim())}),n="video";t.length===1&&Th(t[0])?n="audio":t.length===1&&b_(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+'"'}},Xr=function(e,t){return e===void 0&&(e=""),t===void 0&&(t=!1),G.MediaSource&&G.MediaSource.isTypeSupported&&G.MediaSource.isTypeSupported(rr(e))||t&&G.ManagedMediaSource&&G.ManagedMediaSource.isTypeSupported&&G.ManagedMediaSource.isTypeSupported(rr(e))||!1},ko=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(t){t=t.trim();for(var n=0;n<Ic.length;n++){var s=Ic[n];if(Bn["muxer"+s].test(t))return!0}return!1})},Oc="mp4a.40.2",x_="avc1.4d400d",C_=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,S_=/^application\/dash\+xml/i,bh=function(e){return C_.test(e)?"hls":S_.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},E_=function(e){return e.toString(2).length},k_=function(e){return Math.ceil(E_(e)/8)},xh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},w_=function(e){return xh(e)},Pe=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!w_(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))},$t=G.BigInt||Number,Qo=[$t("0x1"),$t("0x100"),$t("0x10000"),$t("0x1000000"),$t("0x100000000"),$t("0x10000000000"),$t("0x1000000000000"),$t("0x100000000000000"),$t("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 D_=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",d=e[c]?e[c]:Array.prototype[c],g=d.call(e,function(S,T,b){var y=l?b:Math.abs(b+1-e.length);return S+$t(T)*Qo[y]},$t(0));if(a){var m=Qo[e.length]/$t(2)-$t(1);g=$t(g),g>m&&(g-=m,g-=m,g-=$t(2))}return Number(g)},A_=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=$t(e);for(var o=k_(e),l=new Uint8Array(new ArrayBuffer(o)),c=0;c<o;c++){var d=a?c:Math.abs(c+1-l.length);l[d]=Number(e/Qo[c]&$t(255)),e<0&&(l[d]=Math.abs(~l[d]),l[d]-=c===0?1:2)}return l},Ch=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},N_=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,d){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 d=t.every?t.every:Array.prototype.every;return t.length&&e.length-o>=t.length&&d.call(t,function(g,m){var S=c[m]?c[m]&e[o+m]:e[o+m];return g===S})},I_=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)}})},$r={},Ki={},kn={},Bc;function Ea(){if(Bc)return kn;Bc=1;function r(a,o,l){if(l===void 0&&(l=Array.prototype),a&&typeof l.find=="function")return l.find.call(a,o);for(var c=0;c<a.length;c++)if(Object.prototype.hasOwnProperty.call(a,c)){var d=a[c];if(o.call(void 0,d,c,a))return d}}function e(a,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(a):a}function 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 Lc;function Sh(){if(Lc)return Ki;Lc=1;var r=Ea(),e=r.find,t=r.NAMESPACE;function n(C){return C!==""}function s(C){return C?C.split(/[\t\n\f\r ]+/).filter(n):[]}function a(C,D){return C.hasOwnProperty(D)||(C[D]=!0),C}function o(C){if(!C)return[];var D=s(C);return Object.keys(D.reduce(a,{}))}function l(C){return function(D){return C&&C.indexOf(D)!==-1}}function c(C,D){for(var Y in C)Object.prototype.hasOwnProperty.call(C,Y)&&(D[Y]=C[Y])}function d(C,D){var Y=C.prototype;if(!(Y instanceof D)){let le=function(){};le.prototype=D.prototype,le=new le,c(Y,le),C.prototype=Y=le}Y.constructor!=C&&(typeof C!="function"&&console.error("unknown Class:"+C),Y.constructor=C)}var g={},m=g.ELEMENT_NODE=1,S=g.ATTRIBUTE_NODE=2,T=g.TEXT_NODE=3,b=g.CDATA_SECTION_NODE=4,y=g.ENTITY_REFERENCE_NODE=5,E=g.ENTITY_NODE=6,I=g.PROCESSING_INSTRUCTION_NODE=7,O=g.COMMENT_NODE=8,k=g.DOCUMENT_NODE=9,z=g.DOCUMENT_TYPE_NODE=10,$=g.DOCUMENT_FRAGMENT_NODE=11,j=g.NOTATION_NODE=12,N={},H={};N.INDEX_SIZE_ERR=(H[1]="Index size error",1),N.DOMSTRING_SIZE_ERR=(H[2]="DOMString size error",2);var x=N.HIERARCHY_REQUEST_ERR=(H[3]="Hierarchy request error",3);N.WRONG_DOCUMENT_ERR=(H[4]="Wrong document",4);var w=N.INVALID_CHARACTER_ERR=(H[5]="Invalid character",5);N.NO_DATA_ALLOWED_ERR=(H[6]="No data allowed",6),N.NO_MODIFICATION_ALLOWED_ERR=(H[7]="No modification allowed",7);var P=N.NOT_FOUND_ERR=(H[8]="Not found",8);N.NOT_SUPPORTED_ERR=(H[9]="Not supported",9);var K=N.INUSE_ATTRIBUTE_ERR=(H[10]="Attribute in use",10);N.INVALID_STATE_ERR=(H[11]="Invalid state",11),N.SYNTAX_ERR=(H[12]="Syntax error",12),N.INVALID_MODIFICATION_ERR=(H[13]="Invalid modification",13),N.NAMESPACE_ERR=(H[14]="Invalid namespace",14),N.INVALID_ACCESS_ERR=(H[15]="Invalid access",15);function B(C,D){if(D instanceof Error)var Y=D;else Y=this,Error.call(this,H[C]),this.message=H[C],Error.captureStackTrace&&Error.captureStackTrace(this,B);return Y.code=C,D&&(this.message=this.message+": "+D),Y}B.prototype=Error.prototype,c(N,B);function U(){}U.prototype={length:0,item:function(C){return C>=0&&C<this.length?this[C]:null},toString:function(C,D){for(var Y=[],le=0;le<this.length;le++)Rt(this[le],Y,C,D);return Y.join("")},filter:function(C){return Array.prototype.filter.call(this,C)},indexOf:function(C){return Array.prototype.indexOf.call(this,C)}};function R(C,D){this._node=C,this._refresh=D,X(this)}function X(C){var D=C._node._inc||C._node.ownerDocument._inc;if(C._inc!==D){var Y=C._refresh(C._node);if(Wi(C,"length",Y.length),!C.$$length||Y.length<C.$$length)for(var le=Y.length;le in C;le++)Object.prototype.hasOwnProperty.call(C,le)&&delete C[le];c(Y,C),C._inc=D}}R.prototype.item=function(C){return X(this),this[C]||null},d(R,U);function F(){}function M(C,D){for(var Y=C.length;Y--;)if(C[Y]===D)return Y}function Q(C,D,Y,le){if(le?D[M(D,le)]=Y:D[D.length++]=Y,C){Y.ownerElement=C;var ye=C.ownerDocument;ye&&(le&&we(ye,C,le),Ae(ye,C,Y))}}function Z(C,D,Y){var le=M(D,Y);if(le>=0){for(var ye=D.length-1;le<ye;)D[le]=D[++le];if(D.length=ye,C){var Ne=C.ownerDocument;Ne&&(we(Ne,C,Y),Y.ownerElement=null)}}else throw new B(P,new Error(C.tagName+"@"+Y))}F.prototype={length:0,item:U.prototype.item,getNamedItem:function(C){for(var D=this.length;D--;){var Y=this[D];if(Y.nodeName==C)return Y}},setNamedItem:function(C){var D=C.ownerElement;if(D&&D!=this._ownerElement)throw new B(K);var Y=this.getNamedItem(C.nodeName);return Q(this._ownerElement,this,C,Y),Y},setNamedItemNS:function(C){var D=C.ownerElement,Y;if(D&&D!=this._ownerElement)throw new B(K);return Y=this.getNamedItemNS(C.namespaceURI,C.localName),Q(this._ownerElement,this,C,Y),Y},removeNamedItem:function(C){var D=this.getNamedItem(C);return Z(this._ownerElement,this,D),D},removeNamedItemNS:function(C,D){var Y=this.getNamedItemNS(C,D);return Z(this._ownerElement,this,Y),Y},getNamedItemNS:function(C,D){for(var Y=this.length;Y--;){var le=this[Y];if(le.localName==D&&le.namespaceURI==C)return le}return null}};function oe(){}oe.prototype={hasFeature:function(C,D){return!0},createDocument:function(C,D,Y){var le=new te;if(le.implementation=this,le.childNodes=new U,le.doctype=Y||null,Y&&le.appendChild(Y),D){var ye=le.createElementNS(C,D);le.appendChild(ye)}return le},createDocumentType:function(C,D,Y){var le=new Se;return le.name=C,le.nodeName=C,le.publicId=D||"",le.systemId=Y||"",le}};function ce(){}ce.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(C,D){return Te(this,C,D)},replaceChild:function(C,D){Te(this,C,D,Ee),D&&this.removeChild(D)},removeChild:function(C){return De(this,C)},appendChild:function(C){return this.insertBefore(C,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(C){return Ut(this.ownerDocument||this,this,C)},normalize:function(){for(var C=this.firstChild;C;){var D=C.nextSibling;D&&D.nodeType==T&&C.nodeType==T?(this.removeChild(D),C.appendData(D.data)):(C.normalize(),C=D)}},isSupported:function(C,D){return this.ownerDocument.implementation.hasFeature(C,D)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(C){for(var D=this;D;){var Y=D._nsMap;if(Y){for(var le in Y)if(Object.prototype.hasOwnProperty.call(Y,le)&&Y[le]===C)return le}D=D.nodeType==S?D.ownerDocument:D.parentNode}return null},lookupNamespaceURI:function(C){for(var D=this;D;){var Y=D._nsMap;if(Y&&Object.prototype.hasOwnProperty.call(Y,C))return Y[C];D=D.nodeType==S?D.ownerDocument:D.parentNode}return null},isDefaultNamespace:function(C){var D=this.lookupPrefix(C);return D==null}};function re(C){return C=="<"&&"<"||C==">"&&">"||C=="&"&&"&"||C=='"'&&"""||"&#"+C.charCodeAt()+";"}c(g,ce),c(g,ce.prototype);function ue(C,D){if(D(C))return!0;if(C=C.firstChild)do if(ue(C,D))return!0;while(C=C.nextSibling)}function te(){this.ownerDocument=this}function Ae(C,D,Y){C&&C._inc++;var le=Y.namespaceURI;le===t.XMLNS&&(D._nsMap[Y.prefix?Y.localName:""]=Y.value)}function we(C,D,Y,le){C&&C._inc++;var ye=Y.namespaceURI;ye===t.XMLNS&&delete D._nsMap[Y.prefix?Y.localName:""]}function Le(C,D,Y){if(C&&C._inc){C._inc++;var le=D.childNodes;if(Y)le[le.length++]=Y;else{for(var ye=D.firstChild,Ne=0;ye;)le[Ne++]=ye,ye=ye.nextSibling;le.length=Ne,delete le[le.length]}}}function De(C,D){var Y=D.previousSibling,le=D.nextSibling;return Y?Y.nextSibling=le:C.firstChild=le,le?le.previousSibling=Y:C.lastChild=Y,D.parentNode=null,D.previousSibling=null,D.nextSibling=null,Le(C.ownerDocument,C),D}function Ve(C){return C&&(C.nodeType===ce.DOCUMENT_NODE||C.nodeType===ce.DOCUMENT_FRAGMENT_NODE||C.nodeType===ce.ELEMENT_NODE)}function Qe(C){return C&&($e(C)||Ge(C)||et(C)||C.nodeType===ce.DOCUMENT_FRAGMENT_NODE||C.nodeType===ce.COMMENT_NODE||C.nodeType===ce.PROCESSING_INSTRUCTION_NODE)}function et(C){return C&&C.nodeType===ce.DOCUMENT_TYPE_NODE}function $e(C){return C&&C.nodeType===ce.ELEMENT_NODE}function Ge(C){return C&&C.nodeType===ce.TEXT_NODE}function xt(C,D){var Y=C.childNodes||[];if(e(Y,$e)||et(D))return!1;var le=e(Y,et);return!(D&&le&&Y.indexOf(le)>Y.indexOf(D))}function Ie(C,D){var Y=C.childNodes||[];function le(Ne){return $e(Ne)&&Ne!==D}if(e(Y,le))return!1;var ye=e(Y,et);return!(D&&ye&&Y.indexOf(ye)>Y.indexOf(D))}function St(C,D,Y){if(!Ve(C))throw new B(x,"Unexpected parent node type "+C.nodeType);if(Y&&Y.parentNode!==C)throw new B(P,"child not in parent");if(!Qe(D)||et(D)&&C.nodeType!==ce.DOCUMENT_NODE)throw new B(x,"Unexpected node type "+D.nodeType+" for parent node type "+C.nodeType)}function lt(C,D,Y){var le=C.childNodes||[],ye=D.childNodes||[];if(D.nodeType===ce.DOCUMENT_FRAGMENT_NODE){var Ne=ye.filter($e);if(Ne.length>1||e(ye,Ge))throw new B(x,"More than one element or text in fragment");if(Ne.length===1&&!xt(C,Y))throw new B(x,"Element in fragment can not be inserted before doctype")}if($e(D)&&!xt(C,Y))throw new B(x,"Only one element can be added and only after doctype");if(et(D)){if(e(le,et))throw new B(x,"Only one doctype is allowed");var Je=e(le,$e);if(Y&&le.indexOf(Je)<le.indexOf(Y))throw new B(x,"Doctype can only be inserted before an element");if(!Y&&Je)throw new B(x,"Doctype can not be appended since element is present")}}function Ee(C,D,Y){var le=C.childNodes||[],ye=D.childNodes||[];if(D.nodeType===ce.DOCUMENT_FRAGMENT_NODE){var Ne=ye.filter($e);if(Ne.length>1||e(ye,Ge))throw new B(x,"More than one element or text in fragment");if(Ne.length===1&&!Ie(C,Y))throw new B(x,"Element in fragment can not be inserted before doctype")}if($e(D)&&!Ie(C,Y))throw new B(x,"Only one element can be added and only after doctype");if(et(D)){if(e(le,function(Yt){return et(Yt)&&Yt!==Y}))throw new B(x,"Only one doctype is allowed");var Je=e(le,$e);if(Y&&le.indexOf(Je)<le.indexOf(Y))throw new B(x,"Doctype can only be inserted before an element")}}function Te(C,D,Y,le){St(C,D,Y),C.nodeType===ce.DOCUMENT_NODE&&(le||lt)(C,D,Y);var ye=D.parentNode;if(ye&&ye.removeChild(D),D.nodeType===$){var Ne=D.firstChild;if(Ne==null)return D;var Je=D.lastChild}else Ne=Je=D;var kt=Y?Y.previousSibling:C.lastChild;Ne.previousSibling=kt,Je.nextSibling=Y,kt?kt.nextSibling=Ne:C.firstChild=Ne,Y==null?C.lastChild=Je:Y.previousSibling=Je;do{Ne.parentNode=C;var Yt=C.ownerDocument||C;me(Ne,Yt)}while(Ne!==Je&&(Ne=Ne.nextSibling));return Le(C.ownerDocument||C,C),D.nodeType==$&&(D.firstChild=D.lastChild=null),D}function me(C,D){if(C.ownerDocument!==D){if(C.ownerDocument=D,C.nodeType===m&&C.attributes)for(var Y=0;Y<C.attributes.length;Y++){var le=C.attributes.item(Y);le&&(le.ownerDocument=D)}for(var ye=C.firstChild;ye;)me(ye,D),ye=ye.nextSibling}}function Fe(C,D){D.parentNode&&D.parentNode.removeChild(D),D.parentNode=C,D.previousSibling=C.lastChild,D.nextSibling=null,D.previousSibling?D.previousSibling.nextSibling=D:C.firstChild=D,C.lastChild=D,Le(C.ownerDocument,C,D);var Y=C.ownerDocument||C;return me(D,Y),D}te.prototype={nodeName:"#document",nodeType:k,doctype:null,documentElement:null,_inc:1,insertBefore:function(C,D){if(C.nodeType==$){for(var Y=C.firstChild;Y;){var le=Y.nextSibling;this.insertBefore(Y,D),Y=le}return C}return Te(this,C,D),me(C,this),this.documentElement===null&&C.nodeType===m&&(this.documentElement=C),C},removeChild:function(C){return this.documentElement==C&&(this.documentElement=null),De(this,C)},replaceChild:function(C,D){Te(this,C,D,Ee),me(C,this),D&&this.removeChild(D),$e(C)&&(this.documentElement=C)},importNode:function(C,D){return ci(this,C,D)},getElementById:function(C){var D=null;return ue(this.documentElement,function(Y){if(Y.nodeType==m&&Y.getAttribute("id")==C)return D=Y,!0}),D},getElementsByClassName:function(C){var D=o(C);return new R(this,function(Y){var le=[];return D.length>0&&ue(Y.documentElement,function(ye){if(ye!==Y&&ye.nodeType===m){var Ne=ye.getAttribute("class");if(Ne){var Je=C===Ne;if(!Je){var kt=o(Ne);Je=D.every(l(kt))}Je&&le.push(ye)}}}),le})},createElement:function(C){var D=new qe;D.ownerDocument=this,D.nodeName=C,D.tagName=C,D.localName=C,D.childNodes=new U;var Y=D.attributes=new F;return Y._ownerElement=D,D},createDocumentFragment:function(){var C=new Nt;return C.ownerDocument=this,C.childNodes=new U,C},createTextNode:function(C){var D=new ie;return D.ownerDocument=this,D.appendData(C),D},createComment:function(C){var D=new ne;return D.ownerDocument=this,D.appendData(C),D},createCDATASection:function(C){if(C.indexOf("]]>")!==-1)throw new B(w,'data contains "]]>"');var D=new se;return D.ownerDocument=this,D.appendData(C),D},createProcessingInstruction:function(C,D){var Y=new ft;return Y.ownerDocument=this,Y.tagName=Y.nodeName=Y.target=C,Y.nodeValue=Y.data=D,Y},createAttribute:function(C){var D=new gt;return D.ownerDocument=this,D.name=C,D.nodeName=C,D.localName=C,D.specified=!0,D},createEntityReference:function(C){var D=new Oe;return D.ownerDocument=this,D.nodeName=C,D},createElementNS:function(C,D){var Y=new qe,le=D.split(":"),ye=Y.attributes=new F;return Y.childNodes=new U,Y.ownerDocument=this,Y.nodeName=D,Y.tagName=D,Y.namespaceURI=C,le.length==2?(Y.prefix=le[0],Y.localName=le[1]):Y.localName=D,ye._ownerElement=Y,Y},createAttributeNS:function(C,D){var Y=new gt,le=D.split(":");return Y.ownerDocument=this,Y.nodeName=D,Y.name=D,Y.namespaceURI=C,Y.specified=!0,le.length==2?(Y.prefix=le[0],Y.localName=le[1]):Y.localName=D,Y}},d(te,ce);function qe(){this._nsMap={}}qe.prototype={nodeType:m,hasAttribute:function(C){return this.getAttributeNode(C)!=null},getAttribute:function(C){var D=this.getAttributeNode(C);return D&&D.value||""},getAttributeNode:function(C){return this.attributes.getNamedItem(C)},setAttribute:function(C,D){var Y=this.ownerDocument.createAttribute(C);Y.value=Y.nodeValue=""+D,this.setAttributeNode(Y)},removeAttribute:function(C){var D=this.getAttributeNode(C);D&&this.removeAttributeNode(D)},appendChild:function(C){return C.nodeType===$?this.insertBefore(C,null):Fe(this,C)},setAttributeNode:function(C){return this.attributes.setNamedItem(C)},setAttributeNodeNS:function(C){return this.attributes.setNamedItemNS(C)},removeAttributeNode:function(C){return this.attributes.removeNamedItem(C.nodeName)},removeAttributeNS:function(C,D){var Y=this.getAttributeNodeNS(C,D);Y&&this.removeAttributeNode(Y)},hasAttributeNS:function(C,D){return this.getAttributeNodeNS(C,D)!=null},getAttributeNS:function(C,D){var Y=this.getAttributeNodeNS(C,D);return Y&&Y.value||""},setAttributeNS:function(C,D,Y){var le=this.ownerDocument.createAttributeNS(C,D);le.value=le.nodeValue=""+Y,this.setAttributeNode(le)},getAttributeNodeNS:function(C,D){return this.attributes.getNamedItemNS(C,D)},getElementsByTagName:function(C){return new R(this,function(D){var Y=[];return ue(D,function(le){le!==D&&le.nodeType==m&&(C==="*"||le.tagName==C)&&Y.push(le)}),Y})},getElementsByTagNameNS:function(C,D){return new R(this,function(Y){var le=[];return ue(Y,function(ye){ye!==Y&&ye.nodeType===m&&(C==="*"||ye.namespaceURI===C)&&(D==="*"||ye.localName==D)&&le.push(ye)}),le})}},te.prototype.getElementsByTagName=qe.prototype.getElementsByTagName,te.prototype.getElementsByTagNameNS=qe.prototype.getElementsByTagNameNS,d(qe,ce);function gt(){}gt.prototype.nodeType=S,d(gt,ce);function Et(){}Et.prototype={data:"",substringData:function(C,D){return this.data.substring(C,C+D)},appendData:function(C){C=this.data+C,this.nodeValue=this.data=C,this.length=C.length},insertData:function(C,D){this.replaceData(C,0,D)},appendChild:function(C){throw new Error(H[x])},deleteData:function(C,D){this.replaceData(C,D,"")},replaceData:function(C,D,Y){var le=this.data.substring(0,C),ye=this.data.substring(C+D);Y=le+Y+ye,this.nodeValue=this.data=Y,this.length=Y.length}},d(Et,ce);function ie(){}ie.prototype={nodeName:"#text",nodeType:T,splitText:function(C){var D=this.data,Y=D.substring(C);D=D.substring(0,C),this.data=this.nodeValue=D,this.length=D.length;var le=this.ownerDocument.createTextNode(Y);return this.parentNode&&this.parentNode.insertBefore(le,this.nextSibling),le}},d(ie,Et);function ne(){}ne.prototype={nodeName:"#comment",nodeType:O},d(ne,Et);function se(){}se.prototype={nodeName:"#cdata-section",nodeType:b},d(se,Et);function Se(){}Se.prototype.nodeType=z,d(Se,ce);function pe(){}pe.prototype.nodeType=j,d(pe,ce);function Ke(){}Ke.prototype.nodeType=E,d(Ke,ce);function Oe(){}Oe.prototype.nodeType=y,d(Oe,ce);function Nt(){}Nt.prototype.nodeName="#document-fragment",Nt.prototype.nodeType=$,d(Nt,ce);function ft(){}ft.prototype.nodeType=I,d(ft,ce);function ui(){}ui.prototype.serializeToString=function(C,D,Y){return It.call(C,D,Y)},ce.prototype.toString=It;function It(C,D){var Y=[],le=this.nodeType==9&&this.documentElement||this,ye=le.prefix,Ne=le.namespaceURI;if(Ne&&ye==null){var ye=le.lookupPrefix(Ne);if(ye==null)var Je=[{namespace:Ne,prefix:null}]}return Rt(this,Y,C,D,Je),Y.join("")}function Wt(C,D,Y){var le=C.prefix||"",ye=C.namespaceURI;if(!ye||le==="xml"&&ye===t.XML||ye===t.XMLNS)return!1;for(var Ne=Y.length;Ne--;){var Je=Y[Ne];if(Je.prefix===le)return Je.namespace!==ye}return!0}function Ot(C,D,Y){C.push(" ",D,'="',Y.replace(/[<>&"\t\n\r]/g,re),'"')}function Rt(C,D,Y,le,ye){if(ye||(ye=[]),le)if(C=le(C),C){if(typeof C=="string"){D.push(C);return}}else return;switch(C.nodeType){case m:var Ne=C.attributes,Je=Ne.length,at=C.firstChild,kt=C.tagName;Y=t.isHTML(C.namespaceURI)||Y;var Yt=kt;if(!Y&&!C.prefix&&C.namespaceURI){for(var qt,Vt=0;Vt<Ne.length;Vt++)if(Ne.item(Vt).name==="xmlns"){qt=Ne.item(Vt).value;break}if(!qt)for(var ni=ye.length-1;ni>=0;ni--){var Ye=ye[ni];if(Ye.prefix===""&&Ye.namespace===C.namespaceURI){qt=Ye.namespace;break}}if(qt!==C.namespaceURI)for(var ni=ye.length-1;ni>=0;ni--){var Ye=ye[ni];if(Ye.namespace===C.namespaceURI){Ye.prefix&&(Yt=Ye.prefix+":"+kt);break}}}D.push("<",Yt);for(var ri=0;ri<Je;ri++){var Xt=Ne.item(ri);Xt.prefix=="xmlns"?ye.push({prefix:Xt.localName,namespace:Xt.value}):Xt.nodeName=="xmlns"&&ye.push({prefix:"",namespace:Xt.value})}for(var ri=0;ri<Je;ri++){var Xt=Ne.item(ri);if(Wt(Xt,Y,ye)){var Kt=Xt.prefix||"",wt=Xt.namespaceURI;Ot(D,Kt?"xmlns:"+Kt:"xmlns",wt),ye.push({prefix:Kt,namespace:wt})}Rt(Xt,D,Y,le,ye)}if(kt===Yt&&Wt(C,Y,ye)){var Kt=C.prefix||"",wt=C.namespaceURI;Ot(D,Kt?"xmlns:"+Kt:"xmlns",wt),ye.push({prefix:Kt,namespace:wt})}if(at||Y&&!/^(?:meta|link|img|br|hr|input)$/i.test(kt)){if(D.push(">"),Y&&/^script$/i.test(kt))for(;at;)at.data?D.push(at.data):Rt(at,D,Y,le,ye.slice()),at=at.nextSibling;else for(;at;)Rt(at,D,Y,le,ye.slice()),at=at.nextSibling;D.push("</",Yt,">")}else D.push("/>");return;case k:case $:for(var at=C.firstChild;at;)Rt(at,D,Y,le,ye.slice()),at=at.nextSibling;return;case S:return Ot(D,C.name,C.value);case T:return D.push(C.data.replace(/[<&>]/g,re));case b:return D.push("<![CDATA[",C.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case O:return D.push("<!--",C.data,"-->");case z:var je=C.publicId,Si=C.systemId;if(D.push("<!DOCTYPE ",C.name),je)D.push(" PUBLIC ",je),Si&&Si!="."&&D.push(" ",Si),D.push(">");else if(Si&&Si!=".")D.push(" SYSTEM ",Si,">");else{var Li=C.internalSubset;Li&&D.push(" [",Li,"]"),D.push(">")}return;case I:return D.push("<?",C.target," ",C.data,"?>");case y:return D.push("&",C.nodeName,";");default:D.push("??",C.nodeName)}}function ci(C,D,Y){var le;switch(D.nodeType){case m:le=D.cloneNode(!1),le.ownerDocument=C;case $:break;case S:Y=!0;break}if(le||(le=D.cloneNode(!1)),le.ownerDocument=C,le.parentNode=null,Y)for(var ye=D.firstChild;ye;)le.appendChild(ci(C,ye,Y)),ye=ye.nextSibling;return le}function Ut(C,D,Y){var le=new D.constructor;for(var ye in D)if(Object.prototype.hasOwnProperty.call(D,ye)){var Ne=D[ye];typeof Ne!="object"&&Ne!=le[ye]&&(le[ye]=Ne)}switch(D.childNodes&&(le.childNodes=new U),le.ownerDocument=C,le.nodeType){case m:var Je=D.attributes,kt=le.attributes=new F,Yt=Je.length;kt._ownerElement=le;for(var qt=0;qt<Yt;qt++)le.setAttributeNode(Ut(C,Je.item(qt),!0));break;case S:Y=!0}if(Y)for(var Vt=D.firstChild;Vt;)le.appendChild(Ut(C,Vt,Y)),Vt=Vt.nextSibling;return le}function Wi(C,D,Y){C[D]=Y}try{if(Object.defineProperty){let C=function(D){switch(D.nodeType){case m:case $:var Y=[];for(D=D.firstChild;D;)D.nodeType!==7&&D.nodeType!==8&&Y.push(C(D)),D=D.nextSibling;return Y.join("");default:return D.nodeValue}};Object.defineProperty(R.prototype,"length",{get:function(){return X(this),this.$$length}}),Object.defineProperty(ce.prototype,"textContent",{get:function(){return C(this)},set:function(D){switch(this.nodeType){case m:case $: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}}}),Wi=function(D,Y,le){D["$$"+Y]=le}}}catch{}return Ki.DocumentType=Se,Ki.DOMException=B,Ki.DOMImplementation=oe,Ki.Element=qe,Ki.Node=ce,Ki.NodeList=U,Ki.XMLSerializer=ui,Ki}var Ur={},wo={},Mc;function O_(){return Mc||(Mc=1,(function(r){var e=Ea().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})(wo)),wo}var Vs={},Pc;function B_(){if(Pc)return Vs;Pc=1;var r=Ea().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,d=5,g=6,m=7;function S(x,w){this.message=x,this.locator=w,Error.captureStackTrace&&Error.captureStackTrace(this,S)}S.prototype=new Error,S.prototype.name=S.name;function T(){}T.prototype={parse:function(x,w,P){var K=this.domBuilder;K.startDocument(),z(w,w={}),b(x,w,P,K,this.errorHandler),K.endDocument()}};function b(x,w,P,K,B){function U(me){if(me>65535){me-=65536;var Fe=55296+(me>>10),qe=56320+(me&1023);return String.fromCharCode(Fe,qe)}else return String.fromCharCode(me)}function R(me){var Fe=me.slice(1,-1);return Object.hasOwnProperty.call(P,Fe)?P[Fe]:Fe.charAt(0)==="#"?U(parseInt(Fe.substr(1).replace("x","0x"))):(B.error("entity not found:"+me),me)}function X(me){if(me>ue){var Fe=x.substring(ue,me).replace(/&#?\w+;/g,R);oe&&F(ue),K.characters(Fe,0,me-ue),ue=me}}function F(me,Fe){for(;me>=Q&&(Fe=Z.exec(x));)M=Fe.index,Q=M+Fe[0].length,oe.lineNumber++;oe.columnNumber=me-M+1}for(var M=0,Q=0,Z=/.*(?:\r\n?|\n)|.*$/g,oe=K.locator,ce=[{currentNSMap:w}],re={},ue=0;;){try{var te=x.indexOf("<",ue);if(te<0){if(!x.substr(ue).match(/^\s*$/)){var Ae=K.doc,we=Ae.createTextNode(x.substr(ue));Ae.appendChild(we),K.currentElement=we}return}switch(te>ue&&X(te),x.charAt(te+1)){case"/":var Ie=x.indexOf(">",te+3),Le=x.substring(te+2,Ie).replace(/[ \t\n\r]+$/g,""),De=ce.pop();Ie<0?(Le=x.substring(te+2).replace(/[\s<].*/,""),B.error("end tag name: "+Le+" is not complete:"+De.tagName),Ie=te+1+Le.length):Le.match(/\s</)&&(Le=Le.replace(/[\s<].*/,""),B.error("end tag name: "+Le+" maybe not complete"),Ie=te+1+Le.length);var Ve=De.localNSMap,Qe=De.tagName==Le,et=Qe||De.tagName&&De.tagName.toLowerCase()==Le.toLowerCase();if(et){if(K.endElement(De.uri,De.localName,Le),Ve)for(var $e in Ve)Object.prototype.hasOwnProperty.call(Ve,$e)&&K.endPrefixMapping($e);Qe||B.fatalError("end tag name: "+Le+" is not match the current start tagName:"+De.tagName)}else ce.push(De);Ie++;break;case"?":oe&&F(te),Ie=j(x,te,K);break;case"!":oe&&F(te),Ie=$(x,te,K,B);break;default:oe&&F(te);var Ge=new N,xt=ce[ce.length-1].currentNSMap,Ie=E(x,te,Ge,xt,R,B),St=Ge.length;if(!Ge.closed&&k(x,Ie,Ge.tagName,re)&&(Ge.closed=!0,P.nbsp||B.warning("unclosed xml attribute")),oe&&St){for(var lt=y(oe,{}),Ee=0;Ee<St;Ee++){var Te=Ge[Ee];F(Te.offset),Te.locator=y(oe,{})}K.locator=lt,I(Ge,K,xt)&&ce.push(Ge),K.locator=oe}else I(Ge,K,xt)&&ce.push(Ge);r.isHTML(Ge.uri)&&!Ge.closed?Ie=O(x,Ie,Ge.tagName,R,K):Ie++}}catch(me){if(me instanceof S)throw me;B.error("element parse error: "+me),Ie=-1}Ie>ue?ue=Ie:X(Math.max(te,ue)+1)}}function y(x,w){return w.lineNumber=x.lineNumber,w.columnNumber=x.columnNumber,w}function E(x,w,P,K,B,U){function R(oe,ce,re){P.attributeNames.hasOwnProperty(oe)&&U.fatalError("Attribute "+oe+" redefined"),P.addValue(oe,ce.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,B),re)}for(var X,F,M=++w,Q=s;;){var Z=x.charAt(M);switch(Z){case"=":if(Q===a)X=x.slice(w,M),Q=l;else if(Q===o)Q=l;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(Q===l||Q===a)if(Q===a&&(U.warning('attribute value must after "="'),X=x.slice(w,M)),w=M+1,M=x.indexOf(Z,w),M>0)F=x.slice(w,M),R(X,F,w-1),Q=d;else throw new Error("attribute value no end '"+Z+"' match");else if(Q==c)F=x.slice(w,M),R(X,F,w),U.warning('attribute "'+X+'" missed start quot('+Z+")!!"),w=M+1,Q=d;else throw new Error('attribute value must after "="');break;case"/":switch(Q){case s:P.setTagName(x.slice(w,M));case d:case g:case m:Q=m,P.closed=!0;case c:case a:break;case o:P.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return U.error("unexpected end of input"),Q==s&&P.setTagName(x.slice(w,M)),M;case">":switch(Q){case s:P.setTagName(x.slice(w,M));case d:case g:case m:break;case c:case a:F=x.slice(w,M),F.slice(-1)==="/"&&(P.closed=!0,F=F.slice(0,-1));case o:Q===o&&(F=X),Q==c?(U.warning('attribute "'+F+'" missed quot(")!'),R(X,F,w)):((!r.isHTML(K[""])||!F.match(/^(?:disabled|checked|selected)$/i))&&U.warning('attribute "'+F+'" missed value!! "'+F+'" instead!!'),R(F,F,w));break;case l:throw new Error("attribute value missed!!")}return M;case"":Z=" ";default:if(Z<=" ")switch(Q){case s:P.setTagName(x.slice(w,M)),Q=g;break;case a:X=x.slice(w,M),Q=o;break;case c:var F=x.slice(w,M);U.warning('attribute "'+F+'" missed quot(")!!'),R(X,F,w);case d:Q=g;break}else switch(Q){case o:P.tagName,(!r.isHTML(K[""])||!X.match(/^(?:disabled|checked|selected)$/i))&&U.warning('attribute "'+X+'" missed value!! "'+X+'" instead2!!'),R(X,X,w),w=M,Q=a;break;case d:U.warning('attribute space is required"'+X+'"!!');case g:Q=a,w=M;break;case l:Q=c,w=M;break;case m:throw new Error("elements closed character '/' and '>' must be connected to")}}M++}}function I(x,w,P){for(var K=x.tagName,B=null,Z=x.length;Z--;){var U=x[Z],R=U.qName,X=U.value,oe=R.indexOf(":");if(oe>0)var F=U.prefix=R.slice(0,oe),M=R.slice(oe+1),Q=F==="xmlns"&&M;else M=R,F=null,Q=R==="xmlns"&&"";U.localName=M,Q!==!1&&(B==null&&(B={},z(P,P={})),P[Q]=B[Q]=X,U.uri=r.XMLNS,w.startPrefixMapping(Q,X))}for(var Z=x.length;Z--;){U=x[Z];var F=U.prefix;F&&(F==="xml"&&(U.uri=r.XML),F!=="xmlns"&&(U.uri=P[F||""]))}var oe=K.indexOf(":");oe>0?(F=x.prefix=K.slice(0,oe),M=x.localName=K.slice(oe+1)):(F=null,M=x.localName=K);var ce=x.uri=P[F||""];if(w.startElement(ce,M,K,x),x.closed){if(w.endElement(ce,M,K),B)for(F in B)Object.prototype.hasOwnProperty.call(B,F)&&w.endPrefixMapping(F)}else return x.currentNSMap=P,x.localNSMap=B,!0}function O(x,w,P,K,B){if(/^(?:script|textarea)$/i.test(P)){var U=x.indexOf("</"+P+">",w),R=x.substring(w+1,U);if(/[&<]/.test(R))return/^script$/i.test(P)?(B.characters(R,0,R.length),U):(R=R.replace(/&#?\w+;/g,K),B.characters(R,0,R.length),U)}return w+1}function k(x,w,P,K){var B=K[P];return B==null&&(B=x.lastIndexOf("</"+P+">"),B<w&&(B=x.lastIndexOf("</"+P)),K[P]=B),B<w}function z(x,w){for(var P in x)Object.prototype.hasOwnProperty.call(x,P)&&(w[P]=x[P])}function $(x,w,P,K){var B=x.charAt(w+2);switch(B){case"-":if(x.charAt(w+3)==="-"){var U=x.indexOf("-->",w+4);return U>w?(P.comment(x,w+4,U-w-4),U+3):(K.error("Unclosed comment"),-1)}else return-1;default:if(x.substr(w+3,6)=="CDATA["){var U=x.indexOf("]]>",w+9);return P.startCDATA(),P.characters(x,w+9,U-w-9),P.endCDATA(),U+3}var R=H(x,w),X=R.length;if(X>1&&/!doctype/i.test(R[0][0])){var F=R[1][0],M=!1,Q=!1;X>3&&(/^public$/i.test(R[2][0])?(M=R[3][0],Q=X>4&&R[4][0]):/^system$/i.test(R[2][0])&&(Q=R[3][0]));var Z=R[X-1];return P.startDTD(F,M,Q),P.endDTD(),Z.index+Z[0].length}}return-1}function j(x,w,P){var K=x.indexOf("?>",w);if(K){var B=x.substring(w,K).match(/^<\?(\S*)\s*([\s\S]*?)$/);return B?(B[0].length,P.processingInstruction(B[1],B[2]),K+2):-1}return-1}function N(){this.attributeNames={}}N.prototype={setTagName:function(x){if(!n.test(x))throw new Error("invalid tagName:"+x);this.tagName=x},addValue:function(x,w,P){if(!n.test(x))throw new Error("invalid attribute:"+x);this.attributeNames[x]=this.length,this[this.length++]={qName:x,value:w,offset:P}},length:0,getLocalName:function(x){return this[x].localName},getLocator:function(x){return this[x].locator},getQName:function(x){return this[x].qName},getURI:function(x){return this[x].uri},getValue:function(x){return this[x].value}};function H(x,w){var P,K=[],B=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(B.lastIndex=w,B.exec(x);P=B.exec(x);)if(K.push(P),P[1])return K}return Vs.XMLReader=T,Vs.ParseError=S,Vs}var Rc;function L_(){if(Rc)return Ur;Rc=1;var r=Ea(),e=Sh(),t=O_(),n=B_(),s=e.DOMImplementation,a=r.NAMESPACE,o=n.ParseError,l=n.XMLReader;function c(E){return E.replace(/\r[\n\u0085]/g,`
|
|
25
25
|
`).replace(/[\r\u0085\u2028]/g,`
|
|
26
|
-
`)}function d(E){this.options=E||{locator:{}}}d.prototype.parseFromString=function(E,
|
|
27
|
-
@`+(E.systemId||"")+"#[line:"+E.lineNumber+",col:"+E.columnNumber+"]"}function T(E,O,D){return typeof E=="string"?E.substr(O,D):E.length>=O+D||O?new java.lang.String(E,O,D)+"":E}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(E){m.prototype[E]=function(){return null}});function y(E,O){E.currentElement?E.currentElement.appendChild(O):E.doc.appendChild(O)}return Ur.__DOMHandler=m,Ur.normalizeLineEndings=c,Ur.DOMParser=d,Ur}var Vc;function M_(){if(Vc)return $r;Vc=1;var r=Sh();return $r.DOMImplementation=r.DOMImplementation,$r.XMLSerializer=r.XMLSerializer,$r.DOMParser=L_().DOMParser,$r}var P_=M_();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const Fc=r=>!!r&&typeof r=="object",Mt=(...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]):Fc(e[n])&&Fc(t[n])?e[n]=Mt(e[n],t[n]):e[n]=t[n]}),e),{}),Eh=r=>Object.keys(r).map(e=>r[e]),R_=(r,e)=>{const t=[];for(let n=r;n<e;n++)t.push(n);return t},sr=r=>r.reduce((e,t)=>e.concat(t),[]),kh=r=>{if(!r.length)return[];const e=[];for(let t=0;t<r.length;t++)e.push(r[t]);return e},V_=(r,e)=>r.reduce((t,n,s)=>(n[e]&&t.push(s),t),[]),F_=(r,e)=>Eh(r.reduce((t,n)=>(n.forEach(s=>{t[e(s)]=s}),t),{}));var ar={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const is=({baseUrl:r="",source:e="",range:t="",indexRange:n=""})=>{const s={uri:e,resolvedUri:Sa(r||"",e)};if(t||n){const o=(t||n).split("-");let l=G.BigInt?G.BigInt(o[0]):parseInt(o[0],10),c=G.BigInt?G.BigInt(o[1]):parseInt(o[1],10);l<Number.MAX_SAFE_INTEGER&&typeof l=="bigint"&&(l=Number(l)),c<Number.MAX_SAFE_INTEGER&&typeof c=="bigint"&&(c=Number(c));let d;typeof c=="bigint"||typeof l=="bigint"?d=G.BigInt(c)-G.BigInt(l)+G.BigInt(1):d=c-l+1,typeof d=="bigint"&&d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),s.byterange={length:d,offset:l}}return s},$_=r=>{let e;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=G.BigInt(r.offset)+G.BigInt(r.length)-G.BigInt(1):e=r.offset+r.length-1,`${r.offset}-${e}`},$c=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),U_={static(r){const{duration:e,timescale:t=1,sourceDuration:n,periodDuration:s}=r,a=$c(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,d=$c(r.endNumber),g=(e+t)/1e3,m=n+o,b=g+l-m,T=Math.ceil(b*s/a),y=Math.floor((g-m-c)*s/a),E=Math.floor((g-m)*s/a);return{start:Math.max(0,y),end:typeof d=="number"?d:Math.min(T,E)}}},q_=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}},Dl=r=>{const{type:e,duration:t,timescale:n=1,periodDuration:s,sourceDuration:a}=r,{start:o,end:l}=U_[e](r),c=R_(o,l).map(q_(r));if(e==="static"){const d=c.length-1,g=typeof s=="number"?s:a;c[d].duration=g-t/n*d}return c},wh=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(ar.NO_BASE_URL);const d=is({baseUrl:e,source:t.sourceURL,range:t.range}),g=is({baseUrl:e,source:e,indexRange:s});if(g.map=d,c){const m=Dl(r);m.length&&(g.duration=m[0].duration,g.timeline=m[0].timeline)}else n&&(g.duration=n,g.timeline=a);return g.presentationTime=o||a,g.number=l,[g]},Al=(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,d=e.references.filter(E=>E.referenceType!==1),g=[],m=r.endList?"static":"dynamic",S=r.sidx.timeline;let b=S,T=r.mediaSequence||0,y;typeof e.firstOffset=="bigint"?y=G.BigInt(l)+e.firstOffset:y=l+e.firstOffset;for(let E=0;E<d.length;E++){const O=e.references[E],D=O.referencedSize,I=O.subsegmentDuration;let H;typeof y=="bigint"?H=y+G.BigInt(D)-G.BigInt(1):H=y+D-1;const $=`${y}-${H}`,N=wh({baseUrl:t,timescale:c,timeline:a,periodStart:S,presentationTime:b,number:T,duration:I,sourceDuration:s,indexRange:$,type:m})[0];n&&(N.map=n),g.push(N),typeof y=="bigint"?y+=G.BigInt(D):y+=D,b+=I/c,T++}return r.segments=g,r},z_=["AUDIO","SUBTITLES"],j_=1/60,Dh=r=>F_(r,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),H_=(r,e)=>{for(let t=0;t<r.length;t++)if(r[t].attributes.NAME===e)return r[t];return null},Uc=r=>{let e=[];return I_(r,z_,(t,n,s,a)=>{e=e.concat(t.playlists||[])}),e},qc=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((t,n)=>{t.number=r.mediaSequence+n})},G_=({oldPlaylists:r,newPlaylists:e,timelineStarts:t})=>{e.forEach(n=>{n.discontinuitySequence=t.findIndex(function({timeline:c}){return c===n.timeline});const s=H_(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)<j_});if(o===-1){qc({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--),qc({playlist:n,mediaSequence:s.segments[o].number})})},W_=({oldManifest:r,newManifest:e})=>{const t=r.playlists.concat(Uc(r)),n=e.playlists.concat(Uc(e));return e.timelineStarts=Dh([r.timelineStarts,e.timelineStarts]),G_({oldPlaylists:t,newPlaylists:n,timelineStarts:e.timelineStarts}),e},ka=r=>r&&r.uri+"-"+$_(r.byterange),Do=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=Eh(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=V_(n.segments||[],"discontinuity"),n))},Nl=(r,e)=>{const t=ka(r.sidx),n=t&&e[t]&&e[t].sidx;return n&&Al(r,n,r.sidx.resolvedUri),r},Y_=(r,e={})=>{if(!Object.keys(e).length)return r;for(const t in r)r[t]=Nl(r[t],e);return r},X_=({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},K_=({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},Q_=(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 d=o.attributes.label||"main";if(c&&!o.attributes.label){const m=l?` (${l})`:"";d=`${o.attributes.lang}${m}`}a[d]||(a[d]={language:c,autoselect:!0,default:l==="main",playlists:[],uri:""});const g=Nl(X_(o,t),e);return a[d].playlists.push(g),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},Z_=(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(Nl(K_(n),e)),t},{}),J_=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),{}),e3=({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},t3=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",i3=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",n3=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",r3=(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})})},zc=r=>r?Object.keys(r).reduce((e,t)=>{const n=r[t];return e.concat(n.playlists)},[]):[],s3=({dashPlaylists:r,locations:e,contentSteering:t,sidxMapping:n={},previousManifest:s,eventStream:a})=>{if(!r.length)return{};const{sourceDuration:o,type:l,suggestedPresentationDelay:c,minimumUpdatePeriod:d}=r[0].attributes,g=Do(r.filter(t3)).map(e3),m=Do(r.filter(i3)),S=Do(r.filter(n3)),b=r.map(H=>H.attributes.captionServices).filter(Boolean),T={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:Y_(g,n)};d>=0&&(T.minimumUpdatePeriod=d*1e3),e&&(T.locations=e),t&&(T.contentSteering=t),l==="dynamic"&&(T.suggestedPresentationDelay=c),a&&a.length>0&&(T.eventStream=a);const y=T.playlists.length===0,E=m.length?Q_(m,n,y):null,O=S.length?Z_(S,n):null,D=g.concat(zc(E),zc(O)),I=D.map(({timelineStarts:H})=>H);return T.timelineStarts=Dh(I),r3(D,T.timelineStarts),E&&(T.mediaGroups.AUDIO.audio=E),O&&(T.mediaGroups.SUBTITLES.subs=O),b.length&&(T.mediaGroups["CLOSED-CAPTIONS"].cc=J_(b)),s?W_({oldManifest:s,newManifest:T}):T},a3=(r,e,t)=>{const{NOW:n,clientOffset:s,availabilityStartTime:a,timescale:o=1,periodStart:l=0,minimumUpdatePeriod:c=0}=r,d=(n+s)/1e3,g=a+l,S=d+c-g;return Math.ceil((S*o-e)/t)},Ah=(r,e)=>{const{type:t,minimumUpdatePeriod:n=0,media:s="",sourceDuration:a,timescale:o=1,startNumber:l=1,periodStart:c}=r,d=[];let g=-1;for(let m=0;m<e.length;m++){const S=e[m],b=S.d,T=S.r||0,y=S.t||0;g<0&&(g=y),y&&y>g&&(g=y);let E;if(T<0){const I=m+1;I===e.length?t==="dynamic"&&n>0&&s.indexOf("$Number$")>0?E=a3(r,g,b):E=(a*o-g)/b:E=(e[I].t-g)/b}else E=T+1;const O=l+d.length+E;let D=l+d.length;for(;D<O;)d.push({number:D,duration:b/o,time:g,timeline:c}),g+=b,D++}return d},o3=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,l3=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}`},jc=(r,e)=>r.replace(o3,l3(e)),u3=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?Dl(r):Ah(r,e),c3=(r,e)=>{const t={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=r,s=is({baseUrl:r.baseUrl,source:jc(n.sourceURL,t),range:n.range});return u3(r,e).map(o=>{t.Number=o.number,t.Time=o.time;const l=jc(r.media||"",t),c=r.timescale||1,d=r.presentationTimeOffset||0,g=r.periodStart+(o.time-d)/c;return{uri:l,timeline:o.timeline,duration:o.duration,resolvedUri:Sa(r.baseUrl||"",l),map:s,number:o.number,presentationTime:g}})},d3=(r,e)=>{const{baseUrl:t,initialization:n={}}=r,s=is({baseUrl:t,source:n.sourceURL,range:n.range}),a=is({baseUrl:t,source:e.media,range:e.mediaRange});return a.map=s,a},h3=(r,e)=>{const{duration:t,segmentUrls:n=[],periodStart:s}=r;if(!t&&!e||t&&e)throw new Error(ar.SEGMENT_TIME_UNSPECIFIED);const a=n.map(c=>d3(r,c));let o;return t&&(o=Dl(r)),e&&(o=Ah(r,e)),o.map((c,d)=>{if(a[d]){const g=a[d],m=r.timescale||1,S=r.presentationTimeOffset||0;return g.timeline=c.timeline,g.duration=c.duration,g.number=c.number,g.presentationTime=s+(c.time-S)/m,g}}).filter(c=>c)},f3=({attributes:r,segmentInfo:e})=>{let t,n;e.template?(n=c3,t=Mt(r,e.template)):e.base?(n=wh,t=Mt(r,e.base)):e.list&&(n=h3,t=Mt(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},p3=r=>r.map(f3),ht=(r,e)=>kh(r.childNodes).filter(({tagName:t})=>t===e),os=r=>r.textContent.trim(),m3=r=>parseFloat(r.split("/").reduce((e,t)=>e/t)),zn=r=>{const l=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(r);if(!l)return 0;const[c,d,g,m,S,b]=l.slice(1);return parseFloat(c||0)*31536e3+parseFloat(d||0)*2592e3+parseFloat(g||0)*86400+parseFloat(m||0)*3600+parseFloat(S||0)*60+parseFloat(b||0)},g3=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),Hc={mediaPresentationDuration(r){return zn(r)},availabilityStartTime(r){return g3(r)/1e3},minimumUpdatePeriod(r){return zn(r)},suggestedPresentationDelay(r){return zn(r)},type(r){return r},timeShiftBufferDepth(r){return zn(r)},start(r){return zn(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return m3(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)?zn(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}},Ct=r=>r&&r.attributes?kh(r.attributes).reduce((e,t)=>{const n=Hc[t.name]||Hc.DEFAULT;return e[t.name]=n(t.value),e},{}):{},v3={"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"},wa=(r,e)=>e.length?sr(r.map(function(t){return e.map(function(n){const s=os(n),a=Sa(t.baseUrl,s),o=Mt(Ct(n),{baseUrl:a});return a!==s&&!o.serviceLocation&&t.serviceLocation&&(o.serviceLocation=t.serviceLocation),o})})):r,Il=r=>{const e=ht(r,"SegmentTemplate")[0],t=ht(r,"SegmentList")[0],n=t&&ht(t,"SegmentURL").map(m=>Mt({tag:"SegmentURL"},Ct(m))),s=ht(r,"SegmentBase")[0],a=t||e,o=a&&ht(a,"SegmentTimeline")[0],l=t||s||e,c=l&&ht(l,"Initialization")[0],d=e&&Ct(e);d&&c?d.initialization=c&&Ct(c):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const g={template:d,segmentTimeline:o&&ht(o,"S").map(m=>Ct(m)),list:t&&Mt(Ct(t),{segmentUrls:n,initialization:Ct(c)}),base:s&&Mt(Ct(s),{initialization:Ct(c)})};return Object.keys(g).forEach(m=>{g[m]||delete g[m]}),g},y3=(r,e,t)=>n=>{const s=ht(n,"BaseURL"),a=wa(e,s),o=Mt(r,Ct(n)),l=Il(n);return a.map(c=>({segmentInfo:Mt(t,l),attributes:Mt(o,c)}))},_3=r=>r.reduce((e,t)=>{const n=Ct(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());const s=v3[n.schemeIdUri];if(s){e[s]={attributes:n};const a=ht(t,"cenc:pssh")[0];if(a){const o=os(a);e[s].pssh=o&&yh(o)}}return e},{}),T3=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})},b3=r=>sr(ht(r.node,"EventStream").map(e=>{const t=Ct(e),n=t.schemeIdUri;return ht(e,"Event").map(s=>{const a=Ct(s),o=a.presentationTime||0,l=t.timescale||1,c=a.duration||0,d=o/l+r.attributes.start;return{schemeIdUri:n,value:t.value,id:a.id,start:d,end:d+c/l,messageData:os(s)||a.messageData,contentEncoding:t.contentEncoding,presentationTimeOffset:t.presentationTimeOffset||0}})})),x3=(r,e,t)=>n=>{const s=Ct(n),a=wa(e,ht(n,"BaseURL")),o=ht(n,"Role")[0],l={role:Ct(o)};let c=Mt(r,s,l);const d=ht(n,"Accessibility")[0],g=T3(Ct(d));g&&(c=Mt(c,{captionServices:g}));const m=ht(n,"Label")[0];if(m&&m.childNodes.length){const E=m.childNodes[0].nodeValue.trim();c=Mt(c,{label:E})}const S=_3(ht(n,"ContentProtection"));Object.keys(S).length&&(c=Mt(c,{contentProtection:S}));const b=Il(n),T=ht(n,"Representation"),y=Mt(t,b);return sr(T.map(y3(c,a,y)))},C3=(r,e)=>(t,n)=>{const s=wa(e,ht(t.node,"BaseURL")),a=Mt(r,{periodStart:t.attributes.start});typeof t.attributes.duration=="number"&&(a.periodDuration=t.attributes.duration);const o=ht(t.node,"AdaptationSet"),l=Il(t.node);return sr(o.map(x3(a,s,l)))},S3=(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=Mt({serverURL:os(r[0])},Ct(r[0]));return t.queryBeforeStart=t.queryBeforeStart==="true",t},E3=({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,k3=(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(ar.INVALID_NUMBER_OF_PERIOD);const l=ht(r,"Location"),c=Ct(r),d=wa([{baseUrl:t}],ht(r,"BaseURL")),g=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(os));const m=[];return o.forEach((S,b)=>{const T=Ct(S),y=m[b-1];T.start=E3({attributes:T,priorPeriodAttributes:y?y.attributes:null,mpdType:c.type}),m.push({node:S,attributes:T})}),{locations:c.locations,contentSteeringInfo:S3(g,a),representationInfo:sr(m.map(C3(c,d))),eventStream:sr(m.map(b3))}},Nh=r=>{if(r==="")throw new Error(ar.DASH_EMPTY_MANIFEST);const e=new P_.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(ar.DASH_INVALID_XML);return n},w3=r=>{const e=ht(r,"UTCTiming")[0];if(!e)return null;const t=Ct(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(ar.UNSUPPORTED_UTC_TIMING_SCHEME)}return t},D3=(r,e={})=>{const t=k3(Nh(r),e),n=p3(t.representationInfo);return s3({dashPlaylists:n,locations:t.locations,contentSteering:t.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:t.eventStream})},A3=r=>w3(Nh(r));var Ao,Gc;function N3(){if(Gc)return Ao;Gc=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 Ao={getUint64:e,MAX_UINT32:r},Ao}var No,Wc;function I3(){if(Wc)return No;Wc=1;var r=N3().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 No=e,No}var O3=I3();const B3=fr(O3);var L3=Pe([73,68,51]),M3=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},Gr=function r(e,t){return t===void 0&&(t=0),e=Pe(e),e.length-t<10||!dt(e,L3,{offset:t})?t:(t+=M3(e,t),r(e,t))},Yc=function(e){return typeof e=="string"?Ch(e):e},P3=function(e){return Array.isArray(e)?e.map(function(t){return Yc(t)}):[Yc(e)]},R3=function r(e,t,n){n===void 0&&(n=!1),t=P3(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 d=e.subarray(a+8,c);dt(l,t[0])&&(t.length===1?s.push(d):s.push.apply(s,r(d,t.slice(1),n))),a=c}return s},Fs={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])},Zo=[128,64,32,16,8,4,2,1],V3=function(e){for(var t=1,n=0;n<Zo.length&&!(e&Zo[n]);n++)t++;return t},ta=function(e,t,n,s){n===void 0&&(n=!0),s===void 0&&(s=!1);var a=V3(e[t]),o=e.subarray(t,t+a);return n&&(o=Array.prototype.slice.call(e,t,t+a),o[0]^=Zo[a-1]),{length:a,value:D_(o,{signed:s}),bytes:o}},Xc=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(t){return r(t)}):typeof e=="number"?A_(e):e},F3=function(e){return Array.isArray(e)?e.map(function(t){return Xc(t)}):[Xc(e)]},$3=function r(e,t,n){if(n>=t.length)return t.length;var s=ta(t,n,!1);if(dt(e.bytes,s.bytes))return n;var a=ta(t,n+s.length);return r(e,t,n+a.length+a.value+s.length)},Kc=function r(e,t){t=F3(t),e=Pe(e);var n=[];if(!t.length)return n;for(var s=0;s<e.length;){var a=ta(e,s,!1),o=ta(e,s+a.length),l=s+a.length+o.length;o.value===127&&(o.value=$3(a,e,l),o.value!==e.length&&(o.value-=l));var c=l+o.value>e.length?e.length:l+o.value,d=e.subarray(l,c);dt(t[0],a.bytes)&&(t.length===1?n.push(d):n=n.concat(r(d,t.slice(1))));var g=a.length+o.length+d.length;s+=g}return n},U3=Pe([0,0,0,1]),q3=Pe([0,0,1]),z3=Pe([0,0,3]),j3=function(e){for(var t=[],n=1;n<e.length-2;)dt(e.subarray(n,n+3),z3)&&(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},Ih=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),U3)?c=4:dt(e.subarray(a),q3)&&(c=3),!c){a++;continue}if(l++,o)return j3(e.subarray(o,a));var d=void 0;t==="h264"?d=e[a+c]&31:t==="h265"&&(d=e[a+c]>>1&63),n.indexOf(d)!==-1&&(o=a+c),a+=c+(t==="h264"?1:2)}return e.subarray(0,0)},H3=function(e,t,n){return Ih(e,"h264",t,n)},G3=function(e,t,n){return Ih(e,"h265",t,n)},Jt={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])},or={aac:function(e){var t=Gr(e);return dt(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Gr(e);return dt(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Kc(e,[Fs.EBML,Fs.DocType])[0];return dt(t,Jt.webm)},mkv:function(e){var t=Kc(e,[Fs.EBML,Fs.DocType])[0];return dt(t,Jt.matroska)},mp4:function(e){if(or["3gp"](e)||or.mov(e))return!1;if(dt(e,Jt.mp4,{offset:4})||dt(e,Jt.fmp4,{offset:4})||dt(e,Jt.moof,{offset:4})||dt(e,Jt.moov,{offset:4}))return!0},mov:function(e){return dt(e,Jt.mov,{offset:4})},"3gp":function(e){return dt(e,Jt["3gp"],{offset:4})},ac3:function(e){var t=Gr(e);return dt(e,Jt.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=Gr(e);return dt(e,Jt.flac,{offset:t})},ogg:function(e){return dt(e,Jt.ogg)},avi:function(e){return dt(e,Jt.riff)&&dt(e,Jt.avi,{offset:8})},wav:function(e){return dt(e,Jt.riff)&&dt(e,Jt.wav,{offset:8})},h264:function(e){return H3(e,7,3).length},h265:function(e){return G3(e,[32,33],3).length}},Jo=Object.keys(or).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);Jo.forEach(function(r){var e=or[r];or[r]=function(t){return e(Pe(t))}});var W3=or,Ol=function(e){e=Pe(e);for(var t=0;t<Jo.length;t++){var n=Jo[t];if(W3[n](e))return n}return""},Y3=function(e){return R3(e,["moof"]).length>0},Io,Qc;function X3(){if(Qc)return Io;Qc=1;var r=9e4,e,t,n,s,a,o,l;return e=function(c){return c*r},t=function(c,d){return c*d},n=function(c){return c/r},s=function(c,d){return c/d},a=function(c,d){return e(s(c,d))},o=function(c,d){return t(n(c),d)},l=function(c,d,g){return n(g?c:c-d)},Io={ONE_SECOND_IN_TS:r,secondsToVideoTs:e,secondsToAudioTs:t,videoTsToSeconds:n,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l},Io}var Nn=X3();/**
|
|
26
|
+
`)}function d(E){this.options=E||{locator:{}}}d.prototype.parseFromString=function(E,I){var O=this.options,k=new l,z=O.domBuilder||new m,$=O.errorHandler,j=O.locator,N=O.xmlns||{},H=/\/x?html?$/.test(I),x=H?t.HTML_ENTITIES:t.XML_ENTITIES;j&&z.setDocumentLocator(j),k.errorHandler=g($,z,j),k.domBuilder=O.domBuilder||z,H&&(N[""]=a.HTML),N.xml=N.xml||a.XML;var w=O.normalizeLineEndings||c;return E&&typeof E=="string"?k.parse(w(E),N,x):k.errorHandler.error("invalid doc source"),z.doc};function g(E,I,O){if(!E){if(I instanceof m)return I;E=I}var k={},z=E instanceof Function;O=O||{};function $(j){var N=E[j];!N&&z&&(N=E.length==2?function(H){E(j,H)}:E),k[j]=N&&function(H){N("[xmldom "+j+"] "+H+T(O))}||function(){}}return $("warning"),$("error"),$("fatalError"),k}function m(){this.cdata=!1}function S(E,I){I.lineNumber=E.lineNumber,I.columnNumber=E.columnNumber}m.prototype={startDocument:function(){this.doc=new s().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(E,I,O,k){var z=this.doc,$=z.createElementNS(E,O||I),j=k.length;y(this,$),this.currentElement=$,this.locator&&S(this.locator,$);for(var N=0;N<j;N++){var E=k.getURI(N),H=k.getValue(N),O=k.getQName(N),x=z.createAttributeNS(E,O);this.locator&&S(k.getLocator(N),x),x.value=x.nodeValue=H,$.setAttributeNode(x)}},endElement:function(E,I,O){var k=this.currentElement;k.tagName,this.currentElement=k.parentNode},startPrefixMapping:function(E,I){},endPrefixMapping:function(E){},processingInstruction:function(E,I){var O=this.doc.createProcessingInstruction(E,I);this.locator&&S(this.locator,O),y(this,O)},ignorableWhitespace:function(E,I,O){},characters:function(E,I,O){if(E=b.apply(this,arguments),E){if(this.cdata)var k=this.doc.createCDATASection(E);else var k=this.doc.createTextNode(E);this.currentElement?this.currentElement.appendChild(k):/^\s*$/.test(E)&&this.doc.appendChild(k),this.locator&&S(this.locator,k)}},skippedEntity:function(E){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(E){(this.locator=E)&&(E.lineNumber=0)},comment:function(E,I,O){E=b.apply(this,arguments);var k=this.doc.createComment(E);this.locator&&S(this.locator,k),y(this,k)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(E,I,O){var k=this.doc.implementation;if(k&&k.createDocumentType){var z=k.createDocumentType(E,I,O);this.locator&&S(this.locator,z),y(this,z),this.doc.doctype=z}},warning:function(E){console.warn("[xmldom warning] "+E,T(this.locator))},error:function(E){console.error("[xmldom error] "+E,T(this.locator))},fatalError:function(E){throw new o(E,this.locator)}};function T(E){if(E)return`
|
|
27
|
+
@`+(E.systemId||"")+"#[line:"+E.lineNumber+",col:"+E.columnNumber+"]"}function b(E,I,O){return typeof E=="string"?E.substr(I,O):E.length>=I+O||I?new java.lang.String(E,I,O)+"":E}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(E){m.prototype[E]=function(){return null}});function y(E,I){E.currentElement?E.currentElement.appendChild(I):E.doc.appendChild(I)}return Ur.__DOMHandler=m,Ur.normalizeLineEndings=c,Ur.DOMParser=d,Ur}var Vc;function M_(){if(Vc)return $r;Vc=1;var r=Sh();return $r.DOMImplementation=r.DOMImplementation,$r.XMLSerializer=r.XMLSerializer,$r.DOMParser=L_().DOMParser,$r}var P_=M_();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const Fc=r=>!!r&&typeof r=="object",Mt=(...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]):Fc(e[n])&&Fc(t[n])?e[n]=Mt(e[n],t[n]):e[n]=t[n]}),e),{}),Eh=r=>Object.keys(r).map(e=>r[e]),R_=(r,e)=>{const t=[];for(let n=r;n<e;n++)t.push(n);return t},sr=r=>r.reduce((e,t)=>e.concat(t),[]),kh=r=>{if(!r.length)return[];const e=[];for(let t=0;t<r.length;t++)e.push(r[t]);return e},V_=(r,e)=>r.reduce((t,n,s)=>(n[e]&&t.push(s),t),[]),F_=(r,e)=>Eh(r.reduce((t,n)=>(n.forEach(s=>{t[e(s)]=s}),t),{}));var ar={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const is=({baseUrl:r="",source:e="",range:t="",indexRange:n=""})=>{const s={uri:e,resolvedUri:Sa(r||"",e)};if(t||n){const o=(t||n).split("-");let l=G.BigInt?G.BigInt(o[0]):parseInt(o[0],10),c=G.BigInt?G.BigInt(o[1]):parseInt(o[1],10);l<Number.MAX_SAFE_INTEGER&&typeof l=="bigint"&&(l=Number(l)),c<Number.MAX_SAFE_INTEGER&&typeof c=="bigint"&&(c=Number(c));let d;typeof c=="bigint"||typeof l=="bigint"?d=G.BigInt(c)-G.BigInt(l)+G.BigInt(1):d=c-l+1,typeof d=="bigint"&&d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),s.byterange={length:d,offset:l}}return s},$_=r=>{let e;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=G.BigInt(r.offset)+G.BigInt(r.length)-G.BigInt(1):e=r.offset+r.length-1,`${r.offset}-${e}`},$c=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),U_={static(r){const{duration:e,timescale:t=1,sourceDuration:n,periodDuration:s}=r,a=$c(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,d=$c(r.endNumber),g=(e+t)/1e3,m=n+o,T=g+l-m,b=Math.ceil(T*s/a),y=Math.floor((g-m-c)*s/a),E=Math.floor((g-m)*s/a);return{start:Math.max(0,y),end:typeof d=="number"?d:Math.min(b,E)}}},q_=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}},Dl=r=>{const{type:e,duration:t,timescale:n=1,periodDuration:s,sourceDuration:a}=r,{start:o,end:l}=U_[e](r),c=R_(o,l).map(q_(r));if(e==="static"){const d=c.length-1,g=typeof s=="number"?s:a;c[d].duration=g-t/n*d}return c},wh=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(ar.NO_BASE_URL);const d=is({baseUrl:e,source:t.sourceURL,range:t.range}),g=is({baseUrl:e,source:e,indexRange:s});if(g.map=d,c){const m=Dl(r);m.length&&(g.duration=m[0].duration,g.timeline=m[0].timeline)}else n&&(g.duration=n,g.timeline=a);return g.presentationTime=o||a,g.number=l,[g]},Al=(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,d=e.references.filter(E=>E.referenceType!==1),g=[],m=r.endList?"static":"dynamic",S=r.sidx.timeline;let T=S,b=r.mediaSequence||0,y;typeof e.firstOffset=="bigint"?y=G.BigInt(l)+e.firstOffset:y=l+e.firstOffset;for(let E=0;E<d.length;E++){const I=e.references[E],O=I.referencedSize,k=I.subsegmentDuration;let z;typeof y=="bigint"?z=y+G.BigInt(O)-G.BigInt(1):z=y+O-1;const $=`${y}-${z}`,N=wh({baseUrl:t,timescale:c,timeline:a,periodStart:S,presentationTime:T,number:b,duration:k,sourceDuration:s,indexRange:$,type:m})[0];n&&(N.map=n),g.push(N),typeof y=="bigint"?y+=G.BigInt(O):y+=O,T+=k/c,b++}return r.segments=g,r},z_=["AUDIO","SUBTITLES"],j_=1/60,Dh=r=>F_(r,({timeline:e})=>e).sort((e,t)=>e.timeline>t.timeline?1:-1),H_=(r,e)=>{for(let t=0;t<r.length;t++)if(r[t].attributes.NAME===e)return r[t];return null},Uc=r=>{let e=[];return I_(r,z_,(t,n,s,a)=>{e=e.concat(t.playlists||[])}),e},qc=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((t,n)=>{t.number=r.mediaSequence+n})},G_=({oldPlaylists:r,newPlaylists:e,timelineStarts:t})=>{e.forEach(n=>{n.discontinuitySequence=t.findIndex(function({timeline:c}){return c===n.timeline});const s=H_(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)<j_});if(o===-1){qc({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--),qc({playlist:n,mediaSequence:s.segments[o].number})})},W_=({oldManifest:r,newManifest:e})=>{const t=r.playlists.concat(Uc(r)),n=e.playlists.concat(Uc(e));return e.timelineStarts=Dh([r.timelineStarts,e.timelineStarts]),G_({oldPlaylists:t,newPlaylists:n,timelineStarts:e.timelineStarts}),e},ka=r=>r&&r.uri+"-"+$_(r.byterange),Do=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=Eh(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=V_(n.segments||[],"discontinuity"),n))},Nl=(r,e)=>{const t=ka(r.sidx),n=t&&e[t]&&e[t].sidx;return n&&Al(r,n,r.sidx.resolvedUri),r},Y_=(r,e={})=>{if(!Object.keys(e).length)return r;for(const t in r)r[t]=Nl(r[t],e);return r},X_=({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},K_=({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},Q_=(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 d=o.attributes.label||"main";if(c&&!o.attributes.label){const m=l?` (${l})`:"";d=`${o.attributes.lang}${m}`}a[d]||(a[d]={language:c,autoselect:!0,default:l==="main",playlists:[],uri:""});const g=Nl(X_(o,t),e);return a[d].playlists.push(g),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},Z_=(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(Nl(K_(n),e)),t},{}),J_=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),{}),e3=({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},t3=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",i3=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",n3=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",r3=(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})})},zc=r=>r?Object.keys(r).reduce((e,t)=>{const n=r[t];return e.concat(n.playlists)},[]):[],s3=({dashPlaylists:r,locations:e,contentSteering:t,sidxMapping:n={},previousManifest:s,eventStream:a})=>{if(!r.length)return{};const{sourceDuration:o,type:l,suggestedPresentationDelay:c,minimumUpdatePeriod:d}=r[0].attributes,g=Do(r.filter(t3)).map(e3),m=Do(r.filter(i3)),S=Do(r.filter(n3)),T=r.map(z=>z.attributes.captionServices).filter(Boolean),b={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:Y_(g,n)};d>=0&&(b.minimumUpdatePeriod=d*1e3),e&&(b.locations=e),t&&(b.contentSteering=t),l==="dynamic"&&(b.suggestedPresentationDelay=c),a&&a.length>0&&(b.eventStream=a);const y=b.playlists.length===0,E=m.length?Q_(m,n,y):null,I=S.length?Z_(S,n):null,O=g.concat(zc(E),zc(I)),k=O.map(({timelineStarts:z})=>z);return b.timelineStarts=Dh(k),r3(O,b.timelineStarts),E&&(b.mediaGroups.AUDIO.audio=E),I&&(b.mediaGroups.SUBTITLES.subs=I),T.length&&(b.mediaGroups["CLOSED-CAPTIONS"].cc=J_(T)),s?W_({oldManifest:s,newManifest:b}):b},a3=(r,e,t)=>{const{NOW:n,clientOffset:s,availabilityStartTime:a,timescale:o=1,periodStart:l=0,minimumUpdatePeriod:c=0}=r,d=(n+s)/1e3,g=a+l,S=d+c-g;return Math.ceil((S*o-e)/t)},Ah=(r,e)=>{const{type:t,minimumUpdatePeriod:n=0,media:s="",sourceDuration:a,timescale:o=1,startNumber:l=1,periodStart:c}=r,d=[];let g=-1;for(let m=0;m<e.length;m++){const S=e[m],T=S.d,b=S.r||0,y=S.t||0;g<0&&(g=y),y&&y>g&&(g=y);let E;if(b<0){const k=m+1;k===e.length?t==="dynamic"&&n>0&&s.indexOf("$Number$")>0?E=a3(r,g,T):E=(a*o-g)/T:E=(e[k].t-g)/T}else E=b+1;const I=l+d.length+E;let O=l+d.length;for(;O<I;)d.push({number:O,duration:T/o,time:g,timeline:c}),g+=T,O++}return d},o3=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,l3=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}`},jc=(r,e)=>r.replace(o3,l3(e)),u3=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?Dl(r):Ah(r,e),c3=(r,e)=>{const t={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=r,s=is({baseUrl:r.baseUrl,source:jc(n.sourceURL,t),range:n.range});return u3(r,e).map(o=>{t.Number=o.number,t.Time=o.time;const l=jc(r.media||"",t),c=r.timescale||1,d=r.presentationTimeOffset||0,g=r.periodStart+(o.time-d)/c;return{uri:l,timeline:o.timeline,duration:o.duration,resolvedUri:Sa(r.baseUrl||"",l),map:s,number:o.number,presentationTime:g}})},d3=(r,e)=>{const{baseUrl:t,initialization:n={}}=r,s=is({baseUrl:t,source:n.sourceURL,range:n.range}),a=is({baseUrl:t,source:e.media,range:e.mediaRange});return a.map=s,a},h3=(r,e)=>{const{duration:t,segmentUrls:n=[],periodStart:s}=r;if(!t&&!e||t&&e)throw new Error(ar.SEGMENT_TIME_UNSPECIFIED);const a=n.map(c=>d3(r,c));let o;return t&&(o=Dl(r)),e&&(o=Ah(r,e)),o.map((c,d)=>{if(a[d]){const g=a[d],m=r.timescale||1,S=r.presentationTimeOffset||0;return g.timeline=c.timeline,g.duration=c.duration,g.number=c.number,g.presentationTime=s+(c.time-S)/m,g}}).filter(c=>c)},f3=({attributes:r,segmentInfo:e})=>{let t,n;e.template?(n=c3,t=Mt(r,e.template)):e.base?(n=wh,t=Mt(r,e.base)):e.list&&(n=h3,t=Mt(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},p3=r=>r.map(f3),ht=(r,e)=>kh(r.childNodes).filter(({tagName:t})=>t===e),os=r=>r.textContent.trim(),m3=r=>parseFloat(r.split("/").reduce((e,t)=>e/t)),zn=r=>{const l=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(r);if(!l)return 0;const[c,d,g,m,S,T]=l.slice(1);return parseFloat(c||0)*31536e3+parseFloat(d||0)*2592e3+parseFloat(g||0)*86400+parseFloat(m||0)*3600+parseFloat(S||0)*60+parseFloat(T||0)},g3=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),Hc={mediaPresentationDuration(r){return zn(r)},availabilityStartTime(r){return g3(r)/1e3},minimumUpdatePeriod(r){return zn(r)},suggestedPresentationDelay(r){return zn(r)},type(r){return r},timeShiftBufferDepth(r){return zn(r)},start(r){return zn(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return m3(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)?zn(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}},Ct=r=>r&&r.attributes?kh(r.attributes).reduce((e,t)=>{const n=Hc[t.name]||Hc.DEFAULT;return e[t.name]=n(t.value),e},{}):{},v3={"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"},wa=(r,e)=>e.length?sr(r.map(function(t){return e.map(function(n){const s=os(n),a=Sa(t.baseUrl,s),o=Mt(Ct(n),{baseUrl:a});return a!==s&&!o.serviceLocation&&t.serviceLocation&&(o.serviceLocation=t.serviceLocation),o})})):r,Il=r=>{const e=ht(r,"SegmentTemplate")[0],t=ht(r,"SegmentList")[0],n=t&&ht(t,"SegmentURL").map(m=>Mt({tag:"SegmentURL"},Ct(m))),s=ht(r,"SegmentBase")[0],a=t||e,o=a&&ht(a,"SegmentTimeline")[0],l=t||s||e,c=l&&ht(l,"Initialization")[0],d=e&&Ct(e);d&&c?d.initialization=c&&Ct(c):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const g={template:d,segmentTimeline:o&&ht(o,"S").map(m=>Ct(m)),list:t&&Mt(Ct(t),{segmentUrls:n,initialization:Ct(c)}),base:s&&Mt(Ct(s),{initialization:Ct(c)})};return Object.keys(g).forEach(m=>{g[m]||delete g[m]}),g},y3=(r,e,t)=>n=>{const s=ht(n,"BaseURL"),a=wa(e,s),o=Mt(r,Ct(n)),l=Il(n);return a.map(c=>({segmentInfo:Mt(t,l),attributes:Mt(o,c)}))},_3=r=>r.reduce((e,t)=>{const n=Ct(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());const s=v3[n.schemeIdUri];if(s){e[s]={attributes:n};const a=ht(t,"cenc:pssh")[0];if(a){const o=os(a);e[s].pssh=o&&yh(o)}}return e},{}),T3=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})},b3=r=>sr(ht(r.node,"EventStream").map(e=>{const t=Ct(e),n=t.schemeIdUri;return ht(e,"Event").map(s=>{const a=Ct(s),o=a.presentationTime||0,l=t.timescale||1,c=a.duration||0,d=o/l+r.attributes.start;return{schemeIdUri:n,value:t.value,id:a.id,start:d,end:d+c/l,messageData:os(s)||a.messageData,contentEncoding:t.contentEncoding,presentationTimeOffset:t.presentationTimeOffset||0}})})),x3=(r,e,t)=>n=>{const s=Ct(n),a=wa(e,ht(n,"BaseURL")),o=ht(n,"Role")[0],l={role:Ct(o)};let c=Mt(r,s,l);const d=ht(n,"Accessibility")[0],g=T3(Ct(d));g&&(c=Mt(c,{captionServices:g}));const m=ht(n,"Label")[0];if(m&&m.childNodes.length){const E=m.childNodes[0].nodeValue.trim();c=Mt(c,{label:E})}const S=_3(ht(n,"ContentProtection"));Object.keys(S).length&&(c=Mt(c,{contentProtection:S}));const T=Il(n),b=ht(n,"Representation"),y=Mt(t,T);return sr(b.map(y3(c,a,y)))},C3=(r,e)=>(t,n)=>{const s=wa(e,ht(t.node,"BaseURL")),a=Mt(r,{periodStart:t.attributes.start});typeof t.attributes.duration=="number"&&(a.periodDuration=t.attributes.duration);const o=ht(t.node,"AdaptationSet"),l=Il(t.node);return sr(o.map(x3(a,s,l)))},S3=(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=Mt({serverURL:os(r[0])},Ct(r[0]));return t.queryBeforeStart=t.queryBeforeStart==="true",t},E3=({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,k3=(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(ar.INVALID_NUMBER_OF_PERIOD);const l=ht(r,"Location"),c=Ct(r),d=wa([{baseUrl:t}],ht(r,"BaseURL")),g=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(os));const m=[];return o.forEach((S,T)=>{const b=Ct(S),y=m[T-1];b.start=E3({attributes:b,priorPeriodAttributes:y?y.attributes:null,mpdType:c.type}),m.push({node:S,attributes:b})}),{locations:c.locations,contentSteeringInfo:S3(g,a),representationInfo:sr(m.map(C3(c,d))),eventStream:sr(m.map(b3))}},Nh=r=>{if(r==="")throw new Error(ar.DASH_EMPTY_MANIFEST);const e=new P_.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(ar.DASH_INVALID_XML);return n},w3=r=>{const e=ht(r,"UTCTiming")[0];if(!e)return null;const t=Ct(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(ar.UNSUPPORTED_UTC_TIMING_SCHEME)}return t},D3=(r,e={})=>{const t=k3(Nh(r),e),n=p3(t.representationInfo);return s3({dashPlaylists:n,locations:t.locations,contentSteering:t.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:t.eventStream})},A3=r=>w3(Nh(r));var Ao,Gc;function N3(){if(Gc)return Ao;Gc=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 Ao={getUint64:e,MAX_UINT32:r},Ao}var No,Wc;function I3(){if(Wc)return No;Wc=1;var r=N3().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 No=e,No}var O3=I3();const B3=fr(O3);var L3=Pe([73,68,51]),M3=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},Gr=function r(e,t){return t===void 0&&(t=0),e=Pe(e),e.length-t<10||!dt(e,L3,{offset:t})?t:(t+=M3(e,t),r(e,t))},Yc=function(e){return typeof e=="string"?Ch(e):e},P3=function(e){return Array.isArray(e)?e.map(function(t){return Yc(t)}):[Yc(e)]},R3=function r(e,t,n){n===void 0&&(n=!1),t=P3(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 d=e.subarray(a+8,c);dt(l,t[0])&&(t.length===1?s.push(d):s.push.apply(s,r(d,t.slice(1),n))),a=c}return s},Fs={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])},Zo=[128,64,32,16,8,4,2,1],V3=function(e){for(var t=1,n=0;n<Zo.length&&!(e&Zo[n]);n++)t++;return t},ta=function(e,t,n,s){n===void 0&&(n=!0),s===void 0&&(s=!1);var a=V3(e[t]),o=e.subarray(t,t+a);return n&&(o=Array.prototype.slice.call(e,t,t+a),o[0]^=Zo[a-1]),{length:a,value:D_(o,{signed:s}),bytes:o}},Xc=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(t){return r(t)}):typeof e=="number"?A_(e):e},F3=function(e){return Array.isArray(e)?e.map(function(t){return Xc(t)}):[Xc(e)]},$3=function r(e,t,n){if(n>=t.length)return t.length;var s=ta(t,n,!1);if(dt(e.bytes,s.bytes))return n;var a=ta(t,n+s.length);return r(e,t,n+a.length+a.value+s.length)},Kc=function r(e,t){t=F3(t),e=Pe(e);var n=[];if(!t.length)return n;for(var s=0;s<e.length;){var a=ta(e,s,!1),o=ta(e,s+a.length),l=s+a.length+o.length;o.value===127&&(o.value=$3(a,e,l),o.value!==e.length&&(o.value-=l));var c=l+o.value>e.length?e.length:l+o.value,d=e.subarray(l,c);dt(t[0],a.bytes)&&(t.length===1?n.push(d):n=n.concat(r(d,t.slice(1))));var g=a.length+o.length+d.length;s+=g}return n},U3=Pe([0,0,0,1]),q3=Pe([0,0,1]),z3=Pe([0,0,3]),j3=function(e){for(var t=[],n=1;n<e.length-2;)dt(e.subarray(n,n+3),z3)&&(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},Ih=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),U3)?c=4:dt(e.subarray(a),q3)&&(c=3),!c){a++;continue}if(l++,o)return j3(e.subarray(o,a));var d=void 0;t==="h264"?d=e[a+c]&31:t==="h265"&&(d=e[a+c]>>1&63),n.indexOf(d)!==-1&&(o=a+c),a+=c+(t==="h264"?1:2)}return e.subarray(0,0)},H3=function(e,t,n){return Ih(e,"h264",t,n)},G3=function(e,t,n){return Ih(e,"h265",t,n)},Jt={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])},or={aac:function(e){var t=Gr(e);return dt(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Gr(e);return dt(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Kc(e,[Fs.EBML,Fs.DocType])[0];return dt(t,Jt.webm)},mkv:function(e){var t=Kc(e,[Fs.EBML,Fs.DocType])[0];return dt(t,Jt.matroska)},mp4:function(e){if(or["3gp"](e)||or.mov(e))return!1;if(dt(e,Jt.mp4,{offset:4})||dt(e,Jt.fmp4,{offset:4})||dt(e,Jt.moof,{offset:4})||dt(e,Jt.moov,{offset:4}))return!0},mov:function(e){return dt(e,Jt.mov,{offset:4})},"3gp":function(e){return dt(e,Jt["3gp"],{offset:4})},ac3:function(e){var t=Gr(e);return dt(e,Jt.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=Gr(e);return dt(e,Jt.flac,{offset:t})},ogg:function(e){return dt(e,Jt.ogg)},avi:function(e){return dt(e,Jt.riff)&&dt(e,Jt.avi,{offset:8})},wav:function(e){return dt(e,Jt.riff)&&dt(e,Jt.wav,{offset:8})},h264:function(e){return H3(e,7,3).length},h265:function(e){return G3(e,[32,33],3).length}},Jo=Object.keys(or).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);Jo.forEach(function(r){var e=or[r];or[r]=function(t){return e(Pe(t))}});var W3=or,Ol=function(e){e=Pe(e);for(var t=0;t<Jo.length;t++){var n=Jo[t];if(W3[n](e))return n}return""},Y3=function(e){return R3(e,["moof"]).length>0},Io,Qc;function X3(){if(Qc)return Io;Qc=1;var r=9e4,e,t,n,s,a,o,l;return e=function(c){return c*r},t=function(c,d){return c*d},n=function(c){return c/r},s=function(c,d){return c/d},a=function(c,d){return e(s(c,d))},o=function(c,d){return t(n(c),d)},l=function(c,d,g){return n(g?c:c-d)},Io={ONE_SECOND_IN_TS:r,secondsToVideoTs:e,secondsToAudioTs:t,videoTsToSeconds:n,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l},Io}var Nn=X3();/**
|
|
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 el="8.23.7";const Ji={},yn=function(r,e){return Ji[r]=Ji[r]||[],e&&(Ji[r]=Ji[r].concat(e)),Ji[r]},K3=function(r,e){yn(r,e)},Oh=function(r,e){const t=yn(r).indexOf(e);return t<=-1?!1:(Ji[r]=Ji[r].slice(),Ji[r].splice(t,1),!0)},Q3=function(r,e){yn(r,[].concat(e).map(t=>{const n=(...s)=>(Oh(r,n),t(...s));return n}))},ia={prefixed:!0},Ks=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],Zc=Ks[0];let Wr;for(let r=0;r<Ks.length;r++)if(Ks[r][1]in _e){Wr=Ks[r];break}if(Wr){for(let r=0;r<Wr.length;r++)ia[Zc[r]]=Wr[r];ia.prefixed=Wr[0]!==Zc[0]}let si=[];const Z3=(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+":"),si){si.push([].concat(a));const g=si.length-1e3;si.splice(0,g>0?g:0)}if(!G.console)return;let d=G.console[n];!d&&n==="debug"&&(d=G.console.info||G.console.log),!(!d||!o||!l.test(n))&&d[Array.isArray(a)?"apply":"call"](G.console,a)};function tl(r,e=":",t=""){let n="info",s;function a(...o){s("log",n,o)}return s=Z3(r,a,t),a.createLogger=(o,l,c)=>{const d=l!==void 0?l:e,g=c!==void 0?c:t,m=`${r} ${d} ${o}`;return tl(m,d,g)},a.createNewLogger=(o,l,c)=>tl(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=()=>si?[].concat(si):[],a.history.filter=o=>(si||[]).filter(l=>new RegExp(`.*${o}.*`).test(l[0])),a.history.clear=()=>{si&&(si.length=0)},a.history.disable=()=>{si!==null&&(si.length=0,si=null)},a.history.enable=()=>{si===null&&(si=[])},a.error=(...o)=>s("error",n,o),a.warn=(...o)=>s("warn",n,o),a.debug=(...o)=>s("debug",n,o),a}const We=tl("VIDEOJS"),Bh=We.createLogger,J3=Object.prototype.toString,Lh=function(r){return ji(r)?Object.keys(r):[]};function Xn(r,e){Lh(r).forEach(t=>e(r[t],t))}function Mh(r,e,t=0){return Lh(r).reduce((n,s)=>e(n,r[s],s),t)}function ji(r){return!!r&&typeof r=="object"}function lr(r){return ji(r)&&J3.call(r)==="[object Object]"&&r.constructor===Object}function st(...r){const e={};return r.forEach(t=>{t&&Xn(t,(n,s)=>{if(!lr(n)){e[s]=n;return}lr(e[s])||(e[s]={}),e[s]=st(e[s],n)})}),e}function Ph(r={}){const e=[];for(const t in r)if(r.hasOwnProperty(t)){const n=r[t];e.push(n)}return e}function Da(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 eT=Object.freeze({__proto__:null,each:Xn,reduce:Mh,isObject:ji,isPlain:lr,merge:st,values:Ph,defineLazyProperty:Da});let Bl=!1,Rh=null,Oi=!1,Vh,Fh=!1,Kn=!1,Qn=!1,Hi=!1,Ll=null,Aa=null;const tT=!!(G.cast&&G.cast.framework&&G.cast.framework.CastReceiverContext);let $h=null,na=!1,Na=!1,ra=!1,Ia=!1,sa=!1,aa=!1,oa=!1;const ns=!!(pr()&&("ontouchstart"in G||G.navigator.maxTouchPoints||G.DocumentTouch&&G.document instanceof G.DocumentTouch)),un=G.navigator&&G.navigator.userAgentData;un&&un.platform&&un.brands&&(Oi=un.platform==="Android",Kn=!!un.brands.find(r=>r.brand==="Microsoft Edge"),Qn=!!un.brands.find(r=>r.brand==="Chromium"),Hi=!Kn&&Qn,Ll=Aa=(un.brands.find(r=>r.brand==="Chromium")||{}).version||null,Na=un.platform==="Windows");if(!Qn){const r=G.navigator&&G.navigator.userAgent||"";Bl=/iPod/i.test(r),Rh=(function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null})(),Oi=/Android/i.test(r),Vh=(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})(),Fh=/Firefox/i.test(r),Kn=/Edg/i.test(r),Qn=/Chrome/i.test(r)||/CriOS/i.test(r),Hi=!Kn&&Qn,Ll=Aa=(function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null})(),$h=(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})(),sa=/Tizen/i.test(r),aa=/Web0S/i.test(r),oa=sa||aa,na=/Safari/i.test(r)&&!Hi&&!Oi&&!Kn&&!oa,Na=/Windows/i.test(r),ra=/iPad/i.test(r)||na&&ns&&!/iPhone/i.test(r),Ia=/iPhone/i.test(r)&&!ra}const jt=Ia||ra||Bl,Oa=(na||jt)&&!Hi;var Uh=Object.freeze({__proto__:null,get IS_IPOD(){return Bl},get IOS_VERSION(){return Rh},get IS_ANDROID(){return Oi},get ANDROID_VERSION(){return Vh},get IS_FIREFOX(){return Fh},get IS_EDGE(){return Kn},get IS_CHROMIUM(){return Qn},get IS_CHROME(){return Hi},get CHROMIUM_VERSION(){return Ll},get CHROME_VERSION(){return Aa},IS_CHROMECAST_RECEIVER:tT,get IE_VERSION(){return $h},get IS_SAFARI(){return na},get IS_WINDOWS(){return Na},get IS_IPAD(){return ra},get IS_IPHONE(){return Ia},get IS_TIZEN(){return sa},get IS_WEBOS(){return aa},get IS_SMART_TV(){return oa},TOUCH_ENABLED:ns,IS_IOS:jt,IS_ANY_SAFARI:Oa});function Jc(r){return typeof r=="string"&&!!r.trim()}function iT(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function pr(){return _e===G.document}function mr(r){return ji(r)&&r.nodeType===1}function qh(){try{return G.parent!==G.self}catch{return!0}}function zh(r){return function(e,t){if(!Jc(e))return _e[r](null);Jc(t)&&(t=_e.querySelector(t));const n=mr(t)?t:_e;return n[r]&&n[r](e)}}function Re(r="div",e={},t={},n){const s=_e.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&&Ml(s,n),s}function bn(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function il(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Kr(r,e){return iT(e),r.classList.contains(e)}function Ln(r,...e){return r.classList.add(...e.reduce((t,n)=>t.concat(n.split(/\s+/)),[])),r}function Ba(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 jh(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 Hh(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 hn(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 Gh(r,e){return r.getAttribute(e)}function ur(r,e,t){r.setAttribute(e,t)}function La(r,e){r.removeAttribute(e)}function Wh(){_e.body.focus(),_e.onselectstart=function(){return!1}}function Yh(){_e.onselectstart=function(){return!0}}function cr(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(dr(r,"height"))),t.width||(t.width=parseFloat(dr(r,"width"))),t}}function rs(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!==_e[ia.fullscreenElement];)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;return{left:n,top:s,width:e,height:t}}function Ma(r,e){const t={x:0,y:0};if(jt){let g=r;for(;g&&g.nodeName.toLowerCase()!=="html";){const m=dr(g,"transform");if(/^matrix/.test(m)){const S=m.slice(7,-1).split(/,\s/).map(Number);t.x+=S[4],t.y+=S[5]}else if(/^matrix3d/.test(m)){const S=m.slice(9,-1).split(/,\s/).map(Number);t.x+=S[12],t.y+=S[13]}if(g.assignedSlot&&g.assignedSlot.parentElement&&G.WebKitCSSMatrix){const S=G.getComputedStyle(g.assignedSlot.parentElement).transform,b=new G.WebKitCSSMatrix(S);t.x+=b.m41,t.y+=b.m42}g=g.parentNode||g.host}}const n={},s=rs(e.target),a=rs(r),o=a.width,l=a.height;let c=e.offsetY-(a.top-s.top),d=e.offsetX-(a.left-s.left);return e.changedTouches&&(d=e.changedTouches[0].pageX-a.left,c=e.changedTouches[0].pageY+a.top,jt&&(d-=t.x,c-=t.y)),n.y=1-Math.max(0,Math.min(1,c/l)),n.x=Math.max(0,Math.min(1,d/o)),n}function Xh(r){return ji(r)&&r.nodeType===3}function Pa(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function Kh(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),mr(e)||Xh(e))return e;if(typeof e=="string"&&/\S/.test(e))return _e.createTextNode(e)}).filter(e=>e)}function Ml(r,e){return Kh(e).forEach(t=>r.appendChild(t)),r}function Qh(r,e){return Ml(Pa(r),e)}function ss(r){return r.button===void 0&&r.buttons===void 0||r.button===0&&r.buttons===void 0||r.type==="mouseup"&&r.button===0&&r.buttons===0||r.type==="mousedown"&&r.button===0&&r.buttons===0?!0:!(r.button!==0||r.buttons!==1)}const _n=zh("querySelector"),Zh=zh("querySelectorAll");function dr(r,e){if(!r||!e)return"";if(typeof G.getComputedStyle=="function"){let t;try{t=G.getComputedStyle(r)}catch{return""}return t?t.getPropertyValue(e)||t[e]:""}return""}function Jh(r){[..._e.styleSheets].forEach(e=>{try{const t=[...e.cssRules].map(s=>s.cssText).join(""),n=_e.createElement("style");n.textContent=t,r.document.head.appendChild(n)}catch{const n=_e.createElement("link");n.rel="stylesheet",n.type=e.type,n.media=e.media.mediaText,n.href=e.href,r.document.head.appendChild(n)}})}var e0=Object.freeze({__proto__:null,isReal:pr,isEl:mr,isInFrame:qh,createEl:Re,textContent:bn,prependTo:il,hasClass:Kr,addClass:Ln,removeClass:Ba,toggleClass:jh,setAttributes:Hh,getAttributes:hn,getAttribute:Gh,setAttribute:ur,removeAttribute:La,blockTextSelection:Wh,unblockTextSelection:Yh,getBoundingClientRect:cr,findPosition:rs,getPointerPosition:Ma,isTextNode:Xh,emptyEl:Pa,normalizeContent:Kh,appendContent:Ml,insertContent:Qh,isSingleLeftClick:ss,$:_n,$$:Zh,computedStyle:dr,copyStyleSheetsToWindow:Jh});let t0=!1,nl;const nT=function(){if(nl.options.autoSetup===!1)return;const r=Array.prototype.slice.call(_e.getElementsByTagName("video")),e=Array.prototype.slice.call(_e.getElementsByTagName("audio")),t=Array.prototype.slice.call(_e.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&&nl(o);else{rl(1);break}}else t0||rl(1)};function rl(r,e){pr()&&(e&&(nl=e),G.setTimeout(nT,r))}function sl(){t0=!0,G.removeEventListener("load",sl)}pr()&&(_e.readyState==="complete"?sl():G.addEventListener("load",sl));const i0=function(r){const e=_e.createElement("style");return e.className=r,e},n0=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var ti=new WeakMap;const rT=3;let sT=rT;function bi(){return sT++}function ed(r,e){if(!ti.has(r))return;const t=ti.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&&ti.delete(r)}function Pl(r,e,t,n){t.forEach(function(s){r(e,s,n)})}function Ra(r){if(r.fixed_)return r;function e(){return!0}function t(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){const n=r||G.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||_e),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=_e.documentElement,o=_e.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 $s;const aT=function(){if(typeof $s!="boolean"){$s=!1;try{const r=Object.defineProperty({},"passive",{get(){$s=!0}});G.addEventListener("test",null,r),G.removeEventListener("test",null,r)}catch{}}return $s},oT=["touchstart","touchmove"];function pi(r,e,t){if(Array.isArray(e))return Pl(pi,r,e,t);ti.has(r)||ti.set(r,{});const n=ti.get(r);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),t.guid||(t.guid=bi()),n.handlers[e].push(t),n.dispatcher||(n.disabled=!1,n.dispatcher=function(s,a){if(n.disabled)return;s=Ra(s);const o=n.handlers[s.type];if(o){const l=o.slice(0);for(let c=0,d=l.length;c<d&&!s.isImmediatePropagationStopped();c++)try{l[c].call(r,s,a)}catch(g){We.error(g)}}}),n.handlers[e].length===1)if(r.addEventListener){let s=!1;aT()&&oT.indexOf(e)>-1&&(s={passive:!0}),r.addEventListener(e,n.dispatcher,s)}else r.attachEvent&&r.attachEvent("on"+e,n.dispatcher)}function Ht(r,e,t){if(!ti.has(r))return;const n=ti.get(r);if(!n.handlers)return;if(Array.isArray(e))return Pl(Ht,r,e,t);const s=function(o,l){n.handlers[l]=[],ed(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);ed(r,e)}}function gr(r,e,t){const n=ti.has(r)?ti.get(r):{},s=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=Ra(e),n.dispatcher&&n.dispatcher.call(r,e,t),s&&!e.isPropagationStopped()&&e.bubbles===!0)gr.call(null,s,e,t);else if(!s&&!e.defaultPrevented&&e.target&&e.target[e.type]){ti.has(e.target)||ti.set(e.target,{});const a=ti.get(e.target);e.target[e.type]&&(a.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),a.disabled=!1)}return!e.defaultPrevented}function Va(r,e,t){if(Array.isArray(e))return Pl(Va,r,e,t);const n=function(){Ht(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||bi(),pi(r,e,n)}function Rl(r,e,t){const n=function(){Ht(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||bi(),pi(r,e,n)}var lT=Object.freeze({__proto__:null,fixEvent:Ra,on:pi,off:Ht,trigger:gr,one:Va,any:Rl});const xi=30,ot=function(r,e,t){e.guid||(e.guid=bi());const n=e.bind(r);return n.guid=t?t+"_"+e.guid:e.guid,n},Gi=function(r,e){let t=G.performance.now();return function(...s){const a=G.performance.now();a-t>=e&&(r(...s),t=a)}},r0=function(r,e,t,n=G){let s;const a=()=>{n.clearTimeout(s),s=null},o=function(){const l=this,c=arguments;let d=function(){s=null,d=null,t||r.apply(l,c)};!s&&t&&r.apply(l,c),n.clearTimeout(s),s=n.setTimeout(d,e)};return o.cancel=a,o};var uT=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:xi,bind_:ot,throttle:Gi,debounce:r0});let qr;class mi{on(e,t){const n=this.addEventListener;this.addEventListener=()=>{},pi(this,e,t),this.addEventListener=n}off(e,t){Ht(this,e,t)}one(e,t){const n=this.addEventListener;this.addEventListener=()=>{},Va(this,e,t),this.addEventListener=n}any(e,t){const n=this.addEventListener;this.addEventListener=()=>{},Rl(this,e,t),this.addEventListener=n}trigger(e){const t=e.type||e;typeof e=="string"&&(e={type:t}),e=Ra(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),gr(this,e)}queueTrigger(e){qr||(qr=new Map);const t=e.type||e;let n=qr.get(this);n||(n=new Map,qr.set(this,n));const s=n.get(t);n.delete(t),G.clearTimeout(s);const a=G.setTimeout(()=>{n.delete(t),n.size===0&&(n=null,qr.delete(this)),this.trigger(e)},0);n.set(t,a)}}mi.prototype.allowedEvents_={};mi.prototype.addEventListener=mi.prototype.on;mi.prototype.removeEventListener=mi.prototype.off;mi.prototype.dispatchEvent=mi.prototype.trigger;const Fa=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,nn=r=>r instanceof mi||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),cT=(r,e)=>{nn(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},al=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,la=(r,e,t)=>{if(!r||!r.nodeName&&!nn(r))throw new Error(`Invalid target for ${Fa(e)}#${t}; must be a DOM node or evented object.`)},s0=(r,e,t)=>{if(!al(r))throw new Error(`Invalid event type for ${Fa(e)}#${t}; must be a non-empty string or array.`)},a0=(r,e,t)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${Fa(e)}#${t}; must be a function.`)},Oo=(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]),la(s,r,t),s0(a,r,t),a0(o,r,t),o=ot(r,o),{isTargetingSelf:n,target:s,type:a,listener:o}},wn=(r,e,t,n)=>{la(r,r,e),r.nodeName?lT[e](r,t,n):r[e](t,n)},dT={on(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Oo(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}=Oo(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}=Oo(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||al(r))Ht(this.eventBusEl_,r,e);else{const n=r,s=e;la(n,this,"off"),s0(s,this,"off"),a0(t,this,"off"),t=ot(this,t),this.off("dispose",t),n.nodeName?(Ht(n,s,t),Ht(n,"dispose",t)):nn(n)&&(n.off(s,t),n.off("dispose",t))}},trigger(r,e){la(this.eventBusEl_,this,"trigger");const t=r&&typeof r!="string"?r.type:r;if(!al(t))throw new Error(`Invalid event type for ${Fa(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return gr(this.eventBusEl_,r,e)}};function Vl(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,dT),r.eventedCallbacks&&r.eventedCallbacks.forEach(n=>{n()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(n){n&&ti.has(n)&&ti.delete(n)}),G.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const hT={state:{},setState(r){typeof r=="function"&&(r=r());let e;return Xn(r,(t,n)=>{this.state[n]!==t&&(e=e||{},e[n]={from:this.state[n],to:t}),this.state[n]=t}),e&&nn(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function o0(r,e){return Object.assign(r,hT),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&nn(r)&&r.on("statechanged",r.handleStateChanged),r}const Qr=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},yt=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},l0=function(r,e){return yt(r)===yt(e)};var fT=Object.freeze({__proto__:null,toLowerCase:Qr,toTitleCase:yt,titleCaseEquals:l0});class he{constructor(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=st({},this.options_),t=this.options_=st(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_${bi()}`}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&&(Vl(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),o0(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_=st(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 d=n;return o&&o[e]?d=o[e]:c&&c[e]&&(d=c[e]),t&&(d=d.replace(/\{(\d+)\}/g,function(g,m){const S=t[m-1];let b=S;return typeof S>"u"&&(b=g),b})),d}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((n,s)=>n.concat(s),[]);let 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=_e.createElementNS(n,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const o=_e.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=yt(e);const o=t.componentClass||a;t.name=a;const l=he.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&&yt(s.name()),a&&(this.childNameIndex_[a]=s,this.childNameIndex_[Qr(a)]=s),typeof s.el=="function"&&s.el()){let o=null;this.children_[n+1]&&(this.children_[n+1].el_?o=this.children_[n+1].el_:mr(this.children_[n+1])&&(o=this.children_[n+1])),this.contentEl().insertBefore(s.el(),o)}return s}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let 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_[yt(e.name())]=null,this.childNameIndex_[Qr(e.name())]=null;const n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const 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 d=this.addChild(l,c);d&&(this[l]=d)};let s;const a=he.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=he.getComponent(o.opts.componentClass||yt(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 _n(e,t||this.contentEl())}$$(e,t){return Zh(e,t||this.contentEl())}hasClass(e){return Kr(this.el_,e)}addClass(...e){Ln(this.el_,...e)}removeClass(...e){Ba(this.el_,...e)}toggleClass(e,t){jh(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 Gh(this.el_,e)}setAttribute(e,t){ur(this.el_,e,t)}removeAttribute(e){La(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"+yt(e)],10)}currentDimension(e){let t=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(t=dr(this.el_,e),t=parseFloat(t),t===0||isNaN(t)){const n=`offset${yt(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=G.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,d=l.touches[0].pageY-t.pageY;Math.sqrt(c*c+d*d)>n&&(a=!1)}});const o=function(){a=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(l){t=null,a===!0&&G.performance.now()-e<s&&(l.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=ot(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=ot(this,e),this.clearTimersOnDispose_(),n=G.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),G.clearTimeout(e)),e}setInterval(e,t){e=ot(this,e),this.clearTimersOnDispose_();const n=G.setInterval(e,t);return this.setIntervalIds_.add(n),n}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),G.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var t;return e=ot(this,e),t=G.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=ot(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),G.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=G.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"||G.getComputedStyle(a).height==="0px"||G.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>(_e.documentElement.clientWidth||G.innerWidth)||o.y<0||o.y>(_e.documentElement.clientHeight||G.innerHeight))return!1;let l=_e.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=he.getComponent("Tech"),s=n&&n.isTech(t),a=he===t||he.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=yt(e),he.components_||(he.components_={});const o=he.getComponent("Player");if(e==="Player"&&o&&o.players){const l=o.players,c=Object.keys(l);if(l&&c.length>0){for(let d=0;d<c.length;d++)if(l[c[d]]!==null)throw new Error("Can not register Player component after player has been created.")}}return he.components_[e]=t,he.components_[Qr(e)]=t,t}static getComponent(e){if(!(!e||!he.components_))return he.components_[e]}}he.registerComponent("Component",he);function pT(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 td(r,e,t,n){return pT(r,n,t.length-1),t[n][e]}function Bo(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:td.bind(null,"start",0,r),end:td.bind(null,"end",1,r)},G.Symbol&&G.Symbol.iterator&&(e[G.Symbol.iterator]=()=>(r||[]).values()),e}function Ii(r,e){return Array.isArray(r)?Bo(r):r===void 0||e===void 0?Bo():Bo([[r,e]])}const u0=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 Fl=u0;function c0(r){Fl=r}function d0(){Fl=u0}function Vn(r,e=r){return Fl(r,e)}var mT=Object.freeze({__proto__:null,createTimeRanges:Ii,createTimeRange:Ii,setFormatTime:c0,resetFormatTime:d0,formatTime:Vn});function h0(r,e){let t=0,n,s;if(!e)return 0;(!r||!r.length)&&(r=Ii(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:ji(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 Zr(r){return r!=null&&typeof r.then=="function"}function Fi(r){Zr(r)&&r.then(null,e=>{})}const ol=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}})})},gT=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=ol(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(ol))},vT=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 ll={textTracksToJson:gT,jsonToTextTracks:vT,trackToJson:ol};const Lo="vjs-modal-dialog";class vr extends he{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:`${Lo}-content`},{role:"document"}),this.descEl_=Re("p",{className:`${Lo}-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`${Lo} 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(),Qh(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"),Pa(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=_e.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}_e.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 G.HTMLAnchorElement||t instanceof G.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof G.HTMLInputElement||t instanceof G.HTMLSelectElement||t instanceof G.HTMLTextAreaElement||t instanceof G.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof G.HTMLIFrameElement||t instanceof G.HTMLObjectElement||t instanceof G.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable"))}}vr.prototype.options_={pauseOnOpen:!0,temporary:!0};he.registerComponent("ModalDialog",vr);class Fn extends mi{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})},nn(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 Mo=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 f0 extends Fn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Mo(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Mo(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Mo(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const Po=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 p0 extends Fn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Po(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&&Po(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Po(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 $l 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 yT{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 ua{constructor(e){ua.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 _T={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},TT={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},bT={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},id={disabled:"disabled",hidden:"hidden",showing:"showing"};class Ul extends mi{constructor(e={}){super();const t={id:e.id||"vjs_track_"+bi(),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 ql=function(r){return new URL(r,_e.baseURI)},m0=function(r){return new URL(r,_e.baseURI).href},zl=function(r){if(typeof r=="string"){const t=r.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return t?t[1].toLowerCase():""}return""},$a=function(r,e=G.location){return ql(r).origin!==e.origin};var xT=Object.freeze({__proto__:null,parseUrl:ql,getAbsoluteURL:m0,getFileExtension:zl,isCrossOrigin:$a});const nd=function(r,e){const t=new G.WebVTT.Parser(G,G.vttjs,G.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&&(G.console&&G.console.groupCollapsed&&G.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),n.forEach(s=>We.error(s)),G.console&&G.console.groupEnd&&G.console.groupEnd()),t.flush()},rd=function(r,e){const t={uri:r},n=$a(r);n&&(t.cors=n);const s=e.tech_.crossOrigin()==="use-credentials";s&&(t.withCredentials=s),vh(t,ot(this,function(a,o,l){if(a)return We.error(a,o);e.loaded_=!0,typeof G.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 nd(l,e)}):nd(l,e)}))};class ls extends Ul{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=st(e,{kind:bT[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=id[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 ua(this.cues_),o=new ua(this.activeCues_);let l=!1;this.timeupdateHandler=ot(this,function(d={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const c=()=>{this.stopTracking()};this.tech_.one("dispose",c),n!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return s},set(){}},mode:{get(){return n},set(d){id[d]&&n!==d&&(n=d,!this.preload_&&n!=="disabled"&&this.cues.length===0&&rd(this.src,this),this.stopTracking(),n!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?a:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return o;const d=this.tech_.currentTime(),g=[];for(let m=0,S=this.cues.length;m<S;m++){const b=this.cues[m];b.startTime<=d&&b.endTime>=d&&g.push(b)}if(l=!1,g.length!==this.activeCues_.length)l=!0;else for(let m=0;m<g.length;m++)this.activeCues_.indexOf(g[m])===-1&&(l=!0);return this.activeCues_=g,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")&&rd(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 G.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 ll.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}}}}ls.prototype.allowedEvents_={cuechange:"cuechange"};class g0 extends Ul{constructor(e={}){const t=st(e,{kind:TT[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 v0 extends Ul{constructor(e={}){const t=st(e,{kind:_T[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 rn extends mi{constructor(e={}){super();let t;const n=new ls(e);this.kind=n.kind,this.src=n.src,this.srclang=n.language,this.label=n.label,this.default=n.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return n}}}),t=rn.NONE,n.addEventListener("loadeddata",()=>{t=rn.LOADED,this.trigger({type:"load",target:this})})}}rn.prototype.allowedEvents_={load:"load"};rn.NONE=0;rn.LOADING=1;rn.LOADED=2;rn.ERROR=3;const yi={audio:{ListClass:f0,TrackClass:g0,capitalName:"Audio"},video:{ListClass:p0,TrackClass:v0,capitalName:"Video"},text:{ListClass:$l,TrackClass:ls,capitalName:"Text"}};Object.keys(yi).forEach(function(r){yi[r].getterName=`${r}Tracks`,yi[r].privateName=`${r}Tracks_`});const hr={remoteText:{ListClass:$l,TrackClass:ls,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:yT,TrackClass:rn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},ei=Object.assign({},yi,hr);hr.names=Object.keys(hr);yi.names=Object.keys(yi);ei.names=[].concat(hr.names).concat(yi.names);function CT(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 ei.text.TrackClass(s);return a.addTrack(o),o}class Ue extends he{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}),ei.names.forEach(n=>{const s=ei[n];e&&e[s.getterName]&&(this[s.privateName]=e[s.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(n=>{e[`native${n}Tracks`]===!1&&(this[`featuresNative${n}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new ei.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ot(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 Ii(0,0)}bufferedPercent(){return h0(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(yi.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_?Ii(0,0):Ii()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){yi.names.forEach(e=>{const t=yi[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(!G.WebVTT)if(_e.body.contains(this.el())){if(!this.options_["vtt.js"]&&lr(Dc)&&Object.keys(Dc).length>0){this.trigger("vttjsloaded");return}const e=_e.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),G.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 CT(this,e,t,n)}createRemoteTextTrack(e){const t=st(e,{tech:this});return new hr.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=bi();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=yt(e),Ue.techs_[e]=t,Ue.techs_[Qr(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=yt(e),G&&G.videojs&&G.videojs[e])return We.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),G.videojs[e]}}}ei.names.forEach(function(r){const e=ei[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)}};he.registerComponent("Tech",Ue);Ue.registerTech("Tech",Ue);Ue.defaultTechOrder_=[];const Mn={},ca={},da={};function ST(r,e){Mn[r]=Mn[r]||[],Mn[r].push(e)}function ET(r,e,t){r.setTimeout(()=>Dn(e,Mn[e.type],t,r),1)}function kT(r,e){r.forEach(t=>t.setTech&&t.setTech(e))}function wT(r,e,t){return r.reduceRight(jl(t),e[t]())}function DT(r,e,t,n){return e[t](r.reduce(jl(t),n))}function sd(r,e,t,n=null){const s="call"+yt(t),a=r.reduce(jl(s),n),o=a===da,l=o?null:e[t](a);return IT(r,t,l,o),l}const AT={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},NT={setCurrentTime:1,setMuted:1,setVolume:1},ad={play:1,pause:1};function jl(r){return(e,t)=>e===da?da:t[r]?t[r](e):e}function IT(r,e,t,n){for(let s=r.length-1;s>=0;s--){const a=r[s];a[e]&&a[e](n,t)}}function OT(r){ca.hasOwnProperty(r.id())&&delete ca[r.id()]}function BT(r,e){const t=ca[r.id()];let n=null;if(t==null)return n=e(r),ca[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=BT(n,o);if(!c.setSource)return s.push(c),Dn(r,l,t,n,s,a);c.setSource(Object.assign({},r),function(d,g){if(d)return Dn(r,l,t,n,s,a);s.push(c),Dn(g,r.type===g.type?l:Mn[g.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 LT={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},ha=function(r=""){const e=zl(r);return LT[e.toLowerCase()]||""},MT=(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 ha(e)},y0=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(t){t=y0(t),Array.isArray(t)?e=e.concat(t):ji(t)&&e.push(t)}),r=e}else typeof r=="string"&&r.trim()?r=[od({src:r})]:ji(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[od(r)]:r=[];return r};function od(r){if(!r.type){const e=ha(r.src);e&&(r.type=e)}return r}var PT=`<svg xmlns="http://www.w3.org/2000/svg">
|
|
37
|
+
*/var el="8.23.7";const Ji={},yn=function(r,e){return Ji[r]=Ji[r]||[],e&&(Ji[r]=Ji[r].concat(e)),Ji[r]},K3=function(r,e){yn(r,e)},Oh=function(r,e){const t=yn(r).indexOf(e);return t<=-1?!1:(Ji[r]=Ji[r].slice(),Ji[r].splice(t,1),!0)},Q3=function(r,e){yn(r,[].concat(e).map(t=>{const n=(...s)=>(Oh(r,n),t(...s));return n}))},ia={prefixed:!0},Ks=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],Zc=Ks[0];let Wr;for(let r=0;r<Ks.length;r++)if(Ks[r][1]in _e){Wr=Ks[r];break}if(Wr){for(let r=0;r<Wr.length;r++)ia[Zc[r]]=Wr[r];ia.prefixed=Wr[0]!==Zc[0]}let si=[];const Z3=(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+":"),si){si.push([].concat(a));const g=si.length-1e3;si.splice(0,g>0?g:0)}if(!G.console)return;let d=G.console[n];!d&&n==="debug"&&(d=G.console.info||G.console.log),!(!d||!o||!l.test(n))&&d[Array.isArray(a)?"apply":"call"](G.console,a)};function tl(r,e=":",t=""){let n="info",s;function a(...o){s("log",n,o)}return s=Z3(r,a,t),a.createLogger=(o,l,c)=>{const d=l!==void 0?l:e,g=c!==void 0?c:t,m=`${r} ${d} ${o}`;return tl(m,d,g)},a.createNewLogger=(o,l,c)=>tl(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=()=>si?[].concat(si):[],a.history.filter=o=>(si||[]).filter(l=>new RegExp(`.*${o}.*`).test(l[0])),a.history.clear=()=>{si&&(si.length=0)},a.history.disable=()=>{si!==null&&(si.length=0,si=null)},a.history.enable=()=>{si===null&&(si=[])},a.error=(...o)=>s("error",n,o),a.warn=(...o)=>s("warn",n,o),a.debug=(...o)=>s("debug",n,o),a}const We=tl("VIDEOJS"),Bh=We.createLogger,J3=Object.prototype.toString,Lh=function(r){return ji(r)?Object.keys(r):[]};function Xn(r,e){Lh(r).forEach(t=>e(r[t],t))}function Mh(r,e,t=0){return Lh(r).reduce((n,s)=>e(n,r[s],s),t)}function ji(r){return!!r&&typeof r=="object"}function lr(r){return ji(r)&&J3.call(r)==="[object Object]"&&r.constructor===Object}function st(...r){const e={};return r.forEach(t=>{t&&Xn(t,(n,s)=>{if(!lr(n)){e[s]=n;return}lr(e[s])||(e[s]={}),e[s]=st(e[s],n)})}),e}function Ph(r={}){const e=[];for(const t in r)if(r.hasOwnProperty(t)){const n=r[t];e.push(n)}return e}function Da(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 eT=Object.freeze({__proto__:null,each:Xn,reduce:Mh,isObject:ji,isPlain:lr,merge:st,values:Ph,defineLazyProperty:Da});let Bl=!1,Rh=null,Oi=!1,Vh,Fh=!1,Kn=!1,Qn=!1,Hi=!1,Ll=null,Aa=null;const tT=!!(G.cast&&G.cast.framework&&G.cast.framework.CastReceiverContext);let $h=null,na=!1,Na=!1,ra=!1,Ia=!1,sa=!1,aa=!1,oa=!1;const ns=!!(pr()&&("ontouchstart"in G||G.navigator.maxTouchPoints||G.DocumentTouch&&G.document instanceof G.DocumentTouch)),un=G.navigator&&G.navigator.userAgentData;un&&un.platform&&un.brands&&(Oi=un.platform==="Android",Kn=!!un.brands.find(r=>r.brand==="Microsoft Edge"),Qn=!!un.brands.find(r=>r.brand==="Chromium"),Hi=!Kn&&Qn,Ll=Aa=(un.brands.find(r=>r.brand==="Chromium")||{}).version||null,Na=un.platform==="Windows");if(!Qn){const r=G.navigator&&G.navigator.userAgent||"";Bl=/iPod/i.test(r),Rh=(function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null})(),Oi=/Android/i.test(r),Vh=(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})(),Fh=/Firefox/i.test(r),Kn=/Edg/i.test(r),Qn=/Chrome/i.test(r)||/CriOS/i.test(r),Hi=!Kn&&Qn,Ll=Aa=(function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null})(),$h=(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})(),sa=/Tizen/i.test(r),aa=/Web0S/i.test(r),oa=sa||aa,na=/Safari/i.test(r)&&!Hi&&!Oi&&!Kn&&!oa,Na=/Windows/i.test(r),ra=/iPad/i.test(r)||na&&ns&&!/iPhone/i.test(r),Ia=/iPhone/i.test(r)&&!ra}const jt=Ia||ra||Bl,Oa=(na||jt)&&!Hi;var Uh=Object.freeze({__proto__:null,get IS_IPOD(){return Bl},get IOS_VERSION(){return Rh},get IS_ANDROID(){return Oi},get ANDROID_VERSION(){return Vh},get IS_FIREFOX(){return Fh},get IS_EDGE(){return Kn},get IS_CHROMIUM(){return Qn},get IS_CHROME(){return Hi},get CHROMIUM_VERSION(){return Ll},get CHROME_VERSION(){return Aa},IS_CHROMECAST_RECEIVER:tT,get IE_VERSION(){return $h},get IS_SAFARI(){return na},get IS_WINDOWS(){return Na},get IS_IPAD(){return ra},get IS_IPHONE(){return Ia},get IS_TIZEN(){return sa},get IS_WEBOS(){return aa},get IS_SMART_TV(){return oa},TOUCH_ENABLED:ns,IS_IOS:jt,IS_ANY_SAFARI:Oa});function Jc(r){return typeof r=="string"&&!!r.trim()}function iT(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function pr(){return _e===G.document}function mr(r){return ji(r)&&r.nodeType===1}function qh(){try{return G.parent!==G.self}catch{return!0}}function zh(r){return function(e,t){if(!Jc(e))return _e[r](null);Jc(t)&&(t=_e.querySelector(t));const n=mr(t)?t:_e;return n[r]&&n[r](e)}}function Re(r="div",e={},t={},n){const s=_e.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&&Ml(s,n),s}function bn(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function il(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Kr(r,e){return iT(e),r.classList.contains(e)}function Ln(r,...e){return r.classList.add(...e.reduce((t,n)=>t.concat(n.split(/\s+/)),[])),r}function Ba(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 jh(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 Hh(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 hn(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 Gh(r,e){return r.getAttribute(e)}function ur(r,e,t){r.setAttribute(e,t)}function La(r,e){r.removeAttribute(e)}function Wh(){_e.body.focus(),_e.onselectstart=function(){return!1}}function Yh(){_e.onselectstart=function(){return!0}}function cr(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(dr(r,"height"))),t.width||(t.width=parseFloat(dr(r,"width"))),t}}function rs(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!==_e[ia.fullscreenElement];)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;return{left:n,top:s,width:e,height:t}}function Ma(r,e){const t={x:0,y:0};if(jt){let g=r;for(;g&&g.nodeName.toLowerCase()!=="html";){const m=dr(g,"transform");if(/^matrix/.test(m)){const S=m.slice(7,-1).split(/,\s/).map(Number);t.x+=S[4],t.y+=S[5]}else if(/^matrix3d/.test(m)){const S=m.slice(9,-1).split(/,\s/).map(Number);t.x+=S[12],t.y+=S[13]}if(g.assignedSlot&&g.assignedSlot.parentElement&&G.WebKitCSSMatrix){const S=G.getComputedStyle(g.assignedSlot.parentElement).transform,T=new G.WebKitCSSMatrix(S);t.x+=T.m41,t.y+=T.m42}g=g.parentNode||g.host}}const n={},s=rs(e.target),a=rs(r),o=a.width,l=a.height;let c=e.offsetY-(a.top-s.top),d=e.offsetX-(a.left-s.left);return e.changedTouches&&(d=e.changedTouches[0].pageX-a.left,c=e.changedTouches[0].pageY+a.top,jt&&(d-=t.x,c-=t.y)),n.y=1-Math.max(0,Math.min(1,c/l)),n.x=Math.max(0,Math.min(1,d/o)),n}function Xh(r){return ji(r)&&r.nodeType===3}function Pa(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function Kh(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),mr(e)||Xh(e))return e;if(typeof e=="string"&&/\S/.test(e))return _e.createTextNode(e)}).filter(e=>e)}function Ml(r,e){return Kh(e).forEach(t=>r.appendChild(t)),r}function Qh(r,e){return Ml(Pa(r),e)}function ss(r){return r.button===void 0&&r.buttons===void 0||r.button===0&&r.buttons===void 0||r.type==="mouseup"&&r.button===0&&r.buttons===0||r.type==="mousedown"&&r.button===0&&r.buttons===0?!0:!(r.button!==0||r.buttons!==1)}const _n=zh("querySelector"),Zh=zh("querySelectorAll");function dr(r,e){if(!r||!e)return"";if(typeof G.getComputedStyle=="function"){let t;try{t=G.getComputedStyle(r)}catch{return""}return t?t.getPropertyValue(e)||t[e]:""}return""}function Jh(r){[..._e.styleSheets].forEach(e=>{try{const t=[...e.cssRules].map(s=>s.cssText).join(""),n=_e.createElement("style");n.textContent=t,r.document.head.appendChild(n)}catch{const n=_e.createElement("link");n.rel="stylesheet",n.type=e.type,n.media=e.media.mediaText,n.href=e.href,r.document.head.appendChild(n)}})}var e0=Object.freeze({__proto__:null,isReal:pr,isEl:mr,isInFrame:qh,createEl:Re,textContent:bn,prependTo:il,hasClass:Kr,addClass:Ln,removeClass:Ba,toggleClass:jh,setAttributes:Hh,getAttributes:hn,getAttribute:Gh,setAttribute:ur,removeAttribute:La,blockTextSelection:Wh,unblockTextSelection:Yh,getBoundingClientRect:cr,findPosition:rs,getPointerPosition:Ma,isTextNode:Xh,emptyEl:Pa,normalizeContent:Kh,appendContent:Ml,insertContent:Qh,isSingleLeftClick:ss,$:_n,$$:Zh,computedStyle:dr,copyStyleSheetsToWindow:Jh});let t0=!1,nl;const nT=function(){if(nl.options.autoSetup===!1)return;const r=Array.prototype.slice.call(_e.getElementsByTagName("video")),e=Array.prototype.slice.call(_e.getElementsByTagName("audio")),t=Array.prototype.slice.call(_e.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&&nl(o);else{rl(1);break}}else t0||rl(1)};function rl(r,e){pr()&&(e&&(nl=e),G.setTimeout(nT,r))}function sl(){t0=!0,G.removeEventListener("load",sl)}pr()&&(_e.readyState==="complete"?sl():G.addEventListener("load",sl));const i0=function(r){const e=_e.createElement("style");return e.className=r,e},n0=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var ti=new WeakMap;const rT=3;let sT=rT;function bi(){return sT++}function ed(r,e){if(!ti.has(r))return;const t=ti.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&&ti.delete(r)}function Pl(r,e,t,n){t.forEach(function(s){r(e,s,n)})}function Ra(r){if(r.fixed_)return r;function e(){return!0}function t(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){const n=r||G.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||_e),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=_e.documentElement,o=_e.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 $s;const aT=function(){if(typeof $s!="boolean"){$s=!1;try{const r=Object.defineProperty({},"passive",{get(){$s=!0}});G.addEventListener("test",null,r),G.removeEventListener("test",null,r)}catch{}}return $s},oT=["touchstart","touchmove"];function pi(r,e,t){if(Array.isArray(e))return Pl(pi,r,e,t);ti.has(r)||ti.set(r,{});const n=ti.get(r);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),t.guid||(t.guid=bi()),n.handlers[e].push(t),n.dispatcher||(n.disabled=!1,n.dispatcher=function(s,a){if(n.disabled)return;s=Ra(s);const o=n.handlers[s.type];if(o){const l=o.slice(0);for(let c=0,d=l.length;c<d&&!s.isImmediatePropagationStopped();c++)try{l[c].call(r,s,a)}catch(g){We.error(g)}}}),n.handlers[e].length===1)if(r.addEventListener){let s=!1;aT()&&oT.indexOf(e)>-1&&(s={passive:!0}),r.addEventListener(e,n.dispatcher,s)}else r.attachEvent&&r.attachEvent("on"+e,n.dispatcher)}function Ht(r,e,t){if(!ti.has(r))return;const n=ti.get(r);if(!n.handlers)return;if(Array.isArray(e))return Pl(Ht,r,e,t);const s=function(o,l){n.handlers[l]=[],ed(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);ed(r,e)}}function gr(r,e,t){const n=ti.has(r)?ti.get(r):{},s=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=Ra(e),n.dispatcher&&n.dispatcher.call(r,e,t),s&&!e.isPropagationStopped()&&e.bubbles===!0)gr.call(null,s,e,t);else if(!s&&!e.defaultPrevented&&e.target&&e.target[e.type]){ti.has(e.target)||ti.set(e.target,{});const a=ti.get(e.target);e.target[e.type]&&(a.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),a.disabled=!1)}return!e.defaultPrevented}function Va(r,e,t){if(Array.isArray(e))return Pl(Va,r,e,t);const n=function(){Ht(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||bi(),pi(r,e,n)}function Rl(r,e,t){const n=function(){Ht(r,e,n),t.apply(this,arguments)};n.guid=t.guid=t.guid||bi(),pi(r,e,n)}var lT=Object.freeze({__proto__:null,fixEvent:Ra,on:pi,off:Ht,trigger:gr,one:Va,any:Rl});const xi=30,ot=function(r,e,t){e.guid||(e.guid=bi());const n=e.bind(r);return n.guid=t?t+"_"+e.guid:e.guid,n},Gi=function(r,e){let t=G.performance.now();return function(...s){const a=G.performance.now();a-t>=e&&(r(...s),t=a)}},r0=function(r,e,t,n=G){let s;const a=()=>{n.clearTimeout(s),s=null},o=function(){const l=this,c=arguments;let d=function(){s=null,d=null,t||r.apply(l,c)};!s&&t&&r.apply(l,c),n.clearTimeout(s),s=n.setTimeout(d,e)};return o.cancel=a,o};var uT=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:xi,bind_:ot,throttle:Gi,debounce:r0});let qr;class mi{on(e,t){const n=this.addEventListener;this.addEventListener=()=>{},pi(this,e,t),this.addEventListener=n}off(e,t){Ht(this,e,t)}one(e,t){const n=this.addEventListener;this.addEventListener=()=>{},Va(this,e,t),this.addEventListener=n}any(e,t){const n=this.addEventListener;this.addEventListener=()=>{},Rl(this,e,t),this.addEventListener=n}trigger(e){const t=e.type||e;typeof e=="string"&&(e={type:t}),e=Ra(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),gr(this,e)}queueTrigger(e){qr||(qr=new Map);const t=e.type||e;let n=qr.get(this);n||(n=new Map,qr.set(this,n));const s=n.get(t);n.delete(t),G.clearTimeout(s);const a=G.setTimeout(()=>{n.delete(t),n.size===0&&(n=null,qr.delete(this)),this.trigger(e)},0);n.set(t,a)}}mi.prototype.allowedEvents_={};mi.prototype.addEventListener=mi.prototype.on;mi.prototype.removeEventListener=mi.prototype.off;mi.prototype.dispatchEvent=mi.prototype.trigger;const Fa=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,nn=r=>r instanceof mi||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),cT=(r,e)=>{nn(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},al=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,la=(r,e,t)=>{if(!r||!r.nodeName&&!nn(r))throw new Error(`Invalid target for ${Fa(e)}#${t}; must be a DOM node or evented object.`)},s0=(r,e,t)=>{if(!al(r))throw new Error(`Invalid event type for ${Fa(e)}#${t}; must be a non-empty string or array.`)},a0=(r,e,t)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${Fa(e)}#${t}; must be a function.`)},Oo=(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]),la(s,r,t),s0(a,r,t),a0(o,r,t),o=ot(r,o),{isTargetingSelf:n,target:s,type:a,listener:o}},wn=(r,e,t,n)=>{la(r,r,e),r.nodeName?lT[e](r,t,n):r[e](t,n)},dT={on(...r){const{isTargetingSelf:e,target:t,type:n,listener:s}=Oo(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}=Oo(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}=Oo(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||al(r))Ht(this.eventBusEl_,r,e);else{const n=r,s=e;la(n,this,"off"),s0(s,this,"off"),a0(t,this,"off"),t=ot(this,t),this.off("dispose",t),n.nodeName?(Ht(n,s,t),Ht(n,"dispose",t)):nn(n)&&(n.off(s,t),n.off("dispose",t))}},trigger(r,e){la(this.eventBusEl_,this,"trigger");const t=r&&typeof r!="string"?r.type:r;if(!al(t))throw new Error(`Invalid event type for ${Fa(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return gr(this.eventBusEl_,r,e)}};function Vl(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,dT),r.eventedCallbacks&&r.eventedCallbacks.forEach(n=>{n()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(n){n&&ti.has(n)&&ti.delete(n)}),G.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const hT={state:{},setState(r){typeof r=="function"&&(r=r());let e;return Xn(r,(t,n)=>{this.state[n]!==t&&(e=e||{},e[n]={from:this.state[n],to:t}),this.state[n]=t}),e&&nn(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function o0(r,e){return Object.assign(r,hT),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&nn(r)&&r.on("statechanged",r.handleStateChanged),r}const Qr=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},yt=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},l0=function(r,e){return yt(r)===yt(e)};var fT=Object.freeze({__proto__:null,toLowerCase:Qr,toTitleCase:yt,titleCaseEquals:l0});class he{constructor(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=st({},this.options_),t=this.options_=st(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_${bi()}`}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&&(Vl(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),o0(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_=st(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 d=n;return o&&o[e]?d=o[e]:c&&c[e]&&(d=c[e]),t&&(d=d.replace(/\{(\d+)\}/g,function(g,m){const S=t[m-1];let T=S;return typeof S>"u"&&(T=g),T})),d}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((n,s)=>n.concat(s),[]);let 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=_e.createElementNS(n,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const o=_e.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=yt(e);const o=t.componentClass||a;t.name=a;const l=he.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&&yt(s.name()),a&&(this.childNameIndex_[a]=s,this.childNameIndex_[Qr(a)]=s),typeof s.el=="function"&&s.el()){let o=null;this.children_[n+1]&&(this.children_[n+1].el_?o=this.children_[n+1].el_:mr(this.children_[n+1])&&(o=this.children_[n+1])),this.contentEl().insertBefore(s.el(),o)}return s}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let 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_[yt(e.name())]=null,this.childNameIndex_[Qr(e.name())]=null;const n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const 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 d=this.addChild(l,c);d&&(this[l]=d)};let s;const a=he.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=he.getComponent(o.opts.componentClass||yt(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 _n(e,t||this.contentEl())}$$(e,t){return Zh(e,t||this.contentEl())}hasClass(e){return Kr(this.el_,e)}addClass(...e){Ln(this.el_,...e)}removeClass(...e){Ba(this.el_,...e)}toggleClass(e,t){jh(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 Gh(this.el_,e)}setAttribute(e,t){ur(this.el_,e,t)}removeAttribute(e){La(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"+yt(e)],10)}currentDimension(e){let t=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(t=dr(this.el_,e),t=parseFloat(t),t===0||isNaN(t)){const n=`offset${yt(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=G.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,d=l.touches[0].pageY-t.pageY;Math.sqrt(c*c+d*d)>n&&(a=!1)}});const o=function(){a=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(l){t=null,a===!0&&G.performance.now()-e<s&&(l.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=ot(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=ot(this,e),this.clearTimersOnDispose_(),n=G.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),G.clearTimeout(e)),e}setInterval(e,t){e=ot(this,e),this.clearTimersOnDispose_();const n=G.setInterval(e,t);return this.setIntervalIds_.add(n),n}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),G.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var t;return e=ot(this,e),t=G.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=ot(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),G.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=G.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"||G.getComputedStyle(a).height==="0px"||G.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>(_e.documentElement.clientWidth||G.innerWidth)||o.y<0||o.y>(_e.documentElement.clientHeight||G.innerHeight))return!1;let l=_e.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=he.getComponent("Tech"),s=n&&n.isTech(t),a=he===t||he.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=yt(e),he.components_||(he.components_={});const o=he.getComponent("Player");if(e==="Player"&&o&&o.players){const l=o.players,c=Object.keys(l);if(l&&c.length>0){for(let d=0;d<c.length;d++)if(l[c[d]]!==null)throw new Error("Can not register Player component after player has been created.")}}return he.components_[e]=t,he.components_[Qr(e)]=t,t}static getComponent(e){if(!(!e||!he.components_))return he.components_[e]}}he.registerComponent("Component",he);function pT(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 td(r,e,t,n){return pT(r,n,t.length-1),t[n][e]}function Bo(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:td.bind(null,"start",0,r),end:td.bind(null,"end",1,r)},G.Symbol&&G.Symbol.iterator&&(e[G.Symbol.iterator]=()=>(r||[]).values()),e}function Ii(r,e){return Array.isArray(r)?Bo(r):r===void 0||e===void 0?Bo():Bo([[r,e]])}const u0=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 Fl=u0;function c0(r){Fl=r}function d0(){Fl=u0}function Vn(r,e=r){return Fl(r,e)}var mT=Object.freeze({__proto__:null,createTimeRanges:Ii,createTimeRange:Ii,setFormatTime:c0,resetFormatTime:d0,formatTime:Vn});function h0(r,e){let t=0,n,s;if(!e)return 0;(!r||!r.length)&&(r=Ii(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:ji(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 Zr(r){return r!=null&&typeof r.then=="function"}function Fi(r){Zr(r)&&r.then(null,e=>{})}const ol=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}})})},gT=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=ol(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(ol))},vT=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 ll={textTracksToJson:gT,jsonToTextTracks:vT,trackToJson:ol};const Lo="vjs-modal-dialog";class vr extends he{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:`${Lo}-content`},{role:"document"}),this.descEl_=Re("p",{className:`${Lo}-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`${Lo} 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(),Qh(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"),Pa(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=_e.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}_e.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 G.HTMLAnchorElement||t instanceof G.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof G.HTMLInputElement||t instanceof G.HTMLSelectElement||t instanceof G.HTMLTextAreaElement||t instanceof G.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof G.HTMLIFrameElement||t instanceof G.HTMLObjectElement||t instanceof G.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable"))}}vr.prototype.options_={pauseOnOpen:!0,temporary:!0};he.registerComponent("ModalDialog",vr);class Fn extends mi{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})},nn(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 Mo=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 f0 extends Fn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){Mo(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Mo(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Mo(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const Po=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 p0 extends Fn{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){Po(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&&Po(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Po(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 $l 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 yT{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 ua{constructor(e){ua.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 _T={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},TT={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},bT={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},id={disabled:"disabled",hidden:"hidden",showing:"showing"};class Ul extends mi{constructor(e={}){super();const t={id:e.id||"vjs_track_"+bi(),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 ql=function(r){return new URL(r,_e.baseURI)},m0=function(r){return new URL(r,_e.baseURI).href},zl=function(r){if(typeof r=="string"){const t=r.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return t?t[1].toLowerCase():""}return""},$a=function(r,e=G.location){return ql(r).origin!==e.origin};var xT=Object.freeze({__proto__:null,parseUrl:ql,getAbsoluteURL:m0,getFileExtension:zl,isCrossOrigin:$a});const nd=function(r,e){const t=new G.WebVTT.Parser(G,G.vttjs,G.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&&(G.console&&G.console.groupCollapsed&&G.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),n.forEach(s=>We.error(s)),G.console&&G.console.groupEnd&&G.console.groupEnd()),t.flush()},rd=function(r,e){const t={uri:r},n=$a(r);n&&(t.cors=n);const s=e.tech_.crossOrigin()==="use-credentials";s&&(t.withCredentials=s),vh(t,ot(this,function(a,o,l){if(a)return We.error(a,o);e.loaded_=!0,typeof G.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 nd(l,e)}):nd(l,e)}))};class ls extends Ul{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const t=st(e,{kind:bT[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=id[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 ua(this.cues_),o=new ua(this.activeCues_);let l=!1;this.timeupdateHandler=ot(this,function(d={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const c=()=>{this.stopTracking()};this.tech_.one("dispose",c),n!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return s},set(){}},mode:{get(){return n},set(d){id[d]&&n!==d&&(n=d,!this.preload_&&n!=="disabled"&&this.cues.length===0&&rd(this.src,this),this.stopTracking(),n!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?a:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return o;const d=this.tech_.currentTime(),g=[];for(let m=0,S=this.cues.length;m<S;m++){const T=this.cues[m];T.startTime<=d&&T.endTime>=d&&g.push(T)}if(l=!1,g.length!==this.activeCues_.length)l=!0;else for(let m=0;m<g.length;m++)this.activeCues_.indexOf(g[m])===-1&&(l=!0);return this.activeCues_=g,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")&&rd(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 G.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 ll.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}}}}ls.prototype.allowedEvents_={cuechange:"cuechange"};class g0 extends Ul{constructor(e={}){const t=st(e,{kind:TT[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 v0 extends Ul{constructor(e={}){const t=st(e,{kind:_T[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 rn extends mi{constructor(e={}){super();let t;const n=new ls(e);this.kind=n.kind,this.src=n.src,this.srclang=n.language,this.label=n.label,this.default=n.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return n}}}),t=rn.NONE,n.addEventListener("loadeddata",()=>{t=rn.LOADED,this.trigger({type:"load",target:this})})}}rn.prototype.allowedEvents_={load:"load"};rn.NONE=0;rn.LOADING=1;rn.LOADED=2;rn.ERROR=3;const yi={audio:{ListClass:f0,TrackClass:g0,capitalName:"Audio"},video:{ListClass:p0,TrackClass:v0,capitalName:"Video"},text:{ListClass:$l,TrackClass:ls,capitalName:"Text"}};Object.keys(yi).forEach(function(r){yi[r].getterName=`${r}Tracks`,yi[r].privateName=`${r}Tracks_`});const hr={remoteText:{ListClass:$l,TrackClass:ls,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:yT,TrackClass:rn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},ei=Object.assign({},yi,hr);hr.names=Object.keys(hr);yi.names=Object.keys(yi);ei.names=[].concat(hr.names).concat(yi.names);function CT(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 ei.text.TrackClass(s);return a.addTrack(o),o}class Ue extends he{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}),ei.names.forEach(n=>{const s=ei[n];e&&e[s.getterName]&&(this[s.privateName]=e[s.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(n=>{e[`native${n}Tracks`]===!1&&(this[`featuresNative${n}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new ei.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ot(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 Ii(0,0)}bufferedPercent(){return h0(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(yi.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_?Ii(0,0):Ii()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){yi.names.forEach(e=>{const t=yi[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(!G.WebVTT)if(_e.body.contains(this.el())){if(!this.options_["vtt.js"]&&lr(Dc)&&Object.keys(Dc).length>0){this.trigger("vttjsloaded");return}const e=_e.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),G.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 CT(this,e,t,n)}createRemoteTextTrack(e){const t=st(e,{tech:this});return new hr.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=bi();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=yt(e),Ue.techs_[e]=t,Ue.techs_[Qr(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=yt(e),G&&G.videojs&&G.videojs[e])return We.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),G.videojs[e]}}}ei.names.forEach(function(r){const e=ei[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)}};he.registerComponent("Tech",Ue);Ue.registerTech("Tech",Ue);Ue.defaultTechOrder_=[];const Mn={},ca={},da={};function ST(r,e){Mn[r]=Mn[r]||[],Mn[r].push(e)}function ET(r,e,t){r.setTimeout(()=>Dn(e,Mn[e.type],t,r),1)}function kT(r,e){r.forEach(t=>t.setTech&&t.setTech(e))}function wT(r,e,t){return r.reduceRight(jl(t),e[t]())}function DT(r,e,t,n){return e[t](r.reduce(jl(t),n))}function sd(r,e,t,n=null){const s="call"+yt(t),a=r.reduce(jl(s),n),o=a===da,l=o?null:e[t](a);return IT(r,t,l,o),l}const AT={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},NT={setCurrentTime:1,setMuted:1,setVolume:1},ad={play:1,pause:1};function jl(r){return(e,t)=>e===da?da:t[r]?t[r](e):e}function IT(r,e,t,n){for(let s=r.length-1;s>=0;s--){const a=r[s];a[e]&&a[e](n,t)}}function OT(r){ca.hasOwnProperty(r.id())&&delete ca[r.id()]}function BT(r,e){const t=ca[r.id()];let n=null;if(t==null)return n=e(r),ca[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=BT(n,o);if(!c.setSource)return s.push(c),Dn(r,l,t,n,s,a);c.setSource(Object.assign({},r),function(d,g){if(d)return Dn(r,l,t,n,s,a);s.push(c),Dn(g,r.type===g.type?l:Mn[g.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 LT={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},ha=function(r=""){const e=zl(r);return LT[e.toLowerCase()]||""},MT=(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 ha(e)},y0=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(t){t=y0(t),Array.isArray(t)?e=e.concat(t):ji(t)&&e.push(t)}),r=e}else typeof r=="string"&&r.trim()?r=[od({src:r})]:ji(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[od(r)]:r=[];return r};function od(r){if(!r.type){const e=ha(r.src);e&&(r.type=e)}return r}var PT=`<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>
|
|
@@ -199,26 +199,26 @@ See https://github.com/videojs/video.js/issues/2617 for more info.
|
|
|
199
199
|
}
|
|
200
200
|
`)}}rl(1,ae);ae.VERSION=el;ae.options=it.prototype.options_;ae.getPlayers=()=>it.players;ae.getPlayer=r=>{const e=it.players;let t;if(typeof r=="string"){const n=K0(r),s=e[n];if(s)return s;t=_n("#"+n)}else t=r;if(mr(t)){const{player:n,playerId:s}=t;if(n||e[s])return n||e[s]}};ae.getAllPlayers=()=>Object.keys(it.players).map(r=>it.players[r]).filter(Boolean);ae.players=it.players;ae.getComponent=he.getComponent;ae.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)`),he.registerComponent.call(he,r,e));ae.getTech=Ue.getTech;ae.registerTech=Ue.registerTech;ae.use=ST;Object.defineProperty(ae,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(ae.middleware,"TERMINATOR",{value:da,writeable:!1,enumerable:!0});ae.browser=Uh;ae.obj=eT;ae.mergeOptions=Bi(9,"videojs.mergeOptions","videojs.obj.merge",st);ae.defineLazyProperty=Bi(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Da);ae.bind=Bi(9,"videojs.bind","native Function.prototype.bind",ot);ae.registerPlugin=li.registerPlugin;ae.deregisterPlugin=li.deregisterPlugin;ae.plugin=(r,e)=>(We.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),li.registerPlugin(r,e));ae.getPlugins=li.getPlugins;ae.getPlugin=li.getPlugin;ae.getPluginVersion=li.getPluginVersion;ae.addLanguage=function(r,e){return r=(""+r).toLowerCase(),ae.options.languages=st(ae.options.languages,{[r]:e}),ae.options.languages[r]};ae.log=We;ae.createLogger=Bh;ae.time=mT;ae.createTimeRange=Bi(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Ii);ae.createTimeRanges=Bi(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Ii);ae.formatTime=Bi(9,"videojs.formatTime","videojs.time.formatTime",Vn);ae.setFormatTime=Bi(9,"videojs.setFormatTime","videojs.time.setFormatTime",c0);ae.resetFormatTime=Bi(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",d0);ae.parseUrl=Bi(9,"videojs.parseUrl","videojs.url.parseUrl",ql);ae.isCrossOrigin=Bi(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",$a);ae.EventTarget=mi;ae.any=Rl;ae.on=pi;ae.one=Va;ae.off=Ht;ae.trigger=gr;ae.xhr=vh;ae.TrackList=Fn;ae.TextTrack=ls;ae.TextTrackList=$l;ae.AudioTrack=g0;ae.AudioTrackList=f0;ae.VideoTrack=v0;ae.VideoTrackList=p0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{ae[r]=function(){return We.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),e0[r].apply(null,arguments)}});ae.computedStyle=Bi(9,"videojs.computedStyle","videojs.dom.computedStyle",dr);ae.dom=e0;ae.fn=uT;ae.num=HT;ae.str=fT;ae.url=xT;ae.Error=gb;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class vb{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 ga extends ae.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const n=this.levels_.length;return t=new vb(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}}ga.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in ga.prototype.allowedEvents_)ga.prototype["on"+r]=null;var Q0="4.1.0";const yb=function(r,e){const t=r.qualityLevels,n=new ga,s=function(){n.dispose(),r.qualityLevels=t,r.off("dispose",s)};return r.on("dispose",s),r.qualityLevels=()=>n,r.qualityLevels.VERSION=Q0,n},Z0=function(r){return yb(this,ae.obj.merge({},r))};ae.registerPlugin("qualityLevels",Z0);Z0.VERSION=Q0;/*! @name @videojs/http-streaming @version 3.17.3 @license Apache-2.0 */const ai=Sa,va=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,Ci=r=>ae.log.debug?ae.log.debug.bind(ae,"VHS:",`${r} >`):function(){};function nt(...r){const e=ae.obj||ae;return(e.merge||e.mergeOptions).apply(e,r)}function Pt(...r){const e=ae.time||ae;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function _b(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 $i=1/30,Ui=$i*3,J0=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 Pt(t)},Wn=function(r,e){return J0(r,function(t,n){return t-Ui<=e&&n+Ui>=e})},Us=function(r,e){return J0(r,function(t){return t-$i>=e})},Tb=function(r){if(r.length<2)return Pt();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 Pt(e)},bb=function(r,e){let t=null,n=null,s=0;const a=[],o=[];if(!r||!r.length||!e||!e.length)return Pt();let l=r.length;for(;l--;)a.push({time:r.start(l),type:"start"}),a.push({time:r.end(l),type:"end"});for(l=e.length;l--;)a.push({time:e.start(l),type:"start"}),a.push({time:e.end(l),type:"end"});for(a.sort(function(c,d){return c.time-d.time}),l=0;l<a.length;l++)a[l].type==="start"?(s++,s===2&&(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 Pt(o)},ef=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(", ")},xb=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},Cb=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},zo=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},su=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},au=(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},hl=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),[]),tf=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},nf=({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},rf=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const t=tf(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},Sb=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+=au(r,s),typeof s.start<"u")return{result:t+s.start,precise:!0}}return{result:t,precise:!1}},Eb=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+=au(r,n),typeof n.end<"u")return{result:n.end-t,precise:!0}}return{result:-1,precise:!1}},sf=function(r,e,t){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const n=Sb(r,e);if(n.precise)return n.result;const s=Eb(r,e);return s.precise?s.result:n.result+t},af=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 G.Infinity}return sf(r,e,t)},Jr=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},of=function(r,e,t,n){if(!r||!r.segments)return null;if(r.endList)return af(r);if(e===null)return null;e=e||0;let s=sf(r,r.mediaSequence+r.segments.length,e);return t&&(n=typeof n=="number"?n:rf(null,r),s-=n),Math.max(0,s)},kb=function(r,e,t){const s=e||0;let a=of(r,e,!0,t);return a===null?Pt():(a<s&&(a=s),Pt(s,a))},wb=function({playlist:r,currentTime:e,startingSegmentIndex:t,startingPartIndex:n,startTime:s,exactManifestTimings:a}){let o=e-s;const l=hl(r);let c=0;for(let d=0;d<l.length;d++){const g=l[d];if(t===g.segmentIndex&&!(typeof n=="number"&&typeof g.partIndex=="number"&&n!==g.partIndex)){c=d;break}}if(o<0){if(c>0)for(let d=c-1;d>=0;d--){const g=l[d];if(o+=g.duration,a){if(o<0)continue}else if(o+$i<=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s-Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e}}if(c<0){for(let d=c;d<0;d++)if(o-=r.targetDuration,o<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e};c=0}for(let d=c;d<l.length;d++){const g=l[d];o-=g.duration;const m=g.duration>$i,S=o===0,b=m&&o+$i>=0;if(!((S||b)&&d!==l.length-1)){if(a){if(o>0)continue}else if(o-$i>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s+Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:e}},lf=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},ou=function(r){return r.excludeUntil&&r.excludeUntil===1/0},ja=function(r){const e=lf(r);return!r.disabled&&!e},Db=function(r){return r.disabled},Ab=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},uf=function(r,e){return e.attributes&&e.attributes[r]},Nb=function(r,e,t,n=0){return uf("BANDWIDTH",t)?(r*t.attributes.BANDWIDTH-n*8)/e:NaN},fl=(r,e)=>{if(r.playlists.length===1)return!0;const t=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(n=>ja(n)?(n.attributes.BANDWIDTH||0)<t:!1).length===0},lu=(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),Cd=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},hs=r=>{if(!r||!r.playlists||!r.playlists.length)return Cd(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=>Th(a))||Cd(r,a=>lu(t,a))))return!1}return!0};var oi={liveEdgeDelay:rf,duration:af,seekable:kb,getMediaInfoForTime:wb,isEnabled:ja,isDisabled:Db,isExcluded:lf,isIncompatible:ou,playlistEnd:of,isAes:Ab,hasAttribute:uf,estimateSegmentRequestTime:Nb,isLowestEnabledRendition:fl,isAudioOnly:hs,playlistMatch:lu,segmentDurationWithParts:au};const{log:cf}=ae,Jn=(r,e)=>`${r}-${e}`,df=(r,e,t)=>`placeholder-uri-${r}-${e}-${t}`,Ib=({onwarn:r,oninfo:e,manifestString:t,customTagParsers:n=[],customTagMappers:s=[],llhls:a})=>{const o=new y_;r&&o.on("warn",r),e&&o.on("info",e),n.forEach(d=>o.addParser(d)),s.forEach(d=>o.addTagMapper(d)),o.push(t),o.end();const l=o.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(d){l.hasOwnProperty(d)&&delete l[d]}),l.segments&&l.segments.forEach(function(d){["parts","preloadHints"].forEach(function(g){d.hasOwnProperty(g)&&delete d[g]})})),!l.targetDuration){let d=10;l.segments&&l.segments.length&&(d=l.segments.reduce((g,m)=>Math.max(g,m.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${d}`}),l.targetDuration=d}const c=tf(l);if(c.length&&!l.partTargetDuration){const d=c.reduce((g,m)=>Math.max(g,m.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${d}`}),cf.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),l.partTargetDuration=d}return l},Tr=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(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)}})},hf=({playlist:r,uri:e,id:t})=>{r.id=t,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},Ob=r=>{let e=r.playlists.length;for(;e--;){const t=r.playlists[e];hf({playlist:t,id:Jn(e,t.uri)}),t.resolvedUri=ai(r.uri,t.uri),r.playlists[t.id]=t,r.playlists[t.uri]=t,t.attributes.BANDWIDTH||cf.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},Bb=r=>{Tr(r,e=>{e.uri&&(e.resolvedUri=ai(r.uri,e.uri))})},Lb=(r,e)=>{const t=Jn(0,e),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:G.location.href,resolvedUri:G.location.href,playlists:[{uri:e,id:t,resolvedUri:e,attributes:{}}]};return n.playlists[t]=n.playlists[0],n.playlists[e]=n.playlists[0],n},ff=(r,e,t=df)=>{r.uri=e;for(let s=0;s<r.playlists.length;s++)if(!r.playlists[s].uri){const a=`placeholder-uri-${s}`;r.playlists[s].uri=a}const n=hs(r);Tr(r,(s,a,o,l)=>{if(!s.playlists||!s.playlists.length){if(n&&a==="AUDIO"&&!s.uri)for(let c=0;c<r.playlists.length;c++){const d=r.playlists[c];if(d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===o)return}s.playlists=[bt({},s)]}s.playlists.forEach(function(c,d){const g=t(a,o,l,c),m=Jn(d,g);c.uri?c.resolvedUri=c.resolvedUri||ai(r.uri,c.uri):(c.uri=d===0?g:m,c.resolvedUri=c.uri),c.id=c.id||m,c.attributes=c.attributes||{},r.playlists[c.id]=c,r.playlists[c.uri]=c})}),Ob(r),Bb(r)};class Sd{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 pf=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=bt({},t),o.errorType=ae.Error.NetworkRequestFailed;else if(e.aborted)o.errorType=ae.Error.NetworkRequestAborted;else if(e.timedout)o.errorType=ae.Error.NetworkRequestTimeout;else if(l){const c=n?ae.Error.NetworkBodyParserFailed:ae.Error.NetworkBadStatus;o.errorType=c,o.status=e.status,o.headers=e.headers}return o},Mb=Ci("CodecUtils"),mf=function(r){const e=r.attributes||{};if(e.CODECS)return Ri(e.CODECS)},gf=(r,e)=>{const t=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&t.AUDIO&&r.mediaGroups.AUDIO[t.AUDIO]},Pb=(r,e)=>{if(!gf(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},as=function(r){const e={};return r.forEach(({mediaType:t,type:n,details:s})=>{e[t]=e[t]||[],e[t].push(_h(`${n}${s}`))}),Object.keys(e).forEach(function(t){if(e[t].length>1){Mb(`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},Ed=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},es=function(r,e){const t=e.attributes||{},n=as(mf(e)||[]);if(gf(r,e)&&!n.audio&&!Pb(r,e)){const s=as(T_(r,t.AUDIO)||[]);s.audio&&(n.audio=s.audio)}return n},{EventTarget:Rb}=ae,Vb=(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=nf(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 G.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},Fb=(r,e)=>{if(!r)return e;const t=nt(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]=nt(r.parts[n],e.parts[n]));return!r.skipped&&e.skipped&&(t.skipped=!1),r.preload&&!e.preload&&(t.preload=!1),t},$b=(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],d=s[l];c?(o=c.map||o,a.push(Fb(c,d))):(o&&!d.map&&(d.map=o),a.push(d))}return a},vf=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=ai(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=ai(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=ai(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=ai(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(t=>{t.resolvedUri||(t.resolvedUri=ai(e,t.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(t=>{t.resolvedUri||(t.resolvedUri=ai(e,t.uri))})},yf=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},_f=(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,pl=(r,e,t=_f)=>{const n=nt(r,{}),s=n.playlists[e.id];if(!s||t(s,e))return null;e.segments=yf(e);const a=nt(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=$b(s.segments,e.segments,e.mediaSequence-s.mediaSequence)}a.segments.forEach(o=>{vf(o,a.resolvedUri)});for(let o=0;o<n.playlists.length;o++)n.playlists[o].id===e.id&&(n.playlists[o]=a);return n.playlists[e.id]=a,n.playlists[e.uri]=a,Tr(r,(o,l,c,d)=>{if(o.playlists)for(let g=0;g<o.playlists.length;g++)e.id===o.playlists[g].id&&(o.playlists[g]=a)}),n},ml=(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},kd=(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 Yn extends Rb{constructor(e,t,n={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Ci("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 Sd,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=ai(this.main.uri,e.uri);this.llhls&&(t=Vb(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=Ib({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:ae.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=mf(n)||[];return!!as(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(),hf({playlist:o,uri:n,id:s});const l=pl(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_(ml(this.media(),!!l)),a.parsedPlaylist=kd(this.main.playlists,a.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:a}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),G.clearTimeout(this.mediaUpdateTimeout),G.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Sd,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(G.clearTimeout(this.finalRenditionTimeout),t){const l=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=G.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_(ml(e,!0)),!s)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const o={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:o}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(l,c)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=va(e.resolvedUri,c),l)return this.playlistRequestError(this.request,e,n);this.trigger({type:"playlistrequestcomplete",metadata:o}),this.haveMetadata({playlistString:c.responseText,url:e.uri,id:e.id}),n==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(G.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&&(G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const n=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=G.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&&(G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=G.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=G.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=va(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});const s=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=kd(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,ff(this.main,this.srcUri()),e.playlists.forEach(n=>{n.segments=yf(n),n.segments.forEach(s=>{vf(s,n.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const t=this.srcUri()||G.location.href;this.main=Lb(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 d=this.createCloneURI_(o.resolvedUri,e),g=Jn(s,d),m=this.createCloneAttributes_(s,o.attributes),S=this.createClonePlaylist_(o,g,e,m);n.playlists[a]=S,n.playlists[g]=S,n.playlists[d]=S}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((d,g)=>{const m=n.playlists[d.id],S=m.id,b=m.resolvedUri;delete n.playlists[S],delete n.playlists[b]});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=Jn(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]=bt({},c);const d=s.mediaGroups[a][t][l],g=this.createCloneURI_(c.resolvedUri,e);d.resolvedUri=g,d.uri=g,d.playlists=[],c.playlists.forEach((m,S)=>{const b=s.playlists[m.id],T=df(a,t,l),y=Jn(t,T);if(b&&!s.playlists[y]){const E=this.createClonePlaylist_(b,y,e),O=E.resolvedUri;s.playlists[y]=E,s.playlists[O]=E}d.playlists[S]=this.createClonePlaylist_(m,y,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),nt(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 gl=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)},Ub=(r,e)=>{if(!r||!r.size)return;let t=e;return r.forEach(n=>{t=n(t)}),t},qb=(r,e,t,n)=>{!r||!r.size||r.forEach(s=>{s(e,t,n)})},Tf=function(){const r=function e(t,n){t=nt({timeout:45e3},t);const s=e.beforeRequest||ae.Vhs.xhr.beforeRequest,a=e._requestCallbackSet||ae.Vhs.xhr._requestCallbackSet||new Set,o=e._responseCallbackSet||ae.Vhs.xhr._responseCallbackSet;s&&typeof s=="function"&&(ae.log.warn("beforeRequest is deprecated, use onRequest instead."),a.add(s));const l=ae.Vhs.xhr.original===!0?ae.xhr:ae.Vhs.xhr,c=Ub(a,t);a.delete(s);const d=l(c||t,function(m,S){return qb(o,d,m,S),gl(d,m,S,n)}),g=d.abort;return d.abort=function(){return d.aborted=!0,g.apply(d,arguments)},d.uri=t.uri,d.requestType=t.requestType,d.requestTime=Date.now(),d};return r.original=!0,r},zb=function(r){let e;const t=r.offset;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=G.BigInt(r.offset)+G.BigInt(r.length)-G.BigInt(1):e=r.offset+r.length-1,"bytes="+t+"-"+e},vl=function(r){const e={};return r.byterange&&(e.Range=zb(r.byterange)),e},jb=function(r,e){return r.start(e)+"-"+r.end(e)},Hb=function(r,e){const t=r.toString(16);return"00".substring(0,2-t.length)+t+(e%2?" ":"")},Gb=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];xh(n)?e[t]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:e[t]=n}),e},ya=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},xf=function(r){return r.resolvedUri},Cf=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(Hb).join(""),a=e.slice(o*t,o*t+t).map(Gb).join(""),n+=s+" "+a+`
|
|
203
|
-
`;return n},Wb=({bytes:r})=>Cf(r),Yb=r=>{let e="",t;for(t=0;t<r.length;t++)e+=jb(r,t)+" ";return e};var Xb=Object.freeze({__proto__:null,createTransferableMessage:bf,initSegmentId:ya,segmentKeyId:xf,hexDump:Cf,tagDump:Wb,textRanges:Yb});const Sf=.25,Kb=(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)},Qb=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,Zb=(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 d=new Date(e.segments[c+1].dateTimeObject);if(t<d)break}const s=e.segments[e.segments.length-1],a=s.dateTimeObject,o=s.videoTimingInfo?Qb(s.videoTimingInfo):s.duration+s.duration*Sf,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:oi.duration(e,e.mediaSequence+e.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})},Jb=(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*Sf)return null;n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:t-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}},e4=(r,e)=>{let t,n;try{t=new Date(r),n=new Date(e)}catch{}const s=t.getTime();return(n.getTime()-s)/1e3},t4=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},i4=({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=Jb(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=Kb(e,n.segment);return a&&(s.programDateTime=a.toISOString()),t(null,s)},Ef=({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(!t4(e))return o({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const l=Zb(r,e);if(!l)return o({message:`${r} was not found in the stream`});const c=l.segment,d=e4(c.dateTimeObject,r);if(l.type==="estimate"){if(t===0)return o({message:`${r} is not buffered yet. Try again`});n(l.estimatedStart+d),a.one("seeked",()=>{Ef({programTime:r,playlist:e,retryCount:t-1,seekTo:n,pauseAfterSeek:s,tech:a,callback:o})});return}const g=c.start+d,m=()=>o(null,a.currentTime());a.one("seeked",m),s&&a.pause(),n(g)},jo=(r,e)=>{if(r.readyState===4)return e()},n4=(r,e,t,n)=>{let s=[],a,o=!1;const l=function(m,S,b,T){return S.abort(),o=!0,t(m,S,b,T)},c=function(m,S){if(o)return;if(m)return m.metadata=Rn({requestType:n,request:S,error:m}),l(m,S,"",s);const b=S.responseText.substring(s&&s.byteLength||0,S.responseText.length);if(s=N_(s,Ch(b,!0)),a=a||Gr(s),s.length<10||a&&s.length<a+2)return jo(S,()=>l(m,S,"",s));const T=Ol(s);return T==="ts"&&s.length<188?jo(S,()=>l(m,S,"",s)):!T&&s.length<376?jo(S,()=>l(m,S,"",s)):l(null,S,T,s)},g=e({uri:r,beforeSend(m){m.overrideMimeType("text/plain; charset=x-user-defined"),m.addEventListener("progress",function({total:S,loaded:b}){return gl(m,null,{statusCode:m.status},c)})}},function(m,S){return gl(g,m,S,c)});return g},{EventTarget:r4}=ae,wd=function(r,e){if(!_f(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},s4=(r,e,t,n)=>{const s=n.attributes.NAME||t;return`placeholder-uri-${r}-${e}-${s}`},a4=({mainXml:r,srcUrl:e,clientOffset:t,sidxMapping:n,previousManifest:s})=>{const a=D3(r,{manifestUri:e,clientOffset:t,sidxMapping:n,previousManifest:s});return ff(a,e,s4),a},o4=(r,e)=>{Tr(r,(t,n,s,a)=>{(!e.mediaGroups[n][s]||!(a in e.mediaGroups[n][s]))&&delete r.mediaGroups[n][s][a]})},l4=(r,e,t)=>{let n=!0,s=nt(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=ka(o.sidx);t&&t[c]&&t[c].sidx&&Al(o,t[c].sidx,o.sidx.resolvedUri)}const l=pl(s,o,wd);l&&(s=l,n=!1)}return Tr(e,(a,o,l,c)=>{if(a.playlists&&a.playlists.length){const d=a.playlists[0].id,g=pl(s,a.playlists[0],wd);g&&(s=g,c in s.mediaGroups[o][l]||(s.mediaGroups[o][l][c]=a),s.mediaGroups[o][l][c].playlists[0]=s.playlists[d],n=!1)}}),o4(s,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(n=!1),n?null:s},u4=(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,Dd=(r,e)=>{const t={};for(const n in r){const a=r[n].sidx;if(a){const o=ka(a);if(!e[o])break;const l=e[o].sidxInfo;u4(l,a)&&(t[o]=e[o])}}return t},c4=(r,e)=>{let n=Dd(r.playlists,e);return Tr(r,(s,a,o,l)=>{if(s.playlists&&s.playlists.length){const c=s.playlists;n=nt(n,Dd(c,e))}}),n};class yl extends r4{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_=Ci("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&&ka(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s]){G.clearTimeout(this.mediaRequest_),this.mediaRequest_=G.setTimeout(()=>n(!1),0);return}const a=va(e.sidx.resolvedUri),o=(c,d)=>{if(this.requestErrored_(c,d,t))return;const g=this.mainPlaylistLoader_.sidxMapping_,{requestType:m}=d;let S;try{S=B3(Pe(d.response).subarray(8))}catch(b){b.metadata=Rn({requestType:m,request:d,parseFailure:!0}),this.requestErrored_(b,d,t);return}return g[s]={sidxInfo:e.sidx,sidx:S},Al(e,S,e.sidx.resolvedUri),n(!0)},l="dash-sidx";this.request=n4(a,this.vhs_.xhr,(c,d,g,m)=>{if(c)return o(c,d);if(!g||g!=="mp4"){const T=g||"unknown";return o({status:d.status,message:`Unsupported ${T} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},d)}const{offset:S,length:b}=e.sidx.byterange;if(m.length>=b+S)return o(c,{response:m.subarray(S,S+b),status:d.status,uri:d.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:vl({byterange:e.sidx.byterange})},o)},l)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},G.clearTimeout(this.minimumUpdatePeriodTimeout_),G.clearTimeout(this.mediaRequest_),G.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,G.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(),G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(G.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const n=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=G.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_){G.clearTimeout(this.mediaRequest_),this.mediaRequest_=G.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=va(this.mainPlaylistLoader_.srcUrl,s),a){this.handleMain_(),this.syncClientServerClock_(()=>e(s,a));return}return e(s,a)})}syncClientServerClock_(e){const t=A3(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:ai(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_(){G.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=a4({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(a){this.error=a,this.error.metadata={errorType:ae.Error.StreamingDashManifestParserError,error:a},this.trigger("error")}e&&(n=l4(e,n,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=n||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||n&&n.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(n),n){const{duration:a,endList:o}=n,l=[];n.playlists.forEach(d=>{l.push({id:d.id,bandwidth:d.attributes.BANDWIDTH,resolution:d.attributes.RESOLUTION,codecs:d.attributes.CODECS})});const c={duration:a,isLive:!o,renditions:l};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_&&(G.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_=G.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_=c4(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=G.setTimeout(()=>{this.trigger("mediaupdatetimeout"),s()},ml(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 Lt={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 d4=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},kf=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},h4=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())}},wf=function(r){return function(){const e=h4(r),t=kf(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}},Df=function(r){return`var browserWorkerPolyFill = ${kf.toString()};
|
|
202
|
+
`}return e}const $i=1/30,Ui=$i*3,J0=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 Pt(t)},Wn=function(r,e){return J0(r,function(t,n){return t-Ui<=e&&n+Ui>=e})},Us=function(r,e){return J0(r,function(t){return t-$i>=e})},Tb=function(r){if(r.length<2)return Pt();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 Pt(e)},bb=function(r,e){let t=null,n=null,s=0;const a=[],o=[];if(!r||!r.length||!e||!e.length)return Pt();let l=r.length;for(;l--;)a.push({time:r.start(l),type:"start"}),a.push({time:r.end(l),type:"end"});for(l=e.length;l--;)a.push({time:e.start(l),type:"start"}),a.push({time:e.end(l),type:"end"});for(a.sort(function(c,d){return c.time-d.time}),l=0;l<a.length;l++)a[l].type==="start"?(s++,s===2&&(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 Pt(o)},ef=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(", ")},xb=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},Cb=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},zo=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},su=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},au=(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},hl=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),[]),tf=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},nf=({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},rf=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const t=tf(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},Sb=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+=au(r,s),typeof s.start<"u")return{result:t+s.start,precise:!0}}return{result:t,precise:!1}},Eb=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+=au(r,n),typeof n.end<"u")return{result:n.end-t,precise:!0}}return{result:-1,precise:!1}},sf=function(r,e,t){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const n=Sb(r,e);if(n.precise)return n.result;const s=Eb(r,e);return s.precise?s.result:n.result+t},af=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 G.Infinity}return sf(r,e,t)},Jr=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},of=function(r,e,t,n){if(!r||!r.segments)return null;if(r.endList)return af(r);if(e===null)return null;e=e||0;let s=sf(r,r.mediaSequence+r.segments.length,e);return t&&(n=typeof n=="number"?n:rf(null,r),s-=n),Math.max(0,s)},kb=function(r,e,t){const s=e||0;let a=of(r,e,!0,t);return a===null?Pt():(a<s&&(a=s),Pt(s,a))},wb=function({playlist:r,currentTime:e,startingSegmentIndex:t,startingPartIndex:n,startTime:s,exactManifestTimings:a}){let o=e-s;const l=hl(r);let c=0;for(let d=0;d<l.length;d++){const g=l[d];if(t===g.segmentIndex&&!(typeof n=="number"&&typeof g.partIndex=="number"&&n!==g.partIndex)){c=d;break}}if(o<0){if(c>0)for(let d=c-1;d>=0;d--){const g=l[d];if(o+=g.duration,a){if(o<0)continue}else if(o+$i<=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s-Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e}}if(c<0){for(let d=c;d<0;d++)if(o-=r.targetDuration,o<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e};c=0}for(let d=c;d<l.length;d++){const g=l[d];o-=g.duration;const m=g.duration>$i,S=o===0,T=m&&o+$i>=0;if(!((S||T)&&d!==l.length-1)){if(a){if(o>0)continue}else if(o-$i>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s+Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:e}},lf=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},ou=function(r){return r.excludeUntil&&r.excludeUntil===1/0},ja=function(r){const e=lf(r);return!r.disabled&&!e},Db=function(r){return r.disabled},Ab=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},uf=function(r,e){return e.attributes&&e.attributes[r]},Nb=function(r,e,t,n=0){return uf("BANDWIDTH",t)?(r*t.attributes.BANDWIDTH-n*8)/e:NaN},fl=(r,e)=>{if(r.playlists.length===1)return!0;const t=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(n=>ja(n)?(n.attributes.BANDWIDTH||0)<t:!1).length===0},lu=(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),Cd=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},hs=r=>{if(!r||!r.playlists||!r.playlists.length)return Cd(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=>Th(a))||Cd(r,a=>lu(t,a))))return!1}return!0};var oi={liveEdgeDelay:rf,duration:af,seekable:kb,getMediaInfoForTime:wb,isEnabled:ja,isDisabled:Db,isExcluded:lf,isIncompatible:ou,playlistEnd:of,isAes:Ab,hasAttribute:uf,estimateSegmentRequestTime:Nb,isLowestEnabledRendition:fl,isAudioOnly:hs,playlistMatch:lu,segmentDurationWithParts:au};const{log:cf}=ae,Jn=(r,e)=>`${r}-${e}`,df=(r,e,t)=>`placeholder-uri-${r}-${e}-${t}`,Ib=({onwarn:r,oninfo:e,manifestString:t,customTagParsers:n=[],customTagMappers:s=[],llhls:a})=>{const o=new y_;r&&o.on("warn",r),e&&o.on("info",e),n.forEach(d=>o.addParser(d)),s.forEach(d=>o.addTagMapper(d)),o.push(t),o.end();const l=o.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(d){l.hasOwnProperty(d)&&delete l[d]}),l.segments&&l.segments.forEach(function(d){["parts","preloadHints"].forEach(function(g){d.hasOwnProperty(g)&&delete d[g]})})),!l.targetDuration){let d=10;l.segments&&l.segments.length&&(d=l.segments.reduce((g,m)=>Math.max(g,m.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${d}`}),l.targetDuration=d}const c=tf(l);if(c.length&&!l.partTargetDuration){const d=c.reduce((g,m)=>Math.max(g,m.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${d}`}),cf.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),l.partTargetDuration=d}return l},Tr=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(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)}})},hf=({playlist:r,uri:e,id:t})=>{r.id=t,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},Ob=r=>{let e=r.playlists.length;for(;e--;){const t=r.playlists[e];hf({playlist:t,id:Jn(e,t.uri)}),t.resolvedUri=ai(r.uri,t.uri),r.playlists[t.id]=t,r.playlists[t.uri]=t,t.attributes.BANDWIDTH||cf.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},Bb=r=>{Tr(r,e=>{e.uri&&(e.resolvedUri=ai(r.uri,e.uri))})},Lb=(r,e)=>{const t=Jn(0,e),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:G.location.href,resolvedUri:G.location.href,playlists:[{uri:e,id:t,resolvedUri:e,attributes:{}}]};return n.playlists[t]=n.playlists[0],n.playlists[e]=n.playlists[0],n},ff=(r,e,t=df)=>{r.uri=e;for(let s=0;s<r.playlists.length;s++)if(!r.playlists[s].uri){const a=`placeholder-uri-${s}`;r.playlists[s].uri=a}const n=hs(r);Tr(r,(s,a,o,l)=>{if(!s.playlists||!s.playlists.length){if(n&&a==="AUDIO"&&!s.uri)for(let c=0;c<r.playlists.length;c++){const d=r.playlists[c];if(d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===o)return}s.playlists=[bt({},s)]}s.playlists.forEach(function(c,d){const g=t(a,o,l,c),m=Jn(d,g);c.uri?c.resolvedUri=c.resolvedUri||ai(r.uri,c.uri):(c.uri=d===0?g:m,c.resolvedUri=c.uri),c.id=c.id||m,c.attributes=c.attributes||{},r.playlists[c.id]=c,r.playlists[c.uri]=c})}),Ob(r),Bb(r)};class Sd{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 pf=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=bt({},t),o.errorType=ae.Error.NetworkRequestFailed;else if(e.aborted)o.errorType=ae.Error.NetworkRequestAborted;else if(e.timedout)o.errorType=ae.Error.NetworkRequestTimeout;else if(l){const c=n?ae.Error.NetworkBodyParserFailed:ae.Error.NetworkBadStatus;o.errorType=c,o.status=e.status,o.headers=e.headers}return o},Mb=Ci("CodecUtils"),mf=function(r){const e=r.attributes||{};if(e.CODECS)return Ri(e.CODECS)},gf=(r,e)=>{const t=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&t.AUDIO&&r.mediaGroups.AUDIO[t.AUDIO]},Pb=(r,e)=>{if(!gf(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},as=function(r){const e={};return r.forEach(({mediaType:t,type:n,details:s})=>{e[t]=e[t]||[],e[t].push(_h(`${n}${s}`))}),Object.keys(e).forEach(function(t){if(e[t].length>1){Mb(`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},Ed=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},es=function(r,e){const t=e.attributes||{},n=as(mf(e)||[]);if(gf(r,e)&&!n.audio&&!Pb(r,e)){const s=as(T_(r,t.AUDIO)||[]);s.audio&&(n.audio=s.audio)}return n},{EventTarget:Rb}=ae,Vb=(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=nf(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 G.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},Fb=(r,e)=>{if(!r)return e;const t=nt(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]=nt(r.parts[n],e.parts[n]));return!r.skipped&&e.skipped&&(t.skipped=!1),r.preload&&!e.preload&&(t.preload=!1),t},$b=(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],d=s[l];c?(o=c.map||o,a.push(Fb(c,d))):(o&&!d.map&&(d.map=o),a.push(d))}return a},vf=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=ai(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=ai(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=ai(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=ai(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(t=>{t.resolvedUri||(t.resolvedUri=ai(e,t.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(t=>{t.resolvedUri||(t.resolvedUri=ai(e,t.uri))})},yf=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},_f=(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,pl=(r,e,t=_f)=>{const n=nt(r,{}),s=n.playlists[e.id];if(!s||t(s,e))return null;e.segments=yf(e);const a=nt(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=$b(s.segments,e.segments,e.mediaSequence-s.mediaSequence)}a.segments.forEach(o=>{vf(o,a.resolvedUri)});for(let o=0;o<n.playlists.length;o++)n.playlists[o].id===e.id&&(n.playlists[o]=a);return n.playlists[e.id]=a,n.playlists[e.uri]=a,Tr(r,(o,l,c,d)=>{if(o.playlists)for(let g=0;g<o.playlists.length;g++)e.id===o.playlists[g].id&&(o.playlists[g]=a)}),n},ml=(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},kd=(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 Yn extends Rb{constructor(e,t,n={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Ci("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 Sd,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=ai(this.main.uri,e.uri);this.llhls&&(t=Vb(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=Ib({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:ae.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=mf(n)||[];return!!as(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(),hf({playlist:o,uri:n,id:s});const l=pl(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_(ml(this.media(),!!l)),a.parsedPlaylist=kd(this.main.playlists,a.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:a}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),G.clearTimeout(this.mediaUpdateTimeout),G.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Sd,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(G.clearTimeout(this.finalRenditionTimeout),t){const l=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=G.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_(ml(e,!0)),!s)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const o={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:o}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(l,c)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=va(e.resolvedUri,c),l)return this.playlistRequestError(this.request,e,n);this.trigger({type:"playlistrequestcomplete",metadata:o}),this.haveMetadata({playlistString:c.responseText,url:e.uri,id:e.id}),n==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(G.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&&(G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const n=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=G.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&&(G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=G.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=G.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=va(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});const s=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=kd(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,ff(this.main,this.srcUri()),e.playlists.forEach(n=>{n.segments=yf(n),n.segments.forEach(s=>{vf(s,n.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const t=this.srcUri()||G.location.href;this.main=Lb(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 d=this.createCloneURI_(o.resolvedUri,e),g=Jn(s,d),m=this.createCloneAttributes_(s,o.attributes),S=this.createClonePlaylist_(o,g,e,m);n.playlists[a]=S,n.playlists[g]=S,n.playlists[d]=S}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((d,g)=>{const m=n.playlists[d.id],S=m.id,T=m.resolvedUri;delete n.playlists[S],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=Jn(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]=bt({},c);const d=s.mediaGroups[a][t][l],g=this.createCloneURI_(c.resolvedUri,e);d.resolvedUri=g,d.uri=g,d.playlists=[],c.playlists.forEach((m,S)=>{const T=s.playlists[m.id],b=df(a,t,l),y=Jn(t,b);if(T&&!s.playlists[y]){const E=this.createClonePlaylist_(T,y,e),I=E.resolvedUri;s.playlists[y]=E,s.playlists[I]=E}d.playlists[S]=this.createClonePlaylist_(m,y,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),nt(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 gl=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)},Ub=(r,e)=>{if(!r||!r.size)return;let t=e;return r.forEach(n=>{t=n(t)}),t},qb=(r,e,t,n)=>{!r||!r.size||r.forEach(s=>{s(e,t,n)})},Tf=function(){const r=function e(t,n){t=nt({timeout:45e3},t);const s=e.beforeRequest||ae.Vhs.xhr.beforeRequest,a=e._requestCallbackSet||ae.Vhs.xhr._requestCallbackSet||new Set,o=e._responseCallbackSet||ae.Vhs.xhr._responseCallbackSet;s&&typeof s=="function"&&(ae.log.warn("beforeRequest is deprecated, use onRequest instead."),a.add(s));const l=ae.Vhs.xhr.original===!0?ae.xhr:ae.Vhs.xhr,c=Ub(a,t);a.delete(s);const d=l(c||t,function(m,S){return qb(o,d,m,S),gl(d,m,S,n)}),g=d.abort;return d.abort=function(){return d.aborted=!0,g.apply(d,arguments)},d.uri=t.uri,d.requestType=t.requestType,d.requestTime=Date.now(),d};return r.original=!0,r},zb=function(r){let e;const t=r.offset;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=G.BigInt(r.offset)+G.BigInt(r.length)-G.BigInt(1):e=r.offset+r.length-1,"bytes="+t+"-"+e},vl=function(r){const e={};return r.byterange&&(e.Range=zb(r.byterange)),e},jb=function(r,e){return r.start(e)+"-"+r.end(e)},Hb=function(r,e){const t=r.toString(16);return"00".substring(0,2-t.length)+t+(e%2?" ":"")},Gb=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];xh(n)?e[t]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:e[t]=n}),e},ya=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},xf=function(r){return r.resolvedUri},Cf=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(Hb).join(""),a=e.slice(o*t,o*t+t).map(Gb).join(""),n+=s+" "+a+`
|
|
203
|
+
`;return n},Wb=({bytes:r})=>Cf(r),Yb=r=>{let e="",t;for(t=0;t<r.length;t++)e+=jb(r,t)+" ";return e};var Xb=Object.freeze({__proto__:null,createTransferableMessage:bf,initSegmentId:ya,segmentKeyId:xf,hexDump:Cf,tagDump:Wb,textRanges:Yb});const Sf=.25,Kb=(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)},Qb=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,Zb=(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 d=new Date(e.segments[c+1].dateTimeObject);if(t<d)break}const s=e.segments[e.segments.length-1],a=s.dateTimeObject,o=s.videoTimingInfo?Qb(s.videoTimingInfo):s.duration+s.duration*Sf,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:oi.duration(e,e.mediaSequence+e.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})},Jb=(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*Sf)return null;n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:t-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}},e4=(r,e)=>{let t,n;try{t=new Date(r),n=new Date(e)}catch{}const s=t.getTime();return(n.getTime()-s)/1e3},t4=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},i4=({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=Jb(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=Kb(e,n.segment);return a&&(s.programDateTime=a.toISOString()),t(null,s)},Ef=({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(!t4(e))return o({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const l=Zb(r,e);if(!l)return o({message:`${r} was not found in the stream`});const c=l.segment,d=e4(c.dateTimeObject,r);if(l.type==="estimate"){if(t===0)return o({message:`${r} is not buffered yet. Try again`});n(l.estimatedStart+d),a.one("seeked",()=>{Ef({programTime:r,playlist:e,retryCount:t-1,seekTo:n,pauseAfterSeek:s,tech:a,callback:o})});return}const g=c.start+d,m=()=>o(null,a.currentTime());a.one("seeked",m),s&&a.pause(),n(g)},jo=(r,e)=>{if(r.readyState===4)return e()},n4=(r,e,t,n)=>{let s=[],a,o=!1;const l=function(m,S,T,b){return S.abort(),o=!0,t(m,S,T,b)},c=function(m,S){if(o)return;if(m)return m.metadata=Rn({requestType:n,request:S,error:m}),l(m,S,"",s);const T=S.responseText.substring(s&&s.byteLength||0,S.responseText.length);if(s=N_(s,Ch(T,!0)),a=a||Gr(s),s.length<10||a&&s.length<a+2)return jo(S,()=>l(m,S,"",s));const b=Ol(s);return b==="ts"&&s.length<188?jo(S,()=>l(m,S,"",s)):!b&&s.length<376?jo(S,()=>l(m,S,"",s)):l(null,S,b,s)},g=e({uri:r,beforeSend(m){m.overrideMimeType("text/plain; charset=x-user-defined"),m.addEventListener("progress",function({total:S,loaded:T}){return gl(m,null,{statusCode:m.status},c)})}},function(m,S){return gl(g,m,S,c)});return g},{EventTarget:r4}=ae,wd=function(r,e){if(!_f(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},s4=(r,e,t,n)=>{const s=n.attributes.NAME||t;return`placeholder-uri-${r}-${e}-${s}`},a4=({mainXml:r,srcUrl:e,clientOffset:t,sidxMapping:n,previousManifest:s})=>{const a=D3(r,{manifestUri:e,clientOffset:t,sidxMapping:n,previousManifest:s});return ff(a,e,s4),a},o4=(r,e)=>{Tr(r,(t,n,s,a)=>{(!e.mediaGroups[n][s]||!(a in e.mediaGroups[n][s]))&&delete r.mediaGroups[n][s][a]})},l4=(r,e,t)=>{let n=!0,s=nt(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=ka(o.sidx);t&&t[c]&&t[c].sidx&&Al(o,t[c].sidx,o.sidx.resolvedUri)}const l=pl(s,o,wd);l&&(s=l,n=!1)}return Tr(e,(a,o,l,c)=>{if(a.playlists&&a.playlists.length){const d=a.playlists[0].id,g=pl(s,a.playlists[0],wd);g&&(s=g,c in s.mediaGroups[o][l]||(s.mediaGroups[o][l][c]=a),s.mediaGroups[o][l][c].playlists[0]=s.playlists[d],n=!1)}}),o4(s,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(n=!1),n?null:s},u4=(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,Dd=(r,e)=>{const t={};for(const n in r){const a=r[n].sidx;if(a){const o=ka(a);if(!e[o])break;const l=e[o].sidxInfo;u4(l,a)&&(t[o]=e[o])}}return t},c4=(r,e)=>{let n=Dd(r.playlists,e);return Tr(r,(s,a,o,l)=>{if(s.playlists&&s.playlists.length){const c=s.playlists;n=nt(n,Dd(c,e))}}),n};class yl extends r4{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_=Ci("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&&ka(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s]){G.clearTimeout(this.mediaRequest_),this.mediaRequest_=G.setTimeout(()=>n(!1),0);return}const a=va(e.sidx.resolvedUri),o=(c,d)=>{if(this.requestErrored_(c,d,t))return;const g=this.mainPlaylistLoader_.sidxMapping_,{requestType:m}=d;let S;try{S=B3(Pe(d.response).subarray(8))}catch(T){T.metadata=Rn({requestType:m,request:d,parseFailure:!0}),this.requestErrored_(T,d,t);return}return g[s]={sidxInfo:e.sidx,sidx:S},Al(e,S,e.sidx.resolvedUri),n(!0)},l="dash-sidx";this.request=n4(a,this.vhs_.xhr,(c,d,g,m)=>{if(c)return o(c,d);if(!g||g!=="mp4"){const b=g||"unknown";return o({status:d.status,message:`Unsupported ${b} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},d)}const{offset:S,length:T}=e.sidx.byterange;if(m.length>=T+S)return o(c,{response:m.subarray(S,S+T),status:d.status,uri:d.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:vl({byterange:e.sidx.byterange})},o)},l)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},G.clearTimeout(this.minimumUpdatePeriodTimeout_),G.clearTimeout(this.mediaRequest_),G.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,G.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(),G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(G.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,G.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const n=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=G.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_){G.clearTimeout(this.mediaRequest_),this.mediaRequest_=G.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=va(this.mainPlaylistLoader_.srcUrl,s),a){this.handleMain_(),this.syncClientServerClock_(()=>e(s,a));return}return e(s,a)})}syncClientServerClock_(e){const t=A3(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:ai(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_(){G.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=a4({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(a){this.error=a,this.error.metadata={errorType:ae.Error.StreamingDashManifestParserError,error:a},this.trigger("error")}e&&(n=l4(e,n,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=n||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||n&&n.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(n),n){const{duration:a,endList:o}=n,l=[];n.playlists.forEach(d=>{l.push({id:d.id,bandwidth:d.attributes.BANDWIDTH,resolution:d.attributes.RESOLUTION,codecs:d.attributes.CODECS})});const c={duration:a,isLive:!o,renditions:l};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_&&(G.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_=G.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_=c4(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=G.setTimeout(()=>{this.trigger("mediaupdatetimeout"),s()},ml(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 Lt={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 d4=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},kf=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},h4=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())}},wf=function(r){return function(){const e=h4(r),t=kf(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}},Df=function(r){return`var browserWorkerPolyFill = ${kf.toString()};
|
|
204
204
|
browserWorkerPolyFill(self);
|
|
205
|
-
`+r},Af=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},f4=Df(Af(function(){var r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var u={};this.on=function(h,p){u[h]||(u[h]=[]),u[h]=u[h].concat(p)},this.off=function(h,p){var f;return u[h]?(f=u[h].indexOf(p),u[h]=u[h].slice(),u[h].splice(f,1),f>-1):!1},this.trigger=function(h){var p,f,v,_;if(p=u[h],!!p)if(arguments.length===2)for(v=p.length,f=0;f<v;++f)p[f].call(this,arguments[1]);else{for(_=[],f=arguments.length,f=1;f<arguments.length;++f)_.push(arguments[f]);for(v=p.length,f=0;f<v;++f)p[f].apply(this,_)}},this.dispose=function(){u={}}}};e.prototype.pipe=function(u){return this.on("data",function(h){u.push(h)}),this.on("done",function(h){u.flush(h)}),this.on("partialdone",function(h){u.partialFlush(h)}),this.on("endedtimeline",function(h){u.endTimeline(h)}),this.on("reset",function(h){u.reset(h)}),u},e.prototype.push=function(u){this.trigger("data",u)},e.prototype.flush=function(u){this.trigger("done",u)},e.prototype.partialFlush=function(u){this.trigger("partialdone",u)},e.prototype.endTimeline=function(u){this.trigger("endedtimeline",u)},e.prototype.reset=function(u){this.trigger("reset",u)};var t=e,n=Math.pow(2,32),s=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p;return h.getBigUint64?(p=h.getBigUint64(0),p<Number.MAX_SAFE_INTEGER?Number(p):p):h.getUint32(0)*n+h.getUint32(4)},a={getUint64:s,MAX_UINT32:n},o=a.MAX_UINT32,l,c,d,g,m,S,b,T,y,E,O,D,I,H,$,z,N,j,x,w,P,K,L,U,V,X,F,B,Q,Z,oe,ce,re,ue,te,Ae;(function(){var u;if(L={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 L)L.hasOwnProperty(u)&&(L[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);U=new Uint8Array([105,115,111,109]),X=new Uint8Array([97,118,99,49]),V=new Uint8Array([0,0,0,1]),F=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]),B=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]),Q={video:F,audio:B},ce=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),oe=new Uint8Array([0,0,0,0,0,0,0,0]),re=new Uint8Array([0,0,0,0,0,0,0,0]),ue=re,te=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ae=re,Z=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),l=function(u){var h=[],p=0,f,v,_;for(f=1;f<arguments.length;f++)h.push(arguments[f]);for(f=h.length;f--;)p+=h[f].byteLength;for(v=new Uint8Array(p+8),_=new DataView(v.buffer,v.byteOffset,v.byteLength),_.setUint32(0,v.byteLength),v.set(u,4),f=0,p=8;f<h.length;f++)v.set(h[f],p),p+=h[f].byteLength;return v},c=function(){return l(L.dinf,l(L.dref,ce))},d=function(u){return l(L.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]))},g=function(){return l(L.ftyp,U,V,U,X)},z=function(u){return l(L.hdlr,Q[u])},m=function(u){return l(L.mdat,u)},$=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,u.duration>>>24&255,u.duration>>>16&255,u.duration>>>8&255,u.duration&255,85,196,0,0]);return u.samplerate&&(h[12]=u.samplerate>>>24&255,h[13]=u.samplerate>>>16&255,h[14]=u.samplerate>>>8&255,h[15]=u.samplerate&255),l(L.mdhd,h)},H=function(u){return l(L.mdia,$(u),z(u.type),b(u))},S=function(u){return l(L.mfhd,new Uint8Array([0,0,0,0,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255]))},b=function(u){return l(L.minf,u.type==="video"?l(L.vmhd,Z):l(L.smhd,oe),c(),j(u))},T=function(u,h){for(var p=[],f=h.length;f--;)p[f]=w(h[f]);return l.apply(null,[L.moof,S(u)].concat(p))},y=function(u){for(var h=u.length,p=[];h--;)p[h]=D(u[h]);return l.apply(null,[L.moov,O(4294967295)].concat(p).concat(E(u)))},E=function(u){for(var h=u.length,p=[];h--;)p[h]=P(u[h]);return l.apply(null,[L.mvex].concat(p))},O=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return l(L.mvhd,h)},N=function(u){var h=u.samples||[],p=new Uint8Array(4+h.length),f,v;for(v=0;v<h.length;v++)f=h[v].flags,p[v+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return l(L.sdtp,p)},j=function(u){return l(L.stbl,x(u),l(L.stts,Ae),l(L.stsc,ue),l(L.stsz,te),l(L.stco,re))},(function(){var u,h;x=function(p){return l(L.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),p.type==="video"?u(p):h(p))},u=function(p){var f=p.sps||[],v=p.pps||[],_=[],M=[],R,q;for(R=0;R<f.length;R++)_.push((f[R].byteLength&65280)>>>8),_.push(f[R].byteLength&255),_=_.concat(Array.prototype.slice.call(f[R]));for(R=0;R<v.length;R++)M.push((v[R].byteLength&65280)>>>8),M.push(v[R].byteLength&255),M=M.concat(Array.prototype.slice.call(v[R]));if(q=[L.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(L.avcC,new Uint8Array([1,p.profileIdc,p.profileCompatibility,p.levelIdc,255].concat([f.length],_,[v.length],M))),l(L.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],p.sarRatio){var W=p.sarRatio[0],ee=p.sarRatio[1];q.push(l(L.pasp,new Uint8Array([(W&4278190080)>>24,(W&16711680)>>16,(W&65280)>>8,W&255,(ee&4278190080)>>24,(ee&16711680)>>16,(ee&65280)>>8,ee&255])))}return l.apply(null,q)},h=function(p){return l(L.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(p.channelcount&65280)>>8,p.channelcount&255,(p.samplesize&65280)>>8,p.samplesize&255,0,0,0,0,(p.samplerate&65280)>>8,p.samplerate&255,0,0]),d(p))}})(),I=function(u){var h=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,0,(u.duration&4278190080)>>24,(u.duration&16711680)>>16,(u.duration&65280)>>8,u.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(u.width&65280)>>8,u.width&255,0,0,(u.height&65280)>>8,u.height&255,0,0]);return l(L.tkhd,h)},w=function(u){var h,p,f,v,_,M,R;return h=l(L.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])),M=Math.floor(u.baseMediaDecodeTime/o),R=Math.floor(u.baseMediaDecodeTime%o),p=l(L.tfdt,new Uint8Array([1,0,0,0,M>>>24&255,M>>>16&255,M>>>8&255,M&255,R>>>24&255,R>>>16&255,R>>>8&255,R&255])),_=92,u.type==="audio"?(f=K(u,_),l(L.traf,h,p,f)):(v=N(u),f=K(u,v.length+_),l(L.traf,h,p,f,v))},D=function(u){return u.duration=u.duration||4294967295,l(L.trak,I(u),H(u))},P=function(u){var h=new Uint8Array([0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return u.type!=="video"&&(h[h.length-1]=0),l(L.trex,h)},(function(){var u,h,p;p=function(f,v){var _=0,M=0,R=0,q=0;return f.length&&(f[0].duration!==void 0&&(_=1),f[0].size!==void 0&&(M=2),f[0].flags!==void 0&&(R=4),f[0].compositionTimeOffset!==void 0&&(q=8)),[0,0,_|M|R|q,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]},h=function(f,v){var _,M,R,q,W,ee;for(q=f.samples||[],v+=20+16*q.length,R=p(q,v),M=new Uint8Array(R.length+q.length*16),M.set(R),_=R.length,ee=0;ee<q.length;ee++)W=q[ee],M[_++]=(W.duration&4278190080)>>>24,M[_++]=(W.duration&16711680)>>>16,M[_++]=(W.duration&65280)>>>8,M[_++]=W.duration&255,M[_++]=(W.size&4278190080)>>>24,M[_++]=(W.size&16711680)>>>16,M[_++]=(W.size&65280)>>>8,M[_++]=W.size&255,M[_++]=W.flags.isLeading<<2|W.flags.dependsOn,M[_++]=W.flags.isDependedOn<<6|W.flags.hasRedundancy<<4|W.flags.paddingValue<<1|W.flags.isNonSyncSample,M[_++]=W.flags.degradationPriority&61440,M[_++]=W.flags.degradationPriority&15,M[_++]=(W.compositionTimeOffset&4278190080)>>>24,M[_++]=(W.compositionTimeOffset&16711680)>>>16,M[_++]=(W.compositionTimeOffset&65280)>>>8,M[_++]=W.compositionTimeOffset&255;return l(L.trun,M)},u=function(f,v){var _,M,R,q,W,ee;for(q=f.samples||[],v+=20+8*q.length,R=p(q,v),_=new Uint8Array(R.length+q.length*8),_.set(R),M=R.length,ee=0;ee<q.length;ee++)W=q[ee],_[M++]=(W.duration&4278190080)>>>24,_[M++]=(W.duration&16711680)>>>16,_[M++]=(W.duration&65280)>>>8,_[M++]=W.duration&255,_[M++]=(W.size&4278190080)>>>24,_[M++]=(W.size&16711680)>>>16,_[M++]=(W.size&65280)>>>8,_[M++]=W.size&255;return l(L.trun,_)},K=function(f,v){return f.type==="audio"?u(f,v):h(f,v)}})();var we={ftyp:g,mdat:m,moof:T,moov:y,initSegment:function(u){var h=g(),p=y(u),f;return f=new Uint8Array(h.byteLength+p.byteLength),f.set(h),f.set(p,h.byteLength),f}},Le=function(u){var h,p,f=[],v=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,f.byteLength=0,h=0;h<u.length;h++)p=u[h],p.nalUnitType==="access_unit_delimiter_rbsp"?(f.length&&(f.duration=p.dts-f.dts,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},De=function(u){var h,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,h=0;h<u.length;h++)p=u[h],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},Ve=function(u){var h;return!u[0][0].keyFrame&&u.length>1&&(h=u.shift(),u.byteLength-=h.byteLength,u.nalCount-=h.nalCount,u[0][0].dts=h.dts,u[0][0].pts=h.pts,u[0][0].duration+=h.duration),u},Qe=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},et=function(u,h){var p=Qe();return p.dataOffset=h,p.compositionTimeOffset=u.pts-u.dts,p.duration=u.duration,p.size=4*u.length,p.size+=u.byteLength,u.keyFrame&&(p.flags.dependsOn=2,p.flags.isNonSyncSample=0),p},$e=function(u,h){var p,f,v,_,M,R=h||0,q=[];for(p=0;p<u.length;p++)for(_=u[p],f=0;f<_.length;f++)M=_[f],v=et(M,R),R+=v.size,q.push(v);return q},Ge=function(u){var h,p,f,v,_,M,R=0,q=u.byteLength,W=u.nalCount,ee=q+4*W,de=new Uint8Array(ee),xe=new DataView(de.buffer);for(h=0;h<u.length;h++)for(v=u[h],p=0;p<v.length;p++)for(_=v[p],f=0;f<_.length;f++)M=_[f],xe.setUint32(R,M.data.byteLength),R+=4,de.set(M.data,R),R+=M.data.byteLength;return de},xt=function(u,h){var p,f=h||0,v=[];return p=et(u,f),v.push(p),v},Ie=function(u){var h,p,f=0,v=u.byteLength,_=u.length,M=v+4*_,R=new Uint8Array(M),q=new DataView(R.buffer);for(h=0;h<u.length;h++)p=u[h],q.setUint32(f,p.data.byteLength),f+=4,R.set(p.data,f),f+=p.data.byteLength;return R},St={groupNalsIntoFrames:Le,groupFramesIntoGops:De,extendFirstKeyFrame:Ve,generateSampleTable:$e,concatenateNalData:Ge,generateSampleTableForFrame:xt,concatenateNalDataForFrame:Ie},lt=[33,16,5,32,164,27],Ee=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Te=function(u){for(var h=[];u--;)h.push(0);return h},me=function(u){return Object.keys(u).reduce(function(h,p){return h[p]=new Uint8Array(u[p].reduce(function(f,v){return f.concat(v)},[])),h},{})},Fe,qe=function(){if(!Fe){var u={96e3:[lt,[227,64],Te(154),[56]],88200:[lt,[231],Te(170),[56]],64e3:[lt,[248,192],Te(240),[56]],48e3:[lt,[255,192],Te(268),[55,148,128],Te(54),[112]],44100:[lt,[255,192],Te(268),[55,163,128],Te(84),[112]],32e3:[lt,[255,192],Te(268),[55,234],Te(226),[112]],24e3:[lt,[255,192],Te(268),[55,255,128],Te(268),[111,112],Te(126),[224]],16e3:[lt,[255,192],Te(268),[55,255,128],Te(268),[111,255],Te(269),[223,108],Te(195),[1,192]],12e3:[Ee,Te(268),[3,127,248],Te(268),[6,255,240],Te(268),[13,255,224],Te(268),[27,253,128],Te(259),[56]],11025:[Ee,Te(268),[3,127,248],Te(268),[6,255,240],Te(268),[13,255,224],Te(268),[27,255,192],Te(268),[55,175,128],Te(108),[112]],8e3:[Ee,Te(268),[3,121,16],Te(47),[7]]};Fe=me(u)}return Fe},gt=9e4,Et,ie,ne,se,Se,pe,Ke;Et=function(u){return u*gt},ie=function(u,h){return u*h},ne=function(u){return u/gt},se=function(u,h){return u/h},Se=function(u,h){return Et(se(u,h))},pe=function(u,h){return ie(ne(u),h)},Ke=function(u,h,p){return ne(p?u:u-h)};var Oe={ONE_SECOND_IN_TS:gt,secondsToVideoTs:Et,secondsToAudioTs:ie,videoTsToSeconds:ne,audioTsToSeconds:se,audioTsToVideoTs:Se,videoTsToAudioTs:pe,metadataTsToSeconds:Ke},Nt=qe,ft=Oe,ui=function(u){var h,p,f=0;for(h=0;h<u.length;h++)p=u[h],f+=p.data.byteLength;return f},It=function(u,h,p,f){var v,_=0,M=0,R=0,q=0,W,ee,de;if(h.length&&(v=ft.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),_=Math.ceil(ft.ONE_SECOND_IN_TS/(u.samplerate/1024)),p&&f&&(M=v-Math.max(p,f),R=Math.floor(M/_),q=R*_),!(R<1||q>ft.ONE_SECOND_IN_TS/2))){for(W=Nt()[u.samplerate],W||(W=h[0].data),ee=0;ee<R;ee++)de=h[0],h.splice(0,0,{data:W,dts:de.dts-_,pts:de.pts-_});return u.baseMediaDecodeTime-=Math.floor(ft.videoTsToAudioTs(q,u.samplerate)),q}},Wt=function(u,h,p){return h.minSegmentDts>=p?u:(h.minSegmentDts=1/0,u.filter(function(f){return f.dts>=p?(h.minSegmentDts=Math.min(h.minSegmentDts,f.dts),h.minSegmentPts=h.minSegmentDts,!0):!1}))},Ot=function(u){var h,p,f=[];for(h=0;h<u.length;h++)p=u[h],f.push({size:p.data.byteLength,duration:1024});return f},Rt=function(u){var h,p,f=0,v=new Uint8Array(ui(u));for(h=0;h<u.length;h++)p=u[h],v.set(p.data,f),f+=p.data.byteLength;return v},ci={prefixWithSilence:It,trimAdtsFramesByEarliestDts:Wt,generateSampleTable:Ot,concatenateFrameData:Rt},Ut=Oe.ONE_SECOND_IN_TS,Wi=function(u,h){typeof h.pts=="number"&&(u.timelineStartInfo.pts===void 0&&(u.timelineStartInfo.pts=h.pts),u.minSegmentPts===void 0?u.minSegmentPts=h.pts:u.minSegmentPts=Math.min(u.minSegmentPts,h.pts),u.maxSegmentPts===void 0?u.maxSegmentPts=h.pts:u.maxSegmentPts=Math.max(u.maxSegmentPts,h.pts)),typeof h.dts=="number"&&(u.timelineStartInfo.dts===void 0&&(u.timelineStartInfo.dts=h.dts),u.minSegmentDts===void 0?u.minSegmentDts=h.dts:u.minSegmentDts=Math.min(u.minSegmentDts,h.dts),u.maxSegmentDts===void 0?u.maxSegmentDts=h.dts:u.maxSegmentDts=Math.max(u.maxSegmentDts,h.dts))},C=function(u){delete u.minSegmentDts,delete u.maxSegmentDts,delete u.minSegmentPts,delete u.maxSegmentPts},k=function(u,h){var p,f,v=u.minSegmentDts;return h||(v-=u.timelineStartInfo.dts),p=u.timelineStartInfo.baseMediaDecodeTime,p+=v,p=Math.max(0,p),u.type==="audio"&&(f=u.samplerate/Ut,p*=f,p=Math.floor(p)),p},Y={clearDtsInfo:C,calculateTrackBaseMediaDecodeTime:k,collectDtsInfo:Wi},le=4,ye=128,Ne=function(u){for(var h=0,p={payloadType:-1,payloadSize:0},f=0,v=0;h<u.byteLength&&u[h]!==ye;){for(;u[h]===255;)f+=255,h++;for(f+=u[h++];u[h]===255;)v+=255,h++;if(v+=u[h++],!p.payload&&f===le){var _=String.fromCharCode(u[h+3],u[h+4],u[h+5],u[h+6]);if(_==="GA94"){p.payloadType=f,p.payloadSize=v,p.payload=u.subarray(h,h+v);break}else p.payload=void 0}h+=v,f=0,v=0}return p},Je=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)},kt=function(u,h){var p=[],f,v,_,M;if(!(h[0]&64))return p;for(v=h[0]&31,f=0;f<v;f++)_=f*3,M={type:h[_+2]&3,pts:u},h[_+2]&4&&(M.ccData=h[_+3]<<8|h[_+4],p.push(M));return p},Yt=function(u){for(var h=u.byteLength,p=[],f=1,v,_;f<h-2;)u[f]===0&&u[f+1]===0&&u[f+2]===3?(p.push(f+2),f+=2):f++;if(p.length===0)return u;v=h-p.length,_=new Uint8Array(v);var M=0;for(f=0;f<v;M++,f++)M===p[0]&&(M++,p.shift()),_[f]=u[M];return _},qt={parseSei:Ne,parseUserData:Je,parseCaptionPackets:kt,discardEmulationPreventionBytes:Yt,USER_DATA_REGISTERED_ITU_T_T35:le},Vt=t,ni=qt,Ye=function(u){u=u||{},Ye.prototype.init.call(this),this.parse708captions_=typeof u.parse708captions=="boolean"?u.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new be(0,0),new be(0,1),new be(1,0),new be(1,1)],this.parse708captions_&&(this.cc708Stream_=new je({captionServices:u.captionServices})),this.reset(),this.ccStreams_.forEach(function(h){h.on("data",this.trigger.bind(this,"data")),h.on("partialdone",this.trigger.bind(this,"partialdone")),h.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Ye.prototype=new Vt,Ye.prototype.push=function(u){var h,p,f;if(u.nalUnitType==="sei_rbsp"&&(h=ni.parseSei(u.escapedRBSP),!!h.payload&&h.payloadType===ni.USER_DATA_REGISTERED_ITU_T_T35&&(p=ni.parseUserData(h),!!p))){if(u.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(u.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}f=ni.parseCaptionPackets(u.pts,p),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==u.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=u.dts}},Ye.prototype.flushCCStreams=function(u){this.ccStreams_.forEach(function(h){return u==="flush"?h.flush():h.partialFlush()},this)},Ye.prototype.flushStream=function(u){if(!this.captionPackets_.length){this.flushCCStreams(u);return}this.captionPackets_.forEach(function(h,p){h.presortIndex=p}),this.captionPackets_.sort(function(h,p){return h.pts===p.pts?h.presortIndex-p.presortIndex:h.pts-p.pts}),this.captionPackets_.forEach(function(h){h.type<2?this.dispatchCea608Packet(h):this.dispatchCea708Packet(h)},this),this.captionPackets_.length=0,this.flushCCStreams(u)},Ye.prototype.flush=function(){return this.flushStream("flush")},Ye.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ye.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(u){u.reset()})},Ye.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)},Ye.prototype.setsChannel1Active=function(u){return(u.ccData&30720)===4096},Ye.prototype.setsChannel2Active=function(u){return(u.ccData&30720)===6144},Ye.prototype.setsTextOrXDSActive=function(u){return(u.ccData&28928)===256||(u.ccData&30974)===4138||(u.ccData&30974)===6186},Ye.prototype.dispatchCea708Packet=function(u){this.parse708captions_&&this.cc708Stream_.push(u)};var ri={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Xt=function(u){var h=ri[u]||u;return u&4096&&u===h?"":String.fromCharCode(h)},Kt=function(u){return 32<=u&&u<=127||160<=u&&u<=255},wt=function(u){this.windowNum=u,this.reset()};wt.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},wt.prototype.getText=function(){return this.rows.join(`
|
|
206
|
-
`)},wt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},wt.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--},wt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},wt.prototype.addText=function(u){this.rows[this.rowIdx]+=u},wt.prototype.backspace=function(){if(!this.isEmpty()){var u=this.rows[this.rowIdx];this.rows[this.rowIdx]=u.substr(0,u.length-1)}};var at=function(u,h,p){this.serviceNum=u,this.text="",this.currentWindow=new wt(-1),this.windows=[],this.stream=p,typeof h=="string"&&this.createTextDecoder(h)};at.prototype.init=function(u,h){this.startPts=u;for(var p=0;p<8;p++)this.windows[p]=new wt(p),typeof h=="function"&&(this.windows[p].beforeRowOverflow=h)},at.prototype.setCurrentWindow=function(u){this.currentWindow=this.windows[u]},at.prototype.createTextDecoder=function(u){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(u)}catch(h){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+u+" encoding. "+h})}};var je=function(u){u=u||{},je.prototype.init.call(this);var h=this,p=u.captionServices||{},f={},v;Object.keys(p).forEach(_=>{v=p[_],/^SERVICE/.test(_)&&(f[_]=v.encoding)}),this.serviceEncodings=f,this.current708Packet=null,this.services={},this.push=function(_){_.type===3?(h.new708Packet(),h.add708Bytes(_)):(h.current708Packet===null&&h.new708Packet(),h.add708Bytes(_))}};je.prototype=new Vt,je.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},je.prototype.add708Bytes=function(u){var h=u.ccData,p=h>>>8,f=h&255;this.current708Packet.ptsVals.push(u.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(f)},je.prototype.push708Packet=function(){var u=this.current708Packet,h=u.data,p=null,f=null,v=0,_=h[v++];for(u.seq=_>>6,u.sizeCode=_&63;v<h.length;v++)_=h[v++],p=_>>5,f=_&31,p===7&&f>0&&(_=h[v++],p=_),this.pushServiceBlock(p,v,f),f>0&&(v+=f-1)},je.prototype.pushServiceBlock=function(u,h,p){var f,v=h,_=this.current708Packet.data,
|
|
205
|
+
`+r},Af=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},f4=Df(Af(function(){var r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var u={};this.on=function(h,p){u[h]||(u[h]=[]),u[h]=u[h].concat(p)},this.off=function(h,p){var f;return u[h]?(f=u[h].indexOf(p),u[h]=u[h].slice(),u[h].splice(f,1),f>-1):!1},this.trigger=function(h){var p,f,v,_;if(p=u[h],!!p)if(arguments.length===2)for(v=p.length,f=0;f<v;++f)p[f].call(this,arguments[1]);else{for(_=[],f=arguments.length,f=1;f<arguments.length;++f)_.push(arguments[f]);for(v=p.length,f=0;f<v;++f)p[f].apply(this,_)}},this.dispose=function(){u={}}}};e.prototype.pipe=function(u){return this.on("data",function(h){u.push(h)}),this.on("done",function(h){u.flush(h)}),this.on("partialdone",function(h){u.partialFlush(h)}),this.on("endedtimeline",function(h){u.endTimeline(h)}),this.on("reset",function(h){u.reset(h)}),u},e.prototype.push=function(u){this.trigger("data",u)},e.prototype.flush=function(u){this.trigger("done",u)},e.prototype.partialFlush=function(u){this.trigger("partialdone",u)},e.prototype.endTimeline=function(u){this.trigger("endedtimeline",u)},e.prototype.reset=function(u){this.trigger("reset",u)};var t=e,n=Math.pow(2,32),s=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p;return h.getBigUint64?(p=h.getBigUint64(0),p<Number.MAX_SAFE_INTEGER?Number(p):p):h.getUint32(0)*n+h.getUint32(4)},a={getUint64:s,MAX_UINT32:n},o=a.MAX_UINT32,l,c,d,g,m,S,T,b,y,E,I,O,k,z,$,j,N,H,x,w,P,K,B,U,R,X,F,M,Q,Z,oe,ce,re,ue,te,Ae;(function(){var u;if(B={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(u in B)B.hasOwnProperty(u)&&(B[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);U=new Uint8Array([105,115,111,109]),X=new Uint8Array([97,118,99,49]),R=new Uint8Array([0,0,0,1]),F=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]),M=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]),Q={video:F,audio:M},ce=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),oe=new Uint8Array([0,0,0,0,0,0,0,0]),re=new Uint8Array([0,0,0,0,0,0,0,0]),ue=re,te=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ae=re,Z=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),l=function(u){var h=[],p=0,f,v,_;for(f=1;f<arguments.length;f++)h.push(arguments[f]);for(f=h.length;f--;)p+=h[f].byteLength;for(v=new Uint8Array(p+8),_=new DataView(v.buffer,v.byteOffset,v.byteLength),_.setUint32(0,v.byteLength),v.set(u,4),f=0,p=8;f<h.length;f++)v.set(h[f],p),p+=h[f].byteLength;return v},c=function(){return l(B.dinf,l(B.dref,ce))},d=function(u){return l(B.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,u.audioobjecttype<<3|u.samplingfrequencyindex>>>1,u.samplingfrequencyindex<<7|u.channelcount<<3,6,1,2]))},g=function(){return l(B.ftyp,U,R,U,X)},j=function(u){return l(B.hdlr,Q[u])},m=function(u){return l(B.mdat,u)},$=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,u.duration>>>24&255,u.duration>>>16&255,u.duration>>>8&255,u.duration&255,85,196,0,0]);return u.samplerate&&(h[12]=u.samplerate>>>24&255,h[13]=u.samplerate>>>16&255,h[14]=u.samplerate>>>8&255,h[15]=u.samplerate&255),l(B.mdhd,h)},z=function(u){return l(B.mdia,$(u),j(u.type),T(u))},S=function(u){return l(B.mfhd,new Uint8Array([0,0,0,0,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255]))},T=function(u){return l(B.minf,u.type==="video"?l(B.vmhd,Z):l(B.smhd,oe),c(),H(u))},b=function(u,h){for(var p=[],f=h.length;f--;)p[f]=w(h[f]);return l.apply(null,[B.moof,S(u)].concat(p))},y=function(u){for(var h=u.length,p=[];h--;)p[h]=O(u[h]);return l.apply(null,[B.moov,I(4294967295)].concat(p).concat(E(u)))},E=function(u){for(var h=u.length,p=[];h--;)p[h]=P(u[h]);return l.apply(null,[B.mvex].concat(p))},I=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return l(B.mvhd,h)},N=function(u){var h=u.samples||[],p=new Uint8Array(4+h.length),f,v;for(v=0;v<h.length;v++)f=h[v].flags,p[v+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return l(B.sdtp,p)},H=function(u){return l(B.stbl,x(u),l(B.stts,Ae),l(B.stsc,ue),l(B.stsz,te),l(B.stco,re))},(function(){var u,h;x=function(p){return l(B.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),p.type==="video"?u(p):h(p))},u=function(p){var f=p.sps||[],v=p.pps||[],_=[],L=[],V,q;for(V=0;V<f.length;V++)_.push((f[V].byteLength&65280)>>>8),_.push(f[V].byteLength&255),_=_.concat(Array.prototype.slice.call(f[V]));for(V=0;V<v.length;V++)L.push((v[V].byteLength&65280)>>>8),L.push(v[V].byteLength&255),L=L.concat(Array.prototype.slice.call(v[V]));if(q=[B.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(p.width&65280)>>8,p.width&255,(p.height&65280)>>8,p.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l(B.avcC,new Uint8Array([1,p.profileIdc,p.profileCompatibility,p.levelIdc,255].concat([f.length],_,[v.length],L))),l(B.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],p.sarRatio){var W=p.sarRatio[0],ee=p.sarRatio[1];q.push(l(B.pasp,new Uint8Array([(W&4278190080)>>24,(W&16711680)>>16,(W&65280)>>8,W&255,(ee&4278190080)>>24,(ee&16711680)>>16,(ee&65280)>>8,ee&255])))}return l.apply(null,q)},h=function(p){return l(B.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(p.channelcount&65280)>>8,p.channelcount&255,(p.samplesize&65280)>>8,p.samplesize&255,0,0,0,0,(p.samplerate&65280)>>8,p.samplerate&255,0,0]),d(p))}})(),k=function(u){var h=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,0,(u.duration&4278190080)>>24,(u.duration&16711680)>>16,(u.duration&65280)>>8,u.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(u.width&65280)>>8,u.width&255,0,0,(u.height&65280)>>8,u.height&255,0,0]);return l(B.tkhd,h)},w=function(u){var h,p,f,v,_,L,V;return h=l(B.tfhd,new Uint8Array([0,0,0,58,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),L=Math.floor(u.baseMediaDecodeTime/o),V=Math.floor(u.baseMediaDecodeTime%o),p=l(B.tfdt,new Uint8Array([1,0,0,0,L>>>24&255,L>>>16&255,L>>>8&255,L&255,V>>>24&255,V>>>16&255,V>>>8&255,V&255])),_=92,u.type==="audio"?(f=K(u,_),l(B.traf,h,p,f)):(v=N(u),f=K(u,v.length+_),l(B.traf,h,p,f,v))},O=function(u){return u.duration=u.duration||4294967295,l(B.trak,k(u),z(u))},P=function(u){var h=new Uint8Array([0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return u.type!=="video"&&(h[h.length-1]=0),l(B.trex,h)},(function(){var u,h,p;p=function(f,v){var _=0,L=0,V=0,q=0;return f.length&&(f[0].duration!==void 0&&(_=1),f[0].size!==void 0&&(L=2),f[0].flags!==void 0&&(V=4),f[0].compositionTimeOffset!==void 0&&(q=8)),[0,0,_|L|V|q,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]},h=function(f,v){var _,L,V,q,W,ee;for(q=f.samples||[],v+=20+16*q.length,V=p(q,v),L=new Uint8Array(V.length+q.length*16),L.set(V),_=V.length,ee=0;ee<q.length;ee++)W=q[ee],L[_++]=(W.duration&4278190080)>>>24,L[_++]=(W.duration&16711680)>>>16,L[_++]=(W.duration&65280)>>>8,L[_++]=W.duration&255,L[_++]=(W.size&4278190080)>>>24,L[_++]=(W.size&16711680)>>>16,L[_++]=(W.size&65280)>>>8,L[_++]=W.size&255,L[_++]=W.flags.isLeading<<2|W.flags.dependsOn,L[_++]=W.flags.isDependedOn<<6|W.flags.hasRedundancy<<4|W.flags.paddingValue<<1|W.flags.isNonSyncSample,L[_++]=W.flags.degradationPriority&61440,L[_++]=W.flags.degradationPriority&15,L[_++]=(W.compositionTimeOffset&4278190080)>>>24,L[_++]=(W.compositionTimeOffset&16711680)>>>16,L[_++]=(W.compositionTimeOffset&65280)>>>8,L[_++]=W.compositionTimeOffset&255;return l(B.trun,L)},u=function(f,v){var _,L,V,q,W,ee;for(q=f.samples||[],v+=20+8*q.length,V=p(q,v),_=new Uint8Array(V.length+q.length*8),_.set(V),L=V.length,ee=0;ee<q.length;ee++)W=q[ee],_[L++]=(W.duration&4278190080)>>>24,_[L++]=(W.duration&16711680)>>>16,_[L++]=(W.duration&65280)>>>8,_[L++]=W.duration&255,_[L++]=(W.size&4278190080)>>>24,_[L++]=(W.size&16711680)>>>16,_[L++]=(W.size&65280)>>>8,_[L++]=W.size&255;return l(B.trun,_)},K=function(f,v){return f.type==="audio"?u(f,v):h(f,v)}})();var we={ftyp:g,mdat:m,moof:b,moov:y,initSegment:function(u){var h=g(),p=y(u),f;return f=new Uint8Array(h.byteLength+p.byteLength),f.set(h),f.set(p,h.byteLength),f}},Le=function(u){var h,p,f=[],v=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,f.byteLength=0,h=0;h<u.length;h++)p=u[h],p.nalUnitType==="access_unit_delimiter_rbsp"?(f.length&&(f.duration=p.dts-f.dts,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},De=function(u){var h,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,h=0;h<u.length;h++)p=u[h],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},Ve=function(u){var h;return!u[0][0].keyFrame&&u.length>1&&(h=u.shift(),u.byteLength-=h.byteLength,u.nalCount-=h.nalCount,u[0][0].dts=h.dts,u[0][0].pts=h.pts,u[0][0].duration+=h.duration),u},Qe=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},et=function(u,h){var p=Qe();return p.dataOffset=h,p.compositionTimeOffset=u.pts-u.dts,p.duration=u.duration,p.size=4*u.length,p.size+=u.byteLength,u.keyFrame&&(p.flags.dependsOn=2,p.flags.isNonSyncSample=0),p},$e=function(u,h){var p,f,v,_,L,V=h||0,q=[];for(p=0;p<u.length;p++)for(_=u[p],f=0;f<_.length;f++)L=_[f],v=et(L,V),V+=v.size,q.push(v);return q},Ge=function(u){var h,p,f,v,_,L,V=0,q=u.byteLength,W=u.nalCount,ee=q+4*W,de=new Uint8Array(ee),xe=new DataView(de.buffer);for(h=0;h<u.length;h++)for(v=u[h],p=0;p<v.length;p++)for(_=v[p],f=0;f<_.length;f++)L=_[f],xe.setUint32(V,L.data.byteLength),V+=4,de.set(L.data,V),V+=L.data.byteLength;return de},xt=function(u,h){var p,f=h||0,v=[];return p=et(u,f),v.push(p),v},Ie=function(u){var h,p,f=0,v=u.byteLength,_=u.length,L=v+4*_,V=new Uint8Array(L),q=new DataView(V.buffer);for(h=0;h<u.length;h++)p=u[h],q.setUint32(f,p.data.byteLength),f+=4,V.set(p.data,f),f+=p.data.byteLength;return V},St={groupNalsIntoFrames:Le,groupFramesIntoGops:De,extendFirstKeyFrame:Ve,generateSampleTable:$e,concatenateNalData:Ge,generateSampleTableForFrame:xt,concatenateNalDataForFrame:Ie},lt=[33,16,5,32,164,27],Ee=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Te=function(u){for(var h=[];u--;)h.push(0);return h},me=function(u){return Object.keys(u).reduce(function(h,p){return h[p]=new Uint8Array(u[p].reduce(function(f,v){return f.concat(v)},[])),h},{})},Fe,qe=function(){if(!Fe){var u={96e3:[lt,[227,64],Te(154),[56]],88200:[lt,[231],Te(170),[56]],64e3:[lt,[248,192],Te(240),[56]],48e3:[lt,[255,192],Te(268),[55,148,128],Te(54),[112]],44100:[lt,[255,192],Te(268),[55,163,128],Te(84),[112]],32e3:[lt,[255,192],Te(268),[55,234],Te(226),[112]],24e3:[lt,[255,192],Te(268),[55,255,128],Te(268),[111,112],Te(126),[224]],16e3:[lt,[255,192],Te(268),[55,255,128],Te(268),[111,255],Te(269),[223,108],Te(195),[1,192]],12e3:[Ee,Te(268),[3,127,248],Te(268),[6,255,240],Te(268),[13,255,224],Te(268),[27,253,128],Te(259),[56]],11025:[Ee,Te(268),[3,127,248],Te(268),[6,255,240],Te(268),[13,255,224],Te(268),[27,255,192],Te(268),[55,175,128],Te(108),[112]],8e3:[Ee,Te(268),[3,121,16],Te(47),[7]]};Fe=me(u)}return Fe},gt=9e4,Et,ie,ne,se,Se,pe,Ke;Et=function(u){return u*gt},ie=function(u,h){return u*h},ne=function(u){return u/gt},se=function(u,h){return u/h},Se=function(u,h){return Et(se(u,h))},pe=function(u,h){return ie(ne(u),h)},Ke=function(u,h,p){return ne(p?u:u-h)};var Oe={ONE_SECOND_IN_TS:gt,secondsToVideoTs:Et,secondsToAudioTs:ie,videoTsToSeconds:ne,audioTsToSeconds:se,audioTsToVideoTs:Se,videoTsToAudioTs:pe,metadataTsToSeconds:Ke},Nt=qe,ft=Oe,ui=function(u){var h,p,f=0;for(h=0;h<u.length;h++)p=u[h],f+=p.data.byteLength;return f},It=function(u,h,p,f){var v,_=0,L=0,V=0,q=0,W,ee,de;if(h.length&&(v=ft.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),_=Math.ceil(ft.ONE_SECOND_IN_TS/(u.samplerate/1024)),p&&f&&(L=v-Math.max(p,f),V=Math.floor(L/_),q=V*_),!(V<1||q>ft.ONE_SECOND_IN_TS/2))){for(W=Nt()[u.samplerate],W||(W=h[0].data),ee=0;ee<V;ee++)de=h[0],h.splice(0,0,{data:W,dts:de.dts-_,pts:de.pts-_});return u.baseMediaDecodeTime-=Math.floor(ft.videoTsToAudioTs(q,u.samplerate)),q}},Wt=function(u,h,p){return h.minSegmentDts>=p?u:(h.minSegmentDts=1/0,u.filter(function(f){return f.dts>=p?(h.minSegmentDts=Math.min(h.minSegmentDts,f.dts),h.minSegmentPts=h.minSegmentDts,!0):!1}))},Ot=function(u){var h,p,f=[];for(h=0;h<u.length;h++)p=u[h],f.push({size:p.data.byteLength,duration:1024});return f},Rt=function(u){var h,p,f=0,v=new Uint8Array(ui(u));for(h=0;h<u.length;h++)p=u[h],v.set(p.data,f),f+=p.data.byteLength;return v},ci={prefixWithSilence:It,trimAdtsFramesByEarliestDts:Wt,generateSampleTable:Ot,concatenateFrameData:Rt},Ut=Oe.ONE_SECOND_IN_TS,Wi=function(u,h){typeof h.pts=="number"&&(u.timelineStartInfo.pts===void 0&&(u.timelineStartInfo.pts=h.pts),u.minSegmentPts===void 0?u.minSegmentPts=h.pts:u.minSegmentPts=Math.min(u.minSegmentPts,h.pts),u.maxSegmentPts===void 0?u.maxSegmentPts=h.pts:u.maxSegmentPts=Math.max(u.maxSegmentPts,h.pts)),typeof h.dts=="number"&&(u.timelineStartInfo.dts===void 0&&(u.timelineStartInfo.dts=h.dts),u.minSegmentDts===void 0?u.minSegmentDts=h.dts:u.minSegmentDts=Math.min(u.minSegmentDts,h.dts),u.maxSegmentDts===void 0?u.maxSegmentDts=h.dts:u.maxSegmentDts=Math.max(u.maxSegmentDts,h.dts))},C=function(u){delete u.minSegmentDts,delete u.maxSegmentDts,delete u.minSegmentPts,delete u.maxSegmentPts},D=function(u,h){var p,f,v=u.minSegmentDts;return h||(v-=u.timelineStartInfo.dts),p=u.timelineStartInfo.baseMediaDecodeTime,p+=v,p=Math.max(0,p),u.type==="audio"&&(f=u.samplerate/Ut,p*=f,p=Math.floor(p)),p},Y={clearDtsInfo:C,calculateTrackBaseMediaDecodeTime:D,collectDtsInfo:Wi},le=4,ye=128,Ne=function(u){for(var h=0,p={payloadType:-1,payloadSize:0},f=0,v=0;h<u.byteLength&&u[h]!==ye;){for(;u[h]===255;)f+=255,h++;for(f+=u[h++];u[h]===255;)v+=255,h++;if(v+=u[h++],!p.payload&&f===le){var _=String.fromCharCode(u[h+3],u[h+4],u[h+5],u[h+6]);if(_==="GA94"){p.payloadType=f,p.payloadSize=v,p.payload=u.subarray(h,h+v);break}else p.payload=void 0}h+=v,f=0,v=0}return p},Je=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)},kt=function(u,h){var p=[],f,v,_,L;if(!(h[0]&64))return p;for(v=h[0]&31,f=0;f<v;f++)_=f*3,L={type:h[_+2]&3,pts:u},h[_+2]&4&&(L.ccData=h[_+3]<<8|h[_+4],p.push(L));return p},Yt=function(u){for(var h=u.byteLength,p=[],f=1,v,_;f<h-2;)u[f]===0&&u[f+1]===0&&u[f+2]===3?(p.push(f+2),f+=2):f++;if(p.length===0)return u;v=h-p.length,_=new Uint8Array(v);var L=0;for(f=0;f<v;L++,f++)L===p[0]&&(L++,p.shift()),_[f]=u[L];return _},qt={parseSei:Ne,parseUserData:Je,parseCaptionPackets:kt,discardEmulationPreventionBytes:Yt,USER_DATA_REGISTERED_ITU_T_T35:le},Vt=t,ni=qt,Ye=function(u){u=u||{},Ye.prototype.init.call(this),this.parse708captions_=typeof u.parse708captions=="boolean"?u.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new be(0,0),new be(0,1),new be(1,0),new be(1,1)],this.parse708captions_&&(this.cc708Stream_=new je({captionServices:u.captionServices})),this.reset(),this.ccStreams_.forEach(function(h){h.on("data",this.trigger.bind(this,"data")),h.on("partialdone",this.trigger.bind(this,"partialdone")),h.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Ye.prototype=new Vt,Ye.prototype.push=function(u){var h,p,f;if(u.nalUnitType==="sei_rbsp"&&(h=ni.parseSei(u.escapedRBSP),!!h.payload&&h.payloadType===ni.USER_DATA_REGISTERED_ITU_T_T35&&(p=ni.parseUserData(h),!!p))){if(u.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(u.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}f=ni.parseCaptionPackets(u.pts,p),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==u.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=u.dts}},Ye.prototype.flushCCStreams=function(u){this.ccStreams_.forEach(function(h){return u==="flush"?h.flush():h.partialFlush()},this)},Ye.prototype.flushStream=function(u){if(!this.captionPackets_.length){this.flushCCStreams(u);return}this.captionPackets_.forEach(function(h,p){h.presortIndex=p}),this.captionPackets_.sort(function(h,p){return h.pts===p.pts?h.presortIndex-p.presortIndex:h.pts-p.pts}),this.captionPackets_.forEach(function(h){h.type<2?this.dispatchCea608Packet(h):this.dispatchCea708Packet(h)},this),this.captionPackets_.length=0,this.flushCCStreams(u)},Ye.prototype.flush=function(){return this.flushStream("flush")},Ye.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Ye.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(u){u.reset()})},Ye.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)},Ye.prototype.setsChannel1Active=function(u){return(u.ccData&30720)===4096},Ye.prototype.setsChannel2Active=function(u){return(u.ccData&30720)===6144},Ye.prototype.setsTextOrXDSActive=function(u){return(u.ccData&28928)===256||(u.ccData&30974)===4138||(u.ccData&30974)===6186},Ye.prototype.dispatchCea708Packet=function(u){this.parse708captions_&&this.cc708Stream_.push(u)};var ri={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Xt=function(u){var h=ri[u]||u;return u&4096&&u===h?"":String.fromCharCode(h)},Kt=function(u){return 32<=u&&u<=127||160<=u&&u<=255},wt=function(u){this.windowNum=u,this.reset()};wt.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},wt.prototype.getText=function(){return this.rows.join(`
|
|
206
|
+
`)},wt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},wt.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--},wt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},wt.prototype.addText=function(u){this.rows[this.rowIdx]+=u},wt.prototype.backspace=function(){if(!this.isEmpty()){var u=this.rows[this.rowIdx];this.rows[this.rowIdx]=u.substr(0,u.length-1)}};var at=function(u,h,p){this.serviceNum=u,this.text="",this.currentWindow=new wt(-1),this.windows=[],this.stream=p,typeof h=="string"&&this.createTextDecoder(h)};at.prototype.init=function(u,h){this.startPts=u;for(var p=0;p<8;p++)this.windows[p]=new wt(p),typeof h=="function"&&(this.windows[p].beforeRowOverflow=h)},at.prototype.setCurrentWindow=function(u){this.currentWindow=this.windows[u]},at.prototype.createTextDecoder=function(u){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(u)}catch(h){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+u+" encoding. "+h})}};var je=function(u){u=u||{},je.prototype.init.call(this);var h=this,p=u.captionServices||{},f={},v;Object.keys(p).forEach(_=>{v=p[_],/^SERVICE/.test(_)&&(f[_]=v.encoding)}),this.serviceEncodings=f,this.current708Packet=null,this.services={},this.push=function(_){_.type===3?(h.new708Packet(),h.add708Bytes(_)):(h.current708Packet===null&&h.new708Packet(),h.add708Bytes(_))}};je.prototype=new Vt,je.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},je.prototype.add708Bytes=function(u){var h=u.ccData,p=h>>>8,f=h&255;this.current708Packet.ptsVals.push(u.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(f)},je.prototype.push708Packet=function(){var u=this.current708Packet,h=u.data,p=null,f=null,v=0,_=h[v++];for(u.seq=_>>6,u.sizeCode=_&63;v<h.length;v++)_=h[v++],p=_>>5,f=_&31,p===7&&f>0&&(_=h[v++],p=_),this.pushServiceBlock(p,v,f),f>0&&(v+=f-1)},je.prototype.pushServiceBlock=function(u,h,p){var f,v=h,_=this.current708Packet.data,L=this.services[u];for(L||(L=this.initService(u,v));v<h+p&&v<_.length;v++)f=_[v],Kt(f)?v=this.handleText(v,L):f===24?v=this.multiByteCharacter(v,L):f===16?v=this.extendedCommands(v,L):128<=f&&f<=135?v=this.setCurrentWindow(v,L):152<=f&&f<=159?v=this.defineWindow(v,L):f===136?v=this.clearWindows(v,L):f===140?v=this.deleteWindows(v,L):f===137?v=this.displayWindows(v,L):f===138?v=this.hideWindows(v,L):f===139?v=this.toggleWindows(v,L):f===151?v=this.setWindowAttributes(v,L):f===144?v=this.setPenAttributes(v,L):f===145?v=this.setPenColor(v,L):f===146?v=this.setPenLocation(v,L):f===143?L=this.reset(v,L):f===8?L.currentWindow.backspace():f===12?L.currentWindow.clearText():f===13?L.currentWindow.pendingNewLine=!0:f===14?L.currentWindow.clearText():f===141&&v++},je.prototype.extendedCommands=function(u,h){var p=this.current708Packet.data,f=p[++u];return Kt(f)&&(u=this.handleText(u,h,{isExtended:!0})),u},je.prototype.getPts=function(u){return this.current708Packet.ptsVals[Math.floor(u/2)]},je.prototype.initService=function(u,h){var f="SERVICE"+u,p=this,f,v;return f in this.serviceEncodings&&(v=this.serviceEncodings[f]),this.services[u]=new at(u,v,p),this.services[u].init(this.getPts(h),function(_){p.flushDisplayed(_,p.services[u])}),this.services[u]},je.prototype.handleText=function(u,h,p){var f=p&&p.isExtended,v=p&&p.isMultiByte,_=this.current708Packet.data,L=f?4096:0,V=_[u],q=_[u+1],W=h.currentWindow,ee,de;function xe(fe){return fe.map(Me=>("0"+(Me&255).toString(16)).slice(-2)).join("")}if(v?(de=[V,q],u++):de=[V],h.textDecoder_&&!f)ee=h.textDecoder_.decode(new Uint8Array(de));else if(v){const fe=xe(de);ee=String.fromCharCode(parseInt(fe,16))}else ee=Xt(L|V);return W.pendingNewLine&&!W.isEmpty()&&W.newLine(this.getPts(u)),W.pendingNewLine=!1,W.addText(ee),u},je.prototype.multiByteCharacter=function(u,h){var p=this.current708Packet.data,f=p[u+1],v=p[u+2];return Kt(f)&&Kt(v)&&(u=this.handleText(++u,h,{isMultiByte:!0})),u},je.prototype.setCurrentWindow=function(u,h){var p=this.current708Packet.data,f=p[u],v=f&7;return h.setCurrentWindow(v),u},je.prototype.defineWindow=function(u,h){var p=this.current708Packet.data,f=p[u],v=f&7;h.setCurrentWindow(v);var _=h.currentWindow;return f=p[++u],_.visible=(f&32)>>5,_.rowLock=(f&16)>>4,_.columnLock=(f&8)>>3,_.priority=f&7,f=p[++u],_.relativePositioning=(f&128)>>7,_.anchorVertical=f&127,f=p[++u],_.anchorHorizontal=f,f=p[++u],_.anchorPoint=(f&240)>>4,_.rowCount=f&15,f=p[++u],_.columnCount=f&63,f=p[++u],_.windowStyle=(f&56)>>3,_.penStyle=f&7,_.virtualRowCount=_.rowCount+1,u},je.prototype.setWindowAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.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},je.prototype.flushDisplayed=function(u,h){for(var p=[],f=0;f<8;f++)h.windows[f].visible&&!h.windows[f].isEmpty()&&p.push(h.windows[f].getText());h.endPts=u,h.text=p.join(`
|
|
207
207
|
|
|
208
|
-
`),this.pushCaption(h),h.startPts=u},je.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)},je.prototype.displayWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=1);return u},je.prototype.hideWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=0);return u},je.prototype.toggleWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible^=1);return u},je.prototype.clearWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].clearText();return u},je.prototype.deleteWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].reset();return u},je.prototype.setPenAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.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},je.prototype.setPenColor=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.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},je.prototype.setPenLocation=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penLoc;return h.currentWindow.pendingNewLine=!0,f=p[++u],v.row=f&15,f=p[++u],v.column=f&63,u},je.prototype.reset=function(u,h){var p=this.getPts(u);return this.flushDisplayed(p,h),this.initService(h.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},Li=function(u){return u===null?"":(u=Si[u]||u,String.fromCharCode(u))},xn=14,fs=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Yi=function(){for(var u=[],h=xn+1;h--;)u.push({text:"",indent:0,offset:0});return u},be=function(u,h){be.prototype.init.call(this),this.field_=u||0,this.dataChannel_=h||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(p){var f,v,_,M,R;if(f=p.ccData&32639,f===this.lastControlCode_){this.lastControlCode_=null;return}if((f&61440)===4096?this.lastControlCode_=f:f!==this.PADDING_&&(this.lastControlCode_=null),_=f>>>8,M=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_=Yi();else if(f===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Yi();else if(f===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(p.pts),this.displayed_=Yi()),this.mode_="paintOn",this.startPts_=p.pts;else if(this.isSpecialCharacter(_,M))_=(_&3)<<8,R=Li(_|M),this[this.mode_](p.pts,R),this.column_++;else if(this.isExtCharacter(_,M))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),_=(_&3)<<8,R=Li(_|M),this[this.mode_](p.pts,R),this.column_++;else if(this.isMidRowCode(_,M))this.clearFormatting(p.pts),this[this.mode_](p.pts," "),this.column_++,(M&14)===14&&this.addFormatting(p.pts,["i"]),(M&1)===1&&this.addFormatting(p.pts,["u"]);else if(this.isOffsetControlCode(_,M)){const W=M&3;this.nonDisplayed_[this.row_].offset=W,this.column_+=W}else if(this.isPAC(_,M)){var q=fs.indexOf(f&7968);if(this.mode_==="rollUp"&&(q-this.rollUpRows_+1<0&&(q=this.rollUpRows_-1),this.setRollUp(p.pts,q)),q!==this.row_&&q>=0&&q<=14&&(this.clearFormatting(p.pts),this.row_=q),M&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(p.pts,["u"]),(f&16)===16){const W=(f&14)>>1;this.column_=W*4,this.nonDisplayed_[this.row_].indent+=W}this.isColorPAC(M)&&(M&14)===14&&this.addFormatting(p.pts,["i"])}else this.isNormalChar(_)&&(M===0&&(M=null),R=Li(_),R+=Li(M),this[this.mode_](p.pts,R),this.column_+=R.length)}};be.prototype=new Vt,be.prototype.flushDisplayed=function(u){const h=f=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."})},p=[];this.displayed_.forEach((f,v)=>{if(f&&f.text&&f.text.length){try{f.text=f.text.trim()}catch{h(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&&h(v)}),p.length&&this.trigger("data",{startPts:this.startPts_,endPts:u,content:p,stream:this.name_})},be.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Yi(),this.nonDisplayed_=Yi(),this.lastControlCode_=null,this.column_=0,this.row_=xn,this.rollUpRows_=2,this.formatting_=[]},be.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},be.prototype.isSpecialCharacter=function(u,h){return u===this.EXT_&&h>=48&&h<=63},be.prototype.isExtCharacter=function(u,h){return(u===this.EXT_+1||u===this.EXT_+2)&&h>=32&&h<=63},be.prototype.isMidRowCode=function(u,h){return u===this.EXT_&&h>=32&&h<=47},be.prototype.isOffsetControlCode=function(u,h){return u===this.OFFSET_&&h>=33&&h<=35},be.prototype.isPAC=function(u,h){return u>=this.BASE_&&u<this.BASE_+8&&h>=64&&h<=127},be.prototype.isColorPAC=function(u){return u>=64&&u<=79||u>=96&&u<=127},be.prototype.isNormalChar=function(u){return u>=32&&u<=127},be.prototype.setRollUp=function(u,h){if(this.mode_!=="rollUp"&&(this.row_=xn,this.mode_="rollUp",this.flushDisplayed(u),this.nonDisplayed_=Yi(),this.displayed_=Yi()),h!==void 0&&h!==this.row_)for(var p=0;p<this.rollUpRows_;p++)this.displayed_[h-p]=this.displayed_[this.row_-p],this.displayed_[this.row_-p]={text:"",indent:0,offset:0};h===void 0&&(h=this.row_),this.topRow_=h-this.rollUpRows_+1},be.prototype.addFormatting=function(u,h){this.formatting_=this.formatting_.concat(h);var p=h.reduce(function(f,v){return f+"<"+v+">"},"");this[this.mode_](u,p)},be.prototype.clearFormatting=function(u){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(p,f){return p+"</"+f+">"},"");this.formatting_=[],this[this.mode_](u,h)}},be.prototype.popOn=function(u,h){var p=this.nonDisplayed_[this.row_].text;p+=h,this.nonDisplayed_[this.row_].text=p},be.prototype.rollUp=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p},be.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}},be.prototype.paintOn=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p};var J={CaptionStream:Ye,Cea608Stream:be,Cea708Stream:je},ge={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ce=t,Ze=8589934592,zt=4294967296,Dt="shared",_t=function(u,h){var p=1;for(u>h&&(p=-1);Math.abs(h-u)>zt;)u+=p*Ze;return u},Ei=function(u){var h,p;Ei.prototype.init.call(this),this.type_=u||Dt,this.push=function(f){if(f.type==="metadata"){this.trigger("data",f);return}this.type_!==Dt&&f.type!==this.type_||(p===void 0&&(p=f.dts),f.dts=_t(f.dts,p),f.pts=_t(f.pts,p),h=f.dts,this.trigger("data",f))},this.flush=function(){p=h,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){p=void 0,h=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ei.prototype=new Ce;var vt={TimestampRolloverStream:Ei,handleRollover:_t},br=(u,h,p)=>{if(!u)return-1;for(var f=p;f<u.length;f++)if(u[f]===h)return f;return-1},ps={typedArrayIndexOf:br},xr=ps.typedArrayIndexOf,ms={Utf8:3},du=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},Cr=function(u,h,p){return decodeURIComponent(du(u,h,p))},Sr=function(u,h,p){return unescape(du(u,h,p))},Er=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},kr={APIC:function(u){var h=1,p,f,v="-->";u.data[0]===ms.Utf8&&(p=xr(u.data,0,h),!(p<0)&&(u.mimeType=Sr(u.data,h,p),h=p+1,u.pictureType=u.data[h],h++,f=xr(u.data,0,h),!(f<0)&&(u.description=Cr(u.data,h,f),h=f+1,u.mimeType===v?u.url=Sr(u.data,h,u.data.length):u.pictureData=u.data.subarray(h,u.data.length))))},"T*":function(u){u.data[0]===ms.Utf8&&(u.value=Cr(u.data,1,u.data.length).replace(/\0*$/,""),u.values=u.value.split("\0"))},TXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=xr(u.data,0,1),h!==-1&&(u.description=Cr(u.data,1,h),u.value=Cr(u.data,h+1,u.data.length).replace(/\0*$/,""),u.data=u.value))},"W*":function(u){u.url=Sr(u.data,0,u.data.length).replace(/\0.*$/,"")},WXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=xr(u.data,0,1),h!==-1&&(u.description=Cr(u.data,1,h),u.url=Sr(u.data,h+1,u.data.length).replace(/\0.*$/,"")))},PRIV:function(u){var h;for(h=0;h<u.data.length;h++)if(u.data[h]===0){u.owner=Sr(u.data,0,h);break}u.privateData=u.data.subarray(h+1),u.data=u.privateData}},np=function(u){var h,p,f=10,v=0,_=[];if(!(u.length<10||u[0]!==73||u[1]!==68||u[2]!==51)){v=Er(u.subarray(6,10)),v+=10;var M=u[5]&64;M&&(f+=4,f+=Er(u.subarray(10,14)),v-=Er(u.subarray(16,20)));do{if(h=Er(u.subarray(f+4,f+8)),h<1)break;p=String.fromCharCode(u[f],u[f+1],u[f+2],u[f+3]);var R={id:p,data:u.subarray(f+10,f+h+10)};R.key=R.id,kr[R.id]?kr[R.id](R):R.id[0]==="T"?kr["T*"](R):R.id[0]==="W"&&kr["W*"](R),_.push(R),f+=10,f+=h}while(f<v);return _}},hu={parseId3Frames:np,parseSyncSafeInteger:Er,frameParsers:kr},rp=t,sp=ge,sn=hu,gs;gs=function(u){var h={descriptor:u&&u.descriptor},p=0,f=[],v=0,_;if(gs.prototype.init.call(this),this.dispatchType=sp.METADATA_STREAM_TYPE.toString(16),h.descriptor)for(_=0;_<h.descriptor.length;_++)this.dispatchType+=("00"+h.descriptor[_].toString(16)).slice(-2);this.push=function(M){var R,q,W,ee,de,xe;if(M.type==="timed-metadata"){if(M.dataAlignmentIndicator&&(v=0,f.length=0),f.length===0&&(M.data.length<10||M.data[0]!==73||M.data[1]!==68||M.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(f.push(M),v+=M.data.byteLength,f.length===1&&(p=sn.parseSyncSafeInteger(M.data.subarray(6,10)),p+=10),!(v<p)){for(R={data:new Uint8Array(p),frames:[],pts:f[0].pts,dts:f[0].dts},de=0;de<p;)R.data.set(f[0].data.subarray(0,p-de),de),de+=f[0].data.byteLength,v-=f[0].data.byteLength,f.shift();q=10,R.data[5]&64&&(q+=4,q+=sn.parseSyncSafeInteger(R.data.subarray(10,14)),p-=sn.parseSyncSafeInteger(R.data.subarray(16,20)));do{if(W=sn.parseSyncSafeInteger(R.data.subarray(q+4,q+8)),W<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(xe=String.fromCharCode(R.data[q],R.data[q+1],R.data[q+2],R.data[q+3]),ee={id:xe,data:R.data.subarray(q+10,q+W+10)},ee.key=ee.id,sn.frameParsers[ee.id]?sn.frameParsers[ee.id](ee):ee.id[0]==="T"?sn.frameParsers["T*"](ee):ee.id[0]==="W"&&sn.frameParsers["W*"](ee),ee.owner==="com.apple.streaming.transportStreamTimestamp"){var fe=ee.data,Me=(fe[3]&1)<<30|fe[4]<<22|fe[5]<<14|fe[6]<<6|fe[7]>>>2;Me*=4,Me+=fe[7]&3,ee.timeStamp=Me,R.pts===void 0&&R.dts===void 0&&(R.pts=ee.timeStamp,R.dts=ee.timeStamp),this.trigger("timestamp",ee)}R.frames.push(ee),q+=10,q+=W}while(q<p);this.trigger("data",R)}}}},gs.prototype=new rp;var ap=gs,Ha=t,Ga=J,ki=ge,op=vt.TimestampRolloverStream,vs,wr,ys,$n=188,Wa=71;vs=function(){var u=new Uint8Array($n),h=0;vs.prototype.init.call(this),this.push=function(p){var f=0,v=$n,_;for(h?(_=new Uint8Array(p.byteLength+h),_.set(u.subarray(0,h)),_.set(p,h),h=0):_=p;v<_.byteLength;){if(_[f]===Wa&&_[v]===Wa){this.trigger("data",_.subarray(f,v)),f+=$n,v+=$n;continue}f++,v++}f<_.byteLength&&(u.set(_.subarray(f),0),h=_.byteLength-f)},this.flush=function(){h===$n&&u[0]===Wa&&(this.trigger("data",u),h=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){h=0,this.trigger("reset")}},vs.prototype=new Ha,wr=function(){var u,h,p,f;wr.prototype.init.call(this),f=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,u=function(v,_){var M=0;_.payloadUnitStartIndicator&&(M+=v[M]+1),_.type==="pat"?h(v.subarray(M),_):p(v.subarray(M),_)},h=function(v,_){_.section_number=v[7],_.last_section_number=v[8],f.pmtPid=(v[10]&31)<<8|v[11],_.pmtPid=f.pmtPid},p=function(v,_){var M,R,q,W;if(v[5]&1){for(f.programMapTable={video:null,audio:null,"timed-metadata":{}},M=(v[1]&15)<<8|v[2],R=3+M-4,q=(v[10]&15)<<8|v[11],W=12+q;W<R;){var ee=v[W],de=(v[W+1]&31)<<8|v[W+2];ee===ki.H264_STREAM_TYPE&&f.programMapTable.video===null?f.programMapTable.video=de:ee===ki.ADTS_STREAM_TYPE&&f.programMapTable.audio===null?f.programMapTable.audio=de:ee===ki.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][de]=ee),W+=((v[W+3]&15)<<8|v[W+4])+5}_.programMapTable=f.programMapTable}},this.push=function(v){var _={},M=4;if(_.payloadUnitStartIndicator=!!(v[1]&64),_.pid=v[1]&31,_.pid<<=8,_.pid|=v[2],(v[3]&48)>>>4>1&&(M+=v[M]+1),_.pid===0)_.type="pat",u(v.subarray(M),_),this.trigger("data",_);else if(_.pid===this.pmtPid)for(_.type="pmt",u(v.subarray(M),_),this.trigger("data",_);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([v,M,_]):this.processPes_(v,M,_)},this.processPes_=function(v,_,M){M.pid===this.programMapTable.video?M.streamType=ki.H264_STREAM_TYPE:M.pid===this.programMapTable.audio?M.streamType=ki.ADTS_STREAM_TYPE:M.streamType=this.programMapTable["timed-metadata"][M.pid],M.type="pes",M.data=v.subarray(_),this.trigger("data",M)}},wr.prototype=new Ha,wr.STREAM_TYPES={h264:27,adts:15},ys=function(){var u=this,h=!1,p={data:[],size:0},f={data:[],size:0},v={data:[],size:0},_,M=function(q,W){var ee;const de=q[0]<<16|q[1]<<8|q[2];W.data=new Uint8Array,de===1&&(W.packetLength=6+(q[4]<<8|q[5]),W.dataAlignmentIndicator=(q[6]&4)!==0,ee=q[7],ee&192&&(W.pts=(q[9]&14)<<27|(q[10]&255)<<20|(q[11]&254)<<12|(q[12]&255)<<5|(q[13]&254)>>>3,W.pts*=4,W.pts+=(q[13]&6)>>>1,W.dts=W.pts,ee&64&&(W.dts=(q[14]&14)<<27|(q[15]&255)<<20|(q[16]&254)<<12|(q[17]&255)<<5|(q[18]&254)>>>3,W.dts*=4,W.dts+=(q[18]&6)>>>1)),W.data=q.subarray(9+q[8]))},R=function(q,W,ee){var de=new Uint8Array(q.size),xe={type:W},fe=0,Me=0,ze=!1,Bt;if(!(!q.data.length||q.size<9)){for(xe.trackId=q.data[0].pid,fe=0;fe<q.data.length;fe++)Bt=q.data[fe],de.set(Bt.data,Me),Me+=Bt.data.byteLength;M(de,xe),ze=W==="video"||xe.packetLength<=q.size,(ee||ze)&&(q.size=0,q.data.length=0),ze&&u.trigger("data",xe)}};ys.prototype.init.call(this),this.push=function(q){({pat:function(){},pes:function(){var W,ee;switch(q.streamType){case ki.H264_STREAM_TYPE:W=p,ee="video";break;case ki.ADTS_STREAM_TYPE:W=f,ee="audio";break;case ki.METADATA_STREAM_TYPE:W=v,ee="timed-metadata";break;default:return}q.payloadUnitStartIndicator&&R(W,ee,!0),W.data.push(q),W.size+=q.data.byteLength},pmt:function(){var W={type:"metadata",tracks:[]};_=q.programMapTable,_.video!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),h=!0,u.trigger("data",W)}})[q.type]()},this.reset=function(){p.size=0,p.data.length=0,f.size=0,f.data.length=0,this.trigger("reset")},this.flushStreams_=function(){R(p,"video"),R(f,"audio"),R(v,"timed-metadata")},this.flush=function(){if(!h&&_){var q={type:"metadata",tracks:[]};_.video!==null&&q.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&q.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),u.trigger("data",q)}h=!1,this.flushStreams_(),this.trigger("done")}},ys.prototype=new Ha;var fu={PAT_PID:0,MP2T_PACKET_LENGTH:$n,TransportPacketStream:vs,TransportParseStream:wr,ElementaryStream:ys,TimestampRolloverStream:op,CaptionStream:Ga.CaptionStream,Cea608Stream:Ga.Cea608Stream,Cea708Stream:Ga.Cea708Stream,MetadataStream:ap};for(var Ya in ki)ki.hasOwnProperty(Ya)&&(fu[Ya]=ki[Ya]);var lp=fu,up=t,cp=Oe.ONE_SECOND_IN_TS,_s,pu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_s=function(u){var h,p=0;_s.prototype.init.call(this),this.skipWarn_=function(f,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,_,M,R,q,W;if(u||(p=0),f.type==="audio"){h&&h.length?(R=h,h=new Uint8Array(R.byteLength+f.data.byteLength),h.set(R),h.set(f.data,R.byteLength)):h=f.data;for(var ee;v+7<h.length;){if(h[v]!==255||(h[v+1]&246)!==240){typeof ee!="number"&&(ee=v),v++;continue}if(typeof ee=="number"&&(this.skipWarn_(ee,v),ee=null),M=(~h[v+1]&1)*2,_=(h[v+3]&3)<<11|h[v+4]<<3|(h[v+5]&224)>>5,q=((h[v+6]&3)+1)*1024,W=q*cp/pu[(h[v+2]&60)>>>2],h.byteLength-v<_)break;this.trigger("data",{pts:f.pts+p*W,dts:f.dts+p*W,sampleCount:q,audioobjecttype:(h[v+2]>>>6&3)+1,channelcount:(h[v+2]&1)<<2|(h[v+3]&192)>>>6,samplerate:pu[(h[v+2]&60)>>>2],samplingfrequencyindex:(h[v+2]&60)>>>2,samplesize:16,data:h.subarray(v+7+M,v+_)}),p++,v+=_}typeof ee=="number"&&(this.skipWarn_(ee,v),ee=null),h=h.subarray(v)}},this.flush=function(){p=0,this.trigger("done")},this.reset=function(){h=void 0,this.trigger("reset")},this.endTimeline=function(){h=void 0,this.trigger("endedtimeline")}},_s.prototype=new up;var dp=_s,mu;mu=function(u){var h=u.byteLength,p=0,f=0;this.length=function(){return 8*h},this.bitsAvailable=function(){return 8*h+f},this.loadWord=function(){var v=u.byteLength-h,_=new Uint8Array(4),M=Math.min(4,h);if(M===0)throw new Error("no bytes available");_.set(u.subarray(v,v+M)),p=new DataView(_.buffer).getUint32(0),f=M*8,h-=M},this.skipBits=function(v){var _;f>v?(p<<=v,f-=v):(v-=f,_=Math.floor(v/8),v-=_*8,h-=_,this.loadWord(),p<<=v,f-=v)},this.readBits=function(v){var _=Math.min(f,v),M=p>>>32-_;return f-=_,f>0?p<<=_:h>0&&this.loadWord(),_=v-_,_>0?M<<_|this.readBits(_):M},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 hp=mu,gu=t,fp=hp,Ts,bs,vu;bs=function(){var u=0,h,p;bs.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 _=p.byteLength;u<_-3;u++)if(p[u+2]===1){h=u+5;break}for(;h<_;)switch(p[h]){case 0:if(p[h-1]!==0){h+=2;break}else if(p[h-2]!==0){h++;break}u+3!==h-2&&this.trigger("data",p.subarray(u+3,h-2));do h++;while(p[h]!==1&&h<_);u=h-2,h+=3;break;case 1:if(p[h-1]!==0||p[h-2]!==0){h+=3;break}this.trigger("data",p.subarray(u+3,h-2)),u=h-2,h+=3;break;default:h+=3;break}p=p.subarray(u),h-=u,u=0},this.reset=function(){p=null,u=0,this.trigger("reset")},this.flush=function(){p&&p.byteLength>3&&this.trigger("data",p.subarray(u+3)),p=null,u=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},bs.prototype=new gu,vu={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ts=function(){var u=new bs,h,p,f,v,_,M,R;Ts.prototype.init.call(this),h=this,this.push=function(q){q.type==="video"&&(p=q.trackId,f=q.pts,v=q.dts,u.push(q))},u.on("data",function(q){var W={trackId:p,pts:f,dts:v,data:q,nalUnitTypeCode:q[0]&31};switch(W.nalUnitTypeCode){case 5:W.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:W.nalUnitType="sei_rbsp",W.escapedRBSP=_(q.subarray(1));break;case 7:W.nalUnitType="seq_parameter_set_rbsp",W.escapedRBSP=_(q.subarray(1)),W.config=M(W.escapedRBSP);break;case 8:W.nalUnitType="pic_parameter_set_rbsp";break;case 9:W.nalUnitType="access_unit_delimiter_rbsp";break}h.trigger("data",W)}),u.on("done",function(){h.trigger("done")}),u.on("partialdone",function(){h.trigger("partialdone")}),u.on("reset",function(){h.trigger("reset")}),u.on("endedtimeline",function(){h.trigger("endedtimeline")}),this.flush=function(){u.flush()},this.partialFlush=function(){u.partialFlush()},this.reset=function(){u.reset()},this.endTimeline=function(){u.endTimeline()},R=function(q,W){var ee=8,de=8,xe,fe;for(xe=0;xe<q;xe++)de!==0&&(fe=W.readExpGolomb(),de=(ee+fe+256)%256),ee=de===0?ee:de},_=function(q){for(var W=q.byteLength,ee=[],de=1,xe,fe;de<W-2;)q[de]===0&&q[de+1]===0&&q[de+2]===3?(ee.push(de+2),de+=2):de++;if(ee.length===0)return q;xe=W-ee.length,fe=new Uint8Array(xe);var Me=0;for(de=0;de<xe;Me++,de++)Me===ee[0]&&(Me++,ee.shift()),fe[de]=q[Me];return fe},M=function(q){var W=0,ee=0,de=0,xe=0,fe,Me,ze,Bt,di,on,Lr,Mr,Pr,Rr,Bs,ut=[1,1],Vr,Di;if(fe=new fp(q),Me=fe.readUnsignedByte(),Bt=fe.readUnsignedByte(),ze=fe.readUnsignedByte(),fe.skipUnsignedExpGolomb(),vu[Me]&&(di=fe.readUnsignedExpGolomb(),di===3&&fe.skipBits(1),fe.skipUnsignedExpGolomb(),fe.skipUnsignedExpGolomb(),fe.skipBits(1),fe.readBoolean()))for(Bs=di!==3?8:12,Di=0;Di<Bs;Di++)fe.readBoolean()&&(Di<6?R(16,fe):R(64,fe));if(fe.skipUnsignedExpGolomb(),on=fe.readUnsignedExpGolomb(),on===0)fe.readUnsignedExpGolomb();else if(on===1)for(fe.skipBits(1),fe.skipExpGolomb(),fe.skipExpGolomb(),Lr=fe.readUnsignedExpGolomb(),Di=0;Di<Lr;Di++)fe.skipExpGolomb();if(fe.skipUnsignedExpGolomb(),fe.skipBits(1),Mr=fe.readUnsignedExpGolomb(),Pr=fe.readUnsignedExpGolomb(),Rr=fe.readBits(1),Rr===0&&fe.skipBits(1),fe.skipBits(1),fe.readBoolean()&&(W=fe.readUnsignedExpGolomb(),ee=fe.readUnsignedExpGolomb(),de=fe.readUnsignedExpGolomb(),xe=fe.readUnsignedExpGolomb()),fe.readBoolean()&&fe.readBoolean()){switch(Vr=fe.readUnsignedByte(),Vr){case 1:ut=[1,1];break;case 2:ut=[12,11];break;case 3:ut=[10,11];break;case 4:ut=[16,11];break;case 5:ut=[40,33];break;case 6:ut=[24,11];break;case 7:ut=[20,11];break;case 8:ut=[32,11];break;case 9:ut=[80,33];break;case 10:ut=[18,11];break;case 11:ut=[15,11];break;case 12:ut=[64,33];break;case 13:ut=[160,99];break;case 14:ut=[4,3];break;case 15:ut=[3,2];break;case 16:ut=[2,1];break;case 255:{ut=[fe.readUnsignedByte()<<8|fe.readUnsignedByte(),fe.readUnsignedByte()<<8|fe.readUnsignedByte()];break}}ut&&ut[0]/ut[1]}return{profileIdc:Me,levelIdc:ze,profileCompatibility:Bt,width:(Mr+1)*16-W*2-ee*2,height:(2-Rr)*(Pr+1)*16-de*2-xe*2,sarRatio:ut}}},Ts.prototype=new gu;var pp={H264Stream:Ts},mp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yu=function(u,h){var p=u[h+6]<<21|u[h+7]<<14|u[h+8]<<7|u[h+9],f=u[h+5],v=(f&16)>>4;return p=p>=0?p:0,v?p+20:p+10},_u=function(u,h){return u.length-h<10||u[h]!==73||u[h+1]!==68||u[h+2]!==51?h:(h+=yu(u,h),_u(u,h))},gp=function(u){var h=_u(u,0);return u.length>=h+2&&(u[h]&255)===255&&(u[h+1]&240)===240&&(u[h+1]&22)===16},Tu=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},vp=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},yp=function(u,h,p){return unescape(vp(u,h,p))},_p=function(u,h){var p=(u[h+5]&224)>>5,f=u[h+4]<<3,v=u[h+3]&6144;return v|f|p},Tp=function(u,h){return u[h]===73&&u[h+1]===68&&u[h+2]===51?"timed-metadata":u[h]&!0&&(u[h+1]&240)===240?"audio":null},bp=function(u){for(var h=0;h+5<u.length;){if(u[h]!==255||(u[h+1]&246)!==240){h++;continue}return mp[(u[h+2]&60)>>>2]}return null},xp=function(u){var h,p,f,v;h=10,u[5]&64&&(h+=4,h+=Tu(u.subarray(10,14)));do{if(p=Tu(u.subarray(h+4,h+8)),p<1)return null;if(v=String.fromCharCode(u[h],u[h+1],u[h+2],u[h+3]),v==="PRIV"){f=u.subarray(h+10,h+p+10);for(var _=0;_<f.byteLength;_++)if(f[_]===0){var M=yp(f,0,_);if(M==="com.apple.streaming.transportStreamTimestamp"){var R=f.subarray(_+1),q=(R[3]&1)<<30|R[4]<<22|R[5]<<14|R[6]<<6|R[7]>>>2;return q*=4,q+=R[7]&3,q}break}}h+=10,h+=p}while(h<u.byteLength);return null},Xa={isLikelyAacData:gp,parseId3TagSize:yu,parseAdtsSize:_p,parseType:Tp,parseSampleRate:bp,parseAacTimestamp:xp},Cp=t,bu=Xa,xs;xs=function(){var u=new Uint8Array,h=0;xs.prototype.init.call(this),this.setTimestamp=function(p){h=p},this.push=function(p){var f=0,v=0,_,M,R,q;for(u.length?(q=u.length,u=new Uint8Array(p.byteLength+q),u.set(u.subarray(0,q)),u.set(p,q)):u=p;u.length-v>=3;){if(u[v]===73&&u[v+1]===68&&u[v+2]===51){if(u.length-v<10||(f=bu.parseId3TagSize(u,v),v+f>u.length))break;M={type:"timed-metadata",data:u.subarray(v,v+f)},this.trigger("data",M),v+=f;continue}else if((u[v]&255)===255&&(u[v+1]&240)===240){if(u.length-v<7||(f=bu.parseAdtsSize(u,v),v+f>u.length))break;R={type:"audio",data:u.subarray(v,v+f),pts:h,dts:h},this.trigger("data",R),v+=f;continue}v++}_=u.length-v,_>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")}},xs.prototype=new Cp;var Sp=xs,Ep=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],kp=Ep,wp=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Dp=wp,Cs=t,Dr=we,Ar=St,Ss=ci,wi=Y,Xi=lp,Es=Oe,xu=dp,Ap=pp.H264Stream,Np=Sp,Ip=Xa.isLikelyAacData,Op=Oe.ONE_SECOND_IN_TS,Cu=kp,Su=Dp,ks,Nr,ws,Cn,Bp=function(u,h){h.stream=u,this.trigger("log",h)},Eu=function(u,h){for(var p=Object.keys(h),f=0;f<p.length;f++){var v=p[f];v==="headOfPipeline"||!h[v].on||h[v].on("log",Bp.bind(u,v))}},ku=function(u,h){var p;if(u.length!==h.length)return!1;for(p=0;p<u.length;p++)if(u[p]!==h[p])return!1;return!0},wu=function(u,h,p,f,v,_){var M=p-h,R=f-h,q=v-p;return{start:{dts:u,pts:u+M},end:{dts:u+R,pts:u+q},prependedContentDuration:_,baseMediaDecodeTime:u}};Nr=function(u,h){var p=[],f,v=0,_=0,M=1/0;h=h||{},f=h.firstSequenceNumber||0,Nr.prototype.init.call(this),this.push=function(R){wi.collectDtsInfo(u,R),u&&Cu.forEach(function(q){u[q]=R[q]}),p.push(R)},this.setEarliestDts=function(R){v=R},this.setVideoBaseMediaDecodeTime=function(R){M=R},this.setAudioAppendStart=function(R){_=R},this.flush=function(){var R,q,W,ee,de,xe,fe;if(p.length===0){this.trigger("done","AudioSegmentStream");return}R=Ss.trimAdtsFramesByEarliestDts(p,u,v),u.baseMediaDecodeTime=wi.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),fe=Ss.prefixWithSilence(u,R,_,M),u.samples=Ss.generateSampleTable(R),W=Dr.mdat(Ss.concatenateFrameData(R)),p=[],q=Dr.moof(f,[u]),ee=new Uint8Array(q.byteLength+W.byteLength),f++,ee.set(q),ee.set(W,q.byteLength),wi.clearDtsInfo(u),de=Math.ceil(Op*1024/u.samplerate),R.length&&(xe=R.length*de,this.trigger("segmentTimingInfo",wu(Es.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),R[0].dts,R[0].pts,R[0].dts+xe,R[0].pts+xe,fe||0)),this.trigger("timingInfo",{start:R[0].pts,end:R[0].pts+xe})),this.trigger("data",{track:u,boxes:ee}),this.trigger("done","AudioSegmentStream")},this.reset=function(){wi.clearDtsInfo(u),p=[],this.trigger("reset")}},Nr.prototype=new Cs,ks=function(u,h){var p,f=[],v=[],_,M;h=h||{},p=h.firstSequenceNumber||0,ks.prototype.init.call(this),delete u.minPTS,this.gopCache_=[],this.push=function(R){wi.collectDtsInfo(u,R),R.nalUnitType==="seq_parameter_set_rbsp"&&!_&&(_=R.config,u.sps=[R.data],Su.forEach(function(q){u[q]=_[q]},this)),R.nalUnitType==="pic_parameter_set_rbsp"&&!M&&(M=R.data,u.pps=[R.data]),f.push(R)},this.flush=function(){for(var R,q,W,ee,de,xe,fe=0,Me,ze;f.length&&f[0].nalUnitType!=="access_unit_delimiter_rbsp";)f.shift();if(f.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(R=Ar.groupNalsIntoFrames(f),W=Ar.groupFramesIntoGops(R),W[0][0].keyFrame||(q=this.getGopForFusion_(f[0],u),q?(fe=q.duration,W.unshift(q),W.byteLength+=q.byteLength,W.nalCount+=q.nalCount,W.pts=q.pts,W.dts=q.dts,W.duration+=q.duration):W=Ar.extendFirstKeyFrame(W)),v.length){var Bt;if(h.alignGopsAtEnd?Bt=this.alignGopsAtEnd_(W):Bt=this.alignGopsAtStart_(W),!Bt){this.gopCache_.unshift({gop:W.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}wi.clearDtsInfo(u),W=Bt}wi.collectDtsInfo(u,W),u.samples=Ar.generateSampleTable(W),de=Dr.mdat(Ar.concatenateNalData(W)),u.baseMediaDecodeTime=wi.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),this.trigger("processedGopsInfo",W.map(function(di){return{pts:di.pts,dts:di.dts,byteLength:di.byteLength}})),Me=W[0],ze=W[W.length-1],this.trigger("segmentTimingInfo",wu(u.baseMediaDecodeTime,Me.dts,Me.pts,ze.dts+ze.duration,ze.pts+ze.duration,fe)),this.trigger("timingInfo",{start:W[0].pts,end:W[W.length-1].pts+W[W.length-1].duration}),this.gopCache_.unshift({gop:W.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),ee=Dr.moof(p,[u]),xe=new Uint8Array(ee.byteLength+de.byteLength),p++,xe.set(ee),xe.set(de,ee.byteLength),this.trigger("data",{track:u,boxes:xe}),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(){wi.clearDtsInfo(u),_=void 0,M=void 0},this.getGopForFusion_=function(R){var q=45e3,W=1/0,ee,de,xe,fe,Me;for(Me=0;Me<this.gopCache_.length;Me++)fe=this.gopCache_[Me],xe=fe.gop,!(!(u.pps&&ku(u.pps[0],fe.pps[0]))||!(u.sps&&ku(u.sps[0],fe.sps[0])))&&(xe.dts<u.timelineStartInfo.dts||(ee=R.dts-xe.dts-xe.duration,ee>=-1e4&&ee<=q&&(!de||W>ee)&&(de=fe,W=ee)));return de?de.gop:null},this.alignGopsAtStart_=function(R){var q,W,ee,de,xe,fe,Me,ze;for(xe=R.byteLength,fe=R.nalCount,Me=R.duration,q=W=0;q<v.length&&W<R.length&&(ee=v[q],de=R[W],ee.pts!==de.pts);){if(de.pts>ee.pts){q++;continue}W++,xe-=de.byteLength,fe-=de.nalCount,Me-=de.duration}return W===0?R:W===R.length?null:(ze=R.slice(W),ze.byteLength=xe,ze.duration=Me,ze.nalCount=fe,ze.pts=ze[0].pts,ze.dts=ze[0].dts,ze)},this.alignGopsAtEnd_=function(R){var q,W,ee,de,xe,fe;for(q=v.length-1,W=R.length-1,xe=null,fe=!1;q>=0&&W>=0;){if(ee=v[q],de=R[W],ee.pts===de.pts){fe=!0;break}if(ee.pts>de.pts){q--;continue}q===v.length-1&&(xe=W),W--}if(!fe&&xe===null)return null;var Me;if(fe?Me=W:Me=xe,Me===0)return R;var ze=R.slice(Me),Bt=ze.reduce(function(di,on){return di.byteLength+=on.byteLength,di.duration+=on.duration,di.nalCount+=on.nalCount,di},{byteLength:0,duration:0,nalCount:0});return ze.byteLength=Bt.byteLength,ze.duration=Bt.duration,ze.nalCount=Bt.nalCount,ze.pts=ze[0].pts,ze.dts=ze[0].dts,ze},this.alignGopsWith=function(R){v=R}},ks.prototype=new Cs,Cn=function(u,h){this.numberOfTracks=0,this.metadataStream=h,u=u||{},typeof u.remux<"u"?this.remuxTracks=!!u.remux:this.remuxTracks=!0,typeof u.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=u.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,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 Cs,Cn.prototype.flush=function(u){var h=0,p={captions:[],captionStreams:{},metadata:[],info:{}},f,v,_,M=0,R;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?(M=this.videoTrack.timelineStartInfo.pts,Su.forEach(function(q){p.info[q]=this.videoTrack[q]},this)):this.audioTrack&&(M=this.audioTrack.timelineStartInfo.pts,Cu.forEach(function(q){p.info[q]=this.audioTrack[q]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?p.type=this.pendingTracks[0].type:p.type="combined",this.emittedTracks+=this.pendingTracks.length,_=Dr.initSegment(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),R=0;R<this.pendingBoxes.length;R++)p.data.set(this.pendingBoxes[R],h),h+=this.pendingBoxes[R].byteLength;for(R=0;R<this.pendingCaptions.length;R++)f=this.pendingCaptions[R],f.startTime=Es.metadataTsToSeconds(f.startPts,M,this.keepOriginalTimestamps),f.endTime=Es.metadataTsToSeconds(f.endPts,M,this.keepOriginalTimestamps),p.captionStreams[f.stream]=!0,p.captions.push(f);for(R=0;R<this.pendingMetadata.length;R++)v=this.pendingMetadata[R],v.cueTime=Es.metadataTsToSeconds(v.pts,M,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),R=0;R<p.captions.length;R++)f=p.captions[R],this.trigger("caption",f);for(R=0;R<p.metadata.length;R++)v=p.metadata[R],this.trigger("id3Frame",v)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Cn.prototype.setRemux=function(u){this.remuxTracks=u},ws=function(u){var h=this,p=!0,f,v;ws.prototype.init.call(this),u=u||{},this.baseMediaDecodeTime=u.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="aac",_.metadataStream=new Xi.MetadataStream,_.aacStream=new Np,_.audioTimestampRolloverStream=new Xi.TimestampRolloverStream("audio"),_.timedMetadataTimestampRolloverStream=new Xi.TimestampRolloverStream("timed-metadata"),_.adtsStream=new xu,_.coalesceStream=new Cn(u,_.metadataStream),_.headOfPipeline=_.aacStream,_.aacStream.pipe(_.audioTimestampRolloverStream).pipe(_.adtsStream),_.aacStream.pipe(_.timedMetadataTimestampRolloverStream).pipe(_.metadataStream).pipe(_.coalesceStream),_.metadataStream.on("timestamp",function(M){_.aacStream.setTimestamp(M.timeStamp)}),_.aacStream.on("data",function(M){M.type!=="timed-metadata"&&M.type!=="audio"||_.audioSegmentStream||(v=v||{timelineStartInfo:{baseMediaDecodeTime:h.baseMediaDecodeTime},codec:"adts",type:"audio"},_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Nr(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f}))}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Eu(this,_)},this.setupTsPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="ts",_.metadataStream=new Xi.MetadataStream,_.packetStream=new Xi.TransportPacketStream,_.parseStream=new Xi.TransportParseStream,_.elementaryStream=new Xi.ElementaryStream,_.timestampRolloverStream=new Xi.TimestampRolloverStream,_.adtsStream=new xu,_.h264Stream=new Ap,_.captionStream=new Xi.CaptionStream(u),_.coalesceStream=new Cn(u,_.metadataStream),_.headOfPipeline=_.packetStream,_.packetStream.pipe(_.parseStream).pipe(_.elementaryStream).pipe(_.timestampRolloverStream),_.timestampRolloverStream.pipe(_.h264Stream),_.timestampRolloverStream.pipe(_.adtsStream),_.timestampRolloverStream.pipe(_.metadataStream).pipe(_.coalesceStream),_.h264Stream.pipe(_.captionStream).pipe(_.coalesceStream),_.elementaryStream.on("data",function(M){var R;if(M.type==="metadata"){for(R=M.tracks.length;R--;)!f&&M.tracks[R].type==="video"?(f=M.tracks[R],f.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime):!v&&M.tracks[R].type==="audio"&&(v=M.tracks[R],v.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime);f&&!_.videoSegmentStream&&(_.coalesceStream.numberOfTracks++,_.videoSegmentStream=new ks(f,u),_.videoSegmentStream.on("log",h.getLogTrigger_("videoSegmentStream")),_.videoSegmentStream.on("timelineStartInfo",function(q){v&&!u.keepOriginalTimestamps&&(v.timelineStartInfo=q,_.audioSegmentStream.setEarliestDts(q.dts-h.baseMediaDecodeTime))}),_.videoSegmentStream.on("processedGopsInfo",h.trigger.bind(h,"gopInfo")),_.videoSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"videoSegmentTimingInfo")),_.videoSegmentStream.on("baseMediaDecodeTime",function(q){v&&_.audioSegmentStream.setVideoBaseMediaDecodeTime(q)}),_.videoSegmentStream.on("timingInfo",h.trigger.bind(h,"videoTimingInfo")),_.h264Stream.pipe(_.videoSegmentStream).pipe(_.coalesceStream)),v&&!_.audioSegmentStream&&(_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Nr(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.audioSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"audioSegmentTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream)),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f})}}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("id3Frame",function(M){M.dispatchType=_.metadataStream.dispatchType,h.trigger("id3Frame",M)}),_.coalesceStream.on("caption",this.trigger.bind(this,"caption")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Eu(this,_)},this.setBaseMediaDecodeTime=function(_){var M=this.transmuxPipeline_;u.keepOriginalTimestamps||(this.baseMediaDecodeTime=_),v&&(v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,wi.clearDtsInfo(v),M.audioTimestampRolloverStream&&M.audioTimestampRolloverStream.discontinuity()),f&&(M.videoSegmentStream&&(M.videoSegmentStream.gopCache_=[]),f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,wi.clearDtsInfo(f),M.captionStream.reset()),M.timestampRolloverStream&&M.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(_){v&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(_)},this.setRemux=function(_){var M=this.transmuxPipeline_;u.remux=_,M&&M.coalesceStream&&M.coalesceStream.setRemux(_)},this.alignGopsWith=function(_){f&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(_)},this.getLogTrigger_=function(_){var M=this;return function(R){R.stream=_,M.trigger("log",R)}},this.push=function(_){if(p){var M=Ip(_);M&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!M&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),p=!1}this.transmuxPipeline_.headOfPipeline.push(_)},this.flush=function(){p=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ws.prototype=new Cs;var Lp={Transmuxer:ws},Mp=function(u){return u>>>0},Pp=function(u){return("00"+u.toString(16)).slice(-2)},Ds={toUnsigned:Mp,toHexString:Pp},Rp=function(u){var h="";return h+=String.fromCharCode(u[0]),h+=String.fromCharCode(u[1]),h+=String.fromCharCode(u[2]),h+=String.fromCharCode(u[3]),h},Du=Rp,Vp=Ds.toUnsigned,Fp=Du,Au=function(u,h){var p=[],f,v,_,M,R;if(!h.length)return null;for(f=0;f<u.byteLength;)v=Vp(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3]),_=Fp(u.subarray(f+4,f+8)),M=v>1?f+v:u.byteLength,_===h[0]&&(h.length===1?p.push(u.subarray(f+8,M)):(R=Au(u.subarray(f+8,M),h.slice(1)),R.length&&(p=p.concat(R)))),f=M;return p},Ka=Au,$p=Ds.toUnsigned,Up=a.getUint64,qp=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4))};return h.version===1?h.baseMediaDecodeTime=Up(u.subarray(4)):h.baseMediaDecodeTime=$p(u[4]<<24|u[5]<<16|u[6]<<8|u[7]),h},Qa=qp,zp=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p={version:u[0],flags:new Uint8Array(u.subarray(1,4)),trackId:h.getUint32(4)},f=p.flags[2]&1,v=p.flags[2]&2,_=p.flags[2]&8,M=p.flags[2]&16,R=p.flags[2]&32,q=p.flags[0]&65536,W=p.flags[0]&131072,ee;return ee=8,f&&(ee+=4,p.baseDataOffset=h.getUint32(12),ee+=4),v&&(p.sampleDescriptionIndex=h.getUint32(ee),ee+=4),_&&(p.defaultSampleDuration=h.getUint32(ee),ee+=4),M&&(p.defaultSampleSize=h.getUint32(ee),ee+=4),R&&(p.defaultSampleFlags=h.getUint32(ee)),q&&(p.durationIsEmpty=!0),!f&&W&&(p.baseDataOffsetIsMoof=!0),p},Nu=zp,jp=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]}},Hp=jp,Iu=Hp,Gp=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4)),samples:[]},p=new DataView(u.buffer,u.byteOffset,u.byteLength),f=h.flags[2]&1,v=h.flags[2]&4,_=h.flags[1]&1,M=h.flags[1]&2,R=h.flags[1]&4,q=h.flags[1]&8,W=p.getUint32(4),ee=8,de;for(f&&(h.dataOffset=p.getInt32(ee),ee+=4),v&&W&&(de={flags:Iu(u.subarray(ee,ee+4))},ee+=4,_&&(de.duration=p.getUint32(ee),ee+=4),M&&(de.size=p.getUint32(ee),ee+=4),q&&(h.version===1?de.compositionTimeOffset=p.getInt32(ee):de.compositionTimeOffset=p.getUint32(ee),ee+=4),h.samples.push(de),W--);W--;)de={},_&&(de.duration=p.getUint32(ee),ee+=4),M&&(de.size=p.getUint32(ee),ee+=4),R&&(de.flags=Iu(u.subarray(ee,ee+4)),ee+=4),q&&(h.version===1?de.compositionTimeOffset=p.getInt32(ee):de.compositionTimeOffset=p.getUint32(ee),ee+=4),h.samples.push(de);return h},Ou=Gp,Bu={tfdt:Qa,trun:Ou},Lu={parseTfdt:Bu.tfdt,parseTrun:Bu.trun},Wp=function(u){for(var h=0,p=String.fromCharCode(u[h]),f="";p!=="\0";)f+=p,h++,p=String.fromCharCode(u[h]);return f+=p,f},Yp={uint8ToCString:Wp},As=Yp.uint8ToCString,Xp=a.getUint64,Kp=function(u){var h=4,p=u[0],f,v,_,M,R,q,W,ee;if(p===0){f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length;var de=new DataView(u.buffer);_=de.getUint32(h),h+=4,R=de.getUint32(h),h+=4,q=de.getUint32(h),h+=4,W=de.getUint32(h),h+=4}else if(p===1){var de=new DataView(u.buffer);_=de.getUint32(h),h+=4,M=Xp(u.subarray(h)),h+=8,q=de.getUint32(h),h+=4,W=de.getUint32(h),h+=4,f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length}ee=new Uint8Array(u.subarray(h,u.byteLength));var xe={scheme_id_uri:f,value:v,timescale:_||1,presentation_time:M,presentation_time_delta:R,event_duration:q,id:W,message_data:ee};return Zp(p,xe)?xe:void 0},Qp=function(u,h,p,f){return u||u===0?u/h:f+p/h},Zp=function(u,h){var p=h.scheme_id_uri!=="\0",f=u===0&&Mu(h.presentation_time_delta)&&p,v=u===1&&Mu(h.presentation_time)&&p;return!(u>1)&&f||v},Mu=function(u){return u!==void 0||u!==null},Jp={parseEmsgBox:Kp,scaleTime:Qp},Ir;typeof window<"u"?Ir=window:typeof r<"u"?Ir=r:typeof self<"u"?Ir=self:Ir={};var Pu=Ir,Ns=Ds.toUnsigned,Or=Ds.toHexString,Tt=Ka,Un=Du,Za=Jp,em=Nu,tm=Ou,im=Qa,nm=a.getUint64,Ru,Vu,Fu,$u,Uu,Ja,qu,eo=Pu,rm=hu.parseId3Frames;Ru=function(u){var h={},p=Tt(u,["moov","trak"]);return p.reduce(function(f,v){var _,M,R,q,W;return _=Tt(v,["tkhd"])[0],!_||(M=_[0],R=M===0?12:20,q=Ns(_[R]<<24|_[R+1]<<16|_[R+2]<<8|_[R+3]),W=Tt(v,["mdia","mdhd"])[0],!W)?null:(M=W[0],R=M===0?12:20,f[q]=Ns(W[R]<<24|W[R+1]<<16|W[R+2]<<8|W[R+3]),f)},h)},Vu=function(u,h){var p;p=Tt(h,["moof","traf"]);var f=p.reduce(function(v,_){var M=Tt(_,["tfhd"])[0],R=Ns(M[4]<<24|M[5]<<16|M[6]<<8|M[7]),q=u[R]||9e4,W=Tt(_,["tfdt"])[0],ee=new DataView(W.buffer,W.byteOffset,W.byteLength),de;W[0]===1?de=nm(W.subarray(4,12)):de=ee.getUint32(4);let xe;return typeof de=="bigint"?xe=de/eo.BigInt(q):typeof de=="number"&&!isNaN(de)&&(xe=de/q),xe<Number.MAX_SAFE_INTEGER&&(xe=Number(xe)),xe<v&&(v=xe),v},1/0);return typeof f=="bigint"||isFinite(f)?f:0},Fu=function(u,h){var p=Tt(h,["moof","traf"]),f=0,v=0,_;if(p&&p.length){var M=Tt(p[0],["tfhd"])[0],R=Tt(p[0],["trun"])[0],q=Tt(p[0],["tfdt"])[0];if(M){var W=em(M);_=W.trackId}if(q){var ee=im(q);f=ee.baseMediaDecodeTime}if(R){var de=tm(R);de.samples&&de.samples.length&&(v=de.samples[0].compositionTimeOffset||0)}}var xe=u[_]||9e4;typeof f=="bigint"&&(v=eo.BigInt(v),xe=eo.BigInt(xe));var fe=(f+v)/xe;return typeof fe=="bigint"&&fe<Number.MAX_SAFE_INTEGER&&(fe=Number(fe)),fe},$u=function(u){var h=Tt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v=Tt(f,["mdia","hdlr"]),_=Tt(f,["tkhd"]);v.forEach(function(M,R){var q=Un(M.subarray(8,12)),W=_[R],ee,de,xe;q==="vide"&&(ee=new DataView(W.buffer,W.byteOffset,W.byteLength),de=ee.getUint8(0),xe=de===0?ee.getUint32(12):ee.getUint32(20),p.push(xe))})}),p},Ja=function(u){var h=u[0],p=h===0?12:20;return Ns(u[p]<<24|u[p+1]<<16|u[p+2]<<8|u[p+3])},Uu=function(u){var h=Tt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v={},_=Tt(f,["tkhd"])[0],M,R;_&&(M=new DataView(_.buffer,_.byteOffset,_.byteLength),R=M.getUint8(0),v.id=R===0?M.getUint32(12):M.getUint32(20));var q=Tt(f,["mdia","hdlr"])[0];if(q){var W=Un(q.subarray(8,12));W==="vide"?v.type="video":W==="soun"?v.type="audio":v.type=W}var ee=Tt(f,["mdia","minf","stbl","stsd"])[0];if(ee){var de=ee.subarray(8);v.codec=Un(de.subarray(4,8));var xe=Tt(de,[v.codec])[0],fe,Me;xe&&(/^[asm]vc[1-9]$/i.test(v.codec)?(fe=xe.subarray(78),Me=Un(fe.subarray(4,8)),Me==="avcC"&&fe.length>11?(v.codec+=".",v.codec+=Or(fe[9]),v.codec+=Or(fe[10]),v.codec+=Or(fe[11])):v.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(v.codec)?(fe=xe.subarray(28),Me=Un(fe.subarray(4,8)),Me==="esds"&&fe.length>20&&fe[19]!==0?(v.codec+="."+Or(fe[19]),v.codec+="."+Or(fe[20]>>>2&63).replace(/^0/,"")):v.codec="mp4a.40.2"):v.codec=v.codec.toLowerCase())}var ze=Tt(f,["mdia","mdhd"])[0];ze&&(v.timescale=Ja(ze)),p.push(v)}),p},qu=function(u,h=0){var p=Tt(u,["emsg"]);return p.map(f=>{var v=Za.parseEmsgBox(new Uint8Array(f)),_=rm(v.message_data);return{cueTime:Za.scaleTime(v.presentation_time,v.timescale,v.presentation_time_delta,h),duration:Za.scaleTime(v.event_duration,v.timescale),frames:_}})};var Br={findBox:Tt,parseType:Un,timescale:Ru,startTime:Vu,compositionStartTime:Fu,videoTrackIds:$u,tracks:Uu,getTimescaleFromMediaHeader:Ja,getEmsgID3:qu};const{parseTrun:sm}=Lu,{findBox:zu}=Br;var ju=Pu,am=function(u){var h=zu(u,["moof","traf"]),p=zu(u,["mdat"]),f=[];return p.forEach(function(v,_){var M=h[_];f.push({mdat:v,traf:M})}),f},om=function(u,h,p){var f=h,v=p.defaultSampleDuration||0,_=p.defaultSampleSize||0,M=p.trackId,R=[];return u.forEach(function(q){var W=sm(q),ee=W.samples;ee.forEach(function(de){de.duration===void 0&&(de.duration=v),de.size===void 0&&(de.size=_),de.trackId=M,de.dts=f,de.compositionTimeOffset===void 0&&(de.compositionTimeOffset=0),typeof f=="bigint"?(de.pts=f+ju.BigInt(de.compositionTimeOffset),f+=ju.BigInt(de.duration)):(de.pts=f+de.compositionTimeOffset,f+=de.duration)}),R=R.concat(ee)}),R},Hu={getMdatTrafPairs:am,parseSamples:om},lm=qt.discardEmulationPreventionBytes,um=J.CaptionStream,to=Ka,cm=Qa,dm=Nu,{getMdatTrafPairs:hm,parseSamples:fm}=Hu,pm=function(u,h){for(var p=u,f=0;f<h.length;f++){var v=h[f];if(p<v.size)return v;p-=v.size}return null},mm=function(u,h,p){var f=new DataView(u.buffer,u.byteOffset,u.byteLength),v={logs:[],seiNals:[]},_,M,R,q;for(M=0;M+4<u.length;M+=R)if(R=f.getUint32(M),M+=4,!(R<=0))switch(u[M]&31){case 6:var W=u.subarray(M+1,M+1+R),ee=pm(M,h);if(_={nalUnitType:"sei_rbsp",size:R,data:W,escapedRBSP:lm(W),trackId:p},ee)_.pts=ee.pts,_.dts=ee.dts,q=ee;else if(q)_.pts=q.pts,_.dts=q.dts;else{v.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+M+" for trackId "+p+". See mux.js#223."});break}v.seiNals.push(_);break}return v},gm=function(u,h){var p={},f=hm(u);return f.forEach(function(v){var _=v.mdat,M=v.traf,R=to(M,["tfhd"]),q=dm(R[0]),W=q.trackId,ee=to(M,["tfdt"]),de=ee.length>0?cm(ee[0]).baseMediaDecodeTime:0,xe=to(M,["trun"]),fe,Me;h===W&&xe.length>0&&(fe=fm(xe,de,q),Me=mm(_,fe,W),p[W]||(p[W]={seiNals:[],logs:[]}),p[W].seiNals=p[W].seiNals.concat(Me.seiNals),p[W].logs=p[W].logs.concat(Me.logs))}),p},vm=function(u,h,p){var f;if(h===null)return null;f=gm(u,h);var v=f[h]||{};return{seiNals:v.seiNals,logs:v.logs,timescale:p}},ym=function(){var u=!1,h,p,f,v,_,M;this.isInitialized=function(){return u},this.init=function(R){h=new um,u=!0,M=R?R.isPartial:!1,h.on("data",function(q){q.startTime=q.startPts/v,q.endTime=q.endPts/v,_.captions.push(q),_.captionStreams[q.stream]=!0}),h.on("log",function(q){_.logs.push(q)})},this.isNewInit=function(R,q){return R&&R.length===0||q&&typeof q=="object"&&Object.keys(q).length===0?!1:f!==R[0]||v!==q[f]},this.parse=function(R,q,W){var ee;if(this.isInitialized()){if(!q||!W)return null;if(this.isNewInit(q,W))f=q[0],v=W[f];else if(f===null||!v)return p.push(R),null}else return null;for(;p.length>0;){var de=p.shift();this.parse(de,q,W)}return ee=vm(R,f,v),ee&&ee.logs&&(_.logs=_.logs.concat(ee.logs)),ee===null||!ee.seiNals?_.logs.length?{logs:_.logs,captions:[],captionStreams:[]}:null:(this.pushNals(ee.seiNals),this.flushStream(),_)},this.pushNals=function(R){if(!this.isInitialized()||!R||R.length===0)return null;R.forEach(function(q){h.push(q)})},this.flushStream=function(){if(!this.isInitialized())return null;M?h.partialFlush():h.flush()},this.clearParsedCaptions=function(){_.captions=[],_.captionStreams={},_.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;h.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){p=[],f=null,v=null,_?this.clearParsedCaptions():_={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},_m=ym;const{parseTfdt:Tm}=Lu,an=Ka,{getTimescaleFromMediaHeader:bm}=Br,{parseSamples:xm,getMdatTrafPairs:Cm}=Hu;var Gu=function(){let u=9e4;this.init=function(h){const p=an(h,["moov","trak","mdia","mdhd"])[0];p&&(u=bm(p))},this.parseSegment=function(h){const p=[],f=Cm(h);let v=0;return f.forEach(function(_){const M=_.mdat,R=_.traf,q=an(R,["tfdt"])[0],W=an(R,["tfhd"])[0],ee=an(R,["trun"]);if(q&&(v=Tm(q).baseMediaDecodeTime),ee.length&&W){const de=xm(ee,v,W);let xe=0;de.forEach(function(fe){const Me="utf-8",ze=new TextDecoder(Me),Bt=M.slice(xe,xe+fe.size);if(an(Bt,["vtte"])[0]){xe+=fe.size;return}an(Bt,["vttc"]).forEach(function(Lr){const Mr=an(Lr,["payl"])[0],Pr=an(Lr,["sttg"])[0],Rr=fe.pts/u,Bs=(fe.pts+fe.duration)/u;let ut,Vr;if(Mr)try{ut=ze.decode(Mr)}catch(Di){console.error(Di)}if(Pr)try{Vr=ze.decode(Pr)}catch(Di){console.error(Di)}fe.duration&&ut&&p.push({cueText:ut,start:Rr,end:Bs,settings:Vr})}),xe+=fe.size})}}),p}},io=ge,Wu=function(u){var h=u[1]&31;return h<<=8,h|=u[2],h},Is=function(u){return!!(u[1]&64)},Os=function(u){var h=0;return(u[3]&48)>>>4>1&&(h+=u[4]+1),h},Sm=function(u,h){var p=Wu(u);return p===0?"pat":p===h?"pmt":h?"pes":null},Em=function(u){var h=Is(u),p=4+Os(u);return h&&(p+=u[p]+1),(u[p+10]&31)<<8|u[p+11]},km=function(u){var h={},p=Is(u),f=4+Os(u);if(p&&(f+=u[f]+1),!!(u[f+5]&1)){var v,_,M;v=(u[f+1]&15)<<8|u[f+2],_=3+v-4,M=(u[f+10]&15)<<8|u[f+11];for(var R=12+M;R<_;){var q=f+R;h[(u[q+1]&31)<<8|u[q+2]]=u[q],R+=((u[q+3]&15)<<8|u[q+4])+5}return h}},wm=function(u,h){var p=Wu(u),f=h[p];switch(f){case io.H264_STREAM_TYPE:return"video";case io.ADTS_STREAM_TYPE:return"audio";case io.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Dm=function(u){var h=Is(u);if(!h)return null;var p=4+Os(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},no=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}},Am=function(u){for(var h=4+Os(u),p=u.subarray(h),f=0,v=0,_=!1,M;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&&(M=no(p[v+3]&31),M==="slice_layer_without_partitioning_rbsp_idr"&&(_=!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}M=no(p[v+3]&31),M==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0),v=f-2,f+=3;break;default:f+=3;break}return p=p.subarray(v),f-=v,v=0,p&&p.byteLength>3&&(M=no(p[v+3]&31),M==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0)),_},Nm={parseType:Sm,parsePat:Em,parsePmt:km,parsePayloadUnitStartIndicator:Is,parsePesType:wm,parsePesTime:Dm,videoPacketContainsKeyFrame:Am},Yu=ge,qn=vt.handleRollover,rt={};rt.ts=Nm,rt.aac=Xa;var Sn=Oe.ONE_SECOND_IN_TS,Qt=188,Mi=71,Im=function(u,h){for(var p=0,f=Qt,v,_;f<u.byteLength;){if(u[p]===Mi&&u[f]===Mi){switch(v=u.subarray(p,f),_=rt.ts.parseType(v,h.pid),_){case"pat":h.pid=rt.ts.parsePat(v);break;case"pmt":var M=rt.ts.parsePmt(v);h.table=h.table||{},Object.keys(M).forEach(function(R){h.table[R]=M[R]});break}p+=Qt,f+=Qt;continue}p++,f++}},Xu=function(u,h,p){for(var f=0,v=Qt,_,M,R,q,W,ee=!1;v<=u.byteLength;){if(u[f]===Mi&&(u[v]===Mi||v===u.byteLength)){switch(_=u.subarray(f,v),M=rt.ts.parseType(_,h.pid),M){case"pes":R=rt.ts.parsePesType(_,h.table),q=rt.ts.parsePayloadUnitStartIndicator(_),R==="audio"&&q&&(W=rt.ts.parsePesTime(_),W&&(W.type="audio",p.audio.push(W),ee=!0));break}if(ee)break;f+=Qt,v+=Qt;continue}f++,v++}for(v=u.byteLength,f=v-Qt,ee=!1;f>=0;){if(u[f]===Mi&&(u[v]===Mi||v===u.byteLength)){switch(_=u.subarray(f,v),M=rt.ts.parseType(_,h.pid),M){case"pes":R=rt.ts.parsePesType(_,h.table),q=rt.ts.parsePayloadUnitStartIndicator(_),R==="audio"&&q&&(W=rt.ts.parsePesTime(_),W&&(W.type="audio",p.audio.push(W),ee=!0));break}if(ee)break;f-=Qt,v-=Qt;continue}f--,v--}},Om=function(u,h,p){for(var f=0,v=Qt,_,M,R,q,W,ee,de,xe,fe=!1,Me={data:[],size:0};v<u.byteLength;){if(u[f]===Mi&&u[v]===Mi){switch(_=u.subarray(f,v),M=rt.ts.parseType(_,h.pid),M){case"pes":if(R=rt.ts.parsePesType(_,h.table),q=rt.ts.parsePayloadUnitStartIndicator(_),R==="video"&&(q&&!fe&&(W=rt.ts.parsePesTime(_),W&&(W.type="video",p.video.push(W),fe=!0)),!p.firstKeyFrame)){if(q&&Me.size!==0){for(ee=new Uint8Array(Me.size),de=0;Me.data.length;)xe=Me.data.shift(),ee.set(xe,de),de+=xe.byteLength;if(rt.ts.videoPacketContainsKeyFrame(ee)){var ze=rt.ts.parsePesTime(ee);ze?(p.firstKeyFrame=ze,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.")}Me.size=0}Me.data.push(_),Me.size+=_.byteLength}break}if(fe&&p.firstKeyFrame)break;f+=Qt,v+=Qt;continue}f++,v++}for(v=u.byteLength,f=v-Qt,fe=!1;f>=0;){if(u[f]===Mi&&u[v]===Mi){switch(_=u.subarray(f,v),M=rt.ts.parseType(_,h.pid),M){case"pes":R=rt.ts.parsePesType(_,h.table),q=rt.ts.parsePayloadUnitStartIndicator(_),R==="video"&&q&&(W=rt.ts.parsePesTime(_),W&&(W.type="video",p.video.push(W),fe=!0));break}if(fe)break;f-=Qt,v-=Qt;continue}f--,v--}},Bm=function(u,h){if(u.audio&&u.audio.length){var p=h;(typeof p>"u"||isNaN(p))&&(p=u.audio[0].dts),u.audio.forEach(function(_){_.dts=qn(_.dts,p),_.pts=qn(_.pts,p),_.dtsTime=_.dts/Sn,_.ptsTime=_.pts/Sn})}if(u.video&&u.video.length){var f=h;if((typeof f>"u"||isNaN(f))&&(f=u.video[0].dts),u.video.forEach(function(_){_.dts=qn(_.dts,f),_.pts=qn(_.pts,f),_.dtsTime=_.dts/Sn,_.ptsTime=_.pts/Sn}),u.firstKeyFrame){var v=u.firstKeyFrame;v.dts=qn(v.dts,f),v.pts=qn(v.pts,f),v.dtsTime=v.dts/Sn,v.ptsTime=v.pts/Sn}}},Lm=function(u){for(var h=!1,p=0,f=null,v=null,_=0,M=0,R;u.length-M>=3;){var q=rt.aac.parseType(u,M);switch(q){case"timed-metadata":if(u.length-M<10){h=!0;break}if(_=rt.aac.parseId3TagSize(u,M),_>u.length){h=!0;break}v===null&&(R=u.subarray(M,M+_),v=rt.aac.parseAacTimestamp(R)),M+=_;break;case"audio":if(u.length-M<7){h=!0;break}if(_=rt.aac.parseAdtsSize(u,M),_>u.length){h=!0;break}f===null&&(R=u.subarray(M,M+_),f=rt.aac.parseSampleRate(R)),p++,M+=_;break;default:M++;break}if(h)return null}if(f===null||v===null)return null;var W=Sn/f,ee={audio:[{type:"audio",dts:v,pts:v},{type:"audio",dts:v+p*1024*W,pts:v+p*1024*W}]};return ee},Mm=function(u){var h={pid:null,table:null},p={};Im(u,h);for(var f in h.table)if(h.table.hasOwnProperty(f)){var v=h.table[f];switch(v){case Yu.H264_STREAM_TYPE:p.video=[],Om(u,h,p),p.video.length===0&&delete p.video;break;case Yu.ADTS_STREAM_TYPE:p.audio=[],Xu(u,h,p),p.audio.length===0&&delete p.audio;break}}return p},Pm=function(u,h){var p=rt.aac.isLikelyAacData(u),f;return p?f=Lm(u):f=Mm(u),!f||!f.audio&&!f.video?null:(Bm(f,h),f)},Rm={inspect:Pm,parseAudioPes_:Xu};const Vm=function(u,h){h.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])}),h.on("done",function(p){u.postMessage({action:"done"})}),h.on("gopInfo",function(p){u.postMessage({action:"gopInfo",gopInfo:p})}),h.on("videoSegmentTimingInfo",function(p){const f={start:{decode:Oe.videoTsToSeconds(p.start.dts),presentation:Oe.videoTsToSeconds(p.start.pts)},end:{decode:Oe.videoTsToSeconds(p.end.dts),presentation:Oe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Oe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Oe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:f})}),h.on("audioSegmentTimingInfo",function(p){const f={start:{decode:Oe.videoTsToSeconds(p.start.dts),presentation:Oe.videoTsToSeconds(p.start.pts)},end:{decode:Oe.videoTsToSeconds(p.end.dts),presentation:Oe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Oe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Oe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:f})}),h.on("id3Frame",function(p){u.postMessage({action:"id3Frame",id3Frame:p})}),h.on("caption",function(p){u.postMessage({action:"caption",caption:p})}),h.on("trackinfo",function(p){u.postMessage({action:"trackinfo",trackInfo:p})}),h.on("audioTimingInfo",function(p){u.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Oe.videoTsToSeconds(p.start),end:Oe.videoTsToSeconds(p.end)}})}),h.on("videoTimingInfo",function(p){u.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Oe.videoTsToSeconds(p.start),end:Oe.videoTsToSeconds(p.end)}})}),h.on("log",function(p){u.postMessage({action:"log",log:p})})};class Ku{constructor(h,p){this.options=p||{},this.self=h,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Lp.Transmuxer(this.options),Vm(this.self,this.transmuxer)}pushMp4Captions(h){this.captionParser||(this.captionParser=new _m,this.captionParser.init());const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.captionParser.parse(p,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:f&&f.captions||[],logs:f&&f.logs||[],data:p.buffer},[p.buffer])}initMp4WebVttParser(h){this.webVttParser||(this.webVttParser=new Gu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.webVttParser.init(p)}getMp4WebVttText(h){this.webVttParser||(this.webVttParser=new Gu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.webVttParser.parseSegment(p);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:f||[],data:p.buffer},[p.buffer])}probeMp4StartTime({timescales:h,data:p}){const f=Br.startTime(h,p);this.self.postMessage({action:"probeMp4StartTime",startTime:f,data:p},[p.buffer])}probeMp4Tracks({data:h}){const p=Br.tracks(h);this.self.postMessage({action:"probeMp4Tracks",tracks:p,data:h},[h.buffer])}probeEmsgID3({data:h,offset:p}){const f=Br.getEmsgID3(h,p);this.self.postMessage({action:"probeEmsgID3",id3Frames:f,emsgData:h},[h.buffer])}probeTs({data:h,baseStartTime:p}){const f=typeof p=="number"&&!isNaN(p)?p*Oe.ONE_SECOND_IN_TS:void 0,v=Rm.inspect(h,f);let _=null;v&&(_={hasVideo:v.video&&v.video.length===2||!1,hasAudio:v.audio&&v.audio.length===2||!1},_.hasVideo&&(_.videoStart=v.video[0].ptsTime),_.hasAudio&&(_.audioStart=v.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:_,data:h},[h.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(h){const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(p)}reset(){this.transmuxer.reset()}setTimestampOffset(h){const p=h.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Oe.secondsToVideoTs(p)))}setAudioAppendStart(h){this.transmuxer.setAudioAppendStart(Math.ceil(Oe.secondsToVideoTs(h.appendStart)))}setRemux(h){this.transmuxer.setRemux(h.remux)}flush(h){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(h){this.transmuxer.alignGopsWith(h.gopsToAlignWith.slice())}}self.onmessage=function(u){if(u.data.action==="init"&&u.data.options){this.messageHandlers=new Ku(self,u.data.options);return}this.messageHandlers||(this.messageHandlers=new Ku(self)),u.data&&u.data.action&&u.data.action!=="init"&&this.messageHandlers[u.data.action]&&this.messageHandlers[u.data.action](u.data)}}));var p4=wf(f4);const m4=(r,e,t)=>{const{type:n,initSegment:s,captions:a,captionStreams:o,metadata:l,videoFrameDtsTime:c,videoFramePtsTime:d}=r.data.segment;e.buffer.push({captions:a,captionStreams:o,metadata:l});const g=r.data.segment.boxes||{data:r.data.segment.data},m={type:n,data:new Uint8Array(g.data,g.data.byteOffset,g.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};typeof c<"u"&&(m.videoFrameDtsTime=c),typeof d<"u"&&(m.videoFramePtsTime=d),t(m)},g4=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},v4=(r,e)=>{e.gopInfo=r.data.gopInfo},Nf=r=>{const{transmuxer:e,bytes:t,audioAppendStart:n,gopsToAlignWith:s,remux:a,onData:o,onTrackInfo:l,onAudioTimingInfo:c,onVideoTimingInfo:d,onVideoSegmentTimingInfo:g,onAudioSegmentTimingInfo:m,onId3:S,onCaptions:b,onDone:T,onEndedTimeline:y,onTransmuxerLog:E,isEndOfTimeline:O,segment:D,triggerSegmentEventFn:I}=r,H={buffer:[]};let $=O;const z=j=>{e.currentTransmux===r&&(j.data.action==="data"&&m4(j,H,o),j.data.action==="trackinfo"&&l(j.data.trackInfo),j.data.action==="gopInfo"&&v4(j,H),j.data.action==="audioTimingInfo"&&c(j.data.audioTimingInfo),j.data.action==="videoTimingInfo"&&d(j.data.videoTimingInfo),j.data.action==="videoSegmentTimingInfo"&&g(j.data.videoSegmentTimingInfo),j.data.action==="audioSegmentTimingInfo"&&m(j.data.audioSegmentTimingInfo),j.data.action==="id3Frame"&&S([j.data.id3Frame],j.data.id3Frame.dispatchType),j.data.action==="caption"&&b(j.data.caption),j.data.action==="endedtimeline"&&($=!1,y()),j.data.action==="log"&&E(j.data.log),j.data.type==="transmuxed"&&($||(e.onmessage=null,g4({transmuxedData:H,callback:T}),If(e))))},N=()=>{const j={message:"Received an error message from the transmuxer worker",metadata:{errorType:ae.Error.StreamingFailedToTransmuxSegment,segmentInfo:An({segment:D})}};T(null,j)};if(e.onmessage=z,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 j=t instanceof ArrayBuffer?t:t.buffer,x=t instanceof ArrayBuffer?0:t.byteOffset;I({type:"segmenttransmuxingstart",segment:D}),e.postMessage({action:"push",data:j,byteOffset:x,byteLength:t.byteLength},[j])}O&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},If=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():Nf(r.currentTransmux))},Ad=(r,e)=>{r.postMessage({action:e}),If(r)},Of=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,Ad(e,r);return}e.transmuxQueue.push(Ad.bind(null,e,r))},y4=r=>{Of("reset",r)},_4=r=>{Of("endTimeline",r)},Bf=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,Nf(r);return}r.transmuxer.transmuxQueue.push(r)},T4=r=>{const e=new p4;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 Ho={reset:y4,endTimeline:_4,transmux:Bf,createTransmuxer:T4};const er=function(r){const e=r.transmuxer,t=r.endAction||r.action,n=r.callback,s=bt({},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)},qi={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Lf="wvtt",_l=r=>{r.forEach(e=>{e.abort()})},b4=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),x4=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},uu=(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:qi.TIMEOUT,xhr:e,metadata:n}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:qi.ABORTED,xhr:e,metadata:n}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:qi.FAILURE,xhr:e,metadata:n}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:qi.FAILURE,xhr:e,metadata:n}:null},Nd=(r,e,t,n)=>(s,a)=>{const o=a.response,l=uu(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:qi.FAILURE,xhr:a},r);const c=new DataView(o),d=new Uint32Array([c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12)]);for(let m=0;m<e.length;m++)e[m].bytes=d;const g={uri:a.uri};return n({type:"segmentkeyloadcomplete",segment:r,keyInfo:g}),t(null,r)},C4=(r,e)=>{e===Lf&&r.transmuxer.postMessage({action:"initMp4WebVttParser",data:r.map.bytes})},S4=(r,e,t)=>{e===Lf&&er({action:"getMp4WebVttText",data:r.bytes,transmuxer:r.transmuxer,callback:({data:n,mp4VttCues:s})=>{r.bytes=n,t(null,r,{mp4VttCues:s})}})},Mf=(r,e)=>{const t=Ol(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:qi.FAILURE,metadata:{mediaType:s}})}er({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:({tracks:n,data:s})=>(r.map.bytes=s,n.forEach(function(a){r.map.tracks=r.map.tracks||{},!r.map.tracks[a.type]&&(r.map.tracks[a.type]=a,typeof a.id=="number"&&a.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[a.id]=a.timescale),a.type==="text"&&C4(r,a.codec))}),e(null))})},E4=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:t})=>(n,s)=>{const a=uu(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,Mf(r,function(l){if(l)return l.xhr=s,l.status=s.status,e(l,r);e(null,r)})},k4=({segment:r,finishProcessingFn:e,responseType:t,triggerSegmentEventFn:n})=>(s,a)=>{const o=uu(s,a);if(o)return e(o,r);n({type:"segmentloaded",segment:r});const l=t==="arraybuffer"||!a.responseText?a.response:d4(a.responseText.substring(r.lastReachedChar||0));return r.stats=b4(a),r.key?r.encryptedBytes=new Uint8Array(l):r.bytes=new Uint8Array(l),e(null,r)},w4=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:b})=>{const T=r.map&&r.map.tracks||{},y=!!(T.audio&&T.video);let E=n.bind(null,r,"audio","start");const O=n.bind(null,r,"audio","end");let D=n.bind(null,r,"video","start");const I=n.bind(null,r,"video","end"),H=()=>Bf({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:y,onData:$=>{$.type=$.type==="combined"?"video":$.type,g(r,$)},onTrackInfo:$=>{t&&(y&&($.isMuxed=!0),t(r,$))},onAudioTimingInfo:$=>{E&&typeof $.start<"u"&&(E($.start),E=null),O&&typeof $.end<"u"&&O($.end)},onVideoTimingInfo:$=>{D&&typeof $.start<"u"&&(D($.start),D=null),I&&typeof $.end<"u"&&I($.end)},onVideoSegmentTimingInfo:$=>{const z={pts:{start:$.start.presentation,end:$.end.presentation},dts:{start:$.start.decode,end:$.end.decode}};b({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:z}),s($)},onAudioSegmentTimingInfo:$=>{const z={pts:{start:$.start.pts,end:$.end.pts},dts:{start:$.start.dts,end:$.end.dts}};b({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:z}),a($)},onId3:($,z)=>{o(r,$,z)},onCaptions:$=>{l(r,[$])},isEndOfTimeline:c,onEndedTimeline:()=>{d()},onTransmuxerLog:S,onDone:($,z)=>{m&&($.type=$.type==="combined"?"video":$.type,b({type:"segmenttransmuxingcomplete",segment:r}),m(z,r,$))},segment:r,triggerSegmentEventFn:b});er({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:$=>{r.bytes=e=$.data;const z=$.result;z&&(t(r,{hasAudio:z.hasAudio,hasVideo:z.hasVideo,isMuxed:y}),t=null),H()}})},Pf=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:b})=>{let T=new Uint8Array(e);if(Y3(T)){r.isFmp4=!0;const{tracks:y}=r.map;if(y.text&&(!y.audio||!y.video)){g(r,{data:T,type:"text"}),S4(r,y.text.codec,m);return}const O={isFmp4:!0,hasVideo:!!y.video,hasAudio:!!y.audio};y.audio&&y.audio.codec&&y.audio.codec!=="enca"&&(O.audioCodec=y.audio.codec),y.video&&y.video.codec&&y.video.codec!=="encv"&&(O.videoCodec=y.video.codec),y.video&&y.audio&&(O.isMuxed=!0),t(r,O);const D=(I,H)=>{g(r,{data:T,type:O.hasAudio&&!O.isMuxed?"audio":"video"}),H&&H.length&&o(r,H),I&&I.length&&l(r,I),m(null,r,{})};er({action:"probeMp4StartTime",timescales:r.map.timescales,data:T,transmuxer:r.transmuxer,callback:({data:I,startTime:H})=>{e=I.buffer,r.bytes=T=I,O.hasAudio&&!O.isMuxed&&n(r,"audio","start",H),O.hasVideo&&n(r,"video","start",H),er({action:"probeEmsgID3",data:T,transmuxer:r.transmuxer,offset:H,callback:({emsgData:$,id3Frames:z})=>{if(e=$.buffer,r.bytes=T=$,!y.video||!$.byteLength||!r.transmuxer){D(void 0,z);return}er({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:T,timescales:r.map.timescales,trackIds:[y.video.id],callback:N=>{e=N.data.buffer,r.bytes=T=N.data,N.logs.forEach(function(j){S(nt(j,{stream:"mp4CaptionParser"}))}),D(N.captions,z)}})}})}});return}if(!r.transmuxer){m(null,r,{});return}if(typeof r.container>"u"&&(r.container=Ol(T)),r.container!=="ts"&&r.container!=="aac"){t(r,{hasAudio:!1,hasVideo:!1}),m(null,r,{});return}w4({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:b})},Rf=function({id:r,key:e,encryptedBytes:t,decryptionWorker:n,segment:s,doneFn:a},o){const l=d=>{if(d.data.source===r){n.removeEventListener("message",l);const g=d.data.decrypted;o(new Uint8Array(g.bytes,g.byteOffset,g.byteLength))}};n.onerror=()=>{const d="An error occurred in the decryption worker",g=An({segment:s}),m={message:d,metadata:{error:new Error(d),errorType:ae.Error.StreamingFailedToDecryptSegment,segmentInfo:g,keyInfo:{uri:s.key.resolvedUri||s.map.key.resolvedUri}}};a(m,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])},D4=({decryptionWorker:r,segment:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:b})=>{b({type:"segmentdecryptionstart"}),Rf({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:m},T=>{e.bytes=T,b({type:"segmentdecryptioncomplete",segment:e}),Pf({segment:e,bytes:e.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:b})})},A4=({activeXhrs:r,decryptionWorker:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:b})=>{let T=0,y=!1;return(E,O)=>{if(!y){if(E)return y=!0,_l(r),m(E,O);if(T+=1,T===r.length){const D=function(){if(O.encryptedBytes)return D4({decryptionWorker:e,segment:O,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:b});Pf({segment:O,bytes:O.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:b})};if(O.endOfAllRequests=Date.now(),O.map&&O.map.encryptedBytes&&!O.map.bytes)return b({type:"segmentdecryptionstart",segment:O}),Rf({decryptionWorker:e,id:O.requestId+"-init",encryptedBytes:O.map.encryptedBytes,key:O.map.key,segment:O,doneFn:m},I=>{O.map.bytes=I,b({type:"segmentdecryptioncomplete",segment:O}),Mf(O,H=>{if(H)return _l(r),m(H,O);D()})});D()}}}},N4=({loadendState:r,abortFn:e})=>t=>{t.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},I4=({segment:r,progressFn:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g})=>m=>{if(!m.target.aborted)return r.stats=nt(r.stats,x4(m)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(m,r)},O4=({xhr:r,xhrOptions:e,decryptionWorker:t,segment:n,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:g,captionsFn:m,isEndOfTimeline:S,endedTimelineFn:b,dataFn:T,doneFn:y,onTransmuxerLog:E,triggerSegmentEventFn:O})=>{const D=[],I=A4({activeXhrs:D,decryptionWorker:t,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:g,captionsFn:m,isEndOfTimeline:S,endedTimelineFn:b,dataFn:T,doneFn:y,onTransmuxerLog:E,triggerSegmentEventFn:O});if(n.key&&!n.key.bytes){const j=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&j.push(n.map.key);const x=nt(e,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),w=Nd(n,j,I,O),P={uri:n.key.resolvedUri};O({type:"segmentkeyloadstart",segment:n,keyInfo:P});const K=r(x,w);D.push(K)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const K=nt(e,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),L=Nd(n,[n.map.key],I,O),U={uri:n.map.key.resolvedUri};O({type:"segmentkeyloadstart",segment:n,keyInfo:U});const V=r(K,L);D.push(V)}const x=nt(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:vl(n.map),requestType:"segment-media-initialization"}),w=E4({segment:n,finishProcessingFn:I,triggerSegmentEventFn:O});O({type:"segmentloadstart",segment:n});const P=r(x,w);D.push(P)}const H=nt(e,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:vl(n),requestType:"segment"}),$=k4({segment:n,finishProcessingFn:I,responseType:H.responseType,triggerSegmentEventFn:O});O({type:"segmentloadstart",segment:n});const z=r(H,$);z.addEventListener("progress",I4({segment:n,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:g,captionsFn:m,isEndOfTimeline:S,endedTimelineFn:b,dataFn:T})),D.push(z);const N={};return D.forEach(j=>{j.addEventListener("loadend",N4({loadendState:N,abortFn:s}))}),()=>_l(D)},qs=Ci("PlaylistSelector"),Id=function(r){if(!r||!r.playlist)return;const e=r.playlist;return JSON.stringify({id:e.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:e.attributes&&e.attributes.CODECS||""})},tr=function(r,e){if(!r)return"";const t=G.getComputedStyle(r);return t?t[e]:""},ir=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})},cu=function(r,e){let t,n;return r.attributes.BANDWIDTH&&(t=r.attributes.BANDWIDTH),t=t||G.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||G.Number.MAX_VALUE,t-n},B4=function(r,e){let t,n;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(t=r.attributes.RESOLUTION.width),t=t||G.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||G.Number.MAX_VALUE,t===n&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:t-n};let Vf=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 d=e.playlists;oi.isAudioOnly(e)&&(d=l.getAudioTrackPlaylists_(),c.audioOnly=!0);let g=d.map(N=>{let j;const x=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.width,w=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.height;return j=N.attributes&&N.attributes.BANDWIDTH,j=j||G.Number.MAX_VALUE,{bandwidth:j,width:x,height:w,playlist:N}});ir(g,(N,j)=>N.bandwidth-j.bandwidth),g=g.filter(N=>!oi.isIncompatible(N.playlist));let m=g.filter(N=>oi.isEnabled(N.playlist));m.length||(m=g.filter(N=>!oi.isDisabled(N.playlist)));const S=m.filter(N=>N.bandwidth*Lt.BANDWIDTH_VARIANCE<t);let b=S[S.length-1];const T=S.filter(N=>N.bandwidth===b.bandwidth)[0];if(o===!1){const N=T||m[0]||g[0];if(N&&N.playlist){let j="sortedPlaylistReps";return T&&(j="bandwidthBestRep"),m[0]&&(j="enabledPlaylistReps"),qs(`choosing ${Id(N)} using ${j} with options`,c),N.playlist}return qs("could not choose a playlist with options",c),null}const y=S.filter(N=>N.width&&N.height);ir(y,(N,j)=>N.width-j.width);const E=y.filter(N=>N.width===n&&N.height===s);b=E[E.length-1];const O=E.filter(N=>N.bandwidth===b.bandwidth)[0];let D,I,H;O||(D=y.filter(N=>a==="cover"?N.width>n&&N.height>s:N.width>n||N.height>s),I=D.filter(N=>N.width===D[0].width&&N.height===D[0].height),b=I[I.length-1],H=I.filter(N=>N.bandwidth===b.bandwidth)[0]);let $;if(l.leastPixelDiffSelector){const N=y.map(j=>(j.pixelDiff=Math.abs(j.width-n)+Math.abs(j.height-s),j));ir(N,(j,x)=>j.pixelDiff===x.pixelDiff?x.bandwidth-j.bandwidth:j.pixelDiff-x.pixelDiff),$=N[0]}const z=$||H||O||T||m[0]||g[0];if(z&&z.playlist){let N="sortedPlaylistReps";return $?N="leastPixelDiffRep":H?N="resolutionPlusOneRep":O?N="resolutionBestRep":T?N="bandwidthBestRep":m[0]&&(N="enabledPlaylistReps"),qs(`choosing ${Id(z)} using ${N} with options`,c),z.playlist}return qs("could not choose a playlist with options",c),null};const Od=function(){let r=this.useDevicePixelRatio&&G.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),Vf({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},L4=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&&G.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),Vf({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},M4=function(r){const{main:e,currentTime:t,bandwidth:n,duration:s,segmentDuration:a,timeUntilRebuffer:o,currentTimeline:l,syncController:c}=r,d=e.playlists.filter(T=>!oi.isIncompatible(T));let g=d.filter(oi.isEnabled);g.length||(g=d.filter(T=>!oi.isDisabled(T)));const S=g.filter(oi.hasAttribute.bind(null,"BANDWIDTH")).map(T=>{const E=c.getSyncPoint(T,s,l,t)?1:2,D=oi.estimateSegmentRequestTime(a,n,T)*E-o;return{playlist:T,rebufferingImpact:D}}),b=S.filter(T=>T.rebufferingImpact<=0);return ir(b,(T,y)=>cu(y.playlist,T.playlist)),b.length?b[0]:(ir(S,(T,y)=>T.rebufferingImpact-y.rebufferingImpact),S[0]||null)},P4=function(){const r=this.playlists.main.playlists.filter(oi.isEnabled);return ir(r,(t,n)=>cu(t,n)),r.filter(t=>!!es(this.playlists.main,t).video)[0]||null},R4=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 Ff(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const V4=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 d=a[n];d&&(o=d.label,l=d.language,c=d.default),r[t]=e.addRemoteTextTrack({kind:"captions",id:n,default:c,label:o,language:l},!1).track}}},F4=function({inbandTextTracks:r,captionArray:e,timestampOffset:t}){if(!e)return;const n=G.WebKitDataCue||G.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))})},$4=function(r){Object.defineProperties(r.frame,{id:{get(){return ae.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return ae.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return ae.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},U4=({inbandTextTracks:r,metadataArray:e,timestampOffset:t,videoDuration:n})=>{if(!e)return;const s=G.WebKitDataCue||G.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(g=>{const m=g.cueTime+t;typeof m!="number"||G.isNaN(m)||m<0||!(m<1/0)||!g.frames||!g.frames.length||g.frames.forEach(S=>{const b=new s(m,m,S.value||S.url||S.data||"");b.frame=S,b.value=S,$4(b),a.addCue(b)})}),!a.cues||!a.cues.length))return;const o=a.cues,l=[];for(let g=0;g<o.length;g++)o[g]&&l.push(o[g]);const c=l.reduce((g,m)=>{const S=g[m.startTime]||[];return S.push(m),g[m.startTime]=S,g},{}),d=Object.keys(c).sort((g,m)=>Number(g)-Number(m));d.forEach((g,m)=>{const S=c[g],b=isFinite(n)?n:g,T=Number(d[m+1])||b;S.forEach(y=>{y.endTime=T})})},q4={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"},z4=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),j4=({inbandTextTracks:r,dateRanges:e})=>{const t=r.metadataTrack_;if(!t)return;const n=G.WebKitDataCue||G.VTTCue;e.forEach(s=>{for(const a of Object.keys(s)){if(z4.has(a))continue;const o=new n(s.startTime,s.endTime,"");o.id=s.id,o.type="com.apple.quicktime.HLS",o.value={key:q4[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()})},Bd=(r,e,t)=>{r.metadataTrack_||(r.metadataTrack_=t.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ae.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},Yr=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)},H4=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}},G4=(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)},W4=(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)},Y4=(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},X4=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},K4=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]},jr=1,Q4=500,Ld=r=>typeof r=="number"&&isFinite(r),zs=1/60,Z4=(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,J4=(r,e,t)=>{let n=e-Lt.BACK_BUFFER_LENGTH;r.length&&(n=Math.max(n,r.start(0)));const s=e-t;return Math.min(s,n)},Hn=r=>{const{startOfSegment:e,duration:t,segment:n,part:s,playlist:{mediaSequence:a,id:o,segments:l=[]},mediaIndex:c,partIndex:d,timeline:g}=r,m=l.length-1;let S="mediaIndex/partIndex increment";r.getMediaInfoForTime?S=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(S="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(S+=` with independent ${r.independent}`);const b=typeof d=="number",T=r.segment.uri?"segment":"pre-segment",y=b?nf({preloadSegment:n})-1:0;return`${T} [${a+c}/${a+m}]`+(b?` part [${d}/${y}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(b?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${e}] duration [${t}] timeline [${g}] selected by [${S}] playlist [${o}]`},Md=r=>`${r}TimingInfo`,e8=({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,Tl=({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},t8=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)},i8=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),t=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&t&&e.to<t.to},cn=r=>{const e=r.pendingSegment_;if(!e)return;if(Tl({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&t8(r.timelineChangeController_)){if(i8(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}r.timelineChangeController_.trigger("fixBadTimelineChange")}},n8=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=G.BigInt(a)-G.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},Pd=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+$i:!1,r8=(r,e)=>{if(e!=="hls")return null;const t=n8({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!t)return null;const n=r.playlist.targetDuration,s=Pd({segmentDuration:t,maxDuration:n*2}),a=Pd({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 bl extends ae.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_=Ci(`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_():cn(this)}),this.sourceUpdater_.on("codecschange",n=>{this.trigger(bt({type:"codecschange"},n))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",n=>{this.trigger(bt({type:"timelinechange"},n)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():cn(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Ho.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_&&G.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,G.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_&&Ho.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Pt();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=ya(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=xf(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(h),h.startPts=u},je.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)},je.prototype.displayWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=1);return u},je.prototype.hideWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=0);return u},je.prototype.toggleWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible^=1);return u},je.prototype.clearWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].clearText();return u},je.prototype.deleteWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].reset();return u},je.prototype.setPenAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.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},je.prototype.setPenColor=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.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},je.prototype.setPenLocation=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penLoc;return h.currentWindow.pendingNewLine=!0,f=p[++u],v.row=f&15,f=p[++u],v.column=f&63,u},je.prototype.reset=function(u,h){var p=this.getPts(u);return this.flushDisplayed(p,h),this.initService(h.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},Li=function(u){return u===null?"":(u=Si[u]||u,String.fromCharCode(u))},xn=14,fs=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Yi=function(){for(var u=[],h=xn+1;h--;)u.push({text:"",indent:0,offset:0});return u},be=function(u,h){be.prototype.init.call(this),this.field_=u||0,this.dataChannel_=h||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(p){var f,v,_,L,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),_=f>>>8,L=f&255,f!==this.PADDING_)if(f===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(f===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(p.pts),this.flushDisplayed(p.pts),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_=Yi();else if(f===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Yi();else if(f===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(p.pts),this.displayed_=Yi()),this.mode_="paintOn",this.startPts_=p.pts;else if(this.isSpecialCharacter(_,L))_=(_&3)<<8,V=Li(_|L),this[this.mode_](p.pts,V),this.column_++;else if(this.isExtCharacter(_,L))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),_=(_&3)<<8,V=Li(_|L),this[this.mode_](p.pts,V),this.column_++;else if(this.isMidRowCode(_,L))this.clearFormatting(p.pts),this[this.mode_](p.pts," "),this.column_++,(L&14)===14&&this.addFormatting(p.pts,["i"]),(L&1)===1&&this.addFormatting(p.pts,["u"]);else if(this.isOffsetControlCode(_,L)){const W=L&3;this.nonDisplayed_[this.row_].offset=W,this.column_+=W}else if(this.isPAC(_,L)){var q=fs.indexOf(f&7968);if(this.mode_==="rollUp"&&(q-this.rollUpRows_+1<0&&(q=this.rollUpRows_-1),this.setRollUp(p.pts,q)),q!==this.row_&&q>=0&&q<=14&&(this.clearFormatting(p.pts),this.row_=q),L&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(p.pts,["u"]),(f&16)===16){const W=(f&14)>>1;this.column_=W*4,this.nonDisplayed_[this.row_].indent+=W}this.isColorPAC(L)&&(L&14)===14&&this.addFormatting(p.pts,["i"])}else this.isNormalChar(_)&&(L===0&&(L=null),V=Li(_),V+=Li(L),this[this.mode_](p.pts,V),this.column_+=V.length)}};be.prototype=new Vt,be.prototype.flushDisplayed=function(u){const h=f=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."})},p=[];this.displayed_.forEach((f,v)=>{if(f&&f.text&&f.text.length){try{f.text=f.text.trim()}catch{h(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&&h(v)}),p.length&&this.trigger("data",{startPts:this.startPts_,endPts:u,content:p,stream:this.name_})},be.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Yi(),this.nonDisplayed_=Yi(),this.lastControlCode_=null,this.column_=0,this.row_=xn,this.rollUpRows_=2,this.formatting_=[]},be.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},be.prototype.isSpecialCharacter=function(u,h){return u===this.EXT_&&h>=48&&h<=63},be.prototype.isExtCharacter=function(u,h){return(u===this.EXT_+1||u===this.EXT_+2)&&h>=32&&h<=63},be.prototype.isMidRowCode=function(u,h){return u===this.EXT_&&h>=32&&h<=47},be.prototype.isOffsetControlCode=function(u,h){return u===this.OFFSET_&&h>=33&&h<=35},be.prototype.isPAC=function(u,h){return u>=this.BASE_&&u<this.BASE_+8&&h>=64&&h<=127},be.prototype.isColorPAC=function(u){return u>=64&&u<=79||u>=96&&u<=127},be.prototype.isNormalChar=function(u){return u>=32&&u<=127},be.prototype.setRollUp=function(u,h){if(this.mode_!=="rollUp"&&(this.row_=xn,this.mode_="rollUp",this.flushDisplayed(u),this.nonDisplayed_=Yi(),this.displayed_=Yi()),h!==void 0&&h!==this.row_)for(var p=0;p<this.rollUpRows_;p++)this.displayed_[h-p]=this.displayed_[this.row_-p],this.displayed_[this.row_-p]={text:"",indent:0,offset:0};h===void 0&&(h=this.row_),this.topRow_=h-this.rollUpRows_+1},be.prototype.addFormatting=function(u,h){this.formatting_=this.formatting_.concat(h);var p=h.reduce(function(f,v){return f+"<"+v+">"},"");this[this.mode_](u,p)},be.prototype.clearFormatting=function(u){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(p,f){return p+"</"+f+">"},"");this.formatting_=[],this[this.mode_](u,h)}},be.prototype.popOn=function(u,h){var p=this.nonDisplayed_[this.row_].text;p+=h,this.nonDisplayed_[this.row_].text=p},be.prototype.rollUp=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p},be.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}},be.prototype.paintOn=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p};var J={CaptionStream:Ye,Cea608Stream:be,Cea708Stream:je},ge={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ce=t,Ze=8589934592,zt=4294967296,Dt="shared",_t=function(u,h){var p=1;for(u>h&&(p=-1);Math.abs(h-u)>zt;)u+=p*Ze;return u},Ei=function(u){var h,p;Ei.prototype.init.call(this),this.type_=u||Dt,this.push=function(f){if(f.type==="metadata"){this.trigger("data",f);return}this.type_!==Dt&&f.type!==this.type_||(p===void 0&&(p=f.dts),f.dts=_t(f.dts,p),f.pts=_t(f.pts,p),h=f.dts,this.trigger("data",f))},this.flush=function(){p=h,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){p=void 0,h=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ei.prototype=new Ce;var vt={TimestampRolloverStream:Ei,handleRollover:_t},br=(u,h,p)=>{if(!u)return-1;for(var f=p;f<u.length;f++)if(u[f]===h)return f;return-1},ps={typedArrayIndexOf:br},xr=ps.typedArrayIndexOf,ms={Utf8:3},du=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},Cr=function(u,h,p){return decodeURIComponent(du(u,h,p))},Sr=function(u,h,p){return unescape(du(u,h,p))},Er=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},kr={APIC:function(u){var h=1,p,f,v="-->";u.data[0]===ms.Utf8&&(p=xr(u.data,0,h),!(p<0)&&(u.mimeType=Sr(u.data,h,p),h=p+1,u.pictureType=u.data[h],h++,f=xr(u.data,0,h),!(f<0)&&(u.description=Cr(u.data,h,f),h=f+1,u.mimeType===v?u.url=Sr(u.data,h,u.data.length):u.pictureData=u.data.subarray(h,u.data.length))))},"T*":function(u){u.data[0]===ms.Utf8&&(u.value=Cr(u.data,1,u.data.length).replace(/\0*$/,""),u.values=u.value.split("\0"))},TXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=xr(u.data,0,1),h!==-1&&(u.description=Cr(u.data,1,h),u.value=Cr(u.data,h+1,u.data.length).replace(/\0*$/,""),u.data=u.value))},"W*":function(u){u.url=Sr(u.data,0,u.data.length).replace(/\0.*$/,"")},WXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=xr(u.data,0,1),h!==-1&&(u.description=Cr(u.data,1,h),u.url=Sr(u.data,h+1,u.data.length).replace(/\0.*$/,"")))},PRIV:function(u){var h;for(h=0;h<u.data.length;h++)if(u.data[h]===0){u.owner=Sr(u.data,0,h);break}u.privateData=u.data.subarray(h+1),u.data=u.privateData}},np=function(u){var h,p,f=10,v=0,_=[];if(!(u.length<10||u[0]!==73||u[1]!==68||u[2]!==51)){v=Er(u.subarray(6,10)),v+=10;var L=u[5]&64;L&&(f+=4,f+=Er(u.subarray(10,14)),v-=Er(u.subarray(16,20)));do{if(h=Er(u.subarray(f+4,f+8)),h<1)break;p=String.fromCharCode(u[f],u[f+1],u[f+2],u[f+3]);var V={id:p,data:u.subarray(f+10,f+h+10)};V.key=V.id,kr[V.id]?kr[V.id](V):V.id[0]==="T"?kr["T*"](V):V.id[0]==="W"&&kr["W*"](V),_.push(V),f+=10,f+=h}while(f<v);return _}},hu={parseId3Frames:np,parseSyncSafeInteger:Er,frameParsers:kr},rp=t,sp=ge,sn=hu,gs;gs=function(u){var h={descriptor:u&&u.descriptor},p=0,f=[],v=0,_;if(gs.prototype.init.call(this),this.dispatchType=sp.METADATA_STREAM_TYPE.toString(16),h.descriptor)for(_=0;_<h.descriptor.length;_++)this.dispatchType+=("00"+h.descriptor[_].toString(16)).slice(-2);this.push=function(L){var V,q,W,ee,de,xe;if(L.type==="timed-metadata"){if(L.dataAlignmentIndicator&&(v=0,f.length=0),f.length===0&&(L.data.length<10||L.data[0]!==73||L.data[1]!==68||L.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(f.push(L),v+=L.data.byteLength,f.length===1&&(p=sn.parseSyncSafeInteger(L.data.subarray(6,10)),p+=10),!(v<p)){for(V={data:new Uint8Array(p),frames:[],pts:f[0].pts,dts:f[0].dts},de=0;de<p;)V.data.set(f[0].data.subarray(0,p-de),de),de+=f[0].data.byteLength,v-=f[0].data.byteLength,f.shift();q=10,V.data[5]&64&&(q+=4,q+=sn.parseSyncSafeInteger(V.data.subarray(10,14)),p-=sn.parseSyncSafeInteger(V.data.subarray(16,20)));do{if(W=sn.parseSyncSafeInteger(V.data.subarray(q+4,q+8)),W<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(xe=String.fromCharCode(V.data[q],V.data[q+1],V.data[q+2],V.data[q+3]),ee={id:xe,data:V.data.subarray(q+10,q+W+10)},ee.key=ee.id,sn.frameParsers[ee.id]?sn.frameParsers[ee.id](ee):ee.id[0]==="T"?sn.frameParsers["T*"](ee):ee.id[0]==="W"&&sn.frameParsers["W*"](ee),ee.owner==="com.apple.streaming.transportStreamTimestamp"){var fe=ee.data,Me=(fe[3]&1)<<30|fe[4]<<22|fe[5]<<14|fe[6]<<6|fe[7]>>>2;Me*=4,Me+=fe[7]&3,ee.timeStamp=Me,V.pts===void 0&&V.dts===void 0&&(V.pts=ee.timeStamp,V.dts=ee.timeStamp),this.trigger("timestamp",ee)}V.frames.push(ee),q+=10,q+=W}while(q<p);this.trigger("data",V)}}}},gs.prototype=new rp;var ap=gs,Ha=t,Ga=J,ki=ge,op=vt.TimestampRolloverStream,vs,wr,ys,$n=188,Wa=71;vs=function(){var u=new Uint8Array($n),h=0;vs.prototype.init.call(this),this.push=function(p){var f=0,v=$n,_;for(h?(_=new Uint8Array(p.byteLength+h),_.set(u.subarray(0,h)),_.set(p,h),h=0):_=p;v<_.byteLength;){if(_[f]===Wa&&_[v]===Wa){this.trigger("data",_.subarray(f,v)),f+=$n,v+=$n;continue}f++,v++}f<_.byteLength&&(u.set(_.subarray(f),0),h=_.byteLength-f)},this.flush=function(){h===$n&&u[0]===Wa&&(this.trigger("data",u),h=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){h=0,this.trigger("reset")}},vs.prototype=new Ha,wr=function(){var u,h,p,f;wr.prototype.init.call(this),f=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,u=function(v,_){var L=0;_.payloadUnitStartIndicator&&(L+=v[L]+1),_.type==="pat"?h(v.subarray(L),_):p(v.subarray(L),_)},h=function(v,_){_.section_number=v[7],_.last_section_number=v[8],f.pmtPid=(v[10]&31)<<8|v[11],_.pmtPid=f.pmtPid},p=function(v,_){var L,V,q,W;if(v[5]&1){for(f.programMapTable={video:null,audio:null,"timed-metadata":{}},L=(v[1]&15)<<8|v[2],V=3+L-4,q=(v[10]&15)<<8|v[11],W=12+q;W<V;){var ee=v[W],de=(v[W+1]&31)<<8|v[W+2];ee===ki.H264_STREAM_TYPE&&f.programMapTable.video===null?f.programMapTable.video=de:ee===ki.ADTS_STREAM_TYPE&&f.programMapTable.audio===null?f.programMapTable.audio=de:ee===ki.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][de]=ee),W+=((v[W+3]&15)<<8|v[W+4])+5}_.programMapTable=f.programMapTable}},this.push=function(v){var _={},L=4;if(_.payloadUnitStartIndicator=!!(v[1]&64),_.pid=v[1]&31,_.pid<<=8,_.pid|=v[2],(v[3]&48)>>>4>1&&(L+=v[L]+1),_.pid===0)_.type="pat",u(v.subarray(L),_),this.trigger("data",_);else if(_.pid===this.pmtPid)for(_.type="pmt",u(v.subarray(L),_),this.trigger("data",_);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([v,L,_]):this.processPes_(v,L,_)},this.processPes_=function(v,_,L){L.pid===this.programMapTable.video?L.streamType=ki.H264_STREAM_TYPE:L.pid===this.programMapTable.audio?L.streamType=ki.ADTS_STREAM_TYPE:L.streamType=this.programMapTable["timed-metadata"][L.pid],L.type="pes",L.data=v.subarray(_),this.trigger("data",L)}},wr.prototype=new Ha,wr.STREAM_TYPES={h264:27,adts:15},ys=function(){var u=this,h=!1,p={data:[],size:0},f={data:[],size:0},v={data:[],size:0},_,L=function(q,W){var ee;const de=q[0]<<16|q[1]<<8|q[2];W.data=new Uint8Array,de===1&&(W.packetLength=6+(q[4]<<8|q[5]),W.dataAlignmentIndicator=(q[6]&4)!==0,ee=q[7],ee&192&&(W.pts=(q[9]&14)<<27|(q[10]&255)<<20|(q[11]&254)<<12|(q[12]&255)<<5|(q[13]&254)>>>3,W.pts*=4,W.pts+=(q[13]&6)>>>1,W.dts=W.pts,ee&64&&(W.dts=(q[14]&14)<<27|(q[15]&255)<<20|(q[16]&254)<<12|(q[17]&255)<<5|(q[18]&254)>>>3,W.dts*=4,W.dts+=(q[18]&6)>>>1)),W.data=q.subarray(9+q[8]))},V=function(q,W,ee){var de=new Uint8Array(q.size),xe={type:W},fe=0,Me=0,ze=!1,Bt;if(!(!q.data.length||q.size<9)){for(xe.trackId=q.data[0].pid,fe=0;fe<q.data.length;fe++)Bt=q.data[fe],de.set(Bt.data,Me),Me+=Bt.data.byteLength;L(de,xe),ze=W==="video"||xe.packetLength<=q.size,(ee||ze)&&(q.size=0,q.data.length=0),ze&&u.trigger("data",xe)}};ys.prototype.init.call(this),this.push=function(q){({pat:function(){},pes:function(){var W,ee;switch(q.streamType){case ki.H264_STREAM_TYPE:W=p,ee="video";break;case ki.ADTS_STREAM_TYPE:W=f,ee="audio";break;case ki.METADATA_STREAM_TYPE:W=v,ee="timed-metadata";break;default:return}q.payloadUnitStartIndicator&&V(W,ee,!0),W.data.push(q),W.size+=q.data.byteLength},pmt:function(){var W={type:"metadata",tracks:[]};_=q.programMapTable,_.video!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),h=!0,u.trigger("data",W)}})[q.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(!h&&_){var q={type:"metadata",tracks:[]};_.video!==null&&q.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&q.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),u.trigger("data",q)}h=!1,this.flushStreams_(),this.trigger("done")}},ys.prototype=new Ha;var fu={PAT_PID:0,MP2T_PACKET_LENGTH:$n,TransportPacketStream:vs,TransportParseStream:wr,ElementaryStream:ys,TimestampRolloverStream:op,CaptionStream:Ga.CaptionStream,Cea608Stream:Ga.Cea608Stream,Cea708Stream:Ga.Cea708Stream,MetadataStream:ap};for(var Ya in ki)ki.hasOwnProperty(Ya)&&(fu[Ya]=ki[Ya]);var lp=fu,up=t,cp=Oe.ONE_SECOND_IN_TS,_s,pu=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_s=function(u){var h,p=0;_s.prototype.init.call(this),this.skipWarn_=function(f,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,_,L,V,q,W;if(u||(p=0),f.type==="audio"){h&&h.length?(V=h,h=new Uint8Array(V.byteLength+f.data.byteLength),h.set(V),h.set(f.data,V.byteLength)):h=f.data;for(var ee;v+7<h.length;){if(h[v]!==255||(h[v+1]&246)!==240){typeof ee!="number"&&(ee=v),v++;continue}if(typeof ee=="number"&&(this.skipWarn_(ee,v),ee=null),L=(~h[v+1]&1)*2,_=(h[v+3]&3)<<11|h[v+4]<<3|(h[v+5]&224)>>5,q=((h[v+6]&3)+1)*1024,W=q*cp/pu[(h[v+2]&60)>>>2],h.byteLength-v<_)break;this.trigger("data",{pts:f.pts+p*W,dts:f.dts+p*W,sampleCount:q,audioobjecttype:(h[v+2]>>>6&3)+1,channelcount:(h[v+2]&1)<<2|(h[v+3]&192)>>>6,samplerate:pu[(h[v+2]&60)>>>2],samplingfrequencyindex:(h[v+2]&60)>>>2,samplesize:16,data:h.subarray(v+7+L,v+_)}),p++,v+=_}typeof ee=="number"&&(this.skipWarn_(ee,v),ee=null),h=h.subarray(v)}},this.flush=function(){p=0,this.trigger("done")},this.reset=function(){h=void 0,this.trigger("reset")},this.endTimeline=function(){h=void 0,this.trigger("endedtimeline")}},_s.prototype=new up;var dp=_s,mu;mu=function(u){var h=u.byteLength,p=0,f=0;this.length=function(){return 8*h},this.bitsAvailable=function(){return 8*h+f},this.loadWord=function(){var v=u.byteLength-h,_=new Uint8Array(4),L=Math.min(4,h);if(L===0)throw new Error("no bytes available");_.set(u.subarray(v,v+L)),p=new DataView(_.buffer).getUint32(0),f=L*8,h-=L},this.skipBits=function(v){var _;f>v?(p<<=v,f-=v):(v-=f,_=Math.floor(v/8),v-=_*8,h-=_,this.loadWord(),p<<=v,f-=v)},this.readBits=function(v){var _=Math.min(f,v),L=p>>>32-_;return f-=_,f>0?p<<=_:h>0&&this.loadWord(),_=v-_,_>0?L<<_|this.readBits(_):L},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 hp=mu,gu=t,fp=hp,Ts,bs,vu;bs=function(){var u=0,h,p;bs.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 _=p.byteLength;u<_-3;u++)if(p[u+2]===1){h=u+5;break}for(;h<_;)switch(p[h]){case 0:if(p[h-1]!==0){h+=2;break}else if(p[h-2]!==0){h++;break}u+3!==h-2&&this.trigger("data",p.subarray(u+3,h-2));do h++;while(p[h]!==1&&h<_);u=h-2,h+=3;break;case 1:if(p[h-1]!==0||p[h-2]!==0){h+=3;break}this.trigger("data",p.subarray(u+3,h-2)),u=h-2,h+=3;break;default:h+=3;break}p=p.subarray(u),h-=u,u=0},this.reset=function(){p=null,u=0,this.trigger("reset")},this.flush=function(){p&&p.byteLength>3&&this.trigger("data",p.subarray(u+3)),p=null,u=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},bs.prototype=new gu,vu={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ts=function(){var u=new bs,h,p,f,v,_,L,V;Ts.prototype.init.call(this),h=this,this.push=function(q){q.type==="video"&&(p=q.trackId,f=q.pts,v=q.dts,u.push(q))},u.on("data",function(q){var W={trackId:p,pts:f,dts:v,data:q,nalUnitTypeCode:q[0]&31};switch(W.nalUnitTypeCode){case 5:W.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:W.nalUnitType="sei_rbsp",W.escapedRBSP=_(q.subarray(1));break;case 7:W.nalUnitType="seq_parameter_set_rbsp",W.escapedRBSP=_(q.subarray(1)),W.config=L(W.escapedRBSP);break;case 8:W.nalUnitType="pic_parameter_set_rbsp";break;case 9:W.nalUnitType="access_unit_delimiter_rbsp";break}h.trigger("data",W)}),u.on("done",function(){h.trigger("done")}),u.on("partialdone",function(){h.trigger("partialdone")}),u.on("reset",function(){h.trigger("reset")}),u.on("endedtimeline",function(){h.trigger("endedtimeline")}),this.flush=function(){u.flush()},this.partialFlush=function(){u.partialFlush()},this.reset=function(){u.reset()},this.endTimeline=function(){u.endTimeline()},V=function(q,W){var ee=8,de=8,xe,fe;for(xe=0;xe<q;xe++)de!==0&&(fe=W.readExpGolomb(),de=(ee+fe+256)%256),ee=de===0?ee:de},_=function(q){for(var W=q.byteLength,ee=[],de=1,xe,fe;de<W-2;)q[de]===0&&q[de+1]===0&&q[de+2]===3?(ee.push(de+2),de+=2):de++;if(ee.length===0)return q;xe=W-ee.length,fe=new Uint8Array(xe);var Me=0;for(de=0;de<xe;Me++,de++)Me===ee[0]&&(Me++,ee.shift()),fe[de]=q[Me];return fe},L=function(q){var W=0,ee=0,de=0,xe=0,fe,Me,ze,Bt,di,on,Lr,Mr,Pr,Rr,Bs,ut=[1,1],Vr,Di;if(fe=new fp(q),Me=fe.readUnsignedByte(),Bt=fe.readUnsignedByte(),ze=fe.readUnsignedByte(),fe.skipUnsignedExpGolomb(),vu[Me]&&(di=fe.readUnsignedExpGolomb(),di===3&&fe.skipBits(1),fe.skipUnsignedExpGolomb(),fe.skipUnsignedExpGolomb(),fe.skipBits(1),fe.readBoolean()))for(Bs=di!==3?8:12,Di=0;Di<Bs;Di++)fe.readBoolean()&&(Di<6?V(16,fe):V(64,fe));if(fe.skipUnsignedExpGolomb(),on=fe.readUnsignedExpGolomb(),on===0)fe.readUnsignedExpGolomb();else if(on===1)for(fe.skipBits(1),fe.skipExpGolomb(),fe.skipExpGolomb(),Lr=fe.readUnsignedExpGolomb(),Di=0;Di<Lr;Di++)fe.skipExpGolomb();if(fe.skipUnsignedExpGolomb(),fe.skipBits(1),Mr=fe.readUnsignedExpGolomb(),Pr=fe.readUnsignedExpGolomb(),Rr=fe.readBits(1),Rr===0&&fe.skipBits(1),fe.skipBits(1),fe.readBoolean()&&(W=fe.readUnsignedExpGolomb(),ee=fe.readUnsignedExpGolomb(),de=fe.readUnsignedExpGolomb(),xe=fe.readUnsignedExpGolomb()),fe.readBoolean()&&fe.readBoolean()){switch(Vr=fe.readUnsignedByte(),Vr){case 1:ut=[1,1];break;case 2:ut=[12,11];break;case 3:ut=[10,11];break;case 4:ut=[16,11];break;case 5:ut=[40,33];break;case 6:ut=[24,11];break;case 7:ut=[20,11];break;case 8:ut=[32,11];break;case 9:ut=[80,33];break;case 10:ut=[18,11];break;case 11:ut=[15,11];break;case 12:ut=[64,33];break;case 13:ut=[160,99];break;case 14:ut=[4,3];break;case 15:ut=[3,2];break;case 16:ut=[2,1];break;case 255:{ut=[fe.readUnsignedByte()<<8|fe.readUnsignedByte(),fe.readUnsignedByte()<<8|fe.readUnsignedByte()];break}}ut&&ut[0]/ut[1]}return{profileIdc:Me,levelIdc:ze,profileCompatibility:Bt,width:(Mr+1)*16-W*2-ee*2,height:(2-Rr)*(Pr+1)*16-de*2-xe*2,sarRatio:ut}}},Ts.prototype=new gu;var pp={H264Stream:Ts},mp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],yu=function(u,h){var p=u[h+6]<<21|u[h+7]<<14|u[h+8]<<7|u[h+9],f=u[h+5],v=(f&16)>>4;return p=p>=0?p:0,v?p+20:p+10},_u=function(u,h){return u.length-h<10||u[h]!==73||u[h+1]!==68||u[h+2]!==51?h:(h+=yu(u,h),_u(u,h))},gp=function(u){var h=_u(u,0);return u.length>=h+2&&(u[h]&255)===255&&(u[h+1]&240)===240&&(u[h+1]&22)===16},Tu=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},vp=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},yp=function(u,h,p){return unescape(vp(u,h,p))},_p=function(u,h){var p=(u[h+5]&224)>>5,f=u[h+4]<<3,v=u[h+3]&6144;return v|f|p},Tp=function(u,h){return u[h]===73&&u[h+1]===68&&u[h+2]===51?"timed-metadata":u[h]&!0&&(u[h+1]&240)===240?"audio":null},bp=function(u){for(var h=0;h+5<u.length;){if(u[h]!==255||(u[h+1]&246)!==240){h++;continue}return mp[(u[h+2]&60)>>>2]}return null},xp=function(u){var h,p,f,v;h=10,u[5]&64&&(h+=4,h+=Tu(u.subarray(10,14)));do{if(p=Tu(u.subarray(h+4,h+8)),p<1)return null;if(v=String.fromCharCode(u[h],u[h+1],u[h+2],u[h+3]),v==="PRIV"){f=u.subarray(h+10,h+p+10);for(var _=0;_<f.byteLength;_++)if(f[_]===0){var L=yp(f,0,_);if(L==="com.apple.streaming.transportStreamTimestamp"){var V=f.subarray(_+1),q=(V[3]&1)<<30|V[4]<<22|V[5]<<14|V[6]<<6|V[7]>>>2;return q*=4,q+=V[7]&3,q}break}}h+=10,h+=p}while(h<u.byteLength);return null},Xa={isLikelyAacData:gp,parseId3TagSize:yu,parseAdtsSize:_p,parseType:Tp,parseSampleRate:bp,parseAacTimestamp:xp},Cp=t,bu=Xa,xs;xs=function(){var u=new Uint8Array,h=0;xs.prototype.init.call(this),this.setTimestamp=function(p){h=p},this.push=function(p){var f=0,v=0,_,L,V,q;for(u.length?(q=u.length,u=new Uint8Array(p.byteLength+q),u.set(u.subarray(0,q)),u.set(p,q)):u=p;u.length-v>=3;){if(u[v]===73&&u[v+1]===68&&u[v+2]===51){if(u.length-v<10||(f=bu.parseId3TagSize(u,v),v+f>u.length))break;L={type:"timed-metadata",data:u.subarray(v,v+f)},this.trigger("data",L),v+=f;continue}else if((u[v]&255)===255&&(u[v+1]&240)===240){if(u.length-v<7||(f=bu.parseAdtsSize(u,v),v+f>u.length))break;V={type:"audio",data:u.subarray(v,v+f),pts:h,dts:h},this.trigger("data",V),v+=f;continue}v++}_=u.length-v,_>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")}},xs.prototype=new Cp;var Sp=xs,Ep=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],kp=Ep,wp=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Dp=wp,Cs=t,Dr=we,Ar=St,Ss=ci,wi=Y,Xi=lp,Es=Oe,xu=dp,Ap=pp.H264Stream,Np=Sp,Ip=Xa.isLikelyAacData,Op=Oe.ONE_SECOND_IN_TS,Cu=kp,Su=Dp,ks,Nr,ws,Cn,Bp=function(u,h){h.stream=u,this.trigger("log",h)},Eu=function(u,h){for(var p=Object.keys(h),f=0;f<p.length;f++){var v=p[f];v==="headOfPipeline"||!h[v].on||h[v].on("log",Bp.bind(u,v))}},ku=function(u,h){var p;if(u.length!==h.length)return!1;for(p=0;p<u.length;p++)if(u[p]!==h[p])return!1;return!0},wu=function(u,h,p,f,v,_){var L=p-h,V=f-h,q=v-p;return{start:{dts:u,pts:u+L},end:{dts:u+V,pts:u+q},prependedContentDuration:_,baseMediaDecodeTime:u}};Nr=function(u,h){var p=[],f,v=0,_=0,L=1/0;h=h||{},f=h.firstSequenceNumber||0,Nr.prototype.init.call(this),this.push=function(V){wi.collectDtsInfo(u,V),u&&Cu.forEach(function(q){u[q]=V[q]}),p.push(V)},this.setEarliestDts=function(V){v=V},this.setVideoBaseMediaDecodeTime=function(V){L=V},this.setAudioAppendStart=function(V){_=V},this.flush=function(){var V,q,W,ee,de,xe,fe;if(p.length===0){this.trigger("done","AudioSegmentStream");return}V=Ss.trimAdtsFramesByEarliestDts(p,u,v),u.baseMediaDecodeTime=wi.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),fe=Ss.prefixWithSilence(u,V,_,L),u.samples=Ss.generateSampleTable(V),W=Dr.mdat(Ss.concatenateFrameData(V)),p=[],q=Dr.moof(f,[u]),ee=new Uint8Array(q.byteLength+W.byteLength),f++,ee.set(q),ee.set(W,q.byteLength),wi.clearDtsInfo(u),de=Math.ceil(Op*1024/u.samplerate),V.length&&(xe=V.length*de,this.trigger("segmentTimingInfo",wu(Es.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),V[0].dts,V[0].pts,V[0].dts+xe,V[0].pts+xe,fe||0)),this.trigger("timingInfo",{start:V[0].pts,end:V[0].pts+xe})),this.trigger("data",{track:u,boxes:ee}),this.trigger("done","AudioSegmentStream")},this.reset=function(){wi.clearDtsInfo(u),p=[],this.trigger("reset")}},Nr.prototype=new Cs,ks=function(u,h){var p,f=[],v=[],_,L;h=h||{},p=h.firstSequenceNumber||0,ks.prototype.init.call(this),delete u.minPTS,this.gopCache_=[],this.push=function(V){wi.collectDtsInfo(u,V),V.nalUnitType==="seq_parameter_set_rbsp"&&!_&&(_=V.config,u.sps=[V.data],Su.forEach(function(q){u[q]=_[q]},this)),V.nalUnitType==="pic_parameter_set_rbsp"&&!L&&(L=V.data,u.pps=[V.data]),f.push(V)},this.flush=function(){for(var V,q,W,ee,de,xe,fe=0,Me,ze;f.length&&f[0].nalUnitType!=="access_unit_delimiter_rbsp";)f.shift();if(f.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(V=Ar.groupNalsIntoFrames(f),W=Ar.groupFramesIntoGops(V),W[0][0].keyFrame||(q=this.getGopForFusion_(f[0],u),q?(fe=q.duration,W.unshift(q),W.byteLength+=q.byteLength,W.nalCount+=q.nalCount,W.pts=q.pts,W.dts=q.dts,W.duration+=q.duration):W=Ar.extendFirstKeyFrame(W)),v.length){var Bt;if(h.alignGopsAtEnd?Bt=this.alignGopsAtEnd_(W):Bt=this.alignGopsAtStart_(W),!Bt){this.gopCache_.unshift({gop:W.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}wi.clearDtsInfo(u),W=Bt}wi.collectDtsInfo(u,W),u.samples=Ar.generateSampleTable(W),de=Dr.mdat(Ar.concatenateNalData(W)),u.baseMediaDecodeTime=wi.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),this.trigger("processedGopsInfo",W.map(function(di){return{pts:di.pts,dts:di.dts,byteLength:di.byteLength}})),Me=W[0],ze=W[W.length-1],this.trigger("segmentTimingInfo",wu(u.baseMediaDecodeTime,Me.dts,Me.pts,ze.dts+ze.duration,ze.pts+ze.duration,fe)),this.trigger("timingInfo",{start:W[0].pts,end:W[W.length-1].pts+W[W.length-1].duration}),this.gopCache_.unshift({gop:W.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),ee=Dr.moof(p,[u]),xe=new Uint8Array(ee.byteLength+de.byteLength),p++,xe.set(ee),xe.set(de,ee.byteLength),this.trigger("data",{track:u,boxes:xe}),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(){wi.clearDtsInfo(u),_=void 0,L=void 0},this.getGopForFusion_=function(V){var q=45e3,W=1/0,ee,de,xe,fe,Me;for(Me=0;Me<this.gopCache_.length;Me++)fe=this.gopCache_[Me],xe=fe.gop,!(!(u.pps&&ku(u.pps[0],fe.pps[0]))||!(u.sps&&ku(u.sps[0],fe.sps[0])))&&(xe.dts<u.timelineStartInfo.dts||(ee=V.dts-xe.dts-xe.duration,ee>=-1e4&&ee<=q&&(!de||W>ee)&&(de=fe,W=ee)));return de?de.gop:null},this.alignGopsAtStart_=function(V){var q,W,ee,de,xe,fe,Me,ze;for(xe=V.byteLength,fe=V.nalCount,Me=V.duration,q=W=0;q<v.length&&W<V.length&&(ee=v[q],de=V[W],ee.pts!==de.pts);){if(de.pts>ee.pts){q++;continue}W++,xe-=de.byteLength,fe-=de.nalCount,Me-=de.duration}return W===0?V:W===V.length?null:(ze=V.slice(W),ze.byteLength=xe,ze.duration=Me,ze.nalCount=fe,ze.pts=ze[0].pts,ze.dts=ze[0].dts,ze)},this.alignGopsAtEnd_=function(V){var q,W,ee,de,xe,fe;for(q=v.length-1,W=V.length-1,xe=null,fe=!1;q>=0&&W>=0;){if(ee=v[q],de=V[W],ee.pts===de.pts){fe=!0;break}if(ee.pts>de.pts){q--;continue}q===v.length-1&&(xe=W),W--}if(!fe&&xe===null)return null;var Me;if(fe?Me=W:Me=xe,Me===0)return V;var ze=V.slice(Me),Bt=ze.reduce(function(di,on){return di.byteLength+=on.byteLength,di.duration+=on.duration,di.nalCount+=on.nalCount,di},{byteLength:0,duration:0,nalCount:0});return ze.byteLength=Bt.byteLength,ze.duration=Bt.duration,ze.nalCount=Bt.nalCount,ze.pts=ze[0].pts,ze.dts=ze[0].dts,ze},this.alignGopsWith=function(V){v=V}},ks.prototype=new Cs,Cn=function(u,h){this.numberOfTracks=0,this.metadataStream=h,u=u||{},typeof u.remux<"u"?this.remuxTracks=!!u.remux:this.remuxTracks=!0,typeof u.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=u.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,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 Cs,Cn.prototype.flush=function(u){var h=0,p={captions:[],captionStreams:{},metadata:[],info:{}},f,v,_,L=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?(L=this.videoTrack.timelineStartInfo.pts,Su.forEach(function(q){p.info[q]=this.videoTrack[q]},this)):this.audioTrack&&(L=this.audioTrack.timelineStartInfo.pts,Cu.forEach(function(q){p.info[q]=this.audioTrack[q]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?p.type=this.pendingTracks[0].type:p.type="combined",this.emittedTracks+=this.pendingTracks.length,_=Dr.initSegment(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),V=0;V<this.pendingBoxes.length;V++)p.data.set(this.pendingBoxes[V],h),h+=this.pendingBoxes[V].byteLength;for(V=0;V<this.pendingCaptions.length;V++)f=this.pendingCaptions[V],f.startTime=Es.metadataTsToSeconds(f.startPts,L,this.keepOriginalTimestamps),f.endTime=Es.metadataTsToSeconds(f.endPts,L,this.keepOriginalTimestamps),p.captionStreams[f.stream]=!0,p.captions.push(f);for(V=0;V<this.pendingMetadata.length;V++)v=this.pendingMetadata[V],v.cueTime=Es.metadataTsToSeconds(v.pts,L,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},ws=function(u){var h=this,p=!0,f,v;ws.prototype.init.call(this),u=u||{},this.baseMediaDecodeTime=u.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="aac",_.metadataStream=new Xi.MetadataStream,_.aacStream=new Np,_.audioTimestampRolloverStream=new Xi.TimestampRolloverStream("audio"),_.timedMetadataTimestampRolloverStream=new Xi.TimestampRolloverStream("timed-metadata"),_.adtsStream=new xu,_.coalesceStream=new Cn(u,_.metadataStream),_.headOfPipeline=_.aacStream,_.aacStream.pipe(_.audioTimestampRolloverStream).pipe(_.adtsStream),_.aacStream.pipe(_.timedMetadataTimestampRolloverStream).pipe(_.metadataStream).pipe(_.coalesceStream),_.metadataStream.on("timestamp",function(L){_.aacStream.setTimestamp(L.timeStamp)}),_.aacStream.on("data",function(L){L.type!=="timed-metadata"&&L.type!=="audio"||_.audioSegmentStream||(v=v||{timelineStartInfo:{baseMediaDecodeTime:h.baseMediaDecodeTime},codec:"adts",type:"audio"},_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Nr(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f}))}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Eu(this,_)},this.setupTsPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="ts",_.metadataStream=new Xi.MetadataStream,_.packetStream=new Xi.TransportPacketStream,_.parseStream=new Xi.TransportParseStream,_.elementaryStream=new Xi.ElementaryStream,_.timestampRolloverStream=new Xi.TimestampRolloverStream,_.adtsStream=new xu,_.h264Stream=new Ap,_.captionStream=new Xi.CaptionStream(u),_.coalesceStream=new Cn(u,_.metadataStream),_.headOfPipeline=_.packetStream,_.packetStream.pipe(_.parseStream).pipe(_.elementaryStream).pipe(_.timestampRolloverStream),_.timestampRolloverStream.pipe(_.h264Stream),_.timestampRolloverStream.pipe(_.adtsStream),_.timestampRolloverStream.pipe(_.metadataStream).pipe(_.coalesceStream),_.h264Stream.pipe(_.captionStream).pipe(_.coalesceStream),_.elementaryStream.on("data",function(L){var V;if(L.type==="metadata"){for(V=L.tracks.length;V--;)!f&&L.tracks[V].type==="video"?(f=L.tracks[V],f.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime):!v&&L.tracks[V].type==="audio"&&(v=L.tracks[V],v.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime);f&&!_.videoSegmentStream&&(_.coalesceStream.numberOfTracks++,_.videoSegmentStream=new ks(f,u),_.videoSegmentStream.on("log",h.getLogTrigger_("videoSegmentStream")),_.videoSegmentStream.on("timelineStartInfo",function(q){v&&!u.keepOriginalTimestamps&&(v.timelineStartInfo=q,_.audioSegmentStream.setEarliestDts(q.dts-h.baseMediaDecodeTime))}),_.videoSegmentStream.on("processedGopsInfo",h.trigger.bind(h,"gopInfo")),_.videoSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"videoSegmentTimingInfo")),_.videoSegmentStream.on("baseMediaDecodeTime",function(q){v&&_.audioSegmentStream.setVideoBaseMediaDecodeTime(q)}),_.videoSegmentStream.on("timingInfo",h.trigger.bind(h,"videoTimingInfo")),_.h264Stream.pipe(_.videoSegmentStream).pipe(_.coalesceStream)),v&&!_.audioSegmentStream&&(_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Nr(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.audioSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"audioSegmentTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream)),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f})}}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("id3Frame",function(L){L.dispatchType=_.metadataStream.dispatchType,h.trigger("id3Frame",L)}),_.coalesceStream.on("caption",this.trigger.bind(this,"caption")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Eu(this,_)},this.setBaseMediaDecodeTime=function(_){var L=this.transmuxPipeline_;u.keepOriginalTimestamps||(this.baseMediaDecodeTime=_),v&&(v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,wi.clearDtsInfo(v),L.audioTimestampRolloverStream&&L.audioTimestampRolloverStream.discontinuity()),f&&(L.videoSegmentStream&&(L.videoSegmentStream.gopCache_=[]),f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,wi.clearDtsInfo(f),L.captionStream.reset()),L.timestampRolloverStream&&L.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(_){v&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(_)},this.setRemux=function(_){var L=this.transmuxPipeline_;u.remux=_,L&&L.coalesceStream&&L.coalesceStream.setRemux(_)},this.alignGopsWith=function(_){f&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(_)},this.getLogTrigger_=function(_){var L=this;return function(V){V.stream=_,L.trigger("log",V)}},this.push=function(_){if(p){var L=Ip(_);L&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!L&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),p=!1}this.transmuxPipeline_.headOfPipeline.push(_)},this.flush=function(){p=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ws.prototype=new Cs;var Lp={Transmuxer:ws},Mp=function(u){return u>>>0},Pp=function(u){return("00"+u.toString(16)).slice(-2)},Ds={toUnsigned:Mp,toHexString:Pp},Rp=function(u){var h="";return h+=String.fromCharCode(u[0]),h+=String.fromCharCode(u[1]),h+=String.fromCharCode(u[2]),h+=String.fromCharCode(u[3]),h},Du=Rp,Vp=Ds.toUnsigned,Fp=Du,Au=function(u,h){var p=[],f,v,_,L,V;if(!h.length)return null;for(f=0;f<u.byteLength;)v=Vp(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3]),_=Fp(u.subarray(f+4,f+8)),L=v>1?f+v:u.byteLength,_===h[0]&&(h.length===1?p.push(u.subarray(f+8,L)):(V=Au(u.subarray(f+8,L),h.slice(1)),V.length&&(p=p.concat(V)))),f=L;return p},Ka=Au,$p=Ds.toUnsigned,Up=a.getUint64,qp=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4))};return h.version===1?h.baseMediaDecodeTime=Up(u.subarray(4)):h.baseMediaDecodeTime=$p(u[4]<<24|u[5]<<16|u[6]<<8|u[7]),h},Qa=qp,zp=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p={version:u[0],flags:new Uint8Array(u.subarray(1,4)),trackId:h.getUint32(4)},f=p.flags[2]&1,v=p.flags[2]&2,_=p.flags[2]&8,L=p.flags[2]&16,V=p.flags[2]&32,q=p.flags[0]&65536,W=p.flags[0]&131072,ee;return ee=8,f&&(ee+=4,p.baseDataOffset=h.getUint32(12),ee+=4),v&&(p.sampleDescriptionIndex=h.getUint32(ee),ee+=4),_&&(p.defaultSampleDuration=h.getUint32(ee),ee+=4),L&&(p.defaultSampleSize=h.getUint32(ee),ee+=4),V&&(p.defaultSampleFlags=h.getUint32(ee)),q&&(p.durationIsEmpty=!0),!f&&W&&(p.baseDataOffsetIsMoof=!0),p},Nu=zp,jp=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]}},Hp=jp,Iu=Hp,Gp=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4)),samples:[]},p=new DataView(u.buffer,u.byteOffset,u.byteLength),f=h.flags[2]&1,v=h.flags[2]&4,_=h.flags[1]&1,L=h.flags[1]&2,V=h.flags[1]&4,q=h.flags[1]&8,W=p.getUint32(4),ee=8,de;for(f&&(h.dataOffset=p.getInt32(ee),ee+=4),v&&W&&(de={flags:Iu(u.subarray(ee,ee+4))},ee+=4,_&&(de.duration=p.getUint32(ee),ee+=4),L&&(de.size=p.getUint32(ee),ee+=4),q&&(h.version===1?de.compositionTimeOffset=p.getInt32(ee):de.compositionTimeOffset=p.getUint32(ee),ee+=4),h.samples.push(de),W--);W--;)de={},_&&(de.duration=p.getUint32(ee),ee+=4),L&&(de.size=p.getUint32(ee),ee+=4),V&&(de.flags=Iu(u.subarray(ee,ee+4)),ee+=4),q&&(h.version===1?de.compositionTimeOffset=p.getInt32(ee):de.compositionTimeOffset=p.getUint32(ee),ee+=4),h.samples.push(de);return h},Ou=Gp,Bu={tfdt:Qa,trun:Ou},Lu={parseTfdt:Bu.tfdt,parseTrun:Bu.trun},Wp=function(u){for(var h=0,p=String.fromCharCode(u[h]),f="";p!=="\0";)f+=p,h++,p=String.fromCharCode(u[h]);return f+=p,f},Yp={uint8ToCString:Wp},As=Yp.uint8ToCString,Xp=a.getUint64,Kp=function(u){var h=4,p=u[0],f,v,_,L,V,q,W,ee;if(p===0){f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length;var de=new DataView(u.buffer);_=de.getUint32(h),h+=4,V=de.getUint32(h),h+=4,q=de.getUint32(h),h+=4,W=de.getUint32(h),h+=4}else if(p===1){var de=new DataView(u.buffer);_=de.getUint32(h),h+=4,L=Xp(u.subarray(h)),h+=8,q=de.getUint32(h),h+=4,W=de.getUint32(h),h+=4,f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length}ee=new Uint8Array(u.subarray(h,u.byteLength));var xe={scheme_id_uri:f,value:v,timescale:_||1,presentation_time:L,presentation_time_delta:V,event_duration:q,id:W,message_data:ee};return Zp(p,xe)?xe:void 0},Qp=function(u,h,p,f){return u||u===0?u/h:f+p/h},Zp=function(u,h){var p=h.scheme_id_uri!=="\0",f=u===0&&Mu(h.presentation_time_delta)&&p,v=u===1&&Mu(h.presentation_time)&&p;return!(u>1)&&f||v},Mu=function(u){return u!==void 0||u!==null},Jp={parseEmsgBox:Kp,scaleTime:Qp},Ir;typeof window<"u"?Ir=window:typeof r<"u"?Ir=r:typeof self<"u"?Ir=self:Ir={};var Pu=Ir,Ns=Ds.toUnsigned,Or=Ds.toHexString,Tt=Ka,Un=Du,Za=Jp,em=Nu,tm=Ou,im=Qa,nm=a.getUint64,Ru,Vu,Fu,$u,Uu,Ja,qu,eo=Pu,rm=hu.parseId3Frames;Ru=function(u){var h={},p=Tt(u,["moov","trak"]);return p.reduce(function(f,v){var _,L,V,q,W;return _=Tt(v,["tkhd"])[0],!_||(L=_[0],V=L===0?12:20,q=Ns(_[V]<<24|_[V+1]<<16|_[V+2]<<8|_[V+3]),W=Tt(v,["mdia","mdhd"])[0],!W)?null:(L=W[0],V=L===0?12:20,f[q]=Ns(W[V]<<24|W[V+1]<<16|W[V+2]<<8|W[V+3]),f)},h)},Vu=function(u,h){var p;p=Tt(h,["moof","traf"]);var f=p.reduce(function(v,_){var L=Tt(_,["tfhd"])[0],V=Ns(L[4]<<24|L[5]<<16|L[6]<<8|L[7]),q=u[V]||9e4,W=Tt(_,["tfdt"])[0],ee=new DataView(W.buffer,W.byteOffset,W.byteLength),de;W[0]===1?de=nm(W.subarray(4,12)):de=ee.getUint32(4);let xe;return typeof de=="bigint"?xe=de/eo.BigInt(q):typeof de=="number"&&!isNaN(de)&&(xe=de/q),xe<Number.MAX_SAFE_INTEGER&&(xe=Number(xe)),xe<v&&(v=xe),v},1/0);return typeof f=="bigint"||isFinite(f)?f:0},Fu=function(u,h){var p=Tt(h,["moof","traf"]),f=0,v=0,_;if(p&&p.length){var L=Tt(p[0],["tfhd"])[0],V=Tt(p[0],["trun"])[0],q=Tt(p[0],["tfdt"])[0];if(L){var W=em(L);_=W.trackId}if(q){var ee=im(q);f=ee.baseMediaDecodeTime}if(V){var de=tm(V);de.samples&&de.samples.length&&(v=de.samples[0].compositionTimeOffset||0)}}var xe=u[_]||9e4;typeof f=="bigint"&&(v=eo.BigInt(v),xe=eo.BigInt(xe));var fe=(f+v)/xe;return typeof fe=="bigint"&&fe<Number.MAX_SAFE_INTEGER&&(fe=Number(fe)),fe},$u=function(u){var h=Tt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v=Tt(f,["mdia","hdlr"]),_=Tt(f,["tkhd"]);v.forEach(function(L,V){var q=Un(L.subarray(8,12)),W=_[V],ee,de,xe;q==="vide"&&(ee=new DataView(W.buffer,W.byteOffset,W.byteLength),de=ee.getUint8(0),xe=de===0?ee.getUint32(12):ee.getUint32(20),p.push(xe))})}),p},Ja=function(u){var h=u[0],p=h===0?12:20;return Ns(u[p]<<24|u[p+1]<<16|u[p+2]<<8|u[p+3])},Uu=function(u){var h=Tt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v={},_=Tt(f,["tkhd"])[0],L,V;_&&(L=new DataView(_.buffer,_.byteOffset,_.byteLength),V=L.getUint8(0),v.id=V===0?L.getUint32(12):L.getUint32(20));var q=Tt(f,["mdia","hdlr"])[0];if(q){var W=Un(q.subarray(8,12));W==="vide"?v.type="video":W==="soun"?v.type="audio":v.type=W}var ee=Tt(f,["mdia","minf","stbl","stsd"])[0];if(ee){var de=ee.subarray(8);v.codec=Un(de.subarray(4,8));var xe=Tt(de,[v.codec])[0],fe,Me;xe&&(/^[asm]vc[1-9]$/i.test(v.codec)?(fe=xe.subarray(78),Me=Un(fe.subarray(4,8)),Me==="avcC"&&fe.length>11?(v.codec+=".",v.codec+=Or(fe[9]),v.codec+=Or(fe[10]),v.codec+=Or(fe[11])):v.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(v.codec)?(fe=xe.subarray(28),Me=Un(fe.subarray(4,8)),Me==="esds"&&fe.length>20&&fe[19]!==0?(v.codec+="."+Or(fe[19]),v.codec+="."+Or(fe[20]>>>2&63).replace(/^0/,"")):v.codec="mp4a.40.2"):v.codec=v.codec.toLowerCase())}var ze=Tt(f,["mdia","mdhd"])[0];ze&&(v.timescale=Ja(ze)),p.push(v)}),p},qu=function(u,h=0){var p=Tt(u,["emsg"]);return p.map(f=>{var v=Za.parseEmsgBox(new Uint8Array(f)),_=rm(v.message_data);return{cueTime:Za.scaleTime(v.presentation_time,v.timescale,v.presentation_time_delta,h),duration:Za.scaleTime(v.event_duration,v.timescale),frames:_}})};var Br={findBox:Tt,parseType:Un,timescale:Ru,startTime:Vu,compositionStartTime:Fu,videoTrackIds:$u,tracks:Uu,getTimescaleFromMediaHeader:Ja,getEmsgID3:qu};const{parseTrun:sm}=Lu,{findBox:zu}=Br;var ju=Pu,am=function(u){var h=zu(u,["moof","traf"]),p=zu(u,["mdat"]),f=[];return p.forEach(function(v,_){var L=h[_];f.push({mdat:v,traf:L})}),f},om=function(u,h,p){var f=h,v=p.defaultSampleDuration||0,_=p.defaultSampleSize||0,L=p.trackId,V=[];return u.forEach(function(q){var W=sm(q),ee=W.samples;ee.forEach(function(de){de.duration===void 0&&(de.duration=v),de.size===void 0&&(de.size=_),de.trackId=L,de.dts=f,de.compositionTimeOffset===void 0&&(de.compositionTimeOffset=0),typeof f=="bigint"?(de.pts=f+ju.BigInt(de.compositionTimeOffset),f+=ju.BigInt(de.duration)):(de.pts=f+de.compositionTimeOffset,f+=de.duration)}),V=V.concat(ee)}),V},Hu={getMdatTrafPairs:am,parseSamples:om},lm=qt.discardEmulationPreventionBytes,um=J.CaptionStream,to=Ka,cm=Qa,dm=Nu,{getMdatTrafPairs:hm,parseSamples:fm}=Hu,pm=function(u,h){for(var p=u,f=0;f<h.length;f++){var v=h[f];if(p<v.size)return v;p-=v.size}return null},mm=function(u,h,p){var f=new DataView(u.buffer,u.byteOffset,u.byteLength),v={logs:[],seiNals:[]},_,L,V,q;for(L=0;L+4<u.length;L+=V)if(V=f.getUint32(L),L+=4,!(V<=0))switch(u[L]&31){case 6:var W=u.subarray(L+1,L+1+V),ee=pm(L,h);if(_={nalUnitType:"sei_rbsp",size:V,data:W,escapedRBSP:lm(W),trackId:p},ee)_.pts=ee.pts,_.dts=ee.dts,q=ee;else if(q)_.pts=q.pts,_.dts=q.dts;else{v.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+L+" for trackId "+p+". See mux.js#223."});break}v.seiNals.push(_);break}return v},gm=function(u,h){var p={},f=hm(u);return f.forEach(function(v){var _=v.mdat,L=v.traf,V=to(L,["tfhd"]),q=dm(V[0]),W=q.trackId,ee=to(L,["tfdt"]),de=ee.length>0?cm(ee[0]).baseMediaDecodeTime:0,xe=to(L,["trun"]),fe,Me;h===W&&xe.length>0&&(fe=fm(xe,de,q),Me=mm(_,fe,W),p[W]||(p[W]={seiNals:[],logs:[]}),p[W].seiNals=p[W].seiNals.concat(Me.seiNals),p[W].logs=p[W].logs.concat(Me.logs))}),p},vm=function(u,h,p){var f;if(h===null)return null;f=gm(u,h);var v=f[h]||{};return{seiNals:v.seiNals,logs:v.logs,timescale:p}},ym=function(){var u=!1,h,p,f,v,_,L;this.isInitialized=function(){return u},this.init=function(V){h=new um,u=!0,L=V?V.isPartial:!1,h.on("data",function(q){q.startTime=q.startPts/v,q.endTime=q.endPts/v,_.captions.push(q),_.captionStreams[q.stream]=!0}),h.on("log",function(q){_.logs.push(q)})},this.isNewInit=function(V,q){return V&&V.length===0||q&&typeof q=="object"&&Object.keys(q).length===0?!1:f!==V[0]||v!==q[f]},this.parse=function(V,q,W){var ee;if(this.isInitialized()){if(!q||!W)return null;if(this.isNewInit(q,W))f=q[0],v=W[f];else if(f===null||!v)return p.push(V),null}else return null;for(;p.length>0;){var de=p.shift();this.parse(de,q,W)}return ee=vm(V,f,v),ee&&ee.logs&&(_.logs=_.logs.concat(ee.logs)),ee===null||!ee.seiNals?_.logs.length?{logs:_.logs,captions:[],captionStreams:[]}:null:(this.pushNals(ee.seiNals),this.flushStream(),_)},this.pushNals=function(V){if(!this.isInitialized()||!V||V.length===0)return null;V.forEach(function(q){h.push(q)})},this.flushStream=function(){if(!this.isInitialized())return null;L?h.partialFlush():h.flush()},this.clearParsedCaptions=function(){_.captions=[],_.captionStreams={},_.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;h.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){p=[],f=null,v=null,_?this.clearParsedCaptions():_={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},_m=ym;const{parseTfdt:Tm}=Lu,an=Ka,{getTimescaleFromMediaHeader:bm}=Br,{parseSamples:xm,getMdatTrafPairs:Cm}=Hu;var Gu=function(){let u=9e4;this.init=function(h){const p=an(h,["moov","trak","mdia","mdhd"])[0];p&&(u=bm(p))},this.parseSegment=function(h){const p=[],f=Cm(h);let v=0;return f.forEach(function(_){const L=_.mdat,V=_.traf,q=an(V,["tfdt"])[0],W=an(V,["tfhd"])[0],ee=an(V,["trun"]);if(q&&(v=Tm(q).baseMediaDecodeTime),ee.length&&W){const de=xm(ee,v,W);let xe=0;de.forEach(function(fe){const Me="utf-8",ze=new TextDecoder(Me),Bt=L.slice(xe,xe+fe.size);if(an(Bt,["vtte"])[0]){xe+=fe.size;return}an(Bt,["vttc"]).forEach(function(Lr){const Mr=an(Lr,["payl"])[0],Pr=an(Lr,["sttg"])[0],Rr=fe.pts/u,Bs=(fe.pts+fe.duration)/u;let ut,Vr;if(Mr)try{ut=ze.decode(Mr)}catch(Di){console.error(Di)}if(Pr)try{Vr=ze.decode(Pr)}catch(Di){console.error(Di)}fe.duration&&ut&&p.push({cueText:ut,start:Rr,end:Bs,settings:Vr})}),xe+=fe.size})}}),p}},io=ge,Wu=function(u){var h=u[1]&31;return h<<=8,h|=u[2],h},Is=function(u){return!!(u[1]&64)},Os=function(u){var h=0;return(u[3]&48)>>>4>1&&(h+=u[4]+1),h},Sm=function(u,h){var p=Wu(u);return p===0?"pat":p===h?"pmt":h?"pes":null},Em=function(u){var h=Is(u),p=4+Os(u);return h&&(p+=u[p]+1),(u[p+10]&31)<<8|u[p+11]},km=function(u){var h={},p=Is(u),f=4+Os(u);if(p&&(f+=u[f]+1),!!(u[f+5]&1)){var v,_,L;v=(u[f+1]&15)<<8|u[f+2],_=3+v-4,L=(u[f+10]&15)<<8|u[f+11];for(var V=12+L;V<_;){var q=f+V;h[(u[q+1]&31)<<8|u[q+2]]=u[q],V+=((u[q+3]&15)<<8|u[q+4])+5}return h}},wm=function(u,h){var p=Wu(u),f=h[p];switch(f){case io.H264_STREAM_TYPE:return"video";case io.ADTS_STREAM_TYPE:return"audio";case io.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Dm=function(u){var h=Is(u);if(!h)return null;var p=4+Os(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},no=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}},Am=function(u){for(var h=4+Os(u),p=u.subarray(h),f=0,v=0,_=!1,L;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&&(L=no(p[v+3]&31),L==="slice_layer_without_partitioning_rbsp_idr"&&(_=!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}L=no(p[v+3]&31),L==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0),v=f-2,f+=3;break;default:f+=3;break}return p=p.subarray(v),f-=v,v=0,p&&p.byteLength>3&&(L=no(p[v+3]&31),L==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0)),_},Nm={parseType:Sm,parsePat:Em,parsePmt:km,parsePayloadUnitStartIndicator:Is,parsePesType:wm,parsePesTime:Dm,videoPacketContainsKeyFrame:Am},Yu=ge,qn=vt.handleRollover,rt={};rt.ts=Nm,rt.aac=Xa;var Sn=Oe.ONE_SECOND_IN_TS,Qt=188,Mi=71,Im=function(u,h){for(var p=0,f=Qt,v,_;f<u.byteLength;){if(u[p]===Mi&&u[f]===Mi){switch(v=u.subarray(p,f),_=rt.ts.parseType(v,h.pid),_){case"pat":h.pid=rt.ts.parsePat(v);break;case"pmt":var L=rt.ts.parsePmt(v);h.table=h.table||{},Object.keys(L).forEach(function(V){h.table[V]=L[V]});break}p+=Qt,f+=Qt;continue}p++,f++}},Xu=function(u,h,p){for(var f=0,v=Qt,_,L,V,q,W,ee=!1;v<=u.byteLength;){if(u[f]===Mi&&(u[v]===Mi||v===u.byteLength)){switch(_=u.subarray(f,v),L=rt.ts.parseType(_,h.pid),L){case"pes":V=rt.ts.parsePesType(_,h.table),q=rt.ts.parsePayloadUnitStartIndicator(_),V==="audio"&&q&&(W=rt.ts.parsePesTime(_),W&&(W.type="audio",p.audio.push(W),ee=!0));break}if(ee)break;f+=Qt,v+=Qt;continue}f++,v++}for(v=u.byteLength,f=v-Qt,ee=!1;f>=0;){if(u[f]===Mi&&(u[v]===Mi||v===u.byteLength)){switch(_=u.subarray(f,v),L=rt.ts.parseType(_,h.pid),L){case"pes":V=rt.ts.parsePesType(_,h.table),q=rt.ts.parsePayloadUnitStartIndicator(_),V==="audio"&&q&&(W=rt.ts.parsePesTime(_),W&&(W.type="audio",p.audio.push(W),ee=!0));break}if(ee)break;f-=Qt,v-=Qt;continue}f--,v--}},Om=function(u,h,p){for(var f=0,v=Qt,_,L,V,q,W,ee,de,xe,fe=!1,Me={data:[],size:0};v<u.byteLength;){if(u[f]===Mi&&u[v]===Mi){switch(_=u.subarray(f,v),L=rt.ts.parseType(_,h.pid),L){case"pes":if(V=rt.ts.parsePesType(_,h.table),q=rt.ts.parsePayloadUnitStartIndicator(_),V==="video"&&(q&&!fe&&(W=rt.ts.parsePesTime(_),W&&(W.type="video",p.video.push(W),fe=!0)),!p.firstKeyFrame)){if(q&&Me.size!==0){for(ee=new Uint8Array(Me.size),de=0;Me.data.length;)xe=Me.data.shift(),ee.set(xe,de),de+=xe.byteLength;if(rt.ts.videoPacketContainsKeyFrame(ee)){var ze=rt.ts.parsePesTime(ee);ze?(p.firstKeyFrame=ze,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.")}Me.size=0}Me.data.push(_),Me.size+=_.byteLength}break}if(fe&&p.firstKeyFrame)break;f+=Qt,v+=Qt;continue}f++,v++}for(v=u.byteLength,f=v-Qt,fe=!1;f>=0;){if(u[f]===Mi&&u[v]===Mi){switch(_=u.subarray(f,v),L=rt.ts.parseType(_,h.pid),L){case"pes":V=rt.ts.parsePesType(_,h.table),q=rt.ts.parsePayloadUnitStartIndicator(_),V==="video"&&q&&(W=rt.ts.parsePesTime(_),W&&(W.type="video",p.video.push(W),fe=!0));break}if(fe)break;f-=Qt,v-=Qt;continue}f--,v--}},Bm=function(u,h){if(u.audio&&u.audio.length){var p=h;(typeof p>"u"||isNaN(p))&&(p=u.audio[0].dts),u.audio.forEach(function(_){_.dts=qn(_.dts,p),_.pts=qn(_.pts,p),_.dtsTime=_.dts/Sn,_.ptsTime=_.pts/Sn})}if(u.video&&u.video.length){var f=h;if((typeof f>"u"||isNaN(f))&&(f=u.video[0].dts),u.video.forEach(function(_){_.dts=qn(_.dts,f),_.pts=qn(_.pts,f),_.dtsTime=_.dts/Sn,_.ptsTime=_.pts/Sn}),u.firstKeyFrame){var v=u.firstKeyFrame;v.dts=qn(v.dts,f),v.pts=qn(v.pts,f),v.dtsTime=v.dts/Sn,v.ptsTime=v.pts/Sn}}},Lm=function(u){for(var h=!1,p=0,f=null,v=null,_=0,L=0,V;u.length-L>=3;){var q=rt.aac.parseType(u,L);switch(q){case"timed-metadata":if(u.length-L<10){h=!0;break}if(_=rt.aac.parseId3TagSize(u,L),_>u.length){h=!0;break}v===null&&(V=u.subarray(L,L+_),v=rt.aac.parseAacTimestamp(V)),L+=_;break;case"audio":if(u.length-L<7){h=!0;break}if(_=rt.aac.parseAdtsSize(u,L),_>u.length){h=!0;break}f===null&&(V=u.subarray(L,L+_),f=rt.aac.parseSampleRate(V)),p++,L+=_;break;default:L++;break}if(h)return null}if(f===null||v===null)return null;var W=Sn/f,ee={audio:[{type:"audio",dts:v,pts:v},{type:"audio",dts:v+p*1024*W,pts:v+p*1024*W}]};return ee},Mm=function(u){var h={pid:null,table:null},p={};Im(u,h);for(var f in h.table)if(h.table.hasOwnProperty(f)){var v=h.table[f];switch(v){case Yu.H264_STREAM_TYPE:p.video=[],Om(u,h,p),p.video.length===0&&delete p.video;break;case Yu.ADTS_STREAM_TYPE:p.audio=[],Xu(u,h,p),p.audio.length===0&&delete p.audio;break}}return p},Pm=function(u,h){var p=rt.aac.isLikelyAacData(u),f;return p?f=Lm(u):f=Mm(u),!f||!f.audio&&!f.video?null:(Bm(f,h),f)},Rm={inspect:Pm,parseAudioPes_:Xu};const Vm=function(u,h){h.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])}),h.on("done",function(p){u.postMessage({action:"done"})}),h.on("gopInfo",function(p){u.postMessage({action:"gopInfo",gopInfo:p})}),h.on("videoSegmentTimingInfo",function(p){const f={start:{decode:Oe.videoTsToSeconds(p.start.dts),presentation:Oe.videoTsToSeconds(p.start.pts)},end:{decode:Oe.videoTsToSeconds(p.end.dts),presentation:Oe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Oe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Oe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:f})}),h.on("audioSegmentTimingInfo",function(p){const f={start:{decode:Oe.videoTsToSeconds(p.start.dts),presentation:Oe.videoTsToSeconds(p.start.pts)},end:{decode:Oe.videoTsToSeconds(p.end.dts),presentation:Oe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Oe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Oe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:f})}),h.on("id3Frame",function(p){u.postMessage({action:"id3Frame",id3Frame:p})}),h.on("caption",function(p){u.postMessage({action:"caption",caption:p})}),h.on("trackinfo",function(p){u.postMessage({action:"trackinfo",trackInfo:p})}),h.on("audioTimingInfo",function(p){u.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Oe.videoTsToSeconds(p.start),end:Oe.videoTsToSeconds(p.end)}})}),h.on("videoTimingInfo",function(p){u.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Oe.videoTsToSeconds(p.start),end:Oe.videoTsToSeconds(p.end)}})}),h.on("log",function(p){u.postMessage({action:"log",log:p})})};class Ku{constructor(h,p){this.options=p||{},this.self=h,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Lp.Transmuxer(this.options),Vm(this.self,this.transmuxer)}pushMp4Captions(h){this.captionParser||(this.captionParser=new _m,this.captionParser.init());const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.captionParser.parse(p,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:f&&f.captions||[],logs:f&&f.logs||[],data:p.buffer},[p.buffer])}initMp4WebVttParser(h){this.webVttParser||(this.webVttParser=new Gu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.webVttParser.init(p)}getMp4WebVttText(h){this.webVttParser||(this.webVttParser=new Gu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.webVttParser.parseSegment(p);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:f||[],data:p.buffer},[p.buffer])}probeMp4StartTime({timescales:h,data:p}){const f=Br.startTime(h,p);this.self.postMessage({action:"probeMp4StartTime",startTime:f,data:p},[p.buffer])}probeMp4Tracks({data:h}){const p=Br.tracks(h);this.self.postMessage({action:"probeMp4Tracks",tracks:p,data:h},[h.buffer])}probeEmsgID3({data:h,offset:p}){const f=Br.getEmsgID3(h,p);this.self.postMessage({action:"probeEmsgID3",id3Frames:f,emsgData:h},[h.buffer])}probeTs({data:h,baseStartTime:p}){const f=typeof p=="number"&&!isNaN(p)?p*Oe.ONE_SECOND_IN_TS:void 0,v=Rm.inspect(h,f);let _=null;v&&(_={hasVideo:v.video&&v.video.length===2||!1,hasAudio:v.audio&&v.audio.length===2||!1},_.hasVideo&&(_.videoStart=v.video[0].ptsTime),_.hasAudio&&(_.audioStart=v.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:_,data:h},[h.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(h){const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(p)}reset(){this.transmuxer.reset()}setTimestampOffset(h){const p=h.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Oe.secondsToVideoTs(p)))}setAudioAppendStart(h){this.transmuxer.setAudioAppendStart(Math.ceil(Oe.secondsToVideoTs(h.appendStart)))}setRemux(h){this.transmuxer.setRemux(h.remux)}flush(h){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(h){this.transmuxer.alignGopsWith(h.gopsToAlignWith.slice())}}self.onmessage=function(u){if(u.data.action==="init"&&u.data.options){this.messageHandlers=new Ku(self,u.data.options);return}this.messageHandlers||(this.messageHandlers=new Ku(self)),u.data&&u.data.action&&u.data.action!=="init"&&this.messageHandlers[u.data.action]&&this.messageHandlers[u.data.action](u.data)}}));var p4=wf(f4);const m4=(r,e,t)=>{const{type:n,initSegment:s,captions:a,captionStreams:o,metadata:l,videoFrameDtsTime:c,videoFramePtsTime:d}=r.data.segment;e.buffer.push({captions:a,captionStreams:o,metadata:l});const g=r.data.segment.boxes||{data:r.data.segment.data},m={type:n,data:new Uint8Array(g.data,g.data.byteOffset,g.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};typeof c<"u"&&(m.videoFrameDtsTime=c),typeof d<"u"&&(m.videoFramePtsTime=d),t(m)},g4=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},v4=(r,e)=>{e.gopInfo=r.data.gopInfo},Nf=r=>{const{transmuxer:e,bytes:t,audioAppendStart:n,gopsToAlignWith:s,remux:a,onData:o,onTrackInfo:l,onAudioTimingInfo:c,onVideoTimingInfo:d,onVideoSegmentTimingInfo:g,onAudioSegmentTimingInfo:m,onId3:S,onCaptions:T,onDone:b,onEndedTimeline:y,onTransmuxerLog:E,isEndOfTimeline:I,segment:O,triggerSegmentEventFn:k}=r,z={buffer:[]};let $=I;const j=H=>{e.currentTransmux===r&&(H.data.action==="data"&&m4(H,z,o),H.data.action==="trackinfo"&&l(H.data.trackInfo),H.data.action==="gopInfo"&&v4(H,z),H.data.action==="audioTimingInfo"&&c(H.data.audioTimingInfo),H.data.action==="videoTimingInfo"&&d(H.data.videoTimingInfo),H.data.action==="videoSegmentTimingInfo"&&g(H.data.videoSegmentTimingInfo),H.data.action==="audioSegmentTimingInfo"&&m(H.data.audioSegmentTimingInfo),H.data.action==="id3Frame"&&S([H.data.id3Frame],H.data.id3Frame.dispatchType),H.data.action==="caption"&&T(H.data.caption),H.data.action==="endedtimeline"&&($=!1,y()),H.data.action==="log"&&E(H.data.log),H.data.type==="transmuxed"&&($||(e.onmessage=null,g4({transmuxedData:z,callback:b}),If(e))))},N=()=>{const H={message:"Received an error message from the transmuxer worker",metadata:{errorType:ae.Error.StreamingFailedToTransmuxSegment,segmentInfo:An({segment:O})}};b(null,H)};if(e.onmessage=j,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 H=t instanceof ArrayBuffer?t:t.buffer,x=t instanceof ArrayBuffer?0:t.byteOffset;k({type:"segmenttransmuxingstart",segment:O}),e.postMessage({action:"push",data:H,byteOffset:x,byteLength:t.byteLength},[H])}I&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},If=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():Nf(r.currentTransmux))},Ad=(r,e)=>{r.postMessage({action:e}),If(r)},Of=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,Ad(e,r);return}e.transmuxQueue.push(Ad.bind(null,e,r))},y4=r=>{Of("reset",r)},_4=r=>{Of("endTimeline",r)},Bf=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,Nf(r);return}r.transmuxer.transmuxQueue.push(r)},T4=r=>{const e=new p4;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 Ho={reset:y4,endTimeline:_4,transmux:Bf,createTransmuxer:T4};const er=function(r){const e=r.transmuxer,t=r.endAction||r.action,n=r.callback,s=bt({},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)},qi={FAILURE:2,TIMEOUT:-101,ABORTED:-102},Lf="wvtt",_l=r=>{r.forEach(e=>{e.abort()})},b4=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),x4=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},uu=(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:qi.TIMEOUT,xhr:e,metadata:n}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:qi.ABORTED,xhr:e,metadata:n}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:qi.FAILURE,xhr:e,metadata:n}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:qi.FAILURE,xhr:e,metadata:n}:null},Nd=(r,e,t,n)=>(s,a)=>{const o=a.response,l=uu(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:qi.FAILURE,xhr:a},r);const c=new DataView(o),d=new Uint32Array([c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12)]);for(let m=0;m<e.length;m++)e[m].bytes=d;const g={uri:a.uri};return n({type:"segmentkeyloadcomplete",segment:r,keyInfo:g}),t(null,r)},C4=(r,e)=>{e===Lf&&r.transmuxer.postMessage({action:"initMp4WebVttParser",data:r.map.bytes})},S4=(r,e,t)=>{e===Lf&&er({action:"getMp4WebVttText",data:r.bytes,transmuxer:r.transmuxer,callback:({data:n,mp4VttCues:s})=>{r.bytes=n,t(null,r,{mp4VttCues:s})}})},Mf=(r,e)=>{const t=Ol(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:qi.FAILURE,metadata:{mediaType:s}})}er({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:({tracks:n,data:s})=>(r.map.bytes=s,n.forEach(function(a){r.map.tracks=r.map.tracks||{},!r.map.tracks[a.type]&&(r.map.tracks[a.type]=a,typeof a.id=="number"&&a.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[a.id]=a.timescale),a.type==="text"&&C4(r,a.codec))}),e(null))})},E4=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:t})=>(n,s)=>{const a=uu(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,Mf(r,function(l){if(l)return l.xhr=s,l.status=s.status,e(l,r);e(null,r)})},k4=({segment:r,finishProcessingFn:e,responseType:t,triggerSegmentEventFn:n})=>(s,a)=>{const o=uu(s,a);if(o)return e(o,r);n({type:"segmentloaded",segment:r});const l=t==="arraybuffer"||!a.responseText?a.response:d4(a.responseText.substring(r.lastReachedChar||0));return r.stats=b4(a),r.key?r.encryptedBytes=new Uint8Array(l):r.bytes=new Uint8Array(l),e(null,r)},w4=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{const b=r.map&&r.map.tracks||{},y=!!(b.audio&&b.video);let E=n.bind(null,r,"audio","start");const I=n.bind(null,r,"audio","end");let O=n.bind(null,r,"video","start");const k=n.bind(null,r,"video","end"),z=()=>Bf({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:y,onData:$=>{$.type=$.type==="combined"?"video":$.type,g(r,$)},onTrackInfo:$=>{t&&(y&&($.isMuxed=!0),t(r,$))},onAudioTimingInfo:$=>{E&&typeof $.start<"u"&&(E($.start),E=null),I&&typeof $.end<"u"&&I($.end)},onVideoTimingInfo:$=>{O&&typeof $.start<"u"&&(O($.start),O=null),k&&typeof $.end<"u"&&k($.end)},onVideoSegmentTimingInfo:$=>{const j={pts:{start:$.start.presentation,end:$.end.presentation},dts:{start:$.start.decode,end:$.end.decode}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:j}),s($)},onAudioSegmentTimingInfo:$=>{const j={pts:{start:$.start.pts,end:$.end.pts},dts:{start:$.start.dts,end:$.end.dts}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:j}),a($)},onId3:($,j)=>{o(r,$,j)},onCaptions:$=>{l(r,[$])},isEndOfTimeline:c,onEndedTimeline:()=>{d()},onTransmuxerLog:S,onDone:($,j)=>{m&&($.type=$.type==="combined"?"video":$.type,T({type:"segmenttransmuxingcomplete",segment:r}),m(j,r,$))},segment:r,triggerSegmentEventFn:T});er({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:$=>{r.bytes=e=$.data;const j=$.result;j&&(t(r,{hasAudio:j.hasAudio,hasVideo:j.hasVideo,isMuxed:y}),t=null),z()}})},Pf=({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{let b=new Uint8Array(e);if(Y3(b)){r.isFmp4=!0;const{tracks:y}=r.map;if(y.text&&(!y.audio||!y.video)){g(r,{data:b,type:"text"}),S4(r,y.text.codec,m);return}const I={isFmp4:!0,hasVideo:!!y.video,hasAudio:!!y.audio};y.audio&&y.audio.codec&&y.audio.codec!=="enca"&&(I.audioCodec=y.audio.codec),y.video&&y.video.codec&&y.video.codec!=="encv"&&(I.videoCodec=y.video.codec),y.video&&y.audio&&(I.isMuxed=!0),t(r,I);const O=(k,z)=>{g(r,{data:b,type:I.hasAudio&&!I.isMuxed?"audio":"video"}),z&&z.length&&o(r,z),k&&k.length&&l(r,k),m(null,r,{})};er({action:"probeMp4StartTime",timescales:r.map.timescales,data:b,transmuxer:r.transmuxer,callback:({data:k,startTime:z})=>{e=k.buffer,r.bytes=b=k,I.hasAudio&&!I.isMuxed&&n(r,"audio","start",z),I.hasVideo&&n(r,"video","start",z),er({action:"probeEmsgID3",data:b,transmuxer:r.transmuxer,offset:z,callback:({emsgData:$,id3Frames:j})=>{if(e=$.buffer,r.bytes=b=$,!y.video||!$.byteLength||!r.transmuxer){O(void 0,j);return}er({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:b,timescales:r.map.timescales,trackIds:[y.video.id],callback:N=>{e=N.data.buffer,r.bytes=b=N.data,N.logs.forEach(function(H){S(nt(H,{stream:"mp4CaptionParser"}))}),O(N.captions,j)}})}})}});return}if(!r.transmuxer){m(null,r,{});return}if(typeof r.container>"u"&&(r.container=Ol(b)),r.container!=="ts"&&r.container!=="aac"){t(r,{hasAudio:!1,hasVideo:!1}),m(null,r,{});return}w4({segment:r,bytes:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})},Rf=function({id:r,key:e,encryptedBytes:t,decryptionWorker:n,segment:s,doneFn:a},o){const l=d=>{if(d.data.source===r){n.removeEventListener("message",l);const g=d.data.decrypted;o(new Uint8Array(g.bytes,g.byteOffset,g.byteLength))}};n.onerror=()=>{const d="An error occurred in the decryption worker",g=An({segment:s}),m={message:d,metadata:{error:new Error(d),errorType:ae.Error.StreamingFailedToDecryptSegment,segmentInfo:g,keyInfo:{uri:s.key.resolvedUri||s.map.key.resolvedUri}}};a(m,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])},D4=({decryptionWorker:r,segment:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{T({type:"segmentdecryptionstart"}),Rf({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:m},b=>{e.bytes=b,T({type:"segmentdecryptioncomplete",segment:e}),Pf({segment:e,bytes:e.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})})},A4=({activeXhrs:r,decryptionWorker:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{let b=0,y=!1;return(E,I)=>{if(!y){if(E)return y=!0,_l(r),m(E,I);if(b+=1,b===r.length){const O=function(){if(I.encryptedBytes)return D4({decryptionWorker:e,segment:I,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T});Pf({segment:I,bytes:I.bytes,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g,doneFn:m,onTransmuxerLog:S,triggerSegmentEventFn:T})};if(I.endOfAllRequests=Date.now(),I.map&&I.map.encryptedBytes&&!I.map.bytes)return T({type:"segmentdecryptionstart",segment:I}),Rf({decryptionWorker:e,id:I.requestId+"-init",encryptedBytes:I.map.encryptedBytes,key:I.map.key,segment:I,doneFn:m},k=>{I.map.bytes=k,T({type:"segmentdecryptioncomplete",segment:I}),Mf(I,z=>{if(z)return _l(r),m(z,I);O()})});O()}}}},N4=({loadendState:r,abortFn:e})=>t=>{t.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},I4=({segment:r,progressFn:e,trackInfoFn:t,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:g})=>m=>{if(!m.target.aborted)return r.stats=nt(r.stats,x4(m)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(m,r)},O4=({xhr:r,xhrOptions:e,decryptionWorker:t,segment:n,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:g,captionsFn:m,isEndOfTimeline:S,endedTimelineFn:T,dataFn:b,doneFn:y,onTransmuxerLog:E,triggerSegmentEventFn:I})=>{const O=[],k=A4({activeXhrs:O,decryptionWorker:t,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:g,captionsFn:m,isEndOfTimeline:S,endedTimelineFn:T,dataFn:b,doneFn:y,onTransmuxerLog:E,triggerSegmentEventFn:I});if(n.key&&!n.key.bytes){const H=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&H.push(n.map.key);const x=nt(e,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),w=Nd(n,H,k,I),P={uri:n.key.resolvedUri};I({type:"segmentkeyloadstart",segment:n,keyInfo:P});const K=r(x,w);O.push(K)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const K=nt(e,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),B=Nd(n,[n.map.key],k,I),U={uri:n.map.key.resolvedUri};I({type:"segmentkeyloadstart",segment:n,keyInfo:U});const R=r(K,B);O.push(R)}const x=nt(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:vl(n.map),requestType:"segment-media-initialization"}),w=E4({segment:n,finishProcessingFn:k,triggerSegmentEventFn:I});I({type:"segmentloadstart",segment:n});const P=r(x,w);O.push(P)}const z=nt(e,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:vl(n),requestType:"segment"}),$=k4({segment:n,finishProcessingFn:k,responseType:z.responseType,triggerSegmentEventFn:I});I({type:"segmentloadstart",segment:n});const j=r(z,$);j.addEventListener("progress",I4({segment:n,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:g,captionsFn:m,isEndOfTimeline:S,endedTimelineFn:T,dataFn:b})),O.push(j);const N={};return O.forEach(H=>{H.addEventListener("loadend",N4({loadendState:N,abortFn:s}))}),()=>_l(O)},qs=Ci("PlaylistSelector"),Id=function(r){if(!r||!r.playlist)return;const e=r.playlist;return JSON.stringify({id:e.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:e.attributes&&e.attributes.CODECS||""})},tr=function(r,e){if(!r)return"";const t=G.getComputedStyle(r);return t?t[e]:""},ir=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})},cu=function(r,e){let t,n;return r.attributes.BANDWIDTH&&(t=r.attributes.BANDWIDTH),t=t||G.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||G.Number.MAX_VALUE,t-n},B4=function(r,e){let t,n;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(t=r.attributes.RESOLUTION.width),t=t||G.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||G.Number.MAX_VALUE,t===n&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:t-n};let Vf=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 d=e.playlists;oi.isAudioOnly(e)&&(d=l.getAudioTrackPlaylists_(),c.audioOnly=!0);let g=d.map(N=>{let H;const x=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.width,w=N.attributes&&N.attributes.RESOLUTION&&N.attributes.RESOLUTION.height;return H=N.attributes&&N.attributes.BANDWIDTH,H=H||G.Number.MAX_VALUE,{bandwidth:H,width:x,height:w,playlist:N}});ir(g,(N,H)=>N.bandwidth-H.bandwidth),g=g.filter(N=>!oi.isIncompatible(N.playlist));let m=g.filter(N=>oi.isEnabled(N.playlist));m.length||(m=g.filter(N=>!oi.isDisabled(N.playlist)));const S=m.filter(N=>N.bandwidth*Lt.BANDWIDTH_VARIANCE<t);let T=S[S.length-1];const b=S.filter(N=>N.bandwidth===T.bandwidth)[0];if(o===!1){const N=b||m[0]||g[0];if(N&&N.playlist){let H="sortedPlaylistReps";return b&&(H="bandwidthBestRep"),m[0]&&(H="enabledPlaylistReps"),qs(`choosing ${Id(N)} using ${H} with options`,c),N.playlist}return qs("could not choose a playlist with options",c),null}const y=S.filter(N=>N.width&&N.height);ir(y,(N,H)=>N.width-H.width);const E=y.filter(N=>N.width===n&&N.height===s);T=E[E.length-1];const I=E.filter(N=>N.bandwidth===T.bandwidth)[0];let O,k,z;I||(O=y.filter(N=>a==="cover"?N.width>n&&N.height>s:N.width>n||N.height>s),k=O.filter(N=>N.width===O[0].width&&N.height===O[0].height),T=k[k.length-1],z=k.filter(N=>N.bandwidth===T.bandwidth)[0]);let $;if(l.leastPixelDiffSelector){const N=y.map(H=>(H.pixelDiff=Math.abs(H.width-n)+Math.abs(H.height-s),H));ir(N,(H,x)=>H.pixelDiff===x.pixelDiff?x.bandwidth-H.bandwidth:H.pixelDiff-x.pixelDiff),$=N[0]}const j=$||z||I||b||m[0]||g[0];if(j&&j.playlist){let N="sortedPlaylistReps";return $?N="leastPixelDiffRep":z?N="resolutionPlusOneRep":I?N="resolutionBestRep":b?N="bandwidthBestRep":m[0]&&(N="enabledPlaylistReps"),qs(`choosing ${Id(j)} using ${N} with options`,c),j.playlist}return qs("could not choose a playlist with options",c),null};const Od=function(){let r=this.useDevicePixelRatio&&G.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),Vf({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},L4=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&&G.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),Vf({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},M4=function(r){const{main:e,currentTime:t,bandwidth:n,duration:s,segmentDuration:a,timeUntilRebuffer:o,currentTimeline:l,syncController:c}=r,d=e.playlists.filter(b=>!oi.isIncompatible(b));let g=d.filter(oi.isEnabled);g.length||(g=d.filter(b=>!oi.isDisabled(b)));const S=g.filter(oi.hasAttribute.bind(null,"BANDWIDTH")).map(b=>{const E=c.getSyncPoint(b,s,l,t)?1:2,O=oi.estimateSegmentRequestTime(a,n,b)*E-o;return{playlist:b,rebufferingImpact:O}}),T=S.filter(b=>b.rebufferingImpact<=0);return ir(T,(b,y)=>cu(y.playlist,b.playlist)),T.length?T[0]:(ir(S,(b,y)=>b.rebufferingImpact-y.rebufferingImpact),S[0]||null)},P4=function(){const r=this.playlists.main.playlists.filter(oi.isEnabled);return ir(r,(t,n)=>cu(t,n)),r.filter(t=>!!es(this.playlists.main,t).video)[0]||null},R4=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 Ff(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const V4=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 d=a[n];d&&(o=d.label,l=d.language,c=d.default),r[t]=e.addRemoteTextTrack({kind:"captions",id:n,default:c,label:o,language:l},!1).track}}},F4=function({inbandTextTracks:r,captionArray:e,timestampOffset:t}){if(!e)return;const n=G.WebKitDataCue||G.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))})},$4=function(r){Object.defineProperties(r.frame,{id:{get(){return ae.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return ae.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return ae.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},U4=({inbandTextTracks:r,metadataArray:e,timestampOffset:t,videoDuration:n})=>{if(!e)return;const s=G.WebKitDataCue||G.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(g=>{const m=g.cueTime+t;typeof m!="number"||G.isNaN(m)||m<0||!(m<1/0)||!g.frames||!g.frames.length||g.frames.forEach(S=>{const T=new s(m,m,S.value||S.url||S.data||"");T.frame=S,T.value=S,$4(T),a.addCue(T)})}),!a.cues||!a.cues.length))return;const o=a.cues,l=[];for(let g=0;g<o.length;g++)o[g]&&l.push(o[g]);const c=l.reduce((g,m)=>{const S=g[m.startTime]||[];return S.push(m),g[m.startTime]=S,g},{}),d=Object.keys(c).sort((g,m)=>Number(g)-Number(m));d.forEach((g,m)=>{const S=c[g],T=isFinite(n)?n:g,b=Number(d[m+1])||T;S.forEach(y=>{y.endTime=b})})},q4={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"},z4=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),j4=({inbandTextTracks:r,dateRanges:e})=>{const t=r.metadataTrack_;if(!t)return;const n=G.WebKitDataCue||G.VTTCue;e.forEach(s=>{for(const a of Object.keys(s)){if(z4.has(a))continue;const o=new n(s.startTime,s.endTime,"");o.id=s.id,o.type="com.apple.quicktime.HLS",o.value={key:q4[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()})},Bd=(r,e,t)=>{r.metadataTrack_||(r.metadataTrack_=t.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ae.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},Yr=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)},H4=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}},G4=(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)},W4=(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)},Y4=(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},X4=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},K4=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]},jr=1,Q4=500,Ld=r=>typeof r=="number"&&isFinite(r),zs=1/60,Z4=(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,J4=(r,e,t)=>{let n=e-Lt.BACK_BUFFER_LENGTH;r.length&&(n=Math.max(n,r.start(0)));const s=e-t;return Math.min(s,n)},Hn=r=>{const{startOfSegment:e,duration:t,segment:n,part:s,playlist:{mediaSequence:a,id:o,segments:l=[]},mediaIndex:c,partIndex:d,timeline:g}=r,m=l.length-1;let S="mediaIndex/partIndex increment";r.getMediaInfoForTime?S=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(S="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(S+=` with independent ${r.independent}`);const T=typeof d=="number",b=r.segment.uri?"segment":"pre-segment",y=T?nf({preloadSegment:n})-1:0;return`${b} [${a+c}/${a+m}]`+(T?` part [${d}/${y}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(T?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${e}] duration [${t}] timeline [${g}] selected by [${S}] playlist [${o}]`},Md=r=>`${r}TimingInfo`,e8=({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,Tl=({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},t8=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)},i8=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),t=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&t&&e.to<t.to},cn=r=>{const e=r.pendingSegment_;if(!e)return;if(Tl({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&t8(r.timelineChangeController_)){if(i8(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}r.timelineChangeController_.trigger("fixBadTimelineChange")}},n8=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=G.BigInt(a)-G.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},Pd=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+$i:!1,r8=(r,e)=>{if(e!=="hls")return null;const t=n8({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!t)return null;const n=r.playlist.targetDuration,s=Pd({segmentDuration:t,maxDuration:n*2}),a=Pd({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 bl extends ae.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_=Ci(`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_():cn(this)}),this.sourceUpdater_.on("codecschange",n=>{this.trigger(bt({type:"codecschange"},n))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",n=>{this.trigger(bt({type:"timelinechange"},n)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():cn(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Ho.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_&&G.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,G.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_&&Ho.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Pt();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=ya(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=xf(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: ${zo(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_&&(G.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_&&Ho.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_=Y4(this.gopBuffer_,e,t,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,t,o));for(const l in this.inbandTextTracks_)Yr(e,t,this.inbandTextTracks_[l]);Yr(e,t,this.segmentMetadataTrack_),o()}monitorBuffer_(){this.checkBufferTimeout_&&G.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=G.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&G.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=G.setTimeout(this.monitorBufferTick_.bind(this),Q4)}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=zo(e)||0,n=su(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=K4(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 S=o[this.mediaIndex],
|
|
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_&&(G.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_&&Ho.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_=Y4(this.gopBuffer_,e,t,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,t,o));for(const l in this.inbandTextTracks_)Yr(e,t,this.inbandTextTracks_[l]);Yr(e,t,this.segmentMetadataTrack_),o()}monitorBuffer_(){this.checkBufferTimeout_&&G.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=G.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&G.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=G.setTimeout(this.monitorBufferTick_.bind(this),Q4)}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=zo(e)||0,n=su(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=K4(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 S=o[this.mediaIndex],T=typeof this.partIndex=="number"?this.partIndex:-1;l.startOfSegment=S.end?S.end:t,S.parts&&S.parts[T+1]?(l.mediaIndex=this.mediaIndex,l.partIndex=T+1):l.mediaIndex=this.mediaIndex+1}else{let S,T,b;const y=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
|
|
212
212
|
For TargetTime: ${y}.
|
|
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 E=this.getSyncInfoFromMediaSequenceSync_(y);if(!E){const O="No sync info found while using media sequence sync";return this.error({message:O,metadata:{errorType:ae.Error.StreamingFailedToSelectNextSegment,error:new Error(O)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${E.start} --> ${E.end})`),S=E.segmentIndex,b=E.partIndex,T=E.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const E=oi.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:y,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});S=E.segmentIndex,b=E.partIndex,T=E.startTime}l.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${y}`:`currentTime ${y}`,l.mediaIndex=S,l.startOfSegment=T,l.partIndex=b,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${l.mediaIndex} `)}const c=o[l.mediaIndex];let d=c&&typeof l.partIndex=="number"&&c.parts&&c.parts[l.partIndex];if(!c||typeof l.partIndex=="number"&&!d)return null;typeof l.partIndex!="number"&&c.parts&&(l.partIndex=0,d=c.parts[0]);const g=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!n&&d&&!g&&!d.independent)if(l.partIndex===0){const S=o[l.mediaIndex-1],b=S.parts&&S.parts.length&&S.parts[S.parts.length-1];b&&b.independent&&(l.mediaIndex-=1,l.partIndex=S.parts.length-1,l.independent="previous segment")}else c.parts[l.partIndex-1].independent&&(l.partIndex-=1,l.independent="previous part");const m=this.mediaSource_&&this.mediaSource_.readyState==="ended";return l.mediaIndex>=o.length-1&&m&&!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:d}=e,g=n.segments[s],m=typeof l=="number"&&g.parts[l],S={requestId:"segment-loader-"+Math.random(),uri:m&&m.resolvedUri||g.resolvedUri,mediaIndex:s,partIndex:m?l:null,isSyncRequest:o,startOfSegment:a,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:g.timeline,duration:m&&m.duration||g.duration,segment:g,part:m,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:d,independent:t},b=typeof c<"u"?c:this.isPendingTimestampOffset_;S.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:g.timeline,currentTimeline:this.currentTimeline_,startOfSegment:a,buffered:this.buffered_(),overrideCheck:b});const T=zo(this.sourceUpdater_.audioBuffered());return typeof T=="number"&&(S.audioAppendStart=T-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(S.gopsToAlignWith=G4(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),S}timestampOffsetForSegment_(e){return e8(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=oi.estimateSegmentRequestTime(s,n,this.playlist_,e.bytesReceived),o=xb(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(a<=o)return;const l=M4({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 d=a-o-l.rebufferingImpact;let g=.5;o<=$i&&(g=1),!(!l.playlist||l.playlist.uri===this.playlist_.uri||d<g)&&(this.bandwidth=l.playlist.attributes.BANDWIDTH*Lt.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Hn(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||{},X4(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_():cn(this))))}handleTimingInfo_(e,t,n,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const a=this.pendingSegment_,o=Md(t);a[o]=a[o]||{},a[o][n]=s,this.logger_(`timinginfo: ${t} - ${n} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(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:d}=a[o],g=this.inbandTextTracks_;this.logger_(`adding cues from ${l} -> ${c} for ${o}`),V4(g,this.vhs_.tech_,o),Yr(l,c,g[o]),F4({captionArray:d,inbandTextTracks:g,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_()?!Tl({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||Tl({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_()){cn(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[Md(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=ya(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,d=o.length?o.start(0):0,g=o.length?o.end(o.length-1):0;if(c-l<=jr&&g-d<=jr){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 S=this.currentTime_()-jr;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${S}`),this.remove(0,S,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${jr}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=G.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},jr*1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:n},s){if(s){if(s.code===pf){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:ae.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=R4({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_()){cn(this),this.loadQueue_.push(()=>{const t=bt({},e,{forceTimestampOffset:!0});bt(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 E=this.getSyncInfoFromMediaSequenceSync_(y);if(!E){const I="No sync info found while using media sequence sync";return this.error({message:I,metadata:{errorType:ae.Error.StreamingFailedToSelectNextSegment,error:new Error(I)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${E.start} --> ${E.end})`),S=E.segmentIndex,T=E.partIndex,b=E.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const E=oi.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:y,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});S=E.segmentIndex,T=E.partIndex,b=E.startTime}l.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${y}`:`currentTime ${y}`,l.mediaIndex=S,l.startOfSegment=b,l.partIndex=T,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${l.mediaIndex} `)}const c=o[l.mediaIndex];let d=c&&typeof l.partIndex=="number"&&c.parts&&c.parts[l.partIndex];if(!c||typeof l.partIndex=="number"&&!d)return null;typeof l.partIndex!="number"&&c.parts&&(l.partIndex=0,d=c.parts[0]);const g=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!n&&d&&!g&&!d.independent)if(l.partIndex===0){const S=o[l.mediaIndex-1],T=S.parts&&S.parts.length&&S.parts[S.parts.length-1];T&&T.independent&&(l.mediaIndex-=1,l.partIndex=S.parts.length-1,l.independent="previous segment")}else c.parts[l.partIndex-1].independent&&(l.partIndex-=1,l.independent="previous part");const m=this.mediaSource_&&this.mediaSource_.readyState==="ended";return l.mediaIndex>=o.length-1&&m&&!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:d}=e,g=n.segments[s],m=typeof l=="number"&&g.parts[l],S={requestId:"segment-loader-"+Math.random(),uri:m&&m.resolvedUri||g.resolvedUri,mediaIndex:s,partIndex:m?l:null,isSyncRequest:o,startOfSegment:a,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:g.timeline,duration:m&&m.duration||g.duration,segment:g,part:m,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:d,independent:t},T=typeof c<"u"?c:this.isPendingTimestampOffset_;S.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:g.timeline,currentTimeline:this.currentTimeline_,startOfSegment:a,buffered:this.buffered_(),overrideCheck:T});const b=zo(this.sourceUpdater_.audioBuffered());return typeof b=="number"&&(S.audioAppendStart=b-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(S.gopsToAlignWith=G4(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),S}timestampOffsetForSegment_(e){return e8(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=oi.estimateSegmentRequestTime(s,n,this.playlist_,e.bytesReceived),o=xb(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(a<=o)return;const l=M4({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 d=a-o-l.rebufferingImpact;let g=.5;o<=$i&&(g=1),!(!l.playlist||l.playlist.uri===this.playlist_.uri||d<g)&&(this.bandwidth=l.playlist.attributes.BANDWIDTH*Lt.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Hn(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||{},X4(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_():cn(this))))}handleTimingInfo_(e,t,n,s){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const a=this.pendingSegment_,o=Md(t);a[o]=a[o]||{},a[o][n]=s,this.logger_(`timinginfo: ${t} - ${n} - ${s}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(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:d}=a[o],g=this.inbandTextTracks_;this.logger_(`adding cues from ${l} -> ${c} for ${o}`),V4(g,this.vhs_.tech_,o),Yr(l,c,g[o]),F4({captionArray:d,inbandTextTracks:g,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_()?!Tl({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||Tl({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_()){cn(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[Md(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=ya(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,d=o.length?o.start(0):0,g=o.length?o.end(o.length-1):0;if(c-l<=jr&&g-d<=jr){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 S=this.currentTime_()-jr;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${S}`),this.remove(0,S,()=>{this.logger_(`On QUOTA_EXCEEDED_ERR, retrying append in ${jr}s`),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=G.setTimeout(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()},jr*1e3)},!0)}handleAppendError_({segmentInfo:e,type:t,bytes:n},s){if(s){if(s.code===pf){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:ae.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=R4({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_()){cn(this),this.loadQueue_.push(()=>{const t=bt({},e,{forceTimestampOffset:!0});bt(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
|
${Ff(e.uri)}
|
|
218
|
-
${Hn(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=O4({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:d})=>{this.logger_(`${Hn(e)} logged from transmuxer stream ${d} as a ${c}: ${l}`)},triggerSegmentEventFn:({type:l,segment:c,keyInfo:d,trackInfo:g,timingInfo:m})=>{const b={segmentInfo:An({segment:c})};d&&(b.keyInfo=d),g&&(b.trackInfo=g),m&&(b.timingInfo=m),this.trigger({type:l,metadata:b})}})}trimBackBuffer_(e){const t=J4(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<zs){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${zs}`);return}const n={bandwidthInfo:{from:this.bandwidth,to: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===qi.ABORTED)return;if(this.pause(),e.code===qi.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=W4(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 d=t.segments[n-1];return n===0||!d||typeof d.start>"u"||d.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=Z4(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=r8(e,this.sourceType_);if(t&&(t.severity==="warn"?ae.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 ${Hn(e)}`);return}this.logger_(`Appended ${Hn(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"} ${Hn(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<zs){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${zs}`);return}const 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(!Ld(n)||!Ld(s))return;Yr(n,s,this.segmentMetadataTrack_);const a=G.WebKitDataCue||G.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 en(){}const $f=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},s8=["video","audio"],xl=(r,e)=>{const t=e[`${r}Buffer`];return t&&t.updating||e.queuePending[r]},a8=(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},nr=(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(),nr("audio",e),nr("video",e));return}if(r!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||xl(r,e))){if(n.type!==r){if(t=a8(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,nr(r,e);return}}},Uf=(r,e)=>{const t=e[`${r}Buffer`],n=$f(r);t&&(t.removeEventListener("updateend",e[`on${n}UpdateEnd_`]),t.removeEventListener("error",e[`on${n}Error_`]),e.codecs[r]=null,e[`${r}Buffer`]=null)},Vi=(r,e)=>r&&e&&Array.prototype.indexOf.call(r.sourceBuffers,e)!==-1,hi={appendBuffer:(r,e,t)=>(n,s)=>{const a=s[`${n}Buffer`];if(Vi(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===pf?"(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(Vi(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`];Vi(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){ae.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){ae.log.warn("Failed to set media source duration",t)}},abort:()=>(r,e)=>{if(e.mediaSource.readyState!=="open")return;const t=e[`${r}Buffer`];if(Vi(e.mediaSource,t)){e.logger_(`calling abort on ${r}Buffer`);try{t.abort()}catch(n){ae.log.warn(`Failed to abort on ${r}Buffer`,n)}}},addSourceBuffer:(r,e)=>t=>{const n=$f(r),s=rr(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(Uf(r,e),!!Vi(e.mediaSource,t)){e.logger_(`Removing ${r}Buffer with codec ${e.codecs[r]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(n){ae.log.warn(`Failed to removeSourceBuffer ${r}Buffer`,n)}}},changeType:r=>(e,t)=>{const n=t[`${e}Buffer`],s=rr(r);if(!Vi(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(d){c.errorType=ae.Error.StreamingCodecsChangeError,c.error=d,d.metadata=c,t.error_=d,t.trigger("error"),ae.log.warn(`Failed to changeType on ${e}Buffer`,d)}}},fi=({type:r,sourceUpdater:e,action:t,doneFn:n,name:s})=>{e.queue.push({type:r,action:t,doneFn:n,name:s}),nr(r,e)},Rd=(r,e)=>t=>{const n=e[`${r}Buffered`](),s=_b(n);if(e.logger_(`received "updateend" event for ${r} Source Buffer: `,s),e.queuePending[r]){const a=e.queuePending[r].doneFn;e.queuePending[r]=null,a&&a(e[`${r}Error_`])}nr(r,e)};class qf extends ae.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>nr("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Ci("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Rd("video",this),this.onAudioUpdateEnd_=Rd("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){fi({type:"mediaSource",sourceUpdater:this,action:hi.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){fi({type:e,sourceUpdater:this,action:hi.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){ae.log.error("removeSourceBuffer is not supported!");return}fi({type:"mediaSource",sourceUpdater:this,action:hi.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!ae.browser.IS_FIREFOX&&G.MediaSource&&G.MediaSource.prototype&&typeof G.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return G.SourceBuffer&&G.SourceBuffer.prototype&&typeof G.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){if(!this.canChangeType()){ae.log.error("changeType is not supported!");return}fi({type:e,sourceUpdater:this,action:hi.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(fi({type:s,sourceUpdater:this,action:hi.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 Vi(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Pt()}videoBuffered(){return Vi(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Pt()}buffered(){const e=Vi(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Vi(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():bb(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=en){fi({type:"mediaSource",sourceUpdater:this,action:hi.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=en){typeof e!="string"&&(e=void 0),fi({type:"mediaSource",sourceUpdater:this,action:hi.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,n=en){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){n();return}fi({type:"audio",sourceUpdater:this,action:hi.remove(e,t),doneFn:n,name:"remove"})}removeVideo(e,t,n=en){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){n();return}fi({type:"video",sourceUpdater:this,action:hi.remove(e,t),doneFn:n,name:"remove"})}updating(){return!!(xl("audio",this)||xl("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(fi({type:"audio",sourceUpdater:this,action:hi.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(fi({type:"video",sourceUpdater:this,action:hi.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&fi({type:"audio",sourceUpdater:this,action:hi.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&fi({type:"video",sourceUpdater:this,action:hi.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),s8.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Uf(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Vd=r=>decodeURIComponent(escape(String.fromCharCode.apply(null,r))),o8=r=>{const e=new Uint8Array(r);return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")},Fd=new Uint8Array(`
|
|
218
|
+
${Hn(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=O4({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:d})=>{this.logger_(`${Hn(e)} logged from transmuxer stream ${d} as a ${c}: ${l}`)},triggerSegmentEventFn:({type:l,segment:c,keyInfo:d,trackInfo:g,timingInfo:m})=>{const T={segmentInfo:An({segment:c})};d&&(T.keyInfo=d),g&&(T.trackInfo=g),m&&(T.timingInfo=m),this.trigger({type:l,metadata:T})}})}trimBackBuffer_(e){const t=J4(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<zs){this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record ${zs}`);return}const n={bandwidthInfo:{from:this.bandwidth,to: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===qi.ABORTED)return;if(this.pause(),e.code===qi.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}const s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=W4(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 d=t.segments[n-1];return n===0||!d||typeof d.start>"u"||d.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=Z4(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=r8(e,this.sourceType_);if(t&&(t.severity==="warn"?ae.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 ${Hn(e)}`);return}this.logger_(`Appended ${Hn(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"} ${Hn(e)}`),this.resetEverything();return}this.mediaIndex!==null&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<zs){this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record ${zs}`);return}const 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(!Ld(n)||!Ld(s))return;Yr(n,s,this.segmentMetadataTrack_);const a=G.WebKitDataCue||G.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 en(){}const $f=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},s8=["video","audio"],xl=(r,e)=>{const t=e[`${r}Buffer`];return t&&t.updating||e.queuePending[r]},a8=(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},nr=(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(),nr("audio",e),nr("video",e));return}if(r!=="mediaSource"&&!(!e.ready()||e.mediaSource.readyState==="closed"||xl(r,e))){if(n.type!==r){if(t=a8(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,nr(r,e);return}}},Uf=(r,e)=>{const t=e[`${r}Buffer`],n=$f(r);t&&(t.removeEventListener("updateend",e[`on${n}UpdateEnd_`]),t.removeEventListener("error",e[`on${n}Error_`]),e.codecs[r]=null,e[`${r}Buffer`]=null)},Vi=(r,e)=>r&&e&&Array.prototype.indexOf.call(r.sourceBuffers,e)!==-1,hi={appendBuffer:(r,e,t)=>(n,s)=>{const a=s[`${n}Buffer`];if(Vi(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===pf?"(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(Vi(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`];Vi(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){ae.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){ae.log.warn("Failed to set media source duration",t)}},abort:()=>(r,e)=>{if(e.mediaSource.readyState!=="open")return;const t=e[`${r}Buffer`];if(Vi(e.mediaSource,t)){e.logger_(`calling abort on ${r}Buffer`);try{t.abort()}catch(n){ae.log.warn(`Failed to abort on ${r}Buffer`,n)}}},addSourceBuffer:(r,e)=>t=>{const n=$f(r),s=rr(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(Uf(r,e),!!Vi(e.mediaSource,t)){e.logger_(`Removing ${r}Buffer with codec ${e.codecs[r]} from mediaSource`);try{e.mediaSource.removeSourceBuffer(t)}catch(n){ae.log.warn(`Failed to removeSourceBuffer ${r}Buffer`,n)}}},changeType:r=>(e,t)=>{const n=t[`${e}Buffer`],s=rr(r);if(!Vi(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(d){c.errorType=ae.Error.StreamingCodecsChangeError,c.error=d,d.metadata=c,t.error_=d,t.trigger("error"),ae.log.warn(`Failed to changeType on ${e}Buffer`,d)}}},fi=({type:r,sourceUpdater:e,action:t,doneFn:n,name:s})=>{e.queue.push({type:r,action:t,doneFn:n,name:s}),nr(r,e)},Rd=(r,e)=>t=>{const n=e[`${r}Buffered`](),s=_b(n);if(e.logger_(`received "updateend" event for ${r} Source Buffer: `,s),e.queuePending[r]){const a=e.queuePending[r].doneFn;e.queuePending[r]=null,a&&a(e[`${r}Error_`])}nr(r,e)};class qf extends ae.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>nr("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Ci("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=Rd("video",this),this.onAudioUpdateEnd_=Rd("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){fi({type:"mediaSource",sourceUpdater:this,action:hi.addSourceBuffer(e,t),name:"addSourceBuffer"})}abort(e){fi({type:e,sourceUpdater:this,action:hi.abort(e),name:"abort"})}removeSourceBuffer(e){if(!this.canRemoveSourceBuffer()){ae.log.error("removeSourceBuffer is not supported!");return}fi({type:"mediaSource",sourceUpdater:this,action:hi.removeSourceBuffer(e),name:"removeSourceBuffer"})}canRemoveSourceBuffer(){return!ae.browser.IS_FIREFOX&&G.MediaSource&&G.MediaSource.prototype&&typeof G.MediaSource.prototype.removeSourceBuffer=="function"}static canChangeType(){return G.SourceBuffer&&G.SourceBuffer.prototype&&typeof G.SourceBuffer.prototype.changeType=="function"}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){if(!this.canChangeType()){ae.log.error("changeType is not supported!");return}fi({type:e,sourceUpdater:this,action:hi.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(fi({type:s,sourceUpdater:this,action:hi.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 Vi(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Pt()}videoBuffered(){return Vi(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Pt()}buffered(){const e=Vi(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=Vi(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():bb(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=en){fi({type:"mediaSource",sourceUpdater:this,action:hi.duration(e),name:"duration",doneFn:t})}endOfStream(e=null,t=en){typeof e!="string"&&(e=void 0),fi({type:"mediaSource",sourceUpdater:this,action:hi.endOfStream(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,n=en){if(!this.audioBuffered().length||this.audioBuffered().end(0)===0){n();return}fi({type:"audio",sourceUpdater:this,action:hi.remove(e,t),doneFn:n,name:"remove"})}removeVideo(e,t,n=en){if(!this.videoBuffered().length||this.videoBuffered().end(0)===0){n();return}fi({type:"video",sourceUpdater:this,action:hi.remove(e,t),doneFn:n,name:"remove"})}updating(){return!!(xl("audio",this)||xl("video",this))}audioTimestampOffset(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(fi({type:"audio",sourceUpdater:this,action:hi.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(fi({type:"video",sourceUpdater:this,action:hi.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&fi({type:"audio",sourceUpdater:this,action:hi.callback(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&fi({type:"video",sourceUpdater:this,action:hi.callback(e),name:"callback"})}dispose(){this.trigger("dispose"),s8.forEach(e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`](()=>Uf(e,this))}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const Vd=r=>decodeURIComponent(escape(String.fromCharCode.apply(null,r))),o8=r=>{const e=new Uint8Array(r);return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")},Fd=new Uint8Array(`
|
|
219
219
|
|
|
220
220
|
`.split("").map(r=>r.charCodeAt(0)));class l8 extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class u8 extends bl{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 Pt();const e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Pt([[t,n]])}initSegmentForMap(e,t=!1){if(!e)return null;const n=ya(e);let s=this.initSegments_[n];if(t&&!s&&e.bytes){const a=Fd.byteLength+e.bytes.byteLength,o=new Uint8Array(a);o.set(e.bytes),o.set(Fd,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){Yr(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===qi.TIMEOUT&&this.handleTimeout_(),e.code===qi.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}const s=this.pendingSegment_,a=n.mp4VttCues&&n.mp4VttCues.length;a&&(s.mp4VttCues=n.mp4VttCues),this.saveBandwidthRelatedStats_(s.duration,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 G.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:ae.Error.StreamingVttParserError,error:l}});return}if(a||this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=o.duration,s.cues.forEach(l=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new G.VTTCue(l.startTime,l.endTime,l.text):l)}),H4(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 G.VTTCue(s,a,n.cueText);n.settings&&n.settings.split(" ").forEach(l=>{const c=l.split(":"),d=c[0],g=c[1];o[d]=isNaN(g)?g:Number(g)}),e.cues.push(o)})}parseVTTCues_(e){let t,n=!1;if(typeof G.WebVTT!="function")throw new l8;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues){this.parseMp4VttCues_(e);return}typeof G.TextDecoder=="function"?t=new G.TextDecoder("utf8"):(t=G.WebVTT.StringDecoder(),n=!0);const s=new G.WebVTT.Parser(G,G.vttjs,t);if(s.oncue=e.cues.push.bind(e.cues),s.ontimestampmap=o=>{e.timestampmap=o},s.onparsingerror=o=>{ae.log.warn("Error encountered when parsing cues: "+o.message)},e.segment.map){let o=e.segment.map.bytes;n&&(o=Vd(o)),s.parse(o)}let a=e.bytes;n&&(a=Vd(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(d=>{const g=d.endTime-d.startTime,m=this.handleRollover_(d.startTime+c,t.time);d.startTime=Math.max(m,0),d.endTime=Math.max(m+g,0)}),!n.syncInfo){const d=e.cues[0].startTime,g=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(d,g-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 c8=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},d8=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=c8(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 G.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 G.VTTCue(n,n+o.duration,""),s.adStartTime=n-l,s.adEndTime=s.adStartTime+c,e.addCue(s)}n+=o.duration}};class $d{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 h8{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 zf{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,d)=>{const g=this.storage_.get(l),m=o,S=m+c.duration,
|
|
222
|
-
`,
|
|
223
|
-
`,l++,o=S}),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 Ud extends zf{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 f8=86400,Go=[{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=hl(e);s=s||0;for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),g=l[d],m=g.segment,S=r.timelineToDatetimeMappings[m.timeline];if(!S||!m.dateTimeObject)continue;let T=m.dateTimeObject.getTime()/1e3+S;if(m.parts&&typeof g.partIndex=="number")for(let E=0;E<g.partIndex;E++)T+=m.parts[E].duration;const y=Math.abs(s-T);if(o!==null&&(y===0||o<y))break;o=y,a={time:T,segmentIndex:g.segmentIndex,partIndex:g.partIndex}}return a}},{name:"Segment",run:(r,e,t,n,s)=>{let a=null,o=null;s=s||0;const l=hl(e);for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),g=l[d],m=g.segment,S=g.part&&g.part.start||m&&m.start;if(m.timeline===n&&typeof S<"u"){const b=Math.abs(s-S);if(o!==null&&o<b)break;(!a||o===null||o>=b)&&(o=b,a={time:S,segmentIndex:g.segmentIndex,partIndex:g.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],d=e.discontinuitySequence+l+1,g=r.discontinuities[d];if(g){const m=Math.abs(s-g.time);if(o!==null&&o<m)break;(!a||o===null||o>=m)&&(o=m,a={time:g.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 p8 extends ae.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new zf,n=new Ud(t),s=new Ud(t);this.mediaSequenceStorage_={main:t,audio:n,vtt:s},this.logger_=Ci("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,n,s,a){if(t!==1/0)return Go.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:d}=l,{segmentIndex:g,time:m}=c;if(g<0)continue;const S=e.segments[g],b=m,T=b+S.duration;if(this.logger_(`Strategy: ${d}. Current time: ${s}. selected segment: ${g}. Time: [${b} -> ${T}]}`),s>=b&&s<T)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+Jr({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,n,s,a){const o=[];for(let l=0;l<Go.length;l++){const c=Go[l],d=c.run(this,e,t,n,s,a);d&&(d.strategy=c.name,o.push({strategy:c.name,syncPoint:d}))}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>f8){ae.log.warn(`Not saving expired segment info. Media sequence gap ${n} is too large.`);return}for(let s=n-1;s>=0;s--){const a=e.segments[s];if(a&&typeof a.start<"u"){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 d;l<0?d=n.start-Jr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:a}):d=n.end+Jr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[o]={time:d,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class m8 extends ae.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 g8=Df(Af(function(){var r=(function(){function y(){this.listeners={}}var E=y.prototype;return E.on=function(D,I){this.listeners[D]||(this.listeners[D]=[]),this.listeners[D].push(I)},E.off=function(D,I){if(!this.listeners[D])return!1;var H=this.listeners[D].indexOf(I);return this.listeners[D]=this.listeners[D].slice(0),this.listeners[D].splice(H,1),H>-1},E.trigger=function(D){var I=this.listeners[D];if(I)if(arguments.length===2)for(var H=I.length,$=0;$<H;++$)I[$].call(this,arguments[1]);else for(var z=Array.prototype.slice.call(arguments,1),N=I.length,j=0;j<N;++j)I[j].apply(this,z)},E.dispose=function(){this.listeners={}},E.pipe=function(D){this.on("data",function(I){D.push(I)})},y})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(y){return y.subarray(0,y.byteLength-y[y.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const t=function(){const y=[[[],[],[],[],[]],[[],[],[],[],[]]],E=y[0],O=y[1],D=E[4],I=O[4];let H,$,z;const N=[],j=[];let x,w,P,K,L,U;for(H=0;H<256;H++)j[(N[H]=H<<1^(H>>7)*283)^H]=H;for($=z=0;!D[$];$^=x||1,z=j[z]||1)for(K=z^z<<1^z<<2^z<<3^z<<4,K=K>>8^K&255^99,D[$]=K,I[K]=$,P=N[w=N[x=N[$]]],U=P*16843009^w*65537^x*257^$*16843008,L=N[K]*257^K*16843008,H=0;H<4;H++)E[H][$]=L=L<<24^L>>>8,O[H][K]=U=U<<24^U>>>8;for(H=0;H<5;H++)E[H]=E[H].slice(0),O[H]=O[H].slice(0);return y};let n=null;class s{constructor(E){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 O,D,I;const H=this._tables[0][4],$=this._tables[1],z=E.length;let N=1;if(z!==4&&z!==6&&z!==8)throw new Error("Invalid aes key size");const j=E.slice(0),x=[];for(this._key=[j,x],O=z;O<4*z+28;O++)I=j[O-1],(O%z===0||z===8&&O%z===4)&&(I=H[I>>>24]<<24^H[I>>16&255]<<16^H[I>>8&255]<<8^H[I&255],O%z===0&&(I=I<<8^I>>>24^N<<24,N=N<<1^(N>>7)*283)),j[O]=j[O-z]^I;for(D=0;O;D++,O--)I=j[D&3?O:O-4],O<=4||D<4?x[D]=I:x[D]=$[0][H[I>>>24]]^$[1][H[I>>16&255]]^$[2][H[I>>8&255]]^$[3][H[I&255]]}decrypt(E,O,D,I,H,$){const z=this._key[1];let N=E^z[0],j=I^z[1],x=D^z[2],w=O^z[3],P,K,L;const U=z.length/4-2;let V,X=4;const F=this._tables[1],B=F[0],Q=F[1],Z=F[2],oe=F[3],ce=F[4];for(V=0;V<U;V++)P=B[N>>>24]^Q[j>>16&255]^Z[x>>8&255]^oe[w&255]^z[X],K=B[j>>>24]^Q[x>>16&255]^Z[w>>8&255]^oe[N&255]^z[X+1],L=B[x>>>24]^Q[w>>16&255]^Z[N>>8&255]^oe[j&255]^z[X+2],w=B[w>>>24]^Q[N>>16&255]^Z[j>>8&255]^oe[x&255]^z[X+3],X+=4,N=P,j=K,x=L;for(V=0;V<4;V++)H[(3&-V)+$]=ce[N>>>24]<<24^ce[j>>16&255]<<16^ce[x>>8&255]<<8^ce[w&255]^z[X++],P=N,N=j,j=x,x=w,w=P}}class a extends r{constructor(){super(r),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(E){this.jobs.push(E),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(y){return y<<24|(y&65280)<<8|(y&16711680)>>8|y>>>24},l=function(y,E,O){const D=new Int32Array(y.buffer,y.byteOffset,y.byteLength>>2),I=new s(Array.prototype.slice.call(E)),H=new Uint8Array(y.byteLength),$=new Int32Array(H.buffer);let z,N,j,x,w,P,K,L,U;for(z=O[0],N=O[1],j=O[2],x=O[3],U=0;U<D.length;U+=4)w=o(D[U]),P=o(D[U+1]),K=o(D[U+2]),L=o(D[U+3]),I.decrypt(w,P,K,L,$,U),$[U]=o($[U]^z),$[U+1]=o($[U+1]^N),$[U+2]=o($[U+2]^j),$[U+3]=o($[U+3]^x),z=w,N=P,j=K,x=L;return H};class c{constructor(E,O,D,I){const H=c.STEP,$=new Int32Array(E.buffer),z=new Uint8Array(E.byteLength);let N=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_($.subarray(N,N+H),O,D,z)),N=H;N<$.length;N+=H)D=new Uint32Array([o($[N-4]),o($[N-3]),o($[N-2]),o($[N-1])]),this.asyncStream_.push(this.decryptChunk_($.subarray(N,N+H),O,D,z));this.asyncStream_.push(function(){I(null,e(z))})}static get STEP(){return 32e3}decryptChunk_(E,O,D,I){return function(){const H=l(E,O,D);I.set(H,E.byteOffset)}}}var d=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},g;typeof window<"u"?g=window:typeof d<"u"?g=d:typeof self<"u"?g=self:g={};var m=g,S=function(E){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(E):E&&E.buffer instanceof ArrayBuffer},b=m.BigInt||Number;b("0x1"),b("0x100"),b("0x10000"),b("0x1000000"),b("0x100000000"),b("0x10000000000"),b("0x1000000000000"),b("0x100000000000000"),b("0x10000000000000000"),(function(){var y=new Uint16Array([65484]),E=new Uint8Array(y.buffer,y.byteOffset,y.byteLength);return E[0]===255?"big":E[0]===204?"little":"unknown"})();const T=function(y){const E={};return Object.keys(y).forEach(O=>{const D=y[O];S(D)?E[O]={bytes:D.buffer,byteOffset:D.byteOffset,byteLength:D.byteLength}:E[O]=D}),E};self.onmessage=function(y){const E=y.data,O=new Uint8Array(E.encrypted.bytes,E.encrypted.byteOffset,E.encrypted.byteLength),D=new Uint32Array(E.key.bytes,E.key.byteOffset,E.key.byteLength/4),I=new Uint32Array(E.iv.bytes,E.iv.byteOffset,E.iv.byteLength/4);new c(O,D,I,function(H,$){self.postMessage(T({source:E.source,decrypted:$}),[$.buffer])})}}));var v8=wf(g8);const y8=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},jf=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Cl=(r,e)=>{e.activePlaylistLoader=r,r.load()},_8=(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,jf(t,s),!(!o||o.isMainPlaylist))){if(!o.playlistLoader){l&&n.resetEverything();return}t.resyncLoader(),Cl(o.playlistLoader,s)}},T8=(r,e)=>()=>{const{segmentLoaders:{[r]:t},mediaTypes:{[r]:n}}=e;n.lastGroup_=null,t.abort(),t.pause()},b8=(r,e)=>()=>{const{mainPlaylistLoader:t,segmentLoaders:{[r]:n,main:s},mediaTypes:{[r]:a}}=e,o=a.activeTrack(),l=a.getActiveGroup(),c=a.activePlaylistLoader,d=a.lastTrack_;if(!(d&&o&&d.id===o.id)&&(a.lastGroup_=l,a.lastTrack_=o,jf(n,a),!!l)){if(l.isMainPlaylist){if(!o||!d||o.id===d.id)return;const g=e.vhs.playlistController_,m=g.selectPlaylist();if(g.media()===m)return;a.logger_(`track change. Switching main audio from ${d.id} to ${o.id}`),t.pause(),s.resetEverything(),g.fastQualityChange_(m);return}if(r==="AUDIO"){if(!l.playlistLoader){s.setAudio(!0),s.resetEverything();return}n.setAudio(!0),s.setAudio(!1)}if(c===l.playlistLoader){Cl(l.playlistLoader,a);return}n.track&&n.track(o),n.resetEverything(),Cl(l.playlistLoader,a)}},_a={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}ae.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;ae.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=t.activeTrack();n&&(n.mode="disabled"),t.onTrackChanged()}},qd={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",_a[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",_a[r](r,t))}},x8={AUDIO:(r,e)=>{const{vhs:t,sourceType:n,segmentLoaders:{[r]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[r]:{groups:l,tracks:c,logger_:d}},mainPlaylistLoader:g}=e,m=hs(g.main);(!o[r]||Object.keys(o[r]).length===0)&&(o[r]={main:{default:{default:!0}}},m&&(o[r].main.default.playlists=g.main.playlists));for(const S in o[r]){l[S]||(l[S]=[]);for(const b in o[r][S]){let T=o[r][S][b],y;if(m?(d(`AUDIO group '${S}' label '${b}' is a main playlist`),T.isMainPlaylist=!0,y=null):n==="vhs-json"&&T.playlists?y=new Yn(T.playlists[0],t,a):T.resolvedUri?y=new Yn(T.resolvedUri,t,a):T.playlists&&n==="dash"?y=new yl(T.playlists[0],t,a,g):y=null,T=nt({id:b,playlistLoader:y},T),qd[r](r,T.playlistLoader,e),l[S].push(T),typeof c[b]>"u"){const E=new ae.AudioTrack({id:b,kind:y8(T),enabled:!1,language:T.language,default:T.default,label:b});c[b]=E}}}s.on("error",_a[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:d}},mainPlaylistLoader:g}=e;for(const m in l[r]){c[m]||(c[m]=[]);for(const S in l[r][m]){if(!n.options_.useForcedSubtitles&&l[r][m][S].forced)continue;let b=l[r][m][S],T;if(s==="hls")T=new Yn(b.resolvedUri,n,o);else if(s==="dash"){if(!b.playlists.filter(E=>E.excludeUntil!==1/0).length)return;T=new yl(b.playlists[0],n,o,g)}else s==="vhs-json"&&(T=new Yn(b.playlists?b.playlists[0]:b.resolvedUri,n,o));if(b=nt({id:S,playlistLoader:T},b),qd[r](r,b.playlistLoader,e),c[m].push(b),typeof d[S]>"u"){const y=t.addRemoteTextTrack({id:S,kind:"subtitles",default:b.default&&b.autoselect,language:b.language,label:S},!1).track;d[S]=y}}}a.on("error",_a[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 d=t.options_.vhs&&t.options_.vhs.captionServices||{};let g={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(d[g.instreamId]&&(g=nt(g,d[g.instreamId])),g.default===void 0&&delete g.default,s[o].push(nt({id:l},c)),typeof a[l]>"u"){const m=t.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;a[l]=m}}}}},Hf=(r,e)=>{for(let t=0;t<r.length;t++)if(lu(e,r[t])||r[t].playlists&&Hf(r[t].playlists,e))return!0;return!1},C8=(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&&hs(e.main))for(let c=0;c<l.length;c++){const d=s[l[c]];if(Hf(d,a)){o=d;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},S8={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}},E8=(r,{mediaTypes:e})=>()=>{const t=e[r].activeTrack();return t?e[r].activeGroup(t):null},k8=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(d=>{x8[d](d,r)});const{mediaTypes:e,mainPlaylistLoader:t,tech:n,vhs:s,segmentLoaders:{["AUDIO"]:a,main:o}}=r;["AUDIO","SUBTITLES"].forEach(d=>{e[d].activeGroup=C8(d,r),e[d].activeTrack=S8[d](d,r),e[d].onGroupChanged=_8(d,r),e[d].onGroupChanging=T8(d,r),e[d].onTrackChanged=b8(d,r),e[d].getActiveGroup=E8(d,r)});const l=e.AUDIO.activeGroup();if(l){const d=(l.filter(m=>m.default)[0]||l[0]).id;e.AUDIO.tracks[d].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}t.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanged())}),t.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanging())});const c=()=>{e.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"})};n.audioTracks().addEventListener("change",c),n.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),s.on("dispose",()=>{n.audioTracks().removeEventListener("change",c),n.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),n.clearTracks("audio");for(const d in e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[d])},w8=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:en,activeTrack:en,getActiveGroup:en,onGroupChanged:en,onTrackChanged:en,lastTrack_:null,logger_:Ci(`MediaGroups[${e}]`)}}),r};class zd{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ai(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(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 D8 extends ae.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new zd,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_=Ci("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=ai(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 d=o.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${d} seconds.`),this.startTTLTimeout_(parseInt(d,10));return}this.logger_(`manifest failed to load ${a}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:s});let l;try{l=JSON.parse(this.request_.responseText)}catch(d){const g={errorType:ae.Error.StreamingContentSteeringParserError,error:d};this.trigger({type:"error",metadata:g})}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 G.URL(e),n=new G.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(n.toString())}decodeDataUriManifest_(e){const t=JSON.parse(G.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new G.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_=G.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){G.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 zd}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&&(ai(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const A8=(r,e)=>{let t=null;return(...n)=>{clearTimeout(t),t=setTimeout(()=>{r.apply(null,n)},e)}},N8=10;let Qi;const I8=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],O8=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},B8=function({currentPlaylist:r,buffered:e,currentTime:t,nextPlaylist:n,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:o,bufferBasedABR:l,log:c}){if(!n)return ae.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${r&&r.id||"null"} -> ${n.id}`;if(!r)return c(`${d} as current playlist is not set`),!0;if(n.id===r.id)return!1;const g=!!Wn(e,t).length;if(!r.endList)return!g&&typeof r.partTargetDuration=="number"?(c(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${d} as current playlist is live`),!0);const m=su(e,t),S=l?Lt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Lt.MAX_BUFFER_LOW_WATER_LINE;if(o<S)return c(`${d} as duration < max low water line (${o} < ${S})`),!0;const b=n.attributes.BANDWIDTH,T=r.attributes.BANDWIDTH;if(b<T&&(!l||m<a)){let y=`${d} as next bandwidth < current bandwidth (${b} < ${T})`;return l&&(y+=` and forwardBuffer < bufferHighWaterLine (${m} < ${a})`),c(y),!0}if((!l||b>T)&&m>=s){let y=`${d} as forwardBuffer >= bufferLowWaterLine (${m} >= ${s})`;return l&&(y+=` and next bandwidth > current bandwidth (${b} > ${T})`),c(y),!0}return c(`not ${d} as no switching criteria met`),!1};class L8 extends ae.EventTarget{constructor(e){super(),this.fastQualityChange_=A8(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:n,tech:s,bandwidth:a,externVhs:o,useCueTags:l,playlistExclusionDuration:c,enableLowInitialPlaylist:d,sourceType:g,cacheEncryptionKeys:m,bufferBasedABR:S,leastPixelDiffSelector:b,captionServices:T,experimentalUseMMS:y}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:E}=e;(E===null||typeof E>"u")&&(E=1/0),Qi=o,this.bufferBasedABR=!!S,this.leastPixelDiffSelector=!!b,this.withCredentials=n,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=g,this.useCueTags_=l,this.playlistExclusionDuration=c,this.maxPlaylistRetries=E,this.enableLowInitialPlaylist=d,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:E,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=w8(),y&&G.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new G.ManagedMediaSource,this.usingManagedMediaSource_=!0,ae.log("Using ManagedMediaSource")):G.MediaSource&&(this.mediaSource=new G.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_=Pt(),this.hasPlayed_=!1,this.syncController_=new p8(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new v8,this.sourceUpdater_=new qf(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new m8,this.keyStatusMap_=new Map;const O={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:T,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:m,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new yl(t,this.vhs_,nt(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Yn(t,this.vhs_,nt(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new bl(nt(O,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new bl(nt(O,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new u8(nt(O,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((H,$)=>{function z(){s.off("vttjserror",N),H()}function N(){s.off("vttjsloaded",z),$()}s.one("vttjsloaded",z),s.one("vttjserror",N),s.addWebVttScript_()})}),e);const D=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new D8(this.vhs_.xhr,D),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),I8.forEach(H=>{this[H+"_"]=O8.bind(this,H)}),this.logger_=Ci("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 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_=G.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(G.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 d=0;d<e.playlists.length;d++){const g=e.playlists[d];g.attributes&&g.attributes.AUDIO&&g.attributes.AUDIO===l&&o.push(g)}}return o.length?o:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const t=this.mainPlaylistLoader_.media(),n=t.targetDuration*1.5*1e3;fl(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()),k8({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;fl(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(bt({},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"}),Qi.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 B8({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:N8}))});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(bt({},s))}),this.audioSegmentLoader_.on(n,s=>{this.player_.trigger(bt({},s))}),this.subtitleSegmentLoader_.on(n,s=>{this.player_.trigger(bt({},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=Qi.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=Qi.Playlist.playlistEnd(e,n),a=this.tech_.currentTime(),o=this.tech_.buffered();if(!o.length)return s-a<=Ui;const l=o.end(o.length-1);return l-a<=Ui&&s-l<=Ui}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(ja),o=a.length===1&&a[0]===e;if(s.length===1&&n!==1/0)return ae.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(o);if(o){if(this.main().contentSteering){const T=this.pathwayAttribute_(e),y=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(T),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(T)},y);return}let b=!1;s.forEach(T=>{if(T===e)return;const y=T.excludeUntil;typeof y<"u"&&y!==1/0&&(b=!0,delete T.excludeUntil)}),b&&(ae.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let l;e.playlistErrors_>this.maxPlaylistRetries?l=1/0:l=Date.now()+n*1e3,e.excludeUntil=l,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 d=t.internal?this.logger_:ae.log.warn,g=t.message?" "+t.message:"";d(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${g} 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 m=c.targetDuration/2*1e3||5*1e3,S=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=m;return this.switchMedia_(c,"exclude",o||S)}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=Wn(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:Qi.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 d=Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n),g=Math.max(l,c-d);return Pt([[l,g]])}const a=this.syncController_.getExpiredTime(n,this.duration());if(a===null)return null;const o=Qi.Playlist.seekable(n,a,Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return o.length?o:null}computeFinalSeekable_(e,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:Pt([[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 [${ef(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=Qi.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=es(this.main(),t),s={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=n.video||e.main.videoCodec||x_),e.main.isMuxed&&(s.video+=`,${n.audio||e.main.audioCodec||Oc}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(s.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||Oc,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=(d,g)=>d?Xr(g,this.usingManagedMediaSource_):ko(g),l={};let c;if(["video","audio"].forEach(function(d){if(s.hasOwnProperty(d)&&!o(e[d].isFmp4,s[d])){const g=e[d].isFmp4?"browser":"muxer";l[g]=l[g]||[],l[g].push(s[d]),d==="audio"&&(c=g)}}),a&&c&&t.attributes.AUDIO){const d=t.attributes.AUDIO;this.main().playlists.forEach(g=>{(g.attributes&&g.attributes.AUDIO)===d&&g!==t&&(g.excludeUntil=1/0)}),this.logger_(`excluding audio group ${d} as ${c} does not support codec(s): "${s.audio}"`)}if(Object.keys(l).length){const d=Object.keys(l).reduce((g,m)=>(g&&(g+=", "),g+=`${m} does not support codec(s): "${l[m].join(",")}"`,g),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:d},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const d=[];if(["video","audio"].forEach(g=>{const m=(Ri(this.sourceUpdater_.codecs[g]||"")[0]||{}).type,S=(Ri(s[g]||"")[0]||{}).type;m&&S&&m.toLowerCase()!==S.toLowerCase()&&d.push(`"${this.sourceUpdater_.codecs[g]}" -> "${s[g]}"`)}),d.length){this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${d.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return s}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const 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=es(this.main,s),o=[];a.audio&&!ko(a.audio)&&!Xr(a.audio,this.usingManagedMediaSource_)&&o.push(`audio codec ${a.audio}`),a.video&&!ko(a.video)&&!Xr(a.video,this.usingManagedMediaSource_)&&o.push(`video codec ${a.video}`),a.text&&a.text==="stpp.ttml.im1t"&&o.push(`text codec ${a.text}`),o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${o.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],n=this.main().playlists,s=as(Ri(e)),a=Ed(s),o=s.video&&Ri(s.video)[0]||null,l=s.audio&&Ri(s.audio)[0]||null;Object.keys(n).forEach(c=>{const d=n[c];if(t.indexOf(d.id)!==-1||d.excludeUntil===1/0)return;t.push(d.id);const g=[],m=es(this.mainPlaylistLoader_.main,d),S=Ed(m);if(!(!m.audio&&!m.video)){if(S!==a&&g.push(`codec count "${S}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const b=m.video&&Ri(m.video)[0]||null,T=m.audio&&Ri(m.audio)[0]||null;b&&o&&b.type.toLowerCase()!==o.type.toLowerCase()&&g.push(`video codec "${b.type}" !== "${o.type}"`),T&&l&&T.type.toLowerCase()!==l.type.toLowerCase()&&g.push(`audio codec "${T.type}" !== "${l.type}"`)}g.length&&(d.excludeUntil=1/0,this.logger_(`excluding ${d.id}: ${g.join(" && ")}`))}})}updateAdCues_(e){let t=0;const n=this.seekable();n.length&&(t=n.start(0)),d8(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Lt.GOAL_BUFFER_LENGTH,n=Lt.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Lt.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Lt.BUFFER_LOW_WATER_LINE,n=Lt.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Lt.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(t,Lt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.bufferBasedABR?a:s)}bufferHighWaterLine(){return Lt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Bd(this.inbandTextTracks_,"com.apple.streaming",this.tech_),j4({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,n){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Bd(this.inbandTextTracks_,e,this.tech_),U4({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(bt({},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),d=c&&e!==c;l.excludeUntil===1/0&&l.lastExcludeReason_==="content-steering"&&!d&&(delete l.excludeUntil,delete l.lastExcludeReason_,a=!0);const m=!l.excludeUntil&&l.excludeUntil!==1/0;!s.has(l.id)&&d&&m&&(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(g=>g.attributes["PATHWAY-ID"]===l["BASE-ID"]).forEach(g=>{this.mainPlaylistLoader_.addClonePathway(l,g)}),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,ae.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:o8(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 M8=(r,e,t)=>n=>{const s=r.main.playlists[e],a=ou(s),o=ja(s);if(typeof n>"u")return o;n?delete s.disabled:s.disabled=!0;const l={renditionInfo:{id:e,bandwidth:s.attributes.BANDWIDTH,resolution:s.attributes.RESOLUTION,codecs:s.attributes.CODECS},cause:"fast-quality"};return n!==o&&!a&&(n?(t(s),r.trigger({type:"renditionenabled",metadata:l})):r.trigger({type:"renditiondisabled",metadata:l})),n};class P8{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=es(s.main(),t),this.playlist=t,this.id=n,this.enabled=M8(e.playlists,t.id,a)}}const R8=function(r){r.representations=()=>{const e=r.playlistController_.main(),t=hs(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return t?t.filter(n=>!ou(n)).map((n,s)=>new P8(r,n,n.id)):[]}},jd=["seeking","seeked","pause","playing","error"];class V8 extends ae.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Ci("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(g=>{c[g]={reset:()=>this.resetSegmentDownloads_(g),updateend:()=>this.checkSegmentDownloads_(g)},o[`${g}SegmentLoader_`].on("appendsdone",c[g].updateend),o[`${g}SegmentLoader_`].on("playlistupdate",c[g].reset),this.tech_.on(["seeked","seeking"],c[g].reset)});const d=g=>{["main","audio"].forEach(m=>{o[`${m}SegmentLoader_`][g]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(jd,a),this.tech_.on("canplay",n),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(jd,a),this.tech_.off("canplay",n),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),l.forEach(g=>{o[`${g}SegmentLoader_`].off("appendsdone",c[g].updateend),o[`${g}SegmentLoader_`].off("playlistupdate",c[g].reset),this.tech_.off(["seeked","seeking"],c[g].reset)}),this.checkCurrentTimeTimeout_&&G.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&G.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=G.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=Cb(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+Ui>=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(Pt([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 T=t.start(0);a=T+(T===t.end(0)?0:Ui)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${n} with seekable range ${ef(t)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const o=this.playlistController_.sourceUpdater_,l=this.tech_.buffered(),c=o.audioBuffer?o.audioBuffered():null,d=o.videoBuffer?o.videoBuffered():null,g=this.media(),m=g.partTargetDuration?g.partTargetDuration:(g.targetDuration-$i)*2,S=[c,d];for(let T=0;T<S.length;T++){if(!S[T])continue;if(su(S[T],n)<m)return!1}const b=Us(l,n);return b.length===0?!1:(a=b.start(0)+Ui,this.logger_(`Buffered region starts (${b.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=Wn(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=Us(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)+Ui;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=Wn(e,n-3),o=Wn(e,n),l=Wn(t,n);l.length&&!o.length&&a.length&&(s={start:a.end(0),end:l.end(0)})}else Us(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=Us(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)+$i);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=Tb(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 F8={errorInterval:30,getSource(r){const t=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(t)}},Gf=function(r,e){let t=0,n=0;const s=nt(F8,e);r.ready(()=>{r.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){n&&r.currentTime(n)},o=function(g){g!=null&&(n=r.duration()!==1/0&&r.currentTime()||0,r.one("loadedmetadata",a),r.src(g),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"){ae.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)},d=function(g){c(),Gf(r,g)};r.on("error",l),r.on("dispose",c),r.reloadSourceOnError=d},$8=function(r){Gf(this,r)};var Wf="3.17.3",U8="7.1.0",q8="1.3.1",z8="7.2.0",j8="4.0.2";const pt={PlaylistLoader:Yn,Playlist:oi,utils:Xb,STANDARD_PLAYLIST_SELECTOR:Od,INITIAL_PLAYLIST_SELECTOR:P4,lastBandwidthSelector:Od,movingAverageBandwidthSelector:L4,comparePlaylistBandwidth:cu,comparePlaylistResolution:B4,xhr:Tf()};Object.keys(Lt).forEach(r=>{Object.defineProperty(pt,r,{get(){return ae.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Lt[r]},set(e){if(ae.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){ae.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Lt[r]=e}})});const Yf="videojs-vhs",Xf=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"})},H8=function(r,e){e.representations().forEach(t=>{r.addQualityLevel(t)}),Xf(r,e.playlists)};pt.canPlaySource=function(){return ae.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const G8=(r,e,t)=>{if(!r)return r;let n={};e&&e.attributes&&e.attributes.CODECS&&(n=as(Ri(e.attributes.CODECS))),t&&t.attributes&&t.attributes.CODECS&&(n.audio=t.attributes.CODECS);const s=rr(n.video),a=rr(n.audio),o={};for(const l in r)o[l]={},a&&(o[l].audioContentType=a),s&&(o[l].videoContentType=s),e.contentProtection&&e.contentProtection[l]&&e.contentProtection[l].pssh&&(o[l].pssh=e.contentProtection[l].pssh),typeof r[l]=="string"&&(o[l].url=r[l]);return nt(r,o)},W8=(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},[]),Y8=({player:r,sourceKeySystems:e,audioMedia:t,mainPlaylists:n})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const s=t?n.concat([t]):n,a=W8(s,Object.keys(e)),o=[],l=[];return a.forEach(c=>{l.push(new Promise((d,g)=>{r.tech_.one("keysessioncreated",d)})),o.push(new Promise((d,g)=>{r.eme.initializeMediaKeys({keySystems:c},m=>{if(m){g(m);return}d()})}))}),Promise.race([Promise.all(o),Promise.race(l)])},X8=({player:r,sourceKeySystems:e,media:t,audioMedia:n})=>{const s=G8(e,t,n);return s?(r.currentSource().keySystems=s,s&&!r.eme?(ae.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Kf=()=>{if(!G.localStorage)return null;const r=G.localStorage.getItem(Yf);if(!r)return null;try{return JSON.parse(r)}catch{return null}},K8=r=>{if(!G.localStorage)return!1;let e=Kf();e=e?nt(e,r):r;try{G.localStorage.setItem(Yf,JSON.stringify(e))}catch{return!1}return e},Q8=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,Qf=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},Zf=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},Jf=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},ep=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};pt.supportsNativeHls=(function(){if(!_e||!_e.createElement)return!1;const r=_e.createElement("video");return ae.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(r.canPlayType(t))}):!1})();pt.supportsNativeDash=(function(){return!_e||!_e.createElement||!ae.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(_e.createElement("video").canPlayType("application/dash+xml"))})();pt.supportsTypeNatively=r=>r==="hls"?pt.supportsNativeHls:r==="dash"?pt.supportsNativeDash:!1;pt.isSupported=function(){return ae.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};pt.xhr.onRequest=function(r){Qf(pt.xhr,r)};pt.xhr.onResponse=function(r){Zf(pt.xhr,r)};pt.xhr.offRequest=function(r){Jf(pt.xhr,r)};pt.xhr.offResponse=function(r){ep(pt.xhr,r)};const Z8=ae.getComponent("Component");class tp extends Z8{constructor(e,t,n){if(super(t,n.vhs),typeof n.initialBandwidth=="number"&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=Ci("VhsHandler"),t.options_&&t.options_.playerId){const s=ae.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(_e,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=>{const a=_e.fullscreenElement||_e.webkitFullscreenElement||_e.mozFullScreenElement||_e.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_=nt(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=Kf();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=Lt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Lt.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=Q8(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 L8(this.options_);const n=nt({liveRangeSafeTimeDelta:Ui},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new V8(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=ae.players[this.tech_.options_.playerId];let o=this.playlistController_.error;typeof o=="object"&&!o.code?o.code=3:typeof o=="string"&&(o={message:o,code:3}),a.error(o)});const s=this.options_.bufferBasedABR?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=G.navigator.connection||G.navigator.mozConnection||G.navigator.webkitConnection,l=1e7;if(this.options_.useNetworkInformationApi&&o){const c=o.downlink*1e3*1e3;c>=l&&a>=l?a=Math.max(a,c):a=c}return a},set(a){this.playlistController_.mainSegmentLoader_.bandwidth=a,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const a=1/(this.bandwidth||1);let o;return this.throughput>0?o=1/this.throughput:o=0,Math.floor(1/(a+o))},set(){ae.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>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&&K8({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{R8(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_=G.URL.createObjectURL(this.playlistController_.mediaSource),(ae.browser.IS_ANY_SAFARI||ae.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Y8({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=X8({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=ae.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{H8(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{Xf(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Wf,"mux.js":U8,"mpd-parser":q8,"m3u8-parser":z8,"aes-decrypter":j8}}version(){return this.constructor.version()}canChangeType(){return qf.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_&&G.URL.revokeObjectURL&&(G.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return i4({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,n=!0,s=2){return Ef({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=>{Qf(this.xhr,e)},this.xhr.onResponse=e=>{Zf(this.xhr,e)},this.xhr.offRequest=e=>{Jf(this.xhr,e)},this.xhr.offResponse=e=>{ep(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(bt({},s))})}),t.forEach(n=>{this.playbackWatcher_.on(n,s=>{this.player_.trigger(bt({},s))})})}}const Ta={name:"videojs-http-streaming",VERSION:Wf,canHandleSource(r,e={}){const t=nt(ae.options,e);return!t.vhs.experimentalUseMMS&&!Xr("avc1.4d400d,mp4a.40.2",!1)?!1:Ta.canPlayType(r.type,t)},handleSource(r,e,t={}){const n=nt(ae.options,t);return e.vhs=new tp(r,e,n),e.vhs.xhr=Tf(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const t=bh(r);if(!t)return"";const n=Ta.getOverrideNative(e);return!pt.supportsTypeNatively(t)||n?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,t=!(ae.browser.IS_ANY_SAFARI||ae.browser.IS_IOS),{overrideNative:n=t}=e;return n}},J8=()=>Xr("avc1.4d400d,mp4a.40.2",!0);J8()&&ae.getTech("Html5").registerSourceHandler(Ta,0);ae.VhsHandler=tp;ae.VhsSourceHandler=Ta;ae.Vhs=pt;ae.use||ae.registerComponent("Vhs",pt);ae.options.vhs=ae.options.vhs||{};(!ae.getPlugin||!ae.getPlugin("reloadSourceOnError"))&&ae.registerPlugin("reloadSourceOnError",$8);const ex="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4AQMAAADSHVMAAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAASYSURBVHic7c8BDQAgDMAw7t80Lk5SVgXbnM/M64BtDesa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNay7Fz0EOVPDeGwAAAAASUVORK5CYII=",tx={class:"o-meeting-playback-video"},ix={key:0,class:"poster-title"},nx=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),d=()=>{c.value=!1},g=(y,E=!1)=>{var I,H;const O=n.instance;if(!O)return;const D=(I=y.activeCues)==null?void 0:I[0];if(s.value&&clearInterval(s.value),D){D.text=((H=D==null?void 0:D.text)==null?void 0:H.replace(/\[(SPEAKER_)\d+]: /g,""))||"";const $=D.text.split(`
|
|
224
|
-
`),z=$.length,N=D.endTime-D.startTime,j=parseFloat((N/z).toFixed(3));let x=0;if(E){const K=(O.currentTime()-D.startTime)/(D.endTime-D.startTime);for(;(x+1)/z<K;)x++}x<z?D.text=$.length?$[x]:D==null?void 0:D.text:D.text=$.length?$[0]:D==null?void 0:D.text;let w=j*1e3;const P=()=>{s.value=setInterval(()=>{y.mode="hidden",x++,x>$.length-1?clearInterval(s.value):x===$.length-1?(D.text=$[x],clearInterval(s.value),w=j*(z-x)*1e3,P()):D.text=$[x],y.mode="showing"},w)};P()}},m=i.ref([]);i.watch(()=>m.value,y=>{const E=n.instance;if(E){const O=E.textTracks();for(let D=0;D<O.length;D++)O[D].kind==="subtitles"&&(g(O[D],!0),O[D].mode=y.length?"showing":"hidden")}},{deep:!0});const S=i.ref(!1),b=i.ref("init"),T=async()=>{if(!n.src)return;const y=ae("playerId",{controls:!0,autoplay:!1,preload:"auto",fluid:!0,poster:n.poster||ex,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",y),y.src(n.src),y.addRemoteTextTrack({kind:"subtitles",src:n.vtt,srclang:"zh",label:"中文",default:!1}),S.value=!0;class E extends ae.getComponent("Button"){constructor(I,H){super(I,H),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 H=0;H<I.length;H++)I[H].kind==="subtitles"&&(g(I[H],!0),I[H].mode=I[H].mode==="showing"?"hidden":"showing",I[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&&(ae.registerComponent("SubtitleToggleButton",E),y.controlBar.children_.some(D=>D.name_==="SubtitleToggleButton")||y.controlBar.addChild("SubtitleToggleButton",{},8)),(y==null?void 0:y.textTracks().tracks_).forEach(D=>{D==null||D.addEventListener("cuechange",()=>{g(D)})}),y.on("play",()=>{b.value="playing"}),y.on("timeupdate",()=>{const D=y.currentTime()||0,I=n.captions.findIndex(H=>Ko(H.start_time)>D);l("setTrackIdx",I)}),y.one("loadedmetadata",()=>{l("getDuration",y.duration())}),i.nextTick(()=>{const D=document.getElementsByClassName("o-meeting-playback-video")[0];a.value=D.offsetHeight}),o.value=y};return i.onMounted(()=>{T(),document.addEventListener("click",d)}),i.watch(()=>n.src,()=>{T()}),i.onUnmounted(()=>{var y;(y=n==null?void 0:n.instance)==null||y.dispose(),document.removeEventListener("click",d)}),e({changeTime:y=>{var E;(E=o.value)==null||E.currentTime(y)}}),(y,E)=>(i.openBlock(),i.createElementBlock("div",tx,[i.createElementVNode("div",{class:i.normalizeClass(["video-placeholder",{loaded:S.value,"no-poster":!r.poster,[b.value]:!0}])},[E[0]||(E[0]=i.createElementVNode("video",{class:"video-js",id:"playerId"},null,-1)),r.posterTitle?(i.openBlock(),i.createElementBlock("div",ix,i.toDisplayString(r.posterTitle),1)):i.createCommentVNode("",!0)],2)]))}}),rx={class:"o-meeting-playback"},sx={class:"video-header"},ax={class:"video-title"},ox={class:"video-content"},lx={class:"info-wrapper"},ux={key:0,class:"base-info"},cx={class:"info-item"},dx={class:"info-item"},hx={class:"info-item"},fx={class:"info-item"},px={key:1,class:"subject-list"},mx={class:"subject-title"},gx={key:0,class:"subject-progress"},vx=["data-start","data-end"],Hd=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}=Xe.useI18n(),a=i.ref(null),o=B=>{a.value=B},l=i.ref(0),c=B=>{l.value=B},d=i.ref([]),g=async B=>{const Z=await(await fetch(B)).json();d.value=(Z.segments||[]).map(oe=>{const ce=Dv(oe.speaker);return{...oe,contentHtml:oe.content,speakerIdx:ce,speakerLabel:`${s("meeting.speaker")}${ce}`}})},m=i.ref([]),S=B=>O2[B%3],b=i.ref(0),T=B=>{b.value=B},y=i.ref(),E=i.ref(""),O=i.ref([0,0]);function D(B,Q){const Z=Q.getBoundingClientRect(),ce=(B.clientX-Z.left)/Z.width;return O.value[1]=`${Q.offsetTop+Q.parentElement.offsetTop}px`,O.value[0]=`${ce*100}%`,ce*b.value}const I=B=>{let Q=B;for(;Q&&Q.className!=="subject-progress";)Q=Q.parentElement;return Q},H=B=>{let Q=I(B.target);Q&&(E.value=Av(D(B,Q)))},$=()=>{E.value=""},z=B=>{var Z;let Q=I(B.target);Q&&((Z=y.value)==null||Z.changeTime(D(B,Q)))},N=async B=>{const Z=await(await fetch(B)).json();m.value=(Z||[]).map(oe=>({...oe,startTimeNumber:Ko(oe.startTime),endTimeNumber:Ko(oe.endTime)}))},j=i.ref("info"),x=i.computed(()=>{const B=[{label:s("meeting.baseInfo"),value:"info"}];return m.value.length&&B.push({label:s("meeting.subject"),value:"subject"}),B}),w=()=>{t.data&&(t.data.textJson&&g(t.data.textJson),t.data.topicJson&&N(t.data.topicJson))};i.watchEffect(()=>{w()});const P=B=>{n("change-date",B)},K=i.ref(null),L=i.ref("auto");let U=null,V=null;const X=()=>{K.value&&(L.value=`${K.value.offsetHeight}px`)},F=()=>{cancelAnimationFrame(V),V=requestAnimationFrame(X)};return i.onMounted(()=>{K.value&&(U=new ResizeObserver(F),U.observe(K.value),X())}),i.onUnmounted(()=>{cancelAnimationFrame(V),U==null||U.disconnect()}),(B,Q)=>{var Z,oe,ce,re;return i.openBlock(),i.createElementBlock("div",rx,[i.createElementVNode("div",{class:"left-card card-wrapper",ref_key:"leftRef",ref:K},[i.createElementVNode("div",sx,[i.createElementVNode("div",ax,i.toDisplayString((Z=r.detail)==null?void 0:Z.topic)+"("+i.toDisplayString((oe=r.detail)==null?void 0:oe.date)+")",1),(ce=r.dates)!=null&&ce.length?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",clearable:!1,"model-value":(re=r.detail)==null?void 0:re.date,placeholder:i.unref(s)("meeting.selectDate"),onChange:P},{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",ox,[r.data?(i.openBlock(),i.createBlock(nx,{key:0,ref_key:"playerRef",ref:y,src:r.data.video,vtt:r.data.textVtt,poster:r.data.poster,captions:d.value,onGetDuration:T,instance:a.value,onGetInstance:o,trackIdx:l.value,onSetTrackIdx:c},null,8,["src","vtt","poster","captions","instance","trackIdx"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",lx,[i.createVNode(i.unref(A.OTab),{modelValue:j.value,"onUpdate:modelValue":Q[0]||(Q[0]=ue=>j.value=ue),"max-show":9999},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.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.createVNode(i.unref(A.OScroller),{class:i.normalizeClass(["tab-content",`tab-content-${j.value}`]),"show-type":"hover"},{default:i.withCtx(()=>{var ue;return[j.value===x.value[0].value?(i.openBlock(),i.createElementBlock("div",ux,[i.createElementVNode("div",cx,[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",dx,[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",hx,[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",fx,[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),j.value===((ue=x.value[1])==null?void 0:ue.value)?(i.openBlock(),i.createElementBlock("div",px,[E.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"mouse-current-time",style:i.normalizeStyle({top:O.value[1],left:O.value[0]})},i.toDisplayString(E.value),5)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,(te,Ae)=>(i.openBlock(),i.createElementBlock("div",{class:"subject-item",key:te.title},[i.createElementVNode("div",mx,i.toDisplayString(te.title),1),b.value?(i.openBlock(),i.createElementBlock("div",gx,[i.createElementVNode("div",{class:"subject-progress-item",onClick:z,onMousemove:H,onMouseleave:$,"data-start":te.startTime,"data-end":te.endTime,style:i.normalizeStyle({"--start":(te.startTimeNumber<0?0:te.startTimeNumber)/b.value,"--end":(te.endTimeNumber>b.value?b.value:te.endTimeNumber)/b.value,background:S(Ae)})},null,44,vx)])):i.createCommentVNode("",!0)]))),128))])):i.createCommentVNode("",!0)]}),_:1},8,["class"])])],512),i.createElementVNode("div",{class:"right-card card-wrapper",style:i.normalizeStyle({height:L.value})},[i.createVNode(Yy,{captions:d.value,trackIdx:l.value,instance:a.value},{empty:i.withCtx(()=>[i.renderSlot(B.$slots,"empty")]),_:3},8,["captions","trackIdx","instance"])],4)])}}}),yx={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function _x(r,e){return i.openBlock(),i.createElementBlock("svg",yx,[...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 Tx={name:"components-icon-tips",render:_x},bx={class:"o-sig-meeting-aside"},xx={class:"month"},Cx={class:"days"},Sx=["onClick"],Ex={class:"day-d"},kx={class:"day-c"},wx={class:"arrow-wrapper"},js=1,Dx=i.defineComponent({__name:"OMeetingSigAside",props:{data:{},current:{},total:{},active:{},meetingDates:{},eventsDates:{}},emits:["click-date","change-month"],setup(r,{emit:e}){const{getConfig:t}=Tn(),n=r,s=e,a=l=>{s("click-date",l)},o=l=>{n.current+l>=n.total||n.current+l<0||s("change-month",l)};return(l,c)=>(i.openBlock(),i.createElementBlock("div",bx,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(d,g)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:g},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d,m=>(i.openBlock(),i.createElementBlock("div",{key:m.month,class:"month-item"},[i.createElementVNode("div",xx,i.toDisplayString(m.month.replace(/-/g,"/")),1),i.createElementVNode("div",Cx,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.days,S=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-item",r.active===`${m.month}-${S}`&&"active"]),key:S,onClick:b=>a(`${m.month}-${S}`)},[i.createElementVNode("div",Ex,i.toDisplayString(S),1),i.createElementVNode("div",kx,[r.meetingDates.includes(`${m.month}-${S}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,style:i.normalizeStyle({zIndex:i.unref(t)(i.unref(Be).MEETING,"zIndex"),backgroundColor:i.unref(t)(i.unref(Be).MEETING,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(t)(i.unref(Be).MEETING,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0),r.eventsDates.includes(`${m.month}-${S}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,style:i.normalizeStyle({zIndex:i.unref(t)(i.unref(Be).EVENTS,"zIndex"),backgroundColor:i.unref(t)(i.unref(Be).EVENTS,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(t)(i.unref(Be).EVENTS,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0)])],10,Sx))),128))])]))),128))],64))),128)),i.createElementVNode("div",wx,[i.createVNode(i.unref(A.OIcon),{onClick:c[0]||(c[0]=d=>o(0-js)),class:i.normalizeClass(r.current-js<0&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1},8,["class"]),i.createVNode(i.unref(A.OIcon),{onClick:c[1]||(c[1]=d=>o(js)),class:i.normalizeClass(r.current+js>=r.total&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1},8,["class"])])]))}}),Ax={class:"o-sig-meeting-calendar"},Nx={key:0,class:"meeting-card-header"},Ix={key:0,class:"header-left"},Ox={key:1,class:"date-select"},Bx={class:"meeting-card-content"},Gd=i.defineComponent({__name:"OMeetingSigCalendar",props:{sigName:{},getMeetingListRequest:{},getDateListRequest:{},getEventsListRequest:{},dates:{}},setup(r){const e=r,{t,meetingTabs:n}=Tn(),{lePadV:s}=At.useScreen(),a=i.ref(""),o=i.ref(!1),l=i.ref([]),c=i.computed(()=>s.value?100:5),d=i.ref(""),g=i.ref([]),m=i.ref([]),S=i.ref([]),b=i.ref(-1),T=P=>{E(P)},y=P=>{E(P)},E=async P=>{if(e.getMeetingListRequest)try{o.value=!0,a.value=ve(P).format("YYYY-MM-DD");const K=await e.getMeetingListRequest(a.value,e.sigName);l.value=K.map(L=>({...L,time:`${L.start}-${L.end}`,date:L.date||a.value,type:Be.MEETING}))}finally{o.value=!1,S.value.forEach(K=>{var L;(L=K.dates)!=null&&L.includes(a.value)&&l.value.push(K)})}},O=async()=>{e.getDateListRequest&&(g.value=await e.getDateListRequest()),e.getEventsListRequest&&(S.value=await e.getEventsListRequest(),m.value=(S.value||[]).map(P=>P.dates||[]).flat())},D=i.ref(Be.ALL),I=()=>{O()};i.watch(()=>s.value,()=>{s.value&&(D.value=Be.ALL,I())});const H=P=>{const K=ve(P).format("YYYY-MM-DD");return[K.slice(0,7),K.slice(8,10)]},$=i.computed(()=>{let P=[];return D.value===Be.ALL?P=[...g.value||[],...m.value]:D.value===Be.MEETING?P=g.value||[]:P=m.value,[...new Set(P)].sort((K,L)=>ve(K).isAfter(ve(L))?1:-1).map(K=>ve(K).format("YYYY-MM-DD"))}),z=()=>{let P=$.value.find(K=>K===ve().format("YYYY-MM-DD"));P||(P=$.value.find(K=>ve(K).isAfter(ve()))||[...$.value].reverse().find(K=>ve().isAfter(ve(K)))),d.value=P};i.watch(()=>$.value,P=>{P.length&&(z(),i.nextTick(()=>{E(d.value)}))});const N=i.computed(()=>{const P=$.value.reduce((V,X)=>{var Q,Z;const[F,B]=H(X);return V[F]={count:(((Q=V[F])==null?void 0:Q.count)||0)+1,days:[...((Z=V[F])==null?void 0:Z.days)||[],B]},V},{}),K=Object.keys(P).map(V=>({...P[V],month:V})),L=[];let U=[];return K.forEach(V=>{for(;V.days.length;)if(!U.length)V.days.splice(0,6).forEach(X=>{U.push({month:V.month,day:X})}),U.length>=5&&(L.push(U),U=[]);else{let X=U.length;X%2===1&&(X+=1),V.days.length+U.length<=6?(V.days.splice(0,6).forEach(F=>{U.push({month:V.month,day:F})}),U.length>=5&&(L.push(U),U=[])):(V.days.splice(0,6-X).forEach(F=>{U.push({month:V.month,day:F})}),U.length>=5&&(L.push(U),U=[]))}}),U.length&&(L.push(U),U=[]),L}),j=i.computed(()=>N.value.map(P=>{const K=P.reduce((L,U)=>(L[U.month]=L[U.month]||[],L[U.month].push(U.day),L),{});return Object.keys(K).map(L=>({month:L,days:K[L]||[]}))})),x=()=>{N.value.length?(b.value=N.value.findIndex(P=>P.some(K=>d.value===`${K.month}-${K.day}`)),b.value===-1&&(b.value=N.value.findIndex(P=>P.some(K=>d.value.includes(K.month))))):b.value=-1};i.watch([()=>N.value,()=>d.value],()=>{x()},{deep:!0});const w=P=>{b.value+=P};return i.onMounted(()=>{O()}),(P,K)=>{const L=i.resolveComponent("ElOption"),U=i.resolveComponent("ElSelect");return i.openBlock(),i.createElementBlock("div",Ax,[i.unref(s)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",Nx,[d.value?(i.openBlock(),i.createElementBlock("div",Ix,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("meeting.latestMeeting")),1),i.createElementVNode("span",null,i.toDisplayString(i.unref(ve)(d.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(Tx))]),_: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:D.value,"onUpdate:modelValue":K[0]||(K[0]=V=>D.value=V),onChange:I,line:!1,"max-show":9999},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(n).slice(0,-1),V=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:V.value,value:V.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(V.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(V.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])),i.unref(s)&&$.value.length?(i.openBlock(),i.createElementBlock("div",Ox,[i.createVNode(U,{modelValue:a.value,"onUpdate:modelValue":K[1]||(K[1]=V=>a.value=V),onChange:y},{label:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+" "+i.toDisplayString(a.value),1)]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList($.value,V=>(i.openBlock(),i.createBlock(L,{key:V,value:V,label:i.unref(ve)(V).format("YYYY/MM/DD")},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])):i.createCommentVNode("",!0),!i.unref(s)||i.unref(s)&&$.value.length?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:2,class:"meeting-divider"})):i.createCommentVNode("",!0),i.createElementVNode("div",Bx,[!i.unref(s)&&b.value!==-1?(i.openBlock(),i.createBlock(Dx,{key:0,data:j.value.slice(b.value,b.value+1),meetingDates:D.value!==i.unref(Be).EVENTS?g.value:[],eventsDates:D.value!==i.unref(Be).MEETING?m.value:[],onClickDate:T,onChangeMonth:w,current:b.value,total:j.value.length,active:a.value},null,8,["data","meetingDates","eventsDates","current","total","active"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OScroller),{class:"list-content","show-type":"hover",size:"small"},{default:i.withCtx(()=>[i.createVNode(mh,{list:l.value,rows:c.value},{empty:i.withCtx(()=>[i.renderSlot(P.$slots,"empty")]),_:3},8,["list","rows"])]),_:3})])])}}}),Lx={class:"o-my-meeting-calendar"},Mx={class:"meeting-list"},Px={class:"list-calendar-mb"},Rx={class:"list-calendar"},Vx=["onClick"],Fx={class:"date-cell-text"},$x={class:"list-body"},Ux=["id"],qx={class:"item-header-left"},zx={class:"header-info"},jx={key:0},Hx={class:"title-wrapper"},Gx={class:"title-text"},Wx={key:1,class:"tag-wrapper"},Yx={class:"meeting-info"},Xx={key:0,class:"item-header-right"},Kx={class:"meeting-detail"},Qx={key:0,class:"meeting-btn"},Zx={key:0,class:"load-text"},Jx={class:"dialog-content"},Wd=i.defineComponent({__name:"OMeetingMyCalendar",props:{cancelSubMeetingRequest:{},deleteMeetingRequest:{},getMeetingListRequest:{},groupType:{default:vi.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([]),d=i.computed(()=>o.value===null||c.value.length<o.value),g=i.ref(!1),{t:m,locale:S,getPointStr:b,getConfig:T,getWeekFromDate:y}=Tn(),E=i.computed(()=>S.value===Xe.Locales.EN),O=r,D=i.ref(!1),{isPhone:I}=At.useScreen(),H=i.ref([]),$=e,z=i.ref(!1),N=i.ref(!1),j=i.ref(),x=i.ref(0),w=()=>{var ie;x.value=((ie=j.value)==null?void 0:ie.clientHeight)||0},P=async()=>{if(O.getMeetingListRequest&&!z.value)try{if(o.value!==null&&o.value>0&&(s.value-1)*a.value>o.value)return;if(!d.value&&I.value){Ee("next-month");return}n.value=!0,z.value=!0;const ie=await O.getMeetingListRequest({page:s.value,size:a.value,order_by:"date",order_type:"asc",month:ve(Ie.value).format("YYYY-MM")}),ne=(ie.data||[]).map(se=>{var Ut,Wi,C;const{is_cycle:Se,date:pe,start:Ke,end:Oe,cycle_sub:Nt,cycle_start_date:ft,cycle_end_date:ui,cycle_start:It,cycle_end:Wt,cycle_type:Ot,cycle_interval:Rt,cycle_point:ci}=se;if(Se){let k="",Y="";Ot===mn&&(Y=m("meeting.cycleDay")),Ot===vn&&(Rt>1?Y=m("meeting.cycleWeek.other",[b(Ot,ci),Rt]):Y=m("meeting.cycleWeek.one",[b(Ot,ci)])),Ot===tn&&(Y=m("meeting.cycleMonth",[b(Ot,ci)])),k=m("meeting.cycleMeetingText2",{startDate:ft,endDate:ui,startTime:It,endTime:Wt,cycleType:Y});const le=((Ut=se.obs_data)==null?void 0:Ut.filter(ye=>ye.text_video_url))||[];return Nt.filter(ye=>ve(ye.date).isBefore(ve(Ie.value).add(1,"month").format("YYYY-MM-01"))&&!ve(ye.date).isBefore(ve(Ie.value).format("YYYY-MM-01"))).map(({id:ye,...Ne})=>({...se,...Ne,timeRange:k,dateRange:`${Ne.start}-${Ne.end}`,hasObsData:le.find(Je=>Je.sub_id===Ne.sub_id),time:`${Ne.start}-${Ne.end}`,isExpired:ve(`${Ne.date} ${Ne.start}`).isBefore(ve())}))}return[{...se,dateRange:`${Ke} - ${Oe}`,timeRange:`${Ke} - ${Oe}`,hasObsData:!!((C=(Wi=se.obs_data)==null?void 0:Wi.filter(k=>k.text_video_url))!=null&&C.length),time:`${Ke}-${Oe}`,isExpired:ve(`${pe} ${Ke}`).isBefore(ve())}]}).flat().filter(se=>se.date.slice(0,7)===ct(Ie.value,"YYYY-MM-DD").slice(0,7));g.value?(c.value=ie.data||[],l.value=ne):s.value===1&&!I.value?(c.value=ie.data||[],l.value=ne):(c.value=[...c.value,...ie.data||[]],l.value=[...l.value,...ne]),l.value.sort((se,Se)=>se.date===Se.date?On(se.start)>On(Se.start)?1:-1:ve(se.date).isAfter(ve(Se.date))?1:-1),o.value=(ie==null?void 0:ie.total)||0,i.nextTick(()=>{St(),me.value&&!I.value&&X()})}finally{n.value=!1,z.value=!1,N.value=!1,g.value=!1}},K=zi.useDebounceFn(()=>{d.value&&(I.value||(N.value=!0,s.value++,P()))},200),L=zi.useDebounceFn(()=>{if(!d.value||!I.value)return;const ie=window.scrollY||window.pageYOffset,ne=window.innerHeight;document.documentElement.scrollHeight-(ie+ne)<=300&&!z.value&&(N.value=!0,s.value++,P())},200),U=ie=>{const ne=l.value.filter(se=>se.date===ie);return ne.length&&ne.every(se=>se.is_delete)},V=ie=>{const ne=ie.target;if(!ne)return;const se=ne.scrollTop,Se=ne.scrollHeight,pe=ne.clientHeight;se+pe>=Se&&K()},X=()=>{me.value.getContainerEl().addEventListener("scroll",V)},F=i.ref({}),B=(ie,ne)=>{ie&&ne&&(F.value[ne]=ie)},Q=async ie=>{await F.value[ie].copyInfo(),t.success({content:m("common.copySuccess")})},Z=i.ref(!1),oe=i.ref(null),ce=ie=>{$("edit",ie,"whole")},re=ie=>{oe.value=ie,Z.value=!0},ue=async()=>{if(O.deleteMeetingRequest&&oe.value)try{D.value=!0;const ie=await O.deleteMeetingRequest(oe.value.id);if(typeof ie=="boolean"&&!ie)return;Z.value=!1,t.success({content:`${m("meeting.meetingCancel",[oe.value.topic])}`}),g.value=!0,P()}finally{D.value=!1}},te=i.ref(!1),Ae=i.ref(""),we=i.ref(null),Le=[{label:m("meeting.meetingSingle"),value:"single"},{label:m("meeting.meetingCycle"),value:"whole"}],De=i.ref("single"),Ve=(ie,ne)=>{ie.is_cycle?(we.value=ie,Ae.value=ne,te.value=!0):ne==="cancel"?re(ie):ce(ie)},Qe=()=>{te.value=!1,we.value=null,Ae.value="",De.value="single"},et=async()=>{const ie=we.value;if(ie)if(Ae.value==="cancel")try{let ne;if(D.value=!0,De.value==="single"&&ie.is_cycle){if(!O.cancelSubMeetingRequest)return;ne=await O.cancelSubMeetingRequest(ie.sub_id),t.success({content:`${m("meeting.meetingCancel",[ie.topic])}`})}else{if(!O.deleteMeetingRequest)return;ne=await O.deleteMeetingRequest(ie.id),t.success({content:`${m("meeting.meetingCancel",[ie.topic])}`})}if(typeof ne=="boolean"&&!ne)return;Qe(),g.value=!0,P()}finally{D.value=!1}else $("edit",ie,De.value),Qe()},$e=i.ref(),Ge=i.computed(()=>[...new Set(l.value.map(ie=>ie.date))].sort((ie,ne)=>ve(ie).isBefore(ve(ne))?-1:1)),xt=i.computed(()=>[...new Set(l.value.filter(ie=>!ie.isExpired&&!ie.is_delete).map(ie=>ie.date))].sort((ie,ne)=>ve(ie).isBefore(ve(ne))?-1:1)),Ie=i.ref(),St=()=>{var se;const ie=xt.value.find(Se=>!ve(Se).isBefore(ve(new Date).format("YYYY-MM-DD")));ie?Ie.value=ie:Ie.value||(Ie.value=ve().format("YYYY-MM-DD")),(se=$e.value)==null||se.pickDay(ve(Ie.value)),Ie.value=ve(Ie.value).format("YYYY-MM-DD");const ne=l.value.find(Se=>Se.date===Ie.value&&!Se.isExpired&&!Se.is_delete);ne&&(H.value=[ne.sub_id||ne.id])},lt=(ie,ne)=>{var se;(!ne||!((se=ie.target)!=null&&se.className.includes("date-cell-text")))&&(ie.stopPropagation(),ie.preventDefault())},Ee=ie=>{$e.value&&(s.value=1,o.value=null,window.scrollTo({top:0,behavior:"smooth"}),$e.value.selectDate(ie),g.value=!0,i.nextTick(()=>{Ie.value=ve($e.value.selectedDay).format("YYYY-MM-DD"),P()}))},Te=i.computed(()=>l.value.reduce((ie,ne)=>{if(ie.length){const se=ie.at(-1);return(se==null?void 0:se.date)===ne.date?se.list.push(ne):ie.push({date:ne.date,list:[ne]}),ie}else return[{date:ne.date,list:[ne]}]},[])),me=i.ref();i.watch(()=>Ie.value,()=>{Fe(Ie.value)});const Fe=ie=>{var Se,pe,Ke;const ne=ve(ie).format("YYYY-MM-DD"),se=document.querySelector(`#group-title-${ne}`);se&&(I.value?window.scrollTo({top:(((Se=se.parentElement)==null?void 0:Se.offsetTop)||0)-52,behavior:"smooth"}):(Ke=me.value)==null||Ke.scrollTo({top:((pe=se.parentElement)==null?void 0:pe.offsetTop)||0,behavior:"smooth"}))};i.onMounted(()=>{P(),window.addEventListener("scroll",L),window.addEventListener("resize",L),w(),window.addEventListener("resize",w)}),i.onUnmounted(()=>{var ne;window.removeEventListener("scroll",L),window.removeEventListener("resize",L),window.removeEventListener("resize",w);const ie=(ne=me.value)==null?void 0:ne.getContainerEl();ie==null||ie.removeEventListener("scroll",V)});const qe=ie=>{const ne=ve(ie||void 0);return E.value?ne.format("MMMM YYYY"):ne.format("YYYY MM月")},gt=i.computed(()=>[{id:"confirm",color:"primary",label:m("common.confirm"),variant:"solid",size:"large",round:"pill",loading:D.value,onClick:()=>{et()}},{id:"cancel",color:"primary",label:m("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Qe()}}]),Et=i.computed(()=>[{id:"confirm",color:"primary",label:m("common.confirm"),variant:"solid",size:"large",round:"pill",loading:D.value,onClick:()=>{ue()}},{id:"cancel",color:"primary",label:m("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Z.value=!1}}]);return(ie,ne)=>(i.openBlock(),i.createElementBlock("div",Lx,[i.createElementVNode("div",Mx,[i.createElementVNode("div",Px,[i.createElementVNode("span",null,i.toDisplayString(qe(Ie.value)),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[0]||(ne[0]=se=>Ee("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[1]||(ne[1]=se=>Ee("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),i.createElementVNode("div",Rx,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendarRef",ref:$e,modelValue:Ie.value,"onUpdate:modelValue":ne[4]||(ne[4]=se=>Ie.value=se)},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(qe(Ie.value)),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[2]||(ne[2]=se=>Ee("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[3]||(ne[3]=se=>Ee("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:se})=>[i.createElementVNode("div",{onClick:Se=>lt(Se,Ge.value.includes(se.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":se.isSelected,"is-today":i.unref(ct)(se.day)===i.unref(ct)(),clickable:Ge.value.includes(se.day),expired:i.unref(ve)(i.unref(ct)()).isAfter(i.unref(ve)(se.day)),"all-deleted":U(se.day)}),style:i.normalizeStyle({"--dot-bg":`${i.unref(T)(i.unref(Be).MEETING,"color")}`})},[i.createElementVNode("div",Fx,i.toDisplayString(Number(se.day.split("-")[2])),1)],14,Vx)]),_: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:me,onScrollend:i.unref(K),style:i.normalizeStyle({"--header-height":x.value}),class:"scroller-container","show-type":"hover"},{default:i.withCtx(()=>[i.createElementVNode("div",$x,[i.createVNode(i.unref(A.OCollapse),{modelValue:H.value,"onUpdate:modelValue":ne[7]||(ne[7]=se=>H.value=se),accordion:i.unref(I)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Te.value,(se,Se)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:se.date},[Se===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ne[5]||(ne[5]=pe=>Ee("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(m)("meeting.preMonth")),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["group-item",Se===Te.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"group-bar":!0,"is-active":i.unref(ve)(Ie.value).format("YYYY-MM-DD")===se.date,"is-end":se.list.every(pe=>pe.isExpired)})},[...ne[11]||(ne[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":se.list.every(pe=>pe.isExpired)}),id:`group-title-${i.unref(ve)(new Date(se.date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(ve)(se.date).format("MM/DD"))+" "+i.toDisplayString(i.unref(y)(se.date)),11,Ux),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.list,(pe,Ke)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:pe.sub_id||pe.id,value:pe.sub_id||pe.id,class:i.normalizeClass({"last-item":Se===Te.value.length-1&&Ke===se.list.length-1})},{title:i.withCtx(()=>[i.createElementVNode("div",qx,[i.createElementVNode("div",{class:"meeting-icon",style:i.normalizeStyle({backgroundColor:`${i.unref(T)(i.unref(Be).MEETING,"color")}`})},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(T)(i.unref(Be).MEETING,"icon"))))]),_:1})],4),i.createElementVNode("div",zx,[i.createElementVNode("div",{class:i.normalizeClass({"meeting-title":!0,"is-delete":pe.is_delete,"is-end":pe.isExpired})},[pe.is_delete?(i.openBlock(),i.createElementBlock("div",jx,i.toDisplayString(i.unref(m)("meeting.meetingCancelled")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",Hx,[i.createElementVNode("div",Gx,i.toDisplayString(pe.topic),1)]),pe.is_cycle?(i.openBlock(),i.createElementBlock("div",Wx,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],2),i.createElementVNode("div",Yx,[i.createElementVNode("span",null,i.toDisplayString(pe.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString(r.groupType===i.unref(vi).GROUP?i.unref(m)("meeting.groups"):i.unref(m)("meeting.sigs"))+": "+i.toDisplayString(pe.group_name),1)])])]),pe.is_delete?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",Xx,[pe.isExpired?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[pe.etherpad?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,"hover-underline":!1,target:"_blank",href:pe.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(m)("meeting.meetingSummary"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0),pe.hasObsData?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,"hover-underline":!1,target:"_blank",href:`/${i.unref(S)}/video/${pe.group_name}/${pe.mid}/${pe.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(m)("meeting.viewRecord"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0)],64)):(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,"hover-underline":!1,target:"_blank",href:pe.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(m)("meeting.joinMeeting"))+" ",1)]),_:1},8,["href"]))])),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>Q(Ke),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(kl))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",Kx,[i.createVNode(ts,{show:H.value.includes(pe.sub_id||pe.id),data:pe,ref_for:!0,ref:Oe=>B(Oe,pe.id),from:"my"},null,8,["show","data"]),!pe.isExpired&&!pe.is_delete?(i.openBlock(),i.createElementBlock("div",Qx,[i.createVNode(i.unref(A.OButton),{color:"normal",variant:"text",onClick:Oe=>Ve(pe,"edit")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.editMeeting")),1)]),_:1},8,["onClick"]),i.createVNode(i.unref(A.OButton),{color:"normal",variant:"text",onClick:Oe=>Ve(pe,"cancel")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.cancelMeeting")),1)]),_:1},8,["onClick"])])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ne[12]||(ne[12]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Se===Te.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[N.value?(i.openBlock(),i.createElementBlock("div",Zx,i.toDisplayString(i.unref(m)("common.loading")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:ne[6]||(ne[6]=pe=>Ee("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(m)("meeting.nextMonth")),1)])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):n.value?i.createCommentVNode("",!0):i.renderSlot(ie.$slots,"empty",{key:1})],2),i.createVNode(i.unref(A.ODialog),{visible:te.value,"onUpdate:visible":ne[9]||(ne[9]=se=>te.value=se),"main-class":"handle-dialog",onClose:Qe,actions:gt.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.meetingHandleText",[Ae.value==="edit"?i.unref(m)("meeting.edit"):i.unref(m)("meeting.cancel")])),1)]),default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadioGroup),{modelValue:De.value,"onUpdate:modelValue":ne[8]||(ne[8]=se=>De.value=se)},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(Le,se=>i.createVNode(i.unref(A.ORadio),{value:se.value,key:se.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(se.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Z.value,"onUpdate:visible":ne[10]||(ne[10]=se=>Z.value=se),"main-class":"cancel-dialog",actions:Et.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.confirmCancel")),1)]),default:i.withCtx(()=>{var se;return[i.createElementVNode("div",Jx,i.toDisplayString(i.unref(m)("meeting.confirmCancelDesc",[(se=oe.value)==null?void 0:se.topic])),1)]}),_:1},8,["visible","actions"])])]))}}),eC=Object.assign(hc,{install(r){r.component("OMeetingCalendar",hc)}}),tC=Object.assign(mc,{install(r){r.component("OMeetingForm",mc)}}),iC=Object.assign(Hd,{install(r){r.component("OMeetingPlayback",Hd)}}),nC=Object.assign(Gd,{install(r){r.component("OMeetingSigCalendar",Gd)}}),rC=Object.assign(Wd,{install(r){r.component("OMeetingMyCalendar",Wd)}}),sC={class:"o-activity-table"},aC={key:0,class:"table-wrapper"},oC={class:"expand-detail"},lC={class:"sort-btn"},uC={class:"activity-btn"},cC={key:0,class:"pagination-wrapper"},dC={key:1,class:"collapse-wrapper"},hC={class:"title-top"},fC={class:"act-title"},pC={class:"act-sponsor"},mC={class:"sponsor"},gC={class:"activity-btn"},vC={class:"activity-detail"},yC={key:0,class:"pagination"},_C={class:"dialog-content"},TC={class:"dialog-content"},Yd=i.defineComponent({__name:"OActivityApproval",props:{getTableDataRequest:{},applicantList:{},cancelActivityRequest:{},deleteActivityRequest:{},approveActivityRequest:{},rejectActivityRequest:{},getActivityDetailRequest:{}},setup(r){const{t:e,locale:t}=Xe.useI18n(),n=i.computed(()=>t.value==="zh"),{approvalStatusMap:s,statusMap:a,activityTypeMap:o}=ba(),l=A.useMessage(null),{isPhone:c,lePadV:d}=At.useScreen(),g=r,m=i.reactive({page:1,size:10,status:"",is_delete:0,search:"",sponsor:"",order_by:""}),S=i.ref([]),b=i.computed(()=>g.applicantList.map(Ee=>({value:Ee,label:Ee}))),T=()=>{m.sponsor=S.value.join(",")},y=i.ref("desc"),E=()=>{y.value=y.value==="asc"?"desc":"asc",m.order_by=y.value},O=i.ref(),D=i.computed(()=>{const Ee=[];return s.value.forEach(Te=>{Ee.push(Te)}),Ee.slice(1)}),I=()=>{m.status=O.value,O.value==="cancel"?m.is_delete=1:m.is_delete=0},H=i.ref([]),$=i.ref(0),z=[10,20,30,40],N=async()=>{const{page:Ee,size:Te,status:me,sponsor:Fe,order_by:qe,search:gt,is_delete:Et}=m;let ie={page:Ee,size:Te,sponsor:Fe,order_by:qe,search:gt};if(me!=="all"&&me!==""&&(ie.is_delete=Et),me==="cancel"?ie.status="":ie.status=me,!g.getTableDataRequest)return;const ne=await g.getTableDataRequest(ie);H.value=(ne.data||[]).map(se=>{var ft;const{start_date:Se,end_date:pe,start:Ke,end:Oe,activity_type:Nt}=se;return[{...se,time:`${Se}-${Oe}`,start_date_time:`${Se} ${Ke}`,end_date_time:`${pe} ${Oe}`,type:Be.EVENTS,dateRange:`${Se} ${Ke}-${pe} ${Oe}`,activity_type:(ft=o.value.get(Nt))==null?void 0:ft.label}]}).flat(),$.value=ne.total},j=Ee=>{Ee.pageSize!==m.size?m.page=1:m.page=Ee.page,m.size=Ee.pageSize,N()},x=i.ref({reason:""}),w=i.ref(),P=i.ref(!1),K=i.ref(null),L=i.ref(""),U=i.ref(0),V=i.ref(!1),X=i.ref({reason:[{required:!0,message:e("meeting.enterReviewNotes")}]}),F=async()=>{var Ee,Te,me,Fe;if(!(!g.approveActivityRequest||!g.rejectActivityRequest))try{P.value=!0;const qe=await((Ee=w.value)==null?void 0:Ee.validate());if(!qe||qe.some(gt=>!!gt)){P.value=!1;return}U.value===1?await g.approveActivityRequest((Te=K.value)==null?void 0:Te.id,x.value):await g.rejectActivityRequest((me=K.value)==null?void 0:me.id,x.value),N(),B(),l.success({content:e("meeting.reviewSuccess",[(Fe=K.value)==null?void 0:Fe.title])})}finally{V.value=!1,P.value=!1}},B=()=>{V.value=!1,Z.value=!1,P.value=!1,x.value.reason=""},Q=async()=>{var Ee;if(g.deleteActivityRequest&&g.cancelActivityRequest)try{P.value=!0,re.value===1?await g.cancelActivityRequest(K.value.id,x.value):await g.deleteActivityRequest(K.value.id,x.value),N(),B(),l.success({content:e("meeting.activityActionSuccess",[(Ee=K.value)==null?void 0:Ee.title,ce.value])})}finally{P.value=!1,Z.value=!1}},Z=i.ref(!1),oe=i.ref(""),ce=i.ref(""),re=i.ref(0),ue=Ee=>{oe.value=e("meeting.deleteActivity"),ce.value=e("meeting.deleteActivity").toLowerCase(),K.value=Ee,re.value=0,Z.value=!0},te=Ee=>{oe.value=e("meeting.cancelActivity"),ce.value=e("common.cancel").toLowerCase(),K.value=Ee,re.value=1,Z.value=!0},Ae=Ee=>{K.value=Ee,L.value=e("meeting.approveReview"),U.value=1,V.value=!0},we=Ee=>{K.value=Ee,L.value=e("meeting.rejectReview"),U.value=0,V.value=!0},Le=i.ref([]),De=i.ref([]),Ve=Ee=>{const Te=Ee.toString();if(!g.getActivityDetailRequest)return;Le.value.includes(Te)||(Le.value.push(Te),g.getActivityDetailRequest(Te).then(Fe=>{var qe;(qe=H.value)==null||qe.forEach(gt=>{gt.id===Fe.id&&(gt.approve_record=Fe.approve_record,gt.approver=Fe.approver)})}));const me=De.value.indexOf(Te);De.value.includes(Te)?De.value.splice(me,1):De.value.push(Te)},Qe=Ee=>{Ve(Ee.id)},et=Ee=>Ee.id.toString(),$e=i.ref([]),Ge=Ee=>{Ee.length&&Ee.forEach(Te=>{Ve(Te)})},xt=i.ref({}),Ie=(Ee,Te)=>{Ee&&Te&&(xt.value[Te]=Ee)};i.onMounted(()=>{N()}),i.watch(()=>[m.status,m.sponsor,m.order_by,m.search,m.is_delete],()=>{N()},{deep:!0});const St=i.computed(()=>[{id:"confirm",loading:P.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{Q()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{B()}}]),lt=i.computed(()=>[{id:"confirm",loading:P.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{F()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{B()}}]);return(Ee,Te)=>(i.openBlock(),i.createElementBlock("div",sC,[i.unref(c)?(i.openBlock(),i.createElementBlock("div",dC,[i.createVNode(i.unref(A.OCollapse),{modelValue:$e.value,"onUpdate:modelValue":Te[2]||(Te[2]=me=>$e.value=me),accordion:i.unref(c),onChange:Ge},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(H.value,me=>{var Fe;return i.openBlock(),i.createElementBlock(i.Fragment,{key:me.id},[i.createElementVNode("div",hC,[i.createElementVNode("p",fC,i.toDisplayString(me.title),1),me.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(Fe=i.unref(a).get(me.status))==null?void 0:Fe.id}`])},{default:i.withCtx(()=>{var qe;return[i.createTextVNode(i.toDisplayString((qe=i.unref(a).get(me.status))==null?void 0:qe.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(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.statusCanceled")),1)]),_:1}))]),i.createVNode(i.unref(A.OCollapseItem),{value:me.id},{title:i.withCtx(()=>[i.createElementVNode("div",pC,[i.createElementVNode("p",mC,i.toDisplayString(me.sponsor),1),i.createElementVNode("p",null,i.toDisplayString(i.unref(tt.dayjs)(me.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),i.createElementVNode("div",gC,[me.status===7||me.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",variant:"text",onClick:i.withModifiers(qe=>ue(me),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(me.status===3||me.status===4)&&me.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",variant:"text",onClick:i.withModifiers(qe=>te(me),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",variant:"text",onClick:i.withModifiers(qe=>Ae(me),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",variant:"text",onClick:i.withModifiers(qe=>we(me),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),default:i.withCtx(()=>[i.createElementVNode("div",vC,[i.createVNode(ts,{show:$e.value.includes(me.id),data:me,ref_for:!0,ref:qe=>Ie(qe,me.id),page:i.unref(Be).APPROVAL},null,8,["show","data","page"])])]),_:2},1032,["value"])],64)}),128))]),_:1},8,["modelValue","accordion"]),$.value>z[0]?(i.openBlock(),i.createElementBlock("div",yC,[i.createVNode(i.unref(A.OPagination),{total:$.value,page:m.page,"page-size":m.size,"page-sizes":z,layout:["total","jumper","pager","pagesize"],"show-more":!1,simple:!0,onChange:j},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",aC,[i.createVNode(i.unref(tt.ElTable),{data:H.value,onExpandChange:Qe,"row-key":et,"expand-row-keys":De.value},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElTableColumn),{type:"expand"},{default:i.withCtx(me=>[i.createElementVNode("div",oC,[i.createVNode(ts,{data:me.row,page:i.unref(Be).APPROVAL,show:""},null,8,["data","page"])])]),_:1}),i.createVNode(i.unref(tt.ElTableColumn),{label:i.unref(e)("meeting.activityName"),prop:"title"},null,8,["label"]),i.createVNode(i.unref(tt.ElTableColumn),{prop:"sponsor"},{header:i.withCtx(()=>[i.createVNode(uc,{modelValue:S.value,"onUpdate:modelValue":Te[0]||(Te[0]=me=>S.value=me),onConfirm:T,list:b.value,multiple:!0},{empty:i.withCtx(()=>[i.renderSlot(Ee.$slots,"filter-empty")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(i.unref(e)("meeting.applicant")),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:E},[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("meeting.submissionTime")),1),i.createElementVNode("div",lC,[i.createElementVNode("div",{class:i.normalizeClass(["sort-asc sort-item",{active:y.value==="asc"}])},null,2),i.createElementVNode("div",{class:i.normalizeClass(["sort-desc sort-item",{active:y.value==="desc"}])},null,2)])])]),default:i.withCtx(me=>[i.createTextVNode(i.toDisplayString(i.unref(tt.dayjs)(me.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(uc,{modelValue:O.value,"onUpdate:modelValue":Te[1]||(Te[1]=me=>O.value=me),onConfirm:I,list:D.value},{empty:i.withCtx(()=>[i.renderSlot(Ee.$slots,"filter-empty")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(i.unref(e)("meeting.status")),1)]),_:3},8,["modelValue","list"])]),default:i.withCtx(me=>{var Fe;return[me.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(Fe=i.unref(a).get(me.row.status))==null?void 0:Fe.id}`])},{default:i.withCtx(()=>{var qe;return[i.createTextVNode(i.toDisplayString((qe=i.unref(a).get(me.row.status))==null?void 0:qe.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(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.statusCanceled")),1)]),_:1}))]}),_:3}),i.createVNode(i.unref(tt.ElTableColumn),{label:i.unref(e)("meeting.action")},{default:i.withCtx(me=>[i.createElementVNode("div",uC,[me.row.status===7||me.row.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",onClick:Fe=>ue(me.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(me.row.status===3||me.row.status===4)&&me.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",onClick:Fe=>te(me.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",onClick:Fe=>Ae(me.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",onClick:Fe=>we(me.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),_:1},8,["label"])]),_:3},8,["data","expand-row-keys"]),$.value>z[0]?(i.openBlock(),i.createElementBlock("div",cC,[i.createVNode(i.unref(A.OPagination),{total:$.value,page:m.page,"page-size":m.size,"page-sizes":z,layout:["total","jumper","pager","pagesize"],"show-more":!1,onChange:j},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])),i.createVNode(i.unref(A.ODialog),{visible:V.value,"onUpdate:visible":Te[4]||(Te[4]=me=>V.value=me),"phone-half-full":i.unref(d),"main-class":"handle-dialog-approval review-dialog",actions:lt.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(L.value),1)]),default:i.withCtx(()=>[i.createElementVNode("div",_C,[i.createVNode(i.unref(A.OForm),{model:x.value,ref_key:"formRef",ref:w,"has-required":"",layout:"v",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:X.value.reason,label:`${i.unref(e)("meeting.reviewNotesLabel")}${n.value?":":": "}`,field:"reason"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:i.unref(e)("meeting.enterReviewNotes"),rows:4,resize:"none","max-length":1e3,"input-on-outlimit":!1,modelValue:x.value.reason,"onUpdate:modelValue":Te[3]||(Te[3]=me=>x.value.reason=me)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model"])])]),_:1},8,["visible","phone-half-full","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Z.value,"onUpdate:visible":Te[5]||(Te[5]=me=>Z.value=me),"phone-half-full":i.unref(d),"main-class":"handle-dialog-approval cancel-dialog",actions:St.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(oe.value),1)]),default:i.withCtx(()=>{var me,Fe;return[i.createElementVNode("div",TC,i.toDisplayString(re.value===1?i.unref(e)("meeting.confirmCancelActivity",[(me=K.value)==null?void 0:me.title]):i.unref(e)("meeting.confirmDeleteActivity",[(Fe=K.value)==null?void 0:Fe.title])),1)]}),_:1},8,["visible","phone-half-full","actions"])]))}}),bC={class:"o-my-activity-calendar"},xC={class:"activity-list"},CC={key:0,class:"list-calendar-mb"},SC={class:"left-calendar"},EC=["onClick"],kC={class:"date-cell-text"},wC={class:"right-meeting"},DC={class:"list-body"},AC=["id"],NC={class:"item-header-left"},IC={class:"header-info"},OC={class:"title-text"},BC={class:"act-info"},LC={class:"date-range"},MC={key:0,class:"item-header-right"},PC={class:"activity-detail"},RC={key:0,class:"activity-btn"},VC={key:0,class:"load-text"},FC={class:"dialog-content"},$C={class:"dialog-content"},UC=i.defineComponent({__name:"OActivityMyCalendar",props:{getListRequest:{},revokeActivityRequest:{},deleteActivityRequest:{},editActivityRequest:{},getActivityDetailRequest:{}},emits:["edit"],setup(r,{emit:e}){const{t,locale:n}=Xe.useI18n(),s=i.computed(()=>n.value===Xe.Locales.ZH),{statusMap:a,activityTypeMap:o}=ba(),{getConfig:l}=Tn(),c=ie=>{const ne=ve(ie||new Date);return s.value?ne.format("YYYY MM月"):ne.format("MMMM YYYY")},d=A.useMessage(null),{isPhone:g}=At.useScreen(),m=r,S=e,b=i.ref([]),T=i.ref([]),y=i.ref(1),E=i.ref(50),O=i.ref(null),D=i.ref(!1),I=i.ref([]),H=i.ref(!1),$=i.ref(!1),z=i.computed(()=>O.value===null||T.value.length<O.value),N=async()=>{if(m.getListRequest&&!H.value)try{if(O.value!==null&&O.value>0&&(y.value-1)*E.value>O.value)return;if(!z.value&&g.value){Z("next-month");return}H.value=!0;const ie=await m.getListRequest({page:y.value,size:E.value,start_date:V.value}),ne=(ie.data||[]).map(se=>{const{start_date:Se,end_date:pe,start:Ke,end:Oe}=se;return[{...se,time:`${Se}-${Oe}`,start_date_time:`${Se} ${Ke}`,end_date_time:`${pe} ${Oe}`,type:Be.EVENTS,dateRange:`${Se} ${Ke}-${pe} ${Oe}`,isExpired:ve(`${Se} ${Ke}`).isBefore(ve())}]}).flat().filter(se=>se.start_date.slice(0,7)===ct(V.value,"YYYY-MM-DD").slice(0,7));D.value?(T.value=ie.data||[],b.value=ne):y.value===1&&!g.value?(T.value=ie.data||[],b.value=ne):(T.value=[...T.value,...ie.data||[]],b.value=[...b.value,...ne]),b.value.sort((se,Se)=>se.start_date===Se.start_date?On(se.start)>On(Se.start)?1:-1:ve(se.start_date).isAfter(ve(Se.start_date))?1:-1),O.value=(ie==null?void 0:ie.total)||0,i.nextTick(()=>{B(),te.value&&!g.value&&L()})}finally{H.value=!1,$.value=!1,D.value=!1}},j=i.ref([]),x=ie=>{m.getActivityDetailRequest&&(j.value.includes(ie)||(j.value.push(ie),m.getActivityDetailRequest(ie).then(ne=>{var se;(se=b.value)==null||se.forEach(Se=>{Se.id===ne.id&&(Se.approve_record=ne.approve_record)})})))},w=ie=>{ie.length&&ie.forEach(ne=>{x(ne)})},P=ie=>{const ne=b.value.filter(se=>se.start_date===ie);return ne.length&&ne.every(se=>se.status===3||se.status===4)},K=ie=>{const ne=ie.target;if(!ne)return;const se=ne.scrollTop,Se=ne.scrollHeight,pe=ne.clientHeight;se+pe>=Se&&we()},L=()=>{te.value.getContainerEl().addEventListener("scroll",K)},U=i.ref(),V=i.ref(ve().format("YYYY-MM-DD")),X=i.computed(()=>[...new Set(b.value.map(ie=>ie.start_date))].sort((ie,ne)=>ve(ie).isBefore(ve(ne))?-1:1)),F=i.computed(()=>[...new Set(b.value.filter(ie=>!ie.isExpired&&!ie.is_delete).map(ie=>ie.start_date))].sort((ie,ne)=>ve(ie).isBefore(ve(ne))?-1:1)),B=()=>{var se;const ie=F.value.find(Se=>!ve(Se).isBefore(ve(new Date).format("YYYY-MM-DD")));ie?V.value=ie:V.value||(V.value=ve().format("YYYY-MM-DD")),(se=U.value)==null||se.pickDay(ve(V.value)),V.value=ve(V.value).format("YYYY-MM-DD");const ne=b.value.find(Se=>Se.start_date===V.value&&!Se.isExpired&&!Se.is_delete);ne&&(x(ne.id),I.value=[ne.id])},Q=(ie,ne)=>{var se;(!ne||!((se=ie.target)!=null&&se.className.includes("date-cell-text")))&&(ie.stopPropagation(),ie.preventDefault())},Z=ie=>{U.value&&(y.value=1,O.value=null,j.value=[],window.scrollTo({top:0,behavior:"smooth"}),U.value.selectDate(ie),D.value=!0,i.nextTick(()=>{V.value=ve(U.value.selectedDay).format("YYYY-MM-DD"),N()}))},oe=i.computed(()=>b.value.reduce((ie,ne)=>{if(ie.length){const se=ie.at(-1);return(se==null?void 0:se.start_date)===ne.start_date?se==null||se.list.push(ne):ie.push({start_date:ne.start_date,list:[ne]}),ie}else return[{start_date:ne.start_date,list:[ne]}]},[])),ce=i.ref({}),re=(ie,ne)=>{ie&&ne&&(ce.value[ne]=ie)},ue=async ie=>{await ce.value[ie].copyInfo(),d.success({content:t("common.copySuccess")})},te=i.ref(),Ae=ie=>{var Se,pe,Ke;const ne=ve(ie).format("YYYY-MM-DD"),se=document.querySelector(`#group-title-${ne}`);se&&(g.value?window.scrollTo({top:(((Se=se.parentElement)==null?void 0:Se.offsetTop)||0)-52,behavior:"smooth"}):(Ke=te.value)==null||Ke.scrollTo({top:((pe=se.parentElement)==null?void 0:pe.offsetTop)||0,behavior:"smooth"}))};i.watch(()=>V.value,()=>{Ae(V.value)});const we=zi.useDebounceFn(()=>{z.value&&(g.value||($.value=!0,y.value++,N()))},200),Le=i.ref(!1),De=i.ref(null),Ve=i.ref(!1),Qe=ie=>{De.value=ie,Ve.value=!0},et=()=>{var ie;m.revokeActivityRequest&&De.value&&(Le.value=!0,m.revokeActivityRequest((ie=De.value)==null?void 0:ie.id).then(ne=>{var se;typeof ne=="boolean"&&!ne||(d.success({content:t("meeting.revokeActivitySuccess",[(se=De.value)==null?void 0:se.title])}),D.value=!0,N())}).finally(()=>{Ve.value=!1,Le.value=!1}))},$e=()=>{Ve.value=!1},Ge=ie=>{S("edit",ie)},xt=ie=>{if(!m.editActivityRequest)return;const{title:ne,start_date:se,end_date:Se,register_end_date:pe,activity_type:Ke,synopsis:Oe,register_url:Nt,content_url:ft,address:ui,start:It,end:Wt,approver:Ot}=ie;let Rt={title:ne,start_date:se,end_date:Se,register_end_date:pe,activity_type:Ke,synopsis:Oe,register_url:Nt,content_url:ft,address:ui,start:It,end:Wt,approver:Ot,is_publish:"true"};m.editActivityRequest(ie.id,Rt).then(ci=>{typeof ci=="boolean"&&!ci||(d.success({content:t("meeting.submitReviewSuccess",[ie.title])}),D.value=!0,N())})},Ie=i.ref(!1),St=ie=>{De.value=ie,Ie.value=!0},lt=()=>{var ie;m.deleteActivityRequest&&(Le.value=!0,m.deleteActivityRequest((ie=De.value)==null?void 0:ie.id).then(ne=>{var se;typeof ne=="boolean"&&!ne||(d.success({content:t("meeting.deleteActivitySuccess",[(se=De.value)==null?void 0:se.title])}),D.value=!0,N())}).finally(()=>{Ie.value=!1,Le.value=!1}))},Ee=()=>{Ie.value=!1},Te=i.ref(),me=i.ref(0),Fe=()=>{var ie;me.value=((ie=Te.value)==null?void 0:ie.clientHeight)||0},qe=zi.useDebounceFn(()=>{if(!z.value||!g.value)return;const ie=window.scrollY||window.pageYOffset,ne=window.innerHeight;document.documentElement.scrollHeight-(ie+ne)<=300&&!H.value&&($.value=!0,y.value++,N())},200);i.onMounted(()=>{N(),window.addEventListener("scroll",qe),window.addEventListener("resize",qe),Fe(),window.addEventListener("resize",Fe)}),i.onUnmounted(()=>{var ne;window.removeEventListener("scroll",qe),window.removeEventListener("resize",qe),window.removeEventListener("resize",Fe);const ie=(ne=te.value)==null?void 0:ne.getContainerEl();ie==null||ie.removeEventListener("scroll",K)});const gt=i.computed(()=>[{id:"confirm",loading:Le.value,color:"primary",variant:"outline",round:"pill",size:"large",label:t("meeting.confirmBtn"),onClick:()=>{et()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:t("meeting.cancelBtn"),onClick:()=>{$e()}}]),Et=i.computed(()=>[{id:"confirm",loading:Le.value,color:"primary",variant:"outline",round:"pill",size:"large",label:t("meeting.confirmBtn"),onClick:()=>{lt()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:t("meeting.cancelBtn"),onClick:()=>{Ee()}}]);return(ie,ne)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",bC,[i.createElementVNode("div",xC,[i.unref(g)?(i.openBlock(),i.createElementBlock("div",CC,[i.createElementVNode("span",null,i.toDisplayString(c(V.value)),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[0]||(ne[0]=se=>Z("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[1]||(ne[1]=se=>Z("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])])):i.createCommentVNode("",!0),i.createElementVNode("div",SC,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendarRef",ref:U,modelValue:V.value,"onUpdate:modelValue":ne[4]||(ne[4]=se=>V.value=se)},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c(V.value)),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[2]||(ne[2]=se=>Z("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[3]||(ne[3]=se=>Z("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:se})=>[i.createElementVNode("div",{onClick:Se=>Q(Se,X.value.includes(se.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":se.isSelected,"is-today":i.unref(ct)(se.day)===i.unref(ct)(),clickable:X.value.includes(se.day),approved:P(se.day)}),style:i.normalizeStyle({"--dot-bg":`${i.unref(l)(i.unref(Be).EVENTS,"color")}`})},[i.createElementVNode("div",kC,i.toDisplayString(Number(se.day.split("-")[2])),1)],14,EC)]),_:1},8,["modelValue"])]),i.createElementVNode("div",wC,[b.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:te,onScrollend:i.unref(we),style:i.normalizeStyle({"--header-height":me.value}),"show-type":"hover",class:"scroller-container"},{default:i.withCtx(()=>[i.createElementVNode("div",DC,[i.createVNode(i.unref(A.OCollapse),{modelValue:I.value,"onUpdate:modelValue":ne[7]||(ne[7]=se=>I.value=se),accordion:i.unref(g),onChange:w},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(oe.value,(se,Se)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:se.start_date},[Se===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ne[5]||(ne[5]=pe=>Z("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(t)("meeting.preMonth")),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["act-item",Se===oe.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"act-bar":!0,"is-active":i.unref(ve)(V.value).format("YYYY-MM-DD")===se.start_date,"is-end":se.list.every(pe=>pe.isExpired),approved:se.list.every(pe=>pe.status===3||pe.status===4)})},[...ne[10]||(ne[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":se.list.every(pe=>pe.isExpired)}),id:`group-title-${i.unref(ve)(new Date(se.start_date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(ve)(se.start_date).format("MM/DD")),11,AC),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.list,(pe,Ke)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:pe.sub_id||pe.id,value:pe.sub_id||pe.id,class:i.normalizeClass({"last-item":Se===oe.value.length-1&&Ke===se.list.length-1})},{title:i.withCtx(()=>{var Oe,Nt;return[i.createElementVNode("div",NC,[i.createElementVNode("div",{class:"act-icon",style:i.normalizeStyle({backgroundColor:`${i.unref(l)(i.unref(Be).EVENTS,"color")}`})},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(l)(i.unref(Be).EVENTS,"icon"))))]),_:1})],4),i.createElementVNode("div",IC,[i.createElementVNode("div",{class:i.normalizeClass({"act-title":!0,"is-delete":pe.is_delete,"is-end":pe.isExpired})},[i.createElementVNode("div",OC,i.toDisplayString(pe.title),1),i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline",class:i.normalizeClass([`tag-${pe.is_delete?"delete":(Oe=i.unref(a).get(pe.status))==null?void 0:Oe.id}`])},{default:i.withCtx(()=>{var ft;return[i.createTextVNode(i.toDisplayString(pe.is_delete===1?i.unref(t)("meeting.statusCanceled"):(ft=i.unref(a).get(pe.status))==null?void 0:ft.text),1)]}),_:2},1032,["class"])],2),i.createElementVNode("div",BC,[i.createElementVNode("span",LC,i.toDisplayString(pe.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString((Nt=i.unref(o).get(pe.activity_type))==null?void 0:Nt.label),1)])])]),pe.content_url&&!pe.is_delete&&[3,4,5,6].includes(pe.status)?(i.openBlock(),i.createElementBlock("div",MC,[pe.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,"hover-underline":!1,href:pe.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(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.activityDetail"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0),pe.register_url&&(pe.status===3||pe.status===4||pe.status===2&&pe.update_activity_id&&new Date(pe.register_end_date).getTime()>new Date().getTime())?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,"hover-underline":!1,href:pe.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(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.registerNow"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>ue(Ke),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(kl))]),_:1},8,["onClick"])]}),default:i.withCtx(()=>[i.createElementVNode("div",PC,[i.createVNode(ts,{show:I.value.includes(pe.id),data:pe,ref_for:!0,ref:Oe=>re(Oe,pe.id)},null,8,["show","data"]),!pe.isExpired&&!pe.is_delete?(i.openBlock(),i.createElementBlock("div",RC,[pe.status===2?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,variant:"text",onClick:Oe=>Qe(pe)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.withdrawReview")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.status===1||pe.status===3||pe.status===4||pe.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:1,variant:"text",onClick:Oe=>Ge(pe)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.modifyActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.status===1||pe.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:2,variant:"text",onClick:Oe=>St(pe)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.status===1||pe.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:3,variant:"text",onClick:Oe=>xt(pe)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.submitReview")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ne[11]||(ne[11]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Se===oe.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[$.value?(i.openBlock(),i.createElementBlock("div",VC,i.toDisplayString(i.unref(t)("meeting.loading")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:ne[6]||(ne[6]=pe=>Z("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(t)("meeting.nextMonth")),1)])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):i.renderSlot(ie.$slots,"empty",{key:1})])])]),i.createVNode(i.unref(A.ODialog),{visible:Ve.value,"onUpdate:visible":ne[8]||(ne[8]=se=>Ve.value=se),"main-class":"handle-dialog-active",actions:gt.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.withdrawReview")),1)]),default:i.withCtx(()=>{var se;return[i.createElementVNode("div",FC,i.toDisplayString(i.unref(t)("meeting.confirmRevokeActivity",[(se=De.value)==null?void 0:se.title])),1)]}),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Ie.value,"onUpdate:visible":ne[9]||(ne[9]=se=>Ie.value=se),"main-class":"handle-dialog-active",actions:Et.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.deleteActivity")),1)]),default:i.withCtx(()=>{var se;return[i.createElementVNode("div",$C,i.toDisplayString(i.unref(t)("meeting.confirmDeleteActivity",[(se=De.value)==null?void 0:se.title])),1)]}),_:1},8,["visible","actions"])],64))}}),qC=Object.assign(ec,{install(r){r.component("OActivityForm",ec)}}),zC=Object.assign(Yd,{install(r){r.component("OActivityApproval",Yd)}}),ip=Object.assign(UC,{install(r){r.component("OActivityMyCalendar",ip)}}),jC={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 HC(r,e){return i.openBlock(),i.createElementBlock("svg",jC,[...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 GC={name:"events-icon-summit",render:HC},WC={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 YC(r,e){return i.openBlock(),i.createElementBlock("svg",WC,[...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 XC={name:"events-icon-events",render:YC},KC={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 QC(r,e){return i.openBlock(),i.createElementBlock("svg",KC,[...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 ZC={name:"events-icon-competition",render:QC},JC={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 e5(r,e){return i.openBlock(),i.createElementBlock("svg",JC,[...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 t5={name:"events-icon-release",render:e5},i5={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},n5={events:XC,competition:ZC,release:t5,summit:GC},Hs={上海:"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"},r5="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",s5={class:"o-events-calendar"},a5={key:0,class:"month-list"},o5={class:"collapse-header"},l5={class:"collapse-title"},u5={key:0,class:"collapse-desc"},c5={key:0,class:"month-content month-content-span"},d5={key:0,class:"event-location"},h5={class:"event-name"},f5={key:1},p5={key:0,class:"month-content-row"},m5={class:"month-name"},g5={class:"event-name"},v5={class:"event-location"},y5={class:"event-name"},_5={class:"event-location"},T5={key:1,class:"month-content month-content-column"},b5={class:"event-location"},x5={class:"event-name"},C5={key:1},Xd=i.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(r){const e=xa(),{lePadV:t}=At.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 m;n.data.length?t.value?a.value=[(m=n.data[0])==null?void 0:m.name]:a.value=n.data.map(S=>S.name):a.value=[]},{immediate:!0});const o=m=>{const S=m.split("/");return parseInt(S[1],10)},l=m=>{const S=new Array(12).fill(0),b=[];return m.forEach((T,y)=>{const[E,O]=Array.isArray(T.date)?[o(T.date[0]),o(T.date[1])]:[o(T.date),o(T.date)];let D=0;for(let H=E-1;H<O;H++)D=Math.max(D,S[H]);const I=D+1;for(let H=E-1;H<O;H++)S[H]=I;b.push({event:T,row:I,eventIndex:y,start:E,end:O})}),b},c=m=>{const S=Array.from({length:12},()=>[]);return m.forEach(b=>{const T=Array.isArray(b.date)?o(b.date[0]):o(b.date);S[T-1].push(b)}),S},d=m=>{const S=m.color||i5[m.type];return S!=null&&S.startsWith("--")?`var(${S})`:S},g=m=>m.icon?m.icon:n5[m.type];return(m,S)=>(i.openBlock(),i.createElementBlock("div",s5,[i.unref(t)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",a5,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(s,b=>i.createElementVNode("div",{class:"month-header",key:b},i.toDisplayString(b),1)),64))])),i.createVNode(i.unref(A.OCollapse),{modelValue:a.value,"onUpdate:modelValue":S[0]||(S[0]=b=>a.value=b)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(b,T)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:T,value:b.name},{title:i.withCtx(()=>[i.createElementVNode("div",o5,[i.createElementVNode("div",l5,[i.createElementVNode("div",{class:"title-icon",style:i.normalizeStyle({"--bg-color":d(b)})},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(g(b))))]),_:2},1024)],4),i.createElementVNode("span",null,i.toDisplayString(b.name),1)]),b.desc?(i.openBlock(),i.createElementBlock("div",u5,[i.withDirectives(i.createElementVNode("div",null,null,512),[[i.unref(e),b.desc]])])):i.createCommentVNode("",!0)])]),default:i.withCtx(()=>[b.isSpanMonth?(i.openBlock(),i.createElementBlock("div",c5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l(b.data),({event:y,row:E,eventIndex:O,start:D,end:I})=>(i.openBlock(),i.createElementBlock("div",{key:O,class:i.normalizeClass(["event-item",{"event-item-center":y.align==="center","has-link":y.link}]),style:i.normalizeStyle({gridColumn:`${D} / ${I+1}`,gridRow:E,"--bg-color":d(b)||void 0})},[y.location?(i.openBlock(),i.createElementBlock("div",d5,i.toDisplayString(y.location),1)):i.createCommentVNode("",!0),i.createElementVNode("div",h5,[y.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),i.mergeProps({key:0,href:y.link,target:"_blank"},{ref_for:!0},y.linkProps||{}),{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(y.name),1)]),_:2},1040,["href"])):(i.openBlock(),i.createElementBlock("span",f5,i.toDisplayString(y.name),1))])],6))),128))])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.unref(t)?(i.openBlock(),i.createElementBlock("div",p5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(b.data),(y,E)=>(i.openBlock(),i.createElementBlock("div",{key:E,class:i.normalizeClass(["month-row",{"empty-month":y.length===0}])},[i.createElementVNode("div",m5,i.toDisplayString(s[E]),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y,(O,D)=>(i.openBlock(),i.createElementBlock("div",{key:D,class:i.normalizeClass(["event-item",O.link?"has-link":""]),style:i.normalizeStyle({"--bd-color":d(b)||void 0})},[O.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:O.link,target:"_blank"},{default:i.withCtx(()=>[i.createElementVNode("div",null,[i.createElementVNode("div",g5,[i.createElementVNode("span",null,i.toDisplayString(O.name),1)]),i.createElementVNode("div",v5,i.toDisplayString(O.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",y5,i.toDisplayString(O.name),1),i.createElementVNode("div",_5,i.toDisplayString(O.location),1)],64))],6))),128))],2))),128))])):(i.openBlock(),i.createElementBlock("div",T5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(b.data),(y,E)=>(i.openBlock(),i.createElementBlock("div",{key:E,class:"month-column"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y,(O,D)=>(i.openBlock(),i.createElementBlock("div",{key:D,class:i.normalizeClass(["event-item",O.link?"has-link":""]),style:i.normalizeStyle({"--bg-color":d(b)||void 0})},[i.createElementVNode("div",b5,i.toDisplayString(O.location),1),i.createElementVNode("div",x5,[O.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:O.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(O.name),1)]),_:2},1032,["href"])):(i.openBlock(),i.createElementBlock("span",C5,i.toDisplayString(O.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var Zi=(r=>(r.FINISH="finish",r.ING="ing",r.ALL="",r))(Zi||{});const Gs=(r,e)=>new Date(r).getTime()>new Date(e).getTime(),S5={class:"o-events-list"},E5={class:"filter-wrapper"},k5={class:"filter-left"},w5={class:"list-content"},D5={class:"event-name"},A5={class:"event-desc"},N5={class:"event-date"},I5={key:0,class:"event-location"},Kd=i.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(r,{emit:e}){const{t}=Xe.useI18n(),{lePadV:n}=At.useScreen(),s=r,a=[{label:t("events.statusAll"),value:Zi.ALL},{label:t("events.statusIng"),value:Zi.ING},{label:t("events.statusFinish"),value:Zi.FINISH}],o=e,l=i.ref(Zi.ALL),c=i.ref(""),d=i.ref(""),g=(T={})=>{o("search",Object.assign({page:s.page,pageSize:s.pageSize,status:l.value,keyword:d.value},T))},m=()=>{g()},S=()=>{d.value=c.value,g()},b=i.computed(()=>s.data.map(T=>{let y=T.startDate,E=T.endDate,O=ve(T.date).format("YYYY/MM/DD");if(y&&E){const D=ve().format("YYYY-01-01");Gs(D,y)&&(y=D);const I=ve().format("YYYY-12-31");Gs(E,I)&&(E=I),O=`${ve(y).format("YYYY/MM/DD")}-${ve(E).format("MM/DD")}`}return{...T,startDate:y,endDate:E,dateStr:O,status:Gs(new Date,T.date||T.endDate)?Zi.FINISH:Zi.ING}}).sort((T,y)=>Gs(T.date||T.endDate,y.date||y.endDate)?-1:1).map(T=>{var O,D,I;const y=(I=(D=(O=T.city)==null?void 0:O.replace("市",""))==null?void 0:D.replace("中国",""))==null?void 0:I.replaceAll(" ","");let E=null;return Array.isArray(Hs[y])?E=Hs[y][T.name.length%Hs[y].length]:E=Hs[y],E||(E=r5),{...T,cover:E}}));return(T,y)=>(i.openBlock(),i.createElementBlock("div",S5,[i.createElementVNode("div",E5,[i.createElementVNode("div",k5,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("events.status")),1),i.createVNode(i.unref(A.ORadioGroup),{modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=E=>l.value=E),style:{"--radio-group-gap":"8px"},onChange:m},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(a,E=>i.createVNode(i.unref(A.ORadio),{key:E.value,value:E.value},{radio:i.withCtx(({checked:O})=>[i.createVNode(i.unref(A.OToggle),{checked:O},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),i.createVNode(i.unref(A.OInput),{modelValue:c.value,"onUpdate:modelValue":y[1]||(y[1]=E=>c.value=E),placeholder:i.unref(t)("events.searchPlaceholder"),onPressEnter:S,onClear:S,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",w5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(b.value,E=>(i.openBlock(),i.createBlock(i.unref(A.OCard),{key:E.name,cover:E.cover,href:E.link},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTag),{class:"event-status"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.status===i.unref(Zi).ING?i.unref(t)("events.statusIng"):i.unref(t)("events.statusFinish")),1)]),_:2},1024),i.createElementVNode("div",D5,i.toDisplayString(E.name),1),i.createElementVNode("div",A5,[i.createElementVNode("div",N5,i.toDisplayString(E.dateStr),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),E.city?(i.openBlock(),i.createElementBlock("div",I5,i.toDisplayString(E.city),1)):i.createCommentVNode("",!0)])]),_:2},1032,["cover","href"]))),128))]),b.value.length?i.createCommentVNode("",!0):i.renderSlot(T.$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:g,pageSizes:[4,12,24,36,48]},null,8,["page","simple","pageSize","total"])):i.createCommentVNode("",!0)]))}}),O5={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function B5(r,e){return i.openBlock(),i.createElementBlock("svg",O5,[...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 L5={name:"events-icon-checked",render:B5},M5={class:"o-events-apply"},P5={class:"events-apply-grid"},R5={class:"timeline-number"},V5={class:"number-circle"},F5={class:"step-title"},$5={class:"step-idx"},U5={class:"step-desc"},q5={key:0},z5={class:"desc-list-wrapper"},j5={key:0,class:"desc-list-title"},H5={class:"desc-list-content"},G5={class:"desc-list-item-title"},W5={class:"desc-list-item-desc"},Qd=i.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(r){const{isDark:e}=At.useTheme(),t=xa();return(n,s)=>(i.openBlock(),i.createElementBlock("div",M5,[i.createElementVNode("div",P5,[(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",R5,[i.createElementVNode("div",V5,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",F5,[i.createElementVNode("div",$5,i.toDisplayString(o+1),1),i.createElementVNode("span",null,i.toDisplayString(a.title),1)]),i.createElementVNode("div",U5,[a.desc?i.withDirectives((i.openBlock(),i.createElementBlock("div",q5,null,512)),[[i.unref(t),a.desc]]):i.createCommentVNode("",!0),i.renderSlot(n.$slots,`step${o+1}`),i.createElementVNode("div",z5,[a.listTitle?(i.openBlock(),i.createElementBlock("div",j5,i.toDisplayString(a.listTitle),1)):i.createCommentVNode("",!0),i.createElementVNode("div",H5,[(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",G5,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(L5))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(l.title),1)]),i.createElementVNode("div",W5,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))])]))}}),Y5=Object.assign(Xd,{install(r){r.component("OEventsCalendar",Xd)}}),X5=Object.assign(Kd,{install(r){r.component("OEventsList",Kd)}}),K5=Object.assign(Qd,{install(r){r.component("OEventsApply",Qd)}}),Q5={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Z5(r,e){return i.openBlock(),i.createElementBlock("svg",Q5,[...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 J5={name:"components-icon-caret-left",render:Z5},eS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function tS(r,e){return i.openBlock(),i.createElementBlock("svg",eS,[...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 iS={name:"components-icon-caret-right",render:tS},nS={class:"header-nav-wrap"},rS={key:0,class:"right-icon"},sS=["onMouseenter","onMouseleave"],aS=["id"],oS={class:"nav-text"},lS=["id","onClick"],uS={class:"nav-text"},cS={key:1,class:"right-icon"},dS=i.defineComponent({__name:"HeaderNav",props:{navData:{},activeIndex:{},hoverId:{}},emits:["handle-mouseenter","handle-mouseleave","handle-click"],setup(r,{emit:e}){const t=e,{isDark:n}=At.useTheme(),s=r,a=i.ref(),o=i.ref(),l=i.ref(null),c=i.ref(!1),d=i.ref(!1),g=i.ref(),m=zi.useDebounceFn(($,z)=>{g.value=$==null?void 0:$.id,z==="mouseenter"&&t("handle-mouseenter",$),z==="mouseleave"&&(g.value="",t("handle-mouseleave",$))},100),S=$=>{t("handle-click",$)},b=()=>{d.value=!0,i.nextTick(()=>{a.value.scrollTo({left:a.value.clientWidth,behavior:"smooth"})})},T=()=>{a.value.scrollTo({left:0,behavior:"smooth"}),d.value=!1},y=()=>{var $,z;(($=a.value)==null?void 0:$.clientWidth)<((z=o.value)==null?void 0:z.clientWidth)?c.value=!0:c.value=!1};let E=0,O=0;const D=()=>O=0,I=$=>O>0?void O++:(O++,E=Date.now(),{event:"hover",properties:{module:"navigation",level1:$,target:$}}),H=$=>({properties:{module:"navigation",level1:$.label,target:$.label,steps:O,url:$.href,duration:Date.now()-E}});return i.onMounted(()=>{window.addEventListener("resize",y),i.nextTick(()=>{y(),l.value=setTimeout(()=>{y()},1e3)})}),i.onUnmounted(()=>{window.removeEventListener("resize",y),clearTimeout(l.value)}),($,z)=>{const N=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",nS,[i.createElementVNode("div",{class:i.normalizeClass(["header-nav",{"header-nav-scroll":d.value}])},[d.value?(i.openBlock(),i.createElementBlock("div",rS,[i.createVNode(i.unref(A.OIcon),{onClick:T},{default:i.withCtx(()=>[i.createVNode(i.unref(J5))]),_:1})])):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"navRef",ref:a,class:i.normalizeClass(["o-nav",{"o-nav-scroll":d.value||!c.value,dark:i.unref(n)}])},[i.createElementVNode("ul",{ref_key:"navListRef",ref:o,class:"o-nav-list",onMouseenter:D},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.navData,(j,x)=>{var w;return i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:j.id,class:i.normalizeClass({"is-selected":g.value===j.id||s.hoverId===j.id,"is-active":s.activeIndex===x}),onMouseenter:P=>i.unref(m)(j,"mouseenter"),onMouseleave:P=>i.unref(m)(j,"mouseleave")},[(w=j==null?void 0:j.children)!=null&&w.length?(i.openBlock(),i.createElementBlock("div",{key:0,id:"tour_headerNav_"+j.id,class:"nav-item"},[i.createElementVNode("span",oS,i.toDisplayString(j.label),1)],8,aS)):(i.openBlock(),i.createElementBlock("div",{key:1,id:"tour_headerNav_"+j.id,class:"nav-item item-other",onClick:P=>S(j)},[i.createElementVNode("span",uS,i.toDisplayString(j.label),1),j.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(j.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,lS))],42,sS)),[[N,I(j.label),"mouseenter"],[N,H(j),void 0,{catchBubble:!0}]])}),128))],544)],2),c.value&&!d.value?(i.openBlock(),i.createElementBlock("div",cS,[i.createVNode(i.unref(A.OIcon),{onClick:b},{default:i.withCtx(()=>[i.createVNode(i.unref(iS))]),_:1})])):i.createCommentVNode("",!0)],2)])}}}),hS=Xe._export_sfc(dS,[["__scopeId","data-v-fe042238"]]),fS={class:"nav-sub-content"},pS={class:"content-left"},mS={class:"content-label"},gS={class:"content-container"},vS=["href","target"],yS={class:"item-name"},_S={key:0,class:"desc-container"},TS=["title"],bS={key:0,class:"split-line"},xS={key:1,class:"content-right"},CS={class:"content-label"},SS=["href","target"],ES=["href","target"],kS=["src"],wS={class:"review-content"},DS={class:"review-label"},AS={class:"review-property"},NS=i.defineComponent({__name:"HeaderContent",props:{itemData:{},itemVisible:{type:Boolean},community:{},bgLeft:{},bgRight:{},hoverIndex:{}},emits:["handle-mouseenter-sub","handle-mouseleave-sub"],setup(r,{emit:e}){const t=e,n=r,{locale:s}=At.useLocale(),{theme:a}=At.useTheme(),o=i.ref(!1),l=()=>{var b;t("handle-mouseenter-sub",(b=n.itemData)==null?void 0:b.id),o.value=!0},c=()=>{t("handle-mouseenter-sub",""),o.value=!1},d=i.ref(!1),g=b=>{if(!b||!b.target)return;const T=b.target;d.value=T.clientHeight<T.scrollHeight},m=(b,T)=>({properties:{module:"navigation",level1:b.label,level2:T.label,target:T.label,url:b.href}}),S=b=>({properties:{module:"navigation",level1:s.value==="zh"?"快捷链接":"Quick Link",level2:b.label,target:b.label,url:b.href}});return(b,T)=>{var E,O,D;const y=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",{onMouseenter:l,onMouseleave:c},[(n.itemVisible||o.value)&&((O=(E=n.itemData)==null?void 0:E.children)!=null&&O.length)?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["nav-content",[(D=n.community)==null?void 0:D.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(gn,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,H,$,z,N,j,x,w;return[i.createElementVNode("div",fS,[i.createElementVNode("div",pS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((I=n.itemData)==null?void 0:I.children,(P,K)=>(i.openBlock(),i.createElementBlock("div",{class:"item-sub",key:K},[i.createElementVNode("span",mS,i.toDisplayString(P.label),1),i.createElementVNode("div",gS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(P.children,L=>(i.openBlock(),i.createElementBlock("div",{key:L.label,class:"content-item"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:L.href,target:(L==null?void 0:L.target)||"_self",rel:"noopener noreferrer",class:"item-label"},[i.createElementVNode("span",yS,i.toDisplayString(L.label),1),L.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(L.icon)))]),_:2},1024)):i.createCommentVNode("",!0),L.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(L.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,vS)),[[y,()=>m(P,L)]]),L.description?(i.openBlock(),i.createElementBlock("div",_S,[i.createElementVNode("p",{class:"item-desc",title:d.value?L.description:void 0,onMouseenter:T[0]||(T[0]=U=>g(U))},i.toDisplayString(L.description),41,TS)])):i.createCommentVNode("",!0)]))),128))])]))),128))]),($=(H=n.itemData)==null?void 0:H.shortcut)!=null&&$.length?(i.openBlock(),i.createElementBlock("div",bS)):i.createCommentVNode("",!0),(N=(z=n.itemData)==null?void 0:z.shortcut)!=null&&N.length?(i.openBlock(),i.createElementBlock("div",xS,[i.createElementVNode("span",CS,i.toDisplayString(i.unref(s)==="zh"?"快捷链接":"Quick Link"),1),(j=n.itemData)!=null&&j.withPicture?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList((w=n.itemData)==null?void 0:w.shortcut,P=>i.withDirectives((i.openBlock(),i.createElementBlock("a",{key:P.label,href:P.href,target:(P==null?void 0:P.target)||"_self",rel:"noopener noreferrer",class:"review"},[i.createElementVNode("img",{src:P.picture,class:"review-picture"},null,8,kS),i.createElementVNode("div",wS,[i.createElementVNode("p",DS,i.toDisplayString(P.label),1),i.createElementVNode("div",AS,i.toDisplayString(P.remark),1)])],8,ES)),[[y,()=>S(P)]])),128)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList((x=n.itemData)==null?void 0:x.shortcut,P=>(i.openBlock(),i.createElementBlock("div",{key:P.label,class:"shortcut"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:P.href,target:(P==null?void 0:P.target)||"_self",rel:"noopener noreferrer",class:"shortcut-link"},[i.createElementVNode("span",null,i.toDisplayString(P.label),1),P.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(P.icon)))]),_:2},1024)):i.createCommentVNode("",!0)],8,SS)),[[y,()=>S(P)]])]))),128))])):i.createCommentVNode("",!0)])]}),_:1})]),_:1})],2)):i.createCommentVNode("",!0)],32)}}}),IS=Xe._export_sfc(NS,[["__scopeId","data-v-a2219e83"]]),OS={class:"header"},BS=["src"],LS={class:"header-nav"},MS={key:0,class:"header-toolbar"},PS={class:"header-nav-content"},RS=i.defineComponent({__name:"OHeader",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-home","handle-click"],setup(r,{emit:e}){const{isDark:t}=At.useTheme(),n=e,s=r,a=i.ref(),o=i.ref(),l=i.ref(),c=i.ref(!1),d=()=>{n("go-home")},g=y=>{var E;l.value=y,a.value=y.id,(E=y==null?void 0:y.children)!=null&&E.length&&(c.value=!0)},m=y=>{c.value=!1},S=y=>{n("handle-click",y)},b=y=>{o.value=y},T=y=>{o.value=y};return(y,E)=>(i.openBlock(),i.createElementBlock("div",OS,[i.createElementVNode("div",{class:i.normalizeClass(["header-wrap",{"header-wrap-dark":i.unref(t)}])},[i.createVNode(gn,{class:"header-content"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"header-logo",onClick:d},[i.renderSlot(y.$slots,"logo",{},()=>[s.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:s.logo},null,8,BS)):i.createCommentVNode("",!0)],!0)]),i.createElementVNode("div",LS,[i.renderSlot(y.$slots,"nav",{},()=>[s.navData?(i.openBlock(),i.createBlock(hS,{key:0,"nav-data":s.navData,hoverId:o.value,"active-index":s.activeIndex,onHandleMouseenter:g,onHandleMouseleave:m,onHandleClick:S},null,8,["nav-data","hoverId","active-index"])):i.createCommentVNode("",!0)],!0)]),y.$slots.toolbar?(i.openBlock(),i.createElementBlock("div",MS,[i.renderSlot(y.$slots,"toolbar",{},void 0,!0)])):i.createCommentVNode("",!0)]),_:3})],2),i.createElementVNode("div",PS,[i.createVNode(IS,{itemData:l.value,"item-visible":c.value,"bg-left":s.bgLeft,"bg-right":s.bgRight,community:s.community,"hover-index":a.value,onHandleMouseenterSub:b,onHandleMouseleaveSub:T},null,8,["itemData","item-visible","bg-left","bg-right","community","hover-index"])])]))}}),Zd=Xe._export_sfc(RS,[["__scopeId","data-v-486d601a"]]);var dn=(r=>(r.NAV="nav",r.CODE="code",r.LANG="lang",r))(dn||{});const VS={class:"o-nav"},FS={class:"o-nav-list"},$S=["onClick"],US={class:"nav-aside"},qS={key:0,class:"nav-aside-wrapper"},zS=["value"],jS={class:"content-label"},HS={class:"container-mobile"},GS=["onClick"],WS={class:"item-label"},YS={class:"desc-container"},XS={class:"item-desc"},KS=["onClick"],QS={class:"item-label"},ZS={key:1,class:"nav-aside-wrapper"},JS=["onClick"],eE={class:"header-tool"},tE={key:2,class:"other-tool"},iE=i.defineComponent({__name:"HeaderNavMobile",props:{menuShow:{type:Boolean,default:!1},navData:{default:()=>[]},codeData:{default:()=>[]},langData:{default:()=>[]}},emits:["on-click","lang-click","handle-click"],setup(r,{emit:e}){const t=e,n=r,s=i.ref(""),a=i.ref({}),o=(d,g)=>{var m;g===dn.NAV?(m=d==null?void 0:d.children)!=null&&m.length?(s.value=d.id,a.value=d):t("handle-click",d):g===dn.CODE?(s.value=g,a.value=n.codeData.list):g===dn.LANG&&(s.value=g,a.value=n.langData.list)},l=(d,g)=>{window.open(d,g||"_self"),t("on-click")},c=d=>{s.value===dn.CODE?l(d.href,d==null?void 0:d.target):s.value===dn.LANG&&t("lang-click",d)};return i.onMounted(()=>{s.value=n.navData[0].id,a.value=n.navData[0]}),i.watch(()=>n.navData||n.codeData||n.langData,()=>{s.value===dn.CODE?a.value=n.codeData.list:s.value===dn.LANG?a.value=n.langData.list:a.value=n.navData.find(d=>d.id===s.value)},{deep:!0}),(d,g)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["header-nav",{active:r.menuShow}])},[i.createElementVNode("div",VS,[i.createElementVNode("ul",FS,[(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:s.value===m.id})},[i.createElementVNode("span",{onClick:S=>o(m,"nav")},i.toDisplayString(m.label),9,$S)],2))),128))]),i.createElementVNode("div",US,[s.value!=="code"&&s.value!=="lang"?(i.openBlock(),i.createElementBlock("ul",qS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value.children,m=>(i.openBlock(),i.createElementBlock("li",{value:m.label,key:m.label,class:"nav-aside-content"},[m!=null&&m.children?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("p",jS,i.toDisplayString(m.label),1),i.createElementVNode("div",HS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m==null?void 0:m.children,S=>(i.openBlock(),i.createElementBlock("div",{key:S.label,class:"content-container-mobile"},[i.createElementVNode("a",{onClick:b=>l(S.href,S==null?void 0:S.target),rel:"noopener noreferrer",class:"content-subtitle"},[i.createElementVNode("span",WS,i.toDisplayString(S.label),1),S.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(S.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0),S.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(S.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,GS),i.createElementVNode("div",YS,[i.createElementVNode("p",XS,i.toDisplayString(S.description),1)])]))),128))])],64)):(i.openBlock(),i.createElementBlock("a",{key:1,onClick:S=>l(m.href,m==null?void 0:m.target),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[i.createElementVNode("span",QS,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,KS))],8,zS))),128))])):(i.openBlock(),i.createElementBlock("div",ZS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,m=>(i.openBlock(),i.createElementBlock("a",{key:m.label,onClick:S=>c(m),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,JS))),128))]))])]),i.createElementVNode("div",eE,[r.codeData?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["header-tool-item",{active:s.value==="code"}]),onClick:g[0]||(g[0]=m=>o(null,"code"))},i.toDisplayString(r.codeData.label),3)):i.createCommentVNode("",!0),r.langData?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["header-tool-item",{active:s.value==="lang"}]),onClick:g[1]||(g[1]=m=>o(null,"lang"))},i.toDisplayString(r.langData.label),3)):i.createCommentVNode("",!0),d.$slots.tool?(i.openBlock(),i.createElementBlock("div",tE,[i.renderSlot(d.$slots,"tool",{},void 0,!0)])):i.createCommentVNode("",!0)])],2))}}),nE=Xe._export_sfc(iE,[["__scopeId","data-v-7aa3e2e5"]]),rE={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function sE(r,e){return i.openBlock(),i.createElementBlock("svg",rE,[...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 aE={name:"components-icon-header-menu",render:sE},oE={class:"header"},lE={class:"header-box"},uE={key:0,class:"header-simple"},cE={class:"simple-header-left"},dE={key:0,class:"header-title"},hE={key:0,class:"simple-header-right"},fE={class:"header-left"},pE={class:"header-center"},mE=["src"],gE={class:"header-right"},vE=i.defineComponent({__name:"OHeaderMobile",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-back","lang-click","go-home"],setup(r,{emit:e}){const t=e,n=r,s=()=>{t("go-back")},a=()=>{t("go-home")},o=i.ref(!1),l=()=>{setTimeout(()=>{o.value=!o.value},200)},c=()=>{l()},d=()=>{l()},g=m=>{t("lang-click",m),l()};return(m,S)=>(i.openBlock(),i.createElementBlock("div",oE,[i.createElementVNode("div",lE,[i.createVNode(gn,{class:"header-wrap"},{default:i.withCtx(()=>[r.isSimpleHeader?(i.openBlock(),i.createElementBlock("div",uE,[i.createElementVNode("div",cE,[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",dE,i.toDisplayString(r.headerTitle),1)):i.createCommentVNode("",!0)]),m.$slots.rightConfig?(i.openBlock(),i.createElementBlock("div",hE,[i.renderSlot(m.$slots,"rightConfig",{},void 0,!0)])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",fE,[i.createVNode(i.unref(A.OIcon),{onClick:l},{default:i.withCtx(()=>[o.value?(i.openBlock(),i.createBlock(i.unref(Sl),{key:1})):(i.openBlock(),i.createBlock(i.unref(aE),{key:0}))]),_:1})]),i.createElementVNode("div",pE,[i.createElementVNode("div",{class:"header-logo",onClick:a},[i.renderSlot(m.$slots,"logo",{},()=>[n.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:n.logo},null,8,mE)):i.createCommentVNode("",!0)],!0)])]),i.createElementVNode("div",gE,[i.renderSlot(m.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]),i.createElementVNode("div",{class:i.normalizeClass(["header-content-mb",{"header-content-active":o.value}])},[i.createVNode(nE,{ref:"mobileNav","nav-data":r.navData,"code-data":r.codeData,"lang-data":r.langData,"menu-show":o.value,onHandleClick:d,onOnClick:c,onLangClick:g},{tool:i.withCtx(()=>[i.renderSlot(m.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","lang-data","menu-show"])],2)]))}}),Jd=Xe._export_sfc(vE,[["__scopeId","data-v-1d6060f9"]]),yE=Object.assign(Zd,{install(r){r.component("OHeader",Zd)}}),_E=Object.assign(Jd,{install(r){r.component("OHeaderMobile",Jd)}}),TE={OBanner:eh,OCookieNotice:th,OFooter:ih,OHeaderSearch:nh,OHeaderUser:rh,OPlusConfigProvider:sh,OSection:ah,OSourceCode:oh,OThemeSwitcher:lh},bE={install:r=>{Object.entries(TE).forEach(([e,t])=>{r.component(e,t)})}};exports.OElCookieNotice=Xe.OElCookieNotice;exports.CalendarDataType=Be;exports.EventsStatusT=Zi;exports.MeetingGroupType=vi;exports.OActivityApproval=zC;exports.OActivityForm=qC;exports.OActivityMyCalendar=ip;exports.OBanner=eh;exports.OCookieNotice=th;exports.OEventsApply=K5;exports.OEventsCalendar=Y5;exports.OEventsList=X5;exports.OFooter=ih;exports.OHeader=yE;exports.OHeaderMobile=_E;exports.OHeaderSearch=nh;exports.OHeaderUser=rh;exports.OMeetingCalendar=eC;exports.OMeetingForm=tC;exports.OMeetingMyCalendar=rC;exports.OMeetingPlayback=iC;exports.OMeetingSigCalendar=nC;exports.OPlusConfigProvider=sh;exports.OSection=ah;exports.OSourceCode=oh;exports.OThemeSwitcher=lh;exports.default=bE;
|
|
221
|
+
`,o=n,l=t;this.start_=o,e.forEach((c,d)=>{const g=this.storage_.get(l),m=o,S=m+c.duration,T=!!(g&&g.segmentSyncInfo&&g.segmentSyncInfo.isAppended),b=new $d({start:m,end:S,appended:T,segmentIndex:d});c.syncInfo=b;let y=o;const E=(c.parts||[]).map((I,O)=>{const k=y,z=y+I.duration,$=!!(g&&g.partsSyncInfo&&g.partsSyncInfo[O]&&g.partsSyncInfo[O].isAppended),j=new $d({start:k,end:z,appended:$,segmentIndex:d,partIndex:O});return y=z,a+=`Media Sequence: ${l}.${O} | Range: ${k} --> ${z} | Appended: ${$}
|
|
222
|
+
`,I.syncInfo=j,j});s.set(l,new h8(b,E)),a+=`${Ff(c.resolvedUri)} | Media Sequence: ${l} | Range: ${m} --> ${S} | Appended: ${T}
|
|
223
|
+
`,l++,o=S}),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 Ud extends zf{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 f8=86400,Go=[{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=hl(e);s=s||0;for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),g=l[d],m=g.segment,S=r.timelineToDatetimeMappings[m.timeline];if(!S||!m.dateTimeObject)continue;let b=m.dateTimeObject.getTime()/1e3+S;if(m.parts&&typeof g.partIndex=="number")for(let E=0;E<g.partIndex;E++)b+=m.parts[E].duration;const y=Math.abs(s-b);if(o!==null&&(y===0||o<y))break;o=y,a={time:b,segmentIndex:g.segmentIndex,partIndex:g.partIndex}}return a}},{name:"Segment",run:(r,e,t,n,s)=>{let a=null,o=null;s=s||0;const l=hl(e);for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),g=l[d],m=g.segment,S=g.part&&g.part.start||m&&m.start;if(m.timeline===n&&typeof S<"u"){const T=Math.abs(s-S);if(o!==null&&o<T)break;(!a||o===null||o>=T)&&(o=T,a={time:S,segmentIndex:g.segmentIndex,partIndex:g.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],d=e.discontinuitySequence+l+1,g=r.discontinuities[d];if(g){const m=Math.abs(s-g.time);if(o!==null&&o<m)break;(!a||o===null||o>=m)&&(o=m,a={time:g.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 p8 extends ae.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new zf,n=new Ud(t),s=new Ud(t);this.mediaSequenceStorage_={main:t,audio:n,vtt:s},this.logger_=Ci("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,n,s,a){if(t!==1/0)return Go.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:d}=l,{segmentIndex:g,time:m}=c;if(g<0)continue;const S=e.segments[g],T=m,b=T+S.duration;if(this.logger_(`Strategy: ${d}. Current time: ${s}. selected segment: ${g}. Time: [${T} -> ${b}]}`),s>=T&&s<b)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+Jr({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,t,n,s,a){const o=[];for(let l=0;l<Go.length;l++){const c=Go[l],d=c.run(this,e,t,n,s,a);d&&(d.strategy=c.name,o.push({strategy:c.name,syncPoint:d}))}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>f8){ae.log.warn(`Not saving expired segment info. Media sequence gap ${n} is too large.`);return}for(let s=n-1;s>=0;s--){const a=e.segments[s];if(a&&typeof a.start<"u"){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 d;l<0?d=n.start-Jr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:a}):d=n.end+Jr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[o]={time:d,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class m8 extends ae.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 g8=Df(Af(function(){var r=(function(){function y(){this.listeners={}}var E=y.prototype;return E.on=function(O,k){this.listeners[O]||(this.listeners[O]=[]),this.listeners[O].push(k)},E.off=function(O,k){if(!this.listeners[O])return!1;var z=this.listeners[O].indexOf(k);return this.listeners[O]=this.listeners[O].slice(0),this.listeners[O].splice(z,1),z>-1},E.trigger=function(O){var k=this.listeners[O];if(k)if(arguments.length===2)for(var z=k.length,$=0;$<z;++$)k[$].call(this,arguments[1]);else for(var j=Array.prototype.slice.call(arguments,1),N=k.length,H=0;H<N;++H)k[H].apply(this,j)},E.dispose=function(){this.listeners={}},E.pipe=function(O){this.on("data",function(k){O.push(k)})},y})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(y){return y.subarray(0,y.byteLength-y[y.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const t=function(){const y=[[[],[],[],[],[]],[[],[],[],[],[]]],E=y[0],I=y[1],O=E[4],k=I[4];let z,$,j;const N=[],H=[];let x,w,P,K,B,U;for(z=0;z<256;z++)H[(N[z]=z<<1^(z>>7)*283)^z]=z;for($=j=0;!O[$];$^=x||1,j=H[j]||1)for(K=j^j<<1^j<<2^j<<3^j<<4,K=K>>8^K&255^99,O[$]=K,k[K]=$,P=N[w=N[x=N[$]]],U=P*16843009^w*65537^x*257^$*16843008,B=N[K]*257^K*16843008,z=0;z<4;z++)E[z][$]=B=B<<24^B>>>8,I[z][K]=U=U<<24^U>>>8;for(z=0;z<5;z++)E[z]=E[z].slice(0),I[z]=I[z].slice(0);return y};let n=null;class s{constructor(E){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 I,O,k;const z=this._tables[0][4],$=this._tables[1],j=E.length;let N=1;if(j!==4&&j!==6&&j!==8)throw new Error("Invalid aes key size");const H=E.slice(0),x=[];for(this._key=[H,x],I=j;I<4*j+28;I++)k=H[I-1],(I%j===0||j===8&&I%j===4)&&(k=z[k>>>24]<<24^z[k>>16&255]<<16^z[k>>8&255]<<8^z[k&255],I%j===0&&(k=k<<8^k>>>24^N<<24,N=N<<1^(N>>7)*283)),H[I]=H[I-j]^k;for(O=0;I;O++,I--)k=H[O&3?I:I-4],I<=4||O<4?x[O]=k:x[O]=$[0][z[k>>>24]]^$[1][z[k>>16&255]]^$[2][z[k>>8&255]]^$[3][z[k&255]]}decrypt(E,I,O,k,z,$){const j=this._key[1];let N=E^j[0],H=k^j[1],x=O^j[2],w=I^j[3],P,K,B;const U=j.length/4-2;let R,X=4;const F=this._tables[1],M=F[0],Q=F[1],Z=F[2],oe=F[3],ce=F[4];for(R=0;R<U;R++)P=M[N>>>24]^Q[H>>16&255]^Z[x>>8&255]^oe[w&255]^j[X],K=M[H>>>24]^Q[x>>16&255]^Z[w>>8&255]^oe[N&255]^j[X+1],B=M[x>>>24]^Q[w>>16&255]^Z[N>>8&255]^oe[H&255]^j[X+2],w=M[w>>>24]^Q[N>>16&255]^Z[H>>8&255]^oe[x&255]^j[X+3],X+=4,N=P,H=K,x=B;for(R=0;R<4;R++)z[(3&-R)+$]=ce[N>>>24]<<24^ce[H>>16&255]<<16^ce[x>>8&255]<<8^ce[w&255]^j[X++],P=N,N=H,H=x,x=w,w=P}}class a extends r{constructor(){super(r),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(E){this.jobs.push(E),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(y){return y<<24|(y&65280)<<8|(y&16711680)>>8|y>>>24},l=function(y,E,I){const O=new Int32Array(y.buffer,y.byteOffset,y.byteLength>>2),k=new s(Array.prototype.slice.call(E)),z=new Uint8Array(y.byteLength),$=new Int32Array(z.buffer);let j,N,H,x,w,P,K,B,U;for(j=I[0],N=I[1],H=I[2],x=I[3],U=0;U<O.length;U+=4)w=o(O[U]),P=o(O[U+1]),K=o(O[U+2]),B=o(O[U+3]),k.decrypt(w,P,K,B,$,U),$[U]=o($[U]^j),$[U+1]=o($[U+1]^N),$[U+2]=o($[U+2]^H),$[U+3]=o($[U+3]^x),j=w,N=P,H=K,x=B;return z};class c{constructor(E,I,O,k){const z=c.STEP,$=new Int32Array(E.buffer),j=new Uint8Array(E.byteLength);let N=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_($.subarray(N,N+z),I,O,j)),N=z;N<$.length;N+=z)O=new Uint32Array([o($[N-4]),o($[N-3]),o($[N-2]),o($[N-1])]),this.asyncStream_.push(this.decryptChunk_($.subarray(N,N+z),I,O,j));this.asyncStream_.push(function(){k(null,e(j))})}static get STEP(){return 32e3}decryptChunk_(E,I,O,k){return function(){const z=l(E,I,O);k.set(z,E.byteOffset)}}}var d=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},g;typeof window<"u"?g=window:typeof d<"u"?g=d:typeof self<"u"?g=self:g={};var m=g,S=function(E){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(E):E&&E.buffer instanceof ArrayBuffer},T=m.BigInt||Number;T("0x1"),T("0x100"),T("0x10000"),T("0x1000000"),T("0x100000000"),T("0x10000000000"),T("0x1000000000000"),T("0x100000000000000"),T("0x10000000000000000"),(function(){var y=new Uint16Array([65484]),E=new Uint8Array(y.buffer,y.byteOffset,y.byteLength);return E[0]===255?"big":E[0]===204?"little":"unknown"})();const b=function(y){const E={};return Object.keys(y).forEach(I=>{const O=y[I];S(O)?E[I]={bytes:O.buffer,byteOffset:O.byteOffset,byteLength:O.byteLength}:E[I]=O}),E};self.onmessage=function(y){const E=y.data,I=new Uint8Array(E.encrypted.bytes,E.encrypted.byteOffset,E.encrypted.byteLength),O=new Uint32Array(E.key.bytes,E.key.byteOffset,E.key.byteLength/4),k=new Uint32Array(E.iv.bytes,E.iv.byteOffset,E.iv.byteLength/4);new c(I,O,k,function(z,$){self.postMessage(b({source:E.source,decrypted:$}),[$.buffer])})}}));var v8=wf(g8);const y8=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},jf=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},Cl=(r,e)=>{e.activePlaylistLoader=r,r.load()},_8=(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,jf(t,s),!(!o||o.isMainPlaylist))){if(!o.playlistLoader){l&&n.resetEverything();return}t.resyncLoader(),Cl(o.playlistLoader,s)}},T8=(r,e)=>()=>{const{segmentLoaders:{[r]:t},mediaTypes:{[r]:n}}=e;n.lastGroup_=null,t.abort(),t.pause()},b8=(r,e)=>()=>{const{mainPlaylistLoader:t,segmentLoaders:{[r]:n,main:s},mediaTypes:{[r]:a}}=e,o=a.activeTrack(),l=a.getActiveGroup(),c=a.activePlaylistLoader,d=a.lastTrack_;if(!(d&&o&&d.id===o.id)&&(a.lastGroup_=l,a.lastTrack_=o,jf(n,a),!!l)){if(l.isMainPlaylist){if(!o||!d||o.id===d.id)return;const g=e.vhs.playlistController_,m=g.selectPlaylist();if(g.media()===m)return;a.logger_(`track change. Switching main audio from ${d.id} to ${o.id}`),t.pause(),s.resetEverything(),g.fastQualityChange_(m);return}if(r==="AUDIO"){if(!l.playlistLoader){s.setAudio(!0),s.resetEverything();return}n.setAudio(!0),s.setAudio(!1)}if(c===l.playlistLoader){Cl(l.playlistLoader,a);return}n.track&&n.track(o),n.resetEverything(),Cl(l.playlistLoader,a)}},_a={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}ae.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;ae.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=t.activeTrack();n&&(n.mode="disabled"),t.onTrackChanged()}},qd={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",_a[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",_a[r](r,t))}},x8={AUDIO:(r,e)=>{const{vhs:t,sourceType:n,segmentLoaders:{[r]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[r]:{groups:l,tracks:c,logger_:d}},mainPlaylistLoader:g}=e,m=hs(g.main);(!o[r]||Object.keys(o[r]).length===0)&&(o[r]={main:{default:{default:!0}}},m&&(o[r].main.default.playlists=g.main.playlists));for(const S in o[r]){l[S]||(l[S]=[]);for(const T in o[r][S]){let b=o[r][S][T],y;if(m?(d(`AUDIO group '${S}' label '${T}' is a main playlist`),b.isMainPlaylist=!0,y=null):n==="vhs-json"&&b.playlists?y=new Yn(b.playlists[0],t,a):b.resolvedUri?y=new Yn(b.resolvedUri,t,a):b.playlists&&n==="dash"?y=new yl(b.playlists[0],t,a,g):y=null,b=nt({id:T,playlistLoader:y},b),qd[r](r,b.playlistLoader,e),l[S].push(b),typeof c[T]>"u"){const E=new ae.AudioTrack({id:T,kind:y8(b),enabled:!1,language:b.language,default:b.default,label:T});c[T]=E}}}s.on("error",_a[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:d}},mainPlaylistLoader:g}=e;for(const m in l[r]){c[m]||(c[m]=[]);for(const S in l[r][m]){if(!n.options_.useForcedSubtitles&&l[r][m][S].forced)continue;let T=l[r][m][S],b;if(s==="hls")b=new Yn(T.resolvedUri,n,o);else if(s==="dash"){if(!T.playlists.filter(E=>E.excludeUntil!==1/0).length)return;b=new yl(T.playlists[0],n,o,g)}else s==="vhs-json"&&(b=new Yn(T.playlists?T.playlists[0]:T.resolvedUri,n,o));if(T=nt({id:S,playlistLoader:b},T),qd[r](r,T.playlistLoader,e),c[m].push(T),typeof d[S]>"u"){const y=t.addRemoteTextTrack({id:S,kind:"subtitles",default:T.default&&T.autoselect,language:T.language,label:S},!1).track;d[S]=y}}}a.on("error",_a[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 d=t.options_.vhs&&t.options_.vhs.captionServices||{};let g={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(d[g.instreamId]&&(g=nt(g,d[g.instreamId])),g.default===void 0&&delete g.default,s[o].push(nt({id:l},c)),typeof a[l]>"u"){const m=t.addRemoteTextTrack({id:g.instreamId,kind:"captions",default:g.default,language:g.language,label:g.label},!1).track;a[l]=m}}}}},Hf=(r,e)=>{for(let t=0;t<r.length;t++)if(lu(e,r[t])||r[t].playlists&&Hf(r[t].playlists,e))return!0;return!1},C8=(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&&hs(e.main))for(let c=0;c<l.length;c++){const d=s[l[c]];if(Hf(d,a)){o=d;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},S8={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}},E8=(r,{mediaTypes:e})=>()=>{const t=e[r].activeTrack();return t?e[r].activeGroup(t):null},k8=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(d=>{x8[d](d,r)});const{mediaTypes:e,mainPlaylistLoader:t,tech:n,vhs:s,segmentLoaders:{["AUDIO"]:a,main:o}}=r;["AUDIO","SUBTITLES"].forEach(d=>{e[d].activeGroup=C8(d,r),e[d].activeTrack=S8[d](d,r),e[d].onGroupChanged=_8(d,r),e[d].onGroupChanging=T8(d,r),e[d].onTrackChanged=b8(d,r),e[d].getActiveGroup=E8(d,r)});const l=e.AUDIO.activeGroup();if(l){const d=(l.filter(m=>m.default)[0]||l[0]).id;e.AUDIO.tracks[d].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}t.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanged())}),t.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanging())});const c=()=>{e.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"})};n.audioTracks().addEventListener("change",c),n.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),s.on("dispose",()=>{n.audioTracks().removeEventListener("change",c),n.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),n.clearTracks("audio");for(const d in e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[d])},w8=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:en,activeTrack:en,getActiveGroup:en,onGroupChanged:en,onTrackChanged:en,lastTrack_:null,logger_:Ci(`MediaGroups[${e}]`)}}),r};class zd{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ai(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(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 D8 extends ae.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new zd,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_=Ci("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=ai(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 d=o.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${d} seconds.`),this.startTTLTimeout_(parseInt(d,10));return}this.logger_(`manifest failed to load ${a}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:s});let l;try{l=JSON.parse(this.request_.responseText)}catch(d){const g={errorType:ae.Error.StreamingContentSteeringParserError,error:d};this.trigger({type:"error",metadata:g})}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 G.URL(e),n=new G.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(n.toString())}decodeDataUriManifest_(e){const t=JSON.parse(G.atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new G.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_=G.setTimeout(()=>{this.requestSteeringManifest()},t)}clearTTLTimeout_(){G.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 zd}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&&(ai(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const A8=(r,e)=>{let t=null;return(...n)=>{clearTimeout(t),t=setTimeout(()=>{r.apply(null,n)},e)}},N8=10;let Qi;const I8=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],O8=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},B8=function({currentPlaylist:r,buffered:e,currentTime:t,nextPlaylist:n,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:o,bufferBasedABR:l,log:c}){if(!n)return ae.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${r&&r.id||"null"} -> ${n.id}`;if(!r)return c(`${d} as current playlist is not set`),!0;if(n.id===r.id)return!1;const g=!!Wn(e,t).length;if(!r.endList)return!g&&typeof r.partTargetDuration=="number"?(c(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${d} as current playlist is live`),!0);const m=su(e,t),S=l?Lt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Lt.MAX_BUFFER_LOW_WATER_LINE;if(o<S)return c(`${d} as duration < max low water line (${o} < ${S})`),!0;const T=n.attributes.BANDWIDTH,b=r.attributes.BANDWIDTH;if(T<b&&(!l||m<a)){let y=`${d} as next bandwidth < current bandwidth (${T} < ${b})`;return l&&(y+=` and forwardBuffer < bufferHighWaterLine (${m} < ${a})`),c(y),!0}if((!l||T>b)&&m>=s){let y=`${d} as forwardBuffer >= bufferLowWaterLine (${m} >= ${s})`;return l&&(y+=` and next bandwidth > current bandwidth (${T} > ${b})`),c(y),!0}return c(`not ${d} as no switching criteria met`),!1};class L8 extends ae.EventTarget{constructor(e){super(),this.fastQualityChange_=A8(this.fastQualityChange_.bind(this),100);const{src:t,withCredentials:n,tech:s,bandwidth:a,externVhs:o,useCueTags:l,playlistExclusionDuration:c,enableLowInitialPlaylist:d,sourceType:g,cacheEncryptionKeys:m,bufferBasedABR:S,leastPixelDiffSelector:T,captionServices:b,experimentalUseMMS:y}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:E}=e;(E===null||typeof E>"u")&&(E=1/0),Qi=o,this.bufferBasedABR=!!S,this.leastPixelDiffSelector=!!T,this.withCredentials=n,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=g,this.useCueTags_=l,this.playlistExclusionDuration=c,this.maxPlaylistRetries=E,this.enableLowInitialPlaylist=d,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:E,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=w8(),y&&G.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new G.ManagedMediaSource,this.usingManagedMediaSource_=!0,ae.log("Using ManagedMediaSource")):G.MediaSource&&(this.mediaSource=new G.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_=Pt(),this.hasPlayed_=!1,this.syncController_=new p8(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new v8,this.sourceUpdater_=new qf(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new m8,this.keyStatusMap_=new Map;const I={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:b,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:m,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new yl(t,this.vhs_,nt(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Yn(t,this.vhs_,nt(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new bl(nt(I,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new bl(nt(I,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new u8(nt(I,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((z,$)=>{function j(){s.off("vttjserror",N),z()}function N(){s.off("vttjsloaded",j),$()}s.one("vttjsloaded",j),s.one("vttjserror",N),s.addWebVttScript_()})}),e);const O=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new D8(this.vhs_.xhr,O),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),I8.forEach(z=>{this[z+"_"]=O8.bind(this,z)}),this.logger_=Ci("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 k=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(k,()=>{const z=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-z,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_=G.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(G.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 d=0;d<e.playlists.length;d++){const g=e.playlists[d];g.attributes&&g.attributes.AUDIO&&g.attributes.AUDIO===l&&o.push(g)}}return o.length?o:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const t=this.mainPlaylistLoader_.media(),n=t.targetDuration*1.5*1e3;fl(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()),k8({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;fl(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(bt({},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"}),Qi.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 B8({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:N8}))});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(bt({},s))}),this.audioSegmentLoader_.on(n,s=>{this.player_.trigger(bt({},s))}),this.subtitleSegmentLoader_.on(n,s=>{this.player_.trigger(bt({},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=Qi.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=Qi.Playlist.playlistEnd(e,n),a=this.tech_.currentTime(),o=this.tech_.buffered();if(!o.length)return s-a<=Ui;const l=o.end(o.length-1);return l-a<=Ui&&s-l<=Ui}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(ja),o=a.length===1&&a[0]===e;if(s.length===1&&n!==1/0)return ae.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(o);if(o){if(this.main().contentSteering){const b=this.pathwayAttribute_(e),y=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(b),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(b)},y);return}let T=!1;s.forEach(b=>{if(b===e)return;const y=b.excludeUntil;typeof y<"u"&&y!==1/0&&(T=!0,delete b.excludeUntil)}),T&&(ae.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let l;e.playlistErrors_>this.maxPlaylistRetries?l=1/0:l=Date.now()+n*1e3,e.excludeUntil=l,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 d=t.internal?this.logger_:ae.log.warn,g=t.message?" "+t.message:"";d(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${g} 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 m=c.targetDuration/2*1e3||5*1e3,S=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=m;return this.switchMedia_(c,"exclude",o||S)}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=Wn(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:Qi.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 d=Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n),g=Math.max(l,c-d);return Pt([[l,g]])}const a=this.syncController_.getExpiredTime(n,this.duration());if(a===null)return null;const o=Qi.Playlist.seekable(n,a,Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return o.length?o:null}computeFinalSeekable_(e,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:Pt([[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 [${ef(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=Qi.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=es(this.main(),t),s={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=n.video||e.main.videoCodec||x_),e.main.isMuxed&&(s.video+=`,${n.audio||e.main.audioCodec||Oc}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(s.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||Oc,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=(d,g)=>d?Xr(g,this.usingManagedMediaSource_):ko(g),l={};let c;if(["video","audio"].forEach(function(d){if(s.hasOwnProperty(d)&&!o(e[d].isFmp4,s[d])){const g=e[d].isFmp4?"browser":"muxer";l[g]=l[g]||[],l[g].push(s[d]),d==="audio"&&(c=g)}}),a&&c&&t.attributes.AUDIO){const d=t.attributes.AUDIO;this.main().playlists.forEach(g=>{(g.attributes&&g.attributes.AUDIO)===d&&g!==t&&(g.excludeUntil=1/0)}),this.logger_(`excluding audio group ${d} as ${c} does not support codec(s): "${s.audio}"`)}if(Object.keys(l).length){const d=Object.keys(l).reduce((g,m)=>(g&&(g+=", "),g+=`${m} does not support codec(s): "${l[m].join(",")}"`,g),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:d},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const d=[];if(["video","audio"].forEach(g=>{const m=(Ri(this.sourceUpdater_.codecs[g]||"")[0]||{}).type,S=(Ri(s[g]||"")[0]||{}).type;m&&S&&m.toLowerCase()!==S.toLowerCase()&&d.push(`"${this.sourceUpdater_.codecs[g]}" -> "${s[g]}"`)}),d.length){this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${d.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return s}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const 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=es(this.main,s),o=[];a.audio&&!ko(a.audio)&&!Xr(a.audio,this.usingManagedMediaSource_)&&o.push(`audio codec ${a.audio}`),a.video&&!ko(a.video)&&!Xr(a.video,this.usingManagedMediaSource_)&&o.push(`video codec ${a.video}`),a.text&&a.text==="stpp.ttml.im1t"&&o.push(`text codec ${a.text}`),o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${o.join(", ")}`))})}excludeIncompatibleVariants_(e){const t=[],n=this.main().playlists,s=as(Ri(e)),a=Ed(s),o=s.video&&Ri(s.video)[0]||null,l=s.audio&&Ri(s.audio)[0]||null;Object.keys(n).forEach(c=>{const d=n[c];if(t.indexOf(d.id)!==-1||d.excludeUntil===1/0)return;t.push(d.id);const g=[],m=es(this.mainPlaylistLoader_.main,d),S=Ed(m);if(!(!m.audio&&!m.video)){if(S!==a&&g.push(`codec count "${S}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const T=m.video&&Ri(m.video)[0]||null,b=m.audio&&Ri(m.audio)[0]||null;T&&o&&T.type.toLowerCase()!==o.type.toLowerCase()&&g.push(`video codec "${T.type}" !== "${o.type}"`),b&&l&&b.type.toLowerCase()!==l.type.toLowerCase()&&g.push(`audio codec "${b.type}" !== "${l.type}"`)}g.length&&(d.excludeUntil=1/0,this.logger_(`excluding ${d.id}: ${g.join(" && ")}`))}})}updateAdCues_(e){let t=0;const n=this.seekable();n.length&&(t=n.start(0)),d8(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=Lt.GOAL_BUFFER_LENGTH,n=Lt.GOAL_BUFFER_LENGTH_RATE,s=Math.max(t,Lt.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=Lt.BUFFER_LOW_WATER_LINE,n=Lt.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(t,Lt.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(t,Lt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.bufferBasedABR?a:s)}bufferHighWaterLine(){return Lt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Bd(this.inbandTextTracks_,"com.apple.streaming",this.tech_),j4({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,n){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Bd(this.inbandTextTracks_,e,this.tech_),U4({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(bt({},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),d=c&&e!==c;l.excludeUntil===1/0&&l.lastExcludeReason_==="content-steering"&&!d&&(delete l.excludeUntil,delete l.lastExcludeReason_,a=!0);const m=!l.excludeUntil&&l.excludeUntil!==1/0;!s.has(l.id)&&d&&m&&(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(g=>g.attributes["PATHWAY-ID"]===l["BASE-ID"]).forEach(g=>{this.mainPlaylistLoader_.addClonePathway(l,g)}),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,ae.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:o8(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 M8=(r,e,t)=>n=>{const s=r.main.playlists[e],a=ou(s),o=ja(s);if(typeof n>"u")return o;n?delete s.disabled:s.disabled=!0;const l={renditionInfo:{id:e,bandwidth:s.attributes.BANDWIDTH,resolution:s.attributes.RESOLUTION,codecs:s.attributes.CODECS},cause:"fast-quality"};return n!==o&&!a&&(n?(t(s),r.trigger({type:"renditionenabled",metadata:l})):r.trigger({type:"renditiondisabled",metadata:l})),n};class P8{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=es(s.main(),t),this.playlist=t,this.id=n,this.enabled=M8(e.playlists,t.id,a)}}const R8=function(r){r.representations=()=>{const e=r.playlistController_.main(),t=hs(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return t?t.filter(n=>!ou(n)).map((n,s)=>new P8(r,n,n.id)):[]}},jd=["seeking","seeked","pause","playing","error"];class V8 extends ae.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Ci("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(g=>{c[g]={reset:()=>this.resetSegmentDownloads_(g),updateend:()=>this.checkSegmentDownloads_(g)},o[`${g}SegmentLoader_`].on("appendsdone",c[g].updateend),o[`${g}SegmentLoader_`].on("playlistupdate",c[g].reset),this.tech_.on(["seeked","seeking"],c[g].reset)});const d=g=>{["main","audio"].forEach(m=>{o[`${m}SegmentLoader_`][g]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(jd,a),this.tech_.on("canplay",n),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(jd,a),this.tech_.off("canplay",n),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),l.forEach(g=>{o[`${g}SegmentLoader_`].off("appendsdone",c[g].updateend),o[`${g}SegmentLoader_`].off("playlistupdate",c[g].reset),this.tech_.off(["seeked","seeking"],c[g].reset)}),this.checkCurrentTimeTimeout_&&G.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&G.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=G.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=Cb(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+Ui>=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(Pt([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 b=t.start(0);a=b+(b===t.end(0)?0:Ui)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${n} with seekable range ${ef(t)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const o=this.playlistController_.sourceUpdater_,l=this.tech_.buffered(),c=o.audioBuffer?o.audioBuffered():null,d=o.videoBuffer?o.videoBuffered():null,g=this.media(),m=g.partTargetDuration?g.partTargetDuration:(g.targetDuration-$i)*2,S=[c,d];for(let b=0;b<S.length;b++){if(!S[b])continue;if(su(S[b],n)<m)return!1}const T=Us(l,n);return T.length===0?!1:(a=T.start(0)+Ui,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=Wn(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=Us(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)+Ui;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=Wn(e,n-3),o=Wn(e,n),l=Wn(t,n);l.length&&!o.length&&a.length&&(s={start:a.end(0),end:l.end(0)})}else Us(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=Us(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)+$i);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=Tb(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 F8={errorInterval:30,getSource(r){const t=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(t)}},Gf=function(r,e){let t=0,n=0;const s=nt(F8,e);r.ready(()=>{r.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){n&&r.currentTime(n)},o=function(g){g!=null&&(n=r.duration()!==1/0&&r.currentTime()||0,r.one("loadedmetadata",a),r.src(g),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"){ae.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)},d=function(g){c(),Gf(r,g)};r.on("error",l),r.on("dispose",c),r.reloadSourceOnError=d},$8=function(r){Gf(this,r)};var Wf="3.17.3",U8="7.1.0",q8="1.3.1",z8="7.2.0",j8="4.0.2";const pt={PlaylistLoader:Yn,Playlist:oi,utils:Xb,STANDARD_PLAYLIST_SELECTOR:Od,INITIAL_PLAYLIST_SELECTOR:P4,lastBandwidthSelector:Od,movingAverageBandwidthSelector:L4,comparePlaylistBandwidth:cu,comparePlaylistResolution:B4,xhr:Tf()};Object.keys(Lt).forEach(r=>{Object.defineProperty(pt,r,{get(){return ae.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Lt[r]},set(e){if(ae.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){ae.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Lt[r]=e}})});const Yf="videojs-vhs",Xf=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"})},H8=function(r,e){e.representations().forEach(t=>{r.addQualityLevel(t)}),Xf(r,e.playlists)};pt.canPlaySource=function(){return ae.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const G8=(r,e,t)=>{if(!r)return r;let n={};e&&e.attributes&&e.attributes.CODECS&&(n=as(Ri(e.attributes.CODECS))),t&&t.attributes&&t.attributes.CODECS&&(n.audio=t.attributes.CODECS);const s=rr(n.video),a=rr(n.audio),o={};for(const l in r)o[l]={},a&&(o[l].audioContentType=a),s&&(o[l].videoContentType=s),e.contentProtection&&e.contentProtection[l]&&e.contentProtection[l].pssh&&(o[l].pssh=e.contentProtection[l].pssh),typeof r[l]=="string"&&(o[l].url=r[l]);return nt(r,o)},W8=(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},[]),Y8=({player:r,sourceKeySystems:e,audioMedia:t,mainPlaylists:n})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const s=t?n.concat([t]):n,a=W8(s,Object.keys(e)),o=[],l=[];return a.forEach(c=>{l.push(new Promise((d,g)=>{r.tech_.one("keysessioncreated",d)})),o.push(new Promise((d,g)=>{r.eme.initializeMediaKeys({keySystems:c},m=>{if(m){g(m);return}d()})}))}),Promise.race([Promise.all(o),Promise.race(l)])},X8=({player:r,sourceKeySystems:e,media:t,audioMedia:n})=>{const s=G8(e,t,n);return s?(r.currentSource().keySystems=s,s&&!r.eme?(ae.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},Kf=()=>{if(!G.localStorage)return null;const r=G.localStorage.getItem(Yf);if(!r)return null;try{return JSON.parse(r)}catch{return null}},K8=r=>{if(!G.localStorage)return!1;let e=Kf();e=e?nt(e,r):r;try{G.localStorage.setItem(Yf,JSON.stringify(e))}catch{return!1}return e},Q8=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,Qf=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},Zf=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},Jf=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},ep=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};pt.supportsNativeHls=(function(){if(!_e||!_e.createElement)return!1;const r=_e.createElement("video");return ae.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(t){return/maybe|probably/i.test(r.canPlayType(t))}):!1})();pt.supportsNativeDash=(function(){return!_e||!_e.createElement||!ae.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(_e.createElement("video").canPlayType("application/dash+xml"))})();pt.supportsTypeNatively=r=>r==="hls"?pt.supportsNativeHls:r==="dash"?pt.supportsNativeDash:!1;pt.isSupported=function(){return ae.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};pt.xhr.onRequest=function(r){Qf(pt.xhr,r)};pt.xhr.onResponse=function(r){Zf(pt.xhr,r)};pt.xhr.offRequest=function(r){Jf(pt.xhr,r)};pt.xhr.offResponse=function(r){ep(pt.xhr,r)};const Z8=ae.getComponent("Component");class tp extends Z8{constructor(e,t,n){if(super(t,n.vhs),typeof n.initialBandwidth=="number"&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=Ci("VhsHandler"),t.options_&&t.options_.playerId){const s=ae.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(_e,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=>{const a=_e.fullscreenElement||_e.webkitFullscreenElement||_e.mozFullScreenElement||_e.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_=nt(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=Kf();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=Lt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Lt.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=Q8(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 L8(this.options_);const n=nt({liveRangeSafeTimeDelta:Ui},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new V8(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=ae.players[this.tech_.options_.playerId];let o=this.playlistController_.error;typeof o=="object"&&!o.code?o.code=3:typeof o=="string"&&(o={message:o,code:3}),a.error(o)});const s=this.options_.bufferBasedABR?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=G.navigator.connection||G.navigator.mozConnection||G.navigator.webkitConnection,l=1e7;if(this.options_.useNetworkInformationApi&&o){const c=o.downlink*1e3*1e3;c>=l&&a>=l?a=Math.max(a,c):a=c}return a},set(a){this.playlistController_.mainSegmentLoader_.bandwidth=a,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const a=1/(this.bandwidth||1);let o;return this.throughput>0?o=1/this.throughput:o=0,Math.floor(1/(a+o))},set(){ae.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>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&&K8({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{R8(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_=G.URL.createObjectURL(this.playlistController_.mediaSource),(ae.browser.IS_ANY_SAFARI||ae.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),Y8({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=X8({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=ae.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{H8(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{Xf(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":Wf,"mux.js":U8,"mpd-parser":q8,"m3u8-parser":z8,"aes-decrypter":j8}}version(){return this.constructor.version()}canChangeType(){return qf.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_&&G.URL.revokeObjectURL&&(G.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return i4({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,n=!0,s=2){return Ef({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=>{Qf(this.xhr,e)},this.xhr.onResponse=e=>{Zf(this.xhr,e)},this.xhr.offRequest=e=>{Jf(this.xhr,e)},this.xhr.offResponse=e=>{ep(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(bt({},s))})}),t.forEach(n=>{this.playbackWatcher_.on(n,s=>{this.player_.trigger(bt({},s))})})}}const Ta={name:"videojs-http-streaming",VERSION:Wf,canHandleSource(r,e={}){const t=nt(ae.options,e);return!t.vhs.experimentalUseMMS&&!Xr("avc1.4d400d,mp4a.40.2",!1)?!1:Ta.canPlayType(r.type,t)},handleSource(r,e,t={}){const n=nt(ae.options,t);return e.vhs=new tp(r,e,n),e.vhs.xhr=Tf(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const t=bh(r);if(!t)return"";const n=Ta.getOverrideNative(e);return!pt.supportsTypeNatively(t)||n?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,t=!(ae.browser.IS_ANY_SAFARI||ae.browser.IS_IOS),{overrideNative:n=t}=e;return n}},J8=()=>Xr("avc1.4d400d,mp4a.40.2",!0);J8()&&ae.getTech("Html5").registerSourceHandler(Ta,0);ae.VhsHandler=tp;ae.VhsSourceHandler=Ta;ae.Vhs=pt;ae.use||ae.registerComponent("Vhs",pt);ae.options.vhs=ae.options.vhs||{};(!ae.getPlugin||!ae.getPlugin("reloadSourceOnError"))&&ae.registerPlugin("reloadSourceOnError",$8);const ex="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4AQMAAADSHVMAAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAASYSURBVHic7c8BDQAgDMAw7t80Lk5SVgXbnM/M64BtDesa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNay7Fz0EOVPDeGwAAAAASUVORK5CYII=",tx={class:"o-meeting-playback-video"},ix={key:0,class:"poster-title"},nx=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),d=()=>{c.value=!1},g=(y,E=!1)=>{var k,z;const I=n.instance;if(!I)return;const O=(k=y.activeCues)==null?void 0:k[0];if(s.value&&clearInterval(s.value),O){O.text=((z=O==null?void 0:O.text)==null?void 0:z.replace(/\[(SPEAKER_)\d+]: /g,""))||"";const $=O.text.split(`
|
|
224
|
+
`),j=$.length,N=O.endTime-O.startTime,H=parseFloat((N/j).toFixed(3));let x=0;if(E){const K=(I.currentTime()-O.startTime)/(O.endTime-O.startTime);for(;(x+1)/j<K;)x++}x<j?O.text=$.length?$[x]:O==null?void 0:O.text:O.text=$.length?$[0]:O==null?void 0:O.text;let w=H*1e3;const P=()=>{s.value=setInterval(()=>{y.mode="hidden",x++,x>$.length-1?clearInterval(s.value):x===$.length-1?(O.text=$[x],clearInterval(s.value),w=H*(j-x)*1e3,P()):O.text=$[x],y.mode="showing"},w)};P()}},m=i.ref([]);i.watch(()=>m.value,y=>{const E=n.instance;if(E){const I=E.textTracks();for(let O=0;O<I.length;O++)I[O].kind==="subtitles"&&(g(I[O],!0),I[O].mode=y.length?"showing":"hidden")}},{deep:!0});const S=i.ref(!1),T=i.ref("init"),b=async()=>{if(!n.src)return;const y=ae("playerId",{controls:!0,autoplay:!1,preload:"auto",fluid:!0,poster:n.poster||ex,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",y),y.src(n.src),y.addRemoteTextTrack({kind:"subtitles",src:n.vtt,srclang:"zh",label:"中文",default:!1}),S.value=!0;class E extends ae.getComponent("Button"){constructor(k,z){super(k,z),this.addClass("vjs-subtitle-toggle-button","vjs-subtitle-hidden"),this.controlText("Toggle Subtitles")}buildCSSClass(){return`vjs-subtitle-toggle-button ${super.buildCSSClass()}`}handleClick(){const k=this.player().textTracks();for(let z=0;z<k.length;z++)k[z].kind==="subtitles"&&(g(k[z],!0),k[z].mode=k[z].mode==="showing"?"hidden":"showing",k[z].mode==="showing"?(this.removeClass("vjs-subtitle-hidden"),this.addClass("vjs-subtitle-showing")):(this.removeClass("vjs-subtitle-showing"),this.addClass("vjs-subtitle-hidden")))}}n.vtt&&(ae.registerComponent("SubtitleToggleButton",E),y.controlBar.children_.some(O=>O.name_==="SubtitleToggleButton")||y.controlBar.addChild("SubtitleToggleButton",{},8)),(y==null?void 0:y.textTracks().tracks_).forEach(O=>{O==null||O.addEventListener("cuechange",()=>{g(O)})}),y.on("play",()=>{T.value="playing"}),y.on("timeupdate",()=>{const O=y.currentTime()||0,k=n.captions.findIndex(z=>Ko(z.start_time)>O);l("setTrackIdx",k)}),y.one("loadedmetadata",()=>{l("getDuration",y.duration())}),i.nextTick(()=>{const O=document.getElementsByClassName("o-meeting-playback-video")[0];a.value=O.offsetHeight}),o.value=y};return i.onMounted(()=>{b(),document.addEventListener("click",d)}),i.watch(()=>n.src,()=>{b()}),i.onUnmounted(()=>{var y;(y=n==null?void 0:n.instance)==null||y.dispose(),document.removeEventListener("click",d)}),e({changeTime:y=>{var E;(E=o.value)==null||E.currentTime(y)}}),(y,E)=>(i.openBlock(),i.createElementBlock("div",tx,[i.createElementVNode("div",{class:i.normalizeClass(["video-placeholder",{loaded:S.value,"no-poster":!r.poster,[T.value]:!0}])},[E[0]||(E[0]=i.createElementVNode("video",{class:"video-js",id:"playerId"},null,-1)),r.posterTitle?(i.openBlock(),i.createElementBlock("div",ix,i.toDisplayString(r.posterTitle),1)):i.createCommentVNode("",!0)],2)]))}}),rx={class:"o-meeting-playback"},sx={class:"video-header"},ax={class:"video-title"},ox={class:"video-content"},lx={class:"info-wrapper"},ux={key:0,class:"base-info"},cx={class:"info-item"},dx={class:"info-item"},hx={class:"info-item"},fx={class:"info-item"},px={key:1,class:"subject-list"},mx={class:"subject-title"},gx={key:0,class:"subject-progress"},vx=["data-start","data-end"],Hd=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}=Xe.useI18n(),a=i.ref(null),o=M=>{a.value=M},l=i.ref(0),c=M=>{l.value=M},d=i.ref([]),g=async M=>{const Z=await(await fetch(M)).json();d.value=(Z.segments||[]).map(oe=>{const ce=Dv(oe.speaker);return{...oe,contentHtml:oe.content,speakerIdx:ce,speakerLabel:`${s("meeting.speaker")}${ce}`}})},m=i.ref([]),S=M=>O2[M%3],T=i.ref(0),b=M=>{T.value=M},y=i.ref(),E=i.ref(""),I=i.ref([0,0]);function O(M,Q){const Z=Q.getBoundingClientRect(),ce=(M.clientX-Z.left)/Z.width;return I.value[1]=`${Q.offsetTop+Q.parentElement.offsetTop}px`,I.value[0]=`${ce*100}%`,ce*T.value}const k=M=>{let Q=M;for(;Q&&Q.className!=="subject-progress";)Q=Q.parentElement;return Q},z=M=>{let Q=k(M.target);Q&&(E.value=Av(O(M,Q)))},$=()=>{E.value=""},j=M=>{var Z;let Q=k(M.target);Q&&((Z=y.value)==null||Z.changeTime(O(M,Q)))},N=async M=>{const Z=await(await fetch(M)).json();m.value=(Z||[]).map(oe=>({...oe,startTimeNumber:Ko(oe.startTime),endTimeNumber:Ko(oe.endTime)}))},H=i.ref("info"),x=i.computed(()=>{const M=[{label:s("meeting.baseInfo"),value:"info"}];return m.value.length&&M.push({label:s("meeting.subject"),value:"subject"}),M}),w=()=>{t.data&&(t.data.textJson&&g(t.data.textJson),t.data.topicJson&&N(t.data.topicJson))};i.watchEffect(()=>{w()});const P=M=>{n("change-date",M)},K=i.ref(null),B=i.ref("auto");let U=null,R=null;const X=()=>{K.value&&(B.value=`${K.value.offsetHeight}px`)},F=()=>{cancelAnimationFrame(R),R=requestAnimationFrame(X)};return i.onMounted(()=>{K.value&&(U=new ResizeObserver(F),U.observe(K.value),X())}),i.onUnmounted(()=>{cancelAnimationFrame(R),U==null||U.disconnect()}),(M,Q)=>{var Z,oe,ce,re;return i.openBlock(),i.createElementBlock("div",rx,[i.createElementVNode("div",{class:"left-card card-wrapper",ref_key:"leftRef",ref:K},[i.createElementVNode("div",sx,[i.createElementVNode("div",ax,i.toDisplayString((Z=r.detail)==null?void 0:Z.topic)+"("+i.toDisplayString((oe=r.detail)==null?void 0:oe.date)+")",1),(ce=r.dates)!=null&&ce.length?(i.openBlock(),i.createBlock(i.unref(A.OSelect),{key:0,size:"large",clearable:!1,"model-value":(re=r.detail)==null?void 0:re.date,placeholder:i.unref(s)("meeting.selectDate"),onChange:P},{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",ox,[r.data?(i.openBlock(),i.createBlock(nx,{key:0,ref_key:"playerRef",ref:y,src:r.data.video,vtt:r.data.textVtt,poster:r.data.poster,captions:d.value,onGetDuration:b,instance:a.value,onGetInstance:o,trackIdx:l.value,onSetTrackIdx:c},null,8,["src","vtt","poster","captions","instance","trackIdx"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",lx,[i.createVNode(i.unref(A.OTab),{modelValue:H.value,"onUpdate:modelValue":Q[0]||(Q[0]=ue=>H.value=ue),"max-show":9999},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(x.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.createVNode(i.unref(A.OScroller),{class:i.normalizeClass(["tab-content",`tab-content-${H.value}`]),"show-type":"hover"},{default:i.withCtx(()=>{var ue;return[H.value===x.value[0].value?(i.openBlock(),i.createElementBlock("div",ux,[i.createElementVNode("div",cx,[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",dx,[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",hx,[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",fx,[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),H.value===((ue=x.value[1])==null?void 0:ue.value)?(i.openBlock(),i.createElementBlock("div",px,[E.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:"mouse-current-time",style:i.normalizeStyle({top:I.value[1],left:I.value[0]})},i.toDisplayString(E.value),5)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,(te,Ae)=>(i.openBlock(),i.createElementBlock("div",{class:"subject-item",key:te.title},[i.createElementVNode("div",mx,i.toDisplayString(te.title),1),T.value?(i.openBlock(),i.createElementBlock("div",gx,[i.createElementVNode("div",{class:"subject-progress-item",onClick:j,onMousemove:z,onMouseleave:$,"data-start":te.startTime,"data-end":te.endTime,style:i.normalizeStyle({"--start":(te.startTimeNumber<0?0:te.startTimeNumber)/T.value,"--end":(te.endTimeNumber>T.value?T.value:te.endTimeNumber)/T.value,background:S(Ae)})},null,44,vx)])):i.createCommentVNode("",!0)]))),128))])):i.createCommentVNode("",!0)]}),_:1},8,["class"])])],512),i.createElementVNode("div",{class:"right-card card-wrapper",style:i.normalizeStyle({height:B.value})},[i.createVNode(Yy,{captions:d.value,trackIdx:l.value,instance:a.value},{empty:i.withCtx(()=>[i.renderSlot(M.$slots,"empty")]),_:3},8,["captions","trackIdx","instance"])],4)])}}}),yx={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function _x(r,e){return i.openBlock(),i.createElementBlock("svg",yx,[...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 Tx={name:"components-icon-tips",render:_x},bx={class:"o-sig-meeting-aside"},xx={class:"month"},Cx={class:"days"},Sx=["onClick"],Ex={class:"day-d"},kx={class:"day-c"},wx={class:"arrow-wrapper"},js=1,Dx=i.defineComponent({__name:"OMeetingSigAside",props:{data:{},current:{},total:{},active:{},meetingDates:{},eventsDates:{}},emits:["click-date","change-month"],setup(r,{emit:e}){const{getConfig:t}=Tn(),n=r,s=e,a=l=>{s("click-date",l)},o=l=>{n.current+l>=n.total||n.current+l<0||s("change-month",l)};return(l,c)=>(i.openBlock(),i.createElementBlock("div",bx,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(d,g)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:g},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d,m=>(i.openBlock(),i.createElementBlock("div",{key:m.month,class:"month-item"},[i.createElementVNode("div",xx,i.toDisplayString(m.month.replace(/-/g,"/")),1),i.createElementVNode("div",Cx,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.days,S=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["day-item",r.active===`${m.month}-${S}`&&"active"]),key:S,onClick:T=>a(`${m.month}-${S}`)},[i.createElementVNode("div",Ex,i.toDisplayString(S),1),i.createElementVNode("div",kx,[r.meetingDates.includes(`${m.month}-${S}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0,style:i.normalizeStyle({zIndex:i.unref(t)(i.unref(Be).MEETING,"zIndex"),backgroundColor:i.unref(t)(i.unref(Be).MEETING,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(t)(i.unref(Be).MEETING,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0),r.eventsDates.includes(`${m.month}-${S}`)?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:1,style:i.normalizeStyle({zIndex:i.unref(t)(i.unref(Be).EVENTS,"zIndex"),backgroundColor:i.unref(t)(i.unref(Be).EVENTS,"color")})},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(t)(i.unref(Be).EVENTS,"icon"))))]),_:1},8,["style"])):i.createCommentVNode("",!0)])],10,Sx))),128))])]))),128))],64))),128)),i.createElementVNode("div",wx,[i.createVNode(i.unref(A.OIcon),{onClick:c[0]||(c[0]=d=>o(0-js)),class:i.normalizeClass(r.current-js<0&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowLeft))]),_:1},8,["class"]),i.createVNode(i.unref(A.OIcon),{onClick:c[1]||(c[1]=d=>o(js)),class:i.normalizeClass(r.current+js>=r.total&&"disabled")},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconArrowRight))]),_:1},8,["class"])])]))}}),Ax={class:"o-sig-meeting-calendar"},Nx={key:0,class:"meeting-card-header"},Ix={key:0,class:"header-left"},Ox={key:1,class:"date-select"},Bx={class:"meeting-card-content"},Gd=i.defineComponent({__name:"OMeetingSigCalendar",props:{sigName:{},getMeetingListRequest:{},getDateListRequest:{},getEventsListRequest:{},dates:{}},setup(r){const e=r,{t,meetingTabs:n}=Tn(),{lePadV:s}=At.useScreen(),a=i.ref(""),o=i.ref(!1),l=i.ref([]),c=i.computed(()=>s.value?100:5),d=i.ref(""),g=i.ref([]),m=i.ref([]),S=i.ref([]),T=i.ref(-1),b=P=>{E(P)},y=P=>{E(P)},E=async P=>{if(e.getMeetingListRequest)try{o.value=!0,a.value=ve(P).format("YYYY-MM-DD");const K=await e.getMeetingListRequest(a.value,e.sigName);l.value=K.map(B=>({...B,time:`${B.start}-${B.end}`,date:B.date||a.value,type:Be.MEETING}))}finally{o.value=!1,S.value.forEach(K=>{var B;(B=K.dates)!=null&&B.includes(a.value)&&l.value.push(K)})}},I=async()=>{e.getDateListRequest&&(g.value=await e.getDateListRequest()),e.getEventsListRequest&&(S.value=await e.getEventsListRequest(),m.value=(S.value||[]).map(P=>P.dates||[]).flat())},O=i.ref(Be.ALL),k=()=>{I()};i.watch(()=>s.value,()=>{s.value&&(O.value=Be.ALL,k())});const z=P=>{const K=ve(P).format("YYYY-MM-DD");return[K.slice(0,7),K.slice(8,10)]},$=i.computed(()=>{let P=[];return O.value===Be.ALL?P=[...g.value||[],...m.value]:O.value===Be.MEETING?P=g.value||[]:P=m.value,[...new Set(P)].sort((K,B)=>ve(K).isAfter(ve(B))?1:-1).map(K=>ve(K).format("YYYY-MM-DD"))}),j=()=>{let P=$.value.find(K=>K===ve().format("YYYY-MM-DD"));P||(P=$.value.find(K=>ve(K).isAfter(ve()))||[...$.value].reverse().find(K=>ve().isAfter(ve(K)))),d.value=P};i.watch(()=>$.value,P=>{P.length&&(j(),i.nextTick(()=>{E(d.value)}))});const N=i.computed(()=>{const P=$.value.reduce((R,X)=>{var Q,Z;const[F,M]=z(X);return R[F]={count:(((Q=R[F])==null?void 0:Q.count)||0)+1,days:[...((Z=R[F])==null?void 0:Z.days)||[],M]},R},{}),K=Object.keys(P).map(R=>({...P[R],month:R})),B=[];let U=[];return K.forEach(R=>{for(;R.days.length;)if(!U.length)R.days.splice(0,6).forEach(X=>{U.push({month:R.month,day:X})}),U.length>=5&&(B.push(U),U=[]);else{let X=U.length;X%2===1&&(X+=1),R.days.length+U.length<=6?(R.days.splice(0,6).forEach(F=>{U.push({month:R.month,day:F})}),U.length>=5&&(B.push(U),U=[])):(R.days.splice(0,6-X).forEach(F=>{U.push({month:R.month,day:F})}),U.length>=5&&(B.push(U),U=[]))}}),U.length&&(B.push(U),U=[]),B}),H=i.computed(()=>N.value.map(P=>{const K=P.reduce((B,U)=>(B[U.month]=B[U.month]||[],B[U.month].push(U.day),B),{});return Object.keys(K).map(B=>({month:B,days:K[B]||[]}))})),x=()=>{N.value.length?(T.value=N.value.findIndex(P=>P.some(K=>d.value===`${K.month}-${K.day}`)),T.value===-1&&(T.value=N.value.findIndex(P=>P.some(K=>d.value.includes(K.month))))):T.value=-1};i.watch([()=>N.value,()=>d.value],()=>{x()},{deep:!0});const w=P=>{T.value+=P};return i.onMounted(()=>{I()}),(P,K)=>{const B=i.resolveComponent("ElOption"),U=i.resolveComponent("ElSelect");return i.openBlock(),i.createElementBlock("div",Ax,[i.unref(s)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",Nx,[d.value?(i.openBlock(),i.createElementBlock("div",Ix,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("meeting.latestMeeting")),1),i.createElementVNode("span",null,i.toDisplayString(i.unref(ve)(d.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(Tx))]),_: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:O.value,"onUpdate:modelValue":K[0]||(K[0]=R=>O.value=R),onChange:k,line:!1,"max-show":9999},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(n).slice(0,-1),R=>(i.openBlock(),i.createBlock(i.unref(A.OTabPane),{key:R.value,value:R.value},{nav:i.withCtx(()=>[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(R.icon)))]),_:2},1024),i.createTextVNode(" "+i.toDisplayString(R.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])),i.unref(s)&&$.value.length?(i.openBlock(),i.createElementBlock("div",Ox,[i.createVNode(U,{modelValue:a.value,"onUpdate:modelValue":K[1]||(K[1]=R=>a.value=R),onChange:y},{label:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.latestMeeting"))+" "+i.toDisplayString(a.value),1)]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList($.value,R=>(i.openBlock(),i.createBlock(B,{key:R,value:R,label:i.unref(ve)(R).format("YYYY/MM/DD")},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])):i.createCommentVNode("",!0),!i.unref(s)||i.unref(s)&&$.value.length?(i.openBlock(),i.createBlock(i.unref(A.ODivider),{key:2,class:"meeting-divider"})):i.createCommentVNode("",!0),i.createElementVNode("div",Bx,[!i.unref(s)&&T.value!==-1?(i.openBlock(),i.createBlock(Dx,{key:0,data:H.value.slice(T.value,T.value+1),meetingDates:O.value!==i.unref(Be).EVENTS?g.value:[],eventsDates:O.value!==i.unref(Be).MEETING?m.value:[],onClickDate:b,onChangeMonth:w,current:T.value,total:H.value.length,active:a.value},null,8,["data","meetingDates","eventsDates","current","total","active"])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OScroller),{class:"list-content","show-type":"hover",size:"small"},{default:i.withCtx(()=>[i.createVNode(mh,{list:l.value,rows:c.value},{empty:i.withCtx(()=>[i.renderSlot(P.$slots,"empty")]),_:3},8,["list","rows"])]),_:3})])])}}}),Lx={class:"o-my-meeting-calendar"},Mx={class:"meeting-list"},Px={class:"list-calendar-mb"},Rx={class:"list-calendar"},Vx=["onClick"],Fx={class:"date-cell-text"},$x={class:"list-body"},Ux=["id"],qx={class:"item-header-left"},zx={class:"header-info"},jx={key:0},Hx={class:"title-wrapper"},Gx={class:"title-text"},Wx={key:1,class:"tag-wrapper"},Yx={class:"meeting-info"},Xx={key:0,class:"item-header-right"},Kx={class:"meeting-detail"},Qx={key:0,class:"meeting-btn"},Zx={key:0,class:"load-text"},Jx={class:"dialog-content"},Wd=i.defineComponent({__name:"OMeetingMyCalendar",props:{cancelSubMeetingRequest:{},deleteMeetingRequest:{},getMeetingListRequest:{},groupType:{default:vi.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([]),d=i.computed(()=>o.value===null||c.value.length<o.value),g=i.ref(!1),{t:m,locale:S,getPointStr:T,getConfig:b,getWeekFromDate:y}=Tn(),E=i.computed(()=>S.value===Xe.Locales.EN),I=r,O=i.ref(!1),{isPhone:k}=At.useScreen(),z=i.ref([]),$=e,j=i.ref(!1),N=i.ref(!1),H=i.ref(),x=i.ref(0),w=()=>{var ie;x.value=((ie=H.value)==null?void 0:ie.clientHeight)||0},P=async()=>{if(I.getMeetingListRequest&&!j.value)try{if(o.value!==null&&o.value>0&&(s.value-1)*a.value>o.value)return;if(!d.value&&k.value){Ee("next-month");return}n.value=!0,j.value=!0;const ie=await I.getMeetingListRequest({page:s.value,size:a.value,order_by:"date",order_type:"asc",month:ve(Ie.value).format("YYYY-MM")}),ne=(ie.data||[]).map(se=>{var Ut,Wi,C;const{is_cycle:Se,date:pe,start:Ke,end:Oe,cycle_sub:Nt,cycle_start_date:ft,cycle_end_date:ui,cycle_start:It,cycle_end:Wt,cycle_type:Ot,cycle_interval:Rt,cycle_point:ci}=se;if(Se){let D="",Y="";Ot===mn&&(Y=m("meeting.cycleDay")),Ot===vn&&(Rt>1?Y=m("meeting.cycleWeek.other",[T(Ot,ci),Rt]):Y=m("meeting.cycleWeek.one",[T(Ot,ci)])),Ot===tn&&(Y=m("meeting.cycleMonth",[T(Ot,ci)])),D=m("meeting.cycleMeetingText2",{startDate:ft,endDate:ui,startTime:It,endTime:Wt,cycleType:Y});const le=((Ut=se.obs_data)==null?void 0:Ut.filter(ye=>ye.text_video_url))||[];return Nt.filter(ye=>ve(ye.date).isBefore(ve(Ie.value).add(1,"month").format("YYYY-MM-01"))&&!ve(ye.date).isBefore(ve(Ie.value).format("YYYY-MM-01"))).map(({id:ye,...Ne})=>({...se,...Ne,timeRange:D,dateRange:`${Ne.start}-${Ne.end}`,hasObsData:le.find(Je=>Je.sub_id===Ne.sub_id),time:`${Ne.start}-${Ne.end}`,isExpired:ve(`${Ne.date} ${Ne.start}`).isBefore(ve())}))}return[{...se,dateRange:`${Ke} - ${Oe}`,timeRange:`${Ke} - ${Oe}`,hasObsData:!!((C=(Wi=se.obs_data)==null?void 0:Wi.filter(D=>D.text_video_url))!=null&&C.length),time:`${Ke}-${Oe}`,isExpired:ve(`${pe} ${Ke}`).isBefore(ve())}]}).flat().filter(se=>se.date.slice(0,7)===ct(Ie.value,"YYYY-MM-DD").slice(0,7));g.value?(c.value=ie.data||[],l.value=ne):s.value===1&&!k.value?(c.value=ie.data||[],l.value=ne):(c.value=[...c.value,...ie.data||[]],l.value=[...l.value,...ne]),l.value.sort((se,Se)=>se.date===Se.date?On(se.start)>On(Se.start)?1:-1:ve(se.date).isAfter(ve(Se.date))?1:-1),o.value=(ie==null?void 0:ie.total)||0,i.nextTick(()=>{St(),me.value&&!k.value&&X()})}finally{n.value=!1,j.value=!1,N.value=!1,g.value=!1}},K=zi.useDebounceFn(()=>{d.value&&(k.value||(N.value=!0,s.value++,P()))},200),B=zi.useDebounceFn(()=>{if(!d.value||!k.value)return;const ie=window.scrollY||window.pageYOffset,ne=window.innerHeight;document.documentElement.scrollHeight-(ie+ne)<=300&&!j.value&&(N.value=!0,s.value++,P())},200),U=ie=>{const ne=l.value.filter(se=>se.date===ie);return ne.length&&ne.every(se=>se.is_delete)},R=ie=>{const ne=ie.target;if(!ne)return;const se=ne.scrollTop,Se=ne.scrollHeight,pe=ne.clientHeight;se+pe>=Se&&K()},X=()=>{me.value.getContainerEl().addEventListener("scroll",R)},F=i.ref({}),M=(ie,ne)=>{ie&&ne&&(F.value[ne]=ie)},Q=async ie=>{await F.value[ie].copyInfo(),t.success({content:m("common.copySuccess")})},Z=i.ref(!1),oe=i.ref(null),ce=ie=>{$("edit",ie,"whole")},re=ie=>{oe.value=ie,Z.value=!0},ue=async()=>{if(I.deleteMeetingRequest&&oe.value)try{O.value=!0;const ie=await I.deleteMeetingRequest(oe.value.id);if(typeof ie=="boolean"&&!ie)return;Z.value=!1,t.success({content:`${m("meeting.meetingCancel",[oe.value.topic])}`}),g.value=!0,P()}finally{O.value=!1}},te=i.ref(!1),Ae=i.ref(""),we=i.ref(null),Le=[{label:m("meeting.meetingSingle"),value:"single"},{label:m("meeting.meetingCycle"),value:"whole"}],De=i.ref("single"),Ve=(ie,ne)=>{ie.is_cycle?(we.value=ie,Ae.value=ne,te.value=!0):ne==="cancel"?re(ie):ce(ie)},Qe=()=>{te.value=!1,we.value=null,Ae.value="",De.value="single"},et=async()=>{const ie=we.value;if(ie)if(Ae.value==="cancel")try{let ne;if(O.value=!0,De.value==="single"&&ie.is_cycle){if(!I.cancelSubMeetingRequest)return;ne=await I.cancelSubMeetingRequest(ie.sub_id)}else{if(!I.deleteMeetingRequest)return;ne=await I.deleteMeetingRequest(ie.id)}if(typeof ne=="boolean"&&!ne)return;t.success({content:`${m("meeting.meetingCancel",[ie.topic])}`}),Qe(),g.value=!0,P()}finally{O.value=!1}else $("edit",ie,De.value),Qe()},$e=i.ref(),Ge=i.computed(()=>[...new Set(l.value.map(ie=>ie.date))].sort((ie,ne)=>ve(ie).isBefore(ve(ne))?-1:1)),xt=i.computed(()=>[...new Set(l.value.filter(ie=>!ie.isExpired&&!ie.is_delete).map(ie=>ie.date))].sort((ie,ne)=>ve(ie).isBefore(ve(ne))?-1:1)),Ie=i.ref(),St=()=>{var se;const ie=xt.value.find(Se=>!ve(Se).isBefore(ve(new Date).format("YYYY-MM-DD")));ie?Ie.value=ie:Ie.value||(Ie.value=ve().format("YYYY-MM-DD")),(se=$e.value)==null||se.pickDay(ve(Ie.value)),Ie.value=ve(Ie.value).format("YYYY-MM-DD");const ne=l.value.find(Se=>Se.date===Ie.value&&!Se.isExpired&&!Se.is_delete);ne&&(z.value=[ne.sub_id||ne.id])},lt=(ie,ne)=>{var se;(!ne||!((se=ie.target)!=null&&se.className.includes("date-cell-text")))&&(ie.stopPropagation(),ie.preventDefault())},Ee=ie=>{$e.value&&(s.value=1,o.value=null,window.scrollTo({top:0,behavior:"smooth"}),$e.value.selectDate(ie),g.value=!0,i.nextTick(()=>{Ie.value=ve($e.value.selectedDay).format("YYYY-MM-DD"),P()}))},Te=i.computed(()=>l.value.reduce((ie,ne)=>{if(ie.length){const se=ie.at(-1);return(se==null?void 0:se.date)===ne.date?se.list.push(ne):ie.push({date:ne.date,list:[ne]}),ie}else return[{date:ne.date,list:[ne]}]},[])),me=i.ref();i.watch(()=>Ie.value,()=>{Fe(Ie.value)});const Fe=ie=>{var Se,pe,Ke;const ne=ve(ie).format("YYYY-MM-DD"),se=document.querySelector(`#group-title-${ne}`);se&&(k.value?window.scrollTo({top:(((Se=se.parentElement)==null?void 0:Se.offsetTop)||0)-52,behavior:"smooth"}):(Ke=me.value)==null||Ke.scrollTo({top:((pe=se.parentElement)==null?void 0:pe.offsetTop)||0,behavior:"smooth"}))};i.onMounted(()=>{P(),window.addEventListener("scroll",B),window.addEventListener("resize",B),w(),window.addEventListener("resize",w)}),i.onUnmounted(()=>{var ne;window.removeEventListener("scroll",B),window.removeEventListener("resize",B),window.removeEventListener("resize",w);const ie=(ne=me.value)==null?void 0:ne.getContainerEl();ie==null||ie.removeEventListener("scroll",R)});const qe=ie=>{const ne=ve(ie||void 0);return E.value?ne.format("MMMM YYYY"):ne.format("YYYY MM月")},gt=i.computed(()=>[{id:"confirm",color:"primary",label:m("common.confirm"),variant:"solid",size:"large",round:"pill",loading:O.value,onClick:()=>{et()}},{id:"cancel",color:"primary",label:m("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Qe()}}]),Et=i.computed(()=>[{id:"confirm",color:"primary",label:m("common.confirm"),variant:"solid",size:"large",round:"pill",loading:O.value,onClick:()=>{ue()}},{id:"cancel",color:"primary",label:m("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Z.value=!1}}]);return(ie,ne)=>(i.openBlock(),i.createElementBlock("div",Lx,[i.createElementVNode("div",Mx,[i.createElementVNode("div",Px,[i.createElementVNode("span",null,i.toDisplayString(qe(Ie.value)),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[0]||(ne[0]=se=>Ee("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[1]||(ne[1]=se=>Ee("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),i.createElementVNode("div",Rx,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendarRef",ref:$e,modelValue:Ie.value,"onUpdate:modelValue":ne[4]||(ne[4]=se=>Ie.value=se)},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(qe(Ie.value)),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[2]||(ne[2]=se=>Ee("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[3]||(ne[3]=se=>Ee("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:se})=>[i.createElementVNode("div",{onClick:Se=>lt(Se,Ge.value.includes(se.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":se.isSelected,"is-today":i.unref(ct)(se.day)===i.unref(ct)(),clickable:Ge.value.includes(se.day),expired:i.unref(ve)(i.unref(ct)()).isAfter(i.unref(ve)(se.day)),"all-deleted":U(se.day)}),style:i.normalizeStyle({"--dot-bg":`${i.unref(b)(i.unref(Be).MEETING,"color")}`})},[i.createElementVNode("div",Fx,i.toDisplayString(Number(se.day.split("-")[2])),1)],14,Vx)]),_: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:me,onScrollend:i.unref(K),style:i.normalizeStyle({"--header-height":x.value}),class:"scroller-container","show-type":"hover"},{default:i.withCtx(()=>[i.createElementVNode("div",$x,[i.createVNode(i.unref(A.OCollapse),{modelValue:z.value,"onUpdate:modelValue":ne[7]||(ne[7]=se=>z.value=se),accordion:i.unref(k)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Te.value,(se,Se)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:se.date},[Se===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ne[5]||(ne[5]=pe=>Ee("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(m)("meeting.preMonth")),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["group-item",Se===Te.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"group-bar":!0,"is-active":i.unref(ve)(Ie.value).format("YYYY-MM-DD")===se.date,"is-end":se.list.every(pe=>pe.isExpired)})},[...ne[11]||(ne[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":se.list.every(pe=>pe.isExpired)}),id:`group-title-${i.unref(ve)(new Date(se.date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(ve)(se.date).format("MM/DD"))+" "+i.toDisplayString(i.unref(y)(se.date)),11,Ux),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.list,(pe,Ke)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:pe.sub_id||pe.id,value:pe.sub_id||pe.id,class:i.normalizeClass({"last-item":Se===Te.value.length-1&&Ke===se.list.length-1})},{title:i.withCtx(()=>[i.createElementVNode("div",qx,[i.createElementVNode("div",{class:"meeting-icon",style:i.normalizeStyle({backgroundColor:`${i.unref(b)(i.unref(Be).MEETING,"color")}`})},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(b)(i.unref(Be).MEETING,"icon"))))]),_:1})],4),i.createElementVNode("div",zx,[i.createElementVNode("div",{class:i.normalizeClass({"meeting-title":!0,"is-delete":pe.is_delete,"is-end":pe.isExpired})},[pe.is_delete?(i.openBlock(),i.createElementBlock("div",jx,i.toDisplayString(i.unref(m)("meeting.meetingCancelled")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",Hx,[i.createElementVNode("div",Gx,i.toDisplayString(pe.topic),1)]),pe.is_cycle?(i.openBlock(),i.createElementBlock("div",Wx,[i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.cycle")),1)]),_:1})])):i.createCommentVNode("",!0)],2),i.createElementVNode("div",Yx,[i.createElementVNode("span",null,i.toDisplayString(pe.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString(r.groupType===i.unref(vi).GROUP?i.unref(m)("meeting.groups"):i.unref(m)("meeting.sigs"))+": "+i.toDisplayString(pe.group_name),1)])])]),pe.is_delete?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",Xx,[pe.isExpired?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[pe.etherpad?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,"hover-underline":!1,target:"_blank",href:pe.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(m)("meeting.meetingSummary"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0),pe.hasObsData?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,"hover-underline":!1,target:"_blank",href:`/${i.unref(S)}/video/${pe.group_name}/${pe.mid}/${pe.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(m)("meeting.viewRecord"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0)],64)):(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,"hover-underline":!1,target:"_blank",href:pe.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(m)("meeting.joinMeeting"))+" ",1)]),_:1},8,["href"]))])),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>Q(Ke),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(kl))]),_:1},8,["onClick"])]),default:i.withCtx(()=>[i.createElementVNode("div",Kx,[i.createVNode(ts,{show:z.value.includes(pe.sub_id||pe.id),data:pe,ref_for:!0,ref:Oe=>M(Oe,pe.id),from:"my"},null,8,["show","data"]),!pe.isExpired&&!pe.is_delete?(i.openBlock(),i.createElementBlock("div",Qx,[i.createVNode(i.unref(A.OButton),{color:"normal",variant:"text",onClick:Oe=>Ve(pe,"edit")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.editMeeting")),1)]),_:1},8,["onClick"]),i.createVNode(i.unref(A.OButton),{color:"normal",variant:"text",onClick:Oe=>Ve(pe,"cancel")},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.cancelMeeting")),1)]),_:1},8,["onClick"])])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ne[12]||(ne[12]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Se===Te.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[N.value?(i.openBlock(),i.createElementBlock("div",Zx,i.toDisplayString(i.unref(m)("common.loading")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:ne[6]||(ne[6]=pe=>Ee("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(m)("meeting.nextMonth")),1)])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):n.value?i.createCommentVNode("",!0):i.renderSlot(ie.$slots,"empty",{key:1})],2),i.createVNode(i.unref(A.ODialog),{visible:te.value,"onUpdate:visible":ne[9]||(ne[9]=se=>te.value=se),"main-class":"handle-dialog",onClose:Qe,actions:gt.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.meetingHandleText",[Ae.value==="edit"?i.unref(m)("meeting.edit"):i.unref(m)("meeting.cancel")])),1)]),default:i.withCtx(()=>[i.createVNode(i.unref(A.ORadioGroup),{modelValue:De.value,"onUpdate:modelValue":ne[8]||(ne[8]=se=>De.value=se)},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(Le,se=>i.createVNode(i.unref(A.ORadio),{value:se.value,key:se.value},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(se.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Z.value,"onUpdate:visible":ne[10]||(ne[10]=se=>Z.value=se),"main-class":"cancel-dialog",actions:Et.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(m)("meeting.confirmCancel")),1)]),default:i.withCtx(()=>{var se;return[i.createElementVNode("div",Jx,i.toDisplayString(i.unref(m)("meeting.confirmCancelDesc",[(se=oe.value)==null?void 0:se.topic])),1)]}),_:1},8,["visible","actions"])])]))}}),eC=Object.assign(hc,{install(r){r.component("OMeetingCalendar",hc)}}),tC=Object.assign(mc,{install(r){r.component("OMeetingForm",mc)}}),iC=Object.assign(Hd,{install(r){r.component("OMeetingPlayback",Hd)}}),nC=Object.assign(Gd,{install(r){r.component("OMeetingSigCalendar",Gd)}}),rC=Object.assign(Wd,{install(r){r.component("OMeetingMyCalendar",Wd)}}),sC={class:"o-activity-table"},aC={key:0,class:"table-wrapper"},oC={class:"expand-detail"},lC={class:"sort-btn"},uC={class:"activity-btn"},cC={key:0,class:"pagination-wrapper"},dC={key:1,class:"collapse-wrapper"},hC={class:"title-top"},fC={class:"act-title"},pC={class:"act-sponsor"},mC={class:"sponsor"},gC={class:"activity-btn"},vC={class:"activity-detail"},yC={key:0,class:"pagination"},_C={class:"dialog-content"},TC={class:"dialog-content"},Yd=i.defineComponent({__name:"OActivityApproval",props:{getTableDataRequest:{},applicantList:{},cancelActivityRequest:{},deleteActivityRequest:{},approveActivityRequest:{},rejectActivityRequest:{},getActivityDetailRequest:{}},setup(r){const{t:e,locale:t}=Xe.useI18n(),n=i.computed(()=>t.value==="zh"),{approvalStatusMap:s,statusMap:a,activityTypeMap:o}=ba(),l=A.useMessage(null),{isPhone:c,lePadV:d}=At.useScreen(),g=r,m=i.reactive({page:1,size:10,status:"",is_delete:0,search:"",sponsor:"",order_by:""}),S=i.ref([]),T=i.computed(()=>g.applicantList.map(Ee=>({value:Ee,label:Ee}))),b=()=>{m.sponsor=S.value.join(",")},y=i.ref("desc"),E=()=>{y.value=y.value==="asc"?"desc":"asc",m.order_by=y.value},I=i.ref(),O=i.computed(()=>{const Ee=[];return s.value.forEach(Te=>{Ee.push(Te)}),Ee.slice(1)}),k=()=>{m.status=I.value,I.value==="cancel"?m.is_delete=1:m.is_delete=0},z=i.ref([]),$=i.ref(0),j=[10,20,30,40],N=async()=>{const{page:Ee,size:Te,status:me,sponsor:Fe,order_by:qe,search:gt,is_delete:Et}=m;let ie={page:Ee,size:Te,sponsor:Fe,order_by:qe,search:gt};if(me!=="all"&&me!==""&&(ie.is_delete=Et),me==="cancel"?ie.status="":ie.status=me,!g.getTableDataRequest)return;const ne=await g.getTableDataRequest(ie);z.value=(ne.data||[]).map(se=>{var ft;const{start_date:Se,end_date:pe,start:Ke,end:Oe,activity_type:Nt}=se;return[{...se,time:`${Se}-${Oe}`,start_date_time:`${Se} ${Ke}`,end_date_time:`${pe} ${Oe}`,type:Be.EVENTS,dateRange:`${Se} ${Ke}-${pe} ${Oe}`,activity_type:(ft=o.value.get(Nt))==null?void 0:ft.label}]}).flat(),$.value=ne.total},H=Ee=>{Ee.pageSize!==m.size?m.page=1:m.page=Ee.page,m.size=Ee.pageSize,N()},x=i.ref({reason:""}),w=i.ref(),P=i.ref(!1),K=i.ref(null),B=i.ref(""),U=i.ref(0),R=i.ref(!1),X=i.ref({reason:[{required:!0,message:e("meeting.enterReviewNotes")}]}),F=async()=>{var Ee,Te,me,Fe;if(!(!g.approveActivityRequest||!g.rejectActivityRequest))try{P.value=!0;const qe=await((Ee=w.value)==null?void 0:Ee.validate());if(!qe||qe.some(gt=>!!gt)){P.value=!1;return}U.value===1?await g.approveActivityRequest((Te=K.value)==null?void 0:Te.id,x.value):await g.rejectActivityRequest((me=K.value)==null?void 0:me.id,x.value),N(),M(),l.success({content:e("meeting.reviewSuccess",[(Fe=K.value)==null?void 0:Fe.title])})}finally{R.value=!1,P.value=!1}},M=()=>{R.value=!1,Z.value=!1,P.value=!1,x.value.reason=""},Q=async()=>{var Ee;if(g.deleteActivityRequest&&g.cancelActivityRequest)try{P.value=!0,re.value===1?await g.cancelActivityRequest(K.value.id,x.value):await g.deleteActivityRequest(K.value.id,x.value),N(),M(),l.success({content:e("meeting.activityActionSuccess",[(Ee=K.value)==null?void 0:Ee.title,ce.value])})}finally{P.value=!1,Z.value=!1}},Z=i.ref(!1),oe=i.ref(""),ce=i.ref(""),re=i.ref(0),ue=Ee=>{oe.value=e("meeting.deleteActivity"),ce.value=e("meeting.deleteActivity").toLowerCase(),K.value=Ee,re.value=0,Z.value=!0},te=Ee=>{oe.value=e("meeting.cancelActivity"),ce.value=e("common.cancel").toLowerCase(),K.value=Ee,re.value=1,Z.value=!0},Ae=Ee=>{K.value=Ee,B.value=e("meeting.approveReview"),U.value=1,R.value=!0},we=Ee=>{K.value=Ee,B.value=e("meeting.rejectReview"),U.value=0,R.value=!0},Le=i.ref([]),De=i.ref([]),Ve=Ee=>{const Te=Ee.toString();if(!g.getActivityDetailRequest)return;Le.value.includes(Te)||(Le.value.push(Te),g.getActivityDetailRequest(Te).then(Fe=>{var qe;(qe=z.value)==null||qe.forEach(gt=>{gt.id===Fe.id&&(gt.approve_record=Fe.approve_record,gt.approver=Fe.approver)})}));const me=De.value.indexOf(Te);De.value.includes(Te)?De.value.splice(me,1):De.value.push(Te)},Qe=Ee=>{Ve(Ee.id)},et=Ee=>Ee.id.toString(),$e=i.ref([]),Ge=Ee=>{Ee.length&&Ee.forEach(Te=>{Ve(Te)})},xt=i.ref({}),Ie=(Ee,Te)=>{Ee&&Te&&(xt.value[Te]=Ee)};i.onMounted(()=>{N()}),i.watch(()=>[m.status,m.sponsor,m.order_by,m.search,m.is_delete],()=>{N()},{deep:!0});const St=i.computed(()=>[{id:"confirm",loading:P.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{Q()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{M()}}]),lt=i.computed(()=>[{id:"confirm",loading:P.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{F()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{M()}}]);return(Ee,Te)=>(i.openBlock(),i.createElementBlock("div",sC,[i.unref(c)?(i.openBlock(),i.createElementBlock("div",dC,[i.createVNode(i.unref(A.OCollapse),{modelValue:$e.value,"onUpdate:modelValue":Te[2]||(Te[2]=me=>$e.value=me),accordion:i.unref(c),onChange:Ge},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(z.value,me=>{var Fe;return i.openBlock(),i.createElementBlock(i.Fragment,{key:me.id},[i.createElementVNode("div",hC,[i.createElementVNode("p",fC,i.toDisplayString(me.title),1),me.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(Fe=i.unref(a).get(me.status))==null?void 0:Fe.id}`])},{default:i.withCtx(()=>{var qe;return[i.createTextVNode(i.toDisplayString((qe=i.unref(a).get(me.status))==null?void 0:qe.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(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.statusCanceled")),1)]),_:1}))]),i.createVNode(i.unref(A.OCollapseItem),{value:me.id},{title:i.withCtx(()=>[i.createElementVNode("div",pC,[i.createElementVNode("p",mC,i.toDisplayString(me.sponsor),1),i.createElementVNode("p",null,i.toDisplayString(i.unref(tt.dayjs)(me.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),i.createElementVNode("div",gC,[me.status===7||me.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",variant:"text",onClick:i.withModifiers(qe=>ue(me),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(me.status===3||me.status===4)&&me.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",variant:"text",onClick:i.withModifiers(qe=>te(me),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",variant:"text",onClick:i.withModifiers(qe=>Ae(me),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",variant:"text",onClick:i.withModifiers(qe=>we(me),["stop"])},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),default:i.withCtx(()=>[i.createElementVNode("div",vC,[i.createVNode(ts,{show:$e.value.includes(me.id),data:me,ref_for:!0,ref:qe=>Ie(qe,me.id),page:i.unref(Be).APPROVAL},null,8,["show","data","page"])])]),_:2},1032,["value"])],64)}),128))]),_:1},8,["modelValue","accordion"]),$.value>j[0]?(i.openBlock(),i.createElementBlock("div",yC,[i.createVNode(i.unref(A.OPagination),{total:$.value,page:m.page,"page-size":m.size,"page-sizes":j,layout:["total","jumper","pager","pagesize"],"show-more":!1,simple:!0,onChange:H},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",aC,[i.createVNode(i.unref(tt.ElTable),{data:z.value,onExpandChange:Qe,"row-key":et,"expand-row-keys":De.value},{default:i.withCtx(()=>[i.createVNode(i.unref(tt.ElTableColumn),{type:"expand"},{default:i.withCtx(me=>[i.createElementVNode("div",oC,[i.createVNode(ts,{data:me.row,page:i.unref(Be).APPROVAL,show:""},null,8,["data","page"])])]),_:1}),i.createVNode(i.unref(tt.ElTableColumn),{label:i.unref(e)("meeting.activityName"),prop:"title"},null,8,["label"]),i.createVNode(i.unref(tt.ElTableColumn),{prop:"sponsor"},{header:i.withCtx(()=>[i.createVNode(uc,{modelValue:S.value,"onUpdate:modelValue":Te[0]||(Te[0]=me=>S.value=me),onConfirm:b,list:T.value,multiple:!0},{empty:i.withCtx(()=>[i.renderSlot(Ee.$slots,"filter-empty")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(i.unref(e)("meeting.applicant")),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:E},[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("meeting.submissionTime")),1),i.createElementVNode("div",lC,[i.createElementVNode("div",{class:i.normalizeClass(["sort-asc sort-item",{active:y.value==="asc"}])},null,2),i.createElementVNode("div",{class:i.normalizeClass(["sort-desc sort-item",{active:y.value==="desc"}])},null,2)])])]),default:i.withCtx(me=>[i.createTextVNode(i.toDisplayString(i.unref(tt.dayjs)(me.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(uc,{modelValue:I.value,"onUpdate:modelValue":Te[1]||(Te[1]=me=>I.value=me),onConfirm:k,list:O.value},{empty:i.withCtx(()=>[i.renderSlot(Ee.$slots,"filter-empty")]),default:i.withCtx(()=>[i.createTextVNode(" "+i.toDisplayString(i.unref(e)("meeting.status")),1)]),_:3},8,["modelValue","list"])]),default:i.withCtx(me=>{var Fe;return[me.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:i.normalizeClass([`tag-${(Fe=i.unref(a).get(me.row.status))==null?void 0:Fe.id}`])},{default:i.withCtx(()=>{var qe;return[i.createTextVNode(i.toDisplayString((qe=i.unref(a).get(me.row.status))==null?void 0:qe.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(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.statusCanceled")),1)]),_:1}))]}),_:3}),i.createVNode(i.unref(tt.ElTableColumn),{label:i.unref(e)("meeting.action")},{default:i.withCtx(me=>[i.createElementVNode("div",uC,[me.row.status===7||me.row.is_delete?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,color:"danger",onClick:Fe=>ue(me.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),(me.row.status===3||me.row.status===4)&&me.row.is_delete!==1?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,color:"danger",onClick:Fe=>te(me.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:2,color:"primary",onClick:Fe=>Ae(me.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),me.row.status===2?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:3,color:"primary",onClick:Fe=>we(me.row)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])]),_:1},8,["label"])]),_:3},8,["data","expand-row-keys"]),$.value>j[0]?(i.openBlock(),i.createElementBlock("div",cC,[i.createVNode(i.unref(A.OPagination),{total:$.value,page:m.page,"page-size":m.size,"page-sizes":j,layout:["total","jumper","pager","pagesize"],"show-more":!1,onChange:H},null,8,["total","page","page-size"])])):i.createCommentVNode("",!0)])),i.createVNode(i.unref(A.ODialog),{visible:R.value,"onUpdate:visible":Te[4]||(Te[4]=me=>R.value=me),"phone-half-full":i.unref(d),"main-class":"handle-dialog-approval review-dialog",actions:lt.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(B.value),1)]),default:i.withCtx(()=>[i.createElementVNode("div",_C,[i.createVNode(i.unref(A.OForm),{model:x.value,ref_key:"formRef",ref:w,"has-required":"",layout:"v",class:"form-wrapper"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OFormItem),{rules:X.value.reason,label:`${i.unref(e)("meeting.reviewNotesLabel")}${n.value?":":": "}`,field:"reason"},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTextarea),{size:"large",placeholder:i.unref(e)("meeting.enterReviewNotes"),rows:4,resize:"none","max-length":1e3,"input-on-outlimit":!1,modelValue:x.value.reason,"onUpdate:modelValue":Te[3]||(Te[3]=me=>x.value.reason=me)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model"])])]),_:1},8,["visible","phone-half-full","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Z.value,"onUpdate:visible":Te[5]||(Te[5]=me=>Z.value=me),"phone-half-full":i.unref(d),"main-class":"handle-dialog-approval cancel-dialog",actions:St.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(oe.value),1)]),default:i.withCtx(()=>{var me,Fe;return[i.createElementVNode("div",TC,i.toDisplayString(re.value===1?i.unref(e)("meeting.confirmCancelActivity",[(me=K.value)==null?void 0:me.title]):i.unref(e)("meeting.confirmDeleteActivity",[(Fe=K.value)==null?void 0:Fe.title])),1)]}),_:1},8,["visible","phone-half-full","actions"])]))}}),bC={class:"o-my-activity-calendar"},xC={class:"activity-list"},CC={key:0,class:"list-calendar-mb"},SC={class:"left-calendar"},EC=["onClick"],kC={class:"date-cell-text"},wC={class:"right-meeting"},DC={class:"list-body"},AC=["id"],NC={class:"item-header-left"},IC={class:"header-info"},OC={class:"title-text"},BC={class:"act-info"},LC={class:"date-range"},MC={key:0,class:"item-header-right"},PC={class:"activity-detail"},RC={key:0,class:"activity-btn"},VC={key:0,class:"load-text"},FC={class:"dialog-content"},$C={class:"dialog-content"},UC=i.defineComponent({__name:"OActivityMyCalendar",props:{getListRequest:{},revokeActivityRequest:{},deleteActivityRequest:{},editActivityRequest:{},getActivityDetailRequest:{}},emits:["edit"],setup(r,{emit:e}){const{t,locale:n}=Xe.useI18n(),s=i.computed(()=>n.value===Xe.Locales.ZH),{statusMap:a,activityTypeMap:o}=ba(),{getConfig:l}=Tn(),c=ie=>{const ne=ve(ie||new Date);return s.value?ne.format("YYYY MM月"):ne.format("MMMM YYYY")},d=A.useMessage(null),{isPhone:g}=At.useScreen(),m=r,S=e,T=i.ref([]),b=i.ref([]),y=i.ref(1),E=i.ref(50),I=i.ref(null),O=i.ref(!1),k=i.ref([]),z=i.ref(!1),$=i.ref(!1),j=i.computed(()=>I.value===null||b.value.length<I.value),N=async()=>{if(m.getListRequest&&!z.value)try{if(I.value!==null&&I.value>0&&(y.value-1)*E.value>I.value)return;if(!j.value&&g.value){Z("next-month");return}z.value=!0;const ie=await m.getListRequest({page:y.value,size:E.value,start_date:R.value}),ne=(ie.data||[]).map(se=>{const{start_date:Se,end_date:pe,start:Ke,end:Oe}=se;return[{...se,time:`${Se}-${Oe}`,start_date_time:`${Se} ${Ke}`,end_date_time:`${pe} ${Oe}`,type:Be.EVENTS,dateRange:`${Se} ${Ke}-${pe} ${Oe}`,isExpired:ve(`${Se} ${Ke}`).isBefore(ve())}]}).flat().filter(se=>se.start_date.slice(0,7)===ct(R.value,"YYYY-MM-DD").slice(0,7));O.value?(b.value=ie.data||[],T.value=ne):y.value===1&&!g.value?(b.value=ie.data||[],T.value=ne):(b.value=[...b.value,...ie.data||[]],T.value=[...T.value,...ne]),T.value.sort((se,Se)=>se.start_date===Se.start_date?On(se.start)>On(Se.start)?1:-1:ve(se.start_date).isAfter(ve(Se.start_date))?1:-1),I.value=(ie==null?void 0:ie.total)||0,i.nextTick(()=>{M(),te.value&&!g.value&&B()})}finally{z.value=!1,$.value=!1,O.value=!1}},H=i.ref([]),x=ie=>{m.getActivityDetailRequest&&(H.value.includes(ie)||(H.value.push(ie),m.getActivityDetailRequest(ie).then(ne=>{var se;(se=T.value)==null||se.forEach(Se=>{Se.id===ne.id&&(Se.approve_record=ne.approve_record)})})))},w=ie=>{ie.length&&ie.forEach(ne=>{x(ne)})},P=ie=>{const ne=T.value.filter(se=>se.start_date===ie);return ne.length&&ne.every(se=>se.status===3||se.status===4)},K=ie=>{const ne=ie.target;if(!ne)return;const se=ne.scrollTop,Se=ne.scrollHeight,pe=ne.clientHeight;se+pe>=Se&&we()},B=()=>{te.value.getContainerEl().addEventListener("scroll",K)},U=i.ref(),R=i.ref(ve().format("YYYY-MM-DD")),X=i.computed(()=>[...new Set(T.value.map(ie=>ie.start_date))].sort((ie,ne)=>ve(ie).isBefore(ve(ne))?-1:1)),F=i.computed(()=>[...new Set(T.value.filter(ie=>!ie.isExpired&&!ie.is_delete).map(ie=>ie.start_date))].sort((ie,ne)=>ve(ie).isBefore(ve(ne))?-1:1)),M=()=>{var se;const ie=F.value.find(Se=>!ve(Se).isBefore(ve(new Date).format("YYYY-MM-DD")));ie?R.value=ie:R.value||(R.value=ve().format("YYYY-MM-DD")),(se=U.value)==null||se.pickDay(ve(R.value)),R.value=ve(R.value).format("YYYY-MM-DD");const ne=T.value.find(Se=>Se.start_date===R.value&&!Se.isExpired&&!Se.is_delete);ne&&(x(ne.id),k.value=[ne.id])},Q=(ie,ne)=>{var se;(!ne||!((se=ie.target)!=null&&se.className.includes("date-cell-text")))&&(ie.stopPropagation(),ie.preventDefault())},Z=ie=>{U.value&&(y.value=1,I.value=null,H.value=[],window.scrollTo({top:0,behavior:"smooth"}),U.value.selectDate(ie),O.value=!0,i.nextTick(()=>{R.value=ve(U.value.selectedDay).format("YYYY-MM-DD"),N()}))},oe=i.computed(()=>T.value.reduce((ie,ne)=>{if(ie.length){const se=ie.at(-1);return(se==null?void 0:se.start_date)===ne.start_date?se==null||se.list.push(ne):ie.push({start_date:ne.start_date,list:[ne]}),ie}else return[{start_date:ne.start_date,list:[ne]}]},[])),ce=i.ref({}),re=(ie,ne)=>{ie&&ne&&(ce.value[ne]=ie)},ue=async ie=>{await ce.value[ie].copyInfo(),d.success({content:t("common.copySuccess")})},te=i.ref(),Ae=ie=>{var Se,pe,Ke;const ne=ve(ie).format("YYYY-MM-DD"),se=document.querySelector(`#group-title-${ne}`);se&&(g.value?window.scrollTo({top:(((Se=se.parentElement)==null?void 0:Se.offsetTop)||0)-52,behavior:"smooth"}):(Ke=te.value)==null||Ke.scrollTo({top:((pe=se.parentElement)==null?void 0:pe.offsetTop)||0,behavior:"smooth"}))};i.watch(()=>R.value,()=>{Ae(R.value)});const we=zi.useDebounceFn(()=>{j.value&&(g.value||($.value=!0,y.value++,N()))},200),Le=i.ref(!1),De=i.ref(null),Ve=i.ref(!1),Qe=ie=>{De.value=ie,Ve.value=!0},et=()=>{var ie;m.revokeActivityRequest&&De.value&&(Le.value=!0,m.revokeActivityRequest((ie=De.value)==null?void 0:ie.id).then(ne=>{var se;typeof ne=="boolean"&&!ne||(d.success({content:t("meeting.revokeActivitySuccess",[(se=De.value)==null?void 0:se.title])}),O.value=!0,N())}).finally(()=>{Ve.value=!1,Le.value=!1}))},$e=()=>{Ve.value=!1},Ge=ie=>{S("edit",ie)},xt=ie=>{if(!m.editActivityRequest)return;const{title:ne,start_date:se,end_date:Se,register_end_date:pe,activity_type:Ke,synopsis:Oe,register_url:Nt,content_url:ft,address:ui,start:It,end:Wt,approver:Ot}=ie;let Rt={title:ne,start_date:se,end_date:Se,register_end_date:pe,activity_type:Ke,synopsis:Oe,register_url:Nt,content_url:ft,address:ui,start:It,end:Wt,approver:Ot,is_publish:"true"};m.editActivityRequest(ie.id,Rt).then(ci=>{typeof ci=="boolean"&&!ci||(d.success({content:t("meeting.submitReviewSuccess",[ie.title])}),O.value=!0,N())})},Ie=i.ref(!1),St=ie=>{De.value=ie,Ie.value=!0},lt=()=>{var ie;m.deleteActivityRequest&&(Le.value=!0,m.deleteActivityRequest((ie=De.value)==null?void 0:ie.id).then(ne=>{var se;typeof ne=="boolean"&&!ne||(d.success({content:t("meeting.deleteActivitySuccess",[(se=De.value)==null?void 0:se.title])}),O.value=!0,N())}).finally(()=>{Ie.value=!1,Le.value=!1}))},Ee=()=>{Ie.value=!1},Te=i.ref(),me=i.ref(0),Fe=()=>{var ie;me.value=((ie=Te.value)==null?void 0:ie.clientHeight)||0},qe=zi.useDebounceFn(()=>{if(!j.value||!g.value)return;const ie=window.scrollY||window.pageYOffset,ne=window.innerHeight;document.documentElement.scrollHeight-(ie+ne)<=300&&!z.value&&($.value=!0,y.value++,N())},200);i.onMounted(()=>{N(),window.addEventListener("scroll",qe),window.addEventListener("resize",qe),Fe(),window.addEventListener("resize",Fe)}),i.onUnmounted(()=>{var ne;window.removeEventListener("scroll",qe),window.removeEventListener("resize",qe),window.removeEventListener("resize",Fe);const ie=(ne=te.value)==null?void 0:ne.getContainerEl();ie==null||ie.removeEventListener("scroll",K)});const gt=i.computed(()=>[{id:"confirm",loading:Le.value,color:"primary",variant:"outline",round:"pill",size:"large",label:t("meeting.confirmBtn"),onClick:()=>{et()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:t("meeting.cancelBtn"),onClick:()=>{$e()}}]),Et=i.computed(()=>[{id:"confirm",loading:Le.value,color:"primary",variant:"outline",round:"pill",size:"large",label:t("meeting.confirmBtn"),onClick:()=>{lt()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:t("meeting.cancelBtn"),onClick:()=>{Ee()}}]);return(ie,ne)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",bC,[i.createElementVNode("div",xC,[i.unref(g)?(i.openBlock(),i.createElementBlock("div",CC,[i.createElementVNode("span",null,i.toDisplayString(c(R.value)),1),i.createElementVNode("span",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[0]||(ne[0]=se=>Z("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[1]||(ne[1]=se=>Z("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])])):i.createCommentVNode("",!0),i.createElementVNode("div",SC,[i.createVNode(i.unref(tt.ElCalendar),{ref_key:"calendarRef",ref:U,modelValue:R.value,"onUpdate:modelValue":ne[4]||(ne[4]=se=>R.value=se)},{header:i.withCtx(()=>[i.createElementVNode("span",null,i.toDisplayString(c(R.value)),1),i.createElementVNode("div",null,[i.createVNode(i.unref(A.OIcon),{onClick:ne[2]||(ne[2]=se=>Z("prev-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronLeft))]),_:1}),i.createVNode(i.unref(A.OIcon),{onClick:ne[3]||(ne[3]=se=>Z("next-month"))},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":i.withCtx(({data:se})=>[i.createElementVNode("div",{onClick:Se=>Q(Se,X.value.includes(se.day)),class:i.normalizeClass({"date-cell":!0,"is-selected":se.isSelected,"is-today":i.unref(ct)(se.day)===i.unref(ct)(),clickable:X.value.includes(se.day),approved:P(se.day)}),style:i.normalizeStyle({"--dot-bg":`${i.unref(l)(i.unref(Be).EVENTS,"color")}`})},[i.createElementVNode("div",kC,i.toDisplayString(Number(se.day.split("-")[2])),1)],14,EC)]),_:1},8,["modelValue"])]),i.createElementVNode("div",wC,[T.value.length?(i.openBlock(),i.createBlock(i.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:te,onScrollend:i.unref(we),style:i.normalizeStyle({"--header-height":me.value}),"show-type":"hover",class:"scroller-container"},{default:i.withCtx(()=>[i.createElementVNode("div",DC,[i.createVNode(i.unref(A.OCollapse),{modelValue:k.value,"onUpdate:modelValue":ne[7]||(ne[7]=se=>k.value=se),accordion:i.unref(g),onChange:w},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(oe.value,(se,Se)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:se.start_date},[Se===0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:ne[5]||(ne[5]=pe=>Z("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(t)("meeting.preMonth")),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["act-item",Se===oe.value.length-1&&"last-item"])},[i.createElementVNode("div",{class:i.normalizeClass({"act-bar":!0,"is-active":i.unref(ve)(R.value).format("YYYY-MM-DD")===se.start_date,"is-end":se.list.every(pe=>pe.isExpired),approved:se.list.every(pe=>pe.status===3||pe.status===4)})},[...ne[10]||(ne[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":se.list.every(pe=>pe.isExpired)}),id:`group-title-${i.unref(ve)(new Date(se.start_date)).format("YYYY-MM-DD")}`},i.toDisplayString(i.unref(ve)(se.start_date).format("MM/DD")),11,AC),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(se.list,(pe,Ke)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:pe.sub_id||pe.id,value:pe.sub_id||pe.id,class:i.normalizeClass({"last-item":Se===oe.value.length-1&&Ke===se.list.length-1})},{title:i.withCtx(()=>{var Oe,Nt;return[i.createElementVNode("div",NC,[i.createElementVNode("div",{class:"act-icon",style:i.normalizeStyle({backgroundColor:`${i.unref(l)(i.unref(Be).EVENTS,"color")}`})},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(l)(i.unref(Be).EVENTS,"icon"))))]),_:1})],4),i.createElementVNode("div",IC,[i.createElementVNode("div",{class:i.normalizeClass({"act-title":!0,"is-delete":pe.is_delete,"is-end":pe.isExpired})},[i.createElementVNode("div",OC,i.toDisplayString(pe.title),1),i.createVNode(i.unref(A.OTag),{color:"primary",variant:"outline",class:i.normalizeClass([`tag-${pe.is_delete?"delete":(Oe=i.unref(a).get(pe.status))==null?void 0:Oe.id}`])},{default:i.withCtx(()=>{var ft;return[i.createTextVNode(i.toDisplayString(pe.is_delete===1?i.unref(t)("meeting.statusCanceled"):(ft=i.unref(a).get(pe.status))==null?void 0:ft.text),1)]}),_:2},1032,["class"])],2),i.createElementVNode("div",BC,[i.createElementVNode("span",LC,i.toDisplayString(pe.dateRange),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),i.createElementVNode("span",null,i.toDisplayString((Nt=i.unref(o).get(pe.activity_type))==null?void 0:Nt.label),1)])])]),pe.content_url&&!pe.is_delete&&[3,4,5,6].includes(pe.status)?(i.openBlock(),i.createElementBlock("div",MC,[pe.content_url?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,"hover-underline":!1,href:pe.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(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.activityDetail"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0),pe.register_url&&(pe.status===3||pe.status===4||pe.status===2&&pe.update_activity_id&&new Date(pe.register_end_date).getTime()>new Date().getTime())?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:1,"hover-underline":!1,href:pe.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(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.registerNow"))+" ",1)]),_:1},8,["href"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.createVNode(i.unref(A.OIcon),{onClick:i.withModifiers(()=>ue(Ke),["stop"]),class:"copy-icon"},{default:i.withCtx(()=>[i.createVNode(i.unref(kl))]),_:1},8,["onClick"])]}),default:i.withCtx(()=>[i.createElementVNode("div",PC,[i.createVNode(ts,{show:k.value.includes(pe.id),data:pe,ref_for:!0,ref:Oe=>re(Oe,pe.id)},null,8,["show","data"]),!pe.isExpired&&!pe.is_delete?(i.openBlock(),i.createElementBlock("div",RC,[pe.status===2?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:0,variant:"text",onClick:Oe=>Qe(pe)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.withdrawReview")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.status===1||pe.status===3||pe.status===4||pe.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:1,variant:"text",onClick:Oe=>Ge(pe)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.modifyActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.status===1||pe.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:2,variant:"text",onClick:Oe=>St(pe)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0),pe.status===1||pe.status===7?(i.openBlock(),i.createBlock(i.unref(A.OButton),{key:3,variant:"text",onClick:Oe=>xt(pe)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.submitReview")),1)]),_:1},8,["onClick"])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),ne[11]||(ne[11]=i.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Se===oe.value.length-1?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[$.value?(i.openBlock(),i.createElementBlock("div",VC,i.toDisplayString(i.unref(t)("meeting.loading")),1)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"list-month-change next-month",onClick:ne[6]||(ne[6]=pe=>Z("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(t)("meeting.nextMonth")),1)])],64)):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):i.renderSlot(ie.$slots,"empty",{key:1})])])]),i.createVNode(i.unref(A.ODialog),{visible:Ve.value,"onUpdate:visible":ne[8]||(ne[8]=se=>Ve.value=se),"main-class":"handle-dialog-active",actions:gt.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.withdrawReview")),1)]),default:i.withCtx(()=>{var se;return[i.createElementVNode("div",FC,i.toDisplayString(i.unref(t)("meeting.confirmRevokeActivity",[(se=De.value)==null?void 0:se.title])),1)]}),_:1},8,["visible","actions"]),i.createVNode(i.unref(A.ODialog),{visible:Ie.value,"onUpdate:visible":ne[9]||(ne[9]=se=>Ie.value=se),"main-class":"handle-dialog-active",actions:Et.value},{header:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(t)("meeting.deleteActivity")),1)]),default:i.withCtx(()=>{var se;return[i.createElementVNode("div",$C,i.toDisplayString(i.unref(t)("meeting.confirmDeleteActivity",[(se=De.value)==null?void 0:se.title])),1)]}),_:1},8,["visible","actions"])],64))}}),qC=Object.assign(ec,{install(r){r.component("OActivityForm",ec)}}),zC=Object.assign(Yd,{install(r){r.component("OActivityApproval",Yd)}}),ip=Object.assign(UC,{install(r){r.component("OActivityMyCalendar",ip)}}),jC={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 HC(r,e){return i.openBlock(),i.createElementBlock("svg",jC,[...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 GC={name:"events-icon-summit",render:HC},WC={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 YC(r,e){return i.openBlock(),i.createElementBlock("svg",WC,[...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 XC={name:"events-icon-events",render:YC},KC={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 QC(r,e){return i.openBlock(),i.createElementBlock("svg",KC,[...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 ZC={name:"events-icon-competition",render:QC},JC={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 e5(r,e){return i.openBlock(),i.createElementBlock("svg",JC,[...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 t5={name:"events-icon-release",render:e5},i5={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},n5={events:XC,competition:ZC,release:t5,summit:GC},Hs={上海:"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"},r5="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",s5={class:"o-events-calendar"},a5={key:0,class:"month-list"},o5={class:"collapse-header"},l5={class:"collapse-title"},u5={key:0,class:"collapse-desc"},c5={key:0,class:"month-content month-content-span"},d5={key:0,class:"event-location"},h5={class:"event-name"},f5={key:1},p5={key:0,class:"month-content-row"},m5={class:"month-name"},g5={class:"event-name"},v5={class:"event-location"},y5={class:"event-name"},_5={class:"event-location"},T5={key:1,class:"month-content month-content-column"},b5={class:"event-location"},x5={class:"event-name"},C5={key:1},Xd=i.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(r){const e=xa(),{lePadV:t}=At.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 m;n.data.length?t.value?a.value=[(m=n.data[0])==null?void 0:m.name]:a.value=n.data.map(S=>S.name):a.value=[]},{immediate:!0});const o=m=>{const S=m.split("/");return parseInt(S[1],10)},l=m=>{const S=new Array(12).fill(0),T=[];return m.forEach((b,y)=>{const[E,I]=Array.isArray(b.date)?[o(b.date[0]),o(b.date[1])]:[o(b.date),o(b.date)];let O=0;for(let z=E-1;z<I;z++)O=Math.max(O,S[z]);const k=O+1;for(let z=E-1;z<I;z++)S[z]=k;T.push({event:b,row:k,eventIndex:y,start:E,end:I})}),T},c=m=>{const S=Array.from({length:12},()=>[]);return m.forEach(T=>{const b=Array.isArray(T.date)?o(T.date[0]):o(T.date);S[b-1].push(T)}),S},d=m=>{const S=m.color||i5[m.type];return S!=null&&S.startsWith("--")?`var(${S})`:S},g=m=>m.icon?m.icon:n5[m.type];return(m,S)=>(i.openBlock(),i.createElementBlock("div",s5,[i.unref(t)?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",a5,[(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":S[0]||(S[0]=T=>a.value=T)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.data,(T,b)=>(i.openBlock(),i.createBlock(i.unref(A.OCollapseItem),{key:b,value:T.name},{title:i.withCtx(()=>[i.createElementVNode("div",o5,[i.createElementVNode("div",l5,[i.createElementVNode("div",{class:"title-icon",style:i.normalizeStyle({"--bg-color":d(T)})},[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(g(T))))]),_:2},1024)],4),i.createElementVNode("span",null,i.toDisplayString(T.name),1)]),T.desc?(i.openBlock(),i.createElementBlock("div",u5,[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",c5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l(T.data),({event:y,row:E,eventIndex:I,start:O,end:k})=>(i.openBlock(),i.createElementBlock("div",{key:I,class:i.normalizeClass(["event-item",{"event-item-center":y.align==="center","has-link":y.link}]),style:i.normalizeStyle({gridColumn:`${O} / ${k+1}`,gridRow:E,"--bg-color":d(T)||void 0})},[y.location?(i.openBlock(),i.createElementBlock("div",d5,i.toDisplayString(y.location),1)):i.createCommentVNode("",!0),i.createElementVNode("div",h5,[y.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),i.mergeProps({key:0,href:y.link,target:"_blank"},{ref_for:!0},y.linkProps||{}),{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(y.name),1)]),_:2},1040,["href"])):(i.openBlock(),i.createElementBlock("span",f5,i.toDisplayString(y.name),1))])],6))),128))])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.unref(t)?(i.openBlock(),i.createElementBlock("div",p5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(T.data),(y,E)=>(i.openBlock(),i.createElementBlock("div",{key:E,class:i.normalizeClass(["month-row",{"empty-month":y.length===0}])},[i.createElementVNode("div",m5,i.toDisplayString(s[E]),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y,(I,O)=>(i.openBlock(),i.createElementBlock("div",{key:O,class:i.normalizeClass(["event-item",I.link?"has-link":""]),style:i.normalizeStyle({"--bd-color":d(T)||void 0})},[I.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:I.link,target:"_blank"},{default:i.withCtx(()=>[i.createElementVNode("div",null,[i.createElementVNode("div",g5,[i.createElementVNode("span",null,i.toDisplayString(I.name),1)]),i.createElementVNode("div",v5,i.toDisplayString(I.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",y5,i.toDisplayString(I.name),1),i.createElementVNode("div",_5,i.toDisplayString(I.location),1)],64))],6))),128))],2))),128))])):(i.openBlock(),i.createElementBlock("div",T5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c(T.data),(y,E)=>(i.openBlock(),i.createElementBlock("div",{key:E,class:"month-column"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y,(I,O)=>(i.openBlock(),i.createElementBlock("div",{key:O,class:i.normalizeClass(["event-item",I.link?"has-link":""]),style:i.normalizeStyle({"--bg-color":d(T)||void 0})},[i.createElementVNode("div",b5,i.toDisplayString(I.location),1),i.createElementVNode("div",x5,[I.link?(i.openBlock(),i.createBlock(i.unref(A.OLink),{key:0,href:I.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(I.name),1)]),_:2},1032,["href"])):(i.openBlock(),i.createElementBlock("span",C5,i.toDisplayString(I.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var Zi=(r=>(r.FINISH="finish",r.ING="ing",r.ALL="",r))(Zi||{});const Gs=(r,e)=>new Date(r).getTime()>new Date(e).getTime(),S5={class:"o-events-list"},E5={class:"filter-wrapper"},k5={class:"filter-left"},w5={class:"list-content"},D5={class:"event-name"},A5={class:"event-desc"},N5={class:"event-date"},I5={key:0,class:"event-location"},Kd=i.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(r,{emit:e}){const{t}=Xe.useI18n(),{lePadV:n}=At.useScreen(),s=r,a=[{label:t("events.statusAll"),value:Zi.ALL},{label:t("events.statusIng"),value:Zi.ING},{label:t("events.statusFinish"),value:Zi.FINISH}],o=e,l=i.ref(Zi.ALL),c=i.ref(""),d=i.ref(""),g=(b={})=>{o("search",Object.assign({page:s.page,pageSize:s.pageSize,status:l.value,keyword:d.value},b))},m=()=>{g()},S=()=>{d.value=c.value,g()},T=i.computed(()=>s.data.map(b=>{let y=b.startDate,E=b.endDate,I=ve(b.date).format("YYYY/MM/DD");if(y&&E){const O=ve().format("YYYY-01-01");Gs(O,y)&&(y=O);const k=ve().format("YYYY-12-31");Gs(E,k)&&(E=k),I=`${ve(y).format("YYYY/MM/DD")}-${ve(E).format("MM/DD")}`}return{...b,startDate:y,endDate:E,dateStr:I,status:Gs(new Date,b.date||b.endDate)?Zi.FINISH:Zi.ING}}).sort((b,y)=>Gs(b.date||b.endDate,y.date||y.endDate)?-1:1).map(b=>{var I,O,k;const y=(k=(O=(I=b.city)==null?void 0:I.replace("市",""))==null?void 0:O.replace("中国",""))==null?void 0:k.replaceAll(" ","");let E=null;return Array.isArray(Hs[y])?E=Hs[y][b.name.length%Hs[y].length]:E=Hs[y],E||(E=r5),{...b,cover:E}}));return(b,y)=>(i.openBlock(),i.createElementBlock("div",S5,[i.createElementVNode("div",E5,[i.createElementVNode("div",k5,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("events.status")),1),i.createVNode(i.unref(A.ORadioGroup),{modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=E=>l.value=E),style:{"--radio-group-gap":"8px"},onChange:m},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(a,E=>i.createVNode(i.unref(A.ORadio),{key:E.value,value:E.value},{radio:i.withCtx(({checked:I})=>[i.createVNode(i.unref(A.OToggle),{checked:I},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),i.createVNode(i.unref(A.OInput),{modelValue:c.value,"onUpdate:modelValue":y[1]||(y[1]=E=>c.value=E),placeholder:i.unref(t)("events.searchPlaceholder"),onPressEnter:S,onClear:S,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",w5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(T.value,E=>(i.openBlock(),i.createBlock(i.unref(A.OCard),{key:E.name,cover:E.cover,href:E.link},{default:i.withCtx(()=>[i.createVNode(i.unref(A.OTag),{class:"event-status"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.status===i.unref(Zi).ING?i.unref(t)("events.statusIng"):i.unref(t)("events.statusFinish")),1)]),_:2},1024),i.createElementVNode("div",D5,i.toDisplayString(E.name),1),i.createElementVNode("div",A5,[i.createElementVNode("div",N5,i.toDisplayString(E.dateStr),1),i.createVNode(i.unref(A.ODivider),{direction:"v"}),E.city?(i.openBlock(),i.createElementBlock("div",I5,i.toDisplayString(E.city),1)):i.createCommentVNode("",!0)])]),_:2},1032,["cover","href"]))),128))]),T.value.length?i.createCommentVNode("",!0):i.renderSlot(b.$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:g,pageSizes:[4,12,24,36,48]},null,8,["page","simple","pageSize","total"])):i.createCommentVNode("",!0)]))}}),O5={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function B5(r,e){return i.openBlock(),i.createElementBlock("svg",O5,[...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 L5={name:"events-icon-checked",render:B5},M5={class:"o-events-apply"},P5={class:"events-apply-grid"},R5={class:"timeline-number"},V5={class:"number-circle"},F5={class:"step-title"},$5={class:"step-idx"},U5={class:"step-desc"},q5={key:0},z5={class:"desc-list-wrapper"},j5={key:0,class:"desc-list-title"},H5={class:"desc-list-content"},G5={class:"desc-list-item-title"},W5={class:"desc-list-item-desc"},Qd=i.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(r){const{isDark:e}=At.useTheme(),t=xa();return(n,s)=>(i.openBlock(),i.createElementBlock("div",M5,[i.createElementVNode("div",P5,[(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",R5,[i.createElementVNode("div",V5,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",F5,[i.createElementVNode("div",$5,i.toDisplayString(o+1),1),i.createElementVNode("span",null,i.toDisplayString(a.title),1)]),i.createElementVNode("div",U5,[a.desc?i.withDirectives((i.openBlock(),i.createElementBlock("div",q5,null,512)),[[i.unref(t),a.desc]]):i.createCommentVNode("",!0),i.renderSlot(n.$slots,`step${o+1}`),i.createElementVNode("div",z5,[a.listTitle?(i.openBlock(),i.createElementBlock("div",j5,i.toDisplayString(a.listTitle),1)):i.createCommentVNode("",!0),i.createElementVNode("div",H5,[(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",G5,[i.createVNode(i.unref(A.OIcon),null,{default:i.withCtx(()=>[i.createVNode(i.unref(L5))]),_:1}),i.createElementVNode("span",null,i.toDisplayString(l.title),1)]),i.createElementVNode("div",W5,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))])]))}}),Y5=Object.assign(Xd,{install(r){r.component("OEventsCalendar",Xd)}}),X5=Object.assign(Kd,{install(r){r.component("OEventsList",Kd)}}),K5=Object.assign(Qd,{install(r){r.component("OEventsApply",Qd)}}),Q5={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Z5(r,e){return i.openBlock(),i.createElementBlock("svg",Q5,[...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 J5={name:"components-icon-caret-left",render:Z5},eS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function tS(r,e){return i.openBlock(),i.createElementBlock("svg",eS,[...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 iS={name:"components-icon-caret-right",render:tS},nS={class:"header-nav-wrap"},rS={key:0,class:"right-icon"},sS=["onMouseenter","onMouseleave"],aS=["id"],oS={class:"nav-text"},lS=["id","onClick"],uS={class:"nav-text"},cS={key:1,class:"right-icon"},dS=i.defineComponent({__name:"HeaderNav",props:{navData:{},activeIndex:{},hoverId:{}},emits:["handle-mouseenter","handle-mouseleave","handle-click"],setup(r,{emit:e}){const t=e,{isDark:n}=At.useTheme(),s=r,a=i.ref(),o=i.ref(),l=i.ref(null),c=i.ref(!1),d=i.ref(!1),g=i.ref(),m=zi.useDebounceFn(($,j)=>{g.value=$==null?void 0:$.id,j==="mouseenter"&&t("handle-mouseenter",$),j==="mouseleave"&&(g.value="",t("handle-mouseleave",$))},100),S=$=>{t("handle-click",$)},T=()=>{d.value=!0,i.nextTick(()=>{a.value.scrollTo({left:a.value.clientWidth,behavior:"smooth"})})},b=()=>{a.value.scrollTo({left:0,behavior:"smooth"}),d.value=!1},y=()=>{var $,j;(($=a.value)==null?void 0:$.clientWidth)<((j=o.value)==null?void 0:j.clientWidth)?c.value=!0:c.value=!1};let E=0,I=0;const O=()=>I=0,k=$=>I>0?void I++:(I++,E=Date.now(),{event:"hover",properties:{module:"navigation",level1:$,target:$}}),z=$=>({properties:{module:"navigation",level1:$.label,target:$.label,steps:I,url:$.href,duration:Date.now()-E}});return i.onMounted(()=>{window.addEventListener("resize",y),i.nextTick(()=>{y(),l.value=setTimeout(()=>{y()},1e3)})}),i.onUnmounted(()=>{window.removeEventListener("resize",y),clearTimeout(l.value)}),($,j)=>{const N=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",nS,[i.createElementVNode("div",{class:i.normalizeClass(["header-nav",{"header-nav-scroll":d.value}])},[d.value?(i.openBlock(),i.createElementBlock("div",rS,[i.createVNode(i.unref(A.OIcon),{onClick:b},{default:i.withCtx(()=>[i.createVNode(i.unref(J5))]),_:1})])):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"navRef",ref:a,class:i.normalizeClass(["o-nav",{"o-nav-scroll":d.value||!c.value,dark:i.unref(n)}])},[i.createElementVNode("ul",{ref_key:"navListRef",ref:o,class:"o-nav-list",onMouseenter:O},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.navData,(H,x)=>{var w;return i.withDirectives((i.openBlock(),i.createElementBlock("li",{key:H.id,class:i.normalizeClass({"is-selected":g.value===H.id||s.hoverId===H.id,"is-active":s.activeIndex===x}),onMouseenter:P=>i.unref(m)(H,"mouseenter"),onMouseleave:P=>i.unref(m)(H,"mouseleave")},[(w=H==null?void 0:H.children)!=null&&w.length?(i.openBlock(),i.createElementBlock("div",{key:0,id:"tour_headerNav_"+H.id,class:"nav-item"},[i.createElementVNode("span",oS,i.toDisplayString(H.label),1)],8,aS)):(i.openBlock(),i.createElementBlock("div",{key:1,id:"tour_headerNav_"+H.id,class:"nav-item item-other",onClick:P=>S(H)},[i.createElementVNode("span",uS,i.toDisplayString(H.label),1),H.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(H.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,lS))],42,sS)),[[N,k(H.label),"mouseenter"],[N,z(H),void 0,{catchBubble:!0}]])}),128))],544)],2),c.value&&!d.value?(i.openBlock(),i.createElementBlock("div",cS,[i.createVNode(i.unref(A.OIcon),{onClick:T},{default:i.withCtx(()=>[i.createVNode(i.unref(iS))]),_:1})])):i.createCommentVNode("",!0)],2)])}}}),hS=Xe._export_sfc(dS,[["__scopeId","data-v-fe042238"]]),fS={class:"nav-sub-content"},pS={class:"content-left"},mS={class:"content-label"},gS={class:"content-container"},vS=["href","target"],yS={class:"item-name"},_S={key:0,class:"desc-container"},TS=["title"],bS={key:0,class:"split-line"},xS={key:1,class:"content-right"},CS={class:"content-label"},SS=["href","target"],ES=["href","target"],kS=["src"],wS={class:"review-content"},DS={class:"review-label"},AS={class:"review-property"},NS=i.defineComponent({__name:"HeaderContent",props:{itemData:{},itemVisible:{type:Boolean},community:{},bgLeft:{},bgRight:{},hoverIndex:{}},emits:["handle-mouseenter-sub","handle-mouseleave-sub"],setup(r,{emit:e}){const t=e,n=r,{locale:s}=At.useLocale(),{theme:a}=At.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},d=i.ref(!1),g=T=>{if(!T||!T.target)return;const b=T.target;d.value=b.clientHeight<b.scrollHeight},m=(T,b)=>({properties:{module:"navigation",level1:T.label,level2:b.label,target:b.label,url:T.href}}),S=T=>({properties:{module:"navigation",level1:s.value==="zh"?"快捷链接":"Quick Link",level2:T.label,target:T.label,url:T.href}});return(T,b)=>{var E,I,O;const y=i.resolveDirective("analytics");return i.openBlock(),i.createElementBlock("div",{onMouseenter:l,onMouseleave:c},[(n.itemVisible||o.value)&&((I=(E=n.itemData)==null?void 0:E.children)!=null&&I.length)?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["nav-content",[(O=n.community)==null?void 0:O.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(gn,null,{default:i.withCtx(()=>[i.createVNode(i.unref(A.OScroller),{class:"nav-scroller","show-type":"always",size:"small","disabled-y":""},{default:i.withCtx(()=>{var k,z,$,j,N,H,x,w;return[i.createElementVNode("div",fS,[i.createElementVNode("div",pS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList((k=n.itemData)==null?void 0:k.children,(P,K)=>(i.openBlock(),i.createElementBlock("div",{class:"item-sub",key:K},[i.createElementVNode("span",mS,i.toDisplayString(P.label),1),i.createElementVNode("div",gS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(P.children,B=>(i.openBlock(),i.createElementBlock("div",{key:B.label,class:"content-item"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:B.href,target:(B==null?void 0:B.target)||"_self",rel:"noopener noreferrer",class:"item-label"},[i.createElementVNode("span",yS,i.toDisplayString(B.label),1),B.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(B.icon)))]),_:2},1024)):i.createCommentVNode("",!0),B.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(B.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,vS)),[[y,()=>m(P,B)]]),B.description?(i.openBlock(),i.createElementBlock("div",_S,[i.createElementVNode("p",{class:"item-desc",title:d.value?B.description:void 0,onMouseenter:b[0]||(b[0]=U=>g(U))},i.toDisplayString(B.description),41,TS)])):i.createCommentVNode("",!0)]))),128))])]))),128))]),($=(z=n.itemData)==null?void 0:z.shortcut)!=null&&$.length?(i.openBlock(),i.createElementBlock("div",bS)):i.createCommentVNode("",!0),(N=(j=n.itemData)==null?void 0:j.shortcut)!=null&&N.length?(i.openBlock(),i.createElementBlock("div",xS,[i.createElementVNode("span",CS,i.toDisplayString(i.unref(s)==="zh"?"快捷链接":"Quick Link"),1),(H=n.itemData)!=null&&H.withPicture?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList((w=n.itemData)==null?void 0:w.shortcut,P=>i.withDirectives((i.openBlock(),i.createElementBlock("a",{key:P.label,href:P.href,target:(P==null?void 0:P.target)||"_self",rel:"noopener noreferrer",class:"review"},[i.createElementVNode("img",{src:P.picture,class:"review-picture"},null,8,kS),i.createElementVNode("div",wS,[i.createElementVNode("p",DS,i.toDisplayString(P.label),1),i.createElementVNode("div",AS,i.toDisplayString(P.remark),1)])],8,ES)),[[y,()=>S(P)]])),128)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList((x=n.itemData)==null?void 0:x.shortcut,P=>(i.openBlock(),i.createElementBlock("div",{key:P.label,class:"shortcut"},[i.withDirectives((i.openBlock(),i.createElementBlock("a",{href:P.href,target:(P==null?void 0:P.target)||"_self",rel:"noopener noreferrer",class:"shortcut-link"},[i.createElementVNode("span",null,i.toDisplayString(P.label),1),P.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(P.icon)))]),_:2},1024)):i.createCommentVNode("",!0)],8,SS)),[[y,()=>S(P)]])]))),128))])):i.createCommentVNode("",!0)])]}),_:1})]),_:1})],2)):i.createCommentVNode("",!0)],32)}}}),IS=Xe._export_sfc(NS,[["__scopeId","data-v-a2219e83"]]),OS={class:"header"},BS=["src"],LS={class:"header-nav"},MS={key:0,class:"header-toolbar"},PS={class:"header-nav-content"},RS=i.defineComponent({__name:"OHeader",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-home","handle-click"],setup(r,{emit:e}){const{isDark:t}=At.useTheme(),n=e,s=r,a=i.ref(),o=i.ref(),l=i.ref(),c=i.ref(!1),d=()=>{n("go-home")},g=y=>{var E;l.value=y,a.value=y.id,(E=y==null?void 0:y.children)!=null&&E.length&&(c.value=!0)},m=y=>{c.value=!1},S=y=>{n("handle-click",y)},T=y=>{o.value=y},b=y=>{o.value=y};return(y,E)=>(i.openBlock(),i.createElementBlock("div",OS,[i.createElementVNode("div",{class:i.normalizeClass(["header-wrap",{"header-wrap-dark":i.unref(t)}])},[i.createVNode(gn,{class:"header-content"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"header-logo",onClick:d},[i.renderSlot(y.$slots,"logo",{},()=>[s.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:s.logo},null,8,BS)):i.createCommentVNode("",!0)],!0)]),i.createElementVNode("div",LS,[i.renderSlot(y.$slots,"nav",{},()=>[s.navData?(i.openBlock(),i.createBlock(hS,{key:0,"nav-data":s.navData,hoverId:o.value,"active-index":s.activeIndex,onHandleMouseenter:g,onHandleMouseleave:m,onHandleClick:S},null,8,["nav-data","hoverId","active-index"])):i.createCommentVNode("",!0)],!0)]),y.$slots.toolbar?(i.openBlock(),i.createElementBlock("div",MS,[i.renderSlot(y.$slots,"toolbar",{},void 0,!0)])):i.createCommentVNode("",!0)]),_:3})],2),i.createElementVNode("div",PS,[i.createVNode(IS,{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:b},null,8,["itemData","item-visible","bg-left","bg-right","community","hover-index"])])]))}}),Zd=Xe._export_sfc(RS,[["__scopeId","data-v-486d601a"]]);var dn=(r=>(r.NAV="nav",r.CODE="code",r.LANG="lang",r))(dn||{});const VS={class:"o-nav"},FS={class:"o-nav-list"},$S=["onClick"],US={class:"nav-aside"},qS={key:0,class:"nav-aside-wrapper"},zS=["value"],jS={class:"content-label"},HS={class:"container-mobile"},GS=["onClick"],WS={class:"item-label"},YS={class:"desc-container"},XS={class:"item-desc"},KS=["onClick"],QS={class:"item-label"},ZS={key:1,class:"nav-aside-wrapper"},JS=["onClick"],eE={class:"header-tool"},tE={key:2,class:"other-tool"},iE=i.defineComponent({__name:"HeaderNavMobile",props:{menuShow:{type:Boolean,default:!1},navData:{default:()=>[]},codeData:{default:()=>[]},langData:{default:()=>[]}},emits:["on-click","lang-click","handle-click"],setup(r,{emit:e}){const t=e,n=r,s=i.ref(""),a=i.ref({}),o=(d,g)=>{var m;g===dn.NAV?(m=d==null?void 0:d.children)!=null&&m.length?(s.value=d.id,a.value=d):t("handle-click",d):g===dn.CODE?(s.value=g,a.value=n.codeData.list):g===dn.LANG&&(s.value=g,a.value=n.langData.list)},l=(d,g)=>{window.open(d,g||"_self"),t("on-click")},c=d=>{s.value===dn.CODE?l(d.href,d==null?void 0:d.target):s.value===dn.LANG&&t("lang-click",d)};return i.onMounted(()=>{s.value=n.navData[0].id,a.value=n.navData[0]}),i.watch(()=>n.navData||n.codeData||n.langData,()=>{s.value===dn.CODE?a.value=n.codeData.list:s.value===dn.LANG?a.value=n.langData.list:a.value=n.navData.find(d=>d.id===s.value)},{deep:!0}),(d,g)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["header-nav",{active:r.menuShow}])},[i.createElementVNode("div",VS,[i.createElementVNode("ul",FS,[(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:s.value===m.id})},[i.createElementVNode("span",{onClick:S=>o(m,"nav")},i.toDisplayString(m.label),9,$S)],2))),128))]),i.createElementVNode("div",US,[s.value!=="code"&&s.value!=="lang"?(i.openBlock(),i.createElementBlock("ul",qS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value.children,m=>(i.openBlock(),i.createElementBlock("li",{value:m.label,key:m.label,class:"nav-aside-content"},[m!=null&&m.children?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("p",jS,i.toDisplayString(m.label),1),i.createElementVNode("div",HS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m==null?void 0:m.children,S=>(i.openBlock(),i.createElementBlock("div",{key:S.label,class:"content-container-mobile"},[i.createElementVNode("a",{onClick:T=>l(S.href,S==null?void 0:S.target),rel:"noopener noreferrer",class:"content-subtitle"},[i.createElementVNode("span",WS,i.toDisplayString(S.label),1),S.icon?(i.openBlock(),i.createBlock(i.unref(A.OIcon),{key:0},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(S.icon),{class:"icon"}))]),_:2},1024)):i.createCommentVNode("",!0),S.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(S.tag),1)]),_:2},1024)):i.createCommentVNode("",!0)],8,GS),i.createElementVNode("div",YS,[i.createElementVNode("p",XS,i.toDisplayString(S.description),1)])]))),128))])],64)):(i.openBlock(),i.createElementBlock("a",{key:1,onClick:S=>l(m.href,m==null?void 0:m.target),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[i.createElementVNode("span",QS,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,KS))],8,zS))),128))])):(i.openBlock(),i.createElementBlock("div",ZS,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,m=>(i.openBlock(),i.createElementBlock("a",{key:m.label,onClick:S=>c(m),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,JS))),128))]))])]),i.createElementVNode("div",eE,[r.codeData?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["header-tool-item",{active:s.value==="code"}]),onClick:g[0]||(g[0]=m=>o(null,"code"))},i.toDisplayString(r.codeData.label),3)):i.createCommentVNode("",!0),r.langData?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["header-tool-item",{active:s.value==="lang"}]),onClick:g[1]||(g[1]=m=>o(null,"lang"))},i.toDisplayString(r.langData.label),3)):i.createCommentVNode("",!0),d.$slots.tool?(i.openBlock(),i.createElementBlock("div",tE,[i.renderSlot(d.$slots,"tool",{},void 0,!0)])):i.createCommentVNode("",!0)])],2))}}),nE=Xe._export_sfc(iE,[["__scopeId","data-v-7aa3e2e5"]]),rE={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function sE(r,e){return i.openBlock(),i.createElementBlock("svg",rE,[...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 aE={name:"components-icon-header-menu",render:sE},oE={class:"header"},lE={class:"header-box"},uE={key:0,class:"header-simple"},cE={class:"simple-header-left"},dE={key:0,class:"header-title"},hE={key:0,class:"simple-header-right"},fE={class:"header-left"},pE={class:"header-center"},mE=["src"],gE={class:"header-right"},vE=i.defineComponent({__name:"OHeaderMobile",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-back","lang-click","go-home"],setup(r,{emit:e}){const t=e,n=r,s=()=>{t("go-back")},a=()=>{t("go-home")},o=i.ref(!1),l=()=>{setTimeout(()=>{o.value=!o.value},200)},c=()=>{l()},d=()=>{l()},g=m=>{t("lang-click",m),l()};return(m,S)=>(i.openBlock(),i.createElementBlock("div",oE,[i.createElementVNode("div",lE,[i.createVNode(gn,{class:"header-wrap"},{default:i.withCtx(()=>[r.isSimpleHeader?(i.openBlock(),i.createElementBlock("div",uE,[i.createElementVNode("div",cE,[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",dE,i.toDisplayString(r.headerTitle),1)):i.createCommentVNode("",!0)]),m.$slots.rightConfig?(i.openBlock(),i.createElementBlock("div",hE,[i.renderSlot(m.$slots,"rightConfig",{},void 0,!0)])):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",fE,[i.createVNode(i.unref(A.OIcon),{onClick:l},{default:i.withCtx(()=>[o.value?(i.openBlock(),i.createBlock(i.unref(Sl),{key:1})):(i.openBlock(),i.createBlock(i.unref(aE),{key:0}))]),_:1})]),i.createElementVNode("div",pE,[i.createElementVNode("div",{class:"header-logo",onClick:a},[i.renderSlot(m.$slots,"logo",{},()=>[n.logo?(i.openBlock(),i.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:n.logo},null,8,mE)):i.createCommentVNode("",!0)],!0)])]),i.createElementVNode("div",gE,[i.renderSlot(m.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]),i.createElementVNode("div",{class:i.normalizeClass(["header-content-mb",{"header-content-active":o.value}])},[i.createVNode(nE,{ref:"mobileNav","nav-data":r.navData,"code-data":r.codeData,"lang-data":r.langData,"menu-show":o.value,onHandleClick:d,onOnClick:c,onLangClick:g},{tool:i.withCtx(()=>[i.renderSlot(m.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","lang-data","menu-show"])],2)]))}}),Jd=Xe._export_sfc(vE,[["__scopeId","data-v-1d6060f9"]]),yE=Object.assign(Zd,{install(r){r.component("OHeader",Zd)}}),_E=Object.assign(Jd,{install(r){r.component("OHeaderMobile",Jd)}}),TE={OBanner:eh,OCookieNotice:th,OFooter:ih,OHeaderSearch:nh,OHeaderUser:rh,OPlusConfigProvider:sh,OSection:ah,OSourceCode:oh,OThemeSwitcher:lh},bE={install:r=>{Object.entries(TE).forEach(([e,t])=>{r.component(e,t)})}};exports.OElCookieNotice=Xe.OElCookieNotice;exports.CalendarDataType=Be;exports.EventsStatusT=Zi;exports.MeetingGroupType=vi;exports.OActivityApproval=zC;exports.OActivityForm=qC;exports.OActivityMyCalendar=ip;exports.OBanner=eh;exports.OCookieNotice=th;exports.OEventsApply=K5;exports.OEventsCalendar=Y5;exports.OEventsList=X5;exports.OFooter=ih;exports.OHeader=yE;exports.OHeaderMobile=_E;exports.OHeaderSearch=nh;exports.OHeaderUser=rh;exports.OMeetingCalendar=eC;exports.OMeetingForm=tC;exports.OMeetingMyCalendar=rC;exports.OMeetingPlayback=iC;exports.OMeetingSigCalendar=nC;exports.OPlusConfigProvider=sh;exports.OSection=ah;exports.OSourceCode=oh;exports.OThemeSwitcher=lh;exports.default=bE;
|